eptm_dashboard/.venv/lib/python3.12/site-packages/plotly/package_data/widgetbundle.js

3909 lines
4.8 MiB
Raw Blame History

This file contains invisible Unicode characters

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

var aX=Object.create;var Wk=Object.defineProperty;var iX=Object.getOwnPropertyDescriptor;var nX=Object.getOwnPropertyNames;var oX=Object.getPrototypeOf,sX=Object.prototype.hasOwnProperty;var lX=(fe,_e)=>()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var uX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of nX(_e))!sX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=iX(_e,gr))||Lt.enumerable});return fe};var cX=(fe,_e,Xe)=>(Xe=fe!=null?aX(oX(fe)):{},uX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=lX((r7,c2)=>{(function(fe,_e){typeof c2=="object"&&c2.exports?c2.exports=_e():fe.moduleName=_e()})(typeof self<"u"?self:r7,()=>{"use strict";var fe=(()=>{var _e=Object.create,Xe=Object.defineProperty,Lt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Yr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,oi=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Fn=(Z,V,d)=>V in Z?Xe(Z,V,{enumerable:!0,configurable:!0,writable:!0,value:d}):Z[V]=d,To=(Z,V)=>{for(var d in V||(V={}))Cn.call(V,d)&&Fn(Z,d,V[d]);if(ei)for(var d of ei(V))xn.call(V,d)&&Fn(Z,d,V[d]);return Z},ps=(Z,V)=>Lt(Z,Yr(V)),Qs=(Z,V)=>{var d={};for(var x in Z)Cn.call(Z,x)&&V.indexOf(x)<0&&(d[x]=Z[x]);if(Z!=null&&ei)for(var x of ei(Z))V.indexOf(x)<0&&xn.call(Z,x)&&(d[x]=Z[x]);return d},Go=(Z,V)=>function(){return Z&&(V=(0,Z[Ea(Z)[0]])(Z=0)),V},He=(Z,V)=>function(){return V||(0,Z[Ea(Z)[0]])((V={exports:{}}).exports,V),V.exports},Kl=(Z,V)=>{for(var d in V)Xe(Z,d,{get:V[d],enumerable:!0})},nu=(Z,V,d,x)=>{if(V&&typeof V=="object"||typeof V=="function")for(let S of Ea(V))!Cn.call(Z,S)&&S!==d&&Xe(Z,S,{get:()=>V[S],enumerable:!(x=gr(V,S))||x.enumerable});return Z},jp=(Z,V,d)=>(d=Z!=null?_e(oi(Z)):{},nu(V||!Z||!Z.__esModule?Xe(d,"default",{value:Z,enumerable:!0}):d,Z)),zf=Z=>nu(Xe({},"__esModule",{value:!0}),Z),fp=He({"src/version.js"(Z){"use strict";Z.version="3.5.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,V){(function(x,S,E){S[x]=S[x]||E(),typeof V<"u"&&V.exports&&(V.exports=S[x])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var x,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(_,w,A,M){return Object.defineProperty(_,w,{value:A,writable:!0,configurable:M!==!1})}}catch{x=function(w,A,M){return w[A]=M,w}}E=function(){var _,w,A;function M(g,b){this.fn=g,this.self=b,this.next=void 0}return{add:function(b,p){A=new M(b,p),w?w.next=A:_=A,w=A,A=void 0},drain:function(){var b=_;for(_=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,_){E.add(l,_),S||(S=t(E.drain))}function o(l){var _,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(_=l.then),typeof _=="function"?_:!1}function a(){for(var l=0;l<this.chain.length;l++)n(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function n(l,_,w){var A,M;try{_===!1?w.reject(l.msg):(_===!0?A=l.msg:A=_.call(void 0,l.msg),A===w.promise?w.reject(TypeError("Promise-chain cycle")):(M=o(A))?M.call(A,w.resolve,w.reject):w.resolve(A))}catch(g){w.reject(g)}}function i(l){var _,w=this;if(!w.triggered){w.triggered=!0,w.def&&(w=w.def);try{(_=o(l))?r(function(){var A=new f(w);try{_.call(l,function(){i.apply(A,arguments)},function(){s.apply(A,arguments)})}catch(M){s.call(A,M)}}):(w.msg=l,w.state=1,w.chain.length>0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=l,_.state=2,_.chain.length>0&&r(a,_))}function h(l,_,w,A){for(var M=0;M<_.length;M++)(function(b){l.resolve(_[b]).then(function(u){w(b,u)},A)})(M)}function f(l){this.def=l,this.triggered=!1}function v(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function c(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new v(this);this.then=function(A,M){var g={success:typeof A=="function"?A:!0,failure:typeof M=="function"?M:!1};return g.promise=new this.constructor(function(p,u){if(typeof p!="function"||typeof u!="function")throw TypeError("Not a function");g.resolve=p,g.reject=u}),_.chain.push(g),_.state!==0&&r(a,_),g.promise},this.catch=function(A){return this.then(void 0,A)};try{l.call(void 0,function(A){i.call(_,A)},function(A){s.call(_,A)})}catch(w){s.call(_,w)}}var T=x({},"constructor",c,!1);return c.prototype=T,x(T,"__NPO__",0,!1),x(c,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");M(_)})}),x(c,"reject",function(_){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(_)})}),x(c,"all",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");var b=_.length,p=Array(b),u=0;h(w,_,function(m,R){p[m]=R,++u===b&&M(p)},g)})}),x(c,"race",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");h(w,_,function(p,u){M(u)},g)})}),c})}}),Wn=He({"node_modules/@plotly/d3/d3.js"(Z,V){(function(){var d={version:"3.8.2"},x=[].slice,S=function(me){return x.call(me)},E=self.document;function e(me){return me&&(me.ownerDocument||me.document||me).documentElement}function t(me){return me&&(me.ownerDocument&&me.ownerDocument.defaultView||me.document&&me||me.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=De[et];return dt}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,n=this.CSSStyleDeclaration.prototype,i=n.setProperty;r.setAttribute=function(De,et){o.call(this,De,et+"")},r.setAttributeNS=function(De,et,dt){a.call(this,De,et,dt+"")},n.setProperty=function(De,et,dt){i.call(this,De,et+"",dt)}}d.ascending=s;function s(me,De){return me<De?-1:me>De?1:me>=De?0:NaN}d.descending=function(me,De){return De<me?-1:De>me?1:De>=me?0:NaN},d.min=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et<dt;)if((Tt=me[et])!=null&&Tt>=Tt){yt=Tt;break}for(;++et<dt;)(Tt=me[et])!=null&&yt>Tt&&(yt=Tt)}else{for(;++et<dt;)if((Tt=De.call(me,me[et],et))!=null&&Tt>=Tt){yt=Tt;break}for(;++et<dt;)(Tt=De.call(me,me[et],et))!=null&&yt>Tt&&(yt=Tt)}return yt},d.max=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et<dt;)if((Tt=me[et])!=null&&Tt>=Tt){yt=Tt;break}for(;++et<dt;)(Tt=me[et])!=null&&Tt>yt&&(yt=Tt)}else{for(;++et<dt;)if((Tt=De.call(me,me[et],et))!=null&&Tt>=Tt){yt=Tt;break}for(;++et<dt;)(Tt=De.call(me,me[et],et))!=null&&Tt>yt&&(yt=Tt)}return yt},d.extent=function(me,De){var et=-1,dt=me.length,yt,Tt,tr;if(arguments.length===1){for(;++et<dt;)if((Tt=me[et])!=null&&Tt>=Tt){yt=tr=Tt;break}for(;++et<dt;)(Tt=me[et])!=null&&(yt>Tt&&(yt=Tt),tr<Tt&&(tr=Tt))}else{for(;++et<dt;)if((Tt=De.call(me,me[et],et))!=null&&Tt>=Tt){yt=tr=Tt;break}for(;++et<dt;)(Tt=De.call(me,me[et],et))!=null&&(yt>Tt&&(yt=Tt),tr<Tt&&(tr=Tt))}return[yt,tr]};function h(me){return me===null?NaN:+me}function f(me){return!isNaN(me)}d.sum=function(me,De){var et=0,dt=me.length,yt,Tt=-1;if(arguments.length===1)for(;++Tt<dt;)f(yt=+me[Tt])&&(et+=yt);else for(;++Tt<dt;)f(yt=+De.call(me,me[Tt],Tt))&&(et+=yt);return et},d.mean=function(me,De){var et=0,dt=me.length,yt,Tt=-1,tr=dt;if(arguments.length===1)for(;++Tt<dt;)f(yt=h(me[Tt]))?et+=yt:--tr;else for(;++Tt<dt;)f(yt=h(De.call(me,me[Tt],Tt)))?et+=yt:--tr;if(tr)return et/tr},d.quantile=function(me,De){var et=(me.length-1)*De+1,dt=Math.floor(et),yt=+me[dt-1],Tt=et-dt;return Tt?yt+Tt*(me[dt]-yt):yt},d.median=function(me,De){var et=[],dt=me.length,yt,Tt=-1;if(arguments.length===1)for(;++Tt<dt;)f(yt=h(me[Tt]))&&et.push(yt);else for(;++Tt<dt;)f(yt=h(De.call(me,me[Tt],Tt)))&&et.push(yt);if(et.length)return d.quantile(et.sort(s),.5)},d.variance=function(me,De){var et=me.length,dt=0,yt,Tt,tr=0,zt=-1,_r=0;if(arguments.length===1)for(;++zt<et;)f(yt=h(me[zt]))&&(Tt=yt-dt,dt+=Tt/++_r,tr+=Tt*(yt-dt));else for(;++zt<et;)f(yt=h(De.call(me,me[zt],zt)))&&(Tt=yt-dt,dt+=Tt/++_r,tr+=Tt*(yt-dt));if(_r>1)return tr/(_r-1)},d.deviation=function(){var me=d.variance.apply(this,arguments);return me&&Math.sqrt(me)};function v(me){return{left:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt<yt;){var Tt=dt+yt>>>1;me(De[Tt],et)<0?dt=Tt+1:yt=Tt}return dt},right:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt<yt;){var Tt=dt+yt>>>1;me(De[Tt],et)>0?yt=Tt:dt=Tt+1}return dt}}}var c=v(s);d.bisectLeft=c.left,d.bisect=d.bisectRight=c.right,d.bisector=function(me){return v(me.length===1?function(De,et){return s(me(De),et)}:me)},d.shuffle=function(me,De,et){(dt=arguments.length)<3&&(et=me.length,dt<2&&(De=0));for(var dt=et-De,yt,Tt;dt;)Tt=Math.random()*dt--|0,yt=me[dt+De],me[dt+De]=me[Tt+De],me[Tt+De]=yt;return me},d.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},d.pairs=function(me){for(var De=0,et=me.length-1,dt,yt=me[0],Tt=new Array(et<0?0:et);De<et;)Tt[De]=[dt=yt,yt=me[++De]];return Tt},d.transpose=function(me){if(!(Tt=me.length))return[];for(var De=-1,et=d.min(me,T),dt=new Array(et);++De<et;)for(var yt=-1,Tt,tr=dt[De]=new Array(Tt);++yt<Tt;)tr[yt]=me[yt][De];return dt};function T(me){return me.length}d.zip=function(){return d.transpose(arguments)},d.keys=function(me){var De=[];for(var et in me)De.push(et);return De},d.values=function(me){var De=[];for(var et in me)De.push(me[et]);return De},d.entries=function(me){var De=[];for(var et in me)De.push({key:et,value:me[et]});return De},d.merge=function(me){for(var De=me.length,et,dt=-1,yt=0,Tt,tr;++dt<De;)yt+=me[dt].length;for(Tt=new Array(yt);--De>=0;)for(tr=me[De],et=tr.length;--et>=0;)Tt[--yt]=tr[et];return Tt};var l=Math.abs;d.range=function(me,De,et){if(arguments.length<3&&(et=1,arguments.length<2&&(De=me,me=0)),(De-me)/et===1/0)throw new Error("infinite range");var dt=[],yt=_(l(et)),Tt=-1,tr;if(me*=yt,De*=yt,et*=yt,et<0)for(;(tr=me+et*++Tt)>De;)dt.push(tr/yt);else for(;(tr=me+et*++Tt)<De;)dt.push(tr/yt);return dt};function _(me){for(var De=1;me*De%1;)De*=10;return De}function w(me,De){for(var et in De)Object.defineProperty(me.prototype,et,{value:De[et],enumerable:!1})}d.map=function(me,De){var et=new A;if(me instanceof A)me.forEach(function(zt,_r){et.set(zt,_r)});else if(Array.isArray(me)){var dt=-1,yt=me.length,Tt;if(arguments.length===1)for(;++dt<yt;)et.set(dt,me[dt]);else for(;++dt<yt;)et.set(De.call(me,Tt=me[dt],dt),Tt)}else for(var tr in me)et.set(tr,me[tr]);return et};function A(){this._=Object.create(null)}var M="__proto__",g="\0";w(A,{has:u,get:function(me){return this._[b(me)]},set:function(me,De){return this._[b(me)]=De},remove:y,keys:m,values:function(){var me=[];for(var De in this._)me.push(this._[De]);return me},entries:function(){var me=[];for(var De in this._)me.push({key:p(De),value:this._[De]});return me},size:R,empty:L,forEach:function(me){for(var De in this._)me.call(this,p(De),this._[De])}});function b(me){return(me+="")===M||me[0]===g?g+me:me}function p(me){return(me+="")[0]===g?me.slice(1):me}function u(me){return b(me)in this._}function y(me){return(me=b(me))in this._&&delete this._[me]}function m(){var me=[];for(var De in this._)me.push(p(De));return me}function R(){var me=0;for(var De in this._)++me;return me}function L(){for(var me in this._)return!1;return!0}d.nest=function(){var me={},De=[],et=[],dt,yt;function Tt(zt,_r,Gr){if(Gr>=De.length)return yt?yt.call(me,_r):dt?_r.sort(dt):_r;for(var Xr=-1,xa=_r.length,pa=De[Gr++],Ja,ti,Sa,za=new A,Xa;++Xr<xa;)(Xa=za.get(Ja=pa(ti=_r[Xr])))?Xa.push(ti):za.set(Ja,[ti]);return zt?(ti=zt(),Sa=function(fi,ni){ti.set(fi,Tt(zt,ni,Gr))}):(ti={},Sa=function(fi,ni){ti[fi]=Tt(zt,ni,Gr)}),za.forEach(Sa),ti}function tr(zt,_r){if(_r>=De.length)return zt;var Gr=[],Xr=et[_r++];return zt.forEach(function(xa,pa){Gr.push({key:xa,values:tr(pa,_r)})}),Xr?Gr.sort(function(xa,pa){return Xr(xa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(d.map,zt,0),0)},me.key=function(zt){return De.push(zt),me},me.sortKeys=function(zt){return et[De.length-1]=zt,me},me.sortValues=function(zt){return dt=zt,me},me.rollup=function(zt){return yt=zt,me},me},d.set=function(me){var De=new z;if(me)for(var et=0,dt=me.length;et<dt;++et)De.add(me[et]);return De};function z(){this._=Object.create(null)}w(z,{has:u,add:function(me){return this._[b(me+="")]=!0,me},remove:y,values:m,size:R,empty:L,forEach:function(me){for(var De in this._)me.call(this,p(De))}}),d.behavior={};function F(me){return me}d.rebind=function(me,De){for(var et=1,dt=arguments.length,yt;++et<dt;)me[yt=arguments[et]]=N(me,De,De[yt]);return me};function N(me,De,et){return function(){var dt=et.apply(De,arguments);return dt===De?me:dt}}function O(me,De){if(De in me)return De;De=De.charAt(0).toUpperCase()+De.slice(1);for(var et=0,dt=P.length;et<dt;++et){var yt=P[et]+De;if(yt in me)return yt}}var P=["webkit","ms","moz","Moz","o","O"];function U(){}d.dispatch=function(){for(var me=new B,De=-1,et=arguments.length;++De<et;)me[arguments[De]]=X(me);return me};function B(){}B.prototype.on=function(me,De){var et=me.indexOf("."),dt="";if(et>=0&&(dt=me.slice(et+1),me=me.slice(0,et)),me)return arguments.length<2?this[me].on(dt):this[me].on(dt,De);if(arguments.length===2){if(De==null)for(me in this)this.hasOwnProperty(me)&&this[me].on(dt,null);return this}};function X(me){var De=[],et=new A;function dt(){for(var yt=De,Tt=-1,tr=yt.length,zt;++Tt<tr;)(zt=yt[Tt].on)&&zt.apply(this,arguments);return me}return dt.on=function(yt,Tt){var tr=et.get(yt),zt;return arguments.length<2?tr&&tr.on:(tr&&(tr.on=null,De=De.slice(0,zt=De.indexOf(tr)).concat(De.slice(zt+1)),et.remove(yt)),Tt&&De.push(et.set(yt,{on:Tt})),me)},dt}d.event=null;function $(){d.event.preventDefault()}function le(){for(var me=d.event,De;De=me.sourceEvent;)me=De;return me}function ce(me){for(var De=new B,et=0,dt=arguments.length;++et<dt;)De[arguments[et]]=X(De);return De.of=function(yt,Tt){return function(tr){try{var zt=tr.sourceEvent=d.event;tr.target=me,d.event=tr,De[tr.type].apply(yt,Tt)}finally{d.event=zt}}},De}d.requote=function(me){return me.replace(de,"\\$&")};var de=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(me,De){me.__proto__=De}:function(me,De){for(var et in De)me[et]=De[et]};function Y(me){return G(me,ae),me}var ee=function(me,De){return De.querySelector(me)},q=function(me,De){return De.querySelectorAll(me)},se=function(me,De){var et=me.matches||me[O(me,"matchesSelector")];return se=function(dt,yt){return et.call(dt,yt)},se(me,De)};typeof Sizzle=="function"&&(ee=function(me,De){return Sizzle(me,De)[0]||null},q=Sizzle,se=Sizzle.matchesSelector),d.selection=function(){return d.select(E.documentElement)};var ae=d.selection.prototype=[];ae.select=function(me){var De=[],et,dt,yt,Tt;me=j(me);for(var tr=-1,zt=this.length;++tr<zt;){De.push(et=[]),et.parentNode=(yt=this[tr]).parentNode;for(var _r=-1,Gr=yt.length;++_r<Gr;)(Tt=yt[_r])?(et.push(dt=me.call(Tt,Tt.__data__,_r,tr)),dt&&"__data__"in Tt&&(dt.__data__=Tt.__data__)):et.push(null)}return Y(De)};function j(me){return typeof me=="function"?me:function(){return ee(me,this)}}ae.selectAll=function(me){var De=[],et,dt;me=Q(me);for(var yt=-1,Tt=this.length;++yt<Tt;)for(var tr=this[yt],zt=-1,_r=tr.length;++zt<_r;)(dt=tr[zt])&&(De.push(et=S(me.call(dt,dt.__data__,zt,yt))),et.parentNode=dt);return Y(De)};function Q(me){return typeof me=="function"?me:function(){return q(me,this)}}var re="http://www.w3.org/1999/xhtml",pe={svg:"http://www.w3.org/2000/svg",xhtml:re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d.ns={prefix:pe,qualify:function(me){var De=me.indexOf(":"),et=me;return De>=0&&(et=me.slice(0,De))!=="xmlns"&&(me=me.slice(De+1)),pe.hasOwnProperty(et)?{space:pe[et],local:me}:me}},ae.attr=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node();return me=d.ns.qualify(me),me.local?et.getAttributeNS(me.space,me.local):et.getAttribute(me)}for(De in me)this.each(we(De,me[De]));return this}return this.each(we(me,De))};function we(me,De){me=d.ns.qualify(me);function et(){this.removeAttribute(me)}function dt(){this.removeAttributeNS(me.space,me.local)}function yt(){this.setAttribute(me,De)}function Tt(){this.setAttributeNS(me.space,me.local,De)}function tr(){var _r=De.apply(this,arguments);_r==null?this.removeAttribute(me):this.setAttribute(me,_r)}function zt(){var _r=De.apply(this,arguments);_r==null?this.removeAttributeNS(me.space,me.local):this.setAttributeNS(me.space,me.local,_r)}return De==null?me.local?dt:et:typeof De=="function"?me.local?zt:tr:me.local?Tt:yt}function Se(me){return me.trim().replace(/\s+/g," ")}ae.classed=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node(),dt=(me=Re(me)).length,yt=-1;if(De=et.classList){for(;++yt<dt;)if(!De.contains(me[yt]))return!1}else for(De=et.getAttribute("class");++yt<dt;)if(!Ie(me[yt]).test(De))return!1;return!0}for(De in me)this.each(We(De,me[De]));return this}return this.each(We(me,De))};function Ie(me){return new RegExp("(?:^|\\s+)"+d.requote(me)+"(?:\\s+|$)","g")}function Re(me){return(me+"").trim().split(/^|\s+/)}function We(me,De){me=Re(me).map(at);var et=me.length;function dt(){for(var Tt=-1;++Tt<et;)me[Tt](this,De)}function yt(){for(var Tt=-1,tr=De.apply(this,arguments);++Tt<et;)me[Tt](this,tr)}return typeof De=="function"?yt:dt}function at(me){var De=Ie(me);return function(et,dt){if(yt=et.classList)return dt?yt.add(me):yt.remove(me);var yt=et.getAttribute("class")||"";dt?(De.lastIndex=0,De.test(yt)||et.setAttribute("class",Se(yt+" "+me))):et.setAttribute("class",Se(yt.replace(De," ")))}}ae.style=function(me,De,et){var dt=arguments.length;if(dt<3){if(typeof me!="string"){dt<2&&(De="");for(et in me)this.each(nt(et,me[et],De));return this}if(dt<2){var yt=this.node();return t(yt).getComputedStyle(yt,null).getPropertyValue(me)}et=""}return this.each(nt(me,De,et))};function nt(me,De,et){function dt(){this.style.removeProperty(me)}function yt(){this.style.setProperty(me,De,et)}function Tt(){var tr=De.apply(this,arguments);tr==null?this.style.removeProperty(me):this.style.setProperty(me,tr,et)}return De==null?dt:typeof De=="function"?Tt:yt}ae.property=function(me,De){if(arguments.length<2){if(typeof me=="string")return this.node()[me];for(De in me)this.each(tt(De,me[De]));return this}return this.each(tt(me,De))};function tt(me,De){function et(){delete this[me]}function dt(){this[me]=De}function yt(){var Tt=De.apply(this,arguments);Tt==null?delete this[me]:this[me]=Tt}return De==null?et:typeof De=="function"?yt:dt}ae.text=function(me){return arguments.length?this.each(typeof me=="function"?function(){var De=me.apply(this,arguments);this.textContent=De??""}:me==null?function(){this.textContent=""}:function(){this.textContent=me}):this.node().textContent},ae.html=function(me){return arguments.length?this.each(typeof me=="function"?function(){var De=me.apply(this,arguments);this.innerHTML=De??""}:me==null?function(){this.innerHTML=""}:function(){this.innerHTML=me}):this.node().innerHTML},ae.append=function(me){return me=qe(me),this.select(function(){return this.appendChild(me.apply(this,arguments))})};function qe(me){function De(){var dt=this.ownerDocument,yt=this.namespaceURI;return yt===re&&dt.documentElement.namespaceURI===re?dt.createElement(me):dt.createElementNS(yt,me)}function et(){return this.ownerDocument.createElementNS(me.space,me.local)}return typeof me=="function"?me:(me=d.ns.qualify(me)).local?et:De}ae.insert=function(me,De){return me=qe(me),De=j(De),this.select(function(){return this.insertBefore(me.apply(this,arguments),De.apply(this,arguments)||null)})},ae.remove=function(){return this.each(he)};function he(){var me=this.parentNode;me&&me.removeChild(this)}ae.data=function(me,De){var et=-1,dt=this.length,yt,Tt;if(!arguments.length){for(me=new Array(dt=(yt=this[0]).length);++et<dt;)(Tt=yt[et])&&(me[et]=Tt.__data__);return me}function tr(Xr,xa){var pa,Ja=Xr.length,ti=xa.length,Sa=Math.min(Ja,ti),za=new Array(ti),Xa=new Array(ti),fi=new Array(Ja),ni,La;if(De){var sn=new A,rn=new Array(Ja),dn;for(pa=-1;++pa<Ja;)(ni=Xr[pa])&&(sn.has(dn=De.call(ni,ni.__data__,pa))?fi[pa]=ni:sn.set(dn,ni),rn[pa]=dn);for(pa=-1;++pa<ti;)(ni=sn.get(dn=De.call(xa,La=xa[pa],pa)))?ni!==!0&&(za[pa]=ni,ni.__data__=La):Xa[pa]=ue(La),sn.set(dn,!0);for(pa=-1;++pa<Ja;)pa in rn&&sn.get(rn[pa])!==!0&&(fi[pa]=Xr[pa])}else{for(pa=-1;++pa<Sa;)ni=Xr[pa],La=xa[pa],ni?(ni.__data__=La,za[pa]=ni):Xa[pa]=ue(La);for(;pa<ti;++pa)Xa[pa]=ue(xa[pa]);for(;pa<Ja;++pa)fi[pa]=Xr[pa]}Xa.update=za,Xa.parentNode=za.parentNode=fi.parentNode=Xr.parentNode,zt.push(Xa),_r.push(za),Gr.push(fi)}var zt=rt([]),_r=Y([]),Gr=Y([]);if(typeof me=="function")for(;++et<dt;)tr(yt=this[et],me.call(yt,yt.parentNode.__data__,et));else for(;++et<dt;)tr(yt=this[et],me);return _r.enter=function(){return zt},_r.exit=function(){return Gr},_r};function ue(me){return{__data__:me}}ae.datum=function(me){return arguments.length?this.property("__data__",me):this.property("__data__")},ae.filter=function(me){var De=[],et,dt,yt;typeof me!="function"&&(me=ne(me));for(var Tt=0,tr=this.length;Tt<tr;Tt++){De.push(et=[]),et.parentNode=(dt=this[Tt]).parentNode;for(var zt=0,_r=dt.length;zt<_r;zt++)(yt=dt[zt])&&me.call(yt,yt.__data__,zt,Tt)&&et.push(yt)}return Y(De)};function ne(me){return function(){return se(this,me)}}ae.order=function(){for(var me=-1,De=this.length;++me<De;)for(var et=this[me],dt=et.length-1,yt=et[dt],Tt;--dt>=0;)(Tt=et[dt])&&(yt&&yt!==Tt.nextSibling&&yt.parentNode.insertBefore(Tt,yt),yt=Tt);return this},ae.sort=function(me){me=Ce.apply(this,arguments);for(var De=-1,et=this.length;++De<et;)this[De].sort(me);return this.order()};function Ce(me){return arguments.length||(me=s),function(De,et){return De&&et?me(De.__data__,et.__data__):!De-!et}}ae.each=function(me){return Ye(this,function(De,et,dt){me.call(De,De.__data__,et,dt)})};function Ye(me,De){for(var et=0,dt=me.length;et<dt;et++)for(var yt=me[et],Tt=0,tr=yt.length,zt;Tt<tr;Tt++)(zt=yt[Tt])&&De(zt,Tt,et);return me}ae.call=function(me){var De=S(arguments);return me.apply(De[0]=this,De),this},ae.empty=function(){return!this.node()},ae.node=function(){for(var me=0,De=this.length;me<De;me++)for(var et=this[me],dt=0,yt=et.length;dt<yt;dt++){var Tt=et[dt];if(Tt)return Tt}return null},ae.size=function(){var me=0;return Ye(this,function(){++me}),me};function rt(me){return G(me,Ke),me}var Ke=[];d.selection.enter=rt,d.selection.enter.prototype=Ke,Ke.append=ae.append,Ke.empty=ae.empty,Ke.node=ae.node,Ke.call=ae.call,Ke.size=ae.size,Ke.select=function(me){for(var De=[],et,dt,yt,Tt,tr,zt=-1,_r=this.length;++zt<_r;){yt=(Tt=this[zt]).update,De.push(et=[]),et.parentNode=Tt.parentNode;for(var Gr=-1,Xr=Tt.length;++Gr<Xr;)(tr=Tt[Gr])?(et.push(yt[Gr]=dt=me.call(Tt.parentNode,tr.__data__,Gr,zt)),dt.__data__=tr.__data__):et.push(null)}return Y(De)},Ke.insert=function(me,De){return arguments.length<2&&(De=Mt(this)),ae.insert.call(this,me,De)};function Mt(me){var De,et;return function(dt,yt,Tt){var tr=me[Tt].update,zt=tr.length,_r;for(Tt!=et&&(et=Tt,De=0),yt>=De&&(De=yt+1);!(_r=tr[De])&&++De<zt;);return _r}}d.select=function(me){var De;return typeof me=="string"?(De=[ee(me,E)],De.parentNode=E.documentElement):(De=[me],De.parentNode=e(me)),Y([De])},d.selectAll=function(me){var De;return typeof me=="string"?(De=S(q(me,E)),De.parentNode=E.documentElement):(De=S(me),De.parentNode=null),Y([De])},ae.on=function(me,De,et){var dt=arguments.length;if(dt<3){if(typeof me!="string"){dt<2&&(De=!1);for(et in me)this.each(kt(et,me[et],De));return this}if(dt<2)return(dt=this.node()["__on"+me])&&dt._;et=!1}return this.each(kt(me,De,et))};function kt(me,De,et){var dt="__on"+me,yt=me.indexOf("."),Tt=Gt;yt>0&&(me=me.slice(0,yt));var tr=Nt.get(me);tr&&(me=tr,Tt=Mr);function zt(){var Xr=this[dt];Xr&&(this.removeEventListener(me,Xr,Xr.$),delete this[dt])}function _r(){var Xr=Tt(De,S(arguments));zt.call(this),this.addEventListener(me,this[dt]=Xr,Xr.$=et),Xr._=De}function Gr(){var Xr=new RegExp("^__on([^.]+)"+d.requote(me)+"$"),xa;for(var pa in this)if(xa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(xa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Nt=d.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&Nt.forEach(function(me){"on"+me in E&&Nt.remove(me)});function Gt(me,De){return function(et){var dt=d.event;d.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{d.event=dt}}}function Mr(me,De){var et=Gt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var mr,qr=0;function Er(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=d.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(mr==null&&(mr="onselectstart"in me?!1:O(me.style,"userSelect")),mr){var yt=e(me).style,Tt=yt[mr];yt[mr]="none"}return function(tr){if(dt.on(De,null),mr&&(yt[mr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}d.mouse=function(me){return _t(me,le())};var Ir=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(me,De){De.changedTouches&&(De=De.changedTouches[0]);var et=me.ownerSVGElement||me;if(et.createSVGPoint){var dt=et.createSVGPoint();if(Ir<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=d.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ir=!(Tt.f||Tt.e),et.remove()}}return Ir?(dt.x=De.pageX,dt.y=De.pageY):(dt.x=De.clientX,dt.y=De.clientY),dt=dt.matrixTransform(me.getScreenCTM().inverse()),[dt.x,dt.y]}var tr=me.getBoundingClientRect();return[De.clientX-tr.left-me.clientLeft,De.clientY-tr.top-me.clientTop]}d.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=le().changedTouches),De){for(var dt=0,yt=De.length,Tt;dt<yt;++dt)if((Tt=De[dt]).identifier===et)return _t(me,Tt)}},d.behavior.drag=function(){var me=ce(yt,"drag","dragstart","dragend"),De=null,et=Tt(U,d.mouse,t,"mousemove","mouseup"),dt=Tt(Oe,d.touch,F,"touchmove","touchend");function yt(){this.on("mousedown.drag",et).on("touchstart.drag",dt)}function Tt(tr,zt,_r,Gr,Xr){return function(){var xa=this,pa=d.event.target.correspondingElement||d.event.target,Ja=xa.parentNode,ti=me.of(xa,arguments),Sa=0,za=tr(),Xa=".drag"+(za==null?"":"-"+za),fi,ni=d.select(_r(pa)).on(Gr+Xa,rn).on(Xr+Xa,dn),La=Er(pa),sn=zt(Ja,za);De?(fi=De.apply(xa,arguments),fi=[fi.x-sn[0],fi.y-sn[1]]):fi=[0,0],ti({type:"dragstart"});function rn(){var In=zt(Ja,za),Kn,ro;In&&(Kn=In[0]-sn[0],ro=In[1]-sn[1],Sa|=Kn|ro,sn=In,ti({type:"drag",x:In[0]+fi[0],y:In[1]+fi[1],dx:Kn,dy:ro}))}function dn(){zt(Ja,za)&&(ni.on(Gr+Xa,null).on(Xr+Xa,null),La(Sa),ti({type:"dragend"}))}}}return yt.origin=function(tr){return arguments.length?(De=tr,yt):De},d.rebind(yt,me,"on")};function Oe(){return d.event.changedTouches[0].identifier}d.touches=function(me,De){return arguments.length<2&&(De=le().touches),De?S(De).map(function(et){var dt=_t(me,et);return dt.identifier=et.identifier,dt}):[]};var Je=1e-6,Ae=Je*Je,Le=Math.PI,Ue=2*Le,Ze=Ue-Je,st=Le/2,ut=Le/180,Ut=180/Le;function Ct(me){return me>0?1:me<0?-1:0}function Pt(me,De,et){return(De[0]-me[0])*(et[1]-me[1])-(De[1]-me[1])*(et[0]-me[0])}function jt(me){return me>1?0:me<-1?Le:Math.acos(me)}function fr(me){return me>1?st:me<-1?-st:Math.asin(me)}function ur(me){return((me=Math.exp(me))-1/me)/2}function sr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function Ta(me){return(me=Math.sin(me/2))*me}var Oa=Math.SQRT2,Ia=2,qa=4;d.interpolateZoom=function(me,De){var et=me[0],dt=me[1],yt=me[2],Tt=De[0],tr=De[1],zt=De[2],_r=Tt-et,Gr=tr-dt,Xr=_r*_r+Gr*Gr,xa,pa;if(Xr<Ae)pa=Math.log(zt/yt)/Oa,xa=function(fi){return[et+fi*_r,dt+fi*Gr,yt*Math.exp(Oa*fi*pa)]};else{var Ja=Math.sqrt(Xr),ti=(zt*zt-yt*yt+qa*Xr)/(2*yt*Ia*Ja),Sa=(zt*zt-yt*yt-qa*Xr)/(2*zt*Ia*Ja),za=Math.log(Math.sqrt(ti*ti+1)-ti),Xa=Math.log(Math.sqrt(Sa*Sa+1)-Sa);pa=(Xa-za)/Oa,xa=function(fi){var ni=fi*pa,La=sr(za),sn=yt/(Ia*Ja)*(La*Pr(Oa*ni+za)-ur(za));return[et+sn*_r,dt+sn*Gr,yt*La/sr(Oa*ni+za)]}}return xa.duration=pa*1e3,xa},d.behavior.zoom=function(){var me={x:0,y:0,k:1},De,et,dt,yt=[960,500],Tt=Wa,tr=250,zt=0,_r="mousedown.zoom",Gr="mousemove.zoom",Xr="mouseup.zoom",xa,pa="touchstart.zoom",Ja,ti=ce(ni,"zoomstart","zoom","zoomend"),Sa,za,Xa,fi;hi||(hi="onwheel"in E?(Ca=function(){return-d.event.deltaY*(d.event.deltaMode?120:1)},"wheel"):"onmousewheel"in E?(Ca=function(){return d.event.wheelDelta},"mousewheel"):(Ca=function(){return-d.event.detail},"MozMousePixelScroll"));function ni(mn){mn.on(_r,Wo).on(hi+".zoom",al).on("dblclick.zoom",xl).on(pa,cl)}ni.event=function(mn){mn.each(function(){var po=ti.of(this,arguments),cs=me;hs?d.select(this).transition().each("start.zoom",function(){me=this.__chart__||{x:0,y:0,k:1},ro(po)}).tween("zoom:zoom",function(){var vs=yt[0],Al=yt[1],Hl=et?et[0]:vs/2,Su=et?et[1]:Al/2,Rl=d.interpolateZoom([(Hl-me.x)/me.k,(Su-me.y)/me.k,vs/me.k],[(Hl-cs.x)/cs.k,(Su-cs.y)/cs.k,vs/cs.k]);return function(_c){var it=Rl(_c),Zt=vs/it[2];this.__chart__=me={x:Hl-it[0]*Zt,y:Su-it[1]*Zt,k:Zt},Yo(po)}}).each("interrupt.zoom",function(){oo(po)}).each("end.zoom",function(){oo(po)}):(this.__chart__=me,ro(po),Yo(po),oo(po))})},ni.translate=function(mn){return arguments.length?(me={x:+mn[0],y:+mn[1],k:me.k},Kn(),ni):[me.x,me.y]},ni.scale=function(mn){return arguments.length?(me={x:me.x,y:me.y,k:null},rn(+mn),Kn(),ni):me.k},ni.scaleExtent=function(mn){return arguments.length?(Tt=mn==null?Wa:[+mn[0],+mn[1]],ni):Tt},ni.center=function(mn){return arguments.length?(dt=mn&&[+mn[0],+mn[1]],ni):dt},ni.size=function(mn){return arguments.length?(yt=mn&&[+mn[0],+mn[1]],ni):yt},ni.duration=function(mn){return arguments.length?(tr=+mn,ni):tr},ni.x=function(mn){return arguments.length?(za=mn,Sa=mn.copy(),me={x:0,y:0,k:1},ni):za},ni.y=function(mn){return arguments.length?(fi=mn,Xa=mn.copy(),me={x:0,y:0,k:1},ni):fi};function La(mn){return[(mn[0]-me.x)/me.k,(mn[1]-me.y)/me.k]}function sn(mn){return[mn[0]*me.k+me.x,mn[1]*me.k+me.y]}function rn(mn){me.k=Math.max(Tt[0],Math.min(Tt[1],mn))}function dn(mn,po){po=sn(po),me.x+=mn[0]-po[0],me.y+=mn[1]-po[1]}function In(mn,po,cs,vs){mn.__chart__={x:me.x,y:me.y,k:me.k},rn(Math.pow(2,vs)),dn(et=po,cs),mn=d.select(mn),tr>0&&(mn=mn.transition().duration(tr)),mn.call(ni.event)}function Kn(){za&&za.domain(Sa.range().map(function(mn){return(mn-me.x)/me.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(mn){return(mn-me.y)/me.k}).map(Xa.invert))}function ro(mn){zt++||mn({type:"zoomstart"})}function Yo(mn){Kn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function oo(mn){--zt||(mn({type:"zoomend"}),et=null)}function Wo(){var mn=this,po=ti.of(mn,arguments),cs=0,vs=d.select(t(mn)).on(Gr,Su).on(Xr,Rl),Al=La(d.mouse(mn)),Hl=Er(mn);Nn.call(mn),ro(po);function Su(){cs=1,dn(d.mouse(mn),Al),Yo(po)}function Rl(){vs.on(Gr,null).on(Xr,null),Hl(cs),oo(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),cs={},vs=0,Al,Hl=".zoom-"+d.event.changedTouches[0].identifier,Su="touchmove"+Hl,Rl="touchend"+Hl,_c=[],it=d.select(mn),Zt=Er(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function cr(){var ya=d.touches(mn);return Al=me.k,ya.forEach(function(Ya){Ya.identifier in cs&&(cs[Ya.identifier]=La(Ya))}),ya}function oa(){var ya=d.event.target;d.select(ya).on(Su,wa).on(Rl,va),_c.push(ya);for(var Ya=d.event.changedTouches,bi=0,yi=Ya.length;bi<yi;++bi)cs[Ya[bi].identifier]=null;var si=cr(),gn=Date.now();if(si.length===1){if(gn-Ja<500){var zi=si[0];In(mn,zi,cs[zi.identifier],Math.floor(Math.log(me.k)/Math.LN2)+1),$()}Ja=gn}else if(si.length>1){var zi=si[0],Ei=si[1],Na=zi[0]-Ei[0],ea=zi[1]-Ei[1];vs=Na*Na+ea*ea}}function wa(){var ya=d.touches(mn),Ya,bi,yi,si;Nn.call(mn);for(var gn=0,zi=ya.length;gn<zi;++gn,si=null)if(yi=ya[gn],si=cs[yi.identifier]){if(bi)break;Ya=yi,bi=si}if(si){var Ei=(Ei=yi[0]-Ya[0])*Ei+(Ei=yi[1]-Ya[1])*Ei,Na=vs&&Math.sqrt(Ei/vs);Ya=[(Ya[0]+yi[0])/2,(Ya[1]+yi[1])/2],bi=[(bi[0]+si[0])/2,(bi[1]+si[1])/2],rn(Na*Al)}Ja=null,dn(Ya,bi),Yo(po)}function va(){if(d.event.touches.length){for(var ya=d.event.changedTouches,Ya=0,bi=ya.length;Ya<bi;++Ya)delete cs[ya[Ya].identifier];for(var yi in cs)return void cr()}d.selectAll(_c).on(Hl,null),it.on(_r,Wo).on(pa,cl),Zt(),oo(po)}}function al(){var mn=ti.of(this,arguments);xa?clearTimeout(xa):(Nn.call(this),De=La(et=dt||d.mouse(this)),ro(mn)),xa=setTimeout(function(){xa=null,oo(mn)},50),$(),rn(Math.pow(2,Ca()*.002)*me.k),dn(et,De),Yo(mn)}function xl(){var mn=d.mouse(this),po=Math.log(me.k)/Math.LN2;In(this,mn,La(mn),d.event.shiftKey?Math.ceil(po)-1:Math.floor(po)+1)}return d.rebind(ni,ti,"on")};var Wa=[0,1/0],Ca,hi;d.color=wi;function wi(){}wi.prototype.toString=function(){return this.rgb()+""},d.hsl=Kt;function Kt(me,De,et){return this instanceof Kt?(this.h=+me,this.s=+De,void(this.l=+et)):arguments.length<2?me instanceof Kt?new Kt(me.h,me.s,me.l):Rr(""+me,Ur,Kt):new Kt(me,De,et)}var Dt=Kt.prototype=new wi;Dt.brighter=function(me){return me=Math.pow(.7,arguments.length?me:1),new Kt(this.h,this.s,this.l/me)},Dt.darker=function(me){return me=Math.pow(.7,arguments.length?me:1),new Kt(this.h,this.s,me*this.l)},Dt.rgb=function(){return Yt(this.h,this.s,this.l)};function Yt(me,De,et){var dt,yt;me=isNaN(me)?0:(me%=360)<0?me+360:me,De=isNaN(De)||De<0?0:De>1?1:De,et=et<0?0:et>1?1:et,yt=et<=.5?et*(1+De):et+De-et*De,dt=2*et-yt;function Tt(zt){return zt>360?zt-=360:zt<0&&(zt+=360),zt<60?dt+(yt-dt)*zt/60:zt<180?yt:zt<240?dt+(yt-dt)*(240-zt)/60:dt}function tr(zt){return Math.round(Tt(zt)*255)}return new xt(tr(me+120),tr(me),tr(me-120))}d.hcl=Jt;function Jt(me,De,et){return this instanceof Jt?(this.h=+me,this.c=+De,void(this.l=+et)):arguments.length<2?me instanceof Jt?new Jt(me.h,me.c,me.l):me instanceof ra?Ra(me.l,me.a,me.b):Ra((me=Hr((me=d.rgb(me)).r,me.g,me.b)).l,me.a,me.b):new Jt(me,De,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(me){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?me:1)))},Fr.darker=function(me){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?me:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(me,De,et){return isNaN(me)&&(me=0),isNaN(De)&&(De=0),new ra(et,Math.cos(me*=ut)*De,Math.sin(me)*De)}d.lab=ra;function ra(me,De,et){return this instanceof ra?(this.l=+me,this.a=+De,void(this.b=+et)):arguments.length<2?me instanceof ra?new ra(me.l,me.a,me.b):me instanceof Jt?ta(me.h,me.c,me.l):Hr((me=xt(me)).r,me.g,me.b):new ra(me,De,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(me){return new ra(Math.min(100,this.l+ca*(arguments.length?me:1)),this.a,this.b)},ri.darker=function(me){return new ra(Math.max(0,this.l-ca*(arguments.length?me:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(me,De,et){var dt=(me+16)/116,yt=dt+De/500,Tt=dt-et/200;return yt=an(yt)*Ba,dt=an(dt)*$a,Tt=an(Tt)*Za,new xt(fn(3.2404542*yt-1.5371385*dt-.4985314*Tt),fn(-.969266*yt+1.8760108*dt+.041556*Tt),fn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ra(me,De,et){return me>0?new Jt(Math.atan2(et,De)*Ut,Math.sqrt(De*De+et*et),me):new Jt(NaN,NaN,me)}function an(me){return me>.206893034?me*me*me:(me-4/29)/7.787037}function tn(me){return me>.008856?Math.pow(me,1/3):7.787037*me+4/29}function fn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}d.rgb=xt;function xt(me,De,et){return this instanceof xt?(this.r=~~me,this.g=~~De,void(this.b=~~et)):arguments.length<2?me instanceof xt?new xt(me.r,me.g,me.b):Rr(""+me,xt,Yt):new xt(me,De,et)}function lt(me){return new xt(me>>16,me>>8&255,me&255)}function Br(me){return lt(me)+""}var Cr=xt.prototype=new wi;Cr.brighter=function(me){me=Math.pow(.7,arguments.length?me:1);var De=this.r,et=this.g,dt=this.b,yt=30;return!De&&!et&&!dt?new xt(yt,yt,yt):(De&&De<yt&&(De=yt),et&&et<yt&&(et=yt),dt&&dt<yt&&(dt=yt),new xt(Math.min(255,De/me),Math.min(255,et/me),Math.min(255,dt/me)))},Cr.darker=function(me){return me=Math.pow(.7,arguments.length?me:1),new xt(me*this.r,me*this.g,me*this.b)},Cr.hsl=function(){return Ur(this.r,this.g,this.b)},Cr.toString=function(){return"#"+xr(this.r)+xr(this.g)+xr(this.b)};function xr(me){return me<16?"0"+Math.max(0,me).toString(16):Math.min(255,me).toString(16)}function Rr(me,De,et){var dt=0,yt=0,Tt=0,tr,zt,_r;if(tr=/([a-z]+)\((.*)\)/.exec(me=me.toLowerCase()),tr)switch(zt=tr[2].split(","),tr[1]){case"hsl":return et(parseFloat(zt[0]),parseFloat(zt[1])/100,parseFloat(zt[2])/100);case"rgb":return De(Xt(zt[0]),Xt(zt[1]),Xt(zt[2]))}return(_r=vr.get(me))?De(_r.r,_r.g,_r.b):(me!=null&&me.charAt(0)==="#"&&!isNaN(_r=parseInt(me.slice(1),16))&&(me.length===4?(dt=(_r&3840)>>4,dt=dt>>4|dt,yt=_r&240,yt=yt>>4|yt,Tt=_r&15,Tt=Tt<<4|Tt):me.length===7&&(dt=(_r&16711680)>>16,yt=(_r&65280)>>8,Tt=_r&255)),De(dt,yt,Tt))}function Ur(me,De,et){var dt=Math.min(me/=255,De/=255,et/=255),yt=Math.max(me,De,et),Tt=yt-dt,tr,zt,_r=(yt+dt)/2;return Tt?(zt=_r<.5?Tt/(yt+dt):Tt/(2-yt-dt),me==yt?tr=(De-et)/Tt+(De<et?6:0):De==yt?tr=(et-me)/Tt+2:tr=(me-De)/Tt+4,tr*=60):(tr=NaN,zt=_r>0&&_r<1?0:tr),new Kt(tr,zt,_r)}function Hr(me,De,et){me=gt(me),De=gt(De),et=gt(et);var dt=tn((.4124564*me+.3575761*De+.1804375*et)/Ba),yt=tn((.2126729*me+.7151522*De+.072175*et)/$a),Tt=tn((.0193339*me+.119192*De+.9503041*et)/Za);return ra(116*yt-16,500*(dt-yt),200*(yt-Tt))}function gt(me){return(me/=255)<=.04045?me/12.92:Math.pow((me+.055)/1.055,2.4)}function Xt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var vr=d.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});vr.forEach(function(me,De){vr.set(me,lt(De))});function Or(me){return typeof me=="function"?me:function(){return me}}d.functor=Or,d.xhr=ba(F);function ba(me){return function(De,et,dt){return arguments.length===2&&typeof et=="function"&&(dt=et,et=null),Pa(De,et,me,dt)}}function Pa(me,De,et,dt){var yt={},Tt=d.dispatch("beforesend","progress","load","error"),tr={},zt=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in zt)&&/^(http(s)?:)?\/\//.test(me)&&(zt=new XDomainRequest),"onload"in zt?zt.onload=zt.onerror=Gr:zt.onreadystatechange=function(){zt.readyState>3&&Gr()};function Gr(){var Xr=zt.status,xa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{xa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,xa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var xa=d.event;d.event=Xr;try{Tt.progress.call(yt,zt)}finally{d.event=xa}},yt.header=function(Xr,xa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(xa==null?delete tr[Xr]:tr[Xr]=xa+"",yt)},yt.mimeType=function(Xr){return arguments.length?(De=Xr==null?null:Xr+"",yt):De},yt.responseType=function(Xr){return arguments.length?(_r=Xr,yt):_r},yt.response=function(Xr){return et=Xr,yt},["get","post"].forEach(function(Xr){yt[Xr]=function(){return yt.send.apply(yt,[Xr].concat(S(arguments)))}}),yt.send=function(Xr,xa,pa){if(arguments.length===2&&typeof xa=="function"&&(pa=xa,xa=null),zt.open(Xr,me,!0),De!=null&&!("accept"in tr)&&(tr.accept=De+",*/*"),zt.setRequestHeader)for(var Ja in tr)zt.setRequestHeader(Ja,tr[Ja]);return De!=null&&zt.overrideMimeType&&zt.overrideMimeType(De),_r!=null&&(zt.responseType=_r),pa!=null&&yt.on("error",pa).on("load",function(ti){pa(null,ti)}),Tt.beforesend.call(yt,zt),zt.send(xa??null),yt},yt.abort=function(){return zt.abort(),yt},d.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ma(dt))}function ma(me){return me.length===1?function(De,et){me(De==null?et:null)}:me}function la(me){var De=me.responseType;return De&&De!=="text"?me.response:me.responseText}d.dsv=function(me,De){var et=new RegExp('["'+me+`
]`),dt=me.charCodeAt(0);function yt(Gr,Xr,xa){arguments.length<3&&(xa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),xa);return pa.row=function(Ja){return arguments.length?pa.response((Xr=Ja)==null?Tt:tr(Ja)):Xr},pa}function Tt(Gr){return yt.parse(Gr.responseText)}function tr(Gr){return function(Xr){return yt.parse(Xr.responseText,Gr)}}yt.parse=function(Gr,Xr){var xa;return yt.parseRows(Gr,function(pa,Ja){if(xa)return xa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi<Xa;++fi)za[pa[fi]]=Sa[fi];return za};xa=Xr?function(Sa,za){return Xr(ti(Sa),za)}:ti})},yt.parseRows=function(Gr,Xr){var xa={},pa={},Ja=[],ti=Gr.length,Sa=0,za=0,Xa,fi;function ni(){if(Sa>=ti)return pa;if(fi)return fi=!1,xa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var rn=sn;rn++<ti;)if(Gr.charCodeAt(rn)===34){if(Gr.charCodeAt(rn+1)!==34)break;++rn}Sa=rn+2;var dn=Gr.charCodeAt(rn+1);return dn===13?(fi=!0,Gr.charCodeAt(rn+2)===10&&++Sa):dn===10&&(fi=!0),Gr.slice(sn+1,rn).replace(/""/g,'"')}for(;Sa<ti;){var dn=Gr.charCodeAt(Sa++),In=1;if(dn===10)fi=!0;else if(dn===13)fi=!0,Gr.charCodeAt(Sa)===10&&(++Sa,++In);else if(dn!==dt)continue;return Gr.slice(sn,Sa-In)}return Gr.slice(sn)}for(;(Xa=ni())!==pa;){for(var La=[];Xa!==xa&&Xa!==pa;)La.push(Xa),Xa=ni();Xr&&(La=Xr(La,za++))==null||Ja.push(La)}return Ja},yt.format=function(Gr){if(Array.isArray(Gr[0]))return yt.formatRows(Gr);var Xr=new z,xa=[];return Gr.forEach(function(pa){for(var Ja in pa)Xr.has(Ja)||xa.push(Xr.add(Ja))}),[xa.map(_r).join(me)].concat(Gr.map(function(pa){return xa.map(function(Ja){return _r(pa[Ja])}).join(me)})).join(`
`)},yt.formatRows=function(Gr){return Gr.map(zt).join(`
`)};function zt(Gr){return Gr.map(_r).join(me)}function _r(Gr){return et.test(Gr)?'"'+Gr.replace(/\"/g,'""')+'"':Gr}return yt},d.csv=d.dsv(",","text/csv"),d.tsv=d.dsv(" ","text/tab-separated-values");var _a,Ai,ki,Ki,yn=this[O(this,"requestAnimationFrame")]||function(me){setTimeout(me,17)};d.timer=function(){Ln.apply(this,arguments)};function Ln(me,De,et){var dt=arguments.length;dt<2&&(De=0),dt<3&&(et=Date.now());var yt=et+De,Tt={c:me,t:yt,n:null};return Ai?Ai.n=Tt:_a=Tt,Ai=Tt,ki||(Ki=clearTimeout(Ki),ki=1,yn(kn)),Tt}function kn(){var me=Bn(),De=ao()-me;De>24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(kn,De)),ki=0):(ki=1,yn(kn))}d.timer.flush=function(){Bn(),ao()};function Bn(){for(var me=Date.now(),De=_a;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=_a,et=1/0;De;)De.c?(De.t<et&&(et=De.t),De=(me=De).n):De=me?me.n=De.n:_a=De.n;return Ai=me,et}d.round=function(me,De){return De?Math.round(me*(De=Math.pow(10,De)))/De:Math.round(me)},d.geom={};function xo(me){return me[0]}function Co(me){return me[1]}d.geom.hull=function(me){var De=xo,et=Co;if(arguments.length)return dt(me);function dt(yt){if(yt.length<3)return[];var Tt=Or(De),tr=Or(et),zt,_r=yt.length,Gr=[],Xr=[];for(zt=0;zt<_r;zt++)Gr.push([+Tt.call(this,yt[zt],zt),+tr.call(this,yt[zt],zt),zt]);for(Gr.sort(Mn),zt=0;zt<_r;zt++)Xr.push([Gr[zt][0],-Gr[zt][1]]);var xa=Fs(Gr),pa=Fs(Xr),Ja=pa[0]===xa[0],ti=pa[pa.length-1]===xa[xa.length-1],Sa=[];for(zt=xa.length-1;zt>=0;--zt)Sa.push(yt[Gr[xa[zt]][2]]);for(zt=+Ja;zt<pa.length-ti;++zt)Sa.push(yt[Gr[pa[zt]][2]]);return Sa}return dt.x=function(yt){return arguments.length?(De=yt,dt):De},dt.y=function(yt){return arguments.length?(et=yt,dt):et},dt};function Fs(me){for(var De=me.length,et=[0,1],dt=2,yt=2;yt<De;yt++){for(;dt>1&&Pt(me[et[dt-2]],me[et[dt-1]],me[yt])<=0;)--dt;et[dt++]=yt}return et.slice(0,dt)}function Mn(me,De){return me[0]-De[0]||me[1]-De[1]}d.geom.polygon=function(me){return G(me,Ao),me};var Ao=d.geom.polygon.prototype=[];Ao.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++me<De;)et=dt,dt=this[me],yt+=et[1]*dt[0]-et[0]*dt[1];return yt*.5},Ao.centroid=function(me){var De=-1,et=this.length,dt=0,yt=0,Tt,tr=this[et-1],zt;for(arguments.length||(me=-1/(6*this.area()));++De<et;)Tt=tr,tr=this[De],zt=Tt[0]*tr[1]-tr[0]*Tt[1],dt+=(Tt[0]+tr[0])*zt,yt+=(Tt[1]+tr[1])*zt;return[dt*me,yt*me]},Ao.clip=function(me){for(var De,et=is(me),dt=-1,yt=this.length-is(this),Tt,tr,zt=this[yt-1],_r,Gr,Xr;++dt<yt;){for(De=me.slice(),me.length=0,_r=this[dt],Gr=De[(tr=De.length-et)-1],Tt=-1;++Tt<tr;)Xr=De[Tt],On(Xr,zt,_r)?(On(Gr,zt,_r)||me.push(ts(Gr,Xr,zt,_r)),me.push(Xr)):On(Gr,zt,_r)&&me.push(ts(Gr,Xr,zt,_r)),Gr=Xr;et&&me.push(me[0]),zt=_r}return me};function On(me,De,et){return(et[0]-De[0])*(me[1]-De[1])<(et[1]-De[1])*(me[0]-De[0])}function ts(me,De,et,dt){var yt=me[0],Tt=et[0],tr=De[0]-yt,zt=dt[0]-Tt,_r=me[1],Gr=et[1],Xr=De[1]-_r,xa=dt[1]-Gr,pa=(zt*(_r-Gr)-xa*(yt-Tt))/(xa*tr-zt*Xr);return[yt+pa*tr,_r+pa*Xr]}function is(me){var De=me[0],et=me[me.length-1];return!(De[0]-et[0]||De[1]-et[1])}var _s,Oo,io,Gn=[],eo,ns,gs=[];function Ls(){Ss(this),this.edge=this.site=this.circle=null}function Xo(me){var De=Gn.pop()||new Ls;return De.site=me,De}function Gi(me){Lo(me),io.remove(me),Gn.push(me),Ss(me)}function Pn(me){var De=me.circle,et=De.x,dt=De.cy,yt={x:et,y:dt},Tt=me.P,tr=me.N,zt=[me];Gi(me);for(var _r=Tt;_r.circle&&l(et-_r.circle.x)<Je&&l(dt-_r.circle.cy)<Je;)Tt=_r.P,zt.unshift(_r),Gi(_r),_r=Tt;zt.unshift(_r),Lo(_r);for(var Gr=tr;Gr.circle&&l(et-Gr.circle.x)<Je&&l(dt-Gr.circle.cy)<Je;)tr=Gr.N,zt.push(Gr),Gi(Gr),Gr=tr;zt.push(Gr),Lo(Gr);var Xr=zt.length,xa;for(xa=1;xa<Xr;++xa)Gr=zt[xa],_r=zt[xa-1],As(Gr.edge,_r.site,Gr.site,yt);_r=zt[0],Gr=zt[Xr-1],Gr.edge=Gs(_r.site,Gr.site,null,yt),_n(_r),_n(Gr)}function js(me){for(var De=me.x,et=me.y,dt,yt,Tt,tr,zt=io._;zt;)if(Tt=xs(zt,et)-De,Tt>Je)zt=zt.L;else if(tr=De-Hn(zt,et),tr>Je){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Je?(dt=zt.P,yt=zt):tr>-Je?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Xo(me);if(io.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Lo(dt),yt=Xo(dt.site),io.insert(_r,yt),_r.edge=yt.edge=Gs(dt.site,_r.site),_n(dt),_n(yt);return}if(!yt){_r.edge=Gs(dt.site,_r.site);return}Lo(dt),Lo(yt);var Gr=dt.site,Xr=Gr.x,xa=Gr.y,pa=me.x-Xr,Ja=me.y-xa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-xa,Xa=2*(pa*za-Ja*Sa),fi=pa*pa+Ja*Ja,ni=Sa*Sa+za*za,La={x:(za*fi-Ja*ni)/Xa+Xr,y:(pa*ni-Sa*fi)/Xa+xa};As(yt.edge,Gr,ti,La),_r.edge=Gs(Gr,me,null,La),yt.edge=Gs(me,ti,null,La),_n(dt),_n(yt)}}function xs(me,De){var et=me.site,dt=et.x,yt=et.y,Tt=yt-De;if(!Tt)return dt;var tr=me.P;if(!tr)return-1/0;et=tr.site;var zt=et.x,_r=et.y,Gr=_r-De;if(!Gr)return zt;var Xr=zt-dt,xa=1/Tt-1/Gr,pa=Xr/Gr;return xa?(-pa+Math.sqrt(pa*pa-2*xa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/xa+dt:(dt+zt)/2}function Hn(me,De){var et=me.N;if(et)return xs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Os(me){this.site=me,this.edges=[]}Os.prototype.prepare=function(){for(var me=this.edges,De=me.length,et;De--;)et=me[De].edge,(!et.b||!et.a)&&me.splice(De,1);return me.sort(Xs),me.length};function ds(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=Oo,Xr=Gr.length,xa,pa,Ja,ti,Sa,za;Xr--;)if(xa=Gr[Xr],!(!xa||!xa.prepare()))for(Ja=xa.edges,ti=Ja.length,pa=0;pa<ti;)za=Ja[pa].end(),zt=za.x,_r=za.y,Sa=Ja[++pa%ti].start(),Tt=Sa.x,tr=Sa.y,(l(zt-Tt)>Je||l(_r-tr)>Je)&&(Ja.splice(pa,0,new qs(vl(xa.site,za,l(zt-De)<Je&&yt-_r>Je?{x:De,y:l(Tt-De)<Je?tr:yt}:l(_r-yt)<Je&&et-zt>Je?{x:l(tr-yt)<Je?Tt:et,y:yt}:l(zt-et)<Je&&_r-dt>Je?{x:et,y:l(Tt-et)<Je?tr:dt}:l(_r-dt)<Je&&zt-De>Je?{x:l(tr-dt)<Je?Tt:De,y:dt}:null),xa.site,null)),++ti)}function Xs(me,De){return De.angle-me.angle}function il(){Ss(this),this.x=this.y=this.arc=this.site=this.cy=null}function _n(me){var De=me.P,et=me.N;if(!(!De||!et)){var dt=De.site,yt=me.site,Tt=et.site;if(dt!==Tt){var tr=yt.x,zt=yt.y,_r=dt.x-tr,Gr=dt.y-zt,Xr=Tt.x-tr,za=Tt.y-zt,xa=2*(_r*za-Gr*Xr);if(!(xa>=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/xa,Sa=(_r*Ja-Xr*pa)/xa,za=Sa+zt,Xa=gs.pop()||new il;Xa.arc=me,Xa.site=yt,Xa.x=ti+tr,Xa.y=za+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=za,me.circle=Xa;for(var fi=null,ni=ns._;ni;)if(Xa.y<ni.y||Xa.y===ni.y&&Xa.x<=ni.x)if(ni.L)ni=ni.L;else{fi=ni.P;break}else if(ni.R)ni=ni.R;else{fi=ni;break}ns.insert(fi,Xa),fi||(eo=Xa)}}}}function Lo(me){var De=me.circle;De&&(De.P||(eo=De.N),ns.remove(De),gs.push(De),Ss(De),me.circle=null)}function bo(me,De,et,dt){return function(yt){var Tt=yt.a,tr=yt.b,zt=Tt.x,_r=Tt.y,Gr=tr.x,Xr=tr.y,xa=0,pa=1,Ja=Gr-zt,ti=Xr-_r,Sa;if(Sa=me-zt,!(!Ja&&Sa>0)){if(Sa/=Ja,Ja<0){if(Sa<xa)return;Sa<pa&&(pa=Sa)}else if(Ja>0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}else if(Ja>0){if(Sa<xa)return;Sa<pa&&(pa=Sa)}if(Sa=De-_r,!(!ti&&Sa>0)){if(Sa/=ti,ti<0){if(Sa<xa)return;Sa<pa&&(pa=Sa)}else if(ti>0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}else if(ti>0){if(Sa<xa)return;Sa<pa&&(pa=Sa)}return xa>0&&(yt.a={x:zt+xa*Ja,y:_r+xa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Rs(me){for(var De=_s,et=bo(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!pu(yt,me)||!et(yt)||l(yt.a.x-yt.b.x)<Je&&l(yt.a.y-yt.b.y)<Je)&&(yt.a=yt.b=null,De.splice(dt,1))}function pu(me,De){var et=me.b;if(et)return!0;var dt=me.a,yt=De[0][0],Tt=De[1][0],tr=De[0][1],zt=De[1][1],_r=me.l,Gr=me.r,Xr=_r.x,xa=_r.y,pa=Gr.x,Ja=Gr.y,ti=(Xr+pa)/2,Sa=(xa+Ja)/2,za,Xa;if(Ja===xa){if(ti<yt||ti>=Tt)return;if(Xr>pa){if(!dt)dt={x:ti,y:tr};else if(dt.y>=zt)return;et={x:ti,y:zt}}else{if(!dt)dt={x:ti,y:zt};else if(dt.y<tr)return;et={x:ti,y:tr}}}else if(za=(Xr-pa)/(Ja-xa),Xa=Sa-za*ti,za<-1||za>1)if(Xr>pa){if(!dt)dt={x:(tr-Xa)/za,y:tr};else if(dt.y>=zt)return;et={x:(zt-Xa)/za,y:zt}}else{if(!dt)dt={x:(zt-Xa)/za,y:zt};else if(dt.y<tr)return;et={x:(tr-Xa)/za,y:tr}}else if(xa<Ja){if(!dt)dt={x:yt,y:za*yt+Xa};else if(dt.x>=Tt)return;et={x:Tt,y:za*Tt+Xa}}else{if(!dt)dt={x:Tt,y:za*Tt+Xa};else if(dt.x<yt)return;et={x:yt,y:za*yt+Xa}}return me.a=dt,me.b=et,!0}function uo(me,De){this.l=me,this.r=De,this.a=this.b=null}function Gs(me,De,et,dt){var yt=new uo(me,De);return _s.push(yt),et&&As(yt,me,De,et),dt&&As(yt,De,me,dt),Oo[me.i].edges.push(new qs(yt,me,De)),Oo[De.i].edges.push(new qs(yt,De,me)),yt}function vl(me,De,et){var dt=new uo(me,null);return dt.a=De,dt.b=et,_s.push(dt),dt}function As(me,De,et,dt){!me.a&&!me.b?(me.a=dt,me.l=De,me.r=et):me.l===et?me.b=dt:me.a=dt}function qs(me,De,et){var dt=me.a,yt=me.b;this.edge=me,this.site=De,this.angle=et?Math.atan2(et.y-De.y,et.x-De.x):me.l===De?Math.atan2(yt.x-dt.x,dt.y-yt.y):Math.atan2(dt.x-yt.x,yt.y-dt.y)}qs.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function us(){this._=null}function Ss(me){me.U=me.C=me.L=me.R=me.P=me.N=null}us.prototype={insert:function(me,De){var et,dt,yt;if(me){if(De.P=me,De.N=me.N,me.N&&(me.N.P=De),me.N=De,me.R){for(me=me.R;me.L;)me=me.L;me.L=De}else me.R=De;et=me}else this._?(me=Tc(this._),De.P=null,De.N=me,me.P=me.L=De,et=me):(De.P=De.N=null,this._=De,et=null);for(De.L=De.R=null,De.U=et,De.C=!0,me=De;et&&et.C;)dt=et.U,et===dt.L?(yt=dt.R,yt&&yt.C?(et.C=yt.C=!1,dt.C=!0,me=dt):(me===et.R&&(Nl(this,et),me=et,et=me.U),et.C=!1,dt.C=!0,su(this,dt))):(yt=dt.L,yt&&yt.C?(et.C=yt.C=!1,dt.C=!0,me=dt):(me===et.L&&(su(this,et),me=et,et=me.U),et.C=!1,dt.C=!0,Nl(this,dt))),et=me.U;this._.C=!1},remove:function(me){me.N&&(me.N.P=me.P),me.P&&(me.P.N=me.N),me.N=me.P=null;var De=me.U,et,dt=me.L,yt=me.R,Tt,tr;if(dt?yt?Tt=Tc(yt):Tt=dt:Tt=yt,De?De.L===me?De.L=Tt:De.R=Tt:this._=Tt,dt&&yt?(tr=Tt.C,Tt.C=me.C,Tt.L=dt,dt.U=Tt,Tt!==yt?(De=Tt.U,Tt.U=me.U,me=Tt.R,De.L=me,Tt.R=yt,yt.U=Tt):(Tt.U=De,De=Tt,me=Tt.R)):(tr=me.C,me=Tt),me&&(me.U=De),!tr){if(me&&me.C){me.C=!1;return}do{if(me===this._)break;if(me===De.L){if(et=De.R,et.C&&(et.C=!1,De.C=!0,Nl(this,De),et=De.R),et.L&&et.L.C||et.R&&et.R.C){(!et.R||!et.R.C)&&(et.L.C=!1,et.C=!0,su(this,et),et=De.R),et.C=De.C,De.C=et.R.C=!1,Nl(this,De),me=this._;break}}else if(et=De.L,et.C&&(et.C=!1,De.C=!0,su(this,De),et=De.L),et.L&&et.L.C||et.R&&et.R.C){(!et.L||!et.L.C)&&(et.R.C=!1,et.C=!0,Nl(this,et),et=De.L),et.C=De.C,De.C=et.L.C=!1,su(this,De),me=this._;break}et.C=!0,me=De,De=De.U}while(!me.C);me&&(me.C=!1)}}};function Nl(me,De){var et=De,dt=De.R,yt=et.U;yt?yt.L===et?yt.L=dt:yt.R=dt:me._=dt,dt.U=yt,et.U=dt,et.R=dt.L,et.R&&(et.R.U=et),dt.L=et}function su(me,De){var et=De,dt=De.L,yt=et.U;yt?yt.L===et?yt.L=dt:yt.R=dt:me._=dt,dt.U=yt,et.U=dt,et.L=dt.R,et.L&&(et.L.U=et),dt.R=et}function Tc(me){for(;me.L;)me=me.L;return me}function du(me,De){var et=me.sort(Sf).pop(),dt,yt,Tt;for(_s=[],Oo=new Array(me.length),io=new us,ns=new us;;)if(Tt=eo,et&&(!Tt||et.y<Tt.y||et.y===Tt.y&&et.x<Tt.x))(et.x!==dt||et.y!==yt)&&(Oo[et.i]=new Os(et),js(et),dt=et.x,yt=et.y),et=me.pop();else if(Tt)Pn(Tt.arc);else break;De&&(Rs(De),ds(De));var tr={cells:Oo,edges:_s};return io=ns=_s=Oo=null,tr}function Sf(me,De){return De.y-me.y||De.x-me.x}d.geom.voronoi=function(me){var De=xo,et=Co,dt=De,yt=et,Tt=Uc;if(me)return tr(me);function tr(_r){var Gr=new Array(_r.length),Xr=Tt[0][0],xa=Tt[0][1],pa=Tt[1][0],Ja=Tt[1][1];return du(zt(_r),Tt).cells.forEach(function(ti,Sa){var za=ti.edges,Xa=ti.site,fi=Gr[Sa]=za.length?za.map(function(ni){var La=ni.start();return[La.x,La.y]}):Xa.x>=Xr&&Xa.x<=pa&&Xa.y>=xa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,xa],[Xr,xa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Je)*Je,y:Math.round(yt(Gr,Xr)/Je)*Je,i:Xr}})}return tr.links=function(_r){return du(zt(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},tr.triangles=function(_r){var Gr=[];return du(zt(_r)).cells.forEach(function(Xr,xa){for(var pa=Xr.site,Ja=Xr.edges.sort(Xs),ti=-1,Sa=Ja.length,za,Xa,fi=Ja[Sa-1].edge,ni=fi.l===pa?fi.r:fi.l;++ti<Sa;)za=fi,Xa=ni,fi=Ja[ti].edge,ni=fi.l===pa?fi.r:fi.l,xa<Xa.i&&xa<ni.i&&Bs(pa,Xa,ni)<0&&Gr.push([_r[xa],_r[Xa.i],_r[ni.i]])}),Gr},tr.x=function(_r){return arguments.length?(dt=Or(De=_r),tr):De},tr.y=function(_r){return arguments.length?(yt=Or(et=_r),tr):et},tr.clipExtent=function(_r){return arguments.length?(Tt=_r??Uc,tr):Tt===Uc?null:Tt},tr.size=function(_r){return arguments.length?tr.clipExtent(_r&&[[0,0],_r]):Tt===Uc?null:Tt&&Tt[1]},tr};var Uc=[[-1e6,-1e6],[1e6,1e6]];function Bs(me,De,et){return(me.x-et.x)*(De.y-me.y)-(me.x-De.x)*(et.y-me.y)}d.geom.delaunay=function(me){return d.geom.voronoi().triangles(me)},d.geom.quadtree=function(me,De,et,dt,yt){var Tt=xo,tr=Co,zt;if(zt=arguments.length)return Tt=dc,tr=Hc,zt===3&&(yt=et,dt=De,et=De=0),_r(me);function _r(Gr){var Xr,xa=Or(Tt),pa=Or(tr),Ja,ti,Sa,za,Xa,fi,ni,La;if(De!=null)Xa=De,fi=et,ni=dt,La=yt;else if(ni=La=-(Xa=fi=1/0),Ja=[],ti=[],za=Gr.length,zt)for(Sa=0;Sa<za;++Sa)Xr=Gr[Sa],Xr.x<Xa&&(Xa=Xr.x),Xr.y<fi&&(fi=Xr.y),Xr.x>ni&&(ni=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Sa<za;++Sa){var sn=+xa(Xr=Gr[Sa],Sa),rn=+pa(Xr,Sa);sn<Xa&&(Xa=sn),rn<fi&&(fi=rn),sn>ni&&(ni=sn),rn>La&&(La=rn),Ja.push(sn),ti.push(rn)}var dn=ni-Xa,In=La-fi;dn>In?La=fi+dn:ni=Xa+In;function Kn(oo,Wo,cl,al,xl,mn,po,cs){if(!(isNaN(cl)||isNaN(al)))if(oo.leaf){var vs=oo.x,Al=oo.y;if(vs!=null)if(l(vs-cl)+l(Al-al)<.01)ro(oo,Wo,cl,al,xl,mn,po,cs);else{var Hl=oo.point;oo.x=oo.y=oo.point=null,ro(oo,Hl,vs,Al,xl,mn,po,cs),ro(oo,Wo,cl,al,xl,mn,po,cs)}else oo.x=cl,oo.y=al,oo.point=Wo}else ro(oo,Wo,cl,al,xl,mn,po,cs)}function ro(oo,Wo,cl,al,xl,mn,po,cs){var vs=(xl+po)*.5,Al=(mn+cs)*.5,Hl=cl>=vs,Su=al>=Al,Rl=Su<<1|Hl;oo.leaf=!1,oo=oo.nodes[Rl]||(oo.nodes[Rl]=lu()),Hl?xl=vs:po=vs,Su?mn=Al:cs=Al,Kn(oo,Wo,cl,al,xl,mn,po,cs)}var Yo=lu();if(Yo.add=function(oo){Kn(Yo,oo,+xa(oo,++Sa),+pa(oo,Sa),Xa,fi,ni,La)},Yo.visit=function(oo){Pl(oo,Yo,Xa,fi,ni,La)},Yo.find=function(oo){return ic(Yo,oo[0],oo[1],Xa,fi,ni,La)},Sa=-1,De==null){for(;++Sa<za;)Kn(Yo,Gr[Sa],Ja[Sa],ti[Sa],Xa,fi,ni,La);--Sa}else Gr.forEach(Yo.add);return Ja=ti=Gr=Xr=null,Yo}return _r.x=function(Gr){return arguments.length?(Tt=Gr,_r):Tt},_r.y=function(Gr){return arguments.length?(tr=Gr,_r):tr},_r.extent=function(Gr){return arguments.length?(Gr==null?De=et=dt=yt=null:(De=+Gr[0][0],et=+Gr[0][1],dt=+Gr[1][0],yt=+Gr[1][1]),_r):De==null?null:[[De,et],[dt,yt]]},_r.size=function(Gr){return arguments.length?(Gr==null?De=et=dt=yt=null:(De=et=0,dt=+Gr[0],yt=+Gr[1]),_r):De==null?null:[dt-De,yt-et]},_r};function dc(me){return me.x}function Hc(me){return me.y}function lu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Pl(me,De,et,dt,yt,Tt){if(!me(De,et,dt,yt,Tt)){var tr=(et+yt)*.5,zt=(dt+Tt)*.5,_r=De.nodes;_r[0]&&Pl(me,_r[0],et,dt,tr,zt),_r[1]&&Pl(me,_r[1],tr,dt,yt,zt),_r[2]&&Pl(me,_r[2],et,zt,tr,Tt),_r[3]&&Pl(me,_r[3],tr,zt,yt,Tt)}}function ic(me,De,et,dt,yt,Tt,tr){var zt=1/0,_r;return function Gr(Xr,xa,pa,Ja,ti){if(!(xa>Tt||pa>tr||Ja<dt||ti<yt)){if(Sa=Xr.point){var Sa,za=De-Xr.x,Xa=et-Xr.y,fi=za*za+Xa*Xa;if(fi<zt){var ni=Math.sqrt(zt=fi);dt=De-ni,yt=et-ni,Tt=De+ni,tr=et+ni,_r=Sa}}for(var La=Xr.nodes,sn=(xa+Ja)*.5,rn=(pa+ti)*.5,dn=De>=sn,In=et>=rn,Kn=In<<1|dn,ro=Kn+4;Kn<ro;++Kn)if(Xr=La[Kn&3])switch(Kn&3){case 0:Gr(Xr,xa,pa,sn,rn);break;case 1:Gr(Xr,sn,pa,Ja,rn);break;case 2:Gr(Xr,xa,rn,sn,ti);break;case 3:Gr(Xr,sn,rn,Ja,ti);break}}}(me,dt,yt,Tt,tr),_r}d.interpolateRgb=Ou;function Ou(me,De){me=d.rgb(me),De=d.rgb(De);var et=me.r,dt=me.g,yt=me.b,Tt=De.r-et,tr=De.g-dt,zt=De.b-yt;return function(_r){return"#"+xr(Math.round(et+Tt*_r))+xr(Math.round(dt+tr*_r))+xr(Math.round(yt+zt*_r))}}d.interpolateObject=nl;function nl(me,De){var et={},dt={},yt;for(yt in me)yt in De?et[yt]=Ul(me[yt],De[yt]):dt[yt]=me[yt];for(yt in De)yt in me||(dt[yt]=De[yt]);return function(Tt){for(yt in et)dt[yt]=et[yt](Tt);return dt}}d.interpolateNumber=ml;function ml(me,De){return me=+me,De=+De,function(et){return me*(1-et)+De*et}}d.interpolateString=bs;function bs(me,De){var et=Zs.lastIndex=nc.lastIndex=0,dt,yt,Tt,tr=-1,zt=[],_r=[];for(me=me+"",De=De+"";(dt=Zs.exec(me))&&(yt=nc.exec(De));)(Tt=yt.index)>et&&(Tt=De.slice(et,Tt),zt[tr]?zt[tr]+=Tt:zt[++tr]=Tt),(dt=dt[0])===(yt=yt[0])?zt[tr]?zt[tr]+=yt:zt[++tr]=yt:(zt[++tr]=null,_r.push({i:tr,x:ml(dt,yt)})),et=nc.lastIndex;return et<De.length&&(Tt=De.slice(et),zt[tr]?zt[tr]+=Tt:zt[++tr]=Tt),zt.length<2?_r[0]?(De=_r[0].x,function(Gr){return De(Gr)+""}):function(){return De}:(De=_r.length,function(Gr){for(var Xr=0,xa;Xr<De;++Xr)zt[(xa=_r[Xr]).i]=xa.x(Gr);return zt.join("")})}var Zs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(Zs.source,"g");d.interpolate=Ul;function Ul(me,De){for(var et=d.interpolators.length,dt;--et>=0&&!(dt=d.interpolators[et](me,De)););return dt}d.interpolators=[function(me,De){var et=typeof De;return(et==="string"?vr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:bs:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:ml)(me,De)}],d.interpolateArray=qu;function qu(me,De){var et=[],dt=[],yt=me.length,Tt=De.length,tr=Math.min(me.length,De.length),zt;for(zt=0;zt<tr;++zt)et.push(Ul(me[zt],De[zt]));for(;zt<yt;++zt)dt[zt]=me[zt];for(;zt<Tt;++zt)dt[zt]=De[zt];return function(_r){for(zt=0;zt<tr;++zt)dt[zt]=et[zt](_r);return dt}}var fl=function(){return F},xh=d.map({linear:fl,poly:Mf,quad:function(){return Wc},cubic:function(){return Vu},sin:function(){return Ac},exp:function(){return nf},circle:function(){return $l},elastic:Jf,back:Of,bounce:function(){return of}}),ss=d.map({in:F,out:ks,"in-out":to,"out-in":function(me){return to(ks(me))}});d.ease=function(me){var De=me.indexOf("-"),et=De>=0?me.slice(0,De):me,dt=De>=0?me.slice(De+1):"in";return et=xh.get(et)||fl,dt=ss.get(dt)||F,bh(dt(et.apply(null,x.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function ks(me){return function(De){return 1-me(1-De)}}function to(me){return function(De){return .5*(De<.5?me(2*De):2-me(2-2*De))}}function Wc(me){return me*me}function Vu(me){return me*me*me}function jl(me){if(me<=0)return 0;if(me>=1)return 1;var De=me*me,et=De*me;return 4*(me<.5?et:3*(me-De)+et-.75)}function Mf(me){return function(De){return Math.pow(De,me)}}function Ac(me){return 1-Math.cos(me*st)}function nf(me){return Math.pow(2,10*(me-1))}function $l(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/Ue*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*Ue/De)}}function Of(me){return me||(me=1.70158),function(De){return De*De*((me+1)*De-me)}}function of(me){return me<1/2.75?7.5625*me*me:me<2/2.75?7.5625*(me-=1.5/2.75)*me+.75:me<2.5/2.75?7.5625*(me-=2.25/2.75)*me+.9375:7.5625*(me-=2.625/2.75)*me+.984375}d.interpolateHcl=jc;function jc(me,De){me=d.hcl(me),De=d.hcl(De);var et=me.h,dt=me.c,yt=me.l,Tt=De.h-et,tr=De.c-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.c:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return ta(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateHsl=Bf;function Bf(me,De){me=d.hsl(me),De=d.hsl(De);var et=me.h,dt=me.s,yt=me.l,Tt=De.h-et,tr=De.s-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.s:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return Yt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateLab=Nf;function Nf(me,De){me=d.lab(me),De=d.lab(De);var et=me.l,dt=me.a,yt=me.b,Tt=De.l-et,tr=De.a-dt,zt=De.b-yt;return function(_r){return pi(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}d.transform=function(me){var De=E.createElementNS(d.ns.prefix.svg,"g");return(d.transform=function(et){if(et!=null){De.setAttribute("transform",et);var dt=De.transform.baseVal.consolidate()}return new Ef(dt?dt.matrix:qc)})(me)};function Ef(me){var De=[me.a,me.b],et=[me.c,me.d],dt=Xc(De),yt=oc(De,et),Tt=Xc(Ql(et,De,-yt))||0;De[0]*et[1]<et[0]*De[1]&&(De[0]*=-1,De[1]*=-1,dt*=-1,yt*=-1),this.rotate=(dt?Math.atan2(De[1],De[0]):Math.atan2(-et[0],et[1]))*Ut,this.translate=[me.e,me.f],this.scale=[dt,Tt],this.skew=Tt?Math.atan2(yt,Tt)*Ut:0}Ef.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function oc(me,De){return me[0]*De[0]+me[1]*De[1]}function Xc(me){var De=Math.sqrt(oc(me,me));return De&&(me[0]/=De,me[1]/=De),De}function Ql(me,De,et){return me[0]+=et*De[0],me[1]+=et*De[1],me}var qc={a:1,b:0,c:0,d:1,e:0,f:0};d.interpolateTransform=Zc;function Sc(me){return me.length?me.pop()+",":""}function Ys(me,De,et,dt){if(me[0]!==De[0]||me[1]!==De[1]){var yt=et.push("translate(",null,",",null,")");dt.push({i:yt-4,x:ml(me[0],De[0])},{i:yt-2,x:ml(me[1],De[1])})}else(De[0]||De[1])&&et.push("translate("+De+")")}function kf(me,De,et,dt){me!==De?(me-De>180?De+=360:De-me>180&&(me+=360),dt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:ml(me,De)})):De&&et.push(Sc(et)+"rotate("+De+")")}function fh(me,De,et,dt){me!==De?dt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:ml(me,De)}):De&&et.push(Sc(et)+"skewX("+De+")")}function Uf(me,De,et,dt){if(me[0]!==De[0]||me[1]!==De[1]){var yt=et.push(Sc(et)+"scale(",null,",",null,")");dt.push({i:yt-4,x:ml(me[0],De[0])},{i:yt-2,x:ml(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Zc(me,De){var et=[],dt=[];return me=d.transform(me),De=d.transform(De),Ys(me.translate,De.translate,et,dt),kf(me.rotate,De.rotate,et,dt),fh(me.skew,De.skew,et,dt),Uf(me.scale,De.scale,et,dt),me=De=null,function(yt){for(var Tt=-1,tr=dt.length,zt;++Tt<tr;)et[(zt=dt[Tt]).i]=zt.x(yt);return et.join("")}}function $f(me,De){return De=(De-=me=+me)||1/De,function(et){return(et-me)/De}}function Cu(me,De){return De=(De-=me=+me)||1/De,function(et){return Math.max(0,Math.min(1,(et-me)/De))}}d.layout={},d.layout.bundle=function(){return function(me){for(var De=[],et=-1,dt=me.length;++et<dt;)De.push(jf(me[et]));return De}};function jf(me){for(var De=me.source,et=me.target,dt=Lu(De,et),yt=[De];De!==dt;)De=De.parent,yt.push(De);for(var Tt=yt.length;et!==dt;)yt.splice(Tt,0,et),et=et.parent;return yt}function yl(me){for(var De=[],et=me.parent;et!=null;)De.push(me),me=et,et=et.parent;return De.push(me),De}function Lu(me,De){if(me===De)return me;for(var et=yl(me),dt=yl(De),yt=et.pop(),Tt=dt.pop(),tr=null;yt===Tt;)tr=yt,yt=et.pop(),Tt=dt.pop();return tr}d.layout.chord=function(){var me={},De,et,dt,yt,Tt=0,tr,zt,_r;function Gr(){var xa={},pa=[],Ja=d.range(yt),ti=[],Sa,za,Xa,fi,ni;for(De=[],et=[],Sa=0,fi=-1;++fi<yt;){for(za=0,ni=-1;++ni<yt;)za+=dt[fi][ni];pa.push(za),ti.push(d.range(yt)),Sa+=za}for(tr&&Ja.sort(function(Yo,oo){return tr(pa[Yo],pa[oo])}),zt&&ti.forEach(function(Yo,oo){Yo.sort(function(Wo,cl){return zt(dt[oo][Wo],dt[oo][cl])})}),Sa=(Ue-Tt*yt)/Sa,za=0,fi=-1;++fi<yt;){for(Xa=za,ni=-1;++ni<yt;){var La=Ja[fi],sn=ti[La][ni],rn=dt[La][sn],dn=za,In=za+=rn*Sa;xa[La+"-"+sn]={index:La,subindex:sn,startAngle:dn,endAngle:In,value:rn}}et[La]={index:La,startAngle:Xa,endAngle:za,value:pa[La]},za+=Tt}for(fi=-1;++fi<yt;)for(ni=fi-1;++ni<yt;){var Kn=xa[fi+"-"+ni],ro=xa[ni+"-"+fi];(Kn.value||ro.value)&&De.push(Kn.value<ro.value?{source:ro,target:Kn}:{source:Kn,target:ro})}_r&&Xr()}function Xr(){De.sort(function(xa,pa){return _r((xa.source.value+xa.target.value)/2,(pa.source.value+pa.target.value)/2)})}return me.matrix=function(xa){return arguments.length?(yt=(dt=xa)&&dt.length,De=et=null,me):dt},me.padding=function(xa){return arguments.length?(Tt=xa,De=et=null,me):Tt},me.sortGroups=function(xa){return arguments.length?(tr=xa,De=et=null,me):tr},me.sortSubgroups=function(xa){return arguments.length?(zt=xa,De=null,me):zt},me.sortChords=function(xa){return arguments.length?(_r=xa,De&&Xr(),me):_r},me.chords=function(){return De||Gr(),De},me.groups=function(){return et||Gr(),et},me},d.layout.force=function(){var me={},De=d.dispatch("start","tick","end"),et,dt=[1,1],yt,Tt,tr=.9,zt=El,_r=qf,Gr=-30,Xr=Qf,xa=.1,pa=.64,Ja=[],ti=[],Sa,za,Xa;function fi(La){return function(sn,rn,dn,In){if(sn.point!==La){var Kn=sn.cx-La.x,ro=sn.cy-La.y,Yo=In-rn,oo=Kn*Kn+ro*ro;if(Yo*Yo/pa<oo){if(oo<Xr){var Wo=sn.charge/oo;La.px-=Kn*Wo,La.py-=ro*Wo}return!0}if(sn.point&&oo&&oo<Xr){var Wo=sn.pointCharge/oo;La.px-=Kn*Wo,La.py-=ro*Wo}}return!sn.charge}}me.tick=function(){if((Tt*=.99)<.005)return et=null,De.end({type:"end",alpha:Tt=0}),!0;var La=Ja.length,sn=ti.length,rn,dn,In,Kn,ro,Yo,oo,Wo,cl;for(dn=0;dn<sn;++dn)In=ti[dn],Kn=In.source,ro=In.target,Wo=ro.x-Kn.x,cl=ro.y-Kn.y,(Yo=Wo*Wo+cl*cl)&&(Yo=Tt*za[dn]*((Yo=Math.sqrt(Yo))-Sa[dn])/Yo,Wo*=Yo,cl*=Yo,ro.x-=Wo*(oo=Kn.weight+ro.weight?Kn.weight/(Kn.weight+ro.weight):.5),ro.y-=cl*oo,Kn.x+=Wo*(oo=1-oo),Kn.y+=cl*oo);if((oo=Tt*xa)&&(Wo=dt[0]/2,cl=dt[1]/2,dn=-1,oo))for(;++dn<La;)In=Ja[dn],In.x+=(Wo-In.x)*oo,In.y+=(cl-In.y)*oo;if(Gr)for(Tu(rn=d.geom.quadtree(Ja),Tt,Xa),dn=-1;++dn<La;)(In=Ja[dn]).fixed||rn.visit(fi(In));for(dn=-1;++dn<La;)In=Ja[dn],In.fixed?(In.x=In.px,In.y=In.py):(In.x-=(In.px-(In.px=In.x))*tr,In.y-=(In.py-(In.py=In.y))*tr);De.tick({type:"tick",alpha:Tt})},me.nodes=function(La){return arguments.length?(Ja=La,me):Ja},me.links=function(La){return arguments.length?(ti=La,me):ti},me.size=function(La){return arguments.length?(dt=La,me):dt},me.linkDistance=function(La){return arguments.length?(zt=typeof La=="function"?La:+La,me):zt},me.distance=me.linkDistance,me.linkStrength=function(La){return arguments.length?(_r=typeof La=="function"?La:+La,me):_r},me.friction=function(La){return arguments.length?(tr=+La,me):tr},me.charge=function(La){return arguments.length?(Gr=typeof La=="function"?La:+La,me):Gr},me.chargeDistance=function(La){return arguments.length?(Xr=La*La,me):Math.sqrt(Xr)},me.gravity=function(La){return arguments.length?(xa=+La,me):xa},me.theta=function(La){return arguments.length?(pa=La*La,me):Math.sqrt(pa)},me.alpha=function(La){return arguments.length?(La=+La,Tt?La>0?Tt=La:(et.c=null,et.t=NaN,et=null,De.end({type:"end",alpha:Tt=0})):La>0&&(De.start({type:"start",alpha:Tt=La}),et=Ln(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,rn=ti.length,dn=dt[0],In=dt[1],Kn,ro;for(La=0;La<sn;++La)(ro=Ja[La]).index=La,ro.weight=0;for(La=0;La<rn;++La)ro=ti[La],typeof ro.source=="number"&&(ro.source=Ja[ro.source]),typeof ro.target=="number"&&(ro.target=Ja[ro.target]),++ro.source.weight,++ro.target.weight;for(La=0;La<sn;++La)ro=Ja[La],isNaN(ro.x)&&(ro.x=Yo("x",dn)),isNaN(ro.y)&&(ro.y=Yo("y",In)),isNaN(ro.px)&&(ro.px=ro.x),isNaN(ro.py)&&(ro.py=ro.y);if(Sa=[],typeof zt=="function")for(La=0;La<rn;++La)Sa[La]=+zt.call(this,ti[La],La);else for(La=0;La<rn;++La)Sa[La]=zt;if(za=[],typeof _r=="function")for(La=0;La<rn;++La)za[La]=+_r.call(this,ti[La],La);else for(La=0;La<rn;++La)za[La]=_r;if(Xa=[],typeof Gr=="function")for(La=0;La<sn;++La)Xa[La]=+Gr.call(this,Ja[La],La);else for(La=0;La<sn;++La)Xa[La]=Gr;function Yo(oo,Wo){if(!Kn){for(Kn=new Array(sn),xl=0;xl<sn;++xl)Kn[xl]=[];for(xl=0;xl<rn;++xl){var cl=ti[xl];Kn[cl.source.index].push(cl.target),Kn[cl.target.index].push(cl.source)}}for(var al=Kn[La],xl=-1,mn=al.length,po;++xl<mn;)if(!isNaN(po=al[xl][oo]))return po;return Math.random()*Wo}return me.resume()},me.resume=function(){return me.alpha(.1)},me.stop=function(){return me.alpha(0)},me.drag=function(){if(yt||(yt=d.behavior.drag().origin(F).on("dragstart.force",Mc).on("drag.force",ni).on("dragend.force",ol)),!arguments.length)return yt;this.on("mouseover.force",vc).on("mouseout.force",yu).call(yt)};function ni(La){La.px=d.event.x,La.py=d.event.y,me.resume()}return d.rebind(me,De,"on")};function Mc(me){me.fixed|=2}function ol(me){me.fixed&=-7}function vc(me){me.fixed|=4,me.px=me.x,me.py=me.y}function yu(me){me.fixed&=-5}function Tu(me,De,et){var dt=0,yt=0;if(me.charge=0,!me.leaf)for(var Tt=me.nodes,tr=Tt.length,zt=-1,_r;++zt<tr;)_r=Tt[zt],_r!=null&&(Tu(_r,De,et),me.charge+=_r.charge,dt+=_r.charge*_r.cx,yt+=_r.charge*_r.cy);if(me.point){me.leaf||(me.point.x+=Math.random()-.5,me.point.y+=Math.random()-.5);var Gr=De*et[me.point.index];me.charge+=me.pointCharge=Gr,dt+=Gr*me.point.x,yt+=Gr*me.point.y}me.cx=dt/me.charge,me.cy=yt/me.charge}var El=20,qf=1,Qf=1/0;d.layout.hierarchy=function(){var me=vf,De=Lh,et=sf;function dt(yt){var Tt=[yt],tr=[],zt;for(yt.depth=0;(zt=Tt.pop())!=null;)if(tr.push(zt),(Gr=De.call(dt,zt,zt.depth))&&(_r=Gr.length)){for(var _r,Gr,Xr;--_r>=0;)Tt.push(Xr=Gr[_r]),Xr.parent=zt,Xr.depth=zt.depth+1;et&&(zt.value=0),zt.children=Gr}else et&&(zt.value=+et.call(dt,zt,zt.depth)||0),delete zt.children;return mc(yt,function(xa){var pa,Ja;me&&(pa=xa.children)&&pa.sort(me),et&&(Ja=xa.parent)&&(Ja.value+=xa.value)}),tr}return dt.sort=function(yt){return arguments.length?(me=yt,dt):me},dt.children=function(yt){return arguments.length?(De=yt,dt):De},dt.value=function(yt){return arguments.length?(et=yt,dt):et},dt.revalue=function(yt){return et&&(Ec(yt,function(Tt){Tt.children&&(Tt.value=0)}),mc(yt,function(Tt){var tr;Tt.children||(Tt.value=+et.call(dt,Tt,Tt.depth)||0),(tr=Tt.parent)&&(tr.value+=Tt.value)})),yt},dt};function Bu(me,De){return d.rebind(me,De,"sort","children","value"),me.nodes=me,me.links=Nu,me}function Ec(me,De){for(var et=[me];(me=et.pop())!=null;)if(De(me),(yt=me.children)&&(dt=yt.length))for(var dt,yt;--dt>=0;)et.push(yt[dt])}function mc(me,De){for(var et=[me],dt=[];(me=et.pop())!=null;)if(dt.push(me),(tr=me.children)&&(Tt=tr.length))for(var yt=-1,Tt,tr;++yt<Tt;)et.push(tr[yt]);for(;(me=dt.pop())!=null;)De(me)}function Lh(me){return me.children}function sf(me){return me.value}function vf(me,De){return De.value-me.value}function Nu(me){return d.merge(me.map(function(De){return(De.children||[]).map(function(et){return{source:De,target:et}})}))}d.layout.partition=function(){var me=d.layout.hierarchy(),De=[1,1];function et(Tt,tr,zt,_r){var Gr=Tt.children;if(Tt.x=tr,Tt.y=Tt.depth*_r,Tt.dx=zt,Tt.dy=_r,Gr&&(xa=Gr.length)){var Xr=-1,xa,pa,Ja;for(zt=Tt.value?zt/Tt.value:0;++Xr<xa;)et(pa=Gr[Xr],tr,Ja=pa.value*zt,_r),tr+=Ja}}function dt(Tt){var tr=Tt.children,zt=0;if(tr&&(Gr=tr.length))for(var _r=-1,Gr;++_r<Gr;)zt=Math.max(zt,dt(tr[_r]));return 1+zt}function yt(Tt,tr){var zt=me.call(this,Tt,tr);return et(zt[0],0,De[0],De[1]/dt(zt[0])),zt}return yt.size=function(Tt){return arguments.length?(De=Tt,yt):De},Bu(yt,me)},d.layout.pie=function(){var me=Number,De=lf,et=0,dt=Ue,yt=0;function Tt(tr){var zt=tr.length,_r=tr.map(function(fi,ni){return+me.call(Tt,fi,ni)}),Gr=+(typeof et=="function"?et.apply(this,arguments):et),Xr=(typeof dt=="function"?dt.apply(this,arguments):dt)-Gr,xa=Math.min(Math.abs(Xr)/zt,+(typeof yt=="function"?yt.apply(this,arguments):yt)),pa=xa*(Xr<0?-1:1),Ja=d.sum(_r),ti=Ja?(Xr-zt*pa)/Ja:0,Sa=d.range(zt),za=[],Xa;return De!=null&&Sa.sort(De===lf?function(fi,ni){return _r[ni]-_r[fi]}:function(fi,ni){return De(tr[fi],tr[ni])}),Sa.forEach(function(fi){za[fi]={data:tr[fi],value:Xa=_r[fi],startAngle:Gr,endAngle:Gr+=Xa*ti+pa,padAngle:xa}}),za}return Tt.value=function(tr){return arguments.length?(me=tr,Tt):me},Tt.sort=function(tr){return arguments.length?(De=tr,Tt):De},Tt.startAngle=function(tr){return arguments.length?(et=tr,Tt):et},Tt.endAngle=function(tr){return arguments.length?(dt=tr,Tt):dt},Tt.padAngle=function(tr){return arguments.length?(yt=tr,Tt):yt},Tt};var lf={};d.layout.stack=function(){var me=F,De=_u,et=Pu,dt=hh,yt=au,Tt=Yc;function tr(zt,_r){if(!(ti=zt.length))return zt;var Gr=zt.map(function(fi,ni){return me.call(tr,fi,ni)}),Xr=Gr.map(function(fi){return fi.map(function(ni,La){return[yt.call(tr,ni,La),Tt.call(tr,ni,La)]})}),xa=De.call(tr,Xr,_r);Gr=d.permute(Gr,xa),Xr=d.permute(Xr,xa);var pa=et.call(tr,Xr,_r),Ja=Gr[0].length,ti,Sa,za,Xa;for(za=0;za<Ja;++za)for(dt.call(tr,Gr[0][za],Xa=pa[za],Xr[0][za][1]),Sa=1;Sa<ti;++Sa)dt.call(tr,Gr[Sa][za],Xa+=Xr[Sa-1][za][1],Xr[Sa][za][1]);return zt}return tr.values=function(zt){return arguments.length?(me=zt,tr):me},tr.order=function(zt){return arguments.length?(De=typeof zt=="function"?zt:mf.get(zt)||_u,tr):De},tr.offset=function(zt){return arguments.length?(et=typeof zt=="function"?zt:sl.get(zt)||Pu,tr):et},tr.x=function(zt){return arguments.length?(yt=zt,tr):yt},tr.y=function(zt){return arguments.length?(Tt=zt,tr):Tt},tr.out=function(zt){return arguments.length?(dt=zt,tr):dt},tr};function au(me){return me.x}function Yc(me){return me.y}function hh(me,De,et){me.y0=De,me.y=et}var mf=d.map({"inside-out":function(me){var De=me.length,et,dt,yt=me.map(Cf),Tt=me.map(hl),tr=d.range(De).sort(function(xa,pa){return yt[xa]-yt[pa]}),zt=0,_r=0,Gr=[],Xr=[];for(et=0;et<De;++et)dt=tr[et],zt<_r?(zt+=Tt[dt],Gr.push(dt)):(_r+=Tt[dt],Xr.push(dt));return Xr.reverse().concat(Gr)},reverse:function(me){return d.range(me.length).reverse()},default:_u}),sl=d.map({silhouette:function(me){var De=me.length,et=me[0].length,dt=[],yt=0,Tt,tr,zt,_r=[];for(tr=0;tr<et;++tr){for(Tt=0,zt=0;Tt<De;Tt++)zt+=me[Tt][tr][1];zt>yt&&(yt=zt),dt.push(zt)}for(tr=0;tr<et;++tr)_r[tr]=(yt-dt[tr])/2;return _r},wiggle:function(me){var De=me.length,et=me[0],dt=et.length,yt,Tt,tr,zt,_r,Gr,Xr,xa,pa,Ja=[];for(Ja[0]=xa=pa=0,Tt=1;Tt<dt;++Tt){for(yt=0,zt=0;yt<De;++yt)zt+=me[yt][Tt][1];for(yt=0,_r=0,Xr=et[Tt][0]-et[Tt-1][0];yt<De;++yt){for(tr=0,Gr=(me[yt][Tt][1]-me[yt][Tt-1][1])/(2*Xr);tr<yt;++tr)Gr+=(me[tr][Tt][1]-me[tr][Tt-1][1])/Xr;_r+=Gr*me[yt][Tt][1]}Ja[Tt]=xa-=zt?_r/zt*Xr:0,xa<pa&&(pa=xa)}for(Tt=0;Tt<dt;++Tt)Ja[Tt]-=pa;return Ja},expand:function(me){var De=me.length,et=me[0].length,dt=1/De,yt,Tt,tr,zt=[];for(Tt=0;Tt<et;++Tt){for(yt=0,tr=0;yt<De;yt++)tr+=me[yt][Tt][1];if(tr)for(yt=0;yt<De;yt++)me[yt][Tt][1]/=tr;else for(yt=0;yt<De;yt++)me[yt][Tt][1]=dt}for(Tt=0;Tt<et;++Tt)zt[Tt]=0;return zt},zero:Pu});function _u(me){return d.range(me.length)}function Pu(me){for(var De=-1,et=me[0].length,dt=[];++De<et;)dt[De]=0;return dt}function Cf(me){for(var De=1,et=0,dt=me[0][1],yt,Tt=me.length;De<Tt;++De)(yt=me[De][1])>dt&&(et=De,dt=yt);return et}function hl(me){return me.reduce(uf,0)}function uf(me,De){return me+De[1]}d.layout.histogram=function(){var me=!0,De=Number,et=gf,dt=kc;function yt(Tt,pa){for(var zt=[],_r=Tt.map(De,this),Gr=et.call(this,_r,pa),Xr=dt.call(this,Gr,_r,pa),xa,pa=-1,Ja=_r.length,ti=Xr.length-1,Sa=me?1:1/Ja,za;++pa<ti;)xa=zt[pa]=[],xa.dx=Xr[pa+1]-(xa.x=Xr[pa]),xa.y=0;if(ti>0)for(pa=-1;++pa<Ja;)za=_r[pa],za>=Gr[0]&&za<=Gr[1]&&(xa=zt[d.bisect(Xr,za,1,ti)-1],xa.y+=Sa,xa.push(Tt[pa]));return zt}return yt.value=function(Tt){return arguments.length?(De=Tt,yt):De},yt.range=function(Tt){return arguments.length?(et=Or(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Or(Tt),yt):dt},yt.frequency=function(Tt){return arguments.length?(me=!!Tt,yt):me},yt};function kc(me,De){return Hu(me,Math.ceil(Math.log(De.length)/Math.LN2+1))}function Hu(me,De){for(var et=-1,dt=+me[0],yt=(me[1]-dt)/De,Tt=[];++et<=De;)Tt[et]=yt*et+dt;return Tt}function gf(me){return[d.min(me),d.max(me)]}d.layout.pack=function(){var me=d.layout.hierarchy().sort(Wu),De=0,et=[1,1],dt;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr=et[0],Xr=et[1],xa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+xa(Ja.value)}),mc(_r,Vf),De){var pa=De*(dt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=pa}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=pa})}return gc(_r,Gr/2,Xr/2,dt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),zt}return yt.size=function(Tt){return arguments.length?(et=Tt,yt):et},yt.radius=function(Tt){return arguments.length?(dt=Tt==null||typeof Tt=="function"?Tt:+Tt,yt):dt},yt.padding=function(Tt){return arguments.length?(De=+Tt,yt):De},Bu(yt,me)};function Wu(me,De){return me.value-De.value}function Kc(me,De){var et=me._pack_next;me._pack_next=De,De._pack_prev=me,De._pack_next=et,et._pack_prev=De}function Lf(me,De){me._pack_next=De,De._pack_prev=me}function iu(me,De){var et=De.x-me.x,dt=De.y-me.y,yt=me.r+De.r;return .999*yt*yt>et*et+dt*dt}function Vf(me){if(!(De=me.children)||!(pa=De.length))return;var De,et=1/0,dt=-1/0,yt=1/0,Tt=-1/0,tr,zt,_r,Gr,Xr,xa,pa;function Ja(La){et=Math.min(La.x-La.r,et),dt=Math.max(La.x+La.r,dt),yt=Math.min(La.y-La.r,yt),Tt=Math.max(La.y+La.r,Tt)}if(De.forEach(Xu),tr=De[0],tr.x=-tr.r,tr.y=0,Ja(tr),pa>1&&(zt=De[1],zt.x=zt.r,zt.y=0,Ja(zt),pa>2))for(_r=De[2],ql(tr,zt,_r),Ja(_r),Kc(tr,_r),tr._pack_prev=_r,Kc(_r,zt),zt=tr._pack_next,Gr=3;Gr<pa;Gr++){ql(tr,zt,_r=De[Gr]);var ti=0,Sa=1,za=1;for(Xr=zt._pack_next;Xr!==zt;Xr=Xr._pack_next,Sa++)if(iu(Xr,_r)){ti=1;break}if(ti==1)for(xa=tr._pack_prev;xa!==Xr._pack_prev&&!iu(xa,_r);xa=xa._pack_prev,za++);ti?(Sa<za||Sa==za&&zt.r<tr.r?Lf(tr,zt=Xr):Lf(tr=xa,zt),Gr--):(Kc(tr,_r),zt=_r,Ja(_r))}var Xa=(et+dt)/2,fi=(yt+Tt)/2,ni=0;for(Gr=0;Gr<pa;Gr++)_r=De[Gr],_r.x-=Xa,_r.y-=fi,ni=Math.max(ni,_r.r+Math.sqrt(_r.x*_r.x+_r.y*_r.y));me.r=ni,De.forEach(Cc)}function Xu(me){me._pack_next=me._pack_prev=me}function Cc(me){delete me._pack_next,delete me._pack_prev}function gc(me,De,et,dt){var yt=me.children;if(me.x=De+=dt*me.x,me.y=et+=dt*me.y,me.r*=dt,yt)for(var Tt=-1,tr=yt.length;++Tt<tr;)gc(yt[Tt],De,et,dt)}function ql(me,De,et){var dt=me.r+et.r,yt=De.x-me.x,Tt=De.y-me.y;if(dt&&(yt||Tt)){var tr=De.r+et.r,zt=yt*yt+Tt*Tt;tr*=tr,dt*=dt;var _r=.5+(dt-tr)/(2*zt),Gr=Math.sqrt(Math.max(0,2*tr*(dt+zt)-(dt-=zt)*dt-tr*tr))/(2*zt);et.x=me.x+_r*yt+Gr*Tt,et.y=me.y+_r*Tt-Gr*yt}else et.x=me.x+dt,et.y=me.y}d.layout.tree=function(){var me=d.layout.hierarchy().sort(null).value(null),De=xu,et=[1,1],dt=null;function yt(Xr,xa){var pa=me.call(this,Xr,xa),Ja=pa[0],ti=Tt(Ja);if(mc(ti,tr),ti.parent.m=-ti.z,Ec(ti,zt),dt)Ec(Ja,Gr);else{var Sa=Ja,za=Ja,Xa=Ja;Ec(Ja,function(sn){sn.x<Sa.x&&(Sa=sn),sn.x>za.x&&(za=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=De(Sa,za)/2-Sa.x,ni=et[0]/(za.x+De(za,Sa)/2+fi),La=et[1]/(Xa.depth||1);Ec(Ja,function(sn){sn.x=(sn.x+fi)*ni,sn.y=sn.depth*La})}return pa}function Tt(Xr){for(var xa={A:null,children:[Xr]},pa=[xa],Ja;(Ja=pa.pop())!=null;)for(var ti=Ja.children,Sa,za=0,Xa=ti.length;za<Xa;++za)pa.push((ti[za]=Sa={_:ti[za],parent:Ja,children:(Sa=ti[za].children)&&Sa.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:za}).a=Sa);return xa.children[0]}function tr(Xr){var xa=Xr.children,pa=Xr.parent.children,Ja=Xr.i?pa[Xr.i-1]:null;if(xa.length){Pc(Xr);var ti=(xa[0].z+xa[xa.length-1].z)/2;Ja?(Xr.z=Ja.z+De(Xr._,Ja._),Xr.m=Xr.z-ti):Xr.z=ti}else Ja&&(Xr.z=Ja.z+De(Xr._,Ja._));Xr.parent.A=_r(Xr,Ja,Xr.parent.A||pa[0])}function zt(Xr){Xr._.x=Xr.z+Xr.parent.m,Xr.m+=Xr.parent.m}function _r(Xr,xa,pa){if(xa){for(var Ja=Xr,ti=Xr,Sa=xa,za=Ja.parent.children[0],Xa=Ja.m,fi=ti.m,ni=Sa.m,La=za.m,sn;Sa=Jc(Sa),Ja=Lc(Ja),Sa&&Ja;)za=Lc(za),ti=Jc(ti),ti.a=Xr,sn=Sa.z+ni-Ja.z-Xa+De(Sa._,Ja._),sn>0&&(sc(Qt(Sa,Xr,pa),Xr,sn),Xa+=sn,fi+=sn),ni+=Sa.m,Xa+=Ja.m,La+=za.m,fi+=ti.m;Sa&&!Jc(ti)&&(ti.t=Sa,ti.m+=ni-fi),Ja&&!Lc(za)&&(za.t=Ja,za.m+=Xa-La,pa=Xr)}return pa}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return yt.separation=function(Xr){return arguments.length?(De=Xr,yt):De},yt.size=function(Xr){return arguments.length?(dt=(et=Xr)==null?Gr:null,yt):dt?null:et},yt.nodeSize=function(Xr){return arguments.length?(dt=(et=Xr)==null?null:Gr,yt):dt?et:null},Bu(yt,me)};function xu(me,De){return me.parent==De.parent?1:2}function Lc(me){var De=me.children;return De.length?De[0]:me.t}function Jc(me){var De=me.children,et;return(et=De.length)?De[et-1]:me.t}function sc(me,De,et){var dt=et/(De.i-me.i);De.c-=dt,De.s+=et,me.c+=dt,De.z+=et,De.m+=et}function Pc(me){for(var De=0,et=0,dt=me.children,yt=dt.length,Tt;--yt>=0;)Tt=dt[yt],Tt.z+=De,Tt.m+=De,De+=Tt.s+(et+=Tt.c)}function Qt(me,De,et){return me.a.parent===De.parent?me.a:et}d.layout.cluster=function(){var me=d.layout.hierarchy().sort(null).value(null),De=xu,et=[1,1],dt=!1;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr,Xr=0;mc(_r,function(Sa){var za=Sa.children;za&&za.length?(Sa.x=aa(za),Sa.y=br(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var xa=$r(_r),pa=ka(_r),Ja=xa.x-De(xa,pa)/2,ti=pa.x+De(pa,xa)/2;return mc(_r,dt?function(Sa){Sa.x=(Sa.x-_r.x)*et[0],Sa.y=(_r.y-Sa.y)*et[1]}:function(Sa){Sa.x=(Sa.x-Ja)/(ti-Ja)*et[0],Sa.y=(1-(_r.y?Sa.y/_r.y:1))*et[1]}),zt}return yt.separation=function(Tt){return arguments.length?(De=Tt,yt):De},yt.size=function(Tt){return arguments.length?(dt=(et=Tt)==null,yt):dt?null:et},yt.nodeSize=function(Tt){return arguments.length?(dt=(et=Tt)!=null,yt):dt?et:null},Bu(yt,me)};function br(me){return 1+d.max(me,function(De){return De.y})}function aa(me){return me.reduce(function(De,et){return De+et.x},0)/me.length}function $r(me){var De=me.children;return De&&De.length?$r(De[0]):me}function ka(me){var De=me.children,et;return De&&(et=De.length)?ka(De[et-1]):me}d.layout.treemap=function(){var me=d.layout.hierarchy(),De=Math.round,et=[1,1],dt=null,yt=li,Tt=!1,tr,zt="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,za){for(var Xa=-1,fi=Sa.length,ni,La;++Xa<fi;)La=(ni=Sa[Xa]).value*(za<0?0:za),ni.area=isNaN(La)||La<=0?0:La}function Xr(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=[],ni=za.slice(),La,sn=1/0,rn,dn=zt==="slice"?Xa.dx:zt==="dice"?Xa.dy:zt==="slice-dice"?Sa.depth&1?Xa.dy:Xa.dx:Math.min(Xa.dx,Xa.dy),In;for(Gr(ni,Xa.dx*Xa.dy/Sa.value),fi.area=0;(In=ni.length)>0;)fi.push(La=ni[In-1]),fi.area+=La.area,zt!=="squarify"||(rn=pa(fi,dn))<=sn?(ni.pop(),sn=rn):(fi.area-=fi.pop().area,Ja(fi,dn,Xa,!1),dn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,dn,Xa,!0),fi.length=fi.area=0),za.forEach(Xr)}}function xa(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=za.slice(),ni,La=[];for(Gr(fi,Xa.dx*Xa.dy/Sa.value),La.area=0;ni=fi.pop();)La.push(ni),La.area+=ni.area,ni.z!=null&&(Ja(La,ni.z?Xa.dx:Xa.dy,Xa,!fi.length),La.length=La.area=0);za.forEach(xa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,ni=0,La=1/0,sn=-1,rn=Sa.length;++sn<rn;)(fi=Sa[sn].area)&&(fi<La&&(La=fi),fi>ni&&(ni=fi));return Xa*=Xa,za*=za,Xa?Math.max(za*ni*_r/Xa,Xa/(za*La*_r)):1/0}function Ja(Sa,za,Xa,fi){var ni=-1,La=Sa.length,sn=Xa.x,rn=Xa.y,dn=za?De(Sa.area/za):0,In;if(za==Xa.dx){for((fi||dn>Xa.dy)&&(dn=Xa.dy);++ni<La;)In=Sa[ni],In.x=sn,In.y=rn,In.dy=dn,sn+=In.dx=Math.min(Xa.x+Xa.dx-sn,dn?De(In.area/dn):0);In.z=!0,In.dx+=Xa.x+Xa.dx-sn,Xa.y+=dn,Xa.dy-=dn}else{for((fi||dn>Xa.dx)&&(dn=Xa.dx);++ni<La;)In=Sa[ni],In.x=sn,In.y=rn,In.dx=dn,rn+=In.dy=Math.min(Xa.y+Xa.dy-rn,dn?De(In.area/dn):0);In.z=!1,In.dy+=Xa.y+Xa.dy-rn,Xa.x+=dn,Xa.dx-=dn}}function ti(Sa){var za=tr||me(Sa),Xa=za[0];return Xa.x=Xa.y=0,Xa.value?(Xa.dx=et[0],Xa.dy=et[1]):Xa.dx=Xa.dy=0,tr&&me.revalue(Xa),Gr([Xa],Xa.dx*Xa.dy/Xa.value),(tr?xa:Xr)(Xa),Tt&&(tr=za),za}return ti.size=function(Sa){return arguments.length?(et=Sa,ti):et},ti.padding=function(Sa){if(!arguments.length)return dt;function za(ni){var La=Sa.call(ti,ni,ni.depth);return La==null?li(ni):Ci(ni,typeof La=="number"?[La,La,La,La]:La)}function Xa(ni){return Ci(ni,Sa)}var fi;return yt=(dt=Sa)==null?li:(fi=typeof Sa)=="function"?za:(fi==="number"&&(Sa=[Sa,Sa,Sa,Sa]),Xa),ti},ti.round=function(Sa){return arguments.length?(De=Sa?Math.round:Number,ti):De!=Number},ti.sticky=function(Sa){return arguments.length?(Tt=Sa,tr=null,ti):Tt},ti.ratio=function(Sa){return arguments.length?(_r=Sa,ti):_r},ti.mode=function(Sa){return arguments.length?(zt=Sa+"",ti):zt},Bu(ti,me)};function li(me){return{x:me.x,y:me.y,dx:me.dx,dy:me.dy}}function Ci(me,De){var et=me.x+De[3],dt=me.y+De[0],yt=me.dx-De[1]-De[3],Tt=me.dy-De[0]-De[2];return yt<0&&(et+=yt/2,yt=0),Tt<0&&(dt+=Tt/2,Tt=0),{x:et,y:dt,dx:yt,dy:Tt}}d.random={normal:function(me,De){var et=arguments.length;return et<2&&(De=1),et<1&&(me=0),function(){var dt,yt,Tt;do dt=Math.random()*2-1,yt=Math.random()*2-1,Tt=dt*dt+yt*yt;while(!Tt||Tt>1);return me+De*dt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var me=d.random.normal.apply(d,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=d.random.irwinHall(me);return function(){return De()/me}},irwinHall:function(me){return function(){for(var De=0,et=0;et<me;et++)De+=Math.random();return De}}},d.scale={};function Hi(me){var De=me[0],et=me[me.length-1];return De<et?[De,et]:[et,De]}function Qi(me){return me.rangeExtent?me.rangeExtent():Hi(me.range())}function pn(me,De,et,dt){var yt=et(me[0],me[1]),Tt=dt(De[0],De[1]);return function(tr){return Tt(yt(tr))}}function Pi(me,De){var et=0,dt=me.length-1,yt=me[et],Tt=me[dt],tr;return Tt<yt&&(tr=et,et=dt,dt=tr,tr=yt,yt=Tt,Tt=tr),me[et]=De.floor(yt),me[dt]=De.ceil(Tt),me}function Di(me){return me?{floor:function(De){return Math.floor(De/me)*me},ceil:function(De){return Math.ceil(De/me)*me}}:Ni}var Ni={floor:F,ceil:F};function mi(me,De,et,dt){var yt=[],Tt=[],tr=0,zt=Math.min(me.length,De.length)-1;for(me[zt]<me[0]&&(me=me.slice().reverse(),De=De.slice().reverse());++tr<=zt;)yt.push(et(me[tr-1],me[tr])),Tt.push(dt(De[tr-1],De[tr]));return function(_r){var Gr=d.bisect(me,_r,1,zt)-1;return Tt[Gr](yt[Gr](_r))}}d.scale.linear=function(){return Sn([0,1],[0,1],Ul,!1)};function Sn(me,De,et,dt){var yt,Tt;function tr(){var _r=Math.min(me.length,De.length)>2?mi:pn,Gr=dt?Cu:$f;return yt=_r(me,De,Gr,et),Tt=_r(De,me,Gr,Ul),zt}function zt(_r){return yt(_r)}return zt.invert=function(_r){return Tt(_r)},zt.domain=function(_r){return arguments.length?(me=_r.map(Number),tr()):me},zt.range=function(_r){return arguments.length?(De=_r,tr()):De},zt.rangeRound=function(_r){return zt.range(_r).interpolate(Gu)},zt.clamp=function(_r){return arguments.length?(dt=_r,tr()):dt},zt.interpolate=function(_r){return arguments.length?(et=_r,tr()):et},zt.ticks=function(_r){return co(me,_r)},zt.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(me,_r,Gr)},zt.nice=function(_r){return no(me,_r),tr()},zt.copy=function(){return Sn(me,De,et,dt)},tr()}function $n(me,De){return d.rebind(me,De,"range","rangeRound","interpolate","clamp")}function no(me,De){return Pi(me,Di(Qn(me,De)[2])),Pi(me,Di(Qn(me,De)[2])),me}function Qn(me,De){De==null&&(De=10);var et=Hi(me),dt=et[1]-et[0],yt=Math.pow(10,Math.floor(Math.log(dt/De)/Math.LN10)),Tt=De/dt*yt;return Tt<=.15?yt*=10:Tt<=.35?yt*=5:Tt<=.75&&(yt*=2),et[0]=Math.ceil(et[0]/yt)*yt,et[1]=Math.floor(et[1]/yt)*yt+yt*.5,et[2]=yt,et}function co(me,De){return d.range.apply(d,Qn(me,De))}var Tn={s:1,g:1,p:1,r:1,e:1};function un(me){return-Math.floor(Math.log(me)/Math.LN10+.01)}function go(me,De){var et=un(De[2]);return me in Tn?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(me!=="e"):et-(me==="%")*2}d.scale.log=function(){return Ko(d.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(me,De,et,dt){function yt(zt){return(et?Math.log(zt<0?0:zt):-Math.log(zt>0?0:-zt))/Math.log(De)}function Tt(zt){return et?Math.pow(De,zt):-Math.pow(De,-zt)}function tr(zt){return me(yt(zt))}return tr.invert=function(zt){return Tt(me.invert(zt))},tr.domain=function(zt){return arguments.length?(et=zt[0]>=0,me.domain((dt=zt.map(Number)).map(yt)),tr):dt},tr.base=function(zt){return arguments.length?(De=+zt,me.domain(dt.map(yt)),tr):De},tr.nice=function(){var zt=Pi(dt.map(yt),et?Math:Ms);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],xa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-xa)){if(et){for(;xa<pa;xa++)for(var ti=1;ti<Ja;ti++)_r.push(Tt(xa)*ti);_r.push(Tt(xa))}else for(_r.push(Tt(xa));xa++<pa;)for(var ti=Ja-1;ti>0;ti--)_r.push(Tt(xa)*ti);for(xa=0;_r[xa]<Gr;xa++);for(pa=_r.length;_r[pa-1]>Xr;pa--);_r=_r.slice(xa,pa)}return _r},tr.copy=function(){return Ko(me.copy(),De,et,dt)},$n(tr,me)}var Ms={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};d.scale.pow=function(){return rl(d.scale.linear(),1,[0,1])};function rl(me,De,et){var dt=Ns(De),yt=Ns(1/De);function Tt(tr){return me(dt(tr))}return Tt.invert=function(tr){return yt(me.invert(tr))},Tt.domain=function(tr){return arguments.length?(me.domain((et=tr.map(Number)).map(dt)),Tt):et},Tt.ticks=function(tr){return co(et,tr)},Tt.tickFormat=function(tr,zt){return d3_scale_linearTickFormat(et,tr,zt)},Tt.nice=function(tr){return Tt.domain(no(et,tr))},Tt.exponent=function(tr){return arguments.length?(dt=Ns(De=tr),yt=Ns(1/De),me.domain(et.map(dt)),Tt):De},Tt.copy=function(){return rl(me.copy(),De,et)},$n(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}d.scale.sqrt=function(){return d.scale.pow().exponent(.5)},d.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(me,De){var et,dt,yt;function Tt(zt){return dt[((et.get(zt)||(De.t==="range"?et.set(zt,me.push(zt)):NaN))-1)%dt.length]}function tr(zt,_r){return d.range(me.length).map(function(Gr){return zt+_r*Gr})}return Tt.domain=function(zt){if(!arguments.length)return me;me=[],et=new A;for(var _r=-1,Gr=zt.length,Xr;++_r<Gr;)et.has(Xr=zt[_r])||et.set(Xr,me.push(Xr));return Tt[De.t].apply(Tt,De.a)},Tt.range=function(zt){return arguments.length?(dt=zt,yt=0,De={t:"range",a:arguments},Tt):dt},Tt.rangePoints=function(zt,_r){arguments.length<2&&(_r=0);var Gr=zt[0],Xr=zt[1],xa=me.length<2?(Gr=(Gr+Xr)/2,0):(Xr-Gr)/(me.length-1+_r);return dt=tr(Gr+xa*_r/2,xa),yt=0,De={t:"rangePoints",a:arguments},Tt},Tt.rangeRoundPoints=function(zt,_r){arguments.length<2&&(_r=0);var Gr=zt[0],Xr=zt[1],xa=me.length<2?(Gr=Xr=Math.round((Gr+Xr)/2),0):(Xr-Gr)/(me.length-1+_r)|0;return dt=tr(Gr+Math.round(xa*_r/2+(Xr-Gr-(me.length-1+_r)*xa)/2),xa),yt=0,De={t:"rangeRoundPoints",a:arguments},Tt},Tt.rangeBands=function(zt,_r,Gr){arguments.length<2&&(_r=0),arguments.length<3&&(Gr=_r);var Xr=zt[1]<zt[0],xa=zt[Xr-0],pa=zt[1-Xr],Ja=(pa-xa)/(me.length-_r+2*Gr);return dt=tr(xa+Ja*Gr,Ja),Xr&&dt.reverse(),yt=Ja*(1-_r),De={t:"rangeBands",a:arguments},Tt},Tt.rangeRoundBands=function(zt,_r,Gr){arguments.length<2&&(_r=0),arguments.length<3&&(Gr=_r);var Xr=zt[1]<zt[0],xa=zt[Xr-0],pa=zt[1-Xr],Ja=Math.floor((pa-xa)/(me.length-_r+2*Gr));return dt=tr(xa+Math.round((pa-xa-(me.length-_r)*Ja)/2),Ja),Xr&&dt.reverse(),yt=Math.round(Ja*(1-_r)),De={t:"rangeRoundBands",a:arguments},Tt},Tt.rangeBand=function(){return yt},Tt.rangeExtent=function(){return Hi(De.a[0])},Tt.copy=function(){return el(me,De)},Tt.domain(me)}d.scale.category10=function(){return d.scale.ordinal().range(ws)},d.scale.category20=function(){return d.scale.ordinal().range(Fl)},d.scale.category20b=function(){return d.scale.ordinal().range(_l)},d.scale.category20c=function(){return d.scale.ordinal().range(ll)};var ws=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Br),Fl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Br),_l=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Br),ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Br);d.scale.quantile=function(){return jn([],[])};function jn(me,De){var et;function dt(){var Tt=0,tr=De.length;for(et=[];++Tt<tr;)et[Tt-1]=d.quantile(me,Tt/tr);return yt}function yt(Tt){if(!isNaN(Tt=+Tt))return De[d.bisect(et,Tt)]}return yt.domain=function(Tt){return arguments.length?(me=Tt.map(h).filter(f).sort(s),dt()):me},yt.range=function(Tt){return arguments.length?(De=Tt,dt()):De},yt.quantiles=function(){return et},yt.invertExtent=function(Tt){return Tt=De.indexOf(Tt),Tt<0?[NaN,NaN]:[Tt>0?et[Tt-1]:me[0],Tt<et.length?et[Tt]:me[me.length-1]]},yt.copy=function(){return jn(me,De)},dt()}d.scale.quantize=function(){return Io(0,1,[0,1])};function Io(me,De,et){var dt,yt;function Tt(zt){return et[Math.max(0,Math.min(yt,Math.floor(dt*(zt-me))))]}function tr(){return dt=et.length/(De-me),yt=et.length-1,Tt}return Tt.domain=function(zt){return arguments.length?(me=+zt[0],De=+zt[zt.length-1],tr()):[me,De]},Tt.range=function(zt){return arguments.length?(et=zt,tr()):et},Tt.invertExtent=function(zt){return zt=et.indexOf(zt),zt=zt<0?NaN:zt/dt+me,[zt,zt+1/dt]},Tt.copy=function(){return Io(me,De,et)},tr()}d.scale.threshold=function(){return Js([.5],[0,1])};function Js(me,De){function et(dt){if(dt<=dt)return De[d.bisect(me,dt)]}return et.domain=function(dt){return arguments.length?(me=dt,et):me},et.range=function(dt){return arguments.length?(De=dt,et):De},et.invertExtent=function(dt){return dt=De.indexOf(dt),[me[dt-1],me[dt]]},et.copy=function(){return Js(me,De)},et}d.scale.identity=function(){return Ds([0,1])};function Ds(me){function De(et){return+et}return De.invert=De,De.domain=De.range=function(et){return arguments.length?(me=et.map(De),De):me},De.ticks=function(et){return co(me,et)},De.tickFormat=function(et,dt){return d3_scale_linearTickFormat(me,et,dt)},De.copy=function(){return Ds(me)},De}d.svg={};function uu(){return 0}d.svg.arc=function(){var me=Zu,De=Ic,et=uu,dt=Iu,yt=bu,Tt=Rc,tr=Au;function zt(){var Gr=Math.max(0,+me.apply(this,arguments)),Xr=Math.max(0,+De.apply(this,arguments)),xa=yt.apply(this,arguments)-st,pa=Tt.apply(this,arguments)-st,Ja=Math.abs(pa-xa),ti=xa>pa?0:1;if(Xr<Gr&&(Sa=Xr,Xr=Gr,Gr=Sa),Ja>=Ze)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,ni=0,La=0,sn,rn,dn,In,Kn,ro,Yo,oo,Wo=[];if((fi=(+tr.apply(this,arguments)||0)/2)&&(Xa=dt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+dt.apply(this,arguments),ti||(La*=-1),Xr&&(La=fr(Xa/Xr*Math.sin(fi))),Gr&&(ni=fr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(xa+La),rn=Xr*Math.sin(xa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-xa-2*La)<=Le?0:1;if(La&&yc(sn,rn,dn,In)===ti^cl){var al=(xa+pa)/2;sn=Xr*Math.cos(al),rn=Xr*Math.sin(al),dn=In=null}}else sn=rn=0;if(Gr){Kn=Gr*Math.cos(pa-ni),ro=Gr*Math.sin(pa-ni),Yo=Gr*Math.cos(xa+ni),oo=Gr*Math.sin(xa+ni);var xl=Math.abs(xa-pa+2*ni)<=Le?0:1;if(ni&&yc(Kn,ro,Yo,oo)===1-ti^xl){var mn=(xa+pa)/2;Kn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),Yo=oo=null}}else Kn=ro=0;if(Ja>Je&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){za=Gr<Xr^ti?0:1;var po=Sa,cs=Sa;if(Ja<Le){var vs=Yo==null?[Kn,ro]:dn==null?[sn,rn]:ts([sn,rn],[Yo,oo],[dn,In],[Kn,ro]),Al=sn-vs[0],Hl=rn-vs[1],Su=dn-vs[0],Rl=In-vs[1],_c=1/Math.sin(Math.acos((Al*Su+Hl*Rl)/(Math.sqrt(Al*Al+Hl*Hl)*Math.sqrt(Su*Su+Rl*Rl)))/2),it=Math.sqrt(vs[0]*vs[0]+vs[1]*vs[1]);cs=Math.min(Sa,(Gr-it)/(_c-1)),po=Math.min(Sa,(Xr-it)/(_c+1))}if(dn!=null){var Zt=fo(Yo==null?[Kn,ro]:[Yo,oo],[sn,rn],Xr,po,ti),cr=fo([dn,In],[Kn,ro],Xr,po,ti);Sa===po?Wo.push("M",Zt[0],"A",po,",",po," 0 0,",za," ",Zt[1],"A",Xr,",",Xr," 0 ",1-ti^yc(Zt[1][0],Zt[1][1],cr[1][0],cr[1][1]),",",ti," ",cr[1],"A",po,",",po," 0 0,",za," ",cr[0]):Wo.push("M",Zt[0],"A",po,",",po," 0 1,",za," ",cr[0])}else Wo.push("M",sn,",",rn);if(Yo!=null){var oa=fo([sn,rn],[Yo,oo],Gr,-cs,ti),wa=fo([Kn,ro],dn==null?[sn,rn]:[dn,In],Gr,-cs,ti);Sa===cs?Wo.push("L",wa[0],"A",cs,",",cs," 0 0,",za," ",wa[1],"A",Gr,",",Gr," 0 ",ti^yc(wa[1][0],wa[1][1],oa[1][0],oa[1][1]),",",1-ti," ",oa[1],"A",cs,",",cs," 0 0,",za," ",oa[0]):Wo.push("L",wa[0],"A",cs,",",cs," 0 0,",za," ",oa[0])}else Wo.push("L",Kn,",",ro)}else Wo.push("M",sn,",",rn),dn!=null&&Wo.push("A",Xr,",",Xr," 0 ",cl,",",ti," ",dn,",",In),Wo.push("L",Kn,",",ro),Yo!=null&&Wo.push("A",Gr,",",Gr," 0 ",xl,",",1-ti," ",Yo,",",oo);return Wo.push("Z"),Wo.join("")}function _r(Gr,Xr){return"M0,"+Gr+"A"+Gr+","+Gr+" 0 1,"+Xr+" 0,"+-Gr+"A"+Gr+","+Gr+" 0 1,"+Xr+" 0,"+Gr}return zt.innerRadius=function(Gr){return arguments.length?(me=Or(Gr),zt):me},zt.outerRadius=function(Gr){return arguments.length?(De=Or(Gr),zt):De},zt.cornerRadius=function(Gr){return arguments.length?(et=Or(Gr),zt):et},zt.padRadius=function(Gr){return arguments.length?(dt=Gr==Iu?Iu:Or(Gr),zt):dt},zt.startAngle=function(Gr){return arguments.length?(yt=Or(Gr),zt):yt},zt.endAngle=function(Gr){return arguments.length?(Tt=Or(Gr),zt):Tt},zt.padAngle=function(Gr){return arguments.length?(tr=Or(Gr),zt):tr},zt.centroid=function(){var Gr=(+me.apply(this,arguments)+ +De.apply(this,arguments))/2,Xr=(+yt.apply(this,arguments)+ +Tt.apply(this,arguments))/2-st;return[Math.cos(Xr)*Gr,Math.sin(Xr)*Gr]},zt};var Iu="auto";function Zu(me){return me.innerRadius}function Ic(me){return me.outerRadius}function bu(me){return me.startAngle}function Rc(me){return me.endAngle}function Au(me){return me&&me.padAngle}function yc(me,De,et,dt){return(me-et)*De-(De-dt)*me>0?0:1}function fo(me,De,et,dt,yt){var Tt=me[0]-De[0],tr=me[1]-De[1],zt=(yt?dt:-dt)/Math.sqrt(Tt*Tt+tr*tr),_r=zt*tr,Gr=-zt*Tt,Xr=me[0]+_r,xa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(xa+Ja)/2,za=pa-Xr,Xa=Ja-xa,fi=za*za+Xa*Xa,ni=et-dt,La=Xr*Ja-pa*xa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),rn=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Kn=(-La*za+Xa*sn)/fi,ro=rn-ti,Yo=dn-Sa,oo=In-ti,Wo=Kn-Sa;return ro*ro+Yo*Yo>oo*oo+Wo*Wo&&(rn=In,dn=Kn),[[rn-_r,dn-Gr],[rn*et/ni,dn*et/ni]]}function zo(){return!0}function Dc(me){var De=xo,et=Co,dt=zo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],xa=-1,pa=_r.length,Ja,ti=Or(De),Sa=Or(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++xa<pa;)dt.call(this,Ja=_r[xa],xa)?Xr.push([+ti.call(this,Ja,xa),+Sa.call(this,Ja,xa)]):Xr.length&&(za(),Xr=[]);return Xr.length&&za(),Gr.length?Gr.join(""):null}return zt.x=function(_r){return arguments.length?(De=_r,zt):De},zt.y=function(_r){return arguments.length?(et=_r,zt):et},zt.defined=function(_r){return arguments.length?(dt=_r,zt):dt},zt.interpolate=function(_r){return arguments.length?(typeof _r=="function"?Tt=yt=_r:Tt=(yt=lc.get(_r)||Yu).key,zt):Tt},zt.tension=function(_r){return arguments.length?(tr=_r,zt):tr},zt}d.svg.line=function(){return Dc(F)};var lc=d.map({linear:Yu,"linear-closed":Fe,step:I,"step-before":ie,"step-after":Te,basis:$t,"basis-open":Tr,"basis-closed":Ar,bundle:Kr,cardinal:ht,"cardinal-open":Me,"cardinal-closed":ze,monotone:lr});lc.forEach(function(me,De){De.key=me,De.closed=/-closed$/.test(me)});function Yu(me){return me.length>1?me.join("L"):me+"Z"}function Fe(me){return me.join("L")+"Z"}function I(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De<et;)yt.push("H",(dt[0]+(dt=me[De])[0])/2,"V",dt[1]);return et>1&&yt.push("H",dt[0]),yt.join("")}function ie(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De<et;)yt.push("V",(dt=me[De])[1],"H",dt[0]);return yt.join("")}function Te(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De<et;)yt.push("H",(dt=me[De])[0],"V",dt[1]);return yt.join("")}function Me(me,De){return me.length<4?Yu(me):me[1]+wt(me.slice(1,-1),Ot(me,De))}function ze(me,De){return me.length<3?Fe(me):me[0]+wt((me.push(me[0]),me),Ot([me[me.length-2]].concat(me,[me[1]]),De))}function ht(me,De){return me.length<3?Yu(me):me[0]+wt(me,Ot(me,De))}function wt(me,De){if(De.length<1||me.length!=De.length&&me.length!=De.length+2)return Yu(me);var et=me.length!=De.length,dt="",yt=me[0],Tt=me[1],tr=De[0],zt=tr,_r=1;if(et&&(dt+="Q"+(Tt[0]-tr[0]*2/3)+","+(Tt[1]-tr[1]*2/3)+","+Tt[0]+","+Tt[1],yt=me[1],_r=2),De.length>1){zt=De[1],Tt=me[_r],_r++,dt+="C"+(yt[0]+tr[0])+","+(yt[1]+tr[1])+","+(Tt[0]-zt[0])+","+(Tt[1]-zt[1])+","+Tt[0]+","+Tt[1];for(var Gr=2;Gr<De.length;Gr++,_r++)Tt=me[_r],zt=De[Gr],dt+="S"+(Tt[0]-zt[0])+","+(Tt[1]-zt[1])+","+Tt[0]+","+Tt[1]}if(et){var Xr=me[_r];dt+="Q"+(Tt[0]+zt[0]*2/3)+","+(Tt[1]+zt[1]*2/3)+","+Xr[0]+","+Xr[1]}return dt}function Ot(me,De){for(var et=[],dt=(1-De)/2,yt,Tt=me[0],tr=me[1],zt=1,_r=me.length;++zt<_r;)yt=Tt,Tt=tr,tr=me[zt],et.push([dt*(tr[0]-yt[0]),dt*(tr[1]-yt[1])]);return et}function $t(me){if(me.length<3)return Yu(me);var De=1,et=me.length,dt=me[0],yt=dt[0],Tt=dt[1],tr=[yt,yt,yt,(dt=me[1])[0]],zt=[Tt,Tt,Tt,dt[1]],_r=[yt,",",Tt,"L",na(ot,tr),",",na(ot,zt)];for(me.push(me[et-1]);++De<=et;)dt=me[De],tr.shift(),tr.push(dt[0]),zt.shift(),zt.push(dt[1]),pt(_r,tr,zt);return me.pop(),_r.push("L",dt),_r.join("")}function Tr(me){if(me.length<4)return Yu(me);for(var De=[],et=-1,dt=me.length,yt,Tt=[0],tr=[0];++et<3;)yt=me[et],Tt.push(yt[0]),tr.push(yt[1]);for(De.push(na(ot,Tt)+","+na(ot,tr)),--et;++et<dt;)yt=me[et],Tt.shift(),Tt.push(yt[0]),tr.shift(),tr.push(yt[1]),pt(De,Tt,tr);return De.join("")}function Ar(me){for(var De,et=-1,dt=me.length,yt=dt+4,Tt,tr=[],zt=[];++et<4;)Tt=me[et%dt],tr.push(Tt[0]),zt.push(Tt[1]);for(De=[na(ot,tr),",",na(ot,zt)],--et;++et<yt;)Tt=me[et%dt],tr.shift(),tr.push(Tt[0]),zt.shift(),zt.push(Tt[1]),pt(De,tr,zt);return De.join("")}function Kr(me,De){var et=me.length-1;if(et)for(var dt=me[0][0],yt=me[0][1],Tt=me[et][0]-dt,tr=me[et][1]-yt,zt=-1,_r,Gr;++zt<=et;)_r=me[zt],Gr=zt/et,_r[0]=De*_r[0]+(1-De)*(dt+Gr*Tt),_r[1]=De*_r[1]+(1-De)*(yt+Gr*tr);return $t(me)}function na(me,De){return me[0]*De[0]+me[1]*De[1]+me[2]*De[2]+me[3]*De[3]}var Ve=[0,2/3,1/3,0],$e=[0,1/3,2/3,0],ot=[0,1/6,2/3,1/6];function pt(me,De,et){me.push("C",na(Ve,De),",",na(Ve,et),",",na($e,De),",",na($e,et),",",na(ot,De),",",na(ot,et))}function Et(me,De){return(De[1]-me[1])/(De[0]-me[0])}function bt(me){for(var De=0,et=me.length-1,dt=[],yt=me[0],Tt=me[1],tr=dt[0]=Et(yt,Tt);++De<et;)dt[De]=(tr+(tr=Et(yt=Tt,Tt=me[De+1])))/2;return dt[De]=tr,dt}function Rt(me){for(var De=[],et,dt,yt,Tt,tr=bt(me),zt=-1,_r=me.length-1;++zt<_r;)et=Et(me[zt],me[zt+1]),l(et)<Je?tr[zt]=tr[zt+1]=0:(dt=tr[zt]/et,yt=tr[zt+1]/et,Tt=dt*dt+yt*yt,Tt>9&&(Tt=et*3/Math.sqrt(Tt),tr[zt]=Tt*dt,tr[zt+1]=Tt*yt));for(zt=-1;++zt<=_r;)Tt=(me[Math.min(_r,zt+1)][0]-me[Math.max(0,zt-1)][0])/(6*(1+tr[zt]*tr[zt])),De.push([Tt||0,tr[zt]*Tt||0]);return De}function lr(me){return me.length<3?Yu(me):me[0]+wt(me,Rt(me))}d.svg.line.radial=function(){var me=Dc(yr);return me.radius=me.x,delete me.x,me.angle=me.y,delete me.y,me};function yr(me){for(var De,et=-1,dt=me.length,yt,Tt;++et<dt;)De=me[et],yt=De[0],Tt=De[1]-st,De[0]=yt*Math.cos(Tt),De[1]=yt*Math.sin(Tt);return me}function kr(me){var De=xo,et=xo,dt=0,yt=Co,Tt=zo,tr=Yu,zt=tr.key,_r=tr,Gr="L",Xr=.7;function xa(pa){var Ja=[],ti=[],Sa=[],za=-1,Xa=pa.length,fi,ni=Or(De),La=Or(dt),sn=De===et?function(){return dn}:Or(et),rn=dt===yt?function(){return In}:Or(yt),dn,In;function Kn(){Ja.push("M",tr(me(Sa),Xr),Gr,_r(me(ti.reverse()),Xr),"Z")}for(;++za<Xa;)Tt.call(this,fi=pa[za],za)?(ti.push([dn=+ni.call(this,fi,za),In=+La.call(this,fi,za)]),Sa.push([+sn.call(this,fi,za),+rn.call(this,fi,za)])):ti.length&&(Kn(),ti=[],Sa=[]);return ti.length&&Kn(),Ja.length?Ja.join(""):null}return xa.x=function(pa){return arguments.length?(De=et=pa,xa):et},xa.x0=function(pa){return arguments.length?(De=pa,xa):De},xa.x1=function(pa){return arguments.length?(et=pa,xa):et},xa.y=function(pa){return arguments.length?(dt=yt=pa,xa):yt},xa.y0=function(pa){return arguments.length?(dt=pa,xa):dt},xa.y1=function(pa){return arguments.length?(yt=pa,xa):yt},xa.defined=function(pa){return arguments.length?(Tt=pa,xa):Tt},xa.interpolate=function(pa){return arguments.length?(typeof pa=="function"?zt=tr=pa:zt=(tr=lc.get(pa)||Yu).key,_r=tr.reverse||tr,Gr=tr.closed?"M":"L",xa):zt},xa.tension=function(pa){return arguments.length?(Xr=pa,xa):Xr},xa}ie.reverse=Te,Te.reverse=ie,d.svg.area=function(){return kr(F)},d.svg.area.radial=function(){var me=kr(yr);return me.radius=me.x,delete me.x,me.innerRadius=me.x0,delete me.x0,me.outerRadius=me.x1,delete me.x1,me.angle=me.y,delete me.y,me.startAngle=me.y0,delete me.y0,me.endAngle=me.y1,delete me.y1,me};function jr(me){return me.source}function Qr(me){return me.target}d.svg.chord=function(){var me=jr,De=Qr,et=ha,dt=bu,yt=Rc;function Tt(Xr,xa){var pa=tr(this,me,Xr,xa),Ja=tr(this,De,Xr,xa);return"M"+pa.p0+_r(pa.r,pa.p1,pa.a1-pa.a0)+(zt(pa,Ja)?Gr(pa.r,pa.p1,pa.r,pa.p0):Gr(pa.r,pa.p1,Ja.r,Ja.p0)+_r(Ja.r,Ja.p1,Ja.a1-Ja.a0)+Gr(Ja.r,Ja.p1,pa.r,pa.p0))+"Z"}function tr(Xr,xa,pa,Ja){var ti=xa.call(Xr,pa,Ja),Sa=et.call(Xr,ti,Ja),za=dt.call(Xr,ti,Ja)-st,Xa=yt.call(Xr,ti,Ja)-st;return{r:Sa,a0:za,a1:Xa,p0:[Sa*Math.cos(za),Sa*Math.sin(za)],p1:[Sa*Math.cos(Xa),Sa*Math.sin(Xa)]}}function zt(Xr,xa){return Xr.a0==xa.a0&&Xr.a1==xa.a1}function _r(Xr,xa,pa){return"A"+Xr+","+Xr+" 0 "+ +(pa>Le)+",1 "+xa}function Gr(Xr,xa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Or(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Or(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Or(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Or(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Or(Xr),Tt):yt},Tt};function ha(me){return me.radius}d.svg.diagonal=function(){var me=jr,De=Qr,et=Aa;function dt(yt,Tt){var tr=me.call(this,yt,Tt),zt=De.call(this,yt,Tt),_r=(tr.y+zt.y)/2,Gr=[tr,{x:tr.x,y:_r},{x:zt.x,y:_r},zt];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return dt.source=function(yt){return arguments.length?(me=Or(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Or(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}d.svg.diagonal.radial=function(){var me=d.svg.diagonal(),De=Aa,et=me.projection;return me.projection=function(dt){return arguments.length?et(Da(De=dt)):De},me};function Da(me){return function(){var De=me.apply(this,arguments),et=De[0],dt=De[1]-st;return[et*Math.cos(dt),et*Math.sin(dt)]}}d.svg.symbol=function(){var me=Vi,De=ci;function et(dt,yt){return(on.get(me.call(this,dt,yt))||ji)(De.call(this,dt,yt))}return et.type=function(dt){return arguments.length?(me=Or(dt),et):me},et.size=function(dt){return arguments.length?(De=Or(dt),et):De},et};function ci(){return 64}function Vi(){return"circle"}function ji(me){var De=Math.sqrt(me/Le);return"M0,"+De+"A"+De+","+De+" 0 1,1 0,"+-De+"A"+De+","+De+" 0 1,1 0,"+De+"Z"}var on=d.map({circle:ji,cross:function(me){var De=Math.sqrt(me/5)/2;return"M"+-3*De+","+-De+"H"+-De+"V"+-3*De+"H"+De+"V"+-De+"H"+3*De+"V"+De+"H"+De+"V"+3*De+"H"+-De+"V"+De+"H"+-3*De+"Z"},diamond:function(me){var De=Math.sqrt(me/(2*Yn)),et=De*Yn;return"M0,"+-De+"L"+et+",0 0,"+De+" "+-et+",0Z"},square:function(me){var De=Math.sqrt(me)/2;return"M"+-De+","+-De+"L"+De+","+-De+" "+De+","+De+" "+-De+","+De+"Z"},"triangle-down":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});d.svg.symbolTypes=on.keys();var An=Math.sqrt(3),Yn=Math.tan(30*ut);ae.transition=function(me){for(var De=hs||++Zo,et=$o(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:jl,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,xa=Gr.length;++Xr<xa;)(Tt=Gr[Xr])&&Il(Tt,Xr,et,De,tr),yt.push(Tt)}return os(dt,et,De)},ae.interrupt=function(me){return this.each(me==null?Nn:wo($o(me)))};var Nn=wo($o());function wo(me){return function(){var De,et,dt;(De=this[me])&&(dt=De[et=De.active])&&(dt.timer.c=null,dt.timer.t=NaN,--De.count?delete De[et]:delete this[me],De.active+=.5,dt.event&&dt.event.interrupt.call(this,this.__data__,dt.index))}}function os(me,De,et){return G(me,So),me.namespace=De,me.id=et,me}var So=[],Zo=0,hs,ul;So.call=ae.call,So.empty=ae.empty,So.node=ae.node,So.size=ae.size,d.transition=function(me,De){return me&&me.transition?hs?me.transition(De):me:d.selection().transition(me)},d.transition.prototype=So,So.select=function(me){var De=this.id,et=this.namespace,dt=[],yt,Tt,tr;me=j(me);for(var zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,xa=Gr.length;++Xr<xa;)(tr=Gr[Xr])&&(Tt=me.call(tr,tr.__data__,Xr,zt))?("__data__"in tr&&(Tt.__data__=tr.__data__),Il(Tt,Xr,et,De,tr[et][De]),yt.push(Tt)):yt.push(null)}return os(dt,et,De)},So.selectAll=function(me){var De=this.id,et=this.namespace,dt=[],yt,Tt,tr,zt,_r;me=Q(me);for(var Gr=-1,Xr=this.length;++Gr<Xr;)for(var xa=this[Gr],pa=-1,Ja=xa.length;++pa<Ja;)if(tr=xa[pa]){_r=tr[et][De],Tt=me.call(tr,tr.__data__,pa,Gr),dt.push(yt=[]);for(var ti=-1,Sa=Tt.length;++ti<Sa;)(zt=Tt[ti])&&Il(zt,ti,et,De,_r),yt.push(zt)}return os(dt,et,De)},So.filter=function(me){var De=[],et,dt,yt;typeof me!="function"&&(me=ne(me));for(var Tt=0,tr=this.length;Tt<tr;Tt++){De.push(et=[]);for(var dt=this[Tt],zt=0,_r=dt.length;zt<_r;zt++)(yt=dt[zt])&&me.call(yt,yt.__data__,zt,Tt)&&et.push(yt)}return os(De,this.namespace,this.id)},So.tween=function(me,De){var et=this.id,dt=this.namespace;return arguments.length<2?this.node()[dt][et].tween.get(me):Ye(this,De==null?function(yt){yt[dt][et].tween.remove(me)}:function(yt){yt[dt][et].tween.set(me,De)})};function tl(me,De,et,dt){var yt=me.id,Tt=me.namespace;return Ye(me,typeof et=="function"?function(tr,zt,_r){tr[Tt][yt].tween.set(De,dt(et.call(tr,tr.__data__,zt,_r)))}:(et=dt(et),function(tr){tr[Tt][yt].tween.set(De,et)}))}So.attr=function(me,De){if(arguments.length<2){for(De in me)this.attr(De,me[De]);return this}var et=me=="transform"?Zc:Ul,dt=d.ns.qualify(me);function yt(){this.removeAttribute(dt)}function Tt(){this.removeAttributeNS(dt.space,dt.local)}function tr(_r){return _r==null?yt:(_r+="",function(){var Gr=this.getAttribute(dt),Xr;return Gr!==_r&&(Xr=et(Gr,_r),function(xa){this.setAttribute(dt,Xr(xa))})})}function zt(_r){return _r==null?Tt:(_r+="",function(){var Gr=this.getAttributeNS(dt.space,dt.local),Xr;return Gr!==_r&&(Xr=et(Gr,_r),function(xa){this.setAttributeNS(dt.space,dt.local,Xr(xa))})})}return tl(this,"attr."+me,De,dt.local?zt:tr)},So.attrTween=function(me,De){var et=d.ns.qualify(me);function dt(Tt,tr){var zt=De.call(this,Tt,tr,this.getAttribute(et));return zt&&function(_r){this.setAttribute(et,zt(_r))}}function yt(Tt,tr){var zt=De.call(this,Tt,tr,this.getAttributeNS(et.space,et.local));return zt&&function(_r){this.setAttributeNS(et.space,et.local,zt(_r))}}return this.tween("attr."+me,et.local?yt:dt)},So.style=function(me,De,et){var dt=arguments.length;if(dt<3){if(typeof me!="string"){dt<2&&(De="");for(et in me)this.style(et,me[et],De);return this}et=""}function yt(){this.style.removeProperty(me)}function Tt(tr){return tr==null?yt:(tr+="",function(){var zt=t(this).getComputedStyle(this,null).getPropertyValue(me),_r;return zt!==tr&&(_r=Ul(zt,tr),function(Gr){this.style.setProperty(me,_r(Gr),et)})})}return tl(this,"style."+me,De,Tt)},So.styleTween=function(me,De,et){arguments.length<3&&(et="");function dt(yt,Tt){var tr=De.call(this,yt,Tt,t(this).getComputedStyle(this,null).getPropertyValue(me));return tr&&function(zt){this.style.setProperty(me,tr(zt),et)}}return this.tween("style."+me,dt)},So.text=function(me){return tl(this,"text",me,Jo)};function Jo(me){return me==null&&(me=""),function(){this.textContent=me}}So.remove=function(){var me=this.namespace;return this.each("end.transition",function(){var De;this[me].count<2&&(De=this.parentNode)&&De.removeChild(this)})},So.ease=function(me){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].ease:(typeof me!="function"&&(me=d.ease.apply(d,arguments)),Ye(this,function(dt){dt[et][De].ease=me}))},So.delay=function(me){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].delay:Ye(this,typeof me=="function"?function(dt,yt,Tt){dt[et][De].delay=+me.call(dt,dt.__data__,yt,Tt)}:(me=+me,function(dt){dt[et][De].delay=me}))},So.duration=function(me){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].duration:Ye(this,typeof me=="function"?function(dt,yt,Tt){dt[et][De].duration=Math.max(1,me.call(dt,dt.__data__,yt,Tt))}:(me=Math.max(1,me),function(dt){dt[et][De].duration=me}))},So.each=function(me,De){var et=this.id,dt=this.namespace;if(arguments.length<2){var yt=ul,Tt=hs;try{hs=et,Ye(this,function(tr,zt,_r){ul=tr[dt][et],me.call(tr,tr.__data__,zt,_r)})}finally{ul=yt,hs=Tt}}else Ye(this,function(tr){var zt=tr[dt][et];(zt.event||(zt.event=d.dispatch("start","end","interrupt"))).on(me,De)});return this},So.transition=function(){for(var me=this.id,De=++Zo,et=this.namespace,dt=[],yt,Tt,tr,zt,_r=0,Gr=this.length;_r<Gr;_r++){dt.push(yt=[]);for(var Tt=this[_r],Xr=0,xa=Tt.length;Xr<xa;Xr++)(tr=Tt[Xr])&&(zt=tr[et][me],Il(tr,Xr,et,De,{time:zt.time,ease:zt.ease,delay:zt.delay+zt.duration,duration:zt.duration})),yt.push(tr)}return os(dt,et,De)};function $o(me){return me==null?"__transition__":"__transition_"+me+"__"}function Il(me,De,et,dt,yt){var Tt=me[et]||(me[et]={active:0,count:0}),tr=Tt[dt],zt,_r,Gr,Xr,xa;function pa(Sa){var za=tr.delay;if(_r.t=za+zt,za<=Sa)return Ja(Sa-za);_r.c=Ja}function Ja(Sa){var za=Tt.active,Xa=Tt[za];Xa&&(Xa.timer.c=null,Xa.timer.t=NaN,--Tt.count,delete Tt[za],Xa.event&&Xa.event.interrupt.call(me,me.__data__,Xa.index));for(var fi in Tt)if(+fi<dt){var ni=Tt[fi];ni.timer.c=null,ni.timer.t=NaN,--Tt.count,delete Tt[fi]}_r.c=ti,Ln(function(){return _r.c&&ti(Sa||1)&&(_r.c=null,_r.t=NaN),1},0,zt),Tt.active=dt,tr.event&&tr.event.start.call(me,me.__data__,De),xa=[],tr.tween.forEach(function(La,sn){(sn=sn.call(me,me.__data__,De))&&xa.push(sn)}),Xr=tr.ease,Gr=tr.duration}function ti(Sa){for(var za=Sa/Gr,Xa=Xr(za),fi=xa.length;fi>0;)xa[--fi].call(me,Xa);if(za>=1)return tr.event&&tr.event.end.call(me,me.__data__,De),--Tt.count?delete Tt[dt]:delete me[et],1}tr||(zt=yt.time,_r=Ln(pa,0,zt),tr=Tt[dt]={tween:new A,time:zt,timer:_r,delay:yt.delay,duration:yt.duration,ease:yt.ease,index:De},yt=null,++Tt.count)}d.svg.axis=function(){var me=d.scale.linear(),De=eu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=d.select(this),xa=this.__chart__||me,pa=this.__chart__=me.copy(),Ja=tr??(pa.ticks?pa.ticks.apply(pa,Tt):pa.domain()),ti=zt??(pa.tickFormat?pa.tickFormat.apply(pa,Tt):F),Sa=Xr.selectAll(".tick").data(Ja,pa),za=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),Xa=d.transition(Sa.exit()).style("opacity",Je).remove(),fi=d.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+yt,La,sn=Qi(pa),rn=Xr.selectAll(".domain").data([0]),dn=(rn.enter().append("path").attr("class","domain"),d.transition(rn));za.append("line"),za.append("text");var In=za.select("line"),Kn=fi.select("line"),ro=Sa.select("text").text(ti),Yo=za.select("text"),oo=fi.select("text"),Wo=De==="top"||De==="left"?-1:1,cl,al,xl,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",xl="y",al="x2",mn="y2",ro.attr("dy",Wo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Wo*dt+"V0H"+sn[1]+"V"+Wo*dt)):(La=Tl,cl="y",xl="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Wo<0?"end":"start"),dn.attr("d","M"+Wo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Wo*dt)),In.attr(mn,Wo*et),Yo.attr(xl,Wo*ni),Kn.attr(al,0).attr(mn,Wo*et),oo.attr(cl,0).attr(xl,Wo*ni),pa.rangeBand){var po=pa,cs=po.rangeBand()/2;xa=pa=function(vs){return po(vs)+cs}}else xa.rangeBand?xa=pa:Xa.call(La,pa,xa);za.call(La,xa,pa),fi.call(La,pa,pa)})}return _r.scale=function(Gr){return arguments.length?(me=Gr,_r):me},_r.orient=function(Gr){return arguments.length?(De=Gr in Ru?Gr+"":eu,_r):De},_r.ticks=function(){return arguments.length?(Tt=S(arguments),_r):Tt},_r.tickValues=function(Gr){return arguments.length?(tr=Gr,_r):tr},_r.tickFormat=function(Gr){return arguments.length?(zt=Gr,_r):zt},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,dt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(dt=+Gr,_r):dt},_r.tickPadding=function(Gr){return arguments.length?(yt=+Gr,_r):yt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var eu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate("+(isFinite(yt)?yt:et(dt))+",0)"})}function Tl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}d.svg.brush=function(){var me=ce(Xr,"brushstart","brush","brushend"),De=null,et=null,dt=[0,0],yt=[0,0],Tt,tr,zt=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var za=d.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ti).on("touchstart.brush",ti),Xa=za.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),za.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=za.selectAll(".resize").data(Gr,F);fi.exit().remove(),fi.enter().append("g").attr("class",function(rn){return"resize "+rn}).style("cursor",function(rn){return cu[rn]}).append("rect").attr("x",function(rn){return/[ew]$/.test(rn)?-3:null}).attr("y",function(rn){return/^[ns]/.test(rn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),fi.style("display",Xr.empty()?"none":null);var ni=d.transition(za),La=d.transition(Xa),sn;De&&(sn=Qi(De),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),pa(ni)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(ni)),xa(ni)})}Xr.event=function(Sa){Sa.each(function(){var za=me.of(this,arguments),Xa={x:dt,y:yt,i:Tt,j:tr},fi=this.__chart__||Xa;this.__chart__=Xa,hs?d.select(this).transition().each("start.brush",function(){Tt=fi.i,tr=fi.j,dt=fi.x,yt=fi.y,za({type:"brushstart"})}).tween("brush:brush",function(){var ni=qu(dt,Xa.x),La=qu(yt,Xa.y);return Tt=tr=null,function(sn){dt=Xa.x=ni(sn),yt=Xa.y=La(sn),za({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Xa.i,tr=Xa.j,za({type:"brush",mode:"resize"}),za({type:"brushend"})}):(za({type:"brushstart"}),za({type:"brush",mode:"resize"}),za({type:"brushend"}))})};function xa(Sa){Sa.selectAll(".resize").attr("transform",function(za){return"translate("+dt[+/e$/.test(za)]+","+yt[+/^s/.test(za)]+")"})}function pa(Sa){Sa.select(".extent").attr("x",dt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",dt[1]-dt[0])}function Ja(Sa){Sa.select(".extent").attr("y",yt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",yt[1]-yt[0])}function ti(){var Sa=this,za=d.select(d.event.target),Xa=me.of(Sa,arguments),fi=d.select(Sa),ni=za.datum(),La=!/^(n|s)$/.test(ni)&&De,sn=!/^(e|w)$/.test(ni)&&et,rn=za.classed("extent"),dn=Er(Sa),In,Kn=d.mouse(Sa),ro,Yo=d.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(d.event.changedTouches?Yo.on("touchmove.brush",xl).on("touchend.brush",po):Yo.on("mousemove.brush",xl).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),rn)Kn[0]=dt[0]-Kn[0],Kn[1]=yt[0]-Kn[1];else if(ni){var oo=+/w$/.test(ni),Wo=+/^n/.test(ni);ro=[dt[1-oo]-Kn[0],yt[1-Wo]-Kn[1]],Kn[0]=dt[oo],Kn[1]=yt[Wo]}else d.event.altKey&&(In=Kn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),d.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),xl();function cl(){d.event.keyCode==32&&(rn||(In=null,Kn[0]-=dt[1],Kn[1]-=yt[1],rn=2),$())}function al(){d.event.keyCode==32&&rn==2&&(Kn[0]+=dt[1],Kn[1]+=yt[1],rn=0,$())}function xl(){var cs=d.mouse(Sa),vs=!1;ro&&(cs[0]+=ro[0],cs[1]+=ro[1]),rn||(d.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Kn[0]=dt[+(cs[0]<In[0])],Kn[1]=yt[+(cs[1]<In[1])]):In=null),La&&mn(cs,De,0)&&(pa(fi),vs=!0),sn&&mn(cs,et,1)&&(Ja(fi),vs=!0),vs&&(xa(fi),Xa({type:"brush",mode:rn?"move":"resize"}))}function mn(cs,vs,Al){var Hl=Qi(vs),Su=Hl[0],Rl=Hl[1],_c=Kn[Al],it=Al?yt:dt,Zt=it[1]-it[0],cr,oa;if(rn&&(Su-=_c,Rl-=Zt+_c),cr=(Al?_r:zt)?Math.max(Su,Math.min(Rl,cs[Al])):cs[Al],rn?oa=(cr+=_c)+Zt:(In&&(_c=Math.max(Su,Math.min(Rl,2*In[Al]-cr))),_c<cr?(oa=cr,cr=_c):oa=_c),it[0]!=cr||it[1]!=oa)return Al?tr=null:Tt=null,it[0]=cr,it[1]=oa,!0}function po(){xl(),fi.style("pointer-events","all").selectAll(".resize").style("display",Xr.empty()?"none":null),d.select("body").style("cursor",null),Yo.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),dn(),Xa({type:"brushend"})}}return Xr.x=function(Sa){return arguments.length?(De=Sa,Gr=uc[!De<<1|!et],Xr):De},Xr.y=function(Sa){return arguments.length?(et=Sa,Gr=uc[!De<<1|!et],Xr):et},Xr.clamp=function(Sa){return arguments.length?(De&&et?(zt=!!Sa[0],_r=!!Sa[1]):De?zt=!!Sa:et&&(_r=!!Sa),Xr):De&&et?[zt,_r]:De?zt:et?_r:null},Xr.extent=function(Sa){var za,Xa,fi,ni,La;return arguments.length?(De&&(za=Sa[0],Xa=Sa[1],et&&(za=za[0],Xa=Xa[0]),Tt=[za,Xa],De.invert&&(za=De(za),Xa=De(Xa)),Xa<za&&(La=za,za=Xa,Xa=La),(za!=dt[0]||Xa!=dt[1])&&(dt=[za,Xa])),et&&(fi=Sa[0],ni=Sa[1],De&&(fi=fi[1],ni=ni[1]),tr=[fi,ni],et.invert&&(fi=et(fi),ni=et(ni)),ni<fi&&(La=fi,fi=ni,ni=La),(fi!=yt[0]||ni!=yt[1])&&(yt=[fi,ni])),Xr):(De&&(Tt?(za=Tt[0],Xa=Tt[1]):(za=dt[0],Xa=dt[1],De.invert&&(za=De.invert(za),Xa=De.invert(Xa)),Xa<za&&(La=za,za=Xa,Xa=La))),et&&(tr?(fi=tr[0],ni=tr[1]):(fi=yt[0],ni=yt[1],et.invert&&(fi=et.invert(fi),ni=et.invert(ni)),ni<fi&&(La=fi,fi=ni,ni=La))),De&&et?[[za,fi],[Xa,ni]]:De?[za,Xa]:et&&[fi,ni])},Xr.clear=function(){return Xr.empty()||(dt=[0,0],yt=[0,0],Tt=tr=null),Xr},Xr.empty=function(){return!!De&&dt[0]==dt[1]||!!et&&yt[0]==yt[1]},d.rebind(Xr,me,"on")};var cu={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},uc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d.text=ba(function(me){return me.responseText}),d.json=function(me,De){return Pa(me,"application/json",Vl,De)};function Vl(me){return JSON.parse(me.responseText)}d.html=function(me,De){return Pa(me,"text/html",Gl,De)};function Gl(me){var De=E.createRange();return De.selectNode(E.body),De.createContextualFragment(me.responseText)}d.xml=ba(function(me){return me.responseXML}),typeof V=="object"&&V.exports?V.exports=d:this.d3=d}).apply(self)}}),dd=He({"node_modules/d3-time/dist/d3-time.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=new Date,S=new Date;function E(ne,Ce,Ye,rt){function Ke(Mt){return ne(Mt=arguments.length===0?new Date:new Date(+Mt)),Mt}return Ke.floor=function(Mt){return ne(Mt=new Date(+Mt)),Mt},Ke.ceil=function(Mt){return ne(Mt=new Date(Mt-1)),Ce(Mt,1),ne(Mt),Mt},Ke.round=function(Mt){var kt=Ke(Mt),Nt=Ke.ceil(Mt);return Mt-kt<Nt-Mt?kt:Nt},Ke.offset=function(Mt,kt){return Ce(Mt=new Date(+Mt),kt==null?1:Math.floor(kt)),Mt},Ke.range=function(Mt,kt,Nt){var Gt=[],Mr;if(Mt=Ke.ceil(Mt),Nt=Nt==null?1:Math.floor(Nt),!(Mt<kt)||!(Nt>0))return Gt;do Gt.push(Mr=new Date(+Mt)),Ce(Mt,Nt),ne(Mt);while(Mr<Mt&&Mt<kt);return Gt},Ke.filter=function(Mt){return E(function(kt){if(kt>=kt)for(;ne(kt),!Mt(kt);)kt.setTime(kt-1)},function(kt,Nt){if(kt>=kt)if(Nt<0)for(;++Nt<=0;)for(;Ce(kt,-1),!Mt(kt););else for(;--Nt>=0;)for(;Ce(kt,1),!Mt(kt););})},Ye&&(Ke.count=function(Mt,kt){return x.setTime(+Mt),S.setTime(+kt),ne(x),ne(S),Math.floor(Ye(x,S))},Ke.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?Ke.filter(rt?function(kt){return rt(kt)%Mt===0}:function(kt){return Ke.count(0,kt)%Mt===0}):Ke}),Ke}var e=E(function(){},function(ne,Ce){ne.setTime(+ne+Ce)},function(ne,Ce){return Ce-ne});e.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?E(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ye){Ce.setTime(+Ce+Ye*ne)},function(Ce,Ye){return(Ye-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,n=864e5,i=6048e5,s=E(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Ce){ne.setTime(+ne+Ce*r)},function(ne,Ce){return(Ce-ne)/r},function(ne){return ne.getUTCSeconds()}),h=s.range,f=E(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getMinutes()}),v=f.range,c=E(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r-ne.getMinutes()*o)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getHours()}),T=c.range,l=E(function(ne){ne.setHours(0,0,0,0)},function(ne,Ce){ne.setDate(ne.getDate()+Ce)},function(ne,Ce){return(Ce-ne-(Ce.getTimezoneOffset()-ne.getTimezoneOffset())*o)/n},function(ne){return ne.getDate()-1}),_=l.range;function w(ne){return E(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ye){Ce.setDate(Ce.getDate()+Ye*7)},function(Ce,Ye){return(Ye-Ce-(Ye.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/i})}var A=w(0),M=w(1),g=w(2),b=w(3),p=w(4),u=w(5),y=w(6),m=A.range,R=M.range,L=g.range,z=b.range,F=p.range,N=u.range,O=y.range,P=E(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setMonth(ne.getMonth()+Ce)},function(ne,Ce){return Ce.getMonth()-ne.getMonth()+(Ce.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),U=P.range,B=E(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setFullYear(ne.getFullYear()+Ce)},function(ne,Ce){return Ce.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});B.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:E(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ye){Ce.setFullYear(Ce.getFullYear()+Ye*ne)})};var X=B.range,$=E(function(ne){ne.setUTCSeconds(0,0)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getUTCMinutes()}),le=$.range,ce=E(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getUTCHours()}),de=ce.range,G=E(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/n},function(ne){return ne.getUTCDate()-1}),Y=G.range;function ee(ne){return E(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ye){Ce.setUTCDate(Ce.getUTCDate()+Ye*7)},function(Ce,Ye){return(Ye-Ce)/i})}var q=ee(0),se=ee(1),ae=ee(2),j=ee(3),Q=ee(4),re=ee(5),pe=ee(6),we=q.range,Se=se.range,Ie=ae.range,Re=j.range,We=Q.range,at=re.range,nt=pe.range,tt=E(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCMonth(ne.getUTCMonth()+Ce)},function(ne,Ce){return Ce.getUTCMonth()-ne.getUTCMonth()+(Ce.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),qe=tt.range,he=E(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCFullYear(ne.getUTCFullYear()+Ce)},function(ne,Ce){return Ce.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});he.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:E(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ye){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ye*ne)})};var ue=he.range;d.timeDay=l,d.timeDays=_,d.timeFriday=u,d.timeFridays=N,d.timeHour=c,d.timeHours=T,d.timeInterval=E,d.timeMillisecond=e,d.timeMilliseconds=t,d.timeMinute=f,d.timeMinutes=v,d.timeMonday=M,d.timeMondays=R,d.timeMonth=P,d.timeMonths=U,d.timeSaturday=y,d.timeSaturdays=O,d.timeSecond=s,d.timeSeconds=h,d.timeSunday=A,d.timeSundays=m,d.timeThursday=p,d.timeThursdays=F,d.timeTuesday=g,d.timeTuesdays=L,d.timeWednesday=b,d.timeWednesdays=z,d.timeWeek=A,d.timeWeeks=m,d.timeYear=B,d.timeYears=X,d.utcDay=G,d.utcDays=Y,d.utcFriday=re,d.utcFridays=at,d.utcHour=ce,d.utcHours=de,d.utcMillisecond=e,d.utcMilliseconds=t,d.utcMinute=$,d.utcMinutes=le,d.utcMonday=se,d.utcMondays=Se,d.utcMonth=tt,d.utcMonths=qe,d.utcSaturday=pe,d.utcSaturdays=nt,d.utcSecond=s,d.utcSeconds=h,d.utcSunday=q,d.utcSundays=we,d.utcThursday=Q,d.utcThursdays=We,d.utcTuesday=ae,d.utcTuesdays=Ie,d.utcWednesday=j,d.utcWednesdays=Re,d.utcWeek=q,d.utcWeeks=we,d.utcYear=he,d.utcYears=ue,Object.defineProperty(d,"__esModule",{value:!0})})}}),Xv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,dd()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function S(Oe){if(0<=Oe.y&&Oe.y<100){var Je=new Date(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L);return Je.setFullYear(Oe.y),Je}return new Date(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L)}function E(Oe){if(0<=Oe.y&&Oe.y<100){var Je=new Date(Date.UTC(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L));return Je.setUTCFullYear(Oe.y),Je}return new Date(Date.UTC(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L))}function e(Oe,Je,Ae){return{y:Oe,m:Je,d:Ae,H:0,M:0,S:0,L:0}}function t(Oe){var Je=Oe.dateTime,Ae=Oe.date,Le=Oe.time,Ue=Oe.periods,Ze=Oe.days,st=Oe.shortDays,ut=Oe.months,Ut=Oe.shortMonths,Ct=h(Ue),Pt=f(Ue),jt=h(Ze),fr=f(Ze),ur=h(st),sr=f(st),Pr=h(ut),Ta=f(ut),Oa=h(Ut),Ia=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:P,e:P,f:le,H:U,I:B,j:X,L:$,m:ce,M:de,p:Ra,q:an,Q:kt,s:Nt,S:G,u:Y,U:ee,V:q,w:se,W:ae,x:null,X:null,y:j,Y:Q,Z:re,"%":Mt},Wa={a:tn,A:fn,b:xt,B:lt,c:null,d:pe,e:pe,f:We,H:we,I:Se,j:Ie,L:Re,m:at,M:nt,p:Br,q:Cr,Q:kt,s:Nt,S:tt,u:qe,U:he,V:ue,w:ne,W:Ce,x:null,X:null,y:Ye,Y:rt,Z:Ke,"%":Mt},Ca={a:Yt,A:Jt,b:Fr,B:ta,c:ra,d:p,e:p,f:z,H:y,I:y,j:u,L,m:b,M:m,p:Dt,q:g,Q:N,s:O,S:R,u:c,U:T,V:l,w:v,W:_,x:ca,X:Ba,y:A,Y:w,Z:M,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Je,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Je,Wa);function hi(xr,Rr){return function(Ur){var Hr=[],gt=-1,Xt=0,vr=xr.length,Or,ba,Pa;for(Ur instanceof Date||(Ur=new Date(+Ur));++gt<vr;)xr.charCodeAt(gt)===37&&(Hr.push(xr.slice(Xt,gt)),(ba=r[Or=xr.charAt(++gt)])!=null?Or=xr.charAt(++gt):ba=Or==="e"?" ":"0",(Pa=Rr[Or])&&(Or=Pa(Ur,ba)),Hr.push(Or),Xt=gt+1);return Hr.push(xr.slice(Xt,gt)),Hr.join("")}}function wi(xr,Rr){return function(Ur){var Hr=e(1900,void 0,1),gt=Kt(Hr,xr,Ur+="",0),Xt,vr;if(gt!=Ur.length)return null;if("Q"in Hr)return new Date(Hr.Q);if("s"in Hr)return new Date(Hr.s*1e3+("L"in Hr?Hr.L:0));if(Rr&&!("Z"in Hr)&&(Hr.Z=0),"p"in Hr&&(Hr.H=Hr.H%12+Hr.p*12),Hr.m===void 0&&(Hr.m="q"in Hr?Hr.q:0),"V"in Hr){if(Hr.V<1||Hr.V>53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Xt=E(e(Hr.y,0,1)),vr=Xt.getUTCDay(),Xt=vr>4||vr===0?x.utcMonday.ceil(Xt):x.utcMonday(Xt),Xt=x.utcDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getUTCFullYear(),Hr.m=Xt.getUTCMonth(),Hr.d=Xt.getUTCDate()+(Hr.w+6)%7):(Xt=S(e(Hr.y,0,1)),vr=Xt.getDay(),Xt=vr>4||vr===0?x.timeMonday.ceil(Xt):x.timeMonday(Xt),Xt=x.timeDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getFullYear(),Hr.m=Xt.getMonth(),Hr.d=Xt.getDate()+(Hr.w+6)%7)}else("W"in Hr||"U"in Hr)&&("w"in Hr||(Hr.w="u"in Hr?Hr.u%7:"W"in Hr?1:0),vr="Z"in Hr?E(e(Hr.y,0,1)).getUTCDay():S(e(Hr.y,0,1)).getDay(),Hr.m=0,Hr.d="W"in Hr?(Hr.w+6)%7+Hr.W*7-(vr+5)%7:Hr.w+Hr.U*7-(vr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,E(Hr)):S(Hr)}}function Kt(xr,Rr,Ur,Hr){for(var gt=0,Xt=Rr.length,vr=Ur.length,Or,ba;gt<Xt;){if(Hr>=vr)return-1;if(Or=Rr.charCodeAt(gt++),Or===37){if(Or=Rr.charAt(gt++),ba=Ca[Or in r?Rr.charAt(gt++):Or],!ba||(Hr=ba(xr,Ur,Hr))<0)return-1}else if(Or!=Ur.charCodeAt(Hr++))return-1}return Hr}function Dt(xr,Rr,Ur){var Hr=Ct.exec(Rr.slice(Ur));return Hr?(xr.p=Pt[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Yt(xr,Rr,Ur){var Hr=ur.exec(Rr.slice(Ur));return Hr?(xr.w=sr[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Jt(xr,Rr,Ur){var Hr=jt.exec(Rr.slice(Ur));return Hr?(xr.w=fr[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Fr(xr,Rr,Ur){var Hr=Oa.exec(Rr.slice(Ur));return Hr?(xr.m=Ia[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ta(xr,Rr,Ur){var Hr=Pr.exec(Rr.slice(Ur));return Hr?(xr.m=Ta[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ra(xr,Rr,Ur){return Kt(xr,Je,Rr,Ur)}function ca(xr,Rr,Ur){return Kt(xr,Ae,Rr,Ur)}function Ba(xr,Rr,Ur){return Kt(xr,Le,Rr,Ur)}function $a(xr){return st[xr.getDay()]}function Za(xr){return Ze[xr.getDay()]}function ri(xr){return Ut[xr.getMonth()]}function pi(xr){return ut[xr.getMonth()]}function Ra(xr){return Ue[+(xr.getHours()>=12)]}function an(xr){return 1+~~(xr.getMonth()/3)}function tn(xr){return st[xr.getUTCDay()]}function fn(xr){return Ze[xr.getUTCDay()]}function xt(xr){return Ut[xr.getUTCMonth()]}function lt(xr){return ut[xr.getUTCMonth()]}function Br(xr){return Ue[+(xr.getUTCHours()>=12)]}function Cr(xr){return 1+~~(xr.getUTCMonth()/3)}return{format:function(xr){var Rr=hi(xr+="",qa);return Rr.toString=function(){return xr},Rr},parse:function(xr){var Rr=wi(xr+="",!1);return Rr.toString=function(){return xr},Rr},utcFormat:function(xr){var Rr=hi(xr+="",Wa);return Rr.toString=function(){return xr},Rr},utcParse:function(xr){var Rr=wi(xr+="",!0);return Rr.toString=function(){return xr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Oe,Je,Ae){var Le=Oe<0?"-":"",Ue=(Le?-Oe:Oe)+"",Ze=Ue.length;return Le+(Ze<Ae?new Array(Ae-Ze+1).join(Je)+Ue:Ue)}function s(Oe){return Oe.replace(n,"\\$&")}function h(Oe){return new RegExp("^(?:"+Oe.map(s).join("|")+")","i")}function f(Oe){for(var Je={},Ae=-1,Le=Oe.length;++Ae<Le;)Je[Oe[Ae].toLowerCase()]=Ae;return Je}function v(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+1));return Le?(Oe.w=+Le[0],Ae+Le[0].length):-1}function c(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+1));return Le?(Oe.u=+Le[0],Ae+Le[0].length):-1}function T(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.U=+Le[0],Ae+Le[0].length):-1}function l(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.V=+Le[0],Ae+Le[0].length):-1}function _(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.W=+Le[0],Ae+Le[0].length):-1}function w(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+4));return Le?(Oe.y=+Le[0],Ae+Le[0].length):-1}function A(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.y=+Le[0]+(+Le[0]>68?1900:2e3),Ae+Le[0].length):-1}function M(Oe,Je,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(Ae,Ae+6));return Le?(Oe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function g(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+1));return Le?(Oe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.m=Le[0]-1,Ae+Le[0].length):-1}function p(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.d=+Le[0],Ae+Le[0].length):-1}function u(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+3));return Le?(Oe.m=0,Oe.d=+Le[0],Ae+Le[0].length):-1}function y(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.H=+Le[0],Ae+Le[0].length):-1}function m(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.M=+Le[0],Ae+Le[0].length):-1}function R(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.S=+Le[0],Ae+Le[0].length):-1}function L(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+3));return Le?(Oe.L=+Le[0],Ae+Le[0].length):-1}function z(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+6));return Le?(Oe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Oe,Je,Ae){var Le=a.exec(Je.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae));return Le?(Oe.Q=+Le[0],Ae+Le[0].length):-1}function O(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae));return Le?(Oe.s=+Le[0],Ae+Le[0].length):-1}function P(Oe,Je){return i(Oe.getDate(),Je,2)}function U(Oe,Je){return i(Oe.getHours(),Je,2)}function B(Oe,Je){return i(Oe.getHours()%12||12,Je,2)}function X(Oe,Je){return i(1+x.timeDay.count(x.timeYear(Oe),Oe),Je,3)}function $(Oe,Je){return i(Oe.getMilliseconds(),Je,3)}function le(Oe,Je){return $(Oe,Je)+"000"}function ce(Oe,Je){return i(Oe.getMonth()+1,Je,2)}function de(Oe,Je){return i(Oe.getMinutes(),Je,2)}function G(Oe,Je){return i(Oe.getSeconds(),Je,2)}function Y(Oe){var Je=Oe.getDay();return Je===0?7:Je}function ee(Oe,Je){return i(x.timeSunday.count(x.timeYear(Oe)-1,Oe),Je,2)}function q(Oe,Je){var Ae=Oe.getDay();return Oe=Ae>=4||Ae===0?x.timeThursday(Oe):x.timeThursday.ceil(Oe),i(x.timeThursday.count(x.timeYear(Oe),Oe)+(x.timeYear(Oe).getDay()===4),Je,2)}function se(Oe){return Oe.getDay()}function ae(Oe,Je){return i(x.timeMonday.count(x.timeYear(Oe)-1,Oe),Je,2)}function j(Oe,Je){return i(Oe.getFullYear()%100,Je,2)}function Q(Oe,Je){return i(Oe.getFullYear()%1e4,Je,4)}function re(Oe){var Je=Oe.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+i(Je/60|0,"0",2)+i(Je%60,"0",2)}function pe(Oe,Je){return i(Oe.getUTCDate(),Je,2)}function we(Oe,Je){return i(Oe.getUTCHours(),Je,2)}function Se(Oe,Je){return i(Oe.getUTCHours()%12||12,Je,2)}function Ie(Oe,Je){return i(1+x.utcDay.count(x.utcYear(Oe),Oe),Je,3)}function Re(Oe,Je){return i(Oe.getUTCMilliseconds(),Je,3)}function We(Oe,Je){return Re(Oe,Je)+"000"}function at(Oe,Je){return i(Oe.getUTCMonth()+1,Je,2)}function nt(Oe,Je){return i(Oe.getUTCMinutes(),Je,2)}function tt(Oe,Je){return i(Oe.getUTCSeconds(),Je,2)}function qe(Oe){var Je=Oe.getUTCDay();return Je===0?7:Je}function he(Oe,Je){return i(x.utcSunday.count(x.utcYear(Oe)-1,Oe),Je,2)}function ue(Oe,Je){var Ae=Oe.getUTCDay();return Oe=Ae>=4||Ae===0?x.utcThursday(Oe):x.utcThursday.ceil(Oe),i(x.utcThursday.count(x.utcYear(Oe),Oe)+(x.utcYear(Oe).getUTCDay()===4),Je,2)}function ne(Oe){return Oe.getUTCDay()}function Ce(Oe,Je){return i(x.utcMonday.count(x.utcYear(Oe)-1,Oe),Je,2)}function Ye(Oe,Je){return i(Oe.getUTCFullYear()%100,Je,2)}function rt(Oe,Je){return i(Oe.getUTCFullYear()%1e4,Je,4)}function Ke(){return"+0000"}function Mt(){return"%"}function kt(Oe){return+Oe}function Nt(Oe){return Math.floor(+Oe/1e3)}var Gt;Mr({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 Mr(Oe){return Gt=t(Oe),d.timeFormat=Gt.format,d.timeParse=Gt.parse,d.utcFormat=Gt.utcFormat,d.utcParse=Gt.utcParse,Gt}var mr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Oe){return Oe.toISOString()}var Er=Date.prototype.toISOString?qr:d.utcFormat(mr);function Ir(Oe){var Je=new Date(Oe);return isNaN(Je)?null:Je}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ir:d.utcParse(mr);d.isoFormat=Er,d.isoParse=_t,d.timeFormatDefaultLocale=Mr,d.timeFormatLocale=t,Object.defineProperty(d,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,p){if((u=(b=p?b.toExponential(p-1):b.toExponential()).indexOf("e"))<0)return null;var u,y=b.slice(0,u);return[y.length>1?y[0]+y.slice(2):y,+b.slice(u+1)]}function E(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,p){return function(u,y){for(var m=u.length,R=[],L=0,z=b[0],F=0;m>0&&z>0&&(F+z+1>y&&(z=Math.max(1,y-F)),R.push(u.substring(m-=z,m+z)),!((F+=z+1)>y));)z=b[L=(L+1)%b.length];return R.reverse().join(p)}}function t(b){return function(p){return p.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(p=r.exec(b)))throw new Error("invalid format: "+b);var p;return new a({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}o.prototype=a.prototype;function a(b){this.fill=b.fill===void 0?" ":b.fill+"",this.align=b.align===void 0?">":b.align+"",this.sign=b.sign===void 0?"-":b.sign+"",this.symbol=b.symbol===void 0?"":b.symbol+"",this.zero=!!b.zero,this.width=b.width===void 0?void 0:+b.width,this.comma=!!b.comma,this.precision=b.precision===void 0?void 0:+b.precision,this.trim=!!b.trim,this.type=b.type===void 0?"":b.type+""}a.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 n(b){e:for(var p=b.length,u=1,y=-1,m;u<p;++u)switch(b[u]){case".":y=m=u;break;case"0":y===0&&(y=u),m=u;break;default:if(!+b[u])break e;y>0&&(y=0);break}return y>0?b.slice(0,y)+b.slice(m+1):b}var i;function s(b,p){var u=S(b,p);if(!u)return b+"";var y=u[0],m=u[1],R=m-(i=Math.max(-8,Math.min(8,Math.floor(m/3)))*3)+1,L=y.length;return R===L?y:R>L?y+new Array(R-L+1).join("0"):R>0?y.slice(0,R)+"."+y.slice(R):"0."+new Array(1-R).join("0")+S(b,Math.max(0,p+R-1))[0]}function h(b,p){var u=S(b,p);if(!u)return b+"";var y=u[0],m=u[1];return m<0?"0."+new Array(-m).join("0")+y:y.length>m+1?y.slice(0,m+1)+"."+y.slice(m+1):y+new Array(m-y.length+2).join("0")}var f={"%":function(b,p){return(b*100).toFixed(p)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:x,e:function(b,p){return b.toExponential(p)},f:function(b,p){return b.toFixed(p)},g:function(b,p){return b.toPrecision(p)},o:function(b){return Math.round(b).toString(8)},p:function(b,p){return h(b*100,p)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function v(b){return b}var c=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var p=b.grouping===void 0||b.thousands===void 0?v:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",y=b.currency===void 0?"":b.currency[1]+"",m=b.decimal===void 0?".":b.decimal+"",R=b.numerals===void 0?v:t(c.call(b.numerals,String)),L=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(P){P=o(P);var U=P.fill,B=P.align,X=P.sign,$=P.symbol,le=P.zero,ce=P.width,de=P.comma,G=P.precision,Y=P.trim,ee=P.type;ee==="n"?(de=!0,ee="g"):f[ee]||(G===void 0&&(G=12),Y=!0,ee="g"),(le||U==="0"&&B==="=")&&(le=!0,U="0",B="=");var q=$==="$"?u:$==="#"&&/[boxX]/.test(ee)?"0"+ee.toLowerCase():"",se=$==="$"?y:/[%p]/.test(ee)?L:"",ae=f[ee],j=/[defgprs%]/.test(ee);G=G===void 0?6:/[gprs]/.test(ee)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function Q(re){var pe=q,we=se,Se,Ie,Re;if(ee==="c")we=ae(re)+we,re="";else{re=+re;var We=re<0||1/re<0;if(re=isNaN(re)?F:ae(Math.abs(re),G),Y&&(re=n(re)),We&&+re==0&&X!=="+"&&(We=!1),pe=(We?X==="("?X:z:X==="-"||X==="("?"":X)+pe,we=(ee==="s"?T[8+i/3]:"")+we+(We&&X==="("?")":""),j){for(Se=-1,Ie=re.length;++Se<Ie;)if(Re=re.charCodeAt(Se),48>Re||Re>57){we=(Re===46?m+re.slice(Se+1):re.slice(Se))+we,re=re.slice(0,Se);break}}}de&&!le&&(re=p(re,1/0));var at=pe.length+re.length+we.length,nt=at<ce?new Array(ce-at+1).join(U):"";switch(de&&le&&(re=p(nt+re,nt.length?ce-we.length:1/0),nt=""),B){case"<":re=pe+re+we+nt;break;case"=":re=pe+nt+re+we;break;case"^":re=nt.slice(0,at=nt.length>>1)+pe+re+we+nt.slice(at);break;default:re=nt+pe+re+we;break}return R(re)}return Q.toString=function(){return P+""},Q}function O(P,U){var B=N((P=o(P),P.type="f",P)),X=Math.max(-8,Math.min(8,Math.floor(E(U)/3)))*3,$=Math.pow(10,-X),le=T[8+X/3];return function(ce){return B($*ce)+le}}return{format:N,formatPrefix:O}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return _=l(b),d.format=_.format,d.formatPrefix=_.formatPrefix,_}function A(b){return Math.max(0,-E(Math.abs(b)))}function M(b,p){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(p)/3)))*3-E(Math.abs(b)))}function g(b,p){return b=Math.abs(b),p=Math.abs(p)-b,Math.max(0,E(p)-E(b))+1}d.FormatSpecifier=a,d.formatDefaultLocale=w,d.formatLocale=l,d.formatSpecifier=o,d.precisionFixed=A,d.precisionPrefix=M,d.precisionRound=g,Object.defineProperty(d,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,V){"use strict";V.exports=function(d){for(var x=d.length,S,E=0;E<x;E++)if(S=d.charCodeAt(E),(S<9||S>13)&&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}}}),as=He({"node_modules/fast-isnumeric/index.js"(Z,V){"use strict";var d=l7();V.exports=function(x){var S=typeof x;if(S==="string"){var E=x;if(x=+x,x===0&&d(E))return!1}else if(S!=="number")return!1;return x-x<1}}}),Ws=He({"src/constants/numerical.js"(Z,V){"use strict";V.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"}}}),KA=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d["base64-arraybuffer"]={}))})(Z,function(d){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E<x.length;E++)S[x.charCodeAt(E)]=E;var e=function(r){var o=new Uint8Array(r),a,n=o.length,i="";for(a=0;a<n;a+=3)i+=x[o[a]>>2],i+=x[(o[a]&3)<<4|o[a+1]>>4],i+=x[(o[a+1]&15)<<2|o[a+2]>>6],i+=x[o[a+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},t=function(r){var o=r.length*.75,a=r.length,n,i=0,s,h,f,v;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(n=0;n<a;n+=4)s=S[r.charCodeAt(n)],h=S[r.charCodeAt(n+1)],f=S[r.charCodeAt(n+2)],v=S[r.charCodeAt(n+3)],T[i++]=s<<2|h>>4,T[i++]=(h&15)<<4|f>>2,T[i++]=(f&3)<<6|v&63;return c};d.decode=t,d.encode=e,Object.defineProperty(d,"__esModule",{value:!0})})}}),Zv=He({"src/lib/is_plain_object.js"(Z,V){"use strict";V.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),bp=He({"src/lib/array.js"(Z){"use strict";var V=KA().decode,d=Zv(),x=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Z.isTypedArray=e;function t(s){return x(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return x(s)||(s=[]),s.length=h,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Z.isArrayBuffer=a,Z.decodeTypedArraySpec=function(s){var h=[],f=n(s),v=f.dtype,c=o[v];if(!c)throw new Error('Error in dtype: "'+v+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=V(l));var _=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");_.reverse();var w=_.length,A,M,g=+_[0],b=T*g,p=0;if(w===1)h=new c(l);else if(w===2)for(A=+_[1],M=0;M<A;M++)h[M]=new c(l,p,g),p+=b;else if(w===3){A=+_[1];for(var u=+_[2],y=0;y<u;y++)for(h[y]=[],M=0;M<A;M++)h[y][M]=new c(l,p,g),p+=b}else throw new Error("ndim: "+w+'is not supported with the shape:"'+f.shape+'"');return h.bdata=f.bdata,h.dtype=f.dtype,h.shape=_.reverse().join(","),s._inputArray=h,h},Z.isTypedArraySpec=function(s){return d(s)&&s.hasOwnProperty("dtype")&&typeof s.dtype=="string"&&s.hasOwnProperty("bdata")&&(typeof s.bdata=="string"||a(s.bdata))&&(s.shape===void 0||s.hasOwnProperty("shape")&&(typeof s.shape=="string"||typeof s.shape=="number"))};function n(s){return{bdata:s.bdata,dtype:s.dtype,shape:s.shape}}Z.concat=function(){var s=[],h=!0,f=0,v,c,T,l,_,w,A,M;for(T=0;T<arguments.length;T++)l=arguments[T],w=l.length,w&&(c?s.push(l):(c=l,_=w),x(l)?v=!1:(h=!1,f?v!==l.constructor&&(v=!1):v=l.constructor),f+=w);if(!f)return[];if(!s.length)return c;if(h)return c.concat.apply(c,s);if(v){for(A=new v(f),A.set(c),T=0;T<s.length;T++)l=s[T],A.set(l,_),_+=l.length;return A}for(A=new Array(f),M=0;M<c.length;M++)A[M]=c[M];for(T=0;T<s.length;T++){for(l=s[T],M=0;M<l.length;M++)A[_+M]=l[M];_+=M}return A},Z.maxRowLength=function(s){return i(s,Math.max,0)},Z.minRowLength=function(s){return i(s,Math.min,1/0)};function i(s,h,f){if(t(s))if(t(s[0])){for(var v=f,c=0;c<s.length;c++)v=h(v,s[c].length);return v}else return s.length;return 0}}}),b_=He({"src/lib/nested_property.js"(Z,V){"use strict";var d=as(),x=bp().isArrayOrTypedArray;V.exports=function(s,h){if(d(h))h=String(h);else if(typeof h!="string"||h.slice(-4)==="[-1]")throw"bad property string";var f=h.split("."),v,c,T,l;for(l=0;l<f.length;l++)if(String(f[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<f.length;){if(v=String(f[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),v){if(v[1])f[l]=v[1];else if(l===0)f.splice(0,1);else throw"bad property string";for(c=v[2].slice(1,-1).split("]["),T=0;T<c.length;T++)l++,f.splice(l,0,Number(c[T]))}l++}return typeof s!="object"?n(s,h,f):{set:t(s,f,h),get:S(s,f),astr:h,parts:f,obj:s}};function S(i,s){return function(h){var f=i,v,c,T,l,_;for(l=0;l<s.length-1;l++){if(v=s[l],v===-1){for(c=!0,T=[],_=0;_<f.length;_++)T[_]=S(f[_],s.slice(l+1))(h),T[_]!==T[0]&&(c=!1);return c?T[0]:T}if(typeof v=="number"&&!x(f)||(f=f[v],typeof f!="object"||f===null))return}if(!(typeof f!="object"||f===null)&&(T=f[s[l]],!(!h&&T===null)))return T}}var E=/(^|\.)args\[/;function e(i,s){return i===void 0||i===null&&!s.match(E)}function t(i,s,h){return function(f){var v=i,c="",T=[[i,c]],l=e(f,h),_,w;for(w=0;w<s.length-1;w++){if(_=s[w],typeof _=="number"&&!x(v))throw"array index but container is not an array";if(_===-1){if(l=!o(v,s.slice(w+1),f,h),l)break;return}if(!a(v,_,s[w+1],l))break;if(v=v[_],typeof v!="object"||v===null)throw"container is not an object";c=r(c,_),T.push([v,c])}if(l){if(w===s.length-1&&(delete v[s[w]],Array.isArray(v)&&+s[w]===v.length-1))for(;v.length&&v[v.length-1]===void 0;)v.pop()}else v[s[w]]=f}}function r(i,s){var h=s;return d(s)?h="["+s+"]":i&&(h="."+s),i+h}function o(i,s,h,f){var v=x(h),c=!0,T=h,l=f.replace("-1",0),_=v?!1:e(h,l),w=s[0],A;for(A=0;A<i.length;A++)l=f.replace("-1",A),v&&(T=h[A%h.length],_=e(T,l)),_&&(c=!1),a(i,A,w,_)&&t(i[A],s,f.replace("-1",A))(T);return c}function a(i,s,h,f){if(i[s]===void 0){if(f)return!1;typeof h=="number"?i[s]=[]:i[s]={}}return!0}function n(i,s,h){return{set:function(){throw"bad container"},get:function(){},astr:s,parts:h,obj:i}}}}),u7=He({"src/lib/keyed_container.js"(Z,V){"use strict";var d=b_(),x=/^\w*$/,S=0,E=1,e=2,t=3,r=4;V.exports=function(a,n,i,s){i=i||"name",s=s||"value";var h,f,v,c={};n&&n.length?(v=d(a,n),f=v.get()):f=a,n=n||"";var T={};if(f)for(h=0;h<f.length;h++)T[f[h][i]]=h;var l=x.test(s),_={set:function(w,A){var M=A===null?r:S;if(!f){if(!v||M===r)return;f=[],v.set(f)}var g=T[w];if(g===void 0){if(M===r)return;M=M|t,g=f.length,T[w]=g}else A!==(l?f[g][s]:d(f[g],s).get())&&(M=M|e);var b=f[g]=f[g]||{};return b[i]=w,l?b[s]=A:d(b,s).set(A),A!==null&&(M=M&~r),c[g]=c[g]|M,_},get:function(w){if(f){var A=T[w];if(A!==void 0)return l?f[A][s]:d(f[A],s).get()}},rename:function(w,A){var M=T[w];return M===void 0||(c[M]=c[M]|E,T[A]=M,delete T[w],f[M][i]=A),_},remove:function(w){var A=T[w];if(A===void 0)return _;var M=f[A];if(Object.keys(M).length>2)return c[A]=c[A]|e,_.set(w,null);if(l){for(h=A;h<f.length;h++)c[h]=c[h]|t;for(h=A;h<f.length;h++)T[f[h][i]]--;f.splice(A,1),delete T[w]}else d(M,s).set(null),c[A]=c[A]|e|r;return _},constructUpdate:function(){for(var w,A,M={},g=Object.keys(c),b=0;b<g.length;b++)A=g[b],w=n+"["+A+"]",f[A]?(c[A]&E&&(M[w+"."+i]=f[A][i]),c[A]&e&&(l?M[w+"."+s]=c[A]&r?null:f[A][s]:M[w+"."+s]=c[A]&r?null:d(f[A],s).get())):M[w]=null;return M}};return _}}}),c7=He({"src/lib/relative_attr.js"(Z,V){"use strict";var d=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,x=/^[^\.\[\]]+$/;V.exports=function(S,E){for(;E;){var e=S.match(d);if(e)S=e[1];else if(S.match(x))S="";else throw new Error("bad relativeAttr call:"+[S,E]);if(E.charAt(0)==="^")E=E.slice(1);else break}return S&&E.charAt(0)!=="["?S+"."+E:S+E}}}),h2=He({"src/lib/to_log_range.js"(Z,V){"use strict";var d=as();V.exports=function(S,E){if(S>0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return d(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,V){"use strict";var d=bp().isArrayOrTypedArray,x=Zv();V.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(d(r)&&d(o)&&x(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),n=0;n<a;n++)o[n]!==r[n]&&x(r[n])&&x(o[n])&&S(o[n],r[n])}else x(r)&&x(o)&&(S(o,r),Object.keys(o).length||delete E[t])}}}}),Yy=He({"src/lib/mod.js"(Z,V){"use strict";function d(S,E){var e=S%E;return e<0?e+E:e}function x(S,E){return Math.abs(S)>E/2?S-Math.round(S/E)*E:S}V.exports={mod:d,modHalf:x}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,V){(function(d){var x=/^\s+/,S=/\s+$/,E=0,e=d.round,t=d.min,r=d.max,o=d.random;function a(j,Q){if(j=j||"",Q=Q||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,Q);var re=n(j);this._originalInput=j,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=e(100*this._a)/100,this._format=Q.format||re.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=re.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var j=this.toRgb();return(j.r*299+j.g*587+j.b*114)/1e3},getLuminance:function(){var j=this.toRgb(),Q,re,pe,we,Se,Ie;return Q=j.r/255,re=j.g/255,pe=j.b/255,Q<=.03928?we=Q/12.92:we=d.pow((Q+.055)/1.055,2.4),re<=.03928?Se=re/12.92:Se=d.pow((re+.055)/1.055,2.4),pe<=.03928?Ie=pe/12.92:Ie=d.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Ie},setAlpha:function(j){return this._a=P(j),this._roundA=e(100*this._a)/100,this},toHsv:function(){var j=f(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=f(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+Q+", "+re+"%, "+pe+"%)":"hsva("+Q+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHsl:function(){var j=s(this._r,this._g,this._b);return{h:j.h*360,s:j.s,l:j.l,a:this._a}},toHslString:function(){var j=s(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+Q+", "+re+"%, "+pe+"%)":"hsla("+Q+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHex:function(j){return c(this._r,this._g,this._b,j)},toHexString:function(j){return"#"+this.toHex(j)},toHex8:function(j){return T(this._r,this._g,this._b,this._a,j)},toHex8String:function(j){return"#"+this.toHex8(j)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(U(this._r,255)*100)+"%",g:e(U(this._g,255)*100)+"%",b:e(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%)":"rgba("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var Q="#"+l(this._r,this._g,this._b,this._a),re=Q,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);re="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+Q+",endColorstr="+re+")"},toString:function(j){var Q=!!j;j=j||this._format;var re=!1,pe=this._a<1&&this._a>=0,we=!Q&&pe&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return we?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(re=this.toRgbString()),j==="prgb"&&(re=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(re=this.toHexString()),j==="hex3"&&(re=this.toHexString(!0)),j==="hex4"&&(re=this.toHex8String(!0)),j==="hex8"&&(re=this.toHex8String()),j==="name"&&(re=this.toName()),j==="hsl"&&(re=this.toHslString()),j==="hsv"&&(re=this.toHsvString()),re||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,Q){var re=j.apply(null,[this].concat([].slice.call(Q)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(j,Q){return j.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(m,arguments)}},a.fromRatio=function(j,Q){if(typeof j=="object"){var re={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?re[pe]=j[pe]:re[pe]=de(j[pe]));j=re}return a(j,Q)};function n(j){var Q={r:0,g:0,b:0},re=1,pe=null,we=null,Se=null,Ie=!1,Re=!1;return typeof j=="string"&&(j=se(j)),typeof j=="object"&&(q(j.r)&&q(j.g)&&q(j.b)?(Q=i(j.r,j.g,j.b),Ie=!0,Re=String(j.r).substr(-1)==="%"?"prgb":"rgb"):q(j.h)&&q(j.s)&&q(j.v)?(pe=de(j.s),we=de(j.v),Q=v(j.h,pe,we),Ie=!0,Re="hsv"):q(j.h)&&q(j.s)&&q(j.l)&&(pe=de(j.s),Se=de(j.l),Q=h(j.h,pe,Se),Ie=!0,Re="hsl"),j.hasOwnProperty("a")&&(re=j.a)),re=P(re),{ok:Ie,format:j.format||Re,r:t(255,r(Q.r,0)),g:t(255,r(Q.g,0)),b:t(255,r(Q.b,0)),a:re}}function i(j,Q,re){return{r:U(j,255)*255,g:U(Q,255)*255,b:U(re,255)*255}}function s(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var pe=r(j,Q,re),we=t(j,Q,re),Se,Ie,Re=(pe+we)/2;if(pe==we)Se=Ie=0;else{var We=pe-we;switch(Ie=Re>.5?We/(2-pe-we):We/(pe+we),pe){case j:Se=(Q-re)/We+(Q<re?6:0);break;case Q:Se=(re-j)/We+2;break;case re:Se=(j-Q)/We+4;break}Se/=6}return{h:Se,s:Ie,l:Re}}function h(j,Q,re){var pe,we,Se;j=U(j,360),Q=U(Q,100),re=U(re,100);function Ie(at,nt,tt){return tt<0&&(tt+=1),tt>1&&(tt-=1),tt<1/6?at+(nt-at)*6*tt:tt<1/2?nt:tt<2/3?at+(nt-at)*(2/3-tt)*6:at}if(Q===0)pe=we=Se=re;else{var Re=re<.5?re*(1+Q):re+Q-re*Q,We=2*re-Re;pe=Ie(We,Re,j+1/3),we=Ie(We,Re,j),Se=Ie(We,Re,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var pe=r(j,Q,re),we=t(j,Q,re),Se,Ie,Re=pe,We=pe-we;if(Ie=pe===0?0:We/pe,pe==we)Se=0;else{switch(pe){case j:Se=(Q-re)/We+(Q<re?6:0);break;case Q:Se=(re-j)/We+2;break;case re:Se=(j-Q)/We+4;break}Se/=6}return{h:Se,s:Ie,v:Re}}function v(j,Q,re){j=U(j,360)*6,Q=U(Q,100),re=U(re,100);var pe=d.floor(j),we=j-pe,Se=re*(1-Q),Ie=re*(1-we*Q),Re=re*(1-(1-we)*Q),We=pe%6,at=[re,Ie,Se,Se,Re,re][We],nt=[Re,re,re,Ie,Se,Se][We],tt=[Se,Se,Re,re,re,Ie][We];return{r:at*255,g:nt*255,b:tt*255}}function c(j,Q,re,pe){var we=[ce(e(j).toString(16)),ce(e(Q).toString(16)),ce(e(re).toString(16))];return pe&&we[0].charAt(0)==we[0].charAt(1)&&we[1].charAt(0)==we[1].charAt(1)&&we[2].charAt(0)==we[2].charAt(1)?we[0].charAt(0)+we[1].charAt(0)+we[2].charAt(0):we.join("")}function T(j,Q,re,pe,we){var Se=[ce(e(j).toString(16)),ce(e(Q).toString(16)),ce(e(re).toString(16)),ce(G(pe))];return we&&Se[0].charAt(0)==Se[0].charAt(1)&&Se[1].charAt(0)==Se[1].charAt(1)&&Se[2].charAt(0)==Se[2].charAt(1)&&Se[3].charAt(0)==Se[3].charAt(1)?Se[0].charAt(0)+Se[1].charAt(0)+Se[2].charAt(0)+Se[3].charAt(0):Se.join("")}function l(j,Q,re,pe){var we=[ce(G(pe)),ce(e(j).toString(16)),ce(e(Q).toString(16)),ce(e(re).toString(16))];return we.join("")}a.equals=function(j,Q){return!j||!Q?!1:a(j).toRgbString()==a(Q).toRgbString()},a.random=function(){return a.fromRatio({r:o(),g:o(),b:o()})};function _(j,Q){Q=Q===0?0:Q||10;var re=a(j).toHsl();return re.s-=Q/100,re.s=B(re.s),a(re)}function w(j,Q){Q=Q===0?0:Q||10;var re=a(j).toHsl();return re.s+=Q/100,re.s=B(re.s),a(re)}function A(j){return a(j).desaturate(100)}function M(j,Q){Q=Q===0?0:Q||10;var re=a(j).toHsl();return re.l+=Q/100,re.l=B(re.l),a(re)}function g(j,Q){Q=Q===0?0:Q||10;var re=a(j).toRgb();return re.r=r(0,t(255,re.r-e(255*-(Q/100)))),re.g=r(0,t(255,re.g-e(255*-(Q/100)))),re.b=r(0,t(255,re.b-e(255*-(Q/100)))),a(re)}function b(j,Q){Q=Q===0?0:Q||10;var re=a(j).toHsl();return re.l-=Q/100,re.l=B(re.l),a(re)}function p(j,Q){var re=a(j).toHsl(),pe=(re.h+Q)%360;return re.h=pe<0?360+pe:pe,a(re)}function u(j){var Q=a(j).toHsl();return Q.h=(Q.h+180)%360,a(Q)}function y(j){var Q=a(j).toHsl(),re=Q.h;return[a(j),a({h:(re+120)%360,s:Q.s,l:Q.l}),a({h:(re+240)%360,s:Q.s,l:Q.l})]}function m(j){var Q=a(j).toHsl(),re=Q.h;return[a(j),a({h:(re+90)%360,s:Q.s,l:Q.l}),a({h:(re+180)%360,s:Q.s,l:Q.l}),a({h:(re+270)%360,s:Q.s,l:Q.l})]}function R(j){var Q=a(j).toHsl(),re=Q.h;return[a(j),a({h:(re+72)%360,s:Q.s,l:Q.l}),a({h:(re+216)%360,s:Q.s,l:Q.l})]}function L(j,Q,re){Q=Q||6,re=re||30;var pe=a(j).toHsl(),we=360/re,Se=[a(j)];for(pe.h=(pe.h-(we*Q>>1)+720)%360;--Q;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,Q){Q=Q||6;for(var re=a(j).toHsv(),pe=re.h,we=re.s,Se=re.v,Ie=[],Re=1/Q;Q--;)Ie.push(a({h:pe,s:we,v:Se})),Se=(Se+Re)%1;return Ie}a.mix=function(j,Q,re){re=re===0?0:re||50;var pe=a(j).toRgb(),we=a(Q).toRgb(),Se=re/100,Ie={r:(we.r-pe.r)*Se+pe.r,g:(we.g-pe.g)*Se+pe.g,b:(we.b-pe.b)*Se+pe.b,a:(we.a-pe.a)*Se+pe.a};return a(Ie)},a.readability=function(j,Q){var re=a(j),pe=a(Q);return(d.max(re.getLuminance(),pe.getLuminance())+.05)/(d.min(re.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,Q,re){var pe=a.readability(j,Q),we,Se;switch(Se=!1,we=ae(re),we.level+we.size){case"AAsmall":case"AAAlarge":Se=pe>=4.5;break;case"AAlarge":Se=pe>=3;break;case"AAAsmall":Se=pe>=7;break}return Se},a.mostReadable=function(j,Q,re){var pe=null,we=0,Se,Ie,Re,We;re=re||{},Ie=re.includeFallbackColors,Re=re.level,We=re.size;for(var at=0;at<Q.length;at++)Se=a.readability(j,Q[at]),Se>we&&(we=Se,pe=a(Q[at]));return a.isReadable(j,pe,{level:Re,size:We})||!Ie?pe:(re.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],re))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=a.hexNames=O(F);function O(j){var Q={};for(var re in j)j.hasOwnProperty(re)&&(Q[j[re]]=re);return Q}function P(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,Q){$(j)&&(j="100%");var re=le(j);return j=t(Q,r(0,parseFloat(j))),re&&(j=parseInt(j*Q,10)/100),d.abs(j-Q)<1e-6?1:j%Q/parseFloat(Q)}function B(j){return t(1,r(0,j))}function X(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function le(j){return typeof j=="string"&&j.indexOf("%")!=-1}function ce(j){return j.length==1?"0"+j:""+j}function de(j){return j<=1&&(j=j*100+"%"),j}function G(j){return d.round(parseFloat(j)*255).toString(16)}function Y(j){return X(j)/255}var ee=function(){var j="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",re="(?:"+Q+")|(?:"+j+")",pe="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",we="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+we),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+we),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+we),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function q(j){return!!ee.CSS_UNIT.exec(j)}function se(j){j=j.replace(x,"").replace(S,"").toLowerCase();var Q=!1;if(F[j])j=F[j],Q=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var re;return(re=ee.rgb.exec(j))?{r:re[1],g:re[2],b:re[3]}:(re=ee.rgba.exec(j))?{r:re[1],g:re[2],b:re[3],a:re[4]}:(re=ee.hsl.exec(j))?{h:re[1],s:re[2],l:re[3]}:(re=ee.hsla.exec(j))?{h:re[1],s:re[2],l:re[3],a:re[4]}:(re=ee.hsv.exec(j))?{h:re[1],s:re[2],v:re[3]}:(re=ee.hsva.exec(j))?{h:re[1],s:re[2],v:re[3],a:re[4]}:(re=ee.hex8.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),a:Y(re[4]),format:Q?"name":"hex8"}:(re=ee.hex6.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),format:Q?"name":"hex"}:(re=ee.hex4.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),a:Y(re[4]+""+re[4]),format:Q?"name":"hex8"}:(re=ee.hex3.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),format:Q?"name":"hex"}:!1}function ae(j){var Q,re;return j=j||{level:"AA",size:"small"},Q=(j.level||"AA").toUpperCase(),re=(j.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),re!=="small"&&re!=="large"&&(re="small"),{level:Q,size:re}}typeof V<"u"&&V.exports?V.exports=a:window.tinycolor=a})(Math)}}),Qo=He({"src/lib/extend.js"(Z){"use strict";var V=Zv(),d=Array.isArray;function x(E,e){var t,r;for(t=0;t<E.length;t++){if(r=E[t],r!==null&&typeof r=="object")return!1;r!==void 0&&(e[t]=r)}return!0}Z.extendFlat=function(){return S(arguments,!1,!1,!1)},Z.extendDeep=function(){return S(arguments,!0,!1,!1)},Z.extendDeepAll=function(){return S(arguments,!0,!0,!1)},Z.extendDeepNoArrays=function(){return S(arguments,!0,!1,!0)};function S(E,e,t,r){var o=E[0],a=E.length,n,i,s,h,f,v,c;if(a===2&&d(o)&&d(E[1])&&o.length===0){if(c=x(E[1],o),c)return o;o.splice(0,o.length)}for(var T=1;T<a;T++){n=E[T];for(i in n)s=o[i],h=n[i],r&&d(h)?o[i]=h:e&&h&&(V(h)||(f=d(h)))?(f?(f=!1,v=s&&d(s)?s:[]):v=s&&V(s)?s:{},o[i]=S([v,h],e,t,r)):(typeof h<"u"||t)&&(o[i]=h)}return o}}}),tc=He({"src/plots/font_attributes.js"(Z,V){"use strict";V.exports=function(d){var x=d.variantValues,S=d.editType,E=d.colorEditType;E===void 0&&(E=S);var e={editType:S,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};d.noNumericWeightValues&&(e.valType="enumerated",e.values=e.extras,e.extras=void 0,e.min=void 0,e.max=void 0);var t={family:{valType:"string",noBlank:!0,strict:!0,editType:S},size:{valType:"number",min:1,editType:S},color:{valType:"color",editType:E},weight:e,style:{editType:S,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:d.noFontVariant?void 0:{editType:S,valType:"enumerated",values:x||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:d.noFontTextcase?void 0:{editType:S,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:d.noFontLineposition?void 0:{editType:S,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:d.noFontShadow?void 0:{editType:S,valType:"string",dflt:d.autoShadowDflt?"auto":"none"},editType:S};return d.autoSize&&(t.size.dflt="auto"),d.autoColor&&(t.color.dflt="auto"),d.arrayOk&&(t.family.arrayOk=!0,t.weight.arrayOk=!0,t.style.arrayOk=!0,d.noFontVariant||(t.variant.arrayOk=!0),d.noFontTextcase||(t.textcase.arrayOk=!0),d.noFontLineposition||(t.lineposition.arrayOk=!0),d.noFontShadow||(t.shadow.arrayOk=!0),t.size.arrayOk=!0,t.color.arrayOk=!0),t}}}),w_=He({"src/components/fx/constants.js"(Z,V){"use strict";V.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Zm=He({"src/components/fx/layout_attributes.js"(Z,V){"use strict";var d=w_(),x=tc(),S=x({editType:"none"});S.family.dflt=d.HOVERFONT,S.size.dflt=d.HOVERFONTSIZE,V.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},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:S,grouptitlefont:x({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"}}}}),Ky=He({"src/components/fx/attributes.js"(Z,V){"use strict";var d=tc(),x=Zm().hoverlabel,S=Qo().extendFlat;V.exports={hoverlabel:{bgcolor:S({},x.bgcolor,{arrayOk:!0}),bordercolor:S({},x.bordercolor,{arrayOk:!0}),font:d({arrayOk:!0,editType:"none"}),align:S({},x.align,{arrayOk:!0}),namelength:S({},x.namelength,{arrayOk:!0}),showarrow:S({},x.showarrow),editType:"none"}}}}),ru=He({"src/plots/attributes.js"(Z,V){"use strict";var d=tc(),x=Ky();V.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:d({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:x.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}}),W0=He({"src/components/colorscale/scales.js"(Z,V){"use strict";var d=Ch(),x={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)"]]},S=x.RdBu;function E(r,o){if(o||(o=S),!r)return o;function a(){try{r=x[r]||JSON.parse(r)}catch{r=o}}return typeof r=="string"&&(a(),typeof r=="string"&&a()),e(r)?r:o}function e(r){var o=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var a=0;a<r.length;a++){var n=r[a];if(n.length!==2||+n[0]<o||!d(n[1]).isValid())return!1;o=+n[0]}return!0}function t(r){return x[r]!==void 0?!0:e(r)}V.exports={scales:x,defaultScale:S,get:E,isValid:t}}}),sh=He({"src/components/color/attributes.js"(Z){"use strict";Z.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Z.defaultLine="#444",Z.lightLine="#eee",Z.background="#fff",Z.borderLine="#BEC8D9",Z.lightFraction=100*10/11}}),Jn=He({"src/components/color/index.js"(Z,V){"use strict";var d=Ch(),x=as(),S=bp().isTypedArray,E=V.exports={},e=sh();E.defaults=e.defaults;var t=E.defaultLine=e.defaultLine;E.lightLine=e.lightLine;var r=E.background=e.background;E.tinyRGB=function(a){var n=a.toRgb();return"rgb("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+")"},E.rgb=function(a){return E.tinyRGB(d(a))},E.opacity=function(a){return a?d(a).getAlpha():0},E.addOpacity=function(a,n){var i=d(a).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+n+")"},E.combine=function(a,n){var i=d(a).toRgb();if(i.a===1)return d(a).toRgbString();var s=d(n||r).toRgb(),h=s.a===1?s:{r:255*(1-s.a)+s.r*s.a,g:255*(1-s.a)+s.g*s.a,b:255*(1-s.a)+s.b*s.a},f={r:h.r*(1-i.a)+i.r*i.a,g:h.g*(1-i.a)+i.g*i.a,b:h.b*(1-i.a)+i.b*i.a};return d(f).toRgbString()},E.interpolate=function(a,n,i){var s=d(a).toRgb(),h=d(n).toRgb(),f={r:i*s.r+(1-i)*h.r,g:i*s.g+(1-i)*h.g,b:i*s.b+(1-i)*h.b};return d(f).toRgbString()},E.contrast=function(a,n,i){var s=d(a);s.getAlpha()!==1&&(s=d(E.combine(a,r)));var h=s.isDark()?n?s.lighten(n):r:i?s.darken(i):t;return h.toString()},E.stroke=function(a,n){var i=d(n);a.style({stroke:E.tinyRGB(i),"stroke-opacity":i.getAlpha()})},E.fill=function(a,n){var i=d(n);a.style({fill:E.tinyRGB(i),"fill-opacity":i.getAlpha()})},E.clean=function(a){if(!(!a||typeof a!="object")){var n=Object.keys(a),i,s,h,f;for(i=0;i<n.length;i++)if(h=n[i],f=a[h],h.slice(-5)==="color")if(Array.isArray(f))for(s=0;s<f.length;s++)f[s]=o(f[s]);else a[h]=o(f);else if(h.slice(-10)==="colorscale"&&Array.isArray(f))for(s=0;s<f.length;s++)Array.isArray(f[s])&&(f[s][1]=o(f[s][1]));else if(Array.isArray(f)){var v=f[0];if(!Array.isArray(v)&&v&&typeof v=="object")for(s=0;s<f.length;s++)E.clean(f[s])}else f&&typeof f=="object"&&!S(f)&&E.clean(f)}};function o(a){if(x(a)||typeof a!="string")return a;var n=a.trim();if(n.slice(0,3)!=="rgb")return a;var i=n.match(/^rgba?\s*\(([^()]*)\)$/);if(!i)return a;var s=i[1].trim().split(/\s*[\s,]\s*/),h=n.charAt(3)==="a"&&s.length===4;if(!h&&s.length!==3)return a;for(var f=0;f<s.length;f++){if(!s[f].length||(s[f]=Number(s[f]),!(s[f]>=0)))return a;if(f===3)s[f]>1&&(s[f]=1);else if(s[f]>=1)return a}var v=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+v+", "+s[3]+")":"rgb("+v+")"}}}),Ym=He({"src/constants/interactions.js"(Z,V){"use strict";V.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(V,d,x,S){var E=(d||"")+(x?"":"$"),e=S===!1?"":"^";return V==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+V+"([2-9]|[1-9][0-9]+)?"+E)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var V=as(),d=Ch(),x=Qo().extendFlat,S=ru(),E=W0(),e=Jn(),t=Ym().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,n=bp().isArrayOrTypedArray,i=bp().isTypedArraySpec,s=bp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,v,c){v.set(n(f)?f:i(f)?s(f):c)}},enumerated:{coerceFunction:function(f,v,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?v.set(c):v.set(f)},validateFunction:function(f,v){v.coerceNumber&&(f=+f);for(var c=v.values,T=0;T<c.length;T++){var l=String(c[T]);if(l.charAt(0)==="/"&&l.charAt(l.length-1)==="/"){var _=new RegExp(l.slice(1,-1));if(_.test(f))return!0}else if(f===c[T])return!0}return!1}},boolean:{coerceFunction:function(f,v,c,T){let l=_=>_===!0||_===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?v.set(f):v.set(c)}},number:{coerceFunction:function(f,v,c,T){i(f)&&(f=s(f)),!V(f)||T.min!==void 0&&f<T.min||T.max!==void 0&&f>T.max?v.set(c):v.set(+f)}},integer:{coerceFunction:function(f,v,c,T){if((T.extras||[]).indexOf(f)!==-1){v.set(f);return}i(f)&&(f=s(f)),f%1||!V(f)||T.min!==void 0&&f<T.min||T.max!==void 0&&f>T.max?v.set(c):v.set(+f)}},string:{coerceFunction:function(f,v,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?v.set(c):v.set(String(f))}else T.noBlank&&!f?v.set(c):v.set(f)}},color:{coerceFunction:function(f,v,c){i(f)&&(f=s(f)),d(f).isValid()?v.set(f):v.set(c)}},colorlist:{coerceFunction:function(f,v,c){function T(l){return d(l).isValid()}!Array.isArray(f)||!f.length?v.set(c):f.every(T)?v.set(f):v.set(c)}},colorscale:{coerceFunction:function(f,v,c){v.set(E.get(f,c))}},angle:{coerceFunction:function(f,v,c){i(f)&&(f=s(f)),f==="auto"?v.set("auto"):V(f)?v.set(a(+f,360)):v.set(c)}},subplotid:{coerceFunction:function(f,v,c,T){var l=T.regex||o(c);let _=w=>typeof w=="string"&&l.test(w);_(f)||T.arrayOk&&n(f)&&f.length>0&&f.every(_)?v.set(f):v.set(c)},validateFunction:function(f,v){var c=v.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,v,c,T){if((T.extras||[]).indexOf(f)!==-1){v.set(f);return}if(typeof f!="string"){v.set(c);return}for(var l=f.split("+"),_=0;_<l.length;){var w=l[_];T.flags.indexOf(w)===-1||l.indexOf(w)<_?l.splice(_,1):_++}l.length?v.set(l.join("+")):v.set(c)}},any:{coerceFunction:function(f,v,c){f===void 0?v.set(c):v.set(i(f)?s(f):f)}},info_array:{coerceFunction:function(f,v,c,T){function l(F,N,O){var P,U={set:function(B){P=B}};return O===void 0&&(O=N.dflt),Z.valObjectMeta[N.valType].coerceFunction(F,U,O,N),P}if(i(f)&&(f=s(f)),!n(f)){v.set(c);return}var _=T.dimensions===2||T.dimensions==="1-2"&&Array.isArray(f)&&n(f[0]),w=T.items,A=[],M=Array.isArray(w),g=M&&_&&n(w[0]),b=_&&M&&!g,p=M&&!b?w.length:f.length,u,y,m,R,L,z;if(c=Array.isArray(c)?c:[],_)for(u=0;u<p;u++)for(A[u]=[],m=n(f[u])?f[u]:[],b?L=w.length:M?L=w[u].length:L=m.length,y=0;y<L;y++)b?R=w[y]:M?R=w[u][y]:R=w,z=l(m[y],R,(c[u]||[])[y]),z!==void 0&&(A[u][y]=z);else for(u=0;u<p;u++)z=l(f[u],M?w[u]:w,c[u]),z!==void 0&&(A[u]=z);v.set(A)},validateFunction:function(f,v){if(!n(f))return!1;var c=v.items,T=Array.isArray(c),l=v.dimensions===2;if(!v.freeLength&&f.length!==c.length)return!1;for(var _=0;_<f.length;_++)if(l){if(!n(f[_])||!v.freeLength&&f[_].length!==c[_].length)return!1;for(var w=0;w<f[_].length;w++)if(!h(f[_][w],T?c[_][w]:c))return!1}else if(!h(f[_],T?c[_]:c))return!1;return!0}}},Z.coerce=function(f,v,c,T,l){var _=r(c,T).get(),w=r(f,T),A=r(v,T),M=w.get(),g=v._template;if(M===void 0&&g&&(M=r(g,T).get(),g=0),l===void 0&&(l=_.dflt),_.arrayOk){if(n(M))return A.set(M),M;if(i(M))return M=s(M),A.set(M),M}var b=Z.valObjectMeta[_.valType].coerceFunction;b(M,A,l,_);var p=A.get();return g&&p===l&&!h(M,_)&&(M=r(g,T).get(),b(M,A,l,_),p=A.get()),p},Z.coerce2=function(f,v,c,T,l){var _=r(f,T),w=Z.coerce(f,v,c,T,l),A=_.get();return A!=null?w:!1},Z.coerceFont=function(f,v,c,T){T||(T={}),c=x({},c),c=x(c,T.overrideDflt||{});var l={family:f(v+".family",c.family),size:f(v+".size",c.size),color:f(v+".color",c.color),weight:f(v+".weight",c.weight),style:f(v+".style",c.style)};if(T.noFontVariant||(l.variant=f(v+".variant",c.variant)),T.noFontLineposition||(l.lineposition=f(v+".lineposition",c.lineposition)),T.noFontTextcase||(l.textcase=f(v+".textcase",c.textcase)),!T.noFontShadow){var _=c.shadow;_==="none"&&T.autoShadowDflt&&(_="auto"),l.shadow=f(v+".shadow",_)}return l},Z.coercePattern=function(f,v,c,T){var l=f(v+".shape"),_;if(l||(_=f(v+".path")),l||_){l&&f(v+".solidity"),f(v+".size");var w=f(v+".fillmode"),A=w==="overlay";if(!T){var M=f(v+".bgcolor",A?c:void 0);f(v+".fgcolor",A?e.contrast(M):c)}f(v+".fgopacity",A?.5:1)}},Z.coerceHoverinfo=function(f,v,c){var T=v._module.attributes,l=T.hoverinfo?T:S,_=l.hoverinfo,w;if(c._dataLength===1){var A=_.dflt==="all"?_.flags.slice():_.dflt.split("+");A.splice(A.indexOf("name"),1),w=A.join("+")}return Z.coerce(f,v,l,"hoverinfo",w)},Z.coerceSelectionMarkerOpacity=function(f,v){if(f.marker){var c=f.marker.opacity;if(c!==void 0){var T,l;!n(c)&&!f.selected&&!f.unselected&&(T=c,l=t*c),v("selected.marker.opacity",T),v("unselected.marker.opacity",l)}}};function h(f,v){var c=Z.valObjectMeta[v.valType];if(v.arrayOk&&n(f))return!0;if(c.validateFunction)return c.validateFunction(f,v);var T={},l=T,_={set:function(w){l=w}};return c.coerceFunction(f,_,T,v),l!==T}Z.validate=h}}),X0=He({"src/plot_api/plot_config.js"(Z,V){"use strict";var d={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","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},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},x={};function S(E,e){for(var t in E){var r=E[t];r.valType?e[t]=r.dflt:(e[t]||(e[t]={}),S(r,e[t]))}}S(d,x),V.exports={configAttributes:d,dfltConfig:x}}}),JA=He({"src/lib/notifier.js"(Z,V){"use strict";var d=Wn(),x=as(),S=[];V.exports=function(E,e,t){var r;if(((r=t?._context)==null?void 0:r.displayNotifier)===!1||S.indexOf(E)!==-1)return;S.push(E);var o=1e3;x(e)?o=e:e==="long"&&(o=3e3);var a=d.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(S);function i(s){s.duration(700).style("opacity",0).each("end",function(h){var f=S.indexOf(h);f!==-1&&S.splice(f,1),d.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var h=d.select(this);h.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){h.transition().call(i)});for(var f=h.append("p"),v=s.split(/<br\s*\/?>/g),c=0;c<v.length;c++)c&&f.append("br"),f.append("span").text(v[c]);e==="stick"?h.transition().duration(350).style("opacity",1):h.transition().duration(700).style("opacity",1).transition().delay(o).call(i)})}}}),Km=He({"src/lib/loggers.js"(Z,V){"use strict";var d=X0().dfltConfig,x=JA(),S=V.exports={};S.log=function(){var E;if(d.logging>1){var e=["LOG:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(d.notifyOnLogging>1){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);x(t.join("<br>"),"long")}},S.warn=function(){var E;if(d.logging>0){var e=["WARN:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(d.notifyOnLogging>0){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);x(t.join("<br>"),"stick")}},S.error=function(){var E;if(d.logging>0){var e=["ERROR:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.error.apply(console,e)}if(d.notifyOnLogging>0){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);x(t.join("<br>"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,V){"use strict";V.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,V){"use strict";V.exports=function(x,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;e<x.length;e++)if(x[e]instanceof RegExp&&x[e].toString()===E)return x;x.push(S)}else(S||S===0)&&x.indexOf(S)===-1&&x.push(S);return x}}}),p7=He({"node_modules/gl-mat4/create.js"(Z,V){V.exports=d;function d(){var x=new Float32Array(16);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),d7=He({"node_modules/gl-mat4/clone.js"(Z,V){V.exports=d;function d(x){var S=new Float32Array(16);return S[0]=x[0],S[1]=x[1],S[2]=x[2],S[3]=x[3],S[4]=x[4],S[5]=x[5],S[6]=x[6],S[7]=x[7],S[8]=x[8],S[9]=x[9],S[10]=x[10],S[11]=x[11],S[12]=x[12],S[13]=x[13],S[14]=x[14],S[15]=x[15],S}}}),v7=He({"node_modules/gl-mat4/copy.js"(Z,V){V.exports=d;function d(x,S){return x[0]=S[0],x[1]=S[1],x[2]=S[2],x[3]=S[3],x[4]=S[4],x[5]=S[5],x[6]=S[6],x[7]=S[7],x[8]=S[8],x[9]=S[9],x[10]=S[10],x[11]=S[11],x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15],x}}}),QA=He({"node_modules/gl-mat4/identity.js"(Z,V){V.exports=d;function d(x){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),m7=He({"node_modules/gl-mat4/transpose.js"(Z,V){V.exports=d;function d(x,S){if(x===S){var E=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];x[1]=S[4],x[2]=S[8],x[3]=S[12],x[4]=E,x[6]=S[9],x[7]=S[13],x[8]=e,x[9]=r,x[11]=S[14],x[12]=t,x[13]=o,x[14]=a}else x[0]=S[0],x[1]=S[4],x[2]=S[8],x[3]=S[12],x[4]=S[1],x[5]=S[5],x[6]=S[9],x[7]=S[13],x[8]=S[2],x[9]=S[6],x[10]=S[10],x[11]=S[14],x[12]=S[3],x[13]=S[7],x[14]=S[11],x[15]=S[15];return x}}}),g7=He({"node_modules/gl-mat4/invert.js"(Z,V){V.exports=d;function d(x,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],n=S[6],i=S[7],s=S[8],h=S[9],f=S[10],v=S[11],c=S[12],T=S[13],l=S[14],_=S[15],w=E*a-e*o,A=E*n-t*o,M=E*i-r*o,g=e*n-t*a,b=e*i-r*a,p=t*i-r*n,u=s*T-h*c,y=s*l-f*c,m=s*_-v*c,R=h*l-f*T,L=h*_-v*T,z=f*_-v*l,F=w*z-A*L+M*R+g*m-b*y+p*u;return F?(F=1/F,x[0]=(a*z-n*L+i*R)*F,x[1]=(t*L-e*z-r*R)*F,x[2]=(T*p-l*b+_*g)*F,x[3]=(f*b-h*p-v*g)*F,x[4]=(n*m-o*z-i*y)*F,x[5]=(E*z-t*m+r*y)*F,x[6]=(l*M-c*p-_*A)*F,x[7]=(s*p-f*M+v*A)*F,x[8]=(o*L-a*m+i*u)*F,x[9]=(e*m-E*L-r*u)*F,x[10]=(c*b-T*M+_*w)*F,x[11]=(h*M-s*b-v*w)*F,x[12]=(a*y-o*R-n*u)*F,x[13]=(E*R-e*y+t*u)*F,x[14]=(T*A-c*g-l*w)*F,x[15]=(s*g-h*A+f*w)*F,x):null}}}),y7=He({"node_modules/gl-mat4/adjoint.js"(Z,V){V.exports=d;function d(x,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],n=S[6],i=S[7],s=S[8],h=S[9],f=S[10],v=S[11],c=S[12],T=S[13],l=S[14],_=S[15];return x[0]=a*(f*_-v*l)-h*(n*_-i*l)+T*(n*v-i*f),x[1]=-(e*(f*_-v*l)-h*(t*_-r*l)+T*(t*v-r*f)),x[2]=e*(n*_-i*l)-a*(t*_-r*l)+T*(t*i-r*n),x[3]=-(e*(n*v-i*f)-a*(t*v-r*f)+h*(t*i-r*n)),x[4]=-(o*(f*_-v*l)-s*(n*_-i*l)+c*(n*v-i*f)),x[5]=E*(f*_-v*l)-s*(t*_-r*l)+c*(t*v-r*f),x[6]=-(E*(n*_-i*l)-o*(t*_-r*l)+c*(t*i-r*n)),x[7]=E*(n*v-i*f)-o*(t*v-r*f)+s*(t*i-r*n),x[8]=o*(h*_-v*T)-s*(a*_-i*T)+c*(a*v-i*h),x[9]=-(E*(h*_-v*T)-s*(e*_-r*T)+c*(e*v-r*h)),x[10]=E*(a*_-i*T)-o*(e*_-r*T)+c*(e*i-r*a),x[11]=-(E*(a*v-i*h)-o*(e*v-r*h)+s*(e*i-r*a)),x[12]=-(o*(h*l-f*T)-s*(a*l-n*T)+c*(a*f-n*h)),x[13]=E*(h*l-f*T)-s*(e*l-t*T)+c*(e*f-t*h),x[14]=-(E*(a*l-n*T)-o*(e*l-t*T)+c*(e*n-t*a)),x[15]=E*(a*f-n*h)-o*(e*f-t*h)+s*(e*n-t*a),x}}}),_7=He({"node_modules/gl-mat4/determinant.js"(Z,V){V.exports=d;function d(x){var S=x[0],E=x[1],e=x[2],t=x[3],r=x[4],o=x[5],a=x[6],n=x[7],i=x[8],s=x[9],h=x[10],f=x[11],v=x[12],c=x[13],T=x[14],l=x[15],_=S*o-E*r,w=S*a-e*r,A=S*n-t*r,M=E*a-e*o,g=E*n-t*o,b=e*n-t*a,p=i*c-s*v,u=i*T-h*v,y=i*l-f*v,m=s*T-h*c,R=s*l-f*c,L=h*l-f*T;return _*L-w*R+A*m+M*y-g*u+b*p}}}),x7=He({"node_modules/gl-mat4/multiply.js"(Z,V){V.exports=d;function d(x,S,E){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],n=S[5],i=S[6],s=S[7],h=S[8],f=S[9],v=S[10],c=S[11],T=S[12],l=S[13],_=S[14],w=S[15],A=E[0],M=E[1],g=E[2],b=E[3];return x[0]=A*e+M*a+g*h+b*T,x[1]=A*t+M*n+g*f+b*l,x[2]=A*r+M*i+g*v+b*_,x[3]=A*o+M*s+g*c+b*w,A=E[4],M=E[5],g=E[6],b=E[7],x[4]=A*e+M*a+g*h+b*T,x[5]=A*t+M*n+g*f+b*l,x[6]=A*r+M*i+g*v+b*_,x[7]=A*o+M*s+g*c+b*w,A=E[8],M=E[9],g=E[10],b=E[11],x[8]=A*e+M*a+g*h+b*T,x[9]=A*t+M*n+g*f+b*l,x[10]=A*r+M*i+g*v+b*_,x[11]=A*o+M*s+g*c+b*w,A=E[12],M=E[13],g=E[14],b=E[15],x[12]=A*e+M*a+g*h+b*T,x[13]=A*t+M*n+g*f+b*l,x[14]=A*r+M*i+g*v+b*_,x[15]=A*o+M*s+g*c+b*w,x}}}),b7=He({"node_modules/gl-mat4/translate.js"(Z,V){V.exports=d;function d(x,S,E){var e=E[0],t=E[1],r=E[2],o,a,n,i,s,h,f,v,c,T,l,_;return S===x?(x[12]=S[0]*e+S[4]*t+S[8]*r+S[12],x[13]=S[1]*e+S[5]*t+S[9]*r+S[13],x[14]=S[2]*e+S[6]*t+S[10]*r+S[14],x[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],n=S[2],i=S[3],s=S[4],h=S[5],f=S[6],v=S[7],c=S[8],T=S[9],l=S[10],_=S[11],x[0]=o,x[1]=a,x[2]=n,x[3]=i,x[4]=s,x[5]=h,x[6]=f,x[7]=v,x[8]=c,x[9]=T,x[10]=l,x[11]=_,x[12]=o*e+s*t+c*r+S[12],x[13]=a*e+h*t+T*r+S[13],x[14]=n*e+f*t+l*r+S[14],x[15]=i*e+v*t+_*r+S[15]),x}}}),w7=He({"node_modules/gl-mat4/scale.js"(Z,V){V.exports=d;function d(x,S,E){var e=E[0],t=E[1],r=E[2];return x[0]=S[0]*e,x[1]=S[1]*e,x[2]=S[2]*e,x[3]=S[3]*e,x[4]=S[4]*t,x[5]=S[5]*t,x[6]=S[6]*t,x[7]=S[7]*t,x[8]=S[8]*r,x[9]=S[9]*r,x[10]=S[10]*r,x[11]=S[11]*r,x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15],x}}}),T7=He({"node_modules/gl-mat4/rotate.js"(Z,V){V.exports=d;function d(x,S,E,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),n,i,s,h,f,v,c,T,l,_,w,A,M,g,b,p,u,y,m,R,L,z,F,N;return Math.abs(a)<1e-6?null:(a=1/a,t*=a,r*=a,o*=a,n=Math.sin(E),i=Math.cos(E),s=1-i,h=S[0],f=S[1],v=S[2],c=S[3],T=S[4],l=S[5],_=S[6],w=S[7],A=S[8],M=S[9],g=S[10],b=S[11],p=t*t*s+i,u=r*t*s+o*n,y=o*t*s-r*n,m=t*r*s-o*n,R=r*r*s+i,L=o*r*s+t*n,z=t*o*s+r*n,F=r*o*s-t*n,N=o*o*s+i,x[0]=h*p+T*u+A*y,x[1]=f*p+l*u+M*y,x[2]=v*p+_*u+g*y,x[3]=c*p+w*u+b*y,x[4]=h*m+T*R+A*L,x[5]=f*m+l*R+M*L,x[6]=v*m+_*R+g*L,x[7]=c*m+w*R+b*L,x[8]=h*z+T*F+A*N,x[9]=f*z+l*F+M*N,x[10]=v*z+_*F+g*N,x[11]=c*z+w*F+b*N,S!==x&&(x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15]),x)}}}),A7=He({"node_modules/gl-mat4/rotateX.js"(Z,V){V.exports=d;function d(x,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[4],o=S[5],a=S[6],n=S[7],i=S[8],s=S[9],h=S[10],f=S[11];return S!==x&&(x[0]=S[0],x[1]=S[1],x[2]=S[2],x[3]=S[3],x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15]),x[4]=r*t+i*e,x[5]=o*t+s*e,x[6]=a*t+h*e,x[7]=n*t+f*e,x[8]=i*t-r*e,x[9]=s*t-o*e,x[10]=h*t-a*e,x[11]=f*t-n*e,x}}}),S7=He({"node_modules/gl-mat4/rotateY.js"(Z,V){V.exports=d;function d(x,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[0],o=S[1],a=S[2],n=S[3],i=S[8],s=S[9],h=S[10],f=S[11];return S!==x&&(x[4]=S[4],x[5]=S[5],x[6]=S[6],x[7]=S[7],x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15]),x[0]=r*t-i*e,x[1]=o*t-s*e,x[2]=a*t-h*e,x[3]=n*t-f*e,x[8]=r*e+i*t,x[9]=o*e+s*t,x[10]=a*e+h*t,x[11]=n*e+f*t,x}}}),M7=He({"node_modules/gl-mat4/rotateZ.js"(Z,V){V.exports=d;function d(x,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[0],o=S[1],a=S[2],n=S[3],i=S[4],s=S[5],h=S[6],f=S[7];return S!==x&&(x[8]=S[8],x[9]=S[9],x[10]=S[10],x[11]=S[11],x[12]=S[12],x[13]=S[13],x[14]=S[14],x[15]=S[15]),x[0]=r*t+i*e,x[1]=o*t+s*e,x[2]=a*t+h*e,x[3]=n*t+f*e,x[4]=i*t-r*e,x[5]=s*t-o*e,x[6]=h*t-a*e,x[7]=f*t-n*e,x}}}),E7=He({"node_modules/gl-mat4/fromRotation.js"(Z,V){V.exports=d;function d(x,S,E){var e,t,r,o=E[0],a=E[1],n=E[2],i=Math.sqrt(o*o+a*a+n*n);return Math.abs(i)<1e-6?null:(i=1/i,o*=i,a*=i,n*=i,e=Math.sin(S),t=Math.cos(S),r=1-t,x[0]=o*o*r+t,x[1]=a*o*r+n*e,x[2]=n*o*r-a*e,x[3]=0,x[4]=o*a*r-n*e,x[5]=a*a*r+t,x[6]=n*a*r+o*e,x[7]=0,x[8]=o*n*r+a*e,x[9]=a*n*r-o*e,x[10]=n*n*r+t,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x)}}}),k7=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,V){V.exports=d;function d(x,S,E){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,n=t+t,i=r+r,s=e*a,h=e*n,f=e*i,v=t*n,c=t*i,T=r*i,l=o*a,_=o*n,w=o*i;return x[0]=1-(v+T),x[1]=h+w,x[2]=f-_,x[3]=0,x[4]=h-w,x[5]=1-(s+T),x[6]=c+l,x[7]=0,x[8]=f+_,x[9]=c-l,x[10]=1-(s+v),x[11]=0,x[12]=E[0],x[13]=E[1],x[14]=E[2],x[15]=1,x}}}),C7=He({"node_modules/gl-mat4/fromScaling.js"(Z,V){V.exports=d;function d(x,S){return x[0]=S[0],x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=S[1],x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=S[2],x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),L7=He({"node_modules/gl-mat4/fromTranslation.js"(Z,V){V.exports=d;function d(x,S){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=S[0],x[13]=S[1],x[14]=S[2],x[15]=1,x}}}),P7=He({"node_modules/gl-mat4/fromXRotation.js"(Z,V){V.exports=d;function d(x,S){var E=Math.sin(S),e=Math.cos(S);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=e,x[6]=E,x[7]=0,x[8]=0,x[9]=-E,x[10]=e,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),I7=He({"node_modules/gl-mat4/fromYRotation.js"(Z,V){V.exports=d;function d(x,S){var E=Math.sin(S),e=Math.cos(S);return x[0]=e,x[1]=0,x[2]=-E,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=E,x[9]=0,x[10]=e,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),R7=He({"node_modules/gl-mat4/fromZRotation.js"(Z,V){V.exports=d;function d(x,S){var E=Math.sin(S),e=Math.cos(S);return x[0]=e,x[1]=E,x[2]=0,x[3]=0,x[4]=-E,x[5]=e,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),D7=He({"node_modules/gl-mat4/fromQuat.js"(Z,V){V.exports=d;function d(x,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=E+E,a=e+e,n=t+t,i=E*o,s=e*o,h=e*a,f=t*o,v=t*a,c=t*n,T=r*o,l=r*a,_=r*n;return x[0]=1-h-c,x[1]=s+_,x[2]=f-l,x[3]=0,x[4]=s-_,x[5]=1-i-c,x[6]=v+T,x[7]=0,x[8]=f+l,x[9]=v-T,x[10]=1-i-h,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),z7=He({"node_modules/gl-mat4/frustum.js"(Z,V){V.exports=d;function d(x,S,E,e,t,r,o){var a=1/(E-S),n=1/(t-e),i=1/(r-o);return x[0]=r*2*a,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=r*2*n,x[6]=0,x[7]=0,x[8]=(E+S)*a,x[9]=(t+e)*n,x[10]=(o+r)*i,x[11]=-1,x[12]=0,x[13]=0,x[14]=o*r*2*i,x[15]=0,x}}}),F7=He({"node_modules/gl-mat4/perspective.js"(Z,V){V.exports=d;function d(x,S,E,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return x[0]=r/E,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=r,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=(t+e)*o,x[11]=-1,x[12]=0,x[13]=0,x[14]=2*t*e*o,x[15]=0,x}}}),O7=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,V){V.exports=d;function d(x,S,E,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),n=2/(o+a),i=2/(t+r);return x[0]=n,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=i,x[6]=0,x[7]=0,x[8]=-((o-a)*n*.5),x[9]=(t-r)*i*.5,x[10]=e/(E-e),x[11]=-1,x[12]=0,x[13]=0,x[14]=e*E/(E-e),x[15]=0,x}}}),B7=He({"node_modules/gl-mat4/ortho.js"(Z,V){V.exports=d;function d(x,S,E,e,t,r,o){var a=1/(S-E),n=1/(e-t),i=1/(r-o);return x[0]=-2*a,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*n,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=2*i,x[11]=0,x[12]=(S+E)*a,x[13]=(t+e)*n,x[14]=(o+r)*i,x[15]=1,x}}}),N7=He({"node_modules/gl-mat4/lookAt.js"(Z,V){var d=QA();V.exports=x;function x(S,E,e,t){var r,o,a,n,i,s,h,f,v,c,T=E[0],l=E[1],_=E[2],w=t[0],A=t[1],M=t[2],g=e[0],b=e[1],p=e[2];return Math.abs(T-g)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(_-p)<1e-6?d(S):(h=T-g,f=l-b,v=_-p,c=1/Math.sqrt(h*h+f*f+v*v),h*=c,f*=c,v*=c,r=A*v-M*f,o=M*h-w*v,a=w*f-A*h,c=Math.sqrt(r*r+o*o+a*a),c?(c=1/c,r*=c,o*=c,a*=c):(r=0,o=0,a=0),n=f*a-v*o,i=v*r-h*a,s=h*o-f*r,c=Math.sqrt(n*n+i*i+s*s),c?(c=1/c,n*=c,i*=c,s*=c):(n=0,i=0,s=0),S[0]=r,S[1]=n,S[2]=h,S[3]=0,S[4]=o,S[5]=i,S[6]=f,S[7]=0,S[8]=a,S[9]=s,S[10]=v,S[11]=0,S[12]=-(r*T+o*l+a*_),S[13]=-(n*T+i*l+s*_),S[14]=-(h*T+f*l+v*_),S[15]=1,S)}}}),U7=He({"node_modules/gl-mat4/str.js"(Z,V){V.exports=d;function d(x){return"mat4("+x[0]+", "+x[1]+", "+x[2]+", "+x[3]+", "+x[4]+", "+x[5]+", "+x[6]+", "+x[7]+", "+x[8]+", "+x[9]+", "+x[10]+", "+x[11]+", "+x[12]+", "+x[13]+", "+x[14]+", "+x[15]+")"}}}),e5=He({"node_modules/gl-mat4/index.js"(Z,V){V.exports={create:p7(),clone:d7(),copy:v7(),identity:QA(),transpose:m7(),invert:g7(),adjoint:y7(),determinant:_7(),multiply:x7(),translate:b7(),scale:w7(),rotate:T7(),rotateX:A7(),rotateY:S7(),rotateZ:M7(),fromRotation:E7(),fromRotationTranslation:k7(),fromScaling:C7(),fromTranslation:L7(),fromXRotation:P7(),fromYRotation:I7(),fromZRotation:R7(),fromQuat:D7(),frustum:z7(),perspective:F7(),perspectiveFromFieldOfView:O7(),ortho:B7(),lookAt:N7(),str:U7()}}}),d2=He({"src/lib/matrix.js"(Z){"use strict";var V=e5();Z.init2dArray=function(d,x){for(var S=new Array(d),E=0;E<d;E++)S[E]=new Array(x);return S},Z.transposeRagged=function(d){var x=0,S=d.length,E,e;for(E=0;E<S;E++)x=Math.max(x,d[E].length);var t=new Array(x);for(E=0;E<x;E++)for(t[E]=new Array(S),e=0;e<S;e++)t[E][e]=d[e][E];return t},Z.dot=function(d,x){if(!(d.length&&x.length)||d.length!==x.length)return null;var S=d.length,E,e;if(d[0].length)for(E=new Array(S),e=0;e<S;e++)E[e]=Z.dot(d[e],x);else if(x[0].length){var t=Z.transposeRagged(x);for(E=new Array(t.length),e=0;e<t.length;e++)E[e]=Z.dot(d,t[e])}else for(E=0,e=0;e<S;e++)E+=d[e]*x[e];return E},Z.translationMatrix=function(d,x){return[[1,0,d],[0,1,x],[0,0,1]]},Z.rotationMatrix=function(d){var x=d*Math.PI/180;return[[Math.cos(x),-Math.sin(x),0],[Math.sin(x),Math.cos(x),0],[0,0,1]]},Z.rotationXYMatrix=function(d,x,S){return Z.dot(Z.dot(Z.translationMatrix(x,S),Z.rotationMatrix(d)),Z.translationMatrix(-x,-S))},Z.apply3DTransform=function(d){return function(){var x=arguments,S=arguments.length===1?x[0]:[x[0],x[1],x[2]||0];return Z.dot(d,[S[0],S[1],S[2],1]).slice(0,3)}},Z.apply2DTransform=function(d){return function(){var x=arguments;x.length===3&&(x=x[0]);var S=arguments.length===1?x[0]:[x[0],x[1]];return Z.dot(d,[S[0],S[1],1]).slice(0,2)}},Z.apply2DTransform2=function(d){var x=Z.apply2DTransform(d);return function(S){return x(S.slice(0,2)).concat(x(S.slice(2,4)))}},Z.convertCssMatrix=function(d){if(d){var x=d.length;if(x===16)return d;if(x===6)return[d[0],d[1],0,0,d[2],d[3],0,0,0,0,1,0,d[4],d[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},Z.inverseTransformMatrix=function(d){var x=[];return V.invert(x,d),[[x[0],x[1],x[2],x[3]],[x[4],x[5],x[6],x[7]],[x[8],x[9],x[10],x[11]],[x[12],x[13],x[14],x[15]]]}}}),T_=He({"src/lib/dom.js"(Z,V){"use strict";var d=Wn(),x=Km(),S=d2(),E=e5();function e(T){var l;if(typeof T=="string"){if(l=document.getElementById(T),l===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return l}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function t(T){var l=d.select(T);return l.node()instanceof HTMLElement&&l.size()&&l.classed("js-plotly-plot")}function r(T){var l=T&&T.parentNode;l&&l.removeChild(T)}function o(T,l){a("global",T,l)}function a(T,l,_){var w="plotly.js-style-"+T,A=document.getElementById(w);if(!(A&&A.matches(".no-inline-styles"))){A||(A=document.createElement("style"),A.setAttribute("id",w),A.appendChild(document.createTextNode("")),document.head.appendChild(A));var M=A.sheet;M?M.insertRule?M.insertRule(l+"{"+_+"}",0):M.addRule?M.addRule(l,_,0):x.warn("addStyleRule failed"):x.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function n(T){var l="plotly.js-style-"+T,_=document.getElementById(l);_&&r(_)}function i(T,l,_,w,A,M){var g=w.split(":"),b=A.split(":"),p="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(u){u.getAttribute(p)||(u.addEventListener("mouseenter",function(){var y=this.querySelector(_);y&&(y.style[g[0]]=g[1])}),u.addEventListener("mouseleave",function(){var y=this.querySelector(_);y&&(l&&this.matches(l)?y.style[g[0]]=g[1]:y.style[b[0]]=b[1])}),u.setAttribute(p,!0))})}function s(T){var l=f(T),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.forEach(function(w){var A=h(w);if(A){var M=S.convertCssMatrix(A);_=E.multiply(_,_,M)}}),_}function h(T){var l=window.getComputedStyle(T,null),_=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("-moz-transform")||l.getPropertyValue("-ms-transform")||l.getPropertyValue("-o-transform")||l.getPropertyValue("transform");return _==="none"?null:_.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(w){return+w})}function f(T){for(var l=[];v(T);)l.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return l}function v(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function c(T,l){return T&&l&&T.top===l.top&&T.left===l.left&&T.right===l.right&&T.bottom===l.bottom}V.exports={getGraphDiv:e,isPlotDiv:t,removeElement:r,addStyleRule:o,addRelatedStyleRule:a,deleteRelatedStyleRule:n,setStyleOnHover:i,getFullTransformMatrix:s,getElementTransformMatrix:h,getElementAndAncestors:f,equalDomRects:c}}}),A_=He({"src/plots/animation_attributes.js"(Z,V){"use strict";V.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"}}}}}),pc=He({"src/plot_api/edit_types.js"(Z,V){"use strict";var d=Qo().extendFlat,x=Zv(),S={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},E={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},e=S.flags.slice().concat(["fullReplot"]),t=E.flags.slice().concat("layoutReplot");V.exports={traces:S,layout:E,traceFlags:function(){return r(e)},layoutFlags:function(){return r(t)},update:function(n,i){var s=i.editType;if(s&&s!=="none")for(var h=s.split("+"),f=0;f<h.length;f++)n[h[f]]=!0},overrideAll:o};function r(n){for(var i={},s=0;s<n.length;s++)i[n[s]]=!1;return i}function o(n,i,s){var h=d({},n);for(var f in h){var v=h[f];x(v)&&(h[f]=a(v,i,s,f))}return s==="from-root"&&(h.editType=i),h}function a(n,i,s,h){if(n.valType){var f=d({},n);if(f.editType=i,Array.isArray(n.items)){f.items=new Array(n.items.length);for(var v=0;v<n.items.length;v++)f.items[v]=a(n.items[v],i,"from-root")}return f}else return o(n,i,h.charAt(0)==="_"?"nested":"from-root")}}}),Gh=He({"src/components/drawing/attributes.js"(Z){"use strict";Z.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Z.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"}}}),t5=He({"src/constants/docs.js"(Z,V){"use strict";V.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"}}}),Jl=He({"src/plots/template_attributes.js"(Z){"use strict";var{DATE_FORMAT_LINK:V,FORMAT_LINK:d}=t5(),x=["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 S({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}".`,d,"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}".`,V,"for details on the date formatting syntax.",x].join(" ")}Z.templateFormatStringDescription=S,Z.hovertemplateAttrs=({editType:E="none",arrayOk:e}={},t={})=>To({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>To({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Z.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,V){"use strict";function d(A,M){return M?M.d2l(A):A}function x(A,M){return M?M.l2d(A):A}function S(A){return A.x0}function E(A){return A.x1}function e(A){return A.y0}function t(A){return A.y1}function r(A){return A.x0shift||0}function o(A){return A.x1shift||0}function a(A){return A.y0shift||0}function n(A){return A.y1shift||0}function i(A,M){return d(A.x1,M)+o(A)-d(A.x0,M)-r(A)}function s(A,M,g){return d(A.y1,g)+n(A)-d(A.y0,g)-a(A)}function h(A,M){return Math.abs(i(A,M))}function f(A,M,g){return Math.abs(s(A,M,g))}function v(A,M,g){return A.type!=="line"?void 0:Math.sqrt(Math.pow(i(A,M),2)+Math.pow(s(A,M,g),2))}function c(A,M){return x((d(A.x1,M)+o(A)+d(A.x0,M)+r(A))/2,M)}function T(A,M,g){return x((d(A.y1,g)+n(A)+d(A.y0,g)+a(A))/2,g)}function l(A,M,g){return A.type!=="line"?void 0:s(A,M,g)/i(A,M)}var _=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:i,dy:s,width:h,height:f,length:v,xcenter:c,ycenter:T,simpleXVariables:_,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,V){"use strict";var d=pc().overrideAll,x=ru(),S=tc(),E=Gh().dash,e=Qo().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=v2();V.exports=d({newshape:{visible:e({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},x.legend,{}),legendgroup:e({},x.legendgroup,{}),legendgrouptitle:{text:e({},x.legendgrouptitle.text,{}),font:S({})},legendrank:e({},x.legendrank,{}),legendwidth:e({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{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:e({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),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")}}),q7=He({"src/components/selections/draw_newselection/attributes.js"(Z,V){"use strict";var d=Gh().dash,x=Qo().extendFlat;V.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:x({},d,{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"}}}}),m2=He({"src/plots/pad_attributes.js"(Z,V){"use strict";V.exports=function(d){var x=d.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),$y=He({"src/plots/layout_attributes.js"(Z,V){"use strict";var d=tc(),x=A_(),S=sh(),E=j7(),e=q7(),t=m2(),r=Qo().extendFlat,o=d({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,V.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:d({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:d({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:r(t({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:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.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:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},x.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Z=document.createElement("style");Z.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Z.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}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.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-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:rgb(0 0 0/5%)}.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}.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}.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:rgb(0 0 0/5%)}.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}@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),(width <= 480px){.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(Z)}})()}}),lo=He({"src/registry.js"(Z){"use strict";var V=Km(),d=p2(),x=$A(),S=Zv(),E=T_().addStyleRule,e=Qo(),t=ru(),r=$y(),o=e.extendFlat,a=e.extendDeepAll;Z.modules={},Z.allCategories={},Z.allTypes=[],Z.subplotsRegistry={},Z.componentsRegistry={},Z.layoutArrayContainers=[],Z.layoutArrayRegexes=[],Z.traceLayoutAttributes={},Z.localeRegistry={},Z.apiMethodRegistry={},Z.collectableSubplotTypes=null,Z.register=function(w){if(Z.collectableSubplotTypes=null,w)w&&!Array.isArray(w)&&(w=[w]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A<w.length;A++){var M=w[A];if(!M)throw new Error("Invalid module was attempted to be registered!");switch(M.moduleType){case"trace":n(M);break;case"transform":h(M);break;case"component":s(M);break;case"locale":f(M);break;case"apiMethod":var g=M.name;Z.apiMethodRegistry[g]=M.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},Z.getModule=function(_){var w=Z.modules[l(_)];return w?w._module:!1},Z.traceIs=function(_,w){if(_=l(_),_==="various")return!1;var A=Z.modules[_];return A||(_&&V.log("Unrecognized trace type "+_+"."),A=Z.modules[t.type.dflt]),!!A.categories[w]},Z.getComponentMethod=function(_,w){var A=Z.componentsRegistry[_];return A&&A[w]||d},Z.call=function(){var _=arguments[0],w=[].slice.call(arguments,1);return Z.apiMethodRegistry[_].apply(null,w)};function n(_){var w=_.name,A=_.categories,M=_.meta;if(Z.modules[w]){V.log("Type "+w+" already registered");return}Z.subplotsRegistry[_.basePlotModule.name]||i(_.basePlotModule);for(var g={},b=0;b<A.length;b++)g[A[b]]=!0,Z.allCategories[A[b]]=!0;Z.modules[w]={_module:_,categories:g},M&&Object.keys(M).length&&(Z.modules[w].meta=M),Z.allTypes.push(w);for(var p in Z.componentsRegistry)c(p,w);_.layoutAttributes&&o(Z.traceLayoutAttributes,_.layoutAttributes);var u=_.basePlotModule,y=u.name;if(y==="mapbox"){var m=u.constants.styleRules;for(var R in m)E(".js-plotly-plot .plotly .mapboxgl-"+R,m[R])}y==="map"&&V7(),(y==="geo"||y==="mapbox"||y==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function i(_){var w=_.name;if(Z.subplotsRegistry[w]){V.log("Plot type "+w+" already registered.");return}v(_),Z.subplotsRegistry[w]=_;for(var A in Z.componentsRegistry)T(A,_.name)}function s(_){if(typeof _.name!="string")throw new Error("Component module *name* must be a string.");var w=_.name;Z.componentsRegistry[w]=_,_.layoutAttributes&&(_.layoutAttributes._isLinkedToArray&&x(Z.layoutArrayContainers,w),v(_));for(var A in Z.modules)c(w,A);for(var M in Z.subplotsRegistry)T(w,M);_.schema&&_.schema.layout&&a(r,_.schema.layout)}function h(_){if(typeof _.name!="string")throw new Error("Transform module *name* must be a string.");var w="Transform module "+_.name,A=typeof _.transform=="function",M=typeof _.calcTransform=="function";if(!A&&!M)throw new Error(w+" is missing a *transform* or *calcTransform* method.");A&&M&&V.log([w+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),S(_.attributes)||V.log(w+" registered without an *attributes* object."),typeof _.supplyDefaults!="function"&&V.log(w+" registered without a *supplyDefaults* method.")}function f(_){var w=_.name,A=w.split("-")[0],M=_.dictionary,g=_.format,b=M&&Object.keys(M).length,p=g&&Object.keys(g).length,u=Z.localeRegistry,y=u[w];if(y||(u[w]=y={}),A!==w){var m=u[A];m||(u[A]=m={}),b&&m.dictionary===y.dictionary&&(m.dictionary=M),p&&m.format===y.format&&(m.format=g)}b&&(y.dictionary=M),p&&(y.format=g)}function v(_){if(_.layoutAttributes){var w=_.layoutAttributes._arrayAttrRegexps;if(w)for(var A=0;A<w.length;A++)x(Z.layoutArrayRegexes,w[A])}}function c(_,w){var A=Z.componentsRegistry[_].schema;if(!(!A||!A.traces)){var M=A.traces[w];M&&a(Z.modules[w]._module.attributes,M)}}function T(_,w){var A=Z.componentsRegistry[_].schema;if(!(!A||!A.subplots)){var M=Z.subplotsRegistry[w],g=M.layoutAttributes,b=M.attr==="subplot"?M.name:M.attr;Array.isArray(b)&&(b=b[0]);var p=A.subplots[b];g&&p&&a(g,p)}}function l(_){return typeof _=="object"&&(_=_.type),_}}}),G7=He({"src/lib/dates.js"(Z){"use strict";var V=Xv().timeFormat,d=as(),x=Km(),S=Yy().mod,E=Ws(),e=E.BADNUM,t=E.ONEDAY,r=E.ONEHOUR,o=E.ONEMIN,a=E.ONESEC,n=E.EPOCHJD,i=lo(),s=Xv().utcFormat,h=/^\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,f=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,v=new Date().getFullYear()-70;function c(F){return F&&i.componentsRegistry.calendars&&typeof F=="string"&&F!=="gregorian"}Z.dateTick0=function(F,N){var O=T(F,!!N);if(N<2)return O;var P=Z.dateTime2ms(O,F);return P+=t*(N-1),Z.ms2DateTime(P,0,F)};function T(F,N){return c(F)?N?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[F]:i.getComponentMethod("calendars","CANONICAL_TICK")[F]:N?"2000-01-02":"2000-01-01"}Z.dfltRange=function(F){return c(F)?i.getComponentMethod("calendars","DFLTRANGE")[F]:["2000-01-01","2001-01-01"]},Z.isJSDate=function(F){return typeof F=="object"&&F!==null&&typeof F.getTime=="function"};var l,_;Z.dateTime2ms=function(F,N){if(Z.isJSDate(F)){var O=F.getTimezoneOffset()*o,P=(F.getUTCMinutes()-F.getMinutes())*o+(F.getUTCSeconds()-F.getSeconds())*a+(F.getUTCMilliseconds()-F.getMilliseconds());if(P){var U=3*o;O=O-U/2+S(P-O+U/2,U)}return F=Number(F)-O,F>=l&&F<=_?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),X=F.charAt(0);B&&(X==="G"||X==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",le=F.match($?f:h);if(!le)return e;var ce=le[1],de=le[3]||"1",G=Number(le[5]||1),Y=Number(le[7]||0),ee=Number(le[9]||0),q=Number(le[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var se;try{var ae=i.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),se=ae.newDate(ce,ae.toMonthIndex(ce,de,j),G)}else se=ae.newDate(ce,Number(de),G)}catch{return e}return se?(se.toJD()-n)*t+Y*r+ee*o+q*a:e}ce.length===2?ce=(Number(ce)+2e3-v)%100+v:ce=Number(ce),de-=1;var Q=new Date(Date.UTC(2e3,de,G,Y,ee));return Q.setUTCFullYear(ce),Q.getUTCMonth()!==de||Q.getUTCDate()!==G?e:Q.getTime()+q*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),_=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,N){return Z.dateTime2ms(F,N)!==e};function w(F,N){return String(F+Math.pow(10,N)).slice(1)}var A=90*t,M=3*r,g=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=_))return e;N||(N=0);var P=Math.floor(S(F+.05,1)*10),U=Math.round(F-P/10),B,X,$,le,ce,de;if(c(O)){var G=Math.floor(U/t)+n,Y=Math.floor(S(F,t));try{B=i.getComponentMethod("calendars","getCal")(O).fromJD(G).formatDate("yyyy-mm-dd")}catch{B=s("G%Y-%m-%d")(new Date(U))}if(B.charAt(0)==="-")for(;B.length<11;)B="-0"+B.slice(1);else for(;B.length<10;)B="0"+B;X=N<A?Math.floor(Y/r):0,$=N<A?Math.floor(Y%r/o):0,le=N<M?Math.floor(Y%o/a):0,ce=N<g?Y%a*10+P:0}else de=new Date(U),B=s("%Y-%m-%d")(de),X=N<A?de.getUTCHours():0,$=N<A?de.getUTCMinutes():0,le=N<M?de.getUTCSeconds():0,ce=N<g?de.getUTCMilliseconds()*10+P:0;return b(B,X,$,le,ce)},Z.ms2DateTimeLocal=function(F){if(!(F>=l+t&&F<=_-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),P=V("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),X=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(P,U,B,X,$)};function b(F,N,O,P,U){if((N||O||P||U)&&(F+=" "+w(N,2)+":"+w(O,2),(P||U)&&(F+=":"+w(P,2),U))){for(var B=4;U%10===0;)B-=1,U/=10;F+="."+w(U,B)}return F}Z.cleanDate=function(F,N,O){if(F===e)return N;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(c(O))return x.error("JS Dates and milliseconds are incompatible with world calendars",F),N;if(F=Z.ms2DateTimeLocal(+F),!F&&N!==void 0)return N}else if(!Z.isDateTime(F,O))return x.error("unrecognized date",F),N;return F};var p=/%\d?f/g,u=/%h/g,y={1:"1",2:"1",3:"2",4:"2"};function m(F,N,O,P){F=F.replace(p,function(B){var X=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return y[O("%q")(U)]}),c(P))try{F=i.getComponentMethod("calendars","worldCalFmt")(F,N,P)}catch{return"Invalid"}return O(F)(U)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,N){var O=S(F+.05,t),P=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){d(N)||(N=0);var U=Math.min(S(F/a,60),R[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+B}return P}Z.formatDate=function(F,N,O,P,U,B){if(U=c(U)&&U,!N)if(O==="y")N=B.year;else if(O==="m")N=B.month;else if(O==="d")N=B.dayMonth+`
`+B.year;else return L(F,O)+`
`+m(B.dayMonthYear,F,P,U);return m(N,F,P,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=c(O)&&O;var P=S(F,t);if(F=Math.round(F-P),O)try{var U=Math.round(F/t)+n,B=i.getComponentMethod("calendars","getCal")(O),X=B.fromJD(U);return N%12?B.add(X,N,"m"):B.add(X,N/12,"y"),(X.toJD()-n)*t+P}catch{x.error("invalid ms "+F+" in calendar "+O)}var $=new Date(F+z);return $.setUTCMonth($.getUTCMonth()+N)+P-z},Z.findExactDates=function(F,N){for(var O=0,P=0,U=0,B=0,X,$,le=c(N)&&i.getComponentMethod("calendars","getCal")(N),ce=0;ce<F.length;ce++){if($=F[ce],!d($)){B++;continue}if(!($%t))if(le)try{X=le.fromJD($/t+n),X.day()===1?X.month()===1?O++:P++:U++}catch{}else X=new Date($),X.getUTCDate()===1?X.getUTCMonth()===0?O++:P++:U++}P+=O,U+=P;var de=F.length-B;return{exactYears:O/de,exactMonths:P/de,exactDays:U/de}}}}),S_=He({"src/lib/identity.js"(Z,V){"use strict";V.exports=function(x){return x}}}),g2=He({"src/lib/search.js"(Z){"use strict";var V=as(),d=Km(),x=S_(),S=Ws().BADNUM,E=1e-9;Z.findBin=function(a,n,i){if(V(n.start))return i?Math.ceil((a-n.start)/n.size-E)-1:Math.floor((a-n.start)/n.size+E);var s=0,h=n.length,f=0,v=h>1?(n[h-1]-n[0])/(h-1):1,c,T;for(v>=0?T=i?e:t:T=i?o:r,a+=v*E*(i?-1:1)*(v>=0?1:-1);s<h&&f++<100;)c=Math.floor((s+h)/2),T(n[c],a)?s=c+1:h=c;return f>90&&d.log("Long binary search..."),s-1};function e(a,n){return a<n}function t(a,n){return a<=n}function r(a,n){return a>n}function o(a,n){return a>=n}Z.sorterAsc=function(a,n){return a-n},Z.sorterDes=function(a,n){return n-a},Z.distinctVals=function(a){var n=a.slice();n.sort(Z.sorterAsc);var i;for(i=n.length-1;i>-1&&n[i]===S;i--);for(var s=n[i]-n[0]||1,h=s/(i||1)/1e4,f=[],v,c=0;c<=i;c++){var T=n[c],l=T-v;v===void 0?(f.push(T),v=T):l>h&&(s=Math.min(s,l),f.push(T),v=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,n,i){for(var s=0,h=n.length-1,f,v=0,c=i?0:1,T=i?1:0,l=i?Math.ceil:Math.floor;s<h&&v++<100;)f=l((s+h)/2),n[f]<=a?s=f+c:h=f-T;return n[s]},Z.sort=function(a,n){for(var i=0,s=0,h=1;h<a.length;h++){var f=n(a[h],a[h-1]);if(f<0?i=1:f>0&&(s=1),i&&s)return a.sort(n)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,n){n=n||x;for(var i=1/0,s,h=0;h<a.length;h++){var f=n(a[h]);f<i&&(i=f,s=h)}return s}}}),Jm=He({"src/lib/sort_object_keys.js"(Z,V){"use strict";V.exports=function(x){return Object.keys(x).sort()}}}),H7=He({"src/lib/stats.js"(Z){"use strict";var V=as(),d=bp().isArrayOrTypedArray;Z.aggNums=function(x,S,E,e){var t,r;if((!e||e>E.length)&&(e=E.length),V(S)||(S=!1),d(E[0])){for(r=new Array(e),t=0;t<e;t++)r[t]=Z.aggNums(x,S,E[t]);E=r}for(t=0;t<e;t++)V(S)?V(E[t])&&(S=x(+S,+E[t])):S=E[t];return S},Z.len=function(x){return Z.aggNums(function(S){return S+1},0,x)},Z.mean=function(x,S){return S||(S=Z.len(x)),Z.aggNums(function(E,e){return E+e},0,x)/S},Z.geometricMean=function(x,S){return S||(S=Z.len(x)),Math.pow(Z.aggNums(function(E,e){return E*e},1,x),1/S)},Z.midRange=function(x){if(!(x===void 0||x.length===0))return(Z.aggNums(Math.max,null,x)+Z.aggNums(Math.min,null,x))/2},Z.variance=function(x,S,E){return S||(S=Z.len(x)),V(E)||(E=Z.mean(x,S)),Z.aggNums(function(e,t){return e+Math.pow(t-E,2)},0,x)/S},Z.stdev=function(x,S,E){return Math.sqrt(Z.variance(x,S,E))},Z.median=function(x){var S=x.slice().sort();return Z.interp(S,.5)},Z.interp=function(x,S){if(!V(S))throw"n should be a finite number";if(S=S*x.length-.5,S<0)return x[0];if(S>x.length-1)return x[x.length-1];var E=S%1;return E*x[Math.ceil(S)]+(1-E)*x[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,V){"use strict";var d=Yy(),x=d.mod,S=d.modHalf,E=Math.PI,e=2*E;function t(T){return T/180*E}function r(T){return T/E*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return S(l-T,e)}function n(T,l){return Math.abs(a(T,l))}function i(T,l){if(o(l))return!0;var _,w;l[0]<l[1]?(_=l[0],w=l[1]):(_=l[1],w=l[0]),_=x(_,e),w=x(w,e),_>w&&(w+=e);var A=x(T,e),M=A+e;return A>=_&&A<=w||M>=_&&M<=w}function s(T,l,_,w){if(!i(l,w))return!1;var A,M;return _[0]<_[1]?(A=_[0],M=_[1]):(A=_[1],M=_[0]),T>=A&&T<=M}function h(T,l,_,w,A,M,g){A=A||0,M=M||0;var b=o([_,w]),p,u,y,m,R;b?(p=0,u=E,y=e):_<w?(p=_,y=w):(p=w,y=_),T<l?(m=T,R=l):(m=l,R=T);function L(O,P){return[O*Math.cos(P)+A,M-O*Math.sin(P)]}var z=Math.abs(y-p)<=E?0:1;function F(O,P,U){return"A"+[O,O]+" "+[0,z,U]+" "+L(O,P)}var N;return b?m===null?N="M"+L(R,p)+F(R,u,0)+F(R,y,0)+"Z":N="M"+L(m,p)+F(m,u,0)+F(m,y,0)+"ZM"+L(R,p)+F(R,u,1)+F(R,y,1)+"Z":m===null?(N="M"+L(R,p)+F(R,y,0),g&&(N+="L0,0Z")):N="M"+L(m,p)+"L"+L(R,p)+F(R,y,0)+"L"+L(m,y)+F(m,p,1)+"Z",N}function f(T,l,_,w,A){return h(null,T,l,_,w,A,0)}function v(T,l,_,w,A){return h(null,T,l,_,w,A,1)}function c(T,l,_,w,A,M){return h(T,l,_,w,A,M,1)}V.exports={deg2rad:t,rad2deg:r,angleDelta:a,angleDist:n,isFullCircle:o,isAngleInsideSector:i,isPtInsideSector:s,pathArc:f,pathSector:v,pathAnnulus:c}}}),X7=He({"src/lib/anchor_utils.js"(Z){"use strict";Z.isLeftAnchor=function(d){return d.xanchor==="left"||d.xanchor==="auto"&&d.x<=1/3},Z.isCenterAnchor=function(d){return d.xanchor==="center"||d.xanchor==="auto"&&d.x>1/3&&d.x<2/3},Z.isRightAnchor=function(d){return d.xanchor==="right"||d.xanchor==="auto"&&d.x>=2/3},Z.isTopAnchor=function(d){return d.yanchor==="top"||d.yanchor==="auto"&&d.y>=2/3},Z.isMiddleAnchor=function(d){return d.yanchor==="middle"||d.yanchor==="auto"&&d.y>1/3&&d.y<2/3},Z.isBottomAnchor=function(d){return d.yanchor==="bottom"||d.yanchor==="auto"&&d.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var V=Yy().mod;Z.segmentsIntersect=d;function d(t,r,o,a,n,i,s,h){var f=o-t,v=n-t,c=s-n,T=a-r,l=i-r,_=h-i,w=f*_-c*T;if(w===0)return null;var A=(v*_-c*l)/w,M=(v*T-f*l)/w;return M<0||M>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,n,i,s,h,f){if(d(r,o,a,n,i,s,h,f))return 0;var v=a-r,c=n-o,T=h-i,l=f-s,_=v*v+c*c,w=T*T+l*l,A=Math.min(x(v,c,_,i-r,s-o),x(v,c,_,h-r,f-o),x(T,l,w,r-i,o-s),x(T,l,w,a-i,n-s));return Math.sqrt(A)};function x(t,r,o,a,n){var i=a*t+n*r;if(i<0)return a*a+n*n;if(i>o){var s=a-t,h=n-r;return s*s+h*h}else{var f=a*r-n*t;return f*f/o}}var S,E,e;Z.getTextLocation=function(r,o,a,n){if((r!==E||n!==e)&&(S={},E=r,e=n),S[a])return S[a];var i=r.getPointAtLength(V(a-n/2,o)),s=r.getPointAtLength(V(a+n/2,o)),h=Math.atan((s.y-i.y)/(s.x-i.x)),f=r.getPointAtLength(V(a,o)),v=(f.x*4+i.x+s.x)/6,c=(f.y*4+i.y+s.y)/6,T={x:v,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){E=null},Z.getVisibleSegment=function(r,o,a){var n=o.left,i=o.right,s=o.top,h=o.bottom,f=0,v=r.getTotalLength(),c=v,T,l;function _(A){var M=r.getPointAtLength(A);A===0?T=M:A===v&&(l=M);var g=M.x<n?n-M.x:M.x>i?M.x-i:0,b=M.y<s?s-M.y:M.y>h?M.y-h:0;return Math.sqrt(g*g+b*b)}for(var w=_(f);w;){if(f+=w+a,f>c)return;w=_(f)}for(w=_(c);w;){if(c-=w+a,f>c)return;w=_(c)}return{min:f,max:c,len:c-f,total:v,isClosed:f===0&&c===v&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),s=n.tolerance||.001,h=n.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,v=0,c=0,T=i,l,_,w;v<h;){if(l=(c+T)/2,_=r.getPointAtLength(l),w=_[a]-o,Math.abs(w)<s)return _;f*w>0?T=l:c=l,v++}return _}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var V={};Z.throttle=function(S,E,e){var t=V[S],r=Date.now();if(!t){for(var o in V)V[o].ts<r-6e4&&delete V[o];t=V[S]={ts:0,timer:null}}d(t);function a(){e(),t.ts=Date.now(),t.onDone&&(t.onDone(),t.onDone=null)}if(r>t.ts+E){a();return}t.timer=setTimeout(function(){a(),t.timer=null},E)},Z.done=function(x){var S=V[x];return!S||!S.timer?Promise.resolve():new Promise(function(E){var e=S.onDone;S.onDone=function(){e&&e(),E(),S.onDone=null}})},Z.clear=function(x){if(x)d(V[x]),delete V[x];else for(var S in V)Z.clear(S)};function d(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,V){"use strict";V.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,V){"use strict";V.exports=E,V.exports.isMobile=E,V.exports.default=E;var d=/(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,x=/CrOS/,S=/android|ipad|playbook|silk/i;function E(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=d.test(t)&&!x.test(t)||!!e.tablet&&S.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),J7=He({"src/lib/preserve_drawing_buffer.js"(Z,V){"use strict";var d=as(),x=K7();V.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=x({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a<o.length;a++){var n=o[a];if(n.indexOf("Safari")!==-1)for(var i=a-1;i>-1;i--){var s=o[i];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(d(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var E;return typeof navigator<"u"&&(E=navigator.userAgent),E&&E.headers&&typeof E.headers["user-agent"]=="string"&&(E=E.headers["user-agent"]),E}}}),$7=He({"src/lib/make_trace_groups.js"(Z,V){"use strict";var d=Wn();V.exports=function(S,E,e){var t=S.selectAll("g."+e.replace(/\s/g,".")).data(E,function(o){return o[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",e),t.order();var r=S.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=d.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,V){"use strict";var d=lo();V.exports=function(S,E){for(var e=S._context.locale,t=0;t<2;t++){for(var r=S._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var n=a[E];if(n)return n}r=d.localeRegistry}var i=e.split("-")[0];if(i===e)break;e=i}return E}}}),r5=He({"src/lib/filter_unique.js"(Z,V){"use strict";V.exports=function(x){for(var S={},E=[],e=0,t=0;t<x.length;t++){var r=x[t];S[r]!==1&&(S[r]=1,E[e++]=r)}return E}}}),ez=He({"src/lib/filter_visible.js"(Z,V){"use strict";V.exports=function(e){for(var t=S(e)?x:d,r=[],o=0;o<e.length;o++){var a=e[o];t(a)&&r.push(a)}return r};function d(E){return E.visible===!0}function x(E){var e=E[0].trace;return e.visible===!0&&e._length!==0}function S(E){return Array.isArray(E)&&Array.isArray(E[0])&&E[0][0]&&E[0][0].trace}}}),tz=He({"src/lib/increment.js"(Z,V){"use strict";V.exports=function(x,S){if(!S)return x;var E=1/Math.abs(S),e=E>1?(E*x+E*S)/E:x+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(x).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),rz=He({"src/lib/clean_number.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;V.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),d(e)?Number(e):x}}}),sa=He({"src/lib/index.js"(Z,V){"use strict";var d=Wn(),x=Xv().utcFormat,S=YA().format,E=as(),e=Ws(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=V.exports={};a.adjustFormat=function(j){return!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j)?j:j==="0.f"?"~f":/^\d%/.test(j)?"~%":/^\ds/.test(j)?"~s":!/^[~,.0$]/.test(j)&&/[&fps]/.test(j)?"~"+j:j};var n={};a.warnBadFormat=function(ae){var j=String(ae);n[j]||(n[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ae){return String(ae)},a.numberFormat=function(ae){var j;try{j=S(a.adjustFormat(ae))}catch{return a.warnBadFormat(ae),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=u7(),a.relativeAttr=c7(),a.isPlainObject=Zv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var i=bp();a.isArrayBuffer=i.isArrayBuffer,a.isTypedArray=i.isTypedArray,a.isArrayOrTypedArray=i.isArrayOrTypedArray,a.isArray1D=i.isArray1D,a.ensureArray=i.ensureArray,a.concat=i.concat,a.maxRowLength=i.maxRowLength,a.minRowLength=i.minRowLength;var s=Yy();a.mod=s.mod,a.modHalf=s.modHalf;var h=h7();a.valObjectMeta=h.valObjectMeta,a.coerce=h.coerce,a.coerce2=h.coerce2,a.coerceFont=h.coerceFont,a.coercePattern=h.coercePattern,a.coerceHoverinfo=h.coerceHoverinfo,a.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,a.validate=h.validate;var f=G7();a.dateTime2ms=f.dateTime2ms,a.isDateTime=f.isDateTime,a.ms2DateTime=f.ms2DateTime,a.ms2DateTimeLocal=f.ms2DateTimeLocal,a.cleanDate=f.cleanDate,a.isJSDate=f.isJSDate,a.formatDate=f.formatDate,a.incrementMonth=f.incrementMonth,a.dateTick0=f.dateTick0,a.dfltRange=f.dfltRange,a.findExactDates=f.findExactDates,a.MIN_MS=f.MIN_MS,a.MAX_MS=f.MAX_MS;var v=g2();a.findBin=v.findBin,a.sorterAsc=v.sorterAsc,a.sorterDes=v.sorterDes,a.distinctVals=v.distinctVals,a.roundUp=v.roundUp,a.sort=v.sort,a.findIndexOfMin=v.findIndexOfMin,a.sortObjectKeys=Jm();var c=H7();a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.geometricMean=c.geometricMean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var T=d2();a.init2dArray=T.init2dArray,a.transposeRagged=T.transposeRagged,a.dot=T.dot,a.translationMatrix=T.translationMatrix,a.rotationMatrix=T.rotationMatrix,a.rotationXYMatrix=T.rotationXYMatrix,a.apply3DTransform=T.apply3DTransform,a.apply2DTransform=T.apply2DTransform,a.apply2DTransform2=T.apply2DTransform2,a.convertCssMatrix=T.convertCssMatrix,a.inverseTransformMatrix=T.inverseTransformMatrix;var l=W7();a.deg2rad=l.deg2rad,a.rad2deg=l.rad2deg,a.angleDelta=l.angleDelta,a.angleDist=l.angleDist,a.isFullCircle=l.isFullCircle,a.isAngleInsideSector=l.isAngleInsideSector,a.isPtInsideSector=l.isPtInsideSector,a.pathArc=l.pathArc,a.pathSector=l.pathSector,a.pathAnnulus=l.pathAnnulus;var _=X7();a.isLeftAnchor=_.isLeftAnchor,a.isCenterAnchor=_.isCenterAnchor,a.isRightAnchor=_.isRightAnchor,a.isTopAnchor=_.isTopAnchor,a.isMiddleAnchor=_.isMiddleAnchor,a.isBottomAnchor=_.isBottomAnchor;var w=Z7();a.segmentsIntersect=w.segmentsIntersect,a.segmentDistance=w.segmentDistance,a.getTextLocation=w.getTextLocation,a.clearLocationCache=w.clearLocationCache,a.getVisibleSegment=w.getVisibleSegment,a.findPointOnPath=w.findPointOnPath;var A=Qo();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var M=Km();a.log=M.log,a.warn=M.warn,a.error=M.error;var g=Jy();a.counterRegex=g.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var p=T_();a.getGraphDiv=p.getGraphDiv,a.isPlotDiv=p.isPlotDiv,a.removeElement=p.removeElement,a.addStyleRule=p.addStyleRule,a.addRelatedStyleRule=p.addRelatedStyleRule,a.deleteRelatedStyleRule=p.deleteRelatedStyleRule,a.setStyleOnHover=p.setStyleOnHover,a.getFullTransformMatrix=p.getFullTransformMatrix,a.getElementTransformMatrix=p.getElementTransformMatrix,a.getElementAndAncestors=p.getElementAndAncestors,a.equalDomRects=p.equalDomRects,a.clearResponsive=Y7(),a.preserveDrawingBuffer=J7(),a.makeTraceGroups=$7(),a._=Q7(),a.notifier=JA(),a.filterUnique=r5(),a.filterVisible=ez(),a.pushUnique=$A(),a.increment=tz(),a.cleanNumber=rz(),a.ensureNumber=function(j){return E(j)?(j=Number(j),j>t||j<r?o:j):o},a.isIndex=function(ae,j){return j!==void 0&&ae>=j?!1:E(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var Q=new Array(j),re=0;re<j;re++)Q[re]=ae;return Q},a.swapAttrs=function(ae,j,Q,re){Q||(Q="x"),re||(re="y");for(var pe=0;pe<j.length;pe++){var we=j[pe],Se=a.nestedProperty(ae,we.replace("?",Q)),Ie=a.nestedProperty(ae,we.replace("?",re)),Re=Se.get();Se.set(Ie.get()),Ie.set(Re)}},a.raiseToTop=function(j){j.parentNode.appendChild(j)},a.cancelTransition=function(ae){return ae.transition().duration(0)},a.constrain=function(ae,j,Q){return j>Q?Math.max(Q,Math.min(j,ae)):Math.max(j,Math.min(Q,ae))},a.bBoxIntersect=function(ae,j,Q){return Q=Q||0,ae.left<=j.right+Q&&j.left<=ae.right+Q&&ae.top<=j.bottom+Q&&j.top<=ae.bottom+Q},a.simpleMap=function(ae,j,Q,re,pe){for(var we=ae.length,Se=new Array(we),Ie=0;Ie<we;Ie++)Se[Ie]=j(ae[Ie],Q,re,pe);return Se},a.randstr=function ae(j,Q,re,pe){if(re||(re=16),Q===void 0&&(Q=24),Q<=0)return"0";var we=Math.log(Math.pow(2,Q))/Math.log(re),Se="",Ie,Re,We;for(Ie=2;we===1/0;Ie*=2)we=Math.log(Math.pow(2,Q/Ie))/Math.log(re)*Ie;var at=we-Math.floor(we);for(Ie=0;Ie<Math.floor(we);Ie++)We=Math.floor(Math.random()*re).toString(re),Se=We+Se;at&&(Re=Math.pow(re,at),We=Math.floor(Math.random()*Re).toString(re),Se=We+Se);var nt=parseInt(Se,re);return j&&j[Se]||nt!==1/0&&nt>=Math.pow(2,Q)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,Q,re,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var Q={};return Q.optionList=[],Q._newoption=function(re){re[j]=ae,Q[re.name]=re,Q.optionList.push(re)},Q["_"+j]=ae,Q},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var Q=ae.length,re=2*Q,pe=2*j-1,we=new Array(pe),Se=new Array(Q),Ie,Re,We,at;for(Ie=0;Ie<pe;Ie++)we[Ie]=(1-Math.cos(Math.PI*(Ie+1)/j))/(2*j);for(Ie=0;Ie<Q;Ie++){for(at=0,Re=0;Re<pe;Re++)We=Ie+Re+1-j,We<-Q?We-=re*Math.round(We/re):We>=re&&(We-=re*Math.floor(We/re)),We<0?We=-1-We:We>=Q&&(We=re-1-We),at+=ae[We]*we[Re];Se[Ie]=at}return Se},a.syncOrAsync=function(ae,j,Q){var re,pe;function we(){return a.syncOrAsync(ae,j,Q)}for(;ae.length;)if(pe=ae.splice(0,1)[0],re=pe(j),re&&re.then)return re.then(we);return Q&&Q(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,Q){if(ae){var re=!1,pe=!0,we,Se;for(we=0;we<Q.length;we++)Se=ae[Q[we]],Se!=null?re=!0:pe=!1;if(re&&!pe)for(we=0;we<Q.length;we++)ae[Q[we]]=j[Q[we]]}},a.mergeArray=function(ae,j,Q,re){var pe=typeof re=="function";if(a.isArrayOrTypedArray(ae))for(var we=Math.min(ae.length,j.length),Se=0;Se<we;Se++){var Ie=ae[Se];j[Se][Q]=pe?re(Ie):Ie}},a.mergeArrayCastPositive=function(ae,j,Q){return a.mergeArray(ae,j,Q,function(re){var pe=+re;return isFinite(pe)&&pe>0?pe:0})},a.fillArray=function(ae,j,Q,re){if(re=re||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;pe<j.length;pe++)j[pe][Q]=re(ae[pe])},a.castOption=function(ae,j,Q,re){re=re||a.identity;var pe=a.nestedProperty(ae,Q).get();return a.isArrayOrTypedArray(pe)?Array.isArray(j)&&a.isArrayOrTypedArray(pe[j[0]])?re(pe[j[0]][j[1]]):re(pe[j]):pe},a.extractOption=function(ae,j,Q,re){if(Q in ae)return ae[Q];var pe=a.nestedProperty(j,re).get();if(!Array.isArray(pe))return pe};function u(ae){var j={};for(var Q in ae)for(var re=ae[Q],pe=0;pe<re.length;pe++)j[re[pe]]=+Q;return j}a.tagSelected=function(ae,j,Q){var re=j.selectedpoints,pe=j._indexToPoints,we;pe&&(we=u(pe));function Se(nt){return nt!==void 0&&nt<ae.length}for(var Ie=0;Ie<re.length;Ie++){var Re=re[Ie];if(a.isIndex(Re)||a.isArrayOrTypedArray(Re)&&a.isIndex(Re[0])&&a.isIndex(Re[1])){var We=we?we[Re]:Re,at=Q?Q[We]:We;Se(at)&&(ae[at].selected=1)}}},a.selIndices2selPoints=function(ae){var j=ae.selectedpoints,Q=ae._indexToPoints;if(Q){for(var re=u(Q),pe=[],we=0;we<j.length;we++){var Se=j[we];if(a.isIndex(Se)){var Ie=re[Se];a.isIndex(Ie)&&pe.push(Ie)}}return pe}else return j},a.getTargetArray=function(ae,j){var Q=j.target;if(typeof Q=="string"&&Q){var re=a.nestedProperty(ae,Q).get();return a.isArrayOrTypedArray(re)?re:!1}else if(a.isArrayOrTypedArray(Q))return Q;return!1};function y(ae,j,Q){var re={};typeof j!="object"&&(j={});var pe=Q==="pieLike"?-1:3,we=Object.keys(ae),Se,Ie,Re;for(Se=0;Se<we.length;Se++)Ie=we[Se],Re=ae[Ie],!(Ie.charAt(0)==="_"||typeof Re=="function")&&(Ie==="module"?re[Ie]=Re:Array.isArray(Re)?Ie==="colorscale"||pe===-1?re[Ie]=Re.slice():re[Ie]=Re.slice(0,pe):a.isTypedArray(Re)?pe===-1?re[Ie]=Re.subarray():re[Ie]=Re.subarray(0,pe):Re&&typeof Re=="object"?re[Ie]=y(ae[Ie],j[Ie],Q):re[Ie]=Re);for(we=Object.keys(j),Se=0;Se<we.length;Se++)Ie=we[Se],Re=j[Ie],(typeof Re!="object"||!(Ie in re)||typeof re[Ie]!="object")&&(re[Ie]=Re);return re}a.minExtend=y,a.titleCase=function(ae){return ae.charAt(0).toUpperCase()+ae.slice(1)},a.containsAny=function(ae,j){for(var Q=0;Q<j.length;Q++)if(ae.indexOf(j[Q])!==-1)return!0;return!1};var m=/Version\/[\d\.]+.*Safari/;a.isSafari=function(){return m.test(window.navigator.userAgent)};var R=/iPad|iPhone|iPod/;a.isIOS=function(){return R.test(window.navigator.userAgent)};var L=/Macintosh.+AppleWebKit.+Gecko\)$/;a.isMacWKWebView=()=>L.test(window.navigator.userAgent);var z=/Firefox\/(\d+)\.\d+/;a.getFirefoxVersion=function(){var ae=z.exec(window.navigator.userAgent);if(ae&&ae.length===2){var j=parseInt(ae[1]);if(!isNaN(j))return j}return null},a.isD3Selection=function(ae){return ae instanceof d.selection},a.ensureSingle=function(ae,j,Q,re){var pe=ae.select(j+(Q?"."+Q:""));if(pe.size())return pe;var we=ae.append(j);return Q&&we.classed(Q,!0),re&&we.call(re),we},a.ensureSingleById=function(ae,j,Q,re){var pe=ae.select(j+"#"+Q);if(pe.size())return pe;var we=ae.append(j).attr("id",Q);return re&&we.call(re),we},a.objectFromPath=function(ae,j){for(var Q=ae.split("."),re,pe=re={},we=0;we<Q.length;we++){var Se=Q[we],Ie=null,Re=Q[we].match(/(.*)\[([0-9]+)\]/);Re?(Se=Re[1],Ie=Re[2],re=re[Se]=[],we===Q.length-1?re[Ie]=j:re[Ie]={},re=re[Ie]):(we===Q.length-1?re[Se]=j:re[Se]={},re=re[Se])}return pe};var F=/^([^\[\.]+)\.(.+)?/,N=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function O(ae){return ae.slice(0,2)==="__"}a.expandObjectPaths=function(ae){var j,Q,re,pe,we,Se,Ie;if(typeof ae=="object"&&!Array.isArray(ae)){for(Q in ae)if(ae.hasOwnProperty(Q))if(j=Q.match(F)){if(pe=ae[Q],re=j[1],O(re))continue;delete ae[Q],ae[re]=a.extendDeepNoArrays(ae[re]||{},a.objectFromPath(Q,a.expandObjectPaths(pe))[re])}else if(j=Q.match(N)){if(pe=ae[Q],re=j[1],O(re))continue;if(we=parseInt(j[2]),delete ae[Q],ae[re]=ae[re]||[],j[3]===".")Ie=j[4],Se=ae[re][we]=ae[re][we]||{},a.extendDeepNoArrays(Se,a.objectFromPath(Ie,a.expandObjectPaths(pe)));else{if(O(re))continue;ae[re][we]=a.expandObjectPaths(pe)}}else{if(O(Q))continue;ae[Q]=a.expandObjectPaths(ae[Q])}}return ae},a.numSeparate=function(ae,j,Q){if(Q||(Q=!1),typeof j!="string"||j.length===0)throw new Error("Separator string required for formatting!");typeof ae=="number"&&(ae=String(ae));var re=/(\d+)(\d{3})/,pe=j.charAt(0),we=j.charAt(1),Se=ae.split("."),Ie=Se[0],Re=Se.length>1?pe+Se[1]:"";if(we&&(Se.length>1||Ie.length>4||Q))for(;re.test(Ie);)Ie=Ie.replace(re,"$1"+we+"$2");return Ie+Re},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var P=/^\w*$/;a.templateString=function(ae,j){var Q={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(re,pe){var we;return P.test(pe)?we=j[pe]:(Q[pe]=Q[pe]||a.nestedProperty(j,pe).get,we=Q[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(ps(To({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(ps(To({},ae),{opts:B}));var X=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(X);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var le={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(ps(To({},ae),{opts:le}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:Q,labels:re={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Ie,Re)=>{let We=["xother","yother"].includes(Ie),at=["_xother","_yother"].includes(Ie),nt=["_xother_","_yother_"].includes(Ie),tt=["xother_","yother_"].includes(Ie),qe=We||at||tt||nt;(at||nt)&&(Ie=Ie.substring(1)),(tt||nt)&&(Ie=Ie.substring(0,Ie.length-1));let he=null,ue=null;if(pe.parseMultDiv){var ne=$(Ie);Ie=ne.key,he=ne.op,ue=ne.number}let Ce;if(qe){if(re[Ie]===void 0)return"";Ce=re[Ie]}else for(let Mt of ae)if(Mt){if(Mt.hasOwnProperty(Ie)){Ce=Mt[Ie];break}if(P.test(Ie)||(Ce=a.nestedProperty(Mt,Ie).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:Mt,max:kt,name:Nt}=pe,Gt=Q===!1?Se:Q;return Mt<kt&&a.warn([`Variable '${Ie}' in ${Nt} could not be found!`,"Please verify that the template is correct.",`Using value: '${Gt}'.`].join(" ")),Mt===kt&&a.warn(`Too many '${Nt}' warnings - additional warnings will be suppressed.`),pe.count++,Gt}if(he==="*"&&(Ce*=ue),he==="/"&&(Ce/=ue),Re){var Ye;if(Re[0]===":"&&(Ye=j?j.numberFormat:a.numberFormat,Ce!==""&&(Ce=Ye(Re.replace(ce,""))(Ce))),Re[0]==="|"){Ye=j?j.timeFormat:x;var rt=a.dateTime2ms(Ce);Ce=a.formatDate(rt,Re.replace(ce,""),!1,Ye)}}else{var Ke=Ie+"Label";re.hasOwnProperty(Ke)&&(Ce=re[Ke])}return qe&&(Ce="("+Ce+")",(at||nt)&&(Ce=" "+Ce),(tt||nt)&&(Ce=Ce+" ")),Ce})}var G=48,Y=57;a.subplotSort=function(ae,j){for(var Q=Math.min(ae.length,j.length)+1,re=0,pe=0,we=0;we<Q;we++){var Se=ae.charCodeAt(we)||0,Ie=j.charCodeAt(we)||0,Re=Se>=G&&Se<=Y,We=Ie>=G&&Ie<=Y;if(Re&&(re=10*re+Se-G),We&&(pe=10*pe+Ie-G),!Re||!We){if(re!==pe)return re-pe;if(Se!==Ie)return Se-Ie}}return pe-re};var ee=2e9;a.seedPseudoRandom=function(){ee=2e9},a.pseudoRandom=function(){var ae=ee;return ee=(69069*ee+1)%4294967296,Math.abs(ee-ae)<429496729?a.pseudoRandom():ee/4294967296},a.fillText=function(ae,j,Q){var re=Array.isArray(Q)?function(Se){Q.push(Se)}:function(Se){Q.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return re(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return re(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var Q=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",re=0;re<j;re++)Q.indexOf(".")!==-1&&(Q=Q.replace("0%","%"),Q=Q.replace(".%","%"));return Q},a.isHidden=function(ae){var j=window.getComputedStyle(ae).display;return!j||j==="none"},a.strTranslate=function(ae,j){return ae||j?"translate("+ae+","+j+")":""},a.strRotate=function(ae){return ae?"rotate("+ae+")":""},a.strScale=function(ae){return ae!==1?"scale("+ae+")":""},a.getTextTransform=function(ae){var j=ae.noCenter,Q=ae.textX,re=ae.textY,pe=ae.targetX,we=ae.targetY,Se=ae.anchorX||0,Ie=ae.anchorY||0,Re=ae.rotate,We=ae.scale;return We?We>1&&(We=1):We=0,a.strTranslate(pe-We*(Q+Se),we-We*(re+Ie))+a.strScale(We)+(Re?"rotate("+Re+(j?"":" "+Q+" "+re)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var Q=a.extendFlat({},j);return Q.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),Q},a.join2=function(ae,j,Q){var re=ae.length;return re>1?ae.slice(0,-1).join(j)+Q+ae[re-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var q=a.getFirefoxVersion(),se=q!==null&&q<86;a.getPositionFromD3Event=function(){return se?[d.event.layerX,d.event.layerY]:[d.event.offsetX,d.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),V={"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;",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(x in V)d=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(d,V[x]);var d,x}}),a5=He({"node_modules/is-browser/client.js"(Z,V){V.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,V){"use strict";var d=a5(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=d,V.exports=x}}),Z0=He({"node_modules/events/events.js"(Z,V){"use strict";var d=typeof Reflect=="object"?Reflect:null,x=d&&typeof d.apply=="function"?d.apply:function(M,g,b){return Function.prototype.apply.call(M,g,b)},S;d&&typeof d.ownKeys=="function"?S=d.ownKeys:Object.getOwnPropertySymbols?S=function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:S=function(M){return Object.getOwnPropertyNames(M)};function E(A){console&&console.warn&&console.warn(A)}var e=Number.isNaN||function(M){return M!==M};function t(){t.init.call(this)}V.exports=t,V.exports.once=l,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var r=10;function o(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number"||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A}}),t.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},t.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||e(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this};function a(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(M){for(var g=[],b=1;b<arguments.length;b++)g.push(arguments[b]);var p=M==="error",u=this._events;if(u!==void 0)p=p&&u.error===void 0;else if(!p)return!1;if(p){var y;if(g.length>0&&(y=g[0]),y instanceof Error)throw y;var m=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw m.context=y,m}var R=u[M];if(R===void 0)return!1;if(typeof R=="function")x(R,this,g);else for(var L=R.length,z=v(R,L),b=0;b<L;++b)x(z[b],this,g);return!0};function n(A,M,g,b){var p,u,y;if(o(g),u=A._events,u===void 0?(u=A._events=Object.create(null),A._eventsCount=0):(u.newListener!==void 0&&(A.emit("newListener",M,g.listener?g.listener:g),u=A._events),y=u[M]),y===void 0)y=u[M]=g,++A._eventsCount;else if(typeof y=="function"?y=u[M]=b?[g,y]:[y,g]:b?y.unshift(g):y.push(g),p=a(A),p>0&&y.length>p&&!y.warned){y.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=A,m.type=M,m.count=y.length,E(m)}return A}t.prototype.addListener=function(M,g){return n(this,M,g,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(M,g){return n(this,M,g,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(A,M,g){var b={fired:!1,wrapFn:void 0,target:A,type:M,listener:g},p=i.bind(b);return p.listener=g,b.wrapFn=p,p}t.prototype.once=function(M,g){return o(g),this.on(M,s(this,M,g)),this},t.prototype.prependOnceListener=function(M,g){return o(g),this.prependListener(M,s(this,M,g)),this},t.prototype.removeListener=function(M,g){var b,p,u,y,m;if(o(g),p=this._events,p===void 0)return this;if(b=p[M],b===void 0)return this;if(b===g||b.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete p[M],p.removeListener&&this.emit("removeListener",M,b.listener||g));else if(typeof b!="function"){for(u=-1,y=b.length-1;y>=0;y--)if(b[y]===g||b[y].listener===g){m=b[y].listener,u=y;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(p[M]=b[0]),p.removeListener!==void 0&&this.emit("removeListener",M,m||g)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(M){var g,b,p;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[M]),this;if(arguments.length===0){var u=Object.keys(b),y;for(p=0;p<u.length;++p)y=u[p],y!=="removeListener"&&this.removeAllListeners(y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(g=b[M],typeof g=="function")this.removeListener(M,g);else if(g!==void 0)for(p=g.length-1;p>=0;p--)this.removeListener(M,g[p]);return this};function h(A,M,g){var b=A._events;if(b===void 0)return[];var p=b[M];return p===void 0?[]:typeof p=="function"?g?[p.listener||p]:[p]:g?T(p):v(p,p.length)}t.prototype.listeners=function(M){return h(this,M,!0)},t.prototype.rawListeners=function(M){return h(this,M,!1)},t.listenerCount=function(A,M){return typeof A.listenerCount=="function"?A.listenerCount(M):f.call(A,M)},t.prototype.listenerCount=f;function f(A){var M=this._events;if(M!==void 0){var g=M[A];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function v(A,M){for(var g=new Array(M),b=0;b<M;++b)g[b]=A[b];return g}function c(A,M){for(;M+1<A.length;M++)A[M]=A[M+1];A.pop()}function T(A){for(var M=new Array(A.length),g=0;g<M.length;++g)M[g]=A[g].listener||A[g];return M}function l(A,M){return new Promise(function(g,b){function p(y){A.removeListener(M,u),b(y)}function u(){typeof A.removeListener=="function"&&A.removeListener("error",p),g([].slice.call(arguments))}w(A,M,u,{once:!0}),M!=="error"&&_(A,p,{once:!0})})}function _(A,M,g){typeof A.on=="function"&&w(A,"error",M,g)}function w(A,M,g,b){if(typeof A.on=="function")b.once?A.once(M,g):A.on(M,g);else if(typeof A.addEventListener=="function")A.addEventListener(M,function p(u){b.once&&A.removeEventListener(M,p),g(u)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}}}),Qy=He({"src/lib/events.js"(Z,V){"use strict";var d=Z0().EventEmitter,x={init:function(S){if(S._ev instanceof d)return S;var E=new d,e=new d;return S._ev=E,S._internalEv=e,S.on=E.on.bind(E),S.once=E.once.bind(E),S.removeListener=E.removeListener.bind(E),S.removeAllListeners=E.removeAllListeners.bind(E),S._internalOn=e.on.bind(e),S._internalOnce=e.once.bind(e),S._removeInternalListener=e.removeListener.bind(e),S._removeAllInternalListeners=e.removeAllListeners.bind(e),S.emit=function(t,r){E.emit(t,r),e.emit(t,r)},typeof S.addEventListener=="function"&&S.addEventListener("wheel",()=>{},{passive:!0}),S},triggerHandler:function(S,E,e){var t,r=S._ev;if(!r)return;var o=r._events[E];if(!o)return;function a(i){if(i.listener){if(r.removeListener(E,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[e])}else return i.apply(r,[e])}o=Array.isArray(o)?o:[o];var n;for(n=0;n<o.length-1;n++)a(o[n]);return t=a(o[n]),t},purge:function(S){return delete S._ev,delete S.on,delete S.once,delete S.removeListener,delete S.removeAllListeners,delete S.emit,delete S._ev,delete S._internalEv,delete S._internalOn,delete S._internalOnce,delete S._removeInternalListener,delete S._removeAllInternalListeners,S}};V.exports=x}}),iz=He({"src/lib/queue.js"(Z,V){"use strict";var d=sa(),x=X0().dfltConfig;function S(e,t){for(var r=[],o,a=0;a<t.length;a++)o=t[a],o===e?r[a]=o:typeof o=="object"?r[a]=Array.isArray(o)?d.extendDeep([],o):d.extendDeepAll({},o):r[a]=o;return r}var E={};E.add=function(e,t,r,o,a){var n,i;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},i=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(n={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(i,e.undoQueue.queue.length-i,n),e.undoQueue.index+=1):n=e.undoQueue.queue[i-1],e.undoQueue.beginSequence=!1,n&&(n.undo.calls.unshift(t),n.undo.args.unshift(r),n.redo.calls.push(o),n.redo.args.push(a)),e.undoQueue.queue.length>x.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},E.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},E.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},E.undo=function(t){var r,o;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,o=0;o<r.undo.calls.length;o++)E.plotDo(t,r.undo.calls[o],r.undo.args[o]);t.undoQueue.inSequence=!1,t.autoplay=!1}},E.redo=function(t){var r,o;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o<r.redo.calls.length;o++)E.plotDo(t,r.redo.calls[o],r.redo.args[o]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},E.plotDo=function(e,t,r){e.autoplay=!0,r=S(e,r),t.apply(null,r)},V.exports=E}}),n5=He({"src/plots/frame_attributes.js"(Z,V){"use strict";V.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),e1=He({"src/plot_api/plot_schema.js"(Z){"use strict";var V=lo(),d=sa(),x=ru(),S=$y(),E=n5(),e=A_(),t=X0().configAttributes,r=pc(),o=d.extendDeepAll,a=d.isPlainObject,n=d.isArrayOrTypedArray,i=d.nestedProperty,s=d.valObjectMeta,h="_isSubplotObj",f="_isLinkedToArray",v="_arrayAttrRegexps",c="_deprecated",T=[h,f,v,c];Z.IS_SUBPLOT_OBJ=h,Z.IS_LINKED_TO_ARRAY=f,Z.DEPRECATED=c,Z.UNDERSCORE_ATTRS=T,Z.get=function(){var L={};return V.allTypes.forEach(function(z){L[z]=A(z)}),{defs:{valObjects:s,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:L,layout:M(),frames:g(),animation:b(e),config:b(t)}},Z.crawl=function(L,z,F,N){var O=F||0;N=N||"",Object.keys(L).forEach(function(P){var U=L[P];if(T.indexOf(P)===-1){var B=(N?N+".":"")+P;z(U,P,L,O,B),!Z.isValObject(U)&&a(U)&&P!=="impliedEdits"&&Z.crawl(U,z,O+1,B)}})},Z.isValObject=function(L){return L&&L.valType!==void 0},Z.findArrayAttributes=function(L){var z=[],F=[],N=[],O,P;function U(X,$,le,ce){F=F.slice(0,ce).concat([$]),N=N.slice(0,ce).concat([X&&X._isLinkedToArray]);var de=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(F[ce-1]==="colorbar"&&($==="ticktext"||$==="tickvals"));de&&B(O,0,"")}function B(X,$,le){var ce=X[F[$]],de=le+F[$];if($===F.length-1)n(ce)&&z.push(P+de);else if(N[$]){if(Array.isArray(ce))for(var G=0;G<ce.length;G++)a(ce[G])&&B(ce[G],$+1,de+"["+G+"].")}else a(ce)&&B(ce,$+1,de+".")}return O=L,P="",Z.crawl(x,U),L._module&&L._module.attributes&&Z.crawl(L._module.attributes,U),z},Z.getTraceValObject=function(L,z){var F=z[0],N=1,O,P,U=L._module;if(U||(U=(V.modules[L.type||x.type.dflt]||{})._module),!U)return!1;if(O=U.attributes,P=O&&O[F],!P){var B=U.basePlotModule;B&&B.attributes&&(P=B.attributes[F])}return P||(P=x[F]),_(P,z,N)},Z.getLayoutValObject=function(L,z){var F=l(L,z[0]);return _(F,z,1)};function l(L,z){var F,N,O,P,U=L._basePlotModules;if(U){var B;for(F=0;F<U.length;F++){if(O=U[F],O.attrRegex&&O.attrRegex.test(z)){if(O.layoutAttrOverrides)return O.layoutAttrOverrides;!B&&O.layoutAttributes&&(B=O.layoutAttributes)}var X=O.baseLayoutAttrOverrides;if(X&&z in X)return X[z]}if(B)return B}var $=L._modules;if($){for(F=0;F<$.length;F++)if(P=$[F].layoutAttributes,P&&z in P)return P[z]}for(N in V.componentsRegistry){if(O=V.componentsRegistry[N],O.name==="colorscale"&&z.indexOf("coloraxis")===0)return O.layoutAttributes[z];if(!O.schema&&z===O.name)return O.layoutAttributes}return z in S?S[z]:!1}function _(L,z,F){if(!L)return!1;if(L._isLinkedToArray){if(w(z[F]))F++;else if(F<z.length)return!1}for(;F<z.length;F++){var N=L[z[F]];if(a(N))L=N;else break;if(F===z.length-1)break;if(L._isLinkedToArray){if(F++,!w(z[F]))return!1}else if(L.valType==="info_array"){F++;var O=z[F];if(!w(O))return!1;var P=L.items;if(Array.isArray(P)){if(O>=P.length)return!1;if(L.dimensions===2){if(F++,z.length===F)return L;var U=z[F];if(!w(U))return!1;L=P[O][U]}else L=P[O]}else L=P}}return L}function w(L){return L===Math.round(L)&&L>=0}function A(L){var z,F;z=V.modules[L]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},x),P=o({},z.attributes);Z.crawl(P,function(X,$,le,ce,de){i(O,de).set(void 0),X===void 0&&i(P,de).set(void 0)}),o(N,O),V.traceIs(L,"noOpacity")&&delete N.opacity,V.traceIs(L,"showLegend")||(delete N.showlegend,delete N.legendgroup),V.traceIs(L,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,P),F.attributes&&o(N,F.attributes),N.type=L;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:L,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(X){Z.isValObject(X)&&"anim"in X&&delete X.anim}),U}function M(){var L={},z,F;o(L,S);for(z in V.subplotsRegistry)if(F=V.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N<F.attr.length;N++)m(L,F,F.attr[N]);else{var O=F.attr==="subplot"?F.name:F.attr;m(L,F,O)}for(z in V.componentsRegistry){F=V.componentsRegistry[z];var P=F.schema;if(P&&(P.subplots||P.layout)){var U=P.subplots;if(U&&U.xaxis&&!U.yaxis)for(var B in U.xaxis)delete L.yaxis[B];delete L.xaxis.shift,delete L.xaxis.autoshift}else F.name==="colorscale"?o(L,F.layoutAttributes):F.layoutAttributes&&R(L,F.layoutAttributes,F.name)}return{layoutAttributes:b(L)}}function g(){var L={frames:o({},E)};return b(L),L.frames}function b(L){return p(L),u(L),y(L),L}function p(L){function z(N){return{valType:"string",editType:"none"}}function F(N,O,P){Z.isValObject(N)?(N.arrayOk===!0||N.valType==="data_array")&&(P[O+"src"]=z(O)):a(N)&&(N.role="object")}Z.crawl(L,F)}function u(L){function z(F,N,O){if(F){var P=F[f];P&&(delete F[f],O[N]={items:{}},O[N].items[P]=F,O[N].role="object")}}Z.crawl(L,z)}function y(L){function z(F){for(var N in F)if(a(F[N]))z(F[N]);else if(Array.isArray(F[N]))for(var O=0;O<F[N].length;O++)z(F[N][O]);else F[N]instanceof RegExp&&(F[N]=F[N].toString())}z(L)}function m(L,z,F){var N=i(L,F),O=o({},z.layoutAttributes);O[h]=!0,N.set(O)}function R(L,z,F){var N=i(L,F);N.set(o(N.get()||{},z))}}}),zl=He({"src/plot_api/plot_template.js"(Z){"use strict";var V=sa(),d=ru(),x="templateitemname",S={name:{valType:"string",editType:"none"}};S[x]={valType:"string",editType:"calc"},Z.templatedArray=function(t,r){return r._isLinkedToArray=t,r.name=S.name,r[x]=S[x],r},Z.traceTemplater=function(t){var r={},o,a;for(o in t)a=t[o],Array.isArray(a)&&a.length&&(r[o]=0);function n(i){o=V.coerce(i,{},d,"type");var s={type:o,_template:null};if(o in r){a=t[o];var h=r[o]%a.length;r[o]++,s._template=a[h]}return s}return{newTrace:n}},Z.newContainer=function(t,r,o){var a=t._template,n=a&&(a[r]||o&&a[o]);V.isPlainObject(n)||(n=null);var i=t[r]={_template:n};return i},Z.arrayTemplater=function(t,r,o){var a=t._template,n=a&&a[e(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var s={};function h(v){var c={name:v.name,_input:v},T=c[x]=v[x];if(!E(T))return c._template=n,c;for(var l=0;l<i.length;l++){var _=i[l];if(_.name===T)return s[T]=1,c._template=_,c}return c[o]=v[o]||!1,c._template=!1,c}function f(){for(var v=[],c=0;c<i.length;c++){var T=i[c],l=T.name;if(E(l)&&!s[l]){var _={_template:T,name:l,_input:{_templateitemname:l}};_[x]=T[x],v.push(_),s[l]=1}}return v}return{newItem:h,defaultItems:f}};function E(t){return t&&typeof t=="string"}function e(t){var r=t.length-1;return t.charAt(r)!=="s"&&V.warn("bad argument to arrayDefaultKey: "+t),t.slice(0,-1)+"defaults"}Z.arrayDefaultKey=e,Z.arrayEditor=function(t,r,o){var a=(V.nestedProperty(t,r).get()||[]).length,n=o._index,i=n>=a&&(o._input||{})._templateitemname;i&&(n=a);var s=r+"["+n+"]",h;function f(){h={},i&&(h[s]={},h[s][x]=i)}f();function v(_,w){h[_]=w}function c(_,w){i?V.nestedProperty(h[s],_).set(w):h[s+"."+_]=w}function T(){var _=h;return f(),_}function l(_,w){_&&c(_,w);var A=T();for(var M in A)V.nestedProperty(t,M).set(A[M])}return{modifyBase:v,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,V){"use strict";var d=Jy().counter;V.exports={idRegex:{x:d("x","( domain)?"),y:d("y","( domain)?")},attrRegex:d("[xy]axis"),xAxisMatch:d("xaxis"),yAxisMatch:d("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"}}}),ef=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var V=lo(),d=lh();Z.id2name=function(E){if(!(typeof E!="string"||!E.match(d.AX_ID_PATTERN))){var e=E.split(" ")[0].slice(1);return e==="1"&&(e=""),E.charAt(0)+"axis"+e}},Z.name2id=function(E){if(E.match(d.AX_NAME_PATTERN)){var e=E.slice(5);return e==="1"&&(e=""),E.charAt(0)+e}},Z.cleanId=function(E,e,t){var r=/( domain)$/.test(E);if(!(typeof E!="string"||!E.match(d.AX_ID_PATTERN))&&!(e&&E.charAt(0)!==e)&&!(r&&!t)){var o=E.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),E.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,E,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,E),o=new Array(r.length),a;for(a=0;a<r.length;a++){var n=r[a];o[a]=t[n.charAt(0)+"axis"+n.slice(1)]}if(!e){var i=t._subplots.gl3d||[];for(a=0;a<i.length;a++){var s=t[i[a]];E?o.push(s[E+"axis"]):o.push(s.xaxis,s.yaxis,s.zaxis)}}return o},Z.listIds=function(S,E){var e=S._fullLayout;if(!e)return[];var t=e._subplots;return E?t[E+"axis"]:t.xaxis.concat(t.yaxis)},Z.getFromId=function(S,E,e){var t=S._fullLayout;return E=E===void 0||typeof E!="string"?E:E.replace(" domain",""),e==="x"?E=E.replace(/y[0-9]*/,""):e==="y"&&(E=E.replace(/x[0-9]*/,"")),t[Z.id2name(E)]},Z.getFromTrace=function(S,E,e){var t=S._fullLayout,r=null;if(V.traceIs(E,"gl3d")){var o=E.scene;o.slice(0,5)==="scene"&&(r=t[o][e+"axis"])}else r=Z.getFromId(S,E[e+"axis"]||e);return r},Z.idSort=function(S,E){var e=S.charAt(0),t=E.charAt(0);return e!==t?e>t?1:-1:+(S.slice(1)||1)-+(E.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function x(S,E){if(E&&E.length){for(var e=0;e<E.length;e++)if(E[e][S])return!0}return!1}Z.isLinked=function(S,E){return x(E,S._axisMatchGroups)||x(E,S._axisConstraintGroups)}}}),$m=He({"src/components/shapes/handle_outline.js"(Z,V){"use strict";function d(S){var E=S._fullLayout._zoomlayer;E&&E.selectAll(".outline-controllers").remove()}function x(S){var E=S._fullLayout._zoomlayer;E&&E.selectAll(".select-outline").remove(),S._fullLayout._outlining=!1}V.exports={clearOutlineControllers:d,clearOutline:x}}}),_2=He({"src/traces/scatter/layout_attributes.js"(Z,V){"use strict";V.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Hh=He({"src/plots/get_data.js"(Z){"use strict";var V=lo(),d=lh().SUBPLOT_PATTERN;Z.getSubplotCalcData=function(x,S,E){var e=V.subplotsRegistry[S];if(!e)return[];for(var t=e.attr,r=[],o=0;o<x.length;o++){var a=x[o],n=a[0].trace;n[t]===E&&r.push(a)}return r},Z.getModuleCalcData=function(x,S,E){var e=[],t=[],r;if(typeof S=="string"?r=V.getModule(S).plot:typeof S=="function"?r=S:r=S.plot,!r)return[e,x];for(var o=E,a=0;a<x.length;a++){var n=x[a],i=n[0].trace,s=i.zorder!==void 0;i.visible!==!0||i._length===0||(i._module&&i._module.plot===r&&(!s||i.zorder===o)?e.push(n):t.push(n))}return[e,t]},Z.getSubplotData=function(S,E,e){if(!V.subplotsRegistry[E])return[];for(var t=V.subplotsRegistry[E].attr,r=[],o,a,n,i=0;i<S.length;i++)o=S[i],o[t]===e&&r.push(o);return r}}}),nz=He({"src/plots/command.js"(Z){"use strict";var V=lo(),d=sa();Z.manageCommandObserver=function(r,o,a,n){var i={},s=!0;o&&o._commandObserver&&(i=o._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var h=Z.hasSimpleAPICommandBindings(r,a,i.lookupTable);if(o&&o._commandObserver){if(h)return i;if(o._commandObserver.remove)return o._commandObserver.remove(),o._commandObserver=null,i}if(h){x(r,h,i.cache),i.check=function(){if(s){var T=x(r,h,i.cache);return T.changed&&n&&i.lookupTable[T.value]!==void 0&&(i.disable(),Promise.resolve(n({value:T.value,type:h.type,prop:h.prop,traces:h.traces,index:i.lookupTable[T.value]})).then(i.enable,i.enable)),T.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],v=0;v<f.length;v++)r._internalOn(f[v],i.check);i.remove=function(){for(var c=0;c<f.length;c++)r._removeInternalListener(f[c],i.check)}}else d.log("Unable to automatically bind plot updates to API command"),i.lookupTable={},i.remove=function(){};return i.disable=function(){s=!1},i.enable=function(){s=!0},o&&(o._commandObserver=i),i},Z.hasSimpleAPICommandBindings=function(r,o,a){var n,i=o.length,s;for(n=0;n<i;n++){var h,f=o[n],v=f.method,c=f.args;if(Array.isArray(c)||(c=[]),!v)return!1;var T=Z.computeAPICommandBindings(r,v,c);if(T.length!==1)return!1;if(!s)s=T[0],Array.isArray(s.traces)&&s.traces.sort();else{if(h=T[0],h.type!==s.type||h.prop!==s.prop)return!1;if(Array.isArray(s.traces))if(Array.isArray(h.traces)){h.traces.sort();for(var l=0;l<s.traces.length;l++)if(s.traces[l]!==h.traces[l])return!1}else return!1;else if(h.prop!==s.prop)return!1}h=T[0];var _=h.value;if(Array.isArray(_))if(_.length===1)_=_[0];else return!1;a&&(a[_]=n)}return s};function x(r,o,a){var n,i,s,h=!1;if(o.type==="data")n=r._fullData[o.traces!==null?o.traces[0]:0];else if(o.type==="layout")n=r._fullLayout;else return!1;return i=d.nestedProperty(n,o.prop).get(),s=a[o.type]=a[o.type]||{},s.hasOwnProperty(o.prop)&&s[o.prop]!==i&&(h=!0),s[o.prop]=i,{changed:h,value:i}}Z.executeAPICommand=function(r,o,a){if(o==="skip")return Promise.resolve();var n=V.apiMethodRegistry[o],i=[r];Array.isArray(a)||(a=[]);for(var s=0;s<a.length;s++)i.push(a[s]);return n.apply(null,i).catch(function(h){return d.warn("API call to Plotly."+o+" rejected.",h),Promise.reject(h)})},Z.computeAPICommandBindings=function(r,o,a){var n;switch(Array.isArray(a)||(a=[]),o){case"restyle":n=e(r,a);break;case"relayout":n=E(r,a);break;case"update":n=e(r,[a[0],a[2]]).concat(E(r,[a[1]]));break;case"animate":n=S(r,a);break;default:n=[]}return n};function S(r,o){return Array.isArray(o[0])&&o[0].length===1&&["string","number"].indexOf(typeof o[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:o[0][0].toString()}]:[]}function E(r,o){var a=[],n=o[0],i={};if(typeof n=="string")i[n]=o[1];else if(d.isPlainObject(n))i=n;else return a;return t(i,function(s,h,f){a.push({type:"layout",prop:s,value:f})},"",0),a}function e(r,o){var a,n,i,s,h=[];if(n=o[0],i=o[1],a=o[2],s={},typeof n=="string")s[n]=i;else if(d.isPlainObject(n))s=n,a===void 0&&(a=i);else return h;return a===void 0&&(a=null),t(s,function(f,v,c){var T,l;if(Array.isArray(c)){l=c.slice();var _=Math.min(l.length,r.data.length);a&&(_=Math.min(_,a.length)),T=[];for(var w=0;w<_;w++)T[w]=a?a[w]:w}else l=c,T=a?a.slice():null;if(T===null)Array.isArray(l)&&(l=l[0]);else if(Array.isArray(T)){if(!Array.isArray(l)){var A=l;l=[];for(var M=0;M<T.length;M++)l[M]=A}l.length=Math.min(T.length,l.length)}h.push({type:"data",prop:f,traces:T,value:l})},"",0),h}function t(r,o,a,n){Object.keys(r).forEach(function(i){var s=r[i];if(i[0]!=="_"){var h=a+(n>0?".":"")+i;d.isPlainObject(s)?t(s,o,h,n+1):o(h,i,s)}})}}}),bc=He({"src/plots/plots.js"(Z,V){"use strict";var d=Wn(),x=Xv().timeFormatLocale,S=YA().formatLocale,E=as(),e=KA(),t=lo(),r=e1(),o=zl(),a=sa(),n=Jn(),i=Ws().BADNUM,s=ef(),h=$m().clearOutline,f=_2(),v=A_(),c=n5(),T=Hh().getModuleCalcData,l=a.relinkPrivateKeys,_=a._,w=V.exports={};a.extendFlat(w,t),w.attributes=ru(),w.attributes.type.values=w.allTypes,w.fontAttrs=tc(),w.layoutAttributes=$y();var A=nz();w.executeAPICommand=A.executeAPICommand,w.computeAPICommandBindings=A.computeAPICommandBindings,w.manageCommandObserver=A.manageCommandObserver,w.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,w.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(Y){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),Y(w.previousPromises(G)))},300)})},w.resize=function(G){G=a.getGraphDiv(G);var Y,ee=new Promise(function(q,se){(!G||a.isHidden(G))&&se(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(Y=G._resolveResize),G._resolveResize=q,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){q(G);return}delete G.layout.width,delete G.layout.height;var ae=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=ae,G._resolveResize===q&&(delete G._resolveResize,q(G))})},100)});return Y&&Y(ee),ee},w.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},w.addLinks=function(G){if(!(!G._context.showLink&&!G._context.showSources)){var Y=G._fullLayout,ee=a.ensureSingle(Y._paper,"text","js-plot-link-container",function(re){re.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var pe=d.select(this);pe.append("tspan").classed("js-link-to-tool",!0),pe.append("tspan").classed("js-link-spacer",!0),pe.append("tspan").classed("js-sourcelinks",!0)})}),q=ee.node(),se={y:Y._paper.attr("height")-9};document.body.contains(q)&&q.getComputedTextLength()>=Y.width-20?(se["text-anchor"]="start",se.x=5):(se["text-anchor"]="end",se.x=Y._paper.attr("width")-7),ee.attr(se);var ae=ee.select(".js-link-to-tool"),j=ee.select(".js-link-spacer"),Q=ee.select(".js-sourcelinks");G._context.showSources&&G._context.showSources(G),G._context.showLink&&M(G,ae),j.text(ae.text()&&Q.text()?" - ":"")}};function M(G,Y){Y.text("");var ee=Y.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(G._context.linkText+" \xBB");if(G._context.sendData)ee.on("click",function(){w.sendDataToCloud(G)});else{var q=window.location.pathname.split("/"),se=window.location.search;ee.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+q[2].split(".")[0]+"/"+q[1]+se})}}w.sendDataToCloud=function(G){var Y=(window.PLOTLYENV||{}).BASE_URL||G._context.plotlyServerURL;if(Y){G.emit("plotly_beforeexport");var ee=d.select(G).append("div").attr("id","hiddenform").style("display","none"),q=ee.append("form").attr({action:Y+"/external",method:"post",target:"_blank"}),se=q.append("input").attr({type:"text",name:"data"});return se.node().value=w.graphJson(G,!1,"keepdata"),q.node().submit(),ee.remove(),G.emit("plotly_afterexport"),!1}};var g=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];w.supplyDefaults=function(G,Y){var ee=Y&&Y.skipUpdateCalc,q=G._fullLayout||{};if(q._skipDefaults){delete q._skipDefaults;return}var se=G._fullLayout={},ae=G.layout||{},j=G._fullData||[],Q=G._fullData=[],re=G.data||[],pe=G.calcdata||[],we=G._context||{},Se;G._transitionData||w.createTransitionData(G),se._dfltTitle={plot:_(G,"Click to enter Plot title"),subtitle:_(G,"Click to enter Plot subtitle"),x:_(G,"Click to enter X axis title"),y:_(G,"Click to enter Y axis title"),colorbar:_(G,"Click to enter Colorscale title"),annotation:_(G,"new text")},se._traceWord=_(G,"trace");var Ie=y(G,g);if(se._mapboxAccessToken=we.mapboxAccessToken,q._initialAutoSizeIsDone){var Re=q.width,We=q.height;w.supplyLayoutGlobalDefaults(ae,se,Ie),ae.width||(se.width=Re),ae.height||(se.height=We),w.sanitizeMargins(se)}else{w.supplyLayoutGlobalDefaults(ae,se,Ie);var at=!ae.width||!ae.height,nt=se.autosize,tt=we.autosizable,qe=at&&(nt||tt);qe?w.plotAutoSize(G,ae,se):at&&w.sanitizeMargins(se),!nt&&at&&(ae.width=se.width,ae.height=se.height)}se._d3locale=m(Ie,se.separators),se._extraFormat=y(G,b),se._initialAutoSizeIsDone=!0,se._dataLength=re.length,se._modules=[],se._visibleModules=[],se._basePlotModules=[];var he=se._subplots=u(),ue=se._splomAxes={x:{},y:{}},ne=se._splomSubplots={};se._splomGridDflt={},se._scatterStackOpts={},se._firstScatter={},se._alignmentOpts={},se._colorAxes={},se._requestRangeslider={},se._traceUids=p(j,re),w.supplyDataDefaults(re,Q,ae,se);var Ce=Object.keys(ue.x),Ye=Object.keys(ue.y);if(Ce.length>1&&Ye.length>1){for(t.getComponentMethod("grid","sizeDefaults")(ae,se),Se=0;Se<Ce.length;Se++)a.pushUnique(he.xaxis,Ce[Se]);for(Se=0;Se<Ye.length;Se++)a.pushUnique(he.yaxis,Ye[Se]);for(var rt in ne)a.pushUnique(he.cartesian,rt)}if(se._has=w._hasPlotType.bind(se),j.length===Q.length)for(Se=0;Se<Q.length;Se++)l(Q[Se],j[Se]);w.supplyLayoutModuleDefaults(ae,se,Q,G._transitionData);var Ke=se._visibleModules,Mt=[];for(Se=0;Se<Ke.length;Se++){var kt=Ke[Se].crossTraceDefaults;kt&&a.pushUnique(Mt,kt)}for(Se=0;Se<Mt.length;Se++)Mt[Se](Q,se);se._hasOnlyLargeSploms=se._basePlotModules.length===1&&se._basePlotModules[0].name==="splom"&&Ce.length>15&&Ye.length>15&&se.shapes.length===0&&se.images.length===0,w.linkSubplots(Q,se,j,q),w.cleanPlot(Q,se,j,q);var Nt=!!(q._has&&q._has("cartesian")),Gt=!!(se._has&&se._has("cartesian")),Mr=Nt,mr=Gt;Mr&&!mr?q._bgLayer.remove():mr&&!Mr&&(se._shouldCreateBgLayer=!0),q._zoomlayer&&!G._dragging&&h({_fullLayout:q}),R(Q,se),l(se,q),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,se),se._preGUI||(se._preGUI={}),se._tracePreGUI||(se._tracePreGUI={});var qr=se._tracePreGUI,Er={},Ir;for(Ir in qr)Er[Ir]="old";for(Se=0;Se<Q.length;Se++)Ir=Q[Se]._fullInput.uid,Er[Ir]||(qr[Ir]={}),Er[Ir]="new";for(Ir in Er)Er[Ir]==="old"&&delete qr[Ir];F(se),t.getComponentMethod("rangeslider","makeData")(se),!ee&&pe.length===Q.length&&w.supplyDefaultsUpdateCalc(pe,Q)},w.supplyDefaultsUpdateCalc=function(G,Y){for(var ee=0;ee<Y.length;ee++){var q=Y[ee],se=(G[ee]||[])[0];if(se&&se.trace){var ae=se.trace;if(ae._hasCalcTransform){var j=ae._arrayAttrs,Q,re,pe;for(Q=0;Q<j.length;Q++)re=j[Q],pe=a.nestedProperty(ae,re).get().slice(),a.nestedProperty(q,re).set(pe)}se.trace=q}}};function p(G,Y){var ee=Y.length,q=[],se,ae;for(se=0;se<G.length;se++){var j=G[se]._fullInput;j!==ae&&q.push(j),ae=j}var Q=q.length,re=new Array(ee),pe={};function we(Re,We){re[We]=Re,pe[Re]=1}function Se(Re,We){if(Re&&typeof Re=="string"&&!pe[Re])return we(Re,We),!0}for(se=0;se<ee;se++){var Ie=Y[se].uid;typeof Ie=="number"&&(Ie=String(Ie)),!Se(Ie,se)&&(se<Q&&Se(q[se].uid,se)||we(a.randstr(pe),se))}return re}function u(){var G=t.collectableSubplotTypes,Y={},ee,q;if(!G){G=[];var se=t.subplotsRegistry;for(var ae in se){var j=se[ae],Q=j.attr;if(Q&&(G.push(ae),Array.isArray(Q)))for(q=0;q<Q.length;q++)a.pushUnique(G,Q[q])}}for(ee=0;ee<G.length;ee++)Y[G[ee]]=[];return Y}function y(G,Y){var ee=G._context.locale;ee||(ee="en-US");var q=!1,se={};function ae(Se){for(var Ie=!0,Re=0;Re<Y.length;Re++){var We=Y[Re];se[We]||(Se[We]?se[We]=Se[We]:Ie=!1)}Ie&&(q=!0)}for(var j=0;j<2;j++){for(var Q=G._context.locales,re=0;re<2;re++){var pe=(Q[ee]||{}).format;if(pe&&(ae(pe),q))break;Q=t.localeRegistry}var we=ee.split("-")[0];if(q||we===ee)break;ee=we}return q||ae(t.localeRegistry.en.format),se}function m(G,Y){return G.decimal=Y.charAt(0),G.thousands=Y.charAt(1),{numberFormat:function(ee){try{ee=S(G).format(a.adjustFormat(ee))}catch{return a.warnBadFormat(ee),a.noFormat}return ee},timeFormat:x(G).utcFormat}}function R(G,Y){var ee,q=[];Y.meta&&(ee=Y._meta={meta:Y.meta,layout:{meta:Y.meta}});for(var se=0;se<G.length;se++){var ae=G[se];ae.meta?q[ae.index]=ae._meta={meta:ae.meta}:Y.meta&&(ae._meta={meta:Y.meta}),Y.meta&&(ae._meta.layout={meta:Y.meta})}q.length&&(ee||(ee=Y._meta={}),ee.data=q)}w.createTransitionData=function(G){G._transitionData||(G._transitionData={}),G._transitionData._frames||(G._transitionData._frames=[]),G._transitionData._frameHash||(G._transitionData._frameHash={}),G._transitionData._counter||(G._transitionData._counter=0),G._transitionData._interruptCallbacks||(G._transitionData._interruptCallbacks=[])},w._hasPlotType=function(G){var Y,ee=this._basePlotModules||[];for(Y=0;Y<ee.length;Y++)if(ee[Y].name===G)return!0;var q=this._modules||[];for(Y=0;Y<q.length;Y++){var se=q[Y].name;if(se===G)return!0;var ae=t.modules[se];if(ae&&ae.categories[G])return!0}return!1},w.cleanPlot=function(G,Y,ee,q){var se,ae,j=q._basePlotModules||[];for(se=0;se<j.length;se++){var Q=j[se];Q.clean&&Q.clean(G,Y,ee,q)}var re=q._has&&q._has("gl"),pe=Y._has&&Y._has("gl");re&&!pe&&q._glcontainer!==void 0&&(q._glcontainer.selectAll(".gl-canvas").remove(),q._glcontainer.selectAll(".no-webgl").remove(),q._glcanvas=null);var we=!!q._infolayer;e:for(se=0;se<ee.length;se++){var Se=ee[se],Ie=Se.uid;for(ae=0;ae<G.length;ae++){var Re=G[ae];if(Ie===Re.uid)continue e}we&&q._infolayer.select(".cb"+Ie).remove()}},w.linkSubplots=function(G,Y,ee,q){var se,ae,j=q._plots||{},Q=Y._plots={},re=Y._subplots,pe={_fullData:G,_fullLayout:Y},we=re.cartesian||[];for(se=0;se<we.length;se++){var Se=we[se],Ie=j[Se],Re=s.getFromId(pe,Se,"x"),We=s.getFromId(pe,Se,"y"),at;for(Ie?at=Q[Se]=Ie:(at=Q[Se]={},at.id=Se),Re._counterAxes.push(We._id),We._counterAxes.push(Re._id),Re._subplotsWith.push(Se),We._subplotsWith.push(Se),at.xaxis=Re,at.yaxis=We,at._hasClipOnAxisFalse=!1,ae=0;ae<G.length;ae++){var nt=G[ae];if(nt.xaxis===at.xaxis._id&&nt.yaxis===at.yaxis._id&&nt.cliponaxis===!1){at._hasClipOnAxisFalse=!0;break}}}var tt=s.list(pe,null,!0),qe;for(se=0;se<tt.length;se++){qe=tt[se];var he=null;qe.overlaying&&(he=s.getFromId(pe,qe.overlaying),he&&he.overlaying&&(qe.overlaying=!1,he=null)),qe._mainAxis=he||qe,he&&(qe.domain=he.domain.slice()),qe._anchorAxis=qe.anchor==="free"?null:s.getFromId(pe,qe.anchor)}for(se=0;se<tt.length;se++)if(qe=tt[se],qe._counterAxes.sort(s.idSort),qe._subplotsWith.sort(a.subplotSort),qe._mainSubplot=L(qe,Y),qe._counterAxes.length&&(qe.spikemode&&qe.spikemode.indexOf("across")!==-1||qe.automargin&&qe.mirror&&qe.anchor!=="free"||t.getComponentMethod("rangeslider","isVisible")(qe))){var ue=1,ne=0;for(ae=0;ae<qe._counterAxes.length;ae++){var Ce=s.getFromId(pe,qe._counterAxes[ae]);ue=Math.min(ue,Ce.domain[0]),ne=Math.max(ne,Ce.domain[1])}ue<ne&&(qe._counterDomainMin=ue,qe._counterDomainMax=ne)}};function L(G,Y){var ee={_fullLayout:Y},q=G._id.charAt(0)==="x",se=G._mainAxis._anchorAxis,ae="",j="",Q="";if(se&&(Q=se._mainAxis._id,ae=q?G._id+Q:Q+G._id),!ae||!Y._plots[ae]){ae="";for(var re=G._counterAxes,pe=0;pe<re.length;pe++){var we=re[pe],Se=q?G._id+we:we+G._id;j||(j=Se);var Ie=s.getFromId(ee,we);if(Q&&Ie.overlaying===Q){ae=Se;break}}}return ae||j}w.clearExpandedTraceDefaultColors=function(G){var Y,ee,q;function se(j,Q,re,pe){ee[pe]=Q,ee.length=pe+1,j.valType==="color"&&j.dflt===void 0&&Y.push(ee.join("."))}for(ee=[],Y=G._module._colorAttrs,Y||(G._module._colorAttrs=Y=[],r.crawl(G._module.attributes,se)),q=0;q<Y.length;q++){var ae=a.nestedProperty(G,"_input."+Y[q]);ae.get()||a.nestedProperty(G,Y[q]).set(null)}},w.supplyDataDefaults=function(G,Y,ee,q){var se=q._modules,ae=q._visibleModules,j=q._basePlotModules,Q=0,re=0,pe,we,Se;q._transformModules=[];function Ie(qe){Y.push(qe);var he=qe._module;he&&(a.pushUnique(se,he),qe.visible===!0&&a.pushUnique(ae,he),a.pushUnique(j,qe._module.basePlotModule),Q++,qe._input.visible!==!1&&re++)}var Re={},We=[],at=(ee.template||{}).data||{},nt=o.traceTemplater(at);for(pe=0;pe<G.length;pe++)Se=G[pe],we=nt.newTrace(Se),we.uid=q._traceUids[pe],w.supplyTraceDefaults(Se,we,re,q,pe),we.index=pe,we._input=Se,we._fullInput=we,Ie(we),t.traceIs(we,"carpetAxis")&&(Re[we.carpet]=we),t.traceIs(we,"carpetDependent")&&We.push(pe);for(pe=0;pe<We.length;pe++)if(we=Y[We[pe]],!!we.visible){var tt=Re[we.carpet];if(we._carpet=tt,!tt||!tt.visible){we.visible=!1;continue}we.xaxis=tt.xaxis,we.yaxis=tt.yaxis}},w.supplyAnimationDefaults=function(G){G=G||{};var Y,ee={};function q(se,ae){return a.coerce(G||{},ee,v,se,ae)}if(q("mode"),q("direction"),q("fromcurrent"),Array.isArray(G.frame))for(ee.frame=[],Y=0;Y<G.frame.length;Y++)ee.frame[Y]=w.supplyAnimationFrameDefaults(G.frame[Y]||{});else ee.frame=w.supplyAnimationFrameDefaults(G.frame||{});if(Array.isArray(G.transition))for(ee.transition=[],Y=0;Y<G.transition.length;Y++)ee.transition[Y]=w.supplyAnimationTransitionDefaults(G.transition[Y]||{});else ee.transition=w.supplyAnimationTransitionDefaults(G.transition||{});return ee},w.supplyAnimationFrameDefaults=function(G){var Y={};function ee(q,se){return a.coerce(G||{},Y,v.frame,q,se)}return ee("duration"),ee("redraw"),Y},w.supplyAnimationTransitionDefaults=function(G){var Y={};function ee(q,se){return a.coerce(G||{},Y,v.transition,q,se)}return ee("duration"),ee("easing"),Y},w.supplyFrameDefaults=function(G){var Y={};function ee(q,se){return a.coerce(G,Y,c,q,se)}return ee("group"),ee("name"),ee("traces"),ee("baseframe"),ee("data"),ee("layout"),Y},w.supplyTraceDefaults=function(G,Y,ee,q,se){var ae=q.colorway||n.defaults,j=ae[ee%ae.length],Q;function re(he,ue){return a.coerce(G,Y,w.attributes,he,ue)}var pe=re("visible");re("type"),re("name",q._traceWord+" "+se),re("uirevision",q.uirevision);var we=w.getModule(Y);if(Y._module=we,we){var Se=we.basePlotModule,Ie=Se.attr,Re=Se.attributes;if(Ie&&Re){var We=q._subplots,at="";if(Array.isArray(Ie))for(Q=0;Q<Ie.length;Q++){var nt=Ie[Q],tt=a.coerce(G,Y,Re,nt);We[nt]&&a.pushUnique(We[nt],tt),at+=tt}else at=a.coerce(G,Y,Re,Ie);We[Se.name]&&a.pushUnique(We[Se.name],at)}}if(pe&&(re("customdata"),re("ids"),re("meta"),t.traceIs(Y,"showLegend")?(a.coerce(G,Y,we.attributes.showlegend?we.attributes:w.attributes,"showlegend"),a.coerce(G,Y,we.attributes.legend?we.attributes:w.attributes,"legend"),re("legendwidth"),re("legendgroup"),re("legendgrouptitle.text"),re("legendrank"),Y._dfltShowLegend=!0):Y._dfltShowLegend=!1,we&&we.supplyDefaults(G,Y,j,q),t.traceIs(Y,"noOpacity")||re("opacity"),t.traceIs(Y,"notLegendIsolatable")&&(Y.visible=!!Y.visible),t.traceIs(Y,"noHover")||(Y.hovertemplate||a.coerceHoverinfo(G,Y,q),Y.type!=="parcats"&&t.getComponentMethod("fx","supplyDefaults")(G,Y,j,q)),we&&we.selectPoints)){var qe=re("selectedpoints");a.isTypedArray(qe)&&(Y.selectedpoints=Array.from(qe))}return Y},w.supplyLayoutGlobalDefaults=function(G,Y,ee){function q(Se,Ie){return a.coerce(G,Y,w.layoutAttributes,Se,Ie)}var se=G.template;a.isPlainObject(se)&&(Y.template=se,Y._template=se.layout,Y._dataTemplate=se.data),q("autotypenumbers");var ae=a.coerceFont(q,"font"),j=ae.size;a.coerceFont(q,"title.font",ae,{overrideDflt:{size:Math.round(j*1.4)}}),q("title.text",Y._dfltTitle.plot),q("title.xref");var Q=q("title.yref");q("title.pad.t"),q("title.pad.r"),q("title.pad.b"),q("title.pad.l");var re=q("title.automargin");q("title.x"),q("title.xanchor"),q("title.y"),q("title.yanchor"),q("title.subtitle.text",Y._dfltTitle.subtitle),a.coerceFont(q,"title.subtitle.font",ae,{overrideDflt:{size:Math.round(Y.title.font.size*.7)}}),re&&(Q==="paper"&&(Y.title.y!==0&&(Y.title.y=1),Y.title.yanchor==="auto"&&(Y.title.yanchor=Y.title.y===0?"top":"bottom")),Q==="container"&&(Y.title.y==="auto"&&(Y.title.y=1),Y.title.yanchor==="auto"&&(Y.title.yanchor=Y.title.y<.5?"bottom":"top")));var pe=q("uniformtext.mode");pe&&q("uniformtext.minsize"),q("autosize",!(G.width&&G.height)),q("width"),q("height"),q("minreducedwidth"),q("minreducedheight"),q("margin.l"),q("margin.r"),q("margin.t"),q("margin.b"),q("margin.pad"),q("margin.autoexpand"),G.width&&G.height&&w.sanitizeMargins(Y),t.getComponentMethod("grid","sizeDefaults")(G,Y),q("paper_bgcolor"),q("separators",ee.decimal+ee.thousands),q("hidesources"),q("colorway"),q("datarevision");var we=q("uirevision");q("editrevision",we),q("selectionrevision",we),t.getComponentMethod("modebar","supplyLayoutDefaults")(G,Y),t.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(G,Y,q),t.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(G,Y,q),q("meta"),a.isPlainObject(G.transition)&&(q("transition.duration"),q("transition.easing"),q("transition.ordering")),t.getComponentMethod("calendars","handleDefaults")(G,Y,"calendar"),t.getComponentMethod("fx","supplyLayoutGlobalDefaults")(G,Y,q),a.coerce(G,Y,f,"scattermode")};function z(G){return typeof G=="string"&&G.slice(-2)==="px"&&parseFloat(G)}w.plotAutoSize=function(Y,ee,q){var se=Y._context||{},ae=se.frameMargins,j,Q,re=a.isPlotDiv(Y);if(re&&Y.emit("plotly_autosize"),se.fillFrame)j=window.innerWidth,Q=window.innerHeight,document.body.style.overflow="hidden";else{var pe=re?window.getComputedStyle(Y):{};if(j=z(pe.width)||z(pe.maxWidth)||q.width,Q=z(pe.height)||z(pe.maxHeight)||q.height,E(ae)&&ae>0){var we=1-2*ae;j=Math.round(we*j),Q=Math.round(we*Q)}}var Se=w.layoutAttributes.width.min,Ie=w.layoutAttributes.height.min;j<Se&&(j=Se),Q<Ie&&(Q=Ie);var Re=!ee.width&&Math.abs(q.width-j)>1,We=!ee.height&&Math.abs(q.height-Q)>1;(We||Re)&&(Re&&(q.width=j),We&&(q.height=Q)),Y._initialAutoSize||(Y._initialAutoSize={width:j,height:Q}),w.sanitizeMargins(q)},w.supplyLayoutModuleDefaults=function(G,Y,ee,q){var se=t.componentsRegistry,ae=Y._basePlotModules,j,Q,re,pe=t.subplotsRegistry.cartesian;for(j in se)re=se[j],re.includeBasePlot&&re.includeBasePlot(G,Y);ae.length||ae.push(pe),Y._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,Y),pe.finalizeSubplots(G,Y));for(var we in Y._subplots)Y._subplots[we].sort(a.subplotSort);for(Q=0;Q<ae.length;Q++)re=ae[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,Y,ee);var Se=Y._modules;for(Q=0;Q<Se.length;Q++)re=Se[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,Y,ee);var Ie=Y._transformModules;for(Q=0;Q<Ie.length;Q++)re=Ie[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,Y,ee,q);for(j in se)re=se[j],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,Y,ee)},w.purge=function(G){var Y=G._fullLayout||{};Y._glcontainer!==void 0&&(Y._glcontainer.selectAll(".gl-canvas").remove(),Y._glcontainer.remove(),Y._glcanvas=null),Y._modeBar&&Y._modeBar.destroy(),G._transitionData&&(G._transitionData._interruptCallbacks&&(G._transitionData._interruptCallbacks.length=0),G._transitionData._animationRaf&&window.cancelAnimationFrame(G._transitionData._animationRaf)),a.clearThrottle(),a.clearResponsive(G),delete G.data,delete G.layout,delete G._fullData,delete G._fullLayout,delete G.calcdata,delete G.empty,delete G.fid,delete G.undoqueue,delete G.undonum,delete G.autoplay,delete G.changed,delete G._promises,delete G._redrawTimer,delete G._hmlumcount,delete G._hmpixcount,delete G._transitionData,delete G._transitioning,delete G._initialAutoSize,delete G._transitioningWithDuration,delete G._dragging,delete G._dragged,delete G._dragdata,delete G._hoverdata,delete G._snapshotInProgress,delete G._editing,delete G._mouseDownTime,delete G._legendMouseDownTime,G.removeAllListeners&&G.removeAllListeners()},w.style=function(G){var Y=G._fullLayout._visibleModules,ee=[],q;for(q=0;q<Y.length;q++){var se=Y[q];se.style&&a.pushUnique(ee,se.style)}for(q=0;q<ee.length;q++)ee[q](G)},w.sanitizeMargins=function(G){if(!(!G||!G.margin)){var Y=G.width,ee=G.height,q=G.margin,se=Y-(q.l+q.r),ae=ee-(q.t+q.b),j;se<0&&(j=(Y-1)/(q.l+q.r),q.l=Math.floor(j*q.l),q.r=Math.floor(j*q.r)),ae<0&&(j=(ee-1)/(q.t+q.b),q.t=Math.floor(j*q.t),q.b=Math.floor(j*q.b))}},w.clearAutoMarginIds=function(G){G._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(G,Y){G._fullLayout._pushmarginIds[Y]=1};function F(G){var Y=G.margin;if(!G._size){var ee=G._size={l:Math.round(Y.l),r:Math.round(Y.r),t:Math.round(Y.t),b:Math.round(Y.b),p:Math.round(Y.pad)};ee.w=Math.round(G.width)-ee.l-ee.r,ee.h=Math.round(G.height)-ee.t-ee.b}G._pushmargin||(G._pushmargin={}),G._pushmarginIds||(G._pushmarginIds={}),G._reservedMargin||(G._reservedMargin={})}var N=2,O=2;w.autoMargin=function(G,Y,ee){var q=G._fullLayout,se=q.width,ae=q.height,j=q.margin,Q=q.minreducedwidth,re=q.minreducedheight,pe=a.constrain(se-j.l-j.r,N,Q),we=a.constrain(ae-j.t-j.b,O,re),Se=Math.max(0,se-pe),Ie=Math.max(0,ae-we),Re=q._pushmargin,We=q._pushmarginIds;if(j.autoexpand!==!1){if(!ee)delete Re[Y],delete We[Y];else{var at=ee.pad;if(at===void 0&&(at=Math.min(12,j.l,j.r,j.t,j.b)),Se){var nt=(ee.l+ee.r)/Se;nt>1&&(ee.l/=nt,ee.r/=nt)}if(Ie){var tt=(ee.t+ee.b)/Ie;tt>1&&(ee.t/=tt,ee.b/=tt)}var qe=ee.xl!==void 0?ee.xl:ee.x,he=ee.xr!==void 0?ee.xr:ee.x,ue=ee.yt!==void 0?ee.yt:ee.y,ne=ee.yb!==void 0?ee.yb:ee.y;Re[Y]={l:{val:qe,size:ee.l+at},r:{val:he,size:ee.r+at},b:{val:ne,size:ee.b+at},t:{val:ue,size:ee.t+at}},We[Y]=1}if(!q._replotting)return w.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var Y=s.list(G,"",!0);for(var ee in Y)if(Y[ee].autoshift||Y[ee].shift)return!0;return!1}w.doAutoMargin=function(G){var Y=G._fullLayout,ee=Y.width,q=Y.height;Y._size||(Y._size={}),F(Y);var se=Y._size,ae=Y.margin,j={t:0,b:0,l:0,r:0},Q=a.extendFlat({},se),re=ae.l,pe=ae.r,we=ae.t,Se=ae.b,Ie=Y._pushmargin,Re=Y._pushmarginIds,We=Y.minreducedwidth,at=Y.minreducedheight;if(ae.autoexpand!==!1){for(var nt in Ie)Re[nt]||delete Ie[nt];var tt=G._fullLayout._reservedMargin;for(var qe in tt)for(var he in tt[qe]){var ue=tt[qe][he];j[he]=Math.max(j[he],ue)}Ie.base={l:{val:0,size:re},r:{val:1,size:pe},t:{val:1,size:we},b:{val:0,size:Se}};for(var ne in j){var Ce=0;for(var Ye in Ie)Ye!=="base"&&E(Ie[Ye][ne].size)&&(Ce=Ie[Ye][ne].size>Ce?Ie[Ye][ne].size:Ce);var rt=Math.max(0,ae[ne]-Ce);j[ne]=Math.max(0,j[ne]-rt)}for(var Ke in Ie){var Mt=Ie[Ke].l||{},kt=Ie[Ke].b||{},Nt=Mt.val,Gt=Mt.size,Mr=kt.val,mr=kt.size,qr=ee-j.r-j.l,Er=q-j.t-j.b;for(var Ir in Ie){if(E(Gt)&&Ie[Ir].r){var _t=Ie[Ir].r.val,Oe=Ie[Ir].r.size;if(_t>Nt){var Je=(Gt*_t+(Oe-qr)*Nt)/(_t-Nt),Ae=(Oe*(1-Nt)+(Gt-qr)*(1-_t))/(_t-Nt);Je+Ae>re+pe&&(re=Je,pe=Ae)}}if(E(mr)&&Ie[Ir].t){var Le=Ie[Ir].t.val,Ue=Ie[Ir].t.size;if(Le>Mr){var Ze=(mr*Le+(Ue-Er)*Mr)/(Le-Mr),st=(Ue*(1-Mr)+(mr-Er)*(1-Le))/(Le-Mr);Ze+st>Se+we&&(Se=Ze,we=st)}}}}}var ut=a.constrain(ee-ae.l-ae.r,N,We),Ut=a.constrain(q-ae.t-ae.b,O,at),Ct=Math.max(0,ee-ut),Pt=Math.max(0,q-Ut);if(Ct){var jt=(re+pe)/Ct;jt>1&&(re/=jt,pe/=jt)}if(Pt){var fr=(Se+we)/Pt;fr>1&&(Se/=fr,we/=fr)}if(se.l=Math.round(re)+j.l,se.r=Math.round(pe)+j.r,se.t=Math.round(we)+j.t,se.b=Math.round(Se)+j.b,se.p=Math.round(ae.pad),se.w=Math.round(ee)-se.l-se.r,se.h=Math.round(q)-se.t-se.b,!Y._replotting&&(w.didMarginChange(Q,se)||P(G))){"_redrawFromAutoMarginCount"in Y?Y._redrawFromAutoMarginCount++:Y._redrawFromAutoMarginCount=1;var ur=3*(1+Object.keys(Re).length);if(Y._redrawFromAutoMarginCount<ur)return t.call("_doPlot",G);Y._size=Q,a.warn("Too many auto-margin redraws.")}U(G)};function U(G){var Y=s.list(G,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(ee){for(var q=0;q<Y.length;q++){var se=Y[q][ee];se&&se()}})}var B=["l","r","t","b","p","w","h"];w.didMarginChange=function(G,Y){for(var ee=0;ee<B.length;ee++){var q=B[ee],se=G[q],ae=Y[q];if(!E(se)||Math.abs(ae-se)>1)return!0}return!1},w.graphJson=function(G,Y,ee,q,se,ae){(se&&Y&&!G._fullData||se&&!Y&&!G._fullLayout)&&w.supplyDefaults(G);var j=se?G._fullData:G.data,Q=se?G._fullLayout:G.layout,re=(G._transitionData||{})._frames;function pe(Ie,Re){if(typeof Ie=="function")return Re?"_function_":null;if(a.isPlainObject(Ie)){var We={},at;return Object.keys(Ie).sort().forEach(function(he){if(["_","["].indexOf(he.charAt(0))===-1){if(typeof Ie[he]=="function"){Re&&(We[he]="_function");return}if(ee==="keepdata"){if(he.slice(-3)==="src")return}else if(ee==="keepstream"){if(at=Ie[he+"src"],typeof at=="string"&&at.indexOf(":")>0&&!a.isPlainObject(Ie.stream))return}else if(ee!=="keepall"&&(at=Ie[he+"src"],typeof at=="string"&&at.indexOf(":")>0))return;We[he]=pe(Ie[he],Re)}}),We}var nt=Array.isArray(Ie),tt=a.isTypedArray(Ie);if((nt||tt)&&Ie.dtype&&Ie.shape){var qe=Ie.bdata;return pe({dtype:Ie.dtype,shape:Ie.shape,bdata:a.isArrayBuffer(qe)?e.encode(qe):qe},Re)}return nt?Ie.map(function(he){return pe(he,Re)}):tt?a.simpleMap(Ie,a.identity):a.isJSDate(Ie)?a.ms2DateTimeLocal(+Ie):Ie}var we={data:(j||[]).map(function(Ie){var Re=pe(Ie);return Y&&delete Re.fit,Re})};if(!Y&&(we.layout=pe(Q),se)){var Se=Q._size;we.layout.computed={margin:{b:Se.b,l:Se.l,r:Se.r,t:Se.t}}}return re&&(we.frames=pe(re)),ae&&(we.config=pe(G._context,!0)),q==="object"?we:JSON.stringify(we)},w.modifyFrames=function(G,Y){var ee,q,se,ae=G._transitionData._frames,j=G._transitionData._frameHash;for(ee=0;ee<Y.length;ee++)switch(q=Y[ee],q.type){case"replace":se=q.value;var Q=(ae[q.index]||{}).name,re=se.name;ae[q.index]=j[re]=se,re!==Q&&(delete j[Q],j[re]=se);break;case"insert":se=q.value,j[se.name]=se,ae.splice(q.index,0,se);break;case"delete":se=ae[q.index],delete j[se.name],ae.splice(q.index,1);break}return Promise.resolve()},w.computeFrame=function(G,Y){var ee=G._transitionData._frameHash,q,se,ae,j;if(!Y)throw new Error("computeFrame must be given a string frame name");var Q=ee[Y.toString()];if(!Q)return!1;for(var re=[Q],pe=[Q.name];Q.baseframe&&(Q=ee[Q.baseframe.toString()])&&pe.indexOf(Q.name)===-1;)re.push(Q),pe.push(Q.name);for(var we={};Q=re.pop();)if(Q.layout&&(we.layout=w.extendLayout(we.layout,Q.layout)),Q.data){if(we.data||(we.data=[]),se=Q.traces,!se)for(se=[],q=0;q<Q.data.length;q++)se[q]=q;for(we.traces||(we.traces=[]),q=0;q<Q.data.length;q++)ae=se[q],ae!=null&&(j=we.traces.indexOf(ae),j===-1&&(j=we.data.length,we.traces[j]=ae),we.data[j]=w.extendTrace(we.data[j],Q.data[q]))}return we},w.recomputeFrameHash=function(G){for(var Y=G._transitionData._frameHash={},ee=G._transitionData._frames,q=0;q<ee.length;q++){var se=ee[q];se&&se.name&&(Y[se.name]=se)}},w.extendObjectWithContainers=function(G,Y,ee){var q,se,ae,j,Q,re,pe,we,Se=a.extendDeepNoArrays({},Y||{}),Ie=a.expandObjectPaths(Se),Re={};if(ee&&ee.length)for(ae=0;ae<ee.length;ae++)q=a.nestedProperty(Ie,ee[ae]),se=q.get(),se===void 0?a.nestedProperty(Re,ee[ae]).set(null):(q.set(null),a.nestedProperty(Re,ee[ae]).set(se));if(G=a.extendDeepNoArrays(G||{},Ie),ee&&ee.length){for(ae=0;ae<ee.length;ae++)if(Q=a.nestedProperty(Re,ee[ae]),pe=Q.get(),!!pe){for(re=a.nestedProperty(G,ee[ae]),we=re.get(),Array.isArray(we)||(we=[],re.set(we)),j=0;j<pe.length;j++){var We=pe[j];We===null?we[j]=null:we[j]=w.extendObjectWithContainers(we[j],We)}re.set(we)}}return G},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=t.layoutArrayContainers,w.extendTrace=function(G,Y){return w.extendObjectWithContainers(G,Y,w.dataArrayContainers)},w.extendLayout=function(G,Y){return w.extendObjectWithContainers(G,Y,w.layoutArrayContainers)},w.transition=function(G,Y,ee,q,se,ae){var j={redraw:se.redraw},Q={},re=[];return j.prepareFn=function(){for(var pe=Array.isArray(Y)?Y.length:0,we=q.slice(0,pe),Se=0;Se<we.length;Se++){var Ie=we[Se],Re=G._fullData[Ie],We=Re._module;if(We){if(We.animatable){var at=We.basePlotModule.name;Q[at]||(Q[at]=[]),Q[at].push(Ie)}G.data[we[Se]]=w.extendTrace(G.data[we[Se]],Y[Se])}}var nt=a.expandObjectPaths(a.extendDeepNoArrays({},ee)),tt=/^[xy]axis[0-9]*$/;for(var qe in nt)tt.test(qe)&&delete nt[qe].range;w.extendLayout(G.layout,nt),delete G.calcdata,w.supplyDefaults(G),w.doCalcdata(G);var he=a.expandObjectPaths(ee);if(he){var ue=G._fullLayout._plots;for(var ne in ue){var Ce=ue[ne],Ye=Ce.xaxis,rt=Ce.yaxis,Ke=Ye.range.slice(),Mt=rt.range.slice(),kt=null,Nt=null,Gt=null,Mr=null;Array.isArray(he[Ye._name+".range"])?kt=he[Ye._name+".range"].slice():Array.isArray((he[Ye._name]||{}).range)&&(kt=he[Ye._name].range.slice()),Array.isArray(he[rt._name+".range"])?Nt=he[rt._name+".range"].slice():Array.isArray((he[rt._name]||{}).range)&&(Nt=he[rt._name].range.slice()),Ke&&kt&&(Ye.r2l(Ke[0])!==Ye.r2l(kt[0])||Ye.r2l(Ke[1])!==Ye.r2l(kt[1]))&&(Gt={xr0:Ke,xr1:kt}),Mt&&Nt&&(rt.r2l(Mt[0])!==rt.r2l(Nt[0])||rt.r2l(Mt[1])!==rt.r2l(Nt[1]))&&(Mr={yr0:Mt,yr1:Nt}),(Gt||Mr)&&re.push(a.extendFlat({plotinfo:Ce},Gt,Mr))}}return Promise.resolve()},j.runFn=function(pe){var we,Se=G._fullLayout._basePlotModules,Ie=re.length,Re;if(ee)for(Re=0;Re<Se.length;Re++)Se[Re].transitionAxes&&Se[Re].transitionAxes(G,re,ae,pe);Ie?(we=a.extendFlat({},ae),we.duration=0,delete Q.cartesian):we=ae;for(var We in Q){var at=Q[We],nt=G._fullData[at[0]]._module;nt.basePlotModule.plot(G,at,we,pe)}},X(G,ae,j)},w.transitionFromReact=function(G,Y,ee,q){var se=G._fullLayout,ae=se.transition,j={},Q=[];return j.prepareFn=function(){var re=se._plots;j.redraw=!1,Y.anim==="some"&&(j.redraw=!0),ee.anim==="some"&&(j.redraw=!0);for(var pe in re){var we=re[pe],Se=we.xaxis,Ie=we.yaxis,Re=q[Se._name].range.slice(),We=q[Ie._name].range.slice(),at=Se.range.slice(),nt=Ie.range.slice();Se.setScale(),Ie.setScale();var tt=null,qe=null;(Se.r2l(Re[0])!==Se.r2l(at[0])||Se.r2l(Re[1])!==Se.r2l(at[1]))&&(tt={xr0:Re,xr1:at}),(Ie.r2l(We[0])!==Ie.r2l(nt[0])||Ie.r2l(We[1])!==Ie.r2l(nt[1]))&&(qe={yr0:We,yr1:nt}),(tt||qe)&&Q.push(a.extendFlat({plotinfo:we},tt,qe))}return Promise.resolve()},j.runFn=function(re){for(var pe=G._fullData,we=G._fullLayout,Se=we._basePlotModules,Ie,Re,We,at=[],nt=0;nt<pe.length;nt++)at.push(nt);function tt(){if(G._fullLayout)for(var he=0;he<Se.length;he++)Se[he].transitionAxes&&Se[he].transitionAxes(G,Q,Ie,re)}function qe(){if(G._fullLayout)for(var he=0;he<Se.length;he++)Se[he].plot(G,We,Re,re)}Q.length&&Y.anim?ae.ordering==="traces first"?(Ie=a.extendFlat({},ae,{duration:0}),We=at,Re=ae,setTimeout(tt,ae.duration),qe()):(Ie=ae,We=null,Re=a.extendFlat({},ae,{duration:0}),setTimeout(qe,Ie.duration),tt()):Q.length?(Ie=ae,tt()):Y.anim&&(We=at,Re=ae,qe())},X(G,ae,j)};function X(G,Y,ee){var q=!1;function se(Se){var Ie=Promise.resolve();if(!Se)return Ie;for(;Se.length;)Ie=Ie.then(Se.shift());return Ie}function ae(Se){if(Se)for(;Se.length;)Se.shift()}function j(){return G.emit("plotly_transitioning",[]),new Promise(function(Se){G._transitioning=!0,Y.duration>0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){q=!0}),ee.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Ie=0,Re=0;function We(){return Ie++,function(){Re++,!q&&Re===Ie&&Q(Se)}}ee.runFn(We),setTimeout(We())})}function Q(Se){if(G._transitionData)return ae(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ee.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(Se)}function re(){if(G._transitionData)return G._transitioning=!1,se(G._transitionData._interruptCallbacks)}var pe=[w.previousPromises,re,ee.prepareFn,w.rehover,w.reselect,j],we=a.syncOrAsync(pe,G);return(!we||!we.then)&&(we=Promise.resolve()),we.then(function(){return G})}w.doCalcdata=function(G,Y){var ee=s.list(G),q=G._fullData,se=G._fullLayout,ae,j,Q,re,pe=new Array(q.length),we=(G.calcdata||[]).slice();for(G.calcdata=pe,se._numBoxes=0,se._numViolins=0,se._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,se._piecolormap={},se._sunburstcolormap={},se._treemapcolormap={},se._iciclecolormap={},se._funnelareacolormap={},Q=0;Q<q.length;Q++)if(Array.isArray(Y)&&Y.indexOf(Q)===-1){pe[Q]=we[Q];continue}for(Q=0;Q<q.length;Q++)ae=q[Q],ae._arrayAttrs=r.findArrayAttributes(ae),ae._extremes={};var Se=se._subplots.polar||[];for(Q=0;Q<Se.length;Q++)ee.push(se[Se[Q]].radialaxis,se[Se[Q]].angularaxis);for(var Ie in se._colorAxes){var Re=se[Ie];Re.cauto!==!1&&(delete Re.cmin,delete Re.cmax)}var We=!1;function at(qe){if(ae=q[qe],j=ae._module,ae.visible===!0&&ae.transforms){if(j&&j.calc){var he=j.calc(G,ae);he[0]&&he[0].t&&he[0].t._scene&&delete he[0].t._scene.dirty}for(re=0;re<ae.transforms.length;re++){var ue=ae.transforms[re];j=transformsRegistry[ue.type],j&&j.calcTransform&&(ae._hasCalcTransform=!0,We=!0,j.calcTransform(G,ae,ue))}}}function nt(qe,he){if(ae=q[qe],j=ae._module,!!j.isContainer===he){var ue=[];if(ae.visible===!0&&ae._length!==0){delete ae._indexToPoints;var ne=ae.transforms||[];for(re=ne.length-1;re>=0;re--)if(ne[re].enabled){ae._indexToPoints=ne[re]._indexToPoints;break}j&&j.calc&&(ue=j.calc(G,ae))}(!Array.isArray(ue)||!ue[0])&&(ue=[{x:i,y:i}]),ue[0].t||(ue[0].t={}),ue[0].trace=ae,pe[qe]=ue}}for(ce(ee,q,se),Q=0;Q<q.length;Q++)nt(Q,!0);for(Q=0;Q<q.length;Q++)at(Q);for(We&&ce(ee,q,se),Q=0;Q<q.length;Q++)nt(Q,!0);for(Q=0;Q<q.length;Q++)nt(Q,!1);de(G);var tt=le(ee,G);if(tt.length){for(se._numBoxes=0,se._numViolins=0,Q=0;Q<tt.length;Q++)nt(tt[Q],!0);for(Q=0;Q<tt.length;Q++)nt(tt[Q],!1);de(G)}t.getComponentMethod("fx","calc")(G),t.getComponentMethod("errorbars","calc")(G)};var $=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function le(G,Y){var ee=[],q,se,ae,j,Q;function re(Ir,_t,Oe){var Je=_t._id.charAt(0);if(Ir==="histogram2dcontour"){var Ae=_t._counterAxes[0],Le=s.getFromId(Y,Ae),Ue=Je==="x"||Ae==="x"&&Le.type==="category",Ze=Je==="y"||Ae==="y"&&Le.type==="category";return function(st,ut){return st===0||ut===0||Ue&&st===Oe[ut].length-1||Ze&&ut===Oe.length-1?-1:(Je==="y"?ut:st)-1}}else return function(st,ut){return Je==="y"?ut:st}}var pe={min:function(Ir){return a.aggNums(Math.min,null,Ir)},max:function(Ir){return a.aggNums(Math.max,null,Ir)},sum:function(Ir){return a.aggNums(function(_t,Oe){return _t+Oe},null,Ir)},total:function(Ir){return a.aggNums(function(_t,Oe){return _t+Oe},null,Ir)},mean:function(Ir){return a.mean(Ir)},"geometric mean":function(Ir){return a.geometricMean(Ir)},median:function(Ir){return a.median(Ir)}};function we(Ir,_t){return Ir[1]-_t[1]}function Se(Ir,_t){return _t[1]-Ir[1]}for(q=0;q<G.length;q++){var Ie=G[q];if(Ie.type==="category"){var Re=Ie.categoryorder.match($);if(Re){var We=Re[1],at=Re[2],nt=Ie._id.charAt(0),tt=nt==="x",qe=[];for(se=0;se<Ie._categories.length;se++)qe.push([Ie._categories[se],[]]);for(se=0;se<Ie._traceIndices.length;se++){var he=Ie._traceIndices[se],ue=Y._fullData[he];if(ue.visible===!0){var ne=ue.type;t.traceIs(ue,"histogram")&&(delete ue._xautoBinFinished,delete ue._yautoBinFinished);var Ce=ne==="splom",Ye=ne==="scattergl",rt=Y.calcdata[he];for(ae=0;ae<rt.length;ae++){var Ke=rt[ae],Mt,kt;if(Ce){var Nt=ue._axesDim[Ie._id];if(!tt){var Gt=ue._diag[Nt][0];Gt&&(Ie=Y._fullLayout[s.id2name(Gt)])}var Mr=Ke.trace.dimensions[Nt].values;for(j=0;j<Mr.length;j++)for(Mt=Ie._categoriesMap[Mr[j]],Q=0;Q<Ke.trace.dimensions.length;Q++)if(Q!==Nt){var mr=Ke.trace.dimensions[Q];qe[Mt][1].push(mr.values[j])}}else if(Ye){for(j=0;j<Ke.t.x.length;j++)tt?(Mt=Ke.t.x[j],kt=Ke.t.y[j]):(Mt=Ke.t.y[j],kt=Ke.t.x[j]),qe[Mt][1].push(kt);Ke.t&&Ke.t._scene&&delete Ke.t._scene.dirty}else if(Ke.hasOwnProperty("z")){kt=Ke.z;var qr=re(ue.type,Ie,kt);for(j=0;j<kt.length;j++)for(Q=0;Q<kt[j].length;Q++)Mt=qr(Q,j),Mt+1&&qe[Mt][1].push(kt[j][Q])}else for(Mt=Ke.p,Mt===void 0&&(Mt=Ke[nt]),kt=Ke.s,kt===void 0&&(kt=Ke.v),kt===void 0&&(kt=tt?Ke.y:Ke.x),Array.isArray(kt)||(kt===void 0?kt=[]:kt=[kt]),j=0;j<kt.length;j++)qe[Mt][1].push(kt[j])}}}Ie._categoriesValue=qe;var Er=[];for(se=0;se<qe.length;se++)Er.push([qe[se][0],pe[We](qe[se][1])]);Er.sort(at==="descending"?Se:we),Ie._categoriesAggregatedValue=Er,Ie._initialCategories=Er.map(function(Ir){return Ir[0]}),ee=ee.concat(Ie.sortByInitialCategories())}}}return ee}function ce(G,Y,ee){var q={};function se(re){re.clearCalc(),re.type==="multicategory"&&re.setupMultiCategory(Y),q[re._id]=1}a.simpleMap(G,se);for(var ae=ee._axisMatchGroups||[],j=0;j<ae.length;j++)for(var Q in ae[j])q[Q]||se(ee[s.id2name(Q)])}function de(G){var Y=G._fullLayout,ee=Y._visibleModules,q={},se,ae,j;for(ae=0;ae<ee.length;ae++){var Q=ee[ae],re=Q.crossTraceCalc;if(re){var pe=Q.basePlotModule.name;q[pe]?a.pushUnique(q[pe],re):q[pe]=[re]}}for(j in q){var we=q[j],Se=Y._subplots[j];if(Array.isArray(Se))for(se=0;se<Se.length;se++){var Ie=Se[se],Re=j==="cartesian"?Y._plots[Ie]:Y[Ie];for(ae=0;ae<we.length;ae++)we[ae](G,Re,Ie)}else for(ae=0;ae<we.length;ae++)we[ae](G)}}w.rehover=function(G){G._fullLayout._rehover&&G._fullLayout._rehover()},w.redrag=function(G){G._fullLayout._redrag&&G._fullLayout._redrag()},w.reselect=function(G){var Y=G._fullLayout,ee=(G.layout||{}).selections,q=Y._previousSelections;Y._previousSelections=ee;var se=Y._reselect||JSON.stringify(ee)!==JSON.stringify(q);t.getComponentMethod("selections","reselect")(G,se)},w.generalUpdatePerTraceModule=function(G,Y,ee,q){var se=Y.traceHash,ae={},j;for(j=0;j<ee.length;j++){var Q=ee[j],re=Q[0].trace;re.visible&&(ae[re.type]=ae[re.type]||[],ae[re.type].push(Q))}for(var pe in se)if(!ae[pe]){var we=se[pe][0],Se=we[0].trace;Se.visible=!1,ae[pe]=[we]}for(var Ie in ae){var Re=ae[Ie],We=Re[0][0].trace._module;We.plot(G,Y,a.filterVisible(Re),q)}Y.traceHash=ae},w.plotBasePlot=function(G,Y,ee,q,se){var ae=t.getModule(G),j=T(Y.calcdata,ae)[0];ae.plot(Y,j,q,se)},w.cleanBasePlot=function(G,Y,ee,q,se){var ae=se._has&&se._has(G),j=ee._has&&ee._has(G);ae&&!j&&se["_"+G+"layer"].selectAll("g.trace").remove()}}}),vd=He({"src/constants/xmlns_namespaces.js"(Z){"use strict";Z.xmlns="http://www.w3.org/2000/xmlns/",Z.svg="http://www.w3.org/2000/svg",Z.xlink="http://www.w3.org/1999/xlink",Z.svgAttrs={xmlns:Z.svg,"xmlns:xlink":Z.xlink}}}),uh=He({"src/constants/alignment.js"(Z,V){"use strict";V.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"}}}}),ou=He({"src/lib/svg_text_utils.js"(Z){"use strict";var V=Wn(),d=sa(),x=d.strTranslate,S=vd(),E=uh().LINE_SPACING,e=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Z.convertToTspans=function(O,P,U){var B=O.text(),X=!O.attr("data-notex")&&P&&P._context.typesetMath&&typeof MathJax<"u"&&B.match(e),$=V.select(O.node().parentNode);if($.empty())return;var le=O.attr("class")?O.attr("class").split(" ")[0]:"text";le+="-math",$.selectAll("svg."+le).remove(),$.selectAll("g."+le+"-group").remove(),O.style("display",null).attr({"data-unformatted":B,"data-math":"N"});function ce(){$.empty()||(le=O.attr("class")+"-math",$.select("svg."+le).remove()),O.text("").style("white-space","pre");var de=L(O.node(),B);de&&O.style("pointer-events","all"),Z.positionText(O),U&&U.call(O)}return X?(P&&P._promises||[]).push(new Promise(function(de){O.style("display","none");var G=parseInt(O.node().style.fontSize,10),Y={fontSize:G};n(X[2],Y,function(ee,q,se){$.selectAll("svg."+le).remove(),$.selectAll("g."+le+"-group").remove();var ae=ee&&ee.select("svg");if(!ae||!ae.node()){ce(),de();return}var j=$.append("g").classed(le+"-group",!0).attr({"pointer-events":"none","data-unformatted":B,"data-math":"Y"});j.node().appendChild(ae.node()),q&&q.node()&&ae.node().insertBefore(q.node().cloneNode(!0),ae.node().firstChild);var Q=se.width,re=se.height;ae.attr({class:le,height:re,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var pe=O.node().style.fill||"black",we=ae.select("g");we.attr({fill:pe,stroke:pe});var Se=we.node().getBoundingClientRect(),Ie=Se.width,Re=Se.height;(Ie>Q||Re>re)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Ie=Se.width,Re=Se.height);var We=+O.attr("x"),at=+O.attr("y"),nt=G||O.node().getBoundingClientRect().height,tt=-nt/4;if(le[0]==="y")j.attr({transform:"rotate("+[-90,We,at]+")"+x(-Ie/2,tt-Re/2)});else if(le[0]==="l")at=tt-Re/2;else if(le[0]==="a"&&le.indexOf("atitle")!==0)We=0,at=tt;else{var qe=O.attr("text-anchor");We=We-Ie*(qe==="middle"?.5:qe==="end"?1:0),at=at+tt-Re/2}ae.attr({x:We,y:at}),U&&U.call(O,j),de(j)})})):ce(),O};var t=/(<|&lt;|&#60;)/g,r=/(>|&gt;|&#62;)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(O,P,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){d.warn("No MathJax version:",MathJax.version);return}var X,$,le,ce,de=function(){return $=d.extendDeepAll({},MathJax.Hub.config),le=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},G=function(){$=d.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},Y=function(){if(X=MathJax.Hub.config.menuSettings.renderer,X!=="SVG")return MathJax.Hub.setRenderer("SVG")},ee=function(){X=MathJax.config.startup.output,X!=="svg"&&(MathJax.config.startup.output="svg")},q=function(){var pe="math-output-"+d.randstr({},64);ce=V.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":P.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},se=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)d.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Ie;B===2?Ie=V.select("body").select("#MathJax_SVG_glyphs"):Ie=pe.select("defs"),U(pe,Ie,Se)}ce.remove()},ae=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},j=function(){X!=="svg"&&(MathJax.config.startup.output=X)},Q=function(){return le!==void 0&&(MathJax.Hub.processSectionDelay=le),MathJax.Hub.Config($)},re=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,Y,q,se,ae,Q):B===3&&(G(),ee(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){q(),se(),j(),re()}))}var i={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"},s={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},f="\u200B",v=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=/<br(\s+.*)?>/i;Z.BR_TAG_ALL=/<br(\s+.*)?>/gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,g=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,P){if(!O)return null;var U=O.match(P),B=U&&(U[3]||U[4]);return B&&m(B)}var p=/(^|;)\s*color:/;Z.plainText=function(O,P){P=P||{};for(var U=P.len!==void 0&&P.len!==-1?P.len:1/0,B=P.allowedTags!==void 0?P.allowedTags:["br"],X="...",$=X.length,le=O.split(T),ce=[],de="",G=0,Y=0;Y<le.length;Y++){var ee=le[Y],q=ee.match(l),se=q&&q[2].toLowerCase();if(se)B.indexOf(se)!==-1&&(ce.push(ee),de=se);else{var ae=ee.length;if(G+ae<U)ce.push(ee),G+=ae;else if(G<U){var j=U-G;de&&(de!=="br"||j<=$||ae<=$)&&ce.pop(),U>$?ce.push(ee.slice(0,Math.max(0,j-$))+X):ce.push(ee.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},y=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function m(O){return O.replace(y,function(P,U){var B;return U.charAt(0)==="#"?B=R(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||P})}Z.convertEntities=m;function R(O){if(!(O>1114111)){var P=String.fromCodePoint;if(P)return P(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function L(O,P){P=P.replace(c," ");var U=!1,B=[],X,$=-1;function le(){$++;var Re=document.createElementNS(S.svg,"tspan");V.select(Re).attr({class:"line",dy:$*E+"em"}),O.appendChild(Re),X=Re;var We=B;if(B=[{node:Re}],We.length>1)for(var at=1;at<We.length;at++)ce(We[at])}function ce(Re){var We=Re.type,at={},nt;if(We==="a"){nt="a";var tt=Re.target,qe=Re.href,he=Re.popup;qe&&(at={"xlink:xlink:show":tt==="_blank"||tt.charAt(0)!=="_"?"new":"replace",target:tt,"xlink:xlink:href":qe},he&&(at.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+he+'");return false;'))}else nt="tspan";Re.style&&(at.style=Re.style);var ue=document.createElementNS(S.svg,nt);if(We==="sup"||We==="sub"){de(X,f),X.appendChild(ue);var ne=document.createElementNS(S.svg,"tspan");de(ne,f),V.select(ne).attr("dy",h[We]),at.dy=s[We],X.appendChild(ue),X.appendChild(ne)}else X.appendChild(ue);V.select(ue).attr(at),X=Re.node=ue,B.push(Re)}function de(Re,We){Re.appendChild(document.createTextNode(We))}function G(Re){if(B.length===1){d.log("Ignoring unexpected end tag </"+Re+">.",P);return}var We=B.pop();Re!==We.type&&d.log("Start tag <"+We.type+"> doesnt match end tag <"+Re+">. Pretending it did match.",P),X=B[B.length-1].node}var Y=_.test(P);Y?le():(X=O,B=[{node:O}]);for(var ee=P.split(T),q=0;q<ee.length;q++){var se=ee[q],ae=se.match(l),j=ae&&ae[2].toLowerCase(),Q=i[j];if(j==="br")le();else if(Q===void 0)de(X,m(se));else if(ae[1])G(j);else{var re=ae[4],pe={type:j},we=b(re,w);if(we?(we=we.replace(p,"$1 fill:"),Q&&(we+=";"+Q)):Q&&(we=Q),we&&(pe.style=we),j==="a"){U=!0;var Se=b(re,A);if(Se){var Ie=z(Se);Ie&&(pe.href=Ie,pe.target=b(re,M)||"_blank",pe.popup=b(re,g))}}ce(pe)}}return U}function z(O){var P=encodeURI(decodeURI(O)),U=document.createElement("a"),B=document.createElement("a");U.href=O,B.href=P;var X=U.protocol,$=B.protocol;return v.indexOf(X)!==-1&&v.indexOf($)!==-1?P:""}Z.sanitizeHTML=function(P){P=P.replace(c," ");for(var U=document.createElement("p"),B=U,X=[],$=P.split(T),le=0;le<$.length;le++){var ce=$[le],de=ce.match(l),G=de&&de[2].toLowerCase();if(G in i)if(de[1])X.length&&(B=X.pop());else{var Y=de[4],ee=b(Y,w),q=ee?{style:ee}:{};if(G==="a"){var se=b(Y,A);if(se){var ae=z(se);if(ae){q.href=ae;var j=b(Y,M);j&&(q.target=j)}}}var Q=document.createElement(G);B.appendChild(Q),V.select(Q).attr(q),B=Q,X.push(Q)}else B.appendChild(document.createTextNode(m(ce)))}var re="innerHTML";return U[re]},Z.lineCount=function(P){return P.selectAll("tspan.line").size()||1},Z.positionText=function(P,U,B){return P.each(function(){var X=V.select(this);function $(de,G){return G===void 0?(G=X.attr(de),G===null&&(X.attr(de,0),G=0)):X.attr(de,G),G}var le=$("x",U),ce=$("y",B);this.nodeName==="text"&&X.selectAll("tspan.line").attr({x:le,y:ce})})};function F(O,P,U){var B=U.horizontalAlign,X=U.verticalAlign||"top",$=O.node().getBoundingClientRect(),le=P.node().getBoundingClientRect(),ce,de,G;return X==="bottom"?de=function(){return $.bottom-ce.height}:X==="middle"?de=function(){return $.top+($.height-ce.height)/2}:de=function(){return $.top},B==="right"?G=function(){return $.right-ce.width}:B==="center"?G=function(){return $.left+($.width-ce.width)/2}:G=function(){return $.left},function(){ce=this.node().getBoundingClientRect();var Y=G()-le.left,ee=de()-le.top,q=U.gd||{};if(U.gd){q._fullLayout._calcInverseTransform(q);var se=d.apply3DTransform(q._fullLayout._invTransform)(Y,ee);Y=se[0],ee=se[1]}return this.style({top:ee+"px",left:Y+"px","z-index":1e3}),this}}var N="1px ";Z.makeTextShadow=function(O){var P=N,U=N,B=N;return P+U+B+O+", -"+P+"-"+U+B+O+", "+P+"-"+U+B+O+", -"+P+U+B+O},Z.makeEditable=function(O,P){var U=P.gd,B=P.delegate,X=V.dispatch("edit","input","cancel"),$=B||O;if(O.style({"pointer-events":B?"none":"all"}),O.size()!==1)throw new Error("boo");function le(){de(),O.style({opacity:0});var G=$.attr("class"),Y;G?Y="."+G.split(" ")[0]+"-math-group":Y="[class*=-math-group]",Y&&V.select(O.node().parentNode).select(Y).style({opacity:0})}function ce(G){var Y=G.node(),ee=document.createRange();ee.selectNodeContents(Y);var q=window.getSelection();q.removeAllRanges(),q.addRange(ee),Y.focus()}function de(){var G=V.select(U),Y=G.select(".svg-container"),ee=Y.append("div"),q=O.node().style,se=parseFloat(q.fontSize||12),ae=P.text;ae===void 0&&(ae=O.attr("data-unformatted")),ee.classed("plugin-editable editable",!0).style({position:"absolute","font-family":q.fontFamily||"Arial","font-size":se,color:P.fill||q.fill||"black",opacity:1,"background-color":P.background||"transparent",outline:"#ffffff33 1px solid",margin:[-se/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(ae).call(F(O,Y,P)).on("blur",function(){U._editing=!1,O.text(this.textContent).style({opacity:1});var j=V.select(this).attr("class"),Q;j?Q="."+j.split(" ")[0]+"-math-group":Q="[class*=-math-group]",Q&&V.select(O.node().parentNode).select(Q).style({opacity:0});var re=this.textContent;V.select(this).transition().duration(0).remove(),V.select(document).on("mouseup",null),X.edit.call(O,re)}).on("focus",function(){var j=this;U._editing=!0,V.select(document).on("mouseup",function(){if(V.event.target===j)return!1;document.activeElement===ee.node()&&ee.node().blur()})}).on("keyup",function(){V.event.which===27?(U._editing=!1,O.style({opacity:1}),V.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),X.cancel.call(O,this.textContent)):(X.input.call(O,this.textContent),V.select(this).call(F(O,Y,P)))}).on("keydown",function(){V.event.which===13&&this.blur()}).call(ce)}return P.immediate?le():$.on("click",le),V.rebind(O,X,"on")}}}),wp=He({"src/components/colorscale/helpers.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=as(),E=sa(),e=Jn(),t=W0().isValid;function r(c,T,l){var _=T?E.nestedProperty(c,T).get()||{}:c,w=_[l||"color"];w&&w._inputArray&&(w=w._inputArray);var A=!1;if(E.isArrayOrTypedArray(w)){for(var M=0;M<w.length;M++)if(S(w[M])){A=!0;break}}return E.isPlainObject(_)&&(A||_.showscale===!0||S(_.cmin)&&S(_.cmax)||t(_.colorscale)||E.isPlainObject(_.colorbar))}var o=["showscale","autocolorscale","colorscale","reversescale","colorbar"],a=["min","max","mid","auto"];function n(c){var T=c._colorAx,l=T||c,_={},w,A,M;for(A=0;A<o.length;A++)M=o[A],_[M]=l[M];if(T)for(w="c",A=0;A<a.length;A++)M=a[A],_[M]=l["c"+M];else{var g;for(A=0;A<a.length;A++){if(M=a[A],g="c"+M,g in l){_[M]=l[g];continue}g="z"+M,g in l&&(_[M]=l[g])}w=g.charAt(0)}return _._sync=function(b,p){var u=a.indexOf(b)!==-1?w+b:b;l[u]=l["_"+u]=p},_}function i(c){for(var T=n(c),l=T.min,_=T.max,w=T.reversescale?s(T.colorscale):T.colorscale,A=w.length,M=new Array(A),g=new Array(A),b=0;b<A;b++){var p=w[b];M[b]=l+p[0]*(_-l),g[b]=p[1]}return{domain:M,range:g}}function s(c){for(var T=c.length,l=new Array(T),_=T-1,w=0;_>=0;_--,w++){var A=c[_];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,_=c.range,w=_.length,A=new Array(w),M=0;M<w;M++){var g=x(_[M]).toRgb();A[M]=[g.r,g.g,g.b,g.a]}var b=d.scale.linear().domain(l).range(A).clamp(!0),p=T.noNumericCheck,u=T.returnArray,y;return p&&u?y=b:p?y=function(m){return v(b(m))}:u?y=function(m){return S(m)?b(m):x(m).isValid()?m:e.defaultLine}:y=function(m){return S(m)?v(b(m)):x(m).isValid()?m:e.defaultLine},y.domain=b.domain,y.range=function(){return _},y}function f(c,T){return h(i(c),T)}function v(c){var T={r:c[0],g:c[1],b:c[2],a:c[3]};return x(T).toRgbString()}V.exports={hasColorscale:r,extractOpts:n,extractScale:i,flipScale:s,makeColorScaleFunc:h,makeColorScaleFuncFromTrace:f}}}),tf=He({"src/plots/cartesian/axis_format_attributes.js"(Z,V){"use strict";var d=t5(),x=d.FORMAT_LINK,S=d.DATE_FORMAT_LINK;function E(r,o){return{valType:"string",dflt:"",editType:"none",description:(o?e:t)("hover text",r)+["By default the values are formatted using "+(o?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function e(r,o){return["Sets the "+r+" formatting rule"+(o?"for `"+o+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+x+"."].join(" ")}function t(r,o){return e(r,o)+[" And for dates see: "+S+".","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(" ")}V.exports={axisHoverFormat:E,descriptionOnlyNumbers:e,descriptionWithDates:t}}}),Wh=He({"src/plots/cartesian/layout_attributes.js"(Z,V){"use strict";var d=tc(),x=sh(),S=Gh().dash,E=Qo().extendFlat,e=zl().templatedArray,t=Jl().templateFormatStringDescription,r=tf().descriptionWithDates,o=Ws().ONEDAY,a=lh(),n=a.HOUR_PATTERN,i=a.WEEKDAY_PATTERN,s={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},h=E({},s,{values:s.values.slice().concat(["sync"])});function f(u){return{valType:"integer",min:0,dflt:u?5:0,editType:"ticks"}}var v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},c={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},T={valType:"data_array",editType:"ticks"},l={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function _(u){var y={valType:"number",min:0,editType:"ticks"};return u||(y.dflt=5),y}function w(u){var y={valType:"number",min:0,editType:"ticks"};return u||(y.dflt=1),y}var A={valType:"color",dflt:x.defaultLine,editType:"ticks"},M={valType:"color",dflt:x.lightLine,editType:"ticks"};function g(u){var y={valType:"number",min:0,editType:"ticks"};return u||(y.dflt=1),y}var b=E({},S,{editType:"ticks"}),p={valType:"boolean",editType:"ticks"};V.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:x.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:d({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},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:[a.idRegex.x.toString(),a.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:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:e("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:[i,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:o},editType:"calc"}),tickmode:h,nticks:f(),tick0:v,dtick:c,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:T,ticktext:{valType:"data_array",editType:"ticks"},ticks:l,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:_(),tickwidth:w(),tickcolor:A,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:E({},S,{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:d({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:r("tick label")},tickformatstops:e("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:r("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:x.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:p,gridcolor:M,gridwidth:g(),griddash:b,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:x.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:x.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:s,nticks:f("minor"),tick0:v,dtick:c,tickvals:T,ticks:l,ticklen:_("minor"),tickwidth:w("minor"),tickcolor:A,gridcolor:M,gridwidth:g("minor"),griddash:b,showgrid:p,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"}}}),x2=He({"src/components/colorbar/attributes.js"(Z,V){"use strict";var d=Wh(),x=tc(),S=Qo().extendFlat,E=pc().overrideAll;V.exports=E({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:d.linecolor,outlinewidth:d.linewidth,bordercolor:d.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:d.minor.tickmode,nticks:d.nticks,tick0:d.tick0,dtick:d.dtick,tickvals:d.tickvals,ticktext:d.ticktext,ticks:S({},d.ticks,{dflt:""}),ticklabeloverflow:S({},d.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:d.ticklen,tickwidth:d.tickwidth,tickcolor:d.tickcolor,ticklabelstep:d.ticklabelstep,showticklabels:d.showticklabels,labelalias:d.labelalias,tickfont:x({}),tickangle:d.tickangle,tickformat:d.tickformat,tickformatstops:d.tickformatstops,tickprefix:d.tickprefix,showtickprefix:d.showtickprefix,ticksuffix:d.ticksuffix,showticksuffix:d.showticksuffix,separatethousands:d.separatethousands,exponentformat:d.exponentformat,minexponent:d.minexponent,showexponent:d.showexponent,title:{text:{valType:"string"},font:x({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),ku=He({"src/components/colorscale/attributes.js"(Z,V){"use strict";var d=x2(),x=Jy().counter,S=Jm(),E=W0().scales,e=S(E);function t(r){return"`"+r+"`"}V.exports=function(o,a){o=o||"",a=a||{};var n=a.cLetter||"c",i="onlyIfNumerical"in a?a.onlyIfNumerical:!!o,s="noScale"in a?a.noScale:o==="marker.line",h="showScaleDflt"in a?a.showScaleDflt:n==="z",f=typeof a.colorscaleDflt=="string"?E[a.colorscaleDflt]:null,v=a.editTypeOverride||"",c=o?o+".":"",T,l;"colorAttr"in a?(T=a.colorAttr,l=a.colorAttr):(T={z:"z",c:"color"}[n],l="in "+t(c+T));var _=i?" Has an effect only if "+l+" is set to a numerical array.":"",w=n+"auto",A=n+"min",M=n+"max",g=n+"mid",b=t(c+w),p=t(c+A),u=t(c+M),y=p+" and "+u,m={};m[A]=m[M]=void 0;var R={};R[w]=!1;var L={};return T==="color"&&(L.color={valType:"color",arrayOk:!0,editType:v||"style"},a.anim&&(L.color.anim=!0)),L[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},L[A]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:R},L[M]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:R},L[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},L.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1}},L.autocolorscale={valType:"boolean",dflt:a.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},L.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(L.showscale={valType:"boolean",dflt:h,editType:"calc"},L.colorbar=d),a.noColorAxis||(L.coloraxis={valType:"subplotid",regex:x("coloraxis"),dflt:null,editType:"calc"}),L}}}),o5=He({"src/components/colorscale/layout_attributes.js"(Z,V){"use strict";var d=Qo().extendFlat,x=ku(),S=W0().scales;V.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:S.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:S.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:S.RdBu,editType:"calc"}},coloraxis:d({_isSubplotObj:!0,editType:"calc"},x("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),s5=He({"src/components/colorbar/has_colorbar.js"(Z,V){"use strict";var d=sa();V.exports=function(S){return d.isPlainObject(S.colorbar)}}}),l5=He({"src/plots/cartesian/clean_ticks.js"(Z){"use strict";var V=as(),d=sa(),x=Ws(),S=x.ONEDAY,E=x.ONEWEEK;Z.dtick=function(e,t){var r=t==="log",o=t==="date",a=t==="category",n=o?S:1;if(!e)return n;if(V(e))return e=Number(e),e<=0?n:a?Math.max(1,Math.round(e)):o?Math.max(.1,e):e;if(typeof e!="string"||!(o||r))return n;var i=e.charAt(0),s=e.slice(1);return s=V(s)?Number(s):0,s<=0||!(o&&i==="M"&&s===Math.round(s)||r&&i==="L"||r&&i==="D"&&(s===1||s===2))?n:e},Z.tick0=function(e,t,r,o){if(t==="date")return d.cleanDate(e,d.dateTick0(r,o%E===0?1:0));if(!(o==="D1"||o==="D2"))return V(e)?Number(e):0}}}),Y0=He({"src/plots/cartesian/tick_value_defaults.js"(Z,V){"use strict";var d=l5(),x=sa().isArrayOrTypedArray,S=bp().isTypedArraySpec,E=bp().decodeTypedArraySpec;V.exports=function(t,r,o,a,n){n||(n={});var i=n.isMinor,s=i?t.minor||{}:t,h=i?r.minor:r,f=i?"minor.":"";function v(g){var b=s[g];return S(b)&&(b=E(b)),b!==void 0?b:(h._template||{})[g]}var c=v("tick0"),T=v("dtick"),l=v("tickvals"),_=x(l)?"array":T?"linear":"auto",w=o(f+"tickmode",_);if(w==="auto"||w==="sync")o(f+"nticks");else if(w==="linear"){var A=h.dtick=d.dtick(T,a);h.tick0=d.tick0(c,a,r.calendar,A)}else if(a!=="multicategory"){var M=o(f+"tickvals");M===void 0?h.tickmode="auto":i||o("ticktext")}}}}),t1=He({"src/plots/cartesian/tick_mark_defaults.js"(Z,V){"use strict";var d=sa(),x=Wh();V.exports=function(E,e,t,r){var o=r.isMinor,a=o?E.minor||{}:E,n=o?e.minor:e,i=o?x.minor:x,s=o?"minor.":"",h=d.coerce2(a,n,i,"ticklen",o?(e.ticklen||5)*.6:void 0),f=d.coerce2(a,n,i,"tickwidth",o?e.tickwidth||1:void 0),v=d.coerce2(a,n,i,"tickcolor",(o?e.tickcolor:void 0)||n.color),c=t(s+"ticks",!o&&r.outerTicks||h||f||v?"outside":"");c||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}}),u5=He({"src/plots/cartesian/show_dflt.js"(Z,V){"use strict";V.exports=function(x){var S=["showexponent","showtickprefix","showticksuffix"],E=S.filter(function(t){return x[t]!==void 0}),e=function(t){return x[t]===x[E[0]]};if(E.every(e)||E.length===1)return x[E[0]]}}}),hp=He({"src/plots/array_container_defaults.js"(Z,V){"use strict";var d=sa(),x=zl();V.exports=function(E,e,t){var r=t.name,o=t.inclusionAttr||"visible",a=e[r],n=d.isArrayOrTypedArray(E[r])?E[r]:[],i=e[r]=[],s=x.arrayTemplater(e,r,o),h,f;for(h=0;h<n.length;h++){var v=n[h];d.isPlainObject(v)?f=s.newItem(v):(f=s.newItem({}),f[o]=!1),f._index=h,f[o]!==!1&&t.handleItemDefaults(v,f,e,t),i.push(f)}var c=s.defaultItems();for(h=0;h<c.length;h++)f=c[h],f._index=i.length,t.handleItemDefaults({},f,e,t,{}),i.push(f);if(d.isArrayOrTypedArray(a)){var T=Math.min(a.length,i.length);for(h=0;h<T;h++)d.relinkPrivateKeys(i[h],a[h])}return i}}}),Qm=He({"src/plots/cartesian/tick_label_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn().contrast,S=Wh(),E=u5(),e=hp();V.exports=function(o,a,n,i,s){s||(s={});var h=n("labelalias");d.isPlainObject(h)||delete a.labelalias;var f=E(o),v=n("showticklabels");if(v){s.noTicklabelshift||n("ticklabelshift"),s.noTicklabelstandoff||n("ticklabelstandoff");var c=s.font||{},T=a.color,l=a.ticklabelposition||"",_=l.indexOf("inside")!==-1?x(s.bgColor):T&&T!==S.color.dflt?T:c.color;if(d.coerceFont(n,"tickfont",c,{overrideDflt:{color:_}}),!s.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!s.noAng){var w=n("tickangle");!s.noAutotickangles&&w==="auto"&&n("autotickangles")}if(i!=="category"){var A=n("tickformat");e(o,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:t}),a.tickformatstops.length||delete a.tickformatstops,!s.noExp&&!A&&i!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!s.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function t(r,o){function a(i,s){return d.coerce(r,o,S.tickformatstops,i,s)}var n=a("enabled");n&&(a("dtickrange"),a("value"))}}}),e0=He({"src/plots/cartesian/prefix_suffix_defaults.js"(Z,V){"use strict";var d=u5();V.exports=function(S,E,e,t,r){r||(r={});var o=r.tickSuffixDflt,a=d(S),n=e("tickprefix");n&&e("showtickprefix",a);var i=e("ticksuffix",o);i&&e("showticksuffix",a)}}}),c5=He({"src/components/colorbar/defaults.js"(Z,V){"use strict";var d=sa(),x=zl(),S=Y0(),E=t1(),e=Qm(),t=e0(),r=x2();V.exports=function(a,n,i){var s=x.newContainer(n,"colorbar"),h=a.colorbar||{};function f(P,U){return d.coerce(h,s,r,P,U)}var v=i.margin||{t:0,b:0,l:0,r:0},c=i.width-v.l-v.r,T=i.height-v.t-v.b,l=f("orientation"),_=l==="v",w=f("thicknessmode");f("thickness",w==="fraction"?30/(_?c:T):30);var A=f("lenmode");f("len",A==="fraction"?1:_?T:c);var M=f("yref"),g=f("xref"),b=M==="paper",p=g==="paper",u,y,m,R="left";_?(m="middle",R=p?"left":"right",u=p?1.02:1,y=.5):(m=b?"bottom":"top",R="center",u=.5,y=b?1.02:1),d.coerce(h,s,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:u}},"x"),d.coerce(h,s,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:y}},"y"),f("xanchor",R),f("xpad"),f("yanchor",m),f("ypad"),d.noneOrAll(h,s,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var L=d.coerce(h,s,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:_?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",L.indexOf("inside")!==-1?"hide past domain":"hide past div"),S(h,s,f,"linear");var z=i.font,F={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:z};L.indexOf("inside")!==-1&&(F.bgColor="black"),t(h,s,f,"linear",F),e(h,s,f,"linear",F),E(h,s,f,"linear",F),f("title.text",i._dfltTitle.colorbar);var N=s.showticklabels?s.tickfont:z,O=d.extendFlat({},z,{family:N.family,size:d.bigFont(N.size)});d.coerceFont(f,"title.font",O),f("title.side",_?"top":"right")}}}),_h=He({"src/components/colorscale/defaults.js"(Z,V){"use strict";var d=as(),x=sa(),S=s5(),E=c5(),e=W0().isValid,t=lo().traceIs;function r(o,a){var n=a.slice(0,a.length-1);return a?x.nestedProperty(o,n).get()||{}:o}V.exports=function o(a,n,i,s,h){var f=h.prefix,v=h.cLetter,c="_module"in n,T=r(a,f),l=r(n,f),_=r(n._template||{},f)||{},w=function(){return delete a.coloraxis,delete n.coloraxis,o(a,n,i,s,h)};if(c){var A=i._colorAxes||{},M=s(f+"coloraxis");if(M){var g=t(n,"contour")&&x.nestedProperty(n,"contours.coloring").get()||"heatmap",b=A[M];b?(b[2].push(w),b[0]!==g&&(b[0]=!1,x.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):A[M]=[g,n,[w]];return}}var p=T[v+"min"],u=T[v+"max"],y=d(p)&&d(u)&&p<u,m=s(f+v+"auto",!y);m?s(f+v+"mid"):(s(f+v+"min"),s(f+v+"max"));var R=T.colorscale,L=_.colorscale,z;if(R!==void 0&&(z=!e(R)),L!==void 0&&(z=!e(L)),s(f+"autocolorscale",z),s(f+"colorscale"),s(f+"reversescale"),f!=="marker.line."){var F;f&&c&&(F=S(T));var N=s(f+"showscale",F);N&&(f&&_&&(l._template=_),E(T,l,i))}}}}),oz=He({"src/components/colorscale/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=zl(),S=o5(),E=_h();V.exports=function(t,r){function o(c,T){return d.coerce(t,r,S,c,T)}o("colorscale.sequential"),o("colorscale.sequentialminus"),o("colorscale.diverging");var a=r._colorAxes,n,i;function s(c,T){return d.coerce(n,i,S.coloraxis,c,T)}for(var h in a){var f=a[h];if(f[0])n=t[h]||{},i=x.newContainer(r,h,"coloraxis"),i._name=h,E(n,i,r,s,{prefix:"",cLetter:"c"});else{for(var v=0;v<f[2].length;v++)f[2][v]();delete r._colorAxes[h]}}}}}),sz=He({"src/components/colorscale/cross_trace_defaults.js"(Z,V){"use strict";var d=sa(),x=wp().hasColorscale,S=wp().extractOpts;V.exports=function(e,t){function r(f,v){var c=f["_"+v];c!==void 0&&(f[v]=c)}function o(f,v){var c=v.container?d.nestedProperty(f,v.container).get():f;if(c)if(c.coloraxis)c._colorAx=t[c.coloraxis];else{var T=S(c),l=T.auto;(l||T.min===void 0)&&r(c,v.min),(l||T.max===void 0)&&r(c,v.max),T.autocolorscale&&r(c,"colorscale")}}for(var a=0;a<e.length;a++){var n=e[a],i=n._module.colorbar;if(i)if(Array.isArray(i))for(var s=0;s<i.length;s++)o(n,i[s]);else o(n,i);x(n,"marker.line")&&o(n,{container:"marker.line",min:"cmin",max:"cmax"})}for(var h in t._colorAxes)o(t[h],{min:"cmin",max:"cmax"})}}}),Tp=He({"src/components/colorscale/calc.js"(Z,V){"use strict";var d=as(),x=sa(),S=wp().extractOpts;V.exports=function(e,t,r){var o=e._fullLayout,a=r.vals,n=r.containerStr,i=n?x.nestedProperty(t,n).get():t,s=S(i),h=s.auto!==!1,f=s.min,v=s.max,c=s.mid,T=function(){return x.aggNums(Math.min,null,a)},l=function(){return x.aggNums(Math.max,null,a)};if(f===void 0?f=T():h&&(i._colorAx&&d(f)?f=Math.min(f,T()):f=T()),v===void 0?v=l():h&&(i._colorAx&&d(v)?v=Math.max(v,l()):v=l()),h&&c!==void 0&&(v-c>c-f?f=c-(v-c):v-c<c-f&&(v=c+(c-f))),f===v&&(f-=.5,v+=.5),s._sync("min",f),s._sync("max",v),s.autocolorscale){var _;f*v<0?_=o.colorscale.diverging:f>=0?_=o.colorscale.sequential:_=o.colorscale.sequentialminus,s._sync("colorscale",_)}}}}),rc=He({"src/components/colorscale/index.js"(Z,V){"use strict";var d=W0(),x=wp();V.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:d.scales,defaultScale:d.defaultScale,getScale:d.get,isValidScale:d.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,V){"use strict";var d=sa(),x=bp().isTypedArraySpec;V.exports={hasLines:function(S){return S.visible&&S.mode&&S.mode.indexOf("lines")!==-1},hasMarkers:function(S){return S.visible&&(S.mode&&S.mode.indexOf("markers")!==-1||S.type==="splom")},hasText:function(S){return S.visible&&S.mode&&S.mode.indexOf("text")!==-1},isBubble:function(S){var E=S.marker;return d.isPlainObject(E)&&(d.isArrayOrTypedArray(E.size)||x(E.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,V){"use strict";var d=as();V.exports=function(S,E){E||(E=2);var e=S.marker,t=e.sizeref||1,r=e.sizemin||0,o=e.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=o(a/E);return d(n)&&n>0?Math.max(n,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var V=sa();Z.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},Z.isTraceInSubplots=function(t,r){if(t.type==="splom"){for(var o=t.xaxes||[],a=t.yaxes||[],n=0;n<o.length;n++)for(var i=0;i<a.length;i++)if(r.indexOf(o[n]+a[i])!==-1)return!0;return!1}return r.indexOf(Z.getSubplot(t))!==-1},Z.flat=function(t,r){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=r;return o},Z.p2c=function(t,r){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=t[a].p2c(r);return o},Z.getDistanceFunction=function(t,r,o,a){return t==="closest"?a||Z.quadrature(r,o):t.charAt(0)==="x"?r:o},Z.getClosest=function(t,r,o){if(o.index!==!1)o.index>=0&&o.index<t.length?o.distance=0:o.index=!1;else for(var a=1/0,n=t.length,i=0;i<n;i++)a=r(t[i]),a<=o.distance&&(o.index=i,o.distance=a);return o},Z.inbox=function(t,r,o){return t*r<0||t===0?o:1/0},Z.quadrature=function(t,r){return function(o){var a=t(o),n=r(o);return Math.sqrt(a*a+n*n)}},Z.makeEventData=function(t,r,o){var a="index"in t?t.index:t.pointNumber,n={data:r._input,fullData:r,curveNumber:r.index,pointNumber:a};if(r._indexToPoints){var i=r._indexToPoints[a];i.length===1?n.pointIndex=i[0]:n.pointIndices=i}else n.pointIndex=a;return r._module.eventData?n=r._module.eventData(n,t,r,o,a):("xVal"in t?n.x=t.xVal:"x"in t&&(n.x=t.x),"yVal"in t?n.y=t.yVal:"y"in t&&(n.y=t.y),t.xa&&(n.xaxis=t.xa),t.ya&&(n.yaxis=t.ya),t.zLabelVal!==void 0&&(n.z=t.zLabelVal)),Z.appendArrayPointValue(n,r,a),n},Z.appendArrayPointValue=function(t,r,o){var a=r._arrayAttrs;if(a)for(var n=0;n<a.length;n++){var i=a[n],s=x(i);if(t[s]===void 0){var h=V.nestedProperty(r,i).get(),f=S(h,o);f!==void 0&&(t[s]=f)}}},Z.appendArrayMultiPointValues=function(t,r,o){var a=r._arrayAttrs;if(a)for(var n=0;n<a.length;n++){var i=a[n],s=x(i);if(t[s]===void 0){for(var h=V.nestedProperty(r,i).get(),f=new Array(o.length),v=0;v<o.length;v++)f[v]=S(h,o[v]);t[s]=f}}};var d={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function x(t){return d[t]||t}function S(t,r){if(Array.isArray(r)){if(V.isArrayOrTypedArray(t)&&V.isArrayOrTypedArray(t[r[0]]))return t[r[0]][r[1]]}else return t[r]}var E={x:!0,y:!0},e={"x unified":!0,"y unified":!0};Z.isUnifiedHover=function(t){return typeof t!="string"?!1:!!e[t]},Z.isXYhover=function(t){return typeof t!="string"?!1:!!E[t]}}}),M_=He({"node_modules/parse-svg-path/index.js"(Z,V){V.exports=S;var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},x=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function S(t){var r=[];return t.replace(x,function(o,a,n){var i=a.toLowerCase();for(n=e(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==d[i])return n.unshift(a),r.push(n);if(n.length<d[i])throw new Error("malformed path data");r.push([a].concat(n.splice(0,d[i])))}}),r}var E=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function e(t){var r=t.match(E);return r?r.map(Number):[]}}}),lz=He({"src/components/drawing/symbol_defs.js"(Z,V){"use strict";var d=M_(),x=function(v,c){return c?Math.round(v*(c=Math.pow(10,c)))/c:Math.round(v)},S="M0,0Z",E=Math.sqrt(2),e=Math.sqrt(3),t=Math.PI,r=Math.cos,o=Math.sin;V.exports={circle:{n:0,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_="M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z";return T?f(c,T,_):_}},square:{n:1,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")}},diamond:{n:2,f:function(v,c,T){if(a(c))return S;var l=x(v*1.3,2);return f(c,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"Z")}},cross:{n:3,f:function(v,c,T){if(a(c))return S;var l=x(v*.4,2),_=x(v*1.2,2);return f(c,T,"M"+_+","+l+"H"+l+"V"+_+"H-"+l+"V"+l+"H-"+_+"V-"+l+"H-"+l+"V-"+_+"H"+l+"V-"+l+"H"+_+"Z")}},x:{n:4,f:function(v,c,T){if(a(c))return S;var l=x(v*.8/E,2),_="l"+l+","+l,w="l"+l+",-"+l,A="l-"+l+",-"+l,M="l-"+l+","+l;return f(c,T,"M0,"+l+_+w+A+w+A+M+A+M+_+M+_+"Z")}},"triangle-up":{n:5,f:function(v,c,T){if(a(c))return S;var l=x(v*2/e,2),_=x(v/2,2),w=x(v,2);return f(c,T,"M-"+l+","+_+"H"+l+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(v,c,T){if(a(c))return S;var l=x(v*2/e,2),_=x(v/2,2),w=x(v,2);return f(c,T,"M-"+l+",-"+_+"H"+l+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(v,c,T){if(a(c))return S;var l=x(v*2/e,2),_=x(v/2,2),w=x(v,2);return f(c,T,"M"+_+",-"+l+"V"+l+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(v,c,T){if(a(c))return S;var l=x(v*2/e,2),_=x(v/2,2),w=x(v,2);return f(c,T,"M-"+_+",-"+l+"V"+l+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(v,c,T){if(a(c))return S;var l=x(v*.6,2),_=x(v*1.2,2);return f(c,T,"M-"+_+",-"+l+"H"+l+"V"+_+"Z")}},"triangle-se":{n:10,f:function(v,c,T){if(a(c))return S;var l=x(v*.6,2),_=x(v*1.2,2);return f(c,T,"M"+l+",-"+_+"V"+l+"H-"+_+"Z")}},"triangle-sw":{n:11,f:function(v,c,T){if(a(c))return S;var l=x(v*.6,2),_=x(v*1.2,2);return f(c,T,"M"+_+","+l+"H-"+l+"V-"+_+"Z")}},"triangle-nw":{n:12,f:function(v,c,T){if(a(c))return S;var l=x(v*.6,2),_=x(v*1.2,2);return f(c,T,"M-"+l+","+_+"V-"+l+"H"+_+"Z")}},pentagon:{n:13,f:function(v,c,T){if(a(c))return S;var l=x(v*.951,2),_=x(v*.588,2),w=x(-v,2),A=x(v*-.309,2),M=x(v*.809,2);return f(c,T,"M"+l+","+A+"L"+_+","+M+"H-"+_+"L-"+l+","+A+"L0,"+w+"Z")}},hexagon:{n:14,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v/2,2),w=x(v*e/2,2);return f(c,T,"M"+w+",-"+_+"V"+_+"L0,"+l+"L-"+w+","+_+"V-"+_+"L0,-"+l+"Z")}},hexagon2:{n:15,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v/2,2),w=x(v*e/2,2);return f(c,T,"M-"+_+","+w+"H"+_+"L"+l+",0L"+_+",-"+w+"H-"+_+"L-"+l+",0Z")}},octagon:{n:16,f:function(v,c,T){if(a(c))return S;var l=x(v*.924,2),_=x(v*.383,2);return f(c,T,"M-"+_+",-"+l+"H"+_+"L"+l+",-"+_+"V"+_+"L"+_+","+l+"H-"+_+"L-"+l+","+_+"V-"+_+"Z")}},star:{n:17,f:function(v,c,T){if(a(c))return S;var l=v*1.4,_=x(l*.225,2),w=x(l*.951,2),A=x(l*.363,2),M=x(l*.588,2),g=x(-l,2),b=x(l*-.309,2),p=x(l*.118,2),u=x(l*.809,2),y=x(l*.382,2);return f(c,T,"M"+_+","+b+"H"+w+"L"+A+","+p+"L"+M+","+u+"L0,"+y+"L-"+M+","+u+"L-"+A+","+p+"L-"+w+","+b+"H-"+_+"L0,"+g+"Z")}},hexagram:{n:18,f:function(v,c,T){if(a(c))return S;var l=x(v*.66,2),_=x(v*.38,2),w=x(v*.76,2);return f(c,T,"M-"+w+",0l-"+_+",-"+l+"h"+w+"l"+_+",-"+l+"l"+_+","+l+"h"+w+"l-"+_+","+l+"l"+_+","+l+"h-"+w+"l-"+_+","+l+"l-"+_+",-"+l+"h-"+w+"Z")}},"star-triangle-up":{n:19,f:function(v,c,T){if(a(c))return S;var l=x(v*e*.8,2),_=x(v*.8,2),w=x(v*1.6,2),A=x(v*4,2),M="A "+A+","+A+" 0 0 1 ";return f(c,T,"M-"+l+","+_+M+l+","+_+M+"0,-"+w+M+"-"+l+","+_+"Z")}},"star-triangle-down":{n:20,f:function(v,c,T){if(a(c))return S;var l=x(v*e*.8,2),_=x(v*.8,2),w=x(v*1.6,2),A=x(v*4,2),M="A "+A+","+A+" 0 0 1 ";return f(c,T,"M"+l+",-"+_+M+"-"+l+",-"+_+M+"0,"+w+M+l+",-"+_+"Z")}},"star-square":{n:21,f:function(v,c,T){if(a(c))return S;var l=x(v*1.1,2),_=x(v*2,2),w="A "+_+","+_+" 0 0 1 ";return f(c,T,"M-"+l+",-"+l+w+"-"+l+","+l+w+l+","+l+w+l+",-"+l+w+"-"+l+",-"+l+"Z")}},"star-diamond":{n:22,f:function(v,c,T){if(a(c))return S;var l=x(v*1.4,2),_=x(v*1.9,2),w="A "+_+","+_+" 0 0 1 ";return f(c,T,"M-"+l+",0"+w+"0,"+l+w+l+",0"+w+"0,-"+l+w+"-"+l+",0Z")}},"diamond-tall":{n:23,f:function(v,c,T){if(a(c))return S;var l=x(v*.7,2),_=x(v*1.4,2);return f(c,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},"diamond-wide":{n:24,f:function(v,c,T){if(a(c))return S;var l=x(v*1.4,2),_=x(v*.7,2);return f(c,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},hourglass:{n:25,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"H-"+l+"L"+l+",-"+l+"H-"+l+"Z")},noDot:!0},bowtie:{n:26,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"V-"+l+"L-"+l+","+l+"V-"+l+"Z")},noDot:!0},"circle-cross":{n:27,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v/E,2);return f(c,T,"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(v,c,T){if(a(c))return S;var l=x(v*1.3,2);return f(c,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM0,-"+l+"V"+l+"M-"+l+",0H"+l)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(v,c,T){if(a(c))return S;var l=x(v*1.3,2),_=x(v*.65,2);return f(c,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM-"+_+",-"+_+"L"+_+","+_+"M-"+_+","+_+"L"+_+",-"+_)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(v,c,T){if(a(c))return S;var l=x(v*1.4,2);return f(c,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(v,c,T){if(a(c))return S;var l=x(v*1.2,2),_=x(v*.85,2);return f(c,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(v,c,T){if(a(c))return S;var l=x(v/2,2),_=x(v,2);return f(c,T,"M"+l+","+_+"V-"+_+"M"+(l-_)+",-"+_+"V"+_+"M"+_+","+l+"H-"+_+"M-"+_+","+(l-_)+"H"+_)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(v,c,T){if(a(c))return S;var l=x(v*1.2,2),_=x(v*1.6,2),w=x(v*.8,2);return f(c,T,"M-"+l+","+w+"L0,0M"+l+","+w+"L0,0M0,-"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(v,c,T){if(a(c))return S;var l=x(v*1.2,2),_=x(v*1.6,2),w=x(v*.8,2);return f(c,T,"M-"+l+",-"+w+"L0,0M"+l+",-"+w+"L0,0M0,"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(v,c,T){if(a(c))return S;var l=x(v*1.2,2),_=x(v*1.6,2),w=x(v*.8,2);return f(c,T,"M"+w+","+l+"L0,0M"+w+",-"+l+"L0,0M-"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(v,c,T){if(a(c))return S;var l=x(v*1.2,2),_=x(v*1.6,2),w=x(v*.8,2);return f(c,T,"M-"+w+","+l+"L0,0M-"+w+",-"+l+"L0,0M"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(v,c,T){if(a(c))return S;var l=x(v*1.4,2);return f(c,T,"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(v,c,T){if(a(c))return S;var l=x(v*1.4,2);return f(c,T,"M0,"+l+"V-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(v,c,T){if(a(c))return S;var l=x(v,2);return f(c,T,"M"+l+","+l+"L-"+l+",-"+l)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v*2,2);return f(c,T,"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v*2,2);return f(c,T,"M0,0L-"+l+",-"+_+"H"+l+"Z")},noDot:!0},"arrow-left":{n:47,f:function(v,c,T){if(a(c))return S;var l=x(v*2,2),_=x(v,2);return f(c,T,"M0,0L"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-right":{n:48,f:function(v,c,T){if(a(c))return S;var l=x(v*2,2),_=x(v,2);return f(c,T,"M0,0L-"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v*2,2);return f(c,T,"M-"+l+",0H"+l+"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(v,c,T){if(a(c))return S;var l=x(v,2),_=x(v*2,2);return f(c,T,"M-"+l+",0H"+l+"M0,0L-"+l+",-"+_+"H"+l+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(v,c,T){if(a(c))return S;var l=x(v*2,2),_=x(v,2);return f(c,T,"M0,-"+_+"V"+_+"M0,0L"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(v,c,T){if(a(c))return S;var l=x(v*2,2),_=x(v,2);return f(c,T,"M0,-"+_+"V"+_+"M0,0L-"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(v,c,T){if(a(c))return S;var l=t/2.5,_=2*v*r(l),w=2*v*o(l);return f(c,T,"M0,0L"+-_+","+w+"L"+_+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(v,c,T){if(a(c))return S;var l=t/4,_=2*v*r(l),w=2*v*o(l);return f(c,T,"M0,0L"+-_+","+w+"A "+2*v+","+2*v+" 0 0 1 "+_+","+w+"Z")},backoff:.4,noDot:!0}};function a(v){return v===null}var n,i,s,h;function f(v,c,T){if((!v||v%360===0)&&!c)return T;if(s===v&&h===c&&n===T)return i;s=v,h=c,n=T;function l(z,F){var N=r(z),O=o(z),P=F[0],U=F[1]+(c||0);return[P*N-U*O,P*O+U*N]}for(var _=v/180*t,w=0,A=0,M=d(T),g="",b=0;b<M.length;b++){var p=M[b],u=p[0],y=w,m=A;if(u==="M"||u==="L")w=+p[1],A=+p[2];else if(u==="m"||u==="l")w+=+p[1],A+=+p[2];else if(u==="H")w=+p[1];else if(u==="h")w+=+p[1];else if(u==="V")A=+p[1];else if(u==="v")A+=+p[1];else if(u==="A"){w=+p[1],A=+p[2];var R=l(_,[+p[6],+p[7]]);p[6]=R[0],p[7]=R[1],p[3]=+p[3]+v}(u==="H"||u==="V")&&(u="L"),(u==="h"||u==="v")&&(u="l"),(u==="m"||u==="l")&&(w-=y,A-=m);var L=l(_,[w,A]);(u==="H"||u==="V")&&(u="L"),(u==="M"||u==="L"||u==="m"||u==="l")&&(p[1]=L[0],p[2]=L[1]),p[0]=u,g+=p[0]+p.slice(1).join(",")}return i=g,g}}}),es=He({"src/components/drawing/index.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=x.numberFormat,E=as(),e=Ch(),t=lo(),r=Jn(),o=rc(),a=x.strTranslate,n=ou(),i=vd(),s=uh(),h=s.LINE_SPACING,f=Ym().DESELECTDIM,v=Fu(),c=r1(),T=$p().appendArrayPointValue,l=V.exports={};l.font=function(he,ue){var ne=ue.variant,Ce=ue.style,Ye=ue.weight,rt=ue.color,Ke=ue.size,Mt=ue.family,kt=ue.shadow,Nt=ue.lineposition,Gt=ue.textcase;Mt&&he.style("font-family",Mt),Ke+1&&he.style("font-size",Ke+"px"),rt&&he.call(r.fill,rt),Ye&&he.style("font-weight",Ye),Ce&&he.style("font-style",Ce),ne&&he.style("font-variant",ne),Gt&&he.style("text-transform",_(A(Gt))),kt&&he.style("text-shadow",kt==="auto"?n.makeTextShadow(r.contrast(rt)):_(kt)),Nt&&he.style("text-decoration-line",_(M(Nt)))};function _(he){return he==="none"?void 0:he}var w={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function A(he){return w[he]}function M(he){return he.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}l.setPosition=function(he,ue,ne){he.attr("x",ue).attr("y",ne)},l.setSize=function(he,ue,ne){he.attr("width",ue).attr("height",ne)},l.setRect=function(he,ue,ne,Ce,Ye){he.call(l.setPosition,ue,ne).call(l.setSize,Ce,Ye)},l.translatePoint=function(he,ue,ne,Ce){var Ye=ne.c2p(he.x),rt=Ce.c2p(he.y);if(E(Ye)&&E(rt)&&ue.node())ue.node().nodeName==="text"?ue.attr("x",Ye).attr("y",rt):ue.attr("transform",a(Ye,rt));else return!1;return!0},l.translatePoints=function(he,ue,ne){he.each(function(Ce){var Ye=d.select(this);l.translatePoint(Ce,Ye,ue,ne)})},l.hideOutsideRangePoint=function(he,ue,ne,Ce,Ye,rt){ue.attr("display",ne.isPtWithinRange(he,Ye)&&Ce.isPtWithinRange(he,rt)?null:"none")},l.hideOutsideRangePoints=function(he,ue){if(ue._hasClipOnAxisFalse){var ne=ue.xaxis,Ce=ue.yaxis;he.each(function(Ye){var rt=Ye[0].trace,Ke=rt.xcalendar,Mt=rt.ycalendar,kt=t.traceIs(rt,"bar-like")?".bartext":".point,.textpoint";he.selectAll(kt).each(function(Nt){l.hideOutsideRangePoint(Nt,d.select(this),ne,Ce,Ke,Mt)})})}},l.crispRound=function(he,ue,ne){return!ue||!E(ue)?ne||0:he._context.staticPlot?ue:ue<1?1:Math.round(ue)},l.singleLineStyle=function(he,ue,ne,Ce,Ye){ue.style("fill","none");var rt=(((he||[])[0]||{}).trace||{}).line||{},Ke=ne||rt.width||0,Mt=Ye||rt.dash||"";r.stroke(ue,Ce||rt.color),l.dashLine(ue,Mt,Ke)},l.lineGroupStyle=function(he,ue,ne,Ce){he.style("fill","none").each(function(Ye){var rt=(((Ye||[])[0]||{}).trace||{}).line||{},Ke=ue||rt.width||0,Mt=Ce||rt.dash||"";d.select(this).call(r.stroke,ne||rt.color).call(l.dashLine,Mt,Ke)})},l.dashLine=function(he,ue,ne){ne=+ne||0,ue=l.dashStyle(ue,ne),he.style({"stroke-dasharray":ue,"stroke-width":ne+"px"})},l.dashStyle=function(he,ue){ue=+ue||1;var ne=Math.max(ue,3);return he==="solid"?he="":he==="dot"?he=ne+"px,"+ne+"px":he==="dash"?he=3*ne+"px,"+3*ne+"px":he==="longdash"?he=5*ne+"px,"+5*ne+"px":he==="dashdot"?he=3*ne+"px,"+ne+"px,"+ne+"px,"+ne+"px":he==="longdashdot"&&(he=5*ne+"px,"+2*ne+"px,"+ne+"px,"+2*ne+"px"),he};function g(he,ue,ne,Ce){var Ye=ue.fillpattern,rt=ue.fillgradient,Ke=l.getPatternAttr,Mt=Ye&&(Ke(Ye.shape,0,"")||Ke(Ye.path,0,""));if(Mt){var kt=Ke(Ye.bgcolor,0,null),Nt=Ke(Ye.fgcolor,0,null),Gt=Ye.fgopacity,Mr=Ke(Ye.size,0,8),mr=Ke(Ye.solidity,0,.3),qr=ue.uid;l.pattern(he,"point",ne,qr,Mt,Mr,mr,void 0,Ye.fillmode,kt,Nt,Gt)}else if(rt&&rt.type!=="none"){var Er=rt.type,Ir="scatterfill-"+ue.uid;if(Ce&&(Ir="legendfill-"+ue.uid),!Ce&&(rt.start!==void 0||rt.stop!==void 0)){var _t,Oe;Er==="horizontal"?(_t={x:rt.start,y:0},Oe={x:rt.stop,y:0}):Er==="vertical"&&(_t={x:0,y:rt.start},Oe={x:0,y:rt.stop}),_t.x=ue._xA.c2p(_t.x===void 0?ue._extremes.x.min[0].val:_t.x,!0),_t.y=ue._yA.c2p(_t.y===void 0?ue._extremes.y.min[0].val:_t.y,!0),Oe.x=ue._xA.c2p(Oe.x===void 0?ue._extremes.x.max[0].val:Oe.x,!0),Oe.y=ue._yA.c2p(Oe.y===void 0?ue._extremes.y.max[0].val:Oe.y,!0),he.call(L,ne,Ir,"linear",rt.colorscale,"fill",_t,Oe,!0,!1)}else Er==="horizontal"&&(Er=Er+"reversed"),he.call(l.gradient,ne,Ir,Er,rt.colorscale,"fill")}else ue.fillcolor&&he.call(r.fill,ue.fillcolor)}l.singleFillStyle=function(he,ue){var ne=d.select(he.node()),Ce=ne.data(),Ye=((Ce[0]||[])[0]||{}).trace||{};g(he,Ye,ue,!1)},l.fillGroupStyle=function(he,ue,ne){he.style("stroke-width",0).each(function(Ce){var Ye=d.select(this);Ce[0].trace&&g(Ye,Ce[0].trace,ue,ne)})};var b=lz();l.symbolNames=[],l.symbolFuncs=[],l.symbolBackOffs=[],l.symbolNeedLines={},l.symbolNoDot={},l.symbolNoFill={},l.symbolList=[],Object.keys(b).forEach(function(he){var ue=b[he],ne=ue.n;l.symbolList.push(ne,String(ne),he,ne+100,String(ne+100),he+"-open"),l.symbolNames[ne]=he,l.symbolFuncs[ne]=ue.f,l.symbolBackOffs[ne]=ue.backoff||0,ue.needLine&&(l.symbolNeedLines[ne]=!0),ue.noDot?l.symbolNoDot[ne]=!0:l.symbolList.push(ne+200,String(ne+200),he+"-dot",ne+300,String(ne+300),he+"-open-dot"),ue.noFill&&(l.symbolNoFill[ne]=!0)});var p=l.symbolNames.length,u="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";l.symbolNumber=function(he){if(E(he))he=+he;else if(typeof he=="string"){var ue=0;he.indexOf("-open")>0&&(ue=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(ue+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=ue)}return he%100>=p||he>=400?0:Math.floor(Math.max(he,0))};function y(he,ue,ne,Ce){var Ye=he%100;return l.symbolFuncs[Ye](ue,ne,Ce)+(he>=200?u:"")}var m=S("~f"),R={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}};l.gradient=function(he,ue,ne,Ce,Ye,rt){var Ke=R[Ce];return L(he,ue,ne,Ke.type,Ye,rt,Ke.start,Ke.stop,!1,Ke.reversed)};function L(he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt){var Gt=Ye.length,Mr;Ce==="linear"?Mr={node:"linearGradient",attrs:{x1:Ke.x,y1:Ke.y,x2:Mt.x,y2:Mt.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Nt}:Ce==="radial"&&(Mr={node:"radialGradient",reversed:Nt});for(var mr=new Array(Gt),qr=0;qr<Gt;qr++)Mr.reversed?mr[Gt-1-qr]=[m((1-Ye[qr][0])*100),Ye[qr][1]]:mr[qr]=[m(Ye[qr][0]*100),Ye[qr][1]];var Er=ue._fullLayout,Ir="g"+Er._uid+"-"+ne,_t=Er._defs.select(".gradients").selectAll("#"+Ir).data([Ce+mr.join(";")],x.identity);_t.exit().remove(),_t.enter().append(Mr.node).each(function(){var Oe=d.select(this);Mr.attrs&&Oe.attr(Mr.attrs),Oe.attr("id",Ir);var Je=Oe.selectAll("stop").data(mr);Je.exit().remove(),Je.enter().append("stop"),Je.each(function(Ae){var Le=e(Ae[1]);d.select(this).attr({offset:Ae[0]+"%","stop-color":r.tinyRGB(Le),"stop-opacity":Le.getAlpha()})})}),he.style(rt,se(Ir,ue)).style(rt+"-opacity",null),he.classed("gradient_filled",!0)}l.pattern=function(he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt,Gt,Mr){var mr=ue==="legend";Mt&&(kt==="overlay"?(Nt=Mt,Gt=r.contrast(Nt)):(Nt=void 0,Gt=Mt));var qr=ne._fullLayout,Er="p"+qr._uid+"-"+Ce,Ir,_t,Oe=function(fr,ur,sr,Pr,Ta){return Pr+(Ta-Pr)*(fr-ur)/(sr-ur)},Je,Ae,Le,Ue,Ze={},st=e(Gt),ut=r.tinyRGB(st),Ut=st.getAlpha(),Ct=Mr*Ut;switch(Ye){case"/":Ir=rt*Math.sqrt(2),_t=rt*Math.sqrt(2),Je="M-"+Ir/4+","+_t/4+"l"+Ir/2+",-"+_t/2+"M0,"+_t+"L"+Ir+",0M"+Ir/4*3+","+_t/4*5+"l"+Ir/2+",-"+_t/2,Ae=Ke*rt,Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case"\\":Ir=rt*Math.sqrt(2),_t=rt*Math.sqrt(2),Je="M"+Ir/4*3+",-"+_t/4+"l"+Ir/2+","+_t/2+"M0,0L"+Ir+","+_t+"M-"+Ir/4+","+_t/4*3+"l"+Ir/2+","+_t/2,Ae=Ke*rt,Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case"x":Ir=rt*Math.sqrt(2),_t=rt*Math.sqrt(2),Je="M-"+Ir/4+","+_t/4+"l"+Ir/2+",-"+_t/2+"M0,"+_t+"L"+Ir+",0M"+Ir/4*3+","+_t/4*5+"l"+Ir/2+",-"+_t/2+"M"+Ir/4*3+",-"+_t/4+"l"+Ir/2+","+_t/2+"M0,0L"+Ir+","+_t+"M-"+Ir/4+","+_t/4*3+"l"+Ir/2+","+_t/2,Ae=rt-rt*Math.sqrt(1-Ke),Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case"|":Ir=rt,_t=rt,Ue="path",Je="M"+Ir/2+",0L"+Ir/2+","+_t,Ae=Ke*rt,Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case"-":Ir=rt,_t=rt,Ue="path",Je="M0,"+_t/2+"L"+Ir+","+_t/2,Ae=Ke*rt,Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case"+":Ir=rt,_t=rt,Ue="path",Je="M"+Ir/2+",0L"+Ir/2+","+_t+"M0,"+_t/2+"L"+Ir+","+_t/2,Ae=rt-rt*Math.sqrt(1-Ke),Ue="path",Ze={d:Je,opacity:Ct,stroke:ut,"stroke-width":Ae+"px"};break;case".":Ir=rt,_t=rt,Ke<Math.PI/4?Le=Math.sqrt(Ke*rt*rt/Math.PI):Le=Oe(Ke,Math.PI/4,1,rt/2,rt/Math.sqrt(2)),Ue="circle",Ze={cx:Ir/2,cy:_t/2,r:Le,opacity:Ct,fill:ut};break;default:Ir=rt,_t=rt,Ue="path",Ze={d:Ye,opacity:Ct,fill:ut};break}var Pt=[Ye||"noSh",Nt||"noBg",Gt||"noFg",rt,Ke].join(";"),jt=qr._defs.select(".patterns").selectAll("#"+Er).data([Pt],x.identity);jt.exit().remove(),jt.enter().append("pattern").each(function(){var fr=d.select(this);if(fr.attr({id:Er,width:Ir+"px",height:_t+"px",patternUnits:"userSpaceOnUse",patternTransform:mr?"scale(0.8)":""}),Nt){var ur=e(Nt),sr=r.tinyRGB(ur),Pr=ur.getAlpha(),Ta=fr.selectAll("rect").data([0]);Ta.exit().remove(),Ta.enter().append("rect").attr({width:Ir+"px",height:_t+"px",fill:sr,"fill-opacity":Pr})}var Oa=fr.selectAll(Ue).data([0]);Oa.exit().remove(),Oa.enter().append(Ue).attr(Ze)}),he.style("fill",se(Er,ne)).style("fill-opacity",null),he.classed("pattern_filled",!0)},l.initGradients=function(he){var ue=he._fullLayout,ne=x.ensureSingle(ue._defs,"g","gradients");ne.selectAll("linearGradient,radialGradient").remove(),d.select(he).selectAll(".gradient_filled").classed("gradient_filled",!1)},l.initPatterns=function(he){var ue=he._fullLayout,ne=x.ensureSingle(ue._defs,"g","patterns");ne.selectAll("pattern").remove(),d.select(he).selectAll(".pattern_filled").classed("pattern_filled",!1)},l.getPatternAttr=function(he,ue,ne){return he&&x.isArrayOrTypedArray(he)?ue<he.length?he[ue]:ne:he},l.pointStyle=function(he,ue,ne,Ce){if(he.size()){var Ye=l.makePointStyleFns(ue);he.each(function(rt){l.singlePointStyle(rt,d.select(this),ue,Ye,ne,Ce)})}},l.singlePointStyle=function(he,ue,ne,Ce,Ye,rt){var Ke=ne.marker,Mt=Ke.line;if(rt&&rt.i>=0&&he.i===void 0&&(he.i=rt.i),ue.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Ke.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Ke.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Nt=l.symbolNumber(he.mx||Ke.symbol)||0;he.om=Nt%200>=100;var Gt=qe(he,ne),Mr=Q(he,ne);ue.attr("d",y(Nt,kt,Gt,Mr))}var mr=!1,qr,Er,Ir;if(he.so)Ir=Mt.outlierwidth,Er=Mt.outliercolor,qr=Ke.outliercolor;else{var _t=(Mt||{}).width;Ir=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?Er=he.mlcc=Ce.lineScale(he.mlc):x.isArrayOrTypedArray(Mt.color)?Er=r.defaultLine:Er=Mt.color,x.isArrayOrTypedArray(Ke.color)&&(qr=r.defaultLine,mr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Ke.color||Ke.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Oe=he.mld||(Mt||{}).dash;if(Oe&&l.dashLine(ue,Oe,Ir),he.om)ue.call(r.stroke,qr).style({"stroke-width":(Ir||1)+"px",fill:"none"});else{ue.style("stroke-width",(he.isBlank?0:Ir)+"px");var Je=Ke.gradient,Ae=he.mgt;Ae?mr=!0:Ae=Je&&Je.type,x.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],R[Ae]||(Ae=0));var Le=Ke.pattern,Ue=l.getPatternAttr,Ze=Le&&(Ue(Le.shape,he.i,"")||Ue(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?mr=!0:st=Je.color;var ut=ne.uid;mr&&(ut+="-"+he.i),l.gradient(ue,Ye,ut,Ae,[[0,st],[1,qr]],"fill")}else if(Ze){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=Ue(Ct,he.i,rt&&rt.color||null),jt=Ue(Le.bgcolor,he.i,null),fr=Le.fgopacity,ur=Ue(Le.size,he.i,8),sr=Ue(Le.solidity,he.i,.3);Ut=Ut||he.mcc||x.isArrayOrTypedArray(Le.shape)||x.isArrayOrTypedArray(Le.path)||x.isArrayOrTypedArray(Le.bgcolor)||x.isArrayOrTypedArray(Le.fgcolor)||x.isArrayOrTypedArray(Le.size)||x.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(ue,"point",Ye,Pr,Ze,ur,sr,he.mcc,Le.fillmode,jt,Pt,fr)}else x.isArrayOrTypedArray(qr)?r.fill(ue,qr[he.i]):r.fill(ue,qr);Ir&&r.stroke(ue,Er)}},l.makePointStyleFns=function(he){var ue={},ne=he.marker;return ue.markerScale=l.tryColorscale(ne,""),ue.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(ue.ms2mrc=v.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&x.extendFlat(ue,l.makeSelectedPointStyleFns(he)),ue},l.makeSelectedPointStyleFns=function(he){var ue={},ne=he.selected||{},Ce=he.unselected||{},Ye=he.marker||{},rt=ne.marker||{},Ke=Ce.marker||{},Mt=Ye.opacity,kt=rt.opacity,Nt=Ke.opacity,Gt=kt!==void 0,Mr=Nt!==void 0;(x.isArrayOrTypedArray(Mt)||Gt||Mr)&&(ue.selectedOpacityFn=function(Le){var Ue=Le.mo===void 0?Ye.opacity:Le.mo;return Le.selected?Gt?kt:Ue:Mr?Nt:f*Ue});var mr=Ye.color,qr=rt.color,Er=Ke.color;(qr||Er)&&(ue.selectedColorFn=function(Le){var Ue=Le.mcc||mr;return Le.selected?qr||Ue:Er||Ue});var Ir=Ye.size,_t=rt.size,Oe=Ke.size,Je=_t!==void 0,Ae=Oe!==void 0;return t.traceIs(he,"symbols")&&(Je||Ae)&&(ue.selectedSizeFn=function(Le){var Ue=Le.mrc||Ir/2;return Le.selected?Je?_t/2:Ue:Ae?Oe/2:Ue}),ue},l.makeSelectedTextStyleFns=function(he){var ue={},ne=he.selected||{},Ce=he.unselected||{},Ye=he.textfont||{},rt=ne.textfont||{},Ke=Ce.textfont||{},Mt=Ye.color,kt=rt.color,Nt=Ke.color;return ue.selectedTextColorFn=function(Gt){var Mr=Gt.tc||Mt;return Gt.selected?kt||Mr:Nt||(kt?Mr:r.addOpacity(Mr,f))},ue},l.selectedPointStyle=function(he,ue){if(!(!he.size()||!ue.selectedpoints)){var ne=l.makeSelectedPointStyleFns(ue),Ce=ue.marker||{},Ye=[];ne.selectedOpacityFn&&Ye.push(function(rt,Ke){rt.style("opacity",ne.selectedOpacityFn(Ke))}),ne.selectedColorFn&&Ye.push(function(rt,Ke){r.fill(rt,ne.selectedColorFn(Ke))}),ne.selectedSizeFn&&Ye.push(function(rt,Ke){var Mt=Ke.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Ke);rt.attr("d",y(l.symbolNumber(Mt),kt,qe(Ke,ue),Q(Ke,ue))),Ke.mrc2=kt}),Ye.length&&he.each(function(rt){for(var Ke=d.select(this),Mt=0;Mt<Ye.length;Mt++)Ye[Mt](Ke,rt)})}},l.tryColorscale=function(he,ue){var ne=ue?x.nestedProperty(he,ue).get():he;if(ne){var Ce=ne.color;if((ne.colorscale||ne._colorAx)&&x.isArrayOrTypedArray(Ce))return o.makeColorScaleFuncFromTrace(ne)}return x.identity};var z={start:1,end:-1,middle:0,bottom:1,top:-1};function F(he,ue,ne,Ce,Ye){var rt=d.select(he.node().parentNode),Ke=ue.indexOf("top")!==-1?"top":ue.indexOf("bottom")!==-1?"bottom":"middle",Mt=ue.indexOf("left")!==-1?"end":ue.indexOf("right")!==-1?"start":"middle",kt=Ce?Ce/.8+1:0,Nt=(n.lineCount(he)-1)*h+1,Gt=z[Mt]*kt,Mr=ne*.75+z[Ke]*kt+(z[Ke]-1)*Nt*ne/2;he.attr("text-anchor",Mt),Ye||rt.attr("transform",a(Gt,Mr))}function N(he,ue){var ne=he.ts||ue.textfont.size;return E(ne)&&ne>0?ne:0}l.textPointStyle=function(he,ue,ne){if(he.size()){var Ce;if(ue.selectedpoints){var Ye=l.makeSelectedTextStyleFns(ue);Ce=Ye.selectedTextColorFn}var rt=ue.texttemplate,Ke=ne._fullLayout;he.each(function(Mt){var kt=d.select(this),Nt=rt?x.extractOption(Mt,ue,"txt","texttemplate"):x.extractOption(Mt,ue,"tx","text");if(!Nt&&Nt!==0){kt.remove();return}if(rt){var Gt=ue._module.formatLabels,Mr=Gt?Gt(Mt,ue,Ke):{},mr={};T(mr,ue,Mt.i),Nt=x.texttemplateString({data:[mr,Mt,ue._meta],fallback:ue.texttemplatefallback,labels:Mr,locale:Ke._d3locale,template:Nt})}var qr=Mt.tp||ue.textposition,Er=N(Mt,ue),Ir=Ce?Ce(Mt):Mt.tc||ue.textfont.color;kt.call(l.font,{family:Mt.tf||ue.textfont.family,weight:Mt.tw||ue.textfont.weight,style:Mt.ty||ue.textfont.style,variant:Mt.tv||ue.textfont.variant,textcase:Mt.tC||ue.textfont.textcase,lineposition:Mt.tE||ue.textfont.lineposition,shadow:Mt.tS||ue.textfont.shadow,size:Er,color:Ir}).text(Nt).call(n.convertToTspans,ne).call(F,qr,Er,Mt.mrc)})}},l.selectedTextStyle=function(he,ue){if(!(!he.size()||!ue.selectedpoints)){var ne=l.makeSelectedTextStyleFns(ue);he.each(function(Ce){var Ye=d.select(this),rt=ne.selectedTextColorFn(Ce),Ke=Ce.tp||ue.textposition,Mt=N(Ce,ue);r.fill(Ye,rt);var kt=t.traceIs(ue,"bar-like");F(Ye,Ke,Mt,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,ue){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ye;for(Ye=1;Ye<he.length-1;Ye++)Ce.push(le(he[Ye-1],he[Ye],he[Ye+1],ue));for(ne+="Q"+Ce[0][0]+" "+he[1],Ye=2;Ye<he.length-1;Ye++)ne+="C"+Ce[Ye-2][1]+" "+Ce[Ye-1][0]+" "+he[Ye];return ne+="Q"+Ce[he.length-3][1]+" "+he[he.length-1],ne},l.smoothclosed=function(he,ue){if(he.length<3)return"M"+he.join("L")+"Z";var ne="M"+he[0],Ce=he.length-1,Ye=[le(he[Ce],he[0],he[1],ue)],rt;for(rt=1;rt<Ce;rt++)Ye.push(le(he[rt-1],he[rt],he[rt+1],ue));for(Ye.push(le(he[Ce-1],he[Ce],he[0],ue)),rt=1;rt<=Ce;rt++)ne+="C"+Ye[rt-1][1]+" "+Ye[rt][0]+" "+he[rt];return ne+="C"+Ye[Ce][1]+" "+Ye[0][0]+" "+he[0]+"Z",ne};var P,U;function B(he,ue,ne){return ne&&(he=G(he)),ue?$(he[1]):X(he[0])}function X(he){var ue=d.round(he,2);return P=ue,ue}function $(he){var ue=d.round(he,2);return U=ue,ue}function le(he,ue,ne,Ce){var Ye=he[0]-ue[0],rt=he[1]-ue[1],Ke=ne[0]-ue[0],Mt=ne[1]-ue[1],kt=Math.pow(Ye*Ye+rt*rt,O/2),Nt=Math.pow(Ke*Ke+Mt*Mt,O/2),Gt=(Nt*Nt*Ye-kt*kt*Ke)*Ce,Mr=(Nt*Nt*rt-kt*kt*Mt)*Ce,mr=3*Nt*(kt+Nt),qr=3*kt*(kt+Nt);return[[X(ue[0]+(mr&&Gt/mr)),$(ue[1]+(mr&&Mr/mr))],[X(ue[0]-(qr&&Gt/qr)),$(ue[1]-(qr&&Mr/qr))]]}var ce={hv:function(he,ue,ne){return"H"+X(ue[0])+"V"+B(ue,1,ne)},vh:function(he,ue,ne){return"V"+$(ue[1])+"H"+B(ue,0,ne)},hvh:function(he,ue,ne){return"H"+X((he[0]+ue[0])/2)+"V"+$(ue[1])+"H"+B(ue,0,ne)},vhv:function(he,ue,ne){return"V"+$((he[1]+ue[1])/2)+"H"+X(ue[0])+"V"+B(ue,1,ne)}},de=function(he,ue,ne){return"L"+B(ue,0,ne)+","+B(ue,1,ne)};l.steps=function(he){var ue=ce[he]||de;return function(ne){for(var Ce="M"+X(ne[0][0])+","+$(ne[0][1]),Ye=ne.length,rt=1;rt<Ye;rt++)Ce+=ue(ne[rt-1],ne[rt],rt===Ye-1);return Ce}};function G(he,ue){var ne=he.backoff,Ce=he.trace,Ye=he.d,rt=he.i;if(ne&&Ce&&Ce.marker&&Ce.marker.angle%360===0&&Ce.line&&Ce.line.shape!=="spline"){var Ke=x.isArrayOrTypedArray(ne),Mt=he,kt=ue?ue[0]:P||0,Nt=ue?ue[1]:U||0,Gt=Mt[0],Mr=Mt[1],mr=Gt-kt,qr=Mr-Nt,Er=Math.atan2(qr,mr),Ir=Ke?ne[rt]:ne;if(Ir==="auto"){var _t=Mt.i;Ce.type==="scatter"&&_t--;var Oe=Mt.marker,Je=Oe.symbol;x.isArrayOrTypedArray(Je)&&(Je=Je[_t]);var Ae=Oe.size;x.isArrayOrTypedArray(Ae)&&(Ae=Ae[_t]),Ir=Oe?l.symbolBackOffs[l.symbolNumber(Je)]*Ae:0,Ir+=l.getMarkerStandoff(Ye[_t],Ce)||0}var Le=Gt-Ir*Math.cos(Er),Ue=Mr-Ir*Math.sin(Er);(Le<=Gt&&Le>=kt||Le>=Gt&&Le<=kt)&&(Ue<=Mr&&Ue>=Nt||Ue>=Mr&&Ue<=Nt)&&(he=[Le,Ue])}return he}l.applyBackoff=G,l.makeTester=function(){var he=x.ensureSingleById(d.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ue=x.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=ue},l.savedBBoxes={};var Y=0,ee=1e4;l.bBox=function(he,ue,ne){ne||(ne=q(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return x.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ye=he.childNodes[0];if(ne=q(Ye),ne){var rt=+Ye.getAttribute("x")||0,Ke=+Ye.getAttribute("y")||0,Mt=Ye.getAttribute("transform");if(!Mt){var kt=l.bBox(Ye,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Ke&&(kt.top+=Ke,kt.bottom+=Ke),kt}if(ne+="~"+rt+"~"+Ke+"~"+Mt,Ce=l.savedBBoxes[ne],Ce)return x.extendFlat({},Ce)}}var Nt,Gt;ue?Nt=he:(Gt=l.tester.node(),Nt=he.cloneNode(!0),Gt.appendChild(Nt)),d.select(Nt).attr("transform",null).call(n.positionText,0,0);var Mr=Nt.getBoundingClientRect(),mr=l.testref.node().getBoundingClientRect();ue||Gt.removeChild(Nt);var qr={height:Mr.height,width:Mr.width,left:Mr.left-mr.left,top:Mr.top-mr.top,right:Mr.right-mr.left,bottom:Mr.bottom-mr.top};return Y>=ee&&(l.savedBBoxes={},Y=0),ne&&(l.savedBBoxes[ne]=qr),Y++,x.extendFlat({},qr)};function q(he){var ue=he.getAttribute("data-unformatted");if(ue!==null)return ue+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,ue,ne){he.attr("clip-path",se(ue,ne))};function se(he,ue){if(!he)return null;var ne=ue._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var ue=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ye=Ce.replace(ue,function(rt,Ke,Mt){return[Ke,Mt].join(" ")}).split(" ");return{x:+Ye[0]||0,y:+Ye[1]||0}},l.setTranslate=function(he,ue,ne){var Ce=/(\btranslate\(.*?\);?)/,Ye=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Ke=he[Ye]("transform")||"";return ue=ue||0,ne=ne||0,Ke=Ke.replace(Ce,"").trim(),Ke+=a(ue,ne),Ke=Ke.trim(),he[rt]("transform",Ke),Ke},l.getScale=function(he){var ue=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ye=Ce.replace(ue,function(rt,Ke,Mt){return[Ke,Mt].join(" ")}).split(" ");return{x:+Ye[0]||1,y:+Ye[1]||1}},l.setScale=function(he,ue,ne){var Ce=/(\bscale\(.*?\);?)/,Ye=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Ke=he[Ye]("transform")||"";return ue=ue||1,ne=ne||1,Ke=Ke.replace(Ce,"").trim(),Ke+="scale("+ue+","+ne+")",Ke=Ke.trim(),he[rt]("transform",Ke),Ke};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,ue,ne){if(ue=ue||1,ne=ne||1,!!he){var Ce=ue===1&&ne===1?"":"scale("+ue+","+ne+")";he.each(function(){var Ye=(this.getAttribute("transform")||"").replace(ae,"");Ye+=Ce,Ye=Ye.trim(),this.setAttribute("transform",Ye)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,ue,ne){he&&he.each(function(){var Ce,Ye=d.select(this),rt=Ye.select("text");if(rt.node()){var Ke=parseFloat(rt.attr("x")||0),Mt=parseFloat(rt.attr("y")||0),kt=(Ye.attr("transform")||"").match(j);ue===1&&ne===1?Ce=[]:Ce=[a(Ke,Mt),"scale("+ue+","+ne+")",a(-Ke,-Mt)],kt&&Ce.push(kt),Ye.attr("transform",Ce.join(""))}})};function Q(he,ue){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=ue.marker&&ue.marker.standoff||0),!ue._geo&&!ue._xA?-ne:ne}l.getMarkerStandoff=Q;var re=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,ue){var ne=ue[0],Ce=ue[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Ie,Re,We,at,nt,tt;function qe(he,ue){var ne=he.ma;ne===void 0&&(ne=ue.marker.angle,(!ne||x.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ye,rt=ue.marker.angleref;if(rt==="previous"||rt==="north"){if(ue._geo){var Ke=ue._geo.project(he.lonlat);Ce=Ke[0],Ye=Ke[1]}else{var Mt=ue._xA,kt=ue._yA;if(Mt&&kt)Ce=Mt.c2p(he.x),Ye=kt.c2p(he.y);else return 90}if(ue._geo){var Nt=he.lonlat[0],Gt=he.lonlat[1],Mr=ue._geo.project([Nt,Gt+1e-5]),mr=ue._geo.project([Nt+1e-5,Gt]),qr=re(mr[1]-Ye,mr[0]-Ce),Er=re(Mr[1]-Ye,Mr[0]-Ce),Ir;if(rt==="north")Ir=ne/180*Math.PI;else if(rt==="previous"){var _t=Nt/180*Math.PI,Oe=Gt/180*Math.PI,Je=Ie/180*Math.PI,Ae=Re/180*Math.PI,Le=Je-_t,Ue=pe(Ae)*we(Le),Ze=we(Ae)*pe(Oe)-pe(Ae)*we(Oe)*pe(Le);Ir=-re(Ue,Ze)-Math.PI,Ie=Nt,Re=Gt}var st=Se(qr,[pe(Ir),0]),ut=Se(Er,[we(Ir),0]);ne=re(st[1]+ut[1],st[0]+ut[0])/Math.PI*180,rt==="previous"&&!(tt===ue.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!ue._geo)if(tt===ue.uid&&he.i===nt+1&&E(Ce)&&E(Ye)){var Ut=Ce-We,Ct=Ye-at,Pt=ue.line&&ue.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=re(Ct,Ut)/Math.PI*180+90}else ne=null}return We=Ce,at=Ye,nt=he.i,tt=ue.uid,ne}l.getMarkerAngle=qe}}),K0=He({"src/components/titles/index.js"(Z,V){"use strict";var d=Wn(),x=as(),S=bc(),E=lo(),e=sa(),t=e.strTranslate,r=es(),o=Jn(),a=ou(),n=Ym(),i=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function v(c,T,l){var _=c._fullLayout,w=l.propContainer,A=l.propName,M=l.placeholder,g=l.traceIndex,b=l.avoid||{},p=l.attributes,u=l.transform,y=l.containerGroup,m=1,R=w.title,L=(R&&R.text?R.text:"").trim(),z=!1,F=R&&R.font?R.font:{},N=F.family,O=F.size,P=F.color,U=F.weight,B=F.style,X=F.variant,$=F.textcase,le=F.lineposition,ce=F.shadow,de=l.subtitlePropName,G=!!de,Y=l.subtitlePlaceholder,ee=(w.title||{}).subtitle||{text:"",font:{}},q=(ee.text||"").trim(),se=!1,ae=1,j=ee.font,Q=j.family,re=j.size,pe=j.color,we=j.weight,Se=j.style,Ie=j.variant,Re=j.textcase,We=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var tt=c._context.edits[nt];function qe(mr,qr){return mr===void 0||qr===void 0?!1:mr.replace(s," % ")===qr.replace(s," % ")}L===""?m=0:qe(L,M)&&(tt||(L=""),m=.2,z=!0),G&&(q===""?ae=0:qe(q,Y)&&(tt||(q=""),ae=.2,se=!0)),l._meta?L=e.templateString(L,l._meta):_._meta&&(L=e.templateString(L,_._meta));var he=L||q||tt,ue;y||(y=e.ensureSingle(_._infolayer,"g","g-"+T),ue=_._hColorbarMoveTitle);var ne=y.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(L).attr("class",T),ne.exit().remove();var Ce=null,Ye=T+"-subtitle",rt=q||tt;if(G&&(Ce=y.selectAll("text."+Ye).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(q).attr("class",Ye),Ce.exit().remove()),!he)return y;function Ke(mr,qr){e.syncOrAsync([Mt,kt],{title:mr,subtitle:qr})}function Mt(mr){var qr=mr.title,Er=mr.subtitle,Ir;!u&&ue&&(u={}),u?(Ir="",u.rotate&&(Ir+="rotate("+[u.rotate,p.x,p.y]+")"),(u.offset||ue)&&(Ir+=t(0,(u.offset||0)-(ue||0)))):Ir=null,qr.attr("transform",Ir);function _t(Ze){if(Ze){var st=d.select(Ze.node().parentNode).select("."+Ye);if(!st.empty()){var ut=Ze.node().getBBox();if(ut.height){var Ut=ut.y+ut.height+h*re;st.attr("y",Ut)}}}}if(qr.style("opacity",m*o.opacity(P)).call(r.font,{color:o.rgb(P),size:d.round(O,2),family:N,weight:U,style:B,variant:X,textcase:$,shadow:ce,lineposition:le}).attr(p).call(a.convertToTspans,c,_t),Er&&!Er.empty()){var Oe=y.select("."+T+"-math-group"),Je=qr.node().getBBox(),Ae=Oe.node()?Oe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*re:Je.y+Je.height+f*re,Ue=e.extendFlat({},p,{y:Le});Er.attr("transform",Ir),Er.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:d.round(re,2),family:Q,weight:we,style:Se,variant:Ie,textcase:Re,shadow:at,lineposition:We}).attr(Ue).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(mr){var qr=mr.title,Er=d.select(qr.node().parentNode);if(b&&b.selection&&b.side&&L){Er.attr("transform",null);var Ir=i[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Oe=x(b.pad)?b.pad:2,Je=r.bBox(Er.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var Ue in Le)for(var Ze in Le[Ue]){var st=Le[Ue][Ze];Ae[Ze]=Math.max(Ae[Ze],st)}var ut={left:Ae.l,top:Ae.t,right:_.width-Ae.r,bottom:_.height-Ae.b},Ut=b.maxShift||_t*(ut[b.side]-Je[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Je.left-=Pt,Je.right-=Pt,Je.top-=jt,Je.bottom-=jt,b.selection.each(function(){var ur=r.bBox(this);e.bBoxIntersect(Je,ur,Oe)&&(Ct=Math.max(Ct,_t*(ur[b.side]-Je[Ir])+Oe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var fr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];Er.attr("transform",t(fr[0],fr[1]))}}}ne.call(Ke,Ce);function Nt(mr,qr){mr.text(qr).on("mouseover.opacity",function(){d.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){d.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(L?ne.on(".opacity",null):(Nt(ne,M),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(mr){g!==void 0?E.call("_guiRestyle",c,A,mr,g):E.call("_guiRelayout",c,A,mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ke)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,p.x,p.y)}),G)){if(G&&!L){var Gt=ne.node().getBBox(),Mr=Gt.y+Gt.height+f*re;Ce.attr("y",Mr)}q?Ce.on(".opacity",null):(Nt(Ce,Y),se=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(mr){E.call("_guiRelayout",c,"title.subtitle.text",mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ke)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",se),y}V.exports={draw:v,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,V){"use strict";var d=Wn(),x=Xv().utcFormat,S=sa(),E=S.numberFormat,e=as(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,n=S.isArrayOrTypedArray,i=Ws(),s=i.FP_SAFE,h=i.BADNUM,f=i.LOG_CLIP,v=i.ONEWEEK,c=i.ONEDAY,T=i.ONEHOUR,l=i.ONEMIN,_=i.ONESEC,w=ef(),A=lh(),M=A.HOUR_PATTERN,g=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function p(u){return u!=null}V.exports=function(y,m){m=m||{};var R=y._id||"x",L=R.charAt(0);function z(q,se){if(q>0)return Math.log(q)/Math.LN10;if(q<=0&&se&&y.range&&y.range.length===2){var ae=y.range[0],j=y.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(q,se,ae,j){if((j||{}).msUTC&&e(q))return+q;var Q=o(q,ae||y.calendar);if(Q===h)if(e(q)){q=+q;var re=Math.floor(S.mod(q+.05,1)*10),pe=Math.round(q-re/10);Q=o(new Date(pe))+re/10}else return h;return Q}function N(q,se,ae){return r(q,se,ae||y.calendar)}function O(q){return y._categories[Math.round(q)]}function P(q){if(p(q)){if(y._categoriesMap===void 0&&(y._categoriesMap={}),y._categoriesMap[q]!==void 0)return y._categoriesMap[q];y._categories.push(typeof q=="number"?String(q):q);var se=y._categories.length-1;return y._categoriesMap[q]=se,se}return h}function U(q,se){for(var ae=new Array(se),j=0;j<se;j++){var Q=(q[0]||[])[j],re=(q[1]||[])[j];ae[j]=B([Q,re])}return ae}function B(q){if(y._categoriesMap)return y._categoriesMap[q]}function X(q){var se=B(q);if(se!==void 0)return se;if(e(q))return+q}function $(q){return e(q)?+q:B(q)}function le(q,se,ae){return d.round(ae+se*q,2)}function ce(q,se,ae){return(q-ae)/se}var de=function(se){return e(se)?le(se,y._m,y._b):h},G=function(q){return ce(q,y._m,y._b)};if(y.rangebreaks){var Y=L==="y";de=function(q){if(!e(q))return h;var se=y._rangebreaks.length;if(!se)return le(q,y._m,y._b);var ae=Y;y.range[0]>y.range[1]&&(ae=!ae);for(var j=ae?-1:1,Q=j*q,re=0,pe=0;pe<se;pe++){var we=j*y._rangebreaks[pe].min,Se=j*y._rangebreaks[pe].max;if(Q<we)break;if(Q>Se)re=pe+1;else{re=Q<(we+Se)/2?pe:pe+1;break}}var Ie=y._B[re]||0;return isFinite(Ie)?le(q,y._m2,Ie):0},G=function(q){var se=y._rangebreaks.length;if(!se)return ce(q,y._m,y._b);for(var ae=0,j=0;j<se&&!(q<y._rangebreaks[j].pmin);j++)q>y._rangebreaks[j].pmax&&(ae=j+1);return ce(q,y._m2,y._B[ae])}}y.c2l=y.type==="log"?z:a,y.l2c=y.type==="log"?b:a,y.l2p=de,y.p2l=G,y.c2p=y.type==="log"?function(q,se){return de(z(q,se))}:de,y.p2c=y.type==="log"?function(q){return b(G(q))}:G,["linear","-"].indexOf(y.type)!==-1?(y.d2r=y.r2d=y.d2c=y.r2c=y.d2l=y.r2l=t,y.c2d=y.c2r=y.l2d=y.l2r=a,y.d2p=y.r2p=function(q){return y.l2p(t(q))},y.p2d=y.p2r=G,y.cleanPos=a):y.type==="log"?(y.d2r=y.d2l=function(q,se){return z(t(q),se)},y.r2d=y.r2c=function(q){return b(t(q))},y.d2c=y.r2l=t,y.c2d=y.l2r=a,y.c2r=z,y.l2d=b,y.d2p=function(q,se){return y.l2p(y.d2r(q,se))},y.p2d=function(q){return b(G(q))},y.r2p=function(q){return y.l2p(t(q))},y.p2r=G,y.cleanPos=a):y.type==="date"?(y.d2r=y.r2d=S.identity,y.d2c=y.r2c=y.d2l=y.r2l=F,y.c2d=y.c2r=y.l2d=y.l2r=N,y.d2p=y.r2p=function(q,se,ae){return y.l2p(F(q,0,ae))},y.p2d=y.p2r=function(q,se,ae){return N(G(q),se,ae)},y.cleanPos=function(q){return S.cleanDate(q,h,y.calendar)}):y.type==="category"?(y.d2c=y.d2l=P,y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var se=$(q);return se!==void 0?se:y.fraction2r(.5)},y.l2r=y.c2r=a,y.r2l=$,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(G(q))},y.r2p=y.d2p,y.p2r=G,y.cleanPos=function(q){return typeof q=="string"&&q!==""?q:a(q)}):y.type==="multicategory"&&(y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var se=X(q);return se!==void 0?se:y.fraction2r(.5)},y.r2c_just_indices=B,y.l2r=y.c2r=a,y.r2l=X,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(G(q))},y.r2p=y.d2p,y.p2r=G,y.cleanPos=function(q){return Array.isArray(q)||typeof q=="string"&&q!==""?q:a(q)},y.setupMultiCategory=function(q){var se=y._traceIndices,ae,j,Q=y._matchGroup;if(Q&&y._categories.length===0){for(var re in Q)if(re!==R){var pe=m[w.id2name(re)];se=se.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;ae<se.length;ae++){var Ie=q[se[ae]];if(L in Ie){var Re=Ie[L],We=Ie._length||S.minRowLength(Re);if(n(Re[0])&&n(Re[1]))for(j=0;j<We;j++){var at=Re[0][j],nt=Re[1][j];p(at)&&p(nt)&&(Se.push([at,nt]),at in we[0][1]||(we[0][1][at]=we[0][0]++),nt in we[1][1]||(we[1][1][nt]=we[1][0]++))}}}for(Se.sort(function(tt,qe){var he=we[0][1],ue=he[tt[0]]-he[qe[0]];if(ue)return ue;var ne=we[1][1];return ne[tt[1]]-ne[qe[1]]}),ae=0;ae<Se.length;ae++)P(Se[ae])}),y.fraction2r=function(q){var se=y.r2l(y.range[0]),ae=y.r2l(y.range[1]);return y.l2r(se+q*(ae-se))},y.r2fraction=function(q){var se=y.r2l(y.range[0]),ae=y.r2l(y.range[1]);return(y.r2l(q)-se)/(ae-se)},y.limitRange=function(q){var se=y.minallowed,ae=y.maxallowed;if(!(se===void 0&&ae===void 0)){q||(q="range");var j=S.nestedProperty(y,q).get(),Q=S.simpleMap(j,y.r2l),re=Q[1]<Q[0];re&&Q.reverse();var pe=S.simpleMap([se,ae],y.r2l);if(se!==void 0&&Q[0]<pe[0]&&(j[re?1:0]=se),ae!==void 0&&Q[1]>pe[1]&&(j[re?0:1]=ae),j[0]===j[1]){var we=y.l2r(se),Se=y.l2r(ae);if(se!==void 0){var Ie=we+1;ae!==void 0&&(Ie=Math.min(Ie,Se)),j[re?1:0]=Ie}if(ae!==void 0){var Re=Se+1;se!==void 0&&(Re=Math.max(Re,we)),j[re?0:1]=Re}}}},y.cleanRange=function(q,se){y._cleanRange(q,se),y.limitRange(q)},y._cleanRange=function(q,se){se||(se={}),q||(q="range");var ae=S.nestedProperty(y,q).get(),j,Q;if(y.type==="date"?Q=S.dfltRange(y.calendar):L==="y"?Q=A.DFLTRANGEY:y._name==="realaxis"?Q=[0,1]:Q=se.dfltRange||A.DFLTRANGEX,Q=Q.slice(),(y.rangemode==="tozero"||y.rangemode==="nonnegative")&&(Q[0]=0),!ae||ae.length!==2){S.nestedProperty(y,q).set(Q);return}var re=ae[0]===null,pe=ae[1]===null;for(y.type==="date"&&!y.autorange&&(ae[0]=S.cleanDate(ae[0],h,y.calendar),ae[1]=S.cleanDate(ae[1],h,y.calendar)),j=0;j<2;j++)if(y.type==="date"){if(!S.isDateTime(ae[j],y.calendar)){y[q]=Q;break}if(y.r2l(ae[0])===y.r2l(ae[1])){var we=S.constrain(y.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=y.l2r(we-1e3),ae[1]=y.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(re||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{y[q]=Q;break}if(ae[j]<-s?ae[j]=-s:ae[j]>s&&(ae[j]=s),ae[0]===ae[1]){var Se=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Se,ae[1]+=Se}}},y.setScale=function(q){var se=m._size;if(y.overlaying){var ae=w.getFromId({_fullLayout:m},y.overlaying);y.domain=ae.domain}var j=q&&y._r?"_r":"range",Q=y.calendar;y.cleanRange(j);var re=y.r2l(y[j][0],Q),pe=y.r2l(y[j][1],Q),we=L==="y";if(we?(y._offset=se.t+(1-y.domain[1])*se.h,y._length=se.h*(y.domain[1]-y.domain[0]),y._m=y._length/(re-pe),y._b=-y._m*pe):(y._offset=se.l+y.domain[0]*se.w,y._length=se.w*(y.domain[1]-y.domain[0]),y._m=y._length/(pe-re),y._b=-y._m*re),y._rangebreaks=[],y._lBreaks=0,y._m2=0,y._B=[],y.rangebreaks){var Se,Ie;if(y._rangebreaks=y.locateBreaks(Math.min(re,pe),Math.max(re,pe)),y._rangebreaks.length){for(Se=0;Se<y._rangebreaks.length;Se++)Ie=y._rangebreaks[Se],y._lBreaks+=Math.abs(Ie.max-Ie.min);var Re=we;re>pe&&(Re=!Re),Re&&y._rangebreaks.reverse();var We=Re?-1:1;for(y._m2=We*y._length/(Math.abs(pe-re)-y._lBreaks),y._B.push(-y._m2*(we?pe:re)),Se=0;Se<y._rangebreaks.length;Se++)Ie=y._rangebreaks[Se],y._B.push(y._B[y._B.length-1]-We*y._m2*(Ie.max-Ie.min));for(Se=0;Se<y._rangebreaks.length;Se++)Ie=y._rangebreaks[Se],Ie.pmin=de(Ie.min),Ie.pmax=de(Ie.max)}}if(!isFinite(y._m)||!isFinite(y._b)||y._length<0)throw m._replotting=!1,new Error("Something went wrong with axis scaling")},y.maskBreaks=function(q){var se=y.rangebreaks||[],ae,j,Q,re,pe;se._cachedPatterns||(se._cachedPatterns=se.map(function(he){return he.enabled&&he.bounds?S.simpleMap(he.bounds,he.pattern?t:y.d2c):null})),se._cachedValues||(se._cachedValues=se.map(function(he){return he.enabled&&he.values?S.simpleMap(he.values,y.d2c).sort(S.sorterAsc):null}));for(var we=0;we<se.length;we++){var Se=se[we];if(Se.enabled){if(Se.bounds){var Ie=Se.pattern;switch(ae=se._cachedPatterns[we],j=ae[0],Q=ae[1],Ie){case g:pe=new Date(q),re=pe.getUTCDay(),j>Q&&(Q+=7,re<j&&(re+=7));break;case M:pe=new Date(q);var Re=pe.getUTCHours(),We=pe.getUTCMinutes(),at=pe.getUTCSeconds(),nt=pe.getUTCMilliseconds();re=Re+(We/60+at/3600+nt/36e5),j>Q&&(Q+=24,re<j&&(re+=24));break;case"":re=q;break}if(re>=j&&re<Q)return h}else for(var tt=se._cachedValues[we],qe=0;qe<tt.length;qe++)if(j=tt[qe],Q=j+Se.dvalue,q>=j&&q<Q)return h}}return q},y.locateBreaks=function(q,se){var ae,j,Q,re,pe=[];if(!y.rangebreaks)return pe;var we=y.rangebreaks.slice().sort(function(ne,Ce){return ne.pattern===g&&Ce.pattern===M?-1:Ce.pattern===g&&ne.pattern===M?1:0}),Se=function(ne,Ce){if(ne=S.constrain(ne,q,se),Ce=S.constrain(Ce,q,se),ne!==Ce){for(var Ye=!0,rt=0;rt<pe.length;rt++){var Ke=pe[rt];ne<Ke.max&&Ce>=Ke.min&&(ne<Ke.min&&(Ke.min=ne),Ce>Ke.max&&(Ke.max=Ce),Ye=!1)}Ye&&pe.push({min:ne,max:Ce})}};for(ae=0;ae<we.length;ae++){var Ie=we[ae];if(Ie.enabled)if(Ie.bounds){var Re=q,We=se;Ie.pattern&&(Re=Math.floor(Re)),j=S.simpleMap(Ie.bounds,Ie.pattern?t:y.r2l),Q=j[0],re=j[1];var at=new Date(Re),nt,tt;switch(Ie.pattern){case g:tt=v,nt=((re<Q?7:0)+(re-Q))*c,Re+=Q*c-(at.getUTCDay()*c+at.getUTCHours()*T+at.getUTCMinutes()*l+at.getUTCSeconds()*_+at.getUTCMilliseconds());break;case M:tt=c,nt=((re<Q?24:0)+(re-Q))*T,Re+=Q*T-(at.getUTCHours()*T+at.getUTCMinutes()*l+at.getUTCSeconds()*_+at.getUTCMilliseconds());break;default:Re=Math.min(j[0],j[1]),We=Math.max(j[0],j[1]),tt=We-Re,nt=tt}for(var qe=Re;qe<We;qe+=tt)Se(qe,qe+nt)}else for(var he=S.simpleMap(Ie.values,y.d2c),ue=0;ue<he.length;ue++)Q=he[ue],re=Q+Ie.dvalue,Se(Q,re)}return pe.sort(function(ne,Ce){return ne.min-Ce.min}),pe},y.makeCalcdata=function(q,se,ae){var j,Q,re,pe,we=y.type,Se=we==="date"&&q[se+"calendar"];if(se in q){if(j=q[se],pe=q._length||S.minRowLength(j),S.isTypedArray(j)&&(we==="linear"||we==="log")){if(pe===j.length)return j;if(j.subarray)return j.subarray(0,pe)}if(we==="multicategory")return U(j,pe);for(Q=new Array(pe),re=0;re<pe;re++)Q[re]=y.d2c(j[re],0,Se,ae)}else{var Ie=se+"0"in q?y.d2c(q[se+"0"],0,Se):0,Re=q["d"+se]?Number(q["d"+se]):1;for(j=q[{x:"y",y:"x"}[se]],pe=q._length||j.length,Q=new Array(pe),re=0;re<pe;re++)Q[re]=Ie+re*Re}if(y.rangebreaks)for(re=0;re<pe;re++)Q[re]=y.maskBreaks(Q[re]);return Q},y.isValidRange=function(q,se){return Array.isArray(q)&&q.length===2&&(se&&q[0]===null||e(y.r2l(q[0])))&&(se&&q[1]===null||e(y.r2l(q[1])))},y.getAutorangeDflt=function(q,se){var ae=!y.isValidRange(q,"nullOk");return ae&&se&&se.reverseDflt?ae="reversed":q&&(q[0]===null&&q[1]===null?ae=!0:q[0]===null&&q[1]!==null?ae="min":q[0]!==null&&q[1]===null&&(ae="max")),ae},y.isReversed=function(){var q=y.autorange;return q==="reversed"||q==="min reversed"||q==="max reversed"},y.isPtWithinRange=function(q,se){var ae=y.c2l(q[L],null,se),j=y.r2l(y.range[0]),Q=y.r2l(y.range[1]);return j<Q?j<=ae&&ae<=Q:Q<=ae&&ae<=j},y._emptyCategories=function(){y._categories=[],y._categoriesMap={}},y.clearCalc=function(){var q=y._matchGroup;if(q){var se=null,ae=null;for(var j in q){var Q=m[w.id2name(j)];if(Q._categories){se=Q._categories,ae=Q._categoriesMap;break}}se&&ae?(y._categories=se,y._categoriesMap=ae):y._emptyCategories()}else y._emptyCategories();if(y._initialCategories)for(var re=0;re<y._initialCategories.length;re++)P(y._initialCategories[re])},y.sortByInitialCategories=function(){var q=[];if(y._emptyCategories(),y._initialCategories)for(var se=0;se<y._initialCategories.length;se++)P(y._initialCategories[se]);q=q.concat(y._traceIndices);var ae=y._matchGroup;for(var j in ae)if(R!==j){var Q=m[w.id2name(j)];Q._categories=y._categories,Q._categoriesMap=y._categoriesMap,q=q.concat(Q._traceIndices)}return q};var ee=m._d3locale;y.type==="date"&&(y._dateFormat=ee?ee.timeFormat:x,y._extraFormat=m._extraFormat),y._separators=m.separators,y._numFormat=ee?ee.numberFormat:E,delete y._minDtick,delete y._forceTick0}}}),a1=He({"src/plots/cartesian/axis_autotype.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM,E=x.isArrayOrTypedArray,e=x.isDateTime,t=x.cleanNumber,r=Math.round;V.exports=function(v,c,T){var l=v,_=T.noMultiCategory;if(E(l)&&!l.length)return"-";if(!_&&h(l))return"multicategory";if(_&&Array.isArray(l[0])){for(var w=[],A=0;A<l.length;A++)if(E(l[A]))for(var M=0;M<l[A].length;M++)w.push(l[A][M]);l=w}if(n(l,c))return"date";var g=T.autotypenumbers!=="strict";return s(l,g)?"category":a(l,g)?"linear":"-"};function o(f,v){return v?d(f):typeof f=="number"}function a(f,v){for(var c=f.length,T=0;T<c;T++)if(o(f[T],v))return!0;return!1}function n(f,v){for(var c=f.length,T=i(c),l=0,_=0,w={},A=0;A<c;A+=T){var M=r(A),g=f[M],b=String(g);w[b]||(w[b]=1,e(g,v)&&l++,d(g)&&_++)}return l>_*2}function i(f){return Math.max(1,(f-1)/1e3)}function s(f,v){for(var c=f.length,T=i(c),l=0,_=0,w={},A=0;A<c;A+=T){var M=r(A),g=f[M],b=String(g);if(!w[b]){w[b]=1;var p=typeof g;p==="boolean"?_++:(v?t(g)!==S:p==="number")?l++:p==="string"&&_++}}return _>l*2}function h(f){return E(f[0])&&E(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=Ws().FP_SAFE,e=lo(),t=es(),r=ef(),o=r.getFromId,a=r.isLinked;V.exports={applyAutorangeOptions:y,getAutoRange:n,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:v};function n(m,R){var L,z,F=[],N=m._fullLayout,O=s(N,R,0),P=s(N,R,1),U=v(m,R),B=U.min,X=U.max;if(B.length===0||X.length===0)return S.simpleMap(R.range,R.r2l);var $=B[0].val,le=X[0].val;for(L=1;L<B.length&&$===le;L++)$=Math.min($,B[L].val);for(L=1;L<X.length&&$===le;L++)le=Math.max(le,X[L].val);var ce=R.autorange,de=ce==="reversed"||ce==="min reversed"||ce==="max reversed";if(!de&&R.range){var G=S.simpleMap(R.range,R.r2l);de=G[1]<G[0]}R.autorange==="reversed"&&(R.autorange=!0);var Y=R.rangemode,ee=Y==="tozero",q=Y==="nonnegative",se=R._length,ae=se/10,j=0,Q,re,pe,we,Se,Ie;for(L=0;L<B.length;L++)for(Q=B[L],z=0;z<X.length;z++)re=X[z],Ie=re.val-Q.val-i(R,Q.val,re.val),Ie>0&&(Se=se-O(Q)-P(re),Se>ae?Ie/Se>j&&(pe=Q,we=re,j=Ie/Se):Ie/se>j&&(pe={val:Q.val,nopad:1},we={val:re.val,nopad:1},j=Ie/se));function Re(qe,he){return Math.max(qe,P(he))}if($===le){var We=$-1,at=$+1;if(ee)if($===0)F=[0,1];else{var nt=($>0?X:B).reduce(Re,0),tt=$/(1-Math.min(.5,nt/se));F=$>0?[0,tt]:[tt,0]}else q?F=[Math.max(0,We),Math.max(1,at)]:F=[We,at]}else ee?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):q&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-i(R,Q.val,re.val))/(se-O(pe)-P(we)),F=[pe.val-j*O(pe),we.val+j*P(we)];return F=y(F,R),R.limitRange&&R.limitRange(),de&&F.reverse(),S.simpleMap(F,R.l2r||Number)}function i(m,R,L){var z=0;if(m.rangebreaks)for(var F=m.locateBreaks(R,L),N=0;N<F.length;N++){var O=F[N];z+=O.max-O.min}return z}function s(m,R,L){var z=.05*R._length,F=R._anchorAxis||{};if((R.ticklabelposition||"").indexOf("inside")!==-1||(F.ticklabelposition||"").indexOf("inside")!==-1){var N=R.isReversed();if(!N){var O=S.simpleMap(R.range,R.r2l);N=O[1]<O[0]}N&&(L=!L)}var P=0;return a(m,R._id)||(P=f(m,R,L)),z=Math.max(P,z),R.constrain==="domain"&&R._inputDomain&&(z*=(R._inputDomain[1]-R._inputDomain[0])/(R.domain[1]-R.domain[0])),function(B){return B.nopad?0:B.pad+(B.extrapad?z:P)}}var h=3;function f(m,R,L){var z=0,F=R._id.charAt(0)==="x";for(var N in m._plots){var O=m._plots[N];if(!(R._id!==O.xaxis._id&&R._id!==O.yaxis._id)){var P=(F?O.yaxis:O.xaxis)||{};if((P.ticklabelposition||"").indexOf("inside")!==-1&&(!L&&(P.side==="left"||P.side==="bottom")||L&&(P.side==="top"||P.side==="right"))){if(P._vals){var U=S.deg2rad(P._tickAngles[P._id+"tick"]||0),B=Math.abs(Math.cos(U)),X=Math.abs(Math.sin(U));if(!P._vals[0].bb){var $=P._id+"tick",le=P._selections[$];le.each(function(q){var se=d.select(this),ae=se.select(".text-math-group");ae.empty()&&(q.bb=t.bBox(se.node()))})}for(var ce=0;ce<P._vals.length;ce++){var de=P._vals[ce],G=de.bb;if(G){var Y=2*h+G.width,ee=2*h+G.height;z=Math.max(z,F?Math.max(Y*B,ee*X):Math.max(ee*B,Y*X))}}}P.ticks==="inside"&&P.ticklabelposition==="inside"&&(z+=P.ticklen||0)}}}return z}function v(m,R,L){var z=R._id,F=m._fullData,N=m._fullLayout,O=[],P=[],U,B,X;function $(Y,ee){for(U=0;U<ee.length;U++){var q=Y[ee[U]],se=(q._extremes||{})[z];if(q.visible===!0&&se){for(B=0;B<se.min.length;B++)X=se.min[B],l(O,X.val,X.pad,{extrapad:X.extrapad});for(B=0;B<se.max.length;B++)X=se.max[B],_(P,X.val,X.pad,{extrapad:X.extrapad})}}}if($(F,R._traceIndices),$(N.annotations||[],R._annIndices||[]),$(N.shapes||[],R._shapeIndices||[]),R._matchGroup&&!L){for(var le in R._matchGroup)if(le!==R._id){var ce=o(m,le),de=v(m,ce,!0),G=R._length/ce._length;for(B=0;B<de.min.length;B++)X=de.min[B],l(O,X.val,X.pad*G,{extrapad:X.extrapad});for(B=0;B<de.max.length;B++)X=de.max[B],_(P,X.val,X.pad*G,{extrapad:X.extrapad})}}return{min:O,max:P}}function c(m,R,L){if(R.setScale(),R.autorange){R.range=L?L.slice():n(m,R),R._r=R.range.slice(),R._rl=S.simpleMap(R._r,R.r2l);var z=R._input,F={};F[R._attr+".range"]=R.range,F[R._attr+".autorange"]=R.autorange,e.call("_storeDirectGUIEdit",m.layout,m._fullLayout._preGUI,F),z.range=R.range.slice(),z.autorange=R.autorange}var N=R._anchorAxis;if(N&&N.rangeslider){var O=N.rangeslider[R._name];O&&O.rangemode==="auto"&&(O.range=n(m,R)),N._input.rangeslider[R._name]=S.extendFlat({},O)}}function T(m,R,L){L||(L={}),m._m||m.setScale();var z=[],F=[],N=R.length,O=L.padded||!1,P=L.tozero&&(m.type==="linear"||m.type==="-"),U=m.type==="log",B=!1,X=L.vpadLinearized||!1,$,le,ce,de,G,Y,ee,q,se;function ae(Re){if(Array.isArray(Re))return B=!0,function(at){return Math.max(Number(Re[at]||0),0)};var We=Math.max(Number(Re||0),0);return function(){return We}}var j=ae((m._m>0?L.ppadplus:L.ppadminus)||L.ppad||0),Q=ae((m._m>0?L.ppadminus:L.ppadplus)||L.ppad||0),re=ae(L.vpadplus||L.vpad),pe=ae(L.vpadminus||L.vpad);if(!B){if(q=1/0,se=-1/0,U)for($=0;$<N;$++)le=R[$],le<q&&le>0&&(q=le),le>se&&le<E&&(se=le);else for($=0;$<N;$++)le=R[$],le<q&&le>-E&&(q=le),le>se&&le<E&&(se=le);R=[q,se],N=2}var we={tozero:P,extrapad:O};function Se(Re){ce=R[Re],x(ce)&&(Y=j(Re),ee=Q(Re),X?(de=m.c2l(ce)-pe(Re),G=m.c2l(ce)+re(Re)):(q=ce-pe(Re),se=ce+re(Re),U&&q<se/10&&(q=se/10),de=m.c2l(q),G=m.c2l(se)),P&&(de=Math.min(0,de),G=Math.max(0,G)),A(de)&&l(z,de,ee,we),A(G)&&_(F,G,Y,we))}var Ie=Math.min(6,N);for($=0;$<Ie;$++)Se($);for($=N-1;$>=Ie;$--)Se($);return{min:z,max:F,opts:L}}function l(m,R,L,z){w(m,R,L,z,M)}function _(m,R,L,z){w(m,R,L,z,g)}function w(m,R,L,z,F){for(var N=z.tozero,O=z.extrapad,P=!0,U=0;U<m.length&&P;U++){var B=m[U];if(F(B.val,R)&&B.pad>=L&&(B.extrapad||!O)){P=!1;break}else F(R,B.val)&&B.pad<=L&&(O||!B.extrapad)&&(m.splice(U,1),U--)}if(P){var X=N&&R===0;m.push({val:R,pad:X?0:L,extrapad:X?!1:O})}}function A(m){return x(m)&&Math.abs(m)<E}function M(m,R){return m<=R}function g(m,R){return m>=R}function b(m,R){var L=R.autorangeoptions;return L&&L.minallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.minallowed:L&&L.clipmin!==void 0&&u(R,L.clipmin,L.clipmax)?Math.max(m,R.d2l(L.clipmin)):m}function p(m,R){var L=R.autorangeoptions;return L&&L.maxallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.maxallowed:L&&L.clipmax!==void 0&&u(R,L.clipmin,L.clipmax)?Math.min(m,R.d2l(L.clipmax)):m}function u(m,R,L){return R!==void 0&&L!==void 0?(R=m.d2l(R),L=m.d2l(L),R<L):!0}function y(m,R){if(!R||!R.autorangeoptions)return m;var L=m[0],z=m[1],F=R.autorangeoptions.include;if(F!==void 0){var N=R.d2l(L),O=R.d2l(z);S.isArrayOrTypedArray(F)||(F=[F]);for(var P=0;P<F.length;P++){var U=R.d2l(F[P]);N>=U&&(N=U,L=U),O<=U&&(O=U,z=U)}}return L=b(L,R),z=p(z,R),[L,z]}}}),Ho=He({"src/plots/cartesian/axes.js"(Z,V){"use strict";var d=Wn(),x=as(),S=bc(),E=lo(),e=sa(),t=e.strTranslate,r=ou(),o=K0(),a=Jn(),n=es(),i=Wh(),s=l5(),h=lh(),f=Ws(),v=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,_=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,M=f.ONEAVGMONTH,g=f.ONEMINMONTH,b=f.ONEWEEK,p=f.ONEDAY,u=p/2,y=f.ONEHOUR,m=f.ONEMIN,R=f.ONESEC,L=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},P={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},X={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},le=uh(),ce=le.MID_SHIFT,de=le.CAP_SHIFT,G=le.LINE_SPACING,Y=le.OPPOSITE_SIDE,ee=3,q=V.exports={};q.setConvert=wv();var se=a1(),ae=ef(),j=ae.idSort,Q=ae.isLinked;q.id2name=ae.id2name,q.name2id=ae.name2id,q.cleanId=ae.cleanId,q.list=ae.list,q.listIds=ae.listIds,q.getFromId=ae.getFromId,q.getFromTrace=ae.getFromTrace;var re=Yd();q.getAutoRange=re.getAutoRange,q.findExtremes=re.findExtremes;var pe=1e-4;function we(xt){var lt=(xt[1]-xt[0])*pe;return[xt[0]-lt,xt[1]+lt]}q.coerceRef=function(xt,lt,Br,Cr,xr,Rr){var Ur=Cr.charAt(Cr.length-1),Hr=Br._fullLayout._subplots[Ur+"axis"],gt=Cr+"ref",Xt={};return xr||(xr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=xr),Hr=Hr.concat(Hr.map(function(vr){return vr+" domain"})),Xt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:xr},e.coerce(xt,lt,Xt,gt)},q.coerceRefArray=function(xt,lt,Br,Cr,xr,Rr,Ur){let Hr=Cr.charAt(Cr.length-1);var gt=Br._fullLayout._subplots[Hr+"axis"];let Xt=Cr+"ref";var vr=xt[Xt];xr||(xr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(ba=>ba+" domain")),gt=gt.concat(Rr||[]),vr.length>Ur?(e.warn("Array attribute "+Xt+" has more entries than expected, truncating to "+Ur),vr=vr.slice(0,Ur)):vr.length<Ur&&(e.warn("Array attribute "+Xt+" has fewer entries than expected, extending with default value"),vr=vr.concat(Array(Ur-vr.length).fill(xr)));for(var Or=0;Or<vr.length;Or++)vr[Or]=ae.cleanId(vr[Or],Hr,!0)||vr[Or],gt.includes(vr[Or])||(vr[Or]=xr);return lt[Xt]=vr,vr},q.getRefType=function(xt){return xt===void 0?xt:Array.isArray(xt)?"array":xt==="paper"?"paper":xt==="pixel"?"pixel":/( domain)$/.test(xt)?"domain":"range"},q.coercePosition=function(xt,lt,Br,Cr,xr,Rr){var Ur,Hr,gt=q.getRefType(Cr);if(gt!=="range")Ur=e.ensureNumber,Hr=Br(xr,Rr);else{var Xt=q.getFromId(lt,Cr);Rr=Xt.fraction2r(Rr),Hr=Br(xr,Rr),Ur=Xt.cleanPos}xt[xr]=Ur(Hr)},q.cleanPosition=function(xt,lt,Br){var Cr=Br==="paper"||Br==="pixel"?e.ensureNumber:q.getFromId(lt,Br).cleanPos;return Cr(xt)},q.redrawComponents=function(xt,lt){lt=lt||q.listIds(xt);var Br=xt._fullLayout;function Cr(xr,Rr,Ur,Hr){for(var gt=E.getComponentMethod(xr,Rr),Xt={},vr=0;vr<lt.length;vr++)for(var Or=Br[q.id2name(lt[vr])],ba=Or[Ur],Pa=0;Pa<ba.length;Pa++){var ma=ba[Pa];if(!Xt[ma]&&(gt(xt,ma),Xt[ma]=1,Hr))return}}Cr("annotations","drawOne","_annIndices"),Cr("shapes","drawOne","_shapeIndices"),Cr("images","draw","_imgIndices",!0),Cr("selections","drawOne","_selectionIndices")};var Se=q.getDataConversions=function(xt,lt,Br,Cr){var xr,Rr=Br==="x"||Br==="y"||Br==="z"?Br:Cr;if(e.isArrayOrTypedArray(Rr)){if(xr={type:se(Cr,void 0,{autotypenumbers:xt._fullLayout.autotypenumbers}),_categories:[]},q.setConvert(xr),xr.type==="category")for(var Ur=0;Ur<Cr.length;Ur++)xr.d2c(Cr[Ur])}else xr=q.getFromTrace(xt,lt,Rr);return xr?{d2c:xr.d2c,c2d:xr.c2d}:Rr==="ids"?{d2c:Re,c2d:Re}:{d2c:Ie,c2d:Ie}};function Ie(xt){return+xt}function Re(xt){return String(xt)}q.getDataToCoordFunc=function(xt,lt,Br,Cr){return Se(xt,lt,Br,Cr).d2c},q.counterLetter=function(xt){var lt=xt.charAt(0);if(lt==="x")return"y";if(lt==="y")return"x"},q.minDtick=function(xt,lt,Br,Cr){["log","category","multicategory"].indexOf(xt.type)!==-1||!Cr?xt._minDtick=0:xt._minDtick===void 0?(xt._minDtick=lt,xt._forceTick0=Br):xt._minDtick&&((xt._minDtick/lt+1e-6)%1<2e-6&&((Br-xt._forceTick0)/lt%1+1.000001)%1<2e-6?(xt._minDtick=lt,xt._forceTick0=Br):((lt/xt._minDtick+1e-6)%1>2e-6||((Br-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},q.saveRangeInitial=function(xt,lt){for(var Br=q.list(xt,"",!0),Cr=!1,xr=0;xr<Br.length;xr++){var Rr=Br[xr],Ur=Rr._rangeInitial0===void 0&&Rr._rangeInitial1===void 0,Hr=Ur||Rr.range[0]!==Rr._rangeInitial0||Rr.range[1]!==Rr._rangeInitial1,gt=Rr.autorange;(Ur&&gt!==!0||lt&&Hr)&&(Rr._rangeInitial0=gt==="min"||gt==="max reversed"?void 0:Rr.range[0],Rr._rangeInitial1=gt==="max"||gt==="min reversed"?void 0:Rr.range[1],Rr._autorangeInitial=gt,Cr=!0)}return Cr},q.saveShowSpikeInitial=function(xt,lt){for(var Br=q.list(xt,"",!0),Cr=!1,xr="on",Rr=0;Rr<Br.length;Rr++){var Ur=Br[Rr],Hr=Ur._showSpikeInitial===void 0,gt=Hr||Ur.showspikes!==Ur._showspikes;(Hr||lt&&gt)&&(Ur._showSpikeInitial=Ur.showspikes,Cr=!0),xr==="on"&&!Ur.showspikes&&(xr="off")}return xt._fullLayout._cartesianSpikesEnabled=xr,Cr},q.autoBin=function(xt,lt,Br,Cr,xr,Rr){var Ur=e.aggNums(Math.min,null,xt),Hr=e.aggNums(Math.max,null,xt);if(lt.type==="category"||lt.type==="multicategory")return{start:Ur-.5,end:Hr+.5,size:Math.max(1,Math.round(Rr)||1),_dataSpan:Hr-Ur};xr||(xr=lt.calendar);var gt;if(lt.type==="log"?gt={type:"linear",range:[Ur,Hr]}:gt={type:lt.type,range:e.simpleMap([Ur,Hr],lt.c2r,0,xr),calendar:xr},q.setConvert(gt),Rr=Rr&&s.dtick(Rr,gt.type),Rr)gt.dtick=Rr,gt.tick0=s.tick0(void 0,gt.type,xr);else{var Xt;if(Br)Xt=(Hr-Ur)/Br;else{var vr=e.distinctVals(xt),Or=Math.pow(10,Math.floor(Math.log(vr.minDiff)/Math.LN10)),ba=Or*e.roundUp(vr.minDiff/Or,[.9,1.9,4.9,9.9],!0);Xt=Math.max(ba,2*e.stdev(xt)/Math.pow(xt.length,Cr?.25:.4)),x(Xt)||(Xt=1)}q.autoTicks(gt,Xt)}var Pa=gt.dtick,ma=q.tickIncrement(q.tickFirst(gt),Pa,"reverse",xr),la,_a;if(typeof Pa=="number")ma=We(ma,xt,gt,Ur,Hr),_a=1+Math.floor((Hr-ma)/Pa),la=ma+_a*Pa;else for(gt.dtick.charAt(0)==="M"&&(ma=at(ma,xt,Pa,Ur,xr)),la=ma,_a=0;la<=Hr;)la=q.tickIncrement(la,Pa,!1,xr),_a++;return{start:lt.c2r(ma,0,xr),end:lt.c2r(la,0,xr),size:Pa,_dataSpan:Hr-Ur}};function We(xt,lt,Br,Cr,xr){var Rr=0,Ur=0,Hr=0,gt=0;function Xt(Pa){return(1+(Pa-xt)*100/Br.dtick)%100<2}for(var vr=0;vr<lt.length;vr++)lt[vr]%1===0?Hr++:x(lt[vr])||gt++,Xt(lt[vr])&&Rr++,Xt(lt[vr]+Br.dtick/2)&&Ur++;var Or=lt.length-gt;if(Hr===Or&&Br.type!=="date")Br.dtick<1?xt=Cr-.5*Br.dtick:(xt-=.5,xt+Br.dtick<Cr&&(xt+=Br.dtick));else if(Ur<Or*.1&&(Rr>Or*.3||Xt(Cr)||Xt(xr))){var ba=Br.dtick/2;xt+=xt+ba<Cr?ba:-ba}return xt}function at(xt,lt,Br,Cr,xr){var Rr=e.findExactDates(lt,xr),Ur=.8;if(Rr.exactDays>Ur){var Hr=Number(Br.slice(1));Rr.exactYears>Ur&&Hr%12===0?xt=q.tickIncrement(xt,"M6","reverse")+p*1.5:Rr.exactMonths>Ur?xt=q.tickIncrement(xt,"M1","reverse")+p*15.5:xt-=u;var gt=q.tickIncrement(xt,Br);if(gt<=Cr)return gt}return xt}q.prepMinorTicks=function(xt,lt,Br){if(!lt.minor.dtick){delete xt.dtick;var Cr=lt.dtick&&x(lt._tmin),xr;if(Cr){var Rr=q.tickIncrement(lt._tmin,lt.dtick,!0);xr=[lt._tmin,Rr*.99+lt._tmin*.01]}else{var Ur=e.simpleMap(lt.range,lt.r2l);xr=[Ur[0],.8*Ur[0]+.2*Ur[1]]}if(xt.range=e.simpleMap(xr,lt.l2r),xt._isMinor=!0,q.prepTicks(xt,Br),Cr){var Hr=x(lt.dtick),gt=x(xt.dtick),Xt=Hr?lt.dtick:+lt.dtick.substring(1),vr=gt?xt.dtick:+xt.dtick.substring(1);Hr&&gt?nt(Xt,vr)?Xt===2*b&&vr===2*p&&(xt.dtick=b):Xt===2*b&&vr===3*p?xt.dtick=b:Xt===b&&!(lt._input.minor||{}).nticks?xt.dtick=p:tt(Xt/vr,2.5)?xt.dtick=Xt/2:xt.dtick=Xt:String(lt.dtick).charAt(0)==="M"?gt?xt.dtick="M1":nt(Xt,vr)?Xt>=12&&vr===2&&(xt.dtick="M3"):xt.dtick=lt.dtick:String(xt.dtick).charAt(0)==="L"?String(lt.dtick).charAt(0)==="L"?nt(Xt,vr)||(xt.dtick=tt(Xt/vr,2.5)?lt.dtick/2:lt.dtick):xt.dtick="D1":xt.dtick==="D2"&&+lt.dtick>1&&(xt.dtick=1)}xt.range=lt.range}lt.minor._tick0Init===void 0&&(xt.tick0=lt.tick0)};function nt(xt,lt){return Math.abs((xt/lt+.5)%1-.5)<.001}function tt(xt,lt){return Math.abs(xt/lt-1)<.001}q.prepTicks=function(xt,lt){var Br=e.simpleMap(xt.range,xt.r2l,void 0,void 0,lt);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,xr;Cr||(xt.type==="category"||xt.type==="multicategory"?(xr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/xr):(xr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/xr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Br[1]-Br[0])/Cr,q.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick<xt._minDtick*2&&(xt.dtick=xt._minDtick,xt.tick0=xt.l2r(xt._forceTick0))}xt.ticklabelmode==="period"&&he(xt),xt.tick0||(xt.tick0=xt.type==="date"?"2000-01-01":0),xt.type==="date"&&xt.dtick<.1&&(xt.dtick=.1),qr(xt)};function qe(xt){return+xt.substring(1)}function he(xt){var lt;function Br(){return!(x(xt.dtick)||xt.dtick.charAt(0)!=="M")}var Cr=Br(),xr=q.getTickFormat(xt);if(xr){var Rr=xt._dtickInit!==xt.dtick;/%[fLQsSMX]/.test(xr)||(/%[HI]/.test(xr)?(lt=y,Rr&&!Cr&&xt.dtick<y&&(xt.dtick=y)):/%p/.test(xr)?(lt=u,Rr&&!Cr&&xt.dtick<u&&(xt.dtick=u)):/%[Aadejuwx]/.test(xr)?(lt=p,Rr&&!Cr&&xt.dtick<p&&(xt.dtick=p)):/%[UVW]/.test(xr)?(lt=b,Rr&&!Cr&&xt.dtick<b&&(xt.dtick=b)):/%[Bbm]/.test(xr)?(lt=M,Rr&&(Cr?qe(xt.dtick)<1:xt.dtick<g)&&(xt.dtick="M1")):/%[q]/.test(xr)?(lt=_,Rr&&(Cr?qe(xt.dtick)<3:xt.dtick<w)&&(xt.dtick="M3")):/%[Yy]/.test(xr)&&(lt=c,Rr&&(Cr?qe(xt.dtick)<12:xt.dtick<T)&&(xt.dtick="M12")))}Cr=Br(),Cr&&xt.tick0===xt._dowTick0&&(xt.tick0=xt._rawTick0),xt._definedDelta=lt}function ue(xt,lt,Br){for(var Cr=0;Cr<xt.length;Cr++){var xr=xt[Cr].value,Rr=Cr,Ur=Cr+1;Cr<xt.length-1?(Rr=Cr,Ur=Cr+1):Cr>0?(Rr=Cr-1,Ur=Cr):(Rr=Cr,Ur=Cr);var Hr=xt[Rr].value,gt=xt[Ur].value,Xt=Math.abs(gt-Hr),vr=Br||Xt,Or=0;vr>=T?Xt>=T&&Xt<=v?Or=Xt:Or=c:Br===_&&vr>=w?Xt>=w&&Xt<=l?Or=Xt:Or=_:vr>=g?Xt>=g&&Xt<=A?Or=Xt:Or=M:Br===b&&vr>=b?Or=b:vr>=p?Or=p:Br===u&&vr>=u?Or=u:Br===y&&vr>=y&&(Or=y);var ba;Or>=Xt&&(Or=Xt,ba=!0);var Pa=xr+Or;if(lt.rangebreaks&&Or>0){for(var ma=84,la=0,_a=0;_a<ma;_a++){var Ai=(_a+.5)/ma;lt.maskBreaks(xr*(1-Ai)+Ai*Pa)!==N&&la++}Or*=la/ma,Or||(xt[Cr].drop=!0),ba&&Xt>b&&(Or=Xt)}(Or>0||Cr===0)&&(xt[Cr].periodX=xr+Or/2)}}q.calcTicks=function(lt,Br){for(var Cr=lt.type,xr=lt.calendar,Rr=lt.ticklabelstep,Ur=lt.ticklabelmode==="period",Hr=lt.range[0]>lt.range[1],gt=!lt.ticklabelindex||e.isArrayOrTypedArray(lt.ticklabelindex)?lt.ticklabelindex:[lt.ticklabelindex],Xt=e.simpleMap(lt.range,lt.r2l,void 0,void 0,Br),vr=Xt[1]<Xt[0],Or=Math.min(Xt[0],Xt[1]),ba=Math.max(Xt[0],Xt[1]),Pa=Math.max(1e3,lt._length||0),ma=[],la=[],_a=[],Ai=[],ki=[],Ki=lt.minor&&(lt.minor.ticks||lt.minor.showgrid),yn=1;yn>=(Ki?0:1);yn--){var Ln=!yn;yn?(lt._dtickInit=lt.dtick,lt._tick0Init=lt.tick0):(lt.minor._dtickInit=lt.minor.dtick,lt.minor._tick0Init=lt.minor.tick0);var kn=yn?lt:e.extendFlat({},lt,lt.minor);if(Ln?q.prepMinorTicks(kn,lt,Br):q.prepTicks(kn,Br),kn.tickmode==="array"){yn?(_a=[],ma=Ye(lt,!Ln)):(Ai=[],la=Ye(lt,!Ln));continue}if(kn.tickmode==="sync"){_a=[],ma=Ce(lt);continue}var Bn=we(Xt),ao=Bn[0],xo=Bn[1],Co=x(kn.dtick),Fs=Cr==="log"&&!(Co||kn.dtick.charAt(0)==="L"),Mn=q.tickFirst(kn,Br);if(yn){if(lt._tmin=Mn,Mn<ao!==vr)break;(Cr==="category"||Cr==="multicategory")&&(xo=vr?Math.max(-.5,xo):Math.min(lt._categories.length-.5,xo))}var Ao=null,On=Mn,ts;if(yn){var is;Co?is=lt.dtick:Cr==="date"?typeof lt.dtick=="string"&&lt.dtick.charAt(0)==="M"&&(is=M*lt.dtick.substring(1)):is=lt._roughDTick,ts=Math.round((lt.r2l(On)-lt.r2l(lt.tick0))/is)-1}var _s=kn.dtick;for(kn.rangebreaks&&kn._tick0Init!==kn.tick0&&(On=ri(On,lt),vr||(On=q.tickIncrement(On,_s,!vr,xr))),yn&&Ur&&(On=q.tickIncrement(On,_s,!vr,xr),ts--);vr?On>=xo:On<=xo;On=q.tickIncrement(On,_s,vr,xr)){if(yn&&ts++,kn.rangebreaks&&!vr){if(On<ao)continue;if(kn.maskBreaks(On)===N&&ri(On,kn)>=ba)break}if(_a.length>Pa||On===Ao)break;Ao=On;var Oo={value:On};yn?(Fs&&On!==(On|0)&&(Oo.simpleLabel=!0),Rr>1&&ts%Rr&&(Oo.skipLabel=!0),_a.push(Oo)):(Oo.minor=!0,Ai.push(Oo))}}if(!Ai||Ai.length<2)gt=!1;else{var io=(Ai[1].value-Ai[0].value)*(Hr?-1:1);fn(io,lt.tickformat)||(gt=!1)}if(!gt)ki=_a;else{var Gn=_a.concat(Ai);Ur&&_a.length&&(Gn=Gn.slice(1)),Gn=Gn.sort(function(Gs,vl){return Gs.value-vl.value}).filter(function(Gs,vl,As){return vl===0||Gs.value!==As[vl-1].value});var eo=Gn.map(function(Gs,vl){return Gs.minor===void 0&&!Gs.skipLabel?vl:null}).filter(function(Gs){return Gs!==null});eo.forEach(function(Gs){gt.map(function(vl){var As=Gs+vl;As>=0&&As<Gn.length&&e.pushUnique(ki,Gn[As])})})}if(Ki){var ns=lt.minor.ticks==="inside"&&lt.ticks==="outside"||lt.minor.ticks==="outside"&&lt.ticks==="inside";if(!ns){for(var gs=_a.map(function(Gs){return Gs.value}),Ls=[],Xo=0;Xo<Ai.length;Xo++){var Gi=Ai[Xo],Pn=Gi.value;if(gs.indexOf(Pn)===-1){for(var js=!1,xs=0;!js&&xs<_a.length;xs++)1e7+_a[xs].value===1e7+Pn&&(js=!0);js||Ls.push(Gi)}}Ai=Ls}}Ur&&ue(ki,lt,lt._definedDelta);var Hn;if(lt.rangebreaks){var Os=lt._id.charAt(0)==="y",ds=1;lt.tickmode==="auto"&&(ds=lt.tickfont?lt.tickfont.size:12);var Xs=NaN;for(Hn=_a.length-1;Hn>-1;Hn--){if(_a[Hn].drop){_a.splice(Hn,1);continue}_a[Hn].value=ri(_a[Hn].value,lt);var il=lt.c2p(_a[Hn].value);(Os?Xs>il-ds:Xs<il+ds)?_a.splice(vr?Hn+1:Hn,1):Xs=il}}Za(lt)&&Math.abs(Xt[1]-Xt[0])===360&&_a.pop(),lt._tmax=(_a[_a.length-1]||{}).value,lt._prevDateHead="",lt._inCalcTicks=!0;var _n,Lo=function(Gs){Gs.text="",lt._prevDateHead=_n};_a=_a.concat(Ai);function bo(Gs,vl){var As=q.tickText(Gs,vl.value,!1,vl.simpleLabel),qs=vl.periodX;return qs!==void 0&&(As.periodX=qs,(qs>ba||qs<Or)&&(qs>ba&&(As.periodX=ba),qs<Or&&(As.periodX=Or),Lo(As))),As}var Rs;for(Hn=0;Hn<_a.length;Hn++){var pu=_a[Hn].minor,uo=_a[Hn].value;pu?(gt&&ki.indexOf(_a[Hn])!==-1?Rs=bo(lt,_a[Hn]):Rs={x:uo},Rs.minor=!0,la.push(Rs)):(_n=lt._prevDateHead,Rs=bo(lt,_a[Hn]),(_a[Hn].skipLabel||gt&&ki.indexOf(_a[Hn])===-1)&&Lo(Rs),ma.push(Rs))}return ma=ma.concat(la),lt._inCalcTicks=!1,Ur&&ma.length&&(ma[0].noTick=!0),ma};function ne(xt,lt){return xt.rangebreaks&&(lt=lt.filter(function(Br){return xt.maskBreaks(Br.x)!==N})),lt}function Ce(xt){var lt=xt._mainAxis,Br=[];if(lt._vals){for(var Cr=0;Cr<lt._vals.length;Cr++)if(!lt._vals[Cr].noTick){var xr=lt.l2p(lt._vals[Cr].x),Rr=xt.p2l(xr),Ur=q.tickText(xt,Rr);lt._vals[Cr].minor&&(Ur.minor=!0,Ur.text=""),Br.push(Ur)}}return Br=ne(xt,Br),Br}function Ye(xt,lt){var Br=e.simpleMap(xt.range,xt.r2l),Cr=we(Br),xr=Math.min(Cr[0],Cr[1]),Rr=Math.max(Cr[0],Cr[1]),Ur=xt.type==="category"?xt.d2l_noadd:xt.d2l;xt.type==="log"&&String(xt.dtick).charAt(0)!=="L"&&(xt.dtick="L"+Math.pow(10,Math.floor(Math.min(xt.range[0],xt.range[1]))-1));for(var Hr=[],gt=0;gt<=1;gt++)if(!(lt!==void 0&&(lt&&gt||lt===!1&&!gt))&&!(gt&&!xt.minor)){var Xt=gt?xt.minor.tickvals:xt.tickvals,vr=gt?[]:xt.ticktext;if(Xt){e.isArrayOrTypedArray(vr)||(vr=[]);for(var Or=0;Or<Xt.length;Or++){var ba=Ur(Xt[Or]);if(ba>xr&&ba<Rr){var Pa=q.tickText(xt,ba,!1,String(vr[Or]));gt&&(Pa.minor=!0,Pa.text=""),Hr.push(Pa)}}}}return Hr=ne(xt,Hr),Hr}var rt=[2,5,10],Ke=[1,2,3,6,12],Mt=[1,2,5,10,15,30],kt=[1,2,3,7,14],Nt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Gt=[-.301,0,.301,.699,1],Mr=[15,30,45,90,180];function mr(xt,lt,Br){return lt*e.roundUp(xt/lt,Br)}q.autoTicks=function(xt,lt,Br){var Cr;function xr(Or){return Math.pow(Or,Math.floor(Math.log(lt)/Math.LN10))}if(xt.type==="date"){xt.tick0=e.dateTick0(xt.calendar,0);var Rr=2*lt;if(Rr>c)lt/=c,Cr=xr(10),xt.dtick="M"+12*mr(lt,Cr,rt);else if(Rr>M)lt/=M,xt.dtick="M"+mr(lt,1,Ke);else if(Rr>p){if(xt.dtick=mr(lt,p,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Br){var Ur=q.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Ur)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>y?xt.dtick=mr(lt,y,Ke):Rr>m?xt.dtick=mr(lt,m,Mt):Rr>R?xt.dtick=mr(lt,R,Mt):(Cr=xr(10),xt.dtick=mr(lt,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(lt*=1.5),lt>.7)xt.dtick=Math.ceil(lt);else if(Math.abs(gt[1]-gt[0])<1){var Xt=1.5*Math.abs((gt[1]-gt[0])/lt);lt=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Xt,Cr=xr(10),xt.dtick="L"+mr(lt,Cr,rt)}else xt.dtick=lt>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(lt,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=mr(lt,Cr,Mr)):(xt.tick0=0,Cr=xr(10),xt.dtick=mr(lt,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!x(xt.dtick)&&typeof xt.dtick!="string"){var vr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(vr)}};function qr(xt){var lt=xt.dtick;if(xt._tickexponent=0,!x(lt)&&typeof lt!="string"&&(lt=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Br=xt.r2l(xt.tick0),Cr=xt.l2r(Br).replace(/(^-|i)/g,""),xr=Cr.length;if(String(lt).charAt(0)==="M")xr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+lt.slice(1)%12===0?"y":"m";else if(lt>=p&&xr<=10||lt>=p*15)xt._tickround="d";else if(lt>=m&&xr<=16||lt>=y)xt._tickround="M";else if(lt>=R&&xr<=19||lt>=m)xt._tickround="S";else{var Rr=xt.l2r(Br+lt).replace(/^-/,"").length;xt._tickround=Math.max(xr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(x(lt)||lt.charAt(0)==="L"){var Ur=xt.range.map(xt.r2d||Number);x(lt)||(lt=Number(lt.slice(1))),xt._tickround=2-Math.floor(Math.log(lt)/Math.LN10+.01);var Hr=Math.max(Math.abs(Ur[0]),Math.abs(Ur[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Xt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Xt&&(ut(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ut(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}q.tickIncrement=function(xt,lt,Br,Cr){var xr=Br?-1:1;if(x(lt))return e.increment(xt,xr*lt);var Rr=lt.charAt(0),Ur=xr*Number(lt.slice(1));if(Rr==="M")return e.incrementMonth(xt,Ur,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Ur)/Math.LN10;if(Rr==="D"){var Hr=lt==="D2"?Gt:Nt,gt=xt+xr*.01,Xt=e.roundUp(e.mod(gt,1),Hr,Br);return Math.floor(gt)+Math.log(d.round(Math.pow(10,Xt),1))/Math.LN10}throw"unrecognized dtick "+String(lt)},q.tickFirst=function(xt,lt){var Br=xt.r2l||Number,Cr=e.simpleMap(xt.range,Br,void 0,void 0,lt),xr=Cr[1]<Cr[0],Rr=xr?Math.floor:Math.ceil,Ur=we(Cr)[0],Hr=xt.dtick,gt=Br(xt.tick0);if(x(Hr)){var Xt=Rr((Ur-gt)/Hr)*Hr+gt;return(xt.type==="category"||xt.type==="multicategory")&&(Xt=e.constrain(Xt,0,xt._categories.length-1)),Xt}var vr=Hr.charAt(0),Or=Number(Hr.slice(1));if(vr==="M"){for(var ba=0,Pa=gt,ma,la,_a;ba<10;){if(ma=q.tickIncrement(Pa,Hr,xr,xt.calendar),(ma-Ur)*(Pa-Ur)<=0)return xr?Math.min(Pa,ma):Math.max(Pa,ma);la=(Ur-(Pa+ma)/2)/(ma-Pa),_a=vr+(Math.abs(Math.round(la))||1)*Or,Pa=q.tickIncrement(Pa,_a,la<0?!xr:xr,xt.calendar),ba++}return e.error("tickFirst did not converge",xt),Pa}else{if(vr==="L")return Math.log(Rr((Math.pow(10,Ur)-gt)/Or)*Or+gt)/Math.LN10;if(vr==="D"){var Ai=Hr==="D2"?Gt:Nt,ki=e.roundUp(e.mod(Ur,1),Ai,xr);return Math.floor(Ur)+Math.log(d.round(Math.pow(10,ki),1))/Math.LN10}else throw"unrecognized dtick "+String(Hr)}},q.tickText=function(xt,lt,Br,Cr){var xr=Er(xt,lt),Rr=xt.tickmode==="array",Ur=Br||Rr,Hr=xt.type,gt=Hr==="category"?xt.d2l_noadd:xt.d2l,Xt,vr=function(_a){var Ai=xt.l2p(_a);return Ai>=0&&Ai<=xt._length?_a:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Or=e.simpleMap(xt.range,xt.r2l),ba=(Math.abs(Or[1]-Or[0])-(xt._lBreaks||0))/1e4;for(Xt=0;Xt<xt.ticktext.length&&!(Math.abs(lt-gt(xt.tickvals[Xt]))<ba);Xt++);if(Xt<xt.ticktext.length)return xr.text=String(xt.ticktext[Xt]),xr.xbnd=[vr(xr.x-.5),vr(xr.x+xt.dtick-.5)],xr}function Pa(_a){if(_a===void 0)return!0;if(Br)return _a==="none";var Ai={first:xt._tmin,last:xt._tmax}[_a];return _a!=="all"&&lt!==Ai}var ma=Br?"never":xt.exponentformat!=="none"&&Pa(xt.showexponent)?"hide":"";if(Hr==="date"?Ir(xt,xr,Br,Ur):Hr==="log"?_t(xt,xr,Br,Ur,ma):Hr==="category"?Oe(xt,xr):Hr==="multicategory"?Je(xt,xr,Br):Za(xt)?Le(xt,xr,Br,Ur,ma):Ae(xt,xr,Br,Ur,ma),Cr||(xt.tickprefix&&!Pa(xt.showtickprefix)&&(xr.text=xt.tickprefix+xr.text),xt.ticksuffix&&!Pa(xt.showticksuffix)&&(xr.text+=xt.ticksuffix)),xt.labelalias&&xt.labelalias.hasOwnProperty(xr.text)){var la=xt.labelalias[xr.text];typeof la=="string"&&(xr.text=la)}return(xt.tickson==="boundaries"||xt.showdividers)&&(xr.xbnd=[vr(xr.x-.5),vr(xr.x+xt.dtick-.5)]),xr},q.hoverLabelText=function(xt,lt,Br){Br&&(xt=e.extendFlat({},xt,{hoverformat:Br}));var Cr=e.isArrayOrTypedArray(lt)?lt[0]:lt,xr=e.isArrayOrTypedArray(lt)?lt[1]:void 0;if(xr!==void 0&&xr!==Cr)return q.hoverLabelText(xt,Cr,Br)+" - "+q.hoverLabelText(xt,xr,Br);var Rr=xt.type==="log"&&Cr<=0,Ur=q.tickText(xt,xt.c2l(Rr?-Cr:Cr),"hover").text;return Rr?Cr===0?"0":F+Ur:Ur};function Er(xt,lt,Br){var Cr=xt.tickfont||{};return{x:lt,dx:0,dy:0,text:Br||"",fontSize:Cr.size,font:Cr.family,fontWeight:Cr.weight,fontStyle:Cr.style,fontVariant:Cr.variant,fontTextcase:Cr.textcase,fontLineposition:Cr.lineposition,fontShadow:Cr.shadow,fontColor:Cr.color}}function Ir(xt,lt,Br,Cr){var xr=xt._tickround,Rr=Br&&xt.hoverformat||q.getTickFormat(xt);Cr=!Rr&&Cr,Cr&&(x(xr)?xr=4:xr={y:"m",m:"d",d:"M",M:"S",S:4}[xr]);var Ur=e.formatDate(lt.x,Rr,xr,xt._dateFormat,xt.calendar,xt._extraFormat),Hr,gt=Ur.indexOf(`
`);if(gt!==-1&&(Hr=Ur.slice(gt+1),Ur=Ur.slice(0,gt)),Cr&&(Hr!==void 0&&(Ur==="00:00:00"||Ur==="00:00")?(Ur=Hr,Hr=""):Ur.length===8&&(Ur=Ur.replace(/:00$/,""))),Hr)if(Br)xr==="d"?Ur+=", "+Hr:Ur=Hr+(Ur?", "+Ur:"");else if(!xt._inCalcTicks||xt._prevDateHead!==Hr)xt._prevDateHead=Hr,Ur+="<br>"+Hr;else{var Xt=pi(xt),vr=xt._trueSide||xt.side;(!Xt&&vr==="top"||Xt&&vr==="bottom")&&(Ur+="<br> ")}lt.text=Ur}function _t(xt,lt,Br,Cr,xr){var Rr=xt.dtick,Ur=lt.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(xr==="never"&&(xr=""),Cr&&gt!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")lt.text=jt(Math.pow(10,Ur),xt,xr,Cr);else if(x(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Ur+.01,1)<.1)){var Xt;xt.minorloglabels==="complete"&&!(e.mod(Ur+.01,1)<.1)&&(Xt=!0,lt.fontSize*=.75);var vr=Math.pow(10,Ur).toExponential(0),Or=vr.split("e"),ba=+Or[1],Pa=Math.abs(ba),ma=xt.exponentformat;ma==="power"||ut(ma)&&ma!=="SI extended"&&Ut(ba)||ut(ma)&&ma==="SI extended"&&Ct(ba)?(lt.text=Or[0],Pa>0&&(lt.text+="x10"),lt.text==="1x10"&&(lt.text="10"),ba!==0&&ba!==1&&(lt.text+="<sup>"+(ba>0?"":F)+Pa+"</sup>"),lt.fontSize*=1.25):(ma==="e"||ma==="E")&&Pa>2?lt.text=Or[0]+ma+(ba>0?"+":F)+Pa:(lt.text=jt(Math.pow(10,Ur),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(lt.dy-=lt.fontSize/6))}else if(gt==="D")lt.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Ur,1)))),lt.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(lt.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?lt.dx-=lt.fontSize/4:(lt.dy+=lt.fontSize/2,lt.dx+=(xt.range[1]>xt.range[0]?1:-1)*lt.fontSize*(Ur<0?.5:.25)))}}function Oe(xt,lt){var Br=xt._categories[Math.round(lt.x)];Br===void 0&&(Br=""),lt.text=String(Br)}function Je(xt,lt,Br){var Cr=Math.round(lt.x),xr=xt._categories[Cr]||[],Rr=xr[1]===void 0?"":String(xr[1]),Ur=xr[0]===void 0?"":String(xr[0]);Br?lt.text=Ur+" - "+Rr:(lt.text=Rr,lt.text2=Ur)}function Ae(xt,lt,Br,Cr,xr){xr==="never"?xr="":xt.showexponent==="all"&&Math.abs(lt.x/xt.dtick)<1e-6&&(xr="hide"),lt.text=jt(lt.x,xt,xr,Cr)}function Le(xt,lt,Br,Cr,xr){if(xt.thetaunit==="radians"&&!Br){var Rr=lt.x/180;if(Rr===0)lt.text="0";else{var Ur=Ue(Rr);if(Ur[1]>=100)lt.text=jt(e.deg2rad(lt.x),xt,xr,Cr);else{var Hr=lt.x<0;Ur[1]===1?Ur[0]===1?lt.text="\u03C0":lt.text=Ur[0]+"\u03C0":lt.text=["<sup>",Ur[0],"</sup>","\u2044","<sub>",Ur[1],"</sub>","\u03C0"].join(""),Hr&&(lt.text=F+lt.text)}}}else lt.text=jt(lt.x,xt,xr,Cr)}function Ue(xt){function lt(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Br(Hr,gt){return lt(gt,0)?Hr:Br(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!lt(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var xr=Cr(xt),Rr=xt*xr,Ur=Math.abs(Br(Rr,xr));return[Math.round(Rr/Ur),Math.round(xr/Ur)]}var Ze=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ze,"P","E","Z","Y","R","Q"],ut=xt=>["SI","SI extended","B"].includes(xt);function Ut(xt){return xt>14||xt<-15}function Ct(xt){return xt>32||xt<-30}function Pt(xt,lt){return ut(lt)?!!(lt==="SI extended"&&Ct(xt)||lt!=="SI extended"&&Ut(xt)):!1}function jt(xt,lt,Br,Cr){var xr=xt<0,Rr=lt._tickround,Ur=Br||lt.exponentformat||"B",Hr=lt._tickexponent,gt=q.getTickFormat(lt),Xt=lt.separatethousands;if(Cr){var vr={exponentformat:Ur,minexponent:lt.minexponent,dtick:lt.showexponent==="none"?lt.dtick:x(xt)&&Math.abs(xt)||1,range:lt.showexponent==="none"?lt.range.map(lt.r2d):[0,xt||1]};qr(vr),Rr=(Number(vr._tickround)||0)+4,Hr=vr._tickexponent,lt.hoverformat&&(gt=lt.hoverformat)}if(gt)return lt._numFormat(gt)(xt).replace(/-/g,F);var Or=Math.pow(10,-Rr)/2;if(Ur==="none"&&(Hr=0),xt=Math.abs(xt),xt<Or)xt="0",xr=!1;else{if(xt+=Or,Hr&&(xt*=Math.pow(10,-Hr),Rr+=Hr),Rr===0)xt=String(Math.floor(xt));else if(Rr<0){xt=String(Math.round(xt)),xt=xt.slice(0,Math.max(0,xt.length+Rr));for(var ba=Rr;ba<0;ba++)xt+="0"}else{xt=String(xt);var Pa=xt.indexOf(".")+1;Pa&&(xt=xt.slice(0,Pa+Rr).replace(/\.?0+$/,""))}xt=e.numSeparate(xt,lt._separators,Xt)}if(Hr&&Ur!=="hide"){Pt(Hr,Ur)&&(Ur="power");var ma;Hr<0?ma=F+-Hr:Ur!=="power"?ma="+"+Hr:ma=String(Hr),Ur==="e"||Ur==="E"?xt+=Ur+ma:Ur==="power"?xt+="\xD710<sup>"+ma+"</sup>":Ur==="B"&&Hr===9?xt+="B":ut(Ur)&&(xt+=Ur==="SI extended"?st[Hr/3+10]:Ze[Hr/3+5])}return xr?F+xt:xt}q.getTickFormat=function(xt){var lt;function Br(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*M}function Cr(gt,Xt){var vr=["L","D"];if(typeof gt==typeof Xt){if(typeof gt=="number")return gt-Xt;var Or=vr.indexOf(gt.charAt(0)),ba=vr.indexOf(Xt.charAt(0));return Or===ba?Number(gt.replace(/(L|D)/g,""))-Number(Xt.replace(/(L|D)/g,"")):Or-ba}else return typeof gt=="number"?1:-1}function xr(gt,Xt,vr){var Or=vr||function(ma){return ma},ba=Xt[0],Pa=Xt[1];return(!ba&&typeof ba!="number"||Or(ba)<=Or(gt))&&(!Pa&&typeof Pa!="number"||Or(Pa)>=Or(gt))}function Rr(gt,Xt){var vr=Xt[0]===null,Or=Xt[1]===null,ba=Cr(gt,Xt[0])>=0,Pa=Cr(gt,Xt[1])<=0;return(vr||ba)&&(Or||Pa)}var Ur,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(lt=0;lt<xt.tickformatstops.length;lt++)if(Hr=xt.tickformatstops[lt],Hr.enabled&&xr(xt.dtick,Hr.dtickrange,Br)){Ur=Hr;break}break}case"log":{for(lt=0;lt<xt.tickformatstops.length;lt++)if(Hr=xt.tickformatstops[lt],Hr.enabled&&Rr(xt.dtick,Hr.dtickrange)){Ur=Hr;break}break}default:}return Ur?Ur.value:xt.tickformat},q.getSubplots=function(xt,lt){var Br=xt._fullLayout._subplots,Cr=Br.cartesian.concat(Br.gl2d||[]),xr=lt?q.findSubplotsWithAxis(Cr,lt):Cr;return xr.sort(function(Rr,Ur){var Hr=Rr.slice(1).split("y"),gt=Ur.slice(1).split("y");return Hr[0]===gt[0]?+Hr[1]-+gt[1]:+Hr[0]-+gt[0]}),xr},q.findSubplotsWithAxis=function(xt,lt){for(var Br=new RegExp(lt._id.charAt(0)==="x"?"^"+lt._id+"y":lt._id+"$"),Cr=[],xr=0;xr<xt.length;xr++){var Rr=xt[xr];Br.test(Rr)&&Cr.push(Rr)}return Cr},q.makeClipPaths=function(xt){var lt=xt._fullLayout;if(!lt._hasOnlyLargeSploms){var Br={_offset:0,_length:lt.width,_id:""},Cr={_offset:0,_length:lt.height,_id:""},xr=q.list(xt,"x",!0),Rr=q.list(xt,"y",!0),Ur=[],Hr,gt;for(Hr=0;Hr<xr.length;Hr++)for(Ur.push({x:xr[Hr],y:Cr}),gt=0;gt<Rr.length;gt++)Hr===0&&Ur.push({x:Br,y:Rr[gt]}),Ur.push({x:xr[Hr],y:Rr[gt]});var Xt=lt._clips.selectAll(".axesclip").data(Ur,function(vr){return vr.x._id+vr.y._id});Xt.enter().append("clipPath").classed("axesclip",!0).attr("id",function(vr){return"clip"+lt._uid+vr.x._id+vr.y._id}).append("rect"),Xt.exit().remove(),Xt.each(function(vr){d.select(this).select("rect").attr({x:vr.x._offset||0,y:vr.y._offset||0,width:vr.x._length||1,height:vr.y._length||1})})}},q.draw=function(xt,lt,Br){var Cr=xt._fullLayout;lt==="redraw"&&Cr._paper.selectAll("g.subplot").each(function(gt){var Xt=gt[0],vr=Cr._plots[Xt];if(vr){var Or=vr.xaxis,ba=vr.yaxis;vr.xaxislayer.selectAll("."+Or._id+"tick").remove(),vr.yaxislayer.selectAll("."+ba._id+"tick").remove(),vr.xaxislayer.selectAll("."+Or._id+"tick2").remove(),vr.yaxislayer.selectAll("."+ba._id+"tick2").remove(),vr.xaxislayer.selectAll("."+Or._id+"divider").remove(),vr.yaxislayer.selectAll("."+ba._id+"divider").remove(),vr.minorGridlayer&&vr.minorGridlayer.selectAll("path").remove(),vr.gridlayer&&vr.gridlayer.selectAll("path").remove(),vr.zerolinelayer&&vr.zerolinelayer.selectAll("path").remove(),vr.zerolinelayerAbove&&vr.zerolinelayerAbove.selectAll("path").remove(),Cr._infolayer.select(".g-"+Or._id+"title").remove(),Cr._infolayer.select(".g-"+ba._id+"title").remove()}});var xr=!lt||lt==="redraw"?q.listIds(xt):lt,Rr=q.list(xt),Ur=Rr.filter(function(gt){return gt.autoshift}).map(function(gt){return gt.overlaying});xr.map(function(gt){var Xt=q.getFromId(xt,gt);if(Xt.tickmode==="sync"&&Xt.overlaying){var vr=xr.findIndex(function(Or){return Or===Xt.overlaying});vr>=0&&xr.unshift(xr.splice(vr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(xr.map(function(gt){return function(){if(gt){var Xt=q.getFromId(xt,gt);Br||(Br={}),Br.axShifts=Hr,Br.overlayingShiftedAx=Ur;var vr=q.drawOne(xt,Xt,Br);return Xt._shiftPusher&&an(Xt,Xt._fullDepth||0,Hr,!0),Xt._r=Xt.range.slice(),Xt._rl=e.simpleMap(Xt._r,Xt.r2l),vr}}}))},q.drawOne=function(xt,lt,Br){Br=Br||{};var Cr=Br.axShifts||{},xr=Br.overlayingShiftedAx||[],Rr,Ur,Hr;lt.setScale();var gt=xt._fullLayout,Xt=lt._id,vr=Xt.charAt(0),Or=q.counterLetter(Xt),ba=gt._plots[lt._mainSubplot],Pa=lt.zerolinelayer==="above traces";if(!ba)return;if(lt._shiftPusher=lt.autoshift||xr.indexOf(lt._id)!==-1||xr.indexOf(lt.overlaying)!==-1,lt._shiftPusher&lt.anchor==="free"){var ma=lt.linewidth/2||0;lt.ticks==="inside"&&(ma+=lt.ticklen),an(lt,ma,Cr,!0),an(lt,lt.shift||0,Cr,!1)}(Br.skipTitle!==!0||lt._shift===void 0)&&(lt._shift=tn(lt,Cr));var la=ba[vr+"axislayer"],_a=lt._mainLinePosition,Ai=_a+=lt._shift,ki=lt._mainMirrorPosition,Ki=lt._vals=q.calcTicks(lt),yn=[lt.mirror,Ai,ki].join("_");for(Rr=0;Rr<Ki.length;Rr++)Ki[Rr].axInfo=yn;lt._selections={},lt._tickAngles&&(lt._prevTickAngles=lt._tickAngles),lt._tickAngles={},lt._depth=null;var Ln={};function kn(uo){var Gs=Xt+(uo||"tick");return Ln[Gs]||(Ln[Gs]=Ta(lt,Gs,Ai)),Ln[Gs]}if(lt.visible){var Bn=q.makeTransTickFn(lt),ao=q.makeTransTickLabelFn(lt),xo,Co,Fs=lt.ticks==="inside",Mn=lt.ticks==="outside";if(lt.tickson==="boundaries"){var Ao=ur(lt,Ki);Co=q.clipEnds(lt,Ao),xo=Fs?Co:Ao}else Co=q.clipEnds(lt,Ki),xo=Fs&&lt.ticklabelmode!=="period"?Co:Ki;var On=lt._gridVals=Co,ts=Pr(lt,Ki);if(!gt._hasOnlyLargeSploms){var is=lt._subplotsWith,_s={};for(Rr=0;Rr<is.length;Rr++){Ur=is[Rr],Hr=gt._plots[Ur];var Oo=Hr[Or+"axis"],io=Oo._mainAxis._id;if(!_s[io]){_s[io]=1;var Gn=vr==="x"?"M0,"+Oo._offset+"v"+Oo._length:"M"+Oo._offset+",0h"+Oo._length;q.drawGrid(xt,lt,{vals:On,counterAxis:Oo,layer:Hr.gridlayer.select("."+Xt),minorLayer:Hr.minorGridlayer.select("."+Xt),path:Gn,transFn:Bn}),q.drawZeroLine(xt,lt,{counterAxis:Oo,layer:Pa?Hr.zerolinelayerAbove:Hr.zerolinelayer,path:Gn,transFn:Bn})}}}var eo,ns=q.getTickSigns(lt),gs=q.getTickSigns(lt,"minor");if(lt.ticks||lt.minor&&lt.minor.ticks){var Ls=q.makeTickPath(lt,Ai,ns[2]),Xo=q.makeTickPath(lt,Ai,gs[2],{minor:!0}),Gi,Pn,js,xs;if(lt._anchorAxis&&lt.mirror&&lt.mirror!==!0?(Gi=q.makeTickPath(lt,ki,ns[3]),Pn=q.makeTickPath(lt,ki,gs[3],{minor:!0}),js=Ls+Gi,xs=Xo+Pn):(Gi="",Pn="",js=Ls,xs=Xo),lt.showdividers&&Mn&&lt.tickson==="boundaries"){var Hn={};for(Rr=0;Rr<ts.length;Rr++)Hn[ts[Rr].x]=1;eo=function(uo){return Hn[uo.x]?Gi:js}}else eo=function(uo){return uo.minor?xs:js}}if(q.drawTicks(xt,lt,{vals:xo,layer:la,path:eo,transFn:Bn}),lt.mirror==="allticks"){var Os=Object.keys(lt._linepositions||{});for(Rr=0;Rr<Os.length;Rr++){Ur=Os[Rr],Hr=gt._plots[Ur];var ds=lt._linepositions[Ur]||[],Xs=ds[0],il=ds[1],_n=ds[2],Lo=q.makeTickPath(lt,Xs,_n?ns[0]:gs[0],{minor:_n})+q.makeTickPath(lt,il,_n?ns[1]:gs[1],{minor:_n});q.drawTicks(xt,lt,{vals:xo,layer:Hr[vr+"axislayer"],path:Lo,transFn:Bn})}}var bo=[];if(bo.push(function(){return q.drawLabels(xt,lt,{vals:Ki,layer:la,plotinfo:Hr,transFn:ao,labelFns:q.makeLabelFns(lt,Ai)})}),lt.type==="multicategory"){var Rs={x:2,y:10}[vr];bo.push(function(){var uo={x:"height",y:"width"}[vr],Gs=kn()[uo]+Rs+(lt._tickAngles[Xt+"tick"]?lt.tickfont.size*G:0);return q.drawLabels(xt,lt,{vals:sr(lt,Ki),layer:la,cls:Xt+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:Bn,labelFns:q.makeLabelFns(lt,Ai+Gs*ns[4])})}),bo.push(function(){return lt._depth=ns[4]*(kn("tick2")[lt.side]-Ai),Wa(xt,lt,{vals:ts,layer:la,path:q.makeTickPath(lt,Ai,ns[4],{len:lt._depth}),transFn:Bn})})}else lt.title.hasOwnProperty("standoff")&&bo.push(function(){lt._depth=ns[4]*(kn()[lt.side]-Ai)});var pu=E.getComponentMethod("rangeslider","isVisible")(lt);return!Br.skipTitle&&!(pu&&lt.side==="bottom")&&bo.push(function(){return hi(xt,lt)}),bo.push(function(){var uo=lt.side.charAt(0),Gs=Y[lt.side].charAt(0),vl=q.getPxPosition(xt,lt),As=Mn?lt.ticklen:0,qs,us,Ss,Nl;(lt.automargin||pu||lt._shiftPusher)&&(lt.type==="multicategory"?qs=kn("tick2"):(qs=kn(),vr==="x"&&uo==="b"&&(lt._depth=Math.max(qs.width>0?qs.bottom-vl:0,As))));var su=0,Tc=0;if(lt._shiftPusher&&(su=Math.max(As,qs.height>0?uo==="l"?vl-qs.left:qs.right-vl:0),lt.title.text!==gt._dfltTitle[vr]&&(Tc=(lt._titleStandoff||0)+(lt._titleScoot||0),uo==="l"&&(Tc+=Ca(lt))),lt._fullDepth=Math.max(su,Tc)),lt.automargin){us={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof lt._shift=="number"?lt._shift:0;if(vr==="x"){if(uo==="b"?us[uo]=lt._depth:(us[uo]=lt._depth=Math.max(qs.width>0?vl-qs.top:0,As),du.reverse()),qs.width>0){var Uc=qs.right-(lt._offset+lt._length);Uc>0&&(us.xr=1,us.r=Uc);var Bs=lt._offset-qs.left;Bs>0&&(us.xl=0,us.l=Bs)}}else if(uo==="l"?(lt._depth=Math.max(qs.height>0?vl-qs.left:0,As),us[uo]=lt._depth-Sf):(lt._depth=Math.max(qs.height>0?qs.right-vl:0,As),us[uo]=lt._depth+Sf,du.reverse()),qs.height>0){var dc=qs.bottom-(lt._offset+lt._length);dc>0&&(us.yb=0,us.b=dc);var Hc=lt._offset-qs.top;Hc>0&&(us.yt=1,us.t=Hc)}us[Or]=lt.anchor==="free"?lt.position:lt._anchorAxis.domain[du[0]],lt.title.text!==gt._dfltTitle[vr]&&(us[uo]+=Ca(lt)+(lt.title.standoff||0)),lt.mirror&&lt.anchor!=="free"&&(Ss={x:0,y:0,r:0,l:0,t:0,b:0},Ss[Gs]=lt.linewidth,lt.mirror&&lt.mirror!==!0&&(Ss[Gs]+=As),lt.mirror===!0||lt.mirror==="ticks"?Ss[Or]=lt._anchorAxis.domain[du[1]]:(lt.mirror==="all"||lt.mirror==="allticks")&&(Ss[Or]=[lt._counterDomainMin,lt._counterDomainMax][du[1]]))}pu&&(Nl=E.getComponentMethod("rangeslider","autoMarginOpts")(xt,lt)),typeof lt.automargin=="string"&&(fr(us,lt.automargin),fr(Ss,lt.automargin)),S.autoMargin(xt,Jt(lt),us),S.autoMargin(xt,Fr(lt),Ss),S.autoMargin(xt,ta(lt),Nl)}),e.syncOrAsync(bo)}};function fr(xt,lt){if(xt){var Br=Object.keys($).reduce(function(Cr,xr){return lt.indexOf(xr)!==-1&&$[xr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Br[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function ur(xt,lt){var Br=[],Cr,xr=function(Rr,Ur){var Hr=Rr.xbnd[Ur];Hr!==null&&Br.push(e.extendFlat({},Rr,{x:Hr}))};if(lt.length){for(Cr=0;Cr<lt.length;Cr++)xr(lt[Cr],0);xr(lt[Cr-1],1)}return Br}function sr(xt,lt){for(var Br=[],Cr={},xr=0;xr<lt.length;xr++){var Rr=lt[xr];Cr[Rr.text2]?Cr[Rr.text2].push(Rr.x):Cr[Rr.text2]=[Rr.x]}for(var Ur in Cr)Br.push(Er(xt,e.interp(Cr[Ur],.5),Ur));return Br}function Pr(xt,lt){var Br=[],Cr,xr,Rr=lt.length&&lt[lt.length-1].x<lt[0].x,Ur=function(gt,Xt){var vr=gt.xbnd[Xt];vr!==null&&Br.push(e.extendFlat({},gt,{x:vr}))};if(xt.showdividers&&lt.length){for(Cr=0;Cr<lt.length;Cr++){var Hr=lt[Cr];Hr.text2!==xr&&Ur(Hr,Rr?1:0),xr=Hr.text2}Ur(lt[Cr-1],Rr?0:1)}return Br}function Ta(xt,lt,Br){var Cr,xr,Rr,Ur;if(xt._selections[lt].size())Cr=1/0,xr=-1/0,Rr=1/0,Ur=-1/0,xt._selections[lt].each(function(){var gt=Yt(this);if(gt.node().style.display!=="none"){var Xt=n.bBox(gt.node().parentNode);Cr=Math.min(Cr,Xt.top),xr=Math.max(xr,Xt.bottom),Rr=Math.min(Rr,Xt.left),Ur=Math.max(Ur,Xt.right)}});else{var Hr=q.makeLabelFns(xt,Br);Cr=xr=Hr.yFn({dx:0,dy:0,fontSize:0}),Rr=Ur=Hr.xFn({dx:0,dy:0,fontSize:0})}return{top:Cr,bottom:xr,left:Rr,right:Ur,height:xr-Cr,width:Ur-Rr}}q.getTickSigns=function(xt,lt){var Br=xt._id.charAt(0),Cr={x:"top",y:"right"}[Br],xr=xt.side===Cr?1:-1,Rr=[-1,1,xr,-xr],Ur=lt?(xt.minor||{}).ticks:xt.ticks;return Ur!=="inside"==(Br==="x")&&(Rr=Rr.map(function(Hr){return-Hr})),xt.side&&Rr.push({l:-1,t:-1,r:1,b:1}[xt.side.charAt(0)]),Rr},q.makeTransTickFn=function(xt){return xt._id.charAt(0)==="x"?function(lt){return t(xt._offset+xt.l2p(lt.x),0)}:function(lt){return t(0,xt._offset+xt.l2p(lt.x))}},q.makeTransTickLabelFn=function(xt){var lt=Ia(xt),Br=xt.ticklabelshift||0,Cr=xt.ticklabelstandoff||0,xr=lt[0],Rr=lt[1],Ur=xt.range[0]>xt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Br){var Xt=Ur?-1:1;Br=Br*Xt}if(Cr){var vr=xt.side,Or=Hr&&(vr==="top"||vr==="left")||gt&&(vr==="bottom"||vr==="right")?1:-1;Cr=Cr*Or}return xt._id.charAt(0)==="x"?function(ba){return t(xr+xt._offset+xt.l2p(Oa(ba))+Br,Rr+Cr)}:function(ba){return t(Rr+Cr,xr+xt._offset+xt.l2p(Oa(ba))+Br)}};function Oa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ia(xt){var lt=xt.ticklabelposition||"",Br=xt.tickson||"",Cr=function(ma){return lt.indexOf(ma)!==-1},xr=Cr("top"),Rr=Cr("left"),Ur=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Xt=Br!=="boundaries"&&(Hr||Rr||xr||Ur);if(!Xt&&!gt)return[0,0];var vr=xt.side,Or=Xt?(xt.tickwidth||0)/2:0,ba=ee,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||xr)&&(Or+=Pa*de,ba+=(xt.linewidth||0)/2),(Rr||Ur)&&(Or+=(xt.linewidth||0)/2,ba+=ee),gt&&vr==="top"&&(ba-=Pa*(1-de)),(Rr||xr)&&(Or=-Or),(vr==="bottom"||vr==="right")&&(ba=-ba),[Xt?Or:0,gt?ba:0]}q.makeTickPath=function(xt,lt,Br,Cr){Cr||(Cr={});var xr=Cr.minor;if(xr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:xr?xt.minor.ticklen:xt.ticklen,Ur=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Ur==="x"?"M0,"+(lt+Hr*Br)+"v"+Rr*Br:"M"+(lt+Hr*Br)+",0h"+Rr*Br},q.makeLabelFns=function(xt,lt,Br){var Cr=xt.ticklabelposition||"",xr=xt.tickson||"",Rr=function(Ao){return Cr.indexOf(Ao)!==-1},Ur=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Xt=Rr("bottom"),vr=xr!=="boundaries"&&(Xt||Hr||Ur||gt),Or=Rr("inside"),ba=Cr==="inside"&&xt.ticks==="inside"||!Or&&xt.ticks==="outside"&&xr!=="boundaries",Pa=0,ma=0,la=ba?xt.ticklen:0;if(Or?la*=-1:vr&&(la=0),ba&&(Pa+=la,Br)){var _a=e.deg2rad(Br);Pa=la*Math.cos(_a)+1,ma=la*Math.sin(_a)}xt.showticklabels&&(ba||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Or?-1:1);var Ai={labelStandoff:Pa,labelShift:ma},ki,Ki,yn,Ln,kn=0,Bn=xt.side,ao=xt._id.charAt(0),xo=xt.tickangle,Co;if(ao==="x")Co=!Or&&Bn==="bottom"||Or&&Bn==="top",Ln=Co?1:-1,Or&&(Ln*=-1),ki=ma*Ln,Ki=lt+Pa*Ln,yn=Co?1:-.2,Math.abs(xo)===90&&(Or?yn+=ce:xo===-90&&Bn==="bottom"?yn=de:xo===90&&Bn==="top"?yn=ce:yn=.5,kn=ce/2*(xo/90)),Ai.xFn=function(Ao){return Ao.dx+ki+kn*Ao.fontSize},Ai.yFn=function(Ao){return Ao.dy+Ki+Ao.fontSize*yn},Ai.anchorFn=function(Ao,On){if(vr){if(Hr)return"end";if(gt)return"start"}return!x(On)||On===0||On===180?"middle":On*Ln<0!==Or?"end":"start"},Ai.heightFn=function(Ao,On,ts){return On<-60||On>60?-.5*ts:xt.side==="top"!==Or?-ts:0};else if(ao==="y"){if(Co=!Or&&Bn==="left"||Or&&Bn==="right",Ln=Co?1:-1,Or&&(Ln*=-1),ki=Pa,Ki=ma*Ln,yn=0,!Or&&Math.abs(xo)===90&&(xo===-90&&Bn==="left"||xo===90&&Bn==="right"?yn=de:yn=.5),Or){var Fs=x(xo)?+xo:0;if(Fs!==0){var Mn=e.deg2rad(Fs);kn=Math.abs(Math.sin(Mn))*de*Ln,yn=0}}Ai.xFn=function(Ao){return Ao.dx+lt-(ki+Ao.fontSize*yn)*Ln+kn*Ao.fontSize},Ai.yFn=function(Ao){return Ao.dy+Ki+Ao.fontSize*ce},Ai.anchorFn=function(Ao,On){return x(On)&&Math.abs(On)===90?"middle":Co?"end":"start"},Ai.heightFn=function(Ao,On,ts){return xt.side==="right"&&(On*=-1),On<-30?-ts:On<30?-.5*ts:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}q.drawTicks=function(xt,lt,Br){Br=Br||{};var Cr=lt._id+"tick",xr=[].concat(lt.minor&&lt.minor.ticks?Br.vals.filter(function(Ur){return Ur.minor&&!Ur.noTick}):[]).concat(lt.ticks?Br.vals.filter(function(Ur){return!Ur.minor&&!Ur.noTick}):[]),Rr=Br.layer.selectAll("path."+Cr).data(xr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Br.crisp!==!1).each(function(Ur){return a.stroke(d.select(this),Ur.minor?lt.minor.tickcolor:lt.tickcolor)}).style("stroke-width",function(Ur){return n.crispRound(xt,Ur.minor?lt.minor.tickwidth:lt.tickwidth,1)+"px"}).attr("d",Br.path).style("display",null),Ra(lt,[B]),Rr.attr("transform",Br.transFn)},q.drawGrid=function(xt,lt,Br){if(Br=Br||{},lt.tickmode!=="sync"){var Cr=lt._id+"grid",xr=lt.minor&&lt.minor.showgrid,Rr=xr?Br.vals.filter(function(Ai){return Ai.minor}):[],Ur=lt.showgrid?Br.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Br.counterAxis;if(Hr&&q.shouldShowZeroLine(xt,lt,Hr))for(var gt=lt.tickmode==="array",Xt=0;Xt<Ur.length;Xt++){var vr=Ur[Xt].x;if(gt?!vr:Math.abs(vr)<lt.dtick/100)if(Ur=Ur.slice(0,Xt).concat(Ur.slice(Xt+1)),gt)Xt--;else break}lt._gw=n.crispRound(xt,lt.gridwidth,1);for(var Or=xr?n.crispRound(xt,lt.minor.gridwidth,1):0,ba=Br.layer,Pa=Br.minorLayer,ma=1;ma>=0;ma--){var la=ma?ba:Pa;if(la){var _a=la.selectAll("path."+Cr).data(ma?Ur:Rr,qa);_a.exit().remove(),_a.enter().append("path").classed(Cr,1).classed("crisp",Br.crisp!==!1),_a.attr("transform",Br.transFn).attr("d",Br.path).each(function(Ai){return a.stroke(d.select(this),Ai.minor?lt.minor.gridcolor:lt.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return n.dashStyle(Ai.minor?lt.minor.griddash:lt.griddash,Ai.minor?lt.minor.gridwidth:lt.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Or:lt._gw)+"px"}).style("display",null),typeof Br.path=="function"&&_a.attr("d",Br.path)}}Ra(lt,[P,U])}},q.drawZeroLine=function(xt,lt,Br){Br=Br||Br;var Cr=lt._id+"zl",xr=q.shouldShowZeroLine(xt,lt,Br.counterAxis),Rr=Br.layer.selectAll("path."+Cr).data(xr?[{x:0,id:lt._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Br.crisp!==!1).each(function(){Br.layer.selectAll("path").sort(function(Ur,Hr){return j(Ur.id,Hr.id)})}),Rr.attr("transform",Br.transFn).attr("d",Br.path).call(a.stroke,lt.zerolinecolor||a.defaultLine).style("stroke-width",n.crispRound(xt,lt.zerolinewidth,lt._gw||1)+"px").style("display",null),Ra(lt,[O])},q.drawLabels=function(xt,lt,Br){Br=Br||{};var Cr=xt._fullLayout,xr=lt._id,Rr=lt.zerolinelayer==="above traces",Ur=Br.cls||xr+"tick",Hr=Br.vals.filter(function(io){return io.text}),gt=Br.labelFns,Xt=Br.secondary?0:lt.tickangle,vr=(lt._prevTickAngles||{})[Ur],Or=Br.layer.selectAll("g."+Ur).data(lt.showticklabels?Hr:[],qa),ba=[];Or.enter().append("g").classed(Ur,1).append("text").attr("text-anchor","middle").each(function(io){var Gn=d.select(this),eo=xt._promises.length;Gn.call(r.positionText,gt.xFn(io),gt.yFn(io)).call(n.font,{family:io.font,size:io.fontSize,color:io.fontColor,weight:io.fontWeight,style:io.fontStyle,variant:io.fontVariant,textcase:io.fontTextcase,lineposition:io.fontLineposition,shadow:io.fontShadow}).text(io.text).call(r.convertToTspans,xt),xt._promises[eo]?ba.push(xt._promises.pop().then(function(){Pa(Gn,Xt)})):Pa(Gn,Xt)}),Ra(lt,[X]),Or.exit().remove(),Br.repositionOnUpdate&&Or.each(function(io){d.select(this).select("text").call(r.positionText,gt.xFn(io),gt.yFn(io))});function Pa(io,Gn){io.each(function(eo){var ns=d.select(this),gs=ns.select(".text-math-group"),Ls=gt.anchorFn(eo,Gn),Xo=Br.transFn.call(ns.node(),eo)+(x(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(eo)+","+(gt.yFn(eo)-eo.fontSize/2)+")":""),Gi=r.lineCount(ns),Pn=G*eo.fontSize,js=gt.heightFn(eo,x(Gn)?+Gn:0,(Gi-1)*Pn);if(js&&(Xo+=t(0,js)),gs.empty()){var xs=ns.select("text");xs.attr({transform:Xo,"text-anchor":Ls}),xs.style("display",null),lt._adjustTickLabelsOverflow&&lt._adjustTickLabelsOverflow()}else{var Hn=n.bBox(gs.node()).width,Os=Hn*{end:-.5,start:.5}[Ls];gs.attr("transform",Xo+t(Os,0))}})}lt._adjustTickLabelsOverflow=function(){var io=lt.ticklabeloverflow;if(!(!io||io==="allow")){var Gn=io.indexOf("hide")!==-1,eo=lt._id.charAt(0)==="x",ns=0,gs=eo?xt._fullLayout.width:xt._fullLayout.height;if(io.indexOf("domain")!==-1){var Ls=e.simpleMap(lt.range,lt.r2l);ns=lt.l2p(Ls[0])+lt._offset,gs=lt.l2p(Ls[1])+lt._offset}var Xo=Math.min(ns,gs),Gi=Math.max(ns,gs),Pn=lt.side,js=1/0,xs=-1/0;Or.each(function(Xs){var il=d.select(this),_n=il.select(".text-math-group");if(_n.empty()){var Lo=n.bBox(il.node()),bo=0;eo?(Lo.right>Gi||Lo.left<Xo)&&(bo=1):(Lo.bottom>Gi||Lo.top+(lt.tickangle?0:Xs.fontSize/4)<Xo)&&(bo=1);var Rs=il.select("text");bo?Gn&&Rs.style("display","none"):Rs.node().style.display!=="none"&&(Rs.style("display",null),Pn==="bottom"||Pn==="right"?js=Math.min(js,eo?Lo.top:Lo.left):js=-1/0,Pn==="top"||Pn==="left"?xs=Math.max(xs,eo?Lo.bottom:Lo.right):xs=1/0)}});for(var Hn in Cr._plots){var Os=Cr._plots[Hn];if(!(lt._id!==Os.xaxis._id&&lt._id!==Os.yaxis._id)){var ds=eo?Os.yaxis:Os.xaxis;ds&&(ds["_visibleLabelMin_"+lt._id]=js,ds["_visibleLabelMax_"+lt._id]=xs)}}}},lt._hideCounterAxisInsideTickLabels=function(io){var Gn=lt._id.charAt(0)==="x",eo=[];for(var ns in Cr._plots){var gs=Cr._plots[ns];lt._id!==gs.xaxis._id&&lt._id!==gs.yaxis._id||eo.push(Gn?gs.yaxis:gs.xaxis)}eo.forEach(function(Ls,Xo){Ls&&pi(Ls)&&(io||[O,U,P,B,X]).forEach(function(Gi){var Pn=Gi.K==="tick"&&Gi.L==="text"&&lt.ticklabelmode==="period",js=Cr._plots[lt._mainSubplot],xs;if(Gi.K===O.K){var Hn=Rr?js.zerolinelayerAbove:js.zerolinelayer;xs=Hn.selectAll("."+lt._id+"zl")}else Gi.K===U.K?xs=js.minorGridlayer.selectAll("."+lt._id):Gi.K===P.K?xs=js.gridlayer.selectAll("."+lt._id):xs=js[lt._id.charAt(0)+"axislayer"];xs.each(function(){var Os=d.select(this);Gi.L&&(Os=Os.selectAll(Gi.L)),Os.each(function(ds){var Xs=lt.l2p(Pn?Oa(ds):ds.x)+lt._offset,il=d.select(this);Xs<lt["_visibleLabelMax_"+Ls._id]&&Xs>lt["_visibleLabelMin_"+Ls._id]?il.style("display","none"):Gi.K==="tick"&&!Xo&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Or,vr+1?vr:Xt);function ma(){return ba.length&&Promise.all(ba)}var la=null;function _a(){if(Pa(Or,Xt),Hr.length&&lt.autotickangles&&(lt.type!=="log"||String(lt.dtick).charAt(0)!=="D")){la=lt.autotickangles[0];var io=0,Gn=[],eo,ns=1;Or.each(function(us){io=Math.max(io,us.fontSize);var Ss=lt.l2p(us.x),Nl=Yt(this),su=n.bBox(Nl.node());ns=Math.max(ns,r.lineCount(Nl)),Gn.push({top:0,bottom:10,height:10,left:Ss-su.width/2,right:Ss+su.width/2+2,width:su.width+2})});var gs=(lt.tickson==="boundaries"||lt.showdividers)&&!Br.secondary,Ls=Hr.length,Xo=Math.abs((Hr[Ls-1].x-Hr[0].x)*lt._m)/(Ls-1),Gi=gs?Xo/2:Xo,Pn=gs?lt.ticklen:io*1.25*ns,js=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),xs=Gi/js,Hn=lt.autotickangles.map(function(us){return us*Math.PI/180}),Os=Hn.find(function(us){return Math.abs(Math.cos(us))<=xs});Os===void 0&&(Os=Hn.reduce(function(us,Ss){return Math.abs(Math.cos(us))<Math.abs(Math.cos(Ss))?us:Ss},Hn[0]));var ds=Os*(180/Math.PI);if(gs){var Xs=2;for(lt.ticks&&(Xs+=lt.tickwidth/2),eo=0;eo<Gn.length;eo++){var il=Hr[eo].xbnd,_n=Gn[eo];if(il[0]!==null&&_n.left-lt.l2p(il[0])<Xs||il[1]!==null&&lt.l2p(il[1])-_n.right<Xs){la=ds;break}}}else{var Lo=lt.ticklabelposition||"",bo=lt.tickson||"",Rs=function(us){return Lo.indexOf(us)!==-1},pu=Rs("top"),uo=Rs("left"),Gs=Rs("right"),vl=Rs("bottom"),As=bo!=="boundaries"&&(vl||uo||pu||Gs),qs=As?(lt.tickwidth||0)+2*ee:0;for(eo=0;eo<Gn.length-1;eo++)if(e.bBoxIntersect(Gn[eo],Gn[eo+1],qs)){la=ds;break}}la&&Pa(Or,la)}}lt._selections&&(lt._selections[Ur]=Or);var Ai=[ma];lt.automargin&&Cr._redrawFromAutoMarginCount&&vr===90?(la=vr,Ai.push(function(){Pa(Or,vr)})):Ai.push(_a),lt._tickAngles&&Ai.push(function(){lt._tickAngles[Ur]=la===null?x(Xt)?Xt:0:la});var ki=function(){var io=0,Gn=0;return Or.each(function(eo,ns){var gs=Yt(this),Ls=gs.select(".text-math-group");if(Ls.empty()){var Xo;lt._vals[ns]&&(Xo=lt._vals[ns].bb||n.bBox(gs.node()),lt._vals[ns].bb=Xo),io=Math.max(io,Xo.width),Gn=Math.max(Gn,Xo.height)}}),{labelsMaxW:io,labelsMaxH:Gn}},Ki=lt._anchorAxis;if(Ki&&(Ki.autorange||Ki.insiderange)&&pi(lt)&&!Q(Cr,lt._id)&&(Cr._insideTickLabelsUpdaterange||(Cr._insideTickLabelsUpdaterange={}),Ki.autorange&&(Cr._insideTickLabelsUpdaterange[Ki._name+".autorange"]=Ki.autorange,Ai.push(ki)),Ki.insiderange)){var yn=ki(),Ln=lt._id.charAt(0)==="y"?yn.labelsMaxW:yn.labelsMaxH;Ln+=2*ee,lt.ticklabelposition==="inside"&&(Ln+=lt.ticklen||0);var kn=lt.side==="right"||lt.side==="top"?1:-1,Bn=kn===1?1:0,ao=kn===1?0:1,xo=[];xo[ao]=Ki.range[ao];var Co=Ki.range,Fs=Ki.r2p(Co[Bn]),Mn=Ki.r2p(Co[ao]),Ao=Cr._insideTickLabelsUpdaterange[Ki._name+".range"];if(Ao){var On=Ki.r2p(Ao[Bn]),ts=Ki.r2p(Ao[ao]),is=kn*(lt._id.charAt(0)==="y"?1:-1);is*Fs<is*On&&(Fs=On,xo[Bn]=Co[Bn]=Ao[Bn]),is*Mn>is*ts&&(Mn=ts,xo[ao]=Co[ao]=Ao[ao])}var _s=Math.abs(Mn-Fs);_s-Ln>0?(_s-=Ln,Ln*=1+Ln/_s):Ln=0,lt._id.charAt(0)!=="y"&&(Ln=-Ln),xo[Bn]=Ki.p2r(Ki.r2p(Co[Bn])+kn*Ln),Ki.autorange==="min"||Ki.autorange==="max reversed"?(xo[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(xo[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=xo}var Oo=e.syncOrAsync(Ai);return Oo&&Oo.then&&xt._promises.push(Oo),Oo};function Wa(xt,lt,Br){var Cr=lt._id+"divider",xr=Br.vals,Rr=Br.layer.selectAll("path."+Cr).data(xr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,lt.dividercolor).style("stroke-width",n.crispRound(xt,lt.dividerwidth,1)+"px"),Rr.attr("transform",Br.transFn).attr("d",Br.path)}q.getPxPosition=function(xt,lt){var Br=xt._fullLayout._size,Cr=lt._id.charAt(0),xr=lt.side,Rr;if(lt.anchor!=="free"?Rr=lt._anchorAxis:Cr==="x"?Rr={_offset:Br.t+(1-(lt.position||0))*Br.h,_length:0}:Cr==="y"&&(Rr={_offset:Br.l+(lt.position||0)*Br.w+lt._shift,_length:0}),xr==="top"||xr==="left")return Rr._offset;if(xr==="bottom"||xr==="right")return Rr._offset+Rr._length};function Ca(xt){var lt=xt.title.font.size,Br=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?lt*(de+Br*G):Br?lt*(Br+1)*G:lt}function hi(xt,lt){var Br=xt._fullLayout,Cr=lt._id,xr=Cr.charAt(0),Rr=lt.title.font.size,Ur,Hr=(lt.title.text.match(r.BR_TAG_ALL)||[]).length;if(lt.title.hasOwnProperty("standoff"))lt.side==="bottom"||lt.side==="right"?Ur=lt._depth+lt.title.standoff+Rr*de:(lt.side==="top"||lt.side==="left")&&(Ur=lt._depth+lt.title.standoff+Rr*(ce+Hr*G));else{var gt=pi(lt);if(lt.type==="multicategory")Ur=lt._depth;else{var Xt=1.5*Rr;gt&&(Xt=.5*Rr,lt.ticks==="outside"&&(Xt+=lt.ticklen)),Ur=10+Xt+(lt.linewidth?lt.linewidth-1:0)}gt||(xr==="x"?Ur+=lt.side==="top"?Rr*(lt.showticklabels?1:0):Rr*(lt.showticklabels?1.5:.5):Ur+=lt.side==="right"?Rr*(lt.showticklabels?1:.5):Rr*(lt.showticklabels?.5:0))}var vr=q.getPxPosition(xt,lt),Or,ba,Pa;xr==="x"?(ba=lt._offset+lt._length/2,Pa=lt.side==="top"?vr-Ur:vr+Ur):(Pa=lt._offset+lt._length/2,ba=lt.side==="right"?vr+Ur:vr-Ur,Or={rotate:"-90",offset:0});var ma;if(lt.type!=="multicategory"){var la=lt._selections[lt._id+"tick"];if(ma={selection:la,side:lt.side},la&&la.node()&&la.node().parentNode){var _a=n.getTranslate(la.node().parentNode);ma.offsetLeft=_a.x,ma.offsetTop=_a.y}lt.title.hasOwnProperty("standoff")&&(ma.pad=0)}return lt._titleStandoff=Ur,o.draw(xt,Cr+"title",{propContainer:lt,propName:lt._name+".title.text",placeholder:Br._dfltTitle[xr],avoid:ma,transform:Or,attributes:{x:ba,y:Pa,"text-anchor":"middle"}})}q.shouldShowZeroLine=function(xt,lt,Br){var Cr=e.simpleMap(lt.range,lt.r2l);return Cr[0]*Cr[1]<=0&&lt.zeroline&&(lt.type==="linear"||lt.type==="-")&&!(lt.rangebreaks&&lt.maskBreaks(0)===N)&&(wi(lt,0)||!Kt(xt,lt,Br,Cr)||Dt(xt,lt))},q.clipEnds=function(xt,lt){return lt.filter(function(Br){return wi(xt,Br.x)})};function wi(xt,lt){var Br=xt.l2p(lt);return Br>1&&Br<xt._length-1}function Kt(xt,lt,Br,Cr){var xr=Br._mainAxis;if(!xr)return;var Rr=xt._fullLayout,Ur=lt._id.charAt(0),Hr=q.counterLetter(lt._id),gt=lt._offset+(Math.abs(Cr[0])<Math.abs(Cr[1])==(Ur==="x")?0:lt._length);function Xt(ma){if(!ma.showline||!ma.linewidth)return!1;var la=Math.max((ma.linewidth+lt.zerolinewidth)/2,1);function _a(Ki){return typeof Ki=="number"&&Math.abs(Ki-gt)<la}if(_a(ma._mainLinePosition)||_a(ma._mainMirrorPosition))return!0;var Ai=ma._linepositions||{};for(var ki in Ai)if(_a(Ai[ki][0])||_a(Ai[ki][1]))return!0}var vr=Rr._plots[Br._mainSubplot];if(!(vr.mainplotinfo||vr).overlays.length)return Xt(Br,gt);for(var Or=q.list(xt,Hr),ba=0;ba<Or.length;ba++){var Pa=Or[ba];if(Pa._mainAxis===xr&&Xt(Pa,gt))return!0}}function Dt(xt,lt){for(var Br=xt._fullData,Cr=lt._mainSubplot,xr=lt._id.charAt(0),Rr=0;Rr<Br.length;Rr++){var Ur=Br[Rr];if(Ur.visible===!0&&Ur.xaxis+Ur.yaxis===Cr&&(E.traceIs(Ur,"bar-like")&&Ur.orientation==={x:"h",y:"v"}[xr]||Ur.fill&&Ur.fill.charAt(Ur.fill.length-1)===xr))return!0}return!1}function Yt(xt){var lt=d.select(xt),Br=lt.select(".text-math-group");return Br.empty()?lt.select("text"):Br}q.allowAutoMargin=function(xt){for(var lt=q.list(xt,"",!0),Br=0;Br<lt.length;Br++){var Cr=lt[Br];Cr.automargin&&(S.allowAutoMargin(xt,Jt(Cr)),Cr.mirror&&S.allowAutoMargin(xt,Fr(Cr))),E.getComponentMethod("rangeslider","isVisible")(Cr)&&S.allowAutoMargin(xt,ta(Cr))}};function Jt(xt){return xt._id+".automargin"}function Fr(xt){return Jt(xt)+".mirror"}function ta(xt){return xt._id+".rangeslider"}q.swap=function(xt,lt){for(var Br=ra(xt,lt),Cr=0;Cr<Br.length;Cr++)Ba(xt,Br[Cr].x,Br[Cr].y)};function ra(xt,lt){var Br=[],Cr,xr;for(Cr=0;Cr<lt.length;Cr++){var Rr=[],Ur=xt._fullData[lt[Cr]].xaxis,Hr=xt._fullData[lt[Cr]].yaxis;if(!(!Ur||!Hr)){for(xr=0;xr<Br.length;xr++)(Br[xr].x.indexOf(Ur)!==-1||Br[xr].y.indexOf(Hr)!==-1)&&Rr.push(xr);if(!Rr.length){Br.push({x:[Ur],y:[Hr]});continue}var gt=Br[Rr[0]],Xt;if(Rr.length>1)for(xr=1;xr<Rr.length;xr++)Xt=Br[Rr[xr]],ca(gt.x,Xt.x),ca(gt.y,Xt.y);ca(gt.x,[Ur]),ca(gt.y,[Hr])}}return Br}function ca(xt,lt){for(var Br=0;Br<lt.length;Br++)xt.indexOf(lt[Br])===-1&&xt.push(lt[Br])}function Ba(xt,lt,Br){var Cr=[],xr=[],Rr=xt.layout,Ur,Hr;for(Ur=0;Ur<lt.length;Ur++)Cr.push(q.getFromId(xt,lt[Ur]));for(Ur=0;Ur<Br.length;Ur++)xr.push(q.getFromId(xt,Br[Ur]));var gt=Object.keys(i),Xt=["anchor","domain","overlaying","position","side","tickangle","editType"],vr=["linear","log"];for(Ur=0;Ur<gt.length;Ur++){var Or=gt[Ur],ba=Cr[0][Or],Pa=xr[0][Or],ma=!0,la=!1,_a=!1;if(!(Or.charAt(0)==="_"||typeof ba=="function"||Xt.indexOf(Or)!==-1)){for(Hr=1;Hr<Cr.length&&ma;Hr++){var Ai=Cr[Hr][Or];Or==="type"&&vr.indexOf(ba)!==-1&&vr.indexOf(Ai)!==-1&&ba!==Ai?la=!0:Ai!==ba&&(ma=!1)}for(Hr=1;Hr<xr.length&&ma;Hr++){var ki=xr[Hr][Or];Or==="type"&&vr.indexOf(Pa)!==-1&&vr.indexOf(ki)!==-1&&Pa!==ki?_a=!0:xr[Hr][Or]!==Pa&&(ma=!1)}ma&&(la&&(Rr[Cr[0]._name].type="linear"),_a&&(Rr[xr[0]._name].type="linear"),$a(Rr,Or,Cr,xr,xt._fullLayout._dfltTitle))}}for(Ur=0;Ur<xt._fullLayout.annotations.length;Ur++){var Ki=xt._fullLayout.annotations[Ur];lt.indexOf(Ki.xref)!==-1&&Br.indexOf(Ki.yref)!==-1&&e.swapAttrs(Rr.annotations[Ur],["?"])}}function $a(xt,lt,Br,Cr,xr){var Rr=e.nestedProperty,Ur=Rr(xt[Br[0]._name],lt).get(),Hr=Rr(xt[Cr[0]._name],lt).get(),gt;for(lt==="title"&&(Ur&&Ur.text===xr.x&&(Ur.text=xr.y),Hr&&Hr.text===xr.y&&(Hr.text=xr.x)),gt=0;gt<Br.length;gt++)Rr(xt,Br[gt]._name+"."+lt).set(Hr);for(gt=0;gt<Cr.length;gt++)Rr(xt,Cr[gt]._name+"."+lt).set(Ur)}function Za(xt){return xt._id==="angularaxis"}function ri(xt,lt){for(var Br=lt._rangebreaks.length,Cr=0;Cr<Br;Cr++){var xr=lt._rangebreaks[Cr];if(xt>=xr.min&&xt<xr.max)return xr.max}return xt}function pi(xt){return(xt.ticklabelposition||"").indexOf("inside")!==-1}function Ra(xt,lt){pi(xt._anchorAxis||{})&&xt._hideCounterAxisInsideTickLabels&&xt._hideCounterAxisInsideTickLabels(lt)}function an(xt,lt,Br,Cr){var xr=xt.anchor!=="free"&&(xt.overlaying===void 0||xt.overlaying===!1)?xt._id:xt.overlaying,Rr;Cr?Rr=xt.side==="right"?lt:-lt:Rr=lt,xr in Br||(Br[xr]={}),xt.side in Br[xr]||(Br[xr][xt.side]=0),Br[xr][xt.side]+=Rr}function tn(xt,lt){return xt.autoshift?lt[xt.overlaying][xt.side]:xt.shift||0}function fn(xt,lt){return/%f/.test(lt)?xt>=z:/%L/.test(lt)?xt>=L:/%[SX]/.test(lt)?xt>=R:/%M/.test(lt)?xt>=m:/%[HI]/.test(lt)?xt>=y:/%p/.test(lt)?xt>=u:/%[Aadejuwx]/.test(lt)?xt>=p:/%[UVW]/.test(lt)?xt>=b:/%[Bbm]/.test(lt)?xt>=g:/%[q]/.test(lt)?xt>=w:/%[Yy]/.test(lt)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E){var e,t;if(E){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=E[r?1:0],t=E[r?0:1]}var o=x("autorangeoptions.minallowed",t===null?e:void 0),a=x("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&x("autorangeoptions.clipmin"),a===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,V){"use strict";var d=f5();V.exports=function(S,E,e,t){var r=E._template||{},o=E.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var n;!t.noInsiderange&&o!=="log"&&(n=e("insiderange"),n&&(n[0]===null||n[1]===null)&&(E.insiderange=!1,n=void 0),n&&(a=e("range",n)))}var i=E.getAutorangeDflt(a,t),s=e("autorange",i),h;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(s==="reversed"||s===!0)||a[0]!==null&&(s==="min"||s==="max reversed")||a[1]!==null&&(s==="max"||s==="min reversed"))&&(a=void 0,delete E.range,E.autorange=!0,h=!0),h||(i=E.getAutorangeDflt(a,t),s=e("autorange",i)),s&&(d(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),E.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,V){var d={left:0,top:0};V.exports=x;function x(E,e,t){e=e||E.currentTarget||E.srcElement,Array.isArray(t)||(t=[0,0]);var r=E.clientX||0,o=E.clientY||0,a=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(E){return E===window||E===document||E===document.body?d:E.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,V){"use strict";var d=a5();function x(){var S=!1;try{var E=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,E),window.removeEventListener("test",null,E)}catch{S=!1}return S}V.exports=d&&x()}}),cz=He({"src/components/dragelement/align.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){var r=(x-E)/(e-E),o=r+S/(e-E),a=(r+o)/2;return t==="left"||t==="bottom"?r:t==="center"||t==="middle"?a:t==="right"||t==="top"?o:r<2/3-a?r:o>4/3-a?o:a}}}),fz=He({"src/components/dragelement/cursor.js"(Z,V){"use strict";var d=sa(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(E,e,t,r){return t==="left"?E=0:t==="center"?E=1:t==="right"?E=2:E=d.constrain(Math.floor(E*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=d.constrain(Math.floor(e*3),0,2),x[e][E]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,V){"use strict";var d=Qy(),x=y2(),S=T_().getGraphDiv,E=w_(),e=V.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&x.clear(t._fullLayout._uid+E.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,n=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&d.triggerHandler(r,"plotly_beforehover",o)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,o.target&&n&&r.emit("plotly_unhover",{event:o,points:n}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,V){"use strict";var d=uz(),x=i5(),S=b2(),E=sa().removeElement,e=lh(),t=V.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(i){var s=i.gd,h=1,f=s._context.doubleClickDelay,v=i.element,c,T,l,_,w,A,M,g;s._mouseDownTime||(s._mouseDownTime=0),v.style.pointerEvents="all",v.onmousedown=u,S?(v._ontouchstart&&v.removeEventListener("touchstart",v._ontouchstart),v._ontouchstart=u,v.addEventListener("touchstart",u,{passive:!1})):v.ontouchstart=u;function b(R,L,z){return Math.abs(R)<z&&(R=0),Math.abs(L)<z&&(L=0),[R,L]}var p=i.clampFn||b;function u(R){s._dragged=!1,s._dragging=!0;var L=a(R);c=L[0],T=L[1],M=R.target,A=R,g=R.buttons===2||R.ctrlKey,typeof R.clientX>"u"&&typeof R.clientY>"u"&&(R.clientX=c,R.clientY=T),l=new Date().getTime(),l-s._mouseDownTime<f?h+=1:(h=1,s._mouseDownTime=l),i.prepFn&&i.prepFn(R,c,T),x&&!g?(w=o(),w.style.cursor=window.getComputedStyle(v).cursor):x||(w=document,_=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(v).cursor),document.addEventListener("mouseup",m),document.addEventListener("touchend",m),i.dragmode!==!1&&(R.preventDefault(),document.addEventListener("mousemove",y),document.addEventListener("touchmove",y,{passive:!1}))}function y(R){R.preventDefault();var L=a(R),z=i.minDrag||e.MINDRAG,F=p(L[0]-c,L[1]-T,z),N=F[0],O=F[1];(N||O)&&(s._dragged=!0,t.unhover(s,R)),s._dragged&&i.moveFn&&!g&&(s._dragdata={element:v,dx:N,dy:O},i.moveFn(N,O))}function m(R){if(delete s._dragdata,i.dragmode!==!1&&(R.preventDefault(),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m),x?E(w):_&&(w.documentElement.style.cursor=_,_=null),!s._dragging){s._dragged=!1;return}if(s._dragging=!1,new Date().getTime()-s._mouseDownTime>f&&(h=Math.max(h-1,1)),s._dragged)i.doneFn&&i.doneFn();else{var L;A.target===M?L=A:(L={target:M,srcElement:M,toElement:M},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!L[z]&&typeof F!="function"&&(L[z]=F)})),i.clickFn&&i.clickFn(h,L),g||M.dispatchEvent(new MouseEvent("click",R))}s._dragging=!1,s._dragged=!1}};function o(){var n=document.createElement("div");n.className="dragcover";var i=n.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(n),n}t.coverSlip=o;function a(n){return d(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,V){"use strict";V.exports=function(x,S){(x.attr("class")||"").split(" ").forEach(function(E){E.indexOf("cursor-")===0&&x.classed(E,!1)}),S&&x.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,V){"use strict";var d=Kd(),x="data-savedcursor",S="!!";V.exports=function(e,t){var r=e.attr(x);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;a<o.length;a++){var n=o[a];n.indexOf("cursor-")===0&&e.attr(x,n.slice(7)).classed(n,!1)}e.attr(x)||e.attr(x,S)}d(e,t)}else r&&(e.attr(x,null),r===S?d(e):d(e,r))}}}),p5=He({"src/components/legend/attributes.js"(Z,V){"use strict";var d=tc(),x=sh();V.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:d({editType:"legend"}),grouptitlefont:d({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:d({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),E_=He({"src/components/legend/helpers.js"(Z){"use strict";Z.isGrouped=function(d){return(d.traceorder||"").indexOf("grouped")!==-1},Z.isVertical=function(d){return d.orientation!=="h"},Z.isReversed=function(d){return(d.traceorder||"").indexOf("reversed")!==-1},Z.getId=function(d){return d._id||"legend"}}}),d5=He({"src/components/legend/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=zl(),E=ru(),e=p5(),t=$y(),r=E_();function o(a,n,i,s,h){var f=n[a]||{},v=S.newContainer(i,a);function c(Y,ee){return x.coerce(f,v,e,Y,ee)}var T=x.coerceFont(c,"font",i.font);c("bgcolor",i.paper_bgcolor),c("bordercolor");var l=c("visible");if(!l)return;var _,w=function(Y,ee){var q=_._input,se=_;return x.coerce(q,se,E,Y,ee)},A=i.font||{},M=x.coerceFont(c,"grouptitlefont",A,{overrideDflt:{size:Math.round(A.size*1.1)}}),g=0,b=!1,p="normal",u=(i.shapes||[]).filter(function(Y){return Y.showlegend});function y(Y){return d.traceIs(Y,"pie-like")&&Y._length!=null&&(Array.isArray(Y.legend)||Array.isArray(Y.showlegend))}s.filter(y).forEach(function(Y){Y.visible&&g++;for(var ee=0;ee<Y._length;ee++){var q=(Array.isArray(Y.legend)?Y.legend[ee]:Y.legend)||"legend";q===a&&((Array.isArray(Y.showlegend)?Y.showlegend[ee]:Y.showlegend)||Y._dfltShowLegend)&&(b=!0,g++)}if(a==="legend"&&Y._length>Y.legend.length)for(var se=Y.legend.length;se<Y._length;se++)b=!0,g++});for(var m=s.concat(u).filter(function(Y){return!y(_)&&a===(Y.legend||"legend")}),R=0;R<m.length;R++)if(_=m[R],!!_.visible){var L=_._isShape;(_.showlegend||_._dfltShowLegend&&!(_._module&&_._module.attributes&&_._module.attributes.showlegend&&_._module.attributes.showlegend.dflt===!1))&&(g++,_.showlegend&&(b=!0,(!L&&d.traceIs(_,"pie-like")||_._input.showlegend===!0)&&g++),x.coerceFont(w,"legendgrouptitle.font",M)),(!L&&d.traceIs(_,"bar")&&i.barmode==="stack"||["tonextx","tonexty"].indexOf(_.fill)!==-1)&&(p=r.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),_.legendgroup!==void 0&&_.legendgroup!==""&&(p=r.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var z=x.coerce(n,i,t,"showlegend",i.showlegend||b&&g>(a==="legend"?1:0));if(z===!1&&(i[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",i.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),P=F==="h",U=N==="paper",B=O==="paper",X,$,le,ce="left";P?(X=0,d.getComponentMethod("rangeslider","isVisible")(n.xaxis)?U?($=1.1,le="bottom"):($=1,le="top"):U?($=-.1,le="top"):($=0,le="bottom")):($=1,le="auto",B?X=1.02:(X=1,ce="right")),x.coerce(f,v,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:X}},"x"),x.coerce(f,v,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",p),r.isGrouped(i[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",le),c("maxheight"),c("valign"),x.noneOrAll(f,v,["x","y"]);var de=c("title.text");if(de){c("title.side",P?"left":"top");var G=x.extendFlat({},T,{size:x.bigFont(T.size)});x.coerceFont(c,"title.font",G);let Y=h>1;c("titleclick",Y?"toggle":!1),c("titledoubleclick",Y?"toggleothers":!1)}}}V.exports=function(n,i,s){var h,f=s.slice(),v=i.shapes;if(v)for(h=0;h<v.length;h++){var c=v[h];if(c.showlegend){var T={_input:c._input,visible:c.visible,showlegend:c.showlegend,legend:c.legend};f.push(T)}}var l=["legend"];for(h=0;h<f.length;h++)Array.isArray(f[h].legend)?l=l.concat(f[h].legend):x.pushUnique(l,f[h].legend);for(i._legends=[],h=0;h<l.length;h++){var _=l[h];o(_,n,i,f,l.length),i[_]&&(i[_]._id=_),i._legends.push(_)}}}}),v5=He({"src/components/legend/handle_click.js"(Z){"use strict";var V=lo(),d=sa(),x=d.pushUnique,S=E_(),E=!0;Z.handleItemClick=function(t,r,o,a){var n=r._fullLayout;if(r._dragged||r._editing)return;var i=t.data()[0][0];if(i.groupTitle&&i.noClick)return;var s=o.groupclick;a==="toggle"&&o.itemdoubleclick==="toggleothers"&&E&&r.data&&r._context.showTips&&(d.notifier(d._(r,"Double-click on legend to isolate one trace"),"long",r),E=!1);var h=s==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],v=r._fullData,c=(n.shapes||[]).filter(function(tt){return tt.showlegend}),T=v.concat(c),l=i.trace;l._isShape&&(l=l._fullInput);var _=l.legendgroup,w,A,M,g,b,p,u={},y=[],m=[],R=[];function L(tt,qe){var he=y.indexOf(tt),ue=u.visible;return ue||(ue=u.visible=[]),y.indexOf(tt)===-1&&(y.push(tt),he=y.length-1),ue[he]=qe,he}var z=(n.shapes||[]).map(function(tt){return tt._input}),F=!1;function N(tt,qe){z[tt].visible=qe,F=!0}function O(tt,qe){if(!(i.groupTitle&&!h)){var he=tt._fullInput||tt,ue=he._isShape,ne=he.index;ne===void 0&&(ne=he._index);var Ce=he.visible===!1?!1:qe;ue?N(ne,Ce):L(ne,Ce)}}var P=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&V.traceIs(l,"pie-like")){var X=i.label,$=f.indexOf(X);if(a==="toggle")$===-1?f.push(X):f.splice($,1);else if(a==="toggleothers"){var le=$!==-1,ce=[];for(w=0;w<r.calcdata.length;w++){var de=r.calcdata[w];for(A=0;A<de.length;A++){var G=de[A],Y=G.label;P===de[0].trace.legend&&X!==Y&&(f.indexOf(Y)===-1&&(le=!0),x(f,Y),ce.push(Y))}}if(!le)for(var ee=0;ee<ce.length;ee++){var q=f.indexOf(ce[ee]);q!==-1&&f.splice(q,1)}}V.call("_guiRelayout",r,"hiddenlabels",f)}else{var se=_&&_.length,ae=[],j;if(se)for(w=0;w<T.length;w++)j=T[w],j.visible&&j.legendgroup===_&&ae.push(w);if(a==="toggle"){var Q;switch(l.visible){case!0:Q="legendonly";break;case!1:Q=!1;break;case"legendonly":Q=!0;break}if(se)if(h)for(w=0;w<T.length;w++){var re=T[w];re.visible!==!1&&re.legendgroup===_&&O(re,Q)}else O(l,Q);else O(l,Q)}else if(a==="toggleothers"){var pe,we,Se,Ie,Re,We=!0;for(w=0;w<T.length;w++)if(Re=T[w],pe=Re===l,Se=Re.showlegend!==!0,!(pe||Se)&&(we=se&&Re.legendgroup===_,!we&&Re.legend===P&&Re.visible===!0&&!V.traceIs(Re,"notLegendIsolatable"))){We=!1;break}for(w=0;w<T.length;w++)if(Re=T[w],!(Re.visible===!1||Re.legend!==P)&&!V.traceIs(Re,"notLegendIsolatable"))switch(l.visible){case"legendonly":O(Re,!0);break;case!0:Ie=We?!0:"legendonly",pe=Re===l,Se=Re.showlegend!==!0&&!Re.legendgroup,we=pe||se&&Re.legendgroup===_,O(Re,we||Se?!0:Ie);break}}for(w=0;w<m.length;w++)if(M=m[w],!!M){var at=M.constructUpdate(),nt=Object.keys(at);for(A=0;A<nt.length;A++)g=nt[A],p=u[g]=u[g]||[],p[R[w]]=at[g]}for(b=Object.keys(u),w=0;w<b.length;w++)for(g=b[w],A=0;A<y.length;A++)u[g].hasOwnProperty(A)||(u[g][A]=void 0);F?V.call("_guiUpdate",r,u,{shapes:z},y):V.call("_guiRestyle",r,u,y)}},Z.handleTitleClick=function(t,r,o){let a=t._fullLayout,n=t._fullData,i=S.getId(r),s=(a.shapes||[]).filter(function(M){return M.showlegend}),h=n.concat(s);function f(M){return(M.legend||"legend")===i}var v,c;if(o==="toggle")v=!h.some(function(g){return f(g)&&g.visible===!0}),c=!1;else{let M=h.some(function(g){return!f(g)&&g.visible===!0&&g.showlegend!==!1});v=!0,c=!M}let T={visible:[]},l=[],_=(a.shapes||[]).map(function(M){return M._input});for(var w=!1,A=0;A<h.length;A++){let M=h[A],g=f(M);if(!g){let u=M.showlegend!==!0&&!M.legendgroup;if(o==="toggle"||u)continue}let p=(g?v:c)?!0:"legendonly";M.visible!==!1&&M.visible!==p&&(M._isShape?(_[M._index].visible=p,w=!0):(l.push(M.index),T.visible.push(p)))}w?V.call("_guiUpdate",t,T,{shapes:_},l):l.length&&V.call("_guiRestyle",t,T,l)}}}),m5=He({"src/components/legend/constants.js"(Z,V){"use strict";V.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),dz=He({"src/components/legend/get_legend_data.js"(Z,V){"use strict";var d=lo(),x=E_();V.exports=function(E,e,t){var r=e._inHover,o=x.isGrouped(e),a=x.isReversed(e),n={},i=[],s=!1,h={},f=0,v=0,c,T;function l(X,$,le){if(e.visible!==!1&&!(t&&X!==e._id))if($===""||!x.isGrouped(e)){var ce="~~i"+f;i.push(ce),n[ce]=[le],f++}else i.indexOf($)===-1?(i.push($),s=!0,n[$]=[le]):n[$].push(le)}for(c=0;c<E.length;c++){var _=E[c],w=_[0],A=w.trace,M=A.legend,g=A.legendgroup;if(!(!r&&(!A.visible||!A.showlegend)))if(d.traceIs(A,"pie-like")){var b=Array.isArray(A.legend),p=Array.isArray(A.showlegend);for(h[g]||(h[g]={}),T=0;T<_.length;T++)if(!(p&&A.showlegend[_[T].i]===!1)){b&&(M=A.legend[_[T].i]||"legend");var u=_[T].label;h[g][u]||(l(M,g,{label:u,color:_[T].color,i:_[T].i,trace:A,pts:_[T].pts}),h[g][u]=!0,v=Math.max(v,(u||"").length))}}else l(M,g,w),v=Math.max(v,(A.name||"").length)}if(!i.length)return[];var y=!s||!o,m=[];for(c=0;c<i.length;c++){var R=n[i[c]];y?m.push(R[0]):m.push(R)}for(y&&(m=[m]),c=0;c<m.length;c++){var L=1/0;for(T=0;T<m[c].length;T++){var z=m[c][T].trace.legendrank;L>z&&(L=z)}m[c][0]._groupMinRank=L,m[c][0]._preGroupSort=c}var F=function(X,$){return X[0]._groupMinRank-$[0]._groupMinRank||X[0]._preGroupSort-$[0]._preGroupSort},N=function(X,$){return X.trace.legendrank-$.trace.legendrank||X._preSort-$._preSort};for(m.forEach(function(X,$){X[0]._preGroupSort=$}),m.sort(F),c=0;c<m.length;c++){m[c].forEach(function(X,$){X._preSort=$}),m[c].sort(N);var O=m[c][0].trace,P=null;for(T=0;T<m[c].length;T++){var U=m[c][T].trace.legendgrouptitle;if(U&&U.text){P=U,r&&(U.font=e._groupTitleFont);break}}if(a&&m[c].reverse(),P){var B=!1;for(T=0;T<m[c].length;T++)if(d.traceIs(m[c][T].trace,"pie-like")){B=!0;break}m[c].unshift({i:-1,groupTitle:P,noClick:B,trace:{showlegend:O.showlegend,legendgroup:O.legendgroup,legend:O.legend,visible:e.groupclick==="toggleitem"?!0:O.visible}})}for(T=0;T<m[c].length;T++)m[c][T]=[m[c][T]]}return e._lgroupsLength=m.length,e._maxNameLength=v,m}}}),t0=He({"src/traces/pie/helpers.js"(Z){"use strict";var V=sa();function d(x){return x.indexOf("e")!==-1?x.replace(/[.]?0+e/,"e"):x.indexOf(".")!==-1?x.replace(/[.]?0+$/,""):x}Z.formatPiePercent=function(S,E){var e=d((S*100).toPrecision(3));return V.numSeparate(e,E)+"%"},Z.formatPieValue=function(S,E){var e=d(S.toPrecision(10));return V.numSeparate(e,E)},Z.getFirstFilled=function(S,E){if(V.isArrayOrTypedArray(S))for(var e=0;e<E.length;e++){var t=S[E[e]];if(t||t===0||t==="")return t}},Z.castOption=function(S,E){if(V.isArrayOrTypedArray(S))return Z.getFirstFilled(S,E);if(S)return S},Z.getRotationAngle=function(x){return(x==="auto"?0:x)*Math.PI/180}}}),vz=He({"src/traces/pie/fill_one.js"(Z,V){"use strict";var d=es(),x=Jn();V.exports=function(E,e,t,r){var o=t.marker.pattern;o&&o.shape?d.pointStyle(E,t,r,e):x.fill(E,e.color)}}}),i1=He({"src/traces/pie/style_one.js"(Z,V){"use strict";var d=Jn(),x=t0().castOption,S=vz();V.exports=function(e,t,r,o){var a=r.marker.line,n=x(a.color,t.pts)||d.defaultLine,i=x(a.width,t.pts)||0;e.call(S,t,r,o).style("stroke-width",i).call(d.stroke,n)}}}),g5=He({"src/components/legend/style.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=sa(),E=S.strTranslate,e=es(),t=Jn(),r=wp().extractOpts,o=Fu(),a=i1(),n=t0().castOption,i=m5(),s=12,h=5,f=2,v=10,c=5;V.exports=function(A,M,g){var b=M._fullLayout;g||(g=b.legend);var p=g.itemsizing==="constant",u=g.itemwidth,y=(u+i.itemGap*2)/2,m=E(y,0),R=function(G,Y,ee,q){var se;if(G+1)se=G;else if(Y&&Y.width>0)se=Y.width;else return 0;return p?q:Math.min(se,ee)};A.each(function(G){var Y=d.select(this),ee=S.ensureSingle(Y,"g","layers");ee.style("opacity",G[0].trace.opacity);var q=g.indentation,se=g.valign,ae=G[0].lineHeight,j=G[0].height;if(se==="middle"&&q===0||!ae||!j)ee.attr("transform",null);else{var Q={top:1,bottom:-1}[se],re=Q*(.5*(ae-j+3))||0,pe=g.indentation;ee.attr("transform",E(pe,re))}var we=ee.selectAll("g.legendfill").data([G]);we.enter().append("g").classed("legendfill",!0);var Se=ee.selectAll("g.legendlines").data([G]);Se.enter().append("g").classed("legendlines",!0);var Ie=ee.selectAll("g.legendsymbols").data([G]);Ie.enter().append("g").classed("legendsymbols",!0),Ie.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(le).each($).each(L).each(z).each(B).each(X);function L(G){var Y=l(G),ee=Y.showFill,q=Y.showLine,se=Y.showGradientLine,ae=Y.showGradientFill,j=Y.anyFill,Q=Y.anyLine,re=G[0],pe=re.trace,we,Se,Ie=r(pe),Re=Ie.colorscale,We=Ie.reversescale,at=function(Ce){if(Ce.size())if(ee)e.fillGroupStyle(Ce,M,!0);else{var Ye="legendfill-"+pe.uid;e.gradient(Ce,M,Ye,T(We),Re,"fill")}},nt=function(Ce){if(Ce.size()){var Ye="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,M,Ye,T(We),Re,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":Q?"M5,-2":"M5,-3",qe=d.select(this),he=qe.select(".legendfill").selectAll("path").data(ee||ae?[G]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),q||se){var ue=R(void 0,pe.line,v,h);Se=S.minExtend(pe,{line:{width:ue}}),we=[S.minExtend(re,{trace:Se})]}var ne=qe.select(".legendlines").selectAll("path").data(q||se?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(se?"l"+u+",0.0001":"h"+u)).call(q?e.lineGroupStyle:nt)}function z(G){var Y=l(G),ee=Y.anyFill,q=Y.anyLine,se=Y.showLine,ae=Y.showMarker,j=G[0],Q=j.trace,re=!ae&&!q&&!ee&&o.hasText(Q),pe,we;function Se(he,ue,ne,Ce){var Ye=S.nestedProperty(Q,he).get(),rt=S.isArrayOrTypedArray(Ye)&&ue?ue(Ye):Ye;if(p&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rt<ne[0])return ne[0];if(rt>ne[1])return ne[1]}return rt}function Ie(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||re||se){var Re={},We={};if(ae){Re.mc=Se("marker.color",Ie),Re.mx=Se("marker.symbol",Ie),Re.mo=Se("marker.opacity",S.mean,[.2,1]),Re.mlc=Se("marker.line.color",Ie),Re.mlw=Se("marker.line.width",S.mean,[0,5],f),Re.mld=Q._isShape?"solid":Se("marker.line.dash",Ie),We.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Re.ms=at,We.marker.size=at}se&&(We.line={width:Se("line.width",Ie,[0,10],h)}),re&&(Re.tx="Aa",Re.tp=Se("textposition",Ie),Re.ts=10,Re.tc=Se("textfont.color",Ie),Re.tf=Se("textfont.family",Ie),Re.tw=Se("textfont.weight",Ie),Re.ty=Se("textfont.style",Ie),Re.tv=Se("textfont.variant",Ie),Re.tC=Se("textfont.textcase",Ie),Re.tE=Se("textfont.lineposition",Ie),Re.tS=Se("textfont.shadow",Ie)),pe=[S.minExtend(j,Re)],we=S.minExtend(Q,We),we.selectedpoints=null,we.texttemplate=null}var nt=d.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),tt.exit().remove(),tt.call(e.pointStyle,we,M),ae&&(pe[0].mrc=3);var qe=nt.selectAll("g.pointtext").data(re?pe:[]);qe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),qe.exit().remove(),qe.selectAll("text").call(e.textPointStyle,we,M)}function F(G){var Y=G[0].trace,ee=Y.type==="waterfall";if(G[0]._distinct&&ee){var q=G[0].trace[G[0].dir].marker;return G[0].mc=q.color,G[0].mlw=q.line.width,G[0].mlc=q.line.color,P(G,this,"waterfall")}var se=[];Y.visible&&ee&&(se=G[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var ae=d.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(se);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var Q=d.select(this),re=Y[j[0]].marker,pe=R(void 0,re.line,c,f);Q.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,re.color),pe&&Q.call(t.stroke,re.line.color)})}function N(G){P(G,this)}function O(G){P(G,this,"funnel")}function P(G,Y,ee){var q=G[0].trace,se=q.marker||{},ae=se.line||{},j=se.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",Q=ee?q.visible&&q.type===ee:x.traceIs(q,"bar"),re=d.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(Q?[G]:[]);re.enter().append("path").classed("legend"+ee,!0).attr("d",j).attr("transform",m),re.exit().remove(),re.each(function(pe){var we=d.select(this),Se=pe[0],Ie=R(Se.mlw,se.line,c,f);we.style("stroke-width",Ie+"px");var Re=Se.mcc;if(!g._inHover&&"mc"in Se){var We=r(se),at=We.mid;at===void 0&&(at=(We.max+We.min)/2),Re=e.tryColorscale(se,"")(at)}var nt=Re||Se.mc||se.color,tt=se.pattern,qe=e.getPatternAttr,he=tt&&(qe(tt.shape,0,"")||qe(tt.path,0,""));if(he){var ue=qe(tt.bgcolor,0,null),ne=qe(tt.fgcolor,0,null),Ce=tt.fgopacity,Ye=_(tt.size,8,10),rt=_(tt.solidity,.5,1),Ke="legend-"+q.uid;we.call(e.pattern,"legend",M,Ke,he,Ye,rt,Re,tt.fillmode,ue,ne,Ce)}else we.call(t.fill,nt);Ie&&t.stroke(we,Se.mlc||ae.color)})}function U(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Y.visible&&x.traceIs(Y,"box-violin")?[G]:[]);ee.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),ee.exit().remove(),ee.each(function(){var q=d.select(this);if((Y.boxpoints==="all"||Y.points==="all")&&t.opacity(Y.fillcolor)===0&&t.opacity((Y.line||{}).color)===0){var se=S.minExtend(Y,{marker:{size:p?s:S.constrain(Y.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});ee.call(e.pointStyle,se,M)}else{var ae=R(void 0,Y.line,c,f);q.style("stroke-width",ae+"px").call(t.fill,Y.fillcolor),ae&&t.stroke(q,Y.line.color)}})}function B(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Y.visible&&Y.type==="candlestick"?[G,G]:[]);ee.enter().append("path").classed("legendcandle",!0).attr("d",function(q,se){return se?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,se){var ae=d.select(this),j=Y[se?"increasing":"decreasing"],Q=R(void 0,j.line,c,f);ae.style("stroke-width",Q+"px").call(t.fill,j.fillcolor),Q&&t.stroke(ae,j.line.color)})}function X(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Y.visible&&Y.type==="ohlc"?[G,G]:[]);ee.enter().append("path").classed("legendohlc",!0).attr("d",function(q,se){return se?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,se){var ae=d.select(this),j=Y[se?"increasing":"decreasing"],Q=R(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,Q),Q&&t.stroke(ae,j.line.color)})}function $(G){ce(G,this,"pie")}function le(G){ce(G,this,"funnelarea")}function ce(G,Y,ee){var q=G[0],se=q.trace,ae=ee?se.visible&&se.type===ee:x.traceIs(se,ee),j=d.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(ae?[G]:[]);if(j.enter().append("path").classed("legend"+ee,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),j.exit().remove(),j.size()){var Q=se.marker||{},re=R(n(Q.line.width,q.pts),Q.line,c,f),pe="pieLike",we=S.minExtend(se,{marker:{line:{width:re}}},pe),Se=S.minExtend(q,{trace:we},pe);a(j,Se,we,M)}}function de(G){var Y=G[0].trace,ee,q=[];if(Y.visible)switch(Y.type){case"histogram2d":case"heatmap":q=[["M-15,-2V4H15V-2Z"]],ee=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":q=[["M-6,-6V6H6V-6Z"]],ee=!0;break;case"densitymapbox":case"densitymap":q=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],ee="radial";break;case"cone":q=[["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"]],ee=!1;break;case"streamtube":q=[["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"]],ee=!1;break;case"surface":q=[["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"]],ee=!0;break;case"mesh3d":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!1;break;case"volume":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!0;break;case"isosurface":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],ee=!1;break}var se=d.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(q);se.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ae,j){var Q=d.select(this),re=r(Y),pe=re.colorscale,we=re.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+Y.uid;e.gradient(at,M,nt,T(we,ee==="radial"),pe,"fill")}},Ie;if(pe){if(!ee){var We=pe.length;Ie=j===0?pe[we?We-1:0][1]:j===1?pe[we?0:We-1][1]:pe[Math.floor((We-1)/2)][1]}}else{var Re=Y.vertexcolor||Y.facecolor||Y.color;Ie=S.isArrayOrTypedArray(Re)?Re[j]||Re[0]:Re}Q.attr("d",ae[0]),Ie?Q.call(t.fill,Ie):Q.call(Se)})}};function T(w,A){var M=A?"radial":"horizontal";return M+(w?"":"reversed")}function l(w){var A=w[0].trace,M=A.contours,g=o.hasLines(A),b=o.hasMarkers(A),p=A.visible&&A.fill&&A.fill!=="none",u=!1,y=!1;if(M){var m=M.coloring;m==="lines"?u=!0:g=m==="none"||m==="heatmap"||M.showlines,M.type==="constraint"?p=M._operation!=="=":(m==="fill"||m==="heatmap")&&(y=!0)}return{showMarker:b,showLine:g,showFill:p,showGradientLine:u,showGradientFill:y,anyLine:g||u,anyFill:p||y}}function _(w,A,M){return w&&S.isArrayOrTypedArray(w)?A:w>M?M:w}}}),y5=He({"src/components/legend/draw.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=bc(),E=lo(),e=Qy(),t=Ap(),r=es(),o=Jn(),a=ou(),n=v5().handleItemClick,i=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,v=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),_=E_(),w=1,A=/^legend[0-9]*$/;V.exports=function(X,$){if($)g(X,$);else{var le=X._fullLayout,ce=le._legends,de=le._infolayer.selectAll('[class^="legend"]');de.each(function(){var q=d.select(this),se=q.attr("class"),ae=se.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&q.remove()});for(var G=0;G<ce.length;G++){var Y=ce[G],ee=X._fullLayout[Y];g(X,ee)}}};function M(B,X,$){if(!(X.title.side!=="top center"&&X.title.side!=="top right")){var le=X.title.font,ce=le.size*f,de=0,G=B.node(),Y=r.bBox(G).width;X.title.side==="top center"?de=.5*(X._width-2*$-2*s.titlePad-Y):X.title.side==="top right"&&(de=X._width-2*$-2*s.titlePad-Y),a.positionText(B,$+s.titlePad+de,$+ce)}}function g(B,X){var $=X||{},le=B._fullLayout,ce=_.getId($),de,G,Y=$._inHover;if(Y?(G=$.layer,de="hover"):(G=le._infolayer,de=ce),!!G){de+=le._uid,B._legendMouseDownTime||(B._legendMouseDownTime=0);var ee;if(Y){if(!$.entries)return;ee=T($.entries,$)}else{for(var q=(B.calcdata||[]).slice(),se=le.shapes,ae=0;ae<se.length;ae++){var j=se[ae];if(j.showlegend){var Q={_isShape:!0,_fullInput:j,index:j._index,name:j.name||j.label.text||"shape "+j._index,legend:j.legend,legendgroup:j.legendgroup,legendgrouptitle:j.legendgrouptitle,legendrank:j.legendrank,legendwidth:j.legendwidth,showlegend:j.showlegend,visible:j.visible,opacity:j.opacity,mode:j.type==="line"?"lines":"markers",line:j.line,marker:{line:j.line,color:j.fillcolor,size:12,symbol:j.type==="rect"?"square":j.type==="circle"?"circle":"hexagon2"}};q.push([{trace:Q}])}}ee=le.showlegend&&T(q,$,le._legends.length>1)}var re=le.hiddenlabels||[];if(!Y&&(!le.showlegend||!ee.length))return G.selectAll("."+ce).remove(),le._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=x.ensureSingle(G,"g",ce,function(qe){Y||qe.attr("pointer-events","all")}),we=x.ensureSingleById(le._topdefs,"clipPath",de,function(qe){qe.append("rect")}),Se=x.ensureSingle(pe,"rect","bg",function(qe){qe.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Ie=x.ensureSingle(pe,"g","scrollbox"),Re=$.title;$._titleWidth=0,$._titleHeight=0;var We;Re.text?(We=x.ensureSingle(Ie,"text",ce+"titletext"),We.attr("text-anchor","start").call(r.font,Re.font).text(Re.text),L(We,Ie,B,$,w),!Y&&($.titleclick||$.titledoubleclick)&&R(Ie,B,$,ce)):(Ie.selectAll("."+ce+"titletext").remove(),Ie.selectAll("."+ce+"titletoggle").remove());var at=x.ensureSingle(pe,"rect","scrollbar",function(qe){qe.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Ie.selectAll("g.groups").data(ee);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(x.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(qe){let he=qe[0],ue=he.trace;if(he.groupTitle){let ne=ue.legendgroup,Ce=(le.shapes||[]).filter(function(rt){return rt.showlegend});return B._fullData.concat(Ce).some(function(rt){return rt.legendgroup===ne&&(rt.legend||"legend")===ce&&rt.visible===!0})?1:.5}return E.traceIs(ue,"pie-like")?re.indexOf(qe[0].label)!==-1?.5:1:ue.visible==="legendonly"?.5:1}).each(function(){d.select(this).call(u,B,$)}).call(l,B,$).each(function(qe){Y||qe[0].groupTitle&&$.groupclick==="toggleitem"||d.select(this).call(m,B,ce)}),x.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Ie)},function(){var qe=le._size,he=$.borderwidth,ue=$.xref==="paper",ne=$.yref==="paper";if(Re.text){let Ct=(le.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let fr=jt.legend||"legend";var ur=Array.isArray(fr)?fr.includes(ce):fr===ce;return ur&&jt.visible===!0});We.style("opacity",Pt?1:.5)}if(!Y){var Ce,Ye;ue?Ce=qe.l+qe.w*$.x-v[P($)]*$._width:Ce=le.width*$.x-v[P($)]*$._width,ne?Ye=qe.t+qe.h*(1-$.y)-v[U($)]*$._effHeight:Ye=le.height*(1-$.y)-v[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ye);if(rt)return;if(le.margin.autoexpand){var Ke=Ce,Mt=Ye;Ce=ue?x.constrain(Ce,0,le.width-$._width):Ke,Ye=ne?x.constrain(Ye,0,le.height-$._effHeight):Mt,Ce!==Ke&&x.log("Constrain "+ce+".x to make legend fit inside graph"),Ye!==Mt&&x.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ye)}if(at.on(".drag",null),pe.on("wheel",null),Y||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;Y&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Ie,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Ie,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Nt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Gt=$._effHeight-Nt-2*s.scrollBarMargin,Mr=$._height-$._effHeight,mr=Gt/Mr,qr=Math.min($._scrollY||0,Mr);Se.attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-he,x:he/2,y:he/2}),we.select("rect").attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*he,x:he,y:he+qr}),r.setClipUrl(Ie,de,B),Ue(qr,Nt,mr),pe.on("wheel",function(){qr=x.constrain($._scrollY+d.event.deltaY/Mr*Gt,0,Mr),Ue(qr,Nt,mr),qr!==0&&qr!==Mr&&d.event.preventDefault()});var Er,Ir,_t,Oe=function(Ct,Pt,jt){var fr=(jt-Pt)/mr+Ct;return x.constrain(fr,0,Mr)},Je=function(Ct,Pt,jt){var fr=(Pt-jt)/mr+Ct;return x.constrain(fr,0,Mr)},Ae=d.behavior.drag().on("dragstart",function(){var Ct=d.event.sourceEvent;Ct.type==="touchstart"?Er=Ct.changedTouches[0].clientY:Er=Ct.clientY,_t=qr}).on("drag",function(){var Ct=d.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ir=Ct.changedTouches[0].clientY:Ir=Ct.clientY,qr=Oe(_t,Er,Ir),Ue(qr,Nt,mr))});at.call(Ae);var Le=d.behavior.drag().on("dragstart",function(){var Ct=d.event.sourceEvent;Ct.type==="touchstart"&&(Er=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=d.event.sourceEvent;Ct.type==="touchmove"&&(Ir=Ct.changedTouches[0].clientY,qr=Je(_t,Er,Ir),Ue(qr,Nt,mr))});Ie.call(Le)}function Ue(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Ie,0,-Ct),r.setRect(at,$._width,s.scrollBarMargin+Ct*jt,s.scrollBarWidth,Pt),we.select("rect").attr("y",he+Ct)}if(B._context.edits.legendPosition){var Ze,st,ut,Ut;pe.classed("cursor-move",!0),t.init({element:pe.node(),gd:B,prepFn:function(Ct){if(Ct.target!==at.node()){var Pt=r.getTranslate(pe);ut=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ut!==void 0&&Ut!==void 0){var jt=ut+Ct,fr=Ut+Pt;r.setTranslate(pe,jt,fr),Ze=t.align(jt,$._width,qe.l,qe.l+qe.w,$.xanchor),st=t.align(fr+$._height,-$._height,qe.t+qe.h,qe.t,$.yanchor)}},doneFn:function(){if(Ze!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ze,Ct[ce+".y"]=st,E.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=G.selectAll("g.traces").filter(function(){var fr=this.getBoundingClientRect();return Pt.clientX>=fr.left&&Pt.clientX<=fr.right&&Pt.clientY>=fr.top&&Pt.clientY<=fr.bottom});jt.size()>0&&p(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,X,$){var le=B[0],ce=le.width,de=X.entrywidthmode,G=le.trace.legendwidth||X.entrywidth;return de==="fraction"?X._maxWidth*G:$+(G||ce)}function p(B,X,$,le,ce){var de=B._fullLayout,G=$.data()[0][0].trace,Y=X.itemclick,ee=X.itemdoubleclick,q={event:ce,node:$.node(),curveNumber:G.index,expandedIndex:G.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};G._group&&(q.group=G._group),E.traceIs(G,"pie-like")&&(q.label=$.datum()[0].label);var se=e.triggerHandler(B,"plotly_legendclick",q);if(le===1){if(se===!1)return;X._clickTimeout=setTimeout(function(){B._fullLayout&&Y&&n($,B,X,Y)},B._context.doubleClickDelay)}else if(le===2){X._clickTimeout&&clearTimeout(X._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",q);ae!==!1&&se!==!1&&ee&&n($,B,X,ee)}}function u(B,X,$){var le=_.getId($),ce=B.data()[0][0],de=ce.trace,G=E.traceIs(de,"pie-like"),Y=!$._inHover&&X._context.edits.legendText&&!G,ee=$._maxNameLength,q,se;ce.groupTitle?(q=ce.groupTitle.text,se=ce.groupTitle.font):(se=$.font,$.entries?q=ce.text:(q=G?ce.label:de.name,de._meta&&(q=x.templateString(q,de._meta))));var ae=x.ensureSingle(B,"text",le+"text");ae.attr("text-anchor","start").call(r.font,se).text(Y?y(q,ee):q);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),Y?ae.call(a.makeEditable,{gd:X,text:q}).call(L,B,X,$).on("edit",function(Q){this.text(y(Q,ee)).call(L,B,X,$);var re=ce.trace._fullInput||{},pe={};return pe.name=Q,re._isShape?E.call("_guiRelayout",X,"shapes["+de.index+"].name",pe.name):E.call("_guiRestyle",X,pe,de.index)}):L(ae,B,X,$)}function y(B,X){var $=Math.max(4,X);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var le=$-B.length;le>0;le--)B+=" ";return B}function m(B,X,$){var le=X._context.doubleClickDelay,ce,de=1,G=x.ensureSingle(B,"rect",$+"toggle",function(Y){X._context.staticPlot||Y.style("cursor","pointer").attr("pointer-events","all"),Y.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(G.on("mousedown",function(){ce=new Date().getTime(),ce-X._legendMouseDownTime<le?de+=1:(de=1,X._legendMouseDownTime=ce)}),G.on("mouseup",function(){if(!(X._dragged||X._editing)){var Y=X._fullLayout[$];new Date().getTime()-X._legendMouseDownTime>le&&(de=Math.max(de-1,1)),p(X,Y,B,de,d.event)}}))}function R(B,X,$,le){if(X._fullData.some(function(q){let se=q.legend||"legend";return(Array.isArray(se)?se.includes(le):se===le)&&E.traceIs(q,"pie-like")}))return;let de=X._context.doubleClickDelay;var G,Y=1;let ee=x.ensureSingle(B,"rect",le+"titletoggle",function(q){X._context.staticPlot||q.style("cursor","pointer").attr("pointer-events","all"),q.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(ee.on("mousedown",function(){G=new Date().getTime(),G-X._legendMouseDownTime<de?Y+=1:(Y=1,X._legendMouseDownTime=G)}),ee.on("mouseup",function(){if(X._dragged||X._editing)return;new Date().getTime()-X._legendMouseDownTime>de&&(Y=Math.max(Y-1,1));let q={event:d.event,legendId:le,data:X.data,layout:X.layout,fullData:X._fullData,fullLayout:X._fullLayout};if(Y===1&&$.titleclick){if(e.triggerHandler(X,"plotly_legendtitleclick",q)===!1)return;$._titleClickTimeout=setTimeout(function(){X._fullLayout&&i(X,$,$.titleclick)},de)}else Y===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),X._legendMouseDownTime=0,e.triggerHandler(X,"plotly_legendtitledoubleclick",q)!==!1&&$.titledoubleclick&&i(X,$,$.titledoubleclick))}))}function L(B,X,$,le,ce){le._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(X,$,le,ce)})}function z(B,X,$,le){var ce=B.data()[0][0],de=ce&&ce.trace.showlegend;if(Array.isArray(de)&&(de=de[ce.i]!==!1),!$._inHover&&ce&&!de){B.remove();return}var G=B.select("g[class*=math-group]"),Y=G.node(),ee=_.getId($);$||($=X._fullLayout[ee]);var q=$.borderwidth,se;le===w?se=$.title.font:ce.groupTitle?se=ce.groupTitle.font:se=$.font;var ae=se.size*f,j,Q;if(Y){var re=r.bBox(Y);j=re.height,Q=re.width,le===w?r.setTranslate(G,q,q+j*.75):r.setTranslate(G,0,j*.25)}else{var pe="."+ee+(le===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Ie=we.node();if(j=ae*Se,Q=Ie?r.bBox(Ie).width:0,le===w)$.title.side==="left"&&(Q+=s.itemGap*2),a.positionText(we,q+s.titlePad,q+ae);else{var Re=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Re=s.itemGap,Q-=$.indentation+$.itemwidth),a.positionText(we,Re,-ae*((Se-1)/2-.3))}}le===w?($._titleWidth=Q,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=Q)}function F(B){var X=0,$=0,le=B.title.side;return le&&(le.indexOf("left")!==-1&&(X=B._titleWidth),le.indexOf("top")!==-1&&($=B._titleHeight)),[X,$]}function N(B,X,$,le,ce){var de=B._fullLayout,G=_.getId(le);le||(le=de[G]);var Y=de._size,ee=_.isVertical(le),q=_.isGrouped(le),se=le.entrywidthmode==="fraction",ae=le.borderwidth,j=2*ae,Q=s.itemGap,re=le.indentation+le.itemwidth+Q*2,pe=2*(ae+Q),we=U(le),Se=le.y<0||le.y===0&&we==="top",Ie=le.y>1||le.y===1&&we==="bottom",Re=le.tracegroupgap,We={};let{orientation:at,yref:nt}=le,{maxheight:tt}=le,qe=Se||Ie||at!=="v"||nt!=="paper";tt||(tt=qe?.5:1);let he=qe?de.height:Y.h;le._maxHeight=Math.max(tt>1?tt:tt*he,30);var ue=0;le._width=0,le._height=0;var ne=F(le);if(ee)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+le._height+Pt/2+Q),le._height+=Pt,le._width=Math.max(le._width,Ct[0].width)}),ue=re+le._width,le._width+=Q+re+j,le._height+=pe,q&&(X.each(function(Ct,Pt){r.setTranslate(this,0,Pt*le.tracegroupgap)}),le._height+=(le._lgroupsLength-1)*le.tracegroupgap);else{var Ce=P(le),Ye=le.x<0||le.x===0&&Ce==="right",rt=le.x>1||le.x===1&&Ce==="left",Ke=Ie||Se,Mt=de.width/2;le._maxWidth=Math.max(Ye?Ke&&Ce==="left"?Y.l+Y.w:Mt:rt?Ke&&Ce==="right"?Y.r+Y.w:Mt:Y.w,2*re);var kt=0,Nt=0;$.each(function(Ct){var Pt=b(Ct,le,re);kt=Math.max(kt,Pt),Nt+=Pt}),ue=null;var Gt=0;if(q){var Mr=0,mr=0,qr=0;X.each(function(){var Ct=0,Pt=0;d.select(this).selectAll("g.traces").each(function(fr){var ur=b(fr,le,re),sr=fr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+Q+sr/2+Pt),Pt+=sr,Ct=Math.max(Ct,ur),We[fr[0].trace.legendgroup]=Ct});var jt=Ct+Q;mr>0&&jt+ae+mr>le._maxWidth?(Gt=Math.max(Gt,mr),mr=0,qr+=Mr+Re,Mr=Pt):Mr=Math.max(Mr,Pt),r.setTranslate(this,mr,qr),mr+=jt}),le._width=Math.max(Gt,mr)+ae,le._height=qr+Mr+pe}else{var Er=$.size(),Ir=Nt+j+(Er-1)*Q<le._maxWidth,_t=0,Oe=0,Je=0,Ae=0;$.each(function(Ct){var Pt=Ct[0].height,jt=b(Ct,le,re,q),fr=Ir?jt:kt;se||(fr+=Q),fr+ae+Oe-Q>=le._maxWidth&&(Gt=Math.max(Gt,Ae),Oe=0,Je+=_t,le._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Oe,ne[1]+ae+Je+Pt/2+Q),Ae=Oe+jt+Q,Oe+=fr,_t=Math.max(_t,Pt)}),Ir?(le._width=Oe+j,le._height=_t+pe):(le._width=Math.max(Gt,Ae)+j,le._height+=_t+pe)}}le._width=Math.ceil(Math.max(le._width+ne[0],le._titleWidth+2*(ae+s.titlePad))),le._height=Math.ceil(Math.max(le._height+ne[1],le._titleHeight+2*(ae+s.itemGap))),le._effHeight=Math.min(le._height,le._maxHeight);var Le=B._context.edits,Ue=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=d.select(this).select("."+G+"toggle"),jt=Ct[0].height,fr=Ct[0].trace.legendgroup,ur=b(Ct,le,re);q&&fr!==""&&(ur=We[fr]);var sr=Ue?re:ue||ur;!ee&&!se&&(sr+=Q/2),r.setRect(Pt,0,-jt/2,sr,jt)});var Ze=ce.select("."+G+"titletext");Ze.node()&&M(Ze,le,ae);var st=ce.select("."+G+"titletoggle");if(st.size()&&Ze.node()){var ut=Ze.attr("x")||0,Ut=s.titlePad;r.setRect(st,ut-Ut,ae,le._titleWidth+2*Ut,le._titleHeight+2*Ut)}}function O(B,X,$,le){var ce=B._fullLayout,de=ce[X],G=P(de),Y=U(de),ee=de.xref==="paper",q=de.yref==="paper";B._fullLayout._reservedMargin[X]={};var se=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-le,t:le+de._effHeight};if(ee&&q)return S.autoMargin(B,X,{x:de.x,y:de.y,l:de._width*v[G],r:de._width*c[G],b:de._effHeight*c[Y],t:de._effHeight*v[Y]});ee?B._fullLayout._reservedMargin[X][se]=j[se]:q||de.orientation==="v"?B._fullLayout._reservedMargin[X][ae]=j[ae]:B._fullLayout._reservedMargin[X][se]=j[se]}function P(B){return x.isRightAnchor(B)?"right":x.isCenterAnchor(B)?"center":"left"}function U(B){return x.isBottomAnchor(B)?"bottom":x.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var V=Wn(),d=as(),x=Ch(),S=sa(),E=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=ou(),a=pz(),n=es(),i=Jn(),s=Ap(),h=Ho(),f=lh().zindexSeparator,v=lo(),c=$p(),T=w_(),l=d5(),_=y5(),w=T.YANGLE,A=Math.PI*w/180,M=1/Math.sin(A),g=Math.cos(A),b=Math.sin(A),p=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,y={box:!0,ohlc:!0,violin:!0,candlestick:!0},m={scatter:!0,scattergl:!0,splom:!0};function R(j,Q){return j.distance-Q.distance}Z.hover=function(Q,re,pe,we){Q=S.getGraphDiv(Q);var Se=re.target;S.throttle(Q._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){L(Q,re,pe,we,Se)})},Z.loneHover=function(Q,re){var pe=!0;Array.isArray(Q)||(pe=!1,Q=[Q]);var we=re.gd,Se=q(we),Ie=se(we),Re=Q.map(function(Ce){var Ye=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Ke=Ce._y0||Ce.y0||Ce.y||0,Mt=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Nt=Math.min(Ye,rt),Gt=Math.max(Ye,rt),Mr=Math.min(Ke,Mt),mr=Math.max(Ke,Mt),qr=Ce.trace;if(v.traceIs(qr,"gl3d")){var Er=we._fullLayout[qr.scene]._scene.container,Ir=Er.offsetLeft,_t=Er.offsetTop;Nt+=Ir,Gt+=Ir,Mr+=_t,mr+=_t}kt.bbox={x0:Nt+Ie,x1:Gt+Ie,y0:Mr+Se,y1:mr+Se},kt.xPixel=(Ye+rt)/2,kt.yPixel=(Ke+Mt)/2,re.inOut_bbox&&re.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||i.defaultLine,x0:Ce.x0||Ce.x||0,x1:Ce.x1||Ce.x||0,y0:Ce.y0||Ce.y||0,y1:Ce.y1||Ce.y||0,xLabel:Ce.xLabel,yLabel:Ce.yLabel,zLabel:Ce.zLabel,text:Ce.text,name:Ce.name,idealAlign:Ce.idealAlign,borderColor:Ce.borderColor,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontColor:Ce.fontColor,fontWeight:Ce.fontWeight,fontStyle:Ce.fontStyle,fontVariant:Ce.fontVariant,nameLength:Ce.nameLength,textAlign:Ce.textAlign,trace:Ce.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ce.hovertemplate||!1,hovertemplateLabels:Ce.hovertemplateLabels||!1,eventData:kt}}),We=!1,at=N(Re,{gd:we,hovermode:"closest",rotateLabels:We,bgColor:re.bgColor||i.background,container:V.select(re.container),outerContainer:re.outerContainer||re.container}),nt=at.hoverLabels,tt=5,qe=0,he=0;nt.sort(function(Ce,Ye){return Ce.y0-Ye.y0}).each(function(Ce,Ye){var rt=Ce.y0-Ce.by/2;rt-tt<qe?Ce.offset=qe-rt+tt:Ce.offset=0,qe=rt+Ce.by+Ce.offset,Ye===re.anchorIndex&&(he=Ce.offset)}).each(function(Ce){Ce.offset-=he});var ue=we._fullLayout._invScaleX,ne=we._fullLayout._invScaleY;return X(nt,We,ue,ne),pe?nt:nt.node()};function L(j,Q,re,pe,we){re||(re="xy"),typeof re=="string"&&(re=re.split(f)[0]);var Se=Array.isArray(re)?re:[re],Ie,Re=j._fullLayout,We=Re.hoversubplots,at=Re._plots||[],nt=at[re],tt=Re._has("cartesian"),qe=Q.hovermode||Re.hovermode,he=(qe||"").charAt(0)==="x",ue=(qe||"").charAt(0)==="y",ne,Ce;if(tt&&(he||ue)&&We==="axis"){for(var Ye=Se.length,rt=0;rt<Ye;rt++)if(Ie=Se[rt],at[Ie]){ne=h.getFromId(j,Ie,"x"),Ce=h.getFromId(j,Ie,"y");var Ke=(he?ne:Ce)._subplotsWith;if(Ke&&Ke.length)for(var Mt=0;Mt<Ke.length;Mt++)E(Se,Ke[Mt])}}if(nt&&We!=="single"){var kt=nt.overlays.map(function(Mn){return Mn.id});Se=Se.concat(kt)}for(var Nt=Se.length,Gt=new Array(Nt),Mr=new Array(Nt),mr=!1,qr=0;qr<Nt;qr++)if(Ie=Se[qr],at[Ie])mr=!0,Gt[qr]=at[Ie].xaxis,Mr[qr]=at[Ie].yaxis;else if(Re[Ie]&&Re[Ie]._subplot){var Er=Re[Ie]._subplot;Gt[qr]=Er.xaxis,Mr[qr]=Er.yaxis}else{S.warn("Unrecognized subplot: "+Ie);return}if(qe&&!mr&&(qe="closest"),["x","y","closest","x unified","y unified"].indexOf(qe)===-1||!j.calcdata||j.querySelector(".zoombox")||j._dragging)return s.unhoverRaw(j,Q);var Ir=Re.hoverdistance;Ir===-1&&(Ir=1/0);var _t=Re.spikedistance;_t===-1&&(_t=1/0);var Oe=[],Je=[],Ae,Le,Ue,Ze,st,ut,Ut,Ct,Pt,jt,fr,ur,sr,Pr={hLinePoint:null,vLinePoint:null},Ta=!1;if(Array.isArray(Q))for(qe="array",Ue=0;Ue<Q.length;Ue++)st=j.calcdata[Q[Ue].curveNumber||0],st&&(ut=st[0].trace,st[0].trace.hoverinfo!=="skip"&&(Je.push(st),ut.orientation==="h"&&(Ta=!0)));else{var Oa=j.calcdata.slice();for(Oa.sort(function(Mn,Ao){var On=Mn[0].trace.zorder||0,ts=Ao[0].trace.zorder||0;return On-ts}),Ze=0;Ze<Oa.length;Ze++)st=Oa[Ze],ut=st[0].trace,ut.hoverinfo!=="skip"&&c.isTraceInSubplots(ut,Se)&&(Je.push(st),ut.orientation==="h"&&(Ta=!0));var Ia=!we,qa,Wa;if(Ia)"xpx"in Q?qa=Q.xpx:qa=Gt[0]._length/2,"ypx"in Q?Wa=Q.ypx:Wa=Mr[0]._length/2;else{if(r.triggerHandler(j,"plotly_beforehover",Q)===!1)return;var Ca=we.getBoundingClientRect();qa=Q.clientX-Ca.left,Wa=Q.clientY-Ca.top,Re._calcInverseTransform(j);var hi=S.apply3DTransform(Re._invTransform)(qa,Wa);if(qa=hi[0],Wa=hi[1],qa<0||qa>Gt[0]._length||Wa<0||Wa>Mr[0]._length)return s.unhoverRaw(j,Q)}if(Q.pointerX=qa+Gt[0]._offset,Q.pointerY=Wa+Mr[0]._offset,"xval"in Q?Ae=c.flat(Se,Q.xval):Ae=c.p2c(Gt,qa),"yval"in Q?Le=c.flat(Se,Q.yval):Le=c.p2c(Mr,Wa),!d(Ae[0])||!d(Le[0]))return S.warn("Fx.hover failed",Q,j),s.unhoverRaw(j,Q)}Re.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Gt,j._hoverYAxes=Mr);var wi=1/0;function Kt(Mn,Ao){for(Ze=0;Ze<Je.length;Ze++)if(st=Je[Ze],!(!st||!st[0]||!st[0].trace)&&(ut=st[0].trace,!(ut.visible!==!0||ut._length===0)&&["carpet","contourcarpet"].indexOf(ut._module.name)===-1)){if(Pt=qe,c.isUnifiedHover(Pt)&&(Pt=Pt.charAt(0)),ut.type==="splom"?(Ct=0,Ut=Se[Ct]):(Ut=c.getSubplot(ut),Ct=Se.indexOf(Ut)),ur={cd:st,trace:ut,xa:Gt[Ct],ya:Mr[Ct],maxHoverDistance:Ir,maxSpikeDistance:_t,index:!1,distance:Math.min(wi,Ir),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:i.defaultLine,name:ut.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},Re[Ut]&&(ur.subplot=Re[Ut]._subplot),Re._splomScenes&&Re._splomScenes[ut.uid]&&(ur.scene=Re._splomScenes[ut.uid]),Pt==="array"){var On=Q[Ze];"pointNumber"in On?(ur.index=On.pointNumber,Pt="closest"):(Pt="","xval"in On&&(jt=On.xval,Pt="x"),"yval"in On&&(fr=On.yval,Pt=Pt?"closest":"y"))}else Mn!==void 0&&Ao!==void 0?(jt=Mn,fr=Ao):(jt=Ae[Ct],fr=Le[Ct]);if(sr=Oe.length,Ir!==0)if(ut._module&&ut._module.hoverPoints){var ts=ut._module.hoverPoints(ur,jt,fr,Pt,{finiteRange:!0,hoverLayer:Re._hoverlayer,hoversubplots:We,gd:j});if(ts)for(var is,_s=0;_s<ts.length;_s++)is=ts[_s],d(is.x0)&&d(is.y0)&&Oe.push($(is,qe))}else S.log("Unrecognized trace type in hover:",ut);if(qe==="closest"&&Oe.length>sr&&(Oe.splice(0,sr),wi=Oe[0].distance),tt&&_t!==0&&Oe.length===0){ur.distance=_t,ur.index=!1;var Oo=ut._module.hoverPoints(ur,jt,fr,"closest",{hoverLayer:Re._hoverlayer});if(Oo&&(Oo=Oo.filter(function(Ls){return Ls.spikeDistance<=_t})),Oo&&Oo.length){var io,Gn=Oo.filter(function(Ls){return Ls.xa.showspikes&&Ls.xa.spikesnap!=="hovered data"});if(Gn.length){var eo=Gn[0];d(eo.x0)&&d(eo.y0)&&(io=Yt(eo),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>io.spikeDistance)&&(Pr.vLinePoint=io))}var ns=Oo.filter(function(Ls){return Ls.ya.showspikes&&Ls.ya.spikesnap!=="hovered data"});if(ns.length){var gs=ns[0];d(gs.x0)&&d(gs.y0)&&(io=Yt(gs),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>io.spikeDistance)&&(Pr.hLinePoint=io))}}}}}Kt();function Dt(Mn,Ao,On){for(var ts=null,is=1/0,_s,Oo=0;Oo<Mn.length;Oo++)ne&&ne._id!==Mn[Oo].xa._id||Ce&&Ce._id!==Mn[Oo].ya._id||(_s=Mn[Oo].spikeDistance,On&&Oo===0&&(_s=-1/0),_s<=is&&_s<=Ao&&(ts=Mn[Oo],is=_s));return ts}function Yt(Mn){return Mn?{xa:Mn.xa,ya:Mn.ya,x:Mn.xSpike!==void 0?Mn.xSpike:(Mn.x0+Mn.x1)/2,y:Mn.ySpike!==void 0?Mn.ySpike:(Mn.y0+Mn.y1)/2,distance:Mn.distance,spikeDistance:Mn.spikeDistance,curveNumber:Mn.trace.index,color:Mn.color,pointNumber:Mn.index}:null}var Jt={fullLayout:Re,container:Re._hoverlayer,event:Q},Fr=j._spikepoints,ta={vLinePoint:Pr.vLinePoint,hLinePoint:Pr.hLinePoint};j._spikepoints=ta;var ra=function(){var Mn=Oe.filter(function(On){return ne&&ne._id===On.xa._id&&Ce&&Ce._id===On.ya._id}),Ao=Oe.filter(function(On){return!(ne&&ne._id===On.xa._id&&Ce&&Ce._id===On.ya._id)});Mn.sort(R),Ao.sort(R),Oe=Mn.concat(Ao),Oe=Y(Oe,qe)};ra();var ca=qe.charAt(0),Ba=(ca==="x"||ca==="y")&&Oe[0]&&m[Oe[0].trace.type];if(tt&&_t!==0&&Oe.length!==0){var $a=Oe.filter(function(Mn){return Mn.ya.showspikes}),Za=Dt($a,_t,Ba);Pr.hLinePoint=Yt(Za);var ri=Oe.filter(function(Mn){return Mn.xa.showspikes}),pi=Dt(ri,_t,Ba);Pr.vLinePoint=Yt(pi)}if(Oe.length===0){var Ra=s.unhoverRaw(j,Q);if(tt&&(Pr.hLinePoint!==null||Pr.vLinePoint!==null)&&de(Fr)&&le(j,Pr,Jt),Re.hoveranywhere&&!pe&&we){var an=j._hoverdata;an&&an.length&&(j.emit("plotly_unhover",{event:Q,points:an}),j._hoverdata=[]),Fs([])}return Ra}if(tt&&de(Fr)&&le(j,Pr,Jt),c.isXYhover(Pt)&&Oe[0].length!==0&&Oe[0].trace.type!=="splom"){var tn=Oe[0];y[tn.trace.type]?Oe=Oe.filter(Mn=>Mn.trace.index===tn.trace.index):Oe=[tn];var fn=Oe.length,xt=ee("x",tn,Re),lt=ee("y",tn,Re);Kt(xt,lt);var Br=[],Cr={},xr=0,Rr=function(Mn){var Ao=y[Mn.trace.type]?z(Mn):Mn.trace.index;if(!Cr[Ao])xr++,Cr[Ao]=xr,Br.push(Mn);else{var On=Cr[Ao]-1,ts=Br[On];On>0&&Math.abs(Mn.distance)<Math.abs(ts.distance)&&(Br[On]=Mn)}},Ur;for(Ur=0;Ur<fn;Ur++)Rr(Oe[Ur]);for(Ur=Oe.length-1;Ur>fn-1;Ur--)Rr(Oe[Ur]);Oe=Br,ra()}var Hr=j._hoverdata,gt=[],Xt=q(j),vr=se(j);for(let Mn of Oe){var Or=c.makeEventData(Mn,Mn.trace,Mn.cd);if(Mn.hovertemplate!==!1){var ba=!1;Mn.cd[Mn.index]&&Mn.cd[Mn.index].ht&&(ba=Mn.cd[Mn.index].ht),Mn.hovertemplate=ba||Mn.trace.hovertemplate||!1}if(Mn.xa&&Mn.ya){var Pa=Mn.x0+Mn.xa._offset,ma=Mn.x1+Mn.xa._offset,la=Mn.y0+Mn.ya._offset,_a=Mn.y1+Mn.ya._offset,Ai=Math.min(Pa,ma),ki=Math.max(Pa,ma),Ki=Math.min(la,_a),yn=Math.max(la,_a);Or.bbox={x0:Ai+vr,x1:ki+vr,y0:Ki+Xt,y1:yn+Xt},Or.xPixel=(Pa+ma)/2,Or.yPixel=(la+_a)/2}Mn.eventData=[Or],gt.push(Or)}j._hoverdata=gt;var Ln=qe==="y"&&(Je.length>1||Oe.length>1)||qe==="closest"&&Ta&&Oe.length>1,kn=i.combine(Re.plot_bgcolor||i.background,Re.paper_bgcolor),Bn=N(Oe,{gd:j,hovermode:qe,rotateLabels:Ln,bgColor:kn,container:Re._hoverlayer,outerContainer:Re._paper.node(),commonLabelOpts:Re.hoverlabel,hoverdistance:Re.hoverdistance}),ao=Bn.hoverLabels;if(c.isUnifiedHover(qe)||(P(ao,Ln,Re,Bn.commonLabelBoundingBox),X(ao,Ln,Re._invScaleX,Re._invScaleY)),we&&we.tagName){var xo=v.getComponentMethod("annotations","hasClickToShow")(j,gt);a(V.select(we),xo?"pointer":"")}var Co=ce(j,Q,Hr);if(!we||pe||!Co&&!Re.hoveranywhere)return;Hr&&Co&&j.emit("plotly_unhover",{event:Q,points:Hr}),Fs(j._hoverdata);function Fs(Mn){j.emit("plotly_hover",{event:Q,points:Mn,xaxes:Gt,yaxes:Mr,xvals:Ae,yvals:Le})}}function z(j){return[j.trace.index,j.index,j.x0,j.y0,j.name,j.attr,j.xa?j.xa._id:"",j.ya?j.ya._id:""].join(",")}var F=/<extra>([\s\S]*)<\/extra>/;function N(j,Q){var re=Q.gd,pe=re._fullLayout,we=Q.hovermode,Se=Q.rotateLabels,Ie=Q.bgColor,Re=Q.container,We=Q.outerContainer,at=Q.commonLabelOpts||{};if(j.length===0)return[[]];var nt=Q.fontFamily||T.HOVERFONT,tt=Q.fontSize||T.HOVERFONTSIZE,qe=Q.fontWeight||pe.font.weight,he=Q.fontStyle||pe.font.style,ue=Q.fontVariant||pe.font.variant,ne=Q.fontTextcase||pe.font.textcase,Ce=Q.fontLineposition||pe.font.lineposition,Ye=Q.fontShadow||pe.font.shadow,rt=j[0],Ke=rt.xa,Mt=rt.ya,kt=we.charAt(0),Nt=kt+"Label",Gt=rt[Nt];if(Gt===void 0&&Ke.type==="multicategory")for(var Mr=0;Mr<j.length&&(Gt=j[Mr][Nt],Gt===void 0);Mr++);var mr=ae(re,We),qr=mr.top,Er=mr.width,Ir=mr.height,_t=Gt!==void 0&&rt.distance<=Q.hoverdistance&&(we==="x"||we==="y");if(_t){var Oe=!0,Je,Ae;for(Je=0;Je<j.length;Je++)if(Oe&&j[Je].zLabel===void 0&&(Oe=!1),Ae=j[Je].hoverinfo||j[Je].trace.hoverinfo,Ae){var Le=Array.isArray(Ae)?Ae:Ae.split("+");if(Le.indexOf("all")===-1&&Le.indexOf(we)===-1){_t=!1;break}}Oe&&(_t=!1)}var Ue=Re.selectAll("g.axistext").data(_t?[0]:[]);Ue.enter().append("g").classed("axistext",!0),Ue.exit().remove();var Ze={minX:0,maxX:0,minY:0,maxY:0};if(Ue.each(function(){var Ra=V.select(this),an=S.ensureSingle(Ra,"path","",function(Ki){Ki.style({"stroke-width":"1px"})}),tn=S.ensureSingle(Ra,"text","",function(Ki){Ki.attr("data-notex",1)}),fn=at.bgcolor||i.defaultLine,xt=at.bordercolor||i.contrast(fn),lt=i.contrast(fn),Br=at.font,Cr={weight:Br.weight||qe,style:Br.style||he,variant:Br.variant||ue,textcase:Br.textcase||ne,lineposition:Br.lineposition||Ce,shadow:Br.shadow||Ye,family:Br.family||nt,size:Br.size||tt,color:Br.color||lt};an.style({fill:fn,stroke:xt}),tn.text(Gt).call(n.font,Cr).call(o.positionText,0,0).call(o.convertToTspans,re),Ra.attr("transform","");var xr=ae(re,tn.node()),Rr,Ur;if(we==="x"){var Hr=Ke.side==="top"?"-":"";tn.attr("text-anchor","middle").call(o.positionText,0,Ke.side==="top"?qr-xr.bottom-p-u:qr-xr.top+p+u),Rr=Ke._offset+(rt.x0+rt.x1)/2,Ur=Mt._offset+(Ke.side==="top"?0:Mt._length);var gt=xr.width/2+u,Xt=Rr;Rr<gt?Xt=gt:Rr>pe.width-gt&&(Xt=pe.width-gt),an.attr("d","M"+(Rr-Xt)+",0L"+(Rr-Xt+p)+","+Hr+p+"H"+gt+"v"+Hr+(u*2+xr.height)+"H"+-gt+"V"+Hr+p+"H"+(Rr-Xt-p)+"Z"),Rr=Xt,Ze.minX=Rr-gt,Ze.maxX=Rr+gt,Ke.side==="top"?(Ze.minY=Ur-(u*2+xr.height),Ze.maxY=Ur-u):(Ze.minY=Ur+u,Ze.maxY=Ur+(u*2+xr.height))}else{var vr,Or,ba;Mt.side==="right"?(vr="start",Or=1,ba="",Rr=Ke._offset+Ke._length):(vr="end",Or=-1,ba="-",Rr=Ke._offset),Ur=Mt._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",vr),an.attr("d","M0,0L"+ba+p+","+p+"V"+(u+xr.height/2)+"h"+ba+(u*2+xr.width)+"V-"+(u+xr.height/2)+"H"+ba+p+"V-"+p+"Z"),Ze.minY=Ur-(u+xr.height/2),Ze.maxY=Ur+(u+xr.height/2),Mt.side==="right"?(Ze.minX=Rr+p,Ze.maxX=Rr+p+(u*2+xr.width)):(Ze.minX=Rr-p-(u*2+xr.width),Ze.maxX=Rr-p);var Pa=xr.height/2,ma=qr-xr.top-Pa,la="clip"+pe._uid+"commonlabel"+Mt._id,_a;if(Rr<xr.width+2*u+p){_a="M-"+(p+u)+"-"+Pa+"h-"+(xr.width-u)+"V"+Pa+"h"+(xr.width-u)+"Z";var Ai=xr.width-Rr+u;o.positionText(tn,Ai,ma),vr==="end"&&tn.selectAll("tspan").each(function(){var Ki=V.select(this),yn=n.tester.append("text").text(Ki.text()).call(n.font,Cr),Ln=ae(re,yn.node());Math.round(Ln.width)<Math.round(xr.width)&&Ki.attr("x",Ai-Ln.width),yn.remove()})}else o.positionText(tn,Or*(u+p),ma),_a=null;var ki=pe._topclips.selectAll("#"+la).data(_a?[0]:[]);ki.enter().append("clipPath").attr("id",la).append("path"),ki.exit().remove(),ki.select("path").attr("d",_a),n.setClipUrl(tn,_a?la:null,re)}Ra.attr("transform",e(Rr,Ur))}),c.isUnifiedHover(we)){Re.selectAll("g.hovertext").remove();let Ra=j.filter(an=>an.hoverinfo!=="none");if(Ra.length===0)return[];var st=pe.hoverlabel,ut=st.font,Ut=Ra[0],Ct=((we==="x unified"?Ut.xa:Ut.ya).unifiedhovertitle||{}).text,Pt=Ct?S.hovertemplateString({data:we==="x unified"?[{xa:Ut.xa,x:Ut.xVal}]:[{ya:Ut.ya,y:Ut.yVal}],fallback:Ut.trace.hovertemplatefallback,locale:pe._d3locale,template:Ct}):Gt,jt={showlegend:!0,legend:{title:{text:Pt,font:ut},font:ut,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},fr={font:ut};l(jt,fr,re._fullData);var ur=fr.legend;ur.entries=[];for(var sr=0;sr<Ra.length;sr++){var Pr=Ra[sr];if(Pr.hoverinfo!=="none"){var Ta=O(Pr,!0,we,pe,Gt),Oa=Ta[0],Ia=Ta[1];Pr.name=Ia,Ia!==""?Pr.text=Ia+" : "+Oa:Pr.text=Oa;var qa=Pr.cd[Pr.index];qa&&(qa.mc&&(Pr.mc=qa.mc),qa.mcc&&(Pr.mc=qa.mcc),qa.mlc&&(Pr.mlc=qa.mlc),qa.mlcc&&(Pr.mlc=qa.mlcc),qa.mlw&&(Pr.mlw=qa.mlw),qa.mrc&&(Pr.mrc=qa.mrc),qa.dir&&(Pr.dir=qa.dir)),Pr._distinct=!0,ur.entries.push([Pr])}}ur.entries.sort(function(an,tn){return an[0].trace.index-tn[0].trace.index}),ur.layer=Re,ur._inHover=!0,ur._groupTitleFont=st.grouptitlefont,_(re,ur);var Wa=Re.select("g.legend"),Ca=ae(re,Wa.node()),hi=Ca.width+2*u,wi=Ca.height+2*u,Kt=Ra[0],Dt=(Kt.x0+Kt.x1)/2,Yt=(Kt.y0+Kt.y1)/2,Jt=!(v.traceIs(Kt.trace,"bar-like")||v.traceIs(Kt.trace,"box-violin")),Fr,ta;kt==="y"?Jt?(ta=Yt-u,Fr=Yt+u):(ta=Math.min.apply(null,Ra.map(function(an){return Math.min(an.y0,an.y1)})),Fr=Math.max.apply(null,Ra.map(function(an){return Math.max(an.y0,an.y1)}))):ta=Fr=S.mean(Ra.map(function(an){return(an.y0+an.y1)/2}))-wi/2;var ra,ca;kt==="x"?Jt?(ra=Dt+u,ca=Dt-u):(ra=Math.max.apply(null,Ra.map(function(an){return Math.max(an.x0,an.x1)})),ca=Math.min.apply(null,Ra.map(function(an){return Math.min(an.x0,an.x1)}))):ra=ca=S.mean(Ra.map(function(an){return(an.x0+an.x1)/2}))-hi/2;var Ba=Ke._offset,$a=Mt._offset;Fr+=$a,ra+=Ba,ca+=Ba-hi,ta+=$a-wi;var Za,ri;return ra+hi<Er&&ra>=0?Za=ra:ca+hi<Er&&ca>=0?Za=ca:Ba+hi<Er?Za=Ba:ra-Dt<Dt-ca+hi?Za=Er-hi:Za=0,Za+=u,Fr+wi<Ir&&Fr>=0?ri=Fr:ta+wi<Ir&&ta>=0?ri=ta:$a+wi<Ir?ri=$a:Fr-Yt<Yt-ta+wi?ri=Ir-wi:ri=0,ri+=u,Wa.attr("transform",e(Za-1,ri-1)),Wa}var pi=Re.selectAll("g.hovertext").data(j,function(Ra){return z(Ra)});return pi.enter().append("g").classed("hovertext",!0).each(function(){var Ra=V.select(this);Ra.append("rect").call(i.fill,i.addOpacity(Ie,.8)),Ra.append("text").classed("name",!0),Ra.append("path").style("stroke-width","1px"),Ra.append("text").classed("nums",!0).call(n.font,{weight:qe,style:he,variant:ue,textcase:ne,lineposition:Ce,shadow:Ye,family:nt,size:tt})}),pi.exit().remove(),pi.each(function(Ra){var an=V.select(this).attr("transform",""),tn=Ra.color;Array.isArray(tn)&&(tn=tn[Ra.eventData[0].pointNumber]);var fn=Ra.bgcolor||tn,xt=i.combine(i.opacity(fn)?fn:i.defaultLine,Ie),lt=i.combine(i.opacity(tn)?tn:i.defaultLine,Ie),Br=Ra.borderColor||i.contrast(xt),Cr=O(Ra,_t,we,pe,Gt,an),xr=Cr[0],Rr=Cr[1],Ur=an.select("text.nums").call(n.font,{family:Ra.fontFamily||nt,size:Ra.fontSize||tt,color:Ra.fontColor||Br,weight:Ra.fontWeight||qe,style:Ra.fontStyle||he,variant:Ra.fontVariant||ue,textcase:Ra.fontTextcase||ne,lineposition:Ra.fontLineposition||Ce,shadow:Ra.fontShadow||Ye}).text(xr).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re),Hr=an.select("text.name"),gt=0,Xt=0;if(Rr&&Rr!==xr){Hr.call(n.font,{family:Ra.fontFamily||nt,size:Ra.fontSize||tt,color:lt,weight:Ra.fontWeight||qe,style:Ra.fontStyle||he,variant:Ra.fontVariant||ue,textcase:Ra.fontTextcase||ne,lineposition:Ra.fontLineposition||Ce,shadow:Ra.fontShadow||Ye}).text(Rr).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re);var vr=ae(re,Hr.node());gt=vr.width+2*u,Xt=vr.height+2*u}else Hr.remove(),an.select("rect").remove();an.select("path").style({fill:xt,stroke:Br});var Or=Ra.xa._offset+(Ra.x0+Ra.x1)/2,ba=Ra.ya._offset+(Ra.y0+Ra.y1)/2,Pa=Math.abs(Ra.x1-Ra.x0),ma=Math.abs(Ra.y1-Ra.y0),la=ae(re,Ur.node()),_a=la.width/pe._invScaleX,Ai=la.height/pe._invScaleY;Ra.ty0=(qr-la.top)/pe._invScaleY,Ra.bx=_a+2*u,Ra.by=Math.max(Ai+2*u,Xt),Ra.anchor="start",Ra.txwidth=_a,Ra.tx2width=gt,Ra.offset=0;var ki=(_a+p+u+gt)*pe._invScaleX,Ki,yn;if(Se)Ra.pos=Or,Ki=ba+ma/2+ki<=Ir,yn=ba-ma/2-ki>=0,(Ra.idealAlign==="top"||!Ki)&&yn?(ba-=ma/2,Ra.anchor="end"):Ki?(ba+=ma/2,Ra.anchor="start"):Ra.anchor="middle",Ra.crossPos=ba;else{if(Ra.pos=ba,Ki=Or+Pa/2+ki<=Er,yn=Or-Pa/2-ki>=0,(Ra.idealAlign==="left"||!Ki)&&yn)Or-=Pa/2,Ra.anchor="end";else if(Ki)Or+=Pa/2,Ra.anchor="start";else{Ra.anchor="middle";var Ln=ki/2,kn=Or+Ln-Er,Bn=Or-Ln;kn>0&&(Or-=kn),Bn<0&&(Or+=-Bn)}Ra.crossPos=Or}Ur.attr("text-anchor",Ra.anchor),gt&&Hr.attr("text-anchor",Ra.anchor),an.attr("transform",e(Or,ba)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ze}}function O(j,Q,re,pe,we,Se){var Ie,Re,We="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),We=G(j.name,j.nameLength));var nt=re.charAt(0),tt=nt==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(at+="x: "+j.xLabel+"<br>"),j.yLabel!==void 0&&(at+="y: "+j.yLabel+"<br>"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(at+=(at?"z: ":"")+j.zLabel)):Q&&j[nt+"Label"]===we?at=j[tt+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(at=j.yLabel):j.yLabel===void 0?at=j.xLabel:at="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(at+=(at?"<br>":"")+j.text),j.extraText!==void 0&&(at+=(at?"<br>":"")+j.extraText),Se&&at===""&&!j.hovertemplate&&(We===""&&Se.remove(),at=We),(Re=(Ie=j.trace)==null?void 0:Ie.hoverlabel)!=null&&Re.split&&(j.hovertemplate="");let{hovertemplate:qe=!1}=j;if(qe){let he=j.hovertemplateLabels||j;j[nt+"Label"]!==we&&(he[nt+"other"]=he[nt+"Val"],he[nt+"otherLabel"]=he[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:he,locale:pe._d3locale,template:qe}),at=at.replace(F,(ue,ne)=>(We=G(ne,j.nameLength),""))}return[at,We]}function P(j,Q,re,pe){var we=Q?"xa":"ya",Se=Q?"ya":"xa",Ie=0,Re=1,We=j.size(),at=new Array(We),nt=0,tt=pe.minX,qe=pe.maxX,he=pe.minY,ue=pe.maxY,ne=function(Ae){return Ae*re._invScaleX},Ce=function(Ae){return Ae*re._invScaleY};j.each(function(Ae){var Le=Ae[we],Ue=Ae[Se],Ze=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ze&&(Re=-1);var ut=0,Ut=Ze?re.width:re.height;if(re.hovermode==="x"||re.hovermode==="y"){var Ct=U(Ae,Q),Pt=Ae.anchor,jt=Pt==="end"?-1:1,fr,ur;if(Pt==="middle")fr=Ae.crossPos+(Ze?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),ur=fr+(Ze?Ce(Ae.by):ne(Ae.bx));else if(Ze)fr=Ae.crossPos+Ce(p+Ct.y)-Ce(Ae.by/2-p),ur=fr+Ce(Ae.by);else{var sr=ne(jt*p+Ct.x),Pr=sr+ne(jt*Ae.bx);fr=Ae.crossPos+Math.min(sr,Pr),ur=Ae.crossPos+Math.max(sr,Pr)}Ze?he!==void 0&&ue!==void 0&&Math.min(ur,ue)-Math.max(fr,he)>1&&(Ue.side==="left"?(ut=Ue._mainLinePosition,Ut=re.width):Ut=Ue._mainLinePosition):tt!==void 0&&qe!==void 0&&Math.min(ur,qe)-Math.max(fr,tt)>1&&(Ue.side==="top"?(ut=Ue._mainLinePosition,Ut=re.height):Ut=Ue._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ze?M:1)/2,pmin:ut,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Re*(Le[0].traceIndex-Ae[0].traceIndex)});var Ye,rt,Ke,Mt,kt,Nt,Gt;function Mr(Ae){var Le=Ae[0],Ue=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Ke=Ue.pos+Ue.dp+Ue.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ye=!1}if(!(Ke<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Ke;Ye=!1}if(Ye){var Ze=0;for(Mt=0;Mt<Ae.length;Mt++)Nt=Ae[Mt],Nt.pos+Nt.dp+Nt.size>Le.pmax&&Ze++;for(Mt=Ae.length-1;Mt>=0&&!(Ze<=0);Mt--)Nt=Ae[Mt],Nt.pos>Le.pmax-1&&(Nt.del=!0,Ze--);for(Mt=0;Mt<Ae.length&&!(Ze<=0);Mt++)if(Nt=Ae[Mt],Nt.pos<Le.pmin+1)for(Nt.del=!0,Ze--,Ke=Nt.size*2,kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Ke;for(Mt=Ae.length-1;Mt>=0&&!(Ze<=0);Mt--)Nt=Ae[Mt],Nt.pos+Nt.dp+Nt.size>Le.pmax&&(Nt.del=!0,Ze--)}}}for(;!Ye&&Ie<=We;){for(Ie++,Ye=!0,Mt=0;Mt<at.length-1;){var mr=at[Mt],qr=at[Mt+1],Er=mr[mr.length-1],Ir=qr[0];if(rt=Er.pos+Er.dp+Er.size-Ir.pos-Ir.dp+Ir.size,rt>.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(mr.push.apply(mr,qr),at.splice(Mt+1,1),Gt=0,kt=mr.length-1;kt>=0;kt--)Gt+=mr[kt].dp;for(Ke=Gt/mr.length,kt=mr.length-1;kt>=0;kt--)mr[kt].dp-=Ke;Ye=!1}else Mt++}at.forEach(Mr)}for(Mt=at.length-1;Mt>=0;Mt--){var _t=at[Mt];for(kt=_t.length-1;kt>=0;kt--){var Oe=_t[kt],Je=Oe.datum;Je.offset=Oe.dp,Je.del=Oe.del}}}function U(j,Q){var re=0,pe=j.offset;return Q&&(pe*=-b,re=j.offset*g),{x:re,y:pe}}function B(j){var Q={start:1,end:-1,middle:0}[j.anchor],re=Q*(p+u),pe=re+Q*(j.txwidth+u),we=j.anchor==="middle";return we&&(re-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:Q,textShiftX:re,text2ShiftX:pe}}function X(j,Q,re,pe){var we=function(Ie){return Ie*re},Se=function(Ie){return Ie*pe};j.each(function(Ie){var Re=V.select(this);if(Ie.del)return Re.remove();var We=Re.select("text.nums"),at=Ie.anchor,nt=at==="end"?-1:1,tt=B(Ie),qe=U(Ie,Q),he=qe.x,ue=qe.y,ne=at==="middle",Ce="hoverlabel"in Ie.trace?Ie.trace.hoverlabel.showarrow:!0,Ye;ne?Ye="M-"+we(Ie.bx/2+Ie.tx2width/2)+","+Se(ue-Ie.by/2)+"h"+we(Ie.bx)+"v"+Se(Ie.by)+"h-"+we(Ie.bx)+"Z":Ce?Ye="M0,0L"+we(nt*p+he)+","+Se(p+ue)+"v"+Se(Ie.by/2-p)+"h"+we(nt*Ie.bx)+"v-"+Se(Ie.by)+"H"+we(nt*p+he)+"V"+Se(ue-p)+"Z":Ye="M"+we(nt*p+he)+","+Se(ue-Ie.by/2)+"h"+we(nt*Ie.bx)+"v"+Se(Ie.by)+"h"+we(-nt*Ie.bx)+"Z",Re.select("path").attr("d",Ye);var rt=he+tt.textShiftX,Ke=ue+Ie.ty0-Ie.by/2+u,Mt=Ie.textAlign||"auto";Mt!=="auto"&&(Mt==="left"&&at!=="start"?(We.attr("text-anchor","start"),rt=ne?-Ie.bx/2-Ie.tx2width/2+u:-Ie.bx-u):Mt==="right"&&at!=="end"&&(We.attr("text-anchor","end"),rt=ne?Ie.bx/2-Ie.tx2width/2-u:Ie.bx+u)),We.call(o.positionText,we(rt),Se(Ke)),Ie.tx2width&&(Re.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(ue+Ie.ty0-Ie.by/2+u)),Re.select("rect").call(n.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Ie.tx2width/2+he),Se(ue-Ie.by/2-1),we(Ie.tx2width),Se(Ie.by+2)))})}function $(j,Q){var re=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[re]||{};function Ie(qe){return qe||d(qe)&&qe===0}var Re=Array.isArray(re)?function(qe,he){var ue=S.castOption(we,re,qe);return Ie(ue)?ue:S.extractOption({},pe,"",he)}:function(qe,he){return S.extractOption(Se,pe,qe,he)};function We(qe,he,ue){var ne=Re(he,ue);Ie(ne)&&(j[qe]=ne)}if(We("hoverinfo","hi","hoverinfo"),We("bgcolor","hbg","hoverlabel.bgcolor"),We("borderColor","hbc","hoverlabel.bordercolor"),We("fontFamily","htf","hoverlabel.font.family"),We("fontSize","hts","hoverlabel.font.size"),We("fontColor","htc","hoverlabel.font.color"),We("fontWeight","htw","hoverlabel.font.weight"),We("fontStyle","hty","hoverlabel.font.style"),We("fontVariant","htv","hoverlabel.font.variant"),We("nameLength","hnl","hoverlabel.namelength"),We("textAlign","hta","hoverlabel.align"),j.posref=Q==="y"||Q==="closest"&&pe.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=S.constrain(j.x0,0,j.xa._length),j.x1=S.constrain(j.x1,0,j.xa._length),j.y0=S.constrain(j.y0,0,j.ya._length),j.y1=S.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:h.hoverLabelText(j.xa,j.xLabelVal,pe.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:h.hoverLabelText(j.ya,j.yLabelVal,pe.yhoverformat),j.yVal=j.ya.c2d(j.yLabelVal)),j.zLabelVal!==void 0&&j.zLabel===void 0&&(j.zLabel=String(j.zLabelVal)),!isNaN(j.xerr)&&!(j.xa.type==="log"&&j.xerr<=0)){var at=h.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+at+" / -"+h.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+at,Q==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var nt=h.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+nt+" / -"+h.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+nt,Q==="y"&&(j.distance+=1)}var tt=j.hoverinfo||j.trace.hoverinfo;return tt&&tt!=="all"&&(tt=Array.isArray(tt)?tt:tt.split("+"),tt.indexOf("x")===-1&&(j.xLabel=void 0),tt.indexOf("y")===-1&&(j.yLabel=void 0),tt.indexOf("z")===-1&&(j.zLabel=void 0),tt.indexOf("text")===-1&&(j.text=void 0),tt.indexOf("name")===-1&&(j.name=void 0)),j}function le(j,Q,re){var pe=re.container,we=re.fullLayout,Se=we._size,Ie=re.event,Re=!!Q.hLinePoint,We=!!Q.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(We||Re)){var tt=i.combine(we.plot_bgcolor,we.paper_bgcolor);if(Re){var qe=Q.hLinePoint,he,ue;at=qe&&qe.xa,nt=qe&&qe.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Ie.pointerX,ue=Ie.pointerY):(he=at._offset+qe.x,ue=nt._offset+qe.y);var Ce=x.readability(qe.color,tt)<1.5?i.contrast(tt):qe.color,Ye=nt.spikemode,rt=nt.spikethickness,Ke=nt.spikecolor||Ce,Mt=h.getPxPosition(j,nt),kt,Nt;if(Ye.indexOf("toaxis")!==-1||Ye.indexOf("across")!==-1){if(Ye.indexOf("toaxis")!==-1&&(kt=Mt,Nt=he),Ye.indexOf("across")!==-1){var Gt=nt._counterDomainMin,Mr=nt._counterDomainMax;nt.anchor==="free"&&(Gt=Math.min(Gt,nt.position),Mr=Math.max(Mr,nt.position)),kt=Se.l+Gt*Se.w,Nt=Se.l+Mr*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Nt,y1:ue,y2:ue,"stroke-width":rt,stroke:Ke,"stroke-dasharray":n.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Nt,y1:ue,y2:ue,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ye.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:Mt+(nt.side!=="right"?rt:-rt),cy:ue,r:rt,fill:Ke}).classed("spikeline",!0)}if(We){var mr=Q.vLinePoint,qr,Er;at=mr&&mr.xa,nt=mr&&mr.ya;var Ir=at.spikesnap;Ir==="cursor"?(qr=Ie.pointerX,Er=Ie.pointerY):(qr=at._offset+mr.x,Er=nt._offset+mr.y);var _t=x.readability(mr.color,tt)<1.5?i.contrast(tt):mr.color,Oe=at.spikemode,Je=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),Ue,Ze;if(Oe.indexOf("toaxis")!==-1||Oe.indexOf("across")!==-1){if(Oe.indexOf("toaxis")!==-1&&(Ue=Le,Ze=Er),Oe.indexOf("across")!==-1){var st=at._counterDomainMin,ut=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ut=Math.max(ut,at.position)),Ue=Se.t+(1-ut)*Se.h,Ze=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ue,y2:Ze,"stroke-width":Je,stroke:Ae,"stroke-dasharray":n.dashStyle(at.spikedash,Je)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ue,y2:Ze,"stroke-width":Je+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Oe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Je:-Je),r:Je,fill:Ae}).classed("spikeline",!0)}}}function ce(j,Q,re){if(!re||re.length!==j._hoverdata.length)return!0;for(var pe=re.length-1;pe>=0;pe--){var we=re[pe],Se=j._hoverdata[pe];if(we.curveNumber!==Se.curveNumber||String(we.pointNumber)!==String(Se.pointNumber)||String(we.pointNumbers)!==String(Se.pointNumbers)||we.binNumber!==Se.binNumber)return!0}return!1}function de(j,Q){return!Q||Q.vLinePoint!==j._spikepoints.vLinePoint||Q.hLinePoint!==j._spikepoints.hLinePoint}function G(j,Q){return o.plainText(j||"",{len:Q,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Y(j,Q){for(var re=Q.charAt(0),pe=[],we=[],Se=[],Ie=0;Ie<j.length;Ie++){var Re=j[Ie];v.traceIs(Re.trace,"bar-like")||v.traceIs(Re.trace,"box-violin")?Se.push(Re):Re.trace[re+"period"]?we.push(Re):pe.push(Re)}return pe.concat(we).concat(Se)}function ee(j,Q,re){var pe=Q[j+"a"],we=Q[j+"Val"],Se=Q.cd[0];if(pe.type==="category"||pe.type==="multicategory")we=pe._categoriesMap[we];else if(pe.type==="date"){var Ie=Q.trace[j+"periodalignment"];if(Ie){var Re=Q.cd[Q.index],We=Re[j+"Start"];We===void 0&&(We=Re[j]);var at=Re[j+"End"];at===void 0&&(at=Re[j]);var nt=at-We;Ie==="end"?we+=nt:Ie==="middle"&&(we+=nt/2)}we=pe.d2c(we)}return Se&&Se.t&&Se.t.posLetter===pe._id&&(re.boxmode==="group"||re.violinmode==="group")&&(we+=Se.t.dPos),we}var q=j=>j.offsetTop+j.clientTop,se=j=>j.offsetLeft+j.clientLeft;function ae(j,Q){var re=j._fullLayout,pe=Q.getBoundingClientRect(),we=pe.left,Se=pe.top,Ie=we+pe.width,Re=Se+pe.height,We=S.apply3DTransform(re._invTransform)(we,Se),at=S.apply3DTransform(re._invTransform)(Ie,Re),nt=We[0],tt=We[1],qe=at[0],he=at[1];return{x:nt,y:tt,width:qe-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,qe),right:Math.max(nt,qe),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=$p().isUnifiedHover;V.exports=function(e,t,r,o){o=o||{};var a=t.legend;function n(i){o.font[i]||(o.font[i]=a?t.legend.font[i]:t.font[i])}t&&S(t.hovermode)&&(o.font||(o.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(o.bgcolor||(o.bgcolor=x.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),r("hoverlabel.showarrow",o.showarrow),d.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,V){"use strict";var d=sa(),x=k_(),S=Zm();V.exports=function(e,t){function r(o,a){return d.coerce(e,t,S,o,a)}x(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,V){"use strict";var d=sa(),x=Ky(),S=k_();V.exports=function(e,t,r,o){function a(i,s){return d.coerce(e,t,x,i,s)}var n=d.extendFlat({},o.hoverlabel);t.hovertemplate&&(n.namelength=-1),S(e,t,a,n)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,V){"use strict";var d=sa(),x=Zm();V.exports=function(E,e){function t(r,o){return e[r]!==void 0?e[r]:d.coerce(E,e,x,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Zm(),S=x5(),E=k_();V.exports=function(t,r){function o(v,c){return d.coerce(t,r,x,v,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"));var n=o("dragmode");n==="select"&&o("selectdirection");var i=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((i||s||h)&&f===1||(i||s)&&h&&f===2)&&(r.dragmode="pan"),E(t,r,o),d.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,V){"use strict";var d=sa(),x=lo();V.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return d.coerceHoverinfo({hoverinfo:f},{_module:h._module},r)}}for(var a=0;a<t.length;a++){var n=t[a],i=n[0].trace;if(!x.traceIs(i,"pie-like")){var s=x.traceIs(i,"2dMap")?S:d.fillArray;s(i.hoverinfo,n,"hi",o(i)),i.hovertemplate&&s(i.hovertemplate,n,"ht"),i.hoverlabel&&(s(i.hoverlabel.bgcolor,n,"hbg"),s(i.hoverlabel.bordercolor,n,"hbc"),s(i.hoverlabel.font.size,n,"hts"),s(i.hoverlabel.font.color,n,"htc"),s(i.hoverlabel.font.family,n,"htf"),s(i.hoverlabel.font.weight,n,"htw"),s(i.hoverlabel.font.style,n,"hty"),s(i.hoverlabel.font.variant,n,"htv"),s(i.hoverlabel.namelength,n,"hnl"),s(i.hoverlabel.align,n,"hta"),s(i.hoverlabel.showarrow,n,"htsa"))}}};function S(E,e,t,r){r=r||d.identity,Array.isArray(E)&&(e[0][t]=r(E))}}}),xz=He({"src/components/fx/click.js"(Z,V){"use strict";var d=lo(),x=_5().hover;V.exports=function(E,e,t){var r=d.getComponentMethod("annotations","onClick")(E,E._hoverdata),o=E._fullLayout;t!==void 0&&x(E,e,t,!0);function a(){var n,i,s,h,f={points:E._hoverdata,event:e};(n=f.xaxes)!=null||(f.xaxes=E._hoverXAxes),(i=f.yaxes)!=null||(f.yaxes=E._hoverYAxes),(s=f.xvals)!=null||(f.xvals=E._hoverXVals),(h=f.yvals)!=null||(f.yvals=E._hoverYVals),E.emit("plotly_click",f)}(E._hoverdata||o.clickanywhere)&&e&&e.target&&(E._hoverdata||(E._hoverdata=[]),r&&r.then?r.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}}}),rf=He({"src/components/fx/index.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=Ap(),E=$p(),e=Zm(),t=_5();V.exports={moduleType:"component",name:"fx",constants:w_(),schema:{layout:e},attributes:Ky(),layoutAttributes:e,supplyLayoutGlobalDefaults:mz(),supplyDefaults:gz(),supplyLayoutDefaults:yz(),calc:_z(),getDistanceFunction:E.getDistanceFunction,getClosest:E.getClosest,inbox:E.inbox,quadrature:E.quadrature,appendArrayPointValue:E.appendArrayPointValue,castHoverOption:o,castHoverinfo:a,hover:t.hover,unhover:S.unhover,loneHover:t.loneHover,loneUnhover:r,click:xz()};function r(n){var i=x.isD3Selection(n)?n:d.select(n);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function o(n,i,s){return x.castOption(n,i,"hoverlabel."+s)}function a(n,i,s){function h(f){return x.coerceHoverinfo({hoverinfo:f},{_module:n._module},i)}return x.castOption(n,s,"hoverinfo",h)}}}),Jd=He({"src/components/dragelement/helpers.js"(Z){"use strict";Z.selectMode=function(V){return V==="lasso"||V==="select"},Z.drawMode=function(V){return V==="drawclosedpath"||V==="drawopenpath"||V==="drawline"||V==="drawrect"||V==="drawcircle"},Z.openMode=function(V){return V==="drawline"||V==="drawopenpath"},Z.rectMode=function(V){return V==="select"||V==="drawline"||V==="drawrect"||V==="drawcircle"},Z.freeMode=function(V){return V==="lasso"||V==="drawclosedpath"||V==="drawopenpath"},Z.selectingOrDrawing=function(V){return Z.freeMode(V)||Z.rectMode(V)}}}),C_=He({"src/lib/clear_gl_canvases.js"(Z,V){"use strict";V.exports=function(x){var S=x._fullLayout;S._glcanvas&&S._glcanvas.size()&&S._glcanvas.each(function(E){E.regl&&E.regl.clear({color:!0,depth:!0})})}}}),w2=He({"src/fonts/ploticon.js"(Z,V){"use strict";V.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle fill='#9EF' cx='102' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='54' r='6'/>"," <circle fill='#D69' cx='54' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='54' r='6'/>"," <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}}}),T2=He({"src/components/shapes/draw_newshape/constants.js"(Z,V){"use strict";var d=32;V.exports={CIRCLE_SIDES:d,i000:0,i090:d/4,i180:d/2,i270:d/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=He({"src/components/selections/helpers.js"(Z,V){"use strict";var d=sa().strTranslate;function x(t,r){switch(t.type){case"log":return t.p2d(r);case"date":return t.p2r(r,0,t.calendar);default:return t.p2r(r)}}function S(t,r){switch(t.type){case"log":return t.d2p(r);case"date":return t.r2p(r,0,t.calendar);default:return t.r2p(r)}}function E(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return x(t,o[r])}}function e(t){return d(t.xaxis._offset,t.yaxis._offset)}V.exports={p2r:x,r2p:S,axValue:E,getTransform:e}}}),r0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var V=M_(),d=T2(),x=d.CIRCLE_SIDES,S=d.SQRT2,E=A2(),e=E.p2r,t=E.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var h="",f=0;f<s;f++)for(var v=i[f].length,c=0;c<v;c++){var T=i[f][c][0];if(T==="Z")h+="Z";else for(var l=i[f][c].length,_=0;_<l;_++){var w=_;T==="Q"||T==="S"?w=o[_]:T==="C"&&(w=r[_]),h+=i[f][c][w],_>0&&_<l-1&&(h+=",")}}return h},Z.readPaths=function(i,s,h,f){var v=V(i),c=[],T=-1,l=function(){T++,c[T]=[]},_,w=0,A=0,M,g,b=function(){M=w,g=A};b();for(var p=0;p<v.length;p++){var u=[],y,m,R,L,z=v[p][0],F=z;switch(z){case"M":l(),w=+v[p][1],A=+v[p][2],u.push([F,w,A]),b();break;case"Q":case"S":y=+v[p][1],R=+v[p][2],w=+v[p][3],A=+v[p][4],u.push([F,w,A,y,R]);break;case"C":y=+v[p][1],R=+v[p][2],m=+v[p][3],L=+v[p][4],w=+v[p][5],A=+v[p][6],u.push([F,w,A,y,R,m,L]);break;case"T":case"L":w=+v[p][1],A=+v[p][2],u.push([F,w,A]);break;case"H":F="L",w=+v[p][1],u.push([F,w,A]);break;case"V":F="L",A=+v[p][1],u.push([F,w,A]);break;case"A":F="L";var N=+v[p][1],O=+v[p][2];+v[p][4]||(N=-N,O=-O);var P=w-N,U=A;for(_=1;_<=x/2;_++){var B=2*Math.PI*_/x;u.push([F,P+N*Math.cos(B),U+O*Math.sin(B)])}break;case"Z":(w!==M||A!==g)&&(w=M,A=g,u.push([F,w,A]));break}for(var X=(h||{}).domain,$=s._fullLayout._size,le=h&&h.xsizemode==="pixel",ce=h&&h.ysizemode==="pixel",de=f===!1,G=0;G<u.length;G++){for(_=0;_+2<7;_+=2){var Y=u[G][_+1],ee=u[G][_+2];Y===void 0||ee===void 0||(w=Y,A=ee,h&&(h.xaxis&&h.xaxis.p2r?(de&&(Y-=h.xaxis._offset),le?Y=t(h.xaxis,h.xanchor)+Y:Y=e(h.xaxis,Y)):(de&&(Y-=$.l),X?Y=X.x[0]+Y/$.w:Y=Y/$.w),h.yaxis&&h.yaxis.p2r?(de&&(ee-=h.yaxis._offset),ce?ee=t(h.yaxis,h.yanchor)-ee:ee=e(h.yaxis,ee)):(de&&(ee-=$.t),X?ee=X.y[1]-ee/$.h:ee=1-ee/$.h)),u[G][_+1]=Y,u[G][_+2]=ee)}c[T].push(u[G].slice())}}return c};function a(i,s){return Math.abs(i-s)<=1e-6}function n(i,s){var h=s[1]-i[1],f=s[2]-i[2];return Math.sqrt(h*h+f*f)}Z.pointsOnRectangle=function(i){var s=i.length;if(s!==5)return!1;for(var h=1;h<3;h++){var f=i[0][h]-i[1][h],v=i[3][h]-i[2][h];if(!a(f,v))return!1;var c=i[0][h]-i[3][h],T=i[1][h]-i[2][h];if(!a(c,T))return!1}return!a(i[0][1],i[1][1])&&!a(i[0][1],i[3][1])?!1:!!(n(i[0],i[1])*n(i[0],i[3]))},Z.pointsOnEllipse=function(i){var s=i.length;if(s!==x+1)return!1;s=x;for(var h=0;h<s;h++){var f=(s*2-h)%s,v=(s/2+f)%s,c=(s/2+h)%s;if(!a(n(i[h],i[c]),n(i[f],i[v])))return!1}return!0},Z.handleEllipse=function(i,s,h){if(!i)return[s,h];var f=Z.ellipseOver({x0:s[0],y0:s[1],x1:h[0],y1:h[1]}),v=(f.x1+f.x0)/2,c=(f.y1+f.y0)/2,T=(f.x1-f.x0)/2,l=(f.y1-f.y0)/2;T||(T=l=l/S),l||(l=T=T/S);for(var _=[],w=0;w<x;w++){var A=w*2*Math.PI/x;_.push([v+T*Math.cos(A),c+l*Math.sin(A)])}return _},Z.ellipseOver=function(i){var s=i.x0,h=i.y0,f=i.x1,v=i.y1,c=f-s,T=v-h;s-=c,h-=T;var l=(s+f)/2,_=(h+v)/2,w=S;return c*=w,T*=w,{x0:l-c,y0:_-T,x1:l+c,y1:_+T}},Z.fixDatesForPaths=function(i,s,h){var f=s.type==="date",v=h.type==="date";if(!f&&!v)return i;for(var c=0;c<i.length;c++)for(var T=0;T<i[c].length;T++)for(var l=0;l+2<i[c][T].length;l+=2)f&&(i[c][T][l+1]=i[c][T][l+1].replace(" ","_")),v&&(i[c][T][l+2]=i[c][T][l+2].replace(" ","_"));return i}}}),S2=He({"src/components/shapes/draw_newshape/newshapes.js"(Z,V){"use strict";var d=ef(),x=Jd(),S=x.drawMode,E=x.openMode,e=T2(),t=e.i000,r=e.i090,o=e.i180,a=e.i270,n=e.cos45,i=e.sin45,s=A2(),h=s.p2r,f=s.r2p,v=$m(),c=v.clearOutline,T=r0(),l=T.readPaths,_=T.writePaths,w=T.ellipseOver,A=T.fixDatesForPaths;function M(b,p){if(b.length){var u=b[0][0];if(u){var y=p.gd,m=p.isActiveShape,R=p.dragmode,L=(y.layout||{}).shapes||[];if(!S(R)&&m!==void 0){var z=y._fullLayout._activeShapeIndex;if(z<L.length)switch(y._fullLayout.shapes[z].type){case"rect":R="drawrect";break;case"circle":R="drawcircle";break;case"line":R="drawline";break;case"path":var F=L[z].path||"";F[F.length-1]==="Z"?R="drawclosedpath":R="drawopenpath";break}}var N=g(b,p,R);c(y);for(var O=p.editHelpers,P=(O||{}).modifyItem,U=[],B=0;B<L.length;B++){var X=y._fullLayout.shapes[B];if(U[B]=X._input,m!==void 0&&B===y._fullLayout._activeShapeIndex){var $=N;switch(X.type){case"line":case"rect":case"circle":var le=d.getFromId(y,X.xref);X.xref.charAt(0)==="x"&&le.type.includes("category")?(P("x0",$.x0-(X.x0shift||0)),P("x1",$.x1-(X.x1shift||0))):(P("x0",$.x0),P("x1",$.x1));var ce=d.getFromId(y,X.yref);X.yref.charAt(0)==="y"&&ce.type.includes("category")?(P("y0",$.y0-(X.y0shift||0)),P("y1",$.y1-(X.y1shift||0))):(P("y0",$.y0),P("y1",$.y1));break;case"path":P("path",$.path);break}}}return m===void 0?(U.push(N),U):O?O.getUpdateObj():{}}}}function g(b,p,u){var y=b[0][0],m=p.gd,R=y.getAttribute("d"),L=m._fullLayout.newshape,z=p.plotinfo,F=p.isActiveShape,N=z.xaxis,O=z.yaxis,P=!!z.domain||!z.xaxis,U=!!z.domain||!z.yaxis,B=E(u),X=l(R,m,z,F),$={editable:!0,visible:L.visible,name:L.name,showlegend:L.showlegend,legend:L.legend,legendwidth:L.legendwidth,legendgroup:L.legendgroup,legendgrouptitle:{text:L.legendgrouptitle.text,font:L.legendgrouptitle.font},legendrank:L.legendrank,label:L.label,xref:P?"paper":N._id,yref:U?"paper":O._id,layer:L.layer,opacity:L.opacity,line:{color:L.line.color,width:L.line.width,dash:L.line.dash}};B||($.fillcolor=L.fillcolor,$.fillrule=L.fillrule);var le;if(X.length===1&&(le=X[0]),le&&le.length===5&&u==="drawrect")$.type="rect",$.x0=le[0][1],$.y0=le[0][2],$.x1=le[2][1],$.y1=le[2][2];else if(le&&u==="drawline")$.type="line",$.x0=le[0][1],$.y0=le[0][2],$.x1=le[1][1],$.y1=le[1][2];else if(le&&u==="drawcircle"){$.type="circle";var ce=le[t][1],de=le[r][1],G=le[o][1],Y=le[a][1],ee=le[t][2],q=le[r][2],se=le[o][2],ae=le[a][2],j=z.xaxis&&(z.xaxis.type==="date"||z.xaxis.type==="log"),Q=z.yaxis&&(z.yaxis.type==="date"||z.yaxis.type==="log");j&&(ce=f(z.xaxis,ce),de=f(z.xaxis,de),G=f(z.xaxis,G),Y=f(z.xaxis,Y)),Q&&(ee=f(z.yaxis,ee),q=f(z.yaxis,q),se=f(z.yaxis,se),ae=f(z.yaxis,ae));var re=(de+Y)/2,pe=(ee+se)/2,we=(Y-de+G-ce)/2,Se=(ae-q+se-ee)/2,Ie=w({x0:re,y0:pe,x1:re+we*n,y1:pe+Se*i});j&&(Ie.x0=h(z.xaxis,Ie.x0),Ie.x1=h(z.xaxis,Ie.x1)),Q&&(Ie.y0=h(z.yaxis,Ie.y0),Ie.y1=h(z.yaxis,Ie.y1)),$.x0=Ie.x0,$.y0=Ie.y0,$.x1=Ie.x1,$.y1=Ie.y1}else $.type="path",N&&O&&A(X,N,O),$.path=_(X),le=null;return $}V.exports={newShapes:M,createShapeObj:g}}}),b5=He({"src/components/selections/draw_newselection/newselections.js"(Z,V){"use strict";var d=Jd(),x=d.selectMode,S=$m(),E=S.clearOutline,e=r0(),t=e.readPaths,r=e.writePaths,o=e.fixDatesForPaths;V.exports=function(n,i){if(n.length){var s=n[0][0];if(s){var h=s.getAttribute("d"),f=i.gd,v=f._fullLayout.newselection,c=i.plotinfo,T=c.xaxis,l=c.yaxis,_=i.isActiveSelection,w=i.dragmode,A=(f.layout||{}).selections||[];if(!x(w)&&_!==void 0){var M=f._fullLayout._activeSelectionIndex;if(M<A.length)switch(f._fullLayout.selections[M].type){case"rect":w="select";break;case"path":w="lasso";break}}var g=t(h,f,c,_),b={xref:T._id,yref:l._id,opacity:v.opacity,line:{color:v.line.color,width:v.line.width,dash:v.line.dash}},p;g.length===1&&(p=g[0]),p&&p.length===5&&w==="select"?(b.type="rect",b.x0=p[0][1],b.y0=p[0][2],b.x1=p[2][1],b.y1=p[2][2]):(b.type="path",T&&l&&o(g,T,l),b.path=r(g),p=null),E(f);for(var u=i.editHelpers,y=(u||{}).modifyItem,m=[],R=0;R<A.length;R++){var L=f._fullLayout.selections[R];if(!L){m[R]=L;continue}if(m[R]=L._input,_!==void 0&&R===f._fullLayout._activeSelectionIndex){var z=b;switch(L.type){case"rect":y("x0",z.x0),y("x1",z.x1),y("y0",z.y0),y("y1",z.y1);break;case"path":y("path",z.path);break}}}return _===void 0?(m.push(b),m):u?u.getUpdateObj():{}}}}}}),L_=He({"src/components/shapes/constants.js"(Z,V){"use strict";V.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}}}}),a0=He({"src/components/shapes/helpers.js"(Z){"use strict";var V=L_(),d=sa(),x=Ho();Z.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}},Z.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}},Z.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},Z.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},Z.extractPathCoords=function(e,t,r){var o=[],a=e.match(V.segmentRE);return a.forEach(function(n){var i=t[n.charAt(0)].drawn;if(i!==void 0){var s=n.slice(1).match(V.paramRE);if(!(!s||s.length<i)){var h=s[i],f=r?h:d.cleanNumber(h);o.push(f)}}}),o},Z.countDefiningCoords=function(e,t,r){if(e!=="path")return 2;if(!t)return 0;let o=t.match(V.segmentRE);if(!o)return 0;let a=r==="x"?V.paramIsX:V.paramIsY;return o.reduce((n,i)=>{let s=i.charAt(0),h=a[s].drawn!==void 0;return n+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var n=e._fullLayout._size,i;if(t)if(a==="domain")i=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);i=function(h){var f=E(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(i=Z.decodeDate(i))}else o?i=function(h){return n.t+n.h*(1-h)}:i=function(h){return n.l+n.w*h};return i},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,n;if(t)if(o==="domain")n=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};else{var i=Z.rangeToShapePosition(t);n=function(s){return i(t.p2r(s-t._offset))}}else r?n=function(s){return 1-(s-a.t)/a.h}:n=function(s){return(s-a.l)/a.w};return n},Z.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,o=Math.round(e);return r?o+.5:o},Z.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&r.xref!=="paper"&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(o.yaxis=e._fullLayout[r.yref+"axis"])),o.xsizemode=r.xsizemode,o.ysizemode=r.ysizemode,o.xanchor=r.xanchor,o.yanchor=r.yanchor,{options:r,plotinfo:o}},Z.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(o.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:o}},Z.getPathString=function(e,t){let r=t.type,o=x.getRefType(t.xref),a=x.getRefType(t.yref),n=e._fullLayout._size;var i,s,h,f,v,c,T,l,_,w,A,M;function g(z,F,N,O){var P;if(z)if(F==="domain")O?P=function(U){return z._offset+z._length*(1-U)}:P=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);P=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(P=Z.decodeDate(P))}else O?P=function(U){return n.t+n.h*(1-U)}:P=function(U){return n.l+n.w*U};return P}if(o==="array"?(T=[],i=t.xref.map(function(z){return x.getFromId(e,z)}),T=t.xref.map(function(z,F){return g(i[F],x.getRefType(z),r,!1)})):(i=x.getFromId(e,t.xref),T=g(i,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return x.getFromId(e,z)}),l=t.yref.map(function(z,F){return g(s[F],x.getRefType(z),r,!0)})):(s=x.getFromId(e,t.yref),l=g(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=E(i[0],t.x0shift),f=E(i[1],t.x1shift),_=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=E(i,t.x0shift),f=E(i,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);_=z+t.x0+h,w=z+t.x1+f}else _=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")v=E(s[0],t.y0shift),c=E(s[1],t.y1shift),A=l[0](t.y0)+v,M=l[1](t.y1)+c;else if(v=E(s,t.y0shift),c=E(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+v,M=z-t.y1+c}else A=l(t.y0)+v,M=l(t.y1)+c;if(r==="line")return"M"+_+","+A+"L"+w+","+M;if(r==="rect")return"M"+_+","+A+"H"+w+"V"+M+"H"+_+"Z";var b=(_+w)/2,p=(A+M)/2,u=Math.abs(b-_),y=Math.abs(p-A),m="A"+u+","+y,R=b+u+","+p,L=b+","+(p-y);return"M"+R+m+" 0 1,1 "+L+m+" 0 0,1 "+R+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,n=e.ysizemode,i=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var v=0,c=0;return o.replace(V.segmentRE,function(T){var l=0,_=T.charAt(0),w=V.paramIsX[_],A=V.paramIsY[_],M=V.numParams[_];let g=w.drawn!==void 0,b=A.drawn!==void 0,p=h?t[v]:t,u=f?r[c]:r;var y=T.slice(1).replace(V.paramRE,function(m){return w[l]?a==="pixel"?m=p(i)+Number(m):m=p(m):A[l]&&(n==="pixel"?m=u(s)-Number(m):m=u(m)),l++,l>M&&(m="X"),m});return l>M&&(y=y.replace(/[\s,]*X.*/,""),d.log("Ignoring extra params in segment "+T)),g&&v++,b&&c++,_+y})}function E(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}}}),w5=He({"src/components/shapes/display_labels.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=ou(),E=es(),e=r0().readPaths,t=a0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;V.exports=function(h,f,v,c){if(c.selectAll(".shape-label").remove(),!!(v.label.text||v.label.texttemplate)){var T;if(v.label.texttemplate){var l={};if(v.type!=="path"){var _=x.getFromId(h,v.xref),w=x.getFromId(h,v.yref);let j=Array.isArray(v.xref),Q=Array.isArray(v.yref);for(var A in o){var M=typeof o[A]=="function",g=!j||o.simpleXVariables.includes(A),b=!Q||o.simpleYVariables.includes(A);if(M&&g&&b){var p=o[A](v,_,w);p!==void 0&&(l[A]=p)}}}T=d.texttemplateStringForShapes({data:[l],fallback:v.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:v.label.texttemplate})}else T=v.label.text;var u={"data-index":f},y=v.label.font,m={"data-notex":1},R=c.append("g").attr(u).classed("shape-label",!0),L=R.append("text").attr(m).classed("shape-label-text",!0).text(T),z,F,N,O;if(v.path){var P=r(h,v),U=e(P,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;B<U.length;B++)for(var X=0;X<U[B].length;X++)for(var $=U[B][X],le=1;le<$.length;le+=2){var ce=$[le],de=$[le+1];z=Math.min(z,ce),F=Math.max(F,ce),N=Math.min(N,de),O=Math.max(O,de)}}else{let j=Array.isArray(v.xref),Q=Array.isArray(v.yref),re=x.getFromId(h,j?v.xref[0]:v.xref),pe=x.getFromId(h,j?v.xref[1]:v.xref),we=x.getFromId(h,Q?v.yref[0]:v.yref),Se=x.getFromId(h,Q?v.yref[1]:v.yref),Ie=x.getRefType(j?v.xref[0]:v.xref),Re=x.getRefType(j?v.xref[1]:v.xref),We=x.getRefType(Q?v.yref[0]:v.yref),at=x.getRefType(Q?v.yref[1]:v.yref),nt=function(qe,he,ue,ne){return t.getDataToPixel(h,ue,he,!1,ne)(qe)},tt=function(qe,he,ue,ne){return t.getDataToPixel(h,ue,he,!0,ne)(qe)};z=nt(v.x0,v.x0shift,re,Ie),F=nt(v.x1,v.x1shift,pe,Re),N=tt(v.y0,v.y0shift,we,We),O=tt(v.y1,v.y1shift,Se,at)}var G=v.label.textangle;G==="auto"&&(v.type==="line"?G=n(z,N,F,O):G=0),L.call(function(j){return j.call(E.font,y).attr({}),S.convertToTspans(j,h),j});var Y=E.bBox(L.node()),ee=i(z,N,F,O,v,G,Y),q=ee.textx,se=ee.texty,ae=ee.xanchor;L.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:se,x:q,transform:"rotate("+G+","+q+","+se+")"}).call(S.positionText,q,se)}};function n(s,h,f,v){var c,T;return T=Math.abs(f-s),f>=s?c=h-v:c=v-h,-180/Math.PI*Math.atan2(c,T)}function i(s,h,f,v,c,T,l){var _=c.label.textposition,w=c.label.textangle,A=c.label.padding,M=c.type,g=Math.PI/180*T,b=Math.sin(g),p=Math.cos(g),u=c.label.xanchor,y=c.label.yanchor,m,R,L,z;if(M==="line"){_==="start"?(m=s,R=h):_==="end"?(m=f,R=v):(m=(s+f)/2,R=(h+v)/2),u==="auto"&&(_==="start"?w==="auto"?f>s?u="left":f<s?u="right":u="center":f>s?u="right":f<s?u="left":u="center":_==="end"?w==="auto"?f>s?u="right":f<s?u="left":u="center":f>s?u="left":f<s?u="right":u="center":u="center");var F={left:1,center:0,right:-1},N={bottom:-1,middle:0,top:1};if(w==="auto"){var O=N[y];L=-A*b*O,z=A*p*O}else{var P=F[u],U=N[y];L=A*P,z=A*U}m=m+L,R=R+z}else L=A+3,_.indexOf("right")!==-1?(m=Math.max(s,f)-L,u==="auto"&&(u="right")):_.indexOf("left")!==-1?(m=Math.min(s,f)+L,u==="auto"&&(u="left")):(m=(s+f)/2,u==="auto"&&(u="center")),_.indexOf("top")!==-1?R=Math.min(h,v):_.indexOf("bottom")!==-1?R=Math.max(h,v):R=(h+v)/2,z=A,y==="bottom"?R=R-z:y==="top"&&(R=R+z);var B=a[y],X=c.label.font.size,$=l.height,le=($*B-X)*b,ce=-($*B-X)*p;return{textx:m+le,texty:R+ce,xanchor:u}}}}),M2=He({"src/components/shapes/display_outlines.js"(Z,V){"use strict";var d=sa(),x=d.strTranslate,S=Ap(),E=Jd(),e=E.drawMode,t=E.selectMode,r=lo(),o=Jn(),a=T2(),n=a.i000,i=a.i090,s=a.i180,h=a.i270,f=$m(),v=f.clearOutlineControllers,c=r0(),T=c.pointsOnRectangle,l=c.pointsOnEllipse,_=c.writePaths,w=S2().newShapes,A=S2().createShapeObj,M=b5(),g=w5();V.exports=function y(m,R,L,z){z||(z=0);var F=L.gd;function N(){y(m,R,L,z++),(l(m[0])||L.hasText)&&O({redrawing:!0})}function O(tt){var qe={};L.isActiveShape!==void 0&&(L.isActiveShape=!1,qe=w(R,L)),L.isActiveSelection!==void 0&&(L.isActiveSelection=!1,qe=M(R,L),F._fullLayout._reselect=!0),Object.keys(qe).length&&r.call((tt||{}).redrawing?"relayout":"_guiRelayout",F,qe)}var P=F._fullLayout,U=P._zoomlayer,B=L.dragmode,X=e(B),$=t(B);(X||$)&&(F._fullLayout._outlining=!0),v(F),R.attr("d",_(m));var le,ce,de,G,Y;if(!z&&(L.isActiveShape||L.isActiveSelection)){Y=b([],m);var ee=U.append("g").attr("class","outline-controllers");we(ee),nt()}if(X&&L.hasText){var q=U.select(".label-temp"),se=A(R,L,L.dragmode);g(F,"label-temp",se,q)}function ae(tt){de=+tt.srcElement.getAttribute("data-i"),G=+tt.srcElement.getAttribute("data-j"),le[de][G].moveFn=j}function j(tt,qe){if(m.length){var he=Y[de][G][1],ue=Y[de][G][2],ne=m[de],Ce=ne.length;if(T(ne)){var Ye=tt,rt=qe;if(L.isActiveSelection){var Ke=p(ne,G);Ke[1]===ne[G][1]?rt=0:Ye=0}for(var Mt=0;Mt<Ce;Mt++)if(Mt!==G){var kt=ne[Mt];kt[1]===ne[G][1]&&(kt[1]=he+Ye),kt[2]===ne[G][2]&&(kt[2]=ue+rt)}if(ne[G][1]=he+Ye,ne[G][2]=ue+rt,!T(ne))for(var Nt=0;Nt<Ce;Nt++)for(var Gt=0;Gt<ne[Nt].length;Gt++)ne[Nt][Gt]=Y[de][Nt][Gt]}else ne[G][1]=he+tt,ne[G][2]=ue+qe;N()}}function Q(){O()}function re(){if(m.length&&m[de]&&m[de].length){for(var tt=[],qe=0;qe<m[de].length;qe++)qe!==G&&tt.push(m[de][qe]);tt.length>1&&!(tt.length===2&&tt[1][0]==="Z")&&(G===0&&(tt[0][0]="M"),m[de]=tt,N(),O())}}function pe(tt,qe){if(tt===2){de=+qe.srcElement.getAttribute("data-i"),G=+qe.srcElement.getAttribute("data-j");var he=m[de];!T(he)&&!l(he)&&re()}}function we(tt){le=[];for(var qe=0;qe<m.length;qe++){var he=m[qe],ue=T(he),ne=!ue&&l(he);le[qe]=[];for(var Ce=he.length,Ye=0;Ye<Ce;Ye++)if(he[Ye][0]!=="Z"&&!(ne&&Ye!==n&&Ye!==i&&Ye!==s&&Ye!==h)){var rt=ue&&L.isActiveSelection,Ke;rt&&(Ke=p(he,Ye));var Mt=he[Ye][1],kt=he[Ye][2],Nt=tt.append(rt?"rect":"circle").attr("data-i",qe).attr("data-j",Ye).style({fill:o.background,stroke:o.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(rt){var Gt=Ke[1]-Mt,Mr=Ke[2]-kt,mr=Mr?5:Math.max(Math.min(25,Math.abs(Gt)-5),5),qr=Gt?5:Math.max(Math.min(25,Math.abs(Mr)-5),5);Nt.classed(Mr?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",mr).attr("height",qr).attr("x",Mt-mr/2).attr("y",kt-qr/2).attr("transform",x(Gt/2,Mr/2))}else Nt.classed("cursor-grab",!0).attr("r",5).attr("cx",Mt).attr("cy",kt);le[qe][Ye]={element:Nt.node(),gd:F,prepFn:ae,doneFn:Q,clickFn:pe},S.init(le[qe][Ye])}}}function Se(tt,qe){if(m.length)for(var he=0;he<m.length;he++)for(var ue=0;ue<m[he].length;ue++)for(var ne=0;ne+2<m[he][ue].length;ne+=2)m[he][ue][ne+1]=Y[he][ue][ne+1]+tt,m[he][ue][ne+2]=Y[he][ue][ne+2]+qe}function Ie(tt,qe){Se(tt,qe),N()}function Re(tt){de=+tt.srcElement.getAttribute("data-i"),de||(de=0),ce[de].moveFn=Ie}function We(){O()}function at(tt){tt===2&&u(F)}function nt(){if(ce=[],!!m.length){var tt=0;ce[tt]={element:R[0][0],gd:F,prepFn:Re,doneFn:We,clickFn:at},S.init(ce[tt])}}};function b(y,m){for(var R=0;R<m.length;R++){var L=m[R];y[R]=[];for(var z=0;z<L.length;z++){y[R][z]=[];for(var F=0;F<L[z].length;F++)y[R][z][F]=L[z][F]}}return y}function p(y,m){var R=y[m][1],L=y[m][2],z=y.length,F,N,O;return F=(m+1)%z,N=y[F][1],O=y[F][2],N===R&&O===L&&(F=(m+2)%z,N=y[F][1],O=y[F][2]),[F,N,O]}function u(y){if(t(y._fullLayout.dragmode)){v(y);var m=y._fullLayout._activeSelectionIndex,R=(y.layout||{}).selections||[];if(m<R.length){for(var L=[],z=0;z<R.length;z++)z!==m&&L.push(R[z]);delete y._fullLayout._activeSelectionIndex;var F=y._fullLayout.selections[m];y._fullLayout._deselect={xref:F.xref,yref:F.yref},r.call("_guiRelayout",y,{selections:L})}}}}}),E2=He({"src/components/shapes/draw.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=sa(),E=Ho(),e=r0().readPaths,t=M2(),r=w5(),o=$m().clearOutlineControllers,a=Jn(),n=es(),i=zl().arrayEditor,s=Ap(),h=Kd(),f=L_(),v=a0(),c=v.getPathString;V.exports={draw:T,drawOne:w,eraseActiveShape:y,drawLabel:r};function T(m){var R=m._fullLayout;R._shapeUpperLayer.selectAll("path").remove(),R._shapeLowerLayer.selectAll("path").remove(),R._shapeUpperLayer.selectAll("text").remove(),R._shapeLowerLayer.selectAll("text").remove();for(var L in R._plots){var z=R._plots[L].shapelayer;z&&(z.selectAll("path").remove(),z.selectAll("text").remove())}for(var F=0;F<R.shapes.length;F++)R.shapes[F].visible===!0&&w(m,F)}function l(m){return!!m._fullLayout._outlining}function _(m){return!m._context.edits.shapePosition}function w(m,R){m._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+R+'"]').remove();var L=v.makeShapesOptionsAndPlotinfo(m,R),z=L.options,F=L.plotinfo;if(!z._input||z.visible!==!0)return;let N=Array.isArray(z.xref)||Array.isArray(z.yref);if(z.layer==="above")P(m._fullLayout._shapeUpperLayer);else if(z.xref.includes("paper")||z.yref.includes("paper"))P(m._fullLayout._shapeLowerLayer);else if(z.layer==="between"&&!N)P(F.shapelayerBetween);else if(F._hadPlotinfo){var O=F.mainplotinfo||F;P(O.shapelayer)}else P(m._fullLayout._shapeLowerLayer);function P(U){var B=c(m,z),X={"data-index":R,"fill-rule":z.fillrule,d:B},$=z.opacity,le=z.fillcolor,ce=z.line.width?z.line.color:"rgba(0,0,0,0)",de=z.line.width,G=z.line.dash;!de&&z.editable===!0&&(de=5,G="solid");var Y=B[B.length-1]!=="Z",ee=_(m)&&z.editable&&m._fullLayout._activeShapeIndex===R;ee&&(le=Y?"rgba(0,0,0,0)":m._fullLayout.activeshape.fillcolor,$=m._fullLayout.activeshape.opacity);var q=U.append("g").classed("shape-group",!0).attr({"data-index":R}),se=q.append("path").attr(X).style("opacity",$).call(a.stroke,ce).call(a.fill,le).call(n.dashLine,G,de);A(q,m,z),r(m,R,z,q);var ae;if((ee||m._context.edits.shapePosition)&&(ae=i(m.layout,"shapes",z)),ee){se.style({cursor:"move"});var j={element:se.node(),plotinfo:F,gd:m,editHelpers:ae,hasText:z.label.text||z.label.texttemplate,isActiveShape:!0},Q=e(B,m);t(Q,se,j)}else m._context.edits.shapePosition?g(m,se,z,R,U,ae):z.editable===!0&&se.style("pointer-events",Y||a.opacity(le)*$<=.5?"stroke":"all");se.node().addEventListener("click",function(){return p(m,se)})}}function A(m,R,L){let z=L.xref,F=L.yref;if(Array.isArray(z)||Array.isArray(F)){let N="clip"+R._fullLayout._uid+"shape"+L._index,O=M(R,z,F);S.ensureSingleById(R._fullLayout._clips,"clipPath",N,function(P){P.append("rect")}).select("rect").attr(O),n.setClipUrl(m,N,R)}else{let N=(z+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(m,N?"clip"+R._fullLayout._uid+N:null,R)}}function M(m,R,L){let z=m._fullLayout._size;function F(P,U){let B=(Array.isArray(P)?P:[P]).map(le=>E.getFromId(m,le)).filter(Boolean);if(!B.length)return U?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=B.map(function(le){return le._offset}),$=B.map(function(le){return le._offset+le._length});return[Math.min(...X),Math.max(...$)]}let N=F(R,!1),O=F(L,!0);return{x:N[0],y:O[0],width:N[1]-N[0],height:O[1]-O[0]}}function g(m,R,L,z,F,N){var O=10,P=10,U=L.xsizemode==="pixel",B=L.ysizemode==="pixel",X=L.type==="line",$=L.type==="path",le=N.modifyItem,ce,de,G,Y,ee,q,se,ae,j,Q,re,pe,we,Se,Ie,Re=d.select(R.node().parentNode),We=E.getFromId(m,L.xref),at=E.getRefType(L.xref),nt=E.getFromId(m,L.yref),tt=E.getRefType(L.yref),qe=L.x0shift,he=L.x1shift,ue=L.y0shift,ne=L.y1shift,Ce=function(Ue,Ze){var st=v.getDataToPixel(m,We,Ze,!1,at);return st(Ue)},Ye=function(Ue,Ze){var st=v.getDataToPixel(m,nt,Ze,!0,tt);return st(Ue)},rt=v.getPixelToData(m,We,!1,at),Ke=v.getPixelToData(m,nt,!0,tt),Mt=Gt(),kt={element:Mt.node(),gd:m,prepFn:qr,doneFn:Er,clickFn:Ir},Nt;s.init(kt),Mt.node().onmousemove=mr;function Gt(){return X?Mr():R}function Mr(){var Ue=10,Ze=Math.max(L.line.width,Ue),st=F.append("g").attr("data-index",z).attr("drag-helper",!0);st.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Ze,"stroke-opacity":"0"});var ut={"fill-opacity":"0"},Ut=Math.max(Ze/2,Ue);return st.append("circle").attr({"data-line-point":"start-point",cx:U?Ce(L.xanchor)+L.x0:Ce(L.x0,qe),cy:B?Ye(L.yanchor)-L.y0:Ye(L.y0,ue),r:Ut}).style(ut).classed("cursor-grab",!0),st.append("circle").attr({"data-line-point":"end-point",cx:U?Ce(L.xanchor)+L.x1:Ce(L.x1,he),cy:B?Ye(L.yanchor)-L.y1:Ye(L.y1,ne),r:Ut}).style(ut).classed("cursor-grab",!0),st}function mr(Ue){if(l(m)){Nt=null;return}if(X)Ue.target.tagName==="path"?Nt="move":Nt=Ue.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ze=kt.element.getBoundingClientRect(),st=Ze.right-Ze.left,ut=Ze.bottom-Ze.top,Ut=Ue.clientX-Ze.left,Ct=Ue.clientY-Ze.top,Pt=!$&&st>O&&ut>P&&!Ue.shiftKey?s.getCursor(Ut/st,1-Ct/ut):"move";h(R,Pt),Nt=Pt.split("-")[0]}}function qr(Ue){l(m)||(U&&(ee=Ce(L.xanchor)),B&&(q=Ye(L.yanchor)),L.type==="path"?Ie=L.path:(ce=U?L.x0:Ce(L.x0),de=B?L.y0:Ye(L.y0),G=U?L.x1:Ce(L.x1),Y=B?L.y1:Ye(L.y1)),ce<G?(j=ce,we="x0",Q=G,Se="x1"):(j=G,we="x1",Q=ce,Se="x0"),!B&&de<Y||B&&de>Y?(se=de,re="y0",ae=Y,pe="y1"):(se=Y,re="y1",ae=de,pe="y0"),mr(Ue),Je(F,L),Le(R,L,m),kt.moveFn=Nt==="move"?_t:Oe,kt.altKey=Ue.altKey)}function Er(){l(m)||(h(R),Ae(F),A(R,m,L),x.call("_guiRelayout",m,N.getUpdateObj()))}function Ir(){l(m)||Ae(F)}function _t(Ue,Ze){if(L.type==="path"){var st=function(Ct){return Ct},ut=st,Ut=st;U?le("xanchor",L.xanchor=rt(ee+Ue)):(ut=function(Pt){return rt(Ce(Pt)+Ue)},We&&We.type==="date"&&(ut=v.encodeDate(ut))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(Ut=function(Pt){return Ke(Ye(Pt)+Ze)},nt&&nt.type==="date"&&(Ut=v.encodeDate(Ut))),le("path",L.path=b(Ie,ut,Ut))}else U?le("xanchor",L.xanchor=rt(ee+Ue)):(le("x0",L.x0=rt(ce+Ue)),le("x1",L.x1=rt(G+Ue))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(le("y0",L.y0=Ke(de+Ze)),le("y1",L.y1=Ke(Y+Ze)));R.attr("d",c(m,L)),Je(F,L),r(m,z,L,Re)}function Oe(Ue,Ze){if($){var st=function(hi){return hi},ut=st,Ut=st;U?le("xanchor",L.xanchor=rt(ee+Ue)):(ut=function(wi){return rt(Ce(wi)+Ue)},We&&We.type==="date"&&(ut=v.encodeDate(ut))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(Ut=function(wi){return Ke(Ye(wi)+Ze)},nt&&nt.type==="date"&&(Ut=v.encodeDate(Ut))),le("path",L.path=b(Ie,ut,Ut))}else if(X){if(Nt==="resize-over-start-point"){var Ct=ce+Ue,Pt=B?de-Ze:de+Ze;le("x0",L.x0=U?Ct:rt(Ct)),le("y0",L.y0=B?Pt:Ke(Pt))}else if(Nt==="resize-over-end-point"){var jt=G+Ue,fr=B?Y-Ze:Y+Ze;le("x1",L.x1=U?jt:rt(jt)),le("y1",L.y1=B?fr:Ke(fr))}}else{var ur=function(hi){return Nt.indexOf(hi)!==-1},sr=ur("n"),Pr=ur("s"),Ta=ur("w"),Oa=ur("e"),Ia=sr?se+Ze:se,qa=Pr?ae+Ze:ae,Wa=Ta?j+Ue:j,Ca=Oa?Q+Ue:Q;B&&(sr&&(Ia=se-Ze),Pr&&(qa=ae-Ze)),(!B&&qa-Ia>P||B&&Ia-qa>P)&&(le(re,L[re]=B?Ia:Ke(Ia)),le(pe,L[pe]=B?qa:Ke(qa))),Ca-Wa>O&&(le(we,L[we]=U?Wa:rt(Wa)),le(Se,L[Se]=U?Ca:rt(Ca)))}R.attr("d",c(m,L)),Je(F,L),r(m,z,L,Re)}function Je(Ue,Ze){(U||B)&&st();function st(){var ut=Ze.type!=="path",Ut=Ue.selectAll(".visual-cue").data([0]),Ct=1;Ut.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var Pt=Ce(U?Ze.xanchor:S.midRange(ut?[Ze.x0,Ze.x1]:v.extractPathCoords(Ze.path,f.paramIsX))),jt=Ye(B?Ze.yanchor:S.midRange(ut?[Ze.y0,Ze.y1]:v.extractPathCoords(Ze.path,f.paramIsY)));if(Pt=v.roundPositionForSharpStrokeRendering(Pt,Ct),jt=v.roundPositionForSharpStrokeRendering(jt,Ct),U&&B){var fr="M"+(Pt-1-Ct)+","+(jt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ut.attr("d",fr)}else if(U){var ur="M"+(Pt-1-Ct)+","+(jt-9-Ct)+"v18 h2 v-18 Z";Ut.attr("d",ur)}else{var sr="M"+(Pt-9-Ct)+","+(jt-1-Ct)+"h18 v2 h-18 Z";Ut.attr("d",sr)}}}function Ae(Ue){Ue.selectAll(".visual-cue").remove()}function Le(Ue,Ze,st){var ut=Ze.xref,Ut=Ze.yref,Ct=E.getFromId(st,ut),Pt=E.getFromId(st,Ut),jt="";ut!=="paper"&&!Ct.autorange&&(jt+=ut),Ut!=="paper"&&!Pt.autorange&&(jt+=Ut),n.setClipUrl(Ue,jt?"clip"+st._fullLayout._uid+jt:null,st)}}function b(m,R,L){return m.replace(f.segmentRE,function(z){var F=0,N=z.charAt(0),O=f.paramIsX[N],P=f.paramIsY[N],U=f.numParams[N],B=z.slice(1).replace(f.paramRE,function(X){return F>=U||(O[F]?X=R(X):P[F]&&(X=L(X)),F++),X});return N+B})}function p(m,R){if(_(m)){var L=R.node(),z=+L.getAttribute("data-index");if(z>=0){if(z===m._fullLayout._activeShapeIndex){u(m);return}m._fullLayout._activeShapeIndex=z,m._fullLayout._deactivateShape=u,T(m)}}}function u(m){if(_(m)){var R=m._fullLayout._activeShapeIndex;R>=0&&(o(m),delete m._fullLayout._activeShapeIndex,T(m))}}function y(m){if(_(m)){o(m);var R=m._fullLayout._activeShapeIndex,L=(m.layout||{}).shapes||[];if(R<L.length){for(var z=[],F=0;F<L.length;F++)F!==R&&z.push(L[F]);return delete m._fullLayout._activeShapeIndex,x.call("_guiRelayout",m,{shapes:z})}}}}}),T5=He({"src/components/modebar/buttons.js"(Z,V){"use strict";var d=lo(),x=bc(),S=ef(),E=w2(),e=E2().eraseActiveShape,t=sa(),r=t._,o=V.exports={};o.toImage={name:"toImage",title:function(M){var g=M._context.toImageButtonOptions||{},b=g.format||"png";return b==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:E.camera,click:function(M){var g=M._context.toImageButtonOptions,b={format:g.format||"png"};t.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long",M),["filename","width","height","scale"].forEach(function(p){p in g&&(b[p]=g[p])}),d.call("downloadImage",M,b).then(function(p){t.notifier(r(M,"Snapshot succeeded")+" - "+p,"long",M)}).catch(function(){t.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long",M)})}},o.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:E.disk,click:function(M){x.sendDataToCloud(M)}},o.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:E.pencil,click:function(M){x.sendDataToCloud(M)}},o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:E.zoombox,click:a},o.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:E.pan,click:a},o.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:E.selectbox,click:a},o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:E.lasso,click:a},o.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:E.drawclosedpath,click:a},o.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:E.drawopenpath,click:a},o.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:E.drawline,click:a},o.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:E.drawrect,click:a},o.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:E.drawcircle,click:a},o.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:E.eraseshape,click:e},o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:E.zoom_plus,click:a},o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:E.zoom_minus,click:a},o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:E.autoscale,click:a},o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:E.home,click:a},o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:E.tooltip_basic,gravity:"ne",click:a},o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:E.tooltip_compare,gravity:"ne",click:a};function a(M,g){var b=g.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout,m={},R=S.list(M,null,!0),L=y._cartesianSpikesEnabled,z,F;if(p==="zoom"){var N=u==="in"?.5:2,O=(1+N)/2,P=(1-N)/2,U,B;for(F=0;F<R.length;F++)if(z=R[F],B=z.modebardisable==="none"||z.modebardisable.indexOf(u==="auto"||u==="reset"?"autoscale":"zoominout")===-1,B&&!z.fixedrange)if(U=z._name,u==="auto")m[U+".autorange"]=!0;else if(u==="reset")z._rangeInitial0===void 0&&z._rangeInitial1===void 0?m[U+".autorange"]=!0:z._rangeInitial0===void 0?(m[U+".autorange"]=z._autorangeInitial,m[U+".range"]=[null,z._rangeInitial1]):z._rangeInitial1===void 0?(m[U+".range"]=[z._rangeInitial0,null],m[U+".autorange"]=z._autorangeInitial):m[U+".range"]=[z._rangeInitial0,z._rangeInitial1],z._showSpikeInitial!==void 0&&(m[U+".showspikes"]=z._showSpikeInitial,L==="on"&&!z._showSpikeInitial&&(L="off"));else{var X=[z.r2l(z.range[0]),z.r2l(z.range[1])],$=[O*X[0]+P*X[1],O*X[1]+P*X[0]];m[U+".range[0]"]=z.l2r($[0]),m[U+".range[1]"]=z.l2r($[1])}}else p==="hovermode"&&(u==="x"||u==="y")&&(u=y._isHoriz?"y":"x",b.setAttribute("data-val",u)),m[p]=u;y._cartesianSpikesEnabled=L,d.call("_guiRelayout",M,m)}o.zoom3d={name:"zoom3d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:E.zoombox,click:n},o.pan3d={name:"pan3d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"scene.dragmode",val:"pan",icon:E.pan,click:n},o.orbitRotation={name:"orbitRotation",title:function(M){return r(M,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:E["3d_rotate"],click:n},o.tableRotation={name:"tableRotation",title:function(M){return r(M,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:E["z-axis"],click:n};function n(M,g){for(var b=g.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout._subplots.gl3d||[],m={},R=p.split("."),L=0;L<y.length;L++)m[y[L]+"."+R[1]]=u;var z=u==="pan"?u:"zoom";m.dragmode=z,d.call("_guiRelayout",M,m)}o.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(M){return r(M,"Reset camera to default")},attr:"resetDefault",icon:E.home,click:i},o.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(M){return r(M,"Reset camera to last save")},attr:"resetLastSave",icon:E.movie,click:i};function i(M,g){for(var b=g.currentTarget,p=b.getAttribute("data-attr"),u=p==="resetLastSave",y=p==="resetDefault",m=M._fullLayout,R=m._subplots.gl3d||[],L={},z=0;z<R.length;z++){var F=R[z],N=F+".camera",O=F+".aspectratio",P=F+".aspectmode",U=m[F]._scene,B;u?(L[N+".up"]=U.viewInitial.up,L[N+".eye"]=U.viewInitial.eye,L[N+".center"]=U.viewInitial.center,B=!0):y&&(L[N+".up"]=null,L[N+".eye"]=null,L[N+".center"]=null,B=!0),B&&(L[O+".x"]=U.viewInitial.aspectratio.x,L[O+".y"]=U.viewInitial.aspectratio.y,L[O+".z"]=U.viewInitial.aspectratio.z,L[P]=U.viewInitial.aspectmode)}d.call("_guiRelayout",M,L)}o.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(M){return r(M,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:E.tooltip_basic,gravity:"ne",click:h};function s(M,g){var b=g.currentTarget,p=b._previousVal,u=M._fullLayout,y=u._subplots.gl3d||[],m=["xaxis","yaxis","zaxis"],R={},L={};if(p)L=p,b._previousVal=null;else{for(var z=0;z<y.length;z++){var F=y[z],N=u[F],O=F+".hovermode";R[O]=N.hovermode,L[O]=!1;for(var P=0;P<3;P++){var U=m[P],B=F+"."+U+".showspikes";L[B]=!1,R[B]=N[U].showspikes}}b._previousVal=R}return L}function h(M,g){var b=s(M,g);d.call("_guiRelayout",M,b)}o.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:E.zoom_plus,click:f},o.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:E.zoom_minus,click:f},o.resetGeo={name:"resetGeo",_cat:"reset",title:function(M){return r(M,"Reset")},attr:"reset",val:null,icon:E.autoscale,click:f},o.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(M){return r(M,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:E.tooltip_basic,gravity:"ne",click:c};function f(M,g){for(var b=g.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout,m=y._subplots.geo||[],R=0;R<m.length;R++){var L=m[R],z=y[L];if(p==="zoom"){var F=z.projection.scale,N=u==="in"?2*F:.5*F;d.call("_guiRelayout",M,L+".projection.scale",N)}}p==="reset"&&A(M,"geo")}o.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(M){return r(M,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:E.tooltip_basic,gravity:"ne",click:c};function v(M){var g=M._fullLayout;return g.hovermode?!1:g._has("cartesian")?g._isHoriz?"y":"x":"closest"}function c(M){var g=v(M);d.call("_guiRelayout",M,"hovermode",g)}o.resetViewSankey={name:"resetSankeyGroup",title:function(M){return r(M,"Reset view")},icon:E.home,click:function(M){for(var g={"node.groups":[],"node.x":[],"node.y":[]},b=0;b<M._fullData.length;b++){var p=M._fullData[b]._viewInitial;g["node.groups"].push(p.node.groups.slice()),g["node.x"].push(p.node.x.slice()),g["node.y"].push(p.node.y.slice())}d.call("restyle",M,g)}},o.toggleHover={name:"toggleHover",title:function(M){return r(M,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:E.tooltip_basic,gravity:"ne",click:function(M,g){var b=s(M,g);b.hovermode=v(M),d.call("_guiRelayout",M,b)}},o.resetViews={name:"resetViews",title:function(M){return r(M,"Reset views")},icon:E.home,click:function(M,g){var b=g.currentTarget;b.setAttribute("data-attr","zoom"),b.setAttribute("data-val","reset"),a(M,g),b.setAttribute("data-attr","resetLastSave"),i(M,g),A(M,"geo"),A(M,"mapbox"),A(M,"map")}},o.toggleSpikelines={name:"toggleSpikelines",title:function(M){return r(M,"Toggle Spike Lines")},icon:E.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(M){var g=M._fullLayout,b=g._cartesianSpikesEnabled;g._cartesianSpikesEnabled=b==="on"?"off":"on",d.call("_guiRelayout",M,T(M))}};function T(M){for(var g=M._fullLayout,b=g._cartesianSpikesEnabled==="on",p=S.list(M,null,!0),u={},y=0;y<p.length;y++){var m=p[y];u[m._name+".showspikes"]=b?!0:m._showSpikeInitial}return u}o.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(M){return r(M,"Reset view")},attr:"reset",icon:E.home,click:function(M){A(M,"mapbox")}},o.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(M){return r(M,"Reset view")},attr:"reset",icon:E.home,click:function(M){A(M,"map")}},o.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:E.zoom_plus,click:l},o.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:E.zoom_plus,click:_},o.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:E.zoom_minus,click:l},o.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:E.zoom_minus,click:_};function l(M,g){w(M,g,"mapbox")}function _(M,g){w(M,g,"map")}function w(M,g,b){for(var p=g.currentTarget,u=p.getAttribute("data-val"),y=M._fullLayout,m=y._subplots[b]||[],R=1.05,L={},z=0;z<m.length;z++){var F=m[z],N=y[F].zoom,O=u==="in"?R*N:N/R;L[F+".zoom"]=O}d.call("_guiRelayout",M,L)}function A(M,g){for(var b=M._fullLayout,p=b._subplots[g]||[],u={},y=0;y<p.length;y++)for(var m=p[y],R=b[m]._subplot,L=R.viewInitial,z=Object.keys(L),F=0;F<z.length;F++){var N=z[F];u[m+"."+N]=L[N]}d.call("_guiRelayout",M,u)}}}),A5=He({"src/components/modebar/constants.js"(Z,V){"use strict";var d=T5(),x=Object.keys(d),S=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],E=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(S),e=[],t=function(r){if(E.indexOf(r._cat||r.name)===-1){var o=r.name,a=(r._cat||r.name).toLowerCase();e.indexOf(o)===-1&&e.push(o),e.indexOf(a)===-1&&e.push(a)}};x.forEach(function(r){t(d[r])}),e.sort(),V.exports={DRAW_MODES:S,backButtons:E,foreButtons:e}}}),S5=He({"src/components/modebar/attributes.js"(Z,V){"use strict";var d=A5();V.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}}),bz=He({"src/components/modebar/defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=S5();V.exports=function(t,r){var o=t.modebar||{},a=S.newContainer(r,"modebar");function n(s,h){return d.coerce(o,a,E,s,h)}n("orientation"),n("bgcolor",x.addOpacity(r.paper_bgcolor,.5));var i=x.contrast(x.rgb(r.modebar.bgcolor));n("color",x.addOpacity(i,.3)),n("activecolor",x.addOpacity(i,.7)),n("uirevision",r.uirevision),n("add"),n("remove")}}}),wz=He({"src/components/modebar/modebar.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=w2(),e=fp().version,t=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var o=r.prototype;o.update=function(i,s){this.graphInfo=i;var h=this.graphInfo._context,f=this.graphInfo._fullLayout,v="modebar-"+f._uid;this.element.setAttribute("id",v),this.element.setAttribute("role","toolbar"),this._uid=v,this.element.className="modebar modebar--custom",h.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),f.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var c=f.modebar,T="#"+v+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=c.bgcolor});var l=!this.hasButtons(s),_=this.hasLogo!==h.displaylogo,w=this.locale!==h.locale;if(this.locale=h.locale,(l||_||w)&&(this.removeAllButtons(),this.updateButtons(s),h.watermark||h.displaylogo)){var A=this.getLogo();h.watermark&&(A.className=A.className+" watermark"),f.modebar.orientation==="v"?this.element.insertBefore(A,this.element.childNodes[0]):this.element.appendChild(A),this.hasLogo=!0}this.updateActiveButton(),S.setStyleOnHover("#"+v+" .modebar-btn",".active",".icon path","fill: "+c.activecolor,"fill: "+c.color,this.element)},o.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(h){var f=s.createGroup();h.forEach(function(v){var c=v.name;if(!c)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(c)!==-1)throw new Error("button name '"+c+"' is taken");s.buttonsNames.push(c);var T=s.createButton(v);s.buttonElements.push(T),f.appendChild(T)}),s.element.appendChild(f)})},o.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=s.bgcolor,i},o.createButton=function(i){var s=this,h=document.createElement("button");h.setAttribute("type","button"),h.setAttribute("rel","tooltip"),h.className="modebar-btn";var f=i.title;f===void 0?f=i.name:typeof f=="function"&&(f=f(this.graphInfo)),(f||f===0)&&(h.setAttribute("data-title",f),h.setAttribute("aria-label",f)),i.attr!==void 0&&h.setAttribute("data-attr",i.attr);var v=i.val;v!==void 0&&(typeof v=="function"&&(v=v(this.graphInfo)),h.setAttribute("data-val",v));var c=i.click;if(typeof c!="function")throw new Error("must provide button 'click' function in button config");h.addEventListener("click",function(l){i.click(s.graphInfo,l),s.updateActiveButton(l.currentTarget)}),h.setAttribute("data-toggle",i.toggle||!1),i.toggle&&d.select(h).classed("active",!0);var T=i.icon;return typeof T=="function"?h.appendChild(T()):h.appendChild(this.createIcon(T||E.question)),h.setAttribute("data-gravity",i.gravity||"n"),h},o.createIcon=function(i){var s=x(i.height)?Number(i.height):i.ascent-i.descent,h="http://www.w3.org/2000/svg",f;if(i.path){f=document.createElementNS(h,"svg"),f.setAttribute("viewBox",[0,0,i.width,s].join(" ")),f.setAttribute("class","icon");var v=document.createElementNS(h,"path");v.setAttribute("d",i.path),i.transform?v.setAttribute("transform",i.transform):i.ascent!==void 0&&v.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),f.appendChild(v)}if(i.svg){var c=t.parseFromString(i.svg,"application/xml");f=c.childNodes[0]}return f.setAttribute("height","1em"),f.setAttribute("width","1em"),f},o.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,h=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(f){var v=f.getAttribute("data-val")||!0,c=f.getAttribute("data-attr"),T=f.getAttribute("data-toggle")==="true",l=d.select(f),_=function(M,g){var b=s.modebar,p=M.querySelector(".icon path");p&&(g||M.matches(":hover")?p.style.fill=b.activecolor:p.style.fill=b.color)};if(T){if(c===h){var w=!l.classed("active");l.classed("active",w),_(f,w)}}else{var A=c===null?c:S.nestedProperty(s,c).get();l.classed("active",A===v),_(f,A===v)}})},o.hasButtons=function(i){var s=this.buttons;if(!s||i.length!==s.length)return!1;for(var h=0;h<i.length;++h){if(i[h].length!==s[h].length)return!1;for(var f=0;f<i[h].length;f++)if(i[h][f].name!==s[h][f].name)return!1}return!0};function a(i){return i+" (v"+e+")"}o.getLogo=function(){var i=this.createGroup(),s=document.createElement("a");return s.href="https://plotly.com/",s.target="_blank",s.setAttribute("data-title",a(S._(this.graphInfo,"Produced with Plotly.js"))),s.className="modebar-btn plotlyjsicon modebar-btn--logo",s.appendChild(this.createIcon(E.newplotlylogo)),i.appendChild(s),i},o.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},o.destroy=function(){S.removeElement(this.container.querySelector(".modebar"))};function n(i,s){var h=i._fullLayout,f=new r({graphInfo:i,container:h._modebardiv.node(),buttons:s});return h._privateplot&&d.select(f.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),f}V.exports=n}}),Tz=He({"src/components/modebar/manage.js"(Z,V){"use strict";var d=ef(),x=Fu(),S=lo(),E=$p().isUnifiedHover,e=wz(),t=T5(),r=A5().DRAW_MODES,o=sa().extendDeep;V.exports=function(c){var T=c._fullLayout,l=c._context,_=T._modeBar;if(!l.displayModeBar&&!l.watermark){_&&(_.destroy(),delete T._modeBar);return}if(!Array.isArray(l.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(l.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var w=l.modeBarButtons,A;Array.isArray(w)&&w.length?A=f(w):!l.displayModeBar&&l.watermark?A=[]:A=a(c),_?_.update(c,A):T._modeBar=e(c,A)};function a(v){var c=v._fullLayout,T=v._fullData,l=v._context;function _(j,Q){if(typeof Q=="string"){if(Q.toLowerCase()===j.toLowerCase())return!0}else{var re=Q.name,pe=Q._cat||Q.name;if(re===j||pe===j.toLowerCase())return!0}return!1}var w=c.modebar.add;typeof w=="string"&&(w=[w]);var A=c.modebar.remove;typeof A=="string"&&(A=[A]);var M=l.modeBarButtonsToAdd.concat(w.filter(function(j){for(var Q=0;Q<l.modeBarButtonsToRemove.length;Q++)if(_(j,l.modeBarButtonsToRemove[Q]))return!1;return!0})),g=l.modeBarButtonsToRemove.concat(A.filter(function(j){for(var Q=0;Q<l.modeBarButtonsToAdd.length;Q++)if(_(j,l.modeBarButtonsToAdd[Q]))return!1;return!0})),b=c._has("cartesian"),p=c._has("gl3d"),u=c._has("geo"),y=c._has("pie"),m=c._has("funnelarea"),R=c._has("ternary"),L=c._has("mapbox"),z=c._has("map"),F=c._has("polar"),N=c._has("smith"),O=c._has("sankey"),P=n(c),U=E(c.hovermode),B=[];function X(j){if(j.length){for(var Q=[],re=0;re<j.length;re++){for(var pe=j[re],we=t[pe],Se=we.name.toLowerCase(),Ie=(we._cat||we.name).toLowerCase(),Re=!1,We=0;We<g.length;We++){var at=g[We].toLowerCase();if(at===Se||at===Ie){Re=!0;break}}Re||Q.push(t[pe])}B.push(Q)}}var $=["toImage"];l.showEditInChartStudio?$.push("editInChartStudio"):l.showSendToCloud&&$.push("sendDataToCloud"),X($);var le=[],ce=[],de=[],G=[];(b||y||m||R)+u+p+L+z+F+N>1?(ce=["toggleHover"],de=["resetViews"]):u?(le=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):p?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):L?(le=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(le=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):y?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!P&&(le=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),p?G=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!P||R?G=["zoom2d","pan2d"]:L||z||u?G=["pan2d"]:F&&(G=["zoom2d"]),i(T)&&G.push("select2d","lasso2d");var Y=[],ee=function(j){Y.indexOf(j)===-1&&ce.indexOf(j)!==-1&&Y.push(j)};if(Array.isArray(M)){for(var q=[],se=0;se<M.length;se++){var ae=M[se];typeof ae=="string"?(ae=ae.toLowerCase(),r.indexOf(ae)!==-1?(c._has("mapbox")||c._has("map")||c._has("cartesian"))&&G.push(ae):ae==="togglespikelines"?ee("toggleSpikelines"):ae==="togglehover"?ee("toggleHover"):ae==="hovercompare"?ee("hoverCompareCartesian"):ae==="hoverclosest"?(ee("hoverClosestCartesian"),ee("hoverClosestGeo"),ee("hoverClosest3d"),ee("hoverClosestPie")):ae==="v1hovermode"&&(ee("hoverClosestCartesian"),ee("hoverCompareCartesian"),ee("hoverClosestGeo"),ee("hoverClosest3d"),ee("hoverClosestPie"))):q.push(ae)}M=q}return X(G),X(le.concat(de)),X(Y),h(B,M)}function n(v){for(var c=d.list({_fullLayout:v},null,!0),T=0;T<c.length;T++){var l=c[T].modebardisable;if(!c[T].fixedrange&&l!=="autoscale+zoominout"&&l!=="zoominout+autoscale")return!1}return!0}function i(v){for(var c=!1,T=0;T<v.length&&!c;T++){var l=v[T];!l._module||!l._module.selectPoints||(S.traceIs(l,"scatter-like")?(x.hasMarkers(l)||x.hasText(l))&&(c=!0):S.traceIs(l,"box-violin")?(l.boxpoints==="all"||l.points==="all")&&(c=!0):c=!0)}return c}function s(v){for(var c=0;c<v.length;c++)if(!S.traceIs(v[c],"noHover"))return!1;return!0}function h(v,c){if(c.length)if(Array.isArray(c[0]))for(var T=0;T<c.length;T++)v.push(c[T]);else v.push(c);return v}function f(v){for(var c=o([],v),T=0;T<c.length;T++)for(var l=c[T],_=0;_<l.length;_++){var w=l[_];if(typeof w=="string")if(t[w]!==void 0)c[T][_]=t[w];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return c}}}),M5=He({"src/components/modebar/index.js"(Z,V){"use strict";V.exports={moduleType:"component",name:"modebar",layoutAttributes:S5(),supplyLayoutDefaults:bz(),manage:Tz()}}}),E5=He({"src/plots/cartesian/scale_zoom.js"(Z,V){"use strict";var d=uh().FROM_BL;V.exports=function(S,E,e){e===void 0&&(e=d[S.constraintoward||"center"]);var t=[S.r2l(S.range[0]),S.r2l(S.range[1])],r=t[0]+(t[1]-t[0])*e;S.range=S._input.range=[S.l2r(r+(t[0]-r)*E),S.l2r(r+(t[1]-r)*E)],S.setScale()}}}),J0=He({"src/plots/cartesian/constraints.js"(Z){"use strict";var V=sa(),d=Yd(),x=ef().id2name,S=Wh(),E=E5(),e=wv(),t=Ws().ALMOST_EQUAL,r=uh().FROM_BL;Z.handleDefaults=function(v,c,T){var l=T.axIds,_=T.axHasImage,w=c._axisConstraintGroups=[],A=c._axisMatchGroups=[],M,g,b,p,u,y,m,R;for(M=0;M<l.length;M++)p=x(l[M]),u=v[p],y=c[p],o(u,y,{axIds:l,layoutOut:c,hasImage:_[p]});function L($,le){for(M=0;M<$.length;M++){g=$[M];for(b in g)c[x(b)][le]=g}}for(L(A,"_matchGroup"),M=0;M<w.length;M++){g=w[M];for(b in g)if(y=c[x(b)],y.fixedrange){for(var z in g){var F=x(z);(v[F]||{}).fixedrange===!1&&V.warn("fixedrange was specified as false for axis "+F+" but was overridden because another axis in its constraint group has fixedrange true"),c[F].fixedrange=!0}break}}for(M=0;M<w.length;){g=w[M];for(b in g){y=c[x(b)],y._matchGroup&&Object.keys(y._matchGroup).length===Object.keys(g).length&&(w.splice(M,1),M--);break}M++}L(w,"_constraintGroup");var N=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],O=!1,P=!1;function U(){R=y[m],m==="rangebreaks"&&(P=y._hasDayOfWeekBreaks)}for(M=0;M<A.length;M++){g=A[M];for(var B=0;B<N.length;B++){m=N[B],R=null;var X;for(b in g)if(p=x(b),u=v[p],y=c[p],m in y){if(!y.matches&&(X=y,m in u)){U();break}R===null&&m in u&&U()}if(m==="range"&&R&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(O=!0),m==="autorange"&&R===null&&O&&(R=!1),R===null&&m in X&&(R=X[m]),R!==null)for(b in g)y=c[x(b)],y[m]=m==="range"?R.slice():R,m==="rangebreaks"&&(y._hasDayOfWeekBreaks=P,e(y,c))}}};function o(v,c,T){var l=T.axIds,_=T.layoutOut,w=T.hasImage,A=_._axisConstraintGroups,M=_._axisMatchGroups,g=c._id,b=g.charAt(0),p=((_._splomAxes||{})[b]||{})[g]||{},u=c._id,y=u.charAt(0)==="x";c._matchGroup=null,c._constraintGroup=null;function m(G,Y){return V.coerce(v,c,S,G,Y)}m("constrain",w?"domain":"range"),V.coerce(v,c,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var R=c.type,L,z,F=[];for(L=0;L<l.length;L++)if(z=l[L],z!==u){var N=_[x(z)];N.type===R&&F.push(z)}var O=n(A,u);if(O){var P=[];for(L=0;L<F.length;L++)z=F[L],O[z]||P.push(z);F=P}var U=F.length,B,X;U&&(v.matches||p.matches)&&(B=V.coerce(v,c,{matches:{valType:"enumerated",values:F,dflt:F.indexOf(p.matches)!==-1?p.matches:void 0}},"matches"));var $=w&&!y?c.anchor:void 0;if(U&&!B&&(v.scaleanchor||$)&&(X=V.coerce(v,c,{scaleanchor:{valType:"enumerated",values:F.concat([!1])}},"scaleanchor",$)),B){c._matchGroup=i(M,u,B,1);var le=_[x(B)],ce=a(_,c)/a(_,le);y!==(B.charAt(0)==="x")&&(ce=(y?"x":"y")+ce),i(A,u,B,ce)}else v.matches&&l.indexOf(v.matches)!==-1&&V.warn("ignored "+c._name+'.matches: "'+v.matches+'" to avoid an infinite loop');if(X){var de=m("scaleratio");de||(de=c.scaleratio=1),i(A,u,X,de)}else v.scaleanchor&&l.indexOf(v.scaleanchor)!==-1&&V.warn("ignored "+c._name+'.scaleanchor: "'+v.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function a(v,c){var T=c.domain;return T||(T=v[x(c.overlaying)].domain),T[1]-T[0]}function n(v,c){for(var T=0;T<v.length;T++)if(v[T][c])return v[T];return null}function i(v,c,T,l){var _,w,A,M,g,b=n(v,c);b===null?(b={},b[c]=1,g=v.length,v.push(b)):g=v.indexOf(b);var p=Object.keys(b);for(_=0;_<v.length;_++)if(A=v[_],_!==g&&A[T]){var u=A[T];for(w=0;w<p.length;w++)M=p[w],A[M]=s(u,s(l,b[M]));v.splice(g,1);return}if(l!==1)for(w=0;w<p.length;w++){var y=p[w];b[y]=s(l,b[y])}b[T]=1}function s(v,c){var T="",l="",_,w;typeof v=="string"&&(T=v.match(/^[xy]*/)[0],_=T.length,v=+v.slice(_)),typeof c=="string"&&(l=c.match(/^[xy]*/)[0],w=l.length,c=+c.slice(w));var A=v*c;return!_&&!w?A:!_||!w||T.charAt(0)===l.charAt(0)?T+l+v*c:_===w?A:(_>w?T.slice(w):l.slice(_))+A}function h(v,c){for(var T=c._size,l=T.h/T.w,_={},w=Object.keys(v),A=0;A<w.length;A++){var M=w[A],g=v[M];if(typeof g=="string"){var b=g.match(/^[xy]*/)[0],p=b.length;g=+g.slice(p);for(var u=b.charAt(0)==="y"?l:1/l,y=0;y<p;y++)g*=u}_[M]=g}return _}Z.enforce=function(c){var T=c._fullLayout,l=T._axisConstraintGroups||[],_,w,A,M,g,b,p,u;for(_=0;_<l.length;_++){A=h(l[_],T);var y=Object.keys(A),m=1/0,R=0,L=1/0,z={},F={},N=!1;for(w=0;w<y.length;w++)M=y[w],F[M]=g=T[x(M)],g._inputDomain?g.domain=g._inputDomain.slice():g._inputDomain=g.domain.slice(),g._inputRange||(g._inputRange=g.range.slice()),g.setScale(),z[M]=b=Math.abs(g._m)/A[M],m=Math.min(m,b),(g.constrain==="domain"||!g._constraintShrinkable)&&(L=Math.min(L,b)),delete g._constraintShrinkable,R=Math.max(R,b),g.constrain==="domain"&&(N=!0);if(!(m>t*R&&!N)){for(w=0;w<y.length;w++)if(M=y[w],b=z[M],g=F[M],p=g.constrain,b!==L||p==="domain")if(u=b/L,p==="range")E(g,u);else{var O=g._inputDomain,P=(g.domain[1]-g.domain[0])/(O[1]-O[0]),U=(g.r2l(g.range[1])-g.r2l(g.range[0]))/(g.r2l(g._inputRange[1])-g.r2l(g._inputRange[0]));if(u/=P,u*U<1){g.domain=g._input.domain=O.slice(),E(g,u);continue}if(U<1&&(g.range=g._input.range=g._inputRange.slice(),u*=U),g.autorange){var B=g.r2l(g.range[0]),X=g.r2l(g.range[1]),$=(B+X)/2,le=$,ce=$,de=Math.abs(X-$),G=$-de*u*1.0001,Y=$+de*u*1.0001,ee=d.makePadFn(T,g,0),q=d.makePadFn(T,g,1);f(g,u);var se=Math.abs(g._m),ae=d.concatExtremes(c,g),j=ae.min,Q=ae.max,re,pe;for(pe=0;pe<j.length;pe++)re=j[pe].val-ee(j[pe])/se,re>G&&re<le&&(le=re);for(pe=0;pe<Q.length;pe++)re=Q[pe].val+q(Q[pe])/se,re<Y&&re>ce&&(ce=re);var we=(ce-le)/(2*de);u/=we,le=g.l2r(le),ce=g.l2r(ce),g.range=g._input.range=B<X?[le,ce]:[ce,le]}f(g,u)}}}},Z.getAxisGroup=function(c,T){for(var l=c._axisMatchGroups,_=0;_<l.length;_++){var w=l[_];if(w[T])return"g"+_}return T},Z.clean=function(c,T){if(T._inputDomain){for(var l=!1,_=T._id,w=c._fullLayout._axisConstraintGroups,A=0;A<w.length;A++)if(w[A][_]){l=!0;break}(!l||T.constrain!=="domain")&&(T._input.domain=T.domain=T._inputDomain,delete T._inputDomain)}};function f(v,c){var T=v._inputDomain,l=r[v.constraintoward],_=T[0]+(T[1]-T[0])*l;v.domain=v._input.domain=[_+(T[0]-_)/c,_+(T[1]-_)/c],v.setScale()}}}),P_=He({"src/plot_api/subroutines.js"(Z){"use strict";var V=Wn(),d=lo(),x=bc(),S=sa(),E=ou(),e=C_(),t=Jn(),r=es(),o=K0(),a=M5(),n=Ho(),i=uh(),s=J0(),h=s.enforce,f=s.clean,v=Yd().doAutoRange,c="start",T="middle",l="end",_=lh().zindexSeparator;Z.layoutStyles=function(O){return S.syncOrAsync([x.doAutoMargin,A],O)};function w(O,P,U){for(var B=0;B<U.length;B++){var X=U[B][0],$=U[B][1];if(!(X[0]>=O[1]||X[1]<=O[0])&&$[0]<P[1]&&$[1]>P[0])return!0}return!1}function A(O){var P=O._fullLayout,U=P._size,B=U.p,X=n.list(O,"",!0),$,le,ce,de,G,Y;if(P._paperdiv.style({width:O._context.responsive&&P.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":P.width+"px",height:O._context.responsive&&P.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(r.setSize,P.width,P.height),O._context.setBackground(O,P.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!P._has("cartesian"))return x.previousPromises(O);function ee(Ae,Le,Ue){var Ze=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(Ue==="top")return Le._offset-B-Ze}else return U.t+U.h*(1-(Ae.position||0))+Ze%1;return Le._offset+Le._length+B+Ze}if(Le){if(Ue==="right")return Le._offset+Le._length+B+Ze}else return U.l+U.w*(Ae.position||0)+Ze%1;return Le._offset-B-Ze}for($=0;$<X.length;$++){de=X[$];var q=de._anchorAxis;de._linepositions={},de._lw=r.crispRound(O,de.linewidth,1),de._mainLinePosition=ee(de,q,de.side),de._mainMirrorPosition=de.mirror&&q?ee(de,q,i.OPPOSITE_SIDE[de.side]):null}var se=[],ae=[],j=[],Q=t.opacity(P.paper_bgcolor)===1&&t.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(le in P._plots)if(ce=P._plots[le],ce.mainplot)ce.bg&&ce.bg.remove(),ce.bg=void 0;else{var re=ce.xaxis.domain,pe=ce.yaxis.domain,we=ce.plotgroup;if(w(re,pe,j)&&le.indexOf(_)===-1){var Se=we.node(),Ie=ce.bg=S.ensureSingle(we,"rect","bg");Se.insertBefore(Ie.node(),Se.childNodes[0]),ae.push(le)}else we.select("rect.bg").remove(),j.push([re,pe]),Q||(se.push(le),ae.push(le))}var Re=P._bgLayer.selectAll(".bg").data(se);for(Re.enter().append("rect").classed("bg",!0),Re.exit().remove(),Re.each(function(Ae){P._plots[Ae].bg=V.select(this)}),$=0;$<ae.length;$++)ce=P._plots[ae[$]],G=ce.xaxis,Y=ce.yaxis,ce.bg&&G._offset!==void 0&&Y._offset!==void 0&&ce.bg.call(r.setRect,G._offset-B,Y._offset-B,G._length+2*B,Y._length+2*B).call(t.fill,P.plot_bgcolor).style("stroke-width",0);if(!P._hasOnlyLargeSploms)for(le in P._plots){ce=P._plots[le],G=ce.xaxis,Y=ce.yaxis;var We=ce.clipId="clip"+P._uid+le+"plot",at=S.ensureSingleById(P._clips,"clipPath",We,function(Ae){Ae.classed("plotclip",!0).append("rect")});ce.clipRect=at.select("rect").attr({width:G._length,height:Y._length}),r.setTranslate(ce.plot,G._offset,Y._offset);var nt,tt;ce._hasClipOnAxisFalse?(nt=null,tt=We):(nt=We,tt=null),r.setClipUrl(ce.plot,nt,O),ce.layerClipId=tt}var qe,he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt,Gt,Mr;function mr(Ae){return"M"+qe+","+Ae+"H"+he}function qr(Ae){return"M"+G._offset+","+Ae+"h"+G._length}function Er(Ae){return"M"+Ae+","+Ke+"V"+rt}function Ir(Ae){return Y._shift!==void 0&&(Ae+=Y._shift),"M"+Ae+","+Y._offset+"v"+Y._length}function _t(Ae,Le,Ue){if(!Ae.showline||le!==Ae._mainSubplot)return"";if(!Ae._anchorAxis)return Ue(Ae._mainLinePosition);var Ze=Le(Ae._mainLinePosition);return Ae.mirror&&(Ze+=Le(Ae._mainMirrorPosition)),Ze}for(le in P._plots){ce=P._plots[le],G=ce.xaxis,Y=ce.yaxis;var Oe="M0,0";M(G,le)&&(Ce=b(G,"left",Y,X),qe=G._offset-(Ce?B+Ce:0),Ye=b(G,"right",Y,X),he=G._offset+G._length+(Ye?B+Ye:0),ue=ee(G,Y,"bottom"),ne=ee(G,Y,"top"),Mr=!G._anchorAxis||le!==G._mainSubplot,Mr&&(G.mirror==="allticks"||G.mirror==="all")&&(G._linepositions[le]=[ue,ne]),Oe=_t(G,mr,qr),Mr&&G.showline&&(G.mirror==="all"||G.mirror==="allticks")&&(Oe+=mr(ue)+mr(ne)),ce.xlines.style("stroke-width",G._lw+"px").call(t.stroke,G.showline?G.linecolor:"rgba(0,0,0,0)")),ce.xlines.attr("d",Oe);var Je="M0,0";M(Y,le)&&(Nt=b(Y,"bottom",G,X),rt=Y._offset+Y._length+(Nt?B:0),Gt=b(Y,"top",G,X),Ke=Y._offset-(Gt?B:0),Mt=ee(Y,G,"left"),kt=ee(Y,G,"right"),Mr=!Y._anchorAxis||le!==Y._mainSubplot,Mr&&(Y.mirror==="allticks"||Y.mirror==="all")&&(Y._linepositions[le]=[Mt,kt]),Je=_t(Y,Er,Ir),Mr&&Y.showline&&(Y.mirror==="all"||Y.mirror==="allticks")&&(Je+=Er(Mt)+Er(kt)),ce.ylines.style("stroke-width",Y._lw+"px").call(t.stroke,Y.showline?Y.linecolor:"rgba(0,0,0,0)")),ce.ylines.attr("d",Je)}return n.makeClipPaths(O),x.previousPromises(O)}function M(O,P){return(O.ticks||O.showline)&&(P===O._mainSubplot||O.mirror==="all"||O.mirror==="allticks")}function g(O,P,U){if(!U.showline||!U._lw)return!1;if(U.mirror==="all"||U.mirror==="allticks")return!0;var B=U._anchorAxis;if(!B)return!1;var X=i.FROM_BL[P];return U.side===P?B.domain[X]===O.domain[X]:U.mirror&&B.domain[1-X]===O.domain[1-X]}function b(O,P,U,B){if(g(O,P,U))return U._lw;for(var X=0;X<B.length;X++){var $=B[X];if($._mainAxis===U._mainAxis&&g(O,P,$))return $._lw}return 0}Z.drawMainTitle=function(O){var P=O._fullLayout.title,U=O._fullLayout,B=F(U),X=N(U),$=L(U,X),le=R(U,B);if(o.draw(O,"gtitle",{propContainer:U,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:U._dfltTitle.plot,subtitlePlaceholder:U._dfltTitle.subtitle,attributes:{x:le,y:$,"text-anchor":B,dy:X}}),P.text&&P.automargin){var ce=V.select(O).selectAll(".gtitle"),de=r.bBox(V.select(O).selectAll(".g-gtitle").node()).height,G=y(O,P,de);if(G>0){m(O,$,G,de),ce.attr({x:le,y:$,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,le,$);var Y=(P.text.match(E.BR_TAG_ALL)||[]).length;if(Y){var ee=i.LINE_SPACING*Y+i.MID_SHIFT;P.y===0&&(ee=-ee),ce.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-ee+"em";this.setAttribute("dy",Q)})}var q=V.select(O).selectAll(".gtitle-subtitle");if(q.node()){var se=ce.node().getBBox(),ae=se.y+se.height,j=ae+o.SUBTITLE_PADDING_EM*P.subtitle.font.size;q.attr({x:le,y:j,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,le,j)}}}};function p(O,P,U,B,X){var $=P.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,le=S.isTopAnchor(P)?B:B-X,ce=U==="b"?$-le:le;return S.isTopAnchor(P)&&U==="t"||S.isBottomAnchor(P)&&U==="b"?!1:ce<X}function u(O,P,U,B,X){var $=0;return U==="middle"&&($+=X/2),O==="t"?(U==="top"&&($+=X),$+=B-P*B):(U==="bottom"&&($+=X),$+=P*B),$}function y(O,P,U){var B=P.y,X=P.yanchor,$=B>.5?"t":"b",le=O._fullLayout.margin[$],ce=0;return P.yref==="paper"?ce=U+P.pad.t+P.pad.b:P.yref==="container"&&(ce=u($,B,X,O._fullLayout.height,U)+P.pad.t+P.pad.b),ce>le?ce:0}function m(O,P,U,B){var X="title.automargin",$=O._fullLayout.title,le=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&p(O,$,le,P,B)?ce[le]=U:$.yref==="container"&&(de[le]=U,O._fullLayout._reservedMargin[X]=de),x.allowAutoMargin(O,X),x.autoMargin(O,X,ce)}function R(O,P){var U=O.title,B=O._size,X=0;switch(P===c?X=U.pad.l:P===l&&(X=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+X;case"container":default:return O.width*U.x+X}}function L(O,P){var U=O.title,B=O._size,X=0;if(P==="0em"||!P?X=-U.pad.b:P===i.CAP_SHIFT+"em"&&(X=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+X;case"container":default:return O.height-O.height*U.y+X}}function z(O){return O==="top"?i.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function F(O){var P=O.title,U=T;return S.isRightAnchor(P)?U=l:S.isLeftAnchor(P)&&(U=c),U}function N(O){var P=O.title,U="0em";return S.isTopAnchor(P)?U=i.CAP_SHIFT+"em":S.isMiddleAnchor(P)&&(U=i.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var P=O.calcdata,U=[],B;for(B=0;B<P.length;B++){var X=P[B],$=X[0]||{},le=$.trace||{},ce=le._module||{},de=ce.arraysToCalcdata;de&&de(X,le);var G=ce.editStyle;G&&U.push({fn:G,cd0:$})}if(U.length){for(B=0;B<U.length;B++){var Y=U[B];Y.fn(O,Y.cd0)}e(O),Z.redrawReglTraces(O)}return x.style(O),d.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doColorBars=function(O){return d.getComponentMethod("colorbar","draw")(O),x.previousPromises(O)},Z.layoutReplot=function(O){var P=O.layout;return O.layout=void 0,d.call("_doPlot",O,"",P)},Z.doLegend=function(O){return d.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doTicksRelayout=function(O){return n.draw(O,"redraw"),O._fullLayout._hasOnlyLargeSploms&&(d.subplotsRegistry.splom.updateGrid(O),e(O),Z.redrawReglTraces(O)),Z.drawMainTitle(O),x.previousPromises(O)},Z.doModeBar=function(O){var P=O._fullLayout;a.manage(O);for(var U=0;U<P._basePlotModules.length;U++){var B=P._basePlotModules[U].updateFx;B&&B(O)}return x.previousPromises(O)},Z.doCamera=function(O){for(var P=O._fullLayout,U=P._subplots.gl3d,B=0;B<U.length;B++){var X=P[U[B]],$=X._scene;$.setViewport(X)}},Z.drawData=function(O){var P=O._fullLayout;e(O);for(var U=P._basePlotModules,B=0;B<U.length;B++)U[B].plot(O);return Z.redrawReglTraces(O),x.style(O),d.getComponentMethod("selections","draw")(O),d.getComponentMethod("shapes","draw")(O),d.getComponentMethod("annotations","draw")(O),d.getComponentMethod("images","draw")(O),P._replotting=!1,x.previousPromises(O)},Z.redrawReglTraces=function(O){var P=O._fullLayout;if(P._has("regl")){var U=O._fullData,B=[],X=[],$,le;for(P._hasOnlyLargeSploms&&P._splomGrid.draw(),$=0;$<U.length;$++){var ce=U[$];ce.visible===!0&&ce._length!==0&&(ce.type==="splom"?P._splomScenes[ce.uid].draw():ce.type==="scattergl"?S.pushUnique(B,ce.xaxis+ce.yaxis):ce.type==="scatterpolargl"&&S.pushUnique(X,ce.subplot))}for($=0;$<B.length;$++)le=P._plots[B[$]],le._scene&&le._scene.draw();for($=0;$<X.length;$++)le=P[X[$]]._subplot,le._scene&&le._scene.draw()}},Z.doAutoRangeAndConstraints=function(O){for(var P=n.list(O,"",!0),U,B={},X=0;X<P.length;X++)if(U=P[X],!B[U._id]){B[U._id]=1,f(O,U),v(O,U);var $=U._matchGroup;if($)for(var le in $){var ce=n.getFromId(O,le);v(O,ce,U.range),B[le]=1}}h(O)},Z.finalDraw=function(O){d.getComponentMethod("rangeslider","draw")(O),d.getComponentMethod("rangeselector","draw")(O)},Z.drawMarginPushers=function(O){d.getComponentMethod("legend","draw")(O),d.getComponentMethod("rangeselector","draw")(O),d.getComponentMethod("sliders","draw")(O),d.getComponentMethod("updatemenus","draw")(O),d.getComponentMethod("colorbar","draw")(O)}}}),k5=He({"src/components/selections/draw.js"(Z,V){"use strict";var d=r0().readPaths,x=M2(),S=$m().clearOutlineControllers,E=Jn(),e=es(),t=zl().arrayEditor,r=a0(),o=r.getPathString;V.exports={draw:a,drawOne:i,activateLastSelection:f};function a(c){var T=c._fullLayout;S(c),T._selectionLayer.selectAll("path").remove();for(var l in T._plots){var _=T._plots[l].selectionLayer;_&&_.selectAll("path").remove()}for(var w=0;w<T.selections.length;w++)i(c,w)}function n(c){return c._context.editSelection}function i(c,T){c._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+T+'"]').remove();var l=r.makeSelectionsOptionsAndPlotinfo(c,T),_=l.options,w=l.plotinfo;if(!_._input)return;A(c._fullLayout._selectionLayer);function A(M){var g=o(c,_),b={"data-index":T,"fill-rule":"evenodd",d:g},p=_.opacity,u="rgba(0,0,0,0)",y=_.line.color||E.contrast(c._fullLayout.plot_bgcolor),m=_.line.width,R=_.line.dash;m||(m=5,R="solid");var L=n(c)&&c._fullLayout._activeSelectionIndex===T;L&&(u=c._fullLayout.activeselection.fillcolor,p=c._fullLayout.activeselection.opacity);for(var z=[],F=1;F>=0;F--){var N=M.append("path").attr(b).style("opacity",F?.1:p).call(E.stroke,y).call(E.fill,u).call(e.dashLine,F?"solid":R,F?4+m:m);if(s(N,c,_),L){var O=t(c.layout,"selections",_);N.style({cursor:"move"});var P={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=d(g,c);x(U,N,P)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],X=z[1];X.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var _=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+_,T)}function h(c,T){if(n(c)){var l=T.node(),_=+l.getAttribute("data-index");if(_>=0){if(_===c._fullLayout._activeSelectionIndex){v(c);return}c._fullLayout._activeSelectionIndex=_,c._fullLayout._deactivateSelection=v,a(c)}}}function f(c){if(n(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=v,a(c)}}function v(c){if(n(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Az=He({"node_modules/polybooljs/lib/build-log.js"(Z,V){function d(){var x,S=0,E=!1;function e(t,r){return x.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),x}return x={list:[],segmentId:function(){return S++},checkIntersection:function(t,r){return e("check",{seg1:t,seg2:r})},segmentChop:function(t,r){return e("div_seg",{seg:t,pt:r}),e("chop",{seg:t,pt:r})},statusRemove:function(t){return e("pop_seg",{seg:t})},segmentUpdate:function(t){return e("seg_update",{seg:t})},segmentNew:function(t,r){return e("new_seg",{seg:t,primary:r})},segmentRemove:function(t){return e("rem_seg",{seg:t})},tempStatus:function(t,r,o){return e("temp_status",{seg:t,above:r,below:o})},rewind:function(t){return e("rewind",{seg:t})},status:function(t,r,o){return e("status",{seg:t,above:r,below:o})},vert:function(t){return t===E?x:(E=t,e("vert",{x:t}))},log:function(t){return typeof t!="string"&&(t=JSON.stringify(t,!1," ")),e("log",{txt:t})},reset:function(){return e("reset")},selected:function(t){return e("selected",{segs:t})},chainStart:function(t){return e("chain_start",{seg:t})},chainRemoveHead:function(t,r){return e("chain_rem_head",{index:t,pt:r})},chainRemoveTail:function(t,r){return e("chain_rem_tail",{index:t,pt:r})},chainNew:function(t,r){return e("chain_new",{pt1:t,pt2:r})},chainMatch:function(t){return e("chain_match",{index:t})},chainClose:function(t){return e("chain_close",{index:t})},chainAddHead:function(t,r){return e("chain_add_head",{index:t,pt:r})},chainAddTail:function(t,r){return e("chain_add_tail",{index:t,pt:r})},chainConnect:function(t,r){return e("chain_con",{index1:t,index2:r})},chainReverse:function(t){return e("chain_rev",{index:t})},chainJoin:function(t,r){return e("chain_join",{index1:t,index2:r})},done:function(){return e("done")}},x}V.exports=d}}),Sz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,V){function d(x){typeof x!="number"&&(x=1e-10);var S={epsilon:function(E){return typeof E=="number"&&(x=E),x},pointAboveOrOnLine:function(E,e,t){var r=e[0],o=e[1],a=t[0],n=t[1],i=E[0],s=E[1];return(a-r)*(s-o)-(n-o)*(i-r)>=-x},pointBetween:function(E,e,t){var r=E[1]-e[1],o=t[0]-e[0],a=E[0]-e[0],n=t[1]-e[1],i=a*o+r*n;if(i<x)return!1;var s=o*o+n*n;return!(i-s>-x)},pointsSameX:function(E,e){return Math.abs(E[0]-e[0])<x},pointsSameY:function(E,e){return Math.abs(E[1]-e[1])<x},pointsSame:function(E,e){return S.pointsSameX(E,e)&&S.pointsSameY(E,e)},pointsCompare:function(E,e){return S.pointsSameX(E,e)?S.pointsSameY(E,e)?0:E[1]<e[1]?-1:1:E[0]<e[0]?-1:1},pointsCollinear:function(E,e,t){var r=E[0]-e[0],o=E[1]-e[1],a=e[0]-t[0],n=e[1]-t[1];return Math.abs(r*n-a*o)<x},linesIntersect:function(E,e,t,r){var o=e[0]-E[0],a=e[1]-E[1],n=r[0]-t[0],i=r[1]-t[1],s=o*i-a*n;if(Math.abs(s)<x)return!1;var h=E[0]-t[0],f=E[1]-t[1],v=(n*f-i*h)/s,c=(o*f-a*h)/s,T={alongA:0,alongB:0,pt:[E[0]+v*o,E[1]+v*a]};return v<=-x?T.alongA=-2:v<x?T.alongA=-1:v-1<=-x?T.alongA=0:v-1<x?T.alongA=1:T.alongA=2,c<=-x?T.alongB=-2:c<x?T.alongB=-1:c-1<=-x?T.alongB=0:c-1<x?T.alongB=1:T.alongB=2,T},pointInsideRegion:function(E,e){for(var t=E[0],r=E[1],o=e[e.length-1][0],a=e[e.length-1][1],n=!1,i=0;i<e.length;i++){var s=e[i][0],h=e[i][1];h-r>x!=a-r>x&&(o-s)*(r-h)/(a-h)+s-t>x&&(n=!n),o=s,a=h}return n}};return S}V.exports=d}}),Mz=He({"node_modules/polybooljs/lib/linked-list.js"(Z,V){var d={create:function(){var x={root:{root:!0,next:null},exists:function(S){return!(S===null||S===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(S,E){for(var e=x.root,t=x.root.next;t!==null;){if(E(t)){S.prev=t.prev,S.next=t,t.prev.next=S,t.prev=S;return}e=t,t=t.next}e.next=S,S.prev=e,S.next=null},findTransition:function(S){for(var E=x.root,e=x.root.next;e!==null&&!S(e);)E=e,e=e.next;return{before:E===x.root?null:E,after:e,insert:function(t){return t.prev=E,t.next=e,E.next=t,e!==null&&(e.prev=t),t}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};V.exports=d}}),Ez=He({"node_modules/polybooljs/lib/intersecter.js"(Z,V){var d=Mz();function x(S,E,e){function t(T,l){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:null,below:null},otherFill:null}}function r(T,l,_){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var o=d.create();function a(T,l,_,w,A,M){var g=E.pointsCompare(l,A);return g!==0?g:E.pointsSame(_,M)?0:T!==w?T?1:-1:E.pointAboveOrOnLine(_,w?A:M,w?M:A)?1:-1}function n(T,l){o.insertBefore(T,function(_){var w=a(T.isStart,T.pt,l,_.isStart,_.pt,_.other.pt);return w<0})}function i(T,l){var _=d.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return n(_,T.end),_}function s(T,l,_){var w=d.node({isStart:!1,pt:l.end,seg:l,primary:_,other:T,status:null});T.other=w,n(w,T.pt)}function h(T,l){var _=i(T,l);return s(_,T,l),_}function f(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,n(T.other,T.pt)}function v(T,l){var _=r(l,T.seg.end,T.seg);return f(T,l),h(_,T.primary)}function c(T,l){var _=d.create();function w(O,P){var U=O.seg.start,B=O.seg.end,X=P.seg.start,$=P.seg.end;return E.pointsCollinear(U,X,$)?E.pointsCollinear(B,X,$)||E.pointAboveOrOnLine(B,X,$)?1:-1:E.pointAboveOrOnLine(U,X,$)?1:-1}function A(O){return _.findTransition(function(P){var U=w(O,P.ev);return U>0})}function M(O,P){var U=O.seg,B=P.seg,X=U.start,$=U.end,le=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=E.linesIntersect(X,$,le,ce);if(de===!1){if(!E.pointsCollinear(X,$,le)||E.pointsSame(X,ce)||E.pointsSame($,le))return!1;var G=E.pointsSame(X,le),Y=E.pointsSame($,ce);if(G&&Y)return P;var ee=!G&&E.pointBetween(X,le,ce),q=!Y&&E.pointBetween($,le,ce);if(G)return q?v(P,$):v(O,ce),P;ee&&(Y||(q?v(P,$):v(O,ce)),v(P,X))}else de.alongA===0&&(de.alongB===-1?v(O,le):de.alongB===0?v(O,de.pt):de.alongB===1&&v(O,ce)),de.alongB===0&&(de.alongA===-1?v(P,X):de.alongA===0?v(P,de.pt):de.alongA===1&&v(P,$));return!1}for(var g=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(y){var P=M(b,y);if(P)return P}return m?M(b,m):!1};var p=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),y=u.before?u.before.ev:null,m=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,y?y.seg:!1,m?m.seg:!1);var R=O();if(R){if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,L&&(R.seg.myFill.above=!R.seg.myFill.above)}else R.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(R.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,m?b.seg.myFill.below=m.seg.myFill.above:b.seg.myFill.below=T,L?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;m?b.primary===m.primary?z=m.seg.otherFill.above:z=m.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,y?y.seg:!1,m?m.seg:!1),b.other.status=u.insert(d.node({ev:b}))}else{var F=b.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(F.prev)&&_.exists(F.next)&&M(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var N=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=N}g.push(b.seg)}o.getHead().remove()}return e&&e.done(),g}return S?{addRegion:function(T){for(var l,_=T[T.length-1],w=0;w<T.length;w++){l=_,_=T[w];var A=E.pointsCompare(l,_);A!==0&&h(t(A<0?l:_,A<0?_:l),!0)}},calculate:function(T){return c(T,!1)}}:{calculate:function(T,l,_,w){return T.forEach(function(A){h(r(A.start,A.end,A),!0)}),_.forEach(function(A){h(r(A.start,A.end,A),!1)}),c(l,w)}}}V.exports=x}}),kz=He({"node_modules/polybooljs/lib/segment-chainer.js"(Z,V){function d(x,S,E){var e=[],t=[];return x.forEach(function(r){var o=r.start,a=r.end;if(S.pointsSame(o,a)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}E&&E.chainStart(r);var n={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},s=n;function h(F,N,O){return s.index=F,s.matches_head=N,s.matches_pt1=O,s===n?(s=i,!1):(s=null,!0)}for(var f=0;f<e.length;f++){var v=e[f],c=v[0],T=v[1],l=v[v.length-1],_=v[v.length-2];if(S.pointsSame(c,o)){if(h(f,!0,!0))break}else if(S.pointsSame(c,a)){if(h(f,!0,!1))break}else if(S.pointsSame(l,o)){if(h(f,!1,!0))break}else if(S.pointsSame(l,a)&&h(f,!1,!1))break}if(s===n){e.push([o,a]),E&&E.chainNew(o,a);return}if(s===i){E&&E.chainMatch(n.index);var w=n.index,A=n.matches_pt1?a:o,M=n.matches_head,v=e[w],g=M?v[0]:v[v.length-1],b=M?v[1]:v[v.length-2],p=M?v[v.length-1]:v[0],u=M?v[v.length-2]:v[1];if(S.pointsCollinear(b,g,A)&&(M?(E&&E.chainRemoveHead(n.index,A),v.shift()):(E&&E.chainRemoveTail(n.index,A),v.pop()),g=b),S.pointsSame(p,A)){e.splice(w,1),S.pointsCollinear(u,p,g)&&(M?(E&&E.chainRemoveTail(n.index,g),v.pop()):(E&&E.chainRemoveHead(n.index,g),v.shift())),E&&E.chainClose(n.index),t.push(v);return}M?(E&&E.chainAddHead(n.index,A),v.unshift(A)):(E&&E.chainAddTail(n.index,A),v.push(A));return}function y(F){E&&E.chainReverse(F),e[F].reverse()}function m(F,N){var O=e[F],P=e[N],U=O[O.length-1],B=O[O.length-2],X=P[0],$=P[1];S.pointsCollinear(B,U,X)&&(E&&E.chainRemoveTail(F,U),O.pop(),U=B),S.pointsCollinear(U,X,$)&&(E&&E.chainRemoveHead(N,X),P.shift()),E&&E.chainJoin(F,N),e[F]=O.concat(P),e.splice(N,1)}var R=n.index,L=i.index;E&&E.chainConnect(R,L);var z=e[R].length<e[L].length;n.matches_head?i.matches_head?z?(y(R),m(R,L)):(y(L),m(L,R)):m(L,R):i.matches_head?m(R,L):z?(y(R),m(L,R)):(y(L),m(R,L))}),t}V.exports=d}}),Cz=He({"node_modules/polybooljs/lib/segment-selector.js"(Z,V){function d(S,E,e){var t=[];return S.forEach(function(r){var o=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);E[o]!==0&&t.push({id:e?e.segmentId():-1,start:r.start,end:r.end,myFill:{above:E[o]===1,below:E[o]===2},otherFill:null})}),e&&e.selected(t),t}var x={union:function(S,E){return d(S,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],E)},intersect:function(S,E){return d(S,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],E)},difference:function(S,E){return d(S,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],E)},differenceRev:function(S,E){return d(S,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],E)},xor:function(S,E){return d(S,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],E)}};V.exports=x}}),Lz=He({"node_modules/polybooljs/lib/geojson.js"(Z,V){var d={toPolygon:function(x,S){function E(r){if(r.length<=0)return x.segments({inverted:!1,regions:[]});function o(i){var s=i.slice(0,i.length-1);return x.segments({inverted:!1,regions:[s]})}for(var a=o(r[0]),n=1;n<r.length;n++)a=x.selectDifference(x.combine(a,o(r[n])));return a}if(S.type==="Polygon")return x.polygon(E(S.coordinates));if(S.type==="MultiPolygon"){for(var e=x.segments({inverted:!1,regions:[]}),t=0;t<S.coordinates.length;t++)e=x.selectUnion(x.combine(e,E(S.coordinates[t])));return x.polygon(e)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(x,S,E){E=x.polygon(x.segments(E));function e(v,c){return S.pointInsideRegion([(v[0][0]+v[1][0])*.5,(v[0][1]+v[1][1])*.5],c)}function t(v){return{region:v,children:[]}}var r=t(null);function o(v,c){for(var T=0;T<v.children.length;T++){var l=v.children[T];if(e(c,l.region)){o(l,c);return}}for(var _=t(c),T=0;T<v.children.length;T++){var l=v.children[T];e(l.region,c)&&(_.children.push(l),v.children.splice(T,1),T--)}v.children.push(_)}for(var a=0;a<E.regions.length;a++){var n=E.regions[a];n.length<3||o(r,n)}function i(v,c){for(var T=0,l=v[v.length-1][0],_=v[v.length-1][1],w=[],A=0;A<v.length;A++){var M=v[A][0],g=v[A][1];w.push([M,g]),T+=g*l-M*_,l=M,_=g}var b=T<0;return b!==c&&w.reverse(),w.push([w[0][0],w[0][1]]),w}var s=[];function h(v){var c=[i(v.region,!1)];s.push(c);for(var T=0;T<v.children.length;T++)c.push(f(v.children[T]))}function f(v){for(var c=0;c<v.children.length;c++)h(v.children[c]);return i(v.region,!0)}for(var a=0;a<r.children.length;a++)h(r.children[a]);return s.length<=0?{type:"Polygon",coordinates:[]}:s.length==1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s}}};V.exports=d}}),Pz=He({"node_modules/polybooljs/index.js"(Z,V){var d=Az(),x=Sz(),S=Ez(),E=kz(),e=Cz(),t=Lz(),r=!1,o=x(),a;a={buildLog:function(i){return i===!0?r=d():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return o.epsilon(i)},segments:function(i){var s=S(!0,o,r);return i.regions.forEach(s.addRegion),{segments:s.calculate(i.inverted),inverted:i.inverted}},combine:function(i,s){var h=S(!1,o,r);return{combined:h.calculate(i.segments,i.inverted,s.segments,s.inverted),inverted1:i.inverted,inverted2:s.inverted}},selectUnion:function(i){return{segments:e.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:e.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:e.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:e.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:e.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:E(i.segments,o,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return t.toPolygon(a,i)},polygonToGeoJSON:function(i){return t.fromPolygon(a,o,i)},union:function(i,s){return n(i,s,a.selectUnion)},intersect:function(i,s){return n(i,s,a.selectIntersect)},difference:function(i,s){return n(i,s,a.selectDifference)},differenceRev:function(i,s){return n(i,s,a.selectDifferenceRev)},xor:function(i,s){return n(i,s,a.selectXor)}};function n(i,s,h){var f=a.segments(i),v=a.segments(s),c=a.combine(f,v),T=h(c);return a.polygon(T)}typeof window=="object"&&(window.PolyBool=a),V.exports=a}}),Iz=He({"node_modules/point-in-polygon/nested.js"(Z,V){V.exports=function(x,S,E,e){var t=x[0],r=x[1],o=!1;E===void 0&&(E=0),e===void 0&&(e=S.length);for(var a=e-E,n=0,i=a-1;n<a;i=n++){var s=S[n+E][0],h=S[n+E][1],f=S[i+E][0],v=S[i+E][1],c=h>r!=v>r&&t<(f-s)*(r-h)/(v-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,V){"use strict";var d=d2().dot,x=Ws().BADNUM,S=V.exports={};S.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],n=a,i;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),i=1;i<t.length;i++)r=Math.min(r,t[i][0]),o=Math.max(o,t[i][0]),a=Math.min(a,t[i][1]),n=Math.max(n,t[i][1]);var s=!1,h;t.length===5&&(t[0][0]===t[1][0]?t[2][0]===t[3][0]&&t[0][1]===t[3][1]&&t[1][1]===t[2][1]&&(s=!0,h=function(l){return l[0]===t[0][0]}):t[0][1]===t[1][1]&&t[2][1]===t[3][1]&&t[0][0]===t[3][0]&&t[1][0]===t[2][0]&&(s=!0,h=function(l){return l[1]===t[0][1]}));function f(l,_){var w=l[0],A=l[1];return!(w===x||w<r||w>o||A===x||A<a||A>n||_&&h(l))}function v(l,_){var w=l[0],A=l[1];if(w===x||w<r||w>o||A===x||A<a||A>n)return!1;var M=t.length,g=t[0][0],b=t[0][1],p=0,u,y,m,R,L;for(u=1;u<M;u++)if(y=g,m=b,g=t[u][0],b=t[u][1],R=Math.min(y,g),!(w<R||w>Math.max(y,g)||A>Math.max(m,b)))if(A<Math.min(m,b))w!==R&&p++;else{if(g===y?L=A:L=m+(w-y)*(b-m)/(g-y),A===L)return!(u===1&&_);A<=L&&w!==R&&p++}return p%2===1}var c=!0,T=t[0];for(i=1;i<t.length;i++)if(T[0]!==t[i][0]||T[1]!==t[i][1]){c=!1;break}return{xmin:r,xmax:o,ymin:a,ymax:n,pts:t,contains:s?f:v,isRect:s,degenerate:c}},S.isSegmentBent=function(e,t,r,o){var a=e[t],n=[e[r][0]-a[0],e[r][1]-a[1]],i=d(n,n),s=Math.sqrt(i),h=[-n[1]/s,n[0]/s],f,v,c;for(f=t+1;f<r;f++)if(v=[e[f][0]-a[0],e[f][1]-a[1]],c=d(v,n),c<0||c>i||Math.abs(d(v,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function n(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var v=f+1;v<e.length;v++)(v===e.length-1||S.isSegmentBent(e,f,v+1,t))&&(r.push(e[v]),r.length<h-2&&(o=v,a=r.length-1),f=v)}if(e.length>1){var i=e.pop();n(i)}return{addPt:n,raw:e,filtered:r}}}}),Rz=He({"src/components/selections/constants.js"(Z,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Dz=He({"src/components/selections/select.js"(Z,V){"use strict";var d=Pz(),x=Iz(),S=lo(),E=es().dashStyle,e=Jn(),t=rf(),r=$p().makeEventData,o=Jd(),a=o.freeMode,n=o.rectMode,i=o.drawMode,s=o.openMode,h=o.selectMode,f=a0(),v=L_(),c=M2(),T=$m().clearOutline,l=r0(),_=l.handleEllipse,w=l.readPaths,A=S2().newShapes,M=b5(),g=k5().activateLastSelection,b=sa(),p=b.sorterAsc,u=I_(),y=y2(),m=ef().getFromId,R=C_(),L=P_().redrawReglTraces,z=Rz(),F=z.MINSELECT,N=u.filter,O=u.tester,P=A2(),U=P.p2r,B=P.axValue,X=P.getTransform;function $(Oe){return Oe.subplot!==void 0}function le(Oe,Je,Ae,Le,Ue){var Ze=!$(Le),st=a(Ue),ut=n(Ue),Ut=s(Ue),Ct=i(Ue),Pt=h(Ue),jt=Ue==="drawline",fr=Ue==="drawcircle",ur=jt||fr,sr=Le.gd,Pr=sr._fullLayout,Ta=Pt&&Pr.newselection.mode==="immediate"&&Ze,Oa=Pr._zoomlayer,Ia=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=X(qa),Ca=Je-Ia.left,hi=Ae-Ia.top;Pr._calcInverseTransform(sr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Kt=Pr._invScaleX,Dt=Pr._invScaleY,Yt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Oe.altKey&&!(i(Ue)&&Ut),Za,ri,pi,Ra,an,tn,fn;q(Oe,sr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Oa.selectAll("path.select-outline-"+qa.id).data([1]),lt=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=lt.label.text||lt.label.texttemplate);var Br=Ct&&!Ut?lt.fillcolor:"rgba(0,0,0,0)",Cr=lt.line.color||(Ze?e.contrast(sr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?lt.opacity/2:1,"stroke-dasharray":E(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Br).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var xr=Oa.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1}).attr("transform",Wa).attr("d","M0,0Z");if(Ct&&Le.hasText){var Rr=Oa.select(".label-temp");Rr.empty()&&(Rr=Oa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ur=Pr._uid+z.SELECTID,Hr=[],gt=re(sr,Le.xaxes,Le.yaxes,Le.subplot);Ta&&!Oe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ze){var vr=ta._id,Or=ra._id;rt(sr,vr,Or,gt);for(var ba=(sr.layout||{}).selections||[],Pa=[],ma=!1,la=0;la<ba.length;la++){var _a=Pr.selections[la];!_a||_a.xref!==vr||_a.yref!==Or?Pa.push(ba[la]):ma=!0}ma&&(sr._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",sr,{selections:Pa}))}});var Xt=qr(Le);Le.moveFn=function(vr,Or){Le._clearSubplotSelections&&(Le._clearSubplotSelections(),Le._clearSubplotSelections=void 0),Yt=Math.max(0,Math.min(ca,Kt*vr+Ca)),Jt=Math.max(0,Math.min(Ba,Dt*Or+hi));var ba=Math.abs(Yt-Ca),Pa=Math.abs(Jt-hi);if(ut){var ma,la,_a;if(Pt){var Ai=Pr.selectdirection;switch(Ai==="any"?Pa<Math.min(ba*.6,F)?ma="h":ba<Math.min(Pa*.6,F)?ma="v":ma="d":ma=Ai,ma){case"h":la=fr?Ba/2:0,_a=Ba;break;case"v":la=fr?ca/2:0,_a=ca;break}}if(Ct)switch(Pr.newshape.drawdirection){case"vertical":ma="h",la=fr?Ba/2:0,_a=Ba;break;case"horizontal":ma="v",la=fr?ca/2:0,_a=ca;break;case"ortho":ba<Pa?(ma="h",la=hi,_a=Jt):(ma="v",la=Ca,_a=Yt);break;default:ma="d"}ma==="h"?(Ra=ur?_(fr,[Yt,la],[Yt,_a]):[[Ca,la],[Ca,_a],[Yt,_a],[Yt,la]],Ra.xmin=ur?Yt:Math.min(Ca,Yt),Ra.xmax=ur?Yt:Math.max(Ca,Yt),Ra.ymin=Math.min(la,_a),Ra.ymax=Math.max(la,_a),xr.attr("d","M"+Ra.xmin+","+(hi-F)+"h-4v"+2*F+"h4ZM"+(Ra.xmax-1)+","+(hi-F)+"h4v"+2*F+"h-4Z")):ma==="v"?(Ra=ur?_(fr,[la,Jt],[_a,Jt]):[[la,hi],[la,Jt],[_a,Jt],[_a,hi]],Ra.xmin=Math.min(la,_a),Ra.xmax=Math.max(la,_a),Ra.ymin=ur?Jt:Math.min(hi,Jt),Ra.ymax=ur?Jt:Math.max(hi,Jt),xr.attr("d","M"+(Ca-F)+","+Ra.ymin+"v-4h"+2*F+"v4ZM"+(Ca-F)+","+(Ra.ymax-1)+"v4h"+2*F+"v-4Z")):ma==="d"&&(Ra=ur?_(fr,[Ca,hi],[Yt,Jt]):[[Ca,hi],[Ca,Jt],[Yt,Jt],[Yt,hi]],Ra.xmin=Math.min(Ca,Yt),Ra.xmax=Math.max(Ca,Yt),Ra.ymin=Math.min(hi,Jt),Ra.ymax=Math.max(hi,Jt),xr.attr("d","M0,0Z"))}else st&&(Za.addPt([Yt,Jt]),Ra=Za.filtered);if(Le.selectionDefs&&Le.selectionDefs.length?(pi=tt(Le.mergedPolygons,Ra,$a),Ra.subtract=$a,ri=ee(Le.selectionDefs.concat([Ra]))):(pi=[Ra],ri=O(Ra)),c(he(pi,Ut),xt,Le),Pt){var ki=ne(sr,!1),Ki=ki.eventData?ki.eventData.points.slice():[];ki=ne(sr,!1,ri,gt,Le),ri=ki.selectionTesters,fn=ki.eventData;var yn;Za?yn=Za.filtered:yn=Gt(pi),y.throttle(Ur,z.SELECTDELAY,function(){Hr=ue(ri,gt);for(var Ln=Hr.slice(),kn=0;kn<Ki.length;kn++){for(var Bn=Ki[kn],ao=!1,xo=0;xo<Ln.length;xo++)if(Ln[xo].curveNumber===Bn.curveNumber&&Ln[xo].pointNumber===Bn.pointNumber){ao=!0;break}ao||Ln.push(Bn)}Ln.length&&(fn||(fn={}),fn.points=Ln),Xt(fn,yn),Er(sr,fn)})}},Le.clickFn=function(vr,Or){if(xr.remove(),sr._fullLayout._activeShapeIndex>=0){sr._fullLayout._deactivateShape(sr);return}if(!Ct){var ba=Pr.clickmode;y.done(Ur).then(function(){if(y.clear(Ur),vr===2){for(xt.remove(),an=0;an<gt.length;an++)tn=gt[an],tn._module.selectPoints(tn,!1);if(at(sr,gt),j(Le),_t(sr),gt.length){var Pa=gt[0].xaxis,ma=gt[0].yaxis;if(Pa&&ma){for(var la=[],_a=sr._fullLayout.selections,Ai=0;Ai<_a.length;Ai++){var ki=_a[Ai];ki&&(ki.xref!==Pa._id||ki.yref!==ma._id)&&la.push(ki)}la.length<_a.length&&(sr._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",sr,{selections:la}))}}}else ba.indexOf("select")>-1&&ce(Or,sr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),ba==="event"&&Ir(sr,void 0);t.click(sr,Or,qa.id)}).catch(b.error)}},Le.doneFn=function(){xr.remove(),y.done(Ur).then(function(){y.clear(Ur),!Ta&&Ra&&Le.selectionDefs&&(Ra.subtract=$a,Le.selectionDefs.push(Ra),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(Ta||Ct)&&j(Le,Ta),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ir(sr,fn)}).catch(b.error)}}function ce(Oe,Je,Ae,Le,Ue,Ze,st){var ut=Je._hoverdata,Ut=Je._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],fr,ur,sr,Pr,Ta,Oa,Ia,qa,Wa,Ca;if(we(ut)){q(Oe,Je,Ze),fr=re(Je,Ae,Le,Ue);var hi=Se(ut,fr),wi=hi.pointNumbers.length>0;if(wi?Re(fr,hi):We(fr)&&(Ia=Ie(hi))){for(st&&st.remove(),Ca=0;Ca<fr.length;Ca++)ur=fr[Ca],ur._module.selectPoints(ur,!1);at(Je,fr),j(Ze),Pt&&_t(Je)}else{qa=Oe.shiftKey&&(Ia!==void 0?Ia:Ie(hi)),sr=de(hi.pointNumber,hi.searchInfo,qa);var Kt=Ze.selectionDefs.concat([sr]);for(Pr=ee(Kt,Pr),Ca=0;Ca<fr.length;Ca++)if(Ta=fr[Ca]._module.selectPoints(fr[Ca],Pr),Oa=qe(Ta,fr[Ca]),jt.length)for(var Dt=0;Dt<Oa.length;Dt++)jt.push(Oa[Dt]);else jt=Oa;if(Wa={points:jt},at(Je,fr,Wa),sr&&Ze&&Ze.selectionDefs.push(sr),st){var Yt=Ze.mergedPolygons,Jt=s(Ze.dragmode);c(he(Yt,Jt),st,Ze)}Pt&&Ir(Je,Wa)}}}function de(Oe,Je,Ae){return{pointNumber:Oe,searchInfo:Je,subtract:!!Ae}}function G(Oe){return"pointNumber"in Oe&&"searchInfo"in Oe}function Y(Oe){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Je,Ae,Le,Ue){var Ze=Oe.searchInfo.cd[0].trace.index,st=Ue.cd[0].trace.index;return st===Ze&&Le===Oe.pointNumber},isRect:!1,degenerate:!1,subtract:!!Oe.subtract}}function ee(Oe){if(!Oe.length)return;for(var Je=[],Ae=G(Oe[0])?0:Oe[0][0][0],Le=Ae,Ue=G(Oe[0])?0:Oe[0][0][1],Ze=Ue,st=0;st<Oe.length;st++)if(G(Oe[st]))Je.push(Y(Oe[st]));else{var ut=O(Oe[st]);ut.subtract=!!Oe[st].subtract,Je.push(ut),Ae=Math.min(Ae,ut.xmin),Le=Math.max(Le,ut.xmax),Ue=Math.min(Ue,ut.ymin),Ze=Math.max(Ze,ut.ymax)}function Ut(Ct,Pt,jt,fr){for(var ur=!1,sr=0;sr<Je.length;sr++)Je[sr].contains(Ct,Pt,jt,fr)&&(ur=!Je[sr].subtract);return ur}return{xmin:Ae,xmax:Le,ymin:Ue,ymax:Ze,pts:[],contains:Ut,isRect:!1,degenerate:!1}}function q(Oe,Je,Ae){var Le=Je._fullLayout,Ue=Ae.plotinfo,Ze=Ae.dragmode,st=Le._lastSelectedSubplot&&Le._lastSelectedSubplot===Ue.id,ut=(Oe.shiftKey||Oe.altKey)&&!(i(Ze)&&s(Ze));st&&ut&&Ue.selection&&Ue.selection.selectionDefs&&!Ae.selectionDefs?(Ae.selectionDefs=Ue.selection.selectionDefs,Ae.mergedPolygons=Ue.selection.mergedPolygons):(!ut||!Ue.selection)&&j(Ae),st||(T(Je),Le._lastSelectedSubplot=Ue.id)}function se(Oe){return Oe._fullLayout._activeShapeIndex>=0}function ae(Oe){return Oe._fullLayout._activeSelectionIndex>=0}function j(Oe,Je){var Ae=Oe.dragmode,Le=Oe.plotinfo,Ue=Oe.gd;se(Ue)&&Ue._fullLayout._deactivateShape(Ue),ae(Ue)&&Ue._fullLayout._deactivateSelection(Ue);var Ze=Ue._fullLayout,st=Ze._zoomlayer,ut=i(Ae),Ut=h(Ae);if(ut||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&Ue._fullLayout._outlining){var Pt;ut&&(Pt=A(Ct,Oe)),Pt&&S.call("_guiRelayout",Ue,{shapes:Pt});var jt;Ut&&!$(Oe)&&(jt=M(Ct,Oe)),jt&&(Ue._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",Ue,{selections:jt}).then(function(){Je&&g(Ue)})),Ue._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Oe.selectionDefs=[],Le.selection.mergedPolygons=Oe.mergedPolygons=[]}function Q(Oe){return Oe._id}function re(Oe,Je,Ae,Le){if(!Oe.calcdata)return[];var Ue=[],Ze=Je.map(Q),st=Ae.map(Q),ut,Ut,Ct;for(Ct=0;Ct<Oe.calcdata.length;Ct++)if(ut=Oe.calcdata[Ct],Ut=ut[0].trace,!(Ut.visible!==!0||!Ut._module||!Ut._module.selectPoints))if($({subplot:Le})&&(Ut.subplot===Le||Ut.geo===Le))Ue.push(pe(Ut._module,ut,Je[0],Ae[0]));else if(Ut.type==="splom"){if(Ut._xaxes[Ze[0]]&&Ut._yaxes[st[0]]){var Pt=pe(Ut._module,ut,Je[0],Ae[0]);Pt.scene=Oe._fullLayout._splomScenes[Ut.uid],Ue.push(Pt)}}else if(Ut.type==="sankey"){var jt=pe(Ut._module,ut,Je[0],Ae[0]);Ue.push(jt)}else{if(Ze.indexOf(Ut.xaxis)===-1&&(!Ut._xA||!Ut._xA.overlaying)||st.indexOf(Ut.yaxis)===-1&&(!Ut._yA||!Ut._yA.overlaying))continue;Ue.push(pe(Ut._module,ut,m(Oe,Ut.xaxis),m(Oe,Ut.yaxis)))}return Ue}function pe(Oe,Je,Ae,Le){return{_module:Oe,cd:Je,xaxis:Ae,yaxis:Le}}function we(Oe){return Oe&&Array.isArray(Oe)&&Oe[0].hoverOnBox!==!0}function Se(Oe,Je){var Ae=Oe[0],Le=-1,Ue=[],Ze,st;for(st=0;st<Je.length;st++)if(Ze=Je[st],Ae.fullData.index===Ze.cd[0].trace.index){if(Ae.hoverOnBox===!0)break;Ae.pointNumber!==void 0?Le=Ae.pointNumber:Ae.binNumber!==void 0&&(Le=Ae.binNumber,Ue=Ae.pointNumbers);break}return{pointNumber:Le,pointNumbers:Ue,searchInfo:Ze}}function Ie(Oe){var Je=Oe.searchInfo.cd[0].trace,Ae=Oe.pointNumber,Le=Oe.pointNumbers,Ue=Le.length>0,Ze=Ue?Le[0]:Ae;return Je.selectedpoints?Je.selectedpoints.indexOf(Ze)>-1:!1}function Re(Oe,Je){var Ae=[],Le,Ue,Ze,st;for(st=0;st<Oe.length;st++)Le=Oe[st],Le.cd[0].trace.selectedpoints&&Le.cd[0].trace.selectedpoints.length>0&&Ae.push(Le);if(Ae.length===1&&(Ze=Ae[0]===Je.searchInfo,Ze&&(Ue=Je.searchInfo.cd[0].trace,Ue.selectedpoints.length===Je.pointNumbers.length))){for(st=0;st<Je.pointNumbers.length;st++)if(Ue.selectedpoints.indexOf(Je.pointNumbers[st])<0)return!1;return!0}return!1}function We(Oe){var Je=0,Ae,Le,Ue;for(Ue=0;Ue<Oe.length;Ue++)if(Ae=Oe[Ue],Le=Ae.cd[0].trace,Le.selectedpoints&&(Le.selectedpoints.length>1||(Je+=Le.selectedpoints.length,Je>1)))return!1;return Je===1}function at(Oe,Je,Ae){var Le;for(Le=0;Le<Je.length;Le++){var Ue=Je[Le].cd[0].trace._fullInput,Ze=Oe._fullLayout._tracePreGUI[Ue.uid]||{};Ze.selectedpoints===void 0&&(Ze.selectedpoints=Ue._input.selectedpoints||null)}var st;if(Ae){var ut=Ae.points||[];for(Le=0;Le<Je.length;Le++)st=Je[Le].cd[0].trace,st._input.selectedpoints=st._fullInput.selectedpoints=[],st._fullInput!==st&&(st.selectedpoints=[]);for(var Ut=0;Ut<ut.length;Ut++){var Ct=ut[Ut],Pt=Ct.data,jt=Ct.fullData,fr=Ct.pointIndex,ur=Ct.pointIndices;ur?([].push.apply(Pt.selectedpoints,ur),st._fullInput!==st&&[].push.apply(jt.selectedpoints,ur)):(Pt.selectedpoints.push(fr),st._fullInput!==st&&jt.selectedpoints.push(fr))}}else for(Le=0;Le<Je.length;Le++)st=Je[Le].cd[0].trace,delete st.selectedpoints,delete st._input.selectedpoints,st._fullInput!==st&&delete st._fullInput.selectedpoints;nt(Oe,Je)}function nt(Oe,Je){for(var Ae=!1,Le=0;Le<Je.length;Le++){var Ue=Je[Le],Ze=Ue.cd;S.traceIs(Ze[0].trace,"regl")&&(Ae=!0);var st=Ue._module,ut=st.styleOnSelect||st.style;ut&&(ut(Oe,Ze,Ze[0].node3),Ze[0].nodeRangePlot3&&ut(Oe,Ze,Ze[0].nodeRangePlot3))}Ae&&(R(Oe),L(Oe))}function tt(Oe,Je,Ae){for(var Le=Ae?d.difference:d.union,Ue=Le({regions:Oe},{regions:[Je]}),Ze=Ue.regions.reverse(),st=0;st<Ze.length;st++){var ut=Ze[st];ut.subtract=kt(ut,Ze.slice(0,st))}return Ze}function qe(Oe,Je){if(Array.isArray(Oe))for(var Ae=Je.cd,Le=Je.cd[0].trace,Ue=0;Ue<Oe.length;Ue++)Oe[Ue]=r(Oe[Ue],Le,Ae);return Oe}function he(Oe,Je){for(var Ae=[],Le=0;Le<Oe.length;Le++){Ae[Le]=[];for(var Ue=0;Ue<Oe[Le].length;Ue++){Ae[Le][Ue]=[],Ae[Le][Ue][0]=Ue?"L":"M";for(var Ze=0;Ze<Oe[Le][Ue].length;Ze++)Ae[Le][Ue].push(Oe[Le][Ue][Ze])}Je||Ae[Le].push(["Z",Ae[Le][0][1],Ae[Le][0][2]])}return Ae}function ue(Oe,Je){for(var Ae=[],Le,Ue=[],Ze,st=0;st<Je.length;st++){var ut=Je[st];Ze=ut._module.selectPoints(ut,Oe),Ue.push(Ze),Le=qe(Ze,ut),Ae=Ae.concat(Le)}return Ae}function ne(Oe,Je,Ae,Le,Ue){var Ze=!!Le,st,ut,Ut;Ue&&(st=Ue.plotinfo,ut=Ue.xaxes[0]._id,Ut=Ue.yaxes[0]._id);var Ct=[],Pt=[],jt=Mt(Oe),fr=Oe._fullLayout;if(st){var ur=fr._zoomlayer,sr=fr.dragmode,Pr=i(sr),Ta=h(sr);if(Pr||Ta){var Oa=m(Oe,ut,"x"),Ia=m(Oe,Ut,"y");if(Oa&&Ia){var qa=ur.selectAll(".select-outline-"+st.id);if(qa&&Oe._fullLayout._outlining&&qa.length){for(var Wa=qa[0][0],Ca=Wa.getAttribute("d"),hi=w(Ca,Oe,st),wi=[],Kt=0;Kt<hi.length;Kt++){for(var Dt=hi[Kt],Yt=[],Jt=0;Jt<Dt.length;Jt++)Yt.push([Nt(Oa,Dt[Jt][1]),Nt(Ia,Dt[Jt][2])]);Yt.xref=ut,Yt.yref=Ut,Yt.subtract=kt(Yt,wi),wi.push(Yt)}jt=jt.concat(wi)}}}}var Fr=ut&&Ut?[ut+Ut]:fr._subplots.cartesian;Ce(Oe);for(var ta={},ra=0;ra<Fr.length;ra++){var ca=Fr[ra],Ba=ca.indexOf("y"),$a=ca.slice(0,Ba),Za=ca.slice(Ba),ri=ut&&Ut?Ae:void 0;if(ri=Ke(jt,$a,Za,ri),ri){var pi=Le;if(!Ze){var Ra=m(Oe,$a,"x"),an=m(Oe,Za,"y");pi=re(Oe,[Ra],[an],ca);for(var tn=0;tn<pi.length;tn++){var fn=pi[tn],xt=fn.cd[0],lt=xt.trace;if(fn._module.name==="scattergl"&&!xt.t.xpx){var Br=lt.x,Cr=lt.y,xr=lt._length;xt.t.xpx=[],xt.t.ypx=[];for(var Rr=0;Rr<xr;Rr++)xt.t.xpx[Rr]=Ra.c2p(Br[Rr]),xt.t.ypx[Rr]=an.c2p(Cr[Rr])}fn._module.name==="splom"&&(ta[lt.uid]||(ta[lt.uid]=!0))}}var Ur=ue(ri,pi);Ct=Ct.concat(Ur),Pt=Pt.concat(pi)}}var Hr={points:Ct};at(Oe,Pt,Hr);var gt=fr.clickmode,Xt=gt.indexOf("event")>-1&&Je;if(!st&&Je){var vr=Mt(Oe,!0);if(vr.length){var Or=vr[0].xref,ba=vr[0].yref;if(Or&&ba){var Pa=Gt(vr),ma=mr([m(Oe,Or,"x"),m(Oe,ba,"y")]);ma(Hr,Pa)}}Oe._fullLayout._noEmitSelectedAtStart?Oe._fullLayout._noEmitSelectedAtStart=!1:Xt&&Ir(Oe,Hr),fr._reselect=!1}if(!st&&fr._deselect){var la=fr._deselect;ut=la.xref,Ut=la.yref,Ye(ut,Ut,Pt)||rt(Oe,ut,Ut,Le),Xt&&(Hr.points.length?Ir(Oe,Hr):_t(Oe)),fr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Oe){var Je=Oe.calcdata;if(Je)for(var Ae=0;Ae<Je.length;Ae++){var Le=Je[Ae][0],Ue=Le.trace,Ze=Oe._fullLayout._splomScenes;if(Ze){var st=Ze[Ue.uid];st&&(st.selectBatch=[])}}}function Ye(Oe,Je,Ae){for(var Le=0;Le<Ae.length;Le++){var Ue=Ae[Le];if(Ue.xaxis&&Ue.xaxis._id===Oe&&Ue.yaxis&&Ue.yaxis._id===Je)return!0}return!1}function rt(Oe,Je,Ae,Le){Le=re(Oe,[m(Oe,Je,"x")],[m(Oe,Ae,"y")],Je+Ae);for(var Ue=0;Ue<Le.length;Ue++){var Ze=Le[Ue];Ze._module.selectPoints(Ze,!1)}at(Oe,Le)}function Ke(Oe,Je,Ae,Le){for(var Ue,Ze=0;Ze<Oe.length;Ze++){var st=Oe[Ze];if(!(Je!==st.xref||Ae!==st.yref))if(Ue){var ut=!!st.subtract;Ue=tt(Ue,st,ut),Le=ee(Ue)}else Ue=[st],Le=O(st)}return Le}function Mt(Oe,Je){for(var Ae=[],Le=Oe._fullLayout,Ue=Le.selections,Ze=Ue.length,st=0;st<Ze;st++)if(!(Je&&st!==Le._activeSelectionIndex)){var ut=Ue[st];if(ut){var Ut=ut.xref,Ct=ut.yref,Pt=m(Oe,Ut,"x"),jt=m(Oe,Ct,"y"),fr,ur,sr,Pr,Ta;if(ut.type==="rect"){Ta=[];var Oa=Nt(Pt,ut.x0),Ia=Nt(Pt,ut.x1),qa=Nt(jt,ut.y0),Wa=Nt(jt,ut.y1);Ta=[[Oa,qa],[Oa,Wa],[Ia,Wa],[Ia,qa]],fr=Math.min(Oa,Ia),ur=Math.max(Oa,Ia),sr=Math.min(qa,Wa),Pr=Math.max(qa,Wa),Ta.xmin=fr,Ta.xmax=ur,Ta.ymin=sr,Ta.ymax=Pr,Ta.xref=Ut,Ta.yref=Ct,Ta.subtract=!1,Ta.isRect=!0,Ae.push(Ta)}else if(ut.type==="path")for(var Ca=ut.path.split("Z"),hi=[],wi=0;wi<Ca.length;wi++){var Kt=Ca[wi];if(Kt){Kt+="Z";var Dt=f.extractPathCoords(Kt,v.paramIsX,"raw"),Yt=f.extractPathCoords(Kt,v.paramIsY,"raw");fr=1/0,ur=-1/0,sr=1/0,Pr=-1/0,Ta=[];for(var Jt=0;Jt<Dt.length;Jt++){var Fr=Nt(Pt,Dt[Jt]),ta=Nt(jt,Yt[Jt]);Ta.push([Fr,ta]),fr=Math.min(Fr,fr),ur=Math.max(Fr,ur),sr=Math.min(ta,sr),Pr=Math.max(ta,Pr)}Ta.xmin=fr,Ta.xmax=ur,Ta.ymin=sr,Ta.ymax=Pr,Ta.xref=Ut,Ta.yref=Ct,Ta.subtract=kt(Ta,hi),hi.push(Ta),Ae.push(Ta)}}}}return Ae}function kt(Oe,Je){for(var Ae=!1,Le=0;Le<Je.length;Le++)for(var Ue=Je[Le],Ze=0;Ze<Oe.length;Ze++)if(x(Oe[Ze],Ue)){Ae=!Ae;break}return Ae}function Nt(Oe,Je){return Oe.type==="date"&&(Je=Je.replace("_"," ")),Oe.type==="log"?Oe.c2p(Je):Oe.r2p(Je,null,Oe.calendar)}function Gt(Oe){for(var Je=Oe.length,Ae=[],Le=0;Le<Je;Le++){var Ue=Oe[Le];Ae=Ae.concat(Ue),Ae=Ae.concat([Ue[0]])}return Mr(Ae)}function Mr(Oe){return Oe.isRect=Oe.length===5&&Oe[0][0]===Oe[4][0]&&Oe[0][1]===Oe[4][1]&&Oe[0][0]===Oe[1][0]&&Oe[2][0]===Oe[3][0]&&Oe[0][1]===Oe[3][1]&&Oe[1][1]===Oe[2][1]||Oe[0][1]===Oe[1][1]&&Oe[2][1]===Oe[3][1]&&Oe[0][0]===Oe[3][0]&&Oe[1][0]===Oe[2][0],Oe.isRect&&(Oe.xmin=Math.min(Oe[0][0],Oe[2][0]),Oe.xmax=Math.max(Oe[0][0],Oe[2][0]),Oe.ymin=Math.min(Oe[0][1],Oe[2][1]),Oe.ymax=Math.max(Oe[0][1],Oe[2][1])),Oe}function mr(Oe){return function(Je,Ae){for(var Le,Ue,Ze=0;Ze<Oe.length;Ze++){var st=Oe[Ze],ut=st._id,Ut=ut.charAt(0);if(Ae.isRect){Le||(Le={});var Ct=Ae[Ut+"min"],Pt=Ae[Ut+"max"];Ct!==void 0&&Pt!==void 0&&(Le[ut]=[U(st,Ct),U(st,Pt)].sort(p))}else Ue||(Ue={}),Ue[ut]=Ae.map(B(st))}Le&&(Je.range=Le),Ue&&(Je.lassoPoints=Ue)}}function qr(Oe){var Je=Oe.plotinfo;return Je.fillRangeItems||mr(Oe.xaxes.concat(Oe.yaxes))}function Er(Oe,Je){Oe.emit("plotly_selecting",Je)}function Ir(Oe,Je){Je&&(Je.selections=(Oe.layout||{}).selections||[]),Oe.emit("plotly_selected",Je)}function _t(Oe){Oe.emit("plotly_deselect",null)}V.exports={reselect:ne,prepSelect:le,clearOutline:T,clearSelectionsCache:j,selectOnClick:ce}}}),C5=He({"src/components/annotations/arrow_paths.js"(Z,V){"use strict";V.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}]}}),R_=He({"src/constants/axis_placeable_objects.js"(Z,V){"use strict";V.exports={axisRefDescription:function(d,x,S){return["If set to a",d,"axis id (e.g. *"+d+"* or","*"+d+"2*), the `"+d+"` position refers to a",d,"coordinate. If set to *paper*, the `"+d+"`","position refers to the distance from the",x,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",x,"("+S+"). If set to a",d,"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",x,"of the domain of that axis: e.g.,","*"+d+"2 domain* refers to the domain of the second",d," axis and a",d,"position of 0.5 refers to the","point between the",x,"and the",S,"of the domain of the","second",d,"axis."].join(" ")}}}}),$0=He({"src/components/annotations/attributes.js"(Z,V){"use strict";var d=C5(),x=tc(),S=lh(),E=zl().templatedArray,e=R_();V.exports=E("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:x({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:d.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:d.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",S.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",S.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",S.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",S.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:x({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),Tv=He({"src/traces/scatter/constants.js"(Z,V){"use strict";V.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),$d=He({"src/traces/scatter/fillcolor_attribute.js"(Z,V){"use strict";V.exports=function(x){return{valType:"color",editType:"style",anim:!0}}}}),af=He({"src/traces/scatter/attributes.js"(Z,V){"use strict";var d=tf().axisHoverFormat,{hovertemplateAttrs:x,texttemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ku(),t=tc(),r=Gh().dash,o=Gh().pattern,a=es(),n=Tv(),i=Qo().extendFlat,s=$d();function h(c){return{valType:"any",dflt:0,editType:"calc"}}function f(c){return{valType:"any",editType:"calc"}}function v(c){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}V.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:h("x"),yperiod:h("y"),xperiod0:f("x0"),yperiod0:f("y0"),xperiodalignment:v("x"),yperiodalignment:v("y"),xhoverformat:d("x"),yhoverformat:d("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:S(),texttemplatefallback:E({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:x({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),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:i({},r,{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:s(!0),fillgradient:i({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:o,marker:i({symbol:{valType:"enumerated",values:a.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:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:i({},r,{arrayOk:!0}),editType:"calc"},e("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"},e("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:t({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),L5=He({"src/components/selections/attributes.js"(Z,V){"use strict";var d=$0(),x=af().line,S=Gh().dash,E=Qo().extendFlat,e=pc().overrideAll,t=zl().templatedArray,r=R_();V.exports=e(t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:E({},d.xref,{}),yref:E({},d.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:x.color,width:E({},x.width,{min:1,dflt:1}),dash:E({},S,{dflt:"dot"})}}),"arraydraw","from-root")}}),zz=He({"src/components/selections/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=L5(),e=a0();V.exports=function(o,a){S(o,a,{name:"selections",handleItemDefaults:t});for(var n=a.selections,i=0;i<n.length;i++){var s=n[i];s&&s.path===void 0&&(s.x0===void 0||s.x1===void 0||s.y0===void 0||s.y1===void 0)&&(a.selections[i]=null)}};function t(r,o,a){function n(R,L){return d.coerce(r,o,E,R,L)}var i=n("path"),s=i?"path":"rect",h=n("type",s),f=h!=="path";f&&delete o.path,n("opacity"),n("line.color"),n("line.width"),n("line.dash");for(var v=["x","y"],c=0;c<2;c++){var T=v[c],l={_fullLayout:a},_,w,A,M=x.coerceRef(r,o,l,T);if(_=x.getFromId(l,M),_._selectionIndices.push(o._index),A=e.rangeToShapePosition(_),w=e.shapePositionToRange(_),f){var g=T+"0",b=T+"1",p=r[g],u=r[b];r[g]=w(r[g],!0),r[b]=w(r[b],!0),x.coercePosition(o,l,n,M,g),x.coercePosition(o,l,n,M,b);var y=o[g],m=o[b];y!==void 0&&m!==void 0&&(o[g]=A(y),o[b]=A(m),r[g]=p,r[b]=u)}}f&&d.noneOrAll(r,o,["x0","x1","y0","y1"])}}}),Fz=He({"src/components/selections/draw_newselection/defaults.js"(Z,V){"use strict";V.exports=function(x,S,E){E("newselection.mode");var e=E("newselection.line.width");e&&(E("newselection.line.color"),E("newselection.line.dash")),E("activeselection.fillcolor"),E("activeselection.opacity")}}}),D_=He({"src/plots/cartesian/include_components.js"(Z,V){"use strict";var d=lo(),x=sa(),S=ef();V.exports=function(e){return function(r,o){var a=r[e];if(Array.isArray(a))for(var n=d.subplotsRegistry.cartesian,i=n.idRegex,s=o._subplots,h=s.xaxis,f=s.yaxis,v=s.cartesian,c=o._has("cartesian"),T=0;T<a.length;T++){var l=a[T];if(x.isPlainObject(l)){var _=S.cleanId(l.xref,"x",!1),w=S.cleanId(l.yref,"y",!1),A=i.x.test(_),M=i.y.test(w);if(A||M){c||x.pushUnique(o._basePlotModules,n);var g=!1;A&&h.indexOf(_)===-1&&(h.push(_),g=!0),M&&f.indexOf(w)===-1&&(f.push(w),g=!0),g&&A&&M&&v.push(_+w)}}}}}}}),Af=He({"src/components/selections/index.js"(Z,V){"use strict";var d=k5(),x=Dz();V.exports={moduleType:"component",name:"selections",layoutAttributes:L5(),supplyLayoutDefaults:zz(),supplyDrawNewSelectionDefaults:Fz(),includeBasePlot:D_()("selections"),draw:d.draw,drawOne:d.drawOne,reselect:x.reselect,prepSelect:x.prepSelect,clearOutline:x.clearOutline,clearSelectionsCache:x.clearSelectionsCache,selectOnClick:x.selectOnClick}}}),P5=He({"src/plots/cartesian/dragbox.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=x.numberFormat,E=Ch(),e=b2(),t=lo(),r=x.strTranslate,o=ou(),a=Jn(),n=es(),i=rf(),s=Ho(),h=Kd(),f=Ap(),v=Jd(),c=v.selectingOrDrawing,T=v.freeMode,l=uh().FROM_TL,_=C_(),w=P_().redrawReglTraces,A=bc(),M=ef().getFromId,g=Af().prepSelect,b=Af().clearOutline,p=Af().selectOnClick,u=E5(),y=lh(),m=y.MINDRAG,R=y.MINZOOM,L=!0;function z(pe,we,Se,Ie,Re,We,at,nt){var tt=pe._fullLayout._zoomlayer,qe=at+nt==="nsew",he=(at+nt).length===1,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt,Gt,Mr,mr,qr,Er,Ir,_t,Oe,Je,Ae,Le,Ue,Ze,st;Se+=we.yaxis._shift;function ut(){if(ue=we.xaxis,ne=we.yaxis,Nt=ue._length,Gt=ne._length,Mt=ue._offset,kt=ne._offset,Ce={},Ce[ue._id]=ue,Ye={},Ye[ne._id]=ne,at&&nt)for(var xt=we.overlays,lt=0;lt<xt.length;lt++){var Br=xt[lt].xaxis;Ce[Br._id]=Br;var Cr=xt[lt].yaxis;Ye[Cr._id]=Cr}rt=re(Ce),Ke=re(Ye),qr=O(rt,nt),Er=O(Ke,at),Ir=!Er&&!qr,mr=j(pe,pe._fullLayout._axisMatchGroups,Ce,Ye),Mr=j(pe,pe._fullLayout._axisConstraintGroups,Ce,Ye,mr);var xr=Mr.isSubplotConstrained||mr.isSubplotConstrained;_t=nt||xr,Oe=at||xr;var Rr=pe._fullLayout;Je=Rr._has("scattergl"),Ae=Rr._has("splom"),Le=Rr._has("svg")}ut();var Ut=$(Er+qr,pe._fullLayout.dragmode,qe),Ct=N(we,at+nt+"drag",Ut,Se,Ie,Re,We);if(Ir&&!qe)return Ct.onmousedown=null,Ct.style.pointerEvents="none",Ct;var Pt={element:Ct,gd:pe,plotinfo:we};Pt.prepFn=function(xt,lt,Br){var Cr=Pt.dragmode,xr=pe._fullLayout.dragmode;xr!==Cr&&(Pt.dragmode=xr),ut(),Ze=pe._fullLayout._invScaleX,st=pe._fullLayout._invScaleY,Ir||(qe?xt.shiftKey?xr==="pan"?xr="zoom":c(xr)||(xr="pan"):xt.ctrlKey&&(xr="pan"):xr="pan"),T(xr)?Pt.minDrag=1:Pt.minDrag=void 0,c(xr)?(Pt.xaxes=rt,Pt.yaxes=Ke,g(xt,lt,Br,Pt,xr)):(Pt.clickFn=fr,c(Cr)&&jt(),Ir||(xr==="zoom"?(Pt.moveFn=Kt,Pt.doneFn=Yt,Pt.minDrag=1,wi(xt,lt,Br)):xr==="pan"&&(Pt.moveFn=Ba,Pt.doneFn=pi))),pe._fullLayout._redrag=function(){var Rr=pe._dragdata;if(Rr&&Rr.element===Ct){var Ur=pe._fullLayout.dragmode;c(Ur)||(ut(),Ra([0,0,Nt,Gt]),Pt.moveFn(Rr.dx,Rr.dy))}}};function jt(){Pt.plotinfo.selection=!1,b(pe)}function fr(xt,lt){var Br=Pt.gd;if(Br._fullLayout._activeShapeIndex>=0){Br._fullLayout._deactivateShape(Br);return}var Cr=Br._fullLayout.clickmode;if(Y(Br),xt===2&&!he&&ri(),qe)Cr.indexOf("select")>-1&&p(lt,Br,rt,Ke,we.id,Pt),Cr.indexOf("event")>-1&&i.click(Br,lt,we.id);else if(xt===1&&he){var xr=at?ne:ue,Rr=at==="s"||nt==="w"?0:1,Ur=xr._name+".range["+Rr+"]",Hr=P(xr,Rr),gt="left",Xt="middle";if(xr.fixedrange)return;at?(Xt=at==="n"?"top":"bottom",xr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Br._context.showAxisRangeEntryBoxes&&d.select(Ct).call(o.makeEditable,{gd:Br,immediate:!0,background:Br._fullLayout.paper_bgcolor,text:String(Hr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Xt}).on("edit",function(vr){var Or=xr.d2r(vr);Or!==void 0&&t.call("_guiRelayout",Br,Ur,Or)})}}f.init(Pt);var ur,sr,Pr,Ta,Oa,Ia,qa,Wa,Ca,hi;function wi(xt,lt,Br){var Cr=Ct.getBoundingClientRect();ur=lt-Cr.left,sr=Br-Cr.top,pe._fullLayout._calcInverseTransform(pe);var xr=x.apply3DTransform(pe._fullLayout._invTransform)(ur,sr);ur=xr[0],sr=xr[1],Pr={l:ur,r:ur,w:0,t:sr,b:sr,h:0},Ta=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:E(pe._fullLayout.plot_bgcolor).getLuminance(),Oa="M0,0H"+Nt+"V"+Gt+"H0V0",Ia=!1,qa="xy",hi=!1,Wa=le(tt,Ta,Mt,kt,Oa),Ca=ce(tt,Mt,kt)}function Kt(xt,lt){if(pe._transitioningWithDuration)return!1;var Br=Math.max(0,Math.min(Nt,Ze*xt+ur)),Cr=Math.max(0,Math.min(Gt,st*lt+sr)),xr=Math.abs(Br-ur),Rr=Math.abs(Cr-sr);Pr.l=Math.min(ur,Br),Pr.r=Math.max(ur,Br),Pr.t=Math.min(sr,Cr),Pr.b=Math.max(sr,Cr);function Ur(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Mr.isSubplotConstrained)xr>R||Rr>R?(qa="xy",xr/Nt>Rr/Gt?(Rr=xr*Gt/Nt,sr>Cr?Pr.t=sr-Rr:Pr.b=sr+Rr):(xr=Rr*Nt/Gt,ur>Br?Pr.l=ur-xr:Pr.r=ur+xr),Ca.attr("d",ae(Pr))):Ur();else if(mr.isSubplotConstrained)if(xr>R||Rr>R){qa="xy";var Hr=Math.min(Pr.l/Nt,(Gt-Pr.b)/Gt),gt=Math.max(Pr.r/Nt,(Gt-Pr.t)/Gt);Pr.l=Hr*Nt,Pr.r=gt*Nt,Pr.b=(1-Hr)*Gt,Pr.t=(1-gt)*Gt,Ca.attr("d",ae(Pr))}else Ur();else!Er||Rr<Math.min(Math.max(xr*.6,m),R)?xr<m||!qr?Ur():(Pr.t=0,Pr.b=Gt,qa="x",Ca.attr("d",q(Pr,sr))):!qr||xr<Math.min(Rr*.6,R)?(Pr.l=0,Pr.r=Nt,qa="y",Ca.attr("d",se(Pr,ur))):(qa="xy",Ca.attr("d",ae(Pr)));Pr.w=Pr.r-Pr.l,Pr.h=Pr.b-Pr.t,qa&&(hi=!0),pe._dragged=hi,de(Wa,Ca,Pr,Oa,Ia,Ta),Dt(),pe.emit("plotly_relayouting",Ue),Ia=!0}function Dt(){Ue={},(qa==="xy"||qa==="x")&&(U(rt,Pr.l/Nt,Pr.r/Nt,Ue,Mr.xaxes),$a("x",Ue)),(qa==="xy"||qa==="y")&&(U(Ke,(Gt-Pr.b)/Gt,(Gt-Pr.t)/Gt,Ue,Mr.yaxes),$a("y",Ue))}function Yt(){Dt(),Y(pe),pi(),ee(pe)}var Jt=[0,0,Nt,Gt],Fr=null,ta=y.REDRAWDELAY,ra=we.mainplot?pe._fullLayout._plots[we.mainplot]:we;function ca(xt){if(!pe._context._scrollZoom.cartesian&&!pe._fullLayout._enablescrollzoom)return;if(jt(),pe._transitioningWithDuration){xt.preventDefault(),xt.stopPropagation();return}ut(),clearTimeout(Fr);var lt=-xt.deltaY;if(isFinite(lt)||(lt=xt.wheelDelta/10),!isFinite(lt)){x.log("Did not find wheel motion attributes: ",xt);return}var Br=Math.exp(-Math.min(Math.max(lt,-20),20)/200),Cr=ra.draglayer.select(".nsewdrag").node().getBoundingClientRect(),xr=(xt.clientX-Cr.left)/Cr.width,Rr=(Cr.bottom-xt.clientY)/Cr.height,Ur;function Hr(gt,Xt,vr){if(gt.fixedrange)return;var Or=x.simpleMap(gt.range,gt.r2l),ba=Or[0]+(Or[1]-Or[0])*Xt;function Pa(ma){return gt.l2r(ba+(ma-ba)*vr)}gt.range=Or.map(Pa)}if(_t){for(nt||(xr=.5),Ur=0;Ur<rt.length;Ur++)Hr(rt[Ur],xr,Br);$a("x"),Jt[2]*=Br,Jt[0]+=Jt[2]*xr*(1/Br-1)}if(Oe){for(at||(Rr=.5),Ur=0;Ur<Ke.length;Ur++)Hr(Ke[Ur],Rr,Br);$a("y"),Jt[3]*=Br,Jt[1]+=Jt[3]*(1-Rr)*(1/Br-1)}Ra(Jt),Za(),pe.emit("plotly_relayouting",Ue),Fr=setTimeout(function(){pe._fullLayout&&(Jt=[0,0,Nt,Gt],pi())},ta),xt.preventDefault()}at.length*nt.length!==1&&Q(Ct,ca);function Ba(xt,lt){if(xt=xt*Ze,lt=lt*st,pe._transitioningWithDuration)return;if(pe._fullLayout._replotting=!0,qr==="ew"||Er==="ns"){var Br=qr?-xt:0,Cr=Er?-lt:0;if(mr.isSubplotConstrained){if(qr&&Er){var xr=(xt/Nt-lt/Gt)/2;xt=xr*Nt,lt=-xr*Gt,Br=-xt,Cr=-lt}Er?Br=-Cr*Nt/Gt:Cr=-Br*Gt/Nt}qr&&(B(rt,xt),$a("x")),Er&&(B(Ke,lt),$a("y")),Ra([Br,Cr,Nt,Gt]),Za(),pe.emit("plotly_relayouting",Ue);return}function Rr(Pa,ma,la){for(var _a=1-ma,Ai,ki,Ki=0;Ki<Pa.length;Ki++){var yn=Pa[Ki];if(!yn.fixedrange){Ai=yn,ki=yn._rl[_a]+(yn._rl[ma]-yn._rl[_a])/X(la/yn._length);var Ln=yn.l2r(ki);Ln!==!1&&Ln!==void 0&&(yn.range[ma]=Ln)}}return Ai._length*(Ai._rl[ma]-ki)/(Ai._rl[ma]-Ai._rl[_a])}var Ur=qr==="w"==(Er==="n")?1:-1;if(qr&&Er&&(Mr.isSubplotConstrained||mr.isSubplotConstrained)){var Hr=(xt/Nt+Ur*lt/Gt)/2;xt=Hr*Nt,lt=Ur*Hr*Gt}var gt,Xt;if(qr==="w"?xt=Rr(rt,0,xt):qr==="e"?xt=Rr(rt,1,-xt):qr||(xt=0),Er==="n"?lt=Rr(Ke,1,lt):Er==="s"?lt=Rr(Ke,0,-lt):Er||(lt=0),gt=qr==="w"?xt:0,Xt=Er==="n"?lt:0,Mr.isSubplotConstrained&&!mr.isSubplotConstrained||mr.isSubplotConstrained&&qr&&Er&&Ur>0){var vr;if(mr.isSubplotConstrained||!qr&&Er.length===1){for(vr=0;vr<rt.length;vr++)rt[vr].range=rt[vr]._r.slice(),u(rt[vr],1-lt/Gt);xt=lt*Nt/Gt,gt=xt/2}if(mr.isSubplotConstrained||!Er&&qr.length===1){for(vr=0;vr<Ke.length;vr++)Ke[vr].range=Ke[vr]._r.slice(),u(Ke[vr],1-xt/Nt);lt=xt*Gt/Nt,Xt=lt/2}}(!mr.isSubplotConstrained||!Er)&&$a("x"),(!mr.isSubplotConstrained||!qr)&&$a("y");var Or=Nt-xt,ba=Gt-lt;mr.isSubplotConstrained&&!(qr&&Er)&&(qr?(Xt=gt?0:xt*Gt/Nt,ba=Or*Gt/Nt):(gt=Xt?0:lt*Nt/Gt,Or=ba*Nt/Gt)),Ra([gt,Xt,Or,ba]),Za(),pe.emit("plotly_relayouting",Ue)}function $a(xt,lt){for(var Br=mr.isSubplotConstrained?{x:Ke,y:rt}[xt]:mr[xt+"axes"],Cr=mr.isSubplotConstrained?{x:rt,y:Ke}[xt]:[],xr=0;xr<Br.length;xr++){var Rr=Br[xr],Ur=Rr._id,Hr=mr.xLinks[Ur]||mr.yLinks[Ur],gt=Cr[0]||Ce[Hr]||Ye[Hr];gt&&(lt?(lt[Rr._name+".range[0]"]=lt[gt._name+".range[0]"],lt[Rr._name+".range[1]"]=lt[gt._name+".range[1]"]):Rr.range=gt.range.slice())}}function Za(){var xt=[],lt;function Br(Ur){for(lt=0;lt<Ur.length;lt++)Ur[lt].fixedrange||xt.push(Ur[lt]._id)}function Cr(Ur,Hr){for(lt=0;lt<Ur.length;lt++){var gt=Ur[lt],Xt=gt[Hr];!gt.fixedrange&&Xt.tickmode==="sync"&&xt.push(Xt._id)}}for(_t&&(Br(rt),Br(Mr.xaxes),Br(mr.xaxes),Cr(we.overlays,"xaxis")),Oe&&(Br(Ke),Br(Mr.yaxes),Br(mr.yaxes),Cr(we.overlays,"yaxis")),Ue={},lt=0;lt<xt.length;lt++){var xr=xt[lt],Rr=M(pe,xr);s.drawOne(pe,Rr,{skipTitle:!0}),Ue[Rr._name+".range[0]"]=Rr.range[0],Ue[Rr._name+".range[1]"]=Rr.range[1]}s.redrawComponents(pe,xt)}function ri(){if(!pe._transitioningWithDuration){var xt=pe._context.doubleClick,lt=[];qr&&(lt=lt.concat(rt)),Er&&(lt=lt.concat(Ke)),mr.xaxes&&(lt=lt.concat(mr.xaxes)),mr.yaxes&&(lt=lt.concat(mr.yaxes));var Br={},Cr,xr;if(xt==="reset+autosize")for(xt="autosize",xr=0;xr<lt.length;xr++){Cr=lt[xr];var Rr=Cr._rangeInitial0,Ur=Cr._rangeInitial1,Hr=Rr!==void 0||Ur!==void 0;if(Hr&&(Rr!==void 0&&Rr!==Cr.range[0]||Ur!==void 0&&Ur!==Cr.range[1])||!Hr&&Cr.autorange!==!0){xt="reset";break}}if(xt==="autosize")for(xr=0;xr<lt.length;xr++)Cr=lt[xr],Cr.fixedrange||(Br[Cr._name+".autorange"]=!0);else if(xt==="reset"){for((qr||Mr.isSubplotConstrained)&&(lt=lt.concat(Mr.xaxes)),Er&&!Mr.isSubplotConstrained&&(lt=lt.concat(Mr.yaxes)),Mr.isSubplotConstrained&&(qr?Er||(lt=lt.concat(Ke)):lt=lt.concat(rt)),xr=0;xr<lt.length;xr++)if(Cr=lt[xr],!Cr.fixedrange){var gt=Cr._name,Xt=Cr._autorangeInitial;Cr._rangeInitial0===void 0&&Cr._rangeInitial1===void 0?Br[gt+".autorange"]=!0:Cr._rangeInitial0===void 0?(Br[gt+".autorange"]=Xt,Br[gt+".range"]=[null,Cr._rangeInitial1]):Cr._rangeInitial1===void 0?(Br[gt+".range"]=[Cr._rangeInitial0,null],Br[gt+".autorange"]=Xt):Br[gt+".range"]=[Cr._rangeInitial0,Cr._rangeInitial1]}}pe.emit("plotly_doubleclick",null),t.call("_guiRelayout",pe,Br)}}function pi(){Ra([0,0,Nt,Gt]),x.syncOrAsync([A.previousPromises,function(){pe._fullLayout._replotting=!1,t.call("_guiRelayout",pe,Ue)}],pe)}function Ra(xt){var lt=pe._fullLayout,Br=lt._plots,Cr=lt._subplots.cartesian,xr,Rr,Ur,Hr;if(Ae&&t.subplotsRegistry.splom.drag(pe),Je){for(xr=0;xr<Cr.length;xr++)if(Rr=Br[Cr[xr]],Ur=Rr.xaxis,Hr=Rr.yaxis,Rr._scene){Ur.limitRange&&Ur.limitRange(),Hr.limitRange&&Hr.limitRange();var gt=x.simpleMap(Ur.range,Ur.r2l),Xt=x.simpleMap(Hr.range,Hr.r2l);Rr._scene.update({range:[gt[0],Xt[0],gt[1],Xt[1]]})}}if((Ae||Je)&&(_(pe),w(pe)),Le){var vr=xt[2]/ue._length,Or=xt[3]/ne._length;for(xr=0;xr<Cr.length;xr++){Rr=Br[Cr[xr]],Ur=Rr.xaxis,Hr=Rr.yaxis;var ba=(_t||mr.isSubplotConstrained)&&!Ur.fixedrange&&Ce[Ur._id],Pa=(Oe||mr.isSubplotConstrained)&&!Hr.fixedrange&&Ye[Hr._id],ma,la,_a,Ai;if(ba?(ma=vr,_a=nt||mr.isSubplotConstrained?xt[0]:fn(Ur,ma)):mr.xaHash[Ur._id]?(ma=vr,_a=xt[0]*Ur._length/ue._length):mr.yaHash[Ur._id]?(ma=Or,_a=Er==="ns"?-xt[1]*Ur._length/ne._length:fn(Ur,ma,{n:"top",s:"bottom"}[Er])):(ma=an(Ur,vr,Or),_a=tn(Ur,ma)),ma>1&&(Ur.maxallowed!==void 0&&_t===(Ur.range[0]<Ur.range[1]?"e":"w")||Ur.minallowed!==void 0&&_t===(Ur.range[0]<Ur.range[1]?"w":"e"))&&(ma=1,_a=0),Pa?(la=Or,Ai=at||mr.isSubplotConstrained?xt[1]:fn(Hr,la)):mr.yaHash[Hr._id]?(la=Or,Ai=xt[1]*Hr._length/ne._length):mr.xaHash[Hr._id]?(la=vr,Ai=qr==="ew"?-xt[0]*Hr._length/ue._length:fn(Hr,la,{e:"right",w:"left"}[qr])):(la=an(Hr,vr,Or),Ai=tn(Hr,la)),la>1&&(Hr.maxallowed!==void 0&&Oe===(Hr.range[0]<Hr.range[1]?"n":"s")||Hr.minallowed!==void 0&&Oe===(Hr.range[0]<Hr.range[1]?"s":"n"))&&(la=1,Ai=0),!(!ma&&!la)){ma||(ma=1),la||(la=1);var ki=Ur._offset-_a/ma,Ki=Hr._offset-Ai/la;Rr.clipRect.call(n.setTranslate,_a,Ai).call(n.setScale,ma,la),Rr.plot.call(n.setTranslate,ki,Ki).call(n.setScale,1/ma,1/la),(ma!==Rr.xScaleFactor||la!==Rr.yScaleFactor)&&(n.setPointGroupScale(Rr.zoomScalePts,ma,la),n.setTextPointsScale(Rr.zoomScaleTxt,ma,la)),n.hideOutsideRangePoints(Rr.clipOnAxisFalseTraces,Rr),Rr.xScaleFactor=ma,Rr.yScaleFactor=la}}}}function an(xt,lt,Br){return xt.fixedrange?0:_t&&Mr.xaHash[xt._id]?lt:Oe&&(Mr.isSubplotConstrained?Mr.xaHash:Mr.yaHash)[xt._id]?Br:0}function tn(xt,lt){return lt?(xt.range=xt._r.slice(),u(xt,lt),fn(xt,lt)):0}function fn(xt,lt,Br){return xt._length*(1-lt)*l[Br||xt.constraintoward||"middle"]}return Ct}function F(pe,we,Se,Ie){var Re=x.ensureSingle(pe.draglayer,we,Se,function(We){We.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",pe.id)});return Re.call(h,Ie),Re.node()}function N(pe,we,Se,Ie,Re,We,at){var nt=F(pe,"rect",we,Se);return d.select(nt).call(n.setRect,Ie,Re,We,at),nt}function O(pe,we){for(var Se=0;Se<pe.length;Se++)if(!pe[Se].fixedrange)return we;return""}function P(pe,we){var Se=pe.range[we],Ie=Math.abs(Se-pe.range[1-we]),Re;return pe.type==="date"?Se:pe.type==="log"?(Re=Math.ceil(Math.max(0,-Math.log(Ie)/Math.LN10))+3,S("."+Re+"g")(Math.pow(10,Se))):(Re=Math.floor(Math.log(Math.abs(Se))/Math.LN10)-Math.floor(Math.log(Ie)/Math.LN10)+4,S("."+String(Re)+"g")(Se))}function U(pe,we,Se,Ie,Re){for(var We=0;We<pe.length;We++){var at=pe[We];if(!at.fixedrange)if(at.rangebreaks){var nt=at._id.charAt(0)==="y",tt=nt?1-we:we,qe=nt?1-Se:Se;Ie[at._name+".range[0]"]=at.l2r(at.p2l(tt*at._length)),Ie[at._name+".range[1]"]=at.l2r(at.p2l(qe*at._length))}else{var he=at._rl[0],ue=at._rl[1]-he;Ie[at._name+".range[0]"]=at.l2r(he+ue*we),Ie[at._name+".range[1]"]=at.l2r(he+ue*Se)}}if(Re&&Re.length){var ne=(we+(1-Se))/2;U(Re,ne,1-ne,Ie,[])}}function B(pe,we){for(var Se=0;Se<pe.length;Se++){var Ie=pe[Se];if(!Ie.fixedrange){if(Ie.rangebreaks){var Re=0,We=Ie._length,at=Ie.p2l(Re+we)-Ie.p2l(Re),nt=Ie.p2l(We+we)-Ie.p2l(We),tt=(at+nt)/2;Ie.range=[Ie.l2r(Ie._rl[0]-tt),Ie.l2r(Ie._rl[1]-tt)]}else Ie.range=[Ie.l2r(Ie._rl[0]-we/Ie._m),Ie.l2r(Ie._rl[1]-we/Ie._m)];Ie.limitRange&&Ie.limitRange()}}}function X(pe){return 1-(pe>=0?Math.min(pe,.9):1/(1/Math.max(pe,-.3)+3.222))}function $(pe,we,Se){return pe?pe==="nsew"?Se?"":we==="pan"?"move":"crosshair":pe.toLowerCase()+"-resize":"pointer"}function le(pe,we,Se,Ie,Re){return pe.append("path").attr("class","zoombox").style({fill:we>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Se,Ie)).attr("d",Re+"Z")}function ce(pe,we,Se){return pe.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(we,Se)).attr("d","M0,0Z")}function de(pe,we,Se,Ie,Re,We){pe.attr("d",Ie+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),G(pe,we,Re,We)}function G(pe,we,Se,Ie){Se||(pe.transition().style("fill",Ie>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function Y(pe){d.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ee(pe){L&&pe.data&&pe._context.showTips&&(x.notifier(x._(pe,"Double-click to zoom back out"),"long",pe),L=!1)}function q(pe,we){return"M"+(pe.l-.5)+","+(we-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(pe.r+.5)+","+(we-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function se(pe,we){return"M"+(we-R-.5)+","+(pe.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(we-R-.5)+","+(pe.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,R)/2);return"M"+(pe.l-3.5)+","+(pe.t-.5+we)+"h3v"+-we+"h"+we+"v-3h-"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.t-.5+we)+"h-3v"+-we+"h"+-we+"v-3h"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.b+.5-we)+"h-3v"+we+"h"+-we+"v3h"+(we+3)+"ZM"+(pe.l-3.5)+","+(pe.b+.5-we)+"h3v"+we+"h"+we+"v3h-"+(we+3)+"Z"}function j(pe,we,Se,Ie,Re){for(var We=!1,at={},nt={},tt,qe,he,ue,ne=(Re||{}).xaHash,Ce=(Re||{}).yaHash,Ye=0;Ye<we.length;Ye++){var rt=we[Ye];for(tt in Se)if(rt[tt]){for(he in rt)!(Re&&(ne[he]||Ce[he]))&&!(he.charAt(0)==="x"?Se:Ie)[he]&&(at[he]=tt);for(qe in Ie)!(Re&&(ne[qe]||Ce[qe]))&&rt[qe]&&(We=!0)}for(qe in Ie)if(rt[qe])for(ue in rt)!(Re&&(ne[ue]||Ce[ue]))&&!(ue.charAt(0)==="x"?Se:Ie)[ue]&&(nt[ue]=qe)}We&&(x.extendFlat(at,nt),nt={});var Ke={},Mt=[];for(he in at){var kt=M(pe,he);Mt.push(kt),Ke[kt._id]=kt}var Nt={},Gt=[];for(ue in nt){var Mr=M(pe,ue);Gt.push(Mr),Nt[Mr._id]=Mr}return{xaHash:Ke,yaHash:Nt,xaxes:Mt,yaxes:Gt,xLinks:at,yLinks:nt,isSubplotConstrained:We}}function Q(pe,we){if(!e)pe.onwheel!==void 0?pe.onwheel=we:pe.onmousewheel!==void 0?pe.onmousewheel=we:pe.isAddedWheelEvent||(pe.isAddedWheelEvent=!0,pe.addEventListener("wheel",we,{passive:!1}));else{var Se=pe.onwheel!==void 0?"wheel":"mousewheel";pe._onwheel&&pe.removeEventListener(Se,pe._onwheel),pe._onwheel=we,pe.addEventListener(Se,we,{passive:!1})}}function re(pe){var we=[];for(var Se in pe)we.push(pe[Se]);return we}V.exports={makeDragBox:z,makeDragger:F,makeRectDragger:N,makeZoombox:le,makeCorners:ce,updateZoombox:de,xyCorners:ae,transitionZoombox:G,removeZoombox:Y,showDoubleClickNotifier:ee,attachWheelEventHandler:Q}}}),I5=He({"src/plots/cartesian/graph_interact.js"(Z){"use strict";var V=Wn(),d=rf(),x=Ap(),S=Kd(),E=P5().makeDragBox,e=lh().DRAGGERSIZE;Z.initInteractions=function(r){var o=r._fullLayout;if(r._context.staticPlot){V.select(r).selectAll(".drag").remove();return}if(!(!o._has("cartesian")&&!o._has("splom"))){var a=Object.keys(o._plots||{}).sort(function(i,s){if((o._plots[i].mainplot&&!0)===(o._plots[s].mainplot&&!0)){var h=i.split("y"),f=s.split("y");return h[0]===f[0]?Number(h[1]||1)-Number(f[1]||1):Number(h[0]||1)-Number(f[0]||1)}return o._plots[i].mainplot?1:-1});a.forEach(function(i){var s=o._plots[i],h=s.xaxis,f=s.yaxis;if(!s.mainplot){var v=E(r,s,h._offset,f._offset,h._length,f._length,"ns","ew");v.onmousemove=function(l){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&d.hover(r,l,i)},d.hover(r,l,i),r._fullLayout._lasthover=v,r._fullLayout._hoversubplot=i},v.onmouseout=function(l){r._dragging||(r._fullLayout._hoversubplot=null,x.unhover(r,l))},r._context.showAxisDragHandles&&(E(r,s,h._offset-e,f._offset-e,e,e,"n","w"),E(r,s,h._offset+h._length,f._offset-e,e,e,"n","e"),E(r,s,h._offset-e,f._offset+f._length,e,e,"s","w"),E(r,s,h._offset+h._length,f._offset+f._length,e,e,"s","e"))}if(r._context.showAxisDragHandles){if(i===h._mainSubplot){var c=h._mainLinePosition;h.side==="top"&&(c-=e),E(r,s,h._offset+h._length*.1,c,h._length*.8,e,"","ew"),E(r,s,h._offset,c,h._length*.1,e,"","w"),E(r,s,h._offset+h._length*.9,c,h._length*.1,e,"","e")}if(i===f._mainSubplot){var T=f._mainLinePosition;f.side!=="right"&&(T-=e),E(r,s,T,f._offset+f._length*.1,e,f._length*.8,"ns",""),E(r,s,T,f._offset+f._length*.9,e,f._length*.1,"s",""),E(r,s,T,f._offset,e,f._length*.1,"n","")}}});var n=o._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,d.hover(r,i,o._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,d.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Z.updateFx(r)}},Z.updateFx=function(t){var r=t._fullLayout,o=r.dragmode==="pan"?"move":"crosshair";S(r._draggers,o)}}}),Oz=He({"src/plot_api/container_array_match.js"(Z,V){"use strict";var d=lo();V.exports=function(S){for(var E=d.layoutArrayContainers,e=d.layoutArrayRegexes,t=S.split("[")[0],r,o,a=0;a<e.length;a++)if(o=S.match(e[a]),o&&o.index===0){r=o[0];break}if(r||(r=E[E.indexOf(t)]),!r)return!1;var n=S.slice(r.length);return n?(o=n.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:r,index:Number(o[1]),property:o[3]||""}:!1):{array:r,index:"",property:""}}}}),Bz=He({"src/plot_api/manage_arrays.js"(Z){"use strict";var V=Zv(),d=p2(),x=Km(),S=g2().sorterAsc,E=lo();Z.containerArrayMatch=Oz();var e=Z.isAddVal=function(o){return o==="add"||V(o)},t=Z.isRemoveVal=function(o){return o===null||o==="remove"};Z.applyContainerArrayChanges=function(o,a,n,i,s){var h=a.astr,f=E.getComponentMethod(h,"supplyLayoutDefaults"),v=E.getComponentMethod(h,"draw"),c=E.getComponentMethod(h,"drawOne"),T=i.replot||i.recalc||f===d||v===d,l=o.layout,_=o._fullLayout;if(n[""]){Object.keys(n).length>1&&x.warn("Full array edits are incompatible with other edits",h);var w=n[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return x.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,_),v(o),!0)}var A=Object.keys(n).map(Number).sort(S),M=a.get(),g=M||[],b=s(_,h).get(),p=[],u=-1,y=g.length,m,R,L,z,F,N,O,P;for(m=0;m<A.length;m++){if(L=A[m],z=n[L],F=Object.keys(z),N=z[""],O=e(N),L<0||L>g.length-(O?0:1)){x.warn("index out of range",h,L);continue}if(N!==void 0)F.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",h,L),t(N)?p.push(L):O?(N==="add"&&(N={}),g.splice(L,0,N),b&&b.splice(L,0,{})):x.warn("Unrecognized full object edit value",h,L,N),u===-1&&(u=L);else for(R=0;R<F.length;R++)P=h+"["+L+"].",s(g[L],F[R],P).set(z[F[R]])}for(m=p.length-1;m>=0;m--)g.splice(p[m],1),b&&b.splice(p[m],1);if(g.length?M||a.set(g):a.set(null),T)return!1;if(f(l,_),c!==d){var U;if(u===-1)U=A;else{for(y=Math.max(g.length,y),U=[],m=0;m<A.length&&(L=A[m],!(L>=u));m++)U.push(L);for(m=u;m<y;m++)U.push(m)}for(m=0;m<U.length;m++)c(o,U[m])}else v(o);return!0}}}),Nz=He({"src/plot_api/helpers.js"(Z){"use strict";var V=as(),d=lo(),x=sa(),S=bc(),E=ef(),e=Jn(),t=E.cleanId,r=E.getFromTrace,o=d.traceIs,a=["x","y","z"];Z.clearPromiseQueue=function(l){Array.isArray(l._promises)&&l._promises.length>0&&x.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var _,w;l||(l={}),l.xaxis1&&(l.xaxis||(l.xaxis=l.xaxis1),delete l.xaxis1),l.yaxis1&&(l.yaxis||(l.yaxis=l.yaxis1),delete l.yaxis1),l.scene1&&(l.scene||(l.scene=l.scene1),delete l.scene1);var A=(S.subplotsRegistry.cartesian||{}).attrRegex,M=(S.subplotsRegistry.polar||{}).attrRegex,g=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,p=Object.keys(l);for(_=0;_<p.length;_++){var u=p[_];if(A&&A.test(u)){var y=l[u];y.anchor&&y.anchor!=="free"&&(y.anchor=t(y.anchor)),y.overlaying&&(y.overlaying=t(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":y.isdate===!1&&y.islog===!1&&(y.type="linear")),(y.autorange==="withzero"||y.autorange==="tozero")&&(y.autorange=!0,y.rangemode="tozero"),y.insiderange&&delete y.range,delete y.islog,delete y.isdate,delete y.categories,f(y,"domain")&&delete y.domain}}var m=Array.isArray(l.annotations)?l.annotations.length:0;for(_=0;_<m;_++){var R=l.annotations[_];x.isPlainObject(R)&&(n(R,"xref"),n(R,"yref"))}var L=Array.isArray(l.shapes)?l.shapes.length:0;for(_=0;_<L;_++){var z=l.shapes[_];x.isPlainObject(z)&&(n(z,"xref",!0),n(z,"yref",!0))}var F=Array.isArray(l.images)?l.images.length:0;for(_=0;_<F;_++){var N=l.images[_];x.isPlainObject(N)&&(n(N,"xref"),n(N,"yref"))}var O=l.legend;return O&&(O.x>3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),l.dragmode==="rotate"&&(l.dragmode="orbit"),e.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function n(l,_,w=!1){var A=l[_],M=_.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[_]=t(A,M,!0))}Z.cleanData=function(l){for(var _=0;_<l.length;_++){var w=l[_],A;if(w.type==="histogramy"&&"xbins"in w&&!("ybins"in w)&&(w.ybins=w.xbins,delete w.xbins),w.type==="histogramy"&&Z.swapXYData(w),(w.type==="histogramx"||w.type==="histogramy")&&(w.type="histogram"),"scl"in w&&!("colorscale"in w)&&(w.colorscale=w.scl,delete w.scl),"reversescl"in w&&!("reversescale"in w)&&(w.reversescale=w.reversescl,delete w.reversescl),w.xaxis&&(w.xaxis=t(w.xaxis,"x")),w.yaxis&&(w.yaxis=t(w.yaxis,"y")),o(w,"gl3d")&&w.scene&&(w.scene=S.subplotsRegistry.gl3d.cleanId(w.scene)),!o(w,"pie-like")&&!o(w,"bar-like"))if(Array.isArray(w.textposition))for(A=0;A<w.textposition.length;A++)w.textposition[A]=h(w.textposition[A]);else w.textposition&&(w.textposition=h(w.textposition));var M=d.getModule(w);if(M&&M.colorbar){var g=M.colorbar.container,b=g?w[g]:w;b&&b.colorscale&&(b.colorscale==="YIGnBu"&&(b.colorscale="YlGnBu"),b.colorscale==="YIOrRd"&&(b.colorscale="YlOrRd"))}if(w.type==="surface"&&x.isPlainObject(w.contours)){var p=["x","y","z"];for(A=0;A<p.length;A++){var u=w.contours[p[A]];x.isPlainObject(u)&&(u.highlightColor&&(u.highlightcolor=u.highlightColor,delete u.highlightColor),u.highlightWidth&&(u.highlightwidth=u.highlightWidth,delete u.highlightWidth))}}if(w.type==="candlestick"||w.type==="ohlc"){var y=(w.increasing||{}).showlegend!==!1,m=(w.decreasing||{}).showlegend!==!1,R=i(w.increasing),L=i(w.decreasing);if(R!==!1&&L!==!1){var z=s(R,L,y,m);z&&(w.name=z)}else(R||L)&&!w.name&&(w.name=R||L)}f(w,"line")&&delete w.line,"marker"in w&&(f(w.marker,"line")&&delete w.marker.line,f(w,"marker")&&delete w.marker),e.clean(w),w.autobinx&&(delete w.autobinx,delete w.xbins),w.autobiny&&(delete w.autobiny,delete w.ybins)}};function i(l){if(!x.isPlainObject(l))return!1;var _=l.name;return delete l.name,delete l.showlegend,(typeof _=="string"||typeof _=="number")&&String(_)}function s(l,_,w,A){if(w&&!A)return l;if(A&&!w||!l.trim())return _;if(!_.trim())return l;var M=Math.min(l.length,_.length),g;for(g=0;g<M&&l.charAt(g)===_.charAt(g);g++);var b=l.slice(0,g);return b.trim()}function h(l){var _="middle",w="center";return typeof l=="string"&&(l.indexOf("top")!==-1?_="top":l.indexOf("bottom")!==-1&&(_="bottom"),l.indexOf("left")!==-1?w="left":l.indexOf("right")!==-1&&(w="right")),_+" "+w}function f(l,_){return _ in l&&typeof l[_]=="object"&&Object.keys(l[_]).length===0}Z.swapXYData=function(l){var _;if(x.swapAttrs(l,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(l.z)&&Array.isArray(l.z[0])&&(l.transpose?delete l.transpose:l.transpose=!0),l.error_x&&l.error_y){var w=l.error_y,A="copy_ystyle"in w?w.copy_ystyle:!(w.color||w.thickness||w.width);x.swapAttrs(l,["error_?.copy_ystyle"]),A&&x.swapAttrs(l,["error_?.color","error_?.thickness","error_?.width"])}if(typeof l.hoverinfo=="string"){var M=l.hoverinfo.split("+");for(_=0;_<M.length;_++)M[_]==="x"?M[_]="y":M[_]==="y"&&(M[_]="x");l.hoverinfo=M.join("+")}},Z.coerceTraceIndices=function(l,_){if(V(_))return[_];if(!Array.isArray(_)||!_.length)return l.data.map(function(M,g){return g});if(Array.isArray(_)){for(var w=[],A=0;A<_.length;A++)x.isIndex(_[A],l.data.length)?w.push(_[A]):x.warn("trace index (",_[A],") is not a number or is out of bounds");return w}return _},Z.manageArrayContainers=function(l,_,w){var A=l.obj,M=l.parts,g=M.length,b=M[g-1],p=V(b);if(p&&_===null){var u=M.slice(0,g-1).join("."),y=x.nestedProperty(A,u).get();y.splice(b,1)}else p&&l.get()===void 0&&l.get()===void 0&&(w[l.astr]=null),l.set(_)};var v=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function c(l){var _=l.search(v);if(_>0)return l.slice(0,_)}Z.hasParent=function(l,_){for(var w=c(_);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,_,w){for(var A=0;A<_.length;A++)for(var M=l._fullData[A],g=0;g<3;g++){var b=r(l,M,a[g]);if(b&&b.type!=="log"){var p=b._name,u=b._id.slice(1);if(u.slice(0,5)==="scene"){if(w[u]!==void 0)continue;p=u+"."+p}var y=p+".type";w[p]===void 0&&w[y]===void 0&&x.nestedProperty(l.layout,y).set(null)}}};var T=(l,_)=>{let w=(...A)=>A.every(M=>x.isPlainObject(M))||A.every(M=>Array.isArray(M));if([l,_].every(A=>Array.isArray(A))){if(l.length!==_.length)return!1;for(let A=0;A<l.length;A++){let M=l[A],g=_[A];if(M!==g&&!(w(M,g)?T(M,g):!1))return!1}return!0}else if([l,_].every(A=>x.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(_).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let M=l[A],g=_[A];if(M!==g&&!(w(M,g)?T(M,g):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var V=Wn(),d=as(),x=i5(),S=sa(),E=S.nestedProperty,e=Qy(),t=iz(),r=lo(),o=e1(),a=bc(),n=Ho(),i=h5(),s=Wh(),h=es(),f=Jn(),v=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,_=Bz(),w=Nz(),A=P_(),M=pc(),g=lh().AX_NAME_PATTERN,b=0,p=5;function u(Ae,Le,Ue,Ze){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ut=Le;Le=ut.data,Ue=ut.layout,Ze=ut.config,st=ut.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,Ue,Ze]);if(Ut===!1)return Promise.reject();!Le&&!Ue&&!S.isPlotDiv(Ae)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ae);function Ct(){if(st)return Z.addFrames(Ae,st)}z(Ae,Ze),Ue||(Ue={}),V.select(Ae).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Ae._promises)||(Ae._promises=[]);var Pt=(Ae.data||[]).length===0&&Array.isArray(Le);Array.isArray(Le)&&(w.cleanData(Le),Pt?Ae.data=Le:Ae.data.push.apply(Ae.data,Le),Ae.empty=!1),(!Ae.layout||Pt)&&(Ae.layout=w.cleanLayout(Ue)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,fr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Je(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&n.saveShowSpikeInitial(Ae);var ur=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;ur&&a.doCalcdata(Ae);for(var sr=0;sr<Ae.calcdata.length;sr++)Ae.calcdata[sr][0].trace=Ae._fullData[sr];Ae._context.responsive?Ae._responsiveChartHandler||(Ae._responsiveChartHandler=function(){S.isHidden(Ae)||a.resize(Ae)},window.addEventListener("resize",Ae._responsiveChartHandler)):S.clearResponsive(Ae);var Pr=S.extendFlat({},jt._size),Ta=0;function Oa(){for(var Dt=jt._basePlotModules,Yt=0;Yt<Dt.length;Yt++)Dt[Yt].drawFramework&&Dt[Yt].drawFramework(Ae);!jt._glcanvas&&jt._has("gl")&&(jt._glcanvas=jt._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(ra){return ra.key}),jt._glcanvas.enter().append("canvas").attr("class",function(ra){return"gl-canvas gl-canvas-"+ra.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Jt=Ae._context.plotGlPixelRatio;if(jt._glcanvas){jt._glcanvas.attr("width",jt.width*Jt).attr("height",jt.height*Jt).style("width",jt.width+"px").style("height",jt.height+"px");var Fr=jt._glcanvas.data()[0].regl;if(Fr&&(Math.floor(jt.width*Jt)!==Fr._gl.drawingBufferWidth||Math.floor(jt.height*Jt)!==Fr._gl.drawingBufferHeight)){var ta="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(Ta)S.error(ta);else return S.log(ta+" Clearing graph and plotting again."),a.cleanPlot([],{},Ae._fullData,jt),a.supplyDefaults(Ae),jt=Ae._fullLayout,a.doCalcdata(Ae),Ta++,Oa()}}return jt.modebar.orientation==="h"?jt._modebardiv.style("height",null).style("width","100%"):jt._modebardiv.style("width",null).style("height",jt.height+"px"),a.previousPromises(Ae)}function Ia(){if(a.clearAutoMarginIds(Ae),A.drawMarginPushers(Ae),n.allowAutoMargin(Ae),Ae._fullLayout.title.text&&Ae._fullLayout.title.automargin&&a.allowAutoMargin(Ae,"title.automargin"),jt._has("pie"))for(var Dt=Ae._fullData,Yt=0;Yt<Dt.length;Yt++){var Jt=Dt[Yt];Jt.type==="pie"&&Jt.automargin&&a.allowAutoMargin(Ae,"pie."+Jt.uid+".automargin")}return a.doAutoMargin(Ae),a.previousPromises(Ae)}function qa(){if(a.didMarginChange(Pr,jt._size))return S.syncOrAsync([Ia,A.layoutStyles],Ae)}function Wa(){if(!ur){Ca();return}return S.syncOrAsync([r.getComponentMethod("shapes","calcAutorange"),r.getComponentMethod("annotations","calcAutorange"),Ca],Ae)}function Ca(){Ae._transitioning||(A.doAutoRangeAndConstraints(Ae),Pt&&n.saveRangeInitial(Ae),r.getComponentMethod("rangeslider","calcAutorange")(Ae))}function hi(){return n.draw(Ae,Pt?"":"redraw")}var wi=[a.previousPromises,Ct,Oa,Ia,qa];fr&&wi.push(Wa),wi.push(A.layoutStyles),fr&&wi.push(hi,function(Yt){var Jt=Yt._fullLayout._insideTickLabelsUpdaterange;if(Jt)return Yt._fullLayout._insideTickLabelsUpdaterange=void 0,we(Yt,Jt).then(function(){n.saveRangeInitial(Yt,!0)})}),wi.push(A.drawData,A.finalDraw,v,a.addLinks,a.rehover,a.redrag,a.reselect,a.doAutoMargin,a.previousPromises);var Kt=S.syncOrAsync(wi,Ae);return(!Kt||!Kt.then)&&(Kt=Promise.resolve()),Kt.then(function(){return y(Ae),Ae})}function y(Ae){var Le=Ae._fullLayout;Le._redrawFromAutoMarginCount?Le._redrawFromAutoMarginCount--:Ae.emit("plotly_afterplot")}function m(Ae){return S.extendFlat(l,Ae)}function R(Ae,Le){try{Ae._fullLayout._paper.style("background",Le)}catch(Ue){S.error(Ue)}}function L(Ae,Le){var Ue=f.combine(Le,"white");R(Ae,Ue)}function z(Ae,Le){if(!Ae._context){Ae._context=S.extendDeep({},l);var Ue=V.select("base");Ae._context._baseUrl=Ue.size()&&Ue.attr("href")?window.location.href.split("#")[0]:""}var Ze=Ae._context,st,ut,Ut;if(Le){for(ut=Object.keys(Le),st=0;st<ut.length;st++)Ut=ut[st],!(Ut==="editable"||Ut==="edits")&&Ut in Ze&&(Ut==="setBackground"&&Le[Ut]==="opaque"?Ze[Ut]=L:Ze[Ut]=Le[Ut]);var Ct=Le.editable;if(Ct!==void 0)for(Ze.editable=Ct,ut=Object.keys(Ze.edits),st=0;st<ut.length;st++)Ze.edits[ut[st]]=Ct;if(Le.edits)for(ut=Object.keys(Le.edits),st=0;st<ut.length;st++)Ut=ut[st],Ut in Ze.edits&&(Ze.edits[Ut]=Le.edits[Ut]);Ze._exportedPlot=Le._exportedPlot}Ze.staticPlot&&(Ze.editable=!1,Ze.edits={},Ze.autosizable=!1,Ze.scrollZoom=!1,Ze.doubleClick=!1,Ze.showTips=!1,Ze.showLink=!1,Ze.displayModeBar=!1),Ze.displayModeBar==="hover"&&!x&&(Ze.displayModeBar=!0),(Ze.setBackground==="transparent"||typeof Ze.setBackground!="function")&&(Ze.setBackground=R),Ze._hasZeroHeight=Ze._hasZeroHeight||Ae.clientHeight===0,Ze._hasZeroWidth=Ze._hasZeroWidth||Ae.clientWidth===0;var Pt=Ze.scrollZoom,jt=Ze._scrollZoom={};if(Pt===!0)jt.cartesian=1,jt.gl3d=1,jt.geo=1,jt.mapbox=1,jt.map=1;else if(typeof Pt=="string"){var fr=Pt.split("+");for(st=0;st<fr.length;st++)jt[fr[st]]=1}else Pt!==!1&&(jt.gl3d=1,jt.geo=1,jt.mapbox=1,jt.map=1)}function F(Ae){if(Ae=S.getGraphDiv(Ae),!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae);return w.cleanData(Ae.data),w.cleanLayout(Ae.layout),Ae.calcdata=void 0,Z._doPlot(Ae).then(function(){return Ae.emit("plotly_redraw"),Ae})}function N(Ae,Le,Ue,Ze){return Ae=S.getGraphDiv(Ae),a.cleanPlot([],{},Ae._fullData||[],Ae._fullLayout||{}),a.purge(Ae),Z._doPlot(Ae,Le,Ue,Ze)}function O(Ae,Le){var Ue=Le+1,Ze=[],st,ut;for(st=0;st<Ae.length;st++)ut=Ae[st],ut<0?Ze.push(Ue+ut):Ze.push(ut);return Ze}function P(Ae,Le,Ue){var Ze,st;for(Ze=0;Ze<Le.length;Ze++){if(st=Le[Ze],st!==parseInt(st,10))throw new Error("all values in "+Ue+" must be integers");if(st>=Ae.data.length||st<-Ae.data.length)throw new Error(Ue+" must be valid indices for gd.data.");if(Le.indexOf(st,Ze+1)>-1||st>=0&&Le.indexOf(-Ae.data.length+st)>-1||st<0&&Le.indexOf(Ae.data.length+st)>-1)throw new Error("each index in "+Ue+" must be unique.")}}function U(Ae,Le,Ue){if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Le)||(Le=[Le]),P(Ae,Le,"currentIndices"),typeof Ue<"u"&&!Array.isArray(Ue)&&(Ue=[Ue]),typeof Ue<"u"&&P(Ae,Ue,"newIndices"),typeof Ue<"u"&&Le.length!==Ue.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,Ue){var Ze,st;if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("traces must be defined.");for(Array.isArray(Le)||(Le=[Le]),Ze=0;Ze<Le.length;Ze++)if(st=Le[Ze],typeof st!="object"||Array.isArray(st)||st===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ue<"u"&&!Array.isArray(Ue)&&(Ue=[Ue]),typeof Ue<"u"&&Ue.length!==Le.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function X(Ae,Le,Ue,Ze){var st=S.isPlainObject(Ze);if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array");if(!S.isPlainObject(Le))throw new Error("update must be a key:value object");if(typeof Ue>"u")throw new Error("indices must be an integer or array of integers");P(Ae,Ue,"indices");for(var ut in Le){if(!Array.isArray(Le[ut])||Le[ut].length!==Ue.length)throw new Error("attribute "+ut+" must be an array of length equal to indices array length");if(st&&(!(ut in Ze)||!Array.isArray(Ze[ut])||Ze[ut].length!==Le[ut].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function $(Ae,Le,Ue,Ze){var st=S.isPlainObject(Ze),ut=[],Ut,Ct,Pt,jt,fr;Array.isArray(Ue)||(Ue=[Ue]),Ue=O(Ue,Ae.data.length-1);for(var ur in Le)for(var sr=0;sr<Ue.length;sr++){if(Ut=Ae.data[Ue[sr]],Pt=E(Ut,ur),Ct=Pt.get(),jt=Le[ur][sr],!S.isArrayOrTypedArray(jt))throw new Error("attribute: "+ur+" index: "+sr+" must be an array");if(!S.isArrayOrTypedArray(Ct))throw new Error("cannot extend missing or non-array attribute: "+ur);if(Ct.constructor!==jt.constructor)throw new Error("cannot extend array with an array of a different type: "+ur);fr=st?Ze[ur][sr]:Ze,d(fr)||(fr=-1),ut.push({prop:Pt,target:Ct,insert:jt,maxp:Math.floor(fr)})}return ut}function le(Ae,Le,Ue,Ze,st){X(Ae,Le,Ue,Ze);for(var ut=$(Ae,Le,Ue,Ze),Ut={},Ct={},Pt=0;Pt<ut.length;Pt++){var jt=ut[Pt].prop,fr=ut[Pt].maxp,ur=st(ut[Pt].target,ut[Pt].insert,fr);jt.set(ur[0]),Array.isArray(Ut[jt.astr])||(Ut[jt.astr]=[]),Ut[jt.astr].push(ur[1]),Array.isArray(Ct[jt.astr])||(Ct[jt.astr]=[]),Ct[jt.astr].push(ut[Pt].target.length)}return{update:Ut,maxPoints:Ct}}function ce(Ae,Le){var Ue=new Ae.constructor(Ae.length+Le.length);return Ue.set(Ae),Ue.set(Le,Ae.length),Ue}function de(Ae,Le,Ue,Ze){Ae=S.getGraphDiv(Ae);function st(Pt,jt,fr){var ur,sr;if(S.isTypedArray(Pt))if(fr<0){var Pr=new Pt.constructor(0),Ta=ce(Pt,jt);fr<0?(ur=Ta,sr=Pr):(ur=Pr,sr=Ta)}else if(ur=new Pt.constructor(fr),sr=new Pt.constructor(Pt.length+jt.length-fr),fr===jt.length)ur.set(jt),sr.set(Pt);else if(fr<jt.length){var Oa=jt.length-fr;ur.set(jt.subarray(Oa)),sr.set(Pt),sr.set(jt.subarray(0,Oa),Pt.length)}else{var Ia=fr-jt.length,qa=Pt.length-Ia;ur.set(Pt.subarray(qa)),ur.set(jt,Ia),sr.set(Pt.subarray(0,qa))}else ur=Pt.concat(jt),sr=fr>=0&&fr<ur.length?ur.splice(0,ur.length-fr):[];return[ur,sr]}var ut=le(Ae,Le,Ue,Ze,st),Ut=Z.redraw(Ae),Ct=[Ae,ut.update,Ue,ut.maxPoints];return t.add(Ae,Z.prependTraces,Ct,de,arguments),Ut}function G(Ae,Le,Ue,Ze){Ae=S.getGraphDiv(Ae);function st(Pt,jt,fr){var ur,sr;if(S.isTypedArray(Pt))if(fr<=0){var Pr=new Pt.constructor(0),Ta=ce(jt,Pt);fr<0?(ur=Ta,sr=Pr):(ur=Pr,sr=Ta)}else if(ur=new Pt.constructor(fr),sr=new Pt.constructor(Pt.length+jt.length-fr),fr===jt.length)ur.set(jt),sr.set(Pt);else if(fr<jt.length){var Oa=jt.length-fr;ur.set(jt.subarray(0,Oa)),sr.set(jt.subarray(Oa)),sr.set(Pt,Oa)}else{var Ia=fr-jt.length;ur.set(jt),ur.set(Pt.subarray(0,Ia),jt.length),sr.set(Pt.subarray(Ia))}else ur=jt.concat(Pt),sr=fr>=0&&fr<ur.length?ur.splice(fr,ur.length):[];return[ur,sr]}var ut=le(Ae,Le,Ue,Ze,st),Ut=Z.redraw(Ae),Ct=[Ae,ut.update,Ue,ut.maxPoints];return t.add(Ae,Z.extendTraces,Ct,G,arguments),Ut}function Y(Ae,Le,Ue){Ae=S.getGraphDiv(Ae);var Ze=[],st=Z.deleteTraces,ut=Y,Ut=[Ae,Ze],Ct=[Ae,Le],Pt,jt;for(B(Ae,Le,Ue),Array.isArray(Le)||(Le=[Le]),Le=Le.map(function(fr){return S.extendFlat({},fr)}),w.cleanData(Le),Pt=0;Pt<Le.length;Pt++)Ae.data.push(Le[Pt]);for(Pt=0;Pt<Le.length;Pt++)Ze.push(-Le.length+Pt);if(typeof Ue>"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ut,Ct),jt;Array.isArray(Ue)||(Ue=[Ue]);try{U(Ae,Ze,Ue)}catch(fr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),fr}return t.startSequence(Ae),t.add(Ae,st,Ut,ut,Ct),jt=Z.moveTraces(Ae,Ze,Ue),t.stopSequence(Ae),jt}function ee(Ae,Le){Ae=S.getGraphDiv(Ae);var Ue=[],Ze=Z.addTraces,st=ee,ut=[Ae,Ue,Le],Ut=[Ae,Le],Ct,Pt;if(typeof Le>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Le)||(Le=[Le]),P(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct<Le.length;Ct+=1)Pt=Ae.data.splice(Le[Ct],1)[0],Ue.push(Pt);var jt=Z.redraw(Ae);return t.add(Ae,Ze,ut,st,Ut),jt}function q(Ae,Le,Ue){Ae=S.getGraphDiv(Ae);var Ze=[],st=[],ut=q,Ut=q,Ct=[Ae,Ue,Le],Pt=[Ae,Le,Ue],jt;if(U(Ae,Le,Ue),Le=Array.isArray(Le)?Le:[Le],typeof Ue>"u")for(Ue=[],jt=0;jt<Le.length;jt++)Ue.push(-Le.length+jt);for(Ue=Array.isArray(Ue)?Ue:[Ue],Le=O(Le,Ae.data.length-1),Ue=O(Ue,Ae.data.length-1),jt=0;jt<Ae.data.length;jt++)Le.indexOf(jt)===-1&&Ze.push(Ae.data[jt]);for(jt=0;jt<Le.length;jt++)st.push({newIndex:Ue[jt],trace:Ae.data[Le[jt]]});for(st.sort(function(ur,sr){return ur.newIndex-sr.newIndex}),jt=0;jt<st.length;jt+=1)Ze.splice(st[jt].newIndex,0,st[jt].trace);Ae.data=Ze;var fr=Z.redraw(Ae);return t.add(Ae,ut,Ct,Ut,Pt),fr}function se(Ae,Le,Ue,Ze){Ae=S.getGraphDiv(Ae),w.clearPromiseQueue(Ae);var st={};if(typeof Le=="string")st[Le]=Ue;else if(S.isPlainObject(Le))st=S.extendFlat({},Le),Ze===void 0&&(Ze=Ue);else return S.warn("Restyle fail.",Le,Ue,Ze),Promise.reject();Object.keys(st).length&&(Ae.changed=!0);var ut=w.coerceTraceIndices(Ae,Ze),Ut=pe(Ae,st,ut),Ct=Ut.flags;Ct.calc&&(Ae.calcdata=void 0),Ct.clearAxisTypes&&w.clearAxisTypes(Ae,ut,{});var Pt=[];Ct.fullReplot?Pt.push(Z._doPlot):(Pt.push(a.previousPromises),a.supplyDefaults(Ae),Ct.markerSize&&(a.doCalcdata(Ae),Ie(Pt)),Ct.style&&Pt.push(A.doTraceStyle),Ct.colorbars&&Pt.push(A.doColorBars),Pt.push(y)),Pt.push(a.rehover,a.redrag,a.reselect),t.add(Ae,se,[Ae,Ut.undoit,Ut.traces],se,[Ae,Ut.redoit,Ut.traces]);var jt=S.syncOrAsync(Pt,Ae);return(!jt||!jt.then)&&(jt=Promise.resolve()),jt.then(function(){return Ae.emit("plotly_restyle",Ut.eventData),Ae})}function ae(Ae){return Ae===void 0?null:Ae}function j(Ae,Le){return Le?function(Ue,Ze,st){var ut=E(Ue,Ze),Ut=ut.set;return ut.set=function(Ct){var Pt=(st||"")+Ze;Q(Pt,ut.get(),Ct,Ae),Ut(Ct)},ut}:E}function Q(Ae,Le,Ue,Ze){if(Array.isArray(Le)||Array.isArray(Ue))for(var st=Array.isArray(Le)?Le:[],ut=Array.isArray(Ue)?Ue:[],Ut=Math.max(st.length,ut.length),Ct=0;Ct<Ut;Ct++)Q(Ae+"["+Ct+"]",st[Ct],ut[Ct],Ze);else if(S.isPlainObject(Le)||S.isPlainObject(Ue)){var Pt=S.isPlainObject(Le)?Le:{},jt=S.isPlainObject(Ue)?Ue:{},fr=S.extendFlat({},Pt,jt);for(var ur in fr)Q(Ae+"."+ur,Pt[ur],jt[ur],Ze)}else Ze[Ae]===void 0&&(Ze[Ae]=ae(Le))}function re(Ae,Le,Ue){for(var Ze in Ue){var st=E(Ae,Ze);Q(Ze,st.get(),Ue[Ze],Le)}}function pe(Ae,Le,Ue){var Ze=Ae._fullLayout,st=Ae._fullData,ut=Ae.data,Ut=Ze._guiEditing,Ct=j(Ze._preGUI,Ut),Pt=S.extendDeepAll({},Le),jt,fr=M.traceFlags(),ur={},sr={},Pr;function Ta(){return Ue.map(function(){})}function Oa(Xt){var vr=n.id2name(Xt);Pr.indexOf(vr)===-1&&Pr.push(vr)}function Ia(Xt){return"LAYOUT"+Xt+".autorange"}function qa(Xt){return"LAYOUT"+Xt+".range"}function Wa(Xt){for(var vr=Xt;vr<st.length;vr++)if(st[vr]._input===ut[Xt])return st[vr]}function Ca(Xt,vr,Or){if(Array.isArray(Xt)){Xt.forEach(function(la){Ca(la,vr,Or)});return}if(!(Xt in Le||w.hasParent(Le,Xt))){var ba;if(Xt.slice(0,6)==="LAYOUT")ba=Ct(Ae.layout,Xt.replace("LAYOUT",""));else{var Pa=Ue[Or],ma=Ze._tracePreGUI[Wa(Pa)._fullInput.uid];ba=j(ma,Ut)(ut[Pa],Xt)}Xt in sr||(sr[Xt]=Ta()),sr[Xt][Or]===void 0&&(sr[Xt][Or]=ae(ba.get())),vr!==void 0&&ba.set(vr)}}function hi(Xt){return function(vr){return st[vr][Xt]}}function wi(Xt){return function(vr,Or){return vr===!1?st[Ue[Or]][Xt]:null}}for(var Kt in Le){if(w.hasParent(Le,Kt))throw new Error("cannot set "+Kt+" and a parent attribute simultaneously");var Dt=Le[Kt],Yt,Jt,Fr,ta,ra,ca;if((Kt==="autobinx"||Kt==="autobiny")&&(Kt=Kt.charAt(Kt.length-1)+"bins",Array.isArray(Dt)?Dt=Dt.map(wi(Kt)):Dt===!1?Dt=Ue.map(hi(Kt)):Dt=null),ur[Kt]=Dt,Kt.slice(0,6)==="LAYOUT"){Fr=Ct(Ae.layout,Kt.replace("LAYOUT","")),sr[Kt]=[ae(Fr.get())],Fr.set(Array.isArray(Dt)?Dt[0]:Dt),fr.calc=!0;continue}for(sr[Kt]=Ta(),jt=0;jt<Ue.length;jt++){Yt=ut[Ue[jt]],Jt=Wa(Ue[jt]);var Ba=Ze._tracePreGUI[Jt._fullInput.uid];if(Fr=j(Ba,Ut)(Yt,Kt),ta=Fr.get(),ra=Array.isArray(Dt)?Dt[jt%Dt.length]:Dt,ra!==void 0){var $a=Fr.parts[Fr.parts.length-1],Za=Kt.slice(0,Kt.length-$a.length-1),ri=Za?Za+".":"",pi=Za?E(Jt,Za).get():Jt;if(ca=o.getTraceValObject(Jt,Fr.parts),ca&&ca.impliedEdits&&ra!==null)for(var Ra in ca.impliedEdits)Ca(S.relativeAttr(Kt,Ra),ca.impliedEdits[Ra],jt);else if(($a==="thicknessmode"||$a==="lenmode")&&ta!==ra&&(ra==="fraction"||ra==="pixels")&&pi){var an=Ze._size,tn=pi.orient,fn=tn==="top"||tn==="bottom";if($a==="thicknessmode"){var xt=fn?an.h:an.w;Ca(ri+"thickness",pi.thickness*(ra==="fraction"?1/xt:xt),jt)}else{var lt=fn?an.w:an.h;Ca(ri+"len",pi.len*(ra==="fraction"?1/lt:lt),jt)}}else if(Kt==="type"&&(ra==="pie"!=(ta==="pie")||ra==="funnelarea"!=(ta==="funnelarea"))){var Br="x",Cr="y";(ra==="bar"||ta==="bar")&&Yt.orientation==="h"&&(Br="y",Cr="x"),S.swapAttrs(Yt,["?","?src"],"labels",Br),S.swapAttrs(Yt,["d?","?0"],"label",Br),S.swapAttrs(Yt,["?","?src"],"values",Cr),ta==="pie"||ta==="funnelarea"?(E(Yt,"marker.color").set(E(Yt,"marker.colors").get()),Ze._pielayer.selectAll("g.trace").remove()):r.traceIs(Yt,"cartesian")&&E(Yt,"marker.colors").set(E(Yt,"marker.color").get())}sr[Kt][jt]=ae(ta);var xr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(xr.indexOf(Kt)!==-1){if(Kt==="orientation"){Fr.set(ra);var Rr=Yt.x&&!Yt.y?"h":"v";if((Fr.get()||Rr)===Jt.orientation)continue}else Kt==="orientationaxes"&&(Yt.orientation={v:"h",h:"v"}[Jt.orientation]);w.swapXYData(Yt),fr.calc=fr.clearAxisTypes=!0}else a.dataArrayContainers.indexOf(Fr.parts[0])!==-1?(w.manageArrayContainers(Fr,ra,sr),fr.calc=!0):(ca?ca.arrayOk&&!r.traceIs(Jt,"regl")&&(S.isArrayOrTypedArray(ra)||S.isArrayOrTypedArray(ta))?fr.calc=!0:M.update(fr,ca):fr.calc=!0,Fr.set(ra))}}if(["swapxyaxes","orientationaxes"].indexOf(Kt)!==-1&&n.swap(Ae,Ue),Kt==="orientationaxes"){var Ur=E(Ae.layout,"hovermode"),Hr=Ur.get();Hr==="x"?Ur.set("y"):Hr==="y"?Ur.set("x"):Hr==="x unified"?Ur.set("y unified"):Hr==="y unified"&&Ur.set("x unified")}if(["orientation","type"].indexOf(Kt)!==-1){for(Pr=[],jt=0;jt<Ue.length;jt++){var gt=ut[Ue[jt]];r.traceIs(gt,"cartesian")&&(Oa(gt.xaxis||"x"),Oa(gt.yaxis||"y"))}Ca(Pr.map(Ia),!0,0),Ca(Pr.map(qa),[0,1],0)}}return(fr.calc||fr.plot)&&(fr.fullReplot=!0),{flags:fr,undoit:sr,redoit:ur,traces:Ue,eventData:S.extendDeepNoArrays([],[Pt,Ue])}}function we(Ae,Le,Ue){Ae=S.getGraphDiv(Ae),w.clearPromiseQueue(Ae);var Ze={};if(typeof Le=="string")Ze[Le]=Ue;else if(S.isPlainObject(Le))Ze=S.extendFlat({},Le);else return S.warn("Relayout fail.",Le,Ue),Promise.reject();Object.keys(Ze).length&&(Ae.changed=!0);var st=nt(Ae,Ze),ut=st.flags;ut.calc&&(Ae.calcdata=void 0);var Ut=[a.previousPromises];ut.layoutReplot?Ut.push(A.layoutReplot):Object.keys(Ze).length&&(Se(Ae,ut,st)||a.supplyDefaults(Ae),ut.legend&&Ut.push(A.doLegend),ut.layoutstyle&&Ut.push(A.layoutStyles),ut.axrange&&Ie(Ut,st.rangesAltered),ut.ticks&&Ut.push(A.doTicksRelayout),ut.modebar&&Ut.push(A.doModeBar),ut.camera&&Ut.push(A.doCamera),ut.colorbars&&Ut.push(A.doColorBars),Ut.push(y)),Ut.push(a.rehover,a.redrag,a.reselect),t.add(Ae,we,[Ae,st.undoit],we,[Ae,st.redoit]);var Ct=S.syncOrAsync(Ut,Ae);return(!Ct||!Ct.then)&&(Ct=Promise.resolve(Ae)),Ct.then(function(){return Ae.emit("plotly_relayout",st.eventData),Ae})}function Se(Ae,Le,Ue){var Ze=Ae._fullLayout;if(!Le.axrange)return!1;for(var st in Le)if(st!=="axrange"&&Le[st])return!1;var ut,Ut,Ct=function(Pr,Ta){return S.coerce(ut,Ut,s,Pr,Ta)},Pt={};for(var jt in Ue.rangesAltered){var fr=n.id2name(jt);if(ut=Ae.layout[fr],Ut=Ze[fr],i(ut,Ut,Ct,Pt),Ut._matchGroup){for(var ur in Ut._matchGroup)if(ur!==jt){var sr=Ze[n.id2name(ur)];sr.autorange=Ut.autorange,sr.range=Ut.range.slice(),sr._input.range=Ut.range.slice()}}}return!0}function Ie(Ae,Le){var Ue=Le?function(Ze){var st=[],ut=!0;for(var Ut in Le){var Ct=n.getFromId(Ze,Ut);if(st.push(Ut),(Ct.ticklabelposition||"").indexOf("inside")!==-1&&Ct._anchorAxis&&st.push(Ct._anchorAxis._id),Ct._matchGroup)for(var Pt in Ct._matchGroup)Le[Pt]||st.push(Pt)}return n.draw(Ze,st,{skipTitle:ut})}:function(Ze){return n.draw(Ze,"redraw")};Ae.push(T,A.doAutoRangeAndConstraints,Ue,A.drawData,A.finalDraw)}var Re=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,We=/^[xyz]axis[0-9]*\.autorange$/,at=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function nt(Ae,Le){var Ue=Ae.layout,Ze=Ae._fullLayout,st=Ze._guiEditing,ut=j(Ze._preGUI,st),Ut=Object.keys(Le),Ct=n.list(Ae),Pt=S.extendDeepAll({},Le),jt={},fr,ur,sr;for(Ut=Object.keys(Le),ur=0;ur<Ut.length;ur++)if(Ut[ur].indexOf("allaxes")===0){for(sr=0;sr<Ct.length;sr++){var Pr=Ct[sr]._id.slice(1),Ta=Pr.indexOf("scene")!==-1?Pr+".":"",Oa=Ut[ur].replace("allaxes",Ta+Ct[sr]._name);Le[Oa]||(Le[Oa]=Le[Ut[ur]])}delete Le[Ut[ur]]}var Ia=M.layoutFlags(),qa={},Wa={};function Ca(ma,la){if(Array.isArray(ma)){ma.forEach(function(Ai){Ca(Ai,la)});return}if(!(ma in Le||w.hasParent(Le,ma))){var _a=ut(Ue,ma);ma in Wa||(Wa[ma]=ae(_a.get())),la!==void 0&&_a.set(la)}}var hi={},wi;function Kt(ma){var la=n.name2id(ma.split(".")[0]);return hi[la]=1,la}for(var Dt in Le){if(w.hasParent(Le,Dt))throw new Error("cannot set "+Dt+" and a parent attribute simultaneously");for(var Yt=ut(Ue,Dt),Jt=Le[Dt],Fr=Yt.parts.length,ta=Fr-1;ta>0&&typeof Yt.parts[ta]!="string";)ta--;var ra=Yt.parts[ta],ca=Yt.parts[ta-1]+"."+ra,Ba=Yt.parts.slice(0,ta).join("."),$a=E(Ae.layout,Ba).get(),Za=E(Ze,Ba).get(),ri=Yt.get();if(Jt!==void 0){qa[Dt]=Jt,Wa[Dt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ze,Yt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ra in pi.impliedEdits)Ca(S.relativeAttr(Dt,Ra),pi.impliedEdits[Ra]);if(["width","height"].indexOf(Dt)!==-1)if(Jt){Ca("autosize",null);var an=Dt==="height"?"width":"height";Ca(an,Ze[an])}else Ze[Dt]=Ae._initialAutoSize[Dt];else if(Dt==="autosize")Ca("width",Jt?null:Ze.width),Ca("height",Jt?null:Ze.height);else if(ca.match(Re))Kt(ca),E(Ze,Ba+"._inputRange").set(null);else if(ca.match(We)){Kt(ca),E(Ze,Ba+"._inputRange").set(null);var tn=E(Ze,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&E(Ze,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var fn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(fn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)fn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var lt=wi.range[0],Br=wi.range[1];fn?(lt<=0&&Br<=0&&Ca(Ba+".autorange",!0),lt<=0?lt=Br/1e6:Br<=0&&(Br=lt/1e6),Ca(Ba+".range[0]",Math.log(lt)/Math.LN10),Ca(Ba+".range[1]",Math.log(Br)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,lt)),Ca(Ba+".range[1]",Math.pow(10,Br)))}Array.isArray(Ze._subplots.polar)&&Ze._subplots.polar.length&&Ze[Yt.parts[0]]&&Yt.parts[1]==="radialaxis"&&delete Ze[Yt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ae,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Ae,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);E(Ze,Ba+"._inputRange").set(null)}else if(ra.match(g)){var Cr=E(Ze,Dt).get(),xr=(Jt||{}).type;(!xr||xr==="-")&&(xr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,xr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,xr,Ca)}var Rr=_.containerArrayMatch(Dt);if(Rr){fr=Rr.array,ur=Rr.index;var Ur=Rr.property,Hr=pi||{editType:"calc"};ur!==""&&Ur===""&&(_.isAddVal(Jt)?Wa[Dt]=null:_.isRemoveVal(Jt)?Wa[Dt]=(E(Ue,fr).get()||[])[ur]:S.warn("unrecognized full object value",Le)),M.update(Ia,Hr),jt[fr]||(jt[fr]={});var gt=jt[fr][ur];gt||(gt=jt[fr][ur]={}),gt[Ur]=Jt,delete Le[Dt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ia.calc=!0:Ia.plot=!0):(Dt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ze._has("scatter-like")&&Ze._has("regl")&&Dt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ia.plot=!0:pi?M.update(Ia,pi):Ia.calc=!0,Yt.set(Jt))}}for(fr in jt){var Xt=_.applyContainerArrayChanges(Ae,ut(Ue,fr),jt[fr],Ia,ut);Xt||(Ia.plot=!0)}for(var vr in hi){wi=n.getFromId(Ae,vr);var Or=wi&&wi._constraintGroup;if(Or){Ia.calc=!0;for(var ba in Or)hi[ba]||(n.getFromId(Ae,ba)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ia.plot=!0);var Pa=Ze.shapes;for(ur=0;ur<Pa.length;ur++)if(Pa[ur].showlegend){Ia.calc=!0;break}return(Ia.plot||Ia.calc)&&(Ia.layoutReplot=!0),{flags:Ia,rangesAltered:hi,undoit:Wa,redoit:qa,eventData:Pt}}function tt(Ae){var Le=Ae._fullLayout,Ue=Le.width,Ze=Le.height;return Ae.layout.autosize&&a.plotAutoSize(Ae,Ae.layout,Le),Le.width!==Ue||Le.height!==Ze}function qe(Ae,Le,Ue,Ze){Ae=S.getGraphDiv(Ae),w.clearPromiseQueue(Ae),S.isPlainObject(Le)||(Le={}),S.isPlainObject(Ue)||(Ue={}),Object.keys(Le).length&&(Ae.changed=!0),Object.keys(Ue).length&&(Ae.changed=!0);var st=w.coerceTraceIndices(Ae,Ze),ut=pe(Ae,S.extendFlat({},Le),st),Ut=ut.flags,Ct=nt(Ae,S.extendFlat({},Ue)),Pt=Ct.flags;(Ut.calc||Pt.calc)&&(Ae.calcdata=void 0),Ut.clearAxisTypes&&w.clearAxisTypes(Ae,st,Ue);var jt=[];Pt.layoutReplot?jt.push(A.layoutReplot):Ut.fullReplot?jt.push(Z._doPlot):(jt.push(a.previousPromises),Se(Ae,Pt,Ct)||a.supplyDefaults(Ae),Ut.style&&jt.push(A.doTraceStyle),(Ut.colorbars||Pt.colorbars)&&jt.push(A.doColorBars),Pt.legend&&jt.push(A.doLegend),Pt.layoutstyle&&jt.push(A.layoutStyles),Pt.axrange&&Ie(jt,Ct.rangesAltered),Pt.ticks&&jt.push(A.doTicksRelayout),Pt.modebar&&jt.push(A.doModeBar),Pt.camera&&jt.push(A.doCamera),jt.push(y)),jt.push(a.rehover,a.redrag,a.reselect),t.add(Ae,qe,[Ae,ut.undoit,Ct.undoit,ut.traces],qe,[Ae,ut.redoit,Ct.redoit,ut.traces]);var fr=S.syncOrAsync(jt,Ae);return(!fr||!fr.then)&&(fr=Promise.resolve(Ae)),fr.then(function(){return Ae.emit("plotly_update",{data:ut.eventData,layout:Ct.eventData}),Ae})}function he(Ae){return function(Ue){Ue._fullLayout._guiEditing=!0;var Ze=Ae.apply(null,arguments);return Ue._fullLayout._guiEditing=!1,Ze}}var ue=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],ne=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Ce(Ae,Le){for(var Ue=0;Ue<Le.length;Ue++){var Ze=Le[Ue],st=Ae.match(Ze.pattern);if(st){var ut=st[1]||"";return{head:ut,tail:Ae.slice(ut.length+1),attr:Ze.attr}}}}function Ye(Ae,Le){var Ue=E(Le,Ae).get();if(Ue!==void 0)return Ue;var Ze=Ae.split(".");for(Ze.pop();Ze.length>1;)if(Ze.pop(),Ue=E(Le,Ze.join(".")+".uirevision").get(),Ue!==void 0)return Ue;return Le.uirevision}function rt(Ae,Le){for(var Ue=0;Ue<Le.length;Ue++)if(Le[Ue]._fullInput.uid===Ae)return Ue;return-1}function Ke(Ae,Le,Ue){for(var Ze=0;Ze<Le.length;Ze++)if(Le[Ze].uid===Ae)return Ze;return!Le[Ue]||Le[Ue].uid?-1:Ue}function Mt(Ae,Le){var Ue=S.isPlainObject(Ae),Ze=Array.isArray(Ae);return Ue||Ze?(Ue&&S.isPlainObject(Le)||Ze&&Array.isArray(Le))&&JSON.stringify(Ae)===JSON.stringify(Le):Ae===Le}function kt(Ae,Le,Ue,Ze){var st=Ze._preGUI,ut,Ut,Ct,Pt,jt,fr,ur,sr,Pr,Ta,Oa=[],Ia={},qa={};for(ut in st){if(jt=Ce(ut,ue),jt){if(Pr=jt.head,Ta=jt.tail,Ut=jt.attr||Pr+".uirevision",Ct=E(Ze,Ut).get(),Pt=Ct&&Ye(Ut,Le),Pt&&Pt===Ct){if(fr=st[ut],fr===null&&(fr=void 0),ur=E(Le,ut),sr=ur.get(),Mt(sr,fr)){sr===void 0&&Ta==="autorange"&&Oa.push(Pr),ur.set(ae(E(Ze,ut).get()));continue}else if(Ta==="autorange"||Ta.slice(0,6)==="range["){var Wa=st[Pr+".range[0]"],Ca=st[Pr+".range[1]"],hi=st[Pr+".autorange"];if(hi||hi===null&&Wa===null&&Ca===null){if(!(Pr in Ia)){var wi=E(Le,Pr).get();Ia[Pr]=wi&&(wi.autorange||wi.autorange!==!1&&(!wi.range||wi.range.length!==2))}if(Ia[Pr]){ur.set(ae(E(Ze,ut).get()));continue}}}}}else S.warn("unrecognized GUI edit: "+ut);delete st[ut],jt&&jt.tail.slice(0,6)==="range["&&(qa[jt.head]=1)}for(var Kt=0;Kt<Oa.length;Kt++){var Dt=Oa[Kt];if(qa[Dt]){var Yt=E(Le,Dt).get();Yt&&delete Yt.autorange}}var Jt=Ze._tracePreGUI;for(var Fr in Jt){var ta=Jt[Fr],ra=null,ca;for(ut in ta){if(!ra){var Ba=rt(Fr,Ue);if(Ba<0){delete Jt[Fr];break}var $a=Ue[Ba];ca=$a._fullInput;var Za=Ke(Fr,Ae,ca.index);if(Za<0){delete Jt[Fr];break}ra=Ae[Za]}if(jt=Ce(ut,ne),jt){if(jt.attr?(Ct=E(Ze,jt.attr).get(),Pt=Ct&&Ye(jt.attr,Le)):(Ct=ca.uirevision,Pt=ra.uirevision,Pt===void 0&&(Pt=Le.uirevision)),Pt&&Pt===Ct&&(fr=ta[ut],fr===null&&(fr=void 0),ur=E(ra,ut),sr=ur.get(),Mt(sr,fr))){ur.set(ae(E(ca,ut).get()));continue}}else S.warn("unrecognized GUI edit: "+ut+" in trace uid "+Fr);delete ta[ut]}}}function Nt(Ae,Le,Ue,Ze){var st,ut;function Ut(){return Z.addFrames(Ae,st)}Ae=S.getGraphDiv(Ae),w.clearPromiseQueue(Ae);var Ct=Ae._fullData,Pt=Ae._fullLayout;if(!S.isPlotDiv(Ae)||!Ct||!Pt)ut=Z.newPlot(Ae,Le,Ue,Ze);else{if(S.isPlainObject(Le)){var jt=Le;Le=jt.data,Ue=jt.layout,Ze=jt.config,st=jt.frames}var fr=!1;if(Ze){let ca=S.extendDeepAll({},Ae._context);Ae._context=void 0,z(Ae,Ze),fr=!w.collectionsAreEqual(ca,Ae._context)}if(fr){let ca=Ae._ev.eventNames().map(Ba=>[Ba,Ae._ev.listeners(Ba)]);ut=Z.newPlot(Ae,Le,Ue,Ze).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,Ue,Ze)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=Ue||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var ur=Ae._fullData,sr=Ae._fullLayout,Pr=sr.datarevision===void 0,Ta=sr.transition,Oa=Mr(Ae,Pt,sr,Pr,Ta),Ia=Oa.newDataRevision,qa=Gt(Ae,Ct,ur,Pr,Ta,Ia);if(tt(Ae)&&(Oa.layoutReplot=!0),qa.calc||Oa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(sr),Ca=0;Ca<Wa.length;Ca++){var hi=Wa[Ca],wi=hi.substring(0,5);if(wi==="xaxis"||wi==="yaxis"){var Kt=sr[hi]._emptyCategories;Kt&&Kt()}}}else a.supplyDefaultsUpdateCalc(Ae.calcdata,ur);var Dt=[];if(st&&(Ae._transitionData={},a.createTransitionData(Ae),Dt.push(Ut)),sr.transition&&(qa.anim||Oa.anim))Oa.ticks&&Dt.push(A.doTicksRelayout),a.doCalcdata(Ae),A.doAutoRangeAndConstraints(Ae),Dt.push(function(){return a.transitionFromReact(Ae,qa,Oa,Pt)});else if(qa.fullReplot||Oa.layoutReplot)Ae._fullLayout._skipDefaults=!0,Dt.push(Z._doPlot);else{for(var Yt in Oa.arrays){var Jt=Oa.arrays[Yt];if(Jt.length){var Fr=r.getComponentMethod(Yt,"drawOne");if(Fr!==S.noop)for(var ta=0;ta<Jt.length;ta++)Fr(Ae,Jt[ta]);else{var ra=r.getComponentMethod(Yt,"draw");if(ra===S.noop)throw new Error("cannot draw components: "+Yt);ra(Ae)}}}Dt.push(a.previousPromises),qa.style&&Dt.push(A.doTraceStyle),(qa.colorbars||Oa.colorbars)&&Dt.push(A.doColorBars),Oa.legend&&Dt.push(A.doLegend),Oa.layoutstyle&&Dt.push(A.layoutStyles),Oa.axrange&&Ie(Dt),Oa.ticks&&Dt.push(A.doTicksRelayout),Oa.modebar&&Dt.push(A.doModeBar),Oa.camera&&Dt.push(A.doCamera),Dt.push(y)}Dt.push(a.rehover,a.redrag,a.reselect),ut=S.syncOrAsync(Dt,Ae),(!ut||!ut.then)&&(ut=Promise.resolve(Ae))}}return ut.then(()=>(fr||Ae.emit("plotly_react",{config:Ze,data:Le,layout:Ue}),Ae))}function Gt(Ae,Le,Ue,Ze,st,ut){var Ut=Le.length===Ue.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=M.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function fr(Pr){var Ta=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&Ta.anim&&(Ta.anim=!1),Ta}var ur={getValObject:fr,flags:Ct,immutable:Ze,transition:st,newDataRevision:ut,gd:Ae},sr={};for(Pt=0;Pt<Le.length;Pt++)if(Ue[Pt]){if(jt=Ue[Pt]._fullInput,sr[jt.uid])continue;sr[jt.uid]=1,mr(Le[Pt]._fullInput,jt,[],ur)}return(Ct.calc||Ct.plot)&&(Ct.fullReplot=!0),st&&Ct.nChanges&&Ct.nChangesAnim&&(Ct.anim=Ct.nChanges===Ct.nChangesAnim&&Ut?"all":"some"),Ct}function Mr(Ae,Le,Ue,Ze,st){var ut=M.layoutFlags();ut.arrays={},ut.rangesAltered={},ut.nChanges=0,ut.nChangesAnim=0;function Ut(sr){return o.getLayoutValObject(Ue,sr)}for(var Ct in Ue)if(!(!Ct.startsWith("xaxis")&&!Ct.startsWith("yaxis"))&&Le[Ct]){var Pt=Ue[Ct].domain,jt=Le[Ct].domain,fr=Le[Ct]._inputDomain;Le[Ct]._inputDomain&&(Pt[0]===fr[0]&&Pt[1]===fr[1]?Ue[Ct].domain=Le[Ct].domain:(Pt[0]!==jt[0]||Pt[1]!==jt[1])&&(Ue[Ct]._inputDomain=null))}var ur={getValObject:Ut,flags:ut,immutable:Ze,transition:st,gd:Ae};return mr(Le,Ue,[],ur),(ut.plot||ut.calc)&&(ut.layoutReplot=!0),st&&ut.nChanges&&ut.nChangesAnim&&(ut.anim=ut.nChanges===ut.nChangesAnim?"all":"some"),ut}function mr(Ae,Le,Ue,Ze){var st,ut,Ut,Ct=Ze.getValObject,Pt=Ze.flags,jt=Ze.immutable,fr=Ze.inArray,ur=Ze.arrayIndex;function sr(){var Ba=st.editType;if(fr&&Ba.indexOf("arraydraw")!==-1){S.pushUnique(Pt.arrays[fr],ur);return}M.update(Pt,st),Ba!=="none"&&Pt.nChanges++,Ze.transition&&st.anim&&Pt.nChangesAnim++,(Re.test(Ut)||We.test(Ut))&&(Pt.rangesAltered[Ue[0]]=1),ut==="datarevision"&&(Pt.newDataRevision=1)}function Pr(Ba){return Ba.valType==="data_array"||Ba.arrayOk}for(ut in Ae){if(Pt.calc&&!Ze.transition)return;var Ta=Ae[ut],Oa=Le[ut],Ia=Ue.concat(ut);if(Ut=Ia.join("."),!(ut.charAt(0)==="_"||typeof Ta=="function"||Ta===Oa)){if((ut==="tick0"||ut==="dtick")&&Ue[0]!=="geo"){var qa=Le.tickmode;if(qa==="auto"||qa==="array"||!qa)continue}if(!(ut==="range"&&Le.autorange)&&!((ut==="zmin"||ut==="zmax")&&Le.type==="contourcarpet")&&(st=Ct(Ia),!!st&&!(st._compareAsJSON&&JSON.stringify(Ta)===JSON.stringify(Oa)))){var Wa=st.valType,Ca,hi=Pr(st),wi=Array.isArray(Ta),Kt=Array.isArray(Oa);if(wi&&Kt){var Dt="_input_"+ut,Yt=Ae[Dt],Jt=Le[Dt];if(Array.isArray(Yt)&&Yt===Jt)continue}if(Oa===void 0)hi&&wi?Pt.calc=!0:sr();else if(st._isLinkedToArray){var Fr=[],ta=!1;fr||(Pt.arrays[ut]=Fr);var ra=Math.min(Ta.length,Oa.length),ca=Math.max(Ta.length,Oa.length);if(ra!==ca)if(st.editType==="arraydraw")ta=!0;else{sr();continue}for(Ca=0;Ca<ra;Ca++)mr(Ta[Ca],Oa[Ca],Ia.concat(Ca),S.extendFlat({inArray:ut,arrayIndex:Ca},Ze));if(ta)for(Ca=ra;Ca<ca;Ca++)Fr.push(Ca)}else!Wa&&S.isPlainObject(Ta)?mr(Ta,Oa,Ia,Ze):hi?wi&&Kt?(jt&&(Pt.calc=!0),(jt||Ze.newDataRevision)&&sr()):wi!==Kt?Pt.calc=!0:sr():wi&&Kt?(Ta.length!==Oa.length||String(Ta)!==String(Oa))&&sr():sr()}}}for(ut in Le)if(!(ut in Ae||ut.charAt(0)==="_"||typeof Le[ut]=="function"))if(st=Ct(Ue.concat(ut)),Pr(st)&&Array.isArray(Le[ut])){Pt.calc=!0;return}else sr()}function qr(Ae,Le,Ue){if(Ae=S.getGraphDiv(Ae),!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var Ze=Ae._transitionData;Ze._frameQueue||(Ze._frameQueue=[]),Ue=a.supplyAnimationDefaults(Ue);var st=Ue.transition,ut=Ue.frame;Ze._frameWaitingCnt===void 0&&(Ze._frameWaitingCnt=0);function Ut(jt){return Array.isArray(st)?jt>=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ut)?jt>=ut.length?ut[0]:ut[jt]:ut}function Pt(jt,fr){var ur=0;return function(){if(jt&&++ur===fr)return jt()}}return new Promise(function(jt,fr){function ur(){if(Ze._frameQueue.length!==0){for(;Ze._frameQueue.length;){var ra=Ze._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function sr(ra){if(ra.length!==0){for(var ca=0;ca<ra.length;ca++){var Ba;ra[ca].type==="byname"?Ba=a.computeFrame(Ae,ra[ca].name):Ba=ra[ca].data;var $a=Ct(ca),Za=Ut(ca);Za.duration=Math.min(Za.duration,$a.duration);var ri={frame:Ba,name:ra[ca].name,frameOpts:$a,transitionOpts:Za};ca===ra.length-1&&(ri.onComplete=Pt(jt,2),ri.onInterrupt=fr),Ze._frameQueue.push(ri)}Ue.mode==="immediate"&&(Ze._lastFrameAt=-1/0),Ze._animationRaf||Oa()}}function Pr(){Ae.emit("plotly_animated"),window.cancelAnimationFrame(Ze._animationRaf),Ze._animationRaf=null}function Ta(){Ze._currentFrame&&Ze._currentFrame.onComplete&&Ze._currentFrame.onComplete();var ra=Ze._currentFrame=Ze._frameQueue.shift();if(ra){var ca=ra.name?ra.name.toString():null;Ae._fullLayout._currentFrame=ca,Ze._lastFrameAt=Date.now(),Ze._timeToNext=ra.frameOpts.duration,a.transition(Ae,ra.frame.data,ra.frame.layout,w.coerceTraceIndices(Ae,ra.frame.traces),ra.frameOpts,ra.transitionOpts).then(function(){ra.onComplete&&ra.onComplete()}),Ae.emit("plotly_animatingframe",{name:ca,frame:ra.frame,animation:{frame:ra.frameOpts,transition:ra.transitionOpts}})}else Pr()}function Oa(){Ae.emit("plotly_animating"),Ze._lastFrameAt=-1/0,Ze._timeToNext=0,Ze._runningTransitions=0,Ze._currentFrame=null;var ra=function(){Ze._animationRaf=window.requestAnimationFrame(ra),Date.now()-Ze._lastFrameAt>Ze._timeToNext&&Ta()};ra()}var Ia=0;function qa(ra){return Array.isArray(st)?Ia>=st.length?ra.transitionOpts=st[Ia]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ia++,ra}var Wa,Ca,hi=[],wi=Le==null,Kt=Array.isArray(Le),Dt=!wi&&!Kt&&S.isPlainObject(Le);if(Dt)hi.push({type:"object",data:qa(S.extendFlat({},Le))});else if(wi||["string","number"].indexOf(typeof Le)!==-1)for(Wa=0;Wa<Ze._frames.length;Wa++)Ca=Ze._frames[Wa],Ca&&(wi||String(Ca.group)===String(Le))&&hi.push({type:"byname",name:String(Ca.name),data:qa({name:Ca.name})});else if(Kt)for(Wa=0;Wa<Le.length;Wa++){var Yt=Le[Wa];["number","string"].indexOf(typeof Yt)!==-1?(Yt=String(Yt),hi.push({type:"byname",name:Yt,data:qa({name:Yt})})):S.isPlainObject(Yt)&&hi.push({type:"object",data:qa(S.extendFlat({},Yt))})}for(Wa=0;Wa<hi.length;Wa++)if(Ca=hi[Wa],Ca.type==="byname"&&!Ze._frameHash[Ca.data.name]){S.warn('animate failure: frame not found: "'+Ca.data.name+'"'),fr();return}["next","immediate"].indexOf(Ue.mode)!==-1&&ur(),Ue.direction==="reverse"&&hi.reverse();var Jt=Ae._fullLayout._currentFrame;if(Jt&&Ue.fromcurrent){var Fr=-1;for(Wa=0;Wa<hi.length;Wa++)if(Ca=hi[Wa],Ca.type==="byname"&&Ca.name===Jt){Fr=Wa;break}if(Fr>0&&Fr<hi.length-1){var ta=[];for(Wa=0;Wa<hi.length;Wa++)Ca=hi[Wa],(hi[Wa].type!=="byname"||Wa>Fr)&&ta.push(Ca);hi=ta}}hi.length>0?sr(hi):(Ae.emit("plotly_animated"),jt())})}function Er(Ae,Le,Ue){if(Ae=S.getGraphDiv(Ae),Le==null)return Promise.resolve();if(!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ze,st,ut,Ut,Ct=Ae._transitionData._frames,Pt=Ae._transitionData._frameHash;if(!Array.isArray(Le))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Le);var jt=Ct.length+Le.length*2,fr=[],ur={};for(Ze=Le.length-1;Ze>=0;Ze--)if(S.isPlainObject(Le[Ze])){var sr=Le[Ze].name,Pr=(Pt[sr]||ur[sr]||{}).name,Ta=Le[Ze].name,Oa=Pt[Pr]||ur[Pr];Pr&&Ta&&typeof Ta=="number"&&Oa&&b<p&&(b++,S.warn('addFrames: overwriting frame "'+(Pt[Pr]||ur[Pr]).name+'" with a frame whose name of type "number" also equates to "'+Pr+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),b===p&&S.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.")),ur[sr]={name:sr},fr.push({frame:a.supplyFrameDefaults(Le[Ze]),index:Ue&&Ue[Ze]!==void 0&&Ue[Ze]!==null?Ue[Ze]:jt+Ze})}fr.sort(function(Dt,Yt){return Dt.index>Yt.index?-1:Dt.index<Yt.index?1:0});var Ia=[],qa=[],Wa=Ct.length;for(Ze=fr.length-1;Ze>=0;Ze--){if(st=fr[Ze].frame,typeof st.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!st.name)for(;Pt[st.name="frame "+Ae._transitionData._counter++];);if(Pt[st.name]){for(ut=0;ut<Ct.length&&(Ct[ut]||{}).name!==st.name;ut++);Ia.push({type:"replace",index:ut,value:st}),qa.unshift({type:"replace",index:ut,value:Ct[ut]})}else Ut=Math.max(0,Math.min(fr[Ze].index,Wa)),Ia.push({type:"insert",index:Ut,value:st}),qa.unshift({type:"delete",index:Ut}),Wa++}var Ca=a.modifyFrames,hi=a.modifyFrames,wi=[Ae,qa],Kt=[Ae,Ia];return t&&t.add(Ae,Ca,wi,hi,Kt),a.modifyFrames(Ae,Ia)}function Ir(Ae,Le){if(Ae=S.getGraphDiv(Ae),!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae);var Ue,Ze,st=Ae._transitionData._frames,ut=[],Ut=[];if(!Le)for(Le=[],Ue=0;Ue<st.length;Ue++)Le.push(Ue);for(Le=Le.slice(),Le.sort(),Ue=Le.length-1;Ue>=0;Ue--)Ze=Le[Ue],ut.push({type:"delete",index:Ze}),Ut.unshift({type:"insert",index:Ze,value:st[Ze]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],fr=[Ae,ut];return t&&t.add(Ae,Ct,jt,Pt,fr),a.modifyFrames(Ae,ut)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},Ue=Ae._fullData||[];return a.cleanPlot([],{},Ue,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Oe(Ae){var Le=Ae._fullLayout,Ue=Ae.getBoundingClientRect();if(!S.equalDomRects(Ue,Le._lastBBox)){var Ze=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ze[0][0]*Ze[0][0]+Ze[0][1]*Ze[0][1]+Ze[0][2]*Ze[0][2]),Le._invScaleY=Math.sqrt(Ze[1][0]*Ze[1][0]+Ze[1][1]*Ze[1][1]+Ze[1][2]*Ze[1][2]),Le._lastBBox=Ue}}function Je(Ae){var Le=V.select(Ae),Ue=Ae._fullLayout;if(Ue._calcInverseTransform=Oe,Ue._calcInverseTransform(Ae),Ue._container=Le.selectAll(".plot-container").data([0]),Ue._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ue._paperdiv=Ue._container.selectAll(".svg-container").data([0]),Ue._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ue._glcontainer=Ue._paperdiv.selectAll(".gl-container").data([{}]),Ue._glcontainer.enter().append("div").classed("gl-container",!0),Ue._paperdiv.selectAll(".main-svg").remove(),Ue._paperdiv.select(".modebar-container").remove(),Ue._paper=Ue._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ue._toppaper=Ue._paperdiv.append("svg").classed("main-svg",!0),Ue._modebardiv=Ue._paperdiv.append("div"),delete Ue._modeBar,Ue._hoverpaper=Ue._paperdiv.append("svg").classed("main-svg",!0),!Ue._uid){var Ze={};V.selectAll("defs").each(function(){this.id&&(Ze[this.id.split("-")[1]]=1)}),Ue._uid=S.randstr(Ze)}Ue._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),Ue._defs=Ue._paper.append("defs").attr("id","defs-"+Ue._uid),Ue._clips=Ue._defs.append("g").classed("clips",!0),Ue._topdefs=Ue._toppaper.append("defs").attr("id","topdefs-"+Ue._uid),Ue._topclips=Ue._topdefs.append("g").classed("clips",!0),Ue._bgLayer=Ue._paper.append("g").classed("bglayer",!0),Ue._draggers=Ue._paper.append("g").classed("draglayer",!0);var st=Ue._paper.append("g").classed("layer-below",!0);Ue._imageLowerLayer=st.append("g").classed("imagelayer",!0),Ue._shapeLowerLayer=st.append("g").classed("shapelayer",!0),Ue._cartesianlayer=Ue._paper.append("g").classed("cartesianlayer",!0),Ue._polarlayer=Ue._paper.append("g").classed("polarlayer",!0),Ue._smithlayer=Ue._paper.append("g").classed("smithlayer",!0),Ue._ternarylayer=Ue._paper.append("g").classed("ternarylayer",!0),Ue._geolayer=Ue._paper.append("g").classed("geolayer",!0),Ue._funnelarealayer=Ue._paper.append("g").classed("funnelarealayer",!0),Ue._pielayer=Ue._paper.append("g").classed("pielayer",!0),Ue._iciclelayer=Ue._paper.append("g").classed("iciclelayer",!0),Ue._treemaplayer=Ue._paper.append("g").classed("treemaplayer",!0),Ue._sunburstlayer=Ue._paper.append("g").classed("sunburstlayer",!0),Ue._indicatorlayer=Ue._toppaper.append("g").classed("indicatorlayer",!0),Ue._glimages=Ue._paper.append("g").classed("glimages",!0);var ut=Ue._toppaper.append("g").classed("layer-above",!0);Ue._imageUpperLayer=ut.append("g").classed("imagelayer",!0),Ue._shapeUpperLayer=ut.append("g").classed("shapelayer",!0),Ue._selectionLayer=Ue._toppaper.append("g").classed("selectionlayer",!0),Ue._infolayer=Ue._toppaper.append("g").classed("infolayer",!0),Ue._menulayer=Ue._toppaper.append("g").classed("menulayer",!0),Ue._zoomlayer=Ue._toppaper.append("g").classed("zoomlayer",!0),Ue._hoverlayer=Ue._hoverpaper.append("g").classed("hoverlayer",!0),Ue._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=Er,Z.deleteFrames=Ir,Z.addTraces=Y,Z.deleteTraces=ee,Z.extendTraces=de,Z.moveTraces=q,Z.prependTraces=G,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Nt,Z.redraw=F,Z.relayout=we,Z.restyle=se,Z.setPlotConfig=m,Z.update=qe,Z._guiRelayout=he(we),Z._guiRestyle=he(se),Z._guiUpdate=he(qe),Z._storeDirectGUIEdit=re}}),Yv=He({"src/snapshot/helpers.js"(Z){"use strict";var V=lo();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){V.getComponentMethod("colorbar","draw")(S)}},Z.encodeSVG=function(S){return"data:image/svg+xml,"+encodeURIComponent(S)},Z.encodeJSON=function(S){return"data:application/json,"+encodeURIComponent(S)};var d=window.URL||window.webkitURL;Z.createObjectURL=function(S){return d.createObjectURL(S)},Z.revokeObjectURL=function(S){return d.revokeObjectURL(S)},Z.createBlob=function(S,E){if(E==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(E==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=x(window.atob(S));return new window.Blob([e],{type:"image/"+E})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function x(S){for(var E=S.length,e=new ArrayBuffer(E),t=new Uint8Array(e),r=0;r<E;r++)t[r]=S.charCodeAt(r);return e}Z.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/}}),C2=He({"src/snapshot/tosvg.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=Jn(),e=vd(),t=/"/g,r="TOBESTRIPPED",o=new RegExp('("'+r+")|("+r+'")',"g");function a(i){var s=d.select("body").append("div").style({display:"none"}).html(""),h=i.replace(/(&[^;]*;)/gi,function(f){return f==="&lt;"?"&#60;":f==="&rt;"?"&#62;":f.indexOf("<")!==-1||f.indexOf(">")!==-1?"":s.html(f).text()});return s.remove(),h}function n(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}V.exports=function(s,h,f){var v=s._fullLayout,c=v._paper,T=v._toppaper,l=v.width,_=v.height,w;c.insert("rect",":first-child").call(S.setRect,0,0,l,_).call(E.fill,v.paper_bgcolor);var A=v._basePlotModules||[];for(w=0;w<A.length;w++){var M=A[w];M.toSVG&&M.toSVG(s)}if(T){var g=T.node().childNodes,b=Array.prototype.slice.call(g);for(w=0;w<b.length;w++){var p=b[w];p.childNodes.length&&c.node().appendChild(p)}}v._draggers&&v._draggers.remove(),c.node().style.background="",c.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var y=d.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){y.remove();return}else y.style({visibility:null,display:null});var m=this.style.fontFamily;m&&m.indexOf('"')!==-1&&y.style("font-family",m.replace(t,r));var R=this.style.fontWeight;R&&(R==="normal"||R==="400")&&y.style("font-weight",void 0);var L=this.style.fontStyle;L&&L==="normal"&&y.style("font-style",void 0);var z=this.style.fontVariant;z&&z==="normal"&&y.style("font-variant",void 0)}),c.selectAll(".gradient_filled,.pattern_filled").each(function(){var y=d.select(this),m=this.style.fill;m&&m.indexOf("url(")!==-1&&y.style("fill",m.replace(t,r));var R=this.style.stroke;R&&R.indexOf("url(")!==-1&&y.style("stroke",R.replace(t,r))}),(h==="pdf"||h==="eps")&&c.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),h==="svg"&&f&&(c.attr("width",f*l),c.attr("height",f*_),c.attr("viewBox","0 0 "+l+" "+_));var u=new window.XMLSerializer().serializeToString(c.node());return u=a(u),u=n(u),u=u.replace(o,"'"),u}}}),L2=He({"src/snapshot/svgtoimg.js"(Z,V){"use strict";var d=sa(),x=Z0().EventEmitter,S=Yv();function E(e){var t=e.emitter||new x,r=new Promise(function(o,a){var n=window.Image,i=e.svg,s=e.format||"png",h=e.canvas,f=e.scale||1,v=e.width||300,c=e.height||150,T=f*v,l=f*c,_=h.getContext("2d",{willReadFrequently:!0}),w=new n,A,M;s==="svg"||d.isSafari()?M=S.encodeSVG(i):(A=S.createBlob(i,"svg"),M=S.createObjectURL(A)),h.width=T,h.height=l,w.onload=function(){var g;switch(A=null,S.revokeObjectURL(M),s!=="svg"&&_.drawImage(w,0,0,T,l),s){case"jpeg":g=h.toDataURL("image/jpeg");break;case"png":g=h.toDataURL("image/png");break;case"webp":g=h.toDataURL("image/webp");break;case"svg":g=M;break;default:var b="Image format is not jpeg, png, svg or webp.";if(a(new Error(b)),!e.promise)return t.emit("error",b)}o(g),e.promise||t.emit("success",g)},w.onerror=function(g){if(A=null,S.revokeObjectURL(M),a(g),!e.promise)return t.emit("error",g)},w.src=M});return e.promise?r:t}V.exports=E}}),R5=He({"src/plot_api/to_image.js"(Z,V){"use strict";var d=as(),x=k2(),S=bc(),E=sa(),e=Yv(),t=C2(),r=L2(),o=fp().version,a={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 n(i,s){s=s||{};var h,f,v,c;E.isPlainObject(i)?(h=i.data||[],f=i.layout||{},v=i.config||{},c={}):(i=E.getGraphDiv(i),h=E.extendDeep([],i.data),f=E.extendDeep({},i.layout),v=i._context,c=i._fullLayout||{});function T(N){return!(N in s)||E.validate(s[N],a[N])}if(!T("width")&&s.width!==null||!T("height")&&s.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+E.join2(a.format.values,", "," or ")+".");var l={};function _(N,O){return E.coerce(s,l,a,N,O)}var w=_("format"),A=_("width"),M=_("height"),g=_("scale"),b=_("setBackground"),p=_("imageDataOnly"),u=document.createElement("div");u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);var y=E.extendFlat({},f);A?y.width=A:s.width===null&&d(c.width)&&(y.width=c.width),M?y.height=M:s.height===null&&d(c.height)&&(y.height=c.height);var m=E.extendFlat({},v,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),R=e.getRedrawFunc(u);function L(){return new Promise(function(N){setTimeout(N,e.getDelay(u._fullLayout))})}function z(){return new Promise(function(N,O){var P=t(u,w,g),U=u._fullLayout.width,B=u._fullLayout.height;function X(){x.purge(u),document.body.removeChild(u)}if(w==="full-json"){var $=S.graphJson(u,!1,"keepdata","object",!0,!0);return $.version=o,$=JSON.stringify($),X(),N(p?$:e.encodeJSON($))}if(X(),w==="svg")return N(p?P:e.encodeSVG(P));var le=document.createElement("canvas");le.id=E.randstr(),r({format:w,width:U,height:B,scale:g,canvas:le,svg:P,promise:!0}).then(N).catch(O)})}function F(N){return p?N.replace(e.IMAGE_URL_PREFIX,""):N}return new Promise(function(N,O){x.newPlot(u,h,y,m).then(R).then(L).then(z).then(function(P){N(F(P))}).catch(function(P){O(P)})})}V.exports=n}}),Uz=He({"src/plot_api/validate.js"(Z,V){"use strict";var d=sa(),x=bc(),S=e1(),E=X0().dfltConfig,e=d.isPlainObject,t=Array.isArray,r=d.isArrayOrTypedArray;V.exports=function(_,w){_===void 0&&(_=[]),w===void 0&&(w={});var A=S.get(),M=[],g={_context:d.extendFlat({},E)},b,p;t(_)?(g.data=d.extendDeep([],_),b=_):(g.data=[],b=[],M.push(s("array","data"))),e(w)?(g.layout=d.extendDeep({},w),p=w):(g.layout={},p={},arguments.length>1&&M.push(s("object","layout"))),x.supplyDefaults(g);for(var u=g._fullData,y=b.length,m=0;m<y;m++){var R=b[m],L=["data",m];if(!e(R)){M.push(s("object",L));continue}var z=u[m],F=z.type,N=A.traces[F].attributes;N.type={valType:"enumerated",values:[F]},z.visible===!1&&R.visible!==!1&&M.push(s("invisible",L)),o(R,z,N,M,L)}var O=g._fullLayout,P=a(A,u);return o(p,O,P,M,"layout"),M.length===0?void 0:M};function o(l,_,w,A,M,g){g=g||[];for(var b=Object.keys(l),p=0;p<b.length;p++){var u=b[p],y=g.slice();y.push(u);var m=l[u],R=_[u],L=f(w,u),z=(L||{}).valType,F=z==="info_array",N=z==="colorscale",O=(L||{}).items;if(!h(w,u))A.push(s("schema",M,y));else if(e(m)&&e(R)&&z!=="any")o(m,R,L,A,M,y);else if(F&&t(m)){m.length>R.length&&A.push(s("unused",M,y.concat(R.length)));var P=R.length,U=Array.isArray(O);U&&(P=Math.min(P,O.length));var B,X,$,le,ce;if(L.dimensions===2)for(X=0;X<P;X++)if(t(m[X])){m[X].length>R[X].length&&A.push(s("unused",M,y.concat(X,R[X].length)));var de=R[X].length;for(B=0;B<(U?Math.min(de,O[X].length):de);B++)$=U?O[X][B]:O,le=m[X][B],ce=R[X][B],d.validate(le,$)?ce!==le&&ce!==+le&&A.push(s("dynamic",M,y.concat(X,B),le,ce)):A.push(s("value",M,y.concat(X,B),le))}else A.push(s("array",M,y.concat(X),m[X]));else for(X=0;X<P;X++)$=U?O[X]:O,le=m[X],ce=R[X],d.validate(le,$)?ce!==le&&ce!==+le&&A.push(s("dynamic",M,y.concat(X),le,ce)):A.push(s("value",M,y.concat(X),le))}else if(L.items&&!F&&t(m)){var G=O[Object.keys(O)[0]],Y=[],ee,q;for(ee=0;ee<R.length;ee++){var se=R[ee]._index||ee;if(q=y.slice(),q.push(se),e(m[se])&&e(R[ee])){Y.push(se);var ae=m[se],j=R[ee];e(ae)&&ae.visible!==!1&&j.visible===!1?A.push(s("invisible",M,q)):o(ae,j,G,A,M,q)}}for(ee=0;ee<m.length;ee++)q=y.slice(),q.push(ee),e(m[ee])?Y.indexOf(ee)===-1&&A.push(s("unused",M,q)):A.push(s("object",M,q,m[ee]))}else!e(m)&&e(R)?A.push(s("object",M,y,m)):!r(m)&&r(R)&&!F&&!N?A.push(s("array",M,y,m)):u in _?d.validate(m,L)?L.valType==="enumerated"&&(L.coerceNumber&&m!==+R||!r(m)&&m!==R||String(m)!==String(R))&&A.push(s("dynamic",M,y,m,R)):A.push(s("value",M,y,m)):A.push(s("unused",M,y,m))}return A}function a(l,_){for(var w=l.layout.layoutAttributes,A=0;A<_.length;A++){var M=_[A],g=l.traces[M.type],b=g.layoutAttributes;b&&(M.subplot?d.extendFlat(w[g.attributes.subplot.dflt],b):d.extendFlat(w,b))}return w}var n={object:function(l,_){var w;return l==="layout"&&_===""?w="The layout argument":l[0]==="data"&&_===""?w="Trace "+l[1]+" in the data argument":w=i(l)+"key "+_,w+" must be linked to an object container"},array:function(l,_){var w;return l==="data"?w="The data argument":w=i(l)+"key "+_,w+" must be linked to an array container"},schema:function(l,_){return i(l)+"key "+_+" is not part of the schema"},unused:function(l,_,w){var A=e(w)?"container":"key";return i(l)+A+" "+_+" did not get coerced"},dynamic:function(l,_,w,A){return[i(l)+"key",_,"(set to '"+w+"')","got reset to","'"+A+"'","during defaults."].join(" ")},invisible:function(l,_){return(_?i(l)+"item "+_:"Trace "+l[1])+" got defaulted to be not visible"},value:function(l,_,w){return[i(l)+"key "+_,"is set to an invalid value ("+w+")"].join(" ")}};function i(l){return t(l)?"In data trace "+l[1]+", ":"In "+l+", "}function s(l,_,w,A,M){w=w||"";var g,b;t(_)?(g=_[0],b=_[1]):(g=_,b=null);var p=T(w),u=n[l](_,p,A,M);return d.log(u),{code:l,container:g,trace:b,path:w,astr:p,msg:u}}function h(l,_){var w=c(_),A=w.keyMinusId,M=w.id;return A in l&&l[A]._isSubplotObj&&M?!0:_ in l}function f(l,_){if(_ in l)return l[_];var w=c(_);return l[w.keyMinusId]}var v=d.counterRegex("([a-z]+)");function c(l){var _=l.match(v);return{keyMinusId:_&&_[1],id:_&&_[2]}}function T(l){if(!t(l))return String(l);for(var _="",w=0;w<l.length;w++){var A=l[w];typeof A=="number"?_=_.slice(0,-1)+"["+A+"]":_+=A,w<l.length-1&&(_+=".")}return _}}}),jz=He({"src/snapshot/filesaver.js"(Z,V){"use strict";var d=sa(),x=Yv();function S(E,e,t){var r=document.createElement("a"),o="download"in r,a=new Promise(function(n,i){var s,h;if(o)return s=x.createBlob(E,t),h=x.createObjectURL(s),r.href=h,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),x.revokeObjectURL(h),s=null,n(e);if(d.isSafari()){var f=t==="svg"?",":";base64,";return x.octetStream(f+encodeURIComponent(E)),n(e)}i(new Error("download error"))});return a}V.exports=S}}),D5=He({"src/snapshot/download.js"(Z,V){"use strict";var d=sa(),x=R5(),S=jz(),E=Yv();function e(t,r){var o;return d.isPlainObject(t)||(o=d.getGraphDiv(t)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){o&&o._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),o&&(o._snapshotInProgress=!0);var i=x(t,r),s=r.filename||t.fn||"newplot";s+="."+r.format.replace("-","."),i.then(function(h){return o&&(o._snapshotInProgress=!1),S(h,s,r.format)}).then(function(h){a(h)}).catch(function(h){o&&(o._snapshotInProgress=!1),n(h)})})}V.exports=e}}),qz=He({"src/plot_api/template_api.js"(Z){"use strict";var V=sa(),d=V.isPlainObject,x=e1(),S=bc(),E=ru(),e=zl(),t=X0().dfltConfig;Z.makeTemplate=function(v){v=V.isPlainObject(v)?v:V.getGraphDiv(v),v=V.extendDeep({_context:t},{data:v.data,layout:v.layout}),S.supplyDefaults(v);var c=v.data||[],T=v.layout||{};T._basePlotModules=v._fullLayout._basePlotModules,T._modules=v._fullLayout._modules;var l={data:{},layout:{}};c.forEach(function(m){var R={};a(m,R,i.bind(null,m));var L=V.coerce(m,{},E,"type"),z=l.data[L];z||(z=l.data[L]=[]),z.push(R)}),a(T,l.layout,n.bind(null,T)),delete l.layout.template;var _=T.template;if(d(_)){var w=_.layout,A,M,g,b,p,u;d(w)&&r(w,l.layout);var y=_.data;if(d(y)){for(M in l.data)if(g=y[M],Array.isArray(g)){for(p=l.data[M],u=p.length,b=g.length,A=0;A<u;A++)r(g[A%b],p[A]);for(A=u;A<b;A++)p.push(V.extendDeep({},g[A]))}for(M in y)M in l.data||(l.data[M]=V.extendDeep([],y[M]))}}return l};function r(v,c){v=V.extendDeep({},v);var T=Object.keys(v).sort(),l,_;function w(p,u,y){if(d(u)&&d(p))r(p,u);else if(Array.isArray(u)&&Array.isArray(p)){var m=e.arrayTemplater({_template:v},y);for(_=0;_<u.length;_++){var R=u[_],L=m.newItem(R)._template;L&&r(L,R)}var z=m.defaultItems();for(_=0;_<z.length;_++)u.push(z[_]._template);for(_=0;_<u.length;_++)delete u[_].templateitemname}}for(l=0;l<T.length;l++){var A=T[l],M=v[A];if(A in c?w(M,c[A],A):c[A]=M,o(A)===A)for(var g in c){var b=o(g);g!==b&&b===A&&!(g in v)&&w(M,c[g],A)}}}function o(v){return v.replace(/[0-9]+$/,"")}function a(v,c,T,l,_){var w=_&&T(_);for(var A in v){var M=v[A],g=s(v,A,l),b=s(v,A,_),p=T(b);if(!p){var u=o(A);u!==A&&(b=s(v,u,_),p=T(b))}if(!(w&&w===p)&&!(!p||p._noTemplating||p.valType==="data_array"||p.arrayOk&&Array.isArray(M)))if(!p.valType&&d(M))a(M,c,T,g,b);else if(p._isLinkedToArray&&Array.isArray(M))for(var y=!1,m=0,R={},L=0;L<M.length;L++){var z=M[L];if(d(z)){var F=z.name;if(F)R[F]||(a(z,c,T,s(M,m,g),s(M,m,b)),m++,R[F]=1);else if(!y){var N=e.arrayDefaultKey(A),O=s(v,N,l),P=s(M,m,g);a(z,c,T,P,s(M,m,b));var U=V.nestedProperty(c,P),B=V.nestedProperty(c,O);B.set(U.get()),U.set(null),y=!0}}}else{var X=V.nestedProperty(c,g);X.set(M)}}}function n(v,c){return x.getLayoutValObject(v,V.nestedProperty({},c).parts)}function i(v,c){return x.getTraceValObject(v,V.nestedProperty({},c).parts)}function s(v,c,T){var l;return T?Array.isArray(v)?l=T+"["+c+"]":l=T+"."+c:l=c,l}Z.validateTemplate=function(v,c){var T=V.extendDeep({},{_context:t,data:v.data,layout:v.layout}),l=T.layout||{};d(c)||(c=l.template||{});var _=c.layout,w=c.data,A=[];T.layout=l,T.layout.template=c,S.supplyDefaults(T);var M=T._fullLayout,g=T._fullData,b={};function p(O,P){for(var U in O)if(U.charAt(0)!=="_"&&d(O[U])){var B=o(U),X=[],$;for($=0;$<P.length;$++)X.push(s(O,U,P[$])),B!==U&&X.push(s(O,B,P[$]));for($=0;$<X.length;$++)b[X[$]]=1;p(O[U],X)}}function u(O,P){for(var U in O)if(U.indexOf("defaults")===-1&&d(O[U])){var B=s(O,U,P);b[B]?u(O[U],B):A.push({code:"unused",path:B})}}if(d(_)?(p(M,["layout"]),u(_,"layout")):A.push({code:"layout"}),!d(w))A.push({code:"data"});else{for(var y={},m,R=0;R<g.length;R++){var L=g[R];m=L.type,y[m]=(y[m]||0)+1,L._fullInput._template||A.push({code:"missing",index:L.index,traceType:m})}for(m in w){var z=w[m].length,F=y[m]||0;z>F?A.push({code:"unused",traceType:m,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:m,templateCount:z,dataCount:F})}}function N(O,P){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],X=s(O,U,P);d(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:X,templateitemname:B.templateitemname}),N(B,X)):Array.isArray(B)&&h(B)&&N(B,X)}}if(N({data:g,layout:M},""),A.length)return A.map(f)};function h(v){for(var c=0;c<v.length;c++)if(d(v[c]))return!0}function f(v){var c;switch(v.code){case"data":c="The template has no key data.";break;case"layout":c="The template has no key layout.";break;case"missing":v.path?c="There are no templates for item "+v.path+" with name "+v.templateitemname:c="There are no templates for trace "+v.index+", of type "+v.traceType+".";break;case"unused":v.path?c="The template item at "+v.path+" was not used in constructing the plot.":v.dataCount?c="Some of the templates of type "+v.traceType+" were not used. The template has "+v.templateCount+" traces, the data only has "+v.dataCount+" of this type.":c="The template has "+v.templateCount+" traces of type "+v.traceType+" but there are none in the data.";break;case"reused":c="Some of the templates of type "+v.traceType+" were used more than once. The template has "+v.templateCount+" traces, the data has "+v.dataCount+" of this type.";break}return v.msg=c,v}}}),Vz=He({"src/plot_api/index.js"(Z){"use strict";var V=k2();Z._doPlot=V._doPlot,Z.newPlot=V.newPlot,Z.restyle=V.restyle,Z.relayout=V.relayout,Z.redraw=V.redraw,Z.update=V.update,Z._guiRestyle=V._guiRestyle,Z._guiRelayout=V._guiRelayout,Z._guiUpdate=V._guiUpdate,Z._storeDirectGUIEdit=V._storeDirectGUIEdit,Z.react=V.react,Z.extendTraces=V.extendTraces,Z.prependTraces=V.prependTraces,Z.addTraces=V.addTraces,Z.deleteTraces=V.deleteTraces,Z.moveTraces=V.moveTraces,Z.purge=V.purge,Z.addFrames=V.addFrames,Z.deleteFrames=V.deleteFrames,Z.animate=V.animate,Z.setPlotConfig=V.setPlotConfig;var d=T_().getGraphDiv,x=E2().eraseActiveShape;Z.deleteActiveShape=function(E){return x(d(E))},Z.toImage=R5(),Z.validate=Uz(),Z.downloadImage=D5();var S=qz();Z.makeTemplate=S.makeTemplate,Z.validateTemplate=S.validateTemplate}}),n1=He({"src/traces/scatter/xy_defaults.js"(Z,V){"use strict";var d=sa(),x=lo();V.exports=function(E,e,t,r){var o=r("x"),a=r("y"),n,i=x.getComponentMethod("calendars","handleTraceDefaults");if(i(E,e,["x","y"],t),o){var s=d.minRowLength(o);a?n=Math.min(s,d.minRowLength(a)):(n=s,r("y0"),r("dy"))}else{if(!a)return 0;n=d.minRowLength(a),r("x0"),r("dx")}return e._length=n,n}}}),Qd=He({"src/traces/scatter/period_defaults.js"(Z,V){"use strict";var d=sa().dateTick0,x=Ws(),S=x.ONEWEEK;function E(e,t){return e%S===0?d(t,1):d(t,0)}V.exports=function(t,r,o,a,n){if(n||(n={x:!0,y:!0}),n.x){var i=a("xperiod");i&&(a("xperiod0",E(i,r.xcalendar)),a("xperiodalignment"))}if(n.y){var s=a("yperiod");s&&(a("yperiod0",E(s,r.ycalendar)),a("yperiodalignment"))}}}}),Gz=He({"src/traces/scatter/stack_defaults.js"(Z,V){"use strict";var d=["orientation","groupnorm","stackgaps"];V.exports=function(S,E,e,t){var r=e._scatterStackOpts,o=t("stackgroup");if(o){var a=E.xaxis+E.yaxis,n=r[a];n||(n=r[a]={});var i=n[o],s=!1;i?i.traces.push(E):(i=n[o]={traceIndices:[],traces:[E]},s=!0);for(var h={orientation:E.x&&!E.y?"h":"v"},f=0;f<d.length;f++){var v=d[f],c=v+"Found";if(!i[c]){var T=S[v]!==void 0,l=v==="orientation";if((T||s)&&(i[v]=t(v,h[v]),l&&(i.fillDflt=i[v]==="h"?"tonextx":"tonexty"),T&&(i[c]=!0,!s&&(delete i.traces[0][v],l))))for(var _=0;_<i.traces.length-1;_++){var w=i.traces[_];w._input.fill!==w.fill&&(w.fill=i.fillDflt)}}}return i}}}}),md=He({"src/traces/scatter/marker_defaults.js"(Z,V){"use strict";var d=Jn(),x=wp().hasColorscale,S=_h(),E=Fu();V.exports=function(t,r,o,a,n,i={}){var s=E.isBubble(t),h=(t.line||{}).color,f;if(h&&(o=h),n("marker.symbol"),n("marker.opacity",s?.7:1),n("marker.size"),i.noAngle||(n("marker.angle"),i.noAngleRef||n("marker.angleref"),i.noStandOff||n("marker.standoff")),n("marker.color",o),x(t,"marker")&&S(t,r,a,n,{prefix:"marker.",cLetter:"c"}),i.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),i.noLine||(h&&!Array.isArray(h)&&r.marker.color!==h?f=h:s?f=d.background:f=d.defaultLine,n("marker.line.color",f),x(t,"marker.line")&&S(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",s?1:0),i.noLineDash||n("marker.line.dash")),s&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),i.gradient){var v=n("marker.gradient.type");v!=="none"&&n("marker.gradient.color")}}}}),Dd=He({"src/traces/scatter/line_defaults.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray,x=wp().hasColorscale,S=_h();V.exports=function(e,t,r,o,a,n){n||(n={});var i=(e.marker||{}).color;if(i&&i._inputArray&&(i=i._inputArray),a("line.color",r),x(e,"line"))S(e,t,o,a,{prefix:"line.",cLetter:"c"});else{var s=(d(i)?!1:i)||r;a("line.color",s)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}}),o1=He({"src/traces/scatter/line_shape_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E){var e=E("line.shape");e==="spline"&&E("line.smoothing")}}}),zd=He({"src/traces/scatter/text_defaults.js"(Z,V){"use strict";var d=sa();V.exports=function(x,S,E,e,t){t=t||{},e("textposition"),d.coerceFont(e,"textfont",t.font||E.font,t),t.noSelect||(e("selected.textfont.color"),e("unselected.textfont.color"))}}}),ev=He({"src/traces/scatter/fillcolor_defaults.js"(Z,V){"use strict";var d=Jn(),x=sa().isArrayOrTypedArray;function S(E){for(var e=d.interpolate(E[0][1],E[1][1],.5),t=2;t<E.length;t++){var r=d.interpolate(E[t-1][1],E[t][1],.5);e=d.interpolate(e,r,E[t-1][0]/E[t][0])}return e}V.exports=function(e,t,r,o,a){a||(a={});var n=!1;if(t.marker){var i=t.marker.color,s=(t.marker.line||{}).color;i&&!x(i)?n=i:s&&!x(s)&&(n=s)}var h;if(a.moduleHasFillgradient){var f=o("fillgradient.type");if(f!=="none"){o("fillgradient.start"),o("fillgradient.stop");var v=o("fillgradient.colorscale");v&&(h=S(v))}}o("fillcolor",d.addOpacity((t.line||{}).color||n||h||r,.5))}}}),Hz=He({"src/traces/scatter/defaults.js"(Z,V){"use strict";var d=sa(),x=lo(),S=af(),E=Tv(),e=Fu(),t=n1(),r=Qd(),o=Gz(),a=md(),n=Dd(),i=o1(),s=zd(),h=ev(),f=sa().coercePattern;V.exports=function(c,T,l,_){function w(m,R){return d.coerce(c,T,S,m,R)}var A=t(c,T,_,w);if(A||(T.visible=!1),!!T.visible){r(c,T,_,w),w("xhoverformat"),w("yhoverformat"),w("zorder");var M=o(c,T,_,w);_.scattermode==="group"&&T.orientation===void 0&&w("orientation","v");var g=!M&&A<E.PTS_LINESONLY?"lines+markers":"lines";w("text"),w("hovertext"),w("mode",g),e.hasMarkers(T)&&a(c,T,l,_,w,{gradient:!0}),e.hasLines(T)&&(n(c,T,l,_,w,{backoff:!0}),i(c,T,w),w("connectgaps"),w("line.simplify")),e.hasText(T)&&(w("texttemplate"),w("texttemplatefallback"),s(c,T,_,w));var b=[];(e.hasMarkers(T)||e.hasText(T))&&(w("cliponaxis"),w("marker.maxdisplayed"),b.push("points")),w("fill",M?M.fillDflt:"none"),T.fill!=="none"&&(h(c,T,l,w,{moduleHasFillgradient:!0}),e.hasLines(T)||i(c,T,w),f(w,"fillpattern",T.fillcolor,!1));var p=(T.line||{}).color,u=(T.marker||{}).color;(T.fill==="tonext"||T.fill==="toself")&&b.push("fills"),w("hoveron",b.join("+")||"points"),T.hoveron!=="fills"&&(w("hovertemplate"),w("hovertemplatefallback"));var y=x.getComponentMethod("errorbars","supplyDefaults");y(c,T,p||u||l,{axis:"y"}),y(c,T,p||u||l,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(T,w)}}}}),Q0=He({"src/traces/scatter/grouping_defaults.js"(Z,V){"use strict";var d=J0().getAxisGroup;V.exports=function(S,E,e,t,r){var o=E.orientation,a=E[{v:"x",h:"y"}[o]+"axis"],n=d(e,a)+o,i=e._alignmentOpts||{},s=t("alignmentgroup"),h=i[n];h||(h=i[n]={});var f=h[s];f?f.traces.push(E):f=h[s]={traces:[E],alignmentIndex:Object.keys(h).length,offsetGroups:{}};var v=t("offsetgroup")||"",c=f.offsetGroups,T=c[v];E._offsetIndex=0,(r!=="group"||v)&&(T||(T=c[v]={offsetIndex:Object.keys(c).length}),E._offsetIndex=T.offsetIndex)}}}),z5=He({"src/traces/scatter/cross_trace_defaults.js"(Z,V){"use strict";var d=sa(),x=Q0(),S=af();V.exports=function(e,t){var r,o,a,n=t.scattermode;function i(c){return d.coerce(o._input,o,S,c)}if(t.scattermode==="group")for(a=0;a<e.length;a++)o=e[a],o.type==="scatter"&&(r=o._input,x(r,o,t,i,n));for(a=0;a<e.length;a++){var s=e[a];if(s.type==="scatter"){var h=s.fill;if(!(h==="none"||h==="toself")&&(s.opacity=void 0,h==="tonexty"||h==="tonextx"))for(var f=a-1;f>=0;f--){var v=e[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}}}),Wz=He({"src/traces/scatter/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=_2();V.exports=function(S,E){function e(r,o){return d.coerce(S,E,x,r,o)}var t=E.barmode==="group";E.scattermode==="group"&&e("scattergap",t?E.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,V){"use strict";var d=as(),x=sa(),S=x.dateTime2ms,E=x.incrementMonth,e=Ws(),t=e.ONEAVGMONTH;V.exports=function(o,a,n,i){if(a.type!=="date")return{vals:i};var s=o[n+"periodalignment"];if(!s)return{vals:i};var h=o[n+"period"],f;if(d(h)){if(h=+h,h<=0)return{vals:i}}else if(typeof h=="string"&&h.charAt(0)==="M"){var v=+h.substring(1);if(v>0&&Math.round(v)===v)f=v;else return{vals:i}}for(var c=a.calendar,T=s==="start",l=s==="end",_=o[n+"period0"],w=S(_,c)||0,A=[],M=[],g=[],b=i.length,p=0;p<b;p++){var u=i[p],y,m,R;if(f){for(y=Math.round((u-w)/(f*t)),R=E(w,f*y,c);R>u;)R=E(R,-f,c);for(;R<=u;)R=E(R,f,c);m=E(R,-f,c)}else{for(y=Math.round((u-w)/h),R=w+y*h;R>u;)R-=h;for(;R<=u;)R+=h;m=R-h}A[p]=T?m:l?R:(m+R)/2,M[p]=m,g[p]=R}return{vals:A,starts:M,ends:g}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,V){"use strict";var d=wp().hasColorscale,x=Tp(),S=Fu();V.exports=function(e,t){S.hasLines(t)&&d(t,"line")&&x(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(d(t,"marker")&&x(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),d(t,"marker.line")&&x(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;d.mergeArray(E.text,S,"tx"),d.mergeArray(E.texttemplate,S,"txt"),d.mergeArray(E.hovertext,S,"htx"),d.mergeArray(E.customdata,S,"data"),d.mergeArray(E.textposition,S,"tp"),E.textfont&&(d.mergeArrayCastPositive(E.textfont.size,S,"ts"),d.mergeArray(E.textfont.color,S,"tc"),d.mergeArray(E.textfont.family,S,"tf"),d.mergeArray(E.textfont.weight,S,"tw"),d.mergeArray(E.textfont.style,S,"ty"),d.mergeArray(E.textfont.variant,S,"tv"),d.mergeArray(E.textfont.textcase,S,"tC"),d.mergeArray(E.textfont.lineposition,S,"tE"),d.mergeArray(E.textfont.shadow,S,"tS"));var t=E.marker;if(t){d.mergeArrayCastPositive(t.size,S,"ms"),d.mergeArrayCastPositive(t.opacity,S,"mo"),d.mergeArray(t.symbol,S,"mx"),d.mergeArray(t.angle,S,"ma"),d.mergeArray(t.standoff,S,"mf"),d.mergeArray(t.color,S,"mc");var r=t.line;t.line&&(d.mergeArray(r.color,S,"mlc"),d.mergeArrayCastPositive(r.width,S,"mlw"),d.mergeArray(r.dash,S,"mld"));var o=t.gradient;o&&o.type!=="none"&&(d.mergeArray(o.type,S,"mgt"),d.mergeArray(o.color,S,"mgc"))}}}}),Od=He({"src/traces/scatter/calc_selection.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){d.isArrayOrTypedArray(E.selectedpoints)&&d.tagSelected(S,E)}}}),Bd=He({"src/traces/scatter/calc.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ho(),E=tv(),e=Ws().BADNUM,t=Fu(),r=Fd(),o=Av(),a=Od();function n(c,T){var l=c._fullLayout,_=T._xA=S.getFromId(c,T.xaxis||"x","x"),w=T._yA=S.getFromId(c,T.yaxis||"y","y"),A=_.makeCalcdata(T,"x"),M=w.makeCalcdata(T,"y"),g=E(T,_,"x",A),b=E(T,w,"y",M),p=g.vals,u=b.vals,y=T._length,m=new Array(y),R=T.ids,L=v(T,l,_,w),z=!1,F,N,O,P,U,B;h(l,T);var X="x",$="y",le;if(L)x.pushUnique(L.traceIndices,T.index),F=L.orientation==="v",F?($="s",le="x"):(X="s",le="y"),U=L.stackgaps==="interpolate";else{var ce=s(T,y);i(c,T,_,w,p,u,ce)}var de=!!T.xperiodalignment,G=!!T.yperiodalignment;for(N=0;N<y;N++){var Y=m[N]={},ee=d(p[N]),q=d(u[N]);ee&&q?(Y[X]=p[N],Y[$]=u[N],de&&(Y.orig_x=A[N],Y.xEnd=g.ends[N],Y.xStart=g.starts[N]),G&&(Y.orig_y=M[N],Y.yEnd=b.ends[N],Y.yStart=b.starts[N])):L&&(F?ee:q)?(Y[le]=F?p[N]:u[N],Y.gap=!0,U?(Y.s=e,z=!0):Y.s=0):Y[X]=Y[$]=e,R&&(Y.id=String(R[N]))}if(o(m,T),r(c,T),a(m,T),L){for(N=0;N<m.length;)m[N][le]===e?m.splice(N,1):N++;if(x.sort(m,function(Q,re){return Q[le]-re[le]||Q.i-re.i}),z){for(N=0;N<m.length-1&&m[N].gap;)N++;for(B=m[N].s,B||(B=m[N].s=0),O=0;O<N;O++)m[O].s=B;for(P=m.length-1;P>N&&m[P].gap;)P--;for(B=m[P].s,O=m.length-1;O>P;O--)m[O].s=B;for(;N<P;)if(N++,m[N].gap){for(O=N+1;m[O].gap;)O++;for(var se=m[N-1][le],ae=m[N-1].s,j=(m[O].s-ae)/(m[O][le]-se);N<O;)m[N].s=ae+(m[N][le]-se)*j,N++}}}return m}function i(c,T,l,_,w,A,M){var g=T._length,b=c._fullLayout,p=l._id,u=_._id,y=b._firstScatter[f(T)]===T.uid,m=(v(T,b,l,_)||{}).orientation,R=T.fill;l._minDtick=0,_._minDtick=0;var L={padded:!0},z={padded:!0};M&&(L.ppad=z.ppad=M);var F=g<2||w[0]!==w[g-1]||A[0]!==A[g-1];F&&(R==="tozerox"||R==="tonextx"&&(y||m==="h"))?L.tozero=!0:!(T.error_y||{}).visible&&(R==="tonexty"||R==="tozeroy"||!t.hasMarkers(T)&&!t.hasText(T))&&(L.padded=!1,L.ppad=0),F&&(R==="tozeroy"||R==="tonexty"&&(y||m==="v"))?z.tozero=!0:(R==="tonextx"||R==="tozerox")&&(z.padded=!1),p&&(T._extremes[p]=S.findExtremes(l,w,L)),u&&(T._extremes[u]=S.findExtremes(_,A,z))}function s(c,T){if(t.hasMarkers(c)){var l=c.marker,_=1.6*(c.marker.sizeref||1),w;if(c.marker.sizemode==="area"?w=function(p){return Math.max(Math.sqrt((p||0)/_),3)}:w=function(p){return Math.max((p||0)/_,3)},x.isArrayOrTypedArray(l.size)){var A={type:"linear"};S.setConvert(A);for(var M=A.makeCalcdata(c.marker,"size"),g=new Array(T),b=0;b<T;b++)g[b]=w(M[b]);return g}else return w(l.size)}}function h(c,T){var l=f(T),_=c._firstScatter;_[l]||(_[l]=T.uid)}function f(c){var T=c.stackgroup;return c.xaxis+c.yaxis+c.type+(T?"-"+T:"")}function v(c,T,l,_){var w=c.stackgroup;if(w){var A=T._scatterStackOpts[l._id+_._id][w],M=A.orientation==="v"?_:l;if(M.type==="linear"||M.type==="log")return A}}V.exports={calc:n,calcMarkerSize:s,calcAxisExpansion:i,setFirstScatter:h,getStackOpts:v}}}),Xz=He({"src/traces/bar/sieve.js"(Z,V){"use strict";V.exports=x;var d=sa().distinctVals;function x(S,E){this.traces=S,this.sepNegVal=E.sepNegVal,this.overlapNoMerge=E.overlapNoMerge;for(var e=1/0,t=E.posAxis._id.charAt(0),r=[],o=0;o<S.length;o++){for(var a=S[o],n=0;n<a.length;n++){var i=a[n],s=i.p;s===void 0&&(s=i[t]),s!==void 0&&r.push(s)}a[0]&&a[0].width1&&(e=Math.min(a[0].width1,e))}this.positions=r;var h=d(r);this.distinctPositions=h.vals,h.vals.length===1&&e!==1/0?this.minDiff=e:this.minDiff=Math.min(h.minDiff,e);var f=(E.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}x.prototype.put=function(E,e,t){var r=this.getLabel(E,e,t),o=this.bins[r]||0;return this.bins[r]=o+t,o},x.prototype.get=function(E,e,t){var r=this.getLabel(E,e,t);return this.bins[r]||0},x.prototype.getLabel=function(E,e,t){var r=t<0&&this.sepNegVal?"v":"^",o=this.overlapNoMerge?E:Math.round(E/this.binWidth);return r+o+"g"+e}}}),i0=He({"src/traces/bar/constants.js"(Z,V){"use strict";V.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),eg=He({"src/traces/bar/cross_trace_calc.js"(Z,V){"use strict";var d=as(),{isArrayOrTypedArray:x}=sa(),{BADNUM:S}=Ws(),E=lo(),e=Ho(),{getAxisGroup:t}=J0(),r=Xz(),{TEXTPAD:o}=i0(),{LINE_SPACING:a}=uh(),{BR_TAG_ALL:n}=ou();function i(F,N){for(var O=N.xaxis,P=N.yaxis,U=F._fullLayout,B=F._fullData,X=F.calcdata,$=[],le=[],ce=0;ce<B.length;ce++){var de=B[ce];if(de.visible===!0&&E.traceIs(de,"bar")&&de.xaxis===O._id&&de.yaxis===P._id&&(de.orientation==="h"?$.push(X[ce]):le.push(X[ce]),de._computePh))for(var G=F.calcdata[ce],Y=0;Y<G.length;Y++)typeof G[Y].ph0=="function"&&(G[Y].ph0=G[Y].ph0()),typeof G[Y].ph1=="function"&&(G[Y].ph1=G[Y].ph1())}var ee={xCat:O.type==="category"||O.type==="multicategory",yCat:P.type==="category"||P.type==="multicategory",mode:U.barmode,norm:U.barnorm,gap:U.bargap,groupgap:U.bargroupgap};s(F,O,P,le,ee),s(F,P,O,$,ee)}function s(F,N,O,P,U){if(P.length){var B,X,$,le,ce;switch(v(O,P),U.mode){case"overlay":c(F,N,O,P,U);break;case"group":for(B=[],X=[],$=0;$<P.length;$++)le=P[$],ce=le[0].trace,ce.offset===void 0?X.push(le):B.push(le);X.length&&T(F,N,O,X,U),B.length&&c(F,N,O,B,U);break;case"stack":case"relative":for(B=[],X=[],$=0;$<P.length;$++)le=P[$],ce=le[0].trace,ce.base===void 0?X.push(le):B.push(le);f(X),X.length&&l(F,N,O,X,U),B.length&&c(F,N,O,B,U);break}h(P),L(P,N)}}function h(F){var N,O,P,U,B,X,$;for(N=0;N<F.length;N++)O=F[N],P=O[0].trace,U=O[0].t,U.cornerradiusvalue===void 0&&(B=P.marker?P.marker.cornerradius:void 0,B!==void 0&&(X=d(B)?+B:+B.slice(0,-1),$=d(B)?"px":"%",U.cornerradiusvalue=X,U.cornerradiusform=$))}function f(F){if(!(F.length<2)){var N,O,P,U,B,X,$;for(N=0;N<F.length&&(O=F[N],P=O[0].trace,B=P.marker?P.marker.cornerradius:void 0,B===void 0);N++);if(B!==void 0)for(X=d(B)?+B:+B.slice(0,-1),$=d(B)?"px":"%",N=0;N<F.length;N++)O=F[N],U=O[0].t,U.cornerradiusvalue=X,U.cornerradiusform=$}}function v(F,N){var O,P;for(O=0;O<N.length;O++){var U=N[O],B=U[0].trace,X=B.type==="funnel"?B._base:B.base,$,le=B.orientation==="h"?B.xcalendar:B.ycalendar,ce=F.type==="category"||F.type==="multicategory"?function(){return null}:F.d2c;if(x(X)){for(P=0;P<Math.min(X.length,U.length);P++)$=ce(X[P],0,le),d($)?(U[P].b=+$,U[P].hasB=1):U[P].b=0;for(;P<U.length;P++)U[P].b=0}else{$=ce(X,0,le);var de=d($);for($=de?$:0,P=0;P<U.length;P++)U[P].b=$,de&&(U[P].hasB=1)}}}function c(F,N,O,P,U){for(var B=0;B<P.length;B++){var X=P[B],$=new r([X],{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});_(F,N,$,U),U.norm?(p($),y(O,$,U)):g(O,$)}}function T(F,N,O,P,U){var B=new r(P,{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});_(F,N,B,U),u(B,N),U.norm?(p(B),y(O,B,U)):g(O,B)}function l(F,N,O,P,U){var B=new r(P,{posAxis:N,sepNegVal:U.mode==="relative",overlapNoMerge:!(U.norm||U.mode==="stack"||U.mode==="relative")});_(F,N,B,U),b(O,B,U);for(var X=0;X<P.length;X++)for(var $=P[X],le=$[0].t.offsetindex,ce=0;ce<$.length;ce++){var de=$[ce];if(de.s!==S){var G=de.b+de.s===B.get(de.p,le,de.s);G&&(de._outmost=!0)}}U.norm&&y(O,B,U)}function _(F,N,O,P){var U=F._fullLayout,B=O.positions,X=O.distinctPositions,$=O.minDiff,le=O.traces,ce=le.length,de=B.length!==X.length,G=$*(1-P.gap),Y,ee,q,se;if(N._id==="angularaxis")Y=G,ee=Y*(1-(P.groupgap||0)),q=-ee/2;else{var ae=t(U,N._id)+le[0][0].trace.orientation;se=U._alignmentOpts[ae]||{}}for(var j=0;j<ce;j++){var Q=le[j],re=Q[0].trace;if(N._id!=="angularaxis"){var pe=se[re.alignmentgroup]||{},we=Object.keys(pe.offsetGroups||{}).length;we?Y=G/we:Y=de?G/ce:G,ee=Y*(1-(P.groupgap||0)),we?q=((2*re._offsetIndex+1-we)*Y-ee)/2:q=de?((2*j+1-ce)*Y-ee)/2:-ee/2}var Se=Q[0].t;Se.barwidth=ee,Se.offsetindex=re._offsetIndex||0,Se.poffset=q,Se.bargroupwidth=G,Se.bardelta=$}O.binWidth=le[0][0].t.barwidth/100,w(O),A(N,O),N._id==="angularaxis"?M(N,O):M(N,O,de)}function w(F){var N=F.traces,O,P;for(O=0;O<N.length;O++){var U=N[O],B=U[0],X=B.trace,$=B.t,le=X._offset||X.offset,ce=$.poffset,de;if(x(le)){for(de=Array.prototype.slice.call(le,0,U.length),P=0;P<de.length;P++)d(de[P])||(de[P]=ce);for(P=de.length;P<U.length;P++)de.push(ce);$.poffset=de}else le!==void 0&&($.poffset=le);var G=X._width||X.width,Y=$.barwidth;if(x(G)){var ee=Array.prototype.slice.call(G,0,U.length);for(P=0;P<ee.length;P++)d(ee[P])||(ee[P]=Y);for(P=ee.length;P<U.length;P++)ee.push(Y);if($.barwidth=ee,le===void 0){for(de=[],P=0;P<U.length;P++)de.push(ce+(Y-ee[P])/2);$.poffset=de}}else G!==void 0&&($.barwidth=G,le===void 0&&($.poffset=ce+(Y-G)/2))}}function A(F,N){for(var O=N.traces,P=z(F),U=0;U<O.length;U++)for(var B=O[U],X=B[0].t,$=X.poffset,le=x($),ce=X.barwidth,de=x(ce),G=0;G<B.length;G++){var Y=B[G],ee=Y.w=de?ce[G]:ce;Y.p===void 0&&(Y.p=Y[P],Y["orig_"+P]=Y[P]);var q=(le?$[G]:$)+ee/2;Y[P]=Y.p+q}}function M(F,N,O){var P=N.traces,U=N.minDiff,B=U/2;e.minDtick(F,N.minDiff,N.distinctPositions[0],O);for(var X=0;X<P.length;X++){var $=P[X],le=$[0],ce=le.trace,de=[],G,Y,ee,q;for(q=0;q<$.length;q++)G=$[q],Y=G.p-B,ee=G.p+B,de.push(Y,ee);if(ce.width||ce.offset){var se=le.t,ae=se.poffset,j=se.barwidth,Q=x(ae),re=x(j);for(q=0;q<$.length;q++){G=$[q];var pe=Q?ae[q]:ae,we=re?j[q]:j;Y=G.p+pe,ee=Y+we,de.push(Y,ee)}}ce._extremes[F._id]=e.findExtremes(F,de,{padded:!1})}}function g(F,N){for(var O=N.traces,P=z(F),U=0;U<O.length;U++){for(var B=O[U],X=B[0].trace,$=X.type==="scatter",le=X.orientation==="v",ce=[],de=!1,G=0;G<B.length;G++){var Y=B[G],ee=$?0:Y.b,q=$?le?Y.y:Y.x:ee+Y.s;Y[P]=q,ce.push(q),Y.hasB&&ce.push(ee),(!Y.hasB||!Y.b)&&(de=!0)}let{ppadminus:se,ppadplus:ae}=m(X,B);X._extremes[F._id]=e.findExtremes(F,ce,{tozero:de,padded:!0,ppadplus:ae,ppadminus:se})}}function b(F,N,O){var P=z(F),U=N.traces,B,X,$,le,ce,de,G;for(le=0;le<U.length;le++)if(B=U[le],X=B[0].trace,X.type==="funnel")for(G=B[0].t.offsetindex,ce=0;ce<B.length;ce++)de=B[ce],de.s!==S&&N.put(de.p,G,-.5*de.s);for(le=0;le<U.length;le++){B=U[le],X=B[0].trace,$=X.type==="funnel",G=X.type==="barpolar"?0:B[0].t.offsetindex;var Y=[];for(ce=0;ce<B.length;ce++)if(de=B[ce],de.s!==S){var ee;$?ee=de.s:ee=de.s+de.b;var q=N.put(de.p,G,ee),se=q+ee;de.b=q,de[P]=se,O.norm||(Y.push(se),de.hasB&&Y.push(q))}if(!O.norm){let{ppadminus:ae,ppadplus:j}=m(X,B);X._extremes[F._id]=e.findExtremes(F,Y,{tozero:!0,padded:!0,ppadplus:j,ppadminus:ae})}}}function p(F){for(var N=F.traces,O=0;O<N.length;O++)for(var P=N[O],U=P[0].t.offsetindex,B=0;B<P.length;B++){var X=P[B];X.s!==S&&F.put(X.p,U,X.b+X.s)}}function u(F,N){for(var O=F.traces,P=0;P<O.length;P++){var U=O[P],B=U[0].trace,X=U[0].t.offsetindex;if(B.base===void 0)for(var $=new r([U],{posAxis:N,sepNegVal:!0,overlapNoMerge:!0}),le=0;le<U.length;le++){var ce=U[le];if(ce.p!==S){var de=$.put(ce.p,X,ce.b+ce.s);de&&(ce.b=de)}}}}function y(F,N,O){var P=N.traces,U=z(F),B=O.norm==="fraction"?1:100,X=B/1e9,$=F.l2c(F.c2l(0)),le=O.mode==="stack"?B:$;function ce(Se){return d(F.c2l(Se))&&(Se<$-X||Se>le+X||!d($))}for(var de=0;de<P.length;de++){for(var G=P[de],Y=G[0].t.offsetindex,ee=G[0].trace,q=[],se=!1,ae=!1,j=0;j<G.length;j++){var Q=G[j];if(Q.s!==S){var re=Math.abs(B/N.get(Q.p,Y,Q.s));Q.b*=re,Q.s*=re;var pe=Q.b,we=pe+Q.s;Q[U]=we,q.push(we),ae=ae||ce(we),Q.hasB&&(q.push(pe),ae=ae||ce(pe)),(!Q.hasB||!Q.b)&&(se=!0)}}let{ppadminus:Se,ppadplus:Ie}=m(ee,G);ee._extremes[F._id]=e.findExtremes(F,q,{tozero:se,padded:ae,ppadplus:Ie,ppadminus:Se})}}function m(F,N){if(F.orientation==="v"&&(F.text||F.texttemplate)&&F.textposition==="outside"&&(F.textangle==="auto"||F.textangle===0)){let P=function(B){return!B||typeof B!="string"?0:(B.match(n)||[]).length+1};var O;F.texttemplate?O=P(F.texttemplate):O=x(F.text)?Math.max(...F.text.map(B=>P(B))):P(F.text);let U=F.outsidetextfont.size*a*O+o;return{ppadplus:N.some(B=>B.s<0)?U:0,ppadminus:N.some(B=>B.s>=0)?U:0}}return{ppadplus:void 0,ppadminus:void 0}}function R(F,N,O,P){for(var U=z(P),B=0;B<F.length;B++)for(var X=F[B],$=0;$<X.length;$++){var le=X[$],ce=le[U];le._sMin=N[ce],le._sMax=O[ce]}}function L(F,N){var O=z(N),P={},U,B,X,$=1/0,le=-1/0;for(U=0;U<F.length;U++)for(X=F[U],B=0;B<X.length;B++){var ce=X[B].p;d(ce)&&($=Math.min($,ce),le=Math.max(le,ce))}var de=1e4/(le-$),G=P.round=function(Re){return String(Math.round(de*(Re-$)))},Y={},ee={},q=F.some(function(Re){var We=Re[0].trace;return"marker"in We&&We.marker.cornerradius});for(U=0;U<F.length;U++){X=F[U],X[0].t.extents=P;var se=X[0].t.poffset,ae=x(se);for(B=0;B<X.length;B++){var j=X[B],Q=j[O]-j.w/2;if(d(Q)){var re=j[O]+j.w/2,pe=G(j.p);P[pe]?P[pe]=[Math.min(Q,P[pe][0]),Math.max(re,P[pe][1])]:P[pe]=[Q,re]}if(j.p0=j.p+(ae?se[B]:se),j.p1=j.p0+j.w,j.s0=j.b,j.s1=j.s0+j.s,q){var we=Math.min(j.s0,j.s1)||0,Se=Math.max(j.s0,j.s1)||0,Ie=j[O];Y[Ie]=Ie in Y?Math.min(Y[Ie],we):we,ee[Ie]=Ie in ee?Math.max(ee[Ie],Se):Se}}}q&&R(F,Y,ee,N)}function z(F){return F._id.charAt(0)}V.exports={crossTraceCalc:i,setGroupPositions:s}}}),Zz=He({"src/traces/scatter/cross_trace_calc.js"(Z,V){"use strict";var d=Bd(),x=eg().setGroupPositions;function S(t,r){for(var o=r.xaxis,a=r.yaxis,n=t._fullLayout,i=t._fullData,s=t.calcdata,h=[],f=[],v=0;v<i.length;v++){var c=i[v];c.visible===!0&&c.type==="scatter"&&c.xaxis===o._id&&c.yaxis===a._id&&(c.orientation==="h"?h.push(s[v]):c.orientation==="v"&&f.push(s[v]))}var T={mode:n.scattermode,gap:n.scattergap};x(t,o,a,f,T),x(t,a,o,h,T)}V.exports=function(r,o){r._fullLayout.scattermode==="group"&&S(r,o);var a=o.xaxis,n=o.yaxis,i=a._id+n._id,s=r._fullLayout._scatterStackOpts[i];if(s){var h=r.calcdata,f,v,c,T,l,_,w,A,M,g,b,p,u,y,m;for(var R in s){g=s[R];var L=g.traceIndices;if(L.length){for(b=g.stackgaps==="interpolate",p=g.groupnorm,g.orientation==="v"?(u="x",y="y"):(u="y",y="x"),m=new Array(L.length),f=0;f<m.length;f++)m[f]=!1;_=h[L[0]];var z=new Array(_.length);for(f=0;f<_.length;f++)z[f]=_[f][u];for(f=1;f<L.length;f++){for(l=h[L[f]],v=c=0;v<l.length;v++){for(w=l[v][u];w>z[c]&&c<z.length;c++)E(l,v,z[c],f,m,b,u),v++;if(w!==z[c]){for(T=0;T<f;T++)E(h[L[T]],c,w,T,m,b,u);z.splice(c,0,w)}c++}for(;c<z.length;c++)E(l,v,z[c],f,m,b,u),v++}var F=z.length;for(v=0;v<_.length;v++){for(A=_[v][y]=_[v].s,f=1;f<L.length;f++)l=h[L[f]],l[0].trace._rawLength=l[0].trace._length,l[0].trace._length=F,A+=l[v].s,l[v][y]=A;if(p)for(M=(p==="fraction"?A:A/100)||1,f=0;f<L.length;f++){var N=h[L[f]][v];N[y]/=M,N.sNorm=N.s/M}}for(f=0;f<L.length;f++){l=h[L[f]];var O=l[0].trace,P=d.calcMarkerSize(O,O._rawLength),U=Array.isArray(P);if(P&&m[f]||U){var B=P;for(P=new Array(F),v=0;v<F;v++)P[v]=l[v].gap?0:U?B[l[v].i]:B}var X=new Array(F),$=new Array(F);for(v=0;v<F;v++)X[v]=l[v].x,$[v]=l[v].y;d.calcAxisExpansion(r,O,a,n,X,$,P),l[0].t.orientation=g.orientation}}}}};function E(t,r,o,a,n,i,s){n[a]=!0;var h={i:null,gap:!0,s:0};if(h[s]=o,t.splice(r,0,h),r&&o===t[r-1][s]){var f=t[r-1];h.s=f.s,h.i=f.i,h.gap=f.gap}else i&&(h.s=e(t,r,o,s));r||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function e(t,r,o,a){var n=t[r-1],i=t[r+1];return i?n?n.s+(i.s-n.s)*(o-n[a])/(i[a]-n[a]):i.s:n.s}}}),F5=He({"src/traces/scatter/line_points.js"(Z,V){"use strict";var d=es(),x=Ws(),S=x.BADNUM,E=x.LOG_CLIP,e=E+.5,t=E-.5,r=sa(),o=r.segmentsIntersect,a=r.constrain,n=Tv();V.exports=function(s,h){var f=h.trace||{},v=h.xaxis,c=h.yaxis,T=v.type==="log",l=c.type==="log",_=v._length,w=c._length,A=h.backoff,M=f.marker,g=h.connectGaps,b=h.baseTolerance,p=h.shape,u=p==="linear",y=f.fill&&f.fill!=="none",m=[],R=n.minTolerance,L=s.length,z=new Array(L),F=0,N,O,P,U,B,X,$,le,ce,de,G,Y,ee,q,se,ae;function j(Ct){var Pt=s[Ct];if(!Pt)return!1;var jt=h.linearized?v.l2p(Pt.x):v.c2p(Pt.x),fr=h.linearized?c.l2p(Pt.y):c.c2p(Pt.y);if(jt===S){if(T&&(jt=v.c2p(Pt.x,!0)),jt===S)return!1;l&&fr===S&&(jt*=Math.abs(v._m*w*(v._m>0?e:t)/(c._m*_*(c._m>0?e:t)))),jt*=1e3}if(fr===S){if(l&&(fr=c.c2p(Pt.y,!0)),fr===S)return!1;fr*=1e3}return[jt,fr]}function Q(Ct,Pt,jt,fr){var ur=jt-Ct,sr=fr-Pt,Pr=.5-Ct,Ta=.5-Pt,Oa=ur*ur+sr*sr,Ia=ur*Pr+sr*Ta;if(Ia>0&&Ia<Oa){var qa=Pr*sr-Ta*ur;if(qa*qa<Oa)return!0}}var re,pe;function we(Ct,Pt){var jt=Ct[0]/_,fr=Ct[1]/w,ur=Math.max(0,-jt,jt-1,-fr,fr-1);return ur&&re!==void 0&&Q(jt,fr,re,pe)&&(ur=0),ur&&Pt&&Q(jt,fr,Pt[0]/_,Pt[1]/w)&&(ur=0),(1+n.toleranceGrowth*ur)*b}function Se(Ct,Pt){var jt=Ct[0]-Pt[0],fr=Ct[1]-Pt[1];return Math.sqrt(jt*jt+fr*fr)}var Ie=n.maxScreensAway,Re=-_*Ie,We=_*(1+Ie),at=-w*Ie,nt=w*(1+Ie),tt=[[Re,at,We,at],[We,at,We,nt],[We,nt,Re,nt],[Re,nt,Re,at]],qe,he,ue,ne,Ce,Ye;function rt(Ct,Pt){for(var jt=[],fr=0,ur=0;ur<4;ur++){var sr=tt[ur],Pr=o(Ct[0],Ct[1],Pt[0],Pt[1],sr[0],sr[1],sr[2],sr[3]);Pr&&(!fr||Math.abs(Pr.x-jt[0][0])>1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],fr&&Se(Pr,Ct)<Se(jt[0],Ct)?jt.unshift(Pr):jt.push(Pr),fr++)}return jt}function Ke(Ct){if(Ct[0]<Re||Ct[0]>We||Ct[1]<at||Ct[1]>nt)return[a(Ct[0],Re,We),a(Ct[1],at,nt)]}function Mt(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Re||Ct[0]===We)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],fr=Ke(Ct),ur=Ke(Pt);return fr&&ur&&Mt(fr,ur)||(fr&&jt.push(fr),ur&&jt.push(ur)),jt}function Nt(Ct,Pt,jt){return function(fr,ur){var sr=Ke(fr),Pr=Ke(ur),Ta=[];if(sr&&Pr&&Mt(sr,Pr))return Ta;sr&&Ta.push(sr),Pr&&Ta.push(Pr);var Oa=2*r.constrain((fr[Ct]+ur[Ct])/2,Pt,jt)-((sr||fr)[Ct]+(Pr||ur)[Ct]);if(Oa){var Ia;sr&&Pr?Ia=Oa>0==sr[Ct]>Pr[Ct]?sr:Pr:Ia=sr||Pr,Ia[Ct]+=Oa}return Ta}}var Gt;p==="linear"||p==="spline"?Gt=rt:p==="hv"||p==="vh"?Gt=kt:p==="hvh"?Gt=Nt(0,Re,We):p==="vhv"&&(Gt=Nt(1,at,nt));function Mr(Ct,Pt){var jt=Pt[0]-Ct[0],fr=(Pt[1]-Ct[1])/jt,ur=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return ur>0?[fr>0?Re:We,nt]:[fr>0?We:Re,at]}function mr(Ct){var Pt=Ct[0],jt=Ct[1],fr=Pt===z[F-1][0],ur=jt===z[F-1][1];if(!(fr&&ur))if(F>1){var sr=Pt===z[F-2][0],Pr=jt===z[F-2][1];fr&&(Pt===Re||Pt===We)&&sr?Pr?F--:z[F-1]=Ct:ur&&(jt===at||jt===nt)&&Pr?sr?F--:z[F-1]=Ct:z[F++]=Ct}else z[F++]=Ct}function qr(Ct){z[F-1][0]!==Ct[0]&&z[F-1][1]!==Ct[1]&&mr([ue,ne]),mr(Ct),Ce=null,ue=ne=0}var Er=r.isArrayOrTypedArray(M);function Ir(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=Er?M[Ct.i]:M,Ct.backoff=A),re=Ct[0]/_,pe=Ct[1]/w,qe=Ct[0]<Re?Re:Ct[0]>We?We:0,he=Ct[1]<at?at:Ct[1]>nt?nt:0,qe||he){if(!F)z[F++]=[qe||Ct[0],he||Ct[1]];else if(Ce){var Pt=Gt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ye=Gt(z[F-1],Ct)[0],z[F++]=Ye;var jt=z[F-1];qe&&he&&(jt[0]!==qe||jt[1]!==he)?(Ce&&(ue!==qe&&ne!==he?mr(ue&&ne?Mr(Ce,Ct):[ue||qe,ne||he]):ue&&ne&&mr([ue,ne])),mr([qe,he])):ue-qe&&ne-he&&mr([qe||ue,he||ne]),Ce=Ct,ue=qe,ne=he}else Ce&&qr(Gt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;N<L;N++)if(O=j(N),!!O){for(F=0,Ce=null,Ir(O),N++;N<L;N++){if(U=j(N),!U){if(g)continue;break}if(!u||!h.simplify){Ir(U);continue}var _t=j(N+1);if(de=Se(U,O),!(!(y&&(F===0||F===L-1))&&de<we(U,_t)*R)){for(le=[(U[0]-O[0])/de,(U[1]-O[1])/de],B=O,G=de,Y=q=se=0,$=!1,P=U,N++;N<s.length;N++){if(X=_t,_t=j(N+1),!X){if(g)continue;break}if(ce=[X[0]-O[0],X[1]-O[1]],ae=ce[0]*le[1]-ce[1]*le[0],q=Math.min(q,ae),se=Math.max(se,ae),se-q>we(X,_t))break;P=X,ee=ce[0]*le[0]+ce[1]*le[1],ee>G?(G=ee,U=X,$=!1):ee<Y&&(Y=ee,B=X,$=!0)}if($?(Ir(U),P!==B&&Ir(B)):(B!==O&&Ir(B),P!==U&&Ir(U)),Ir(P),N>=s.length||!X)break;Ir(X),O=X}}Ce&&mr([ue||Ce[0],ne||Ce[1]]),m.push(z.slice(0,F))}var Oe=p.slice(p.length-1);if(A&&Oe!=="h"&&Oe!=="v"){for(var Je=!1,Ae=-1,Le=[],Ue=0;Ue<m.length;Ue++)for(var Ze=0;Ze<m[Ue].length-1;Ze++){var st=m[Ue][Ze],ut=m[Ue][Ze+1],Ut=d.applyBackoff(ut,st);(Ut[0]!==ut[0]||Ut[1]!==ut[1])&&(Je=!0),Le[Ae+1]||(Ae++,Le[Ae]=[st,[Ut[0],Ut[1]]])}return Je?Le:m}return m}}}),O5=He({"src/traces/scatter/link_traces.js"(Z,V){"use strict";var d={tonextx:1,tonexty:1,tonext:1};V.exports=function(S,E,e){var t,r,o,a,n,i={},s=!1,h=-1,f=0,v=-1;for(r=0;r<e.length;r++)t=e[r][0].trace,o=t.stackgroup||"",o?o in i?n=i[o]:(n=i[o]=f,f++):t.fill in d&&v>=0?n=v:(n=v=f,f++),n<h&&(s=!0),t._groupIndex=h=n;var c=e.slice();s&&c.sort(function(l,_){var w=l[0].trace,A=_[0].trace;return w._groupIndex-A._groupIndex||w.index-A.index});var T={};for(r=0;r<c.length;r++)t=c[r][0].trace,o=t.stackgroup||"",t.visible===!0?(t._nexttrace=null,t.fill in d&&(a=T[o],t._prevtrace=a||null,a&&(a._nexttrace=t)),t._ownfill=t.fill&&(t.fill.slice(0,6)==="tozero"||t.fill==="toself"||t.fill.slice(0,2)==="to"&&!t._prevtrace),T[o]=t):t._prevtrace=t._nexttrace=t._ownfill=null;return c}}}),s1=He({"src/traces/scatter/plot.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=sa(),E=S.ensureSingle,e=S.identity,t=es(),r=Fu(),o=F5(),a=O5(),n=I_().tester;V.exports=function(v,c,T,l,_,w){var A,M,g=!_,b=!!_&&_.duration>0,p=a(v,c,T);if(A=l.selectAll("g.trace").data(p,function(y){return y[0].trace.uid}),A.enter().append("g").attr("class",function(y){return"trace scatter trace"+y[0].trace.uid}).style("stroke-miterlimit",2),A.order(),i(v,A,c),b){w&&(M=w());var u=d.transition().duration(_.duration).ease(_.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()});u.each(function(){l.selectAll("g.trace").each(function(y,m){s(v,m,c,y,p,this,_)})})}else A.each(function(y,m){s(v,m,c,y,p,this,_)});g&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function i(f,v,c){v.each(function(T){var l=E(d.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var _=T[0].trace;_._ownFill=null,_._nextFill=null;var w=[];_._ownfill&&w.push("_ownFill"),_._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(M){_[M]=E(d.select(this),"path","js-fill")})})}function s(f,v,c,T,l,_,w){var A=f._context.staticPlot,M;h(f,v,c,T,l);var g=!!w&&w.duration>0;function b(mr){return g?mr.transition():mr}var p=c.xaxis,u=c.yaxis,y=T[0].trace,m=y.line,R=d.select(_),L=E(R,"g","errorbars"),z=E(R,"g","lines"),F=E(R,"g","points"),N=E(R,"g","text");if(x.getComponentMethod("errorbars","plot")(f,L,c,w),y.visible!==!0)return;b(R).style("opacity",y.opacity);var O,P,U=y.fill.charAt(y.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,X;U==="y"?(B=1,X=u.c2p(0,!0)):U==="x"&&(B=0,X=p.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=R;var $="",le=[],ce=y._prevtrace,de=null,G=null;ce&&($=ce._prevRevpath||"",P=ce._nextFill,le=ce._ownPolygons,de=ce._fillsegments,G=ce._fillElement);var Y,ee,q="",se="",ae,j,Q,re,pe,we,Se=[];y._polygons=[];var Ie=[],Re=[],We=S.noop;if(O=y._ownFill,r.hasLines(y)||y.fill!=="none"){P&&P.datum(T),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(ae=t.steps(m.shape),j=t.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?ae=j=function(mr){var qr=mr[mr.length-1];return mr.length>1&&mr[0][0]===qr[0]&&mr[0][1]===qr[1]?t.smoothclosed(mr.slice(1),m.smoothing):t.smoothopen(mr,m.smoothing)}:ae=j=function(mr){return"M"+mr.join("L")},Q=function(mr){return j(mr.reverse())},Re=o(T,{xaxis:p,yaxis:u,trace:y,connectGaps:y.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:y.fill}),Ie=new Array(Re.length);var at=0;for(M=0;M<Re.length;M++){var nt,tt=Re[M];!nt||!U?(nt=tt.slice(),Ie[at]=nt,at++):nt.push.apply(nt,tt)}y._fillElement=null,y._fillExclusionElement=G,y._fillsegments=Ie.slice(0,at),Ie=y._fillsegments,Re.length&&(re=Re[0][0].slice(),pe=Re[Re.length-1],we=pe[pe.length-1].slice()),We=function(mr){return function(qr){if(Y=ae(qr),ee=Q(qr),q?U?(q+="L"+Y.slice(1),se=ee+("L"+se.slice(1))):(q+="Z"+Y,se=ee+"Z"+se):(q=Y,se=ee),r.hasLines(y)){var Er=d.select(this);if(Er.datum(T),mr)b(Er.style("opacity",0).attr("d",Y).call(t.lineGroupStyle)).style("opacity",1);else{var Ir=b(Er);Ir.attr("d",Y),t.singleLineStyle(T,Ir)}}}}}var qe=z.selectAll(".js-line").data(Re);b(qe.exit()).style("opacity",0).remove(),qe.each(We(!1)),qe.enter().append("path").classed("js-line",!0).style("vector-effect",A?"none":"non-scaling-stroke").call(t.lineGroupStyle).each(We(!0)),t.setClipUrl(qe,c.layerClipId,f);function he(mr){b(mr).attr("d","M0,0Z")}var ue=function(){var mr=new Array(Ie.length);for(M=0;M<Ie.length;M++)mr[M]=n(Ie[M]);return mr},ne=function(mr){var qr,Er;if(!mr||mr.length===0)for(qr=new Array(Ie.length),Er=0;Er<Ie.length;Er++){var Ir=Ie[Er][0].slice(),_t=Ie[Er][Ie[Er].length-1].slice();Ir[B]=_t[B]=X;var Oe=[_t,Ir],Je=Oe.concat(Ie[Er]);qr[Er]=n(Je)}else{for(qr=new Array(mr.length-1+Ie.length),Er=0;Er<mr.length-1;Er++)qr[Er]=n(mr[Er]);var Ae=mr[mr.length-1].slice();for(Ae.reverse(),Er=0;Er<Ie.length;Er++)qr[mr.length-1+Er]=n(Ie[Er].concat(Ae))}return qr};Re.length?(O?(O.datum(T),re&&we&&(U?(re[B]=we[B]=X,b(O).attr("d","M"+we+"L"+re+"L"+q.slice(1)).call(t.singleFillStyle,f),Se=ne(null)):(b(O).attr("d",q+"Z").call(t.singleFillStyle,f),Se=ue())),y._polygons=Se,y._fillElement=O):P&&(y.fill.slice(0,6)==="tonext"&&q&&$?(y.fill==="tonext"?(b(P).attr("d",q+"Z"+$+"Z").call(t.singleFillStyle,f),Se=ue(),y._polygons=Se.concat(le)):(b(P).attr("d",q+"L"+$.slice(1)+"Z").call(t.singleFillStyle,f),Se=ne(de),y._polygons=Se),y._fillElement=P):he(P)),y._prevRevpath=se):(O?he(O):P&&he(P),y._prevRevpath=null),y._ownPolygons=Se;function Ce(mr){return mr.filter(function(qr){return!qr.gap&&qr.vis})}function Ye(mr){return mr.filter(function(qr){return qr.vis})}function rt(mr){return mr.filter(function(qr){return!qr.gap})}function Ke(mr){return mr.id}function Mt(mr){if(mr.ids)return Ke}function kt(){return!1}function Nt(mr,qr,Er){var Ir,_t,Oe,Je=Er[0].trace,Ae=r.hasMarkers(Je),Le=r.hasText(Je),Ue=Mt(Je),Ze=kt,st=kt;if(Ae||Le){var ut=e,Ut=Je.stackgroup,Ct=Ut&&f._fullLayout._scatterStackOpts[p._id+u._id][Ut].stackgaps==="infer zero";Je.marker.maxdisplayed||Je._needsCull?ut=Ct?Ye:Ce:Ut&&!Ct&&(ut=rt),Ae&&(Ze=ut),Le&&(st=ut)}_t=mr.selectAll("path.point"),Ir=_t.data(Ze,Ue);var Pt=Ir.enter().append("path").classed("point",!0);g&&Pt.call(t.pointStyle,Je,f).call(t.translatePoints,p,u).style("opacity",0).transition().style("opacity",1),Ir.order();var jt;Ae&&(jt=t.makePointStyleFns(Je)),Ir.each(function(fr){var ur=d.select(this),sr=b(ur);Oe=t.translatePoint(fr,sr,p,u),Oe?(t.singlePointStyle(fr,sr,Je,jt,f),c.layerClipId&&t.hideOutsideRangePoint(fr,sr,p,u,Je.xcalendar,Je.ycalendar),Je.customdata&&ur.classed("plotly-customdata",fr.data!==null&&fr.data!==void 0)):sr.remove()}),g?Ir.exit().transition().style("opacity",0).remove():Ir.exit().remove(),_t=qr.selectAll("g"),Ir=_t.data(st,Ue),Ir.enter().append("g").classed("textpoint",!0).append("text"),Ir.order(),Ir.each(function(fr){var ur=d.select(this),sr=b(ur.select("text"));Oe=t.translatePoint(fr,sr,p,u),Oe?c.layerClipId&&t.hideOutsideRangePoint(fr,ur,p,u,Je.xcalendar,Je.ycalendar):ur.remove()}),Ir.selectAll("text").call(t.textPointStyle,Je,f).each(function(fr){var ur=p.c2p(fr.x),sr=u.c2p(fr.y);d.select(this).selectAll("tspan.line").each(function(){b(d.select(this)).attr({x:ur,y:sr})})}),Ir.exit().remove()}F.datum(T),N.datum(T),Nt(F,N,T);var Gt=y.cliponaxis===!1,Mr=Gt?null:c.layerClipId;t.setClipUrl(F,Mr,f),t.setClipUrl(N,Mr,f)}function h(f,v,c,T,l){var _=c.xaxis,w=c.yaxis,A=d.extent(S.simpleMap(_.range,_.r2c)),M=d.extent(S.simpleMap(w.range,w.r2c)),g=T[0].trace;if(r.hasMarkers(g)){var b=g.marker.maxdisplayed;if(b!==0){var p=T.filter(function(R){return R.x>=A[0]&&R.x<=A[1]&&R.y>=M[0]&&R.y<=M[1]}),u=Math.ceil(p.length/b),y=0;l.forEach(function(R,L){var z=R[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&L<v&&y++});var m=Math.round(y*u/3+Math.floor(y/3)*u/7.1);T.forEach(function(R){delete R.vis}),p.forEach(function(R,L){Math.round((L+m)%u)===0&&(R.vis=!0)})}}}}}),pp=He({"src/traces/scatter/marker_colorbar.js"(Z,V){"use strict";V.exports={container:"marker",min:"cmin",max:"cmax"}}}),P2=He({"src/traces/scatter/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r={_fullLayout:e},o=d.getFromTrace(r,E,"x"),a=d.getFromTrace(r,E,"y"),n=S.orig_x;n===void 0&&(n=S.x);var i=S.orig_y;return i===void 0&&(i=S.y),t.xLabel=d.tickText(o,o.c2l(n),!0).text,t.yLabel=d.tickText(a,a.c2l(i),!0).text,t}}}),Qp=He({"src/traces/scatter/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=lo();function E(o){var a=d.select(o).selectAll("g.trace.scatter");a.style("opacity",function(n){return n[0].trace.opacity}),a.selectAll("g.points").each(function(n){var i=d.select(this),s=n.trace||n[0].trace;e(i,s,o)}),a.selectAll("g.text").each(function(n){var i=d.select(this),s=n.trace||n[0].trace;t(i,s,o)}),a.selectAll("g.trace path.js-line").call(x.lineGroupStyle),a.selectAll("g.trace path.js-fill").call(x.fillGroupStyle,o,!1),S.getComponentMethod("errorbars","style")(a)}function e(o,a,n){x.pointStyle(o.selectAll("path.point"),a,n)}function t(o,a,n){x.textPointStyle(o.selectAll("text"),a,n)}function r(o,a,n){var i=a[0].trace;i.selectedpoints?(x.selectedPointStyle(n.selectAll("path.point"),i),x.selectedTextStyle(n.selectAll("text"),i)):(e(n,i,o),t(n,i,o))}V.exports={style:E,stylePoints:e,styleText:t,styleOnSelect:r}}}),l1=He({"src/traces/scatter/get_trace_color.js"(Z,V){"use strict";var d=Jn(),x=Fu();V.exports=function(E,e){var t,r;if(E.mode==="lines")return t=E.line.color,t&&d.opacity(t)?t:E.fillcolor;if(E.mode==="none")return E.fill?E.fillcolor:"";var o=e.mcc||(E.marker||{}).color,a=e.mlcc||((E.marker||{}).line||{}).color;return r=o&&d.opacity(o)?o:a&&d.opacity(a)&&(e.mlw||((E.marker||{}).line||{}).width)?a:"",r?d.opacity(r)<.3?d.addOpacity(r,.3):r:(t=(E.line||{}).color,t&&d.opacity(t)&&x.hasLines(E)&&E.line.width?t:E.fillcolor)}}}),u1=He({"src/traces/scatter/hover.js"(Z,V){"use strict";var d=sa(),x=rf(),S=lo(),E=l1(),e=Jn(),t=d.fillText;V.exports=function(o,a,n,i){var s=o.cd,h=s[0].trace,f=o.xa,v=o.ya,c=f.c2p(a),T=v.c2p(n),l=[c,T],_=h.hoveron||"",w=h.mode.indexOf("markers")!==-1?3:.5,A=!!h.xperiodalignment,M=!!h.yperiodalignment;if(_.indexOf("points")!==-1){var g=function(le){if(A){var ce=f.c2p(le.xStart),de=f.c2p(le.xEnd);return c>=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var G=Math.max(3,le.mrc||0),Y=1-1/G,ee=Math.abs(f.c2p(le.x)-c);return ee<G?Y*ee/G:ee-G+Y},b=function(le){if(M){var ce=v.c2p(le.yStart),de=v.c2p(le.yEnd);return T>=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var G=Math.max(3,le.mrc||0),Y=1-1/G,ee=Math.abs(v.c2p(le.y)-T);return ee<G?Y*ee/G:ee-G+Y},p=function(le){var ce=Math.max(w,le.mrc||0),de=f.c2p(le.x)-c,G=v.c2p(le.y)-T;return Math.max(Math.sqrt(de*de+G*G)-ce,1-w/ce)},u=x.getDistanceFunction(i,g,b,p);if(x.getClosest(s,u,o),o.index!==!1){var y=s[o.index],m=f.c2p(y.x,!0),R=v.c2p(y.y,!0),L=y.mrc||1;o.index=y.i;var z=s[0].t.orientation,F=z&&(y.sNorm||y.s),N=z==="h"?F:y.orig_x!==void 0?y.orig_x:y.x,O=z==="v"?F:y.orig_y!==void 0?y.orig_y:y.y;return d.extendFlat(o,{color:E(h,y),x0:m-L,x1:m+L,xLabelVal:N,y0:R-L,y1:R+L,yLabelVal:O,spikeDistance:p(y),hovertemplate:h.hovertemplate}),t(y,h,o),S.getComponentMethod("errorbars","hoverInfo")(y,h,o),[o]}}function P(le){if(!le)return!1;var ce=le.node();try{var de=new DOMPoint(l[0],l[1]);return ce.isPointInFill(de)}catch{var G=ce.ownerSVGElement.createSVGPoint();return G.x=l[0],G.y=l[1],ce.isPointInFill(G)}}function U(le){var ce,de=[],G=1/0,Y=-1/0,ee=1/0,q=-1/0,se;for(ce=0;ce<le.length;ce++){var ae=le[ce];ae.contains(l)&&(de.push(ae),ee=Math.min(ee,ae.ymin),q=Math.max(q,ae.ymax))}if(de.length===0)return null;ee=Math.max(ee,0),q=Math.min(q,v._length),se=(ee+q)/2;var j,Q,re,pe,we,Se,Ie;for(ce=0;ce<de.length;ce++)for(Q=de[ce].pts,j=1;j<Q.length;j++)Se=Q[j-1][1],Ie=Q[j][1],Se>se!=Ie>=se&&(pe=Q[j-1][0],we=Q[j][0],Ie-Se&&(re=pe+(we-pe)*(se-Se)/(Ie-Se),G=Math.min(G,re),Y=Math.max(Y,re)));return G=Math.max(G,0),Y=Math.min(Y,f._length),{x0:G,x1:Y,y0:se,y1:se}}if(_.indexOf("fills")!==-1&&h._fillElement){var B=P(h._fillElement)&&!P(h._fillExclusionElement);if(B){var X=U(h._polygons);X===null&&(X={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var $=e.defaultLine;return e.opacity(h.fillcolor)?$=h.fillcolor:e.opacity((h.line||{}).color)&&($=h.line.color),d.extendFlat(o,{distance:o.maxHoverDistance,x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!d.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,V){"use strict";var d=Fu();V.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,n,i,s,h,f=!d.hasMarkers(a)&&!d.hasText(a);if(f)return[];if(E===!1)for(n=0;n<e.length;n++)e[n].selected=0;else for(n=0;n<e.length;n++)i=e[n],s=t.c2p(i.x),h=r.c2p(i.y),i.i!==null&&E.contains([s,h],!1,n,S)?(o.push({pointNumber:i.i,x:t.c2d(i.x),y:r.c2d(i.y)}),i.selected=1):i.selected=0;return o}}}),Yz=He({"src/plots/cartesian/attributes.js"(Z,V){"use strict";V.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),B5=He({"src/plots/cartesian/type_defaults.js"(Z,V){"use strict";var d=lo().traceIs,x=a1();V.exports=function(o,a,n,i){n("autotypenumbers",i.autotypenumbersDflt);var s=n("type",(i.splomStash||{}).type);s==="-"&&(S(a,i.data),a.type==="-"?a.type="linear":o.type=a.type)};function S(r,o){if(r.type==="-"){var a=r._id,n=a.charAt(0),i;a.indexOf("scene")!==-1&&(a=n);var s=E(o,a,n);if(s){if(s.type==="histogram"&&n==={v:"y",h:"x"}[s.orientation||"v"]){r.type="linear";return}var h=n+"calendar",f=s[h],v={noMultiCategory:!d(s,"cartesian")||d(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&n==={h:"x",v:"y"}[s.orientation||"v"]&&(v.noMultiCategory=!0),v.autotypenumbers=r.autotypenumbers,t(s,n)){var c=e(s),T=[];for(i=0;i<o.length;i++){var l=o[i];!d(l,"box-violin")||(l[n+"axis"]||n)!==a||(l[c]!==void 0?T.push(l[c][0]):l.name!==void 0?T.push(l.name):T.push("text"),l[h]!==f&&(f=void 0))}r.type=x(T,f,v)}else if(s.type==="splom"){var _=s.dimensions,w=_[s._axesDim[a]];w.visible&&(r.type=x(w.values,f,v))}else r.type=x(s[n]||[s[n+"0"]],f,v)}}}function E(r,o,a){for(var n=0;n<r.length;n++){var i=r[n];if(i.type==="splom"&&i._length>0&&(i["_"+a+"axes"]||{})[o])return i;if((i[a+"axis"]||a)===o){if(t(i,a))return i;if((i[a]||[]).length||i[a+"0"])return i}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),n=d(r,"box-violin"),i=d(r._fullInput||{},"candlestick");return n&&!i&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,V){"use strict";var d=bp().isTypedArraySpec;function x(S,E){var e=E.dataAttr||S._id.charAt(0),t={},r,o,a;if(E.axData)r=E.axData;else for(r=[],o=0;o<E.data.length;o++){var n=E.data[o];n[e+"axis"]===S._id&&r.push(n)}for(o=0;o<r.length;o++){var i=r[o][e];for(a=0;a<i.length;a++){var s=i[a];s!=null&&(t[s]=1)}}return Object.keys(t)}V.exports=function(E,e,t,r){if(e.type==="category"){var o=E.categoryarray,a=Array.isArray(o)&&o.length>0||d(o),n;a&&(n="array");var i=t("categoryorder",n),s;i==="array"&&(s=t("categoryarray")),!a&&i==="array"&&(i=e.categoryorder="trace"),i==="trace"?e._initialCategories=[]:i==="array"?e._initialCategories=s.slice():(s=x(e,r).sort(),i==="category ascending"?e._initialCategories=s:i==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,V){"use strict";var d=Ch().mix,x=sh(),S=sa();V.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function n(m,R){return S.coerce2(e,t,o.attributes,m,R)}var i=n("linecolor",a),s=n("linewidth"),h=r("showline",o.showLine||!!i||!!s);h||(delete t.linecolor,delete t.linewidth);var f=d(a,o.bgColor,o.blend||x.lightFraction).toRgbString(),v=n("gridcolor",f),c=n("gridwidth"),T=n("griddash"),l=r("showgrid",o.showGrid||!!v||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var _=d(t.gridcolor,o.bgColor,67).toRgbString(),w=n("minor.gridcolor",_),A=n("minor.gridwidth",t.gridwidth||1),M=n("minor.griddash",t.griddash||"solid"),g=r("minor.showgrid",!!w||!!A||!!M);g||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=n("zerolinelayer"),p=n("zerolinecolor",a),u=n("zerolinewidth"),y=r("zeroline",o.showGrid||!!p||!!u);y||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,V){"use strict";var d=as(),x=lo(),S=sa(),E=zl(),e=hp(),t=Wh(),r=Y0(),o=t1(),a=Qm(),n=e0(),i=I2(),s=z_(),h=h5(),f=wv(),v=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;V.exports=function(A,M,g,b,p){var u=b.letter,y=b.font||{},m=b.splomStash||{},R=g("visible",!b.visibleDflt),L=M._template||{},z=M.type||L.type||"-",F;if(z==="date"){var N=x.getComponentMethod("calendars","handleDefaults");N(A,M,"calendar",b.calendar),b.noTicklabelmode||(F=g("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&g("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,M,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),b.noTicklabeloverflow||g("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(M,p),h(A,M,g,b),i(A,M,g,b),b.noHover||(z!=="category"&&g("hoverformat"),b.noUnifiedhovertitle||g("unifiedhovertitle.text"));var P=g("color"),U=P!==t.color.dflt?P:y.color,B=m.label||p._dfltTitle[u];if(n(A,M,g,z,b),!R)return M;g("title.text",B),S.coerceFont(g,"title.font",y,{overrideDflt:{size:S.bigFont(y.size),color:U}}),r(A,M,g,z);var X=b.hasMinor;if(X&&(E.newContainer(M,"minor"),r(A,M,g,z,{isMinor:!0})),a(A,M,g,z,b),o(A,M,g,b),X){var $=b.isMinor;b.isMinor=!0,o(A,M,g,b),b.isMinor=$}s(A,M,g,{dfltColor:P,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:X,attributes:t}),X&&!M.minor.ticks&&!M.minor.showgrid&&delete M.minor,(M.showline||M.ticks)&&g("mirror");var le=z==="multicategory";if(!b.noTickson&&(z==="category"||le)&&(M.ticks||M.showgrid)&&(le?(g("tickson","boundaries"),delete M.ticklabelposition):g("tickson")),le){var ce=g("showdividers");ce&&(g("dividercolor"),g("dividerwidth"))}if(z==="date")if(e(A,M,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!M.rangebreaks.length)delete M.rangebreaks;else{for(var de=0;de<M.rangebreaks.length;de++)if(M.rangebreaks[de].pattern===v){M._hasDayOfWeekBreaks=!0;break}if(f(M,p),p._has("scattergl")||p._has("splom"))for(var G=0;G<b.data.length;G++){var Y=b.data[G];(Y.type==="scattergl"||Y.type==="splom")&&(Y.visible=!1,S.warn(Y.type+" traces do not work on axes with rangebreaks. Setting trace "+Y.index+" to `visible: false`."))}}return M};function T(w,A,M){function g(F,N){return S.coerce(w,A,t.rangebreaks,F,N)}var b=g("enabled");if(b){var p=g("bounds");if(p&&p.length>=2){var u="",y,m;if(p.length===2){for(y=0;y<2;y++)if(m=_(p[y]),m){u=v;break}}var R=g("pattern",u);if(R===v)for(y=0;y<2;y++)m=_(p[y]),m&&(A.bounds[y]=p[y]=m-1);if(R)for(y=0;y<2;y++)switch(m=p[y],R){case v:if(!d(m)){A.enabled=!1;return}if(m=+m,m!==Math.floor(m)||m<0||m>=7){A.enabled=!1;return}A.bounds[y]=p[y]=m;break;case c:if(!d(m)){A.enabled=!1;return}if(m=+m,m<0||m>24){A.enabled=!1;return}A.bounds[y]=p[y]=m;break}if(M.autorange===!1){var L=M.range;if(L[0]<L[1]){if(p[0]<L[0]&&p[1]>L[1]){A.enabled=!1;return}}else if(p[0]>L[0]&&p[1]<L[1]){A.enabled=!1;return}}}else{var z=g("values");if(z&&z.length)g("dvalue");else{A.enabled=!1;return}}}}var l={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(w){if(typeof w=="string")return l[w.slice(0,3).toLowerCase()]}}}),R2=He({"src/plots/cartesian/position_defaults.js"(Z,V){"use strict";var d=as(),x=sa();V.exports=function(E,e,t,r){var o=r.counterAxes||[],a=r.overlayableAxes||[],n=r.letter,i=r.grid,s=r.overlayingDomain,h,f,v,c,T,l;i&&(f=i._domains[n][i._axisMap[e._id]],h=i._anchors[e._id],f&&(v=i[n+"side"].split(" ")[0],c=i.domain[n][v==="right"||v==="top"?1:0])),f=f||[0,1],h=h||(d(E.position)?"free":o[0]||"free"),v=v||(n==="x"?"bottom":"left"),c=c||0,T=0,l=!1;var _=x.coerce(E,e,{anchor:{valType:"enumerated",values:["free"].concat(o),dflt:h}},"anchor"),w=x.coerce(E,e,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(_==="free"){if(n==="y"){var A=t("autoshift");A&&(c=w==="left"?s[0]:s[1],l=e.automargin?e.automargin:!0,T=w==="left"?-3:3),t("shift",T)}t("position",c)}t("automargin",l);var M=!1;if(a.length&&(M=x.coerce(E,e,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!M){var g=t("domain",f);g[0]>g[1]-1/4096&&(e.domain=f),x.noneOrAll(E.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Kz=He({"src/plots/cartesian/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=$p().isUnifiedHover,E=x5(),e=zl(),t=$y(),r=Wh(),o=B5(),a=F_(),n=J0(),i=R2(),s=ef(),h=s.id2name,f=s.name2id,v=lh().AX_ID_PATTERN,c=lo(),T=c.traceIs,l=c.getComponentMethod;function _(w,A,M){Array.isArray(w[A])?w[A].push(M):w[A]=[M]}V.exports=function(A,M,g){var b=M.autotypenumbers,p={},u={},y={},m={},R={},L={},z={},F={},N={},O={},P,U;for(P=0;P<g.length;P++){var B=g[P];if(T(B,"cartesian")){var X;if(B.xaxis)X=h(B.xaxis),_(p,X,B);else if(B.xaxes)for(U=0;U<B.xaxes.length;U++)_(p,h(B.xaxes[U]),B);var $;if(B.yaxis)$=h(B.yaxis),_(p,$,B);else if(B.yaxes)for(U=0;U<B.yaxes.length;U++)_(p,h(B.yaxes[U]),B);if(B.type==="funnel"?B.orientation==="h"?(X&&(u[X]=!0),$&&(z[$]=!0)):$&&(y[$]=!0):B.type==="image"?($&&(F[$]=!0),X&&(F[X]=!0)):($&&(R[$]=!0,L[$]=!0),(!T(B,"carpet")||B.type==="carpet"&&!B._cheater)&&X&&(m[X]=!0)),B.type==="carpet"&&B._cheater&&X&&(u[X]=!0),T(B,"2dMap")&&(N[X]=!0,N[$]=!0),T(B,"oriented")){var le=B.orientation==="h"?$:X;O[le]=!0}}}var ce=M._subplots,de=ce.xaxis,G=ce.yaxis,Y=d.simpleMap(de,h),ee=d.simpleMap(G,h),q=Y.concat(ee),se=x.background;de.length&&G.length&&(se=d.coerce(A,M,t,"plot_bgcolor"));var ae=x.combine(se,M.paper_bgcolor),j,Q,re,pe,we;function Se(){var Ze=p[j]||[];we._traceIndices=Ze.map(function(st){return st.index}),we._annIndices=[],we._shapeIndices=[],we._selectionIndices=[],we._imgIndices=[],we._subplotsWith=[],we._counterAxes=[],we._name=we._attr=j,we._id=Q}function Ie(Ze,st){return d.coerce(pe,we,r,Ze,st)}function Re(Ze,st){return d.coerce2(pe,we,r,Ze,st)}function We(Ze){return Ze==="x"?G:de}function at(Ze,st){for(var ut=Ze==="x"?Y:ee,Ut=[],Ct=0;Ct<ut.length;Ct++){var Pt=ut[Ct];Pt!==st&&!(A[Pt]||{}).overlaying&&Ut.push(f(Pt))}return Ut}var nt={x:We("x"),y:We("y")},tt=nt.x.concat(nt.y),qe={},he=[];function ue(){var Ze=pe.matches;v.test(Ze)&&tt.indexOf(Ze)===-1&&(qe[Ze]=pe.type,he=Object.keys(qe))}var ne=E(A,M),Ce=S(ne);for(P=0;P<q.length;P++){j=q[P],Q=f(j),re=j.charAt(0),d.isPlainObject(A[j])||(A[j]={}),pe=A[j],we=e.newContainer(M,j,re+"axis"),Se();var Ye=re==="x"&&!m[j]&&u[j]||re==="y"&&!R[j]&&y[j],rt=re==="y"&&(!L[j]&&z[j]||F[j]),Ke={hasMinor:!0,letter:re,font:M.font,outerTicks:N[j],showGrid:!O[j],data:p[j]||[],bgColor:ae,calendar:M.calendar,automargin:!0,visibleDflt:Ye,reverseDflt:rt,autotypenumbersDflt:b,splomStash:((M._splomAxes||{})[re]||{})[Q],noAutotickangles:re==="y"};Ie("uirevision",M.uirevision),o(pe,we,Ie,Ke),a(pe,we,Ie,Ke,M);var Mt=Ce&&re===ne.charAt(0),kt=Re("spikecolor",Ce?we.color:void 0),Nt=Re("spikethickness",Ce?1.5:void 0),Gt=Re("spikedash",Ce?"dot":void 0),Mr=Re("spikemode",Ce?"across":void 0),mr=Re("spikesnap"),qr=Ie("showspikes",!!Mt||!!kt||!!Nt||!!Gt||!!Mr||!!mr);qr||(delete we.spikecolor,delete we.spikethickness,delete we.spikedash,delete we.spikemode,delete we.spikesnap);var Er=h(pe.overlaying),Ir=[0,1];if(M[Er]!==void 0){var _t=h(M[Er].anchor);M[_t]!==void 0&&(Ir=M[_t].domain)}i(pe,we,Ie,{letter:re,counterAxes:nt[re],overlayableAxes:at(re,j),grid:M.grid,overlayingDomain:Ir}),Ie("title.standoff"),ue(),we._input=pe}for(P=0;P<he.length;){Q=he[P++],j=h(Q),re=j.charAt(0),d.isPlainObject(A[j])||(A[j]={}),pe=A[j],we=e.newContainer(M,j,re+"axis"),Se();var Oe={letter:re,font:M.font,outerTicks:N[j],showGrid:!O[j],data:[],bgColor:ae,calendar:M.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:b,splomStash:((M._splomAxes||{})[re]||{})[Q]};Ie("uirevision",M.uirevision),we.type=qe[Q]||"linear",a(pe,we,Ie,Oe,M),i(pe,we,Ie,{letter:re,counterAxes:nt[re],overlayableAxes:at(re,j),grid:M.grid}),Ie("fixedrange"),Ie("modebardisable"),ue(),we._input=pe}var Je=l("rangeslider","handleDefaults"),Ae=l("rangeselector","handleDefaults");for(P=0;P<Y.length;P++)j=Y[P],pe=A[j],we=M[j],Je(A,M,j),we.type==="date"&&Ae(pe,we,M,ee,we.calendar),Ie("fixedrange"),Ie("modebardisable");for(P=0;P<ee.length;P++){j=ee[P],pe=A[j],we=M[j];var Le=M[h(we.anchor)],Ue=l("rangeslider","isVisible")(Le);Ie("fixedrange",Ue),Ie("modebardisable")}n.handleDefaults(A,M,{axIds:tt.concat(he).sort(s.idSort),axHasImage:F})}}}),Jz=He({"src/plots/cartesian/transition_axes.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=sa(),E=es(),e=Ho();V.exports=function(r,o,a,n){var i=r._fullLayout;if(o.length===0){e.redrawComponents(r);return}function s(M){var g=M.xaxis,b=M.yaxis;i._defs.select("#"+M.clipId+"> rect").call(E.setTranslate,0,0).call(E.setScale,1,1),M.plot.call(E.setTranslate,g._offset,b._offset).call(E.setScale,1,1);var p=M.plot.selectAll(".scatterlayer .trace");p.selectAll(".point").call(E.setPointGroupScale,1,1),p.selectAll(".textpoint").call(E.setTextPointsScale,1,1),p.call(E.hideOutsideRangePoints,M)}function h(M,g){var b=M.plotinfo,p=b.xaxis,u=b.yaxis,y=p._length,m=u._length,R=!!M.xr1,L=!!M.yr1,z=[];if(R){var F=S.simpleMap(M.xr0,p.r2l),N=S.simpleMap(M.xr1,p.r2l),O=F[1]-F[0],P=N[1]-N[0];z[0]=(F[0]*(1-g)+g*N[0]-F[0])/(F[1]-F[0])*y,z[2]=y*(1-g+g*P/O),p.range[0]=p.l2r(F[0]*(1-g)+g*N[0]),p.range[1]=p.l2r(F[1]*(1-g)+g*N[1])}else z[0]=0,z[2]=y;if(L){var U=S.simpleMap(M.yr0,u.r2l),B=S.simpleMap(M.yr1,u.r2l),X=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-g)+g*B[1]-U[1])/(U[0]-U[1])*m,z[3]=m*(1-g+g*$/X),u.range[0]=p.l2r(U[0]*(1-g)+g*B[0]),u.range[1]=u.l2r(U[1]*(1-g)+g*B[1])}else z[1]=0,z[3]=m;e.drawOne(r,p,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[p._id,u._id]);var le=R?y/z[2]:1,ce=L?m/z[3]:1,de=R?z[0]:0,G=L?z[1]:0,Y=R?z[0]/z[2]*y:0,ee=L?z[1]/z[3]*m:0,q=p._offset-Y,se=u._offset-ee;b.clipRect.call(E.setTranslate,de,G).call(E.setScale,1/le,1/ce),b.plot.call(E.setTranslate,q,se).call(E.setScale,le,ce),E.setPointGroupScale(b.zoomScalePts,1/le,1/ce),E.setTextPointsScale(b.zoomScaleTxt,1/le,1/ce)}var f;n&&(f=n());function v(){for(var M={},g=0;g<o.length;g++){var b=o[g],p=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr1&&(M[p._name+".range"]=b.xr1.slice()),b.yr1&&(M[u._name+".range"]=b.yr1.slice())}return f&&f(),x.call("relayout",r,M).then(function(){for(var y=0;y<o.length;y++)s(o[y].plotinfo)})}function c(){for(var M={},g=0;g<o.length;g++){var b=o[g],p=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr0&&(M[p._name+".range"]=b.xr0.slice()),b.yr0&&(M[u._name+".range"]=b.yr0.slice())}return x.call("relayout",r,M).then(function(){for(var y=0;y<o.length;y++)s(o[y].plotinfo)})}var T,l,_,w=d.ease(a.easing);r._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,c()});function A(){l=Date.now();for(var M=Math.min(1,(l-T)/a.duration),g=w(M),b=0;b<o.length;b++)h(o[b],g);l-T>a.duration?(v(),_=window.cancelAnimationFrame(A)):_=window.requestAnimationFrame(A)}return T=Date.now(),_=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var V=Wn(),d=lo(),x=sa(),S=bc(),E=es(),e=Hh().getModuleCalcData,t=ef(),r=lh(),o=vd(),a=x.ensureSingle;function n(T,l,_){return x.ensureSingle(T,l,_,function(w){w.datum(_)})}var i=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Yz(),Z.layoutAttributes=Wh(),Z.supplyLayoutDefaults=Kz(),Z.transitionAxes=Jz(),Z.finalizeSubplots=function(T,l){var _=l._subplots,w=_.xaxis,A=_.yaxis,M=_.cartesian,g=M,b={},p={},u,y,m;for(u=0;u<g.length;u++){var R=g[u].split("y");b[R[0]]=1,p["y"+R[1]]=1}for(u=0;u<w.length;u++)y=w[u],b[y]||(m=(T[t.id2name(y)]||{}).anchor,r.idRegex.y.test(m)||(m="y"),M.push(y+m),g.push(y+m),p[m]||(p[m]=1,x.pushUnique(A,m)));for(u=0;u<A.length;u++)m=A[u],p[m]||(y=(T[t.id2name(m)]||{}).anchor,r.idRegex.x.test(y)||(y="x"),M.push(y+m),g.push(y+m),b[y]||(b[y]=1,x.pushUnique(w,y)));if(!g.length){y="",m="";for(var L in T)if(r.attrRegex.test(L)){var z=L.charAt(0);z==="x"?(!y||+L.slice(5)<+y.slice(5))&&(y=L):(!m||+L.slice(5)<+m.slice(5))&&(m=L)}y=y?t.name2id(y):"x",m=m?t.name2id(m):"y",w.push(y),A.push(m),M.push(y+m)}},Z.plot=function(T,l,_,w){var A=T._fullLayout,M=A._subplots.cartesian,g=T.calcdata,b;if(!Array.isArray(l))for(l=[],b=0;b<g.length;b++)l.push(b);for(var p=A._zindices,u=0;u<p.length;u++){var y=p[u];for(b=0;b<M.length;b++){var m=M[b],R=A._plots[m];if(u>0){var L=R.id;if(L.indexOf(i)!==-1)continue;L+=i+(u+1),R=x.extendFlat({},R,{id:L,plot:A._cartesianlayer.selectAll(".subplot").select("."+L)})}for(var z=[],F,N=0;N<g.length;N++){var O=g[N],P=O[0].trace;y===(P.zorder||0)&&P.xaxis+P.yaxis===m&&((l.indexOf(P.index)!==-1||P.carpet)&&(F&&F[0].trace.xaxis+F[0].trace.yaxis===m&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&z.indexOf(F)===-1&&z.push(F),z.push(O)),F=O)}s(T,R,z,_,w)}}};function s(T,l,_,w,A){for(var M=r.traceLayerClasses,g=T._fullLayout,b=g._zindices,p=g._modules,u,y,m,R=[],L=[],z=0;z<b.length;z++)for(var F=b[z],N=0;N<p.length;N++){u=p[N];var O=u.name,P=d.modules[O].categories;if(P.svg){var U=u.layerName||O+"layer",B=U+(z?Number(z)+1:""),X=u.plot;y=e(_,X,F),m=y[0],_=y[1],m.length&&R.push({i:M.indexOf(U),zindex:z,className:B,plotMethod:X,cdModule:m}),P.zoomScale&&L.push("."+B)}}R.sort(function(ce,de){return(ce.zindex||0)-(de.zindex||0)||ce.i-de.i});var $=l.plot.selectAll("g.mlayer").data(R,function(ce){return ce.className});if($.enter().append("g").attr("class",function(ce){return ce.className}).classed("mlayer",!0).classed("rangeplot",l.isRangePlot),$.exit().remove(),$.order(),$.each(function(ce){var de=V.select(this),G=ce.className;ce.plotMethod(T,l,ce.cdModule,de,w,A),r.clipOnAxisFalseQuery.indexOf("."+G)===-1&&E.setClipUrl(de,l.layerClipId,T)}),g._has("scattergl")&&(u=d.getModule("scattergl"),m=e(_,u)[0],u.plot(T,l,m)),!T._context.staticPlot&&(l._hasClipOnAxisFalse&&(l.clipOnAxisFalseTraces=l.plot.selectAll(r.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),L.length)){var le=l.plot.selectAll(L.join(",")).selectAll(".trace");l.zoomScalePts=le.selectAll("path.point"),l.zoomScaleTxt=le.selectAll(".textpoint")}}Z.clean=function(T,l,_,w){var A=w._plots||{},M=l._plots||{},g=w._subplots||{},b,p,u;if(w._hasOnlyLargeSploms&&!l._hasOnlyLargeSploms)for(u in A)b=A[u],b.plotgroup&&b.plotgroup.remove();var y=w._has&&w._has("gl"),m=l._has&&l._has("gl");if(y&&!m)for(u in A)b=A[u],b._scene&&b._scene.destroy();if(g.xaxis&&g.yaxis){var R=t.listIds({_fullLayout:w});for(p=0;p<R.length;p++){var L=R[p];l[t.id2name(L)]||w._infolayer.selectAll(".g-"+L+"title").remove()}}var z=w._has&&w._has("cartesian"),F=l._has&&l._has("cartesian");if(z&&!F)v(w._cartesianlayer.selectAll(".subplot"),w),w._defs.selectAll(".axesclip").remove(),delete w._axisConstraintGroups,delete w._axisMatchGroups;else if(g.cartesian)for(p=0;p<g.cartesian.length;p++){var N=g.cartesian[p];if(N.indexOf(i)===-1&&!M[N]){var O="."+N+",."+N+"-x,."+N+"-y";w._cartesianlayer.selectAll(O).remove(),c(N,w)}}},Z.drawFramework=function(T){var l=T._fullLayout,_=T.calcdata,w,A={};for(w=0;w<_.length;w++){var M=_[w][0],g=M.trace,b=g.zorder||0;A[b]||(A[b]=[]),A[b].push(M)}var p=Object.keys(A).map(Number).sort(x.sorterAsc);p.length||(p=[0]),l._zindices=p;var u=h(T),y=u.length,m=[];for(w=0;w<y;w++)m[w]=u[w].slice();for(var R=1;R<p.length;R++){var L=[];for(w=0;w<y;w++)L[w]=u[w].slice(),L[w][0]+=i+(R+1);m=m.concat(L)}var z=l._cartesianlayer.selectAll(".subplot").data(m,String);z.enter().append("g").attr("class",function(F){return"subplot "+F[0]}),z.order(),z.exit().call(v,l),z.each(function(F){var N=F[0],O=N.indexOf(i),P=O!==-1,U=P?N.slice(0,O):N,B=l._plots[N];B||(B=x.extendFlat({},l._plots[U]),B&&(B.id=N,l._plots[N]=B,l._subplots.cartesian.push(N))),B&&(B.plotgroup=V.select(this),f(T,B),P||(B.draglayer=a(l._draggers,"g",N)))})},Z.rangePlot=function(T,l,_){f(T,l),s(T,l,_),S.style(T)};function h(T){var l=T._fullLayout,_=l._zindices.length,w=l._subplots.cartesian,A=w.length,M,g,b,p,u,y,m=[],R=[];for(M=0;M<A;M++){b=w[M],p=l._plots[b],u=p.xaxis,y=p.yaxis;var L=u._mainAxis,z=y._mainAxis,F=L._id+z._id,N=l._plots[F];p.overlays=[],F!==b&&N?(p.mainplot=F,p.mainplotinfo=N,R.push(b)):(p.mainplot=void 0,p.mainplotinfo=void 0,m.push(b))}for(M=0;M<R.length;M++)b=R[M],p=l._plots[b],p.mainplotinfo.overlays.push(p);var O=m.concat(R),P=[];for(M=0;M<A;M++){b=O[M],p=l._plots[b],u=p.xaxis,y=p.yaxis;for(var U=[],B=1;B<=_;B++){var X="";for(B>1&&(X+=i+B),U.push(b+X),g=0;g<p.overlays.length;g++)U.push(p.overlays[g].id+X)}U=U.concat([u.layer,y.layer,u.overlaying||"",y.overlaying||""]),P.push(U)}return P}function f(T,l){var _=T._fullLayout,w=l.plotgroup,A=l.id,M=A.indexOf(i),g=M!==-1,b=r.layerValue2layerClass[l.xaxis.layer],p=r.layerValue2layerClass[l.yaxis.layer],u=_._hasOnlyLargeSploms,y=_._zindices.length>1,m=l.mainplotinfo;if(!l.mainplot||y)if(u)l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.xaxislayer=a(w,"g","xaxislayer-above"),l.yaxislayer=a(w,"g","yaxislayer-above");else{if(!g){var R=a(w,"g","layer-subplot");l.shapelayer=a(R,"g","shapelayer"),l.imagelayer=a(R,"g","imagelayer"),m&&y?(l.minorGridlayer=m.minorGridlayer,l.gridlayer=m.gridlayer,l.zerolinelayer=m.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var L=a(w,"g","layer-between");l.shapelayerBetween=a(L,"g","shapelayer"),l.imagelayerBetween=a(L,"g","imagelayer"),a(w,"path","xlines-below"),a(w,"path","ylines-below"),l.overlinesBelow=a(w,"g","overlines-below"),a(w,"g","xaxislayer-below"),a(w,"g","yaxislayer-below"),l.overaxesBelow=a(w,"g","overaxes-below")}l.overplot=a(w,"g","overplot"),l.plot=a(l.overplot,"g",A),m&&y?l.zerolinelayerAbove=m.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),g||(l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.overlinesAbove=a(w,"g","overlines-above"),a(w,"g","xaxislayer-above"),a(w,"g","yaxislayer-above"),l.overaxesAbove=a(w,"g","overaxes-above"),l.xlines=w.select(".xlines-"+b),l.ylines=w.select(".ylines-"+p),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+p))}else{var z=m.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=m.minorGridlayer,l.gridlayer=m.gridlayer,l.zerolinelayer=m.zerolinelayer,l.zerolinelayerAbove=m.zerolinelayerAbove,a(m.overlinesBelow,"path",F),a(m.overlinesBelow,"path",N),a(m.overaxesBelow,"g",F),a(m.overaxesBelow,"g",N),l.plot=a(m.overplot,"g",A),a(m.overlinesAbove,"path",F),a(m.overlinesAbove,"path",N),a(m.overaxesAbove,"g",F),a(m.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+p).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+p).select("."+N)}g||(u||(n(l.minorGridlayer,"g",l.xaxis._id),n(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),n(l.gridlayer,"g",l.xaxis._id),n(l.gridlayer,"g",l.yaxis._id),l.gridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort)),l.xlines.style("fill","none").classed("crisp",!0),l.ylines.style("fill","none").classed("crisp",!0))}function v(T,l){if(T){var _={};T.each(function(p){var u=p[0],y=V.select(this);y.remove(),c(u,l),_[u]=!0});for(var w in l._plots)for(var A=l._plots[w],M=A.overlays||[],g=0;g<M.length;g++){var b=M[g];_[b.id]&&b.plot.selectAll(".trace").remove()}}}function c(T,l){l._draggers.selectAll("g."+T).remove(),l._defs.select("#clip"+l._uid+T+"plot").remove()}Z.toSVG=function(T){var l=T._fullLayout._glimages,_=V.select(T).selectAll(".svg-container"),w=_.filter(function(M,g){return g===_.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function A(){var M=this,g=M.toDataURL("image/png"),b=l.append("svg:image");b.attr({xmlns:o.svg,"xlink:href":g,preserveAspectRatio:"none",x:0,y:0,width:M.style.width,height:M.style.height})}w.each(A)},Z.updateFx=I5().updateFx}}),$z=He({"src/traces/scatter/index.js"(Z,V){"use strict";var d=Fu();V.exports={hasLines:d.hasLines,hasMarkers:d.hasMarkers,hasText:d.hasText,isBubble:d.isBubble,attributes:af(),layoutAttributes:_2(),supplyDefaults:Hz(),crossTraceDefaults:z5(),supplyLayoutDefaults:Wz(),calc:Bd().calc,crossTraceCalc:Zz(),arraysToCalcdata:Av(),plot:s1(),colorbar:pp(),formatLabels:P2(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:u1(),selectPoints:c1(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Kf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}}),Qz=He({"src/components/annotations/draw_arrow_head.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=C5(),E=sa(),e=E.strScale,t=E.strRotate,r=E.strTranslate;V.exports=function(a,n,i){var s=a.node(),h=S[i.arrowhead||0],f=S[i.startarrowhead||0],v=(i.arrowwidth||1)*(i.arrowsize||1),c=(i.arrowwidth||1)*(i.startarrowsize||1),T=n.indexOf("start")>=0,l=n.indexOf("end")>=0,_=h.backoff*v+i.standoff,w=f.backoff*c+i.startstandoff,A,M,g,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},M={x:+a.attr("x2"),y:+a.attr("y2")};var p=A.x-M.x,u=A.y-M.y;if(g=Math.atan2(u,p),b=g+Math.PI,_&&w&&_+w>Math.sqrt(p*p+u*u)){X();return}if(_){if(_*_>p*p+u*u){X();return}var y=_*Math.cos(g),m=_*Math.sin(g);M.x+=y,M.y+=m,a.attr({x2:M.x,y2:M.y})}if(w){if(w*w>p*p+u*u){X();return}var R=w*Math.cos(g),L=w*Math.sin(g);A.x-=R,A.y-=L,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z<_+w){X();return}var N=s.getPointAtLength(0),O=s.getPointAtLength(.1);g=Math.atan2(N.y-O.y,N.x-O.x),A=s.getPointAtLength(Math.min(w,z)),F="0px,"+w+"px,";var P=s.getPointAtLength(z),U=s.getPointAtLength(z-.1);b=Math.atan2(P.y-U.y,P.x-U.x),M=s.getPointAtLength(Math.max(0,z-_));var B=F?w+_:_;F+=z-B+"px,"+z+"px",a.style("stroke-dasharray",F)}function X(){a.style("stroke-dasharray","0px,100px")}function $(le,ce,de,G){le.path&&(le.noRotate&&(de=0),d.select(s.parentNode).append("path").attr({class:a.attr("class"),d:le.path,transform:r(ce.x,ce.y)+t(de*180/Math.PI)+e(G)}).style({fill:x.rgb(i.arrowcolor),"stroke-width":0}))}T&&$(f,A,g,c),l&&$(h,M,b,v)}}}),D2=He({"src/components/annotations/draw.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=bc(),E=sa(),e=E.strTranslate,t=Ho(),r=Jn(),o=es(),a=rf(),n=ou(),i=Kd(),s=Ap(),h=zl().arrayEditor,f=Qz();V.exports={draw:v,drawOne:c,drawRaw:l};function v(_){var w=_._fullLayout;w._infolayer.selectAll(".annotation").remove();for(var A=0;A<w.annotations.length;A++)w.annotations[A].visible&&c(_,A);return S.previousPromises(_)}function c(_,w){var A=_._fullLayout,M=A.annotations[w]||{},g=t.getFromId(_,M.xref),b=t.getFromId(_,M.yref);g&&g.setScale(),b&&b.setScale(),l(_,M,w,!1,g,b)}function T(_,w,A,M,g){var b=g[A],p=g[A+"ref"],u=A.indexOf("y")!==-1,y=t.getRefType(p)==="domain",m=u?M.h:M.w;return _?y?b+(u?-w:w)/_._length:_.p2r(_.r2p(b)+w):b+(u?-w:w)/m}function l(_,w,A,M,g,b){var p=_._fullLayout,u=_._fullLayout._size,y=_._context.edits,m,R;M?(m="annotation-"+M,R=M+".annotations"):(m="annotation",R="annotations");var L=h(_.layout,R,w),z=L.modifyBase,F=L.modifyItem,N=L.getUpdateObj;p._infolayer.selectAll("."+m+'[data-index="'+A+'"]').remove();var O="clip"+p._uid+"_ann"+A;if(!w._input||w.visible===!1){d.selectAll("#"+O).remove();return}var P={x:{},y:{}},U=+w.textangle||0,B=p._infolayer.append("g").classed(m,!0).attr("data-index",String(A)).style("opacity",w.opacity),X=B.append("g").classed("annotation-text-g",!0),$=y[w.showarrow?"annotationTail":"annotationPosition"],le=w.captureevents||y.annotationText||$;function ce(Se){var Ie={index:A,annotation:w._input,fullAnnotation:w,event:Se};return M&&(Ie.subplotId=M),Ie}var de=X.append("g").style("pointer-events",le?"all":null).call(i,"pointer").on("click",function(){_._dragging=!1,_.emit("plotly_clickannotation",ce(d.event))});w.hovertext&&de.on("mouseover",function(){var Se=w.hoverlabel,Ie=Se.font,Re=this.getBoundingClientRect(),We=_.getBoundingClientRect();a.loneHover({x0:Re.left-We.left,x1:Re.right-We.left,y:(Re.top+Re.bottom)/2-We.top,text:w.hovertext,color:Se.bgcolor,borderColor:Se.bordercolor,fontFamily:Ie.family,fontSize:Ie.size,fontColor:Ie.color,fontWeight:Ie.weight,fontStyle:Ie.style,fontVariant:Ie.variant,fontShadow:Ie.fontShadow,fontLineposition:Ie.fontLineposition,fontTextcase:Ie.fontTextcase},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:_})}).on("mouseout",function(){a.loneUnhover(p._hoverlayer.node())});var G=w.borderwidth,Y=w.borderpad,ee=G+Y,q=de.append("rect").attr("class","bg").style("stroke-width",G+"px").call(r.stroke,w.bordercolor).call(r.fill,w.bgcolor),se=w.width||w.height,ae=p._topclips.selectAll("#"+O).data(se?[0]:[]);ae.enter().append("clipPath").classed("annclip",!0).attr("id",O).append("rect"),ae.exit().remove();var j=w.font,Q=p._meta?E.templateString(w.text,p._meta):w.text,re=de.append("text").classed("annotation-text",!0).text(Q);function pe(Se){return Se.call(o.font,j).attr({"text-anchor":{left:"start",right:"end"}[w.align]||"middle"}),n.convertToTspans(Se,_,we),Se}function we(){var Se=re.selectAll("a");if(Se.size()===1&&Se.text()===re.text()){var Ie=de.insert("a",":first-child").attr({"xlink:xlink:href":Se.attr("xlink:href"),"xlink:xlink:show":Se.attr("xlink:show")}).style({cursor:"pointer"});Ie.node().appendChild(q.node())}var Re=de.select(".annotation-text-math-group"),We=!Re.empty(),at=o.bBox((We?Re:re).node()),nt=at.width,tt=at.height,qe=w.width||nt,he=w.height||tt,ue=Math.round(qe+2*ee),ne=Math.round(he+2*ee);function Ce(Wa,Ca){return Ca==="auto"&&(Wa<1/3?Ca="left":Wa>2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ye=!1,rt=["x","y"],Ke=0;Ke<rt.length;Ke++){var Mt=rt[Ke],kt=w[Mt+"ref"]||Mt,Nt=w["a"+Mt+"ref"],Gt={x:g,y:b}[Mt],Mr=(U+(Mt==="x"?0:-90))*Math.PI/180,mr=ue*Math.cos(Mr),qr=ne*Math.sin(Mr),Er=Math.abs(mr)+Math.abs(qr),Ir=w[Mt+"anchor"],_t=w[Mt+"shift"]*(Mt==="x"?1:-1),Oe=P[Mt],Je,Ae,Le,Ue,Ze,st=t.getRefType(kt);if(Gt&&st!=="domain"){var ut=Gt.r2fraction(w[Mt]);(ut<0||ut>1)&&(Nt===kt?(ut=Gt.r2fraction(w["a"+Mt]),(ut<0||ut>1)&&(Ye=!0)):Ye=!0),Je=Gt._offset+Gt.r2p(w[Mt]),Ue=.5}else{var Ut=st==="domain";Mt==="x"?(Le=w[Mt],Je=Ut?Gt._offset+Gt._length*Le:Je=u.l+u.w*Le):(Le=1-w[Mt],Je=Ut?Gt._offset+Gt._length*Le:Je=u.t+u.h*Le),Ue=w.showarrow?.5:Le}if(w.showarrow){Oe.head=Je;var Ct=w["a"+Mt];if(Ze=mr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Nt===kt){var Pt=t.getRefType(Nt);Pt==="domain"?(Mt==="y"&&(Ct=1-Ct),Oe.tail=Gt._offset+Gt._length*Ct):Pt==="paper"?Mt==="y"?(Ct=1-Ct,Oe.tail=u.t+u.h*Ct):Oe.tail=u.l+u.w*Ct:Oe.tail=Gt._offset+Gt.r2p(Ct),Ae=Ze}else Oe.tail=Je+Ct,Ae=Ze+Ct;Oe.text=Oe.tail+Ze;var jt=p[Mt==="x"?"width":"height"];if(kt==="paper"&&(Oe.head=E.constrain(Oe.head,1,jt-1)),Nt==="pixel"){var fr=-Math.max(Oe.tail-3,Oe.text),ur=Math.min(Oe.tail+3,Oe.text)-jt;fr>0?(Oe.tail+=fr,Oe.text+=fr):ur>0&&(Oe.tail-=ur,Oe.text-=ur)}Oe.tail+=_t,Oe.head+=_t}else Ze=Er*Ce(Ue,Ir),Ae=Ze,Oe.text=Je+Ze;Oe.text+=_t,Ze+=_t,Ae+=_t,w["_"+Mt+"padplus"]=Er/2+Ae,w["_"+Mt+"padminus"]=Er/2-Ae,w["_"+Mt+"size"]=Er,w["_"+Mt+"shift"]=Ze}if(Ye){de.remove();return}var sr=0,Pr=0;if(w.align!=="left"&&(sr=(qe-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),We)Re.select("svg").attr({x:ee+sr-1,y:ee+Pr}).call(o.setClipUrl,se?O:null,_);else{var Ta=ee+Pr-at.top,Oa=ee+sr-at.left;re.call(n.positionText,Oa,Ta).call(o.setClipUrl,se?O:null,_)}ae.select("rect").call(o.setRect,ee,ee,qe,he),q.call(o.setRect,G/2,G/2,ue-G,ne-G),de.call(o.setTranslate,Math.round(P.x.text-ue/2),Math.round(P.y.text-ne/2)),X.attr({transform:"rotate("+U+","+P.x.text+","+P.y.text+")"});var Ia=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=P.x.head,wi=P.y.head,Kt=P.x.tail+Wa,Dt=P.y.tail+Ca,Yt=P.x.text+Wa,Jt=P.y.text+Ca,Fr=E.rotationXYMatrix(U,Yt,Jt),ta=E.apply2DTransform(Fr),ra=E.apply2DTransform2(Fr),ca=+q.attr("width"),Ba=+q.attr("height"),$a=Yt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ra=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ra.reduce(function(gt,Xt){return gt^!!E.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Xt[0],Xt[1],Xt[2],Xt[3])},!1)){Ra.forEach(function(gt){var Xt=E.segmentsIntersect(Kt,Dt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Xt&&(Kt=Xt.x,Dt=Xt.y)});var an=w.arrowwidth,tn=w.arrowcolor,fn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),lt=xt.append("path").attr("d","M"+Kt+","+Dt+"L"+hi+","+wi).style("stroke-width",an+"px").call(r.stroke,r.rgb(tn));if(f(lt,fn,w),y.annotationPosition&&lt.node().parentNode&&!M){var Br=hi,Cr=wi;if(w.standoff){var xr=Math.sqrt(Math.pow(hi-Kt,2)+Math.pow(wi-Dt,2));Br+=w.standoff*(Kt-hi)/xr,Cr+=w.standoff*(Dt-wi)/xr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-Br)+","+(Dt-Cr),transform:e(Br,Cr)}).style("stroke-width",an+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Ur,Hr;s.init({element:Rr.node(),gd:_,prepFn:function(){var gt=o.getTranslate(de);Ur=gt.x,Hr=gt.y,g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Xt){var vr=ta(Ur,Hr),Or=vr[0]+gt,ba=vr[1]+Xt;de.call(o.setTranslate,Or,ba),F("x",T(g,gt,"x",u,w)),F("y",T(b,Xt,"y",u,w)),w.axref===w.xref&&F("ax",T(g,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Xt,"ay",u,w)),xt.attr("transform",e(gt,Xt)),X.attr({transform:"rotate("+U+","+Or+","+ba+")"})},doneFn:function(){x.call("_guiRelayout",_,N());var gt=document.querySelector(".js-notes-box-panel");gt&&gt.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ia(0,0),$){var qa;s.init({element:de.node(),gd:_,prepFn:function(){qa=X.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(g,Wa,"ax",u,w)):F("ax",w.ax+Wa),w.ayref===w.yref?F("ay",T(b,Ca,"ay",u.w,w)):F("ay",w.ay+Ca),Ia(Wa,Ca);else{if(M)return;var wi,Kt;if(g)wi=T(g,Wa,"x",u,w);else{var Dt=w._xsize/u.w,Yt=w.x+(w._xshift-w.xshift)/u.w-Dt/2;wi=s.align(Yt+Wa/u.w,Dt,0,1,w.xanchor)}if(b)Kt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Kt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Kt),(!g||!b)&&(hi=s.getCursor(g?.5:wi,b?.5:Kt,w.xanchor,w.yanchor))}X.attr({transform:e(Wa,Ca)+qa}),i(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&_.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){i(de),x.call("_guiRelayout",_,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}y.annotationText?re.call(n.makeEditable,{delegate:de,gd:_}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),x.call("_guiRelayout",_,N())}):re.call(pe)}}}),e9=He({"src/components/annotations/click.js"(Z,V){"use strict";var d=sa(),x=lo(),S=zl().arrayEditor;V.exports={hasClickToShow:E,onClick:e};function E(o,a){var n=t(o,a);return n.on.length>0||n.explicitOff.length>0}function e(o,a){var n=t(o,a),i=n.on,s=n.off.concat(n.explicitOff),h={},f=o._fullLayout.annotations,v,c;if(i.length||s.length){for(v=0;v<i.length;v++)c=S(o.layout,"annotations",f[i[v]]),c.modifyItem("visible",!0),d.extendFlat(h,c.getUpdateObj());for(v=0;v<s.length;v++)c=S(o.layout,"annotations",f[s[v]]),c.modifyItem("visible",!1),d.extendFlat(h,c.getUpdateObj());return x.call("update",o,{},h)}}function t(o,a){var n=o._fullLayout.annotations,i=[],s=[],h=[],f=(a||[]).length,v,c,T,l,_,w,A,M;for(v=0;v<n.length;v++)if(T=n[v],l=T.clicktoshow,l){for(c=0;c<f;c++)if(_=a[c],w=_.xaxis,A=_.yaxis,w._id===T.xref&&A._id===T.yref&&w.d2r(_.x)===r(T._xclick,w)&&A.d2r(_.y)===r(T._yclick,A)){T.visible?l==="onout"?M=s:M=h:M=i,M.push(v);break}c===f&&T.visible&&l==="onout"&&s.push(v)}return{on:i,off:s,explicitOff:h}}function r(o,a){return a.type==="log"?a.l2r(o):a.d2r(o)}}}),N5=He({"src/components/annotations/common_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn();V.exports=function(E,e,t,r){r("opacity");var o=r("bgcolor"),a=r("bordercolor"),n=x.opacity(a);r("borderpad");var i=r("borderwidth"),s=r("showarrow");r("text",s?" ":t._dfltTitle.annotation),r("textangle"),d.coerceFont(r,"font",t.font),r("width"),r("align");var h=r("height");if(h&&r("valign"),s){var f=r("arrowside"),v,c;f.indexOf("end")!==-1&&(v=r("arrowhead"),c=r("arrowsize")),f.indexOf("start")!==-1&&(r("startarrowhead",v),r("startarrowsize",c)),r("arrowcolor",n?e.bordercolor:x.defaultLine),r("arrowwidth",(n&&i||1)*2),r("standoff"),r("startstandoff")}var T=r("hovertext"),l=t.hoverlabel||{};if(T){var _=r("hoverlabel.bgcolor",l.bgcolor||(x.opacity(o)?x.rgb(o):x.defaultLine)),w=r("hoverlabel.bordercolor",l.bordercolor||x.contrast(_)),A=d.extendFlat({},l.font);A.color||(A.color=w),d.coerceFont(r,"hoverlabel.font",A)}r("captureevents",!!T)}}}),t9=He({"src/components/annotations/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=N5(),e=$0();V.exports=function(o,a){S(o,a,{name:"annotations",handleItemDefaults:t})};function t(r,o,a){function n(u,y){return d.coerce(r,o,e,u,y)}var i=n("visible"),s=n("clicktoshow");if(i||s){E(r,o,a,n);for(var h=o.showarrow,f=["x","y"],v=[-10,-30],c={_fullLayout:a},T=0;T<2;T++){var l=f[T],_=x.coerceRef(r,o,c,l,"","paper");if(_!=="paper"){var w=x.getFromId(c,_);w._annIndices.push(o._index)}if(x.coercePosition(o,c,n,_,l,.5),h){var A="a"+l,M=x.coerceRef(r,o,c,A,"pixel",["pixel","paper"]);M!=="pixel"&&M!==_&&(M=o[A]="pixel");var g=M==="pixel"?v[T]:.4;x.coercePosition(o,c,n,M,A,g)}n(l+"anchor"),n(l+"shift")}if(d.noneOrAll(r,o,["x","y"]),h&&d.noneOrAll(r,o,["ax","ay"]),s){var b=n("xclick"),p=n("yclick");o._xclick=b===void 0?o.x:x.cleanPosition(b,c,o.xref),o._yclick=p===void 0?o.y:x.cleanPosition(p,c,o.yref)}}}}}),r9=He({"src/components/annotations/calc_autorange.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=D2().draw;V.exports=function(r){var o=r._fullLayout,a=d.filterVisible(o.annotations);if(a.length&&r._fullData.length)return d.syncOrAsync([S,E],r)};function E(t){var r=t._fullLayout;d.filterVisible(r.annotations).forEach(function(o){var a=x.getFromId(t,o.xref),n=x.getFromId(t,o.yref),i=x.getRefType(o.xref),s=x.getRefType(o.yref);o._extremes={},i==="range"&&e(o,a),s==="range"&&e(o,n)})}function e(t,r){var o=r._id,a=o.charAt(0),n=t[a],i=t["a"+a],s=t[a+"ref"],h=t["a"+a+"ref"],f=t["_"+a+"padplus"],v=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],T=3*t.arrowsize*t.arrowwidth||0,l=T+c,_=T-c,w=3*t.startarrowsize*t.arrowwidth||0,A=w+c,M=w-c,g;if(h===s){var b=x.findExtremes(r,[r.r2c(n)],{ppadplus:l,ppadminus:_}),p=x.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(f,A),ppadminus:Math.max(v,M)});g={min:[b.min[0],p.min[0]],max:[b.max[0],p.max[0]]}}else A=i?A+i:A,M=i?M-i:M,g=x.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(f,l,A),ppadminus:Math.max(v,_,M)});t._extremes[o]=g}}}),a9=He({"src/components/annotations/convert_coords.js"(Z,V){"use strict";var d=as(),x=h2();V.exports=function(E,e,t,r){e=e||{};var o=t==="log"&&e.type==="linear",a=t==="linear"&&e.type==="log";if(!(o||a))return;var n=E._fullLayout.annotations,i=e._id.charAt(0),s,h;function f(c){var T=s[c],l=null;o?l=x(T,e.range):l=Math.pow(10,T),d(l)||(l=null),r(h+c,l)}for(var v=0;v<n.length;v++)s=n[v],h="annotations["+v+"].",s[i+"ref"]===e._id&&f(i),s["a"+i+"ref"]===e._id&&f("a"+i)}}}),i9=He({"src/components/annotations/index.js"(Z,V){"use strict";var d=D2(),x=e9();V.exports={moduleType:"component",name:"annotations",layoutAttributes:$0(),supplyLayoutDefaults:t9(),includeBasePlot:D_()("annotations"),calcAutorange:r9(),draw:d.draw,drawOne:d.drawOne,drawRaw:d.drawRaw,hasClickToShow:x.hasClickToShow,onClick:x.onClick,convertCoords:a9()}}}),z2=He({"src/components/annotations3d/attributes.js"(Z,V){"use strict";var d=$0(),x=pc().overrideAll,S=zl().templatedArray;V.exports=x(S("annotation",{visible:d.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:d.xanchor,xshift:d.xshift,yanchor:d.yanchor,yshift:d.yshift,text:d.text,textangle:d.textangle,font:d.font,width:d.width,height:d.height,opacity:d.opacity,align:d.align,valign:d.valign,bgcolor:d.bgcolor,bordercolor:d.bordercolor,borderpad:d.borderpad,borderwidth:d.borderwidth,showarrow:d.showarrow,arrowcolor:d.arrowcolor,arrowhead:d.arrowhead,startarrowhead:d.startarrowhead,arrowside:d.arrowside,arrowsize:d.arrowsize,startarrowsize:d.startarrowsize,arrowwidth:d.arrowwidth,standoff:d.standoff,startstandoff:d.startstandoff,hovertext:d.hovertext,hoverlabel:d.hoverlabel,captureevents:d.captureevents}),"calc","from-root")}}),n9=He({"src/components/annotations3d/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=N5(),e=z2();V.exports=function(o,a,n){S(o,a,{name:"annotations",handleItemDefaults:t,fullLayout:n.fullLayout})};function t(r,o,a,n){function i(f,v){return d.coerce(r,o,e,f,v)}function s(f){var v=f+"axis",c={_fullLayout:{}};return c._fullLayout[v]=a[v],x.coercePosition(o,c,i,f,f,.5)}var h=i("visible");h&&(E(r,o,n.fullLayout,i),s("x"),s("y"),s("z"),d.noneOrAll(r,o,["x","y","z"]),o.xref="x",o.yref="y",o.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),o.showarrow&&(o.axref="pixel",o.ayref="pixel",i("ax",-10),i("ay",-30),d.noneOrAll(r,o,["ax","ay"])))}}}),o9=He({"src/components/annotations3d/convert.js"(Z,V){"use strict";var d=sa(),x=Ho();V.exports=function(e){for(var t=e.fullSceneLayout,r=t.annotations,o=0;o<r.length;o++)S(r[o],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function S(E,e){var t=e.fullSceneLayout,r=t.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};E._xa={},d.extendFlat(E._xa,a),x.setConvert(E._xa),E._xa._offset=o.l+r.x[0]*o.w,E._xa.l2p=function(){return .5*(1+E._pdata[0]/E._pdata[3])*o.w*(r.x[1]-r.x[0])},E._ya={},d.extendFlat(E._ya,a),x.setConvert(E._ya),E._ya._offset=o.t+(1-r.y[1])*o.h,E._ya.l2p=function(){return .5*(1-E._pdata[1]/E._pdata[3])*o.h*(r.y[1]-r.y[0])}}}}),U5=He({"src/plots/gl3d/project.js"(Z,V){"use strict";function d(S,E){var e=[0,0,0,0],t,r;for(t=0;t<4;++t)for(r=0;r<4;++r)e[r]+=S[4*t+r]*E[t];return e}function x(S,E){var e=d(S.projection,d(S.view,d(S.model,[E[0],E[1],E[2],1])));return e}V.exports=x}}),s9=He({"src/components/annotations3d/draw.js"(Z,V){"use strict";var d=D2().drawRaw,x=U5(),S=["x","y","z"];V.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,o=t.annotations,a=0;a<o.length;a++){for(var n=o[a],i=!1,s=0;s<3;s++){var h=S[s],f=n[h],v=t[h+"axis"],c=v.r2fraction(f);if(c<0||c>1){i=!0;break}}i?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(n._pdata=x(e.glplot.cameraParams,[t.xaxis.r2l(n.x)*r[0],t.yaxis.r2l(n.y)*r[1],t.zaxis.r2l(n.z)*r[2]]),d(e.graphDiv,n,a,e.id,n._xa,n._ya))}}}}),l9=He({"src/components/annotations3d/index.js"(Z,V){"use strict";var d=lo(),x=sa();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:n9(),includeBasePlot:S,convert:o9(),draw:s9()};function S(E,e){var t=d.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(E),a=0;a<o.length;a++){var n=o[a];r.test(n)&&(E[n].annotations||[]).length&&(x.pushUnique(e._basePlotModules,t),x.pushUnique(e._subplots.gl3d,n))}}}}),j5=He({"src/components/shapes/attributes.js"(Z,V){"use strict";var d=lh(),x=tc(),S=af().line,E=Gh().dash,e=Qo().extendFlat,t=zl().templatedArray,r=R_(),o=ru(),a=$0(),{shapeTexttemplateAttrs:n,templatefallbackAttrs:i}=Jl(),s=v2();V.exports=t("shape",{visible:e({},o.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:e({},o.legend,{editType:"calc+arraydraw"}),legendgroup:e({},o.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:e({},o.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:x({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:e({},o.legendrank,{editType:"calc+arraydraw"}),legendwidth:e({},o.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:e({},a.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:e({},a.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:e({},S.color,{editType:"arraydraw"}),width:e({},S.width,{editType:"calc+arraydraw"}),dash:e({},E,{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:n({},{keys:Object.keys(s)}),texttemplatefallback:i({editType:"arraydraw"}),font:x({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"})}}),u9=He({"src/components/shapes/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=j5(),e=a0();V.exports=function(a,n){S(a,n,{name:"shapes",handleItemDefaults:r})};function t(o,a){return o?"bottom":a.indexOf("top")!==-1?"top":a.indexOf("bottom")!==-1?"bottom":"middle"}function r(o,a,n){function i(y,m){return d.coerce(o,a,E,y,m)}a._isShape=!0;var s=i("visible");if(!s)return;var h=i("showlegend");h&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),d.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var f=i("path"),v=f?"path":"rect",c=i("type",v),T=c!=="path";T&&delete a.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var l=i("line.width");l&&(i("line.color"),i("line.dash"));var _=i("xsizemode"),w=i("ysizemode");let A=[.25,.75],M=[0,10];["x","y"].forEach(y=>{var m=y+"anchor",R=y==="x"?_:w,L={_fullLayout:n},z,F,N,O;let P=y+"ref",U=o[P];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,y);O=x.coerceRefArray(o,a,L,y,void 0,"paper",B),a["_"+y+"refArray"]=!0}else O=x.coerceRef(o,a,L,y,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){x.getRefType(B)==="range"&&(z=x.getFromId(L,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let X=O[B];x.getRefType(X)==="range"?(z=x.getFromId(L,X),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&i(y+B+"shift")):F=N=d.identity;let le=y+B,ce=o[le];if(o[le]=F(o[le],!0),R==="pixel"?i(le,M[B]):x.coercePosition(a,L,i,X,le,A[B]),a[le]=N(a[le]),o[le]=ce,B===0&&R==="pixel"){let de=o[m];o[m]=F(o[m],!0),x.coercePosition(a,L,i,X,m,.25),a[m]=N(a[m]),o[m]=de}});else{if(x.getRefType(O)==="range"?(z=x.getFromId(L,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(i(y+"0shift"),i(y+"1shift"))):F=N=d.identity,T){let X=y+"0",$=y+"1",le=o[X],ce=o[$];o[X]=F(o[X],!0),o[$]=F(o[$],!0),R==="pixel"?(i(X,M[0]),i($,M[1])):(x.coercePosition(a,L,i,O,X,A[0]),x.coercePosition(a,L,i,O,$,A[1])),a[X]=N(a[X]),a[$]=N(a[$]),o[X]=le,o[$]=ce}if(R==="pixel"){let X=o[m];o[m]=F(o[m],!0),x.coercePosition(a,L,i,O,m,.25),a[m]=N(a[m]),o[m]=X}}}),T&&d.noneOrAll(o,a,["x0","x1","y0","y1"]);var g=c==="line",b,p;if(T&&(b=i("label.texttemplate"),i("label.texttemplatefallback")),b||(p=i("label.text")),p||b){i("label.textangle");var u=i("label.textposition",g?"middle":"middle center");i("label.xanchor"),i("label.yanchor",t(g,u)),i("label.padding"),d.coerceFont(i,"label.font",n.font)}}}}),c9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,V){"use strict";var d=Jn(),x=sa();function S(E,e){return E?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(e,t,r){r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),x.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity");var o=r("newshape.line.width");if(o){var a=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",d.contrast(a)),r("newshape.line.dash")}var n=e.dragmode==="drawline",i=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),i||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",n?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(n,h)),r("newshape.label.padding"),x.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),f9=He({"src/components/shapes/calc_autorange.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=L_(),E=a0();V.exports=function(i){var s=i._fullLayout,h=d.filterVisible(s.shapes);if(!(!h.length||!i._fullData.length))for(var f=0;f<h.length;f++){var v=h[f];v._extremes={};var c,T,l=x.getRefType(v.xref),_=x.getRefType(v.yref);if(l==="array"){let w=e(i,v,"x");Object.entries(w).forEach(([A,M])=>{c=x.getFromId(i,A),v._extremes[c._id]=x.findExtremes(c,M,t(v))})}else v.xref!=="paper"&&l!=="domain"&&(c=x.getFromId(i,v.xref),T=a(c,v,S.paramIsX),T&&(v._extremes[c._id]=x.findExtremes(c,T,t(v))));if(_==="array"){let w=e(i,v,"y");Object.entries(w).forEach(([A,M])=>{c=x.getFromId(i,A),v._extremes[c._id]=x.findExtremes(c,M,r(v))})}else v.yref!=="paper"&&_!=="domain"&&(c=x.getFromId(i,v.yref),T=a(c,v,S.paramIsY),T&&(v._extremes[c._id]=x.findExtremes(c,T,r(v))))}};function e(n,i,s){let h=i[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function v(A,M){A==="paper"||x.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(M))}let c={};if(i.type==="path"&&i.path){let A=i.path.match(S.segmentRE)||[];for(var T=0,l=0;l<A.length;l++){let M=A[l],g=M.charAt(0),b=f[g].drawn;if(b===void 0)continue;let p=M.slice(1).match(S.paramRE);p&&p.length>b&&(v(h[T],p[b]),T++)}}else v(h[0],i[s+"0"]),v(h[1],i[s+"1"]);let _={};for(let A in c){let M=x.getFromId(n,A);if(M){var w=M.type==="category"||M.type==="multicategory"?M.r2c:M.d2c;M.type==="date"&&(w=E.decodeDate(w)),_[M._id]=c[A].map(w)}}return _}function t(n){return o(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function r(n){return o(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function o(n,i,s,h,f,v){var c=n/2,T=v;if(i==="pixel"){var l=f?E.extractPathCoords(f,v?S.paramIsY:S.paramIsX):[s,h],_=d.aggNums(Math.max,null,l),w=d.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,M=_>0?_+c:c;return{ppad:c,ppadplus:T?A:M,ppadminus:T?M:A}}else return{ppad:c}}function a(n,i,s){var h=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",v,c,T=0,l=0,_=f?n.r2c:n.d2c,w=i[h+"sizemode"]==="scaled";if(w?(v=i[h+"0"],c=i[h+"1"],f&&(T=i[h+"0shift"],l=i[h+"1shift"])):(v=i[h+"anchor"],c=i[h+"anchor"]),v!==void 0)return[_(v)+T,_(c)+l];if(i.path){var A=1/0,M=-1/0,g=i.path.match(S.segmentRE),b,p,u,y,m;for(n.type==="date"&&(_=E.decodeDate(_)),b=0;b<g.length;b++)p=g[b],u=s[p.charAt(0)].drawn,u!==void 0&&(y=g[b].slice(1).match(S.paramRE),!(!y||y.length<u)&&(m=_(y[u]),m<A&&(A=m),m>M&&(M=m)));if(M>=A)return[A,M]}}}}),h9=He({"src/components/shapes/index.js"(Z,V){"use strict";var d=E2();V.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:u9(),supplyDrawNewShapeDefaults:c9(),includeBasePlot:D_()("shapes"),calcAutorange:f9(),draw:d.draw,drawOne:d.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,V){"use strict";var d=lh(),x=zl().templatedArray,S=R_();V.exports=x("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",d.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",d.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),p9=He({"src/components/images/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=q5(),e="images";V.exports=function(o,a){var n={name:e,handleItemDefaults:t};S(o,a,n)};function t(r,o,a){function n(_,w){return d.coerce(r,o,E,_,w)}var i=n("source"),s=n("visible",!!i);if(!s)return o;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var h={_fullLayout:a},f=["x","y"],v=0;v<2;v++){var c=f[v],T=x.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=x.getFromId(h,T);l._imgIndices.push(o._index)}x.coercePosition(o,h,n,T,c,0)}return o}}}),d9=He({"src/components/images/draw.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Ho(),E=ef(),e=vd();V.exports=function(r){var o=r._fullLayout,a=[],n={},i=[],s,h;for(h=0;h<o.images.length;h++){var f=o.images[h];if(f.visible)if(f.layer==="below"&&f.xref!=="paper"&&f.yref!=="paper"){s=E.ref2id(f.xref)+E.ref2id(f.yref);var v=o._plots[s];if(!v){i.push(f);continue}v.mainplot&&(s=v.mainplot.id),n[s]||(n[s]=[]),n[s].push(f)}else f.layer==="above"?a.push(f):i.push(f)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function T(u){var y=d.select(this);if(this._imgSrc!==u.source)if(y.attr("xmlns",e.svg),!r._context.staticPlot||u.source&&u.source.slice(0,5)==="data:")y.attr("xlink:href",u.source),this._imgSrc=u.source;else{var m=new Promise(function(R){var L=new Image;this.img=L,L.setAttribute("crossOrigin","anonymous"),L.onerror=z,L.onload=function(){var F=document.createElement("canvas");F.width=this.width,F.height=this.height;var N=F.getContext("2d",{willReadFrequently:!0});N.drawImage(this,0,0);var O=F.toDataURL("image/png");y.attr("xlink:href",O),R()},y.on("error",z),L.src=u.source,this._imgSrc=u.source;function z(){y.remove(),R()}}.bind(this));r._promises.push(m)}}function l(u){var y=d.select(this),m=S.getFromId(r,u.xref),R=S.getFromId(r,u.yref),L=S.getRefType(u.xref)==="domain",z=S.getRefType(u.yref)==="domain",F=o._size,N,O;m!==void 0?N=typeof u.xref=="string"&&L?m._length*u.sizex:Math.abs(m.l2p(u.sizex)-m.l2p(0)):N=u.sizex*F.w,R!==void 0?O=typeof u.yref=="string"&&z?R._length*u.sizey:Math.abs(R.l2p(u.sizey)-R.l2p(0)):O=u.sizey*F.h;var P=N*c.x[u.xanchor].offset,U=O*c.y[u.yanchor].offset,B=c.x[u.xanchor].sizing+c.y[u.yanchor].sizing,X,$;switch(m!==void 0?X=typeof u.xref=="string"&&L?m._length*u.x+m._offset:m.r2p(u.x)+m._offset:X=u.x*F.w+F.l,X+=P,R!==void 0?$=typeof u.yref=="string"&&z?R._length*(1-u.y)+R._offset:R.r2p(u.y)+R._offset:$=F.h-u.y*F.h+F.t,$+=U,u.sizing){case"fill":B+=" slice";break;case"stretch":B="none";break}y.attr({x:X,y:$,width:N,height:O,preserveAspectRatio:B,opacity:u.opacity});var le=m&&S.getRefType(u.xref)!=="domain"?m._id:"",ce=R&&S.getRefType(u.yref)!=="domain"?R._id:"",de=le+ce;x.setClipUrl(y,de?"clip"+o._uid+de:null,r)}function _(u){return[u.xref,u.x,u.sizex,u.yref,u.y,u.sizey].join("_")}function w(u,y){return u._index-y._index}var A=o._imageLowerLayer.selectAll("image").data(i,_),M=o._imageUpperLayer.selectAll("image").data(a,_);A.enter().append("image"),M.enter().append("image"),A.exit().remove(),M.exit().remove(),A.each(function(u){T.bind(this)(u),l.bind(this)(u)}),M.each(function(u){T.bind(this)(u),l.bind(this)(u)}),A.sort(w),M.sort(w);var g=Object.keys(o._plots);for(h=0;h<g.length;h++){s=g[h];var b=o._plots[s];if(b.imagelayer){var p=b.imagelayer.selectAll("image").data(n[s]||[],_);p.enter().append("image"),p.exit().remove(),p.each(function(u){T.bind(this)(u),l.bind(this)(u)}),p.sort(w)}}}}}),v9=He({"src/components/images/convert_coords.js"(Z,V){"use strict";var d=as(),x=h2();V.exports=function(E,e,t,r){e=e||{};var o=t==="log"&&e.type==="linear",a=t==="linear"&&e.type==="log";if(o||a){for(var n=E._fullLayout.images,i=e._id.charAt(0),s,h,f=0;f<n.length;f++)if(s=n[f],h="images["+f+"].",s[i+"ref"]===e._id){var v=s[i],c=s["size"+i],T=null,l=null;if(o){T=x(v,e.range);var _=c/Math.pow(10,T)/2;l=2*Math.log(_+Math.sqrt(1+_*_))/Math.LN10}else T=Math.pow(10,v),l=T*(Math.pow(10,c/2)-Math.pow(10,-c/2));d(T)?d(l)||(l=null):(T=null,l=null),r(h+i,T),r(h+"size"+i,l)}}}}}),m9=He({"src/components/images/index.js"(Z,V){"use strict";V.exports={moduleType:"component",name:"images",layoutAttributes:q5(),supplyLayoutDefaults:p9(),includeBasePlot:D_()("images"),draw:d9(),convertCoords:v9()}}}),F2=He({"src/components/updatemenus/constants.js"(Z,V){"use strict";V.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"}}}}),V5=He({"src/components/updatemenus/attributes.js"(Z,V){"use strict";var d=tc(),x=sh(),S=Qo().extendFlat,E=pc().overrideAll,e=m2(),t=zl().templatedArray,r=t("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}});V.exports=E(t("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:r,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:S(e({editType:"arraydraw"}),{}),font:d({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:x.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),g9=He({"src/components/updatemenus/defaults.js"(Z,V){"use strict";var d=sa(),x=hp(),S=V5(),E=F2(),e=E.name,t=S.buttons;V.exports=function(n,i){var s={name:e,handleItemDefaults:r};x(n,i,s)};function r(a,n,i){function s(v,c){return d.coerce(a,n,S,v,c)}var h=x(a,n,{name:"buttons",handleItemDefaults:o}),f=s("visible",h.length>0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),d.noneOrAll(a,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),d.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,n){function i(h,f){return d.coerce(a,n,t,h,f)}var s=i("visible",a.method==="skip"||Array.isArray(a.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),y9=He({"src/components/updatemenus/scrollbox.js"(Z,V){"use strict";V.exports=e;var d=Wn(),x=Jn(),S=es(),E=sa();function e(t,r,o){this.gd=t,this.container=r,this.id=o,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})}e.barWidth=2,e.barLength=20,e.barRadius=2,e.barPad=1,e.barColor="#808BA4",e.prototype.enable=function(r,o,a){var n=this.gd._fullLayout,i=n.width,s=n.height;this.position=r;var h=this.position.l,f=this.position.w,v=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",_=T==="left",w=T==="right",A=T==="up",M=f,g=c,b,p,u,y;!l&&!_&&!w&&!A&&(this.position.direction="down",l=!0);var m=l||A;m?(b=h,p=b+M,l?(u=v,y=Math.min(u+g,s),g=y-u):(y=v+g,u=Math.max(y-g,0),g=y-u)):(u=v,y=u+g,_?(p=h+M,b=Math.max(p-M,0),M=p-b):(b=h,p=Math.min(b+M,i),M=p-b)),this._box={l:b,t:u,w:M,h:g};var R=f>M,L=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=v+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(R?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,e.barColor),R?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:L,height:z}),this._hbarXMin=F+L/2,this._hbarTranslateMax=M-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=c>g,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,X=h+f,$=v;X+U>i&&(X=i-U);var le=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);le.exit().on(".drag",null).remove(),le.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,e.barColor),P?(this.vbar=le.attr({rx:e.barRadius,ry:e.barRadius,x:X,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=g-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,G=P?p+U+.5:p+.5,Y=u-.5,ee=R?y+z+.5:y+.5,q=n._topdefs.selectAll("#"+ce).data(R||P?[0]:[]);if(q.exit().remove(),q.enter().append("clipPath").attr("id",ce).append("rect"),R||P?(this._clipRect=q.select("rect").attr({x:Math.floor(de),y:Math.floor(Y),width:Math.ceil(G)-Math.floor(de),height:Math.ceil(ee)-Math.floor(Y)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:v,width:f,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),R||P){var se=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(se);var ae=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault(),d.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));R&&this.hbar.on(".drag",null).call(ae),P&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(o,a)},e.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.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)},e.prototype._onBoxDrag=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r-=d.event.dx),this.vbar&&(o-=d.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=d.event.deltaY),this.vbar&&(o+=d.event.deltaY),this.setTranslate(r,o)},e.prototype._onBarDrag=function(){var r=this.translateX,o=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=E.constrain(d.event.x,a,n),s=(i-a)/(n-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,v=f+this._vbarTranslateMax,c=E.constrain(d.event.y,f,v),T=(c-f)/(v-f),l=this.position.h-this._box.h;o=T*l}this.setTranslate(r,o)},e.prototype.setTranslate=function(r,o){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=E.constrain(r||0,0,a),o=E.constrain(o||0,0,n),this.translateX=r,this.translateY=o,this.container.call(S.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-o),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+o-.5)}),this.hbar){var i=r/a;this.hbar.call(S.setTranslate,r+i*this._hbarTranslateMax,o)}if(this.vbar){var s=o/n;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),_9=He({"src/components/updatemenus/draw.js"(Z,V){"use strict";var d=Wn(),x=bc(),S=Jn(),E=es(),e=sa(),t=ou(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),n=y9();V.exports=function(L){var z=L._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){x.autoMargin(L,u(ce))}var O=z._menulayer.selectAll("g."+a.containerClassName).data(F.length>0?[0]:[]);if(O.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),O.exit().each(function(){d.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var P=O.selectAll("g."+a.headerGroupClassName).data(F,i);P.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(ce){ce.style("pointer-events","all")}),B=0;B<F.length;B++){var X=F[B];p(L,X)}var $="updatemenus"+z._uid,le=new n(L,U,$);P.enter().size()&&(U.node().parentNode.appendChild(U.node()),U.call(m)),P.exit().each(function(ce){U.call(m),N(ce)}).remove(),P.each(function(ce){var de=d.select(this),G=ce.type==="dropdown"?U:null;x.manageCommandObserver(L,ce,ce.buttons,function(Y){f(L,ce,ce.buttons[Y.index],de,G,le,Y.index,!0)}),ce.type==="dropdown"?(v(L,de,U,le,ce),h(U,ce)&&c(L,de,U,le,ce)):c(L,de,null,null,ce)})}};function i(R){return R._index}function s(R){return+R.attr(a.menuIndexAttrName)==-1}function h(R,L){return+R.attr(a.menuIndexAttrName)===L._index}function f(R,L,z,F,N,O,P,U){L.active=P,r(R.layout,a.name,L).applyUpdate("active",P),L.type==="buttons"?c(R,F,null,null,L):L.type==="dropdown"&&(N.attr(a.menuIndexAttrName,"-1"),v(R,F,N,O,L),U||c(R,F,N,O,L))}function v(R,L,z,F,N){var O=e.ensureSingle(L,"g",a.headerClassName,function(ce){ce.style("pointer-events","all")}),P=N._dims,U=N.active,B=N.buttons[U]||a.blankHeaderOpts,X={y:N.pad.t,yPad:0,x:N.pad.l,xPad:0,index:0},$={width:P.headerWidth,height:P.headerHeight};O.call(_,N,B,R).call(y,N,X,$);var le=e.ensureSingle(L,"text",a.headerArrowClassName,function(ce){ce.attr("text-anchor","end").call(E.font,N.font).text(a.arrowSymbol[N.direction])});le.attr({x:P.headerWidth-a.arrowOffsetX+N.pad.l,y:P.headerHeight/2+a.textOffsetY+N.pad.t}),O.on("click",function(){z.call(m,String(h(z,N)?-1:N._index)),c(R,L,z,F,N)}),O.on("mouseover",function(){O.call(g)}),O.on("mouseout",function(){O.call(b,N)}),E.setTranslate(L,P.lx,P.ly)}function c(R,L,z,F,N){z||(z=L,z.attr("pointer-events","all"));var O=!s(z)||N.type==="buttons"?N.buttons:[],P=N.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,U=z.selectAll("g."+P).data(e.filterVisible(O)),B=U.enter().append("g").classed(P,!0),X=U.exit();N.type==="dropdown"?(B.attr("opacity","0").transition().attr("opacity","1"),X.transition().attr("opacity","0").remove()):X.remove();var $=0,le=0,ce=N._dims,de=["up","down"].indexOf(N.direction)!==-1;N.type==="dropdown"&&(de?le=ce.headerHeight+a.gapButtonHeader:$=ce.headerWidth+a.gapButtonHeader),N.type==="dropdown"&&N.direction==="up"&&(le=-a.gapButtonHeader+a.gapButton-ce.openHeight),N.type==="dropdown"&&N.direction==="left"&&($=-a.gapButtonHeader+a.gapButton-ce.openWidth);var G={x:ce.lx+$+N.pad.l,y:ce.ly+le+N.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},Y={l:G.x+N.borderwidth,t:G.y+N.borderwidth};U.each(function(ee,q){var se=d.select(this);se.call(_,N,ee,R).call(y,N,G),se.on("click",function(){d.event.defaultPrevented||(ee.execute&&(ee.args2&&N.active===q?(f(R,N,ee,L,z,F,-1),x.executeAPICommand(R,ee.method,ee.args2)):(f(R,N,ee,L,z,F,q),x.executeAPICommand(R,ee.method,ee.args))),R.emit("plotly_buttonclicked",{menu:N,button:ee,active:N.active}))}),se.on("mouseover",function(){se.call(g)}),se.on("mouseout",function(){se.call(b,N),U.call(M,N)})}),U.call(M,N),de?(Y.w=Math.max(ce.openWidth,ce.headerWidth),Y.h=G.y-Y.t):(Y.w=G.x-Y.l,Y.h=Math.max(ce.openHeight,ce.headerHeight)),Y.direction=N.direction,F&&(U.size()?T(R,L,z,F,N,Y):l(F))}function T(R,L,z,F,N,O){var P=N.direction,U=P==="up"||P==="down",B=N._dims,X=N.active,$,le,ce;if(U)for(le=0,ce=0;ce<X;ce++)le+=B.heights[ce]+a.gapButton;else for($=0,ce=0;ce<X;ce++)$+=B.widths[ce]+a.gapButton;F.enable(O,$,le),F.hbar&&F.hbar.attr("opacity","0").transition().attr("opacity","1"),F.vbar&&F.vbar.attr("opacity","0").transition().attr("opacity","1")}function l(R){var L=!!R.hbar,z=!!R.vbar;L&&R.hbar.transition().attr("opacity","0").each("end",function(){L=!1,z||R.disable()}),z&&R.vbar.transition().attr("opacity","0").each("end",function(){z=!1,L||R.disable()})}function _(R,L,z,F){R.call(w,L).call(A,L,z,F)}function w(R,L){var z=e.ensureSingle(R,"rect",a.itemRectClassName,function(F){F.attr({rx:a.rx,ry:a.ry,"shape-rendering":"crispEdges"})});z.call(S.stroke,L.bordercolor).call(S.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px")}function A(R,L,z,F){var N=e.ensureSingle(R,"text",a.itemTextClassName,function(U){U.attr({"text-anchor":"start","data-notex":1})}),O=z.label,P=F._fullLayout._meta;P&&(O=e.templateString(O,P)),N.call(E.font,L.font).text(O).call(t.convertToTspans,F)}function M(R,L){var z=L.active;R.each(function(F,N){var O=d.select(this);N===z&&L.showactive&&O.select("rect."+a.itemRectClassName).call(S.fill,a.activeColor)})}function g(R){R.select("rect."+a.itemRectClassName).call(S.fill,a.hoverColor)}function b(R,L){R.select("rect."+a.itemRectClassName).call(S.fill,L.bgcolor)}function p(R,L){var z=L._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},F=E.tester.selectAll("g."+a.dropdownButtonClassName).data(e.filterVisible(L.buttons));F.enter().append("g").classed(a.dropdownButtonClassName,!0);var N=["up","down"].indexOf(L.direction)!==-1;F.each(function($,le){var ce=d.select(this);ce.call(_,L,$,R);var de=ce.select("."+a.itemTextClassName),G=de.node()&&E.bBox(de.node()).width,Y=Math.max(G+a.textPadX,a.minWidth),ee=L.font.size*o,q=t.lineCount(de),se=Math.max(ee*q,a.minHeight)+a.textOffsetY;se=Math.ceil(se),Y=Math.ceil(Y),z.widths[le]=Y,z.heights[le]=se,z.height1=Math.max(z.height1,se),z.width1=Math.max(z.width1,Y),N?(z.totalWidth=Math.max(z.totalWidth,Y),z.openWidth=z.totalWidth,z.totalHeight+=se+a.gapButton,z.openHeight+=se+a.gapButton):(z.totalWidth+=Y+a.gapButton,z.openWidth+=Y+a.gapButton,z.totalHeight=Math.max(z.totalHeight,se),z.openHeight=z.totalHeight)}),N?z.totalHeight-=a.gapButton:z.totalWidth-=a.gapButton,z.headerWidth=z.width1+a.arrowPadX,z.headerHeight=z.height1,L.type==="dropdown"&&(N?(z.width1+=a.arrowPadX,z.totalHeight=z.height1):z.totalWidth=z.width1,z.totalWidth+=a.arrowPadX),F.remove();var O=z.totalWidth+L.pad.l+L.pad.r,P=z.totalHeight+L.pad.t+L.pad.b,U=R._fullLayout._size;z.lx=U.l+U.w*L.x,z.ly=U.t+U.h*(1-L.y);var B="left";e.isRightAnchor(L)&&(z.lx-=O,B="right"),e.isCenterAnchor(L)&&(z.lx-=O/2,B="center");var X="top";e.isBottomAnchor(L)&&(z.ly-=P,X="bottom"),e.isMiddleAnchor(L)&&(z.ly-=P/2,X="middle"),z.totalWidth=Math.ceil(z.totalWidth),z.totalHeight=Math.ceil(z.totalHeight),z.lx=Math.round(z.lx),z.ly=Math.round(z.ly),x.autoMargin(R,u(L),{x:L.x,y:L.y,l:O*({right:1,center:.5}[B]||0),r:O*({left:1,center:.5}[B]||0),b:P*({top:1,middle:.5}[X]||0),t:P*({bottom:1,middle:.5}[X]||0)})}function u(R){return a.autoMarginIdRoot+R._index}function y(R,L,z,F){F=F||{};var N=R.select("."+a.itemRectClassName),O=R.select("."+a.itemTextClassName),P=L.borderwidth,U=z.index,B=L._dims;E.setTranslate(R,P+z.x,P+z.y);var X=["up","down"].indexOf(L.direction)!==-1,$=F.height||(X?B.heights[U]:B.height1);N.attr({x:0,y:0,width:F.width||(X?B.width1:B.widths[U]),height:$});var le=L.font.size*o,ce=t.lineCount(O),de=(ce-1)*le/2;t.positionText(O,a.textOffsetX,$/2-de+a.textOffsetY),X?z.y+=B.heights[U]+z.yPad:z.x+=B.widths[U]+z.xPad,z.index++}function m(R,L){R.attr(a.menuIndexAttrName,L||"-1").selectAll("g."+a.dropdownButtonClassName).remove()}}}),x9=He({"src/components/updatemenus/index.js"(Z,V){"use strict";var d=F2();V.exports={moduleType:"component",name:d.name,layoutAttributes:V5(),supplyLayoutDefaults:g9(),draw:_9()}}}),O_=He({"src/components/sliders/constants.js"(Z,V){"use strict";V.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}}}),G5=He({"src/components/sliders/attributes.js"(Z,V){"use strict";var d=tc(),x=m2(),S=Qo().extendDeepAll,E=pc().overrideAll,e=A_(),t=zl().templatedArray,r=O_(),o=t("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}});V.exports=E(t("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:o,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:S(x({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:e.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:d({})},font:d({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}}),b9=He({"src/components/sliders/defaults.js"(Z,V){"use strict";var d=sa(),x=hp(),S=G5(),E=O_(),e=E.name,t=S.steps;V.exports=function(n,i){x(n,i,{name:e,handleItemDefaults:r})};function r(a,n,i){function s(w,A){return d.coerce(a,n,S,w,A)}for(var h=x(a,n,{name:"steps",handleItemDefaults:o}),f=0,v=0;v<h.length;v++)h[v].visible&&f++;var c;if(f<2?c=n.visible=!1:c=s("visible"),!!c){n._stepCount=f;var T=n._visibleSteps=d.filterVisible(h),l=s("active");(h[l]||{}).visible||(n.active=T[0]._index),s("x"),s("y"),d.noneOrAll(a,n,["x","y"]),s("xanchor"),s("yanchor"),s("len"),s("lenmode"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),d.coerceFont(s,"font",i.font);var _=s("currentvalue.visible");_&&(s("currentvalue.xanchor"),s("currentvalue.prefix"),s("currentvalue.suffix"),s("currentvalue.offset"),d.coerceFont(s,"currentvalue.font",n.font)),s("transition.duration"),s("transition.easing"),s("bgcolor"),s("activebgcolor"),s("bordercolor"),s("borderwidth"),s("ticklen"),s("tickwidth"),s("tickcolor"),s("minorticklen")}}function o(a,n){function i(f,v){return d.coerce(a,n,t,f,v)}var s;if(a.method!=="skip"&&!Array.isArray(a.args)?s=n.visible=!1:s=i("visible"),s){i("method"),i("args");var h=i("label","step-"+n._index);i("value",h),i("execute")}}}}),w9=He({"src/components/sliders/draw.js"(Z,V){"use strict";var d=Wn(),x=bc(),S=Jn(),E=es(),e=sa(),t=e.strTranslate,r=ou(),o=zl().arrayEditor,a=O_(),n=uh(),i=n.LINE_SPACING,s=n.FROM_TL,h=n.FROM_BR;V.exports=function(O){var P=O._context.staticPlot,U=O._fullLayout,B=v(U,O),X=U._infolayer.selectAll("g."+a.containerClassName).data(B.length>0?[0]:[]);X.enter().append("g").classed(a.containerClassName,!0).style("cursor",P?null:"ew-resize");function $(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),x.autoMargin(O,f(G))}if(X.exit().each(function(){d.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var le=X.selectAll("g."+a.groupClassName).data(B,c);le.enter().append("g").classed(a.groupClassName,!0),le.exit().each($).remove();for(var ce=0;ce<B.length;ce++){var de=B[ce];T(O,de)}le.each(function(G){var Y=d.select(this);y(G),x.manageCommandObserver(O,G,G._visibleSteps,function(ee){var q=Y.data()[0];q.active!==ee.index&&(q._dragging||b(O,Y,q,ee.index,!1,!0))}),l(O,d.select(this),G)})}};function f(N){return a.autoMarginIdRoot+N._index}function v(N,O){for(var P=N[a.name],U=[],B=0;B<P.length;B++){var X=P[B];X.visible&&(X._gd=O,U.push(X))}return U}function c(N){return N._index}function T(N,O){var P=E.tester.selectAll("g."+a.labelGroupClass).data(O._visibleSteps);P.enter().append("g").classed(a.labelGroupClass,!0);var U=0,B=0;P.each(function(se){var ae=d.select(this),j=A(ae,{step:se},O),Q=j.node();if(Q){var re=E.bBox(Q);B=Math.max(B,re.height),U=Math.max(U,re.width)}}),P.remove();var X=O._dims={};X.inputAreaWidth=Math.max(a.railWidth,a.gripHeight);var $=N._fullLayout._size;X.lx=$.l+$.w*O.x,X.ly=$.t+$.h*(1-O.y),O.lenmode==="fraction"?X.outerLength=Math.round($.w*O.len):X.outerLength=O.len,X.inputAreaStart=0,X.inputAreaLength=Math.round(X.outerLength-O.pad.l-O.pad.r);var le=X.inputAreaLength-2*a.stepInset,ce=le/(O._stepCount-1),de=U+a.labelPadding;if(X.labelStride=Math.max(1,Math.ceil(de/ce)),X.labelHeight=B,X.currentValueMaxWidth=0,X.currentValueHeight=0,X.currentValueTotalHeight=0,X.currentValueMaxLines=1,O.currentvalue.visible){var G=E.tester.append("g");P.each(function(se){var ae=_(G,O,se.label),j=ae.node()&&E.bBox(ae.node())||{width:0,height:0},Q=r.lineCount(ae);X.currentValueMaxWidth=Math.max(X.currentValueMaxWidth,Math.ceil(j.width)),X.currentValueHeight=Math.max(X.currentValueHeight,Math.ceil(j.height)),X.currentValueMaxLines=Math.max(X.currentValueMaxLines,Q)}),X.currentValueTotalHeight=X.currentValueHeight+O.currentvalue.offset,G.remove()}X.height=X.currentValueTotalHeight+a.tickOffset+O.ticklen+a.labelOffset+X.labelHeight+O.pad.t+O.pad.b;var Y="left";e.isRightAnchor(O)&&(X.lx-=X.outerLength,Y="right"),e.isCenterAnchor(O)&&(X.lx-=X.outerLength/2,Y="center");var ee="top";e.isBottomAnchor(O)&&(X.ly-=X.height,ee="bottom"),e.isMiddleAnchor(O)&&(X.ly-=X.height/2,ee="middle"),X.outerLength=Math.ceil(X.outerLength),X.height=Math.ceil(X.height),X.lx=Math.round(X.lx),X.ly=Math.round(X.ly);var q={y:O.y,b:X.height*h[ee],t:X.height*s[ee]};O.lenmode==="fraction"?(q.l=0,q.xl=O.x-O.len*s[Y],q.r=0,q.xr=O.x+O.len*h[Y]):(q.x=O.x,q.l=X.outerLength*s[Y],q.r=X.outerLength*h[Y]),x.autoMargin(N,f(O),q)}function l(N,O,P){(P.steps[P.active]||{}).visible||(P.active=P._visibleSteps[0]._index),O.call(_,P).call(F,P).call(M,P).call(u,P).call(z,N,P).call(w,N,P);var U=P._dims;E.setTranslate(O,U.lx+P.pad.l,U.ly+P.pad.t),O.call(m,P,!1),O.call(_,P)}function _(N,O,P){if(O.currentvalue.visible){var U=O._dims,B,X;switch(O.currentvalue.xanchor){case"right":B=U.inputAreaLength-a.currentValueInset-U.currentValueMaxWidth,X="left";break;case"center":B=U.inputAreaLength*.5,X="middle";break;default:B=a.currentValueInset,X="left"}var $=e.ensureSingle(N,"text",a.labelClass,function(ee){ee.attr({"text-anchor":X,"data-notex":1})}),le=O.currentvalue.prefix?O.currentvalue.prefix:"";if(typeof P=="string")le+=P;else{var ce=O.steps[O.active].label,de=O._gd._fullLayout._meta;de&&(ce=e.templateString(ce,de)),le+=ce}O.currentvalue.suffix&&(le+=O.currentvalue.suffix),$.call(E.font,O.currentvalue.font).text(le).call(r.convertToTspans,O._gd);var G=r.lineCount($),Y=(U.currentValueMaxLines+1-G)*O.currentvalue.font.size*i;return r.positionText($,B,Y),$}}function w(N,O,P){var U=e.ensureSingle(N,"rect",a.gripRectClass,function(B){B.call(p,O,N,P).style("pointer-events","all")});U.attr({width:a.gripWidth,height:a.gripHeight,rx:a.gripRadius,ry:a.gripRadius}).call(S.stroke,P.bordercolor).call(S.fill,P.bgcolor).style("stroke-width",P.borderwidth+"px")}function A(N,O,P){var U=e.ensureSingle(N,"text",a.labelClass,function($){$.attr({"text-anchor":"middle","data-notex":1})}),B=O.step.label,X=P._gd._fullLayout._meta;return X&&(B=e.templateString(B,X)),U.call(E.font,P.font).text(B).call(r.convertToTspans,P._gd),U}function M(N,O){var P=e.ensureSingle(N,"g",a.labelsClass),U=O._dims,B=P.selectAll("g."+a.labelGroupClass).data(U.labelSteps);B.enter().append("g").classed(a.labelGroupClass,!0),B.exit().remove(),B.each(function(X){var $=d.select(this);$.call(A,X,O),E.setTranslate($,R(O,X.fraction),a.tickOffset+O.ticklen+O.font.size*i+a.labelOffset+U.currentValueTotalHeight)})}function g(N,O,P,U,B){var X=Math.round(U*(P._stepCount-1)),$=P._visibleSteps[X]._index;$!==P.active&&b(N,O,P,$,!0,B)}function b(N,O,P,U,B,X){var $=P.active;P.active=U,o(N.layout,a.name,P).applyUpdate("active",U);var le=P.steps[P.active];O.call(m,P,X),O.call(_,P),N.emit("plotly_sliderchange",{slider:P,step:P.steps[P.active],interaction:B,previousActive:$}),le&&le.method&&B&&(O._nextMethod?(O._nextMethod.step=le,O._nextMethod.doCallback=B,O._nextMethod.doTransition=X):(O._nextMethod={step:le,doCallback:B,doTransition:X},O._nextMethodRaf=window.requestAnimationFrame(function(){var ce=O._nextMethod.step;ce.method&&(ce.execute&&x.executeAPICommand(N,ce.method,ce.args),O._nextMethod=null,O._nextMethodRaf=null)})))}function p(N,O,P){if(O._context.staticPlot)return;var U=P.node(),B=d.select(O);function X(){return P.data()[0]}function $(){var le=X();O.emit("plotly_sliderstart",{slider:le});var ce=P.select("."+a.gripRectClass);d.event.stopPropagation(),d.event.preventDefault(),ce.call(S.fill,le.activebgcolor);var de=L(le,d.mouse(U)[0]);g(O,P,le,de,!0),le._dragging=!0;function G(){var ee=X(),q=L(ee,d.mouse(U)[0]);g(O,P,ee,q,!1)}B.on("mousemove",G),B.on("touchmove",G);function Y(){var ee=X();ee._dragging=!1,ce.call(S.fill,ee.bgcolor),B.on("mouseup",null),B.on("mousemove",null),B.on("touchend",null),B.on("touchmove",null),O.emit("plotly_sliderend",{slider:ee,step:ee.steps[ee.active]})}B.on("mouseup",Y),B.on("touchend",Y)}N.on("mousedown",$),N.on("touchstart",$)}function u(N,O){var P=N.selectAll("rect."+a.tickRectClass).data(O._visibleSteps),U=O._dims;P.enter().append("rect").classed(a.tickRectClass,!0),P.exit().remove(),P.attr({width:O.tickwidth+"px","shape-rendering":"crispEdges"}),P.each(function(B,X){var $=X%U.labelStride===0,le=d.select(this);le.attr({height:$?O.ticklen:O.minorticklen}).call(S.fill,O.tickcolor),E.setTranslate(le,R(O,X/(O._stepCount-1))-.5*O.tickwidth,($?a.tickOffset:a.minorTickOffset)+U.currentValueTotalHeight)})}function y(N){var O=N._dims;O.labelSteps=[];for(var P=N._stepCount,U=0;U<P;U+=O.labelStride)O.labelSteps.push({fraction:U/(P-1),step:N._visibleSteps[U]})}function m(N,O,P){for(var U=N.select("rect."+a.gripRectClass),B=0,X=0;X<O._stepCount;X++)if(O._visibleSteps[X]._index===O.active){B=X;break}var $=R(O,B/(O._stepCount-1));if(!O._invokingCommand){var le=U;P&&O.transition.duration>0&&(le=le.transition().duration(O.transition.duration).ease(O.transition.easing)),le.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function R(N,O){var P=N._dims;return P.inputAreaStart+a.stepInset+(P.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function L(N,O){var P=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*a.stepInset-2*P.inputAreaStart)))}function z(N,O,P){var U=P._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(X){X.call(p,O,N,P).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+P.ticklen+U.labelHeight)}).call(S.fill,P.bgcolor).attr("opacity",0),E.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var P=O._dims,U=P.inputAreaLength-a.railInset*2,B=e.ensureSingle(N,"rect",a.railRectClass);B.attr({width:U,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(S.stroke,O.bordercolor).call(S.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),E.setTranslate(B,a.railInset,(P.inputAreaWidth-a.railWidth)*.5+P.currentValueTotalHeight)}}}),T9=He({"src/components/sliders/index.js"(Z,V){"use strict";var d=O_();V.exports={moduleType:"component",name:d.name,layoutAttributes:G5(),supplyLayoutDefaults:b9(),draw:w9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,V){"use strict";var d=sh();V.exports={bgcolor:{valType:"color",dflt:d.background,editType:"plot"},bordercolor:{valType:"color",dflt:d.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"}}}),H5=He({"src/components/rangeslider/oppaxis_attributes.js"(Z,V){"use strict";V.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"}}}),B2=He({"src/components/rangeslider/constants.js"(Z,V){"use strict";V.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}}}),A9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var V=ef(),d=ou(),x=B2(),S=uh().LINE_SPACING,E=x.name;function e(t){var r=t&&t[E];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=V.list({_fullLayout:t},"x",!0),o=t.margin,a=[],n=0;n<r.length;n++){var i=r[n];if(e(i)){a.push(i);var s=i[E];s._id=E+i._id,s._height=(t.height-o.b-o.t)*s.thickness,s._offsetShift=Math.floor(s.borderwidth/2)}}t._rangeSliderData=a},Z.autoMarginOpts=function(t,r){var o=t._fullLayout,a=r[E],n=r._id.charAt(0),i=0,s=0;if(r.side==="bottom"&&(i=r._depth,r.title.text!==o._dfltTitle[n])){s=1.5*r.title.font.size+10+a._offsetShift;var h=(r.title.text.match(d.BR_TAG_ALL)||[]).length;s+=h*r.title.font.size*S}return{x:0,y:r._counterDomainMin,l:0,r:0,t:0,b:a._height+i+Math.max(o.margin.b,s),pad:x.extraPad+a._offsetShift*2}}}}),S9=He({"src/components/rangeslider/defaults.js"(Z,V){"use strict";var d=sa(),x=zl(),S=ef(),E=O2(),e=H5();V.exports=function(r,o,a){var n=r[a],i=o[a];if(!(n.rangeslider||o._requestRangeslider[i._id]))return;d.isPlainObject(n.rangeslider)||(n.rangeslider={});var s=n.rangeslider,h=x.newContainer(i,"rangeslider");function f(y,m){return d.coerce(s,h,E,y,m)}var v,c;function T(y,m){return d.coerce(v,c,e,y,m)}var l=f("visible");if(l){f("bgcolor",o.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!i.isValidRange(s.range)),f("range");var _=o._subplots;if(_)for(var w=_.cartesian.filter(function(y){return y.slice(0,Math.max(0,y.indexOf("y")))===S.name2id(a)}).map(function(y){return y.slice(y.indexOf("y"),y.length)}),A=d.simpleMap(w,S.id2name),M=0;M<A.length;M++){var g=A[M];v=s[g]||{},c=x.newContainer(h,g,"yaxis");var b=o[g],p;v.range&&b.isValidRange(v.range)&&(p="fixed");var u=T("rangemode",p);u!=="match"&&T("range",b.range.slice())}h._input=s}}}}),M9=He({"src/components/rangeslider/calc_autorange.js"(Z,V){"use strict";var d=ef().list,x=Yd().getAutoRange,S=B2();V.exports=function(e){for(var t=d(e,"x",!0),r=0;r<t.length;r++){var o=t[r],a=o[S.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=x(e,o))}}}}),E9=He({"src/components/rangeslider/draw.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=bc(),E=sa(),e=E.strTranslate,t=es(),r=Jn(),o=K0(),a=Kf(),n=ef(),i=Ap(),s=Kd(),h=B2();V.exports=function(p){for(var u=p._fullLayout,y=u._rangeSliderData,m=0;m<y.length;m++){var R=y[m][h.name];R._clipId=R._id+"-"+u._uid}function L(F){return F._name}var z=u._infolayer.selectAll("g."+h.containerClassName).data(y,L);z.exit().each(function(F){var N=F[h.name];u._topdefs.select("#"+N._clipId).remove()}).remove(),y.length!==0&&(z.enter().append("g").classed(h.containerClassName,!0).attr("pointer-events","all"),z.each(function(F){var N=d.select(this),O=F[h.name],P=u[n.id2name(F.anchor)],U=O[n.id2name(F.anchor)];if(O.range){var B=E.simpleMap(O.range,F.r2l),X=E.simpleMap(F.range,F.r2l),$;X[0]<X[1]?$=[Math.min(B[0],X[0]),Math.max(B[1],X[1])]:$=[Math.max(B[0],X[0]),Math.min(B[1],X[1])],O.range=O._input.range=E.simpleMap($,F.l2r)}F.cleanRange("rangeslider.range");var le=u._size,ce=F.domain;O._width=le.w*(ce[1]-ce[0]);var de=Math.round(le.l+le.w*ce[0]),G=Math.round(le.t+le.h*(1-F._counterDomainMin)+(F.side==="bottom"?F._depth:0)+O._offsetShift+h.extraPad);N.attr("transform",e(de,G)),O._rl=E.simpleMap(O.range,F.r2l);var Y=O._rl[0],ee=O._rl[1],q=ee-Y;if(O.p2d=function(Re){return Re/O._width*q+Y},O.d2p=function(Re){return(Re-Y)/q*O._width},F.rangebreaks){var se=F.locateBreaks(Y,ee);if(se.length){var ae,j,Q=0;for(ae=0;ae<se.length;ae++)j=se[ae],Q+=j.max-j.min;var re=O._width/(ee-Y-Q),pe=[-re*Y];for(ae=0;ae<se.length;ae++)j=se[ae],pe.push(pe[pe.length-1]-re*(j.max-j.min));for(O.d2p=function(Re){for(var We=pe[0],at=0;at<se.length;at++){var nt=se[at];if(Re>=nt.max)We=pe[at+1];else if(Re<nt.min)break}return We+re*Re},ae=0;ae<se.length;ae++)j=se[ae],j.pmin=O.d2p(j.min),j.pmax=O.d2p(j.max);O.p2d=function(Re){for(var We=pe[0],at=0;at<se.length;at++){var nt=se[at];if(Re>=nt.pmax)We=pe[at+1];else if(Re<nt.pmin)break}return(Re-We)/re}}}if(U.rangemode!=="match"){var we=P.r2l(U.range[0]),Se=P.r2l(U.range[1]),Ie=Se-we;O.d2pOppAxis=function(Re){return(Re-we)/Ie*O._height}}N.call(l,p,F,O).call(_,p,F,O).call(w,p,F,O).call(M,p,F,O,U).call(g,p,F,O).call(b,p,F,O),v(N,p,F,O),T(N,p,F,O,P,U),F.side==="bottom"&&o.draw(p,F._id+"title",{propContainer:F,propName:F._name+".title.text",placeholder:u._dfltTitle.x,attributes:{x:F._offset+F._length/2,y:G+O._height+O._offsetShift+10+1.5*F.title.font.size,"text-anchor":"middle"}})}))};function f(p){return typeof p.clientX=="number"?p.clientX:p.touches&&p.touches.length>0?p.touches[0].clientX:0}function v(p,u,y,m){if(u._context.staticPlot)return;var R=p.select("rect."+h.slideBoxClassName).node(),L=p.select("rect."+h.grabAreaMinClassName).node(),z=p.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=d.event,O=N.target,P=f(N),U=P-p.node().getBoundingClientRect().left,B=m.d2p(y._rl[0]),X=m.d2p(y._rl[1]),$=i.coverSlip();this.addEventListener("touchmove",le),this.addEventListener("touchend",ce),$.addEventListener("mousemove",le),$.addEventListener("mouseup",ce);function le(de){var G=f(de),Y=+G-P,ee,q,se;switch(O){case R:if(se="ew-resize",B+Y>y._length||X+Y<0)return;ee=B+Y,q=X+Y;break;case L:if(se="col-resize",B+Y>y._length)return;ee=B+Y,q=X;break;case z:if(se="col-resize",X+Y<0)return;ee=B,q=X+Y;break;default:se="ew-resize",ee=U,q=U+Y;break}if(q<ee){var ae=q;q=ee,ee=ae}m._pixelMin=ee,m._pixelMax=q,s(d.select($),se),c(p,u,y,m)}function ce(){$.removeEventListener("mousemove",le),$.removeEventListener("mouseup",ce),this.removeEventListener("touchmove",le),this.removeEventListener("touchend",ce),E.removeElement($)}}p.on("mousedown",F),p.on("touchstart",F)}function c(p,u,y,m){function R(F){return y.l2r(E.constrain(F,m._rl[0],m._rl[1]))}var L=R(m.p2d(m._pixelMin)),z=R(m.p2d(m._pixelMax));window.requestAnimationFrame(function(){x.call("_guiRelayout",u,y._name+".range",[L,z])})}function T(p,u,y,m,R,L){var z=h.handleWidth/2;function F(de){return E.constrain(de,0,m._width)}function N(de){return E.constrain(de,0,m._height)}function O(de){return E.constrain(de,-z,m._width+z)}var P=F(m.d2p(y._rl[0])),U=F(m.d2p(y._rl[1]));if(p.select("rect."+h.slideBoxClassName).attr("x",P).attr("width",U-P),p.select("rect."+h.maskMinClassName).attr("width",P),p.select("rect."+h.maskMaxClassName).attr("x",U).attr("width",m._width-U),L.rangemode!=="match"){var B=m._height-N(m.d2pOppAxis(R._rl[1])),X=m._height-N(m.d2pOppAxis(R._rl[0]));p.select("rect."+h.maskMinOppAxisClassName).attr("x",P).attr("height",B).attr("width",U-P),p.select("rect."+h.maskMaxOppAxisClassName).attr("x",P).attr("y",X).attr("height",m._height-X).attr("width",U-P),p.select("rect."+h.slideBoxClassName).attr("y",B).attr("height",X-B)}var $=.5,le=Math.round(O(P-z))-$,ce=Math.round(O(U-z))+$;p.select("g."+h.grabberMinClassName).attr("transform",e(le,$)),p.select("g."+h.grabberMaxClassName).attr("transform",e(ce,$))}function l(p,u,y,m){var R=E.ensureSingle(p,"rect",h.bgClassName,function(N){N.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),L=m.borderwidth%2===0?m.borderwidth:m.borderwidth-1,z=-m._offsetShift,F=t.crispRound(u,m.borderwidth);R.attr({width:m._width+L,height:m._height+L,transform:e(z,z),"stroke-width":F}).call(r.stroke,m.bordercolor).call(r.fill,m.bgcolor)}function _(p,u,y,m){var R=u._fullLayout,L=E.ensureSingleById(R._topdefs,"clipPath",m._clipId,function(z){z.append("rect").attr({x:0,y:0})});L.select("rect").attr({width:m._width,height:m._height})}function w(p,u,y,m){var R=u.calcdata,L=p.selectAll("g."+h.rangePlotClassName).data(y._subplotsWith,E.identity);L.enter().append("g").attr("class",function(F){return h.rangePlotClassName+" "+F}).call(t.setClipUrl,m._clipId,u),L.order(),L.exit().remove();var z;L.each(function(F,N){var O=d.select(this),P=N===0,U=n.getFromId(u,F,"y"),B=U._name,X=m[B],$={data:[],layout:{xaxis:{type:y.type,domain:[0,1],range:m.range.slice(),calendar:y.calendar},width:m._width,height:m._height,margin:{t:0,b:0,l:0,r:0}},_context:u._context};y.rangebreaks&&($.layout.xaxis.rangebreaks=y.rangebreaks),$.layout[B]={type:U.type,domain:[0,1],range:X.rangemode!=="match"?X.range.slice():U.range.slice(),calendar:U.calendar},U.rangebreaks&&($.layout[B].rangebreaks=U.rangebreaks),S.supplyDefaults($);var le=$._fullLayout.xaxis,ce=$._fullLayout[B];le.clearCalc(),le.setScale(),ce.clearCalc(),ce.setScale();var de={id:F,plotgroup:O,xaxis:le,yaxis:ce,isRangePlot:!0};P?z=de:(de.mainplot="xy",de.mainplotinfo=z),a.rangePlot(u,de,A(R,F))})}function A(p,u){for(var y=[],m=0;m<p.length;m++){var R=p[m],L=R[0].trace;L.xaxis+L.yaxis===u&&y.push(R)}return y}function M(p,u,y,m,R){var L=E.ensureSingle(p,"rect",h.maskMinClassName,function(O){O.attr({x:0,y:0,"shape-rendering":"crispEdges"})});L.attr("height",m._height).call(r.fill,h.maskColor);var z=E.ensureSingle(p,"rect",h.maskMaxClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});if(z.attr("height",m._height).call(r.fill,h.maskColor),R.rangemode!=="match"){var F=E.ensureSingle(p,"rect",h.maskMinOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});F.attr("width",m._width).call(r.fill,h.maskOppAxisColor);var N=E.ensureSingle(p,"rect",h.maskMaxOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});N.attr("width",m._width).style("border-top",h.maskOppBorder).call(r.fill,h.maskOppAxisColor)}}function g(p,u,y,m){if(!u._context.staticPlot){var R=E.ensureSingle(p,"rect",h.slideBoxClassName,function(L){L.attr({y:0,cursor:h.slideBoxCursor,"shape-rendering":"crispEdges"})});R.attr({height:m._height,fill:h.slideBoxFill})}}function b(p,u,y,m){var R=E.ensureSingle(p,"g",h.grabberMinClassName),L=E.ensureSingle(p,"g",h.grabberMaxClassName),z={x:0,width:h.handleWidth,rx:h.handleRadius,fill:r.background,stroke:r.defaultLine,"stroke-width":h.handleStrokeWidth,"shape-rendering":"crispEdges"},F={y:Math.round(m._height/4),height:Math.round(m._height/2)},N=E.ensureSingle(R,"rect",h.handleMinClassName,function(X){X.attr(z)});N.attr(F);var O=E.ensureSingle(L,"rect",h.handleMaxClassName,function(X){X.attr(z)});O.attr(F);var P={width:h.grabAreaWidth,x:0,y:0,fill:h.grabAreaFill,cursor:u._context.staticPlot?void 0:h.grabAreaCursor},U=E.ensureSingle(R,"rect",h.grabAreaMinClassName,function(X){X.attr(P)});U.attr("height",m._height);var B=E.ensureSingle(L,"rect",h.grabAreaMaxClassName,function(X){X.attr(P)});B.attr("height",m._height)}}}),k9=He({"src/components/rangeslider/index.js"(Z,V){"use strict";var d=sa(),x=O2(),S=H5(),E=A9();V.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:d.extendFlat({},x,{yaxis:S})}}},layoutAttributes:O2(),handleDefaults:S9(),calcAutorange:M9(),draw:E9(),isVisible:E.isVisible,makeData:E.makeData,autoMarginOpts:E.autoMarginOpts}}}),N2=He({"src/components/rangeselector/attributes.js"(Z,V){"use strict";var d=tc(),x=sh(),S=zl().templatedArray,E=S("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"});V.exports={visible:{valType:"boolean",editType:"plot"},buttons:E,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:d({editType:"plot"}),bgcolor:{valType:"color",dflt:x.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}}),W5=He({"src/components/rangeselector/constants.js"(Z,V){"use strict";V.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),C9=He({"src/components/rangeselector/defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=hp(),e=N2(),t=W5();V.exports=function(n,i,s,h,f){var v=n.rangeselector||{},c=S.newContainer(i,"rangeselector");function T(M,g){return d.coerce(v,c,e,M,g)}var l=E(v,c,{name:"buttons",handleItemDefaults:r,calendar:f}),_=T("visible",l.length>0);if(_){var w=o(i,s,h);T("x",w[0]),T("y",w[1]),d.noneOrAll(n,i,["x","y"]),T("xanchor"),T("yanchor"),d.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",x.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,n,i,s){var h=s.calendar;function f(T,l){return d.coerce(a,n,e.buttons,T,l)}var v=f("visible");if(v){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?n.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,n,i){for(var s=i.filter(function(c){return n[c].anchor===a._id}),h=0,f=0;f<s.length;f++){var v=n[s[f]].domain;v&&(h=Math.max(v[1],h))}return[a.domain[0],h+t.yPad]}}}),L9=He({"src/components/rangeselector/get_update_object.js"(Z,V){"use strict";var d=dd(),x=sa().titleCase;V.exports=function(e,t){var r=e._name,o={};if(t.step==="all")o[r+".autorange"]=!0;else{var a=S(e,t);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o};function S(E,e){var t=E.range,r=new Date(E.r2l(t[1])),o=e.step,a=d["utc"+x(o)],n=e.count,i;switch(e.stepmode){case"backward":i=E.l2r(+a.offset(r,-n));break;case"todate":var s=a.offset(r,-n);i=E.l2r(+a.ceil(s));break}var h=t[1];return[i,h]}}}),P9=He({"src/components/rangeselector/draw.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=bc(),E=Jn(),e=es(),t=sa(),r=t.strTranslate,o=ou(),a=ef(),n=uh(),i=n.LINE_SPACING,s=n.FROM_TL,h=n.FROM_BR,f=W5(),v=L9();V.exports=function(p){var u=p._fullLayout,y=u._infolayer.selectAll(".rangeselector").data(c(p),T);y.enter().append("g").classed("rangeselector",!0),y.exit().remove(),y.style({cursor:"pointer","pointer-events":"all"}),y.each(function(m){var R=d.select(this),L=m,z=L.rangeselector,F=R.selectAll("g.button").data(t.filterVisible(z.buttons));F.enter().append("g").classed("button",!0),F.exit().remove(),F.each(function(N){var O=d.select(this),P=v(L,N);N._isActive=l(L,N,P),O.call(_,z,N),O.call(A,z,N,p),O.on("click",function(){p._dragged||x.call("_guiRelayout",p,P)}),O.on("mouseover",function(){N._isHovered=!0,O.call(_,z,N)}),O.on("mouseout",function(){N._isHovered=!1,O.call(_,z,N)})}),g(p,F,z,L._name,R)})};function c(b){for(var p=a.list(b,"x",!0),u=[],y=0;y<p.length;y++){var m=p[y];m.rangeselector&&m.rangeselector.visible&&u.push(m)}return u}function T(b){return b._id}function l(b,p,u){if(p.step==="all")return b.autorange===!0;var y=Object.keys(u);return b.range[0]===u[y[0]]&&b.range[1]===u[y[1]]}function _(b,p,u){var y=t.ensureSingle(b,"rect","selector-rect",function(m){m.attr("shape-rendering","crispEdges")});y.attr({rx:f.rx,ry:f.ry}),y.call(E.stroke,p.bordercolor).call(E.fill,w(p,u)).style("stroke-width",p.borderwidth+"px")}function w(b,p){return p._isActive||p._isHovered?b.activecolor:b.bgcolor}function A(b,p,u,y){function m(L){o.convertToTspans(L,y)}var R=t.ensureSingle(b,"text","selector-text",function(L){L.attr("text-anchor","middle")});R.call(e.font,p.font).text(M(u,y._fullLayout._meta)).call(m)}function M(b,p){return b.label?p?t.templateString(b.label,p):b.label:b.step==="all"?"all":b.count+b.step.charAt(0)}function g(b,p,u,y,m){var R=0,L=0,z=u.borderwidth;p.each(function(){var B=d.select(this),X=B.select(".selector-text"),$=u.font.size*i,le=Math.max($*o.lineCount(X),16)+3;L=Math.max(L,le)}),p.each(function(){var B=d.select(this),X=B.select(".selector-rect"),$=B.select(".selector-text"),le=$.node()&&e.bBox($.node()).width,ce=u.font.size*i,de=o.lineCount($),G=Math.max(le+10,f.minButtonWidth);B.attr("transform",r(z+R,z)),X.attr({x:0,y:0,width:G,height:L}),o.positionText($,G/2,L/2-(de-1)*ce/2+3),R+=G+5});var F=b._fullLayout._size,N=F.l+F.w*u.x,O=F.t+F.h*(1-u.y),P="left";t.isRightAnchor(u)&&(N-=R,P="right"),t.isCenterAnchor(u)&&(N-=R/2,P="center");var U="top";t.isBottomAnchor(u)&&(O-=L,U="bottom"),t.isMiddleAnchor(u)&&(O-=L/2,U="middle"),R=Math.ceil(R),L=Math.ceil(L),N=Math.round(N),O=Math.round(O),S.autoMargin(b,y+"-range-selector",{x:u.x,y:u.y,l:R*s[P],r:R*h[P],b:L*h[U],t:L*s[U]}),m.attr("transform",r(N,O))}}}),I9=He({"src/components/rangeselector/index.js"(Z,V){"use strict";V.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:N2()}}},layoutAttributes:N2(),handleDefaults:C9(),draw:P9()}}}),wc=He({"src/plots/domain.js"(Z){"use strict";var V=Qo().extendFlat;Z.attributes=function(d,x){d=d||{},x=x||{};var S={valType:"info_array",editType:d.editType,items:[{valType:"number",min:0,max:1,editType:d.editType},{valType:"number",min:0,max:1,editType:d.editType}],dflt:[0,1]},E=d.name?d.name+" ":"",e=d.trace?"trace ":"subplot ",t=x.description?" "+x.description:"",r={x:V({},S,{}),y:V({},S,{}),editType:d.editType};return d.noGridCell||(r.row={valType:"integer",min:0,dflt:0,editType:d.editType},r.column={valType:"integer",min:0,dflt:0,editType:d.editType}),r},Z.defaults=function(d,x,S,E){var e=E&&E.x||[0,1],t=E&&E.y||[0,1],r=x.grid;if(r){var o=S("domain.column");o!==void 0&&(o<r.columns?e=r._domains.x[o]:delete d.domain.column);var a=S("domain.row");a!==void 0&&(a<r.rows?t=r._domains.y[a]:delete d.domain.row)}var n=S("domain.x",e),i=S("domain.y",t);n[0]<n[1]||(d.domain.x=e.slice()),i[0]<i[1]||(d.domain.y=t.slice())}}}),X5=He({"src/components/grid/index.js"(Z,V){"use strict";var d=sa(),x=Jy().counter,S=wc().attributes,E=lh().idRegex,e=zl(),t={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:[x("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[E.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[E.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:S({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 r(s,h,f){var v=h[f+"axes"],c=Object.keys((s._splomAxes||{})[f]||{});if(Array.isArray(v))return v;if(c.length)return c}function o(s,h){var f=s.grid||{},v=r(h,f,"x"),c=r(h,f,"y");if(!s.grid&&!v&&!c)return;var T=Array.isArray(f.subplots)&&Array.isArray(f.subplots[0]),l=Array.isArray(v),_=Array.isArray(c),w=l&&v!==f.xaxes&&_&&c!==f.yaxes,A,M;T?(A=f.subplots.length,M=f.subplots[0].length):(_&&(A=c.length),l&&(M=v.length));var g=e.newContainer(h,"grid");function b(O,P){return d.coerce(f,g,t,O,P)}var p=b("rows",A),u=b("columns",M);if(!(p*u>1)){delete h.grid;return}if(!T&&!l&&!_){var y=b("pattern")==="independent";y&&(T=!0)}g._hasSubplotGrid=T;var m=b("roworder"),R=m==="top to bottom",L=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),g._domains={x:a("x",b,L,F,u),y:a("y",b,z,N,p,R)}}function a(s,h,f,v,c,T){var l=h(s+"gap",f),_=h("domain."+s);h(s+"side",v);for(var w=new Array(c),A=_[0],M=(_[1]-A)/(c-l),g=M*(1-l),b=0;b<c;b++){var p=A+M*b;w[T?c-1-b:b]=[p,p+g]}return w}function n(s,h){var f=h.grid;if(!(!f||!f._domains)){var v=s.grid||{},c=h._subplots,T=f._hasSubplotGrid,l=f.rows,_=f.columns,w=f.pattern==="independent",A,M,g,b,p,u,y,m=f._axisMap={};if(T){var R=v.subplots||[];u=f.subplots=new Array(l);var L=1;for(A=0;A<l;A++){var z=u[A]=new Array(_),F=R[A]||[];for(M=0;M<_;M++)if(w?(p=L===1?"xy":"x"+L+"y"+L,L++):p=F[M],z[M]="",c.cartesian.indexOf(p)!==-1){if(y=p.indexOf("y"),g=p.slice(0,y),b=p.slice(y),m[g]!==void 0&&m[g]!==M||m[b]!==void 0&&m[b]!==A)continue;z[M]=p,m[g]=M,m[b]=A}}}else{var N=r(h,v,"x"),O=r(h,v,"y");f.xaxes=i(N,c.xaxis,_,m,"x"),f.yaxes=i(O,c.yaxis,l,m,"y")}var P=f._anchors={},U=f.roworder==="top to bottom";for(var B in m){var X=B.charAt(0),$=f[X+"side"],le,ce,de;if($.length<8)P[B]="free";else if(X==="x"){if($.charAt(0)==="t"===U?(le=0,ce=1,de=l):(le=l-1,ce=-1,de=-1),T){var G=m[B];for(A=le;A!==de;A+=ce)if(p=u[A][G],!!p&&(y=p.indexOf("y"),p.slice(0,y)===B)){P[B]=p.slice(y);break}}else for(A=le;A!==de;A+=ce)if(b=f.yaxes[A],c.cartesian.indexOf(B+b)!==-1){P[B]=b;break}}else if($.charAt(0)==="l"?(le=0,ce=1,de=_):(le=_-1,ce=-1,de=-1),T){var Y=m[B];for(A=le;A!==de;A+=ce)if(p=u[Y][A],!!p&&(y=p.indexOf("y"),p.slice(y)===B)){P[B]=p.slice(0,y);break}}else for(A=le;A!==de;A+=ce)if(g=f.xaxes[A],c.cartesian.indexOf(g+B)!==-1){P[B]=g;break}}}}function i(s,h,f,v,c){var T=new Array(f),l;function _(w,A){h.indexOf(A)!==-1&&v[A]===void 0?(T[w]=A,v[A]=w):T[w]=""}if(Array.isArray(s))for(l=0;l<f;l++)_(l,s[l]);else for(_(0,c),l=1;l<f;l++)_(l,c+(l+1));return T}V.exports={moduleType:"component",name:"grid",schema:{layout:{grid:t}},layoutAttributes:t,sizeDefaults:o,contentDefaults:n}}}),Z5=He({"src/components/errorbars/attributes.js"(Z,V){"use strict";V.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"}}}),R9=He({"src/components/errorbars/defaults.js"(Z,V){"use strict";var d=as(),x=lo(),S=sa(),E=zl(),e=Z5();V.exports=function(t,r,o,a){var n="error_"+a.axis,i=E.newContainer(r,n),s=t[n]||{};function h(w,A){return S.coerce(s,i,e,w,A)}var f=s.array!==void 0||s.value!==void 0||s.type==="sqrt",v=h("visible",f);if(v!==!1){var c=h("type","array"in s?"data":"percent"),T=!0;c!=="sqrt"&&(T=h("symmetric",!((c==="data"?"arrayminus":"valueminus")in s))),c==="data"?(h("array"),h("traceref"),T||(h("arrayminus"),h("tracerefminus"))):(c==="percent"||c==="constant")&&(h("value"),T||h("valueminus"));var l="copy_"+a.inherit+"style";if(a.inherit){var _=r["error_"+a.inherit];(_||{}).visible&&h(l,!(s.color||d(s.thickness)||d(s.width)))}(!a.inherit||!i[l])&&(h("color",o),h("thickness"),h("width",x.traceIs(r,"gl3d")?0:4))}}}}),Y5=He({"src/components/errorbars/compute_error.js"(Z,V){"use strict";V.exports=function(S){var E=S.type,e=S.symmetric;if(E==="data"){var t=S.array||[];if(e)return function(i,s){var h=+t[s];return[h,h]};var r=S.arrayminus||[];return function(i,s){var h=+t[s],f=+r[s];return!isNaN(h)||!isNaN(f)?[f||0,h||0]:[NaN,NaN]}}else{var o=d(E,S.value),a=d(E,S.valueminus);return e||S.valueminus===void 0?function(i){var s=o(i);return[s,s]}:function(i){return[a(i),o(i)]}}};function d(x,S){if(x==="percent")return function(E){return Math.abs(E*S/100)};if(x==="constant")return function(){return Math.abs(S)};if(x==="sqrt")return function(E){return Math.sqrt(Math.abs(E))}}}}),D9=He({"src/components/errorbars/calc.js"(Z,V){"use strict";var d=as(),x=lo(),S=Ho(),E=sa(),e=Y5();V.exports=function(o){for(var a=o.calcdata,n=0;n<a.length;n++){var i=a[n],s=i[0].trace;if(s.visible===!0&&x.traceIs(s,"errorBarsOK")){var h=S.getFromId(o,s.xaxis),f=S.getFromId(o,s.yaxis);t(i,s,h,"x"),t(i,s,f,"y")}}};function t(r,o,a,n){var i=o["error_"+n]||{},s=i.visible&&["linear","log"].indexOf(a.type)!==-1,h=[];if(s){for(var f=e(i),v=0;v<r.length;v++){var c=r[v],T=c.i;if(T===void 0)T=v;else if(T===null)continue;var l=c[n];if(d(a.c2l(l))){var _=f(l,T);if(d(_[0])&&d(_[1])){var w=c[n+"s"]=l-_[0],A=c[n+"h"]=l+_[1];h.push(w,A)}}}var M=a._id,g=o._extremes[M],b=S.findExtremes(a,h,E.extendFlat({tozero:g.opts.tozero},{padded:!0}));g.min=g.min.concat(b.min),g.max=g.max.concat(b.max)}}}}),z9=He({"src/components/errorbars/plot.js"(Z,V){"use strict";var d=Wn(),x=as(),S=es(),E=Fu();V.exports=function(r,o,a,n){var i,s=a.xaxis,h=a.yaxis,f=n&&n.duration>0,v=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},_=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=E.hasMarkers(T)&&T.marker.maxdisplayed>0;!_.visible&&!l.visible&&(c=[]);var M=d.select(this).selectAll("g.errorbar").data(c,w);if(M.exit().remove(),!!c.length){l.visible||M.selectAll("path.xerror").remove(),_.visible||M.selectAll("path.yerror").remove(),M.style("opacity",1);var g=M.enter().append("g").classed("errorbar",!0);f&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),S.setClipUrl(M,a.layerClipId,r),M.each(function(b){var p=d.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var y,m=p.select("path.yerror");if(_.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var R=_.width;y="M"+(u.x-R)+","+u.yh+"h"+2*R+"m-"+R+",0V"+u.ys,u.noYS||(y+="m-"+R+",0h"+2*R),i=!m.size(),i?m=p.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("yerror",!0):f&&(m=m.transition().duration(n.duration).ease(n.easing)),m.attr("d",y)}else m.remove();var L=p.select("path.xerror");if(l.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var z=(l.copy_ystyle?_:l).width;y="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(y+="m0,-"+z+"v"+2*z),i=!L.size(),i?L=p.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("xerror",!0):f&&(L=L.transition().duration(n.duration).ease(n.easing)),L.attr("d",y)}else L.remove()}})}})};function e(t,r,o){var a={x:r.c2p(t.x),y:o.c2p(t.y)};return t.yh!==void 0&&(a.yh=o.c2p(t.yh),a.ys=o.c2p(t.ys),x(a.ys)||(a.noYS=!0,a.ys=o.c2p(t.ys,!0))),t.xh!==void 0&&(a.xh=r.c2p(t.xh),a.xs=r.c2p(t.xs),x(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),F9=He({"src/components/errorbars/style.js"(Z,V){"use strict";var d=Wn(),x=Jn();V.exports=function(E){E.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=d.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(x.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(x.stroke,o.color)})}}}),O9=He({"src/components/errorbars/index.js"(Z,V){"use strict";var d=sa(),x=pc().overrideAll,S=Z5(),E={error_x:d.extendFlat({},S),error_y:d.extendFlat({},S)};delete E.error_x.copy_zstyle,delete E.error_y.copy_zstyle,delete E.error_y.copy_ystyle;var e={error_x:d.extendFlat({},S),error_y:d.extendFlat({},S),error_z:d.extendFlat({},S)};delete e.error_x.copy_ystyle,delete e.error_y.copy_ystyle,delete e.error_z.copy_ystyle,delete e.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:E,bar:E,histogram:E,scatter3d:x(e,"calc","nested"),scattergl:x(E,"calc","nested")}},supplyDefaults:R9(),calc:D9(),makeComputeError:Y5(),plot:z9(),style:F9(),hoverInfo:t};function t(r,o,a){(o.error_y||{}).visible&&(a.yerr=r.yh-r.y,o.error_y.symmetric||(a.yerrneg=r.y-r.ys)),(o.error_x||{}).visible&&(a.xerr=r.xh-r.x,o.error_x.symmetric||(a.xerrneg=r.x-r.xs))}}}),B9=He({"src/components/colorbar/constants.js"(Z,V){"use strict";V.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"}}}}),N9=He({"src/components/colorbar/draw.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=bc(),E=lo(),e=Ho(),t=Ap(),r=sa(),o=r.strTranslate,a=Qo().extendFlat,n=Kd(),i=es(),s=Jn(),h=K0(),f=ou(),v=wp().flipScale,c=F_(),T=R2(),l=Wh(),_=uh(),w=_.LINE_SPACING,A=_.FROM_TL,M=_.FROM_BR,g=B9().cn;function b(L){var z=L._fullLayout,F=z._infolayer.selectAll("g."+g.colorbar).data(p(L),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(g.colorbar,!0),F.each(function(N){var O=d.select(this);r.ensureSingle(O,"rect",g.cbbg),r.ensureSingle(O,"g",g.cbfills),r.ensureSingle(O,"g",g.cblines),r.ensureSingle(O,"g",g.cbaxis,function(U){U.classed(g.crisp,!0)}),r.ensureSingle(O,"g",g.cbtitleunshift,function(U){U.append("g").classed(g.cbtitle,!0)}),r.ensureSingle(O,"rect",g.cboutline);var P=u(O,N,L);P&&P.then&&(L._promises||[]).push(P),L._context.edits.colorbarPosition&&y(O,N,L)}),F.exit().each(function(N){S.autoMargin(L,N._id)}).remove(),F.order()}function p(L){var z=L._fullLayout,F=L.calcdata,N=[],O,P,U,B;function X(j){return a(j,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function $(){typeof B.calc=="function"?B.calc(L,U,O):(O._fillgradient=P.reversescale?v(P.colorscale):P.colorscale,O._zrange=[P[B.min],P[B.max]])}for(var le=0;le<F.length;le++){var ce=F[le];if(U=ce[0].trace,!!U._module){var de=U._module.colorbar;if(U.visible===!0&&de)for(var G=Array.isArray(de),Y=G?de:[de],ee=0;ee<Y.length;ee++){B=Y[ee];var q=B.container;P=q?U[q]:U,P&&P.showscale&&(O=X(P.colorbar),O._id="cb"+U.uid+(G&&q?"-"+q:""),O._traceIndex=U.index,O._propPrefix=(q?q+".":"")+"colorbar.",O._meta=U._meta,$(),N.push(O))}}}for(var se in z._colorAxes)if(P=z[se],P.showscale){var ae=z._colorAxes[se];O=X(P.colorbar),O._id="cb"+se,O._propPrefix=se+".colorbar.",O._meta=z._meta,B={min:"cmin",max:"cmax"},ae[0]!=="heatmap"&&(U=ae[1],B.calc=U._module.colorbar.calc),$(),N.push(O)}return N}function u(L,z,F){var N=z.orientation==="v",O=z.len,P=z.lenmode,U=z.thickness,B=z.thicknessmode,X=z.outlinewidth,$=z.borderwidth,le=z.bgcolor,ce=z.xanchor,de=z.yanchor,G=z.xpad,Y=z.ypad,ee=z.x,q=N?z.y:1-z.y,se=z.yref==="paper",ae=z.xref==="paper",j=F._fullLayout,Q=j._size,re=z._fillcolor,pe=z._line,we=z.title,Se=we.side,Ie=z._zrange||d.extent((typeof re=="function"?re:pe.color).domain()),Re=typeof pe.color=="function"?pe.color:function(){return pe.color},We=typeof re=="function"?re:function(){return re},at=z._levels,nt=m(F,z,Ie),tt=nt.fill,qe=nt.line,he=Math.round(U*(B==="fraction"?N?Q.w:Q.h:1)),ue=he/(N?Q.w:Q.h),ne=Math.round(O*(P==="fraction"?N?Q.h:Q.w:1)),Ce=ne/(N?Q.h:Q.w),Ye=ae?Q.w:F._fullLayout.width,rt=se?Q.h:F._fullLayout.height,Ke=Math.round(N?ee*Ye+G:q*rt+Y),Mt={center:.5,right:1}[ce]||0,kt={top:1,middle:.5}[de]||0,Nt=N?ee-Mt*ue:q-kt*ue,Gt=N?q-kt*Ce:ee-Mt*Ce,Mr=Math.round(N?rt*(1-Gt):Ye*Gt);z._lenFrac=Ce,z._thickFrac=ue,z._uFrac=Nt,z._vFrac=Gt;var mr=z._axis=R(F,z,Ie);mr.position=ue+(N?ee+G/Q.w:q+Y/Q.h);var qr=["top","bottom"].indexOf(Se)!==-1;if(N&&qr&&(mr.title.side=Se,mr.titlex=ee+G/Q.w,mr.titley=Gt+(we.side==="top"?Ce-Y/Q.h:Y/Q.h)),!N&&!qr&&(mr.title.side=Se,mr.titley=q+Y/Q.h,mr.titlex=Gt+G/Q.w),pe.color&&z.tickmode==="auto"){mr.tickmode="linear",mr.tick0=at.start;var Er=at.size,Ir=r.constrain(ne/50,4,15)+1,_t=(Ie[1]-Ie[0])/((z.nticks||Ir)*Er);if(_t>1){var Oe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));Er*=Oe*r.roundUp(_t/Oe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(mr.tick0=0)}mr.dtick=Er}mr.domain=N?[Gt+Y/Q.h,Gt+Ce-Y/Q.h]:[Gt+G/Q.w,Gt+Ce-G/Q.w],mr.setScale(),L.attr("transform",o(Math.round(Q.l),Math.round(Q.t)));var Je=L.select("."+g.cbtitleunshift).attr("transform",o(-Math.round(Q.l),-Math.round(Q.t))),Ae=mr.ticklabelposition,Le=mr.title.font.size,Ue=L.select("."+g.cbaxis),Ze,st=0,ut=0;function Ut(ur,sr){var Pr={propContainer:mr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:L.select("."+g.cbtitle)},Ta=ur.charAt(0)==="h"?ur.slice(1):"h"+ur;L.selectAll("."+Ta+",."+Ta+"-math-group").remove(),h.draw(F,ur,a(Pr,sr||{}))}function Ct(){if(N&&qr||!N&&!qr){var ur,sr;Se==="top"&&(ur=G+Q.l+Ye*ee,sr=Y+Q.t+rt*(1-Gt-Ce)+3+Le*.75),Se==="bottom"&&(ur=G+Q.l+Ye*ee,sr=Y+Q.t+rt*(1-Gt)-3-Le*.25),Se==="right"&&(sr=Y+Q.t+rt*q+3+Le*.75,ur=G+Q.l+Ye*Gt),Ut(mr._id+"title",{attributes:{x:ur,y:sr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var ur=mr.position||0,sr=mr._offset+mr._length/2,Pr,Ta;if(Se==="right")Ta=sr,Pr=Q.l+Ye*ur+10+Le*(mr.showticklabels?1:.5);else if(Pr=sr,Se==="bottom"&&(Ta=Q.t+rt*ur+10+(Ae.indexOf("inside")===-1?mr.tickfont.size:0)+(mr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Oa=we.text.split("<br>").length;Ta=Q.t+rt*ur+10-he-w*Le*Oa}Ut((N?"h":"v")+mr._id+"title",{avoid:{selection:d.select(F).selectAll("g."+mr._id+"tick"),side:Se,offsetTop:N?0:Q.t,offsetLeft:N?Q.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:Ta,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var ur=L.select("."+g.cbtitle),sr=ur.select("text"),Pr=[-X/2,X/2],Ta=ur.select(".h"+mr._id+"title-math-group").node(),Oa=15.6;sr.node()&&(Oa=parseInt(sr.node().style.fontSize,10)*w);var Ia;if(Ta?(Ia=i.bBox(Ta),ut=Ia.width,st=Ia.height,st>Oa&&(Pr[1]-=(st-Oa)/2)):sr.node()&&!sr.classed(g.jsPlaceholder)&&(Ia=i.bBox(sr.node()),ut=Ia.width,st=Ia.height),N){if(st){if(st+=5,Se==="top")mr.domain[1]-=st/Q.h,Pr[1]*=-1;else{mr.domain[0]+=st/Q.h;var qa=f.lineCount(sr);Pr[1]+=(1-qa)*Oa}ur.attr("transform",o(Pr[0],Pr[1])),mr.setScale()}}else ut&&(Se==="right"&&(mr.domain[0]+=(ut+Le/2)/Q.w),ur.attr("transform",o(Pr[0],Pr[1])),mr.setScale())}L.selectAll("."+g.cbfills+",."+g.cblines).attr("transform",N?o(0,Math.round(Q.h*(1-mr.domain[1]))):o(Math.round(Q.w*mr.domain[0]),0)),Ue.attr("transform",N?o(0,Math.round(-Q.t)):o(Math.round(-Q.l),0));var Wa=L.select("."+g.cbfills).selectAll("rect."+g.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(g.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Ie.map(mr.c2p).map(Math.round).sort(function(Yt,Jt){return Yt-Jt});Wa.each(function(Yt,Jt){var Fr=[Jt===0?Ie[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Ie[1]:(tt[Jt]+tt[Jt+1])/2].map(mr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=d.select(this).attr(N?"x":"y",Ke).attr(N?"y":"x",d.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(d.max(Fr)-d.min(Fr),2));if(z._fillgradient)i.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=We(Yt).replace("e-","");ta.attr("fill",x(ra).toHexString())}});var hi=L.select("."+g.cblines).selectAll("path."+g.cbline).data(pe.color&&pe.width?qe:[]);hi.enter().append("path").classed(g.cbline,!0),hi.exit().remove(),hi.each(function(Yt){var Jt=Ke,Fr=Math.round(mr.c2p(Yt))+pe.width/2%1;d.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(i.lineGroupStyle,pe.width,Re(Yt),pe.dash)}),Ue.selectAll("g."+mr._id+"tick,path").remove();var wi=Ke+he+(X||0)/2-(z.ticks==="outside"?1:0),Kt=e.calcTicks(mr),Dt=e.getTickSigns(mr)[2];return e.drawTicks(F,mr,{vals:mr.ticks==="inside"?e.clipEnds(mr,Kt):Kt,layer:Ue,path:e.makeTickPath(mr,wi,Dt),transFn:e.makeTransTickFn(mr)}),e.drawLabels(F,mr,{vals:Kt,layer:Ue,transFn:e.makeTransTickLabelFn(mr),labelFns:e.makeLabelFns(mr,wi)})}function fr(){var ur,sr=he+X/2;Ae.indexOf("inside")===-1&&(ur=i.bBox(Ue.node()),sr+=N?ur.width:ur.height),Ze=Je.select("text");var Pr=0,Ta=N&&Se==="top",Oa=!N&&Se==="right",Ia=0;if(Ze.node()&&!Ze.classed(g.jsPlaceholder)){var qa,Wa=Je.select(".h"+mr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(ur=i.bBox(Wa),Pr=ur.width,qa=ur.height):(ur=i.bBox(Je.node()),Pr=ur.right-Q.l-(N?Ke:Mr),qa=ur.bottom-Q.t-(N?Mr:Ke),!N&&Se==="top"&&(sr+=ur.height,Ia=ur.height)),Oa&&(Ze.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),sr=Math.max(sr,N?Pr:qa)}var Ca=(N?G:Y)*2+sr+$+X/2,hi=0;!N&&we.text&&de==="bottom"&&q<=0&&(hi=Ca/2,Ca+=hi,Ia+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ia;var wi=$+X,Kt=(N?Ke:Mr)-wi/2-(N?G:0),Dt=(N?Mr:Ke)-(N?ne:Y+Ia-hi);L.select("."+g.cbbg).attr("x",Kt).attr("y",Dt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,le).call(s.stroke,z.bordercolor).style("stroke-width",$);var Yt=Oa?Math.max(Pr-10,0):0;L.selectAll("."+g.cboutline).attr("x",(N?Ke:Mr+G)+Yt).attr("y",(N?Mr+Y-ne:Ke)+(Ta?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*Y+st:2*G+Yt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":X});var Jt=N?Mt*Ca:0,Fr=N?0:(1-kt)*Ca-Ia;if(Jt=ae?Q.l-Jt:-Jt,Fr=se?Q.t-Fr:-Fr,L.attr("transform",o(Jt,Fr)),!N&&($||x(le).getAlpha()&&!x.equals(j.paper_bgcolor,le))){var ta=Ue.selectAll("text"),ra=ta[0].length,ca=L.select("."+g.cbbg).node(),Ba=i.bBox(ca),$a=i.getTranslate(L),Za=2;ta.each(function(Cr,xr){var Rr=0,Ur=ra-1;if(xr===Rr||xr===Ur){var Hr=i.bBox(this),gt=i.getTranslate(this),Xt;if(xr===Ur){var vr=Hr.right+gt.x,Or=Ba.right+$a.x+Mr-$-Za+ee;Xt=Or-vr,Xt>0&&(Xt=0)}else if(xr===Rr){var ba=Hr.left+gt.x,Pa=Ba.left+$a.x+Mr+$+Za;Xt=Pa-ba,Xt<0&&(Xt=0)}Xt&&(ra<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ra=M[ce],an=A[de],tn=M[de],fn=Ca-he;N?(P==="pixels"?(ri.y=q,ri.t=ne*an,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=q+O*an,ri.yb=q-O*tn),B==="pixels"?(ri.x=ee,ri.l=Ca*pi,ri.r=Ca*Ra):(ri.l=fn*pi,ri.r=fn*Ra,ri.xl=ee-U*pi,ri.xr=ee+U*Ra)):(P==="pixels"?(ri.x=ee,ri.l=ne*pi,ri.r=ne*Ra):(ri.l=ri.r=0,ri.xl=ee+O*pi,ri.xr=ee-O*Ra),B==="pixels"?(ri.y=1-q,ri.t=Ca*an,ri.b=Ca*tn):(ri.t=fn*an,ri.b=fn*tn,ri.yt=q-U*an,ri.yb=q+U*tn));var xt=z.y<.5?"b":"t",lt=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Br={r:j.width-Kt-Jt,l:Kt+ri.r,b:j.height-Dt-Fr,t:Dt+ri.b};ae&&se?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Br[xt]:se||N?F._fullLayout._reservedMargin[z._id][lt]=Br[lt]:F._fullLayout._reservedMargin[z._id][xt]=Br[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,fr],F)}function y(L,z,F){var N=z.orientation==="v",O=F._fullLayout,P=O._size,U,B,X;t.init({element:L.node(),gd:F,prepFn:function(){U=L.attr("transform"),n(L)},moveFn:function($,le){L.attr("transform",U+o($,le)),B=t.align((N?z._uFrac:z._vFrac)+$/P.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),X=t.align((N?z._vFrac:1-z._uFrac)-le/P.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,X,z.xanchor,z.yanchor);n(L,ce)},doneFn:function(){if(n(L),B!==void 0&&X!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=X,z._traceIndex!==void 0?E.call("_guiRestyle",F,$,z._traceIndex):E.call("_guiRelayout",F,$)}}})}function m(L,z,F){var N=z._levels,O=[],P=[],U,B,X=N.end+N.size/100,$=N.size,le=1.001*F[0]-.001*F[1],ce=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=X:U<=X));B++)U>le&&U<ce&&O.push(U);if(z._fillgradient)P=[0];else if(typeof z._fillcolor=="function"){var de=z._filllevels;if(de)for(X=de.end+de.size/100,$=de.size,B=0;B<1e5&&(U=de.start+B*$,!($>0?U>=X:U<=X));B++)U>F[0]&&U<F[1]&&P.push(U);else P=O.map(function(G){return G-N.size/2}),P.push(P[P.length-1]+N.size)}else z._fillcolor&&typeof z._fillcolor=="string"&&(P=[0]);return N.size<0&&(O.reverse(),P.reverse()),{line:O,fill:P}}function R(L,z,F){var N=L._fullLayout,O=z.orientation==="v",P={type:"linear",range:F,tickmode:z.tickmode,nticks:z.nticks,tick0:z.tick0,dtick:z.dtick,tickvals:z.tickvals,ticktext:z.ticktext,ticks:z.ticks,ticklen:z.ticklen,tickwidth:z.tickwidth,tickcolor:z.tickcolor,showticklabels:z.showticklabels,labelalias:z.labelalias,ticklabelposition:z.ticklabelposition,ticklabeloverflow:z.ticklabeloverflow,ticklabelstep:z.ticklabelstep,tickfont:z.tickfont,tickangle:z.tickangle,tickformat:z.tickformat,exponentformat:z.exponentformat,minexponent:z.minexponent,separatethousands:z.separatethousands,showexponent:z.showexponent,showtickprefix:z.showtickprefix,tickprefix:z.tickprefix,showticksuffix:z.showticksuffix,ticksuffix:z.ticksuffix,title:z.title,showline:!0,anchor:"free",side:O?"right":"bottom",position:1},U=O?"y":"x",B={type:"linear",_id:U+z._id},X={letter:U,font:N.font,noAutotickangles:U==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:N.calendar};function $(le,ce){return r.coerce(P,B,l,le,ce)}return c(P,B,$,X,N),T(P,B,$,X),B}V.exports={draw:b}}}),U9=He({"src/components/colorbar/index.js"(Z,V){"use strict";V.exports={moduleType:"component",name:"colorbar",attributes:x2(),supplyDefaults:c5(),draw:N9().draw,hasColorbar:s5()}}}),j9=He({"src/components/legend/index.js"(Z,V){"use strict";V.exports={moduleType:"component",name:"legend",layoutAttributes:p5(),supplyLayoutDefaults:d5(),draw:y5(),style:g5()}}}),q9=He({"src/locale-en.js"(Z,V){"use strict";V.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"}}}}),V9=He({"src/locale-en-us.js"(Z,V){"use strict";V.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),K5=He({"src/snapshot/cloneplot.js"(Z,V){"use strict";var d=lo(),x=sa(),S=x.extendFlat,E=x.extendDeep;function e(r){var o;switch(r){case"themes__thumb":o={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":o={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:o={}}return o}function t(r){var o=["xaxis","yaxis","zaxis"];return o.indexOf(r.slice(0,5))>-1}V.exports=function(o,a){var n,i=o.data,s=o.layout,h=E([],i),f=E({},s,e(a.tileClass)),v=o._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var c=Object.keys(f);for(n=0;n<c.length;n++)t(c[n])&&(f[c[n]].title={text:""});for(n=0;n<h.length;n++){var T=h[n];T.showscale=!1,T.marker&&(T.marker.showscale=!1),d.traceIs(T,"pie-like")&&(T.textposition="none")}}if(Array.isArray(a.annotations))for(n=0;n<a.annotations.length;n++)f.annotations.push(a.annotations[n]);var l=Object.keys(f).filter(function(g){return g.match(/^scene\d*$/)});if(l.length){var _={};for(a.tileClass==="thumbnail"&&(_={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<l.length;n++){var w=f[l[n]];w.xaxis||(w.xaxis={}),w.yaxis||(w.yaxis={}),w.zaxis||(w.zaxis={}),S(w.xaxis,_),S(w.yaxis,_),S(w.zaxis,_),w._scene=null}}var A=document.createElement("div");a.tileClass&&(A.className=a.tileClass);var M={gd:A,td:A,layout:f,data:h,config:{staticPlot:a.staticPlot===void 0?!0:a.staticPlot,plotGlPixelRatio:a.plotGlPixelRatio===void 0?2:a.plotGlPixelRatio,displaylogo:a.displaylogo||!1,showLink:a.showLink||!1,showTips:a.showTips||!1,mapboxAccessToken:v.mapboxAccessToken}};return a.setBackground!=="transparent"&&(M.config.setBackground=a.setBackground||"opaque"),M.gd.defaultLayout=e(a.tileClass),M}}}),G9=He({"src/snapshot/toimage.js"(Z,V){"use strict";var d=Z0().EventEmitter,x=lo(),S=sa(),E=Yv(),e=K5(),t=C2(),r=L2();function o(a,n){var i=new d,s=e(a,{format:"png"}),h=s.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);function f(){var c=E.getDelay(h._fullLayout);setTimeout(function(){var T=t(h),l=document.createElement("canvas");l.id=S.randstr(),i=r({format:n.format,width:h._fullLayout.width,height:h._fullLayout.height,canvas:l,emitter:i,svg:T}),i.clean=function(){h&&document.body.removeChild(h)}},c)}var v=E.getRedrawFunc(h);return x.call("_doPlot",h,s.data,s.layout,s.config).then(v).then(f).catch(function(c){i.emit("error",c)}),i}V.exports=o}}),H9=He({"src/snapshot/index.js"(Z,V){"use strict";var d=Yv(),x={getDelay:d.getDelay,getRedrawFunc:d.getRedrawFunc,clone:K5(),toSVG:C2(),svgToImg:L2(),toImage:G9(),downloadImage:D5()};V.exports=x}}),W9=He({"src/core.js"(Z){"use strict";Z.version=fp().version,Ff(),az();var V=lo(),d=Z.register=V.register,x=Vz(),S=Object.keys(x);for(e=0;e<S.length;e++)E=S[e],E.charAt(0)!=="_"&&(Z[E]=x[E]),d({moduleType:"apiMethod",name:E,fn:x[E]});var E,e;d($z()),d([i9(),l9(),Af(),h9(),m9(),x9(),T9(),k9(),I9(),X5(),O9(),rc(),U9(),j9(),rf(),M5()]),d([q9(),V9()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(d(window.PlotlyLocales),delete window.PlotlyLocales),Z.Icons=w2();var t=rf(),r=bc();Z.Plots={resize:r.resize,graphJson:r.graphJson,sendDataToCloud:r.sendDataToCloud},Z.Fx={hover:t.hover,unhover:t.unhover,loneHover:t.loneHover,loneUnhover:t.loneUnhover},Z.Snapshot=H9(),Z.PlotSchema=e1()}}),X9=He({"lib/core.js"(Z,V){"use strict";V.exports=W9()}}),Sv=He({"src/traces/bar/attributes.js"(Z,V){"use strict";var d=af(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,texttemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=ku(),r=tc(),o=i0(),a=Gh().pattern,n=Qo().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),s=d.marker,h=s.line,f=n({},h.width,{dflt:0}),v=n({width:f,editType:"calc"},t("marker.line")),c=n({line:v,editType:"calc"},t("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:a,cornerradius:{valType:"any",editType:"calc"}});V.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),text:d.text,texttemplate:E({editType:"plot"},{keys:o.eventDataKeys}),texttemplatefallback:e({editType:"plot"}),hovertext:d.hovertext,hovertemplate:S({},{keys:o.eventDataKeys}),hovertemplatefallback:e(),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:n({},i,{}),insidetextfont:n({},i,{}),outsidetextfont:n({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:n({},d.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:c,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:{marker:{opacity:d.selected.marker.opacity,color:d.selected.marker.color,editType:"style"},textfont:d.selected.textfont,editType:"style"},unselected:{marker:{opacity:d.unselected.marker.opacity,color:d.unselected.marker.color,editType:"style"},textfont:d.unselected.textfont,editType:"style"},zorder:d.zorder}}}),U2=He({"src/traces/bar/layout_attributes.js"(Z,V){"use strict";V.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"}}}}),j2=He({"src/traces/bar/style_defaults.js"(Z,V){"use strict";var d=Jn(),x=wp().hasColorscale,S=_h(),E=sa().coercePattern;V.exports=function(t,r,o,a,n){var i=o("marker.color",a),s=x(t,"marker");s&&S(t,r,n,o,{prefix:"marker.",cLetter:"c"}),o("marker.line.color",d.defaultLine),x(t,"marker.line")&&S(t,r,n,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width"),o("marker.opacity"),E(o,"marker.pattern",i,s),o("selected.marker.color"),o("unselected.marker.color")}}}),gd=He({"src/traces/bar/defaults.js"(Z,V){"use strict";var d=as(),x=sa(),S=Jn(),E=lo(),e=n1(),t=Qd(),r=j2(),o=Q0(),a=Sv(),n=x.coerceFont;function i(v,c,T,l){function _(b,p){return x.coerce(v,c,a,b,p)}var w=e(v,c,l,_);if(!w){c.visible=!1;return}t(v,c,l,_),_("xhoverformat"),_("yhoverformat"),_("zorder"),_("orientation",c.x&&!c.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");f(v,c,l,_,A,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(v,c,_,T,l);var M=(c.marker.line||{}).color,g=E.getComponentMethod("errorbars","supplyDefaults");g(v,c,M||S.defaultLine,{axis:"y"}),g(v,c,M||S.defaultLine,{axis:"x",inherit:"y"}),x.coerceSelectionMarkerOpacity(c,_)}function s(v,c){var T,l;function _(M,g){return x.coerce(l._input,l,a,M,g)}for(var w=0;w<v.length;w++)if(l=v[w],l.type==="bar"){T=l._input;var A=_("marker.cornerradius",c.barcornerradius);l.marker&&(l.marker.cornerradius=h(A)),o(T,l,c,_,c.barmode)}}function h(v){if(d(v)){if(v=+v,v>=0)return v}else if(typeof v=="string"&&(v=v.trim(),v.slice(-1)==="%"&&d(v.slice(0,-1))&&(v=+v.slice(0,-1),v>=0)))return v+"%"}function f(v,c,T,l,_,w){w=w||{};var A=w.moduleHasSelected!==!1,M=w.moduleHasUnselected!==!1,g=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,p=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,y=!!w.hasPathbar,m=Array.isArray(_)||_==="auto",R=m||_==="inside",L=m||_==="outside";if(R||L){var z=n(l,"textfont",T.font),F=x.extendFlat({},z),N=v.textfont&&v.textfont.color,O=!N;if(O&&delete F.color,n(l,"insidetextfont",F),y){var P=x.extendFlat({},z);O&&delete P.color,n(l,"pathbar.textfont",P)}L&&n(l,"outsidetextfont",z),A&&l("selected.textfont.color"),M&&l("unselected.textfont.color"),g&&l("constraintext"),b&&l("cliponaxis"),p&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}R&&u&&l("insidetextanchor")}V.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,V){"use strict";var d=lo(),x=Ho(),S=sa(),E=U2(),e=gd().validateCornerradius;V.exports=function(t,r,o){function a(A,M){return S.coerce(t,r,E,A,M)}for(var n=!1,i=!1,s=!1,h={},f=a("barmode"),v=f==="group",c=0;c<o.length;c++){var T=o[c];if(d.traceIs(T,"bar")&&T.visible)n=!0;else continue;var l=T.xaxis+T.yaxis;if(v?(h[l]&&(s=!0),h[l]=!0):(l+=T._input.offsetgroup,h.length>0&&!h[l]&&(s=!0),h[l]=!0),T.visible&&T.type==="histogram"){var _=x.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}f!=="overlay"&&a("barnorm"),a("bargap",i&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;d.mergeArray(E.text,S,"tx"),d.mergeArray(E.hovertext,S,"htx");var t=E.marker;if(t){d.mergeArray(t.opacity,S,"mo",!0),d.mergeArray(t.color,S,"mc");var r=t.line;r&&(d.mergeArray(r.color,S,"mlc"),d.mergeArrayCastPositive(r.width,S,"mlw"))}}}}),Z9=He({"src/traces/bar/calc.js"(Z,V){"use strict";var d=Ho(),x=tv(),S=wp().hasColorscale,E=Tp(),e=B_(),t=Od();V.exports=function(o,a){var n=d.getFromId(o,a.xaxis||"x"),i=d.getFromId(o,a.yaxis||"y"),s,h,f,v,c,T,l={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(s=n.makeCalcdata(a,"x",l),f=i.makeCalcdata(a,"y"),v=x(a,i,"y",f),c=!!a.yperiodalignment,T="y"):(s=i.makeCalcdata(a,"y",l),f=n.makeCalcdata(a,"x"),v=x(a,n,"x",f),c=!!a.xperiodalignment,T="x"),h=v.vals;for(var _=Math.min(h.length,s.length),w=new Array(_),A=0;A<_;A++)w[A]={p:h[A],s:s[A]},c&&(w[A].orig_p=f[A],w[A][T+"End"]=v.ends[A],w[A][T+"Start"]=v.starts[A]),a.ids&&(w[A].id=String(a.ids[A]));return S(a,"marker")&&E(o,a,{vals:a.marker.color,containerStr:"marker",cLetter:"c"}),S(a,"marker.line")&&E(o,a,{vals:a.marker.line.color,containerStr:"marker.line",cLetter:"c"}),e(w,a),t(w,a),w}}}),Sp=He({"src/traces/bar/uniform_text.js"(Z,V){"use strict";var d=Wn(),x=sa();function S(r,o,a){var n=r._fullLayout,i=n["_"+a+"Text_minsize"];if(i){var s=n.uniformtext.mode==="hide",h;switch(a){case"funnelarea":case"pie":case"sunburst":h="g.slice";break;case"treemap":case"icicle":h="g.slice, g.pathbar";break;default:h="g.points > g.point"}o.selectAll(h).each(function(f){var v=f.transform;if(v){v.scale=s&&v.hide?0:i/v.fontSize;var c=d.select(this).select("text");x.setTransormAndDisplay(c,v)}})}}function E(r,o,a){if(a.uniformtext.mode){var n=t(r),i=a.uniformtext.minsize,s=o.scale*o.fontSize;o.hide=s<i,a[n]=a[n]||1/0,o.hide||(a[n]=Math.min(a[n],Math.max(s,i)))}}function e(r,o){var a=t(r);o[a]=void 0}function t(r){return"_"+r+"Text_minsize"}V.exports={recordMinTextSize:E,clearMinTextSize:e,resizeText:S}}}),q2=He({"src/traces/bar/helpers.js"(Z){"use strict";var V=as(),d=Ch(),x=sa().isArrayOrTypedArray;Z.coerceString=function(S,E,e){if(typeof E=="string"){if(E||!S.noBlank)return E}else if((typeof E=="number"||E===!0)&&!S.strict)return String(E);return e!==void 0?e:S.dflt},Z.coerceNumber=function(S,E,e){if(V(E)){E=+E;var t=S.min,r=S.max,o=t!==void 0&&E<t||r!==void 0&&E>r;if(!o)return E}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,E,e){return d(E).isValid()?E:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,E,e){return S.coerceNumber&&(E=+E),S.values.indexOf(E)!==-1?E:e!==void 0?e:S.dflt},Z.getValue=function(S,E){var e;return x(S)?E<S.length&&(e=S[E]):e=S,e},Z.getLineWidth=function(S,E){var e=0<E.mlw?E.mlw:x(S.marker.line.width)?0:S.marker.line.width;return e}}}),Nd=He({"src/traces/bar/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=es(),E=sa(),e=lo(),t=Sp().resizeText,r=Sv(),o=r.textfont,a=r.insidetextfont,n=r.outsidetextfont,i=q2();function s(b){var p=d.select(b).selectAll('g[class^="barlayer"]').selectAll("g.trace");t(b,p,"bar");var u=p.size(),y=b._fullLayout;p.style("opacity",function(m){return m[0].trace.opacity}).each(function(m){(y.barmode==="stack"&&u>1||y.bargap===0&&y.bargroupgap===0&&!m[0].trace.marker.line.width)&&d.select(this).attr("shape-rendering","crispEdges")}),p.selectAll("g.points").each(function(m){var R=d.select(this),L=m[0].trace;h(R,L,b)}),e.getComponentMethod("errorbars","style")(p)}function h(b,p,u){S.pointStyle(b.selectAll("path"),p,u),f(b,p,u)}function f(b,p,u){b.selectAll("text").each(function(y){var m=d.select(this),R=E.ensureUniformFontSize(u,l(m,y,p,u));S.font(m,R)})}function v(b,p,u){var y=p[0].trace;y.selectedpoints?c(u,y,b):(h(u,y,b),e.getComponentMethod("errorbars","style")(u))}function c(b,p,u){S.selectedPointStyle(b.selectAll("path"),p),T(b.selectAll("text"),p,u)}function T(b,p,u){b.each(function(y){var m=d.select(this),R;if(y.selected){R=E.ensureUniformFontSize(u,l(m,y,p,u));var L=p.selected.textfont&&p.selected.textfont.color;L&&(R.color=L),S.font(m,R)}else S.selectedTextStyle(m,p)})}function l(b,p,u,y){var m=y._fullLayout.font,R=u.textfont;if(b.classed("bartext-inside")){var L=g(p,u);R=w(u,p.i,m,L)}else b.classed("bartext-outside")&&(R=A(u,p.i,m));return R}function _(b,p,u){return M(o,b.textfont,p,u)}function w(b,p,u,y){var m=_(b,p,u),R=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[p]===void 0;return R&&(m={color:x.contrast(y),family:m.family,size:m.size,weight:m.weight,style:m.style,variant:m.variant,textcase:m.textcase,lineposition:m.lineposition,shadow:m.shadow}),M(a,b.insidetextfont,p,m)}function A(b,p,u){var y=_(b,p,u);return M(n,b.outsidetextfont,p,y)}function M(b,p,u,y){p=p||{};var m=i.getValue(p.family,u),R=i.getValue(p.size,u),L=i.getValue(p.color,u),z=i.getValue(p.weight,u),F=i.getValue(p.style,u),N=i.getValue(p.variant,u),O=i.getValue(p.textcase,u),P=i.getValue(p.lineposition,u),U=i.getValue(p.shadow,u);return{family:i.coerceString(b.family,m,y.family),size:i.coerceNumber(b.size,R,y.size),color:i.coerceColor(b.color,L,y.color),weight:i.coerceString(b.weight,z,y.weight),style:i.coerceString(b.style,F,y.style),variant:i.coerceString(b.variant,N,y.variant),textcase:i.coerceString(b.variant,O,y.textcase),lineposition:i.coerceString(b.variant,P,y.lineposition),shadow:i.coerceString(b.variant,U,y.shadow)}}function g(b,p){return p.type==="waterfall"?p[b.dir].marker.color:b.mcc||b.mc||p.marker.color}V.exports={style:s,styleTextPoints:f,styleOnSelect:v,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:g,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=ou(),e=Jn(),t=es(),r=lo(),o=Ho().tickText,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=Nd(),h=q2(),f=i0(),v=Sv(),c=v.text,T=v.textposition,l=$p().appendArrayPointValue,_=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function M($){return($>0)-($<0)}function g($,le){return $<le?1:-1}function b($,le,ce,de){var G=[],Y=[],ee=de?le:ce,q=de?ce:le;return G[0]=ee.c2p($.s0,!0),Y[0]=q.c2p($.p0,!0),G[1]=ee.c2p($.s1,!0),Y[1]=q.c2p($.p1,!0),de?[G,Y]:[Y,G]}function p($,le,ce,de){if(!le.uniformtext.mode&&u(ce)){var G;return de&&(G=de()),$.transition().duration(ce.duration).ease(ce.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()})}else return $}function u($){return $&&$.duration>0}function y($,le,ce,de,G,Y){var ee=le.xaxis,q=le.yaxis,se=$._fullLayout,ae=$._context.staticPlot;G||(G={mode:se.barmode,norm:se.barmode,gap:se.bargap,groupgap:se.bargroupgap},i("bar",se));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(Q){var re=d.select(this),pe=Q[0].trace,we=Q[0].t,Se=pe.type==="waterfall",Ie=pe.type==="funnel",Re=pe.type==="histogram",We=pe.type==="bar",at=We||Ie,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",qe=u(G),he=S.ensureSingle(re,"g","points"),ue=A(pe),ne=he.selectAll("g.point").data(S.identity,ue);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ye,rt){var Ke=d.select(this),Mt=b(Ye,ee,q,tt),kt=Mt[0][0],Nt=Mt[0][1],Gt=Mt[1][0],Mr=Mt[1][1],mr=(tt?Nt-kt:Mr-Gt)===0;mr&&at&&h.getLineWidth(pe,Ye)&&(mr=!1),mr||(mr=!x(kt)||!x(Nt)||!x(Gt)||!x(Mr)),Ye.isBlank=mr,mr&&(tt?Nt=kt:Mr=Gt),nt&&!mr&&(tt?(kt-=g(kt,Nt)*nt,Nt+=g(kt,Nt)*nt):(Gt-=g(Gt,Mr)*nt,Mr+=g(Gt,Mr)*nt));var qr,Er;if(pe.type==="waterfall"){if(!mr){var Ir=pe[Ye.dir].marker;qr=Ir.line.width,Er=Ir.color}}else qr=h.getLineWidth(pe,Ye),Er=Ye.mc||pe.marker.color;function _t(wi){var Kt=d.round(qr/2%1,2);return G.gap===0&&G.groupgap===0?d.round(Math.round(wi)-Kt,2):wi}function Oe(wi,Kt,Dt){return Dt&&wi===Kt?wi:Math.abs(wi-Kt)>=2?_t(wi):wi>Kt?Math.ceil(wi):Math.floor(wi)}var Je=e.opacity(Er),Ae=Je<1||qr>.01?_t:Oe;$._context.staticPlot||(kt=Ae(kt,Nt,tt),Nt=Ae(Nt,kt,tt),Gt=Ae(Gt,Mr,!tt),Mr=Ae(Mr,Gt,!tt));var Le=tt?ee.c2p:q.c2p,Ue;Ye.s0>0?Ue=Ye._sMax:Ye.s0<0?Ue=Ye._sMin:Ue=Ye.s1>0?Ye._sMax:Ye._sMin;function Ze(wi,Kt){if(!wi)return 0;var Dt=Math.abs(tt?Mr-Gt:Nt-kt),Yt=Math.abs(tt?Nt-kt:Mr-Gt),Jt=Ae(Math.abs(Le(Ue,!0)-Le(0,!0))),Fr=Ye.hasB?Math.min(Dt/2,Yt/2):Math.min(Dt/2,Jt),ta;if(Kt==="%"){var ra=Math.min(50,wi);ta=Dt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=We||Re?Ze(we.cornerradiusvalue,we.cornerradiusform):0,ut,Ut,Ct="M"+kt+","+Gt+"V"+Mr+"H"+Nt+"V"+Gt+"Z",Pt=0;if(st&&Ye.s){var jt=M(Ye.s0)===0||M(Ye.s)===M(Ye.s0)?Ye.s1:Ye.s0;if(Pt=Ae(Ye.hasB?0:Math.abs(Le(Ue,!0)-Le(jt,!0))),Pt<st){var fr=g(kt,Nt),ur=g(Gt,Mr),sr=fr===-ur?1:0;if(tt)if(Ye.hasB)ut="M"+(kt+st*fr)+","+Gt+"A "+st+","+st+" 0 0 "+sr+" "+kt+","+(Gt+st*ur)+"V"+(Mr-st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(kt+st*fr)+","+Mr+"H"+(Nt-st*fr)+"A "+st+","+st+" 0 0 "+sr+" "+Nt+","+(Mr-st*ur)+"V"+(Gt+st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(Nt-st*fr)+","+Gt+"Z";else{Ut=Math.abs(Nt-kt)+Pt;var Pr=Ut<st?st-Math.sqrt(Ut*(2*st-Ut)):0,Ta=Pt>0?Math.sqrt(Pt*(2*st-Pt)):0,Oa=fr>0?Math.max:Math.min;ut="M"+kt+","+Gt+"V"+(Mr-Pr*ur)+"H"+Oa(Nt-(st-Pt)*fr,kt)+"A "+st+","+st+" 0 0 "+sr+" "+Nt+","+(Mr-st*ur-Ta)+"V"+(Gt+st*ur+Ta)+"A "+st+","+st+" 0 0 "+sr+" "+Oa(Nt-(st-Pt)*fr,kt)+","+(Gt+Pr*ur)+"Z"}else if(Ye.hasB)ut="M"+(kt+st*fr)+","+Gt+"A "+st+","+st+" 0 0 "+sr+" "+kt+","+(Gt+st*ur)+"V"+(Mr-st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(kt+st*fr)+","+Mr+"H"+(Nt-st*fr)+"A "+st+","+st+" 0 0 "+sr+" "+Nt+","+(Mr-st*ur)+"V"+(Gt+st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(Nt-st*fr)+","+Gt+"Z";else{Ut=Math.abs(Mr-Gt)+Pt;var Ia=Ut<st?st-Math.sqrt(Ut*(2*st-Ut)):0,qa=Pt>0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=ur>0?Math.max:Math.min;ut="M"+(kt+Ia*fr)+","+Gt+"V"+Wa(Mr-(st-Pt)*ur,Gt)+"A "+st+","+st+" 0 0 "+sr+" "+(kt+st*fr-qa)+","+Mr+"H"+(Nt-st*fr+qa)+"A "+st+","+st+" 0 0 "+sr+" "+(Nt-Ia*fr)+","+Wa(Mr-(st-Pt)*ur,Gt)+"V"+Gt+"Z"}}else ut=Ct}else ut=Ct;var Ca=p(S.ensureSingle(Ke,"path"),se,G,Y);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Nt-kt)*(Mr-Gt))||mr&&$._context.staticPlot?"M0,0Z":ut).call(t.setClipUrl,le.layerClipId,$),!se.uniformtext.mode&&qe){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ye,Ca,pe,hi,$)}m($,le,Ke,Q,rt,kt,Nt,Gt,Mr,st,Pt,G,Y),le.layerClipId&&t.hideOutsideRangePoint(Ye,Ke.select("text"),ee,q,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(re,Ce?null:le.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,le,G)}function m($,le,ce,de,G,Y,ee,q,se,ae,j,Q,re){var pe=le.xaxis,we=le.yaxis,Se=$._fullLayout,Ie;function Re(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Ie,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(E.convertToTspans,$);return jt}var We=de[0].trace,at=We.orientation==="h",nt=P(Se,de,G,pe,we);Ie=U(We,G);var tt=Q.mode==="stack"||Q.mode==="relative",qe=de[G],he=!tt||qe._outmost,ue=qe.hasB,ne=ae&&ae-j>_;if(!nt||Ie==="none"||(qe.isBlank||Y===ee||q===se)&&(Ie==="auto"||Ie==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ye=s.getBarColor(de[G],We),rt=s.getInsideTextFont(We,G,Ce,Ye),Ke=s.getOutsideTextFont(We,G,Ce),Mt=We.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]<pe.range[1]?Y=0:Y=pe._length):we.type==="log"&&kt.s0<=0&&(we.range[0]<we.range[1]?q=we._length:q=0);var Nt=Math.abs(ee-Y),Gt=Math.abs(se-q),Mr=Nt-2*_,mr=Gt-2*_,qr,Er,Ir,_t,Oe;if(Ie==="outside"&&!he&&!qe.hasB&&(Ie="inside"),Ie==="auto")if(he){Ie="inside",Oe=S.ensureUniformFontSize($,rt),qr=Re(ce,nt,Oe),Er=t.bBox(qr.node()),Ir=Er.width,_t=Er.height;var Je=Ir>0&&_t>0,Ae;ne?ue?Ae=R(Mr-2*ae,mr,Ir,_t,at)||R(Mr,mr-2*ae,Ir,_t,at):at?Ae=R(Mr-(ae-j),mr,Ir,_t,at)||R(Mr,mr-2*(ae-j),Ir,_t,at):Ae=R(Mr,mr-(ae-j),Ir,_t,at)||R(Mr-2*(ae-j),mr,Ir,_t,at):Ae=R(Mr,mr,Ir,_t,at),Je&&Ae?Ie="inside":(Ie="outside",qr.remove(),qr=null)}else Ie="inside";if(!qr){Oe=S.ensureUniformFontSize($,Ie==="outside"?Ke:rt),qr=Re(ce,nt,Oe);var Le=qr.attr("transform");if(qr.attr("transform",""),Er=t.bBox(qr.node()),Ir=Er.width,_t=Er.height,qr.attr("transform",Le),Ir<=0||_t<=0){qr.remove();return}}var Ue=We.textangle,Ze,st;Ie==="outside"?(st=We.constraintext==="both"||We.constraintext==="outside",Ze=O(Y,ee,q,se,Er,{isHorizontal:at,constrained:st,angle:Ue})):(st=We.constraintext==="both"||We.constraintext==="inside",Ze=F(Y,ee,q,se,Er,{isHorizontal:at,constrained:st,angle:Ue,anchor:Mt,hasB:ue,r:ae,overhead:j})),Ze.fontSize=Oe.size,n(We.type==="histogram"?"bar":We.type,Ze,Se),qe.transform=Ze;var ut=p(qr,Se,Q,re);S.setTransormAndDisplay(ut,Ze)}function R($,le,ce,de,G){if($<0||le<0)return!1;var Y=ce<=$&&de<=le,ee=ce<=le&&de<=$,q=G?$>=ce*(le/de):le>=de*($/ce);return Y||ee||q}function L($){return $==="auto"?0:$}function z($,le){var ce=Math.PI/180*le,de=Math.abs(Math.sin(ce)),G=Math.abs(Math.cos(ce));return{x:$.width*G+$.height*de,y:$.width*de+$.height*G}}function F($,le,ce,de,G,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,se=Y.angle||0,ae=Y.anchor,j=ae==="end",Q=ae==="start",re=Y.leftToRight||0,pe=(re+1)/2,we=1-pe,Se=Y.hasB,Ie=Y.r,Re=Y.overhead,We=G.width,at=G.height,nt=Math.abs(le-$),tt=Math.abs(de-ce),qe=nt>2*_&&tt>2*_?_:0;nt-=2*qe,tt-=2*qe;var he=L(se);se==="auto"&&!(We<=nt&&at<=tt)&&(We>nt||at>tt)&&(!(We>tt||at>nt)||We<at!=nt<tt)&&(he+=90);var ue=z(G,he),ne,Ce;if(Ie&&Ie-Re>_){var Ye=N($,le,ce,de,ue,Ie,Re,ee,Se);ne=Ye.scale,Ce=Ye.pad}else ne=1,q&&(ne=Math.min(1,nt/ue.x,tt/ue.y)),Ce=0;var rt=G.left*we+G.right*pe,Ke=(G.top+G.bottom)/2,Mt=($+_)*we+(le-_)*pe,kt=(ce+de)/2,Nt=0,Gt=0;if(Q||j){var Mr=(ee?ue.x:ue.y)/2;Ie&&(j||Se)&&(qe+=Ce);var mr=ee?g($,le):g(ce,de);ee?Q?(Mt=$+mr*qe,Nt=-mr*Mr):(Mt=le-mr*qe,Nt=mr*Mr):Q?(kt=ce+mr*qe,Gt=-mr*Mr):(kt=de-mr*qe,Gt=mr*Mr)}return{textX:rt,textY:Ke,targetX:Mt,targetY:kt,anchorX:Nt,anchorY:Gt,scale:ne,rotate:he}}function N($,le,ce,de,G,Y,ee,q,se){var ae=Math.max(0,Math.abs(le-$)-2*_),j=Math.max(0,Math.abs(de-ce)-2*_),Q=Y-_,re=ee?Q-Math.sqrt(Q*Q-(Q-ee)*(Q-ee)):Q,pe=se?Q*2:q?Q-ee:2*re,we=se?Q*2:q?2*re:Q-ee,Se,Ie,Re,We,at;return G.y/G.x>=j/(ae-pe)?We=j/G.y:G.y/G.x<=(j-we)/ae?We=ae/G.x:!se&&q?(Se=G.x*G.x+G.y*G.y/4,Ie=-2*G.x*(ae-Q)-G.y*(j/2-Q),Re=(ae-Q)*(ae-Q)+(j/2-Q)*(j/2-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)):se?(Se=(G.x*G.x+G.y*G.y)/4,Ie=-G.x*(ae/2-Q)-G.y*(j/2-Q),Re=(ae/2-Q)*(ae/2-Q)+(j/2-Q)*(j/2-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)):(Se=G.x*G.x/4+G.y*G.y,Ie=-G.x*(ae/2-Q)-2*G.y*(j-Q),Re=(ae/2-Q)*(ae/2-Q)+(j-Q)*(j-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)),We=Math.min(1,We),q?at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(j-G.y*We)/2)*(Q-(j-G.y*We)/2)))-ee):at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(ae-G.x*We)/2)*(Q-(ae-G.x*We)/2)))-ee),{scale:We,pad:at}}function O($,le,ce,de,G,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,se=Y.angle||0,ae=G.width,j=G.height,Q=Math.abs(le-$),re=Math.abs(de-ce),pe;ee?pe=re>2*_?_:0:pe=Q>2*_?_:0;var we=1;q&&(we=ee?Math.min(1,re/j):Math.min(1,Q/ae));var Se=L(se),Ie=z(G,Se),Re=(ee?Ie.x:Ie.y)/2,We=(G.left+G.right)/2,at=(G.top+G.bottom)/2,nt=($+le)/2,tt=(ce+de)/2,qe=0,he=0,ue=ee?g(le,$):g(ce,de);return ee?(nt=le-ue*pe,qe=ue*Re):(tt=de+ue*pe,he=-ue*Re),{textX:We,textY:at,targetX:nt,targetY:tt,anchorX:qe,anchorY:he,scale:we,rotate:Se}}function P($,le,ce,de,G){var Y=le[0].trace,ee=Y.texttemplate,q;return ee?q=B($,le,ce,de,G):Y.textinfo?q=X(le,ce,de,G):q=h.getValue(Y.text,ce),h.coerceString(c,q)}function U($,le){var ce=h.getValue($.textposition,le);return h.coerceEnumerated(T,ce)}function B($,le,ce,de,G){var Y=le[0].trace,ee=S.castOption(Y,ce,"texttemplate");if(!ee)return"";var q=Y.type==="histogram",se=Y.type==="waterfall",ae=Y.type==="funnel",j=Y.orientation==="h",Q,re,pe,we;j?(Q="y",re=G,pe="x",we=de):(Q="x",re=de,pe="y",we=G);function Se(qe){return o(re,re.c2l(qe),!0).text}function Ie(qe){return o(we,we.c2l(qe),!0).text}var Re=le[ce],We={};We.label=Re.p,We.labelLabel=We[Q+"Label"]=Se(Re.p);var at=S.castOption(Y,Re.i,"text");(at===0||at)&&(We.text=at),We.value=Re.s,We.valueLabel=We[pe+"Label"]=Ie(Re.s);var nt={};l(nt,Y,Re.i),(q||nt.x===void 0)&&(nt.x=j?We.value:We.label),(q||nt.y===void 0)&&(nt.y=j?We.label:We.value),(q||nt.xLabel===void 0)&&(nt.xLabel=j?We.valueLabel:We.labelLabel),(q||nt.yLabel===void 0)&&(nt.yLabel=j?We.labelLabel:We.valueLabel),se&&(We.delta=+Re.rawS||Re.s,We.deltaLabel=Ie(We.delta),We.final=Re.v,We.finalLabel=Ie(We.final),We.initial=We.final-We.delta,We.initialLabel=Ie(We.initial)),ae&&(We.value=Re.s,We.valueLabel=Ie(We.value),We.percentInitial=Re.begR,We.percentInitialLabel=S.formatPercent(Re.begR),We.percentPrevious=Re.difR,We.percentPreviousLabel=S.formatPercent(Re.difR),We.percentTotal=Re.sumR,We.percenTotalLabel=S.formatPercent(Re.sumR));var tt=S.castOption(Y,Re.i,"customdata");return tt&&(We.customdata=tt),S.texttemplateString({data:[nt,We,Y._meta],fallback:Y.texttemplatefallback,labels:We,locale:$._d3locale,template:ee})}function X($,le,ce,de){var G=$[0].trace,Y=G.orientation==="h",ee=G.type==="waterfall",q=G.type==="funnel";function se(tt){var qe=Y?de:ce;return o(qe,tt,!0).text}function ae(tt){var qe=Y?ce:de;return o(qe,+tt,!0).text}var j=G.textinfo,Q=$[le],re=j.split("+"),pe=[],we,Se=function(tt){return re.indexOf(tt)!==-1};if(Se("label")&&pe.push(se($[le].p)),Se("text")&&(we=S.castOption(G,Q.i,"text"),(we===0||we)&&pe.push(we)),ee){var Ie=+Q.rawS||Q.s,Re=Q.v,We=Re-Ie;Se("initial")&&pe.push(ae(We)),Se("delta")&&pe.push(ae(Ie)),Se("final")&&pe.push(ae(Re))}if(q){Se("value")&&pe.push(ae(Q.s));var at=0;Se("percent initial")&&at++,Se("percent previous")&&at++,Se("percent total")&&at++;var nt=at>1;Se("percent initial")&&(we=S.formatPercent(Q.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(Q.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(Q.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("<br>")}V.exports={plot:y,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,V){"use strict";var d=rf(),x=lo(),S=Jn(),E=sa().fillText,e=q2().getLineWidth,t=Ho().hoverLabelText,r=Ws().BADNUM;function o(i,s,h,f,v){var c=a(i,s,h,f,v);if(c){var T=c.cd,l=T[0].trace,_=T[c.index];return c.color=n(l,_),x.getComponentMethod("errorbars","hoverInfo")(_,l,c),[c]}}function a(i,s,h,f,v){var c=i.cd,T=c[0].trace,l=c[0].t,_=f==="closest",w=T.type==="waterfall",A=i.maxHoverDistance,M=i.maxSpikeDistance,g,b,p,u,y,m,R;T.orientation==="h"?(g=h,b=s,p="y",u="x",y=de,m=$):(g=s,b=h,p="x",u="y",m=de,y=$);var L=T[p+"period"],z=_||L;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Ie=we.w;return we[p]+Se*Ie/2}function P(we){return we[p+"End"]-we[p+"Start"]}var U=_?F:L?function(we){return we.p-P(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=_?N:L?function(we){return we.p+P(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function X(we,Se,Ie){return v.finiteRange&&(Ie=0),d.inbox(we-g,Se-g,Ie+Math.min(1,Math.abs(Se-we)/R)-1)}function $(we){return X(U(we),B(we),A)}function le(we){return X(F(we),N(we),M)}function ce(we){var Se=we[u];if(w){var Ie=Math.abs(we.rawS)||0;b>0?Se+=Ie:b<0&&(Se-=Ie)}return Se}function de(we){var Se=b,Ie=we.b,Re=ce(we);return d.inbox(Ie-Se,Re-Se,A+(Re-Se)/(Re-Ie)-1)}function G(we){var Se=b,Ie=we.b,Re=ce(we);return d.inbox(Ie-Se,Re-Se,M+(Re-Se)/(Re-Ie)-1)}var Y=i[p+"a"],ee=i[u+"a"];R=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function q(we){return(y(we)+m(we))/2}var se=d.getDistanceFunction(f,y,m,q);if(d.getClosest(c,se,i),i.index!==!1&&c[i.index].p!==r){z||(U=function(we){return Math.min(F(we),we.p-l.bargroupwidth/2)},B=function(we){return Math.max(N(we),we.p+l.bargroupwidth/2)});var ae=i.index,j=c[ae],Q=T.base?j.b+j.s:j.s;i[u+"0"]=i[u+"1"]=ee.c2p(j[u],!0),i[u+"LabelVal"]=Q;var re=l.extents[l.extents.round(j.p)];i[p+"0"]=Y.c2p(_?U(j):re[0],!0),i[p+"1"]=Y.c2p(_?B(j):re[1],!0);var pe=j.orig_p!==void 0;return i[p+"LabelVal"]=pe?j.orig_p:j.p,i.labelLabel=t(Y,i[p+"LabelVal"],T[p+"hoverformat"]),i.valueLabel=t(ee,i[u+"LabelVal"],T[u+"hoverformat"]),i.baseLabel=t(ee,j.b,T[u+"hoverformat"]),i.spikeDistance=(G(j)+le(j))/2,i[p+"Spike"]=Y.c2p(j.p,!0),E(j,T,i),i.hovertemplate=T.hovertemplate,i}}function n(i,s){var h=s.mcc||i.marker.color,f=s.mlcc||i.marker.line.color,v=e(i,s);if(S.opacity(h))return h;if(S.opacity(f)&&v)return f}V.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:n}}}),Y9=He({"src/traces/bar/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),E.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),h1=He({"src/traces/bar/select.js"(Z,V){"use strict";V.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",n=o.orientation==="h",i=[],s;if(E===!1)for(s=0;s<e.length;s++)e[s].selected=0;else for(s=0;s<e.length;s++){var h=e[s],f="ct"in h?h.ct:d(h,t,r,n,a);E.contains(f,!1,s,S)?(i.push({pointNumber:s,x:t.c2d(h.x),y:r.c2d(h.y)}),h.selected=1):h.selected=0}return i};function d(x,S,E,e,t){var r=S.c2p(e?x.s0:x.p0,!0),o=S.c2p(e?x.s1:x.p1,!0),a=E.c2p(e?x.p0:x.s0,!0),n=E.c2p(e?x.p1:x.s1,!0);return t?[(r+o)/2,(a+n)/2]:e?[o,(a+n)/2]:[(r+o)/2,n]}}}),K9=He({"src/traces/bar/index.js"(Z,V){"use strict";V.exports={attributes:Sv(),layoutAttributes:U2(),supplyDefaults:gd().supplyDefaults,crossTraceDefaults:gd().crossTraceDefaults,supplyLayoutDefaults:J5(),calc:Z9(),crossTraceCalc:eg().crossTraceCalc,colorbar:pp(),arraysToCalcdata:B_(),plot:tg().plot,style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:f1().hoverPoints,eventData:Y9(),selectPoints:h1(),moduleType:"trace",name:"bar",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}}),J9=He({"lib/bar.js"(Z,V){"use strict";V.exports=K9()}}),N_=He({"src/traces/box/attributes.js"(Z,V){"use strict";var d=$d(),x=af(),S=Sv(),E=sh(),e=tf().axisHoverFormat,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=Qo().extendFlat,a=x.marker,n=a.line;V.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:x.xperiod,yperiod:x.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:x.xperiodalignment,yperiodalignment:x.yperiodalignment,xhoverformat:e("x"),yhoverformat: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:o({},a.symbol,{arrayOk:!1,editType:"plot"}),opacity:o({},a.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:o({},a.angle,{arrayOk:!1,editType:"calc"}),size:o({},a.size,{arrayOk:!1,editType:"calc"}),color:o({},a.color,{arrayOk:!1,editType:"style"}),line:{color:o({},n.color,{arrayOk:!1,dflt:E.defaultLine,editType:"style"}),width:o({},n.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:d(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:S.offsetgroup,alignmentgroup:S.alignmentgroup,selected:{marker:x.selected.marker,editType:"style"},unselected:{marker:x.unselected.marker,editType:"style"},text:o({},x.text,{}),hovertext:o({},x.hovertext,{}),hovertemplate:t({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:x.zorder}}}),U_=He({"src/traces/box/layout_attributes.js"(Z,V){"use strict";V.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"}}}}),j_=He({"src/traces/box/defaults.js"(Z,V){"use strict";var d=sa(),x=lo(),S=Jn(),E=Qd(),e=Q0(),t=a1(),r=N_();function o(s,h,f,v){function c(u,y){return d.coerce(s,h,r,u,y)}if(a(s,h,c,v),h.visible!==!1){E(s,h,v,c),c("xhoverformat"),c("yhoverformat");var T=h._hasPreCompStats;T&&(c("lowerfence"),c("upperfence")),c("line.color",(s.marker||{}).color||f),c("line.width"),c("fillcolor",S.addOpacity(h.line.color,.5));var l=!1;if(T){var _=c("mean"),w=c("sd");_&&_.length&&(l=!0,w&&w.length&&(l="sd"))}c("whiskerwidth");var A=c("sizemode"),M;A==="quartiles"&&(M=c("boxmean",l)),c("showwhiskers",A==="quartiles"),(A==="sd"||M==="sd")&&c("sdmultiple"),c("width"),c("quartilemethod");var g=!1;if(T){var b=c("notchspan");b&&b.length&&(g=!0)}else d.validate(s.notchwidth,r.notchwidth)&&(g=!0);var p=c("notched",g);p&&c("notchwidth"),n(s,h,c,{prefix:"box"}),c("zorder")}}function a(s,h,f,v){function c(X){var $=0;return X&&X.length&&($+=1,d.isArrayOrTypedArray(X[0])&&X[0].length&&($+=1)),$}function T(X){return d.validate(s[X],r[X])}var l=f("y"),_=f("x"),w;if(h.type==="box"){var A=f("q1"),M=f("median"),g=f("q3");h._hasPreCompStats=A&&A.length&&M&&M.length&&g&&g.length,w=Math.min(d.minRowLength(A),d.minRowLength(M),d.minRowLength(g))}var b=c(l),p=c(_),u=b&&d.minRowLength(l),y=p&&d.minRowLength(_),m=v.calendar,R={autotypenumbers:v.autotypenumbers},L,z;if(h._hasPreCompStats)switch(String(p)+String(b)){case"00":var F=T("x0")||T("dx"),N=T("y0")||T("dy");N&&!F?L="h":L="v",z=w;break;case"10":L="v",z=Math.min(w,y);break;case"20":L="h",z=Math.min(w,_.length);break;case"01":L="h",z=Math.min(w,u);break;case"02":L="v",z=Math.min(w,l.length);break;case"12":L="v",z=Math.min(w,y,l.length);break;case"21":L="h",z=Math.min(w,_.length,u);break;case"11":z=0;break;case"22":var O=!1,P;for(P=0;P<_.length;P++)if(t(_[P],m,R)==="category"){O=!0;break}if(O)L="v",z=Math.min(w,y,l.length);else{for(P=0;P<l.length;P++)if(t(l[P],m,R)==="category"){O=!0;break}O?(L="h",z=Math.min(w,_.length,u)):(L="v",z=Math.min(w,y,l.length))}break}else b>0?(L="v",p>0?z=Math.min(y,u):z=Math.min(u)):p>0?(L="h",z=Math.min(y)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",L);h._hasPreCompStats?U==="v"&&p===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&p===0?f("x0"):U==="h"&&b===0&&f("y0");var B=x.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],v)}function n(s,h,f,v){var c=v.prefix,T=d.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),_="outliers";h._hasPreCompStats?_="all":(T||l)&&(_="suspectedoutliers");var w=f(c+"points",_);w?(f("jitter",w==="all"?.3:0),f("pointpos",w==="all"?-1.5:0),f("marker.symbol"),f("marker.opacity"),f("marker.size"),f("marker.angle"),f("marker.color",h.line.color),f("marker.line.color"),f("marker.line.width"),w==="suspectedoutliers"&&(f("marker.line.outliercolor",h.marker.color),f("marker.line.outlierwidth")),f("selected.marker.color"),f("unselected.marker.color"),f("selected.marker.size"),f("unselected.marker.size"),f("text"),f("hovertext")):delete h.marker;var A=f("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(f("hovertemplate"),f("hovertemplatefallback")),d.coerceSelectionMarkerOpacity(h,f)}function i(s,h){var f,v;function c(w){return d.coerce(v._input,v,r,w)}for(var T=0;T<s.length;T++){v=s[T];var l=v.type;if(l==="box"||l==="violin"){f=v._input;var _=h[l+"mode"];_==="group"&&e(f,v,h,c,_)}}}V.exports={supplyDefaults:o,crossTraceDefaults:i,handleSampleDefaults:a,handlePointsDefaults:n}}}),V2=He({"src/traces/box/layout_defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=U_();function E(t,r,o,a,n){for(var i=n+"Layout",s=!1,h=0;h<o.length;h++){var f=o[h];if(d.traceIs(f,i)){s=!0;break}}s&&(a(n+"mode"),a(n+"gap"),a(n+"groupgap"))}function e(t,r,o){function a(n,i){return x.coerce(t,r,S,n,i)}E(t,r,o,a,"box")}V.exports={supplyLayoutDefaults:e,_supply:E}}}),$5=He({"src/traces/box/calc.js"(Z,V){"use strict";var d=as(),x=Ho(),S=tv(),E=sa(),e=Ws().BADNUM,t=E._;V.exports=function(A,M){var g=A._fullLayout,b=x.getFromId(A,M.xaxis||"x"),p=x.getFromId(A,M.yaxis||"y"),u=[],y=M.type==="violin"?"_numViolins":"_numBoxes",m,R,L,z,F,N,O;M.orientation==="h"?(L=b,z="x",F=p,N="y",O=!!M.yperiodalignment):(L=p,z="y",F=b,N="x",O=!!M.xperiodalignment);var P=r(M,N,F,g[y]),U=P[0],B=P[1],X=E.distinctVals(U,F),$=X.vals,le=X.minDiff/2,ce,de,G,Y,ee,q,se=(M.boxpoints||M.points)==="all"?E.identity:function(mr){return mr.v<ce.lf||mr.v>ce.uf};if(M._hasPreCompStats){var ae=M[z],j=function(mr){return L.d2c((M[mr]||[])[m])},Q=1/0,re=-1/0;for(m=0;m<M._length;m++){var pe=U[m];if(d(pe)){if(ce={},ce.pos=ce[N]=pe,O&&B&&(ce.orig_p=B[m]),ce.q1=j("q1"),ce.med=j("median"),ce.q3=j("q3"),de=[],ae&&E.isArrayOrTypedArray(ae[m]))for(R=0;R<ae[m].length;R++)q=L.d2c(ae[m][R]),q!==e&&(ee={v:q,i:[m,R]},i(ee,M,[m,R]),de.push(ee));if(ce.pts=de.sort(h),G=ce[z]=de.map(f),Y=G.length,ce.med!==e&&ce.q1!==e&&ce.q3!==e&&ce.med>=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:v(ce,G,Y);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,G,Y);var Ie=j("mean");ce.mean=Ie!==e?Ie:Y?E.mean(G,Y):(ce.q1+ce.q3)/2;var Re=j("sd");ce.sd=Ie!==e&&Re>=0?Re:Y?E.stdev(G,Y,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var We=j("notchspan");We=We!==e&&We>0?We:_(ce,Y),ce.ln=ce.med-We,ce.un=ce.med+We;var at=ce.lf,nt=ce.uf;M.boxpoints&&G.length&&(at=Math.min(at,G[0]),nt=Math.max(nt,G[Y-1])),M.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{E.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ce.q1,"median = "+ce.med,"q3 = "+ce.q3].join(`
`));var tt;ce.med!==e?tt=ce.med:ce.q1!==e?ce.q3!==e?tt=(ce.q1+ce.q3)/2:tt=ce.q1:ce.q3!==e?tt=ce.q3:tt=0,ce.med=tt,ce.q1=ce.q3=tt,ce.lf=ce.uf=tt,ce.mean=ce.sd=tt,ce.ln=ce.un=tt,ce.min=ce.max=tt}Q=Math.min(Q,ce.min),re=Math.max(re,ce.max),ce.pts2=de.filter(se),u.push(ce)}}M._extremes[L._id]=x.findExtremes(L,[Q,re],{padded:!0})}else{var qe=L.makeCalcdata(M,z),he=o($,le),ue=$.length,ne=a(ue);for(m=0;m<M._length;m++)if(q=qe[m],!!d(q)){var Ce=E.findBin(U[m],he);Ce>=0&&Ce<ue&&(ee={v:q,i:m},i(ee,M,m),ne[Ce].push(ee))}var Ye=1/0,rt=-1/0,Ke=M.quartilemethod,Mt=Ke==="exclusive",kt=Ke==="inclusive";for(m=0;m<ue;m++)if(ne[m].length>0){if(ce={},ce.pos=ce[N]=$[m],de=ce.pts=ne[m].sort(h),G=ce[z]=de.map(f),Y=G.length,ce.min=G[0],ce.max=G[Y-1],ce.mean=E.mean(G,Y),ce.sd=E.stdev(G,Y,ce.mean)*M.sdmultiple,ce.med=E.interp(G,.5),Y%2&&(Mt||kt)){var Nt,Gt;Mt?(Nt=G.slice(0,Y/2),Gt=G.slice(Y/2+1)):kt&&(Nt=G.slice(0,Y/2+1),Gt=G.slice(Y/2)),ce.q1=E.interp(Nt,.5),ce.q3=E.interp(Gt,.5)}else ce.q1=E.interp(G,.25),ce.q3=E.interp(G,.75);ce.lf=v(ce,G,Y),ce.uf=c(ce,G,Y),ce.lo=T(ce),ce.uo=l(ce);var Mr=_(ce,Y);ce.ln=ce.med-Mr,ce.un=ce.med+Mr,Ye=Math.min(Ye,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(se),u.push(ce)}M.notched&&E.isTypedArray(qe)&&(qe=Array.from(qe)),M._extremes[L._id]=x.findExtremes(L,M.notched?qe.concat([Ye,rt]):qe,{padded:!0})}return s(u,M),u.length>0?(u[0].t={num:g[y],dPos:le,posLetter:N,valLetter:z,labels:{med:t(A,"median:"),min:t(A,"min:"),q1:t(A,"q1:"),q3:t(A,"q3:"),max:t(A,"max:"),mean:M.boxmean==="sd"||M.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",M.sdmultiple===1?"\u03C3":M.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},g[y]++,u):[{t:{empty:!0}}]};function r(w,A,M,g){var b=A in w,p=A+"0"in w,u="d"+A in w;if(b||p&&u){var y=M.makeCalcdata(w,A),m=S(w,M,A,y).vals;return[m,y]}var R;p?R=w[A+"0"]:"name"in w&&(M.type==="category"||d(w.name)&&["linear","log"].indexOf(M.type)!==-1||E.isDateTime(w.name)&&M.type==="date")?R=w.name:R=g;for(var L=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N<z;N++)F[N]=L;return[F]}function o(w,A){for(var M=w.length,g=new Array(M+1),b=0;b<M;b++)g[b]=w[b]-A;return g[M]=w[M-1]+A,g}function a(w){for(var A=new Array(w),M=0;M<w;M++)A[M]=[];return A}var n={text:"tx",hovertext:"htx"};function i(w,A,M){for(var g in n)E.isArrayOrTypedArray(A[g])&&(Array.isArray(M)?E.isArrayOrTypedArray(A[g][M[0]])&&(w[n[g]]=A[g][M[0]][M[1]]):w[n[g]]=A[g][M])}function s(w,A){if(E.isArrayOrTypedArray(A.selectedpoints))for(var M=0;M<w.length;M++){for(var g=w[M].pts||[],b={},p=0;p<g.length;p++)b[g[p].i]=p;E.tagSelected(g,A,b)}}function h(w,A){return w.v-A.v}function f(w){return w.v}function v(w,A,M){return M===0?w.q1:Math.min(w.q1,A[Math.min(E.findBin(2.5*w.q1-1.5*w.q3,A,!0)+1,M-1)])}function c(w,A,M){return M===0?w.q3:Math.max(w.q3,A[Math.max(E.findBin(2.5*w.q3-1.5*w.q1,A),0)])}function T(w){return 4*w.q1-3*w.q3}function l(w){return 4*w.q3-3*w.q1}function _(w,A){return A===0?0:1.57*(w.q3-w.q1)/Math.sqrt(A)}}}),G2=He({"src/traces/box/cross_trace_calc.js"(Z,V){"use strict";var d=Ho(),x=sa(),S=J0().getAxisGroup,E=["v","h"];function e(r,o){for(var a=r.calcdata,n=o.xaxis,i=o.yaxis,s=0;s<E.length;s++){for(var h=E[s],f=h==="h"?i:n,v=[],c=0;c<a.length;c++){var T=a[c],l=T[0].t,_=T[0].trace;_.visible===!0&&(_.type==="box"||_.type==="candlestick")&&!l.empty&&(_.orientation||"v")===h&&_.xaxis===n._id&&_.yaxis===i._id&&v.push(c)}t("box",r,v,f)}}function t(r,o,a,n){var i=o.calcdata,s=o._fullLayout,h=n._id,f=h.charAt(0),v,c,T,l=[],_=0;for(v=0;v<a.length;v++)for(T=i[a[v]],c=0;c<T.length;c++)l.push(n.c2l(T[c].pos,!0)),_+=(T[c].pts2||[]).length;if(l.length){var w=x.distinctVals(l);(n.type==="category"||n.type==="multicategory")&&(w.minDiff=1);var A=w.minDiff/2;d.minDtick(n,w.minDiff,w.vals[0],!0);var M=r==="violin"?"_numViolins":"_numBoxes",g=s[M],b=s[r+"mode"]==="group"&&g>1,p=1-s[r+"gap"],u=1-s[r+"groupgap"];for(v=0;v<a.length;v++){T=i[a[v]];var y=T[0].trace,m=T[0].t,R=y.width,L=y.side,z,F,N,O;if(R)z=F=O=R/2,N=0;else if(z=A,b){var P=S(s,n._id)+y.orientation,U=s._alignmentOpts[P]||{},B=U[y.alignmentgroup]||{},X=Object.keys(B.offsetGroups||{}).length,$=X||g,le=X?y._offsetIndex:m.num;F=z*p*u/$,N=2*z*(-.5+(le+.5)/$)*p,O=z*p/$}else F=z*p*u,N=0,O=z;m.dPos=z,m.bPos=N,m.bdPos=F,m.wHover=O;var ce,de,G=N+F,Y,ee,q,se,ae,j,Q=!!R,re=(y.boxpoints||y.points)&&_>0;if(L==="positive"?(ce=z*(R?1:.5),Y=G,de=Y=N):L==="negative"?(ce=Y=N,de=z*(R?1:.5),ee=G):(ce=de=z,Y=ee=G),re){var pe=y.pointpos,we=y.jitter,Se=y.marker.size/2,Ie=0;pe+we>=0&&(Ie=G*(pe+we),Ie>ce?(Q=!0,ae=Se,q=Ie):Ie>Y&&(ae=Se,q=ce)),Ie<=ce&&(q=ce);var Re=0;pe-we<=0&&(Re=-G*(pe-we),Re>de?(Q=!0,j=Se,se=Re):Re>ee&&(j=Se,se=de)),Re<=de&&(se=de)}else q=ce,se=de;var We=new Array(T.length);for(c=0;c<T.length;c++)We[c]=T[c].pos;y._extremes[h]=d.findExtremes(n,We,{padded:Q,vpadminus:se,vpadplus:q,vpadLinearized:!0,ppadminus:{x:j,y:ae}[f],ppadplus:{x:ae,y:j}[f]})}}}V.exports={crossTraceCalc:e,setPositionOffset:t}}}),H2=He({"src/traces/box/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=5,e=.01;function t(n,i,s,h){var f=n._context.staticPlot,v=i.xaxis,c=i.yaxis;x.makeTraceGroups(h,s,"trace boxes").each(function(T){var l=d.select(this),_=T[0],w=_.t,A=_.trace;if(w.wdPos=w.bdPos*A.whiskerwidth,A.visible!==!0||w.empty){l.remove();return}var M,g;A.orientation==="h"?(M=c,g=v):(M=v,g=c),r(l,{pos:M,val:g},A,w,f),o(l,{x:v,y:c},A,w),a(l,{pos:M,val:g},A,w)})}function r(n,i,s,h,f){var v=s.orientation==="h",c=i.val,T=i.pos,l=!!T.rangebreaks,_=h.bPos,w=h.wdPos||0,A=h.bPosPxOffset||0,M=s.whiskerwidth||0,g=s.showwhiskers!==!1,b=s.notched||!1,p=b?1-2*s.notchwidth:1,u,y;Array.isArray(h.bdPos)?(u=h.bdPos[0],y=h.bdPos[1]):(u=h.bdPos,y=h.bdPos);var m=n.selectAll("path.box").data(s.type!=="violin"||s.box.visible?x.identity:[]);m.enter().append("path").style("vector-effect",f?"none":"non-scaling-stroke").attr("class","box"),m.exit().remove(),m.each(function(R){if(R.empty)return d.select(this).attr("d","M0,0Z");var L=T.c2l(R.pos+_,!0),z=T.l2p(L-u)+A,F=T.l2p(L+y)+A,N=l?(z+F)/2:T.l2p(L)+A,O=s.whiskerwidth,P=l?z*O+(1-O)*N:T.l2p(L-w)+A,U=l?F*O+(1-O)*N:T.l2p(L+w)+A,B=T.l2p(L-u*p)+A,X=T.l2p(L+y*p)+A,$=s.sizemode==="sd",le=c.c2p($?R.mean-R.sd:R.q1,!0),ce=$?c.c2p(R.mean+R.sd,!0):c.c2p(R.q3,!0),de=x.constrain($?c.c2p(R.mean,!0):c.c2p(R.med,!0),Math.min(le,ce)+1,Math.max(le,ce)-1),G=R.lf===void 0||s.boxpoints===!1||$,Y=c.c2p(G?R.min:R.lf,!0),ee=c.c2p(G?R.max:R.uf,!0),q=c.c2p(R.ln,!0),se=c.c2p(R.un,!0);v?d.select(this).attr("d","M"+de+","+B+"V"+X+"M"+le+","+z+"V"+F+(b?"H"+q+"L"+de+","+X+"L"+se+","+F:"")+"H"+ce+"V"+z+(b?"H"+se+"L"+de+","+B+"L"+q+","+z:"")+"Z"+(g?"M"+le+","+N+"H"+Y+"M"+ce+","+N+"H"+ee+(M===0?"":"M"+Y+","+P+"V"+U+"M"+ee+","+P+"V"+U):"")):d.select(this).attr("d","M"+B+","+de+"H"+X+"M"+z+","+le+"H"+F+(b?"V"+q+"L"+X+","+de+"L"+F+","+se:"")+"V"+ce+"H"+z+(b?"V"+se+"L"+B+","+de+"L"+z+","+q:"")+"Z"+(g?"M"+N+","+le+"V"+Y+"M"+N+","+ce+"V"+ee+(M===0?"":"M"+P+","+Y+"H"+U+"M"+P+","+ee+"H"+U):""))})}function o(n,i,s,h){var f=i.x,v=i.y,c=h.bdPos,T=h.bPos,l=s.boxpoints||s.points;x.seedPseudoRandom();var _=function(M){return M.forEach(function(g){g.t=h,g.trace=s}),M},w=n.selectAll("g.points").data(l?_:[]);w.enter().append("g").attr("class","points"),w.exit().remove();var A=w.selectAll("path").data(function(M){var g,b=M.pts2,p=Math.max((M.max-M.min)/10,M.q3-M.q1),u=p*1e-9,y=p*e,m=[],R=0,L;if(s.jitter){if(p===0)for(R=1,m=new Array(b.length),g=0;g<b.length;g++)m[g]=1;else for(g=0;g<b.length;g++){var z=Math.max(0,g-E),F=b[z].v,N=Math.min(b.length-1,g+E),O=b[N].v;l!=="all"&&(b[g].v<M.lf?O=Math.min(O,M.lf):F=Math.max(F,M.uf));var P=Math.sqrt(y*(N-z)/(O-F+u))||0;P=x.constrain(Math.abs(P),0,1),m.push(P),R=Math.max(P,R)}L=s.jitter*2/(R||1)}for(g=0;g<b.length;g++){var U=b[g],B=U.v,X=s.jitter?L*m[g]*(x.pseudoRandom()-.5):0,$=M.pos+T+c*(s.pointpos+X);s.orientation==="h"?(U.y=$,U.x=B):(U.x=$,U.y=B),l==="suspectedoutliers"&&B<M.uo&&B>M.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,v)}function a(n,i,s,h){var f=i.val,v=i.pos,c=!!v.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,_=s.boxmean||(s.meanline||{}).visible,w,A;Array.isArray(h.bdPos)?(w=h.bdPos[0],A=h.bdPos[1]):(w=h.bdPos,A=h.bdPos);var M=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(g){var b=v.c2l(g.pos+T,!0),p=v.l2p(b-w)+l,u=v.l2p(b+A)+l,y=c?(p+u)/2:v.l2p(b)+l,m=f.c2p(g.mean,!0),R=f.c2p(g.mean-g.sd,!0),L=f.c2p(g.mean+g.sd,!0);s.orientation==="h"?d.select(this).attr("d","M"+m+","+p+"V"+u+(_==="sd"?"m0,0L"+R+","+y+"L"+m+","+p+"L"+L+","+y+"Z":"")):d.select(this).attr("d","M"+p+","+m+"H"+u+(_==="sd"?"m0,0L"+y+","+R+"L"+p+","+m+"L"+y+","+L+"Z":""))})}V.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=es();function E(t,r,o){var a=o||d.select(t).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=d.select(this),s=n[0].trace,h=s.line.width;function f(T,l,_,w){T.style("stroke-width",l+"px").call(x.stroke,_).call(x.fill,w)}var v=i.selectAll("path.box");if(s.type==="candlestick")v.each(function(T){if(!T.empty){var l=d.select(this),_=s[T.dir];f(l,_.line.width,_.line.color,_.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(v,h,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(x.stroke,s.line.color);var c=i.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,n=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(n,a):S.pointStyle(n,a,t)}V.exports={style:E,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,V){"use strict";var d=Ho(),x=sa(),S=rf(),E=Jn(),e=x.fillText;function t(a,n,i,s){var h=a.cd,f=h[0].trace,v=f.hoveron,c=[],T;return v.indexOf("boxes")!==-1&&(c=c.concat(r(a,n,i,s))),v.indexOf("points")!==-1&&(T=o(a,n,i)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,n,i,s){var h=a.cd,f=a.xa,v=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",_,w,A,M,g,b,p,u,y,m,R,L=T.bdPos,z,F,N=T.wHover,O=function(Re){return A.c2l(Re.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(y=function(Re){var We=O(Re);return S.inbox(We,We+N,m)},z=L,F=0),c.side==="negative"&&(y=function(Re){var We=O(Re);return S.inbox(We-N,We,m)},z=0,F=L)):(y=function(Re){var We=O(Re);return S.inbox(We-N,We+N,m)},z=F=L);var P;l?P=function(Re){return S.inbox(Re.span[0]-g,Re.span[1]-g,m)}:P=function(Re){return S.inbox(Re.min-g,Re.max-g,m)},c.orientation==="h"?(g=n,b=i,p=P,u=y,_="y",A=v,w="x",M=f):(g=i,b=n,p=y,u=P,_="x",A=f,w="y",M=v);var U=Math.min(1,L/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));m=a.maxHoverDistance-U,R=a.maxSpikeDistance-U;function B(Re){return(p(Re)+u(Re))/2}var X=S.getDistanceFunction(s,p,u,B);if(S.getClosest(h,X,a),a.index===!1)return[];var $=h[a.index],le=c.line.color,ce=(c.marker||{}).color;E.opacity(le)&&c.line.width?a.color=le:E.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[_+"0"]=A.c2p($.pos+T.bPos-F,!0),a[_+"1"]=A.c2p($.pos+T.bPos+z,!0),a[_+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=_+"Spike";a.spikeDistance=B($)*R/m,a[de]=A.c2p($.pos,!0);var G=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,Y=c.boxpoints||c.points,ee=Y&&G?["max","uf","q3","med","mean","q1","lf","min"]:Y&&!G?["max","uf","q3","med","q1","lf","min"]:!Y&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],q=M.range[1]<M.range[0];c.orientation===(q?"v":"h")&&ee.reverse();for(var se=a.spikeDistance,ae=a[de],j=[],Q=0;Q<ee.length;Q++){var re=ee[Q];if(re in $){var pe=$[re],we=M.c2p(pe,!0),Se=x.extendFlat({},a);Se.attr=re,Se[w+"0"]=Se[w+"1"]=we,Se[w+"LabelVal"]=pe,Se[w+"Label"]=(T.labels?T.labels[re]+" ":"")+d.hoverLabelText(M,pe,c[w+"hoverformat"]),Se.hoverOnBox=!0,re==="mean"&&"sd"in $&&(c.boxmean==="sd"||c.sizemode==="sd")&&(Se[w+"err"]=$.sd),Se.hovertemplate=!1,j.push(Se)}}a.name="",a.spikeDistance=void 0,a[de]=void 0;for(var Ie=0;Ie<j.length;Ie++)j[Ie].attr!=="med"?(j[Ie].name="",j[Ie].spikeDistance=void 0,j[Ie][de]=void 0):(j[Ie].spikeDistance=se,j[Ie][de]=ae);return j}function o(a,n,i){for(var s=a.cd,h=a.xa,f=a.ya,v=s[0].trace,c=h.c2p(n),T=f.c2p(i),l,_=function(P){var U=Math.max(3,P.mrc||0);return Math.max(Math.abs(h.c2p(P.x)-c)-U,1-3/U)},w=function(P){var U=Math.max(3,P.mrc||0);return Math.max(Math.abs(f.c2p(P.y)-T)-U,1-3/U)},A=S.quadrature(_,w),M=!1,g,b,p=0;p<s.length;p++){g=s[p];for(var u=0;u<(g.pts||[]).length;u++){b=g.pts[u];var y=A(b);y<=a.distance&&(a.distance=y,M=[p,u])}}if(!M)return!1;g=s[M[0]],b=g.pts[M[1]];var m=h.c2p(b.x,!0),R=f.c2p(b.y,!0),L=b.mrc||1;l=x.extendFlat({},a,{index:b.i,color:(v.marker||{}).color,name:v.name,x0:m-L,x1:m+L,y0:R-L,y1:R+L,spikeDistance:a.distance,hovertemplate:v.hovertemplate});var z=g.orig_p,F=z!==void 0?z:g.pos,N;v.orientation==="h"?(N=f,l.xLabelVal=b.x,l.yLabelVal=F):(N=h,l.xLabelVal=F,l.yLabelVal=b.y);var O=N._id.charAt(0);return l[O+"Spike"]=N.c2p(g.pos,!0),e(b,v,l),l}V.exports={hoverPoints:t,hoverOnBoxes:r,hoverOnPoints:o}}}),$9=He({"src/traces/box/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return S.hoverOnBox&&(x.hoverOnBox=S.hoverOnBox),"xVal"in S&&(x.x=S.xVal),"yVal"in S&&(x.y=S.yVal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),eS=He({"src/traces/box/select.js"(Z,V){"use strict";V.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a;if(S===!1)for(o=0;o<E.length;o++)for(a=0;a<(E[o].pts||[]).length;a++)E[o].pts[a].selected=0;else for(o=0;o<E.length;o++)for(a=0;a<(E[o].pts||[]).length;a++){var n=E[o].pts[a],i=e.c2p(n.x),s=t.c2p(n.y);S.contains([i,s],null,n.i,x)?(r.push({pointNumber:n.i,x:e.c2d(n.x),y:t.c2d(n.y)}),n.selected=1):n.selected=0}return r}}}),Q9=He({"src/traces/box/index.js"(Z,V){"use strict";V.exports={attributes:N_(),layoutAttributes:U_(),supplyDefaults:j_().supplyDefaults,crossTraceDefaults:j_().crossTraceDefaults,supplyLayoutDefaults:V2().supplyLayoutDefaults,calc:$5(),crossTraceCalc:G2().crossTraceCalc,plot:H2().plot,style:W2().style,styleOnSelect:W2().styleOnSelect,hoverPoints:Q5().hoverPoints,eventData:$9(),selectPoints:eS(),moduleType:"trace",name:"box",basePlotModule:Kf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}}),eF=He({"lib/box.js"(Z,V){"use strict";V.exports=Q9()}}),p1=He({"src/traces/heatmap/attributes.js"(Z,V){"use strict";var d=ku(),{extendFlat:x}=Qo(),S=ru(),{axisHoverFormat:E}=tf(),e=tc(),{hovertemplateAttrs:t,templatefallbackAttrs:r,texttemplateAttrs:o}=Jl(),a=af();V.exports=x({z:{valType:"data_array",editType:"calc"},x:x({},a.x,{impliedEdits:{xtype:"array"}}),x0:x({},a.x0,{impliedEdits:{xtype:"scaled"}}),dx:x({},a.dx,{impliedEdits:{xtype:"scaled"}}),y:x({},a.y,{impliedEdits:{ytype:"array"}}),y0:x({},a.y0,{impliedEdits:{ytype:"scaled"}}),dy:x({},a.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:x({},a.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:x({},a.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:x({},a.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:x({},a.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:x({},a.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:x({},a.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:t(),hovertemplatefallback:r(),texttemplate:o({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:e({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:x({},S.showlegend,{dflt:!1}),zorder:a.zorder},d("",{cLetter:"z",autoColorDflt:!1}))}}),X2=He({"src/traces/heatmap/xyz_defaults.js"(Z,V){"use strict";var d=as(),x=sa(),S=lo();V.exports=function(r,o,a,n,i,s){var h=a("z");i=i||"x",s=s||"y";var f,v;if(h===void 0||!h.length)return 0;if(x.isArray1D(h)){f=a(i),v=a(s);var c=x.minRowLength(f),T=x.minRowLength(v);if(c===0||T===0)return 0;o._length=Math.min(c,T,h.length)}else{if(f=E(i,a),v=E(s,a),!e(h))return 0;a("transpose"),o._length=null}var l=S.getComponentMethod("calendars","handleTraceDefaults");return l(r,o,[i,s],n),!0};function E(t,r){var o=r(t),a=o?r(t+"type","array"):"scaled";return a==="scaled"&&(r(t+"0"),r("d"+t)),o}function e(t){for(var r=!0,o=!1,a=!1,n,i=0;i<t.length;i++){if(n=t[i],!x.isArrayOrTypedArray(n)){r=!1;break}n.length>0&&(o=!0);for(var s=0;s<n.length;s++)if(d(n[s])){a=!0;break}}return r&&o&&a}}}),q_=He({"src/traces/heatmap/label_defaults.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){S("texttemplate"),S("texttemplatefallback");var e=d.extendFlat({},E.font,{color:"auto",size:"auto"});d.coerceFont(S,"textfont",e)}}}),tS=He({"src/traces/heatmap/style_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E){var e=E("zsmooth");e===!1&&(E("xgap"),E("ygap")),E("zhoverformat")}}}),tF=He({"src/traces/heatmap/defaults.js"(Z,V){"use strict";var d=sa(),x=X2(),S=q_(),E=Qd(),e=tS(),t=_h(),r=p1();V.exports=function(a,n,i,s){function h(v,c){return d.coerce(a,n,r,v,c)}var f=x(a,n,h,s);if(!f){n.visible=!1;return}E(a,n,s,h),h("xhoverformat"),h("yhoverformat"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),S(h,s),e(a,n,h,s),h("hoverongaps"),h("connectgaps",d.isArray1D(n.z)&&n.zsmooth!==!1),t(a,n,s,h,{prefix:"",cLetter:"z"}),h("zorder")}}}),rS=He({"src/traces/histogram/bin_functions.js"(Z,V){"use strict";var d=as();V.exports={count:function(x,S,E){return E[x]++,1},sum:function(x,S,E,e){var t=e[S];return d(t)?(t=Number(t),E[x]+=t,t):0},avg:function(x,S,E,e,t){var r=e[S];return d(r)&&(r=Number(r),E[x]+=r,t[x]++),0},min:function(x,S,E,e){var t=e[S];if(d(t))if(t=Number(t),d(E[x])){if(E[x]>t){var r=t-E[x];return E[x]=t,r}}else return E[x]=t,t;return 0},max:function(x,S,E,e){var t=e[S];if(d(t))if(t=Number(t),d(E[x])){if(E[x]<t){var r=t-E[x];return E[x]=t,r}}else return E[x]=t,t;return 0}}}}),aS=He({"src/traces/histogram/norm_functions.js"(Z,V){"use strict";V.exports={percent:function(d,x){for(var S=d.length,E=100/x,e=0;e<S;e++)d[e]*=E},probability:function(d,x){for(var S=d.length,E=0;E<S;E++)d[E]/=x},density:function(d,x,S,E){var e=d.length;E=E||1;for(var t=0;t<e;t++)d[t]*=S[t]*E},"probability density":function(d,x,S,E){var e=d.length;E&&(x/=E);for(var t=0;t<e;t++)d[t]*=S[t]/x}}}}),iS=He({"src/traces/histogram/average.js"(Z,V){"use strict";V.exports=function(x,S){for(var E=x.length,e=0,t=0;t<E;t++)S[t]?(x[t]/=S[t],e+=x[t]):x[t]=null;return e}}}),nS=He({"src/traces/histogram/bin_label_vals.js"(Z,V){"use strict";var d=Ws(),x=d.ONEAVGYEAR,S=d.ONEAVGMONTH,E=d.ONEDAY,e=d.ONEHOUR,t=d.ONEMIN,r=d.ONESEC,o=Ho().tickIncrement;V.exports=function(f,v,c,T,l){var _=-1.1*v,w=-.1*v,A=f-w,M=c[0],g=c[1],b=Math.min(a(M+w,M+A,T,l),a(g+w,g+A,T,l)),p=Math.min(a(M+_,M+w,T,l),a(g+_,g+w,T,l)),u,y;if(b>p&&p<Math.abs(g-M)/4e3?(u=b,y=!1):(u=Math.min(b,p),y=!0),T.type==="date"&&u>E){var m=u===x?1:6,R=u===x?"M12":"M1";return function(L,z){var F=T.c2d(L,x,l),N=F.indexOf("-",m);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(O<L){var P=o(O,R,!1,l);(O+P)/2<L+f&&(O=P)}return z&&y?o(O,R,!0,l):O}}return function(L,z){var F=u*Math.round(L/u);return F+u/10<L&&F+u*.9<L+f&&(F+=u),z&&y&&(F-=u),F}};function a(h,f,v,c){if(h*f<=0)return 1/0;for(var T=Math.abs(f-h),l=v.type==="date",_=n(T,l),w=0;w<10;w++){var A=n(_*80,l);if(_===A)break;if(i(A,h,f,l,v,c))_=A;else break}return _}function n(h,f){return f&&h>r?h>E?h>x*1.1?x:h>S*1.1?S:E:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function i(h,f,v,c,T,l){if(c&&h>E){var _=s(f,T,l),w=s(v,T,l),A=h===x?0:1;return _[A]!==w[A]}return Math.floor(v/h)-Math.floor(f/h)>.1}function s(h,f,v){var c=f.c2d(h,x,v).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,V){"use strict";var d=as(),x=sa(),S=lo(),E=Ho(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),n=iS(),i=nS();function s(T,l){var _=[],w=[],A=l.orientation==="h",M=E.getFromId(T,A?l.yaxis:l.xaxis),g=A?"y":"x",b={x:"y",y:"x"}[g],p=l[g+"calendar"],u=l.cumulative,y,m=h(T,l,M,g),R=m[0],L=m[1],z=typeof R.size=="string",F=[],N=z?F:R,O=[],P=[],U=[],B=0,X=l.histnorm,$=l.histfunc,le=X.indexOf("density")!==-1,ce,de,G;u.enabled&&le&&(X=X.replace(/ ?density$/,""),le=!1);var Y=$==="max"||$==="min",ee=Y?null:0,q=o.count,se=a[X],ae=!1,j=function(Ce){return M.r2c(Ce,0,p)},Q;for(x.isArrayOrTypedArray(l[b])&&$!=="count"&&(Q=l[b],ae=$==="avg",q=o[$]),y=j(R.start),de=j(R.end)+(y-E.tickIncrement(y,R.size,!1,p))/1e6;y<de&&_.length<1e6&&(ce=E.tickIncrement(y,R.size,!1,p),_.push((y+ce)/2),w.push(ee),U.push([]),F.push(y),le&&O.push(1/(ce-y)),ae&&P.push(0),!(ce<=y));)y=ce;F.push(y),!z&&M.type==="date"&&(N={start:j(N.start),end:j(N.end),size:N.size}),T._fullLayout._roundFnOpts||(T._fullLayout._roundFnOpts={});var re=l["_"+g+"bingroup"],pe={leftGap:1/0,rightGap:1/0};re&&(T._fullLayout._roundFnOpts[re]||(T._fullLayout._roundFnOpts[re]=pe),pe=T._fullLayout._roundFnOpts[re]);var we=w.length,Se=!0,Ie=pe.leftGap,Re=pe.rightGap,We={};for(y=0;y<L.length;y++){var at=L[y];G=x.findBin(at,N),G>=0&&G<we&&(B+=q(G,y,w,Q,P),Se&&U[G].length&&at!==L[U[G][0]]&&(Se=!1),U[G].push(y),We[y]=G,Ie=Math.min(Ie,at-F[G]),Re=Math.min(Re,F[G+1]-at))}pe.leftGap=Ie,pe.rightGap=Re;var nt;Se||(nt=function(Ce,Ye){return function(){var rt=T._fullLayout._roundFnOpts[re];return i(rt.leftGap,rt.rightGap,F,M,p)(Ce,Ye)}}),ae&&(B=n(w,P)),se&&se(w,B,O),u.enabled&&c(w,u.direction,u.currentbin);var tt=Math.min(_.length,w.length),qe=[],he=0,ue=tt-1;for(y=0;y<tt;y++)if(w[y]){he=y;break}for(y=tt-1;y>=he;y--)if(w[y]){ue=y;break}for(y=he;y<=ue;y++)if(d(_[y])&&d(w[y])){var ne={p:_[y],s:w[y],b:0};u.enabled||(ne.pts=U[y],Se?ne.ph0=ne.ph1=U[y].length?L[U[y][0]]:_[y]:(l._computePh=!0,ne.ph0=nt(F[y]),ne.ph1=nt(F[y+1],!0))),qe.push(ne)}return qe.length===1&&(qe[0].width1=E.tickIncrement(qe[0].p,R.size,!1,p)-qe[0].p),e(l,"marker")&&t(T,l,{vals:l.marker.color,containerStr:"marker",cLetter:"c"}),e(l,"marker.line")&&t(T,l,{vals:l.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(qe,l),x.isArrayOrTypedArray(l.selectedpoints)&&x.tagSelected(qe,l,We),qe}function h(T,l,_,w,A){var M=w+"bins",g=T._fullLayout,b=l["_"+w+"bingroup"],p=g._histogramBinOpts[b],u=g.barmode==="overlay",y,m,R,L,z,F,N,O=function(at){return _.r2c(at,0,L)},P=function(at){return _.c2r(at,0,L)},U=_.type==="date"?function(at){return at||at===0?x.cleanDate(at,null,L):null}:function(at){return d(at)?Number(at):null};function B(at,nt,tt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=tt[at])):(F[at]=nt[at]=tt[at],x.nestedProperty(m[0],M+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{m=p.traces;var X=[],$=!0,le=!1,ce=!1;for(y=0;y<m.length;y++)if(R=m[y],R.visible){var de=p.dirs[y];z=R["_"+de+"pos0"]=_.makeCalcdata(R,de),X=x.concat(X,z),delete R["_"+w+"autoBinFinished"],l.visible===!0&&($?$=!1:(delete R._autoBin,R["_"+w+"autoBinFinished"]=1),S.traceIs(R,"2dMap")&&(le=!0),R.type==="histogram2dcontour"&&(ce=!0))}L=m[0][w+"calendar"];var G=E.autoBin(X,_,p.nbins,le,L,p.sizeFound&&p.size),Y=m[0]._autoBin={};if(F=Y[p.dirs[0]]={},ce&&(p.size||(G.start=P(E.tickIncrement(O(G.start),G.size,!0,L))),p.end===void 0&&(G.end=P(E.tickIncrement(O(G.end),G.size,!1,L)))),u&&!S.traceIs(l,"2dMap")&&G._dataSpan===0&&_.type!=="category"&&_.type!=="multicategory"&&l.bingroup===""&&typeof l.xbins>"u"){if(A)return[G,z,!0];G=f(T,l,_,w,M)}N=R.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?G.start=P(E.tickIncrement(O(G.start),G.size,!0,L)):G.end=P(E.tickIncrement(O(G.end),G.size,!1,L))),p.size=G.size,p.sizeFound||(F.size=G.size,x.nestedProperty(m[0],M+".size").set(G.size)),B("start",p,G),B("end",p,G)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var ee=l._input[M]||{},q=x.extendFlat({},p),se=p.start,ae=_.r2l(ee.start),j=ae!==void 0;if((p.startFound||j)&&ae!==_.r2l(se)){var Q=j?ae:x.aggNums(Math.min,null,z),re={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:p.size,tick0:se,calendar:L,range:[Q,E.tickIncrement(Q,p.size,!1,L)].map(_.l2r)},pe=E.tickFirst(re);pe>_.r2l(Q)&&(pe=E.tickIncrement(pe,p.size,!0,L)),q.start=_.l2r(pe),j||x.nestedProperty(l,M+".start").set(q.start)}var we=p.end,Se=_.r2l(ee.end),Ie=Se!==void 0;if((p.endFound||Ie)&&Se!==_.r2l(we)){var Re=Ie?Se:x.aggNums(Math.max,null,z);q.end=_.l2r(Re),Ie||x.nestedProperty(l,M+".start").set(q.end)}var We="autobin"+w;return l._input[We]===!1&&(l._input[M]=x.extendFlat({},l[M]||{}),delete l._input[We],delete l[We]),[q,z]}function f(T,l,_,w,A){var M=T._fullLayout,g=v(T,l),b=!1,p=1/0,u=[l],y,m,R;for(y=0;y<g.length;y++)if(m=g[y],m===l)b=!0;else if(!b)R=M._histogramBinOpts[m["_"+w+"bingroup"]],p=Math.min(p,R.size||m[A].size);else{var L=h(T,m,_,w,!0),z=L[0],F=L[2];m["_"+w+"autoBinFinished"]=1,m["_"+w+"pos0"]=L[1],F?u.push(m):p=Math.min(p,z.size)}var N=new Array(u.length);for(y=0;y<u.length;y++)for(var O=u[y]["_"+w+"pos0"],P=0;P<O.length;P++)if(O[P]!==void 0){N[y]=O[P];break}for(isFinite(p)||(p=x.distinctVals(N).minDiff),y=0;y<u.length;y++){m=u[y];var U=m[w+"calendar"],B={start:_.c2r(N[y]-p/2,0,U),end:_.c2r(N[y]+p/2,0,U),size:p};m._input[A]=m[A]=B,R=M._histogramBinOpts[m["_"+w+"bingroup"]],R&&x.extendFlat(R,B)}return l[A]}function v(T,l){for(var _=l.xaxis,w=l.yaxis,A=l.orientation,M=[],g=T._fullData,b=0;b<g.length;b++){var p=g[b];p.type==="histogram"&&p.visible===!0&&p.orientation===A&&p.xaxis===_&&p.yaxis===w&&M.push(p)}return M}function c(T,l,_){var w,A,M;function g(p){M=T[p],T[p]/=2}function b(p){A=T[p],T[p]=M+A/2,M+=A}if(_==="half")if(l==="increasing")for(g(0),w=1;w<T.length;w++)b(w);else for(g(T.length-1),w=T.length-2;w>=0;w--)b(w);else if(l==="increasing"){for(w=1;w<T.length;w++)T[w]+=T[w-1];_==="exclude"&&(T.unshift(0),T.pop())}else{for(w=T.length-2;w>=0;w--)T[w]+=T[w+1];_==="exclude"&&(T.push(0),T.shift())}}V.exports={calc:s,calcAllAutoBins:h}}}),rF=He({"src/traces/histogram2d/calc.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=rS(),E=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;V.exports=function(s,h){var f=x.getFromId(s,h.xaxis),v=x.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Oe){return f.r2c(Oe,0,c)},_=function(Oe){return v.r2c(Oe,0,T)},w=function(Oe){return f.c2r(Oe,0,c)},A=function(Oe){return v.c2r(Oe,0,T)},M,g,b,p,u=r(s,h,f,"x"),y=u[0],m=u[1],R=r(s,h,v,"y"),L=R[0],z=R[1],F=h._length;m.length>F&&m.splice(F,m.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],P=[],U=typeof y.size=="string",B=typeof L.size=="string",X=[],$=[],le=U?X:y,ce=B?$:L,de=0,G=[],Y=[],ee=h.histnorm,q=h.histfunc,se=ee.indexOf("density")!==-1,ae=q==="max"||q==="min",j=ae?null:0,Q=S.count,re=E[ee],pe=!1,we=[],Se=[],Ie="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Ie&&q!=="count"&&(pe=q==="avg",Q=S[q]);var Re=y.size,We=l(y.start),at=l(y.end)+(We-x.tickIncrement(We,Re,!1,c))/1e6;for(M=We;M<at;M=x.tickIncrement(M,Re,!1,c))O.push(j),X.push(M),pe&&P.push(0);X.push(M);var nt=O.length,tt=(M-We)/nt,qe=w(We+tt/2),he=L.size,ue=_(L.start),ne=_(L.end)+(ue-x.tickIncrement(ue,he,!1,T))/1e6;for(M=ue;M<ne;M=x.tickIncrement(M,he,!1,T)){N.push(O.slice()),$.push(M);var Ce=new Array(nt);for(g=0;g<nt;g++)Ce[g]=[];Y.push(Ce),pe&&G.push(P.slice())}$.push(M);var Ye=N.length,rt=(M-ue)/Ye,Ke=A(ue+rt/2);se&&(we=o(O.length,le,tt,U),Se=o(N.length,ce,rt,B)),!U&&f.type==="date"&&(le=a(l,le)),!B&&v.type==="date"&&(ce=a(_,ce));var Mt=!0,kt=!0,Nt=new Array(nt),Gt=new Array(Ye),Mr=1/0,mr=1/0,qr=1/0,Er=1/0;for(M=0;M<F;M++){var Ir=m[M],_t=z[M];b=d.findBin(Ir,le),p=d.findBin(_t,ce),b>=0&&b<nt&&p>=0&&p<Ye&&(de+=Q(b,M,N[p],Ie,G[p]),Y[p][b].push(M),Mt&&(Nt[b]===void 0?Nt[b]=Ir:Nt[b]!==Ir&&(Mt=!1)),kt&&(Gt[p]===void 0?Gt[p]=_t:Gt[p]!==_t&&(kt=!1)),Mr=Math.min(Mr,Ir-X[b]),mr=Math.min(mr,X[b+1]-Ir),qr=Math.min(qr,_t-$[p]),Er=Math.min(Er,$[p+1]-_t))}if(pe)for(p=0;p<Ye;p++)de+=e(N[p],G[p]);if(re)for(p=0;p<Ye;p++)re(N[p],de,we,Se[p]);return{x:m,xRanges:n(X,Mt&&Nt,Mr,mr,f,c),x0:qe,dx:tt,y:z,yRanges:n($,kt&&Gt,qr,Er,v,T),y0:Ke,dy:rt,z:N,pts:Y}};function o(i,s,h,f){var v=new Array(i),c;if(f)for(c=0;c<i;c++)v[c]=1/(s[c+1]-s[c]);else{var T=1/h;for(c=0;c<i;c++)v[c]=T}return v}function a(i,s){return{start:i(s.start),end:i(s.end),size:s.size}}function n(i,s,h,f,v,c){var T,l=i.length-1,_=new Array(l),w=t(h,f,i,v,c);for(T=0;T<l;T++){var A=(s||[])[T];_[T]=A===void 0?[w(i[T]),w(i[T+1],!0)]:[A,A]}return _}}}),Z2=He({"src/traces/heatmap/convert_column_xyz.js"(Z,V){"use strict";var d=sa(),x=Ws().BADNUM,S=tv();V.exports=function(e,t,r,o,a,n){var i=e._length,s=t.makeCalcdata(e,o),h=r.makeCalcdata(e,a);s=S(e,t,o,s).vals,h=S(e,r,a,h).vals;var f=e.text,v=f!==void 0&&d.isArray1D(f),c=e.hovertext,T=c!==void 0&&d.isArray1D(c),l,_,w=d.distinctVals(s),A=w.vals,M=d.distinctVals(h),g=M.vals,b=[],p,u,y=g.length,m=A.length;for(l=0;l<n.length;l++)b[l]=d.init2dArray(y,m);v&&(p=d.init2dArray(y,m)),T&&(u=d.init2dArray(y,m));var R=d.init2dArray(y,m);for(l=0;l<i;l++)if(s[l]!==x&&h[l]!==x){var L=d.findBin(s[l]+w.minDiff/2,A),z=d.findBin(h[l]+M.minDiff/2,g);for(_=0;_<n.length;_++){var F=n[_],N=e[F],O=b[_];O[z][L]=N[l],R[z][L]=l}v&&(p[z][L]=f[l]),T&&(u[z][L]=c[l])}for(e["_"+o]=A,e["_"+a]=g,_=0;_<n.length;_++)e["_"+n[_]]=b[_];v&&(e._text=p),T&&(e._hovertext=u),t&&t.type==="category"&&(e["_"+o+"CategoryMap"]=A.map(function(P){return t._categories[P]})),r&&r.type==="category"&&(e["_"+a+"CategoryMap"]=g.map(function(P){return r._categories[P]})),e._after2before=R}}}),Y2=He({"src/traces/heatmap/clean_2d_array.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM;V.exports=function(e,t,r,o){var a,n,i,s,h,f;function v(A){if(d(A))return+A}if(t&&t.transpose){for(a=0,h=0;h<e.length;h++)a=Math.max(a,e[h].length);if(a===0)return!1;i=function(A){return A.length},s=function(A,M,g){return(A[g]||[])[M]}}else a=e.length,i=function(A,M){return A[M].length},s=function(A,M,g){return(A[M]||[])[g]};var c=function(A,M,g){return M===S||g===S?S:s(A,M,g)};function T(A){if(t&&t.type!=="carpet"&&t.type!=="contourcarpet"&&A&&A.type==="category"&&t["_"+A._id.charAt(0)].length){var M=A._id.charAt(0),g={},b=t["_"+M+"CategoryMap"]||t[M];for(h=0;h<b.length;h++)g[b[h]]=h;return function(p){var u=g[A._categories[p]];return u+1?u:S}}else return x.identity}var l=T(r),_=T(o);o&&o.type==="category"&&(a=o._categories.length);var w=new Array(a);for(h=0;h<a;h++)for(r&&r.type==="category"?n=r._categories.length:n=i(e,h),w[h]=new Array(n),f=0;f<n;f++)w[h][f]=v(c(e,_(h),l(f)));return w}}}),K2=He({"src/traces/heatmap/interp2d.js"(Z,V){"use strict";var d=sa(),x=.01,S=[[-1,0],[1,0],[0,-1],[0,1]];function E(t){return .5-.25*Math.min(1,t*.5)}V.exports=function(r,o){var a=1,n;for(e(r,o),n=0;n<o.length&&!(o[n][2]<4);n++);for(o=o.slice(n),n=0;n<100&&a>x;n++)a=e(r,o,E(a));return a>x&&d.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,n,i,s,h,f,v,c,T,l,_,w,A,M;for(h=0;h<r.length;h++){for(n=r[h],i=n[0],s=n[1],w=t[i][s],_=0,l=0,f=0;f<4;f++)v=S[f],c=t[i+v[0]],c&&(T=c[s+v[1]],T!==void 0&&(_===0?A=M=T:(A=Math.min(A,T),M=Math.max(M,T)),l++,_+=T));if(l===0)throw"iterateInterp2d order is wrong: no defined neighbors";t[i][s]=_/l,w===void 0?l<4&&(a=1):(t[i][s]=(1+o)*t[i][s]-o*w,M>A&&(a=Math.max(a,Math.abs(t[i][s]-w)/(M-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,V){"use strict";var d=sa().maxRowLength;V.exports=function(S){var E=[],e={},t=[],r=S[0],o=[],a=[0,0,0],n=d(S),i,s,h,f,v,c,T,l;for(s=0;s<S.length;s++)for(i=o,o=r,r=S[s+1]||[],h=0;h<n;h++)o[h]===void 0&&(c=(o[h-1]!==void 0?1:0)+(o[h+1]!==void 0?1:0)+(i[h]!==void 0?1:0)+(r[h]!==void 0?1:0),c?(s===0&&c++,h===0&&c++,s===S.length-1&&c++,h===o.length-1&&c++,c<4&&(e[[s,h]]=[s,h,c]),E.push([s,h,c])):t.push([s,h]));for(;t.length;){for(T={},l=!1,v=t.length-1;v>=0;v--)f=t[v],s=f[0],h=f[1],c=((e[[s-1,h]]||a)[2]+(e[[s+1,h]]||a)[2]+(e[[s,h-1]]||a)[2]+(e[[s,h+1]]||a)[2])/20,c&&(T[f]=[s,h,c],t.splice(v,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(f in T)e[f]=T[f],E.push(T[f])}return E.sort(function(_,w){return w[2]-_[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,V){"use strict";var d=lo(),x=sa().isArrayOrTypedArray;V.exports=function(E,e,t,r,o,a){var n=[],i=d.traceIs(E,"contour"),s=d.traceIs(E,"histogram"),h,f,v,c=x(e)&&e.length>1;if(c&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(i)n=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?n=[.5*e[0],2*e[0]]:n=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(n=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],v=1;v<T;v++)n.push(Math.sqrt(e[v-1]*e[v]));n.push(Math.pow(e[T-1],1.5)/Math.pow(e[T-2],.5))}else{for(n=[1.5*e[0]-.5*e[1]],v=1;v<T;v++)n.push((e[v-1]+e[v])*.5);n.push(1.5*e[T-1]-.5*e[T-2])}if(T<o){var l=n[n.length-1],_;if(a.type==="log")for(_=l/n[n.length-2],v=T;v<o;v++)l*=_,n.push(l);else for(_=l-n[n.length-2],v=T;v<o;v++)l+=_,n.push(l)}}else return i?e.slice(0,o):e.slice(0,o+1)}else{var w=E[a._id.charAt(0)+"calendar"];if(s)h=a.r2c(t,0,w);else if(x(e)&&e.length===1)h=e[0];else if(t===void 0)h=0;else{var A=a.type==="log"?a.d2c:a.r2c;h=A(t,0,w)}for(f=r||1,v=i?0:-.5;v<o;v++)n.push(h+f*v)}return n}}}),$2=He({"src/traces/heatmap/calc.js"(Z,V){"use strict";var d=lo(),x=sa(),S=Ho(),E=tv(),e=rF(),t=Tp(),r=Z2(),o=Y2(),a=K2(),n=J2(),i=sS(),s=Ws().BADNUM;V.exports=function(c,T){var l=S.getFromId(c,T.xaxis||"x"),_=S.getFromId(c,T.yaxis||"y"),w=d.traceIs(T,"contour"),A=d.traceIs(T,"histogram"),M=w?"best":T.zsmooth,g,b,p,u,y,m,R,L,z,F,N;if(l._minDtick=0,_._minDtick=0,A)N=e(c,T),u=N.orig_x,g=N.x,b=N.x0,p=N.dx,L=N.orig_y,y=N.y,m=N.y0,R=N.dy,z=N.z;else{var O=T.z;x.isArray1D(O)?(r(T,l,_,"x","y",["z"]),g=T._x,y=T._y,O=T._z):(u=T.x?l.makeCalcdata(T,"x"):[],L=T.y?_.makeCalcdata(T,"y"):[],g=E(T,l,"x",u).vals,y=E(T,_,"y",L).vals,T._x=g,T._y=y),b=T.x0,p=T.dx,m=T.y0,R=T.dy,z=o(O,T,l,_)}(l.rangebreaks||_.rangebreaks)&&(z=f(g,y,z),A||(g=h(g),y=h(y),T._x=g,T._y=y)),!A&&(w||T.connectgaps)&&(T._emptypoints=n(z),a(z,T._emptypoints));function P(Y){M=T._input.zsmooth=T.zsmooth=!1,x.warn('cannot use zsmooth: "fast": '+Y)}function U(Y){if(Y.length>1){var ee=(Y[Y.length-1]-Y[0])/(Y.length-1),q=Math.abs(ee/100);for(F=0;F<Y.length-1;F++)if(Math.abs(Y[F+1]-Y[F]-ee)>q)return!1}return!0}T._islinear=!1,l.type==="log"||_.type==="log"?M==="fast"&&P("log axis found"):U(g)?U(y)?T._islinear=!0:M==="fast"&&P("y scale is not linear"):M==="fast"&&P("x scale is not linear");var B=x.maxRowLength(z),X=T.xtype==="scaled"?"":g,$=i(T,X,b,p,B,l),le=T.ytype==="scaled"?"":y,ce=i(T,le,m,R,z.length,_);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[_._id]=S.findExtremes(_,ce);var de={x:$,y:ce,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(de.orig_x=u),T.yperiodalignment&&L&&(de.orig_y=L),X&&X.length===$.length-1&&(de.xCenter=X),le&&le.length===ce.length-1&&(de.yCenter=le),A&&(de.xRanges=N.xRanges,de.yRanges=N.yRanges,de.pts=N.pts),w||t(c,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var G={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=i(G,X,b,p,B,l),de.yfill=i(G,le,m,R,z.length,_)}return[de]};function h(v){for(var c=[],T=v.length,l=0;l<T;l++){var _=v[l];_!==s&&c.push(_)}return c}function f(v,c,T){for(var l=[],_=-1,w=0;w<T.length;w++)if(c[w]!==s){_++,l[_]=[];for(var A=0;A<T[w].length;A++)v[A]!==s&&l[_].push(T[w][A])}return l}}}),Q2=He({"src/constants/pixelated_image.js"(Z){"use strict";Z.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"]],Z.STYLE=Z.CSS_DECLARATIONS.map(function(V){return V.join(": ")+"; "}).join("")}}),lS=He({"src/lib/supports_pixelated_image.js"(Z,V){"use strict";var d=Q2(),x=es(),S=sa(),E=null;function e(){if(E!==null)return E;E=!1;var t=S.isSafari()||S.isMacWKWebView()||S.isIOS();if(window.navigator.userAgent&&!t){var r=Array.from(d.CSS_DECLARATIONS).reverse(),o=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof o=="function")E=r.some(function(s){return o.apply(null,s)});else{var a=x.tester.append("image").attr("style",d.STYLE),n=window.getComputedStyle(a.node()),i=n.imageRendering;E=r.some(function(s){var h=s[1];return i===h||i===h.toLowerCase()}),a.remove()}}return E}V.exports=e}}),e3=He({"src/traces/heatmap/plot.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=lo(),E=es(),e=Ho(),t=sa(),r=ou(),o=P2(),a=Jn(),n=rc().extractOpts,i=rc().makeColorScaleFuncFromTrace,s=vd(),h=uh(),f=h.LINE_SPACING,v=lS(),c=Q2().STYLE,T="heatmap-label";function l(g){return g.selectAll("g."+T)}function _(g){l(g).remove()}V.exports=function(g,b,p,u){var y=b.xaxis,m=b.yaxis;t.makeTraceGroups(u,p,"hm").each(function(R){var L=d.select(this),z=R[0],F=z.trace,N=F.xgap||0,O=F.ygap||0,P=z.z,U=z.x,B=z.y,X=z.xCenter,$=z.yCenter,le=S.traceIs(F,"contour"),ce=le?"best":F.zsmooth,de=P.length,G=t.maxRowLength(P),Y=!1,ee=!1,q,se,ae,j,Q,re,pe,we;for(re=0;q===void 0&&re<U.length-1;)q=y.c2p(U[re]),re++;for(re=U.length-1;se===void 0&&re>0;)se=y.c2p(U[re]),re--;for(se<q&&(ae=se,se=q,q=ae,Y=!0),re=0;j===void 0&&re<B.length-1;)j=m.c2p(B[re]),re++;for(re=B.length-1;Q===void 0&&re>0;)Q=m.c2p(B[re]),re--;Q<j&&(ae=j,j=Q,Q=ae,ee=!0),le&&(X=U,$=B,U=z.xfill,B=z.yfill);var Se="default";if(ce?Se=ce==="best"?"smooth":"fast":F._islinear&&N===0&&O===0&&v()&&(Se="fast"),Se!=="fast"){var Ie=ce==="best"?0:.5;q=Math.max(-Ie*y._length,q),se=Math.min((1+Ie)*y._length,se),j=Math.max(-Ie*m._length,j),Q=Math.min((1+Ie)*m._length,Q)}var Re=Math.round(se-q),We=Math.round(Q-j),at=q>=y._length||se<=0||j>=m._length||Q<=0;if(at){var nt=L.selectAll("image").data([]);nt.exit().remove(),_(L);return}var tt,qe;Se==="fast"?(tt=G,qe=de):(tt=Re,qe=We);var he=document.createElement("canvas");he.width=tt,he.height=qe;var ue=he.getContext("2d",{willReadFrequently:!0}),ne=i(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ye;Se==="fast"?(Ce=Y?function(_a){return G-1-_a}:t.identity,Ye=ee?function(_a){return de-1-_a}:t.identity):(Ce=function(_a){return t.constrain(Math.round(y.c2p(U[_a])-q),0,Re)},Ye=function(_a){return t.constrain(Math.round(m.c2p(B[_a])-j),0,We)});var rt=Ye(0),Ke=[rt,rt],Mt=Y?0:1,kt=ee?0:1,Nt=0,Gt=0,Mr=0,mr=0,qr,Er,Ir,_t,Oe;function Je(_a,Ai){if(_a!==void 0){var ki=ne(_a);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Nt+=Ai,Gt+=ki[0]*Ai,Mr+=ki[1]*Ai,mr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(_a,Ai,ki,Ki){var yn=_a[ki.bin0];if(yn===void 0)return Je(void 0,1);var Ln=_a[ki.bin1],kn=Ai[ki.bin0],Bn=Ai[ki.bin1],ao=Ln-yn||0,xo=kn-yn||0,Co;return Ln===void 0?Bn===void 0?Co=0:kn===void 0?Co=2*(Bn-yn):Co=(2*Bn-kn-yn)*2/3:Bn===void 0?kn===void 0?Co=0:Co=(2*yn-Ln-kn)*2/3:kn===void 0?Co=(2*Bn-Ln-yn)*2/3:Co=Bn+yn-Ln-kn,Je(yn+ki.frac*ao+Ki.frac*(xo+ki.frac*Co))}if(Se!=="default"){var Le=0,Ue;try{Ue=new Uint8Array(tt*qe*4)}catch{Ue=new Array(tt*qe*4)}if(Se==="smooth"){var Ze=X||U,st=$||B,ut=new Array(Ze.length),Ut=new Array(st.length),Ct=new Array(Re),Pt=X?A:w,jt=$?A:w,fr,ur,sr;for(re=0;re<Ze.length;re++)ut[re]=Math.round(y.c2p(Ze[re])-q);for(re=0;re<st.length;re++)Ut[re]=Math.round(m.c2p(st[re])-j);for(re=0;re<Re;re++)Ct[re]=Pt(re,ut);for(pe=0;pe<We;pe++)for(fr=jt(pe,Ut),ur=P[fr.bin0],sr=P[fr.bin1],re=0;re<Re;re++,Le+=4)Oe=Ae(ur,sr,Ct[re],fr),M(Ue,Le,Oe)}else for(pe=0;pe<de;pe++)for(_t=P[pe],Ke=Ye(pe),re=0;re<G;re++)Oe=Je(_t[re],1),Le=(Ke*G+Ce(re))*4,M(Ue,Le,Oe);var Pr=ue.createImageData(tt,qe);try{Pr.data.set(Ue)}catch{var Ta=Pr.data,Oa=Ta.length;for(pe=0;pe<Oa;pe++)Ta[pe]=Ue[pe]}ue.putImageData(Pr,0,0)}else{var Ia=Math.floor(N/2),qa=Math.floor(O/2);for(pe=0;pe<de;pe++)if(_t=P[pe],Ke.reverse(),Ke[kt]=Ye(pe+1),!(Ke[0]===Ke[1]||Ke[0]===void 0||Ke[1]===void 0))for(Er=Ce(0),qr=[Er,Er],re=0;re<G;re++)qr.reverse(),qr[Mt]=Ce(re+1),!(qr[0]===qr[1]||qr[0]===void 0||qr[1]===void 0)&&(Ir=_t[re],Oe=Je(Ir,(qr[1]-qr[0])*(Ke[1]-Ke[0])),ue.fillStyle="rgba("+Oe.join(",")+")",ue.fillRect(qr[0]+Ia,Ke[0]+qa,qr[1]-qr[0]-N,Ke[1]-Ke[0]-O))}Gt=Math.round(Gt/Nt),Mr=Math.round(Mr/Nt),mr=Math.round(mr/Nt);var Wa=x("rgb("+Gt+","+Mr+","+mr+")");g._hmpixcount=(g._hmpixcount||0)+Nt,g._hmlumcount=(g._hmlumcount||0)+Nt*Wa.getLuminance();var Ca=L.selectAll("image").data(R);Ca.enter().append("svg:image").attr({xmlns:s.svg,preserveAspectRatio:"none"}),Ca.attr({height:We,width:Re,x:q,y:j,"xlink:href":he.toDataURL("image/png")}),Se==="fast"&&!ce&&Ca.attr("style",c),_(L);var hi=F.texttemplate;if(hi){var wi=n(F),Kt={type:"linear",range:[wi.min,wi.max],_separators:y._separators,_numFormat:y._numFormat},Dt=F.type==="histogram2dcontour",Yt=F.type==="contour",Jt=Yt?1:0,Fr=Yt?de-1:de,ta=Yt?1:0,ra=Yt?G-1:G,ca=[];for(re=Jt;re<Fr;re++){var Ba;if(Yt)Ba=z.y[re];else if(Dt){if(re===0||re===de-1)continue;Ba=z.y[re]}else if(z.yCenter)Ba=z.yCenter[re];else{if(re+1===de&&z.y[re+1]===void 0)continue;Ba=(z.y[re]+z.y[re+1])/2}var $a=Math.round(m.c2p(Ba));if(!(0>$a||$a>m._length))for(pe=ta;pe<ra;pe++){var Za;if(Yt)Za=z.x[pe];else if(Dt){if(pe===0||pe===G-1)continue;Za=z.x[pe]}else if(z.xCenter)Za=z.xCenter[pe];else{if(pe+1===G&&z.x[pe+1]===void 0)continue;Za=(z.x[pe]+z.x[pe+1])/2}var ri=Math.round(y.c2p(Za));if(!(0>ri||ri>y._length)){var pi=o({x:Za,y:Ba},F,g._fullLayout);pi.x=Za,pi.y=Ba;var Ra=z.z[re][pe];Ra===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ra,pi.zLabel=e.tickText(Kt,Ra,"hover").text);var an=z.text&&z.text[re]&&z.text[re][pe];(an===void 0||an===!1)&&(an=""),pi.text=an;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:g._fullLayout._d3locale,template:hi});if(tn){var fn=tn.split("<br>"),xt=fn.length,lt=0;for(we=0;we<xt;we++)lt=Math.max(lt,fn[we].length);ca.push({l:xt,c:lt,t:tn,x:ri,y:$a,z:Ra})}}}}var Br=F.textfont,Cr=Br.size,xr=g._fullLayout.font.size;if(!Cr||Cr==="auto"){var Rr=1/0,Ur=1/0,Hr=0,gt=0;for(we=0;we<ca.length;we++){var Xt=ca[we];if(Hr=Math.max(Hr,Xt.l),gt=Math.max(gt,Xt.c),we<ca.length-1){var vr=ca[we+1],Or=Math.abs(vr.x-Xt.x),ba=Math.abs(vr.y-Xt.y);Or&&(Rr=Math.min(Rr,Or)),ba&&(Ur=Math.min(Ur,ba))}}!isFinite(Rr)||!isFinite(Ur)?Cr=xr:(Rr-=N,Ur-=O,Rr/=gt,Ur/=Hr,Rr/=f/2,Ur/=f,Cr=Math.min(Math.floor(Rr),Math.floor(Ur),xr))}if(Cr<=0||!isFinite(Cr))return;var Pa=function(_a){return _a.x},ma=function(_a){return _a.y-Cr*(_a.l*f/2-1)},la=l(L).data(ca);la.enter().append("g").classed(T,1).append("text").attr("text-anchor","middle").each(function(_a){var Ai=d.select(this),ki=Br.color;(!ki||ki==="auto")&&(ki=a.contrast(_a.z===void 0?g._fullLayout.plot_bgcolor:"rgba("+ne(_a.z).join()+")")),Ai.attr("data-notex",1).call(r.positionText,Pa(_a),ma(_a)).call(E.font,{family:Br.family,size:Cr,color:ki,weight:Br.weight,style:Br.style,variant:Br.variant,textcase:Br.textcase,lineposition:Br.lineposition,shadow:Br.shadow}).text(_a.t).call(r.convertToTspans,g)})}})};function w(g,b){var p=b.length-2,u=t.constrain(t.findBin(g,b),0,p),y=b[u],m=b[u+1],R=t.constrain(u+(g-y)/(m-y)-.5,0,p),L=Math.round(R),z=Math.abs(R-L);return!R||R===p||!z?{bin0:L,bin1:L,frac:0}:{bin0:L,frac:z,bin1:Math.round(L+z/(R-L))}}function A(g,b){var p=b.length-1,u=t.constrain(t.findBin(g,b),0,p),y=b[u],m=b[u+1],R=(g-y)/(m-y)||0;return R<=0?{bin0:u,bin1:u,frac:0}:R<.5?{bin0:u,bin1:u+1,frac:R}:{bin0:u+1,bin1:u,frac:1-R}}function M(g,b,p){g[b]=p[0],g[b+1]=p[1],g[b+2]=p[2],g[b+3]=Math.round(p[3]*255)}}}),n0=He({"src/traces/heatmap/colorbar.js"(Z,V){"use strict";V.exports={min:"zmin",max:"zmax"}}}),t3=He({"src/traces/heatmap/style.js"(Z,V){"use strict";var d=Wn();V.exports=function(S){d.select(S).selectAll(".hm image").style("opacity",function(E){return E.trace.opacity})}}}),r3=He({"src/traces/heatmap/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=x.isArrayOrTypedArray,E=Ho(),e=rc().extractOpts;V.exports=function(r,o,a,n,i){i||(i={});var s=i.isContour,h=r.cd[0],f=h.trace,v=r.xa,c=r.ya,T=h.x,l=h.y,_=h.z,w=h.xCenter,A=h.yCenter,M=h.zmask,g=f.zhoverformat,b=T,p=l,u,y,m,R;if(r.index!==!1){try{m=Math.round(r.index[1]),R=Math.round(r.index[0])}catch{x.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index);return}if(m<0||m>=_[0].length||R<0||R>_.length)return}else{if(d.inbox(o-T[0],o-T[T.length-1],0)>0||d.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var L;for(b=[2*T[0]-T[1]],L=1;L<T.length;L++)b.push((T[L]+T[L-1])/2);for(b.push([2*T[T.length-1]-T[T.length-2]]),p=[2*l[0]-l[1]],L=1;L<l.length;L++)p.push((l[L]+l[L-1])/2);p.push([2*l[l.length-1]-l[l.length-2]])}m=Math.max(0,Math.min(b.length-2,x.findBin(o,b))),R=Math.max(0,Math.min(p.length-2,x.findBin(a,p)))}var z=v.c2p(T[m]),F=v.c2p(T[m+1]),N=c.c2p(l[R]),O=c.c2p(l[R+1]),P,U;s?(P=h.orig_x||T,U=h.orig_y||l,F=z,u=P[m],O=N,y=U[R]):(P=h.orig_x||w||T,U=h.orig_y||A||l,u=w?P[m]:(P[m]+P[m+1])/2,y=A?U[R]:(U[R]+U[R+1])/2,v&&v.type==="category"&&(u=T[m]),c&&c.type==="category"&&(y=l[R]),f.zsmooth&&(z=F=v.c2p(u),N=O=c.c2p(y)));var B=_[R][m];if(M&&!M[R][m]&&(B=void 0),!(B===void 0&&!f.hoverongaps)){var X;S(h.hovertext)&&S(h.hovertext[R])?X=h.hovertext[R][m]:S(h.text)&&S(h.text[R])&&(X=h.text[R][m]);var $=e(f),le={type:"linear",range:[$.min,$.max],hoverformat:g,_separators:v._separators,_numFormat:v._numFormat},ce=E.tickText(le,B,"hover").text;return[x.extendFlat(r,{index:f._after2before?f._after2before[R][m]:[R,m],distance:r.maxHoverDistance,spikeDistance:r.maxSpikeDistance,x0:z,x1:F,y0:N,y1:O,xLabelVal:u,yLabelVal:y,zLabelVal:B,zLabel:ce,text:X})]}}}}),aF=He({"src/traces/heatmap/index.js"(Z,V){"use strict";V.exports={attributes:p1(),supplyDefaults:tF(),calc:$2(),plot:e3(),colorbar:n0(),style:t3(),hoverPoints:r3(),moduleType:"trace",name:"heatmap",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}}),iF=He({"lib/heatmap.js"(Z,V){"use strict";V.exports=aF()}}),uS=He({"src/traces/histogram/bin_attributes.js"(Z,V){"use strict";V.exports=function(x,S){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),nF=He({"src/traces/histogram/constants.js"(Z,V){"use strict";V.exports={eventDataKeys:["binNumber"]}}}),a3=He({"src/traces/histogram/attributes.js"(Z,V){"use strict";var d=Sv(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,texttemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=tc(),r=uS(),o=nF(),a=Qo().extendFlat;V.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:x("x"),yhoverformat:x("y"),text:a({},d.text,{}),hovertext:a({},d.hovertext,{}),orientation:d.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:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:S({},{keys:o.eventDataKeys}),hovertemplatefallback:e(),texttemplate:E({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:e({editType:"plot"}),textposition:a({},d.textposition,{arrayOk:!1}),textfont:t({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:t({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:t({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:d.insidetextanchor,textangle:d.textangle,cliponaxis:d.cliponaxis,constraintext:d.constraintext,marker:d.marker,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,zorder:d.zorder}}}),oF=He({"src/traces/histogram/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=Jn(),E=gd().handleText,e=j2(),t=a3();V.exports=function(o,a,n,i){function s(p,u){return x.coerce(o,a,t,p,u)}var h=s("x"),f=s("y"),v=s("cumulative.enabled");v&&(s("cumulative.direction"),s("cumulative.currentbin")),s("text");var c=s("textposition");E(o,a,i,s,c,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("xhoverformat"),s("yhoverformat");var T=s("orientation",f&&!h?"h":"v"),l=T==="v"?"x":"y",_=T==="v"?"y":"x",w=h&&f?Math.min(x.minRowLength(h)&&x.minRowLength(f)):x.minRowLength(a[l]||[]);if(!w){a.visible=!1;return}a._length=w;var A=d.getComponentMethod("calendars","handleTraceDefaults");A(o,a,["x","y"],i);var M=a[_];M&&s("histfunc"),s("histnorm"),s("autobin"+l),e(o,a,s,n,i),x.coerceSelectionMarkerOpacity(a,s);var g=(a.marker.line||{}).color,b=d.getComponentMethod("errorbars","supplyDefaults");b(o,a,g||S.defaultLine,{axis:"y"}),b(o,a,g||S.defaultLine,{axis:"x",inherit:"y"}),s("zorder")}}}),i3=He({"src/traces/histogram/cross_trace_defaults.js"(Z,V){"use strict";var d=sa(),x=ef(),S=lo().traceIs,E=Q0(),e=gd().validateCornerradius,t=d.nestedProperty,r=J0().getAxisGroup,o=[{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"}],a=["x","y"];V.exports=function(i,s){var h=s._histogramBinOpts={},f=[],v={},c=[],T,l,_,w,A,M,g;function b(ce,de){return d.coerce(T._input,T,T._module.attributes,ce,de)}function p(ce){return ce.orientation==="v"?"x":"y"}function u(ce,de){var G=x.getFromTrace({_fullLayout:s},ce,de);return G.type}function y(ce,de,G){var Y=ce.uid+"__"+G;de||(de=Y);var ee=u(ce,G),q=ce[G+"calendar"]||"",se=h[de],ae=!0;se&&(ee===se.axType&&q===se.calendar?(ae=!1,se.traces.push(ce),se.dirs.push(G)):(de=Y,ee!==se.axType&&d.warn(["Attempted to group the bins of trace",ce.index,"set on a","type:"+ee,"axis","with bins on","type:"+se.axType,"axis."].join(" ")),q!==se.calendar&&d.warn(["Attempted to group the bins of trace",ce.index,"set with a",q,"calendar","with bins",se.calendar?"on a "+se.calendar+" calendar":"w/o a set calendar"].join(" ")))),ae&&(h[de]={traces:[ce],dirs:[G],axType:ee,calendar:ce[G+"calendar"]||""}),ce["_"+G+"bingroup"]=de}for(A=0;A<i.length;A++)if(T=i[A],S(T,"histogram")){if(f.push(T),delete T._xautoBinFinished,delete T._yautoBinFinished,T.type==="histogram"){var m=b("marker.cornerradius",s.barcornerradius);T.marker&&(T.marker.cornerradius=e(m))}S(T,"2dMap")||E(T._input,T,s,b,s.barmode)}var R=s._alignmentOpts||{};for(A=0;A<f.length;A++){if(T=f[A],_="",!S(T,"2dMap")){if(w=p(T),s.barmode==="group"&&T.alignmentgroup){var L=T[w+"axis"],z=r(s,L)+T.orientation;(R[z]||{})[T.alignmentgroup]&&(_=z)}!_&&s.barmode!=="overlay"&&(_=r(s,T.xaxis)+r(s,T.yaxis)+p(T))}_?(v[_]||(v[_]=[]),v[_].push(T)):c.push(T)}for(_ in v){if(l=v[_],l.length===1){c.push(l[0]);continue}var F=!1;for(l.length&&(T=l[0],F=b("bingroup")),_=F||_,A=0;A<l.length;A++){T=l[A];var N=T._input.bingroup;N&&N!==_&&d.warn(["Trace",T.index,"must match","within bingroup",_+".","Ignoring its bingroup:",N,"setting."].join(" ")),T.bingroup=_,y(T,_,p(T))}}for(A=0;A<c.length;A++){T=c[A];var O=b("bingroup");if(S(T,"2dMap"))for(g=0;g<2;g++){w=a[g];var P=b(w+"bingroup",O?O+"__"+w:null);y(T,P,w)}else y(T,O,p(T))}for(_ in h){var U=h[_];for(l=U.traces,M=0;M<o.length;M++){var B=o[M],X=B.name,$,le;if(!(X==="nbins"&&U.sizeFound)){for(A=0;A<l.length;A++){if(T=l[A],w=U.dirs[A],$=B.aStr[w],t(T._input,$).get()!==void 0){U[X]=b($),U[X+"Found"]=!0;break}le=(T._autoBin||{})[w]||{},le[X]&&t(T,$).set(le[X])}if(X==="start"||X==="end")for(;A<l.length;A++)T=l[A],T["_"+w+"bingroup"]&&(le=(T._autoBin||{})[w]||{},b($,le[X]));X==="nbins"&&!U.sizeFound&&!U.nbinsFound&&(T=l[0],U[X]=b($))}}}}}}),sF=He({"src/traces/histogram/hover.js"(Z,V){"use strict";var d=f1().hoverPoints,x=Ho().hoverLabelText;V.exports=function(E,e,t,r,o){var a=d(E,e,t,r,o);if(a){E=a[0];var n=E.cd[E.index],i=E.cd[0].trace;if(!i.cumulative.enabled){var s=i.orientation==="h"?"y":"x";E[s+"Label"]=x(E[s+"a"],[n.ph0,n.ph1],i[s+"hoverformat"])}return a}}}}),cS=He({"src/traces/histogram/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){if(x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"zLabelVal"in S&&(x.z=S.zLabelVal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),!(E.cumulative||{}).enabled){var r=Array.isArray(t)?e[0].pts[t[0]][t[1]]:e[t].pts;x.pointNumbers=r,x.binNumber=x.pointNumber,delete x.pointNumber,delete x.pointIndex;var o;if(E._indexToPoints){o=[];for(var a=0;a<r.length;a++)o=o.concat(E._indexToPoints[r[a]])}else o=r;x.pointIndices=o}return x}}}),lF=He({"src/traces/histogram/index.js"(Z,V){"use strict";V.exports={attributes:a3(),layoutAttributes:U2(),supplyDefaults:oF(),crossTraceDefaults:i3(),supplyLayoutDefaults:J5(),calc:oS().calc,crossTraceCalc:eg().crossTraceCalc,plot:tg().plot,layerName:"barlayer",style:Nd().style,styleOnSelect:Nd().styleOnSelect,colorbar:pp(),hoverPoints:sF(),selectPoints:h1(),eventData:cS(),moduleType:"trace",name:"histogram",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}}),uF=He({"lib/histogram.js"(Z,V){"use strict";V.exports=lF()}}),n3=He({"src/traces/histogram2d/attributes.js"(Z,V){"use strict";var d=a3(),x=uS(),S=p1(),E=ru(),e=tf().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:o}=Jl(),a=ku(),n=Qo().extendFlat;V.exports=n({x:d.x,y:d.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:x("x"),nbinsy:d.nbinsy,ybins:x("y"),autobinx:d.autobinx,autobiny:d.autobiny,bingroup:n({},d.bingroup,{}),xbingroup:n({},d.bingroup,{}),ybingroup:n({},d.bingroup,{}),xgap:S.xgap,ygap:S.ygap,zsmooth:S.zsmooth,xhoverformat:e("x"),yhoverformat:e("y"),zhoverformat:e("z",1),hovertemplate:t({},{keys:["z"]}),hovertemplatefallback:o(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:o({editType:"plot"}),textfont:S.textfont,showlegend:n({},E.showlegend,{dflt:!1})},a("",{cLetter:"z",autoColorDflt:!1}))}}),fS=He({"src/traces/histogram2d/sample_defaults.js"(Z,V){"use strict";var d=lo(),x=sa();V.exports=function(E,e,t,r){var o=t("x"),a=t("y"),n=x.minRowLength(o),i=x.minRowLength(a);if(!n||!i){e.visible=!1;return}e._length=Math.min(n,i);var s=d.getComponentMethod("calendars","handleTraceDefaults");s(E,e,["x","y"],r);var h=t("z")||t("marker.color");h&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}}),cF=He({"src/traces/histogram2d/defaults.js"(Z,V){"use strict";var d=sa(),x=fS(),S=tS(),E=_h(),e=q_(),t=n3();V.exports=function(o,a,n,i){function s(h,f){return d.coerce(o,a,t,h,f)}x(o,a,s,i),a.visible!==!1&&(S(o,a,s,i),E(o,a,i,s,{prefix:"",cLetter:"z"}),s("hovertemplate"),s("hovertemplatefallback"),e(s,i),s("xhoverformat"),s("yhoverformat"))}}}),fF=He({"src/traces/histogram2d/hover.js"(Z,V){"use strict";var d=r3(),x=Ho().hoverLabelText;V.exports=function(E,e,t,r,o){var a=d(E,e,t,r,o);if(a){E=a[0];var n=E.index,i=n[0],s=n[1],h=E.cd[0],f=h.trace,v=h.xRanges[s],c=h.yRanges[i];return E.xLabel=x(E.xa,[v[0],v[1]],f.xhoverformat),E.yLabel=x(E.ya,[c[0],c[1]],f.yhoverformat),a}}}}),hF=He({"src/traces/histogram2d/index.js"(Z,V){"use strict";V.exports={attributes:n3(),supplyDefaults:cF(),crossTraceDefaults:i3(),calc:$2(),plot:e3(),layerName:"heatmaplayer",colorbar:n0(),style:t3(),hoverPoints:fF(),eventData:cS(),moduleType:"trace",name:"histogram2d",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}}),pF=He({"lib/histogram2d.js"(Z,V){"use strict";V.exports=hF()}}),o3=He({"src/constants/filter_ops.js"(Z,V){"use strict";V.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,V){"use strict";var d=p1(),x=af(),S=tf(),E=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Gh().dash,o=tc(),a=Qo().extendFlat,n=o3(),i=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,h=x.line;V.exports=a({z:d.z,x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,text:d.text,hovertext:d.hovertext,transpose:d.transpose,xtype:d.xtype,ytype:d.ytype,xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:d.hovertemplate,hovertemplatefallback:d.hovertemplatefallback,texttemplate:a({},d.texttemplate,{}),texttemplatefallback:d.texttemplatefallback,textfont:a({},d.textfont,{}),hoverongaps:d.hoverongaps,connectgaps:a({},d.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:o({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:e("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a({},h.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},h.smoothing,{}),editType:"plot"},zorder:x.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,V){"use strict";var d=n3(),x=V_(),S=ku(),E=tf().axisHoverFormat,e=Qo().extendFlat;V.exports=e({x:d.x,y:d.y,z:d.z,marker:d.marker,histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:d.xbins,nbinsy:d.nbinsy,ybins:d.ybins,autobinx:d.autobinx,autobiny:d.autobiny,bingroup:d.bingroup,xbingroup:d.xbingroup,ybingroup:d.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:e({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:d.hovertemplate,hovertemplatefallback:d.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=E("contours.size"),n;o?n=S.autocontour=!0:n=E("autocontour",!1),(n||!a)&&E("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=E.font;d.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=He({"src/traces/contour/style_defaults.js"(Z,V){"use strict";var d=_h(),x=pS();V.exports=function(E,e,t,r,o){var a=t("contours.coloring"),n,i="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(i=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(E.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,d(E,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),x(t,r,i,o)}}}),dF=He({"src/traces/histogram2dcontour/defaults.js"(Z,V){"use strict";var d=sa(),x=fS(),S=s3(),E=l3(),e=q_(),t=hS();V.exports=function(o,a,n,i){function s(f,v){return d.coerce(o,a,t,f,v)}function h(f){return d.coerce2(o,a,t,f)}x(o,a,s,i),a.visible!==!1&&(S(o,a,s,h),E(o,a,s,i),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,i))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,V){"use strict";var d=Ho(),x=sa();V.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=x.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=x.aggNums(Math.max,null,t));var n=S(o,a,e.ncontours);r.size=n.dtick,r.start=d.tickFirst(n),n.range.reverse(),r.end=d.tickFirst(n),r.start===o&&(r.start+=r.size),r.end===a&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),x.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var i=r.start,s=r.end,h=e._input.contours;if(i>s&&(r.start=h.start=s,s=r.end=h.end=i,i=r.start),!(r.size>0)){var f;i===s?f=1:f=S(i,s,e.ncontours).dtick,h.size=r.size=f}}};function S(E,e,t){var r={type:"linear",range:[E,e]};return d.autoTicks(r,(e-E)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,V){"use strict";V.exports=function(x){return x.end+x.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,V){"use strict";var d=rc(),x=$2(),S=dS(),E=G_();V.exports=function(t,r){var o=x(t,r),a=o[0].z;S(r,a);var n=r.contours,i=d.extractOpts(r),s;if(n.coloring==="heatmap"&&i.auto&&r.autocontour===!1){var h=n.start,f=E(n),v=n.size||1,c=Math.floor((f-h)/v)+1;isFinite(v)||(v=1,c=1);var T=h-v/2,l=T+c*v;s=[T,l]}else s=a;return d.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"src/traces/contour/constants.js"(Z,V){"use strict";V.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}}}}),mS=He({"src/traces/contour/make_crossings.js"(Z,V){"use strict";var d=H_();V.exports=function(E){var e=E[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,n,i,s,h,f,v,c,T;for(n=0;n<t-1;n++)for(s=[],n===0&&(s=s.concat(d.BOTTOMSTART)),n===t-2&&(s=s.concat(d.TOPSTART)),a=0;a<r-1;a++)for(i=s.slice(),a===0&&(i=i.concat(d.LEFTSTART)),a===r-2&&(i=i.concat(d.RIGHTSTART)),h=a+","+n,f=[[e[n][a],e[n][a+1]],[e[n+1][a],e[n+1][a+1]]],T=0;T<E.length;T++)c=E[T],v=x(c.level,f),v&&(c.crossings[h]=v,i.indexOf(v)!==-1&&(c.starts.push([a,n]),o&&i.indexOf(v,i.indexOf(v)+1)!==-1&&c.starts.push([a,n])))};function x(S,E){var e=(E[0][0]>S?0:1)+(E[0][1]>S?0:2)+(E[1][1]>S?0:4)+(E[1][0]>S?0:8);if(e===5||e===10){var t=(E[0][0]+E[0][1]+E[1][0]+E[1][1])/4;return S>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),gS=He({"src/traces/contour/find_all_paths.js"(Z,V){"use strict";var d=sa(),x=H_();V.exports=function(a,n,i){var s,h,f,v,c;for(n=n||.01,i=i||.01,f=0;f<a.length;f++){for(v=a[f],c=0;c<v.starts.length;c++)h=v.starts[c],e(v,h,"edge",n,i);for(s=0;Object.keys(v.crossings).length&&s<1e4;)s++,h=Object.keys(v.crossings)[0].split(",").map(Number),e(v,h,void 0,n,i);s===1e4&&d.log("Infinite loop in contour?")}};function S(o,a,n,i){return Math.abs(o[0]-a[0])<n&&Math.abs(o[1]-a[1])<i}function E(o,a){var n=o[2]-a[2],i=o[3]-a[3];return Math.sqrt(n*n+i*i)}function e(o,a,n,i,s){var h=a.join(","),f=o.crossings[h],v=t(f,n,a),c=[r(o,a,[-v[0],-v[1]])],T=o.z.length,l=o.z[0].length,_=a.slice(),w=v.slice(),A;for(A=0;A<1e4;A++){if(f>20?(f=x.CHOOSESADDLE[f][(v[0]||v[1])<0?0:1],o.crossings[h]=x.SADDLEREMAINDER[f]):delete o.crossings[h],v=x.NEWDELTA[f],!v){d.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,v)),a[0]+=v[0],a[1]+=v[1],h=a.join(","),S(c[c.length-1],c[c.length-2],i,s)&&c.pop();var M=v[0]&&(a[0]<0||a[0]>l-2)||v[1]&&(a[1]<0||a[1]>T-2),g=a[0]===_[0]&&a[1]===_[1]&&v[0]===w[0]&&v[1]===w[1];if(g||n&&M)break;f=o.crossings[h]}A===1e4&&d.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],i,s),p=0,u=.2*o.smoothing,y=[],m=0,R,L,z,F,N,O,P,U,B,X,$;for(A=1;A<c.length;A++)P=E(c[A],c[A-1]),p+=P,y.push(P);var le=p/y.length*u;function ce(Y){return c[Y%c.length]}for(A=c.length-2;A>=m;A--)if(R=y[A],R<le){for(z=0,L=A-1;L>=m&&R+y[L]<le;L--)R+=y[L];if(b&&A===c.length-2)for(z=0;z<L&&R+y[z]<le;z++)R+=y[z];N=A-L+z+1,O=Math.floor((A+L+z+2)/2),!b&&A===c.length-2?F=c[c.length-1]:!b&&L===-1?F=c[0]:N%2?F=ce(O):F=[(ce(O)[0]+ce(O+1)[0])/2,(ce(O)[1]+ce(O+1)[1])/2],c.splice(L+1,A-L+1,F),A=L+1,z&&(m=z),b&&(A===c.length-2?c[z]=c[c.length-1]:A===0&&(c[c.length-1]=c[0]))}for(c.splice(0,m),A=0;A<c.length;A++)c[A].length=2;if(!(c.length<2))if(b)c.pop(),o.paths.push(c);else{n||d.log("Unclosed interior contour?",o.level,_.join(","),c.join("L"));var de=!1;for(U=0;U<o.edgepaths.length;U++)if(X=o.edgepaths[U],!de&&S(X[0],c[c.length-1],i,s)){c.pop(),de=!0;var G=!1;for(B=0;B<o.edgepaths.length;B++)if($=o.edgepaths[B],S($[$.length-1],c[0],i,s)){G=!0,c.shift(),o.edgepaths.splice(U,1),B===U?o.paths.push(c.concat($)):(B>U&&B--,o.edgepaths[B]=$.concat(c,X));break}G||(o.edgepaths[U]=c.concat(X))}for(U=0;U<o.edgepaths.length&&!de;U++)X=o.edgepaths[U],S(X[X.length-1],c[0],i,s)&&(c.shift(),o.edgepaths[U]=X.concat(c),de=!0);de||o.edgepaths.push(c)}}function t(o,a,n){var i=0,s=0;return o>20&&a?o===208||o===1114?i=n[0]===0?1:-1:s=n[1]===0?1:-1:x.BOTTOMSTART.indexOf(o)!==-1?s=1:x.LEFTSTART.indexOf(o)!==-1?i=1:x.TOPSTART.indexOf(o)!==-1?s=-1:i=-1,[i,s]}function r(o,a,n){var i=a[0]+Math.max(n[0],0),s=a[1]+Math.max(n[1],0),h=o.z[s][i],f=o.xaxis,v=o.yaxis;if(n[1]){var c=(o.level-h)/(o.z[s][i+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[i]):0)+(c!==0?c*f.c2l(o.x[i+1]):0);return[f.c2p(f.l2c(T),!0),v.c2p(o.y[s],!0),i+c,s]}else{var l=(o.level-h)/(o.z[s+1][i]-h),_=(l!==1?(1-l)*v.c2l(o.y[s]):0)+(l!==0?l*v.c2l(o.y[s+1]):0);return[f.c2p(o.x[i],!0),v.c2p(v.l2c(_),!0),i,s+l]}}}}),vF=He({"src/traces/contour/constraint_mapping.js"(Z,V){"use strict";var d=o3(),x=as();V.exports={"[]":E("[]"),"][":E("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function n(i){return x(i)?+i:null}return d.COMPARISON_OPS2.indexOf(t)!==-1?a=n(o?r[0]:r):d.INTERVAL_OPS.indexOf(t)!==-1?a=o?[n(r[0]),n(r[1])]:[n(r),n(r)]:d.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(n):[n(r)]),a}function E(t){return function(r){r=S(t,r);var o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:o,end:a,size:a-o}}}function e(t){return function(r){return r=S(t,r),{start:r,end:1/0,size:1/0}}}}}),yS=He({"src/traces/contour/empty_pathinfo.js"(Z,V){"use strict";var d=sa(),x=vF(),S=G_();V.exports=function(e,t,r){for(var o=e.type==="constraint"?x[e._operation](e.value):e,a=o.size,n=[],i=S(o),s=r.trace._carpetTrace,h=s?{xaxis:s.aaxis,yaxis:s.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},f=o.start;f<i;f+=a)if(n.push(d.extendFlat({level:f,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},h)),n.length>1e3){d.warn("Too many contours, clipping at 1000",e);break}return n}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e,t,r,o=function(i){return i.reverse()},a=function(i){return i};switch(E){case"=":case"<":return S;case">":for(S.length!==1&&d.warn("Contour data invalid for the specified inequality operation."),t=S[0],e=0;e<t.edgepaths.length;e++)t.edgepaths[e]=o(t.edgepaths[e]);for(e=0;e<t.paths.length;e++)t.paths[e]=o(t.paths[e]);for(e=0;e<t.starts.length;e++)t.starts[e]=o(t.starts[e]);return S;case"][":var n=o;o=a,a=n;case"[]":for(S.length!==2&&d.warn("Contour data invalid for the specified inequality range operation."),t=x(S[0]),r=x(S[1]),e=0;e<t.edgepaths.length;e++)t.edgepaths[e]=o(t.edgepaths[e]);for(e=0;e<t.paths.length;e++)t.paths[e]=o(t.paths[e]);for(e=0;e<t.starts.length;e++)t.starts[e]=o(t.starts[e]);for(;r.edgepaths.length;)t.edgepaths.push(a(r.edgepaths.shift()));for(;r.paths.length;)t.paths.push(a(r.paths.shift()));for(;r.starts.length;)t.starts.push(a(r.starts.shift()));return[t]}};function x(S){return d.extendFlat({},S,{edgepaths:d.extendDeep([],S.edgepaths),paths:d.extendDeep([],S.paths),starts:d.extendDeep([],S.starts)})}}}),xS=He({"src/traces/contour/close_boundaries.js"(Z,V){"use strict";V.exports=function(d,x){var S=d[0],E=S.z,e;switch(x.type){case"levels":var t=Math.min(E[0][0],E[0][1]);for(e=0;e<d.length;e++){var r=d[e];r.prefixBoundary=!r.edgepaths.length&&(t>r.level||r.starts.length&&t===r.level)}break;case"constraint":if(S.prefixBoundary=!1,S.edgepaths.length)return;var o=S.x.length,a=S.y.length,n=-1/0,i=1/0;for(e=0;e<a;e++)i=Math.min(i,E[e][0]),i=Math.min(i,E[e][o-1]),n=Math.max(n,E[e][0]),n=Math.max(n,E[e][o-1]);for(e=1;e<o-1;e++)i=Math.min(i,E[0][e]),i=Math.min(i,E[a-1][e]),n=Math.max(n,E[0][e]),n=Math.max(n,E[a-1][e]);var s=x.value,h,f;switch(x._operation){case">":s>n&&(S.prefixBoundary=!0);break;case"<":(s<i||S.starts.length&&s===i)&&(S.prefixBoundary=!0);break;case"[]":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),(f<i||h>n||S.starts.length&&f===i)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),h<i&&f>n&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var V=Wn(),d=sa(),x=es(),S=rc(),E=ou(),e=Ho(),t=wv(),r=e3(),o=mS(),a=gS(),n=yS(),i=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(g,b,p,u){var y=b.xaxis,m=b.yaxis;d.makeTraceGroups(u,p,"contour").each(function(R){var L=V.select(this),z=R[0],F=z.trace,N=z.x,O=z.y,P=F.contours,U=n(P,b,z),B=d.ensureSingle(L,"g","heatmapcoloring"),X=[];P.coloring==="heatmap"&&(X=[R]),r(g,b,X,B),o(U),a(U);var $=y.c2p(N[0],!0),le=y.c2p(N[N.length-1],!0),ce=m.c2p(O[0],!0),de=m.c2p(O[O.length-1],!0),G=[[$,de],[le,de],[le,ce],[$,ce]],Y=U;P.type==="constraint"&&(Y=i(U,P._operation)),v(L,G,P),c(L,Y,G,P),l(L,U,g,z,P),w(L,b,g,z,G)})};function v(M,g,b){var p=d.ensureSingle(M,"g","contourbg"),u=p.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+g.join("L")+"Z").style("stroke","none")}function c(M,g,b,p){var u=p.coloring==="fill"||p.type==="constraint"&&p._operation!=="=",y="M"+b.join("L")+"Z";u&&s(g,p);var m=d.ensureSingle(M,"g","contourfill"),R=m.selectAll("path").data(u?g:[]);R.enter().append("path"),R.exit().remove(),R.each(function(L){var z=(L.prefixBoundary?y:"")+T(L,b);z?V.select(this).attr("d",z).style("stroke","none"):V.select(this).remove()})}function T(M,g){var b="",p=0,u=M.edgepaths.map(function($,le){return le}),y=!0,m,R,L,z,F,N;function O($){return Math.abs($[1]-g[0][1])<.01}function P($){return Math.abs($[1]-g[2][1])<.01}function U($){return Math.abs($[0]-g[0][0])<.01}function B($){return Math.abs($[0]-g[2][0])<.01}for(;u.length;){for(N=x.smoothopen(M.edgepaths[p],M.smoothing),b+=y?N:N.replace(/^M/,"L"),u.splice(u.indexOf(p),1),m=M.edgepaths[p][M.edgepaths[p].length-1],z=-1,L=0;L<4;L++){if(!m){d.log("Missing end?",p,M);break}for(O(m)&&!B(m)?R=g[1]:U(m)?R=g[0]:P(m)?R=g[3]:B(m)&&(R=g[2]),F=0;F<M.edgepaths.length;F++){var X=M.edgepaths[F][0];Math.abs(m[0]-R[0])<.01?Math.abs(m[0]-X[0])<.01&&(X[1]-m[1])*(R[1]-X[1])>=0&&(R=X,z=F):Math.abs(m[1]-R[1])<.01?Math.abs(m[1]-X[1])<.01&&(X[0]-m[0])*(R[0]-X[0])>=0&&(R=X,z=F):d.log("endpt to newendpt is not vert. or horz.",m,R,X)}if(m=R,z>=0)break;b+="L"+R}if(z===M.edgepaths.length){d.log("unclosed perimeter path");break}p=z,y=u.indexOf(p)===-1,y&&(p=u[0],b+="Z")}for(p=0;p<M.paths.length;p++)b+=x.smoothclosed(M.paths[p],M.smoothing);return b}function l(M,g,b,p,u){var y=b._context.staticPlot,m=d.ensureSingle(M,"g","contourlines"),R=u.showlines!==!1,L=u.showlabels,z=R&&L,F=Z.createLines(m,R||L,g,y),N=Z.createLineClip(m,z,b,p.trace.uid),O=M.selectAll("g.contourlabels").data(L?[0]:[]);if(O.exit().remove(),O.enter().append("g").classed("contourlabels",!0),L){var P=[],U=[];d.clearLocationCache();var B=Z.labelFormatter(b,p),X=x.tester.append("text").attr("data-notex",1).call(x.font,u.labelfont),$=g[0].xaxis,le=g[0].yaxis,ce=$._length,de=le._length,G=$.range,Y=le.range,ee=d.aggNums(Math.min,null,p.x),q=d.aggNums(Math.max,null,p.x),se=d.aggNums(Math.min,null,p.y),ae=d.aggNums(Math.max,null,p.y),j=Math.max($.c2p(ee,!0),0),Q=Math.min($.c2p(q,!0),ce),re=Math.max(le.c2p(ae,!0),0),pe=Math.min(le.c2p(se,!0),de),we={};G[0]<G[1]?(we.left=j,we.right=Q):(we.left=Q,we.right=j),Y[0]<Y[1]?(we.top=re,we.bottom=pe):(we.top=pe,we.bottom=re),we.middle=(we.top+we.bottom)/2,we.center=(we.left+we.right)/2,P.push([[we.left,we.top],[we.right,we.top],[we.right,we.bottom],[we.left,we.bottom]]);var Se=Math.sqrt(ce*ce+de*de),Ie=h.LABELDISTANCE*Se/Math.max(1,g.length/h.LABELINCREASE);F.each(function(Re){var We=Z.calcTextOpts(Re.level,B,X,b);V.select(this).selectAll("path").each(function(){var at=this,nt=d.getVisibleSegment(at,we,We.height/2);if(nt&&!(nt.len<(We.width+We.height)*h.LABELMIN))for(var tt=Math.min(Math.ceil(nt.len/Ie),h.LABELMAX),qe=0;qe<tt;qe++){var he=Z.findBestTextLocation(at,nt,We,U,we);if(!he)break;Z.addLabelData(he,We,U,P)}})}),X.remove(),Z.drawLabels(O,U,b,N,z?P:null)}L&&!R&&F.remove()}Z.createLines=function(M,g,b,p){var u=b[0].smoothing,y=M.selectAll("g.contourlevel").data(g?b:[]);if(y.exit().remove(),y.enter().append("g").classed("contourlevel",!0),g){var m=y.selectAll("path.openline").data(function(L){return L.pedgepaths||L.edgepaths});m.exit().remove(),m.enter().append("path").classed("openline",!0),m.attr("d",function(L){return x.smoothopen(L,u)}).style("stroke-miterlimit",1).style("vector-effect",p?"none":"non-scaling-stroke");var R=y.selectAll("path.closedline").data(function(L){return L.ppaths||L.paths});R.exit().remove(),R.enter().append("path").classed("closedline",!0),R.attr("d",function(L){return x.smoothclosed(L,u)}).style("stroke-miterlimit",1).style("vector-effect",p?"none":"non-scaling-stroke")}return y},Z.createLineClip=function(M,g,b,p){var u=b._fullLayout._clips,y=g?"clipline"+p:null,m=u.selectAll("#"+y).data(g?[0]:[]);return m.exit().remove(),m.enter().append("clipPath").classed("contourlineclip",!0).attr("id",y),x.setClipUrl(M,y,b),m},Z.labelFormatter=function(M,g){var b=M._fullLayout,p=g.trace,u=p.contours,y={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(u.labelformat)y.tickformat=u.labelformat,t(y,b);else{var m=S.extractOpts(p);if(m&&m.colorbar&&m.colorbar._axis)y=m.colorbar._axis;else{if(u.type==="constraint"){var R=u.value;d.isArrayOrTypedArray(R)?y.range=[R[0],R[R.length-1]]:y.range=[R,R]}else y.range=[u.start,u.end],y.nticks=(u.end-u.start)/u.size;y.range[0]===y.range[1]&&(y.range[1]+=y.range[0]||1),y.nticks||(y.nticks=1e3),t(y,b),e.prepTicks(y),y._tmin=null,y._tmax=null}}return function(L){return e.tickText(y,L).text}},Z.calcTextOpts=function(M,g,b,p){var u=g(M);b.text(u).call(E.convertToTspans,p);var y=b.node(),m=x.bBox(y,!0);return{text:u,width:m.width,height:m.height,fontSize:+y.style["font-size"].replace("px",""),level:M,dy:(m.top+m.bottom)/2}},Z.findBestTextLocation=function(M,g,b,p,u){var y=b.width,m,R,L,z,F;g.isClosed?(R=g.len/f.INITIALSEARCHPOINTS,m=g.min+R/2,L=g.max):(R=(g.len-y)/(f.INITIALSEARCHPOINTS+1),m=g.min+R+y/2,L=g.max-(R+y)/2);for(var N=1/0,O=0;O<f.ITERATIONS;O++){for(var P=m;P<L;P+=R){var U=d.getTextLocation(M,g.total,P,y),B=_(U,b,p,u);B<N&&(N=B,F=U,z=P)}if(N>f.MAXCOST*2)break;O&&(R/=2),m=z-R/2,L=m+R*1.5}if(N<=f.MAXCOST)return F};function _(M,g,b,p){var u=g.width/2,y=g.height/2,m=M.x,R=M.y,L=M.theta,z=Math.cos(L)*u,F=Math.sin(L)*u,N=(m>p.center?p.right-m:m-p.left)/(z+Math.abs(Math.sin(L)*y)),O=(R>p.middle?p.bottom-R:R-p.top)/(Math.abs(F)+Math.cos(L)*y);if(N<1||O<1)return 1/0;var P=f.EDGECOST*(1/(N-1)+1/(O-1));P+=f.ANGLECOST*L*L;for(var U=m-z,B=R-F,X=m+z,$=R+F,le=0;le<b.length;le++){var ce=b[le],de=Math.cos(ce.theta)*ce.width/2,G=Math.sin(ce.theta)*ce.width/2,Y=d.segmentDistance(U,B,X,$,ce.x-de,ce.y-G,ce.x+de,ce.y+G)*2/(g.height+ce.height),ee=ce.level===g.level,q=ee?f.SAMELEVELDISTANCE:1;if(Y<=q)return 1/0;var se=f.NEIGHBORCOST*(ee?f.SAMELEVELFACTOR:1);P+=se/(Y-q)}return P}Z.addLabelData=function(M,g,b,p){var u=g.fontSize,y=g.width+u/3,m=Math.max(0,g.height-u/3),R=M.x,L=M.y,z=M.theta,F=Math.sin(z),N=Math.cos(z),O=function(U,B){return[R+U*N-B*F,L+U*F+B*N]},P=[O(-y/2,-m/2),O(-y/2,m/2),O(y/2,m/2),O(y/2,-m/2)];b.push({text:g.text,x:R,y:L,dy:g.dy,theta:z,level:g.level,width:y,height:m}),p.push(P)},Z.drawLabels=function(M,g,b,p,u){var y=M.selectAll("text").data(g,function(z){return z.text+","+z.x+","+z.y+","+z.theta});if(y.exit().remove(),y.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(z){var F=z.x+Math.sin(z.theta)*z.dy,N=z.y-Math.cos(z.theta)*z.dy;V.select(this).text(z.text).attr({x:F,y:N,transform:"rotate("+180*z.theta/Math.PI+" "+F+" "+N+")"}).call(E.convertToTspans,b)}),u){for(var m="",R=0;R<u.length;R++)m+="M"+u[R].join("L")+"Z";var L=d.ensureSingle(p,"path","");L.attr("d",m)}};function w(M,g,b,p,u){var y=p.trace,m=b._fullLayout._clips,R="clip"+y.uid,L=m.selectAll("#"+R).data(y.connectgaps?[]:[0]);if(L.enter().append("clipPath").classed("contourclip",!0).attr("id",R),L.exit().remove(),y.connectgaps===!1){var z={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:g.xaxis,yaxis:g.yaxis,x:p.x,y:p.y,z:A(p),smoothing:0};o([z]),a([z]),s([z],{type:"levels"});var F=d.ensureSingle(L,"path","");F.attr("d",(z.prefixBoundary?"M"+u.join("L")+"Z":"")+T(z,u))}else R=null;x.setClipUrl(M,R,b)}function A(M){var g=M.trace._emptypoints,b=[],p=M.z.length,u=M.z[0].length,y,m=[],R;for(y=0;y<u;y++)m.push(1);for(y=0;y<p;y++)b.push(m.slice());for(y=0;y<g.length;y++)R=g[y],b[R[0]][R[1]]=0;return M.zmask=b,b}}}),bS=He({"src/traces/contour/make_color_map.js"(Z,V){"use strict";var d=Wn(),x=rc(),S=G_();V.exports=function(e){var t=e.contours,r=t.start,o=S(t),a=t.size||1,n=Math.floor((o-r)/a)+1,i=t.coloring==="lines"?0:1,s=x.extractOpts(e);isFinite(a)||(a=1,n=1);var h=s.reversescale?x.flipScale(s.colorscale):s.colorscale,f=h.length,v=new Array(f),c=new Array(f),T,l,_=s.min,w=s.max;if(t.coloring==="heatmap"){for(l=0;l<f;l++)T=h[l],v[l]=T[0]*(w-_)+_,c[l]=T[1];var A=d.extent([_,w,t.start,t.start+a*(n-1)]),M=A[_<w?0:1],g=A[_<w?1:0];M!==_&&(v.splice(0,0,M),c.splice(0,0,c[0])),g!==w&&(v.push(g),c.push(c[c.length-1]))}else{var b=e._input&&typeof e._input.zmin=="number"&&typeof e._input.zmax=="number";for(b&&(r<=_||o>=w)&&(r<=_&&(r=_),o>=w&&(o=w),n=Math.floor((o-r)/a)+1,i=0),l=0;l<f;l++)T=h[l],v[l]=(T[0]*(n+i-1)-i/2)*a+r,c[l]=T[1];(b||e.autocontour)&&(v[0]>_&&(v.unshift(_),c.unshift(c[0])),v[v.length-1]<w&&(v.push(w),c.push(c[c.length-1])))}return x.makeColorScaleFunc({domain:v,range:c},{noNumericCheck:!0})}}}),c3=He({"src/traces/contour/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=t3(),E=bS();V.exports=function(t){var r=d.select(t).selectAll("g.contour");r.style("opacity",function(o){return o[0].trace.opacity}),r.each(function(o){var a=d.select(this),n=o[0].trace,i=n.contours,s=n.line,h=i.size||1,f=i.start,v=i.type==="constraint",c=!v&&i.coloring==="lines",T=!v&&i.coloring==="fill",l=c||T?E(n):null;a.selectAll("g.contourlevel").each(function(A){d.select(this).selectAll("path").call(x.lineGroupStyle,s.width,c?l(A.level):s.color,s.dash)});var _=i.labelfont;if(a.selectAll("g.contourlabels text").each(function(A){x.font(d.select(this),{weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow,family:_.family,size:_.size,color:_.color||(c?l(A.level):s.color)})}),v)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(T){var w;a.selectAll("g.contourfill path").style("fill",function(A){return w===void 0&&(w=A.level),l(A.level+.5*h)}),w===void 0&&(w=f),a.selectAll("g.contourbg path").style("fill",l(w-.5*h))}}),S(t)}}}),f3=He({"src/traces/contour/colorbar.js"(Z,V){"use strict";var d=rc(),x=bS(),S=G_();function E(e,t,r){var o=t.contours,a=t.line,n=o.size||1,i=o.coloring,s=x(t,{isColorbar:!0});if(i==="heatmap"){var h=d.extractOpts(t);r._fillgradient=h.reversescale?d.flipScale(h.colorscale):h.colorscale,r._zrange=[h.min,h.max]}else i==="fill"&&(r._fillcolor=s);r._line={color:i==="lines"?s:a.color,width:o.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:o.start,end:S(o),size:n}}V.exports={min:"zmin",max:"zmax",calc:E}}}),wS=He({"src/traces/contour/hover.js"(Z,V){"use strict";var d=Jn(),x=r3();V.exports=function(E,e,t,r,o){o||(o={}),o.isContour=!0;var a=x(E,e,t,r,o);return a&&a.forEach(function(n){var i=n.trace;i.contours.type==="constraint"&&(i.fillcolor&&d.opacity(i.fillcolor)?n.color=d.addOpacity(i.fillcolor,1):i.contours.showlines&&d.opacity(i.line.color)&&(n.color=d.addOpacity(i.line.color,1)))}),a}}}),mF=He({"src/traces/histogram2dcontour/index.js"(Z,V){"use strict";V.exports={attributes:hS(),supplyDefaults:dF(),crossTraceDefaults:i3(),calc:vS(),plot:u3().plot,layerName:"contourlayer",style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}}),gF=He({"lib/histogram2dcontour.js"(Z,V){"use strict";V.exports=mF()}}),TS=He({"src/traces/contour/constraint_defaults.js"(Z,V){"use strict";var d=as(),x=pS(),S=Jn(),E=S.addOpacity,e=S.opacity,t=o3(),r=sa().isArrayOrTypedArray,o=t.CONSTRAINT_REDUCTION,a=t.COMPARISON_OPS2;V.exports=function(s,h,f,v,c,T){var l=h.contours,_,w,A,M=f("contours.operation");if(l._operation=o[M],n(f,l),M==="="?_=l.showlines=!0:(_=f("contours.showlines"),A=f("fillcolor",E((s.line||{}).color||c,.5))),_){var g=A&&e(A)?E(h.fillcolor,1):c;w=f("line.color",g),f("line.width",2),f("line.dash")}f("line.smoothing"),x(f,v,w,T)};function n(i,s){var h;a.indexOf(s.operation)===-1?(i("contours.value",[0,1]),r(s.value)?s.value.length>2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(h=parseFloat(s.value[0]),s.value=[h,h+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:d(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(i("contours.value",0),d(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),yF=He({"src/traces/contour/defaults.js"(Z,V){"use strict";var d=sa(),x=X2(),S=Qd(),E=TS(),e=s3(),t=l3(),r=q_(),o=V_();V.exports=function(n,i,s,h){function f(l,_){return d.coerce(n,i,o,l,_)}function v(l){return d.coerce2(n,i,o,l)}var c=x(n,i,f,h);if(!c){i.visible=!1;return}S(n,i,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",d.isArray1D(i.z)),T?E(n,i,f,h,s):(e(n,i,f,v),t(n,i,f,h)),i.contours&&i.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),_F=He({"src/traces/contour/index.js"(Z,V){"use strict";V.exports={attributes:V_(),supplyDefaults:yF(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),xF=He({"lib/contour.js"(Z,V){"use strict";V.exports=_F()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=af(),t=ru(),r=ku(),o=Gh().dash,a=Qo().extendFlat,n=e.marker,i=e.line,s=n.line;V.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:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:i.color,width:i.width,dash:o,backoff:i.backoff,shape:a({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:E(),marker:a({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:e.textfont,textposition:e.textposition,selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:e.hoveron,hovertemplate:d(),hovertemplatefallback:S()}}}),bF=He({"src/traces/scatterternary/defaults.js"(Z,V){"use strict";var d=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();V.exports=function(i,s,h,f){function v(M,g){return d.coerce(i,s,a,M,g)}var c=v("a"),T=v("b"),l=v("c"),_;if(c?(_=c.length,T?(_=Math.min(_,T.length),l&&(_=Math.min(_,l.length))):l?_=Math.min(_,l.length):_=0):T&&l&&(_=Math.min(T.length,l.length)),!_){s.visible=!1;return}s._length=_,v("sum"),v("text"),v("hovertext"),s.hoveron!=="fills"&&(v("hovertemplate"),v("hovertemplatefallback"));var w=_<x.PTS_LINESONLY?"lines+markers":"lines";v("mode",w),S.hasMarkers(s)&&E(i,s,h,f,v,{gradient:!0}),S.hasLines(s)&&(e(i,s,h,f,v,{backoff:!0}),t(i,s,v),v("connectgaps")),S.hasText(s)&&(v("texttemplate"),v("texttemplatefallback"),r(i,s,f,v));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(v("cliponaxis"),v("marker.maxdisplayed"),A.push("points")),v("fill"),s.fill!=="none"&&(o(i,s,h,v),S.hasLines(s)||t(i,s,v)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),v("hoveron",A.join("+")||"points"),d.coerceSelectionMarkerOpacity(s,v)}}}),wF=He({"src/traces/scatterternary/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.aLabel=d.tickText(r.aaxis,S.a,!0).text,t.bLabel=d.tickText(r.baxis,S.b,!0).text,t.cLabel=d.tickText(r.caxis,S.c,!0).text,t}}}),TF=He({"src/traces/scatterternary/calc.js"(Z,V){"use strict";var d=as(),x=Fd(),S=Av(),E=Od(),e=Bd().calcMarkerSize,t=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};V.exports=function(a,n){var i=a._fullLayout[n.subplot],s=i.sum,h=n.sum||s,f={a:n.a,b:n.b,c:n.c},v=n.ids,c,T,l,_,w,A;for(c=0;c<t.length;c++)if(l=t[c],!f[l]){for(w=f[r[l][0]],A=f[r[l][1]],_=new Array(w.length),T=0;T<w.length;T++)_[T]=h-w[T]-A[T];f[l]=_}var M=n._length,g=new Array(M),b,p,u,y,m,R;for(c=0;c<M;c++)b=f.a[c],p=f.b[c],u=f.c[c],d(b)&&d(p)&&d(u)?(b=+b,p=+p,u=+u,y=s/(b+p+u),y!==1&&(b*=y,p*=y,u*=y),R=b,m=u-p,g[c]={x:m,y:R,a:b,b:p,c:u},v&&(g[c].id=v[c])):g[c]={x:!1,y:!1};return e(n,M),x(a,n),S(g,n),E(g,n),g}}}),AF=He({"src/traces/scatterternary/plot.js"(Z,V){"use strict";var d=s1();V.exports=function(S,E,e){var t=E.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var r=E.xaxis,o=E.yaxis,a={xaxis:r,yaxis:o,plot:t,layerClipId:E._hasClipOnAxisFalse?E.clipIdRelative:null},n=E.layers.frontplot.select("g.scatterlayer"),i=0;i<e.length;i++){var s=e[i];s.length&&(s[0].trace._xA=r,s[0].trace._yA=o)}d(S,a,e,n)}}}),SF=He({"src/traces/scatterternary/hover.js"(Z,V){"use strict";var d=u1();V.exports=function(S,E,e,t){var r=d(S,E,e,t);if(!r||r[0].index===!1)return;var o=r[0];if(o.index===void 0){var a=1-o.y0/S.ya._length,n=S.xa._length,i=n*a/2,s=n-i;return o.x0=Math.max(Math.min(o.x0,s),i),o.x1=Math.max(Math.min(o.x1,s),i),r}var h=o.cd[o.index],f=o.trace,v=o.subplot;o.a=h.a,o.b=h.b,o.c=h.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var c={};c[f.subplot]={_subplot:v};var T=f._module.formatLabels(h,f,c);o.aLabel=T.aLabel,o.bLabel=T.bLabel,o.cLabel=T.cLabel;var l=h.hi||f.hoverinfo,_=[];function w(M,g){_.push(M._hovertitle+": "+g)}if(!f.hovertemplate){var A=l.split("+");A.indexOf("all")!==-1&&(A=["a","b","c"]),A.indexOf("a")!==-1&&w(v.aaxis,o.aLabel),A.indexOf("b")!==-1&&w(v.baxis,o.bLabel),A.indexOf("c")!==-1&&w(v.caxis,o.cLabel)}return o.extraText=_.join("<br>"),o.hovertemplate=f.hovertemplate,r}}}),MF=He({"src/traces/scatterternary/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){if(S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),e[t]){var r=e[t];x.a=r.a,x.b=r.b,x.c=r.c}else x.a=S.a,x.b=S.b,x.c=S.c;return x}}}),EF=He({"src/plots/ternary/ternary.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=lo(),E=sa(),e=E.strTranslate,t=E._,r=Jn(),o=es(),a=wv(),n=Qo().extendFlat,i=bc(),s=Ho(),h=Ap(),f=rf(),v=Jd(),c=v.freeMode,T=v.rectMode,l=K0(),_=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,M=Af().clearSelectionsCache,g=lh();function b(P,U){this.id=P.id,this.graphDiv=P.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=b;var p=b.prototype;p.init=function(P){this.container=P._ternarylayer,this.defs=P._defs,this.layoutId=P._uid,this.traceHash={},this.layers={}},p.plot=function(P,U){var B=this,X=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var le=0;le<P.length;le++){var ce=P[le][0].trace;if(ce.cliponaxis===!1){B._hasClipOnAxisFalse=!0;break}}B.updateLayers(X),B.adjustLayout(X,$),i.generalUpdatePerTraceModule(B.graphDiv,B,P,X),B.layers.plotbg.select("path").call(r.fill,X.bgcolor)},p.makeFramework=function(P){var U=this,B=U.graphDiv,X=P[U.id],$=U.clipId="clip"+U.layoutId+U.id,le=U.clipIdRelative="clip-relative"+U.layoutId+U.id;U.clipDef=E.ensureSingleById(P._clips,"clipPath",$,function(ce){ce.append("path").attr("d","M0,0Z")}),U.clipDefRelative=E.ensureSingleById(P._clips,"clipPath",le,function(ce){ce.append("path").attr("d","M0,0Z")}),U.plotContainer=E.ensureSingle(U.container,"g",U.id),U.updateLayers(X),o.setClipUrl(U.layers.backplot,$,B),o.setClipUrl(U.layers.grids,$,B)},p.updateFx=function(P){P._ternarylayer.selectAll("g.toplevel").style("cursor",P.dragmode==="pan"?"move":"crosshair")},p.updateLayers=function(P){var U=this,B=U.layers,X=["draglayer","plotbg","backplot","grids"];P.aaxis.layer==="below traces"&&X.push("aaxis","aline"),P.baxis.layer==="below traces"&&X.push("baxis","bline"),P.caxis.layer==="below traces"&&X.push("caxis","cline"),X.push("frontplot"),P.aaxis.layer==="above traces"&&X.push("aaxis","aline"),P.baxis.layer==="above traces"&&X.push("baxis","bline"),P.caxis.layer==="above traces"&&X.push("caxis","cline");var $=U.plotContainer.selectAll("g.toplevel").data(X,String),le=["agrid","bgrid","cgrid"];$.enter().append("g").attr("class",function(ce){return"toplevel "+ce}).each(function(ce){var de=d.select(this);B[ce]=de,ce==="frontplot"?de.append("g").classed("scatterlayer",!0):ce==="backplot"?de.append("g").classed("maplayer",!0):ce==="plotbg"?de.append("path").attr("d","M0,0Z"):ce==="aline"||ce==="bline"||ce==="cline"?de.append("path"):ce==="grids"&&le.forEach(function(G){B[G]=de.append("g").classed("grid "+G,!0)})}),$.order()};var u=Math.sqrt(4/3);p.adjustLayout=function(P,U){var B=this,X=P.domain,$=(X.x[0]+X.x[1])/2,le=(X.y[0]+X.y[1])/2,ce=X.x[1]-X.x[0],de=X.y[1]-X.y[0],G=ce*U.w,Y=de*U.h,ee=P.sum,q=P.aaxis.min,se=P.baxis.min,ae=P.caxis.min,j,Q,re,pe,we,Se;G>u*Y?(pe=Y,re=pe*u):(re=G,pe=re/u),we=ce*re/G,Se=de*pe/Y,j=U.l+U.w*$-re/2,Q=U.t+U.h*(1-le)-pe/2,B.x0=j,B.y0=Q,B.w=re,B.h=pe,B.sum=ee,B.xaxis={type:"linear",range:[q+2*ae-ee,ee-q-2*se],domain:[$-we/2,$+we/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Ce){return Ce.a>=B.aaxis.range[0]&&Ce.a<=B.aaxis.range[1]&&Ce.b>=B.baxis.range[1]&&Ce.b<=B.baxis.range[0]&&Ce.c>=B.caxis.range[1]&&Ce.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[q,ee-se-ae],domain:[le-Se/2,le+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Ie=B.yaxis.domain[0],Re=B.aaxis=n({},P.aaxis,{range:[q,ee-se-ae],side:"left",tickangle:(+P.aaxis.tickangle||0)-30,domain:[Ie,Ie+Se*u],anchor:"free",position:0,_id:"y",_length:re});a(Re,B.graphDiv._fullLayout),Re.setScale();var We=B.baxis=n({},P.baxis,{range:[ee-q-ae,se],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:re});a(We,B.graphDiv._fullLayout),We.setScale();var at=B.caxis=n({},P.caxis,{range:[ee-q-se,ae],side:"right",tickangle:(+P.caxis.tickangle||0)+30,domain:[Ie,Ie+Se*u],anchor:"free",position:0,_id:"y",_length:re});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(Q+pe)+"h"+re+"l-"+re/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+re+"l-"+re/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var qe=e(j,Q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",qe),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-We._offset,Q+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var ue=e(j+re/2,Q)+"rotate(30)"+e(0,-Re._offset);B.layers.aaxis.attr("transform",ue),B.layers.agrid.attr("transform",ue);var ne=e(j+re/2,Q)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",ne),B.layers.cgrid.attr("transform",ne),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Re.showline?"M"+j+","+(Q+pe)+"l"+re/2+",-"+pe:"M0,0").call(r.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",We.showline?"M"+j+","+(Q+pe)+"h"+re:"M0,0").call(r.stroke,We.linecolor||"#000").style("stroke-width",(We.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+re/2)+","+Q+"l"+re/2+","+pe:"M0,0").call(r.stroke,at.linecolor||"#000").style("stroke-width",(at.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),o.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},p.drawAxes=function(P){var U=this,B=U.graphDiv,X=U.id.slice(7)+"title",$=U.layers,le=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(le),U.drawAx(ce),U.drawAx(de),P){var G=Math.max(le.showticklabels?le.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),Y=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+X,{propContainer:le,propName:U.id+".aaxis.title.text",placeholder:t(B,"Click to enter Component A title"),attributes:{x:U.x0+U.w/2,y:U.y0-le.title.font.size/3-G,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+X,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-Y,y:U.y0+U.h+ce.title.font.size*.83+Y,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+X,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+Y,y:U.y0+U.h+de.title.font.size*.83+Y,"text-anchor":"middle"}})}},p.drawAx=function(P){var U=this,B=U.graphDiv,X=P._name,$=X.charAt(0),le=P._id,ce=U.layers[X],de=30,G=$+"tickLayout",Y=y(P);U[G]!==Y&&(ce.selectAll("."+le+"tick").remove(),U[G]=Y),P.setScale();var ee=s.calcTicks(P),q=s.clipEnds(P,ee),se=s.makeTransTickFn(P),ae=s.getTickSigns(P)[2],j=E.deg2rad(de),Q=ae*(P.linewidth||1)/2,re=ae*P.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+Q+"l"+Math.sin(j)*re+","+Math.cos(j)*re:"M"+Q+",0l"+Math.cos(j)*re+","+-Math.sin(j)*re,Ie={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,P,{vals:P.ticks==="inside"?q:ee,layer:ce,path:Se,transFn:se,crisp:!1}),s.drawGrid(B,P,{vals:q,layer:U.layers[$+"grid"],path:Ie,transFn:se,crisp:!1}),s.drawLabels(B,P,{vals:ee,layer:ce,transFn:se,labelFns:s.makeLabelFns(P,0,de)})};function y(P){return P.ticks+String(P.ticklen)+String(P.showticklabels)}var m=g.MINZOOM/2+.87,R="m-0.87,.5h"+m+"v3h-"+(m+5.2)+"l"+(m/2+2.6)+",-"+(m*.87+4.5)+"l2.6,1.5l-"+m/2+","+m*.87+"Z",L="m0.87,.5h-"+m+"v3h"+(m+5.2)+"l-"+(m/2+2.6)+",-"+(m*.87+4.5)+"l-2.6,1.5l"+m/2+","+m*.87+"Z",z="m0,1l"+m/2+","+m*.87+"l2.6,-1.5l-"+(m/2+2.6)+",-"+(m*.87+4.5)+"l-"+(m/2+2.6)+","+(m*.87+4.5)+"l2.6,1.5l"+m/2+",-"+m*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;p.clearOutline=function(){M(this.dragOptions),A(this.dragOptions.gd)},p.initInteractions=function(){var P=this,U=P.layers.plotbg.select("path").node(),B=P.graphDiv,X=B._fullLayout._zoomlayer,$,le;this.dragOptions={element:U,gd:B,plotinfo:{id:P.id,domain:B._fullLayout[P.id].domain,xaxis:P.xaxis,yaxis:P.yaxis},subplot:P.id,prepFn:function(he,ue,ne){P.dragOptions.xaxes=[P.xaxis],P.dragOptions.yaxes=[P.yaxis],$=B._fullLayout._invScaleX,le=B._fullLayout._invScaleY;var Ce=P.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?P.dragOptions.minDrag=1:P.dragOptions.minDrag=void 0,Ce==="zoom"?(P.dragOptions.moveFn=We,P.dragOptions.clickFn=pe,P.dragOptions.doneFn=at,we(he,ue,ne)):Ce==="pan"?(P.dragOptions.moveFn=tt,P.dragOptions.clickFn=pe,P.dragOptions.doneFn=qe,nt(),P.clearOutline(B)):(T(Ce)||c(Ce))&&_(he,ue,ne,P.dragOptions,Ce)}};var ce,de,G,Y,ee,q,se,ae,j,Q;function re(he){var ue={};return ue[P.id+".aaxis.min"]=he.a,ue[P.id+".baxis.min"]=he.b,ue[P.id+".caxis.min"]=he.c,ue}function pe(he,ue){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,re({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(ue,B,[P.xaxis],[P.yaxis],P.id,P.dragOptions),ne.indexOf("event")>-1&&f.click(B,ue,P.id)}function we(he,ue,ne){var Ce=U.getBoundingClientRect();ce=ue-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ye=B._fullLayout._invTransform,rt=E.apply3DTransform(Ye)(ce,de);ce=rt[0],de=rt[1],G={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=G,Y=P.aaxis.range[1]-G.a,q=x(P.graphDiv._fullLayout[P.id].bgcolor).getLuminance(),se="M0,"+P.h+"L"+P.w/2+", 0L"+P.w+","+P.h+"Z",ae=!1,j=X.append("path").attr("class","zoombox").attr("transform",e(P.x0,P.y0)).style({fill:q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",se),Q=X.append("path").attr("class","zoombox-corners").attr("transform",e(P.x0,P.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),P.clearOutline(B)}function Se(he,ue){return 1-ue/P.h}function Ie(he,ue){return 1-(he+(P.h-ue)/Math.sqrt(3))/P.w}function Re(he,ue){return(he-(P.h-ue)/Math.sqrt(3))/P.w}function We(he,ue){var ne=ce+he*$,Ce=de+ue*le,Ye=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Ie(ce,de),Ie(ne,Ce))),Ke=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Mt=(Ye/2+Ke)*P.w,kt=(1-Ye/2-rt)*P.w,Nt=(Mt+kt)/2,Gt=kt-Mt,Mr=(1-Ye)*P.h,mr=Mr-Gt/u;Gt<g.MINZOOM?(ee=G,j.attr("d",se),Q.attr("d","M0,0Z")):(ee={a:G.a+Ye*Y,b:G.b+rt*Y,c:G.c+Ke*Y},j.attr("d",se+"M"+Mt+","+Mr+"H"+kt+"L"+Nt+","+mr+"L"+Mt+","+Mr+"Z"),Q.attr("d","M"+ce+","+de+F+"M"+Mt+","+Mr+R+"M"+kt+","+Mr+L+"M"+Nt+","+mr+z)),ae||(j.transition().style("fill",q>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Q.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",re(ee))}function at(){O(B),ee!==G&&(S.call("_guiRelayout",B,re(ee)),N&&B.data&&B._context.showTips&&(E.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){G={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=G}function tt(he,ue){var ne=he/P.xaxis._m,Ce=ue/P.yaxis._m;ee={a:G.a-Ce,b:G.b+(ne+Ce)/2,c:G.c-(ne-Ce)/2};var Ye=[ee.a,ee.b,ee.c].sort(E.sorterAsc),rt={a:Ye.indexOf(ee.a),b:Ye.indexOf(ee.b),c:Ye.indexOf(ee.c)};Ye[0]<0&&(Ye[1]+Ye[0]/2<0?(Ye[2]+=Ye[0]+Ye[1],Ye[0]=Ye[1]=0):(Ye[2]+=Ye[0]/2,Ye[1]+=Ye[0]/2,Ye[0]=0),ee={a:Ye[rt.a],b:Ye[rt.b],c:Ye[rt.c]},ue=(G.a-ee.a)*P.yaxis._m,he=(G.c-ee.c-G.b+ee.b)*P.xaxis._m);var Ke=e(P.x0+he,P.y0+ue);P.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ke);var Mt=e(-he,-ue);P.clipDefRelative.select("path").attr("transform",Mt),P.aaxis.range=[ee.a,P.sum-ee.b-ee.c],P.baxis.range=[P.sum-ee.a-ee.c,ee.b],P.caxis.range=[P.sum-ee.a-ee.b,ee.c],P.drawAxes(!1),P._hasClipOnAxisFalse&&P.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,P),B.emit("plotly_relayouting",re(ee))}function qe(){S.call("_guiRelayout",B,re(ee))}U.onmousemove=function(he){f.hover(B,he,P.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=P.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(P){d.select(P).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=wc().attributes,S=Wh(),E=pc().overrideAll,e=Qo().extendFlat,t={title:{text:S.title.text,font:S.title.font},color:S.color,tickmode:S.minor.tickmode,nticks:e({},S.nticks,{dflt:6,min:1}),tick0:S.tick0,dtick:S.dtick,tickvals:S.tickvals,ticktext:S.ticktext,ticks:S.ticks,ticklen:S.ticklen,tickwidth:S.tickwidth,tickcolor:S.tickcolor,ticklabelstep:S.ticklabelstep,showticklabels:S.showticklabels,labelalias:S.labelalias,showtickprefix:S.showtickprefix,tickprefix:S.tickprefix,showticksuffix:S.showticksuffix,ticksuffix:S.ticksuffix,showexponent:S.showexponent,exponentformat:S.exponentformat,minexponent:S.minexponent,separatethousands:S.separatethousands,tickfont:S.tickfont,tickangle:S.tickangle,tickformat:S.tickformat,tickformatstops:S.tickformatstops,hoverformat:S.hoverformat,showline:e({},S.showline,{dflt:!0}),linecolor:S.linecolor,linewidth:S.linewidth,showgrid:e({},S.showgrid,{dflt:!0}),gridcolor:S.gridcolor,gridwidth:S.gridwidth,griddash:S.griddash,layer:S.layer,min:{valType:"number",dflt:0,min:0}},r=V.exports=E({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:d.background},sum:{valType:"number",dflt:1,min:0},aaxis:t,baxis:t,caxis:t},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}}),o0=He({"src/plots/subplot_defaults.js"(Z,V){"use strict";var d=sa(),x=zl(),S=wc().defaults;V.exports=function(e,t,r,o){var a=o.type,n=o.attributes,i=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,v=f&&h[0].replace(/\d+$/,""),c,T;function l(M,g){return d.coerce(c,T,n,M,g)}for(var _=0;_<f;_++){var w=h[_];e[w]?c=e[w]:c=e[w]={},T=x.newContainer(t,w,v),o.noUirevision||l("uirevision",t.uirevision);var A={};A[s]=[_/f,(_+1)/f],S(T,t,l,A),o.id=w,i(c,T,l,o)}}}}),kF=He({"src/plots/ternary/layout_defaults.js"(Z,V){"use strict";var d=Jn(),x=zl(),S=sa(),E=o0(),e=Qm(),t=e0(),r=t1(),o=Y0(),a=z_(),n=SS(),i=["aaxis","baxis","caxis"];V.exports=function(v,c,T){E(v,c,T,{type:"ternary",attributes:n,handleDefaults:s,font:c.font,paper_bgcolor:c.paper_bgcolor})};function s(f,v,c,T){var l=c("bgcolor"),_=c("sum");T.bgColor=d.combine(l,T.paper_bgcolor);for(var w,A,M,g=0;g<i.length;g++)w=i[g],A=f[w]||{},M=x.newContainer(v,w),M._name=w,h(A,M,T,v);var b=v.aaxis,p=v.baxis,u=v.caxis;b.min+p.min+u.min>=_&&(b.min=0,p.min=0,u.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function h(f,v,c,T){var l=n[v._name];function _(y,m){return S.coerce(f,v,l,y,m)}_("uirevision",T.uirevision),v.type="linear";var w=_("color"),A=w!==l.color.dflt?w:c.font.color,M=v._name,g=M.charAt(0).toUpperCase(),b="Component "+g,p=_("title.text",b);v._hovertitle=p===b?p:g,S.coerceFont(_,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),_("min"),o(f,v,_,"linear"),t(f,v,_,"linear"),e(f,v,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,v,_,{outerTicks:!0});var u=_("showticklabels");u&&(S.coerceFont(_,"tickfont",c.font,{overrideDflt:{color:A}}),_("tickangle"),_("tickformat")),a(f,v,_,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),_("hoverformat"),_("layer")}}}),CF=He({"src/plots/ternary/index.js"(Z){"use strict";var V=EF(),d=Hh().getSubplotCalcData,x=sa().counterRegex,S="ternary";Z.name=S;var E=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=x(S);var e=Z.attributes={};e[E]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=kF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,n=o._subplots[S],i=0;i<n.length;i++){var s=n[i],h=d(a,S,s),f=o[s]._subplot;f||(f=new V({id:s,graphDiv:r,container:o._ternarylayer.node()},o),o[s]._subplot=f),f.plot(h,o,r._promises)}},Z.clean=function(t,r,o,a){for(var n=a._subplots[S]||[],i=0;i<n.length;i++){var s=n[i],h=a[s]._subplot;!r[s]&&h&&(h.plotContainer.remove(),h.clipDef.remove(),h.clipDefRelative.remove(),h.layers["a-title"].remove(),h.layers["b-title"].remove(),h.layers["c-title"].remove())}},Z.updateFx=function(t){var r=t._fullLayout;r._ternarylayer.selectAll("g.toplevel").style("cursor",r.dragmode==="pan"?"move":"crosshair")}}}),LF=He({"src/traces/scatterternary/index.js"(Z,V){"use strict";V.exports={attributes:AS(),supplyDefaults:bF(),colorbar:pp(),formatLabels:wF(),calc:TF(),plot:AF(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:SF(),selectPoints:c1(),eventData:MF(),moduleType:"trace",name:"scatterternary",basePlotModule:CF(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}}),PF=He({"lib/scatterternary.js"(Z,V){"use strict";V.exports=LF()}}),MS=He({"src/traces/violin/attributes.js"(Z,V){"use strict";var d=N_(),x=Qo().extendFlat,S=tf().axisHoverFormat;V.exports={y:d.y,x:d.x,x0:d.x0,y0:d.y0,xhoverformat:S("x"),yhoverformat:S("y"),name:x({},d.name,{}),orientation:x({},d.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:d.fillcolor,points:x({},d.boxpoints,{}),jitter:x({},d.jitter,{}),pointpos:x({},d.pointpos,{}),width:x({},d.width,{}),marker:d.marker,text:d.text,hovertext:d.hovertext,hovertemplate:d.hovertemplate,hovertemplatefallback:d.hovertemplatefallback,quartilemethod:d.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:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:d.zorder}}}),ES=He({"src/traces/violin/layout_attributes.js"(Z,V){"use strict";var d=U_(),x=sa().extendFlat;V.exports={violinmode:x({},d.boxmode,{}),violingap:x({},d.boxgap,{}),violingroupgap:x({},d.boxgroupgap,{})}}}),IF=He({"src/traces/violin/defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=j_(),E=MS();V.exports=function(t,r,o,a){function n(u,y){return d.coerce(t,r,E,u,y)}function i(u,y){return d.coerce2(t,r,E,u,y)}if(S.handleSampleDefaults(t,r,n,a),r.visible!==!1){n("bandwidth"),n("side");var s=n("width");s||(n("scalegroup",r.name),n("scalemode"));var h=n("span"),f;Array.isArray(h)&&(f="manual"),n("spanmode",f);var v=n("line.color",(t.marker||{}).color||o),c=n("line.width"),T=n("fillcolor",x.addOpacity(r.line.color,.5));S.handlePointsDefaults(t,r,n,{prefix:""});var l=i("box.width"),_=i("box.fillcolor",T),w=i("box.line.color",v),A=i("box.line.width",c),M=n("box.visible",!!(l||_||w||A));M||(r.box={visible:!1});var g=i("meanline.color",v),b=i("meanline.width",c),p=n("meanline.visible",!!(g||b));p||(r.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}}),RF=He({"src/traces/violin/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=ES(),S=V2();V.exports=function(e,t,r){function o(a,n){return d.coerce(e,t,x,a,n)}S._supply(e,t,r,o,"violin")}}}),h3=He({"src/traces/violin/helpers.js"(Z){"use strict";var V=sa(),d={gaussian:function(x){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*x*x)}};Z.makeKDE=function(x,S,E){var e=E.length,t=d.gaussian,r=x.bandwidth,o=1/(e*r);return function(a){for(var n=0,i=0;i<e;i++)n+=t((a-E[i])/r);return o*n}},Z.getPositionOnKdePath=function(x,S,E){var e,t;S.orientation==="h"?(e="y",t="x"):(e="x",t="y");var r=V.findPointOnPath(x.path,E,t,{pathLength:x.pathLength}),o=x.posCenterPx,a=r[e],n=S.side==="both"?2*o-a:o;return[a,n]},Z.getKdeValue=function(x,S,E){var e=x.pts.map(Z.extractVal),t=Z.makeKDE(x,S,e);return t(E)/x.posDensityScale},Z.extractVal=function(x){return x.v}}}),DF=He({"src/traces/violin/calc.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=$5(),E=h3(),e=Ws().BADNUM;V.exports=function(n,i){var s=S(n,i);if(s[0].t.empty)return s;for(var h=n._fullLayout,f=x.getFromId(n,i[i.orientation==="h"?"xaxis":"yaxis"]),v=1/0,c=-1/0,T=0,l=0,_=0;_<s.length;_++){var w=s[_],A=w.pts.map(E.extractVal),M=w.bandwidth=r(i,w,A),g=w.span=o(i,w,f,M);if(w.min===w.max&&M===0)g=w.span=[w.min,w.max],w.density=[{v:1,t:g[0]}],w.bandwidth=M,T=Math.max(T,1);else{var b=g[1]-g[0],p=Math.ceil(b/(M/3)),u=b/p;if(!isFinite(u)||!isFinite(p))return d.error("Something went wrong with computing the violin span"),s[0].t.empty=!0,s;var y=E.makeKDE(w,i,A);w.density=new Array(p+1);for(var m=0;m<w.density.length;m++){var R=g[0]+m*u,L=y(R);w.density[m]={v:L,t:R},T=Math.max(T,L)}}l=Math.max(l,A.length),v=Math.min(v,g[0]),c=Math.max(c,g[1])}var z=x.findExtremes(f,[v,c],{padded:!0});if(i._extremes[f._id]=z,i.width)s[0].t.maxKDE=T;else{var F=h._violinScaleGroupStats,N=i.scalegroup,O=F[N];O?(O.maxKDE=Math.max(O.maxKDE,T),O.maxCount=Math.max(O.maxCount,l)):F[N]={maxKDE:T,maxCount:l}}return s[0].t.labels.kde=d._(n,"kde:"),s};function t(a,n,i){var s=Math.min(n,i/1.349);return 1.059*s*Math.pow(a,-.2)}function r(a,n,i){var s=n.max-n.min;if(!s)return a.bandwidth?a.bandwidth:0;if(a.bandwidth)return Math.max(a.bandwidth,s/1e4);var h=i.length,f=d.stdev(i,h-1,n.mean);return Math.max(t(h,f,n.q3-n.q1),s/100)}function o(a,n,i,s){var h=a.spanmode,f=a.span||[],v=[n.min,n.max],c=[n.min-2*s,n.max+2*s],T;function l(w){var A=f[w],M=i.type==="multicategory"?i.r2c(A):i.d2c(A,0,a[n.valLetter+"calendar"]);return M===e?c[w]:M}h==="soft"?T=c:h==="hard"?T=v:T=[l(0),l(1)];var _={type:"linear",range:T};return x.setConvert(_),_.cleanRange(),T}}}),zF=He({"src/traces/violin/cross_trace_calc.js"(Z,V){"use strict";var d=G2().setPositionOffset,x=["v","h"];V.exports=function(E,e){for(var t=E.calcdata,r=e.xaxis,o=e.yaxis,a=0;a<x.length;a++){for(var n=x[a],i=n==="h"?o:r,s=[],h=0;h<t.length;h++){var f=t[h],v=f[0].t,c=f[0].trace;c.visible===!0&&c.type==="violin"&&!v.empty&&c.orientation===n&&c.xaxis===r._id&&c.yaxis===o._id&&s.push(h)}d("violin",E,s,i)}}}}),FF=He({"src/traces/violin/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=H2(),e=F5(),t=h3();V.exports=function(o,a,n,i){var s=o._context.staticPlot,h=o._fullLayout,f=a.xaxis,v=a.yaxis;function c(T,l){var _=e(T,{xaxis:f,yaxis:v,trace:l,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return S.smoothopen(_[0],1)}x.makeTraceGroups(i,n,"trace violins").each(function(T){var l=d.select(this),_=T[0],w=_.t,A=_.trace;if(A.visible!==!0||w.empty){l.remove();return}var M=w.bPos,g=w.bdPos,b=a[w.valLetter+"axis"],p=a[w.posLetter+"axis"],u=A.side==="both",y=u||A.side==="positive",m=u||A.side==="negative",R=l.selectAll("path.violin").data(x.identity);R.enter().append("path").style("vector-effect",s?"none":"non-scaling-stroke").attr("class","violin"),R.exit().remove(),R.each(function(B){var X=d.select(this),$=B.density,le=$.length,ce=p.c2l(B.pos+M,!0),de=p.l2p(ce),G;if(A.width)G=w.maxKDE/g;else{var Y=h._violinScaleGroupStats[A.scalegroup];G=A.scalemode==="count"?Y.maxKDE/g*(Y.maxCount/B.pts.length):Y.maxKDE/g}var ee,q,se,ae,j,Q,re;if(y){for(Q=new Array(le),ae=0;ae<le;ae++)re=Q[ae]={},re[w.posLetter]=ce+$[ae].v/G,re[w.valLetter]=b.c2l($[ae].t,!0);ee=c(Q,A)}if(m){for(Q=new Array(le),j=0,ae=le-1;j<le;j++,ae--)re=Q[j]={},re[w.posLetter]=ce-$[ae].v/G,re[w.valLetter]=b.c2l($[ae].t,!0);q=c(Q,A)}if(u)se=ee+"L"+q.slice(1)+"Z";else{var pe=[de,b.c2p($[0].t)],we=[de,b.c2p($[le-1].t)];A.orientation==="h"&&(pe.reverse(),we.reverse()),y?se="M"+pe+"L"+ee.slice(1)+"L"+we:se="M"+we+"L"+q.slice(1)+"L"+pe}X.attr("d",se),B.posCenterPx=de,B.posDensityScale=G*g,B.path=X.node(),B.pathLength=B.path.getTotalLength()/(u?2:1)});var L=A.box,z=L.width,F=(L.line||{}).width,N,O;u?(N=g*z,O=0):y?(N=[0,g*z/2],O=F*{x:1,y:-1}[w.posLetter]):(N=[g*z/2,0],O=F*{x:-1,y:1}[w.posLetter]),E.plotBoxAndWhiskers(l,{pos:p,val:b},A,{bPos:M,bdPos:N,bPosPxOffset:O}),E.plotBoxMean(l,{pos:p,val:b},A,{bPos:M,bdPos:N,bPosPxOffset:O});var P;!A.box.visible&&A.meanline.visible&&(P=x.identity);var U=l.selectAll("path.meanline").data(P||[]);U.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",s?"none":"non-scaling-stroke"),U.exit().remove(),U.each(function(B){var X=b.c2p(B.mean,!0),$=t.getPositionOnKdePath(B,A,X);d.select(this).attr("d",A.orientation==="h"?"M"+X+","+$[0]+"V"+$[1]:"M"+$[0]+","+X+"H"+$[1])}),E.plotPoints(l,{x:f,y:v},A,w)})}}}),OF=He({"src/traces/violin/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=Qp().stylePoints;V.exports=function(e){var t=d.select(e).selectAll("g.trace.violins");t.style("opacity",function(r){return r[0].trace.opacity}),t.each(function(r){var o=r[0].trace,a=d.select(this),n=o.box||{},i=n.line||{},s=o.meanline||{},h=s.width;a.selectAll("path.violin").style("stroke-width",o.line.width+"px").call(x.stroke,o.line.color).call(x.fill,o.fillcolor),a.selectAll("path.box").style("stroke-width",i.width+"px").call(x.stroke,i.color).call(x.fill,n.fillcolor);var f={"stroke-width":h+"px","stroke-dasharray":2*h+"px,"+h+"px"};a.selectAll("path.mean").style(f).call(x.stroke,s.color),a.selectAll("path.meanline").style(f).call(x.stroke,s.color),S(a,o,e)})}}}),BF=He({"src/traces/violin/hover.js"(Z,V){"use strict";var d=Jn(),x=sa(),S=Ho(),E=Q5(),e=h3();V.exports=function(r,o,a,n,i){i||(i={});var s=i.hoverLayer,h=r.cd,f=h[0].trace,v=f.hoveron,c=v.indexOf("violins")!==-1,T=v.indexOf("kde")!==-1,l=[],_,w;if(c||T){var A=E.hoverOnBoxes(r,o,a,n);if(T&&A.length>0){var M=r.xa,g=r.ya,b,p,u,y,m;f.orientation==="h"?(m=o,b="y",u=g,p="x",y=M):(m=a,b="x",u=M,p="y",y=g);var R=h[r.index];if(m>=R.span[0]&&m<=R.span[1]){var L=x.extendFlat({},r),z=y.c2p(m,!0),F=e.getKdeValue(R,f,m),N=e.getPositionOnKdePath(R,f,z),O=u._offset,P=u._length;L[b+"0"]=N[0],L[b+"1"]=N[1],L[p+"0"]=L[p+"1"]=z,L[p+"Label"]=p+": "+S.hoverLabelText(y,m,f[p+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var U=0,B=0;B<A.length;B++)if(A[B].attr==="med"){U=B;break}L.spikeDistance=A[U].spikeDistance;var X=b+"Spike";L[X]=A[U][X],A[U].spikeDistance=void 0,A[U][X]=void 0,L.hovertemplate=!1,l.push(L),w={},w[b+"1"]=x.constrain(O+N[0],O,O+P),w[b+"2"]=x.constrain(O+N[1],O,O+P),w[p+"1"]=w[p+"2"]=y._offset+z}}c&&(l=l.concat(A))}v.indexOf("points")!==-1&&(_=E.hoverOnPoints(r,o,a));var $=s.selectAll(".violinline-"+f.uid).data(w?[0]:[]);return $.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),$.exit().remove(),$.attr(w).call(d.stroke,r.color),n==="closest"?_?[_]:l:(_&&l.push(_),l)}}}),NF=He({"src/traces/violin/index.js"(Z,V){"use strict";V.exports={attributes:MS(),layoutAttributes:ES(),supplyDefaults:IF(),crossTraceDefaults:j_().crossTraceDefaults,supplyLayoutDefaults:RF(),calc:DF(),crossTraceCalc:zF(),plot:FF(),style:OF(),styleOnSelect:Qp().styleOnSelect,hoverPoints:BF(),selectPoints:eS(),moduleType:"trace",name:"violin",basePlotModule:Kf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}}),UF=He({"lib/violin.js"(Z,V){"use strict";V.exports=NF()}}),jF=He({"src/traces/funnel/constants.js"(Z,V){"use strict";V.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),kS=He({"src/traces/funnel/attributes.js"(Z,V){"use strict";var d=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=jF(),a=Qo().extendFlat,n=Jn();V.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:E("x"),yhoverformat:E("y"),hovertext:d.hovertext,hovertemplate:e({},{keys:o.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:a({},S.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:t({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:d.text,textposition:d.textposition,insidetextanchor:a({},d.insidetextanchor,{dflt:"middle"}),textangle:a({},d.textangle,{dflt:0}),textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:a({},d.orientation,{}),offset:a({},d.offset,{arrayOk:!1}),width:a({},d.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:a({},x.color,{dflt:n.defaultLine}),width:a({},x.width,{dflt:0,editType:"plot"}),dash:x.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,zorder:d.zorder};function i(){var s=a({},d.marker);return delete s.pattern,delete s.cornerradius,s}}}),CS=He({"src/traces/funnel/layout_attributes.js"(Z,V){"use strict";V.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"}}}}),LS=He({"src/traces/funnel/defaults.js"(Z,V){"use strict";var d=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=kS(),r=Jn();function o(i,s,h,f){function v(M,g){return d.coerce(i,s,t,M,g)}var c=E(i,s,f,v);if(!c){s.visible=!1;return}e(i,s,f,v),v("xhoverformat"),v("yhoverformat"),v("orientation",s.y&&!s.x?"v":"h"),v("offset"),v("width");var T=v("text");v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var l=v("textposition");S(i,s,f,v,l,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s.textposition!=="none"&&!s.texttemplate&&v("textinfo",d.isArrayOrTypedArray(T)?"text+value":"value");var _=v("marker.color",h);v("marker.line.color",r.defaultLine),v("marker.line.width");var w=v("connector.visible");if(w){v("connector.fillcolor",a(_));var A=v("connector.line.width");A&&(v("connector.line.color"),v("connector.line.dash"))}v("zorder")}function a(i){var s=d.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(s,.5*r.opacity(s))}function n(i,s){var h,f;function v(T){return d.coerce(f._input,f,t,T)}for(var c=0;c<i.length;c++)f=i[c],f.type==="funnel"&&(h=f._input,x(h,f,s,v,s.funnelmode))}V.exports={supplyDefaults:o,crossTraceDefaults:n}}}),qF=He({"src/traces/funnel/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=CS();V.exports=function(S,E,e){var t=!1;function r(n,i){return d.coerce(S,E,x,n,i)}for(var o=0;o<e.length;o++){var a=e[o];if(a.visible&&a.type==="funnel"){t=!0;break}}t&&(r("funnelmode"),r("funnelgap",.2),r("funnelgroupgap"))}}}),VF=He({"src/traces/funnel/arrays_to_calcdata.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;d.mergeArray(E.text,S,"tx"),d.mergeArray(E.hovertext,S,"htx");var t=E.marker;if(t){d.mergeArray(t.opacity,S,"mo"),d.mergeArray(t.color,S,"mc");var r=t.line;r&&(d.mergeArray(r.color,S,"mlc"),d.mergeArrayCastPositive(r.width,S,"mlw"))}}}}),GF=He({"src/traces/funnel/calc.js"(Z,V){"use strict";var d=Ho(),x=tv(),S=VF(),E=Od(),e=Ws().BADNUM;V.exports=function(o,a){var n=d.getFromId(o,a.xaxis||"x"),i=d.getFromId(o,a.yaxis||"y"),s,h,f,v,c,T,l,_;a.orientation==="h"?(s=n.makeCalcdata(a,"x"),f=i.makeCalcdata(a,"y"),v=x(a,i,"y",f),c=!!a.yperiodalignment,T="y"):(s=i.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),v=x(a,n,"x",f),c=!!a.xperiodalignment,T="x"),h=v.vals;var w=Math.min(h.length,s.length),A=new Array(w);for(a._base=[],l=0;l<w;l++){s[l]<0&&(s[l]=e);var M=!1;s[l]!==e&&l+1<w&&s[l+1]!==e&&(M=!0),_=A[l]={p:h[l],s:s[l],cNext:M},a._base[l]=-.5*_.s,c&&(A[l].orig_p=f[l],A[l][T+"End"]=v.ends[l],A[l][T+"Start"]=v.starts[l]),a.ids&&(_.id=String(a.ids[l])),l===0&&(A[0].vTotal=0),A[0].vTotal+=t(_.s),_.begR=t(_.s)/t(A[0].s)}var g;for(l=0;l<w;l++)_=A[l],_.s!==e&&(_.sumR=_.s/A[0].vTotal,_.difR=g!==void 0?_.s/g:1,g=_.s);return S(A,a),E(A,a),A};function t(r){return r===e?0:r}}}),HF=He({"src/traces/funnel/cross_trace_calc.js"(Z,V){"use strict";var d=eg().setGroupPositions;V.exports=function(S,E){var e=S._fullLayout,t=S._fullData,r=S.calcdata,o=E.xaxis,a=E.yaxis,n=[],i=[],s=[],h,f;for(f=0;f<t.length;f++){var v=t[f],c=v.orientation==="h";v.visible===!0&&v.xaxis===o._id&&v.yaxis===a._id&&v.type==="funnel"&&(h=r[f],c?s.push(h):i.push(h),n.push(h))}var T={mode:e.funnelmode,norm:e.funnelnorm,gap:e.funnelgap,groupgap:e.funnelgroupgap};for(d(S,o,a,i,T),d(S,a,o,s,T),f=0;f<n.length;f++){h=n[f];for(var l=0;l<h.length;l++)l+1<h.length&&(h[l].nextP0=h[l+1].p0,h[l].nextS0=h[l+1].s0,h[l].nextP1=h[l+1].p1,h[l].nextS1=h[l+1].s1)}}}}),WF=He({"src/traces/funnel/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=Ws().BADNUM,e=tg(),t=Sp().clearMinTextSize;V.exports=function(i,s,h,f){var v=i._fullLayout;t("funnel",v),r(i,s,h,f),o(i,s,h,f),e.plot(i,s,h,f,{mode:v.funnelmode,norm:v.funnelmode,gap:v.funnelgap,groupgap:v.funnelgroupgap})};function r(n,i,s,h){var f=i.xaxis,v=i.yaxis;x.makeTraceGroups(h,s,"trace bars").each(function(c){var T=d.select(this),l=c[0].trace,_=x.ensureSingle(T,"g","regions");if(!l.connector||!l.connector.visible){_.remove();return}var w=l.orientation==="h",A=_.selectAll("g.region").data(x.identity);A.enter().append("g").classed("region",!0),A.exit().remove();var M=A.size();A.each(function(g,b){if(!(b!==M-1&&!g.cNext)){var p=a(g,f,v,w),u=p[0],y=p[1],m="";u[0]!==E&&y[0]!==E&&u[1]!==E&&y[1]!==E&&u[2]!==E&&y[2]!==E&&u[3]!==E&&y[3]!==E&&(w?m+="M"+u[0]+","+y[1]+"L"+u[2]+","+y[2]+"H"+u[3]+"L"+u[1]+","+y[1]+"Z":m+="M"+u[1]+","+y[1]+"L"+u[2]+","+y[3]+"V"+y[2]+"L"+u[1]+","+y[0]+"Z"),m===""&&(m="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",m).call(S.setClipUrl,i.layerClipId,n)}})})}function o(n,i,s,h){var f=i.xaxis,v=i.yaxis;x.makeTraceGroups(h,s,"trace bars").each(function(c){var T=d.select(this),l=c[0].trace,_=x.ensureSingle(T,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){_.remove();return}var w=l.orientation==="h",A=_.selectAll("g.line").data(x.identity);A.enter().append("g").classed("line",!0),A.exit().remove();var M=A.size();A.each(function(g,b){if(!(b!==M-1&&!g.cNext)){var p=a(g,f,v,w),u=p[0],y=p[1],m="";u[3]!==void 0&&y[3]!==void 0&&(w?(m+="M"+u[0]+","+y[1]+"L"+u[2]+","+y[2],m+="M"+u[1]+","+y[1]+"L"+u[3]+","+y[2]):(m+="M"+u[1]+","+y[1]+"L"+u[2]+","+y[3],m+="M"+u[1]+","+y[0]+"L"+u[2]+","+y[2])),m===""&&(m="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",m).call(S.setClipUrl,i.layerClipId,n)}})})}function a(n,i,s,h){var f=[],v=[],c=h?i:s,T=h?s:i;return f[0]=c.c2p(n.s0,!0),v[0]=T.c2p(n.p0,!0),f[1]=c.c2p(n.s1,!0),v[1]=T.c2p(n.p1,!0),f[2]=c.c2p(n.nextS0,!0),v[2]=T.c2p(n.nextP0,!0),f[3]=c.c2p(n.nextS1,!0),v[3]=T.c2p(n.nextP1,!0),h?[f,v]:[v,f]}}}),XF=He({"src/traces/funnel/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Jn(),E=Ym().DESELECTDIM,e=Nd(),t=Sp().resizeText,r=e.styleTextPoints;function o(a,n,i){var s=i||d.select(a).selectAll('g[class^="funnellayer"]').selectAll("g.trace");t(a,s,"funnel"),s.style("opacity",function(h){return h[0].trace.opacity}),s.each(function(h){var f=d.select(this),v=h[0].trace;f.selectAll(".point > path").each(function(c){if(!c.isBlank){var T=v.marker;d.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(x.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",v.selectedpoints&&!c.selected?E:1)}}),r(f,v,a),f.selectAll(".regions").each(function(){d.select(this).selectAll("path").style("stroke-width",0).call(S.fill,v.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=v.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),c.width,c.color,c.dash)})})}V.exports={style:o}}}),ZF=He({"src/traces/funnel/hover.js"(Z,V){"use strict";var d=Jn().opacity,x=f1().hoverOnBars,S=sa().formatPercent;V.exports=function(t,r,o,a,n){var i=x(t,r,o,a,n);if(i){var s=i.cd,h=s[0].trace,f=h.orientation==="h",v=i.index,c=s[v],T=f?"x":"y";i[T+"LabelVal"]=c.s,i.percentInitial=c.begR,i.percentInitialLabel=S(c.begR,1),i.percentPrevious=c.difR,i.percentPreviousLabel=S(c.difR,1),i.percentTotal=c.sumR,i.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,_=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),M=function(g){return w||A.indexOf(g)!==-1};M("percent initial")&&_.push(i.percentInitialLabel+" of initial"),M("percent previous")&&_.push(i.percentPreviousLabel+" of previous"),M("percent total")&&_.push(i.percentTotalLabel+" of total")}return i.extraText=_.join("<br>"),i.color=E(h,c),[i]}};function E(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,n=t.mlw||r.line.width;if(d(o))return o;if(d(a)&&n)return a}}}),YF=He({"src/traces/funnel/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(x.percentInitial=S.percentInitial),"percentPrevious"in S&&(x.percentPrevious=S.percentPrevious),"percentTotal"in S&&(x.percentTotal=S.percentTotal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),KF=He({"src/traces/funnel/index.js"(Z,V){"use strict";V.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:qF(),calc:GF(),crossTraceCalc:HF(),plot:WF(),style:XF().style,hoverPoints:ZF(),eventData:YF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),JF=He({"lib/funnel.js"(Z,V){"use strict";V.exports=KF()}}),$F=He({"src/traces/waterfall/constants.js"(Z,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,V){"use strict";var d=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=$F(),a=Qo().extendFlat,n=Jn();function i(s){return{marker:{color:a({},d.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},d.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},d.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:E("x"),yhoverformat:E("y"),hovertext:d.hovertext,hovertemplate:e({},{keys:o.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:a({},S.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:t({editType:"plot"},{keys:o.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:d.text,textposition:d.textposition,insidetextanchor:d.insidetextanchor,textangle:d.textangle,textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:d.orientation,offset:d.offset,width:d.width,increasing:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:a({},x.color,{dflt:n.defaultLine}),width:a({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,zorder:d.zorder}}}),IS=He({"src/traces/waterfall/layout_attributes.js"(Z,V){"use strict";V.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"}}}}),d1=He({"src/constants/delta.js"(Z,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,V){"use strict";var d=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=PS(),r=Jn(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i="#4499FF";function s(v,c,T){v(c+".marker.color",T),v(c+".marker.line.color",r.defaultLine),v(c+".marker.line.width")}function h(v,c,T,l){function _(b,p){return d.coerce(v,c,t,b,p)}var w=E(v,c,l,_);if(!w){c.visible=!1;return}e(v,c,l,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",c.x&&!c.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");S(v,c,l,_,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),c.texttemplate||_("textinfo")),s(_,"increasing",a),s(_,"decreasing",n),s(_,"totals",i);var M=_("connector.visible");if(M){_("connector.mode");var g=_("connector.line.width");g&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function f(v,c){var T,l;function _(A){return d.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w<v.length;w++)l=v[w],T=l._input,x(T,l,c,_,c.waterfallmode)}V.exports={supplyDefaults:h,crossTraceDefaults:f}}}),QF=He({"src/traces/waterfall/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=IS();V.exports=function(S,E,e){var t=!1;function r(n,i){return d.coerce(S,E,x,n,i)}for(var o=0;o<e.length;o++){var a=e[o];if(a.visible&&a.type==="waterfall"){t=!0;break}}t&&(r("waterfallmode"),r("waterfallgap",.2),r("waterfallgroupgap"))}}}),eO=He({"src/traces/waterfall/calc.js"(Z,V){"use strict";var d=Ho(),x=tv(),S=sa().mergeArray,E=Od(),e=Ws().BADNUM;function t(o){return o==="a"||o==="absolute"}function r(o){return o==="t"||o==="total"}V.exports=function(a,n){var i=d.getFromId(a,n.xaxis||"x"),s=d.getFromId(a,n.yaxis||"y"),h,f,v,c,T,l;n.orientation==="h"?(h=i.makeCalcdata(n,"x"),v=s.makeCalcdata(n,"y"),c=x(n,s,"y",v),T=!!n.yperiodalignment,l="y"):(h=s.makeCalcdata(n,"y"),v=i.makeCalcdata(n,"x"),c=x(n,i,"x",v),T=!!n.xperiodalignment,l="x"),f=c.vals;for(var _=Math.min(f.length,h.length),w=new Array(_),A=0,M,g=!1,b=0;b<_;b++){var p=h[b]||0,u=!1;(h[b]!==e||r(n.measure[b])||t(n.measure[b]))&&b+1<_&&(h[b+1]!==e||r(n.measure[b+1])||t(n.measure[b+1]))&&(u=!0);var y=w[b]={i:b,p:f[b],s:p,rawS:p,cNext:u};t(n.measure[b])?(A=y.s,y.isSum=!0,y.dir="totals",y.s=A):r(n.measure[b])?(y.isSum=!0,y.dir="totals",y.s=A):(y.isSum=!1,y.dir=y.rawS<0?"decreasing":"increasing",M=y.s,y.s=A+M,A+=M),y.dir==="totals"&&(g=!0),T&&(w[b].orig_p=v[b],w[b][l+"End"]=c.ends[b],w[b][l+"Start"]=c.starts[b]),n.ids&&(y.id=String(n.ids[b])),y.v=(n.base||0)+A}return w.length&&(w[0].hasTotals=g),S(n.text,w,"tx"),S(n.hovertext,w,"htx"),E(w,n),w}}}),tO=He({"src/traces/waterfall/cross_trace_calc.js"(Z,V){"use strict";var d=eg().setGroupPositions;V.exports=function(S,E){var e=S._fullLayout,t=S._fullData,r=S.calcdata,o=E.xaxis,a=E.yaxis,n=[],i=[],s=[],h,f;for(f=0;f<t.length;f++){var v=t[f];v.visible===!0&&v.xaxis===o._id&&v.yaxis===a._id&&v.type==="waterfall"&&(h=r[f],v.orientation==="h"?s.push(h):i.push(h),n.push(h))}var c={mode:e.waterfallmode,norm:e.waterfallnorm,gap:e.waterfallgap,groupgap:e.waterfallgroupgap};for(d(S,o,a,i,c),d(S,a,o,s,c),f=0;f<n.length;f++){h=n[f];for(var T=0;T<h.length;T++){var l=h[T];l.isSum===!1&&(l.s0+=T===0?0:h[T-1].s),T+1<h.length&&(h[T].nextP0=h[T+1].p0,h[T].nextS0=h[T+1].s0)}}}}}),rO=He({"src/traces/waterfall/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=Ws().BADNUM,e=tg(),t=Sp().clearMinTextSize;V.exports=function(n,i,s,h){var f=n._fullLayout;t("waterfall",f),e.plot(n,i,s,h,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,i,s,h)};function r(a,n,i,s){var h=n.xaxis,f=n.yaxis;x.makeTraceGroups(s,i,"trace bars").each(function(v){var c=d.select(this),T=v[0].trace,l=x.ensureSingle(c,"g","lines");if(!T.connector||!T.connector.visible){l.remove();return}var _=T.orientation==="h",w=T.connector.mode,A=l.selectAll("g.line").data(x.identity);A.enter().append("g").classed("line",!0),A.exit().remove();var M=A.size();A.each(function(g,b){if(!(b!==M-1&&!g.cNext)){var p=o(g,h,f,_),u=p[0],y=p[1],m="";u[0]!==E&&y[0]!==E&&u[1]!==E&&y[1]!==E&&(w==="spanning"&&!g.isSum&&b>0&&(_?m+="M"+u[0]+","+y[1]+"V"+y[0]:m+="M"+u[1]+","+y[0]+"H"+u[0]),w!=="between"&&(g.isSum||b<M-1)&&(_?m+="M"+u[1]+","+y[0]+"V"+y[1]:m+="M"+u[0]+","+y[1]+"H"+u[1]),u[2]!==E&&y[2]!==E&&(_?m+="M"+u[1]+","+y[1]+"V"+y[2]:m+="M"+u[1]+","+y[1]+"H"+u[2])),m===""&&(m="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",m).call(S.setClipUrl,n.layerClipId,a)}})})}function o(a,n,i,s){var h=[],f=[],v=s?n:i,c=s?i:n;return h[0]=v.c2p(a.s0,!0),f[0]=c.c2p(a.p0,!0),h[1]=v.c2p(a.s1,!0),f[1]=c.c2p(a.p1,!0),h[2]=v.c2p(a.nextS0,!0),f[2]=c.c2p(a.nextP0,!0),s?[h,f]:[f,h]}}}),aO=He({"src/traces/waterfall/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Jn(),E=Ym().DESELECTDIM,e=Nd(),t=Sp().resizeText,r=e.styleTextPoints;function o(a,n,i){var s=i||d.select(a).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");t(a,s,"waterfall"),s.style("opacity",function(h){return h[0].trace.opacity}),s.each(function(h){var f=d.select(this),v=h[0].trace;f.selectAll(".point > path").each(function(c){if(!c.isBlank){var T=v[c.dir].marker;d.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(x.dashLine,T.line.dash,T.line.width).style("opacity",v.selectedpoints&&!c.selected?E:1)}}),r(f,v,a),f.selectAll(".lines").each(function(){var c=v.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),c.width,c.color,c.dash)})})}V.exports={style:o}}}),iO=He({"src/traces/waterfall/hover.js"(Z,V){"use strict";var d=Ho().hoverLabelText,x=Jn().opacity,S=f1().hoverOnBars,E=d1(),e={increasing:E.INCREASING.SYMBOL,decreasing:E.DECREASING.SYMBOL};V.exports=function(o,a,n,i,s){var h=S(o,a,n,i,s);if(!h)return;var f=h.cd,v=f[0].trace,c=v.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function _(R){return d(l,R,v[T+"hoverformat"])}var w=h.index,A=f[w],M=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-M,h.delta=M,h.final=h.initial+h.delta;var g=_(Math.abs(h.delta));h.deltaLabel=M<0?"("+g+")":g,h.finalLabel=_(h.final),h.initialLabel=_(h.initial);var b=A.hi||v.hoverinfo,p=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",y=b.split("+"),m=function(R){return u||y.indexOf(R)!==-1};A.isSum||(m("final")&&(c?!m("x"):!m("y"))&&p.push(h.finalLabel),m("delta")&&(M<0?p.push(h.deltaLabel+" "+e.decreasing):p.push(h.deltaLabel+" "+e.increasing)),m("initial")&&p.push("Initial: "+h.initialLabel))}return p.length&&(h.extraText=p.join("<br>")),h.color=t(v,A),[h]};function t(r,o){var a=r[o.dir].marker,n=a.color,i=a.line.color,s=a.line.width;if(x(n))return n;if(x(i)&&s)return i}}}),nO=He({"src/traces/waterfall/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"initial"in S&&(x.initial=S.initial),"delta"in S&&(x.delta=S.delta),"final"in S&&(x.final=S.final),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),oO=He({"src/traces/waterfall/index.js"(Z,V){"use strict";V.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:QF(),calc:eO(),crossTraceCalc:tO(),plot:rO(),style:aO().style,hoverPoints:iO(),eventData:nO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sO=He({"lib/waterfall.js"(Z,V){"use strict";V.exports=oO()}}),v1=He({"src/traces/image/constants.js"(Z,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(d){return d.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(d){return d.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(d){return d.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(d){var x=d.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(d){var x=d.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,V){"use strict";var d=ru(),x=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=Qo().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(i=0;i<r.length;i++)n=t[r[i]],o.push("For the `"+r[i]+"` colormodel, it is ["+(n.zminDflt||n.min).join(", ")+"]."),a.push("For the `"+r[i]+"` colormodel, it is ["+(n.zmaxDflt||n.max).join(", ")+"].");var n,i;V.exports=e({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:r,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc",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"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:e({},d.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:S({},{keys:["z","color","colormodel"]}),hovertemplatefallback:E(),zorder:x})}}),lO=He({"src/traces/image/defaults.js"(Z,V){"use strict";var d=sa(),x=DS(),S=v1(),E=Yv().IMAGE_URL_PREFIX;V.exports=function(t,r){function o(i,s){return d.coerce(t,r,x,i,s)}o("source"),r.source&&!r.source.match(E)&&delete r.source,r._hasSource=!!r.source;var a=o("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy");var n;r._hasZ?(o("colormodel","rgb"),n=S.colormodel[r.colormodel],o("zmin",n.zminDflt||n.min),o("zmax",n.zmaxDflt||n.max)):r._hasSource&&(r.colormodel="rgba256",n=S.colormodel[r.colormodel],r.zmin=n.zminDflt,r.zmax=n.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),r._length=null,o("zorder")}}}),Kv=He({"node_modules/inherits/inherits_browser.js"(Z,V){typeof Object.create=="function"?V.exports=function(x,S){S&&(x.super_=S,x.prototype=Object.create(S.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(x,S){if(S){x.super_=S;var E=function(){};E.prototype=S.prototype,x.prototype=new E,x.prototype.constructor=x}}}}),zS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(Z,V){V.exports=Z0().EventEmitter}}),uO=He({"node_modules/base64-js/index.js"(Z){"use strict";Z.byteLength=r,Z.toByteArray=a,Z.fromByteArray=s;var V=[],d=[],x=typeof Uint8Array<"u"?Uint8Array:Array,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(E=0,e=S.length;E<e;++E)V[E]=S[E],d[S.charCodeAt(E)]=E;var E,e;d[45]=62,d[95]=63;function t(h){var f=h.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=h.indexOf("=");v===-1&&(v=f);var c=v===f?0:4-v%4;return[v,c]}function r(h){var f=t(h),v=f[0],c=f[1];return(v+c)*3/4-c}function o(h,f,v){return(f+v)*3/4-v}function a(h){var f,v=t(h),c=v[0],T=v[1],l=new x(o(h,c,T)),_=0,w=T>0?c-4:c,A;for(A=0;A<w;A+=4)f=d[h.charCodeAt(A)]<<18|d[h.charCodeAt(A+1)]<<12|d[h.charCodeAt(A+2)]<<6|d[h.charCodeAt(A+3)],l[_++]=f>>16&255,l[_++]=f>>8&255,l[_++]=f&255;return T===2&&(f=d[h.charCodeAt(A)]<<2|d[h.charCodeAt(A+1)]>>4,l[_++]=f&255),T===1&&(f=d[h.charCodeAt(A)]<<10|d[h.charCodeAt(A+1)]<<4|d[h.charCodeAt(A+2)]>>2,l[_++]=f>>8&255,l[_++]=f&255),l}function n(h){return V[h>>18&63]+V[h>>12&63]+V[h>>6&63]+V[h&63]}function i(h,f,v){for(var c,T=[],l=f;l<v;l+=3)c=(h[l]<<16&16711680)+(h[l+1]<<8&65280)+(h[l+2]&255),T.push(n(c));return T.join("")}function s(h){for(var f,v=h.length,c=v%3,T=[],l=16383,_=0,w=v-c;_<w;_+=l)T.push(i(h,_,_+l>w?w:_+l));return c===1?(f=h[v-1],T.push(V[f>>2]+V[f<<4&63]+"==")):c===2&&(f=(h[v-2]<<8)+h[v-1],T.push(V[f>>10]+V[f>>4&63]+V[f<<2&63]+"=")),T.join("")}}}),cO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(V,d,x,S,E){var e,t,r=E*8-S-1,o=(1<<r)-1,a=o>>1,n=-7,i=x?E-1:0,s=x?-1:1,h=V[d+i];for(i+=s,e=h&(1<<-n)-1,h>>=-n,n+=r;n>0;e=e*256+V[d+i],i+=s,n-=8);for(t=e&(1<<-n)-1,e>>=-n,n+=S;n>0;t=t*256+V[d+i],i+=s,n-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(h?-1:1)*(1/0);t=t+Math.pow(2,S),e=e-a}return(h?-1:1)*t*Math.pow(2,e-S)},Z.write=function(V,d,x,S,E,e){var t,r,o,a=e*8-E-1,n=(1<<a)-1,i=n>>1,s=E===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,v=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(r=isNaN(d)?1:0,t=n):(t=Math.floor(Math.log(d)/Math.LN2),d*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+i>=1?d+=s/o:d+=s*Math.pow(2,1-i),d*o>=2&&(t++,o/=2),t+i>=n?(r=0,t=n):t+i>=1?(r=(d*o-1)*Math.pow(2,E),t=t+i):(r=d*Math.pow(2,i-1)*Math.pow(2,E),t=0));E>=8;V[x+h]=r&255,h+=f,r/=256,E-=8);for(t=t<<E|r,a+=E;a>0;V[x+h]=t&255,h+=f,t/=256,a-=8);V[x+h-f]|=v*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var V=uO(),d=cO(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Z.Buffer=t,Z.SlowBuffer=T,Z.INSPECT_MAX_BYTES=50;var S=2147483647;Z.kMaxLength=S,t.TYPED_ARRAY_SUPPORT=E(),!t.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function E(){try{let he=new Uint8Array(1),ue={foo:function(){return 42}};return Object.setPrototypeOf(ue,Uint8Array.prototype),Object.setPrototypeOf(he,ue),he.foo()===42}catch{return!1}}Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}});function e(he){if(he>S)throw new RangeError('The value "'+he+'" is invalid for option "size"');let ue=new Uint8Array(he);return Object.setPrototypeOf(ue,t.prototype),ue}function t(he,ue,ne){if(typeof he=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(he)}return r(he,ue,ne)}t.poolSize=8192;function r(he,ue,ne){if(typeof he=="string")return i(he,ue);if(ArrayBuffer.isView(he))return h(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(We(he,ArrayBuffer)||he&&We(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(We(he,SharedArrayBuffer)||he&&We(he.buffer,SharedArrayBuffer)))return f(he,ue,ne);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ce=he.valueOf&&he.valueOf();if(Ce!=null&&Ce!==he)return t.from(Ce,ue,ne);let Ye=v(he);if(Ye)return Ye;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),ue,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}t.from=function(he,ue,ne){return r(he,ue,ne)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function a(he,ue,ne){return o(he),he<=0?e(he):ue!==void 0?typeof ne=="string"?e(he).fill(ue,ne):e(he).fill(ue):e(he)}t.alloc=function(he,ue,ne){return a(he,ue,ne)};function n(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return n(he)},t.allocUnsafeSlow=function(he){return n(he)};function i(he,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!t.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);let ne=l(he,ue)|0,Ce=e(ne),Ye=Ce.write(he,ue);return Ye!==ne&&(Ce=Ce.slice(0,Ye)),Ce}function s(he){let ue=he.length<0?0:c(he.length)|0,ne=e(ue);for(let Ce=0;Ce<ue;Ce+=1)ne[Ce]=he[Ce]&255;return ne}function h(he){if(We(he,Uint8Array)){let ue=new Uint8Array(he);return f(ue.buffer,ue.byteOffset,ue.byteLength)}return s(he)}function f(he,ue,ne){if(ue<0||he.byteLength<ue)throw new RangeError('"offset" is outside of buffer bounds');if(he.byteLength<ue+(ne||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ue===void 0&&ne===void 0?Ce=new Uint8Array(he):ne===void 0?Ce=new Uint8Array(he,ue):Ce=new Uint8Array(he,ue,ne),Object.setPrototypeOf(Ce,t.prototype),Ce}function v(he){if(t.isBuffer(he)){let ue=c(he.length)|0,ne=e(ue);return ne.length===0||he.copy(ne,0,0,ue),ne}if(he.length!==void 0)return typeof he.length!="number"||at(he.length)?e(0):s(he);if(he.type==="Buffer"&&Array.isArray(he.data))return s(he.data)}function c(he){if(he>=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return he|0}function T(he){return+he!=he&&(he=0),t.alloc(+he)}t.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==t.prototype},t.compare=function(ue,ne){if(We(ue,Uint8Array)&&(ue=t.from(ue,ue.offset,ue.byteLength)),We(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(ue)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===ne)return 0;let Ce=ue.length,Ye=ne.length;for(let rt=0,Ke=Math.min(Ce,Ye);rt<Ke;++rt)if(ue[rt]!==ne[rt]){Ce=ue[rt],Ye=ne[rt];break}return Ce<Ye?-1:Ye<Ce?1:0},t.isEncoding=function(ue){switch(String(ue).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(ue,ne){if(!Array.isArray(ue))throw new TypeError('"list" argument must be an Array of Buffers');if(ue.length===0)return t.alloc(0);let Ce;if(ne===void 0)for(ne=0,Ce=0;Ce<ue.length;++Ce)ne+=ue[Ce].length;let Ye=t.allocUnsafe(ne),rt=0;for(Ce=0;Ce<ue.length;++Ce){let Ke=ue[Ce];if(We(Ke,Uint8Array))rt+Ke.length>Ye.length?(t.isBuffer(Ke)||(Ke=t.from(Ke)),Ke.copy(Ye,rt)):Uint8Array.prototype.set.call(Ye,Ke,rt);else if(t.isBuffer(Ke))Ke.copy(Ye,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Ke.length}return Ye};function l(he,ue){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||We(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);let ne=he.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ne===0)return 0;let Ye=!1;for(;;)switch(ue){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return pe(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Ie(he).length;default:if(Ye)return Ce?-1:pe(he).length;ue=(""+ue).toLowerCase(),Ye=!0}}t.byteLength=l;function _(he,ue,ne){let Ce=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,ue>>>=0,ne<=ue))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,ue,ne);case"utf8":case"utf-8":return R(this,ue,ne);case"ascii":return F(this,ue,ne);case"latin1":case"binary":return N(this,ue,ne);case"base64":return m(this,ue,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ue,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,ue,ne){let Ce=he[ue];he[ue]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;ne<ue;ne+=2)w(this,ne,ne+1);return this},t.prototype.swap32=function(){let ue=this.length;if(ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ne=0;ne<ue;ne+=4)w(this,ne,ne+3),w(this,ne+1,ne+2);return this},t.prototype.swap64=function(){let ue=this.length;if(ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ne=0;ne<ue;ne+=8)w(this,ne,ne+7),w(this,ne+1,ne+6),w(this,ne+2,ne+5),w(this,ne+3,ne+4);return this},t.prototype.toString=function(){let ue=this.length;return ue===0?"":arguments.length===0?R(this,0,ue):_.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(ue){if(!t.isBuffer(ue))throw new TypeError("Argument must be a Buffer");return this===ue?!0:t.compare(this,ue)===0},t.prototype.inspect=function(){let ue="",ne=Z.INSPECT_MAX_BYTES;return ue=this.toString("hex",0,ne).replace(/(.{2})/g,"$1 ").trim(),this.length>ne&&(ue+=" ... "),"<Buffer "+ue+">"},x&&(t.prototype[x]=t.prototype.inspect),t.prototype.compare=function(ue,ne,Ce,Ye,rt){if(We(ue,Uint8Array)&&(ue=t.from(ue,ue.offset,ue.byteLength)),!t.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ue);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=ue?ue.length:0),Ye===void 0&&(Ye=0),rt===void 0&&(rt=this.length),ne<0||Ce>ue.length||Ye<0||rt>this.length)throw new RangeError("out of range index");if(Ye>=rt&&ne>=Ce)return 0;if(Ye>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ye>>>=0,rt>>>=0,this===ue)return 0;let Ke=rt-Ye,Mt=Ce-ne,kt=Math.min(Ke,Mt),Nt=this.slice(Ye,rt),Gt=ue.slice(ne,Ce);for(let Mr=0;Mr<kt;++Mr)if(Nt[Mr]!==Gt[Mr]){Ke=Nt[Mr],Mt=Gt[Mr];break}return Ke<Mt?-1:Mt<Ke?1:0};function A(he,ue,ne,Ce,Ye){if(he.length===0)return-1;if(typeof ne=="string"?(Ce=ne,ne=0):ne>2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ye?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ye)return-1;ne=he.length-1}else if(ne<0)if(Ye)ne=0;else return-1;if(typeof ue=="string"&&(ue=t.from(ue,Ce)),t.isBuffer(ue))return ue.length===0?-1:M(he,ue,ne,Ce,Ye);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?Ye?Uint8Array.prototype.indexOf.call(he,ue,ne):Uint8Array.prototype.lastIndexOf.call(he,ue,ne):M(he,[ue],ne,Ce,Ye);throw new TypeError("val must be string, number or Buffer")}function M(he,ue,ne,Ce,Ye){let rt=1,Ke=he.length,Mt=ue.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||ue.length<2)return-1;rt=2,Ke/=2,Mt/=2,ne/=2}function kt(Gt,Mr){return rt===1?Gt[Mr]:Gt.readUInt16BE(Mr*rt)}let Nt;if(Ye){let Gt=-1;for(Nt=ne;Nt<Ke;Nt++)if(kt(he,Nt)===kt(ue,Gt===-1?0:Nt-Gt)){if(Gt===-1&&(Gt=Nt),Nt-Gt+1===Mt)return Gt*rt}else Gt!==-1&&(Nt-=Nt-Gt),Gt=-1}else for(ne+Mt>Ke&&(ne=Ke-Mt),Nt=ne;Nt>=0;Nt--){let Gt=!0;for(let Mr=0;Mr<Mt;Mr++)if(kt(he,Nt+Mr)!==kt(ue,Mr)){Gt=!1;break}if(Gt)return Nt}return-1}t.prototype.includes=function(ue,ne,Ce){return this.indexOf(ue,ne,Ce)!==-1},t.prototype.indexOf=function(ue,ne,Ce){return A(this,ue,ne,Ce,!0)},t.prototype.lastIndexOf=function(ue,ne,Ce){return A(this,ue,ne,Ce,!1)};function g(he,ue,ne,Ce){ne=Number(ne)||0;let Ye=he.length-ne;Ce?(Ce=Number(Ce),Ce>Ye&&(Ce=Ye)):Ce=Ye;let rt=ue.length;Ce>rt/2&&(Ce=rt/2);let Ke;for(Ke=0;Ke<Ce;++Ke){let Mt=parseInt(ue.substr(Ke*2,2),16);if(at(Mt))return Ke;he[ne+Ke]=Mt}return Ke}function b(he,ue,ne,Ce){return Re(pe(ue,he.length-ne),he,ne,Ce)}function p(he,ue,ne,Ce){return Re(we(ue),he,ne,Ce)}function u(he,ue,ne,Ce){return Re(Ie(ue),he,ne,Ce)}function y(he,ue,ne,Ce){return Re(Se(ue,he.length-ne),he,ne,Ce)}t.prototype.write=function(ue,ne,Ce,Ye){if(ne===void 0)Ye="utf8",Ce=this.length,ne=0;else if(Ce===void 0&&typeof ne=="string")Ye=ne,Ce=this.length,ne=0;else if(isFinite(ne))ne=ne>>>0,isFinite(Ce)?(Ce=Ce>>>0,Ye===void 0&&(Ye="utf8")):(Ye=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let rt=this.length-ne;if((Ce===void 0||Ce>rt)&&(Ce=rt),ue.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ye||(Ye="utf8");let Ke=!1;for(;;)switch(Ye){case"hex":return g(this,ue,ne,Ce);case"utf8":case"utf-8":return b(this,ue,ne,Ce);case"ascii":case"latin1":case"binary":return p(this,ue,ne,Ce);case"base64":return u(this,ue,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,ue,ne,Ce);default:if(Ke)throw new TypeError("Unknown encoding: "+Ye);Ye=(""+Ye).toLowerCase(),Ke=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(he,ue,ne){return ue===0&&ne===he.length?V.fromByteArray(he):V.fromByteArray(he.slice(ue,ne))}function R(he,ue,ne){ne=Math.min(he.length,ne);let Ce=[],Ye=ue;for(;Ye<ne;){let rt=he[Ye],Ke=null,Mt=rt>239?4:rt>223?3:rt>191?2:1;if(Ye+Mt<=ne){let kt,Nt,Gt,Mr;switch(Mt){case 1:rt<128&&(Ke=rt);break;case 2:kt=he[Ye+1],(kt&192)===128&&(Mr=(rt&31)<<6|kt&63,Mr>127&&(Ke=Mr));break;case 3:kt=he[Ye+1],Nt=he[Ye+2],(kt&192)===128&&(Nt&192)===128&&(Mr=(rt&15)<<12|(kt&63)<<6|Nt&63,Mr>2047&&(Mr<55296||Mr>57343)&&(Ke=Mr));break;case 4:kt=he[Ye+1],Nt=he[Ye+2],Gt=he[Ye+3],(kt&192)===128&&(Nt&192)===128&&(Gt&192)===128&&(Mr=(rt&15)<<18|(kt&63)<<12|(Nt&63)<<6|Gt&63,Mr>65535&&Mr<1114112&&(Ke=Mr))}}Ke===null?(Ke=65533,Mt=1):Ke>65535&&(Ke-=65536,Ce.push(Ke>>>10&1023|55296),Ke=56320|Ke&1023),Ce.push(Ke),Ye+=Mt}return z(Ce)}var L=4096;function z(he){let ue=he.length;if(ue<=L)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;Ce<ue;)ne+=String.fromCharCode.apply(String,he.slice(Ce,Ce+=L));return ne}function F(he,ue,ne){let Ce="";ne=Math.min(he.length,ne);for(let Ye=ue;Ye<ne;++Ye)Ce+=String.fromCharCode(he[Ye]&127);return Ce}function N(he,ue,ne){let Ce="";ne=Math.min(he.length,ne);for(let Ye=ue;Ye<ne;++Ye)Ce+=String.fromCharCode(he[Ye]);return Ce}function O(he,ue,ne){let Ce=he.length;(!ue||ue<0)&&(ue=0),(!ne||ne<0||ne>Ce)&&(ne=Ce);let Ye="";for(let rt=ue;rt<ne;++rt)Ye+=nt[he[rt]];return Ye}function P(he,ue,ne){let Ce=he.slice(ue,ne),Ye="";for(let rt=0;rt<Ce.length-1;rt+=2)Ye+=String.fromCharCode(Ce[rt]+Ce[rt+1]*256);return Ye}t.prototype.slice=function(ue,ne){let Ce=this.length;ue=~~ue,ne=ne===void 0?Ce:~~ne,ue<0?(ue+=Ce,ue<0&&(ue=0)):ue>Ce&&(ue=Ce),ne<0?(ne+=Ce,ne<0&&(ne=0)):ne>Ce&&(ne=Ce),ne<ue&&(ne=ue);let Ye=this.subarray(ue,ne);return Object.setPrototypeOf(Ye,t.prototype),Ye};function U(he,ue,ne){if(he%1!==0||he<0)throw new RangeError("offset is not uint");if(he+ue>ne)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue],rt=1,Ke=0;for(;++Ke<ne&&(rt*=256);)Ye+=this[ue+Ke]*rt;return Ye},t.prototype.readUintBE=t.prototype.readUIntBE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue+--ne],rt=1;for(;ne>0&&(rt*=256);)Ye+=this[ue+--ne]*rt;return Ye},t.prototype.readUint8=t.prototype.readUInt8=function(ue,ne){return ue=ue>>>0,ne||U(ue,1,this.length),this[ue]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,2,this.length),this[ue]|this[ue+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,2,this.length),this[ue]<<8|this[ue+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},t.prototype.readBigUInt64LE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=ne+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24,rt=this[++ue]+this[++ue]*2**8+this[++ue]*2**16+Ce*2**24;return BigInt(Ye)+(BigInt(rt)<<BigInt(32))}),t.prototype.readBigUInt64BE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=ne*2**24+this[++ue]*2**16+this[++ue]*2**8+this[++ue],rt=this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce;return(BigInt(Ye)<<BigInt(32))+BigInt(rt)}),t.prototype.readIntLE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue],rt=1,Ke=0;for(;++Ke<ne&&(rt*=256);)Ye+=this[ue+Ke]*rt;return rt*=128,Ye>=rt&&(Ye-=Math.pow(2,8*ne)),Ye},t.prototype.readIntBE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=ne,rt=1,Ke=this[ue+--Ye];for(;Ye>0&&(rt*=256);)Ke+=this[ue+--Ye]*rt;return rt*=128,Ke>=rt&&(Ke-=Math.pow(2,8*ne)),Ke},t.prototype.readInt8=function(ue,ne){return ue=ue>>>0,ne||U(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},t.prototype.readInt16LE=function(ue,ne){ue=ue>>>0,ne||U(ue,2,this.length);let Ce=this[ue]|this[ue+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(ue,ne){ue=ue>>>0,ne||U(ue,2,this.length);let Ce=this[ue+1]|this[ue]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},t.prototype.readInt32BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},t.prototype.readBigInt64LE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=this[ue+4]+this[ue+5]*2**8+this[ue+6]*2**16+(Ce<<24);return(BigInt(Ye)<<BigInt(32))+BigInt(ne+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24)}),t.prototype.readBigInt64BE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=(ne<<24)+this[++ue]*2**16+this[++ue]*2**8+this[++ue];return(BigInt(Ye)<<BigInt(32))+BigInt(this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce)}),t.prototype.readFloatLE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),d.read(this,ue,!0,23,4)},t.prototype.readFloatBE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),d.read(this,ue,!1,23,4)},t.prototype.readDoubleLE=function(ue,ne){return ue=ue>>>0,ne||U(ue,8,this.length),d.read(this,ue,!0,52,8)},t.prototype.readDoubleBE=function(ue,ne){return ue=ue>>>0,ne||U(ue,8,this.length),d.read(this,ue,!1,52,8)};function B(he,ue,ne,Ce,Ye,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ye||ue<rt)throw new RangeError('"value" argument is out of bounds');if(ne+Ce>he.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,Ce=Ce>>>0,!Ye){let Mt=Math.pow(2,8*Ce)-1;B(this,ue,ne,Ce,Mt,0)}let rt=1,Ke=0;for(this[ne]=ue&255;++Ke<Ce&&(rt*=256);)this[ne+Ke]=ue/rt&255;return ne+Ce},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,Ce=Ce>>>0,!Ye){let Mt=Math.pow(2,8*Ce)-1;B(this,ue,ne,Ce,Mt,0)}let rt=Ce-1,Ke=1;for(this[ne+rt]=ue&255;--rt>=0&&(Ke*=256);)this[ne+rt]=ue/Ke&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,1,255,0),this[ne]=ue&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,65535,0),this[ne]=ue&255,this[ne+1]=ue>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,65535,0),this[ne]=ue>>>8,this[ne+1]=ue&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,4294967295,0),this[ne+3]=ue>>>24,this[ne+2]=ue>>>16,this[ne+1]=ue>>>8,this[ne]=ue&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,4294967295,0),this[ne]=ue>>>24,this[ne+1]=ue>>>16,this[ne+2]=ue>>>8,this[ne+3]=ue&255,ne+4};function X(he,ue,ne,Ce,Ye){se(ue,Ce,Ye,he,ne,7);let rt=Number(ue&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Ke=Number(ue>>BigInt(32)&BigInt(4294967295));return he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,ne}function $(he,ue,ne,Ce,Ye){se(ue,Ce,Ye,he,ne,7);let rt=Number(ue&BigInt(4294967295));he[ne+7]=rt,rt=rt>>8,he[ne+6]=rt,rt=rt>>8,he[ne+5]=rt,rt=rt>>8,he[ne+4]=rt;let Ke=Number(ue>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Ke,Ke=Ke>>8,he[ne+2]=Ke,Ke=Ke>>8,he[ne+1]=Ke,Ke=Ke>>8,he[ne]=Ke,ne+8}t.prototype.writeBigUInt64LE=tt(function(ue,ne=0){return X(this,ue,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(ue,ne=0){return $(this,ue,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,!Ye){let kt=Math.pow(2,8*Ce-1);B(this,ue,ne,Ce,kt-1,-kt)}let rt=0,Ke=1,Mt=0;for(this[ne]=ue&255;++rt<Ce&&(Ke*=256);)ue<0&&Mt===0&&this[ne+rt-1]!==0&&(Mt=1),this[ne+rt]=(ue/Ke>>0)-Mt&255;return ne+Ce},t.prototype.writeIntBE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,!Ye){let kt=Math.pow(2,8*Ce-1);B(this,ue,ne,Ce,kt-1,-kt)}let rt=Ce-1,Ke=1,Mt=0;for(this[ne+rt]=ue&255;--rt>=0&&(Ke*=256);)ue<0&&Mt===0&&this[ne+rt+1]!==0&&(Mt=1),this[ne+rt]=(ue/Ke>>0)-Mt&255;return ne+Ce},t.prototype.writeInt8=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,1,127,-128),ue<0&&(ue=255+ue+1),this[ne]=ue&255,ne+1},t.prototype.writeInt16LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,32767,-32768),this[ne]=ue&255,this[ne+1]=ue>>>8,ne+2},t.prototype.writeInt16BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,32767,-32768),this[ne]=ue>>>8,this[ne+1]=ue&255,ne+2},t.prototype.writeInt32LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,2147483647,-2147483648),this[ne]=ue&255,this[ne+1]=ue>>>8,this[ne+2]=ue>>>16,this[ne+3]=ue>>>24,ne+4},t.prototype.writeInt32BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[ne]=ue>>>24,this[ne+1]=ue>>>16,this[ne+2]=ue>>>8,this[ne+3]=ue&255,ne+4},t.prototype.writeBigInt64LE=tt(function(ue,ne=0){return X(this,ue,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(ue,ne=0){return $(this,ue,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(he,ue,ne,Ce,Ye,rt){if(ne+Ce>he.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ce(he,ue,ne,Ce,Ye){return ue=+ue,ne=ne>>>0,Ye||le(he,ue,ne,4,34028234663852886e22,-34028234663852886e22),d.write(he,ue,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(ue,ne,Ce){return ce(this,ue,ne,!0,Ce)},t.prototype.writeFloatBE=function(ue,ne,Ce){return ce(this,ue,ne,!1,Ce)};function de(he,ue,ne,Ce,Ye){return ue=+ue,ne=ne>>>0,Ye||le(he,ue,ne,8,17976931348623157e292,-17976931348623157e292),d.write(he,ue,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(ue,ne,Ce){return de(this,ue,ne,!0,Ce)},t.prototype.writeDoubleBE=function(ue,ne,Ce){return de(this,ue,ne,!1,Ce)},t.prototype.copy=function(ue,ne,Ce,Ye){if(!t.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ye&&Ye!==0&&(Ye=this.length),ne>=ue.length&&(ne=ue.length),ne||(ne=0),Ye>0&&Ye<Ce&&(Ye=Ce),Ye===Ce||ue.length===0||this.length===0)return 0;if(ne<0)throw new RangeError("targetStart out of bounds");if(Ce<0||Ce>=this.length)throw new RangeError("Index out of range");if(Ye<0)throw new RangeError("sourceEnd out of bounds");Ye>this.length&&(Ye=this.length),ue.length-ne<Ye-Ce&&(Ye=ue.length-ne+Ce);let rt=Ye-Ce;return this===ue&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ne,Ce,Ye):Uint8Array.prototype.set.call(ue,this.subarray(Ce,Ye),ne),rt},t.prototype.fill=function(ue,ne,Ce,Ye){if(typeof ue=="string"){if(typeof ne=="string"?(Ye=ne,ne=0,Ce=this.length):typeof Ce=="string"&&(Ye=Ce,Ce=this.length),Ye!==void 0&&typeof Ye!="string")throw new TypeError("encoding must be a string");if(typeof Ye=="string"&&!t.isEncoding(Ye))throw new TypeError("Unknown encoding: "+Ye);if(ue.length===1){let Ke=ue.charCodeAt(0);(Ye==="utf8"&&Ke<128||Ye==="latin1")&&(ue=Ke)}}else typeof ue=="number"?ue=ue&255:typeof ue=="boolean"&&(ue=Number(ue));if(ne<0||this.length<ne||this.length<Ce)throw new RangeError("Out of range index");if(Ce<=ne)return this;ne=ne>>>0,Ce=Ce===void 0?this.length:Ce>>>0,ue||(ue=0);let rt;if(typeof ue=="number")for(rt=ne;rt<Ce;++rt)this[rt]=ue;else{let Ke=t.isBuffer(ue)?ue:t.from(ue,Ye),Mt=Ke.length;if(Mt===0)throw new TypeError('The value "'+ue+'" is invalid for argument "value"');for(rt=0;rt<Ce-ne;++rt)this[rt+ne]=Ke[rt%Mt]}return this};var G={};function Y(he,ue,ne){G[he]=class extends ne{constructor(){super(),Object.defineProperty(this,"message",{value:ue.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${he}]`,this.stack,delete this.name}get code(){return he}set code(Ye){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ye,writable:!0})}toString(){return`${this.name} [${he}]: ${this.message}`}}}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(he){return he?`${he} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(he,ue){return`The "${he}" argument must be of type number. Received type ${typeof ue}`},TypeError),Y("ERR_OUT_OF_RANGE",function(he,ue,ne){let Ce=`The value of "${he}" is out of range.`,Ye=ne;return Number.isInteger(ne)&&Math.abs(ne)>2**32?Ye=ee(String(ne)):typeof ne=="bigint"&&(Ye=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ye=ee(Ye)),Ye+="n"),Ce+=` It must be ${ue}. Received ${Ye}`,Ce},RangeError);function ee(he){let ue="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)ue=`_${he.slice(ne-3,ne)}${ue}`;return`${he.slice(0,ne)}${ue}`}function q(he,ue,ne){ae(ue,"offset"),(he[ue]===void 0||he[ue+ne]===void 0)&&j(ue,he.length-(ne+1))}function se(he,ue,ne,Ce,Ye,rt){if(he>ne||he<ue){let Ke=typeof ue=="bigint"?"n":"",Mt;throw rt>3?ue===0||ue===BigInt(0)?Mt=`>= 0${Ke} and < 2${Ke} ** ${(rt+1)*8}${Ke}`:Mt=`>= -(2${Ke} ** ${(rt+1)*8-1}${Ke}) and < 2 ** ${(rt+1)*8-1}${Ke}`:Mt=`>= ${ue}${Ke} and <= ${ne}${Ke}`,new G.ERR_OUT_OF_RANGE("value",Mt,he)}q(Ce,Ye,rt)}function ae(he,ue){if(typeof he!="number")throw new G.ERR_INVALID_ARG_TYPE(ue,"number",he)}function j(he,ue,ne){throw Math.floor(he)!==he?(ae(he,ne),new G.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):ue<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${ue}`,he)}var Q=/[^+/0-9A-Za-z-_]/g;function re(he){if(he=he.split("=")[0],he=he.trim().replace(Q,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,ue){ue=ue||1/0;let ne,Ce=he.length,Ye=null,rt=[];for(let Ke=0;Ke<Ce;++Ke){if(ne=he.charCodeAt(Ke),ne>55295&&ne<57344){if(!Ye){if(ne>56319){(ue-=3)>-1&&rt.push(239,191,189);continue}else if(Ke+1===Ce){(ue-=3)>-1&&rt.push(239,191,189);continue}Ye=ne;continue}if(ne<56320){(ue-=3)>-1&&rt.push(239,191,189),Ye=ne;continue}ne=(Ye-55296<<10|ne-56320)+65536}else Ye&&(ue-=3)>-1&&rt.push(239,191,189);if(Ye=null,ne<128){if((ue-=1)<0)break;rt.push(ne)}else if(ne<2048){if((ue-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((ue-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((ue-=4)<0)break;rt.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return rt}function we(he){let ue=[];for(let ne=0;ne<he.length;++ne)ue.push(he.charCodeAt(ne)&255);return ue}function Se(he,ue){let ne,Ce,Ye,rt=[];for(let Ke=0;Ke<he.length&&!((ue-=2)<0);++Ke)ne=he.charCodeAt(Ke),Ce=ne>>8,Ye=ne%256,rt.push(Ye),rt.push(Ce);return rt}function Ie(he){return V.toByteArray(re(he))}function Re(he,ue,ne,Ce){let Ye;for(Ye=0;Ye<Ce&&!(Ye+ne>=ue.length||Ye>=he.length);++Ye)ue[Ye+ne]=he[Ye];return Ye}function We(he,ue){return he instanceof ue||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===ue.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",ue=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ye=0;Ye<16;++Ye)ue[Ce+Ye]=he[ne]+he[Ye]}return ue}();function tt(he){return typeof BigInt>"u"?qe:he}function qe(){throw new Error("BigInt not supported")}}}),p3=He({"node_modules/has-symbols/shams.js"(Z,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},S=Symbol("test"),E=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(E)!=="[object Symbol]")return!1;var e=42;x[S]=e;for(var t in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var r=Object.getOwnPropertySymbols(x);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(x,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(x,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,V){"use strict";var d=p3();V.exports=function(){return d()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,V){"use strict";V.exports=Object}}),fO=He({"node_modules/es-errors/index.js"(Z,V){"use strict";V.exports=Error}}),hO=He({"node_modules/es-errors/eval.js"(Z,V){"use strict";V.exports=EvalError}}),pO=He({"node_modules/es-errors/range.js"(Z,V){"use strict";V.exports=RangeError}}),dO=He({"node_modules/es-errors/ref.js"(Z,V){"use strict";V.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,V){"use strict";V.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,V){"use strict";V.exports=TypeError}}),vO=He({"node_modules/es-errors/uri.js"(Z,V){"use strict";V.exports=URIError}}),mO=He({"node_modules/math-intrinsics/abs.js"(Z,V){"use strict";V.exports=Math.abs}}),gO=He({"node_modules/math-intrinsics/floor.js"(Z,V){"use strict";V.exports=Math.floor}}),yO=He({"node_modules/math-intrinsics/max.js"(Z,V){"use strict";V.exports=Math.max}}),_O=He({"node_modules/math-intrinsics/min.js"(Z,V){"use strict";V.exports=Math.min}}),xO=He({"node_modules/math-intrinsics/pow.js"(Z,V){"use strict";V.exports=Math.pow}}),bO=He({"node_modules/math-intrinsics/round.js"(Z,V){"use strict";V.exports=Math.round}}),wO=He({"node_modules/math-intrinsics/isNaN.js"(Z,V){"use strict";V.exports=Number.isNaN||function(x){return x!==x}}}),TO=He({"node_modules/math-intrinsics/sign.js"(Z,V){"use strict";var d=wO();V.exports=function(S){return d(S)||S===0?S:S<0?-1:1}}}),AO=He({"node_modules/gopd/gOPD.js"(Z,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,V){"use strict";var d=AO();if(d)try{d([],"length")}catch{d=null}V.exports=d}}),X_=He({"node_modules/es-define-property/index.js"(Z,V){"use strict";var d=Object.defineProperty||!1;if(d)try{d({},"a",{value:1})}catch{d=!1}V.exports=d}}),SO=He({"node_modules/has-symbols/index.js"(Z,V){"use strict";var d=typeof Symbol<"u"&&Symbol,x=p3();V.exports=function(){return typeof d!="function"||typeof Symbol!="function"||typeof d("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,V){"use strict";var d=FS();V.exports=d.getPrototypeOf||null}}),MO=He({"node_modules/function-bind/implementation.js"(Z,V){"use strict";var d="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,S=Math.max,E="[object Function]",e=function(a,n){for(var i=[],s=0;s<a.length;s+=1)i[s]=a[s];for(var h=0;h<n.length;h+=1)i[h+a.length]=n[h];return i},t=function(a,n){for(var i=[],s=n||0,h=0;s<a.length;s+=1,h+=1)i[h]=a[s];return i},r=function(o,a){for(var n="",i=0;i<o.length;i+=1)n+=o[i],i+1<o.length&&(n+=a);return n};V.exports=function(a){var n=this;if(typeof n!="function"||x.apply(n)!==E)throw new TypeError(d+n);for(var i=t(arguments,1),s,h=function(){if(this instanceof s){var l=n.apply(this,e(i,arguments));return Object(l)===l?l:this}return n.apply(a,e(i,arguments))},f=S(0,n.length-i.length),v=[],c=0;c<f;c++)v[c]="$"+c;if(s=Function("binder","return function ("+r(v,",")+"){ return binder.apply(this,arguments); }")(h),n.prototype){var T=function(){};T.prototype=n.prototype,s.prototype=new T,T.prototype=null}return s}}}),g1=He({"node_modules/function-bind/index.js"(Z,V){"use strict";var d=MO();V.exports=Function.prototype.bind||d}}),d3=He({"node_modules/call-bind-apply-helpers/functionCall.js"(Z,V){"use strict";V.exports=Function.prototype.call}}),US=He({"node_modules/call-bind-apply-helpers/functionApply.js"(Z,V){"use strict";V.exports=Function.prototype.apply}}),EO=He({"node_modules/call-bind-apply-helpers/reflectApply.js"(Z,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),kO=He({"node_modules/call-bind-apply-helpers/actualApply.js"(Z,V){"use strict";var d=g1(),x=US(),S=d3(),E=EO();V.exports=E||d.call(S,x)}}),CO=He({"node_modules/call-bind-apply-helpers/index.js"(Z,V){"use strict";var d=g1(),x=m1(),S=d3(),E=kO();V.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new x("a function is required");return E(d,S,t)}}}),LO=He({"node_modules/dunder-proto/get.js"(Z,V){"use strict";var d=CO(),x=ag(),S;try{S=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var E=!!S&&x&&x(Object.prototype,"__proto__"),e=Object,t=e.getPrototypeOf;V.exports=E&&typeof E.get=="function"?d([E.get]):typeof t=="function"?function(o){return t(o==null?o:e(o))}:!1}}),PO=He({"node_modules/get-proto/index.js"(Z,V){"use strict";var d=BS(),x=NS(),S=LO();V.exports=d?function(e){return d(e)}:x?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return x(e)}:S?function(e){return S(e)}:null}}),IO=He({"node_modules/hasown/index.js"(Z,V){"use strict";var d=Function.prototype.call,x=Object.prototype.hasOwnProperty,S=g1();V.exports=S.call(d,x)}}),v3=He({"node_modules/get-intrinsic/index.js"(Z,V){"use strict";var d,x=FS(),S=fO(),E=hO(),e=pO(),t=dO(),r=OS(),o=m1(),a=vO(),n=mO(),i=gO(),s=yO(),h=_O(),f=xO(),v=bO(),c=TO(),T=Function,l=function(q){try{return T('"use strict"; return ('+q+").constructor;")()}catch{}},_=ag(),w=X_(),A=function(){throw new o},M=_?function(){try{return arguments.callee,A}catch{try{return _(arguments,"callee").get}catch{return A}}}():A,g=SO()(),b=PO(),p=NS(),u=BS(),y=US(),m=d3(),R={},L=typeof Uint8Array>"u"||!b?d:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%BigInt%":typeof BigInt>"u"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":E,"%Float16Array%":typeof Float16Array>"u"?d:Float16Array,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?d:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!b?d:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!b?d:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):d,"%Symbol%":g?Symbol:d,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":L,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakRef%":typeof WeakRef>"u"?d:WeakRef,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet,"%Function.prototype.call%":m,"%Function.prototype.apply%":y,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":p,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":v,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(q){F=b(b(q)),z["%Error.prototype%"]=F}var F,N=function q(se){var ae;if(se==="%AsyncFunction%")ae=l("async function () {}");else if(se==="%GeneratorFunction%")ae=l("function* () {}");else if(se==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(se==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(se==="%AsyncIteratorPrototype%"){var Q=q("%AsyncGenerator%");Q&&b&&(ae=b(Q.prototype))}return z[se]=ae,ae},O={__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"]},P=g1(),U=IO(),B=P.call(m,Array.prototype.concat),X=P.call(y,Array.prototype.splice),$=P.call(m,String.prototype.replace),le=P.call(m,String.prototype.slice),ce=P.call(m,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,Y=function(se){var ae=le(se,0,1),j=le(se,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Q=[];return $(se,de,function(re,pe,we,Se){Q[Q.length]=we?$(Se,G,"$1"):pe||re}),Q},ee=function(se,ae){var j=se,Q;if(U(O,j)&&(Q=O[j],j="%"+Q[0]+"%"),U(z,j)){var re=z[j];if(re===R&&(re=N(j)),typeof re>"u"&&!ae)throw new o("intrinsic "+se+" exists, but is not available. Please file an issue!");return{alias:Q,name:j,value:re}}throw new r("intrinsic "+se+" does not exist!")};V.exports=function(se,ae){if(typeof se!="string"||se.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(ce(/^%?[^%]*%?$/,se)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=Y(se),Q=j.length>0?j[0]:"",re=ee("%"+Q+"%",ae),pe=re.name,we=re.value,Se=!1,Ie=re.alias;Ie&&(Q=Ie[0],X(j,B([0,1],Ie)));for(var Re=1,We=!0;Re<j.length;Re+=1){var at=j[Re],nt=le(at,0,1),tt=le(at,-1);if((nt==='"'||nt==="'"||nt==="`"||tt==='"'||tt==="'"||tt==="`")&&nt!==tt)throw new r("property names with quotes must have matching quotes");if((at==="constructor"||!We)&&(Se=!0),Q+="."+at,pe="%"+Q+"%",U(z,pe))we=z[pe];else if(we!=null){if(!(at in we)){if(!ae)throw new o("base intrinsic for "+se+" exists, but the property is not available.");return}if(_&&Re+1>=j.length){var qe=_(we,at);We=!!qe,We&&"get"in qe&&!("originalValue"in qe.get)?we=qe.get:we=we[at]}else We=U(we,at),we=we[at];We&&!Se&&(z[pe]=we)}}return we}}}),RO=He({"node_modules/define-data-property/index.js"(Z,V){"use strict";var d=X_(),x=OS(),S=m1(),E=ag();V.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new S("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,h=!!E&&E(t,r);if(d)d(t,r,{configurable:i===null&&h?h.configurable:!i,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:n===null&&h?h.writable:!n});else if(s||!a&&!n&&!i)t[r]=o;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),jS=He({"node_modules/has-property-descriptors/index.js"(Z,V){"use strict";var d=X_(),x=function(){return!!d};x.hasArrayLengthDefineBug=function(){if(!d)return null;try{return d([],"length",{value:1}).length!==1}catch{return!0}},V.exports=x}}),DO=He({"node_modules/set-function-length/index.js"(Z,V){"use strict";var d=v3(),x=RO(),S=jS()(),E=ag(),e=m1(),t=d("%Math.floor%");V.exports=function(o,a){if(typeof o!="function")throw new e("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||t(a)!==a)throw new e("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in o&&E){var h=E(o,"length");h&&!h.configurable&&(i=!1),h&&!h.writable&&(s=!1)}return(i||s||!n)&&(S?x(o,"length",a,!0,!0):x(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,V){"use strict";var d=g1(),x=v3(),S=DO(),E=m1(),e=x("%Function.prototype.apply%"),t=x("%Function.prototype.call%"),r=x("%Reflect.apply%",!0)||d.call(t,e),o=X_(),a=x("%Math.max%");V.exports=function(s){if(typeof s!="function")throw new E("a function is required");var h=r(d,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var n=function(){return r(d,e,arguments)};o?o(V.exports,"apply",{value:n}):V.exports.apply=n}}),y1=He({"node_modules/call-bind/callBound.js"(Z,V){"use strict";var d=v3(),x=Z_(),S=x(d("String.prototype.indexOf"));V.exports=function(e,t){var r=d(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?x(r):r}}}),zO=He({"node_modules/is-arguments/index.js"(Z,V){"use strict";var d=W_()(),x=y1(),S=x("Object.prototype.toString"),E=function(o){return d&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return E(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&S(o)!=="[object Array]"&&S(o.callee)==="[object Function]"},t=function(){return E(arguments)}();E.isLegacyArguments=e,V.exports=t?E:e}}),FO=He({"node_modules/is-generator-function/index.js"(Z,V){"use strict";var d=Object.prototype.toString,x=Function.prototype.toString,S=/^\s*(?:function)?\*/,E=W_()(),e=Object.getPrototypeOf,t=function(){if(!E)return!1;try{return Function("return function*() {}")()}catch{}},r;V.exports=function(a){if(typeof a!="function")return!1;if(S.test(x.call(a)))return!0;if(!E){var n=d.call(a);return n==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var i=t();r=i?e(i):!1}return e(a)===r}}}),OO=He({"node_modules/is-callable/index.js"(Z,V){"use strict";var d=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,E;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw E}}),E={},x(function(){throw 42},null,S)}catch(_){_!==E&&(x=null)}else x=null;var e=/^\s*class\b/,t=function(w){try{var A=d.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(d.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",n="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,c=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((c||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===f||A===a)&&w("")==null}catch{}return!1}));var l;V.exports=x?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{x(w,null,S)}catch(A){if(A!==E)return!1}return!t(w)&&r(w)}:function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(v)return r(w);if(t(w))return!1;var A=o.call(w);return A!==n&&A!==i&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,V){"use strict";var d=OO(),x=Object.prototype.toString,S=Object.prototype.hasOwnProperty,E=function(a,n,i){for(var s=0,h=a.length;s<h;s++)S.call(a,s)&&(i==null?n(a[s],s,a):n.call(i,a[s],s,a))},e=function(a,n,i){for(var s=0,h=a.length;s<h;s++)i==null?n(a.charAt(s),s,a):n.call(i,a.charAt(s),s,a)},t=function(a,n,i){for(var s in a)S.call(a,s)&&(i==null?n(a[s],s,a):n.call(i,a[s],s,a))},r=function(a,n,i){if(!d(n))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=i),x.call(a)==="[object Array]"?E(a,n,s):typeof a=="string"?e(a,n,s):t(a,n,s)};V.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,V){"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var E=[],e=0;e<d.length;e++)typeof x[d[e]]=="function"&&(E[E.length]=d[e]);return E}}}),BO=He({"node_modules/which-typed-array/index.js"(Z,V){"use strict";var d=qS(),x=VS(),S=Z_(),E=y1(),e=ag(),t=E("Object.prototype.toString"),r=W_()(),o=typeof globalThis>"u"?window:globalThis,a=x(),n=E("String.prototype.slice"),i=Object.getPrototypeOf,s=E("Array.prototype.indexOf",!0)||function(T,l){for(var _=0;_<T.length;_+=1)if(T[_]===l)return _;return-1},h={__proto__:null};r&&e&&i?d(a,function(c){var T=new o[c];if(Symbol.toStringTag in T){var l=i(T),_=e(l,Symbol.toStringTag);if(!_){var w=i(l);_=e(w,Symbol.toStringTag)}h["$"+c]=S(_.get)}}):d(a,function(c){var T=new o[c],l=T.slice||T.set;l&&(h["$"+c]=S(l))});var f=function(T){var l=!1;return d(h,function(_,w){if(!l)try{"$"+_(T)===w&&(l=n(w,1))}catch{}}),l},v=function(T){var l=!1;return d(h,function(_,w){if(!l)try{_(T),l=n(w,1)}catch{}}),l};V.exports=function(T){if(!T||typeof T!="object")return!1;if(!r){var l=n(t(T),8,-1);return s(a,l)>-1?l:l!=="Object"?!1:v(T)}return e?f(T):null}}}),NO=He({"node_modules/is-typed-array/index.js"(Z,V){"use strict";var d=qS(),x=VS(),S=y1(),E=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=x(),a=S("Array.prototype.indexOf",!0)||function(v,c){for(var T=0;T<v.length;T+=1)if(v[T]===c)return T;return-1},n=S("String.prototype.slice"),i={},s=Object.getPrototypeOf;e&&t&&s&&d(o,function(f){var v=new r[f];if(Symbol.toStringTag in v){var c=s(v),T=t(c,Symbol.toStringTag);if(!T){var l=s(c);T=t(l,Symbol.toStringTag)}i[f]=T.get}});var h=function(v){var c=!1;return d(i,function(T,l){if(!c)try{c=T.call(v)===l}catch{}}),c};V.exports=function(v){if(!v||typeof v!="object")return!1;if(!e||!(Symbol.toStringTag in v)){var c=n(E(v),8,-1);return a(o,c)>-1}return t?h(v):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var V=zO(),d=FO(),x=BO(),S=NO();function E(Se){return Se.call.bind(Se)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=E(Object.prototype.toString),o=E(Number.prototype.valueOf),a=E(String.prototype.valueOf),n=E(Boolean.prototype.valueOf);e&&(i=E(BigInt.prototype.valueOf));var i;t&&(s=E(Symbol.prototype.valueOf));var s;function h(Se,Ie){if(typeof Se!="object")return!1;try{return Ie(Se),!0}catch{return!1}}Z.isArgumentsObject=V,Z.isGeneratorFunction=d,Z.isTypedArray=S;function f(Se){return typeof Promise<"u"&&Se instanceof Promise||Se!==null&&typeof Se=="object"&&typeof Se.then=="function"&&typeof Se.catch=="function"}Z.isPromise=f;function v(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||X(Se)}Z.isArrayBufferView=v;function c(Se){return x(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return x(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return x(Se)==="Uint16Array"}Z.isUint16Array=l;function _(Se){return x(Se)==="Uint32Array"}Z.isUint32Array=_;function w(Se){return x(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return x(Se)==="Int16Array"}Z.isInt16Array=A;function M(Se){return x(Se)==="Int32Array"}Z.isInt32Array=M;function g(Se){return x(Se)==="Float32Array"}Z.isFloat32Array=g;function b(Se){return x(Se)==="Float64Array"}Z.isFloat64Array=b;function p(Se){return x(Se)==="BigInt64Array"}Z.isBigInt64Array=p;function u(Se){return x(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function y(Se){return r(Se)==="[object Map]"}y.working=typeof Map<"u"&&y(new Map);function m(Se){return typeof Map>"u"?!1:y.working?y(Se):Se instanceof Map}Z.isMap=m;function R(Se){return r(Se)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function L(Se){return typeof Set>"u"?!1:R.working?R(Se):Se instanceof Set}Z.isSet=L;function z(Se){return r(Se)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Se){return typeof WeakMap>"u"?!1:z.working?z(Se):Se instanceof WeakMap}Z.isWeakMap=F;function N(Se){return r(Se)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Se){return N(Se)}Z.isWeakSet=O;function P(Se){return r(Se)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:P.working?P(Se):Se instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Se){return r(Se)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function X(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=X;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function le(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof le.working>"u"&&(le.working=le(new $)),le.working?le(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function G(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=G;function Y(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=Y;function ee(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=ee;function q(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=q;function se(Se){return h(Se,o)}Z.isNumberObject=se;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,n)}Z.isBooleanObject=j;function Q(Se){return e&&h(Se,i)}Z.isBigIntObject=Q;function re(Se){return t&&h(Se,s)}Z.isSymbolObject=re;function pe(Se){return se(Se)||ae(Se)||j(Se)||Q(Se)||re(Se)}Z.isBoxedPrimitive=pe;function we(Se){return typeof Uint8Array<"u"&&(U(Se)||ce(Se))}Z.isAnyArrayBuffer=we,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(Z,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})}}),HS=He({"node_modules/util/support/isBufferBrowser.js"(Z,V){V.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var V=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),le={},ce=0;ce<$.length;ce++)le[$[ce]]=Object.getOwnPropertyDescriptor(X,$[ce]);return le},d=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$<arguments.length;$++)X.push(e(arguments[$]));return X.join(" ")}for(var $=1,le=arguments,ce=le.length,de=String(B).replace(d,function(Y){if(Y==="%%")return"%";if($>=ce)return Y;switch(Y){case"%s":return String(le[$++]);case"%d":return Number(le[$++]);case"%j":try{return JSON.stringify(le[$++])}catch{return"[Circular]"}default:return Y}}),G=le[$];$<ce;G=le[++$])T(G)||!b(G)?de+=" "+G:de+=" "+e(G);return de},Z.deprecate=function(B,X){if(typeof process<"u"&&process.noDeprecation===!0)return B;if(typeof process>"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function le(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return le};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,le){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var le=X.inspect($,B);return w(le)||(le=a(B,le,$)),le}var ce=n(B,X);if(ce)return ce;var de=Object.keys(X),G=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(X)),u(X)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return i(X);if(de.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(p(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,se=["{","}"];if(v(X)&&(q=!0,se=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),p(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),de.length===0&&(!q||X.length==0))return se[0]+ee+se[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,G,de):j=de.map(function(Q){return h(B,X,$,G,Q,q)}),B.seen.pop(),f(j,ee,se)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(c(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,le,ce){for(var de=[],G=0,Y=X.length;G<Y;++G)N(X,String(G))?de.push(h(B,X,$,le,String(G),!0)):de.push("");return ce.forEach(function(ee){ee.match(/^\d+$/)||de.push(h(B,X,$,le,ee,!0))}),de}function h(B,X,$,le,ce,de){var G,Y,ee;if(ee=Object.getOwnPropertyDescriptor(X,ce)||{value:X[ce]},ee.get?ee.set?Y=B.stylize("[Getter/Setter]","special"):Y=B.stylize("[Getter]","special"):ee.set&&(Y=B.stylize("[Setter]","special")),N(le,ce)||(G="["+ce+"]"),Y||(B.seen.indexOf(ee.value)<0?(T($)?Y=a(B,ee.value,null):Y=a(B,ee.value,$-1),Y.indexOf(`
`)>-1&&(de?Y=Y.split(`
`).map(function(q){return" "+q}).join(`
`).slice(2):Y=`
`+Y.split(`
`).map(function(q){return" "+q}).join(`
`))):Y=B.stylize("[Circular]","special")),M(G)){if(de&&ce.match(/^\d+$/))return Y;G=JSON.stringify(""+ce),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=B.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=B.stylize(G,"string"))}return G+": "+Y}function f(B,X,$){var le=0,ce=B.reduce(function(de,G){return le++,G.indexOf(`
`)>=0&&le++,de+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?$[0]+(X===""?"":X+`
`)+" "+B.join(`,
`)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function v(B){return Array.isArray(B)}Z.isArray=v;function c(B){return typeof B=="boolean"}Z.isBoolean=c;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function p(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function m(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=m,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),le=$.length;le--;)B[$[le]]=X[$[le]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var le,ce,de=new Promise(function(ee,q){le=ee,ce=q}),G=[],Y=0;Y<arguments.length;Y++)G.push(arguments[Y]);G.push(function(ee,q){ee?ce(ee):le(q)});try{X.apply(this,G)}catch(ee){ce(ee)}return de}return Object.setPrototypeOf($,Object.getPrototypeOf(X)),O&&Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties($,V(X))},Z.promisify.custom=O;function P(B,X){if(!B){var $=new Error("Promise was rejected with a falsy value");$.reason=B,B=$}return X(B)}function U(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function X(){for(var $=[],le=0;le<arguments.length;le++)$.push(arguments[le]);var ce=$.pop();if(typeof ce!="function")throw new TypeError("The last argument must be of type Function");var de=this,G=function(){return ce.apply(de,arguments)};B.apply(this,$).then(function(Y){process.nextTick(G.bind(null,null,Y))},function(Y){process.nextTick(P.bind(null,Y,G))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(B)),Object.defineProperties(X,V(B)),X}Z.callbackify=U}}),UO=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(Z,V){"use strict";function d(h,f){var v=Object.keys(h);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(h);f&&(c=c.filter(function(T){return Object.getOwnPropertyDescriptor(h,T).enumerable})),v.push.apply(v,c)}return v}function x(h){for(var f=1;f<arguments.length;f++){var v=arguments[f]!=null?arguments[f]:{};f%2?d(Object(v),!0).forEach(function(c){S(h,c,v[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(v)):d(Object(v)).forEach(function(c){Object.defineProperty(h,c,Object.getOwnPropertyDescriptor(v,c))})}return h}function S(h,f,v){return f in h?Object.defineProperty(h,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[f]=v,h}function E(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function e(h,f){for(var v=0;v<f.length;v++){var c=f[v];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}function t(h,f,v){return f&&e(h.prototype,f),v&&e(h,v),h}var r=rg(),o=r.Buffer,a=WS(),n=a.inspect,i=n&&n.custom||"inspect";function s(h,f,v){o.prototype.copy.call(h,f,v)}V.exports=function(){function h(){E(this,h),this.head=null,this.tail=null,this.length=0}return t(h,[{key:"push",value:function(v){var c={data:v,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}},{key:"unshift",value:function(v){var c={data:v,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var c=this.head,T=""+c.data;c=c.next;)T+=v+c.data;return T}},{key:"concat",value:function(v){if(this.length===0)return o.alloc(0);for(var c=o.allocUnsafe(v>>>0),T=this.head,l=0;T;)s(T.data,c,l),l+=T.data.length,T=T.next;return c}},{key:"consume",value:function(v,c){var T;return v<this.head.data.length?(T=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?T=this.shift():T=c?this._getString(v):this._getBuffer(v),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var c=this.head,T=1,l=c.data;for(v-=l.length;c=c.next;){var _=c.data,w=v>_.length?_.length:v;if(w===_.length?l+=_:l+=_.slice(0,v),v-=w,v===0){w===_.length?(++T,c.next?this.head=c.next:this.head=this.tail=null):(this.head=c,c.data=_.slice(w));break}++T}return this.length-=T,l}},{key:"_getBuffer",value:function(v){var c=o.allocUnsafe(v),T=this.head,l=1;for(T.data.copy(c),v-=T.data.length;T=T.next;){var _=T.data,w=v>_.length?_.length:v;if(_.copy(c,c.length-v,0,w),v-=w,v===0){w===_.length?(++l,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=_.slice(w));break}++l}return this.length-=l,c}},{key:i,value:function(v,c){return n(this,x({},c,{depth:0,customInspect:!1}))}}]),h}()}}),XS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(Z,V){"use strict";function d(r,o){var a=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(o?o(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(e,this,r)):process.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!o&&s?a._writableState?a._writableState.errorEmitted?process.nextTick(S,a):(a._writableState.errorEmitted=!0,process.nextTick(x,a,s)):process.nextTick(x,a,s):o?(process.nextTick(S,a),o(s)):process.nextTick(S,a)}),this)}function x(r,o){e(r,o),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function E(){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 e(r,o){r.emit("error",o)}function t(r,o){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(o):r.emit("error",o)}V.exports={destroy:d,undestroy:E,errorOrDestroy:t}}}),ig=He({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(Z,V){"use strict";function d(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a}var x={};function S(o,a,n){n||(n=Error);function i(h,f,v){return typeof a=="string"?a:a(h,f,v)}var s=function(h){d(f,h);function f(v,c,T){return h.call(this,i(v,c,T))||this}return f}(n);s.prototype.name=n.name,s.prototype.code=o,x[o]=s}function E(o,a){if(Array.isArray(o)){var n=o.length;return o=o.map(function(i){return String(i)}),n>2?"one of ".concat(a," ").concat(o.slice(0,n-1).join(", "),", or ")+o[n-1]:n===2?"one of ".concat(a," ").concat(o[0]," or ").concat(o[1]):"of ".concat(a," ").concat(o[0])}else return"of ".concat(a," ").concat(String(o))}function e(o,a,n){return o.substr(!n||n<0?0:+n,a.length)===a}function t(o,a,n){return(n===void 0||n>o.length)&&(n=o.length),o.substring(n-a.length,n)===a}function r(o,a,n){return typeof n!="number"&&(n=0),n+a.length>o.length?!1:o.indexOf(a,n)!==-1}S("ERR_INVALID_OPT_VALUE",function(o,a){return'The value "'+a+'" is invalid for option "'+o+'"'},TypeError),S("ERR_INVALID_ARG_TYPE",function(o,a,n){var i;typeof a=="string"&&e(a,"not ")?(i="must not be",a=a.replace(/^not /,"")):i="must be";var s;if(t(o," argument"))s="The ".concat(o," ").concat(i," ").concat(E(a,"type"));else{var h=r(o,".")?"property":"argument";s='The "'.concat(o,'" ').concat(h," ").concat(i," ").concat(E(a,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),S("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),S("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),S("ERR_STREAM_PREMATURE_CLOSE","Premature close"),S("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),S("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),S("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),S("ERR_STREAM_WRITE_AFTER_END","write after end"),S("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),S("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),S("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=x}}),ZS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(Z,V){"use strict";var d=ig().codes.ERR_INVALID_OPT_VALUE;function x(E,e,t){return E.highWaterMark!=null?E.highWaterMark:e?E[t]:null}function S(E,e,t,r){var o=x(e,r,t);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=r?t:"highWaterMark";throw new d(a,o)}return Math.floor(o)}return E.objectMode?16:16*1024}V.exports={getHighWaterMark:S}}}),jO=He({"node_modules/util-deprecate/browser.js"(Z,V){V.exports=d;function d(S,E){if(x("noDeprecation"))return S;var e=!1;function t(){if(!e){if(x("throwDeprecation"))throw new Error(E);x("traceDeprecation")?console.trace(E):console.warn(E),e=!0}return S.apply(this,arguments)}return t}function x(S){try{if(!window.localStorage)return!1}catch{return!1}var E=window.localStorage[S];return E==null?!1:String(E).toLowerCase()==="true"}}}),YS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(Z,V){"use strict";V.exports=p;function d(G){var Y=this;this.next=null,this.entry=null,this.finish=function(){de(Y,G)}}var x;p.WritableState=g;var S={deprecate:jO()},E=zS(),e=rg().Buffer,t=window.Uint8Array||function(){};function r(G){return e.from(G)}function o(G){return e.isBuffer(G)||G instanceof t}var a=XS(),n=ZS(),i=n.getHighWaterMark,s=ig().codes,h=s.ERR_INVALID_ARG_TYPE,f=s.ERR_METHOD_NOT_IMPLEMENTED,v=s.ERR_MULTIPLE_CALLBACK,c=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,_=s.ERR_STREAM_WRITE_AFTER_END,w=s.ERR_UNKNOWN_ENCODING,A=a.errorOrDestroy;Kv()(p,E);function M(){}function g(G,Y,ee){x=x||ng(),G=G||{},typeof ee!="boolean"&&(ee=Y instanceof x),this.objectMode=!!G.objectMode,ee&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=i(this,G,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=G.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(se){N(Y,se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}g.prototype.getBuffer=function(){for(var Y=this.bufferedRequest,ee=[];Y;)ee.push(Y),Y=Y.next;return ee},function(){try{Object.defineProperty(g.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var b;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(Y){return b.call(this,Y)?!0:this!==p?!1:Y&&Y._writableState instanceof g}})):b=function(Y){return Y instanceof this};function p(G){x=x||ng();var Y=this instanceof x;if(!Y&&!b.call(p,this))return new p(G);this._writableState=new g(G,this,Y),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),E.call(this)}p.prototype.pipe=function(){A(this,new c)};function u(G,Y){var ee=new _;A(G,ee),process.nextTick(Y,ee)}function y(G,Y,ee,q){var se;return ee===null?se=new l:typeof ee!="string"&&!Y.objectMode&&(se=new h("chunk",["string","Buffer"],ee)),se?(A(G,se),process.nextTick(q,se),!1):!0}p.prototype.write=function(G,Y,ee){var q=this._writableState,se=!1,ae=!q.objectMode&&o(G);return ae&&!e.isBuffer(G)&&(G=r(G)),typeof Y=="function"&&(ee=Y,Y=null),ae?Y="buffer":Y||(Y=q.defaultEncoding),typeof ee!="function"&&(ee=M),q.ending?u(this,ee):(ae||y(this,q,G,ee))&&(q.pendingcb++,se=R(this,q,ae,G,Y,ee)),se},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&U(this,G))},p.prototype.setDefaultEncoding=function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new w(Y);return this._writableState.defaultEncoding=Y,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function m(G,Y,ee){return!G.objectMode&&G.decodeStrings!==!1&&typeof Y=="string"&&(Y=e.from(Y,ee)),Y}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(G,Y,ee,q,se,ae){if(!ee){var j=m(Y,q,se);q!==j&&(ee=!0,se="buffer",q=j)}var Q=Y.objectMode?1:q.length;Y.length+=Q;var re=Y.length<Y.highWaterMark;if(re||(Y.needDrain=!0),Y.writing||Y.corked){var pe=Y.lastBufferedRequest;Y.lastBufferedRequest={chunk:q,encoding:se,isBuf:ee,callback:ae,next:null},pe?pe.next=Y.lastBufferedRequest:Y.bufferedRequest=Y.lastBufferedRequest,Y.bufferedRequestCount+=1}else L(G,Y,!1,Q,q,se,ae);return re}function L(G,Y,ee,q,se,ae,j){Y.writelen=q,Y.writecb=j,Y.writing=!0,Y.sync=!0,Y.destroyed?Y.onwrite(new T("write")):ee?G._writev(se,Y.onwrite):G._write(se,ae,Y.onwrite),Y.sync=!1}function z(G,Y,ee,q,se){--Y.pendingcb,ee?(process.nextTick(se,q),process.nextTick(le,G,Y),G._writableState.errorEmitted=!0,A(G,q)):(se(q),G._writableState.errorEmitted=!0,A(G,q),le(G,Y))}function F(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function N(G,Y){var ee=G._writableState,q=ee.sync,se=ee.writecb;if(typeof se!="function")throw new v;if(F(ee),Y)z(G,ee,q,Y,se);else{var ae=B(ee)||G.destroyed;!ae&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&U(G,ee),q?process.nextTick(O,G,ee,ae,se):O(G,ee,ae,se)}}function O(G,Y,ee,q){ee||P(G,Y),Y.pendingcb--,q(),le(G,Y)}function P(G,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,G.emit("drain"))}function U(G,Y){Y.bufferProcessing=!0;var ee=Y.bufferedRequest;if(G._writev&&ee&&ee.next){var q=Y.bufferedRequestCount,se=new Array(q),ae=Y.corkedRequestsFree;ae.entry=ee;for(var j=0,Q=!0;ee;)se[j]=ee,ee.isBuf||(Q=!1),ee=ee.next,j+=1;se.allBuffers=Q,L(G,Y,!0,Y.length,se,"",ae.finish),Y.pendingcb++,Y.lastBufferedRequest=null,ae.next?(Y.corkedRequestsFree=ae.next,ae.next=null):Y.corkedRequestsFree=new d(Y),Y.bufferedRequestCount=0}else{for(;ee;){var re=ee.chunk,pe=ee.encoding,we=ee.callback,Se=Y.objectMode?1:re.length;if(L(G,Y,!1,Se,re,pe,we),ee=ee.next,Y.bufferedRequestCount--,Y.writing)break}ee===null&&(Y.lastBufferedRequest=null)}Y.bufferedRequest=ee,Y.bufferProcessing=!1}p.prototype._write=function(G,Y,ee){ee(new f("_write()"))},p.prototype._writev=null,p.prototype.end=function(G,Y,ee){var q=this._writableState;return typeof G=="function"?(ee=G,G=null,Y=null):typeof Y=="function"&&(ee=Y,Y=null),G!=null&&this.write(G,Y),q.corked&&(q.corked=1,this.uncork()),q.ending||ce(this,q,ee),this},Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B(G){return G.ending&&G.length===0&&G.bufferedRequest===null&&!G.finished&&!G.writing}function X(G,Y){G._final(function(ee){Y.pendingcb--,ee&&A(G,ee),Y.prefinished=!0,G.emit("prefinish"),le(G,Y)})}function $(G,Y){!Y.prefinished&&!Y.finalCalled&&(typeof G._final=="function"&&!Y.destroyed?(Y.pendingcb++,Y.finalCalled=!0,process.nextTick(X,G,Y)):(Y.prefinished=!0,G.emit("prefinish")))}function le(G,Y){var ee=B(Y);if(ee&&($(G,Y),Y.pendingcb===0&&(Y.finished=!0,G.emit("finish"),Y.autoDestroy))){var q=G._readableState;(!q||q.autoDestroy&&q.endEmitted)&&G.destroy()}return ee}function ce(G,Y,ee){Y.ending=!0,le(G,Y),ee&&(Y.finished?process.nextTick(ee):G.once("finish",ee)),Y.ended=!0,G.writable=!1}function de(G,Y,ee){var q=G.entry;for(G.entry=null;q;){var se=q.callback;Y.pendingcb--,se(ee),q=q.next}Y.corkedRequestsFree.next=G}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Y){this._writableState&&(this._writableState.destroyed=Y)}}),p.prototype.destroy=a.destroy,p.prototype._undestroy=a.undestroy,p.prototype._destroy=function(G,Y){Y(G)}}}),ng=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(Z,V){"use strict";var d=Object.keys||function(n){var i=[];for(var s in n)i.push(s);return i};V.exports=r;var x=JS(),S=YS();for(Kv()(r,x),E=d(S.prototype),t=0;t<E.length;t++)e=E[t],r.prototype[e]||(r.prototype[e]=S.prototype[e]);var E,e,t;function r(n){if(!(this instanceof r))return new r(n);x.call(this,n),S.call(this,n),this.allowHalfOpen=!0,n&&(n.readable===!1&&(this.readable=!1),n.writable===!1&&(this.writable=!1),n.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",o)))}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(r.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function o(){this._writableState.ended||process.nextTick(a,this)}function a(n){n.end()}Object.defineProperty(r.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(i){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=i,this._writableState.destroyed=i)}})}}),qO=He({"node_modules/safe-buffer/index.js"(Z,V){var d=rg(),x=d.Buffer;function S(e,t){for(var r in e)t[r]=e[r]}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?V.exports=d:(S(d,Z),Z.Buffer=E);function E(e,t,r){return x(e,t,r)}E.prototype=Object.create(x.prototype),S(x,E),E.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return x(e,t,r)},E.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=x(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o},E.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return x(e)},E.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(e)}}}),KS=He({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(Z){"use strict";var V=qO().Buffer,d=V.isEncoding||function(T){switch(T=""+T,T&&T.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 x(T){if(!T)return"utf8";for(var l;;)switch(T){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 T;default:if(l)return;T=(""+T).toLowerCase(),l=!0}}function S(T){var l=x(T);if(typeof l!="string"&&(V.isEncoding===d||!d(T)))throw new Error("Unknown encoding: "+T);return l||T}Z.StringDecoder=E;function E(T){this.encoding=S(T);var l;switch(this.encoding){case"utf16le":this.text=i,this.end=s,l=4;break;case"utf8":this.fillLast=o,l=4;break;case"base64":this.text=h,this.end=f,l=3;break;default:this.write=v,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=V.allocUnsafe(l)}E.prototype.write=function(T){if(T.length===0)return"";var l,_;if(this.lastNeed){if(l=this.fillLast(T),l===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<T.length?l?l+this.text(T,_):this.text(T,_):l||""},E.prototype.end=n,E.prototype.text=a,E.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function e(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function t(T,l,_){var w=l.length-1;if(w<_)return 0;var A=e(l[w]);return A>=0?(A>0&&(T.lastNeed=A-1),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(T.lastNeed=A-2),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(A===2?A=0:T.lastNeed=A-3),A):0))}function r(T,l,_){if((l[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function o(T){var l=this.lastTotal-this.lastNeed,_=r(this,T,l);if(_!==void 0)return _;if(this.lastNeed<=T.length)return T.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,l,0,T.length),this.lastNeed-=T.length}function a(T,l){var _=t(this,T,l);if(!this.lastNeed)return T.toString("utf8",l);this.lastTotal=_;var w=T.length-(_-this.lastNeed);return T.copy(this.lastChar,0,w),T.toString("utf8",l,w)}function n(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+"\uFFFD":l}function i(T,l){if((T.length-l)%2===0){var _=T.toString("utf16le",l);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",l,T.length-1)}function s(T){var l=T&&T.length?this.write(T):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,_)}return l}function h(T,l){var _=(T.length-l)%3;return _===0?T.toString("base64",l):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",l,T.length-_))}function f(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function v(T){return T.toString(this.encoding)}function c(T){return T&&T.length?this.write(T):""}}}),m3=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(Z,V){"use strict";var d=ig().codes.ERR_STREAM_PREMATURE_CLOSE;function x(t){var r=!1;return function(){if(!r){r=!0;for(var o=arguments.length,a=new Array(o),n=0;n<o;n++)a[n]=arguments[n];t.apply(this,a)}}}function S(){}function E(t){return t.setHeader&&typeof t.abort=="function"}function e(t,r,o){if(typeof r=="function")return e(t,null,r);r||(r={}),o=x(o||S);var a=r.readable||r.readable!==!1&&t.readable,n=r.writable||r.writable!==!1&&t.writable,i=function(){t.writable||h()},s=t._writableState&&t._writableState.finished,h=function(){n=!1,s=!0,a||o.call(t)},f=t._readableState&&t._readableState.endEmitted,v=function(){a=!1,f=!0,n||o.call(t)},c=function(w){o.call(t,w)},T=function(){var w;if(a&&!f)return(!t._readableState||!t._readableState.ended)&&(w=new d),o.call(t,w);if(n&&!s)return(!t._writableState||!t._writableState.ended)&&(w=new d),o.call(t,w)},l=function(){t.req.on("finish",h)};return E(t)?(t.on("complete",h),t.on("abort",T),t.req?l():t.on("request",l)):n&&!t._writableState&&(t.on("end",i),t.on("close",i)),t.on("end",v),t.on("finish",h),r.error!==!1&&t.on("error",c),t.on("close",T),function(){t.removeListener("complete",h),t.removeListener("abort",T),t.removeListener("request",l),t.req&&t.req.removeListener("finish",h),t.removeListener("end",i),t.removeListener("close",i),t.removeListener("finish",h),t.removeListener("end",v),t.removeListener("error",c),t.removeListener("close",T)}}V.exports=e}}),VO=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(Z,V){"use strict";var d;function x(l,_,w){return _ in l?Object.defineProperty(l,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):l[_]=w,l}var S=m3(),E=Symbol("lastResolve"),e=Symbol("lastReject"),t=Symbol("error"),r=Symbol("ended"),o=Symbol("lastPromise"),a=Symbol("handlePromise"),n=Symbol("stream");function i(l,_){return{value:l,done:_}}function s(l){var _=l[E];if(_!==null){var w=l[n].read();w!==null&&(l[o]=null,l[E]=null,l[e]=null,_(i(w,!1)))}}function h(l){process.nextTick(s,l)}function f(l,_){return function(w,A){l.then(function(){if(_[r]){w(i(void 0,!0));return}_[a](w,A)},A)}}var v=Object.getPrototypeOf(function(){}),c=Object.setPrototypeOf((d={get stream(){return this[n]},next:function(){var _=this,w=this[t];if(w!==null)return Promise.reject(w);if(this[r])return Promise.resolve(i(void 0,!0));if(this[n].destroyed)return new Promise(function(b,p){process.nextTick(function(){_[t]?p(_[t]):b(i(void 0,!0))})});var A=this[o],M;if(A)M=new Promise(f(A,this));else{var g=this[n].read();if(g!==null)return Promise.resolve(i(g,!1));M=new Promise(this[a])}return this[o]=M,M}},x(d,Symbol.asyncIterator,function(){return this}),x(d,"return",function(){var _=this;return new Promise(function(w,A){_[n].destroy(null,function(M){if(M){A(M);return}w(i(void 0,!0))})})}),d),v),T=function(_){var w,A=Object.create(c,(w={},x(w,n,{value:_,writable:!0}),x(w,E,{value:null,writable:!0}),x(w,e,{value:null,writable:!0}),x(w,t,{value:null,writable:!0}),x(w,r,{value:_._readableState.endEmitted,writable:!0}),x(w,a,{value:function(g,b){var p=A[n].read();p?(A[o]=null,A[E]=null,A[e]=null,g(i(p,!1))):(A[E]=g,A[e]=b)},writable:!0}),w));return A[o]=null,S(_,function(M){if(M&&M.code!=="ERR_STREAM_PREMATURE_CLOSE"){var g=A[e];g!==null&&(A[o]=null,A[E]=null,A[e]=null,g(M)),A[t]=M;return}var b=A[E];b!==null&&(A[o]=null,A[E]=null,A[e]=null,b(i(void 0,!0))),A[r]=!0}),_.on("readable",h.bind(null,A)),A};V.exports=T}}),GO=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(Z,V){V.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),JS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(Z,V){"use strict";V.exports=y;var d;y.ReadableState=u;var x=Z0().EventEmitter,S=function(Q,re){return Q.listeners(re).length},E=zS(),e=rg().Buffer,t=window.Uint8Array||function(){};function r(j){return e.from(j)}function o(j){return e.isBuffer(j)||j instanceof t}var a=WS(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var i=UO(),s=XS(),h=ZS(),f=h.getHighWaterMark,v=ig().codes,c=v.ERR_INVALID_ARG_TYPE,T=v.ERR_STREAM_PUSH_AFTER_EOF,l=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,A,M;Kv()(y,E);var g=s.errorOrDestroy,b=["error","close","destroy","pause","resume"];function p(j,Q,re){if(typeof j.prependListener=="function")return j.prependListener(Q,re);!j._events||!j._events[Q]?j.on(Q,re):Array.isArray(j._events[Q])?j._events[Q].unshift(re):j._events[Q]=[re,j._events[Q]]}function u(j,Q,re){d=d||ng(),j=j||{},typeof re!="boolean"&&(re=Q instanceof d),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.readableObjectMode),this.highWaterMark=f(this,j,"readableHighWaterMark",re),this.buffer=new i,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.destroyed=!1,this.defaultEncoding=j.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,j.encoding&&(w||(w=KS().StringDecoder),this.decoder=new w(j.encoding),this.encoding=j.encoding)}function y(j){if(d=d||ng(),!(this instanceof y))return new y(j);var Q=this instanceof d;this._readableState=new u(j,this,Q),this.readable=!0,j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy)),E.call(this)}Object.defineProperty(y.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Q){this._readableState&&(this._readableState.destroyed=Q)}}),y.prototype.destroy=s.destroy,y.prototype._undestroy=s.undestroy,y.prototype._destroy=function(j,Q){Q(j)},y.prototype.push=function(j,Q){var re=this._readableState,pe;return re.objectMode?pe=!0:typeof j=="string"&&(Q=Q||re.defaultEncoding,Q!==re.encoding&&(j=e.from(j,Q),Q=""),pe=!0),m(this,j,Q,!1,pe)},y.prototype.unshift=function(j){return m(this,j,null,!0,!1)};function m(j,Q,re,pe,we){n("readableAddChunk",Q);var Se=j._readableState;if(Q===null)Se.reading=!1,O(j,Se);else{var Ie;if(we||(Ie=L(Se,Q)),Ie)g(j,Ie);else if(Se.objectMode||Q&&Q.length>0)if(typeof Q!="string"&&!Se.objectMode&&Object.getPrototypeOf(Q)!==e.prototype&&(Q=r(Q)),pe)Se.endEmitted?g(j,new _):R(j,Se,Q,!0);else if(Se.ended)g(j,new T);else{if(Se.destroyed)return!1;Se.reading=!1,Se.decoder&&!re?(Q=Se.decoder.write(Q),Se.objectMode||Q.length!==0?R(j,Se,Q,!1):B(j,Se)):R(j,Se,Q,!1)}else pe||(Se.reading=!1,B(j,Se))}return!Se.ended&&(Se.length<Se.highWaterMark||Se.length===0)}function R(j,Q,re,pe){Q.flowing&&Q.length===0&&!Q.sync?(Q.awaitDrain=0,j.emit("data",re)):(Q.length+=Q.objectMode?1:re.length,pe?Q.buffer.unshift(re):Q.buffer.push(re),Q.needReadable&&P(j)),B(j,Q)}function L(j,Q){var re;return!o(Q)&&typeof Q!="string"&&Q!==void 0&&!j.objectMode&&(re=new c("chunk",["string","Buffer","Uint8Array"],Q)),re}y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(j){w||(w=KS().StringDecoder);var Q=new w(j);this._readableState.decoder=Q,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,pe="";re!==null;)pe+=Q.write(re.data),re=re.next;return this._readableState.buffer.clear(),pe!==""&&this._readableState.buffer.push(pe),this._readableState.length=pe.length,this};var z=1073741824;function F(j){return j>=z?j=z:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function N(j,Q){return j<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:j!==j?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(j>Q.highWaterMark&&(Q.highWaterMark=F(j)),j<=Q.length?j:Q.ended?Q.length:(Q.needReadable=!0,0))}y.prototype.read=function(j){n("read",j),j=parseInt(j,10);var Q=this._readableState,re=j;if(j!==0&&(Q.emittedReadable=!1),j===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended))return n("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?q(this):P(this),null;if(j=N(j,Q),j===0&&Q.ended)return Q.length===0&&q(this),null;var pe=Q.needReadable;n("need readable",pe),(Q.length===0||Q.length-j<Q.highWaterMark)&&(pe=!0,n("length less than watermark",pe)),Q.ended||Q.reading?(pe=!1,n("reading or ended",pe)):pe&&(n("do read"),Q.reading=!0,Q.sync=!0,Q.length===0&&(Q.needReadable=!0),this._read(Q.highWaterMark),Q.sync=!1,Q.reading||(j=N(re,Q)));var we;return j>0?we=ee(j,Q):we=null,we===null?(Q.needReadable=Q.length<=Q.highWaterMark,j=0):(Q.length-=j,Q.awaitDrain=0),Q.length===0&&(Q.ended||(Q.needReadable=!0),re!==j&&Q.ended&&q(this)),we!==null&&this.emit("data",we),we};function O(j,Q){if(n("onEofChunk"),!Q.ended){if(Q.decoder){var re=Q.decoder.end();re&&re.length&&(Q.buffer.push(re),Q.length+=Q.objectMode?1:re.length)}Q.ended=!0,Q.sync?P(j):(Q.needReadable=!1,Q.emittedReadable||(Q.emittedReadable=!0,U(j)))}}function P(j){var Q=j._readableState;n("emitReadable",Q.needReadable,Q.emittedReadable),Q.needReadable=!1,Q.emittedReadable||(n("emitReadable",Q.flowing),Q.emittedReadable=!0,process.nextTick(U,j))}function U(j){var Q=j._readableState;n("emitReadable_",Q.destroyed,Q.length,Q.ended),!Q.destroyed&&(Q.length||Q.ended)&&(j.emit("readable"),Q.emittedReadable=!1),Q.needReadable=!Q.flowing&&!Q.ended&&Q.length<=Q.highWaterMark,Y(j)}function B(j,Q){Q.readingMore||(Q.readingMore=!0,process.nextTick(X,j,Q))}function X(j,Q){for(;!Q.reading&&!Q.ended&&(Q.length<Q.highWaterMark||Q.flowing&&Q.length===0);){var re=Q.length;if(n("maybeReadMore read 0"),j.read(0),re===Q.length)break}Q.readingMore=!1}y.prototype._read=function(j){g(this,new l("_read()"))},y.prototype.pipe=function(j,Q){var re=this,pe=this._readableState;switch(pe.pipesCount){case 0:pe.pipes=j;break;case 1:pe.pipes=[pe.pipes,j];break;default:pe.pipes.push(j);break}pe.pipesCount+=1,n("pipe count=%d opts=%j",pe.pipesCount,Q);var we=(!Q||Q.end!==!1)&&j!==process.stdout&&j!==process.stderr,Se=we?Re:ne;pe.endEmitted?process.nextTick(Se):re.once("end",Se),j.on("unpipe",Ie);function Ie(Ce,Ye){n("onunpipe"),Ce===re&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,nt())}function Re(){n("onend"),j.end()}var We=$(re);j.on("drain",We);var at=!1;function nt(){n("cleanup"),j.removeListener("close",he),j.removeListener("finish",ue),j.removeListener("drain",We),j.removeListener("error",qe),j.removeListener("unpipe",Ie),re.removeListener("end",Re),re.removeListener("end",ne),re.removeListener("data",tt),at=!0,pe.awaitDrain&&(!j._writableState||j._writableState.needDrain)&&We()}re.on("data",tt);function tt(Ce){n("ondata");var Ye=j.write(Ce);n("dest.write",Ye),Ye===!1&&((pe.pipesCount===1&&pe.pipes===j||pe.pipesCount>1&&ae(pe.pipes,j)!==-1)&&!at&&(n("false write response, pause",pe.awaitDrain),pe.awaitDrain++),re.pause())}function qe(Ce){n("onerror",Ce),ne(),j.removeListener("error",qe),S(j,"error")===0&&g(j,Ce)}p(j,"error",qe);function he(){j.removeListener("finish",ue),ne()}j.once("close",he);function ue(){n("onfinish"),j.removeListener("close",he),ne()}j.once("finish",ue);function ne(){n("unpipe"),re.unpipe(j)}return j.emit("pipe",re),pe.flowing||(n("pipe resume"),re.resume()),j};function $(j){return function(){var re=j._readableState;n("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(j,"data")&&(re.flowing=!0,Y(j))}}y.prototype.unpipe=function(j){var Q=this._readableState,re={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return j&&j!==Q.pipes?this:(j||(j=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,j&&j.emit("unpipe",this,re),this);if(!j){var pe=Q.pipes,we=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var Se=0;Se<we;Se++)pe[Se].emit("unpipe",this,{hasUnpiped:!1});return this}var Ie=ae(Q.pipes,j);return Ie===-1?this:(Q.pipes.splice(Ie,1),Q.pipesCount-=1,Q.pipesCount===1&&(Q.pipes=Q.pipes[0]),j.emit("unpipe",this,re),this)},y.prototype.on=function(j,Q){var re=E.prototype.on.call(this,j,Q),pe=this._readableState;return j==="data"?(pe.readableListening=this.listenerCount("readable")>0,pe.flowing!==!1&&this.resume()):j==="readable"&&!pe.endEmitted&&!pe.readableListening&&(pe.readableListening=pe.needReadable=!0,pe.flowing=!1,pe.emittedReadable=!1,n("on readable",pe.length,pe.reading),pe.length?P(this):pe.reading||process.nextTick(ce,this)),re},y.prototype.addListener=y.prototype.on,y.prototype.removeListener=function(j,Q){var re=E.prototype.removeListener.call(this,j,Q);return j==="readable"&&process.nextTick(le,this),re},y.prototype.removeAllListeners=function(j){var Q=E.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&process.nextTick(le,this),Q};function le(j){var Q=j._readableState;Q.readableListening=j.listenerCount("readable")>0,Q.resumeScheduled&&!Q.paused?Q.flowing=!0:j.listenerCount("data")>0&&j.resume()}function ce(j){n("readable nexttick read 0"),j.read(0)}y.prototype.resume=function(){var j=this._readableState;return j.flowing||(n("resume"),j.flowing=!j.readableListening,de(this,j)),j.paused=!1,this};function de(j,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(G,j,Q))}function G(j,Q){n("resume",Q.reading),Q.reading||j.read(0),Q.resumeScheduled=!1,j.emit("resume"),Y(j),Q.flowing&&!Q.reading&&j.read(0)}y.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(j){var Q=j._readableState;for(n("flow",Q.flowing);Q.flowing&&j.read()!==null;);}y.prototype.wrap=function(j){var Q=this,re=this._readableState,pe=!1;j.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var Ie=re.decoder.end();Ie&&Ie.length&&Q.push(Ie)}Q.push(null)}),j.on("data",function(Ie){if(n("wrapped data"),re.decoder&&(Ie=re.decoder.write(Ie)),!(re.objectMode&&Ie==null)&&!(!re.objectMode&&(!Ie||!Ie.length))){var Re=Q.push(Ie);Re||(pe=!0,j.pause())}});for(var we in j)this[we]===void 0&&typeof j[we]=="function"&&(this[we]=function(Re){return function(){return j[Re].apply(j,arguments)}}(we));for(var Se=0;Se<b.length;Se++)j.on(b[Se],this.emit.bind(this,b[Se]));return this._read=function(Ie){n("wrapped _read",Ie),pe&&(pe=!1,j.resume())},this},typeof Symbol=="function"&&(y.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=VO()),A(this)}),Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Q){this._readableState&&(this._readableState.flowing=Q)}}),y._fromList=ee,Object.defineProperty(y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(j,Q){if(Q.length===0)return null;var re;return Q.objectMode?re=Q.buffer.shift():!j||j>=Q.length?(Q.decoder?re=Q.buffer.join(""):Q.buffer.length===1?re=Q.buffer.first():re=Q.buffer.concat(Q.length),Q.buffer.clear()):re=Q.buffer.consume(j,Q.decoder),re}function q(j){var Q=j._readableState;n("endReadable",Q.endEmitted),Q.endEmitted||(Q.ended=!0,process.nextTick(se,Q,j))}function se(j,Q){if(n("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,Q.readable=!1,Q.emit("end"),j.autoDestroy)){var re=Q._writableState;(!re||re.autoDestroy&&re.finished)&&Q.destroy()}}typeof Symbol=="function"&&(y.from=function(j,Q){return M===void 0&&(M=GO()),M(y,j,Q)});function ae(j,Q){for(var re=0,pe=j.length;re<pe;re++)if(j[re]===Q)return re;return-1}}}),$S=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(Z,V){"use strict";V.exports=o;var d=ig().codes,x=d.ERR_METHOD_NOT_IMPLEMENTED,S=d.ERR_MULTIPLE_CALLBACK,E=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=d.ERR_TRANSFORM_WITH_LENGTH_0,t=ng();Kv()(o,t);function r(i,s){var h=this._transformState;h.transforming=!1;var f=h.writecb;if(f===null)return this.emit("error",new S);h.writechunk=null,h.writecb=null,s!=null&&this.push(s),f(i);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function o(i){if(!(this instanceof o))return new o(i);t.call(this,i),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",a)}function a(){var i=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(s,h){n(i,s,h)}):n(this,null,null)}o.prototype.push=function(i,s){return this._transformState.needTransform=!1,t.prototype.push.call(this,i,s)},o.prototype._transform=function(i,s,h){h(new x("_transform()"))},o.prototype._write=function(i,s,h){var f=this._transformState;if(f.writecb=h,f.writechunk=i,f.writeencoding=s,!f.transforming){var v=this._readableState;(f.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},o.prototype._read=function(i){var s=this._transformState;s.writechunk!==null&&!s.transforming?(s.transforming=!0,this._transform(s.writechunk,s.writeencoding,s.afterTransform)):s.needTransform=!0},o.prototype._destroy=function(i,s){t.prototype._destroy.call(this,i,function(h){s(h)})};function n(i,s,h){if(s)return i.emit("error",s);if(h!=null&&i.push(h),i._writableState.length)throw new e;if(i._transformState.transforming)throw new E;return i.push(null)}}}),HO=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(Z,V){"use strict";V.exports=x;var d=$S();Kv()(x,d);function x(S){if(!(this instanceof x))return new x(S);d.call(this,S)}x.prototype._transform=function(S,E,e){e(null,S)}}}),WO=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(Z,V){"use strict";var d;function x(h){var f=!1;return function(){f||(f=!0,h.apply(void 0,arguments))}}var S=ig().codes,E=S.ERR_MISSING_ARGS,e=S.ERR_STREAM_DESTROYED;function t(h){if(h)throw h}function r(h){return h.setHeader&&typeof h.abort=="function"}function o(h,f,v,c){c=x(c);var T=!1;h.on("close",function(){T=!0}),d===void 0&&(d=m3()),d(h,{readable:f,writable:v},function(_){if(_)return c(_);T=!0,c()});var l=!1;return function(_){if(!T&&!l){if(l=!0,r(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();c(_||new e("pipe"))}}}function a(h){h()}function n(h,f){return h.pipe(f)}function i(h){return!h.length||typeof h[h.length-1]!="function"?t:h.pop()}function s(){for(var h=arguments.length,f=new Array(h),v=0;v<h;v++)f[v]=arguments[v];var c=i(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new E("streams");var T,l=f.map(function(_,w){var A=w<f.length-1,M=w>0;return o(_,A,M,function(g){T||(T=g),g&&l.forEach(a),!A&&(l.forEach(a),c(T))})});return f.reduce(n)}V.exports=s}}),XO=He({"node_modules/stream-browserify/index.js"(Z,V){V.exports=S;var d=Z0().EventEmitter,x=Kv();x(S,d),S.Readable=JS(),S.Writable=YS(),S.Duplex=ng(),S.Transform=$S(),S.PassThrough=HO(),S.finished=m3(),S.pipeline=WO(),S.Stream=S;function S(){d.call(this)}S.prototype.pipe=function(E,e){var t=this;function r(f){E.writable&&E.write(f)===!1&&t.pause&&t.pause()}t.on("data",r);function o(){t.readable&&t.resume&&t.resume()}E.on("drain",o),!E._isStdio&&(!e||e.end!==!1)&&(t.on("end",n),t.on("close",i));var a=!1;function n(){a||(a=!0,E.end())}function i(){a||(a=!0,typeof E.destroy=="function"&&E.destroy())}function s(f){if(h(),d.listenerCount(this,"error")===0)throw f}t.on("error",s),E.on("error",s);function h(){t.removeListener("data",r),E.removeListener("drain",o),t.removeListener("end",n),t.removeListener("close",i),t.removeListener("error",s),E.removeListener("error",s),t.removeListener("end",h),t.removeListener("close",h),E.removeListener("close",h)}return t.on("end",h),t.on("close",h),E.on("close",h),E.emit("pipe",t),E}}}),_1=He({"node_modules/util/util.js"(Z){var V=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),le={},ce=0;ce<$.length;ce++)le[$[ce]]=Object.getOwnPropertyDescriptor(X,$[ce]);return le},d=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$<arguments.length;$++)X.push(e(arguments[$]));return X.join(" ")}for(var $=1,le=arguments,ce=le.length,de=String(B).replace(d,function(Y){if(Y==="%%")return"%";if($>=ce)return Y;switch(Y){case"%s":return String(le[$++]);case"%d":return Number(le[$++]);case"%j":try{return JSON.stringify(le[$++])}catch{return"[Circular]"}default:return Y}}),G=le[$];$<ce;G=le[++$])T(G)||!b(G)?de+=" "+G:de+=" "+e(G);return de},Z.deprecate=function(B,X){if(typeof process<"u"&&process.noDeprecation===!0)return B;if(typeof process>"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function le(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return le};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,le){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var le=X.inspect($,B);return w(le)||(le=a(B,le,$)),le}var ce=n(B,X);if(ce)return ce;var de=Object.keys(X),G=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(X)),u(X)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return i(X);if(de.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(p(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,se=["{","}"];if(v(X)&&(q=!0,se=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),p(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),de.length===0&&(!q||X.length==0))return se[0]+ee+se[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,G,de):j=de.map(function(Q){return h(B,X,$,G,Q,q)}),B.seen.pop(),f(j,ee,se)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(c(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,le,ce){for(var de=[],G=0,Y=X.length;G<Y;++G)N(X,String(G))?de.push(h(B,X,$,le,String(G),!0)):de.push("");return ce.forEach(function(ee){ee.match(/^\d+$/)||de.push(h(B,X,$,le,ee,!0))}),de}function h(B,X,$,le,ce,de){var G,Y,ee;if(ee=Object.getOwnPropertyDescriptor(X,ce)||{value:X[ce]},ee.get?ee.set?Y=B.stylize("[Getter/Setter]","special"):Y=B.stylize("[Getter]","special"):ee.set&&(Y=B.stylize("[Setter]","special")),N(le,ce)||(G="["+ce+"]"),Y||(B.seen.indexOf(ee.value)<0?(T($)?Y=a(B,ee.value,null):Y=a(B,ee.value,$-1),Y.indexOf(`
`)>-1&&(de?Y=Y.split(`
`).map(function(q){return" "+q}).join(`
`).slice(2):Y=`
`+Y.split(`
`).map(function(q){return" "+q}).join(`
`))):Y=B.stylize("[Circular]","special")),M(G)){if(de&&ce.match(/^\d+$/))return Y;G=JSON.stringify(""+ce),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=B.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=B.stylize(G,"string"))}return G+": "+Y}function f(B,X,$){var le=0,ce=B.reduce(function(de,G){return le++,G.indexOf(`
`)>=0&&le++,de+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?$[0]+(X===""?"":X+`
`)+" "+B.join(`,
`)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function v(B){return Array.isArray(B)}Z.isArray=v;function c(B){return typeof B=="boolean"}Z.isBoolean=c;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function p(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function m(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=m,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),le=$.length;le--;)B[$[le]]=X[$[le]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var le,ce,de=new Promise(function(ee,q){le=ee,ce=q}),G=[],Y=0;Y<arguments.length;Y++)G.push(arguments[Y]);G.push(function(ee,q){ee?ce(ee):le(q)});try{X.apply(this,G)}catch(ee){ce(ee)}return de}return Object.setPrototypeOf($,Object.getPrototypeOf(X)),O&&Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties($,V(X))},Z.promisify.custom=O;function P(B,X){if(!B){var $=new Error("Promise was rejected with a falsy value");$.reason=B,B=$}return X(B)}function U(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function X(){for(var $=[],le=0;le<arguments.length;le++)$.push(arguments[le]);var ce=$.pop();if(typeof ce!="function")throw new TypeError("The last argument must be of type Function");var de=this,G=function(){return ce.apply(de,arguments)};B.apply(this,$).then(function(Y){process.nextTick(G.bind(null,null,Y))},function(Y){process.nextTick(P.bind(null,Y,G))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(B)),Object.defineProperties(X,V(B)),X}Z.callbackify=U}}),QS=He({"node_modules/assert/build/internal/errors.js"(Z,V){"use strict";function d(M){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},d(M)}function x(M,g){for(var b=0;b<g.length;b++){var p=g[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(M,E(p.key),p)}}function S(M,g,b){return g&&x(M.prototype,g),b&&x(M,b),Object.defineProperty(M,"prototype",{writable:!1}),M}function E(M){var g=e(M,"string");return d(g)==="symbol"?g:String(g)}function e(M,g){if(d(M)!=="object"||M===null)return M;var b=M[Symbol.toPrimitive];if(b!==void 0){var p=b.call(M,g||"default");if(d(p)!=="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(M)}function t(M,g){if(!(M instanceof g))throw new TypeError("Cannot call a class as a function")}function r(M,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(g&&g.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),Object.defineProperty(M,"prototype",{writable:!1}),g&&o(M,g)}function o(M,g){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,u){return p.__proto__=u,p},o(M,g)}function a(M){var g=s();return function(){var p=h(M),u;if(g){var y=h(this).constructor;u=Reflect.construct(p,arguments,y)}else u=p.apply(this,arguments);return n(this,u)}}function n(M,g){if(g&&(d(g)==="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(M)}function i(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h(M){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},h(M)}var f={},v,c;function T(M,g,b){b||(b=Error);function p(y,m,R){return typeof g=="string"?g:g(y,m,R)}var u=function(y){r(R,y);var m=a(R);function R(L,z,F){var N;return t(this,R),N=m.call(this,p(L,z,F)),N.code=M,N}return S(R)}(b);f[M]=u}function l(M,g){if(Array.isArray(M)){var b=M.length;return M=M.map(function(p){return String(p)}),b>2?"one of ".concat(g," ").concat(M.slice(0,b-1).join(", "),", or ")+M[b-1]:b===2?"one of ".concat(g," ").concat(M[0]," or ").concat(M[1]):"of ".concat(g," ").concat(M[0])}else return"of ".concat(g," ").concat(String(M))}function _(M,g,b){return M.substr(!b||b<0?0:+b,g.length)===g}function w(M,g,b){return(b===void 0||b>M.length)&&(b=M.length),M.substring(b-g.length,b)===g}function A(M,g,b){return typeof b!="number"&&(b=0),b+g.length>M.length?!1:M.indexOf(g,b)!==-1}T("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),T("ERR_INVALID_ARG_TYPE",function(M,g,b){v===void 0&&(v=K_()),v(typeof M=="string","'name' must be a string");var p;typeof g=="string"&&_(g,"not ")?(p="must not be",g=g.replace(/^not /,"")):p="must be";var u;if(w(M," argument"))u="The ".concat(M," ").concat(p," ").concat(l(g,"type"));else{var y=A(M,".")?"property":"argument";u='The "'.concat(M,'" ').concat(y," ").concat(p," ").concat(l(g,"type"))}return u+=". Received type ".concat(d(b)),u},TypeError),T("ERR_INVALID_ARG_VALUE",function(M,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";c===void 0&&(c=_1());var p=c.inspect(g);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(M,"' ").concat(b,". Received ").concat(p)},TypeError,RangeError),T("ERR_INVALID_RETURN_VALUE",function(M,g,b){var p;return b&&b.constructor&&b.constructor.name?p="instance of ".concat(b.constructor.name):p="type ".concat(d(b)),"Expected ".concat(M,' to be returned from the "').concat(g,'"')+" function but got ".concat(p,".")},TypeError),T("ERR_MISSING_ARGS",function(){for(var M=arguments.length,g=new Array(M),b=0;b<M;b++)g[b]=arguments[b];v===void 0&&(v=K_()),v(g.length>0,"At least one arg needs to be specified");var p="The ",u=g.length;switch(g=g.map(function(y){return'"'.concat(y,'"')}),u){case 1:p+="".concat(g[0]," argument");break;case 2:p+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:p+=g.slice(0,u-1).join(", "),p+=", and ".concat(g[u-1]," arguments");break}return"".concat(p," must be specified")},TypeError),V.exports.codes=f}}),ZO=He({"node_modules/assert/build/internal/assert/assertion_error.js"(Z,V){"use strict";function d(U,B){var X=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);B&&($=$.filter(function(le){return Object.getOwnPropertyDescriptor(U,le).enumerable})),X.push.apply(X,$)}return X}function x(U){for(var B=1;B<arguments.length;B++){var X=arguments[B]!=null?arguments[B]:{};B%2?d(Object(X),!0).forEach(function($){S(U,$,X[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(X)):d(Object(X)).forEach(function($){Object.defineProperty(U,$,Object.getOwnPropertyDescriptor(X,$))})}return U}function S(U,B,X){return B=r(B),B in U?Object.defineProperty(U,B,{value:X,enumerable:!0,configurable:!0,writable:!0}):U[B]=X,U}function E(U,B){if(!(U instanceof B))throw new TypeError("Cannot call a class as a function")}function e(U,B){for(var X=0;X<B.length;X++){var $=B[X];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(U,r($.key),$)}}function t(U,B,X){return B&&e(U.prototype,B),X&&e(U,X),Object.defineProperty(U,"prototype",{writable:!1}),U}function r(U){var B=o(U,"string");return _(B)==="symbol"?B:String(B)}function o(U,B){if(_(U)!=="object"||U===null)return U;var X=U[Symbol.toPrimitive];if(X!==void 0){var $=X.call(U,B||"default");if(_($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(U)}function a(U,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(B&&B.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),B&&T(U,B)}function n(U){var B=v();return function(){var $=l(U),le;if(B){var ce=l(this).constructor;le=Reflect.construct($,arguments,ce)}else le=$.apply(this,arguments);return i(this,le)}}function i(U,B){if(B&&(_(B)==="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(U)}function s(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function h(U){var B=typeof Map=="function"?new Map:void 0;return h=function($){if($===null||!c($))return $;if(typeof $!="function")throw new TypeError("Super expression must either be null or a function");if(typeof B<"u"){if(B.has($))return B.get($);B.set($,le)}function le(){return f($,arguments,l(this).constructor)}return le.prototype=Object.create($.prototype,{constructor:{value:le,enumerable:!1,writable:!0,configurable:!0}}),T(le,$)},h(U)}function f(U,B,X){return v()?f=Reflect.construct.bind():f=function(le,ce,de){var G=[null];G.push.apply(G,ce);var Y=Function.bind.apply(le,G),ee=new Y;return de&&T(ee,de.prototype),ee},f.apply(null,arguments)}function v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function T(U,B){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,le){return $.__proto__=le,$},T(U,B)}function l(U){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},l(U)}function _(U){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},_(U)}var w=_1(),A=w.inspect,M=QS(),g=M.codes.ERR_INVALID_ARG_TYPE;function b(U,B,X){return(X===void 0||X>U.length)&&(X=U.length),U.substring(X-B.length,X)===B}function p(U,B){if(B=Math.floor(B),U.length==0||B==0)return"";var X=U.length*B;for(B=Math.floor(Math.log(B)/Math.log(2));B;)U+=U,B--;return U+=U.substring(0,X-U.length),U}var u="",y="",m="",R="",L={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:"},z=10;function F(U){var B=Object.keys(U),X=Object.create(Object.getPrototypeOf(U));return B.forEach(function($){X[$]=U[$]}),Object.defineProperty(X,"message",{value:U.message}),X}function N(U){return A(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(U,B,X){var $="",le="",ce=0,de="",G=!1,Y=N(U),ee=Y.split(`
`),q=N(B).split(`
`),se=0,ae="";if(X==="strictEqual"&&_(U)==="object"&&_(B)==="object"&&U!==null&&B!==null&&(X="strictEqualObject"),ee.length===1&&q.length===1&&ee[0]!==q[0]){var j=ee[0].length+q[0].length;if(j<=z){if((_(U)!=="object"||U===null)&&(_(B)!=="object"||B===null)&&(U!==0||B!==0))return"".concat(L[X],`
`)+"".concat(ee[0]," !== ").concat(q[0],`
`)}else if(X!=="strictEqualObject"){var Q=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(j<Q){for(;ee[0][se]===q[0][se];)se++;se>2&&(ae=`
`.concat(p(" ",se),"^"),se=0)}}}for(var re=ee[ee.length-1],pe=q[q.length-1];re===pe&&(se++<2?de=`
`.concat(re).concat(de):$=re,ee.pop(),q.pop(),!(ee.length===0||q.length===0));)re=ee[ee.length-1],pe=q[q.length-1];var we=Math.max(ee.length,q.length);if(we===0){var Se=Y.split(`
`);if(Se.length>30)for(Se[26]="".concat(u,"...").concat(R);Se.length>27;)Se.pop();return"".concat(L.notIdentical,`
`).concat(Se.join(`
`),`
`)}se>3&&(de=`
`.concat(u,"...").concat(R).concat(de),G=!0),$!==""&&(de=`
`.concat($).concat(de),$="");var Ie=0,Re=L[X]+`
`.concat(y,"+ actual").concat(R," ").concat(m,"- expected").concat(R),We=" ".concat(u,"...").concat(R," Lines skipped");for(se=0;se<we;se++){var at=se-ce;if(ee.length<se+1)at>1&&se>2&&(at>4?(le+=`
`.concat(u,"...").concat(R),G=!0):at>3&&(le+=`
`.concat(q[se-2]),Ie++),le+=`
`.concat(q[se-1]),Ie++),ce=se,$+=`
`.concat(m,"-").concat(R," ").concat(q[se]),Ie++;else if(q.length<se+1)at>1&&se>2&&(at>4?(le+=`
`.concat(u,"...").concat(R),G=!0):at>3&&(le+=`
`.concat(ee[se-2]),Ie++),le+=`
`.concat(ee[se-1]),Ie++),ce=se,le+=`
`.concat(y,"+").concat(R," ").concat(ee[se]),Ie++;else{var nt=q[se],tt=ee[se],qe=tt!==nt&&(!b(tt,",")||tt.slice(0,-1)!==nt);qe&&b(nt,",")&&nt.slice(0,-1)===tt&&(qe=!1,tt+=","),qe?(at>1&&se>2&&(at>4?(le+=`
`.concat(u,"...").concat(R),G=!0):at>3&&(le+=`
`.concat(ee[se-2]),Ie++),le+=`
`.concat(ee[se-1]),Ie++),ce=se,le+=`
`.concat(y,"+").concat(R," ").concat(tt),$+=`
`.concat(m,"-").concat(R," ").concat(nt),Ie+=2):(le+=$,$="",(at===1||se===0)&&(le+=`
`.concat(tt),Ie++))}if(Ie>20&&se<we-2)return"".concat(Re).concat(We,`
`).concat(le,`
`).concat(u,"...").concat(R).concat($,`
`)+"".concat(u,"...").concat(R)}return"".concat(Re).concat(G?We:"",`
`).concat(le).concat($).concat(de).concat(ae)}var P=function(U,B){a($,U);var X=n($);function $(le){var ce;if(E(this,$),_(le)!=="object"||le===null)throw new g("options","Object",le);var de=le.message,G=le.operator,Y=le.stackStartFn,ee=le.actual,q=le.expected,se=Error.stackTraceLimit;if(Error.stackTraceLimit=0,de!=null)ce=X.call(this,String(de));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(u="\x1B[34m",y="\x1B[32m",R="\x1B[39m",m="\x1B[31m"):(u="",y="",R="",m="")),_(ee)==="object"&&ee!==null&&_(q)==="object"&&q!==null&&"stack"in ee&&ee instanceof Error&&"stack"in q&&q instanceof Error&&(ee=F(ee),q=F(q)),G==="deepStrictEqual"||G==="strictEqual")ce=X.call(this,O(ee,q,G));else if(G==="notDeepStrictEqual"||G==="notStrictEqual"){var ae=L[G],j=N(ee).split(`
`);if(G==="notStrictEqual"&&_(ee)==="object"&&ee!==null&&(ae=L.notStrictEqualObject),j.length>30)for(j[26]="".concat(u,"...").concat(R);j.length>27;)j.pop();j.length===1?ce=X.call(this,"".concat(ae," ").concat(j[0])):ce=X.call(this,"".concat(ae,`
`).concat(j.join(`
`),`
`))}else{var Q=N(ee),re="",pe=L[G];G==="notDeepEqual"||G==="notEqual"?(Q="".concat(L[G],`
`).concat(Q),Q.length>1024&&(Q="".concat(Q.slice(0,1021),"..."))):(re="".concat(N(q)),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),G==="deepEqual"||G==="equal"?Q="".concat(pe,`
`).concat(Q,`
should equal
`):re=" ".concat(G," ").concat(re)),ce=X.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=se,ce.generatedMessage=!de,Object.defineProperty(s(ce),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ce.code="ERR_ASSERTION",ce.actual=ee,ce.expected=q,ce.operator=G,Error.captureStackTrace&&Error.captureStackTrace(s(ce),Y),ce.stack,ce.name="AssertionError",i(ce)}return t($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:B,value:function(ce,de){return A(this,x(x({},de),{},{customInspect:!1,depth:0}))}}]),$}(h(Error),A.custom);V.exports=P}}),eM=He({"node_modules/object-keys/isArguments.js"(Z,V){"use strict";var d=Object.prototype.toString;V.exports=function(S){var E=d.call(S),e=E==="[object Arguments]";return e||(e=E!=="[object Array]"&&S!==null&&typeof S=="object"&&typeof S.length=="number"&&S.length>=0&&d.call(S.callee)==="[object Function]"),e}}}),YO=He({"node_modules/object-keys/implementation.js"(Z,V){"use strict";var d;Object.keys||(x=Object.prototype.hasOwnProperty,S=Object.prototype.toString,E=eM(),e=Object.prototype.propertyIsEnumerable,t=!e.call({toString:null},"toString"),r=e.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var f=h.constructor;return f&&f.prototype===h},n={$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},i=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!n["$"+h]&&x.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{a(window[h])}catch{return!0}}catch{return!0}return!1}(),s=function(h){if(typeof window>"u"||!i)return a(h);try{return a(h)}catch{return!1}},d=function(f){var v=f!==null&&typeof f=="object",c=S.call(f)==="[object Function]",T=E(f),l=v&&S.call(f)==="[object String]",_=[];if(!v&&!c&&!T)throw new TypeError("Object.keys called on a non-object");var w=r&&c;if(l&&f.length>0&&!x.call(f,0))for(var A=0;A<f.length;++A)_.push(String(A));if(T&&f.length>0)for(var M=0;M<f.length;++M)_.push(String(M));else for(var g in f)!(w&&g==="prototype")&&x.call(f,g)&&_.push(String(g));if(t)for(var b=s(f),p=0;p<o.length;++p)!(b&&o[p]==="constructor")&&x.call(f,o[p])&&_.push(o[p]);return _});var x,S,E,e,t,r,o,a,n,i,s;V.exports=d}}),tM=He({"node_modules/object-keys/index.js"(Z,V){"use strict";var d=Array.prototype.slice,x=eM(),S=Object.keys,E=S?function(r){return S(r)}:YO(),e=Object.keys;E.shim=function(){if(Object.keys){var r=function(){var o=Object.keys(arguments);return o&&o.length===arguments.length}(1,2);r||(Object.keys=function(a){return x(a)?e(d.call(a)):e(a)})}else Object.keys=E;return Object.keys||E},V.exports=E}}),KO=He({"node_modules/object.assign/implementation.js"(Z,V){"use strict";var d=tM(),x=p3()(),S=y1(),E=Object,e=S("Array.prototype.push"),t=S("Object.prototype.propertyIsEnumerable"),r=x?Object.getOwnPropertySymbols:null;V.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var i=E(a);if(arguments.length===1)return i;for(var s=1;s<arguments.length;++s){var h=E(arguments[s]),f=d(h),v=x&&(Object.getOwnPropertySymbols||r);if(v)for(var c=v(h),T=0;T<c.length;++T){var l=c[T];t(h,l)&&e(f,l)}for(var _=0;_<f.length;++_){var w=f[_];if(t(h,w)){var A=h[w];i[w]=A}}}return i}}}),JO=He({"node_modules/object.assign/polyfill.js"(Z,V){"use strict";var d=KO(),x=function(){if(!Object.assign)return!1;for(var E="abcdefghijklmnopqrst",e=E.split(""),t={},r=0;r<e.length;++r)t[e[r]]=e[r];var o=Object.assign({},t),a="";for(var n in o)a+=n;return E!==a},S=function(){if(!Object.assign||!Object.preventExtensions)return!1;var E=Object.preventExtensions({1:2});try{Object.assign(E,"xy")}catch{return E[1]==="y"}return!1};V.exports=function(){return!Object.assign||x()||S()?d:Object.assign}}}),rM=He({"node_modules/object-is/implementation.js"(Z,V){"use strict";var d=function(x){return x!==x};V.exports=function(S,E){return S===0&&E===0?1/S===1/E:!!(S===E||d(S)&&d(E))}}}),g3=He({"node_modules/object-is/polyfill.js"(Z,V){"use strict";var d=rM();V.exports=function(){return typeof Object.is=="function"?Object.is:d}}}),Y_=He({"node_modules/define-properties/index.js"(Z,V){"use strict";var d=tM(),x=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",S=Object.prototype.toString,E=Array.prototype.concat,e=Object.defineProperty,t=function(i){return typeof i=="function"&&S.call(i)==="[object Function]"},r=jS()(),o=e&&r,a=function(i,s,h,f){if(s in i){if(f===!0){if(i[s]===h)return}else if(!t(f)||!f())return}o?e(i,s,{configurable:!0,enumerable:!1,value:h,writable:!0}):i[s]=h},n=function(i,s){var h=arguments.length>2?arguments[2]:{},f=d(s);x&&(f=E.call(f,Object.getOwnPropertySymbols(s)));for(var v=0;v<f.length;v+=1)a(i,f[v],s[f[v]],h[f[v]])};n.supportsDescriptors=!!o,V.exports=n}}),$O=He({"node_modules/object-is/shim.js"(Z,V){"use strict";var d=g3(),x=Y_();V.exports=function(){var E=d();return x(Object,{is:E},{is:function(){return Object.is!==E}}),E}}}),QO=He({"node_modules/object-is/index.js"(Z,V){"use strict";var d=Y_(),x=Z_(),S=rM(),E=g3(),e=$O(),t=x(E(),Object);d(t,{getPolyfill:E,implementation:S,shim:e}),V.exports=t}}),aM=He({"node_modules/is-nan/implementation.js"(Z,V){"use strict";V.exports=function(x){return x!==x}}}),iM=He({"node_modules/is-nan/polyfill.js"(Z,V){"use strict";var d=aM();V.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:d}}}),eB=He({"node_modules/is-nan/shim.js"(Z,V){"use strict";var d=Y_(),x=iM();V.exports=function(){var E=x();return d(Number,{isNaN:E},{isNaN:function(){return Number.isNaN!==E}}),E}}}),tB=He({"node_modules/is-nan/index.js"(Z,V){"use strict";var d=Z_(),x=Y_(),S=aM(),E=iM(),e=eB(),t=d(E(),Number);x(t,{getPolyfill:E,implementation:S,shim:e}),V.exports=t}}),rB=He({"node_modules/assert/build/internal/util/comparisons.js"(Z,V){"use strict";function d(he,ue){return t(he)||e(he,ue)||S(he,ue)||x()}function x(){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 S(he,ue){if(he){if(typeof he=="string")return E(he,ue);var ne=Object.prototype.toString.call(he).slice(8,-1);if(ne==="Object"&&he.constructor&&(ne=he.constructor.name),ne==="Map"||ne==="Set")return Array.from(he);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return E(he,ue)}}function E(he,ue){(ue==null||ue>he.length)&&(ue=he.length);for(var ne=0,Ce=new Array(ue);ne<ue;ne++)Ce[ne]=he[ne];return Ce}function e(he,ue){var ne=he==null?null:typeof Symbol<"u"&&he[Symbol.iterator]||he["@@iterator"];if(ne!=null){var Ce,Ye,rt,Ke,Mt=[],kt=!0,Nt=!1;try{if(rt=(ne=ne.call(he)).next,ue===0){if(Object(ne)!==ne)return;kt=!1}else for(;!(kt=(Ce=rt.call(ne)).done)&&(Mt.push(Ce.value),Mt.length!==ue);kt=!0);}catch(Gt){Nt=!0,Ye=Gt}finally{try{if(!kt&&ne.return!=null&&(Ke=ne.return(),Object(Ke)!==Ke))return}finally{if(Nt)throw Ye}}return Mt}}function t(he){if(Array.isArray(he))return he}function r(he){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},r(he)}var o=/a/g.flags!==void 0,a=function(ue){var ne=[];return ue.forEach(function(Ce){return ne.push(Ce)}),ne},n=function(ue){var ne=[];return ue.forEach(function(Ce,Ye){return ne.push([Ye,Ce])}),ne},i=Object.is?Object.is:QO(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},h=Number.isNaN?Number.isNaN:tB();function f(he){return he.call.bind(he)}var v=f(Object.prototype.hasOwnProperty),c=f(Object.prototype.propertyIsEnumerable),T=f(Object.prototype.toString),l=_1().types,_=l.isAnyArrayBuffer,w=l.isArrayBufferView,A=l.isDate,M=l.isMap,g=l.isRegExp,b=l.isSet,p=l.isNativeError,u=l.isBoxedPrimitive,y=l.isNumberObject,m=l.isStringObject,R=l.isBooleanObject,L=l.isBigIntObject,z=l.isSymbolObject,F=l.isFloat32Array,N=l.isFloat64Array;function O(he){if(he.length===0||he.length>10)return!0;for(var ue=0;ue<he.length;ue++){var ne=he.charCodeAt(ue);if(ne<48||ne>57)return!0}return he.length===10&&he>=Math.pow(2,32)}function P(he){return Object.keys(he).filter(O).concat(s(he).filter(Object.prototype.propertyIsEnumerable.bind(he)))}function U(he,ue){if(he===ue)return 0;for(var ne=he.length,Ce=ue.length,Ye=0,rt=Math.min(ne,Ce);Ye<rt;++Ye)if(he[Ye]!==ue[Ye]){ne=he[Ye],Ce=ue[Ye];break}return ne<Ce?-1:Ce<ne?1:0}var B=void 0,X=!0,$=!1,le=0,ce=1,de=2,G=3;function Y(he,ue){return o?he.source===ue.source&&he.flags===ue.flags:RegExp.prototype.toString.call(he)===RegExp.prototype.toString.call(ue)}function ee(he,ue){if(he.byteLength!==ue.byteLength)return!1;for(var ne=0;ne<he.byteLength;ne++)if(he[ne]!==ue[ne])return!1;return!0}function q(he,ue){return he.byteLength!==ue.byteLength?!1:U(new Uint8Array(he.buffer,he.byteOffset,he.byteLength),new Uint8Array(ue.buffer,ue.byteOffset,ue.byteLength))===0}function se(he,ue){return he.byteLength===ue.byteLength&&U(new Uint8Array(he),new Uint8Array(ue))===0}function ae(he,ue){return y(he)?y(ue)&&i(Number.prototype.valueOf.call(he),Number.prototype.valueOf.call(ue)):m(he)?m(ue)&&String.prototype.valueOf.call(he)===String.prototype.valueOf.call(ue):R(he)?R(ue)&&Boolean.prototype.valueOf.call(he)===Boolean.prototype.valueOf.call(ue):L(he)?L(ue)&&BigInt.prototype.valueOf.call(he)===BigInt.prototype.valueOf.call(ue):z(ue)&&Symbol.prototype.valueOf.call(he)===Symbol.prototype.valueOf.call(ue)}function j(he,ue,ne,Ce){if(he===ue)return he!==0?!0:ne?i(he,ue):!0;if(ne){if(r(he)!=="object")return typeof he=="number"&&h(he)&&h(ue);if(r(ue)!=="object"||he===null||ue===null||Object.getPrototypeOf(he)!==Object.getPrototypeOf(ue))return!1}else{if(he===null||r(he)!=="object")return ue===null||r(ue)!=="object"?he==ue:!1;if(ue===null||r(ue)!=="object")return!1}var Ye=T(he),rt=T(ue);if(Ye!==rt)return!1;if(Array.isArray(he)){if(he.length!==ue.length)return!1;var Ke=P(he,B),Mt=P(ue,B);return Ke.length!==Mt.length?!1:re(he,ue,ne,Ce,ce,Ke)}if(Ye==="[object Object]"&&(!M(he)&&M(ue)||!b(he)&&b(ue)))return!1;if(A(he)){if(!A(ue)||Date.prototype.getTime.call(he)!==Date.prototype.getTime.call(ue))return!1}else if(g(he)){if(!g(ue)||!Y(he,ue))return!1}else if(p(he)||he instanceof Error){if(he.message!==ue.message||he.name!==ue.name)return!1}else if(w(he)){if(!ne&&(F(he)||N(he))){if(!ee(he,ue))return!1}else if(!q(he,ue))return!1;var kt=P(he,B),Nt=P(ue,B);return kt.length!==Nt.length?!1:re(he,ue,ne,Ce,le,kt)}else{if(b(he))return!b(ue)||he.size!==ue.size?!1:re(he,ue,ne,Ce,de);if(M(he))return!M(ue)||he.size!==ue.size?!1:re(he,ue,ne,Ce,G);if(_(he)){if(!se(he,ue))return!1}else if(u(he)&&!ae(he,ue))return!1}return re(he,ue,ne,Ce,le)}function Q(he,ue){return ue.filter(function(ne){return c(he,ne)})}function re(he,ue,ne,Ce,Ye,rt){if(arguments.length===5){rt=Object.keys(he);var Ke=Object.keys(ue);if(rt.length!==Ke.length)return!1}for(var Mt=0;Mt<rt.length;Mt++)if(!v(ue,rt[Mt]))return!1;if(ne&&arguments.length===5){var kt=s(he);if(kt.length!==0){var Nt=0;for(Mt=0;Mt<kt.length;Mt++){var Gt=kt[Mt];if(c(he,Gt)){if(!c(ue,Gt))return!1;rt.push(Gt),Nt++}else if(c(ue,Gt))return!1}var Mr=s(ue);if(kt.length!==Mr.length&&Q(ue,Mr).length!==Nt)return!1}else{var mr=s(ue);if(mr.length!==0&&Q(ue,mr).length!==0)return!1}}if(rt.length===0&&(Ye===le||Ye===ce&&he.length===0||he.size===0))return!0;if(Ce===void 0)Ce={val1:new Map,val2:new Map,position:0};else{var qr=Ce.val1.get(he);if(qr!==void 0){var Er=Ce.val2.get(ue);if(Er!==void 0)return qr===Er}Ce.position++}Ce.val1.set(he,Ce.position),Ce.val2.set(ue,Ce.position);var Ir=nt(he,ue,ne,rt,Ce,Ye);return Ce.val1.delete(he),Ce.val2.delete(ue),Ir}function pe(he,ue,ne,Ce){for(var Ye=a(he),rt=0;rt<Ye.length;rt++){var Ke=Ye[rt];if(j(ue,Ke,ne,Ce))return he.delete(Ke),!0}return!1}function we(he){switch(r(he)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":he=+he;case"number":if(h(he))return!1}return!0}function Se(he,ue,ne){var Ce=we(ne);return Ce??(ue.has(Ce)&&!he.has(Ce))}function Ie(he,ue,ne,Ce,Ye){var rt=we(ne);if(rt!=null)return rt;var Ke=ue.get(rt);return Ke===void 0&&!ue.has(rt)||!j(Ce,Ke,!1,Ye)?!1:!he.has(rt)&&j(Ce,Ke,!1,Ye)}function Re(he,ue,ne,Ce){for(var Ye=null,rt=a(he),Ke=0;Ke<rt.length;Ke++){var Mt=rt[Ke];if(r(Mt)==="object"&&Mt!==null)Ye===null&&(Ye=new Set),Ye.add(Mt);else if(!ue.has(Mt)){if(ne||!Se(he,ue,Mt))return!1;Ye===null&&(Ye=new Set),Ye.add(Mt)}}if(Ye!==null){for(var kt=a(ue),Nt=0;Nt<kt.length;Nt++){var Gt=kt[Nt];if(r(Gt)==="object"&&Gt!==null){if(!pe(Ye,Gt,ne,Ce))return!1}else if(!ne&&!he.has(Gt)&&!pe(Ye,Gt,ne,Ce))return!1}return Ye.size===0}return!0}function We(he,ue,ne,Ce,Ye,rt){for(var Ke=a(he),Mt=0;Mt<Ke.length;Mt++){var kt=Ke[Mt];if(j(ne,kt,Ye,rt)&&j(Ce,ue.get(kt),Ye,rt))return he.delete(kt),!0}return!1}function at(he,ue,ne,Ce){for(var Ye=null,rt=n(he),Ke=0;Ke<rt.length;Ke++){var Mt=d(rt[Ke],2),kt=Mt[0],Nt=Mt[1];if(r(kt)==="object"&&kt!==null)Ye===null&&(Ye=new Set),Ye.add(kt);else{var Gt=ue.get(kt);if(Gt===void 0&&!ue.has(kt)||!j(Nt,Gt,ne,Ce)){if(ne||!Ie(he,ue,kt,Nt,Ce))return!1;Ye===null&&(Ye=new Set),Ye.add(kt)}}}if(Ye!==null){for(var Mr=n(ue),mr=0;mr<Mr.length;mr++){var qr=d(Mr[mr],2),Er=qr[0],Ir=qr[1];if(r(Er)==="object"&&Er!==null){if(!We(Ye,he,Er,Ir,ne,Ce))return!1}else if(!ne&&(!he.has(Er)||!j(he.get(Er),Ir,!1,Ce))&&!We(Ye,he,Er,Ir,!1,Ce))return!1}return Ye.size===0}return!0}function nt(he,ue,ne,Ce,Ye,rt){var Ke=0;if(rt===de){if(!Re(he,ue,ne,Ye))return!1}else if(rt===G){if(!at(he,ue,ne,Ye))return!1}else if(rt===ce)for(;Ke<he.length;Ke++)if(v(he,Ke)){if(!v(ue,Ke)||!j(he[Ke],ue[Ke],ne,Ye))return!1}else{if(v(ue,Ke))return!1;for(var Mt=Object.keys(he);Ke<Mt.length;Ke++){var kt=Mt[Ke];if(!v(ue,kt)||!j(he[kt],ue[kt],ne,Ye))return!1}return Mt.length===Object.keys(ue).length}for(Ke=0;Ke<Ce.length;Ke++){var Nt=Ce[Ke];if(!j(he[Nt],ue[Nt],ne,Ye))return!1}return!0}function tt(he,ue){return j(he,ue,$)}function qe(he,ue){return j(he,ue,X)}V.exports={isDeepEqual:tt,isDeepStrictEqual:qe}}}),K_=He({"node_modules/assert/build/assert.js"(Z,V){"use strict";function d(Y){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},d(Y)}function x(Y,ee){for(var q=0;q<ee.length;q++){var se=ee[q];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(Y,E(se.key),se)}}function S(Y,ee,q){return ee&&x(Y.prototype,ee),q&&x(Y,q),Object.defineProperty(Y,"prototype",{writable:!1}),Y}function E(Y){var ee=e(Y,"string");return d(ee)==="symbol"?ee:String(ee)}function e(Y,ee){if(d(Y)!=="object"||Y===null)return Y;var q=Y[Symbol.toPrimitive];if(q!==void 0){var se=q.call(Y,ee||"default");if(d(se)!=="object")return se;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ee==="string"?String:Number)(Y)}function t(Y,ee){if(!(Y instanceof ee))throw new TypeError("Cannot call a class as a function")}var r=QS(),o=r.codes,a=o.ERR_AMBIGUOUS_ARGUMENT,n=o.ERR_INVALID_ARG_TYPE,i=o.ERR_INVALID_ARG_VALUE,s=o.ERR_INVALID_RETURN_VALUE,h=o.ERR_MISSING_ARGS,f=ZO(),v=_1(),c=v.inspect,T=_1().types,l=T.isPromise,_=T.isRegExp,w=JO()(),A=g3()(),M=y1()("RegExp.prototype.test"),g,b;function p(){var Y=rB();g=Y.isDeepEqual,b=Y.isDeepStrictEqual}var u=!1,y=V.exports=F,m={};function R(Y){throw Y.message instanceof Error?Y.message:new f(Y)}function L(Y,ee,q,se,ae){var j=arguments.length,Q;if(j===0)Q="Failed";else if(j===1)q=Y,Y=void 0;else{if(u===!1){u=!0;var re=process.emitWarning?process.emitWarning:console.warn.bind(console);re("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}j===2&&(se="!=")}if(q instanceof Error)throw q;var pe={actual:Y,expected:ee,operator:se===void 0?"fail":se,stackStartFn:ae||L};q!==void 0&&(pe.message=q);var we=new f(pe);throw Q&&(we.message=Q,we.generatedMessage=!0),we}y.fail=L,y.AssertionError=f;function z(Y,ee,q,se){if(!q){var ae=!1;if(ee===0)ae=!0,se="No value argument passed to `assert.ok()`";else if(se instanceof Error)throw se;var j=new f({actual:q,expected:!0,message:se,operator:"==",stackStartFn:Y});throw j.generatedMessage=ae,j}}function F(){for(var Y=arguments.length,ee=new Array(Y),q=0;q<Y;q++)ee[q]=arguments[q];z.apply(void 0,[F,ee.length].concat(ee))}y.ok=F,y.equal=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");ee!=q&&R({actual:ee,expected:q,message:se,operator:"==",stackStartFn:Y})},y.notEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");ee==q&&R({actual:ee,expected:q,message:se,operator:"!=",stackStartFn:Y})},y.deepEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");g===void 0&&p(),g(ee,q)||R({actual:ee,expected:q,message:se,operator:"deepEqual",stackStartFn:Y})},y.notDeepEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");g===void 0&&p(),g(ee,q)&&R({actual:ee,expected:q,message:se,operator:"notDeepEqual",stackStartFn:Y})},y.deepStrictEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");g===void 0&&p(),b(ee,q)||R({actual:ee,expected:q,message:se,operator:"deepStrictEqual",stackStartFn:Y})},y.notDeepStrictEqual=N;function N(Y,ee,q){if(arguments.length<2)throw new h("actual","expected");g===void 0&&p(),b(Y,ee)&&R({actual:Y,expected:ee,message:q,operator:"notDeepStrictEqual",stackStartFn:N})}y.strictEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");A(ee,q)||R({actual:ee,expected:q,message:se,operator:"strictEqual",stackStartFn:Y})},y.notStrictEqual=function Y(ee,q,se){if(arguments.length<2)throw new h("actual","expected");A(ee,q)&&R({actual:ee,expected:q,message:se,operator:"notStrictEqual",stackStartFn:Y})};var O=S(function Y(ee,q,se){var ae=this;t(this,Y),q.forEach(function(j){j in ee&&(se!==void 0&&typeof se[j]=="string"&&_(ee[j])&&M(ee[j],se[j])?ae[j]=se[j]:ae[j]=ee[j])})});function P(Y,ee,q,se,ae,j){if(!(q in Y)||!b(Y[q],ee[q])){if(!se){var Q=new O(Y,ae),re=new O(ee,ae,Y),pe=new f({actual:Q,expected:re,operator:"deepStrictEqual",stackStartFn:j});throw pe.actual=Y,pe.expected=ee,pe.operator=j.name,pe}R({actual:Y,expected:ee,message:se,operator:j.name,stackStartFn:j})}}function U(Y,ee,q,se){if(typeof ee!="function"){if(_(ee))return M(ee,Y);if(arguments.length===2)throw new n("expected",["Function","RegExp"],ee);if(d(Y)!=="object"||Y===null){var ae=new f({actual:Y,expected:ee,message:q,operator:"deepStrictEqual",stackStartFn:se});throw ae.operator=se.name,ae}var j=Object.keys(ee);if(ee instanceof Error)j.push("name","message");else if(j.length===0)throw new i("error",ee,"may not be an empty object");return g===void 0&&p(),j.forEach(function(Q){typeof Y[Q]=="string"&&_(ee[Q])&&M(ee[Q],Y[Q])||P(Y,ee,Q,q,j,se)}),!0}return ee.prototype!==void 0&&Y instanceof ee?!0:Error.isPrototypeOf(ee)?!1:ee.call({},Y)===!0}function B(Y){if(typeof Y!="function")throw new n("fn","Function",Y);try{Y()}catch(ee){return ee}return m}function X(Y){return l(Y)||Y!==null&&d(Y)==="object"&&typeof Y.then=="function"&&typeof Y.catch=="function"}function $(Y){return Promise.resolve().then(function(){var ee;if(typeof Y=="function"){if(ee=Y(),!X(ee))throw new s("instance of Promise","promiseFn",ee)}else if(X(Y))ee=Y;else throw new n("promiseFn",["Function","Promise"],Y);return Promise.resolve().then(function(){return ee}).then(function(){return m}).catch(function(q){return q})})}function le(Y,ee,q,se){if(typeof q=="string"){if(arguments.length===4)throw new n("error",["Object","Error","Function","RegExp"],q);if(d(ee)==="object"&&ee!==null){if(ee.message===q)throw new a("error/message",'The error message "'.concat(ee.message,'" is identical to the message.'))}else if(ee===q)throw new a("error/message",'The error "'.concat(ee,'" is identical to the message.'));se=q,q=void 0}else if(q!=null&&d(q)!=="object"&&typeof q!="function")throw new n("error",["Object","Error","Function","RegExp"],q);if(ee===m){var ae="";q&&q.name&&(ae+=" (".concat(q.name,")")),ae+=se?": ".concat(se):".";var j=Y.name==="rejects"?"rejection":"exception";R({actual:void 0,expected:q,operator:Y.name,message:"Missing expected ".concat(j).concat(ae),stackStartFn:Y})}if(q&&!U(ee,q,se,Y))throw ee}function ce(Y,ee,q,se){if(ee!==m){if(typeof q=="string"&&(se=q,q=void 0),!q||U(ee,q)){var ae=se?": ".concat(se):".",j=Y.name==="doesNotReject"?"rejection":"exception";R({actual:ee,expected:q,operator:Y.name,message:"Got unwanted ".concat(j).concat(ae,`
`)+'Actual message: "'.concat(ee&&ee.message,'"'),stackStartFn:Y})}throw ee}}y.throws=function Y(ee){for(var q=arguments.length,se=new Array(q>1?q-1:0),ae=1;ae<q;ae++)se[ae-1]=arguments[ae];le.apply(void 0,[Y,B(ee)].concat(se))},y.rejects=function Y(ee){for(var q=arguments.length,se=new Array(q>1?q-1:0),ae=1;ae<q;ae++)se[ae-1]=arguments[ae];return $(ee).then(function(j){return le.apply(void 0,[Y,j].concat(se))})},y.doesNotThrow=function Y(ee){for(var q=arguments.length,se=new Array(q>1?q-1:0),ae=1;ae<q;ae++)se[ae-1]=arguments[ae];ce.apply(void 0,[Y,B(ee)].concat(se))},y.doesNotReject=function Y(ee){for(var q=arguments.length,se=new Array(q>1?q-1:0),ae=1;ae<q;ae++)se[ae-1]=arguments[ae];return $(ee).then(function(j){return ce.apply(void 0,[Y,j].concat(se))})},y.ifError=function Y(ee){if(ee!=null){var q="ifError got unwanted exception: ";d(ee)==="object"&&typeof ee.message=="string"?ee.message.length===0&&ee.constructor?q+=ee.constructor.name:q+=ee.message:q+=c(ee);var se=new f({actual:ee,expected:null,operator:"ifError",message:q,stackStartFn:Y}),ae=ee.stack;if(typeof ae=="string"){var j=ae.split(`
`);j.shift();for(var Q=se.stack.split(`
`),re=0;re<j.length;re++){var pe=Q.indexOf(j[re]);if(pe!==-1){Q=Q.slice(0,pe);break}}se.stack="".concat(Q.join(`
`),`
`).concat(j.join(`
`))}throw se}};function de(Y,ee,q,se,ae){if(!_(ee))throw new n("regexp","RegExp",ee);var j=ae==="match";if(typeof Y!="string"||M(ee,Y)!==j){if(q instanceof Error)throw q;var Q=!q;q=q||(typeof Y!="string"?'The "string" argument must be of type string. Received type '+"".concat(d(Y)," (").concat(c(Y),")"):(j?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(c(ee),`. Input:
`).concat(c(Y),`
`));var re=new f({actual:Y,expected:ee,message:q,operator:ae,stackStartFn:se});throw re.generatedMessage=Q,re}}y.match=function Y(ee,q,se){de(ee,q,se,Y,"match")},y.doesNotMatch=function Y(ee,q,se){de(ee,q,se,Y,"doesNotMatch")};function G(){for(var Y=arguments.length,ee=new Array(Y),q=0;q<Y;q++)ee[q]=arguments[q];z.apply(void 0,[G,ee.length].concat(ee))}y.strict=w(G,y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict}}),aB=He({"node_modules/stream-parser/node_modules/ms/index.js"(Z,V){var d=1e3,x=d*60,S=x*60,E=S*24,e=E*365.25;V.exports=function(n,i){i=i||{};var s=typeof n;if(s==="string"&&n.length>0)return t(n);if(s==="number"&&isNaN(n)===!1)return i.long?o(n):r(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function t(n){if(n=String(n),!(n.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(i){var s=parseFloat(i[1]),h=(i[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return s*e;case"days":case"day":case"d":return s*E;case"hours":case"hour":case"hrs":case"hr":case"h":return s*S;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(n){return n>=E?Math.round(n/E)+"d":n>=S?Math.round(n/S)+"h":n>=x?Math.round(n/x)+"m":n>=d?Math.round(n/d)+"s":n+"ms"}function o(n){return a(n,E,"day")||a(n,S,"hour")||a(n,x,"minute")||a(n,d,"second")||n+" ms"}function a(n,i,s){if(!(n<i))return n<i*1.5?Math.floor(n/i)+" "+s:Math.ceil(n/i)+" "+s+"s"}}}),iB=He({"node_modules/stream-parser/node_modules/debug/src/debug.js"(Z,V){Z=V.exports=S.debug=S.default=S,Z.coerce=r,Z.disable=e,Z.enable=E,Z.enabled=t,Z.humanize=aB(),Z.names=[],Z.skips=[],Z.formatters={};var d;function x(o){var a=0,n;for(n in o)a=(a<<5)-a+o.charCodeAt(n),a|=0;return Z.colors[Math.abs(a)%Z.colors.length]}function S(o){function a(){if(a.enabled){var n=a,i=+new Date,s=i-(d||i);n.diff=s,n.prev=d,n.curr=i,d=i;for(var h=new Array(arguments.length),f=0;f<h.length;f++)h[f]=arguments[f];h[0]=Z.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");var v=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,function(T,l){if(T==="%%")return T;v++;var _=Z.formatters[l];if(typeof _=="function"){var w=h[v];T=_.call(n,w),h.splice(v,1),v--}return T}),Z.formatArgs.call(n,h);var c=a.log||Z.log||console.log.bind(console);c.apply(n,h)}}return a.namespace=o,a.enabled=Z.enabled(o),a.useColors=Z.useColors(),a.color=x(o),typeof Z.init=="function"&&Z.init(a),a}function E(o){Z.save(o),Z.names=[],Z.skips=[];for(var a=(typeof o=="string"?o:"").split(/[\s,]+/),n=a.length,i=0;i<n;i++)a[i]&&(o=a[i].replace(/\*/g,".*?"),o[0]==="-"?Z.skips.push(new RegExp("^"+o.substr(1)+"$")):Z.names.push(new RegExp("^"+o+"$")))}function e(){Z.enable("")}function t(o){var a,n;for(a=0,n=Z.skips.length;a<n;a++)if(Z.skips[a].test(o))return!1;for(a=0,n=Z.names.length;a<n;a++)if(Z.names[a].test(o))return!0;return!1}function r(o){return o instanceof Error?o.stack||o.message:o}}}),nB=He({"node_modules/stream-parser/node_modules/debug/src/browser.js"(Z,V){Z=V.exports=iB(),Z.log=S,Z.formatArgs=x,Z.save=E,Z.load=e,Z.useColors=d,Z.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:t(),Z.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function d(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Z.formatters.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};function x(r){var o=this.useColors;if(r[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+r[0]+(o?"%c ":" ")+"+"+Z.humanize(this.diff),!!o){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(i=n))}),r.splice(i,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function E(r){try{r==null?Z.storage.removeItem("debug"):Z.storage.debug=r}catch{}}function e(){var r;try{r=Z.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}Z.enable(e());function t(){try{return window.localStorage}catch{}}}}),oB=He({"node_modules/stream-parser/index.js"(Z,V){var d=K_(),x=nB()("stream-parser");V.exports=r;var S=-1,E=0,e=1,t=2;function r(l){var _=l&&typeof l._transform=="function",w=l&&typeof l._write=="function";if(!_&&!w)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),l._bytes=a,l._skipBytes=n,_&&(l._passthrough=i),_?l._transform=h:l._write=s}function o(l){x("initializing parser stream"),l._parserBytesLeft=0,l._parserBuffers=[],l._parserBuffered=0,l._parserState=S,l._parserCallback=null,typeof l.push=="function"&&(l._parserOutput=l.push.bind(l)),l._parserInit=!0}function a(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(isFinite(l)&&l>0,'can only buffer a finite number of bytes > 0, got "'+l+'"'),this._parserInit||o(this),x("buffering %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=E}function n(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(l>0,'can only skip > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("skipping %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=e}function i(l,_){d(!this._parserCallback,'There is already a "callback" set!'),d(l>0,'can only pass through > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("passing through %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=t}function s(l,_,w){this._parserInit||o(this),x("write(%o bytes)",l.length),typeof _=="function"&&(w=_),c(this,l,null,w)}function h(l,_,w){this._parserInit||o(this),x("transform(%o bytes)",l.length),typeof _!="function"&&(_=this._parserOutput),c(this,l,_,w)}function f(l,_,w,A){return l._parserBytesLeft<=0?A(new Error("got data but not currently parsing anything")):_.length<=l._parserBytesLeft?function(){return v(l,_,w,A)}:function(){var M=_.slice(0,l._parserBytesLeft);return v(l,M,w,function(g){if(g)return A(g);if(_.length>M.length)return function(){return f(l,_.slice(M.length),w,A)}})}}function v(l,_,w,A){if(l._parserBytesLeft-=_.length,x("%o bytes left for stream piece",l._parserBytesLeft),l._parserState===E?(l._parserBuffers.push(_),l._parserBuffered+=_.length):l._parserState===t&&w(_),l._parserBytesLeft===0){var M=l._parserCallback;if(M&&l._parserState===E&&l._parserBuffers.length>1&&(_=Buffer.concat(l._parserBuffers,l._parserBuffered)),l._parserState!==E&&(_=null),l._parserCallback=null,l._parserBuffered=0,l._parserState=S,l._parserBuffers.splice(0),M){var g=[];_&&g.push(_),w&&g.push(w);var b=M.length>g.length;b&&g.push(T(A));var p=M.apply(l,g);if(!b||A===p)return A}}else return A}var c=T(f);function T(l){return function(){for(var _=l.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),ac=He({"node_modules/probe-image-size/lib/common.js"(Z){"use strict";var V=XO().Transform,d=oB();function x(){V.call(this,{readableObjectMode:!0})}x.prototype=Object.create(V.prototype),x.prototype.constructor=x,d(x.prototype),Z.ParserStream=x,Z.sliceEq=function(E,e,t){for(var r=e,o=0;o<t.length;)if(E[r++]!==t[o++])return!1;return!0},Z.str2arr=function(E,e){var t=[],r=0;if(e&&e==="hex")for(;r<E.length;)t.push(parseInt(E.slice(r,r+2),16)),r+=2;else for(;r<E.length;r++)t.push(E.charCodeAt(r)&255);return t},Z.readUInt16LE=function(E,e){return E[e]|E[e+1]<<8},Z.readUInt16BE=function(E,e){return E[e+1]|E[e]<<8},Z.readUInt32LE=function(E,e){return E[e]|E[e+1]<<8|E[e+2]<<16|E[e+3]*16777216},Z.readUInt32BE=function(E,e){return E[e+3]|E[e+2]<<8|E[e+1]<<16|E[e]*16777216};function S(E,e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=E,e&&(this.code=e),t&&(this.statusCode=t)}S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,Z.ProbeError=S}}),sB=He({"node_modules/probe-image-size/lib/miaf_utils.js"(Z,V){"use strict";var d=ac().readUInt16BE,x=ac().readUInt32BE;function S(i,s){if(i.length<4+s)return null;var h=x(i,s);return i.length<h+s||h<8?null:{boxtype:String.fromCharCode.apply(null,i.slice(s+4,s+8)),data:i.slice(s+8,s+h),end:s+h}}V.exports.unbox=S;function E(i,s){for(var h=0;;){var f=S(i,h);if(!f)break;switch(f.boxtype){case"ispe":s.sizes.push({width:x(f.data,4),height:x(f.data,8)});break;case"irot":s.transforms.push({type:"irot",value:f.data[0]&3});break;case"imir":s.transforms.push({type:"imir",value:f.data[0]&1});break}h=f.end}}function e(i,s,h){for(var f=0,v=0;v<h;v++)f=f*256+(i[s+v]||0);return f}function t(i,s){for(var h=i[4]>>4&15,f=i[4]&15,v=i[5]>>4&15,c=d(i,6),T=8,l=0;l<c;l++){var _=d(i,T);T+=2;var w=d(i,T);T+=2;var A=e(i,T,v);T+=v;var M=d(i,T);if(T+=2,w===0&&M===1){var g=e(i,T,h),b=e(i,T+h,f);s.item_loc[_]={length:b,offset:g+A}}T+=M*(h+f)}}function r(i,s){for(var h=d(i,4),f=6,v=0;v<h;v++){var c=S(i,f);if(!c)break;if(c.boxtype==="infe"){for(var T=d(c.data,4),l="",_=8;_<c.data.length&&c.data[_];_++)l+=String.fromCharCode(c.data[_]);s.item_inf[l]=T}f=c.end}}function o(i,s){for(var h=0;;){var f=S(i,h);if(!f)break;f.boxtype==="ipco"&&E(f.data,s),h=f.end}}function a(i,s){for(var h=4;;){var f=S(i,h);if(!f)break;f.boxtype==="iprp"&&o(f.data,s),f.boxtype==="iloc"&&t(f.data,s),f.boxtype==="iinf"&&r(f.data,s),h=f.end}}function n(i){var s=i.reduce(function(v,c){return v.width>c.width||v.width===c.width&&v.height>c.height?v:c}),h=i.reduce(function(v,c){return v.height>c.height||v.height===c.height&&v.width>c.width?v:c}),f;return s.width>h.height||s.width===h.height&&s.height>h.width?f=s:f=h,f}V.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(a(i,s),!!s.sizes.length){var h=n(s.sizes),f=1;s.transforms.forEach(function(c){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},l={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(c.type==="imir"&&(c.value===0?f=l[f]:(f=l[f],f=T[f],f=T[f])),c.type==="irot")for(var _=0;_<c.value;_++)f=T[f]});var v=null;return s.item_inf.Exif&&(v=s.item_loc[s.item_inf.Exif]),{width:h.width,height:h.height,orientation:s.transforms.length?f:null,variants:s.sizes,exif_location:v}}},V.exports.getMimeType=function(i){var s=String.fromCharCode.apply(null,i.slice(0,4)),h={};h[s]=!0;for(var f=8;f<i.length;f+=4)h[String.fromCharCode.apply(null,i.slice(f,f+4))]=!0;if(!(!h.mif1&&!h.msf1&&!h.miaf))return s==="avif"||s==="avis"||s==="avio"?{type:"avif",mime:"image/avif"}:s==="heic"||s==="heix"?{type:"heic",mime:"image/heic"}:s==="hevc"||s==="hevx"?{type:"heic",mime:"image/heic-sequence"}:h.avif||h.avis?{type:"avif",mime:"image/avif"}:h.heic||h.heix||h.hevc||h.hevx||h.heis?h.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}}}),y3=He({"node_modules/probe-image-size/lib/exif_utils.js"(Z,V){"use strict";function d(E,e){var t=new Error(E);return t.code=e,t}function x(E){try{return decodeURIComponent(escape(E))}catch{return E}}function S(E,e,t){this.input=E.subarray(e,t),this.start=e;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw d("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}S.prototype.each=function(E){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var t=this.ifds_to_read.shift();t.offset&&this.scan_ifd(t.id,t.offset,E)}},S.prototype.read_uint16=function(E){var e=this.input;if(E+2>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[E]*256+e[E+1]:e[E]+e[E+1]*256},S.prototype.read_uint32=function(E){var e=this.input;if(E+4>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[E]*16777216+e[E+1]*65536+e[E+2]*256+e[E+3]:e[E]+e[E+1]*256+e[E+2]*65536+e[E+3]*16777216},S.prototype.is_subifd_link=function(E,e){return E===0&&e===34665||E===0&&e===34853||E===34665&&e===40965},S.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}},S.prototype.exif_format_read=function(E,e){var t;switch(E){case 1:case 2:return t=this.input[e],t;case 6:return t=this.input[e],t|(t&128)*33554430;case 3:return t=this.read_uint16(e),t;case 8:return t=this.read_uint16(e),t|(t&32768)*131070;case 4:return t=this.read_uint32(e),t;case 9:return t=this.read_uint32(e),t|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},S.prototype.scan_ifd=function(E,e,t){var r=this.read_uint16(e);e+=2;for(var o=0;o<r;o++){var a=this.read_uint16(e),n=this.read_uint16(e+2),i=this.read_uint32(e+4),s=this.exif_format_length(n),h=i*s,f=h<=4?e+8:this.read_uint32(e+8),v=!1;if(f+h>this.input.length)throw d("unexpected EOF","EBADDATA");for(var c=[],T=f,l=0;l<i;l++,T+=s){var _=this.exif_format_read(n,T);if(_===null){c=null;break}c.push(_)}Array.isArray(c)&&n===2&&(c=x(String.fromCharCode.apply(null,c)),c&&c[c.length-1]==="\0"&&(c=c.slice(0,-1))),this.is_subifd_link(E,a)&&Array.isArray(c)&&Number.isInteger(c[0])&&c[0]>0&&(this.ifds_to_read.push({id:a,offset:c[0]}),v=!0);var w={is_big_endian:this.big_endian,ifd:E,tag:a,format:n,count:i,entry_offset:e+this.start,data_length:h,data_offset:f+this.start,value:c,is_subifd_link:v};if(t(w)===!1){this.aborted=!0;return}e+=12}E===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},V.exports.ExifParser=S,V.exports.get_orientation=function(E){var e=0;try{return new S(E,0,E.length).each(function(t){if(t.ifd===0&&t.tag===274&&Array.isArray(t.value))return e=t.value[0],!1}),e}catch{return-1}}}}),lB=He({"node_modules/probe-image-size/lib/parse_sync/avif.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=sB(),e=y3(),t=d("ftyp");V.exports=function(r){if(x(r,4,t)){var o=E.unbox(r,0);if(o){var a=E.getMimeType(o.data);if(a){for(var n,i=o.end;;){var s=E.unbox(r,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var h=E.readSizeFromMeta(n);if(h){var f={width:h.width,height:h.height,type:a.type,mime:a.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(f.variants=h.variants),h.orientation&&(f.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=r.length){var v=S(r,h.exif_location.offset),c=r.slice(h.exif_location.offset+v+4,h.exif_location.offset+h.exif_location.length),T=e.get_orientation(c);T>0&&(f.orientation=T)}return f}}}}}}}}),uB=He({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=d("BM");V.exports=function(e){if(!(e.length<26)&&x(e,0,E))return{width:S(e,18),height:S(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),cB=He({"node_modules/probe-image-size/lib/parse_sync/gif.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=d("GIF87a"),e=d("GIF89a");V.exports=function(t){if(!(t.length<10)&&!(!x(t,0,E)&&!x(t,0,e)))return{width:S(t,6),height:S(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),fB=He({"node_modules/probe-image-size/lib/parse_sync/ico.js"(Z,V){"use strict";var d=ac().readUInt16LE,x=0,S=1,E=16;V.exports=function(e){var t=d(e,0),r=d(e,2),o=d(e,4);if(!(t!==x||r!==S||!o)){for(var a=[],n={width:0,height:0},i=0;i<o;i++){var s=e[6+E*i]||256,h=e[6+E*i+1]||256,f={width:s,height:h};a.push(f),(s>n.width||h>n.height)&&(n=f)}return{width:n.width,height:n.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),hB=He({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(Z,V){"use strict";var d=ac().readUInt16BE,x=ac().str2arr,S=ac().sliceEq,E=y3(),e=x("Exif\0\0");V.exports=function(t){if(!(t.length<2)&&!(t[0]!==255||t[1]!==216||t[2]!==255))for(var r=2;;){for(;;){if(t.length-r<2)return;if(t[r++]===255)break}for(var o=t[r++],a;o===255;)o=t[r++];if(208<=o&&o<=217||o===1)a=0;else if(192<=o&&o<=254){if(t.length-r<2)return;a=d(t,r)-2,r+=2}else return;if(o===217||o===218)return;var n;if(o===225&&a>=10&&S(t,r,e)&&(n=E.get_orientation(t.slice(r+6,r+a))),a>=5&&192<=o&&o<=207&&o!==196&&o!==200&&o!==204){if(t.length-r<a)return;var i={width:d(t,r+3),height:d(t,r+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return n>0&&(i.orientation=n),i}r+=a}}}}),pB=He({"node_modules/probe-image-size/lib/parse_sync/png.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=d(`\x89PNG\r

`),e=d("IHDR");V.exports=function(t){if(!(t.length<24)&&x(t,0,E)&&x(t,12,e))return{width:S(t,16),height:S(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),dB=He({"node_modules/probe-image-size/lib/parse_sync/psd.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=d("8BPS\0");V.exports=function(e){if(!(e.length<22)&&x(e,0,E))return{width:S(e,18),height:S(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),vB=He({"node_modules/probe-image-size/lib/parse_sync/svg.js"(Z,V){"use strict";function d(s){return s===32||s===9||s===13||s===10}function x(s){return typeof s=="number"&&isFinite(s)&&s>0}function S(s){var h=0,f=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(h=3);h<f&&d(s[h]);)h++;return h===f?!1:s[h]===60}var E=/<[-_.:a-zA-Z0-9][^>]*>/,e=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,a=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var h=s.match(t),f=s.match(r),v=s.match(o);return{width:h&&(h[1]||h[2]),height:f&&(f[1]||f[2]),viewbox:v&&(v[1]||v[2])}}function i(s){return a.test(s)?s.match(a)[0]:"px"}V.exports=function(s){if(S(s)){for(var h="",f=0;f<s.length;f++)h+=String.fromCharCode(s[f]);var v=(h.match(E)||[""])[0];if(e.test(v)){var c=n(v),T=parseFloat(c.width),l=parseFloat(c.height);if(c.width&&c.height)return!x(T)||!x(l)?void 0:{width:T,height:l,type:"svg",mime:"image/svg+xml",wUnits:i(c.width),hUnits:i(c.height)};var _=(c.viewbox||"").split(" "),w={width:_[2],height:_[3]},A=parseFloat(w.width),M=parseFloat(w.height);if(!(!x(A)||!x(M))&&i(w.width)===i(w.height)){var g=A/M;return c.width?x(T)?{width:T,height:T/g,type:"svg",mime:"image/svg+xml",wUnits:i(c.width),hUnits:i(c.width)}:void 0:c.height?x(l)?{width:l*g,height:l,type:"svg",mime:"image/svg+xml",wUnits:i(c.height),hUnits:i(c.height)}:void 0:{width:A,height:M,type:"svg",mime:"image/svg+xml",wUnits:i(w.width),hUnits:i(w.height)}}}}}}}),mB=He({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=ac().readUInt16BE,e=ac().readUInt32LE,t=ac().readUInt32BE,r=d("II*\0"),o=d("MM\0*");function a(s,h,f){return f?E(s,h):S(s,h)}function n(s,h,f){return f?t(s,h):e(s,h)}function i(s,h,f){var v=a(s,h+2,f),c=n(s,h+4,f);return c!==1||v!==3&&v!==4?null:v===3?a(s,h+8,f):n(s,h+8,f)}V.exports=function(s){if(!(s.length<8)&&!(!x(s,0,r)&&!x(s,0,o))){var h=s[0]===77,f=n(s,4,h)-8;if(!(f<0)){var v=f+8;if(!(s.length-v<2)){var c=a(s,v+0,h)*12;if(!(c<=0)&&(v+=2,!(s.length-v<c))){var T,l,_,w;for(T=0;T<c;T+=12)w=a(s,v+T,h),w===256?l=i(s,v+T,h):w===257&&(_=i(s,v+T,h));if(l&&_)return{width:l,height:_,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),gB=He({"node_modules/probe-image-size/lib/parse_sync/webp.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=ac().readUInt32LE,e=y3(),t=d("RIFF"),r=d("WEBP");function o(i,s){if(!(i[s+3]!==157||i[s+4]!==1||i[s+5]!==42))return{width:S(i,s+6)&16383,height:S(i,s+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function a(i,s){if(i[s]===47){var h=E(i,s+1);return{width:(h&16383)+1,height:(h>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<<s|i[s+8]<<8|i[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(i){if(!(i.length<16)&&!(!x(i,0,t)&&!x(i,8,r))){var s=12,h=null,f=0,v=E(i,4)+8;if(!(v>i.length)){for(;s+8<v;){if(i[s]===0){s++;continue}var c=String.fromCharCode.apply(null,i.slice(s,s+4)),T=E(i,s+4);c==="VP8 "&&T>=10?h=h||o(i,s+8):c==="VP8L"&&T>=9?h=h||a(i,s+8):c==="VP8X"&&T>=10?h=h||n(i,s+8):c==="EXIF"&&(f=e.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(h)return f>0&&(h.orientation=f),h}}}}}),yB=He({"node_modules/probe-image-size/lib/parsers_sync.js"(Z,V){"use strict";V.exports={avif:lB(),bmp:uB(),gif:cB(),ico:fB(),jpeg:hB(),png:pB(),psd:dB(),svg:vB(),tiff:mB(),webp:gB()}}}),_B=He({"node_modules/probe-image-size/sync.js"(Z,V){"use strict";var d=yB();function x(S){for(var E=Object.keys(d),e=0;e<E.length;e++){var t=d[E[e]](S);if(t)return t}return null}V.exports=function(E){return x(E)},V.exports.parsers=d}}),xB=He({"src/traces/image/helpers.js"(Z){"use strict";var V=_B(),d=Yv().IMAGE_URL_PREFIX,x=rg().Buffer;Z.getImageSize=function(S){var E=S.replace(d,""),e=new x(E,"base64");return V(e)}}}),bB=He({"src/traces/image/calc.js"(Z,V){"use strict";var d=sa(),x=v1(),S=as(),E=Ho(),e=sa().maxRowLength,t=xB().getImageSize;V.exports=function(i,s){var h,f;if(s._hasZ)h=s.z.length,f=e(s.z);else if(s._hasSource){var v=t(s.source);h=v.height,f=v.width}var c=E.getFromId(i,s.xaxis||"x"),T=E.getFromId(i,s.yaxis||"y"),l=c.d2c(s.x0)-s.dx/2,_=T.d2c(s.y0)-s.dy/2,w,A=[l,l+f*s.dx],M=[_,_+h*s.dy];if(c&&c.type==="log")for(w=0;w<f;w++)A.push(l+w*s.dx);if(T&&T.type==="log")for(w=0;w<h;w++)M.push(_+w*s.dy);s._extremes[c._id]=E.findExtremes(c,A),s._extremes[T._id]=E.findExtremes(T,M),s._scaler=a(s);var g={x0:l,y0:_,z:s.z,w:f,h};return[g]};function r(n,i,s,h){return function(f){return d.constrain((f-n)*i,s,h)}}function o(n,i){return function(s){return d.constrain(s,n,i)}}function a(n){var i=x.colormodel[n.colormodel],s=i.colormodel||n.colormodel,h=s.length;n._sArray=[];for(var f=0;f<h;f++)i.min[f]!==n.zmin[f]||i.max[f]!==n.zmax[f]?n._sArray.push(r(n.zmin[f],(i.max[f]-i.min[f])/(n.zmax[f]-n.zmin[f]),i.min[f],i.max[f])):n._sArray.push(o(i.min[f],i.max[f]));return function(v){for(var c=v.slice(0,h),T=0;T<h;T++){var l=c[T];if(!S(l))return!1;c[T]=n._sArray[T](l)}return c}}}}),wB=He({"src/traces/image/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=x.strTranslate,E=vd(),e=v1(),t=lS(),r=Q2().STYLE;V.exports=function(a,n,i,s){var h=n.xaxis,f=n.yaxis,v=!a._context._exportedPlot&&t();x.makeTraceGroups(s,i,"im").each(function(c){var T=d.select(this),l=c[0],_=l.trace,w=(_.zsmooth==="fast"||_.zsmooth===!1&&v)&&!_._hasZ&&_._hasSource&&h.type==="linear"&&f.type==="linear";_._realImage=w;var A=l.z,M=l.x0,g=l.y0,b=l.w,p=l.h,u=_.dx,y=_.dy,m,R,L,z,F,N;for(N=0;m===void 0&&N<b;)m=h.c2p(M+N*u),N++;for(N=b;R===void 0&&N>0;)R=h.c2p(M+N*u),N--;for(N=0;z===void 0&&N<p;)z=f.c2p(g+N*y),N++;for(N=p;F===void 0&&N>0;)F=f.c2p(g+N*y),N--;if(R<m&&(L=R,R=m,m=L),F<z&&(L=z,z=F,F=L),!w){var O=.5;m=Math.max(-O*h._length,m),R=Math.min((1+O)*h._length,R),z=Math.max(-O*f._length,z),F=Math.min((1+O)*f._length,F)}var P=Math.round(R-m),U=Math.round(F-z),B=P<=0||U<=0;if(B){var X=T.selectAll("image").data([]);X.exit().remove();return}function $(j){var Q=document.createElement("canvas");Q.width=P,Q.height=U;var re=Q.getContext("2d",{willReadFrequently:!0}),pe=function(ue){return x.constrain(Math.round(h.c2p(M+ue*u)-m),0,P)},we=function(ue){return x.constrain(Math.round(f.c2p(g+ue*y)-z),0,U)},Se=e.colormodel[_.colormodel],Ie=Se.colormodel||_.colormodel,Re=Se.fmt,We;for(N=0;N<l.w;N++){var at=pe(N),nt=pe(N+1);if(!(nt===at||isNaN(nt)||isNaN(at)))for(var tt=0;tt<l.h;tt++){var qe=we(tt),he=we(tt+1);he===qe||isNaN(he)||isNaN(qe)||!j(N,tt)||(We=_._scaler(j(N,tt)),We?re.fillStyle=Ie+"("+Re(We).join(",")+")":re.fillStyle="rgba(0,0,0,0)",re.fillRect(at,qe,nt-at,he-qe))}}return Q}var le=T.selectAll("image").data([c]);le.enter().append("svg:image").attr({xmlns:E.svg,preserveAspectRatio:"none"}),le.exit().remove();var ce=_.zsmooth===!1?r:"";if(w){var de=x.simpleMap(h.range,h.r2l),G=x.simpleMap(f.range,f.r2l),Y=de[1]<de[0],ee=G[1]>G[0];if(Y||ee){var q=m+P/2,se=z+U/2;ce+="transform:"+S(q+"px",se+"px")+"scale("+(Y?-1:1)+","+(ee?-1:1)+")"+S(-q+"px",-se+"px")+";"}}le.attr("style",ce);var ae=new Promise(function(j){if(_._hasZ)j();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===b&&_._canvas.el.height===p&&_._canvas.source===_.source)j();else{var Q=document.createElement("canvas");Q.width=b,Q.height=p;var re=Q.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var pe=_._image;pe.onload=function(){re.drawImage(pe,0,0),_._canvas={el:Q,source:_.source},j()},pe.setAttribute("src",_.source)}}).then(function(){var j,Q;if(_._hasZ)Q=$(function(we,Se){var Ie=A[Se][we];return x.isTypedArray(Ie)&&(Ie=Array.from(Ie)),Ie}),j=Q.toDataURL("image/png");else if(_._hasSource)if(w)j=_.source;else{var re=_._canvas.el.getContext("2d",{willReadFrequently:!0}),pe=re.getImageData(0,0,b,p).data;Q=$(function(we,Se){var Ie=4*(Se*b+we);return[pe[Ie],pe[Ie+1],pe[Ie+2],pe[Ie+3]]}),j=Q.toDataURL("image/png")}le.attr({"xlink:href":j,height:U,width:P,x:m,y:z})});a._promises.push(ae)})}}}),TB=He({"src/traces/image/style.js"(Z,V){"use strict";var d=Wn();V.exports=function(S){d.select(S).selectAll(".im image").style("opacity",function(E){return E[0].trace.opacity})}}}),AB=He({"src/traces/image/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=x.isArrayOrTypedArray,E=v1();V.exports=function(t,r,o){var a=t.cd[0],n=a.trace,i=t.xa,s=t.ya;if(!(d.inbox(r-a.x0,r-(a.x0+a.w*n.dx),0)>0||d.inbox(o-a.y0,o-(a.y0+a.h*n.dy),0)>0)){var h=Math.floor((r-a.x0)/n.dx),f=Math.floor(Math.abs(o-a.y0)/n.dy),v;if(n._hasZ?v=a.z[f][h]:n._hasSource&&(v=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(h,f,1,1).data),!!v){var c=a.hi||n.hoverinfo,T;if(c){var l=c.split("+");l.indexOf("all")!==-1&&(l=["color"]),l.indexOf("color")!==-1&&(T=!0)}var _=E.colormodel[n.colormodel],w=_.colormodel||n.colormodel,A=w.length,M=n._scaler(v),g=_.suffix,b=[];(n.hovertemplate||T)&&(b.push("["+[M[0]+g[0],M[1]+g[1],M[2]+g[2]].join(", ")),A===4&&b.push(", "+M[3]+g[3]),b.push("]"),b=b.join(""),t.extraText=w.toUpperCase()+": "+b);var p;S(n.hovertext)&&S(n.hovertext[f])?p=n.hovertext[f][h]:S(n.text)&&S(n.text[f])&&(p=n.text[f][h]);var u=s.c2p(a.y0+(f+.5)*n.dy),y=a.x0+(h+.5)*n.dx,m=a.y0+(f+.5)*n.dy,R="["+v.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(t,{index:[f,h],x0:i.c2p(a.x0+h*n.dx),x1:i.c2p(a.x0+(h+1)*n.dx),y0:u,y1:u,color:M,xVal:y,xLabelVal:y,yVal:m,yLabelVal:m,zLabelVal:R,text:p,hovertemplateLabels:{zLabel:R,colorLabel:b,"color[0]Label":M[0]+g[0],"color[1]Label":M[1]+g[1],"color[2]Label":M[2]+g[2],"color[3]Label":M[3]+g[3]}})]}}}}}),SB=He({"src/traces/image/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return"xVal"in S&&(x.x=S.xVal),"yVal"in S&&(x.y=S.yVal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x.color=S.color,x.colormodel=S.trace.colormodel,x.z||(x.z=S.color),x}}}),MB=He({"src/traces/image/index.js"(Z,V){"use strict";V.exports={attributes:DS(),supplyDefaults:lO(),calc:bB(),plot:wB(),style:TB(),hoverPoints:AB(),eventData:SB(),moduleType:"trace",name:"image",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),EB=He({"lib/image.js"(Z,V){"use strict";V.exports=MB()}}),og=He({"src/traces/pie/attributes.js"(Z,V){"use strict";var d=ru(),x=wc().attributes,S=tc(),E=sh(),{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=Qo().extendFlat,a=Gh().pattern,n=S({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.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:E.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:a,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:o({},d.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:e({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:t({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:o({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:o({},n,{}),outsidetextfont:o({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:o({},d.showlegend,{arrayOk:!0}),legend:o({},d.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:o({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({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"}}}}),sg=He({"src/traces/pie/defaults.js"(Z,V){"use strict";var d=as(),x=sa(),S=og(),E=wc().defaults,e=gd().handleText,t=sa().coercePattern;function r(n,i){var s=x.isArrayOrTypedArray(n),h=x.isArrayOrTypedArray(i),f=Math.min(s?n.length:1/0,h?i.length:1/0);if(isFinite(f)||(f=0),f&&h){for(var v,c=0;c<f;c++){var T=i[c];if(d(T)&&T>0){v=!0;break}}v||(f=0)}return{hasLabels:s,hasValues:h,len:f}}function o(n,i,s,h,f){var v=h("marker.line.width");v&&h("marker.line.color",f?void 0:s.paper_bgcolor);var c=h("marker.colors");t(h,"marker.pattern",c),n.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=n.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function a(n,i,s,h){function f(m,R){return x.coerce(n,i,S,m,R)}var v=f("labels"),c=f("values"),T=r(v,c),l=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(f("label0"),f("dlabel")),!l){i.visible=!1;return}i._length=l,o(n,i,h,f,!0),f("scalegroup");var _=f("text"),w=f("texttemplate");f("texttemplatefallback");var A;if(w||(A=f("textinfo",x.isArrayOrTypedArray(_)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),w||A&&A!=="none"){var M=f("textposition");e(n,i,h,f,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(M)||M==="auto",b=g||M==="outside";b&&f("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&f("insidetextorientation")}else A==="none"&&f("textposition","none");E(i,h,f);var p=f("hole"),u=f("title.text");if(u){var y=f("title.position",p?"middle center":"top center");!p&&y==="middle center"&&(i.title.position="top center"),x.coerceFont(f,"title.font",h.font)}f("sort"),f("direction"),f("rotation"),f("pull")}V.exports={handleLabelsAndValues:r,handleMarkerDefaults:o,supplyDefaults:a}}}),_3=He({"src/traces/pie/layout_attributes.js"(Z,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),kB=He({"src/traces/pie/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=_3();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("hiddenlabels"),t("piecolorway",e.colorway),t("extendpiecolors")}}}),x1=He({"src/traces/pie/calc.js"(Z,V){"use strict";var d=as(),x=Ch(),S=Jn(),E={};function e(a,n){var i=[],s=a._fullLayout,h=s.hiddenlabels||[],f=n.labels,v=n.marker.colors||[],c=n.values,T=n._length,l=n._hasValues&&T,_,w;if(n.dlabel)for(f=new Array(T),_=0;_<T;_++)f[_]=String(n.label0+_*n.dlabel);var A={},M=t(s["_"+n.type+"colormap"]),g=0,b=!1;for(_=0;_<T;_++){var p,u,y;if(l){if(p=c[_],!d(p))continue;p=+p}else p=1;u=f[_],(u===void 0||u==="")&&(u=_),u=String(u);var m=A[u];m===void 0?(A[u]=i.length,y=h.indexOf(u)!==-1,y||(g+=p),i.push({v:p,label:u,color:M(v[_],u),i:_,pts:[_],hidden:y})):(b=!0,w=i[m],w.v+=p,w.pts.push(_),w.hidden||(g+=p),w.color===!1&&v[_]&&(w.color=M(v[_],u)))}i=i.filter(function(L){return L.v>=0});var R=n.type==="funnelarea"?b:n.sort;return R&&i.sort(function(L,z){return z.v-L.v}),i[0]&&(i[0].vTotal=g),i}function t(a){return function(i,s){return!i||(i=x(i),!i.isValid())?!1:(i=S.addOpacity(i,i.getAlpha()),a[s]||(a[s]=i),i)}}function r(a,n){var i=(n||{}).type;i||(i="pie");var s=a._fullLayout,h=a.calcdata,f=s[i+"colorway"],v=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(f=o(f,E));for(var c=0,T=0;T<h.length;T++){var l=h[T],_=l[0].trace.type;if(_===i)for(var w=0;w<l.length;w++){var A=l[w];A.color===!1&&(v[A.label]?A.color=v[A.label]:(v[A.label]=A.color=f[c%f.length],c++))}}}function o(a,n){var i,s=JSON.stringify(a),h=n[s];if(!h){for(h=a.slice(),i=0;i<a.length;i++)h.push(x(a[i]).lighten(20).toHexString());for(i=0;i<a.length;i++)h.push(x(a[i]).darken(20).toHexString());n[s]=h}return h}V.exports={calc:e,crossTraceCalc:r,makePullColorFn:t,generateExtendedColors:o}}}),CB=He({"src/traces/pie/event_data.js"(Z,V){"use strict";var d=$p().appendArrayMultiPointValues;V.exports=function(S,E){var e={curveNumber:E.index,pointNumbers:S.pts,data:E._input,fullData:E,label:S.label,color:S.color,value:S.v,percent:S.percent,text:S.text,bbox:S.bbox,v:S.v};return S.pts.length===1&&(e.pointNumber=e.i=S.pts[0]),d(e,E,S.pts),E.type==="funnelarea"&&(delete e.v,delete e.i),e}}}),x3=He({"src/traces/pie/plot.js"(Z,V){"use strict";var d=Wn(),x=bc(),S=rf(),E=Jn(),e=es(),t=sa(),r=t.strScale,o=t.strTranslate,a=ou(),n=Sp(),i=n.recordMinTextSize,s=n.clearMinTextSize,h=i0().TEXTPAD,f=t0(),v=CB(),c=sa().isValidTextValue;function T(Y,ee){var q=Y._context.staticPlot,se=Y._fullLayout,ae=se._size;s("pie",se),M(ee,Y),X(ee,ae);var j=t.makeTraceGroups(se._pielayer,ee,"trace").each(function(Q){var re=d.select(this),pe=Q[0],we=pe.trace;le(Q),re.attr("stroke-linejoin","round"),re.each(function(){var Se=d.select(this).selectAll("g.slice").data(Q);Se.enter().append("g").classed("slice",!0),Se.exit().remove();var Ie=[[[],[]],[[],[]]],Re=!1;Se.each(function(ne,Ce){if(ne.hidden){d.select(this).selectAll("path,g").remove();return}ne.pointNumber=ne.i,ne.curveNumber=we.index,Ie[ne.pxmid[1]<0?0:1][ne.pxmid[0]<0?0:1].push(ne);var Ye=pe.cx,rt=pe.cy,Ke=d.select(this),Mt=Ke.selectAll("path.surface").data([ne]);if(Mt.enter().append("path").classed("surface",!0).style({"pointer-events":q?"none":"all"}),Ke.call(_,Y,Q),we.pull){var kt=+f.castOption(we.pull,ne.pts)||0;kt>0&&(Ye+=kt*ne.pxmid[0],rt+=kt*ne.pxmid[1])}ne.cxFinal=Ye,ne.cyFinal=rt;function Nt(_t,Oe,Je,Ae){var Le=Ae*(Oe[0]-_t[0]),Ue=Ae*(Oe[1]-_t[1]);return"a"+Ae*pe.r+","+Ae*pe.r+" 0 "+ne.largeArc+(Je?" 1 ":" 0 ")+Le+","+Ue}var Gt=we.hole;if(ne.v===pe.vTotal){var Mr="M"+(Ye+ne.px0[0])+","+(rt+ne.px0[1])+Nt(ne.px0,ne.pxmid,!0,1)+Nt(ne.pxmid,ne.px0,!0,1)+"Z";Gt?Mt.attr("d","M"+(Ye+Gt*ne.px0[0])+","+(rt+Gt*ne.px0[1])+Nt(ne.px0,ne.pxmid,!1,Gt)+Nt(ne.pxmid,ne.px0,!1,Gt)+"Z"+Mr):Mt.attr("d",Mr)}else{var mr=Nt(ne.px0,ne.px1,!0,1);if(Gt){var qr=1-Gt;Mt.attr("d","M"+(Ye+Gt*ne.px1[0])+","+(rt+Gt*ne.px1[1])+Nt(ne.px1,ne.px0,!1,Gt)+"l"+qr*ne.px0[0]+","+qr*ne.px0[1]+mr+"Z")}else Mt.attr("d","M"+Ye+","+rt+"l"+ne.px0[0]+","+ne.px0[1]+mr+"Z")}de(Y,ne,pe);var Er=f.castOption(we.textposition,ne.pts),Ir=Ke.selectAll("g.slicetext").data(ne.text&&Er!=="none"?[0]:[]);Ir.enter().append("g").classed("slicetext",!0),Ir.exit().remove(),Ir.each(function(){var _t=t.ensureSingle(d.select(this),"text","",function(ut){ut.attr("data-notex",1)}),Oe=t.ensureUniformFontSize(Y,Er==="outside"?w(we,ne,se.font):A(we,ne,se.font));_t.text(ne.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Oe).call(a.convertToTspans,Y);var Je=e.bBox(_t.node()),Ae;if(Er==="outside")Ae=z(Je,ne);else if(Ae=g(Je,ne,pe),Er==="auto"&&Ae.scale<1){var Le=t.ensureUniformFontSize(Y,we.outsidetextfont);_t.call(e.font,Le),Je=e.bBox(_t.node()),Ae=z(Je,ne)}var Ue=Ae.textPosAngle,Ze=Ue===void 0?ne.pxmid:ce(pe.r,Ue);if(Ae.targetX=Ye+Ze[0]*Ae.rCenter+(Ae.x||0),Ae.targetY=rt+Ze[1]*Ae.rCenter+(Ae.y||0),G(Ae,Je),Ae.outside){var st=Ae.targetY;ne.yLabelMin=st-Je.height/2,ne.yLabelMid=st,ne.yLabelMax=st+Je.height/2,ne.labelExtraX=0,ne.labelExtraY=0,Re=!0}Ae.fontSize=Oe.size,i(we.type,Ae,se),Q[Ce].transform=Ae,t.setTransormAndDisplay(_t,Ae)})});var We=d.select(this).selectAll("g.titletext").data(we.title.text?[0]:[]);if(We.enter().append("g").classed("titletext",!0),We.exit().remove(),We.each(function(){var ne=t.ensureSingle(d.select(this),"text","",function(rt){rt.attr("data-notex",1)}),Ce=we.title.text;we._meta&&(Ce=t.templateString(Ce,we._meta)),ne.text(Ce).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,we.title.font).call(a.convertToTspans,Y);var Ye;we.title.position==="middle center"?Ye=F(pe):Ye=N(pe,ae),ne.attr("transform",o(Ye.x,Ye.y)+r(Math.min(1,Ye.scale))+o(Ye.tx,Ye.ty))}),Re&&B(Ie,we),l(Se,we),Re&&we.automargin){var at=e.bBox(re.node()),nt=we.domain,tt=ae.w*(nt.x[1]-nt.x[0]),qe=ae.h*(nt.y[1]-nt.y[0]),he=(.5*tt-pe.r)/ae.w,ue=(.5*qe-pe.r)/ae.h;x.autoMargin(Y,"pie."+we.uid+".automargin",{xl:nt.x[0]-he,xr:nt.x[1]+he,yb:nt.y[0]-ue,yt:nt.y[1]+ue,l:Math.max(pe.cx-pe.r-at.left,0),r:Math.max(at.right-(pe.cx+pe.r),0),b:Math.max(at.bottom-(pe.cy+pe.r),0),t:Math.max(pe.cy-pe.r-at.top,0),pad:5})}})});setTimeout(function(){j.selectAll("tspan").each(function(){var Q=d.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function l(Y,ee){Y.each(function(q){var se=d.select(this);if(!q.labelExtraX&&!q.labelExtraY){se.select("path.textline").remove();return}var ae=se.select("g.slicetext text");q.transform.targetX+=q.labelExtraX,q.transform.targetY+=q.labelExtraY,t.setTransormAndDisplay(ae,q.transform);var j=q.cxFinal+q.pxmid[0],Q=q.cyFinal+q.pxmid[1],re="M"+j+","+Q,pe=(q.yLabelMax-q.yLabelMin)*(q.pxmid[0]<0?-1:1)/4;if(q.labelExtraX){var we=q.labelExtraX*q.pxmid[1]/q.pxmid[0],Se=q.yLabelMid+q.labelExtraY-(q.cyFinal+q.pxmid[1]);Math.abs(we)>Math.abs(Se)?re+="l"+Se*q.pxmid[0]/q.pxmid[1]+","+Se+"H"+(j+q.labelExtraX+pe):re+="l"+q.labelExtraX+","+we+"v"+(Se-we)+"h"+pe}else re+="V"+(q.yLabelMid+q.labelExtraY)+"h"+pe;t.ensureSingle(se,"path","textline").call(E.stroke,ee.outsidetextfont.color).attr({"stroke-width":Math.min(2,ee.outsidetextfont.size/8),d:re,fill:"none"})})}function _(Y,ee,q){var se=q[0],ae=se.cx,j=se.cy,Q=se.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),Y.on("mouseover",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index];if(!(ee._dragging||we.hovermode===!1)){var Ie=Se.hoverinfo;if(Array.isArray(Ie)&&(Ie=S.castHoverinfo({hoverinfo:[f.castOption(Ie,pe.pts)],_module:Q._module},we,0)),Ie==="all"&&(Ie="label+text+value+percent+name"),Se.hovertemplate||Ie!=="none"&&Ie!=="skip"&&Ie){var Re=pe.rInscribed||0,We=ae+pe.pxmid[0]*(1-Re),at=j+pe.pxmid[1]*(1-Re),nt=we.separators,tt=[];if(Ie&&Ie.indexOf("label")!==-1&&tt.push(pe.label),pe.text=f.castOption(Se.hovertext||Se.text,pe.pts),Ie&&Ie.indexOf("text")!==-1){var qe=pe.text;t.isValidTextValue(qe)&&tt.push(qe)}pe.value=pe.v,pe.valueLabel=f.formatPieValue(pe.v,nt),Ie&&Ie.indexOf("value")!==-1&&tt.push(pe.valueLabel),pe.percent=pe.v/se.vTotal,pe.percentLabel=f.formatPiePercent(pe.percent,nt),Ie&&Ie.indexOf("percent")!==-1&&tt.push(pe.percentLabel);var he=Se.hoverlabel,ue=he.font,ne=[];S.loneHover({trace:Q,x0:We-Re*se.r,x1:We+Re*se.r,y:at,_x0:re?ae+pe.TL[0]:We-Re*se.r,_x1:re?ae+pe.TR[0]:We+Re*se.r,_y0:re?j+pe.TL[1]:at-Re*se.r,_y1:re?j+pe.BL[1]:at+Re*se.r,text:tt.join("<br>"),name:Se.hovertemplate||Ie.indexOf("name")!==-1?Se.name:void 0,idealAlign:pe.pxmid[0]<0?"left":"right",color:f.castOption(he.bgcolor,pe.pts)||pe.color,borderColor:f.castOption(he.bordercolor,pe.pts),fontFamily:f.castOption(ue.family,pe.pts),fontSize:f.castOption(ue.size,pe.pts),fontColor:f.castOption(ue.color,pe.pts),nameLength:f.castOption(he.namelength,pe.pts),textAlign:f.castOption(he.align,pe.pts),hovertemplate:f.castOption(Se.hovertemplate,pe.pts),hovertemplateLabels:pe,eventData:[v(pe,Se)]},{container:we._hoverlayer.node(),outerContainer:we._paper.node(),gd:ee,inOut_bbox:ne}),pe.bbox=ne[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,ee.emit("plotly_hover",{points:[v(pe,Se)],event:d.event})}}),Y.on("mouseout",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index],Ie=d.select(this).datum();Q._hasHoverEvent&&(pe.originalEvent=d.event,ee.emit("plotly_unhover",{points:[v(Ie,Se)],event:d.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(S.loneUnhover(we._hoverlayer.node()),Q._hasHoverLabel=!1)}),Y.on("click",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index];ee._dragging||we.hovermode===!1||(ee._hoverdata=[v(pe,Se)],S.click(ee,d.event))})}function w(Y,ee,q){var se=f.castOption(Y.outsidetextfont.color,ee.pts)||f.castOption(Y.textfont.color,ee.pts)||q.color,ae=f.castOption(Y.outsidetextfont.family,ee.pts)||f.castOption(Y.textfont.family,ee.pts)||q.family,j=f.castOption(Y.outsidetextfont.size,ee.pts)||f.castOption(Y.textfont.size,ee.pts)||q.size,Q=f.castOption(Y.outsidetextfont.weight,ee.pts)||f.castOption(Y.textfont.weight,ee.pts)||q.weight,re=f.castOption(Y.outsidetextfont.style,ee.pts)||f.castOption(Y.textfont.style,ee.pts)||q.style,pe=f.castOption(Y.outsidetextfont.variant,ee.pts)||f.castOption(Y.textfont.variant,ee.pts)||q.variant,we=f.castOption(Y.outsidetextfont.textcase,ee.pts)||f.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Se=f.castOption(Y.outsidetextfont.lineposition,ee.pts)||f.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,Ie=f.castOption(Y.outsidetextfont.shadow,ee.pts)||f.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:se,family:ae,size:j,weight:Q,style:re,variant:pe,textcase:we,lineposition:Se,shadow:Ie}}function A(Y,ee,q){var se=f.castOption(Y.insidetextfont.color,ee.pts);!se&&Y._input.textfont&&(se=f.castOption(Y._input.textfont.color,ee.pts));var ae=f.castOption(Y.insidetextfont.family,ee.pts)||f.castOption(Y.textfont.family,ee.pts)||q.family,j=f.castOption(Y.insidetextfont.size,ee.pts)||f.castOption(Y.textfont.size,ee.pts)||q.size,Q=f.castOption(Y.insidetextfont.weight,ee.pts)||f.castOption(Y.textfont.weight,ee.pts)||q.weight,re=f.castOption(Y.insidetextfont.style,ee.pts)||f.castOption(Y.textfont.style,ee.pts)||q.style,pe=f.castOption(Y.insidetextfont.variant,ee.pts)||f.castOption(Y.textfont.variant,ee.pts)||q.variant,we=f.castOption(Y.insidetextfont.textcase,ee.pts)||f.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Se=f.castOption(Y.insidetextfont.lineposition,ee.pts)||f.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,Ie=f.castOption(Y.insidetextfont.shadow,ee.pts)||f.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:se||E.contrast(ee.color),family:ae,size:j,weight:Q,style:re,variant:pe,textcase:we,lineposition:Se,shadow:Ie}}function M(Y,ee){for(var q,se,ae=0;ae<Y.length;ae++)if(q=Y[ae][0],se=q.trace,se.title.text){var j=se.title.text;se._meta&&(j=t.templateString(j,se._meta));var Q=e.tester.append("text").attr("data-notex",1).text(j).call(e.font,se.title.font).call(a.convertToTspans,ee),re=e.bBox(Q.node(),!0);q.titleBox={width:re.width,height:re.height},Q.remove()}}function g(Y,ee,q){var se=q.r||ee.rpx1,ae=ee.rInscribed,j=ee.startangle===ee.stopangle;if(j)return{rCenter:1-ae,scale:0,rotate:0,textPosAngle:0};var Q=ee.ring,re=Q===1&&Math.abs(ee.startangle-ee.stopangle)===Math.PI*2,pe=ee.halfangle,we=ee.midangle,Se=q.trace.insidetextorientation,Ie=Se==="horizontal",Re=Se==="tangential",We=Se==="radial",at=Se==="auto",nt=[],tt;if(!at){var qe=function(Ke,Mt){if(b(ee,Ke)){var kt=Math.abs(Ke-ee.startangle),Nt=Math.abs(Ke-ee.stopangle),Gt=kt<Nt?kt:Nt;Mt==="tan"?tt=u(Y,se,Q,Gt,0):tt=p(Y,se,Q,Gt,Math.PI/2),tt.textPosAngle=Ke,nt.push(tt)}},he;if(Ie||Re){for(he=4;he>=-4;he-=2)qe(Math.PI*he,"tan");for(he=4;he>=-4;he-=2)qe(Math.PI*(he+1),"tan")}if(Ie||We){for(he=4;he>=-4;he-=2)qe(Math.PI*(he+1.5),"rad");for(he=4;he>=-4;he-=2)qe(Math.PI*(he+.5),"rad")}}if(re||at||Ie){var ue=Math.sqrt(Y.width*Y.width+Y.height*Y.height);if(tt={scale:ae*se*2/ue,rCenter:1-ae,rotate:0},tt.textPosAngle=(ee.startangle+ee.stopangle)/2,tt.scale>=1)return tt;nt.push(tt)}(at||We)&&(tt=p(Y,se,Q,pe,we),tt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(tt)),(at||Re)&&(tt=u(Y,se,Q,pe,we),tt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(tt));for(var ne=0,Ce=0,Ye=0;Ye<nt.length;Ye++){var rt=nt[Ye].scale;if(Ce<rt&&(Ce=rt,ne=Ye),!at&&Ce>=1)break}return nt[ne]}function b(Y,ee){var q=Y.startangle,se=Y.stopangle;return q>ee&&ee>se||q<ee&&ee<se}function p(Y,ee,q,se,ae){ee=Math.max(0,ee-2*h);var j=Y.width/Y.height,Q=R(j,se,ee,q);return{scale:Q*2/Y.height,rCenter:y(j,Q/ee),rotate:m(ae)}}function u(Y,ee,q,se,ae){ee=Math.max(0,ee-2*h);var j=Y.height/Y.width,Q=R(j,se,ee,q);return{scale:Q*2/Y.width,rCenter:y(j,Q/ee),rotate:m(ae+Math.PI/2)}}function y(Y,ee){return Math.cos(ee)-Y*ee}function m(Y){return(180/Math.PI*Y+720)%180-90}function R(Y,ee,q,se){var ae=Y+1/(2*Math.tan(ee));return q*Math.min(1/(Math.sqrt(ae*ae+.5)+ae),se/(Math.sqrt(Y*Y+se/2)+Y))}function L(Y,ee){return Y.v===ee.vTotal&&!ee.trace.hole?1:Math.min(1/(1+1/Math.sin(Y.halfangle)),Y.ring/2)}function z(Y,ee){var q=ee.pxmid[0],se=ee.pxmid[1],ae=Y.width/2,j=Y.height/2;return q<0&&(ae*=-1),se<0&&(j*=-1),{scale:1,rCenter:1,rotate:0,x:ae+Math.abs(j)*(ae>0?1:-1)/2,y:j/(1+q*q/(se*se)),outside:!0}}function F(Y){var ee=Math.sqrt(Y.titleBox.width*Y.titleBox.width+Y.titleBox.height*Y.titleBox.height);return{x:Y.cx,y:Y.cy,scale:Y.trace.hole*Y.r*2/ee,tx:0,ty:-Y.titleBox.height/2+Y.trace.title.font.size}}function N(Y,ee){var q=1,se=1,ae,j=Y.trace,Q={x:Y.cx,y:Y.cy},re={tx:0,ty:0};re.ty+=j.title.font.size,ae=U(j),j.title.position.indexOf("top")!==-1?(Q.y-=(1+ae)*Y.r,re.ty-=Y.titleBox.height):j.title.position.indexOf("bottom")!==-1&&(Q.y+=(1+ae)*Y.r);var pe=O(Y.r,Y.trace.aspectratio),we=ee.w*(j.domain.x[1]-j.domain.x[0])/2;return j.title.position.indexOf("left")!==-1?(we=we+pe,Q.x-=(1+ae)*pe,re.tx+=Y.titleBox.width/2):j.title.position.indexOf("center")!==-1?we*=2:j.title.position.indexOf("right")!==-1&&(we=we+pe,Q.x+=(1+ae)*pe,re.tx-=Y.titleBox.width/2),q=we/Y.titleBox.width,se=P(Y,ee)/Y.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(q,se),tx:re.tx,ty:re.ty}}function O(Y,ee){return Y/(ee===void 0?1:ee)}function P(Y,ee){var q=Y.trace,se=ee.h*(q.domain.y[1]-q.domain.y[0]);return Math.min(Y.titleBox.height,se/2)}function U(Y){var ee=Y.pull;if(!ee)return 0;var q;if(t.isArrayOrTypedArray(ee))for(ee=0,q=0;q<Y.pull.length;q++)Y.pull[q]>ee&&(ee=Y.pull[q]);return ee}function B(Y,ee){var q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We,at;function nt(ue,ne){return ue.pxmid[1]-ne.pxmid[1]}function tt(ue,ne){return ne.pxmid[1]-ue.pxmid[1]}function qe(ue,ne){ne||(ne={});var Ce=ne.labelExtraY+(se?ne.yLabelMax:ne.yLabelMin),Ye=se?ue.yLabelMin:ue.yLabelMax,rt=se?ue.yLabelMax:ue.yLabelMin,Ke=ue.cyFinal+Q(ue.px0[1],ue.px1[1]),Mt=Ce-Ye,kt,Nt,Gt,Mr,mr,qr;if(Mt*pe>0&&(ue.labelExtraY=Mt),!!t.isArrayOrTypedArray(ee.pull))for(Nt=0;Nt<Ie.length;Nt++)Gt=Ie[Nt],!(Gt===ue||(f.castOption(ee.pull,ue.pts)||0)>=(f.castOption(ee.pull,Gt.pts)||0))&&((ue.pxmid[1]-Gt.pxmid[1])*pe>0?(Mr=Gt.cyFinal+Q(Gt.px0[1],Gt.px1[1]),Mt=Mr-Ye-ue.labelExtraY,Mt*pe>0&&(ue.labelExtraY+=Mt)):(rt+ue.labelExtraY-Ke)*pe>0&&(kt=3*re*Math.abs(Nt-Ie.indexOf(ue)),mr=Gt.cxFinal+j(Gt.px0[0],Gt.px1[0]),qr=mr+kt-(ue.cxFinal+ue.pxmid[0])-ue.labelExtraX,qr*re>0&&(ue.labelExtraX+=qr)))}for(se=0;se<2;se++)for(ae=se?nt:tt,Q=se?Math.max:Math.min,pe=se?1:-1,q=0;q<2;q++){for(j=q?Math.max:Math.min,re=q?1:-1,we=Y[se][q],we.sort(ae),Se=Y[1-se][q],Ie=Se.concat(we),We=[],Re=0;Re<we.length;Re++)we[Re].yLabelMid!==void 0&&We.push(we[Re]);for(at=!1,Re=0;se&&Re<Se.length;Re++)if(Se[Re].yLabelMid!==void 0){at=Se[Re];break}for(Re=0;Re<We.length;Re++){var he=Re&&We[Re-1];at&&!Re&&(he=at),qe(We[Re],he)}}}function X(Y,ee){for(var q=[],se=0;se<Y.length;se++){var ae=Y[se][0],j=ae.trace,Q=j.domain,re=ee.w*(Q.x[1]-Q.x[0]),pe=ee.h*(Q.y[1]-Q.y[0]);j.title.text&&j.title.position!=="middle center"&&(pe-=P(ae,ee));var we=re/2,Se=pe/2;j.type==="funnelarea"&&!j.scalegroup&&(Se/=j.aspectratio),ae.r=Math.min(we,Se)/(1+U(j)),ae.cx=ee.l+ee.w*(j.domain.x[1]+j.domain.x[0])/2,ae.cy=ee.t+ee.h*(1-j.domain.y[0])-pe/2,j.title.text&&j.title.position.indexOf("bottom")!==-1&&(ae.cy-=P(ae,ee)),j.scalegroup&&q.indexOf(j.scalegroup)===-1&&q.push(j.scalegroup)}$(Y,q)}function $(Y,ee){for(var q,se,ae,j=0;j<ee.length;j++){var Q=1/0,re=ee[j];for(se=0;se<Y.length;se++)if(q=Y[se][0],ae=q.trace,ae.scalegroup===re){var pe;if(ae.type==="pie")pe=q.r*q.r;else if(ae.type==="funnelarea"){var we,Se;ae.aspectratio>1?(we=q.r,Se=we/ae.aspectratio):(Se=q.r,we=Se*ae.aspectratio),we*=(1+ae.baseratio)/2,pe=we*Se}Q=Math.min(Q,pe/q.vTotal)}for(se=0;se<Y.length;se++)if(q=Y[se][0],ae=q.trace,ae.scalegroup===re){var Ie=Q*q.vTotal;ae.type==="funnelarea"&&(Ie/=(1+ae.baseratio)/2,Ie/=ae.aspectratio),q.r=Math.sqrt(Ie)}}}function le(Y){var ee=Y[0],q=ee.r,se=ee.trace,ae=f.getRotationAngle(se.rotation),j=2*Math.PI/ee.vTotal,Q="px0",re="px1",pe,we,Se;if(se.direction==="counterclockwise"){for(pe=0;pe<Y.length&&Y[pe].hidden;pe++);if(pe===Y.length)return;ae+=j*Y[pe].v,j*=-1,Q="px1",re="px0"}for(Se=ce(q,ae),pe=0;pe<Y.length;pe++)we=Y[pe],!we.hidden&&(we[Q]=Se,we.startangle=ae,ae+=j*we.v/2,we.pxmid=ce(q,ae),we.midangle=ae,ae+=j*we.v/2,Se=ce(q,ae),we.stopangle=ae,we[re]=Se,we.largeArc=we.v>ee.vTotal/2?1:0,we.halfangle=Math.PI*Math.min(we.v/ee.vTotal,.5),we.ring=1-se.hole,we.rInscribed=L(we,ee))}function ce(Y,ee){return[Y*Math.sin(ee),-Y*Math.cos(ee)]}function de(Y,ee,q){var se=Y._fullLayout,ae=q.trace,j=ae.texttemplate,Q=ae.textinfo;if(!j&&Q&&Q!=="none"){var re=Q.split("+"),pe=function(ne){return re.indexOf(ne)!==-1},we=pe("label"),Se=pe("text"),Ie=pe("value"),Re=pe("percent"),We=se.separators,at;if(at=we?[ee.label]:[],Se){var nt=f.getFirstFilled(ae.text,ee.pts);c(nt)&&at.push(nt)}Ie&&at.push(f.formatPieValue(ee.v,We)),Re&&at.push(f.formatPiePercent(ee.v/q.vTotal,We)),ee.text=at.join("<br>")}function tt(ne){return{label:ne.label,value:ne.v,valueLabel:f.formatPieValue(ne.v,se.separators),percent:ne.v/q.vTotal,percentLabel:f.formatPiePercent(ne.v/q.vTotal,se.separators),color:ne.color,text:ne.text,customdata:t.castOption(ae,ne.i,"customdata")}}if(j){var qe=t.castOption(ae,ee.i,"texttemplate");if(!qe)ee.text="";else{var he=tt(ee),ue=f.getFirstFilled(ae.text,ee.pts);(c(ue)||ue==="")&&(he.text=ue),ee.text=t.texttemplateString({data:[he,ae._meta],fallback:ae.texttemplatefallback,labels:he,locale:Y._fullLayout._d3locale,template:qe})}}}function G(Y,ee){var q=Y.rotate*Math.PI/180,se=Math.cos(q),ae=Math.sin(q),j=(ee.left+ee.right)/2,Q=(ee.top+ee.bottom)/2;Y.textX=j*se-Q*ae,Y.textY=j*ae+Q*se,Y.noCenter=!0}V.exports={plot:T,formatSliceLabel:de,transformInsideText:g,determineInsideTextFont:A,positionTitleOutside:N,prerenderTitles:M,layoutAreas:X,attachFxHandlers:_,computeTransform:G}}}),LB=He({"src/traces/pie/style.js"(Z,V){"use strict";var d=Wn(),x=i1(),S=Sp().resizeText;V.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");S(e,t,"pie"),t.each(function(r){var o=r[0],a=o.trace,n=d.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){d.select(this).call(x,i,a,e)})})}}}),PB=He({"src/traces/pie/base_plot.js"(Z){"use strict";var V=bc();Z.name="pie",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),IB=He({"src/traces/pie/index.js"(Z,V){"use strict";V.exports={attributes:og(),supplyDefaults:sg().supplyDefaults,supplyLayoutDefaults:kB(),layoutAttributes:_3(),calc:x1().calc,crossTraceCalc:x1().crossTraceCalc,plot:x3().plot,style:LB(),styleOne:i1(),moduleType:"trace",name:"pie",basePlotModule:PB(),categories:["pie-like","pie","showLegend"],meta:{}}}}),RB=He({"lib/pie.js"(Z,V){"use strict";V.exports=IB()}}),DB=He({"src/traces/sunburst/base_plot.js"(Z){"use strict";var V=bc();Z.name="sunburst",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),nM=He({"src/traces/sunburst/constants.js"(Z,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),J_=He({"src/traces/sunburst/attributes.js"(Z,V){"use strict";var d=ru(),{hovertemplateAttrs:x,texttemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ku(),t=wc().attributes,r=og(),o=nM(),a=Qo().extendFlat,n=Gh().pattern;V.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:a({colors:{valType:"data_array",editType:"calc"},line:{color:a({},r.marker.line.color,{dflt:null}),width:a({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},e("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:S({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a({},d.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:o.eventDataKeys}),hovertemplatefallback:E(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:a({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:t({name:"sunburst",trace:!0,editType:"calc"})}}}),oM=He({"src/traces/sunburst/layout_attributes.js"(Z,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),zB=He({"src/traces/sunburst/defaults.js"(Z,V){"use strict";var d=sa(),x=J_(),S=wc().defaults,E=gd().handleText,e=sg().handleMarkerDefaults,t=rc(),r=t.hasColorscale,o=t.handleDefaults;V.exports=function(n,i,s,h){function f(A,M){return d.coerce(n,i,x,A,M)}var v=f("labels"),c=f("parents");if(!v||!v.length||!c||!c.length){i.visible=!1;return}var T=f("values");T&&T.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),e(n,i,h,f);var l=i._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;l&&o(n,i,h,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",l?1:.7);var _=f("text");f("texttemplate"),f("texttemplatefallback"),i.texttemplate||f("textinfo",d.isArrayOrTypedArray(_)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var w="auto";E(n,i,h,f,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),S(i,h,f),i._length=null}}}),FB=He({"src/traces/sunburst/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=oM();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("sunburstcolorway",e.colorway),t("extendsunburstcolors")}}}),$_=He({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(Ae,Le){return Ae.parent===Le.parent?1:2}function S(Ae){return Ae.reduce(E,0)/Ae.length}function E(Ae,Le){return Ae+Le.x}function e(Ae){return 1+Ae.reduce(t,0)}function t(Ae,Le){return Math.max(Ae,Le.y)}function r(Ae){for(var Le;Le=Ae.children;)Ae=Le[0];return Ae}function o(Ae){for(var Le;Le=Ae.children;)Ae=Le[Le.length-1];return Ae}function a(){var Ae=x,Le=1,Ue=1,Ze=!1;function st(ut){var Ut,Ct=0;ut.eachAfter(function(sr){var Pr=sr.children;Pr?(sr.x=S(Pr),sr.y=e(Pr)):(sr.x=Ut?Ct+=Ae(sr,Ut):0,sr.y=0,Ut=sr)});var Pt=r(ut),jt=o(ut),fr=Pt.x-Ae(Pt,jt)/2,ur=jt.x+Ae(jt,Pt)/2;return ut.eachAfter(Ze?function(sr){sr.x=(sr.x-ut.x)*Le,sr.y=(ut.y-sr.y)*Ue}:function(sr){sr.x=(sr.x-fr)/(ur-fr)*Le,sr.y=(1-(ut.y?sr.y/ut.y:1))*Ue})}return st.separation=function(ut){return arguments.length?(Ae=ut,st):Ae},st.size=function(ut){return arguments.length?(Ze=!1,Le=+ut[0],Ue=+ut[1],st):Ze?null:[Le,Ue]},st.nodeSize=function(ut){return arguments.length?(Ze=!0,Le=+ut[0],Ue=+ut[1],st):Ze?[Le,Ue]:null},st}function n(Ae){var Le=0,Ue=Ae.children,Ze=Ue&&Ue.length;if(!Ze)Le=1;else for(;--Ze>=0;)Le+=Ue[Ze].value;Ae.value=Le}function i(){return this.eachAfter(n)}function s(Ae){var Le=this,Ue,Ze=[Le],st,ut,Ut;do for(Ue=Ze.reverse(),Ze=[];Le=Ue.pop();)if(Ae(Le),st=Le.children,st)for(ut=0,Ut=st.length;ut<Ut;++ut)Ze.push(st[ut]);while(Ze.length);return this}function h(Ae){for(var Le=this,Ue=[Le],Ze,st;Le=Ue.pop();)if(Ae(Le),Ze=Le.children,Ze)for(st=Ze.length-1;st>=0;--st)Ue.push(Ze[st]);return this}function f(Ae){for(var Le=this,Ue=[Le],Ze=[],st,ut,Ut;Le=Ue.pop();)if(Ze.push(Le),st=Le.children,st)for(ut=0,Ut=st.length;ut<Ut;++ut)Ue.push(st[ut]);for(;Le=Ze.pop();)Ae(Le);return this}function v(Ae){return this.eachAfter(function(Le){for(var Ue=+Ae(Le.data)||0,Ze=Le.children,st=Ze&&Ze.length;--st>=0;)Ue+=Ze[st].value;Le.value=Ue})}function c(Ae){return this.eachBefore(function(Le){Le.children&&Le.children.sort(Ae)})}function T(Ae){for(var Le=this,Ue=l(Le,Ae),Ze=[Le];Le!==Ue;)Le=Le.parent,Ze.push(Le);for(var st=Ze.length;Ae!==Ue;)Ze.splice(st,0,Ae),Ae=Ae.parent;return Ze}function l(Ae,Le){if(Ae===Le)return Ae;var Ue=Ae.ancestors(),Ze=Le.ancestors(),st=null;for(Ae=Ue.pop(),Le=Ze.pop();Ae===Le;)st=Ae,Ae=Ue.pop(),Le=Ze.pop();return st}function _(){for(var Ae=this,Le=[Ae];Ae=Ae.parent;)Le.push(Ae);return Le}function w(){var Ae=[];return this.each(function(Le){Ae.push(Le)}),Ae}function A(){var Ae=[];return this.eachBefore(function(Le){Le.children||Ae.push(Le)}),Ae}function M(){var Ae=this,Le=[];return Ae.each(function(Ue){Ue!==Ae&&Le.push({source:Ue.parent,target:Ue})}),Le}function g(Ae,Le){var Ue=new m(Ae),Ze=+Ae.value&&(Ue.value=Ae.value),st,ut=[Ue],Ut,Ct,Pt,jt;for(Le==null&&(Le=p);st=ut.pop();)if(Ze&&(st.value=+st.data.value),(Ct=Le(st.data))&&(jt=Ct.length))for(st.children=new Array(jt),Pt=jt-1;Pt>=0;--Pt)ut.push(Ut=st.children[Pt]=new m(Ct[Pt])),Ut.parent=st,Ut.depth=st.depth+1;return Ue.eachBefore(y)}function b(){return g(this).eachBefore(u)}function p(Ae){return Ae.children}function u(Ae){Ae.data=Ae.data.data}function y(Ae){var Le=0;do Ae.height=Le;while((Ae=Ae.parent)&&Ae.height<++Le)}function m(Ae){this.data=Ae,this.depth=this.height=0,this.parent=null}m.prototype=g.prototype={constructor:m,count:i,each:s,eachAfter:f,eachBefore:h,sum:v,sort:c,path:T,ancestors:_,descendants:w,leaves:A,links:M,copy:b};var R=Array.prototype.slice;function L(Ae){for(var Le=Ae.length,Ue,Ze;Le;)Ze=Math.random()*Le--|0,Ue=Ae[Le],Ae[Le]=Ae[Ze],Ae[Ze]=Ue;return Ae}function z(Ae){for(var Le=0,Ue=(Ae=L(R.call(Ae))).length,Ze=[],st,ut;Le<Ue;)st=Ae[Le],ut&&O(ut,st)?++Le:(ut=U(Ze=F(Ze,st)),Le=0);return ut}function F(Ae,Le){var Ue,Ze;if(P(Le,Ae))return[Le];for(Ue=0;Ue<Ae.length;++Ue)if(N(Le,Ae[Ue])&&P(X(Ae[Ue],Le),Ae))return[Ae[Ue],Le];for(Ue=0;Ue<Ae.length-1;++Ue)for(Ze=Ue+1;Ze<Ae.length;++Ze)if(N(X(Ae[Ue],Ae[Ze]),Le)&&N(X(Ae[Ue],Le),Ae[Ze])&&N(X(Ae[Ze],Le),Ae[Ue])&&P($(Ae[Ue],Ae[Ze],Le),Ae))return[Ae[Ue],Ae[Ze],Le];throw new Error}function N(Ae,Le){var Ue=Ae.r-Le.r,Ze=Le.x-Ae.x,st=Le.y-Ae.y;return Ue<0||Ue*Ue<Ze*Ze+st*st}function O(Ae,Le){var Ue=Ae.r-Le.r+1e-6,Ze=Le.x-Ae.x,st=Le.y-Ae.y;return Ue>0&&Ue*Ue>Ze*Ze+st*st}function P(Ae,Le){for(var Ue=0;Ue<Le.length;++Ue)if(!O(Ae,Le[Ue]))return!1;return!0}function U(Ae){switch(Ae.length){case 1:return B(Ae[0]);case 2:return X(Ae[0],Ae[1]);case 3:return $(Ae[0],Ae[1],Ae[2])}}function B(Ae){return{x:Ae.x,y:Ae.y,r:Ae.r}}function X(Ae,Le){var Ue=Ae.x,Ze=Ae.y,st=Ae.r,ut=Le.x,Ut=Le.y,Ct=Le.r,Pt=ut-Ue,jt=Ut-Ze,fr=Ct-st,ur=Math.sqrt(Pt*Pt+jt*jt);return{x:(Ue+ut+Pt/ur*fr)/2,y:(Ze+Ut+jt/ur*fr)/2,r:(ur+st+Ct)/2}}function $(Ae,Le,Ue){var Ze=Ae.x,st=Ae.y,ut=Ae.r,Ut=Le.x,Ct=Le.y,Pt=Le.r,jt=Ue.x,fr=Ue.y,ur=Ue.r,sr=Ze-Ut,Pr=Ze-jt,Ta=st-Ct,Oa=st-fr,Ia=Pt-ut,qa=ur-ut,Wa=Ze*Ze+st*st-ut*ut,Ca=Wa-Ut*Ut-Ct*Ct+Pt*Pt,hi=Wa-jt*jt-fr*fr+ur*ur,wi=Pr*Ta-sr*Oa,Kt=(Ta*hi-Oa*Ca)/(wi*2)-Ze,Dt=(Oa*Ia-Ta*qa)/wi,Yt=(Pr*Ca-sr*hi)/(wi*2)-st,Jt=(sr*qa-Pr*Ia)/wi,Fr=Dt*Dt+Jt*Jt-1,ta=2*(ut+Kt*Dt+Yt*Jt),ra=Kt*Kt+Yt*Yt-ut*ut,ca=-(Fr?(ta+Math.sqrt(ta*ta-4*Fr*ra))/(2*Fr):ra/ta);return{x:Ze+Kt+Dt*ca,y:st+Yt+Jt*ca,r:ca}}function le(Ae,Le,Ue){var Ze=Ae.x-Le.x,st,ut,Ut=Ae.y-Le.y,Ct,Pt,jt=Ze*Ze+Ut*Ut;jt?(ut=Le.r+Ue.r,ut*=ut,Pt=Ae.r+Ue.r,Pt*=Pt,ut>Pt?(st=(jt+Pt-ut)/(2*jt),Ct=Math.sqrt(Math.max(0,Pt/jt-st*st)),Ue.x=Ae.x-st*Ze-Ct*Ut,Ue.y=Ae.y-st*Ut+Ct*Ze):(st=(jt+ut-Pt)/(2*jt),Ct=Math.sqrt(Math.max(0,ut/jt-st*st)),Ue.x=Le.x+st*Ze-Ct*Ut,Ue.y=Le.y+st*Ut+Ct*Ze)):(Ue.x=Le.x+Ue.r,Ue.y=Le.y)}function ce(Ae,Le){var Ue=Ae.r+Le.r-1e-6,Ze=Le.x-Ae.x,st=Le.y-Ae.y;return Ue>0&&Ue*Ue>Ze*Ze+st*st}function de(Ae){var Le=Ae._,Ue=Ae.next._,Ze=Le.r+Ue.r,st=(Le.x*Ue.r+Ue.x*Le.r)/Ze,ut=(Le.y*Ue.r+Ue.y*Le.r)/Ze;return st*st+ut*ut}function G(Ae){this._=Ae,this.next=null,this.previous=null}function Y(Ae){if(!(st=Ae.length))return 0;var Le,Ue,Ze,st,ut,Ut,Ct,Pt,jt,fr,ur;if(Le=Ae[0],Le.x=0,Le.y=0,!(st>1))return Le.r;if(Ue=Ae[1],Le.x=-Ue.r,Ue.x=Le.r,Ue.y=0,!(st>2))return Le.r+Ue.r;le(Ue,Le,Ze=Ae[2]),Le=new G(Le),Ue=new G(Ue),Ze=new G(Ze),Le.next=Ze.previous=Ue,Ue.next=Le.previous=Ze,Ze.next=Ue.previous=Le;e:for(Ct=3;Ct<st;++Ct){le(Le._,Ue._,Ze=Ae[Ct]),Ze=new G(Ze),Pt=Ue.next,jt=Le.previous,fr=Ue._.r,ur=Le._.r;do if(fr<=ur){if(ce(Pt._,Ze._)){Ue=Pt,Le.next=Ue,Ue.previous=Le,--Ct;continue e}fr+=Pt._.r,Pt=Pt.next}else{if(ce(jt._,Ze._)){Le=jt,Le.next=Ue,Ue.previous=Le,--Ct;continue e}ur+=jt._.r,jt=jt.previous}while(Pt!==jt.next);for(Ze.previous=Le,Ze.next=Ue,Le.next=Ue.previous=Ue=Ze,ut=de(Le);(Ze=Ze.next)!==Ue;)(Ut=de(Ze))<ut&&(Le=Ze,ut=Ut);Ue=Le.next}for(Le=[Ue._],Ze=Ue;(Ze=Ze.next)!==Ue;)Le.push(Ze._);for(Ze=z(Le),Ct=0;Ct<st;++Ct)Le=Ae[Ct],Le.x-=Ze.x,Le.y-=Ze.y;return Ze.r}function ee(Ae){return Y(Ae),Ae}function q(Ae){return Ae==null?null:se(Ae)}function se(Ae){if(typeof Ae!="function")throw new Error;return Ae}function ae(){return 0}function j(Ae){return function(){return Ae}}function Q(Ae){return Math.sqrt(Ae.value)}function re(){var Ae=null,Le=1,Ue=1,Ze=ae;function st(ut){return ut.x=Le/2,ut.y=Ue/2,Ae?ut.eachBefore(pe(Ae)).eachAfter(we(Ze,.5)).eachBefore(Se(1)):ut.eachBefore(pe(Q)).eachAfter(we(ae,1)).eachAfter(we(Ze,ut.r/Math.min(Le,Ue))).eachBefore(Se(Math.min(Le,Ue)/(2*ut.r))),ut}return st.radius=function(ut){return arguments.length?(Ae=q(ut),st):Ae},st.size=function(ut){return arguments.length?(Le=+ut[0],Ue=+ut[1],st):[Le,Ue]},st.padding=function(ut){return arguments.length?(Ze=typeof ut=="function"?ut:j(+ut),st):Ze},st}function pe(Ae){return function(Le){Le.children||(Le.r=Math.max(0,+Ae(Le)||0))}}function we(Ae,Le){return function(Ue){if(Ze=Ue.children){var Ze,st,ut=Ze.length,Ut=Ae(Ue)*Le||0,Ct;if(Ut)for(st=0;st<ut;++st)Ze[st].r+=Ut;if(Ct=Y(Ze),Ut)for(st=0;st<ut;++st)Ze[st].r-=Ut;Ue.r=Ct+Ut}}}function Se(Ae){return function(Le){var Ue=Le.parent;Le.r*=Ae,Ue&&(Le.x=Ue.x+Ae*Le.x,Le.y=Ue.y+Ae*Le.y)}}function Ie(Ae){Ae.x0=Math.round(Ae.x0),Ae.y0=Math.round(Ae.y0),Ae.x1=Math.round(Ae.x1),Ae.y1=Math.round(Ae.y1)}function Re(Ae,Le,Ue,Ze,st){for(var ut=Ae.children,Ut,Ct=-1,Pt=ut.length,jt=Ae.value&&(Ze-Le)/Ae.value;++Ct<Pt;)Ut=ut[Ct],Ut.y0=Ue,Ut.y1=st,Ut.x0=Le,Ut.x1=Le+=Ut.value*jt}function We(){var Ae=1,Le=1,Ue=0,Ze=!1;function st(Ut){var Ct=Ut.height+1;return Ut.x0=Ut.y0=Ue,Ut.x1=Ae,Ut.y1=Le/Ct,Ut.eachBefore(ut(Le,Ct)),Ze&&Ut.eachBefore(Ie),Ut}function ut(Ut,Ct){return function(Pt){Pt.children&&Re(Pt,Pt.x0,Ut*(Pt.depth+1)/Ct,Pt.x1,Ut*(Pt.depth+2)/Ct);var jt=Pt.x0,fr=Pt.y0,ur=Pt.x1-Ue,sr=Pt.y1-Ue;ur<jt&&(jt=ur=(jt+ur)/2),sr<fr&&(fr=sr=(fr+sr)/2),Pt.x0=jt,Pt.y0=fr,Pt.x1=ur,Pt.y1=sr}}return st.round=function(Ut){return arguments.length?(Ze=!!Ut,st):Ze},st.size=function(Ut){return arguments.length?(Ae=+Ut[0],Le=+Ut[1],st):[Ae,Le]},st.padding=function(Ut){return arguments.length?(Ue=+Ut,st):Ue},st}var at="$",nt={depth:-1},tt={};function qe(Ae){return Ae.id}function he(Ae){return Ae.parentId}function ue(){var Ae=qe,Le=he;function Ue(Ze){var st,ut,Ut=Ze.length,Ct,Pt,jt,fr=new Array(Ut),ur,sr,Pr={};for(ut=0;ut<Ut;++ut)st=Ze[ut],jt=fr[ut]=new m(st),(ur=Ae(st,ut,Ze))!=null&&(ur+="")&&(sr=at+(jt.id=ur),Pr[sr]=sr in Pr?tt:jt);for(ut=0;ut<Ut;++ut)if(jt=fr[ut],ur=Le(Ze[ut],ut,Ze),ur==null||!(ur+="")){if(Ct)throw new Error("multiple roots");Ct=jt}else{if(Pt=Pr[at+ur],!Pt)throw new Error("missing: "+ur);if(Pt===tt)throw new Error("ambiguous: "+ur);Pt.children?Pt.children.push(jt):Pt.children=[jt],jt.parent=Pt}if(!Ct)throw new Error("no root");if(Ct.parent=nt,Ct.eachBefore(function(Ta){Ta.depth=Ta.parent.depth+1,--Ut}).eachBefore(y),Ct.parent=null,Ut>0)throw new Error("cycle");return Ct}return Ue.id=function(Ze){return arguments.length?(Ae=se(Ze),Ue):Ae},Ue.parentId=function(Ze){return arguments.length?(Le=se(Ze),Ue):Le},Ue}function ne(Ae,Le){return Ae.parent===Le.parent?1:2}function Ce(Ae){var Le=Ae.children;return Le?Le[0]:Ae.t}function Ye(Ae){var Le=Ae.children;return Le?Le[Le.length-1]:Ae.t}function rt(Ae,Le,Ue){var Ze=Ue/(Le.i-Ae.i);Le.c-=Ze,Le.s+=Ue,Ae.c+=Ze,Le.z+=Ue,Le.m+=Ue}function Ke(Ae){for(var Le=0,Ue=0,Ze=Ae.children,st=Ze.length,ut;--st>=0;)ut=Ze[st],ut.z+=Le,ut.m+=Le,Le+=ut.s+(Ue+=ut.c)}function Mt(Ae,Le,Ue){return Ae.a.parent===Le.parent?Ae.a:Ue}function kt(Ae,Le){this._=Ae,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=Le}kt.prototype=Object.create(m.prototype);function Nt(Ae){for(var Le=new kt(Ae,0),Ue,Ze=[Le],st,ut,Ut,Ct;Ue=Ze.pop();)if(ut=Ue._.children)for(Ue.children=new Array(Ct=ut.length),Ut=Ct-1;Ut>=0;--Ut)Ze.push(st=Ue.children[Ut]=new kt(ut[Ut],Ut)),st.parent=Ue;return(Le.parent=new kt(null,0)).children=[Le],Le}function Gt(){var Ae=ne,Le=1,Ue=1,Ze=null;function st(jt){var fr=Nt(jt);if(fr.eachAfter(ut),fr.parent.m=-fr.z,fr.eachBefore(Ut),Ze)jt.eachBefore(Pt);else{var ur=jt,sr=jt,Pr=jt;jt.eachBefore(function(Wa){Wa.x<ur.x&&(ur=Wa),Wa.x>sr.x&&(sr=Wa),Wa.depth>Pr.depth&&(Pr=Wa)});var Ta=ur===sr?1:Ae(ur,sr)/2,Oa=Ta-ur.x,Ia=Le/(sr.x+Ta+Oa),qa=Ue/(Pr.depth||1);jt.eachBefore(function(Wa){Wa.x=(Wa.x+Oa)*Ia,Wa.y=Wa.depth*qa})}return jt}function ut(jt){var fr=jt.children,ur=jt.parent.children,sr=jt.i?ur[jt.i-1]:null;if(fr){Ke(jt);var Pr=(fr[0].z+fr[fr.length-1].z)/2;sr?(jt.z=sr.z+Ae(jt._,sr._),jt.m=jt.z-Pr):jt.z=Pr}else sr&&(jt.z=sr.z+Ae(jt._,sr._));jt.parent.A=Ct(jt,sr,jt.parent.A||ur[0])}function Ut(jt){jt._.x=jt.z+jt.parent.m,jt.m+=jt.parent.m}function Ct(jt,fr,ur){if(fr){for(var sr=jt,Pr=jt,Ta=fr,Oa=sr.parent.children[0],Ia=sr.m,qa=Pr.m,Wa=Ta.m,Ca=Oa.m,hi;Ta=Ye(Ta),sr=Ce(sr),Ta&&sr;)Oa=Ce(Oa),Pr=Ye(Pr),Pr.a=jt,hi=Ta.z+Wa-sr.z-Ia+Ae(Ta._,sr._),hi>0&&(rt(Mt(Ta,jt,ur),jt,hi),Ia+=hi,qa+=hi),Wa+=Ta.m,Ia+=sr.m,Ca+=Oa.m,qa+=Pr.m;Ta&&!Ye(Pr)&&(Pr.t=Ta,Pr.m+=Wa-qa),sr&&!Ce(Oa)&&(Oa.t=sr,Oa.m+=Ia-Ca,ur=jt)}return ur}function Pt(jt){jt.x*=Le,jt.y=jt.depth*Ue}return st.separation=function(jt){return arguments.length?(Ae=jt,st):Ae},st.size=function(jt){return arguments.length?(Ze=!1,Le=+jt[0],Ue=+jt[1],st):Ze?null:[Le,Ue]},st.nodeSize=function(jt){return arguments.length?(Ze=!0,Le=+jt[0],Ue=+jt[1],st):Ze?[Le,Ue]:null},st}function Mr(Ae,Le,Ue,Ze,st){for(var ut=Ae.children,Ut,Ct=-1,Pt=ut.length,jt=Ae.value&&(st-Ue)/Ae.value;++Ct<Pt;)Ut=ut[Ct],Ut.x0=Le,Ut.x1=Ze,Ut.y0=Ue,Ut.y1=Ue+=Ut.value*jt}var mr=(1+Math.sqrt(5))/2;function qr(Ae,Le,Ue,Ze,st,ut){for(var Ut=[],Ct=Le.children,Pt,jt,fr=0,ur=0,sr=Ct.length,Pr,Ta,Oa=Le.value,Ia,qa,Wa,Ca,hi,wi,Kt;fr<sr;){Pr=st-Ue,Ta=ut-Ze;do Ia=Ct[ur++].value;while(!Ia&&ur<sr);for(qa=Wa=Ia,wi=Math.max(Ta/Pr,Pr/Ta)/(Oa*Ae),Kt=Ia*Ia*wi,hi=Math.max(Wa/Kt,Kt/qa);ur<sr;++ur){if(Ia+=jt=Ct[ur].value,jt<qa&&(qa=jt),jt>Wa&&(Wa=jt),Kt=Ia*Ia*wi,Ca=Math.max(Wa/Kt,Kt/qa),Ca>hi){Ia-=jt;break}hi=Ca}Ut.push(Pt={value:Ia,dice:Pr<Ta,children:Ct.slice(fr,ur)}),Pt.dice?Re(Pt,Ue,Ze,st,Oa?Ze+=Ta*Ia/Oa:ut):Mr(Pt,Ue,Ze,Oa?Ue+=Pr*Ia/Oa:st,ut),Oa-=Ia,fr=ur}return Ut}var Er=function Ae(Le){function Ue(Ze,st,ut,Ut,Ct){qr(Le,Ze,st,ut,Ut,Ct)}return Ue.ratio=function(Ze){return Ae((Ze=+Ze)>1?Ze:1)},Ue}(mr);function Ir(){var Ae=Er,Le=!1,Ue=1,Ze=1,st=[0],ut=ae,Ut=ae,Ct=ae,Pt=ae,jt=ae;function fr(sr){return sr.x0=sr.y0=0,sr.x1=Ue,sr.y1=Ze,sr.eachBefore(ur),st=[0],Le&&sr.eachBefore(Ie),sr}function ur(sr){var Pr=st[sr.depth],Ta=sr.x0+Pr,Oa=sr.y0+Pr,Ia=sr.x1-Pr,qa=sr.y1-Pr;Ia<Ta&&(Ta=Ia=(Ta+Ia)/2),qa<Oa&&(Oa=qa=(Oa+qa)/2),sr.x0=Ta,sr.y0=Oa,sr.x1=Ia,sr.y1=qa,sr.children&&(Pr=st[sr.depth+1]=ut(sr)/2,Ta+=jt(sr)-Pr,Oa+=Ut(sr)-Pr,Ia-=Ct(sr)-Pr,qa-=Pt(sr)-Pr,Ia<Ta&&(Ta=Ia=(Ta+Ia)/2),qa<Oa&&(Oa=qa=(Oa+qa)/2),Ae(sr,Ta,Oa,Ia,qa))}return fr.round=function(sr){return arguments.length?(Le=!!sr,fr):Le},fr.size=function(sr){return arguments.length?(Ue=+sr[0],Ze=+sr[1],fr):[Ue,Ze]},fr.tile=function(sr){return arguments.length?(Ae=se(sr),fr):Ae},fr.padding=function(sr){return arguments.length?fr.paddingInner(sr).paddingOuter(sr):fr.paddingInner()},fr.paddingInner=function(sr){return arguments.length?(ut=typeof sr=="function"?sr:j(+sr),fr):ut},fr.paddingOuter=function(sr){return arguments.length?fr.paddingTop(sr).paddingRight(sr).paddingBottom(sr).paddingLeft(sr):fr.paddingTop()},fr.paddingTop=function(sr){return arguments.length?(Ut=typeof sr=="function"?sr:j(+sr),fr):Ut},fr.paddingRight=function(sr){return arguments.length?(Ct=typeof sr=="function"?sr:j(+sr),fr):Ct},fr.paddingBottom=function(sr){return arguments.length?(Pt=typeof sr=="function"?sr:j(+sr),fr):Pt},fr.paddingLeft=function(sr){return arguments.length?(jt=typeof sr=="function"?sr:j(+sr),fr):jt},fr}function _t(Ae,Le,Ue,Ze,st){var ut=Ae.children,Ut,Ct=ut.length,Pt,jt=new Array(Ct+1);for(jt[0]=Pt=Ut=0;Ut<Ct;++Ut)jt[Ut+1]=Pt+=ut[Ut].value;fr(0,Ct,Ae.value,Le,Ue,Ze,st);function fr(ur,sr,Pr,Ta,Oa,Ia,qa){if(ur>=sr-1){var Wa=ut[ur];Wa.x0=Ta,Wa.y0=Oa,Wa.x1=Ia,Wa.y1=qa;return}for(var Ca=jt[ur],hi=Pr/2+Ca,wi=ur+1,Kt=sr-1;wi<Kt;){var Dt=wi+Kt>>>1;jt[Dt]<hi?wi=Dt+1:Kt=Dt}hi-jt[wi-1]<jt[wi]-hi&&ur+1<wi&&--wi;var Yt=jt[wi]-Ca,Jt=Pr-Yt;if(Ia-Ta>qa-Oa){var Fr=(Ta*Jt+Ia*Yt)/Pr;fr(ur,wi,Yt,Ta,Oa,Fr,qa),fr(wi,sr,Jt,Fr,Oa,Ia,qa)}else{var ta=(Oa*Jt+qa*Yt)/Pr;fr(ur,wi,Yt,Ta,Oa,Ia,ta),fr(wi,sr,Jt,Ta,ta,Ia,qa)}}}function Oe(Ae,Le,Ue,Ze,st){(Ae.depth&1?Mr:Re)(Ae,Le,Ue,Ze,st)}var Je=function Ae(Le){function Ue(Ze,st,ut,Ut,Ct){if((Pt=Ze._squarify)&&Pt.ratio===Le)for(var Pt,jt,fr,ur,sr=-1,Pr,Ta=Pt.length,Oa=Ze.value;++sr<Ta;){for(jt=Pt[sr],fr=jt.children,ur=jt.value=0,Pr=fr.length;ur<Pr;++ur)jt.value+=fr[ur].value;jt.dice?Re(jt,st,ut,Ut,ut+=(Ct-ut)*jt.value/Oa):Mr(jt,st,ut,st+=(Ut-st)*jt.value/Oa,Ct),Oa-=jt.value}else Ze._squarify=Pt=qr(Le,Ze,st,ut,Ut,Ct),Pt.ratio=Le}return Ue.ratio=function(Ze){return Ae((Ze=+Ze)>1?Ze:1)},Ue}(mr);d.cluster=a,d.hierarchy=g,d.pack=re,d.packEnclose=z,d.packSiblings=ee,d.partition=We,d.stratify=ue,d.tree=Gt,d.treemap=Ir,d.treemapBinary=_t,d.treemapDice=Re,d.treemapResquarify=Je,d.treemapSlice=Mr,d.treemapSliceDice=Oe,d.treemapSquarify=Er,Object.defineProperty(d,"__esModule",{value:!0})})}}),Q_=He({"src/traces/sunburst/calc.js"(Z){"use strict";var V=$_(),d=as(),x=sa(),S=rc().makeColorScaleFuncFromTrace,E=x1().makePullColorFn,e=x1().generateExtendedColors,t=rc().calc,r=Ws().ALMOST_EQUAL,o={},a={},n={};Z.calc=function(s,h){var f=s._fullLayout,v=h.ids,c=x.isArrayOrTypedArray(v),T=h.labels,l=h.parents,_=h.values,w=x.isArrayOrTypedArray(_),A=[],M={},g={},b=function(ee,q){M[ee]?M[ee].push(q):M[ee]=[q],g[q]=1},p=function(ee){return ee||typeof ee=="number"},u=function(ee){return!w||d(_[ee])&&_[ee]>=0},y,m,R;c?(y=Math.min(v.length,l.length),m=function(ee){return p(v[ee])&&u(ee)},R=function(ee){return String(v[ee])}):(y=Math.min(T.length,l.length),m=function(ee){return p(T[ee])&&u(ee)},R=function(ee){return String(T[ee])}),w&&(y=Math.min(y,_.length));for(var L=0;L<y;L++)if(m(L)){var z=R(L),F=p(l[L])?String(l[L]):"",N={i:L,id:z,pid:F,label:p(T[L])?String(T[L]):""};w&&(N.v=+_[L]),A.push(N),b(F,z)}if(M[""]){if(M[""].length>1){for(var U=x.randstr(),B=0;B<A.length;B++)A[B].pid===""&&(A[B].pid=U);A.unshift({hasMultipleRoots:!0,id:U,pid:"",label:""})}}else{var O=[],P;for(P in M)g[P]||O.push(P);if(O.length===1)P=O[0],A.unshift({hasImpliedRoot:!0,id:P,pid:"",label:P});else return x.warn(["Multiple implied roots, cannot build",h.type,"hierarchy of",h.name+".","These roots include:",O.join(", ")].join(" "))}var X;try{X=V.stratify().id(function(ee){return ee.id}).parentId(function(ee){return ee.pid})(A)}catch(ee){return x.warn(["Failed to build",h.type,"hierarchy of",h.name+".","Error:",ee.message].join(" "))}var $=V.hierarchy(X),le=!1;if(w)switch(h.branchvalues){case"remainder":$.sum(function(ee){return ee.data.v});break;case"total":$.each(function(ee){var q=ee.data.data,se=q.v;if(ee.children){var ae=ee.children.reduce(function(j,Q){return j+Q.data.data.v},0);if((q.hasImpliedRoot||q.hasMultipleRoots)&&(se=ae),se<ae*r)return le=!0,x.warn(["Total value for node",ee.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
parent value =`,se,`
children sum =`,ae].join(" "))}ee.value=se});break}else i($,h,{branches:h.count.indexOf("branches")!==-1,leaves:h.count.indexOf("leaves")!==-1});if(!le){h.sort&&$.sort(function(ee,q){return q.value-ee.value});var ce,de,G=h.marker.colors||[],Y=!!G.length;return h._hasColorscale?(Y||(G=w?h.values:h._values),t(s,h,{vals:G,containerStr:"marker",cLetter:"c"}),de=S(h.marker)):ce=E(f["_"+h.type+"colormap"]),$.each(function(ee){var q=ee.data.data;q.color=h._hasColorscale?de(G[q.i]):ce(G[q.i],q.id)}),A[0].hierarchy=$,A}},Z._runCrossTraceCalc=function(s,h){var f=h._fullLayout,v=h.calcdata,c=f[s+"colorway"],T=f["_"+s+"colormap"];f["extend"+s+"colors"]&&(c=e(c,s==="icicle"?n:s==="treemap"?a:o));var l=0,_;function w(b){var p=b.data.data,u=p.id;p.color===!1&&(T[u]?p.color=T[u]:b.parent?b.parent.parent?p.color=b.parent.data.data.color:(T[u]=p.color=c[l%c.length],l++):p.color=_)}for(var A=0;A<v.length;A++){var M=v[A],g=M[0];g.trace.type===s&&g.hierarchy&&(_=g.trace.root.color,g.hierarchy.each(w))}},Z.crossTraceCalc=function(s){return Z._runCrossTraceCalc("sunburst",s)};function i(s,h,f){var v=0,c=s.children;if(c){for(var T=c.length,l=0;l<T;l++)v+=i(c[l],h,f);f.branches&&v++}else f.leaves&&v++;return s.value=s.data.data.value=v,h._values||(h._values=[]),h._values[s.data.data.i]=v,v}}});function lg(Z,V,d){Z.prototype=V.prototype=d,d.constructor=Z}function b1(Z,V){var d=Object.create(Z.prototype);for(var x in V)d[x]=V[x];return d}var b3=Go({"node_modules/d3-color/src/define.js"(){}});function Jv(){}function sM(){return this.rgb().formatHex()}function OB(){return this.rgb().formatHex8()}function BB(){return pM(this).formatHsl()}function lM(){return this.rgb().formatRgb()}function w1(Z){var V,d;return Z=(Z+"").trim().toLowerCase(),(V=vM.exec(Z))?(d=V[1].length,V=parseInt(V[1],16),d===6?uM(V):d===3?new Xh(V>>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):d===8?ex(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):d===4?ex(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=mM.exec(Z))?new Xh(V[1],V[2],V[3],1):(V=gM.exec(Z))?new Xh(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=yM.exec(Z))?ex(V[1],V[2],V[3],V[4]):(V=_M.exec(Z))?ex(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=xM.exec(Z))?hM(V[1],V[2]/100,V[3]/100,1):(V=bM.exec(Z))?hM(V[1],V[2]/100,V[3]/100,V[4]):S3.hasOwnProperty(Z)?uM(S3[Z]):Z==="transparent"?new Xh(NaN,NaN,NaN,0):null}function uM(Z){return new Xh(Z>>16&255,Z>>8&255,Z&255,1)}function ex(Z,V,d,x){return x<=0&&(Z=V=d=NaN),new Xh(Z,V,d,x)}function w3(Z){return Z instanceof Jv||(Z=w1(Z)),Z?(Z=Z.rgb(),new Xh(Z.r,Z.g,Z.b,Z.opacity)):new Xh}function tx(Z,V,d,x){return arguments.length===1?w3(Z):new Xh(Z,V,d,x??1)}function Xh(Z,V,d,x){this.r=+Z,this.g=+V,this.b=+d,this.opacity=+x}function cM(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}`}function NB(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}${l0((isNaN(this.opacity)?1:this.opacity)*255)}`}function fM(){let Z=rx(this.opacity);return`${Z===1?"rgb(":"rgba("}${s0(this.r)}, ${s0(this.g)}, ${s0(this.b)}${Z===1?")":`, ${Z})`}`}function rx(Z){return isNaN(Z)?1:Math.max(0,Math.min(1,Z))}function s0(Z){return Math.max(0,Math.min(255,Math.round(Z)||0))}function l0(Z){return Z=s0(Z),(Z<16?"0":"")+Z.toString(16)}function hM(Z,V,d,x){return x<=0?Z=V=d=NaN:d<=0||d>=1?Z=V=NaN:V<=0&&(Z=NaN),new Ud(Z,V,d,x)}function pM(Z){if(Z instanceof Ud)return new Ud(Z.h,Z.s,Z.l,Z.opacity);if(Z instanceof Jv||(Z=w1(Z)),!Z)return new Ud;if(Z instanceof Ud)return Z;Z=Z.rgb();var V=Z.r/255,d=Z.g/255,x=Z.b/255,S=Math.min(V,d,x),E=Math.max(V,d,x),e=NaN,t=E-S,r=(E+S)/2;return t?(V===E?e=(d-x)/t+(d<x)*6:d===E?e=(x-V)/t+2:e=(V-d)/t+4,t/=r<.5?E+S:2-E-S,e*=60):t=r>0&&r<1?0:e,new Ud(e,t,r,Z.opacity)}function T3(Z,V,d,x){return arguments.length===1?pM(Z):new Ud(Z,V,d,x??1)}function Ud(Z,V,d,x){this.h=+Z,this.s=+V,this.l=+d,this.opacity=+x}function dM(Z){return Z=(Z||0)%360,Z<0?Z+360:Z}function ax(Z){return Math.max(0,Math.min(1,Z||0))}function A3(Z,V,d){return(Z<60?V+(d-V)*Z/60:Z<180?d:Z<240?V+(d-V)*(240-Z)/60:V)*255}var $v,u0,c0,ug,jd,vM,mM,gM,yM,_M,xM,bM,S3,M3=Go({"node_modules/d3-color/src/color.js"(){b3(),$v=.7,u0=1/$v,c0="\\s*([+-]?\\d+)\\s*",ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vM=/^#([0-9a-f]{3,8})$/,mM=new RegExp(`^rgb\\(${c0},${c0},${c0}\\)$`),gM=new RegExp(`^rgb\\(${jd},${jd},${jd}\\)$`),yM=new RegExp(`^rgba\\(${c0},${c0},${c0},${ug}\\)$`),_M=new RegExp(`^rgba\\(${jd},${jd},${jd},${ug}\\)$`),xM=new RegExp(`^hsl\\(${ug},${jd},${jd}\\)$`),bM=new RegExp(`^hsla\\(${ug},${jd},${jd},${ug}\\)$`),S3={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},lg(Jv,w1,{copy(Z){return Object.assign(new this.constructor,this,Z)},displayable(){return this.rgb().displayable()},hex:sM,formatHex:sM,formatHex8:OB,formatHsl:BB,formatRgb:lM,toString:lM}),lg(Xh,tx,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},rgb(){return this},clamp(){return new Xh(s0(this.r),s0(this.g),s0(this.b),rx(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:cM,formatHex:cM,formatHex8:NB,formatRgb:fM,toString:fM})),lg(Ud,T3,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=this.h%360+(this.h<0)*360,V=isNaN(Z)||isNaN(this.s)?0:this.s,d=this.l,x=d+(d<.5?d:1-d)*V,S=2*d-x;return new Xh(A3(Z>=240?Z-240:Z+120,S,x),A3(Z,S,x),A3(Z<120?Z+240:Z-120,S,x),this.opacity)},clamp(){return new Ud(dM(this.h),ax(this.s),ax(this.l),rx(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 Z=rx(this.opacity);return`${Z===1?"hsl(":"hsla("}${dM(this.h)}, ${ax(this.s)*100}%, ${ax(this.l)*100}%${Z===1?")":`, ${Z})`}`}}))}}),E3,k3,wM=Go({"node_modules/d3-color/src/math.js"(){E3=Math.PI/180,k3=180/Math.PI}});function TM(Z){if(Z instanceof rv)return new rv(Z.l,Z.a,Z.b,Z.opacity);if(Z instanceof Mv)return AM(Z);Z instanceof Xh||(Z=w3(Z));var V=R3(Z.r),d=R3(Z.g),x=R3(Z.b),S=L3((.2225045*V+.7168786*d+.0606169*x)/F3),E,e;return V===d&&d===x?E=e=S:(E=L3((.4360747*V+.3850649*d+.1430804*x)/z3),e=L3((.0139322*V+.0971045*d+.7141733*x)/O3)),new rv(116*S-16,500*(E-S),200*(S-e),Z.opacity)}function C3(Z,V,d,x){return arguments.length===1?TM(Z):new rv(Z,V,d,x??1)}function rv(Z,V,d,x){this.l=+Z,this.a=+V,this.b=+d,this.opacity=+x}function L3(Z){return Z>SM?Math.pow(Z,.3333333333333333):Z/N3+B3}function P3(Z){return Z>f0?Z*Z*Z:N3*(Z-B3)}function I3(Z){return 255*(Z<=.0031308?12.92*Z:1.055*Math.pow(Z,.4166666666666667)-.055)}function R3(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function UB(Z){if(Z instanceof Mv)return new Mv(Z.h,Z.c,Z.l,Z.opacity);if(Z instanceof rv||(Z=TM(Z)),Z.a===0&&Z.b===0)return new Mv(NaN,0<Z.l&&Z.l<100?0:NaN,Z.l,Z.opacity);var V=Math.atan2(Z.b,Z.a)*k3;return new Mv(V<0?V+360:V,Math.sqrt(Z.a*Z.a+Z.b*Z.b),Z.l,Z.opacity)}function D3(Z,V,d,x){return arguments.length===1?UB(Z):new Mv(Z,V,d,x??1)}function Mv(Z,V,d,x){this.h=+Z,this.c=+V,this.l=+d,this.opacity=+x}function AM(Z){if(isNaN(Z.h))return new rv(Z.l,0,0,Z.opacity);var V=Z.h*E3;return new rv(Z.l,Math.cos(V)*Z.c,Math.sin(V)*Z.c,Z.opacity)}var T1,z3,F3,O3,B3,f0,N3,SM,jB=Go({"node_modules/d3-color/src/lab.js"(){b3(),M3(),wM(),T1=18,z3=.96422,F3=1,O3=.82521,B3=4/29,f0=6/29,N3=3*f0*f0,SM=f0*f0*f0,lg(rv,C3,b1(Jv,{brighter(Z){return new rv(this.l+T1*(Z??1),this.a,this.b,this.opacity)},darker(Z){return new rv(this.l-T1*(Z??1),this.a,this.b,this.opacity)},rgb(){var Z=(this.l+16)/116,V=isNaN(this.a)?Z:Z+this.a/500,d=isNaN(this.b)?Z:Z-this.b/200;return V=z3*P3(V),Z=F3*P3(Z),d=O3*P3(d),new Xh(I3(3.1338561*V-1.6168667*Z-.4906146*d),I3(-.9787684*V+1.9161415*Z+.033454*d),I3(.0719453*V-.2289914*Z+1.4052427*d),this.opacity)}})),lg(Mv,D3,b1(Jv,{brighter(Z){return new Mv(this.h,this.c,this.l+T1*(Z??1),this.opacity)},darker(Z){return new Mv(this.h,this.c,this.l-T1*(Z??1),this.opacity)},rgb(){return AM(this).rgb()}}))}});function qB(Z){if(Z instanceof h0)return new h0(Z.h,Z.s,Z.l,Z.opacity);Z instanceof Xh||(Z=w3(Z));var V=Z.r/255,d=Z.g/255,x=Z.b/255,S=(G3*x+q3*V-V3*d)/(G3+q3-V3),E=x-S,e=(cg*(d-S)-nx*E)/A1,t=Math.sqrt(e*e+E*E)/(cg*S*(1-S)),r=t?Math.atan2(e,E)*k3-120:NaN;return new h0(r<0?r+360:r,t,S,Z.opacity)}function U3(Z,V,d,x){return arguments.length===1?qB(Z):new h0(Z,V,d,x??1)}function h0(Z,V,d,x){this.h=+Z,this.s=+V,this.l=+d,this.opacity=+x}var j3,ix,nx,A1,cg,q3,V3,G3,VB=Go({"node_modules/d3-color/src/cubehelix.js"(){b3(),M3(),wM(),j3=-.14861,ix=1.78277,nx=-.29227,A1=-.90649,cg=1.97294,q3=cg*A1,V3=cg*ix,G3=ix*nx-A1*j3,lg(h0,U3,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new h0(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new h0(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=isNaN(this.h)?0:(this.h+120)*E3,V=+this.l,d=isNaN(this.s)?0:this.s*V*(1-V),x=Math.cos(Z),S=Math.sin(Z);return new Xh(255*(V+d*(j3*x+ix*S)),255*(V+d*(nx*x+A1*S)),255*(V+d*(cg*x)),this.opacity)}}))}}),fg=Go({"node_modules/d3-color/src/index.js"(){M3(),jB(),VB()}});function MM(Z,V,d,x,S){var E=Z*Z,e=E*Z;return((1-3*Z+3*E-e)*V+(4-6*E+3*e)*d+(1+3*Z+3*E-3*e)*x+e*S)/6}function EM(Z){var V=Z.length-1;return function(d){var x=d<=0?d=0:d>=1?(d=1,V-1):Math.floor(d*V),S=Z[x],E=Z[x+1],e=x>0?Z[x-1]:2*S-E,t=x<V-1?Z[x+2]:2*E-S;return MM((d-x/V)*V,e,S,E,t)}}var H3=Go({"node_modules/d3-interpolate/src/basis.js"(){}});function kM(Z){var V=Z.length;return function(d){var x=Math.floor(((d%=1)<0?++d:d)*V),S=Z[(x+V-1)%V],E=Z[x%V],e=Z[(x+1)%V],t=Z[(x+2)%V];return MM((d-x/V)*V,S,E,e,t)}}var CM=Go({"node_modules/d3-interpolate/src/basisClosed.js"(){H3()}}),S1,LM=Go({"node_modules/d3-interpolate/src/constant.js"(){S1=Z=>()=>Z}});function PM(Z,V){return function(d){return Z+d*V}}function GB(Z,V,d){return Z=Math.pow(Z,d),V=Math.pow(V,d)-Z,d=1/d,function(x){return Math.pow(Z+x*V,d)}}function ox(Z,V){var d=V-Z;return d?PM(Z,d>180||d<-180?d-360*Math.round(d/360):d):S1(isNaN(Z)?V:Z)}function HB(Z){return(Z=+Z)==1?Zh:function(V,d){return d-V?GB(V,d,Z):S1(isNaN(V)?d:V)}}function Zh(Z,V){var d=V-Z;return d?PM(Z,d):S1(isNaN(Z)?V:Z)}var hg=Go({"node_modules/d3-interpolate/src/color.js"(){LM()}});function IM(Z){return function(V){var d=V.length,x=new Array(d),S=new Array(d),E=new Array(d),e,t;for(e=0;e<d;++e)t=tx(V[e]),x[e]=t.r||0,S[e]=t.g||0,E[e]=t.b||0;return x=Z(x),S=Z(S),E=Z(E),t.opacity=1,function(r){return t.r=x(r),t.g=S(r),t.b=E(r),t+""}}}var sx,RM,DM,zM=Go({"node_modules/d3-interpolate/src/rgb.js"(){fg(),H3(),CM(),hg(),sx=function Z(V){var d=HB(V);function x(S,E){var e=d((S=tx(S)).r,(E=tx(E)).r),t=d(S.g,E.g),r=d(S.b,E.b),o=Zh(S.opacity,E.opacity);return function(a){return S.r=e(a),S.g=t(a),S.b=r(a),S.opacity=o(a),S+""}}return x.gamma=Z,x}(1),RM=IM(EM),DM=IM(kM)}});function W3(Z,V){V||(V=[]);var d=Z?Math.min(V.length,Z.length):0,x=V.slice(),S;return function(E){for(S=0;S<d;++S)x[S]=Z[S]*(1-E)+V[S]*E;return x}}function FM(Z){return ArrayBuffer.isView(Z)&&!(Z instanceof DataView)}var X3=Go({"node_modules/d3-interpolate/src/numberArray.js"(){}});function WB(Z,V){return(FM(V)?W3:OM)(Z,V)}function OM(Z,V){var d=V?V.length:0,x=Z?Math.min(d,Z.length):0,S=new Array(x),E=new Array(d),e;for(e=0;e<x;++e)S[e]=fx(Z[e],V[e]);for(;e<d;++e)E[e]=V[e];return function(t){for(e=0;e<x;++e)E[e]=S[e](t);return E}}var BM=Go({"node_modules/d3-interpolate/src/array.js"(){hx(),X3()}});function NM(Z,V){var d=new Date;return Z=+Z,V=+V,function(x){return d.setTime(Z*(1-x)+V*x),d}}var UM=Go({"node_modules/d3-interpolate/src/date.js"(){}});function av(Z,V){return Z=+Z,V=+V,function(d){return Z*(1-d)+V*d}}var lx=Go({"node_modules/d3-interpolate/src/number.js"(){}});function jM(Z,V){var d={},x={},S;(Z===null||typeof Z!="object")&&(Z={}),(V===null||typeof V!="object")&&(V={});for(S in V)S in Z?d[S]=fx(Z[S],V[S]):x[S]=V[S];return function(E){for(S in d)x[S]=d[S](E);return x}}var qM=Go({"node_modules/d3-interpolate/src/object.js"(){hx()}});function XB(Z){return function(){return Z}}function ZB(Z){return function(V){return Z(V)+""}}function VM(Z,V){var d=ux.lastIndex=cx.lastIndex=0,x,S,E,e=-1,t=[],r=[];for(Z=Z+"",V=V+"";(x=ux.exec(Z))&&(S=cx.exec(V));)(E=S.index)>d&&(E=V.slice(d,E),t[e]?t[e]+=E:t[++e]=E),(x=x[0])===(S=S[0])?t[e]?t[e]+=S:t[++e]=S:(t[++e]=null,r.push({i:e,x:av(x,S)})),d=cx.lastIndex;return d<V.length&&(E=V.slice(d),t[e]?t[e]+=E:t[++e]=E),t.length<2?r[0]?ZB(r[0].x):XB(V):(V=r.length,function(o){for(var a=0,n;a<V;++a)t[(n=r[a]).i]=n.x(o);return t.join("")})}var ux,cx,GM=Go({"node_modules/d3-interpolate/src/string.js"(){lx(),ux=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cx=new RegExp(ux.source,"g")}});function fx(Z,V){var d=typeof V,x;return V==null||d==="boolean"?S1(V):(d==="number"?av:d==="string"?(x=w1(V))?(V=x,sx):VM:V instanceof w1?sx:V instanceof Date?NM:FM(V)?W3:Array.isArray(V)?OM:typeof V.valueOf!="function"&&typeof V.toString!="function"||isNaN(V)?jM:av)(Z,V)}var hx=Go({"node_modules/d3-interpolate/src/value.js"(){fg(),zM(),BM(),UM(),lx(),qM(),GM(),LM(),X3()}});function YB(Z){var V=Z.length;return function(d){return Z[Math.max(0,Math.min(V-1,Math.floor(d*V)))]}}var KB=Go({"node_modules/d3-interpolate/src/discrete.js"(){}});function JB(Z,V){var d=ox(+Z,+V);return function(x){var S=d(x);return S-360*Math.floor(S/360)}}var $B=Go({"node_modules/d3-interpolate/src/hue.js"(){hg()}});function QB(Z,V){return Z=+Z,V=+V,function(d){return Math.round(Z*(1-d)+V*d)}}var eN=Go({"node_modules/d3-interpolate/src/round.js"(){}});function HM(Z,V,d,x,S,E){var e,t,r;return(e=Math.sqrt(Z*Z+V*V))&&(Z/=e,V/=e),(r=Z*d+V*x)&&(d-=Z*r,x-=V*r),(t=Math.sqrt(d*d+x*x))&&(d/=t,x/=t,r/=t),Z*x<V*d&&(Z=-Z,V=-V,r=-r,e=-e),{translateX:S,translateY:E,rotate:Math.atan2(V,Z)*Z3,skewX:Math.atan(r)*Z3,scaleX:e,scaleY:t}}var Z3,px,tN=Go({"node_modules/d3-interpolate/src/transform/decompose.js"(){Z3=180/Math.PI,px={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}});function rN(Z){let V=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Z+"");return V.isIdentity?px:HM(V.a,V.b,V.c,V.d,V.e,V.f)}function aN(Z){return Z==null||(dx||(dx=document.createElementNS("http://www.w3.org/2000/svg","g")),dx.setAttribute("transform",Z),!(Z=dx.transform.baseVal.consolidate()))?px:(Z=Z.matrix,HM(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f))}var dx,iN=Go({"node_modules/d3-interpolate/src/transform/parse.js"(){tN()}});function WM(Z,V,d,x){function S(o){return o.length?o.pop()+" ":""}function E(o,a,n,i,s,h){if(o!==n||a!==i){var f=s.push("translate(",null,V,null,d);h.push({i:f-4,x:av(o,n)},{i:f-2,x:av(a,i)})}else(n||i)&&s.push("translate("+n+V+i+d)}function e(o,a,n,i){o!==a?(o-a>180?a+=360:a-o>180&&(o+=360),i.push({i:n.push(S(n)+"rotate(",null,x)-2,x:av(o,a)})):a&&n.push(S(n)+"rotate("+a+x)}function t(o,a,n,i){o!==a?i.push({i:n.push(S(n)+"skewX(",null,x)-2,x:av(o,a)}):a&&n.push(S(n)+"skewX("+a+x)}function r(o,a,n,i,s,h){if(o!==n||a!==i){var f=s.push(S(s)+"scale(",null,",",null,")");h.push({i:f-4,x:av(o,n)},{i:f-2,x:av(a,i)})}else(n!==1||i!==1)&&s.push(S(s)+"scale("+n+","+i+")")}return function(o,a){var n=[],i=[];return o=Z(o),a=Z(a),E(o.translateX,o.translateY,a.translateX,a.translateY,n,i),e(o.rotate,a.rotate,n,i),t(o.skewX,a.skewX,n,i),r(o.scaleX,o.scaleY,a.scaleX,a.scaleY,n,i),o=a=null,function(s){for(var h=-1,f=i.length,v;++h<f;)n[(v=i[h]).i]=v.x(s);return n.join("")}}}var XM,ZM,nN=Go({"node_modules/d3-interpolate/src/transform/index.js"(){lx(),iN(),XM=WM(rN,"px, ","px)","deg)"),ZM=WM(aN,", ",")",")")}});function YM(Z){return((Z=Math.exp(Z))+1/Z)/2}function oN(Z){return((Z=Math.exp(Z))-1/Z)/2}function sN(Z){return((Z=Math.exp(2*Z))-1)/(Z+1)}var KM,JM,lN=Go({"node_modules/d3-interpolate/src/zoom.js"(){KM=1e-12,JM=function Z(V,d,x){function S(E,e){var t=E[0],r=E[1],o=E[2],a=e[0],n=e[1],i=e[2],s=a-t,h=n-r,f=s*s+h*h,v,c;if(f<KM)c=Math.log(i/o)/V,v=function(M){return[t+M*s,r+M*h,o*Math.exp(V*M*c)]};else{var T=Math.sqrt(f),l=(i*i-o*o+x*f)/(2*o*d*T),_=(i*i-o*o-x*f)/(2*i*d*T),w=Math.log(Math.sqrt(l*l+1)-l),A=Math.log(Math.sqrt(_*_+1)-_);c=(A-w)/V,v=function(M){var g=M*c,b=YM(w),p=o/(d*T)*(b*sN(V*g+w)-oN(w));return[t+p*s,r+p*h,o*b/YM(V*g+w)]}}return v.duration=c*1e3*V/Math.SQRT2,v}return S.rho=function(E){var e=Math.max(.001,+E),t=e*e,r=t*t;return Z(e,t,r)},S}(Math.SQRT2,2,4)}});function $M(Z){return function(V,d){var x=Z((V=T3(V)).h,(d=T3(d)).h),S=Zh(V.s,d.s),E=Zh(V.l,d.l),e=Zh(V.opacity,d.opacity);return function(t){return V.h=x(t),V.s=S(t),V.l=E(t),V.opacity=e(t),V+""}}}var QM,eE,uN=Go({"node_modules/d3-interpolate/src/hsl.js"(){fg(),hg(),QM=$M(ox),eE=$M(Zh)}});function cN(Z,V){var d=Zh((Z=C3(Z)).l,(V=C3(V)).l),x=Zh(Z.a,V.a),S=Zh(Z.b,V.b),E=Zh(Z.opacity,V.opacity);return function(e){return Z.l=d(e),Z.a=x(e),Z.b=S(e),Z.opacity=E(e),Z+""}}var fN=Go({"node_modules/d3-interpolate/src/lab.js"(){fg(),hg()}});function tE(Z){return function(V,d){var x=Z((V=D3(V)).h,(d=D3(d)).h),S=Zh(V.c,d.c),E=Zh(V.l,d.l),e=Zh(V.opacity,d.opacity);return function(t){return V.h=x(t),V.c=S(t),V.l=E(t),V.opacity=e(t),V+""}}}var rE,aE,hN=Go({"node_modules/d3-interpolate/src/hcl.js"(){fg(),hg(),rE=tE(ox),aE=tE(Zh)}});function iE(Z){return function V(d){d=+d;function x(S,E){var e=Z((S=U3(S)).h,(E=U3(E)).h),t=Zh(S.s,E.s),r=Zh(S.l,E.l),o=Zh(S.opacity,E.opacity);return function(a){return S.h=e(a),S.s=t(a),S.l=r(Math.pow(a,d)),S.opacity=o(a),S+""}}return x.gamma=V,x}(1)}var nE,oE,pN=Go({"node_modules/d3-interpolate/src/cubehelix.js"(){fg(),hg(),nE=iE(ox),oE=iE(Zh)}});function dN(Z,V){V===void 0&&(V=Z,Z=fx);for(var d=0,x=V.length-1,S=V[0],E=new Array(x<0?0:x);d<x;)E[d]=Z(S,S=V[++d]);return function(e){var t=Math.max(0,Math.min(x-1,Math.floor(e*=x)));return E[t](e-t)}}var vN=Go({"node_modules/d3-interpolate/src/piecewise.js"(){hx()}});function mN(Z,V){for(var d=new Array(V),x=0;x<V;++x)d[x]=Z(x/(V-1));return d}var gN=Go({"node_modules/d3-interpolate/src/quantize.js"(){}}),p0={};Kl(p0,{interpolate:()=>fx,interpolateArray:()=>WB,interpolateBasis:()=>EM,interpolateBasisClosed:()=>kM,interpolateCubehelix:()=>nE,interpolateCubehelixLong:()=>oE,interpolateDate:()=>NM,interpolateDiscrete:()=>YB,interpolateHcl:()=>rE,interpolateHclLong:()=>aE,interpolateHsl:()=>QM,interpolateHslLong:()=>eE,interpolateHue:()=>JB,interpolateLab:()=>cN,interpolateNumber:()=>av,interpolateNumberArray:()=>W3,interpolateObject:()=>jM,interpolateRgb:()=>sx,interpolateRgbBasis:()=>RM,interpolateRgbBasisClosed:()=>DM,interpolateRound:()=>QB,interpolateString:()=>VM,interpolateTransformCss:()=>XM,interpolateTransformSvg:()=>ZM,interpolateZoom:()=>JM,piecewise:()=>dN,quantize:()=>mN});var pg=Go({"node_modules/d3-interpolate/src/index.js"(){hx(),BM(),H3(),CM(),UM(),KB(),$B(),lx(),X3(),qM(),eN(),GM(),nN(),lN(),zM(),uN(),fN(),hN(),pN(),vN(),gN()}}),Y3=He({"src/traces/sunburst/fill_one.js"(Z,V){"use strict";var d=es(),x=Jn();V.exports=function(E,e,t,r,o){var a=e.data.data,n=a.i,i=o||a.color;if(n>=0){e.i=a.i;var s=t.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=i,e.color=i):(s.color=i,e.color=i),d.pointStyle(E,t,r,e)}else x.fill(E,i)}}}),sE=He({"src/traces/sunburst/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._sunburstlayer.selectAll(".trace");E(o,a,"sunburst"),a.each(function(n){var i=d.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(f){d.select(this).call(r,f,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,f=s.i,v=S.castOption(n,f,"marker.line.color")||x.defaultLine,c=S.castOption(n,f,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",c).call(x.stroke,v).style("opacity",h?n.leaf.opacity:null)}V.exports={style:t,styleOne:r}}}),Qv=He({"src/traces/sunburst/helpers.js"(Z){"use strict";var V=sa(),d=Jn(),x=Kd(),S=t0();Z.findEntryWithLevel=function(r,o){var a;return o&&r.eachAfter(function(n){if(Z.getPtId(n)===o)return a=n.copy()}),a||r},Z.findEntryWithChild=function(r,o){var a;return r.eachAfter(function(n){for(var i=n.children||[],s=0;s<i.length;s++){var h=i[s];if(Z.getPtId(h)===o)return a=n.copy()}}),a||r},Z.isEntry=function(r){return!r.parent},Z.isLeaf=function(r){return!r.children},Z.getPtId=function(r){return r.data.data.id},Z.getPtLabel=function(r){return r.data.data.label},Z.getValue=function(r){return r.value},Z.isHierarchyRoot=function(r){return t(r)===""},Z.setSliceCursor=function(r,o,a){var n=a.isTransitioning;if(!n){var i=r.datum();n=a.hideOnRoot&&Z.isHierarchyRoot(i)||a.hideOnLeaves&&Z.isLeaf(i)}x(r,n?null:"pointer")};function E(r,o,a){return{color:Z.getOutsideTextFontKey("color",r,o,a),family:Z.getOutsideTextFontKey("family",r,o,a),size:Z.getOutsideTextFontKey("size",r,o,a),weight:Z.getOutsideTextFontKey("weight",r,o,a),style:Z.getOutsideTextFontKey("style",r,o,a),variant:Z.getOutsideTextFontKey("variant",r,o,a),textcase:Z.getOutsideTextFontKey("textcase",r,o,a),lineposition:Z.getOutsideTextFontKey("lineposition",r,o,a),shadow:Z.getOutsideTextFontKey("shadow",r,o,a)}}function e(r,o,a,n){var i=(n||{}).onPathbar,s=o.data.data,h=s.i,f=V.castOption(r,h,(i?"pathbar.textfont":"insidetextfont")+".color");return!f&&r._input.textfont&&(f=V.castOption(r._input,h,"textfont.color")),{color:f||d.contrast(s.color),family:Z.getInsideTextFontKey("family",r,o,a,n),size:Z.getInsideTextFontKey("size",r,o,a,n),weight:Z.getInsideTextFontKey("weight",r,o,a,n),style:Z.getInsideTextFontKey("style",r,o,a,n),variant:Z.getInsideTextFontKey("variant",r,o,a,n),textcase:Z.getInsideTextFontKey("textcase",r,o,a,n),lineposition:Z.getInsideTextFontKey("lineposition",r,o,a,n),shadow:Z.getInsideTextFontKey("shadow",r,o,a,n)}}Z.getInsideTextFontKey=function(r,o,a,n,i){var s=(i||{}).onPathbar,h=s?"pathbar.textfont":"insidetextfont",f=a.data.data.i;return V.castOption(o,f,h+"."+r)||V.castOption(o,f,"textfont."+r)||n.size},Z.getOutsideTextFontKey=function(r,o,a,n){var i=a.data.data.i;return V.castOption(o,i,"outsidetextfont."+r)||V.castOption(o,i,"textfont."+r)||n.size},Z.isOutsideText=function(r,o){return!r._hasColorscale&&Z.isHierarchyRoot(o)},Z.determineTextFont=function(r,o,a,n){return Z.isOutsideText(r,o)?E(r,o,a):e(r,o,a,n)},Z.hasTransition=function(r){return!!(r&&r.duration>0)},Z.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Z.isHeader=function(r,o){return!(Z.isLeaf(r)||r.depth===o._maxDepth-1)};function t(r){return r.data.data.pid}Z.getParent=function(r,o){return Z.findEntryWithLevel(r,t(o))},Z.listPath=function(r,o){var a=r.parent;if(!a)return[];var n=o?[a.data[o]]:[a];return Z.listPath(a,o).concat(n)},Z.getPath=function(r){return Z.listPath(r,"label").join("/")+"/"},Z.formatValue=S.formatPieValue,Z.formatPercent=function(r,o){var a=V.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,o)),a}}}),vx=He({"src/traces/sunburst/fx.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=$p().appendArrayPointValue,E=rf(),e=sa(),t=Qy(),r=Qv(),o=t0(),a=o.formatPieValue;V.exports=function(s,h,f,v,c){var T=v[0],l=T.trace,_=T.hierarchy,w=l.type==="sunburst",A=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var M=function(p){var u=f._fullLayout;if(!(f._dragging||u.hovermode===!1)){var y=f._fullData[l.index],m=p.data.data,R=m.i,L=r.isHierarchyRoot(p),z=r.getParent(_,p),F=r.getValue(p),N=function(Q){return e.castOption(y,R,Q)},O=N("hovertemplate"),P=E.castHoverinfo(y,u,R),U=u.separators,B;if(O||P&&P!=="none"&&P!=="skip"){var X,$;w&&(X=T.cx+p.pxmid[0]*(1-p.rInscribed),$=T.cy+p.pxmid[1]*(1-p.rInscribed)),A&&(X=p._hoverX,$=p._hoverY);var le={},ce=[],de=[],G=function(Q){return ce.indexOf(Q)!==-1};P&&(ce=P==="all"?y._module.attributes.hoverinfo.flags:P.split("+")),le.label=m.label,G("label")&&le.label&&de.push(le.label),m.hasOwnProperty("v")&&(le.value=m.v,le.valueLabel=a(le.value,U),G("value")&&de.push(le.valueLabel)),le.currentPath=p.currentPath=r.getPath(p.data),G("current path")&&!L&&de.push(le.currentPath);var Y,ee=[],q=function(){ee.indexOf(Y)===-1&&(de.push(Y),ee.push(Y))};le.percentParent=p.percentParent=F/r.getValue(z),le.parent=p.parentString=r.getPtLabel(z),G("percent parent")&&(Y=r.formatPercent(le.percentParent,U)+" of "+le.parent,q()),le.percentEntry=p.percentEntry=F/r.getValue(h),le.entry=p.entry=r.getPtLabel(h),G("percent entry")&&!L&&!p.onPathbar&&(Y=r.formatPercent(le.percentEntry,U)+" of "+le.entry,q()),le.percentRoot=p.percentRoot=F/r.getValue(_),le.root=p.root=r.getPtLabel(_),G("percent root")&&!L&&(Y=r.formatPercent(le.percentRoot,U)+" of "+le.root,q()),le.text=N("hovertext")||N("text"),G("text")&&(Y=le.text,e.isValidTextValue(Y)&&de.push(Y)),B=[n(p,y,c.eventDataKeys)];var se={trace:y,y:$,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:de.join("<br>"),name:O||G("name")?y.name:void 0,color:N("hoverlabel.bgcolor")||m.color,borderColor:N("hoverlabel.bordercolor"),fontFamily:N("hoverlabel.font.family"),fontSize:N("hoverlabel.font.size"),fontColor:N("hoverlabel.font.color"),fontWeight:N("hoverlabel.font.weight"),fontStyle:N("hoverlabel.font.style"),fontVariant:N("hoverlabel.font.variant"),nameLength:N("hoverlabel.namelength"),textAlign:N("hoverlabel.align"),hovertemplate:O,hovertemplateLabels:le,eventData:B};w&&(se.x0=X-p.rInscribed*p.rpx1,se.x1=X+p.rInscribed*p.rpx1,se.idealAlign=p.pxmid[0]<0?"left":"right"),A&&(se.x=X,se.idealAlign=X<0?"left":"right");var ae=[];E.loneHover(se,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:f,inOut_bbox:ae}),B[0].bbox=ae[0],l._hasHoverLabel=!0}if(A){var j=s.select("path.surface");c.styleOne(j,p,y,f,{hovered:!0})}l._hasHoverEvent=!0,f.emit("plotly_hover",{points:B||[n(p,y,c.eventDataKeys)],event:d.event})}},g=function(p){var u=f._fullLayout,y=f._fullData[l.index],m=d.select(this).datum();if(l._hasHoverEvent&&(p.originalEvent=d.event,f.emit("plotly_unhover",{points:[n(m,y,c.eventDataKeys)],event:d.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(E.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1),A){var R=s.select("path.surface");c.styleOne(R,m,y,f,{hovered:!1})}},b=function(p){var u=f._fullLayout,y=f._fullData[l.index],m=w&&(r.isHierarchyRoot(p)||r.isLeaf(p)),R=r.getPtId(p),L=r.isEntry(p)?r.findEntryWithChild(_,R):r.findEntryWithLevel(_,R),z=r.getPtId(L),F={points:[n(p,y,c.eventDataKeys)],event:d.event};m||(F.nextLevel=z);var N=t.triggerHandler(f,"plotly_"+l.type+"click",F);if(N!==!1&&u.hovermode&&(f._hoverdata=[n(p,y,c.eventDataKeys)],E.click(f,d.event)),!m&&N!==!1&&!f._dragging&&!f._transitioning){x.call("_storeDirectGUIEdit",y,u._tracePreGUI[y.uid],{level:y.level});var O={data:[{level:z}],traces:[l.index]},P={frame:{redraw:!1,duration:c.transitionTime},transition:{duration:c.transitionTime,easing:c.transitionEasing},mode:"immediate",fromcurrent:!0};E.loneUnhover(u._hoverlayer.node()),x.call("animate",f,O,P)}};s.on("mouseover",M),s.on("mouseout",g),s.on("click",b)};function n(i,s,h){for(var f=i.data.data,v={curveNumber:s.index,pointNumber:f.i,data:s._input,fullData:s},c=0;c<h.length;c++){var T=h[c];T in i&&(v[T]=i[T])}return"parentString"in i&&!r.isHierarchyRoot(i)&&(v.parent=i.parentString),S(v,s,f.i),v}}}),K3=He({"src/traces/sunburst/plot.js"(Z){"use strict";var V=Wn(),d=$_(),x=(pg(),zf(p0)).interpolate,S=es(),E=sa(),e=ou(),t=Sp(),r=t.recordMinTextSize,o=t.clearMinTextSize,a=x3(),n=t0().getRotationAngle,i=a.computeTransform,s=a.transformInsideText,h=sE().styleOne,f=Nd().resizeText,v=vx(),c=nM(),T=Qv();Z.plot=function(g,b,p,u){var y=g._fullLayout,m=y._sunburstlayer,R,L,z=!p,F=!y.uniformtext.mode&&T.hasTransition(p);if(o("sunburst",y),R=m.selectAll("g.trace.sunburst").data(b,function(O){return O[0].trace.uid}),R.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),R.order(),F){u&&(L=u());var N=V.transition().duration(p.duration).ease(p.easing).each("end",function(){L&&L()}).each("interrupt",function(){L&&L()});N.each(function(){m.selectAll("g.trace").each(function(O){l(g,O,this,p)})})}else R.each(function(O){l(g,O,this,p)}),y.uniformtext.mode&&f(g,y._sunburstlayer.selectAll(".trace"),"sunburst");z&&R.exit().remove()};function l(g,b,p,u){var y=g._context.staticPlot,m=g._fullLayout,R=!m.uniformtext.mode&&T.hasTransition(u),L=V.select(p),z=L.selectAll("g.slice"),F=b[0],N=F.trace,O=F.hierarchy,P=T.findEntryWithLevel(O,N.level),U=T.getMaxDepth(N),B=m._size,X=N.domain,$=B.w*(X.x[1]-X.x[0]),le=B.h*(X.y[1]-X.y[0]),ce=.5*Math.min($,le),de=F.cx=B.l+B.w*(X.x[1]+X.x[0])/2,G=F.cy=B.t+B.h*(1-X.y[0])-le/2;if(!P)return z.remove();var Y=null,ee={};R&&z.each(function(ne){ee[T.getPtId(ne)]={rpx0:ne.rpx0,rpx1:ne.rpx1,x0:ne.x0,x1:ne.x1,transform:ne.transform},!Y&&T.isEntry(ne)&&(Y=ne)});var q=_(P).descendants(),se=P.height+1,ae=0,j=U;F.hasMultipleRoots&&T.isHierarchyRoot(P)&&(q=q.slice(1),se-=1,ae=1,j+=1),q=q.filter(function(ne){return ne.y1<=j});var Q=n(N.rotation);Q&&q.forEach(function(ne){ne.x0+=Q,ne.x1+=Q});var re=Math.min(se,U),pe=function(ne){return(ne-ae)/re*ce},we=function(ne,Ce){return[ne*Math.cos(Ce),-ne*Math.sin(Ce)]},Se=function(ne){return E.pathAnnulus(ne.rpx0,ne.rpx1,ne.x0,ne.x1,de,G)},Ie=function(ne){return de+A(ne)[0]*(ne.transform.rCenter||0)+(ne.transform.x||0)},Re=function(ne){return G+A(ne)[1]*(ne.transform.rCenter||0)+(ne.transform.y||0)};z=z.data(q,T.getPtId),z.enter().append("g").classed("slice",!0),R?z.exit().transition().each(function(){var ne=V.select(this),Ce=ne.select("path.surface");Ce.transition().attrTween("d",function(rt){var Ke=tt(rt);return function(Mt){return Se(Ke(Mt))}});var Ye=ne.select("g.slicetext");Ye.attr("opacity",0)}).remove():z.exit().remove(),z.order();var We=null;if(R&&Y){var at=T.getPtId(Y);z.each(function(ne){We===null&&T.getPtId(ne)===at&&(We=ne.x1)})}var nt=z;R&&(nt=nt.transition().each("end",function(){var ne=V.select(this);T.setSliceCursor(ne,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),nt.each(function(ne){var Ce=V.select(this),Ye=E.ensureSingle(Ce,"path","surface",function(Gt){Gt.style("pointer-events",y?"none":"all")});ne.rpx0=pe(ne.y0),ne.rpx1=pe(ne.y1),ne.xmid=(ne.x0+ne.x1)/2,ne.pxmid=we(ne.rpx1,ne.xmid),ne.midangle=-(ne.xmid-Math.PI/2),ne.startangle=-(ne.x0-Math.PI/2),ne.stopangle=-(ne.x1-Math.PI/2),ne.halfangle=.5*Math.min(E.angleDelta(ne.x0,ne.x1)||Math.PI,Math.PI),ne.ring=1-ne.rpx0/ne.rpx1,ne.rInscribed=w(ne,N),R?Ye.transition().attrTween("d",function(Gt){var Mr=qe(Gt);return function(mr){return Se(Mr(mr))}}):Ye.attr("d",Se),Ce.call(v,P,g,b,{eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:g._transitioning}),Ye.call(h,ne,N,g);var rt=E.ensureSingle(Ce,"g","slicetext"),Ke=E.ensureSingle(rt,"text","",function(Gt){Gt.attr("data-notex",1)}),Mt=E.ensureUniformFontSize(g,T.determineTextFont(N,ne,m.font));Ke.text(Z.formatSliceLabel(ne,P,N,b,m)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,Mt).call(e.convertToTspans,g);var kt=S.bBox(Ke.node());ne.transform=s(kt,ne,F),ne.transform.targetX=Ie(ne),ne.transform.targetY=Re(ne);var Nt=function(Gt,Mr){var mr=Gt.transform;return i(mr,Mr),mr.fontSize=Mt.size,r(N.type,mr,m),E.getTextTransform(mr)};R?Ke.transition().attrTween("transform",function(Gt){var Mr=he(Gt);return function(mr){return Nt(Mr(mr),kt)}}):Ke.attr("transform",Nt(ne,kt))});function tt(ne){var Ce=T.getPtId(ne),Ye=ee[Ce],rt=ee[T.getPtId(P)],Ke;if(rt){var Mt=(ne.x1>rt.x1?2*Math.PI:0)+Q;Ke=ne.rpx1<rt.rpx1?{x0:ne.x0,x1:ne.x1,rpx0:0,rpx1:0}:{x0:Mt,x1:Mt,rpx0:ne.rpx0,rpx1:ne.rpx1}}else{var kt,Nt=T.getPtId(ne.parent);z.each(function(Er){if(T.getPtId(Er)===Nt)return kt=Er});var Gt=kt.children,Mr;Gt.forEach(function(Er,Ir){if(T.getPtId(Er)===Ce)return Mr=Ir});var mr=Gt.length,qr=x(kt.x0,kt.x1);Ke={rpx0:ce,rpx1:ce,x0:qr(Mr/mr),x1:qr((Mr+1)/mr)}}return x(Ye,Ke)}function qe(ne){var Ce=ee[T.getPtId(ne)],Ye,rt={x0:ne.x0,x1:ne.x1,rpx0:ne.rpx0,rpx1:ne.rpx1};if(Ce)Ye=Ce;else if(Y)if(ne.parent)if(We){var Ke=(ne.x1>We?2*Math.PI:0)+Q;Ye={x0:Ke,x1:Ke}}else Ye={rpx0:ce,rpx1:ce},E.extendFlat(Ye,ue(ne));else Ye={rpx0:0,rpx1:0};else Ye={x0:Q,x1:Q};return x(Ye,rt)}function he(ne){var Ce=ee[T.getPtId(ne)],Ye,rt=ne.transform;if(Ce)Ye=Ce;else if(Ye={rpx1:ne.rpx1,transform:{textPosAngle:rt.textPosAngle,scale:0,rotate:rt.rotate,rCenter:rt.rCenter,x:rt.x,y:rt.y}},Y)if(ne.parent)if(We){var Ke=ne.x1>We?2*Math.PI:0;Ye.x0=Ye.x1=Ke}else E.extendFlat(Ye,ue(ne));else Ye.x0=Ye.x1=Q;else Ye.x0=Ye.x1=Q;var Mt=x(Ye.transform.textPosAngle,ne.transform.textPosAngle),kt=x(Ye.rpx1,ne.rpx1),Nt=x(Ye.x0,ne.x0),Gt=x(Ye.x1,ne.x1),Mr=x(Ye.transform.scale,rt.scale),mr=x(Ye.transform.rotate,rt.rotate),qr=rt.rCenter===0?3:Ye.transform.rCenter===0?1/3:1,Er=x(Ye.transform.rCenter,rt.rCenter),Ir=function(_t){return Er(Math.pow(_t,qr))};return function(_t){var Oe=kt(_t),Je=Nt(_t),Ae=Gt(_t),Le=Ir(_t),Ue=we(Oe,(Je+Ae)/2),Ze=Mt(_t),st={pxmid:Ue,rpx1:Oe,transform:{textPosAngle:Ze,rCenter:Le,x:rt.x,y:rt.y}};return r(N.type,rt,m),{transform:{targetX:Ie(st),targetY:Re(st),scale:Mr(_t),rotate:mr(_t),rCenter:Le}}}}function ue(ne){var Ce=ne.parent,Ye=ee[T.getPtId(Ce)],rt={};if(Ye){var Ke=Ce.children,Mt=Ke.indexOf(ne),kt=Ke.length,Nt=x(Ye.x0,Ye.x1);rt.x0=Nt(Mt/kt),rt.x1=Nt(Mt/kt)}else rt.x0=rt.x1=0;return rt}}function _(g){return d.partition().size([2*Math.PI,g.height+1])(g)}Z.formatSliceLabel=function(g,b,p,u,y){var m=p.texttemplate,R=p.textinfo;if(!m&&(!R||R==="none"))return"";var L=y.separators,z=u[0],F=g.data.data,N=z.hierarchy,O=T.isHierarchyRoot(g),P=T.getParent(N,g),U=T.getValue(g);if(!m){var B=R.split("+"),X=function(ae){return B.indexOf(ae)!==-1},$=[],le;if(X("label")&&F.label&&$.push(F.label),F.hasOwnProperty("v")&&X("value")&&$.push(T.formatValue(F.v,L)),!O){X("current path")&&$.push(T.getPath(g.data));var ce=0;X("percent parent")&&ce++,X("percent entry")&&ce++,X("percent root")&&ce++;var de=ce>1;if(ce){var G,Y=function(ae){le=T.formatPercent(G,L),de&&(le+=" of "+ae),$.push(le)};X("percent parent")&&!O&&(G=U/T.getValue(P),Y("parent")),X("percent entry")&&(G=U/T.getValue(b),Y("entry")),X("percent root")&&(G=U/T.getValue(N),Y("root"))}}return X("text")&&(le=E.castOption(p,F.i,"text"),E.isValidTextValue(le)&&$.push(le)),$.join("<br>")}var ee=E.castOption(p,F.i,"texttemplate");if(!ee)return"";var q={};F.label&&(q.label=F.label),F.hasOwnProperty("v")&&(q.value=F.v,q.valueLabel=T.formatValue(F.v,L)),q.currentPath=T.getPath(g.data),O||(q.percentParent=U/T.getValue(P),q.percentParentLabel=T.formatPercent(q.percentParent,L),q.parent=T.getPtLabel(P)),q.percentEntry=U/T.getValue(b),q.percentEntryLabel=T.formatPercent(q.percentEntry,L),q.entry=T.getPtLabel(b),q.percentRoot=U/T.getValue(N),q.percentRootLabel=T.formatPercent(q.percentRoot,L),q.root=T.getPtLabel(N),F.hasOwnProperty("color")&&(q.color=F.color);var se=E.castOption(p,F.i,"text");return(E.isValidTextValue(se)||se==="")&&(q.text=se),q.customdata=E.castOption(p,F.i,"customdata"),E.texttemplateString({data:[q,p._meta],fallback:p.texttemplatefallback,labels:q,locale:y._d3locale,template:ee})};function w(g){return g.rpx0===0&&E.isFullCircle([g.x0,g.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(g.halfangle)),g.ring/2))}function A(g){return M(g.rpx1,g.transform.textPosAngle)}function M(g,b){return[g*Math.sin(b),-g*Math.cos(b)]}}}),yN=He({"src/traces/sunburst/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:DB(),categories:[],animatable:!0,attributes:J_(),layoutAttributes:oM(),supplyDefaults:zB(),supplyLayoutDefaults:FB(),calc:Q_().calc,crossTraceCalc:Q_().crossTraceCalc,plot:K3().plot,style:sE().style,colorbar:pp(),meta:{}}}}),_N=He({"lib/sunburst.js"(Z,V){"use strict";V.exports=yN()}}),xN=He({"src/traces/treemap/base_plot.js"(Z){"use strict";var V=bc();Z.name="treemap",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),dg=He({"src/traces/treemap/constants.js"(Z,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),J3=He({"src/traces/treemap/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=dg(),a=Qo().extendFlat,n=Gh().pattern;V.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.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:a({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:r.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},E("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:a({},t.textfont,{}),editType:"calc"},text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:d({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:a({},t.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:t.sort,root:r.root,domain:e({name:"treemap",trace:!0,editType:"calc"})}}}),lE=He({"src/traces/treemap/layout_attributes.js"(Z,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bN=He({"src/traces/treemap/defaults.js"(Z,V){"use strict";var d=sa(),x=J3(),S=Jn(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;V.exports=function(s,h,f,v){function c(y,m){return d.coerce(s,h,x,y,m)}var T=c("labels"),l=c("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=c("values");_&&_.length?c("branchvalues"):c("count"),c("level"),c("maxdepth");var w=c("tiling.packing");w==="squarify"&&c("tiling.squarifyratio"),c("tiling.flip"),c("tiling.pad");var A=c("text");c("texttemplate"),c("texttemplatefallback"),h.texttemplate||c("textinfo",d.isArrayOrTypedArray(A)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var M=c("pathbar.visible"),g="auto";e(s,h,v,c,g,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition");var b=h.textposition.indexOf("bottom")!==-1;r(s,h,v,c);var p=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;p?n(s,h,v,c,{prefix:"marker.",cLetter:"c"}):c("marker.depthfade",!(h.marker.colors||[]).length);var u=h.textfont.size*2;c("marker.pad.t",b?u/4:u),c("marker.pad.l",u/4),c("marker.pad.r",u/4),c("marker.pad.b",b?u:u/4),c("marker.cornerradius"),h._hovered={marker:{line:{width:2,color:S.contrast(v.paper_bgcolor)}}},M&&(c("pathbar.thickness",h.pathbar.textfont.size+2*t),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),E(h,v,c),h._length=null}}}),wN=He({"src/traces/treemap/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=lE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("treemapcolorway",e.colorway),t("extendtreemapcolors")}}}),uE=He({"src/traces/treemap/calc.js"(Z){"use strict";var V=Q_();Z.calc=function(d,x){return V.calc(d,x)},Z.crossTraceCalc=function(d){return V._runCrossTraceCalc("treemap",d)}}}),cE=He({"src/traces/treemap/flip_tree.js"(Z,V){"use strict";V.exports=function d(x,S,E){var e;E.swapXY&&(e=x.x0,x.x0=x.y0,x.y0=e,e=x.x1,x.x1=x.y1,x.y1=e),E.flipX&&(e=x.x0,x.x0=S[0]-x.x1,x.x1=S[0]-e),E.flipY&&(e=x.y0,x.y0=S[1]-x.y1,x.y1=S[1]-e);var t=x.children;if(t)for(var r=0;r<t.length;r++)d(t[r],S,E)}}}),fE=He({"src/traces/treemap/partition.js"(Z,V){"use strict";var d=$_(),x=cE();V.exports=function(e,t,r){var o=r.flipX,a=r.flipY,n=r.packing==="dice-slice",i=r.pad[a?"bottom":"top"],s=r.pad[o?"right":"left"],h=r.pad[o?"left":"right"],f=r.pad[a?"top":"bottom"],v;n&&(v=s,s=i,i=v,v=h,h=f,f=v);var c=d.treemap().tile(S(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(s).paddingRight(h).paddingTop(i).paddingBottom(f).size(n?[t[1],t[0]]:t)(e);return(n||o||a)&&x(c,t,{swapXY:n,flipX:o,flipY:a}),c};function S(E,e){switch(E){case"squarify":return d.treemapSquarify.ratio(e);case"binary":return d.treemapBinary;case"dice":return d.treemapDice;case"slice":return d.treemapSlice;default:return d.treemapSliceDice}}}}),$3=He({"src/traces/treemap/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=sa(),E=Qv(),e=Sp().resizeText,t=Y3();function r(a){var n=a._fullLayout._treemaplayer.selectAll(".trace");e(a,n,"treemap"),n.each(function(i){var s=d.select(this),h=i[0],f=h.trace;s.style("opacity",f.opacity),s.selectAll("path.surface").each(function(v){d.select(this).call(o,v,f,a,{hovered:!1})})})}function o(a,n,i,s,h){var f=(h||{}).hovered,v=n.data.data,c=v.i,T,l,_=v.color,w=E.isHierarchyRoot(n),A=1;if(f)T=i._hovered.marker.line.color,l=i._hovered.marker.line.width;else if(w&&_===i.root.color)A=100,T="rgba(0,0,0,0)",l=0;else if(T=S.castOption(i,c,"marker.line.color")||x.defaultLine,l=S.castOption(i,c,"marker.line.width")||0,!i._hasColorscale&&!n.onPathbar){var M=i.marker.depthfade;if(M){var g=x.combine(x.addOpacity(i._backgroundColor,.75),_),b;if(M===!0){var p=E.getMaxDepth(i);isFinite(p)?E.isLeaf(n)?b=0:b=i._maxVisibleLayers-(n.data.depth-i._entryDepth):b=n.data.height+1}else b=n.data.depth-i._entryDepth,i._atRootLevel||b++;if(b>0)for(var u=0;u<b;u++){var y=.5*u/b;_=x.combine(x.addOpacity(g,y),_)}}}a.call(t,n,i,s,_).style("stroke-width",l).call(x.stroke,T).style("opacity",A)}V.exports={style:r,styleOne:o}}}),TN=He({"src/traces/treemap/draw_ancestors.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=ou(),e=fE(),t=$3().styleOne,r=dg(),o=Qv(),a=vx(),n=!0;V.exports=function(s,h,f,v,c){var T=c.barDifY,l=c.width,_=c.height,w=c.viewX,A=c.viewY,M=c.pathSlice,g=c.toMoveInsideSlice,b=c.strTransform,p=c.hasTransition,u=c.handleSlicesExit,y=c.makeUpdateSliceInterpolator,m=c.makeUpdateTextInterpolator,R={},L=s._context.staticPlot,z=s._fullLayout,F=h[0],N=F.trace,O=F.hierarchy,P=l/N._entryDepth,U=o.listPath(f.data,"id"),B=e(O.copy(),[l,_],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();B=B.filter(function($){var le=U.indexOf($.data.id);return le===-1?!1:($.x0=P*le,$.x1=P*(le+1),$.y0=T,$.y1=T+_,$.onPathbar=!0,!0)}),B.reverse(),v=v.data(B,o.getPtId),v.enter().append("g").classed("pathbar",!0),u(v,n,R,[l,_],M),v.order();var X=v;p&&(X=X.transition().each("end",function(){var $=d.select(this);o.setSliceCursor($,s,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),X.each(function($){$._x0=w($.x0),$._x1=w($.x1),$._y0=A($.y0),$._y1=A($.y1),$._hoverX=w($.x1-Math.min(l,_)/2),$._hoverY=A($.y1-_/2);var le=d.select(this),ce=x.ensureSingle(le,"path","surface",function(ee){ee.style("pointer-events",L?"none":"all")});p?ce.transition().attrTween("d",function(ee){var q=y(ee,n,R,[l,_]);return function(se){return M(q(se))}}):ce.attr("d",M),le.call(a,f,s,h,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,s,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:s._transitioning}),ce.call(t,$,N,s,{hovered:!1}),$._text=(o.getPtLabel($)||"").split("<br>").join(" ")||"";var de=x.ensureSingle(le,"g","slicetext"),G=x.ensureSingle(de,"text","",function(ee){ee.attr("data-notex",1)}),Y=x.ensureUniformFontSize(s,o.determineTextFont(N,$,z.font,{onPathbar:!0}));G.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(S.font,Y).call(E.convertToTspans,s),$.textBB=S.bBox(G.node()),$.transform=g($,{fontSize:Y.size,onPathbar:!0}),$.transform.fontSize=Y.size,p?G.transition().attrTween("transform",function(ee){var q=m(ee,n,R,[l,_]);return function(se){return b(q(se))}}):G.attr("transform",b($))})}}}),AN=He({"src/traces/treemap/plot_one.js"(Z,V){"use strict";var d=Wn(),x=(pg(),zf(p0)).interpolate,S=Qv(),E=sa(),e=i0().TEXTPAD,t=tg(),r=t.toMoveInsideBar,o=Sp(),a=o.recordMinTextSize,n=dg(),i=TN();function s(h){return S.isHierarchyRoot(h)?"":S.getPtId(h)}V.exports=function(f,v,c,T,l){var _=f._fullLayout,w=v[0],A=w.trace,M=A.type,g=M==="icicle",b=w.hierarchy,p=S.findEntryWithLevel(b,A.level),u=d.select(c),y=u.selectAll("g.pathbar"),m=u.selectAll("g.slice");if(!p){y.remove(),m.remove();return}var R=S.isHierarchyRoot(p),L=!_.uniformtext.mode&&S.hasTransition(T),z=S.getMaxDepth(A),F=function(Er){return Er.data.depth-p.data.depth<z},N=_._size,O=A.domain,P=N.w*(O.x[1]-O.x[0]),U=N.h*(O.y[1]-O.y[0]),B=P,X=A.pathbar.thickness,$=A.marker.line.width+n.gapWithPathbar,le=A.pathbar.visible?A.pathbar.side.indexOf("bottom")>-1?U+$:-(X+$):0,ce={x0:B,x1:B,y0:le,y1:le+X},de=function(Er,Ir,_t){var Oe=A.tiling.pad,Je=function(Ze){return Ze-Oe<=Ir.x0},Ae=function(Ze){return Ze+Oe>=Ir.x1},Le=function(Ze){return Ze-Oe<=Ir.y0},Ue=function(Ze){return Ze+Oe>=Ir.y1};return Er.x0===Ir.x0&&Er.x1===Ir.x1&&Er.y0===Ir.y0&&Er.y1===Ir.y1?{x0:Er.x0,x1:Er.x1,y0:Er.y0,y1:Er.y1}:{x0:Je(Er.x0-Oe)?0:Ae(Er.x0-Oe)?_t[0]:Er.x0,x1:Je(Er.x1+Oe)?0:Ae(Er.x1+Oe)?_t[0]:Er.x1,y0:Le(Er.y0-Oe)?0:Ue(Er.y0-Oe)?_t[1]:Er.y0,y1:Le(Er.y1+Oe)?0:Ue(Er.y1+Oe)?_t[1]:Er.y1}},G=null,Y={},ee={},q=null,se=function(Er,Ir){return Ir?Y[s(Er)]:ee[s(Er)]},ae=function(Er,Ir,_t,Oe){if(Ir)return Y[s(b)]||ce;var Je=ee[A.level]||_t;return F(Er)?de(Er,Je,Oe):{}};w.hasMultipleRoots&&R&&z++,A._maxDepth=z,A._backgroundColor=_.paper_bgcolor,A._entryDepth=p.data.depth,A._atRootLevel=R;var j=-P/2+N.l+N.w*(O.x[1]+O.x[0])/2,Q=-U/2+N.t+N.h*(1-(O.y[1]+O.y[0])/2),re=function(Er){return j+Er},pe=function(Er){return Q+Er},we=pe(0),Se=re(0),Ie=function(Er){return Se+Er},Re=function(Er){return we+Er};function We(Er,Ir){return Er+","+Ir}var at=Ie(0),nt=function(Er){Er.x=Math.max(at,Er.x)},tt=A.pathbar.edgeshape,qe=function(Er){var Ir=Ie(Math.max(Math.min(Er.x0,Er.x0),0)),_t=Ie(Math.min(Math.max(Er.x1,Er.x1),B)),Oe=Re(Er.y0),Je=Re(Er.y1),Ae=X/2,Le={},Ue={};Le.x=Ir,Ue.x=_t,Le.y=Ue.y=(Oe+Je)/2;var Ze={x:Ir,y:Oe},st={x:_t,y:Oe},ut={x:_t,y:Je},Ut={x:Ir,y:Je};return tt===">"?(Ze.x-=Ae,st.x-=Ae,ut.x-=Ae,Ut.x-=Ae):tt==="/"?(ut.x-=Ae,Ut.x-=Ae,Le.x-=Ae/2,Ue.x-=Ae/2):tt==="\\"?(Ze.x-=Ae,st.x-=Ae,Le.x-=Ae/2,Ue.x-=Ae/2):tt==="<"&&(Le.x-=Ae,Ue.x-=Ae),nt(Ze),nt(Ut),nt(Le),nt(st),nt(ut),nt(Ue),"M"+We(Ze.x,Ze.y)+"L"+We(st.x,st.y)+"L"+We(Ue.x,Ue.y)+"L"+We(ut.x,ut.y)+"L"+We(Ut.x,Ut.y)+"L"+We(Le.x,Le.y)+"Z"},he=A[g?"tiling":"marker"].pad,ue=function(Er){return A.textposition.indexOf(Er)!==-1},ne=ue("top"),Ce=ue("left"),Ye=ue("right"),rt=ue("bottom"),Ke=function(Er){var Ir=re(Er.x0),_t=re(Er.x1),Oe=pe(Er.y0),Je=pe(Er.y1),Ae=_t-Ir,Le=Je-Oe;if(!Ae||!Le)return"";var Ue=A.marker.cornerradius||0,Ze=Math.min(Ue,Ae/2,Le/2);Ze&&Er.data&&Er.data.data&&Er.data.data.label&&(ne&&(Ze=Math.min(Ze,he.t)),Ce&&(Ze=Math.min(Ze,he.l)),Ye&&(Ze=Math.min(Ze,he.r)),rt&&(Ze=Math.min(Ze,he.b)));var st=function(ut,Ut){return Ze?"a"+We(Ze,Ze)+" 0 0 1 "+We(ut,Ut):""};return"M"+We(Ir,Oe+Ze)+st(Ze,-Ze)+"L"+We(_t-Ze,Oe)+st(Ze,Ze)+"L"+We(_t,Je-Ze)+st(-Ze,Ze)+"L"+We(Ir+Ze,Je)+st(-Ze,-Ze)+"Z"},Mt=function(Er,Ir){var _t=Er.x0,Oe=Er.x1,Je=Er.y0,Ae=Er.y1,Le=Er.textBB,Ue=ne||Ir.isHeader&&!rt,Ze=Ue?"start":rt?"end":"middle",st=ue("right"),ut=ue("left")||Ir.onPathbar,Ut=ut?-1:st?1:0;if(Ir.isHeader){if(_t+=(g?he:he.l)-e,Oe-=(g?he:he.r)-e,_t>=Oe){var Ct=(_t+Oe)/2;_t=Ct,Oe=Ct}var Pt;rt?(Pt=Ae-(g?he:he.b),Je<Pt&&Pt<Ae&&(Je=Pt)):(Pt=Je+(g?he:he.t),Je<Pt&&Pt<Ae&&(Ae=Pt))}var jt=r(_t,Oe,Je,Ae,Le,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ze,leftToRight:Ut});return jt.fontSize=Ir.fontSize,jt.targetX=re(jt.targetX),jt.targetY=pe(jt.targetY),isNaN(jt.targetX)||isNaN(jt.targetY)?{}:(_t!==Oe&&Je!==Ae&&a(A.type,jt,_),{scale:jt.scale,rotate:jt.rotate,textX:jt.textX,textY:jt.textY,anchorX:jt.anchorX,anchorY:jt.anchorY,targetX:jt.targetX,targetY:jt.targetY})},kt=function(Er,Ir){for(var _t,Oe=0,Je=Er;!_t&&Oe<z;)Oe++,Je=Je.parent,Je?_t=se(Je,Ir):Oe=z;return _t||{}},Nt=function(Er,Ir,_t,Oe){var Je=se(Er,Ir),Ae;if(Ir)Ae=ce;else{var Le=se(p,Ir);Le?Ae=de(Er,Le,Oe):Ae={}}return x(Je,Ae)},Gt=function(Er,Ir,_t,Oe,Je){var Ae=se(Er,Ir),Le;if(Ae)Le=Ae;else if(Ir)Le=ce;else if(G)if(Er.parent){var Ue=q||_t;Ue&&!Ir?Le=de(Er,Ue,Oe):(Le={},E.extendFlat(Le,kt(Er,Ir)))}else Le=E.extendFlat({},Er),g&&(Je.orientation==="h"?Je.flipX?Le.x0=Er.x1:Le.x1=0:Je.flipY?Le.y0=Er.y1:Le.y1=0);else Le={};return x(Le,{x0:Er.x0,x1:Er.x1,y0:Er.y0,y1:Er.y1})},Mr=function(Er,Ir,_t,Oe){var Je=se(Er,Ir),Ae={},Le=ae(Er,Ir,_t,Oe);E.extendFlat(Ae,{transform:Mt({x0:Le.x0,x1:Le.x1,y0:Le.y0,y1:Le.y1,textBB:Er.textBB,_text:Er._text},{isHeader:S.isHeader(Er,A)})}),Je?Ae=Je:Er.parent&&E.extendFlat(Ae,kt(Er,Ir));var Ue=Er.transform;return Er.x0!==Er.x1&&Er.y0!==Er.y1&&a(A.type,Ue,_),x(Ae,{transform:{scale:Ue.scale,rotate:Ue.rotate,textX:Ue.textX,textY:Ue.textY,anchorX:Ue.anchorX,anchorY:Ue.anchorY,targetX:Ue.targetX,targetY:Ue.targetY}})},mr=function(Er,Ir,_t,Oe,Je){var Ae=Oe[0],Le=Oe[1];L?Er.exit().transition().each(function(){var Ue=d.select(this),Ze=Ue.select("path.surface");Ze.transition().attrTween("d",function(ut){var Ut=Nt(ut,Ir,_t,[Ae,Le]);return function(Ct){return Je(Ut(Ct))}});var st=Ue.select("g.slicetext");st.attr("opacity",0)}).remove():Er.exit().remove()},qr=function(Er){var Ir=Er.transform;return Er.x0!==Er.x1&&Er.y0!==Er.y1&&a(A.type,Ir,_),E.getTextTransform({textX:Ir.textX,textY:Ir.textY,anchorX:Ir.anchorX,anchorY:Ir.anchorY,targetX:Ir.targetX,targetY:Ir.targetY,scale:Ir.scale,rotate:Ir.rotate})};L&&(y.each(function(Er){Y[s(Er)]={x0:Er.x0,x1:Er.x1,y0:Er.y0,y1:Er.y1},Er.transform&&(Y[s(Er)].transform={textX:Er.transform.textX,textY:Er.transform.textY,anchorX:Er.transform.anchorX,anchorY:Er.transform.anchorY,targetX:Er.transform.targetX,targetY:Er.transform.targetY,scale:Er.transform.scale,rotate:Er.transform.rotate})}),m.each(function(Er){ee[s(Er)]={x0:Er.x0,x1:Er.x1,y0:Er.y0,y1:Er.y1},Er.transform&&(ee[s(Er)].transform={textX:Er.transform.textX,textY:Er.transform.textY,anchorX:Er.transform.anchorX,anchorY:Er.transform.anchorY,targetX:Er.transform.targetX,targetY:Er.transform.targetY,scale:Er.transform.scale,rotate:Er.transform.rotate}),!G&&S.isEntry(Er)&&(G=Er)})),q=l(f,v,p,m,{width:P,height:U,viewX:re,viewY:pe,pathSlice:Ke,toMoveInsideSlice:Mt,prevEntry:G,makeUpdateSliceInterpolator:Gt,makeUpdateTextInterpolator:Mr,handleSlicesExit:mr,hasTransition:L,strTransform:qr}),A.pathbar.visible?i(f,v,p,y,{barDifY:le,width:B,height:X,viewX:Ie,viewY:Re,pathSlice:qe,toMoveInsideSlice:Mt,makeUpdateSliceInterpolator:Gt,makeUpdateTextInterpolator:Mr,handleSlicesExit:mr,hasTransition:L,strTransform:qr}):y.remove()}}}),hE=He({"src/traces/treemap/draw.js"(Z,V){"use strict";var d=Wn(),x=Qv(),S=Sp(),E=S.clearMinTextSize,e=Nd().resizeText,t=AN();V.exports=function(o,a,n,i,s){var h=s.type,f=s.drawDescendants,v=o._fullLayout,c=v["_"+h+"layer"],T,l,_=!n;if(E(h,v),T=c.selectAll("g.trace."+h).data(a,function(A){return A[0].trace.uid}),T.enter().append("g").classed("trace",!0).classed(h,!0),T.order(),!v.uniformtext.mode&&x.hasTransition(n)){i&&(l=i());var w=d.transition().duration(n.duration).ease(n.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});w.each(function(){c.selectAll("g.trace").each(function(A){t(o,A,this,n,f)})})}else T.each(function(A){t(o,A,this,n,f)}),v.uniformtext.mode&&e(o,c.selectAll(".trace"),h);_&&T.exit().remove()}}}),SN=He({"src/traces/treemap/draw_descendants.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=ou(),e=fE(),t=$3().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;V.exports=function(h,f,v,c,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,p=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,m=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=f[0],O=N.trace,P=O.textposition.indexOf("left")!==-1,U=O.textposition.indexOf("right")!==-1,B=O.textposition.indexOf("bottom")!==-1,X=!B&&!O.marker.pad.t||B&&!O.marker.pad.b,$=e(v,[l,_],{packing:O.tiling.packing,squarifyratio:O.tiling.squarifyratio,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,pad:{inner:O.tiling.pad,top:O.marker.pad.t,left:O.marker.pad.l,right:O.marker.pad.r,bottom:O.marker.pad.b}}),le=$.descendants(),ce=1/0,de=-1/0;le.forEach(function(se){var ae=se.depth;ae>=O._maxDepth?(se.x0=se.x1=(se.x0+se.x1)/2,se.y0=se.y1=(se.y0+se.y1)/2):(ce=Math.min(ce,ae),de=Math.max(de,ae))}),c=c.data(le,o.getPtId),O._maxVisibleLayers=isFinite(de)?de-ce+1:0,c.enter().append("g").classed("slice",!0),u(c,i,L,[l,_],M),c.order();var G=null;if(p&&R){var Y=o.getPtId(R);c.each(function(se){G===null&&o.getPtId(se)===Y&&(G={x0:se.x0,x1:se.x1,y0:se.y0,y1:se.y1})})}var ee=function(){return G||{x0:0,x1:l,y0:0,y1:_}},q=c;return p&&(q=q.transition().each("end",function(){var se=d.select(this);o.setSliceCursor(se,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(se){var ae=o.isHeader(se,O);se._x0=w(se.x0),se._x1=w(se.x1),se._y0=A(se.y0),se._y1=A(se.y1),se._hoverX=w(se.x1-O.marker.pad.r),se._hoverY=A(B?se.y1-O.marker.pad.b/2:se.y0+O.marker.pad.t/2);var j=d.select(this),Q=x.ensureSingle(j,"path","surface",function(Re){Re.style("pointer-events",z?"none":"all")});p?Q.transition().attrTween("d",function(Re){var We=y(Re,i,ee(),[l,_]);return function(at){return M(We(at))}}):Q.attr("d",M),j.call(a,v,h,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),Q.call(t,se,O,h,{hovered:!1}),se.x0===se.x1||se.y0===se.y1?se._text="":ae?se._text=X?"":o.getPtLabel(se)||"":se._text=n(se,v,O,f,F)||"";var re=x.ensureSingle(j,"g","slicetext"),pe=x.ensureSingle(re,"text","",function(Re){Re.attr("data-notex",1)}),we=x.ensureUniformFontSize(h,o.determineTextFont(O,se,F.font)),Se=se._text||" ",Ie=ae&&Se.indexOf("<br>")===-1;pe.text(Se).classed("slicetext",!0).attr("text-anchor",U?"end":P||Ie?"start":"middle").call(S.font,we).call(E.convertToTspans,h),se.textBB=S.bBox(pe.node()),se.transform=g(se,{fontSize:we.size,isHeader:ae}),se.transform.fontSize=we.size,p?pe.transition().attrTween("transform",function(Re){var We=m(Re,i,ee(),[l,_]);return function(at){return b(We(at))}}):pe.attr("transform",b(se))}),G}}}),MN=He({"src/traces/treemap/plot.js"(Z,V){"use strict";var d=hE(),x=SN();V.exports=function(E,e,t,r){return d(E,e,t,r,{type:"treemap",drawDescendants:x})}}}),EN=He({"src/traces/treemap/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:xN(),categories:[],animatable:!0,attributes:J3(),layoutAttributes:lE(),supplyDefaults:bN(),supplyLayoutDefaults:wN(),calc:uE().calc,crossTraceCalc:uE().crossTraceCalc,plot:MN(),style:$3().style,colorbar:pp(),meta:{}}}}),kN=He({"lib/treemap.js"(Z,V){"use strict";V.exports=EN()}}),CN=He({"src/traces/icicle/base_plot.js"(Z){"use strict";var V=bc();Z.name="icicle",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),pE=He({"src/traces/icicle/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=J3(),a=dg(),n=Qo().extendFlat,i=Gh().pattern;V.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:o.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},E("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:o.pathbar,text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:d({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:o.outsidetextfont,textposition:o.textposition,sort:t.sort,root:r.root,domain:e({name:"icicle",trace:!0,editType:"calc"})}}}),dE=He({"src/traces/icicle/layout_attributes.js"(Z,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LN=He({"src/traces/icicle/defaults.js"(Z,V){"use strict";var d=sa(),x=pE(),S=Jn(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;V.exports=function(s,h,f,v){function c(b,p){return d.coerce(s,h,x,b,p)}var T=c("labels"),l=c("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=c("values");_&&_.length?c("branchvalues"):c("count"),c("level"),c("maxdepth"),c("tiling.orientation"),c("tiling.flip"),c("tiling.pad");var w=c("text");c("texttemplate"),c("texttemplatefallback"),h.texttemplate||c("textinfo",d.isArrayOrTypedArray(w)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var A=c("pathbar.visible"),M="auto";e(s,h,v,c,M,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition"),r(s,h,v,c);var g=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,h,v,c,{prefix:"marker.",cLetter:"c"}),c("leaf.opacity",g?1:.7),h._hovered={marker:{line:{width:2,color:S.contrast(v.paper_bgcolor)}}},A&&(c("pathbar.thickness",h.pathbar.textfont.size+2*t),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),E(h,v,c),h._length=null}}}),PN=He({"src/traces/icicle/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=dE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("iciclecolorway",e.colorway),t("extendiciclecolors")}}}),vE=He({"src/traces/icicle/calc.js"(Z){"use strict";var V=Q_();Z.calc=function(d,x){return V.calc(d,x)},Z.crossTraceCalc=function(d){return V._runCrossTraceCalc("icicle",d)}}}),IN=He({"src/traces/icicle/partition.js"(Z,V){"use strict";var d=$_(),x=cE();V.exports=function(E,e,t){var r=t.flipX,o=t.flipY,a=t.orientation==="h",n=t.maxDepth,i=e[0],s=e[1];n&&(i=(E.height+1)*e[0]/Math.min(E.height+1,n),s=(E.height+1)*e[1]/Math.min(E.height+1,n));var h=d.partition().padding(t.pad.inner).size(a?[e[1],i]:[e[0],s])(E);return(a||r||o)&&x(h,e,{swapXY:a,flipX:r,flipY:o}),h}}}),mE=He({"src/traces/icicle/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._iciclelayer.selectAll(".trace");E(o,a,"icicle"),a.each(function(n){var i=d.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(f){d.select(this).call(r,f,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,f=s.i,v=S.castOption(n,f,"marker.line.color")||x.defaultLine,c=S.castOption(n,f,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",c).call(x.stroke,v).style("opacity",h?n.leaf.opacity:null)}V.exports={style:t,styleOne:r}}}),RN=He({"src/traces/icicle/draw_descendants.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=ou(),e=IN(),t=mE().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;V.exports=function(h,f,v,c,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,p=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,m=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=f[0],O=N.trace,P=O.textposition.indexOf("left")!==-1,U=O.textposition.indexOf("right")!==-1,B=O.textposition.indexOf("bottom")!==-1,X=e(v,[l,_],{flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,orientation:O.tiling.orientation,pad:{inner:O.tiling.pad},maxDepth:O._maxDepth}),$=X.descendants(),le=1/0,ce=-1/0;$.forEach(function(q){var se=q.depth;se>=O._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(le=Math.min(le,se),ce=Math.max(ce,se))}),c=c.data($,o.getPtId),O._maxVisibleLayers=isFinite(ce)?ce-le+1:0,c.enter().append("g").classed("slice",!0),u(c,i,L,[l,_],M),c.order();var de=null;if(p&&R){var G=o.getPtId(R);c.each(function(q){de===null&&o.getPtId(q)===G&&(de={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var Y=function(){return de||{x0:0,x1:l,y0:0,y1:_}},ee=c;return p&&(ee=ee.transition().each("end",function(){var q=d.select(this);o.setSliceCursor(q,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(q){q._x0=w(q.x0),q._x1=w(q.x1),q._y0=A(q.y0),q._y1=A(q.y1),q._hoverX=w(q.x1-O.tiling.pad),q._hoverY=A(B?q.y1-O.tiling.pad/2:q.y0+O.tiling.pad/2);var se=d.select(this),ae=x.ensureSingle(se,"path","surface",function(pe){pe.style("pointer-events",z?"none":"all")});p?ae.transition().attrTween("d",function(pe){var we=y(pe,i,Y(),[l,_],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(Se){return M(we(Se))}}):ae.attr("d",M),se.call(a,v,h,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),ae.call(t,q,O,h,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=n(q,v,O,f,F)||"";var j=x.ensureSingle(se,"g","slicetext"),Q=x.ensureSingle(j,"text","",function(pe){pe.attr("data-notex",1)}),re=x.ensureUniformFontSize(h,o.determineTextFont(O,q,F.font));Q.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":P?"start":"middle").call(S.font,re).call(E.convertToTspans,h),q.textBB=S.bBox(Q.node()),q.transform=g(q,{fontSize:re.size}),q.transform.fontSize=re.size,p?Q.transition().attrTween("transform",function(pe){var we=m(pe,i,Y(),[l,_]);return function(Se){return b(we(Se))}}):Q.attr("transform",b(q))}),de}}}),DN=He({"src/traces/icicle/plot.js"(Z,V){"use strict";var d=hE(),x=RN();V.exports=function(E,e,t,r){return d(E,e,t,r,{type:"icicle",drawDescendants:x})}}}),zN=He({"src/traces/icicle/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:CN(),categories:[],animatable:!0,attributes:pE(),layoutAttributes:dE(),supplyDefaults:LN(),supplyLayoutDefaults:PN(),calc:vE().calc,crossTraceCalc:vE().crossTraceCalc,plot:DN(),style:mE().style,colorbar:pp(),meta:{}}}}),FN=He({"lib/icicle.js"(Z,V){"use strict";V.exports=zN()}}),ON=He({"src/traces/funnelarea/base_plot.js"(Z){"use strict";var V=bc();Z.name="funnelarea",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),gE=He({"src/traces/funnelarea/attributes.js"(Z,V){"use strict";var d=og(),x=ru(),S=wc().attributes,{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=Qo().extendFlat;V.exports={labels:d.labels,label0:d.label0,dlabel:d.dlabel,values:d.values,marker:{colors:d.marker.colors,line:{color:r({},d.marker.line.color,{dflt:null}),width:r({},d.marker.line.width,{dflt:1}),editType:"calc"},pattern:d.marker.pattern,editType:"calc"},text:d.text,hovertext:d.hovertext,scalegroup:r({},d.scalegroup,{}),textinfo:r({},d.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:t({editType:"plot"}),hoverinfo:r({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:E({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:t(),textposition:r({},d.textposition,{values:["inside","none"],dflt:"inside"}),textfont:d.textfont,insidetextfont:d.insidetextfont,title:{text:d.title.text,font:d.title.font,position:r({},d.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:S({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"}}}}),yE=He({"src/traces/funnelarea/layout_attributes.js"(Z,V){"use strict";var d=_3().hiddenlabels;V.exports={hiddenlabels:d,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),BN=He({"src/traces/funnelarea/defaults.js"(Z,V){"use strict";var d=sa(),x=gE(),S=wc().defaults,E=gd().handleText,e=sg().handleLabelsAndValues,t=sg().handleMarkerDefaults;V.exports=function(o,a,n,i){function s(M,g){return d.coerce(o,a,x,M,g)}var h=s("labels"),f=s("values"),v=e(h,f),c=v.len;if(a._hasLabels=v.hasLabels,a._hasValues=v.hasValues,!a._hasLabels&&a._hasValues&&(s("label0"),s("dlabel")),!c){a.visible=!1;return}a._length=c,t(o,a,i,s),s("scalegroup");var T=s("text"),l=s("texttemplate");s("texttemplatefallback");var _;if(l||(_=s("textinfo",Array.isArray(T)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),l||_&&_!=="none"){var w=s("textposition");E(o,a,i,s,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&s("textposition","none");S(a,i,s);var A=s("title.text");A&&(s("title.position"),d.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),NN=He({"src/traces/funnelarea/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=yE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("hiddenlabels"),t("funnelareacolorway",e.colorway),t("extendfunnelareacolors")}}}),_E=He({"src/traces/funnelarea/calc.js"(Z,V){"use strict";var d=x1();function x(E,e){return d.calc(E,e)}function S(E){d.crossTraceCalc(E,{type:"funnelarea"})}V.exports={calc:x,crossTraceCalc:S}}}),UN=He({"src/traces/funnelarea/plot.js"(Z,V){"use strict";var d=Wn(),x=es(),S=sa(),E=S.strScale,e=S.strTranslate,t=ou(),r=tg(),o=r.toMoveInsideBar,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=t0(),h=x3(),f=h.attachFxHandlers,v=h.determineInsideTextFont,c=h.layoutAreas,T=h.prerenderTitles,l=h.positionTitleOutside,_=h.formatSliceLabel;V.exports=function(b,p){var u=b._context.staticPlot,y=b._fullLayout;i("funnelarea",y),T(p,b),c(p,y._size),S.makeTraceGroups(y._funnelarealayer,p,"trace").each(function(m){var R=d.select(this),L=m[0],z=L.trace;M(m),R.each(function(){var F=d.select(this).selectAll("g.slice").data(m);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(O,P){if(O.hidden){d.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=z.index;var U=L.cx,B=L.cy,X=d.select(this),$=X.selectAll("path.surface").data([O]);$.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),X.call(f,b,m);var le="M"+(U+O.TR[0])+","+(B+O.TR[1])+w(O.TR,O.BR)+w(O.BR,O.BL)+w(O.BL,O.TL)+"Z";$.attr("d",le),_(b,O,L);var ce=s.castOption(z.textposition,O.pts),de=X.selectAll("g.slicetext").data(O.text&&ce!=="none"?[0]:[]);de.enter().append("g").classed("slicetext",!0),de.exit().remove(),de.each(function(){var G=S.ensureSingle(d.select(this),"text","",function(re){re.attr("data-notex",1)}),Y=S.ensureUniformFontSize(b,v(z,O,y.font));G.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Y).call(t.convertToTspans,b);var ee=x.bBox(G.node()),q,se,ae,j=Math.min(O.BL[1],O.BR[1])+B,Q=Math.max(O.TL[1],O.TR[1])+B;se=Math.max(O.TL[0],O.BL[0])+U,ae=Math.min(O.TR[0],O.BR[0])+U,q=o(se,ae,j,Q,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),q.fontSize=Y.size,n(z.type,q,y),m[P].transform=q,S.setTransormAndDisplay(G,q)})});var N=d.select(this).selectAll("g.titletext").data(z.title.text?[0]:[]);N.enter().append("g").classed("titletext",!0),N.exit().remove(),N.each(function(){var O=S.ensureSingle(d.select(this),"text","",function(B){B.attr("data-notex",1)}),P=z.title.text;z._meta&&(P=S.templateString(P,z._meta)),O.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,z.title.font).call(t.convertToTspans,b);var U=l(L,y._size);O.attr("transform",e(U.x,U.y)+E(Math.min(1,U.scale))+e(U.tx,U.ty))})})})};function w(g,b){var p=b[0]-g[0],u=b[1]-g[1];return"l"+p+","+u}function A(g,b){return[.5*(g[0]+b[0]),.5*(g[1]+b[1])]}function M(g){if(!g.length)return;var b=g[0],p=b.trace,u=p.aspectratio,y=p.baseratio;y>.999&&(y=.999);var m=Math.pow(y,2),R=b.vTotal,L=R*m/(1-m),z=R,F=L/R;function N(){var pe=Math.sqrt(F);return{x:pe,y:-pe}}function O(){var pe=N();return[pe.x,pe.y]}var P,U=[];U.push(O());var B,X;for(B=g.length-1;B>-1;B--)if(X=g[B],!X.hidden){var $=X.v/z;F+=$,U.push(O())}var le=1/0,ce=-1/0;for(B=0;B<U.length;B++)P=U[B],le=Math.min(le,P[1]),ce=Math.max(ce,P[1]);for(B=0;B<U.length;B++)U[B][1]-=(ce+le)/2;var de=U[U.length-1][0],G=b.r,Y=(ce-le)/2,ee=G/de,q=G/Y*u;for(b.r=q*Y,B=0;B<U.length;B++)U[B][0]*=ee,U[B][1]*=q;P=U[0];var se=[-P[0],P[1]],ae=[P[0],P[1]],j=0;for(B=g.length-1;B>-1;B--)if(X=g[B],!X.hidden){j+=1;var Q=U[j][0],re=U[j][1];X.TL=[-Q,re],X.TR=[Q,re],X.BL=se,X.BR=ae,X.pxmid=A(X.TR,X.BR),se=X.TL,ae=X.TR}}}}),jN=He({"src/traces/funnelarea/style.js"(Z,V){"use strict";var d=Wn(),x=i1(),S=Sp().resizeText;V.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");S(e,t,"funnelarea"),t.each(function(r){var o=r[0],a=o.trace,n=d.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){d.select(this).call(x,i,a,e)})})}}}),qN=He({"src/traces/funnelarea/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ON(),categories:["pie-like","funnelarea","showLegend"],attributes:gE(),layoutAttributes:yE(),supplyDefaults:BN(),supplyLayoutDefaults:NN(),calc:_E().calc,crossTraceCalc:_E().crossTraceCalc,plot:UN(),style:jN(),styleOne:i1(),meta:{}}}}),VN=He({"lib/funnelarea.js"(Z,V){"use strict";V.exports=qN()}}),Yh=He({"stackgl_modules/index.js"(Z,V){(function(){var d={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){"use strict";var o;function a(qe){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},a(qe)}var n=r(7507),i=r(3778),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,o=y,t.IS=50;var h=2147483647;o=h,c.TYPED_ARRAY_SUPPORT=f(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{var qe=new Uint8Array(1),he={foo:function(){return 42}};return Object.setPrototypeOf(he,Uint8Array.prototype),Object.setPrototypeOf(qe,he),qe.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function v(qe){if(qe>h)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var he=new Uint8Array(qe);return Object.setPrototypeOf(he,c.prototype),he}function c(qe,he,ue){if(typeof qe=="number"){if(typeof he=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(qe)}return T(qe,he,ue)}c.poolSize=8192;function T(qe,he,ue){if(typeof qe=="string")return A(qe,he);if(ArrayBuffer.isView(qe))return g(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 "+a(qe));if(at(qe,ArrayBuffer)||qe&&at(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(at(qe,SharedArrayBuffer)||qe&&at(qe.buffer,SharedArrayBuffer)))return b(qe,he,ue);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ne=qe.valueOf&&qe.valueOf();if(ne!=null&&ne!==qe)return c.from(ne,he,ue);var Ce=p(qe);if(Ce)return Ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return c.from(qe[Symbol.toPrimitive]("string"),he,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+a(qe))}c.from=function(qe,he,ue){return T(qe,he,ue)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function l(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 _(qe,he,ue){return l(qe),qe<=0?v(qe):he!==void 0?typeof ue=="string"?v(qe).fill(he,ue):v(qe).fill(he):v(qe)}c.alloc=function(qe,he,ue){return _(qe,he,ue)};function w(qe){return l(qe),v(qe<0?0:u(qe)|0)}c.allocUnsafe=function(qe){return w(qe)},c.allocUnsafeSlow=function(qe){return w(qe)};function A(qe,he){if((typeof he!="string"||he==="")&&(he="utf8"),!c.isEncoding(he))throw new TypeError("Unknown encoding: "+he);var ue=m(qe,he)|0,ne=v(ue),Ce=ne.write(qe,he);return Ce!==ue&&(ne=ne.slice(0,Ce)),ne}function M(qe){for(var he=qe.length<0?0:u(qe.length)|0,ue=v(he),ne=0;ne<he;ne+=1)ue[ne]=qe[ne]&255;return ue}function g(qe){if(at(qe,Uint8Array)){var he=new Uint8Array(qe);return b(he.buffer,he.byteOffset,he.byteLength)}return M(qe)}function b(qe,he,ue){if(he<0||qe.byteLength<he)throw new RangeError('"offset" is outside of buffer bounds');if(qe.byteLength<he+(ue||0))throw new RangeError('"length" is outside of buffer bounds');var ne;return he===void 0&&ue===void 0?ne=new Uint8Array(qe):ue===void 0?ne=new Uint8Array(qe,he):ne=new Uint8Array(qe,he,ue),Object.setPrototypeOf(ne,c.prototype),ne}function p(qe){if(c.isBuffer(qe)){var he=u(qe.length)|0,ue=v(he);return ue.length===0||qe.copy(ue,0,0,he),ue}if(qe.length!==void 0)return typeof qe.length!="number"||nt(qe.length)?v(0):M(qe);if(qe.type==="Buffer"&&Array.isArray(qe.data))return M(qe.data)}function u(qe){if(qe>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return qe|0}function y(qe){return+qe!=qe&&(qe=0),c.alloc(+qe)}c.isBuffer=function(he){return he!=null&&he._isBuffer===!0&&he!==c.prototype},c.compare=function(he,ue){if(at(he,Uint8Array)&&(he=c.from(he,he.offset,he.byteLength)),at(ue,Uint8Array)&&(ue=c.from(ue,ue.offset,ue.byteLength)),!c.isBuffer(he)||!c.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(he===ue)return 0;for(var ne=he.length,Ce=ue.length,Ye=0,rt=Math.min(ne,Ce);Ye<rt;++Ye)if(he[Ye]!==ue[Ye]){ne=he[Ye],Ce=ue[Ye];break}return ne<Ce?-1:Ce<ne?1:0},c.isEncoding=function(he){switch(String(he).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(he,ue){if(!Array.isArray(he))throw new TypeError('"list" argument must be an Array of Buffers');if(he.length===0)return c.alloc(0);var ne;if(ue===void 0)for(ue=0,ne=0;ne<he.length;++ne)ue+=he[ne].length;var Ce=c.allocUnsafe(ue),Ye=0;for(ne=0;ne<he.length;++ne){var rt=he[ne];if(at(rt,Uint8Array))Ye+rt.length>Ce.length?c.from(rt).copy(Ce,Ye):Uint8Array.prototype.set.call(Ce,rt,Ye);else if(c.isBuffer(rt))rt.copy(Ce,Ye);else throw new TypeError('"list" argument must be an Array of Buffers');Ye+=rt.length}return Ce};function m(qe,he){if(c.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||at(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 '+a(qe));var ue=qe.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&ue===0)return 0;for(var Ce=!1;;)switch(he){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return we(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Re(qe).length;default:if(Ce)return ne?-1:we(qe).length;he=(""+he).toLowerCase(),Ce=!0}}c.byteLength=m;function R(qe,he,ue){var ne=!1;if((he===void 0||he<0)&&(he=0),he>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,he>>>=0,ue<=he))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return Y(this,he,ue);case"utf8":case"utf-8":return $(this,he,ue);case"ascii":return de(this,he,ue);case"latin1":case"binary":return G(this,he,ue);case"base64":return X(this,he,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,he,ue);default:if(ne)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),ne=!0}}c.prototype._isBuffer=!0;function L(qe,he,ue){var ne=qe[he];qe[he]=qe[ue],qe[ue]=ne}c.prototype.swap16=function(){var he=this.length;if(he%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ue<he;ue+=2)L(this,ue,ue+1);return this},c.prototype.swap32=function(){var he=this.length;if(he%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ue=0;ue<he;ue+=4)L(this,ue,ue+3),L(this,ue+1,ue+2);return this},c.prototype.swap64=function(){var he=this.length;if(he%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ue=0;ue<he;ue+=8)L(this,ue,ue+7),L(this,ue+1,ue+6),L(this,ue+2,ue+5),L(this,ue+3,ue+4);return this},c.prototype.toString=function(){var he=this.length;return he===0?"":arguments.length===0?$(this,0,he):R.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(he){if(!c.isBuffer(he))throw new TypeError("Argument must be a Buffer");return this===he?!0:c.compare(this,he)===0},c.prototype.inspect=function(){var he="",ue=t.IS;return he=this.toString("hex",0,ue).replace(/(.{2})/g,"$1 ").trim(),this.length>ue&&(he+=" ... "),"<Buffer "+he+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(he,ue,ne,Ce,Ye){if(at(he,Uint8Array)&&(he=c.from(he,he.offset,he.byteLength)),!c.isBuffer(he))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+a(he));if(ue===void 0&&(ue=0),ne===void 0&&(ne=he?he.length:0),Ce===void 0&&(Ce=0),Ye===void 0&&(Ye=this.length),ue<0||ne>he.length||Ce<0||Ye>this.length)throw new RangeError("out of range index");if(Ce>=Ye&&ue>=ne)return 0;if(Ce>=Ye)return-1;if(ue>=ne)return 1;if(ue>>>=0,ne>>>=0,Ce>>>=0,Ye>>>=0,this===he)return 0;for(var rt=Ye-Ce,Ke=ne-ue,Mt=Math.min(rt,Ke),kt=this.slice(Ce,Ye),Nt=he.slice(ue,ne),Gt=0;Gt<Mt;++Gt)if(kt[Gt]!==Nt[Gt]){rt=kt[Gt],Ke=Nt[Gt];break}return rt<Ke?-1:Ke<rt?1:0};function z(qe,he,ue,ne,Ce){if(qe.length===0)return-1;if(typeof ue=="string"?(ne=ue,ue=0):ue>2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,nt(ue)&&(ue=Ce?0:qe.length-1),ue<0&&(ue=qe.length+ue),ue>=qe.length){if(Ce)return-1;ue=qe.length-1}else if(ue<0)if(Ce)ue=0;else return-1;if(typeof he=="string"&&(he=c.from(he,ne)),c.isBuffer(he))return he.length===0?-1:F(qe,he,ue,ne,Ce);if(typeof he=="number")return he=he&255,typeof Uint8Array.prototype.indexOf=="function"?Ce?Uint8Array.prototype.indexOf.call(qe,he,ue):Uint8Array.prototype.lastIndexOf.call(qe,he,ue):F(qe,[he],ue,ne,Ce);throw new TypeError("val must be string, number or Buffer")}function F(qe,he,ue,ne,Ce){var Ye=1,rt=qe.length,Ke=he.length;if(ne!==void 0&&(ne=String(ne).toLowerCase(),ne==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(qe.length<2||he.length<2)return-1;Ye=2,rt/=2,Ke/=2,ue/=2}function Mt(mr,qr){return Ye===1?mr[qr]:mr.readUInt16BE(qr*Ye)}var kt;if(Ce){var Nt=-1;for(kt=ue;kt<rt;kt++)if(Mt(qe,kt)===Mt(he,Nt===-1?0:kt-Nt)){if(Nt===-1&&(Nt=kt),kt-Nt+1===Ke)return Nt*Ye}else Nt!==-1&&(kt-=kt-Nt),Nt=-1}else for(ue+Ke>rt&&(ue=rt-Ke),kt=ue;kt>=0;kt--){for(var Gt=!0,Mr=0;Mr<Ke;Mr++)if(Mt(qe,kt+Mr)!==Mt(he,Mr)){Gt=!1;break}if(Gt)return kt}return-1}c.prototype.includes=function(he,ue,ne){return this.indexOf(he,ue,ne)!==-1},c.prototype.indexOf=function(he,ue,ne){return z(this,he,ue,ne,!0)},c.prototype.lastIndexOf=function(he,ue,ne){return z(this,he,ue,ne,!1)};function N(qe,he,ue,ne){ue=Number(ue)||0;var Ce=qe.length-ue;ne?(ne=Number(ne),ne>Ce&&(ne=Ce)):ne=Ce;var Ye=he.length;ne>Ye/2&&(ne=Ye/2);for(var rt=0;rt<ne;++rt){var Ke=parseInt(he.substr(rt*2,2),16);if(nt(Ke))return rt;qe[ue+rt]=Ke}return rt}function O(qe,he,ue,ne){return We(we(he,qe.length-ue),qe,ue,ne)}function P(qe,he,ue,ne){return We(Se(he),qe,ue,ne)}function U(qe,he,ue,ne){return We(Re(he),qe,ue,ne)}function B(qe,he,ue,ne){return We(Ie(he,qe.length-ue),qe,ue,ne)}c.prototype.write=function(he,ue,ne,Ce){if(ue===void 0)Ce="utf8",ne=this.length,ue=0;else if(ne===void 0&&typeof ue=="string")Ce=ue,ne=this.length,ue=0;else if(isFinite(ue))ue=ue>>>0,isFinite(ne)?(ne=ne>>>0,Ce===void 0&&(Ce="utf8")):(Ce=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ye=this.length-ue;if((ne===void 0||ne>Ye)&&(ne=Ye),he.length>0&&(ne<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");for(var rt=!1;;)switch(Ce){case"hex":return N(this,he,ue,ne);case"utf8":case"utf-8":return O(this,he,ue,ne);case"ascii":case"latin1":case"binary":return P(this,he,ue,ne);case"base64":return U(this,he,ue,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,he,ue,ne);default:if(rt)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),rt=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(qe,he,ue){return he===0&&ue===qe.length?n.fromByteArray(qe):n.fromByteArray(qe.slice(he,ue))}function $(qe,he,ue){ue=Math.min(qe.length,ue);for(var ne=[],Ce=he;Ce<ue;){var Ye=qe[Ce],rt=null,Ke=Ye>239?4:Ye>223?3:Ye>191?2:1;if(Ce+Ke<=ue){var Mt,kt,Nt,Gt;switch(Ke){case 1:Ye<128&&(rt=Ye);break;case 2:Mt=qe[Ce+1],(Mt&192)===128&&(Gt=(Ye&31)<<6|Mt&63,Gt>127&&(rt=Gt));break;case 3:Mt=qe[Ce+1],kt=qe[Ce+2],(Mt&192)===128&&(kt&192)===128&&(Gt=(Ye&15)<<12|(Mt&63)<<6|kt&63,Gt>2047&&(Gt<55296||Gt>57343)&&(rt=Gt));break;case 4:Mt=qe[Ce+1],kt=qe[Ce+2],Nt=qe[Ce+3],(Mt&192)===128&&(kt&192)===128&&(Nt&192)===128&&(Gt=(Ye&15)<<18|(Mt&63)<<12|(kt&63)<<6|Nt&63,Gt>65535&&Gt<1114112&&(rt=Gt))}}rt===null?(rt=65533,Ke=1):rt>65535&&(rt-=65536,ne.push(rt>>>10&1023|55296),rt=56320|rt&1023),ne.push(rt),Ce+=Ke}return ce(ne)}var le=4096;function ce(qe){var he=qe.length;if(he<=le)return String.fromCharCode.apply(String,qe);for(var ue="",ne=0;ne<he;)ue+=String.fromCharCode.apply(String,qe.slice(ne,ne+=le));return ue}function de(qe,he,ue){var ne="";ue=Math.min(qe.length,ue);for(var Ce=he;Ce<ue;++Ce)ne+=String.fromCharCode(qe[Ce]&127);return ne}function G(qe,he,ue){var ne="";ue=Math.min(qe.length,ue);for(var Ce=he;Ce<ue;++Ce)ne+=String.fromCharCode(qe[Ce]);return ne}function Y(qe,he,ue){var ne=qe.length;(!he||he<0)&&(he=0),(!ue||ue<0||ue>ne)&&(ue=ne);for(var Ce="",Ye=he;Ye<ue;++Ye)Ce+=tt[qe[Ye]];return Ce}function ee(qe,he,ue){for(var ne=qe.slice(he,ue),Ce="",Ye=0;Ye<ne.length-1;Ye+=2)Ce+=String.fromCharCode(ne[Ye]+ne[Ye+1]*256);return Ce}c.prototype.slice=function(he,ue){var ne=this.length;he=~~he,ue=ue===void 0?ne:~~ue,he<0?(he+=ne,he<0&&(he=0)):he>ne&&(he=ne),ue<0?(ue+=ne,ue<0&&(ue=0)):ue>ne&&(ue=ne),ue<he&&(ue=he);var Ce=this.subarray(he,ue);return Object.setPrototypeOf(Ce,c.prototype),Ce};function q(qe,he,ue){if(qe%1!==0||qe<0)throw new RangeError("offset is not uint");if(qe+he>ue)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he],Ye=1,rt=0;++rt<ue&&(Ye*=256);)Ce+=this[he+rt]*Ye;return Ce},c.prototype.readUintBE=c.prototype.readUIntBE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he+--ue],Ye=1;ue>0&&(Ye*=256);)Ce+=this[he+--ue]*Ye;return Ce},c.prototype.readUint8=c.prototype.readUInt8=function(he,ue){return he=he>>>0,ue||q(he,1,this.length),this[he]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(he,ue){return he=he>>>0,ue||q(he,2,this.length),this[he]|this[he+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(he,ue){return he=he>>>0,ue||q(he,2,this.length),this[he]<<8|this[he+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),(this[he]|this[he+1]<<8|this[he+2]<<16)+this[he+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]*16777216+(this[he+1]<<16|this[he+2]<<8|this[he+3])},c.prototype.readIntLE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he],Ye=1,rt=0;++rt<ue&&(Ye*=256);)Ce+=this[he+rt]*Ye;return Ye*=128,Ce>=Ye&&(Ce-=Math.pow(2,8*ue)),Ce},c.prototype.readIntBE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=ue,Ye=1,rt=this[he+--Ce];Ce>0&&(Ye*=256);)rt+=this[he+--Ce]*Ye;return Ye*=128,rt>=Ye&&(rt-=Math.pow(2,8*ue)),rt},c.prototype.readInt8=function(he,ue){return he=he>>>0,ue||q(he,1,this.length),this[he]&128?(255-this[he]+1)*-1:this[he]},c.prototype.readInt16LE=function(he,ue){he=he>>>0,ue||q(he,2,this.length);var ne=this[he]|this[he+1]<<8;return ne&32768?ne|4294901760:ne},c.prototype.readInt16BE=function(he,ue){he=he>>>0,ue||q(he,2,this.length);var ne=this[he+1]|this[he]<<8;return ne&32768?ne|4294901760:ne},c.prototype.readInt32LE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]|this[he+1]<<8|this[he+2]<<16|this[he+3]<<24},c.prototype.readInt32BE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]<<24|this[he+1]<<16|this[he+2]<<8|this[he+3]},c.prototype.readFloatLE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),i.read(this,he,!0,23,4)},c.prototype.readFloatBE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),i.read(this,he,!1,23,4)},c.prototype.readDoubleLE=function(he,ue){return he=he>>>0,ue||q(he,8,this.length),i.read(this,he,!0,52,8)},c.prototype.readDoubleBE=function(he,ue){return he=he>>>0,ue||q(he,8,this.length),i.read(this,he,!1,52,8)};function se(qe,he,ue,ne,Ce,Ye){if(!c.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(he>Ce||he<Ye)throw new RangeError('"value" argument is out of bounds');if(ue+ne>qe.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,ne=ne>>>0,!Ce){var Ye=Math.pow(2,8*ne)-1;se(this,he,ue,ne,Ye,0)}var rt=1,Ke=0;for(this[ue]=he&255;++Ke<ne&&(rt*=256);)this[ue+Ke]=he/rt&255;return ue+ne},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,ne=ne>>>0,!Ce){var Ye=Math.pow(2,8*ne)-1;se(this,he,ue,ne,Ye,0)}var rt=ne-1,Ke=1;for(this[ue+rt]=he&255;--rt>=0&&(Ke*=256);)this[ue+rt]=he/Ke&255;return ue+ne},c.prototype.writeUint8=c.prototype.writeUInt8=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,1,255,0),this[ue]=he&255,ue+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,65535,0),this[ue]=he&255,this[ue+1]=he>>>8,ue+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,65535,0),this[ue]=he>>>8,this[ue+1]=he&255,ue+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,4294967295,0),this[ue+3]=he>>>24,this[ue+2]=he>>>16,this[ue+1]=he>>>8,this[ue]=he&255,ue+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,4294967295,0),this[ue]=he>>>24,this[ue+1]=he>>>16,this[ue+2]=he>>>8,this[ue+3]=he&255,ue+4},c.prototype.writeIntLE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,!Ce){var Ye=Math.pow(2,8*ne-1);se(this,he,ue,ne,Ye-1,-Ye)}var rt=0,Ke=1,Mt=0;for(this[ue]=he&255;++rt<ne&&(Ke*=256);)he<0&&Mt===0&&this[ue+rt-1]!==0&&(Mt=1),this[ue+rt]=(he/Ke>>0)-Mt&255;return ue+ne},c.prototype.writeIntBE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,!Ce){var Ye=Math.pow(2,8*ne-1);se(this,he,ue,ne,Ye-1,-Ye)}var rt=ne-1,Ke=1,Mt=0;for(this[ue+rt]=he&255;--rt>=0&&(Ke*=256);)he<0&&Mt===0&&this[ue+rt+1]!==0&&(Mt=1),this[ue+rt]=(he/Ke>>0)-Mt&255;return ue+ne},c.prototype.writeInt8=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,1,127,-128),he<0&&(he=255+he+1),this[ue]=he&255,ue+1},c.prototype.writeInt16LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,32767,-32768),this[ue]=he&255,this[ue+1]=he>>>8,ue+2},c.prototype.writeInt16BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,32767,-32768),this[ue]=he>>>8,this[ue+1]=he&255,ue+2},c.prototype.writeInt32LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,2147483647,-2147483648),this[ue]=he&255,this[ue+1]=he>>>8,this[ue+2]=he>>>16,this[ue+3]=he>>>24,ue+4},c.prototype.writeInt32BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,2147483647,-2147483648),he<0&&(he=4294967295+he+1),this[ue]=he>>>24,this[ue+1]=he>>>16,this[ue+2]=he>>>8,this[ue+3]=he&255,ue+4};function ae(qe,he,ue,ne,Ce,Ye){if(ue+ne>qe.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function j(qe,he,ue,ne,Ce){return he=+he,ue=ue>>>0,Ce||ae(qe,he,ue,4,34028234663852886e22,-34028234663852886e22),i.write(qe,he,ue,ne,23,4),ue+4}c.prototype.writeFloatLE=function(he,ue,ne){return j(this,he,ue,!0,ne)},c.prototype.writeFloatBE=function(he,ue,ne){return j(this,he,ue,!1,ne)};function Q(qe,he,ue,ne,Ce){return he=+he,ue=ue>>>0,Ce||ae(qe,he,ue,8,17976931348623157e292,-17976931348623157e292),i.write(qe,he,ue,ne,52,8),ue+8}c.prototype.writeDoubleLE=function(he,ue,ne){return Q(this,he,ue,!0,ne)},c.prototype.writeDoubleBE=function(he,ue,ne){return Q(this,he,ue,!1,ne)},c.prototype.copy=function(he,ue,ne,Ce){if(!c.isBuffer(he))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),!Ce&&Ce!==0&&(Ce=this.length),ue>=he.length&&(ue=he.length),ue||(ue=0),Ce>0&&Ce<ne&&(Ce=ne),Ce===ne||he.length===0||this.length===0)return 0;if(ue<0)throw new RangeError("targetStart out of bounds");if(ne<0||ne>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),he.length-ue<Ce-ne&&(Ce=he.length-ue+ne);var Ye=Ce-ne;return this===he&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ue,ne,Ce):Uint8Array.prototype.set.call(he,this.subarray(ne,Ce),ue),Ye},c.prototype.fill=function(he,ue,ne,Ce){if(typeof he=="string"){if(typeof ue=="string"?(Ce=ue,ue=0,ne=this.length):typeof ne=="string"&&(Ce=ne,ne=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!c.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(he.length===1){var Ye=he.charCodeAt(0);(Ce==="utf8"&&Ye<128||Ce==="latin1")&&(he=Ye)}}else typeof he=="number"?he=he&255:typeof he=="boolean"&&(he=Number(he));if(ue<0||this.length<ue||this.length<ne)throw new RangeError("Out of range index");if(ne<=ue)return this;ue=ue>>>0,ne=ne===void 0?this.length:ne>>>0,he||(he=0);var rt;if(typeof he=="number")for(rt=ue;rt<ne;++rt)this[rt]=he;else{var Ke=c.isBuffer(he)?he:c.from(he,Ce),Mt=Ke.length;if(Mt===0)throw new TypeError('The value "'+he+'" is invalid for argument "value"');for(rt=0;rt<ne-ue;++rt)this[rt+ue]=Ke[rt%Mt]}return this};var re=/[^+/0-9A-Za-z-_]/g;function pe(qe){if(qe=qe.split("=")[0],qe=qe.trim().replace(re,""),qe.length<2)return"";for(;qe.length%4!==0;)qe=qe+"=";return qe}function we(qe,he){he=he||1/0;for(var ue,ne=qe.length,Ce=null,Ye=[],rt=0;rt<ne;++rt){if(ue=qe.charCodeAt(rt),ue>55295&&ue<57344){if(!Ce){if(ue>56319){(he-=3)>-1&&Ye.push(239,191,189);continue}else if(rt+1===ne){(he-=3)>-1&&Ye.push(239,191,189);continue}Ce=ue;continue}if(ue<56320){(he-=3)>-1&&Ye.push(239,191,189),Ce=ue;continue}ue=(Ce-55296<<10|ue-56320)+65536}else Ce&&(he-=3)>-1&&Ye.push(239,191,189);if(Ce=null,ue<128){if((he-=1)<0)break;Ye.push(ue)}else if(ue<2048){if((he-=2)<0)break;Ye.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((he-=3)<0)break;Ye.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((he-=4)<0)break;Ye.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return Ye}function Se(qe){for(var he=[],ue=0;ue<qe.length;++ue)he.push(qe.charCodeAt(ue)&255);return he}function Ie(qe,he){for(var ue,ne,Ce,Ye=[],rt=0;rt<qe.length&&!((he-=2)<0);++rt)ue=qe.charCodeAt(rt),ne=ue>>8,Ce=ue%256,Ye.push(Ce),Ye.push(ne);return Ye}function Re(qe){return n.toByteArray(pe(qe))}function We(qe,he,ue,ne){for(var Ce=0;Ce<ne&&!(Ce+ue>=he.length||Ce>=qe.length);++Ce)he[Ce+ue]=qe[Ce];return Ce}function at(qe,he){return qe instanceof he||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===he.name}function nt(qe){return qe!==qe}var tt=function(){for(var qe="0123456789abcdef",he=new Array(256),ue=0;ue<16;++ue)for(var ne=ue*16,Ce=0;Ce<16;++Ce)he[ne+Ce]=qe[ue]+qe[Ce];return he}()},9216:function(e){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,o=/android|ipad|playbook|silk/i;function a(n){n||(n={});var i=n.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;var s=t.test(i)&&!r.test(i)||!!n.tablet&&o.test(i);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(e,t,r){"use strict";e.exports=h;var o=r(7261),a=r(9977),n=r(1811);function i(f,v){this._controllerNames=Object.keys(f),this._controllerList=this._controllerNames.map(function(c){return f[c]}),this._mode=v,this._active=f[v],this._active||(this._mode="turntable",this._active=f.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=i.prototype;s.flush=function(f){for(var v=this._controllerList,c=0;c<v.length;++c)v[c].flush(f)},s.idle=function(f){for(var v=this._controllerList,c=0;c<v.length;++c)v[c].idle(f)},s.lookAt=function(f,v,c,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].lookAt(f,v,c,T)},s.rotate=function(f,v,c,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].rotate(f,v,c,T)},s.pan=function(f,v,c,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].pan(f,v,c,T)},s.translate=function(f,v,c,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].translate(f,v,c,T)},s.setMatrix=function(f,v){for(var c=this._controllerList,T=0;T<c.length;++T)c[T].setMatrix(f,v)},s.setDistanceLimits=function(f,v){for(var c=this._controllerList,T=0;T<c.length;++T)c[T].setDistanceLimits(f,v)},s.setDistance=function(f,v){for(var c=this._controllerList,T=0;T<c.length;++T)c[T].setDistance(f,v)},s.recalcMatrix=function(f){this._active.recalcMatrix(f)},s.getDistance=function(f){return this._active.getDistance(f)},s.getDistanceLimits=function(f){return this._active.getDistanceLimits(f)},s.lastT=function(){return this._active.lastT()},s.setMode=function(f){if(f!==this._mode){var v=this._controllerNames.indexOf(f);if(!(v<0)){var c=this._active,T=this._controllerList[v],l=Math.max(c.lastT(),T.lastT());c.recalcMatrix(l),T.setMatrix(l,c.computedMatrix),this._active=T,this._mode=f,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode};function h(f){f=f||{};var v=f.eye||[0,0,1],c=f.center||[0,0,0],T=f.up||[0,1,0],l=f.distanceLimits||[0,1/0],_=f.mode||"turntable",w=o(),A=a(),M=n();return w.setDistanceLimits(l[0],l[1]),w.lookAt(0,v,c,T),A.setDistanceLimits(l[0],l[1]),A.lookAt(0,v,c,T),M.setDistanceLimits(l[0],l[1]),M.lookAt(0,v,c,T),new i({turntable:w,orbit:A,matrix:M},_)}},7169:function(e,t,r){"use strict";var o=typeof WeakMap>"u"?r(1538):WeakMap,a=r(2762),n=r(8116),i=new o;function s(h){var f=i.get(h),v=f&&(f._triangleBuffer.handle||f._triangleBuffer.buffer);if(!v||!h.isBuffer(v)){var c=a(h,new Float32Array([-1,-1,-1,4,4,-1]));f=n(h,[{buffer:c,type:h.FLOAT,size:2}]),f._triangleBuffer=c,i.set(h,f)}f.bind(),h.drawArrays(h.TRIANGLES,0,3),f.unbind()}e.exports=s},1085:function(e,t,r){var o=r(1371);e.exports=a;function a(n,i,s){i=typeof i=="number"?i:1,s=s||": ";var h=n.split(/\r?\n/),f=String(h.length+i-1).length;return h.map(function(v,c){var T=c+i,l=String(T).length,_=o(T,f-l);return _+s+v}).join(`
`)}},3952:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){for(var h=new Array(s+1),f=0;f<i.length;++f)h[f]=i[f];for(var f=0;f<=i.length;++f){for(var v=i.length;v<=s;++v){for(var c=new Array(s),T=0;T<s;++T)c[T]=Math.pow(v+1-f,T);h[v]=c}var l=o.apply(void 0,h);if(l)return!0}return!1}function n(i){var s=i.length;if(s===0)return[];if(s===1)return[0];for(var h=i[0].length,f=[i[0]],v=[0],c=1;c<s;++c){if(f.push(i[c]),!a(f,h)){f.pop();continue}if(v.push(c),v.length===h+1)return v}return v}},5995:function(e,t,r){"use strict";e.exports=n;var o=r(7642),a=r(6037);function n(i,s){return o(s).filter(function(h){for(var f=new Array(h.length),v=0;v<h.length;++v)f[v]=s[h[v]];return a(f)*i<1})}},3502:function(e,t,r){e.exports=n;var o=r(5995),a=r(9127);function n(i,s){return a(o(i,s))}},6468:function(e){e.exports=function(r){return atob(r)}},2642:function(e,t,r){"use strict";e.exports=n;var o=r(727);function a(i){for(var s=0,h=0;h<i.length;++h)s+=i[h];return s}function n(i,s){for(var h=s.length,f=new Array(h+1),v=0;v<h;++v){for(var c=new Array(h+1),T=0;T<=h;++T)c[T]=i[T][v];f[v]=c}f[h]=new Array(h+1);for(var v=0;v<=h;++v)f[h][v]=1;for(var l=new Array(h+1),v=0;v<h;++v)l[v]=s[v];l[h]=1;var _=o(f,l),w=a(_[h+1]);w===0&&(w=1);for(var A=new Array(h+1),v=0;v<=h;++v)A[v]=a(_[v])/w;return A}},7507:function(e,t){"use strict";t.byteLength=f,t.toByteArray=c,t.fromByteArray=_;for(var r=[],o=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)r[i]=n[i],o[n.charCodeAt(i)]=i;o[45]=62,o[95]=63;function h(w){var A=w.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var M=w.indexOf("=");M===-1&&(M=A);var g=M===A?0:4-M%4;return[M,g]}function f(w){var A=h(w),M=A[0],g=A[1];return(M+g)*3/4-g}function v(w,A,M){return(A+M)*3/4-M}function c(w){var A,M=h(w),g=M[0],b=M[1],p=new a(v(w,g,b)),u=0,y=b>0?g-4:g,m;for(m=0;m<y;m+=4)A=o[w.charCodeAt(m)]<<18|o[w.charCodeAt(m+1)]<<12|o[w.charCodeAt(m+2)]<<6|o[w.charCodeAt(m+3)],p[u++]=A>>16&255,p[u++]=A>>8&255,p[u++]=A&255;return b===2&&(A=o[w.charCodeAt(m)]<<2|o[w.charCodeAt(m+1)]>>4,p[u++]=A&255),b===1&&(A=o[w.charCodeAt(m)]<<10|o[w.charCodeAt(m+1)]<<4|o[w.charCodeAt(m+2)]>>2,p[u++]=A>>8&255,p[u++]=A&255),p}function T(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function l(w,A,M){for(var g,b=[],p=A;p<M;p+=3)g=(w[p]<<16&16711680)+(w[p+1]<<8&65280)+(w[p+2]&255),b.push(T(g));return b.join("")}function _(w){for(var A,M=w.length,g=M%3,b=[],p=16383,u=0,y=M-g;u<y;u+=p)b.push(l(w,u,u+p>y?y:u+p));return g===1?(A=w[M-1],b.push(r[A>>2]+r[A<<4&63]+"==")):g===2&&(A=(w[M-2]<<8)+w[M-1],b.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),b.join("")}},3865:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]).add(i[0].mul(n[1])),n[1].mul(i[1]))}},1318:function(e){"use strict";e.exports=t;function t(r,o){return r[0].mul(o[1]).cmp(o[0].mul(r[1]))}},8697:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]),n[1].mul(i[0]))}},7842:function(e,t,r){"use strict";var o=r(6330),a=r(1533),n=r(2651),i=r(6768),s=r(869),h=r(8697);e.exports=f;function f(v,c){if(o(v))return c?h(v,f(c)):[v[0].clone(),v[1].clone()];var T=0,l,_;if(a(v))l=v.clone();else if(typeof v=="string")l=i(v);else{if(v===0)return[n(0),n(1)];if(v===Math.floor(v))l=n(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T-=256;l=n(v)}}if(o(c))l.mul(c[1]),_=c[0].clone();else if(a(c))_=c.clone();else if(typeof c=="string")_=i(c);else if(!c)_=n(1);else if(c===Math.floor(c))_=n(c);else{for(;c!==Math.floor(c);)c=c*Math.pow(2,256),T+=256;_=n(c)}return T>0?l=l.ushln(T):T<0&&(_=_.ushln(-T)),s(l,_)}},6330:function(e,t,r){"use strict";var o=r(1533);e.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&o(n[0])&&o(n[1])}},5716:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n.cmp(new o(0))}},1369:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){var i=n.length,s=n.words,h=0;if(i===1)h=s[0];else if(i===2)h=s[0]+s[1]*67108864;else for(var f=0;f<i;f++){var v=s[f];h+=v*Math.pow(67108864,f)}return o(n)*h}},4025:function(e,t,r){"use strict";var o=r(2361),a=r(8828).countTrailingZeros;e.exports=n;function n(i){var s=a(o.lo(i));if(s<32)return s;var h=a(o.hi(i));return h>20?52:h+32}},1533:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n&&typeof n=="object"&&!!n.words}},2651:function(e,t,r){"use strict";var o=r(6859),a=r(2361);e.exports=n;function n(i){var s=a.exponent(i);return s<52?new o(i):new o(i*Math.pow(2,52-s)).ushln(s-52)}},869:function(e,t,r){"use strict";var o=r(2651),a=r(5716);e.exports=n;function n(i,s){var h=a(i),f=a(s);if(h===0)return[o(0),o(1)];if(f===0)return[o(0),o(0)];f<0&&(i=i.neg(),s=s.neg());var v=i.gcd(s);return v.cmpn(1)?[i.div(v),s.div(v)]:[i,s]}},6768:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return new o(n)}},6504:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[0]),n[1].mul(i[1]))}},7721:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){return o(n[0])*o(n[1])}},5572:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]).sub(n[1].mul(i[0])),n[1].mul(i[1]))}},946:function(e,t,r){"use strict";var o=r(1369),a=r(4025);e.exports=n;function n(i){var s=i[0],h=i[1];if(s.cmpn(0)===0)return 0;var f=s.abs().divmod(h.abs()),v=f.div,c=o(v),T=f.mod,l=s.negative!==h.negative?-1:1;if(T.cmpn(0)===0)return l*c;if(c){var _=a(c)+4,w=o(T.ushln(_).divRound(h));return l*(c+w*Math.pow(2,-_))}else{var A=h.bitLength()-T.bitLength()+53,w=o(T.ushln(A).divRound(h));return A<1023?l*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),l*w*Math.pow(2,1023-A))}}},2478:function(e){"use strict";function t(s,h,f,v,c){for(var T=c+1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w>=0?(T=l,c=l-1):v=l+1}return T}function r(s,h,f,v,c){for(var T=c+1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w>0?(T=l,c=l-1):v=l+1}return T}function o(s,h,f,v,c){for(var T=v-1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w<0?(T=l,v=l+1):c=l-1}return T}function a(s,h,f,v,c){for(var T=v-1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w<=0?(T=l,v=l+1):c=l-1}return T}function n(s,h,f,v,c){for(;v<=c;){var T=v+c>>>1,l=s[T],_=f!==void 0?f(l,h):l-h;if(_===0)return T;_<=0?v=T+1:c=T-1}return-1}function i(s,h,f,v,c,T){return typeof f=="function"?T(s,h,f,v===void 0?0:v|0,c===void 0?s.length-1:c|0):T(s,h,void 0,f===void 0?0:f|0,v===void 0?s.length-1:v|0)}e.exports={ge:function(s,h,f,v,c){return i(s,h,f,v,c,t)},gt:function(s,h,f,v,c){return i(s,h,f,v,c,r)},lt:function(s,h,f,v,c){return i(s,h,f,v,c,o)},le:function(s,h,f,v,c){return i(s,h,f,v,c,a)},eq:function(s,h,f,v,c){return i(s,h,f,v,c,n)}}},8828:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<<r-1,t.sign=function(n){return(n>0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n<i)},t.max=function(n,i){return n^(n^i)&-(n<i)},t.isPow2=function(n){return!(n&n-1)&&!!n},t.log2=function(n){var i,s;return i=(n>65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;n[i]=h<<f&255}})(a),t.reverse=function(n){return a[n&255]<<24|a[n>>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},6859:function(e,t,r){e=r.nmd(e),function(o,a){"use strict";function n(O,P){if(!O)throw new Error(P||"Assertion failed")}function i(O,P){O.super_=P;var U=function(){};U.prototype=P.prototype,O.prototype=new U,O.prototype.constructor=O}function s(O,P,U){if(s.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((P==="le"||P==="be")&&(U=P,P=10),this._init(O||0,P||10,U||"be"))}typeof o=="object"?o.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var h;try{typeof window<"u"&&typeof window.Buffer<"u"?h=window.Buffer:h=r(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,U){return P.cmp(U)>0?P:U},s.min=function(P,U){return P.cmp(U)<0?P:U},s.prototype._init=function(P,U,B){if(typeof P=="number")return this._initNumber(P,U,B);if(typeof P=="object")return this._initArray(P,U,B);U==="hex"&&(U=16),n(U===(U|0)&&U>=2&&U<=36),P=P.toString().replace(/\s+/g,"");var X=0;P[0]==="-"&&(X++,this.negative=1),X<P.length&&(U===16?this._parseHex(P,X,B):(this._parseBase(P,U,X),B==="le"&&this._initArray(this.toArray(),U,B)))},s.prototype._initNumber=function(P,U,B){P<0&&(this.negative=1,P=-P),P<67108864?(this.words=[P&67108863],this.length=1):P<4503599627370496?(this.words=[P&67108863,P/67108864&67108863],this.length=2):(n(P<9007199254740992),this.words=[P&67108863,P/67108864&67108863,1],this.length=3),B==="le"&&this._initArray(this.toArray(),U,B)},s.prototype._initArray=function(P,U,B){if(n(typeof P.length=="number"),P.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(P.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var $,le,ce=0;if(B==="be")for(X=P.length-1,$=0;X>=0;X-=3)le=P[X]|P[X-1]<<8|P[X-2]<<16,this.words[$]|=le<<ce&67108863,this.words[$+1]=le>>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,$++);else if(B==="le")for(X=0,$=0;X<P.length;X+=3)le=P[X]|P[X+1]<<8|P[X+2]<<16,this.words[$]|=le<<ce&67108863,this.words[$+1]=le>>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,$++);return this.strip()};function f(O,P){var U=O.charCodeAt(P);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function v(O,P,U){var B=f(O,U);return U-1>=P&&(B|=f(O,U-1)<<4),B}s.prototype._parseHex=function(P,U,B){this.length=Math.ceil((P.length-U)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var $=0,le=0,ce;if(B==="be")for(X=P.length-1;X>=U;X-=2)ce=v(P,U,X)<<$,this.words[le]|=ce&67108863,$>=18?($-=18,le+=1,this.words[le]|=ce>>>26):$+=8;else{var de=P.length-U;for(X=de%2===0?U+1:U;X<P.length;X+=2)ce=v(P,U,X)<<$,this.words[le]|=ce&67108863,$>=18?($-=18,le+=1,this.words[le]|=ce>>>26):$+=8}this.strip()};function c(O,P,U,B){for(var X=0,$=Math.min(O.length,U),le=P;le<$;le++){var ce=O.charCodeAt(le)-48;X*=B,ce>=49?X+=ce-49+10:ce>=17?X+=ce-17+10:X+=ce}return X}s.prototype._parseBase=function(P,U,B){this.words=[0],this.length=1;for(var X=0,$=1;$<=67108863;$*=U)X++;X--,$=$/U|0;for(var le=P.length-B,ce=le%X,de=Math.min(le,le-ce)+B,G=0,Y=B;Y<de;Y+=X)G=c(P,Y,Y+X,U),this.imuln($),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(ce!==0){var ee=1;for(G=c(P,Y,P.length,U),Y=0;Y<ce;Y++)ee*=U;this.imuln(ee),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G)}this.strip()},s.prototype.copy=function(P){P.words=new Array(this.length);for(var U=0;U<this.length;U++)P.words[U]=this.words[U];P.length=this.length,P.negative=this.negative,P.red=this.red},s.prototype.clone=function(){var P=new s(null);return this.copy(P),P},s.prototype._expand=function(P){for(;this.length<P;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var T=["","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"],l=[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],_=[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];s.prototype.toString=function(P,U){P=P||10,U=U|0||1;var B;if(P===16||P==="hex"){B="";for(var X=0,$=0,le=0;le<this.length;le++){var ce=this.words[le],de=((ce<<X|$)&16777215).toString(16);$=ce>>>24-X&16777215,X+=2,X>=26&&(X-=26,le--),$!==0||le!==this.length-1?B=T[6-de.length]+de+B:B=de+B}for($!==0&&(B=$.toString(16)+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(P===(P|0)&&P>=2&&P<=36){var G=l[P],Y=_[P];B="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var q=ee.modn(Y).toString(P);ee=ee.idivn(Y),ee.isZero()?B=q+B:B=T[G-q.length]+q+B}for(this.isZero()&&(B="0"+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,U){return n(typeof h<"u"),this.toArrayLike(h,P,U)},s.prototype.toArray=function(P,U){return this.toArrayLike(Array,P,U)},s.prototype.toArrayLike=function(P,U,B){var X=this.byteLength(),$=B||Math.max(1,X);n(X<=$,"byte array longer than desired length"),n($>0,"Requested array length <= 0"),this.strip();var le=U==="le",ce=new P($),de,G,Y=this.clone();if(le){for(G=0;!Y.isZero();G++)de=Y.andln(255),Y.iushrn(8),ce[G]=de;for(;G<$;G++)ce[G]=0}else{for(G=0;G<$-X;G++)ce[G]=0;for(G=0;!Y.isZero();G++)de=Y.andln(255),Y.iushrn(8),ce[$-G-1]=de}return ce},Math.clz32?s.prototype._countBits=function(P){return 32-Math.clz32(P)}:s.prototype._countBits=function(P){var U=P,B=0;return U>=4096&&(B+=13,U>>>=13),U>=64&&(B+=7,U>>>=7),U>=8&&(B+=4,U>>>=4),U>=2&&(B+=2,U>>>=2),B+U},s.prototype._zeroBits=function(P){if(P===0)return 26;var U=P,B=0;return U&8191||(B+=13,U>>>=13),U&127||(B+=7,U>>>=7),U&15||(B+=4,U>>>=4),U&3||(B+=2,U>>>=2),U&1||B++,B},s.prototype.bitLength=function(){var P=this.words[this.length-1],U=this._countBits(P);return(this.length-1)*26+U};function w(O){for(var P=new Array(O.bitLength()),U=0;U<P.length;U++){var B=U/26|0,X=U%26;P[U]=(O.words[B]&1<<X)>>>X}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,U=0;U<this.length;U++){var B=this._zeroBits(this.words[U]);if(P+=B,B!==26)break}return P},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(P){return this.negative!==0?this.abs().inotn(P).iaddn(1):this.clone()},s.prototype.fromTwos=function(P){return this.testn(P-1)?this.notn(P).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(P){for(;this.length<P.length;)this.words[this.length++]=0;for(var U=0;U<P.length;U++)this.words[U]=this.words[U]|P.words[U];return this.strip()},s.prototype.ior=function(P){return n((this.negative|P.negative)===0),this.iuor(P)},s.prototype.or=function(P){return this.length>P.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var U;this.length>P.length?U=P:U=this;for(var B=0;B<U.length;B++)this.words[B]=this.words[B]&P.words[B];return this.length=U.length,this.strip()},s.prototype.iand=function(P){return n((this.negative|P.negative)===0),this.iuand(P)},s.prototype.and=function(P){return this.length>P.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var U,B;this.length>P.length?(U=this,B=P):(U=P,B=this);for(var X=0;X<B.length;X++)this.words[X]=U.words[X]^B.words[X];if(this!==U)for(;X<U.length;X++)this.words[X]=U.words[X];return this.length=U.length,this.strip()},s.prototype.ixor=function(P){return n((this.negative|P.negative)===0),this.iuxor(P)},s.prototype.xor=function(P){return this.length>P.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var U=Math.ceil(P/26)|0,B=P%26;this._expand(U),B>0&&U--;for(var X=0;X<U;X++)this.words[X]=~this.words[X]&67108863;return B>0&&(this.words[X]=~this.words[X]&67108863>>26-B),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,U){n(typeof P=="number"&&P>=0);var B=P/26|0,X=P%26;return this._expand(B+1),U?this.words[B]=this.words[B]|1<<X:this.words[B]=this.words[B]&~(1<<X),this.strip()},s.prototype.iadd=function(P){var U;if(this.negative!==0&&P.negative===0)return this.negative=0,U=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,U=this.isub(P),P.negative=1,U._normSign();var B,X;this.length>P.length?(B=this,X=P):(B=P,X=this);for(var $=0,le=0;le<X.length;le++)U=(B.words[le]|0)+(X.words[le]|0)+$,this.words[le]=U&67108863,$=U>>>26;for(;$!==0&&le<B.length;le++)U=(B.words[le]|0)+$,this.words[le]=U&67108863,$=U>>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;le<B.length;le++)this.words[le]=B.words[le];return this},s.prototype.add=function(P){var U;return P.negative!==0&&this.negative===0?(P.negative=0,U=this.sub(P),P.negative^=1,U):P.negative===0&&this.negative!==0?(this.negative=0,U=P.sub(this),this.negative=1,U):this.length>P.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var U=this.iadd(P);return P.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var B=this.cmp(P);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,$;B>0?(X=this,$=P):(X=P,$=this);for(var le=0,ce=0;ce<$.length;ce++)U=(X.words[ce]|0)-($.words[ce]|0)+le,le=U>>26,this.words[ce]=U&67108863;for(;le!==0&&ce<X.length;ce++)U=(X.words[ce]|0)+le,le=U>>26,this.words[ce]=U&67108863;if(le===0&&ce<X.length&&X!==this)for(;ce<X.length;ce++)this.words[ce]=X.words[ce];return this.length=Math.max(this.length,ce),X!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function A(O,P,U){U.negative=P.negative^O.negative;var B=O.length+P.length|0;U.length=B,B=B-1|0;var X=O.words[0]|0,$=P.words[0]|0,le=X*$,ce=le&67108863,de=le/67108864|0;U.words[0]=ce;for(var G=1;G<B;G++){for(var Y=de>>>26,ee=de&67108863,q=Math.min(G,P.length-1),se=Math.max(0,G-O.length+1);se<=q;se++){var ae=G-se|0;X=O.words[ae]|0,$=P.words[se]|0,le=X*$+ee,Y+=le/67108864|0,ee=le&67108863}U.words[G]=ee|0,de=Y|0}return de!==0?U.words[G]=de|0:U.length--,U.strip()}var M=function(P,U,B){var X=P.words,$=U.words,le=B.words,ce=0,de,G,Y,ee=X[0]|0,q=ee&8191,se=ee>>>13,ae=X[1]|0,j=ae&8191,Q=ae>>>13,re=X[2]|0,pe=re&8191,we=re>>>13,Se=X[3]|0,Ie=Se&8191,Re=Se>>>13,We=X[4]|0,at=We&8191,nt=We>>>13,tt=X[5]|0,qe=tt&8191,he=tt>>>13,ue=X[6]|0,ne=ue&8191,Ce=ue>>>13,Ye=X[7]|0,rt=Ye&8191,Ke=Ye>>>13,Mt=X[8]|0,kt=Mt&8191,Nt=Mt>>>13,Gt=X[9]|0,Mr=Gt&8191,mr=Gt>>>13,qr=$[0]|0,Er=qr&8191,Ir=qr>>>13,_t=$[1]|0,Oe=_t&8191,Je=_t>>>13,Ae=$[2]|0,Le=Ae&8191,Ue=Ae>>>13,Ze=$[3]|0,st=Ze&8191,ut=Ze>>>13,Ut=$[4]|0,Ct=Ut&8191,Pt=Ut>>>13,jt=$[5]|0,fr=jt&8191,ur=jt>>>13,sr=$[6]|0,Pr=sr&8191,Ta=sr>>>13,Oa=$[7]|0,Ia=Oa&8191,qa=Oa>>>13,Wa=$[8]|0,Ca=Wa&8191,hi=Wa>>>13,wi=$[9]|0,Kt=wi&8191,Dt=wi>>>13;B.negative=P.negative^U.negative,B.length=19,de=Math.imul(q,Er),G=Math.imul(q,Ir),G=G+Math.imul(se,Er)|0,Y=Math.imul(se,Ir);var Yt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,de=Math.imul(j,Er),G=Math.imul(j,Ir),G=G+Math.imul(Q,Er)|0,Y=Math.imul(Q,Ir),de=de+Math.imul(q,Oe)|0,G=G+Math.imul(q,Je)|0,G=G+Math.imul(se,Oe)|0,Y=Y+Math.imul(se,Je)|0;var Jt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,de=Math.imul(pe,Er),G=Math.imul(pe,Ir),G=G+Math.imul(we,Er)|0,Y=Math.imul(we,Ir),de=de+Math.imul(j,Oe)|0,G=G+Math.imul(j,Je)|0,G=G+Math.imul(Q,Oe)|0,Y=Y+Math.imul(Q,Je)|0,de=de+Math.imul(q,Le)|0,G=G+Math.imul(q,Ue)|0,G=G+Math.imul(se,Le)|0,Y=Y+Math.imul(se,Ue)|0;var Fr=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,de=Math.imul(Ie,Er),G=Math.imul(Ie,Ir),G=G+Math.imul(Re,Er)|0,Y=Math.imul(Re,Ir),de=de+Math.imul(pe,Oe)|0,G=G+Math.imul(pe,Je)|0,G=G+Math.imul(we,Oe)|0,Y=Y+Math.imul(we,Je)|0,de=de+Math.imul(j,Le)|0,G=G+Math.imul(j,Ue)|0,G=G+Math.imul(Q,Le)|0,Y=Y+Math.imul(Q,Ue)|0,de=de+Math.imul(q,st)|0,G=G+Math.imul(q,ut)|0,G=G+Math.imul(se,st)|0,Y=Y+Math.imul(se,ut)|0;var ta=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ta>>>26)|0,ta&=67108863,de=Math.imul(at,Er),G=Math.imul(at,Ir),G=G+Math.imul(nt,Er)|0,Y=Math.imul(nt,Ir),de=de+Math.imul(Ie,Oe)|0,G=G+Math.imul(Ie,Je)|0,G=G+Math.imul(Re,Oe)|0,Y=Y+Math.imul(Re,Je)|0,de=de+Math.imul(pe,Le)|0,G=G+Math.imul(pe,Ue)|0,G=G+Math.imul(we,Le)|0,Y=Y+Math.imul(we,Ue)|0,de=de+Math.imul(j,st)|0,G=G+Math.imul(j,ut)|0,G=G+Math.imul(Q,st)|0,Y=Y+Math.imul(Q,ut)|0,de=de+Math.imul(q,Ct)|0,G=G+Math.imul(q,Pt)|0,G=G+Math.imul(se,Ct)|0,Y=Y+Math.imul(se,Pt)|0;var ra=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ra>>>26)|0,ra&=67108863,de=Math.imul(qe,Er),G=Math.imul(qe,Ir),G=G+Math.imul(he,Er)|0,Y=Math.imul(he,Ir),de=de+Math.imul(at,Oe)|0,G=G+Math.imul(at,Je)|0,G=G+Math.imul(nt,Oe)|0,Y=Y+Math.imul(nt,Je)|0,de=de+Math.imul(Ie,Le)|0,G=G+Math.imul(Ie,Ue)|0,G=G+Math.imul(Re,Le)|0,Y=Y+Math.imul(Re,Ue)|0,de=de+Math.imul(pe,st)|0,G=G+Math.imul(pe,ut)|0,G=G+Math.imul(we,st)|0,Y=Y+Math.imul(we,ut)|0,de=de+Math.imul(j,Ct)|0,G=G+Math.imul(j,Pt)|0,G=G+Math.imul(Q,Ct)|0,Y=Y+Math.imul(Q,Pt)|0,de=de+Math.imul(q,fr)|0,G=G+Math.imul(q,ur)|0,G=G+Math.imul(se,fr)|0,Y=Y+Math.imul(se,ur)|0;var ca=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ca>>>26)|0,ca&=67108863,de=Math.imul(ne,Er),G=Math.imul(ne,Ir),G=G+Math.imul(Ce,Er)|0,Y=Math.imul(Ce,Ir),de=de+Math.imul(qe,Oe)|0,G=G+Math.imul(qe,Je)|0,G=G+Math.imul(he,Oe)|0,Y=Y+Math.imul(he,Je)|0,de=de+Math.imul(at,Le)|0,G=G+Math.imul(at,Ue)|0,G=G+Math.imul(nt,Le)|0,Y=Y+Math.imul(nt,Ue)|0,de=de+Math.imul(Ie,st)|0,G=G+Math.imul(Ie,ut)|0,G=G+Math.imul(Re,st)|0,Y=Y+Math.imul(Re,ut)|0,de=de+Math.imul(pe,Ct)|0,G=G+Math.imul(pe,Pt)|0,G=G+Math.imul(we,Ct)|0,Y=Y+Math.imul(we,Pt)|0,de=de+Math.imul(j,fr)|0,G=G+Math.imul(j,ur)|0,G=G+Math.imul(Q,fr)|0,Y=Y+Math.imul(Q,ur)|0,de=de+Math.imul(q,Pr)|0,G=G+Math.imul(q,Ta)|0,G=G+Math.imul(se,Pr)|0,Y=Y+Math.imul(se,Ta)|0;var Ba=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,de=Math.imul(rt,Er),G=Math.imul(rt,Ir),G=G+Math.imul(Ke,Er)|0,Y=Math.imul(Ke,Ir),de=de+Math.imul(ne,Oe)|0,G=G+Math.imul(ne,Je)|0,G=G+Math.imul(Ce,Oe)|0,Y=Y+Math.imul(Ce,Je)|0,de=de+Math.imul(qe,Le)|0,G=G+Math.imul(qe,Ue)|0,G=G+Math.imul(he,Le)|0,Y=Y+Math.imul(he,Ue)|0,de=de+Math.imul(at,st)|0,G=G+Math.imul(at,ut)|0,G=G+Math.imul(nt,st)|0,Y=Y+Math.imul(nt,ut)|0,de=de+Math.imul(Ie,Ct)|0,G=G+Math.imul(Ie,Pt)|0,G=G+Math.imul(Re,Ct)|0,Y=Y+Math.imul(Re,Pt)|0,de=de+Math.imul(pe,fr)|0,G=G+Math.imul(pe,ur)|0,G=G+Math.imul(we,fr)|0,Y=Y+Math.imul(we,ur)|0,de=de+Math.imul(j,Pr)|0,G=G+Math.imul(j,Ta)|0,G=G+Math.imul(Q,Pr)|0,Y=Y+Math.imul(Q,Ta)|0,de=de+Math.imul(q,Ia)|0,G=G+Math.imul(q,qa)|0,G=G+Math.imul(se,Ia)|0,Y=Y+Math.imul(se,qa)|0;var $a=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+($a>>>26)|0,$a&=67108863,de=Math.imul(kt,Er),G=Math.imul(kt,Ir),G=G+Math.imul(Nt,Er)|0,Y=Math.imul(Nt,Ir),de=de+Math.imul(rt,Oe)|0,G=G+Math.imul(rt,Je)|0,G=G+Math.imul(Ke,Oe)|0,Y=Y+Math.imul(Ke,Je)|0,de=de+Math.imul(ne,Le)|0,G=G+Math.imul(ne,Ue)|0,G=G+Math.imul(Ce,Le)|0,Y=Y+Math.imul(Ce,Ue)|0,de=de+Math.imul(qe,st)|0,G=G+Math.imul(qe,ut)|0,G=G+Math.imul(he,st)|0,Y=Y+Math.imul(he,ut)|0,de=de+Math.imul(at,Ct)|0,G=G+Math.imul(at,Pt)|0,G=G+Math.imul(nt,Ct)|0,Y=Y+Math.imul(nt,Pt)|0,de=de+Math.imul(Ie,fr)|0,G=G+Math.imul(Ie,ur)|0,G=G+Math.imul(Re,fr)|0,Y=Y+Math.imul(Re,ur)|0,de=de+Math.imul(pe,Pr)|0,G=G+Math.imul(pe,Ta)|0,G=G+Math.imul(we,Pr)|0,Y=Y+Math.imul(we,Ta)|0,de=de+Math.imul(j,Ia)|0,G=G+Math.imul(j,qa)|0,G=G+Math.imul(Q,Ia)|0,Y=Y+Math.imul(Q,qa)|0,de=de+Math.imul(q,Ca)|0,G=G+Math.imul(q,hi)|0,G=G+Math.imul(se,Ca)|0,Y=Y+Math.imul(se,hi)|0;var Za=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Za>>>26)|0,Za&=67108863,de=Math.imul(Mr,Er),G=Math.imul(Mr,Ir),G=G+Math.imul(mr,Er)|0,Y=Math.imul(mr,Ir),de=de+Math.imul(kt,Oe)|0,G=G+Math.imul(kt,Je)|0,G=G+Math.imul(Nt,Oe)|0,Y=Y+Math.imul(Nt,Je)|0,de=de+Math.imul(rt,Le)|0,G=G+Math.imul(rt,Ue)|0,G=G+Math.imul(Ke,Le)|0,Y=Y+Math.imul(Ke,Ue)|0,de=de+Math.imul(ne,st)|0,G=G+Math.imul(ne,ut)|0,G=G+Math.imul(Ce,st)|0,Y=Y+Math.imul(Ce,ut)|0,de=de+Math.imul(qe,Ct)|0,G=G+Math.imul(qe,Pt)|0,G=G+Math.imul(he,Ct)|0,Y=Y+Math.imul(he,Pt)|0,de=de+Math.imul(at,fr)|0,G=G+Math.imul(at,ur)|0,G=G+Math.imul(nt,fr)|0,Y=Y+Math.imul(nt,ur)|0,de=de+Math.imul(Ie,Pr)|0,G=G+Math.imul(Ie,Ta)|0,G=G+Math.imul(Re,Pr)|0,Y=Y+Math.imul(Re,Ta)|0,de=de+Math.imul(pe,Ia)|0,G=G+Math.imul(pe,qa)|0,G=G+Math.imul(we,Ia)|0,Y=Y+Math.imul(we,qa)|0,de=de+Math.imul(j,Ca)|0,G=G+Math.imul(j,hi)|0,G=G+Math.imul(Q,Ca)|0,Y=Y+Math.imul(Q,hi)|0,de=de+Math.imul(q,Kt)|0,G=G+Math.imul(q,Dt)|0,G=G+Math.imul(se,Kt)|0,Y=Y+Math.imul(se,Dt)|0;var ri=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ri>>>26)|0,ri&=67108863,de=Math.imul(Mr,Oe),G=Math.imul(Mr,Je),G=G+Math.imul(mr,Oe)|0,Y=Math.imul(mr,Je),de=de+Math.imul(kt,Le)|0,G=G+Math.imul(kt,Ue)|0,G=G+Math.imul(Nt,Le)|0,Y=Y+Math.imul(Nt,Ue)|0,de=de+Math.imul(rt,st)|0,G=G+Math.imul(rt,ut)|0,G=G+Math.imul(Ke,st)|0,Y=Y+Math.imul(Ke,ut)|0,de=de+Math.imul(ne,Ct)|0,G=G+Math.imul(ne,Pt)|0,G=G+Math.imul(Ce,Ct)|0,Y=Y+Math.imul(Ce,Pt)|0,de=de+Math.imul(qe,fr)|0,G=G+Math.imul(qe,ur)|0,G=G+Math.imul(he,fr)|0,Y=Y+Math.imul(he,ur)|0,de=de+Math.imul(at,Pr)|0,G=G+Math.imul(at,Ta)|0,G=G+Math.imul(nt,Pr)|0,Y=Y+Math.imul(nt,Ta)|0,de=de+Math.imul(Ie,Ia)|0,G=G+Math.imul(Ie,qa)|0,G=G+Math.imul(Re,Ia)|0,Y=Y+Math.imul(Re,qa)|0,de=de+Math.imul(pe,Ca)|0,G=G+Math.imul(pe,hi)|0,G=G+Math.imul(we,Ca)|0,Y=Y+Math.imul(we,hi)|0,de=de+Math.imul(j,Kt)|0,G=G+Math.imul(j,Dt)|0,G=G+Math.imul(Q,Kt)|0,Y=Y+Math.imul(Q,Dt)|0;var pi=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(pi>>>26)|0,pi&=67108863,de=Math.imul(Mr,Le),G=Math.imul(Mr,Ue),G=G+Math.imul(mr,Le)|0,Y=Math.imul(mr,Ue),de=de+Math.imul(kt,st)|0,G=G+Math.imul(kt,ut)|0,G=G+Math.imul(Nt,st)|0,Y=Y+Math.imul(Nt,ut)|0,de=de+Math.imul(rt,Ct)|0,G=G+Math.imul(rt,Pt)|0,G=G+Math.imul(Ke,Ct)|0,Y=Y+Math.imul(Ke,Pt)|0,de=de+Math.imul(ne,fr)|0,G=G+Math.imul(ne,ur)|0,G=G+Math.imul(Ce,fr)|0,Y=Y+Math.imul(Ce,ur)|0,de=de+Math.imul(qe,Pr)|0,G=G+Math.imul(qe,Ta)|0,G=G+Math.imul(he,Pr)|0,Y=Y+Math.imul(he,Ta)|0,de=de+Math.imul(at,Ia)|0,G=G+Math.imul(at,qa)|0,G=G+Math.imul(nt,Ia)|0,Y=Y+Math.imul(nt,qa)|0,de=de+Math.imul(Ie,Ca)|0,G=G+Math.imul(Ie,hi)|0,G=G+Math.imul(Re,Ca)|0,Y=Y+Math.imul(Re,hi)|0,de=de+Math.imul(pe,Kt)|0,G=G+Math.imul(pe,Dt)|0,G=G+Math.imul(we,Kt)|0,Y=Y+Math.imul(we,Dt)|0;var Ra=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,de=Math.imul(Mr,st),G=Math.imul(Mr,ut),G=G+Math.imul(mr,st)|0,Y=Math.imul(mr,ut),de=de+Math.imul(kt,Ct)|0,G=G+Math.imul(kt,Pt)|0,G=G+Math.imul(Nt,Ct)|0,Y=Y+Math.imul(Nt,Pt)|0,de=de+Math.imul(rt,fr)|0,G=G+Math.imul(rt,ur)|0,G=G+Math.imul(Ke,fr)|0,Y=Y+Math.imul(Ke,ur)|0,de=de+Math.imul(ne,Pr)|0,G=G+Math.imul(ne,Ta)|0,G=G+Math.imul(Ce,Pr)|0,Y=Y+Math.imul(Ce,Ta)|0,de=de+Math.imul(qe,Ia)|0,G=G+Math.imul(qe,qa)|0,G=G+Math.imul(he,Ia)|0,Y=Y+Math.imul(he,qa)|0,de=de+Math.imul(at,Ca)|0,G=G+Math.imul(at,hi)|0,G=G+Math.imul(nt,Ca)|0,Y=Y+Math.imul(nt,hi)|0,de=de+Math.imul(Ie,Kt)|0,G=G+Math.imul(Ie,Dt)|0,G=G+Math.imul(Re,Kt)|0,Y=Y+Math.imul(Re,Dt)|0;var an=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(an>>>26)|0,an&=67108863,de=Math.imul(Mr,Ct),G=Math.imul(Mr,Pt),G=G+Math.imul(mr,Ct)|0,Y=Math.imul(mr,Pt),de=de+Math.imul(kt,fr)|0,G=G+Math.imul(kt,ur)|0,G=G+Math.imul(Nt,fr)|0,Y=Y+Math.imul(Nt,ur)|0,de=de+Math.imul(rt,Pr)|0,G=G+Math.imul(rt,Ta)|0,G=G+Math.imul(Ke,Pr)|0,Y=Y+Math.imul(Ke,Ta)|0,de=de+Math.imul(ne,Ia)|0,G=G+Math.imul(ne,qa)|0,G=G+Math.imul(Ce,Ia)|0,Y=Y+Math.imul(Ce,qa)|0,de=de+Math.imul(qe,Ca)|0,G=G+Math.imul(qe,hi)|0,G=G+Math.imul(he,Ca)|0,Y=Y+Math.imul(he,hi)|0,de=de+Math.imul(at,Kt)|0,G=G+Math.imul(at,Dt)|0,G=G+Math.imul(nt,Kt)|0,Y=Y+Math.imul(nt,Dt)|0;var tn=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(tn>>>26)|0,tn&=67108863,de=Math.imul(Mr,fr),G=Math.imul(Mr,ur),G=G+Math.imul(mr,fr)|0,Y=Math.imul(mr,ur),de=de+Math.imul(kt,Pr)|0,G=G+Math.imul(kt,Ta)|0,G=G+Math.imul(Nt,Pr)|0,Y=Y+Math.imul(Nt,Ta)|0,de=de+Math.imul(rt,Ia)|0,G=G+Math.imul(rt,qa)|0,G=G+Math.imul(Ke,Ia)|0,Y=Y+Math.imul(Ke,qa)|0,de=de+Math.imul(ne,Ca)|0,G=G+Math.imul(ne,hi)|0,G=G+Math.imul(Ce,Ca)|0,Y=Y+Math.imul(Ce,hi)|0,de=de+Math.imul(qe,Kt)|0,G=G+Math.imul(qe,Dt)|0,G=G+Math.imul(he,Kt)|0,Y=Y+Math.imul(he,Dt)|0;var fn=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(fn>>>26)|0,fn&=67108863,de=Math.imul(Mr,Pr),G=Math.imul(Mr,Ta),G=G+Math.imul(mr,Pr)|0,Y=Math.imul(mr,Ta),de=de+Math.imul(kt,Ia)|0,G=G+Math.imul(kt,qa)|0,G=G+Math.imul(Nt,Ia)|0,Y=Y+Math.imul(Nt,qa)|0,de=de+Math.imul(rt,Ca)|0,G=G+Math.imul(rt,hi)|0,G=G+Math.imul(Ke,Ca)|0,Y=Y+Math.imul(Ke,hi)|0,de=de+Math.imul(ne,Kt)|0,G=G+Math.imul(ne,Dt)|0,G=G+Math.imul(Ce,Kt)|0,Y=Y+Math.imul(Ce,Dt)|0;var xt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(xt>>>26)|0,xt&=67108863,de=Math.imul(Mr,Ia),G=Math.imul(Mr,qa),G=G+Math.imul(mr,Ia)|0,Y=Math.imul(mr,qa),de=de+Math.imul(kt,Ca)|0,G=G+Math.imul(kt,hi)|0,G=G+Math.imul(Nt,Ca)|0,Y=Y+Math.imul(Nt,hi)|0,de=de+Math.imul(rt,Kt)|0,G=G+Math.imul(rt,Dt)|0,G=G+Math.imul(Ke,Kt)|0,Y=Y+Math.imul(Ke,Dt)|0;var lt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,de=Math.imul(Mr,Ca),G=Math.imul(Mr,hi),G=G+Math.imul(mr,Ca)|0,Y=Math.imul(mr,hi),de=de+Math.imul(kt,Kt)|0,G=G+Math.imul(kt,Dt)|0,G=G+Math.imul(Nt,Kt)|0,Y=Y+Math.imul(Nt,Dt)|0;var Br=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Br>>>26)|0,Br&=67108863,de=Math.imul(Mr,Kt),G=Math.imul(Mr,Dt),G=G+Math.imul(mr,Kt)|0,Y=Math.imul(mr,Dt);var Cr=(ce+de|0)+((G&8191)<<13)|0;return ce=(Y+(G>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,le[0]=Yt,le[1]=Jt,le[2]=Fr,le[3]=ta,le[4]=ra,le[5]=ca,le[6]=Ba,le[7]=$a,le[8]=Za,le[9]=ri,le[10]=pi,le[11]=Ra,le[12]=an,le[13]=tn,le[14]=fn,le[15]=xt,le[16]=lt,le[17]=Br,le[18]=Cr,ce!==0&&(le[19]=ce,B.length++),B};Math.imul||(M=A);function g(O,P,U){U.negative=P.negative^O.negative,U.length=O.length+P.length;for(var B=0,X=0,$=0;$<U.length-1;$++){var le=X;X=0;for(var ce=B&67108863,de=Math.min($,P.length-1),G=Math.max(0,$-O.length+1);G<=de;G++){var Y=$-G,ee=O.words[Y]|0,q=P.words[G]|0,se=ee*q,ae=se&67108863;le=le+(se/67108864|0)|0,ae=ae+ce|0,ce=ae&67108863,le=le+(ae>>>26)|0,X+=le>>>26,le&=67108863}U.words[$]=ce,B=le,le=X}return B!==0?U.words[$]=B:U.length--,U.strip()}function b(O,P,U){var B=new p;return B.mulp(O,P,U)}s.prototype.mulTo=function(P,U){var B,X=this.length+P.length;return this.length===10&&P.length===10?B=M(this,P,U):X<63?B=A(this,P,U):X<1024?B=g(this,P,U):B=b(this,P,U),B};function p(O,P){this.x=O,this.y=P}p.prototype.makeRBT=function(P){for(var U=new Array(P),B=s.prototype._countBits(P)-1,X=0;X<P;X++)U[X]=this.revBin(X,B,P);return U},p.prototype.revBin=function(P,U,B){if(P===0||P===B-1)return P;for(var X=0,$=0;$<U;$++)X|=(P&1)<<U-$-1,P>>=1;return X},p.prototype.permute=function(P,U,B,X,$,le){for(var ce=0;ce<le;ce++)X[ce]=U[P[ce]],$[ce]=B[P[ce]]},p.prototype.transform=function(P,U,B,X,$,le){this.permute(le,P,U,B,X,$);for(var ce=1;ce<$;ce<<=1)for(var de=ce<<1,G=Math.cos(2*Math.PI/de),Y=Math.sin(2*Math.PI/de),ee=0;ee<$;ee+=de)for(var q=G,se=Y,ae=0;ae<ce;ae++){var j=B[ee+ae],Q=X[ee+ae],re=B[ee+ae+ce],pe=X[ee+ae+ce],we=q*re-se*pe;pe=q*pe+se*re,re=we,B[ee+ae]=j+re,X[ee+ae]=Q+pe,B[ee+ae+ce]=j-re,X[ee+ae+ce]=Q-pe,ae!==de&&(we=G*q-Y*se,se=G*se+Y*q,q=we)}},p.prototype.guessLen13b=function(P,U){var B=Math.max(U,P)|1,X=B&1,$=0;for(B=B/2|0;B;B=B>>>1)$++;return 1<<$+1+X},p.prototype.conjugate=function(P,U,B){if(!(B<=1))for(var X=0;X<B/2;X++){var $=P[X];P[X]=P[B-X-1],P[B-X-1]=$,$=U[X],U[X]=-U[B-X-1],U[B-X-1]=-$}},p.prototype.normalize13b=function(P,U){for(var B=0,X=0;X<U/2;X++){var $=Math.round(P[2*X+1]/U)*8192+Math.round(P[2*X]/U)+B;P[X]=$&67108863,$<67108864?B=0:B=$/67108864|0}return P},p.prototype.convert13b=function(P,U,B,X){for(var $=0,le=0;le<U;le++)$=$+(P[le]|0),B[2*le]=$&8191,$=$>>>13,B[2*le+1]=$&8191,$=$>>>13;for(le=2*U;le<X;++le)B[le]=0;n($===0),n(($&-8192)===0)},p.prototype.stub=function(P){for(var U=new Array(P),B=0;B<P;B++)U[B]=0;return U},p.prototype.mulp=function(P,U,B){var X=2*this.guessLen13b(P.length,U.length),$=this.makeRBT(X),le=this.stub(X),ce=new Array(X),de=new Array(X),G=new Array(X),Y=new Array(X),ee=new Array(X),q=new Array(X),se=B.words;se.length=X,this.convert13b(P.words,P.length,ce,X),this.convert13b(U.words,U.length,Y,X),this.transform(ce,le,de,G,X,$),this.transform(Y,le,ee,q,X,$);for(var ae=0;ae<X;ae++){var j=de[ae]*ee[ae]-G[ae]*q[ae];G[ae]=de[ae]*q[ae]+G[ae]*ee[ae],de[ae]=j}return this.conjugate(de,G,X),this.transform(de,G,se,le,X,$),this.conjugate(se,le,X),this.normalize13b(se,X),B.negative=P.negative^U.negative,B.length=P.length+U.length,B.strip()},s.prototype.mul=function(P){var U=new s(null);return U.words=new Array(this.length+P.length),this.mulTo(P,U)},s.prototype.mulf=function(P){var U=new s(null);return U.words=new Array(this.length+P.length),b(this,P,U)},s.prototype.imul=function(P){return this.clone().mulTo(P,this)},s.prototype.imuln=function(P){n(typeof P=="number"),n(P<67108864);for(var U=0,B=0;B<this.length;B++){var X=(this.words[B]|0)*P,$=(X&67108863)+(U&67108863);U>>=26,U+=X/67108864|0,U+=$>>>26,this.words[B]=$&67108863}return U!==0&&(this.words[B]=U,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var U=w(P);if(U.length===0)return new s(1);for(var B=this,X=0;X<U.length&&U[X]===0;X++,B=B.sqr());if(++X<U.length)for(var $=B.sqr();X<U.length;X++,$=$.sqr())U[X]!==0&&(B=B.mul($));return B},s.prototype.iushln=function(P){n(typeof P=="number"&&P>=0);var U=P%26,B=(P-U)/26,X=67108863>>>26-U<<26-U,$;if(U!==0){var le=0;for($=0;$<this.length;$++){var ce=this.words[$]&X,de=(this.words[$]|0)-ce<<U;this.words[$]=de|le,le=ce>>>26-U}le&&(this.words[$]=le,this.length++)}if(B!==0){for($=this.length-1;$>=0;$--)this.words[$+B]=this.words[$];for($=0;$<B;$++)this.words[$]=0;this.length+=B}return this.strip()},s.prototype.ishln=function(P){return n(this.negative===0),this.iushln(P)},s.prototype.iushrn=function(P,U,B){n(typeof P=="number"&&P>=0);var X;U?X=(U-U%26)/26:X=0;var $=P%26,le=Math.min((P-$)/26,this.length),ce=67108863^67108863>>>$<<$,de=B;if(X-=le,X=Math.max(0,X),de){for(var G=0;G<le;G++)de.words[G]=this.words[G];de.length=le}if(le!==0)if(this.length>le)for(this.length-=le,G=0;G<this.length;G++)this.words[G]=this.words[G+le];else this.words[0]=0,this.length=1;var Y=0;for(G=this.length-1;G>=0&&(Y!==0||G>=X);G--){var ee=this.words[G]|0;this.words[G]=Y<<26-$|ee>>>$,Y=ee&ce}return de&&Y!==0&&(de.words[de.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,U,B){return n(this.negative===0),this.iushrn(P,U,B)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var U=P%26,B=(P-U)/26,X=1<<U;if(this.length<=B)return!1;var $=this.words[B];return!!($&X)},s.prototype.imaskn=function(P){n(typeof P=="number"&&P>=0);var U=P%26,B=(P-U)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(U!==0&&B++,this.length=Math.min(B,this.length),U!==0){var X=67108863^67108863>>>U<<U;this.words[this.length-1]&=X}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.maskn=function(P){return this.clone().imaskn(P)},s.prototype.iaddn=function(P){return n(typeof P=="number"),n(P<67108864),P<0?this.isubn(-P):this.negative!==0?this.length===1&&(this.words[0]|0)<P?(this.words[0]=P-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(P),this.negative=1,this):this._iaddn(P)},s.prototype._iaddn=function(P){this.words[0]+=P;for(var U=0;U<this.length&&this.words[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},s.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U<this.length&&this.words[U]<0;U++)this.words[U]+=67108864,this.words[U+1]-=1;return this.strip()},s.prototype.addn=function(P){return this.clone().iaddn(P)},s.prototype.subn=function(P){return this.clone().isubn(P)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(P,U,B){var X=P.length+B,$;this._expand(X);var le,ce=0;for($=0;$<P.length;$++){le=(this.words[$+B]|0)+ce;var de=(P.words[$]|0)*U;le-=de&67108863,ce=(le>>26)-(de/67108864|0),this.words[$+B]=le&67108863}for(;$<this.length-B;$++)le=(this.words[$+B]|0)+ce,ce=le>>26,this.words[$+B]=le&67108863;if(ce===0)return this.strip();for(n(ce===-1),ce=0,$=0;$<this.length;$++)le=-(this.words[$]|0)+ce,ce=le>>26,this.words[$]=le&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,U){var B=this.length-P.length,X=this.clone(),$=P,le=$.words[$.length-1]|0,ce=this._countBits(le);B=26-ce,B!==0&&($=$.ushln(B),X.iushln(B),le=$.words[$.length-1]|0);var de=X.length-$.length,G;if(U!=="mod"){G=new s(null),G.length=de+1,G.words=new Array(G.length);for(var Y=0;Y<G.length;Y++)G.words[Y]=0}var ee=X.clone()._ishlnsubmul($,1,de);ee.negative===0&&(X=ee,G&&(G.words[de]=1));for(var q=de-1;q>=0;q--){var se=(X.words[$.length+q]|0)*67108864+(X.words[$.length+q-1]|0);for(se=Math.min(se/le|0,67108863),X._ishlnsubmul($,se,q);X.negative!==0;)se--,X.negative=0,X._ishlnsubmul($,1,q),X.isZero()||(X.negative^=1);G&&(G.words[q]=se)}return G&&G.strip(),X.strip(),U!=="div"&&B!==0&&X.iushrn(B),{div:G||null,mod:X}},s.prototype.divmod=function(P,U,B){if(n(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var X,$,le;return this.negative!==0&&P.negative===0?(le=this.neg().divmod(P,U),U!=="mod"&&(X=le.div.neg()),U!=="div"&&($=le.mod.neg(),B&&$.negative!==0&&$.iadd(P)),{div:X,mod:$}):this.negative===0&&P.negative!==0?(le=this.divmod(P.neg(),U),U!=="mod"&&(X=le.div.neg()),{div:X,mod:le.mod}):this.negative&P.negative?(le=this.neg().divmod(P.neg(),U),U!=="div"&&($=le.mod.neg(),B&&$.negative!==0&&$.isub(P)),{div:le.div,mod:$}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?U==="div"?{div:this.divn(P.words[0]),mod:null}:U==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,U)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var U=this.divmod(P);if(U.mod.isZero())return U.div;var B=U.div.negative!==0?U.mod.isub(P):U.mod,X=P.ushrn(1),$=P.andln(1),le=B.cmp(X);return le<0||$===1&&le===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},s.prototype.modn=function(P){n(P<=67108863);for(var U=(1<<26)%P,B=0,X=this.length-1;X>=0;X--)B=(U*B+(this.words[X]|0))%P;return B},s.prototype.idivn=function(P){n(P<=67108863);for(var U=0,B=this.length-1;B>=0;B--){var X=(this.words[B]|0)+U*67108864;this.words[B]=X/P|0,U=X%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),le=new s(0),ce=new s(1),de=0;U.isEven()&&B.isEven();)U.iushrn(1),B.iushrn(1),++de;for(var G=B.clone(),Y=U.clone();!U.isZero();){for(var ee=0,q=1;!(U.words[0]&q)&&ee<26;++ee,q<<=1);if(ee>0)for(U.iushrn(ee);ee-- >0;)(X.isOdd()||$.isOdd())&&(X.iadd(G),$.isub(Y)),X.iushrn(1),$.iushrn(1);for(var se=0,ae=1;!(B.words[0]&ae)&&se<26;++se,ae<<=1);if(se>0)for(B.iushrn(se);se-- >0;)(le.isOdd()||ce.isOdd())&&(le.iadd(G),ce.isub(Y)),le.iushrn(1),ce.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub(le),$.isub(ce)):(B.isub(U),le.isub(X),ce.isub($))}return{a:le,b:ce,gcd:B.iushln(de)}},s.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),le=B.clone();U.cmpn(1)>0&&B.cmpn(1)>0;){for(var ce=0,de=1;!(U.words[0]&de)&&ce<26;++ce,de<<=1);if(ce>0)for(U.iushrn(ce);ce-- >0;)X.isOdd()&&X.iadd(le),X.iushrn(1);for(var G=0,Y=1;!(B.words[0]&Y)&&G<26;++G,Y<<=1);if(G>0)for(B.iushrn(G);G-- >0;)$.isOdd()&&$.iadd(le),$.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub($)):(B.isub(U),$.isub(X))}var ee;return U.cmpn(1)===0?ee=X:ee=$,ee.cmpn(0)<0&&ee.iadd(P),ee},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var U=this.clone(),B=P.clone();U.negative=0,B.negative=0;for(var X=0;U.isEven()&&B.isEven();X++)U.iushrn(1),B.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=U.cmp(B);if($<0){var le=U;U=B,B=le}else if($===0||B.cmpn(1)===0)break;U.isub(B)}while(!0);return B.iushln(X)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){n(typeof P=="number");var U=P%26,B=(P-U)/26,X=1<<U;if(this.length<=B)return this._expand(B+1),this.words[B]|=X,this;for(var $=X,le=B;$!==0&&le<this.length;le++){var ce=this.words[le]|0;ce+=$,$=ce>>>26,ce&=67108863,this.words[le]=ce}return $!==0&&(this.words[le]=$,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var U=P<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var B;if(this.length>1)B=1;else{U&&(P=-P),n(P<=67108863,"Number is too big");var X=this.words[0]|0;B=X===P?0:X<P?-1:1}return this.negative!==0?-B|0:B},s.prototype.cmp=function(P){if(this.negative!==0&&P.negative===0)return-1;if(this.negative===0&&P.negative!==0)return 1;var U=this.ucmp(P);return this.negative!==0?-U|0:U},s.prototype.ucmp=function(P){if(this.length>P.length)return 1;if(this.length<P.length)return-1;for(var U=0,B=this.length-1;B>=0;B--){var X=this.words[B]|0,$=P.words[B]|0;if(X!==$){X<$?U=-1:X>$&&(U=1);break}}return U},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new F(P)},s.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function y(O,P){this.name=O,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},y.prototype.ireduce=function(P){var U=P,B;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),B=U.bitLength();while(B>this.n);var X=B<this.n?-1:U.ucmp(this.p);return X===0?(U.words[0]=0,U.length=1):X>0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},y.prototype.split=function(P,U){P.iushrn(this.n,0,U)},y.prototype.imulK=function(P){return P.imul(this.k)};function m(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(m,y),m.prototype.split=function(P,U){for(var B=4194303,X=Math.min(P.length,9),$=0;$<X;$++)U.words[$]=P.words[$];if(U.length=X,P.length<=9){P.words[0]=0,P.length=1;return}var le=P.words[9];for(U.words[U.length++]=le&B,$=10;$<P.length;$++){var ce=P.words[$]|0;P.words[$-10]=(ce&B)<<4|le>>>22,le=ce}le>>>=22,P.words[$-10]=le,le===0&&P.length>10?P.length-=10:P.length-=9},m.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var U=0,B=0;B<P.length;B++){var X=P.words[B]|0;U+=X*977,P.words[B]=U&67108863,U=X*64+(U/67108864|0)}return P.words[P.length-1]===0&&(P.length--,P.words[P.length-1]===0&&P.length--),P};function R(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(R,y);function L(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(L,y);function z(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(z,y),z.prototype.imulK=function(P){for(var U=0,B=0;B<P.length;B++){var X=(P.words[B]|0)*19+U,$=X&67108863;X>>>=26,P.words[B]=$,U=X}return U!==0&&(P.words[P.length++]=U),P},s._prime=function(P){if(u[P])return u[P];var U;if(P==="k256")U=new m;else if(P==="p224")U=new R;else if(P==="p192")U=new L;else if(P==="p25519")U=new z;else throw new Error("Unknown prime "+P);return u[P]=U,U};function F(O){if(typeof O=="string"){var P=s._prime(O);this.m=P.p,this.prime=P}else n(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}F.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},F.prototype._verify2=function(P,U){n((P.negative|U.negative)===0,"red works only with positives"),n(P.red&&P.red===U.red,"red works only with red numbers")},F.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},F.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},F.prototype.add=function(P,U){this._verify2(P,U);var B=P.add(U);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(P,U){this._verify2(P,U);var B=P.iadd(U);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(P,U){this._verify2(P,U);var B=P.sub(U);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(P,U){this._verify2(P,U);var B=P.isub(U);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(P,U){return this._verify1(P),this.imod(P.ushln(U))},F.prototype.imul=function(P,U){return this._verify2(P,U),this.imod(P.imul(U))},F.prototype.mul=function(P,U){return this._verify2(P,U),this.imod(P.mul(U))},F.prototype.isqr=function(P){return this.imul(P,P.clone())},F.prototype.sqr=function(P){return this.mul(P,P)},F.prototype.sqrt=function(P){if(P.isZero())return P.clone();var U=this.m.andln(3);if(n(U%2===1),U===3){var B=this.m.add(new s(1)).iushrn(2);return this.pow(P,B)}for(var X=this.m.subn(1),$=0;!X.isZero()&&X.andln(1)===0;)$++,X.iushrn(1);n(!X.isZero());var le=new s(1).toRed(this),ce=le.redNeg(),de=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,de).cmp(ce)!==0;)G.redIAdd(ce);for(var Y=this.pow(G,X),ee=this.pow(P,X.addn(1).iushrn(1)),q=this.pow(P,X),se=$;q.cmp(le)!==0;){for(var ae=q,j=0;ae.cmp(le)!==0;j++)ae=ae.redSqr();n(j<se);var Q=this.pow(Y,new s(1).iushln(se-j-1));ee=ee.redMul(Q),Y=Q.redSqr(),q=q.redMul(Y),se=j}return ee},F.prototype.invm=function(P){var U=P._invmp(this.m);return U.negative!==0?(U.negative=0,this.imod(U).redNeg()):this.imod(U)},F.prototype.pow=function(P,U){if(U.isZero())return new s(1).toRed(this);if(U.cmpn(1)===0)return P.clone();var B=4,X=new Array(1<<B);X[0]=new s(1).toRed(this),X[1]=P;for(var $=2;$<X.length;$++)X[$]=this.mul(X[$-1],P);var le=X[0],ce=0,de=0,G=U.bitLength()%26;for(G===0&&(G=26),$=U.length-1;$>=0;$--){for(var Y=U.words[$],ee=G-1;ee>=0;ee--){var q=Y>>ee&1;if(le!==X[0]&&(le=this.sqr(le)),q===0&&ce===0){de=0;continue}ce<<=1,ce|=q,de++,!(de!==B&&($!==0||ee!==0))&&(le=this.mul(le,X[ce]),de=0,ce=0)}G=26}return le},F.prototype.convertTo=function(P){var U=P.umod(this.m);return U===P?U.clone():U},F.prototype.convertFrom=function(P){var U=P.clone();return U.red=null,U},s.mont=function(P){return new N(P)};function N(O){F.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}i(N,F),N.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},N.prototype.convertFrom=function(P){var U=this.imod(P.mul(this.rinv));return U.red=null,U},N.prototype.imul=function(P,U){if(P.isZero()||U.isZero())return P.words[0]=0,P.length=1,P;var B=P.imul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),le=$;return $.cmp(this.m)>=0?le=$.isub(this.m):$.cmpn(0)<0&&(le=$.iadd(this.m)),le._forceRed(this)},N.prototype.mul=function(P,U){if(P.isZero()||U.isZero())return new s(0)._forceRed(this);var B=P.mul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),le=$;return $.cmp(this.m)>=0?le=$.isub(this.m):$.cmpn(0)<0&&(le=$.iadd(this.m)),le._forceRed(this)},N.prototype.invm=function(P){var U=this.imod(P._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(e,this)},6204:function(e){"use strict";e.exports=t;function t(r){var o,a,n,i=r.length,s=0;for(o=0;o<i;++o)s+=r[o].length;var h=new Array(s),f=0;for(o=0;o<i;++o){var v=r[o],c=v.length;for(a=0;a<c;++a){var T=h[f++]=new Array(c-1),l=0;for(n=0;n<c;++n)n!==a&&(T[l++]=v[n]);if(a&1){var _=T[1];T[1]=T[0],T[0]=_}}}return h}},6867:function(e,t,r){"use strict";e.exports=l;var o=r(1888),a=r(855),n=r(7150);function i(_,w){for(var A=0;A<_;++A)if(!(w[A]<=w[A+_]))return!0;return!1}function s(_,w,A,M){for(var g=0,b=0,p=0,u=_.length;p<u;++p){var y=_[p];if(!i(w,y)){for(var m=0;m<2*w;++m)A[g++]=y[m];M[b++]=p}}return b}function h(_,w,A,M){var g=_.length,b=w.length;if(!(g<=0||b<=0)){var p=_[0].length>>>1;if(!(p<=0)){var u,y=o.mallocDouble(2*p*g),m=o.mallocInt32(g);if(g=s(_,p,y,m),g>0){if(p===1&&M)a.init(g),u=a.sweepComplete(p,A,0,g,y,m,0,g,y,m);else{var R=o.mallocDouble(2*p*b),L=o.mallocInt32(b);b=s(w,p,R,L),b>0&&(a.init(g+b),p===1?u=a.sweepBipartite(p,A,0,g,y,m,0,b,R,L):u=n(p,A,M,g,y,m,b,R,L),o.free(R),o.free(L))}o.free(y),o.free(m)}return u}}}var f;function v(_,w){f.push([_,w])}function c(_){return f=[],h(_,_,v,!0),f}function T(_,w){return f=[],h(_,w,v,!1),f}function l(_,w,A){switch(arguments.length){case 1:return c(_);case 2:return typeof w=="function"?h(_,_,w,!0):T(_,w);case 3:return h(_,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(e,t){"use strict";function r(){function n(h,f,v,c,T,l,_,w,A,M,g){for(var b=2*h,p=c,u=b*c;p<T;++p,u+=b){var y=l[f+u],m=l[f+u+h],R=_[p];e:for(var L=w,z=b*w;L<A;++L,z+=b){var F=M[f+z],N=M[f+z+h],O=g[L];if(!(N<y||m<F)){for(var P=f+1;P<h;++P){var U=l[P+u],B=l[P+h+u],X=M[P+z],$=M[P+h+z];if(B<X||$<U)continue e}var le=v(R,O);if(le!==void 0)return le}}}}function i(h,f,v,c,T,l,_,w,A,M,g){for(var b=2*h,p=w,u=b*w;p<A;++p,u+=b){var y=M[f+u],m=M[f+u+h],R=g[p];e:for(var L=c,z=b*c;L<T;++L,z+=b){var F=l[f+z],N=l[f+z+h],O=_[L];if(!(m<F||N<y)){for(var P=f+1;P<h;++P){var U=l[P+z],B=l[P+h+z],X=M[P+u],$=M[P+h+u];if(B<X||$<U)continue e}var le=v(O,R);if(le!==void 0)return le}}}}function s(h,f,v,c,T,l,_,w,A,M,g){return T-c>A-w?n(h,f,v,c,T,l,_,w,A,M,g):i(h,f,v,c,T,l,_,w,A,M,g)}return s}function o(){function n(v,c,T,l,_,w,A,M,g,b,p){for(var u=2*v,y=l,m=u*l;y<_;++y,m+=u){var R=w[c+m],L=w[c+m+v],z=A[y];e:for(var F=M,N=u*M;F<g;++F,N+=u){var O=b[c+N],P=p[F];if(!(O<=R||L<O)){for(var U=c+1;U<v;++U){var B=w[U+m],X=w[U+v+m],$=b[U+N],le=b[U+v+N];if(X<$||le<B)continue e}var ce=T(P,z);if(ce!==void 0)return ce}}}}function i(v,c,T,l,_,w,A,M,g,b,p){for(var u=2*v,y=l,m=u*l;y<_;++y,m+=u){var R=w[c+m],L=w[c+m+v],z=A[y];e:for(var F=M,N=u*M;F<g;++F,N+=u){var O=b[c+N],P=p[F];if(!(O<R||L<O)){for(var U=c+1;U<v;++U){var B=w[U+m],X=w[U+v+m],$=b[U+N],le=b[U+v+N];if(X<$||le<B)continue e}var ce=T(z,P);if(ce!==void 0)return ce}}}}function s(v,c,T,l,_,w,A,M,g,b,p){for(var u=2*v,y=M,m=u*M;y<g;++y,m+=u){var R=b[c+m],L=p[y];e:for(var z=l,F=u*l;z<_;++z,F+=u){var N=w[c+F],O=w[c+F+v],P=A[z];if(!(R<=N||O<R)){for(var U=c+1;U<v;++U){var B=w[U+F],X=w[U+v+F],$=b[U+m],le=b[U+v+m];if(X<$||le<B)continue e}var ce=T(L,P);if(ce!==void 0)return ce}}}}function h(v,c,T,l,_,w,A,M,g,b,p){for(var u=2*v,y=M,m=u*M;y<g;++y,m+=u){var R=b[c+m],L=p[y];e:for(var z=l,F=u*l;z<_;++z,F+=u){var N=w[c+F],O=w[c+F+v],P=A[z];if(!(R<N||O<R)){for(var U=c+1;U<v;++U){var B=w[U+F],X=w[U+v+F],$=b[U+m],le=b[U+v+m];if(X<$||le<B)continue e}var ce=T(P,L);if(ce!==void 0)return ce}}}}function f(v,c,T,l,_,w,A,M,g,b,p,u){return w-_>b-g?l?n(v,c,T,_,w,A,M,g,b,p,u):i(v,c,T,_,w,A,M,g,b,p,u):l?s(v,c,T,_,w,A,M,g,b,p,u):h(v,c,T,_,w,A,M,g,b,p,u)}return f}function a(n){return n?r():o()}t.partial=a(!1),t.full=a(!0)},7150:function(e,t,r){"use strict";e.exports=O;var o=r(1888),a=r(8828),n=r(2455),i=n.partial,s=n.full,h=r(855),f=r(3545),v=r(8105),c=128,T=1<<22,l=1<<22,_=v("!(lo>=p0)&&!(p1>=hi)"),w=v("lo===p0"),A=v("lo<p0"),M=v("hi<=p0"),g=v("lo<=p0&&p0<=hi"),b=v("lo<p0&&p0<=hi"),p=6,u=2,y=1024,m=o.mallocInt32(y),R=o.mallocDouble(y);function L(P,U){var B=8*a.log2(U+1)*(P+1)|0,X=a.nextPow2(p*B);m.length<X&&(o.free(m),m=o.mallocInt32(X));var $=a.nextPow2(u*B);R.length<$&&(o.free(R),R=o.mallocDouble($))}function z(P,U,B,X,$,le,ce,de,G){var Y=p*P;m[Y]=U,m[Y+1]=B,m[Y+2]=X,m[Y+3]=$,m[Y+4]=le,m[Y+5]=ce;var ee=u*P;R[ee]=de,R[ee+1]=G}function F(P,U,B,X,$,le,ce,de,G,Y,ee){var q=2*P,se=G*q,ae=Y[se+U];e:for(var j=$,Q=$*q;j<le;++j,Q+=q){var re=ce[Q+U],pe=ce[Q+U+P];if(!(ae<re||pe<ae)&&!(X&&ae===re)){for(var we=de[j],Se=U+1;Se<P;++Se){var re=ce[Q+Se],pe=ce[Q+Se+P],Ie=Y[se+Se],Re=Y[se+Se+P];if(pe<Ie||Re<re)continue e}var We;if(X?We=B(ee,we):We=B(we,ee),We!==void 0)return We}}}function N(P,U,B,X,$,le,ce,de,G,Y){var ee=2*P,q=de*ee,se=G[q+U];e:for(var ae=X,j=X*ee;ae<$;++ae,j+=ee){var Q=ce[ae];if(Q!==Y){var re=le[j+U],pe=le[j+U+P];if(!(se<re||pe<se)){for(var we=U+1;we<P;++we){var re=le[j+we],pe=le[j+we+P],Se=G[q+we],Ie=G[q+we+P];if(pe<Se||Ie<re)continue e}var Re=B(Q,Y);if(Re!==void 0)return Re}}}}function O(P,U,B,X,$,le,ce,de,G){L(P,X+ce);var Y=0,ee=2*P,q;for(z(Y++,0,0,X,0,ce,B?16:0,-1/0,1/0),B||z(Y++,0,0,ce,0,X,1,-1/0,1/0);Y>0;){Y-=1;var se=Y*p,ae=m[se],j=m[se+1],Q=m[se+2],re=m[se+3],pe=m[se+4],we=m[se+5],Se=Y*u,Ie=R[Se],Re=R[Se+1],We=we&1,at=!!(we&16),nt=$,tt=le,qe=de,he=G;if(We&&(nt=de,tt=G,qe=$,he=le),!(we&2&&(Q=A(P,ae,j,Q,nt,tt,Re),j>=Q))&&!(we&4&&(j=M(P,ae,j,Q,nt,tt,Ie),j>=Q))){var ue=Q-j,ne=pe-re;if(at){if(P*ue*(ue+ne)<l){if(q=h.scanComplete(P,ae,U,j,Q,nt,tt,re,pe,qe,he),q!==void 0)return q;continue}}else if(P*Math.min(ue,ne)<c){if(q=i(P,ae,U,We,j,Q,nt,tt,re,pe,qe,he),q!==void 0)return q;continue}else if(P*ue*ne<T){if(q=h.scanBipartite(P,ae,U,We,j,Q,nt,tt,re,pe,qe,he),q!==void 0)return q;continue}var Ce=_(P,ae,j,Q,nt,tt,Ie,Re);if(j<Ce)if(P*(Ce-j)<c){if(q=s(P,ae+1,U,j,Ce,nt,tt,re,pe,qe,he),q!==void 0)return q}else if(ae===P-2){if(We?q=h.sweepBipartite(P,U,re,pe,qe,he,j,Ce,nt,tt):q=h.sweepBipartite(P,U,j,Ce,nt,tt,re,pe,qe,he),q!==void 0)return q}else z(Y++,ae+1,j,Ce,re,pe,We,-1/0,1/0),z(Y++,ae+1,re,pe,j,Ce,We^1,-1/0,1/0);if(Ce<Q){var Ye=f(P,ae,re,pe,qe,he),rt=qe[ee*Ye+ae],Ke=w(P,ae,Ye,pe,qe,he,rt);if(Ke<pe&&z(Y++,ae,Ce,Q,Ke,pe,(We|4)+(at?16:0),rt,Re),re<Ye&&z(Y++,ae,Ce,Q,re,Ye,(We|2)+(at?16:0),Ie,rt),Ye+1===Ke){if(at?q=N(P,ae,U,Ce,Q,nt,tt,Ye,qe,he[Ye]):q=F(P,ae,U,We,Ce,Q,nt,tt,Ye,qe,he[Ye]),q!==void 0)return q}else if(Ye<Ke){var Mt;if(at){if(Mt=g(P,ae,Ce,Q,nt,tt,rt),Ce<Mt){var kt=w(P,ae,Ce,Mt,nt,tt,rt);if(ae===P-2){if(Ce<kt&&(q=h.sweepComplete(P,U,Ce,kt,nt,tt,Ye,Ke,qe,he),q!==void 0)||kt<Mt&&(q=h.sweepBipartite(P,U,kt,Mt,nt,tt,Ye,Ke,qe,he),q!==void 0))return q}else Ce<kt&&z(Y++,ae+1,Ce,kt,Ye,Ke,16,-1/0,1/0),kt<Mt&&(z(Y++,ae+1,kt,Mt,Ye,Ke,0,-1/0,1/0),z(Y++,ae+1,Ye,Ke,kt,Mt,1,-1/0,1/0))}}else We?Mt=b(P,ae,Ce,Q,nt,tt,rt):Mt=g(P,ae,Ce,Q,nt,tt,rt),Ce<Mt&&(ae===P-2?We?q=h.sweepBipartite(P,U,Ye,Ke,qe,he,Ce,Mt,nt,tt):q=h.sweepBipartite(P,U,Ce,Mt,nt,tt,Ye,Ke,qe,he):(z(Y++,ae+1,Ce,Mt,Ye,Ke,We,-1/0,1/0),z(Y++,ae+1,Ye,Ke,Ce,Mt,We^1,-1/0,1/0)))}}}}}},3545:function(e,t,r){"use strict";e.exports=s;var o=r(8105),a=o("lo<p0"),n=8;function i(h,f,v,c,T,l){for(var _=2*h,w=_*(v+1)+f,A=v+1;A<c;++A,w+=_)for(var M=T[w],g=A,b=_*(A-1);g>v&&T[b+f]>M;--g,b-=_){for(var p=b,u=b+_,y=0;y<_;++y,++p,++u){var m=T[p];T[p]=T[u],T[u]=m}var R=l[g];l[g]=l[g-1],l[g-1]=R}}function s(h,f,v,c,T,l){if(c<=v+1)return v;for(var _=v,w=c,A=c+v>>>1,M=2*h,g=A,b=T[M*A+f];_<w;){if(w-_<n){i(h,f,_,w,T,l),b=T[M*A+f];break}var p=w-_,u=Math.random()*p+_|0,y=T[M*u+f],m=Math.random()*p+_|0,R=T[M*m+f],L=Math.random()*p+_|0,z=T[M*L+f];y<=R?z>=R?(g=m,b=R):y>=z?(g=u,b=y):(g=L,b=z):R>=z?(g=m,b=R):z>=y?(g=u,b=y):(g=L,b=z);for(var O=M*(w-1),P=M*g,F=0;F<M;++F,++O,++P){var N=T[O];T[O]=T[P],T[P]=N}var U=l[w-1];l[w-1]=l[g],l[g]=U,g=a(h,f,_,w-1,T,l,b);for(var O=M*(w-1),P=M*g,F=0;F<M;++F,++O,++P){var N=T[O];T[O]=T[P],T[P]=N}var U=l[w-1];if(l[w-1]=l[g],l[g]=U,A<g){for(w=g-1;_<w&&T[M*(w-1)+f]===b;)w-=1;w+=1}else if(g<A)for(_=g+1;_<w&&T[M*_+f]===b;)_+=1;else break}return a(h,f,v,A,T,l,T[M*A+f])}},8105:function(e){"use strict";e.exports=r;var t={"lo===p0":o,"lo<p0":a,"lo<=p0":n,"hi<=p0":i,"lo<p0&&p0<=hi":h,"lo<=p0&&p0<=hi":s,"!(lo>=p0)&&!(p1>=hi)":f};function r(v){return t[v]}function o(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u];if(R===A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function a(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u];if(R<A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function n(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+y];if(R<=A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function i(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+y];if(R<=A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function s(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u],L=_[g+y];if(R<=A&&A<=L)if(p===m)p+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[m];w[m]=w[p],w[p++]=N}}return p}function h(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u],L=_[g+y];if(R<A&&A<=L)if(p===m)p+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[m];w[m]=w[p],w[p++]=N}}return p}function f(v,c,T,l,_,w,A,M){for(var g=2*v,b=g*T,p=b,u=T,y=c,m=v+c,R=T;l>R;++R,b+=g){var L=_[b+y],z=_[b+m];if(!(L>=A)&&!(M>=z))if(u===R)u+=1,p+=g;else{for(var F=0;g>F;++F){var N=_[b+F];_[b+F]=_[p],_[p++]=N}var O=w[R];w[R]=w[u],w[u++]=O}}return u}},4192:function(e){"use strict";e.exports=r;var t=32;function r(c,T){T<=4*t?o(0,T-1,c):v(0,T-1,c)}function o(c,T,l){for(var _=2*(c+1),w=c+1;w<=T;++w){for(var A=l[_++],M=l[_++],g=w,b=_-2;g-- >c;){var p=l[b-2],u=l[b-1];if(p<A)break;if(p===A&&u<M)break;l[b]=p,l[b+1]=u,b-=2}l[b]=A,l[b+1]=M}}function a(c,T,l){c*=2,T*=2;var _=l[c],w=l[c+1];l[c]=l[T],l[c+1]=l[T+1],l[T]=_,l[T+1]=w}function n(c,T,l){c*=2,T*=2,l[c]=l[T],l[c+1]=l[T+1]}function i(c,T,l,_){c*=2,T*=2,l*=2;var w=_[c],A=_[c+1];_[c]=_[T],_[c+1]=_[T+1],_[T]=_[l],_[T+1]=_[l+1],_[l]=w,_[l+1]=A}function s(c,T,l,_,w){c*=2,T*=2,w[c]=w[T],w[T]=l,w[c+1]=w[T+1],w[T+1]=_}function h(c,T,l){c*=2,T*=2;var _=l[c],w=l[T];return _<w?!1:_===w?l[c+1]>l[T+1]:!0}function f(c,T,l,_){c*=2;var w=_[c];return w<T?!0:w===T?_[c+1]<l:!1}function v(c,T,l){var _=(T-c+1)/6|0,w=c+_,A=T-_,M=c+T>>1,g=M-_,b=M+_,p=w,u=g,y=M,m=b,R=A,L=c+1,z=T-1,F=0;h(p,u,l)&&(F=p,p=u,u=F),h(m,R,l)&&(F=m,m=R,R=F),h(p,y,l)&&(F=p,p=y,y=F),h(u,y,l)&&(F=u,u=y,y=F),h(p,m,l)&&(F=p,p=m,m=F),h(y,m,l)&&(F=y,y=m,m=F),h(u,R,l)&&(F=u,u=R,R=F),h(u,y,l)&&(F=u,u=y,y=F),h(m,R,l)&&(F=m,m=R,R=F);for(var N=l[2*u],O=l[2*u+1],P=l[2*m],U=l[2*m+1],B=2*p,X=2*y,$=2*R,le=2*w,ce=2*M,de=2*A,G=0;G<2;++G){var Y=l[B+G],ee=l[X+G],q=l[$+G];l[le+G]=Y,l[ce+G]=ee,l[de+G]=q}n(g,c,l),n(b,T,l);for(var se=L;se<=z;++se)if(f(se,N,O,l))se!==L&&a(se,L,l),++L;else if(!f(se,P,U,l))for(;;)if(f(z,P,U,l)){f(z,N,O,l)?(i(se,L,z,l),++L,--z):(a(se,z,l),--z);break}else{if(--z<se)break;continue}s(c,L-1,N,O,l),s(T,z+1,P,U,l),L-2-c<=t?o(c,L-2,l):v(c,L-2,l),T-(z+2)<=t?o(z+2,T,l):v(z+2,T,l),z-L<=t?o(L,z,l):v(L,z,l)}},855:function(e,t,r){"use strict";e.exports={init:w,sweepBipartite:g,sweepComplete:b,scanBipartite:p,scanComplete:u};var o=r(1888),a=r(8828),n=r(4192),i=1<<28,s=1024,h=o.mallocInt32(s),f=o.mallocInt32(s),v=o.mallocInt32(s),c=o.mallocInt32(s),T=o.mallocInt32(s),l=o.mallocInt32(s),_=o.mallocDouble(s*8);function w(y){var m=a.nextPow2(y);h.length<m&&(o.free(h),h=o.mallocInt32(m)),f.length<m&&(o.free(f),f=o.mallocInt32(m)),v.length<m&&(o.free(v),v=o.mallocInt32(m)),c.length<m&&(o.free(c),c=o.mallocInt32(m)),T.length<m&&(o.free(T),T=o.mallocInt32(m)),l.length<m&&(o.free(l),l=o.mallocInt32(m));var R=8*m;_.length<R&&(o.free(_),_=o.mallocDouble(R))}function A(y,m,R,L){var z=m[L],F=y[R-1];y[z]=F,m[F]=z}function M(y,m,R,L){y[R]=L,m[L]=R}function g(y,m,R,L,z,F,N,O,P,U){for(var B=0,X=2*y,$=y-1,le=X-1,ce=R;ce<L;++ce){var de=F[ce],G=X*ce;_[B++]=z[G+$],_[B++]=-(de+1),_[B++]=z[G+le],_[B++]=de}for(var ce=N;ce<O;++ce){var de=U[ce]+i,Y=X*ce;_[B++]=P[Y+$],_[B++]=-de,_[B++]=P[Y+le],_[B++]=de}var ee=B>>>1;n(_,ee);for(var q=0,se=0,ce=0;ce<ee;++ce){var ae=_[2*ce+1]|0;if(ae>=i)ae=ae-i|0,A(v,c,se--,ae);else if(ae>=0)A(h,f,q--,ae);else if(ae<=-i){ae=-ae-i|0;for(var j=0;j<q;++j){var Q=m(h[j],ae);if(Q!==void 0)return Q}M(v,c,se++,ae)}else{ae=-ae-1|0;for(var j=0;j<se;++j){var Q=m(ae,v[j]);if(Q!==void 0)return Q}M(h,f,q++,ae)}}}function b(y,m,R,L,z,F,N,O,P,U){for(var B=0,X=2*y,$=y-1,le=X-1,ce=R;ce<L;++ce){var de=F[ce]+1<<1,G=X*ce;_[B++]=z[G+$],_[B++]=-de,_[B++]=z[G+le],_[B++]=de}for(var ce=N;ce<O;++ce){var de=U[ce]+1<<1,Y=X*ce;_[B++]=P[Y+$],_[B++]=-de|1,_[B++]=P[Y+le],_[B++]=de|1}var ee=B>>>1;n(_,ee);for(var q=0,se=0,ae=0,ce=0;ce<ee;++ce){var j=_[2*ce+1]|0,Q=j&1;if(ce<ee-1&&j>>1===_[2*ce+3]>>1&&(Q=2,ce+=1),j<0){for(var re=-(j>>1)-1,pe=0;pe<ae;++pe){var we=m(T[pe],re);if(we!==void 0)return we}if(Q!==0)for(var pe=0;pe<q;++pe){var we=m(h[pe],re);if(we!==void 0)return we}if(Q!==1)for(var pe=0;pe<se;++pe){var we=m(v[pe],re);if(we!==void 0)return we}Q===0?M(h,f,q++,re):Q===1?M(v,c,se++,re):Q===2&&M(T,l,ae++,re)}else{var re=(j>>1)-1;Q===0?A(h,f,q--,re):Q===1?A(v,c,se--,re):Q===2&&A(T,l,ae--,re)}}}function p(y,m,R,L,z,F,N,O,P,U,B,X){var $=0,le=2*y,ce=m,de=m+y,G=1,Y=1;L?Y=i:G=i;for(var ee=z;ee<F;++ee){var q=ee+G,se=le*ee;_[$++]=N[se+ce],_[$++]=-q,_[$++]=N[se+de],_[$++]=q}for(var ee=P;ee<U;++ee){var q=ee+Y,ae=le*ee;_[$++]=B[ae+ce],_[$++]=-q}var j=$>>>1;n(_,j);for(var Q=0,ee=0;ee<j;++ee){var re=_[2*ee+1]|0;if(re<0){var q=-re,pe=!1;if(q>=i?(pe=!L,q-=i):(pe=!!L,q-=1),pe)M(h,f,Q++,q);else{var we=X[q],Se=le*q,Ie=B[Se+m+1],Re=B[Se+m+1+y];e:for(var We=0;We<Q;++We){var at=h[We],nt=le*at;if(!(Re<N[nt+m+1]||N[nt+m+1+y]<Ie)){for(var tt=m+2;tt<y;++tt)if(B[Se+tt+y]<N[nt+tt]||N[nt+tt+y]<B[Se+tt])continue e;var qe=O[at],he;if(L?he=R(we,qe):he=R(qe,we),he!==void 0)return he}}}}else A(h,f,Q--,re-G)}}function u(y,m,R,L,z,F,N,O,P,U,B){for(var X=0,$=2*y,le=m,ce=m+y,de=L;de<z;++de){var G=de+i,Y=$*de;_[X++]=F[Y+le],_[X++]=-G,_[X++]=F[Y+ce],_[X++]=G}for(var de=O;de<P;++de){var G=de+1,ee=$*de;_[X++]=U[ee+le],_[X++]=-G}var q=X>>>1;n(_,q);for(var se=0,de=0;de<q;++de){var ae=_[2*de+1]|0;if(ae<0){var G=-ae;if(G>=i)h[se++]=G-i;else{G-=1;var j=B[G],Q=$*G,re=U[Q+m+1],pe=U[Q+m+1+y];e:for(var we=0;we<se;++we){var Se=h[we],Ie=N[Se];if(Ie===j)break;var Re=$*Se;if(!(pe<F[Re+m+1]||F[Re+m+1+y]<re)){for(var We=m+2;We<y;++We)if(U[Q+We+y]<F[Re+We]||F[Re+We+y]<U[Q+We])continue e;var at=R(Ie,j);if(at!==void 0)return at}}}}else{for(var G=ae-i,we=se-1;we>=0;--we)if(h[we]===G){for(var We=we+1;We<se;++We)h[We-1]=h[We];break}--se}}}},2538:function(e,t,r){"use strict";var o=r(8902),a=r(5542),n=r(2272),i=r(5023);e.exports=c;function s(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function h(T,l){return T[0]-l[0]||T[1]-l[1]}function f(T){return T.map(s).sort(h)}function v(T,l,_){return l in T?T[l]:_}function c(T,l,_){Array.isArray(l)?(_=_||{},l=l||[]):(_=l||{},l=[]);var w=!!v(_,"delaunay",!0),A=!!v(_,"interior",!0),M=!!v(_,"exterior",!0),g=!!v(_,"infinity",!1);if(!A&&!M||T.length===0)return[];var b=o(T,l);if(w||A!==M||g){for(var p=a(T.length,f(l)),u=0;u<b.length;++u){var y=b[u];p.addTriangle(y[0],y[1],y[2])}return w&&n(T,p),M?A?g?i(p,0,g):p.cells():i(p,1,g):i(p,-1)}else return b}},2272:function(e,t,r){"use strict";var o=r(2646)[4],a=r(2478);e.exports=i;function n(s,h,f,v,c,T){var l=h.opposite(v,c);if(!(l<0)){if(c<v){var _=v;v=c,c=_,_=T,T=l,l=_}h.isConstraint(v,c)||o(s[v],s[c],s[T],s[l])<0&&f.push(v,c)}}function i(s,h){for(var f=[],v=s.length,c=h.stars,T=0;T<v;++T)for(var l=c[T],_=1;_<l.length;_+=2){var w=l[_];if(!(w<T)&&!h.isConstraint(T,w)){for(var A=l[_-1],M=-1,g=1;g<l.length;g+=2)if(l[g-1]===w){M=l[g];break}M<0||o(s[T],s[w],s[A],s[M])<0&&f.push(T,w)}}for(;f.length>0;){for(var w=f.pop(),T=f.pop(),A=-1,M=-1,l=c[T],b=1;b<l.length;b+=2){var p=l[b-1],u=l[b];p===w?M=u:u===w&&(A=p)}A<0||M<0||o(s[T],s[w],s[A],s[M])>=0||(h.flip(T,w),n(s,h,f,A,T,M),n(s,h,f,T,M,A),n(s,h,f,M,w,A),n(s,h,f,w,A,M))}}},5023:function(e,t,r){"use strict";var o=r(2478);e.exports=f;function a(v,c,T,l,_,w,A){this.cells=v,this.neighbor=c,this.flags=l,this.constraint=T,this.active=_,this.next=w,this.boundary=A}var n=a.prototype;function i(v,c){return v[0]-c[0]||v[1]-c[1]||v[2]-c[2]}n.locate=function(){var v=[0,0,0];return function(c,T,l){var _=c,w=T,A=l;return T<l?T<c&&(_=T,w=l,A=c):l<c&&(_=l,w=c,A=T),_<0?-1:(v[0]=_,v[1]=w,v[2]=A,o.eq(this.cells,v,i))}}();function s(v,c){for(var T=v.cells(),l=T.length,_=0;_<l;++_){var w=T[_],A=w[0],M=w[1],g=w[2];M<g?M<A&&(w[0]=M,w[1]=g,w[2]=A):g<A&&(w[0]=g,w[1]=A,w[2]=M)}T.sort(i);for(var b=new Array(l),_=0;_<b.length;++_)b[_]=0;var p=[],u=[],y=new Array(3*l),m=new Array(3*l),R=null;c&&(R=[]);for(var L=new a(T,y,m,b,p,u,R),_=0;_<l;++_)for(var w=T[_],z=0;z<3;++z){var A=w[z],M=w[(z+1)%3],F=y[3*_+z]=L.locate(M,A,v.opposite(M,A)),N=m[3*_+z]=v.isConstraint(A,M);F<0&&(N?u.push(_):(p.push(_),b[_]=1),c&&R.push([M,A,-1]))}return L}function h(v,c,T){for(var l=0,_=0;_<v.length;++_)c[_]===T&&(v[l++]=v[_]);return v.length=l,v}function f(v,c,T){var l=s(v,T);if(c===0)return T?l.cells.concat(l.boundary):l.cells;for(var _=1,w=l.active,A=l.next,M=l.flags,g=l.cells,b=l.constraint,p=l.neighbor;w.length>0||A.length>0;){for(;w.length>0;){var u=w.pop();if(M[u]!==-_){M[u]=_;for(var y=g[u],m=0;m<3;++m){var R=p[3*u+m];R>=0&&M[R]===0&&(b[3*u+m]?A.push(R):(w.push(R),M[R]=_))}}}var L=A;A=w,w=L,A.length=0,_=-_}var z=h(g,M,c);return T?z.concat(l.boundary):z}},8902:function(e,t,r){"use strict";var o=r(2478),a=r(3250)[3],n=0,i=1,s=2;e.exports=A;function h(M,g,b,p,u){this.a=M,this.b=g,this.idx=b,this.lowerIds=p,this.upperIds=u}function f(M,g,b,p){this.a=M,this.b=g,this.type=b,this.idx=p}function v(M,g){var b=M.a[0]-g.a[0]||M.a[1]-g.a[1]||M.type-g.type;return b||M.type!==n&&(b=a(M.a,M.b,g.b),b)?b:M.idx-g.idx}function c(M,g){return a(M.a,M.b,g)}function T(M,g,b,p,u){for(var y=o.lt(g,p,c),m=o.gt(g,p,c),R=y;R<m;++R){for(var L=g[R],z=L.lowerIds,N=z.length;N>1&&a(b[z[N-2]],b[z[N-1]],p)>0;)M.push([z[N-1],z[N-2],u]),N-=1;z.length=N,z.push(u);for(var F=L.upperIds,N=F.length;N>1&&a(b[F[N-2]],b[F[N-1]],p)<0;)M.push([F[N-2],F[N-1],u]),N-=1;F.length=N,F.push(u)}}function l(M,g){var b;return M.a[0]<g.a[0]?b=a(M.a,M.b,g.a):b=a(g.b,g.a,M.a),b||(g.b[0]<M.b[0]?b=a(M.a,M.b,g.b):b=a(g.b,g.a,M.b),b||M.idx-g.idx)}function _(M,g,b){var p=o.le(M,b,l),u=M[p],y=u.upperIds,m=y[y.length-1];u.upperIds=[m],M.splice(p+1,0,new h(b.a,b.b,b.idx,[m],y))}function w(M,g,b){var p=b.a;b.a=b.b,b.b=p;var u=o.eq(M,b,l),y=M[u],m=M[u-1];m.upperIds=y.upperIds,M.splice(u,1)}function A(M,g){for(var b=M.length,p=g.length,u=[],y=0;y<b;++y)u.push(new f(M[y],null,n,y));for(var y=0;y<p;++y){var m=g[y],R=M[m[0]],L=M[m[1]];R[0]<L[0]?u.push(new f(R,L,s,y),new f(L,R,i,y)):R[0]>L[0]&&u.push(new f(L,R,s,y),new f(R,L,i,y))}u.sort(v);for(var z=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),F=[new h([z,1],[z,0],-1,[],[],[],[])],N=[],y=0,O=u.length;y<O;++y){var P=u[y],U=P.type;U===n?T(N,F,M,P.a,P.idx):U===s?_(F,M,P):w(F,M,P)}return N}},5542:function(e,t,r){"use strict";var o=r(2478);e.exports=s;function a(h,f){this.stars=h,this.edges=f}var n=a.prototype;function i(h,f,v){for(var c=1,T=h.length;c<T;c+=2)if(h[c-1]===f&&h[c]===v){h[c-1]=h[T-2],h[c]=h[T-1],h.length=T-2;return}}n.isConstraint=function(){var h=[0,0];function f(v,c){return v[0]-c[0]||v[1]-c[1]}return function(v,c){return h[0]=Math.min(v,c),h[1]=Math.max(v,c),o.eq(this.edges,h,f)>=0}}(),n.removeTriangle=function(h,f,v){var c=this.stars;i(c[h],f,v),i(c[f],v,h),i(c[v],h,f)},n.addTriangle=function(h,f,v){var c=this.stars;c[h].push(f,v),c[f].push(v,h),c[v].push(h,f)},n.opposite=function(h,f){for(var v=this.stars[f],c=1,T=v.length;c<T;c+=2)if(v[c]===h)return v[c-1];return-1},n.flip=function(h,f){var v=this.opposite(h,f),c=this.opposite(f,h);this.removeTriangle(h,f,v),this.removeTriangle(f,h,c),this.addTriangle(h,c,v),this.addTriangle(f,v,c)},n.edges=function(){for(var h=this.stars,f=[],v=0,c=h.length;v<c;++v)for(var T=h[v],l=0,_=T.length;l<_;l+=2)f.push([T[l],T[l+1]]);return f},n.cells=function(){for(var h=this.stars,f=[],v=0,c=h.length;v<c;++v)for(var T=h[v],l=0,_=T.length;l<_;l+=2){var w=T[l],A=T[l+1];v<Math.min(w,A)&&f.push([v,w,A])}return f};function s(h,f){for(var v=new Array(h),c=0;c<h;++c)v[c]=[];return new a(v,f)}},2419:function(e){"use strict";e.exports=t;function t(r){for(var o=1,a=1;a<r.length;++a)for(var n=0;n<a;++n)if(r[a]<r[n])o=-o;else if(r[n]===r[a])return 0;return o}},3628:function(e,t,r){"use strict";var o=r(1338),a=r(727);function n(h,f){for(var v=0,c=h.length,T=0;T<c;++T)v+=h[T]*f[T];return v}function i(h){var f=h.length;if(f===0)return[];var v=h[0].length,c=o([h.length+1,h.length+1],1),T=o([h.length+1],1);c[f][f]=0;for(var l=0;l<f;++l){for(var _=0;_<=l;++_)c[_][l]=c[l][_]=2*n(h[l],h[_]);T[l]=n(h[l],h[l])}for(var w=a(c,T),A=0,M=w[f+1],l=0;l<M.length;++l)A+=M[l];for(var g=new Array(f),l=0;l<f;++l){for(var M=w[l],b=0,_=0;_<M.length;++_)b+=M[_];g[l]=b/A}return g}function s(h){if(h.length===0)return[];for(var f=h[0].length,v=o([f]),c=i(h),T=0;T<h.length;++T)for(var l=0;l<f;++l)v[l]+=h[T][l]*c[T];return v}s.barycenetric=i,e.exports=s},6037:function(e,t,r){e.exports=a;var o=r(3628);function a(n){for(var i=o(n),s=0,h=0;h<n.length;++h)for(var f=n[h],v=0;v<i.length;++v)s+=Math.pow(f[v]-i[v],2);return Math.sqrt(s/n.length)}},332:function(e,t,r){"use strict";e.exports=R;var o=r(1755),a=r(6867),n=r(1125),i=r(7842),s=r(1318),h=r(946),f=r(5838),v=r(1278),c=r(3637);function T(L){var z=h(L);return[v(z,-1/0),v(z,1/0)]}function l(L,z){for(var F=new Array(z.length),N=0;N<z.length;++N){var O=z[N],P=L[O[0]],U=L[O[1]];F[N]=[v(Math.min(P[0],U[0]),-1/0),v(Math.min(P[1],U[1]),-1/0),v(Math.max(P[0],U[0]),1/0),v(Math.max(P[1],U[1]),1/0)]}return F}function _(L){for(var z=new Array(L.length),F=0;F<L.length;++F){var N=L[F];z[F]=[v(N[0],-1/0),v(N[1],-1/0),v(N[0],1/0),v(N[1],1/0)]}return z}function w(L,z,F){var N=[];return a(F,function(O,P){var U=z[O],B=z[P];if(!(U[0]===B[0]||U[0]===B[1]||U[1]===B[0]||U[1]===B[1])){var X=L[U[0]],$=L[U[1]],le=L[B[0]],ce=L[B[1]];n(X,$,le,ce)&&N.push([O,P])}}),N}function A(L,z,F,N){var O=[];return a(F,N,function(P,U){var B=z[P];if(!(B[0]===U||B[1]===U)){var X=L[U],$=L[B[0]],le=L[B[1]];n($,le,X,X)&&O.push([P,U])}}),O}function M(L,z,F,N,O){var P,U,B=L.map(function(Se){return[i(Se[0]),i(Se[1])]});for(P=0;P<F.length;++P){var X=F[P];U=X[0];var $=X[1],le=z[U],ce=z[$],de=c(f(L[le[0]]),f(L[le[1]]),f(L[ce[0]]),f(L[ce[1]]));if(de){var G=L.length;L.push([h(de[0]),h(de[1])]),B.push(de),N.push([U,G],[$,G])}}for(N.sort(function(Se,Ie){if(Se[0]!==Ie[0])return Se[0]-Ie[0];var Re=B[Se[1]],We=B[Ie[1]];return s(Re[0],We[0])||s(Re[1],We[1])}),P=N.length-1;P>=0;--P){var Y=N[P];U=Y[0];var ee=z[U],q=ee[0],se=ee[1],ae=L[q],j=L[se];if((ae[0]-j[0]||ae[1]-j[1])<0){var Q=q;q=se,se=Q}ee[0]=q;var re=ee[1]=Y[1],pe;for(O&&(pe=ee[2]);P>0&&N[P-1][0]===U;){var Y=N[--P],we=Y[1];O?z.push([re,we,pe]):z.push([re,we]),re=we}O?z.push([re,se,pe]):z.push([re,se])}return B}function g(L,z,F){for(var N=z.length,O=new o(N),P=[],U=0;U<z.length;++U){var B=z[U],X=T(B[0]),$=T(B[1]);P.push([v(X[0],-1/0),v($[0],-1/0),v(X[1],1/0),v($[1],1/0)])}a(P,function(Y,ee){O.link(Y,ee)});for(var le=!0,ce=new Array(N),U=0;U<N;++U){var de=O.find(U);de!==U&&(le=!1,L[de]=[Math.min(L[U][0],L[de][0]),Math.min(L[U][1],L[de][1])])}if(le)return null;for(var G=0,U=0;U<N;++U){var de=O.find(U);de===U?(ce[U]=G,L[G++]=L[U]):ce[U]=-1}L.length=G;for(var U=0;U<N;++U)ce[U]<0&&(ce[U]=ce[O.find(U)]);return ce}function b(L,z){return L[0]-z[0]||L[1]-z[1]}function p(L,z){var F=L[0]-z[0]||L[1]-z[1];return F||(L[2]<z[2]?-1:L[2]>z[2]?1:0)}function u(L,z,F){if(L.length!==0){if(z)for(var N=0;N<L.length;++N){var O=L[N],P=z[O[0]],U=z[O[1]];O[0]=Math.min(P,U),O[1]=Math.max(P,U)}else for(var N=0;N<L.length;++N){var O=L[N],P=O[0],U=O[1];O[0]=Math.min(P,U),O[1]=Math.max(P,U)}F?L.sort(p):L.sort(b);for(var B=1,N=1;N<L.length;++N){var X=L[N-1],$=L[N];$[0]===X[0]&&$[1]===X[1]&&(!F||$[2]===X[2])||(L[B++]=$)}L.length=B}}function y(L,z,F){var N=g(L,[],_(L));return u(z,N,F),!!N}function m(L,z,F){var N=l(L,z),O=w(L,z,N),P=_(L),U=A(L,z,N,P),B=M(L,z,O,U,F),X=g(L,B,P);return u(z,X,F),X?!0:O.length>0||U.length>0}function R(L,z,F){var N;if(F){N=z;for(var O=new Array(z.length),P=0;P<z.length;++P){var U=z[P];O[P]=[U[0],U[1],F[P]]}z=O}for(var B=y(L,z,!!F);m(L,z,!!F);)B=!0;if(F&&B){N.length=0,F.length=0;for(var P=0;P<z.length;++P){var U=z[P];N.push([U[0],U[1]]),F.push(U[2])}}return B}},3637:function(e,t,r){"use strict";e.exports=c;var o=r(6504),a=r(8697),n=r(5572),i=r(7721),s=r(544),h=r(2653),f=r(8987);function v(T,l){return n(o(T[0],l[1]),o(T[1],l[0]))}function c(T,l,_,w){var A=s(l,T),M=s(w,_),g=v(A,M);if(i(g)===0)return null;var b=s(T,_),p=v(M,b),u=a(p,g),y=f(A,u),m=h(T,y);return m}},3642:function(e){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(e,t,r){"use strict";var o=r(3642),a=r(395);e.exports=n;function n(f){var v,c,T,l,_,w,A,M,u,g,b;if(f||(f={}),M=(f.nshades||72)-1,A=f.format||"hex",w=f.colormap,w||(w="jet"),typeof w=="string"){if(w=w.toLowerCase(),!o[w])throw Error(w+" not a supported colorscale");_=o[w]}else if(Array.isArray(w))_=w.slice();else throw Error("unsupported colormap option",w);if(_.length>M+1)throw new Error(w+" map requires nshades to be at least size "+_.length);Array.isArray(f.alpha)?f.alpha.length!==2?g=[1,1]:g=f.alpha.slice():typeof f.alpha=="number"?g=[f.alpha,f.alpha]:g=[1,1],v=_.map(function(R){return Math.round(R.index*M)}),g[0]=Math.min(Math.max(g[0],0),1),g[1]=Math.min(Math.max(g[1],0),1);var p=_.map(function(R,L){var z=_[L].index,F=_[L].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=g[0]+(g[1]-g[0])*z),F}),u=[];for(b=0;b<v.length-1;++b){l=v[b+1]-v[b],c=p[b],T=p[b+1];for(var y=0;y<l;y++){var m=y/l;u.push([Math.round(a(c[0],T[0],m)),Math.round(a(c[1],T[1],m)),Math.round(a(c[2],T[2],m)),a(c[3],T[3],m)])}}return u.push(_[_.length-1].rgb.concat(g[1])),A==="hex"?u=u.map(s):A==="rgbaString"?u=u.map(h):A==="float"&&(u=u.map(i)),u}function i(f){return[f[0]/255,f[1]/255,f[2]/255,f[3]]}function s(f){for(var v,c="#",T=0;T<3;++T)v=f[T],v=v.toString(16),c+=("00"+v).substr(v.length);return c}function h(f){return"rgba("+f.join(",")+")"}},3140:function(e,t,r){"use strict";e.exports=f;var o=r(3250),a=r(8572),n=r(9362),i=r(5382),s=r(8210);function h(v,c,T){var l=n(v[0],-c[0]),_=n(v[1],-c[1]),w=n(T[0],-c[0]),A=n(T[1],-c[1]),M=s(i(l,w),i(_,A));return M[M.length-1]>=0}function f(v,c,T,l){var _=o(c,T,l);if(_===0){var w=a(o(v,c,T)),A=a(o(v,c,l));if(w===A){if(w===0){var M=h(v,c,T),g=h(v,c,l);return M===g?0:M?1:-1}return 0}else{if(A===0)return w>0||h(v,c,l)?-1:1;if(w===0)return A>0||h(v,c,T)?1:-1}return a(A-w)}var b=o(v,c,T);if(b>0)return _>0&&o(v,c,l)>0?1:-1;if(b<0)return _>0||o(v,c,l)>0?1:-1;var p=o(v,c,l);return p>0||h(v,c,T)?1:-1}},8572:function(e){"use strict";e.exports=function(r){return r<0?-1:r>0?1:0}},8507:function(e){e.exports=o;var t=Math.min;function r(a,n){return a-n}function o(a,n){var i=a.length,s=a.length-n.length;if(s)return s;switch(i){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||t(a[0],a[1])-t(n[0],n[1]);case 3:var h=a[0]+a[1],f=n[0]+n[1];if(s=h+a[2]-(f+n[2]),s)return s;var v=t(a[0],a[1]),c=t(n[0],n[1]);return t(v,a[2])-t(c,n[2])||t(v+a[2],h)-t(c+n[2],f);case 4:var T=a[0],l=a[1],_=a[2],w=a[3],A=n[0],M=n[1],g=n[2],b=n[3];return T+l+_+w-(A+M+g+b)||t(T,l,_,w)-t(A,M,g,b,A)||t(T+l,T+_,T+w,l+_,l+w,_+w)-t(A+M,A+g,A+b,M+g,M+b,g+b)||t(T+l+_,T+l+w,T+_+w,l+_+w)-t(A+M+g,A+M+b,A+g+b,M+g+b);default:for(var p=a.slice().sort(r),u=n.slice().sort(r),y=0;y<i;++y)if(s=p[y]-u[y],s)return s;return 0}}},3788:function(e,t,r){"use strict";var o=r(8507),a=r(2419);e.exports=n;function n(i,s){return o(i,s)||a(i)-a(s)}},7352:function(e,t,r){"use strict";var o=r(5721),a=r(4750),n=r(2690);e.exports=i;function i(s){var h=s.length;if(h===0)return[];if(h===1)return[[0]];var f=s[0].length;return f===0?[]:f===1?o(s):f===2?a(s):n(s,f)}},5721:function(e){"use strict";e.exports=t;function t(r){for(var o=0,a=0,n=1;n<r.length;++n)r[n][0]<r[o][0]&&(o=n),r[n][0]>r[a][0]&&(a=n);return o<a?[[o],[a]]:o>a?[[a],[o]]:[[o]]}},4750:function(e,t,r){"use strict";e.exports=a;var o=r(3090);function a(n){var i=o(n),s=i.length;if(s<=2)return[];for(var h=new Array(s),f=i[s-1],v=0;v<s;++v){var c=i[v];h[v]=[f,c],f=c}return h}},2690:function(e,t,r){"use strict";e.exports=s;var o=r(8954),a=r(3952);function n(h,f){for(var v=h.length,c=new Array(v),T=0;T<f.length;++T)c[T]=h[f[T]];for(var l=f.length,T=0;T<v;++T)f.indexOf(T)<0&&(c[l++]=h[T]);return c}function i(h,f){for(var v=h.length,c=f.length,T=0;T<v;++T)for(var l=h[T],_=0;_<l.length;++_){var w=l[_];if(w<c)l[_]=f[w];else{w=w-c;for(var A=0;A<c;++A)w>=f[A]&&(w+=1);l[_]=w}}return h}function s(h,f){try{return o(h,!0)}catch{var v=a(h);if(v.length<=f)return[];var c=n(h,v),T=o(c,!0);return i(T,v)}}},4769:function(e){"use strict";function t(o,a,n,i,s,h){var f=6*s*s-6*s,v=3*s*s-4*s+1,c=-6*s*s+6*s,T=3*s*s-2*s;if(o.length){h||(h=new Array(o.length));for(var l=o.length-1;l>=0;--l)h[l]=f*o[l]+v*a[l]+c*n[l]+T*i[l];return h}return f*o+v*a+c*n[l]+T*i}function r(o,a,n,i,s,h){var f=s-1,v=s*s,c=f*f,T=(1+2*s)*c,l=s*c,_=v*(3-2*s),w=v*f;if(o.length){h||(h=new Array(o.length));for(var A=o.length-1;A>=0;--A)h[A]=T*o[A]+l*a[A]+_*n[A]+w*i[A];return h}return T*o+l*a+_*n+w*i}e.exports=r,e.exports.derivative=t},7642:function(e,t,r){"use strict";var o=r(8954),a=r(1682);e.exports=h;function n(f,v){this.point=f,this.index=v}function i(f,v){for(var c=f.point,T=v.point,l=c.length,_=0;_<l;++_){var w=T[_]-c[_];if(w)return w}return 0}function s(f,v,c){if(f===1)return c?[[-1,0]]:[];var T=v.map(function(M,g){return[M[0],g]});T.sort(function(M,g){return M[0]-g[0]});for(var l=new Array(f-1),_=1;_<f;++_){var w=T[_-1],A=T[_];l[_-1]=[w[1],A[1]]}return c&&l.push([-1,l[0][1]],[l[f-1][1],-1]),l}function h(f,v){var c=f.length;if(c===0)return[];var T=f[0].length;if(T<1)return[];if(T===1)return s(c,f,v);for(var l=new Array(c),_=1,w=0;w<c;++w){for(var A=f[w],M=new Array(T+1),g=0,b=0;b<T;++b){var p=A[b];M[b]=p,g+=p*p}M[T]=g,l[w]=new n(M,w),_=Math.max(g,_)}a(l,i),c=l.length;for(var u=new Array(c+T+1),y=new Array(c+T+1),m=(T+1)*(T+1)*_,R=new Array(T+1),w=0;w<=T;++w)R[w]=0;R[T]=m,u[0]=R.slice(),y[0]=-1;for(var w=0;w<=T;++w){var M=R.slice();M[w]=1,u[w+1]=M,y[w+1]=-1}for(var w=0;w<c;++w){var L=l[w];u[w+T+1]=L.point,y[w+T+1]=L.index}var z=o(u,!1);if(v?z=z.filter(function(F){for(var N=0,O=0;O<=T;++O){var P=y[F[O]];if(P<0&&++N>=2)return!1;F[O]=P}return!0}):z=z.filter(function(F){for(var N=0;N<=T;++N){var O=y[F[N]];if(O<0)return!1;F[N]=O}return!0}),T&1)for(var w=0;w<z.length;++w){var L=z[w],M=L[0];L[0]=L[1],L[1]=M}return z}},2361:function(e){var t=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),o=new Uint32Array(r.buffer);if(r[0]=1,t=!0,o[1]===1072693248){let _=function(M,g){return o[0]=M,o[1]=g,r[0]},w=function(M){return r[0]=M,o[0]},A=function(M){return r[0]=M,o[1]};var a=_,n=w,i=A;e.exports=function(g){return r[0]=g,[o[0],o[1]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}else if(o[0]===1072693248){let _=function(M,g){return o[1]=M,o[0]=g,r[0]},w=function(M){return r[0]=M,o[1]},A=function(M){return r[0]=M,o[0]};var s=_,h=w,f=A;e.exports=function(g){return r[0]=g,[o[1],o[0]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}else t=!1}if(!t){let _=function(M,g){return l.writeUInt32LE(M,0,!0),l.writeUInt32LE(g,4,!0),l.readDoubleLE(0,!0)},w=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(0,!0)},A=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(4,!0)};var v=_,c=w,T=A,l=new Buffer(8);e.exports=function(g){return l.writeDoubleLE(g,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}e.exports.sign=function(_){return e.exports.hi(_)>>>31},e.exports.exponent=function(_){var w=e.exports.hi(_);return(w<<1>>>21)-1023},e.exports.fraction=function(_){var w=e.exports.lo(_),A=e.exports.hi(_),M=A&(1<<20)-1;return A&2146435072&&(M+=1048576),[w,M]},e.exports.denormalized=function(_){var w=e.exports.hi(_);return!(w&2146435072)}},1338:function(e){"use strict";function t(a,n,i){var s=a[i]|0;if(s<=0)return[];var h=new Array(s),f;if(i===a.length-1)for(f=0;f<s;++f)h[f]=n;else for(f=0;f<s;++f)h[f]=t(a,n,i+1);return h}function r(a,n){var i,s;for(i=new Array(a),s=0;s<a;++s)i[s]=n;return i}function o(a,n){switch(typeof n>"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return t(a,n,0);break}return[]}e.exports=o},3134:function(e,t,r){"use strict";e.exports=a;var o=r(1682);function a(n,i){var s=n.length;if(typeof i!="number"){i=0;for(var h=0;h<s;++h){var f=n[h];i=Math.max(i,f[0],f[1])}i=(i|0)+1}i=i|0;for(var v=new Array(i),h=0;h<i;++h)v[h]=[];for(var h=0;h<s;++h){var f=n[h];v[f[0]].push(f[1]),v[f[1]].push(f[0])}for(var c=0;c<i;++c)o(v[c],function(T,l){return T-l});return v}},5033:function(e){"use strict";e.exports=t;function t(r,o,a){var n=o||0,i=a||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[n*r[12]+r[8],n*r[13]+r[9],n*r[14]+r[10],n*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},9215:function(e,t,r){"use strict";e.exports=f;var o=r(4769),a=r(2478);function n(v,c,T){return Math.min(c,Math.max(v,T))}function i(v,c,T){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var l=0;l<this.dimension;++l)this.bounds[0][l]=-1/0,this.bounds[1][l]=1/0;this._state=v.slice().reverse(),this._velocity=c.slice().reverse(),this._time=[T],this._scratch=[v.slice(),v.slice(),v.slice(),v.slice(),v.slice()]}var s=i.prototype;s.flush=function(v){var c=a.gt(this._time,v)-1;c<=0||(this._time.splice(0,c),this._state.splice(0,c*this.dimension),this._velocity.splice(0,c*this.dimension))},s.curve=function(v){var c=this._time,T=c.length,l=a.le(c,v),_=this._scratch[0],w=this._state,A=this._velocity,M=this.dimension,g=this.bounds;if(l<0)for(var b=M-1,p=0;p<M;++p,--b)_[p]=w[b];else if(l>=T-1)for(var b=w.length-1,u=v-c[T-1],p=0;p<M;++p,--b)_[p]=w[b]+u*A[b];else{for(var b=M*(l+1)-1,y=c[l],m=c[l+1],R=m-y||1,L=this._scratch[1],z=this._scratch[2],F=this._scratch[3],N=this._scratch[4],O=!0,p=0;p<M;++p,--b)L[p]=w[b],F[p]=A[b]*R,z[p]=w[b+M],N[p]=A[b+M]*R,O=O&&L[p]===z[p]&&F[p]===N[p]&&F[p]===0;if(O)for(var p=0;p<M;++p)_[p]=L[p];else o(L,F,z,N,(v-y)/R,_)}for(var P=g[0],U=g[1],p=0;p<M;++p)_[p]=n(P[p],U[p],_[p]);return _},s.dcurve=function(v){var c=this._time,T=c.length,l=a.le(c,v),_=this._scratch[0],w=this._state,A=this._velocity,M=this.dimension;if(l>=T-1)for(var g=w.length-1,b=v-c[T-1],p=0;p<M;++p,--g)_[p]=A[g];else{for(var g=M*(l+1)-1,u=c[l],y=c[l+1],m=y-u||1,R=this._scratch[1],L=this._scratch[2],z=this._scratch[3],F=this._scratch[4],N=!0,p=0;p<M;++p,--g)R[p]=w[g],z[p]=A[g]*m,L[p]=w[g+M],F[p]=A[g+M]*m,N=N&&R[p]===L[p]&&z[p]===F[p]&&z[p]===0;if(N)for(var p=0;p<M;++p)_[p]=0;else{o.derivative(R,z,L,F,(v-u)/m,_);for(var p=0;p<M;++p)_[p]/=m}}return _},s.lastT=function(){var v=this._time;return v[v.length-1]},s.stable=function(){for(var v=this._velocity,c=v.length,T=this.dimension-1;T>=0;--T)if(v[--c])return!1;return!0},s.jump=function(v){var c=this.lastT(),T=this.dimension;if(!(v<c||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=this.bounds,M=A[0],g=A[1];this._time.push(c,v);for(var b=0;b<2;++b)for(var p=0;p<T;++p)l.push(l[w++]),_.push(0);this._time.push(v);for(var p=T;p>0;--p)l.push(n(M[p-1],g[p-1],arguments[p])),_.push(0)}},s.push=function(v){var c=this.lastT(),T=this.dimension;if(!(v<c||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=v-c,M=this.bounds,g=M[0],b=M[1],p=A>1e-6?1/A:0;this._time.push(v);for(var u=T;u>0;--u){var y=n(g[u-1],b[u-1],arguments[u]);l.push(y),_.push((y-l[w++])*p)}}},s.set=function(v){var c=this.dimension;if(!(v<this.lastT()||arguments.length!==c+1)){var T=this._state,l=this._velocity,_=this.bounds,w=_[0],A=_[1];this._time.push(v);for(var M=c;M>0;--M)T.push(n(w[M-1],A[M-1],arguments[M])),l.push(0)}},s.move=function(v){var c=this.lastT(),T=this.dimension;if(!(v<=c||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=this.bounds,M=A[0],g=A[1],b=v-c,p=b>1e-6?1/b:0;this._time.push(v);for(var u=T;u>0;--u){var y=arguments[u];l.push(n(M[u-1],g[u-1],l[w++]+y)),_.push(y*p)}}},s.idle=function(v){var c=this.lastT();if(!(v<c)){var T=this.dimension,l=this._state,_=this._velocity,w=l.length-T,A=this.bounds,M=A[0],g=A[1],b=v-c;this._time.push(v);for(var p=T-1;p>=0;--p)l.push(n(M[p],g[p],l[w]+b*_[w])),_.push(0),w+=1}};function h(v){for(var c=new Array(v),T=0;T<v;++T)c[T]=0;return c}function f(v,c,T){switch(arguments.length){case 0:return new i([0],[0],0);case 1:if(typeof v=="number"){var l=h(v);return new i(l,l,0)}else return new i(v,h(v.length),0);case 2:if(typeof c=="number"){var l=h(v.length);return new i(v,l,+c)}else T=0;case 3:if(v.length!==c.length)throw new Error("state and velocity lengths must match");return new i(v,c,T)}}},3840:function(e){"use strict";e.exports=M;var t=0,r=1;function o(g,b,p,u,y,m){this._color=g,this.key=b,this.value=p,this.left=u,this.right=y,this._count=m}function a(g){return new o(g._color,g.key,g.value,g.left,g.right,g._count)}function n(g,b){return new o(g,b.key,b.value,b.left,b.right,b._count)}function i(g){g._count=1+(g.left?g.left._count:0)+(g.right?g.right._count:0)}function s(g,b){this._compare=g,this.root=b}var h=s.prototype;Object.defineProperty(h,"keys",{get:function(){var g=[];return this.forEach(function(b,p){g.push(b)}),g}}),Object.defineProperty(h,"values",{get:function(){var g=[];return this.forEach(function(b,p){g.push(p)}),g}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(g,b){for(var p=this._compare,u=this.root,y=[],m=[];u;){var R=p(g,u.key);y.push(u),m.push(R),R<=0?u=u.left:u=u.right}y.push(new o(t,g,b,null,null,1));for(var L=y.length-2;L>=0;--L){var u=y[L];m[L]<=0?y[L]=new o(u._color,u.key,u.value,y[L+1],u.right,u._count+1):y[L]=new o(u._color,u.key,u.value,u.left,y[L+1],u._count+1)}for(var L=y.length-1;L>1;--L){var z=y[L-1],u=y[L];if(z._color===r||u._color===r)break;var F=y[L-2];if(F.left===z)if(z.left===u){var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.left=z.right,z._color=r,z.right=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.left===F?O.left=z:O.right=z}break}}else{var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(z.right=u.left,F._color=t,F.left=u.right,u._color=r,u.left=z,u.right=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.left===F?O.left=u:O.right=u}break}}else if(z.right===u){var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.right=z.left,z._color=r,z.left=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.right===F?O.right=z:O.left=z}break}}else{var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(z.left=u.right,F._color=t,F.right=u.left,u._color=r,u.right=z,u.left=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.right===F?O.right=u:O.left=u}break}}}return y[0]._color=r,new s(p,y[0])};function f(g,b){if(b.left){var p=f(g,b.left);if(p)return p}var p=g(b.key,b.value);if(p)return p;if(b.right)return f(g,b.right)}function v(g,b,p,u){var y=b(g,u.key);if(y<=0){if(u.left){var m=v(g,b,p,u.left);if(m)return m}var m=p(u.key,u.value);if(m)return m}if(u.right)return v(g,b,p,u.right)}function c(g,b,p,u,y){var m=p(g,y.key),R=p(b,y.key),L;if(m<=0&&(y.left&&(L=c(g,b,p,u,y.left),L)||R>0&&(L=u(y.key,y.value),L)))return L;if(R>0&&y.right)return c(g,b,p,u,y.right)}h.forEach=function(b,p,u){if(this.root)switch(arguments.length){case 1:return f(b,this.root);case 2:return v(p,this._compare,b,this.root);case 3:return this._compare(p,u)>=0?void 0:c(p,u,this._compare,b,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.left;return new T(this,g)}}),Object.defineProperty(h,"end",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.right;return new T(this,g)}}),h.at=function(g){if(g<0)return new T(this,[]);for(var b=this.root,p=[];;){if(p.push(b),b.left){if(g<b.left._count){b=b.left;continue}g-=b.left._count}if(!g)return new T(this,p);if(g-=1,b.right){if(g>=b.right._count)break;b=b.right}else break}return new T(this,[])},h.ge=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m<=0&&(y=u.length),m<=0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.gt=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m<0&&(y=u.length),m<0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.lt=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m>0&&(y=u.length),m<=0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.le=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m>=0&&(y=u.length),m<0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.find=function(g){for(var b=this._compare,p=this.root,u=[];p;){var y=b(g,p.key);if(u.push(p),y===0)return new T(this,u);y<=0?p=p.left:p=p.right}return new T(this,[])},h.remove=function(g){var b=this.find(g);return b?b.remove():this},h.get=function(g){for(var b=this._compare,p=this.root;p;){var u=b(g,p.key);if(u===0)return p.value;u<=0?p=p.left:p=p.right}};function T(g,b){this.tree=g,this._stack=b}var l=T.prototype;Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new T(this.tree,this._stack.slice())};function _(g,b){g.key=b.key,g.value=b.value,g.left=b.left,g.right=b.right,g._color=b._color,g._count=b._count}function w(g){for(var b,p,u,y,m=g.length-1;m>=0;--m){if(b=g[m],m===0){b._color=r;return}if(p=g[m-1],p.left===b){if(u=p.right,u.right&&u.right._color===t){if(u=p.right=a(u),y=u.right=a(u.right),p.right=u.left,u.left=p,u.right=y,u._color=p._color,b._color=r,p._color=r,y._color=r,i(p),i(u),m>1){var R=g[m-2];R.left===p?R.left=u:R.right=u}g[m-1]=u;return}else if(u.left&&u.left._color===t){if(u=p.right=a(u),y=u.left=a(u.left),p.right=y.left,u.left=y.right,y.left=p,y.right=u,y._color=p._color,p._color=r,u._color=r,b._color=r,i(p),i(u),i(y),m>1){var R=g[m-2];R.left===p?R.left=y:R.right=y}g[m-1]=y;return}if(u._color===r)if(p._color===t){p._color=r,p.right=n(t,u);return}else{p.right=n(t,u);continue}else{if(u=a(u),p.right=u.left,u.left=p,u._color=p._color,p._color=t,i(p),i(u),m>1){var R=g[m-2];R.left===p?R.left=u:R.right=u}g[m-1]=u,g[m]=p,m+1<g.length?g[m+1]=b:g.push(b),m=m+2}}else{if(u=p.left,u.left&&u.left._color===t){if(u=p.left=a(u),y=u.left=a(u.left),p.left=u.right,u.right=p,u.left=y,u._color=p._color,b._color=r,p._color=r,y._color=r,i(p),i(u),m>1){var R=g[m-2];R.right===p?R.right=u:R.left=u}g[m-1]=u;return}else if(u.right&&u.right._color===t){if(u=p.left=a(u),y=u.right=a(u.right),p.left=y.right,u.right=y.left,y.right=p,y.left=u,y._color=p._color,p._color=r,u._color=r,b._color=r,i(p),i(u),i(y),m>1){var R=g[m-2];R.right===p?R.right=y:R.left=y}g[m-1]=y;return}if(u._color===r)if(p._color===t){p._color=r,p.left=n(t,u);return}else{p.left=n(t,u);continue}else{if(u=a(u),p.left=u.right,u.right=p,u._color=p._color,p._color=t,i(p),i(u),m>1){var R=g[m-2];R.right===p?R.right=u:R.left=u}g[m-1]=u,g[m]=p,m+1<g.length?g[m+1]=b:g.push(b),m=m+2}}}}l.remove=function(){var g=this._stack;if(g.length===0)return this.tree;var b=new Array(g.length),p=g[g.length-1];b[b.length-1]=new o(p._color,p.key,p.value,p.left,p.right,p._count);for(var u=g.length-2;u>=0;--u){var p=g[u];p.left===g[u+1]?b[u]=new o(p._color,p.key,p.value,b[u+1],p.right,p._count):b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count)}if(p=b[b.length-1],p.left&&p.right){var y=b.length;for(p=p.left;p.right;)b.push(p),p=p.right;var m=b[y-1];b.push(new o(p._color,m.key,m.value,p.left,p.right,p._count)),b[y-1].key=p.key,b[y-1].value=p.value;for(var u=b.length-2;u>=y;--u)p=b[u],b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count);b[y-1].left=b[y]}if(p=b[b.length-1],p._color===t){var R=b[b.length-2];R.left===p?R.left=null:R.right===p&&(R.right=null),b.pop();for(var u=0;u<b.length;++u)b[u]._count--;return new s(this.tree._compare,b[0])}else if(p.left||p.right){p.left?_(p,p.left):p.right&&_(p,p.right),p._color=r;for(var u=0;u<b.length-1;++u)b[u]._count--;return new s(this.tree._compare,b[0])}else{if(b.length===1)return new s(this.tree._compare,null);for(var u=0;u<b.length;++u)b[u]._count--;var L=b[b.length-2];w(b),L.left===p?L.left=null:L.right=null}return new s(this.tree._compare,b[0])},Object.defineProperty(l,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var g=0,b=this._stack;if(b.length===0){var p=this.tree.root;return p?p._count:0}else b[b.length-1].left&&(g=b[b.length-1].left._count);for(var u=b.length-2;u>=0;--u)b[u+1]===b[u].right&&(++g,b[u].left&&(g+=b[u].left._count));return g},enumerable:!0}),l.next=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.right)for(b=b.right;b;)g.push(b),b=b.left;else for(g.pop();g.length>0&&g[g.length-1].right===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].right)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].left===g[b])return!0;return!1}}),l.update=function(g){var b=this._stack;if(b.length===0)throw new Error("Can't update empty node!");var p=new Array(b.length),u=b[b.length-1];p[p.length-1]=new o(u._color,u.key,g,u.left,u.right,u._count);for(var y=b.length-2;y>=0;--y)u=b[y],u.left===b[y+1]?p[y]=new o(u._color,u.key,u.value,p[y+1],u.right,u._count):p[y]=new o(u._color,u.key,u.value,u.left,p[y+1],u._count);return new s(this.tree._compare,p[0])},l.prev=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.left)for(b=b.left;b;)g.push(b),b=b.right;else for(g.pop();g.length>0&&g[g.length-1].left===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].left)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].right===g[b])return!0;return!1}});function A(g,b){return g<b?-1:g>b?1:0}function M(g){return new s(g||A,null)}},3837:function(e,t,r){"use strict";e.exports=L;var o=r(4935),a=r(501),n=r(5304),i=r(6429),s=r(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=ArrayBuffer,v=DataView;function c(z){return f.isView(z)&&!(z instanceof v)}function T(z){return Array.isArray(z)||c(z)}function l(z,F){return z[0]=F[0],z[1]=F[1],z[2]=F[2],z}function _(z){this.gl=z,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=n(z)}var w=_.prototype;w.update=function(z){z=z||{};function F(q,se,ae){if(ae in z){var j=z[ae],Q=this[ae],re;(q?T(j)&&T(j[0]):T(j))?this[ae]=re=[se(j[0]),se(j[1]),se(j[2])]:this[ae]=re=[se(j),se(j),se(j)];for(var pe=0;pe<3;++pe)if(re[pe]!==Q[pe])return!0}return!1}var N=F.bind(this,!1,Number),O=F.bind(this,!1,Boolean),P=F.bind(this,!1,String),U=F.bind(this,!0,function(q){if(T(q)){if(q.length===3)return[+q[0],+q[1],+q[2],1];if(q.length===4)return[+q[0],+q[1],+q[2],+q[3]]}return[0,0,0,1]}),B,X=!1,$=!1;if("bounds"in z)for(var le=z.bounds,ce=0;ce<2;++ce)for(var de=0;de<3;++de)le[ce][de]!==this.bounds[ce][de]&&($=!0),this.bounds[ce][de]=le[ce][de];if("ticks"in z){B=z.ticks,X=!0,this.autoTicks=!1;for(var ce=0;ce<3;++ce)this.tickSpacing[ce]=0}else N("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in z||"tickSpacing"in z||(this.autoTicks=!0),$=!0,X=!0,this._firstInit=!1),$&&this.autoTicks&&(B=s.create(this.bounds,this.tickSpacing),X=!0),X){for(var ce=0;ce<3;++ce)B[ce].sort(function(se,ae){return se.x-ae.x});s.equal(B,this.ticks)?X=!1:this.ticks=B}O("tickEnable"),P("tickFont")&&(X=!0),P("tickFontStyle")&&(X=!0),P("tickFontWeight")&&(X=!0),P("tickFontVariant")&&(X=!0),N("tickSize"),N("tickAngle"),N("tickPad"),U("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),O("labelEnable"),N("labelSize"),N("labelPad"),U("labelColor"),O("lineEnable"),O("lineMirror"),N("lineWidth"),U("lineColor"),O("lineTickEnable"),O("lineTickMirror"),N("lineTickLength"),N("lineTickWidth"),U("lineTickColor"),O("gridEnable"),N("gridWidth"),U("gridColor"),O("zeroEnable"),U("zeroLineColor"),N("zeroLineWidth"),O("backgroundEnable"),U("backgroundColor");var Y=[{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]}],ee=[{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&&(G||X)&&this._text.update(this.bounds,this.labels,Y,this.ticks,ee):this._text=o(this.gl,this.bounds,this.labels,Y,this.ticks,ee),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new A,new A,new A];function g(z,F,N,O,P){for(var U=z.primalOffset,B=z.primalMinor,X=z.mirrorOffset,$=z.mirrorMinor,le=O[F],ce=0;ce<3;++ce)if(F!==ce){var de=U,G=X,Y=B,ee=$;le&1<<ce&&(de=X,G=U,Y=$,ee=B),de[ce]=N[0][ce],G[ce]=N[1][ce],P[ce]>0?(Y[ce]=-1,ee[ce]=0):(Y[ce]=0,ee[ce]=1)}}var b=[0,0,0],p={model:h,view:h,projection:h,_ortho:!1};w.isOpaque=function(){return!0},w.isTransparent=function(){return!1},w.drawTransparent=function(z){};var u=0,y=[0,0,0],m=[0,0,0],R=[0,0,0];w.draw=function(z){z=z||p;for(var ae=this.gl,F=z.model||h,N=z.view||h,O=z.projection||h,P=this.bounds,U=z._ortho||!1,B=i(F,N,O,P,U),X=B.cubeEdges,$=B.axis,le=N[12],ce=N[13],de=N[14],G=N[15],Y=U?2:1,ee=Y*this.pixelRatio*(O[3]*le+O[7]*ce+O[11]*de+O[15]*G)/ae.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=X[q],this.lastCubeProps.axis[q]=$[q];for(var se=M,q=0;q<3;++q)g(M[q],q,this.bounds,X,$);for(var ae=this.gl,j=b,q=0;q<3;++q)this.backgroundEnable[q]?j[q]=$[q]:j[q]=0;this._background.draw(F,N,O,P,j,this.backgroundColor),this._lines.bind(F,N,O,this);for(var q=0;q<3;++q){var Q=[0,0,0];$[q]>0?Q[q]=P[1][q]:Q[q]=P[0][q];for(var re=0;re<2;++re){var pe=(q+1+re)%3,we=(q+1+(re^1))%3;this.gridEnable[pe]&&this._lines.drawGrid(pe,we,this.bounds,Q,this.gridColor[pe],this.gridWidth[pe]*this.pixelRatio)}for(var re=0;re<2;++re){var pe=(q+1+re)%3,we=(q+1+(re^1))%3;this.zeroEnable[we]&&Math.min(P[0][we],P[1][we])<=0&&Math.max(P[0][we],P[1][we])>=0&&this._lines.drawZero(pe,we,this.bounds,Q,this.zeroLineColor[we],this.zeroLineWidth[we]*this.pixelRatio)}}for(var q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,se[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,se[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);for(var Se=l(y,se[q].primalMinor),Ie=l(m,se[q].mirrorMinor),Re=this.lineTickLength,re=0;re<3;++re){var We=ee/F[5*re];Se[re]*=Re[re]*We,Ie[re]*=Re[re]*We}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,se[q].primalOffset,Se,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,se[q].mirrorOffset,Ie,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,N,O,this.pixelRatio);var at,nt=.5,tt,qe;function he(Ke){qe=[0,0,0],qe[Ke]=1}function ue(Ke,Mt,kt){var Nt=(Ke+1)%3,Gt=(Ke+2)%3,Mr=Mt[Nt],mr=Mt[Gt],qr=kt[Nt],Er=kt[Gt];if(Mr>0&&Er>0){he(Nt);return}else if(Mr>0&&Er<0){he(Nt);return}else if(Mr<0&&Er>0){he(Nt);return}else if(Mr<0&&Er<0){he(Nt);return}else if(mr>0&&qr>0){he(Gt);return}else if(mr>0&&qr<0){he(Gt);return}else if(mr<0&&qr>0){he(Gt);return}else if(mr<0&&qr<0){he(Gt);return}}for(var q=0;q<3;++q){for(var ne=se[q].primalMinor,Ce=se[q].mirrorMinor,Ye=l(R,se[q].primalOffset),re=0;re<3;++re)this.lineTickEnable[q]&&(Ye[re]+=ee*ne[re]*Math.max(this.lineTickLength[re],0)/F[5*re]);var rt=[0,0,0];if(rt[q]=1,this.tickEnable[q]){this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,tt=1,at=[this.tickAlign[q],nt,tt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]),qe=[0,0,0],ue(q,ne,Ce);for(var re=0;re<3;++re)Ye[re]+=ee*ne[re]*this.tickPad[re]/F[5*re];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],Ye,this.tickColor[q],rt,qe,at)}if(this.labelEnable[q]){tt=0,qe=[0,0,0],this.labels[q].length>4&&(he(q),tt=1),at=[this.labelAlign[q],nt,tt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]);for(var re=0;re<3;++re)Ye[re]+=ee*ne[re]*this.labelPad[re]/F[5*re];Ye[q]+=.5*(P[0][q]+P[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],Ye,this.labelColor[q],[0,0,0],qe,at)}}this._text.unbind()},w.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function L(z,F){var N=new _(z);return N.update(F),N}},5304:function(e,t,r){"use strict";e.exports=h;var o=r(2762),a=r(8116),n=r(1879).bg;function i(f,v,c,T){this.gl=f,this.buffer=v,this.vao=c,this.shader=T}var s=i.prototype;s.draw=function(f,v,c,T,l,_){for(var w=!1,A=0;A<3;++A)w=w||l[A];if(w){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:f,view:v,projection:c,bounds:T,enable:l,colors:_},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(f){for(var v=[],c=[],T=0,l=0;l<3;++l)for(var _=(l+1)%3,w=(l+2)%3,A=[0,0,0],M=[0,0,0],g=-1;g<=1;g+=2){c.push(T,T+2,T+1,T+1,T+2,T+3),A[l]=g,M[l]=g;for(var b=-1;b<=1;b+=2){A[_]=b;for(var p=-1;p<=1;p+=2)A[w]=p,v.push(A[0],A[1],A[2],M[0],M[1],M[2]),T+=1}var u=_;_=w,w=u}var y=o(f,new Float32Array(v)),m=o(f,new Uint16Array(c),f.ELEMENT_ARRAY_BUFFER),R=a(f,[{buffer:y,type:f.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:f.FLOAT,size:3,offset:12,stride:24}],m),L=n(f);return L.attributes.position.location=0,L.attributes.normal.location=1,new i(f,y,R,L)}},6429:function(e,t,r){"use strict";e.exports=g;var o=r(8828),a=r(6760),n=r(5202),i=r(3250),s=new Array(16),h=new Array(8),f=new Array(8),v=new Array(3),c=[0,0,0];(function(){for(var b=0;b<8;++b)h[b]=[1,1,1,1],f[b]=[1,1,1]})();function T(b,p,u){for(var y=0;y<4;++y){b[y]=u[12+y];for(var m=0;m<3;++m)b[y]+=p[m]*u[4*m+y]}}var l=[[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 _(b){for(var p=0;p<l.length;++p)if(b=n.positive(b,l[p]),b.length<3)return 0;for(var u=b[0],y=u[0]/u[3],m=u[1]/u[3],R=0,p=1;p+1<b.length;++p){var L=b[p],z=b[p+1],F=L[0]/L[3],N=L[1]/L[3],O=z[0]/z[3],P=z[1]/z[3],U=F-y,B=N-m,X=O-y,$=P-m;R+=Math.abs(U*$-B*X)}return R}var w=[1,1,1],A=[0,0,0],M={cubeEdges:w,axis:A};function g(b,p,u,y,m){a(s,p,b),a(s,u,s);for(var R=0,L=0;L<2;++L){v[2]=y[L][2];for(var z=0;z<2;++z){v[1]=y[z][1];for(var F=0;F<2;++F)v[0]=y[F][0],T(h[R],v,s),R+=1}}for(var N=-1,L=0;L<8;++L){for(var O=h[L][3],P=0;P<3;++P)f[L][P]=h[L][P]/O;m&&(f[L][2]*=-1),O<0&&(N<0||f[L][2]<f[N][2])&&(N=L)}if(N<0){N=0;for(var U=0;U<3;++U){for(var B=(U+2)%3,X=(U+1)%3,$=-1,le=-1,ce=0;ce<2;++ce){var de=ce<<U,G=de+(ce<<B)+(1-ce<<X),Y=de+(1-ce<<B)+(ce<<X);i(f[de],f[G],f[Y],c)<0||(ce?$=1:le=1)}if($<0||le<0){le>$&&(N|=1<<U);continue}for(var ce=0;ce<2;++ce){var de=ce<<U,G=de+(ce<<B)+(1-ce<<X),Y=de+(1-ce<<B)+(ce<<X),ee=_([h[de],h[G],h[Y],h[de+(1<<B)+(1<<X)]]);ce?$=ee:le=ee}if(le>$){N|=1<<U;continue}}}for(var q=7^N,se=-1,L=0;L<8;++L)L===N||L===q||(se<0||f[se][1]>f[L][1])&&(se=L);for(var ae=-1,L=0;L<3;++L){var j=se^1<<L;if(!(j===N||j===q)){ae<0&&(ae=j);var X=f[j];X[0]<f[ae][0]&&(ae=j)}}for(var Q=-1,L=0;L<3;++L){var j=se^1<<L;if(!(j===N||j===q||j===ae)){Q<0&&(Q=j);var X=f[j];X[0]>f[Q][0]&&(Q=j)}}var re=w;re[0]=re[1]=re[2]=0,re[o.log2(ae^se)]=se&ae,re[o.log2(se^Q)]=se&Q;var pe=Q^7;pe===N||pe===q?(pe=ae^7,re[o.log2(Q^pe)]=pe&Q):re[o.log2(ae^pe)]=pe&ae;for(var we=A,Se=N,U=0;U<3;++U)Se&1<<U?we[U]=-1:we[U]=1;return M}},501:function(e,t,r){"use strict";e.exports=w;var o=r(2762),a=r(8116),n=r(1879).n,i=[0,0,0],s=[0,0,0],h=[0,0,0],f=[0,0,0],v=[1,1];function c(A){return A[0]=A[1]=A[2]=0,A}function T(A,M){return A[0]=M[0],A[1]=M[1],A[2]=M[2],A}function l(A,M,g,b,p,u,y,m){this.gl=A,this.vertBuffer=M,this.vao=g,this.shader=b,this.tickCount=p,this.tickOffset=u,this.gridCount=y,this.gridOffset=m}var _=l.prototype;_.bind=function(A,M,g){this.shader.bind(),this.shader.uniforms.model=A,this.shader.uniforms.view=M,this.shader.uniforms.projection=g,v[0]=this.gl.drawingBufferWidth,v[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=v,this.vao.bind()},_.unbind=function(){this.vao.unbind()},_.drawAxisLine=function(A,M,g,b,p){var u=c(s);this.shader.uniforms.majorAxis=s,u[A]=M[1][A]-M[0][A],this.shader.uniforms.minorAxis=u;var y=T(f,g);y[A]+=M[0][A],this.shader.uniforms.offset=y,this.shader.uniforms.lineWidth=p,this.shader.uniforms.color=b;var m=c(h);m[(A+2)%3]=1,this.shader.uniforms.screenAxis=m,this.vao.draw(this.gl.TRIANGLES,6);var m=c(h);m[(A+1)%3]=1,this.shader.uniforms.screenAxis=m,this.vao.draw(this.gl.TRIANGLES,6)},_.drawAxisTicks=function(A,M,g,b,p){if(this.tickCount[A]){var u=c(i);u[A]=1,this.shader.uniforms.majorAxis=u,this.shader.uniforms.offset=M,this.shader.uniforms.minorAxis=g,this.shader.uniforms.color=b,this.shader.uniforms.lineWidth=p;var y=c(h);y[A]=1,this.shader.uniforms.screenAxis=y,this.vao.draw(this.gl.TRIANGLES,this.tickCount[A],this.tickOffset[A])}},_.drawGrid=function(A,M,g,b,p,u){if(this.gridCount[A]){var y=c(s);y[M]=g[1][M]-g[0][M],this.shader.uniforms.minorAxis=y;var m=T(f,b);m[M]+=g[0][M],this.shader.uniforms.offset=m;var R=c(i);R[A]=1,this.shader.uniforms.majorAxis=R;var L=c(h);L[A]=1,this.shader.uniforms.screenAxis=L,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=p,this.vao.draw(this.gl.TRIANGLES,this.gridCount[A],this.gridOffset[A])}},_.drawZero=function(A,M,g,b,p,u){var y=c(s);this.shader.uniforms.majorAxis=y,y[A]=g[1][A]-g[0][A],this.shader.uniforms.minorAxis=y;var m=T(f,b);m[A]+=g[0][A],this.shader.uniforms.offset=m;var R=c(h);R[M]=1,this.shader.uniforms.screenAxis=R,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=p,this.vao.draw(this.gl.TRIANGLES,6)},_.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function w(A,M,g){var b=[],p=[0,0,0],u=[0,0,0],y=[0,0,0],m=[0,0,0];b.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var R=0;R<3;++R){for(var F=b.length/3|0,L=0;L<g[R].length;++L){var z=+g[R][L].x;b.push(z,0,1,z,1,1,z,0,-1,z,0,-1,z,1,1,z,1,-1)}var O=b.length/3|0;p[R]=F,u[R]=O-F;for(var F=b.length/3|0,N=0;N<g[R].length;++N){var z=+g[R][N].x;b.push(z,0,1,z,1,1,z,0,-1,z,0,-1,z,1,1,z,1,-1)}var O=b.length/3|0;y[R]=F,m[R]=O-F}var P=o(A,new Float32Array(b)),U=a(A,[{buffer:P,type:A.FLOAT,size:3,stride:0,offset:0}]),B=n(A);return B.attributes.position.location=0,new l(A,P,U,B,u,p,m,y)}},1879:function(e,t,r){"use strict";var o=r(3236),a=r(9405),n=o([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;
vec3 project(vec3 p) {
vec4 pp = projection * (view * (model * vec4(p, 1.0)));
return pp.xyz / max(pp.w, 0.0001);
}
void main() {
vec3 major = position.x * majorAxis;
vec3 minor = position.y * minorAxis;
vec3 vPosition = major + minor + offset;
vec3 pPosition = project(vPosition);
vec3 offset = project(vPosition + screenAxis * position.z);
vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;
gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),i=o([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);t.n=function(c){return a(c,n,i,null,[{name:"position",type:"vec3"}])};var s=o([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;
vec3 project(vec3 p) {
vec4 pp = projection * (view * (model * vec4(p, 1.0)));
return pp.xyz / max(pp.w, 0.0001);
}
float computeViewAngle(vec3 a, vec3 b) {
vec3 A = project(a);
vec3 B = project(b);
return atan(
(B.y - A.y) * resolution.y,
(B.x - A.x) * resolution.x
);
}
const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;
int option = int(floor(alignOpt.x + 0.001));
float hv_ratio = alignOpt.y;
bool enableAlign = (alignOpt.z != 0.0);
float mod_angle(float a) {
return mod(a, PI);
}
float positive_angle(float a) {
return mod_angle((a < 0.0) ?
a + TWO_PI :
a
);
}
float look_upwards(float a) {
float b = positive_angle(a);
return ((b > 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);
}
`]),h=o([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);t.Q=function(c){return a(c,s,h,null,[{name:"position",type:"vec3"}])};var f=o([`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);
}
`]),v=o([`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];
}`]);t.bg=function(c){return a(c,f,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){"use strict";e.exports=_;var o=r(2762),a=r(8116),n=r(4359),i=r(1879).Q,s=window||process.global||{},h=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var f=3;function v(w,A,M,g){this.gl=w,this.shader=A,this.buffer=M,this.vao=g,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var c=v.prototype,T=[0,0];c.bind=function(w,A,M,g){this.vao.bind(),this.shader.bind();var b=this.shader.uniforms;b.model=w,b.view=A,b.projection=M,b.pixelScale=g,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},c.unbind=function(){this.vao.unbind()},c.update=function(w,A,M,g,b){var p=[];function u(U,B,X,$,le,ce){var de=[X.style,X.weight,X.variant,X.family].join("_"),G=h[de];G||(G=h[de]={});var Y=G[B];Y||(Y=G[B]=l(B,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:le,styletags:ce}));for(var ee=($||12)/12,q=Y.positions,se=Y.cells,ae=0,j=se.length;ae<j;++ae)for(var Q=se[ae],re=2;re>=0;--re){var pe=q[Q[re]];p.push(ee*pe[0],-ee*pe[1],U)}}for(var y=[0,0,0],m=[0,0,0],R=[0,0,0],L=[0,0,0],z=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},N=0;N<3;++N){R[N]=p.length/f|0,u(.5*(w[0][N]+w[1][N]),A[N],M[N],12,z,F),L[N]=(p.length/f|0)-R[N],y[N]=p.length/f|0;for(var O=0;O<g[N].length;++O)if(g[N][O].text){var P={family:g[N][O].font||b[N].family,style:b[N].fontStyle||b[N].style,weight:b[N].fontWeight||b[N].weight,variant:b[N].fontVariant||b[N].variant};u(g[N][O].x,g[N][O].text,P,g[N][O].fontSize||12,z,F)}m[N]=(p.length/f|0)-y[N]}this.buffer.update(p),this.tickOffset=y,this.tickCount=m,this.labelOffset=R,this.labelCount=L},c.drawTicks=function(w,A,M,g,b,p,u,y){this.tickCount[w]&&(this.shader.uniforms.axis=p,this.shader.uniforms.color=b,this.shader.uniforms.angle=M,this.shader.uniforms.scale=A,this.shader.uniforms.offset=g,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=y,this.vao.draw(this.gl.TRIANGLES,this.tickCount[w],this.tickOffset[w]))},c.drawLabel=function(w,A,M,g,b,p,u,y){this.labelCount[w]&&(this.shader.uniforms.axis=p,this.shader.uniforms.color=b,this.shader.uniforms.angle=M,this.shader.uniforms.scale=A,this.shader.uniforms.offset=g,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=y,this.vao.draw(this.gl.TRIANGLES,this.labelCount[w],this.labelOffset[w]))},c.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function l(w,A){try{return n(w,A)}catch(M){return console.warn('error vectorizing text:"'+w+'" error:',M),{cells:[],positions:[]}}}function _(w,A,M,g,b,p){var u=o(w),y=a(w,[{buffer:u,size:3}]),m=i(w);m.attributes.position.location=0;var R=new v(w,m,u,y);return R.update(A,M,g,b,p),R}},6444:function(e,t){"use strict";t.create=o,t.equal=a;function r(n,i){var s=n+"",h=s.indexOf("."),f=0;h>=0&&(f=s.length-h-1);var v=Math.pow(10,f),c=Math.round(n*i*v),T=c+"";if(T.indexOf("e")>=0)return T;var l=c/v,_=c%v;c<0?(l=-Math.ceil(l)|0,_=-_|0):(l=Math.floor(l)|0,_=_|0);var w=""+l;if(c<0&&(w="-"+w),f){for(var A=""+_;A.length<f;)A="0"+A;return w+"."+A}else return w}function o(n,i){for(var s=[],h=0;h<3;++h){for(var f=[],v=.5*(n[0][h]+n[1][h]),c=0;c*i[h]<=n[1][h];++c)f.push({x:c*i[h],text:r(i[h],c)});for(var c=-1;c*i[h]>=n[0][h];--c)f.push({x:c*i[h],text:r(i[h],c)});s.push(f)}return s}function a(n,i){for(var s=0;s<3;++s){if(n[s].length!==i[s].length)return!1;for(var h=0;h<n[s].length;++h){var f=n[s][h],v=i[s][h];if(f.x!==v.x||f.text!==v.text||f.font!==v.font||f.fontColor!==v.fontColor||f.fontSize!==v.fontSize||f.dx!==v.dx||f.dy!==v.dy)return!1}}return!0}},5445:function(e,t,r){"use strict";e.exports=M;var o=r(5033),a=r(5202),n=r(6429),i=r(6760),s=r(5665),h=r(5352),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=new Float32Array(16);function c(g,b,p){this.lo=g,this.hi=b,this.pixelsPerDataUnit=p}var T=[0,0,0,1],l=[0,0,0,1];function _(g,b,p,u,y){for(var m=0;m<3;++m){for(var R=T,L=l,z=0;z<3;++z)L[z]=R[z]=p[z];L[3]=R[3]=1,L[m]+=1,h(L,L,b),L[3]<0&&(g[m]=1/0),R[m]-=1,h(R,R,b),R[3]<0&&(g[m]=1/0);var F=(R[0]/R[3]-L[0]/L[3])*u,N=(R[1]/R[3]-L[1]/L[3])*y;g[m]=.25*Math.sqrt(F*F+N*N)}return g}var w=[new c(1/0,-1/0,1/0),new c(1/0,-1/0,1/0),new c(1/0,-1/0,1/0)],A=[0,0,0];function M(g,b,p,u,N){var m=b.model||f,R=b.view||f,L=b.projection||f,z=b._ortho||!1,F=g.bounds,N=N||n(m,R,L,F,z),O=N.axis;i(v,R,m),i(v,L,v);for(var P=w,U=0;U<3;++U)P[U].lo=1/0,P[U].hi=-1/0,P[U].pixelsPerDataUnit=1/0;var B=o(s(v,v));s(v,v);for(var X=0;X<3;++X){var $=(X+1)%3,le=(X+2)%3,ce=A;e:for(var U=0;U<2;++U){var de=[];if(O[X]<0!=!!U){ce[X]=F[U][X];for(var G=0;G<2;++G){ce[$]=F[G^U][$];for(var Y=0;Y<2;++Y)ce[le]=F[Y^G^U][le],de.push(ce.slice())}for(var ee=z?5:4,G=ee;G===ee;++G){if(de.length===0)continue e;de=a.positive(de,B[G])}for(var G=0;G<de.length;++G)for(var le=de[G],q=_(A,v,le,p,u),Y=0;Y<3;++Y)P[Y].lo=Math.min(P[Y].lo,le[Y]),P[Y].hi=Math.max(P[Y].hi,le[Y]),Y!==X&&(P[Y].pixelsPerDataUnit=Math.min(P[Y].pixelsPerDataUnit,Math.abs(q[Y])))}}}return P}},2762:function(e,t,r){"use strict";var o=r(1888),a=r(5298),n=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(l,_,w,A,M){this.gl=l,this.type=_,this.handle=w,this.length=A,this.usage=M}var h=s.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function f(l,_,w,A,M,g){var b=M.length*M.BYTES_PER_ELEMENT;if(g<0)return l.bufferData(_,M,A),b;if(b+g>w)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return l.bufferSubData(_,g,M),w}function v(l,_){for(var w=o.malloc(l.length,_),A=l.length,M=0;M<A;++M)w[M]=l[M];return w}function c(l,_){for(var w=1,A=_.length-1;A>=0;--A){if(_[A]!==w)return!1;w*=l[A]}return!0}h.update=function(l,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof l=="object"&&typeof l.shape<"u"){var w=l.dtype;if(i.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===l.dtype&&c(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=f(this.gl,this.type,this.length,this.usage,l.data,_):this.length=f(this.gl,this.type,this.length,this.usage,l.data.subarray(l.offset,l.shape[0]),_);else{var M=o.malloc(l.size,w),g=n(M,l.shape);a.assign(g,l),_<0?this.length=f(this.gl,this.type,this.length,this.usage,M,_):this.length=f(this.gl,this.type,this.length,this.usage,M.subarray(0,l.size),_),o.free(M)}}else if(Array.isArray(l)){var b;this.type===this.gl.ELEMENT_ARRAY_BUFFER?b=v(l,"uint16"):b=v(l,"float32"),_<0?this.length=f(this.gl,this.type,this.length,this.usage,b,_):this.length=f(this.gl,this.type,this.length,this.usage,b.subarray(0,l.length),_),o.free(b)}else if(typeof l=="object"&&typeof l.length=="number")this.length=f(this.gl,this.type,this.length,this.usage,l,_);else if(typeof l=="number"||l===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");l=l|0,l<=0&&(l=1),this.gl.bufferData(this.type,l|0,this.usage),this.length=l}else throw new Error("gl-buffer: Invalid data type")};function T(l,_,w,A){if(w=w||l.ARRAY_BUFFER,A=A||l.DYNAMIC_DRAW,w!==l.ARRAY_BUFFER&&w!==l.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(A!==l.DYNAMIC_DRAW&&A!==l.STATIC_DRAW&&A!==l.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 M=l.createBuffer(),g=new s(l,w,M,0,A);return g.update(_),g}e.exports=T},6405:function(e,t,r){"use strict";var o=r(2931);e.exports=function(n,i){var s=n.positions,h=n.vectors,f={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),f;for(var v=0,c=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,A=-1/0,M=null,g=null,b=[],p=1/0,u=!1,y=n.coneSizemode==="raw",m=0;m<s.length;m++){var R=s[m];c=Math.min(R[0],c),T=Math.max(R[0],T),l=Math.min(R[1],l),_=Math.max(R[1],_),w=Math.min(R[2],w),A=Math.max(R[2],A);var L=h[m];if(o.length(L)>v&&(v=o.length(L)),m&&!y){var z=2*o.distance(M,R)/(o.length(g)+o.length(L));z?(p=Math.min(p,z),u=!1):u=!0}u||(M=R,g=L),b.push(L)}var F=[c,l,w],N=[T,_,A];i&&(i[0]=F,i[1]=N),v===0&&(v=1);var O=1/v;isFinite(p)||(p=1),f.vectorScale=p;var P=n.coneSize||(y?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*O),f.coneScale=P;for(var m=0,U=0;m<s.length;m++)for(var R=s[m],B=R[0],X=R[1],$=R[2],le=b[m],ce=o.length(le)*O,de=0,G=8;de<G;de++){f.positions.push([B,X,$,U++]),f.positions.push([B,X,$,U++]),f.positions.push([B,X,$,U++]),f.positions.push([B,X,$,U++]),f.positions.push([B,X,$,U++]),f.positions.push([B,X,$,U++]),f.vectors.push(le),f.vectors.push(le),f.vectors.push(le),f.vectors.push(le),f.vectors.push(le),f.vectors.push(le),f.vertexIntensity.push(ce,ce,ce),f.vertexIntensity.push(ce,ce,ce);var Y=f.positions.length;f.cells.push([Y-6,Y-5,Y-4],[Y-3,Y-2,Y-1])}return f};var a=r(614);e.exports.createMesh=r(9060),e.exports.createConeMesh=function(n,i){return e.exports.createMesh(n,i,{shaders:a,traceType:"cone"})}},9060:function(e,t,r){"use strict";var o=r(9405),a=r(2762),n=r(8116),i=r(7766),s=r(6760),h=r(7608),f=r(9618),v=r(6729),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(b,p,u,y,m,R,L,z,F,N,O){this.gl=b,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=p,this.dirty=!0,this.triShader=u,this.pickShader=y,this.trianglePositions=m,this.triangleVectors=R,this.triangleColors=z,this.triangleUVs=F,this.triangleIds=L,this.triangleVAO=N,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=O,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=c,this._view=c,this._projection=c,this._resolution=[1,1]}var l=T.prototype;l.isOpaque=function(){return this.opacity>=1},l.isTransparent=function(){return this.opacity<1},l.pickSlots=1,l.setPickBase=function(b){this.pickId=b};function _(b){for(var p=v({colormap:b,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),y=0;y<256;++y){for(var m=p[y],R=0;R<3;++R)u[4*y+R]=m[R];u[4*y+3]=m[3]*255}return f(u,[256,256,4],[4,0,1])}function w(b){for(var p=b.length,u=new Array(p),y=0;y<p;++y)u[y]=b[y][2];return u}l.update=function(b){b=b||{};var p=this.gl;this.dirty=!0,"lightPosition"in b&&(this.lightPosition=b.lightPosition),"opacity"in b&&(this.opacity=b.opacity),"ambient"in b&&(this.ambientLight=b.ambient),"diffuse"in b&&(this.diffuseLight=b.diffuse),"specular"in b&&(this.specularLight=b.specular),"roughness"in b&&(this.roughness=b.roughness),"fresnel"in b&&(this.fresnel=b.fresnel),b.tubeScale!==void 0&&(this.tubeScale=b.tubeScale),b.vectorScale!==void 0&&(this.vectorScale=b.vectorScale),b.coneScale!==void 0&&(this.coneScale=b.coneScale),b.coneOffset!==void 0&&(this.coneOffset=b.coneOffset),b.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=p.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=p.LINEAR,this.texture.setPixels(_(b.colormap)),this.texture.generateMipmap());var u=b.cells,y=b.positions,m=b.vectors;if(!(!y||!u||!m)){var R=[],L=[],z=[],F=[],N=[];this.cells=u,this.positions=y,this.vectors=m;var O=b.meshColor||[1,1,1,1],P=b.vertexIntensity,U=1/0,B=-1/0;if(P)if(b.vertexIntensityBounds)U=+b.vertexIntensityBounds[0],B=+b.vertexIntensityBounds[1];else for(var X=0;X<P.length;++X){var $=P[X];U=Math.min(U,$),B=Math.max(B,$)}else for(var X=0;X<y.length;++X){var $=y[X][2];U=Math.min(U,$),B=Math.max(B,$)}P?this.intensity=P:this.intensity=w(y),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var X=0;X<y.length;++X)for(var le=y[X],ce=0;ce<3;++ce)isNaN(le[ce])||!isFinite(le[ce])||(this.bounds[0][ce]=Math.min(this.bounds[0][ce],le[ce]),this.bounds[1][ce]=Math.max(this.bounds[1][ce],le[ce]));var de=0;e:for(var X=0;X<u.length;++X){var G=u[X];switch(G.length){case 3:for(var ce=0;ce<3;++ce)for(var Y=G[ce],le=y[Y],ee=0;ee<3;++ee)if(isNaN(le[ee])||!isFinite(le[ee]))continue e;for(var ce=0;ce<3;++ce){var Y=G[2-ce],le=y[Y];R.push(le[0],le[1],le[2],le[3]);var q=m[Y];L.push(q[0],q[1],q[2],q[3]||0);var se=O;se.length===3?z.push(se[0],se[1],se[2],1):z.push(se[0],se[1],se[2],se[3]);var ae;P?ae=[(P[Y]-U)/(B-U),0]:ae=[(le[2]-U)/(B-U),0],F.push(ae[0],ae[1]),N.push(X)}de+=1;break;default:break}}this.triangleCount=de,this.trianglePositions.update(R),this.triangleVectors.update(L),this.triangleColors.update(z),this.triangleUVs.update(F),this.triangleIds.update(new Uint32Array(N))}},l.drawTransparent=l.draw=function(b){b=b||{};for(var p=this.gl,u=b.model||c,y=b.view||c,m=b.projection||c,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)R[0][L]=Math.max(R[0][L],this.clipBounds[0][L]),R[1][L]=Math.min(R[1][L],this.clipBounds[1][L]);var z={model:u,view:y,projection:m,inverseModel:c.slice(),clipBounds:R,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};z.inverseModel=h(z.inverseModel,z.model),p.disable(p.CULL_FACE),this.texture.bind(0);var F=new Array(16);s(F,z.view,z.model),s(F,z.projection,F),h(F,F);for(var L=0;L<3;++L)z.eyePosition[L]=F[12+L]/F[15];for(var N=F[15],L=0;L<3;++L)N+=this.lightPosition[L]*F[4*L+3];for(var L=0;L<3;++L){for(var O=F[12+L],P=0;P<3;++P)O+=F[4*P+L]*this.lightPosition[P];z.lightPosition[L]=O/N}if(this.triangleCount>0){var U=this.triShader;U.bind(),U.uniforms=z,this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(b){b=b||{};for(var p=this.gl,u=b.model||c,y=b.view||c,m=b.projection||c,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)R[0][L]=Math.max(R[0][L],this.clipBounds[0][L]),R[1][L]=Math.min(R[1][L],this.clipBounds[1][L]);this._model=[].slice.call(u),this._view=[].slice.call(y),this._projection=[].slice.call(m),this._resolution=[p.drawingBufferWidth,p.drawingBufferHeight];var z={model:u,view:y,projection:m,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=z,this.triangleCount>0&&(this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(b){if(!b||b.id!==this.pickId)return null;var p=b.value[0]+256*b.value[1]+65536*b.value[2],u=this.cells[p],y=this.positions[u[1]].slice(0,3),m={position:y,dataCoordinate:y,index:Math.floor(u[1]/48)};return this.traceType==="cone"?m.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(m.intensity=this.intensity[u[1]],m.velocity=this.vectors[u[1]].slice(0,3),m.divergence=this.vectors[u[1]][3],m.index=p),m},l.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 A(b,p){var u=o(b,p.meshShader.vertex,p.meshShader.fragment,null,p.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function M(b,p){var u=o(b,p.pickShader.vertex,p.pickShader.fragment,null,p.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function g(b,p,u){var y=u.shaders;arguments.length===1&&(p=b,b=p.gl);var m=A(b,y),R=M(b,y),L=i(b,f(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=b.LINEAR_MIPMAP_LINEAR,L.magFilter=b.LINEAR;var z=a(b),F=a(b),N=a(b),O=a(b),P=a(b),U=n(b,[{buffer:z,type:b.FLOAT,size:4},{buffer:P,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:N,type:b.FLOAT,size:4},{buffer:O,type:b.FLOAT,size:2},{buffer:F,type:b.FLOAT,size:4}]),B=new T(b,L,m,R,z,F,P,N,O,U,u.traceType||"cone");return B.update(p),B}e.exports=g},614:function(e,t,r){var o=r(3236),a=o([`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;
}
`]),n=o([`#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;
}
`]),i=o([`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;
}
`]),s=o([`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);
}`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.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(e,t,r){var o=r(737);e.exports=function(n){return o[n]}},9165:function(e,t,r){"use strict";e.exports=T;var o=r(2762),a=r(8116),n=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,A){this.gl=l,this.shader=A,this.buffer=_,this.vao=w,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 h=s.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(l){var _=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=l.view||i,M=w.projection=l.projection||i;w.model=l.model||i,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var g=A[12],b=A[13],p=A[14],u=A[15],y=l._ortho||!1,m=y?2:1,R=m*this.pixelRatio*(M[3]*g+M[7]*b+M[11]*p+M[15]*u)/_.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)_.lineWidth(this.lineWidth[L]*this.pixelRatio),w.capSize=this.capSize[L]*R,this.lineCount[L]&&_.drawArrays(_.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};function f(l,_){for(var w=0;w<3;++w)l[0][w]=Math.min(l[0][w],_[w]),l[1][w]=Math.max(l[1][w],_[w])}var v=function(){for(var l=new Array(3),_=0;_<3;++_){for(var w=[],A=1;A<=2;++A)for(var M=-1;M<=1;M+=2){var g=(A+_)%3,b=[0,0,0];b[g]=M,w.push(b)}l[_]=w}return l}();function c(l,_,w,A){for(var M=v[A],g=0;g<M.length;++g){var b=M[g];l.push(_[0],_[1],_[2],w[0],w[1],w[2],w[3],b[0],b[1],b[2])}return M.length}h.update=function(l){l=l||{},"lineWidth"in l&&(this.lineWidth=l.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in l&&(this.capSize=l.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in l&&(this.opacity=+l.opacity,this.opacity<1&&(this.hasAlpha=!0));var _=l.color||[[0,0,0],[0,0,0],[0,0,0]],w=l.position,A=l.error;if(Array.isArray(_[0])||(_=[_,_,_]),w&&A){var M=[],g=w.length,b=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var p=0;p<3;++p){this.lineOffset[p]=b;e:for(var u=0;u<g;++u){for(var y=w[u],m=0;m<3;++m)if(isNaN(y[m])||!isFinite(y[m]))continue e;var R=A[u],L=_[p];if(Array.isArray(L[0])&&(L=_[u]),L.length===3?L=[L[0],L[1],L[2],1]:L.length===4&&(L=[L[0],L[1],L[2],L[3]],!this.hasAlpha&&L[3]<1&&(this.hasAlpha=!0)),!(isNaN(R[0][p])||isNaN(R[1][p]))){if(R[0][p]<0){var z=y.slice();z[p]+=R[0][p],M.push(y[0],y[1],y[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),f(this.bounds,z),b+=2+c(M,z,L,p)}if(R[1][p]>0){var z=y.slice();z[p]+=R[1][p],M.push(y[0],y[1],y[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),f(this.bounds,z),b+=2+c(M,z,L,p)}}}this.lineCount[p]=b-this.lineOffset[p]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(l){var _=l.gl,w=o(_),A=a(_,[{buffer:w,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:_.FLOAT,size:3,offset:28,stride:40}]),M=n(_);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var g=new s(_,w,A,M);return g.update(l),g}},3436:function(e,t,r){"use strict";var o=r(3236),a=r(9405),n=o([`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;
}`]),i=o([`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;
}`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){"use strict";var o=r(7766);e.exports=b;var a=null,n,i,s,h;function f(p){var u=p.getParameter(p.FRAMEBUFFER_BINDING),y=p.getParameter(p.RENDERBUFFER_BINDING),m=p.getParameter(p.TEXTURE_BINDING_2D);return[u,y,m]}function v(p,u){p.bindFramebuffer(p.FRAMEBUFFER,u[0]),p.bindRenderbuffer(p.RENDERBUFFER,u[1]),p.bindTexture(p.TEXTURE_2D,u[2])}function c(p,u){var y=p.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(y+1);for(var m=0;m<=y;++m){for(var R=new Array(y),L=0;L<m;++L)R[L]=p.COLOR_ATTACHMENT0+L;for(var L=m;L<y;++L)R[L]=p.NONE;a[m]=R}}function T(p){switch(p){case n:throw new Error("gl-fbo: Framebuffer unsupported");case i:throw new Error("gl-fbo: Framebuffer incomplete attachment");case s:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case h:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function l(p,u,y,m,R,L){if(!m)return null;var z=o(p,u,y,R,m);return z.magFilter=p.NEAREST,z.minFilter=p.NEAREST,z.mipSamples=1,z.bind(),p.framebufferTexture2D(p.FRAMEBUFFER,L,p.TEXTURE_2D,z.handle,0),z}function _(p,u,y,m,R){var L=p.createRenderbuffer();return p.bindRenderbuffer(p.RENDERBUFFER,L),p.renderbufferStorage(p.RENDERBUFFER,m,u,y),p.framebufferRenderbuffer(p.FRAMEBUFFER,R,p.RENDERBUFFER,L),L}function w(p){var u=f(p.gl),y=p.gl,m=p.handle=y.createFramebuffer(),R=p._shape[0],L=p._shape[1],z=p.color.length,F=p._ext,N=p._useStencil,O=p._useDepth,P=p._colorType;y.bindFramebuffer(y.FRAMEBUFFER,m);for(var U=0;U<z;++U)p.color[U]=l(y,R,L,P,y.RGBA,y.COLOR_ATTACHMENT0+U);z===0?(p._color_rb=_(y,R,L,y.RGBA4,y.COLOR_ATTACHMENT0),F&&F.drawBuffersWEBGL(a[0])):z>1&&F.drawBuffersWEBGL(a[z]);var B=y.getExtension("WEBGL_depth_texture");B?N?p.depth=l(y,R,L,B.UNSIGNED_INT_24_8_WEBGL,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O&&(p.depth=l(y,R,L,y.UNSIGNED_SHORT,y.DEPTH_COMPONENT,y.DEPTH_ATTACHMENT)):O&&N?p._depth_rb=_(y,R,L,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O?p._depth_rb=_(y,R,L,y.DEPTH_COMPONENT16,y.DEPTH_ATTACHMENT):N&&(p._depth_rb=_(y,R,L,y.STENCIL_INDEX,y.STENCIL_ATTACHMENT));var X=y.checkFramebufferStatus(y.FRAMEBUFFER);if(X!==y.FRAMEBUFFER_COMPLETE){p._destroyed=!0,y.bindFramebuffer(y.FRAMEBUFFER,null),y.deleteFramebuffer(p.handle),p.handle=null,p.depth&&(p.depth.dispose(),p.depth=null),p._depth_rb&&(y.deleteRenderbuffer(p._depth_rb),p._depth_rb=null);for(var U=0;U<p.color.length;++U)p.color[U].dispose(),p.color[U]=null;p._color_rb&&(y.deleteRenderbuffer(p._color_rb),p._color_rb=null),v(y,u),T(X)}v(y,u)}function A(p,u,y,m,R,L,z,F){this.gl=p,this._shape=[u|0,y|0],this._destroyed=!1,this._ext=F,this.color=new Array(R);for(var N=0;N<R;++N)this.color[N]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=m,this._useDepth=L,this._useStencil=z;var O=this,P=[u|0,y|0];Object.defineProperties(P,{0:{get:function(){return O._shape[0]},set:function(U){return O.width=U}},1:{get:function(){return O._shape[1]},set:function(U){return O.height=U}}}),this._shapeVector=P,w(this)}var M=A.prototype;function g(p,u,y){if(p._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(p._shape[0]===u&&p._shape[1]===y)){var m=p.gl,R=m.getParameter(m.MAX_RENDERBUFFER_SIZE);if(u<0||u>R||y<0||y>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");p._shape[0]=u,p._shape[1]=y;for(var L=f(m),z=0;z<p.color.length;++z)p.color[z].shape=p._shape;p._color_rb&&(m.bindRenderbuffer(m.RENDERBUFFER,p._color_rb),m.renderbufferStorage(m.RENDERBUFFER,m.RGBA4,p._shape[0],p._shape[1])),p.depth&&(p.depth.shape=p._shape),p._depth_rb&&(m.bindRenderbuffer(m.RENDERBUFFER,p._depth_rb),p._useDepth&&p._useStencil?m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_STENCIL,p._shape[0],p._shape[1]):p._useDepth?m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_COMPONENT16,p._shape[0],p._shape[1]):p._useStencil&&m.renderbufferStorage(m.RENDERBUFFER,m.STENCIL_INDEX,p._shape[0],p._shape[1])),m.bindFramebuffer(m.FRAMEBUFFER,p.handle);var F=m.checkFramebufferStatus(m.FRAMEBUFFER);F!==m.FRAMEBUFFER_COMPLETE&&(p.dispose(),v(m,L),T(F)),v(m,L)}}Object.defineProperties(M,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(p){if(Array.isArray(p)||(p=[p|0,p|0]),p.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var u=p[0]|0,y=p[1]|0;return g(this,u,y),[u,y]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(p){return p=p|0,g(this,p,this._shape[1]),p},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(p){return p=p|0,g(this,this._shape[0],p),p},enumerable:!1}}),M.bind=function(){if(!this._destroyed){var p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,this.handle),p.viewport(0,0,this._shape[0],this._shape[1])}},M.dispose=function(){if(!this._destroyed){this._destroyed=!0;var p=this.gl;p.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(p.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var u=0;u<this.color.length;++u)this.color[u].dispose(),this.color[u]=null;this._color_rb&&(p.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function b(p,u,y,m){n||(n=p.FRAMEBUFFER_UNSUPPORTED,i=p.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,s=p.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=p.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var R=p.getExtension("WEBGL_draw_buffers");if(!a&&R&&c(p,R),Array.isArray(u)&&(m=y,y=u[1]|0,u=u[0]|0),typeof u!="number")throw new Error("gl-fbo: Missing shape parameter");var L=p.getParameter(p.MAX_RENDERBUFFER_SIZE);if(u<0||u>L||y<0||y>L)throw new Error("gl-fbo: Parameters are too large for FBO");m=m||{};var z=1;if("color"in m){if(z=Math.max(m.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(R){if(z>p.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=p.UNSIGNED_BYTE,N=p.getExtension("OES_texture_float");if(m.float&&z>0){if(!N)throw new Error("gl-fbo: Context does not support floating point textures");F=p.FLOAT}else m.preferFloat&&z>0&&N&&(F=p.FLOAT);var O=!0;"depth"in m&&(O=!!m.depth);var P=!1;return"stencil"in m&&(P=!!m.stencil),new A(p,u,y,F,z,O,P,R)}},2992:function(e,t,r){var o=r(3387).sprintf,a=r(5171),n=r(1848),i=r(1085);e.exports=s;function s(h,f,v){"use strict";var c=n(f)||"of unknown name (see npm glsl-shader-name)",T="unknown type";v!==void 0&&(T=v===a.FRAGMENT_SHADER?"fragment":"vertex");for(var l=o(`Error compiling %s shader %s:
`,T,c),_=o("%s%s",l,h),w=h.split(`
`),A={},M=0;M<w.length;M++){var g=w[M];if(!(g===""||g==="\0")){var b=parseInt(g.split(":")[2]);if(isNaN(b))throw new Error(o("Could not parse error: %s",g));A[b]=g}}for(var p=i(f).split(`
`),M=0;M<p.length;M++)if(!(!A[M+3]&&!A[M+2]&&!A[M+1])){var u=p[M];if(l+=u+`
`,A[M+1]){var y=A[M+1];y=y.substr(y.split(":",3).join(":").length+1).trim(),l+=o(`^^^ %s
`,y)}}return{long:l.trim(),short:_.trim()}}},7319:function(e,t,r){var o=r(3236),a=r(9405),n=o([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;
uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;
varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;
vec4 project(vec3 p) {
return projection * (view * (model * vec4(p, 1.0)));
}
void main() {
vec4 startPoint = project(position);
vec4 endPoint = project(nextPosition);
vec2 A = startPoint.xy / startPoint.w;
vec2 B = endPoint.xy / endPoint.w;
float clipAngle = atan(
(B.y - A.y) * screenShape.y,
(B.x - A.x) * screenShape.x
);
vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
sin(clipAngle),
-cos(clipAngle)
) / screenShape;
gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);
worldPosition = position;
pixelArcLength = arcLength;
fragColor = color;
}
`]),i=o([`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 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;
}
`]),s=o([`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);
}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(f){return a(f,n,i,null,h)},t.createPickShader=function(f){return a(f,n,s,null,h)}},5714:function(e,t,r){"use strict";e.exports=p;var o=r(2762),a=r(8116),n=r(7766),i=new Uint8Array(4),s=new Float32Array(i.buffer);function h(u,y,m,R){return i[0]=R,i[1]=m,i[2]=y,i[3]=u,s[0]}var f=r(2478),v=r(9618),c=r(7319),T=c.createShader,l=c.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(u,y){for(var m=0,R=0;R<3;++R){var L=u[R]-y[R];m+=L*L}return Math.sqrt(m)}function A(u){for(var y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],m=0;m<3;++m)y[0][m]=Math.max(u[0][m],y[0][m]),y[1][m]=Math.min(u[1][m],y[1][m]);return y}function M(u,y,m,R){this.arcLength=u,this.position=y,this.index=m,this.dataCoordinate=R}function g(u,y,m,R,L,z){this.gl=u,this.shader=y,this.pickShader=m,this.buffer=R,this.vao=L,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=z,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=g.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(u){this.pickId=u},b.drawTransparent=b.draw=function(u){if(this.vertexCount){var y=this.gl,m=this.shader,R=this.vao;m.bind(),m.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[y.drawingBufferWidth,y.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(y.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.drawPick=function(u){if(this.vertexCount){var y=this.gl,m=this.pickShader,R=this.vao;m.bind(),m.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[y.drawingBufferWidth,y.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(y.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.update=function(u){var y,m;this.dirty=!0;var R=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var L=[],z=[],F=[],N=0,O=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],U=u.position||u.positions;if(U){var B=u.color||u.colors||[0,0,0,1],X=u.lineWidth||1,$=!1;e:for(y=1;y<U.length;++y){var le=U[y-1],ce=U[y];for(z.push(N),F.push(le.slice()),m=0;m<3;++m){if(isNaN(le[m])||isNaN(ce[m])||!isFinite(le[m])||!isFinite(ce[m])){if(!R&&L.length>0){for(var de=0;de<24;++de)L.push(L[L.length-12]);O+=2,$=!0}continue e}P[0][m]=Math.min(P[0][m],le[m],ce[m]),P[1][m]=Math.max(P[1][m],le[m],ce[m])}var G,Y;Array.isArray(B[0])?(G=B.length>y-1?B[y-1]:B.length>0?B[B.length-1]:[0,0,0,1],Y=B.length>y?B[y]:B.length>0?B[B.length-1]:[0,0,0,1]):G=Y=B,G.length===3&&(G=[G[0],G[1],G[2],1]),Y.length===3&&(Y=[Y[0],Y[1],Y[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var ee;Array.isArray(X)?ee=X.length>y-1?X[y-1]:X.length>0?X[X.length-1]:[0,0,0,1]:ee=X;var q=N;if(N+=w(le,ce),$){for(m=0;m<2;++m)L.push(le[0],le[1],le[2],ce[0],ce[1],ce[2],q,ee,G[0],G[1],G[2],G[3]);O+=2,$=!1}L.push(le[0],le[1],le[2],ce[0],ce[1],ce[2],q,ee,G[0],G[1],G[2],G[3],le[0],le[1],le[2],ce[0],ce[1],ce[2],q,-ee,G[0],G[1],G[2],G[3],ce[0],ce[1],ce[2],le[0],le[1],le[2],N,-ee,Y[0],Y[1],Y[2],Y[3],ce[0],ce[1],ce[2],le[0],le[1],le[2],N,ee,Y[0],Y[1],Y[2],Y[3]),O+=4}}if(this.buffer.update(L),z.push(N),F.push(U[U.length-1].slice()),this.bounds=P,this.vertexCount=O,this.points=F,this.arcLength=z,"dashes"in u){var se=u.dashes,ae=se.slice();for(ae.unshift(0),y=1;y<ae.length;++y)ae[y]=ae[y-1]+ae[y];var j=v(new Array(256*4),[256,1,4]);for(y=0;y<256;++y){for(m=0;m<4;++m)j.set(y,0,m,0);f.le(ae,ae[ae.length-1]*y/255)&1?j.set(y,0,0,0):j.set(y,0,0,255)}this.texture.setPixels(j)}},b.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},b.pick=function(u){if(!u||u.id!==this.pickId)return null;var y=h(u.value[0],u.value[1],u.value[2],0),m=f.le(this.arcLength,y);if(m<0)return null;if(m===this.arcLength.length-1)return new M(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),m);for(var R=this.points[m],L=this.points[Math.min(m+1,this.points.length-1)],z=(y-this.arcLength[m])/(this.arcLength[m+1]-this.arcLength[m]),F=1-z,N=[0,0,0],O=0;O<3;++O)N[O]=F*R[O]+z*L[O];var P=Math.min(z<.5?m:m+1,this.points.length-1);return new M(y,N,P,this.points[P])};function p(u){var y=u.gl||u.scene&&u.scene.gl,m=T(y);m.attributes.position.location=0,m.attributes.nextPosition.location=1,m.attributes.arcLength.location=2,m.attributes.lineWidth.location=3,m.attributes.color.location=4;var R=l(y);R.attributes.position.location=0,R.attributes.nextPosition.location=1,R.attributes.arcLength.location=2,R.attributes.lineWidth.location=3,R.attributes.color.location=4;for(var L=o(y),z=a(y,[{buffer:L,size:3,offset:0,stride:48},{buffer:L,size:3,offset:12,stride:48},{buffer:L,size:1,offset:24,stride:48},{buffer:L,size:1,offset:28,stride:48},{buffer:L,size:4,offset:32,stride:48}]),F=v(new Array(256*4),[256,1,4]),N=0;N<1024;++N)F.data[N]=255;var O=n(y,F);O.wrap=y.REPEAT;var P=new g(y,m,R,L,z,O);return P.update(u),P}},1903:function(e){e.exports=t;function t(r){var o=new Float32Array(16);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=r[4],o[5]=r[5],o[6]=r[6],o[7]=r[7],o[8]=r[8],o[9]=r[9],o[10]=r[10],o[11]=r[11],o[12]=r[12],o[13]=r[13],o[14]=r[14],o[15]=r[15],o}},6864:function(e){e.exports=t;function t(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},9921:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2],i=r[3],s=r[4],h=r[5],f=r[6],v=r[7],c=r[8],T=r[9],l=r[10],_=r[11],w=r[12],A=r[13],M=r[14],g=r[15],b=o*h-a*s,p=o*f-n*s,u=o*v-i*s,y=a*f-n*h,m=a*v-i*h,R=n*v-i*f,L=c*A-T*w,z=c*M-l*w,F=c*g-_*w,N=T*M-l*A,O=T*g-_*A,P=l*g-_*M;return b*P-p*O+u*N+y*F-m*z+R*L}},7399:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=o[3],h=a+a,f=n+n,v=i+i,c=a*h,T=n*h,l=n*f,_=i*h,w=i*f,A=i*v,M=s*h,g=s*f,b=s*v;return r[0]=1-l-A,r[1]=T+b,r[2]=_-g,r[3]=0,r[4]=T-b,r[5]=1-c-A,r[6]=w+M,r[7]=0,r[8]=_+g,r[9]=w-M,r[10]=1-c-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6743:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],f=n+n,v=i+i,c=s+s,T=n*f,l=n*v,_=n*c,w=i*v,A=i*c,M=s*c,g=h*f,b=h*v,p=h*c;return r[0]=1-(w+M),r[1]=l+p,r[2]=_-b,r[3]=0,r[4]=l-p,r[5]=1-(T+M),r[6]=A+g,r[7]=0,r[8]=_+b,r[9]=A-g,r[10]=1-(T+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},7894:function(e){e.exports=t;function t(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7608:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=o[3],h=o[4],f=o[5],v=o[6],c=o[7],T=o[8],l=o[9],_=o[10],w=o[11],A=o[12],M=o[13],g=o[14],b=o[15],p=a*f-n*h,u=a*v-i*h,y=a*c-s*h,m=n*v-i*f,R=n*c-s*f,L=i*c-s*v,z=T*M-l*A,F=T*g-_*A,N=T*b-w*A,O=l*g-_*M,P=l*b-w*M,U=_*b-w*g,B=p*U-u*P+y*O+m*N-R*F+L*z;return B?(B=1/B,r[0]=(f*U-v*P+c*O)*B,r[1]=(i*P-n*U-s*O)*B,r[2]=(M*L-g*R+b*m)*B,r[3]=(_*R-l*L-w*m)*B,r[4]=(v*N-h*U-c*F)*B,r[5]=(a*U-i*N+s*F)*B,r[6]=(g*y-A*L-b*u)*B,r[7]=(T*L-_*y+w*u)*B,r[8]=(h*P-f*N+c*z)*B,r[9]=(n*N-a*P-s*z)*B,r[10]=(A*R-M*y+b*p)*B,r[11]=(l*y-T*R-w*p)*B,r[12]=(f*F-h*O-v*z)*B,r[13]=(a*O-n*F+i*z)*B,r[14]=(M*u-A*m-g*p)*B,r[15]=(T*m-l*u+_*p)*B,r):null}},6582:function(e,t,r){var o=r(7894);e.exports=a;function a(n,i,s,h){var f,v,c,T,l,_,w,A,M,g,b=i[0],p=i[1],u=i[2],y=h[0],m=h[1],R=h[2],L=s[0],z=s[1],F=s[2];return Math.abs(b-L)<1e-6&&Math.abs(p-z)<1e-6&&Math.abs(u-F)<1e-6?o(n):(w=b-L,A=p-z,M=u-F,g=1/Math.sqrt(w*w+A*A+M*M),w*=g,A*=g,M*=g,f=m*M-R*A,v=R*w-y*M,c=y*A-m*w,g=Math.sqrt(f*f+v*v+c*c),g?(g=1/g,f*=g,v*=g,c*=g):(f=0,v=0,c=0),T=A*c-M*v,l=M*f-w*c,_=w*v-A*f,g=Math.sqrt(T*T+l*l+_*_),g?(g=1/g,T*=g,l*=g,_*=g):(T=0,l=0,_=0),n[0]=f,n[1]=T,n[2]=w,n[3]=0,n[4]=v,n[5]=l,n[6]=A,n[7]=0,n[8]=c,n[9]=_,n[10]=M,n[11]=0,n[12]=-(f*b+v*p+c*u),n[13]=-(T*b+l*p+_*u),n[14]=-(w*b+A*p+M*u),n[15]=1,n)}},6760:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],f=o[4],v=o[5],c=o[6],T=o[7],l=o[8],_=o[9],w=o[10],A=o[11],M=o[12],g=o[13],b=o[14],p=o[15],u=a[0],y=a[1],m=a[2],R=a[3];return r[0]=u*n+y*f+m*l+R*M,r[1]=u*i+y*v+m*_+R*g,r[2]=u*s+y*c+m*w+R*b,r[3]=u*h+y*T+m*A+R*p,u=a[4],y=a[5],m=a[6],R=a[7],r[4]=u*n+y*f+m*l+R*M,r[5]=u*i+y*v+m*_+R*g,r[6]=u*s+y*c+m*w+R*b,r[7]=u*h+y*T+m*A+R*p,u=a[8],y=a[9],m=a[10],R=a[11],r[8]=u*n+y*f+m*l+R*M,r[9]=u*i+y*v+m*_+R*g,r[10]=u*s+y*c+m*w+R*b,r[11]=u*h+y*T+m*A+R*p,u=a[12],y=a[13],m=a[14],R=a[15],r[12]=u*n+y*f+m*l+R*M,r[13]=u*i+y*v+m*_+R*g,r[14]=u*s+y*c+m*w+R*b,r[15]=u*h+y*T+m*A+R*p,r}},4040:function(e){e.exports=t;function t(r,o,a,n,i,s,h){var f=1/(o-a),v=1/(n-i),c=1/(s-h);return r[0]=-2*f,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*v,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*c,r[11]=0,r[12]=(o+a)*f,r[13]=(i+n)*v,r[14]=(h+s)*c,r[15]=1,r}},4772:function(e){e.exports=t;function t(r,o,a,n,i){var s=1/Math.tan(o/2),h=1/(n-i);return r[0]=s/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*h,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*h,r[15]=0,r}},6079:function(e){e.exports=t;function t(r,o,a,n){var i=n[0],s=n[1],h=n[2],f=Math.sqrt(i*i+s*s+h*h),v,c,T,l,_,w,A,M,g,b,p,u,y,m,R,L,z,F,N,O,P,U,B,X;return Math.abs(f)<1e-6?null:(f=1/f,i*=f,s*=f,h*=f,v=Math.sin(a),c=Math.cos(a),T=1-c,l=o[0],_=o[1],w=o[2],A=o[3],M=o[4],g=o[5],b=o[6],p=o[7],u=o[8],y=o[9],m=o[10],R=o[11],L=i*i*T+c,z=s*i*T+h*v,F=h*i*T-s*v,N=i*s*T-h*v,O=s*s*T+c,P=h*s*T+i*v,U=i*h*T+s*v,B=s*h*T-i*v,X=h*h*T+c,r[0]=l*L+M*z+u*F,r[1]=_*L+g*z+y*F,r[2]=w*L+b*z+m*F,r[3]=A*L+p*z+R*F,r[4]=l*N+M*O+u*P,r[5]=_*N+g*O+y*P,r[6]=w*N+b*O+m*P,r[7]=A*N+p*O+R*P,r[8]=l*U+M*B+u*X,r[9]=_*U+g*B+y*X,r[10]=w*U+b*B+m*X,r[11]=A*U+p*B+R*X,o!==r&&(r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r)}},5567:function(e){e.exports=t;function t(r,o,a){var n=Math.sin(a),i=Math.cos(a),s=o[4],h=o[5],f=o[6],v=o[7],c=o[8],T=o[9],l=o[10],_=o[11];return o!==r&&(r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[4]=s*i+c*n,r[5]=h*i+T*n,r[6]=f*i+l*n,r[7]=v*i+_*n,r[8]=c*i-s*n,r[9]=T*i-h*n,r[10]=l*i-f*n,r[11]=_*i-v*n,r}},2408:function(e){e.exports=t;function t(r,o,a){var n=Math.sin(a),i=Math.cos(a),s=o[0],h=o[1],f=o[2],v=o[3],c=o[8],T=o[9],l=o[10],_=o[11];return o!==r&&(r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=s*i-c*n,r[1]=h*i-T*n,r[2]=f*i-l*n,r[3]=v*i-_*n,r[8]=s*n+c*i,r[9]=h*n+T*i,r[10]=f*n+l*i,r[11]=v*n+_*i,r}},7089:function(e){e.exports=t;function t(r,o,a){var n=Math.sin(a),i=Math.cos(a),s=o[0],h=o[1],f=o[2],v=o[3],c=o[4],T=o[5],l=o[6],_=o[7];return o!==r&&(r[8]=o[8],r[9]=o[9],r[10]=o[10],r[11]=o[11],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=s*i+c*n,r[1]=h*i+T*n,r[2]=f*i+l*n,r[3]=v*i+_*n,r[4]=c*i-s*n,r[5]=T*i-h*n,r[6]=l*i-f*n,r[7]=_*i-v*n,r}},2504:function(e){e.exports=t;function t(r,o,a){var n=a[0],i=a[1],s=a[2];return r[0]=o[0]*n,r[1]=o[1]*n,r[2]=o[2]*n,r[3]=o[3]*n,r[4]=o[4]*i,r[5]=o[5]*i,r[6]=o[6]*i,r[7]=o[7]*i,r[8]=o[8]*s,r[9]=o[9]*s,r[10]=o[10]*s,r[11]=o[11]*s,r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15],r}},7656:function(e){e.exports=t;function t(r,o,a){var n=a[0],i=a[1],s=a[2],h,f,v,c,T,l,_,w,A,M,g,b;return o===r?(r[12]=o[0]*n+o[4]*i+o[8]*s+o[12],r[13]=o[1]*n+o[5]*i+o[9]*s+o[13],r[14]=o[2]*n+o[6]*i+o[10]*s+o[14],r[15]=o[3]*n+o[7]*i+o[11]*s+o[15]):(h=o[0],f=o[1],v=o[2],c=o[3],T=o[4],l=o[5],_=o[6],w=o[7],A=o[8],M=o[9],g=o[10],b=o[11],r[0]=h,r[1]=f,r[2]=v,r[3]=c,r[4]=T,r[5]=l,r[6]=_,r[7]=w,r[8]=A,r[9]=M,r[10]=g,r[11]=b,r[12]=h*n+T*i+A*s+o[12],r[13]=f*n+l*i+M*s+o[13],r[14]=v*n+_*i+g*s+o[14],r[15]=c*n+w*i+b*s+o[15]),r}},5665:function(e){e.exports=t;function t(r,o){if(r===o){var a=o[1],n=o[2],i=o[3],s=o[6],h=o[7],f=o[11];r[1]=o[4],r[2]=o[8],r[3]=o[12],r[4]=a,r[6]=o[9],r[7]=o[13],r[8]=n,r[9]=s,r[11]=o[14],r[12]=i,r[13]=h,r[14]=f}else r[0]=o[0],r[1]=o[4],r[2]=o[8],r[3]=o[12],r[4]=o[1],r[5]=o[5],r[6]=o[9],r[7]=o[13],r[8]=o[2],r[9]=o[6],r[10]=o[10],r[11]=o[14],r[12]=o[3],r[13]=o[7],r[14]=o[11],r[15]=o[15];return r}},7626:function(e,t,r){"use strict";var o=r(2642),a=r(9346);e.exports=f;function n(v,c){for(var T=[0,0,0,0],l=0;l<4;++l)for(var _=0;_<4;++_)T[_]+=v[4*l+_]*c[l];return T}function i(v,c,T,l,_){for(var w=n(l,n(T,n(c,[v[0],v[1],v[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*_[0]*(1+w[0]),.5*_[1]*(1-w[1])]}function s(v,c){if(v.length===2){for(var T=0,l=0,_=0;_<2;++_)T+=Math.pow(c[_]-v[0][_],2),l+=Math.pow(c[_]-v[1][_],2);return T=Math.sqrt(T),l=Math.sqrt(l),T+l<1e-6?[1,0]:[l/(T+l),T/(l+T)]}else if(v.length===3){var w=[0,0];return a(v[0],v[1],v[2],c,w),o(v,w)}return[]}function h(v,c){for(var T=[0,0,0],l=0;l<v.length;++l)for(var _=v[l],w=c[l],A=0;A<3;++A)T[A]+=w*_[A];return T}function f(v,c,T,l,_,w){if(v.length===1)return[0,v[0].slice()];for(var A=new Array(v.length),M=0;M<v.length;++M)A[M]=i(v[M],T,l,_,w);for(var g=0,b=1/0,M=0;M<A.length;++M){for(var p=0,u=0;u<2;++u)p+=Math.pow(A[M][u]-c[u],2);p<b&&(b=p,g=M)}for(var y=s(A,c),m=0,M=0;M<3;++M){if(y[M]<-.001||y[M]>1.0001)return null;m+=y[M]}return Math.abs(m-1)>.001?null:[g,h(v,y),y]}},840:function(e,t,r){var o=r(3236),a=o([`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;
}
`]),n=o([`#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;
}
`]),i=o([`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;
}`]),s=o([`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;
}`]),h=o([`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;
}`]),f=o([`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;
}`]),v=o([`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;
}`]),c=o([`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);
}`]),T=o([`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;
}`]),l=o([`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)));
}`]),_=o([`precision highp float;
#define GLSLIFY 1
uniform vec3 contourColor;
void main() {
gl_FragColor = vec4(contourColor, 1.0);
}
`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:v,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:T,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:l,fragment:_,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){"use strict";var o=1e-6,a=1e-6,n=r(9405),i=r(2762),s=r(8116),h=r(7766),f=r(8406),v=r(6760),c=r(7608),T=r(9618),l=r(6729),_=r(7765),w=r(1888),A=r(840),M=r(7626),g=A.meshShader,b=A.wireShader,p=A.pointShader,u=A.pickShader,y=A.pointPickShader,m=A.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(de,G,Y,ee,q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We,at,nt,tt,qe,he,ue,ne,Ce,Ye,rt,Ke){this.gl=de,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=Y,this.lineShader=ee,this.pointShader=q,this.pickShader=se,this.pointPickShader=ae,this.contourShader=j,this.trianglePositions=Q,this.triangleColors=pe,this.triangleNormals=Se,this.triangleUVs=we,this.triangleIds=re,this.triangleVAO=Ie,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Re,this.edgeColors=at,this.edgeUVs=nt,this.edgeIds=We,this.edgeVAO=tt,this.edgeCount=0,this.pointPositions=qe,this.pointColors=ue,this.pointUVs=ne,this.pointSizes=Ce,this.pointIds=he,this.pointVAO=Ye,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=rt,this.contourVAO=Ke,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var z=L.prototype;z.isOpaque=function(){return!this.hasAlpha},z.isTransparent=function(){return this.hasAlpha},z.pickSlots=1,z.setPickBase=function(de){this.pickId=de};function F(de,G){if(!G||!G.length)return 1;for(var Y=0;Y<G.length;++Y){if(G.length<2)return 1;if(G[Y][0]===de)return G[Y][1];if(G[Y][0]>de&&Y>0){var ee=(G[Y][0]-de)/(G[Y][0]-G[Y-1][0]);return G[Y][1]*(1-ee)+ee*G[Y-1][1]}}return 1}function N(de,G){for(var Y=l({colormap:de,nshades:256,format:"rgba"}),ee=new Uint8Array(256*4),q=0;q<256;++q){for(var se=Y[q],ae=0;ae<3;++ae)ee[4*q+ae]=se[ae];G?ee[4*q+3]=255*F(q/255,G):ee[4*q+3]=255*se[3]}return T(ee,[256,256,4],[4,0,1])}function O(de){for(var G=de.length,Y=new Array(G),ee=0;ee<G;++ee)Y[ee]=de[ee][2];return Y}z.highlight=function(de){if(!de||!this.contourEnable){this.contourCount=0;return}for(var G=_(this.cells,this.intensity,de.intensity),Y=G.cells,ee=G.vertexIds,q=G.vertexWeights,se=Y.length,ae=w.mallocFloat32(2*3*se),j=0,Q=0;Q<se;++Q)for(var re=Y[Q],pe=0;pe<2;++pe){var we=re[0];re.length===2&&(we=re[pe]);for(var Se=ee[we][0],Ie=ee[we][1],Re=q[we],We=1-Re,at=this.positions[Se],nt=this.positions[Ie],tt=0;tt<3;++tt)ae[j++]=Re*at[tt]+We*nt[tt]}this.contourCount=j/3|0,this.contourPositions.update(ae.subarray(0,j)),w.free(ae)},z.update=function(de){de=de||{};var G=this.gl;this.dirty=!0,"contourEnable"in de&&(this.contourEnable=de.contourEnable),"contourColor"in de&&(this.contourColor=de.contourColor),"lineWidth"in de&&(this.lineWidth=de.lineWidth),"lightPosition"in de&&(this.lightPosition=de.lightPosition),this.hasAlpha=!1,"opacity"in de&&(this.opacity=de.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in de&&(this.opacityscale=de.opacityscale,this.hasAlpha=!0),"ambient"in de&&(this.ambientLight=de.ambient),"diffuse"in de&&(this.diffuseLight=de.diffuse),"specular"in de&&(this.specularLight=de.specular),"roughness"in de&&(this.roughness=de.roughness),"fresnel"in de&&(this.fresnel=de.fresnel),de.texture?(this.texture.dispose(),this.texture=h(G,de.texture)):de.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=G.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=G.LINEAR,this.texture.setPixels(N(de.colormap,this.opacityscale)),this.texture.generateMipmap());var Y=de.cells,ee=de.positions;if(!(!ee||!Y)){var q=[],se=[],ae=[],j=[],Q=[],re=[],pe=[],we=[],Se=[],Ie=[],Re=[],We=[],at=[],nt=[];this.cells=Y,this.positions=ee;var tt=de.vertexNormals,qe=de.cellNormals,he=de.vertexNormalsEpsilon===void 0?o:de.vertexNormalsEpsilon,ue=de.faceNormalsEpsilon===void 0?a:de.faceNormalsEpsilon;de.useFacetNormals&&!qe&&(qe=f.faceNormals(Y,ee,ue)),!qe&&!tt&&(tt=f.vertexNormals(Y,ee,he));var ne=de.vertexColors,Ce=de.cellColors,Ye=de.meshColor||[1,1,1,1],rt=de.vertexUVs,Ke=de.vertexIntensity,Mt=de.cellUVs,kt=de.cellIntensity,Nt=1/0,Gt=-1/0;if(!rt&&!Mt)if(Ke)if(de.vertexIntensityBounds)Nt=+de.vertexIntensityBounds[0],Gt=+de.vertexIntensityBounds[1];else for(var Mr=0;Mr<Ke.length;++Mr){var mr=Ke[Mr];Nt=Math.min(Nt,mr),Gt=Math.max(Gt,mr)}else if(kt)if(de.cellIntensityBounds)Nt=+de.cellIntensityBounds[0],Gt=+de.cellIntensityBounds[1];else for(var Mr=0;Mr<kt.length;++Mr){var mr=kt[Mr];Nt=Math.min(Nt,mr),Gt=Math.max(Gt,mr)}else for(var Mr=0;Mr<ee.length;++Mr){var mr=ee[Mr][2];Nt=Math.min(Nt,mr),Gt=Math.max(Gt,mr)}Ke?this.intensity=Ke:kt?this.intensity=kt:this.intensity=O(ee),this.pickVertex=!(kt||Ce);var qr=de.pointSizes,Er=de.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Mr=0;Mr<ee.length;++Mr)for(var Ir=ee[Mr],_t=0;_t<3;++_t)isNaN(Ir[_t])||!isFinite(Ir[_t])||(this.bounds[0][_t]=Math.min(this.bounds[0][_t],Ir[_t]),this.bounds[1][_t]=Math.max(this.bounds[1][_t],Ir[_t]));var Oe=0,Je=0,Ae=0;e:for(var Mr=0;Mr<Y.length;++Mr){var Le=Y[Mr];switch(Le.length){case 1:for(var Ue=Le[0],Ir=ee[Ue],_t=0;_t<3;++_t)if(isNaN(Ir[_t])||!isFinite(Ir[_t]))continue e;Ie.push(Ir[0],Ir[1],Ir[2]);var Ze;ne?Ze=ne[Ue]:Ce?Ze=Ce[Mr]:Ze=Ye,this.opacityscale&&Ke?se.push(Ze[0],Ze[1],Ze[2],this.opacity*F((Ke[Ue]-Nt)/(Gt-Nt),this.opacityscale)):Ze.length===3?Re.push(Ze[0],Ze[1],Ze[2],this.opacity):(Re.push(Ze[0],Ze[1],Ze[2],Ze[3]*this.opacity),Ze[3]<1&&(this.hasAlpha=!0));var st;rt?st=rt[Ue]:Ke?st=[(Ke[Ue]-Nt)/(Gt-Nt),0]:Mt?st=Mt[Mr]:kt?st=[(kt[Mr]-Nt)/(Gt-Nt),0]:st=[(Ir[2]-Nt)/(Gt-Nt),0],We.push(st[0],st[1]),qr?at.push(qr[Ue]):at.push(Er),nt.push(Mr),Ae+=1;break;case 2:for(var _t=0;_t<2;++_t)for(var Ue=Le[_t],Ir=ee[Ue],ut=0;ut<3;++ut)if(isNaN(Ir[ut])||!isFinite(Ir[ut]))continue e;for(var _t=0;_t<2;++_t){var Ue=Le[_t],Ir=ee[Ue];re.push(Ir[0],Ir[1],Ir[2]);var Ze;ne?Ze=ne[Ue]:Ce?Ze=Ce[Mr]:Ze=Ye,this.opacityscale&&Ke?se.push(Ze[0],Ze[1],Ze[2],this.opacity*F((Ke[Ue]-Nt)/(Gt-Nt),this.opacityscale)):Ze.length===3?pe.push(Ze[0],Ze[1],Ze[2],this.opacity):(pe.push(Ze[0],Ze[1],Ze[2],Ze[3]*this.opacity),Ze[3]<1&&(this.hasAlpha=!0));var st;rt?st=rt[Ue]:Ke?st=[(Ke[Ue]-Nt)/(Gt-Nt),0]:Mt?st=Mt[Mr]:kt?st=[(kt[Mr]-Nt)/(Gt-Nt),0]:st=[(Ir[2]-Nt)/(Gt-Nt),0],we.push(st[0],st[1]),Se.push(Mr)}Je+=1;break;case 3:for(var _t=0;_t<3;++_t)for(var Ue=Le[_t],Ir=ee[Ue],ut=0;ut<3;++ut)if(isNaN(Ir[ut])||!isFinite(Ir[ut]))continue e;for(var _t=0;_t<3;++_t){var Ue=Le[2-_t],Ir=ee[Ue];q.push(Ir[0],Ir[1],Ir[2]);var Ze;ne?Ze=ne[Ue]:Ce?Ze=Ce[Mr]:Ze=Ye,Ze?this.opacityscale&&Ke?se.push(Ze[0],Ze[1],Ze[2],this.opacity*F((Ke[Ue]-Nt)/(Gt-Nt),this.opacityscale)):Ze.length===3?se.push(Ze[0],Ze[1],Ze[2],this.opacity):(se.push(Ze[0],Ze[1],Ze[2],Ze[3]*this.opacity),Ze[3]<1&&(this.hasAlpha=!0)):se.push(.5,.5,.5,1);var st;rt?st=rt[Ue]:Ke?st=[(Ke[Ue]-Nt)/(Gt-Nt),0]:Mt?st=Mt[Mr]:kt?st=[(kt[Mr]-Nt)/(Gt-Nt),0]:st=[(Ir[2]-Nt)/(Gt-Nt),0],j.push(st[0],st[1]);var Ut;tt?Ut=tt[Ue]:Ut=qe[Mr],ae.push(Ut[0],Ut[1],Ut[2]),Q.push(Mr)}Oe+=1;break;default:break}}this.pointCount=Ae,this.edgeCount=Je,this.triangleCount=Oe,this.pointPositions.update(Ie),this.pointColors.update(Re),this.pointUVs.update(We),this.pointSizes.update(at),this.pointIds.update(new Uint32Array(nt)),this.edgePositions.update(re),this.edgeColors.update(pe),this.edgeUVs.update(we),this.edgeIds.update(new Uint32Array(Se)),this.trianglePositions.update(q),this.triangleColors.update(se),this.triangleUVs.update(j),this.triangleNormals.update(ae),this.triangleIds.update(new Uint32Array(Q))}},z.drawTransparent=z.draw=function(de){de=de||{};for(var G=this.gl,Y=de.model||R,ee=de.view||R,q=de.projection||R,se=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)se[0][ae]=Math.max(se[0][ae],this.clipBounds[0][ae]),se[1][ae]=Math.min(se[1][ae],this.clipBounds[1][ae]);var j={model:Y,view:ee,projection:q,inverseModel:R.slice(),clipBounds:se,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};j.inverseModel=c(j.inverseModel,j.model),G.disable(G.CULL_FACE),this.texture.bind(0);var Q=new Array(16);v(Q,j.view,j.model),v(Q,j.projection,Q),c(Q,Q);for(var ae=0;ae<3;++ae)j.eyePosition[ae]=Q[12+ae]/Q[15];for(var re=Q[15],ae=0;ae<3;++ae)re+=this.lightPosition[ae]*Q[4*ae+3];for(var ae=0;ae<3;++ae){for(var pe=Q[12+ae],we=0;we<3;++we)pe+=Q[4*we+ae]*this.lightPosition[we];j.lightPosition[ae]=pe/re}if(this.triangleCount>0){var Se=this.triShader;Se.bind(),Se.uniforms=j,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Se=this.lineShader;Se.bind(),Se.uniforms=j,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Se=this.pointShader;Se.bind(),Se.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Se=this.contourShader;Se.bind(),Se.uniforms=j,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(de){de=de||{};for(var G=this.gl,Y=de.model||R,ee=de.view||R,q=de.projection||R,se=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)se[0][ae]=Math.max(se[0][ae],this.clipBounds[0][ae]),se[1][ae]=Math.min(se[1][ae],this.clipBounds[1][ae]);this._model=[].slice.call(Y),this._view=[].slice.call(ee),this._projection=[].slice.call(q),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var j={model:Y,view:ee,projection:q,clipBounds:se,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(de){if(!de||de.id!==this.pickId)return null;for(var G=de.value[0]+256*de.value[1]+65536*de.value[2],Y=this.cells[G],ee=this.positions,q=new Array(Y.length),se=0;se<Y.length;++se)q[se]=ee[Y[se]];var ae=de.coord[0],j=de.coord[1];if(!this.pickVertex){var Q=this.positions[Y[0]],re=this.positions[Y[1]],pe=this.positions[Y[2]],we=[(Q[0]+re[0]+pe[0])/3,(Q[1]+re[1]+pe[1])/3,(Q[2]+re[2]+pe[2])/3];return{_cellCenter:!0,position:[ae,j],index:G,cell:Y,cellId:G,intensity:this.intensity[G],dataCoordinate:we}}var Se=M(q,[ae*this.pixelRatio,this._resolution[1]-j*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Se)return null;for(var Ie=Se[2],Re=0,se=0;se<Y.length;++se)Re+=Ie[se]*this.intensity[Y[se]];return{position:Se[1],index:Y[Se[0]],cell:Y,cellId:G,intensity:Re,dataCoordinate:this.positions[Y[Se[0]]]}},z.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 P(de){var G=n(de,g.vertex,g.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.normal.location=4,G}function U(de){var G=n(de,b.vertex,b.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G}function B(de){var G=n(de,p.vertex,p.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.pointSize.location=4,G}function X(de){var G=n(de,u.vertex,u.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G}function $(de){var G=n(de,y.vertex,y.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G.attributes.pointSize.location=4,G}function le(de){var G=n(de,m.vertex,m.fragment);return G.attributes.position.location=0,G}function ce(de,G){arguments.length===1&&(G=de,de=G.gl);var Y=de.getExtension("OES_standard_derivatives")||de.getExtension("MOZ_OES_standard_derivatives")||de.getExtension("WEBKIT_OES_standard_derivatives");if(!Y)throw new Error("derivatives not supported");var ee=P(de),q=U(de),se=B(de),ae=X(de),j=$(de),Q=le(de),re=h(de,T(new Uint8Array([255,255,255,255]),[1,1,4]));re.generateMipmap(),re.minFilter=de.LINEAR_MIPMAP_LINEAR,re.magFilter=de.LINEAR;var pe=i(de),we=i(de),Se=i(de),Ie=i(de),Re=i(de),We=s(de,[{buffer:pe,type:de.FLOAT,size:3},{buffer:Re,type:de.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:we,type:de.FLOAT,size:4},{buffer:Se,type:de.FLOAT,size:2},{buffer:Ie,type:de.FLOAT,size:3}]),at=i(de),nt=i(de),tt=i(de),qe=i(de),he=s(de,[{buffer:at,type:de.FLOAT,size:3},{buffer:qe,type:de.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:nt,type:de.FLOAT,size:4},{buffer:tt,type:de.FLOAT,size:2}]),ue=i(de),ne=i(de),Ce=i(de),Ye=i(de),rt=i(de),Ke=s(de,[{buffer:ue,type:de.FLOAT,size:3},{buffer:rt,type:de.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ne,type:de.FLOAT,size:4},{buffer:Ce,type:de.FLOAT,size:2},{buffer:Ye,type:de.FLOAT,size:1}]),Mt=i(de),kt=s(de,[{buffer:Mt,type:de.FLOAT,size:3}]),Nt=new L(de,re,ee,q,se,ae,j,Q,pe,Re,we,Se,Ie,We,at,qe,nt,tt,he,ue,rt,ne,Ce,Ye,Ke,Mt,kt);return Nt.update(G),Nt}e.exports=ce},4437:function(e,t,r){"use strict";e.exports=f;var o=r(3025),a=r(6296),n=r(351),i=r(8512),s=r(24),h=r(7520);function f(v,c){v=v||document.body,c=c||{};var T=[.01,1/0];"distanceLimits"in c&&(T[0]=c.distanceLimits[0],T[1]=c.distanceLimits[1]),"zoomMin"in c&&(T[0]=c.zoomMin),"zoomMax"in c&&(T[1]=c.zoomMax);var l=a({center:c.center||[0,0,0],up:c.up||[0,1,0],eye:c.eye||[0,0,10],mode:c.mode||"orbit",distanceLimits:T}),_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0,A=v.clientWidth,M=v.clientHeight,g={keyBindingMode:"rotate",enableWheel:!0,view:l,element:v,delay:c.delay||16,rotateSpeed:c.rotateSpeed||1,zoomSpeed:c.zoomSpeed||1,translateSpeed:c.translateSpeed||1,flipX:!!c.flipX,flipY:!!c.flipY,modes:l.modes,_ortho:c._ortho||c.projection&&c.projection.type==="orthographic"||!1,tick:function(){var b=o(),p=this.delay,u=b-2*p;l.idle(b-p),l.recalcMatrix(u),l.flush(b-(100+p*2));for(var y=!0,m=l.computedMatrix,R=0;R<16;++R)y=y&&_[R]===m[R],_[R]=m[R];var L=v.clientWidth===A&&v.clientHeight===M;return A=v.clientWidth,M=v.clientHeight,y?!L:(w=Math.exp(l.computedRadius[0]),!0)},lookAt:function(b,p,u){l.lookAt(l.lastT(),b,p,u)},rotate:function(b,p,u){l.rotate(l.lastT(),b,p,u)},pan:function(b,p,u){l.pan(l.lastT(),b,p,u)},translate:function(b,p,u){l.translate(l.lastT(),b,p,u)}};return Object.defineProperties(g,{matrix:{get:function(){return l.computedMatrix},set:function(b){return l.setMatrix(l.lastT(),b),l.computedMatrix},enumerable:!0},mode:{get:function(){return l.getMode()},set:function(b){var p=l.computedUp.slice(),u=l.computedEye.slice(),y=l.computedCenter.slice();if(l.setMode(b),b==="turntable"){var m=o();l._active.lookAt(m,u,y,p),l._active.lookAt(m+500,u,y,[0,0,1]),l._active.flush(m)}return l.getMode()},enumerable:!0},center:{get:function(){return l.computedCenter},set:function(b){return l.lookAt(l.lastT(),null,b),l.computedCenter},enumerable:!0},eye:{get:function(){return l.computedEye},set:function(b){return l.lookAt(l.lastT(),b),l.computedEye},enumerable:!0},up:{get:function(){return l.computedUp},set:function(b){return l.lookAt(l.lastT(),null,null,b),l.computedUp},enumerable:!0},distance:{get:function(){return w},set:function(b){return l.setDistance(l.lastT(),b),b},enumerable:!0},distanceLimits:{get:function(){return l.getDistanceLimits(T)},set:function(b){return l.setDistanceLimits(b),b},enumerable:!0}}),v.addEventListener("contextmenu",function(b){return b.preventDefault(),!1}),g._lastX=-1,g._lastY=-1,g._lastMods={shift:!1,control:!1,alt:!1,meta:!1},g.enableMouseListeners=function(){g.mouseListener=n(v,b),v.addEventListener("touchstart",function(p){var u=s(p.changedTouches[0],v);b(0,u[0],u[1],g._lastMods),b(1,u[0],u[1],g._lastMods)},h?{passive:!0}:!1),v.addEventListener("touchmove",function(p){var u=s(p.changedTouches[0],v);b(1,u[0],u[1],g._lastMods),p.preventDefault()},h?{passive:!1}:!1),v.addEventListener("touchend",function(p){b(0,g._lastX,g._lastY,g._lastMods)},h?{passive:!0}:!1);function b(p,u,y,m){var R=g.keyBindingMode;if(R!==!1){var L=R==="rotate",z=R==="pan",F=R==="zoom",N=!!m.control,O=!!m.alt,P=!!m.shift,U=!!(p&1),B=!!(p&2),X=!!(p&4),$=1/v.clientHeight,le=$*(u-g._lastX),ce=$*(y-g._lastY),de=g.flipX?1:-1,G=g.flipY?1:-1,Y=Math.PI*g.rotateSpeed,ee=o();if(g._lastX!==-1&&g._lastY!==-1&&((L&&U&&!N&&!O&&!P||U&&!N&&!O&&P)&&l.rotate(ee,de*Y*le,-G*Y*ce,0),(z&&U&&!N&&!O&&!P||B||U&&N&&!O&&!P)&&l.pan(ee,-g.translateSpeed*le*w,g.translateSpeed*ce*w,0),F&&U&&!N&&!O&&!P||X||U&&!N&&O&&!P)){var q=-g.zoomSpeed*ce/window.innerHeight*(ee-l.lastT())*100;l.pan(ee,0,0,w*(Math.exp(q)-1))}return g._lastX=u,g._lastY=y,g._lastMods=m,!0}}g.wheelListener=i(v,function(p,u){if(g.keyBindingMode!==!1&&g.enableWheel){var y=g.flipX?1:-1,m=g.flipY?1:-1,R=o();if(Math.abs(p)>Math.abs(u))l.rotate(R,0,0,-p*y*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var L=-g.zoomSpeed*m*u/window.innerHeight*(R-l.lastT())/20;l.pan(R,0,0,w*(Math.exp(L)-1))}}},!0)},g.enableMouseListeners(),g}},799:function(e,t,r){var o=r(3236),a=r(9405),n=o([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
uv = position;
gl_Position = vec4(position, 0, 1);
}`]),i=o([`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);
}`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){"use strict";var o=r(4437),a=r(3837),n=r(5445),i=r(4449),s=r(3589),h=r(2260),f=r(7169),v=r(351),c=r(4772),T=r(4040),l=r(799),_=r(9216)({tablet:!0,featureDetect:!0});e.exports={createScene:b,createCamera:o};function w(){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 A(u,y){var m=null;try{m=u.getContext("webgl",y),m||(m=u.getContext("experimental-webgl",y))}catch{return null}return m}function M(u){var y=Math.round(Math.log(Math.abs(u))/Math.log(10));if(y<0){var m=Math.round(Math.pow(10,-y));return Math.ceil(u*m)/m}else if(y>0){var m=Math.round(Math.pow(10,y));return Math.ceil(u/m)*m}return Math.ceil(u)}function g(u){return typeof u=="boolean"?u:!0}function b(u){u=u||{},u.camera=u.camera||{};var y=u.canvas;if(!y)if(y=document.createElement("canvas"),u.container){var m=u.container;m.appendChild(y)}else document.body.appendChild(y);var R=u.gl;if(R||(u.glOptions&&(_=!!u.glOptions.preserveDrawingBuffer),R=A(y,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!R)throw new Error("webgl not supported");var L=u.bounds||[[-10,-10,-10],[10,10,10]],z=new w,F=h(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!_}),N=l(R),O=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:O},U=u.axes||{},B=a(R,U);B.enable=!U.disable;var X=u.spikes||{},$=i(R,X),le=[],ce=[],de=[],G=[],Y=!0,ae=!0,ee=new Array(16),q=new Array(16),se={view:null,projection:ee,model:q,_ortho:!1},ae=!0,j=[R.drawingBufferWidth,R.drawingBufferHeight],Q=u.cameraObject||o(y,P),re={gl:R,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:y,selection:z,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:L,objects:le,shape:j,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:g(u.autoResize),autoBounds:g(u.autoBounds),autoScale:!!u.autoScale,autoCenter:g(u.autoCenter),clipToBounds:g(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:se,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(qe){this.aspect[0]=qe.x,this.aspect[1]=qe.y,this.aspect[2]=qe.z,ae=!0},setBounds:function(qe,he){this.bounds[0][qe]=he.min,this.bounds[1][qe]=he.max},setClearColor:function(qe){this.clearColor=qe},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)}},pe=[R.drawingBufferWidth/re.pixelRatio|0,R.drawingBufferHeight/re.pixelRatio|0];function we(){if(!re._stopped&&re.autoResize){var qe=y.parentNode,he=1,ue=1;qe&&qe!==document.body?(he=qe.clientWidth,ue=qe.clientHeight):(he=window.innerWidth,ue=window.innerHeight);var ne=Math.ceil(he*re.pixelRatio)|0,Ce=Math.ceil(ue*re.pixelRatio)|0;if(ne!==y.width||Ce!==y.height){y.width=ne,y.height=Ce;var Ye=y.style;Ye.position=Ye.position||"absolute",Ye.left="0px",Ye.top="0px",Ye.width=he+"px",Ye.height=ue+"px",Y=!0}}}re.autoResize&&we(),window.addEventListener("resize",we);function Se(){for(var qe=le.length,he=G.length,ue=0;ue<he;++ue)de[ue]=0;e:for(var ue=0;ue<qe;++ue){var ne=le[ue],Ce=ne.pickSlots;if(!Ce){ce[ue]=-1;continue}for(var Ye=0;Ye<he;++Ye)if(de[Ye]+Ce<255){ce[ue]=Ye,ne.setPickBase(de[Ye]+1),de[Ye]+=Ce;continue e}var rt=s(R,j);ce[ue]=he,G.push(rt),de.push(Ce),ne.setPickBase(1),he+=1}for(;he>0&&de[he-1]===0;)de.pop(),G.pop().dispose()}re.update=function(qe){re._stopped||(qe=qe||{},Y=!0,ae=!0)},re.add=function(qe){re._stopped||(qe.axes=B,le.push(qe),ce.push(-1),Y=!0,ae=!0,Se())},re.remove=function(qe){if(!re._stopped){var he=le.indexOf(qe);he<0||(le.splice(he,1),ce.pop(),Y=!0,ae=!0,Se())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",we),y.removeEventListener("webglcontextlost",Ie),re.mouseListener.enabled=!1,!re.contextLost)){B.dispose(),$.dispose();for(var qe=0;qe<le.length;++qe)le[qe].dispose();F.dispose();for(var qe=0;qe<G.length;++qe)G[qe].dispose();N.dispose(),R=null,B=null,$=null,le=[]}},re._mouseRotating=!1,re._prevButtons=0,re.enableMouseListeners=function(){re.mouseListener=v(y,function(qe,he,ue){if(!re._stopped){var ne=G.length,Ce=le.length,Ye=z.object;z.distance=1/0,z.mouse[0]=he,z.mouse[1]=ue,z.object=null,z.screen=null,z.dataCoordinate=z.dataPosition=null;var rt=!1;if(qe&&re._prevButtons)re._mouseRotating=!0;else{re._mouseRotating&&(ae=!0),re._mouseRotating=!1;for(var Ke=0;Ke<ne;++Ke){var Mt=G[Ke].query(he,pe[1]-ue-1,re.pickRadius);if(Mt){if(Mt.distance>z.distance)continue;for(var kt=0;kt<Ce;++kt){var Nt=le[kt];if(ce[kt]===Ke){var Gt=Nt.pick(Mt);Gt&&(z.buttons=qe,z.screen=Mt.coord,z.distance=Mt.distance,z.object=Nt,z.index=Gt.distance,z.dataPosition=Gt.position,z.dataCoordinate=Gt.dataCoordinate,z.data=Gt,rt=!0)}}}}}Ye&&Ye!==z.object&&(Ye.highlight&&Ye.highlight(null),Y=!0),z.object&&(z.object.highlight&&z.object.highlight(z.data),Y=!0),rt=rt||z.object!==Ye,rt&&re.onselect&&re.onselect(z),qe&1&&!(re._prevButtons&1)&&re.onclick&&re.onclick(z),re._prevButtons=qe}})};function Ie(){if(re.contextLost)return!0;R.isContextLost()&&(re.contextLost=!0,re.mouseListener.enabled=!1,re.selection.object=null,re.oncontextloss&&re.oncontextloss())}y.addEventListener("webglcontextlost",Ie);function Re(){if(!Ie()){R.colorMask(!0,!0,!0,!0),R.depthMask(!0),R.disable(R.BLEND),R.enable(R.DEPTH_TEST),R.depthFunc(R.LEQUAL);for(var qe=le.length,he=G.length,ue=0;ue<he;++ue){var ne=G[ue];ne.shape=pe,ne.begin();for(var Ce=0;Ce<qe;++Ce)if(ce[Ce]===ue){var Ye=le[Ce];Ye.drawPick&&(Ye.pixelRatio=1,Ye.drawPick(se))}ne.end()}}}var We=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],at=[We[0].slice(),We[1].slice()];function nt(){if(!Ie()){we();var qe=re.camera.tick();se.view=re.camera.matrix,Y=Y||qe,ae=ae||qe,B.pixelRatio=re.pixelRatio,$.pixelRatio=re.pixelRatio;var he=le.length,ue=We[0],ne=We[1];ue[0]=ue[1]=ue[2]=1/0,ne[0]=ne[1]=ne[2]=-1/0;for(var Ce=0;Ce<he;++Ce){var Ye=le[Ce];Ye.pixelRatio=re.pixelRatio,Ye.axes=re.axes,Y=Y||!!Ye.dirty,ae=ae||!!Ye.dirty;var rt=Ye.bounds;if(rt)for(var Ke=rt[0],Mt=rt[1],kt=0;kt<3;++kt)ue[kt]=Math.min(ue[kt],Ke[kt]),ne[kt]=Math.max(ne[kt],Mt[kt])}var Nt=re.bounds;if(re.autoBounds)for(var kt=0;kt<3;++kt){if(ne[kt]<ue[kt])ue[kt]=-1,ne[kt]=1;else{ue[kt]===ne[kt]&&(ue[kt]-=1,ne[kt]+=1);var Gt=.05*(ne[kt]-ue[kt]);ue[kt]=ue[kt]-Gt,ne[kt]=ne[kt]+Gt}Nt[0][kt]=ue[kt],Nt[1][kt]=ne[kt]}for(var Mr=!1,kt=0;kt<3;++kt)Mr=Mr||at[0][kt]!==Nt[0][kt]||at[1][kt]!==Nt[1][kt],at[0][kt]=Nt[0][kt],at[1][kt]=Nt[1][kt];if(ae=ae||Mr,Y=Y||Mr,!!Y){if(Mr){for(var mr=[0,0,0],Ce=0;Ce<3;++Ce)mr[Ce]=M((Nt[1][Ce]-Nt[0][Ce])/10);B.autoTicks?B.update({bounds:Nt,tickSpacing:mr}):B.update({bounds:Nt})}var qr=R.drawingBufferWidth,Er=R.drawingBufferHeight;j[0]=qr,j[1]=Er,pe[0]=Math.max(qr/re.pixelRatio,1)|0,pe[1]=Math.max(Er/re.pixelRatio,1)|0,p(re,O);for(var Ce=0;Ce<he;++Ce){var Ye=le[Ce];Ye.axesBounds=Nt,re.clipToBounds&&(Ye.clipBounds=Nt)}z.object&&(re.snapToData?$.position=z.dataCoordinate:$.position=z.dataPosition,$.bounds=Nt),ae&&(ae=!1,Re()),re.axesPixels=n(re.axes,se,qr,Er),re.onrender&&re.onrender(),R.bindFramebuffer(R.FRAMEBUFFER,null),R.viewport(0,0,qr,Er),re.clearRGBA(),R.depthMask(!0),R.colorMask(!0,!0,!0,!0),R.enable(R.DEPTH_TEST),R.depthFunc(R.LEQUAL),R.disable(R.BLEND),R.disable(R.CULL_FACE);var Ir=!1;B.enable&&(Ir=Ir||B.isTransparent(),B.draw(se)),$.axes=B,z.object&&$.draw(se),R.disable(R.CULL_FACE);for(var Ce=0;Ce<he;++Ce){var Ye=le[Ce];Ye.axes=B,Ye.pixelRatio=re.pixelRatio,Ye.isOpaque&&Ye.isOpaque()&&Ye.draw(se),Ye.isTransparent&&Ye.isTransparent()&&(Ir=!0)}if(Ir){F.shape=j,F.bind(),R.clear(R.DEPTH_BUFFER_BIT),R.colorMask(!1,!1,!1,!1),R.depthMask(!0),R.depthFunc(R.LESS),B.enable&&B.isTransparent()&&B.drawTransparent(se);for(var Ce=0;Ce<he;++Ce){var Ye=le[Ce];Ye.isOpaque&&Ye.isOpaque()&&Ye.draw(se)}R.enable(R.BLEND),R.blendEquation(R.FUNC_ADD),R.blendFunc(R.ONE,R.ONE_MINUS_SRC_ALPHA),R.colorMask(!0,!0,!0,!0),R.depthMask(!1),R.clearColor(0,0,0,0),R.clear(R.COLOR_BUFFER_BIT),B.isTransparent()&&B.drawTransparent(se);for(var Ce=0;Ce<he;++Ce){var Ye=le[Ce];Ye.isTransparent&&Ye.isTransparent()&&Ye.drawTransparent(se)}R.bindFramebuffer(R.FRAMEBUFFER,null),R.blendFunc(R.ONE,R.ONE_MINUS_SRC_ALPHA),R.disable(R.DEPTH_TEST),N.bind(),F.color[0].bind(0),N.uniforms.accumBuffer=0,f(R),R.disable(R.BLEND)}Y=!1;for(var Ce=0;Ce<he;++Ce)le[Ce].dirty=!1}}}function tt(){re._stopped||re.contextLost||(nt(),requestAnimationFrame(tt))}return re.enableMouseListeners(),tt(),re.redraw=function(){re._stopped||(Y=!0,nt())},re}function p(u,y){var m=u.bounds,R=u.cameraParams,L=R.projection,z=R.model,F=u.gl.drawingBufferWidth,N=u.gl.drawingBufferHeight,O=u.zNear,P=u.zFar,U=u.fovy,B=F/N;y?(T(L,-B,B,-1,1,O,P),R._ortho=!0):(c(L,U,B,O,P),R._ortho=!1);for(var X=0;X<16;++X)z[X]=0;z[15]=1;for(var $=0,X=0;X<3;++X)$=Math.max($,m[1][X]-m[0][X]);for(var X=0;X<3;++X)u.autoScale?z[5*X]=u.aspect[X]/(m[1][X]-m[0][X]):z[5*X]=1/$,u.autoCenter&&(z[12+X]=-z[5*X]*.5*(m[0][X]+m[1][X]))}},783:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2],f=o[3],v=a[0],c=a[1],T=a[2],l=a[3],_,w,A,M,g;return w=i*v+s*c+h*T+f*l,w<0&&(w=-w,v=-v,c=-c,T=-T,l=-l),1-w>1e-6?(_=Math.acos(w),A=Math.sin(_),M=Math.sin((1-n)*_)/A,g=Math.sin(n*_)/A):(M=1-n,g=n),r[0]=M*i+g*v,r[1]=M*s+g*c,r[2]=M*h+g*T,r[3]=M*f+g*l,r}},5964:function(e){"use strict";e.exports=function(t){return!t&&t!==0?"":t.toString()}},9366:function(e,t,r){"use strict";var o=r(4359);e.exports=n;var a={};function n(i,s,h){var f=[s.style,s.weight,s.variant,s.family].join("_"),v=a[f];if(v||(v=a[f]={}),i in v)return v[i];var c={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};c.triangles=!0;var T=o(i,c);c.triangles=!1;var l=o(i,c),_,w;if(h&&h!==1){for(_=0;_<T.positions.length;++_)for(w=0;w<T.positions[_].length;++w)T.positions[_][w]/=h;for(_=0;_<l.positions.length;++_)for(w=0;w<l.positions[_].length;++w)l.positions[_][w]/=h}var A=[[1/0,1/0],[-1/0,-1/0]],M=l.positions.length;for(_=0;_<M;++_){var g=l.positions[_];for(w=0;w<2;++w)A[0][w]=Math.min(A[0][w],g[w]),A[1][w]=Math.max(A[1][w],g[w])}return v[i]=[T,l,A]}},1283:function(e,t,r){var o=r(9405),a=r(3236),n=a([`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 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;
}
}`]),i=a([`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;
}
}`]),s=a([`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;
}
}
`]),h=a([`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;
}
`]),f=a([`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);
}`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],c={vertex:n,fragment:h,attributes:v},T={vertex:i,fragment:h,attributes:v},l={vertex:s,fragment:h,attributes:v},_={vertex:n,fragment:f,attributes:v},w={vertex:i,fragment:f,attributes:v},A={vertex:s,fragment:f,attributes:v};function M(g,b){var p=o(g,b),u=p.attributes;return u.position.location=0,u.color.location=1,u.glyph.location=2,u.id.location=3,p}t.createPerspective=function(g){return M(g,c)},t.createOrtho=function(g){return M(g,T)},t.createProject=function(g){return M(g,l)},t.createPickPerspective=function(g){return M(g,_)},t.createPickOrtho=function(g){return M(g,w)},t.createPickProject=function(g){return M(g,A)}},8418:function(e,t,r){"use strict";var o=r(5219),a=r(2762),n=r(8116),i=r(1888),s=r(6760),h=r(1283),f=r(9366),v=r(5964),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,l=DataView;function _(q){return T.isView(q)&&!(q instanceof l)}function w(q){return Array.isArray(q)||_(q)}e.exports=ee;function A(q,se){var ae=q[0],j=q[1],Q=q[2],re=q[3];return q[0]=se[0]*ae+se[4]*j+se[8]*Q+se[12]*re,q[1]=se[1]*ae+se[5]*j+se[9]*Q+se[13]*re,q[2]=se[2]*ae+se[6]*j+se[10]*Q+se[14]*re,q[3]=se[3]*ae+se[7]*j+se[11]*Q+se[15]*re,q}function M(q,se,ae,j){return A(j,j,ae),A(j,j,se),A(j,j,q)}function g(q,se){this.index=q,this.dataCoordinate=this.position=se}function b(q){return q===!0||q>1?1:q}function p(q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We){this.gl=q,this.pixelRatio=1,this.shader=se,this.orthoShader=ae,this.projectShader=j,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=pe,this.idBuffer=we,this.vao=Se,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Ie,this.pickOrthoShader=Re,this.pickProjectShader=We,this.points=[],this._selectResult=new g(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 u=p.prototype;u.pickSlots=1,u.setPickBase=function(q){this.pickId=q},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],m=[0,0,0],R=[0,0,0],L=[0,0,0,1],z=[0,0,0,1],F=c.slice(),N=[0,0,0],O=[[0,0,0],[0,0,0]];function P(q){return q[0]=q[1]=q[2]=0,q}function U(q,se){return q[0]=se[0],q[1]=se[1],q[2]=se[2],q[3]=1,q}function B(q,se,ae,j){return q[0]=se[0],q[1]=se[1],q[2]=se[2],q[ae]=j,q}function X(q){for(var se=O,ae=0;ae<2;++ae)for(var j=0;j<3;++j)se[ae][j]=Math.max(Math.min(q[ae][j],1e8),-1e8);return se}function $(q,se,ae,j){var Q=se.axesProject,re=se.gl,pe=q.uniforms,we=ae.model||c,Se=ae.view||c,Ie=ae.projection||c,Re=se.axesBounds,We=X(se.clipBounds),at;se.axes&&se.axes.lastCubeProps?at=se.axes.lastCubeProps.axis:at=[1,1,1],y[0]=2/re.drawingBufferWidth,y[1]=2/re.drawingBufferHeight,q.bind(),pe.view=Se,pe.projection=Ie,pe.screenSize=y,pe.highlightId=se.highlightId,pe.highlightScale=se.highlightScale,pe.clipBounds=We,pe.pickGroup=se.pickId/255,pe.pixelRatio=j;for(var nt=0;nt<3;++nt)if(Q[nt]){pe.scale=se.projectScale[nt],pe.opacity=se.projectOpacity[nt];for(var tt=F,qe=0;qe<16;++qe)tt[qe]=0;for(var qe=0;qe<4;++qe)tt[5*qe]=1;tt[5*nt]=0,at[nt]<0?tt[12+nt]=Re[0][nt]:tt[12+nt]=Re[1][nt],s(tt,we,tt),pe.model=tt;var he=(nt+1)%3,ue=(nt+2)%3,ne=P(m),Ce=P(R);ne[he]=1,Ce[ue]=1;var Ye=M(Ie,Se,we,U(L,ne)),rt=M(Ie,Se,we,U(z,Ce));if(Math.abs(Ye[1])>Math.abs(rt[1])){var Ke=Ye;Ye=rt,rt=Ke,Ke=ne,ne=Ce,Ce=Ke;var Mt=he;he=ue,ue=Mt}Ye[0]<0&&(ne[he]=-1),rt[1]>0&&(Ce[ue]=-1);for(var kt=0,Nt=0,qe=0;qe<4;++qe)kt+=Math.pow(we[4*he+qe],2),Nt+=Math.pow(we[4*ue+qe],2);ne[he]/=Math.sqrt(kt),Ce[ue]/=Math.sqrt(Nt),pe.axes[0]=ne,pe.axes[1]=Ce,pe.fragClipBounds[0]=B(N,We[0],nt,-1e8),pe.fragClipBounds[1]=B(N,We[1],nt,1e8),se.vao.bind(),se.vao.draw(re.TRIANGLES,se.vertexCount),se.lineWidth>0&&(re.lineWidth(se.lineWidth*j),se.vao.draw(re.LINES,se.lineVertexCount,se.vertexCount)),se.vao.unbind()}}var le=[-1e8,-1e8,-1e8],ce=[1e8,1e8,1e8],de=[le,ce];function G(q,se,ae,j,Q,re,pe){var we=ae.gl;if((re===ae.projectHasAlpha||pe)&&$(se,ae,j,Q),re===ae.hasAlpha||pe){q.bind();var Se=q.uniforms;Se.model=j.model||c,Se.view=j.view||c,Se.projection=j.projection||c,y[0]=2/we.drawingBufferWidth,y[1]=2/we.drawingBufferHeight,Se.screenSize=y,Se.highlightId=ae.highlightId,Se.highlightScale=ae.highlightScale,Se.fragClipBounds=de,Se.clipBounds=ae.axes.bounds,Se.opacity=ae.opacity,Se.pickGroup=ae.pickId/255,Se.pixelRatio=Q,ae.vao.bind(),ae.vao.draw(we.TRIANGLES,ae.vertexCount),ae.lineWidth>0&&(we.lineWidth(ae.lineWidth*Q),ae.vao.draw(we.LINES,ae.lineVertexCount,ae.vertexCount)),ae.vao.unbind()}}u.draw=function(q){var se=this.useOrtho?this.orthoShader:this.shader;G(se,this.projectShader,this,q,this.pixelRatio,!1,!1)},u.drawTransparent=function(q){var se=this.useOrtho?this.orthoShader:this.shader;G(se,this.projectShader,this,q,this.pixelRatio,!0,!1)},u.drawPick=function(q){var se=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(se,this.pickProjectShader,this,q,1,!0,!0)},u.pick=function(q){if(!q||q.id!==this.pickId)return null;var se=q.value[2]+(q.value[1]<<8)+(q.value[0]<<16);if(se>=this.pointCount||se<0)return null;var ae=this.points[se],j=this._selectResult;j.index=se;for(var Q=0;Q<3;++Q)j.position[Q]=j.dataCoordinate[Q]=ae[Q];return j},u.highlight=function(q){if(!q)this.highlightId=[1,1,1,1];else{var se=q.index,ae=se&255,j=se>>8&255,Q=se>>16&255;this.highlightId=[ae/255,j/255,Q/255,0]}};function Y(q,se,ae,j){var Q;w(q)?se<q.length?Q=q[se]:Q=void 0:Q=q,Q=v(Q);var re=!0;o(Q)&&(Q="\u25BC",re=!1),ae||(ae={});var pe=ae.family;w(pe)&&(pe=pe[se]),pe||(pe="normal");var we=ae.weight;w(we)&&(we=we[se]),we||(we="normal");var Se=ae.style;w(Se)&&(Se=Se[se]),Se||(Se="normal");var Ie=ae.variant;w(Ie)&&(Ie=Ie[se]),Ie||(Ie="normal");var Re=f(Q,{family:pe,weight:we,style:Se,variant:Ie},j),Re=f(Q,ae,j);return{mesh:Re[0],lines:Re[1],bounds:Re[2],visible:re}}u.update=function(q){if(q=q||{},"perspective"in q&&(this.useOrtho=!q.perspective),"orthographic"in q&&(this.useOrtho=!!q.orthographic),"lineWidth"in q&&(this.lineWidth=q.lineWidth),"project"in q)if(w(q.project))this.axesProject=q.project;else{var se=!!q.project;this.axesProject=[se,se,se]}if("projectScale"in q)if(w(q.projectScale))this.projectScale=q.projectScale.slice();else{var ae=+q.projectScale;this.projectScale=[ae,ae,ae]}if(this.projectHasAlpha=!1,"projectOpacity"in q){if(w(q.projectOpacity))this.projectOpacity=q.projectOpacity.slice();else{var ae=+q.projectOpacity;this.projectOpacity=[ae,ae,ae]}for(var j=0;j<3;++j)this.projectOpacity[j]=b(this.projectOpacity[j]),this.projectOpacity[j]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in q&&(this.opacity=b(q.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Q=q.position,re={family:q.font||"normal",style:q.fontStyle||"normal",weight:q.fontWeight||"normal",variant:q.fontVariant||"normal"},pe=q.alignment||[0,0],we,Se;if(pe.length===2)we=pe[0],Se=pe[1];else{we=[],Se=[];for(var j=0;j<pe.length;++j)we[j]=pe[j][0],Se[j]=pe[j][1]}var Ie=[1/0,1/0,1/0],Re=[-1/0,-1/0,-1/0],We=q.glyph,at=q.color,nt=q.size,tt=q.angle,qe=q.lineColor,he=-1,ue=0,ne=0,Ce=0;if(Q.length){Ce=Q.length;e:for(var j=0;j<Ce;++j){for(var Ye=Q[j],rt=0;rt<3;++rt)if(isNaN(Ye[rt])||!isFinite(Ye[rt]))continue e;var Ke=Y(We,j,re,this.pixelRatio),Mt=Ke.mesh,kt=Ke.lines,Nt=Ke.bounds;ue+=Mt.cells.length*3,ne+=kt.edges.length*2}}var Gt=ue+ne,Mr=i.mallocFloat(3*Gt),mr=i.mallocFloat(4*Gt),qr=i.mallocFloat(2*Gt),Er=i.mallocUint32(Gt);if(Gt>0){var Ir=0,_t=ue,Oe=[0,0,0,1],Je=[0,0,0,1],Ae=w(at)&&w(at[0]),Le=w(qe)&&w(qe[0]);e:for(var j=0;j<Ce;++j){he+=1;for(var Ye=Q[j],rt=0;rt<3;++rt){if(isNaN(Ye[rt])||!isFinite(Ye[rt]))continue e;Re[rt]=Math.max(Re[rt],Ye[rt]),Ie[rt]=Math.min(Ie[rt],Ye[rt])}var Ke=Y(We,j,re,this.pixelRatio),Mt=Ke.mesh,kt=Ke.lines,Nt=Ke.bounds,Ue=Ke.visible;if(!Ue)Oe=[1,1,1,0];else if(w(at)){var Ze;if(Ae?j<at.length?Ze=at[j]:Ze=[0,0,0,0]:Ze=at,Ze.length===3){for(var rt=0;rt<3;++rt)Oe[rt]=Ze[rt];Oe[3]=1}else if(Ze.length===4){for(var rt=0;rt<4;++rt)Oe[rt]=Ze[rt];!this.hasAlpha&&Ze[3]<1&&(this.hasAlpha=!0)}}else Oe[0]=Oe[1]=Oe[2]=0,Oe[3]=1;if(!Ue)Je=[1,1,1,0];else if(w(qe)){var Ze;if(Le?j<qe.length?Ze=qe[j]:Ze=[0,0,0,0]:Ze=qe,Ze.length===3){for(var rt=0;rt<3;++rt)Je[rt]=Ze[rt];Je[rt]=1}else if(Ze.length===4){for(var rt=0;rt<4;++rt)Je[rt]=Ze[rt];!this.hasAlpha&&Ze[3]<1&&(this.hasAlpha=!0)}}else Je[0]=Je[1]=Je[2]=0,Je[3]=1;var st=.5;Ue?w(nt)?j<nt.length?st=+nt[j]:st=12:nt?st=+nt:this.useOrtho&&(st=12):st=0;var ut=0;w(tt)?j<tt.length?ut=+tt[j]:ut=0:tt&&(ut=+tt);for(var Ut=Math.cos(ut),Ct=Math.sin(ut),Ye=Q[j],rt=0;rt<3;++rt)Re[rt]=Math.max(Re[rt],Ye[rt]),Ie[rt]=Math.min(Ie[rt],Ye[rt]);var Pt=we,jt=Se,Pt=0;w(we)?j<we.length?Pt=we[j]:Pt=0:we&&(Pt=we);var jt=0;w(Se)?j<Se.length?jt=Se[j]:jt=0:Se&&(jt=Se),Pt*=Pt>0?1-Nt[0][0]:Pt<0?1+Nt[1][0]:1,jt*=jt>0?1-Nt[0][1]:jt<0?1+Nt[1][1]:1;for(var fr=[Pt,jt],Oa=Mt.cells||[],Ia=Mt.positions||[],rt=0;rt<Oa.length;++rt)for(var ur=Oa[rt],sr=0;sr<3;++sr){for(var Pr=0;Pr<3;++Pr)Mr[3*Ir+Pr]=Ye[Pr];for(var Pr=0;Pr<4;++Pr)mr[4*Ir+Pr]=Oe[Pr];Er[Ir]=he;var Ta=Ia[ur[sr]];qr[2*Ir]=st*(Ut*Ta[0]-Ct*Ta[1]+fr[0]),qr[2*Ir+1]=st*(Ct*Ta[0]+Ut*Ta[1]+fr[1]),Ir+=1}for(var Oa=kt.edges,Ia=kt.positions,rt=0;rt<Oa.length;++rt)for(var ur=Oa[rt],sr=0;sr<2;++sr){for(var Pr=0;Pr<3;++Pr)Mr[3*_t+Pr]=Ye[Pr];for(var Pr=0;Pr<4;++Pr)mr[4*_t+Pr]=Je[Pr];Er[_t]=he;var Ta=Ia[ur[sr]];qr[2*_t]=st*(Ut*Ta[0]-Ct*Ta[1]+fr[0]),qr[2*_t+1]=st*(Ct*Ta[0]+Ut*Ta[1]+fr[1]),_t+=1}}}this.bounds=[Ie,Re],this.points=Q,this.pointCount=Q.length,this.vertexCount=ue,this.lineVertexCount=ne,this.pointBuffer.update(Mr),this.colorBuffer.update(mr),this.glyphBuffer.update(qr),this.idBuffer.update(Er),i.free(Mr),i.free(mr),i.free(qr),i.free(Er)},u.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function ee(q){var se=q.gl,ae=h.createPerspective(se),j=h.createOrtho(se),Q=h.createProject(se),re=h.createPickPerspective(se),pe=h.createPickOrtho(se),we=h.createPickProject(se),Se=a(se),Ie=a(se),Re=a(se),We=a(se),at=n(se,[{buffer:Se,size:3,type:se.FLOAT},{buffer:Ie,size:4,type:se.FLOAT},{buffer:Re,size:2,type:se.FLOAT},{buffer:We,size:4,type:se.UNSIGNED_BYTE,normalized:!0}]),nt=new p(se,ae,j,Q,Se,Ie,Re,We,at,re,pe,we);return nt.update(q),nt}},3589:function(e,t,r){"use strict";e.exports=c;var o=r(2260),a=r(1888),n=r(9618),i=r(8828).nextPow2,s=function(T,l,_){for(var w=1e8,A=-1,M=-1,g=T.shape[0],b=T.shape[1],p=0;p<g;p++)for(var u=0;u<b;u++){var y=T.get(p,u,0),m=T.get(p,u,1),R=T.get(p,u,2),L=T.get(p,u,3);if(y<255||m<255||R<255||L<255){var z=l-p,F=_-u,N=z*z+F*F;N<w&&(w=N,A=p,M=u)}}return[A,M,w]};function h(T,l,_,w,A){this.coord=[T,l],this.id=_,this.value=w,this.distance=A}function f(T,l,_){this.gl=T,this.fbo=l,this.buffer=_,this._readTimeout=null;var w=this;this._readCallback=function(){w.gl&&(l.bind(),T.readPixels(0,0,l.shape[0],l.shape[1],T.RGBA,T.UNSIGNED_BYTE,w.buffer),w._readTimeout=null)}}var v=f.prototype;Object.defineProperty(v,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(T){if(this.gl){this.fbo.shape=T;var l=this.fbo.shape[0],_=this.fbo.shape[1];if(_*l*4>this.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(i(_*l*4)),A=0;A<_*l*4;++A)w[A]=255}return T}}}),v.begin=function(){var T=this.gl,l=this.shape;T&&(this.fbo.bind(),T.clearColor(1,1,1,1),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT))},v.end=function(){var T=this.gl;T&&(T.bindFramebuffer(T.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},v.query=function(T,l,_){if(!this.gl)return null;var w=this.fbo.shape.slice();T=T|0,l=l|0,typeof _!="number"&&(_=1);var A=Math.min(Math.max(T-_,0),w[0])|0,M=Math.min(Math.max(T+_,0),w[0])|0,g=Math.min(Math.max(l-_,0),w[1])|0,b=Math.min(Math.max(l+_,0),w[1])|0;if(M<=A||b<=g)return null;var p=[M-A,b-g],u=n(this.buffer,[p[0],p[1],4],[4,w[0]*4,1],4*(A+w[0]*g)),y=s(u.hi(p[0],p[1],1),_,_),m=y[0],R=y[1];if(m<0||Math.pow(this.radius,2)<y[2])return null;var L=u.get(m,R,0),z=u.get(m,R,1),F=u.get(m,R,2),N=u.get(m,R,3);return new h(m+A|0,R+g|0,L,[z,F,N],Math.sqrt(y[2]))},v.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function c(T,l){var _=l[0],w=l[1],A={},M=o(T,_,w,A),g=a.mallocUint8(_*w*4);return new f(T,M,g)}},9405:function(e,t,r){"use strict";var o=r(3327),a=r(8731),n=r(216),i=r(5091),s=r(2145),h=r(8866);function f(l){this.gl=l,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var v=f.prototype;v.bind=function(){this.program||this._relink();var l,_=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),w=this.gl.lastAttribCount;if(_>w)for(l=w;l<_;l++)this.gl.enableVertexAttribArray(l);else if(w>_)for(l=_;l<w;l++)this.gl.disableVertexAttribArray(l);this.gl.lastAttribCount=_,this.gl.useProgram(this.program)},v.dispose=function(){for(var l=this.gl.lastAttribCount,_=0;_<l;_++)this.gl.disableVertexAttribArray(_);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function c(l,_){return l.name<_.name?-1:1}v.update=function(l,_,w,A){if(!_||arguments.length===1){var M=l;l=M.vertex,_=M.fragment,w=M.uniforms,A=M.attributes}var g=this,b=g.gl,p=g._vref;g._vref=i.shader(b,b.VERTEX_SHADER,l),p&&p.dispose(),g.vertShader=g._vref.shader;var u=this._fref;if(g._fref=i.shader(b,b.FRAGMENT_SHADER,_),u&&u.dispose(),g.fragShader=g._fref.shader,!w||!A){var y=b.createProgram();if(b.attachShader(y,g.fragShader),b.attachShader(y,g.vertShader),b.linkProgram(y),!b.getProgramParameter(y,b.LINK_STATUS)){var m=b.getProgramInfoLog(y);throw new h(m,"Error linking program:"+m)}w=w||s.uniforms(b,y),A=A||s.attributes(b,y),b.deleteProgram(y)}A=A.slice(),A.sort(c);var R=[],L=[],z=[],F;for(F=0;F<A.length;++F){var N=A[F];if(N.type.indexOf("mat")>=0){for(var O=N.type.charAt(N.type.length-1)|0,P=new Array(O),U=0;U<O;++U)P[U]=z.length,L.push(N.name+"["+U+"]"),typeof N.location=="number"?z.push(N.location+U):Array.isArray(N.location)&&N.location.length===O&&typeof N.location[U]=="number"?z.push(N.location[U]|0):z.push(-1);R.push({name:N.name,type:N.type,locations:P})}else R.push({name:N.name,type:N.type,locations:[z.length]}),L.push(N.name),typeof N.location=="number"?z.push(N.location|0):z.push(-1)}var B=0;for(F=0;F<z.length;++F)if(z[F]<0){for(;z.indexOf(B)>=0;)B+=1;z[F]=B}var X=new Array(w.length);function $(){g.program=i.program(b,g._vref,g._fref,L,z);for(var le=0;le<w.length;++le)X[le]=b.getUniformLocation(g.program,w[le].name)}$(),g._relink=$,g.types={uniforms:n(w),attributes:n(A)},g.attributes=a(b,g,R,z),Object.defineProperty(g,"uniforms",o(b,g,w,X))};function T(l,_,w,A,M){var g=new f(l);return g.update(_,w,A,M),g}e.exports=T},8866:function(e){function t(r,o,a){this.shortMessage=o||"",this.longMessage=a||"",this.rawError=r||"",this.message="gl-shader: "+(o||r||"")+(a?`
`+a:""),this.stack=new Error().stack}t.prototype=new Error,t.prototype.name="GLError",t.prototype.constructor=t,e.exports=t},8731:function(e,t,r){"use strict";e.exports=f;var o=r(8866);function a(v,c,T,l,_,w){this._gl=v,this._wrapper=c,this._index=T,this._locations=l,this._dimension=_,this._constFunc=w}var n=a.prototype;n.pointer=function(c,T,l,_){var w=this,A=w._gl,M=w._locations[w._index];A.vertexAttribPointer(M,w._dimension,c||A.FLOAT,!!T,l||0,_||0),A.enableVertexAttribArray(M)},n.set=function(v,c,T,l){return this._constFunc(this._locations[this._index],v,c,T,l)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var i=[function(v,c,T){return T.length===void 0?v.vertexAttrib1f(c,T):v.vertexAttrib1fv(c,T)},function(v,c,T,l){return T.length===void 0?v.vertexAttrib2f(c,T,l):v.vertexAttrib2fv(c,T)},function(v,c,T,l,_){return T.length===void 0?v.vertexAttrib3f(c,T,l,_):v.vertexAttrib3fv(c,T)},function(v,c,T,l,_,w){return T.length===void 0?v.vertexAttrib4f(c,T,l,_,w):v.vertexAttrib4fv(c,T)}];function s(v,c,T,l,_,w,A){var M=i[_],g=new a(v,c,T,l,_,M);Object.defineProperty(w,A,{set:function(b){return v.disableVertexAttribArray(l[T]),M(v,l[T],b),b},get:function(){return g},enumerable:!0})}function h(v,c,T,l,_,w,A){for(var M=new Array(_),g=new Array(_),b=0;b<_;++b)s(v,c,T[b],l,_,M,b),g[b]=M[b];Object.defineProperty(M,"location",{set:function(y){if(Array.isArray(y))for(var m=0;m<_;++m)g[m].location=y[m];else for(var m=0;m<_;++m)g[m].location=y+m;return y},get:function(){for(var y=new Array(_),m=0;m<_;++m)y[m]=l[T[m]];return y},enumerable:!0}),M.pointer=function(y,m,R,L){y=y||v.FLOAT,m=!!m,R=R||_*_,L=L||0;for(var z=0;z<_;++z){var F=l[T[z]];v.vertexAttribPointer(F,_,y,m,R,L+z*_),v.enableVertexAttribArray(F)}};var p=new Array(_),u=v["vertexAttrib"+_+"fv"];Object.defineProperty(w,A,{set:function(y){for(var m=0;m<_;++m){var R=l[T[m]];if(v.disableVertexAttribArray(R),Array.isArray(y[0]))u.call(v,R,y[m]);else{for(var L=0;L<_;++L)p[L]=y[_*m+L];u.call(v,R,p)}}return y},get:function(){return M},enumerable:!0})}function f(v,c,T,l){for(var _={},w=0,A=T.length;w<A;++w){var M=T[w],g=M.name,b=M.type,p=M.locations;switch(b){case"bool":case"int":case"float":s(v,c,p[0],l,1,_,g);break;default:if(b.indexOf("vec")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);s(v,c,p[0],l,u,_,g)}else if(b.indexOf("mat")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);h(v,c,p,l,u,_,g)}else throw new o("","Unknown data type for attribute "+g+": "+b);break}}return _}},3327:function(e,t,r){"use strict";var o=r(216),a=r(8866);e.exports=s;function n(h){return function(){return h}}function i(h,f){for(var v=new Array(h),c=0;c<h;++c)v[c]=f;return v}function s(h,f,v,c){function T(b){return function(p,u,y){return p.getUniform(u.program,y[b])}}function l(b){return function(u){for(var y=_("",b),m=0;m<y.length;++m){var R=y[m],L=R[0],z=R[1];if(c[z]){var F=u;if(typeof L=="string"&&(L.indexOf(".")===0||L.indexOf("[")===0)){var N=L;if(L.indexOf(".")===0&&(N=L.slice(1)),N.indexOf("]")===N.length-1){var O=N.indexOf("["),P=N.slice(0,O),U=N.slice(O+1,N.length-1);F=P?u[P][U]:u[U]}else F=u[N]}var B=v[z].type,X;switch(B){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(c[z],F);break;case"float":h.uniform1f(c[z],F);break;default:var $=B.indexOf("vec");if(0<=$&&$<=1&&B.length===4+$){if(X=B.charCodeAt(B.length-1)-48,X<2||X>4)throw new a("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+X+"iv"](c[z],F);break;case"v":h["uniform"+X+"fv"](c[z],F);break;default:throw new a("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(X=B.charCodeAt(B.length-1)-48,X<2||X>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+X+"fv"](c[z],!1,F);break}else throw new a("","Unknown uniform data type for "+name+": "+B)}}}}}function _(b,p){if(typeof p!="object")return[[b,p]];var u=[];for(var y in p){var m=p[y],R=b;parseInt(y)+""===y?R+="["+y+"]":R+="."+y,typeof m=="object"?u.push.apply(u,_(R,m)):u.push([R,m])}return u}function w(b){switch(b){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var p=b.indexOf("vec");if(0<=p&&p<=1&&b.length===4+p){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type");return b.charAt(0)==="b"?i(u,!1):i(u,0)}else if(b.indexOf("mat")===0&&b.length===4){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+b);return i(u*u,0)}else throw new a("","Unknown uniform data type for "+name+": "+b)}}function A(b,p,u){if(typeof u=="object"){var y=M(u);Object.defineProperty(b,p,{get:n(y),set:l(u),enumerable:!0,configurable:!1})}else c[u]?Object.defineProperty(b,p,{get:T(u),set:l(u),enumerable:!0,configurable:!1}):b[p]=w(v[u].type)}function M(b){var p;if(Array.isArray(b)){p=new Array(b.length);for(var u=0;u<b.length;++u)A(p,u,b[u])}else{p={};for(var y in b)A(p,y,b[y])}return p}var g=o(v,!0);return{get:n(M(g)),set:l(g),enumerable:!0,configurable:!0}}},216:function(e){"use strict";e.exports=t;function t(r,o){for(var a={},n=0;n<r.length;++n)for(var i=r[n].name,s=i.split("."),h=a,f=0;f<s.length;++f){var v=s[f].split("[");if(v.length>1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var c=1;c<v.length;++c){var T=parseInt(v[c]);c<v.length-1||f<s.length-1?(T in h||(c<v.length-1?h[T]=[]:h[T]={}),h=h[T]):o?h[T]=n:h[T]=r[n].type}}else f<s.length-1?(v[0]in h||(h[v[0]]={}),h=h[v[0]]):o?h[v[0]]=n:h[v[0]]=r[n].type}return a}},2145:function(e,t){"use strict";t.uniforms=n,t.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},o=null;function a(s,h){if(!o){var f=Object.keys(r);o={};for(var v=0;v<f.length;++v){var c=f[v];o[s[c]]=r[c]}}return o[h]}function n(s,h){for(var f=s.getProgramParameter(h,s.ACTIVE_UNIFORMS),v=[],c=0;c<f;++c){var T=s.getActiveUniform(h,c);if(T){var l=a(s,T.type);if(T.size>1)for(var _=0;_<T.size;++_)v.push({name:T.name.replace("[0]","["+_+"]"),type:l});else v.push({name:T.name,type:l})}}return v}function i(s,h){for(var f=s.getProgramParameter(h,s.ACTIVE_ATTRIBUTES),v=[],c=0;c<f;++c){var T=s.getActiveAttrib(h,c);T&&v.push({name:T.name,type:a(s,T.type)})}return v}},5091:function(e,t,r){"use strict";t.shader=_,t.program=w;var o=r(8866),a=r(2992),n=typeof WeakMap>"u"?r(606):WeakMap,i=new n,s=0;function h(A,M,g,b,p,u,y){this.id=A,this.src=M,this.type=g,this.shader=b,this.count=u,this.programs=[],this.cache=y}h.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,M=A.gl,g=this.programs,b=0,p=g.length;b<p;++b){var u=A.programs[g[b]];u&&(delete A.programs[b],M.deleteProgram(u))}M.deleteShader(this.shader),delete A.shaders[this.type===M.FRAGMENT_SHADER|0][this.src]}};function f(A){this.gl=A,this.shaders=[{},{}],this.programs={}}var v=f.prototype;function c(A,M,g){var b=A.createShader(M);if(A.shaderSource(b,g),A.compileShader(b),!A.getShaderParameter(b,A.COMPILE_STATUS)){var p=A.getShaderInfoLog(b);try{var u=a(p,g,M)}catch(y){throw console.warn("Failed to format compiler error: "+y),new o(p,`Error compiling shader:
`+p)}throw new o(p,u.short,u.long)}return b}v.getShaderReference=function(A,M){var g=this.gl,b=this.shaders[A===g.FRAGMENT_SHADER|0],p=b[M];if(!p||!g.isShader(p.shader)){var u=c(g,A,M);p=b[M]=new h(s++,M,A,u,[],1,this)}else p.count+=1;return p};function T(A,M,g,b,p){var u=A.createProgram();A.attachShader(u,M),A.attachShader(u,g);for(var y=0;y<b.length;++y)A.bindAttribLocation(u,p[y],b[y]);if(A.linkProgram(u),!A.getProgramParameter(u,A.LINK_STATUS)){var m=A.getProgramInfoLog(u);throw new o(m,"Error linking program: "+m)}return u}v.getProgram=function(A,M,g,b){var p=[A.id,M.id,g.join(":"),b.join(":")].join("@"),u=this.programs[p];return(!u||!this.gl.isProgram(u))&&(this.programs[p]=u=T(this.gl,A.shader,M.shader,g,b),A.programs.push(p),M.programs.push(p)),u};function l(A){var M=i.get(A);return M||(M=new f(A),i.set(A,M)),M}function _(A,M,g){return l(A).getShaderReference(M,g)}function w(A,M,g,b,p){return l(A).getProgram(M,g,b,p)}},1493:function(e,t,r){"use strict";var o=r(3236),a=r(9405),n=o([`precision mediump float;
#define GLSLIFY 1
attribute vec3 position, color;
attribute float weight;
uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;
varying vec4 fragColor;
void main() {
vec3 vertexPosition = mix(coordinates[0],
mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));
vec4 clipPos = projection * (view * (model * vec4(vertexPosition, 1.0)));
vec2 clipOffset = (projection * (view * (model * vec4(color, 0.0)))).xy;
vec2 delta = weight * clipOffset * screenShape;
vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;
gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),i=o([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449:function(e,t,r){"use strict";var o=r(2762),a=r(8116),n=r(1493);e.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,A){this.gl=l,this.buffer=_,this.vao=w,this.shader=A,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=s.prototype,f=[0,0,0],v=[0,0,0],c=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(l){},h.draw=function(l){var _=this.gl,w=this.vao,A=this.shader;w.bind(),A.bind();var M=l.model||i,g=l.view||i,b=l.projection||i,p;this.axes&&(p=this.axes.lastCubeProps.axis);for(var u=f,y=v,m=0;m<3;++m)p&&p[m]<0?(u[m]=this.bounds[0][m],y[m]=this.bounds[1][m]):(u[m]=this.bounds[1][m],y[m]=this.bounds[0][m]);c[0]=_.drawingBufferWidth,c[1]=_.drawingBufferHeight,A.uniforms.model=M,A.uniforms.view=g,A.uniforms.projection=b,A.uniforms.coordinates=[this.position,u,y],A.uniforms.colors=this.colors,A.uniforms.screenShape=c;for(var m=0;m<3;++m)A.uniforms.lineWidth=this.lineWidth[m]*this.pixelRatio,this.enabled[m]&&(w.draw(_.TRIANGLES,6,6*m),this.drawSides[m]&&w.draw(_.TRIANGLES,12,18+12*m));w.unbind()},h.update=function(l){l&&("bounds"in l&&(this.bounds=l.bounds),"position"in l&&(this.position=l.position),"lineWidth"in l&&(this.lineWidth=l.lineWidth),"colors"in l&&(this.colors=l.colors),"enabled"in l&&(this.enabled=l.enabled),"drawSides"in l&&(this.drawSides=l.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(l,_){var w=[];function A(u,y,m,R,L,z){var F=[u,y,m,0,0,0,1];F[R+3]=1,F[R]=L,w.push.apply(w,F),F[6]=-1,w.push.apply(w,F),F[R]=z,w.push.apply(w,F),w.push.apply(w,F),F[6]=1,w.push.apply(w,F),F[R]=L,w.push.apply(w,F)}A(0,0,0,0,0,1),A(0,0,0,1,0,1),A(0,0,0,2,0,1),A(1,0,0,1,-1,1),A(1,0,0,2,-1,1),A(0,1,0,0,-1,1),A(0,1,0,2,-1,1),A(0,0,1,0,-1,1),A(0,0,1,1,-1,1);var M=o(l,w),g=a(l,[{type:l.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:l.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:l.FLOAT,buffer:M,size:1,offset:24,stride:28}]),b=n(l);b.attributes.position.location=0,b.attributes.color.location=1,b.attributes.weight.location=2;var p=new s(l,M,g,b);return p.update(_),p}},6740:function(e,t,r){var o=r(3236),a=o([`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 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;
}
`]),n=o([`#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;
}
`]),i=o([`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;
}
`]),s=o([`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);
}`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){"use strict";var o=r(2931),a=r(9970),n=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(A,M,g,b){for(var p=A.points,u=A.velocities,y=A.divergences,m=[],R=[],L=[],z=[],F=[],N=[],O=0,P=0,U=a.create(),B=a.create(),X=8,$=0;$<p.length;$++){var le=p[$],ce=u[$],de=y[$];M===0&&(de=g*.05),P=o.length(ce)/b,U=a.create(),o.copy(U,ce),U[3]=de;for(var G=0;G<X;G++)F[G]=[le[0],le[1],le[2],G];if(z.length>0)for(var G=0;G<X;G++){var Y=(G+1)%X;m.push(z[G],F[G],F[Y],F[Y],z[Y],z[G]),L.push(B,U,U,U,B,B),N.push(O,P,P,P,O,O);var ee=m.length;R.push([ee-6,ee-5,ee-4],[ee-3,ee-2,ee-1])}var q=z;z=F,F=q;var se=B;B=U,U=se;var ae=O;O=P,P=ae}return{positions:m,cells:R,vectors:L,vertexIntensity:N}},s=function(A,M,g,b){for(var p=0,u=0;u<A.length;u++)for(var y=A[u].velocities,m=0;m<y.length;m++)p=Math.max(p,o.length(y[m]));for(var R=A.map(function($){return i($,g,b,p)}),L=[],z=[],F=[],N=[],u=0;u<R.length;u++){var O=R[u],P=L.length;L=L.concat(O.positions),F=F.concat(O.vectors),N=N.concat(O.vertexIntensity);for(var m=0;m<O.cells.length;m++){var U=O.cells[m],B=[];z.push(B);for(var X=0;X<U.length;X++)B.push(U[X]+P)}}return{positions:L,cells:z,vectors:F,vertexIntensity:N,colormap:M}},h=function(A,M){var g=A.length,b;for(b=0;b<g;b++){var p=A[b];if(p===M)return b;if(p>M)return b-1}return b},f=function(A,M,g){return A<M?M:A>g?g:A},v=function(A,M,g){var b=M.vectors,p=M.meshgrid,u=A[0],y=A[1],m=A[2],R=p[0].length,L=p[1].length,z=p[2].length,F=h(p[0],u),N=h(p[1],y),O=h(p[2],m),P=F+1,U=N+1,B=O+1;if(F=f(F,0,R-1),P=f(P,0,R-1),N=f(N,0,L-1),U=f(U,0,L-1),O=f(O,0,z-1),B=f(B,0,z-1),F<0||N<0||O<0||P>R-1||U>L-1||B>z-1)return o.create();var X=p[0][F],$=p[0][P],le=p[1][N],ce=p[1][U],de=p[2][O],G=p[2][B],Y=(u-X)/($-X),ee=(y-le)/(ce-le),q=(m-de)/(G-de);isFinite(Y)||(Y=.5),isFinite(ee)||(ee=.5),isFinite(q)||(q=.5);var se,ae,j,Q,re,pe;switch(g.reversedX&&(F=R-1-F,P=R-1-P),g.reversedY&&(N=L-1-N,U=L-1-U),g.reversedZ&&(O=z-1-O,B=z-1-B),g.filled){case 5:re=O,pe=B,j=N*z,Q=U*z,se=F*z*L,ae=P*z*L;break;case 4:re=O,pe=B,se=F*z,ae=P*z,j=N*z*R,Q=U*z*R;break;case 3:j=N,Q=U,re=O*L,pe=B*L,se=F*L*z,ae=P*L*z;break;case 2:j=N,Q=U,se=F*L,ae=P*L,re=O*L*R,pe=B*L*R;break;case 1:se=F,ae=P,re=O*R,pe=B*R,j=N*R*z,Q=U*R*z;break;default:se=F,ae=P,j=N*R,Q=U*R,re=O*R*L,pe=B*R*L;break}var we=b[se+j+re],Se=b[se+j+pe],Ie=b[se+Q+re],Re=b[se+Q+pe],We=b[ae+j+re],at=b[ae+j+pe],nt=b[ae+Q+re],tt=b[ae+Q+pe],qe=o.create(),he=o.create(),ue=o.create(),ne=o.create();o.lerp(qe,we,We,Y),o.lerp(he,Se,at,Y),o.lerp(ue,Ie,nt,Y),o.lerp(ne,Re,tt,Y);var Ce=o.create(),Ye=o.create();o.lerp(Ce,qe,ue,ee),o.lerp(Ye,he,ne,ee);var rt=o.create();return o.lerp(rt,Ce,Ye,q),rt},c=function(A,M){var g=M[0],b=M[1],p=M[2];return A[0]=g<0?-g:g,A[1]=b<0?-b:b,A[2]=p<0?-p:p,A},T=function(A){var M=1/0;A.sort(function(u,y){return u-y});for(var g=A.length,b=1;b<g;b++){var p=Math.abs(A[b]-A[b-1]);p<M&&(M=p)}return M},l=function(A){for(var M=[],g=[],b=[],p={},u={},y={},m=A.length,R=0;R<m;R++){var L=A[R],z=L[0],F=L[1],N=L[2];p[z]||(M.push(z),p[z]=!0),u[F]||(g.push(F),u[F]=!0),y[N]||(b.push(N),y[N]=!0)}var O=T(M),P=T(g),U=T(b),B=Math.min(O,P,U);return isFinite(B)?B:1};e.exports=function(A,M){var g=A.startingPositions,b=A.maxLength||1e3,p=A.tubeSize||1,u=A.absoluteTubeSize,y=A.gridFill||"+x+y+z",m={};y.indexOf("-x")!==-1&&(m.reversedX=!0),y.indexOf("-y")!==-1&&(m.reversedY=!0),y.indexOf("-z")!==-1&&(m.reversedZ=!0),m.filled=n.indexOf(y.replace(/-/g,"").replace(/\+/g,""));var R=A.getVelocity||function(at){return v(at,A,m)},L=A.getDivergence||function(at,nt){var tt=o.create(),qe=1e-4;o.add(tt,at,[qe,0,0]);var he=R(tt);o.subtract(he,he,nt),o.scale(he,he,1/qe),o.add(tt,at,[0,qe,0]);var ue=R(tt);o.subtract(ue,ue,nt),o.scale(ue,ue,1/qe),o.add(tt,at,[0,0,qe]);var ne=R(tt);return o.subtract(ne,ne,nt),o.scale(ne,ne,1/qe),o.add(tt,he,ue),o.add(tt,tt,ne),tt},z=[],F=M[0][0],N=M[0][1],O=M[0][2],P=M[1][0],U=M[1][1],B=M[1][2],X=function(at){var nt=at[0],tt=at[1],qe=at[2];return!(nt<F||nt>P||tt<N||tt>U||qe<O||qe>B)},$=o.distance(M[0],M[1]),le=10*$/b,ce=le*le,de=1,G=0,Y=g.length;Y>1&&(de=l(g));for(var ee=0;ee<Y;ee++){var q=o.create();o.copy(q,g[ee]);var se=[q],ae=[],j=R(q),Q=q;ae.push(j);var re=[],pe=L(q,j),we=o.length(pe);isFinite(we)&&we>G&&(G=we),re.push(we),z.push({points:se,velocities:ae,divergences:re});for(var Se=0;Se<b*100&&se.length<b&&X(q);){Se++;var Ie=o.clone(j),Re=o.squaredLength(Ie);if(Re===0)break;if(Re>ce&&o.scale(Ie,Ie,le/Math.sqrt(Re)),o.add(Ie,Ie,q),j=R(Ie),o.squaredDistance(Q,Ie)-ce>-1e-4*ce){se.push(Ie),Q=Ie,ae.push(j);var pe=L(Ie,j),we=o.length(pe);isFinite(we)&&we>G&&(G=we),re.push(we)}q=Ie}}var We=s(z,A.colormap,G,de);return u?We.tubeScale=u:(G===0&&(G=1),We.tubeScale=p*.5*de/G),We};var _=r(6740),w=r(6405).createMesh;e.exports.createTubeMesh=function(A,M){return w(A,M,{shaders:_,traceType:"streamtube"})}},990:function(e,t,r){var o=r(9405),a=r(3236),n=a([`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);
}
`]),i=a([`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;
}
`]),s=a([`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);
}
`]),h=a([`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));
}
`]);t.createShader=function(f){var v=o(f,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},t.createPickShader=function(f){var v=o(f,n,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},t.createContourShader=function(f){var v=o(f,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},t.createPickContourShader=function(f){var v=o(f,s,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(e,t,r){"use strict";e.exports=se;var o=r(8828),a=r(2762),n=r(8116),i=r(7766),s=r(1888),h=r(6729),f=r(5298),v=r(9994),c=r(9618),T=r(3711),l=r(6760),_=r(7608),w=r(2478),A=r(6199),M=r(990),g=M.createShader,b=M.createContourShader,p=M.createPickShader,u=M.createPickContourShader,y=4*10,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],L=[[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 ae=0;ae<3;++ae){var j=L[ae],Q=(ae+1)%3,re=(ae+2)%3;j[Q+0]=1,j[re+3]=1,j[ae+6]=1}})();function z(ae,j,Q,re,pe){this.position=ae,this.index=j,this.uv=Q,this.level=re,this.dataCoordinate=pe}var F=256;function N(ae,j,Q,re,pe,we,Se,Ie,Re,We,at,nt,tt,qe,he){this.gl=ae,this.shape=j,this.bounds=Q,this.objectOffset=he,this.intensityBounds=[],this._shader=re,this._pickShader=pe,this._coordinateBuffer=we,this._vao=Se,this._colorMap=Ie,this._contourShader=Re,this._contourPickShader=We,this._contourBuffer=at,this._contourVAO=nt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new z([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=tt,this._dynamicVAO=qe,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=[c(s.mallocFloat(1024),[0,0]),c(s.mallocFloat(1024),[0,0]),c(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var O=N.prototype;O.genColormap=function(ae,j){var Q=!1,re=v([h({colormap:ae,nshades:F,format:"rgba"}).map(function(pe,we){var Se=j?P(we/255,j):pe[3];return Se<1&&(Q=!0),[pe[0],pe[1],pe[2],255*Se]})]);return f.divseq(re,255),this.hasAlphaScale=Q,re},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(ae){this.pickId=ae};function P(ae,j){if(!j||!j.length)return 1;for(var Q=0;Q<j.length;++Q){if(j.length<2)return 1;if(j[Q][0]===ae)return j[Q][1];if(j[Q][0]>ae&&Q>0){var re=(j[Q][0]-ae)/(j[Q][0]-j[Q-1][0]);return j[Q][1]*(1-re)+re*j[Q-1][1]}}return 1}var U=[0,0,0],B={showSurface:!1,showContour:!1,projections:[m.slice(),m.slice(),m.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(ae,j){var Q,re,pe,we=j.axes&&j.axes.lastCubeProps.axis||U,Se=j.showSurface,Ie=j.showContour;for(Q=0;Q<3;++Q)for(Se=Se||j.surfaceProject[Q],re=0;re<3;++re)Ie=Ie||j.contourProject[Q][re];for(Q=0;Q<3;++Q){var Re=B.projections[Q];for(re=0;re<16;++re)Re[re]=0;for(re=0;re<4;++re)Re[5*re]=1;Re[5*Q]=0,Re[12+Q]=j.axesBounds[+(we[Q]>0)][Q],l(Re,ae.model,Re);var We=B.clipBounds[Q];for(pe=0;pe<2;++pe)for(re=0;re<3;++re)We[pe][re]=ae.clipBounds[pe][re];We[0][Q]=-1e8,We[1][Q]=1e8}return B.showSurface=Se,B.showContour=Ie,B}var $={model:m,view:m,projection:m,inverseModel:m.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},le=m.slice(),ce=[1,0,0,0,1,0,0,0,1];function de(ae,j){ae=ae||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=$;re.model=ae.model||m,re.view=ae.view||m,re.projection=ae.projection||m,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=_(re.inverseModel,re.model);for(var pe=0;pe<2;++pe)for(var we=re.clipBounds[pe],Se=0;Se<3;++Se)we[Se]=Math.min(Math.max(this.clipBounds[pe][Se],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=ce,re.vertexColor=this.vertexColor;var Ie=le;for(l(Ie,re.view,re.model),l(Ie,re.projection,Ie),_(Ie,Ie),pe=0;pe<3;++pe)re.eyePosition[pe]=Ie[12+pe]/Ie[15];var Re=Ie[15];for(pe=0;pe<3;++pe)Re+=this.lightPosition[pe]*Ie[4*pe+3];for(pe=0;pe<3;++pe){var We=Ie[12+pe];for(Se=0;Se<3;++Se)We+=Ie[4*Se+pe]*this.lightPosition[Se];re.lightPosition[pe]=We/Re}var at=X(re,this);if(at.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),pe=0;pe<3;++pe)!this.surfaceProject[pe]||!this.vertexCount||(this._shader.uniforms.model=at.projections[pe],this._shader.uniforms.clipBounds=at.clipBounds[pe],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(at.showContour){var nt=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,nt.bind(),nt.uniforms=re;var tt=this._contourVAO;for(tt.bind(),pe=0;pe<3;++pe)for(nt.uniforms.permutation=L[pe],Q.lineWidth(this.contourWidth[pe]*this.pixelRatio),Se=0;Se<this.contourLevels[pe].length;++Se)Se===this.highlightLevel[pe]?(nt.uniforms.contourColor=this.highlightColor[pe],nt.uniforms.contourTint=this.highlightTint[pe]):(Se===0||Se-1===this.highlightLevel[pe])&&(nt.uniforms.contourColor=this.contourColor[pe],nt.uniforms.contourTint=this.contourTint[pe]),this._contourCounts[pe][Se]&&(nt.uniforms.height=this.contourLevels[pe][Se],tt.draw(Q.LINES,this._contourCounts[pe][Se],this._contourOffsets[pe][Se]));for(pe=0;pe<3;++pe)for(nt.uniforms.model=at.projections[pe],nt.uniforms.clipBounds=at.clipBounds[pe],Se=0;Se<3;++Se)if(this.contourProject[pe][Se]){nt.uniforms.permutation=L[Se],Q.lineWidth(this.contourWidth[Se]*this.pixelRatio);for(var qe=0;qe<this.contourLevels[Se].length;++qe)qe===this.highlightLevel[Se]?(nt.uniforms.contourColor=this.highlightColor[Se],nt.uniforms.contourTint=this.highlightTint[Se]):(qe===0||qe-1===this.highlightLevel[Se])&&(nt.uniforms.contourColor=this.contourColor[Se],nt.uniforms.contourTint=this.contourTint[Se]),this._contourCounts[Se][qe]&&(nt.uniforms.height=this.contourLevels[Se][qe],tt.draw(Q.LINES,this._contourCounts[Se][qe],this._contourOffsets[Se][qe]))}for(tt.unbind(),tt=this._dynamicVAO,tt.bind(),pe=0;pe<3;++pe)if(this._dynamicCounts[pe]!==0)for(nt.uniforms.model=re.model,nt.uniforms.clipBounds=re.clipBounds,nt.uniforms.permutation=L[pe],Q.lineWidth(this.dynamicWidth[pe]*this.pixelRatio),nt.uniforms.contourColor=this.dynamicColor[pe],nt.uniforms.contourTint=this.dynamicTint[pe],nt.uniforms.height=this.dynamicLevel[pe],tt.draw(Q.LINES,this._dynamicCounts[pe],this._dynamicOffsets[pe]),Se=0;Se<3;++Se)this.contourProject[Se][pe]&&(nt.uniforms.model=at.projections[Se],nt.uniforms.clipBounds=at.clipBounds[Se],tt.draw(Q.LINES,this._dynamicCounts[pe],this._dynamicOffsets[pe]));tt.unbind()}}O.draw=function(ae){return de.call(this,ae,!1)},O.drawTransparent=function(ae){return de.call(this,ae,!0)};var G={model:m,view:m,projection:m,inverseModel:m,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};O.drawPick=function(ae){ae=ae||{};var j=this.gl;j.disable(j.CULL_FACE);var Q=G;Q.model=ae.model||m,Q.view=ae.view||m,Q.projection=ae.projection||m,Q.shape=this._field[2].shape,Q.pickId=this.pickId/255,Q.lowerBound=this.bounds[0],Q.upperBound=this.bounds[1],Q.objectOffset=this.objectOffset,Q.permutation=ce;for(var re=0;re<2;++re)for(var pe=Q.clipBounds[re],we=0;we<3;++we)pe[we]=Math.min(Math.max(this.clipBounds[re][we],-1e8),1e8);var Se=X(Q,this);if(Se.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Q,this._vao.bind(),this._vao.draw(j.TRIANGLES,this._vertexCount),re=0;re<3;++re)this.surfaceProject[re]&&(this._pickShader.uniforms.model=Se.projections[re],this._pickShader.uniforms.clipBounds=Se.clipBounds[re],this._vao.draw(j.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Se.showContour){var Ie=this._contourPickShader;Ie.bind(),Ie.uniforms=Q;var Re=this._contourVAO;for(Re.bind(),we=0;we<3;++we)for(j.lineWidth(this.contourWidth[we]*this.pixelRatio),Ie.uniforms.permutation=L[we],re=0;re<this.contourLevels[we].length;++re)this._contourCounts[we][re]&&(Ie.uniforms.height=this.contourLevels[we][re],Re.draw(j.LINES,this._contourCounts[we][re],this._contourOffsets[we][re]));for(re=0;re<3;++re)for(Ie.uniforms.model=Se.projections[re],Ie.uniforms.clipBounds=Se.clipBounds[re],we=0;we<3;++we)if(this.contourProject[re][we]){Ie.uniforms.permutation=L[we],j.lineWidth(this.contourWidth[we]*this.pixelRatio);for(var We=0;We<this.contourLevels[we].length;++We)this._contourCounts[we][We]&&(Ie.uniforms.height=this.contourLevels[we][We],Re.draw(j.LINES,this._contourCounts[we][We],this._contourOffsets[we][We]))}Re.unbind()}},O.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;var j=this._field[2].shape,Q=this._pickResult,re=j[0]*(ae.value[0]+(ae.value[2]>>4)/16)/255,pe=Math.floor(re),we=re-pe,Se=j[1]*(ae.value[1]+(ae.value[2]&15)/16)/255,Ie=Math.floor(Se),Re=Se-Ie;pe+=1,Ie+=1;var We=Q.position;We[0]=We[1]=We[2]=0;for(var at=0;at<2;++at)for(var nt=at?we:1-we,tt=0;tt<2;++tt)for(var qe=tt?Re:1-Re,he=pe+at,ue=Ie+tt,ne=nt*qe,Ce=0;Ce<3;++Ce)We[Ce]+=this._field[Ce].get(he,ue)*ne;for(var Ye=this._pickResult.level,rt=0;rt<3;++rt)if(Ye[rt]=w.le(this.contourLevels[rt],We[rt]),Ye[rt]<0)this.contourLevels[rt].length>0&&(Ye[rt]=0);else if(Ye[rt]<this.contourLevels[rt].length-1){var Ke=this.contourLevels[rt][Ye[rt]],Mt=this.contourLevels[rt][Ye[rt]+1];Math.abs(Ke-We[rt])>Math.abs(Mt-We[rt])&&(Ye[rt]+=1)}for(Q.index[0]=we<.5?pe:pe+1,Q.index[1]=Re<.5?Ie:Ie+1,Q.uv[0]=re/j[0],Q.uv[1]=Se/j[1],Ce=0;Ce<3;++Ce)Q.dataCoordinate[Ce]=this._field[Ce].get(Q.index[0],Q.index[1]);return Q},O.padField=function(ae,j){var Q=j.shape.slice(),re=ae.shape.slice();f.assign(ae.lo(1,1).hi(Q[0],Q[1]),j),f.assign(ae.lo(1).hi(Q[0],1),j.hi(Q[0],1)),f.assign(ae.lo(1,re[1]-1).hi(Q[0],1),j.lo(0,Q[1]-1).hi(Q[0],1)),f.assign(ae.lo(0,1).hi(1,Q[1]),j.hi(1)),f.assign(ae.lo(re[0]-1,1).hi(1,Q[1]),j.lo(Q[0]-1)),ae.set(0,0,j.get(0,0)),ae.set(0,re[1]-1,j.get(0,Q[1]-1)),ae.set(re[0]-1,0,j.get(Q[0]-1,0)),ae.set(re[0]-1,re[1]-1,j.get(Q[0]-1,Q[1]-1))};function Y(ae,j){return Array.isArray(ae)?[j(ae[0]),j(ae[1]),j(ae[2])]:[j(ae),j(ae),j(ae)]}function ee(ae){return Array.isArray(ae)?ae.length===3?[ae[0],ae[1],ae[2],1]:[ae[0],ae[1],ae[2],ae[3]]:[0,0,0,1]}function q(ae){if(Array.isArray(ae)){if(Array.isArray(ae))return[ee(ae[0]),ee(ae[1]),ee(ae[2])];var j=ee(ae);return[j.slice(),j.slice(),j.slice()]}}O.update=function(ae){ae=ae||{},this.objectOffset=ae.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ae&&(this.contourWidth=Y(ae.contourWidth,Number)),"showContour"in ae&&(this.showContour=Y(ae.showContour,Boolean)),"showSurface"in ae&&(this.showSurface=!!ae.showSurface),"contourTint"in ae&&(this.contourTint=Y(ae.contourTint,Boolean)),"contourColor"in ae&&(this.contourColor=q(ae.contourColor)),"contourProject"in ae&&(this.contourProject=Y(ae.contourProject,function(pi){return Y(pi,Boolean)})),"surfaceProject"in ae&&(this.surfaceProject=ae.surfaceProject),"dynamicColor"in ae&&(this.dynamicColor=q(ae.dynamicColor)),"dynamicTint"in ae&&(this.dynamicTint=Y(ae.dynamicTint,Number)),"dynamicWidth"in ae&&(this.dynamicWidth=Y(ae.dynamicWidth,Number)),"opacity"in ae&&(this.opacity=ae.opacity),"opacityscale"in ae&&(this.opacityscale=ae.opacityscale),"colorBounds"in ae&&(this.colorBounds=ae.colorBounds),"vertexColor"in ae&&(this.vertexColor=ae.vertexColor?1:0),"colormap"in ae&&this._colorMap.setPixels(this.genColormap(ae.colormap,this.opacityscale));var j=ae.field||ae.coords&&ae.coords[2]||null,Q=!1;if(j||(this._field[2].shape[0]||this._field[2].shape[2]?j=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):j=this._field[2].hi(0,0)),"field"in ae||"coords"in ae){var re=(j.shape[0]+2)*(j.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(o.nextPow2(re))),this._field[2]=c(this._field[2].data,[j.shape[0]+2,j.shape[1]+2]),this.padField(this._field[2],j),this.shape=j.shape.slice();for(var pe=this.shape,we=0;we<2;++we)this._field[2].size>this._field[we].data.length&&(s.freeFloat(this._field[we].data),this._field[we].data=s.mallocFloat(this._field[2].size)),this._field[we]=c(this._field[we].data,[pe[0]+2,pe[1]+2]);if(ae.coords){var Se=ae.coords;if(!Array.isArray(Se)||Se.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(we=0;we<2;++we){var Ie=Se[we];for(tt=0;tt<2;++tt)if(Ie.shape[tt]!==pe[tt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[we],Ie)}}else if(ae.ticks){var Re=ae.ticks;if(!Array.isArray(Re)||Re.length!==2)throw new Error("gl-surface: invalid ticks");for(we=0;we<2;++we){var We=Re[we];if((Array.isArray(We)||We.length)&&(We=c(We)),We.shape[0]!==pe[we])throw new Error("gl-surface: invalid tick length");var at=c(We.data,pe);at.stride[we]=We.stride[0],at.stride[we^1]=0,this.padField(this._field[we],at)}}else{for(we=0;we<2;++we){var nt=[0,0];nt[we]=1,this._field[we]=c(this._field[we].data,[pe[0]+2,pe[1]+2],nt,0)}this._field[0].set(0,0,0);for(var tt=0;tt<pe[0];++tt)this._field[0].set(tt+1,0,tt);for(this._field[0].set(pe[0]+1,0,pe[0]-1),this._field[1].set(0,0,0),tt=0;tt<pe[1];++tt)this._field[1].set(0,tt+1,tt);this._field[1].set(0,pe[1]+1,pe[1]-1)}var qe=this._field,he=c(s.mallocFloat(qe[2].size*3*2),[3,pe[0]+2,pe[1]+2,2]);for(we=0;we<3;++we)A(he.pick(we),qe[we],"mirror");var ue=c(s.mallocFloat(qe[2].size*3),[pe[0]+2,pe[1]+2,3]);for(we=0;we<pe[0]+2;++we)for(tt=0;tt<pe[1]+2;++tt){var ne=he.get(0,we,tt,0),Ce=he.get(0,we,tt,1),Ye=he.get(1,we,tt,0),rt=he.get(1,we,tt,1),Ke=he.get(2,we,tt,0),Mt=he.get(2,we,tt,1),kt=Ye*Mt-rt*Ke,Nt=Ke*Ce-Mt*ne,Gt=ne*rt-Ce*Ye,Mr=Math.sqrt(kt*kt+Nt*Nt+Gt*Gt);Mr<1e-8?(Mr=Math.max(Math.abs(kt),Math.abs(Nt),Math.abs(Gt)),Mr<1e-8?(Gt=1,Nt=kt=0,Mr=1):Mr=1/Mr):Mr=1/Math.sqrt(Mr),ue.set(we,tt,0,kt*Mr),ue.set(we,tt,1,Nt*Mr),ue.set(we,tt,2,Gt*Mr)}s.free(he.data);var mr=[1/0,1/0,1/0],qr=[-1/0,-1/0,-1/0],Er=1/0,Ir=-1/0,_t=(pe[0]-1)*(pe[1]-1)*6,Oe=s.mallocFloat(o.nextPow2(10*_t)),Je=0,Ae=0;for(we=0;we<pe[0]-1;++we)e:for(tt=0;tt<pe[1]-1;++tt){for(var Le=0;Le<2;++Le)for(var Ue=0;Ue<2;++Ue)for(var Ze=0;Ze<3;++Ze){var st=this._field[Ze].get(1+we+Le,1+tt+Ue);if(isNaN(st)||!isFinite(st))continue e}for(Ze=0;Ze<6;++Ze){var ut=we+R[Ze][0],Ut=tt+R[Ze][1],Ct=this._field[0].get(ut+1,Ut+1),Pt=this._field[1].get(ut+1,Ut+1);st=this._field[2].get(ut+1,Ut+1),kt=ue.get(ut+1,Ut+1,0),Nt=ue.get(ut+1,Ut+1,1),Gt=ue.get(ut+1,Ut+1,2),ae.intensity&&(jt=ae.intensity.get(ut,Ut));var jt=ae.intensity?ae.intensity.get(ut,Ut):st+this.objectOffset[2];Oe[Je++]=ut,Oe[Je++]=Ut,Oe[Je++]=Ct,Oe[Je++]=Pt,Oe[Je++]=st,Oe[Je++]=0,Oe[Je++]=jt,Oe[Je++]=kt,Oe[Je++]=Nt,Oe[Je++]=Gt,mr[0]=Math.min(mr[0],Ct+this.objectOffset[0]),mr[1]=Math.min(mr[1],Pt+this.objectOffset[1]),mr[2]=Math.min(mr[2],st+this.objectOffset[2]),Er=Math.min(Er,jt),qr[0]=Math.max(qr[0],Ct+this.objectOffset[0]),qr[1]=Math.max(qr[1],Pt+this.objectOffset[1]),qr[2]=Math.max(qr[2],st+this.objectOffset[2]),Ir=Math.max(Ir,jt),Ae+=1}}for(ae.intensityBounds&&(Er=+ae.intensityBounds[0],Ir=+ae.intensityBounds[1]),we=6;we<Je;we+=10)Oe[we]=(Oe[we]-Er)/(Ir-Er);this._vertexCount=Ae,this._coordinateBuffer.update(Oe.subarray(0,Je)),s.freeFloat(Oe),s.free(ue.data),this.bounds=[mr,qr],this.intensity=ae.intensity||this._field[2],(this.intensityBounds[0]!==Er||this.intensityBounds[1]!==Ir)&&(Q=!0),this.intensityBounds=[Er,Ir]}if("levels"in ae){var fr=ae.levels;for(Array.isArray(fr[0])?fr=fr.slice():fr=[[],[],fr],we=0;we<3;++we)fr[we]=fr[we].slice(),fr[we].sort(function(pi,Ra){return pi-Ra});for(we=0;we<3;++we)for(tt=0;tt<fr[we].length;++tt)fr[we][tt]-=this.objectOffset[we];e:for(we=0;we<3;++we){if(fr[we].length!==this.contourLevels[we].length){Q=!0;break}for(tt=0;tt<fr[we].length;++tt)if(fr[we][tt]!==this.contourLevels[we][tt]){Q=!0;break e}}this.contourLevels=fr}if(Q){qe=this._field,pe=this.shape;for(var ur=[],sr=0;sr<3;++sr){var Pr=this.contourLevels[sr],Ta=[],Oa=[],Ia=[0,0,0];for(we=0;we<Pr.length;++we){var qa=T(this._field[sr],Pr[we]);Ta.push(ur.length/5|0),Ae=0;e:for(tt=0;tt<qa.cells.length;++tt){var Wa=qa.cells[tt];for(Ze=0;Ze<2;++Ze){var Ca=qa.positions[Wa[Ze]],hi=Ca[0],wi=Math.floor(hi)|0,Kt=hi-wi,Dt=Ca[1],Yt=Math.floor(Dt)|0,Jt=Dt-Yt,Fr=!1;t:for(var ta=0;ta<3;++ta){Ia[ta]=0;var ra=(sr+ta+1)%3;for(Le=0;Le<2;++Le){var ca=Le?Kt:1-Kt;for(ut=Math.min(Math.max(wi+Le,0),pe[0])|0,Ue=0;Ue<2;++Ue){var Ba=Ue?Jt:1-Jt;if(Ut=Math.min(Math.max(Yt+Ue,0),pe[1])|0,ta<2?st=this._field[ra].get(ut,Ut):st=(this.intensity.get(ut,Ut)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(st)||isNaN(st)){Fr=!0;break t}var $a=ca*Ba;Ia[ta]+=$a*st}}}if(!Fr)ur.push(Ia[0],Ia[1],Ca[0],Ca[1],Ia[2]),Ae+=1;else{if(Ze>0){for(var Za=0;Za<5;++Za)ur.pop();Ae-=1}continue e}}}Oa.push(Ae)}this._contourOffsets[sr]=Ta,this._contourCounts[sr]=Oa}var ri=s.mallocFloat(ur.length);for(we=0;we<ur.length;++we)ri[we]=ur[we];this._contourBuffer.update(ri),s.freeFloat(ri)}},O.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var ae=0;ae<3;++ae)s.freeFloat(this._field[ae].data)},O.highlight=function(ae){var j;if(!ae){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(j=0;j<3;++j)this.enableHighlight[j]?this.highlightLevel[j]=ae.level[j]:this.highlightLevel[j]=-1;var Q;for(this.snapToData?Q=ae.dataCoordinate:Q=ae.position,j=0;j<3;++j)Q[j]-=this.objectOffset[j];if(!((!this.enableDynamic[0]||Q[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||Q[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||Q[2]===this.dynamicLevel[2]))){for(var re=0,pe=this.shape,we=s.mallocFloat(12*pe[0]*pe[1]),Se=0;Se<3;++Se){if(!this.enableDynamic[Se]){this.dynamicLevel[Se]=NaN,this._dynamicCounts[Se]=0;continue}this.dynamicLevel[Se]=Q[Se];var Ie=(Se+1)%3,Re=(Se+2)%3,We=this._field[Se],at=this._field[Ie],nt=this._field[Re],tt=T(We,Q[Se]),qe=tt.cells,he=tt.positions;for(this._dynamicOffsets[Se]=re,j=0;j<qe.length;++j)for(var ue=qe[j],ne=0;ne<2;++ne){var Ce=he[ue[ne]],Ye=+Ce[0],rt=Ye|0,Ke=Math.min(rt+1,pe[0])|0,Mt=Ye-rt,kt=1-Mt,Nt=+Ce[1],Gt=Nt|0,Mr=Math.min(Gt+1,pe[1])|0,mr=Nt-Gt,qr=1-mr,Er=kt*qr,Ir=kt*mr,_t=Mt*qr,Oe=Mt*mr,Je=Er*at.get(rt,Gt)+Ir*at.get(rt,Mr)+_t*at.get(Ke,Gt)+Oe*at.get(Ke,Mr),Ae=Er*nt.get(rt,Gt)+Ir*nt.get(rt,Mr)+_t*nt.get(Ke,Gt)+Oe*nt.get(Ke,Mr);if(isNaN(Je)||isNaN(Ae)){ne&&(re-=1);break}we[2*re+0]=Je,we[2*re+1]=Ae,re+=1}this._dynamicCounts[Se]=re-this._dynamicOffsets[Se]}this._dynamicBuffer.update(we.subarray(0,2*re)),s.freeFloat(we)}};function se(ae){var j=ae.gl,Q=g(j),re=p(j),pe=b(j),we=u(j),Se=a(j),Ie=n(j,[{buffer:Se,size:4,stride:y,offset:0},{buffer:Se,size:3,stride:y,offset:16},{buffer:Se,size:3,stride:y,offset:28}]),Re=a(j),We=n(j,[{buffer:Re,size:4,stride:20,offset:0},{buffer:Re,size:1,stride:20,offset:16}]),at=a(j),nt=n(j,[{buffer:at,size:2,type:j.FLOAT}]),tt=i(j,1,F,j.RGBA,j.UNSIGNED_BYTE);tt.minFilter=j.LINEAR,tt.magFilter=j.LINEAR;var qe=new N(j,[0,0],[[0,0,0],[0,0,0]],Q,re,Se,Ie,tt,pe,we,Re,We,at,nt,[0,0,0]),he={levels:[[],[],[]]};for(var ue in ae)he[ue]=ae[ue];return he.colormap=he.colormap||"jet",qe.update(he),qe}},7766:function(e,t,r){"use strict";var o=r(9618),a=r(5298),n=r(1888);e.exports=u;var i=null,s=null,h=null;function f(y){i=[y.LINEAR,y.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_NEAREST,y.LINEAR_MIPMAP_NEAREST],s=[y.NEAREST,y.LINEAR,y.NEAREST_MIPMAP_NEAREST,y.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_NEAREST,y.LINEAR_MIPMAP_LINEAR],h=[y.REPEAT,y.CLAMP_TO_EDGE,y.MIRRORED_REPEAT]}function v(y){return typeof HTMLCanvasElement<"u"&&y instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&y instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&y instanceof HTMLVideoElement||typeof ImageData<"u"&&y instanceof ImageData}var c=function(y,m){a.muls(y,m,255)};function T(y,m,R){var L=y.gl,z=L.getParameter(L.MAX_TEXTURE_SIZE);if(m<0||m>z||R<0||R>z)throw new Error("gl-texture2d: Invalid texture size");return y._shape=[m,R],y.bind(),L.texImage2D(L.TEXTURE_2D,0,y.format,m,R,0,y.format,y.type,null),y._mipLevels=[0],y}function l(y,m,R,L,z,F){this.gl=y,this.handle=m,this.format=z,this.type=F,this._shape=[R,L],this._mipLevels=[0],this._magFilter=y.NEAREST,this._minFilter=y.NEAREST,this._wrapS=y.CLAMP_TO_EDGE,this._wrapT=y.CLAMP_TO_EDGE,this._anisoSamples=1;var N=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return N._wrapS},set:function(U){return N.wrapS=U}},{get:function(){return N._wrapT},set:function(U){return N.wrapT=U}}]),this._wrapVector=O;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return N._shape[0]},set:function(U){return N.width=U}},{get:function(){return N._shape[1]},set:function(U){return N.height=U}}]),this._shapeVector=P}var _=l.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(y){this.bind();var m=this.gl;if(this.type===m.FLOAT&&i.indexOf(y)>=0&&(m.getExtension("OES_texture_float_linear")||(y=m.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,y),this._minFilter=y}},magFilter:{get:function(){return this._magFilter},set:function(y){this.bind();var m=this.gl;if(this.type===m.FLOAT&&i.indexOf(y)>=0&&(m.getExtension("OES_texture_float_linear")||(y=m.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,y),this._magFilter=y}},mipSamples:{get:function(){return this._anisoSamples},set:function(y){var m=this._anisoSamples;if(this._anisoSamples=Math.max(y,1)|0,m!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,y),this._wrapS=y}},wrapT:{get:function(){return this._wrapT},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,y),this._wrapT=y}},wrap:{get:function(){return this._wrapVector},set:function(y){if(Array.isArray(y)||(y=[y,y]),y.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var m=0;m<2;++m)if(h.indexOf(y[m])<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);this._wrapS=y[0],this._wrapT=y[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),y}},shape:{get:function(){return this._shapeVector},set:function(y){if(!Array.isArray(y))y=[y|0,y|0];else if(y.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,y[0]|0,y[1]|0),[y[0]|0,y[1]|0]}},width:{get:function(){return this._shape[0]},set:function(y){return y=y|0,T(this,y,this._shape[1]),y}},height:{get:function(){return this._shape[1]},set:function(y){return y=y|0,T(this,this._shape[0],y),y}}}),_.bind=function(y){var m=this.gl;return y!==void 0&&m.activeTexture(m.TEXTURE0+(y|0)),m.bindTexture(m.TEXTURE_2D,this.handle),y!==void 0?y|0:m.getParameter(m.ACTIVE_TEXTURE)-m.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var y=Math.min(this._shape[0],this._shape[1]),m=0;y>0;++m,y>>>=1)this._mipLevels.indexOf(m)<0&&this._mipLevels.push(m)},_.setPixels=function(y,m,R,L){var z=this.gl;this.bind(),Array.isArray(m)?(L=R,R=m[1]|0,m=m[0]|0):(m=m||0,R=R||0),L=L||0;var F=v(y)?y:y.raw;if(F){var N=this._mipLevels.indexOf(L)<0;N?(z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(L)):z.texSubImage2D(z.TEXTURE_2D,L,m,R,this.format,this.type,F)}else if(y.shape&&y.stride&&y.data){if(y.shape.length<2||m+y.shape[1]>this._shape[1]>>>L||R+y.shape[0]>this._shape[0]>>>L||m<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(z,m,R,L,this.format,this.type,this._mipLevels,y)}else throw new Error("gl-texture2d: Unsupported data type")};function w(y,m){return y.length===3?m[2]===1&&m[1]===y[0]*y[2]&&m[0]===y[2]:m[0]===1&&m[1]===y[0]}function A(y,m,R,L,z,F,N,O){var P=O.dtype,U=O.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,X=0,$=w(U,O.stride.slice());P==="float32"?B=y.FLOAT:P==="float64"?(B=y.FLOAT,$=!1,P="float32"):P==="uint8"?B=y.UNSIGNED_BYTE:(B=y.UNSIGNED_BYTE,$=!1,P="uint8");var le=1;if(U.length===2)X=y.LUMINANCE,U=[U[0],U[1],1],O=o(O.data,U,[O.stride[0],O.stride[1],1],O.offset);else if(U.length===3){if(U[2]===1)X=y.ALPHA;else if(U[2]===2)X=y.LUMINANCE_ALPHA;else if(U[2]===3)X=y.RGB;else if(U[2]===4)X=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");le=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===y.LUMINANCE||X===y.ALPHA)&&(z===y.LUMINANCE||z===y.ALPHA)&&(X=z),X!==z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ce=O.size,de=N.indexOf(L)<0;if(de&&N.push(L),B===F&&$)O.offset===0&&O.data.length===ce?de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,O.data):de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data.subarray(O.offset,O.offset+ce)):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,O.data.subarray(O.offset,O.offset+ce));else{var G;F===y.FLOAT?G=n.mallocFloat32(ce):G=n.mallocUint8(ce);var Y=o(G,U,[U[2],U[2]*U[0],1]);B===y.FLOAT&&F===y.UNSIGNED_BYTE?c(Y,O):a.assign(Y,O),de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,G.subarray(0,ce)):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,G.subarray(0,ce)),F===y.FLOAT?n.freeFloat32(G):n.freeUint8(G)}}function M(y){var m=y.createTexture();return y.bindTexture(y.TEXTURE_2D,m),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),m}function g(y,m,R,L,z){var F=y.getParameter(y.MAX_TEXTURE_SIZE);if(m<0||m>F||R<0||R>F)throw new Error("gl-texture2d: Invalid texture shape");if(z===y.FLOAT&&!y.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,L,m,R,0,L,z,null),new l(y,N,m,R,L,z)}function b(y,m,R,L,z,F){var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,z,z,F,m),new l(y,N,R,L,z,F)}function p(y,m){var R=m.dtype,L=m.shape.slice(),z=y.getParameter(y.MAX_TEXTURE_SIZE);if(L[0]<0||L[0]>z||L[1]<0||L[1]>z)throw new Error("gl-texture2d: Invalid texture size");var F=w(L,m.stride.slice()),N=0;R==="float32"?N=y.FLOAT:R==="float64"?(N=y.FLOAT,F=!1,R="float32"):R==="uint8"?N=y.UNSIGNED_BYTE:(N=y.UNSIGNED_BYTE,F=!1,R="uint8");var O=0;if(L.length===2)O=y.LUMINANCE,L=[L[0],L[1],1],m=o(m.data,L,[m.stride[0],m.stride[1],1],m.offset);else if(L.length===3)if(L[2]===1)O=y.ALPHA;else if(L[2]===2)O=y.LUMINANCE_ALPHA;else if(L[2]===3)O=y.RGB;else if(L[2]===4)O=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");N===y.FLOAT&&!y.getExtension("OES_texture_float")&&(N=y.UNSIGNED_BYTE,F=!1);var P,U,B=m.size;if(F)m.offset===0&&m.data.length===B?P=m.data:P=m.data.subarray(m.offset,m.offset+B);else{var X=[L[2],L[2]*L[0],1];U=n.malloc(B,R);var $=o(U,L,X,0);(R==="float32"||R==="float64")&&N===y.UNSIGNED_BYTE?c($,m):a.assign($,m),P=U.subarray(0,B)}var le=M(y);return y.texImage2D(y.TEXTURE_2D,0,O,L[0],L[1],0,O,N,P),F||n.free(U),new l(y,le,L[0],L[1],O,N)}function u(y){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||f(y),typeof arguments[1]=="number")return g(y,arguments[1],arguments[2],arguments[3]||y.RGBA,arguments[4]||y.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(y,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var m=arguments[1],R=v(m)?m:m.raw;if(R)return b(y,R,m.width|0,m.height|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(m.shape&&m.data&&m.stride)return p(y,m)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(e){"use strict";function t(r,o,a){o?o.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i<a.length;++i){var s=a[i];if(s.buffer){var h=s.buffer,f=s.size||4,v=s.type||r.FLOAT,c=!!s.normalized,T=s.stride||0,l=s.offset||0;h.bind(),r.enableVertexAttribArray(i),r.vertexAttribPointer(i,f,v,c,T,l)}else{if(typeof s=="number")r.vertexAttrib1f(i,s);else if(s.length===1)r.vertexAttrib1f(i,s[0]);else if(s.length===2)r.vertexAttrib2f(i,s[0],s[1]);else if(s.length===3)r.vertexAttrib3f(i,s[0],s[1],s[2]);else if(s.length===4)r.vertexAttrib4f(i,s[0],s[1],s[2],s[3]);else throw new Error("gl-vao: Invalid vertex attribute");r.disableVertexAttribArray(i)}}for(;i<n;++i)r.disableVertexAttribArray(i)}else{r.bindBuffer(r.ARRAY_BUFFER,null);for(var i=0;i<n;++i)r.disableVertexAttribArray(i)}}e.exports=t},870:function(e,t,r){"use strict";var o=r(1433);function a(i){this.gl=i,this._elements=null,this._attributes=null,this._elementsType=i.UNSIGNED_SHORT}a.prototype.bind=function(){o(this.gl,this._elements,this._attributes)},a.prototype.update=function(i,s,h){this._elements=s,this._attributes=i,this._elementsType=h||this.gl.UNSIGNED_SHORT},a.prototype.dispose=function(){},a.prototype.unbind=function(){},a.prototype.draw=function(i,s,h){h=h||0;var f=this.gl;this._elements?f.drawElements(i,s,this._elementsType,h):f.drawArrays(i,h,s)};function n(i){return new a(i)}e.exports=n},7518:function(e,t,r){"use strict";var o=r(1433);function a(s,h,f,v,c,T){this.location=s,this.dimension=h,this.a=f,this.b=v,this.c=c,this.d=T}a.prototype.bind=function(s){switch(this.dimension){case 1:s.vertexAttrib1f(this.location,this.a);break;case 2:s.vertexAttrib2f(this.location,this.a,this.b);break;case 3:s.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:s.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function n(s,h,f){this.gl=s,this._ext=h,this.handle=f,this._attribs=[],this._useElements=!1,this._elementsType=s.UNSIGNED_SHORT}n.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var s=0;s<this._attribs.length;++s)this._attribs[s].bind(this.gl)},n.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},n.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},n.prototype.update=function(s,h,f){if(this.bind(),o(this.gl,h,s),this.unbind(),this._attribs.length=0,s)for(var v=0;v<s.length;++v){var c=s[v];typeof c=="number"?this._attribs.push(new a(v,1,c)):Array.isArray(c)&&this._attribs.push(new a(v,c.length,c[0],c[1],c[2],c[3]))}this._useElements=!!h,this._elementsType=f||this.gl.UNSIGNED_SHORT},n.prototype.draw=function(s,h,f){f=f||0;var v=this.gl;this._useElements?v.drawElements(s,h,this._elementsType,f):v.drawArrays(s,f,h)};function i(s,h){return new n(s,h,h.createVertexArrayOES())}e.exports=i},8116:function(e,t,r){"use strict";var o=r(7518),a=r(870);function n(s){this.bindVertexArrayOES=s.bindVertexArray.bind(s),this.createVertexArrayOES=s.createVertexArray.bind(s),this.deleteVertexArrayOES=s.deleteVertexArray.bind(s)}function i(s,h,f,v){var c=s.createVertexArray?new n(s):s.getExtension("OES_vertex_array_object"),T;return c?T=o(s,c):T=a(s),T.update(h,f,v),T}e.exports=i},5632:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]+a[0],r[1]=o[1]+a[1],r[2]=o[2]+a[2],r}},8192:function(e,t,r){e.exports=i;var o=r(2825),a=r(3536),n=r(244);function i(s,h){var f=o(s[0],s[1],s[2]),v=o(h[0],h[1],h[2]);a(f,f),a(v,v);var c=n(f,v);return c>1?0:Math.acos(c)}},9226:function(e){e.exports=t;function t(r,o){return r[0]=Math.ceil(o[0]),r[1]=Math.ceil(o[1]),r[2]=Math.ceil(o[2]),r}},3126:function(e){e.exports=t;function t(r){var o=new Float32Array(3);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o}},3990:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r}},1091:function(e){e.exports=t;function t(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},5911:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2];return r[0]=i*v-s*f,r[1]=s*h-n*v,r[2]=n*f-i*h,r}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2];return Math.sqrt(a*a+n*n+i*i)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r}},244:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=a;var o=r(2613);function a(n,i){var s=n[0],h=n[1],f=n[2],v=i[0],c=i[1],T=i[2];return Math.abs(s-v)<=o*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(h-c)<=o*Math.max(1,Math.abs(h),Math.abs(c))&&Math.abs(f-T)<=o*Math.max(1,Math.abs(f),Math.abs(T))}},9265:function(e){e.exports=t;function t(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]}},2681:function(e){e.exports=t;function t(r,o){return r[0]=Math.floor(o[0]),r[1]=Math.floor(o[1]),r[2]=Math.floor(o[2]),r}},5137:function(e,t,r){e.exports=a;var o=r(1091)();function a(n,i,s,h,f,v){var c,T;for(i||(i=3),s||(s=0),h?T=Math.min(h*i+s,n.length):T=n.length,c=s;c<T;c+=i)o[0]=n[c],o[1]=n[c+1],o[2]=n[c+2],f(o,o,v),n[c]=o[0],n[c+1]=o[1],n[c+2]=o[2];return n}},2825:function(e){e.exports=t;function t(r,o,a){var n=new Float32Array(3);return n[0]=r,n[1]=o,n[2]=a,n}},2931:function(e,t,r){e.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},811:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r}},868:function(e,t,r){e.exports=r(1387)},1387:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2];return Math.sqrt(o*o+a*a+n*n)}},6658:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2];return r[0]=i+n*(a[0]-i),r[1]=s+n*(a[1]-s),r[2]=h+n*(a[2]-h),r}},7417:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r}},8107:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r}},4505:function(e,t,r){e.exports=r(5847)},5847:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a[0],r[1]=o[1]*a[1],r[2]=o[2]*a[2],r}},5093:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r}},3536:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=a*a+n*n+i*i;return s>0&&(s=1/Math.sqrt(s),r[0]=o[0]*s,r[1]=o[1]*s,r[2]=o[2]*s),r}},7636:function(e){e.exports=t;function t(r,o){o=o||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,i=Math.sqrt(1-n*n)*o;return r[0]=Math.cos(a)*i,r[1]=Math.sin(a)*i,r[2]=n*o,r}},6894:function(e){e.exports=t;function t(r,o,a,n){var i=a[1],s=a[2],h=o[1]-i,f=o[2]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=o[0],r[1]=i+h*c-f*v,r[2]=s+h*v+f*c,r}},109:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[2],h=o[0]-i,f=o[2]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=i+f*v+h*c,r[1]=o[1],r[2]=s+f*c-h*v,r}},8692:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[1],h=o[0]-i,f=o[1]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=i+h*c-f*v,r[1]=s+h*v+f*c,r[2]=o[2],r}},2447:function(e){e.exports=t;function t(r,o){return r[0]=Math.round(o[0]),r[1]=Math.round(o[1]),r[2]=Math.round(o[2]),r}},6621:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r}},8489:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o[0]+a[0]*n,r[1]=o[1]+a[1]*n,r[2]=o[2]+a[2]*n,r}},1463:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o,r[1]=a,r[2]=n,r}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2];return a*a+n*n+i*i}},3066:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2];return o*o+a*a+n*n}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r}},492:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2];return r[0]=n*a[0]+i*a[3]+s*a[6],r[1]=n*a[1]+i*a[4]+s*a[7],r[2]=n*a[2]+i*a[5]+s*a[8],r}},5673:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[3]*n+a[7]*i+a[11]*s+a[15];return h=h||1,r[0]=(a[0]*n+a[4]*i+a[8]*s+a[12])/h,r[1]=(a[1]*n+a[5]*i+a[9]*s+a[13])/h,r[2]=(a[2]*n+a[6]*i+a[10]*s+a[14])/h,r}},264:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2],c=a[3],T=c*n+f*s-v*i,l=c*i+v*n-h*s,_=c*s+h*i-f*n,w=-h*n-f*i-v*s;return r[0]=T*c+w*-h+l*-v-_*-f,r[1]=l*c+w*-f+_*-h-T*-v,r[2]=_*c+w*-v+T*-f-l*-h,r}},4361:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]+a[0],r[1]=o[1]+a[1],r[2]=o[2]+a[2],r[3]=o[3]+a[3],r}},2335:function(e){e.exports=t;function t(r){var o=new Float32Array(4);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o}},2933:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r}},7536:function(e){e.exports=t;function t(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},4691:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2],s=o[3]-r[3];return Math.sqrt(a*a+n*n+i*i+s*s)}},1373:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r[3]=o[3]/a[3],r}},3750:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]+r[3]*o[3]}},3390:function(e){e.exports=t;function t(r,o,a,n){var i=new Float32Array(4);return i[0]=r,i[1]=o,i[2]=a,i[3]=n,i}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r[3]=1/o[3],r}},6808:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2],i=r[3];return Math.sqrt(o*o+a*a+n*n+i*i)}},2573:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2],f=o[3];return r[0]=i+n*(a[0]-i),r[1]=s+n*(a[1]-s),r[2]=h+n*(a[2]-h),r[3]=f+n*(a[3]-f),r}},160:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r[3]=Math.max(o[3],a[3]),r}},2334:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r[3]=Math.min(o[3],a[3]),r}},3576:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a[0],r[1]=o[1]*a[1],r[2]=o[2]*a[2],r[3]=o[3]*a[3],r}},1498:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r[3]=-o[3],r}},5177:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=o[3],h=a*a+n*n+i*i+s*s;return h>0&&(h=1/Math.sqrt(h),r[0]=a*h,r[1]=n*h,r[2]=i*h,r[3]=s*h),r}},9131:function(e,t,r){var o=r(5177),a=r(9288);e.exports=n;function n(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),o(i,i),a(i,i,s),i}},9288:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r[3]=o[3]*a,r}},4844:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o[0]+a[0]*n,r[1]=o[1]+a[1]*n,r[2]=o[2]+a[2]*n,r[3]=o[3]+a[3]*n,r}},4578:function(e){e.exports=t;function t(r,o,a,n,i){return r[0]=o,r[1]=a,r[2]=n,r[3]=i,r}},7960:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2],s=o[3]-r[3];return a*a+n*n+i*i+s*s}},483:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2],i=r[3];return o*o+a*a+n*n+i*i}},6860:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r[3]=o[3]-a[3],r}},5352:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3];return r[0]=a[0]*n+a[4]*i+a[8]*s+a[12]*h,r[1]=a[1]*n+a[5]*i+a[9]*s+a[13]*h,r[2]=a[2]*n+a[6]*i+a[10]*s+a[14]*h,r[3]=a[3]*n+a[7]*i+a[11]*s+a[15]*h,r}},4041:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2],c=a[3],T=c*n+f*s-v*i,l=c*i+v*n-h*s,_=c*s+h*i-f*n,w=-h*n-f*i-v*s;return r[0]=T*c+w*-h+l*-v-_*-f,r[1]=l*c+w*-f+_*-h-T*-v,r[2]=_*c+w*-v+T*-f-l*-h,r[3]=o[3],r}},1848:function(e,t,r){var o=r(4905),a=r(6468);e.exports=n;function n(i){for(var s=Array.isArray(i)?i:o(i),h=0;h<s.length;h++){var f=s[h];if(f.type==="preprocessor"){var v=f.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(v&&v[2]){var c=v[1],T=v[2];return(c?a(T):T).trim()}}}}},5874:function(e,t,r){e.exports=m;var o=r(620),a=r(7827),n=r(6852),i=r(7932),s=r(3508),h=999,f=9999,v=0,c=1,T=2,l=3,_=4,w=5,A=6,M=7,g=8,b=9,p=10,u=11,y=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function m(R){var L=0,z=0,F=h,N,O,P=[],U=[],B=0,X=0,$=1,le=0,ce=0,de=!1,G=!1,Y="",ee;R=R||{};var q=n,se=o;R.version==="300 es"&&(q=s,se=i);for(var ae={},j={},L=0;L<q.length;L++)ae[q[L]]=!0;for(var L=0;L<se.length;L++)j[se[L]]=!0;return function(ne){return U=[],ne!==null?re(ne):pe()};function Q(ne){ne.length&&U.push({type:y[F],data:ne,position:ce,line:$,column:le})}function re(ne){L=0,ne.toString&&(ne=ne.toString()),Y+=ne.replace(/\r\n/g,`
`),ee=Y.length;for(var Ce;N=Y[L],L<ee;){switch(Ce=L,F){case v:L=We();break;case c:L=Re();break;case T:L=Ie();break;case l:L=at();break;case _:L=qe();break;case u:L=tt();break;case w:L=he();break;case f:L=ue();break;case b:L=Se();break;case h:L=we();break}if(Ce!==L)switch(Y[Ce]){case`
`:le=0,++$;break;default:++le;break}}return z+=L,Y=Y.slice(L),U}function pe(ne){return P.length&&Q(P.join("")),F=p,Q("(eof)"),U}function we(){return P=P.length?[]:P,O==="/"&&N==="*"?(ce=z+L-1,F=v,O=N,L+1):O==="/"&&N==="/"?(ce=z+L-1,F=c,O=N,L+1):N==="#"?(F=T,ce=z+L,L):/\s/.test(N)?(F=b,ce=z+L,L):(de=/\d/.test(N),G=/[^\w_]/.test(N),ce=z+L,F=de?_:G?l:f,L)}function Se(){return/[^\s]/g.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function Ie(){return(N==="\r"||N===`
`)&&O!=="\\"?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function Re(){return Ie()}function We(){return N==="/"&&O==="*"?(P.push(N),Q(P.join("")),F=h,L+1):(P.push(N),O=N,L+1)}function at(){if(O==="."&&/\d/.test(N))return F=w,L;if(O==="/"&&N==="*")return F=v,L;if(O==="/"&&N==="/")return F=c,L;if(N==="."&&P.length){for(;nt(P););return F=w,L}if(N===";"||N===")"||N==="("){if(P.length)for(;nt(P););return Q(N),F=h,L+1}var ne=P.length===2&&N!=="=";if(/[\w_\d\s]/.test(N)||ne){for(;nt(P););return F=h,L}return P.push(N),O=N,L+1}function nt(ne){var Ce=0,Ye,rt;do{if(Ye=a.indexOf(ne.slice(0,ne.length+Ce).join("")),rt=a[Ye],Ye===-1){if(Ce--+ne.length>0)continue;rt=ne.slice(0,1).join("")}return Q(rt),ce+=rt.length,P=P.slice(rt.length),P.length}while(!0)}function tt(){return/[^a-fA-F0-9]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function qe(){return N==="."||/[eE]/.test(N)?(P.push(N),F=w,O=N,L+1):N==="x"&&P.length===1&&P[0]==="0"?(F=u,P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function he(){return N==="f"&&(P.push(N),O=N,L+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(O)?(P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function ue(){if(/[^\d\w_]/.test(N)){var ne=P.join("");return j[ne]?F=g:ae[ne]?F=M:F=A,Q(P.join("")),F=h,L}return P.push(N),O=N,L+1}}},3508:function(e,t,r){var o=r(6852);o=o.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),e.exports=o.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(e){e.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(e,t,r){var o=r(620);e.exports=o.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(e){e.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(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var o=r(5874);e.exports=a;function a(n,i){var s=o(i),h=[];return h=h.concat(s(n)),h=h.concat(s(null)),h}},3236:function(e){e.exports=function(t){typeof t=="string"&&(t=[t]);for(var r=[].slice.call(arguments,1),o=[],a=0;a<t.length-1;a++)o.push(t[a],r[a]||"");return o.push(t[a]),o.join("")}},7520:function(e,t,r){"use strict";var o=r(9507);function a(){var n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch{n=!1}return n}e.exports=o&&a()},3778:function(e,t){t.read=function(r,o,a,n,i){var s,h,f=i*8-n-1,v=(1<<f)-1,c=v>>1,T=-7,l=a?i-1:0,_=a?-1:1,w=r[o+l];for(l+=_,s=w&(1<<-T)-1,w>>=-T,T+=f;T>0;s=s*256+r[o+l],l+=_,T-=8);for(h=s&(1<<-T)-1,s>>=-T,T+=n;T>0;h=h*256+r[o+l],l+=_,T-=8);if(s===0)s=1-c;else{if(s===v)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,n),s=s-c}return(w?-1:1)*h*Math.pow(2,s-n)},t.write=function(r,o,a,n,i,s){var h,f,v,c=s*8-i-1,T=(1<<c)-1,l=T>>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,A=n?1:-1,M=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(f=isNaN(o)?1:0,h=T):(h=Math.floor(Math.log(o)/Math.LN2),o*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+l>=1?o+=_/v:o+=_*Math.pow(2,1-l),o*v>=2&&(h++,v/=2),h+l>=T?(f=0,h=T):h+l>=1?(f=(o*v-1)*Math.pow(2,i),h=h+l):(f=o*Math.pow(2,l-1)*Math.pow(2,i),h=0));i>=8;r[a+w]=f&255,w+=A,f/=256,i-=8);for(h=h<<i|f,c+=i;c>0;r[a+w]=h&255,w+=A,h/=256,c-=8);r[a+w-A]|=M*128}},8954:function(e,t,r){"use strict";e.exports=l;var o=r(3250),a=r(6803).Fw;function n(_,w,A){this.vertices=_,this.adjacent=w,this.boundary=A,this.lastVisited=-1}n.prototype.flip=function(){var _=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=_;var w=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=w};function i(_,w,A){this.vertices=_,this.cell=w,this.index=A}function s(_,w){return a(_.vertices,w.vertices)}function h(_){return function(){var w=this.tuple;return _.apply(this,w)}}function f(_){var w=o[_+1];return w||(w=o),h(w)}var v=[];function c(_,w,A){this.dimension=_,this.vertices=w,this.simplices=A,this.interior=A.filter(function(b){return!b.boundary}),this.tuple=new Array(_+1);for(var M=0;M<=_;++M)this.tuple[M]=this.vertices[M];var g=v[_];g||(g=v[_]=f(_)),this.orient=g}var T=c.prototype;T.handleBoundaryDegeneracy=function(_,w){var A=this.dimension,M=this.vertices.length-1,g=this.tuple,b=this.vertices,p=[_];for(_.lastVisited=-M;p.length>0;){_=p.pop();for(var u=_.adjacent,y=0;y<=A;++y){var m=u[y];if(!(!m.boundary||m.lastVisited<=-M)){for(var R=m.vertices,L=0;L<=A;++L){var z=R[L];z<0?g[L]=w:g[L]=b[z]}var F=this.orient();if(F>0)return m;m.lastVisited=-M,F===0&&p.push(m)}}}return null},T.walk=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,p=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[p];e:for(;!u.boundary;){for(var y=u.vertices,m=u.adjacent,R=0;R<=M;++R)b[R]=g[y[R]];u.lastVisited=A;for(var R=0;R<=M;++R){var L=m[R];if(!(L.lastVisited>=A)){var z=b[R];b[R]=_;var F=this.orient();if(b[R]=z,F<0){u=L;continue e}else L.boundary?L.lastVisited=-A:L.lastVisited=A}}return}return u},T.addPeaks=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,p=this.interior,u=this.simplices,y=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,p.push(w);for(var m=[];y.length>0;){var w=y.pop(),R=w.vertices,L=w.adjacent,z=R.indexOf(A);if(!(z<0)){for(var F=0;F<=M;++F)if(F!==z){var N=L[F];if(!(!N.boundary||N.lastVisited>=A)){var O=N.vertices;if(N.lastVisited!==-A){for(var P=0,U=0;U<=M;++U)O[U]<0?(P=U,b[U]=_):b[U]=g[O[U]];var B=this.orient();if(B>0){O[P]=A,N.boundary=!1,p.push(N),y.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var X=N.adjacent,$=R.slice(),le=L.slice(),ce=new n($,le,!0);u.push(ce);var de=X.indexOf(w);if(!(de<0)){X[de]=ce,le[z]=N,$[F]=-1,le[F]=w,L[F]=ce,ce.flip();for(var U=0;U<=M;++U){var G=$[U];if(!(G<0||G===A)){for(var Y=new Array(M-1),ee=0,q=0;q<=M;++q){var se=$[q];se<0||q===U||(Y[ee++]=se)}m.push(new i(Y,ce,U))}}}}}}}m.sort(s);for(var F=0;F+1<m.length;F+=2){var ae=m[F],j=m[F+1],Q=ae.index,re=j.index;Q<0||re<0||(ae.cell.adjacent[ae.index]=j.cell,j.cell.adjacent[j.index]=ae.cell)}},T.insert=function(_,w){var A=this.vertices;A.push(_);var M=this.walk(_,w);if(M){for(var g=this.dimension,b=this.tuple,p=0;p<=g;++p){var u=M.vertices[p];u<0?b[p]=_:b[p]=A[u]}var y=this.orient(b);y<0||y===0&&(M=this.handleBoundaryDegeneracy(M,_),!M)||this.addPeaks(_,M)}},T.boundary=function(){for(var _=this.dimension,w=[],A=this.simplices,M=A.length,g=0;g<M;++g){var b=A[g];if(b.boundary){for(var p=new Array(_),u=b.vertices,y=0,m=0,R=0;R<=_;++R)u[R]>=0?p[y++]=u[R]:m=R&1;if(m===(_&1)){var L=p[0];p[0]=p[1],p[1]=L}w.push(p)}}return w};function l(_,w){var A=_.length;if(A===0)throw new Error("Must have at least d+1 points");var M=_[0].length;if(A<=M)throw new Error("Must input at least d+1 points");var g=_.slice(0,M+1),b=o.apply(void 0,g);if(b===0)throw new Error("Input not in general position");for(var p=new Array(M+1),u=0;u<=M;++u)p[u]=u;b<0&&(p[0]=1,p[1]=0);for(var y=new n(p,new Array(M+1),!1),m=y.adjacent,R=new Array(M+2),u=0;u<=M;++u){for(var L=p.slice(),z=0;z<=M;++z)z===u&&(L[z]=-1);var F=L[0];L[0]=L[1],L[1]=F;var N=new n(L,new Array(M+1),!0);m[u]=N,R[u]=N}R[M+1]=y;for(var u=0;u<=M;++u)for(var L=m[u].vertices,O=m[u].adjacent,z=0;z<=M;++z){var P=L[z];if(P<0){O[z]=y;continue}for(var U=0;U<=M;++U)m[U].vertices.indexOf(P)<0&&(O[z]=m[U])}for(var B=new c(M,g,R),X=!!w,u=M+1;u<A;++u)B.insert(_[u],X);return B.boundary()}},3352:function(e,t,r){"use strict";var o=r(2478),a=0,n=1,i=2;e.exports=y;function s(m,R,L,z,F){this.mid=m,this.left=R,this.right=L,this.leftPoints=z,this.rightPoints=F,this.count=(R?R.count:0)+(L?L.count:0)+z.length}var h=s.prototype;function f(m,R){m.mid=R.mid,m.left=R.left,m.right=R.right,m.leftPoints=R.leftPoints,m.rightPoints=R.rightPoints,m.count=R.count}function v(m,R){var L=b(R);m.mid=L.mid,m.left=L.left,m.right=L.right,m.leftPoints=L.leftPoints,m.rightPoints=L.rightPoints,m.count=L.count}function c(m,R){var L=m.intervals([]);L.push(R),v(m,L)}function T(m,R){var L=m.intervals([]),z=L.indexOf(R);return z<0?a:(L.splice(z,1),v(m,L),n)}h.intervals=function(m){return m.push.apply(m,this.leftPoints),this.left&&this.left.intervals(m),this.right&&this.right.intervals(m),m},h.insert=function(m){var R=this.count-this.leftPoints.length;if(this.count+=1,m[1]<this.mid)this.left?4*(this.left.count+1)>3*(R+1)?c(this,m):this.left.insert(m):this.left=b([m]);else if(m[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?c(this,m):this.right.insert(m):this.right=b([m]);else{var L=o.ge(this.leftPoints,m,M),z=o.ge(this.rightPoints,m,g);this.leftPoints.splice(L,0,m),this.rightPoints.splice(z,0,m)}},h.remove=function(m){var R=this.count-this.leftPoints;if(m[1]<this.mid){if(!this.left)return a;var L=this.right?this.right.count:0;if(4*L>3*(R-1))return T(this,m);var z=this.left.remove(m);return z===i?(this.left=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else if(m[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(R-1))return T(this,m);var z=this.right.remove(m);return z===i?(this.right=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===m?i:a;if(this.leftPoints.length===1&&this.leftPoints[0]===m){if(this.left&&this.right){for(var N=this,O=this.left;O.right;)N=O,O=O.right;if(N===this)O.right=this.right;else{var P=this.left,z=this.right;N.count-=O.count,N.right=O.left,O.left=P,O.right=z}f(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?f(this,this.left):f(this,this.right);return n}for(var P=o.ge(this.leftPoints,m,M);P<this.leftPoints.length&&this.leftPoints[P][0]===m[0];++P)if(this.leftPoints[P]===m){this.count-=1,this.leftPoints.splice(P,1);for(var z=o.ge(this.rightPoints,m,g);z<this.rightPoints.length&&this.rightPoints[z][1]===m[1];++z)if(this.rightPoints[z]===m)return this.rightPoints.splice(z,1),n}return a}};function l(m,R,L){for(var z=0;z<m.length&&m[z][0]<=R;++z){var F=L(m[z]);if(F)return F}}function _(m,R,L){for(var z=m.length-1;z>=0&&m[z][1]>=R;--z){var F=L(m[z]);if(F)return F}}function w(m,R){for(var L=0;L<m.length;++L){var z=R(m[L]);if(z)return z}}h.queryPoint=function(m,R){if(m<this.mid){if(this.left){var L=this.left.queryPoint(m,R);if(L)return L}return l(this.leftPoints,m,R)}else if(m>this.mid){if(this.right){var L=this.right.queryPoint(m,R);if(L)return L}return _(this.rightPoints,m,R)}else return w(this.leftPoints,R)},h.queryInterval=function(m,R,L){if(m<this.mid&&this.left){var z=this.left.queryInterval(m,R,L);if(z)return z}if(R>this.mid&&this.right){var z=this.right.queryInterval(m,R,L);if(z)return z}return R<this.mid?l(this.leftPoints,R,L):m>this.mid?_(this.rightPoints,m,L):w(this.leftPoints,L)};function A(m,R){return m-R}function M(m,R){var L=m[0]-R[0];return L||m[1]-R[1]}function g(m,R){var L=m[1]-R[1];return L||m[0]-R[0]}function b(m){if(m.length===0)return null;for(var R=[],L=0;L<m.length;++L)R.push(m[L][0],m[L][1]);R.sort(A);for(var z=R[R.length>>1],F=[],N=[],O=[],L=0;L<m.length;++L){var P=m[L];P[1]<z?F.push(P):z<P[0]?N.push(P):O.push(P)}var U=O,B=O.slice();return U.sort(M),B.sort(g),new s(z,b(F),b(N),U,B)}function p(m){this.root=m}var u=p.prototype;u.insert=function(m){this.root?this.root.insert(m):this.root=new s(m[0],null,null,[m],[m])},u.remove=function(m){if(this.root){var R=this.root.remove(m);return R===i&&(this.root=null),R!==a}return!1},u.queryPoint=function(m,R){if(this.root)return this.root.queryPoint(m,R)},u.queryInterval=function(m,R,L){if(m<=R&&this.root)return this.root.queryInterval(m,R,L)},Object.defineProperty(u,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(u,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function y(m){return!m||m.length===0?new p(null):new p(b(m))}},9507:function(e){e.exports=!0},7163:function(e){e.exports=function(o){return o!=null&&(t(o)||r(o)||!!o._isBuffer)};function t(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}function r(o){return typeof o.readFloatLE=="function"&&typeof o.slice=="function"&&t(o.slice(0,0))}},5219:function(e){"use strict";e.exports=function(t){for(var r=t.length,o,a=0;a<r;a++)if(o=t.charCodeAt(a),(o<9||o>13)&&o!==32&&o!==133&&o!==160&&o!==5760&&o!==6158&&(o<8192||o>8205)&&o!==8232&&o!==8233&&o!==8239&&o!==8287&&o!==8288&&o!==12288&&o!==65279)return!1;return!0}},395:function(e){function t(r,o,a){return r*(1-a)+o*a}e.exports=t},2652:function(e,t,r){var o=r(4335),a=r(6864),n=r(1903),i=r(9921),s=r(7608),h=r(5665),f={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},v=a(),c=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];e.exports=function(b,p,u,y,m,R){if(p||(p=[0,0,0]),u||(u=[0,0,0]),y||(y=[0,0,0]),m||(m=[0,0,0,1]),R||(R=[0,0,0,1]),!o(v,b)||(n(c,v),c[3]=0,c[7]=0,c[11]=0,c[15]=1,Math.abs(i(c)<1e-8)))return!1;var L=v[3],z=v[7],F=v[11],N=v[12],O=v[13],P=v[14],U=v[15];if(L!==0||z!==0||F!==0){T[0]=L,T[1]=z,T[2]=F,T[3]=U;var B=s(c,c);if(!B)return!1;h(c,c),w(m,T,c)}else m[0]=m[1]=m[2]=0,m[3]=1;if(p[0]=N,p[1]=O,p[2]=P,A(l,v),u[0]=f.length(l[0]),f.normalize(l[0],l[0]),y[0]=f.dot(l[0],l[1]),M(l[1],l[1],l[0],1,-y[0]),u[1]=f.length(l[1]),f.normalize(l[1],l[1]),y[0]/=u[1],y[1]=f.dot(l[0],l[2]),M(l[2],l[2],l[0],1,-y[1]),y[2]=f.dot(l[1],l[2]),M(l[2],l[2],l[1],1,-y[2]),u[2]=f.length(l[2]),f.normalize(l[2],l[2]),y[1]/=u[2],y[2]/=u[2],f.cross(_,l[1],l[2]),f.dot(l[0],_)<0)for(var X=0;X<3;X++)u[X]*=-1,l[X][0]*=-1,l[X][1]*=-1,l[X][2]*=-1;return R[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),R[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),R[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),R[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(R[0]=-R[0]),l[0][2]>l[2][0]&&(R[1]=-R[1]),l[1][0]>l[0][1]&&(R[2]=-R[2]),!0};function w(g,b,p){var u=b[0],y=b[1],m=b[2],R=b[3];return g[0]=p[0]*u+p[4]*y+p[8]*m+p[12]*R,g[1]=p[1]*u+p[5]*y+p[9]*m+p[13]*R,g[2]=p[2]*u+p[6]*y+p[10]*m+p[14]*R,g[3]=p[3]*u+p[7]*y+p[11]*m+p[15]*R,g}function A(g,b){g[0][0]=b[0],g[0][1]=b[1],g[0][2]=b[2],g[1][0]=b[4],g[1][1]=b[5],g[1][2]=b[6],g[2][0]=b[8],g[2][1]=b[9],g[2][2]=b[10]}function M(g,b,p,u,y){g[0]=b[0]*u+p[0]*y,g[1]=b[1]*u+p[1]*y,g[2]=b[2]*u+p[2]*y}},4335:function(e){e.exports=function(r,o){var a=o[15];if(a===0)return!1;for(var n=1/a,i=0;i<16;i++)r[i]=o[i]*n;return!0}},7442:function(e,t,r){var o=r(6658),a=r(7182),n=r(2652),i=r(9921),s=r(8648),h=T(),f=T(),v=T();e.exports=c;function c(w,A,M,g){if(i(A)===0||i(M)===0)return!1;var b=n(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),p=n(M,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!b||!p?!1:(o(v.translate,h.translate,f.translate,g),o(v.skew,h.skew,f.skew,g),o(v.scale,h.scale,f.scale,g),o(v.perspective,h.perspective,f.perspective,g),s(v.quaternion,h.quaternion,f.quaternion,g),a(w,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:_(),quaternion:_()}}function l(w){return[w||0,w||0,w||0]}function _(){return[0,0,0,1]}},7182:function(e,t,r){var o={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},a=o.create(),n=o.create();e.exports=function(s,h,f,v,c,T){return o.identity(s),o.fromRotationTranslation(s,T,h),s[3]=c[0],s[7]=c[1],s[11]=c[2],s[15]=c[3],o.identity(n),v[2]!==0&&(n[9]=v[2],o.multiply(s,s,n)),v[1]!==0&&(n[9]=0,n[8]=v[1],o.multiply(s,s,n)),v[0]!==0&&(n[8]=0,n[4]=v[0],o.multiply(s,s,n)),o.scale(s,s,f),s}},1811:function(e,t,r){"use strict";var o=r(2478),a=r(7442),n=r(7608),i=r(5567),s=r(2408),h=r(7089),f=r(6582),v=r(7656),c=r(2504),T=r(3536),l=[0,0,0];e.exports=M;function _(g){this._components=g.slice(),this._time=[0],this.prevMatrix=g.slice(),this.nextMatrix=g.slice(),this.computedMatrix=g.slice(),this.computedInverse=g.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 w=_.prototype;w.recalcMatrix=function(g){var b=this._time,p=o.le(b,g),u=this.computedMatrix;if(!(p<0)){var y=this._components;if(p===b.length-1)for(var m=16*p,R=0;R<16;++R)u[R]=y[m++];else{for(var L=b[p+1]-b[p],m=16*p,z=this.prevMatrix,F=!0,R=0;R<16;++R)z[R]=y[m++];for(var N=this.nextMatrix,R=0;R<16;++R)N[R]=y[m++],F=F&&z[R]===N[R];if(L<1e-6||F)for(var R=0;R<16;++R)u[R]=z[R];else a(u,z,N,(g-b[p])/L)}var O=this.computedUp;O[0]=u[1],O[1]=u[5],O[2]=u[9],T(O,O);var P=this.computedInverse;n(P,u);var U=this.computedEye,B=P[15];U[0]=P[12]/B,U[1]=P[13]/B,U[2]=P[14]/B;for(var X=this.computedCenter,$=Math.exp(this.computedRadius[0]),R=0;R<3;++R)X[R]=U[R]-u[2+4*R]*$}},w.idle=function(g){if(!(g<this.lastT())){for(var b=this._components,p=b.length-16,u=0;u<16;++u)b.push(b[p++]);this._time.push(g)}},w.flush=function(g){var b=o.gt(this._time,g)-2;b<0||(this._time.splice(0,b),this._components.splice(0,16*b))},w.lastT=function(){return this._time[this._time.length-1]},w.lookAt=function(g,b,p,u){this.recalcMatrix(g),b=b||this.computedEye,p=p||l,u=u||this.computedUp,this.setMatrix(g,f(this.computedMatrix,b,p,u));for(var y=0,m=0;m<3;++m)y+=Math.pow(p[m]-b[m],2);y=Math.log(Math.sqrt(y)),this.computedRadius[0]=y},w.rotate=function(g,b,p,u){this.recalcMatrix(g);var y=this.computedInverse;b&&s(y,y,b),p&&i(y,y,p),u&&h(y,y,u),this.setMatrix(g,n(this.computedMatrix,y))};var A=[0,0,0];w.pan=function(g,b,p,u){A[0]=-(b||0),A[1]=-(p||0),A[2]=-(u||0),this.recalcMatrix(g);var y=this.computedInverse;v(y,y,A),this.setMatrix(g,n(y,y))},w.translate=function(g,b,p,u){A[0]=b||0,A[1]=p||0,A[2]=u||0,this.recalcMatrix(g);var y=this.computedMatrix;v(y,y,A),this.setMatrix(g,y)},w.setMatrix=function(g,b){if(!(g<this.lastT())){this._time.push(g);for(var p=0;p<16;++p)this._components.push(b[p])}},w.setDistance=function(g,b){this.computedRadius[0]=b},w.setDistanceLimits=function(g,b){var p=this._limits;p[0]=g,p[1]=b},w.getDistanceLimits=function(g){var b=this._limits;return g?(g[0]=b[0],g[1]=b[1],g):b};function M(g){g=g||{};var b=g.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new _(b)}},3090:function(e,t,r){"use strict";e.exports=a;var o=r(3250)[3];function a(n){var i=n.length;if(i<3){for(var _=new Array(i),s=0;s<i;++s)_[s]=s;return i===2&&n[0][0]===n[1][0]&&n[0][1]===n[1][1]?[0]:_}for(var h=new Array(i),s=0;s<i;++s)h[s]=s;h.sort(function(g,b){var p=n[g][0]-n[b][0];return p||n[g][1]-n[b][1]});for(var f=[h[0],h[1]],v=[h[0],h[1]],s=2;s<i;++s){for(var c=h[s],T=n[c],l=f.length;l>1&&o(n[f[l-2]],n[f[l-1]],T)<=0;)l-=1,f.pop();for(f.push(c),l=v.length;l>1&&o(n[v[l-2]],n[v[l-1]],T)>=0;)l-=1,v.pop();v.push(c)}for(var _=new Array(v.length+f.length-2),w=0,s=0,A=f.length;s<A;++s)_[w++]=f[s];for(var M=v.length-2;M>0;--M)_[w++]=v[M];return _}},351:function(e,t,r){"use strict";e.exports=a;var o=r(4687);function a(n,i){i||(i=n,n=window);var s=0,h=0,f=0,v={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function T(m){var R=!1;return"altKey"in m&&(R=R||m.altKey!==v.alt,v.alt=!!m.altKey),"shiftKey"in m&&(R=R||m.shiftKey!==v.shift,v.shift=!!m.shiftKey),"ctrlKey"in m&&(R=R||m.ctrlKey!==v.control,v.control=!!m.ctrlKey),"metaKey"in m&&(R=R||m.metaKey!==v.meta,v.meta=!!m.metaKey),R}function l(m,R){var L=o.x(R),z=o.y(R);"buttons"in R&&(m=R.buttons|0),(m!==s||L!==h||z!==f||T(R))&&(s=m|0,h=L||0,f=z||0,i&&i(s,h,f,v))}function _(m){l(0,m)}function w(){(s||h||f||v.shift||v.alt||v.meta||v.control)&&(h=f=0,s=0,v.shift=v.alt=v.control=v.meta=!1,i&&i(0,0,0,v))}function A(m){T(m)&&i&&i(s,h,f,v)}function M(m){o.buttons(m)===0?l(0,m):l(s,m)}function g(m){l(s|o.buttons(m),m)}function b(m){l(s&~o.buttons(m),m)}function p(){c||(c=!0,n.addEventListener("mousemove",M),n.addEventListener("mousedown",g),n.addEventListener("mouseup",b),n.addEventListener("mouseleave",_),n.addEventListener("mouseenter",_),n.addEventListener("mouseout",_),n.addEventListener("mouseover",_),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function u(){c&&(c=!1,n.removeEventListener("mousemove",M),n.removeEventListener("mousedown",g),n.removeEventListener("mouseup",b),n.removeEventListener("mouseleave",_),n.removeEventListener("mouseenter",_),n.removeEventListener("mouseout",_),n.removeEventListener("mouseover",_),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}p();var y={element:n};return Object.defineProperties(y,{enabled:{get:function(){return c},set:function(m){m?p():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),y}},24:function(e){var t={left:0,top:0};e.exports=r;function r(a,n,i){n=n||a.currentTarget||a.srcElement,Array.isArray(i)||(i=[0,0]);var s=a.clientX||0,h=a.clientY||0,f=o(n);return i[0]=s-f.left,i[1]=h-f.top,i}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},4687:function(e,t){"use strict";function r(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){var s=i.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<<s-1}else if("button"in i){var s=i.button;if(s===1)return 4;if(s===2)return 2;if(s>=0)return 1<<s}}return 0}t.buttons=r;function o(i){return i.target||i.srcElement||window}t.element=o;function a(i){if(typeof i=="object"){if("offsetX"in i)return i.offsetX;var s=o(i),h=s.getBoundingClientRect();return i.clientX-h.left}return 0}t.x=a;function n(i){if(typeof i=="object"){if("offsetY"in i)return i.offsetY;var s=o(i),h=s.getBoundingClientRect();return i.clientY-h.top}return 0}t.y=n},8512:function(e,t,r){"use strict";var o=r(665);e.exports=a;function a(n,i,s){typeof n=="function"&&(s=!!i,i=n,n=window);var h=o("ex",n),f=function(v){s&&v.preventDefault();var c=v.deltaX||0,T=v.deltaY||0,l=v.deltaZ||0,_=v.deltaMode,w=1;switch(_){case 1:w=h;break;case 2:w=window.innerHeight;break}if(c*=w,T*=w,l*=w,c||T||l)return i(c,T,l,v)};return n.addEventListener("wheel",f),f}},2640:function(e,t,r){"use strict";var o=r(1888);e.exports=i;var a={"false,0,1":function(h,f,v,c,T){return function(_,w,A,M){var g=_.shape[0]|0,b=_.shape[1]|0,p=_.data,u=_.offset|0,y=_.stride[0]|0,m=_.stride[1]|0,R=u,L,z=-y|0,F=0,N=-m|0,O=0,P=-y-m|0,U=0,B=y|0,X=m-y*g|0,$=0,le=0,ce=0,de=2*g|0,G=c(de),Y=c(de),ee=0,q=0,se=-1,ae=-1,j=0,Q=-g|0,re=g|0,pe=0,we=-g-1|0,Se=g-1|0,Ie=0,Re=0,We=0;for($=0;$<g;++$)G[ee++]=v(p[R],w,A,M),R+=B;if(R+=X,b>0){if(le=1,G[ee++]=v(p[R],w,A,M),R+=B,g>0)for($=1,L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++),ee+=1,R+=B,$=2;$<g;++$)L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==j&&f(Y[ee+se],Re,U,F,Ie,j,w,A,M)),ee+=1,R+=B;for(R+=X,ee=0,We=se,se=ae,ae=We,We=Q,Q=re,re=We,We=we,we=Se,Se=We,le=2;le<b;++le){if(G[ee++]=v(p[R],w,A,M),R+=B,g>0)for($=1,L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==pe&&f(Y[ee+Q],Re,O,U,pe,Ie,w,A,M)),ee+=1,R+=B,$=2;$<g;++$)L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==pe&&f(Y[ee+Q],Re,O,U,pe,Ie,w,A,M),Ie!==j&&f(Y[ee+se],Re,U,F,Ie,j,w,A,M)),ee+=1,R+=B;le&1&&(ee=0),We=se,se=ae,ae=We,We=Q,Q=re,re=We,We=we,we=Se,Se=We,R+=X}}T(Y),T(G)}},"false,1,0":function(h,f,v,c,T){return function(_,w,A,M){var g=_.shape[0]|0,b=_.shape[1]|0,p=_.data,u=_.offset|0,y=_.stride[0]|0,m=_.stride[1]|0,R=u,L,z=-y|0,F=0,N=-m|0,O=0,P=-y-m|0,U=0,B=m|0,X=y-m*b|0,$=0,le=0,ce=0,de=2*b|0,G=c(de),Y=c(de),ee=0,q=0,se=-1,ae=-1,j=0,Q=-b|0,re=b|0,pe=0,we=-b-1|0,Se=b-1|0,Ie=0,Re=0,We=0;for(le=0;le<b;++le)G[ee++]=v(p[R],w,A,M),R+=B;if(R+=X,g>0){if($=1,G[ee++]=v(p[R],w,A,M),R+=B,b>0)for(le=1,L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++),ee+=1,R+=B,le=2;le<b;++le)L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==j&&f(Y[ee+se],Re,O,U,j,Ie,w,A,M)),ee+=1,R+=B;for(R+=X,ee=0,We=Q,Q=re,re=We,We=se,se=ae,ae=We,We=we,we=Se,Se=We,$=2;$<g;++$){if(G[ee++]=v(p[R],w,A,M),R+=B,b>0)for(le=1,L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==pe&&f(Y[ee+Q],Re,U,F,Ie,pe,w,A,M)),ee+=1,R+=B,le=2;le<b;++le)L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==j&&f(Y[ee+se],Re,O,U,j,Ie,w,A,M),Ie!==pe&&f(Y[ee+Q],Re,U,F,Ie,pe,w,A,M)),ee+=1,R+=B;$&1&&(ee=0),We=Q,Q=re,re=We,We=se,se=ae,ae=We,We=we,we=Se,Se=We,R+=X}}T(Y),T(G)}}};function n(s,h,f,v,c,T){var l=[T,c].join(","),_=a[l];return _(s,h,f,o.mallocUint32,o.freeUint32)}function i(s){function h(w){throw new Error("ndarray-extract-contour: "+w)}typeof s!="object"&&h("Must specify arguments");var f=s.order;Array.isArray(f)||h("Must specify order");var v=s.arrayArguments||1;v<1&&h("Must have at least one array argument");var c=s.scalarArguments||0;c<0&&h("Scalar arg count must be > 0"),typeof s.vertex!="function"&&h("Must specify vertex creation function"),typeof s.cell!="function"&&h("Must specify cell creation function"),typeof s.phase!="function"&&h("Must specify phase function");for(var T=s.getters||[],l=new Array(v),_=0;_<v;++_)T.indexOf(_)>=0?l[_]=!0:l[_]=!1;return n(s.vertex,s.cell,s.phase,c,f,l)}},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(M,g,b,p){var u=M[0],y=b[0];p|=0;var m=0,R=y;for(m=0;m<u;++m)g[p]=0,p+=R},fdTemplate1:function(M,g,b,p,u,y,m){var R=M[0],L=b[0],z=y[0],F=-1*L,N=L;p|=0,m|=0;var O=0,P=L,U=z;for(O=0;O<R;++O)u[m]=.5*(g[p+F]-g[p+N]),p+=P,m+=U},fdTemplate2:function(M,g,b,p,u,y,m,R,L,z){var F=M[0],N=M[1],O=b[0],P=b[1],U=y[0],B=y[1],X=L[0],$=L[1],le=-1*O,ce=O,de=-1*P,G=P;p|=0,m|=0,z|=0;var Y=0,ee=0,q=P,se=O-N*P,ae=B,j=U-N*B,Q=$,re=X-N*$;for(ee=0;ee<F;++ee){for(Y=0;Y<N;++Y)u[m]=.5*(g[p+le]-g[p+ce]),R[z]=.5*(g[p+de]-g[p+G]),p+=q,m+=ae,z+=Q;p+=se,m+=j,z+=re}}},n={cdiff:function(M){var g={};return function(p,u,y){var m=p.dtype,R=p.order,L=u.dtype,z=u.order,F=y.dtype,N=y.order,O=[m,R.join(),L,z.join(),F,N.join()].join(),P=g[O];return P||(g[O]=P=M([m,R,L,z,F,N])),P(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0,y.data,y.stride,y.offset|0)}},zero:function(M){var g={};return function(p){var u=p.dtype,y=p.order,m=[u,y.join()].join(),R=g[m];return R||(g[m]=R=M([u,y])),R(p.shape.slice(0),p.data,p.stride,p.offset|0)}},fdTemplate1:function(M){var g={};return function(p,u){var y=p.dtype,m=p.order,R=u.dtype,L=u.order,z=[y,m.join(),R,L.join()].join(),F=g[z];return F||(g[z]=F=M([y,m,R,L])),F(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0)}},fdTemplate2:function(M){var g={};return function(p,u,y){var m=p.dtype,R=p.order,L=u.dtype,z=u.order,F=y.dtype,N=y.order,O=[m,R.join(),L,z.join(),F,N.join()].join(),P=g[O];return P||(g[O]=P=M([m,R,L,z,F,N])),P(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0,y.data,y.stride,y.offset|0)}}};function i(M){var g=n[M.funcName];return g(s.bind(void 0,M))}function s(M){return a[M.funcName]}function h(M){return i({funcName:M.funcName})}var f={},v={},c={body:"",args:[],thisVars:[],localVars:[]},T=h({funcName:"cdiff"}),l=h({funcName:"zero"});function _(M){return M in f?f[M]:f[M]=h({funcName:"fdTemplate"+M})}function w(M,g,b,p){return function(u,y){var m=y.shape.slice();return m[0]>2&&m[1]>2&&p(y.pick(-1,-1).lo(1,1).hi(m[0]-2,m[1]-2),u.pick(-1,-1,0).lo(1,1).hi(m[0]-2,m[1]-2),u.pick(-1,-1,1).lo(1,1).hi(m[0]-2,m[1]-2)),m[1]>2&&(b(y.pick(0,-1).lo(1).hi(m[1]-2),u.pick(0,-1,1).lo(1).hi(m[1]-2)),g(u.pick(0,-1,0).lo(1).hi(m[1]-2))),m[1]>2&&(b(y.pick(m[0]-1,-1).lo(1).hi(m[1]-2),u.pick(m[0]-1,-1,1).lo(1).hi(m[1]-2)),g(u.pick(m[0]-1,-1,0).lo(1).hi(m[1]-2))),m[0]>2&&(b(y.pick(-1,0).lo(1).hi(m[0]-2),u.pick(-1,0,0).lo(1).hi(m[0]-2)),g(u.pick(-1,0,1).lo(1).hi(m[0]-2))),m[0]>2&&(b(y.pick(-1,m[1]-1).lo(1).hi(m[0]-2),u.pick(-1,m[1]-1,0).lo(1).hi(m[0]-2)),g(u.pick(-1,m[1]-1,1).lo(1).hi(m[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(m[0]-1,0,0,0),u.set(m[0]-1,0,1,0),u.set(0,m[1]-1,0,0),u.set(0,m[1]-1,1,0),u.set(m[0]-1,m[1]-1,0,0),u.set(m[0]-1,m[1]-1,1,0),u}}function A(M){var g=M.join(),m=v[g];if(m)return m;for(var b=M.length,p=[T,l],u=1;u<=b;++u)p.push(_(u));var y=w,m=y.apply(void 0,p);return v[g]=m,m}e.exports=function(g,b,p){if(Array.isArray(p)||(typeof p=="string"?p=o(b.dimension,p):p=o(b.dimension,"clamp")),b.size===0)return g;if(b.dimension===0)return g.set(0),g;var u=A(p);return u(g,b)}},4317:function(e){"use strict";function t(i,s){var h=Math.floor(s),f=s-h,v=0<=h&&h<i.shape[0],c=0<=h+1&&h+1<i.shape[0],T=v?+i.get(h):0,l=c?+i.get(h+1):0;return(1-f)*T+f*l}function r(i,s,h){var f=Math.floor(s),v=s-f,c=0<=f&&f<i.shape[0],T=0<=f+1&&f+1<i.shape[0],l=Math.floor(h),_=h-l,w=0<=l&&l<i.shape[1],A=0<=l+1&&l+1<i.shape[1],M=c&&w?i.get(f,l):0,g=c&&A?i.get(f,l+1):0,b=T&&w?i.get(f+1,l):0,p=T&&A?i.get(f+1,l+1):0;return(1-_)*((1-v)*M+v*b)+_*((1-v)*g+v*p)}function o(i,s,h,f){var v=Math.floor(s),c=s-v,T=0<=v&&v<i.shape[0],l=0<=v+1&&v+1<i.shape[0],_=Math.floor(h),w=h-_,A=0<=_&&_<i.shape[1],M=0<=_+1&&_+1<i.shape[1],g=Math.floor(f),b=f-g,p=0<=g&&g<i.shape[2],u=0<=g+1&&g+1<i.shape[2],y=T&&A&&p?i.get(v,_,g):0,m=T&&M&&p?i.get(v,_+1,g):0,R=l&&A&&p?i.get(v+1,_,g):0,L=l&&M&&p?i.get(v+1,_+1,g):0,z=T&&A&&u?i.get(v,_,g+1):0,F=T&&M&&u?i.get(v,_+1,g+1):0,N=l&&A&&u?i.get(v+1,_,g+1):0,O=l&&M&&u?i.get(v+1,_+1,g+1):0;return(1-b)*((1-w)*((1-c)*y+c*R)+w*((1-c)*m+c*L))+b*((1-w)*((1-c)*z+c*N)+w*((1-c)*F+c*O))}function a(i){var s=i.shape.length|0,h=new Array(s),f=new Array(s),v=new Array(s),c=new Array(s),T,l;for(T=0;T<s;++T)l=+arguments[T+1],h[T]=Math.floor(l),f[T]=l-h[T],v[T]=0<=h[T]&&h[T]<i.shape[T],c[T]=0<=h[T]+1&&h[T]+1<i.shape[T];var _=0,w,A,M;e:for(T=0;T<1<<s;++T){for(A=1,M=i.offset,w=0;w<s;++w)if(T&1<<w){if(!c[w])continue e;A*=f[w],M+=i.stride[w]*(h[w]+1)}else{if(!v[w])continue e;A*=1-f[w],M+=i.stride[w]*h[w]}_+=A*i.data[M]}return _}function n(i,s,h,f){switch(i.shape.length){case 0:return 0;case 1:return t(i,s);case 2:return r(i,s,h);case 3:return o(i,s,h,f);default:return a.apply(void 0,arguments)}}e.exports=n,e.exports.d1=t,e.exports.d2=r,e.exports.d3=o},5298:function(e,t){"use strict";var r={"float64,2,1,0":function(){return function(v,c,T,l,_){var w=v[0],A=v[1],M=v[2],g=T[0],b=T[1],p=T[2];l|=0;var u=0,y=0,m=0,R=p,L=b-M*p,z=g-A*b;for(m=0;m<w;++m){for(y=0;y<A;++y){for(u=0;u<M;++u)c[l]/=_,l+=R;l+=L}l+=z}}},"uint8,2,0,1,float64,2,1,0":function(){return function(v,c,T,l,_,w,A,M){var g=v[0],b=v[1],p=v[2],u=T[0],y=T[1],m=T[2],R=w[0],L=w[1],z=w[2];l|=0,A|=0;for(var F=l,N=A,O=v[0]|0;O>0;){O<64?(g=O,O=0):(g=64,O-=64);for(var P=v[1]|0;P>0;){P<64?(b=P,P=0):(b=64,P-=64),l=F+O*u+P*y,A=N+O*R+P*L;var U=0,B=0,X=0,$=m,le=u-p*m,ce=y-g*u,de=z,G=R-p*z,Y=L-g*R;for(X=0;X<b;++X){for(B=0;B<g;++B){for(U=0;U<p;++U)c[l]=_[A]*M,l+=$,A+=de;l+=le,A+=G}l+=ce,A+=Y}}}}},"float32,1,0,float32,1,0":function(){return function(v,c,T,l,_,w,A){var M=v[0],g=v[1],b=T[0],p=T[1],u=w[0],y=w[1];l|=0,A|=0;var m=0,R=0,L=p,z=b-g*p,F=y,N=u-g*y;for(R=0;R<M;++R){for(m=0;m<g;++m)c[l]=_[A],l+=L,A+=F;l+=z,A+=N}}},"float32,1,0,float32,0,1":function(){return function(v,c,T,l,_,w,A){var M=v[0],g=v[1],b=T[0],p=T[1],u=w[0],y=w[1];l|=0,A|=0;for(var m=l,R=A,L=v[1]|0;L>0;){L<64?(g=L,L=0):(g=64,L-=64);for(var z=v[0]|0;z>0;){z<64?(M=z,z=0):(M=64,z-=64),l=m+L*p+z*b,A=R+L*y+z*u;var F=0,N=0,O=p,P=b-g*p,U=y,B=u-g*y;for(N=0;N<M;++N){for(F=0;F<g;++F)c[l]=_[A],l+=O,A+=U;l+=P,A+=B}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(v,c,T,l,_,w,A){var M=v[0],g=v[1],b=v[2],p=T[0],u=T[1],y=T[2],m=w[0],R=w[1],L=w[2];l|=0,A|=0;for(var z=l,F=A,N=v[2]|0;N>0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=v[0]|0;O>0;){O<64?(M=O,O=0):(M=64,O-=64);for(var P=v[1]|0;P>0;){P<64?(g=P,P=0):(g=64,P-=64),l=z+N*y+O*p+P*u,A=F+N*L+O*m+P*R;var U=0,B=0,X=0,$=y,le=p-b*y,ce=u-M*p,de=L,G=m-b*L,Y=R-M*m;for(X=0;X<g;++X){for(B=0;B<M;++B){for(U=0;U<b;++U)c[l]=_[A],l+=$,A+=de;l+=le,A+=G}l+=ce,A+=Y}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(v,c,T,l,_,w,A){var M=v[0],g=v[1],b=v[2],p=T[0],u=T[1],y=T[2],m=w[0],R=w[1],L=w[2];l|=0,A|=0;var z=0,F=0,N=0,O=y,P=p-b*y,U=u-M*p,B=L,X=m-b*L,$=R-M*m;for(N=0;N<g;++N){for(F=0;F<M;++F){for(z=0;z<b;++z)c[l]=_[A],l+=O,A+=B;l+=P,A+=X}l+=U,A+=$}}}};function o(f,v){var c=v.join(","),T=r[c];return T()}var a=o,n={mul:function(f){var v={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=_.dtype,p=_.order,u=[w,A.join(),M,g.join(),b,p.join()].join(),y=v[u];return y||(v[u]=y=f([w,A,M,g,b,p])),y(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_.data,_.stride,_.offset|0)}},muls:function(f){var v={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=[w,A.join(),M,g.join()].join(),p=v[b];return p||(v[b]=p=f([w,A,M,g])),p(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},mulseq:function(f){var v={};return function(T,l){var _=T.dtype,w=T.order,A=[_,w.join()].join(),M=v[A];return M||(v[A]=M=f([_,w])),M(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},div:function(f){var v={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=_.dtype,p=_.order,u=[w,A.join(),M,g.join(),b,p.join()].join(),y=v[u];return y||(v[u]=y=f([w,A,M,g,b,p])),y(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_.data,_.stride,_.offset|0)}},divs:function(f){var v={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=[w,A.join(),M,g.join()].join(),p=v[b];return p||(v[b]=p=f([w,A,M,g])),p(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},divseq:function(f){var v={};return function(T,l){var _=T.dtype,w=T.order,A=[_,w.join()].join(),M=v[A];return M||(v[A]=M=f([_,w])),M(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},assign:function(f){var v={};return function(T,l){var _=T.dtype,w=T.order,A=l.dtype,M=l.order,g=[_,w.join(),A,M.join()].join(),b=v[g];return b||(v[g]=b=f([_,w,A,M])),b(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0)}}};function i(f){var v=n[f.funcName];return v(a.bind(void 0,f))}function s(f){return i({funcName:f.funcName})}var h={mul:"*",div:"/"};(function(){for(var f in h)t[f]=s({funcName:f}),t[f+"s"]=s({funcName:f+"s"}),t[f+"seq"]=s({funcName:f+"seq"})})(),t.assign=s({funcName:"assign"})},9994:function(e,t,r){"use strict";var o=r(9618),a=r(8277);e.exports=function(i,s){for(var h=[],f=i,v=1;Array.isArray(f);)h.push(f.length),v*=f.length,f=f[0];return h.length===0?o():(s||(s=o(new Float64Array(v),h)),a(s,i),s)}},8277:function(e){"use strict";function t(){return function(s,h,f,v,c){var T=s[0],l=s[1],_=s[2],w=f[0],A=f[1],M=f[2],g=[0,0,0];v|=0;var b=0,p=0,u=0,y=M,m=A-_*M,R=w-l*A;for(u=0;u<T;++u){for(p=0;p<l;++p){for(b=0;b<_;++b){{var L=c,z;for(z=0;z<g.length-1;++z)L=L[g[z]];h[v]=L[g[g.length-1]]}v+=y,++g[2]}v+=m,g[2]-=_,++g[1]}v+=R,g[1]-=l,++g[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(v,c){var T=v.dtype,l=v.order,_=[T,l.join()].join(),w=h[_];return w||(h[_]=w=s([T,l])),w(v.shape.slice(0),v.data,v.stride,v.offset|0,c)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"convert"})},7640:function(e,t,r){"use strict";var o=r(1888);function a(c){switch(c){case"uint32":return[o.mallocUint32,o.freeUint32];default:return null}}var n={"uint32,1,0":function(c,T){return function(_,w,A,M,g,b,p,u,y,m,R){var L,z,F,N=_*g+M,O,P=c(u),U,B,X,$;for(L=_+1;L<=w;++L){for(z=L,N+=g,F=N,U=0,B=N,O=0;O<u;++O)P[U++]=A[B],B+=y;e:for(;z-- >_;){U=0,B=F-g;t:for(O=0;O<u;++O){if(X=A[B],$=P[U],X<$)break e;if(X>$)break t;B+=m,U+=R}for(U=F,B=F-g,O=0;O<u;++O)A[U]=A[B],U+=y,B+=y;F-=g}for(U=F,B=0,O=0;O<u;++O)A[U]=P[B++],U+=y}T(P)}}};function i(c,T){var l=a(T),_=[T,c].join(","),w=n[_];return l?w(l[0],l[1]):w()}var s={"uint32,1,0":function(c,T,l){return function _(w,A,M,g,b,p,u,y,m,R,L){var z=(A-w+1)/6|0,F=w+z,N=A-z,O=w+A>>1,P=O-z,U=O+z,B=F,X=P,$=O,le=U,ce=N,de=w+1,G=A-1,Y=!0,ee,q,se,ae,j,Q,re,pe,we,Se=0,Ie=0,Re=0,We,at,nt,tt,qe,he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt,Gt,Mr=y,mr=T(Mr),qr=T(Mr);at=b*B,nt=b*X,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=B,B=X,X=q;break e}if(Re<0)break e;Gt+=R}at=b*le,nt=b*ce,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=le,le=ce,ce=q;break e}if(Re<0)break e;Gt+=R}at=b*B,nt=b*$,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=B,B=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*$,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=X,X=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*B,nt=b*le,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=B,B=le,le=q;break e}if(Re<0)break e;Gt+=R}at=b*$,nt=b*le,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=$,$=le,le=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*ce,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=X,X=ce,ce=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*$,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=X,X=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*le,nt=b*ce,Gt=g;e:for(We=0;We<y;++We){if(re=at+Gt,pe=nt+Gt,Re=M[re]-M[pe],Re>0){q=le,le=ce,ce=q;break e}if(Re<0)break e;Gt+=R}for(at=b*B,nt=b*X,tt=b*$,qe=b*le,he=b*ce,ue=b*F,ne=b*O,Ce=b*N,Nt=0,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,we=tt+Gt,Ye=qe+Gt,rt=he+Gt,Ke=ue+Gt,Mt=ne+Gt,kt=Ce+Gt,mr[Nt]=M[pe],qr[Nt]=M[Ye],Y=Y&&mr[Nt]===qr[Nt],se=M[re],ae=M[we],j=M[rt],M[Ke]=se,M[Mt]=ae,M[kt]=j,++Nt,Gt+=m;for(at=b*P,nt=b*w,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,M[re]=M[pe],Gt+=m;for(at=b*U,nt=b*A,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,M[re]=M[pe],Gt+=m;if(Y)for(Q=de;Q<=G;++Q){re=g+Q*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-mr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re!==0)if(Re<0){if(Q!==de)for(at=b*Q,nt=b*de,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;++de}else for(;;){re=g+G*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-mr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re>0)G--;else if(Re<0){for(at=b*Q,nt=b*de,tt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,we=tt+Gt,ee=M[re],M[re]=M[pe],M[pe]=M[we],M[we]=ee,Gt+=m;++de,--G;break}else{for(at=b*Q,nt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;--G;break}}}else for(Q=de;Q<=G;++Q){re=g+Q*b,Nt=0;e:for(We=0;We<y;++We){if(Se=M[re]-mr[Nt],Se!==0)break e;Nt+=L,re+=R}if(Se<0){if(Q!==de)for(at=b*Q,nt=b*de,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;++de}else{re=g+Q*b,Nt=0;e:for(We=0;We<y;++We){if(Ie=M[re]-qr[Nt],Ie!==0)break e;Nt+=L,re+=R}if(Ie>0)for(;;){re=g+G*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-qr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re>0){if(--G<Q)break;continue}else{re=g+G*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-mr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re<0){for(at=b*Q,nt=b*de,tt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,we=tt+Gt,ee=M[re],M[re]=M[pe],M[pe]=M[we],M[we]=ee,Gt+=m;++de,--G}else{for(at=b*Q,nt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;--G}break}}}}for(at=b*w,nt=b*(de-1),Nt=0,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,M[re]=M[pe],M[pe]=mr[Nt],++Nt,Gt+=m;for(at=b*A,nt=b*(G+1),Nt=0,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,M[re]=M[pe],M[pe]=qr[Nt],++Nt,Gt+=m;if(de-2-w<=32?c(w,de-2,M,g,b,p,u,y,m,R,L):_(w,de-2,M,g,b,p,u,y,m,R,L),A-(G+2)<=32?c(G+2,A,M,g,b,p,u,y,m,R,L):_(G+2,A,M,g,b,p,u,y,m,R,L),Y){l(mr),l(qr);return}if(de<F&&G>N){e:for(;;){for(re=g+de*b,Nt=0,Gt=g,We=0;We<y;++We){if(M[re]!==mr[Nt])break e;++Nt,re+=m}++de}e:for(;;){for(re=g+G*b,Nt=0,Gt=g,We=0;We<y;++We){if(M[re]!==qr[Nt])break e;++Nt,re+=m}--G}for(Q=de;Q<=G;++Q){re=g+Q*b,Nt=0;e:for(We=0;We<y;++We){if(Se=M[re]-mr[Nt],Se!==0)break e;Nt+=L,re+=R}if(Se===0){if(Q!==de)for(at=b*Q,nt=b*de,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;++de}else{re=g+Q*b,Nt=0;e:for(We=0;We<y;++We){if(Ie=M[re]-qr[Nt],Ie!==0)break e;Nt+=L,re+=R}if(Ie===0)for(;;){re=g+G*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-qr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re===0){if(--G<Q)break;continue}else{re=g+G*b,Nt=0;e:for(We=0;We<y;++We){if(Re=M[re]-mr[Nt],Re!==0)break e;Nt+=L,re+=R}if(Re<0){for(at=b*Q,nt=b*de,tt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,we=tt+Gt,ee=M[re],M[re]=M[pe],M[pe]=M[we],M[we]=ee,Gt+=m;++de,--G}else{for(at=b*Q,nt=b*G,Gt=g,We=0;We<y;++We)re=at+Gt,pe=nt+Gt,ee=M[re],M[re]=M[pe],M[pe]=ee,Gt+=m;--G}break}}}}}l(mr),l(qr),G-de<=32?c(de,G,M,g,b,p,u,y,m,R,L):_(de,G,M,g,b,p,u,y,m,R,L)}}};function h(c,T,l){var _=a(T),w=[T,c].join(","),A=s[w];return c.length>1&&_?A(l,_[0],_[1]):A(l)}var f={"uint32,1,0":function(c,T){return function(l){var _=l.data,w=l.offset|0,A=l.shape,M=l.stride,g=M[0]|0,b=A[0]|0,p=M[1]|0,u=A[1]|0,y=p,m=p,R=1;b<=32?c(0,b-1,_,w,g,p,b,u,y,m,R):T(0,b-1,_,w,g,p,b,u,y,m,R)}}};function v(c,T){var l=[T,c].join(","),_=f[l],w=i(c,T),A=h(c,T,w);return _(w,A)}e.exports=v},446:function(e,t,r){"use strict";var o=r(7640),a={};function n(i){var s=i.order,h=i.dtype,f=[s,h],v=f.join(":"),c=a[v];return c||(a[v]=c=o(s,h)),c(i),i}e.exports=n},9618:function(e,t,r){var o=r(7163),a=typeof Float64Array<"u";function n(T,l){return T[0]-l[0]}function i(){var T=this.stride,l=new Array(T.length),_;for(_=0;_<l.length;++_)l[_]=[Math.abs(T[_]),_];l.sort(n);var w=new Array(l.length);for(_=0;_<w.length;++_)w[_]=l[_][1];return w}var s={T:function(T){function l(w){this.data=w}var _=l.prototype;return _.dtype=T,_.index=function(){return-1},_.size=0,_.dimension=-1,_.shape=_.stride=_.order=[],_.lo=_.hi=_.transpose=_.step=function(){return new l(this.data)},_.get=_.set=function(){},_.pick=function(){return null},function(A){return new l(A)}},0:function(T,l){function _(A,M){this.data=A,this.offset=M}var w=_.prototype;return w.dtype=T,w.index=function(){return this.offset},w.dimension=0,w.size=1,w.shape=w.stride=w.order=[],w.lo=w.hi=w.transpose=w.step=function(){return new _(this.data,this.offset)},w.pick=function(){return l(this.data)},w.valueOf=w.get=function(){return T==="generic"?this.data.get(this.offset):this.data[this.offset]},w.set=function(M){return T==="generic"?this.data.set(this.offset,M):this.data[this.offset]=M},function(M,g,b,p){return new _(M,p)}},1:function(T,l,_){function w(M,g,b,p){this.data=M,this.shape=[g],this.stride=[b],this.offset=p|0}var A=w.prototype;return A.dtype=T,A.dimension=1,Object.defineProperty(A,"size",{get:function(){return this.shape[0]}}),A.order=[0],A.set=function(g,b){return T==="generic"?this.data.set(this.offset+this.stride[0]*g,b):this.data[this.offset+this.stride[0]*g]=b},A.get=function(g){return T==="generic"?this.data.get(this.offset+this.stride[0]*g):this.data[this.offset+this.stride[0]*g]},A.index=function(g){return this.offset+this.stride[0]*g},A.hi=function(g){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,this.stride[0],this.offset)},A.lo=function(g){var b=this.offset,p=0,u=this.shape[0],y=this.stride[0];return typeof g=="number"&&g>=0&&(p=g|0,b+=y*p,u-=p),new w(this.data,u,y,b)},A.step=function(g){var b=this.shape[0],p=this.stride[0],u=this.offset,y=0,m=Math.ceil;return typeof g=="number"&&(y=g|0,y<0?(u+=p*(b-1),b=m(-b/y)):b=m(b/y),p*=y),new w(this.data,b,p,u)},A.transpose=function(g){g=g===void 0?0:g|0;var b=this.shape,p=this.stride;return new w(this.data,b[g],p[g],this.offset)},A.pick=function(g){var b=[],p=[],u=this.offset;typeof g=="number"&&g>=0?u=u+this.stride[0]*g|0:(b.push(this.shape[0]),p.push(this.stride[0]));var y=l[b.length+1];return y(this.data,b,p,u)},function(g,b,p,u){return new w(g,b[0],p[0],u)}},2:function(T,l,_){function w(M,g,b,p,u,y){this.data=M,this.shape=[g,b],this.stride=[p,u],this.offset=y|0}var A=w.prototype;return A.dtype=T,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(g,b,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b,p):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]=p},A.get=function(g,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]},A.index=function(g,b){return this.offset+this.stride[0]*g+this.stride[1]*b},A.hi=function(g,b){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(g,b){var p=this.offset,u=0,y=this.shape[0],m=this.shape[1],R=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(u=g|0,p+=R*u,y-=u),typeof b=="number"&&b>=0&&(u=b|0,p+=L*u,m-=u),new w(this.data,y,m,R,L,p)},A.step=function(g,b){var p=this.shape[0],u=this.shape[1],y=this.stride[0],m=this.stride[1],R=this.offset,L=0,z=Math.ceil;return typeof g=="number"&&(L=g|0,L<0?(R+=y*(p-1),p=z(-p/L)):p=z(p/L),y*=L),typeof b=="number"&&(L=b|0,L<0?(R+=m*(u-1),u=z(-u/L)):u=z(u/L),m*=L),new w(this.data,p,u,y,m,R)},A.transpose=function(g,b){g=g===void 0?0:g|0,b=b===void 0?1:b|0;var p=this.shape,u=this.stride;return new w(this.data,p[g],p[b],u[g],u[b],this.offset)},A.pick=function(g,b){var p=[],u=[],y=this.offset;typeof g=="number"&&g>=0?y=y+this.stride[0]*g|0:(p.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(p.push(this.shape[1]),u.push(this.stride[1]));var m=l[p.length+1];return m(this.data,p,u,y)},function(g,b,p,u){return new w(g,b[0],b[1],p[0],p[1],u)}},3:function(T,l,_){function w(M,g,b,p,u,y,m,R){this.data=M,this.shape=[g,b,p],this.stride=[u,y,m],this.offset=R|0}var A=w.prototype;return A.dtype=T,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var g=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),p=Math.abs(this.stride[2]);return g>b?b>p?[2,1,0]:g>p?[1,2,0]:[1,0,2]:g>p?[2,0,1]:p>b?[0,1,2]:[0,2,1]}}),A.set=function(g,b,p,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p,u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p]=u},A.get=function(g,b,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p]},A.index=function(g,b,p){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p},A.hi=function(g,b,p){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(g,b,p){var u=this.offset,y=0,m=this.shape[0],R=this.shape[1],L=this.shape[2],z=this.stride[0],F=this.stride[1],N=this.stride[2];return typeof g=="number"&&g>=0&&(y=g|0,u+=z*y,m-=y),typeof b=="number"&&b>=0&&(y=b|0,u+=F*y,R-=y),typeof p=="number"&&p>=0&&(y=p|0,u+=N*y,L-=y),new w(this.data,m,R,L,z,F,N,u)},A.step=function(g,b,p){var u=this.shape[0],y=this.shape[1],m=this.shape[2],R=this.stride[0],L=this.stride[1],z=this.stride[2],F=this.offset,N=0,O=Math.ceil;return typeof g=="number"&&(N=g|0,N<0?(F+=R*(u-1),u=O(-u/N)):u=O(u/N),R*=N),typeof b=="number"&&(N=b|0,N<0?(F+=L*(y-1),y=O(-y/N)):y=O(y/N),L*=N),typeof p=="number"&&(N=p|0,N<0?(F+=z*(m-1),m=O(-m/N)):m=O(m/N),z*=N),new w(this.data,u,y,m,R,L,z,F)},A.transpose=function(g,b,p){g=g===void 0?0:g|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0;var u=this.shape,y=this.stride;return new w(this.data,u[g],u[b],u[p],y[g],y[b],y[p],this.offset)},A.pick=function(g,b,p){var u=[],y=[],m=this.offset;typeof g=="number"&&g>=0?m=m+this.stride[0]*g|0:(u.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?m=m+this.stride[1]*b|0:(u.push(this.shape[1]),y.push(this.stride[1])),typeof p=="number"&&p>=0?m=m+this.stride[2]*p|0:(u.push(this.shape[2]),y.push(this.stride[2]));var R=l[u.length+1];return R(this.data,u,y,m)},function(g,b,p,u){return new w(g,b[0],b[1],b[2],p[0],p[1],p[2],u)}},4:function(T,l,_){function w(M,g,b,p,u,y,m,R,L,z){this.data=M,this.shape=[g,b,p,u],this.stride=[y,m,R,L],this.offset=z|0}var A=w.prototype;return A.dtype=T,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:_}),A.set=function(g,b,p,u,y){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u,y):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]=y},A.get=function(g,b,p,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]},A.index=function(g,b,p,u){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u},A.hi=function(g,b,p,u){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(g,b,p,u){var y=this.offset,m=0,R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.stride[0],O=this.stride[1],P=this.stride[2],U=this.stride[3];return typeof g=="number"&&g>=0&&(m=g|0,y+=N*m,R-=m),typeof b=="number"&&b>=0&&(m=b|0,y+=O*m,L-=m),typeof p=="number"&&p>=0&&(m=p|0,y+=P*m,z-=m),typeof u=="number"&&u>=0&&(m=u|0,y+=U*m,F-=m),new w(this.data,R,L,z,F,N,O,P,U,y)},A.step=function(g,b,p,u){var y=this.shape[0],m=this.shape[1],R=this.shape[2],L=this.shape[3],z=this.stride[0],F=this.stride[1],N=this.stride[2],O=this.stride[3],P=this.offset,U=0,B=Math.ceil;return typeof g=="number"&&(U=g|0,U<0?(P+=z*(y-1),y=B(-y/U)):y=B(y/U),z*=U),typeof b=="number"&&(U=b|0,U<0?(P+=F*(m-1),m=B(-m/U)):m=B(m/U),F*=U),typeof p=="number"&&(U=p|0,U<0?(P+=N*(R-1),R=B(-R/U)):R=B(R/U),N*=U),typeof u=="number"&&(U=u|0,U<0?(P+=O*(L-1),L=B(-L/U)):L=B(L/U),O*=U),new w(this.data,y,m,R,L,z,F,N,O,P)},A.transpose=function(g,b,p,u){g=g===void 0?0:g|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0,u=u===void 0?3:u|0;var y=this.shape,m=this.stride;return new w(this.data,y[g],y[b],y[p],y[u],m[g],m[b],m[p],m[u],this.offset)},A.pick=function(g,b,p,u){var y=[],m=[],R=this.offset;typeof g=="number"&&g>=0?R=R+this.stride[0]*g|0:(y.push(this.shape[0]),m.push(this.stride[0])),typeof b=="number"&&b>=0?R=R+this.stride[1]*b|0:(y.push(this.shape[1]),m.push(this.stride[1])),typeof p=="number"&&p>=0?R=R+this.stride[2]*p|0:(y.push(this.shape[2]),m.push(this.stride[2])),typeof u=="number"&&u>=0?R=R+this.stride[3]*u|0:(y.push(this.shape[3]),m.push(this.stride[3]));var L=l[y.length+1];return L(this.data,y,m,R)},function(g,b,p,u){return new w(g,b[0],b[1],b[2],b[3],p[0],p[1],p[2],p[3],u)}},5:function(l,_,w){function A(g,b,p,u,y,m,R,L,z,F,N,O){this.data=g,this.shape=[b,p,u,y,m],this.stride=[R,L,z,F,N],this.offset=O|0}var M=A.prototype;return M.dtype=l,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(b,p,u,y,m,R){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m,R):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m]=R},M.get=function(b,p,u,y,m){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m]},M.index=function(b,p,u,y,m){return this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m},M.hi=function(b,p,u,y,m){return new A(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof p!="number"||p<0?this.shape[1]:p|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof y!="number"||y<0?this.shape[3]:y|0,typeof m!="number"||m<0?this.shape[4]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(b,p,u,y,m){var R=this.offset,L=0,z=this.shape[0],F=this.shape[1],N=this.shape[2],O=this.shape[3],P=this.shape[4],U=this.stride[0],B=this.stride[1],X=this.stride[2],$=this.stride[3],le=this.stride[4];return typeof b=="number"&&b>=0&&(L=b|0,R+=U*L,z-=L),typeof p=="number"&&p>=0&&(L=p|0,R+=B*L,F-=L),typeof u=="number"&&u>=0&&(L=u|0,R+=X*L,N-=L),typeof y=="number"&&y>=0&&(L=y|0,R+=$*L,O-=L),typeof m=="number"&&m>=0&&(L=m|0,R+=le*L,P-=L),new A(this.data,z,F,N,O,P,U,B,X,$,le,R)},M.step=function(b,p,u,y,m){var R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.shape[4],O=this.stride[0],P=this.stride[1],U=this.stride[2],B=this.stride[3],X=this.stride[4],$=this.offset,le=0,ce=Math.ceil;return typeof b=="number"&&(le=b|0,le<0?($+=O*(R-1),R=ce(-R/le)):R=ce(R/le),O*=le),typeof p=="number"&&(le=p|0,le<0?($+=P*(L-1),L=ce(-L/le)):L=ce(L/le),P*=le),typeof u=="number"&&(le=u|0,le<0?($+=U*(z-1),z=ce(-z/le)):z=ce(z/le),U*=le),typeof y=="number"&&(le=y|0,le<0?($+=B*(F-1),F=ce(-F/le)):F=ce(F/le),B*=le),typeof m=="number"&&(le=m|0,le<0?($+=X*(N-1),N=ce(-N/le)):N=ce(N/le),X*=le),new A(this.data,R,L,z,F,N,O,P,U,B,X,$)},M.transpose=function(b,p,u,y,m){b=b===void 0?0:b|0,p=p===void 0?1:p|0,u=u===void 0?2:u|0,y=y===void 0?3:y|0,m=m===void 0?4:m|0;var R=this.shape,L=this.stride;return new A(this.data,R[b],R[p],R[u],R[y],R[m],L[b],L[p],L[u],L[y],L[m],this.offset)},M.pick=function(b,p,u,y,m){var R=[],L=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(R.push(this.shape[0]),L.push(this.stride[0])),typeof p=="number"&&p>=0?z=z+this.stride[1]*p|0:(R.push(this.shape[1]),L.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(R.push(this.shape[2]),L.push(this.stride[2])),typeof y=="number"&&y>=0?z=z+this.stride[3]*y|0:(R.push(this.shape[3]),L.push(this.stride[3])),typeof m=="number"&&m>=0?z=z+this.stride[4]*m|0:(R.push(this.shape[4]),L.push(this.stride[4]));var F=_[R.length+1];return F(this.data,R,L,z)},function(b,p,u,y){return new A(b,p[0],p[1],p[2],p[3],p[4],u[0],u[1],u[2],u[3],u[4],y)}}};function h(T,l){var _=l===-1?"T":String(l),w=s[_];return l===-1?w(T):l===0?w(T,v[T][0]):w(T,v[T],i)}function f(T){if(o(T))return"buffer";if(a)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function c(T,l,_,w){if(T===void 0){var u=v.array[0];return u([])}else typeof T=="number"&&(T=[T]);l===void 0&&(l=[T.length]);var A=l.length;if(_===void 0){_=new Array(A);for(var M=A-1,g=1;M>=0;--M)_[M]=g,g*=l[M]}if(w===void 0){w=0;for(var M=0;M<A;++M)_[M]<0&&(w-=(l[M]-1)*_[M])}for(var b=f(T),p=v[b];p.length<=A+1;)p.push(h(b,p.length-1));var u=p[A+1];return u(T,l,_,w)}e.exports=c},1278:function(e,t,r){"use strict";var o=r(2361),a=Math.pow(2,-1074),n=-1>>>0;e.exports=i;function i(s,h){if(isNaN(s)||isNaN(h))return NaN;if(s===h)return s;if(s===0)return h<0?-a:a;var f=o.hi(s),v=o.lo(s);return h>s==s>0?v===n?(f+=1,v=0):v+=1:v===0?(v=n,f-=1):v-=1,o.pack(v,f)}},8406:function(e,t){var r=1e-6,o=1e-6;t.vertexNormals=function(a,n,i){for(var s=n.length,h=new Array(s),f=i===void 0?r:i,v=0;v<s;++v)h[v]=[0,0,0];for(var v=0;v<a.length;++v)for(var c=a[v],T=0,l=c[c.length-1],_=c[0],w=0;w<c.length;++w){T=l,l=_,_=c[(w+1)%c.length];for(var A=n[T],M=n[l],g=n[_],b=new Array(3),p=0,u=new Array(3),y=0,m=0;m<3;++m)b[m]=A[m]-M[m],p+=b[m]*b[m],u[m]=g[m]-M[m],y+=u[m]*u[m];if(p*y>f)for(var R=h[l],L=1/Math.sqrt(p*y),m=0;m<3;++m){var z=(m+1)%3,F=(m+2)%3;R[m]+=L*(u[z]*b[F]-u[F]*b[z])}}for(var v=0;v<s;++v){for(var R=h[v],N=0,m=0;m<3;++m)N+=R[m]*R[m];if(N>f)for(var L=1/Math.sqrt(N),m=0;m<3;++m)R[m]*=L;else for(var m=0;m<3;++m)R[m]=0}return h},t.faceNormals=function(a,n,i){for(var s=a.length,h=new Array(s),f=i===void 0?o:i,v=0;v<s;++v){for(var c=a[v],T=new Array(3),l=0;l<3;++l)T[l]=n[c[l]];for(var _=new Array(3),w=new Array(3),l=0;l<3;++l)_[l]=T[1][l]-T[0][l],w[l]=T[2][l]-T[0][l];for(var A=new Array(3),M=0,l=0;l<3;++l){var g=(l+1)%3,b=(l+2)%3;A[l]=_[g]*w[b]-_[b]*w[g],M+=A[l]*A[l]}M>f?M=1/Math.sqrt(M):M=0;for(var l=0;l<3;++l)A[l]*=M;h[v]=A}return h}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,n,i,s,h,f,v,c){var T=o+s+c;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-v)/l,r[1]=.5*(f-n)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var _=Math.max(o,s,c),l=Math.sqrt(2*_-T+1);o>=_?(r[0]=.5*l,r[1]=.5*(i+a)/l,r[2]=.5*(f+n)/l,r[3]=.5*(h-v)/l):s>=_?(r[0]=.5*(a+i)/l,r[1]=.5*l,r[2]=.5*(v+h)/l,r[3]=.5*(f-n)/l):(r[0]=.5*(n+f)/l,r[1]=.5*(h+v)/l,r[2]=.5*l,r[3]=.5*(a-i)/l)}return r}},9977:function(e,t,r){"use strict";e.exports=l;var o=r(9215),a=r(6582),n=r(7399),i=r(7608),s=r(4081);function h(_,w,A){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(A,2))}function f(_,w,A,M){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(M,2))}function v(_,w){var A=w[0],M=w[1],g=w[2],b=w[3],p=f(A,M,g,b);p>1e-6?(_[0]=A/p,_[1]=M/p,_[2]=g/p,_[3]=b/p):(_[0]=_[1]=_[2]=0,_[3]=1)}function c(_,w,A){this.radius=o([A]),this.center=o(w),this.rotation=o(_),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 T=c.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var w=this.computedRotation;v(w,w);var A=this.computedMatrix;n(A,w);var M=this.computedCenter,g=this.computedEye,b=this.computedUp,p=Math.exp(this.computedRadius[0]);g[0]=M[0]+p*A[2],g[1]=M[1]+p*A[6],g[2]=M[2]+p*A[10],b[0]=A[1],b[1]=A[5],b[2]=A[9];for(var u=0;u<3;++u){for(var y=0,m=0;m<3;++m)y+=A[u+4*m]*g[m];A[12+u]=-y}},T.getMatrix=function(_,w){this.recalcMatrix(_);var A=this.computedMatrix;if(w){for(var M=0;M<16;++M)w[M]=A[M];return w}return A},T.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},T.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},T.pan=function(_,w,A,M){w=w||0,A=A||0,M=M||0,this.recalcMatrix(_);var g=this.computedMatrix,b=g[1],p=g[5],u=g[9],y=h(b,p,u);b/=y,p/=y,u/=y;var m=g[0],R=g[4],L=g[8],z=m*b+R*p+L*u;m-=b*z,R-=p*z,L-=u*z;var F=h(m,R,L);m/=F,R/=F,L/=F;var N=g[2],O=g[6],P=g[10],U=N*b+O*p+P*u,B=N*m+O*R+P*L;N-=U*b+B*m,O-=U*p+B*R,P-=U*u+B*L;var X=h(N,O,P);N/=X,O/=X,P/=X;var $=m*w+b*A,le=R*w+p*A,ce=L*w+u*A;this.center.move(_,$,le,ce);var de=Math.exp(this.computedRadius[0]);de=Math.max(1e-4,de+M),this.radius.set(_,Math.log(de))},T.rotate=function(_,w,A,M){this.recalcMatrix(_),w=w||0,A=A||0;var g=this.computedMatrix,b=g[0],p=g[4],u=g[8],y=g[1],m=g[5],R=g[9],L=g[2],z=g[6],F=g[10],N=w*b+A*y,O=w*p+A*m,P=w*u+A*R,U=-(z*P-F*O),B=-(F*N-L*P),X=-(L*O-z*N),$=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(B,2)-Math.pow(X,2))),le=f(U,B,X,$);le>1e-6?(U/=le,B/=le,X/=le,$/=le):(U=B=X=0,$=1);var ce=this.computedRotation,de=ce[0],G=ce[1],Y=ce[2],ee=ce[3],q=de*$+ee*U+G*X-Y*B,se=G*$+ee*B+Y*U-de*X,ae=Y*$+ee*X+de*B-G*U,j=ee*$-de*U-G*B-Y*X;if(M){U=L,B=z,X=F;var Q=Math.sin(M)/h(U,B,X);U*=Q,B*=Q,X*=Q,$=Math.cos(w),q=q*$+j*U+se*X-ae*B,se=se*$+j*B+ae*U-q*X,ae=ae*$+j*X+q*B-se*U,j=j*$-q*U-se*B-ae*X}var re=f(q,se,ae,j);re>1e-6?(q/=re,se/=re,ae/=re,j/=re):(q=se=ae=0,j=1),this.rotation.set(_,q,se,ae,j)},T.lookAt=function(_,w,A,M){this.recalcMatrix(_),A=A||this.computedCenter,w=w||this.computedEye,M=M||this.computedUp;var g=this.computedMatrix;a(g,w,A,M);var b=this.computedRotation;s(b,g[0],g[1],g[2],g[4],g[5],g[6],g[8],g[9],g[10]),v(b,b),this.rotation.set(_,b[0],b[1],b[2],b[3]);for(var p=0,u=0;u<3;++u)p+=Math.pow(A[u]-w[u],2);this.radius.set(_,.5*Math.log(Math.max(p,1e-6))),this.center.set(_,A[0],A[1],A[2])},T.translate=function(_,w,A,M){this.center.move(_,w||0,A||0,M||0)},T.setMatrix=function(_,w){var A=this.computedRotation;s(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),v(A,A),this.rotation.set(_,A[0],A[1],A[2],A[3]);var M=this.computedMatrix;i(M,w);var g=M[15];if(Math.abs(g)>1e-6){var b=M[12]/g,p=M[13]/g,u=M[14]/g;this.recalcMatrix(_);var y=Math.exp(this.computedRadius[0]);this.center.set(_,b-M[2]*y,p-M[6]*y,u-M[10]*y),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},T.setDistance=function(_,w){w>0&&this.radius.set(_,Math.log(w))},T.setDistanceLimits=function(_,w){_>0?_=Math.log(_):_=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(_){var w=this.radius.bounds;return _?(_[0]=Math.exp(w[0][0]),_[1]=Math.exp(w[1][0]),_):[Math.exp(w[0][0]),Math.exp(w[1][0])]},T.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]}},T.fromJSON=function(_){var w=this.lastT(),A=_.center;A&&this.center.set(w,A[0],A[1],A[2]);var M=_.rotation;M&&this.rotation.set(w,M[0],M[1],M[2],M[3]);var g=_.distance;g&&g>0&&this.radius.set(w,Math.log(g)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function l(_){_=_||{};var w=_.center||[0,0,0],A=_.rotation||[0,0,0,1],M=_.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),v(A,A);var g=new c(A,w,Math.log(M));return g.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&g.lookAt(0,_.eye,_.center,_.up),g}},1371:function(e,t,r){"use strict";var o=r(3233);e.exports=function(n,i,s){return s=typeof s<"u"?s+"":" ",o(s,i)+n}},3202:function(e){e.exports=function(r,o){o||(o=[0,""]),r=String(r);var a=parseFloat(r,10);return o[0]=a,o[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",o}},3088:function(e,t,r){"use strict";e.exports=a;var o=r(3140);function a(n,i){for(var s=i.length|0,h=n.length,f=[new Array(s),new Array(s)],v=0;v<s;++v)f[0][v]=[],f[1][v]=[];for(var v=0;v<h;++v){var c=n[v];f[0][c[0]].push(c),f[1][c[1]].push(c)}for(var T=[],v=0;v<s;++v)f[0][v].length+f[1][v].length===0&&T.push([v]);function l(u,y){var m=f[y][u[y]];m.splice(m.indexOf(u),1)}function _(u,y,m){for(var R,L,z,F=0;F<2;++F)if(f[F][y].length>0){R=f[F][y][0],z=F;break}L=R[z^1];for(var N=0;N<2;++N)for(var O=f[N][y],P=0;P<O.length;++P){var U=O[P],B=U[N^1],X=o(i[u],i[y],i[L],i[B]);X>0&&(R=U,L=B,z=N)}return m||R&&l(R,z),L}function w(u,y){var m=f[y][u][0],R=[u];l(m,y);for(var L=m[y^1],z=y;;){for(;L!==u;)R.push(L),L=_(R[R.length-2],L,!1);if(f[0][u].length+f[1][u].length===0)break;var F=R[R.length-1],N=u,O=R[1],P=_(F,N,!0);if(o(i[F],i[N],i[O],i[P])<0)break;R.push(u),L=_(F,N)}return R}function A(u,y){return y[1]===y[y.length-1]}for(var v=0;v<s;++v)for(var M=0;M<2;++M){for(var g=[];f[M][v].length>0;){var b=f[0][v].length,p=w(v,M);A(g,p)?g.push.apply(g,p):(g.length>0&&T.push(g),g=p)}g.length>0&&T.push(g)}return T}},5609:function(e,t,r){"use strict";e.exports=a;var o=r(3134);function a(n,i){for(var s=o(n,i.length),h=new Array(i.length),f=new Array(i.length),v=[],c=0;c<i.length;++c){var T=s[c].length;f[c]=T,h[c]=!0,T<=1&&v.push(c)}for(;v.length>0;){var l=v.pop();h[l]=!1;for(var _=s[l],c=0;c<_.length;++c){var w=_[c];--f[w]===0&&v.push(w)}}for(var A=new Array(i.length),M=[],c=0;c<i.length;++c)if(h[c]){var l=M.length;A[c]=l,M.push(i[c])}else A[c]=-1;for(var g=[],c=0;c<n.length;++c){var b=n[c];h[b[0]]&&h[b[1]]&&g.push([A[b[0]],A[b[1]]])}return[g,M]}},2095:function(e,t,r){"use strict";e.exports=T;var o=r(3134),a=r(3088),n=r(5085),i=r(5250),s=r(8210),h=r(1682),f=r(5609);function v(l,_){for(var w=new Array(l),A=0;A<l;++A)w[A]=_;return w}function c(l){for(var _=new Array(l),w=0;w<l;++w)_[w]=[];return _}function T(l,_){var Q=f(l,_);l=Q[0],_=Q[1];for(var w=_.length,A=l.length,M=o(l,_.length),g=0;g<w;++g)if(M[g].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var b=a(l,_);function p(We){for(var at=We.length,nt=[0],tt=0;tt<at;++tt){var qe=_[We[tt]],he=_[We[(tt+1)%at]],ue=i(-qe[0],qe[1]),ne=i(-qe[0],he[1]),Ce=i(he[0],qe[1]),Ye=i(he[0],he[1]);nt=s(nt,s(s(ue,ne),s(Ce,Ye)))}return nt[nt.length-1]>0}b=b.filter(p);for(var u=b.length,y=new Array(u),m=new Array(u),g=0;g<u;++g){y[g]=g;var R=new Array(u),L=b[g].map(function(at){return _[at]}),z=n([L]),F=0;e:for(var N=0;N<u;++N)if(R[N]=0,g!==N){for(var O=b[N],P=O.length,U=0;U<P;++U){var B=z(_[O[U]]);if(B!==0){B<0&&(R[N]=1,F+=1);continue e}}R[N]=1,F+=1}m[g]=[F,g,R]}m.sort(function(We,at){return at[0]-We[0]});for(var g=0;g<u;++g)for(var R=m[g],X=R[1],$=R[2],N=0;N<u;++N)$[N]&&(y[N]=X);for(var le=c(u),g=0;g<u;++g)le[g].push(y[g]),le[y[g]].push(g);for(var ce={},de=v(w,!1),g=0;g<u;++g)for(var O=b[g],P=O.length,N=0;N<P;++N){var G=O[N],Y=O[(N+1)%P],ee=Math.min(G,Y)+":"+Math.max(G,Y);if(ee in ce){var q=ce[ee];le[q].push(g),le[g].push(q),de[G]=de[Y]=!0}else ce[ee]=g}function se(We){for(var at=We.length,nt=0;nt<at;++nt)if(!de[We[nt]])return!1;return!0}for(var ae=[],j=v(u,-1),g=0;g<u;++g)y[g]===g&&!se(b[g])?(ae.push(g),j[g]=0):j[g]=-1;for(var Q=[];ae.length>0;){var re=ae.pop(),pe=le[re];h(pe,function(We,at){return We-at});var we=pe.length,Se=j[re],Ie;if(Se===0){var O=b[re];Ie=[O]}for(var g=0;g<we;++g){var Re=pe[g];if(!(j[Re]>=0)&&(j[Re]=Se^1,ae.push(Re),Se===0)){var O=b[Re];se(O)||(O.reverse(),Ie.push(O))}}Se===0&&Q.push(Ie)}return Q}},5085:function(e,t,r){e.exports=_;var o=r(3250)[3],a=r(4209),n=r(3352),i=r(2478);function s(){return!0}function h(w){return function(A,M){var g=w[A];return g?!!g.queryPoint(M,s):!1}}function f(w){for(var A={},M=0;M<w.length;++M){var g=w[M],b=g[0][0],p=g[0][1],u=g[1][1],y=[Math.min(p,u),Math.max(p,u)];b in A?A[b].push(y):A[b]=[y]}for(var m={},R=Object.keys(A),M=0;M<R.length;++M){var L=A[R[M]];m[R[M]]=n(L)}return h(m)}function v(w,A){return function(M){var g=i.le(A,M[0]);if(g<0)return 1;var b=w[g];if(!b)if(g>0&&A[g]===M[0])b=w[g-1];else return 1;for(var p=1;b;){var u=b.key,y=o(M,u[0],u[1]);if(u[0][0]<u[1][0])if(y<0)b=b.left;else if(y>0)p=-1,b=b.right;else return 0;else if(y>0)b=b.left;else if(y<0)p=1,b=b.right;else return 0}return p}}function c(w){return 1}function T(w){return function(M){return w(M[0],M[1])?0:1}}function l(w,A){return function(g){return w(g[0],g[1])?0:A(g)}}function _(w){for(var A=w.length,M=[],g=[],b=0,p=0;p<A;++p)for(var u=w[p],y=u.length,m=y-1,R=0;R<y;m=R++){var L=u[m],z=u[R];L[0]===z[0]?g.push([L,z]):M.push([L,z])}if(M.length===0)return g.length===0?c:T(f(g));var F=a(M),N=v(F.slabs,F.coordinates);return g.length===0?N:l(f(g),N)}},9346:function(e){"use strict";var t=new Float64Array(4),r=new Float64Array(4),o=new Float64Array(4);function a(n,i,s,h,f){t.length<h.length&&(t=new Float64Array(h.length),r=new Float64Array(h.length),o=new Float64Array(h.length));for(var v=0;v<h.length;++v)t[v]=n[v]-h[v],r[v]=i[v]-n[v],o[v]=s[v]-n[v];for(var c=0,T=0,l=0,_=0,w=0,A=0,v=0;v<h.length;++v){var M=r[v],g=o[v],b=t[v];c+=M*M,T+=M*g,l+=g*g,_+=b*M,w+=b*g,A+=b*b}var p=Math.abs(c*l-T*T),u=T*w-l*_,y=T*_-c*w,m;if(u+y<=p)if(u<0)y<0&&_<0?(y=0,-_>=c?(u=1,m=c+2*_+A):(u=-_/c,m=_*u+A)):(u=0,w>=0?(y=0,m=A):-w>=l?(y=1,m=l+2*w+A):(y=-w/l,m=w*y+A));else if(y<0)y=0,_>=0?(u=0,m=A):-_>=c?(u=1,m=c+2*_+A):(u=-_/c,m=_*u+A);else{var R=1/p;u*=R,y*=R,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A}else{var L,z,F,N;u<0?(L=T+_,z=l+w,z>L?(F=z-L,N=c-2*T+l,F>=N?(u=1,y=0,m=c+2*_+A):(u=F/N,y=1-u,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(u=0,z<=0?(y=1,m=l+2*w+A):w>=0?(y=0,m=A):(y=-w/l,m=w*y+A))):y<0?(L=T+w,z=c+_,z>L?(F=z-L,N=c-2*T+l,F>=N?(y=1,u=0,m=l+2*w+A):(y=F/N,u=1-y,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(y=0,z<=0?(u=1,m=c+2*_+A):_>=0?(u=0,m=A):(u=-_/c,m=_*u+A))):(F=l+w-T-_,F<=0?(u=0,y=1,m=l+2*w+A):(N=c-2*T+l,F>=N?(u=1,y=0,m=c+2*_+A):(u=F/N,y=1-u,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)))}for(var O=1-u-y,v=0;v<h.length;++v)f[v]=O*n[v]+u*i[v]+y*s[v];return m<0?0:m}e.exports=a},8648:function(e,t,r){e.exports=r(783)},2653:function(e,t,r){"use strict";var o=r(3865);e.exports=a;function a(n,i){for(var s=n.length,h=new Array(s),f=0;f<s;++f)h[f]=o(n[f],i[f]);return h}},5838:function(e,t,r){"use strict";e.exports=a;var o=r(7842);function a(n){for(var i=new Array(n.length),s=0;s<n.length;++s)i[s]=o(n[s]);return i}},8987:function(e,t,r){"use strict";var o=r(7842),a=r(6504);e.exports=n;function n(i,s){for(var h=o(s),f=i.length,v=new Array(f),c=0;c<f;++c)v[c]=a(i[c],h);return v}},544:function(e,t,r){"use strict";var o=r(5572);e.exports=a;function a(n,i){for(var s=n.length,h=new Array(s),f=0;f<s;++f)h[f]=o(n[f],i[f]);return h}},5771:function(e,t,r){"use strict";var o=r(8507),a=r(3788),n=r(2419);e.exports=i;function i(s){s.sort(a);for(var h=s.length,f=0,v=0;v<h;++v){var c=s[v],T=n(c);if(T!==0){if(f>0){var l=s[f-1];if(o(c,l)===0&&n(l)!==T){f-=1;continue}}s[f++]=c}}return s.length=f,s}},3233:function(e){"use strict";var t="",r;e.exports=o;function o(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var i=a.length*n;if(r!==a||typeof r>"u")r=a,t="";else if(t.length>=i)return t.substr(0,i);for(;i>t.length&&n>1;)n&1&&(t+=a),n>>=1,a+=a;return t+=a,t=t.substr(0,i),t}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){"use strict";e.exports=t;function t(r){for(var o=r.length,a=r[r.length-1],n=o,i=o-2;i>=0;--i){var s=a,h=r[i];a=s+h;var f=a-s,v=h-f;v&&(r[--n]=a,a=v)}for(var c=0,i=n;i<o;++i){var s=r[i],h=a;a=s+h;var f=a-s,v=h-f;v&&(r[c++]=v)}return r[c++]=a,r.length=c,r}},2962:function(e,t,r){"use strict";var o=r(5250),a=r(8210),n=r(3012),i=r(7004),s=6;function h(A,M,g,b){return function(u){return b(A(g(u[0][0],u[1][1]),g(-u[0][1],u[1][0])))}}function f(A,M,g,b){return function(u){return b(A(M(A(g(u[1][1],u[2][2]),g(-u[1][2],u[2][1])),u[0][0]),A(M(A(g(u[1][0],u[2][2]),g(-u[1][2],u[2][0])),-u[0][1]),M(A(g(u[1][0],u[2][1]),g(-u[1][1],u[2][0])),u[0][2]))))}}function v(A,M,g,b){return function(u){return b(A(A(M(A(M(A(g(u[2][2],u[3][3]),g(-u[2][3],u[3][2])),u[1][1]),A(M(A(g(u[2][1],u[3][3]),g(-u[2][3],u[3][1])),-u[1][2]),M(A(g(u[2][1],u[3][2]),g(-u[2][2],u[3][1])),u[1][3]))),u[0][0]),M(A(M(A(g(u[2][2],u[3][3]),g(-u[2][3],u[3][2])),u[1][0]),A(M(A(g(u[2][0],u[3][3]),g(-u[2][3],u[3][0])),-u[1][2]),M(A(g(u[2][0],u[3][2]),g(-u[2][2],u[3][0])),u[1][3]))),-u[0][1])),A(M(A(M(A(g(u[2][1],u[3][3]),g(-u[2][3],u[3][1])),u[1][0]),A(M(A(g(u[2][0],u[3][3]),g(-u[2][3],u[3][0])),-u[1][1]),M(A(g(u[2][0],u[3][1]),g(-u[2][1],u[3][0])),u[1][3]))),u[0][2]),M(A(M(A(g(u[2][1],u[3][2]),g(-u[2][2],u[3][1])),u[1][0]),A(M(A(g(u[2][0],u[3][2]),g(-u[2][2],u[3][0])),-u[1][1]),M(A(g(u[2][0],u[3][1]),g(-u[2][1],u[3][0])),u[1][2]))),-u[0][3]))))}}function c(A,M,g,b){return function(u){return b(A(A(M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][2]),A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),-u[2][3]),M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][4]))),u[1][1]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][3]),M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][4]))),-u[1][2])),A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][3]))),-u[1][4]))),u[0][0]),M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][2]),A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),-u[2][3]),M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][3]),M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),u[2][4]))),-u[1][2])),A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][3]))),-u[1][4]))),-u[0][1])),A(M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][3]),M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][3]),M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),u[2][4]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][3]))),-u[1][4]))),u[0][2]),A(M(A(A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][4]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][4]))),u[1][2]),M(A(M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][2]))),-u[1][4]))),-u[0][3]),M(A(A(M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][3]))),u[1][0]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][3]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][3]))),u[1][2]),M(A(M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][2]))),-u[1][3]))),u[0][4])))))}}function T(A){var M=A===2?h:A===3?f:A===4?v:A===5?c:void 0;return M(a,n,o,i)}var l=[function(){return[0]},function(M){return[M[0][0]]}];function _(A,M,g,b,p,u,y,m){return function(L){switch(L.length){case 0:return A(L);case 1:return M(L);case 2:return g(L);case 3:return b(L);case 4:return p(L);case 5:return u(L)}var z=y[L.length];return z||(z=y[L.length]=m(L.length)),z(L)}}function w(){for(;l.length<s;)l.push(T(l.length));e.exports=_.apply(void 0,l.concat([l,T]));for(var A=0;A<l.length;++A)e.exports[A]=l[A]}w()},1944:function(e,t,r){"use strict";var o=r(5250),a=r(8210);e.exports=n;function n(i,s){for(var h=o(i[0],s[0]),f=1;f<i.length;++f)h=a(h,o(i[f],s[f]));return h}},2646:function(e,t,r){"use strict";var o=r(5250),a=r(8210),n=r(8545),i=r(3012),s=6;function h(p){var u=p===3?T:p===4?l:p===5?_:w;return u(a,n,o,i)}function f(){return 0}function v(){return 0}function c(){return 0}function T(p,u,y,m){function R(L,z,F){var N=y(L[0],L[0]),O=m(N,z[0]),P=m(N,F[0]),U=y(z[0],z[0]),B=m(U,L[0]),X=m(U,F[0]),$=y(F[0],F[0]),le=m($,L[0]),ce=m($,z[0]),de=p(u(ce,X),u(B,O)),G=u(le,P),Y=u(de,G);return Y[Y.length-1]}return R}function l(p,u,y,m){function R(L,z,F,N){var O=p(y(L[0],L[0]),y(L[1],L[1])),P=m(O,z[0]),U=m(O,F[0]),B=m(O,N[0]),X=p(y(z[0],z[0]),y(z[1],z[1])),$=m(X,L[0]),le=m(X,F[0]),ce=m(X,N[0]),de=p(y(F[0],F[0]),y(F[1],F[1])),G=m(de,L[0]),Y=m(de,z[0]),ee=m(de,N[0]),q=p(y(N[0],N[0]),y(N[1],N[1])),se=m(q,L[0]),ae=m(q,z[0]),j=m(q,F[0]),Q=p(p(m(u(j,ee),z[1]),p(m(u(ae,ce),-F[1]),m(u(Y,le),N[1]))),p(m(u(ae,ce),L[1]),p(m(u(se,B),-z[1]),m(u($,P),N[1])))),re=p(p(m(u(j,ee),L[1]),p(m(u(se,B),-F[1]),m(u(G,U),N[1]))),p(m(u(Y,le),L[1]),p(m(u(G,U),-z[1]),m(u($,P),F[1])))),pe=u(Q,re);return pe[pe.length-1]}return R}function _(p,u,y,m){function R(L,z,F,N,O){var P=p(y(L[0],L[0]),p(y(L[1],L[1]),y(L[2],L[2]))),U=m(P,z[0]),B=m(P,F[0]),X=m(P,N[0]),$=m(P,O[0]),le=p(y(z[0],z[0]),p(y(z[1],z[1]),y(z[2],z[2]))),ce=m(le,L[0]),de=m(le,F[0]),G=m(le,N[0]),Y=m(le,O[0]),ee=p(y(F[0],F[0]),p(y(F[1],F[1]),y(F[2],F[2]))),q=m(ee,L[0]),se=m(ee,z[0]),ae=m(ee,N[0]),j=m(ee,O[0]),Q=p(y(N[0],N[0]),p(y(N[1],N[1]),y(N[2],N[2]))),re=m(Q,L[0]),pe=m(Q,z[0]),we=m(Q,F[0]),Se=m(Q,O[0]),Ie=p(y(O[0],O[0]),p(y(O[1],O[1]),y(O[2],O[2]))),Re=m(Ie,L[0]),We=m(Ie,z[0]),at=m(Ie,F[0]),nt=m(Ie,N[0]),tt=p(p(p(m(p(m(u(nt,Se),F[1]),p(m(u(at,j),-N[1]),m(u(we,ae),O[1]))),z[2]),p(m(p(m(u(nt,Se),z[1]),p(m(u(We,Y),-N[1]),m(u(pe,G),O[1]))),-F[2]),m(p(m(u(at,j),z[1]),p(m(u(We,Y),-F[1]),m(u(se,de),O[1]))),N[2]))),p(m(p(m(u(we,ae),z[1]),p(m(u(pe,G),-F[1]),m(u(se,de),N[1]))),-O[2]),p(m(p(m(u(nt,Se),z[1]),p(m(u(We,Y),-N[1]),m(u(pe,G),O[1]))),L[2]),m(p(m(u(nt,Se),L[1]),p(m(u(Re,$),-N[1]),m(u(re,X),O[1]))),-z[2])))),p(p(m(p(m(u(We,Y),L[1]),p(m(u(Re,$),-z[1]),m(u(ce,U),O[1]))),N[2]),p(m(p(m(u(pe,G),L[1]),p(m(u(re,X),-z[1]),m(u(ce,U),N[1]))),-O[2]),m(p(m(u(we,ae),z[1]),p(m(u(pe,G),-F[1]),m(u(se,de),N[1]))),L[2]))),p(m(p(m(u(we,ae),L[1]),p(m(u(re,X),-F[1]),m(u(q,B),N[1]))),-z[2]),p(m(p(m(u(pe,G),L[1]),p(m(u(re,X),-z[1]),m(u(ce,U),N[1]))),F[2]),m(p(m(u(se,de),L[1]),p(m(u(q,B),-z[1]),m(u(ce,U),F[1]))),-N[2]))))),qe=p(p(p(m(p(m(u(nt,Se),F[1]),p(m(u(at,j),-N[1]),m(u(we,ae),O[1]))),L[2]),m(p(m(u(nt,Se),L[1]),p(m(u(Re,$),-N[1]),m(u(re,X),O[1]))),-F[2])),p(m(p(m(u(at,j),L[1]),p(m(u(Re,$),-F[1]),m(u(q,B),O[1]))),N[2]),m(p(m(u(we,ae),L[1]),p(m(u(re,X),-F[1]),m(u(q,B),N[1]))),-O[2]))),p(p(m(p(m(u(at,j),z[1]),p(m(u(We,Y),-F[1]),m(u(se,de),O[1]))),L[2]),m(p(m(u(at,j),L[1]),p(m(u(Re,$),-F[1]),m(u(q,B),O[1]))),-z[2])),p(m(p(m(u(We,Y),L[1]),p(m(u(Re,$),-z[1]),m(u(ce,U),O[1]))),F[2]),m(p(m(u(se,de),L[1]),p(m(u(q,B),-z[1]),m(u(ce,U),F[1]))),-O[2])))),he=u(tt,qe);return he[he.length-1]}return R}function w(p,u,y,m){function R(L,z,F,N,O,P){var U=p(p(y(L[0],L[0]),y(L[1],L[1])),p(y(L[2],L[2]),y(L[3],L[3]))),B=m(U,z[0]),X=m(U,F[0]),$=m(U,N[0]),le=m(U,O[0]),ce=m(U,P[0]),de=p(p(y(z[0],z[0]),y(z[1],z[1])),p(y(z[2],z[2]),y(z[3],z[3]))),G=m(de,L[0]),Y=m(de,F[0]),ee=m(de,N[0]),q=m(de,O[0]),se=m(de,P[0]),ae=p(p(y(F[0],F[0]),y(F[1],F[1])),p(y(F[2],F[2]),y(F[3],F[3]))),j=m(ae,L[0]),Q=m(ae,z[0]),re=m(ae,N[0]),pe=m(ae,O[0]),we=m(ae,P[0]),Se=p(p(y(N[0],N[0]),y(N[1],N[1])),p(y(N[2],N[2]),y(N[3],N[3]))),Ie=m(Se,L[0]),Re=m(Se,z[0]),We=m(Se,F[0]),at=m(Se,O[0]),nt=m(Se,P[0]),tt=p(p(y(O[0],O[0]),y(O[1],O[1])),p(y(O[2],O[2]),y(O[3],O[3]))),qe=m(tt,L[0]),he=m(tt,z[0]),ue=m(tt,F[0]),ne=m(tt,N[0]),Ce=m(tt,P[0]),Ye=p(p(y(P[0],P[0]),y(P[1],P[1])),p(y(P[2],P[2]),y(P[3],P[3]))),rt=m(Ye,L[0]),Ke=m(Ye,z[0]),Mt=m(Ye,F[0]),kt=m(Ye,N[0]),Nt=m(Ye,O[0]),Gt=p(p(p(m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),F[2]),m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),-N[2])),p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),O[2]),m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),-P[2]))),z[3]),p(m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),z[2]),m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),-N[2])),p(m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),O[2]),m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),-P[2]))),-F[3]),m(p(p(m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),z[2]),m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),-F[2])),p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),O[2]),m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),-P[2]))),N[3]))),p(p(m(p(p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),z[2]),m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),-F[2])),p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),N[2]),m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),-P[2]))),-O[3]),m(p(p(m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),z[2]),m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),-F[2])),p(m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),N[2]),m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),-O[2]))),P[3])),p(m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),z[2]),m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),-N[2])),p(m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),O[2]),m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),-P[2]))),L[3]),m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-N[2])),p(m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),O[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-P[2]))),-z[3])))),p(p(p(m(p(p(m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),O[2]),m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),-P[2]))),N[3]),m(p(p(m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),L[2]),m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),N[2]),m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),-P[2]))),-O[3])),p(m(p(p(m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),L[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-z[2])),p(m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),N[2]),m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),-O[2]))),P[3]),m(p(p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),z[2]),m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),-F[2])),p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),N[2]),m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),-P[2]))),L[3]))),p(p(m(p(p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),L[2]),m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),-F[2])),p(m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),N[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-P[2]))),-z[3]),m(p(p(m(p(m(u(kt,nt),z[1]),p(m(u(Ke,se),-N[1]),m(u(Re,ee),P[1]))),L[2]),m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),N[2]),m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),-P[2]))),F[3])),p(m(p(p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),L[2]),m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-P[2]))),-N[3]),m(p(p(m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),L[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-z[2])),p(m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-N[2]))),P[3]))))),Mr=p(p(p(m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),F[2]),m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),-N[2])),p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),O[2]),m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),-P[2]))),L[3]),p(m(p(p(m(p(m(u(Nt,Ce),N[1]),p(m(u(kt,nt),-O[1]),m(u(ne,at),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-N[2])),p(m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),O[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-P[2]))),-F[3]),m(p(p(m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-F[2])),p(m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),O[2]),m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),-P[2]))),N[3]))),p(p(m(p(p(m(p(m(u(kt,nt),F[1]),p(m(u(Mt,we),-N[1]),m(u(We,re),P[1]))),L[2]),m(p(m(u(kt,nt),L[1]),p(m(u(rt,ce),-N[1]),m(u(Ie,$),P[1]))),-F[2])),p(m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),N[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-P[2]))),-O[3]),m(p(p(m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),L[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-F[2])),p(m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),N[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-O[2]))),P[3])),p(m(p(p(m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),z[2]),m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),-F[2])),p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),O[2]),m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),-P[2]))),L[3]),m(p(p(m(p(m(u(Nt,Ce),F[1]),p(m(u(Mt,we),-O[1]),m(u(ue,pe),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-F[2])),p(m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),O[2]),m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),-P[2]))),-z[3])))),p(p(p(m(p(p(m(p(m(u(Nt,Ce),z[1]),p(m(u(Ke,se),-O[1]),m(u(he,q),P[1]))),L[2]),m(p(m(u(Nt,Ce),L[1]),p(m(u(rt,ce),-O[1]),m(u(qe,le),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),O[2]),m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),-P[2]))),F[3]),m(p(p(m(p(m(u(Mt,we),z[1]),p(m(u(Ke,se),-F[1]),m(u(Q,Y),P[1]))),L[2]),m(p(m(u(Mt,we),L[1]),p(m(u(rt,ce),-F[1]),m(u(j,X),P[1]))),-z[2])),p(m(p(m(u(Ke,se),L[1]),p(m(u(rt,ce),-z[1]),m(u(G,B),P[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-P[2]))),-O[3])),p(m(p(p(m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),L[2]),m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),-z[2])),p(m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-O[2]))),P[3]),m(p(p(m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),z[2]),m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),-F[2])),p(m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),N[2]),m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),-O[2]))),L[3]))),p(p(m(p(p(m(p(m(u(ne,at),F[1]),p(m(u(ue,pe),-N[1]),m(u(We,re),O[1]))),L[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-F[2])),p(m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),N[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-O[2]))),-z[3]),m(p(p(m(p(m(u(ne,at),z[1]),p(m(u(he,q),-N[1]),m(u(Re,ee),O[1]))),L[2]),m(p(m(u(ne,at),L[1]),p(m(u(qe,le),-N[1]),m(u(Ie,$),O[1]))),-z[2])),p(m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),N[2]),m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),-O[2]))),F[3])),p(m(p(p(m(p(m(u(ue,pe),z[1]),p(m(u(he,q),-F[1]),m(u(Q,Y),O[1]))),L[2]),m(p(m(u(ue,pe),L[1]),p(m(u(qe,le),-F[1]),m(u(j,X),O[1]))),-z[2])),p(m(p(m(u(he,q),L[1]),p(m(u(qe,le),-z[1]),m(u(G,B),O[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-O[2]))),-N[3]),m(p(p(m(p(m(u(We,re),z[1]),p(m(u(Re,ee),-F[1]),m(u(Q,Y),N[1]))),L[2]),m(p(m(u(We,re),L[1]),p(m(u(Ie,$),-F[1]),m(u(j,X),N[1]))),-z[2])),p(m(p(m(u(Re,ee),L[1]),p(m(u(Ie,$),-z[1]),m(u(G,B),N[1]))),F[2]),m(p(m(u(Q,Y),L[1]),p(m(u(j,X),-z[1]),m(u(G,B),F[1]))),-N[2]))),O[3]))))),mr=u(Gt,Mr);return mr[mr.length-1]}return R}var A=[f,v,c];function M(p){var u=A[p.length];return u||(u=A[p.length]=h(p.length)),u.apply(void 0,p)}function g(p,u,y,m,R,L,z,F){function N(O,P,U,B,X,$){switch(arguments.length){case 0:case 1:return 0;case 2:return m(O,P);case 3:return R(O,P,U);case 4:return L(O,P,U,B);case 5:return z(O,P,U,B,X);case 6:return F(O,P,U,B,X,$)}for(var le=new Array(arguments.length),ce=0;ce<arguments.length;++ce)le[ce]=arguments[ce];return p(le)}return N}function b(){for(;A.length<=s;)A.push(h(A.length));e.exports=g.apply(void 0,[M].concat(A));for(var p=0;p<=s;++p)e.exports[p]=A[p]}b()},727:function(e,t,r){"use strict";var o=r(2962),a=6;function n(A){var M=A===2?h:A===3?f:A===4?v:A===5?c:T;return A<6?M(o[A]):M(o)}function i(){return[[0]]}function s(A,M){return[[M[0]],[A[0][0]]]}function h(A){return function(g,b){return[A([[+b[0],+g[0][1]],[+b[1],+g[1][1]]]),A([[+g[0][0],+b[0]],[+g[1][0],+b[1]]]),A(g)]}}function f(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2]],[+b[1],+g[1][1],+g[1][2]],[+b[2],+g[2][1],+g[2][2]]]),A([[+g[0][0],+b[0],+g[0][2]],[+g[1][0],+b[1],+g[1][2]],[+g[2][0],+b[2],+g[2][2]]]),A([[+g[0][0],+g[0][1],+b[0]],[+g[1][0],+g[1][1],+b[1]],[+g[2][0],+g[2][1],+b[2]]]),A(g)]}}function v(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3]],[+b[1],+g[1][1],+g[1][2],+g[1][3]],[+b[2],+g[2][1],+g[2][2],+g[2][3]],[+b[3],+g[3][1],+g[3][2],+g[3][3]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3]],[+g[1][0],+b[1],+g[1][2],+g[1][3]],[+g[2][0],+b[2],+g[2][2],+g[2][3]],[+g[3][0],+b[3],+g[3][2],+g[3][3]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3]],[+g[1][0],+g[1][1],+b[1],+g[1][3]],[+g[2][0],+g[2][1],+b[2],+g[2][3]],[+g[3][0],+g[3][1],+b[3],+g[3][3]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+b[3]]]),A(g)]}}function c(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4]],[+b[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4]],[+b[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4]],[+b[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4]],[+b[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3],+g[0][4]],[+g[1][0],+b[1],+g[1][2],+g[1][3],+g[1][4]],[+g[2][0],+b[2],+g[2][2],+g[2][3],+g[2][4]],[+g[3][0],+b[3],+g[3][2],+g[3][3],+g[3][4]],[+g[4][0],+b[4],+g[4][2],+g[4][3],+g[4][4]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3],+g[0][4]],[+g[1][0],+g[1][1],+b[1],+g[1][3],+g[1][4]],[+g[2][0],+g[2][1],+b[2],+g[2][3],+g[2][4]],[+g[3][0],+g[3][1],+b[3],+g[3][3],+g[3][4]],[+g[4][0],+g[4][1],+b[4],+g[4][3],+g[4][4]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0],+g[0][4]],[+g[1][0],+g[1][1],+g[1][2],+b[1],+g[1][4]],[+g[2][0],+g[2][1],+g[2][2],+b[2],+g[2][4]],[+g[3][0],+g[3][1],+g[3][2],+b[3],+g[3][4]],[+g[4][0],+g[4][1],+g[4][2],+b[4],+g[4][4]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+b[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+b[4]]]),A(g)]}}function T(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+b[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+b[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+b[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+b[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+b[5],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+b[1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+b[2],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+b[3],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+b[4],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+b[5],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+b[1],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+b[2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+b[3],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+b[4],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+b[5],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+b[1],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+b[2],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+b[3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+b[4],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+b[5],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+b[0],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+b[1],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+b[2],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+b[3],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+b[4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+b[5],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+b[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+b[4]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+b[5]]]),A(g)]}}var l=[i,s];function _(A,M,g,b,p,u,y,m){return function(L,z){switch(L.length){case 0:return A(L,z);case 1:return M(L,z);case 2:return g(L,z);case 3:return b(L,z);case 4:return p(L,z);case 5:return u(L,z)}var F=y[L.length];return F||(F=y[L.length]=m(L.length)),F(L,z)}}function w(){for(;l.length<a;)l.push(n(l.length));e.exports=_.apply(void 0,l.concat([l,n]));for(var A=0;A<a;++A)e.exports[A]=l[A]}w()},3250:function(e,t,r){"use strict";var o=r(5250),a=r(8210),n=r(3012),i=r(8545),s=5,h=11102230246251565e-32,f=(3+16*h)*h,v=(7+56*h)*h;function c(u,y,m,R){return function(z,F,N){var O=u(u(y(F[1],N[0]),y(-N[1],F[0])),u(y(z[1],F[0]),y(-F[1],z[0]))),P=u(y(z[1],N[0]),y(-N[1],z[0])),U=R(O,P);return U[U.length-1]}}function T(u,y,m,R){return function(z,F,N,O){var P=u(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(m(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),m(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),u(m(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),O[2])))),U=u(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),m(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),u(m(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(m(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),N[2])))),B=R(P,U);return B[B.length-1]}}function l(u,y,m,R){return function(z,F,N,O,P){var U=u(u(u(m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),N[2]),u(m(u(y(N[1],P[0]),y(-P[1],N[0])),-O[2]),m(u(y(N[1],O[0]),y(-O[1],N[0])),P[2]))),F[3]),u(m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),F[2]),u(m(u(y(F[1],P[0]),y(-P[1],F[0])),-O[2]),m(u(y(F[1],O[0]),y(-O[1],F[0])),P[2]))),-N[3]),m(u(m(u(y(N[1],P[0]),y(-P[1],N[0])),F[2]),u(m(u(y(F[1],P[0]),y(-P[1],F[0])),-N[2]),m(u(y(F[1],N[0]),y(-N[1],F[0])),P[2]))),O[3]))),u(m(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(m(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),m(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),-P[3]),u(m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),F[2]),u(m(u(y(F[1],P[0]),y(-P[1],F[0])),-O[2]),m(u(y(F[1],O[0]),y(-O[1],F[0])),P[2]))),z[3]),m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-O[2]),m(u(y(z[1],O[0]),y(-O[1],z[0])),P[2]))),-F[3])))),u(u(m(u(m(u(y(F[1],P[0]),y(-P[1],F[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),P[2]))),O[3]),u(m(u(m(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),O[2]))),-P[3]),m(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(m(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),m(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),z[3]))),u(m(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),m(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),-F[3]),u(m(u(m(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),O[2]))),N[3]),m(u(m(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(m(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),N[2]))),-O[3]))))),B=u(u(u(m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),N[2]),u(m(u(y(N[1],P[0]),y(-P[1],N[0])),-O[2]),m(u(y(N[1],O[0]),y(-O[1],N[0])),P[2]))),z[3]),m(u(m(u(y(O[1],P[0]),y(-P[1],O[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-O[2]),m(u(y(z[1],O[0]),y(-O[1],z[0])),P[2]))),-N[3])),u(m(u(m(u(y(N[1],P[0]),y(-P[1],N[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-N[2]),m(u(y(z[1],N[0]),y(-N[1],z[0])),P[2]))),O[3]),m(u(m(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(m(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),m(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),-P[3]))),u(u(m(u(m(u(y(N[1],P[0]),y(-P[1],N[0])),F[2]),u(m(u(y(F[1],P[0]),y(-P[1],F[0])),-N[2]),m(u(y(F[1],N[0]),y(-N[1],F[0])),P[2]))),z[3]),m(u(m(u(y(N[1],P[0]),y(-P[1],N[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-N[2]),m(u(y(z[1],N[0]),y(-N[1],z[0])),P[2]))),-F[3])),u(m(u(m(u(y(F[1],P[0]),y(-P[1],F[0])),z[2]),u(m(u(y(z[1],P[0]),y(-P[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),P[2]))),N[3]),m(u(m(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(m(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),m(u(y(z[1],F[0]),y(-F[1],z[0])),N[2]))),-P[3])))),X=R(U,B);return X[X.length-1]}}function _(u){var y=u===3?c:u===4?T:l;return y(a,o,n,i)}var w=_(3),A=_(4),M=[function(){return 0},function(){return 0},function(y,m){return m[0]-y[0]},function(y,m,R){var L=(y[1]-R[1])*(m[0]-R[0]),z=(y[0]-R[0])*(m[1]-R[1]),F=L-z,N;if(L>0){if(z<=0)return F;N=L+z}else if(L<0){if(z>=0)return F;N=-(L+z)}else return F;var O=f*N;return F>=O||F<=-O?F:w(y,m,R)},function(y,m,R,L){var z=y[0]-L[0],F=m[0]-L[0],N=R[0]-L[0],O=y[1]-L[1],P=m[1]-L[1],U=R[1]-L[1],B=y[2]-L[2],X=m[2]-L[2],$=R[2]-L[2],le=F*U,ce=N*P,de=N*O,G=z*U,Y=z*P,ee=F*O,q=B*(le-ce)+X*(de-G)+$*(Y-ee),se=(Math.abs(le)+Math.abs(ce))*Math.abs(B)+(Math.abs(de)+Math.abs(G))*Math.abs(X)+(Math.abs(Y)+Math.abs(ee))*Math.abs($),ae=v*se;return q>ae||-q>ae?q:A(y,m,R,L)}];function g(u){var y=M[u.length];return y||(y=M[u.length]=_(u.length)),y.apply(void 0,u)}function b(u,y,m,R,L,z,F){return function(O,P,U,B,X){switch(arguments.length){case 0:case 1:return 0;case 2:return R(O,P);case 3:return L(O,P,U);case 4:return z(O,P,U,B);case 5:return F(O,P,U,B,X)}for(var $=new Array(arguments.length),le=0;le<arguments.length;++le)$[le]=arguments[le];return u($)}}function p(){for(;M.length<=s;)M.push(_(M.length));e.exports=b.apply(void 0,[g].concat(M));for(var u=0;u<=s;++u)e.exports[u]=M[u]}p()},5382:function(e,t,r){"use strict";var o=r(8210),a=r(3012);e.exports=n;function n(i,s){if(i.length===1)return a(s,i[0]);if(s.length===1)return a(i,s[0]);if(i.length===0||s.length===0)return[0];var h=[0];if(i.length<s.length)for(var f=0;f<i.length;++f)h=o(h,a(s,i[f]));else for(var f=0;f<s.length;++f)h=o(h,a(i,s[f]));return h}},3012:function(e,t,r){"use strict";var o=r(5250),a=r(9362);e.exports=n;function n(i,s){var h=i.length;if(h===1){var f=o(i[0],s);return f[0]?f:[f[1]]}var v=new Array(2*h),c=[.1,.1],T=[.1,.1],l=0;o(i[0],s,c),c[0]&&(v[l++]=c[0]);for(var _=1;_<h;++_){o(i[_],s,T);var w=c[1];a(w,T[0],c),c[0]&&(v[l++]=c[0]);var A=T[1],M=c[1],g=A+M,b=g-A,p=M-b;c[1]=g,p&&(v[l++]=p)}return c[1]&&(v[l++]=c[1]),l===0&&(v[l++]=0),v.length=l,v}},1125:function(e,t,r){"use strict";e.exports=n;var o=r(3250)[3];function a(i,s,h,f){for(var v=0;v<2;++v){var c=i[v],T=s[v],l=Math.min(c,T),_=Math.max(c,T),w=h[v],A=f[v],M=Math.min(w,A),g=Math.max(w,A);if(g<l||_<M)return!1}return!0}function n(i,s,h,f){var v=o(i,h,f),c=o(s,h,f);if(v>0&&c>0||v<0&&c<0)return!1;var T=o(h,i,s),l=o(f,i,s);return T>0&&l>0||T<0&&l<0?!1:v===0&&c===0&&T===0&&l===0?a(i,s,h,f):!0}},8545:function(e){"use strict";e.exports=r;function t(o,a){var n=o+a,i=n-o,s=n-i,h=a-i,f=o-s,v=f+h;return v?[v,n]:[n]}function r(o,a){var n=o.length|0,i=a.length|0;if(n===1&&i===1)return t(o[0],-a[0]);var s=n+i,h=new Array(s),f=0,v=0,c=0,T=Math.abs,l=o[v],_=T(l),w=-a[c],A=T(w),M,g;_<A?(g=l,v+=1,v<n&&(l=o[v],_=T(l))):(g=w,c+=1,c<i&&(w=-a[c],A=T(w))),v<n&&_<A||c>=i?(M=l,v+=1,v<n&&(l=o[v],_=T(l))):(M=w,c+=1,c<i&&(w=-a[c],A=T(w)));for(var b=M+g,p=b-M,u=g-p,y=u,m=b,R,L,z,F,N;v<n&&c<i;)_<A?(M=l,v+=1,v<n&&(l=o[v],_=T(l))):(M=w,c+=1,c<i&&(w=-a[c],A=T(w))),g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R;for(;v<n;)M=l,g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R,v+=1,v<n&&(l=o[v]);for(;c<i;)M=w,g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R,c+=1,c<i&&(w=-a[c]);return y&&(h[f++]=y),m&&(h[f++]=m),f||(h[f++]=0),h.length=f,h}},8210:function(e){"use strict";e.exports=r;function t(o,a){var n=o+a,i=n-o,s=n-i,h=a-i,f=o-s,v=f+h;return v?[v,n]:[n]}function r(o,a){var n=o.length|0,i=a.length|0;if(n===1&&i===1)return t(o[0],a[0]);var s=n+i,h=new Array(s),f=0,v=0,c=0,T=Math.abs,l=o[v],_=T(l),w=a[c],A=T(w),M,g;_<A?(g=l,v+=1,v<n&&(l=o[v],_=T(l))):(g=w,c+=1,c<i&&(w=a[c],A=T(w))),v<n&&_<A||c>=i?(M=l,v+=1,v<n&&(l=o[v],_=T(l))):(M=w,c+=1,c<i&&(w=a[c],A=T(w)));for(var b=M+g,p=b-M,u=g-p,y=u,m=b,R,L,z,F,N;v<n&&c<i;)_<A?(M=l,v+=1,v<n&&(l=o[v],_=T(l))):(M=w,c+=1,c<i&&(w=a[c],A=T(w))),g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R;for(;v<n;)M=l,g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R,v+=1,v<n&&(l=o[v]);for(;c<i;)M=w,g=y,b=M+g,p=b-M,u=g-p,u&&(h[f++]=u),R=m+b,L=R-m,z=R-L,F=b-L,N=m-z,y=N+F,m=R,c+=1,c<i&&(w=a[c]);return y&&(h[f++]=y),m&&(h[f++]=m),f||(h[f++]=0),h.length=f,h}},9127:function(e,t,r){"use strict";e.exports=n;var o=r(6204),a=r(5771);function n(i){return a(o(i))}},7765:function(e,t,r){"use strict";e.exports=l;var o=r(9618),a=r(1888),n=r(446),i=r(1570);function s(_){for(var w=_.length,A=0,M=0;M<w;++M)A=Math.max(A,_[M].length)|0;return A-1}function h(_,w){for(var A=_.length,M=a.mallocUint8(A),g=0;g<A;++g)M[g]=_[g]<w|0;return M}function f(_,w){for(var A=_.length,M=w*(w+1)/2*A|0,g=a.mallocUint32(M*2),b=0,p=0;p<A;++p)for(var u=_[p],w=u.length,y=0;y<w;++y)for(var m=0;m<y;++m){var R=u[m],L=u[y];g[b++]=Math.min(R,L)|0,g[b++]=Math.max(R,L)|0}var z=b/2|0;n(o(g,[z,2]));for(var F=2,p=2;p<b;p+=2)g[p-2]===g[p]&&g[p-1]===g[p+1]||(g[F++]=g[p],g[F++]=g[p+1]);return o(g,[F/2|0,2])}function v(_,w,A,M){for(var g=_.data,b=_.shape[0],p=a.mallocDouble(b),u=0,y=0;y<b;++y){var m=g[2*y],R=g[2*y+1];if(A[m]!==A[R]){var L=w[m],z=w[R];g[2*u]=m,g[2*u+1]=R,p[u++]=(z-M)/(z-L)}}return _.shape[0]=u,o(p,[u])}function c(_,w){var A=a.mallocInt32(w*2),M=_.shape[0],g=_.data;A[0]=0;for(var b=0,p=0;p<M;++p){var u=g[2*p];if(u!==b){for(A[2*b+1]=p;++b<u;)A[2*b]=p,A[2*b+1]=p;A[2*b]=p}}for(A[2*b+1]=M;++b<w;)A[2*b]=A[2*b+1]=M;return A}function T(_){for(var w=_.shape[0]|0,A=_.data,M=new Array(w),g=0;g<w;++g)M[g]=[A[2*g],A[2*g+1]];return M}function l(_,w,A,M){A=A||0,typeof M>"u"&&(M=s(_));var g=_.length;if(g===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=h(w,+A),p=f(_,M),u=v(p,w,b,+A),y=c(p,w.length|0),m=i(M)(_,p.data,y,b),R=T(p),L=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(p.data),a.free(u.data),a.free(y),{cells:m,vertexIds:R,vertexWeights:L}}},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(i,s,h,f){for(var v=Math.min(h,f)|0,c=Math.max(h,f)|0,T=i[2*v],l=i[2*v+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===c)return _;c<w?l=_:T=_+1}return T}function n(i,s,h,f){for(var v=i.length,c=[],T=0;T<v;++T)var l=i[T],_=l.length;return c}return n},function(){function a(i,s,h,f){for(var v=Math.min(h,f)|0,c=Math.max(h,f)|0,T=i[2*v],l=i[2*v+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===c)return _;c<w?l=_:T=_+1}return T}function n(i,s,h,f){for(var v=i.length,c=[],T=0;T<v;++T){var l=i[T],_=l.length;if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[1])]);break;case 2:c.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return c}return n},function(){function a(i,s,h,f){for(var v=Math.min(h,f)|0,c=Math.max(h,f)|0,T=i[2*v],l=i[2*v+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===c)return _;c<w?l=_:T=_+1}return T}function n(i,s,h,f){for(var v=i.length,c=[],T=0;T<v;++T){var l=i[T],_=l.length;if(_===3){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[2]),a(h,s,l[0],l[1])]);break;case 2:c.push([a(h,s,l[1],l[0]),a(h,s,l[1],l[2])]);break;case 3:c.push([a(h,s,l[0],l[2]),a(h,s,l[1],l[2])]);break;case 4:c.push([a(h,s,l[2],l[1]),a(h,s,l[2],l[0])]);break;case 5:c.push([a(h,s,l[2],l[1]),a(h,s,l[0],l[1])]);break;case 6:c.push([a(h,s,l[1],l[0]),a(h,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[1])]);break;case 2:c.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return c}return n},function(){function a(i,s,h,f){for(var v=Math.min(h,f)|0,c=Math.max(h,f)|0,T=i[2*v],l=i[2*v+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===c)return _;c<w?l=_:T=_+1}return T}function n(i,s,h,f){for(var v=i.length,c=[],T=0;T<v;++T){var l=i[T],_=l.length;if(_===4){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2)+(f[l[3]]<<3);if(w===0||w===15)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[1]),a(h,s,l[0],l[2]),a(h,s,l[0],l[3])]);break;case 2:c.push([a(h,s,l[1],l[2]),a(h,s,l[1],l[0]),a(h,s,l[1],l[3])]);break;case 3:c.push([a(h,s,l[1],l[2]),a(h,s,l[0],l[2]),a(h,s,l[0],l[3])],[a(h,s,l[1],l[3]),a(h,s,l[1],l[2]),a(h,s,l[0],l[3])]);break;case 4:c.push([a(h,s,l[2],l[0]),a(h,s,l[2],l[1]),a(h,s,l[2],l[3])]);break;case 5:c.push([a(h,s,l[0],l[1]),a(h,s,l[2],l[1]),a(h,s,l[0],l[3])],[a(h,s,l[2],l[1]),a(h,s,l[2],l[3]),a(h,s,l[0],l[3])]);break;case 6:c.push([a(h,s,l[2],l[0]),a(h,s,l[1],l[0]),a(h,s,l[1],l[3])],[a(h,s,l[2],l[3]),a(h,s,l[2],l[0]),a(h,s,l[1],l[3])]);break;case 7:c.push([a(h,s,l[0],l[3]),a(h,s,l[1],l[3]),a(h,s,l[2],l[3])]);break;case 8:c.push([a(h,s,l[3],l[1]),a(h,s,l[3],l[0]),a(h,s,l[3],l[2])]);break;case 9:c.push([a(h,s,l[3],l[1]),a(h,s,l[0],l[1]),a(h,s,l[0],l[2])],[a(h,s,l[3],l[2]),a(h,s,l[3],l[1]),a(h,s,l[0],l[2])]);break;case 10:c.push([a(h,s,l[1],l[0]),a(h,s,l[3],l[0]),a(h,s,l[1],l[2])],[a(h,s,l[3],l[0]),a(h,s,l[3],l[2]),a(h,s,l[1],l[2])]);break;case 11:c.push([a(h,s,l[1],l[2]),a(h,s,l[0],l[2]),a(h,s,l[3],l[2])]);break;case 12:c.push([a(h,s,l[3],l[0]),a(h,s,l[2],l[0]),a(h,s,l[2],l[1])],[a(h,s,l[3],l[1]),a(h,s,l[3],l[0]),a(h,s,l[2],l[1])]);break;case 13:c.push([a(h,s,l[0],l[1]),a(h,s,l[2],l[1]),a(h,s,l[3],l[1])]);break;case 14:c.push([a(h,s,l[2],l[0]),a(h,s,l[1],l[0]),a(h,s,l[3],l[0])]);break;case 15:break}}else if(_===3){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[2]),a(h,s,l[0],l[1])]);break;case 2:c.push([a(h,s,l[1],l[0]),a(h,s,l[1],l[2])]);break;case 3:c.push([a(h,s,l[0],l[2]),a(h,s,l[1],l[2])]);break;case 4:c.push([a(h,s,l[2],l[1]),a(h,s,l[2],l[0])]);break;case 5:c.push([a(h,s,l[2],l[1]),a(h,s,l[0],l[1])]);break;case 6:c.push([a(h,s,l[1],l[0]),a(h,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:c.push([a(h,s,l[0],l[1])]);break;case 2:c.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return c}return n}];function r(o){return t[o]()}},6803:function(e,t,r){"use strict";var o,a=r(8828),n=r(1755);function i(y){for(var m=0,R=Math.max,L=0,z=y.length;L<z;++L)m=R(m,y[L].length);return m-1}o=i;function s(y){for(var m=-1,R=Math.max,L=0,z=y.length;L<z;++L)for(var F=y[L],N=0,O=F.length;N<O;++N)m=R(m,F[N]);return m+1}o=s;function h(y){for(var m=new Array(y.length),R=0,L=y.length;R<L;++R)m[R]=y[R].slice(0);return m}o=h;function f(y,m){var R=y.length,L=y.length-m.length,z=Math.min;if(L)return L;switch(R){case 0:return 0;case 1:return y[0]-m[0];case 2:var U=y[0]+y[1]-m[0]-m[1];return U||z(y[0],y[1])-z(m[0],m[1]);case 3:var F=y[0]+y[1],N=m[0]+m[1];if(U=F+y[2]-(N+m[2]),U)return U;var O=z(y[0],y[1]),P=z(m[0],m[1]),U=z(O,y[2])-z(P,m[2]);return U||z(O+y[2],F)-z(P+m[2],N);default:var B=y.slice(0);B.sort();var X=m.slice(0);X.sort();for(var $=0;$<R;++$)if(L=B[$]-X[$],L)return L;return 0}}t.Fw=f;function v(y,m){return f(y[0],m[0])}function c(y,m){if(m){for(var R=y.length,L=new Array(R),z=0;z<R;++z)L[z]=[y[z],m[z]];L.sort(v);for(var z=0;z<R;++z)y[z]=L[z][0],m[z]=L[z][1];return y}else return y.sort(f),y}o=c;function T(y){if(y.length===0)return[];for(var m=1,R=y.length,L=1;L<R;++L){var z=y[L];if(f(z,y[L-1])){if(L===m){m++;continue}y[m++]=z}}return y.length=m,y}o=T;function l(y,m){for(var R=0,L=y.length-1,z=-1;R<=L;){var F=R+L>>1,N=f(y[F],m);N<=0?(N===0&&(z=F),R=F+1):N>0&&(L=F-1)}return z}o=l;function _(y,m){for(var R=new Array(y.length),L=0,z=R.length;L<z;++L)R[L]=[];for(var F=[],L=0,N=m.length;L<N;++L)for(var O=m[L],P=O.length,U=1,B=1<<P;U<B;++U){F.length=a.popCount(U);for(var X=0,$=0;$<P;++$)U&1<<$&&(F[X++]=O[$]);var le=l(y,F);if(!(le<0))for(;R[le++].push(L),!(le>=y.length||f(y[le],F)!==0););}return R}o=_;function w(y,m){if(!m)return _(T(M(y,0)),y,0);for(var R=new Array(m),L=0;L<m;++L)R[L]=[];for(var L=0,z=y.length;L<z;++L)for(var F=y[L],N=0,O=F.length;N<O;++N)R[F[N]].push(L);return R}o=w;function A(y){for(var m=[],R=0,L=y.length;R<L;++R)for(var z=y[R],F=z.length|0,N=1,O=1<<F;N<O;++N){for(var P=[],U=0;U<F;++U)N>>>U&1&&P.push(z[U]);m.push(P)}return c(m)}o=A;function M(y,m){if(m<0)return[];for(var R=[],L=(1<<m+1)-1,z=0;z<y.length;++z)for(var F=y[z],N=L;N<1<<F.length;N=a.nextCombination(N)){for(var O=new Array(m+1),P=0,U=0;U<F.length;++U)N&1<<U&&(O[P++]=F[U]);R.push(O)}return c(R)}o=M;function g(y){for(var m=[],R=0,L=y.length;R<L;++R)for(var z=y[R],F=0,N=z.length;F<N;++F){for(var O=new Array(z.length-1),P=0,U=0;P<N;++P)P!==F&&(O[U++]=z[P]);m.push(O)}return c(m)}o=g;function b(y,m){for(var R=new n(m),L=0;L<y.length;++L)for(var z=y[L],F=0;F<z.length;++F)for(var N=F+1;N<z.length;++N)R.link(z[F],z[N]);for(var O=[],P=R.ranks,L=0;L<P.length;++L)P[L]=-1;for(var L=0;L<y.length;++L){var U=R.find(y[L][0]);P[U]<0?(P[U]=O.length,O.push([y[L].slice(0)])):O[P[U]].push(y[L].slice(0))}return O}function p(y){for(var m=T(c(M(y,0))),R=new n(m.length),L=0;L<y.length;++L)for(var z=y[L],F=0;F<z.length;++F)for(var N=l(m,[z[F]]),O=F+1;O<z.length;++O)R.link(N,l(m,[z[O]]));for(var P=[],U=R.ranks,L=0;L<U.length;++L)U[L]=-1;for(var L=0;L<y.length;++L){var B=R.find(l(m,[y[L][0]]));U[B]<0?(U[B]=P.length,P.push([y[L].slice(0)])):P[U[B]].push(y[L].slice(0))}return P}function u(y,m){return m?b(y,m):p(y)}o=u},3105:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<<r-1,t.sign=function(n){return(n>0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n<i)},t.max=function(n,i){return n^(n^i)&-(n<i)},t.isPow2=function(n){return!(n&n-1)&&!!n},t.log2=function(n){var i,s;return i=(n>65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;n[i]=h<<f&255}})(a),t.reverse=function(n){return a[n&255]<<24|a[n>>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},2014:function(e,t,r){"use strict";"use restrict";var o=r(3105),a=r(4623);function n(u){for(var y=0,m=Math.max,R=0,L=u.length;R<L;++R)y=m(y,u[R].length);return y-1}t.dimension=n;function i(u){for(var y=-1,m=Math.max,R=0,L=u.length;R<L;++R)for(var z=u[R],F=0,N=z.length;F<N;++F)y=m(y,z[F]);return y+1}t.countVertices=i;function s(u){for(var y=new Array(u.length),m=0,R=u.length;m<R;++m)y[m]=u[m].slice(0);return y}t.cloneCells=s;function h(u,y){var m=u.length,R=u.length-y.length,L=Math.min;if(R)return R;switch(m){case 0:return 0;case 1:return u[0]-y[0];case 2:var P=u[0]+u[1]-y[0]-y[1];return P||L(u[0],u[1])-L(y[0],y[1]);case 3:var z=u[0]+u[1],F=y[0]+y[1];if(P=z+u[2]-(F+y[2]),P)return P;var N=L(u[0],u[1]),O=L(y[0],y[1]),P=L(N,u[2])-L(O,y[2]);return P||L(N+u[2],z)-L(O+y[2],F);default:var U=u.slice(0);U.sort();var B=y.slice(0);B.sort();for(var X=0;X<m;++X)if(R=U[X]-B[X],R)return R;return 0}}t.compareCells=h;function f(u,y){return h(u[0],y[0])}function v(u,y){if(y){for(var m=u.length,R=new Array(m),L=0;L<m;++L)R[L]=[u[L],y[L]];R.sort(f);for(var L=0;L<m;++L)u[L]=R[L][0],y[L]=R[L][1];return u}else return u.sort(h),u}t.normalize=v;function c(u){if(u.length===0)return[];for(var y=1,m=u.length,R=1;R<m;++R){var L=u[R];if(h(L,u[R-1])){if(R===y){y++;continue}u[y++]=L}}return u.length=y,u}t.unique=c;function T(u,y){for(var m=0,R=u.length-1,L=-1;m<=R;){var z=m+R>>1,F=h(u[z],y);F<=0?(F===0&&(L=z),m=z+1):F>0&&(R=z-1)}return L}t.findCell=T;function l(u,y){for(var m=new Array(u.length),R=0,L=m.length;R<L;++R)m[R]=[];for(var z=[],R=0,F=y.length;R<F;++R)for(var N=y[R],O=N.length,P=1,U=1<<O;P<U;++P){z.length=o.popCount(P);for(var B=0,X=0;X<O;++X)P&1<<X&&(z[B++]=N[X]);var $=T(u,z);if(!($<0))for(;m[$++].push(R),!($>=u.length||h(u[$],z)!==0););}return m}t.incidence=l;function _(u,y){if(!y)return l(c(A(u,0)),u,0);for(var m=new Array(y),R=0;R<y;++R)m[R]=[];for(var R=0,L=u.length;R<L;++R)for(var z=u[R],F=0,N=z.length;F<N;++F)m[z[F]].push(R);return m}t.dual=_;function w(u){for(var y=[],m=0,R=u.length;m<R;++m)for(var L=u[m],z=L.length|0,F=1,N=1<<z;F<N;++F){for(var O=[],P=0;P<z;++P)F>>>P&1&&O.push(L[P]);y.push(O)}return v(y)}t.explode=w;function A(u,y){if(y<0)return[];for(var m=[],R=(1<<y+1)-1,L=0;L<u.length;++L)for(var z=u[L],F=R;F<1<<z.length;F=o.nextCombination(F)){for(var N=new Array(y+1),O=0,P=0;P<z.length;++P)F&1<<P&&(N[O++]=z[P]);m.push(N)}return v(m)}t.skeleton=A;function M(u){for(var y=[],m=0,R=u.length;m<R;++m)for(var L=u[m],z=0,F=L.length;z<F;++z){for(var N=new Array(L.length-1),O=0,P=0;O<F;++O)O!==z&&(N[P++]=L[O]);y.push(N)}return v(y)}t.boundary=M;function g(u,y){for(var m=new a(y),R=0;R<u.length;++R)for(var L=u[R],z=0;z<L.length;++z)for(var F=z+1;F<L.length;++F)m.link(L[z],L[F]);for(var N=[],O=m.ranks,R=0;R<O.length;++R)O[R]=-1;for(var R=0;R<u.length;++R){var P=m.find(u[R][0]);O[P]<0?(O[P]=N.length,N.push([u[R].slice(0)])):N[O[P]].push(u[R].slice(0))}return N}function b(u){for(var y=c(v(A(u,0))),m=new a(y.length),R=0;R<u.length;++R)for(var L=u[R],z=0;z<L.length;++z)for(var F=T(y,[L[z]]),N=z+1;N<L.length;++N)m.link(F,T(y,[L[N]]));for(var O=[],P=m.ranks,R=0;R<P.length;++R)P[R]=-1;for(var R=0;R<u.length;++R){var U=m.find(T(y,[u[R][0]]));P[U]<0?(P[U]=O.length,O.push([u[R].slice(0)])):O[P[U]].push(u[R].slice(0))}return O}function p(u,y){return y?g(u,y):b(u)}t.connectedComponents=p},4623:function(e){"use strict";"use restrict";e.exports=t;function t(r){this.roots=new Array(r),this.ranks=new Array(r);for(var o=0;o<r;++o)this.roots[o]=o,this.ranks[o]=0}t.prototype.length=function(){return this.roots.length},t.prototype.makeSet=function(){var r=this.roots.length;return this.roots.push(r),this.ranks.push(0),r},t.prototype.find=function(r){for(var o=this.roots;o[r]!==r;){var a=o[r];o[r]=o[a],r=a}return r},t.prototype.link=function(r,o){var a=this.find(r),n=this.find(o);if(a!==n){var i=this.ranks,s=this.roots,h=i[a],f=i[n];h<f?s[a]=n:f<h?s[n]=a:(s[n]=a,++i[a])}}},5878:function(e,t,r){"use strict";e.exports=i;var o=r(3250),a=r(2014);function n(s,h,f){var v=Math.abs(o(s,h,f)),c=Math.sqrt(Math.pow(h[0]-f[0],2)+Math.pow(h[1]-f[1],2));return v/c}function i(s,h,f){for(var v=h.length,c=s.length,T=new Array(v),l=new Array(v),_=new Array(v),w=new Array(v),A=0;A<v;++A)T[A]=l[A]=-1,_[A]=1/0,w[A]=!1;for(var A=0;A<c;++A){var M=s[A];if(M.length!==2)throw new Error("Input must be a graph");var g=M[1],b=M[0];l[b]!==-1?l[b]=-2:l[b]=g,T[g]!==-1?T[g]=-2:T[g]=b}function p(G){if(w[G])return 1/0;var Y=T[G],ee=l[G];return Y<0||ee<0?1/0:n(h[G],h[Y],h[ee])}function u(G,Y){var ee=O[G],q=O[Y];O[G]=q,O[Y]=ee,P[ee]=Y,P[q]=G}function y(G){return _[O[G]]}function m(G){return G&1?G-1>>1:(G>>1)-1}function R(G){for(var Y=y(G);;){var ee=Y,q=2*G+1,se=2*(G+1),ae=G;if(q<B){var j=y(q);j<ee&&(ae=q,ee=j)}if(se<B){var Q=y(se);Q<ee&&(ae=se)}if(ae===G)return G;u(G,ae),G=ae}}function L(G){for(var Y=y(G);G>0;){var ee=m(G);if(ee>=0){var q=y(ee);if(Y<q){u(G,ee),G=ee;continue}}return G}}function z(){if(B>0){var G=O[0];return u(0,B-1),B-=1,R(0),G}return-1}function F(G,Y){var ee=O[G];return _[ee]===Y?G:(_[ee]=-1/0,L(G),z(),_[ee]=Y,B+=1,L(B-1))}function N(G){if(!w[G]){w[G]=!0;var Y=T[G],ee=l[G];T[ee]>=0&&(T[ee]=Y),l[Y]>=0&&(l[Y]=ee),P[Y]>=0&&F(P[Y],p(Y)),P[ee]>=0&&F(P[ee],p(ee))}}for(var O=[],P=new Array(v),A=0;A<v;++A){var U=_[A]=p(A);U<1/0?(P[A]=O.length,O.push(A)):P[A]=-1}for(var B=O.length,A=B>>1;A>=0;--A)R(A);for(;;){var X=z();if(X<0||_[X]>f)break;N(X)}for(var $=[],A=0;A<v;++A)w[A]||(P[A]=$.length,$.push(h[A].slice()));var le=$.length;function ce(G,Y){if(G[Y]<0)return Y;var ee=Y,q=Y;do{var se=G[q];if(!w[q]||se<0||se===q||(q=se,se=G[q],!w[q]||se<0||se===q))break;q=se,ee=G[ee]}while(ee!==q);for(var ae=Y;ae!==q;ae=G[ae])G[ae]=q;return q}var de=[];return s.forEach(function(G){var Y=ce(T,G[0]),ee=ce(l,G[1]);if(Y>=0&&ee>=0&&Y!==ee){var q=P[Y],se=P[ee];q!==se&&de.push([q,se])}}),a.unique(a.normalize(de)),{positions:$,edges:de}}},1303:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){var h,f;if(s[0][0]<s[1][0])h=s[0],f=s[1];else if(s[0][0]>s[1][0])h=s[1],f=s[0];else{var v=Math.min(i[0][1],i[1][1]),c=Math.max(i[0][1],i[1][1]),T=Math.min(s[0][1],s[1][1]),l=Math.max(s[0][1],s[1][1]);return c<T?c-T:v>l?v-l:c-l}var _,w;i[0][1]<i[1][1]?(_=i[0],w=i[1]):(_=i[1],w=i[0]);var A=o(f,h,_);return A||(A=o(f,h,w),A)?A:w-f}function n(i,s){var h,f;if(s[0][0]<s[1][0])h=s[0],f=s[1];else if(s[0][0]>s[1][0])h=s[1],f=s[0];else return a(s,i);var v,c;if(i[0][0]<i[1][0])v=i[0],c=i[1];else if(i[0][0]>i[1][0])v=i[1],c=i[0];else return-a(i,s);var T=o(h,f,c),l=o(h,f,v);if(T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;if(T=o(c,v,f),l=o(c,v,h),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return f[0]-c[0]}},4209:function(e,t,r){"use strict";e.exports=l;var o=r(2478),a=r(3840),n=r(3250),i=r(1303);function s(_,w,A){this.slabs=_,this.coordinates=w,this.horizontal=A}var h=s.prototype;function f(_,w){return _.y-w}function v(_,w){for(var A=null;_;){var M=_.key,g,b;M[0][0]<M[1][0]?(g=M[0],b=M[1]):(g=M[1],b=M[0]);var p=n(g,b,w);if(p<0)_=_.left;else if(p>0)if(w[0]!==M[1][0])A=_,_=_.right;else{var u=v(_.right,w);if(u)return u;_=_.left}else{if(w[0]!==M[1][0])return _;var u=v(_.right,w);if(u)return u;_=_.left}}return A}h.castUp=function(_){var w=o.le(this.coordinates,_[0]);if(w<0)return-1;var A=this.slabs[w],M=v(this.slabs[w],_),g=-1;if(M&&(g=M.value),this.coordinates[w]===_[0]){var b=null;if(M&&(b=M.key),w>0){var p=v(this.slabs[w-1],_);p&&(b?i(p.key,b)>0&&(b=p.key,g=p.value):(g=p.value,b=p.key))}var u=this.horizontal[w];if(u.length>0){var y=o.ge(u,_[1],f);if(y<u.length){var m=u[y];if(_[1]===m.y){if(m.closed)return m.index;for(;y<u.length-1&&u[y+1].y===_[1];)if(y=y+1,m=u[y],m.closed)return m.index;if(m.y===_[1]&&!m.start){if(y=y+1,y>=u.length)return g;m=u[y]}}if(m.start)if(b){var R=n(b[0],b[1],[_[0],m.y]);b[0][0]>b[1][0]&&(R=-R),R>0&&(g=m.index)}else g=m.index;else m.y!==_[1]&&(g=m.index)}}}return g};function c(_,w,A,M){this.y=_,this.index=w,this.start=A,this.closed=M}function T(_,w,A,M){this.x=_,this.segment=w,this.create=A,this.index=M}function l(_){for(var w=_.length,A=2*w,M=new Array(A),g=0;g<w;++g){var b=_[g],p=b[0][0]<b[1][0];M[2*g]=new T(b[0][0],b,p,g),M[2*g+1]=new T(b[1][0],b,!p,g)}M.sort(function(O,P){var U=O.x-P.x;return U||(U=O.create-P.create,U)?U:Math.min(O.segment[0][1],O.segment[1][1])-Math.min(P.segment[0][1],P.segment[1][1])});for(var u=a(i),y=[],m=[],R=[],L=-1/0,g=0;g<A;){for(var z=M[g].x,F=[];g<A;){var N=M[g];if(N.x!==z)break;g+=1,N.segment[0][0]===N.x&&N.segment[1][0]===N.x?N.create&&(N.segment[0][1]<N.segment[1][1]?(F.push(new c(N.segment[0][1],N.index,!0,!0)),F.push(new c(N.segment[1][1],N.index,!1,!1))):(F.push(new c(N.segment[1][1],N.index,!0,!1)),F.push(new c(N.segment[0][1],N.index,!1,!0)))):N.create?u=u.insert(N.segment,N.index):u=u.remove(N.segment)}y.push(u.root),m.push(z),R.push(F)}return new s(y,m,R)}},5202:function(e,t,r){"use strict";var o=r(1944),a=r(8210);e.exports=s,e.exports.positive=h,e.exports.negative=f;function n(v,c){var T=a(o(v,c),[c[c.length-1]]);return T[T.length-1]}function i(v,c,T,l){var _=l-c,w=-c/_;w<0?w=0:w>1&&(w=1);for(var A=1-w,M=v.length,g=new Array(M),b=0;b<M;++b)g[b]=w*v[b]+A*T[b];return g}function s(v,c){for(var T=[],l=[],_=n(v[v.length-1],c),w=v[v.length-1],A=v[0],M=0;M<v.length;++M,w=A){A=v[M];var g=n(A,c);if(_<0&&g>0||_>0&&g<0){var b=i(w,g,A,_);T.push(b),l.push(b.slice())}g<0?l.push(A.slice()):g>0?T.push(A.slice()):(T.push(A.slice()),l.push(A.slice())),_=g}return{positive:T,negative:l}}function h(v,c){for(var T=[],l=n(v[v.length-1],c),_=v[v.length-1],w=v[0],A=0;A<v.length;++A,_=w){w=v[A];var M=n(w,c);(l<0&&M>0||l>0&&M<0)&&T.push(i(_,M,w,l)),M>=0&&T.push(w.slice()),l=M}return T}function f(v,c){for(var T=[],l=n(v[v.length-1],c),_=v[v.length-1],w=v[0],A=0;A<v.length;++A,_=w){w=v[A];var M=n(w,c);(l<0&&M>0||l>0&&M<0)&&T.push(i(_,M,w,l)),M<=0&&T.push(w.slice()),l=M}return T}},3387:function(e,t,r){var o;(function(){"use strict";var a={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(v){return s(f(v),arguments)}function i(v,c){return n.apply(null,[v].concat(c||[]))}function s(v,c){var T=1,l=v.length,_,w="",A,M,g,b,p,u,y,m;for(A=0;A<l;A++)if(typeof v[A]=="string")w+=v[A];else if(typeof v[A]=="object"){if(g=v[A],g.keys)for(_=c[T],M=0;M<g.keys.length;M++){if(_==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',g.keys[M],g.keys[M-1]));_=_[g.keys[M]]}else g.param_no?_=c[g.param_no]:_=c[T++];if(a.not_type.test(g.type)&&a.not_primitive.test(g.type)&&_ instanceof Function&&(_=_()),a.numeric_arg.test(g.type)&&typeof _!="number"&&isNaN(_))throw new TypeError(n("[sprintf] expecting number but found %T",_));switch(a.number.test(g.type)&&(y=_>=0),g.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,g.width?parseInt(g.width):0);break;case"e":_=g.precision?parseFloat(_).toExponential(g.precision):parseFloat(_).toExponential();break;case"f":_=g.precision?parseFloat(_).toFixed(g.precision):parseFloat(_);break;case"g":_=g.precision?String(Number(_.toPrecision(g.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=g.precision?_.substring(0,g.precision):_;break;case"t":_=String(!!_),_=g.precision?_.substring(0,g.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=g.precision?_.substring(0,g.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=g.precision?_.substring(0,g.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}a.json.test(g.type)?w+=_:(a.number.test(g.type)&&(!y||g.sign)?(m=y?"+":"-",_=_.toString().replace(a.sign,"")):m="",p=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",u=g.width-(m+_).length,b=g.width&&u>0?p.repeat(u):"",w+=g.align?m+_+b:p==="0"?m+b+_:b+m+_)}return w}var h=Object.create(null);function f(v){if(h[v])return h[v];for(var c=v,T,l=[],_=0;c;){if((T=a.text.exec(c))!==null)l.push(T[0]);else if((T=a.modulo.exec(c))!==null)l.push("%");else if((T=a.placeholder.exec(c))!==null){if(T[2]){_|=1;var w=[],A=T[2],M=[];if((M=a.key.exec(A))!==null)for(w.push(M[1]);(A=A.substring(M[0].length))!=="";)if((M=a.key_access.exec(A))!==null)w.push(M[1]);else if((M=a.index_access.exec(A))!==null)w.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=w}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(T[0].length)}return h[v]=l}t.sprintf=n,t.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,o=function(){return{sprintf:n,vsprintf:i}}.call(t,r,t,e),o!==void 0&&(e.exports=o))})()},3711:function(e,t,r){"use strict";e.exports=f;var o=r(2640),a=r(781),n={"2d":function(v,c,T){var l=v({order:c,scalarArguments:3,getters:T==="generic"?[0]:void 0,phase:function(w,A,M,g){return w>g|0},vertex:function(w,A,M,g,b,p,u,y,m,R,L,z,F){var N=(u<<0)+(y<<1)+(m<<2)+(R<<3)|0;if(!(N===0||N===15))switch(N){case 0:L.push([w-.5,A-.5]);break;case 1:L.push([w-.25-.25*(g+M-2*F)/(M-g),A-.25-.25*(b+M-2*F)/(M-b)]);break;case 2:L.push([w-.75-.25*(-g-M+2*F)/(g-M),A-.25-.25*(p+g-2*F)/(g-p)]);break;case 3:L.push([w-.5,A-.5-.5*(b+M+p+g-4*F)/(M-b+g-p)]);break;case 4:L.push([w-.25-.25*(p+b-2*F)/(b-p),A-.75-.25*(-b-M+2*F)/(b-M)]);break;case 5:L.push([w-.5-.5*(g+M+p+b-4*F)/(M-g+b-p),A-.5]);break;case 6:L.push([w-.5-.25*(-g-M+p+b)/(g-M+b-p),A-.5-.25*(-b-M+p+g)/(b-M+g-p)]);break;case 7:L.push([w-.75-.25*(p+b-2*F)/(b-p),A-.75-.25*(p+g-2*F)/(g-p)]);break;case 8:L.push([w-.75-.25*(-p-b+2*F)/(p-b),A-.75-.25*(-p-g+2*F)/(p-g)]);break;case 9:L.push([w-.5-.25*(g+M+-p-b)/(M-g+p-b),A-.5-.25*(b+M+-p-g)/(M-b+p-g)]);break;case 10:L.push([w-.5-.5*(-g-M+-p-b+4*F)/(g-M+p-b),A-.5]);break;case 11:L.push([w-.25-.25*(-p-b+2*F)/(p-b),A-.75-.25*(b+M-2*F)/(M-b)]);break;case 12:L.push([w-.5,A-.5-.5*(-b-M+-p-g+4*F)/(b-M+p-g)]);break;case 13:L.push([w-.75-.25*(g+M-2*F)/(M-g),A-.25-.25*(-p-g+2*F)/(p-g)]);break;case 14:L.push([w-.25-.25*(-g-M+2*F)/(g-M),A-.25-.25*(-b-M+2*F)/(b-M)]);break;case 15:L.push([w-.5,A-.5]);break}},cell:function(w,A,M,g,b,p,u,y,m){b?y.push([w,A]):y.push([A,w])}});return function(_,w){var A=[],M=[];return l(_,A,M,w),{positions:A,cells:M}}}};function i(v,c){var T=v.length+"d",l=n[T];if(l)return l(o,v,c)}function s(v,c){for(var T=a(v,c),l=T.length,_=new Array(l),w=new Array(l),A=0;A<l;++A)_[A]=[T[A]],w[A]=[A];return{positions:_,cells:w}}var h={};function f(v,_){if(v.dimension<=0)return{positions:[],cells:[]};if(v.dimension===1)return s(v,_);var T=v.order.join()+"-"+v.dtype,l=h[T],_=+_||0;return l||(l=h[T]=i(v.order,v.dtype)),l(v,_)}},665:function(e,t,r){"use strict";var o=r(3202);e.exports=s;var a=96;function n(h,f){var v=o(getComputedStyle(h).getPropertyValue(f));return v[0]*s(v[1],h)}function i(h,f){var v=document.createElement("div");v.style["font-size"]="128"+h,f.appendChild(v);var c=n(v,"font-size")/128;return f.removeChild(v),c}function s(h,f){switch(f=f||document.body,h=(h||"px").trim().toLowerCase(),(f===window||f===document)&&(f=document.body),h){case"%":return f.clientHeight/100;case"ch":case"ex":return i(h,f);case"em":return n(f,"font-size");case"rem":return n(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 a;case"cm":return a/2.54;case"mm":return a/25.4;case"pt":return a/72;case"pc":return a/6}return 1}},7261:function(e,t,r){"use strict";e.exports=w;var o=r(9215),a=r(7608),n=r(6079),i=r(5911),s=r(3536),h=r(244);function f(A,M,g){return Math.sqrt(Math.pow(A,2)+Math.pow(M,2)+Math.pow(g,2))}function v(A){return Math.min(1,Math.max(-1,A))}function c(A){var M=Math.abs(A[0]),g=Math.abs(A[1]),b=Math.abs(A[2]),p=[0,0,0];M>Math.max(g,b)?p[2]=1:g>Math.max(M,b)?p[0]=1:p[1]=1;for(var u=0,y=0,m=0;m<3;++m)u+=A[m]*A[m],y+=p[m]*A[m];for(var m=0;m<3;++m)p[m]-=y/u*A[m];return s(p,p),p}function T(A,M,g,b,p,u,y,m){this.center=o(g),this.up=o(b),this.right=o(p),this.radius=o([u]),this.angle=o([y,m]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(A,M){A>0?A=Math.log(A):A=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=M},l.getDistanceLimits=function(A){var M=this.radius.bounds[0];return A?(A[0]=Math.exp(M[0][0]),A[1]=Math.exp(M[1][0]),A):[Math.exp(M[0][0]),Math.exp(M[1][0])]},l.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var M=this.computedUp,g=this.computedRight,b=0,p=0,u=0;u<3;++u)p+=M[u]*g[u],b+=M[u]*M[u];for(var y=Math.sqrt(b),m=0,u=0;u<3;++u)g[u]-=M[u]*p/b,m+=g[u]*g[u],M[u]/=y;for(var R=Math.sqrt(m),u=0;u<3;++u)g[u]/=R;var L=this.computedToward;i(L,M,g),s(L,L);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],N=this.computedAngle[1],O=Math.cos(F),P=Math.sin(F),U=Math.cos(N),B=Math.sin(N),X=this.computedCenter,$=O*U,le=P*U,ce=B,de=-O*B,G=-P*B,Y=U,ee=this.computedEye,q=this.computedMatrix,u=0;u<3;++u){var se=$*g[u]+le*L[u]+ce*M[u];q[4*u+1]=de*g[u]+G*L[u]+Y*M[u],q[4*u+2]=se,q[4*u+3]=0}var ae=q[1],j=q[5],Q=q[9],re=q[2],pe=q[6],we=q[10],Se=j*we-Q*pe,Ie=Q*re-ae*we,Re=ae*pe-j*re,We=f(Se,Ie,Re);Se/=We,Ie/=We,Re/=We,q[0]=Se,q[4]=Ie,q[8]=Re;for(var u=0;u<3;++u)ee[u]=X[u]+q[2+4*u]*z;for(var u=0;u<3;++u){for(var m=0,at=0;at<3;++at)m+=q[u+4*at]*ee[at];q[12+u]=-m}q[15]=1},l.getMatrix=function(A,M){this.recalcMatrix(A);var g=this.computedMatrix;if(M){for(var b=0;b<16;++b)M[b]=g[b];return M}return g};var _=[0,0,0];l.rotate=function(A,M,g,b){if(this.angle.move(A,M,g),b){this.recalcMatrix(A);var p=this.computedMatrix;_[0]=p[2],_[1]=p[6],_[2]=p[10];for(var u=this.computedUp,y=this.computedRight,m=this.computedToward,R=0;R<3;++R)p[4*R]=u[R],p[4*R+1]=y[R],p[4*R+2]=m[R];n(p,p,b,_);for(var R=0;R<3;++R)u[R]=p[4*R],y[R]=p[4*R+1];this.up.set(A,u[0],u[1],u[2]),this.right.set(A,y[0],y[1],y[2])}},l.pan=function(A,M,g,b){M=M||0,g=g||0,b=b||0,this.recalcMatrix(A);var p=this.computedMatrix,u=Math.exp(this.computedRadius[0]),y=p[1],m=p[5],R=p[9],L=f(y,m,R);y/=L,m/=L,R/=L;var z=p[0],F=p[4],N=p[8],O=z*y+F*m+N*R;z-=y*O,F-=m*O,N-=R*O;var P=f(z,F,N);z/=P,F/=P,N/=P;var U=z*M+y*g,B=F*M+m*g,X=N*M+R*g;this.center.move(A,U,B,X);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+b),this.radius.set(A,Math.log($))},l.translate=function(A,M,g,b){this.center.move(A,M||0,g||0,b||0)},l.setMatrix=function(A,M,g,b){var p=1;typeof g=="number"&&(p=g|0),(p<0||p>3)&&(p=1);var u=(p+2)%3,y=(p+1)%3;M||(this.recalcMatrix(A),M=this.computedMatrix);var m=M[p],R=M[p+4],L=M[p+8];if(b){var F=Math.abs(m),N=Math.abs(R),O=Math.abs(L),P=Math.max(F,N,O);F===P?(m=m<0?-1:1,R=L=0):O===P?(L=L<0?-1:1,m=R=0):(R=R<0?-1:1,m=L=0)}else{var z=f(m,R,L);m/=z,R/=z,L/=z}var U=M[u],B=M[u+4],X=M[u+8],$=U*m+B*R+X*L;U-=m*$,B-=R*$,X-=L*$;var le=f(U,B,X);U/=le,B/=le,X/=le;var ce=R*X-L*B,de=L*U-m*X,G=m*B-R*U,Y=f(ce,de,G);ce/=Y,de/=Y,G/=Y,this.center.jump(A,ue,ne,Ce),this.radius.idle(A),this.up.jump(A,m,R,L),this.right.jump(A,U,B,X);var ee,q;if(p===2){var se=M[1],ae=M[5],j=M[9],Q=se*U+ae*B+j*X,re=se*ce+ae*de+j*G;Ie<0?ee=-Math.PI/2:ee=Math.PI/2,q=Math.atan2(re,Q)}else{var pe=M[2],we=M[6],Se=M[10],Ie=pe*m+we*R+Se*L,Re=pe*U+we*B+Se*X,We=pe*ce+we*de+Se*G;ee=Math.asin(v(Ie)),q=Math.atan2(We,Re)}this.angle.jump(A,q,ee),this.recalcMatrix(A);var at=M[2],nt=M[6],tt=M[10],qe=this.computedMatrix;a(qe,M);var he=qe[15],ue=qe[12]/he,ne=qe[13]/he,Ce=qe[14]/he,Ye=Math.exp(this.computedRadius[0]);this.center.jump(A,ue-at*Ye,ne-nt*Ye,Ce-tt*Ye)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},l.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},l.setDistance=function(A,M){M>0&&this.radius.set(A,Math.log(M))},l.lookAt=function(A,M,g,b){this.recalcMatrix(A),M=M||this.computedEye,g=g||this.computedCenter,b=b||this.computedUp;var p=b[0],u=b[1],y=b[2],m=f(p,u,y);if(!(m<1e-6)){p/=m,u/=m,y/=m;var R=M[0]-g[0],L=M[1]-g[1],z=M[2]-g[2],F=f(R,L,z);if(!(F<1e-6)){R/=F,L/=F,z/=F;var N=this.computedRight,O=N[0],P=N[1],U=N[2],B=p*O+u*P+y*U;O-=B*p,P-=B*u,U-=B*y;var X=f(O,P,U);if(!(X<.01&&(O=u*z-y*L,P=y*R-p*z,U=p*L-u*R,X=f(O,P,U),X<1e-6))){O/=X,P/=X,U/=X,this.up.set(A,p,u,y),this.right.set(A,O,P,U),this.center.set(A,g[0],g[1],g[2]),this.radius.set(A,Math.log(F));var $=u*U-y*P,le=y*O-p*U,ce=p*P-u*O,de=f($,le,ce);$/=de,le/=de,ce/=de;var G=p*R+u*L+y*z,Y=O*R+P*L+U*z,ee=$*R+le*L+ce*z,q=Math.asin(v(G)),se=Math.atan2(ee,Y),ae=this.angle._state,j=ae[ae.length-1],Q=ae[ae.length-2];j=j%(2*Math.PI);var re=Math.abs(j+2*Math.PI-se),pe=Math.abs(j-se),we=Math.abs(j-2*Math.PI-se);re<pe&&(j+=2*Math.PI),we<pe&&(j-=2*Math.PI),this.angle.jump(this.angle.lastT(),j,Q),this.angle.set(A,se,q)}}}};function w(A){A=A||{};var M=A.center||[0,0,0],g=A.up||[0,1,0],b=A.right||c(g),p=A.radius||1,u=A.theta||0,y=A.phi||0;if(M=[].slice.call(M,0,3),g=[].slice.call(g,0,3),s(g,g),b=[].slice.call(b,0,3),s(b,b),"eye"in A){var m=A.eye,R=[m[0]-M[0],m[1]-M[1],m[2]-M[2]];i(b,R,g),f(b[0],b[1],b[2])<1e-6?b=c(g):s(b,b),p=f(R[0],R[1],R[2]);var L=h(g,R)/p,z=h(b,R)/p;y=Math.acos(L),u=Math.acos(z)}return p=Math.log(p),new T(A.zoomMin,A.zoomMax,M,g,b,p,u,y)}},5250:function(e){"use strict";e.exports=r;var t=+(Math.pow(2,27)+1);function r(o,a,n){var i=o*a,s=t*o,h=s-o,f=s-h,v=o-f,c=t*a,T=c-a,l=c-T,_=a-l,w=i-f*l,A=w-v*l,M=A-f*_,g=v*_-M;return n?(n[0]=g,n[1]=i,n):[g,i]}},9362:function(e){"use strict";e.exports=t;function t(r,o,a){var n=r+o,i=n-r,s=n-i,h=o-i,f=r-s;return a?(a[0]=f+h,a[1]=n,a):[f+h,n]}},1888:function(e,t,r){"use strict";var o=r(8828),a=r(1338),n=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),BIGUINT64:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),BIGINT64:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var i=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",h=typeof BigInt64Array<"u",f=r.g.__TYPEDARRAY_POOL;f.UINT8C||(f.UINT8C=a([32,0])),f.BIGUINT64||(f.BIGUINT64=a([32,0])),f.BIGINT64||(f.BIGINT64=a([32,0])),f.BUFFER||(f.BUFFER=a([32,0]));var v=f.DATA,c=f.BUFFER;t.free=function(O){if(n.isBuffer(O))c[o.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var P=O.length||O.byteLength,U=o.log2(P)|0;v[U].push(O)}};function T(N){if(N){var O=N.length||N.byteLength,P=o.log2(O);v[P].push(N)}}function l(N){T(N.buffer)}t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=l,t.freeArrayBuffer=T,t.freeBuffer=function(O){c[o.log2(O.length)].push(O)},t.malloc=function(O,P){if(P===void 0||P==="arraybuffer")return _(O);switch(P){case"uint8":return w(O);case"uint16":return A(O);case"uint32":return M(O);case"int8":return g(O);case"int16":return b(O);case"int32":return p(O);case"float":case"float32":return u(O);case"double":case"float64":return y(O);case"uint8_clamped":return m(O);case"bigint64":return L(O);case"biguint64":return R(O);case"buffer":return F(O);case"data":case"dataview":return z(O);default:return null}return null};function _(O){var O=o.nextPow2(O),P=o.log2(O),U=v[P];return U.length>0?U.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=_;function w(N){return new Uint8Array(_(N),0,N)}t.mallocUint8=w;function A(N){return new Uint16Array(_(2*N),0,N)}t.mallocUint16=A;function M(N){return new Uint32Array(_(4*N),0,N)}t.mallocUint32=M;function g(N){return new Int8Array(_(N),0,N)}t.mallocInt8=g;function b(N){return new Int16Array(_(2*N),0,N)}t.mallocInt16=b;function p(N){return new Int32Array(_(4*N),0,N)}t.mallocInt32=p;function u(N){return new Float32Array(_(4*N),0,N)}t.mallocFloat32=t.mallocFloat=u;function y(N){return new Float64Array(_(8*N),0,N)}t.mallocFloat64=t.mallocDouble=y;function m(N){return i?new Uint8ClampedArray(_(N),0,N):w(N)}t.mallocUint8Clamped=m;function R(N){return s?new BigUint64Array(_(8*N),0,N):null}t.mallocBigUint64=R;function L(N){return h?new BigInt64Array(_(8*N),0,N):null}t.mallocBigInt64=L;function z(N){return new DataView(_(N),0,N)}t.mallocDataView=z;function F(N){N=o.nextPow2(N);var O=o.log2(N),P=c[O];return P.length>0?P.pop():new n(N)}t.mallocBuffer=F,t.clearCache=function(){for(var O=0;O<32;++O)f.UINT8[O].length=0,f.UINT16[O].length=0,f.UINT32[O].length=0,f.INT8[O].length=0,f.INT16[O].length=0,f.INT32[O].length=0,f.FLOAT[O].length=0,f.DOUBLE[O].length=0,f.BIGUINT64[O].length=0,f.BIGINT64[O].length=0,f.UINT8C[O].length=0,v[O].length=0,c[O].length=0}},1755:function(e){"use strict";"use restrict";e.exports=t;function t(o){this.roots=new Array(o),this.ranks=new Array(o);for(var a=0;a<o;++a)this.roots[a]=a,this.ranks[a]=0}var r=t.prototype;Object.defineProperty(r,"length",{get:function(){return this.roots.length}}),r.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},r.find=function(o){for(var a=o,n=this.roots;n[o]!==o;)o=n[o];for(;n[a]!==o;){var i=n[a];n[a]=o,a=i}return o},r.link=function(o,a){var n=this.find(o),i=this.find(a);if(n!==i){var s=this.ranks,h=this.roots,f=s[n],v=s[i];f<v?h[n]=i:v<f?h[i]=n:(h[i]=n,++s[n])}}},1682:function(e){"use strict";function t(a,n){for(var i=1,s=a.length,h=a[0],f=a[0],v=1;v<s;++v)if(f=h,h=a[v],n(h,f)){if(v===i){i++;continue}a[i++]=h}return a.length=i,a}function r(a){for(var n=1,i=a.length,s=a[0],h=a[0],f=1;f<i;++f,h=s)if(h=s,s=a[f],s!==h){if(f===n){n++;continue}a[n++]=s}return a.length=n,a}function o(a,n,i){return a.length===0?a:n?(i||a.sort(n),t(a,n)):(i||a.sort(),r(a))}e.exports=o},4359:function(e,t,r){"use strict";e.exports=i;var o=r(7718),a=null,n=null;typeof document<"u"&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,n=a.getContext("2d"));function i(s,h){return(typeof h!="object"||h===null)&&(h={}),o(s,h.canvas||a,h.context||n,h)}},7718:function(e,t,r){e.exports=L,e.exports.processPixels=R;var o=r(3711),a=r(9618),n=r(5878),i=r(332),s=r(2538),h=r(2095),f="b",v="b|",c="i",T="i|",l="sup",_="+",w="+1",A="sub",M="-",g="-1";function b(z,F,N,O){for(var P="<"+z+">",U="</"+z+">",B=P.length,X=U.length,$=F[0]===_||F[0]===M,le=0,ce=-X;le>-1&&(le=N.indexOf(P,le),!(le===-1||(ce=N.indexOf(U,le+B),ce===-1)||ce<=le));){for(var de=le;de<ce+X;++de)if(de<le+B||de>=ce)O[de]=null,N=N.substr(0,de)+" "+N.substr(de+1);else if(O[de]!==null){var G=O[de].indexOf(F[0]);G===-1?O[de]+=F:$&&(O[de]=O[de].substr(0,G+1)+(1+parseInt(O[de][G+1]))+O[de].substr(G+2))}var Y=le+B,ee=N.substr(Y,ce-Y),q=ee.indexOf(P);q!==-1?le=q:le=ce+X}return O}function p(z,F,N){for(var O=F.textAlign||"start",P=F.textBaseline||"alphabetic",U=[1<<30,1<<30],B=[0,0],X=z.length,$=0;$<X;++$)for(var le=z[$],ce=0;ce<2;++ce)U[ce]=Math.min(U[ce],le[ce])|0,B[ce]=Math.max(B[ce],le[ce])|0;var de=0;switch(O){case"center":de=-.5*(U[0]+B[0]);break;case"right":case"end":de=-B[0];break;case"left":case"start":de=-U[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+O+"'")}var G=0;switch(P){case"hanging":case"top":G=-U[1];break;case"middle":G=-.5*(U[1]+B[1]);break;case"alphabetic":case"ideographic":G=-3*N;break;case"bottom":G=-B[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var Y=1/N;return"lineHeight"in F?Y*=+F.lineHeight:"width"in F?Y=F.width/(B[0]-U[0]):"height"in F&&(Y=F.height/(B[1]-U[1])),z.map(function(ee){return[Y*(ee[0]+de),Y*(ee[1]+G)]})}function u(z,F,N,O,P,U){N=N.replace(/\n/g,""),U.breaklines===!0?N=N.replace(/\<br\>/g,`
`):N=N.replace(/\<br\>/g," ");var B="",X=[];for(j=0;j<N.length;++j)X[j]=B;U.bolds===!0&&(X=b(f,v,N,X)),U.italics===!0&&(X=b(c,T,N,X)),U.superscripts===!0&&(X=b(l,w,N,X)),U.subscripts===!0&&(X=b(A,g,N,X));var $=[],le="";for(j=0;j<N.length;++j)X[j]!==null&&(le+=N[j],$.push(X[j]));var ce=le.split(`
`),de=ce.length,G=Math.round(P*O),Y=O,ee=O*2,q=0,se=de*G+ee;z.height<se&&(z.height=se),F.fillStyle="#000",F.fillRect(0,0,z.width,z.height),F.fillStyle="#fff";var ae,j,Q,re,pe,we=0,Se="";function Ie(){if(Se!==""){var ne=F.measureText(Se).width;F.fillText(Se,Y+Q,ee+re),Q+=ne}}function Re(){return""+Math.round(pe)+"px "}function We(ne,Ce){var Ye=""+F.font;if(U.subscripts===!0){var rt=ne.indexOf(M),Ke=Ce.indexOf(M),Mt=rt>-1?parseInt(ne[1+rt]):0,kt=Ke>-1?parseInt(Ce[1+Ke]):0;Mt!==kt&&(Ye=Ye.replace(Re(),"?px "),pe*=Math.pow(.75,kt-Mt),Ye=Ye.replace("?px ",Re())),re+=.25*G*(kt-Mt)}if(U.superscripts===!0){var Nt=ne.indexOf(_),Gt=Ce.indexOf(_),Mr=Nt>-1?parseInt(ne[1+Nt]):0,mr=Gt>-1?parseInt(Ce[1+Gt]):0;Mr!==mr&&(Ye=Ye.replace(Re(),"?px "),pe*=Math.pow(.75,mr-Mr),Ye=Ye.replace("?px ",Re())),re-=.25*G*(mr-Mr)}if(U.bolds===!0){var qr=ne.indexOf(v)>-1,Er=Ce.indexOf(v)>-1;!qr&&Er&&(Ir?Ye=Ye.replace("italic ","italic bold "):Ye="bold "+Ye),qr&&!Er&&(Ye=Ye.replace("bold ",""))}if(U.italics===!0){var Ir=ne.indexOf(T)>-1,_t=Ce.indexOf(T)>-1;!Ir&&_t&&(Ye="italic "+Ye),Ir&&!_t&&(Ye=Ye.replace("italic ",""))}F.font=Ye}for(ae=0;ae<de;++ae){var at=ce[ae]+`
`;for(Q=0,re=ae*G,pe=O,Se="",j=0;j<at.length;++j){var nt=j+we<$.length?$[j+we]:$[$.length-1];B===nt?Se+=at[j]:(Ie(),Se=at[j],nt!==void 0&&(We(B,nt),B=nt))}Ie(),we+=at.length;var tt=Math.round(Q+2*Y)|0;q<tt&&(q=tt)}var qe=q,he=ee+G*de,ue=a(F.getImageData(0,0,qe,he).data,[he,qe,4]);return ue.pick(-1,-1,0).transpose(1,0)}function y(z,F){var N=o(z,128);return F?n(N.cells,N.positions,.25):{edges:N.cells,positions:N.positions}}function m(z,F,N,O){var P=y(z,O),U=p(P.positions,F,N),B=P.edges,X=F.orientation==="ccw";if(i(U,B),F.polygons||F.polygon||F.polyline){for(var $=h(B,U),le=new Array($.length),ce=0;ce<$.length;++ce){for(var de=$[ce],G=new Array(de.length),Y=0;Y<de.length;++Y){for(var ee=de[Y],q=new Array(ee.length),se=0;se<ee.length;++se)q[se]=U[ee[se]].slice();X&&q.reverse(),G[Y]=q}le[ce]=G}return le}else return F.triangles||F.triangulate||F.triangle?{cells:s(U,B,{delaunay:!1,exterior:!1,interior:!0}),positions:U}:{edges:B,positions:U}}function R(z,F,N){try{return m(z,F,N,!0)}catch{}try{return m(z,F,N,!1)}catch{}return F.polygons||F.polyline||F.polygon?[]:F.triangles||F.triangulate||F.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function L(z,F,N,O){var P=64,U=1.25,B={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};O&&(O.size&&O.size>0&&(P=O.size),O.lineSpacing&&O.lineSpacing>0&&(U=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(B.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(B.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(B.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(B.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(B.superscripts=!!O.styletags.superscripts)),N.font=[O.fontStyle,O.fontVariant,O.fontWeight,P+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var X=u(F,N,z,P,U,B);return R(X,O,P)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(m){m.permitHostObjects___&&m.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var o=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,i=Object.freeze({});if(n.set(i,1),n.get(i)!==1)o=!0;else{e.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,f=Object.defineProperty,v=Object.isExtensible,c="weakmap:",T=c+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var l=new ArrayBuffer(25),_=new Uint8Array(l);crypto.getRandomValues(_),T=c+"rand:"+Array.prototype.map.call(_,function(m){return(m%36).toString(36)}).join("")+"___"}function w(m){return!(m.substr(0,c.length)==c&&m.substr(m.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(R){return h(R).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(R){return A(R).filter(w)}})}function M(m){if(m!==Object(m))throw new TypeError("Not an object: "+m);var R=m[T];if(R&&R.key===m)return R;if(v(m)){R={key:m};try{return f(m,T,{value:R,writable:!1,enumerable:!1,configurable:!1}),R}catch{return}}}(function(){var m=Object.freeze;f(Object,"freeze",{value:function(F){return M(F),m(F)}});var R=Object.seal;f(Object,"seal",{value:function(F){return M(F),R(F)}});var L=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return M(F),L(F)}})})();function g(m){return m.prototype=null,Object.freeze(m)}var b=!1;function p(){!b&&typeof console<"u"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,y=function(){this instanceof y||p();var m=[],R=[],L=u++;function z(P,U){var B,X=M(P);return X?L in X?X[L]:U:(B=m.indexOf(P),B>=0?R[B]:U)}function F(P){var U=M(P);return U?L in U:m.indexOf(P)>=0}function N(P,U){var B,X=M(P);return X?X[L]=U:(B=m.indexOf(P),B>=0?R[B]=U:(B=m.length,R[B]=U,m[B]=P)),this}function O(P){var U=M(P),B,X;return U?L in U&&delete U[L]:(B=m.indexOf(P),B<0?!1:(X=m.length-1,m[B]=void 0,R[B]=R[X],m[B]=m[X],m.length=X,R.length=X,!0))}return Object.create(y.prototype,{get___:{value:g(z)},has___:{value:g(F)},set___:{value:g(N)},delete___:{value:g(O)}})};y.prototype=Object.create(Object.prototype,{get:{value:function(R,L){return this.get___(R,L)},writable:!0,configurable:!0},has:{value:function(R){return this.has___(R)},writable:!0,configurable:!0},set:{value:function(R,L){return this.set___(R,L)},writable:!0,configurable:!0},delete:{value:function(R){return this.delete___(R)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function m(){this instanceof y||p();var R=new a,L=void 0,z=!1;function F(U,B){return L?R.has(U)?R.get(U):L.get___(U,B):R.get(U,B)}function N(U){return R.has(U)||(L?L.has___(U):!1)}var O;o?O=function(U,B){return R.set(U,B),R.has(U)||(L||(L=new y),L.set(U,B)),this}:O=function(U,B){if(z)try{R.set(U,B)}catch{L||(L=new y),L.set___(U,B)}else R.set(U,B);return this};function P(U){var B=!!R.delete(U);return L&&L.delete___(U)||B}return Object.create(y.prototype,{get___:{value:g(F)},has___:{value:g(N)},set___:{value:g(O)},delete___:{value:g(P)},permitHostObjects___:{value:g(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}m.prototype=y.prototype,e.exports=m,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=y)})()},236:function(e,t,r){var o=r(8284);e.exports=a;function a(){var n={};return function(i){if((typeof i!="object"||i===null)&&typeof i!="function")throw new Error("Weakmap-shim: Key must be object");var s=i.valueOf(n);return s&&s.identity===n?s:o(i,n)}}},8284:function(e){e.exports=t;function t(r,o){var a={identity:o},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(i){return i!==o?n.apply(this,arguments):a},writable:!0}),a}},606:function(e,t,r){var o=r(236);e.exports=a;function a(){var n=o();return{get:function(i,s){var h=n(i);return h.hasOwnProperty("value")?h.value:s},set:function(i,s){return n(i).value=s,this},has:function(i){return"value"in n(i)},delete:function(i){return delete n(i).value}}}},3349:function(e){"use strict";function t(){return function(s,h,f,v,c,T){var l=s[0],_=f[0],w=[0],A=_;v|=0;var M=0,g=_;for(M=0;M<l;++M){{var b=h[v]-T,p=h[v+A]-T;b>=0!=p>=0&&c.push(w[0]+.5+.5*(b+p)/(b-p))}v+=g,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(v,c,T){var l=v.dtype,_=v.order,w=[l,_.join()].join(),A=h[w];return A||(h[w]=A=s([l,_])),A(v.shape.slice(0),v.data,v.stride,v.offset|0,c,T)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=a;var o=r(3349);function a(n,i){var s=[];return i=+i||0,o(n.hi(n.shape[0]-1),s,i),s}},7790:function(){}},x={};function S(e){var t=x[e];if(t!==void 0)return t.exports;var r=x[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}();var E=S(1964);V.exports=E})()}}),xE=He({"node_modules/color-name/index.js"(Z,V){"use strict";V.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]}}}),GN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,V){"use strict";var d=xE();V.exports=S;var x={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(E){var e,t=[],r=1,o;if(typeof E=="string")if(E=E.toLowerCase(),d[E])t=d[E].slice(),o="rgb";else if(E==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(E)){var a=E.slice(1),n=a.length,i=n<=4;r=1,i?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],n===4&&(r=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],n===8&&(r=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),o="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(E)){var s=e[1],h=s==="rgb",a=s.replace(/a$/,"");o=a;var n=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,T){if(/%$/.test(c))return T===n?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(x[c]!==void 0)return x[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||t[n]===void 0?1:t[n],t=t.slice(0,n)}else E.length>10&&/[0-9](?:\s|\/)/.test(E)&&(t=E.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),o=E.match(/([a-z])/ig).join("").toLowerCase());else isNaN(E)?Array.isArray(E)||E.length?(t=[E[0],E[1],E[2]],o="rgb",r=E.length===4?E[3]:1):E instanceof Object&&(E.r!=null||E.red!=null||E.R!=null?(o="rgb",t=[E.r||E.red||E.R||0,E.g||E.green||E.G||0,E.b||E.blue||E.B||0]):(o="hsl",t=[E.h||E.hue||E.H||0,E.s||E.saturation||E.S||0,E.l||E.lightness||E.L||E.b||E.brightness]),r=E.a||E.alpha||E.opacity||1,E.opacity!=null&&(r/=100)):(o="rgb",t=[E>>>16,(E&65280)>>>8,E&255]);return{space:o,values:t,alpha:r}}}}),HN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,V){"use strict";var d=GN();V.exports=function(E){Array.isArray(E)&&E.raw&&(E=String.raw.apply(null,arguments));var e,t,r,o=d(E);if(!o.space)return[];var a=[0,0,0],n=o.space[0]==="h"?[360,100,100]:[255,255,255];return e=Array(3),e[0]=Math.min(Math.max(o.values[0],a[0]),n[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),n[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),n[2]),o.space[0]==="h"&&(e=x(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function x(S){var E=S[0]/360,e=S[1]/100,t=S[2]/100,r,o,a,n,i,s=0;if(e===0)return i=t*255,[i,i,i];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,n=[0,0,0];s<3;)a=E+1/3*-(s-1),a<0?a++:a>1&&a--,i=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,n[s++]=i*255;return n}}}),mx=He({"node_modules/clamp/index.js"(Z,V){V.exports=d;function d(x,S,E){return S<E?x<S?S:x>E?E:x:x<E?E:x>S?S:x}}}),Q3=He({"node_modules/dtype/index.js"(Z,V){V.exports=function(d){switch(d){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}}}}),d0=He({"node_modules/color-normalize/index.js"(Z,V){"use strict";var d=HN(),x=mx(),S=Q3();V.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=S(r),a=new o(4),n=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=d(t),t[0]/=255,t[1]/=255,t[2]/=255),E(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=x(Math.floor(t[0]*255),0,255),a[1]=x(Math.floor(t[1]*255),0,255),a[2]=x(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:x(Math.floor(t[3]*255),0,255)),a)};function E(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))}}}),em=He({"src/lib/str2rgbarray.js"(Z,V){"use strict";var d=d0();function x(S){return S?d(S):[0,0,0,1]}V.exports=x}}),tm=He({"src/lib/gl_format_color.js"(Z,V){"use strict";var d=as(),x=Ch(),S=d0(),E=rc(),e=sh().defaultLine,t=bp().isArrayOrTypedArray,r=S(e),o=1;function a(f,v){var c=f;return c[3]*=v,c}function n(f){if(d(f))return r;var v=S(f);return v.length?v:r}function i(f){return d(f)?f:o}function s(f,v,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),_=t(v),w=E.extractOpts(f),A=[],M,g,b,p,u;if(w.colorscale!==void 0?M=E.makeColorScaleFuncFromTrace(f):M=n,l?g=function(m,R){return m[R]===void 0?r:S(M(m[R]))}:g=n,_?b=function(m,R){return m[R]===void 0?o:i(m[R])}:b=i,l||_)for(var y=0;y<c;y++)p=g(T,y),u=b(v,y),A[y]=a(p,u);else A=a(S(T),v);return A}function h(f){var v=E.extractOpts(f),c=v.colorscale;return v.reversescale&&(c=E.flipScale(v.colorscale)),c.map(function(T){var l=T[0],_=x(T[1]),w=_.toRgb();return{index:l,rgb:[w.r,w.g,w.b,w.a]}})}V.exports={formatColor:s,parseColorScale:h}}}),bE=He({"src/constants/gl3d_dashes.js"(Z,V){"use strict";V.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]}}}),eT=He({"src/constants/gl3d_markers.js"(Z,V){"use strict";V.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}}}),WN=He({"src/traces/scatter3d/calc_errors.js"(Z,V){"use strict";var d=lo();function x(e,t,r,o){if(!t||!t.visible)return null;for(var a=d.getComponentMethod("errorbars","makeComputeError")(t),n=new Array(e.length),i=0;i<e.length;i++){var s=a(+e[i],i);if(o.type==="log"){var h=o.c2l(e[i]),f=e[i]-s[0],v=e[i]+s[1];if(n[i]=[(o.c2l(f,!0)-h)*r,(o.c2l(v,!0)-h)*r],f>0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else n[i]=[-s[0]*r,s[1]*r]}return n}function S(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function E(e,t,r){var o=[x(e.x,e.error_x,t[0],r.xaxis),x(e.y,e.error_y,t[1],r.yaxis),x(e.z,e.error_z,t[2],r.zaxis)],a=S(o);if(a===0)return null;for(var n=new Array(a),i=0;i<a;i++){for(var s=[[0,0,0],[0,0,0]],h=0;h<3;h++)if(o[h])for(var f=0;f<2;f++)s[f][h]=o[h][i][f];n[i]=s}return n}V.exports=E}}),XN=He({"src/traces/scatter3d/convert.js"(Z,V){"use strict";var d=Yh().gl_line3d,x=Yh().gl_scatter3d,S=Yh().gl_error3d,E=Yh().gl_mesh3d,e=Yh().delaunay_triangulate,t=sa(),r=em(),o=tm().formatColor,a=r1(),n=bE(),i=eT(),s=Ho(),h=$p().appendArrayPointValue,f=WN();function v(R,L){this.scene=R,this.uid=L,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 c=v.prototype;c.handlePick=function(R){if(R.object&&(R.object===this.linePlot||R.object===this.delaunayMesh||R.object===this.textMarkers||R.object===this.scatterPlot)){var L=R.index=R.data.index;return R.object.highlight&&R.object.highlight(null),this.scatterPlot&&(R.object=this.scatterPlot,this.scatterPlot.highlight(R.data)),R.textLabel="",this.textLabels&&(t.isArrayOrTypedArray(this.textLabels)?(this.textLabels[L]||this.textLabels[L]===0)&&(R.textLabel=this.textLabels[L]):R.textLabel=this.textLabels),R.traceCoordinate=[this.data.x[L],this.data.y[L],this.data.z[L]],!0}};function T(R,L,z){var F=(z+1)%3,N=(z+2)%3,O=[],P=[],U;for(U=0;U<R.length;++U){var B=R[U];isNaN(B[F])||!isFinite(B[F])||isNaN(B[N])||!isFinite(B[N])||(O.push([B[F],B[N]]),P.push(U))}var X=e(O);for(U=0;U<X.length;++U)for(var $=X[U],le=0;le<$.length;++le)$[le]=P[$[le]];return{positions:R,cells:X,meshColor:L}}function l(R){for(var L=[0,0,0],z=[[0,0,0],[0,0,0],[0,0,0]],F=[1,1,1],N=0;N<3;N++){var O=R[N];O&&O.copy_zstyle!==!1&&R[2].visible!==!1&&(O=R[2]),!(!O||!O.visible)&&(L[N]=O.width/2,z[N]=r(O.color),F[N]=O.thickness)}return{capSize:L,color:z,lineWidth:F}}function _(R){return R==null?0:R.indexOf("left")>-1?-1:R.indexOf("right")>-1?1:0}function w(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function A(R){var L=0,z=0,F=[L,z];if(Array.isArray(R))for(var N=0;N<R.length;N++)F[N]=[L,z],R[N]&&(F[N][0]=_(R[N]),F[N][1]=w(R[N]));else F[0]=_(R),F[1]=w(R);return F}function M(R,L){return L(R*4)}function g(R){return i[R]}function b(R,L,z,F,N){var O=null;if(t.isArrayOrTypedArray(R)){O=[];for(var P=0;P<L;P++)R[P]===void 0?O[P]=F:O[P]=z(R[P],N)}else O=z(R,t.identity);return O}function p(R,L){var z=[],F=R.fullSceneLayout,N=R.dataScale,O=F.xaxis,P=F.yaxis,U=F.zaxis,B=L.marker,X=L.line,$=L.x||[],le=L.y||[],ce=L.z||[],de=$.length,G=L.xcalendar,Y=L.ycalendar,ee=L.zcalendar,q,se,ae,j,Q,re;for(Q=0;Q<de;Q++)q=O.d2l($[Q],0,G)*N[0],se=P.d2l(le[Q],0,Y)*N[1],ae=U.d2l(ce[Q],0,ee)*N[2],z[Q]=[q,se,ae];if(Array.isArray(L.text))re=L.text;else if(t.isTypedArray(L.text))re=Array.from(L.text);else if(L.text!==void 0)for(re=new Array(de),Q=0;Q<de;Q++)re[Q]=L.text;function pe(Ye,rt){var Ke=F[Ye];return s.tickText(Ke,Ke.d2l(rt),!0).text}var we=L.texttemplate;if(we){var Se=R.fullLayout,Ie=Se._d3locale,Re=Array.isArray(we),We=Re?Math.min(we.length,de):de,at=Re?function(Ye){return we[Ye]}:function(){return we};for(re=new Array(We),Q=0;Q<We;Q++){var nt={x:$[Q],y:le[Q],z:ce[Q]},tt={xLabel:pe("xaxis",$[Q]),yLabel:pe("yaxis",le[Q]),zLabel:pe("zaxis",ce[Q])},qe={};h(qe,L,Q),re[Q]=t.texttemplateString({data:[qe,nt,L._meta],fallback:L.texttemplatefallback,labels:tt,locale:Ie,template:at(Q)})}}if(j={position:z,mode:L.mode,text:re},"line"in L&&(j.lineColor=o(X,1,de),j.lineWidth=X.width,j.lineDashes=X.dash),"marker"in L){var he=a(L);j.scatterColor=o(B,1,de),j.scatterSize=b(B.size,de,M,20,he),j.scatterMarker=b(B.symbol,de,g,"\u25CF"),j.scatterLineWidth=B.line.width,j.scatterLineColor=o(B.line,1,de),j.scatterAngle=0}"textposition"in L&&(j.textOffset=A(L.textposition),j.textColor=o(L.textfont,1,de),j.textSize=b(L.textfont.size,de,t.identity,12),j.textFontFamily=L.textfont.family,j.textFontWeight=L.textfont.weight,j.textFontStyle=L.textfont.style,j.textFontVariant=L.textfont.variant,j.textAngle=0);var ue=["x","y","z"];for(j.project=[!1,!1,!1],j.projectScale=[1,1,1],j.projectOpacity=[1,1,1],Q=0;Q<3;++Q){var ne=L.projection[ue[Q]];(j.project[Q]=ne.show)&&(j.projectOpacity[Q]=ne.opacity,j.projectScale[Q]=ne.scale)}j.errorBounds=f(L,N,F);var Ce=l([L.error_x,L.error_y,L.error_z]);return j.errorColor=Ce.color,j.errorLineWidth=Ce.lineWidth,j.errorCapSize=Ce.capSize,j.delaunayAxis=L.surfaceaxis,j.delaunayColor=r(L.surfacecolor),j}function u(R){if(t.isArrayOrTypedArray(R)){var L=R[0];return t.isArrayOrTypedArray(L)&&(R=L),"rgb("+R.slice(0,3).map(function(z){return Math.round(z*255)})+")"}return null}function y(R){return t.isArrayOrTypedArray(R)?R.length===4&&typeof R[0]=="number"?u(R):R.map(u):null}c.update=function(R){var L=this.scene.glplot.gl,z,F,N,O,P=n.solid;this.data=R;var U=p(this.scene,R);"mode"in U&&(this.mode=U.mode),"lineDashes"in U&&U.lineDashes in n&&(P=n[U.lineDashes]),this.color=y(U.scatterColor)||y(U.lineColor),this.dataPoints=U.position,z={gl:this.scene.glplot.gl,position:U.position,color:U.lineColor,lineWidth:U.lineWidth||1,dashes:P[0],dashScale:P[1],opacity:R.opacity,connectGaps:R.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(z):(this.linePlot=d(z),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var B=R.opacity;if(R.marker&&R.marker.opacity!==void 0&&(B*=R.marker.opacity),F={gl:this.scene.glplot.gl,position:U.position,color:U.scatterColor,size:U.scatterSize,glyph:U.scatterMarker,opacity:B,orthographic:!0,lineWidth:U.scatterLineWidth,lineColor:U.scatterLineColor,project:U.project,projectScale:U.projectScale,projectOpacity:U.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(F):(this.scatterPlot=x(F),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),O={gl:this.scene.glplot.gl,position:U.position,glyph:U.text,color:U.textColor,size:U.textSize,angle:U.textAngle,alignment:U.textOffset,font:U.textFontFamily,fontWeight:U.textFontWeight,fontStyle:U.textFontStyle,fontVariant:U.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:R.opacity},this.textLabels=R.hovertext||R.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(O):(this.textMarkers=x(O),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),N={gl:this.scene.glplot.gl,position:U.position,color:U.errorColor,error:U.errorBounds,lineWidth:U.errorLineWidth,capSize:U.errorCapSize,opacity:R.opacity},this.errorBars?U.errorBounds?this.errorBars.update(N):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):U.errorBounds&&(this.errorBars=S(N),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),U.delaunayAxis>=0){var X=T(U.position,U.delaunayColor,U.delaunayAxis);X.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(X):(X.gl=L,this.delaunayMesh=E(X),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)},c.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 m(R,L){var z=new v(R,L.uid);return z.update(L),z}V.exports=m}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,V){"use strict";var d=af(),x=tc(),S=ku(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=ru(),a=bE(),n=eT(),i=Qo().extendFlat,s=pc().overrideAll,h=Jm(),f=d.line,v=d.marker,c=v.line,T=i({width:f.width,dash:{valType:"enumerated",values:h(a),dflt:"solid"}},S("line"));function l(w){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 _=V.exports=s({x:d.x,y:d.y,z:{valType:"data_array"},text:i({},d.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},d.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z"),mode:i({},d.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:l("x"),y:l("y"),z:l("z")},connectgaps:d.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:h(n),dflt:"circle",arrayOk:!0},size:i({},v.size,{dflt:8}),sizeref:v.sizeref,sizemin:v.sizemin,sizemode:v.sizemode,opacity:i({},v.opacity,{arrayOk:!1}),colorbar:v.colorbar,line:i({width:i({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:i({},d.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:i({},o.hoverinfo)},"calc","nested");_.x.editType=_.y.editType=_.z.editType="calc+clearAxisTypes"}}),ZN=He({"src/traces/scatter3d/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=Fu(),E=md(),e=Dd(),t=zd(),r=wE();V.exports=function(n,i,s,h){function f(M,g){return x.coerce(n,i,r,M,g)}var v=o(n,i,f,h);if(!v){i.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(i)&&E(n,i,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(i)&&(f("connectgaps"),e(n,i,s,h,f)),S.hasText(i)&&(f("texttemplate"),f("texttemplatefallback"),t(n,i,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(i.line||{}).color,T=(i.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],_=0;_<3;++_){var w="projection."+l[_];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=d.getComponentMethod("errorbars","supplyDefaults");A(n,i,c||T||s,{axis:"z"}),A(n,i,c||T||s,{axis:"y",inherit:"z"}),A(n,i,c||T||s,{axis:"x",inherit:"z"})};function o(a,n,i,s){var h=0,f=i("x"),v=i("y"),c=i("z"),T=d.getComponentMethod("calendars","handleTraceDefaults");return T(a,n,["x","y","z"],s),f&&v&&c&&(h=Math.min(f.length,v.length,c.length),n._length=n._xlength=n._ylength=n._zlength=h),h}}}),YN=He({"src/traces/scatter3d/calc.js"(Z,V){"use strict";var d=Av(),x=Fd();V.exports=function(E,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return d(t,e),x(E,e),t}}}),KN=He({"node_modules/get-canvas-context/index.js"(Z,V){V.exports=d;function d(x,S){if(typeof x!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var E=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(E.width=S.width),typeof S.height=="number"&&(E.height=S.height);var e=S,t;try{var r=[x];x.indexOf("webgl")===0&&r.push("experimental-"+x);for(var o=0;o<r.length;o++)if(t=E.getContext(r[o],e),t)return t}catch{t=null}return t||null}}}),JN=He({"node_modules/webgl-context/index.js"(Z,V){var d=KN();V.exports=function(S){return d("webgl",S)}}}),TE=He({"src/lib/show_no_webgl_msg.js"(Z,V){"use strict";var d=Jn(),x=function(){};V.exports=function(E){for(var e in E)typeof E[e]=="function"&&(E[e]=x);E.destroy=function(){E.container.parentNode.removeChild(E.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=d.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=d.lightLine,t.style["z-index"]=30;var r=document.createElement("p");return r.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",r.style.position="relative",r.style.top="50%",r.style.left="50%",r.style.height="30%",r.style.width="50%",r.style.margin="-15% 0 0 -25%",t.appendChild(r),E.container.appendChild(t),E.container.style.background="#FFFFFF",E.container.onclick=function(){window.open("https://get.webgl.org")},!1}}}),$N=He({"src/plots/gl3d/layout/convert.js"(Z,V){"use strict";var d=em(),x=sa(),S=["xaxis","yaxis","zaxis"];function E(){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 e=E.prototype;e.merge=function(r,o){for(var a=this,n=0;n<3;++n){var i=o[S[n]];if(!i.visible){a.tickEnable[n]=!1,a.labelEnable[n]=!1,a.lineEnable[n]=!1,a.lineTickEnable[n]=!1,a.gridEnable[n]=!1,a.zeroEnable[n]=!1,a.backgroundEnable[n]=!1;continue}a.labels[n]=r._meta?x.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(a.labelColor[n]=d(i.title.font.color)),i.title.font.family&&(a.labelFont[n]=i.title.font.family),i.title.font.size&&(a.labelSize[n]=i.title.font.size),i.title.font.weight&&(a.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(a.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(a.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(a.lineEnable[n]=i.showline),"linecolor"in i&&(a.lineColor[n]=d(i.linecolor)),"linewidth"in i&&(a.lineWidth[n]=i.linewidth),"showgrid"in i&&(a.gridEnable[n]=i.showgrid),"gridcolor"in i&&(a.gridColor[n]=d(i.gridcolor)),"gridwidth"in i&&(a.gridWidth[n]=i.gridwidth),i.type==="log"?a.zeroEnable[n]=!1:"zeroline"in i&&(a.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(a.zeroLineColor[n]=d(i.zerolinecolor)),"zerolinewidth"in i&&(a.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?a.lineTickEnable[n]=!0:a.lineTickEnable[n]=!1,"ticklen"in i&&(a.lineTickLength[n]=a._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(a.lineTickColor[n]=d(i.tickcolor)),"tickwidth"in i&&(a.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(a.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(a.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(a.tickColor[n]=d(i.tickfont.color)),i.tickfont.family&&(a.tickFont[n]=i.tickfont.family),i.tickfont.size&&(a.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(a.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(a.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(a.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(a.lineTickMirror[n]=!0,a.lineMirror[n]=!0):i.mirror===!0?(a.lineTickMirror[n]=!1,a.lineMirror[n]=!0):(a.lineTickMirror[n]=!1,a.lineMirror[n]=!1):a.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(a.backgroundEnable[n]=!0,a.backgroundColor[n]=d(i.backgroundcolor)):a.backgroundEnable[n]=!1}};function t(r,o){var a=new E;return a.merge(r,o),a}V.exports=t}}),QN=He({"src/plots/gl3d/layout/spikes.js"(Z,V){"use strict";var d=em(),x=["xaxis","yaxis","zaxis"];function S(){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 E=S.prototype;E.merge=function(t){for(var r=0;r<3;++r){var o=t[x[r]];if(!o.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=o.showspikes,this.colors[r]=d(o.spikecolor),this.drawSides[r]=o.spikesides,this.lineWidth[r]=o.spikethickness}};function e(t){var r=new S;return r.merge(t),r}V.exports=e}}),eU=He({"src/plots/gl3d/layout/tick_marks.js"(Z,V){"use strict";V.exports=t;var d=Ho(),x=sa(),S=["xaxis","yaxis","zaxis"],E=[0,0,0];function e(r){for(var o=new Array(3),a=0;a<3;++a){for(var n=r[a],i=new Array(n.length),s=0;s<n.length;++s)i[s]=n[s].x;o[a]=i}return o}function t(r){for(var o=r.axesOptions,a=r.glplot.axesPixels,n=r.fullSceneLayout,i=[[],[],[]],s=0;s<3;++s){var h=n[S[s]];if(h._length=(a[s].hi-a[s].lo)*a[s].pixelsPerDataUnit/r.dataScale[s],Math.abs(h._length)===1/0||isNaN(h._length))i[s]=[];else{h._input_range=h.range.slice(),h.range[0]=a[s].lo/r.dataScale[s],h.range[1]=a[s].hi/r.dataScale[s],h._m=1/(r.dataScale[s]*a[s].pixelsPerDataUnit),h.range[0]===h.range[1]&&(h.range[0]-=1,h.range[1]+=1);var f=h.tickmode;if(h.tickmode==="auto"){h.tickmode="linear";var v=h.nticks||x.constrain(h._length/40,4,9);d.autoTicks(h,Math.abs(h.range[1]-h.range[0])/v)}for(var c=d.calcTicks(h,{msUTC:!0}),T=0;T<c.length;++T)c[T].x=c[T].x*r.dataScale[s],h.type==="date"&&(c[T].text=c[T].text.replace(/\<br\>/g," "));i[s]=c,h.tickmode=f}}o.ticks=i;for(var s=0;s<3;++s){E[s]=.5*(r.glplot.bounds[0][s]+r.glplot.bounds[1][s]);for(var T=0;T<2;++T)o.bounds[T][s]=r.glplot.bounds[T][s]}r.contourLevels=e(i)}}}),tU=He({"src/plots/gl3d/scene.js"(Z,V){"use strict";var d=Yh().gl_plot3d,x=d.createCamera,S=d.createScene,E=JN(),e=b2(),t=lo(),r=sa(),o=r.preserveDrawingBuffer(),a=Ho(),n=rf(),i=em(),s=TE(),h=U5(),f=$N(),v=QN(),c=eU(),T=Yd().applyAutorangeOptions,l,_,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",N.appendChild(P),this.svgContainer=P,N.id=z.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",O.appendChild(N),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(F,F[this.id]),this.spikeOptions=v(F[this.id]),this.container=N,this.staticMode=!!z.staticPlot,this.pixelRatio=this.pixelRatio||z.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=t.getComponentMethod("annotations3d","convert"),this.drawAnnotations=t.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=A.prototype;M.prepareOptions=function(){var z=this,F={canvas:z.canvas,gl:z.gl,glOptions:{preserveDrawingBuffer:o,premultipliedAlpha:!0,antialias:!0},container:z.container,axes:z.axesOptions,spikes:z.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:z.camera,pixelRatio:z.pixelRatio};if(z.staticMode){if(!_&&(l=document.createElement("canvas"),_=E({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");F.gl=_,F.canvas=l}return F};var g=!0;M.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!g||o)N=!1;else{r.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{o=F.glOptions.preserveDrawingBuffer=!0,z.glplot=S(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,N=!1}}}return g=!1,N},M.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=x(z.container,{center:[F.center.x,F.center.y,F.center.z],eye:[F.eye.x,F.eye.y,F.eye.z],up:[F.up.x,F.up.y,F.up.z],_ortho:N,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var z=this;z.initializeGLCamera();var F=z.tryCreatePlot();if(!F)return s(z);z.traces={},z.make4thDimension();var N=z.graphDiv,O=N.layout,P=function(){var B={};return z.isCameraChanged(O)&&(B[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(B[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=B[z.id+".aspectmode"]="manual")),B},U=function(B){if(B.fullSceneLayout.dragmode!==!1){var X=P();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",X)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){U(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(B){if(N._context._scrollZoom.gl3d){if(z.camera._ortho){var X=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:X*$.x,y:X*$.y,z:X*$.z})}U(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var B=P();z.graphDiv.emit("plotly_relayouting",B)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(B){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:B,layer:z.id})},!1)),z.glplot.oncontextloss=function(){z.recoverContext()},z.glplot.onrender=function(){z.render()},!0},M.render=function(){var z=this,F=z.graphDiv,N,O=z.svgContainer,P=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,X=P.width*U,$=P.height*B;O.setAttributeNS(null,"viewBox","0 0 "+X+" "+$),O.setAttributeNS(null,"width",X),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var le=Object.keys(z.traces),ce=null,de=z.glplot.selection,G=0;G<le.length;++G)N=z.traces[le[G]],N.data.hoverinfo!=="skip"&&N.handlePick(de)&&(ce=N),N.setContourLevels&&N.setContourLevels();function Y(We,at,nt){var tt=z.fullSceneLayout[We+"axis"];return tt.type!=="log"&&(at=tt.d2l(at)),a.hoverLabelText(tt,at,nt)}if(ce!==null){var ee=h(z.glplot.cameraParams,de.dataCoordinate);N=ce.data;var q=F._fullData[N.index],se=de.index,ae={xLabel:Y("x",de.traceCoordinate[0],N.xhoverformat),yLabel:Y("y",de.traceCoordinate[1],N.yhoverformat),zLabel:Y("z",de.traceCoordinate[2],N.zhoverformat)},j=n.castHoverinfo(q,z.fullLayout,se),Q=(j||"").split("+"),re=j&&j==="all";!q.hovertemplate&&!re&&(Q.indexOf("x")===-1&&(ae.xLabel=void 0),Q.indexOf("y")===-1&&(ae.yLabel=void 0),Q.indexOf("z")===-1&&(ae.zLabel=void 0),Q.indexOf("text")===-1&&(de.textLabel=void 0),Q.indexOf("name")===-1&&(ce.name=void 0));var pe,we=[];N.type==="cone"||N.type==="streamtube"?(ae.uLabel=Y("x",de.traceCoordinate[3],N.uhoverformat),(re||Q.indexOf("u")!==-1)&&we.push("u: "+ae.uLabel),ae.vLabel=Y("y",de.traceCoordinate[4],N.vhoverformat),(re||Q.indexOf("v")!==-1)&&we.push("v: "+ae.vLabel),ae.wLabel=Y("z",de.traceCoordinate[5],N.whoverformat),(re||Q.indexOf("w")!==-1)&&we.push("w: "+ae.wLabel),ae.normLabel=de.traceCoordinate[6].toPrecision(3),(re||Q.indexOf("norm")!==-1)&&we.push("norm: "+ae.normLabel),N.type==="streamtube"&&(ae.divergenceLabel=de.traceCoordinate[7].toPrecision(3),(re||Q.indexOf("divergence")!==-1)&&we.push("divergence: "+ae.divergenceLabel)),de.textLabel&&we.push(de.textLabel),pe=we.join("<br>")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(de.traceCoordinate[3]),N.valuehoverformat),we.push("value: "+ae.valueLabel),de.textLabel&&we.push(de.textLabel),pe=we.join("<br>")):pe=de.textLabel;var Se={x:de.traceCoordinate[0],y:de.traceCoordinate[1],z:de.traceCoordinate[2],data:q._input,fullData:q,curveNumber:q.index,pointNumber:se};n.appendArrayPointValue(Se,q,se),N._module.eventData&&(Se=q._module.eventData(Se,de,q,{},se));var Ie={points:[Se]};if(z.fullSceneLayout.hovermode){var Re=[];n.loneHover({trace:q,x:(.5+.5*ee[0]/ee[3])*X,y:(.5-.5*ee[1]/ee[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:n.castHoverOption(q,se,"bgcolor")||ce.color,borderColor:n.castHoverOption(q,se,"bordercolor"),fontFamily:n.castHoverOption(q,se,"font.family"),fontSize:n.castHoverOption(q,se,"font.size"),fontColor:n.castHoverOption(q,se,"font.color"),nameLength:n.castHoverOption(q,se,"namelength"),textAlign:n.castHoverOption(q,se,"align"),hovertemplate:r.castOption(q,se,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Re}),Se.bbox=Re[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Ie):F.emit("plotly_hover",Ie),this.oldEventData=Ie}else n.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},M.recoverContext=function(){var z=this;z.glplot.dispose();var F=function(){if(z.glplot.gl.isContextLost()){requestAnimationFrame(F);return}if(!z.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}z.plot.apply(z,z.plotArgs)};requestAnimationFrame(F)};var b=["xaxis","yaxis","zaxis"];function p(z,F,N){for(var O=z.fullSceneLayout,P=0;P<3;P++){var U=b[P],B=U.charAt(0),X=O[U],$=F[B],le=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][P]=Math.min(N[0][P],0),N[1][P]=Math.max(N[1][P],ce-1);else for(var de,G=0;G<(ce||$.length);G++)if(r.isArrayOrTypedArray($[G]))for(var Y=0;Y<$[G].length;++Y)de=X.d2l($[G][Y],0,le),!isNaN(de)&&isFinite(de)&&(N[0][P]=Math.min(N[0][P],de),N[1][P]=Math.max(N[1][P],de));else de=X.d2l($[G],0,le),!isNaN(de)&&isFinite(de)&&(N[0][P]=Math.min(N[0][P],de),N[1][P]=Math.max(N[1][P],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],P=0;P<3;P++)for(var U=b[P],B=U.charAt(0),X=N[U],$=0;$<O.length;$++){var le=O[$];if(le.visible){var ce=X.r2l(le[B]);!isNaN(ce)&&isFinite(ce)&&(F[0][P]=Math.min(F[0][P],ce),F[1][P]=Math.max(F[1][P],ce))}}}M.plot=function(z,F,N){var O=this;if(O.plotArgs=[z,F,N],!O.glplot.contextLost){var P,U,B,X,$,le,ce=F[O.id],de=N[O.id];O.fullLayout=F,O.fullSceneLayout=ce,O.axesOptions.merge(F,ce),O.spikeOptions.merge(ce),O.setViewport(ce),O.updateFx(ce.dragmode,ce.hovermode),O.camera.enableWheel=O.graphDiv._context._scrollZoom.gl3d,O.glplot.setClearColor(i(ce.bgcolor)),O.setConvert($),z?Array.isArray(z)||(z=[z]):z=[];var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(B=0;B<z.length;++B)P=z[B],!(P.visible!==!0||P._length===0)&&p(this,P,G);u(this,G);var Y=[1,1,1];for(X=0;X<3;++X)G[1][X]===G[0][X]?Y[X]=1:Y[X]=1/(G[1][X]-G[0][X]);for(O.dataScale=Y,O.convertAnnotations(this),B=0;B<z.length;++B)P=z[B],!(P.visible!==!0||P._length===0)&&(U=O.traces[P.uid],U?U.data.type===P.type?U.update(P):(U.dispose(),U=P._module.plot(this,P),O.traces[P.uid]=U):(U=P._module.plot(this,P),O.traces[P.uid]=U),U.name=P.name);var ee=Object.keys(O.traces);e:for(B=0;B<ee.length;++B){for(X=0;X<z.length;++X)if(z[X].uid===ee[B]&&z[X].visible===!0&&z[X]._length!==0)continue e;U=O.traces[ee[B]],U.dispose(),delete O.traces[ee[B]]}O.glplot.objects.sort(function(Ke,Mt){return Ke._trace.data.index-Mt._trace.data.index});var q=[[0,0,0],[0,0,0]],se=[],ae={};for(B=0;B<3;++B){$=ce[b[B]],le=$.type,le in ae?(ae[le].acc*=Y[B],ae[le].count+=1):ae[le]={acc:Y[B],count:1};var j;if($.autorange){q[0][B]=1/0,q[1][B]=-1/0;var Q=O.glplot.objects,re=O.fullSceneLayout.annotations||[],pe=$._name.charAt(0);for(X=0;X<Q.length;X++){var we=Q[X],Se=we.bounds,Ie=we._trace.data._pad||0;we.constructor.name==="ErrorBars"&&$._lowerLogErrorBound?q[0][B]=Math.min(q[0][B],$._lowerLogErrorBound):q[0][B]=Math.min(q[0][B],Se[0][B]/Y[B]-Ie),q[1][B]=Math.max(q[1][B],Se[1][B]/Y[B]+Ie)}for(X=0;X<re.length;X++){var Re=re[X];if(Re.visible){var We=$.r2l(Re[pe]);q[0][B]=Math.min(q[0][B],We),q[1][B]=Math.max(q[1][B],We)}}if("rangemode"in $&&$.rangemode==="tozero"&&(q[0][B]=Math.min(q[0][B],0),q[1][B]=Math.max(q[1][B],0)),q[0][B]>q[1][B])q[0][B]=-1,q[1][B]=1;else{var at=q[1][B]-q[0][B];q[0][B]-=at/32,q[1][B]+=at/32}if(j=[q[0][B],q[1][B]],j=T(j,$),q[0][B]=j[0],q[1][B]=j[1],$.isReversed()){var nt=q[0][B];q[0][B]=q[1][B],q[1][B]=nt}}else j=$.range,q[0][B]=$.r2l(j[0]),q[1][B]=$.r2l(j[1]);q[0][B]===q[1][B]&&(q[0][B]-=1,q[1][B]+=1),se[B]=q[1][B]-q[0][B],$.range=[q[0][B],q[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*Y[B],max:$.range[1]*Y[B]})}var tt,qe=ce.aspectmode;if(qe==="cube")tt=[1,1,1];else if(qe==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(qe==="auto"||qe==="data"){var ue=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],le=$.type;var ne=ae[le];ue[B]=Math.pow(ne.acc,1/ne.count)/Y[B]}qe==="data"||Math.max.apply(null,ue)/Math.min.apply(null,ue)<=4?tt=ue:tt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ce.aspectratio.x=de.aspectratio.x=tt[0],ce.aspectratio.y=de.aspectratio.y=tt[1],ce.aspectratio.z=de.aspectratio.z=tt[2],O.glplot.setAspectratio(ce.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:ce.aspectratio.x,y:ce.aspectratio.y,z:ce.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=ce.aspectmode);var Ce=ce.domain||null,Ye=F._size||null;if(Ce&&Ye){var rt=O.container.style;rt.position="absolute",rt.left=Ye.l+Ce.x[0]*Ye.w+"px",rt.top=Ye.t+(1-Ce.y[1])*Ye.h+"px",rt.width=Ye.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ye.h*(Ce.y[1]-Ce.y[0])+"px"}O.glplot.redraw()}},M.destroy=function(){var z=this;z.glplot&&(z.camera.mouseListener.enabled=!1,z.container.removeEventListener("wheel",z.camera.wheelListener),z.camera=null,z.glplot.dispose(),z.container.parentNode.removeChild(z.container),z.glplot=null)};function y(z){return[[z.eye.x,z.eye.y,z.eye.z],[z.center.x,z.center.y,z.center.z],[z.up.x,z.up.y,z.up.z]]}function m(z){return{up:{x:z.up[0],y:z.up[1],z:z.up[2]},center:{x:z.center[0],y:z.center[1],z:z.center[2]},eye:{x:z.eye[0],y:z.eye[1],z:z.eye[2]},projection:{type:z._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),m(z.camera)},M.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,y(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",P=F.camera._ortho;O!==P&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},M.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),P=O.get();function U(le,ce,de,G){var Y=["up","center","eye"],ee=["x","y","z"];return ce[Y[de]]&&le[Y[de]][ee[G]]===ce[Y[de]][ee[G]]}var B=!1;if(P===void 0)B=!0;else{for(var X=0;X<3;X++)for(var $=0;$<3;$++)if(!U(N,P,X,$)){B=!0;break}(!P.projection||N.projection&&N.projection.type!==P.projection.type)&&(B=!0)}return B},M.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),P=O.get();return P===void 0||P.x!==N.x||P.y!==N.y||P.z!==N.z},M.saveLayout=function(z){var F=this,N=F.fullLayout,O,P,U,B,X,$,le=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=le||ce;if(de){var G={};if(le&&(O=F.getCamera(),P=r.nestedProperty(z,F.id+".camera"),U=P.get(),G[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),X=r.nestedProperty(z,F.id+".aspectratio"),$=X.get(),G[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,G),le){P.set(O);var Y=r.nestedProperty(N,F.id+".camera");Y.set(O)}if(ce){X.set(B);var ee=r.nestedProperty(N,F.id+".aspectratio");ee.set(B),F.glplot.redraw()}}return de},M.updateFx=function(z,F){var N=this,O=N.camera;if(O)if(z==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(z==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var P=N.graphDiv,U=P._fullLayout,B=N.fullSceneLayout.camera,X=B.up.x,$=B.up.y,le=B.up.z;if(le/Math.sqrt(X*X+$*$+le*le)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},G={};G[ce]=de;var Y=P.layout;t.call("_storeDirectGUIEdit",Y,U._preGUI,G),B.up=de,r.nestedProperty(Y,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function R(z,F,N){for(var O=0,P=N-1;O<P;++O,--P)for(var U=0;U<F;++U)for(var B=0;B<4;++B){var X=4*(F*O+U)+B,$=4*(F*P+U)+B,le=z[X];z[X]=z[$],z[$]=le}}function L(z,F,N){for(var O=0;O<N;++O)for(var P=0;P<F;++P){var U=4*(F*O+P),B=z[U+3];if(B>0)for(var X=255/B,$=0;$<3;++$)z[U+$]=Math.min(X*z[U+$],255)}}M.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var N=F.glplot.gl,O=N.drawingBufferWidth,P=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*P*4);N.readPixels(0,0,O,P,N.RGBA,N.UNSIGNED_BYTE,U),R(U,O,P),L(U,O,P);var B=document.createElement("canvas");B.width=O,B.height=P;var X=B.getContext("2d",{willReadFrequently:!0}),$=X.createImageData(O,P);$.data.set(U),X.putImageData($,0,0);var le;switch(z){case"jpeg":le=B.toDataURL("image/jpeg");break;case"webp":le=B.toDataURL("image/webp");break;default:le=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),le},M.setConvert=function(){for(var z=this,F=0;F<3;F++){var N=z.fullSceneLayout[b[F]];a.setConvert(N,z.fullLayout),N.setScale=r.noop}},M.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},V.exports=A}}),rU=He({"src/plots/gl3d/layout/attributes.js"(Z,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,V){"use strict";var d=Jn(),x=Wh(),S=Qo().extendFlat,E=pc().overrideAll;V.exports=E({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:d.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:S({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:S({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:S({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,V){"use strict";var d=AE(),x=wc().attributes,S=Qo().extendFlat,E=sa().counterRegex;function e(t,r,o){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:o,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[E("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:S(e(0,0,1),{}),center:S(e(0,0,0),{}),eye:S(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({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:d,yaxis:d,zaxis:d,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"}}}),aU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,V){"use strict";var d=Ch().mix,x=sa(),S=zl(),E=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;V.exports=function(n,i,s){var h,f;function v(l,_){return x.coerce(h,f,E,l,_)}for(var c=0;c<r.length;c++){var T=r[c];h=n[T]||{},f=S.newContainer(i,T),f._id=T[0]+s.scene,f._name=T,e(h,f,v,s),t(h,f,v,{font:s.font,letter:T[0],data:s.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:s.bgColor,calendar:s.calendar},s.fullLayout),v("gridcolor",d(f.color,s.bgColor,o).toRgbString()),v("title.text",T[0]),f.setScale=x.noop,v("showspikes")&&(v("spikesides"),v("spikethickness"),v("spikecolor",f.color)),v("showaxeslabels"),v("showbackground")&&v("backgroundcolor")}}}}),iU=He({"src/plots/gl3d/layout/defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=lo(),E=o0(),e=aU(),t=SE(),r=Hh().getSubplotData,o="gl3d";V.exports=function(i,s,h){var f=s._basePlotModules.length>1;function v(c){if(!f){var T=d.validate(i[c],t[c]);if(T)return i[c]}}E(i,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:v,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(n,i,s,h){for(var f=s("bgcolor"),v=x.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T<c.length;T++)s("camera."+c[T]+".x"),s("camera."+c[T]+".y"),s("camera."+c[T]+".z");s("camera.projection.type");var l=!!s("aspectratio.x")&&!!s("aspectratio.y")&&!!s("aspectratio.z"),_=l?"manual":"auto",w=s("aspectmode",_);l||(n.aspectratio=i.aspectratio={x:1,y:1,z:1},w==="manual"&&(i.aspectmode="auto"),n.aspectmode=i.aspectmode);var A=r(h.fullData,o,h.id);e(n,i,{font:h.font,scene:h.id,data:A,bgColor:v,calendar:h.calendar,autotypenumbersDflt:h.autotypenumbersDflt,fullLayout:h.fullLayout}),S.getComponentMethod("annotations3d","handleDefaults")(n,i,h);var M=h.getDfltFromLayout("dragmode");if(M!==!1&&!M)if(M="orbit",n.camera&&n.camera.up){var g=n.camera.up.x,b=n.camera.up.y,p=n.camera.up.z;p!==0&&(!g||!b||!p||p/Math.sqrt(g*g+b*b+p*p)>.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),v0=He({"src/plots/gl3d/index.js"(Z){"use strict";var V=pc().overrideAll,d=Zm(),x=tU(),S=Hh().getSubplotData,E=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=E.counterRegex("scene"),Z.attributes=rU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=V({hoverlabel:d.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=iU(),Z.plot=function(a){for(var n=a._fullLayout,i=a._fullData,s=n._subplots[t],h=0;h<s.length;h++){var f=s[h],v=S(i,t,f),c=n[f],T=c.camera,l=c._scene;l||(l=new x({id:f,graphDiv:a,container:a.querySelector(".gl-container"),staticPlot:a._context.staticPlot,plotGlPixelRatio:a._context.plotGlPixelRatio,camera:T},n),c._scene=l),l.viewInitial||(l.viewInitial={up:{x:T.up.x,y:T.up.y,z:T.up.z},eye:{x:T.eye.x,y:T.eye.y,z:T.eye.z},center:{x:T.center.x,y:T.center.y,z:T.center.z}}),l.plot(v,n,a.layout)}},Z.clean=function(o,a,n,i){for(var s=i._subplots[t]||[],h=0;h<s.length;h++){var f=s[h];!a[f]&&i[f]._scene&&(i[f]._scene.destroy(),i._infolayer&&i._infolayer.selectAll(".annotation-"+f).remove())}},Z.toSVG=function(o){for(var a=o._fullLayout,n=a._subplots[t],i=a._size,s=0;s<n.length;s++){var h=a[n[s]],f=h.domain,v=h._scene,c=v.toImage("png"),T=a._glimages.append("svg:image");T.attr({xmlns:e.svg,"xlink:href":c,x:i.l+i.w*f.x[0],y:i.t+i.h*(1-f.y[1]),width:i.w*(f.x[1]-f.x[0]),height:i.h*(f.y[1]-f.y[0]),preserveAspectRatio:"none"}),v.destroy()}},Z.cleanId=function(a){if(a.match(/^scene[0-9]*$/)){var n=a.slice(5);return n==="1"&&(n=""),r+n}},Z.updateFx=function(o){for(var a=o._fullLayout,n=a._subplots[t],i=0;i<n.length;i++){var s=a[n[i]]._scene;s.updateFx(a.dragmode,a.hovermode)}}}}),nU=He({"src/traces/scatter3d/index.js"(Z,V){"use strict";V.exports={plot:XN(),attributes:wE(),markerSymbols:eT(),supplyDefaults:ZN(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:YN(),moduleType:"trace",name:"scatter3d",basePlotModule:v0(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}}),oU=He({"lib/scatter3d.js"(Z,V){"use strict";V.exports=nU()}}),gx=He({"src/traces/surface/attributes.js"(Z,V){"use strict";var d=Jn(),x=ku(),S=tf().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=ru(),r=Qo().extendFlat,o=pc().overrideAll;function a(s){return{valType:"boolean",dflt:!1}}function n(s){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:a("x"),y:a("y"),z:a("z")},color:{valType:"color",dflt:d.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:d.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=V.exports=o(r({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:E(),hovertemplatefallback:e(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},x("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:n("x"),y:n("y"),z:n("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:r({},t.hoverinfo),showlegend:r({},t.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}}),ME=He({"src/traces/surface/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=_h(),E=gx(),e=.1;function t(n,i){for(var s=[],h=32,f=0;f<h;f++){var v=f/(h-1),c=i+(1-i)*(1-Math.pow(Math.sin(n*v*Math.PI),2));s.push([v,Math.max(0,Math.min(1,c))])}return s}function r(n){var i=0;if(!Array.isArray(n)||n.length<2||!n[0]||!n[n.length-1]||+n[0][0]!=0||+n[n.length-1][0]!=1)return!1;for(var s=0;s<n.length;s++){var h=n[s];if(h.length!==2||+h[0]<i)return!1;i=+h[0]}return!0}function o(n,i,s,h){var f,v;function c(u,y){return x.coerce(n,i,E,u,y)}var T=c("x"),l=c("y"),_=c("z");if(!_||!_.length||T&&T.length<1||l&&l.length<1){i.visible=!1;return}i._xlength=Array.isArray(T)&&x.isArrayOrTypedArray(T[0])?_.length:_[0].length,i._ylength=_.length;var w=d.getComponentMethod("calendars","handleTraceDefaults");w(n,i,["x","y","z"],h),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("xhoverformat"),c("yhoverformat"),c("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(u){c(u)});var A=c("surfacecolor"),M=["x","y","z"];for(f=0;f<3;++f){var g="contours."+M[f],b=c(g+".show"),p=c(g+".highlight");if(b||p)for(v=0;v<3;++v)c(g+".project."+M[v]);b&&(c(g+".color"),c(g+".width"),c(g+".usecolormap")),p&&(c(g+".highlightcolor"),c(g+".highlightwidth")),c(g+".start"),c(g+".end"),c(g+".size")}S(n,i,h,c,{prefix:"",cLetter:"c"}),a(n,i,h,c),i._length=null}function a(n,i,s,h){var f=h("opacityscale");f==="max"?i.opacityscale=[[0,e],[1,1]]:f==="min"?i.opacityscale=[[0,1],[1,e]]:f==="extremes"?i.opacityscale=t(1,e):r(f)||(i.opacityscale=void 0)}V.exports={supplyDefaults:o,opacityscaleDefaults:a}}}),sU=He({"src/traces/surface/calc.js"(Z,V){"use strict";var d=Tp();V.exports=function(S,E){E.surfacecolor?d(S,E,{vals:E.surfacecolor,containerStr:"",cLetter:"c"}):d(S,E,{vals:E.z,containerStr:"",cLetter:"c"})}}}),lU=He({"src/traces/surface/convert.js"(Z,V){"use strict";var d=Yh().gl_surface3d,x=Yh().ndarray,S=Yh().ndarray_linear_interpolate.d2,E=K2(),e=J2(),t=sa().isArrayOrTypedArray,r=tm().parseColorScale,o=em(),a=rc().extractOpts;function n(y,m,R){this.scene=y,this.uid=R,this.surface=m,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 i=n.prototype;i.getXat=function(y,m,R,L){var z=t(this.data.x)?t(this.data.x[0])?this.data.x[m][y]:this.data.x[y]:y;return R===void 0?z:L.d2l(z,0,R)},i.getYat=function(y,m,R,L){var z=t(this.data.y)?t(this.data.y[0])?this.data.y[m][y]:this.data.y[m]:m;return R===void 0?z:L.d2l(z,0,R)},i.getZat=function(y,m,R,L){var z=this.data.z[m][y];return z===null&&this.data.connectgaps&&this.data._interpolatedZ&&(z=this.data._interpolatedZ[m][y]),R===void 0?z:L.d2l(z,0,R)},i.handlePick=function(y){if(y.object===this.surface){var m=(y.data.index[0]-1)/this.dataScaleX-1,R=(y.data.index[1]-1)/this.dataScaleY-1,L=Math.max(Math.min(Math.round(m),this.data.z[0].length-1),0),z=Math.max(Math.min(Math.round(R),this.data._ylength-1),0);y.index=[L,z],y.traceCoordinate=[this.getXat(L,z),this.getYat(L,z),this.getZat(L,z)],y.dataCoordinate=[this.getXat(L,z,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(L,z,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(L,z,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var F=0;F<3;F++){var N=y.dataCoordinate[F];N!=null&&(y.dataCoordinate[F]*=this.scene.dataScale[F])}var O=this.data.hovertext||this.data.text;return t(O)&&O[z]&&O[z][L]!==void 0?y.textLabel=O[z][L]:O?y.textLabel=O:y.textLabel="",y.data.dataCoordinate=y.dataCoordinate.slice(),this.surface.highlight(y.data),this.scene.glplot.spikes.position=y.dataCoordinate,!0}};function s(y){var m=y[0].rgb,R=y[y.length-1].rgb;return m[0]===R[0]&&m[1]===R[1]&&m[2]===R[2]&&m[3]===R[3]}var h=[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 f(y,m){if(y<m)return 0;for(var R=0;Math.floor(y%m)===0;)y/=m,R++;return R}function v(y){for(var m=[],R=0;R<h.length;R++){var L=h[R];m.push(f(y,L))}return m}function c(y){for(var m=v(y),R=y,L=0;L<h.length;L++)if(m[L]>0){R=h[L];break}return R}function T(y,m){if(!(y<1||m<1)){for(var R=v(y),L=v(m),z=1,F=0;F<h.length;F++)z*=Math.pow(h[F],Math.max(R[F],L[F]));return z}}function l(y){if(y.length!==0){for(var m=1,R=0;R<y.length;R++)m=T(m,y[R]);return m}}i.calcXnums=function(y){var m,R=[];for(m=1;m<y;m++){var L=this.getXat(m-1,0),z=this.getXat(m,0);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?R[m-1]=Math.abs(z-L):R[m-1]=0}var F=0;for(m=1;m<y;m++)F+=R[m-1];for(m=1;m<y;m++)R[m-1]===0?R[m-1]=1:R[m-1]=Math.round(F/R[m-1]);return R},i.calcYnums=function(y){var m,R=[];for(m=1;m<y;m++){var L=this.getYat(0,m-1),z=this.getYat(0,m);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?R[m-1]=Math.abs(z-L):R[m-1]=0}var F=0;for(m=1;m<y;m++)F+=R[m-1];for(m=1;m<y;m++)R[m-1]===0?R[m-1]=1:R[m-1]=Math.round(F/R[m-1]);return R};var _=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],w=_[9],A=_[13];i.estimateScale=function(y,m){for(var R=m===0?this.calcXnums(y):this.calcYnums(y),L=1+l(R);L<w;)L*=2;for(;L>A;)L--,L/=c(L),L++,L<w&&(L=A);var z=Math.round(L/y);return z>1?z:1};function M(y,m,R){var L=R[8]+R[2]*m[0]+R[5]*m[1];return y[0]=(R[6]+R[0]*m[0]+R[3]*m[1])/L,y[1]=(R[7]+R[1]*m[0]+R[4]*m[1])/L,y}function g(y,m,R){return b(y,m,M,R),y}function b(y,m,R,L){for(var z=[0,0],F=y.shape[0],N=y.shape[1],O=0;O<F;O++)for(var P=0;P<N;P++)R(z,[O,P],L),y.set(O,P,S(m,z[0],z[1]));return y}i.refineCoords=function(y){for(var m=this.dataScaleX,R=this.dataScaleY,L=y[0].shape[0],z=y[0].shape[1],F=Math.floor(y[0].shape[0]*m+1)|0,N=Math.floor(y[0].shape[1]*R+1)|0,O=1+L+1,P=1+z+1,U=x(new Float32Array(O*P),[O,P]),B=[1/m,0,0,0,1/R,0,0,0,1],X=0;X<y.length;++X){this.surface.padField(U,y[X]);var $=x(new Float32Array(F*N),[F,N]);g($,U,B),y[X]=$}};function p(y,m){for(var R=!1,L=0;L<y.length;L++)if(m===y[L]){R=!0;break}R===!1&&y.push(m)}i.setContourLevels=function(){var y=[[],[],[]],m=[!1,!1,!1],R=!1,L,z,F;for(L=0;L<3;++L)if(this.showContour[L]&&(R=!0,this.contourSize[L]>0&&this.contourStart[L]!==null&&this.contourEnd[L]!==null&&this.contourEnd[L]>this.contourStart[L]))for(m[L]=!0,z=this.contourStart[L];z<this.contourEnd[L];z+=this.contourSize[L])F=z*this.scene.dataScale[L],p(y[L],F);if(R){var N=[[],[],[]];for(L=0;L<3;++L)this.showContour[L]&&(N[L]=m[L]?y[L]:this.scene.contourLevels[L]);this.surface.update({levels:N})}},i.update=function(y){var m=this.scene,R=m.fullSceneLayout,L=this.surface,z=r(y),F=m.dataScale,N=y.z[0].length,O=y._ylength,P=m.contourLevels;this.data=y;var U,B,X,$,le=[];for(U=0;U<3;U++)for(le[U]=[],B=0;B<N;B++)le[U][B]=[];for(B=0;B<N;B++)for(X=0;X<O;X++)le[0][B][X]=this.getXat(B,X,y.xcalendar,R.xaxis),le[1][B][X]=this.getYat(B,X,y.ycalendar,R.yaxis),le[2][B][X]=this.getZat(B,X,y.zcalendar,R.zaxis);if(y.connectgaps)for(y._emptypoints=e(le[2]),E(le[2],y._emptypoints),y._interpolatedZ=[],B=0;B<N;B++)for(y._interpolatedZ[B]=[],X=0;X<O;X++)y._interpolatedZ[B][X]=le[2][B][X];for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)$=le[U][B][X],$==null?le[U][B][X]=NaN:$=le[U][B][X]*=F[U];for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)$=le[U][B][X],$!=null&&(this.minValues[U]>$&&(this.minValues[U]=$),this.maxValues[U]<$&&(this.maxValues[U]=$));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)$=le[U][B][X],$!=null&&(le[U][B][X]-=this.objectOffset[U]);var ce=[x(new Float32Array(N*O),[N,O]),x(new Float32Array(N*O),[N,O]),x(new Float32Array(N*O),[N,O])];for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)ce[U].set(B,X,le[U][B][X]);le=[];var de={colormap:z,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!y.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:y.opacityscale,opacity:y.opacity},G=a(y);if(de.intensityBounds=[G.min,G.max],y.surfacecolor){var Y=x(new Float32Array(N*O),[N,O]);for(B=0;B<N;B++)for(X=0;X<O;X++)Y.set(B,X,y.surfacecolor[X][B]);ce.push(Y)}else de.intensityBounds[0]*=F[2],de.intensityBounds[1]*=F[2];(A<ce[0].shape[0]||A<ce[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(ce[0].shape[0],0),this.dataScaleY=this.estimateScale(ce[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(ce)),y.surfacecolor&&(de.intensity=ce.pop());var ee=[!0,!0,!0],q=["x","y","z"];for(U=0;U<3;++U){var se=y.contours[q[U]];ee[U]=se.highlight,de.showContour[U]=se.show||se.highlight,de.showContour[U]&&(de.contourProject[U]=[se.project.x,se.project.y,se.project.z],se.show?(this.showContour[U]=!0,de.levels[U]=P[U],L.highlightColor[U]=de.contourColor[U]=o(se.color),se.usecolormap?L.highlightTint[U]=de.contourTint[U]=0:L.highlightTint[U]=de.contourTint[U]=1,de.contourWidth[U]=se.width,this.contourStart[U]=se.start,this.contourEnd[U]=se.end,this.contourSize[U]=se.size):(this.showContour[U]=!1,this.contourStart[U]=null,this.contourEnd[U]=null,this.contourSize[U]=0),se.highlight&&(de.dynamicColor[U]=o(se.highlightcolor),de.dynamicWidth[U]=se.highlightwidth))}s(z)&&(de.vertexColor=!0),de.objectOffset=this.objectOffset,de.coords=ce,L.update(de),L.visible=y.visible,L.enableDynamic=ee,L.enableHighlight=ee,L.snapToData=!0,"lighting"in y&&(L.ambientLight=y.lighting.ambient,L.diffuseLight=y.lighting.diffuse,L.specularLight=y.lighting.specular,L.roughness=y.lighting.roughness,L.fresnel=y.lighting.fresnel),"lightposition"in y&&(L.lightPosition=[y.lightposition.x,y.lightposition.y,y.lightposition.z])},i.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function u(y,m){var R=y.glplot.gl,L=d({gl:R}),z=new n(y,L,m.uid);return L._trace=z,z.update(m),y.glplot.add(L),z}V.exports=u}}),uU=He({"src/traces/surface/index.js"(Z,V){"use strict";V.exports={attributes:gx(),supplyDefaults:ME().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:sU(),plot:lU(),moduleType:"trace",name:"surface",basePlotModule:v0(),categories:["gl3d","2dMap","showLegend"],meta:{}}}}),cU=He({"lib/surface.js"(Z,V){"use strict";V.exports=uU()}}),M1=He({"src/traces/mesh3d/attributes.js"(Z,V){"use strict";var d=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=gx(),t=ru(),r=Qo().extendFlat;V.exports=r({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:S({editType:"calc"}),hovertemplatefallback:E({editType:"calc"}),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("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"}},d("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:e.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},e.contours.x.show,{}),color:e.contours.x.color,width:e.contours.x.width,editType:"calc"},lightposition:{x:r({},e.lightposition.x,{dflt:1e5}),y:r({},e.lightposition.y,{dflt:1e5}),z:r({},e.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({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"},e.lighting),hoverinfo:r({},t.hoverinfo,{editType:"calc"}),showlegend:r({},t.showlegend,{dflt:!1})})}}),tT=He({"src/traces/isosurface/attributes.js"(Z,V){"use strict";var d=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=M1(),t=ru(),r=Qo().extendFlat,o=pc().overrideAll;function a(s){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function n(s){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=V.exports=o(r({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:a("x"),y:a("y"),z:a("z")},caps:{x:n("x"),y:n("y"),z:n("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:E(),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),valuehoverformat:x("value",1),showlegend:r({},t.showlegend,{dflt:!1})},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:e.opacity,lightposition:e.lightposition,lighting:e.lighting,flatshading:e.flatshading,contour:e.contour,hoverinfo:r({},t.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}}),EE=He({"src/traces/isosurface/defaults.js"(Z,V){"use strict";var d=sa(),x=lo(),S=tT(),E=_h();function e(r,o,a,n){function i(s,h){return d.coerce(r,o,S,s,h)}t(r,o,a,n,i)}function t(r,o,a,n,i){var s=i("isomin"),h=i("isomax");h!=null&&s!==void 0&&s!==null&&s>h&&(o.isomin=null,o.isomax=null);var f=i("x"),v=i("y"),c=i("z"),T=i("value");if(!f||!f.length||!v||!v.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=x.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var g="caps."+M,b=i(g+".show");b&&i(g+".fill");var p="slices."+M,u=i(p+".show");u&&(i(p+".fill"),i(p+".locations"))});var _=i("spaceframe.show");_&&i("spaceframe.fill");var w=i("surface.show");w&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var A=i("contour.show");A&&(i("contour.color"),i("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(M){i(M)}),E(r,o,n,i,{prefix:"",cLetter:"c"}),o._length=null}V.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=He({"src/traces/streamtube/calc.js"(Z,V){"use strict";var d=sa(),x=Tp();function S(r,o){o._len=Math.min(o.u.length,o.v.length,o.w.length,o.x.length,o.y.length,o.z.length),o._u=t(o.u,o._len),o._v=t(o.v,o._len),o._w=t(o.w,o._len),o._x=t(o.x,o._len),o._y=t(o.y,o._len),o._z=t(o.z,o._len);var a=E(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var n=0,i,s,h;o.starts&&(i=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),n=Math.min(i.length,s.length,h.length)),o._startsX=i||[],o._startsY=s||[],o._startsZ=h||[];var f=0,v=1/0,c;for(c=0;c<o._len;c++){var T=o._u[c],l=o._v[c],_=o._w[c],w=Math.sqrt(T*T+l*l+_*_);f=Math.max(f,w),v=Math.min(v,w)}for(x(r,o,{vals:[v,f],containerStr:"",cLetter:"c"}),c=0;c<n;c++){var A=i[c];a.xMax=Math.max(a.xMax,A),a.xMin=Math.min(a.xMin,A);var M=s[c];a.yMax=Math.max(a.yMax,M),a.yMin=Math.min(a.yMin,M);var g=h[c];a.zMax=Math.max(a.zMax,g),a.zMin=Math.min(a.zMin,g)}o._slen=n,o._normMax=f,o._xbnds=[a.xMin,a.xMax],o._ybnds=[a.yMin,a.yMax],o._zbnds=[a.zMin,a.zMax]}function E(r){var o=r._x,a=r._y,n=r._z,i=r._len,s,h,f,v=-1/0,c=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,A="",M,g,b,p,u,y,m,R,L;for(i&&(p=o[0],y=a[0],R=n[0]),i>1&&(u=o[i-1],m=a[i-1],L=n[i-1]),s=0;s<i;s++)v=Math.max(v,o[s]),c=Math.min(c,o[s]),T=Math.max(T,a[s]),l=Math.min(l,a[s]),_=Math.max(_,n[s]),w=Math.min(w,n[s]),!M&&o[s]!==p&&(M=!0,A+="x"),!g&&a[s]!==y&&(g=!0,A+="y"),!b&&n[s]!==R&&(b=!0,A+="z");M||(A+="x"),g||(A+="y"),b||(A+="z");var z=e(r._x),F=e(r._y),N=e(r._z);A=A.replace("x",(p>u?"-":"+")+"x"),A=A.replace("y",(y>m?"-":"+")+"y"),A=A.replace("z",(R>L?"-":"+")+"z");var O=function(){i=0,z=[],F=[],N=[]};(!i||i<z.length*F.length*N.length)&&O();var P=function(we){return we==="x"?o:we==="y"?a:n},U=function(we){return we==="x"?z:we==="y"?F:N},B=function(we){return we[i-1]<we[0]?-1:1},X=P(A[1]),$=P(A[3]),le=P(A[5]),ce=U(A[1]).length,de=U(A[3]).length,G=U(A[5]).length,Y=!1,ee=function(we,Se,Ie){return ce*(de*we+Se)+Ie},q=B(P(A[1])),se=B(P(A[3])),ae=B(P(A[5]));for(s=0;s<G-1;s++){for(h=0;h<de-1;h++){for(f=0;f<ce-1;f++){var j=ee(s,h,f),Q=ee(s,h,f+1),re=ee(s,h+1,f),pe=ee(s+1,h,f);if((!(X[j]*q<X[Q]*q)||!($[j]*se<$[re]*se)||!(le[j]*ae<le[pe]*ae))&&(Y=!0),Y)break}if(Y)break}if(Y)break}return Y&&(d.warn("Encountered arbitrary coordinates! Unable to input data grid."),O()),{xMin:c,yMin:l,zMin:w,xMax:v,yMax:T,zMax:_,Xs:z,Ys:F,Zs:N,len:i,fill:A}}function e(r){return d.distinctVals(r).vals}function t(r,o){if(o===void 0&&(o=r.length),d.isTypedArray(r))return r.subarray(0,o);for(var a=[],n=0;n<o;n++)a[n]=+r[n];return a}V.exports={calc:S,filter:t,processGrid:E}}}),kE=He({"src/traces/isosurface/calc.js"(Z,V){"use strict";var d=Tp(),x=rT().processGrid,S=rT().filter;V.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=S(t.x,t._len),t._y=S(t.y,t._len),t._z=S(t.z,t._len),t._value=S(t.value,t._len);var r=x(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;for(var o=1/0,a=-1/0,n=0;n<t._len;n++){var i=t._value[n];o=Math.min(o,i),a=Math.max(a,i)}t._minValues=o,t._maxValues=a,t._vMin=t.isomin===void 0||t.isomin===null?o:t.isomin,t._vMax=t.isomax===void 0||t.isomax===null?a:t.isomax,d(e,t,{vals:[t._vMin,t._vMax],containerStr:"",cLetter:"c"})}}}),E1=He({"src/plots/gl3d/zip3.js"(Z,V){"use strict";V.exports=function(x,S,E,e){e=e||x.length;for(var t=new Array(e),r=0;r<e;r++)t[r]=[x[r],S[r],E[r]];return t}}}),aT=He({"src/traces/isosurface/convert.js"(Z,V){"use strict";var d=Yh().gl_mesh3d,x=tm().parseColorScale,S=sa().isArrayOrTypedArray,E=em(),e=rc().extractOpts,t=E1(),r=function(h,f){for(var v=f.length-1;v>0;v--){var c=Math.min(f[v],f[v-1]),T=Math.max(f[v],f[v-1]);if(T>c&&c<h&&h<=T)return{id:v,distRatio:(T-h)/(T-c)}}return{id:0,distRatio:0}};function o(h,f,v){this.scene=h,this.uid=v,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var a=o.prototype;a.handlePick=function(h){if(h.object===this.mesh){var f=h.data.index,v=this.data._meshX[f],c=this.data._meshY[f],T=this.data._meshZ[f],l=this.data._Ys.length,_=this.data._Zs.length,w=r(v,this.data._Xs).id,A=r(c,this.data._Ys).id,M=r(T,this.data._Zs).id,g=h.index=M+_*A+_*l*w;h.traceCoordinate=[this.data._meshX[g],this.data._meshY[g],this.data._meshZ[g],this.data._value[g]];var b=this.data.hovertext||this.data.text;return S(b)&&b[g]!==void 0?h.textLabel=b[g]:b&&(h.textLabel=b),!0}},a.update=function(h){var f=this.scene,v=f.fullSceneLayout;this.data=i(h);function c(A,M,g,b){return M.map(function(p){return A.d2l(p,0,b)*g})}var T=t(c(v.xaxis,h._meshX,f.dataScale[0],h.xcalendar),c(v.yaxis,h._meshY,f.dataScale[1],h.ycalendar),c(v.zaxis,h._meshZ,f.dataScale[2],h.zcalendar)),l=t(h._meshI,h._meshJ,h._meshK),_={positions:T,cells:l,lightPosition:[h.lightposition.x,h.lightposition.y,h.lightposition.z],ambient:h.lighting.ambient,diffuse:h.lighting.diffuse,specular:h.lighting.specular,roughness:h.lighting.roughness,fresnel:h.lighting.fresnel,vertexNormalsEpsilon:h.lighting.vertexnormalsepsilon,faceNormalsEpsilon:h.lighting.facenormalsepsilon,opacity:h.opacity,contourEnable:h.contour.show,contourColor:E(h.contour.color).slice(0,3),contourWidth:h.contour.width,useFacetNormals:h.flatshading},w=e(h);_.vertexIntensity=h._meshIntensity,_.vertexIntensityBounds=[w.min,w.max],_.colormap=x(h),this.mesh.update(_)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var n=["xyz","xzy","yxz","yzx","zxy","zyx"];function i(h){h._meshI=[],h._meshJ=[],h._meshK=[];var f=h.surface.show,v=h.spaceframe.show,c=h.surface.fill,T=h.spaceframe.fill,l=!1,_=!1,w=0,A,M,g=h._Xs,b=h._Ys,p=h._Zs,u=g.length,y=b.length,m=p.length,R=n.indexOf(h._gridFill.replace(/-/g,"").replace(/\+/g,"")),L=function(_t,Oe,Je){switch(R){case 5:return Je+m*Oe+m*y*_t;case 4:return Je+m*_t+m*u*Oe;case 3:return Oe+y*Je+y*m*_t;case 2:return Oe+y*_t+y*u*Je;case 1:return _t+u*Je+u*m*Oe;default:return _t+u*Oe+u*y*Je}},z=h._minValues,F=h._maxValues,N=h._vMin,O=h._vMax,P,U,B,X;function $(_t,Oe,Je){for(var Ae=X.length,Le=M;Le<Ae;Le++)if(_t===P[Le]&&Oe===U[Le]&&Je===B[Le])return Le;return-1}function le(){M=A}function ce(){P=[],U=[],B=[],X=[],A=0,le()}function de(_t,Oe,Je,Ae){return P.push(_t),U.push(Oe),B.push(Je),X.push(Ae),A++,A-1}function G(_t,Oe,Je){return h._meshI.push(_t),h._meshJ.push(Oe),h._meshK.push(Je),w++,w-1}function Y(_t,Oe,Je){for(var Ae=[],Le=0;Le<_t.length;Le++)Ae[Le]=(_t[Le]+Oe[Le]+Je[Le])/3;return Ae}function ee(_t,Oe,Je){for(var Ae=[],Le=0;Le<_t.length;Le++)Ae[Le]=_t[Le]*(1-Je)+Je*Oe[Le];return Ae}var q;function se(_t){q=_t}function ae(_t,Oe){var Je=_t[0],Ae=_t[1],Le=_t[2],Ue=Y(Je,Ae,Le),Ze=Math.sqrt(1-q),st=ee(Ue,Je,Ze),ut=ee(Ue,Ae,Ze),Ut=ee(Ue,Le,Ze),Ct=Oe[0],Pt=Oe[1],jt=Oe[2];return{xyzv:[[Je,Ae,ut],[ut,st,Je],[Ae,Le,Ut],[Ut,ut,Ae],[Le,Je,st],[st,Ut,Le]],abc:[[Ct,Pt,-1],[-1,-1,Ct],[Pt,jt,-1],[-1,-1,Pt],[jt,Ct,-1],[-1,-1,jt]]}}function j(_t,Oe){return _t==="all"||_t===null?!0:_t.indexOf(Oe)>-1}function Q(_t,Oe){return _t===null?Oe:_t}function re(_t,Oe,Je){le();var Ae=[Oe],Le=[Je];if(q>=1)Ae=[Oe],Le=[Je];else if(q>0){var Ue=ae(Oe,Je);Ae=Ue.xyzv,Le=Ue.abc}for(var Ze=0;Ze<Ae.length;Ze++){Oe=Ae[Ze],Je=Le[Ze];for(var st=[],ut=0;ut<3;ut++){var Ut=Oe[ut][0],Ct=Oe[ut][1],Pt=Oe[ut][2],jt=Oe[ut][3],fr=Je[ut]>-1?Je[ut]:$(Ut,Ct,Pt);fr>-1?st[ut]=fr:st[ut]=de(Ut,Ct,Pt,Q(_t,jt))}G(st[0],st[1],st[2])}}function pe(_t,Oe,Je){var Ae=function(Le,Ue,Ze){re(_t,[Oe[Le],Oe[Ue],Oe[Ze]],[Je[Le],Je[Ue],Je[Ze]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Oe,Je){var Ae=function(Le,Ue,Ze){re(_t,[Oe[Le],Oe[Ue],Oe[Ze]],[Je[Le],Je[Ue],Je[Ze]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Oe,Je,Ae){var Le=_t[3];Le<Je&&(Le=Je),Le>Ae&&(Le=Ae);for(var Ue=(_t[3]-Le)/(_t[3]-Oe[3]+1e-9),Ze=[],st=0;st<4;st++)Ze[st]=(1-Ue)*_t[st]+Ue*Oe[st];return Ze}function Ie(_t,Oe,Je){return _t>=Oe&&_t<=Je}function Re(_t){var Oe=.001*(O-N);return _t>=N-Oe&&_t<=O+Oe}function We(_t){for(var Oe=[],Je=0;Je<4;Je++){var Ae=_t[Je];Oe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Oe}var at=3;function nt(_t,Oe,Je,Ae,Le,Ue){Ue||(Ue=1),Je=[-1,-1,-1];var Ze=!1,st=[Ie(Oe[0][3],Ae,Le),Ie(Oe[1][3],Ae,Le),Ie(Oe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ut=function(Ct,Pt,jt){return Re(Pt[0][3])&&Re(Pt[1][3])&&Re(Pt[2][3])?(re(Ct,Pt,jt),!0):Ue<at?nt(Ct,Pt,jt,N,O,++Ue):!1};if(st[0]&&st[1]&&st[2])return ut(_t,Oe,Je)||Ze;var Ut=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Ct){if(st[Ct[0]]&&st[Ct[1]]&&!st[Ct[2]]){var Pt=Oe[Ct[0]],jt=Oe[Ct[1]],fr=Oe[Ct[2]],ur=Se(fr,Pt,Ae,Le),sr=Se(fr,jt,Ae,Le);Ze=ut(_t,[sr,ur,Pt],[-1,-1,Je[Ct[0]]])||Ze,Ze=ut(_t,[Pt,jt,sr],[Je[Ct[0]],Je[Ct[1]],-1])||Ze,Ut=!0}}),Ut||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Ct){if(st[Ct[0]]&&!st[Ct[1]]&&!st[Ct[2]]){var Pt=Oe[Ct[0]],jt=Oe[Ct[1]],fr=Oe[Ct[2]],ur=Se(jt,Pt,Ae,Le),sr=Se(fr,Pt,Ae,Le);Ze=ut(_t,[sr,ur,Pt],[-1,-1,Je[Ct[0]]])||Ze,Ut=!0}}),Ze}function tt(_t,Oe,Je,Ae){var Le=!1,Ue=We(Oe),Ze=[Ie(Ue[0][3],Je,Ae),Ie(Ue[1][3],Je,Ae),Ie(Ue[2][3],Je,Ae),Ie(Ue[3][3],Je,Ae)];if(!Ze[0]&&!Ze[1]&&!Ze[2]&&!Ze[3])return Le;if(Ze[0]&&Ze[1]&&Ze[2]&&Ze[3])return _&&(Le=we(_t,Ue,Oe)||Le),Le;var st=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(ut){if(Ze[ut[0]]&&Ze[ut[1]]&&Ze[ut[2]]&&!Ze[ut[3]]){var Ut=Ue[ut[0]],Ct=Ue[ut[1]],Pt=Ue[ut[2]],jt=Ue[ut[3]];if(_)Le=re(_t,[Ut,Ct,Pt],[Oe[ut[0]],Oe[ut[1]],Oe[ut[2]]])||Le;else{var fr=Se(jt,Ut,Je,Ae),ur=Se(jt,Ct,Je,Ae),sr=Se(jt,Pt,Je,Ae);Le=re(null,[fr,ur,sr],[-1,-1,-1])||Le}st=!0}}),st||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(ut){if(Ze[ut[0]]&&Ze[ut[1]]&&!Ze[ut[2]]&&!Ze[ut[3]]){var Ut=Ue[ut[0]],Ct=Ue[ut[1]],Pt=Ue[ut[2]],jt=Ue[ut[3]],fr=Se(Pt,Ut,Je,Ae),ur=Se(Pt,Ct,Je,Ae),sr=Se(jt,Ct,Je,Ae),Pr=Se(jt,Ut,Je,Ae);_?(Le=re(_t,[Ut,Pr,fr],[Oe[ut[0]],-1,-1])||Le,Le=re(_t,[Ct,ur,sr],[Oe[ut[1]],-1,-1])||Le):Le=pe(null,[fr,ur,sr,Pr],[-1,-1,-1,-1])||Le,st=!0}}),st)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(ut){if(Ze[ut[0]]&&!Ze[ut[1]]&&!Ze[ut[2]]&&!Ze[ut[3]]){var Ut=Ue[ut[0]],Ct=Ue[ut[1]],Pt=Ue[ut[2]],jt=Ue[ut[3]],fr=Se(Ct,Ut,Je,Ae),ur=Se(Pt,Ut,Je,Ae),sr=Se(jt,Ut,Je,Ae);_?(Le=re(_t,[Ut,fr,ur],[Oe[ut[0]],-1,-1])||Le,Le=re(_t,[Ut,ur,sr],[Oe[ut[0]],-1,-1])||Le,Le=re(_t,[Ut,sr,fr],[Oe[ut[0]],-1,-1])||Le):Le=re(null,[fr,ur,sr],[-1,-1,-1])||Le,st=!0}}),Le}function qe(_t,Oe,Je,Ae,Le,Ue,Ze,st,ut,Ut,Ct){var Pt=!1;return l&&(j(_t,"A")&&(Pt=tt(null,[Oe,Je,Ae,Ue],Ut,Ct)||Pt),j(_t,"B")&&(Pt=tt(null,[Je,Ae,Le,ut],Ut,Ct)||Pt),j(_t,"C")&&(Pt=tt(null,[Je,Ue,Ze,ut],Ut,Ct)||Pt),j(_t,"D")&&(Pt=tt(null,[Ae,Ue,st,ut],Ut,Ct)||Pt),j(_t,"E")&&(Pt=tt(null,[Je,Ae,Ue,ut],Ut,Ct)||Pt)),_&&(Pt=tt(_t,[Je,Ae,Ue,ut],Ut,Ct)||Pt),Pt}function he(_t,Oe,Je,Ae,Le,Ue,Ze,st){return[st[0]===!0?!0:nt(_t,We([Oe,Je,Ae]),[Oe,Je,Ae],Ue,Ze),st[1]===!0?!0:nt(_t,We([Ae,Le,Oe]),[Ae,Le,Oe],Ue,Ze)]}function ue(_t,Oe,Je,Ae,Le,Ue,Ze,st,ut){return st?he(_t,Oe,Je,Le,Ae,Ue,Ze,ut):he(_t,Je,Le,Ae,Oe,Ue,Ze,ut)}function ne(_t,Oe,Je,Ae,Le,Ue,Ze){var st=!1,ut,Ut,Ct,Pt,jt=function(){st=nt(_t,[ut,Ut,Ct],[-1,-1,-1],Le,Ue)||st,st=nt(_t,[Ct,Pt,ut],[-1,-1,-1],Le,Ue)||st},fr=Ze[0],ur=Ze[1],sr=Ze[2];return fr&&(ut=ee(We([L(Oe,Je-0,Ae-0)])[0],We([L(Oe-1,Je-0,Ae-0)])[0],fr),Ut=ee(We([L(Oe,Je-0,Ae-1)])[0],We([L(Oe-1,Je-0,Ae-1)])[0],fr),Ct=ee(We([L(Oe,Je-1,Ae-1)])[0],We([L(Oe-1,Je-1,Ae-1)])[0],fr),Pt=ee(We([L(Oe,Je-1,Ae-0)])[0],We([L(Oe-1,Je-1,Ae-0)])[0],fr),jt()),ur&&(ut=ee(We([L(Oe-0,Je,Ae-0)])[0],We([L(Oe-0,Je-1,Ae-0)])[0],ur),Ut=ee(We([L(Oe-0,Je,Ae-1)])[0],We([L(Oe-0,Je-1,Ae-1)])[0],ur),Ct=ee(We([L(Oe-1,Je,Ae-1)])[0],We([L(Oe-1,Je-1,Ae-1)])[0],ur),Pt=ee(We([L(Oe-1,Je,Ae-0)])[0],We([L(Oe-1,Je-1,Ae-0)])[0],ur),jt()),sr&&(ut=ee(We([L(Oe-0,Je-0,Ae)])[0],We([L(Oe-0,Je-0,Ae-1)])[0],sr),Ut=ee(We([L(Oe-0,Je-1,Ae)])[0],We([L(Oe-0,Je-1,Ae-1)])[0],sr),Ct=ee(We([L(Oe-1,Je-1,Ae)])[0],We([L(Oe-1,Je-1,Ae-1)])[0],sr),Pt=ee(We([L(Oe-1,Je-0,Ae)])[0],We([L(Oe-1,Je-0,Ae-1)])[0],sr),jt()),st}function Ce(_t,Oe,Je,Ae,Le,Ue,Ze,st,ut,Ut,Ct,Pt){var jt=_t;return Pt?(l&&_t==="even"&&(jt=null),qe(jt,Oe,Je,Ae,Le,Ue,Ze,st,ut,Ut,Ct)):(l&&_t==="odd"&&(jt=null),qe(jt,ut,st,Ze,Ue,Le,Ae,Je,Oe,Ut,Ct))}function Ye(_t,Oe,Je,Ae,Le){for(var Ue=[],Ze=0,st=0;st<Oe.length;st++)for(var ut=Oe[st],Ut=1;Ut<m;Ut++)for(var Ct=1;Ct<y;Ct++)Ue.push(ue(_t,L(ut,Ct-1,Ut-1),L(ut,Ct-1,Ut),L(ut,Ct,Ut-1),L(ut,Ct,Ut),Je,Ae,(ut+Ct+Ut)%2,Le&&Le[Ze]?Le[Ze]:[])),Ze++;return Ue}function rt(_t,Oe,Je,Ae,Le){for(var Ue=[],Ze=0,st=0;st<Oe.length;st++)for(var ut=Oe[st],Ut=1;Ut<u;Ut++)for(var Ct=1;Ct<m;Ct++)Ue.push(ue(_t,L(Ut-1,ut,Ct-1),L(Ut,ut,Ct-1),L(Ut-1,ut,Ct),L(Ut,ut,Ct),Je,Ae,(Ut+ut+Ct)%2,Le&&Le[Ze]?Le[Ze]:[])),Ze++;return Ue}function Ke(_t,Oe,Je,Ae,Le){for(var Ue=[],Ze=0,st=0;st<Oe.length;st++)for(var ut=Oe[st],Ut=1;Ut<y;Ut++)for(var Ct=1;Ct<u;Ct++)Ue.push(ue(_t,L(Ct-1,Ut-1,ut),L(Ct-1,Ut,ut),L(Ct,Ut-1,ut),L(Ct,Ut,ut),Je,Ae,(Ct+Ut+ut)%2,Le&&Le[Ze]?Le[Ze]:[])),Ze++;return Ue}function Mt(_t,Oe,Je){for(var Ae=1;Ae<m;Ae++)for(var Le=1;Le<y;Le++)for(var Ue=1;Ue<u;Ue++)Ce(_t,L(Ue-1,Le-1,Ae-1),L(Ue-1,Le-1,Ae),L(Ue-1,Le,Ae-1),L(Ue-1,Le,Ae),L(Ue,Le-1,Ae-1),L(Ue,Le-1,Ae),L(Ue,Le,Ae-1),L(Ue,Le,Ae),Oe,Je,(Ue+Le+Ae)%2)}function kt(_t,Oe,Je){_=!0,Mt(_t,Oe,Je),_=!1}function Nt(_t,Oe,Je){l=!0,Mt(_t,Oe,Je),l=!1}function Gt(_t,Oe,Je,Ae,Le,Ue){for(var Ze=[],st=0,ut=0;ut<Oe.length;ut++)for(var Ut=Oe[ut],Ct=1;Ct<m;Ct++)for(var Pt=1;Pt<y;Pt++)Ze.push(ne(_t,Ut,Pt,Ct,Je,Ae,Le[ut],Ue&&Ue[st]?Ue[st]:[])),st++;return Ze}function Mr(_t,Oe,Je,Ae,Le,Ue){for(var Ze=[],st=0,ut=0;ut<Oe.length;ut++)for(var Ut=Oe[ut],Ct=1;Ct<u;Ct++)for(var Pt=1;Pt<m;Pt++)Ze.push(ne(_t,Ct,Ut,Pt,Je,Ae,Le[ut],Ue&&Ue[st]?Ue[st]:[])),st++;return Ze}function mr(_t,Oe,Je,Ae,Le,Ue){for(var Ze=[],st=0,ut=0;ut<Oe.length;ut++)for(var Ut=Oe[ut],Ct=1;Ct<y;Ct++)for(var Pt=1;Pt<u;Pt++)Ze.push(ne(_t,Pt,Ct,Ut,Je,Ae,Le[ut],Ue&&Ue[st]?Ue[st]:[])),st++;return Ze}function qr(_t,Oe){for(var Je=[],Ae=_t;Ae<Oe;Ae++)Je.push(Ae);return Je}function Er(){for(var _t=0;_t<u;_t++)for(var Oe=0;Oe<y;Oe++)for(var Je=0;Je<m;Je++){var Ae=L(_t,Oe,Je);de(h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae])}}function Ir(){ce(),Er();var _t=null;if(v&&T&&(se(T),kt(_t,N,O)),f&&c){se(c);for(var Oe=h.surface.pattern,Je=h.surface.count,Ae=0;Ae<Je;Ae++){var Le=Je===1?.5:Ae/(Je-1),Ue=(1-Le)*N+Le*O,Ze=Math.abs(Ue-z),st=Math.abs(Ue-F),ut=Ze>st?[z,Ue]:[Ue,F];Nt(Oe,ut[0],ut[1])}}var Ut=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(Ct){for(var Pt=[],jt=0;jt<Ut.length;jt++){var fr=0,ur=Ut[jt][0],sr=Ut[jt][1],Pr=h.slices[Ct];if(Pr.show&&Pr.fill){se(Pr.fill);var Ta=[],Oa=[],Ia=[];if(Pr.locations.length)for(var qa=0;qa<Pr.locations.length;qa++){var Wa=r(Pr.locations[qa],Ct==="x"?g:Ct==="y"?b:p);Wa.distRatio===0?Ta.push(Wa.id):Wa.id>0&&(Oa.push(Wa.id),Ct==="x"?Ia.push([Wa.distRatio,0,0]):Ct==="y"?Ia.push([0,Wa.distRatio,0]):Ia.push([0,0,Wa.distRatio]))}else Ct==="x"?Ta=qr(1,u-1):Ct==="y"?Ta=qr(1,y-1):Ta=qr(1,m-1);Oa.length>0&&(Ct==="x"?Pt[fr]=Gt(_t,Oa,ur,sr,Ia,Pt[fr]):Ct==="y"?Pt[fr]=Mr(_t,Oa,ur,sr,Ia,Pt[fr]):Pt[fr]=mr(_t,Oa,ur,sr,Ia,Pt[fr]),fr++),Ta.length>0&&(Ct==="x"?Pt[fr]=Ye(_t,Ta,ur,sr,Pt[fr]):Ct==="y"?Pt[fr]=rt(_t,Ta,ur,sr,Pt[fr]):Pt[fr]=Ke(_t,Ta,ur,sr,Pt[fr]),fr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(se(Ca.fill),Ct==="x"?Pt[fr]=Ye(_t,[0,u-1],ur,sr,Pt[fr]):Ct==="y"?Pt[fr]=rt(_t,[0,y-1],ur,sr,Pt[fr]):Pt[fr]=Ke(_t,[0,m-1],ur,sr,Pt[fr]),fr++)}}),w===0&&ce(),h._meshX=P,h._meshY=U,h._meshZ=B,h._meshIntensity=X,h._Xs=g,h._Ys=b,h._Zs=p}return Ir(),h}function s(h,f){var v=h.glplot.gl,c=d({gl:v}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}V.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),fU=He({"src/traces/isosurface/index.js"(Z,V){"use strict";V.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),hU=He({"lib/isosurface.js"(Z,V){"use strict";V.exports=fU()}}),CE=He({"src/traces/volume/attributes.js"(Z,V){"use strict";var d=ku(),x=tT(),S=gx(),E=ru(),e=Qo().extendFlat,t=pc().overrideAll,r=V.exports=t(e({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:S.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:e({},E.hoverinfo),showlegend:e({},E.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),pU=He({"src/traces/volume/defaults.js"(Z,V){"use strict";var d=sa(),x=CE(),S=EE().supplyIsoDefaults,E=ME().opacityscaleDefaults;V.exports=function(t,r,o,a){function n(i,s){return d.coerce(t,r,x,i,s)}S(t,r,o,a,n),E(t,r,a,n)}}}),dU=He({"src/traces/volume/convert.js"(Z,V){"use strict";var d=Yh().gl_mesh3d,x=tm().parseColorScale,S=sa().isArrayOrTypedArray,E=em(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,h,f){this.scene=s,this.uid=f,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],v=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,_=r(f,this.data._Xs).id,w=r(v,this.data._Ys).id,A=r(c,this.data._Zs).id,M=s.index=A+l*w+l*T*_;s.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var g=this.data.hovertext||this.data.text;return S(g)&&g[M]!==void 0?s.textLabel=g[M]:g&&(s.textLabel=g),!0}},n.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function v(w,A,M,g){return A.map(function(b){return w.d2l(b,0,g)*M})}var c=t(v(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),v(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),v(f.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:c,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:E(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},_=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[_.min,_.max],l.colormap=x(s),this.mesh.update(l)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,h){var f=s.glplot.gl,v=d({gl:f}),c=new a(s,v,h.uid);return v._trace=c,c.update(h),s.glplot.add(v),c}V.exports=i}}),vU=He({"src/traces/volume/index.js"(Z,V){"use strict";V.exports={attributes:CE(),supplyDefaults:pU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:dU(),moduleType:"trace",name:"volume",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),mU=He({"lib/volume.js"(Z,V){"use strict";V.exports=vU()}}),gU=He({"src/traces/mesh3d/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=_h(),E=M1();V.exports=function(t,r,o,a){function n(v,c){return x.coerce(t,r,E,v,c)}function i(v){var c=v.map(function(T){var l=n(T);return l&&x.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}var s=i(["x","y","z"]);if(!s){r.visible=!1;return}if(i(["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 h=d.getComponentMethod("calendars","handleTraceDefaults");h(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(v){n(v)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),S(t,r,a,n,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",o)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),r._length=null}}}),yU=He({"src/traces/mesh3d/calc.js"(Z,V){"use strict";var d=Tp();V.exports=function(S,E){E.intensity&&d(S,E,{vals:E.intensity,containerStr:"",cLetter:"c"})}}}),_U=He({"src/traces/mesh3d/convert.js"(Z,V){"use strict";var d=Yh().gl_mesh3d,x=Yh().delaunay_triangulate,S=Yh().alpha_shape,E=Yh().convex_hull,e=tm().parseColorScale,t=sa().isArrayOrTypedArray,r=em(),o=rc().extractOpts,a=E1();function n(l,_,w){this.scene=l,this.uid=w,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=n.prototype;i.handlePick=function(l){if(l.object===this.mesh){var _=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var w=this.data.hovertext||this.data.text;return t(w)&&w[_]!==void 0?l.textLabel=w[_]:w&&(l.textLabel=w),!0}};function s(l){for(var _=[],w=l.length,A=0;A<w;A++)_[A]=r(l[A]);return _}function h(l,_,w,A){for(var M=[],g=_.length,b=0;b<g;b++)M[b]=l.d2l(_[b],0,A)*w;return M}function f(l){for(var _=[],w=l.length,A=0;A<w;A++)_[A]=Math.round(l[A]);return _}function v(l,_){for(var w=["x","y","z"].indexOf(l),A=[],M=_.length,g=0;g<M;g++)A[g]=[_[g][(w+1)%3],_[g][(w+2)%3]];return x(A)}function c(l,_){for(var w=l.length,A=0;A<w;A++)if(l[A]<=-.5||l[A]>=_-.5)return!1;return!0}i.update=function(l){var _=this.scene,w=_.fullSceneLayout;this.data=l;var A=l.x.length,M=a(h(w.xaxis,l.x,_.dataScale[0],l.xcalendar),h(w.yaxis,l.y,_.dataScale[1],l.ycalendar),h(w.zaxis,l.z,_.dataScale[2],l.zcalendar)),g;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!c(l.i,A)||!c(l.j,A)||!c(l.k,A))return;g=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?g=E(M):l.alphahull>0?g=S(l.alphahull,M):g=v(l.delaunayaxis,M);var b={positions:M,cells:g,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:r(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading};if(l.intensity){var p=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[p.min,p.max],b.colormap=e(l)}else l.vertexcolor?(this.color=l.vertexcolor[0],b.vertexColors=s(l.vertexcolor)):l.facecolor?(this.color=l.facecolor[0],b.cellColors=s(l.facecolor)):(this.color=l.color,b.meshColor=r(l.color));this.mesh.update(b)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,_){var w=l.glplot.gl,A=d({gl:w}),M=new n(l,A,_.uid);return A._trace=M,M.update(_),l.glplot.add(A),M}V.exports=T}}),xU=He({"src/traces/mesh3d/index.js"(Z,V){"use strict";V.exports={attributes:M1(),supplyDefaults:gU(),calc:yU(),colorbar:{min:"cmin",max:"cmax"},plot:_U(),moduleType:"trace",name:"mesh3d",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),bU=He({"lib/mesh3d.js"(Z,V){"use strict";V.exports=xU()}}),LE=He({"src/traces/cone/attributes.js"(Z,V){"use strict";var d=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=M1(),t=ru(),r=Qo().extendFlat,o={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:S({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:E({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(n){o[n]=e[n]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=o}}),wU=He({"src/traces/cone/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=LE();V.exports=function(e,t,r,o){function a(T,l){return d.coerce(e,t,S,T,l)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),f=a("y"),v=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!f||!f.length||!v||!v.length){t.visible=!1;return}var c=a("sizemode");a("sizeref",c==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),TU=He({"src/traces/cone/calc.js"(Z,V){"use strict";var d=Tp();V.exports=function(S,E){for(var e=E.u,t=E.v,r=E.w,o=Math.min(E.x.length,E.y.length,E.z.length,e.length,t.length,r.length),a=-1/0,n=1/0,i=0;i<o;i++){var s=e[i],h=t[i],f=r[i],v=Math.sqrt(s*s+h*h+f*f);a=Math.max(a,v),n=Math.min(n,v)}E._len=o,E._normMax=a,d(S,E,{vals:[n,a],containerStr:"",cLetter:"c"})}}}),AU=He({"src/traces/cone/convert.js"(Z,V){"use strict";var d=Yh().gl_cone3d,x=Yh().gl_cone3d.createConeMesh,S=sa().simpleMap,E=tm().parseColorScale,e=rc().extractOpts,t=sa().isArrayOrTypedArray,r=E1();function o(v,c){this.scene=v,this.uid=c,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(v){if(v.object===this.mesh){var c=v.index=v.data.index,T=this.data.x[c],l=this.data.y[c],_=this.data.z[c],w=this.data.u[c],A=this.data.v[c],M=this.data.w[c];v.traceCoordinate=[T,l,_,w,A,M,Math.sqrt(w*w+A*A+M*M)];var g=this.data.hovertext||this.data.text;return t(g)&&g[c]!==void 0?v.textLabel=g[c]:g&&(v.textLabel=g),!0}};var n={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},s={tip:1,tail:1,cm:.75,center:.5};function h(v,c){var T=v.fullSceneLayout,l=v.dataScale,_={};function w(p,u){var y=T[u],m=l[n[u]];return S(p,function(R){return y.d2l(R)*m})}_.vectors=r(w(c.u,"xaxis"),w(c.v,"yaxis"),w(c.w,"zaxis"),c._len),_.positions=r(w(c.x,"xaxis"),w(c.y,"yaxis"),w(c.z,"zaxis"),c._len);var A=e(c);_.colormap=E(c),_.vertexIntensityBounds=[A.min/c._normMax,A.max/c._normMax],_.coneOffset=i[c.anchor];var M=c.sizemode;M==="scaled"?_.coneSize=c.sizeref||.5:M==="absolute"?_.coneSize=c.sizeref&&c._normMax?c.sizeref/c._normMax:.5:M==="raw"&&(_.coneSize=c.sizeref),_.coneSizemode=M;var g=d(_),b=c.lightposition;return g.lightPosition=[b.x,b.y,b.z],g.ambient=c.lighting.ambient,g.diffuse=c.lighting.diffuse,g.specular=c.lighting.specular,g.roughness=c.lighting.roughness,g.fresnel=c.lighting.fresnel,g.opacity=c.opacity,c._pad=s[c.anchor]*g.vectorScale*g.coneScale*c._normMax,g}a.update=function(v){this.data=v;var c=h(this.scene,v);this.mesh.update(c)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function f(v,c){var T=v.glplot.gl,l=h(v,c),_=x(T,l),w=new o(v,c.uid);return w.mesh=_,w.data=c,_._trace=w,v.glplot.add(_),w}V.exports=f}}),SU=He({"src/traces/cone/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"cone",basePlotModule:v0(),categories:["gl3d","showLegend"],attributes:LE(),supplyDefaults:wU(),colorbar:{min:"cmin",max:"cmax"},calc:TU(),plot:AU(),eventData:function(d,x){return d.norm=x.traceCoordinate[6],d},meta:{}}}}),MU=He({"lib/cone.js"(Z,V){"use strict";V.exports=SU()}}),PE=He({"src/traces/streamtube/attributes.js"(Z,V){"use strict";var d=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=M1(),t=ru(),r=Qo().extendFlat,o={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:S({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:E({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(n){o[n]=e[n]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=o}}),EU=He({"src/traces/streamtube/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=PE();V.exports=function(e,t,r,o){function a(c,T){return d.coerce(e,t,S,c,T)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),f=a("y"),v=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!f||!f.length||!v||!v.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),kU=He({"src/traces/streamtube/convert.js"(Z,V){"use strict";var d=Yh().gl_streamtube3d,x=d.createTubeMesh,S=sa(),E=tm().parseColorScale,e=rc().extractOpts,t=E1(),r={xaxis:0,yaxis:1,zaxis:2};function o(f,v){this.scene=f,this.uid=v,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(f){var v=this.scene.fullSceneLayout,c=this.scene.dataScale;function T(w,A){var M=v[A],g=c[r[A]];return M.l2c(w)/g}if(f.object===this.mesh){var l=f.data.position,_=f.data.velocity;return f.traceCoordinate=[T(l[0],"xaxis"),T(l[1],"yaxis"),T(l[2],"zaxis"),T(_[0],"xaxis"),T(_[1],"yaxis"),T(_[2],"zaxis"),f.data.intensity*this.data._normMax,f.data.divergence],f.textLabel=this.data.hovertext||this.data.text,!0}};function n(f){var v=f.length,c;return v>2?c=f.slice(1,v-1):v===2?c=[(f[0]+f[1])/2]:c=f,c}function i(f){var v=f.length;return v===1?[.5,.5]:[f[1]-f[0],f[v-1]-f[v-2]]}function s(f,v){var c=f.fullSceneLayout,T=f.dataScale,l=v._len,_={};function w(de,G){var Y=c[G],ee=T[r[G]];return S.simpleMap(de,function(q){return Y.d2l(q)*ee})}if(_.vectors=t(w(v._u,"xaxis"),w(v._v,"yaxis"),w(v._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(v._Xs,"xaxis"),M=w(v._Ys,"yaxis"),g=w(v._Zs,"zaxis");_.meshgrid=[A,M,g],_.gridFill=v._gridFill;var b=v._slen;if(b)_.startingPositions=t(w(v._startsX,"xaxis"),w(v._startsY,"yaxis"),w(v._startsZ,"zaxis"));else{for(var p=M[0],u=n(A),y=n(g),m=new Array(u.length*y.length),R=0,L=0;L<u.length;L++)for(var z=0;z<y.length;z++)m[R++]=[u[L],p,y[z]];_.startingPositions=m}_.colormap=E(v),_.tubeSize=v.sizeref,_.maxLength=v.maxdisplayed;var F=w(v._xbnds,"xaxis"),N=w(v._ybnds,"yaxis"),O=w(v._zbnds,"zaxis"),P=i(A),U=i(M),B=i(g),X=[[F[0]-P[0],N[0]-U[0],O[0]-B[0]],[F[1]+P[1],N[1]+U[1],O[1]+B[1]]],$=d(_,X),le=e(v);$.vertexIntensityBounds=[le.min/v._normMax,le.max/v._normMax];var ce=v.lightposition;return $.lightPosition=[ce.x,ce.y,ce.z],$.ambient=v.lighting.ambient,$.diffuse=v.lighting.diffuse,$.specular=v.lighting.specular,$.roughness=v.lighting.roughness,$.fresnel=v.lighting.fresnel,$.opacity=v.opacity,v._pad=$.tubeScale*v.sizeref*2,$}a.update=function(f){this.data=f;var v=s(this.scene,f);this.mesh.update(v)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(f,v){var c=f.glplot.gl,T=s(f,v),l=x(c,T),_=new o(f,v.uid);return _.mesh=l,_.data=v,l._trace=_,f.glplot.add(l),_}V.exports=h}}),CU=He({"src/traces/streamtube/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"streamtube",basePlotModule:v0(),categories:["gl3d","showLegend"],attributes:PE(),supplyDefaults:EU(),colorbar:{min:"cmin",max:"cmax"},calc:rT().calc,plot:kU(),eventData:function(d,x){return d.tubex=d.x,d.tubey=d.y,d.tubez=d.z,d.tubeu=x.traceCoordinate[3],d.tubev=x.traceCoordinate[4],d.tubew=x.traceCoordinate[5],d.norm=x.traceCoordinate[6],d.divergence=x.traceCoordinate[7],delete d.x,delete d.y,delete d.z,d},meta:{}}}}),LU=He({"lib/streamtube.js"(Z,V){"use strict";V.exports=CU()}}),vg=He({"src/traces/scattergeo/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=af(),t=ru(),r=ku(),o=Gh().dash,a=Qo().extendFlat,n=pc().overrideAll,i=e.marker,s=e.line,h=i.line,f=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");V.exports=n({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({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),textfont:e.textfont,textposition:e.textposition,line:{color:s.color,width:s.width,dash:o},connectgaps:e.connectgaps,marker:a({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:a({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:a({width:h.width,dash:h.dash},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:E(),selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:d(),hovertemplatefallback:S()},"calc","nested")}}),PU=He({"src/traces/scattergeo/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=vg(),o=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");V.exports=function(n,i,s,h){function f(M,g){return d.coerce(n,i,r,M,g)}var v=f("locations"),c;if(v&&v.length){var T=f("geojson"),l;(typeof T=="string"&&T!==""||d.isPlainObject(T))&&(l="geojson-id");var _=f("locationmode",l);_==="country names"&&d.warn(o),_==="geojson-id"&&f("featureidkey"),c=v.length}else{var w=f("lon")||[],A=f("lat")||[];c=Math.min(w.length,A.length)}if(!c){i.visible=!1;return}i._length=c,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),x.hasMarkers(i)&&S(n,i,s,h,f,{gradient:!0}),x.hasLines(i)&&(E(n,i,s,h,f),f("connectgaps")),x.hasText(i)&&(f("texttemplate"),f("texttemplatefallback"),e(n,i,h,f)),f("fill"),i.fill!=="none"&&t(n,i,s,f),d.coerceSelectionMarkerOpacity(i,f)}}}),IU=He({"src/traces/scattergeo/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.geo]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),iT=He({"src/traces/scattergeo/calc.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=Fd(),E=Av(),e=Od(),t=sa().isArrayOrTypedArray,r=sa()._;function o(a){return a&&typeof a=="string"}V.exports=function(n,i){var s=t(i.locations),h=s?i.locations.length:i._length,f=new Array(h),v;i.geojson?v=function(A){return o(A)||d(A)}:v=o;for(var c=0;c<h;c++){var T=f[c]={};if(s){var l=i.locations[c];T.loc=v(l)?l:null}else{var _=i.lon[c],w=i.lat[c];d(_)&&d(w)?T.lonlat=[+_,+w]:T.lonlat=[x,x]}}return E(f,i),S(n,i),e(f,i),h&&(f[0].t={labels:{lat:r(n,"lat:")+" ",lon:r(n,"lon:")+" "}}),f}}}),yx=He({"src/plots/geo/constants.js"(Z){"use strict";Z.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"},Z.axesNames=["lonaxis","lataxis"],Z.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Z.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Z.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]}},Z.clipPad=.001,Z.precision=.1,Z.landColor="#F0DC82",Z.waterColor="#3399FF",Z.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Z.sphereSVG={type:"Sphere"},Z.fillLayers={ocean:1,land:1,lakes:1},Z.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Z.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Z.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Z.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}}),IE=He({"node_modules/topojson-client/dist/topojson-client.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.topojson=d.topojson||{}))})(Z,function(d){"use strict";function x(w){return w}function S(w){if(w==null)return x;var A,M,g=w.scale[0],b=w.scale[1],p=w.translate[0],u=w.translate[1];return function(y,m){m||(A=M=0);var R=2,L=y.length,z=new Array(L);for(z[0]=(A+=y[0])*g+p,z[1]=(M+=y[1])*b+u;R<L;)z[R]=y[R],++R;return z}}function E(w){var A=S(w.transform),M,g=1/0,b=g,p=-g,u=-g;function y(R){R=A(R),R[0]<g&&(g=R[0]),R[0]>p&&(p=R[0]),R[1]<b&&(b=R[1]),R[1]>u&&(u=R[1])}function m(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(m);break;case"Point":y(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(y);break}}w.arcs.forEach(function(R){for(var L=-1,z=R.length,F;++L<z;)F=A(R[L],L),F[0]<g&&(g=F[0]),F[0]>p&&(p=F[0]),F[1]<b&&(b=F[1]),F[1]>u&&(u=F[1])});for(M in w.objects)m(w.objects[M]);return[g,b,p,u]}function e(w,A){for(var M,g=w.length,b=g-A;b<--g;)M=w[b],w[b++]=w[g],w[g]=M}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(M){return r(w,M)})}:r(w,A)}function r(w,A){var M=A.id,g=A.bbox,b=A.properties==null?{}:A.properties,p=o(w,A);return M==null&&g==null?{type:"Feature",properties:b,geometry:p}:g==null?{type:"Feature",id:M,properties:b,geometry:p}:{type:"Feature",id:M,bbox:g,properties:b,geometry:p}}function o(w,A){var M=S(w.transform),g=w.arcs;function b(L,z){z.length&&z.pop();for(var F=g[L<0?~L:L],N=0,O=F.length;N<O;++N)z.push(M(F[N],N));L<0&&e(z,O)}function p(L){return M(L)}function u(L){for(var z=[],F=0,N=L.length;F<N;++F)b(L[F],z);return z.length<2&&z.push(z[0]),z}function y(L){for(var z=u(L);z.length<4;)z.push(z[0]);return z}function m(L){return L.map(y)}function R(L){var z=L.type,F;switch(z){case"GeometryCollection":return{type:z,geometries:L.geometries.map(R)};case"Point":F=p(L.coordinates);break;case"MultiPoint":F=L.coordinates.map(p);break;case"LineString":F=u(L.arcs);break;case"MultiLineString":F=L.arcs.map(u);break;case"Polygon":F=m(L.arcs);break;case"MultiPolygon":F=L.arcs.map(m);break;default:return null}return{type:z,coordinates:F}}return R(A)}function a(w,A){var M={},g={},b={},p=[],u=-1;A.forEach(function(R,L){var z=w.arcs[R<0?~R:R],F;z.length<3&&!z[1][0]&&!z[1][1]&&(F=A[++u],A[u]=R,A[L]=F)}),A.forEach(function(R){var L=y(R),z=L[0],F=L[1],N,O;if(N=b[z])if(delete b[N.end],N.push(R),N.end=F,O=g[F]){delete g[O.start];var P=O===N?N:N.concat(O);g[P.start=N.start]=b[P.end=O.end]=P}else g[N.start]=b[N.end]=N;else if(N=g[F])if(delete g[N.start],N.unshift(R),N.start=z,O=b[z]){delete b[O.end];var U=O===N?N:O.concat(N);g[U.start=O.start]=b[U.end=N.end]=U}else g[N.start]=b[N.end]=N;else N=[R],g[N.start=z]=b[N.end=F]=N});function y(R){var L=w.arcs[R<0?~R:R],z=L[0],F;return w.transform?(F=[0,0],L.forEach(function(N){F[0]+=N[0],F[1]+=N[1]})):F=L[L.length-1],R<0?[F,z]:[z,F]}function m(R,L){for(var z in R){var F=R[z];delete L[F.start],delete F.start,delete F.end,F.forEach(function(N){M[N<0?~N:N]=1}),p.push(F)}}return m(b,g),m(g,b),A.forEach(function(R){M[R<0?~R:R]||p.push([R])}),p}function n(w){return o(w,i.apply(this,arguments))}function i(w,A,M){var g,b,p;if(arguments.length>1)g=s(w,A,M);else for(b=0,g=new Array(p=w.arcs.length);b<p;++b)g[b]=b;return{type:"MultiLineString",arcs:a(w,g)}}function s(w,A,M){var g=[],b=[],p;function u(z){var F=z<0?~z:z;(b[F]||(b[F]=[])).push({i:z,g:p})}function y(z){z.forEach(u)}function m(z){z.forEach(y)}function R(z){z.forEach(m)}function L(z){switch(p=z,z.type){case"GeometryCollection":z.geometries.forEach(L);break;case"LineString":y(z.arcs);break;case"MultiLineString":case"Polygon":m(z.arcs);break;case"MultiPolygon":R(z.arcs);break}}return L(A),b.forEach(M==null?function(z){g.push(z[0].i)}:function(z){M(z[0].g,z[z.length-1].g)&&g.push(z[0].i)}),g}function h(w){for(var A=-1,M=w.length,g,b=w[M-1],p=0;++A<M;)g=b,b=w[A],p+=g[0]*b[1]-g[1]*b[0];return Math.abs(p)}function f(w){return o(w,v.apply(this,arguments))}function v(w,A){var M={},g=[],b=[];A.forEach(p);function p(m){switch(m.type){case"GeometryCollection":m.geometries.forEach(p);break;case"Polygon":u(m.arcs);break;case"MultiPolygon":m.arcs.forEach(u);break}}function u(m){m.forEach(function(R){R.forEach(function(L){(M[L=L<0?~L:L]||(M[L]=[])).push(m)})}),g.push(m)}function y(m){return h(o(w,{type:"Polygon",arcs:[m]}).coordinates[0])}return g.forEach(function(m){if(!m._){var R=[],L=[m];for(m._=1,b.push(R);m=L.pop();)R.push(m),m.forEach(function(z){z.forEach(function(F){M[F<0?~F:F].forEach(function(N){N._||(N._=1,L.push(N))})})})}}),g.forEach(function(m){delete m._}),{type:"MultiPolygon",arcs:b.map(function(m){var R=[],L;if(m.forEach(function(P){P.forEach(function(U){U.forEach(function(B){M[B<0?~B:B].length<2&&R.push(B)})})}),R=a(w,R),(L=R.length)>1)for(var z=1,F=y(R[0]),N,O;z<L;++z)(N=y(R[z]))>F&&(O=R[0],R[0]=R[z],R[z]=O,F=N);return R}).filter(function(m){return m.length>0})}}function c(w,A){for(var M=0,g=w.length;M<g;){var b=M+g>>>1;w[b]<A?M=b+1:g=b}return M}function T(w){var A={},M=w.map(function(){return[]});function g(P,U){P.forEach(function(B){B<0&&(B=~B);var X=A[B];X?X.push(U):A[B]=[U]})}function b(P,U){P.forEach(function(B){g(B,U)})}function p(P,U){P.type==="GeometryCollection"?P.geometries.forEach(function(B){p(B,U)}):P.type in u&&u[P.type](P.arcs,U)}var u={LineString:g,MultiLineString:b,Polygon:b,MultiPolygon:function(P,U){P.forEach(function(B){b(B,U)})}};w.forEach(p);for(var y in A)for(var m=A[y],R=m.length,L=0;L<R;++L)for(var z=L+1;z<R;++z){var F=m[L],N=m[z],O;(O=M[F])[y=c(O,N)]!==N&&O.splice(y,0,N),(O=M[N])[y=c(O,F)]!==F&&O.splice(y,0,F)}return M}function l(w){if(w==null)return x;var A,M,g=w.scale[0],b=w.scale[1],p=w.translate[0],u=w.translate[1];return function(y,m){m||(A=M=0);var R=2,L=y.length,z=new Array(L),F=Math.round((y[0]-p)/g),N=Math.round((y[1]-u)/b);for(z[0]=F-A,A=F,z[1]=N-M,M=N;R<L;)z[R]=y[R],++R;return z}}function _(w,A){if(w.transform)throw new Error("already quantized");if(!A||!A.scale){if(!((u=Math.floor(A))>=2))throw new Error("n must be \u22652");m=w.bbox||E(w);var M=m[0],g=m[1],b=m[2],p=m[3],u;A={scale:[b-M?(b-M)/(u-1):1,p-g?(p-g)/(u-1):1],translate:[M,g]}}else m=w.bbox;var y=l(A),m,R,L=w.objects,z={};function F(P){return y(P)}function N(P){var U;switch(P.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:P.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(P.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:P.coordinates.map(F)};break;default:return P}return P.id!=null&&(U.id=P.id),P.bbox!=null&&(U.bbox=P.bbox),P.properties!=null&&(U.properties=P.properties),U}function O(P){var U=0,B=1,X=P.length,$,le=new Array(X);for(le[0]=y(P[0],0);++U<X;)(($=y(P[U],U))[0]||$[1])&&(le[B++]=$);return B===1&&(le[B++]=[0,0]),le.length=B,le}for(R in L)z[R]=N(L[R]);return{type:"Topology",bbox:m,transform:A,objects:z,arcs:w.arcs.map(O)}}d.bbox=E,d.feature=t,d.merge=f,d.mergeArcs=v,d.mesh=n,d.meshArcs=i,d.neighbors=T,d.quantize=_,d.transform=S,d.untransform=l,Object.defineProperty(d,"__esModule",{value:!0})})}}),nT=He({"src/lib/topojson_utils.js"(Z,V){"use strict";var d=V.exports={},x=yx().locationmodeToLayer,S=IE().feature;d.getTopojsonName=function(E){return[E.scope.replace(/ /g,"-"),"_",E.resolution.toString(),"m"].join("")},d.getTopojsonPath=function(E,e){return E+=E.endsWith("/")?"":"/",`${E}${e}.json`},d.getTopojsonFeatures=function(E,e){var t=x[E.locationmode],r=e.objects[t];return S(e,r).features}}}),m0=He({"src/lib/geojson_utils.js"(Z){"use strict";var V=Ws().BADNUM;Z.calcTraceToLineCoords=function(d){for(var x=d[0].trace,S=x.connectgaps,E=[],e=[],t=0;t<d.length;t++){var r=d[t],o=r.lonlat;o[0]!==V?e.push(o):!S&&e.length>0&&(E.push(e),e=[])}return e.length>0&&E.push(e),E},Z.makeLine=function(d){return d.length===1?{type:"LineString",coordinates:d[0]}:{type:"MultiLineString",coordinates:d}},Z.makePolygon=function(d){if(d.length===1)return{type:"Polygon",coordinates:d};for(var x=new Array(d.length),S=0;S<d.length;S++)x[S]=[d[S]];return{type:"MultiPolygon",coordinates:x}},Z.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),RU=He({"node_modules/country-regex/index.js"(Z,V){V.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}}),oT=He({"node_modules/@turf/helpers/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=63710088e-1,d={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},x={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 S(L,z,F={}){let N={type:"Feature"};return(F.id===0||F.id)&&(N.id=F.id),F.bbox&&(N.bbox=F.bbox),N.properties=z||{},N.geometry=L,N}function E(L,z,F={}){switch(L){case"Point":return e(z).geometry;case"LineString":return a(z).geometry;case"Polygon":return r(z).geometry;case"MultiPoint":return h(z).geometry;case"MultiLineString":return s(z).geometry;case"MultiPolygon":return f(z).geometry;default:throw new Error(L+" is invalid")}}function e(L,z,F={}){if(!L)throw new Error("coordinates is required");if(!Array.isArray(L))throw new Error("coordinates must be an Array");if(L.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(L[0])||!u(L[1]))throw new Error("coordinates must contain numbers");return S({type:"Point",coordinates:L},z,F)}function t(L,z,F={}){return i(L.map(N=>e(N,z)),F)}function r(L,z,F={}){for(let O of L){if(O.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(O[O.length-1].length!==O[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;P<O[O.length-1].length;P++)if(O[O.length-1][P]!==O[0][P])throw new Error("First and last Position are not equivalent.")}return S({type:"Polygon",coordinates:L},z,F)}function o(L,z,F={}){return i(L.map(N=>r(N,z)),F)}function a(L,z,F={}){if(L.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:L},z,F)}function n(L,z,F={}){return i(L.map(N=>a(N,z)),F)}function i(L,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=L,F}function s(L,z,F={}){return S({type:"MultiLineString",coordinates:L},z,F)}function h(L,z,F={}){return S({type:"MultiPoint",coordinates:L},z,F)}function f(L,z,F={}){return S({type:"MultiPolygon",coordinates:L},z,F)}function v(L,z,F={}){return S({type:"GeometryCollection",geometries:L},z,F)}function c(L,z=0){if(z&&!(z>=0))throw new Error("precision must be a positive number");let F=Math.pow(10,z||0);return Math.round(L*F)/F}function T(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L*F}function l(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L/F}function _(L,z){return M(l(L,z))}function w(L){let z=L%360;return z<0&&(z+=360),z}function A(L){return L=L%360,L>180?L-360:L<-180?L+360:L}function M(L){return L%(2*Math.PI)*180/Math.PI}function g(L){return L%360*Math.PI/180}function b(L,z="kilometers",F="kilometers"){if(!(L>=0))throw new Error("length must be a positive number");return T(l(L,z),F)}function p(L,z="meters",F="kilometers"){if(!(L>=0))throw new Error("area must be a positive number");let N=x[z];if(!N)throw new Error("invalid original units");let O=x[F];if(!O)throw new Error("invalid final units");return L/N*O}function u(L){return!isNaN(L)&&L!==null&&!Array.isArray(L)}function y(L){return L!==null&&typeof L=="object"&&!Array.isArray(L)}function m(L){if(!L)throw new Error("bbox is required");if(!Array.isArray(L))throw new Error("bbox must be an Array");if(L.length!==4&&L.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");L.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function R(L){if(!L)throw new Error("id is required");if(["string","number"].indexOf(typeof L)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=x,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=p,Z.convertLength=b,Z.degreesToRadians=g,Z.earthRadius=V,Z.factors=d,Z.feature=S,Z.featureCollection=i,Z.geometry=E,Z.geometryCollection=v,Z.isNumber=u,Z.isObject=y,Z.lengthToDegrees=_,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=n,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=M,Z.radiansToLength=T,Z.round=c,Z.validateBBox=m,Z.validateId=R}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=oT();function d(l,_,w){if(l!==null)for(var A,M,g,b,p,u,y,m=0,R=0,L,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,P=0;P<O;P++){y=F?l.features[P].geometry:N?l.geometry:l,L=y?y.type==="GeometryCollection":!1,p=L?y.geometries.length:1;for(var U=0;U<p;U++){var B=0,X=0;if(b=L?y.geometries[U]:y,b!==null){u=b.coordinates;var $=b.type;switch(m=w&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(_(u,R,P,B,X)===!1)return!1;R++,B++;break;case"LineString":case"MultiPoint":for(A=0;A<u.length;A++){if(_(u[A],R,P,B,X)===!1)return!1;R++,$==="MultiPoint"&&B++}$==="LineString"&&B++;break;case"Polygon":case"MultiLineString":for(A=0;A<u.length;A++){for(M=0;M<u[A].length-m;M++){if(_(u[A][M],R,P,B,X)===!1)return!1;R++}$==="MultiLineString"&&B++,$==="Polygon"&&X++}$==="Polygon"&&B++;break;case"MultiPolygon":for(A=0;A<u.length;A++){for(X=0,M=0;M<u[A].length;M++){for(g=0;g<u[A][M].length-m;g++){if(_(u[A][M][g],R,P,B,X)===!1)return!1;R++}X++}B++}break;case"GeometryCollection":for(A=0;A<b.geometries.length;A++)if(d(b.geometries[A],_,w)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function x(l,_,w,A){var M=w;return d(l,function(g,b,p,u,y){b===0&&w===void 0?M=g:M=_(M,g,b,p,u,y)},A),M}function S(l,_){var w;switch(l.type){case"FeatureCollection":for(w=0;w<l.features.length&&_(l.features[w].properties,w)!==!1;w++);break;case"Feature":_(l.properties,0);break}}function E(l,_,w){var A=w;return S(l,function(M,g){g===0&&w===void 0?A=M:A=_(A,M,g)}),A}function e(l,_){if(l.type==="Feature")_(l,0);else if(l.type==="FeatureCollection")for(var w=0;w<l.features.length&&_(l.features[w],w)!==!1;w++);}function t(l,_,w){var A=w;return e(l,function(M,g){g===0&&w===void 0?A=M:A=_(A,M,g)}),A}function r(l){var _=[];return d(l,function(w){_.push(w)}),_}function o(l,_){var w,A,M,g,b,p,u,y,m,R,L=0,z=l.type==="FeatureCollection",F=l.type==="Feature",N=z?l.features.length:1;for(w=0;w<N;w++){for(p=z?l.features[w].geometry:F?l.geometry:l,y=z?l.features[w].properties:F?l.properties:{},m=z?l.features[w].bbox:F?l.bbox:void 0,R=z?l.features[w].id:F?l.id:void 0,u=p?p.type==="GeometryCollection":!1,b=u?p.geometries.length:1,M=0;M<b;M++){if(g=u?p.geometries[M]:p,g===null){if(_(null,L,y,m,R)===!1)return!1;continue}switch(g.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(g,L,y,m,R)===!1)return!1;break}case"GeometryCollection":{for(A=0;A<g.geometries.length;A++)if(_(g.geometries[A],L,y,m,R)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}L++}}function a(l,_,w){var A=w;return o(l,function(M,g,b,p,u){g===0&&w===void 0?A=M:A=_(A,M,g,b,p,u)}),A}function n(l,_){o(l,function(w,A,M,g,b){var p=w===null?null:w.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return _(V.feature.call(void 0,w,M,{bbox:g,id:b}),A,0)===!1?!1:void 0}var u;switch(p){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var y=0;y<w.coordinates.length;y++){var m=w.coordinates[y],R={type:u,coordinates:m};if(_(V.feature.call(void 0,R,M),A,y)===!1)return!1}})}function i(l,_,w){var A=w;return n(l,function(M,g,b){g===0&&b===0&&w===void 0?A=M:A=_(A,M,g,b)}),A}function s(l,_){n(l,function(w,A,M){var g=0;if(w.geometry){var b=w.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var p,u=0,y=0,m=0;if(d(w,function(R,L,z,F,N){if(p===void 0||A>u||F>y||N>m){p=R,u=A,y=F,m=N,g=0;return}var O=V.lineString.call(void 0,[p,R],w.properties);if(_(O,A,M,N,g)===!1)return!1;g++,p=R})===!1)return!1}}})}function h(l,_,w){var A=w,M=!1;return s(l,function(g,b,p,u,y){M===!1&&w===void 0?A=g:A=_(A,g,b,p,u,y),M=!0}),A}function f(l,_){if(!l)throw new Error("geojson is required");n(l,function(w,A,M){if(w.geometry!==null){var g=w.geometry.type,b=w.geometry.coordinates;switch(g){case"LineString":if(_(w,A,M,0,0)===!1)return!1;break;case"Polygon":for(var p=0;p<b.length;p++)if(_(V.lineString.call(void 0,b[p],w.properties),A,M,p)===!1)return!1;break}}})}function v(l,_,w){var A=w;return f(l,function(M,g,b,p){g===0&&w===void 0?A=M:A=_(A,M,g,b,p)}),A}function c(l,_){if(_=_||{},!V.isObject.call(void 0,_))throw new Error("options is invalid");var w=_.featureIndex||0,A=_.multiFeatureIndex||0,M=_.geometryIndex||0,g=_.segmentIndex||0,b=_.properties,p;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,p=l.features[w].geometry;break;case"Feature":b=b||l.properties,p=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=l;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var u=p.coordinates;switch(p.type){case"Point":case"MultiPoint":return null;case"LineString":return g<0&&(g=u.length+g-1),V.lineString.call(void 0,[u[g],u[g+1]],b,_);case"Polygon":return M<0&&(M=u.length+M),g<0&&(g=u[M].length+g-1),V.lineString.call(void 0,[u[M][g],u[M][g+1]],b,_);case"MultiLineString":return A<0&&(A=u.length+A),g<0&&(g=u[A].length+g-1),V.lineString.call(void 0,[u[A][g],u[A][g+1]],b,_);case"MultiPolygon":return A<0&&(A=u.length+A),M<0&&(M=u[A].length+M),g<0&&(g=u[A][M].length-g-1),V.lineString.call(void 0,[u[A][M][g],u[A][M][g+1]],b,_)}throw new Error("geojson is invalid")}function T(l,_){if(_=_||{},!V.isObject.call(void 0,_))throw new Error("options is invalid");var w=_.featureIndex||0,A=_.multiFeatureIndex||0,M=_.geometryIndex||0,g=_.coordIndex||0,b=_.properties,p;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,p=l.features[w].geometry;break;case"Feature":b=b||l.properties,p=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=l;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var u=p.coordinates;switch(p.type){case"Point":return V.point.call(void 0,u,b,_);case"MultiPoint":return A<0&&(A=u.length+A),V.point.call(void 0,u[A],b,_);case"LineString":return g<0&&(g=u.length+g),V.point.call(void 0,u[g],b,_);case"Polygon":return M<0&&(M=u.length+M),g<0&&(g=u[M].length+g),V.point.call(void 0,u[M][g],b,_);case"MultiLineString":return A<0&&(A=u.length+A),g<0&&(g=u[A].length+g),V.point.call(void 0,u[A][g],b,_);case"MultiPolygon":return A<0&&(A=u.length+A),M<0&&(M=u[A].length+M),g<0&&(g=u[A][M].length-g),V.point.call(void 0,u[A][M][g],b,_)}throw new Error("geojson is invalid")}Z.coordAll=r,Z.coordEach=d,Z.coordReduce=x,Z.featureEach=e,Z.featureReduce=t,Z.findPoint=T,Z.findSegment=c,Z.flattenEach=n,Z.flattenReduce=i,Z.geomEach=o,Z.geomReduce=a,Z.lineEach=f,Z.lineReduce=v,Z.propEach=S,Z.propReduce=E,Z.segmentEach=s,Z.segmentReduce=h}}),DU=He({"node_modules/@turf/area/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=oT(),d=sT();function x(a){return d.geomReduce.call(void 0,a,(n,i)=>n+S(i),0)}function S(a){let n=0,i;switch(a.type){case"Polygon":return E(a.coordinates);case"MultiPolygon":for(i=0;i<a.coordinates.length;i++)n+=E(a.coordinates[i]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function E(a){let n=0;if(a&&a.length>0){n+=Math.abs(r(a[0]));for(let i=1;i<a.length;i++)n-=Math.abs(r(a[i]))}return n}var e=V.earthRadius*V.earthRadius/2,t=Math.PI/180;function r(a){let n=a.length-1;if(n<=2)return 0;let i=0,s=0;for(;s<n;){let h=a[s],f=a[s+1===n?0:s+1],v=a[s+2>=n?(s+2)%n:s+2],c=h[0]*t,T=f[1]*t,l=v[0]*t;i+=(l-c)*Math.sin(T),s++}return i*e}var o=x;Z.area=x,Z.default=o}}),zU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=oT(),d=sT();function x(E,e={}){let t=0,r=0,o=0;return d.coordEach.call(void 0,E,function(a){t+=a[0],r+=a[1],o++},!0),V.point.call(void 0,[t/o,r/o],e.properties)}var S=x;Z.centroid=x,Z.default=S}}),FU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=sT();function d(S,E={}){if(S.bbox!=null&&E.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return V.coordEach.call(void 0,S,t=>{e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}var x=d;Z.bbox=d,Z.default=x}}),OU=He({"src/lib/usa_location_names.js"(Z,V){"use strict";var d={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"},x=new Set(Object.values(d));V.exports={usaLocationAbbreviations:x,usaLocationList:d}}}),g0=He({"src/lib/geo_location_utils.js"(Z,V){"use strict";var d=Wn(),x=RU(),{area:S}=DU(),{centroid:E}=zU(),{bbox:e}=FU(),t=S_(),r=Km(),o=Zv(),a=b_(),n=I_(),{usaLocationAbbreviations:i,usaLocationList:s}=OU(),h=Object.keys(x),f={"ISO-3":t,"USA-states":c,"country names":v};function v(b){for(var p=0;p<h.length;p++){var u=h[p],y=new RegExp(x[u]);if(y.test(b.trim().toLowerCase()))return u}return r.log("Unrecognized country name: "+b+"."),!1}function c(b){b=b.trim();let p=i.has(b.toUpperCase())?b.toUpperCase():s[b.toLowerCase()];return p||(r.log("Unrecognized US location: "+b+"."),!1)}function T(b,p,u){var y;if(!p||typeof p!="string")return!1;let m=f[b](p);if(m){let R;if(b==="USA-states"){R=[];for(let L of u)((y=L?.properties)==null?void 0:y.gu)==="USA"&&R.push(L)}else R=u;for(let L of R)if(L.id===m)return L;r.log(`Location with id ${m} does not have a matching topojson feature at this resolution.`)}return!1}function l(b){var p=b.geometry,u=p.coordinates,y=b.id,m=[],R,L,z,F;function N(O){for(var P=0;P<O.length-1;P++)if(O[P][0]>0&&O[P+1][0]<0)return P;return null}switch(y==="RUS"||y==="FJI"?R=function(O){var P;if(N(O)===null)P=O;else for(P=new Array(O.length),F=0;F<O.length;F++)P[F]=[O[F][0]<0?O[F][0]+360:O[F][0],O[F][1]];m.push(n.tester(P))}:y==="ATA"?R=function(O){var P=N(O);if(P===null)return m.push(n.tester(O));var U=new Array(O.length+1),B=0;for(F=0;F<O.length;F++)F>P?U[B++]=[O[F][0]+360,O[F][1]]:F===P?(U[B++]=O[F],U[B++]=[O[F][0],-90]):U[B++]=O[F];var X=n.tester(U);X.pts.pop(),m.push(X)}:R=function(O){m.push(n.tester(O))},p.type){case"MultiPolygon":for(L=0;L<u.length;L++)for(z=0;z<u[L].length;z++)R(u[L][z]);break;case"Polygon":for(L=0;L<u.length;L++)R(u[L]);break}return m}function _(b){var p=b.geojson,u=window.PlotlyGeoAssets||{},y=typeof p=="string"?u[p]:p;return o(y)?y:(r.error("Oops ... something went wrong when fetching "+p),!1)}function w(b){var p=b[0].trace,u=_(p);if(!u)return!1;var y={},m=[],R;for(R=0;R<p._length;R++){var L=b[R];(L.loc||L.loc===0)&&(y[L.loc]=L)}function z(O){var P=a(O,p.featureidkey||"id").get(),U=y[P];if(U){var B=O.geometry;if(B.type==="Polygon"||B.type==="MultiPolygon"){var X={type:"Feature",id:P,geometry:B,properties:{}};X.geometry.coordinates.length>0?X.properties.ct=A(X):X.properties.ct=[NaN,NaN],U.fIn=O,U.fOut=X,m.push(X)}else r.log(["Location",U.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete y[P]}switch(u.type){case"FeatureCollection":var F=u.features;for(R=0;R<F.length;R++)z(F[R]);break;case"Feature":z(u);break;default:return r.warn(["Invalid GeoJSON type",(u.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var N in y)r.log(["Location *"+N+"*","does not have a matching feature with id-key","*"+p.featureidkey+"*."].join(" "));return m}function A(b){var p=b.geometry,u;if(p.type==="MultiPolygon")for(var y=p.coordinates,m=0,R=0;R<y.length;R++){var L={type:"Polygon",coordinates:y[R]},z=S(L);z>m&&(m=z,u=L)}else u=p;return E(u).geometry.coordinates}function M(b){var p=window.PlotlyGeoAssets||{},u=[];function y(F){return new Promise(function(N,O){d.json(F,function(P,U){if(P){delete p[F];var B=P.status===404?'GeoJSON at URL "'+F+'" does not exist.':"Unexpected error while fetching from "+F;return O(new Error(B))}return p[F]=U,N(U)})})}function m(F){return new Promise(function(N,O){var P=0,U=setInterval(function(){if(p[F]&&p[F]!=="pending")return clearInterval(U),N(p[F]);if(P>100)return clearInterval(U),O("Unexpected error while fetching from "+F);P++},50)})}for(var R=0;R<b.length;R++){var L=b[R][0].trace,z=L.geojson;typeof z=="string"&&(p[z]?p[z]==="pending"&&u.push(m(z)):(p[z]="pending",u.push(y(z))))}return u}function g(b){return e(b)}V.exports={locationToFeature:T,feature2polygons:l,getTraceGeojson:_,extractTraceFeature:w,fetchTraceGeoData:M,computeBbox:g}}}),RE=He({"src/traces/scattergeo/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Jn(),E=Qp(),e=E.stylePoints,t=E.styleText;V.exports=function(a,n){n&&r(a,n)};function r(o,a){var n=a[0].trace,i=a[0].node3;i.style("opacity",a[0].trace.opacity),e(i,n,o),t(i,n,o),i.selectAll("path.js-line").style("fill","none").each(function(s){var h=d.select(this),f=s.trace,v=f.line||{};h.call(S.stroke,v.color).call(x.dashLine,v.dash||"",v.width||0),f.fill!=="none"&&h.call(S.fill,f.fillcolor)})}}}),DE=He({"src/traces/scattergeo/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=nT().getTopojsonFeatures,E=m0(),e=g0(),t=Yd().findExtremes,r=Ws().BADNUM,o=Bd().calcMarkerSize,a=Fu(),n=RE();function i(h,f,v){var c=f.layers.frontplot.select(".scatterlayer"),T=x.makeTraceGroups(c,v,"trace scattergeo");function l(_,w){_.lonlat[0]===r&&d.select(w).remove()}T.selectAll("*").remove(),T.each(function(_){var w=d.select(this),A=_[0].trace;if(a.hasLines(A)||A.fill!=="none"){var M=E.calcTraceToLineCoords(_),g=A.fill!=="none"?E.makePolygon(M):E.makeLine(M);w.selectAll("path.js-line").data([{geojson:g,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(A)&&w.selectAll("path.point").data(x.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(A)&&w.selectAll("g").data(x.identity).enter().append("g").append("text").each(function(b){l(b,this)}),n(h,_)})}function s(h,f){var v=h[0].trace,c=f[v.geo],T=c._subplot,l=v._length,_,w;if(x.isArrayOrTypedArray(v.locations)){var A=v.locationmode,M=A==="geojson-id"?e.extractTraceFeature(h):S(v,T.topojson);for(_=0;_<l;_++){w=h[_];var g=A==="geojson-id"?w.fOut:e.locationToFeature(A,w.loc,M);w.lonlat=g?g.properties.ct:[r,r]}}var b={padded:!0},p,u;if(c.fitbounds==="geojson"&&v.locationmode==="geojson-id"){var y=e.computeBbox(e.getTraceGeojson(v));p=[y[0],y[2]],u=[y[1],y[3]]}else{for(p=new Array(l),u=new Array(l),_=0;_<l;_++)w=h[_],p[_]=w.lonlat[0],u[_]=w.lonlat[1];b.ppad=o(v,l)}v._extremes.lon=t(c.lonaxis._ax,p,b),v._extremes.lat=t(c.lataxis._ax,u,b)}V.exports={calcGeoJSON:s,plot:i}}}),BU=He({"src/traces/scattergeo/hover.js"(Z,V){"use strict";var d=rf(),x=Ws().BADNUM,S=l1(),E=sa().fillText,e=vg();V.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.xa,f=o.ya,v=o.subplot,c=v.projection.isLonLatOverEdges,T=v.project;function l(p){var u=p.lonlat;if(u[0]===x||c(u))return 1/0;var y=T(u),m=T([a,n]),R=Math.abs(y[0]-m[0]),L=Math.abs(y[1]-m[1]),z=Math.max(3,p.mrc||0);return Math.max(Math.sqrt(R*R+L*L)-z,1-3/z)}if(d.getClosest(i,l,o),o.index!==!1){var _=i[o.index],w=_.lonlat,A=[h.c2p(w),f.c2p(w)],M=_.mrc||1;o.x0=A[0]-M,o.x1=A[0]+M,o.y0=A[1]-M,o.y1=A[1]+M,o.loc=_.loc,o.lon=w[0],o.lat=w[1];var g={};g[s.geo]={_subplot:v};var b=s._module.formatLabels(_,s,g);return o.lonLabel=b.lonLabel,o.latLabel=b.latLabel,o.color=S(s,_),o.extraText=t(s,_,o,i[0].t.labels),o.hovertemplate=s.hovertemplate,[o]}};function t(r,o,a,n){if(r.hovertemplate)return;var i=o.hi||r.hoverinfo,s=i==="all"?e.hoverinfo.flags:i.split("+"),h=s.indexOf("location")!==-1&&Array.isArray(r.locations),f=s.indexOf("lon")!==-1,v=s.indexOf("lat")!==-1,c=s.indexOf("text")!==-1,T=[];function l(_){return _+"\xB0"}return h?T.push(o.loc):f&&v?T.push("("+l(a.latLabel)+", "+l(a.lonLabel)+")"):f?T.push(n.lon+l(a.lonLabel)):v&&T.push(n.lat+l(a.latLabel)),c&&E(o,r,T),T.join("<br>")}}}),NU=He({"src/traces/scattergeo/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){x.lon=S.lon,x.lat=S.lat,x.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x}}}),UU=He({"src/traces/scattergeo/select.js"(Z,V){"use strict";var d=Fu(),x=Ws().BADNUM;V.exports=function(E,e){var t=E.cd,r=E.xaxis,o=E.yaxis,a=[],n=t[0].trace,i,s,h,f,v,c=!d.hasMarkers(n)&&!d.hasText(n);if(c)return[];if(e===!1)for(v=0;v<t.length;v++)t[v].selected=0;else for(v=0;v<t.length;v++)i=t[v],s=i.lonlat,s[0]!==x&&(h=r.c2p(s),f=o.c2p(s),e.contains([h,f],null,v,E)?(a.push({pointNumber:v,lon:s[0],lat:s[1]}),i.selected=1):i.selected=0);return a}}}),_x=He({"node_modules/d3-array/dist/d3-array.js"(Z,V){(function(d,x){x(typeof Z=="object"&&typeof V<"u"?Z:d.d3=d.d3||{})})(Z,function(d){"use strict";function x(ee,q){return ee<q?-1:ee>q?1:ee>=q?0:NaN}function S(ee){return ee.length===1&&(ee=E(ee)),{left:function(q,se,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae<j;){var Q=ae+j>>>1;ee(q[Q],se)<0?ae=Q+1:j=Q}return ae},right:function(q,se,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae<j;){var Q=ae+j>>>1;ee(q[Q],se)>0?j=Q:ae=Q+1}return ae}}}function E(ee){return function(q,se){return x(ee(q),se)}}var e=S(x),t=e.right,r=e.left;function o(ee,q){q==null&&(q=a);for(var se=0,ae=ee.length-1,j=ee[0],Q=new Array(ae<0?0:ae);se<ae;)Q[se]=q(j,j=ee[++se]);return Q}function a(ee,q){return[ee,q]}function n(ee,q,se){var ae=ee.length,j=q.length,Q=new Array(ae*j),re,pe,we,Se;for(se==null&&(se=a),re=we=0;re<ae;++re)for(Se=ee[re],pe=0;pe<j;++pe,++we)Q[we]=se(Se,q[pe]);return Q}function i(ee,q){return q<ee?-1:q>ee?1:q>=ee?0:NaN}function s(ee){return ee===null?NaN:+ee}function h(ee,q){var se=ee.length,ae=0,j=-1,Q=0,re,pe,we=0;if(q==null)for(;++j<se;)isNaN(re=s(ee[j]))||(pe=re-Q,Q+=pe/++ae,we+=pe*(re-Q));else for(;++j<se;)isNaN(re=s(q(ee[j],j,ee)))||(pe=re-Q,Q+=pe/++ae,we+=pe*(re-Q));if(ae>1)return we/(ae-1)}function f(ee,q){var se=h(ee,q);return se&&Math.sqrt(se)}function v(ee,q){var se=ee.length,ae=-1,j,Q,re;if(q==null){for(;++ae<se;)if((j=ee[ae])!=null&&j>=j)for(Q=re=j;++ae<se;)(j=ee[ae])!=null&&(Q>j&&(Q=j),re<j&&(re=j))}else for(;++ae<se;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=re=j;++ae<se;)(j=q(ee[ae],ae,ee))!=null&&(Q>j&&(Q=j),re<j&&(re=j));return[Q,re]}var c=Array.prototype,T=c.slice,l=c.map;function _(ee){return function(){return ee}}function w(ee){return ee}function A(ee,q,se){ee=+ee,q=+q,se=(j=arguments.length)<2?(q=ee,ee=0,1):j<3?1:+se;for(var ae=-1,j=Math.max(0,Math.ceil((q-ee)/se))|0,Q=new Array(j);++ae<j;)Q[ae]=ee+ae*se;return Q}var M=Math.sqrt(50),g=Math.sqrt(10),b=Math.sqrt(2);function p(ee,q,se){var ae,j=-1,Q,re,pe;if(q=+q,ee=+ee,se=+se,ee===q&&se>0)return[ee];if((ae=q<ee)&&(Q=ee,ee=q,q=Q),(pe=u(ee,q,se))===0||!isFinite(pe))return[];if(pe>0)for(ee=Math.ceil(ee/pe),q=Math.floor(q/pe),re=new Array(Q=Math.ceil(q-ee+1));++j<Q;)re[j]=(ee+j)*pe;else for(ee=Math.floor(ee*pe),q=Math.ceil(q*pe),re=new Array(Q=Math.ceil(ee-q+1));++j<Q;)re[j]=(ee-j)/pe;return ae&&re.reverse(),re}function u(ee,q,se){var ae=(q-ee)/Math.max(0,se),j=Math.floor(Math.log(ae)/Math.LN10),Q=ae/Math.pow(10,j);return j>=0?(Q>=M?10:Q>=g?5:Q>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=g?5:Q>=b?2:1)}function y(ee,q,se){var ae=Math.abs(q-ee)/Math.max(0,se),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),Q=ae/j;return Q>=M?j*=10:Q>=g?j*=5:Q>=b&&(j*=2),q<ee?-j:j}function m(ee){return Math.ceil(Math.log(ee.length)/Math.LN2)+1}function R(){var ee=w,q=v,se=m;function ae(j){var Q,re=j.length,pe,we=new Array(re);for(Q=0;Q<re;++Q)we[Q]=ee(j[Q],Q,j);var Se=q(we),Ie=Se[0],Re=Se[1],We=se(we,Ie,Re);Array.isArray(We)||(We=y(Ie,Re,We),We=A(Math.ceil(Ie/We)*We,Re,We));for(var at=We.length;We[0]<=Ie;)We.shift(),--at;for(;We[at-1]>Re;)We.pop(),--at;var nt=new Array(at+1),tt;for(Q=0;Q<=at;++Q)tt=nt[Q]=[],tt.x0=Q>0?We[Q-1]:Ie,tt.x1=Q<at?We[Q]:Re;for(Q=0;Q<re;++Q)pe=we[Q],Ie<=pe&&pe<=Re&&nt[t(We,pe,0,at)].push(j[Q]);return nt}return ae.value=function(j){return arguments.length?(ee=typeof j=="function"?j:_(j),ae):ee},ae.domain=function(j){return arguments.length?(q=typeof j=="function"?j:_([j[0],j[1]]),ae):q},ae.thresholds=function(j){return arguments.length?(se=typeof j=="function"?j:Array.isArray(j)?_(T.call(j)):_(j),ae):se},ae}function L(ee,q,se){if(se==null&&(se=s),!!(ae=ee.length)){if((q=+q)<=0||ae<2)return+se(ee[0],0,ee);if(q>=1)return+se(ee[ae-1],ae-1,ee);var ae,j=(ae-1)*q,Q=Math.floor(j),re=+se(ee[Q],Q,ee),pe=+se(ee[Q+1],Q+1,ee);return re+(pe-re)*(j-Q)}}function z(ee,q,se){return ee=l.call(ee,s).sort(x),Math.ceil((se-q)/(2*(L(ee,.75)-L(ee,.25))*Math.pow(ee.length,-1/3)))}function F(ee,q,se){return Math.ceil((se-q)/(3.5*f(ee)*Math.pow(ee.length,-1/3)))}function N(ee,q){var se=ee.length,ae=-1,j,Q;if(q==null){for(;++ae<se;)if((j=ee[ae])!=null&&j>=j)for(Q=j;++ae<se;)(j=ee[ae])!=null&&j>Q&&(Q=j)}else for(;++ae<se;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=j;++ae<se;)(j=q(ee[ae],ae,ee))!=null&&j>Q&&(Q=j);return Q}function O(ee,q){var se=ee.length,ae=se,j=-1,Q,re=0;if(q==null)for(;++j<se;)isNaN(Q=s(ee[j]))?--ae:re+=Q;else for(;++j<se;)isNaN(Q=s(q(ee[j],j,ee)))?--ae:re+=Q;if(ae)return re/ae}function P(ee,q){var se=ee.length,ae=-1,j,Q=[];if(q==null)for(;++ae<se;)isNaN(j=s(ee[ae]))||Q.push(j);else for(;++ae<se;)isNaN(j=s(q(ee[ae],ae,ee)))||Q.push(j);return L(Q.sort(x),.5)}function U(ee){for(var q=ee.length,se,ae=-1,j=0,Q,re;++ae<q;)j+=ee[ae].length;for(Q=new Array(j);--q>=0;)for(re=ee[q],se=re.length;--se>=0;)Q[--j]=re[se];return Q}function B(ee,q){var se=ee.length,ae=-1,j,Q;if(q==null){for(;++ae<se;)if((j=ee[ae])!=null&&j>=j)for(Q=j;++ae<se;)(j=ee[ae])!=null&&Q>j&&(Q=j)}else for(;++ae<se;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=j;++ae<se;)(j=q(ee[ae],ae,ee))!=null&&Q>j&&(Q=j);return Q}function X(ee,q){for(var se=q.length,ae=new Array(se);se--;)ae[se]=ee[q[se]];return ae}function $(ee,q){if(se=ee.length){var se,ae=0,j=0,Q,re=ee[j];for(q==null&&(q=x);++ae<se;)(q(Q=ee[ae],re)<0||q(re,re)!==0)&&(re=Q,j=ae);if(q(re,re)===0)return j}}function le(ee,q,se){for(var ae=(se??ee.length)-(q=q==null?0:+q),j,Q;ae;)Q=Math.random()*ae--|0,j=ee[ae+q],ee[ae+q]=ee[Q+q],ee[Q+q]=j;return ee}function ce(ee,q){var se=ee.length,ae=-1,j,Q=0;if(q==null)for(;++ae<se;)(j=+ee[ae])&&(Q+=j);else for(;++ae<se;)(j=+q(ee[ae],ae,ee))&&(Q+=j);return Q}function de(ee){if(!(Q=ee.length))return[];for(var q=-1,se=B(ee,G),ae=new Array(se);++q<se;)for(var j=-1,Q,re=ae[q]=new Array(Q);++j<Q;)re[j]=ee[j][q];return ae}function G(ee){return ee.length}function Y(){return de(arguments)}d.bisect=t,d.bisectRight=t,d.bisectLeft=r,d.ascending=x,d.bisector=S,d.cross=n,d.descending=i,d.deviation=f,d.extent=v,d.histogram=R,d.thresholdFreedmanDiaconis=z,d.thresholdScott=F,d.thresholdSturges=m,d.max=N,d.mean=O,d.median=P,d.merge=U,d.min=B,d.pairs=o,d.permute=X,d.quantile=L,d.range=A,d.scan=$,d.shuffle=le,d.sum=ce,d.ticks=p,d.tickIncrement=u,d.tickStep=y,d.transpose=de,d.variance=h,d.zip=Y,Object.defineProperty(d,"__esModule",{value:!0})})}}),zE=He({"node_modules/d3-geo/dist/d3-geo.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,_x()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function S(){return new E}function E(){this.reset()}E.prototype={constructor:E,reset:function(){this.s=this.t=0},add:function(Qt){t(e,Qt,this.t),t(this,e.s,this.s),this.s?this.t+=e.t:this.s=e.t},valueOf:function(){return this.s}};var e=new E;function t(Qt,br,aa){var $r=Qt.s=br+aa,ka=$r-br,li=$r-ka;Qt.t=br-li+(aa-ka)}var r=1e-6,o=1e-12,a=Math.PI,n=a/2,i=a/4,s=a*2,h=180/a,f=a/180,v=Math.abs,c=Math.atan,T=Math.atan2,l=Math.cos,_=Math.ceil,w=Math.exp,A=Math.log,M=Math.pow,g=Math.sin,b=Math.sign||function(Qt){return Qt>0?1:Qt<0?-1:0},p=Math.sqrt,u=Math.tan;function y(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function m(Qt){return Qt>1?n:Qt<-1?-n:Math.asin(Qt)}function R(Qt){return(Qt=g(Qt/2))*Qt}function L(){}function z(Qt,br){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,br)}var F={Feature:function(Qt,br){z(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r<ka;)z(aa[$r].geometry,br)}},N={Sphere:function(Qt,br){br.sphere()},Point:function(Qt,br){Qt=Qt.coordinates,br.point(Qt[0],Qt[1],Qt[2])},MultiPoint:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)Qt=aa[$r],br.point(Qt[0],Qt[1],Qt[2])},LineString:function(Qt,br){O(Qt.coordinates,br,0)},MultiLineString:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)O(aa[$r],br,0)},Polygon:function(Qt,br){P(Qt.coordinates,br)},MultiPolygon:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)P(aa[$r],br)},GeometryCollection:function(Qt,br){for(var aa=Qt.geometries,$r=-1,ka=aa.length;++$r<ka;)z(aa[$r],br)}};function O(Qt,br,aa){var $r=-1,ka=Qt.length-aa,li;for(br.lineStart();++$r<ka;)li=Qt[$r],br.point(li[0],li[1],li[2]);br.lineEnd()}function P(Qt,br){var aa=-1,$r=Qt.length;for(br.polygonStart();++aa<$r;)O(Qt[aa],br,1);br.polygonEnd()}function U(Qt,br){Qt&&F.hasOwnProperty(Qt.type)?F[Qt.type](Qt,br):z(Qt,br)}var B=S(),X=S(),$,le,ce,de,G,Y={point:L,lineStart:L,lineEnd:L,polygonStart:function(){B.reset(),Y.lineStart=ee,Y.lineEnd=q},polygonEnd:function(){var Qt=+B;X.add(Qt<0?s+Qt:Qt),this.lineStart=this.lineEnd=this.point=L},sphere:function(){X.add(s)}};function ee(){Y.point=se}function q(){ae($,le)}function se(Qt,br){Y.point=ae,$=Qt,le=br,Qt*=f,br*=f,ce=Qt,de=l(br=br/2+i),G=g(br)}function ae(Qt,br){Qt*=f,br*=f,br=br/2+i;var aa=Qt-ce,$r=aa>=0?1:-1,ka=$r*aa,li=l(br),Ci=g(br),Hi=G*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*g(ka);B.add(T(pn,Qi)),ce=Qt,de=li,G=Ci}function j(Qt){return X.reset(),U(Qt,Y),X*2}function Q(Qt){return[T(Qt[1],Qt[0]),m(Qt[2])]}function re(Qt){var br=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(br),$r*g(br),g(aa)]}function pe(Qt,br){return Qt[0]*br[0]+Qt[1]*br[1]+Qt[2]*br[2]}function we(Qt,br){return[Qt[1]*br[2]-Qt[2]*br[1],Qt[2]*br[0]-Qt[0]*br[2],Qt[0]*br[1]-Qt[1]*br[0]]}function Se(Qt,br){Qt[0]+=br[0],Qt[1]+=br[1],Qt[2]+=br[2]}function Ie(Qt,br){return[Qt[0]*br,Qt[1]*br,Qt[2]*br]}function Re(Qt){var br=p(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=br,Qt[1]/=br,Qt[2]/=br}var We,at,nt,tt,qe,he,ue,ne,Ce=S(),Ye,rt,Ke={point:Mt,lineStart:Nt,lineEnd:Gt,polygonStart:function(){Ke.point=Mr,Ke.lineStart=mr,Ke.lineEnd=qr,Ce.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),Ke.point=Mt,Ke.lineStart=Nt,Ke.lineEnd=Gt,B<0?(We=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=We,rt[1]=nt},sphere:function(){We=-(nt=180),at=-(tt=90)}};function Mt(Qt,br){Ye.push(rt=[We=Qt,nt=Qt]),br<at&&(at=br),br>tt&&(tt=br)}function kt(Qt,br){var aa=re([Qt*f,br*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Re(li),li=Q(li);var Ci=Qt-qe,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=v(Ci)>180;Pi^(Hi*qe<Qi&&Qi<Hi*Qt)?(pn=li[1]*h,pn>tt&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*qe<Qi&&Qi<Hi*Qt)?(pn=-li[1]*h,pn<at&&(at=pn)):(br<at&&(at=br),br>tt&&(tt=br))),Pi?Qt<qe?Er(We,Qt)>Er(We,nt)&&(nt=Qt):Er(Qt,nt)>Er(We,nt)&&(We=Qt):nt>=We?(Qt<We&&(We=Qt),Qt>nt&&(nt=Qt)):Qt>qe?Er(We,Qt)>Er(We,nt)&&(nt=Qt):Er(Qt,nt)>Er(We,nt)&&(We=Qt)}else Ye.push(rt=[We=Qt,nt=Qt]);br<at&&(at=br),br>tt&&(tt=br),ne=aa,qe=Qt}function Nt(){Ke.point=kt}function Gt(){rt[0]=We,rt[1]=nt,Ke.point=Mt,ne=null}function Mr(Qt,br){if(ne){var aa=Qt-qe;Ce.add(v(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,ue=br;Y.point(Qt,br),kt(Qt,br)}function mr(){Y.lineStart()}function qr(){Mr(he,ue),Y.lineEnd(),v(Ce)>r&&(We=-(nt=180)),rt[0]=We,rt[1]=nt,ne=null}function Er(Qt,br){return(br-=Qt)<0?br+360:br}function Ir(Qt,br){return Qt[0]-br[0]}function _t(Qt,br){return Qt[0]<=Qt[1]?Qt[0]<=br&&br<=Qt[1]:br<Qt[0]||Qt[1]<br}function Oe(Qt){var br,aa,$r,ka,li,Ci,Hi;if(tt=nt=-(We=at=1/0),Ye=[],U(Qt,Ke),aa=Ye.length){for(Ye.sort(Ir),br=1,$r=Ye[0],li=[$r];br<aa;++br)ka=Ye[br],_t($r,ka[0])||_t($r,ka[1])?(Er($r[0],ka[1])>Er($r[0],$r[1])&&($r[1]=ka[1]),Er(ka[0],$r[1])>Er($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,br=0,$r=li[aa];br<=aa;$r=ka,++br)ka=li[br],(Hi=Er($r[1],ka[0]))>Ci&&(Ci=Hi,We=ka[0],nt=$r[1])}return Ye=rt=null,We===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[We,at],[nt,tt]]}var Je,Ae,Le,Ue,Ze,st,ut,Ut,Ct,Pt,jt,fr,ur,sr,Pr,Ta,Oa={sphere:L,point:Ia,lineStart:Wa,lineEnd:wi,polygonStart:function(){Oa.lineStart=Kt,Oa.lineEnd=Dt},polygonEnd:function(){Oa.lineStart=Wa,Oa.lineEnd=wi}};function Ia(Qt,br){Qt*=f,br*=f;var aa=l(br);qa(aa*l(Qt),aa*g(Qt),g(br))}function qa(Qt,br,aa){++Je,Le+=(Qt-Le)/Je,Ue+=(br-Ue)/Je,Ze+=(aa-Ze)/Je}function Wa(){Oa.point=Ca}function Ca(Qt,br){Qt*=f,br*=f;var aa=l(br);sr=aa*l(Qt),Pr=aa*g(Qt),Ta=g(br),Oa.point=hi,qa(sr,Pr,Ta)}function hi(Qt,br){Qt*=f,br*=f;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=T(p((Ci=Pr*li-Ta*ka)*Ci+(Ci=Ta*$r-sr*li)*Ci+(Ci=sr*ka-Pr*$r)*Ci),sr*$r+Pr*ka+Ta*li);Ae+=Ci,st+=Ci*(sr+(sr=$r)),ut+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(Ta+(Ta=li)),qa(sr,Pr,Ta)}function wi(){Oa.point=Ia}function Kt(){Oa.point=Yt}function Dt(){Jt(fr,ur),Oa.point=Ia}function Yt(Qt,br){fr=Qt,ur=br,Qt*=f,br*=f,Oa.point=Jt;var aa=l(br);sr=aa*l(Qt),Pr=aa*g(Qt),Ta=g(br),qa(sr,Pr,Ta)}function Jt(Qt,br){Qt*=f,br*=f;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=Pr*li-Ta*ka,Hi=Ta*$r-sr*li,Qi=sr*ka-Pr*$r,pn=p(Ci*Ci+Hi*Hi+Qi*Qi),Pi=m(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(sr+(sr=$r)),ut+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(Ta+(Ta=li)),qa(sr,Pr,Ta)}function Fr(Qt){Je=Ae=Le=Ue=Ze=st=ut=Ut=Ct=Pt=jt=0,U(Qt,Oa);var br=Ct,aa=Pt,$r=jt,ka=br*br+aa*aa+$r*$r;return ka<o&&(br=st,aa=ut,$r=Ut,Ae<r&&(br=Le,aa=Ue,$r=Ze),ka=br*br+aa*aa+$r*$r,ka<o)?[NaN,NaN]:[T(aa,br)*h,m($r/p(ka))*h]}function ta(Qt){return function(){return Qt}}function ra(Qt,br){function aa($r,ka){return $r=Qt($r,ka),br($r[0],$r[1])}return Qt.invert&&br.invert&&(aa.invert=function($r,ka){return $r=br.invert($r,ka),$r&&Qt.invert($r[0],$r[1])}),aa}function ca(Qt,br){return[v(Qt)>a?Qt+Math.round(-Qt/s)*s:Qt,br]}ca.invert=ca;function Ba(Qt,br,aa){return(Qt%=s)?br||aa?ra(Za(Qt),ri(br,aa)):Za(Qt):br||aa?ri(br,aa):ca}function $a(Qt){return function(br,aa){return br+=Qt,[br>a?br-s:br<-a?br+s:br,aa]}}function Za(Qt){var br=$a(Qt);return br.invert=$a(-Qt),br}function ri(Qt,br){var aa=l(Qt),$r=g(Qt),ka=l(br),li=g(br);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=g(Hi)*pn,Ni=g(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),m(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=g(Hi)*pn,Ni=g(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),m(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function br(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return br.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},br}function Ra(Qt,br,aa,$r,ka,li){if(aa){var Ci=l(br),Hi=g(br),Qi=$r*aa;ka==null?(ka=br+$r*s,li=br-Qi/2):(ka=an(Ci,ka),li=an(Ci,li),($r>0?ka<li:ka>li)&&(ka+=$r*s));for(var pn,Pi=ka;$r>0?Pi>li:Pi<li;Pi-=Qi)pn=Q([Ci,-Hi*l(Pi),-Hi*g(Pi)]),Qt.point(pn[0],pn[1])}}function an(Qt,br){br=re(br),br[0]-=Qt,Re(br);var aa=y(-br[1]);return((-br[2]<0?-aa:aa)+s-r)%s}function tn(){var Qt=ta([0,0]),br=ta(90),aa=ta(6),$r,ka,li={point:Ci};function Ci(Qi,pn){$r.push(Qi=ka(Qi,pn)),Qi[0]*=h,Qi[1]*=h}function Hi(){var Qi=Qt.apply(this,arguments),pn=br.apply(this,arguments)*f,Pi=aa.apply(this,arguments)*f;return $r=[],ka=Ba(-Qi[0]*f,-Qi[1]*f,0).invert,Ra(li,pn,Pi,1),Qi={type:"Polygon",coordinates:[$r]},$r=ka=null,Qi}return Hi.center=function(Qi){return arguments.length?(Qt=typeof Qi=="function"?Qi:ta([+Qi[0],+Qi[1]]),Hi):Qt},Hi.radius=function(Qi){return arguments.length?(br=typeof Qi=="function"?Qi:ta(+Qi),Hi):br},Hi.precision=function(Qi){return arguments.length?(aa=typeof Qi=="function"?Qi:ta(+Qi),Hi):aa},Hi}function fn(){var Qt=[],br;return{point:function(aa,$r,ka){br.push([aa,$r,ka])},lineStart:function(){Qt.push(br=[])},lineEnd:L,rejoin:function(){Qt.length>1&&Qt.push(Qt.pop().concat(Qt.shift()))},result:function(){var aa=Qt;return Qt=[],br=null,aa}}}function xt(Qt,br){return v(Qt[0]-br[0])<r&&v(Qt[1]-br[1])<r}function lt(Qt,br,aa,$r){this.x=Qt,this.z=br,this.o=aa,this.e=$r,this.v=!1,this.n=this.p=null}function Br(Qt,br,aa,$r,ka){var li=[],Ci=[],Hi,Qi;if(Qt.forEach(function(Sn){if(!(($n=Sn.length-1)<=0)){var $n,no=Sn[0],Qn=Sn[$n],co;if(xt(no,Qn)){if(!no[2]&&!Qn[2]){for(ka.lineStart(),Hi=0;Hi<$n;++Hi)ka.point((no=Sn[Hi])[0],no[1]);ka.lineEnd();return}Qn[0]+=2*r}li.push(co=new lt(no,Sn,null,!0)),Ci.push(co.o=new lt(no,null,co,!1)),li.push(co=new lt(Qn,Sn,null,!1)),Ci.push(co.o=new lt(Qn,null,co,!0))}}),!!li.length){for(Ci.sort(br),Cr(li),Cr(Ci),Hi=0,Qi=Ci.length;Hi<Qi;++Hi)Ci[Hi].e=aa=!aa;for(var pn=li[0],Pi,Di;;){for(var Ni=pn,mi=!0;Ni.v;)if((Ni=Ni.n)===pn)return;Pi=Ni.z,ka.lineStart();do{if(Ni.v=Ni.o.v=!0,Ni.e){if(mi)for(Hi=0,Qi=Pi.length;Hi<Qi;++Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.n.x,1,ka);Ni=Ni.n}else{if(mi)for(Pi=Ni.p.z,Hi=Pi.length-1;Hi>=0;--Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.p.x,-1,ka);Ni=Ni.p}Ni=Ni.o,Pi=Ni.z,mi=!mi}while(!Ni.v);ka.lineEnd()}}}function Cr(Qt){if(br=Qt.length){for(var br,aa=0,$r=Qt[0],ka;++aa<br;)$r.n=ka=Qt[aa],ka.p=$r,$r=ka;$r.n=ka=Qt[0],ka.p=$r}}var xr=S();function Rr(Qt){return v(Qt[0])<=a?Qt[0]:b(Qt[0])*((v(Qt[0])+a)%s-a)}function Ur(Qt,br){var aa=Rr(br),$r=br[1],ka=g($r),li=[g(aa),-l(aa),0],Ci=0,Hi=0;xr.reset(),ka===1?$r=n+r:ka===-1&&($r=-n-r);for(var Qi=0,pn=Qt.length;Qi<pn;++Qi)if(Di=(Pi=Qt[Qi]).length)for(var Pi,Di,Ni=Pi[Di-1],mi=Rr(Ni),Sn=Ni[1]/2+i,$n=g(Sn),no=l(Sn),Qn=0;Qn<Di;++Qn,mi=Tn,$n=go,no=Ko,Ni=co){var co=Pi[Qn],Tn=Rr(co),un=co[1]/2+i,go=g(un),Ko=l(un),Ms=Tn-mi,rl=Ms>=0?1:-1,Ns=rl*Ms,el=Ns>a,ws=$n*go;if(xr.add(T(ws*rl*g(Ns),no*Ko+ws*l(Ns))),Ci+=el?Ms+rl*s:Ms,el^mi>=aa^Tn>=aa){var Fl=we(re(Ni),re(co));Re(Fl);var _l=we(li,Fl);Re(_l);var ll=(el^Ms>=0?-1:1)*m(_l[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^Ms>=0?1:-1)}}return(Ci<-r||Ci<r&&xr<-r)^Hi&1}function Hr(Qt,br,aa,$r){return function(ka){var li=br(ka),Ci=fn(),Hi=br(Ci),Qi=!1,pn,Pi,Di,Ni={point:mi,lineStart:$n,lineEnd:no,polygonStart:function(){Ni.point=Qn,Ni.lineStart=co,Ni.lineEnd=Tn,Pi=[],pn=[]},polygonEnd:function(){Ni.point=mi,Ni.lineStart=$n,Ni.lineEnd=no,Pi=x.merge(Pi);var un=Ur(pn,$r);Pi.length?(Qi||(ka.polygonStart(),Qi=!0),Br(Pi,Xt,un,aa,ka)):un&&(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),aa(null,null,1,ka),ka.lineEnd()),Qi&&(ka.polygonEnd(),Qi=!1),Pi=pn=null},sphere:function(){ka.polygonStart(),ka.lineStart(),aa(null,null,1,ka),ka.lineEnd(),ka.polygonEnd()}};function mi(un,go){Qt(un,go)&&ka.point(un,go)}function Sn(un,go){li.point(un,go)}function $n(){Ni.point=Sn,li.lineStart()}function no(){Ni.point=mi,li.lineEnd()}function Qn(un,go){Di.push([un,go]),Hi.point(un,go)}function co(){Hi.lineStart(),Di=[]}function Tn(){Qn(Di[0][0],Di[0][1]),Hi.lineEnd();var un=Hi.clean(),go=Ci.result(),Ko,Ms=go.length,rl,Ns,el;if(Di.pop(),pn.push(Di),Di=null,!!Ms){if(un&1){if(Ns=go[0],(rl=Ns.length-1)>0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Ko=0;Ko<rl;++Ko)ka.point((el=Ns[Ko])[0],el[1]);ka.lineEnd()}return}Ms>1&&un&2&&go.push(go.pop().concat(go.shift())),Pi.push(go.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Xt(Qt,br){return((Qt=Qt.x)[0]<0?Qt[1]-n-r:n-Qt[1])-((br=br.x)[0]<0?br[1]-n-r:n-br[1])}var vr=Hr(function(){return!0},Or,Pa,[-a,-n]);function Or(Qt){var br=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=v(li-br);v(Qi-a)<r?(Qt.point(br,aa=(aa+Ci)/2>0?n:-n),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(v(br-$r)<r&&(br-=$r*r),v(li-Hi)<r&&(li-=Hi*r),aa=ba(br,aa,li,Ci),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),ka=0),Qt.point(br=li,aa=Ci),$r=Hi},lineEnd:function(){Qt.lineEnd(),br=aa=NaN},clean:function(){return 2-ka}}}function ba(Qt,br,aa,$r){var ka,li,Ci=g(Qt-aa);return v(Ci)>r?c((g(br)*(li=l($r))*g(aa)-g($r)*(ka=l(br))*g(Qt))/(ka*li*Ci)):(br+$r)/2}function Pa(Qt,br,aa,$r){var ka;if(Qt==null)ka=aa*n,$r.point(-a,ka),$r.point(0,ka),$r.point(a,ka),$r.point(a,0),$r.point(a,-ka),$r.point(0,-ka),$r.point(-a,-ka),$r.point(-a,0),$r.point(-a,ka);else if(v(Qt[0]-br[0])>r){var li=Qt[0]<br[0]?a:-a;ka=aa*li/2,$r.point(-li,ka),$r.point(0,ka),$r.point(li,ka)}else $r.point(br[0],br[1])}function ma(Qt){var br=l(Qt),aa=6*f,$r=br>0,ka=v(br)>r;function li(Pi,Di,Ni,mi){Ra(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>br}function Hi(Pi){var Di,Ni,mi,Sn,$n;return{lineStart:function(){Sn=mi=!1,$n=1},point:function(no,Qn){var co=[no,Qn],Tn,un=Ci(no,Qn),go=$r?un?0:pn(no,Qn):un?pn(no+(no<0?a:-a),Qn):0;if(!Di&&(Sn=mi=un)&&Pi.lineStart(),un!==mi&&(Tn=Qi(Di,co),(!Tn||xt(Di,Tn)||xt(co,Tn))&&(co[2]=1)),un!==mi)$n=0,un?(Pi.lineStart(),Tn=Qi(co,Di),Pi.point(Tn[0],Tn[1])):(Tn=Qi(Di,co),Pi.point(Tn[0],Tn[1],2),Pi.lineEnd()),Di=Tn;else if(ka&&Di&&$r^un){var Ko;!(go&Ni)&&(Ko=Qi(co,Di,!0))&&($n=0,$r?(Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1]),Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd()):(Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=go},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return $n|(Sn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=re(Pi),Sn=re(Di),$n=[1,0,0],no=we(mi,Sn),Qn=pe(no,no),co=no[0],Tn=Qn-co*co;if(!Tn)return!Ni&&Pi;var un=br*Qn/Tn,go=-br*co/Tn,Ko=we($n,no),Ms=Ie($n,un),rl=Ie(no,go);Se(Ms,rl);var Ns=Ko,el=pe(Ms,Ns),ws=pe(Ns,Ns),Fl=el*el-ws*(pe(Ms,Ms)-1);if(!(Fl<0)){var _l=p(Fl),ll=Ie(Ns,(-el-_l)/ws);if(Se(ll,Ms),ll=Q(ll),!Ni)return ll;var jn=Pi[0],Io=Di[0],Js=Pi[1],Ds=Di[1],uu;Io<jn&&(uu=jn,jn=Io,Io=uu);var Iu=Io-jn,Zu=v(Iu-a)<r,Ic=Zu||Iu<r;if(!Zu&&Ds<Js&&(uu=Js,Js=Ds,Ds=uu),Ic?Zu?Js+Ds>0^ll[1]<(v(ll[0]-jn)<r?Js:Ds):Js<=ll[1]&&ll[1]<=Ds:Iu>a^(jn<=ll[0]&&ll[0]<=Io)){var bu=Ie(Ns,(-el+_l)/ws);return Se(bu,Ms),[ll,Q(bu)]}}}function pn(Pi,Di){var Ni=$r?Qt:a-Qt,mi=0;return Pi<-Ni?mi|=1:Pi>Ni&&(mi|=2),Di<-Ni?mi|=4:Di>Ni&&(mi|=8),mi}return Hr(Ci,Hi,li,$r?[0,-Qt]:[-a,Qt-a])}function la(Qt,br,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=br[0],pn=br[1],Pi=0,Di=1,Ni=Qi-Ci,mi=pn-Hi,Sn;if(Sn=aa-Ci,!(!Ni&&Sn>0)){if(Sn/=Ni,Ni<0){if(Sn<Pi)return;Sn<Di&&(Di=Sn)}else if(Ni>0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=ka-Ci,!(!Ni&&Sn<0)){if(Sn/=Ni,Ni<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(Ni>0){if(Sn<Pi)return;Sn<Di&&(Di=Sn)}if(Sn=$r-Hi,!(!mi&&Sn>0)){if(Sn/=mi,mi<0){if(Sn<Pi)return;Sn<Di&&(Di=Sn)}else if(mi>0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=li-Hi,!(!mi&&Sn<0)){if(Sn/=mi,mi<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(mi>0){if(Sn<Pi)return;Sn<Di&&(Di=Sn)}return Pi>0&&(Qt[0]=Ci+Pi*Ni,Qt[1]=Hi+Pi*mi),Di<1&&(br[0]=Ci+Di*Ni,br[1]=Hi+Di*mi),!0}}}}}var _a=1e9,Ai=-_a;function ki(Qt,br,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&br<=Pi&&Pi<=$r}function li(pn,Pi,Di,Ni){var mi=0,Sn=0;if(pn==null||(mi=Ci(pn,Di))!==(Sn=Ci(Pi,Di))||Qi(pn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:br);while((mi=(mi+Di+4)%4)!==Sn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return v(pn[0]-Qt)<r?Pi>0?0:3:v(pn[0]-aa)<r?Pi>0?2:1:v(pn[1]-br)<r?Pi>0?1:0:Pi>0?3:2}function Hi(pn,Pi){return Qi(pn.x,Pi.x)}function Qi(pn,Pi){var Di=Ci(pn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-pn[1]:Di===1?pn[0]-Pi[0]:Di===2?pn[1]-Pi[1]:Pi[0]-pn[0]}return function(pn){var Pi=pn,Di=fn(),Ni,mi,Sn,$n,no,Qn,co,Tn,un,go,Ko,Ms={point:rl,lineStart:Fl,lineEnd:_l,polygonStart:el,polygonEnd:ws};function rl(jn,Io){ka(jn,Io)&&Pi.point(jn,Io)}function Ns(){for(var jn=0,Io=0,Js=mi.length;Io<Js;++Io)for(var Ds=mi[Io],uu=1,Iu=Ds.length,Zu=Ds[0],Ic,bu,Rc=Zu[0],Au=Zu[1];uu<Iu;++uu)Ic=Rc,bu=Au,Zu=Ds[uu],Rc=Zu[0],Au=Zu[1],bu<=$r?Au>$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++jn:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--jn;return jn}function el(){Pi=Di,Ni=[],mi=[],Ko=!0}function ws(){var jn=Ns(),Io=Ko&&jn,Js=(Ni=x.merge(Ni)).length;(Io||Js)&&(pn.polygonStart(),Io&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Br(Ni,Hi,jn,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Sn=null}function Fl(){Ms.point=ll,mi&&mi.push(Sn=[]),go=!0,un=!1,co=Tn=NaN}function _l(){Ni&&(ll($n,no),Qn&&un&&Di.rejoin(),Ni.push(Di.result())),Ms.point=rl,un&&Pi.lineEnd()}function ll(jn,Io){var Js=ka(jn,Io);if(mi&&Sn.push([jn,Io]),go)$n=jn,no=Io,Qn=Js,go=!1,Js&&(Pi.lineStart(),Pi.point(jn,Io));else if(Js&&un)Pi.point(jn,Io);else{var Ds=[co=Math.max(Ai,Math.min(_a,co)),Tn=Math.max(Ai,Math.min(_a,Tn))],uu=[jn=Math.max(Ai,Math.min(_a,jn)),Io=Math.max(Ai,Math.min(_a,Io))];la(Ds,uu,Qt,br,aa,$r)?(un||(Pi.lineStart(),Pi.point(Ds[0],Ds[1])),Pi.point(uu[0],uu[1]),Js||Pi.lineEnd(),Ko=!1):Js&&(Pi.lineStart(),Pi.point(jn,Io),Ko=!1)}co=jn,Tn=Io,un=Js}return Ms}}function Ki(){var Qt=0,br=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,br,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],br=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,br],[aa,$r]]}}}var yn=S(),Ln,kn,Bn,ao={sphere:L,point:L,lineStart:xo,lineEnd:L,polygonStart:L,polygonEnd:L};function xo(){ao.point=Fs,ao.lineEnd=Co}function Co(){ao.point=ao.lineEnd=L}function Fs(Qt,br){Qt*=f,br*=f,Ln=Qt,kn=g(br),Bn=l(br),ao.point=Mn}function Mn(Qt,br){Qt*=f,br*=f;var aa=g(br),$r=l(br),ka=v(Qt-Ln),li=l(ka),Ci=g(ka),Hi=$r*Ci,Qi=Bn*aa-kn*$r*li,pn=kn*aa+Bn*$r*li;yn.add(T(p(Hi*Hi+Qi*Qi),pn)),Ln=Qt,kn=aa,Bn=$r}function Ao(Qt){return yn.reset(),U(Qt,ao),+yn}var On=[null,null],ts={type:"LineString",coordinates:On};function is(Qt,br){return On[0]=Qt,On[1]=br,Ao(ts)}var _s={Feature:function(Qt,br){return io(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r<ka;)if(io(aa[$r].geometry,br))return!0;return!1}},Oo={Sphere:function(){return!0},Point:function(Qt,br){return Gn(Qt.coordinates,br)},MultiPoint:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(Gn(aa[$r],br))return!0;return!1},LineString:function(Qt,br){return eo(Qt.coordinates,br)},MultiLineString:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(eo(aa[$r],br))return!0;return!1},Polygon:function(Qt,br){return ns(Qt.coordinates,br)},MultiPolygon:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(ns(aa[$r],br))return!0;return!1},GeometryCollection:function(Qt,br){for(var aa=Qt.geometries,$r=-1,ka=aa.length;++$r<ka;)if(io(aa[$r],br))return!0;return!1}};function io(Qt,br){return Qt&&Oo.hasOwnProperty(Qt.type)?Oo[Qt.type](Qt,br):!1}function Gn(Qt,br){return is(Qt,br)===0}function eo(Qt,br){for(var aa,$r,ka,li=0,Ci=Qt.length;li<Ci;li++){if($r=is(Qt[li],br),$r===0||li>0&&(ka=is(Qt[li],Qt[li-1]),ka>0&&aa<=ka&&$r<=ka&&(aa+$r-ka)*(1-Math.pow((aa-$r)/ka,2))<o*ka))return!0;aa=$r}return!1}function ns(Qt,br){return!!Ur(Qt.map(gs),Ls(br))}function gs(Qt){return Qt=Qt.map(Ls),Qt.pop(),Qt}function Ls(Qt){return[Qt[0]*f,Qt[1]*f]}function Xo(Qt,br){return(Qt&&_s.hasOwnProperty(Qt.type)?_s[Qt.type]:io)(Qt,br)}function Gi(Qt,br,aa){var $r=x.range(Qt,br-r,aa).concat(br);return function(ka){return $r.map(function(li){return[ka,li]})}}function Pn(Qt,br,aa){var $r=x.range(Qt,br-r,aa).concat(br);return function(ka){return $r.map(function(li){return[li,ka]})}}function js(){var Qt,br,aa,$r,ka,li,Ci,Hi,Qi=10,pn=Qi,Pi=90,Di=360,Ni,mi,Sn,$n,no=2.5;function Qn(){return{type:"MultiLineString",coordinates:co()}}function co(){return x.range(_($r/Pi)*Pi,aa,Pi).map(Sn).concat(x.range(_(Hi/Di)*Di,Ci,Di).map($n)).concat(x.range(_(br/Qi)*Qi,Qt,Qi).filter(function(Tn){return v(Tn%Pi)>r}).map(Ni)).concat(x.range(_(li/pn)*pn,ka,pn).filter(function(Tn){return v(Tn%Di)>r}).map(mi))}return Qn.lines=function(){return co().map(function(Tn){return{type:"LineString",coordinates:Tn}})},Qn.outline=function(){return{type:"Polygon",coordinates:[Sn($r).concat($n(Ci).slice(1),Sn(aa).reverse().slice(1),$n(Hi).reverse().slice(1))]}},Qn.extent=function(Tn){return arguments.length?Qn.extentMajor(Tn).extentMinor(Tn):Qn.extentMinor()},Qn.extentMajor=function(Tn){return arguments.length?($r=+Tn[0][0],aa=+Tn[1][0],Hi=+Tn[0][1],Ci=+Tn[1][1],$r>aa&&(Tn=$r,$r=aa,aa=Tn),Hi>Ci&&(Tn=Hi,Hi=Ci,Ci=Tn),Qn.precision(no)):[[$r,Hi],[aa,Ci]]},Qn.extentMinor=function(Tn){return arguments.length?(br=+Tn[0][0],Qt=+Tn[1][0],li=+Tn[0][1],ka=+Tn[1][1],br>Qt&&(Tn=br,br=Qt,Qt=Tn),li>ka&&(Tn=li,li=ka,ka=Tn),Qn.precision(no)):[[br,li],[Qt,ka]]},Qn.step=function(Tn){return arguments.length?Qn.stepMajor(Tn).stepMinor(Tn):Qn.stepMinor()},Qn.stepMajor=function(Tn){return arguments.length?(Pi=+Tn[0],Di=+Tn[1],Qn):[Pi,Di]},Qn.stepMinor=function(Tn){return arguments.length?(Qi=+Tn[0],pn=+Tn[1],Qn):[Qi,pn]},Qn.precision=function(Tn){return arguments.length?(no=+Tn,Ni=Gi(li,ka,90),mi=Pn(br,Qt,no),Sn=Gi(Hi,Ci,90),$n=Pn($r,aa,no),Qn):no},Qn.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function xs(){return js()()}function Hn(Qt,br){var aa=Qt[0]*f,$r=Qt[1]*f,ka=br[0]*f,li=br[1]*f,Ci=l($r),Hi=g($r),Qi=l(li),pn=g(li),Pi=Ci*l(aa),Di=Ci*g(aa),Ni=Qi*l(ka),mi=Qi*g(ka),Sn=2*m(p(R(li-$r)+Ci*Qi*R(ka-aa))),$n=g(Sn),no=Sn?function(Qn){var co=g(Qn*=Sn)/$n,Tn=g(Sn-Qn)/$n,un=Tn*Pi+co*Ni,go=Tn*Di+co*mi,Ko=Tn*Hi+co*pn;return[T(go,un)*h,T(Ko,p(un*un+go*go))*h]}:function(){return[aa*h,$r*h]};return no.distance=Sn,no}function Os(Qt){return Qt}var ds=S(),Xs=S(),il,_n,Lo,bo,Rs={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Rs.lineStart=pu,Rs.lineEnd=vl},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=L,ds.add(v(Xs)),Xs.reset()},result:function(){var Qt=ds/2;return ds.reset(),Qt}};function pu(){Rs.point=uo}function uo(Qt,br){Rs.point=Gs,il=Lo=Qt,_n=bo=br}function Gs(Qt,br){Xs.add(bo*Qt-Lo*br),Lo=Qt,bo=br}function vl(){Gs(il,_n)}var As=1/0,qs=As,us=-As,Ss=us,Nl={point:su,lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var Qt=[[As,qs],[us,Ss]];return us=Ss=-(qs=As=1/0),Qt}};function su(Qt,br){Qt<As&&(As=Qt),Qt>us&&(us=Qt),br<qs&&(qs=br),br>Ss&&(Ss=br)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Hc=0,lu=0,Pl=0,ic,Ou,nl,ml,bs={point:Zs,lineStart:nc,lineEnd:fl,polygonStart:function(){bs.lineStart=xh,bs.lineEnd=ss},polygonEnd:function(){bs.point=Zs,bs.lineStart=nc,bs.lineEnd=fl},result:function(){var Qt=Pl?[Hc/Pl,lu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Hc=lu=Pl=0,Qt}};function Zs(Qt,br){Tc+=Qt,du+=br,++Sf}function nc(){bs.point=Ul}function Ul(Qt,br){bs.point=qu,Zs(nl=Qt,ml=br)}function qu(Qt,br){var aa=Qt-nl,$r=br-ml,ka=p(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(ml+br)/2,dc+=ka,Zs(nl=Qt,ml=br)}function fl(){bs.point=Zs}function xh(){bs.point=bh}function ss(){ks(ic,Ou)}function bh(Qt,br){bs.point=ks,Zs(ic=nl=Qt,Ou=ml=br)}function ks(Qt,br){var aa=Qt-nl,$r=br-ml,ka=p(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(ml+br)/2,dc+=ka,ka=ml*Qt-nl*br,Hc+=ka*(nl+Qt),lu+=ka*(ml+br),Pl+=ka*3,Zs(nl=Qt,ml=br)}function to(Qt){this._context=Qt}to.prototype={_radius:4.5,pointRadius:function(Qt){return this._radius=Qt,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(Qt,br){switch(this._point){case 0:{this._context.moveTo(Qt,br),this._point=1;break}case 1:{this._context.lineTo(Qt,br);break}default:{this._context.moveTo(Qt+this._radius,br),this._context.arc(Qt,br,this._radius,0,s);break}}},result:L};var Wc=S(),Vu,jl,Mf,Ac,nf,$l={point:L,lineStart:function(){$l.point=Jf},lineEnd:function(){Vu&&Of(jl,Mf),$l.point=L},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Wc;return Wc.reset(),Qt}};function Jf(Qt,br){$l.point=Of,jl=Ac=Qt,Mf=nf=br}function Of(Qt,br){Ac-=Qt,nf-=br,Wc.add(p(Ac*Ac+nf*nf)),Ac=Qt,nf=br}function of(){this._string=[]}of.prototype={_radius:4.5,_circle:jc(4.5),pointRadius:function(Qt){return(Qt=+Qt)!==this._radius&&(this._radius=Qt,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(Qt,br){switch(this._point){case 0:{this._string.push("M",Qt,",",br),this._point=1;break}case 1:{this._string.push("L",Qt,",",br);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",br,this._circle);break}}},result:function(){if(this._string.length){var Qt=this._string.join("");return this._string=[],Qt}else return null}};function jc(Qt){return"m0,"+Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+-2*Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+2*Qt+"z"}function Bf(Qt,br){var aa=4.5,$r,ka;function li(Ci){return Ci&&(typeof aa=="function"&&ka.pointRadius(+aa.apply(this,arguments)),U(Ci,$r(ka))),ka.result()}return li.area=function(Ci){return U(Ci,$r(Rs)),Rs.result()},li.measure=function(Ci){return U(Ci,$r($l)),$l.result()},li.bounds=function(Ci){return U(Ci,$r(Nl)),Nl.result()},li.centroid=function(Ci){return U(Ci,$r(bs)),bs.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Os):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(br=null,new of):new to(br=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):br},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(br)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(br){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=br,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,br){this.stream.point(Qt,br)},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 oc(Qt,br,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Nl)),br(Nl.result()),$r!=null&&Qt.clipExtent($r),Qt}function Xc(Qt,br,aa){return oc(Qt,function($r){var ka=br[1][0]-br[0][0],li=br[1][1]-br[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+br[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+br[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function Ql(Qt,br,aa){return Xc(Qt,[[0,0],br],aa)}function qc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][0]-$r[0][0]),Ci=(ka-li*($r[1][0]+$r[0][0]))/2,Hi=-li*$r[0][1];Qt.scale(150*li).translate([Ci,Hi])},aa)}function Sc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][1]-$r[0][1]),Ci=-li*$r[0][0],Hi=(ka-li*($r[1][1]+$r[0][1]))/2;Qt.scale(150*li).translate([Ci,Hi])},aa)}var Ys=16,kf=l(30*f);function fh(Qt,br){return+br?Zc(Qt,br):Uf(Qt)}function Uf(Qt){return Gu({point:function(br,aa){br=Qt(br,aa),this.stream.point(br[0],br[1])}})}function Zc(Qt,br){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Sn,$n,no){var Qn=pn-$r,co=Pi-ka,Tn=Qn*Qn+co*co;if(Tn>4*br&&$n--){var un=Ci+Ni,go=Hi+mi,Ko=Qi+Sn,Ms=p(un*un+go*go+Ko*Ko),rl=m(Ko/=Ms),Ns=v(v(Ko)-1)<r||v(li-Di)<r?(li+Di)/2:T(go,un),el=Qt(Ns,rl),ws=el[0],Fl=el[1],_l=ws-$r,ll=Fl-ka,jn=co*_l-Qn*ll;(jn*jn/Tn>br||v((Qn*_l+co*ll)/Tn-.5)>.3||Ci*Ni+Hi*mi+Qi*Sn<kf)&&(aa($r,ka,li,Ci,Hi,Qi,ws,Fl,Ns,un/=Ms,go/=Ms,Ko,$n,no),no.point(ws,Fl),aa(ws,Fl,Ns,un,go,Ko,pn,Pi,Di,Ni,mi,Sn,$n,no))}}return function($r){var ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Sn,$n,no={point:Qn,lineStart:co,lineEnd:un,polygonStart:function(){$r.polygonStart(),no.lineStart=go},polygonEnd:function(){$r.polygonEnd(),no.lineStart=co}};function Qn(rl,Ns){rl=Qt(rl,Ns),$r.point(rl[0],rl[1])}function co(){Di=NaN,no.point=Tn,$r.lineStart()}function Tn(rl,Ns){var el=re([rl,Ns]),ws=Qt(rl,Ns);aa(Di,Ni,Pi,mi,Sn,$n,Di=ws[0],Ni=ws[1],Pi=rl,mi=el[0],Sn=el[1],$n=el[2],Ys,$r),$r.point(Di,Ni)}function un(){no.point=Qn,$r.lineEnd()}function go(){co(),no.point=Ko,no.lineEnd=Ms}function Ko(rl,Ns){Tn(ka=rl,Ns),li=Di,Ci=Ni,Hi=mi,Qi=Sn,pn=$n,no.point=Tn}function Ms(){aa(Di,Ni,Pi,mi,Sn,$n,li,Ci,ka,Hi,Qi,pn,Ys,$r),no.lineEnd=un,un()}return no}}var $f=Gu({point:function(Qt,br){this.stream.point(Qt*f,br*f)}});function Cu(Qt){return Gu({point:function(br,aa){var $r=Qt(br,aa);return this.stream.point($r[0],$r[1])}})}function jf(Qt,br,aa,$r,ka){function li(Ci,Hi){return Ci*=$r,Hi*=ka,[br+Qt*Ci,aa-Qt*Hi]}return li.invert=function(Ci,Hi){return[(Ci-br)/Qt*$r,(aa-Hi)/Qt*ka]},li}function yl(Qt,br,aa,$r,ka,li){var Ci=l(li),Hi=g(li),Qi=Ci*Qt,pn=Hi*Qt,Pi=Ci/Qt,Di=Hi/Qt,Ni=(Hi*aa-Ci*br)/Qt,mi=(Hi*br+Ci*aa)/Qt;function Sn($n,no){return $n*=$r,no*=ka,[Qi*$n-pn*no+br,aa-pn*$n-Qi*no]}return Sn.invert=function($n,no){return[$r*(Pi*$n-Di*no+Ni),ka*(mi-Di*$n-Pi*no)]},Sn}function Lu(Qt){return Mc(function(){return Qt})()}function Mc(Qt){var br,aa=150,$r=480,ka=250,li=0,Ci=0,Hi=0,Qi=0,pn=0,Pi,Di=0,Ni=1,mi=1,Sn=null,$n=vr,no=null,Qn,co,Tn,un=Os,go=.5,Ko,Ms,rl,Ns,el;function ws(jn){return rl(jn[0]*f,jn[1]*f)}function Fl(jn){return jn=rl.invert(jn[0],jn[1]),jn&&[jn[0]*h,jn[1]*h]}ws.stream=function(jn){return Ns&&el===jn?Ns:Ns=$f(Cu(Pi)($n(Ko(un(el=jn)))))},ws.preclip=function(jn){return arguments.length?($n=jn,Sn=void 0,ll()):$n},ws.postclip=function(jn){return arguments.length?(un=jn,no=Qn=co=Tn=null,ll()):un},ws.clipAngle=function(jn){return arguments.length?($n=+jn?ma(Sn=jn*f):(Sn=null,vr),ll()):Sn*h},ws.clipExtent=function(jn){return arguments.length?(un=jn==null?(no=Qn=co=Tn=null,Os):ki(no=+jn[0][0],Qn=+jn[0][1],co=+jn[1][0],Tn=+jn[1][1]),ll()):no==null?null:[[no,Qn],[co,Tn]]},ws.scale=function(jn){return arguments.length?(aa=+jn,_l()):aa},ws.translate=function(jn){return arguments.length?($r=+jn[0],ka=+jn[1],_l()):[$r,ka]},ws.center=function(jn){return arguments.length?(li=jn[0]%360*f,Ci=jn[1]%360*f,_l()):[li*h,Ci*h]},ws.rotate=function(jn){return arguments.length?(Hi=jn[0]%360*f,Qi=jn[1]%360*f,pn=jn.length>2?jn[2]%360*f:0,_l()):[Hi*h,Qi*h,pn*h]},ws.angle=function(jn){return arguments.length?(Di=jn%360*f,_l()):Di*h},ws.reflectX=function(jn){return arguments.length?(Ni=jn?-1:1,_l()):Ni<0},ws.reflectY=function(jn){return arguments.length?(mi=jn?-1:1,_l()):mi<0},ws.precision=function(jn){return arguments.length?(Ko=fh(Ms,go=jn*jn),ll()):p(go)},ws.fitExtent=function(jn,Io){return Xc(ws,jn,Io)},ws.fitSize=function(jn,Io){return Ql(ws,jn,Io)},ws.fitWidth=function(jn,Io){return qc(ws,jn,Io)},ws.fitHeight=function(jn,Io){return Sc(ws,jn,Io)};function _l(){var jn=yl(aa,0,0,Ni,mi,Di).apply(null,br(li,Ci)),Io=(Di?yl:jf)(aa,$r-jn[0],ka-jn[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),Ms=ra(br,Io),rl=ra(Pi,Ms),Ko=fh(Ms,go),ll()}function ll(){return Ns=el=null,ws}return function(){return br=Qt.apply(this,arguments),ws.invert=br.invert&&Fl,_l()}}function ol(Qt){var br=0,aa=a/3,$r=Mc(Qt),ka=$r(br,aa);return ka.parallels=function(li){return arguments.length?$r(br=li[0]*f,aa=li[1]*f):[br*h,aa*h]},ka}function vc(Qt){var br=l(Qt);function aa($r,ka){return[$r*br,g(ka)/br]}return aa.invert=function($r,ka){return[$r/br,m(ka*br)]},aa}function yu(Qt,br){var aa=g(Qt),$r=(aa+g(br))/2;if(v($r)<r)return vc(Qt);var ka=1+aa*(2*$r-aa),li=p(ka)/$r;function Ci(Hi,Qi){var pn=p(ka-2*$r*g(Qi))/$r;return[pn*g(Hi*=$r),li-pn*l(Hi)]}return Ci.invert=function(Hi,Qi){var pn=li-Qi,Pi=T(Hi,v(pn))*b(pn);return pn*$r<0&&(Pi-=a*b(Hi)*b(pn)),[Pi/$r,m((ka-(Hi*Hi+pn*pn)*$r*$r)/(2*$r))]},Ci}function Tu(){return ol(yu).scale(155.424).center([0,33.6442])}function El(){return Tu().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function qf(Qt){var br=Qt.length;return{point:function(aa,$r){for(var ka=-1;++ka<br;)Qt[ka].point(aa,$r)},sphere:function(){for(var aa=-1;++aa<br;)Qt[aa].sphere()},lineStart:function(){for(var aa=-1;++aa<br;)Qt[aa].lineStart()},lineEnd:function(){for(var aa=-1;++aa<br;)Qt[aa].lineEnd()},polygonStart:function(){for(var aa=-1;++aa<br;)Qt[aa].polygonStart()},polygonEnd:function(){for(var aa=-1;++aa<br;)Qt[aa].polygonEnd()}}}function Qf(){var Qt,br,aa=El(),$r,ka=Tu().rotate([154,0]).center([-2,58.5]).parallels([55,65]),li,Ci=Tu().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Hi,Qi,pn={point:function(Ni,mi){Qi=[Ni,mi]}};function Pi(Ni){var mi=Ni[0],Sn=Ni[1];return Qi=null,$r.point(mi,Sn),Qi||(li.point(mi,Sn),Qi)||(Hi.point(mi,Sn),Qi)}Pi.invert=function(Ni){var mi=aa.scale(),Sn=aa.translate(),$n=(Ni[0]-Sn[0])/mi,no=(Ni[1]-Sn[1])/mi;return(no>=.12&&no<.234&&$n>=-.425&&$n<-.214?ka:no>=.166&&no<.234&&$n>=-.214&&$n<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&br===Ni?Qt:Qt=qf([aa.stream(br=Ni),ka.stream(Ni),Ci.stream(Ni)])},Pi.precision=function(Ni){return arguments.length?(aa.precision(Ni),ka.precision(Ni),Ci.precision(Ni),Di()):aa.precision()},Pi.scale=function(Ni){return arguments.length?(aa.scale(Ni),ka.scale(Ni*.35),Ci.scale(Ni),Pi.translate(aa.translate())):aa.scale()},Pi.translate=function(Ni){if(!arguments.length)return aa.translate();var mi=aa.scale(),Sn=+Ni[0],$n=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Sn-.455*mi,$n-.238*mi],[Sn+.455*mi,$n+.238*mi]]).stream(pn),li=ka.translate([Sn-.307*mi,$n+.201*mi]).clipExtent([[Sn-.425*mi+r,$n+.12*mi+r],[Sn-.214*mi-r,$n+.234*mi-r]]).stream(pn),Hi=Ci.translate([Sn-.205*mi,$n+.212*mi]).clipExtent([[Sn-.214*mi+r,$n+.166*mi+r],[Sn-.115*mi-r,$n+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Xc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return Ql(Pi,Ni,mi)},Pi.fitWidth=function(Ni,mi){return qc(Pi,Ni,mi)},Pi.fitHeight=function(Ni,mi){return Sc(Pi,Ni,mi)};function Di(){return Qt=br=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(br,aa){var $r=l(br),ka=l(aa),li=Qt($r*ka);return[li*ka*g(br),li*g(aa)]}}function Ec(Qt){return function(br,aa){var $r=p(br*br+aa*aa),ka=Qt($r),li=g(ka),Ci=l(ka);return[T(br*li,$r*Ci),m($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return p(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*m(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=y(Qt))&&Qt/g(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,br){return[Qt,A(u((n+br)/2))]}Nu.invert=function(Qt,br){return[Qt,2*c(w(br))-n]};function lf(){return au(Nu).scale(961/s)}function au(Qt){var br=Lu(Qt),aa=br.center,$r=br.scale,ka=br.translate,li=br.clipExtent,Ci=null,Hi,Qi,pn;br.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},br.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},br.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},br.clipExtent=function(Di){return arguments.length?(Di==null?Ci=Hi=Qi=pn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],pn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,pn]]};function Pi(){var Di=a*$r(),Ni=br(pi(br.rotate()).invert([0,0]));return li(Ci==null?[[Ni[0]-Di,Ni[1]-Di],[Ni[0]+Di,Ni[1]+Di]]:Qt===Nu?[[Math.max(Ni[0]-Di,Ci),Hi],[Math.min(Ni[0]+Di,Qi),pn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,pn)]])}return Pi()}function Yc(Qt){return u((n+Qt)/2)}function hh(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):A(aa/l(br))/A(Yc(br)/Yc(Qt)),ka=aa*M(Yc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-n+r&&(Hi=-n+r):Hi>n-r&&(Hi=n-r);var Qi=ka/M(Yc(Hi),$r);return[Qi*g($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*p(Ci*Ci+Qi*Qi),Pi=T(Ci,v(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(M(ka/pn,1/$r))-n]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,br){return[Qt,br]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):(aa-l(br))/(br-Qt),ka=aa/$r+Qt;if(v($r)<r)return sl;function li(Ci,Hi){var Qi=ka-Hi,pn=$r*Ci;return[Qi*g(pn),ka-Qi*l(pn)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=T(Ci,v(Qi))*b(Qi);return Qi*$r<0&&(pn-=a*b(Ci)*b(Qi)),[pn/$r,ka-b($r)*p(Ci*Ci+Qi*Qi)]},li}function Cf(){return ol(Pu).scale(131.154).center([0,13.9389])}var hl=1.340264,uf=-.081106,kc=893e-6,Hu=.003796,gf=p(3)/2,Wu=12;function Kc(Qt,br){var aa=m(gf*g(br)),$r=aa*aa,ka=$r*$r*$r;return[Qt*l(aa)/(gf*(hl+3*uf*$r+ka*(7*kc+9*Hu*$r))),aa*(hl+uf*$r+ka*(kc+Hu*$r))]}Kc.invert=function(Qt,br){for(var aa=br,$r=aa*aa,ka=$r*$r*$r,li=0,Ci,Hi,Qi;li<Wu&&(Hi=aa*(hl+uf*$r+ka*(kc+Hu*$r))-br,Qi=hl+3*uf*$r+ka*(7*kc+9*Hu*$r),aa-=Ci=Hi/Qi,$r=aa*aa,ka=$r*$r*$r,!(v(Ci)<o));++li);return[gf*Qt*(hl+3*uf*$r+ka*(7*kc+9*Hu*$r))/l(aa),m(g(aa)/gf)]};function Lf(){return Lu(Kc).scale(177.158)}function iu(Qt,br){var aa=l(br),$r=l(Qt)*aa;return[aa*g(Qt)/$r,g(br)/$r]}iu.invert=Ec(c);function Vf(){return Lu(iu).scale(144.049).clipAngle(60)}function Xu(){var Qt=1,br=0,aa=0,$r=1,ka=1,li=0,Ci,Hi,Qi=null,pn,Pi,Di,Ni=1,mi=1,Sn=Gu({point:function(un,go){var Ko=Tn([un,go]);this.stream.point(Ko[0],Ko[1])}}),$n=Os,no,Qn;function co(){return Ni=Qt*$r,mi=Qt*ka,no=Qn=null,Tn}function Tn(un){var go=un[0]*Ni,Ko=un[1]*mi;if(li){var Ms=Ko*Ci-go*Hi;go=go*Ci+Ko*Hi,Ko=Ms}return[go+br,Ko+aa]}return Tn.invert=function(un){var go=un[0]-br,Ko=un[1]-aa;if(li){var Ms=Ko*Ci+go*Hi;go=go*Ci-Ko*Hi,Ko=Ms}return[go/Ni,Ko/mi]},Tn.stream=function(un){return no&&Qn===un?no:no=Sn($n(Qn=un))},Tn.postclip=function(un){return arguments.length?($n=un,Qi=pn=Pi=Di=null,co()):$n},Tn.clipExtent=function(un){return arguments.length?($n=un==null?(Qi=pn=Pi=Di=null,Os):ki(Qi=+un[0][0],pn=+un[0][1],Pi=+un[1][0],Di=+un[1][1]),co()):Qi==null?null:[[Qi,pn],[Pi,Di]]},Tn.scale=function(un){return arguments.length?(Qt=+un,co()):Qt},Tn.translate=function(un){return arguments.length?(br=+un[0],aa=+un[1],co()):[br,aa]},Tn.angle=function(un){return arguments.length?(li=un%360*f,Hi=g(li),Ci=l(li),co()):li*h},Tn.reflectX=function(un){return arguments.length?($r=un?-1:1,co()):$r<0},Tn.reflectY=function(un){return arguments.length?(ka=un?-1:1,co()):ka<0},Tn.fitExtent=function(un,go){return Xc(Tn,un,go)},Tn.fitSize=function(un,go){return Ql(Tn,un,go)},Tn.fitWidth=function(un,go){return qc(Tn,un,go)},Tn.fitHeight=function(un,go){return Sc(Tn,un,go)},Tn}function Cc(Qt,br){var aa=br*br,$r=aa*aa;return[Qt*(.8707-.131979*aa+$r*(-.013791+$r*(.003971*aa-.001529*$r))),br*(1.007226+aa*(.015085+$r*(-.044475+.028874*aa-.005916*$r)))]}Cc.invert=function(Qt,br){var aa=br,$r=25,ka;do{var li=aa*aa,Ci=li*li;aa-=ka=(aa*(1.007226+li*(.015085+Ci*(-.044475+.028874*li-.005916*Ci)))-br)/(1.007226+li*(.015085*3+Ci*(-.044475*7+.028874*9*li-.005916*11*Ci)))}while(v(ka)>r&&--$r>0);return[Qt/(.8707+(li=aa*aa)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),aa]};function gc(){return Lu(Cc).scale(175.295)}function ql(Qt,br){return[l(br)*g(Qt),g(br)]}ql.invert=Ec(m);function xu(){return Lu(ql).scale(249.5).clipAngle(90+r)}function Lc(Qt,br){var aa=l(br),$r=1+l(Qt)*aa;return[aa*g(Qt)/$r,g(br)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function Jc(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,br){return[A(u((n+br)/2)),-Qt]}sc.invert=function(Qt,br){return[-br,2*c(w(Qt))-n]};function Pc(){var Qt=au(sc),br=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?br([-$r[1],$r[0]]):($r=br(),[$r[1],-$r[0]])},Qt.rotate=function($r){return arguments.length?aa([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=aa(),[$r[0],$r[1],$r[2]-90])},aa([0,0,90]).scale(159.155)}d.geoAlbers=El,d.geoAlbersUsa=Qf,d.geoArea=j,d.geoAzimuthalEqualArea=Lh,d.geoAzimuthalEqualAreaRaw=mc,d.geoAzimuthalEquidistant=vf,d.geoAzimuthalEquidistantRaw=sf,d.geoBounds=Oe,d.geoCentroid=Fr,d.geoCircle=tn,d.geoClipAntimeridian=vr,d.geoClipCircle=ma,d.geoClipExtent=Ki,d.geoClipRectangle=ki,d.geoConicConformal=mf,d.geoConicConformalRaw=hh,d.geoConicEqualArea=Tu,d.geoConicEqualAreaRaw=yu,d.geoConicEquidistant=Cf,d.geoConicEquidistantRaw=Pu,d.geoContains=Xo,d.geoDistance=is,d.geoEqualEarth=Lf,d.geoEqualEarthRaw=Kc,d.geoEquirectangular=_u,d.geoEquirectangularRaw=sl,d.geoGnomonic=Vf,d.geoGnomonicRaw=iu,d.geoGraticule=js,d.geoGraticule10=xs,d.geoIdentity=Xu,d.geoInterpolate=Hn,d.geoLength=Ao,d.geoMercator=lf,d.geoMercatorRaw=Nu,d.geoNaturalEarth1=gc,d.geoNaturalEarth1Raw=Cc,d.geoOrthographic=xu,d.geoOrthographicRaw=ql,d.geoPath=Bf,d.geoProjection=Lu,d.geoProjectionMutator=Mc,d.geoRotation=pi,d.geoStereographic=Jc,d.geoStereographicRaw=Lc,d.geoStream=U,d.geoTransform=Nf,d.geoTransverseMercator=Pc,d.geoTransverseMercatorRaw=sc,Object.defineProperty(d,"__esModule",{value:!0})})}}),jU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,zE(),_x()):x(d.d3=d.d3||{},d.d3,d.d3)})(Z,function(d,x,S){"use strict";var E=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,n=Math.log,i=Math.max,s=Math.min,h=Math.pow,f=Math.round,v=Math.sign||function(Ve){return Ve>0?1:Ve<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,_=1e-12,w=Math.PI,A=w/2,M=w/4,g=Math.SQRT1_2,b=F(2),p=F(w),u=w*2,y=180/w,m=w/180;function R(Ve){return Ve?Ve/Math.sin(Ve):1}function L(Ve){return Ve>1?A:Ve<-1?-A:Math.asin(Ve)}function z(Ve){return Ve>1?0:Ve<-1?w:Math.acos(Ve)}function F(Ve){return Ve>0?Math.sqrt(Ve):0}function N(Ve){return Ve=o(2*Ve),(Ve-1)/(Ve+1)}function O(Ve){return(o(Ve)-o(-Ve))/2}function P(Ve){return(o(Ve)+o(-Ve))/2}function U(Ve){return n(Ve+F(Ve*Ve+1))}function B(Ve){return n(Ve+F(Ve*Ve-1))}function X(Ve){var $e=T(Ve/2),ot=2*n(r(Ve/2))/($e*$e);function pt(Et,bt){var Rt=r(Et),lr=r(bt),yr=c(bt),kr=lr*Rt,jr=-((1-kr?n((1+kr)/2)/(1-kr):-.5)+ot/(1+kr));return[jr*lr*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Rt=F(Et*Et+bt*bt),lr=-Ve/2,yr=50,kr;if(!Rt)return[0,0];do{var jr=lr/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-n(E(Qr));lr-=kr=(2/Aa*Da-ot*Aa-Rt)/(-Da/(ha*ha)+1-ot/(2*Qr*Qr))*(Qr<0?.7:1)}while(E(kr)>l&&--yr>0);var ci=c(lr);return[t(Et*ci,Rt*r(lr)),L(bt*ci/Rt)]},pt}function $(){var Ve=A,$e=x.geoProjectionMutator(X),ot=$e(Ve);return ot.radius=function(pt){return arguments.length?$e(Ve=pt*m):Ve*y},ot.scale(179.976).clipAngle(147)}function le(Ve,$e){var ot=r($e),pt=R(z(ot*r(Ve/=2)));return[2*ot*c(Ve)*pt,c($e)*pt]}le.invert=function(Ve,$e){if(!(Ve*Ve+4*$e*$e>w*w+l)){var ot=Ve,pt=$e,Et=25;do{var bt=c(ot),Rt=c(ot/2),lr=r(ot/2),yr=c(pt),kr=r(pt),jr=c(2*pt),Qr=yr*yr,ha=kr*kr,Aa=Rt*Rt,Da=1-ha*lr*lr,ci=Da?z(kr*lr)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*kr*Rt-Ve,on=ci*yr-$e,An=Vi*(ha*Aa+ci*kr*lr*Qr),Yn=Vi*(.5*bt*jr-ci*2*yr*Rt),Nn=Vi*.25*(jr*Rt-ci*yr*ha*bt),wo=Vi*(Qr*lr+ci*Aa*kr),os=Yn*Nn-wo*An;if(!os)break;var So=(on*Yn-ji*wo)/os,Zo=(ji*Nn-on*An)/os;ot-=So,pt-=Zo}while((E(So)>l||E(Zo)>l)&&--Et>0);return[ot,pt]}};function ce(){return x.geoProjection(le).scale(152.63)}function de(Ve){var $e=c(Ve),ot=r(Ve),pt=Ve>=0?1:-1,Et=T(pt*Ve),bt=(1+$e-ot)/2;function Rt(lr,yr){var kr=r(yr),jr=r(lr/=2);return[(1+kr)*c(lr),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*ot-(1+kr)*$e*jr]}return Rt.invert=function(lr,yr){var kr=0,jr=0,Qr=50;do{var ha=r(kr),Aa=c(kr),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-lr,on=bt+ci*ot-Vi*$e*ha-yr,An=Vi*ha/2,Yn=-Aa*ci,Nn=$e*Vi*Aa/2,wo=ot*Da+$e*ha*ci,os=Yn*Nn-wo*An,So=(on*Yn-ji*wo)/os/2,Zo=(ji*Nn-on*An)/os;E(Zo)>2&&(Zo/=2),kr-=So,jr-=Zo}while((E(So)>l||E(Zo)>l)&&--Qr>0);return pt*jr>-t(r(kr),Et)-.001?[kr*2,jr]:null},Rt}function G(){var Ve=20*m,$e=Ve>=0?1:-1,ot=T($e*Ve),pt=x.geoProjectionMutator(de),Et=pt(Ve),bt=Et.stream;return Et.parallel=function(Rt){return arguments.length?(ot=T(($e=(Ve=Rt*m)>=0?1:-1)*Ve),pt(Ve)):Ve*y},Et.stream=function(Rt){var lr=Et.rotate(),yr=bt(Rt),kr=(Et.rotate([0,0]),bt(Rt)),jr=Et.precision();return Et.rotate(lr),yr.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)kr.point(Qr,$e*90);if(Ve)for(;$e*(Qr-=3*$e*jr)>=-180;)kr.point(Qr,$e*-t(r(Qr*m/2),ot)*y);kr.lineEnd(),kr.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function Y(Ve,$e){var ot=T($e/2),pt=F(1-ot*ot),Et=1+pt*r(Ve/=2),bt=c(Ve)*pt/Et,Rt=ot/Et,lr=bt*bt,yr=Rt*Rt;return[4/3*bt*(3+lr-3*yr),4/3*Rt*(3+3*lr-yr)]}Y.invert=function(Ve,$e){if(Ve*=3/8,$e*=3/8,!Ve&&E($e)>1)return null;var ot=Ve*Ve,pt=$e*$e,Et=1+ot+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Rt=L(bt)/3,lr=bt?B(E($e/bt))/3:U(E(Ve))/3,yr=r(Rt),kr=P(lr),jr=kr*kr-yr*yr;return[v(Ve)*2*t(O(lr)*yr,.25-jr),v($e)*2*t(kr*c(Rt),.25+jr)]};function ee(){return x.geoProjection(Y).scale(66.1603)}var q=F(8),se=n(1+b);function ae(Ve,$e){var ot=E($e);return ot<M?[Ve,n(T(M+$e/2))]:[Ve*r(ot)*(2*b-1/c(ot)),v($e)*(2*b*(ot-M)-n(T(ot/2)))]}ae.invert=function(Ve,$e){if((bt=E($e))<se)return[Ve,2*e(o($e))-A];var ot=M,pt=25,Et,bt;do{var Rt=r(ot/2),lr=T(ot/2);ot-=Et=(q*(ot-M)-n(lr)-bt)/(q-Rt*Rt/(2*lr))}while(E(Et)>_&&--pt>0);return[Ve/(r(ot)*(q-1/c(ot))),v($e)*ot]};function j(){return x.geoProjection(ae).scale(112.314)}function Q(Ve){var $e=2*w/Ve;function ot(pt,Et){var bt=x.geoAzimuthalEquidistantRaw(pt,Et);if(E(pt)>A){var Rt=t(bt[1],bt[0]),lr=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Rt-A)/$e)+A,kr=t(c(Rt-=yr),2-r(Rt));Rt=yr+L(w/lr*c(kr))-kr,bt[0]=lr*r(Rt),bt[1]=lr*c(Rt)}return bt}return ot.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Rt=t(Et,pt),lr=$e*f((Rt-A)/$e)+A,yr=Rt>lr?-1:1,kr=bt*r(lr-Rt),jr=1/T(yr*z((kr-w)/F(w*(w-2*kr)+bt*bt)));Rt=lr+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Rt),Et=bt*c(Rt)}return x.geoAzimuthalEquidistantRaw.invert(pt,Et)},ot}function re(){var Ve=5,$e=x.geoProjectionMutator(Q),ot=$e(Ve),pt=ot.stream,Et=.01,bt=-r(Et*m),Rt=c(Et*m);return ot.lobes=function(lr){return arguments.length?$e(Ve=+lr):Ve},ot.stream=function(lr){var yr=ot.rotate(),kr=pt(lr),jr=(ot.rotate([0,0]),pt(lr));return ot.rotate(yr),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/Ve,Aa=2*w/Ve,Da=90-180/Ve,ci=A;Qr<Ve;++Qr,Da-=ha,ci-=Aa)jr.point(t(Rt*r(ci),bt)*y,L(Rt*c(ci))*y),Da<-90?(jr.point(-90,-180-Da-Et),jr.point(-90,-180-Da+Et)):(jr.point(90,Da+Et),jr.point(90,Da-Et));jr.lineEnd(),jr.polygonEnd()},kr},ot.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function pe(Ve,$e){if(arguments.length<2&&($e=Ve),$e===1)return x.geoAzimuthalEqualAreaRaw;if($e===1/0)return we;function ot(pt,Et){var bt=x.geoAzimuthalEqualAreaRaw(pt/$e,Et);return bt[0]*=Ve,bt}return ot.invert=function(pt,Et){var bt=x.geoAzimuthalEqualAreaRaw.invert(pt/Ve,Et);return bt[0]*=$e,bt},ot}function we(Ve,$e){return[Ve*r($e)/r($e/=2),2*c($e)]}we.invert=function(Ve,$e){var ot=2*L($e/2);return[Ve*r(ot/2)/r(ot),ot]};function Se(){var Ve=2,$e=x.geoProjectionMutator(pe),ot=$e(Ve);return ot.coefficient=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(169.529)}function Ie(Ve,$e,ot){var pt=100,Et,bt,Rt;ot=ot===void 0?0:+ot,$e=+$e;do bt=Ve(ot),Rt=Ve(ot+l),bt===Rt&&(Rt=bt+l),ot-=Et=-1*l*(bt-$e)/(bt-Rt);while(pt-- >0&&E(Et)>l);return pt<0?NaN:ot}function Re(Ve,$e,ot){return $e===void 0&&($e=40),ot===void 0&&(ot=_),function(pt,Et,bt,Rt){var lr,yr,kr;bt=bt===void 0?0:+bt,Rt=Rt===void 0?0:+Rt;for(var jr=0;jr<$e;jr++){var Qr=Ve(bt,Rt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(E(ha)<ot&&E(Aa)<ot)break;var Da=ha*ha+Aa*Aa;if(Da>lr){bt-=yr/=2,Rt-=kr/=2;continue}lr=Da;var ci=(bt>0?-1:1)*ot,Vi=(Rt>0?-1:1)*ot,ji=Ve(bt+ci,Rt),on=Ve(bt,Rt+Vi),An=(ji[0]-Qr[0])/ci,Yn=(ji[1]-Qr[1])/ci,Nn=(on[0]-Qr[0])/Vi,wo=(on[1]-Qr[1])/Vi,os=wo*An-Yn*Nn,So=(E(os)<.5?.5:1)/os;if(yr=(Aa*Nn-ha*wo)*So,kr=(ha*Yn-Aa*An)*So,bt+=yr,Rt+=kr,E(yr)<ot&&E(kr)<ot)break}return[bt,Rt]}}function We(){var Ve=pe(1.68,2),$e=1.4,ot=12;function pt(Et,bt){if(Et+bt<-$e){var Rt=(Et-bt+1.6)*(Et+bt+$e)/8;Et+=Rt,bt-=.8*Rt*c(bt+w/2)}var lr=Ve(Et,bt),yr=(1-r(Et*bt))/ot;return lr[1]<0&&(lr[0]*=1+yr),lr[1]>0&&(lr[1]*=1+yr/1.5*lr[0]*lr[0]),lr}return pt.invert=Re(pt),pt}function at(){return x.geoProjection(We()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(Ve,$e){var ot=Ve*c($e),pt=30,Et;do $e-=Et=($e+c($e)-ot)/(1+r($e));while(E(Et)>l&&--pt>0);return $e/2}function tt(Ve,$e,ot){function pt(Et,bt){return[Ve*Et*r(bt=nt(ot,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=L(bt/$e),[Et/(Ve*r(bt)),L((2*bt+c(2*bt))/ot)]},pt}var qe=tt(b/A,b,w);function he(){return x.geoProjection(qe).scale(169.529)}var ue=2.00276,ne=1.11072;function Ce(Ve,$e){var ot=nt(w,$e);return[ue*Ve/(1/r($e)+ne/r(ot)),($e+b*c(ot))/ue]}Ce.invert=function(Ve,$e){var ot=ue*$e,pt=$e<0?-M:M,Et=25,bt,Rt;do Rt=ot-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Rt))/(2*r(2*pt)+2+w*r(Rt)*b*r(pt));while(E(bt)>l&&--Et>0);return Rt=ot-b*c(pt),[Ve*(1/r(Rt)+ne/r(pt))/ue,Rt]};function Ye(){return x.geoProjection(Ce).scale(160.857)}function rt(Ve){var $e=0,ot=x.geoProjectionMutator(Ve),pt=ot($e);return pt.parallel=function(Et){return arguments.length?ot($e=Et*m):$e*y},pt}function Ke(Ve,$e){return[Ve*r($e),$e]}Ke.invert=function(Ve,$e){return[Ve/r($e),$e]};function Mt(){return x.geoProjection(Ke).scale(152.63)}function kt(Ve){if(!Ve)return Ke;var $e=1/T(Ve);function ot(pt,Et){var bt=$e+Ve-Et,Rt=bt&&pt*r(Et)/bt;return[bt*c(Rt),$e-bt*r(Rt)]}return ot.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Rt=$e+Ve-bt;return[bt/r(Rt)*t(pt,Et),Rt]},ot}function Nt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Gt(Ve){function $e(ot,pt){var Et=A-pt,bt=Et&&ot*Ve*c(Et)/Et;return[Et*c(bt)/Ve,A-Et*r(bt)]}return $e.invert=function(ot,pt){var Et=ot*Ve,bt=A-pt,Rt=F(Et*Et+bt*bt),lr=t(Et,bt);return[(Rt?Rt/c(Rt):1)*lr/Ve,A-Rt]},$e}function Mr(){var Ve=.5,$e=x.geoProjectionMutator(Gt),ot=$e(Ve);return ot.fraction=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(158.837)}var mr=tt(1,4/w,w);function qr(){return x.geoProjection(mr).scale(152.63)}function Er(Ve,$e,ot,pt,Et,bt){var Rt=r(bt),lr;if(E(Ve)>1||E(bt)>1)lr=z(ot*Et+$e*pt*Rt);else{var yr=c(Ve/2),kr=c(bt/2);lr=2*L(F(yr*yr+$e*pt*kr*kr))}return E(lr)>l?[lr,t(pt*c(bt),$e*Et-ot*pt*Rt)]:[0,0]}function Ir(Ve,$e,ot){return z((Ve*Ve+$e*$e-ot*ot)/(2*Ve*$e))}function _t(Ve){return Ve-2*w*a((Ve+w)/(2*w))}function Oe(Ve,$e,ot){for(var pt=[[Ve[0],Ve[1],c(Ve[1]),r(Ve[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[ot[0],ot[1],c(ot[1]),r(ot[1])]],Et=pt[2],bt,Rt=0;Rt<3;++Rt,Et=bt)bt=pt[Rt],Et.v=Er(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var lr=Ir(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ir(pt[0].v[0],pt[1].v[0],pt[2].v[0]),kr=w-lr;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var jr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*r(lr),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(lr))];function Qr(ha,Aa){var Da=c(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var on=pt[ji];if(Vi[ji]=Er(Aa-on[1],on[3],on[2],ci,Da,ha-on[0]),!Vi[ji][0])return on.point;Vi[ji][1]=_t(Vi[ji][1]-on.v[1])}var An=jr.slice();for(ji=0;ji<3;++ji){var Yn=ji==2?0:ji+1,Nn=Ir(pt[ji].v[0],Vi[ji][0],Vi[Yn][0]);Vi[ji][1]<0&&(Nn=-Nn),ji?ji==1?(Nn=yr-Nn,An[0]-=Vi[ji][0]*r(Nn),An[1]-=Vi[ji][0]*c(Nn)):(Nn=kr-Nn,An[0]+=Vi[ji][0]*r(Nn),An[1]+=Vi[ji][0]*c(Nn)):(An[0]+=Vi[ji][0]*r(Nn),An[1]-=Vi[ji][0]*c(Nn))}return An[0]/=3,An[1]/=3,An}return Qr}function Je(Ve){return Ve[0]*=m,Ve[1]*=m,Ve}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(Ve,$e,ot){var pt=x.geoCentroid({type:"MultiPoint",coordinates:[Ve,$e,ot]}),Et=[-pt[0],-pt[1]],bt=x.geoRotation(Et),Rt=Oe(Je(bt(Ve)),Je(bt($e)),Je(bt(ot)));Rt.invert=Re(Rt);var lr=x.geoProjection(Rt).rotate(Et),yr=lr.center;return delete lr.rotate,lr.center=function(kr){return arguments.length?yr(bt(kr)):bt.invert(yr())},lr.clipAngle(90)}function Ue(Ve,$e){var ot=F(1-c($e));return[2/p*Ve*ot,p*(1-ot)]}Ue.invert=function(Ve,$e){var ot=(ot=$e/p-1)*ot;return[ot>0?Ve*F(w/ot)/2:0,L(1-ot)]};function Ze(){return x.geoProjection(Ue).scale(95.6464).center([0,30])}function st(Ve){var $e=T(Ve);function ot(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return ot.invert=$e?function(pt,Et){pt&&(Et*=c(pt)/pt);var bt=r(pt);return[pt,2*t(F(bt*bt+$e*$e-Et*Et)-bt,$e-Et)]}:function(pt,Et){return[pt,L(pt?Et*T(pt)/pt:Et)]},ot}function ut(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(Ve,$e){return[Ut*Ve*(2*r(2*$e/3)-1)/p,Ut*p*c($e/3)]}Ct.invert=function(Ve,$e){var ot=3*L($e/(Ut*p));return[p*Ve/(Ut*(2*r(2*ot/3)-1)),ot]};function Pt(){return x.geoProjection(Ct).scale(156.19)}function jt(Ve){var $e=r(Ve);function ot(pt,Et){return[pt*$e,c(Et)/$e]}return ot.invert=function(pt,Et){return[pt/$e,L(Et*$e)]},ot}function fr(){return rt(jt).parallel(38.58).scale(195.044)}function ur(Ve){var $e=r(Ve);function ot(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return ot.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},ot}function sr(){return rt(ur).scale(124.75)}function Pr(Ve,$e){var ot=F(8/(3*w));return[ot*Ve*(1-E($e)/w),ot*$e]}Pr.invert=function(Ve,$e){var ot=F(8/(3*w)),pt=$e/ot;return[Ve/(ot*(1-E(pt)/w)),pt]};function Ta(){return x.geoProjection(Pr).scale(165.664)}function Oa(Ve,$e){var ot=F(4-3*c(E($e)));return[2/F(6*w)*Ve*ot,v($e)*F(2*w/3)*(2-ot)]}Oa.invert=function(Ve,$e){var ot=2-E($e)/F(2*w/3);return[Ve*F(6*w)/(2*ot),v($e)*L((4-ot*ot)/3)]};function Ia(){return x.geoProjection(Oa).scale(165.664)}function qa(Ve,$e){var ot=F(w*(4+w));return[2/ot*Ve*(1+F(1-4*$e*$e/(w*w))),4/ot*$e]}qa.invert=function(Ve,$e){var ot=F(w*(4+w))/2;return[Ve*ot/(1+F(1-$e*$e*(4+w)/(4*w))),$e*ot/2]};function Wa(){return x.geoProjection(qa).scale(180.739)}function Ca(Ve,$e){var ot=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&E(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-ot)/(2*bt*(1+bt))}return[2/F(w*(4+w))*Ve*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(Ve,$e){var ot=$e*F((4+w)/w)/2,pt=L(ot),Et=r(pt);return[Ve/(2/F(w*(4+w))*(1+Et)),L((pt+ot*(Et+2))/(2+A))]};function hi(){return x.geoProjection(Ca).scale(180.739)}function wi(Ve,$e){return[Ve*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(Ve,$e){var ot=F(2+w),pt=$e*ot/2;return[ot*Ve/(1+r(pt)),pt]};function Kt(){return x.geoProjection(wi).scale(173.044)}function Dt(Ve,$e){for(var ot=(1+A)*c($e),pt=0,Et=1/0;pt<10&&E(Et)>l;pt++)$e-=Et=($e+c($e)-ot)/(1+r($e));return ot=F(2+w),[Ve*(1+r($e))/ot,2*$e/ot]}Dt.invert=function(Ve,$e){var ot=1+A,pt=F(ot/2);return[Ve*2*pt/(1+r($e*=pt)),L(($e+c($e))/ot)]};function Yt(){return x.geoProjection(Dt).scale(173.044)}var Jt=3+2*b;function Fr(Ve,$e){var ot=c(Ve/=2),pt=r(Ve),Et=F(r($e)),bt=r($e/=2),Rt=c($e)/(bt+b*pt*Et),lr=F(2/(1+Rt*Rt)),yr=F((b*bt+(pt+ot)*Et)/(b*bt+(pt-ot)*Et));return[Jt*(lr*(yr-1/yr)-2*n(yr)),Jt*(lr*Rt*(yr+1/yr)-2*e(Rt))]}Fr.invert=function(Ve,$e){if(!(bt=Y.invert(Ve/1.2,$e*1.065)))return null;var ot=bt[0],pt=bt[1],Et=20,bt;Ve/=Jt,$e/=Jt;do{var Rt=ot/2,lr=pt/2,yr=c(Rt),kr=r(Rt),jr=c(lr),Qr=r(lr),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*kr*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(kr+yr)*Aa,on=b*Qr+(kr-yr)*Aa,An=ji/on,Yn=F(An),Nn=Yn-1/Yn,wo=Yn+1/Yn,os=Vi*Nn-2*n(Yn)-Ve,So=Vi*Da*wo-2*e(Da)-$e,Zo=jr&&g*Aa*yr*ci/jr,hs=(b*kr*Qr+Aa)/(2*(Qr+b*kr*Aa)*(Qr+b*kr*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Zo,Jo=ul*hs,$o=($o=2*Qr+b*Aa*(kr-yr))*$o*Yn,Il=(b*kr*Qr*Aa+ha)/$o,eu=-(b*yr*jr)/(Aa*$o),Ru=Nn*tl-2*Il/Yn+Vi*(Il+Il/An),vu=Nn*Jo-2*eu/Yn+Vi*(eu+eu/An),Tl=Da*wo*tl-2*Zo/(1+ci)+Vi*wo*Zo+Vi*Da*(Il-Il/An),cu=Da*wo*Jo-2*hs/(1+ci)+Vi*wo*hs+Vi*Da*(eu-eu/An),uc=vu*Tl-cu*Ru;if(!uc)break;var Vl=(So*vu-os*cu)/uc,Gl=(os*Tl-So*Ru)/uc;ot-=Vl,pt=i(-A,s(A,pt-Gl))}while((E(Vl)>l||E(Gl)>l)&&--Et>0);return E(E(pt)-A)<l?[0,pt]:Et&&[ot,pt]};function ta(){return x.geoProjection(Fr).scale(62.5271)}var ra=r(35*m);function ca(Ve,$e){var ot=T($e/2);return[Ve*ra*F(1-ot*ot),(1+ra)*ot]}ca.invert=function(Ve,$e){var ot=$e/(1+ra);return[Ve&&Ve/(ra*F(1-ot*ot)),2*e(ot)]};function Ba(){return x.geoProjection(ca).scale(137.152)}function $a(Ve,$e){var ot=$e/2,pt=r(ot);return[2*Ve/p*r($e)*pt*pt,p*T(ot)]}$a.invert=function(Ve,$e){var ot=e($e/p),pt=r(ot),Et=2*ot;return[Ve*p/2/(r(Et)*pt*pt),Et]};function Za(){return x.geoProjection($a).scale(135.264)}function ri(Ve){var $e=1-Ve,ot=bt(w,0)[0]-bt(-w,0)[0],pt=bt(0,A)[1]-bt(0,-A)[1],Et=F(2*pt/ot);function bt(yr,kr){var jr=r(kr),Qr=c(kr);return[jr/($e+Ve*jr)*yr,$e*kr+Ve*Qr]}function Rt(yr,kr){var jr=bt(yr,kr);return[jr[0]*Et,jr[1]/Et]}function lr(yr){return Rt(0,yr)[1]}return Rt.invert=function(yr,kr){var jr=Ie(lr,kr),Qr=yr/Et*(Ve+$e/r(jr));return[Qr,jr]},Rt}function pi(){var Ve=.5,$e=x.geoProjectionMutator(ri),ot=$e(Ve);return ot.alpha=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(168.725)}function Ra(Ve){return[Ve[0]/2,L(T(Ve[1]/2*m))*y]}function an(Ve){return[Ve[0]*2,2*e(c(Ve[1]*m))*y]}function tn(Ve){Ve==null&&(Ve=x.geoOrthographic);var $e=Ve(),ot=x.geoEquirectangular().scale(y).precision(0).clipAngle(null).translate([0,0]);function pt(bt){return $e(Ra(bt))}$e.invert&&(pt.invert=function(bt){return an($e.invert(bt))}),pt.stream=function(bt){var Rt=$e.stream(bt),lr=ot.stream({point:function(yr,kr){Rt.point(yr/2,L(T(-kr/2*m))*y)},lineStart:function(){Rt.lineStart()},lineEnd:function(){Rt.lineEnd()},polygonStart:function(){Rt.polygonStart()},polygonEnd:function(){Rt.polygonEnd()}});return lr.sphere=Rt.sphere,lr};function Et(bt){pt[bt]=function(){return arguments.length?($e[bt].apply($e,arguments),pt):$e[bt]()}}return pt.rotate=function(bt){return arguments.length?(ot.rotate(bt),pt):ot.rotate()},pt.center=function(bt){return arguments.length?($e.center(Ra(bt)),pt):an($e.center())},Et("angle"),Et("clipAngle"),Et("clipExtent"),Et("fitExtent"),Et("fitHeight"),Et("fitSize"),Et("fitWidth"),Et("scale"),Et("translate"),Et("precision"),pt.scale(249.5)}function fn(Ve,$e){var ot=2*w/$e,pt=Ve*Ve;function Et(bt,Rt){var lr=x.geoAzimuthalEquidistantRaw(bt,Rt),yr=lr[0],kr=lr[1],jr=yr*yr+kr*kr;if(jr>pt){var Qr=F(jr),ha=t(kr,yr),Aa=ot*f(ha/ot),Da=ha-Aa,ci=Ve*r(Da),Vi=(Ve*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-Ve)/lt(ji,ci,w);yr=Qr;var An=50,Yn;do yr-=Yn=(Ve+lt(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(E(Yn)>l&&--An>0);kr=Da*c(yr),yr<A&&(kr-=Vi*(yr-A));var Nn=c(Aa),wo=r(Aa);lr[0]=yr*wo-kr*Nn,lr[1]=yr*Nn+kr*wo}return lr}return Et.invert=function(bt,Rt){var lr=bt*bt+Rt*Rt;if(lr>pt){var yr=F(lr),kr=t(Rt,bt),jr=ot*f(kr/ot),Qr=kr-jr;bt=yr*r(Qr),Rt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Rt/Aa,ci=bt<A?1/0:0,Vi=10;;){var ji=Ve*c(Da),on=Ve*r(Da),An=c(on),Yn=A-on,Nn=(ji-Da*An)/Yn,wo=xt(Da,Nn);if(E(ci)<_||!--Vi)break;Da-=ci=(Da*Aa-Nn*ha-Rt)/(Aa-ha*2*(Yn*(on+Da*ji*r(on)-An)-ji*(ji-Da*An))/(Yn*Yn))}yr=Ve+lt(wo,on,bt)*(w-Ve)/lt(wo,on,w),kr=jr+Da,bt=yr*r(kr),Rt=yr*c(kr)}return x.geoAzimuthalEquidistantRaw.invert(bt,Rt)},Et}function xt(Ve,$e){return function(ot){var pt=Ve*r(ot);return ot<A&&(pt-=$e),F(1+pt*pt)}}function lt(Ve,$e,ot){for(var pt=50,Et=(ot-$e)/pt,bt=Ve($e)+Ve(ot),Rt=1,lr=$e;Rt<pt;++Rt)bt+=2*Ve(lr+=Et);return bt*.5*Et}function Br(){var Ve=6,$e=30*m,ot=r($e),pt=c($e),Et=x.geoProjectionMutator(fn),bt=Et($e,Ve),Rt=bt.stream,lr=.01,yr=-r(lr*m),kr=c(lr*m);return bt.radius=function(jr){return arguments.length?(ot=r($e=jr*m),pt=c($e),Et($e,Ve)):$e*y},bt.lobes=function(jr){return arguments.length?Et($e,Ve=+jr):Ve},bt.stream=function(jr){var Qr=bt.rotate(),ha=Rt(jr),Aa=(bt.rotate([0,0]),Rt(jr));return bt.rotate(Qr),ha.sphere=function(){Aa.polygonStart(),Aa.lineStart();for(var Da=0,ci=2*w/Ve,Vi=0;Da<Ve;++Da,Vi-=ci)Aa.point(t(kr*r(Vi),yr)*y,L(kr*c(Vi))*y),Aa.point(t(pt*r(Vi-ci/2),ot)*y,L(pt*c(Vi-ci/2))*y);Aa.lineEnd(),Aa.polygonEnd()},ha},bt.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function Cr(Ve,$e,ot,pt,Et,bt,Rt,lr){arguments.length<8&&(lr=0);function yr(kr,jr){if(!jr)return[Ve*kr/w,0];var Qr=jr*jr,ha=Ve+Qr*($e+Qr*(ot+Qr*pt)),Aa=jr*(Et-1+Qr*(bt-lr+Qr*Rt)),Da=(ha*ha+Aa*Aa)/(2*Aa),ci=kr*L(ha/Da)/w;return[Da*c(ci),jr*(1+Qr*lr)+Da*(1-r(ci))]}return yr.invert=function(kr,jr){var Qr=w*kr/Ve,ha=jr,Aa,Da,ci=50;do{var Vi=ha*ha,ji=Ve+Vi*($e+Vi*(ot+Vi*pt)),on=ha*(Et-1+Vi*(bt-lr+Vi*Rt)),An=ji*ji+on*on,Yn=2*on,Nn=An/Yn,wo=Nn*Nn,os=L(ji/Nn)/w,So=Qr*os,Zo=ji*ji,hs=(2*$e+Vi*(4*ot+Vi*6*pt))*ha,ul=Et+Vi*(3*bt+Vi*5*Rt),tl=2*(ji*hs+on*(ul-1)),Jo=2*(ul-1),$o=(tl*Yn-An*Jo)/(Yn*Yn),Il=r(So),eu=c(So),Ru=Nn*Il,vu=Nn*eu,Tl=Qr/w*(1/F(1-Zo/wo))*(hs*Nn-ji*$o)/wo,cu=vu-kr,uc=ha*(1+Vi*lr)+Nn-Ru-jr,Vl=$o*eu+Ru*Tl,Gl=Ru*os,me=1+$o-($o*Il-vu*Tl),De=vu*os,et=Vl*De-me*Gl;if(!et)break;Qr-=Aa=(uc*Vl-cu*me)/et,ha-=Da=(cu*De-uc*Gl)/et}while((E(Aa)>l||E(Da)>l)&&--ci>0);return[Qr,ha]},yr}var xr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return x.geoProjection(xr).scale(149.995)}var Ur=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return x.geoProjection(Ur).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Xt(){return x.geoProjection(gt).scale(130.945)}function vr(Ve,$e){var ot=Ve*Ve,pt=$e*$e;return[Ve*(1-.162388*pt)*(.87-952426e-9*ot*ot),$e*(1+pt/12)]}vr.invert=function(Ve,$e){var ot=Ve,pt=$e,Et=50,bt;do{var Rt=pt*pt;pt-=bt=(pt*(1+Rt/12)-$e)/(1+Rt/4)}while(E(bt)>l&&--Et>0);Et=50,Ve/=1-.162388*Rt;do{var lr=(lr=ot*ot)*lr;ot-=bt=(ot*(.87-952426e-9*lr)-Ve)/(.87-.00476213*lr)}while(E(bt)>l&&--Et>0);return[ot,pt]};function Or(){return x.geoProjection(vr).scale(131.747)}var ba=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return x.geoProjection(ba).scale(131.087)}function ma(Ve){var $e=Ve(A,0)[0]-Ve(-A,0)[0];function ot(pt,Et){var bt=pt>0?-.5:.5,Rt=Ve(pt+bt*w,Et);return Rt[0]-=bt*$e,Rt}return Ve.invert&&(ot.invert=function(pt,Et){var bt=pt>0?-.5:.5,Rt=Ve.invert(pt+bt*$e,Et),lr=Rt[0]-bt*w;return lr<-w?lr+=2*w:lr>w&&(lr-=2*w),Rt[0]=lr,Rt}),ot}function la(Ve,$e){var ot=v(Ve),pt=v($e),Et=r($e),bt=r(Ve)*Et,Rt=c(Ve)*Et,lr=c(pt*$e);Ve=E(t(Rt,lr)),$e=L(bt),E(Ve-A)>l&&(Ve%=A);var yr=_a(Ve>w/4?A-Ve:Ve,$e);return Ve>w/4&&(lr=yr[0],yr[0]=-yr[1],yr[1]=-lr),yr[0]*=ot,yr[1]*=-pt,yr}la.invert=function(Ve,$e){E(Ve)>1&&(Ve=v(Ve)*2-Ve),E($e)>1&&($e=v($e)*2-$e);var ot=v(Ve),pt=v($e),Et=-ot*Ve,bt=-pt*$e,Rt=bt/Et<1,lr=Ai(Rt?bt:Et,Rt?Et:bt),yr=lr[0],kr=lr[1],jr=r(kr);return Rt&&(yr=-A-yr),[ot*(t(c(yr)*jr,-c(kr))+w),pt*L(r(yr)*jr)]};function _a(Ve,$e){if($e===A)return[0,0];var ot=c($e),pt=ot*ot,Et=pt*pt,bt=1+Et,Rt=1+3*Et,lr=1-Et,yr=L(1/F(bt)),kr=lr+pt*bt*yr,jr=(1-ot)/kr,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*lr,ci,Vi;if(Ve===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,An=2*ot*ji,Yn=(-3*pt+yr*Rt)*An,Nn=(-kr*ji-(1-ot)*Yn)/(kr*kr),wo=.5*Nn/Qr,os=lr*wo-2*pt*Qr*An,So=pt*bt*Nn+jr*Rt*An,Zo=-on*An,hs=-on*So,ul=-2*on*os,tl=4*Ve/w,Jo;if(Ve>.222*w||$e<w/4&&Ve>.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),Ve>w/4)return[ci,ci];var $o=ci,Il=.5*ci;ci=.5*(Il+$o),Vi=50;do{var eu=F(ha-ci*ci),Ru=ci*(ul+Zo*eu)+hs*L(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:$o=ci,ci=.5*(Il+$o)}while(E($o-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,Tl=F(ha-vu),cu=ul+Zo*Tl,uc=ci*cu+hs*L(ci/Aa)-tl,Vl=cu+(hs-Zo*vu)/Tl;ci-=Jo=Tl?uc/Vl:0}while(E(Jo)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(Ve,$e){for(var ot=0,pt=1,Et=.5,bt=50;;){var Rt=Et*Et,lr=F(Et),yr=L(1/F(1+Rt)),kr=1-Rt+Et*(1+Rt)*yr,jr=(1-lr)/kr,Qr=F(jr),ha=jr*(1+Rt),Aa=Qr*(1-Rt),Da=ha-Ve*Ve,ci=F(Da),Vi=$e+Aa+Et*ci;if(E(pt-ot)<_||--bt===0||Vi===0)break;Vi>0?ot=Et:pt=Et,Et=.5*(ot+pt)}if(!bt)return null;var ji=L(lr),on=r(ji),An=1/on,Yn=2*lr*on,Nn=(-3*Et+yr*(1+3*Rt))*Yn,wo=(-kr*on-(1-lr)*Nn)/(kr*kr),os=.5*wo/Qr,So=(1-Rt)*os-2*Et*Qr*Yn,Zo=-2*An*So,hs=-An*Yn,ul=-An*(Et*(1+Rt)*wo+jr*(1+3*Rt)*Yn);return[w/4*(Ve*(Zo+hs*ci)+ul*L(Ve/F(ha))),ji]}function ki(){return x.geoProjection(ma(la)).scale(239.75)}function Ki(Ve,$e,ot){var pt,Et,bt;return Ve?(pt=yn(Ve,ot),$e?(Et=yn($e,1-ot),bt=Et[1]*Et[1]+ot*pt[0]*pt[0]*Et[0]*Et[0],[[pt[0]*Et[2]/bt,pt[1]*pt[2]*Et[0]*Et[1]/bt],[pt[1]*Et[1]/bt,-pt[0]*pt[2]*Et[0]*Et[2]/bt],[pt[2]*Et[1]*Et[2]/bt,-ot*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=yn($e,1-ot),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function yn(Ve,$e){var ot,pt,Et,bt,Rt;if($e<l)return bt=c(Ve),pt=r(Ve),ot=$e*(Ve-bt*pt)/4,[bt-ot*pt,pt+ot*bt,1-$e*bt*bt/2,Ve-ot];if($e>=1-l)return ot=(1-$e)/4,pt=P(Ve),bt=N(Ve),Et=1/pt,Rt=pt*O(Ve),[bt+ot*(Rt-Ve)/(pt*pt),Et-ot*bt*Et*(Rt-Ve),Et+ot*bt*Et*(Rt+Ve),2*e(o(Ve))-A+ot*(Rt-Ve)/pt];var lr=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],kr=0;for(pt=F(1-$e),Rt=1;E(yr[kr]/lr[kr])>l&&kr<8;)ot=lr[kr++],yr[kr]=(ot-pt)/2,lr[kr]=(ot+pt)/2,pt=F(ot*pt),Rt*=2;Et=Rt*lr[kr]*Ve;do bt=yr[kr]*c(pt=Et)/lr[kr],Et=(L(bt)+Et)/2;while(--kr);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function Ln(Ve,$e,ot){var pt=E(Ve),Et=E($e),bt=O(Et);if(pt){var Rt=1/c(pt),lr=1/(T(pt)*T(pt)),yr=-(lr+ot*(bt*bt*Rt*Rt)-1+ot),kr=(ot-1)*lr,jr=(-yr+F(yr*yr-4*kr))/2;return[kn(e(1/F(jr)),ot)*v(Ve),kn(e(F((jr/lr-1)/ot)),1-ot)*v($e)]}return[0,kn(e(bt),1-ot)*v($e)]}function kn(Ve,$e){if(!$e)return Ve;if($e===1)return n(T(Ve/2+M));for(var ot=1,pt=F(1-$e),Et=F($e),bt=0;E(Et)>l;bt++){if(Ve%w){var Rt=e(pt*T(Ve)/ot);Rt<0&&(Rt+=w),Ve+=Rt+~~(Ve/w)*w}else Ve+=Ve;Et=(ot+pt)/2,pt=F(ot*pt),Et=((ot=Et)-pt)/2}return Ve/(h(2,bt)*ot)}function Bn(Ve,$e){var ot=(b-1)/(b+1),pt=F(1-ot*ot),Et=kn(A,pt*pt),bt=-1,Rt=n(T(w/4+E($e)/2)),lr=o(bt*Rt)/F(ot),yr=ao(lr*r(bt*Ve),lr*c(bt*Ve)),kr=Ln(yr[0],yr[1],pt*pt);return[-kr[1],($e>=0?1:-1)*(.5*Et-kr[0])]}function ao(Ve,$e){var ot=Ve*Ve,pt=$e+1,Et=1-ot-$e*$e;return[.5*((Ve>=0?A:-A)-t(Et,2*Ve)),-.25*n(Et*Et+4*ot)+.5*n(pt*pt+ot)]}function xo(Ve,$e){var ot=$e[0]*$e[0]+$e[1]*$e[1];return[(Ve[0]*$e[0]+Ve[1]*$e[1])/ot,(Ve[1]*$e[0]-Ve[0]*$e[1])/ot]}Bn.invert=function(Ve,$e){var ot=(b-1)/(b+1),pt=F(1-ot*ot),Et=kn(A,pt*pt),bt=-1,Rt=Ki(.5*Et-$e,-Ve,pt*pt),lr=xo(Rt[0],Rt[1]),yr=t(lr[1],lr[0])/bt;return[yr,2*e(o(.5/bt*n(ot*lr[0]*lr[0]+ot*lr[1]*lr[1])))-A]};function Co(){return x.geoProjection(ma(Bn)).scale(151.496)}function Fs(Ve){var $e=c(Ve),ot=r(Ve),pt=Mn(Ve);pt.invert=Mn(-Ve);function Et(bt,Rt){var lr=pt(bt,Rt);bt=lr[0],Rt=lr[1];var yr=c(Rt),kr=r(Rt),jr=r(bt),Qr=z($e*yr+ot*kr*jr),ha=c(Qr),Aa=E(ha)>l?Qr/ha:1;return[Aa*ot*c(bt),(E(bt)>A?Aa:-Aa)*($e*kr-ot*yr*jr)]}return Et.invert=function(bt,Rt){var lr=F(bt*bt+Rt*Rt),yr=-c(lr),kr=r(lr),jr=lr*kr,Qr=-Rt*yr,ha=lr*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(lr>A?-1:1)*t(bt*yr,lr*r(Da)*kr+Rt*c(Da)*yr);return pt.invert(ci,Da)},Et}function Mn(Ve){var $e=c(Ve),ot=r(Ve);return function(pt,Et){var bt=r(Et),Rt=r(pt)*bt,lr=c(pt)*bt,yr=c(Et);return[t(lr,Rt*ot-yr*$e),L(yr*ot+Rt*$e)]}}function Ao(){var Ve=0,$e=x.geoProjectionMutator(Fs),ot=$e(Ve),pt=ot.rotate,Et=ot.stream,bt=x.geoCircle();return ot.parallel=function(Rt){if(!arguments.length)return Ve*y;var lr=ot.rotate();return $e(Ve=Rt*m).rotate(lr)},ot.rotate=function(Rt){return arguments.length?(pt.call(ot,[Rt[0],Rt[1]-Ve*y]),bt.center([-Rt[0],-Rt[1]]),ot):(Rt=pt.call(ot),Rt[1]+=Ve*y,Rt)},ot.stream=function(Rt){return Rt=Et(Rt),Rt.sphere=function(){Rt.polygonStart();var lr=.01,yr=bt.radius(90-lr)().coordinates[0],kr=yr.length-1,jr=-1,Qr;for(Rt.lineStart();++jr<kr;)Rt.point((Qr=yr[jr])[0],Qr[1]);for(Rt.lineEnd(),yr=bt.radius(90+lr)().coordinates[0],kr=yr.length-1,Rt.lineStart();--jr>=0;)Rt.point((Qr=yr[jr])[0],Qr[1]);Rt.lineEnd(),Rt.polygonEnd()},Rt},ot.scale(79.4187).parallel(45).clipAngle(180-.001)}var On=3,ts=L(1-1/On)*y,is=jt(0);function _s(Ve){var $e=ts*m,ot=Ue(w,$e)[0]-Ue(-w,$e)[0],pt=is(0,$e)[1],Et=Ue(0,$e)[1],bt=p-Et,Rt=u/Ve,lr=4/u,yr=pt+bt*bt*4/u;function kr(jr,Qr){var ha,Aa=E(Qr);if(Aa>$e){var Da=s(Ve-1,i(0,a((jr+w)/Rt)));jr+=w*(Ve-1)/Ve-Da*Rt,ha=Ue(jr,Aa),ha[0]=ha[0]*u/ot-u*(Ve-1)/(2*Ve)+Da*u/Ve,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=is(jr,Qr);return ha[0]*=lr,ha[1]/=yr,ha}return kr.invert=function(jr,Qr){jr/=lr,Qr*=yr;var ha=E(Qr);if(ha>pt){var Aa=s(Ve-1,i(0,a((jr+w)/Rt)));jr=(jr+w*(Ve-1)/Ve-Aa*Rt)*ot/u;var Da=Ue.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(Ve-1)/Ve-Aa*Rt,Qr<0&&(Da[1]=-Da[1]),Da}return is.invert(jr,Qr)},kr}function Oo(Ve,$e){return[Ve,$e&1?90-l:ts]}function io(Ve,$e){return[Ve,$e&1?-90+l:-ts]}function Gn(Ve){return[Ve[0]*(1-l),Ve[1]]}function eo(Ve){var $e=[].concat(S.range(-180,180+Ve/2,Ve).map(Oo),S.range(180,-180-Ve/2,-Ve).map(io));return{type:"Polygon",coordinates:[Ve===180?$e.map(Gn):$e]}}function ns(){var Ve=4,$e=x.geoProjectionMutator(_s),ot=$e(Ve),pt=ot.stream;return ot.lobes=function(Et){return arguments.length?$e(Ve=+Et):Ve},ot.stream=function(Et){var bt=ot.rotate(),Rt=pt(Et),lr=(ot.rotate([0,0]),pt(Et));return ot.rotate(bt),Rt.sphere=function(){x.geoStream(eo(180/Ve),lr)},Rt},ot.scale(239.75)}function gs(Ve){var $e=1+Ve,ot=c(1/$e),pt=L(ot),Et=2*F(w/(bt=w+4*pt*$e)),bt,Rt=.5*Et*($e+F(Ve*(2+Ve))),lr=Ve*Ve,yr=$e*$e;function kr(jr,Qr){var ha=1-c(Qr),Aa,Da;if(ha&&ha<2){var ci=A-Qr,Vi=25,ji;do{var on=c(ci),An=r(ci),Yn=pt+t(on,$e-An),Nn=1+yr-2*$e*An;ci-=ji=(ci-lr*pt-$e*on+Nn*Yn-.5*ha*bt)/(2*$e*on*Yn)}while(E(ji)>_&&--Vi>0);Aa=Et*F(Nn),Da=jr*Yn/w}else Aa=Et*(Ve+ha),Da=jr*pt/w;return[Aa*c(Da),Rt-Aa*r(Da)]}return kr.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Rt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[L(jr/F(ha))*w/Vi,L(1-2*(Da-lr*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},kr}function Ls(){var Ve=1,$e=x.geoProjectionMutator(gs),ot=$e(Ve);return ot.ratio=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(167.774).center([0,18.67])}var Xo=.7109889596207567,Gi=.0528035274542;function Pn(Ve,$e){return $e>-Xo?(Ve=qe(Ve,$e),Ve[1]+=Gi,Ve):Ke(Ve,$e)}Pn.invert=function(Ve,$e){return $e>-Xo?qe.invert(Ve,$e-Gi):Ke.invert(Ve,$e)};function js(){return x.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function xs(Ve,$e){return E($e)>Xo?(Ve=qe(Ve,$e),Ve[1]-=$e>0?Gi:-Gi,Ve):Ke(Ve,$e)}xs.invert=function(Ve,$e){return E($e)>Xo?qe.invert(Ve,$e+($e>0?Gi:-Gi)):Ke.invert(Ve,$e)};function Hn(){return x.geoProjection(xs).scale(152.63)}function Os(Ve,$e,ot,pt){var Et=F(4*w/(2*ot+(1+Ve-$e/2)*c(2*ot)+(Ve+$e)/2*c(4*ot)+$e/2*c(6*ot))),bt=F(pt*c(ot)*F((1+Ve*r(2*ot)+$e*r(4*ot))/(1+Ve+$e))),Rt=ot*yr(1);function lr(Qr){return F(1+Ve*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*ot;return(2*ha+(1+Ve-$e/2)*c(2*ha)+(Ve+$e)/2*c(4*ha)+$e/2*c(6*ha))/ot}function kr(Qr){return lr(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=ot*Ie(yr,Rt*c(ha)/ot,ha/w);isNaN(Aa)&&(Aa=ot*v(ha));var Da=Et*lr(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Ie(kr,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*lr(Aa)),L(ot*yr(Aa/ot)/Rt)]},ot===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,L(ha*Et)]}),jr}function ds(){var Ve=1,$e=0,ot=45*m,pt=2,Et=x.geoProjectionMutator(Os),bt=Et(Ve,$e,ot,pt);return bt.a=function(Rt){return arguments.length?Et(Ve=+Rt,$e,ot,pt):Ve},bt.b=function(Rt){return arguments.length?Et(Ve,$e=+Rt,ot,pt):$e},bt.psiMax=function(Rt){return arguments.length?Et(Ve,$e,ot=+Rt*m,pt):ot*y},bt.ratio=function(Rt){return arguments.length?Et(Ve,$e,ot,pt=+Rt):pt},bt.scale(180.739)}function Xs(Ve,$e,ot,pt,Et,bt,Rt,lr,yr,kr,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,An,Yn;if(Qr=ot-$e,ha=Ve($e+Qr*.25),Aa=Ve(ot-Qr*.25),isNaN(ha)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return Da=Qr*(pt+4*ha+Et)/12,ci=Qr*(Et+4*Aa+bt)/12,Vi=Da+ci,Yn=(Vi-Rt)/15,kr>yr?(jr.maxDepthCount++,Vi+Yn):Math.abs(Yn)<lr?Vi+Yn:(ji=$e+Qr*.5,on=Xs(Ve,$e,ji,pt,ha,Et,Da,lr*.5,yr,kr+1,jr),isNaN(on)?(jr.nanEncountered=!0,NaN):(An=Xs(Ve,ji,ot,Et,Aa,bt,ci,lr*.5,yr,kr+1,jr),isNaN(An)?(jr.nanEncountered=!0,NaN):on+An))}function il(Ve,$e,ot,pt,Et){var bt={maxDepthCount:0,nanEncountered:!1};pt===void 0&&(pt=1e-8),Et===void 0&&(Et=20);var Rt=Ve($e),lr=Ve(.5*($e+ot)),yr=Ve(ot),kr=(Rt+4*lr+yr)*(ot-$e)/6,jr=Xs(Ve,$e,ot,Rt,lr,yr,kr,pt,Et,1,bt);return jr}function _n(Ve,$e,ot){function pt(Aa){return Ve+(1-Ve)*h(1-h(Aa,$e),1/$e)}function Et(Aa){return il(pt,0,Aa,1e-4)}for(var bt=1/Et(1),Rt=1e3,lr=(1+1e-8)*bt,yr=[],kr=0;kr<=Rt;kr++)yr.push(Et(kr/Rt)*lr);function jr(Aa){var Da=0,ci=Rt,Vi=Rt>>1;do yr[Vi]>Aa?ci=Vi:Da=Vi,Vi=Da+ci>>1;while(Vi>Da);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/Rt}var Qr=2*jr(1)/w*bt/ot,ha=function(Aa,Da){var ci=jr(E(c(Da))),Vi=pt(ci)*Aa;return ci/=Qr,[Vi,Da>=0?ci:-ci]};return ha.invert=function(Aa,Da){var ci;return Da*=Qr,E(Da)<1&&(ci=v(Da)*L(Et(E(Da))*bt)),[Aa/pt(E(Da)),ci]},ha}function Lo(){var Ve=0,$e=2.5,ot=1.183136,pt=x.geoProjectionMutator(_n),Et=pt(Ve,$e,ot);return Et.alpha=function(bt){return arguments.length?pt(Ve=+bt,$e,ot):Ve},Et.k=function(bt){return arguments.length?pt(Ve,$e=+bt,ot):$e},Et.gamma=function(bt){return arguments.length?pt(Ve,$e,ot=+bt):ot},Et.scale(152.63)}function bo(Ve,$e){return E(Ve[0]-$e[0])<l&&E(Ve[1]-$e[1])<l}function Rs(Ve,$e){for(var ot=-1,pt=Ve.length,Et=Ve[0],bt,Rt,lr,yr=[];++ot<pt;){bt=Ve[ot],Rt=(bt[0]-Et[0])/$e,lr=(bt[1]-Et[1])/$e;for(var kr=0;kr<$e;++kr)yr.push([Et[0]+kr*Rt,Et[1]+kr*lr]);Et=bt}return yr.push(bt),yr}function pu(Ve){var $e=[],ot,pt,Et,bt,Rt,lr,yr,kr=Ve[0].length;for(yr=0;yr<kr;++yr)ot=Ve[0][yr],pt=ot[0][0],Et=ot[0][1],bt=ot[1][1],Rt=ot[2][0],lr=ot[2][1],$e.push(Rs([[pt+l,Et+l],[pt+l,bt-l],[Rt-l,bt-l],[Rt-l,lr+l]],30));for(yr=Ve[1].length-1;yr>=0;--yr)ot=Ve[1][yr],pt=ot[0][0],Et=ot[0][1],bt=ot[1][1],Rt=ot[2][0],lr=ot[2][1],$e.push(Rs([[Rt-l,lr-l],[Rt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(Ve,$e,ot){var pt,Et;function bt(yr,kr){for(var jr=kr<0?-1:1,Qr=$e[+(kr<0)],ha=0,Aa=Qr.length-1;ha<Aa&&yr>Qr[ha][2][0];++ha);var Da=Ve(yr-Qr[ha][1][0],kr);return Da[0]+=Ve(Qr[ha][1][0],jr*kr>jr*Qr[ha][0][1]?Qr[ha][0][1]:kr)[0],Da}ot?bt.invert=ot(bt):Ve.invert&&(bt.invert=function(yr,kr){for(var jr=Et[+(kr<0)],Qr=$e[+(kr<0)],ha=0,Aa=jr.length;ha<Aa;++ha){var Da=jr[ha];if(Da[0][0]<=yr&&yr<Da[1][0]&&Da[0][1]<=kr&&kr<Da[1][1]){var ci=Ve.invert(yr-Ve(Qr[ha][1][0],0)[0],kr);return ci[0]+=Qr[ha][1][0],bo(bt(ci[0],ci[1]),[yr,kr])?ci:null}}});var Rt=x.geoProjection(bt),lr=Rt.stream;return Rt.stream=function(yr){var kr=Rt.rotate(),jr=lr(yr),Qr=(Rt.rotate([0,0]),lr(yr));return Rt.rotate(kr),jr.sphere=function(){x.geoStream(pt,Qr)},jr},Rt.lobes=function(yr){return arguments.length?(pt=pu(yr),$e=yr.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*m,jr[0][1]*m],[jr[1][0]*m,jr[1][1]*m],[jr[2][0]*m,jr[2][1]*m]]})}),Et=$e.map(function(kr){return kr.map(function(jr){var Qr=Ve(jr[0][0],jr[0][1])[0],ha=Ve(jr[2][0],jr[2][1])[0],Aa=Ve(jr[1][0],jr[0][1])[1],Da=Ve(jr[1][0],jr[1][1])[1],ci;return Aa>Da&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Rt):$e.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*y,jr[0][1]*y],[jr[1][0]*y,jr[1][1]*y],[jr[2][0]*y,jr[2][1]*y]]})})},$e!=null&&Rt.lobes($e),Rt}var Gs=[[[[-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 vl(){return uo(Ce,Gs).scale(160.857)}var As=[[[[-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 qs(){return uo(xs,As).scale(152.63)}var us=[[[[-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 Ss(){return uo(qe,us).scale(169.529)}var Nl=[[[[-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 su(){return uo(qe,Nl).scale(169.529).rotate([20,0])}var Tc=[[[[-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 du(){return uo(Pn,Tc,Re).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Sf=[[[[-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 Uc(){return uo(Ke,Sf).scale(152.63).rotate([-20,0])}function Bs(Ve,$e){return[3/u*Ve*F(w*w/3-$e*$e),$e]}Bs.invert=function(Ve,$e){return[u/3*Ve/F(w*w/3-$e*$e),$e]};function dc(){return x.geoProjection(Bs).scale(158.837)}function Hc(Ve){function $e(ot,pt){if(E(E(pt)-A)<l)return[0,pt<0?-2:2];var Et=c(pt),bt=h((1+Et)/(1-Et),Ve/2),Rt=.5*(bt+1/bt)+r(ot*=Ve);return[2*c(ot)/Rt,(bt-1/bt)/Rt]}return $e.invert=function(ot,pt){var Et=E(pt);if(E(Et-2)<l)return ot?null:[0,v(pt)*A];if(Et>2)return null;ot/=2,pt/=2;var bt=ot*ot,Rt=pt*pt,lr=2*pt/(1+bt+Rt);return lr=h((1+lr)/(1-lr),1/Ve),[t(2*ot,1-bt-Rt)/Ve,L((lr-1)/(lr+1))]},$e}function lu(){var Ve=.5,$e=x.geoProjectionMutator(Hc),ot=$e(Ve);return ot.spacing=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(124.75)}var Pl=w/b;function ic(Ve,$e){return[Ve*(1+F(r($e)))/2,$e/(r($e/2)*r(Ve/6))]}ic.invert=function(Ve,$e){var ot=E(Ve),pt=E($e),Et=l,bt=A;pt<Pl?bt*=pt/Pl:Et+=6*z(Pl/pt);for(var Rt=0;Rt<25;Rt++){var lr=c(bt),yr=F(r(bt)),kr=c(bt/2),jr=r(bt/2),Qr=c(Et/6),ha=r(Et/6),Aa=.5*Et*(1+yr)-ot,Da=bt/(jr*ha)-pt,ci=yr?-.25*Et*lr/yr:0,Vi=.5*(1+yr),ji=(1+.5*bt*kr/jr)/(jr*ha),on=bt/jr*(Qr/6)/(ha*ha),An=ci*on-ji*Vi,Yn=(Aa*on-Da*Vi)/An,Nn=(Da*ci-Aa*ji)/An;if(bt-=Yn,Et-=Nn,E(Yn)<l&&E(Nn)<l)break}return[Ve<0?-Et:Et,$e<0?-bt:bt]};function Ou(){return x.geoProjection(ic).scale(97.2672)}function nl(Ve,$e){var ot=Ve*Ve,pt=$e*$e;return[Ve*(.975534+pt*(-.119161+ot*-.0143059+pt*-.0547009)),$e*(1.00384+ot*(.0802894+pt*-.02855+ot*199025e-9)+pt*(.0998909+pt*-.0491032))]}nl.invert=function(Ve,$e){var ot=v(Ve)*w,pt=$e/2,Et=50;do{var bt=ot*ot,Rt=pt*pt,lr=ot*pt,yr=ot*(.975534+Rt*(-.119161+bt*-.0143059+Rt*-.0547009))-Ve,kr=pt*(1.00384+bt*(.0802894+Rt*-.02855+bt*199025e-9)+Rt*(.0998909+Rt*-.0491032))-$e,jr=.975534-Rt*(.119161+3*bt*.0143059+Rt*.0547009),Qr=-lr*(2*.119161+4*.0547009*Rt+2*.0143059*bt),ha=lr*(2*.0802894+4*199025e-9*bt+2*-.02855*Rt),Aa=1.00384+bt*(.0802894+199025e-9*bt)+Rt*(3*(.0998909-.02855*bt)-5*.0491032*Rt),Da=Qr*ha-Aa*jr,ci=(kr*Qr-yr*Aa)/Da,Vi=(yr*ha-kr*jr)/Da;ot-=ci,pt-=Vi}while((E(ci)>l||E(Vi)>l)&&--Et>0);return Et&&[ot,pt]};function ml(){return x.geoProjection(nl).scale(139.98)}function bs(Ve,$e){return[c(Ve)/r($e),T($e)*r(Ve)]}bs.invert=function(Ve,$e){var ot=Ve*Ve,pt=$e*$e,Et=pt+1,bt=ot+Et,Rt=Ve?g*F((bt-F(bt*bt-4*ot))/ot):1/F(Et);return[L(Ve*Rt),v($e)*z(Rt)]};function Zs(){return x.geoProjection(bs).scale(144.049).clipAngle(90-.001)}function nc(Ve){var $e=r(Ve),ot=T(M+Ve/2);function pt(Et,bt){var Rt=bt-Ve,lr=E(Rt)<l?Et*$e:E(lr=M+bt/2)<l||E(E(lr)-A)<l?0:Et*Rt/n(T(lr)/ot);return[lr,Rt]}return pt.invert=function(Et,bt){var Rt,lr=bt+Ve;return[E(bt)<l?Et/$e:E(Rt=M+lr/2)<l||E(E(Rt)-A)<l?0:Et*n(T(Rt)/ot)/bt,lr]},pt}function Ul(){return rt(nc).parallel(40).scale(158.837)}function qu(Ve,$e){return[Ve,1.25*n(T(M+.4*$e))]}qu.invert=function(Ve,$e){return[Ve,2.5*e(o(.8*$e))-.625*w]};function fl(){return x.geoProjection(qu).scale(108.318)}function xh(Ve){var $e=Ve.length-1;function ot(pt,Et){for(var bt=r(Et),Rt=2/(1+bt*r(pt)),lr=Rt*bt*c(pt),yr=Rt*c(Et),kr=$e,jr=Ve[kr],Qr=jr[0],ha=jr[1],Aa;--kr>=0;)jr=Ve[kr],Qr=jr[0]+lr*(Aa=Qr)-yr*ha,ha=jr[1]+lr*ha+yr*Aa;return Qr=lr*(Aa=Qr)-yr*ha,ha=lr*ha+yr*Aa,[Qr,ha]}return ot.invert=function(pt,Et){var bt=20,Rt=pt,lr=Et;do{for(var yr=$e,kr=Ve[yr],jr=kr[0],Qr=kr[1],ha=0,Aa=0,Da;--yr>=0;)kr=Ve[yr],ha=jr+Rt*(Da=ha)-lr*Aa,Aa=Qr+Rt*Aa+lr*Da,jr=kr[0]+Rt*(Da=jr)-lr*Qr,Qr=kr[1]+Rt*Qr+lr*Da;ha=jr+Rt*(Da=ha)-lr*Aa,Aa=Qr+Rt*Aa+lr*Da,jr=Rt*(Da=jr)-lr*Qr-pt,Qr=Rt*Qr+lr*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Rt-=Vi=(jr*ha+Qr*Aa)/ci,lr-=ji=(Qr*ha-jr*Aa)/ci}while(E(Vi)+E(ji)>l*l&&--bt>0);if(bt){var on=F(Rt*Rt+lr*lr),An=2*e(on*.5),Yn=c(An);return[t(Rt*Yn,on*r(An)),on?L(lr*Yn/on):0]}},ot}var ss=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ks=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],to=[[.9245,0],[0,0],[.01943,0]],Wc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return $l(ss,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function jl(){return $l(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return $l(ks,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return $l(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return $l(Wc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function $l(Ve,$e){var ot=x.geoProjection(xh(Ve)).rotate($e).clipAngle(90),pt=x.geoRotation($e),Et=ot.center;return delete ot.rotate,ot.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},ot}var Jf=F(6),Of=F(7);function of(Ve,$e){var ot=L(7*c($e)/(3*Jf));return[Jf*Ve*(2*r(2*ot/3)-1)/Of,9*c(ot/3)/Of]}of.invert=function(Ve,$e){var ot=3*L($e*Of/9);return[Ve*Of/(Jf*(2*r(2*ot/3)-1)),L(c(ot)*3*Jf/7)]};function jc(){return x.geoProjection(of).scale(164.859)}function Bf(Ve,$e){for(var ot=(1+g)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-ot)/(.5*r(pt/2)+r(pt)),!(E(bt)<l));Et++);return[Ve*(1+2*r(pt)/r(pt/2))/(3*b),2*F(3)*c(pt/2)/F(2+b)]}Bf.invert=function(Ve,$e){var ot=$e*F(2+b)/(2*F(3)),pt=2*L(ot);return[3*b*Ve/(1+2*r(pt)/r(pt/2)),L((ot+c(pt))/(1+g))]};function Nf(){return x.geoProjection(Bf).scale(188.209)}function Gu(Ve,$e){for(var ot=F(6/(4+w)),pt=(1+w/4)*c($e),Et=$e/2,bt=0,Rt;bt<25&&(Et-=Rt=(Et/2+c(Et)-pt)/(.5+r(Et)),!(E(Rt)<l));bt++);return[ot*(.5+r(Et))*Ve/1.5,ot*Et]}Gu.invert=function(Ve,$e){var ot=F(6/(4+w)),pt=$e/ot;return E(E(pt)-A)<l&&(pt=pt<0?-A:A),[1.5*Ve/(ot*(.5+r(pt))),L((pt/2+c(pt))/(1+w/4))]};function Ef(){return x.geoProjection(Gu).scale(166.518)}function oc(Ve,$e){var ot=$e*$e,pt=ot*ot,Et=ot*pt;return[Ve*(.84719-.13063*ot+Et*Et*(-.04515+.05494*ot-.02326*pt+.00331*Et)),$e*(1.01183+pt*pt*(-.02625+.01926*ot-.00396*pt))]}oc.invert=function(Ve,$e){var ot=$e,pt=25,Et,bt,Rt,lr;do bt=ot*ot,Rt=bt*bt,ot-=Et=(ot*(1.01183+Rt*Rt*(-.02625+.01926*bt-.00396*Rt))-$e)/(1.01183+Rt*Rt*(9*-.02625+11*.01926*bt+13*-.00396*Rt));while(E(Et)>_&&--pt>0);return bt=ot*ot,Rt=bt*bt,lr=bt*Rt,[Ve/(.84719-.13063*bt+lr*lr*(-.04515+.05494*bt-.02326*Rt+.00331*lr)),ot]};function Xc(){return x.geoProjection(oc).scale(175.295)}function Ql(Ve,$e){return[Ve*(1+r($e))/2,2*($e-T($e/2))]}Ql.invert=function(Ve,$e){for(var ot=$e/2,pt=0,Et=1/0;pt<10&&E(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-ot)/(1-.5/(bt*bt))}return[2*Ve/(1+r($e)),$e]};function qc(){return x.geoProjection(Ql).scale(152.63)}var Sc=[[[[-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 Ys(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(Ve,$e){var ot=c($e),pt=r($e),Et=v(Ve);if(Ve===0||E($e)===A)return[0,$e];if($e===0)return[Ve,0];if(E(Ve)===A)return[Ve*pt,A*ot];var bt=w/(2*Ve)-2*Ve/w,Rt=2*$e/w,lr=(1-Rt*Rt)/(ot-Rt),yr=bt*bt,kr=lr*lr,jr=1+yr/kr,Qr=1+kr/yr,ha=(bt*ot/lr-bt/2)/jr,Aa=(kr*ot/yr+lr/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(kr*ot*ot/yr+lr*ot-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*v(-$e*bt)*Et)]}kf.invert=function(Ve,$e){Ve/=A,$e/=A;var ot=Ve*Ve,pt=$e*$e,Et=ot+pt,bt=w*w;return[Ve?(Et-1+F((1-Et)*(1-Et)+4*ot))/(2*Ve)*A:0,Ie(function(Rt){return Et*(w*c(Rt)-2*Rt)*w+4*Rt*Rt*($e-c(Rt))+2*w*Rt-bt*$e},0)]};function fh(){return x.geoProjection(kf).scale(127.267)}var Uf=1.0148,Zc=.23185,$f=-.14499,Cu=.02406,jf=Uf,yl=5*Zc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(Ve,$e){var ot=$e*$e;return[Ve,$e*(Uf+ot*ot*(Zc+ot*($f+Cu*ot)))]}vc.invert=function(Ve,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var ot=$e,pt;do{var Et=ot*ot;ot-=pt=(ot*(Uf+Et*Et*(Zc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(yl+Et*(Lu+Mc*Et)))}while(E(pt)>l);return[Ve,ot]};function yu(){return x.geoProjection(vc).scale(139.319)}function Tu(Ve,$e){if(E($e)<l)return[Ve,0];var ot=T($e),pt=Ve*c($e);return[c(pt)/ot,$e+(1-r(pt))/ot]}Tu.invert=function(Ve,$e){if(E($e)<l)return[Ve,0];var ot=Ve*Ve+$e*$e,pt=$e*.5,Et=10,bt;do{var Rt=T(pt),lr=1/r(pt),yr=ot-2*$e*pt+pt*pt;pt-=bt=(Rt*yr+2*(pt-$e))/(2+yr*lr*lr+2*(pt-$e)*Rt)}while(E(bt)>l&&--Et>0);return Rt=T(pt),[(E($e)<E(pt+1/Rt)?L(Ve*Rt):v($e)*v(Ve)*(z(E(Ve*Rt))+A))/c(pt),pt]};function El(){return x.geoProjection(Tu).scale(103.74)}function qf(Ve,$e){var ot=Ec(Ve[1],Ve[0]),pt=Ec($e[1],$e[0]),Et=Lh(ot,pt),bt=mc(ot)/mc(pt);return Bu([1,0,Ve[0][0],0,1,Ve[0][1]],Bu([bt,0,0,0,bt,0],Bu([r(Et),c(Et),0,-c(Et),r(Et),0],[1,0,-$e[0][0],0,1,-$e[0][1]])))}function Qf(Ve){var $e=1/(Ve[0]*Ve[4]-Ve[1]*Ve[3]);return[$e*Ve[4],-$e*Ve[1],$e*(Ve[1]*Ve[5]-Ve[2]*Ve[4]),-$e*Ve[3],$e*Ve[0],$e*(Ve[2]*Ve[3]-Ve[0]*Ve[5])]}function Bu(Ve,$e){return[Ve[0]*$e[0]+Ve[1]*$e[3],Ve[0]*$e[1]+Ve[1]*$e[4],Ve[0]*$e[2]+Ve[1]*$e[5]+Ve[2],Ve[3]*$e[0]+Ve[4]*$e[3],Ve[3]*$e[1]+Ve[4]*$e[4],Ve[3]*$e[2]+Ve[4]*$e[5]+Ve[5]]}function Ec(Ve,$e){return[Ve[0]-$e[0],Ve[1]-$e[1]]}function mc(Ve){return F(Ve[0]*Ve[0]+Ve[1]*Ve[1])}function Lh(Ve,$e){return t(Ve[0]*$e[1]-Ve[1]*$e[0],Ve[0]*$e[0]+Ve[1]*$e[1])}function sf(Ve,$e,ot){pt(Ve,{transform:null});function pt(kr,jr){if(kr.edges=au(kr.face),jr.face){var Qr=kr.shared=lf(kr.face,jr.face),ha=qf(Qr.map(jr.project),Qr.map(kr.project));kr.transform=jr.transform?Bu(jr.transform,ha):ha;for(var Aa=jr.edges,Da=0,ci=Aa.length;Da<ci;++Da)Nu(Qr[0],Aa[Da][1])&&Nu(Qr[1],Aa[Da][0])&&(Aa[Da]=kr),Nu(Qr[0],Aa[Da][0])&&Nu(Qr[1],Aa[Da][1])&&(Aa[Da]=kr);for(Aa=kr.edges,Da=0,ci=Aa.length;Da<ci;++Da)Nu(Qr[0],Aa[Da][0])&&Nu(Qr[1],Aa[Da][1])&&(Aa[Da]=jr),Nu(Qr[0],Aa[Da][1])&&Nu(Qr[1],Aa[Da][0])&&(Aa[Da]=jr)}else kr.transform=jr.transform;return kr.children&&kr.children.forEach(function(Vi){pt(Vi,kr)}),kr}function Et(kr,jr){var Qr=$e(kr,jr),ha=Qr.project([kr*y,jr*y]),Aa;return(Aa=Qr.transform)?[Aa[0]*ha[0]+Aa[1]*ha[1]+Aa[2],-(Aa[3]*ha[0]+Aa[4]*ha[1]+Aa[5])]:(ha[1]=-ha[1],ha)}Yc(Ve)&&(Et.invert=function(kr,jr){var Qr=bt(Ve,[kr,-jr]);return Qr&&(Qr[0]*=m,Qr[1]*=m,Qr)});function bt(kr,jr){var Qr=kr.project.invert,ha=kr.transform,Aa=jr;if(ha&&(ha=Qf(ha),Aa=[ha[0]*Aa[0]+ha[1]*Aa[1]+ha[2],ha[3]*Aa[0]+ha[4]*Aa[1]+ha[5]]),Qr&&kr===Rt(Da=Qr(Aa)))return Da;for(var Da,ci=kr.children,Vi=0,ji=ci&&ci.length;Vi<ji;++Vi)if(Da=bt(ci[Vi],jr))return Da}function Rt(kr){return $e(kr[0]*m,kr[1]*m)}var lr=x.geoProjection(Et),yr=lr.stream;return lr.stream=function(kr){var jr=lr.rotate(),Qr=yr(kr),ha=(lr.rotate([0,0]),yr(kr));return lr.rotate(jr),Qr.sphere=function(){ha.polygonStart(),ha.lineStart(),vf(ha,Ve),ha.lineEnd(),ha.polygonEnd()},Qr},lr.angle(ot==null?-30:ot*y)}function vf(Ve,$e,ot){var pt,Et=$e.edges,bt=Et.length,Rt,lr={type:"MultiPoint",coordinates:$e.face},yr=$e.face.filter(function(ci){return E(ci[1])!==90}),kr=x.geoBounds({type:"MultiPoint",coordinates:yr}),jr=!1,Qr=-1,ha=kr[1][0]-kr[0][0],Aa=ha===180||ha===360?[(kr[0][0]+kr[1][0])/2,(kr[0][1]+kr[1][1])/2]:x.geoCentroid(lr);if(ot)for(;++Qr<bt&&Et[Qr]!==ot;);++Qr;for(var Da=0;Da<bt;++Da)Rt=Et[(Da+Qr)%bt],Array.isArray(Rt)?(jr||(Ve.point((pt=x.geoInterpolate(Rt[0],Aa)(l))[0],pt[1]),jr=!0),Ve.point((pt=x.geoInterpolate(Rt[1],Aa)(l))[0],pt[1])):(jr=!1,Rt!==ot&&vf(Ve,Rt,$e))}function Nu(Ve,$e){return Ve&&$e&&Ve[0]===$e[0]&&Ve[1]===$e[1]}function lf(Ve,$e){for(var ot,pt,Et=Ve.length,bt=null,Rt=0;Rt<Et;++Rt){ot=Ve[Rt];for(var lr=$e.length;--lr>=0;)if(pt=$e[lr],ot[0]===pt[0]&&ot[1]===pt[1]){if(bt)return[bt,ot];bt=ot}}}function au(Ve){for(var $e=Ve.length,ot=[],pt=Ve[$e-1],Et=0;Et<$e;++Et)ot.push([pt,pt=Ve[Et]]);return ot}function Yc(Ve){return Ve.project.invert||Ve.children&&Ve.children.some(Yc)}var hh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],mf=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(Ve){return Ve.map(function($e){return hh[$e]})});function sl(Ve){Ve=Ve||function(ot){var pt=x.geoCentroid({type:"MultiPoint",coordinates:ot});return x.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(ot){return{face:ot,project:Ve(ot)}});return[-1,0,0,1,0,1,4,5].forEach(function(ot,pt){var Et=$e[ot];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(ot,pt){return $e[ot<-w/2?pt<0?6:4:ot<0?pt<0?2:0:ot<w/2?pt<0?3:1:pt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var _u=2/F(3);function Pu(Ve,$e){var ot=Ue(Ve,$e);return[ot[0]*_u,ot[1]]}Pu.invert=function(Ve,$e){return Ue.invert(Ve/_u,$e)};function Cf(Ve){Ve=Ve||function(ot){var pt=x.geoCentroid({type:"MultiPoint",coordinates:ot});return x.geoProjection(Pu).translate([0,0]).scale(1).rotate(pt[1]>0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(ot){return{face:ot,project:Ve(ot)}});return[-1,0,0,1,0,1,4,5].forEach(function(ot,pt){var Et=$e[ot];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(ot,pt){return $e[ot<-w/2?pt<0?6:4:ot<0?pt<0?2:0:ot<w/2?pt<0?3:1:pt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function hl(Ve){Ve=Ve||function(Rt){var lr=Rt.length===6?x.geoCentroid({type:"MultiPoint",coordinates:Rt}):Rt[0];return x.geoGnomonic().scale(1).translate([0,0]).rotate([-lr[0],-lr[1]])};var $e=mf.map(function(Rt){for(var lr=Rt.map(gf),yr=lr.length,kr=lr[yr-1],jr,Qr=[],ha=0;ha<yr;++ha)jr=lr[ha],Qr.push(Hu([kr[0]*.9486832980505138+jr[0]*.31622776601683794,kr[1]*.9486832980505138+jr[1]*.31622776601683794,kr[2]*.9486832980505138+jr[2]*.31622776601683794]),Hu([jr[0]*.9486832980505138+kr[0]*.31622776601683794,jr[1]*.9486832980505138+kr[1]*.31622776601683794,jr[2]*.9486832980505138+kr[2]*.31622776601683794])),kr=jr;return Qr}),ot=[],pt=[-1,0,0,1,0,1,4,5];$e.forEach(function(Rt,lr){for(var yr=mf[lr],kr=yr.length,jr=ot[lr]=[],Qr=0;Qr<kr;++Qr)$e.push([yr[Qr],Rt[(Qr*2+2)%(2*kr)],Rt[(Qr*2+1)%(2*kr)]]),pt.push(lr),jr.push(kc(gf(Rt[(Qr*2+2)%(2*kr)]),gf(Rt[(Qr*2+1)%(2*kr)])))});var Et=$e.map(function(Rt){return{project:Ve(Rt),face:Rt}});pt.forEach(function(Rt,lr){var yr=Et[Rt];yr&&(yr.children||(yr.children=[])).push(Et[lr])});function bt(Rt,lr){var yr=r(lr),kr=[yr*r(Rt),yr*c(Rt),c(lr)],jr=Rt<-w/2?lr<0?6:4:Rt<0?lr<0?2:0:Rt<w/2?lr<0?3:1:lr<0?7:5,Qr=ot[jr];return Et[uf(Qr[0],kr)<0?8+3*jr:uf(Qr[1],kr)<0?8+3*jr+1:uf(Qr[2],kr)<0?8+3*jr+2:jr]}return sf(Et[0],bt).angle(-30).scale(110.625).center([0,45])}function uf(Ve,$e){for(var ot=0,pt=Ve.length,Et=0;ot<pt;++ot)Et+=Ve[ot]*$e[ot];return Et}function kc(Ve,$e){return[Ve[1]*$e[2]-Ve[2]*$e[1],Ve[2]*$e[0]-Ve[0]*$e[2],Ve[0]*$e[1]-Ve[1]*$e[0]]}function Hu(Ve){return[t(Ve[1],Ve[0])*y,L(i(-1,s(1,Ve[2])))*y]}function gf(Ve){var $e=Ve[0]*m,ot=Ve[1]*m,pt=r(ot);return[pt*r($e),pt*c($e),c(ot)]}function Wu(){}function Kc(Ve){if((ot=Ve.length)<4)return!1;for(var $e=0,ot,pt=Ve[ot-1][1]*Ve[0][0]-Ve[ot-1][0]*Ve[0][1];++$e<ot;)pt+=Ve[$e-1][1]*Ve[$e][0]-Ve[$e-1][0]*Ve[$e][1];return pt<=0}function Lf(Ve,$e){for(var ot=$e[0],pt=$e[1],Et=!1,bt=0,Rt=Ve.length,lr=Rt-1;bt<Rt;lr=bt++){var yr=Ve[bt],kr=yr[0],jr=yr[1],Qr=Ve[lr],ha=Qr[0],Aa=Qr[1];jr>pt^Aa>pt&&ot<(ha-kr)*(pt-jr)/(Aa-jr)+kr&&(Et=!Et)}return Et}function iu(Ve,$e){var ot=$e.stream,pt;if(!ot)throw new Error("invalid projection");switch(Ve&&Ve.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(Ve,ot)}function Vf(Ve,$e){return{type:"FeatureCollection",features:Ve.features.map(function(ot){return Xu(ot,$e)})}}function Xu(Ve,$e){return{type:"Feature",id:Ve.id,properties:Ve.properties,geometry:gc(Ve.geometry,$e)}}function Cc(Ve,$e){return{type:"GeometryCollection",geometries:Ve.geometries.map(function(ot){return gc(ot,$e)})}}function gc(Ve,$e){if(!Ve)return null;if(Ve.type==="GeometryCollection")return Cc(Ve,$e);var ot;switch(Ve.type){case"Point":ot=Lc;break;case"MultiPoint":ot=Lc;break;case"LineString":ot=Jc;break;case"MultiLineString":ot=Jc;break;case"Polygon":ot=sc;break;case"MultiPolygon":ot=sc;break;case"Sphere":ot=sc;break;default:return null}return x.geoStream(Ve,$e(ot)),ot.result()}var ql=[],xu=[],Lc={point:function(Ve,$e){ql.push([Ve,$e])},result:function(){var Ve=ql.length?ql.length<2?{type:"Point",coordinates:ql[0]}:{type:"MultiPoint",coordinates:ql}:null;return ql=[],Ve}},Jc={lineStart:Wu,point:function(Ve,$e){ql.push([Ve,$e])},lineEnd:function(){ql.length&&(xu.push(ql),ql=[])},result:function(){var Ve=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],Ve}},sc={polygonStart:Wu,lineStart:Wu,point:function(Ve,$e){ql.push([Ve,$e])},lineEnd:function(){var Ve=ql.length;if(Ve){do ql.push(ql[0].slice());while(++Ve<4);xu.push(ql),ql=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var Ve=[],$e=[];return xu.forEach(function(ot){Kc(ot)?Ve.push([ot]):$e.push(ot)}),$e.forEach(function(ot){var pt=ot[0];Ve.some(function(Et){if(Lf(Et[0],pt))return Et.push(ot),!0})||Ve.push([ot])}),xu=[],Ve.length?Ve.length>1?{type:"MultiPolygon",coordinates:Ve}:{type:"Polygon",coordinates:Ve[0]}:null}};function Pc(Ve){var $e=Ve(A,0)[0]-Ve(-A,0)[0];function ot(pt,Et){var bt=E(pt)<A,Rt=Ve(bt?pt:pt>0?pt-w:pt+w,Et),lr=(Rt[0]-Rt[1])*g,yr=(Rt[0]+Rt[1])*g;if(bt)return[lr,yr];var kr=$e*g,jr=lr>0^yr>0?-1:1;return[jr*lr-v(yr)*kr,jr*yr-v(lr)*kr]}return Ve.invert&&(ot.invert=function(pt,Et){var bt=(pt+Et)*g,Rt=(Et-pt)*g,lr=E(bt)<.5*$e&&E(Rt)<.5*$e;if(!lr){var yr=$e*g,kr=bt>0^Rt>0?-1:1,jr=-kr*pt+(Rt>0?1:-1)*yr,Qr=-kr*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*g,Rt=(jr-Qr)*g}var ha=Ve.invert(bt,Rt);return lr||(ha[0]+=bt>0?w:-w),ha}),x.geoProjection(ot).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function br(){return Pc(Bn).scale(111.48)}function aa(Ve,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function ot(kr){var jr=kr.length,Qr=2,ha=new Array(jr);for(ha[0]=+kr[0].toFixed($e),ha[1]=+kr[1].toFixed($e);Qr<jr;)ha[Qr]=kr[Qr],++Qr;return ha}function pt(kr){return kr.map(ot)}function Et(kr){for(var jr=ot(kr[0]),Qr=[jr],ha=1;ha<kr.length;ha++){var Aa=ot(kr[ha]);(Aa.length>2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&kr.length>1&&Qr.push(ot(kr[kr.length-1])),Qr}function bt(kr){return kr.map(Et)}function Rt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Rt)};break;case"Point":jr={type:"Point",coordinates:ot(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:pt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Et(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:bt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(bt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function lr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Rt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if(Ve!=null)switch(Ve.type){case"Feature":return lr(Ve);case"FeatureCollection":{var yr={type:"FeatureCollection",features:Ve.features.map(lr)};return Ve.bbox!=null&&(yr.bbox=Ve.bbox),yr}default:return Rt(Ve)}return Ve}function $r(Ve){var $e=c(Ve);function ot(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-Ve];var Rt=2*e(bt*c(Et)),lr=1/T(Et);return[c(Rt)*lr,Et+(1-r(Rt))*lr-Ve]}return ot.invert=function(pt,Et){if(E(Et+=Ve)<l)return[$e?2*e($e*pt/2)/$e:pt,0];var bt=pt*pt+Et*Et,Rt=0,lr=10,yr;do{var kr=T(Rt),jr=1/r(Rt),Qr=bt-2*Et*Rt+Rt*Rt;Rt-=yr=(kr*Qr+2*(Rt-Et))/(2+Qr*jr*jr+2*(Rt-Et)*kr)}while(E(yr)>l&&--lr>0);var ha=pt*(kr=T(Rt)),Aa=T(E(Et)<E(Rt+1/kr)?L(ha)*.5:z(ha)*.5+w/4)/c(Rt);return[$e?2*e($e*Aa)/$e:2*Aa,Rt]},ot}function ka(){return rt($r).scale(131.215)}var li=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];li.forEach(function(Ve){Ve[1]*=1.0144});function Ci(Ve,$e){var ot=s(18,E($e)*36/w),pt=a(ot),Et=ot-pt,bt=(Qr=li[pt])[0],Rt=Qr[1],lr=(Qr=li[++pt])[0],yr=Qr[1],kr=(Qr=li[s(19,++pt)])[0],jr=Qr[1],Qr;return[Ve*(lr+Et*(kr-bt)/2+Et*Et*(kr-2*lr+bt)/2),($e>0?A:-A)*(yr+Et*(jr-Rt)/2+Et*Et*(jr-2*yr+Rt)/2)]}Ci.invert=function(Ve,$e){var ot=$e/A,pt=ot*90,Et=s(18,E(pt/5)),bt=i(0,a(Et));do{var Rt=li[bt][1],lr=li[bt+1][1],yr=li[s(19,bt+2)][1],kr=yr-Rt,jr=yr-2*lr+Rt,Qr=2*(E(ot)-lr)/kr,ha=jr/kr,Aa=Qr*(1-ha*Qr*(1-2*ha*Qr));if(Aa>=0||bt===1){pt=($e>=0?5:-5)*(Aa+Et);var Da=50,ci;do Et=s(18,E(pt)/5),bt=a(Et),Aa=Et-bt,Rt=li[bt][1],lr=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(lr+Aa*(yr-Rt)/2+Aa*Aa*(yr-2*lr+Rt)/2)-$e)*y;while(E(ci)>_&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[Ve/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*m]};function Hi(){return x.geoProjection(Ci).scale(152.63)}function Qi(Ve){function $e(ot,pt){var Et=r(pt),bt=(Ve-1)/(Ve-Et*r(ot));return[bt*Et*c(ot),bt*c(pt)]}return $e.invert=function(ot,pt){var Et=ot*ot+pt*pt,bt=F(Et),Rt=(Ve-F(1-Et*(Ve+1)/(Ve-1)))/((Ve-1)/bt+bt/(Ve-1));return[t(ot*Rt,bt*F(1-Rt*Rt)),bt?L(pt*Rt/bt):0]},$e}function pn(Ve,$e){var ot=Qi(Ve);if(!$e)return ot;var pt=r($e),Et=c($e);function bt(Rt,lr){var yr=ot(Rt,lr),kr=yr[1],jr=kr*Et/(Ve-1)+pt;return[yr[0]*pt/jr,kr/jr]}return bt.invert=function(Rt,lr){var yr=(Ve-1)/(Ve-1-lr*Et);return ot.invert(yr*Rt,yr*lr*pt)},bt}function Pi(){var Ve=2,$e=0,ot=x.geoProjectionMutator(pn),pt=ot(Ve,$e);return pt.distance=function(Et){return arguments.length?ot(Ve=+Et,$e):Ve},pt.tilt=function(Et){return arguments.length?ot(Ve,$e=Et*m):$e*y},pt.scale(432.147).clipAngle(z(1/Ve)*y-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Sn=mi+Di,$n=180,no=$n-Di,Qn=-90,co=Qn+Di,Tn=90,un=Tn-Di;function go(Ve){return Ve.length>0}function Ko(Ve){return Math.floor(Ve*Ni)/Ni}function Ms(Ve){return Ve===Qn||Ve===Tn?[0,Ve]:[mi,Ko(Ve)]}function rl(Ve){var $e=Ve[0],ot=Ve[1],pt=!1;return $e<=Sn?($e=mi,pt=!0):$e>=no&&($e=$n,pt=!0),ot<=co?(ot=Qn,pt=!0):ot>=un&&(ot=Tn,pt=!0),pt?[$e,ot]:Ve}function Ns(Ve){return Ve.map(rl)}function el(Ve,$e,ot){for(var pt=0,Et=Ve.length;pt<Et;++pt){var bt=Ve[pt].slice();ot.push({index:-1,polygon:$e,ring:bt});for(var Rt=0,lr=bt.length;Rt<lr;++Rt){var yr=bt[Rt],kr=yr[0],jr=yr[1];if(kr<=Sn||kr>=no||jr<=co||jr>=un){bt[Rt]=rl(yr);for(var Qr=Rt+1;Qr<lr;++Qr){var ha=bt[Qr],Aa=ha[0],Da=ha[1];if(Aa>Sn&&Aa<no&&Da>co&&Da<un)break}if(Qr===Rt+1)continue;if(Rt){var ci={index:-1,polygon:$e,ring:bt.slice(0,Rt+1)};ci.ring[ci.ring.length-1]=Ms(jr),ot[ot.length-1]=ci}else ot.pop();if(Qr>=lr)break;ot.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=Ms(bt[0][1]),Rt=-1,lr=bt.length}}}}function ws(Ve){var $e,ot=Ve.length,pt={},Et={},bt,Rt,lr,yr,kr;for($e=0;$e<ot;++$e){if(bt=Ve[$e],Rt=bt.ring[0],yr=bt.ring[bt.ring.length-1],Rt[0]===yr[0]&&Rt[1]===yr[1]){bt.polygon.push(bt.ring),Ve[$e]=null;continue}bt.index=$e,pt[Rt]=Et[yr]=bt}for($e=0;$e<ot;++$e)if(bt=Ve[$e],bt){if(Rt=bt.ring[0],yr=bt.ring[bt.ring.length-1],lr=Et[Rt],kr=pt[yr],delete pt[Rt],delete Et[yr],Rt[0]===yr[0]&&Rt[1]===yr[1]){bt.polygon.push(bt.ring);continue}lr?(delete Et[Rt],delete pt[lr.ring[0]],lr.ring.pop(),Ve[lr.index]=null,bt={index:-1,polygon:lr.polygon,ring:lr.ring.concat(bt.ring)},lr===kr?bt.polygon.push(bt.ring):(bt.index=ot++,Ve.push(pt[bt.ring[0]]=Et[bt.ring[bt.ring.length-1]]=bt))):kr?(delete pt[yr],delete Et[kr.ring[kr.ring.length-1]],bt.ring.pop(),bt={index:ot++,polygon:kr.polygon,ring:bt.ring.concat(kr.ring)},Ve[kr.index]=null,Ve.push(pt[bt.ring[0]]=Et[bt.ring[bt.ring.length-1]]=bt)):(bt.ring.push(bt.ring[0]),bt.polygon.push(bt.ring))}}function Fl(Ve){var $e={type:"Feature",geometry:_l(Ve.geometry)};return Ve.id!=null&&($e.id=Ve.id),Ve.bbox!=null&&($e.bbox=Ve.bbox),Ve.properties!=null&&($e.properties=Ve.properties),$e}function _l(Ve){if(Ve==null)return Ve;var $e,ot,pt,Et;switch(Ve.type){case"GeometryCollection":$e={type:"GeometryCollection",geometries:Ve.geometries.map(_l)};break;case"Point":$e={type:"Point",coordinates:rl(Ve.coordinates)};break;case"MultiPoint":case"LineString":$e={type:Ve.type,coordinates:Ns(Ve.coordinates)};break;case"MultiLineString":$e={type:"MultiLineString",coordinates:Ve.coordinates.map(Ns)};break;case"Polygon":{var bt=[];el(Ve.coordinates,bt,ot=[]),ws(ot),$e={type:"Polygon",coordinates:bt};break}case"MultiPolygon":{ot=[],pt=-1,Et=Ve.coordinates.length;for(var Rt=new Array(Et);++pt<Et;)el(Ve.coordinates[pt],Rt[pt]=[],ot);ws(ot),$e={type:"MultiPolygon",coordinates:Rt.filter(go)};break}default:return Ve}return Ve.bbox!=null&&($e.bbox=Ve.bbox),$e}function ll(Ve){if(Ve==null)return Ve;switch(Ve.type){case"Feature":return Fl(Ve);case"FeatureCollection":{var $e={type:"FeatureCollection",features:Ve.features.map(Fl)};return Ve.bbox!=null&&($e.bbox=Ve.bbox),$e}default:return _l(Ve)}}function jn(Ve,$e){var ot=T($e/2),pt=c(M*ot);return[Ve*(.74482-.34588*pt*pt),1.70711*ot]}jn.invert=function(Ve,$e){var ot=$e/1.70711,pt=c(M*ot);return[Ve/(.74482-.34588*pt*pt),2*e(ot)]};function Io(){return x.geoProjection(jn).scale(146.153)}function Js(Ve,$e,ot){var pt=x.geoInterpolate($e,ot),Et=pt(.5),bt=x.geoRotation([-Et[0],-Et[1]])($e),Rt=pt.distance/2,lr=-L(c(bt[1]*m)/c(Rt)),yr=[-Et[0],-Et[1],-(bt[0]>0?w-lr:lr)*y],kr=x.geoProjection(Ve(Rt)).rotate(yr),jr=x.geoRotation(yr),Qr=kr.center;return delete kr.rotate,kr.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},kr.clipAngle(90)}function Ds(Ve){var $e=r(Ve);function ot(pt,Et){var bt=x.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return ot.invert=function(pt,Et){return x.geoGnomonicRaw.invert(pt/$e,Et)},ot}function uu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(Ve,$e){return Js(Ds,Ve,$e)}function Zu(Ve){if(!(Ve*=2))return x.geoAzimuthalEquidistantRaw;var $e=-Ve/2,ot=-$e,pt=Ve*Ve,Et=T(ot),bt=.5/c(ot);function Rt(lr,yr){var kr=z(r(yr)*r(lr-$e)),jr=z(r(yr)*r(lr-ot)),Qr=yr<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*Ve),Qr*F(4*pt*jr-(pt-kr+jr)*(pt-kr+jr))/(2*Ve)]}return Rt.invert=function(lr,yr){var kr=yr*yr,jr=r(F(kr+(ha=lr+$e)*ha)),Qr=r(F(kr+(ha=lr+ot)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Rt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(Ve,$e){return Js(Zu,Ve,$e)}function Rc(Ve,$e){if(E($e)<l)return[Ve,0];var ot=E($e/A),pt=L(ot);if(E(Ve)<l||E(E($e)-A)<l)return[0,v($e)*w*T(pt/2)];var Et=r(pt),bt=E(w/Ve-Ve/w)/2,Rt=bt*bt,lr=Et/(ot+Et-1),yr=lr*(2/ot-1),kr=yr*yr,jr=kr+Rt,Qr=lr-kr,ha=Rt+lr;return[v(Ve)*w*(bt*Qr+F(Rt*Qr*Qr-jr*(lr*lr-kr)))/jr,v($e)*w*(yr*ha-bt*F((Rt+1)*jr-ha*ha))/jr]}Rc.invert=function(Ve,$e){if(E($e)<l)return[Ve,0];if(E(Ve)<l)return[0,A*c(2*e($e/w))];var ot=(Ve/=w)*Ve,pt=($e/=w)*$e,Et=ot+pt,bt=Et*Et,Rt=-E($e)*(1+Et),lr=Rt-2*pt+ot,yr=-2*Rt+1+2*pt+bt,kr=pt/yr+(2*lr*lr*lr/(yr*yr*yr)-9*Rt*lr/(yr*yr))/27,jr=(Rt-lr*lr/(3*yr))/yr,Qr=2*F(-jr/3),ha=z(3*kr/(jr*Qr))/3;return[w*(Et-1+F(1+2*(ot-pt)+bt))/(2*Ve),v($e)*w*(-Qr*r(ha+w/3)-lr/(3*yr))]};function Au(){return x.geoProjection(Rc).scale(79.4183)}function yc(Ve,$e){if(E($e)<l)return[Ve,0];var ot=E($e/A),pt=L(ot);if(E(Ve)<l||E(E($e)-A)<l)return[0,v($e)*w*T(pt/2)];var Et=r(pt),bt=E(w/Ve-Ve/w)/2,Rt=bt*bt,lr=Et*(F(1+Rt)-bt*Et)/(1+Rt*ot*ot);return[v(Ve)*w*lr,v($e)*w*F(1-lr*(2*bt+lr))]}yc.invert=function(Ve,$e){if(!Ve)return[0,A*c(2*e($e/w))];var ot=E(Ve/w),pt=(1-ot*ot-($e/=w)*$e)/(2*ot),Et=pt*pt,bt=F(Et+1);return[v(Ve)*w*(bt-pt),v($e)*A*c(2*t(F((1-2*pt*ot)*(pt+bt)-ot),F(bt+pt+ot)))]};function fo(){return x.geoProjection(yc).scale(79.4183)}function zo(Ve,$e){if(E($e)<l)return[Ve,0];var ot=$e/A,pt=L(ot);if(E(Ve)<l||E(E($e)-A)<l)return[0,w*T(pt/2)];var Et=(w/Ve-Ve/w)/2,bt=ot/(1+r(pt));return[w*(v(Ve)*F(Et*Et+1-bt*bt)-Et),w*bt]}zo.invert=function(Ve,$e){if(!$e)return[Ve,0];var ot=$e/w,pt=(w*w*(1-ot*ot)-Ve*Ve)/(2*w*Ve);return[Ve?w*(v(Ve)*F(pt*pt+1)-pt):0,A*c(2*e(ot))]};function Dc(){return x.geoProjection(zo).scale(79.4183)}function lc(Ve,$e){if(!$e)return[Ve,0];var ot=E($e);if(!Ve||ot===A)return[0,$e];var pt=ot/A,Et=pt*pt,bt=(8*pt-Et*(Et+2)-5)/(2*Et*(pt-1)),Rt=bt*bt,lr=pt*bt,yr=Et+Rt+2*lr,kr=pt+3*bt,jr=Ve/A,Qr=jr+1/jr,ha=v(E(Ve)-A)*F(Qr*Qr-4),Aa=ha*ha,Da=yr*(Et+Rt*Aa-1)+(1-Et)*(Et*(kr*kr+4*Rt)+12*lr*Rt+4*Rt*Rt),ci=(ha*(yr+Rt-1)+2*F(Da))/(4*yr+Aa);return[v(Ve)*A*ci,v($e)*A*F(1+ha*E(ci)-ci*ci)]}lc.invert=function(Ve,$e){var ot;if(!Ve||!$e)return[Ve,$e];$e/=w;var pt=v(Ve)*Ve/A,Et=(pt*pt-1+4*$e*$e)/E(pt),bt=Et*Et,Rt=2*$e,lr=50;do{var yr=Rt*Rt,kr=(8*Rt-yr*(yr+2)-5)/(2*yr*(Rt-1)),jr=(3*Rt-yr*Rt-10)/(2*yr*Rt),Qr=kr*kr,ha=Rt*kr,Aa=Rt+kr,Da=Aa*Aa,ci=Rt+3*kr,Vi=Da*(yr+Qr*bt-1)+(1-yr)*(yr*(ci*ci+4*Qr)+Qr*(12*ha+4*Qr)),ji=-2*Aa*(4*ha*Qr+(1-4*yr+3*yr*yr)*(1+jr)+Qr*(-6+14*yr-bt+(-8+8*yr-2*bt)*jr)+ha*(-8+12*yr+(-10+10*yr-bt)*jr)),on=F(Vi),An=Et*(Da+Qr-1)+2*on-pt*(4*Da+bt),Yn=Et*(2*kr*jr+2*Aa*(1+jr))+ji/on-8*Aa*(Et*(-1+Qr+Da)+2*on)*(1+jr)/(bt+4*Da);Rt-=ot=An/Yn}while(ot>l&&--lr>0);return[v(Ve)*(F(Et*Et+4)+Et)*w/4,A*Rt]};function Yu(){return x.geoProjection(lc).scale(127.16)}function Fe(Ve,$e,ot,pt,Et){function bt(Rt,lr){var yr=ot*c(pt*lr),kr=F(1-yr*yr),jr=F(2/(1+kr*r(Rt*=Et)));return[Ve*kr*jr*c(Rt),$e*yr*jr]}return bt.invert=function(Rt,lr){var yr=Rt/Ve,kr=lr/$e,jr=F(yr*yr+kr*kr),Qr=2*L(jr/2);return[t(Rt*T(Qr),Ve*jr)/Et,jr&&L(lr*c(Qr)/($e*ot*jr))/pt]},bt}function I(Ve,$e,ot,pt){var Et=w/3;Ve=i(Ve,l),$e=i($e,l),Ve=s(Ve,A),$e=s($e,w-l),ot=i(ot,0),ot=s(ot,100-l),pt=i(pt,l);var bt=ot/100+1,Rt=pt/100,lr=z(bt*r(Et))/Et,yr=c(Ve)/c(lr*A),kr=$e/w,jr=F(Rt*c(Ve/2)/c($e/2)),Qr=jr/F(kr*yr*lr),ha=1/(jr*F(kr*yr*lr));return Fe(Qr,ha,yr,lr,kr)}function ie(){var Ve=65*m,$e=60*m,ot=20,pt=200,Et=x.geoProjectionMutator(I),bt=Et(Ve,$e,ot,pt);return bt.poleline=function(Rt){return arguments.length?Et(Ve=+Rt*m,$e,ot,pt):Ve*y},bt.parallels=function(Rt){return arguments.length?Et(Ve,$e=+Rt*m,ot,pt):$e*y},bt.inflation=function(Rt){return arguments.length?Et(Ve,$e,ot=+Rt,pt):ot},bt.ratio=function(Rt){return arguments.length?Et(Ve,$e,ot,pt=+Rt):pt},bt.scale(163.775)}function Te(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Me=4*w+3*F(3),ze=2*F(2*w*F(3)/Me),ht=tt(ze*F(3)/w,ze,Me/6);function wt(){return x.geoProjection(ht).scale(176.84)}function Ot(Ve,$e){return[Ve*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(Ve,$e){return[Ve/F(1-3*$e*$e/(w*w)),$e]};function $t(){return x.geoProjection(Ot).scale(152.63)}function Tr(Ve,$e){var ot=r($e),pt=r(Ve)*ot,Et=1-pt,bt=r(Ve=t(c(Ve)*ot,-c($e))),Rt=c(Ve);return ot=F(1-pt*pt),[Rt*ot-bt*Et,-bt*ot-Rt*Et]}Tr.invert=function(Ve,$e){var ot=(Ve*Ve+$e*$e)/-2,pt=F(-ot*(2+ot)),Et=$e*ot+Ve*pt,bt=Ve*ot-$e*pt,Rt=F(bt*bt+Et*Et);return[t(pt*Et,Rt*(1+ot)),Rt?-L(pt*bt/Rt):0]};function Ar(){return x.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(Ve,$e){var ot=le(Ve,$e);return[(ot[0]+Ve/A)/2,(ot[1]+$e)/2]}Kr.invert=function(Ve,$e){var ot=Ve,pt=$e,Et=25;do{var bt=r(pt),Rt=c(pt),lr=c(2*pt),yr=Rt*Rt,kr=bt*bt,jr=c(ot),Qr=r(ot/2),ha=c(ot/2),Aa=ha*ha,Da=1-kr*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+ot/A)-Ve,on=.5*(ci*Rt+pt)-$e,An=.5*Vi*(kr*Aa+ci*bt*Qr*yr)+.5/A,Yn=Vi*(jr*lr/4-ci*Rt*ha),Nn=.125*Vi*(lr*ha-ci*Rt*kr*jr),wo=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,os=Yn*Nn-wo*An,So=(on*Yn-ji*wo)/os,Zo=(ji*Nn-on*An)/os;ot-=So,pt-=Zo}while((E(So)>l||E(Zo)>l)&&--Et>0);return[ot,pt]};function na(){return x.geoProjection(Kr).scale(158.837)}d.geoNaturalEarth=x.geoNaturalEarth1,d.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,d.geoAiry=$,d.geoAiryRaw=X,d.geoAitoff=ce,d.geoAitoffRaw=le,d.geoArmadillo=G,d.geoArmadilloRaw=de,d.geoAugust=ee,d.geoAugustRaw=Y,d.geoBaker=j,d.geoBakerRaw=ae,d.geoBerghaus=re,d.geoBerghausRaw=Q,d.geoBertin1953=at,d.geoBertin1953Raw=We,d.geoBoggs=Ye,d.geoBoggsRaw=Ce,d.geoBonne=Nt,d.geoBonneRaw=kt,d.geoBottomley=Mr,d.geoBottomleyRaw=Gt,d.geoBromley=qr,d.geoBromleyRaw=mr,d.geoChamberlin=Le,d.geoChamberlinRaw=Oe,d.geoChamberlinAfrica=Ae,d.geoCollignon=Ze,d.geoCollignonRaw=Ue,d.geoCraig=ut,d.geoCraigRaw=st,d.geoCraster=Pt,d.geoCrasterRaw=Ct,d.geoCylindricalEqualArea=fr,d.geoCylindricalEqualAreaRaw=jt,d.geoCylindricalStereographic=sr,d.geoCylindricalStereographicRaw=ur,d.geoEckert1=Ta,d.geoEckert1Raw=Pr,d.geoEckert2=Ia,d.geoEckert2Raw=Oa,d.geoEckert3=Wa,d.geoEckert3Raw=qa,d.geoEckert4=hi,d.geoEckert4Raw=Ca,d.geoEckert5=Kt,d.geoEckert5Raw=wi,d.geoEckert6=Yt,d.geoEckert6Raw=Dt,d.geoEisenlohr=ta,d.geoEisenlohrRaw=Fr,d.geoFahey=Ba,d.geoFaheyRaw=ca,d.geoFoucaut=Za,d.geoFoucautRaw=$a,d.geoFoucautSinusoidal=pi,d.geoFoucautSinusoidalRaw=ri,d.geoGilbert=tn,d.geoGingery=Br,d.geoGingeryRaw=fn,d.geoGinzburg4=Rr,d.geoGinzburg4Raw=xr,d.geoGinzburg5=Hr,d.geoGinzburg5Raw=Ur,d.geoGinzburg6=Xt,d.geoGinzburg6Raw=gt,d.geoGinzburg8=Or,d.geoGinzburg8Raw=vr,d.geoGinzburg9=Pa,d.geoGinzburg9Raw=ba,d.geoGringorten=ki,d.geoGringortenRaw=la,d.geoGuyou=Co,d.geoGuyouRaw=Bn,d.geoHammer=Se,d.geoHammerRaw=pe,d.geoHammerRetroazimuthal=Ao,d.geoHammerRetroazimuthalRaw=Fs,d.geoHealpix=ns,d.geoHealpixRaw=_s,d.geoHill=Ls,d.geoHillRaw=gs,d.geoHomolosine=Hn,d.geoHomolosineRaw=xs,d.geoHufnagel=ds,d.geoHufnagelRaw=Os,d.geoHyperelliptical=Lo,d.geoHyperellipticalRaw=_n,d.geoInterrupt=uo,d.geoInterruptedBoggs=vl,d.geoInterruptedHomolosine=qs,d.geoInterruptedMollweide=Ss,d.geoInterruptedMollweideHemispheres=su,d.geoInterruptedSinuMollweide=du,d.geoInterruptedSinusoidal=Uc,d.geoKavrayskiy7=dc,d.geoKavrayskiy7Raw=Bs,d.geoLagrange=lu,d.geoLagrangeRaw=Hc,d.geoLarrivee=Ou,d.geoLarriveeRaw=ic,d.geoLaskowski=ml,d.geoLaskowskiRaw=nl,d.geoLittrow=Zs,d.geoLittrowRaw=bs,d.geoLoximuthal=Ul,d.geoLoximuthalRaw=nc,d.geoMiller=fl,d.geoMillerRaw=qu,d.geoModifiedStereographic=$l,d.geoModifiedStereographicRaw=xh,d.geoModifiedStereographicAlaska=Vu,d.geoModifiedStereographicGs48=jl,d.geoModifiedStereographicGs50=Mf,d.geoModifiedStereographicMiller=Ac,d.geoModifiedStereographicLee=nf,d.geoMollweide=he,d.geoMollweideRaw=qe,d.geoMtFlatPolarParabolic=jc,d.geoMtFlatPolarParabolicRaw=of,d.geoMtFlatPolarQuartic=Nf,d.geoMtFlatPolarQuarticRaw=Bf,d.geoMtFlatPolarSinusoidal=Ef,d.geoMtFlatPolarSinusoidalRaw=Gu,d.geoNaturalEarth2=Xc,d.geoNaturalEarth2Raw=oc,d.geoNellHammer=qc,d.geoNellHammerRaw=Ql,d.geoInterruptedQuarticAuthalic=Ys,d.geoNicolosi=fh,d.geoNicolosiRaw=kf,d.geoPatterson=yu,d.geoPattersonRaw=vc,d.geoPolyconic=El,d.geoPolyconicRaw=Tu,d.geoPolyhedral=sf,d.geoPolyhedralButterfly=sl,d.geoPolyhedralCollignon=Cf,d.geoPolyhedralWaterman=hl,d.geoProject=iu,d.geoGringortenQuincuncial=Qt,d.geoPeirceQuincuncial=br,d.geoPierceQuincuncial=br,d.geoQuantize=aa,d.geoQuincuncial=Pc,d.geoRectangularPolyconic=ka,d.geoRectangularPolyconicRaw=$r,d.geoRobinson=Hi,d.geoRobinsonRaw=Ci,d.geoSatellite=Pi,d.geoSatelliteRaw=pn,d.geoSinuMollweide=js,d.geoSinuMollweideRaw=Pn,d.geoSinusoidal=Mt,d.geoSinusoidalRaw=Ke,d.geoStitch=ll,d.geoTimes=Io,d.geoTimesRaw=jn,d.geoTwoPointAzimuthal=Iu,d.geoTwoPointAzimuthalRaw=Ds,d.geoTwoPointAzimuthalUsa=uu,d.geoTwoPointEquidistant=bu,d.geoTwoPointEquidistantRaw=Zu,d.geoTwoPointEquidistantUsa=Ic,d.geoVanDerGrinten=Au,d.geoVanDerGrintenRaw=Rc,d.geoVanDerGrinten2=fo,d.geoVanDerGrinten2Raw=yc,d.geoVanDerGrinten3=Dc,d.geoVanDerGrinten3Raw=zo,d.geoVanDerGrinten4=Yu,d.geoVanDerGrinten4Raw=lc,d.geoWagner=ie,d.geoWagner7=Te,d.geoWagnerRaw=I,d.geoWagner4=wt,d.geoWagner4Raw=ht,d.geoWagner6=$t,d.geoWagner6Raw=Ot,d.geoWiechel=Ar,d.geoWiechelRaw=Tr,d.geoWinkel3=na,d.geoWinkel3Raw=Kr,Object.defineProperty(d,"__esModule",{value:!0})})}}),qU=He({"src/plots/geo/zoom.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=lo(),E=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(y,m){var R=y.projection,L;return m._isScoped?L=i:m._isClipped?L=h:L=s,L(y,R)}V.exports=o;function a(y,m){return d.behavior.zoom().translate(m.translate()).scale(m.scale())}function n(y,m,R){var L=y.id,z=y.graphDiv,F=z.layout,N=F[L],O=z._fullLayout,P=O[L],U={},B={};function X($,le){U[L+"."+$]=x.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=x.nestedProperty(P,$);ce.get()!==le&&(ce.set(le),x.nestedProperty(N,$).set(le),B[L+"."+$]=le)}R(X),X("projection.scale",m.scale()/y.fitScale),X("fitbounds",!1),z.emit("plotly_relayout",B)}function i(y,m){var R=a(y,m);function L(){d.select(this).style(t)}function z(){m.scale(d.event.scale).translate(d.event.translate),y.render(!0);var O=m.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var P=m.invert(y.midPt);O("center.lon",P[0]),O("center.lat",P[1])}function N(){d.select(this).style(r),n(y,m,F)}return R.on("zoomstart",L).on("zoom",z).on("zoomend",N),R}function s(y,m){var R=a(y,m),L=2,z,F,N,O,P,U,B,X,$;function le(q){return m.invert(q)}function ce(q){var se=le(q);if(!se)return!0;var ae=m(se);return Math.abs(ae[0]-q[0])>L||Math.abs(ae[1]-q[1])>L}function de(){d.select(this).style(t),z=d.mouse(this),F=m.rotate(),N=m.translate(),O=F,P=le(z)}function G(){if(U=d.mouse(this),ce(z)){R.scale(m.scale()),R.translate(m.translate());return}m.scale(d.event.scale),m.translate([N[0],d.event.translate[1]]),P?le(U)&&(X=le(U),B=[O[0]+(X[0]-P[0]),F[1],F[2]],m.rotate(B),O=B):(z=U,P=le(z)),$=!0,y.render(!0);var q=m.rotate(),se=m.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.center.lon":se[0],"geo.center.lat":se[1],"geo.projection.rotation.lon":-q[0]})}function Y(){d.select(this).style(r),$&&n(y,m,ee)}function ee(q){var se=m.rotate(),ae=m.invert(y.midPt);q("projection.rotation.lon",-se[0]),q("center.lon",ae[0]),q("center.lat",ae[1])}return R.on("zoomstart",de).on("zoom",G).on("zoomend",Y),R}function h(y,m){var R={r:m.rotate(),k:m.scale()},L=a(y,m),z=u(L,"zoomstart","zoom","zoomend"),F=0,N=L.on,O;L.on("zoomstart",function(){d.select(this).style(t);var $=d.mouse(this),le=m.rotate(),ce=le,de=m.translate(),G=v(le);O=f(m,$),N.call(L,"zoom",function(){var Y=d.mouse(this);if(m.scale(R.k=d.event.scale),!O)$=Y,O=f(m,$);else if(f(m,Y)){m.rotate(le).translate(de);var ee=f(m,Y),q=T(O,ee),se=M(c(G,q)),ae=R.r=l(se,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),m.rotate(ae),ce=ae}U(z.of(this,arguments))}),P(z.of(this,arguments))}).on("zoomend",function(){d.select(this).style(r),N.call(L,"zoom",null),B(z.of(this,arguments)),n(y,m,X)}).on("zoom.redraw",function(){y.render(!0);var $=m.rotate();y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function P($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function X($){var le=m.rotate();$("projection.rotation.lon",-le[0]),$("projection.rotation.lat",-le[1])}return d.rebind(L,z,"on")}function f(y,m){var R=y.invert(m);return R&&isFinite(R[0])&&isFinite(R[1])&&g(R)}function v(y){var m=.5*y[0]*E,R=.5*y[1]*E,L=.5*y[2]*E,z=Math.sin(m),F=Math.cos(m),N=Math.sin(R),O=Math.cos(R),P=Math.sin(L),U=Math.cos(L);return[F*O*U+z*N*P,z*O*U-F*N*P,F*N*U+z*O*P,F*O*P-z*N*U]}function c(y,m){var R=y[0],L=y[1],z=y[2],F=y[3],N=m[0],O=m[1],P=m[2],U=m[3];return[R*N-L*O-z*P-F*U,R*O+L*N+z*U-F*P,R*P-L*U+z*N+F*O,R*U+L*P-z*O+F*N]}function T(y,m){if(!(!y||!m)){var R=p(y,m),L=Math.sqrt(b(R,R)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(y,m)))),F=Math.sin(z)/L;return L&&[Math.cos(z),R[2]*F,-R[1]*F,R[0]*F]}}function l(y,m,R){var L=A(m,2,y[0]);L=A(L,1,y[1]),L=A(L,0,y[2]-R[2]);var z=m[0],F=m[1],N=m[2],O=L[0],P=L[1],U=L[2],B=Math.atan2(F,z)*e,X=Math.sqrt(z*z+F*F),$,le;Math.abs(P)>X?(le=(P>0?90:-90)-B,$=0):(le=Math.asin(P/X)*e-B,$=Math.sqrt(X*X-P*P));var ce=180-le-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,G=(Math.atan2(U,O)-Math.atan2(N,-$))*e,Y=_(R[0],R[1],le,de),ee=_(R[0],R[1],ce,G);return Y<=ee?[le,de,R[2]]:[ce,G,R[2]]}function _(y,m,R,L){var z=w(R-y),F=w(L-m);return Math.sqrt(z*z+F*F)}function w(y){return(y%360+540)%360-180}function A(y,m,R){var L=R*E,z=y.slice(),F=m===0?1:0,N=m===2?1:2,O=Math.cos(L),P=Math.sin(L);return z[F]=y[F]*O-y[N]*P,z[N]=y[N]*O+y[F]*P,z}function M(y){return[Math.atan2(2*(y[0]*y[1]+y[2]*y[3]),1-2*(y[1]*y[1]+y[2]*y[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(y[0]*y[2]-y[3]*y[1]))))*e,Math.atan2(2*(y[0]*y[3]+y[1]*y[2]),1-2*(y[2]*y[2]+y[3]*y[3]))*e]}function g(y){var m=y[0]*E,R=y[1]*E,L=Math.cos(R);return[L*Math.cos(m),L*Math.sin(m),Math.sin(R)]}function b(y,m){for(var R=0,L=0,z=y.length;L<z;++L)R+=y[L]*m[L];return R}function p(y,m){return[y[1]*m[2]-y[2]*m[1],y[2]*m[0]-y[0]*m[2],y[0]*m[1]-y[1]*m[0]]}function u(y){for(var m=0,R=arguments.length,L=[];++m<R;)L.push(arguments[m]);var z=d.dispatch.apply(null,L);return z.of=function(F,N){return function(O){var P;try{P=O.sourceEvent=d.event,O.target=y,d.event=O,z[O.type].apply(F,N)}finally{d.event=P}}},z}}}),VU=He({"src/plots/geo/geo.js"(Z,V){"use strict";var d=Wn(),x=zE(),S=x.geoPath,E=x.geoDistance,e=jU(),t=lo(),r=sa(),o=r.strTranslate,a=Jn(),n=es(),i=rf(),s=bc(),h=Ho(),f=Yd().getAutoRange,v=Ap(),c=Af().prepSelect,T=Af().clearOutline,l=Af().selectOnClick,_=qU(),w=yx(),A=g0(),M=nT(),g=IE().feature;function b(R){this.id=R.id,this.graphDiv=R.graphDiv,this.container=R.container,this.topojsonURL=R.topojsonURL,this.isStatic=R.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 p=b.prototype;V.exports=function(L){return new b(L)},p.plot=function(R,L,z,F){var N=this;if(F)return N.update(R,L,!0);N._geoCalcData=R,N._fullLayout=L;var O=L[this.id],P=[],U=!1;for(var B in w.layerNameToAdjective)if(B!=="frame"&&O["show"+B]){U=!0;break}for(var X=!1,$=0;$<R.length;$++){var le=R[0][0].trace;le._geo=N,le.locationmode&&(U=!0);var ce=le.marker;if(ce){var de=ce.angle,G=ce.angleref;(de||G==="north"||G==="previous")&&(X=!0)}}if(this._hasMarkerAngles=X,U){var Y=M.getTopojsonName(O);(N.topojson===null||Y!==N.topojsonName)&&(N.topojsonName=Y,PlotlyGeoAssets.topojson[N.topojsonName]===void 0&&P.push(N.fetchTopojson()))}P=P.concat(A.fetchTraceGeoData(R)),z.push(new Promise(function(ee,q){Promise.all(P).then(function(){N.topojson=PlotlyGeoAssets.topojson[N.topojsonName],N.update(R,L),ee()}).catch(q)}))},p.fetchTopojson=function(){var R=this,L=M.getTopojsonPath(R.topojsonURL,R.topojsonName);return new Promise(function(z,F){d.json(L,function(N,O){if(N)return N.status===404?F(new Error(["plotly.js could not find topojson file at",L+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):F(new Error(["unexpected error while fetching topojson file at",L].join(" ")));PlotlyGeoAssets.topojson[R.topojsonName]=O,z()})})},p.update=function(R,L,z){var F=L[this.id];this.hasChoropleth=!1;for(var N=0;N<R.length;N++){var O=R[N],P=O[0].trace;P.type==="choropleth"&&(this.hasChoropleth=!0),P.visible===!0&&P._length>0&&P._module.calcGeoJSON(O,L)}if(!z){var U=this.updateProjection(R,L);if(U)return;(!this.viewInitial||this.scope!==F.scope)&&this.saveViewInitial(F)}this.scope=F.scope,this.updateBaseLayers(L,F),this.updateDims(L,F),this.updateFx(L,F),s.generalUpdatePerTraceModule(this.graphDiv,this,R,F);var B=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=B.selectAll(".point"),this.dataPoints.text=B.selectAll("text"),this.dataPaths.line=B.selectAll(".js-line");var X=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=X.selectAll("path"),this._render()},p.updateProjection=function(R,L){var z=this.graphDiv,F=L[this.id],N=L._size,O=F.domain,P=F.projection,U=F.lonaxis,B=F.lataxis,X=U._ax,$=B._ax,le=this.projection=u(F),ce=[[N.l+N.w*O.x[0],N.t+N.h*(1-O.y[1])],[N.l+N.w*O.x[1],N.t+N.h*(1-O.y[0])]],de=F.center||{},G=P.rotation||{},Y=U.range||[],ee=B.range||[];if(F.fitbounds){X._length=ce[1][0]-ce[0][0],$._length=ce[1][1]-ce[0][1],X.range=f(z,X),$.range=f(z,$);var q=(X.range[0]+X.range[1])/2,se=($.range[0]+$.range[1])/2;if(F._isScoped)de={lon:q,lat:se};else if(F._isClipped){de={lon:q,lat:se},G={lon:q,lat:se,roll:G.roll};var ae=P.type,j=w.lonaxisSpan[ae]/2||180,Q=w.lataxisSpan[ae]/2||90;Y=[q-j,q+j],ee=[se-Q,se+Q]}else de={lon:q,lat:se},G={lon:q,lat:G.lat,roll:G.roll}}le.center([de.lon-G.lon,de.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(P.parallels);var re=m(Y,ee);le.fitExtent(ce,re);var pe=this.bounds=le.getBounds(re),we=this.fitScale=le.scale(),Se=le.translate();if(F.fitbounds){var Ie=le.getBounds(m(X.range,$.range)),Re=Math.min((pe[1][0]-pe[0][0])/(Ie[1][0]-Ie[0][0]),(pe[1][1]-pe[0][1])/(Ie[1][1]-Ie[0][1]));isFinite(Re)?le.scale(Re*we):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else le.scale(P.scale*we);var We=this.midPt=[(pe[0][0]+pe[1][0])/2,(pe[0][1]+pe[1][1])/2];if(le.translate([Se[0]+(We[0]-Se[0]),Se[1]+(We[1]-Se[1])]).clipExtent(pe),F._isAlbersUsa){var at=le([de.lon,de.lat]),nt=le.translate();le.translate([nt[0]-(at[0]-nt[0]),nt[1]-(at[1]-nt[1])])}},p.updateBaseLayers=function(R,L){var z=this,F=z.topojson,N=z.layers,O=z.basePaths;function P(ce){return ce==="lonaxis"||ce==="lataxis"}function U(ce){return!!w.lineLayers[ce]}function B(ce){return!!w.fillLayers[ce]}var X=this.hasChoropleth?w.layersForChoropleth:w.layers,$=X.filter(function(ce){return U(ce)||B(ce)?L["show"+ce]:P(ce)?L[ce].showgrid:!0}),le=z.framework.selectAll(".layer").data($,String);le.exit().each(function(ce){delete N[ce],delete O[ce],d.select(this).remove()}),le.enter().append("g").attr("class",function(ce){return"layer "+ce}).each(function(ce){var de=N[ce]=d.select(this);ce==="bg"?z.bgRect=de.append("rect").style("pointer-events","all"):P(ce)?O[ce]=de.append("path").style("fill","none"):ce==="backplot"?de.append("g").classed("choroplethlayer",!0):ce==="frontplot"?de.append("g").classed("scatterlayer",!0):U(ce)?O[ce]=de.append("path").style("fill","none").style("stroke-miterlimit",2):B(ce)&&(O[ce]=de.append("path").style("stroke","none"))}),le.order(),le.each(function(ce){var de=O[ce],G=w.layerNameToAdjective[ce];ce==="frame"?de.datum(w.sphereSVG):U(ce)||B(ce)?de.datum(g(F,F.objects[ce])):P(ce)&&de.datum(y(ce,L,R)).call(a.stroke,L[ce].gridcolor).call(n.dashLine,L[ce].griddash,L[ce].gridwidth),U(ce)?de.call(a.stroke,L[G+"color"]).call(n.dashLine,"",L[G+"width"]):B(ce)&&de.call(a.fill,L[G+"color"])})},p.updateDims=function(R,L){var z=this.bounds,F=(L.framewidth||0)/2,N=z[0][0]-F,O=z[0][1]-F,P=z[1][0]-N+F,U=z[1][1]-O+F;n.setRect(this.clipRect,N,O,P,U),this.bgRect.call(n.setRect,N,O,P,U).call(a.fill,L.bgcolor),this.xaxis._offset=N,this.xaxis._length=P,this.yaxis._offset=O,this.yaxis._length=U},p.updateFx=function(R,L){var z=this,F=z.graphDiv,N=z.bgRect,O=R.dragmode,P=R.clickmode;if(z.isStatic)return;function U(){var le=z.viewInitial,ce={};for(var de in le)ce[z.id+"."+de]=le[de];t.call("_guiRelayout",F,ce),F.emit("plotly_doubleclick",null)}function B(le){return z.projection.invert([le[0]+z.xaxis._offset,le[1]+z.yaxis._offset])}var X=function(le,ce){if(ce.isRect){var de=le.range={};de[z.id]=[B([ce.xmin,ce.ymin]),B([ce.xmax,ce.ymax])]}else{var G=le.lassoPoints={};G[z.id]=ce.map(B)}},$={element:z.bgRect.node(),gd:F,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:X},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(le){le===2&&T(F)}};O==="pan"?(N.node().onmousedown=null,N.call(_(z,L)),N.on("dblclick.zoom",U),F._context._scrollZoom.geo||N.on("wheel.zoom",null)):(O==="select"||O==="lasso")&&(N.on(".zoom",null),$.prepFn=function(le,ce,de){c(le,ce,de,$,O)},v.init($)),N.on("mousemove",function(){var le=z.projection.invert(r.getPositionFromD3Event());if(!le)return v.unhover(F,d.event);z.xaxis.p2c=function(){return le[0]},z.yaxis.p2c=function(){return le[1]},i.hover(F,d.event,z.id)}),N.on("mouseout",function(){F._dragging||v.unhover(F,d.event)}),N.on("click",function(){O!=="select"&&O!=="lasso"&&(P.indexOf("select")>-1&&l(d.event,F,[z.xaxis],[z.yaxis],z.id,$),P.indexOf("event")>-1&&i.click(F,d.event))})},p.makeFramework=function(){var R=this,L=R.graphDiv,z=L._fullLayout,F="clip"+z._uid+R.id;R.clipDef=z._clips.append("clipPath").attr("id",F),R.clipRect=R.clipDef.append("rect"),R.framework=d.select(R.container).append("g").attr("class","geo "+R.id).call(n.setClipUrl,F,L),R.project=function(N){var O=R.projection(N);return O?[O[0]-R.xaxis._offset,O[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(N){return R.project(N)[0]}},R.yaxis={_id:"y",c2p:function(N){return R.project(N)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(R.mockAxis,z)},p.saveViewInitial=function(R){var L=R.center||{},z=R.projection,F=z.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":z.scale};var N;R._isScoped?N={"center.lon":L.lon,"center.lat":L.lat}:R._isClipped?N={"projection.rotation.lon":F.lon,"projection.rotation.lat":F.lat}:N={"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":F.lon},r.extendFlat(this.viewInitial,N)},p.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},p._render=function(){var R=this.projection,L=R.getPath(),z;function F(O){var P=R(O.lonlat);return P?o(P[0],P[1]):null}function N(O){return R.isLonLatOverEdges(O.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",L);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(O){return L(O.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",N).attr("transform",F)};function u(R){var L=R.projection,z=L.type,F=w.projNames[z];F="geo"+r.titleCase(F);for(var N=x[F]||e[F],O=N(),P=R._isSatellite?Math.acos(1/L.distance)*180/Math.PI:R._isClipped?w.lonaxisSpan[z]/2:null,U=["center","rotate","parallels","clipExtent"],B=function(le){return le?O:[]},X=0;X<U.length;X++){var $=U[X];typeof O[$]!="function"&&(O[$]=B)}return O.isLonLatOverEdges=function(le){if(O(le)===null)return!0;if(P){var ce=O.rotate(),de=E(le,[-ce[0],-ce[1]]),G=P*Math.PI/180;return de>G}else return!1},O.getPath=function(){return S().projection(O)},O.getBounds=function(le){return O.getPath().bounds(le)},O.precision(w.precision),R._isSatellite&&O.tilt(L.tilt).distance(L.distance),P&&O.clipAngle(P-w.clipPad),O}function y(R,L,z){var F=1e-6,N=2.5,O=L[R],P=w.scopeDefaults[L.scope],U,B,X;R==="lonaxis"?(U=P.lonaxisRange,B=P.lataxisRange,X=function(se,ae){return[se,ae]}):R==="lataxis"&&(U=P.lataxisRange,B=P.lonaxisRange,X=function(se,ae){return[ae,se]});var $={type:"linear",range:[U[0],U[1]-F],tick0:O.tick0,dtick:O.dtick};h.setConvert($,z);var le=h.calcTicks($);!L.isScoped&&R==="lonaxis"&&le.pop();for(var ce=le.length,de=new Array(ce),G=0;G<ce;G++)for(var Y=le[G].x,ee=de[G]=[],q=B[0];q<B[1]+N;q+=N)ee.push(X(Y,q));return{type:"MultiLineString",coordinates:de}}function m(R,L){var z=w.clipPad,F=R[0]+z,N=R[1]-z,O=L[0]+z,P=L[1]-z;F>0&&N<0&&(N+=360);var U=(N-F)/4;return{type:"Polygon",coordinates:[[[F,O],[F,P],[F+U,P],[F+2*U,P],[F+3*U,P],[N,P],[N,O],[N-U,O],[N-2*U,O],[N-3*U,O],[F,O]]]}}}}),FE=He({"src/plots/geo/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=wc().attributes,S=Gh().dash,E=yx(),e=pc().overrideAll,t=Jm(),r={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:d.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:S},o=V.exports=e({domain:x({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:t(E.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:t(E.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:d.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:E.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:E.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:E.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:E.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:d.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:d.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:d.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:d.background},lonaxis:r,lataxis:r},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}}),GU=He({"src/plots/geo/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=o0(),S=Hh().getSubplotData,E=yx(),e=FE(),t=E.axesNames;V.exports=function(a,n,i){x(a,n,i,{type:"geo",attributes:e,handleDefaults:r,fullData:i,partition:"y"})};function r(o,a,n,i){var s=S(i.fullData,"geo",i.id),h=s.map(function(ee){return ee.index}),f=n("resolution"),v=n("scope"),c=E.scopeDefaults[v],T=n("projection.type",c.projType),l=a._isAlbersUsa=T==="albers usa";l&&(v=a.scope="usa");var _=a._isScoped=v!=="world",w=a._isSatellite=T==="satellite",A=a._isConic=T.indexOf("conic")!==-1||T==="albers",M=a._isClipped=!!E.lonaxisSpan[T];if(o.visible===!1){var g=d.extendDeep({},a._template);g.showcoastlines=!1,g.showcountries=!1,g.showframe=!1,g.showlakes=!1,g.showland=!1,g.showocean=!1,g.showrivers=!1,g.showsubunits=!1,g.lonaxis&&(g.lonaxis.showgrid=!1),g.lataxis&&(g.lataxis.showgrid=!1),a._template=g}for(var b=n("visible"),p,u=0;u<t.length;u++){var y=t[u],m=[30,10][u],R;if(_)R=c[y+"Range"];else{var L=E[y+"Span"],z=(L[T]||L["*"])/2,F=n("projection.rotation."+y.slice(0,3),c.projRotate[u]);R=[F-z,F+z]}var N=n(y+".range",R);n(y+".tick0"),n(y+".dtick",m),p=n(y+".showgrid",b?void 0:!1),p&&(n(y+".gridcolor"),n(y+".gridwidth"),n(y+".griddash")),a[y]._ax={type:"linear",_id:y.slice(0,3),_traceIndices:h,setScale:d.identity,c2l:d.identity,r2l:d.identity,autorange:!0,range:N.slice(),_m:1,_input:{}}}var O=a.lonaxis.range,P=a.lataxis.range,U=O[0],B=O[1];U>0&&B<0&&(B+=360);var X=(U+B)/2,$;if(!l){var le=_?c.projRotate:[X,0,0];$=n("projection.rotation.lon",le[0]),n("projection.rotation.lat",le[1]),n("projection.rotation.roll",le[2]),p=n("showcoastlines",!_&&b),p&&(n("coastlinecolor"),n("coastlinewidth")),p=n("showocean",b?void 0:!1),p&&n("oceancolor")}var ce,de;if(l?(ce=-96.6,de=38.7):(ce=_?X:$,de=(P[0]+P[1])/2),n("center.lon",ce),n("center.lat",de),w&&(n("projection.tilt"),n("projection.distance")),A){var G=c.projParallels||[0,60];n("projection.parallels",G)}n("projection.scale"),p=n("showland",b?void 0:!1),p&&n("landcolor"),p=n("showlakes",b?void 0:!1),p&&n("lakecolor"),p=n("showrivers",b?void 0:!1),p&&(n("rivercolor"),n("riverwidth")),p=n("showcountries",_&&v!=="usa"&&b),p&&(n("countrycolor"),n("countrywidth")),(v==="usa"||v==="north america"&&f===50)&&(n("showsubunits",b),n("subunitcolor"),n("subunitwidth")),_||(p=n("showframe",b),p&&(n("framecolor"),n("framewidth"))),n("bgcolor");var Y=n("fitbounds");Y&&(delete a.projection.scale,_?(delete a.center.lon,delete a.center.lat):M?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}}}),OE=He({"src/plots/geo/index.js"(Z,V){"use strict";var d=Hh().getSubplotCalcData,x=sa().counterRegex,S=VU(),E="geo",e=x(E),t={};t[E]={valType:"subplotid",dflt:E,editType:"calc"};function r(n){for(var i=n._fullLayout,s=n.calcdata,h=i._subplots[E],f=0;f<h.length;f++){var v=h[f],c=d(s,E,v),T=i[v],l=T._subplot;l||(l=S({id:v,graphDiv:n,container:i._geolayer.node(),topojsonURL:n._context.topojsonURL,staticPlot:n._context.staticPlot}),i[v]._subplot=l),l.plot(c,i,n._promises)}}function o(n,i,s,h){for(var f=h._subplots[E]||[],v=0;v<f.length;v++){var c=f[v],T=h[c]._subplot;!i[c]&&T&&(T.framework.remove(),T.clipDef.remove())}}function a(n){for(var i=n._fullLayout,s=i._subplots[E],h=0;h<s.length;h++){var f=i[s[h]],v=f._subplot;v.updateFx(i,f)}}V.exports={attr:E,name:E,idRoot:E,idRegex:e,attrRegex:e,attributes:t,layoutAttributes:FE(),supplyLayoutDefaults:GU(),plot:r,updateFx:a,clean:o}}}),HU=He({"src/traces/scattergeo/index.js"(Z,V){"use strict";V.exports={attributes:vg(),supplyDefaults:PU(),colorbar:pp(),formatLabels:IU(),calc:iT(),calcGeoJSON:DE().calcGeoJSON,plot:DE().plot,style:RE(),styleOnSelect:Qp().styleOnSelect,hoverPoints:BU(),eventData:NU(),selectPoints:UU(),moduleType:"trace",name:"scattergeo",basePlotModule:OE(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),WU=He({"lib/scattergeo.js"(Z,V){"use strict";V.exports=HU()}}),k1=He({"src/traces/choropleth/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,templatefallbackAttrs:x}=Jl(),S=vg(),E=ku(),e=ru(),t=sh().defaultLine,r=Qo().extendFlat,o=S.marker.line;V.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:S.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},S.geojson,{}),featureidkey:S.featureidkey,text:r({},S.text,{}),hovertext:r({},S.hovertext,{}),marker:{line:{color:r({},o.color,{dflt:t}),width:r({},o.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:S.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:S.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},e.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:d(),hovertemplatefallback:x(),showlegend:r({},e.showlegend,{dflt:!1})},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),XU=He({"src/traces/choropleth/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=k1(),E=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");V.exports=function(t,r,o,a){function n(T,l){return d.coerce(t,r,S,T,l)}var i=n("locations"),s=n("z");if(!(i&&i.length&&d.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(i.length,s.length);var h=n("geojson"),f;(typeof h=="string"&&h!==""||d.isPlainObject(h))&&(f="geojson-id");var v=n("locationmode",f);v==="country names"&&d.warn(E),v==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var c=n("marker.line.width");c&&n("marker.line.color"),n("marker.opacity"),x(t,r,a,n,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(r,n)}}}),lT=He({"src/traces/choropleth/calc.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=Tp(),E=Av(),e=Od();function t(r){return r&&typeof r=="string"}V.exports=function(o,a){var n=a._length,i=new Array(n),s;a.geojson?s=function(T){return t(T)||d(T)}:s=t;for(var h=0;h<n;h++){var f=i[h]={},v=a.locations[h],c=a.z[h];s(v)&&d(c)?(f.loc=v,f.z=c):(f.loc=null,f.z=x),f.index=h}return E(i,a),S(o,a,{vals:a.z,containerStr:"",cLetter:"z"}),e(i,a),i}}}),uT=He({"src/traces/choropleth/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=es(),E=rc();function e(o,a){a&&t(o,a)}function t(o,a){var n=a[0].trace,i=a[0].node3,s=i.selectAll(".choroplethlocation"),h=n.marker||{},f=h.line||{},v=E.makeColorScaleFuncFromTrace(n);s.each(function(c){d.select(this).attr("fill",v(c.z)).call(x.stroke,c.mlc||f.color).call(S.dashLine,"",c.mlw||f.width||0).style("opacity",h.opacity)}),S.selectedPointStyle(s,n)}function r(o,a){var n=a[0].node3,i=a[0].trace;i.selectedpoints?S.selectedPointStyle(n.selectAll(".choroplethlocation"),i):t(o,a)}V.exports={style:e,styleOnSelect:r}}}),BE=He({"src/traces/choropleth/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=g0(),E=nT().getTopojsonFeatures,e=Yd().findExtremes,t=uT().style;function r(a,n,i){var s=n.layers.backplot.select(".choroplethlayer");x.makeTraceGroups(s,i,"trace choropleth").each(function(h){var f=d.select(this),v=f.selectAll("path.choroplethlocation").data(x.identity);v.enter().append("path").classed("choroplethlocation",!0),v.exit().remove(),t(a,h)})}function o(a,n){for(var i=a[0].trace,s=n[i.geo],h=s._subplot,f=i.locationmode,v=i._length,c=f==="geojson-id"?S.extractTraceFeature(a):E(i,h.topojson),T=[],l=[],_=0;_<v;_++){var w=a[_],A=f==="geojson-id"?w.fOut:S.locationToFeature(f,w.loc,c);if(A){w.geojson=A,w.ct=A.properties.ct,w._polygons=S.feature2polygons(A);var M=S.computeBbox(A);T.push(M[0],M[2]),l.push(M[1],M[3])}else w.geojson=null}if(s.fitbounds==="geojson"&&f==="geojson-id"){var g=S.computeBbox(S.getTraceGeojson(i));T=[g[0],g[2]],l=[g[1],g[3]]}var b={padded:!0};i._extremes.lon=e(s.lonaxis._ax,T,b),i._extremes.lat=e(s.lataxis._ax,l,b)}V.exports={calcGeoJSON:o,plot:r}}}),cT=He({"src/traces/choropleth/hover.js"(Z,V){"use strict";var d=Ho(),x=k1(),S=sa().fillText;V.exports=function(t,r,o){var a=t.cd,n=a[0].trace,i=t.subplot,s,h,f,v,c=[r,o],T=[r+360,o];for(h=0;h<a.length;h++)if(s=a[h],v=!1,s._polygons){for(f=0;f<s._polygons.length;f++)s._polygons[f].contains(c)&&(v=!v),s._polygons[f].contains(T)&&(v=!v);if(v)break}if(!(!v||!s))return t.x0=t.x1=t.xa.c2p(s.ct),t.y0=t.y1=t.ya.c2p(s.ct),t.index=s.index,t.location=s.loc,t.z=s.z,t.zLabel=d.tickText(i.mockAxis,i.mockAxis.c2l(s.z),"hover").text,t.hovertemplate=s.hovertemplate,E(t,n,s),[t]};function E(e,t,r){if(!t.hovertemplate){var o=r.hi||t.hoverinfo,a=String(r.loc),n=o==="all"?x.hoverinfo.flags:o.split("+"),i=n.indexOf("name")!==-1,s=n.indexOf("location")!==-1,h=n.indexOf("z")!==-1,f=n.indexOf("text")!==-1,v=!i&&s,c=[];v?e.nameOverride=a:(i&&(e.nameOverride=t.name),s&&c.push(a)),h&&c.push(e.zLabel),f&&S(r,t,c),e.extraText=c.join("<br>")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){x.location=S.location,x.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x.ct=r.ct,x}}}),hT=He({"src/traces/choropleth/select.js"(Z,V){"use strict";V.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a,n,i,s;if(S===!1)for(o=0;o<E.length;o++)E[o].selected=0;else for(o=0;o<E.length;o++)a=E[o],n=a.ct,n&&(i=e.c2p(n),s=t.c2p(n),S.contains([i,s],null,o,x)?(r.push({pointNumber:o,lon:n[0],lat:n[1]}),a.selected=1):a.selected=0);return r}}}),ZU=He({"src/traces/choropleth/index.js"(Z,V){"use strict";V.exports={attributes:k1(),supplyDefaults:XU(),colorbar:n0(),calc:lT(),calcGeoJSON:BE().calcGeoJSON,plot:BE().plot,style:uT().style,styleOnSelect:uT().styleOnSelect,hoverPoints:cT(),eventData:fT(),selectPoints:hT(),moduleType:"trace",name:"choropleth",basePlotModule:OE(),categories:["geo","noOpacity","showLegend"],meta:{}}}}),YU=He({"lib/choropleth.js"(Z,V){"use strict";V.exports=ZU()}}),pT=He({"src/traces/scattergl/hover.js"(Z,V){"use strict";var d=lo(),x=sa(),S=l1();function E(t,r,o,a){var n=t.cd,i=n[0].t,s=n[0].trace,h=t.xa,f=t.ya,v=i.x,c=i.y,T=h.c2p(r),l=f.c2p(o),_=t.distance,w;if(i.tree){var A=h.p2c(T-_),M=h.p2c(T+_),g=f.p2c(l-_),b=f.p2c(l+_);a==="x"?w=i.tree.range(Math.min(A,M),Math.min(f._rl[0],f._rl[1]),Math.max(A,M),Math.max(f._rl[0],f._rl[1])):w=i.tree.range(Math.min(A,M),Math.min(g,b),Math.max(A,M),Math.max(g,b))}else w=i.ids;var p,u,y,m,R,L,z,F,N,O=_;if(a==="x"){var P=!!s.xperiodalignment,U=!!s.yperiodalignment;for(R=0;R<w.length;R++){if(p=w[R],y=v[p],L=Math.abs(h.c2p(y)-T),P){var B=h.c2p(s._xStarts[p]),X=h.c2p(s._xEnds[p]);L=T>=Math.min(B,X)&&T<=Math.max(B,X)?0:1/0}if(L<O){if(O=L,m=c[p],z=f.c2p(m)-l,U){var $=f.c2p(s._yStarts[p]),le=f.c2p(s._yEnds[p]);z=l>=Math.min($,le)&&l<=Math.max($,le)?0:1/0}N=Math.sqrt(L*L+z*z),u=w[R]}}}else for(R=w.length-1;R>-1;R--)p=w[R],y=v[p],m=c[p],L=h.c2p(y)-T,z=f.c2p(m)-l,F=Math.sqrt(L*L+z*z),F<O&&(O=N=F,u=p);return t.index=u,t.distance=O,t.dxy=N,u===void 0?[t]:[e(t,v,c,s)]}function e(t,r,o,a){var n=t.xa,i=t.ya,s=t.distance,h=t.dxy,f=t.index,v={pointNumber:f,x:r[f],y:o[f]};v.tx=x.isArrayOrTypedArray(a.text)?a.text[f]:a.text,v.htx=Array.isArray(a.hovertext)?a.hovertext[f]:a.hovertext,v.data=Array.isArray(a.customdata)?a.customdata[f]:a.customdata,v.tp=Array.isArray(a.textposition)?a.textposition[f]:a.textposition;var c=a.textfont;c&&(v.ts=x.isArrayOrTypedArray(c.size)?c.size[f]:c.size,v.tc=x.isArrayOrTypedArray(c.color)?c.color[f]:c.color,v.tf=Array.isArray(c.family)?c.family[f]:c.family,v.tw=Array.isArray(c.weight)?c.weight[f]:c.weight,v.ty=Array.isArray(c.style)?c.style[f]:c.style,v.tv=Array.isArray(c.variant)?c.variant[f]:c.variant);var T=a.marker;T&&(v.ms=x.isArrayOrTypedArray(T.size)?T.size[f]:T.size,v.mo=x.isArrayOrTypedArray(T.opacity)?T.opacity[f]:T.opacity,v.mx=x.isArrayOrTypedArray(T.symbol)?T.symbol[f]:T.symbol,v.ma=x.isArrayOrTypedArray(T.angle)?T.angle[f]:T.angle,v.mc=x.isArrayOrTypedArray(T.color)?T.color[f]:T.color);var l=T&&T.line;l&&(v.mlc=Array.isArray(l.color)?l.color[f]:l.color,v.mlw=x.isArrayOrTypedArray(l.width)?l.width[f]:l.width);var _=T&&T.gradient;_&&_.type!=="none"&&(v.mgt=Array.isArray(_.type)?_.type[f]:_.type,v.mgc=Array.isArray(_.color)?_.color[f]:_.color);var w=n.c2p(v.x,!0),A=i.c2p(v.y,!0),M=v.mrc||1,g=a.hoverlabel;g&&(v.hbg=Array.isArray(g.bgcolor)?g.bgcolor[f]:g.bgcolor,v.hbc=Array.isArray(g.bordercolor)?g.bordercolor[f]:g.bordercolor,v.hts=x.isArrayOrTypedArray(g.font.size)?g.font.size[f]:g.font.size,v.htc=Array.isArray(g.font.color)?g.font.color[f]:g.font.color,v.htf=Array.isArray(g.font.family)?g.font.family[f]:g.font.family,v.hnl=x.isArrayOrTypedArray(g.namelength)?g.namelength[f]:g.namelength);var b=a.hoverinfo;b&&(v.hi=Array.isArray(b)?b[f]:b);var p=a.hovertemplate;p&&(v.ht=Array.isArray(p)?p[f]:p);var u={};u[t.index]=v;var y=a._origX,m=a._origY,R=x.extendFlat({},t,{color:S(a,v),x0:w-M,x1:w+M,xLabelVal:y?y[f]:v.x,y0:A-M,y1:A+M,yLabelVal:m?m[f]:v.y,cd:u,distance:s,spikeDistance:h,hovertemplate:v.ht});return v.htx?R.text=v.htx:v.tx?R.text=v.tx:a.text&&(R.text=a.text),x.fillText(v,a,R),d.getComponentMethod("errorbars","hoverInfo")(v,a,R),R}V.exports={hoverPoints:E,calcHover:e}}}),y0=He({"src/traces/scattergl/constants.js"(Z,V){"use strict";var d=20;V.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:d,SYMBOL_STROKE:d/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]}}}}),xx=He({"src/traces/scattergl/attributes.js"(Z,V){"use strict";var d=ru(),x=tc(),S=$d(),E=af(),e=tf().axisHoverFormat,t=ku(),r=Jm(),o=Qo().extendFlat,a=pc().overrideAll,n=y0().DASHES,i=E.line,s=E.marker,h=s.line,f=V.exports=a({x:E.x,x0:E.x0,dx:E.dx,y:E.y,y0:E.y0,dy:E.dy,xperiod:E.xperiod,yperiod:E.yperiod,xperiod0:E.xperiod0,yperiod0:E.yperiod0,xperiodalignment:E.xperiodalignment,yperiodalignment:E.yperiodalignment,xhoverformat:e("x"),yhoverformat:e("y"),text:E.text,hovertext:E.hovertext,textposition:E.textposition,textfont:x({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:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(n),dflt:"solid"}},marker:o({},t("marker"),{symbol:s.symbol,angle:s.angle,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:o({},t("marker.line"),{width:h.width})}),connectgaps:E.connectgaps,fill:o({},E.fill,{dflt:"none"}),fillcolor:S(),selected:{marker:E.selected.marker,textfont:E.selected.textfont},unselected:{marker:E.unselected.marker,textfont:E.unselected.textfont},opacity:d.opacity},"calc","nested");f.x.editType=f.y.editType=f.x0.editType=f.y0.editType="calc+clearAxisTypes",f.hovertemplate=E.hovertemplate,f.hovertemplatefallback=E.hovertemplatefallback,f.texttemplate=E.texttemplate,f.texttemplatefallback=E.texttemplatefallback}}),dT=He({"src/traces/scattergl/helpers.js"(Z){"use strict";var V=y0();Z.isOpenSymbol=function(d){return typeof d=="string"?V.OPEN_RE.test(d):d%200>100},Z.isDotSymbol=function(d){return typeof d=="string"?V.DOT_RE.test(d):d>200}}}),KU=He({"src/traces/scattergl/defaults.js"(Z,V){"use strict";var d=sa(),x=lo(),S=dT(),E=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),n=Dd(),i=ev(),s=zd();V.exports=function(f,v,c,T){function l(u,y){return d.coerce(f,v,E,u,y)}var _=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,v,T,l);if(!A){v.visible=!1;return}o(f,v,T,l),l("xhoverformat"),l("yhoverformat");var M=A<e.PTS_LINESONLY?"lines+markers":"lines";l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("mode",M),t.hasMarkers(v)&&(a(f,v,c,T,l,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),l("marker.line.width",_||w?1:0)),t.hasLines(v)&&(l("connectgaps"),n(f,v,c,T,l),l("line.shape")),t.hasText(v)&&(l("texttemplate"),l("texttemplatefallback"),s(f,v,T,l,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var g=(v.line||{}).color,b=(v.marker||{}).color;l("fill"),v.fill!=="none"&&i(f,v,c,l);var p=x.getComponentMethod("errorbars","supplyDefaults");p(f,v,g||b||c,{axis:"y"}),p(f,v,g||b||c,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(v,l)}}}),JU=He({"src/traces/scattergl/format_labels.js"(Z,V){"use strict";var d=P2();V.exports=function(S,E,e){var t=S.i;return"x"in S||(S.x=E._x[t]),"y"in S||(S.y=E._y[t]),d(S,E,e)}}}),$U=He({"node_modules/binary-search-bounds/search-bounds.js"(Z,V){"use strict";function d(r,o,a,n,i){for(var s=i+1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v>=0?(s=h,i=h-1):n=h+1}return s}function x(r,o,a,n,i){for(var s=i+1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v>0?(s=h,i=h-1):n=h+1}return s}function S(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v<0?(s=h,n=h+1):i=h-1}return s}function E(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v<=0?(s=h,n=h+1):i=h-1}return s}function e(r,o,a,n,i){for(;n<=i;){var s=n+i>>>1,h=r[s],f=a!==void 0?a(h,o):h-o;if(f===0)return s;f<=0?n=s+1:i=s-1}return-1}function t(r,o,a,n,i,s){return typeof a=="function"?s(r,o,a,n===void 0?0:n|0,i===void 0?r.length-1:i|0):s(r,o,void 0,a===void 0?0:a|0,n===void 0?r.length-1:n|0)}V.exports={ge:function(r,o,a,n,i){return t(r,o,a,n,i,d)},gt:function(r,o,a,n,i){return t(r,o,a,n,i,x)},lt:function(r,o,a,n,i){return t(r,o,a,n,i,S)},le:function(r,o,a,n,i){return t(r,o,a,n,i,E)},eq:function(r,o,a,n,i){return t(r,o,a,n,i,e)}}}}),Ev=He({"node_modules/pick-by-alias/index.js"(Z,V){"use strict";V.exports=function(E,e,t){var r={},o,a;if(typeof e=="string"&&(e=x(e)),Array.isArray(e)){var n={};for(a=0;a<e.length;a++)n[e[a]]=!0;e=n}for(o in e)e[o]=x(e[o]);var i={};for(o in e){var s=e[o];if(Array.isArray(s))for(a=0;a<s.length;a++){var h=s[a];if(t&&(i[h]=!0),h in E){if(r[o]=E[h],t)for(var f=a;f<s.length;f++)i[s[f]]=!0;break}}else o in E&&(e[o]&&(r[o]=E[o]),t&&(i[o]=!0))}if(t)for(o in E)i[o]||(r[o]=E[o]);return r};var d={};function x(S){return d[S]?d[S]:(typeof S=="string"&&(S=d[S]=S.split(/\s*,\s*|\s+/)),S)}}}),C1=He({"node_modules/parse-rect/index.js"(Z,V){"use strict";var d=Ev();V.exports=x;function x(S){var E;return arguments.length>1&&(S=arguments),typeof S=="string"?S=S.split(/\s/).map(parseFloat):typeof S=="number"&&(S=[S]),S.length&&typeof S[0]=="number"?S.length===1?E={width:S[0],height:S[0],x:0,y:0}:S.length===2?E={width:S[0],height:S[1],x:0,y:0}:E={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=d(S,{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"}),E={x:S.left||0,y:S.top||0},S.width==null?S.right?E.width=S.right-E.x:E.width=0:E.width=S.width,S.height==null?S.bottom?E.height=S.bottom-E.y:E.height=0:E.height=S.height),E}}}),mg=He({"node_modules/array-bounds/index.js"(Z,V){"use strict";V.exports=d;function d(x,S){if(!x||x.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var E=Array(S*2),e=0;e<S;e++){for(var t=-1/0,r=1/0,o=e,a=x.length;o<a;o+=S)x[o]>t&&(t=x[o]),x[o]<r&&(r=x[o]);E[e]=r,E[S+e]=t}return E}}}),QU=He({"node_modules/defined/index.js"(Z,V){V.exports=function(){for(var d=0;d<arguments.length;d++)if(arguments[d]!==void 0)return arguments[d]}}}),gg=He({"node_modules/flatten-vertex-data/index.js"(Z,V){var d=Q3();V.exports=x;function x(S,E,e){if(!S)throw new TypeError("must specify data as first parameter");if(e=+(e||0)|0,Array.isArray(S)&&S[0]&&typeof S[0][0]=="number"){var t=S[0].length,r=S.length*t,o,a,n,i;(!E||typeof E=="string")&&(E=new(d(E||"float32"))(r+e));var s=E.length-e;if(r!==s)throw new Error("source length "+r+" ("+t+"x"+S.length+") does not match destination length "+s);for(o=0,n=e;o<S.length;o++)for(a=0;a<t;a++)E[n++]=S[o][a]===null?NaN:S[o][a]}else if(!E||typeof E=="string"){var h=d(E||"float32");if(Array.isArray(S)||E==="array")for(E=new h(S.length+e),o=0,n=e,i=E.length;n<i;n++,o++)E[n]=S[o]===null?NaN:S[o];else e===0?E=new h(S):(E=new h(S.length+e),E.set(S,e))}else E.set(S,e);return E}}}),ej=He({"node_modules/is-obj/index.js"(Z,V){"use strict";V.exports=function(d){var x=typeof d;return d!==null&&(x==="object"||x==="function")}}}),tj=He({"node_modules/math-log2/index.js"(Z,V){"use strict";V.exports=Math.log2||function(d){return Math.log(d)*Math.LOG2E}}}),rj=He({"node_modules/@plotly/point-cluster/quad.js"(Z,V){"use strict";var d=$U(),x=mx(),S=C1(),E=mg(),e=Ev(),t=QU(),r=gg(),o=ej(),a=Q3(),n=tj(),i=1073741824;V.exports=function(f,v){v||(v={}),f=r(f,"float64"),v=e(v,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let c=t(v.maxDepth,255),T=t(v.bounds,E(f,2));T[0]===T[2]&&T[2]++,T[1]===T[3]&&T[3]++;let l=s(f,T),_=f.length>>>1,w;v.dtype||(v.dtype="array"),typeof v.dtype=="string"?w=new(a(v.dtype))(_):v.dtype&&(w=v.dtype,Array.isArray(w)&&(w.length=_));for(let L=0;L<_;++L)w[L]=L;let A=[],M=[],g=[],b=[];u(0,0,1,w,0,1);let p=0;for(let L=0;L<A.length;L++){let z=A[L];if(w.set)w.set(z,p);else for(let N=0,O=z.length;N<O;N++)w[N+p]=z[N];let F=p+A[L].length;b[L]=[p,F],p=F}return w.range=y,w;function u(L,z,F,N,O,P){if(!N.length)return null;let U=A[O]||(A[O]=[]),B=g[O]||(g[O]=[]),X=M[O]||(M[O]=[]),$=U.length;if(O++,O>c||P>i){for(let se=0;se<N.length;se++)U.push(N[se]),B.push(P),X.push(null,null,null,null);return $}if(U.push(N[0]),B.push(P),N.length<=1)return X.push(null,null,null,null),$;let le=F*.5,ce=L+le,de=z+le,G=[],Y=[],ee=[],q=[];for(let se=1,ae=N.length;se<ae;se++){let j=N[se],Q=l[j*2],re=l[j*2+1];Q<ce?re<de?G.push(j):Y.push(j):re<de?ee.push(j):q.push(j)}return P<<=2,X.push(u(L,z,le,G,O,P),u(L,de,le,Y,O,P+1),u(ce,z,le,ee,O,P+2),u(ce,de,le,q,O,P+3)),$}function y(...L){let z;if(o(L[L.length-1])){let ee=L.pop();!L.length&&(ee.x!=null||ee.l!=null||ee.left!=null)&&(L=[ee],z={}),z=e(ee,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else z={};L.length||(L=T);let F=S(...L),[N,O,P,U]=[Math.min(F.x,F.x+F.width),Math.min(F.y,F.y+F.height),Math.max(F.x,F.x+F.width),Math.max(F.y,F.y+F.height)],[B,X,$,le]=s([N,O,P,U],T),ce=t(z.level,A.length);if(z.d!=null){let ee;typeof z.d=="number"?ee=[z.d,z.d]:z.d.length&&(ee=z.d),ce=Math.min(Math.max(Math.ceil(-n(Math.abs(ee[0])/(T[2]-T[0]))),Math.ceil(-n(Math.abs(ee[1])/(T[3]-T[1])))),ce)}if(ce=Math.min(ce,A.length),z.lod)return m(B,X,$,le,ce);let de=[];G(0,0,1,0,0,1);function G(ee,q,se,ae,j,Q){if(j===null||Q===null)return;let re=ee+se,pe=q+se;if(B>re||X>pe||$<ee||le<q||ae>=ce||j===Q)return;let we=A[ae];Q===void 0&&(Q=we.length);for(let he=j;he<Q;he++){let ue=we[he],ne=f[ue*2],Ce=f[ue*2+1];ne>=N&&ne<=P&&Ce>=O&&Ce<=U&&de.push(ue)}let Se=M[ae],Ie=Se[j*4+0],Re=Se[j*4+1],We=Se[j*4+2],at=Se[j*4+3],nt=Y(Se,j+1),tt=se*.5,qe=ae+1;G(ee,q,tt,qe,Ie,Re||We||at||nt),G(ee,q+tt,tt,qe,Re,We||at||nt),G(ee+tt,q,tt,qe,We,at||nt),G(ee+tt,q+tt,tt,qe,at,nt)}function Y(ee,q){let se=null,ae=0;for(;se===null;)if(se=ee[q*4+ae],ae++,ae>ee.length)return null;return se}return de}function m(L,z,F,N,O){let P=[];for(let U=0;U<O;U++){let B=g[U],X=b[U][0],$=R(L,z,U),le=R(F,N,U),ce=d.ge(B,$),de=d.gt(B,le,ce,B.length-1);P[U]=[ce+X,de+X]}return P}function R(L,z,F){let N=1,O=.5,P=.5,U=.5;for(let B=0;B<F;B++)N<<=2,N+=L<O?z<P?0:1:z<P?2:3,U*=.5,O+=L<O?-U:U,P+=z<P?-U:U;return N}};function s(h,f){let[v,c,T,l]=f,_=1/(T-v),w=1/(l-c),A=new Array(h.length);for(let M=0,g=h.length/2;M<g;M++)A[2*M]=x((h[2*M]-v)*_,0,1),A[2*M+1]=x((h[2*M+1]-c)*w,0,1);return A}}}),vT=He({"node_modules/@plotly/point-cluster/index.js"(Z,V){"use strict";V.exports=rj()}}),NE=He({"node_modules/abs-svg-path/index.js"(Z,V){V.exports=d;function d(x){var S=0,E=0,e=0,t=0;return x.map(function(r){r=r.slice();var o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=e,r[7]+=t;break;case"v":r[1]+=t;break;case"h":r[1]+=e;break;default:for(var n=1;n<r.length;)r[n++]+=e,r[n++]+=t}switch(a){case"Z":e=S,t=E;break;case"H":e=r[1];break;case"V":t=r[1];break;case"M":e=S=r[1],t=E=r[2];break;default:e=r[r.length-2],t=r[r.length-1]}return r})}}}),aj=He({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(Z,V){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var d=function(){function o(a,n){var i=[],s=!0,h=!1,f=void 0;try{for(var v=a[Symbol.iterator](),c;!(s=(c=v.next()).done)&&(i.push(c.value),!(n&&i.length===n));s=!0);}catch(T){h=!0,f=T}finally{try{!s&&v.return&&v.return()}finally{if(h)throw f}}return i}return function(a,n){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return o(a,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=Math.PI*2,S=function(a,n,i,s,h,f,v){var c=a.x,T=a.y;c*=n,T*=i;var l=s*c-h*T,_=h*c+s*T;return{x:l+f,y:_+v}},E=function(a,n){var i=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),s=Math.cos(a),h=Math.sin(a),f=Math.cos(a+n),v=Math.sin(a+n);return[{x:s-h*i,y:h+s*i},{x:f+v*i,y:v-f*i},{x:f,y:v}]},e=function(a,n,i,s){var h=a*s-n*i<0?-1:1,f=a*i+n*s;return f>1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,n,i,s,h,f,v,c,T,l,_,w){var A=Math.pow(h,2),M=Math.pow(f,2),g=Math.pow(_,2),b=Math.pow(w,2),p=A*M-A*b-M*g;p<0&&(p=0),p/=A*b+M*g,p=Math.sqrt(p)*(v===c?-1:1);var u=p*h/f*w,y=p*-f/h*_,m=l*u-T*y+(a+i)/2,R=T*u+l*y+(n+s)/2,L=(_-u)/h,z=(w-y)/f,F=(-_-u)/h,N=(-w-y)/f,O=e(1,0,L,z),P=e(L,z,F,N);return c===0&&P>0&&(P-=x),c===1&&P<0&&(P+=x),[m,R,O,P]},r=function(a){var n=a.px,i=a.py,s=a.cx,h=a.cy,f=a.rx,v=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,_=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,M=[];if(f===0||v===0)return[];var g=Math.sin(T*x/360),b=Math.cos(T*x/360),p=b*(n-s)/2+g*(i-h)/2,u=-g*(n-s)/2+b*(i-h)/2;if(p===0&&u===0)return[];f=Math.abs(f),v=Math.abs(v);var y=Math.pow(p,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(v,2);y>1&&(f*=Math.sqrt(y),v*=Math.sqrt(y));var m=t(n,i,s,h,f,v,_,A,g,b,p,u),R=d(m,4),L=R[0],z=R[1],F=R[2],N=R[3],O=Math.abs(N)/(x/4);Math.abs(1-O)<1e-7&&(O=1);var P=Math.max(Math.ceil(O),1);N/=P;for(var U=0;U<P;U++)M.push(E(F,N)),F+=N;return M.map(function(B){var X=S(B[0],f,v,b,g,L,z),$=X.x,le=X.y,ce=S(B[1],f,v,b,g,L,z),de=ce.x,G=ce.y,Y=S(B[2],f,v,b,g,L,z),ee=Y.x,q=Y.y;return{x1:$,y1:le,x2:de,y2:G,x:ee,y:q}})};Z.default=r,V.exports=Z.default}}),ij=He({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(Z,V){"use strict";V.exports=x;var d=aj();function x(e){for(var t,r=[],o=0,a=0,n=0,i=0,s=null,h=null,f=0,v=0,c=0,T=e.length;c<T;c++){var l=e[c],_=l[0];switch(_){case"M":n=l[1],i=l[2];break;case"A":var w=d({px:f,py:v,cx:l[6],cy:l[7],rx:l[1],ry:l[2],xAxisRotation:l[3],largeArcFlag:l[4],sweepFlag:l[5]});if(!w.length)continue;for(var A=0,M;A<w.length;A++)M=w[A],l=["C",M.x1,M.y1,M.x2,M.y2,M.x,M.y],A<w.length-1&&r.push(l);break;case"S":var g=f,b=v;(t=="C"||t=="S")&&(g+=g-o,b+=b-a),l=["C",g,b,l[1],l[2],l[3],l[4]];break;case"T":t=="Q"||t=="T"?(s=f*2-s,h=v*2-h):(s=f,h=v),l=E(f,v,s,h,l[1],l[2]);break;case"Q":s=l[1],h=l[2],l=E(f,v,l[1],l[2],l[3],l[4]);break;case"L":l=S(f,v,l[1],l[2]);break;case"H":l=S(f,v,l[1],v);break;case"V":l=S(f,v,f,l[1]);break;case"Z":l=S(f,v,n,i);break}t=_,f=l[l.length-2],v=l[l.length-1],l.length>4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=v),r.push(l)}return r}function S(e,t,r,o){return["C",e,t,r,o,r,o]}function E(e,t,r,o,a,n){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,n/3+2/3*o,a,n]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,V){"use strict";V.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),nj=He({"node_modules/svg-path-bounds/index.js"(Z,V){"use strict";var d=M_(),x=NE(),S=ij(),E=UE(),e=K_();V.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(E(r),"String is not an SVG path."),r=d(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=x(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,n=r.length;a<n;a++)for(var i=r[a].slice(1),s=0;s<i.length;s+=2)i[s+0]<o[0]&&(o[0]=i[s+0]),i[s+1]<o[1]&&(o[1]=i[s+1]),i[s+0]>o[2]&&(o[2]=i[s+0]),i[s+1]>o[3]&&(o[3]=i[s+1]);return o}}}),oj=He({"node_modules/normalize-svg-path/index.js"(Z,V){var d=Math.PI,x=o(120);V.exports=S;function S(a){for(var n,i=[],s=0,h=0,f=0,v=0,c=null,T=null,l=0,_=0,w=0,A=a.length;w<A;w++){var M=a[w],g=M[0];switch(g){case"M":f=M[1],v=M[2];break;case"A":M=t(l,_,M[1],M[2],o(M[3]),M[4],M[5],M[6],M[7]),M.unshift("C"),M.length>7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var b=l,p=_;(n=="C"||n=="S")&&(b+=b-s,p+=p-h),M=["C",b,p,M[1],M[2],M[3],M[4]];break;case"T":n=="Q"||n=="T"?(c=l*2-c,T=_*2-T):(c=l,T=_),M=e(l,_,c,T,M[1],M[2]);break;case"Q":c=M[1],T=M[2],M=e(l,_,M[1],M[2],M[3],M[4]);break;case"L":M=E(l,_,M[1],M[2]);break;case"H":M=E(l,_,M[1],_);break;case"V":M=E(l,_,l,M[1]);break;case"Z":M=E(l,_,f,v);break}n=g,l=M[M.length-2],_=M[M.length-1],M.length>4?(s=M[M.length-4],h=M[M.length-3]):(s=l,h=_),i.push(M)}return i}function E(a,n,i,s){return["C",a,n,i,s,i,s]}function e(a,n,i,s,h,f){return["C",a/3+2/3*i,n/3+2/3*s,h/3+2/3*i,f/3+2/3*s,h,f]}function t(a,n,i,s,h,f,v,c,T,l){if(l)m=l[0],R=l[1],u=l[2],y=l[3];else{var _=r(a,n,-h);a=_.x,n=_.y,_=r(c,T,-h),c=_.x,T=_.y;var w=(a-c)/2,A=(n-T)/2,M=w*w/(i*i)+A*A/(s*s);M>1&&(M=Math.sqrt(M),i=M*i,s=M*s);var g=i*i,b=s*s,p=(f==v?-1:1)*Math.sqrt(Math.abs((g*b-g*A*A-b*w*w)/(g*A*A+b*w*w)));p==1/0&&(p=1);var u=p*i*A/s+(a+c)/2,y=p*-s*w/i+(n+T)/2,m=Math.asin(((n-y)/s).toFixed(9)),R=Math.asin(((T-y)/s).toFixed(9));m=a<u?d-m:m,R=c<u?d-R:R,m<0&&(m=d*2+m),R<0&&(R=d*2+R),v&&m>R&&(m=m-d*2),!v&&R>m&&(R=R-d*2)}if(Math.abs(R-m)>x){var L=R,z=c,F=T;R=m+x*(v&&R>m?1:-1),c=u+i*Math.cos(R),T=y+s*Math.sin(R);var N=t(c,T,i,s,h,0,v,z,F,[R,L,u,y])}var O=Math.tan((R-m)/4),P=4/3*i*O,U=4/3*s*O,B=[2*a-(a+P*Math.sin(m)),2*n-(n-U*Math.cos(m)),c+P*Math.sin(R),T-U*Math.cos(R),c,T];if(l)return B;N&&(B=B.concat(N));for(var X=0;X<B.length;){var $=r(B[X],B[X+1],h);B[X++]=$.x,B[X++]=$.y}return B}function r(a,n,i){return{x:a*Math.cos(i)-n*Math.sin(i),y:a*Math.sin(i)+n*Math.cos(i)}}function o(a){return a*(d/180)}}}),sj=He({"node_modules/draw-svg-path/index.js"(Z,V){var d=NE(),x=oj(),S={M:"moveTo",C:"bezierCurveTo"};V.exports=function(E,e){E.beginPath(),x(d(e)).forEach(function(t){var r=t[0],o=t.slice(1);E[S[r]].apply(E,o)}),E.closePath()}}}),lj=He({"node_modules/bitmap-sdf/index.js"(Z,V){"use strict";var d=mx();V.exports=S;var x=1e20;function S(t,r){r||(r={});var o=r.cutoff==null?.25:r.cutoff,a=r.radius==null?8:r.radius,n=r.channel||0,i,s,h,f,v,c,T,l,_,w,A;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,s=r.height,f=t,r.stride?c=r.stride:c=Math.floor(t.length/i/s)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(l=t,T=l.getContext("2d"),i=l.width,s=l.height,_=T.getImageData(0,0,i,s),f=_.data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(l=t.canvas,T=t,i=l.width,s=l.height,_=T.getImageData(0,0,i,s),f=_.data,c=4):window.ImageData&&t instanceof window.ImageData&&(_=t,i=t.width,s=t.height,f=_.data,c=4);if(h=Math.max(i,s),window.Uint8ClampedArray&&f instanceof window.Uint8ClampedArray||window.Uint8Array&&f instanceof window.Uint8Array)for(v=f,f=Array(i*s),w=0,A=v.length;w<A;w++)f[w]=v[w*c+n]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var M=Array(i*s),g=Array(i*s),b=Array(h),p=Array(h),u=Array(h+1),y=Array(h);for(w=0,A=i*s;w<A;w++){var m=f[w];M[w]=m===1?0:m===0?x:Math.pow(Math.max(0,.5-m),2),g[w]=m===1?x:m===0?0:Math.pow(Math.max(0,m-.5),2)}E(M,i,s,b,p,y,u),E(g,i,s,b,p,y,u);var R=window.Float32Array?new Float32Array(i*s):new Array(i*s);for(w=0,A=i*s;w<A;w++)R[w]=d(1-((M[w]-g[w])/a+o),0,1);return R}function E(t,r,o,a,n,i,s){for(var h=0;h<r;h++){for(var f=0;f<o;f++)a[f]=t[f*r+h];for(e(a,n,i,s,o),f=0;f<o;f++)t[f*r+h]=n[f]}for(f=0;f<o;f++){for(h=0;h<r;h++)a[h]=t[f*r+h];for(e(a,n,i,s,r),h=0;h<r;h++)t[f*r+h]=Math.sqrt(n[h])}}function e(t,r,o,a,n){o[0]=0,a[0]=-x,a[1]=+x;for(var i=1,s=0;i<n;i++){for(var h=(t[i]+i*i-(t[o[s]]+o[s]*o[s]))/(2*i-2*o[s]);h<=a[s];)s--,h=(t[i]+i*i-(t[o[s]]+o[s]*o[s]))/(2*i-2*o[s]);s++,o[s]=i,a[s]=h,a[s+1]=+x}for(i=0,s=0;i<n;i++){for(;a[s+1]<i;)s++;r[i]=(i-o[s])*(i-o[s])+t[o[s]]}}}}),uj=He({"node_modules/svg-path-sdf/index.js"(Z,V){"use strict";var d=nj(),x=M_(),S=sj(),E=UE(),e=lj(),t=document.createElement("canvas"),r=t.getContext("2d");V.exports=o;function o(i,s){if(!E(i))throw Error("Argument should be valid svg path string");s||(s={});var h,f;s.shape?(h=s.shape[0],f=s.shape[1]):(h=t.width=s.w||s.width||200,f=t.height=s.h||s.height||200);var v=Math.min(h,f),c=s.stroke||0,T=s.viewbox||s.viewBox||d(i),l=[h/(T[2]-T[0]),f/(T[3]-T[1])],_=Math.min(l[0]||0,l[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,h,f),r.fillStyle="white",c&&(typeof c!="number"&&(c=1),c>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(_,_),n()){var w=new Path2D(i);r.fill(w),c&&r.stroke(w)}else{var A=x(i);S(r,A),r.fill(),c&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:v*.5});return M}var a;function n(){if(a!=null)return a;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var h=i.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,V){"use strict";var d=as(),x=uj(),S=d0(),E=lo(),e=sa(),t=e.isArrayOrTypedArray,r=es(),o=ef(),a=tm().formatColor,n=Fu(),i=r1(),s=dT(),h=y0(),f=Ym().DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var P,U={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},B=N._context.plotGlPixelRatio;if(O.visible!==!0)return U;if(n.hasText(O)&&(U.text=l(N,O),U.textSel=M(N,O,O.selected),U.textUnsel=M(N,O,O.unselected)),n.hasMarkers(O)&&(U.marker=w(N,O),U.markerSel=A(N,O,O.selected),U.markerUnsel=A(N,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var X=O.marker.opacity;for(U.markerUnsel.opacity=new Array(X.length),P=0;P<X.length;P++)U.markerUnsel.opacity[P]=f*X[P]}if(n.hasLines(O)){U.line={overlay:!0,thickness:O.line.width*B,color:O.line.color,opacity:O.opacity};var $=(h.DASHES[O.line.dash]||[1]).slice();for(P=0;P<$.length;++P)$[P]*=O.line.width*B;U.line.dashes=$}return O.error_x&&O.error_x.visible&&(U.errorX=g(O,O.error_x,B)),O.error_y&&O.error_y.visible&&(U.errorY=g(O,O.error_y,B)),O.fill&&O.fill!=="none"&&(U.fill={closed:!0,fill:O.fillcolor,thickness:0}),U}function l(N,O){var P=N._fullLayout,U=O._length,B=O.textfont,X=O.textposition,$=t(X)?X:[X],le=B.color,ce=B.size,de=B.family,G=B.weight,Y=B.style,ee=B.variant,q={},se,ae=N._context.plotGlPixelRatio,j=O.texttemplate;if(j){q.text=[];var Q=P._d3locale,re=Array.isArray(j),pe=re?Math.min(j.length,U):U,we=re?function(nt){return j[nt]}:function(){return j};for(se=0;se<pe;se++){var Se={i:se},Ie=O._module.formatLabels(Se,O,P),Re={};c(Re,O,se),q.text.push(e.texttemplateString({data:[Re,Se,O._meta],fallback:O.texttemplatefallback,labels:Ie,locale:Q,template:we(se)}))}}else t(O.text)&&O.text.length<U?q.text=O.text.slice():q.text=O.text;if(t(q.text))for(se=q.text.length;se<U;se++)q.text[se]="";for(q.opacity=O.opacity,q.font={},q.align=[],q.baseline=[],se=0;se<$.length;se++){var We=$[se].split(/\s+/);switch(We[1]){case"left":q.align.push("right");break;case"right":q.align.push("left");break;default:q.align.push(We[1])}switch(We[0]){case"top":q.baseline.push("bottom");break;case"bottom":q.baseline.push("top");break;default:q.baseline.push(We[0])}}if(t(le))for(q.color=new Array(U),se=0;se<U;se++)q.color[se]=le[se];else q.color=le;if(t(ce)||Array.isArray(de)||t(G)||Array.isArray(Y)||Array.isArray(ee))for(q.font=new Array(U),se=0;se<U;se++){var at=q.font[se]={};at.size=(e.isTypedArray(ce)?ce[se]:t(ce)?d(ce[se])?ce[se]:0:ce)*ae,at.family=Array.isArray(de)?de[se]:de,at.weight=_(t(G)?G[se]:G),at.style=Array.isArray(Y)?Y[se]:Y,at.variant=Array.isArray(ee)?ee[se]:ee}else q.font={size:ce*ae,family:de,weight:_(G),style:Y,variant:ee};return q}function _(N){return N<=1e3?N>500?"bold":"normal":N}function w(N,O){var P=O._length,U=O.marker,B={},X,$=t(U.symbol),le=t(U.angle),ce=t(U.color),de=t(U.line.color),G=t(U.opacity),Y=t(U.size),ee=t(U.line.width),q;if($||(q=s.isOpenSymbol(U.symbol)),$||ce||de||G||le){B.symbols=new Array(P),B.angles=new Array(P),B.colors=new Array(P),B.borderColors=new Array(P);var se=U.symbol,ae=U.angle,j=a(U,U.opacity,P),Q=a(U.line,U.opacity,P);if(!t(Q[0])){var re=Q;for(Q=Array(P),X=0;X<P;X++)Q[X]=re}if(!t(j[0])){var pe=j;for(j=Array(P),X=0;X<P;X++)j[X]=pe}if(!t(se)){var we=se;for(se=Array(P),X=0;X<P;X++)se[X]=we}if(!t(ae)){var Se=ae;for(ae=Array(P),X=0;X<P;X++)ae[X]=Se}for(B.symbols=se,B.angles=ae,B.colors=j,B.borderColors=Q,X=0;X<P;X++)$&&(q=s.isOpenSymbol(U.symbol[X])),q&&(Q[X]=j[X].slice(),j[X]=j[X].slice(),j[X][3]=0);for(B.opacity=O.opacity,B.markers=new Array(P),X=0;X<P;X++)B.markers[X]=R({mx:B.symbols[X],ma:B.angles[X]},O)}else q?(B.color=S(U.color,"uint8"),B.color[3]=0,B.borderColor=S(U.color,"uint8")):(B.color=S(U.color,"uint8"),B.borderColor=S(U.line.color,"uint8")),B.opacity=O.opacity*U.opacity,B.marker=R({mx:U.symbol,ma:U.angle},O);var Ie=1,Re=i(O,Ie),We;if(Y||ee){var at=B.sizes=new Array(P),nt=B.borderSizes=new Array(P),tt=0,qe;if(Y){for(X=0;X<P;X++)at[X]=Re(U.size[X]),tt+=at[X];qe=tt/P}else for(We=Re(U.size),X=0;X<P;X++)at[X]=We;if(ee)for(X=0;X<P;X++)nt[X]=U.line.width[X];else for(We=U.line.width,X=0;X<P;X++)nt[X]=We;B.sizeAvg=qe}else B.size=Re(U&&U.size||10),B.borderSizes=Re(U.line.width);return B}function A(N,O,P){var U=O.marker,B={};return P&&(P.marker&&P.marker.symbol?B=w(N,e.extendFlat({},U,P.marker)):P.marker&&(P.marker.size&&(B.size=P.marker.size),P.marker.color&&(B.colors=P.marker.color),P.marker.opacity!==void 0&&(B.opacity=P.marker.opacity))),B}function M(N,O,P){var U={};if(!P)return U;if(P.textfont){var B={opacity:1,text:O.text,texttemplate:O.texttemplate,textposition:O.textposition,textfont:e.extendFlat({},O.textfont)};P.textfont&&e.extendFlat(B.textfont,P.textfont),U=l(N,B)}return U}function g(N,O,P){var U={capSize:O.width*2*P,lineWidth:O.thickness*P,color:O.color};return O.copy_ystyle&&(U=N.error_y),U}var b=h.SYMBOL_SDF_SIZE,p=h.SYMBOL_SIZE,u=h.SYMBOL_STROKE,y={},m=r.symbolFuncs[0](p*.05);function R(N,O){var P=N.mx;if(P==="circle")return null;var U,B,X=r.symbolNumber(P),$=r.symbolFuncs[X%100],le=!!r.symbolNoDot[X%100],ce=!!r.symbolNoFill[X%100],de=s.isDotSymbol(P);if(N.ma&&(P+="_"+N.ma),y[P])return y[P];var G=r.getMarkerAngle(N,O);return de&&!le?U=$(p*1.1,G)+m:U=$(p,G),B=x(U,{w:b,h:b,viewBox:[-p,-p,p,p],stroke:ce?u:-u}),y[P]=B,B||null}function L(N,O,P){var U=P.length,B=U/2,X,$;if(n.hasLines(O)&&B)if(O.line.shape==="hv"){for(X=[],$=0;$<B-1;$++)isNaN(P[$*2])||isNaN(P[$*2+1])?X.push(NaN,NaN,NaN,NaN):(X.push(P[$*2],P[$*2+1]),!isNaN(P[$*2+2])&&!isNaN(P[$*2+3])?X.push(P[$*2+2],P[$*2+1]):X.push(NaN,NaN));X.push(P[U-2],P[U-1])}else if(O.line.shape==="hvh"){for(X=[],$=0;$<B-1;$++)if(isNaN(P[$*2])||isNaN(P[$*2+1])||isNaN(P[$*2+2])||isNaN(P[$*2+3]))!isNaN(P[$*2])&&!isNaN(P[$*2+1])?X.push(P[$*2],P[$*2+1]):X.push(NaN,NaN),X.push(NaN,NaN);else{var le=(P[$*2]+P[$*2+2])/2;X.push(P[$*2],P[$*2+1],le,P[$*2+1],le,P[$*2+3])}X.push(P[U-2],P[U-1])}else if(O.line.shape==="vhv"){for(X=[],$=0;$<B-1;$++)if(isNaN(P[$*2])||isNaN(P[$*2+1])||isNaN(P[$*2+2])||isNaN(P[$*2+3]))!isNaN(P[$*2])&&!isNaN(P[$*2+1])?X.push(P[$*2],P[$*2+1]):X.push(NaN,NaN),X.push(NaN,NaN);else{var ce=(P[$*2+1]+P[$*2+3])/2;X.push(P[$*2],P[$*2+1],P[$*2],ce,P[$*2+2],ce)}X.push(P[U-2],P[U-1])}else if(O.line.shape==="vh"){for(X=[],$=0;$<B-1;$++)isNaN(P[$*2])||isNaN(P[$*2+1])?X.push(NaN,NaN,NaN,NaN):(X.push(P[$*2],P[$*2+1]),!isNaN(P[$*2+2])&&!isNaN(P[$*2+3])?X.push(P[$*2],P[$*2+3]):X.push(NaN,NaN));X.push(P[U-2],P[U-1])}else X=P;var de=!1;for($=0;$<X.length;$++)if(isNaN(X[$])){de=!0;break}var G=de||X.length>h.TOO_MANY_POINTS||n.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var Y=X[0],ee=X[1];for($=0;$<X.length;$+=2)isNaN(X[$])||isNaN(X[$+1])?(X[$]=Y,X[$+1]=ee):(Y=X[$],ee=X[$+1])}return{join:G,positions:X}}function z(N,O,P,U,B){var X=E.getComponentMethod("errorbars","makeComputeError"),$=o.getFromId(N,O.xaxis,"x"),le=o.getFromId(N,O.yaxis,"y"),ce=P.length/2,de={};function G(Y,ee){var q=ee._id.charAt(0),se=O["error_"+q];if(se&&se.visible&&(ee.type==="linear"||ee.type==="log")){for(var ae=X(se),j={x:0,y:1}[q],Q={x:[0,1,2,3],y:[2,3,0,1]}[q],re=new Float64Array(4*ce),pe=1/0,we=-1/0,Se=0,Ie=0;Se<ce;Se++,Ie+=4){var Re=Y[Se];if(d(Re)){var We=P[Se*2+j],at=ae(Re,Se),nt=at[0],tt=at[1];if(d(nt)&&d(tt)){var qe=Re-nt,he=Re+tt;re[Ie+Q[0]]=We-ee.c2l(qe),re[Ie+Q[1]]=ee.c2l(he)-We,re[Ie+Q[2]]=0,re[Ie+Q[3]]=0,pe=Math.min(pe,Re-nt),we=Math.max(we,Re+tt)}}}de[q]={positions:P,errors:re,_bnds:[pe,we]}}}return G(U,$),G(B,le),de}function F(N,O,P,U){var B=O._length,X={},$;if(n.hasMarkers(O)){var le=P.font,ce=P.align,de=P.baseline;for(X.offset=new Array(B),$=0;$<B;$++){var G=U.sizes?U.sizes[$]:U.size,Y=t(le)?le[$].size:le.size,ee=t(ce)?ce.length>1?ce[$]:ce[0]:ce,q=t(de)?de.length>1?de[$]:de[0]:de,se=v[ee],ae=v[q],j=G?G/.8+1:0,Q=-ae*j-ae*.5;X.offset[$]=[se*j/Y,Q/Y]}}return X}V.exports={style:T,markerStyle:w,markerSelection:A,linePositions:L,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=E._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},r={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return E._scene||(e=E._scene={},e.init=function(){d.extendFlat(e,r,t)},e.init(),e.update=function(a){var n=d.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(n),e.scatter2d&&e.scatter2d.update(n),e.line2d&&e.line2d.update(n),e.error2d&&e.error2d.update(n.concat(n)),e.select2d&&e.select2d.update(n),e.glText)for(var i=0;i<e.count;i++)e.glText[i].update(a)},e.draw=function(){for(var a=e.count,n=e.fill2d,i=e.error2d,s=e.line2d,h=e.scatter2d,f=e.glText,v=e.select2d,c=e.selectBatch,T=e.unselectBatch,l=0;l<a;l++){if(n&&e.fillOrder[l]&&n.draw(e.fillOrder[l]),s&&e.lineOptions[l]&&s.draw(l),i&&(e.errorXOptions[l]&&i.draw(l),e.errorYOptions[l]&&i.draw(l+a)),h&&e.markerOptions[l])if(T[l].length){var _=d.repeat([],e.count);_[l]=T[l],h.draw(_)}else c[l].length||h.draw(l);f[l]&&e.textOptions[l]&&f[l].render()}v&&v.draw(c),e.dirty=!1},e.destroy=function(){e.fill2d&&e.fill2d.destroy&&e.fill2d.destroy(),e.scatter2d&&e.scatter2d.destroy&&e.scatter2d.destroy(),e.error2d&&e.error2d.destroy&&e.error2d.destroy(),e.line2d&&e.line2d.destroy&&e.line2d.destroy(),e.select2d&&e.select2d.destroy&&e.select2d.destroy(),e.glText&&e.glText.forEach(function(a){a.destroy&&a.destroy()}),e.lineOptions=null,e.fillOptions=null,e.markerOptions=null,e.markerSelectedOptions=null,e.markerUnselectedOptions=null,e.errorXOptions=null,e.errorYOptions=null,e.textOptions=null,e.textSelectedOptions=null,e.textUnselectedOptions=null,e.selectBatch=null,e.unselectBatch=null,E._scene=null}),e.dirty||d.extendFlat(e,t),e}}}),cj=He({"src/traces/scattergl/calc.js"(Z,V){"use strict";var d=vT(),x=sa(),S=ef(),E=Yd().findExtremes,e=tv(),t=Bd(),r=t.calcMarkerSize,o=t.calcAxisExpansion,a=t.setFirstScatter,n=Fd(),i=yg(),s=jE(),h=Ws().BADNUM,f=y0().TOO_MANY_POINTS;V.exports=function(l,_){var w=l._fullLayout,A=_._xA=S.getFromId(l,_.xaxis,"x"),M=_._yA=S.getFromId(l,_.yaxis,"y"),g=w._plots[_.xaxis+_.yaxis],b=_._length,p=b>=f,u=b*2,y={},m,R=A.makeCalcdata(_,"x"),L=M.makeCalcdata(_,"y"),z=e(_,A,"x",R),F=e(_,M,"y",L),N=z.vals,O=F.vals;_._x=N,_._y=O,_.xperiodalignment&&(_._origX=R,_._xStarts=z.starts,_._xEnds=z.ends),_.yperiodalignment&&(_._origY=L,_._yStarts=F.starts,_._yEnds=F.ends);var P=new Array(u),U=new Array(b);for(m=0;m<b;m++)P[m*2]=N[m]===h?NaN:N[m],P[m*2+1]=O[m]===h?NaN:O[m],U[m]=m;if(A.type==="log")for(m=0;m<u;m+=2)P[m]=A.c2l(P[m]);if(M.type==="log")for(m=1;m<u;m+=2)P[m]=M.c2l(P[m]);p&&A.type!=="log"&&M.type!=="log"?y.tree=d(P):y.ids=U,n(l,_);var B=c(l,g,_,P,N,O),X=s(l,g);a(w,_);var $;return p?B.marker&&($=B.marker.sizeAvg||Math.max(B.marker.size,3)):$=r(_,b),o(l,_,A,M,N,O,$),B.errorX&&v(_,A,B.errorX),B.errorY&&v(_,M,B.errorY),B.fill&&!X.fill2d&&(X.fill2d=!0),B.marker&&!X.scatter2d&&(X.scatter2d=!0),B.line&&!X.line2d&&(X.line2d=!0),(B.errorX||B.errorY)&&!X.error2d&&(X.error2d=!0),B.text&&!X.glText&&(X.glText=!0),B.marker&&(B.marker.snap=b),X.lineOptions.push(B.line),X.errorXOptions.push(B.errorX),X.errorYOptions.push(B.errorY),X.fillOptions.push(B.fill),X.markerOptions.push(B.marker),X.markerSelectedOptions.push(B.markerSel),X.markerUnselectedOptions.push(B.markerUnsel),X.textOptions.push(B.text),X.textSelectedOptions.push(B.textSel),X.textUnselectedOptions.push(B.textUnsel),X.selectBatch.push([]),X.unselectBatch.push([]),y._scene=X,y.index=X.count,y.x=N,y.y=O,y.positions=P,X.count++,[{x:!1,y:!1,t:y,trace:_}]};function v(T,l,_){var w=T._extremes[l._id],A=E(l,_._bnds,{padded:!0});w.min=w.min.concat(A.min),w.max=w.max.concat(A.max)}function c(T,l,_,w,A,M){var g=i.style(T,_);if(g.marker&&(g.marker.positions=w),g.line&&w.length>1&&x.extendFlat(g.line,i.linePositions(T,_,w)),g.errorX||g.errorY){var b=i.errorBarPositions(T,_,w,A,M);g.errorX&&x.extendFlat(g.errorX,b.x),g.errorY&&x.extendFlat(g.errorY,b.y)}return g.text&&(x.extendFlat(g.text,{positions:w},i.textPosition(T,_,g.text,g.marker)),x.extendFlat(g.textSel,{positions:w},i.textPosition(T,_,g.text,g.markerSel)),x.extendFlat(g.textUnsel,{positions:w},i.textPosition(T,_,g.text,g.markerUnsel))),g}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=Ym().DESELECTDIM;function E(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,n=o.index,i=a.selectBatch[n],s=a.unselectBatch[n],h=a.textOptions[n],f=a.textSelectedOptions[n]||{},v=a.textUnselectedOptions[n]||{},c=d.extendFlat({},h),T,l;if(i.length||s.length){var _=f.color,w=v.color,A=h.color,M=d.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T<i.length;T++)l=i[T],c.color[l]=_||(M?A[l]:A);for(T=0;T<s.length;T++){l=s[T];var g=M?A[l]:A;c.color[l]=w||(_?g:x.addOpacity(g,S))}}a.glText[n].update(c)}V.exports={styleTextSelection:E}}}),VE=He({"src/traces/scattergl/select.js"(Z,V){"use strict";var d=Fu(),x=qE().styleTextSelection;V.exports=function(E,e){var t=E.cd,r=E.xaxis,o=E.yaxis,a=[],n=t[0].trace,i=t[0].t,s=n._length,h=i.x,f=i.y,v=i._scene,c=i.index;if(!v)return a;var T=d.hasText(n),l=d.hasMarkers(n),_=!l&&!T;if(n.visible!==!0||_)return a;var w=[],A=[];if(e!==!1&&!e.degenerate)for(var M=0;M<s;M++)e.contains([i.xpx[M],i.ypx[M]],!1,M,E)?(w.push(M),a.push({pointNumber:M,x:r.c2d(h[M]),y:o.c2d(f[M])})):A.push(M);if(l){var g=v.scatter2d;if(!w.length&&!A.length){var b=new Array(v.count);b[c]=v.markerOptions[c],g.update.apply(g,b)}else if(!v.selectBatch[c].length&&!v.unselectBatch[c].length){var p=new Array(v.count);p[c]=v.markerUnselectedOptions[c],g.update.apply(g,p)}}return v.selectBatch[c]=w,v.unselectBatch[c]=A,T&&x(t),a}}}),fj=He({"src/traces/scattergl/base_index.js"(Z,V){"use strict";var d=pT();V.exports={moduleType:"trace",name:"scattergl",basePlotModule:Kf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:xx(),supplyDefaults:KU(),crossTraceDefaults:z5(),colorbar:pp(),formatLabels:JU(),calc:cj(),hoverPoints:d.hoverPoints,selectPoints:VE(),meta:{}}}}),hj=He({"node_modules/color-id/index.js"(Z,V){"use strict";var d=mx();V.exports=x,V.exports.to=x,V.exports.from=S;function x(E,e){e==null&&(e=!0);var t=E[0],r=E[1],o=E[2],a=E[3];a==null&&(a=e?1:255),e&&(t*=255,r*=255,o*=255,a*=255),t=d(t,0,255)&255,r=d(r,0,255)&255,o=d(o,0,255)&255,a=d(a,0,255)&255;var n=t*16777216+(r<<16)+(o<<8)+a;return n}function S(E,e){E=+E;var t=E>>>24,r=(E&16711680)>>>16,o=(E&65280)>>>8,a=E&255;return e===!1?[t,r,o,a]:[t/255,r/255,o/255,a/255]}}}),ch=He({"node_modules/object-assign/index.js"(Z,V){"use strict";var d=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function E(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function e(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=e()?Object.assign:function(t,r){for(var o,a=E(t),n,i=1;i<arguments.length;i++){o=Object(arguments[i]);for(var s in o)x.call(o,s)&&(a[s]=o[s]);if(d){n=d(o);for(var h=0;h<n.length;h++)S.call(o,n[h])&&(a[n[h]]=o[n[h]])}}return a}}}),pj=He({"node_modules/glslify/browser.js"(Z,V){V.exports=function(d){typeof d=="string"&&(d=[d]);for(var x=[].slice.call(arguments,1),S=[],E=0;E<d.length-1;E++)S.push(d[E],x[E]||"");return S.push(d[E]),S.join("")}}}),GE=He({"node_modules/update-diff/index.js"(Z,V){"use strict";V.exports=function(x,S,E){Array.isArray(E)||(E=[].slice.call(arguments,2));for(var e=0,t=E.length;e<t;e++){var r=E[e];for(var o in r)if(!(S[o]!==void 0&&!Array.isArray(S[o])&&x[o]===S[o])&&o in S){var a;if(r[o]===!0)a=S[o];else{if(r[o]===!1)continue;if(typeof r[o]=="function"&&(a=r[o](S[o],x,S),a===void 0))continue}x[o]=a}}return x}}}),dj=He({"node_modules/is-iexplorer/index.js"(Z,V){"use strict";V.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),mT=He({"node_modules/to-float32/index.js"(Z,V){"use strict";V.exports=S,V.exports.float32=V.exports.float=S,V.exports.fract32=V.exports.fract=x;var d=new Float32Array(1);function x(E,e){if(E.length){if(E instanceof Float32Array)return new Float32Array(E.length);e instanceof Float32Array||(e=S(E));for(var t=0,r=e.length;t<r;t++)e[t]=E[t]-e[t];return e}return S(E-S(E))}function S(E){return E.length?E instanceof Float32Array?E:new Float32Array(E):(d[0]=E,d[0])}}}),HE=He({"node_modules/regl-scatter2d/bundle.js"(Z,V){"use strict";function d(y,m){var R=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(R!=null){var L,z,F,N,O=[],P=!0,U=!1;try{if(F=(R=R.call(y)).next,m===0){if(Object(R)!==R)return;P=!1}else for(;!(P=(L=F.call(R)).done)&&(O.push(L.value),O.length!==m);P=!0);}catch(B){U=!0,z=B}finally{try{if(!P&&R.return!=null&&(N=R.return(),Object(N)!==N))return}finally{if(U)throw z}}return O}}function x(y,m){return e(y)||d(y,m)||r(y,m)||n()}function S(y){return E(y)||t(y)||r(y)||a()}function E(y){if(Array.isArray(y))return o(y)}function e(y){if(Array.isArray(y))return y}function t(y){if(typeof Symbol<"u"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function r(y,m){if(y){if(typeof y=="string")return o(y,m);var R=Object.prototype.toString.call(y).slice(8,-1);if(R==="Object"&&y.constructor&&(R=y.constructor.name),R==="Map"||R==="Set")return Array.from(y);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return o(y,m)}}function o(y,m){(m==null||m>y.length)&&(m=y.length);for(var R=0,L=new Array(m);R<m;R++)L[R]=y[R];return L}function a(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=d0(),s=mg(),h=hj(),f=vT(),v=ch(),c=pj(),T=Ev(),l=GE(),_=gg(),w=dj(),A=mT(),M=C1(),g=b;function b(y,m){var R=this;if(!(this instanceof b))return new b(y,m);typeof y=="function"?(m||(m={}),m.regl=y):(m=y,y=null),m&&m.length&&(m.positions=m),y=m.regl;var L=y._gl,z,F=[],N={},O=[],P=[null],U=[null],B=255,X=100;this.tooManyColors=w,z=y.texture({data:new Uint8Array(B*4),width:B,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),v(this,{regl:y,gl:L,groups:O,markerCache:U,markerTextures:P,palette:F,paletteIds:N,paletteTexture:z,maxColors:B,maxSize:X,canvas:L.canvas}),this.update(m);var $={uniforms:{constPointSize:!!m.constPointSize,opacity:y.prop("opacity"),paletteSize:function(G,Y){return[R.tooManyColors?0:B,z.height]},pixelRatio:y.context("pixelRatio"),scale:y.prop("scale"),scaleFract:y.prop("scaleFract"),translate:y.prop("translate"),translateFract:y.prop("translateFract"),markerTexture:y.prop("markerTexture"),paletteTexture:z},attributes:{x:function(G,Y){return Y.xAttr||{buffer:Y.positionBuffer,stride:8,offset:0}},y:function(G,Y){return Y.yAttr||{buffer:Y.positionBuffer,stride:8,offset:4}},xFract:function(G,Y){return Y.xAttr?{constant:[0,0]}:{buffer:Y.positionFractBuffer,stride:8,offset:0}},yFract:function(G,Y){return Y.yAttr?{constant:[0,0]}:{buffer:Y.positionFractBuffer,stride:8,offset:4}},size:function(G,Y){return Y.size.length?{buffer:Y.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(Y.size*255/R.maxSize)]}},borderSize:function(G,Y){return Y.borderSize.length?{buffer:Y.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(Y.borderSize*255/R.maxSize)]}},colorId:function(G,Y){return Y.color.length?{buffer:Y.colorBuffer,stride:R.tooManyColors?8:4,offset:0}:{constant:R.tooManyColors?F.slice(Y.color*4,Y.color*4+4):[Y.color]}},borderColorId:function(G,Y){return Y.borderColor.length?{buffer:Y.colorBuffer,stride:R.tooManyColors?8:4,offset:R.tooManyColors?4:2}:{constant:R.tooManyColors?F.slice(Y.borderColor*4,Y.borderColor*4+4):[Y.borderColor]}},isActive:function(G,Y){return Y.activation===!0?{constant:[1]}:Y.activation?Y.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:y.prop("viewport")},viewport:y.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:y.prop("elements"),count:y.prop("count"),offset:y.prop("offset"),primitive:"points"},le=v({},$);le.frag=c([`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;
}
}
`]),le.vert=c([`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=y(le);var ce=v({},$);ce.frag=c([`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;
}
`]),ce.vert=c([`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;
}
`]),w&&(ce.frag=ce.frag.replace("smoothstep","smoothStep"),le.frag=le.frag.replace("smoothstep","smoothStep")),this.drawCircle=y(ce)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var y=this,m=arguments.length,R=new Array(m),L=0;L<m;L++)R[L]=arguments[L];var z=this.groups;if(R.length===1&&Array.isArray(R[0])&&(R[0][0]===null||Array.isArray(R[0][0]))&&(R=R[0]),this.regl._refresh(),R.length)for(var F=0;F<R.length;F++)this.drawItem(F,R[F]);else z.forEach(function(N,O){y.drawItem(O)});return this},b.prototype.drawItem=function(y,m){var R=this.groups,L=R[y];if(typeof m=="number"&&(y=m,L=R[m],m=null),!!(L&&L.count&&L.opacity)){L.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,L,m));for(var z=[],F=1;F<L.activation.length;F++)!L.activation[F]||L.activation[F]!==!0&&!L.activation[F].data.length||z.push.apply(z,S(this.getMarkerDrawOptions(F,L,m)));z.length&&this.drawMarker(z)}},b.prototype.getMarkerDrawOptions=function(y,m,R){var L=m.range,z=m.tree,F=m.viewport,N=m.activation,O=m.selectionBuffer,P=m.count,U=this.regl;if(!z)return R?[v({},m,{markerTexture:this.markerTextures[y],activation:N[y],count:R.length,elements:R,offset:0})]:[v({},m,{markerTexture:this.markerTextures[y],activation:N[y],offset:0})];var B=[],X=z.range(L,{lod:!0,px:[(L[2]-L[0])/F.width,(L[3]-L[1])/F.height]});if(R){for(var $=N[y],le=$.data,ce=new Uint8Array(P),de=0;de<R.length;de++){var G=R[de];ce[G]=le?le[G]:1}O.subdata(ce)}for(var Y=X.length;Y--;){var ee=x(X[Y],2),q=ee[0],se=ee[1];B.push(v({},m,{markerTexture:this.markerTextures[y],activation:R?O:N[y],offset:q,count:se-q}))}return B},b.prototype.update=function(){for(var y=this,m=arguments.length,R=new Array(m),L=0;L<m;L++)R[L]=arguments[L];if(R.length){R.length===1&&Array.isArray(R[0])&&(R=R[0]);var z=this.groups,F=this.gl,N=this.regl,O=this.maxSize,P=this.maxColors,U=this.palette;this.groups=z=R.map(function(B,X){var $=z[X];if(B===void 0)return $;B===null?B={positions:null}:typeof B=="function"?B={ondraw:B}:typeof B[0]=="number"&&(B={positions:B}),B=T(B,{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"}),B.positions===null&&(B.positions=[]),B.tooManyColors!=null&&(y.tooManyColors=B.tooManyColors),$||(z[X]=$={id:X,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:N.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:N.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:N.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:N.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:N.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},B=v({},b.defaults,B)),B.positions&&!("marker"in B)&&(B.marker=$.marker,delete $.marker),B.marker&&!("positions"in B)&&(B.positions=$.positions,delete $.positions);var le=0,ce=0;if(l($,B,[{snap:!0,size:function(tt,qe){return tt==null&&(tt=b.defaults.size),le+=tt&&tt.length?1:0,tt},borderSize:function(tt,qe){return tt==null&&(tt=b.defaults.borderSize),le+=tt&&tt.length?1:0,tt},opacity:parseFloat,color:function(tt,qe){return tt==null&&(tt=b.defaults.color),tt=y.updateColor(tt),ce++,tt},borderColor:function(tt,qe){return tt==null&&(tt=b.defaults.borderColor),tt=y.updateColor(tt),ce++,tt},bounds:function(tt,qe,he){return"range"in he||(he.range=null),tt},positions:function(tt,qe,he){var ue=qe.snap,ne=qe.positionBuffer,Ce=qe.positionFractBuffer,Ye=qe.selectionBuffer;if(tt.x||tt.y)return tt.x.length?qe.xAttr={buffer:N.buffer(tt.x),offset:0,stride:4,count:tt.x.length}:qe.xAttr={buffer:tt.x.buffer,offset:tt.x.offset*4||0,stride:(tt.x.stride||1)*4,count:tt.x.count},tt.y.length?qe.yAttr={buffer:N.buffer(tt.y),offset:0,stride:4,count:tt.y.length}:qe.yAttr={buffer:tt.y.buffer,offset:tt.y.offset*4||0,stride:(tt.y.stride||1)*4,count:tt.y.count},qe.count=Math.max(qe.xAttr.count,qe.yAttr.count),tt;tt=_(tt,"float64");var rt=qe.count=Math.floor(tt.length/2),Ke=qe.bounds=rt?s(tt,2):null;if(!he.range&&!qe.range&&(delete qe.range,he.range=Ke),!he.marker&&!qe.marker&&(delete qe.marker,he.marker=null),ue&&(ue===!0||rt>ue)?qe.tree=f(tt,{bounds:Ke}):ue&&ue.length&&(qe.tree=ue),qe.tree){var Mt={primitive:"points",usage:"static",data:qe.tree,type:"uint32"};qe.elements?qe.elements(Mt):qe.elements=N.elements(Mt)}var kt=A.float32(tt);ne({data:kt,usage:"dynamic"});var Nt=A.fract32(tt,kt);return Ce({data:Nt,usage:"dynamic"}),Ye({data:new Uint8Array(rt),type:"uint8",usage:"stream"}),tt}},{marker:function(tt,qe,he){var ue=qe.activation;if(ue.forEach(function(Nt){return Nt&&Nt.destroy&&Nt.destroy()}),ue.length=0,!tt||typeof tt[0]=="number"){var ne=y.addMarker(tt);ue[ne]=!0}else{for(var Ce=[],Ye=0,rt=Math.min(tt.length,qe.count);Ye<rt;Ye++){var Ke=y.addMarker(tt[Ye]);Ce[Ke]||(Ce[Ke]=new Uint8Array(qe.count)),Ce[Ke][Ye]=1}for(var Mt=0;Mt<Ce.length;Mt++)if(Ce[Mt]){var kt={data:Ce[Mt],type:"uint8",usage:"static"};ue[Mt]?ue[Mt](kt):ue[Mt]=N.buffer(kt),ue[Mt].data=Ce[Mt]}}return tt},range:function(tt,qe,he){var ue=qe.bounds;if(ue)return tt||(tt=ue),qe.scale=[1/(tt[2]-tt[0]),1/(tt[3]-tt[1])],qe.translate=[-tt[0],-tt[1]],qe.scaleFract=A.fract(qe.scale),qe.translateFract=A.fract(qe.translate),tt},viewport:function(tt){var qe=M(tt||[F.drawingBufferWidth,F.drawingBufferHeight]);return qe}}]),le){var de=$,G=de.count,Y=de.size,ee=de.borderSize,q=de.sizeBuffer,se=new Uint8Array(G*2);if(Y.length||ee.length)for(var ae=0;ae<G;ae++)se[ae*2]=Math.round((Y[ae]==null?Y:Y[ae])*255/O),se[ae*2+1]=Math.round((ee[ae]==null?ee:ee[ae])*255/O);q({data:se,usage:"dynamic"})}if(ce){var j=$,Q=j.count,re=j.color,pe=j.borderColor,we=j.colorBuffer,Se;if(y.tooManyColors){if(re.length||pe.length){Se=new Uint8Array(Q*8);for(var Ie=0;Ie<Q;Ie++){var Re=re[Ie];Se[Ie*8]=U[Re*4],Se[Ie*8+1]=U[Re*4+1],Se[Ie*8+2]=U[Re*4+2],Se[Ie*8+3]=U[Re*4+3];var We=pe[Ie];Se[Ie*8+4]=U[We*4],Se[Ie*8+5]=U[We*4+1],Se[Ie*8+6]=U[We*4+2],Se[Ie*8+7]=U[We*4+3]}}}else if(re.length||pe.length){Se=new Uint8Array(Q*4+2);for(var at=0;at<Q;at++)re[at]!=null&&(Se[at*4]=re[at]%P,Se[at*4+1]=Math.floor(re[at]/P)),pe[at]!=null&&(Se[at*4+2]=pe[at]%P,Se[at*4+3]=Math.floor(pe[at]/P))}we({data:Se||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return $})}},b.prototype.addMarker=function(y){var m=this.markerTextures,R=this.regl,L=this.markerCache,z=y==null?0:L.indexOf(y);if(z>=0)return z;var F;if(y instanceof Uint8Array||y instanceof Uint8ClampedArray)F=y;else{F=new Uint8Array(y.length);for(var N=0,O=y.length;N<O;N++)F[N]=y[N]*255}var P=Math.floor(Math.sqrt(F.length));return z=m.length,L.push(y),m.push(R.texture({channels:1,data:F,radius:P,mag:"linear",min:"linear"})),z},b.prototype.updateColor=function(y){var m=this.paletteIds,R=this.palette,L=this.maxColors;Array.isArray(y)||(y=[y]);var z=[];if(typeof y[0]=="number"){var F=[];if(Array.isArray(y))for(var N=0;N<y.length;N+=4)F.push(y.slice(N,N+4));else for(var O=0;O<y.length;O+=4)F.push(y.subarray(O,O+4));y=F}for(var P=0;P<y.length;P++){var U=y[P];U=i(U,"uint8");var B=h(U,!1);if(m[B]==null){var X=R.length;m[B]=Math.floor(X/4),R[X]=U[0],R[X+1]=U[1],R[X+2]=U[2],R[X+3]=U[3]}z[P]=m[B]}return!this.tooManyColors&&R.length>L*4&&(this.tooManyColors=!0),this.updatePalette(R),z.length===1?z[0]:z},b.prototype.updatePalette=function(y){if(!this.tooManyColors){var m=this.maxColors,R=this.paletteTexture,L=Math.ceil(y.length*.25/m);if(L>1){y=y.slice();for(var z=y.length*.25%m;z<L*m;z++)y.push(0,0,0,0)}R.height<L&&R.resize(m,L),R.subimage({width:Math.min(y.length*.25,m),height:L,data:y},0,0)}},b.prototype.destroy=function(){return this.groups.forEach(function(y){y.sizeBuffer.destroy(),y.positionBuffer.destroy(),y.positionFractBuffer.destroy(),y.colorBuffer.destroy(),y.activation.forEach(function(m){return m&&m.destroy&&m.destroy()}),y.selectionBuffer.destroy(),y.elements&&y.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(y){return y&&y.destroy&&y.destroy()}),this};var p=ch(),u=function(m,R){var L=new g(m,R),z=L.render.bind(L);return p(z,{render:z,update:L.update.bind(L),draw:L.draw.bind(L),destroy:L.destroy.bind(L),regl:L.regl,gl:L.gl,canvas:L.gl.canvas,groups:L.groups,markers:L.markerCache,palette:L.palette}),z};V.exports=u}}),vj=He({"node_modules/earcut/src/earcut.js"(Z,V){"use strict";V.exports=d,V.exports.default=d;function d(N,O,P){P=P||2;var U=O&&O.length,B=U?O[0]*P:N.length,X=x(N,0,B,P,!0),$=[];if(!X||X.next===X.prev)return $;var le,ce,de,G,Y,ee,q;if(U&&(X=a(N,O,X,P)),N.length>80*P){le=de=N[0],ce=G=N[1];for(var se=P;se<B;se+=P)Y=N[se],ee=N[se+1],Y<le&&(le=Y),ee<ce&&(ce=ee),Y>de&&(de=Y),ee>G&&(G=ee);q=Math.max(de-le,G-ce),q=q!==0?32767/q:0}return E(X,$,P,le,ce,q,0),$}function x(N,O,P,U,B){var X,$;if(B===F(N,O,P,U)>0)for(X=O;X<P;X+=U)$=R(X,N[X],N[X+1],$);else for(X=P-U;X>=O;X-=U)$=R(X,N[X],N[X+1],$);return $&&A($,$.next)&&(L($),$=$.next),$}function S(N,O){if(!N)return N;O||(O=N);var P=N,U;do if(U=!1,!P.steiner&&(A(P,P.next)||w(P.prev,P,P.next)===0)){if(L(P),P=O=P.prev,P===P.next)break;U=!0}else P=P.next;while(U||P!==O);return O}function E(N,O,P,U,B,X,$){if(N){!$&&X&&f(N,U,B,X);for(var le=N,ce,de;N.prev!==N.next;){if(ce=N.prev,de=N.next,X?t(N,U,B,X):e(N)){O.push(ce.i/P|0),O.push(N.i/P|0),O.push(de.i/P|0),L(N),N=de.next,le=de.next;continue}if(N=de,N===le){$?$===1?(N=r(S(N),O,P),E(N,O,P,U,B,X,2)):$===2&&o(N,O,P,U,B,X):E(S(N),O,P,U,B,X,1);break}}}}function e(N){var O=N.prev,P=N,U=N.next;if(w(O,P,U)>=0)return!1;for(var B=O.x,X=P.x,$=U.x,le=O.y,ce=P.y,de=U.y,G=B<X?B<$?B:$:X<$?X:$,Y=le<ce?le<de?le:de:ce<de?ce:de,ee=B>X?B>$?B:$:X>$?X:$,q=le>ce?le>de?le:de:ce>de?ce:de,se=U.next;se!==O;){if(se.x>=G&&se.x<=ee&&se.y>=Y&&se.y<=q&&l(B,le,X,ce,$,de,se.x,se.y)&&w(se.prev,se,se.next)>=0)return!1;se=se.next}return!0}function t(N,O,P,U){var B=N.prev,X=N,$=N.next;if(w(B,X,$)>=0)return!1;for(var le=B.x,ce=X.x,de=$.x,G=B.y,Y=X.y,ee=$.y,q=le<ce?le<de?le:de:ce<de?ce:de,se=G<Y?G<ee?G:ee:Y<ee?Y:ee,ae=le>ce?le>de?le:de:ce>de?ce:de,j=G>Y?G>ee?G:ee:Y>ee?Y:ee,Q=c(q,se,O,P,U),re=c(ae,j,O,P,U),pe=N.prevZ,we=N.nextZ;pe&&pe.z>=Q&&we&&we.z<=re;){if(pe.x>=q&&pe.x<=ae&&pe.y>=se&&pe.y<=j&&pe!==B&&pe!==$&&l(le,G,ce,Y,de,ee,pe.x,pe.y)&&w(pe.prev,pe,pe.next)>=0||(pe=pe.prevZ,we.x>=q&&we.x<=ae&&we.y>=se&&we.y<=j&&we!==B&&we!==$&&l(le,G,ce,Y,de,ee,we.x,we.y)&&w(we.prev,we,we.next)>=0))return!1;we=we.nextZ}for(;pe&&pe.z>=Q;){if(pe.x>=q&&pe.x<=ae&&pe.y>=se&&pe.y<=j&&pe!==B&&pe!==$&&l(le,G,ce,Y,de,ee,pe.x,pe.y)&&w(pe.prev,pe,pe.next)>=0)return!1;pe=pe.prevZ}for(;we&&we.z<=re;){if(we.x>=q&&we.x<=ae&&we.y>=se&&we.y<=j&&we!==B&&we!==$&&l(le,G,ce,Y,de,ee,we.x,we.y)&&w(we.prev,we,we.next)>=0)return!1;we=we.nextZ}return!0}function r(N,O,P){var U=N;do{var B=U.prev,X=U.next.next;!A(B,X)&&M(B,U,U.next,X)&&u(B,X)&&u(X,B)&&(O.push(B.i/P|0),O.push(U.i/P|0),O.push(X.i/P|0),L(U),L(U.next),U=N=X),U=U.next}while(U!==N);return S(U)}function o(N,O,P,U,B,X){var $=N;do{for(var le=$.next.next;le!==$.prev;){if($.i!==le.i&&_($,le)){var ce=m($,le);$=S($,$.next),ce=S(ce,ce.next),E($,O,P,U,B,X,0),E(ce,O,P,U,B,X,0);return}le=le.next}$=$.next}while($!==N)}function a(N,O,P,U){var B=[],X,$,le,ce,de;for(X=0,$=O.length;X<$;X++)le=O[X]*U,ce=X<$-1?O[X+1]*U:N.length,de=x(N,le,ce,U,!1),de===de.next&&(de.steiner=!0),B.push(T(de));for(B.sort(n),X=0;X<B.length;X++)P=i(B[X],P);return P}function n(N,O){return N.x-O.x}function i(N,O){var P=s(N,O);if(!P)return O;var U=m(P,N);return S(U,U.next),S(P,P.next)}function s(N,O){var P=O,U=N.x,B=N.y,X=-1/0,$;do{if(B<=P.y&&B>=P.next.y&&P.next.y!==P.y){var le=P.x+(B-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(le<=U&&le>X&&(X=le,$=P.x<P.next.x?P:P.next,le===U))return $}P=P.next}while(P!==O);if(!$)return null;var ce=$,de=$.x,G=$.y,Y=1/0,ee;P=$;do U>=P.x&&P.x>=de&&U!==P.x&&l(B<G?U:X,B,de,G,B<G?X:U,B,P.x,P.y)&&(ee=Math.abs(B-P.y)/(U-P.x),u(P,N)&&(ee<Y||ee===Y&&(P.x>$.x||P.x===$.x&&h($,P)))&&($=P,Y=ee)),P=P.next;while(P!==ce);return $}function h(N,O){return w(N.prev,N,O.prev)<0&&w(O.next,N,N.next)<0}function f(N,O,P,U){var B=N;do B.z===0&&(B.z=c(B.x,B.y,O,P,U)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==N);B.prevZ.nextZ=null,B.prevZ=null,v(B)}function v(N){var O,P,U,B,X,$,le,ce,de=1;do{for(P=N,N=null,X=null,$=0;P;){for($++,U=P,le=0,O=0;O<de&&(le++,U=U.nextZ,!!U);O++);for(ce=de;le>0||ce>0&&U;)le!==0&&(ce===0||!U||P.z<=U.z)?(B=P,P=P.nextZ,le--):(B=U,U=U.nextZ,ce--),X?X.nextZ=B:N=B,B.prevZ=X,X=B;P=U}X.nextZ=null,de*=2}while($>1);return N}function c(N,O,P,U,B){return N=(N-P)*B|0,O=(O-U)*B|0,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,N|O<<1}function T(N){var O=N,P=N;do(O.x<P.x||O.x===P.x&&O.y<P.y)&&(P=O),O=O.next;while(O!==N);return P}function l(N,O,P,U,B,X,$,le){return(B-$)*(O-le)>=(N-$)*(X-le)&&(N-$)*(U-le)>=(P-$)*(O-le)&&(P-$)*(X-le)>=(B-$)*(U-le)}function _(N,O){return N.next.i!==O.i&&N.prev.i!==O.i&&!p(N,O)&&(u(N,O)&&u(O,N)&&y(N,O)&&(w(N.prev,N,O.prev)||w(N,O.prev,O))||A(N,O)&&w(N.prev,N,N.next)>0&&w(O.prev,O,O.next)>0)}function w(N,O,P){return(O.y-N.y)*(P.x-O.x)-(O.x-N.x)*(P.y-O.y)}function A(N,O){return N.x===O.x&&N.y===O.y}function M(N,O,P,U){var B=b(w(N,O,P)),X=b(w(N,O,U)),$=b(w(P,U,N)),le=b(w(P,U,O));return!!(B!==X&&$!==le||B===0&&g(N,P,O)||X===0&&g(N,U,O)||$===0&&g(P,N,U)||le===0&&g(P,O,U))}function g(N,O,P){return O.x<=Math.max(N.x,P.x)&&O.x>=Math.min(N.x,P.x)&&O.y<=Math.max(N.y,P.y)&&O.y>=Math.min(N.y,P.y)}function b(N){return N>0?1:N<0?-1:0}function p(N,O){var P=N;do{if(P.i!==N.i&&P.next.i!==N.i&&P.i!==O.i&&P.next.i!==O.i&&M(P,P.next,N,O))return!0;P=P.next}while(P!==N);return!1}function u(N,O){return w(N.prev,N,N.next)<0?w(N,O,N.next)>=0&&w(N,N.prev,O)>=0:w(N,O,N.prev)<0||w(N,N.next,O)<0}function y(N,O){var P=N,U=!1,B=(N.x+O.x)/2,X=(N.y+O.y)/2;do P.y>X!=P.next.y>X&&P.next.y!==P.y&&B<(P.next.x-P.x)*(X-P.y)/(P.next.y-P.y)+P.x&&(U=!U),P=P.next;while(P!==N);return U}function m(N,O){var P=new z(N.i,N.x,N.y),U=new z(O.i,O.x,O.y),B=N.next,X=O.prev;return N.next=O,O.prev=N,P.next=B,B.prev=P,U.next=P,P.prev=U,X.next=U,U.prev=X,U}function R(N,O,P,U){var B=new z(N,O,P);return U?(B.next=U.next,B.prev=U,U.next.prev=B,U.next=B):(B.prev=B,B.next=B),B}function L(N){N.next.prev=N.prev,N.prev.next=N.next,N.prevZ&&(N.prevZ.nextZ=N.nextZ),N.nextZ&&(N.nextZ.prevZ=N.prevZ)}function z(N,O,P){this.i=N,this.x=O,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}d.deviation=function(N,O,P,U){var B=O&&O.length,X=B?O[0]*P:N.length,$=Math.abs(F(N,0,X,P));if(B)for(var le=0,ce=O.length;le<ce;le++){var de=O[le]*P,G=le<ce-1?O[le+1]*P:N.length;$-=Math.abs(F(N,de,G,P))}var Y=0;for(le=0;le<U.length;le+=3){var ee=U[le]*P,q=U[le+1]*P,se=U[le+2]*P;Y+=Math.abs((N[ee]-N[se])*(N[q+1]-N[ee+1])-(N[ee]-N[q])*(N[se+1]-N[ee+1]))}return $===0&&Y===0?0:Math.abs((Y-$)/$)};function F(N,O,P,U){for(var B=0,X=O,$=P-U;X<P;X+=U)B+=(N[$]-N[X])*(N[X+1]+N[$+1]),$=X;return B}d.flatten=function(N){for(var O=N[0][0].length,P={vertices:[],holes:[],dimensions:O},U=0,B=0;B<N.length;B++){for(var X=0;X<N[B].length;X++)for(var $=0;$<O;$++)P.vertices.push(N[B][X][$]);B>0&&(U+=N[B-1].length,P.holes.push(U))}return P}}}),mj=He({"node_modules/array-normalize/index.js"(Z,V){"use strict";var d=mg();V.exports=x;function x(S,E,e){if(!S||S.length==null)throw Error("Argument should be an array");E==null&&(E=1),e==null&&(e=d(S,E));for(var t=0;t<E;t++){var r=e[E+t],o=e[t],a=t,n=S.length;if(r===1/0&&o===-1/0)for(a=t;a<n;a+=E)S[a]=S[a]===r?1:S[a]===o?0:.5;else if(r===1/0)for(a=t;a<n;a+=E)S[a]=S[a]===r?1:0;else if(o===-1/0)for(a=t;a<n;a+=E)S[a]=S[a]===o?0:1;else{var i=r-o;for(a=t;a<n;a+=E)isNaN(S[a])||(S[a]=i===0?.5:(S[a]-o)/i)}}return S}}}),gj=He({"node_modules/es6-weak-map/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d,x;if(typeof WeakMap!="function")return!1;try{d=new WeakMap([[x={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(d)!=="[object WeakMap]"||typeof d.set!="function"||d.set({},1)!==d||typeof d.delete!="function"||typeof d.has!="function"||d.get(x)!=="one")}}}),yj=He({"node_modules/es5-ext/function/noop.js"(Z,V){"use strict";V.exports=function(){}}}),_0=He({"node_modules/es5-ext/object/is-value.js"(Z,V){"use strict";var d=yj()();V.exports=function(x){return x!==d&&x!==null}}}),WE=He({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(Z,V){"use strict";var d=Object.create,x=Object.getPrototypeOf,S={};V.exports=function(){var E=Object.setPrototypeOf,e=arguments[0]||d;return typeof E!="function"?!1:x(E(e(null),S))===S}}}),XE=He({"node_modules/es5-ext/object/is-object.js"(Z,V){"use strict";var d=_0(),x={function:!0,object:!0};V.exports=function(S){return d(S)&&x[typeof S]||!1}}}),rm=He({"node_modules/es5-ext/object/valid-value.js"(Z,V){"use strict";var d=_0();V.exports=function(x){if(!d(x))throw new TypeError("Cannot use null or undefined");return x}}}),_j=He({"node_modules/es5-ext/object/create.js"(Z,V){"use strict";var d=Object.create,x;WE()()||(x=ZE()),V.exports=function(){var S,E,e;return!x||x.level!==1?d:(S={},E={},e={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){if(t==="__proto__"){E[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}E[t]=e}),Object.defineProperties(S,E),Object.defineProperty(x,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:S}),function(t,r){return d(t===null?S:t,r)})}()}}),ZE=He({"node_modules/es5-ext/object/set-prototype-of/shim.js"(Z,V){"use strict";var d=XE(),x=rm(),S=Object.prototype.isPrototypeOf,E=Object.defineProperty,e={configurable:!0,enumerable:!1,writable:!0,value:void 0},t;t=function(r,o){if(x(r),o===null||d(o))return r;throw new TypeError("Prototype must be null or an object")},V.exports=function(r){var o,a;return r?(r.level===2?r.set?(a=r.set,o=function(n,i){return a.call(t(n,i),i),n}):o=function(n,i){return t(n,i).__proto__=i,n}:o=function n(i,s){var h;return t(i,s),h=S.call(n.nullPolyfill,i),h&&delete n.nullPolyfill.__proto__,s===null&&(s=n.nullPolyfill),i.__proto__=s,h&&E(n.nullPolyfill,"__proto__",e),i},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),o={},a,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{a=n.set,a.call(r,o)}catch{}if(Object.getPrototypeOf(r)===o)return{set:a,level:2}}return r.__proto__=o,Object.getPrototypeOf(r)===o?{level:2}:(r={},r.__proto__=o,Object.getPrototypeOf(r)===o?{level:1}:!1)}()),_j()}}),gT=He({"node_modules/es5-ext/object/set-prototype-of/index.js"(Z,V){"use strict";V.exports=WE()()?Object.setPrototypeOf:ZE()}}),xj=He({"node_modules/es5-ext/object/valid-object.js"(Z,V){"use strict";var d=XE();V.exports=function(x){if(!d(x))throw new TypeError(x+" is not an Object");return x}}}),bj=He({"node_modules/es5-ext/string/random-uniq.js"(Z,V){"use strict";var d=Object.create(null),x=Math.random;V.exports=function(){var S;do S=x().toString(36).slice(2);while(d[S]);return S}}}),_g=He({"node_modules/type/value/is.js"(Z,V){"use strict";var d=void 0;V.exports=function(x){return x!==d&&x!==null}}}),yT=He({"node_modules/type/object/is.js"(Z,V){"use strict";var d=_g(),x={object:!0,function:!0,undefined:!0};V.exports=function(S){return d(S)?hasOwnProperty.call(x,typeof S):!1}}}),wj=He({"node_modules/type/prototype/is.js"(Z,V){"use strict";var d=yT();V.exports=function(x){if(!d(x))return!1;try{return x.constructor?x.constructor.prototype===x:!1}catch{return!1}}}}),Tj=He({"node_modules/type/function/is.js"(Z,V){"use strict";var d=wj();V.exports=function(x){if(typeof x!="function"||!hasOwnProperty.call(x,"length"))return!1;try{if(typeof x.length!="number"||typeof x.call!="function"||typeof x.apply!="function")return!1}catch{return!1}return!d(x)}}}),YE=He({"node_modules/type/plain-function/is.js"(Z,V){"use strict";var d=Tj(),x=/^\s*class[\s{/}]/,S=Function.prototype.toString;V.exports=function(E){return!(!d(E)||x.test(S.call(E)))}}}),Aj=He({"node_modules/es5-ext/object/assign/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d=Object.assign,x;return typeof d!="function"?!1:(x={foo:"raz"},d(x,{bar:"dwa"},{trzy:"trzy"}),x.foo+x.bar+x.trzy==="razdwatrzy")}}}),Sj=He({"node_modules/es5-ext/object/keys/is-implemented.js"(Z,V){"use strict";V.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),Mj=He({"node_modules/es5-ext/object/keys/shim.js"(Z,V){"use strict";var d=_0(),x=Object.keys;V.exports=function(S){return x(d(S)?Object(S):S)}}}),Ej=He({"node_modules/es5-ext/object/keys/index.js"(Z,V){"use strict";V.exports=Sj()()?Object.keys:Mj()}}),kj=He({"node_modules/es5-ext/object/assign/shim.js"(Z,V){"use strict";var d=Ej(),x=rm(),S=Math.max;V.exports=function(E,e){var t,r,o=S(arguments.length,2),a;for(E=Object(x(E)),a=function(n){try{E[n]=e[n]}catch(i){t||(t=i)}},r=1;r<o;++r)e=arguments[r],d(e).forEach(a);if(t!==void 0)throw t;return E}}}),_T=He({"node_modules/es5-ext/object/assign/index.js"(Z,V){"use strict";V.exports=Aj()()?Object.assign:kj()}}),KE=He({"node_modules/es5-ext/object/normalize-options.js"(Z,V){"use strict";var d=_0(),x=Array.prototype.forEach,S=Object.create,E=function(e,t){var r;for(r in e)t[r]=e[r]};V.exports=function(e){var t=S(null);return x.call(arguments,function(r){d(r)&&E(Object(r),t)}),t}}}),Cj=He({"node_modules/es5-ext/string/#/contains/is-implemented.js"(Z,V){"use strict";var d="razdwatrzy";V.exports=function(){return typeof d.contains!="function"?!1:d.contains("dwa")===!0&&d.contains("foo")===!1}}}),Lj=He({"node_modules/es5-ext/string/#/contains/shim.js"(Z,V){"use strict";var d=String.prototype.indexOf;V.exports=function(x){return d.call(this,x,arguments[1])>-1}}}),JE=He({"node_modules/es5-ext/string/#/contains/index.js"(Z,V){"use strict";V.exports=Cj()()?String.prototype.contains:Lj()}}),am=He({"node_modules/d/index.js"(Z,V){"use strict";var d=_g(),x=YE(),S=_T(),E=KE(),e=JE(),t=V.exports=function(r,o){var a,n,i,s,h;return arguments.length<2||typeof r!="string"?(s=o,o=r,r=null):s=arguments[2],d(r)?(a=e.call(r,"c"),n=e.call(r,"e"),i=e.call(r,"w")):(a=i=!0,n=!1),h={value:o,configurable:a,enumerable:n,writable:i},s?S(E(s),h):h};t.gs=function(r,o,a){var n,i,s,h;return typeof r!="string"?(s=a,a=o,o=r,r=null):s=arguments[3],d(o)?x(o)?d(a)?x(a)||(s=a,a=void 0):a=void 0:(s=o,o=a=void 0):o=void 0,d(r)?(n=e.call(r,"c"),i=e.call(r,"e")):(n=!0,i=!1),h={get:o,set:a,configurable:n,enumerable:i},s?S(E(s),h):h}}}),bx=He({"node_modules/es5-ext/function/is-arguments.js"(Z,V){"use strict";var d=Object.prototype.toString,x=d.call(function(){return arguments}());V.exports=function(S){return d.call(S)===x}}}),wx=He({"node_modules/es5-ext/string/is-string.js"(Z,V){"use strict";var d=Object.prototype.toString,x=d.call("");V.exports=function(S){return typeof S=="string"||S&&typeof S=="object"&&(S instanceof String||d.call(S)===x)||!1}}}),Pj=He({"node_modules/ext/global-this/is-implemented.js"(Z,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),Ij=He({"node_modules/ext/global-this/implementation.js"(Z,V){var d=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return d()}try{return __global__||d()}finally{delete Object.prototype.__global__}}()}}),Tx=He({"node_modules/ext/global-this/index.js"(Z,V){"use strict";V.exports=Pj()()?globalThis:Ij()}}),Rj=He({"node_modules/es6-symbol/is-implemented.js"(Z,V){"use strict";var d=Tx(),x={object:!0,symbol:!0};V.exports=function(){var S=d.Symbol,E;if(typeof S!="function")return!1;E=S("test symbol");try{String(E)}catch{return!1}return!(!x[typeof S.iterator]||!x[typeof S.toPrimitive]||!x[typeof S.toStringTag])}}}),Dj=He({"node_modules/es6-symbol/is-symbol.js"(Z,V){"use strict";V.exports=function(d){return d?typeof d=="symbol"?!0:!d.constructor||d.constructor.name!=="Symbol"?!1:d[d.constructor.toStringTag]==="Symbol":!1}}}),$E=He({"node_modules/es6-symbol/validate-symbol.js"(Z,V){"use strict";var d=Dj();V.exports=function(x){if(!d(x))throw new TypeError(x+" is not a symbol");return x}}}),zj=He({"node_modules/es6-symbol/lib/private/generate-name.js"(Z,V){"use strict";var d=am(),x=Object.create,S=Object.defineProperty,E=Object.prototype,e=x(null);V.exports=function(t){for(var r=0,o,a;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,o="@@"+t,S(E,o,d.gs(null,function(n){a||(a=!0,S(this,o,d(n)),a=!1)})),o}}}),Fj=He({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(Z,V){"use strict";var d=am(),x=Tx().Symbol;V.exports=function(S){return Object.defineProperties(S,{hasInstance:d("",x&&x.hasInstance||S("hasInstance")),isConcatSpreadable:d("",x&&x.isConcatSpreadable||S("isConcatSpreadable")),iterator:d("",x&&x.iterator||S("iterator")),match:d("",x&&x.match||S("match")),replace:d("",x&&x.replace||S("replace")),search:d("",x&&x.search||S("search")),species:d("",x&&x.species||S("species")),split:d("",x&&x.split||S("split")),toPrimitive:d("",x&&x.toPrimitive||S("toPrimitive")),toStringTag:d("",x&&x.toStringTag||S("toStringTag")),unscopables:d("",x&&x.unscopables||S("unscopables"))})}}}),Oj=He({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(Z,V){"use strict";var d=am(),x=$E(),S=Object.create(null);V.exports=function(E){return Object.defineProperties(E,{for:d(function(e){return S[e]?S[e]:S[e]=E(String(e))}),keyFor:d(function(e){var t;x(e);for(t in S)if(S[t]===e)return t})})}}}),Bj=He({"node_modules/es6-symbol/polyfill.js"(Z,V){"use strict";var d=am(),x=$E(),S=Tx().Symbol,E=zj(),e=Fj(),t=Oj(),r=Object.create,o=Object.defineProperties,a=Object.defineProperty,n,i,s;if(typeof S=="function")try{String(S()),s=!0}catch{}else S=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(f)},V.exports=n=function h(f){var v;if(this instanceof h)throw new TypeError("Symbol is not a constructor");return s?S(f):(v=r(i.prototype),f=f===void 0?"":String(f),o(v,{__description__:d("",f),__name__:d("",E(f))}))},e(n),t(n),o(i.prototype,{constructor:d(n),toString:d("",function(){return this.__name__})}),o(n.prototype,{toString:d(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:d(function(){return x(this)})}),a(n.prototype,n.toPrimitive,d("",function(){var h=x(this);return typeof h=="symbol"?h:h.toString()})),a(n.prototype,n.toStringTag,d("c","Symbol")),a(i.prototype,n.toStringTag,d("c",n.prototype[n.toStringTag])),a(i.prototype,n.toPrimitive,d("c",n.prototype[n.toPrimitive]))}}),x0=He({"node_modules/es6-symbol/index.js"(Z,V){"use strict";V.exports=Rj()()?Tx().Symbol:Bj()}}),Nj=He({"node_modules/es5-ext/array/#/clear.js"(Z,V){"use strict";var d=rm();V.exports=function(){return d(this).length=0,this}}}),L1=He({"node_modules/es5-ext/object/valid-callable.js"(Z,V){"use strict";V.exports=function(d){if(typeof d!="function")throw new TypeError(d+" is not a function");return d}}}),Uj=He({"node_modules/type/string/coerce.js"(Z,V){"use strict";var d=_g(),x=yT(),S=Object.prototype.toString;V.exports=function(E){if(!d(E))return null;if(x(E)){var e=E.toString;if(typeof e!="function"||e===S)return null}try{return""+E}catch{return null}}}}),jj=He({"node_modules/type/lib/safe-to-string.js"(Z,V){"use strict";V.exports=function(d){try{return d.toString()}catch{try{return String(d)}catch{return null}}}}}),qj=He({"node_modules/type/lib/to-short-string.js"(Z,V){"use strict";var d=jj(),x=/[\n\r\u2028\u2029]/g;V.exports=function(S){var E=d(S);return E===null?"<Non-coercible to string value>":(E.length>100&&(E=E.slice(0,99)+"\u2026"),E=E.replace(x,function(e){switch(e){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),E)}}}),QE=He({"node_modules/type/lib/resolve-exception.js"(Z,V){"use strict";var d=_g(),x=yT(),S=Uj(),E=qj(),e=function(t,r){return t.replace("%v",E(r))};V.exports=function(t,r,o){if(!x(o))throw new TypeError(e(r,t));if(!d(t)){if("default"in o)return o.default;if(o.isOptional)return null}var a=S(o.errorMessage);throw d(a)||(a=r),new TypeError(e(a,t))}}}),Vj=He({"node_modules/type/value/ensure.js"(Z,V){"use strict";var d=QE(),x=_g();V.exports=function(S){return x(S)?S:d(S,"Cannot use %v",arguments[1])}}}),Gj=He({"node_modules/type/plain-function/ensure.js"(Z,V){"use strict";var d=QE(),x=YE();V.exports=function(S){return x(S)?S:d(S,"%v is not a plain function",arguments[1])}}}),Hj=He({"node_modules/es5-ext/array/from/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d=Array.from,x,S;return typeof d!="function"?!1:(x=["raz","dwa"],S=d(x),!!(S&&S!==x&&S[1]==="dwa"))}}}),Wj=He({"node_modules/es5-ext/function/is-function.js"(Z,V){"use strict";var d=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(S){return typeof S=="function"&&x(d.call(S))}}}),Xj=He({"node_modules/es5-ext/math/sign/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d=Math.sign;return typeof d!="function"?!1:d(10)===1&&d(-20)===-1}}}),Zj=He({"node_modules/es5-ext/math/sign/shim.js"(Z,V){"use strict";V.exports=function(d){return d=Number(d),isNaN(d)||d===0?d:d>0?1:-1}}}),Yj=He({"node_modules/es5-ext/math/sign/index.js"(Z,V){"use strict";V.exports=Xj()()?Math.sign:Zj()}}),Kj=He({"node_modules/es5-ext/number/to-integer.js"(Z,V){"use strict";var d=Yj(),x=Math.abs,S=Math.floor;V.exports=function(E){return isNaN(E)?0:(E=Number(E),E===0||!isFinite(E)?E:d(E)*S(x(E)))}}}),Jj=He({"node_modules/es5-ext/number/to-pos-integer.js"(Z,V){"use strict";var d=Kj(),x=Math.max;V.exports=function(S){return x(0,d(S))}}}),$j=He({"node_modules/es5-ext/array/from/shim.js"(Z,V){"use strict";var d=x0().iterator,x=bx(),S=Wj(),E=Jj(),e=L1(),t=rm(),r=_0(),o=wx(),a=Array.isArray,n=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(h){var f=arguments[1],v=arguments[2],c,T,l,_,w,A,M,g,b,p;if(h=Object(t(h)),r(f)&&e(f),!this||this===Array||!S(this)){if(!f){if(x(h))return w=h.length,w!==1?Array.apply(null,h):(_=new Array(1),_[0]=h[0],_);if(a(h)){for(_=new Array(w=h.length),T=0;T<w;++T)_[T]=h[T];return _}}_=[]}else c=this;if(!a(h)){if((b=h[d])!==void 0){for(M=e(b).call(h),c&&(_=new c),g=M.next(),T=0;!g.done;)p=f?n.call(f,v,g.value,T):g.value,c?(i.value=p,s(_,T,i)):_[T]=p,g=M.next(),++T;w=T}else if(o(h)){for(w=h.length,c&&(_=new c),T=0,l=0;T<w;++T)p=h[T],T+1<w&&(A=p.charCodeAt(0),A>=55296&&A<=56319&&(p+=h[++T])),p=f?n.call(f,v,p,l):p,c?(i.value=p,s(_,l,i)):_[l]=p,++l;w=l}}if(w===void 0)for(w=E(h.length),c&&(_=new c(w)),T=0;T<w;++T)p=f?n.call(f,v,h[T],T):h[T],c?(i.value=p,s(_,T,i)):_[T]=p;return c&&(i.value=null,_.length=w),_}}}),Qj=He({"node_modules/es5-ext/array/from/index.js"(Z,V){"use strict";V.exports=Hj()()?Array.from:$j()}}),eq=He({"node_modules/es5-ext/object/copy.js"(Z,V){"use strict";var d=Qj(),x=_T(),S=rm();V.exports=function(E){var e=Object(S(E)),t=arguments[1],r=Object(arguments[2]);if(e!==E&&!t)return e;var o={};return t?d(t,function(a){(r.ensure||a in E)&&(o[a]=E[a])}):x(o,E),o}}}),tq=He({"node_modules/es5-ext/object/_iterate.js"(Z,V){"use strict";var d=L1(),x=rm(),S=Function.prototype.bind,E=Function.prototype.call,e=Object.keys,t=Object.prototype.propertyIsEnumerable;V.exports=function(r,o){return function(a,n){var i,s=arguments[2],h=arguments[3];return a=Object(x(a)),d(n),i=e(a),h&&i.sort(typeof h=="function"?S.call(h,a):void 0),typeof r!="function"&&(r=i[r]),E.call(r,i,function(f,v){return t.call(a,f)?E.call(n,s,a[f],f,a,v):o})}}}}),rq=He({"node_modules/es5-ext/object/for-each.js"(Z,V){"use strict";V.exports=tq()("forEach")}}),aq=He({"node_modules/es5-ext/object/map.js"(Z,V){"use strict";var d=L1(),x=rq(),S=Function.prototype.call;V.exports=function(E,e){var t={},r=arguments[2];return d(e),x(E,function(o,a,n,i){t[a]=S.call(e,r,o,a,n,i)}),t}}}),iq=He({"node_modules/d/auto-bind.js"(Z,V){"use strict";var d=_g(),x=Vj(),S=Gj(),E=eq(),e=KE(),t=aq(),r=Function.prototype.bind,o=Object.defineProperty,a=Object.prototype.hasOwnProperty,n;n=function(i,s,h){var f=x(s)&&S(s.value),v;return v=E(s),delete v.writable,delete v.value,v.get=function(){return!h.overwriteDefinition&&a.call(this,i)?f:(s.value=r.call(f,h.resolveContext?h.resolveContext(this):this),o(this,i,s),this[i])},v},V.exports=function(i){var s=e(arguments[1]);return d(s.resolveContext)&&S(s.resolveContext),t(i,function(h,f){return n(f,h,s)})}}}),e6=He({"node_modules/es6-iterator/index.js"(Z,V){"use strict";var d=Nj(),x=_T(),S=L1(),E=rm(),e=am(),t=iq(),r=x0(),o=Object.defineProperty,a=Object.defineProperties,n;V.exports=n=function(i,s){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");a(this,{__list__:e("w",E(i)),__context__:e("w",s),__nextIndex__:e("w",0)}),s&&(S(s.on),s.on("_add",this._onAdd),s.on("_delete",this._onDelete),s.on("_clear",this._onClear))},delete n.prototype.constructor,a(n.prototype,x({_next:e(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:e(function(){return this._createResult(this._next())}),_createResult:e(function(i){return i===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(i)}}),_resolve:e(function(i){return this.__list__[i]}),_unBind:e(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:e(function(){return"[object "+(this[r.toStringTag]||"Object")+"]"})},t({_onAdd:e(function(i){if(!(i>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",e("c",[i]));return}this.__redo__.forEach(function(s,h){s>=i&&(this.__redo__[h]=++s)},this),this.__redo__.push(i)}}),_onDelete:e(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(h,f){h>i&&(this.__redo__[f]=--h)},this)))}),_onClear:e(function(){this.__redo__&&d.call(this.__redo__),this.__nextIndex__=0})}))),o(n.prototype,r.iterator,e(function(){return this}))}}),nq=He({"node_modules/es6-iterator/array.js"(Z,V){"use strict";var d=gT(),x=JE(),S=am(),E=x0(),e=e6(),t=Object.defineProperty,r;r=V.exports=function(o,a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e.call(this,o),a?x.call(a,"key+value")?a="key+value":x.call(a,"key")?a="key":a="value":a="value",t(this,"__kind__",S("",a))},d&&d(r,e),delete r.prototype.constructor,r.prototype=Object.create(e.prototype,{_resolve:S(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),t(r.prototype,E.toStringTag,S("c","Array Iterator"))}}),oq=He({"node_modules/es6-iterator/string.js"(Z,V){"use strict";var d=gT(),x=am(),S=x0(),E=e6(),e=Object.defineProperty,t;t=V.exports=function(r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");r=String(r),E.call(this,r),e(this,"__length__",x("",r.length))},d&&d(t,E),delete t.prototype.constructor,t.prototype=Object.create(E.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:x(function(r){var o=this.__list__[r],a;return this.__nextIndex__===this.__length__?o:(a=o.charCodeAt(0),a>=55296&&a<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),e(t.prototype,S.toStringTag,x("c","String Iterator"))}}),sq=He({"node_modules/es6-iterator/is-iterable.js"(Z,V){"use strict";var d=bx(),x=_0(),S=wx(),E=x0().iterator,e=Array.isArray;V.exports=function(t){return x(t)?e(t)||S(t)||d(t)?!0:typeof t[E]=="function":!1}}}),lq=He({"node_modules/es6-iterator/valid-iterable.js"(Z,V){"use strict";var d=sq();V.exports=function(x){if(!d(x))throw new TypeError(x+" is not iterable");return x}}}),t6=He({"node_modules/es6-iterator/get.js"(Z,V){"use strict";var d=bx(),x=wx(),S=nq(),E=oq(),e=lq(),t=x0().iterator;V.exports=function(r){return typeof e(r)[t]=="function"?r[t]():d(r)?new S(r):x(r)?new E(r):new S(r)}}}),uq=He({"node_modules/es6-iterator/for-of.js"(Z,V){"use strict";var d=bx(),x=L1(),S=wx(),E=t6(),e=Array.isArray,t=Function.prototype.call,r=Array.prototype.some;V.exports=function(o,a){var n,i=arguments[2],s,h,f,v,c,T,l;if(e(o)||d(o)?n="array":S(o)?n="string":o=E(o),x(a),h=function(){f=!0},n==="array"){r.call(o,function(_){return t.call(a,i,_,h),f});return}if(n==="string"){for(c=o.length,v=0;v<c&&(T=o[v],v+1<c&&(l=T.charCodeAt(0),l>=55296&&l<=56319&&(T+=o[++v])),t.call(a,i,T,h),!f);++v);return}for(s=o.next();!s.done;){if(t.call(a,i,s.value,h),f)return;s=o.next()}}}}),cq=He({"node_modules/es6-weak-map/is-native-implemented.js"(Z,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),fq=He({"node_modules/es6-weak-map/polyfill.js"(Z,V){"use strict";var d=_0(),x=gT(),S=xj(),E=rm(),e=bj(),t=am(),r=t6(),o=uq(),a=x0().toStringTag,n=cq(),i=Array.isArray,s=Object.defineProperty,h=Object.prototype.hasOwnProperty,f=Object.getPrototypeOf,v;V.exports=v=function(){var c=arguments[0],T;if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");return T=n&&x&&WeakMap!==v?x(new WeakMap,f(this)):this,d(c)&&(i(c)||(c=r(c))),s(T,"__weakMapData__",t("c","$weakMap$"+e())),c&&o(c,function(l){E(l),T.set(l[0],l[1])}),T},n&&(x&&x(v,WeakMap),v.prototype=Object.create(WeakMap.prototype,{constructor:t(v)})),Object.defineProperties(v.prototype,{delete:t(function(c){return h.call(S(c),this.__weakMapData__)?(delete c[this.__weakMapData__],!0):!1}),get:t(function(c){if(h.call(S(c),this.__weakMapData__))return c[this.__weakMapData__]}),has:t(function(c){return h.call(S(c),this.__weakMapData__)}),set:t(function(c,T){return s(S(c),this.__weakMapData__,t("c",T)),this}),toString:t(function(){return"[object WeakMap]"})}),s(v.prototype,a,t("c","WeakMap"))}}),r6=He({"node_modules/es6-weak-map/index.js"(Z,V){"use strict";V.exports=gj()()?WeakMap:fq()}}),hq=He({"node_modules/array-find-index/index.js"(Z,V){"use strict";V.exports=function(d,x,S){if(typeof Array.prototype.findIndex=="function")return d.findIndex(x,S);if(typeof x!="function")throw new TypeError("predicate must be a function");var E=Object(d),e=E.length;if(e===0)return-1;for(var t=0;t<e;t++)if(x.call(S,E[t],t,E))return t;return-1}}}),a6=He({"node_modules/regl-line2d/index.js"(Z,V){"use strict";var d=d0(),x=mg(),S=ch(),E=Ev(),e=gg(),t=vj(),r=mj(),{float32:o,fract32:a}=mT(),n=r6(),i=C1(),s=hq(),h=`
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.;
}
`,f=`
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;
}
`,v=`
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;
}
`,c=`
precision highp float;
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`,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;
}
}
}
`,l=`
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;
}
`;V.exports=_;function _(w,A){if(!(this instanceof _))return new _(w,A);if(typeof w=="function"?(A||(A={}),A.regl=w):A=w,A.length&&(A.positions=A),w=A.regl,!w.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=w._gl,this.regl=w,this.passes=[],this.shaders=_.shaders.has(w)?_.shaders.get(w):_.shaders.set(w,_.createShaders(w)).get(w),this.update(A)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new n,_.createShaders=function(w){let A=w.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:w.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,y)=>y.join==="round"?2:1,miterLimit:w.prop("miterLimit"),scale:w.prop("scale"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),thickness:w.prop("thickness"),dashTexture:w.prop("dashTexture"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),dashLength:w.prop("dashLength"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight],depth:w.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:(u,y)=>!y.overlay},stencil:{enable:!1},scissor:{enable:!0,box:w.prop("viewport")},viewport:w.prop("viewport")},g=w(S({vert:h,frag:f,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),b;try{b=w(S({cull:{enable:!0,face:"back"},vert:T,frag:l,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{b=g}return{fill:w({primitive:"triangle",elements:(u,y)=>y.triangles,offset:0,vert:v,frag:c,uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:g,miter:b}},_.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},_.prototype.render=function(...w){w.length&&this.update(...w),this.draw()},_.prototype.draw=function(...w){return(w.length?w:this.passes).forEach((A,M)=>{if(A&&Array.isArray(A))return this.draw(...A);typeof A=="number"&&(A=this.passes[A]),A&&A.count>1&&A.opacity&&(this.regl._refresh(),A.fill&&A.triangles&&A.triangles.length>2&&this.shaders.fill(A),A.thickness&&(A.scale[0]*A.viewport.width>_.precisionThreshold||A.scale[1]*A.viewport.height>_.precisionThreshold?this.shaders.rect(A):A.join==="rect"||!A.join&&(A.thickness<=2||A.count>=_.maxPoints)?this.shaders.rect(A):this.shaders.miter(A)))}),this},_.prototype.update=function(w){if(!w)return;w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);let{regl:A,gl:M}=this;if(w.forEach((b,p)=>{let u=this.passes[p];if(b!==void 0){if(b===null){this.passes[p]=null;return}if(typeof b[0]=="number"&&(b={positions:b}),b=E(b,{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"}),u||(this.passes[p]=u={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:A.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:A.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},b=S({},_.defaults,b)),b.thickness!=null&&(u.thickness=parseFloat(b.thickness)),b.opacity!=null&&(u.opacity=parseFloat(b.opacity)),b.miterLimit!=null&&(u.miterLimit=parseFloat(b.miterLimit)),b.overlay!=null&&(u.overlay=!!b.overlay,p<_.maxLines&&(u.depth=2*(_.maxLines-1-p%_.maxLines)/_.maxLines-1)),b.join!=null&&(u.join=b.join),b.hole!=null&&(u.hole=b.hole),b.fill!=null&&(u.fill=b.fill?d(b.fill,"uint8"):null),b.viewport!=null&&(u.viewport=i(b.viewport)),u.viewport||(u.viewport=i([M.drawingBufferWidth,M.drawingBufferHeight])),b.close!=null&&(u.close=b.close),b.positions===null&&(b.positions=[]),b.positions){let R,L;if(b.positions.x&&b.positions.y){let O=b.positions.x,P=b.positions.y;L=u.count=Math.max(O.length,P.length),R=new Float64Array(L*2);for(let U=0;U<L;U++)R[U*2]=O[U],R[U*2+1]=P[U]}else R=e(b.positions,"float64"),L=u.count=Math.floor(R.length/2);let z=u.bounds=x(R,2);if(u.fill){let O=[],P={},U=0;for(let B=0,X=0,$=u.count;B<$;B++){let le=R[B*2],ce=R[B*2+1];isNaN(le)||isNaN(ce)||le==null||ce==null?(le=R[U*2],ce=R[U*2+1],P[B]=U):U=B,O[X++]=le,O[X++]=ce}if(b.splitNull){u.count-1 in P||(P[u.count]=u.count-1);let B=Object.keys(P).map(Number).sort((ce,de)=>ce-de),X=[],$=0,le=u.hole!=null?u.hole[0]:null;if(le!=null){let ce=s(B,de=>de>=le);B=B.slice(0,ce),B.push(le)}for(let ce=0;ce<B.length;ce++){let de=O.slice($*2,B[ce]*2).concat(le?O.slice(le*2):[]),G=(u.hole||[]).map(ee=>ee-le+(B[ce]-$)),Y=t(de,G);Y=Y.map(ee=>ee+$+(ee+$<B[ce]?0:le-B[ce])),X.push(...Y),$=B[ce]+1}for(let ce=0,de=X.length;ce<de;ce++)P[X[ce]]!=null&&(X[ce]=P[X[ce]]);u.triangles=X}else{let B=t(O,u.hole||[]);for(let X=0,$=B.length;X<$;X++)P[B[X]]!=null&&(B[X]=P[B[X]]);u.triangles=B}}let F=new Float64Array(R);r(F,2,z);let N=new Float64Array(L*2+6);u.close?R[0]===R[L*2-2]&&R[1]===R[L*2-1]?(N[0]=F[L*2-4],N[1]=F[L*2-3]):(N[0]=F[L*2-2],N[1]=F[L*2-1]):(N[0]=F[0],N[1]=F[1]),N.set(F,2),u.close?R[0]===R[L*2-2]&&R[1]===R[L*2-1]?(N[L*2+2]=F[2],N[L*2+3]=F[3],u.count-=1):(N[L*2+2]=F[0],N[L*2+3]=F[1],N[L*2+4]=F[2],N[L*2+5]=F[3]):(N[L*2+2]=F[L*2-2],N[L*2+3]=F[L*2-1],N[L*2+4]=F[L*2-2],N[L*2+5]=F[L*2-1]);var y=o(N);u.positionBuffer(y);var m=a(N,y);u.positionFractBuffer(m)}if(b.range?u.range=b.range:u.range||(u.range=u.bounds),(b.range||b.positions)&&u.count){let R=u.bounds,L=R[2]-R[0],z=R[3]-R[1],F=u.range[2]-u.range[0],N=u.range[3]-u.range[1];u.scale=[L/F,z/N],u.translate=[-u.range[0]/F+R[0]/F||0,-u.range[1]/N+R[1]/N||0],u.scaleFract=a(u.scale),u.translateFract=a(u.translate)}if(b.dashes){let R=0,L;if(!b.dashes||b.dashes.length<2)R=1,L=new Uint8Array([255,255,255,255,255,255,255,255]);else{R=0;for(let N=0;N<b.dashes.length;++N)R+=b.dashes[N];L=new Uint8Array(R*_.dashMult);let z=0,F=255;for(let N=0;N<2;N++)for(let O=0;O<b.dashes.length;++O){for(let P=0,U=b.dashes[O]*_.dashMult*.5;P<U;++P)L[z++]=F;F^=255}}u.dashLength=R,u.dashTexture({channels:1,data:L,width:L.length,height:1,mag:"linear",min:"linear"},0,0)}if(b.color){let R=u.count,L=b.color;L||(L="transparent");let z=new Uint8Array(R*4+4);if(!Array.isArray(L)||typeof L[0]=="number"){let F=d(L,"uint8");for(let N=0;N<R+1;N++)z.set(F,N*4)}else{for(let F=0;F<R;F++){let N=d(L[F],"uint8");z.set(N,F*4)}z.set(d(L[0],"uint8"),R*4)}u.colorBuffer({usage:"dynamic",type:"uint8",data:z})}}}),w.length<this.passes.length){for(let b=w.length;b<this.passes.length;b++){let p=this.passes[b];p&&(p.colorBuffer.destroy(),p.positionBuffer.destroy(),p.dashTexture.destroy())}this.passes.length=w.length}let g=[];for(let b=0;b<this.passes.length;b++)this.passes[b]!==null&&g.push(this.passes[b]);return this.passes=g,this},_.prototype.destroy=function(){return this.passes.forEach(w=>{w.colorBuffer.destroy(),w.positionBuffer.destroy(),w.dashTexture.destroy()}),this.passes.length=0,this}}}),pq=He({"node_modules/regl-error2d/index.js"(Z,V){"use strict";var d=mg(),x=d0(),S=GE(),E=Ev(),e=ch(),t=gg(),{float32:r,fract32:o}=mT();V.exports=n;var a=[[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 n(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=i._gl,f,v,c,T,l,_,w={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},A=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),c=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=i.buffer({usage:"static",type:"float",data:a}),p(s),f=i({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:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(y,m)=>[m.viewport.x,m.viewport.y,y.viewportWidth,y.viewportHeight]},attributes:{color:{buffer:T,offset:(y,m)=>m.offset*4,divisor:1},position:{buffer:v,offset:(y,m)=>m.offset*8,divisor:1},positionFract:{buffer:c,offset:(y,m)=>m.offset*8,divisor:1},error:{buffer:l,offset:(y,m)=>m.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,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:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:a.length}),e(M,{update:p,draw:g,destroy:u,regl:i,gl:h,canvas:h.canvas,groups:A}),M;function M(y){y?p(y):y===null&&u(),g()}function g(y){if(typeof y=="number")return b(y);y&&!Array.isArray(y)&&(y=[y]),i._refresh(),A.forEach((m,R)=>{if(m){if(y&&(y[R]?m.draw=!0:m.draw=!1),!m.draw){m.draw=!0;return}b(R)}})}function b(y){typeof y=="number"&&(y=A[y]),y!=null&&y&&y.count&&y.color&&y.opacity&&y.positions&&y.positions.length>1&&(y.scaleRatio=[y.scale[0]*y.viewport.width,y.scale[1]*y.viewport.height],f(y),y.after&&y.after(y))}function p(y){if(!y)return;y.length!=null?typeof y[0]=="number"&&(y=[{positions:y}]):Array.isArray(y)||(y=[y]);let m=0,R=0;if(M.groups=A=y.map((F,N)=>{let O=A[N];if(F)typeof F=="function"?F={after:F}:typeof F[0]=="number"&&(F={positions:F});else return O;return F=E(F,{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"}),O||(A[N]=O={id:N,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),S(O,F,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=t(P),R+=P.length,P),positions:(P,U)=>(P=t(P,"float64"),U.count=Math.floor(P.length/2),U.bounds=d(P,2),U.offset=m,m+=U.count,P)},{color:(P,U)=>{let B=U.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let $=P;P=Array(B);for(let le=0;le<B;le++)P[le]=$}if(P.length<B)throw Error("Not enough colors");let X=new Uint8Array(B*4);for(let $=0;$<B;$++){let le=x(P[$],"uint8");X.set(le,$*4)}return X},range:(P,U,B)=>{let X=U.bounds;return P||(P=X),U.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],U.translate=[-P[0],-P[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),P},viewport:P=>{let U;return Array.isArray(P)?U={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(U={x:P.x||P.left||0,y:P.y||P.top||0},P.right?U.width=P.right-U.x:U.width=P.w||P.width||0,P.bottom?U.height=P.bottom-U.y:U.height=P.h||P.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),m||R){let F=A.reduce((U,B,X)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),P=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:X,count:$,offset:le,color:ce,errors:de}=U;$&&(O.set(ce,le*4),P.set(de,le*4),N.set(X,le*2))});var L=r(N);v(L);var z=o(N,L);c(z),T(O),l(P)}}function u(){v.destroy(),c.destroy(),T.destroy(),l.destroy(),_.destroy()}}}}),dq=He({"node_modules/unquote/index.js"(Z,V){var d=/[\'\"]/;V.exports=function(S){return S?(d.test(S.charAt(0))&&(S=S.substr(1)),d.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,V){V.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"node_modules/css-font-weight-keywords/index.json"(Z,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),s6=He({"node_modules/css-font-style-keywords/index.json"(Z,V){V.exports=["normal","italic","oblique"]}}),l6=He({"node_modules/css-font-stretch-keywords/index.json"(Z,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),vq=He({"node_modules/parenthesis/index.js"(Z,V){"use strict";function d(E,e){if(typeof E!="string")return[E];var t=[E];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",a=!!e.flat;r.forEach(function(s){var h=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function v(c,T,l){var _=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(_),o+_+o}t.forEach(function(c,T){for(var l,_=0;c!=l;)if(l=c,c=c.replace(h,v),_++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=c}),f=f.reverse(),t=t.map(function(c){return f.forEach(function(T){c=c.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),c})});var n=new RegExp("\\"+o+"([0-9]+)\\"+o);function i(s,h,f){for(var v=[],c,T=0;c=n.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");v.push(s.slice(0,c.index)),v.push(i(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return v.push(s),v}return a?t:i(t[0],t)}function x(E,e){if(e&&e.flat){var t=e&&e.escape||"___",r=E[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),n=0;r!=o;){if(n++>1e4)throw Error("Circular references in "+E);o=r,r=r.replace(a,i)}return r}return E.reduce(function s(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function i(s,h){if(E[h]==null)throw Error("Reference "+h+"is undefined");return E[h]}}function S(E,e){return Array.isArray(E)?x(E,e):d(E,e)}S.parse=d,S.stringify=x,V.exports=S}}),mq=He({"node_modules/string-split-by/index.js"(Z,V){"use strict";var d=vq();V.exports=function(S,E,e){if(S==null)throw Error("First argument should be a string");if(E==null)throw Error("Separator should be a string or a RegExp");e?(typeof e=="string"||Array.isArray(e))&&(e={ignore:e}):e={},e.escape==null&&(e.escape=!0),e.ignore==null?e.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof e.ignore=="string"&&(e.ignore=[e.ignore]),e.ignore=e.ignore.map(function(h){return h.length===1&&(h=h+h),h}));var t=d.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(E);if(e.escape){for(var a=[],n=0;n<o.length;n++){var i=o[n],s=o[n+1];i[i.length-1]==="\\"&&i[i.length-2]!=="\\"?(a.push(i+E+s),n++):a.push(i)}o=a}for(var n=0;n<o.length;n++)t[0]=o[n],o[n]=d.stringify(t,{flat:!0});return o}}}),gq=He({"node_modules/css-font-size-keywords/index.json"(Z,V){V.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),u6=He({"node_modules/css-font/lib/util.js"(Z,V){"use strict";var d=gq();V.exports={isSize:function(S){return/^[\d\.]/.test(S)||S.indexOf("/")!==-1||d.indexOf(S)!==-1}}}}),yq=He({"node_modules/css-font/parse.js"(Z,V){"use strict";var d=dq(),x=i6(),S=n6(),E=o6(),e=s6(),t=l6(),r=mq(),o=u6().isSize;V.exports=n;var a=n.cache={};function n(s){if(typeof s!="string")throw new Error("Font argument must be a string.");if(a[s])return a[s];if(s==="")throw new Error("Cannot parse an empty string.");if(S.indexOf(s)!==-1)return a[s]={system:s};for(var h={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=r(s,/\s+/),v;v=f.shift();){if(x.indexOf(v)!==-1)return["style","variant","weight","stretch"].forEach(function(T){h[T]=v}),a[s]=h;if(e.indexOf(v)!==-1){h.style=v;continue}if(v==="normal"||v==="small-caps"){h.variant=v;continue}if(t.indexOf(v)!==-1){h.stretch=v;continue}if(E.indexOf(v)!==-1){h.weight=v;continue}if(o(v)){var c=r(v,"/");if(h.size=c[0],c[1]!=null?h.lineHeight=i(c[1]):f[0]==="/"&&(f.shift(),h.lineHeight=i(f.shift())),!f.length)throw new Error("Missing required font-family.");return h.family=r(f.join(" "),/\s*,\s*/).map(d),a[s]=h}throw new Error("Unknown or unsupported font token: "+v)}throw new Error("Missing required font-size.")}function i(s){var h=parseFloat(s);return h.toString()===s?h:s}}}),c6=He({"node_modules/css-font/stringify.js"(Z,V){"use strict";var d=Ev(),x=u6().isSize,S=s(i6()),E=s(n6()),e=s(o6()),t=s(s6()),r=s(l6()),o={normal:1,"small-caps":1},a={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},n={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};V.exports=function(f){if(f=d(f,{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"}),f.system)return f.system&&i(f.system,E),f.system;if(i(f.style,t),i(f.variant,o),i(f.weight,e),i(f.stretch,r),f.size==null&&(f.size=n.size),typeof f.size=="number"&&(f.size+="px"),!x)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=n.family),Array.isArray(f.family)&&(f.family.length||(f.family=[n.family]),f.family=f.family.map(function(c){return a[c]?c:'"'+c+'"'}).join(", "));var v=[];return v.push(f.style),f.variant!==f.style&&v.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&v.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&v.push(f.stretch),v.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),v.push(f.family),v.filter(Boolean).join(" ")};function i(h,f){if(h&&!f[h]&&!S[h])throw Error("Unknown keyword `"+h+"`");return h}function s(h){for(var f={},v=0;v<h.length;v++)f[h[v]]=1;return f}}}),_q=He({"node_modules/css-font/index.js"(Z,V){"use strict";V.exports={parse:yq(),stringify:c6()}}}),xq=He({"node_modules/regl/dist/regl.unchecked.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?V.exports=x():d.createREGL=x()})(Z,function(){"use strict";var d=function(it,Zt){for(var cr=Object.keys(Zt),oa=0;oa<cr.length;++oa)it[cr[oa]]=Zt[cr[oa]];return it},x=0,S=0,E=5,e=6;function t(it,Zt){this.id=x++,this.type=it,this.data=Zt}function r(it){return it.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function o(it){if(it.length===0)return[];var Zt=it.charAt(0),cr=it.charAt(it.length-1);if(it.length>1&&Zt===cr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var va=[],ya=0;ya<wa.length;++ya)va=va.concat(o(wa[ya]));return va}function a(it){return"["+o(it).join("][")+"]"}function n(it,Zt){return new t(it,a(Zt+""))}function i(it){return typeof it=="function"&&!it._reglType||it instanceof t}function s(it,Zt){if(typeof it=="function")return new t(S,it);if(typeof it=="number"||typeof it=="boolean")return new t(E,it);if(Array.isArray(it))return new t(e,it.map(function(cr,oa){return s(cr,Zt+"["+oa+"]")}));if(it instanceof t)return it}var h={DynamicVariable:t,define:n,isDynamic:i,unbox:s,accessor:a},f={next:typeof requestAnimationFrame=="function"?function(it){return requestAnimationFrame(it)}:function(it){return setTimeout(it,16)},cancel:typeof cancelAnimationFrame=="function"?function(it){return cancelAnimationFrame(it)}:clearTimeout},v=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(){var it={"":0},Zt=[""];return{id:function(cr){var oa=it[cr];return oa||(oa=it[cr]=Zt.length,Zt.push(cr),oa)},str:function(cr){return Zt[cr]}}}function T(it,Zt,cr){var oa=document.createElement("canvas");d(oa.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),it.appendChild(oa),it===document.body&&(oa.style.position="absolute",d(it.style,{margin:0,padding:0}));function wa(){var Ya=window.innerWidth,bi=window.innerHeight;if(it!==document.body){var yi=oa.getBoundingClientRect();Ya=yi.right-yi.left,bi=yi.bottom-yi.top}oa.width=cr*Ya,oa.height=cr*bi}var va;it!==document.body&&typeof ResizeObserver=="function"?(va=new ResizeObserver(function(){setTimeout(wa)}),va.observe(it)):window.addEventListener("resize",wa,!1);function ya(){va?va.disconnect():window.removeEventListener("resize",wa),it.removeChild(oa)}return wa(),{canvas:oa,onDestroy:ya}}function l(it,Zt){function cr(oa){try{return it.getContext(oa,Zt)}catch{return null}}return cr("webgl")||cr("experimental-webgl")||cr("webgl-experimental")}function _(it){return typeof it.nodeName=="string"&&typeof it.appendChild=="function"&&typeof it.getBoundingClientRect=="function"}function w(it){return typeof it.drawArrays=="function"||typeof it.drawElements=="function"}function A(it){return typeof it=="string"?it.split():it}function M(it){return typeof it=="string"?document.querySelector(it):it}function g(it){var Zt=it||{},cr,oa,wa,va,ya={},Ya=[],bi=[],yi=typeof window>"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?cr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?cr=Zt:w(Zt)?(va=Zt,wa=va.canvas):("gl"in Zt?va=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(ya=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(gn=Zt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?wa=cr:oa=cr),!va){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}ya.premultipliedAlpha===void 0&&(ya.premultipliedAlpha=!0),va=l(wa,ya)}return va?{gl:va,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var cr={};function oa(ya){var Ya=ya.toLowerCase(),bi;try{bi=cr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa<Zt.extensions.length;++wa){var va=Zt.extensions[wa];if(!oa(va))return Zt.onDestroy(),Zt.onDone('"'+va+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Zt.optionalExtensions.forEach(oa),{extensions:cr,restore:function(){Object.keys(cr).forEach(function(ya){if(cr[ya]&&!oa(ya))throw new Error("(regl): error restoring extension "+ya)})}}}function p(it,Zt){for(var cr=Array(it),oa=0;oa<it;++oa)cr[oa]=Zt(oa);return cr}var u=5120,y=5121,m=5122,R=5123,L=5124,z=5125,F=5126;function N(it){for(var Zt=16;Zt<=1<<28;Zt*=16)if(it<=Zt)return Zt;return 0}function O(it){var Zt,cr;return Zt=(it>65535)<<4,it>>>=Zt,cr=(it>255)<<3,it>>>=cr,Zt|=cr,cr=(it>15)<<2,it>>>=cr,Zt|=cr,cr=(it>3)<<1,it>>>=cr,Zt|=cr,Zt|it>>1}function P(){var it=p(8,function(){return[]});function Zt(va){var ya=N(va),Ya=it[O(ya)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(ya)}function cr(va){it[O(va.byteLength)>>2].push(va)}function oa(va,ya){var Ya=null;switch(va){case u:Ya=new Int8Array(Zt(ya),0,ya);break;case y:Ya=new Uint8Array(Zt(ya),0,ya);break;case m:Ya=new Int16Array(Zt(2*ya),0,ya);break;case R:Ya=new Uint16Array(Zt(2*ya),0,ya);break;case L:Ya=new Int32Array(Zt(4*ya),0,ya);break;case z:Ya=new Uint32Array(Zt(4*ya),0,ya);break;case F:Ya=new Float32Array(Zt(4*ya),0,ya);break;default:return null}return Ya.length!==ya?Ya.subarray(0,ya):Ya}function wa(va){cr(va.buffer)}return{alloc:Zt,free:cr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,le=3412,ce=3413,de=3414,G=3415,Y=33901,ee=33902,q=3379,se=3386,ae=34921,j=36347,Q=36348,re=35661,pe=35660,we=34930,Se=36349,Ie=34076,Re=34024,We=7936,at=7937,nt=7938,tt=35724,qe=34047,he=36063,ue=34852,ne=3553,Ce=34067,Ye=34069,rt=33984,Ke=6408,Mt=5126,kt=5121,Nt=36160,Gt=36053,Mr=36064,mr=16384,qr=function(it,Zt){var cr=1;Zt.ext_texture_filter_anisotropic&&(cr=it.getParameter(qe));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ue),wa=it.getParameter(he));var va=!!Zt.oes_texture_float;if(va){var ya=it.createTexture();it.bindTexture(ne,ya),it.texImage2D(ne,0,Ke,1,1,0,Ke,Mt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Nt,Ya),it.framebufferTexture2D(Nt,Mr,ne,ya,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Nt)!==Gt)va=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Mt,4);it.readPixels(0,0,1,1,Ke,Mt,bi),it.getError()?va=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(ya),va=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ye,0,Ke,3,3,0,Ke,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(le),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(G),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:cr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(se),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(Ie),maxRenderbufferSize:it.getParameter(Re),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(We),version:it.getParameter(nt),readFloat:va,npotTextureCube:si}},Er=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ir(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Er(it.data))}var _t=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Oe={shape:st,flatten:Ze};function Je(it,Zt,cr){for(var oa=0;oa<Zt;++oa)cr[oa]=it[oa]}function Ae(it,Zt,cr,oa){for(var wa=0,va=0;va<Zt;++va)for(var ya=it[va],Ya=0;Ya<cr;++Ya)oa[wa++]=ya[Ya]}function Le(it,Zt,cr,oa,wa,va){for(var ya=va,Ya=0;Ya<Zt;++Ya)for(var bi=it[Ya],yi=0;yi<cr;++yi)for(var si=bi[yi],gn=0;gn<oa;++gn)wa[ya++]=si[gn]}function Ue(it,Zt,cr,oa,wa){for(var va=1,ya=cr+1;ya<Zt.length;++ya)va*=Zt[ya];var Ya=Zt[cr];if(Zt.length-cr===4){var bi=Zt[cr+1],yi=Zt[cr+2],si=Zt[cr+3];for(ya=0;ya<Ya;++ya)Le(it[ya],bi,yi,si,oa,wa),wa+=va}else for(ya=0;ya<Ya;++ya)Ue(it[ya],Zt,cr+1,oa,wa),wa+=va}function Ze(it,Zt,cr,oa){var wa=1;if(Zt.length)for(var va=0;va<Zt.length;++va)wa*=Zt[va];else wa=0;var ya=oa||U.allocType(cr,wa);switch(Zt.length){case 0:break;case 1:Je(it,Zt[0],ya);break;case 2:Ae(it,Zt[0],Zt[1],ya);break;case 3:Le(it,Zt[0],Zt[1],Zt[2],ya,0);break;default:Ue(it,Zt,0,ya,0)}return ya}function st(it){for(var Zt=[],cr=it;cr.length;cr=cr[0])Zt.push(cr.length);return Zt}var ut={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ut=5120,Ct=5122,Pt=5124,jt=5121,fr=5123,ur=5125,sr=5126,Pr=5126,Ta={int8:Ut,int16:Ct,int32:Pt,uint8:jt,uint16:fr,uint32:ur,float:sr,float32:Pr},Oa=35048,Ia=35040,qa={dynamic:Oa,stream:Ia,static:35044},Wa=Oe.flatten,Ca=Oe.shape,hi=35044,wi=35040,Kt=5121,Dt=5126,Yt=[];Yt[5120]=1,Yt[5122]=2,Yt[5124]=4,Yt[5121]=1,Yt[5123]=2,Yt[5125]=4,Yt[5126]=4;function Jt(it){return ut[Object.prototype.toString.call(it)]|0}function Fr(it,Zt){for(var cr=0;cr<Zt.length;++cr)it[cr]=Zt[cr]}function ta(it,Zt,cr,oa,wa,va,ya){for(var Ya=0,bi=0;bi<cr;++bi)for(var yi=0;yi<oa;++yi)it[Ya++]=Zt[wa*bi+va*yi+ya]}function ra(it,Zt,cr,oa){var wa=0,va={};function ya(ea){this.id=wa++,this.buffer=it.createBuffer(),this.type=ea,this.usage=hi,this.byteLength=0,this.dimension=1,this.dtype=Kt,this.persistentData=null,cr.profile&&(this.stats={size:0})}ya.prototype.bind=function(){it.bindBuffer(this.type,this.buffer)},ya.prototype.destroy=function(){zi(this)};var Ya=[];function bi(ea,Ma){var Qa=Ya.pop();return Qa||(Qa=new ya(ea)),Qa.bind(),gn(Qa,Ma,wi,0,1,!1),Qa}function yi(ea){Ya.push(ea)}function si(ea,Ma,Qa){ea.byteLength=Ma.byteLength,it.bufferData(ea.type,Ma,Qa)}function gn(ea,Ma,Qa,di,Va,Bi){var Li;if(ea.usage=Qa,Array.isArray(Ma)){if(ea.dtype=di||Dt,Ma.length>0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua<Li.length;++Ua)Ha*=Li[Ua];ea.dimension=Ha,hn=Wa(Ma,Li,ea.dtype),si(ea,hn,Qa),Bi?ea.persistentData=hn:U.freeType(hn)}else if(typeof Ma[0]=="number"){ea.dimension=Va;var Yi=U.allocType(ea.dtype,Ma.length);Fr(Yi,Ma),si(ea,Yi,Qa),Bi?ea.persistentData=Yi:U.freeType(Yi)}else Er(Ma[0])&&(ea.dimension=Ma[0].length,ea.dtype=di||Jt(Ma[0])||Dt,hn=Wa(Ma,[Ma.length,Ma[0].length],ea.dtype),si(ea,hn,Qa),Bi?ea.persistentData=hn:U.freeType(hn))}}else if(Er(Ma))ea.dtype=di||Jt(Ma),ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma.buffer)));else if(Ir(Ma)){Li=Ma.shape;var Ri=Ma.stride,Ti=Ma.offset,xi=0,Xi=0,vn=0,Rn=0;Li.length===1?(xi=Li[0],Xi=1,vn=Ri[0],Rn=0):Li.length===2&&(xi=Li[0],Xi=Li[1],vn=Ri[0],Rn=Ri[1]),ea.dtype=di||Jt(Ma.data)||Dt,ea.dimension=Xi;var Ii=U.allocType(ea.dtype,xi*Xi);ta(Ii,Ma.data,xi,Xi,vn,Rn,Ti),si(ea,Ii,Qa),Bi?ea.persistentData=Ii:U.freeType(Ii)}else Ma instanceof ArrayBuffer&&(ea.dtype=Kt,ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma))))}function zi(ea){Zt.bufferCount--,oa(ea);var Ma=ea.buffer;it.deleteBuffer(Ma),ea.buffer=null,delete va[ea.id]}function Ei(ea,Ma,Qa,di){Zt.bufferCount++;var Va=new ya(Ma);va[Va.id]=Va;function Bi(Ha){var Ua=hi,Yi=null,Ri=0,Ti=0,xi=1;return Array.isArray(Ha)||Er(Ha)||Ir(Ha)||Ha instanceof ArrayBuffer?Yi=Ha:typeof Ha=="number"?Ri=Ha|0:Ha&&("data"in Ha&&(Yi=Ha.data),"usage"in Ha&&(Ua=qa[Ha.usage]),"type"in Ha&&(Ti=Ta[Ha.type]),"dimension"in Ha&&(xi=Ha.dimension|0),"length"in Ha&&(Ri=Ha.length|0)),Va.bind(),Yi?gn(Va,Yi,Ua,Ti,xi,di):(Ri&&it.bufferData(Va.type,Ri,Ua),Va.dtype=Ti||Kt,Va.usage=Ua,Va.dimension=xi,Va.byteLength=Ri),cr.profile&&(Va.stats.size=Va.byteLength*Yt[Va.dtype]),Bi}function Li(Ha,Ua){it.bufferSubData(Va.type,Ua,Ha)}function hn(Ha,Ua){var Yi=(Ua||0)|0,Ri;if(Va.bind(),Er(Ha)||Ha instanceof ArrayBuffer)Li(Ha,Yi);else if(Array.isArray(Ha)){if(Ha.length>0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||Er(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ir(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var En=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(En,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,cr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(va).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(va).forEach(function(Ma){ea+=va[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(va).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof ya?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},an=0,tn=1,fn=4,xt=5120,lt=5121,Br=5122,Cr=5123,xr=5124,Rr=5125,Ur=34963,Hr=35040,gt=35044;function Xt(it,Zt,cr,oa){var wa={},va=0,ya={uint8:lt,uint16:Cr};Zt.oes_element_index_uint&&(ya.uint32=Rr);function Ya(Na){this.id=va++,wa[this.id]=this,this.buffer=Na,this.primType=fn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(cr.create(null,Ur,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!Er(ea)||Ir(ea)&&!Er(ea.data))&&(hn=Zt.oes_element_index_uint?Rr:Cr),cr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||lt,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case lt:case xt:Li=lt;break;case Cr:case Br:Li=Cr;break;case Rr:case xr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=fn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=an),Yi===2&&(Ua=tn),Yi===3&&(Ua=fn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=cr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=fn,Qa.vertCount=0,Qa.type=lt;else if(typeof Va=="number")Ma(Va),Qa.primType=fn,Qa.vertCount=Va|0,Qa.type=lt;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Er(Va)||Ir(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=ya[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Rr||Yi===xr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),cr=0;cr<it.length;++cr)if(isNaN(it[cr]))Zt[cr]=65535;else if(it[cr]===1/0)Zt[cr]=31744;else if(it[cr]===-1/0)Zt[cr]=64512;else{vr[0]=it[cr];var oa=Or[0],wa=oa>>>31<<15,va=(oa<<1>>>24)-127,ya=oa>>13&1023;if(va<-24)Zt[cr]=wa;else if(va<-14){var Ya=-14-va;Zt[cr]=wa+(ya+1024>>Ya)}else va>15?Zt[cr]=wa+31744:Zt[cr]=wa+(va+15<<10)+ya}return Zt}function ma(it){return Array.isArray(it)||Er(it)}var la=34467,_a=3553,Ai=34067,ki=34069,Ki=6408,yn=6406,Ln=6407,kn=6409,Bn=6410,ao=32854,xo=32855,Co=36194,Fs=32819,Mn=32820,Ao=33635,On=34042,ts=6402,is=34041,_s=35904,Oo=35906,io=36193,Gn=33776,eo=33777,ns=33778,gs=33779,Ls=35986,Xo=35987,Gi=34798,Pn=35840,js=35841,xs=35842,Hn=35843,Os=36196,ds=5121,Xs=5123,il=5125,_n=5126,Lo=10242,bo=10243,Rs=10497,pu=33071,uo=33648,Gs=10240,vl=10241,As=9728,qs=9729,us=9984,Ss=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,Ss,su],ml=[0,kn,Bn,Ln,Ki],bs={};bs[kn]=bs[yn]=bs[ts]=1,bs[is]=bs[Bn]=2,bs[Ln]=bs[_s]=3,bs[Ki]=bs[Oo]=4;function Zs(it){return"[object "+it+"]"}var nc=Zs("HTMLCanvasElement"),Ul=Zs("OffscreenCanvas"),qu=Zs("CanvasRenderingContext2D"),fl=Zs("ImageBitmap"),xh=Zs("HTMLImageElement"),ss=Zs("HTMLVideoElement"),bh=Object.keys(ut).concat([nc,Ul,qu,fl,xh,ss]),ks=[];ks[ds]=1,ks[_n]=4,ks[io]=2,ks[Xs]=2,ks[il]=4;var to=[];to[ao]=2,to[xo]=2,to[Co]=2,to[is]=4,to[Gn]=.5,to[eo]=.5,to[ns]=1,to[gs]=1,to[Ls]=.5,to[Xo]=1,to[Gi]=1,to[Pn]=.5,to[js]=.25,to[xs]=.5,to[Hn]=.25,to[Os]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ma(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ss}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Ir(it)}function jc(it){return ut[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var cr=Zt.length;switch(it.type){case ds:case Xs:case il:case _n:var oa=U.allocType(it.type,cr);oa.set(Zt),it.data=oa;break;case io:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===io?_n:it.type,Zt)}function Gu(it,Zt){it.type===io?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,cr,oa,wa,va){for(var ya=it.width,Ya=it.height,bi=it.channels,yi=ya*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi<Ya;++zi)for(var Ei=0;Ei<ya;++Ei)for(var Na=0;Na<bi;++Na)si[gn++]=Zt[cr*Ei+oa*zi+wa*Na+va];Gu(it,si)}function oc(it,Zt,cr,oa,wa,va){var ya;if(typeof to[it]<"u"?ya=to[it]:ya=bs[it]*ks[Zt],va&&(ya*=6),wa){for(var Ya=0,bi=cr;bi>=1;)Ya+=ya*bi*bi,bi/=2;return Ya}else return ya*cr*oa}function Xc(it,Zt,cr,oa,wa,va,ya){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Rs,clamp:pu,mirror:uo},yi={nearest:As,linear:qs},si=d({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":Ss,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),gn={none:0,browser:ic},zi={uint8:ds,rgba4:Fs,rgb565:Ao,"rgb5 a1":Mn},Ei={alpha:yn,luminance:kn,"luminance alpha":Bn,rgb:Ln,rgba:Ki,rgba4:ao,"rgb5 a1":xo,rgb565:Co},Na={};Zt.ext_srgb&&(Ei.srgb=_s,Ei.srgba=Oo),Zt.oes_texture_float&&(zi.float32=zi.float=_n),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=io),Zt.webgl_depth_texture&&(d(Ei,{depth:ts,"depth stencil":is}),d(zi,{uint16:Xs,uint32:il,"depth stencil":On})),Zt.webgl_compressed_texture_s3tc&&d(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":eo,"rgba s3tc dxt3":ns,"rgba s3tc dxt5":gs}),Zt.webgl_compressed_texture_atc&&d(Na,{"rgb atc":Ls,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&d(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":js,"rgba pvrtc 4bppv1":xs,"rgba pvrtc 2bppv1":Hn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Os);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);cr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===kn||vt===yn||vt===kn||vt===Bn||vt===ts||vt===is||Zt.ext_srgb&&(vt===_s||vt===Oo)?ke[vt]=vt:vt===xo||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Ln,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ds,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,wr=ke.height,Nr=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],wr=Qe.shape[1],Qe.shape.length===3&&(Nr=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=wr=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(wr=Qe.height),"channels"in Qe&&(Nr=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=wr|0,ke.channels=Nr|0;var mt=!1;if("format"in Qe){var St=Qe.format,Ft=ke.internalformat=Ei[St];ke.format=hn[Ft],St in zi&&("type"in Qe||(ke.type=zi[St])),St in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=bs[ke.format]:pr&&!mt&&ke.channels!==ml[ke.format]&&(ke.format=ke.internalformat=ml[ke.channels])}}function Ri(ke){it.pixelStorei(Hc,ke.flipY),it.pixelStorei(lu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=wa.viewportWidth,wr=wa.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||wr-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(Er(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ds&&(ke.type=jc(vt));else if(Wc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ir(vt)){var Nr=vt.data;!Array.isArray(Nr)&&ke.type===ds&&(ke.type=jc(Nr));var pr=vt.shape,mt=vt.stride,St,Ft,rr,hr,nr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),St=pr[0],Ft=pr[1],hr=mt[0],nr=mt[1],ke.alignment=1,ke.width=St,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=ml[rr],ke.needsFree=!0,Ef(ke,Nr,hr,nr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if($l(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var or=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ma(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Vt=Oe.shape(vt),Dr=1,Jr=0;Jr<Vt.length;++Jr)Dr*=Vt[Jr];var ga=Nf(ke,Dr);Oe.flatten(vt,Vt,"",ga),Gu(ke,ga),ke.alignment=1,ke.width=or,ke.height=Wt,ke.channels=ir,ke.format=ke.internalformat=ml[ir],ke.needsFree=!0}ke.type===_n||ke.type}function Xi(ke,Qe,vt){var qt=ke.element,wr=ke.data,Nr=ke.internalformat,pr=ke.format,mt=ke.type,St=ke.width,Ft=ke.height;Ri(ke),qt?it.texImage2D(Qe,vt,pr,pr,mt,qt):ke.compressed?it.compressedTexImage2D(Qe,vt,Nr,St,Ft,0,wr):ke.needsCopy?(oa(),it.copyTexImage2D(Qe,vt,pr,ke.xOffset,ke.yOffset,St,Ft,0)):it.texImage2D(Qe,vt,pr,St,Ft,0,pr,mt,wr||null)}function vn(ke,Qe,vt,qt,wr){var Nr=ke.element,pr=ke.data,mt=ke.internalformat,St=ke.format,Ft=ke.type,rr=ke.width,hr=ke.height;Ri(ke),Nr?it.texSubImage2D(Qe,wr,vt,qt,St,Ft,Nr):ke.compressed?it.compressedTexSubImage2D(Qe,wr,vt,qt,mt,rr,hr,pr):ke.needsCopy?(oa(),it.copyTexSubImage2D(Qe,wr,vt,qt,ke.xOffset,ke.yOffset,rr,hr)):it.texSubImage2D(Qe,wr,vt,qt,rr,hr,St,Ft,pr)}var Rn=[];function Ii(){return Rn.pop()||new Ti}function nn(ke){ke.needsFree&&U.freeType(ke.data),Ti.call(ke),Rn.push(ke)}function En(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=du,this.mipmask=0,this.images=Array(16)}function Dn(ke,Qe,vt){var qt=ke.images[0]=Ii();ke.mipmask=1,qt.width=ke.width=Qe,qt.height=ke.height=vt,qt.channels=ke.channels=4}function Xn(ke,Qe){var vt=null;if(of(Qe))vt=ke.images[0]=Ii(),Ua(vt,ke),xi(vt,Qe),ke.mipmask=1;else if(Yi(ke,Qe),Array.isArray(Qe.mipmap))for(var qt=Qe.mipmap,wr=0;wr<qt.length;++wr)vt=ke.images[wr]=Ii(),Ua(vt,ke),vt.width>>=wr,vt.height>>=wr,xi(vt,qt[wr]),ke.mipmask|=1<<wr;else vt=ke.images[0]=Ii(),Ua(vt,ke),xi(vt,Qe),ke.mipmask=1;Ua(ke,ke.images[0]),ke.compressed&&(ke.internalformat===Gn||ke.internalformat===eo||ke.internalformat===ns||ke.internalformat)}function zs(ke,Qe){for(var vt=ke.images,qt=0;qt<vt.length;++qt){if(!vt[qt])return;Xi(vt[qt],Qe,qt)}}var bl=[];function ho(){var ke=bl.pop()||new En;Ha.call(ke),ke.mipmask=0;for(var Qe=0;Qe<16;++Qe)ke.images[Qe]=null;return ke}function Wl(ke){for(var Qe=ke.images,vt=0;vt<Qe.length;++vt)Qe[vt]&&nn(Qe[vt]),Qe[vt]=null;bl.push(ke)}function fs(){this.minFilter=As,this.magFilter=As,this.wrapS=pu,this.wrapT=pu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=du}function Sl(ke,Qe){if("min"in Qe){var vt=Qe.min;ke.minFilter=si[vt],nl.indexOf(ke.minFilter)>=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var wr=ke.wrapS,Nr=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;wr=bi[mt]}if("wrapT"in Qe){var St=Qe.wrapT;Nr=bi[St]}}if(ke.wrapS=wr,ke.wrapT=Nr,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=us)}}function kl(ke,Qe){it.texParameteri(Qe,vl,ke.minFilter),it.texParameteri(Qe,Gs,ke.magFilter),it.texParameteri(Qe,Lo,ke.wrapS),it.texParameteri(Qe,bo,ke.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var tu=0,Vs={},pl=cr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Zn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,ya.profile&&(this.stats={size:0})}function Cl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Po(){var ke=wl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(_a,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),wl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete Vs[ke.id],va.textureCount--}d(Zn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt<pl;++vt){var qt=wl[vt];if(qt){if(qt.bindCount>0)continue;qt.unit=-1}wl[vt]=ke,Qe=vt;break}Qe>=pl,ya.profile&&va.maxTextureUnits<Qe+1&&(va.maxTextureUnits=Qe+1),ke.unit=Qe,it.activeTexture(Ou+Qe),it.bindTexture(ke.target,ke.texture)}return Qe},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ge(this)}});function K(ke,Qe){var vt=new Zn(_a);Vs[vt.id]=vt,va.textureCount++;function qt(pr,mt){var St=vt.texInfo;fs.call(St);var Ft=ho();return typeof pr=="number"?typeof mt=="number"?Dn(Ft,pr|0,mt|0):Dn(Ft,pr|0,pr|0):pr?(Sl(St,pr),Xn(Ft,pr)):Dn(Ft,1,1),St.genMipmaps&&(Ft.mipmask=(Ft.width<<1)-1),vt.mipmask=Ft.mipmask,Ua(vt,Ft),vt.internalformat=Ft.internalformat,qt.width=Ft.width,qt.height=Ft.height,Cl(vt),zs(Ft,_a),kl(St,_a),Po(),Wl(Ft),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Ft.width,Ft.height,St.genMipmaps,!1)),qt.format=Qa[vt.internalformat],qt.type=di[vt.type],qt.mag=Va[St.magFilter],qt.min=Bi[St.minFilter],qt.wrapS=Li[St.wrapS],qt.wrapT=Li[St.wrapT],qt}function wr(pr,mt,St,Ft){var rr=mt|0,hr=St|0,nr=Ft|0,dr=Ii();return Ua(dr,vt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(vt.width>>nr)-rr,dr.height=dr.height||(vt.height>>nr)-hr,Cl(vt),vn(dr,_a,rr,hr,nr),Po(),nn(dr),qt}function Nr(pr,mt){var St=pr|0,Ft=mt|0||St;if(St===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=St,qt.height=vt.height=Ft,Cl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=St>>rr,nr=Ft>>rr;if(!hr||!nr)break;it.texImage2D(_a,rr,vt.format,hr,nr,0,vt.format,vt.type,null)}return Po(),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,St,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=wr,qt.resize=Nr,qt._reglType="texture2d",qt._texture=vt,ya.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,wr,Nr){var pr=new Zn(Ai);Vs[pr.id]=pr,va.cubeCount++;var mt=new Array(6);function St(hr,nr,dr,or,Wt,ir){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)mt[Vt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(mt[Vt],Jr,Jr)}else if(typeof hr=="object")if(nr)Xn(mt[0],hr),Xn(mt[1],nr),Xn(mt[2],dr),Xn(mt[3],or),Xn(mt[4],Wt),Xn(mt[5],ir);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(mt[Vt],pr),Xn(mt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Xn(mt[Vt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,St.width=mt[0].width,St.height=mt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)zs(mt[Vt],ki+Vt);for(kl(Dr,Ai),Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,Dr.genMipmaps,!0)),St.format=Qa[pr.internalformat],St.type=di[pr.type],St.mag=Va[Dr.magFilter],St.min=Bi[Dr.minFilter],St.wrapS=Li[Dr.wrapS],St.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(mt[Vt]);return St}function Ft(hr,nr,dr,or,Wt){var ir=dr|0,Vt=or|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,nr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),vn(Jr,ki+hr,ir,Vt,Dr),Po(),nn(Jr),St}function rr(hr){var nr=hr|0;if(nr!==pr.width){St.width=pr.width=nr,St.height=pr.height=nr,Cl(pr);for(var dr=0;dr<6;++dr)for(var or=0;pr.mipmask>>or;++or)it.texImage2D(ki+dr,or,pr.format,nr>>or,nr>>or,0,pr.format,pr.type,null);return Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,!1,!0)),St}}return St(ke,Qe,vt,qt,wr,Nr),St.subimage=Ft,St.resize=rr,St._reglType="textureCube",St._texture=pr,ya.profile&&(St.stats=pr.stats),St.destroy=function(){pr.decRef()},St}function te(){for(var ke=0;ke<pl;++ke)it.activeTexture(Ou+ke),it.bindTexture(_a,null),wl[ke]=null;_t(Vs).forEach(ge),va.cubeCount=0,va.textureCount=0}ya.profile&&(va.getTotalTextureSize=function(){var ke=0;return Object.keys(Vs).forEach(function(Qe){ke+=Vs[Qe].stats.size}),ke});function ye(){for(var ke=0;ke<pl;++ke){var Qe=wl[ke];Qe&&(Qe.bindCount=0,Qe.unit=-1,wl[ke]=null)}_t(Vs).forEach(function(vt){vt.texture=it.createTexture(),it.bindTexture(vt.target,vt.texture);for(var qt=0;qt<32;++qt)if(vt.mipmask&1<<qt)if(vt.target===_a)it.texImage2D(_a,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);kl(vt.texInfo,vt.target)})}function je(){for(var ke=0;ke<pl;++ke){var Qe=wl[ke];Qe&&(Qe.bindCount=0,Qe.unit=-1,wl[ke]=null),it.activeTexture(Ou+ke),it.bindTexture(_a,null),it.bindTexture(Ai,null)}}return{create2D:K,createCube:xe,clear:te,getTexture:function(ke){return null},restore:ye,refresh:je}}var Ql=36161,qc=32854,Sc=32855,Ys=36194,kf=33189,fh=36168,Uf=34041,Zc=35907,$f=34836,Cu=34842,jf=34843,yl=[];yl[qc]=2,yl[Sc]=2,yl[Ys]=2,yl[kf]=2,yl[fh]=1,yl[Uf]=4,yl[Zc]=4,yl[$f]=16,yl[Cu]=8,yl[jf]=6;function Lu(it,Zt,cr){return yl[it]*Zt*cr}var Mc=function(it,Zt,cr,oa,wa){var va={rgba4:qc,rgb565:Ys,"rgb5 a1":Sc,depth:kf,stencil:fh,"depth stencil":Uf};Zt.ext_srgb&&(va.srgba=Zc),Zt.ext_color_buffer_half_float&&(va.rgba16f=Cu,va.rgb16f=jf),Zt.webgl_color_buffer_float&&(va.rgba32f=$f);var ya=[];Object.keys(va).forEach(function(Ei){var Na=va[Ei];ya[Na]=Ei});var Ya=0,bi={};function yi(Ei){this.id=Ya++,this.refCount=1,this.renderbuffer=Ei,this.format=qc,this.width=0,this.height=0,wa.profile&&(this.stats={size:0})}yi.prototype.decRef=function(){--this.refCount<=0&&si(this)};function si(Ei){var Na=Ei.renderbuffer;it.bindRenderbuffer(Ql,null),it.deleteRenderbuffer(Na),Ei.renderbuffer=null,Ei.refCount=0,delete bi[Ei.id],oa.renderbufferCount--}function gn(Ei,Na){var ea=new yi(it.createRenderbuffer());bi[ea.id]=ea,oa.renderbufferCount++;function Ma(di,Va){var Bi=0,Li=0,hn=qc;if(typeof di=="object"&&di){var Ha=di;if("shape"in Ha){var Ua=Ha.shape;Bi=Ua[0]|0,Li=Ua[1]|0}else"radius"in Ha&&(Bi=Li=Ha.radius|0),"width"in Ha&&(Bi=Ha.width|0),"height"in Ha&&(Li=Ha.height|0);"format"in Ha&&(hn=va[Ha.format])}else typeof di=="number"?(Bi=di|0,typeof Va=="number"?Li=Va|0:Li=Bi):di||(Bi=Li=1);if(!(Bi===ea.width&&Li===ea.height&&hn===ea.format))return Ma.width=ea.width=Bi,Ma.height=ea.height=Li,ea.format=hn,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,hn,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ma.format=ya[ea.format],Ma}function Qa(di,Va){var Bi=di|0,Li=Va|0||Bi;return Bi===ea.width&&Li===ea.height||(Ma.width=ea.width=Bi,Ma.height=ea.height=Li,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,ea.format,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height))),Ma}return Ma(Ei,Na),Ma.resize=Qa,Ma._reglType="renderbuffer",Ma._renderbuffer=ea,wa.profile&&(Ma.stats=ea.stats),Ma.destroy=function(){ea.decRef()},Ma}wa.profile&&(oa.getTotalRenderbufferSize=function(){var Ei=0;return Object.keys(bi).forEach(function(Na){Ei+=bi[Na].stats.size}),Ei});function zi(){_t(bi).forEach(function(Ei){Ei.renderbuffer=it.createRenderbuffer(),it.bindRenderbuffer(Ql,Ei.renderbuffer),it.renderbufferStorage(Ql,Ei.format,Ei.width,Ei.height)}),it.bindRenderbuffer(Ql,null)}return{create:gn,clear:function(){_t(bi).forEach(si)},restore:zi}},ol=36160,vc=36161,yu=3553,Tu=34069,El=36064,qf=36096,Qf=36128,Bu=33306,Ec=36053,mc=36193,Lh=5121,sf=5126,vf=6407,Nu=6408,lf=[];lf[Nu]=4,lf[vf]=3;var au=[];au[Lh]=1,au[sf]=4,au[mc]=2;function Yc(it,Zt,cr,oa,wa,va){var ya={cur:null,next:null,dirty:!1,setFBO:null},Ya=["rgba"],bi=["rgba4","rgb565","rgb5 a1"];Zt.ext_srgb&&bi.push("srgba"),Zt.ext_color_buffer_half_float&&bi.push("rgba16f","rgb16f"),Zt.webgl_color_buffer_float&&bi.push("rgba32f");var yi=["uint8"];Zt.oes_texture_half_float&&yi.push("half float","float16"),Zt.oes_texture_float&&yi.push("float","float32");function si(Ti,xi,Xi){this.target=Ti,this.texture=xi,this.renderbuffer=Xi;var vn=0,Rn=0;xi?(vn=xi.width,Rn=xi.height):Xi&&(vn=Xi.width,Rn=Xi.height),this.width=vn,this.height=Rn}function gn(Ti){Ti&&(Ti.texture&&Ti.texture._texture.decRef(),Ti.renderbuffer&&Ti.renderbuffer._renderbuffer.decRef())}function zi(Ti,xi,Xi){if(Ti)if(Ti.texture){var vn=Ti.texture._texture,Rn=Math.max(1,vn.width),Ii=Math.max(1,vn.height);vn.refCount+=1}else{var nn=Ti.renderbuffer._renderbuffer;nn.refCount+=1}}function Ei(Ti,xi){xi&&(xi.texture?it.framebufferTexture2D(ol,Ti,xi.target,xi.texture._texture.texture,0):it.framebufferRenderbuffer(ol,Ti,vc,xi.renderbuffer._renderbuffer.renderbuffer))}function Na(Ti){var xi=yu,Xi=null,vn=null,Rn=Ti;typeof Ti=="object"&&(Rn=Ti.data,"target"in Ti&&(xi=Ti.target|0));var Ii=Rn._reglType;return Ii==="texture2d"||Ii==="textureCube"?Xi=Rn:Ii==="renderbuffer"&&(vn=Rn,xi=vc),new si(xi,Xi,vn)}function ea(Ti,xi,Xi,vn,Rn){if(Xi){var Ii=oa.create2D({width:Ti,height:xi,format:vn,type:Rn});return Ii._texture.refCount=0,new si(yu,Ii,null)}else{var nn=wa.create({width:Ti,height:xi,format:vn});return nn._renderbuffer.refCount=0,new si(vc,null,nn)}}function Ma(Ti){return Ti&&(Ti.texture||Ti.renderbuffer)}function Qa(Ti,xi,Xi){Ti&&(Ti.texture?Ti.texture.resize(xi,Xi):Ti.renderbuffer&&Ti.renderbuffer.resize(xi,Xi),Ti.width=xi,Ti.height=Xi)}var di=0,Va={};function Bi(){this.id=di++,Va[this.id]=this,this.framebuffer=it.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Li(Ti){Ti.colorAttachments.forEach(gn),gn(Ti.depthAttachment),gn(Ti.stencilAttachment),gn(Ti.depthStencilAttachment)}function hn(Ti){var xi=Ti.framebuffer;it.deleteFramebuffer(xi),Ti.framebuffer=null,va.framebufferCount--,delete Va[Ti.id]}function Ha(Ti){var xi;it.bindFramebuffer(ol,Ti.framebuffer);var Xi=Ti.colorAttachments;for(xi=0;xi<Xi.length;++xi)Ei(El+xi,Xi[xi]);for(xi=Xi.length;xi<cr.maxColorAttachments;++xi)it.framebufferTexture2D(ol,El+xi,yu,null,0);it.framebufferTexture2D(ol,Bu,yu,null,0),it.framebufferTexture2D(ol,qf,yu,null,0),it.framebufferTexture2D(ol,Qf,yu,null,0),Ei(qf,Ti.depthAttachment),Ei(Qf,Ti.stencilAttachment),Ei(Bu,Ti.depthStencilAttachment);var vn=it.checkFramebufferStatus(ol);it.isContextLost(),it.bindFramebuffer(ol,ya.next?ya.next.framebuffer:null),ya.cur=ya.next,it.getError()}function Ua(Ti,xi){var Xi=new Bi;va.framebufferCount++;function vn(Ii,nn){var En,Dn=0,Xn=0,zs=!0,bl=!0,ho=null,Wl=!0,fs="rgba",Sl="uint8",kl=1,tu=null,Vs=null,pl=null,wl=!1;if(typeof Ii=="number")Dn=Ii|0,Xn=nn|0||Dn;else if(!Ii)Dn=Xn=1;else{var Zn=Ii;if("shape"in Zn){var Cl=Zn.shape;Dn=Cl[0],Xn=Cl[1]}else"radius"in Zn&&(Dn=Xn=Zn.radius),"width"in Zn&&(Dn=Zn.width),"height"in Zn&&(Xn=Zn.height);("color"in Zn||"colors"in Zn)&&(ho=Zn.color||Zn.colors,Array.isArray(ho)),ho||("colorCount"in Zn&&(kl=Zn.colorCount|0),"colorTexture"in Zn&&(Wl=!!Zn.colorTexture,fs="rgba4"),"colorType"in Zn&&(Sl=Zn.colorType,Wl||(Sl==="half float"||Sl==="float16"?fs="rgba16f":(Sl==="float"||Sl==="float32")&&(fs="rgba32f"))),"colorFormat"in Zn&&(fs=Zn.colorFormat,Ya.indexOf(fs)>=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Zn||"depthStencilTexture"in Zn)&&(wl=!!(Zn.depthTexture||Zn.depthStencilTexture)),"depth"in Zn&&(typeof Zn.depth=="boolean"?zs=Zn.depth:(tu=Zn.depth,bl=!1)),"stencil"in Zn&&(typeof Zn.stencil=="boolean"?bl=Zn.stencil:(Vs=Zn.stencil,zs=!1)),"depthStencil"in Zn&&(typeof Zn.depthStencil=="boolean"?zs=bl=Zn.depthStencil:(pl=Zn.depthStencil,zs=!1,bl=!1))}var Po=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Po=ho.map(Na);else if(ho)Po=[Na(ho)];else for(Po=new Array(kl),En=0;En<kl;++En)Po[En]=ea(Dn,Xn,Wl,fs,Sl);Dn=Dn||Po[0].width,Xn=Xn||Po[0].height,tu?ge=Na(tu):zs&&!bl&&(ge=ea(Dn,Xn,wl,"depth","uint32")),Vs?K=Na(Vs):bl&&!zs&&(K=ea(Dn,Xn,!1,"stencil","uint8")),pl?xe=Na(pl):!tu&&!Vs&&bl&&zs&&(xe=ea(Dn,Xn,wl,"depth stencil","depth stencil"));var te=null;for(En=0;En<Po.length;++En)if(zi(Po[En],Dn,Xn),Po[En]&&Po[En].texture){var ye=lf[Po[En].texture._texture.format]*au[Po[En].texture._texture.type];te===null&&(te=ye)}return zi(ge,Dn,Xn),zi(K,Dn,Xn),zi(xe,Dn,Xn),Li(Xi),Xi.width=Dn,Xi.height=Xn,Xi.colorAttachments=Po,Xi.depthAttachment=ge,Xi.stencilAttachment=K,Xi.depthStencilAttachment=xe,vn.color=Po.map(Ma),vn.depth=Ma(ge),vn.stencil=Ma(K),vn.depthStencil=Ma(xe),vn.width=Xi.width,vn.height=Xi.height,Ha(Xi),vn}function Rn(Ii,nn){var En=Math.max(Ii|0,1),Dn=Math.max(nn|0||En,1);if(En===Xi.width&&Dn===Xi.height)return vn;for(var Xn=Xi.colorAttachments,zs=0;zs<Xn.length;++zs)Qa(Xn[zs],En,Dn);return Qa(Xi.depthAttachment,En,Dn),Qa(Xi.stencilAttachment,En,Dn),Qa(Xi.depthStencilAttachment,En,Dn),Xi.width=vn.width=En,Xi.height=vn.height=Dn,Ha(Xi),vn}return vn(Ti,xi),d(vn,{resize:Rn,_reglType:"framebuffer",_framebuffer:Xi,destroy:function(){hn(Xi),Li(Xi)},use:function(Ii){ya.setFBO({framebuffer:vn},Ii)}})}function Yi(Ti){var xi=Array(6);function Xi(Rn){var Ii,nn={color:null},En=0,Dn=null,Xn="rgba",zs="uint8",bl=1;if(typeof Rn=="number")En=Rn|0;else if(!Rn)En=1;else{var ho=Rn;if("shape"in ho){var Wl=ho.shape;En=Wl[0]}else"radius"in ho&&(En=ho.radius|0),"width"in ho?(En=ho.width|0,"height"in ho):"height"in ho&&(En=ho.height|0);("color"in ho||"colors"in ho)&&(Dn=ho.color||ho.colors,Array.isArray(Dn)),Dn||("colorCount"in ho&&(bl=ho.colorCount|0),"colorType"in ho&&(zs=ho.colorType),"colorFormat"in ho&&(Xn=ho.colorFormat)),"depth"in ho&&(nn.depth=ho.depth),"stencil"in ho&&(nn.stencil=ho.stencil),"depthStencil"in ho&&(nn.depthStencil=ho.depthStencil)}var fs;if(Dn)if(Array.isArray(Dn))for(fs=[],Ii=0;Ii<Dn.length;++Ii)fs[Ii]=Dn[Ii];else fs=[Dn];else{fs=Array(bl);var Sl={radius:En,format:Xn,type:zs};for(Ii=0;Ii<bl;++Ii)fs[Ii]=oa.createCube(Sl)}for(nn.color=Array(fs.length),Ii=0;Ii<fs.length;++Ii){var kl=fs[Ii];En=En||kl.width,nn.color[Ii]={target:Tu,data:fs[Ii]}}for(Ii=0;Ii<6;++Ii){for(var tu=0;tu<fs.length;++tu)nn.color[tu].target=Tu+Ii;Ii>0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return d(Xi,{width:En,height:En,color:fs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var En=Xi.color;for(Ii=0;Ii<En.length;++Ii)En[Ii].resize(nn);for(Ii=0;Ii<6;++Ii)xi[Ii].resize(nn);return Xi.width=Xi.height=nn,Xi}return Xi(Ti),d(Xi,{faces:xi,resize:vn,_reglType:"framebufferCube",destroy:function(){xi.forEach(function(Rn){Rn.destroy()})}})}function Ri(){ya.cur=null,ya.next=null,ya.dirty=!0,_t(Va).forEach(function(Ti){Ti.framebuffer=it.createFramebuffer(),Ha(Ti)})}return d(ya,{getFramebuffer:function(Ti){if(typeof Ti=="function"&&Ti._reglType==="framebuffer"){var xi=Ti._framebuffer;if(xi instanceof Bi)return xi}return null},create:Ua,createCube:Yi,clear:function(){_t(Va).forEach(hn)},restore:Ri})}var hh=5126,mf=34962,sl=34963;function _u(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=hh,this.offset=0,this.stride=0,this.divisor=0}function Pu(it,Zt,cr,oa,wa,va,ya){for(var Ya=cr.maxAttributes,bi=new Array(Ya),yi=0;yi<Ya;++yi)bi[yi]=new _u;var si=0,gn={},zi={Record:_u,scope:{},state:bi,currentVAO:null,targetVAO:null,restore:Na()?Li:function(){},createVAO:hn,getVAO:Ma,destroyBuffer:Ei,setVAO:Na()?Qa:di,clear:Na()?Va:function(){}};function Ei(Ha){for(var Ua=0;Ua<bi.length;++Ua){var Yi=bi[Ua];Yi.buffer===Ha&&(it.disableVertexAttribArray(Ua),Yi.buffer=null)}}function Na(){return Zt.oes_vertex_array_object}function ea(){return Zt.angle_instanced_arrays}function Ma(Ha){return typeof Ha=="function"&&Ha._vao?Ha._vao:null}function Qa(Ha){if(Ha!==zi.currentVAO){var Ua=Na();Ha?Ua.bindVertexArrayOES(Ha.vao):Ua.bindVertexArrayOES(null),zi.currentVAO=Ha}}function di(Ha){if(Ha!==zi.currentVAO){if(Ha)Ha.bindAttrs();else{for(var Ua=ea(),Yi=0;Yi<bi.length;++Yi){var Ri=bi[Yi];Ri.buffer?(it.enableVertexAttribArray(Yi),Ri.buffer.bind(),it.vertexAttribPointer(Yi,Ri.size,Ri.type,Ri.normalized,Ri.stride,Ri.offfset),Ua&&Ri.divisor&&Ua.vertexAttribDivisorANGLE(Yi,Ri.divisor)):(it.disableVertexAttribArray(Yi),it.vertexAttrib4f(Yi,Ri.x,Ri.y,Ri.z,Ri.w))}ya.elements?it.bindBuffer(sl,ya.elements.buffer.buffer):it.bindBuffer(sl,null)}zi.currentVAO=Ha}}function Va(){_t(gn).forEach(function(Ha){Ha.destroy()})}function Bi(){this.id=++si,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ha=Na();Ha?this.vao=Ha.createVertexArrayOES():this.vao=null,gn[this.id]=this,this.buffers=[]}Bi.prototype.bindAttrs=function(){for(var Ha=ea(),Ua=this.attributes,Yi=0;Yi<Ua.length;++Yi){var Ri=Ua[Yi];Ri.buffer?(it.enableVertexAttribArray(Yi),it.bindBuffer(mf,Ri.buffer.buffer),it.vertexAttribPointer(Yi,Ri.size,Ri.type,Ri.normalized,Ri.stride,Ri.offset),Ha&&Ri.divisor&&Ha.vertexAttribDivisorANGLE(Yi,Ri.divisor)):(it.disableVertexAttribArray(Yi),it.vertexAttrib4f(Yi,Ri.x,Ri.y,Ri.z,Ri.w))}for(var Ti=Ua.length;Ti<Ya;++Ti)it.disableVertexAttribArray(Ti);var xi=va.getElements(this.elements);xi?it.bindBuffer(sl,xi.buffer.buffer):it.bindBuffer(sl,null)},Bi.prototype.refresh=function(){var Ha=Na();Ha&&(Ha.bindVertexArrayOES(this.vao),this.bindAttrs(),zi.currentVAO=null,Ha.bindVertexArrayOES(null))},Bi.prototype.destroy=function(){if(this.vao){var Ha=Na();this===zi.currentVAO&&(zi.currentVAO=null,Ha.bindVertexArrayOES(null)),Ha.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),gn[this.id]&&(delete gn[this.id],oa.vaoCount-=1)};function Li(){var Ha=Na();Ha&&_t(gn).forEach(function(Ua){Ua.refresh()})}function hn(Ha){var Ua=new Bi;oa.vaoCount+=1;function Yi(Ri){var Ti;if(Array.isArray(Ri))Ti=Ri,Ua.elements&&Ua.ownsElements&&Ua.elements.destroy(),Ua.elements=null,Ua.ownsElements=!1,Ua.offset=0,Ua.count=0,Ua.instances=-1,Ua.primitive=4;else{if(Ri.elements){var xi=Ri.elements;Ua.ownsElements?typeof xi=="function"&&xi._reglType==="elements"?(Ua.elements.destroy(),Ua.ownsElements=!1):(Ua.elements(xi),Ua.ownsElements=!1):va.getElements(Ri.elements)?(Ua.elements=Ri.elements,Ua.ownsElements=!1):(Ua.elements=va.create(Ri.elements),Ua.ownsElements=!0)}else Ua.elements=null,Ua.ownsElements=!1;Ti=Ri.attributes,Ua.offset=0,Ua.count=-1,Ua.instances=-1,Ua.primitive=4,Ua.elements&&(Ua.count=Ua.elements._elements.vertCount,Ua.primitive=Ua.elements._elements.primType),"offset"in Ri&&(Ua.offset=Ri.offset|0),"count"in Ri&&(Ua.count=Ri.count|0),"instances"in Ri&&(Ua.instances=Ri.instances|0),"primitive"in Ri&&(Ua.primitive=Ra[Ri.primitive])}var Xi={},vn=Ua.attributes;vn.length=Ti.length;for(var Rn=0;Rn<Ti.length;++Rn){var Ii=Ti[Rn],nn=vn[Rn]=new _u,En=Ii.data||Ii;if(Array.isArray(En)||Er(En)||Ir(En)){var Dn;Ua.buffers[Rn]&&(Dn=Ua.buffers[Rn],Er(En)&&Dn._buffer.byteLength>=En.byteLength?Dn.subdata(En):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=wa.create(Ii,mf,!1,!0)),nn.buffer=wa.getBuffer(Dn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Xi[Rn]=1}else wa.getBuffer(Ii)?(nn.buffer=wa.getBuffer(Ii),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):wa.getBuffer(Ii.buffer)?(nn.buffer=wa.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=Ta[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Xn=0;Xn<Ua.buffers.length;++Xn)!Xi[Xn]&&Ua.buffers[Xn]&&(Ua.buffers[Xn].destroy(),Ua.buffers[Xn]=null);return Ua.refresh(),Yi}return Yi.destroy=function(){for(var Ri=0;Ri<Ua.buffers.length;++Ri)Ua.buffers[Ri]&&Ua.buffers[Ri].destroy();Ua.buffers.length=0,Ua.ownsElements&&(Ua.elements.destroy(),Ua.elements=null,Ua.ownsElements=!1),Ua.destroy()},Yi._vao=Ua,Yi._reglType="vao",Yi(Ha)}return zi}var Cf=35632,hl=35633,uf=35718,kc=35721;function Hu(it,Zt,cr,oa){var wa={},va={};function ya(ea,Ma,Qa,di){this.name=ea,this.id=Ma,this.location=Qa,this.info=di}function Ya(ea,Ma){for(var Qa=0;Qa<ea.length;++Qa)if(ea[Qa].id===Ma.id){ea[Qa].location=Ma.location;return}ea.push(Ma)}function bi(ea,Ma,Qa){var di=ea===Cf?wa:va,Va=di[Ma];if(!Va){var Bi=Zt.str(Ma);Va=it.createShader(ea),it.shaderSource(Va,Bi),it.compileShader(Va),di[Ma]=Va}return Va}var yi={},si=[],gn=0;function zi(ea,Ma){this.id=gn++,this.fragId=ea,this.vertId=Ma,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,oa.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Ei(ea,Ma,Qa){var di,Va,Bi=bi(Cf,ea.fragId),Li=bi(hl,ea.vertId),hn=ea.program=it.createProgram();if(it.attachShader(hn,Bi),it.attachShader(hn,Li),Qa)for(di=0;di<Qa.length;++di){var Ha=Qa[di];it.bindAttribLocation(hn,Ha[0],Ha[1])}it.linkProgram(hn);var Ua=it.getProgramParameter(hn,uf);oa.profile&&(ea.stats.uniformsCount=Ua);var Yi=ea.uniforms;for(di=0;di<Ua;++di)if(Va=it.getActiveUniform(hn,di),Va)if(Va.size>1)for(var Ri=0;Ri<Va.size;++Ri){var Ti=Va.name.replace("[0]","["+Ri+"]");Ya(Yi,new ya(Ti,Zt.id(Ti),it.getUniformLocation(hn,Ti),Va))}else Ya(Yi,new ya(Va.name,Zt.id(Va.name),it.getUniformLocation(hn,Va.name),Va));var xi=it.getProgramParameter(hn,kc);oa.profile&&(ea.stats.attributesCount=xi);var Xi=ea.attributes;for(di=0;di<xi;++di)Va=it.getActiveAttrib(hn,di),Va&&Ya(Xi,new ya(Va.name,Zt.id(Va.name),it.getAttribLocation(hn,Va.name),Va))}oa.profile&&(cr.getMaxUniformsCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.uniformsCount>ea&&(ea=Ma.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},va={};for(var ea=0;ea<si.length;++ea)Ei(si[ea],null,si[ea].attributes.map(function(Ma){return[Ma.location,Ma.name]}))}return{clear:function(){var ea=it.deleteShader.bind(it);_t(wa).forEach(ea),wa={},_t(va).forEach(ea),va={},si.forEach(function(Ma){it.deleteProgram(Ma.program)}),si.length=0,yi={},cr.shaderCount=0},program:function(ea,Ma,Qa,di){var Va=yi[Ma];Va||(Va=yi[Ma]={});var Bi=Va[ea];if(Bi&&(Bi.refCount++,!di))return Bi;var Li=new zi(Ma,ea);return cr.shaderCount++,Ei(Li,Qa,di),Bi||(Va[ea]=Li),si.push(Li),d(Li,{destroy:function(){if(Li.refCount--,Li.refCount<=0){it.deleteProgram(Li.program);var hn=si.indexOf(Li);si.splice(hn,1),cr.shaderCount--}Va[Li.vertId].refCount<=0&&(it.deleteShader(va[Li.vertId]),delete va[Li.vertId],delete yi[Li.fragId][Li.vertId]),Object.keys(yi[Li.fragId]).length||(it.deleteShader(wa[Li.fragId]),delete wa[Li.fragId],delete yi[Li.fragId])}})},restore:Na,shader:bi,frag:-1,vert:-1}}var gf=6408,Wu=5121,Kc=3333,Lf=5126;function iu(it,Zt,cr,oa,wa,va,ya){function Ya(si){var gn;Zt.next===null?gn=Wu:gn=Zt.next.colorAttachments[0].texture._texture.type;var zi=0,Ei=0,Na=oa.framebufferWidth,ea=oa.framebufferHeight,Ma=null;Er(si)?Ma=si:si&&(zi=si.x|0,Ei=si.y|0,Na=(si.width||oa.framebufferWidth-zi)|0,ea=(si.height||oa.framebufferHeight-Ei)|0,Ma=si.data||null),cr();var Qa=Na*ea*4;return Ma||(gn===Wu?Ma=new Uint8Array(Qa):gn===Lf&&(Ma=Ma||new Float32Array(Qa))),it.pixelStorei(Kc,4),it.readPixels(zi,Ei,Na,ea,gf,gn,Ma),Ma}function bi(si){var gn;return Zt.setFBO({framebuffer:si.framebuffer},function(){gn=Ya(si)}),gn}function yi(si){return!si||!("framebuffer"in si)?Ya(si):bi(si)}return yi}var Vf=0,Xu="";function Cc(it){return xu(gc(sc(it)))}function gc(it){return Qt(Pi(Pc(it),it.length*8))}function ql(it,Zt){var cr=Pc(it);cr.length>16&&(cr=Pi(cr,it.length*8));for(var oa=Array(16),wa=Array(16),va=0;va<16;va++)oa[va]=cr[va]^909522486,wa[va]=cr[va]^1549556828;var ya=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(ya),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",cr="",oa,wa=0;wa<it.length;wa++)oa=it.charCodeAt(wa),cr+=Zt.charAt(oa>>>4&15)+Zt.charAt(oa&15);return cr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",oa=it.length,wa=0;wa<oa;wa+=3)for(var va=it.charCodeAt(wa)<<16|(wa+1<oa?it.charCodeAt(wa+1)<<8:0)|(wa+2<oa?it.charCodeAt(wa+2):0),ya=0;ya<4;ya++)wa*8+ya*6>it.length*8?cr+=Xu:cr+=Zt.charAt(va>>>6*(3-ya)&63);return cr}function Jc(it,Zt){var cr=Zt.length,oa=Array(),wa,va,ya,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa<bi.length;wa++)bi[wa]=it.charCodeAt(wa*2)<<8|it.charCodeAt(wa*2+1);for(;bi.length>0;){for(Ya=Array(),ya=0,wa=0;wa<bi.length;wa++)ya=(ya<<16)+bi[wa],va=Math.floor(ya/cr),ya-=va*cr,(Ya.length>0||va>0)&&(Ya[Ya.length]=va);oa[oa.length]=ya,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa<si;wa++)yi=Zt[0]+yi;return yi}function sc(it){for(var Zt="",cr=-1,oa,wa;++cr<it.length;)oa=it.charCodeAt(cr),wa=cr+1<it.length?it.charCodeAt(cr+1):0,55296<=oa&&oa<=56319&&56320<=wa&&wa<=57343&&(oa=65536+((oa&1023)<<10)+(wa&1023),cr++),oa<=127?Zt+=String.fromCharCode(oa):oa<=2047?Zt+=String.fromCharCode(192|oa>>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),cr=0;cr<Zt.length;cr++)Zt[cr]=0;for(var cr=0;cr<it.length*8;cr+=8)Zt[cr>>5]|=(it.charCodeAt(cr/8)&255)<<24-cr%32;return Zt}function Qt(it){for(var Zt="",cr=0;cr<it.length*32;cr+=8)Zt+=String.fromCharCode(it[cr>>5]>>>24-cr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,cr){return it&Zt^~it&cr}function ka(it,Zt,cr){return it&Zt^it&cr^Zt&cr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var pn=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 Pi(it,Zt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi<it.length;zi+=16){for(wa=cr[0],va=cr[1],ya=cr[2],Ya=cr[3],bi=cr[4],yi=cr[5],si=cr[6],gn=cr[7],Ei=0;Ei<64;Ei++)Ei<16?oa[Ei]=it[Ei+zi]:oa[Ei]=Di(Di(Di(Qi(oa[Ei-2]),oa[Ei-7]),Hi(oa[Ei-15])),oa[Ei-16]),Na=Di(Di(Di(Di(gn,Ci(bi)),$r(bi,yi,si)),pn[Ei]),oa[Ei]),ea=Di(li(wa),ka(wa,va,ya)),gn=si,si=yi,yi=bi,bi=Di(Ya,Na),Ya=ya,ya=va,va=wa,wa=Di(Na,ea);cr[0]=Di(wa,cr[0]),cr[1]=Di(va,cr[1]),cr[2]=Di(ya,cr[2]),cr[3]=Di(Ya,cr[3]),cr[4]=Di(bi,cr[4]),cr[5]=Di(yi,cr[5]),cr[6]=Di(si,cr[6]),cr[7]=Di(gn,cr[7])}return cr}function Di(it,Zt){var cr=(it&65535)+(Zt&65535),oa=(it>>16)+(Zt>>16)+(cr>>16);return oa<<16|cr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Zt=it&&it.cache,cr=0,oa=[],wa=[],va=[];function ya(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa<wa.length;++Qa)if(wa[Qa]===Na&&!va[Qa])return oa[Qa]}var di="g"+cr++;return oa.push(di),wa.push(Na),va.push(Ma),di}function Ya(){var Na=[];function ea(){Na.push.apply(Na,Ni(arguments))}var Ma=[];function Qa(){var di="v"+cr++;return Ma.push(di),arguments.length>0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return d(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return d(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return d(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di<ea;++di)Qa();var Va=bi(),Bi=Va.toString,Li=gn[Na]=d(Va,{arg:Qa,toString:function(){return mi(["function(",Ma.join(),"){",Bi(),"}"])}});return Li}function Ei(){var Na=['"use strict";',si,"return {"];Object.keys(gn).forEach(function(di){Na.push('"',di,'":',gn[di].toString(),",")}),Na.push("}");var ea=mi(Na).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Ma;if(Zt&&(Ma=Cc(ea),Zt[Ma]))return Zt[Ma].apply(null,wa);var Qa=Function.apply(null,oa.concat(ea));return Zt&&(Zt[Ma]=Qa),Qa.apply(null,wa)}return{global:si,link:ya,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var $n="xyzw".split(""),no=5121,Qn=1,co=2,Tn=0,un=1,go=2,Ko=3,Ms=4,rl=5,Ns=6,el="dither",ws="blend.enable",Fl="blend.color",_l="blend.equation",ll="blend.func",jn="depth.enable",Io="depth.func",Js="depth.range",Ds="depth.mask",uu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",zo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Fe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Ar="count",Kr="offset",na="instances",Ve="vao",$e="Width",ot="Height",pt=ht+$e,Et=ht+ot,bt=Me+$e,Rt=Me+ot,lr="drawingBuffer",yr=lr+$e,kr=lr+ot,jr=[ll,_l,Yu,Fe,I,zo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,An=32823,Yn=32926,Nn=32928,wo=5126,os=35664,So=35665,Zo=35666,hs=5124,ul=35667,tl=35668,Jo=35669,$o=35670,Il=35671,eu=35672,Ru=35673,vu=35674,Tl=35675,cu=35676,uc=35678,Vl=35680,Gl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,xa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||Er(it)||Ir(it)}function ni(it){return it.sort(function(Zt,cr){return Zt===Me?-1:cr===Me?1:Zt<cr?-1:1})}function La(it,Zt,cr,oa){this.thisDep=it,this.contextDep=Zt,this.propDep=cr,this.append=oa}function sn(it){return it&&!(it.thisDep||it.contextDep||it.propDep)}function rn(it){return new La(!1,!1,!1,it)}function dn(it,Zt){var cr=it.type;if(cr===Tn){var oa=it.data.length;return new La(!0,oa>=1,oa>=2,Zt)}else if(cr===Ms){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(cr===rl)return new La(!1,!1,!1,Zt);if(cr===Ns){for(var va=!1,ya=!1,Ya=!1,bi=0;bi<it.data.length;++bi){var yi=it.data[bi];if(yi.type===un)Ya=!0;else if(yi.type===go)ya=!0;else if(yi.type===Ko)va=!0;else if(yi.type===Tn){va=!0;var si=yi.data;si>=1&&(ya=!0),si>=2&&(Ya=!0)}else yi.type===Ms&&(va=va||yi.data.thisDep,ya=ya||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(va,ya,Ya,Zt)}else return new La(cr===Ko,cr===go,cr===un,Zt)}}var In=new La(!1,!1,!1,function(){});function Kn(it,Zt,cr,oa,wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=cr.angle_instanced_arrays,Va=cr.webgl_draw_buffers,Bi=cr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=St}function xi(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=St}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(ws,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(jn,ji,!0),xi(Io,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Ds,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Yn),Ti(fo,Nn),xi(zo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Fe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Zt,next:hn,current:Li,draw:gn,elements:va,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:cr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:Ta,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=p(oa.maxDrawbuffers,function(mt){return mt===0?[0]:p(mt,function(St){return Ja+St})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),St=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=St(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var nr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(nr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var or=mt.constants={};Object.keys(Rn).forEach(function(ir){or[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Vt){switch(Vt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(St(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return ir.def(hr.props,Vt.data);case go:return ir.def(hr.context,Vt.data);case Ko:return ir.def("this",Vt.data);case Ms:return Vt.data.append(mt,ir),Vt.data.ref;case rl:return Vt.data.toString();case Ns:return Vt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Vt=Zt.id(ir);if(Vt in Wt)return Wt[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Wt[Vt]=St(Dr);return Jr},mt}function En(mt){var St=mt.static,Ft=mt.dynamic,rr;if(ze in St){var hr=!!St[ze];rr=rn(function(dr,or){return hr}),rr.enable=hr}else if(ze in Ft){var nr=Ft[ze];rr=dn(nr,function(dr,or){return dr.invoke(or,nr)})}return rr}function Dn(mt,St){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,or){var Wt=dr.link(hr),ir=dr.shared;or.set(ir.framebuffer,".next",Wt);var Vt=ir.context;return or.set(Vt,"."+pt,Wt+".width"),or.set(Vt,"."+Et,Wt+".height"),Wt})):rn(function(dr,or){var Wt=dr.shared;or.set(Wt.framebuffer,".next","null");var ir=Wt.context;return or.set(ir,"."+pt,ir+"."+yr),or.set(ir,"."+Et,ir+"."+kr),"null"})}else if(ht in rr){var nr=rr[ht];return dn(nr,function(dr,or){var Wt=dr.invoke(or,nr),ir=dr.shared,Vt=ir.framebuffer,Dr=or.def(Vt,".getFramebuffer(",Wt,")");or.set(Vt,".next",Dr);var Jr=ir.context;return or.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),or.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+kr),Dr})}else return null}function Xn(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Wt){if(Wt in rr){var ir=rr[Wt],Vt=!0,Dr=ir.x|0,Jr=ir.y|0,ga,vi;return"width"in ir?ga=ir.width|0:Vt=!1,"height"in ir?vi=ir.height|0:Vt=!1,new La(!Vt&&St&&St.thisDep,!Vt&&St&&St.contextDep,!Vt&&St&&St.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),cn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),yo=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,cn,yo]});return St&&(ai.thisDep=ai.thisDep||St.thisDep,ai.contextDep=ai.contextDep||St.contextDep,ai.propDep=ai.propDep||St.propDep),ai}else return St?new La(St.thisDep,St.contextDep,St.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=nr(Me);if(dr){var or=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Vt=or.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Vt[2]),ir.set(Dr,"."+Rt,Vt[3]),Vt})}return{viewport:dr,scissor_box:nr(Te)}}function zs(mt,St){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(St.dynamic).length>0)return null;var hr=St.static,nr=Object.keys(hr);if(nr.length>0&&typeof hr[nr[0]]=="number"){for(var dr=[],or=0;or<nr.length;++or)dr.push([hr[nr[or]]|0,nr[or]]);return dr}}return null}function bl(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Vt){if(Vt in rr){var Dr=Zt.id(rr[Vt]),Jr=rn(function(){return Dr});return Jr.id=Dr,Jr}else if(Vt in hr){var ga=hr[Vt];return dn(ga,function(vi,Ga){var ai=vi.invoke(Ga,ga),Zi=Ga.def(vi.shared.strings,".id(",ai,")");return Zi})}return null}var dr=nr(Ot),or=nr(wt),Wt=null,ir;return sn(dr)&&sn(or)?(Wt=si.program(or.id,dr.id,null,Ft),ir=rn(function(Vt,Dr){return Vt.link(Wt)})):ir=new La(dr&&dr.thisDep||or&&or.thisDep,dr&&dr.contextDep||or&&or.contextDep,dr&&dr.propDep||or&&or.propDep,function(Vt,Dr){var Jr=Vt.shared.shader,ga;dr?ga=dr.append(Vt,Dr):ga=Dr.def(Jr,".",Ot);var vi;or?vi=or.append(Vt,Dr):vi=Dr.def(Jr,".",wt);var Ga=Jr+".program("+vi+","+ga;return Dr.def(Ga+")")}),{frag:dr,vert:or,progVar:ir,program:Wt}}function ho(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={},nr=!1;function dr(){if(Ve in Ft){var Fi=Ft[Ve];return Fi!==null&&yi.getVAO(Fi)===null&&(Fi=yi.createVAO(Fi)),nr=!0,hr.vao=Fi,rn(function(_i){var Si=yi.getVAO(Fi);return Si?_i.link(Si):"null"})}else if(Ve in rr){nr=!0;var ui=rr[Ve];return dn(ui,function(_i,Si){var Ui=_i.invoke(Si,ui);return Si.def(_i.shared.vao+".getVAO("+Ui+")")})}return null}var or=dr(),Wt=!1;function ir(){if($t in Ft){var Fi=Ft[$t];if(hr.elements=Fi,fi(Fi)){var ui=hr.elements=va.create(Fi,!0);Fi=va.getElements(ui),Wt=!0}else Fi&&(Fi=va.getElements(Fi),Wt=!0);var _i=rn(function(Ui,cn){if(Fi){var yo=Ui.link(Fi);return Ui.ELEMENTS=yo,yo}return Ui.ELEMENTS=null,null});return _i.value=Fi,_i}else if($t in rr){Wt=!0;var Si=rr[$t];return dn(Si,function(Ui,cn){var yo=Ui.shared,Uo=yo.isBufferArgs,Is=yo.elements,Fo=Ui.invoke(cn,Si),Es=cn.def("null"),Ks=cn.def(Uo,"(",Fo,")"),mu=Ui.cond(Ks).then(Es,"=",Is,".createStream(",Fo,");").else(Es,"=",Is,".getElements(",Fo,");");return cn.entry(mu),cn.exit(Ui.cond(Ks).then(Is,".destroyStream(",Es,");")),Ui.ELEMENTS=Es,Es})}else if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.elements+".getElements("+Ui.shared.vao+".currentVAO.elements):null")});return null}var Vt=ir();function Dr(){if(Tr in Ft){var Fi=Ft[Tr];return hr.primitive=Fi,rn(function(_i,Si){return Ra[Fi]})}else if(Tr in rr){var ui=rr[Tr];return dn(ui,function(_i,Si){var Ui=_i.constants.primTypes,cn=_i.invoke(Si,ui);return Si.def(Ui,"[",cn,"]")})}else{if(Wt)return sn(Vt)?Vt.value?rn(function(_i,Si){return Si.def(_i.ELEMENTS,".primType")}):rn(function(){return Gl}):new La(Vt.thisDep,Vt.contextDep,Vt.propDep,function(_i,Si){var Ui=_i.ELEMENTS;return Si.def(Ui,"?",Ui,".primType:",Gl)});if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(_i,Si){return Si.def(_i.shared.vao+".currentVAO?"+_i.shared.vao+".currentVAO.primitive:"+Gl)})}return null}function Jr(Fi,ui){if(Fi in Ft){var _i=Ft[Fi]|0;return ui?hr.offset=_i:hr.instances=_i,rn(function(Ui,cn){return ui&&(Ui.OFFSET=_i),_i})}else if(Fi in rr){var Si=rr[Fi];return dn(Si,function(Ui,cn){var yo=Ui.invoke(cn,Si);return ui&&(Ui.OFFSET=yo),yo})}else if(ui){if(Wt)return rn(function(Ui,cn){return Ui.OFFSET=0,0});if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.offset:0")})}else if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.instances:-1")});return null}var ga=Jr(Kr,!0);function vi(){if(Ar in Ft){var Fi=Ft[Ar]|0;return hr.count=Fi,rn(function(){return Fi})}else if(Ar in rr){var ui=rr[Ar];return dn(ui,function(cn,yo){var Uo=cn.invoke(yo,ui);return Uo})}else if(Wt)if(sn(Vt)){if(Vt)return ga?new La(ga.thisDep,ga.contextDep,ga.propDep,function(cn,yo){var Uo=yo.def(cn.ELEMENTS,".vertCount-",cn.OFFSET);return Uo}):rn(function(cn,yo){return yo.def(cn.ELEMENTS,".vertCount")});var _i=rn(function(){return-1});return _i}else{var Si=new La(Vt.thisDep||ga.thisDep,Vt.contextDep||ga.contextDep,Vt.propDep||ga.propDep,function(cn,yo){var Uo=cn.ELEMENTS;return cn.OFFSET?yo.def(Uo,"?",Uo,".vertCount-",cn.OFFSET,":-1"):yo.def(Uo,"?",Uo,".vertCount:-1")});return Si}else if(nr){var Ui=new La(or.thisDep,or.contextDep,or.propDep,function(cn,yo){return yo.def(cn.shared.vao,".currentVAO?",cn.shared.vao,".currentVAO.count:-1")});return Ui}return null}var Ga=Dr(),ai=vi(),Zi=Jr(na,!1);return{elements:Vt,primitive:Ga,count:ai,instances:Zi,offset:ga,vao:or,vaoActive:nr,elementsActive:Wt,static:hr}}function Wl(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Ha.forEach(function(nr){var dr=Ri(nr);function or(Wt,ir){if(nr in Ft){var Vt=Wt(Ft[nr]);hr[dr]=rn(function(){return Vt})}else if(nr in rr){var Dr=rr[nr];hr[dr]=dn(Dr,function(Jr,ga){return ir(Jr,ga,Jr.invoke(ga,Dr))})}}switch(nr){case Iu:case ws:case el:case Dc:case jn:case ie:case Rc:case yc:case fo:case Ds:return or(function(Wt){return Wt},function(Wt,ir,Vt){return Vt});case Io:return or(function(Wt){return Sa[Wt]},function(Wt,ir,Vt){var Dr=Wt.constants.compareFuncs;return ir.def(Dr,"[",Vt,"]")});case Js:return or(function(Wt){return Wt},function(Wt,ir,Vt){var Dr=ir.def("+",Vt,"[0]"),Jr=ir.def("+",Vt,"[1]");return[Dr,Jr]});case ll:return or(function(Wt){var ir="srcRGB"in Wt?Wt.srcRGB:Wt.src,Vt="srcAlpha"in Wt?Wt.srcAlpha:Wt.src,Dr="dstRGB"in Wt?Wt.dstRGB:Wt.dst,Jr="dstAlpha"in Wt?Wt.dstAlpha:Wt.dst;return[ti[ir],ti[Dr],ti[Vt],ti[Jr]]},function(Wt,ir,Vt){var Dr=Wt.constants.blendFuncs;function Jr(ui,_i){var Si=ir.def('"',ui,_i,'" in ',Vt,"?",Vt,".",ui,_i,":",Vt,".",ui);return Si}var ga=Jr("src","RGB"),vi=Jr("dst","RGB"),Ga=ir.def(Dr,"[",ga,"]"),ai=ir.def(Dr,"[",Jr("src","Alpha"),"]"),Zi=ir.def(Dr,"[",vi,"]"),Fi=ir.def(Dr,"[",Jr("dst","Alpha"),"]");return[Ga,Zi,ai,Fi]});case _l:return or(function(Wt){if(typeof Wt=="string")return[Qa[Wt],Qa[Wt]];if(typeof Wt=="object")return[Qa[Wt.rgb],Qa[Wt.alpha]]},function(Wt,ir,Vt){var Dr=Wt.constants.blendEquations,Jr=ir.def(),ga=ir.def(),vi=Wt.cond("typeof ",Vt,'==="string"');return vi.then(Jr,"=",ga,"=",Dr,"[",Vt,"];"),vi.else(Jr,"=",Dr,"[",Vt,".rgb];",ga,"=",Dr,"[",Vt,".alpha];"),ir(vi),[Jr,ga]});case Fl:return or(function(Wt){return p(4,function(ir){return+Wt[ir]})},function(Wt,ir,Vt){return p(4,function(Dr){return ir.def("+",Vt,"[",Dr,"]")})});case lc:return or(function(Wt){return Wt|0},function(Wt,ir,Vt){return ir.def(Vt,"|0")});case Yu:return or(function(Wt){var ir=Wt.cmp||"keep",Vt=Wt.ref||0,Dr="mask"in Wt?Wt.mask:-1;return[Sa[ir],Vt,Dr]},function(Wt,ir,Vt){var Dr=Wt.constants.compareFuncs,Jr=ir.def('"cmp" in ',Vt,"?",Dr,"[",Vt,".cmp]",":",zt),ga=ir.def(Vt,".ref|0"),vi=ir.def('"mask" in ',Vt,"?",Vt,".mask|0:-1");return[Jr,ga,vi]});case Fe:case I:return or(function(Wt){var ir=Wt.fail||"keep",Vt=Wt.zfail||"keep",Dr=Wt.zpass||"keep";return[nr===I?De:me,za[ir],za[Vt],za[Dr]]},function(Wt,ir,Vt){var Dr=Wt.constants.stencilOps;function Jr(ga){return ir.def('"',ga,'" in ',Vt,"?",Dr,"[",Vt,".",ga,"]:",zt)}return[nr===I?De:me,Jr("fail"),Jr("zfail"),Jr("zpass")]});case Au:return or(function(Wt){var ir=Wt.factor|0,Vt=Wt.units|0;return[ir,Vt]},function(Wt,ir,Vt){var Dr=ir.def(Vt,".factor|0"),Jr=ir.def(Vt,".units|0");return[Dr,Jr]});case Zu:return or(function(Wt){var ir=0;return Wt==="front"?ir=me:Wt==="back"&&(ir=De),ir},function(Wt,ir,Vt){return ir.def(Vt,'==="front"?',me,":",De)});case bu:return or(function(Wt){return Wt},function(Wt,ir,Vt){return Vt});case Ic:return or(function(Wt){return Xa[Wt]},function(Wt,ir,Vt){return ir.def(Vt+'==="cw"?'+et+":"+dt)});case uu:return or(function(Wt){return Wt.map(function(ir){return!!ir})},function(Wt,ir,Vt){return p(4,function(Dr){return"!!"+Vt+"["+Dr+"]"})});case zo:return or(function(Wt){var ir="value"in Wt?Wt.value:1,Vt=!!Wt.invert;return[ir,Vt]},function(Wt,ir,Vt){var Dr=ir.def('"value" in ',Vt,"?+",Vt,".value:1"),Jr=ir.def("!!",Vt,".invert");return[Dr,Jr]})}}),hr}function fs(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Object.keys(Ft).forEach(function(nr){var dr=Ft[nr],or;if(typeof dr=="number"||typeof dr=="boolean")or=rn(function(){return dr});else if(typeof dr=="function"){var Wt=dr._reglType;Wt==="texture2d"||Wt==="textureCube"?or=rn(function(ir){return ir.link(dr)}):(Wt==="framebuffer"||Wt==="framebufferCube")&&(or=rn(function(ir){return ir.link(dr.color[0])}))}else ma(dr)&&(or=rn(function(ir){var Vt=ir.global.def("[",p(dr.length,function(Dr){return dr[Dr]}),"]");return Vt}));or.value=dr,hr[nr]=or}),Object.keys(rr).forEach(function(nr){var dr=rr[nr];hr[nr]=dn(dr,function(or,Wt){return or.invoke(Wt,dr)})}),hr}function Sl(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Object.keys(Ft).forEach(function(nr){var dr=Ft[nr],or=Zt.id(nr),Wt=new Ma;if(fi(dr))Wt.state=Qn,Wt.buffer=wa.getBuffer(wa.create(dr,Qr,!1,!0)),Wt.type=0;else{var ir=wa.getBuffer(dr);if(ir)Wt.state=Qn,Wt.buffer=ir,Wt.type=0;else if("constant"in dr){var Vt=dr.constant;Wt.buffer="null",Wt.state=co,typeof Vt=="number"?Wt.x=Vt:$n.forEach(function(Zi,Fi){Fi<Vt.length&&(Wt[Zi]=Vt[Fi])})}else{fi(dr.buffer)?ir=wa.getBuffer(wa.create(dr.buffer,Qr,!1,!0)):ir=wa.getBuffer(dr.buffer);var Dr=dr.offset|0,Jr=dr.stride|0,ga=dr.size|0,vi=!!dr.normalized,Ga=0;"type"in dr&&(Ga=Ta[dr.type]);var ai=dr.divisor|0;Wt.buffer=ir,Wt.state=Qn,Wt.size=ga,Wt.normalized=vi,Wt.type=Ga||ir.dtype,Wt.offset=Dr,Wt.stride=Jr,Wt.divisor=ai}}hr[nr]=rn(function(Zi,Fi){var ui=Zi.attribCache;if(or in ui)return ui[or];var _i={isStream:!1};return Object.keys(Wt).forEach(function(Si){_i[Si]=Wt[Si]}),Wt.buffer&&(_i.buffer=Zi.link(Wt.buffer),_i.type=_i.type||_i.buffer+".dtype"),ui[or]=_i,_i})}),Object.keys(rr).forEach(function(nr){var dr=rr[nr];function or(Wt,ir){var Vt=Wt.invoke(ir,dr),Dr=Wt.shared,Jr=Wt.constants,ga=Dr.isBufferArgs,vi=Dr.buffer,Ga={isStream:ir.def(!1)},ai=new Ma;ai.state=Qn,Object.keys(ai).forEach(function(_i){Ga[_i]=ir.def(""+ai[_i])});var Zi=Ga.buffer,Fi=Ga.type;ir("if(",ga,"(",Vt,")){",Ga.isStream,"=true;",Zi,"=",vi,".createStream(",Qr,",",Vt,");",Fi,"=",Zi,".dtype;","}else{",Zi,"=",vi,".getBuffer(",Vt,");","if(",Zi,"){",Fi,"=",Zi,".dtype;",'}else if("constant" in ',Vt,"){",Ga.state,"=",co,";","if(typeof "+Vt+'.constant === "number"){',Ga[$n[0]],"=",Vt,".constant;",$n.slice(1).map(function(_i){return Ga[_i]}).join("="),"=0;","}else{",$n.map(function(_i,Si){return Ga[_i]+"="+Vt+".constant.length>"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){ir(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[nr]=dn(dr,or)}),hr}function kl(mt){var St=mt.static,Ft=mt.dynamic,rr={};return Object.keys(St).forEach(function(hr){var nr=St[hr];rr[hr]=rn(function(dr,or){return typeof nr=="number"||typeof nr=="boolean"?""+nr:dr.link(nr)})}),Object.keys(Ft).forEach(function(hr){var nr=Ft[hr];rr[hr]=dn(nr,function(dr,or){return dr.invoke(or,nr)})}),rr}function tu(mt,St,Ft,rr,hr){var nr=mt.static,dr=mt.dynamic,or=zs(mt,St),Wt=Dn(mt,hr),ir=Xn(mt,Wt,hr),Vt=ho(mt,hr),Dr=Wl(mt,hr),Jr=bl(mt,hr,or);function ga(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ga(Me),ga(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=En(mt,hr),Ga.uniforms=fs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!or&&cr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=St.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return or?Ga.useVAO=!0:Ga.attributes=Sl(St,hr),Ga.context=kl(rr,hr),Ga}function Vs(mt,St,Ft){var rr=mt.shared,hr=rr.context,nr=mt.scope();Object.keys(Ft).forEach(function(dr){St.save(hr,"."+dr);var or=Ft[dr],Wt=or.append(mt,St);Array.isArray(Wt)?nr(hr,".",dr,"=[",Wt.join(),"];"):nr(hr,".",dr,"=",Wt,";")}),St(nr)}function pl(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.framebuffer,or;Va&&(or=St.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Vt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,St):Dr=St.def(dr,".next"),rr||St("if(",Dr,"!==",dr,".cur){"),St("if(",Dr,"){",nr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&St(or,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",pa,",null);"),Va&&St(or,".drawBuffersWEBGL(",Vt,");"),St("}",dr,".cur=",Dr,";"),rr||St("}")}function wl(mt,St,Ft){var rr=mt.shared,hr=rr.gl,nr=mt.current,dr=mt.next,or=rr.current,Wt=rr.next,ir=mt.cond(or,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Ft.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=nr[Dr];var vi=p(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",or,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),or,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",or,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(or,".dirty=false;"),St(ir)}function Zn(mt,St,Ft,rr){var hr=mt.shared,nr=mt.current,dr=hr.current,or=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Vt=Ft[ir];if(!(rr&&!rr(Vt))){var Dr=Vt.append(mt,St);if(Ua[ir]){var Jr=Ua[ir];sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(mt.cond(Wt).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Wt,";")):(St(mt.cond(Dr).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Dr,";"))}else if(ma(Dr)){var ga=nr[ir];St(or,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(or,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):St(or,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function Cl(mt,St){di&&(mt.instancing=St.def(mt.shared.extensions,".angle_instanced_arrays"))}function Po(mt,St,Ft,rr,hr){var nr=mt.shared,dr=mt.stats,or=nr.current,Wt=nr.timer,ir=Ft.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=St.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=St.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=St.def(or,".profile");St(or,".profile=",ui,";"),St.exit(or,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ga(St),vi(St.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,St),Ga(ai)}else ai=St.def(or,".profile");var Zi=mt.block();ga(Zi),St("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),St.exit("if(",ai,"){",Fi,"}")}function ge(mt,St,Ft,rr,hr){var nr=mt.shared;function dr(Wt){switch(Wt){case os:case ul:case Il:return 2;case So:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function or(Wt,ir,Vt){var Dr=nr.gl,Jr=St.def(Wt,".location"),ga=St.def(nr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){St("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=St.def(Vt.size,"||",ir):Si=ir,St("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(cn){return ga+"."+cn+"!=="+Vt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(cn){return ga+"."+cn+"="+Vt[cn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;St("if(",ga,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){St("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",$n.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",$n.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===Qn?Fi():vi===co?ui():(St("if(",vi,"===",Qn,"){"),Fi(),St("}else{"),ui(),St("}"))}rr.forEach(function(Wt){var ir=Wt.name,Vt=Ft.attributes[ir],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(mt,St)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=St.def(Jr,".",ga)})}or(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,St,Ft,rr,hr,nr){for(var dr=mt.shared,or=dr.gl,Wt,ir=0;ir<rr.length;++ir){var Vt=rr[ir],Dr=Vt.name,Jr=Vt.info.type,ga=Ft.uniforms[Dr],vi=mt.link(Vt),Ga=vi+".location",ai;if(ga){if(!hr(ga))continue;if(sn(ga)){var Zi=ga.value;if(Jr===uc||Jr===Vl){var Fi=mt.link(Zi._texture||Zi.color[0]._texture);St(or,".uniform1i(",Ga,",",Fi+".bind());"),St.exit(Fi,".unbind();")}else if(Jr===vu||Jr===Tl||Jr===cu){var ui=mt.global.def("new Float32Array(["+Array.prototype.slice.call(Zi)+"])"),_i=2;Jr===Tl?_i=3:Jr===cu&&(_i=4),St(or,".uniformMatrix",_i,"fv(",Ga,",false,",ui,");")}else{switch(Jr){case wo:Wt="1f";break;case os:Wt="2f";break;case So:Wt="3f";break;case Zo:Wt="4f";break;case $o:Wt="1i";break;case hs:Wt="1i";break;case Il:Wt="2i";break;case ul:Wt="2i";break;case eu:Wt="3i";break;case tl:Wt="3i";break;case Ru:Wt="4i";break;case Jo:Wt="4i";break}St(or,".uniform",Wt,"(",Ga,",",ma(Zi)?Array.prototype.slice.call(Zi):Zi,");")}continue}else ai=ga.append(mt,St)}else{if(!hr(In))continue;ai=St.def(dr.uniforms,"[",Zt.id(Dr),"]")}Jr===uc?St("if(",ai,"&&",ai,'._reglType==="framebuffer"){',ai,"=",ai,".color[0];","}"):Jr===Vl&&St("if(",ai,"&&",ai,'._reglType==="framebufferCube"){',ai,"=",ai,".color[0];","}");var Si=1;switch(Jr){case uc:case Vl:var Ui=St.def(ai,"._texture");St(or,".uniform1i(",Ga,",",Ui,".bind());"),St.exit(Ui,".unbind();");continue;case hs:case $o:Wt="1i";break;case ul:case Il:Wt="2i",Si=2;break;case tl:case eu:Wt="3i",Si=3;break;case Jo:case Ru:Wt="4i",Si=4;break;case wo:Wt="1f";break;case os:Wt="2f",Si=2;break;case So:Wt="3f",Si=3;break;case Zo:Wt="4f",Si=4;break;case vu:Wt="Matrix2fv";break;case Tl:Wt="Matrix3fv";break;case cu:Wt="Matrix4fv";break}if(Wt.charAt(0)==="M"){St(or,".uniform",Wt,"(",Ga,",");var cn=Math.pow(Jr-vu+2,2),yo=mt.global.def("new Float32Array(",cn,")");Array.isArray(ai)?St("false,(",p(cn,function(Ks){return yo+"["+Ks+"]="+ai[Ks]}),",",yo,")"):St("false,(Array.isArray(",ai,")||",ai," instanceof Float32Array)?",ai,":(",p(cn,function(Ks){return yo+"["+Ks+"]="+ai+"["+Ks+"]"}),",",yo,")"),St(");")}else if(Si>1){for(var Uo=[],Is=[],Fo=0;Fo<Si;++Fo)Array.isArray(ai)?Is.push(ai[Fo]):Is.push(St.def(ai+"["+Fo+"]")),nr&&Uo.push(St.def());nr&&St("if(!",mt.batchId,"||",Uo.map(function(Ks,mu){return Ks+"!=="+Is[mu]}).join("||"),"){",Uo.map(function(Ks,mu){return Ks+"="+Is[mu]+";"}).join("")),St(or,".uniform",Wt,"(",Ga,",",Is.join(","),");"),nr&&St("}")}else{if(nr){var Es=St.def();St("if(!",mt.batchId,"||",Es,"!==",ai,"){",Es,"=",ai,";")}St(or,".uniform",Wt,"(",Ga,",",ai,");"),nr&&St("}")}}}function xe(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.draw,or=rr.draw;function Wt(){var Si=or.elements,Ui,cn=St;return Si?((Si.contextDep&&rr.contextDynamic||Si.propDep)&&(cn=Ft),Ui=Si.append(mt,cn),or.elementsActive&&cn("if("+Ui+")"+nr+".bindBuffer("+ha+","+Ui+".buffer.buffer);")):(Ui=cn.def(),cn(Ui,"=",dr,".",$t,";","if(",Ui,"){",nr,".bindBuffer(",ha,",",Ui,".buffer.buffer);}","else if(",hr.vao,".currentVAO){",Ui,"=",mt.shared.elements+".getElements("+hr.vao,".currentVAO.elements);",Bi?"":"if("+Ui+")"+nr+".bindBuffer("+ha+","+Ui+".buffer.buffer);","}")),Ui}function ir(){var Si=or.count,Ui,cn=St;return Si?((Si.contextDep&&rr.contextDynamic||Si.propDep)&&(cn=Ft),Ui=Si.append(mt,cn)):Ui=cn.def(dr,".",Ar),Ui}var Vt=Wt();function Dr(Si){var Ui=or[Si];return Ui?Ui.contextDep&&rr.contextDynamic||Ui.propDep?Ui.append(mt,Ft):Ui.append(mt,St):St.def(dr,".",Si)}var Jr=Dr(Tr),ga=Dr(Kr),vi=ir();if(typeof vi=="number"){if(vi===0)return}else Ft("if(",vi,"){"),Ft.exit("}");var Ga,ai;di&&(Ga=Dr(na),ai=mt.instancing);var Zi=Vt+".type",Fi=or.elements&&sn(or.elements)&&!or.vaoActive;function ui(){function Si(){Ft(ai,".drawElementsInstancedANGLE(",[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(nr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)"]+");")}function Ui(){Ft(nr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function te(mt,St,Ft,rr,hr){var nr=nn(),dr=nr.proc("body",hr);return di&&(nr.instancing=dr.def(nr.shared.extensions,".angle_instanced_arrays")),mt(nr,dr,Ft,rr),nr.compile().body}function ye(mt,St,Ft,rr){Cl(mt,St),Ft.useVAO?Ft.drawVAO?St(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,St),");"):St(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(St(mt.shared.vao,".setVAO(null);"),ge(mt,St,Ft,rr.attributes,function(){return!0})),K(mt,St,Ft,rr.uniforms,function(){return!0},!1),xe(mt,St,St,Ft)}function je(mt,St){var Ft=mt.proc("draw",1);Cl(mt,Ft),Vs(mt,Ft,St.context),pl(mt,Ft,St.framebuffer),wl(mt,Ft,St),Zn(mt,Ft,St.state),Po(mt,Ft,St,!1,!0);var rr=St.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),St.shader.program)ye(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),nr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",nr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",nr,"]=",mt.link(function(or){return te(ye,mt,St,or,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,St,Ft,rr){mt.batchId="a1",Cl(mt,St);function hr(){return!0}ge(mt,St,Ft,rr.attributes,hr),K(mt,St,Ft,rr.uniforms,hr,!1),xe(mt,St,St,Ft)}function Qe(mt,St,Ft,rr){Cl(mt,St);var hr=Ft.contextDep,nr=St.def(),dr="a0",or="a1",Wt=St.def();mt.shared.props=Wt,mt.batchId=nr;var ir=mt.scope(),Vt=mt.scope();St(ir.entry,"for(",nr,"=0;",nr,"<",or,";++",nr,"){",Wt,"=",dr,"[",nr,"];",Vt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&Vs(mt,Vt,Ft.context),Ft.needsFramebuffer&&pl(mt,Vt,Ft.framebuffer),Zn(mt,Vt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Po(mt,Vt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Vt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Vt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Vt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Vt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Vt,Ft);else{var ga=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",mt.link(function(Zi){return te(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",nr,"],",nr,");")}}function vt(mt,St){var Ft=mt.proc("batch",2);mt.batchId="0",Cl(mt,Ft);var rr=!1,hr=!0;Object.keys(St.context).forEach(function(ga){rr=rr||St.context[ga].propDep}),rr||(Vs(mt,Ft,St.context),hr=!1);var nr=St.framebuffer,dr=!1;nr?(nr.propDep?rr=dr=!0:nr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,nr)):pl(mt,Ft,null),St.state.viewport&&St.state.viewport.propDep&&(rr=!0);function or(ga){return ga.contextDep&&rr||ga.propDep}wl(mt,Ft,St),Zn(mt,Ft,St.state,function(ga){return!or(ga)}),(!St.profile||!or(St.profile))&&Po(mt,Ft,St,!1,"a1"),St.contextDep=rr,St.needsContext=hr,St.needsFramebuffer=dr;var Wt=St.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,St,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),St.shader.program)Qe(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Vt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Vt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",mt.link(function(ga){return te(Qe,mt,St,ga,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,St){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(Vs(mt,Ft,St.context),St.framebuffer&&St.framebuffer.append(mt,Ft),ni(Object.keys(St.state)).forEach(function(or){var Wt=St.state[or],ir=Wt.append(mt,Ft);ma(ir)?ir.forEach(function(Vt,Dr){Xi(Vt)?Ft.set(mt.next[or],"["+Dr+"]",Vt):Ft.set(mt.next[or],"["+Dr+"]",mt.link(Vt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+or,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+or,ir)}),Po(mt,Ft,St,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(or){var Wt=St.draw[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+or,ir):Ft.set(rr.draw,"."+or,mt.link(ir),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(or){var Wt=St.uniforms[or].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Zt.id(or),{stable:!0})+"]",Wt)}),Object.keys(St.attributes).forEach(function(or){var Wt=St.attributes[or].append(mt,Ft),ir=mt.scopeAttrib(or);Object.keys(new Ma).forEach(function(Vt){Ft.set(ir,"."+Vt,Wt[Vt])})}),St.scopeVAO){var nr=St.scopeVAO.append(mt,Ft);Xi(nr)?Ft.set(rr.vao,".targetVAO",nr):Ft.set(rr.vao,".targetVAO",mt.link(nr,{stable:!0}))}function dr(or){var Wt=St.shader[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+or,ir):Ft.set(rr.shader,"."+or,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(St.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function wr(mt){if(!(typeof mt!="object"||ma(mt))){for(var St=Object.keys(mt),Ft=0;Ft<St.length;++Ft)if(h.isDynamic(mt[St[Ft]]))return!0;return!1}}function Nr(mt,St,Ft){var rr=St.static[Ft];if(!rr||!wr(rr))return;var hr=mt.global,nr=Object.keys(rr),dr=!1,or=!1,Wt=!1,ir=mt.global.def("{}");nr.forEach(function(Dr){var Jr=rr[Dr];if(h.isDynamic(Jr)){typeof Jr=="function"&&(Jr=rr[Dr]=h.unbox(Jr));var ga=dn(Jr,null);dr=dr||ga.thisDep,Wt=Wt||ga.propDep,or=or||ga.contextDep}else{switch(hr(ir,".",Dr,"="),typeof Jr){case"number":hr(Jr);break;case"string":hr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&hr("[",Jr.join(),"]");break;default:hr(mt.link(Jr));break}hr(";")}});function Vt(Dr,Jr){nr.forEach(function(ga){var vi=rr[ga];if(h.isDynamic(vi)){var Ga=Dr.invoke(Jr,vi);Jr(ir,".",ga,"=",Ga,";")}})}St.dynamic[Ft]=new h.DynamicVariable(Ms,{thisDep:dr,contextDep:or,propDep:Wt,ref:ir,append:Vt}),delete St.static[Ft]}function pr(mt,St,Ft,rr,hr){var nr=nn();nr.stats=nr.link(hr),Object.keys(St.static).forEach(function(or){Nr(nr,St,or)}),jr.forEach(function(or){Nr(nr,mt,or)});var dr=tu(mt,St,Ft,rr,nr);return dr.shader.program&&(dr.shader.program.attributes.sort(function(or,Wt){return or.name<Wt.name?-1:1}),dr.shader.program.uniforms.sort(function(or,Wt){return or.name<Wt.name?-1:1})),je(nr,dr),qt(nr,dr),vt(nr,dr),d(nr.compile(),{destroy:function(){dr.shader.program.destroy()}})}return{next:hn,current:Li,procs:function(){var mt=nn(),St=mt.proc("poll"),Ft=mt.proc("refresh"),rr=mt.block();St(rr),Ft(rr);var hr=mt.shared,nr=hr.gl,dr=hr.next,or=hr.current;rr(or,".dirty=false;"),pl(mt,St),pl(mt,Ft,null,!0);var Wt;di&&(Wt=mt.link(di)),cr.oes_vertex_array_object&&Ft(mt.link(cr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ir=Ft.def(hr.attributes),Vt=Ft.def(0),Dr=mt.cond(Vt,".buffer");Dr.then(nr,".enableVertexAttribArray(i);",nr,".bindBuffer(",Qr,",",Vt,".buffer.buffer);",nr,".vertexAttribPointer(i,",Vt,".size,",Vt,".type,",Vt,".normalized,",Vt,".stride,",Vt,".offset);").else(nr,".disableVertexAttribArray(i);",nr,".vertexAttrib4f(i,",Vt,".x,",Vt,".y,",Vt,".z,",Vt,".w);",Vt,".buffer=null;");var Jr=mt.link(oa.maxAttributes,{stable:!0});return Ft("for(var i=0;i<",Jr,";++i){",Vt,"=",ir,"[i];",Dr,"}"),di&&Ft("for(var i=0;i<",Jr,";++i){",Wt,".vertexAttribDivisorANGLE(i,",ir,"[i].divisor);","}"),Ft(mt.shared.vao,".currentVAO=null;",mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"),Object.keys(Ua).forEach(function(ga){var vi=Ua[ga],Ga=rr.def(dr,".",ga),ai=mt.block();ai("if(",Ga,"){",nr,".enable(",vi,")}else{",nr,".disable(",vi,")}",or,".",ga,"=",Ga,";"),Ft(ai),St("if(",Ga,"!==",or,".",ga,"){",ai,"}")}),Object.keys(Yi).forEach(function(ga){var vi=Yi[ga],Ga=Li[ga],ai,Zi,Fi=mt.block();if(Fi(nr,".",vi,"("),ma(Ga)){var ui=Ga.length;ai=mt.global.def(dr,".",ga),Zi=mt.global.def(or,".",ga),Fi(p(ui,function(_i){return ai+"["+_i+"]"}),");",p(ui,function(_i){return Zi+"["+_i+"]="+ai+"["+_i+"];"}).join("")),St("if(",p(ui,function(_i){return ai+"["+_i+"]!=="+Zi+"["+_i+"]"}).join("||"),"){",Fi,"}")}else ai=rr.def(dr,".",ga),Zi=rr.def(or,".",ga),Fi(ai,");",or,".",ga,"=",ai,";"),St("if(",ai,"!==",Zi,"){",Fi,"}");Ft(Fi)}),mt.compile()}(),compile:pr}}function ro(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Yo=34918,oo=34919,Wo=35007,cl=function(it,Zt){if(!Zt.ext_disjoint_timer_query)return null;var cr=[];function oa(){return cr.pop()||Zt.ext_disjoint_timer_query.createQueryEXT()}function wa(Qa){cr.push(Qa)}var va=[];function ya(Qa){var di=oa();Zt.ext_disjoint_timer_query.beginQueryEXT(Wo,di),va.push(di),Ei(va.length-1,va.length,Qa)}function Ya(){Zt.ext_disjoint_timer_query.endQueryEXT(Wo)}function bi(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var yi=[];function si(){return yi.pop()||new bi}function gn(Qa){yi.push(Qa)}var zi=[];function Ei(Qa,di,Va){var Bi=si();Bi.startQueryIndex=Qa,Bi.endQueryIndex=di,Bi.sum=0,Bi.stats=Va,zi.push(Bi)}var Na=[],ea=[];function Ma(){var Qa,di,Va=va.length;if(Va!==0){ea.length=Math.max(ea.length,Va+1),Na.length=Math.max(Na.length,Va+1),Na[0]=0,ea[0]=0;var Bi=0;for(Qa=0,di=0;di<va.length;++di){var Li=va[di];Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,oo)?(Bi+=Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,Yo),wa(Li)):va[Qa++]=Li,Na[di+1]=Bi,ea[di+1]=Qa}for(va.length=Qa,Qa=0,di=0;di<zi.length;++di){var hn=zi[di],Ha=hn.startQueryIndex,Ua=hn.endQueryIndex;hn.sum+=Na[Ua]-Na[Ha];var Yi=ea[Ha],Ri=ea[Ua];Ri===Yi?(hn.stats.gpuTime+=hn.sum/1e6,gn(hn)):(hn.startQueryIndex=Yi,hn.endQueryIndex=Ri,zi[Qa++]=hn)}zi.length=Qa}}return{beginQuery:ya,endQuery:Ya,pushScopeStats:Ei,update:Ma,getNumPendingQueries:function(){return va.length},clear:function(){cr.push.apply(cr,va);for(var Qa=0;Qa<cr.length;Qa++)Zt.ext_disjoint_timer_query.deleteQueryEXT(cr[Qa]);va.length=0,cr.length=0},restore:function(){va.length=0,cr.length=0}}},al=16384,xl=256,mn=1024,po=34962,cs="webglcontextlost",vs="webglcontextrestored",Al=1,Hl=2,Su=3;function Rl(it,Zt){for(var cr=0;cr<it.length;++cr)if(it[cr]===Zt)return cr;return-1}function _c(it){var Zt=g(it);if(!Zt)return null;var cr=Zt.gl,oa=cr.getContextAttributes(),wa=cr.isContextLost(),va=b(cr,Zt);if(!va)return null;var ya=c(),Ya=ro(),bi=Zt.cachedCode||{},yi=va.extensions,si=cl(cr,yi),gn=v(),zi=cr.drawingBufferWidth,Ei=cr.drawingBufferHeight,Na={tick:0,time:0,viewportWidth:zi,viewportHeight:Ei,framebufferWidth:zi,framebufferHeight:Ei,drawingBufferWidth:zi,drawingBufferHeight:Ei,pixelRatio:Zt.pixelRatio},ea={},Ma={elements:null,primitive:4,count:-1,offset:0,instances:-1},Qa=qr(cr,yi),di=ra(cr,Ya,Zt,Li),Va=Xt(cr,yi,di,Ya),Bi=Pu(cr,yi,Qa,Ya,di,Va,Ma);function Li(te){return Bi.destroyBuffer(te)}var hn=Hu(cr,ya,Ya,Zt),Ha=Xc(cr,yi,Qa,function(){Ri.procs.poll()},Na,Ya,Zt),Ua=Mc(cr,yi,Qa,Ya,Zt),Yi=Yc(cr,yi,Qa,Ha,Ua,Ya),Ri=Kn(cr,ya,yi,Qa,di,Va,Ha,Yi,ea,Bi,hn,Ma,Na,si,bi,Zt),Ti=iu(cr,Yi,Ri.procs.poll,Na,oa,yi,Qa),xi=Ri.next,Xi=cr.canvas,vn=[],Rn=[],Ii=[],nn=[Zt.onDestroy],En=null;function Dn(){if(vn.length===0){si&&si.update(),En=null;return}En=f.next(Dn),wl();for(var te=vn.length-1;te>=0;--te){var ye=vn[te];ye&&ye(Na,null,0)}cr.flush(),si&&si.update()}function Xn(){!En&&vn.length>0&&(En=f.next(Dn))}function zs(){En&&(f.cancel(Dn),En=null)}function bl(te){te.preventDefault(),wa=!0,zs(),Rn.forEach(function(ye){ye()})}function ho(te){cr.getError(),wa=!1,va.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Xn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(vs,ho,!1));function Wl(){vn.length=0,zs(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(vs,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(te){te()})}function fs(te){function ye(nr){var dr=d({},nr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function or(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Vt){dr[Wt+"."+Vt]=ir[Vt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in nr&&(dr.vao=nr.vao),dr}function je(nr,dr){var or={},Wt={};return Object.keys(nr).forEach(function(ir){var Vt=nr[ir];if(h.isDynamic(Vt)){Wt[ir]=h.unbox(Vt,ir);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr<Vt.length;++Dr)if(h.isDynamic(Vt[Dr])){Wt[ir]=h.unbox(Vt,ir);return}}or[ir]=Vt}),{dynamic:Wt,static:or}}var ke=je(te.context||{},!0),Qe=je(te.uniforms||{},!0),vt=je(te.attributes||{},!1),qt=je(ye(te),!1),wr={gpuTime:0,cpuTime:0,count:0},Nr=Ri.compile(qt,vt,Qe,ke,wr),pr=Nr.draw,mt=Nr.batch,St=Nr.scope,Ft=[];function rr(nr){for(;Ft.length<nr;)Ft.push(null);return Ft}function hr(nr,dr){var or;if(typeof nr=="function")return St.call(this,null,nr,0);if(typeof dr=="function")if(typeof nr=="number")for(or=0;or<nr;++or)St.call(this,null,dr,or);else if(Array.isArray(nr))for(or=0;or<nr.length;++or)St.call(this,nr[or],dr,or);else return St.call(this,nr,dr,0);else if(typeof nr=="number"){if(nr>0)return mt.call(this,rr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return mt.call(this,nr,nr.length)}else return pr.call(this,nr)}return d(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,ye){var je=0;Ri.procs.poll();var ke=ye.color;ke&&(cr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),je|=al),"depth"in ye&&(cr.clearDepth(+ye.depth),je|=xl),"stencil"in ye&&(cr.clearStencil(ye.stencil|0),je|=mn),cr.clear(je)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Sl(d({framebuffer:te.framebuffer.faces[ye]},te),kl);else Sl(te,kl);else kl(null,te)}function Vs(te){vn.push(te);function ye(){var je=Rl(vn,te);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&zs()}vn[je]=ke}return Xn(),{cancel:ye}}function pl(){var te=xi.viewport,ye=xi.scissor_box;te[0]=te[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=ye[2]=cr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=ye[3]=cr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Zn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(v()-gn)/1e3}Zn();function Po(te,ye){var je;switch(te){case"frame":return Vs(ye);case"lost":je=Rn;break;case"restore":je=Ii;break;case"destroy":je=nn;break;default:}return je.push(ye),{cancel:function(){for(var ke=0;ke<je.length;++ke)if(je[ke]===ye){je[ke]=je[je.length-1],je.pop();return}}}}function ge(){return bi}function K(te){Object.entries(te).forEach(function(ye){bi[ye[0]]=ye[1]})}var xe=d(fs,{clear:tu,prop:h.define.bind(null,Al),context:h.define.bind(null,Hl),this:h.define.bind(null,Su),draw:fs({}),buffer:function(te){return di.create(te,po,!1,!1)},elements:function(te){return Va.create(te,!1)},texture:Ha.create2D,cube:Ha.createCube,renderbuffer:Ua.create,framebuffer:Yi.create,framebufferCube:Yi.createCube,vao:Bi.createVAO,attributes:oa,frame:Vs,on:Po,limits:Qa,hasExtension:function(te){return Qa.extensions.indexOf(te.toLowerCase())>=0},read:Ti,destroy:Wl,_gl:cr,_refresh:Zn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Zt.onDone(null,xe),xe}return _c})}}),bq=He({"node_modules/gl-util/context.js"(Z,V){"use strict";var d=Ev();V.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:E(o)?o={container:o}:e(o)?o={gl:o}:o=d(o,{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),o.pixelRatio||(o.pixelRatio=window.pixelRatio||1),o.gl)return o.gl;if(o.canvas&&(o.container=o.canvas.parentNode),o.container){if(typeof o.container=="string"){var a=document.querySelector(o.container);if(!a)throw Error("Element "+o.container+" is not found");o.container=a}S(o.container)?(o.canvas=o.container,o.container=o.canvas.parentNode):o.canvas||(o.canvas=t(),o.container.appendChild(o.canvas),x(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),x(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{o.gl=o.canvas.getContext(n,o.attrs)}catch{}return o.gl}),o.gl};function x(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var o=r.container.getBoundingClientRect();r.canvas.width=r.width||o.right-o.left,r.canvas.height=r.height||o.bottom-o.top}}function S(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function E(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function e(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function t(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}}),wq=He({"node_modules/font-atlas/index.js"(Z,V){"use strict";var d=c6(),x=[32,126];V.exports=S;function S(E){E=E||{};var e=E.shape?E.shape:E.canvas?[E.canvas.width,E.canvas.height]:[512,512],t=E.canvas||document.createElement("canvas"),r=E.font,o=typeof E.step=="number"?[E.step,E.step]:E.step||[32,32],a=E.chars||x;if(r&&typeof r!="string"&&(r=d(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var n=[],i=a[0],s=0;i<=a[1];i++)n[s++]=String.fromCharCode(i);a=n}e=e.slice(),t.width=e[0],t.height=e[1];var h=t.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,t.width,t.height),h.font=r,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var f=o[0]/2,v=o[1]/2,i=0;i<a.length;i++)h.fillText(a[i],f,v),(f+=o[0])>e[0]-o[0]/2&&(f=o[0]/2,v+=o[1]);return t}}}),f6=He({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var V=32;Z.INT_BITS=V,Z.INT_MAX=2147483647,Z.INT_MIN=-1<<V-1,Z.sign=function(S){return(S>0)-(S<0)},Z.abs=function(S){var E=S>>V-1;return(S^E)-E},Z.min=function(S,E){return E^(S^E)&-(S<E)},Z.max=function(S,E){return S^(S^E)&-(S<E)},Z.isPow2=function(S){return!(S&S-1)&&!!S},Z.log2=function(S){var E,e;return E=(S>65535)<<4,S>>>=E,e=(S>255)<<3,S>>>=e,E|=e,e=(S>15)<<2,S>>>=e,E|=e,e=(S>3)<<1,S>>>=e,E|=e,E|S>>1},Z.log10=function(S){return S>=1e9?9:S>=1e8?8:S>=1e7?7:S>=1e6?6:S>=1e5?5:S>=1e4?4:S>=1e3?3:S>=100?2:S>=10?1:0},Z.popCount=function(S){return S=S-(S>>>1&1431655765),S=(S&858993459)+(S>>>2&858993459),(S+(S>>>4)&252645135)*16843009>>>24};function d(S){var E=32;return S&=-S,S&&E--,S&65535&&(E-=16),S&16711935&&(E-=8),S&252645135&&(E-=4),S&858993459&&(E-=2),S&1431655765&&(E-=1),E}Z.countTrailingZeros=d,Z.nextPow2=function(S){return S+=S===0,--S,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S+1},Z.prevPow2=function(S){return S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S-(S>>>1)},Z.parity=function(S){return S^=S>>>16,S^=S>>>8,S^=S>>>4,S&=15,27030>>>S&1};var x=new Array(256);(function(S){for(var E=0;E<256;++E){var e=E,t=E,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;S[E]=t<<r&255}})(x),Z.reverse=function(S){return x[S&255]<<24|x[S>>>8&255]<<16|x[S>>>16&255]<<8|x[S>>>24&255]},Z.interleave2=function(S,E){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,S|E<<1},Z.deinterleave2=function(S,E){return S=S>>>E&1431655765,S=(S|S>>>1)&858993459,S=(S|S>>>2)&252645135,S=(S|S>>>4)&16711935,S=(S|S>>>16)&65535,S<<16>>16},Z.interleave3=function(S,E,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,S|=E<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,S|e<<2},Z.deinterleave3=function(S,E){return S=S>>>E&1227133513,S=(S|S>>>2)&3272356035,S=(S|S>>>4)&251719695,S=(S|S>>>8)&4278190335,S=(S|S>>>16)&1023,S<<22>>22},Z.nextCombination=function(S){var E=S|S-1;return E+1|(~E&-~E)-1>>>d(S)+1}}}),Tq=He({"node_modules/dup/dup.js"(Z,V){"use strict";function d(E,e,t){var r=E[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===E.length-1)for(a=0;a<r;++a)o[a]=e;else for(a=0;a<r;++a)o[a]=d(E,e,t+1);return o}function x(E,e){var t,r;for(t=new Array(E),r=0;r<E;++r)t[r]=e;return t}function S(E,e){switch(typeof e>"u"&&(e=0),typeof E){case"number":if(E>0)return x(E|0,e);break;case"object":if(typeof E.length=="number")return d(E,e,0);break}return[]}V.exports=S}}),Aq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var V=f6(),d=Tq(),x=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:d([32,0]),UINT16:d([32,0]),UINT32:d([32,0]),BIGUINT64:d([32,0]),INT8:d([32,0]),INT16:d([32,0]),INT32:d([32,0]),BIGINT64:d([32,0]),FLOAT:d([32,0]),DOUBLE:d([32,0]),DATA:d([32,0]),UINT8C:d([32,0]),BUFFER:d([32,0])});var S=typeof Uint8ClampedArray<"u",E=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=d([32,0])),t.BIGUINT64||(t.BIGUINT64=d([32,0])),t.BIGINT64||(t.BIGINT64=d([32,0])),t.BUFFER||(t.BUFFER=d([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(x.isBuffer(u))o[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var y=u.length||u.byteLength,m=V.log2(y)|0;r[m].push(u)}};function a(p){if(p){var u=p.length||p.byteLength,y=V.log2(u);r[y].push(p)}}function n(p){a(p.buffer)}Z.freeUint8=Z.freeUint16=Z.freeUint32=Z.freeBigUint64=Z.freeInt8=Z.freeInt16=Z.freeInt32=Z.freeBigInt64=Z.freeFloat32=Z.freeFloat=Z.freeFloat64=Z.freeDouble=Z.freeUint8Clamped=Z.freeDataView=n,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[V.log2(u.length)].push(u)},Z.malloc=function(u,y){if(y===void 0||y==="arraybuffer")return i(u);switch(y){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return v(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return _(u);case"uint8_clamped":return w(u);case"bigint64":return M(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return g(u);default:return null}return null};function i(u){var u=V.nextPow2(u),y=V.log2(u),m=r[y];return m.length>0?m.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=i;function s(p){return new Uint8Array(i(p),0,p)}Z.mallocUint8=s;function h(p){return new Uint16Array(i(2*p),0,p)}Z.mallocUint16=h;function f(p){return new Uint32Array(i(4*p),0,p)}Z.mallocUint32=f;function v(p){return new Int8Array(i(p),0,p)}Z.mallocInt8=v;function c(p){return new Int16Array(i(2*p),0,p)}Z.mallocInt16=c;function T(p){return new Int32Array(i(4*p),0,p)}Z.mallocInt32=T;function l(p){return new Float32Array(i(4*p),0,p)}Z.mallocFloat32=Z.mallocFloat=l;function _(p){return new Float64Array(i(8*p),0,p)}Z.mallocFloat64=Z.mallocDouble=_;function w(p){return S?new Uint8ClampedArray(i(p),0,p):s(p)}Z.mallocUint8Clamped=w;function A(p){return E?new BigUint64Array(i(8*p),0,p):null}Z.mallocBigUint64=A;function M(p){return e?new BigInt64Array(i(8*p),0,p):null}Z.mallocBigInt64=M;function g(p){return new DataView(i(p),0,p)}Z.mallocDataView=g;function b(p){p=V.nextPow2(p);var u=V.log2(p),y=o[u];return y.length>0?y.pop():new x(p)}Z.mallocBuffer=b,Z.clearCache=function(){for(var u=0;u<32;++u)t.UINT8[u].length=0,t.UINT16[u].length=0,t.UINT32[u].length=0,t.INT8[u].length=0,t.INT16[u].length=0,t.INT32[u].length=0,t.FLOAT[u].length=0,t.DOUBLE[u].length=0,t.BIGUINT64[u].length=0,t.BIGINT64[u].length=0,t.UINT8C[u].length=0,r[u].length=0,o[u].length=0}}}),Sq=He({"node_modules/is-plain-obj/index.js"(Z,V){"use strict";var d=Object.prototype.toString;V.exports=function(x){var S;return d.call(x)==="[object Object]"&&(S=Object.getPrototypeOf(x),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,V){V.exports=function(x,S){S||(S=[0,""]),x=String(x);var E=parseFloat(x,10);return S[0]=E,S[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Mq=He({"node_modules/to-px/topx.js"(Z,V){"use strict";var d=h6();V.exports=e;var x=96;function S(t,r){var o=d(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function E(t,r){var o=document.createElement("div");o.style["font-size"]="128"+t,r.appendChild(o);var a=S(o,"font-size")/128;return r.removeChild(o),a}function e(t,r){switch(r=r||document.body,t=(t||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),t){case"%":return r.clientHeight/100;case"ch":case"ex":return E(t,r);case"em":return S(r,"font-size");case"rem":return S(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 x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),Eq=He({"node_modules/detect-kerning/index.js"(Z,V){"use strict";V.exports=E;var d=E.canvas=document.createElement("canvas"),x=d.getContext("2d"),S=e([32,126]);E.createPairs=e,E.ascii=S;function E(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,n=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?a=e(r):Array.isArray(r)?a=r:(r.o?a=e(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(n=r.fontSize),r.threshold!=null&&(i=r.threshold))),a||(a=S),x.font=n+"px "+t;for(var s=0;s<a.length;s++){var h=a[s],f=x.measureText(h[0]).width+x.measureText(h[1]).width,v=x.measureText(h).width;if(Math.abs(f-v)>n*i){var c=(v-f)/n;o[h]=c*1e3}}return o}function e(t){for(var r=[],o=t[0];o<=t[1];o++)for(var a=String.fromCharCode(o),n=t[0];n<t[1];n++){var i=String.fromCharCode(n),s=a+i;r.push(s)}return r}}}),kq=He({"node_modules/font-measure/index.js"(Z,V){"use strict";V.exports=d,d.canvas=document.createElement("canvas"),d.cache={};function d(i,t){t||(t={}),(typeof i=="string"||Array.isArray(i))&&(t.family=i);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var o=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",n=t.style||t.fontStyle||"",i=[n,a,o].join(" ")+"px "+r,s=t.origin||"top";if(d.cache[r]&&o<=d.cache[r].em)return x(d.cache[r],s);var h=t.canvas||d.canvas,f=h.getContext("2d"),v={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"},c=Math.ceil(o*1.5);h.height=c,h.width=c*.5,f.font=i;var T="H",l={top:0};f.clearRect(0,0,c,c),f.textBaseline="top",f.fillStyle="black",f.fillText(T,0,0);var _=S(f.getImageData(0,0,c,c));f.clearRect(0,0,c,c),f.textBaseline="bottom",f.fillText(T,0,c);var w=S(f.getImageData(0,0,c,c));l.lineHeight=l.bottom=c-w+_,f.clearRect(0,0,c,c),f.textBaseline="alphabetic",f.fillText(T,0,c);var A=S(f.getImageData(0,0,c,c)),M=c-A-1+_;l.baseline=l.alphabetic=M,f.clearRect(0,0,c,c),f.textBaseline="middle",f.fillText(T,0,c*.5);var g=S(f.getImageData(0,0,c,c));l.median=l.middle=c-g-1+_-c*.5,f.clearRect(0,0,c,c),f.textBaseline="hanging",f.fillText(T,0,c*.5);var b=S(f.getImageData(0,0,c,c));l.hanging=c-b-1+_-c*.5,f.clearRect(0,0,c,c),f.textBaseline="ideographic",f.fillText(T,0,c);var p=S(f.getImageData(0,0,c,c));if(l.ideographic=c-p-1+_,v.upper&&(f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.upper,0,0),l.upper=S(f.getImageData(0,0,c,c)),l.capHeight=l.baseline-l.upper),v.lower&&(f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.lower,0,0),l.lower=S(f.getImageData(0,0,c,c)),l.xHeight=l.baseline-l.lower),v.tittle&&(f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.tittle,0,0),l.tittle=S(f.getImageData(0,0,c,c))),v.ascent&&(f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.ascent,0,0),l.ascent=S(f.getImageData(0,0,c,c))),v.descent&&(f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.descent,0,0),l.descent=E(f.getImageData(0,0,c,c))),v.overshoot){f.clearRect(0,0,c,c),f.textBaseline="top",f.fillText(v.overshoot,0,0);var u=E(f.getImageData(0,0,c,c));l.overshoot=u-M}for(var y in l)l[y]/=o;return l.em=o,d.cache[r]=l,x(l,s)}function x(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var o in e)o!=="em"&&(r[o]=e[o]-t);return r}function S(e){for(var t=e.height,r=e.data,o=3;o<r.length;o+=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}function E(e){for(var t=e.height,r=e.data,o=r.length-1;o>0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Cq=He({"node_modules/gl-text/dist.js"(Z,V){"use strict";var d=_q(),x=Ev(),S=xq(),E=bq(),e=r6(),t=d0(),r=wq(),o=Aq(),a=C1(),n=Sq(),i=h6(),s=Mq(),h=Eq(),f=ch(),v=kq(),c=gg(),T=f6(),l=T.nextPow2,_=new e,w=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(w=!0),document.body.removeChild(A));var A,M=function(p){g(p)?(p={regl:p},this.gl=p.regl._gl):this.gl=E(p),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=p.regl||S({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(),_.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(n(p)?p:{})};M.prototype.createShader=function(){var p=this.regl,u=p({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:p.prop("count"),offset:p.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:p.this("sizeBuffer")},width:{offset:0,stride:8,buffer:p.this("sizeBuffer")},char:p.this("charBuffer"),position:p.this("position")},uniforms:{atlasSize:function(m,R){return[R.atlas.width,R.atlas.height]},atlasDim:function(m,R){return[R.atlas.cols,R.atlas.rows]},atlas:function(m,R){return R.atlas.texture},charStep:function(m,R){return R.atlas.step},em:function(m,R){return R.atlas.em},color:p.prop("color"),opacity:p.prop("opacity"),viewport:p.this("viewportArray"),scale:p.this("scale"),align:p.prop("align"),baseline:p.prop("baseline"),translate:p.this("translate"),positionOffset:p.prop("positionOffset")},primitive:"points",viewport:p.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;
}`}),y={};return{regl:p,draw:u,atlas:y}},M.prototype.update=function(p){var u=this;if(typeof p=="string")p={text:p};else if(!p)return;p=x(p,{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),p.opacity!=null&&(Array.isArray(p.opacity)?this.opacity=p.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(p.opacity)),p.viewport!=null&&(this.viewport=a(p.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]),p.kerning!=null&&(this.kerning=p.kerning),p.offset!=null&&(typeof p.offset=="number"&&(p.offset=[p.offset,0]),this.positionOffset=c(p.offset)),p.direction&&(this.direction=p.direction),p.range&&(this.range=p.range,this.scale=[1/(p.range[2]-p.range[0]),1/(p.range[3]-p.range[1])],this.translate=[-p.range[0],-p.range[1]]),p.scale&&(this.scale=p.scale),p.translate&&(this.translate=p.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!p.font&&(p.font=M.baseFontSize+"px sans-serif");var y=!1,m=!1;if(p.font&&(Array.isArray(p.font)?p.font:[p.font]).forEach(function(ne,Ce){if(typeof ne=="string")try{ne=d.parse(ne)}catch{ne=d.parse(M.baseFontSize+"px "+ne)}else{var Ye=ne.style,rt=ne.weight,Ke=ne.stretch,Mt=ne.variant;ne=d.parse(d.stringify(ne)),Ye&&(ne.style=Ye),rt&&(ne.weight=rt),Ke&&(ne.stretch=Ke),Mt&&(ne.variant=Mt)}var kt=d.stringify({size:M.baseFontSize,family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),Nt=i(ne.size),Gt=Math.round(Nt[0]*s(Nt[1]));if(Gt!==u.fontSize[Ce]&&(m=!0,u.fontSize[Ce]=Gt),(!u.font[Ce]||kt!=u.font[Ce].baseString)&&(y=!0,u.font[Ce]=M.fonts[kt],!u.font[Ce])){var Mr=ne.family.join(", "),mr=[ne.style];ne.style!=ne.variant&&mr.push(ne.variant),ne.variant!=ne.weight&&mr.push(ne.weight),w&&ne.weight!=ne.stretch&&mr.push(ne.stretch),u.font[Ce]={baseString:kt,family:Mr,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:v(Mr,{origin:"top",fontSize:M.baseFontSize,fontStyle:mr.join(" ")})},M.fonts[kt]=u.font[Ce]}}),(y||m)&&this.font.forEach(function(ne,Ce){var Ye=d.stringify({size:u.fontSize[Ce],family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(u.fontAtlas[Ce]=u.shader.atlas[Ye],!u.fontAtlas[Ce]){var rt=ne.metrics;u.shader.atlas[Ye]=u.fontAtlas[Ce]={fontString:Ye,step:Math.ceil(u.fontSize[Ce]*rt.bottom*.5)*2,em:u.fontSize[Ce],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}p.text==null&&(p.text=u.text)}),typeof p.text=="string"&&p.position&&p.position.length>2){for(var R=Array(p.position.length*.5),L=0;L<R.length;L++)R[L]=p.text;p.text=R}var z;if(p.text!=null||y){if(this.textOffsets=[0],Array.isArray(p.text)){this.count=p.text[0].length,this.counts=[this.count];for(var F=1;F<p.text.length;F++)this.textOffsets[F]=this.textOffsets[F-1]+p.text[F-1].length,this.count+=p.text[F].length,this.counts.push(p.text[F].length);this.text=p.text.join("")}else this.text=p.text,this.count=this.text.length,this.counts=[this.count];z=[],this.font.forEach(function(ne,Ce){M.atlasContext.font=ne.baseString;for(var Ye=u.fontAtlas[Ce],rt=0;rt<u.text.length;rt++){var Ke=u.text.charAt(rt);if(Ye.ids[Ke]==null&&(Ye.ids[Ke]=Ye.chars.length,Ye.chars.push(Ke),z.push(Ke)),ne.width[Ke]==null&&(ne.width[Ke]=M.atlasContext.measureText(Ke).width/M.baseFontSize,u.kerning)){var Mt=[];for(var kt in ne.width)Mt.push(kt+Ke,Ke+kt);f(ne.kerning,h(ne.family,{pairs:Mt}))}}})}if(p.position)if(p.position.length>2){for(var N=!p.position[0].length,O=o.mallocFloat(this.count*2),P=0,U=0;P<this.counts.length;P++){var B=this.counts[P];if(N)for(var X=0;X<B;X++)O[U++]=p.position[P*2],O[U++]=p.position[P*2+1];else for(var $=0;$<B;$++)O[U++]=p.position[P][0],O[U++]=p.position[P][1]}this.position.call?this.position({type:"float",data:O}):this.position=this.regl.buffer({type:"float",data:O}),o.freeFloat(O)}else this.position.destroy&&this.position.destroy(),this.position={constant:p.position};if(p.text||y){var le=o.mallocUint8(this.count),ce=o.mallocFloat(this.count*2);this.textWidth=[];for(var de=0,G=0;de<this.counts.length;de++){for(var Y=this.counts[de],ee=this.font[de]||this.font[0],q=this.fontAtlas[de]||this.fontAtlas[0],se=0;se<Y;se++){var ae=this.text.charAt(G),j=this.text.charAt(G-1);if(le[G]=q.ids[ae],ce[G*2]=ee.width[ae],se){var Q=ce[G*2-2],re=ce[G*2],pe=ce[G*2-1],we=pe+Q*.5+re*.5;if(this.kerning){var Se=ee.kerning[j+ae];Se&&(we+=Se*.001)}ce[G*2+1]=we}else ce[G*2+1]=ce[G*2]*.5;G++}this.textWidth.push(ce.length?ce[G*2-2]*.5+ce[G*2-1]:0)}p.align||(p.align=this.align),this.charBuffer({data:le,type:"uint8",usage:"stream"}),this.sizeBuffer({data:ce,type:"float",usage:"stream"}),o.freeUint8(le),o.freeFloat(ce),z.length&&this.font.forEach(function(ne,Ce){var Ye=u.fontAtlas[Ce],rt=Ye.step,Ke=Math.floor(M.maxAtlasSize/rt),Mt=Math.min(Ke,Ye.chars.length),kt=Math.ceil(Ye.chars.length/Mt),Nt=l(Mt*rt),Gt=l(kt*rt);Ye.width=Nt,Ye.height=Gt,Ye.rows=kt,Ye.cols=Mt,Ye.em&&Ye.texture({data:r({canvas:M.atlasCanvas,font:Ye.fontString,chars:Ye.chars,shape:[Nt,Gt],step:[rt,rt]})})})}if(p.align&&(this.align=p.align,this.alignOffset=this.textWidth.map(function(ne,Ce){var Ye=Array.isArray(u.align)?u.align.length>1?u.align[Ce]:u.align[0]:u.align;if(typeof Ye=="number")return Ye;switch(Ye){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&p.baseline==null&&(p.baseline=0),p.baseline!=null&&(this.baseline=p.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ye=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ye.bottom*.5,typeof ne=="number"?rt+=ne-Ye.baseline:rt+=-Ye[ne],rt*=-1,rt})),p.color!=null)if(p.color||(p.color="transparent"),typeof p.color=="string"||!isNaN(p.color))this.color=t(p.color,"uint8");else{var Ie;if(typeof p.color[0]=="number"&&p.color.length>this.counts.length){var Re=p.color.length;Ie=o.mallocUint8(Re);for(var We=(p.color.subarray||p.color.slice).bind(p.color),at=0;at<Re;at+=4)Ie.set(t(We(at,at+4),"uint8"),at)}else{var nt=p.color.length;Ie=o.mallocUint8(nt*4);for(var tt=0;tt<nt;tt++)Ie.set(t(p.color[tt]||0,"uint8"),tt*4)}this.color=Ie}if(p.position||p.text||p.color||p.baseline||p.align||p.font||p.offset||p.opacity){var qe=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(qe){var he=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(he);for(var ue=0;ue<this.batch.length;ue++)this.batch[ue]={count:this.counts.length>1?this.counts[ue]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ue]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ue*4,ue*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ue]:this.opacity,baseline:this.baselineOffset[ue]!=null?this.baselineOffset[ue]:this.baselineOffset[0],align:this.align?this.alignOffset[ue]!=null?this.alignOffset[ue]:this.alignOffset[0]:0,atlas:this.fontAtlas[ue]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ue*2,ue*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=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function g(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}V.exports=M}}),Lq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?V.exports=x():d.createREGL=x()})(Z,function(){"use strict";var d=function(it,Zt){for(var cr=Object.keys(Zt),oa=0;oa<cr.length;++oa)it[cr[oa]]=Zt[cr[oa]];return it},x=0,S=0,E=5,e=6;function t(it,Zt){this.id=x++,this.type=it,this.data=Zt}function r(it){return it.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function o(it){if(it.length===0)return[];var Zt=it.charAt(0),cr=it.charAt(it.length-1);if(it.length>1&&Zt===cr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var va=[],ya=0;ya<wa.length;++ya)va=va.concat(o(wa[ya]));return va}function a(it){return"["+o(it).join("][")+"]"}function n(it,Zt){return new t(it,a(Zt+""))}function i(it){return typeof it=="function"&&!it._reglType||it instanceof t}function s(it,Zt){if(typeof it=="function")return new t(S,it);if(typeof it=="number"||typeof it=="boolean")return new t(E,it);if(Array.isArray(it))return new t(e,it.map(function(cr,oa){return s(cr,Zt+"["+oa+"]")}));if(it instanceof t)return it}var h={DynamicVariable:t,define:n,isDynamic:i,unbox:s,accessor:a},f={next:typeof requestAnimationFrame=="function"?function(it){return requestAnimationFrame(it)}:function(it){return setTimeout(it,16)},cancel:typeof cancelAnimationFrame=="function"?function(it){return cancelAnimationFrame(it)}:clearTimeout},v=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(){var it={"":0},Zt=[""];return{id:function(cr){var oa=it[cr];return oa||(oa=it[cr]=Zt.length,Zt.push(cr),oa)},str:function(cr){return Zt[cr]}}}function T(it,Zt,cr){var oa=document.createElement("canvas");d(oa.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),it.appendChild(oa),it===document.body&&(oa.style.position="absolute",d(it.style,{margin:0,padding:0}));function wa(){var Ya=window.innerWidth,bi=window.innerHeight;if(it!==document.body){var yi=oa.getBoundingClientRect();Ya=yi.right-yi.left,bi=yi.bottom-yi.top}oa.width=cr*Ya,oa.height=cr*bi}var va;it!==document.body&&typeof ResizeObserver=="function"?(va=new ResizeObserver(function(){setTimeout(wa)}),va.observe(it)):window.addEventListener("resize",wa,!1);function ya(){va?va.disconnect():window.removeEventListener("resize",wa),it.removeChild(oa)}return wa(),{canvas:oa,onDestroy:ya}}function l(it,Zt){function cr(oa){try{return it.getContext(oa,Zt)}catch{return null}}return cr("webgl")||cr("experimental-webgl")||cr("webgl-experimental")}function _(it){return typeof it.nodeName=="string"&&typeof it.appendChild=="function"&&typeof it.getBoundingClientRect=="function"}function w(it){return typeof it.drawArrays=="function"||typeof it.drawElements=="function"}function A(it){return typeof it=="string"?it.split():it}function M(it){return typeof it=="string"?document.querySelector(it):it}function g(it){var Zt=it||{},cr,oa,wa,va,ya={},Ya=[],bi=[],yi=typeof window>"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?cr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?cr=Zt:w(Zt)?(va=Zt,wa=va.canvas):("gl"in Zt?va=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(ya=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(gn=Zt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?wa=cr:oa=cr),!va){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}ya.premultipliedAlpha===void 0&&(ya.premultipliedAlpha=!0),va=l(wa,ya)}return va?{gl:va,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var cr={};function oa(ya){var Ya=ya.toLowerCase(),bi;try{bi=cr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa<Zt.extensions.length;++wa){var va=Zt.extensions[wa];if(!oa(va))return Zt.onDestroy(),Zt.onDone('"'+va+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Zt.optionalExtensions.forEach(oa),{extensions:cr,restore:function(){Object.keys(cr).forEach(function(ya){if(cr[ya]&&!oa(ya))throw new Error("(regl): error restoring extension "+ya)})}}}function p(it,Zt){for(var cr=Array(it),oa=0;oa<it;++oa)cr[oa]=Zt(oa);return cr}var u=5120,y=5121,m=5122,R=5123,L=5124,z=5125,F=5126;function N(it){for(var Zt=16;Zt<=1<<28;Zt*=16)if(it<=Zt)return Zt;return 0}function O(it){var Zt,cr;return Zt=(it>65535)<<4,it>>>=Zt,cr=(it>255)<<3,it>>>=cr,Zt|=cr,cr=(it>15)<<2,it>>>=cr,Zt|=cr,cr=(it>3)<<1,it>>>=cr,Zt|=cr,Zt|it>>1}function P(){var it=p(8,function(){return[]});function Zt(va){var ya=N(va),Ya=it[O(ya)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(ya)}function cr(va){it[O(va.byteLength)>>2].push(va)}function oa(va,ya){var Ya=null;switch(va){case u:Ya=new Int8Array(Zt(ya),0,ya);break;case y:Ya=new Uint8Array(Zt(ya),0,ya);break;case m:Ya=new Int16Array(Zt(2*ya),0,ya);break;case R:Ya=new Uint16Array(Zt(2*ya),0,ya);break;case L:Ya=new Int32Array(Zt(4*ya),0,ya);break;case z:Ya=new Uint32Array(Zt(4*ya),0,ya);break;case F:Ya=new Float32Array(Zt(4*ya),0,ya);break;default:return null}return Ya.length!==ya?Ya.subarray(0,ya):Ya}function wa(va){cr(va.buffer)}return{alloc:Zt,free:cr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,le=3412,ce=3413,de=3414,G=3415,Y=33901,ee=33902,q=3379,se=3386,ae=34921,j=36347,Q=36348,re=35661,pe=35660,we=34930,Se=36349,Ie=34076,Re=34024,We=7936,at=7937,nt=7938,tt=35724,qe=34047,he=36063,ue=34852,ne=3553,Ce=34067,Ye=34069,rt=33984,Ke=6408,Mt=5126,kt=5121,Nt=36160,Gt=36053,Mr=36064,mr=16384,qr=function(it,Zt){var cr=1;Zt.ext_texture_filter_anisotropic&&(cr=it.getParameter(qe));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ue),wa=it.getParameter(he));var va=!!Zt.oes_texture_float;if(va){var ya=it.createTexture();it.bindTexture(ne,ya),it.texImage2D(ne,0,Ke,1,1,0,Ke,Mt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Nt,Ya),it.framebufferTexture2D(Nt,Mr,ne,ya,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Nt)!==Gt)va=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Mt,4);it.readPixels(0,0,1,1,Ke,Mt,bi),it.getError()?va=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(ya),va=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ye,0,Ke,3,3,0,Ke,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(le),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(G),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:cr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(se),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(Ie),maxRenderbufferSize:it.getParameter(Re),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(We),version:it.getParameter(nt),readFloat:va,npotTextureCube:si}},Er=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ir(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Er(it.data))}var _t=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Oe={shape:st,flatten:Ze};function Je(it,Zt,cr){for(var oa=0;oa<Zt;++oa)cr[oa]=it[oa]}function Ae(it,Zt,cr,oa){for(var wa=0,va=0;va<Zt;++va)for(var ya=it[va],Ya=0;Ya<cr;++Ya)oa[wa++]=ya[Ya]}function Le(it,Zt,cr,oa,wa,va){for(var ya=va,Ya=0;Ya<Zt;++Ya)for(var bi=it[Ya],yi=0;yi<cr;++yi)for(var si=bi[yi],gn=0;gn<oa;++gn)wa[ya++]=si[gn]}function Ue(it,Zt,cr,oa,wa){for(var va=1,ya=cr+1;ya<Zt.length;++ya)va*=Zt[ya];var Ya=Zt[cr];if(Zt.length-cr===4){var bi=Zt[cr+1],yi=Zt[cr+2],si=Zt[cr+3];for(ya=0;ya<Ya;++ya)Le(it[ya],bi,yi,si,oa,wa),wa+=va}else for(ya=0;ya<Ya;++ya)Ue(it[ya],Zt,cr+1,oa,wa),wa+=va}function Ze(it,Zt,cr,oa){var wa=1;if(Zt.length)for(var va=0;va<Zt.length;++va)wa*=Zt[va];else wa=0;var ya=oa||U.allocType(cr,wa);switch(Zt.length){case 0:break;case 1:Je(it,Zt[0],ya);break;case 2:Ae(it,Zt[0],Zt[1],ya);break;case 3:Le(it,Zt[0],Zt[1],Zt[2],ya,0);break;default:Ue(it,Zt,0,ya,0)}return ya}function st(it){for(var Zt=[],cr=it;cr.length;cr=cr[0])Zt.push(cr.length);return Zt}var ut={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ut=5120,Ct=5122,Pt=5124,jt=5121,fr=5123,ur=5125,sr=5126,Pr=5126,Ta={int8:Ut,int16:Ct,int32:Pt,uint8:jt,uint16:fr,uint32:ur,float:sr,float32:Pr},Oa=35048,Ia=35040,qa={dynamic:Oa,stream:Ia,static:35044},Wa=Oe.flatten,Ca=Oe.shape,hi=35044,wi=35040,Kt=5121,Dt=5126,Yt=[];Yt[5120]=1,Yt[5122]=2,Yt[5124]=4,Yt[5121]=1,Yt[5123]=2,Yt[5125]=4,Yt[5126]=4;function Jt(it){return ut[Object.prototype.toString.call(it)]|0}function Fr(it,Zt){for(var cr=0;cr<Zt.length;++cr)it[cr]=Zt[cr]}function ta(it,Zt,cr,oa,wa,va,ya){for(var Ya=0,bi=0;bi<cr;++bi)for(var yi=0;yi<oa;++yi)it[Ya++]=Zt[wa*bi+va*yi+ya]}function ra(it,Zt,cr,oa){var wa=0,va={};function ya(ea){this.id=wa++,this.buffer=it.createBuffer(),this.type=ea,this.usage=hi,this.byteLength=0,this.dimension=1,this.dtype=Kt,this.persistentData=null,cr.profile&&(this.stats={size:0})}ya.prototype.bind=function(){it.bindBuffer(this.type,this.buffer)},ya.prototype.destroy=function(){zi(this)};var Ya=[];function bi(ea,Ma){var Qa=Ya.pop();return Qa||(Qa=new ya(ea)),Qa.bind(),gn(Qa,Ma,wi,0,1,!1),Qa}function yi(ea){Ya.push(ea)}function si(ea,Ma,Qa){ea.byteLength=Ma.byteLength,it.bufferData(ea.type,Ma,Qa)}function gn(ea,Ma,Qa,di,Va,Bi){var Li;if(ea.usage=Qa,Array.isArray(Ma)){if(ea.dtype=di||Dt,Ma.length>0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua<Li.length;++Ua)Ha*=Li[Ua];ea.dimension=Ha,hn=Wa(Ma,Li,ea.dtype),si(ea,hn,Qa),Bi?ea.persistentData=hn:U.freeType(hn)}else if(typeof Ma[0]=="number"){ea.dimension=Va;var Yi=U.allocType(ea.dtype,Ma.length);Fr(Yi,Ma),si(ea,Yi,Qa),Bi?ea.persistentData=Yi:U.freeType(Yi)}else Er(Ma[0])&&(ea.dimension=Ma[0].length,ea.dtype=di||Jt(Ma[0])||Dt,hn=Wa(Ma,[Ma.length,Ma[0].length],ea.dtype),si(ea,hn,Qa),Bi?ea.persistentData=hn:U.freeType(hn))}}else if(Er(Ma))ea.dtype=di||Jt(Ma),ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma.buffer)));else if(Ir(Ma)){Li=Ma.shape;var Ri=Ma.stride,Ti=Ma.offset,xi=0,Xi=0,vn=0,Rn=0;Li.length===1?(xi=Li[0],Xi=1,vn=Ri[0],Rn=0):Li.length===2&&(xi=Li[0],Xi=Li[1],vn=Ri[0],Rn=Ri[1]),ea.dtype=di||Jt(Ma.data)||Dt,ea.dimension=Xi;var Ii=U.allocType(ea.dtype,xi*Xi);ta(Ii,Ma.data,xi,Xi,vn,Rn,Ti),si(ea,Ii,Qa),Bi?ea.persistentData=Ii:U.freeType(Ii)}else Ma instanceof ArrayBuffer&&(ea.dtype=Kt,ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma))))}function zi(ea){Zt.bufferCount--,oa(ea);var Ma=ea.buffer;it.deleteBuffer(Ma),ea.buffer=null,delete va[ea.id]}function Ei(ea,Ma,Qa,di){Zt.bufferCount++;var Va=new ya(Ma);va[Va.id]=Va;function Bi(Ha){var Ua=hi,Yi=null,Ri=0,Ti=0,xi=1;return Array.isArray(Ha)||Er(Ha)||Ir(Ha)||Ha instanceof ArrayBuffer?Yi=Ha:typeof Ha=="number"?Ri=Ha|0:Ha&&("data"in Ha&&(Yi=Ha.data),"usage"in Ha&&(Ua=qa[Ha.usage]),"type"in Ha&&(Ti=Ta[Ha.type]),"dimension"in Ha&&(xi=Ha.dimension|0),"length"in Ha&&(Ri=Ha.length|0)),Va.bind(),Yi?gn(Va,Yi,Ua,Ti,xi,di):(Ri&&it.bufferData(Va.type,Ri,Ua),Va.dtype=Ti||Kt,Va.usage=Ua,Va.dimension=xi,Va.byteLength=Ri),cr.profile&&(Va.stats.size=Va.byteLength*Yt[Va.dtype]),Bi}function Li(Ha,Ua){it.bufferSubData(Va.type,Ua,Ha)}function hn(Ha,Ua){var Yi=(Ua||0)|0,Ri;if(Va.bind(),Er(Ha)||Ha instanceof ArrayBuffer)Li(Ha,Yi);else if(Array.isArray(Ha)){if(Ha.length>0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||Er(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ir(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var En=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(En,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,cr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(va).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(va).forEach(function(Ma){ea+=va[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(va).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof ya?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},an=0,tn=1,fn=4,xt=5120,lt=5121,Br=5122,Cr=5123,xr=5124,Rr=5125,Ur=34963,Hr=35040,gt=35044;function Xt(it,Zt,cr,oa){var wa={},va=0,ya={uint8:lt,uint16:Cr};Zt.oes_element_index_uint&&(ya.uint32=Rr);function Ya(Na){this.id=va++,wa[this.id]=this,this.buffer=Na,this.primType=fn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(cr.create(null,Ur,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!Er(ea)||Ir(ea)&&!Er(ea.data))&&(hn=Zt.oes_element_index_uint?Rr:Cr),cr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||lt,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case lt:case xt:Li=lt;break;case Cr:case Br:Li=Cr;break;case Rr:case xr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=fn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=an),Yi===2&&(Ua=tn),Yi===3&&(Ua=fn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=cr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=fn,Qa.vertCount=0,Qa.type=lt;else if(typeof Va=="number")Ma(Va),Qa.primType=fn,Qa.vertCount=Va|0,Qa.type=lt;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Er(Va)||Ir(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=ya[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Rr||Yi===xr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),cr=0;cr<it.length;++cr)if(isNaN(it[cr]))Zt[cr]=65535;else if(it[cr]===1/0)Zt[cr]=31744;else if(it[cr]===-1/0)Zt[cr]=64512;else{vr[0]=it[cr];var oa=Or[0],wa=oa>>>31<<15,va=(oa<<1>>>24)-127,ya=oa>>13&1023;if(va<-24)Zt[cr]=wa;else if(va<-14){var Ya=-14-va;Zt[cr]=wa+(ya+1024>>Ya)}else va>15?Zt[cr]=wa+31744:Zt[cr]=wa+(va+15<<10)+ya}return Zt}function ma(it){return Array.isArray(it)||Er(it)}var la=34467,_a=3553,Ai=34067,ki=34069,Ki=6408,yn=6406,Ln=6407,kn=6409,Bn=6410,ao=32854,xo=32855,Co=36194,Fs=32819,Mn=32820,Ao=33635,On=34042,ts=6402,is=34041,_s=35904,Oo=35906,io=36193,Gn=33776,eo=33777,ns=33778,gs=33779,Ls=35986,Xo=35987,Gi=34798,Pn=35840,js=35841,xs=35842,Hn=35843,Os=36196,ds=5121,Xs=5123,il=5125,_n=5126,Lo=10242,bo=10243,Rs=10497,pu=33071,uo=33648,Gs=10240,vl=10241,As=9728,qs=9729,us=9984,Ss=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,Ss,su],ml=[0,kn,Bn,Ln,Ki],bs={};bs[kn]=bs[yn]=bs[ts]=1,bs[is]=bs[Bn]=2,bs[Ln]=bs[_s]=3,bs[Ki]=bs[Oo]=4;function Zs(it){return"[object "+it+"]"}var nc=Zs("HTMLCanvasElement"),Ul=Zs("OffscreenCanvas"),qu=Zs("CanvasRenderingContext2D"),fl=Zs("ImageBitmap"),xh=Zs("HTMLImageElement"),ss=Zs("HTMLVideoElement"),bh=Object.keys(ut).concat([nc,Ul,qu,fl,xh,ss]),ks=[];ks[ds]=1,ks[_n]=4,ks[io]=2,ks[Xs]=2,ks[il]=4;var to=[];to[ao]=2,to[xo]=2,to[Co]=2,to[is]=4,to[Gn]=.5,to[eo]=.5,to[ns]=1,to[gs]=1,to[Ls]=.5,to[Xo]=1,to[Gi]=1,to[Pn]=.5,to[js]=.25,to[xs]=.5,to[Hn]=.25,to[Os]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ma(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ss}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Ir(it)}function jc(it){return ut[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var cr=Zt.length;switch(it.type){case ds:case Xs:case il:case _n:var oa=U.allocType(it.type,cr);oa.set(Zt),it.data=oa;break;case io:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===io?_n:it.type,Zt)}function Gu(it,Zt){it.type===io?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,cr,oa,wa,va){for(var ya=it.width,Ya=it.height,bi=it.channels,yi=ya*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi<Ya;++zi)for(var Ei=0;Ei<ya;++Ei)for(var Na=0;Na<bi;++Na)si[gn++]=Zt[cr*Ei+oa*zi+wa*Na+va];Gu(it,si)}function oc(it,Zt,cr,oa,wa,va){var ya;if(typeof to[it]<"u"?ya=to[it]:ya=bs[it]*ks[Zt],va&&(ya*=6),wa){for(var Ya=0,bi=cr;bi>=1;)Ya+=ya*bi*bi,bi/=2;return Ya}else return ya*cr*oa}function Xc(it,Zt,cr,oa,wa,va,ya){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Rs,clamp:pu,mirror:uo},yi={nearest:As,linear:qs},si=d({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":Ss,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),gn={none:0,browser:ic},zi={uint8:ds,rgba4:Fs,rgb565:Ao,"rgb5 a1":Mn},Ei={alpha:yn,luminance:kn,"luminance alpha":Bn,rgb:Ln,rgba:Ki,rgba4:ao,"rgb5 a1":xo,rgb565:Co},Na={};Zt.ext_srgb&&(Ei.srgb=_s,Ei.srgba=Oo),Zt.oes_texture_float&&(zi.float32=zi.float=_n),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=io),Zt.webgl_depth_texture&&(d(Ei,{depth:ts,"depth stencil":is}),d(zi,{uint16:Xs,uint32:il,"depth stencil":On})),Zt.webgl_compressed_texture_s3tc&&d(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":eo,"rgba s3tc dxt3":ns,"rgba s3tc dxt5":gs}),Zt.webgl_compressed_texture_atc&&d(Na,{"rgb atc":Ls,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&d(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":js,"rgba pvrtc 4bppv1":xs,"rgba pvrtc 2bppv1":Hn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Os);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);cr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===kn||vt===yn||vt===kn||vt===Bn||vt===ts||vt===is||Zt.ext_srgb&&(vt===_s||vt===Oo)?ke[vt]=vt:vt===xo||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Ln,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ds,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,wr=ke.height,Nr=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],wr=Qe.shape[1],Qe.shape.length===3&&(Nr=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=wr=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(wr=Qe.height),"channels"in Qe&&(Nr=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=wr|0,ke.channels=Nr|0;var mt=!1;if("format"in Qe){var St=Qe.format,Ft=ke.internalformat=Ei[St];ke.format=hn[Ft],St in zi&&("type"in Qe||(ke.type=zi[St])),St in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=bs[ke.format]:pr&&!mt&&ke.channels!==ml[ke.format]&&(ke.format=ke.internalformat=ml[ke.channels])}}function Ri(ke){it.pixelStorei(Hc,ke.flipY),it.pixelStorei(lu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=wa.viewportWidth,wr=wa.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||wr-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(Er(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ds&&(ke.type=jc(vt));else if(Wc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ir(vt)){var Nr=vt.data;!Array.isArray(Nr)&&ke.type===ds&&(ke.type=jc(Nr));var pr=vt.shape,mt=vt.stride,St,Ft,rr,hr,nr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),St=pr[0],Ft=pr[1],hr=mt[0],nr=mt[1],ke.alignment=1,ke.width=St,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=ml[rr],ke.needsFree=!0,Ef(ke,Nr,hr,nr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if($l(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var or=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ma(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Vt=Oe.shape(vt),Dr=1,Jr=0;Jr<Vt.length;++Jr)Dr*=Vt[Jr];var ga=Nf(ke,Dr);Oe.flatten(vt,Vt,"",ga),Gu(ke,ga),ke.alignment=1,ke.width=or,ke.height=Wt,ke.channels=ir,ke.format=ke.internalformat=ml[ir],ke.needsFree=!0}ke.type===_n||ke.type}function Xi(ke,Qe,vt){var qt=ke.element,wr=ke.data,Nr=ke.internalformat,pr=ke.format,mt=ke.type,St=ke.width,Ft=ke.height;Ri(ke),qt?it.texImage2D(Qe,vt,pr,pr,mt,qt):ke.compressed?it.compressedTexImage2D(Qe,vt,Nr,St,Ft,0,wr):ke.needsCopy?(oa(),it.copyTexImage2D(Qe,vt,pr,ke.xOffset,ke.yOffset,St,Ft,0)):it.texImage2D(Qe,vt,pr,St,Ft,0,pr,mt,wr||null)}function vn(ke,Qe,vt,qt,wr){var Nr=ke.element,pr=ke.data,mt=ke.internalformat,St=ke.format,Ft=ke.type,rr=ke.width,hr=ke.height;Ri(ke),Nr?it.texSubImage2D(Qe,wr,vt,qt,St,Ft,Nr):ke.compressed?it.compressedTexSubImage2D(Qe,wr,vt,qt,mt,rr,hr,pr):ke.needsCopy?(oa(),it.copyTexSubImage2D(Qe,wr,vt,qt,ke.xOffset,ke.yOffset,rr,hr)):it.texSubImage2D(Qe,wr,vt,qt,rr,hr,St,Ft,pr)}var Rn=[];function Ii(){return Rn.pop()||new Ti}function nn(ke){ke.needsFree&&U.freeType(ke.data),Ti.call(ke),Rn.push(ke)}function En(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=du,this.mipmask=0,this.images=Array(16)}function Dn(ke,Qe,vt){var qt=ke.images[0]=Ii();ke.mipmask=1,qt.width=ke.width=Qe,qt.height=ke.height=vt,qt.channels=ke.channels=4}function Xn(ke,Qe){var vt=null;if(of(Qe))vt=ke.images[0]=Ii(),Ua(vt,ke),xi(vt,Qe),ke.mipmask=1;else if(Yi(ke,Qe),Array.isArray(Qe.mipmap))for(var qt=Qe.mipmap,wr=0;wr<qt.length;++wr)vt=ke.images[wr]=Ii(),Ua(vt,ke),vt.width>>=wr,vt.height>>=wr,xi(vt,qt[wr]),ke.mipmask|=1<<wr;else vt=ke.images[0]=Ii(),Ua(vt,ke),xi(vt,Qe),ke.mipmask=1;Ua(ke,ke.images[0]),ke.compressed&&(ke.internalformat===Gn||ke.internalformat===eo||ke.internalformat===ns||ke.internalformat)}function zs(ke,Qe){for(var vt=ke.images,qt=0;qt<vt.length;++qt){if(!vt[qt])return;Xi(vt[qt],Qe,qt)}}var bl=[];function ho(){var ke=bl.pop()||new En;Ha.call(ke),ke.mipmask=0;for(var Qe=0;Qe<16;++Qe)ke.images[Qe]=null;return ke}function Wl(ke){for(var Qe=ke.images,vt=0;vt<Qe.length;++vt)Qe[vt]&&nn(Qe[vt]),Qe[vt]=null;bl.push(ke)}function fs(){this.minFilter=As,this.magFilter=As,this.wrapS=pu,this.wrapT=pu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=du}function Sl(ke,Qe){if("min"in Qe){var vt=Qe.min;ke.minFilter=si[vt],nl.indexOf(ke.minFilter)>=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var wr=ke.wrapS,Nr=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;wr=bi[mt]}if("wrapT"in Qe){var St=Qe.wrapT;Nr=bi[St]}}if(ke.wrapS=wr,ke.wrapT=Nr,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=us)}}function kl(ke,Qe){it.texParameteri(Qe,vl,ke.minFilter),it.texParameteri(Qe,Gs,ke.magFilter),it.texParameteri(Qe,Lo,ke.wrapS),it.texParameteri(Qe,bo,ke.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var tu=0,Vs={},pl=cr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Zn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,ya.profile&&(this.stats={size:0})}function Cl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Po(){var ke=wl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(_a,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),wl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete Vs[ke.id],va.textureCount--}d(Zn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt<pl;++vt){var qt=wl[vt];if(qt){if(qt.bindCount>0)continue;qt.unit=-1}wl[vt]=ke,Qe=vt;break}Qe>=pl,ya.profile&&va.maxTextureUnits<Qe+1&&(va.maxTextureUnits=Qe+1),ke.unit=Qe,it.activeTexture(Ou+Qe),it.bindTexture(ke.target,ke.texture)}return Qe},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ge(this)}});function K(ke,Qe){var vt=new Zn(_a);Vs[vt.id]=vt,va.textureCount++;function qt(pr,mt){var St=vt.texInfo;fs.call(St);var Ft=ho();return typeof pr=="number"?typeof mt=="number"?Dn(Ft,pr|0,mt|0):Dn(Ft,pr|0,pr|0):pr?(Sl(St,pr),Xn(Ft,pr)):Dn(Ft,1,1),St.genMipmaps&&(Ft.mipmask=(Ft.width<<1)-1),vt.mipmask=Ft.mipmask,Ua(vt,Ft),vt.internalformat=Ft.internalformat,qt.width=Ft.width,qt.height=Ft.height,Cl(vt),zs(Ft,_a),kl(St,_a),Po(),Wl(Ft),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Ft.width,Ft.height,St.genMipmaps,!1)),qt.format=Qa[vt.internalformat],qt.type=di[vt.type],qt.mag=Va[St.magFilter],qt.min=Bi[St.minFilter],qt.wrapS=Li[St.wrapS],qt.wrapT=Li[St.wrapT],qt}function wr(pr,mt,St,Ft){var rr=mt|0,hr=St|0,nr=Ft|0,dr=Ii();return Ua(dr,vt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(vt.width>>nr)-rr,dr.height=dr.height||(vt.height>>nr)-hr,Cl(vt),vn(dr,_a,rr,hr,nr),Po(),nn(dr),qt}function Nr(pr,mt){var St=pr|0,Ft=mt|0||St;if(St===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=St,qt.height=vt.height=Ft,Cl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=St>>rr,nr=Ft>>rr;if(!hr||!nr)break;it.texImage2D(_a,rr,vt.format,hr,nr,0,vt.format,vt.type,null)}return Po(),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,St,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=wr,qt.resize=Nr,qt._reglType="texture2d",qt._texture=vt,ya.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,wr,Nr){var pr=new Zn(Ai);Vs[pr.id]=pr,va.cubeCount++;var mt=new Array(6);function St(hr,nr,dr,or,Wt,ir){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)mt[Vt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(mt[Vt],Jr,Jr)}else if(typeof hr=="object")if(nr)Xn(mt[0],hr),Xn(mt[1],nr),Xn(mt[2],dr),Xn(mt[3],or),Xn(mt[4],Wt),Xn(mt[5],ir);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(mt[Vt],pr),Xn(mt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Xn(mt[Vt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,St.width=mt[0].width,St.height=mt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)zs(mt[Vt],ki+Vt);for(kl(Dr,Ai),Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,Dr.genMipmaps,!0)),St.format=Qa[pr.internalformat],St.type=di[pr.type],St.mag=Va[Dr.magFilter],St.min=Bi[Dr.minFilter],St.wrapS=Li[Dr.wrapS],St.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(mt[Vt]);return St}function Ft(hr,nr,dr,or,Wt){var ir=dr|0,Vt=or|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,nr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),vn(Jr,ki+hr,ir,Vt,Dr),Po(),nn(Jr),St}function rr(hr){var nr=hr|0;if(nr!==pr.width){St.width=pr.width=nr,St.height=pr.height=nr,Cl(pr);for(var dr=0;dr<6;++dr)for(var or=0;pr.mipmask>>or;++or)it.texImage2D(ki+dr,or,pr.format,nr>>or,nr>>or,0,pr.format,pr.type,null);return Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,!1,!0)),St}}return St(ke,Qe,vt,qt,wr,Nr),St.subimage=Ft,St.resize=rr,St._reglType="textureCube",St._texture=pr,ya.profile&&(St.stats=pr.stats),St.destroy=function(){pr.decRef()},St}function te(){for(var ke=0;ke<pl;++ke)it.activeTexture(Ou+ke),it.bindTexture(_a,null),wl[ke]=null;_t(Vs).forEach(ge),va.cubeCount=0,va.textureCount=0}ya.profile&&(va.getTotalTextureSize=function(){var ke=0;return Object.keys(Vs).forEach(function(Qe){ke+=Vs[Qe].stats.size}),ke});function ye(){for(var ke=0;ke<pl;++ke){var Qe=wl[ke];Qe&&(Qe.bindCount=0,Qe.unit=-1,wl[ke]=null)}_t(Vs).forEach(function(vt){vt.texture=it.createTexture(),it.bindTexture(vt.target,vt.texture);for(var qt=0;qt<32;++qt)if(vt.mipmask&1<<qt)if(vt.target===_a)it.texImage2D(_a,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);kl(vt.texInfo,vt.target)})}function je(){for(var ke=0;ke<pl;++ke){var Qe=wl[ke];Qe&&(Qe.bindCount=0,Qe.unit=-1,wl[ke]=null),it.activeTexture(Ou+ke),it.bindTexture(_a,null),it.bindTexture(Ai,null)}}return{create2D:K,createCube:xe,clear:te,getTexture:function(ke){return null},restore:ye,refresh:je}}var Ql=36161,qc=32854,Sc=32855,Ys=36194,kf=33189,fh=36168,Uf=34041,Zc=35907,$f=34836,Cu=34842,jf=34843,yl=[];yl[qc]=2,yl[Sc]=2,yl[Ys]=2,yl[kf]=2,yl[fh]=1,yl[Uf]=4,yl[Zc]=4,yl[$f]=16,yl[Cu]=8,yl[jf]=6;function Lu(it,Zt,cr){return yl[it]*Zt*cr}var Mc=function(it,Zt,cr,oa,wa){var va={rgba4:qc,rgb565:Ys,"rgb5 a1":Sc,depth:kf,stencil:fh,"depth stencil":Uf};Zt.ext_srgb&&(va.srgba=Zc),Zt.ext_color_buffer_half_float&&(va.rgba16f=Cu,va.rgb16f=jf),Zt.webgl_color_buffer_float&&(va.rgba32f=$f);var ya=[];Object.keys(va).forEach(function(Ei){var Na=va[Ei];ya[Na]=Ei});var Ya=0,bi={};function yi(Ei){this.id=Ya++,this.refCount=1,this.renderbuffer=Ei,this.format=qc,this.width=0,this.height=0,wa.profile&&(this.stats={size:0})}yi.prototype.decRef=function(){--this.refCount<=0&&si(this)};function si(Ei){var Na=Ei.renderbuffer;it.bindRenderbuffer(Ql,null),it.deleteRenderbuffer(Na),Ei.renderbuffer=null,Ei.refCount=0,delete bi[Ei.id],oa.renderbufferCount--}function gn(Ei,Na){var ea=new yi(it.createRenderbuffer());bi[ea.id]=ea,oa.renderbufferCount++;function Ma(di,Va){var Bi=0,Li=0,hn=qc;if(typeof di=="object"&&di){var Ha=di;if("shape"in Ha){var Ua=Ha.shape;Bi=Ua[0]|0,Li=Ua[1]|0}else"radius"in Ha&&(Bi=Li=Ha.radius|0),"width"in Ha&&(Bi=Ha.width|0),"height"in Ha&&(Li=Ha.height|0);"format"in Ha&&(hn=va[Ha.format])}else typeof di=="number"?(Bi=di|0,typeof Va=="number"?Li=Va|0:Li=Bi):di||(Bi=Li=1);if(!(Bi===ea.width&&Li===ea.height&&hn===ea.format))return Ma.width=ea.width=Bi,Ma.height=ea.height=Li,ea.format=hn,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,hn,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ma.format=ya[ea.format],Ma}function Qa(di,Va){var Bi=di|0,Li=Va|0||Bi;return Bi===ea.width&&Li===ea.height||(Ma.width=ea.width=Bi,Ma.height=ea.height=Li,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,ea.format,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height))),Ma}return Ma(Ei,Na),Ma.resize=Qa,Ma._reglType="renderbuffer",Ma._renderbuffer=ea,wa.profile&&(Ma.stats=ea.stats),Ma.destroy=function(){ea.decRef()},Ma}wa.profile&&(oa.getTotalRenderbufferSize=function(){var Ei=0;return Object.keys(bi).forEach(function(Na){Ei+=bi[Na].stats.size}),Ei});function zi(){_t(bi).forEach(function(Ei){Ei.renderbuffer=it.createRenderbuffer(),it.bindRenderbuffer(Ql,Ei.renderbuffer),it.renderbufferStorage(Ql,Ei.format,Ei.width,Ei.height)}),it.bindRenderbuffer(Ql,null)}return{create:gn,clear:function(){_t(bi).forEach(si)},restore:zi}},ol=36160,vc=36161,yu=3553,Tu=34069,El=36064,qf=36096,Qf=36128,Bu=33306,Ec=36053,mc=36193,Lh=5121,sf=5126,vf=6407,Nu=6408,lf=[];lf[Nu]=4,lf[vf]=3;var au=[];au[Lh]=1,au[sf]=4,au[mc]=2;function Yc(it,Zt,cr,oa,wa,va){var ya={cur:null,next:null,dirty:!1,setFBO:null},Ya=["rgba"],bi=["rgba4","rgb565","rgb5 a1"];Zt.ext_srgb&&bi.push("srgba"),Zt.ext_color_buffer_half_float&&bi.push("rgba16f","rgb16f"),Zt.webgl_color_buffer_float&&bi.push("rgba32f");var yi=["uint8"];Zt.oes_texture_half_float&&yi.push("half float","float16"),Zt.oes_texture_float&&yi.push("float","float32");function si(Ti,xi,Xi){this.target=Ti,this.texture=xi,this.renderbuffer=Xi;var vn=0,Rn=0;xi?(vn=xi.width,Rn=xi.height):Xi&&(vn=Xi.width,Rn=Xi.height),this.width=vn,this.height=Rn}function gn(Ti){Ti&&(Ti.texture&&Ti.texture._texture.decRef(),Ti.renderbuffer&&Ti.renderbuffer._renderbuffer.decRef())}function zi(Ti,xi,Xi){if(Ti)if(Ti.texture){var vn=Ti.texture._texture,Rn=Math.max(1,vn.width),Ii=Math.max(1,vn.height);vn.refCount+=1}else{var nn=Ti.renderbuffer._renderbuffer;nn.refCount+=1}}function Ei(Ti,xi){xi&&(xi.texture?it.framebufferTexture2D(ol,Ti,xi.target,xi.texture._texture.texture,0):it.framebufferRenderbuffer(ol,Ti,vc,xi.renderbuffer._renderbuffer.renderbuffer))}function Na(Ti){var xi=yu,Xi=null,vn=null,Rn=Ti;typeof Ti=="object"&&(Rn=Ti.data,"target"in Ti&&(xi=Ti.target|0));var Ii=Rn._reglType;return Ii==="texture2d"||Ii==="textureCube"?Xi=Rn:Ii==="renderbuffer"&&(vn=Rn,xi=vc),new si(xi,Xi,vn)}function ea(Ti,xi,Xi,vn,Rn){if(Xi){var Ii=oa.create2D({width:Ti,height:xi,format:vn,type:Rn});return Ii._texture.refCount=0,new si(yu,Ii,null)}else{var nn=wa.create({width:Ti,height:xi,format:vn});return nn._renderbuffer.refCount=0,new si(vc,null,nn)}}function Ma(Ti){return Ti&&(Ti.texture||Ti.renderbuffer)}function Qa(Ti,xi,Xi){Ti&&(Ti.texture?Ti.texture.resize(xi,Xi):Ti.renderbuffer&&Ti.renderbuffer.resize(xi,Xi),Ti.width=xi,Ti.height=Xi)}var di=0,Va={};function Bi(){this.id=di++,Va[this.id]=this,this.framebuffer=it.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Li(Ti){Ti.colorAttachments.forEach(gn),gn(Ti.depthAttachment),gn(Ti.stencilAttachment),gn(Ti.depthStencilAttachment)}function hn(Ti){var xi=Ti.framebuffer;it.deleteFramebuffer(xi),Ti.framebuffer=null,va.framebufferCount--,delete Va[Ti.id]}function Ha(Ti){var xi;it.bindFramebuffer(ol,Ti.framebuffer);var Xi=Ti.colorAttachments;for(xi=0;xi<Xi.length;++xi)Ei(El+xi,Xi[xi]);for(xi=Xi.length;xi<cr.maxColorAttachments;++xi)it.framebufferTexture2D(ol,El+xi,yu,null,0);it.framebufferTexture2D(ol,Bu,yu,null,0),it.framebufferTexture2D(ol,qf,yu,null,0),it.framebufferTexture2D(ol,Qf,yu,null,0),Ei(qf,Ti.depthAttachment),Ei(Qf,Ti.stencilAttachment),Ei(Bu,Ti.depthStencilAttachment);var vn=it.checkFramebufferStatus(ol);it.isContextLost(),it.bindFramebuffer(ol,ya.next?ya.next.framebuffer:null),ya.cur=ya.next,it.getError()}function Ua(Ti,xi){var Xi=new Bi;va.framebufferCount++;function vn(Ii,nn){var En,Dn=0,Xn=0,zs=!0,bl=!0,ho=null,Wl=!0,fs="rgba",Sl="uint8",kl=1,tu=null,Vs=null,pl=null,wl=!1;if(typeof Ii=="number")Dn=Ii|0,Xn=nn|0||Dn;else if(!Ii)Dn=Xn=1;else{var Zn=Ii;if("shape"in Zn){var Cl=Zn.shape;Dn=Cl[0],Xn=Cl[1]}else"radius"in Zn&&(Dn=Xn=Zn.radius),"width"in Zn&&(Dn=Zn.width),"height"in Zn&&(Xn=Zn.height);("color"in Zn||"colors"in Zn)&&(ho=Zn.color||Zn.colors,Array.isArray(ho)),ho||("colorCount"in Zn&&(kl=Zn.colorCount|0),"colorTexture"in Zn&&(Wl=!!Zn.colorTexture,fs="rgba4"),"colorType"in Zn&&(Sl=Zn.colorType,Wl||(Sl==="half float"||Sl==="float16"?fs="rgba16f":(Sl==="float"||Sl==="float32")&&(fs="rgba32f"))),"colorFormat"in Zn&&(fs=Zn.colorFormat,Ya.indexOf(fs)>=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Zn||"depthStencilTexture"in Zn)&&(wl=!!(Zn.depthTexture||Zn.depthStencilTexture)),"depth"in Zn&&(typeof Zn.depth=="boolean"?zs=Zn.depth:(tu=Zn.depth,bl=!1)),"stencil"in Zn&&(typeof Zn.stencil=="boolean"?bl=Zn.stencil:(Vs=Zn.stencil,zs=!1)),"depthStencil"in Zn&&(typeof Zn.depthStencil=="boolean"?zs=bl=Zn.depthStencil:(pl=Zn.depthStencil,zs=!1,bl=!1))}var Po=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Po=ho.map(Na);else if(ho)Po=[Na(ho)];else for(Po=new Array(kl),En=0;En<kl;++En)Po[En]=ea(Dn,Xn,Wl,fs,Sl);Dn=Dn||Po[0].width,Xn=Xn||Po[0].height,tu?ge=Na(tu):zs&&!bl&&(ge=ea(Dn,Xn,wl,"depth","uint32")),Vs?K=Na(Vs):bl&&!zs&&(K=ea(Dn,Xn,!1,"stencil","uint8")),pl?xe=Na(pl):!tu&&!Vs&&bl&&zs&&(xe=ea(Dn,Xn,wl,"depth stencil","depth stencil"));var te=null;for(En=0;En<Po.length;++En)if(zi(Po[En],Dn,Xn),Po[En]&&Po[En].texture){var ye=lf[Po[En].texture._texture.format]*au[Po[En].texture._texture.type];te===null&&(te=ye)}return zi(ge,Dn,Xn),zi(K,Dn,Xn),zi(xe,Dn,Xn),Li(Xi),Xi.width=Dn,Xi.height=Xn,Xi.colorAttachments=Po,Xi.depthAttachment=ge,Xi.stencilAttachment=K,Xi.depthStencilAttachment=xe,vn.color=Po.map(Ma),vn.depth=Ma(ge),vn.stencil=Ma(K),vn.depthStencil=Ma(xe),vn.width=Xi.width,vn.height=Xi.height,Ha(Xi),vn}function Rn(Ii,nn){var En=Math.max(Ii|0,1),Dn=Math.max(nn|0||En,1);if(En===Xi.width&&Dn===Xi.height)return vn;for(var Xn=Xi.colorAttachments,zs=0;zs<Xn.length;++zs)Qa(Xn[zs],En,Dn);return Qa(Xi.depthAttachment,En,Dn),Qa(Xi.stencilAttachment,En,Dn),Qa(Xi.depthStencilAttachment,En,Dn),Xi.width=vn.width=En,Xi.height=vn.height=Dn,Ha(Xi),vn}return vn(Ti,xi),d(vn,{resize:Rn,_reglType:"framebuffer",_framebuffer:Xi,destroy:function(){hn(Xi),Li(Xi)},use:function(Ii){ya.setFBO({framebuffer:vn},Ii)}})}function Yi(Ti){var xi=Array(6);function Xi(Rn){var Ii,nn={color:null},En=0,Dn=null,Xn="rgba",zs="uint8",bl=1;if(typeof Rn=="number")En=Rn|0;else if(!Rn)En=1;else{var ho=Rn;if("shape"in ho){var Wl=ho.shape;En=Wl[0]}else"radius"in ho&&(En=ho.radius|0),"width"in ho?(En=ho.width|0,"height"in ho):"height"in ho&&(En=ho.height|0);("color"in ho||"colors"in ho)&&(Dn=ho.color||ho.colors,Array.isArray(Dn)),Dn||("colorCount"in ho&&(bl=ho.colorCount|0),"colorType"in ho&&(zs=ho.colorType),"colorFormat"in ho&&(Xn=ho.colorFormat)),"depth"in ho&&(nn.depth=ho.depth),"stencil"in ho&&(nn.stencil=ho.stencil),"depthStencil"in ho&&(nn.depthStencil=ho.depthStencil)}var fs;if(Dn)if(Array.isArray(Dn))for(fs=[],Ii=0;Ii<Dn.length;++Ii)fs[Ii]=Dn[Ii];else fs=[Dn];else{fs=Array(bl);var Sl={radius:En,format:Xn,type:zs};for(Ii=0;Ii<bl;++Ii)fs[Ii]=oa.createCube(Sl)}for(nn.color=Array(fs.length),Ii=0;Ii<fs.length;++Ii){var kl=fs[Ii];En=En||kl.width,nn.color[Ii]={target:Tu,data:fs[Ii]}}for(Ii=0;Ii<6;++Ii){for(var tu=0;tu<fs.length;++tu)nn.color[tu].target=Tu+Ii;Ii>0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return d(Xi,{width:En,height:En,color:fs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var En=Xi.color;for(Ii=0;Ii<En.length;++Ii)En[Ii].resize(nn);for(Ii=0;Ii<6;++Ii)xi[Ii].resize(nn);return Xi.width=Xi.height=nn,Xi}return Xi(Ti),d(Xi,{faces:xi,resize:vn,_reglType:"framebufferCube",destroy:function(){xi.forEach(function(Rn){Rn.destroy()})}})}function Ri(){ya.cur=null,ya.next=null,ya.dirty=!0,_t(Va).forEach(function(Ti){Ti.framebuffer=it.createFramebuffer(),Ha(Ti)})}return d(ya,{getFramebuffer:function(Ti){if(typeof Ti=="function"&&Ti._reglType==="framebuffer"){var xi=Ti._framebuffer;if(xi instanceof Bi)return xi}return null},create:Ua,createCube:Yi,clear:function(){_t(Va).forEach(hn)},restore:Ri})}var hh=5126,mf=34962,sl=34963;function _u(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=hh,this.offset=0,this.stride=0,this.divisor=0}function Pu(it,Zt,cr,oa,wa,va,ya){for(var Ya=cr.maxAttributes,bi=new Array(Ya),yi=0;yi<Ya;++yi)bi[yi]=new _u;var si=0,gn={},zi={Record:_u,scope:{},state:bi,currentVAO:null,targetVAO:null,restore:Na()?Li:function(){},createVAO:hn,getVAO:Ma,destroyBuffer:Ei,setVAO:Na()?Qa:di,clear:Na()?Va:function(){}};function Ei(Ha){for(var Ua=0;Ua<bi.length;++Ua){var Yi=bi[Ua];Yi.buffer===Ha&&(it.disableVertexAttribArray(Ua),Yi.buffer=null)}}function Na(){return Zt.oes_vertex_array_object}function ea(){return Zt.angle_instanced_arrays}function Ma(Ha){return typeof Ha=="function"&&Ha._vao?Ha._vao:null}function Qa(Ha){if(Ha!==zi.currentVAO){var Ua=Na();Ha?Ua.bindVertexArrayOES(Ha.vao):Ua.bindVertexArrayOES(null),zi.currentVAO=Ha}}function di(Ha){if(Ha!==zi.currentVAO){if(Ha)Ha.bindAttrs();else{for(var Ua=ea(),Yi=0;Yi<bi.length;++Yi){var Ri=bi[Yi];Ri.buffer?(it.enableVertexAttribArray(Yi),Ri.buffer.bind(),it.vertexAttribPointer(Yi,Ri.size,Ri.type,Ri.normalized,Ri.stride,Ri.offfset),Ua&&Ri.divisor&&Ua.vertexAttribDivisorANGLE(Yi,Ri.divisor)):(it.disableVertexAttribArray(Yi),it.vertexAttrib4f(Yi,Ri.x,Ri.y,Ri.z,Ri.w))}ya.elements?it.bindBuffer(sl,ya.elements.buffer.buffer):it.bindBuffer(sl,null)}zi.currentVAO=Ha}}function Va(){_t(gn).forEach(function(Ha){Ha.destroy()})}function Bi(){this.id=++si,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ha=Na();Ha?this.vao=Ha.createVertexArrayOES():this.vao=null,gn[this.id]=this,this.buffers=[]}Bi.prototype.bindAttrs=function(){for(var Ha=ea(),Ua=this.attributes,Yi=0;Yi<Ua.length;++Yi){var Ri=Ua[Yi];Ri.buffer?(it.enableVertexAttribArray(Yi),it.bindBuffer(mf,Ri.buffer.buffer),it.vertexAttribPointer(Yi,Ri.size,Ri.type,Ri.normalized,Ri.stride,Ri.offset),Ha&&Ri.divisor&&Ha.vertexAttribDivisorANGLE(Yi,Ri.divisor)):(it.disableVertexAttribArray(Yi),it.vertexAttrib4f(Yi,Ri.x,Ri.y,Ri.z,Ri.w))}for(var Ti=Ua.length;Ti<Ya;++Ti)it.disableVertexAttribArray(Ti);var xi=va.getElements(this.elements);xi?it.bindBuffer(sl,xi.buffer.buffer):it.bindBuffer(sl,null)},Bi.prototype.refresh=function(){var Ha=Na();Ha&&(Ha.bindVertexArrayOES(this.vao),this.bindAttrs(),zi.currentVAO=null,Ha.bindVertexArrayOES(null))},Bi.prototype.destroy=function(){if(this.vao){var Ha=Na();this===zi.currentVAO&&(zi.currentVAO=null,Ha.bindVertexArrayOES(null)),Ha.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),gn[this.id]&&(delete gn[this.id],oa.vaoCount-=1)};function Li(){var Ha=Na();Ha&&_t(gn).forEach(function(Ua){Ua.refresh()})}function hn(Ha){var Ua=new Bi;oa.vaoCount+=1;function Yi(Ri){var Ti;if(Array.isArray(Ri))Ti=Ri,Ua.elements&&Ua.ownsElements&&Ua.elements.destroy(),Ua.elements=null,Ua.ownsElements=!1,Ua.offset=0,Ua.count=0,Ua.instances=-1,Ua.primitive=4;else{if(Ri.elements){var xi=Ri.elements;Ua.ownsElements?typeof xi=="function"&&xi._reglType==="elements"?(Ua.elements.destroy(),Ua.ownsElements=!1):(Ua.elements(xi),Ua.ownsElements=!1):va.getElements(Ri.elements)?(Ua.elements=Ri.elements,Ua.ownsElements=!1):(Ua.elements=va.create(Ri.elements),Ua.ownsElements=!0)}else Ua.elements=null,Ua.ownsElements=!1;Ti=Ri.attributes,Ua.offset=0,Ua.count=-1,Ua.instances=-1,Ua.primitive=4,Ua.elements&&(Ua.count=Ua.elements._elements.vertCount,Ua.primitive=Ua.elements._elements.primType),"offset"in Ri&&(Ua.offset=Ri.offset|0),"count"in Ri&&(Ua.count=Ri.count|0),"instances"in Ri&&(Ua.instances=Ri.instances|0),"primitive"in Ri&&(Ua.primitive=Ra[Ri.primitive])}var Xi={},vn=Ua.attributes;vn.length=Ti.length;for(var Rn=0;Rn<Ti.length;++Rn){var Ii=Ti[Rn],nn=vn[Rn]=new _u,En=Ii.data||Ii;if(Array.isArray(En)||Er(En)||Ir(En)){var Dn;Ua.buffers[Rn]&&(Dn=Ua.buffers[Rn],Er(En)&&Dn._buffer.byteLength>=En.byteLength?Dn.subdata(En):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=wa.create(Ii,mf,!1,!0)),nn.buffer=wa.getBuffer(Dn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Xi[Rn]=1}else wa.getBuffer(Ii)?(nn.buffer=wa.getBuffer(Ii),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):wa.getBuffer(Ii.buffer)?(nn.buffer=wa.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=Ta[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Xn=0;Xn<Ua.buffers.length;++Xn)!Xi[Xn]&&Ua.buffers[Xn]&&(Ua.buffers[Xn].destroy(),Ua.buffers[Xn]=null);return Ua.refresh(),Yi}return Yi.destroy=function(){for(var Ri=0;Ri<Ua.buffers.length;++Ri)Ua.buffers[Ri]&&Ua.buffers[Ri].destroy();Ua.buffers.length=0,Ua.ownsElements&&(Ua.elements.destroy(),Ua.elements=null,Ua.ownsElements=!1),Ua.destroy()},Yi._vao=Ua,Yi._reglType="vao",Yi(Ha)}return zi}var Cf=35632,hl=35633,uf=35718,kc=35721;function Hu(it,Zt,cr,oa){var wa={},va={};function ya(ea,Ma,Qa,di){this.name=ea,this.id=Ma,this.location=Qa,this.info=di}function Ya(ea,Ma){for(var Qa=0;Qa<ea.length;++Qa)if(ea[Qa].id===Ma.id){ea[Qa].location=Ma.location;return}ea.push(Ma)}function bi(ea,Ma,Qa){var di=ea===Cf?wa:va,Va=di[Ma];if(!Va){var Bi=Zt.str(Ma);Va=it.createShader(ea),it.shaderSource(Va,Bi),it.compileShader(Va),di[Ma]=Va}return Va}var yi={},si=[],gn=0;function zi(ea,Ma){this.id=gn++,this.fragId=ea,this.vertId=Ma,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,oa.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Ei(ea,Ma,Qa){var di,Va,Bi=bi(Cf,ea.fragId),Li=bi(hl,ea.vertId),hn=ea.program=it.createProgram();if(it.attachShader(hn,Bi),it.attachShader(hn,Li),Qa)for(di=0;di<Qa.length;++di){var Ha=Qa[di];it.bindAttribLocation(hn,Ha[0],Ha[1])}it.linkProgram(hn);var Ua=it.getProgramParameter(hn,uf);oa.profile&&(ea.stats.uniformsCount=Ua);var Yi=ea.uniforms;for(di=0;di<Ua;++di)if(Va=it.getActiveUniform(hn,di),Va)if(Va.size>1)for(var Ri=0;Ri<Va.size;++Ri){var Ti=Va.name.replace("[0]","["+Ri+"]");Ya(Yi,new ya(Ti,Zt.id(Ti),it.getUniformLocation(hn,Ti),Va))}else Ya(Yi,new ya(Va.name,Zt.id(Va.name),it.getUniformLocation(hn,Va.name),Va));var xi=it.getProgramParameter(hn,kc);oa.profile&&(ea.stats.attributesCount=xi);var Xi=ea.attributes;for(di=0;di<xi;++di)Va=it.getActiveAttrib(hn,di),Va&&Ya(Xi,new ya(Va.name,Zt.id(Va.name),it.getAttribLocation(hn,Va.name),Va))}oa.profile&&(cr.getMaxUniformsCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.uniformsCount>ea&&(ea=Ma.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},va={};for(var ea=0;ea<si.length;++ea)Ei(si[ea],null,si[ea].attributes.map(function(Ma){return[Ma.location,Ma.name]}))}return{clear:function(){var ea=it.deleteShader.bind(it);_t(wa).forEach(ea),wa={},_t(va).forEach(ea),va={},si.forEach(function(Ma){it.deleteProgram(Ma.program)}),si.length=0,yi={},cr.shaderCount=0},program:function(ea,Ma,Qa,di){var Va=yi[Ma];Va||(Va=yi[Ma]={});var Bi=Va[ea];if(Bi&&(Bi.refCount++,!di))return Bi;var Li=new zi(Ma,ea);return cr.shaderCount++,Ei(Li,Qa,di),Bi||(Va[ea]=Li),si.push(Li),d(Li,{destroy:function(){if(Li.refCount--,Li.refCount<=0){it.deleteProgram(Li.program);var hn=si.indexOf(Li);si.splice(hn,1),cr.shaderCount--}Va[Li.vertId].refCount<=0&&(it.deleteShader(va[Li.vertId]),delete va[Li.vertId],delete yi[Li.fragId][Li.vertId]),Object.keys(yi[Li.fragId]).length||(it.deleteShader(wa[Li.fragId]),delete wa[Li.fragId],delete yi[Li.fragId])}})},restore:Na,shader:bi,frag:-1,vert:-1}}var gf=6408,Wu=5121,Kc=3333,Lf=5126;function iu(it,Zt,cr,oa,wa,va,ya){function Ya(si){var gn;Zt.next===null?gn=Wu:gn=Zt.next.colorAttachments[0].texture._texture.type;var zi=0,Ei=0,Na=oa.framebufferWidth,ea=oa.framebufferHeight,Ma=null;Er(si)?Ma=si:si&&(zi=si.x|0,Ei=si.y|0,Na=(si.width||oa.framebufferWidth-zi)|0,ea=(si.height||oa.framebufferHeight-Ei)|0,Ma=si.data||null),cr();var Qa=Na*ea*4;return Ma||(gn===Wu?Ma=new Uint8Array(Qa):gn===Lf&&(Ma=Ma||new Float32Array(Qa))),it.pixelStorei(Kc,4),it.readPixels(zi,Ei,Na,ea,gf,gn,Ma),Ma}function bi(si){var gn;return Zt.setFBO({framebuffer:si.framebuffer},function(){gn=Ya(si)}),gn}function yi(si){return!si||!("framebuffer"in si)?Ya(si):bi(si)}return yi}var Vf=0,Xu="";function Cc(it){return xu(gc(sc(it)))}function gc(it){return Qt(Pi(Pc(it),it.length*8))}function ql(it,Zt){var cr=Pc(it);cr.length>16&&(cr=Pi(cr,it.length*8));for(var oa=Array(16),wa=Array(16),va=0;va<16;va++)oa[va]=cr[va]^909522486,wa[va]=cr[va]^1549556828;var ya=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(ya),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",cr="",oa,wa=0;wa<it.length;wa++)oa=it.charCodeAt(wa),cr+=Zt.charAt(oa>>>4&15)+Zt.charAt(oa&15);return cr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",oa=it.length,wa=0;wa<oa;wa+=3)for(var va=it.charCodeAt(wa)<<16|(wa+1<oa?it.charCodeAt(wa+1)<<8:0)|(wa+2<oa?it.charCodeAt(wa+2):0),ya=0;ya<4;ya++)wa*8+ya*6>it.length*8?cr+=Xu:cr+=Zt.charAt(va>>>6*(3-ya)&63);return cr}function Jc(it,Zt){var cr=Zt.length,oa=Array(),wa,va,ya,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa<bi.length;wa++)bi[wa]=it.charCodeAt(wa*2)<<8|it.charCodeAt(wa*2+1);for(;bi.length>0;){for(Ya=Array(),ya=0,wa=0;wa<bi.length;wa++)ya=(ya<<16)+bi[wa],va=Math.floor(ya/cr),ya-=va*cr,(Ya.length>0||va>0)&&(Ya[Ya.length]=va);oa[oa.length]=ya,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa<si;wa++)yi=Zt[0]+yi;return yi}function sc(it){for(var Zt="",cr=-1,oa,wa;++cr<it.length;)oa=it.charCodeAt(cr),wa=cr+1<it.length?it.charCodeAt(cr+1):0,55296<=oa&&oa<=56319&&56320<=wa&&wa<=57343&&(oa=65536+((oa&1023)<<10)+(wa&1023),cr++),oa<=127?Zt+=String.fromCharCode(oa):oa<=2047?Zt+=String.fromCharCode(192|oa>>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),cr=0;cr<Zt.length;cr++)Zt[cr]=0;for(var cr=0;cr<it.length*8;cr+=8)Zt[cr>>5]|=(it.charCodeAt(cr/8)&255)<<24-cr%32;return Zt}function Qt(it){for(var Zt="",cr=0;cr<it.length*32;cr+=8)Zt+=String.fromCharCode(it[cr>>5]>>>24-cr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,cr){return it&Zt^~it&cr}function ka(it,Zt,cr){return it&Zt^it&cr^Zt&cr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var pn=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 Pi(it,Zt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi<it.length;zi+=16){for(wa=cr[0],va=cr[1],ya=cr[2],Ya=cr[3],bi=cr[4],yi=cr[5],si=cr[6],gn=cr[7],Ei=0;Ei<64;Ei++)Ei<16?oa[Ei]=it[Ei+zi]:oa[Ei]=Di(Di(Di(Qi(oa[Ei-2]),oa[Ei-7]),Hi(oa[Ei-15])),oa[Ei-16]),Na=Di(Di(Di(Di(gn,Ci(bi)),$r(bi,yi,si)),pn[Ei]),oa[Ei]),ea=Di(li(wa),ka(wa,va,ya)),gn=si,si=yi,yi=bi,bi=Di(Ya,Na),Ya=ya,ya=va,va=wa,wa=Di(Na,ea);cr[0]=Di(wa,cr[0]),cr[1]=Di(va,cr[1]),cr[2]=Di(ya,cr[2]),cr[3]=Di(Ya,cr[3]),cr[4]=Di(bi,cr[4]),cr[5]=Di(yi,cr[5]),cr[6]=Di(si,cr[6]),cr[7]=Di(gn,cr[7])}return cr}function Di(it,Zt){var cr=(it&65535)+(Zt&65535),oa=(it>>16)+(Zt>>16)+(cr>>16);return oa<<16|cr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Zt=it&&it.cache,cr=0,oa=[],wa=[],va=[];function ya(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa<wa.length;++Qa)if(wa[Qa]===Na&&!va[Qa])return oa[Qa]}var di="g"+cr++;return oa.push(di),wa.push(Na),va.push(Ma),di}function Ya(){var Na=[];function ea(){Na.push.apply(Na,Ni(arguments))}var Ma=[];function Qa(){var di="v"+cr++;return Ma.push(di),arguments.length>0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return d(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return d(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return d(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di<ea;++di)Qa();var Va=bi(),Bi=Va.toString,Li=gn[Na]=d(Va,{arg:Qa,toString:function(){return mi(["function(",Ma.join(),"){",Bi(),"}"])}});return Li}function Ei(){var Na=['"use strict";',si,"return {"];Object.keys(gn).forEach(function(di){Na.push('"',di,'":',gn[di].toString(),",")}),Na.push("}");var ea=mi(Na).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Ma;if(Zt&&(Ma=Cc(ea),Zt[Ma]))return Zt[Ma].apply(null,wa);var Qa=Function.apply(null,oa.concat(ea));return Zt&&(Zt[Ma]=Qa),Qa.apply(null,wa)}return{global:si,link:ya,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var $n="xyzw".split(""),no=5121,Qn=1,co=2,Tn=0,un=1,go=2,Ko=3,Ms=4,rl=5,Ns=6,el="dither",ws="blend.enable",Fl="blend.color",_l="blend.equation",ll="blend.func",jn="depth.enable",Io="depth.func",Js="depth.range",Ds="depth.mask",uu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",zo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Fe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Ar="count",Kr="offset",na="instances",Ve="vao",$e="Width",ot="Height",pt=ht+$e,Et=ht+ot,bt=Me+$e,Rt=Me+ot,lr="drawingBuffer",yr=lr+$e,kr=lr+ot,jr=[ll,_l,Yu,Fe,I,zo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,An=32823,Yn=32926,Nn=32928,wo=5126,os=35664,So=35665,Zo=35666,hs=5124,ul=35667,tl=35668,Jo=35669,$o=35670,Il=35671,eu=35672,Ru=35673,vu=35674,Tl=35675,cu=35676,uc=35678,Vl=35680,Gl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,xa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||Er(it)||Ir(it)}function ni(it){return it.sort(function(Zt,cr){return Zt===Me?-1:cr===Me?1:Zt<cr?-1:1})}function La(it,Zt,cr,oa){this.thisDep=it,this.contextDep=Zt,this.propDep=cr,this.append=oa}function sn(it){return it&&!(it.thisDep||it.contextDep||it.propDep)}function rn(it){return new La(!1,!1,!1,it)}function dn(it,Zt){var cr=it.type;if(cr===Tn){var oa=it.data.length;return new La(!0,oa>=1,oa>=2,Zt)}else if(cr===Ms){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(cr===rl)return new La(!1,!1,!1,Zt);if(cr===Ns){for(var va=!1,ya=!1,Ya=!1,bi=0;bi<it.data.length;++bi){var yi=it.data[bi];if(yi.type===un)Ya=!0;else if(yi.type===go)ya=!0;else if(yi.type===Ko)va=!0;else if(yi.type===Tn){va=!0;var si=yi.data;si>=1&&(ya=!0),si>=2&&(Ya=!0)}else yi.type===Ms&&(va=va||yi.data.thisDep,ya=ya||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(va,ya,Ya,Zt)}else return new La(cr===Ko,cr===go,cr===un,Zt)}}var In=new La(!1,!1,!1,function(){});function Kn(it,Zt,cr,oa,wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=cr.angle_instanced_arrays,Va=cr.webgl_draw_buffers,Bi=cr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=St}function xi(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=St}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(ws,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(jn,ji,!0),xi(Io,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Ds,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Yn),Ti(fo,Nn),xi(zo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Fe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Zt,next:hn,current:Li,draw:gn,elements:va,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:cr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:Ta,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=p(oa.maxDrawbuffers,function(mt){return mt===0?[0]:p(mt,function(St){return Ja+St})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),St=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=St(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var nr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(nr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var or=mt.constants={};Object.keys(Rn).forEach(function(ir){or[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Vt){switch(Vt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(St(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return ir.def(hr.props,Vt.data);case go:return ir.def(hr.context,Vt.data);case Ko:return ir.def("this",Vt.data);case Ms:return Vt.data.append(mt,ir),Vt.data.ref;case rl:return Vt.data.toString();case Ns:return Vt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Vt=Zt.id(ir);if(Vt in Wt)return Wt[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Wt[Vt]=St(Dr);return Jr},mt}function En(mt){var St=mt.static,Ft=mt.dynamic,rr;if(ze in St){var hr=!!St[ze];rr=rn(function(dr,or){return hr}),rr.enable=hr}else if(ze in Ft){var nr=Ft[ze];rr=dn(nr,function(dr,or){return dr.invoke(or,nr)})}return rr}function Dn(mt,St){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,or){var Wt=dr.link(hr),ir=dr.shared;or.set(ir.framebuffer,".next",Wt);var Vt=ir.context;return or.set(Vt,"."+pt,Wt+".width"),or.set(Vt,"."+Et,Wt+".height"),Wt})):rn(function(dr,or){var Wt=dr.shared;or.set(Wt.framebuffer,".next","null");var ir=Wt.context;return or.set(ir,"."+pt,ir+"."+yr),or.set(ir,"."+Et,ir+"."+kr),"null"})}else if(ht in rr){var nr=rr[ht];return dn(nr,function(dr,or){var Wt=dr.invoke(or,nr),ir=dr.shared,Vt=ir.framebuffer,Dr=or.def(Vt,".getFramebuffer(",Wt,")");or.set(Vt,".next",Dr);var Jr=ir.context;return or.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),or.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+kr),Dr})}else return null}function Xn(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Wt){if(Wt in rr){var ir=rr[Wt],Vt=!0,Dr=ir.x|0,Jr=ir.y|0,ga,vi;return"width"in ir?ga=ir.width|0:Vt=!1,"height"in ir?vi=ir.height|0:Vt=!1,new La(!Vt&&St&&St.thisDep,!Vt&&St&&St.contextDep,!Vt&&St&&St.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),cn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),yo=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,cn,yo]});return St&&(ai.thisDep=ai.thisDep||St.thisDep,ai.contextDep=ai.contextDep||St.contextDep,ai.propDep=ai.propDep||St.propDep),ai}else return St?new La(St.thisDep,St.contextDep,St.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=nr(Me);if(dr){var or=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Vt=or.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Vt[2]),ir.set(Dr,"."+Rt,Vt[3]),Vt})}return{viewport:dr,scissor_box:nr(Te)}}function zs(mt,St){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(St.dynamic).length>0)return null;var hr=St.static,nr=Object.keys(hr);if(nr.length>0&&typeof hr[nr[0]]=="number"){for(var dr=[],or=0;or<nr.length;++or)dr.push([hr[nr[or]]|0,nr[or]]);return dr}}return null}function bl(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Vt){if(Vt in rr){var Dr=Zt.id(rr[Vt]),Jr=rn(function(){return Dr});return Jr.id=Dr,Jr}else if(Vt in hr){var ga=hr[Vt];return dn(ga,function(vi,Ga){var ai=vi.invoke(Ga,ga),Zi=Ga.def(vi.shared.strings,".id(",ai,")");return Zi})}return null}var dr=nr(Ot),or=nr(wt),Wt=null,ir;return sn(dr)&&sn(or)?(Wt=si.program(or.id,dr.id,null,Ft),ir=rn(function(Vt,Dr){return Vt.link(Wt)})):ir=new La(dr&&dr.thisDep||or&&or.thisDep,dr&&dr.contextDep||or&&or.contextDep,dr&&dr.propDep||or&&or.propDep,function(Vt,Dr){var Jr=Vt.shared.shader,ga;dr?ga=dr.append(Vt,Dr):ga=Dr.def(Jr,".",Ot);var vi;or?vi=or.append(Vt,Dr):vi=Dr.def(Jr,".",wt);var Ga=Jr+".program("+vi+","+ga;return Dr.def(Ga+")")}),{frag:dr,vert:or,progVar:ir,program:Wt}}function ho(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={},nr=!1;function dr(){if(Ve in Ft){var Fi=Ft[Ve];return Fi!==null&&yi.getVAO(Fi)===null&&(Fi=yi.createVAO(Fi)),nr=!0,hr.vao=Fi,rn(function(_i){var Si=yi.getVAO(Fi);return Si?_i.link(Si):"null"})}else if(Ve in rr){nr=!0;var ui=rr[Ve];return dn(ui,function(_i,Si){var Ui=_i.invoke(Si,ui);return Si.def(_i.shared.vao+".getVAO("+Ui+")")})}return null}var or=dr(),Wt=!1;function ir(){if($t in Ft){var Fi=Ft[$t];if(hr.elements=Fi,fi(Fi)){var ui=hr.elements=va.create(Fi,!0);Fi=va.getElements(ui),Wt=!0}else Fi&&(Fi=va.getElements(Fi),Wt=!0);var _i=rn(function(Ui,cn){if(Fi){var yo=Ui.link(Fi);return Ui.ELEMENTS=yo,yo}return Ui.ELEMENTS=null,null});return _i.value=Fi,_i}else if($t in rr){Wt=!0;var Si=rr[$t];return dn(Si,function(Ui,cn){var yo=Ui.shared,Uo=yo.isBufferArgs,Is=yo.elements,Fo=Ui.invoke(cn,Si),Es=cn.def("null"),Ks=cn.def(Uo,"(",Fo,")"),mu=Ui.cond(Ks).then(Es,"=",Is,".createStream(",Fo,");").else(Es,"=",Is,".getElements(",Fo,");");return cn.entry(mu),cn.exit(Ui.cond(Ks).then(Is,".destroyStream(",Es,");")),Ui.ELEMENTS=Es,Es})}else if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.elements+".getElements("+Ui.shared.vao+".currentVAO.elements):null")});return null}var Vt=ir();function Dr(){if(Tr in Ft){var Fi=Ft[Tr];return hr.primitive=Fi,rn(function(_i,Si){return Ra[Fi]})}else if(Tr in rr){var ui=rr[Tr];return dn(ui,function(_i,Si){var Ui=_i.constants.primTypes,cn=_i.invoke(Si,ui);return Si.def(Ui,"[",cn,"]")})}else{if(Wt)return sn(Vt)?Vt.value?rn(function(_i,Si){return Si.def(_i.ELEMENTS,".primType")}):rn(function(){return Gl}):new La(Vt.thisDep,Vt.contextDep,Vt.propDep,function(_i,Si){var Ui=_i.ELEMENTS;return Si.def(Ui,"?",Ui,".primType:",Gl)});if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(_i,Si){return Si.def(_i.shared.vao+".currentVAO?"+_i.shared.vao+".currentVAO.primitive:"+Gl)})}return null}function Jr(Fi,ui){if(Fi in Ft){var _i=Ft[Fi]|0;return ui?hr.offset=_i:hr.instances=_i,rn(function(Ui,cn){return ui&&(Ui.OFFSET=_i),_i})}else if(Fi in rr){var Si=rr[Fi];return dn(Si,function(Ui,cn){var yo=Ui.invoke(cn,Si);return ui&&(Ui.OFFSET=yo),yo})}else if(ui){if(Wt)return rn(function(Ui,cn){return Ui.OFFSET=0,0});if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.offset:0")})}else if(nr)return new La(or.thisDep,or.contextDep,or.propDep,function(Ui,cn){return cn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.instances:-1")});return null}var ga=Jr(Kr,!0);function vi(){if(Ar in Ft){var Fi=Ft[Ar]|0;return hr.count=Fi,rn(function(){return Fi})}else if(Ar in rr){var ui=rr[Ar];return dn(ui,function(cn,yo){var Uo=cn.invoke(yo,ui);return Uo})}else if(Wt)if(sn(Vt)){if(Vt)return ga?new La(ga.thisDep,ga.contextDep,ga.propDep,function(cn,yo){var Uo=yo.def(cn.ELEMENTS,".vertCount-",cn.OFFSET);return Uo}):rn(function(cn,yo){return yo.def(cn.ELEMENTS,".vertCount")});var _i=rn(function(){return-1});return _i}else{var Si=new La(Vt.thisDep||ga.thisDep,Vt.contextDep||ga.contextDep,Vt.propDep||ga.propDep,function(cn,yo){var Uo=cn.ELEMENTS;return cn.OFFSET?yo.def(Uo,"?",Uo,".vertCount-",cn.OFFSET,":-1"):yo.def(Uo,"?",Uo,".vertCount:-1")});return Si}else if(nr){var Ui=new La(or.thisDep,or.contextDep,or.propDep,function(cn,yo){return yo.def(cn.shared.vao,".currentVAO?",cn.shared.vao,".currentVAO.count:-1")});return Ui}return null}var Ga=Dr(),ai=vi(),Zi=Jr(na,!1);return{elements:Vt,primitive:Ga,count:ai,instances:Zi,offset:ga,vao:or,vaoActive:nr,elementsActive:Wt,static:hr}}function Wl(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Ha.forEach(function(nr){var dr=Ri(nr);function or(Wt,ir){if(nr in Ft){var Vt=Wt(Ft[nr]);hr[dr]=rn(function(){return Vt})}else if(nr in rr){var Dr=rr[nr];hr[dr]=dn(Dr,function(Jr,ga){return ir(Jr,ga,Jr.invoke(ga,Dr))})}}switch(nr){case Iu:case ws:case el:case Dc:case jn:case ie:case Rc:case yc:case fo:case Ds:return or(function(Wt){return Wt},function(Wt,ir,Vt){return Vt});case Io:return or(function(Wt){return Sa[Wt]},function(Wt,ir,Vt){var Dr=Wt.constants.compareFuncs;return ir.def(Dr,"[",Vt,"]")});case Js:return or(function(Wt){return Wt},function(Wt,ir,Vt){var Dr=ir.def("+",Vt,"[0]"),Jr=ir.def("+",Vt,"[1]");return[Dr,Jr]});case ll:return or(function(Wt){var ir="srcRGB"in Wt?Wt.srcRGB:Wt.src,Vt="srcAlpha"in Wt?Wt.srcAlpha:Wt.src,Dr="dstRGB"in Wt?Wt.dstRGB:Wt.dst,Jr="dstAlpha"in Wt?Wt.dstAlpha:Wt.dst;return[ti[ir],ti[Dr],ti[Vt],ti[Jr]]},function(Wt,ir,Vt){var Dr=Wt.constants.blendFuncs;function Jr(ui,_i){var Si=ir.def('"',ui,_i,'" in ',Vt,"?",Vt,".",ui,_i,":",Vt,".",ui);return Si}var ga=Jr("src","RGB"),vi=Jr("dst","RGB"),Ga=ir.def(Dr,"[",ga,"]"),ai=ir.def(Dr,"[",Jr("src","Alpha"),"]"),Zi=ir.def(Dr,"[",vi,"]"),Fi=ir.def(Dr,"[",Jr("dst","Alpha"),"]");return[Ga,Zi,ai,Fi]});case _l:return or(function(Wt){if(typeof Wt=="string")return[Qa[Wt],Qa[Wt]];if(typeof Wt=="object")return[Qa[Wt.rgb],Qa[Wt.alpha]]},function(Wt,ir,Vt){var Dr=Wt.constants.blendEquations,Jr=ir.def(),ga=ir.def(),vi=Wt.cond("typeof ",Vt,'==="string"');return vi.then(Jr,"=",ga,"=",Dr,"[",Vt,"];"),vi.else(Jr,"=",Dr,"[",Vt,".rgb];",ga,"=",Dr,"[",Vt,".alpha];"),ir(vi),[Jr,ga]});case Fl:return or(function(Wt){return p(4,function(ir){return+Wt[ir]})},function(Wt,ir,Vt){return p(4,function(Dr){return ir.def("+",Vt,"[",Dr,"]")})});case lc:return or(function(Wt){return Wt|0},function(Wt,ir,Vt){return ir.def(Vt,"|0")});case Yu:return or(function(Wt){var ir=Wt.cmp||"keep",Vt=Wt.ref||0,Dr="mask"in Wt?Wt.mask:-1;return[Sa[ir],Vt,Dr]},function(Wt,ir,Vt){var Dr=Wt.constants.compareFuncs,Jr=ir.def('"cmp" in ',Vt,"?",Dr,"[",Vt,".cmp]",":",zt),ga=ir.def(Vt,".ref|0"),vi=ir.def('"mask" in ',Vt,"?",Vt,".mask|0:-1");return[Jr,ga,vi]});case Fe:case I:return or(function(Wt){var ir=Wt.fail||"keep",Vt=Wt.zfail||"keep",Dr=Wt.zpass||"keep";return[nr===I?De:me,za[ir],za[Vt],za[Dr]]},function(Wt,ir,Vt){var Dr=Wt.constants.stencilOps;function Jr(ga){return ir.def('"',ga,'" in ',Vt,"?",Dr,"[",Vt,".",ga,"]:",zt)}return[nr===I?De:me,Jr("fail"),Jr("zfail"),Jr("zpass")]});case Au:return or(function(Wt){var ir=Wt.factor|0,Vt=Wt.units|0;return[ir,Vt]},function(Wt,ir,Vt){var Dr=ir.def(Vt,".factor|0"),Jr=ir.def(Vt,".units|0");return[Dr,Jr]});case Zu:return or(function(Wt){var ir=0;return Wt==="front"?ir=me:Wt==="back"&&(ir=De),ir},function(Wt,ir,Vt){return ir.def(Vt,'==="front"?',me,":",De)});case bu:return or(function(Wt){return Wt},function(Wt,ir,Vt){return Vt});case Ic:return or(function(Wt){return Xa[Wt]},function(Wt,ir,Vt){return ir.def(Vt+'==="cw"?'+et+":"+dt)});case uu:return or(function(Wt){return Wt.map(function(ir){return!!ir})},function(Wt,ir,Vt){return p(4,function(Dr){return"!!"+Vt+"["+Dr+"]"})});case zo:return or(function(Wt){var ir="value"in Wt?Wt.value:1,Vt=!!Wt.invert;return[ir,Vt]},function(Wt,ir,Vt){var Dr=ir.def('"value" in ',Vt,"?+",Vt,".value:1"),Jr=ir.def("!!",Vt,".invert");return[Dr,Jr]})}}),hr}function fs(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Object.keys(Ft).forEach(function(nr){var dr=Ft[nr],or;if(typeof dr=="number"||typeof dr=="boolean")or=rn(function(){return dr});else if(typeof dr=="function"){var Wt=dr._reglType;Wt==="texture2d"||Wt==="textureCube"?or=rn(function(ir){return ir.link(dr)}):(Wt==="framebuffer"||Wt==="framebufferCube")&&(or=rn(function(ir){return ir.link(dr.color[0])}))}else ma(dr)&&(or=rn(function(ir){var Vt=ir.global.def("[",p(dr.length,function(Dr){return dr[Dr]}),"]");return Vt}));or.value=dr,hr[nr]=or}),Object.keys(rr).forEach(function(nr){var dr=rr[nr];hr[nr]=dn(dr,function(or,Wt){return or.invoke(Wt,dr)})}),hr}function Sl(mt,St){var Ft=mt.static,rr=mt.dynamic,hr={};return Object.keys(Ft).forEach(function(nr){var dr=Ft[nr],or=Zt.id(nr),Wt=new Ma;if(fi(dr))Wt.state=Qn,Wt.buffer=wa.getBuffer(wa.create(dr,Qr,!1,!0)),Wt.type=0;else{var ir=wa.getBuffer(dr);if(ir)Wt.state=Qn,Wt.buffer=ir,Wt.type=0;else if("constant"in dr){var Vt=dr.constant;Wt.buffer="null",Wt.state=co,typeof Vt=="number"?Wt.x=Vt:$n.forEach(function(Zi,Fi){Fi<Vt.length&&(Wt[Zi]=Vt[Fi])})}else{fi(dr.buffer)?ir=wa.getBuffer(wa.create(dr.buffer,Qr,!1,!0)):ir=wa.getBuffer(dr.buffer);var Dr=dr.offset|0,Jr=dr.stride|0,ga=dr.size|0,vi=!!dr.normalized,Ga=0;"type"in dr&&(Ga=Ta[dr.type]);var ai=dr.divisor|0;Wt.buffer=ir,Wt.state=Qn,Wt.size=ga,Wt.normalized=vi,Wt.type=Ga||ir.dtype,Wt.offset=Dr,Wt.stride=Jr,Wt.divisor=ai}}hr[nr]=rn(function(Zi,Fi){var ui=Zi.attribCache;if(or in ui)return ui[or];var _i={isStream:!1};return Object.keys(Wt).forEach(function(Si){_i[Si]=Wt[Si]}),Wt.buffer&&(_i.buffer=Zi.link(Wt.buffer),_i.type=_i.type||_i.buffer+".dtype"),ui[or]=_i,_i})}),Object.keys(rr).forEach(function(nr){var dr=rr[nr];function or(Wt,ir){var Vt=Wt.invoke(ir,dr),Dr=Wt.shared,Jr=Wt.constants,ga=Dr.isBufferArgs,vi=Dr.buffer,Ga={isStream:ir.def(!1)},ai=new Ma;ai.state=Qn,Object.keys(ai).forEach(function(_i){Ga[_i]=ir.def(""+ai[_i])});var Zi=Ga.buffer,Fi=Ga.type;ir("if(",ga,"(",Vt,")){",Ga.isStream,"=true;",Zi,"=",vi,".createStream(",Qr,",",Vt,");",Fi,"=",Zi,".dtype;","}else{",Zi,"=",vi,".getBuffer(",Vt,");","if(",Zi,"){",Fi,"=",Zi,".dtype;",'}else if("constant" in ',Vt,"){",Ga.state,"=",co,";","if(typeof "+Vt+'.constant === "number"){',Ga[$n[0]],"=",Vt,".constant;",$n.slice(1).map(function(_i){return Ga[_i]}).join("="),"=0;","}else{",$n.map(function(_i,Si){return Ga[_i]+"="+Vt+".constant.length>"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){ir(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[nr]=dn(dr,or)}),hr}function kl(mt){var St=mt.static,Ft=mt.dynamic,rr={};return Object.keys(St).forEach(function(hr){var nr=St[hr];rr[hr]=rn(function(dr,or){return typeof nr=="number"||typeof nr=="boolean"?""+nr:dr.link(nr)})}),Object.keys(Ft).forEach(function(hr){var nr=Ft[hr];rr[hr]=dn(nr,function(dr,or){return dr.invoke(or,nr)})}),rr}function tu(mt,St,Ft,rr,hr){var nr=mt.static,dr=mt.dynamic,or=zs(mt,St),Wt=Dn(mt,hr),ir=Xn(mt,Wt,hr),Vt=ho(mt,hr),Dr=Wl(mt,hr),Jr=bl(mt,hr,or);function ga(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ga(Me),ga(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=En(mt,hr),Ga.uniforms=fs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!or&&cr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=St.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return or?Ga.useVAO=!0:Ga.attributes=Sl(St,hr),Ga.context=kl(rr,hr),Ga}function Vs(mt,St,Ft){var rr=mt.shared,hr=rr.context,nr=mt.scope();Object.keys(Ft).forEach(function(dr){St.save(hr,"."+dr);var or=Ft[dr],Wt=or.append(mt,St);Array.isArray(Wt)?nr(hr,".",dr,"=[",Wt.join(),"];"):nr(hr,".",dr,"=",Wt,";")}),St(nr)}function pl(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.framebuffer,or;Va&&(or=St.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Vt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,St):Dr=St.def(dr,".next"),rr||St("if(",Dr,"!==",dr,".cur){"),St("if(",Dr,"){",nr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&St(or,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",pa,",null);"),Va&&St(or,".drawBuffersWEBGL(",Vt,");"),St("}",dr,".cur=",Dr,";"),rr||St("}")}function wl(mt,St,Ft){var rr=mt.shared,hr=rr.gl,nr=mt.current,dr=mt.next,or=rr.current,Wt=rr.next,ir=mt.cond(or,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Ft.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=nr[Dr];var vi=p(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",or,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),or,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",or,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(or,".dirty=false;"),St(ir)}function Zn(mt,St,Ft,rr){var hr=mt.shared,nr=mt.current,dr=hr.current,or=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Vt=Ft[ir];if(!(rr&&!rr(Vt))){var Dr=Vt.append(mt,St);if(Ua[ir]){var Jr=Ua[ir];sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(mt.cond(Wt).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Wt,";")):(St(mt.cond(Dr).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Dr,";"))}else if(ma(Dr)){var ga=nr[ir];St(or,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(or,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):St(or,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function Cl(mt,St){di&&(mt.instancing=St.def(mt.shared.extensions,".angle_instanced_arrays"))}function Po(mt,St,Ft,rr,hr){var nr=mt.shared,dr=mt.stats,or=nr.current,Wt=nr.timer,ir=Ft.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=St.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=St.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=St.def(or,".profile");St(or,".profile=",ui,";"),St.exit(or,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ga(St),vi(St.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,St),Ga(ai)}else ai=St.def(or,".profile");var Zi=mt.block();ga(Zi),St("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),St.exit("if(",ai,"){",Fi,"}")}function ge(mt,St,Ft,rr,hr){var nr=mt.shared;function dr(Wt){switch(Wt){case os:case ul:case Il:return 2;case So:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function or(Wt,ir,Vt){var Dr=nr.gl,Jr=St.def(Wt,".location"),ga=St.def(nr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){St("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=St.def(Vt.size,"||",ir):Si=ir,St("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(cn){return ga+"."+cn+"!=="+Vt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(cn){return ga+"."+cn+"="+Vt[cn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;St("if(",ga,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){St("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",$n.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",$n.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===Qn?Fi():vi===co?ui():(St("if(",vi,"===",Qn,"){"),Fi(),St("}else{"),ui(),St("}"))}rr.forEach(function(Wt){var ir=Wt.name,Vt=Ft.attributes[ir],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(mt,St)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=St.def(Jr,".",ga)})}or(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,St,Ft,rr,hr,nr){for(var dr=mt.shared,or=dr.gl,Wt,ir=0;ir<rr.length;++ir){var Vt=rr[ir],Dr=Vt.name,Jr=Vt.info.type,ga=Ft.uniforms[Dr],vi=mt.link(Vt),Ga=vi+".location",ai;if(ga){if(!hr(ga))continue;if(sn(ga)){var Zi=ga.value;if(Jr===uc||Jr===Vl){var Fi=mt.link(Zi._texture||Zi.color[0]._texture);St(or,".uniform1i(",Ga,",",Fi+".bind());"),St.exit(Fi,".unbind();")}else if(Jr===vu||Jr===Tl||Jr===cu){var ui=mt.global.def("new Float32Array(["+Array.prototype.slice.call(Zi)+"])"),_i=2;Jr===Tl?_i=3:Jr===cu&&(_i=4),St(or,".uniformMatrix",_i,"fv(",Ga,",false,",ui,");")}else{switch(Jr){case wo:Wt="1f";break;case os:Wt="2f";break;case So:Wt="3f";break;case Zo:Wt="4f";break;case $o:Wt="1i";break;case hs:Wt="1i";break;case Il:Wt="2i";break;case ul:Wt="2i";break;case eu:Wt="3i";break;case tl:Wt="3i";break;case Ru:Wt="4i";break;case Jo:Wt="4i";break}St(or,".uniform",Wt,"(",Ga,",",ma(Zi)?Array.prototype.slice.call(Zi):Zi,");")}continue}else ai=ga.append(mt,St)}else{if(!hr(In))continue;ai=St.def(dr.uniforms,"[",Zt.id(Dr),"]")}Jr===uc?St("if(",ai,"&&",ai,'._reglType==="framebuffer"){',ai,"=",ai,".color[0];","}"):Jr===Vl&&St("if(",ai,"&&",ai,'._reglType==="framebufferCube"){',ai,"=",ai,".color[0];","}");var Si=1;switch(Jr){case uc:case Vl:var Ui=St.def(ai,"._texture");St(or,".uniform1i(",Ga,",",Ui,".bind());"),St.exit(Ui,".unbind();");continue;case hs:case $o:Wt="1i";break;case ul:case Il:Wt="2i",Si=2;break;case tl:case eu:Wt="3i",Si=3;break;case Jo:case Ru:Wt="4i",Si=4;break;case wo:Wt="1f";break;case os:Wt="2f",Si=2;break;case So:Wt="3f",Si=3;break;case Zo:Wt="4f",Si=4;break;case vu:Wt="Matrix2fv";break;case Tl:Wt="Matrix3fv";break;case cu:Wt="Matrix4fv";break}if(Wt.charAt(0)==="M"){St(or,".uniform",Wt,"(",Ga,",");var cn=Math.pow(Jr-vu+2,2),yo=mt.global.def("new Float32Array(",cn,")");Array.isArray(ai)?St("false,(",p(cn,function(Ks){return yo+"["+Ks+"]="+ai[Ks]}),",",yo,")"):St("false,(Array.isArray(",ai,")||",ai," instanceof Float32Array)?",ai,":(",p(cn,function(Ks){return yo+"["+Ks+"]="+ai+"["+Ks+"]"}),",",yo,")"),St(");")}else if(Si>1){for(var Uo=[],Is=[],Fo=0;Fo<Si;++Fo)Array.isArray(ai)?Is.push(ai[Fo]):Is.push(St.def(ai+"["+Fo+"]")),nr&&Uo.push(St.def());nr&&St("if(!",mt.batchId,"||",Uo.map(function(Ks,mu){return Ks+"!=="+Is[mu]}).join("||"),"){",Uo.map(function(Ks,mu){return Ks+"="+Is[mu]+";"}).join("")),St(or,".uniform",Wt,"(",Ga,",",Is.join(","),");"),nr&&St("}")}else{if(nr){var Es=St.def();St("if(!",mt.batchId,"||",Es,"!==",ai,"){",Es,"=",ai,";")}St(or,".uniform",Wt,"(",Ga,",",ai,");"),nr&&St("}")}}}function xe(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.draw,or=rr.draw;function Wt(){var Si=or.elements,Ui,cn=St;return Si?((Si.contextDep&&rr.contextDynamic||Si.propDep)&&(cn=Ft),Ui=Si.append(mt,cn),or.elementsActive&&cn("if("+Ui+")"+nr+".bindBuffer("+ha+","+Ui+".buffer.buffer);")):(Ui=cn.def(),cn(Ui,"=",dr,".",$t,";","if(",Ui,"){",nr,".bindBuffer(",ha,",",Ui,".buffer.buffer);}","else if(",hr.vao,".currentVAO){",Ui,"=",mt.shared.elements+".getElements("+hr.vao,".currentVAO.elements);",Bi?"":"if("+Ui+")"+nr+".bindBuffer("+ha+","+Ui+".buffer.buffer);","}")),Ui}function ir(){var Si=or.count,Ui,cn=St;return Si?((Si.contextDep&&rr.contextDynamic||Si.propDep)&&(cn=Ft),Ui=Si.append(mt,cn)):Ui=cn.def(dr,".",Ar),Ui}var Vt=Wt();function Dr(Si){var Ui=or[Si];return Ui?Ui.contextDep&&rr.contextDynamic||Ui.propDep?Ui.append(mt,Ft):Ui.append(mt,St):St.def(dr,".",Si)}var Jr=Dr(Tr),ga=Dr(Kr),vi=ir();if(typeof vi=="number"){if(vi===0)return}else Ft("if(",vi,"){"),Ft.exit("}");var Ga,ai;di&&(Ga=Dr(na),ai=mt.instancing);var Zi=Vt+".type",Fi=or.elements&&sn(or.elements)&&!or.vaoActive;function ui(){function Si(){Ft(ai,".drawElementsInstancedANGLE(",[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(nr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)"]+");")}function Ui(){Ft(nr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function te(mt,St,Ft,rr,hr){var nr=nn(),dr=nr.proc("body",hr);return di&&(nr.instancing=dr.def(nr.shared.extensions,".angle_instanced_arrays")),mt(nr,dr,Ft,rr),nr.compile().body}function ye(mt,St,Ft,rr){Cl(mt,St),Ft.useVAO?Ft.drawVAO?St(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,St),");"):St(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(St(mt.shared.vao,".setVAO(null);"),ge(mt,St,Ft,rr.attributes,function(){return!0})),K(mt,St,Ft,rr.uniforms,function(){return!0},!1),xe(mt,St,St,Ft)}function je(mt,St){var Ft=mt.proc("draw",1);Cl(mt,Ft),Vs(mt,Ft,St.context),pl(mt,Ft,St.framebuffer),wl(mt,Ft,St),Zn(mt,Ft,St.state),Po(mt,Ft,St,!1,!0);var rr=St.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),St.shader.program)ye(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),nr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",nr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",nr,"]=",mt.link(function(or){return te(ye,mt,St,or,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,St,Ft,rr){mt.batchId="a1",Cl(mt,St);function hr(){return!0}ge(mt,St,Ft,rr.attributes,hr),K(mt,St,Ft,rr.uniforms,hr,!1),xe(mt,St,St,Ft)}function Qe(mt,St,Ft,rr){Cl(mt,St);var hr=Ft.contextDep,nr=St.def(),dr="a0",or="a1",Wt=St.def();mt.shared.props=Wt,mt.batchId=nr;var ir=mt.scope(),Vt=mt.scope();St(ir.entry,"for(",nr,"=0;",nr,"<",or,";++",nr,"){",Wt,"=",dr,"[",nr,"];",Vt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&Vs(mt,Vt,Ft.context),Ft.needsFramebuffer&&pl(mt,Vt,Ft.framebuffer),Zn(mt,Vt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Po(mt,Vt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Vt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Vt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Vt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Vt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Vt,Ft);else{var ga=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",mt.link(function(Zi){return te(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",nr,"],",nr,");")}}function vt(mt,St){var Ft=mt.proc("batch",2);mt.batchId="0",Cl(mt,Ft);var rr=!1,hr=!0;Object.keys(St.context).forEach(function(ga){rr=rr||St.context[ga].propDep}),rr||(Vs(mt,Ft,St.context),hr=!1);var nr=St.framebuffer,dr=!1;nr?(nr.propDep?rr=dr=!0:nr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,nr)):pl(mt,Ft,null),St.state.viewport&&St.state.viewport.propDep&&(rr=!0);function or(ga){return ga.contextDep&&rr||ga.propDep}wl(mt,Ft,St),Zn(mt,Ft,St.state,function(ga){return!or(ga)}),(!St.profile||!or(St.profile))&&Po(mt,Ft,St,!1,"a1"),St.contextDep=rr,St.needsContext=hr,St.needsFramebuffer=dr;var Wt=St.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,St,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),St.shader.program)Qe(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Vt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Vt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",mt.link(function(ga){return te(Qe,mt,St,ga,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,St){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(Vs(mt,Ft,St.context),St.framebuffer&&St.framebuffer.append(mt,Ft),ni(Object.keys(St.state)).forEach(function(or){var Wt=St.state[or],ir=Wt.append(mt,Ft);ma(ir)?ir.forEach(function(Vt,Dr){Xi(Vt)?Ft.set(mt.next[or],"["+Dr+"]",Vt):Ft.set(mt.next[or],"["+Dr+"]",mt.link(Vt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+or,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+or,ir)}),Po(mt,Ft,St,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(or){var Wt=St.draw[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+or,ir):Ft.set(rr.draw,"."+or,mt.link(ir),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(or){var Wt=St.uniforms[or].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Zt.id(or),{stable:!0})+"]",Wt)}),Object.keys(St.attributes).forEach(function(or){var Wt=St.attributes[or].append(mt,Ft),ir=mt.scopeAttrib(or);Object.keys(new Ma).forEach(function(Vt){Ft.set(ir,"."+Vt,Wt[Vt])})}),St.scopeVAO){var nr=St.scopeVAO.append(mt,Ft);Xi(nr)?Ft.set(rr.vao,".targetVAO",nr):Ft.set(rr.vao,".targetVAO",mt.link(nr,{stable:!0}))}function dr(or){var Wt=St.shader[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+or,ir):Ft.set(rr.shader,"."+or,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(St.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function wr(mt){if(!(typeof mt!="object"||ma(mt))){for(var St=Object.keys(mt),Ft=0;Ft<St.length;++Ft)if(h.isDynamic(mt[St[Ft]]))return!0;return!1}}function Nr(mt,St,Ft){var rr=St.static[Ft];if(!rr||!wr(rr))return;var hr=mt.global,nr=Object.keys(rr),dr=!1,or=!1,Wt=!1,ir=mt.global.def("{}");nr.forEach(function(Dr){var Jr=rr[Dr];if(h.isDynamic(Jr)){typeof Jr=="function"&&(Jr=rr[Dr]=h.unbox(Jr));var ga=dn(Jr,null);dr=dr||ga.thisDep,Wt=Wt||ga.propDep,or=or||ga.contextDep}else{switch(hr(ir,".",Dr,"="),typeof Jr){case"number":hr(Jr);break;case"string":hr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&hr("[",Jr.join(),"]");break;default:hr(mt.link(Jr));break}hr(";")}});function Vt(Dr,Jr){nr.forEach(function(ga){var vi=rr[ga];if(h.isDynamic(vi)){var Ga=Dr.invoke(Jr,vi);Jr(ir,".",ga,"=",Ga,";")}})}St.dynamic[Ft]=new h.DynamicVariable(Ms,{thisDep:dr,contextDep:or,propDep:Wt,ref:ir,append:Vt}),delete St.static[Ft]}function pr(mt,St,Ft,rr,hr){var nr=nn();nr.stats=nr.link(hr),Object.keys(St.static).forEach(function(or){Nr(nr,St,or)}),jr.forEach(function(or){Nr(nr,mt,or)});var dr=tu(mt,St,Ft,rr,nr);return dr.shader.program&&(dr.shader.program.attributes.sort(function(or,Wt){return or.name<Wt.name?-1:1}),dr.shader.program.uniforms.sort(function(or,Wt){return or.name<Wt.name?-1:1})),je(nr,dr),qt(nr,dr),vt(nr,dr),d(nr.compile(),{destroy:function(){dr.shader.program.destroy()}})}return{next:hn,current:Li,procs:function(){var mt=nn(),St=mt.proc("poll"),Ft=mt.proc("refresh"),rr=mt.block();St(rr),Ft(rr);var hr=mt.shared,nr=hr.gl,dr=hr.next,or=hr.current;rr(or,".dirty=false;"),pl(mt,St),pl(mt,Ft,null,!0);var Wt;di&&(Wt=mt.link(di)),cr.oes_vertex_array_object&&Ft(mt.link(cr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ir=Ft.def(hr.attributes),Vt=Ft.def(0),Dr=mt.cond(Vt,".buffer");Dr.then(nr,".enableVertexAttribArray(i);",nr,".bindBuffer(",Qr,",",Vt,".buffer.buffer);",nr,".vertexAttribPointer(i,",Vt,".size,",Vt,".type,",Vt,".normalized,",Vt,".stride,",Vt,".offset);").else(nr,".disableVertexAttribArray(i);",nr,".vertexAttrib4f(i,",Vt,".x,",Vt,".y,",Vt,".z,",Vt,".w);",Vt,".buffer=null;");var Jr=mt.link(oa.maxAttributes,{stable:!0});return Ft("for(var i=0;i<",Jr,";++i){",Vt,"=",ir,"[i];",Dr,"}"),di&&Ft("for(var i=0;i<",Jr,";++i){",Wt,".vertexAttribDivisorANGLE(i,",ir,"[i].divisor);","}"),Ft(mt.shared.vao,".currentVAO=null;",mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"),Object.keys(Ua).forEach(function(ga){var vi=Ua[ga],Ga=rr.def(dr,".",ga),ai=mt.block();ai("if(",Ga,"){",nr,".enable(",vi,")}else{",nr,".disable(",vi,")}",or,".",ga,"=",Ga,";"),Ft(ai),St("if(",Ga,"!==",or,".",ga,"){",ai,"}")}),Object.keys(Yi).forEach(function(ga){var vi=Yi[ga],Ga=Li[ga],ai,Zi,Fi=mt.block();if(Fi(nr,".",vi,"("),ma(Ga)){var ui=Ga.length;ai=mt.global.def(dr,".",ga),Zi=mt.global.def(or,".",ga),Fi(p(ui,function(_i){return ai+"["+_i+"]"}),");",p(ui,function(_i){return Zi+"["+_i+"]="+ai+"["+_i+"];"}).join("")),St("if(",p(ui,function(_i){return ai+"["+_i+"]!=="+Zi+"["+_i+"]"}).join("||"),"){",Fi,"}")}else ai=rr.def(dr,".",ga),Zi=rr.def(or,".",ga),Fi(ai,");",or,".",ga,"=",ai,";"),St("if(",ai,"!==",Zi,"){",Fi,"}");Ft(Fi)}),mt.compile()}(),compile:pr}}function ro(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Yo=34918,oo=34919,Wo=35007,cl=function(it,Zt){if(!Zt.ext_disjoint_timer_query)return null;var cr=[];function oa(){return cr.pop()||Zt.ext_disjoint_timer_query.createQueryEXT()}function wa(Qa){cr.push(Qa)}var va=[];function ya(Qa){var di=oa();Zt.ext_disjoint_timer_query.beginQueryEXT(Wo,di),va.push(di),Ei(va.length-1,va.length,Qa)}function Ya(){Zt.ext_disjoint_timer_query.endQueryEXT(Wo)}function bi(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var yi=[];function si(){return yi.pop()||new bi}function gn(Qa){yi.push(Qa)}var zi=[];function Ei(Qa,di,Va){var Bi=si();Bi.startQueryIndex=Qa,Bi.endQueryIndex=di,Bi.sum=0,Bi.stats=Va,zi.push(Bi)}var Na=[],ea=[];function Ma(){var Qa,di,Va=va.length;if(Va!==0){ea.length=Math.max(ea.length,Va+1),Na.length=Math.max(Na.length,Va+1),Na[0]=0,ea[0]=0;var Bi=0;for(Qa=0,di=0;di<va.length;++di){var Li=va[di];Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,oo)?(Bi+=Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,Yo),wa(Li)):va[Qa++]=Li,Na[di+1]=Bi,ea[di+1]=Qa}for(va.length=Qa,Qa=0,di=0;di<zi.length;++di){var hn=zi[di],Ha=hn.startQueryIndex,Ua=hn.endQueryIndex;hn.sum+=Na[Ua]-Na[Ha];var Yi=ea[Ha],Ri=ea[Ua];Ri===Yi?(hn.stats.gpuTime+=hn.sum/1e6,gn(hn)):(hn.startQueryIndex=Yi,hn.endQueryIndex=Ri,zi[Qa++]=hn)}zi.length=Qa}}return{beginQuery:ya,endQuery:Ya,pushScopeStats:Ei,update:Ma,getNumPendingQueries:function(){return va.length},clear:function(){cr.push.apply(cr,va);for(var Qa=0;Qa<cr.length;Qa++)Zt.ext_disjoint_timer_query.deleteQueryEXT(cr[Qa]);va.length=0,cr.length=0},restore:function(){va.length=0,cr.length=0}}},al=16384,xl=256,mn=1024,po=34962,cs="webglcontextlost",vs="webglcontextrestored",Al=1,Hl=2,Su=3;function Rl(it,Zt){for(var cr=0;cr<it.length;++cr)if(it[cr]===Zt)return cr;return-1}function _c(it){var Zt=g(it);if(!Zt)return null;var cr=Zt.gl,oa=cr.getContextAttributes(),wa=cr.isContextLost(),va=b(cr,Zt);if(!va)return null;var ya=c(),Ya=ro(),bi=Zt.cachedCode||{},yi=va.extensions,si=cl(cr,yi),gn=v(),zi=cr.drawingBufferWidth,Ei=cr.drawingBufferHeight,Na={tick:0,time:0,viewportWidth:zi,viewportHeight:Ei,framebufferWidth:zi,framebufferHeight:Ei,drawingBufferWidth:zi,drawingBufferHeight:Ei,pixelRatio:Zt.pixelRatio},ea={},Ma={elements:null,primitive:4,count:-1,offset:0,instances:-1},Qa=qr(cr,yi),di=ra(cr,Ya,Zt,Li),Va=Xt(cr,yi,di,Ya),Bi=Pu(cr,yi,Qa,Ya,di,Va,Ma);function Li(te){return Bi.destroyBuffer(te)}var hn=Hu(cr,ya,Ya,Zt),Ha=Xc(cr,yi,Qa,function(){Ri.procs.poll()},Na,Ya,Zt),Ua=Mc(cr,yi,Qa,Ya,Zt),Yi=Yc(cr,yi,Qa,Ha,Ua,Ya),Ri=Kn(cr,ya,yi,Qa,di,Va,Ha,Yi,ea,Bi,hn,Ma,Na,si,bi,Zt),Ti=iu(cr,Yi,Ri.procs.poll,Na,oa,yi,Qa),xi=Ri.next,Xi=cr.canvas,vn=[],Rn=[],Ii=[],nn=[Zt.onDestroy],En=null;function Dn(){if(vn.length===0){si&&si.update(),En=null;return}En=f.next(Dn),wl();for(var te=vn.length-1;te>=0;--te){var ye=vn[te];ye&&ye(Na,null,0)}cr.flush(),si&&si.update()}function Xn(){!En&&vn.length>0&&(En=f.next(Dn))}function zs(){En&&(f.cancel(Dn),En=null)}function bl(te){te.preventDefault(),wa=!0,zs(),Rn.forEach(function(ye){ye()})}function ho(te){cr.getError(),wa=!1,va.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Xn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(vs,ho,!1));function Wl(){vn.length=0,zs(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(vs,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(te){te()})}function fs(te){function ye(nr){var dr=d({},nr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function or(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Vt){dr[Wt+"."+Vt]=ir[Vt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in nr&&(dr.vao=nr.vao),dr}function je(nr,dr){var or={},Wt={};return Object.keys(nr).forEach(function(ir){var Vt=nr[ir];if(h.isDynamic(Vt)){Wt[ir]=h.unbox(Vt,ir);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr<Vt.length;++Dr)if(h.isDynamic(Vt[Dr])){Wt[ir]=h.unbox(Vt,ir);return}}or[ir]=Vt}),{dynamic:Wt,static:or}}var ke=je(te.context||{},!0),Qe=je(te.uniforms||{},!0),vt=je(te.attributes||{},!1),qt=je(ye(te),!1),wr={gpuTime:0,cpuTime:0,count:0},Nr=Ri.compile(qt,vt,Qe,ke,wr),pr=Nr.draw,mt=Nr.batch,St=Nr.scope,Ft=[];function rr(nr){for(;Ft.length<nr;)Ft.push(null);return Ft}function hr(nr,dr){var or;if(typeof nr=="function")return St.call(this,null,nr,0);if(typeof dr=="function")if(typeof nr=="number")for(or=0;or<nr;++or)St.call(this,null,dr,or);else if(Array.isArray(nr))for(or=0;or<nr.length;++or)St.call(this,nr[or],dr,or);else return St.call(this,nr,dr,0);else if(typeof nr=="number"){if(nr>0)return mt.call(this,rr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return mt.call(this,nr,nr.length)}else return pr.call(this,nr)}return d(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,ye){var je=0;Ri.procs.poll();var ke=ye.color;ke&&(cr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),je|=al),"depth"in ye&&(cr.clearDepth(+ye.depth),je|=xl),"stencil"in ye&&(cr.clearStencil(ye.stencil|0),je|=mn),cr.clear(je)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Sl(d({framebuffer:te.framebuffer.faces[ye]},te),kl);else Sl(te,kl);else kl(null,te)}function Vs(te){vn.push(te);function ye(){var je=Rl(vn,te);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&zs()}vn[je]=ke}return Xn(),{cancel:ye}}function pl(){var te=xi.viewport,ye=xi.scissor_box;te[0]=te[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=ye[2]=cr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=ye[3]=cr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Zn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(v()-gn)/1e3}Zn();function Po(te,ye){var je;switch(te){case"frame":return Vs(ye);case"lost":je=Rn;break;case"restore":je=Ii;break;case"destroy":je=nn;break;default:}return je.push(ye),{cancel:function(){for(var ke=0;ke<je.length;++ke)if(je[ke]===ye){je[ke]=je[je.length-1],je.pop();return}}}}function ge(){return bi}function K(te){Object.entries(te).forEach(function(ye){bi[ye[0]]=ye[1]})}var xe=d(fs,{clear:tu,prop:h.define.bind(null,Al),context:h.define.bind(null,Hl),this:h.define.bind(null,Su),draw:fs({}),buffer:function(te){return di.create(te,po,!1,!1)},elements:function(te){return Va.create(te,!1)},texture:Ha.create2D,cube:Ha.createCube,renderbuffer:Ua.create,framebuffer:Yi.create,framebufferCube:Yi.createCube,vao:Bi.createVAO,attributes:oa,frame:Vs,on:Po,limits:Qa,hasExtension:function(te){return Qa.extensions.indexOf(te.toLowerCase())>=0},read:Ti,destroy:Wl,_gl:cr,_refresh:Zn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Zt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,V){"use strict";var d=TE(),x=Lq();V.exports=function(E,e,t){var r=E._fullLayout,o=!0;return r._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!r._has("parcoords"))){try{a.regl=x({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:E._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(n){E&&E.emit&&E.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),o||d({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,V){"use strict";var d=HE(),x=a6(),S=pq(),E=Cq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),n=qE().styleTextSelection,i={};function s(f,v,c,T){var l=f._size,_=f.width*T,w=f.height*T,A=l.l*T,M=l.b*T,g=l.r*T,b=l.t*T,p=l.w*T,u=l.h*T;return[A+v.domain[0]*p,M+c.domain[0]*u,_-g-(1-v.domain[1])*p,w-b-(1-c.domain[1])*u]}var h=V.exports=function(v,c,T){if(T.length){var l=v._fullLayout,_=c._scene,w=c.xaxis,A=c.yaxis,M,g;if(_){var b=r(v,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!b){_.init();return}var p=_.count,u=l._glcanvas.data()[0].regl;if(a(v,c,T),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&u.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=S(u)),_.line2d===!0&&(_.line2d=x(u)),_.scatter2d===!0&&(_.scatter2d=d(u)),_.fill2d===!0&&(_.fill2d=x(u)),_.glText===!0)for(_.glText=new Array(p),M=0;M<p;M++)_.glText[M]=new E(u);if(_.glText){if(p>_.glText.length){var y=p-_.glText.length;for(M=0;M<y;M++)_.glText.push(new E(u))}else if(p<_.glText.length){var m=_.glText.length-p,R=_.glText.splice(p,m);R.forEach(function(ae){ae.destroy()})}for(M=0;M<p;M++)_.glText[M].update(_.textOptions[M])}if(_.line2d&&(_.line2d.update(_.lineOptions),_.lineOptions=_.lineOptions.map(function(ae){if(ae&&ae.positions){for(var j=ae.positions,Q=0;Q<j.length&&(isNaN(j[Q])||isNaN(j[Q+1]));)Q+=2;for(var re=j.length-2;re>Q&&(isNaN(j[re])||isNaN(j[re+1]));)re-=2;ae.positions=j.slice(Q,re+2)}return ae}),_.line2d.update(_.lineOptions)),_.error2d){var L=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(L)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=e.repeat(null,p),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(ae,j){var Q=T[j];if(!(!ae||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],pe=re.trace,we=re.t,Se=_.lineOptions[j],Ie,Re,We=[];pe._ownfill&&We.push(j),pe._nexttrace&&We.push(j+1),We.length&&(_.fillOrder[j]=We);var at=[],nt=Se&&Se.positions||we.positions,tt,qe;if(pe.fill==="tozeroy"){for(tt=0;tt<nt.length&&isNaN(nt[tt+1]);)tt+=2;for(qe=nt.length-2;qe>tt&&isNaN(nt[qe+1]);)qe-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,qe+2)),nt[qe+1]!==0&&(at=at.concat([nt[qe],0]))}else if(pe.fill==="tozerox"){for(tt=0;tt<nt.length&&isNaN(nt[tt]);)tt+=2;for(qe=nt.length-2;qe>tt&&isNaN(nt[qe]);)qe-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,qe+2)),nt[qe]!==0&&(at=at.concat([0,nt[qe+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Ie=0,ae.splitNull=!0,Re=0;Re<nt.length;Re+=2)(isNaN(nt[Re])||isNaN(nt[Re+1]))&&(at=at.concat(nt.slice(Ie,Re)),at.push(nt[Ie],nt[Ie+1]),at.push(null,null),Ie=Re+2);at=at.concat(nt.slice(Ie)),Ie&&at.push(nt[Ie],nt[Ie+1])}else{var he=pe._nexttrace;if(he){var ue=_.lineOptions[j+1];if(ue){var ne=ue.positions;if(pe.fill==="tonexty"){for(at=nt.slice(),j=Math.floor(ne.length/2);j--;){var Ce=ne[j*2],Ye=ne[j*2+1];isNaN(Ce)||isNaN(Ye)||at.push(Ce,Ye)}ae.fill=he.fillcolor}}}}if(pe._prevtrace&&pe._prevtrace.fill==="tonext"){var rt=_.lineOptions[j-1].positions,Ke=at.length/2;Ie=Ke;var Mt=[Ie];for(Re=0;Re<rt.length;Re+=2)(isNaN(rt[Re])||isNaN(rt[Re+1]))&&(Mt.push(Re/2+Ke+1),Ie=Re+2);at=at.concat(rt),ae.hole=Mt}return ae.fillmode=pe.fill,ae.opacity=pe.opacity,ae.positions=at,ae}}),_.fill2d.update(_.fillOptions))}var z=l.dragmode,F=t(z),N=l.clickmode.indexOf("select")>-1;for(let[ae]of T)if(ae){var O=ae.trace,P=ae.t,U=P.index,B=O._length,X=P.x,$=P.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var le=_.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(g=0;g<le.length;g++)ce[le[g]]=1;var de=[];for(g=0;g<B;g++)ce[g]||de.push(g);_.unselectBatch[U]=de}var G=P.xpx=new Array(B),Y=P.ypx=new Array(B);for(g=0;g<B;g++)G[g]=w.c2p(X[g]),Y[g]=A.c2p($[g])}else P.xpx=P.ypx=null}if(F){if(_.select2d||(_.select2d=d(l._glcanvas.data()[1].regl)),_.scatter2d){var ee=new Array(p);for(M=0;M<p;M++)ee[M]=_.selectBatch[M].length||_.unselectBatch[M].length?_.markerUnselectedOptions[M]:{};_.scatter2d.update(ee)}_.select2d&&(_.select2d.update(_.markerOptions),_.select2d.update(_.markerSelectedOptions)),_.glText&&T.forEach(function(ae){var j=((ae||[])[0]||{}).trace||{};o.hasText(j)&&n(ae)})}else _.scatter2d&&_.scatter2d.update(_.markerOptions);var q={viewport:s(l,w,A,v._context.plotGlPixelRatio),range:[(w._rl||w.range)[0],(A._rl||A.range)[0],(w._rl||w.range)[1],(A._rl||A.range)[1]]},se=e.repeat(q,_.count);_.fill2d&&_.fill2d.update(se),_.line2d&&_.line2d.update(se),_.error2d&&_.error2d.update(se.concat(se)),_.scatter2d&&_.scatter2d.update(se),_.select2d&&_.select2d.update(se),_.glText&&_.glText.forEach(function(ae){ae.update(q)})}}};h.reglPrecompiled=i}}),Pq=He({"src/traces/scattergl/index.js"(Z,V){"use strict";var d=fj();d.plot=p6(),V.exports=d}}),Iq=He({"lib/scattergl.js"(Z,V){"use strict";V.exports=Pq()}}),d6=He({"src/traces/splom/attributes.js"(Z,V){"use strict";var d=af(),x=ku(),S=tf().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=xx(),r=lh().idRegex,o=zl().templatedArray,a=Qo().extendFlat,n=d.marker,i=n.line,s=a(x("marker.line",{editTypeOverride:"calc"}),{width:a({},i.width,{editType:"calc"}),editType:"calc"}),h=a(x("marker"),{symbol:n.symbol,angle:n.angle,size:a({},n.size,{editType:"markerSize"}),sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,opacity:n.opacity,colorbar:n.colorbar,line:s,editType:"calc"});h.color.editType=h.cmin.editType=h.cmax.editType="style";function f(v){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[v],editType:"plot"}}}V.exports={dimensions:o("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:a({},t.text,{}),hovertext:a({},t.hovertext,{}),hovertemplate:E(),hovertemplatefallback:e(),xhoverformat:S("x"),yhoverformat:S("y"),marker:h,xaxes:f("x"),yaxes:f("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:t.selected.marker,editType:"calc"},unselected:{marker:t.unselected.marker,editType:"calc"},opacity:t.opacity}}}),bT=He({"src/traces/parcoords/merge_length.js"(Z,V){"use strict";V.exports=function(d,x,S,E){E||(E=1/0);var e,t;for(e=0;e<x.length;e++)t=x[e],t.visible&&(E=Math.min(E,t[S].length));for(E===1/0&&(E=0),d._length=E,e=0;e<x.length;e++)t=x[e],t.visible&&(t._length=E);return E}}}),Rq=He({"src/traces/splom/defaults.js"(Z,V){"use strict";var d=sa(),x=hp(),S=d6(),E=Fu(),e=md(),t=bT(),r=dT().isOpenSymbol;V.exports=function(i,s,h,f){function v(g,b){return d.coerce(i,s,S,g,b)}var c=x(i,s,{name:"dimensions",handleItemDefaults:o}),T=v("diagonal.visible"),l=v("showupperhalf"),_=v("showlowerhalf"),w=t(s,c,"values");if(!w||!T&&!l&&!_){s.visible=!1;return}v("text"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback"),v("xhoverformat"),v("yhoverformat"),e(i,s,h,f,v,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var A=r(s.marker.symbol),M=E.isBubble(s);v("marker.line.width",A||M?1:0),a(i,s,f,v),d.coerceSelectionMarkerOpacity(s,v)};function o(n,i){function s(f,v){return d.coerce(n,i,S.dimensions,f,v)}s("label");var h=s("values");h&&h.length?s("visible"):i.visible=!1,s("axis.type"),s("axis.matches")}function a(n,i,s,h){var f=i.dimensions,v=f.length,c=i.showupperhalf,T=i.showlowerhalf,l=i.diagonal.visible,_,w,A=new Array(v),M=new Array(v);for(_=0;_<v;_++){var g=_?_+1:"";A[_]="x"+g,M[_]="y"+g}var b=h("xaxes",A),p=h("yaxes",M),u=i._diag=new Array(v);i._xaxes={},i._yaxes={};var y=[],m=[];function R(X,$,le,ce){if(X){var de=X.charAt(0),G=s._splomAxes[de];if(i["_"+de+"axes"][X]=1,ce.push(X),!(X in G)){var Y=G[X]={};le&&(Y.label=le.label||"",le.visible&&le.axis&&(le.axis.type&&(Y.type=le.axis.type),le.axis.matches&&(Y.matches=$)))}}}var L=!l&&!T,z=!l&&!c;for(i._axesDim={},_=0;_<v;_++){var F=f[_],N=_===0,O=_===v-1,P=N&&L||O&&z?void 0:b[_],U=N&&z||O&&L?void 0:p[_];R(P,U,F,y),R(U,P,F,m),u[_]=[P,U],i._axesDim[P]=_,i._axesDim[U]=_}for(_=0;_<y.length;_++)for(w=0;w<m.length;w++){var B=y[_]+m[w];(_>w&&c||_<w&&T||_===w&&(l||!T||!c))&&(s._splomSubplots[B]=1)}(!T||!l&&c&&T)&&(s._splomGridDflt.xside="bottom",s._splomGridDflt.yside="left")}}}),Dq=He({"src/traces/splom/scene_update.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=S._fullLayout,t=E.uid,r=e._splomScenes;r||(r=e._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=r[E.uid];return n||(n=r[t]=d.extendFlat({},o,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||d.extendFlat(n,o),n}}}),zq=He({"src/traces/splom/calc.js"(Z,V){"use strict";var d=sa(),x=ef(),S=Bd().calcMarkerSize,E=Bd().calcAxisExpansion,e=Fd(),t=yg().markerSelection,r=yg().markerStyle,o=Dq(),a=Ws().BADNUM,n=y0().TOO_MANY_POINTS;V.exports=function(s,h){var f=h.dimensions,v=h._length,c={},T=c.cdata=[],l=c.data=[],_=h._visibleDims=[],w,A,M,g,b;function p(L,z){for(var F=L.makeCalcdata({v:z.values,vcalendar:h.calendar},"v"),N=0;N<F.length;N++)F[N]=F[N]===a?NaN:F[N];T.push(F),l.push(L.type==="log"?d.simpleMap(F,L.c2l):F)}for(w=0;w<f.length;w++)if(M=f[w],M.visible){if(g=x.getFromId(s,h._diag[w][0]),b=x.getFromId(s,h._diag[w][1]),g&&b&&g.type!==b.type){d.log("Skipping splom dimension "+w+" with conflicting axis types");continue}g?(p(g,M),b&&b.type==="category"&&(b._categories=g._categories.slice())):p(b,M),_.push(w)}e(s,h),d.extendFlat(c,r(s,h));var u=T.length,y=u*v>n,m;for(y?m=c.sizeAvg||Math.max(c.size,3):m=S(h,v),A=0;A<_.length;A++)w=_[A],M=f[w],g=x.getFromId(s,h._diag[w][0])||{},b=x.getFromId(s,h._diag[w][1])||{},E(s,h,g,b,T[A],T[A],m);var R=o(s,h);return R.matrix||(R.matrix=!0),R.matrixOptions=c,R.selectedOptions=t(s,h,h.selected),R.unselectedOptions=t(s,h,h.unselected),[{x:!1,y:!1,t:{},trace:h}]}}}),Fq=He({"node_modules/performance-now/lib/performance-now.js"(Z,V){(function(){var d,x,S,E,e,t;typeof performance<"u"&&performance!==null&&performance.now?V.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(V.exports=function(){return(d()-e)/1e6},x=process.hrtime,d=function(){var r;return r=x(),r[0]*1e9+r[1]},E=d(),t=process.uptime()*1e9,e=E-t):Date.now?(V.exports=function(){return Date.now()-S},S=Date.now()):(V.exports=function(){return new Date().getTime()-S},S=new Date().getTime())}).call(Z)}}),Oq=He({"node_modules/raf/index.js"(Z,V){var d=Fq(),x=window,S=["moz","webkit"],E="AnimationFrame",e=x["request"+E],t=x["cancel"+E]||x["cancelRequest"+E];for(r=0;!e&&r<S.length;r++)e=x[S[r]+"Request"+E],t=x[S[r]+"Cancel"+E]||x[S[r]+"CancelRequest"+E];var r;(!e||!t)&&(o=0,a=0,n=[],i=1e3/60,e=function(s){if(n.length===0){var h=d(),f=Math.max(0,i-(h-o));o=f+h,setTimeout(function(){var v=n.slice(0);n.length=0;for(var c=0;c<v.length;c++)if(!v[c].cancelled)try{v[c].callback(o)}catch(T){setTimeout(function(){throw T},0)}},Math.round(f))}return n.push({handle:++a,callback:s,cancelled:!1}),a},t=function(s){for(var h=0;h<n.length;h++)n[h].handle===s&&(n[h].cancelled=!0)});var o,a,n,i;V.exports=function(s){return e.call(x,s)},V.exports.cancel=function(){t.apply(x,arguments)},V.exports.polyfill=function(s){s||(s=x),s.requestAnimationFrame=e,s.cancelAnimationFrame=t}}}),Bq=He({"node_modules/array-range/index.js"(Z,V){V.exports=function(x,S){var E=typeof x=="number",e=typeof S=="number";E&&!e?(S=x,x=0):!E&&!e&&(x=0,S=0),x=x|0,S=S|0;var t=S-x;if(t<0)throw new Error("array length must be positive");for(var r=new Array(t),o=0,a=x;o<t;o++,a++)r[o]=a;return r}}}),Nq=He({"node_modules/regl-splom/index.js"(Z,V){"use strict";var d=HE(),x=Ev(),S=mg(),E=Oq(),e=Bq(),t=C1(),r=gg();V.exports=o;function o(s,h){if(!(this instanceof o))return new o(s,h);this.traces=[],this.passes={},this.regl=s,this.scatter=d(s),this.canvas=this.scatter.canvas}o.prototype.render=function(...s){return s.length&&this.update(...s),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=E(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,E(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let v=0;v<s.length;v++)this.updateItem(v,s[v]);this.traces=this.traces.filter(Boolean);let h=[],f=0;for(let v=0;v<this.traces.length;v++){let c=this.traces[v],T=this.traces[v].passes;for(let l=0;l<T.length;l++)h.push(this.passes[T[l]]);c.passOffset=f,f+=c.passes.length}return this.scatter.update(...h),this},o.prototype.updateItem=function(s,h){let{regl:f}=this;if(h===null)return this.traces[s]=null,this;if(!h)return this;let v=x(h,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),c=this.traces[s]||(this.traces[s]={id:s,buffer:f.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:t([f._gl.drawingBufferWidth,f._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(v.color!=null&&(c.color=v.color),v.size!=null&&(c.size=v.size),v.marker!=null&&(c.marker=v.marker),v.borderColor!=null&&(c.borderColor=v.borderColor),v.borderSize!=null&&(c.borderSize=v.borderSize),v.opacity!=null&&(c.opacity=v.opacity),v.viewport&&(c.viewport=t(v.viewport)),v.diagonal!=null&&(c.diagonal=v.diagonal),v.upper!=null&&(c.upper=v.upper),v.lower!=null&&(c.lower=v.lower),v.data){c.buffer(r(v.data)),c.columns=v.data.length,c.count=v.data[0].length,c.bounds=[];for(let y=0;y<c.columns;y++)c.bounds[y]=S(v.data[y],1)}let T;v.range&&(c.range=v.range,T=c.range&&typeof c.range[0]!="number"),v.domain&&(c.domain=v.domain);let l=!1;v.padding!=null&&(Array.isArray(v.padding)&&v.padding.length===c.columns&&typeof v.padding[v.padding.length-1]=="number"?(c.padding=v.padding.map(i),l=!0):c.padding=i(v.padding));let _=c.columns,w=c.count,A=c.viewport.width,M=c.viewport.height,g=c.viewport.x,b=c.viewport.y,p=A/_,u=M/_;c.passes=[];for(let y=0;y<_;y++)for(let m=0;m<_;m++){if(!c.diagonal&&m===y||!c.upper&&y>m||!c.lower&&y<m)continue;let R=a(c.id,y,m),L=this.passes[R]||(this.passes[R]={});if(v.data&&(v.transpose?L.positions={x:{buffer:c.buffer,offset:m,count:w,stride:_},y:{buffer:c.buffer,offset:y,count:w,stride:_}}:L.positions={x:{buffer:c.buffer,offset:m*w,count:w},y:{buffer:c.buffer,offset:y*w,count:w}},L.bounds=n(c.bounds,y,m)),v.domain||v.viewport||v.data){let z=l?n(c.padding,y,m):c.padding;if(c.domain){let[F,N,O,P]=n(c.domain,y,m);L.viewport=[g+F*A+z[0],b+N*M+z[1],g+O*A-z[2],b+P*M-z[3]]}else L.viewport=[g+m*p+p*z[0],b+y*u+u*z[1],g+(m+1)*p-p*z[2],b+(y+1)*u-u*z[3]]}v.color&&(L.color=c.color),v.size&&(L.size=c.size),v.marker&&(L.marker=c.marker),v.borderSize&&(L.borderSize=c.borderSize),v.borderColor&&(L.borderColor=c.borderColor),v.opacity&&(L.opacity=c.opacity),v.range&&(L.range=T?n(c.range,y,m):c.range||L.bounds),c.passes.push(R)}return this},o.prototype.draw=function(...s){if(!s.length)this.scatter.draw();else{let h=[];for(let f=0;f<s.length;f++)if(typeof s[f]=="number"){let{passes:v,passOffset:c}=this.traces[s[f]];h.push(...e(c,c+v.length))}else if(s[f].length){let v=s[f],{passes:c,passOffset:T}=this.traces[f];c=c.map((l,_)=>{h[T+_]=v})}this.scatter.draw(...h)}return this},o.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function a(s,h,f){let v=s.id!=null?s.id:s,c=h,T=f;return v<<16|(c&255)<<8|T&255}function n(s,h,f){let v,c,T,l,_,w,A,M,g=s[h],b=s[f];return g.length>2?(v=g[0],T=g[2],c=g[1],l=g[3]):g.length?(v=c=g[0],T=l=g[1]):(v=g.x,c=g.y,T=g.x+g.width,l=g.y+g.height),b.length>2?(_=b[0],A=b[2],w=b[1],M=b[3]):b.length?(_=w=b[0],A=M=b[1]):(_=b.x,w=b.y,A=b.x+b.width,M=b.y+b.height),[_,c,A,l]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let h=t(s);return[h.x,h.y,h.x+h.width,h.y+h.height]}}}}),Uq=He({"src/traces/splom/plot.js"(Z,V){"use strict";var d=Nq(),x=sa(),S=ef(),E=Jd().selectMode;V.exports=function(r,o,a){if(a.length)for(var n=0;n<a.length;n++)e(r,a[n][0])};function e(t,r){var o=t._fullLayout,a=o._size,n=r.trace,i=r.t,s=o._splomScenes[n.uid],h=s.matrixOptions,f=h.cdata,v=o._glcanvas.data()[0].regl,c=o.dragmode,T,l,_,w,A;if(f.length!==0){h.lower=n.showupperhalf,h.upper=n.showlowerhalf,h.diagonal=n.diagonal.visible;var M=n._visibleDims,g=f.length,b=s.viewOpts={};for(b.ranges=new Array(g),b.domains=new Array(g),A=0;A<M.length;A++){_=M[A];var p=b.ranges[A]=new Array(4),u=b.domains[A]=new Array(4);T=S.getFromId(t,n._diag[_][0]),T&&(p[0]=T._rl[0],p[2]=T._rl[1],u[0]=T.domain[0],u[2]=T.domain[1]),l=S.getFromId(t,n._diag[_][1]),l&&(p[1]=l._rl[0],p[3]=l._rl[1],u[1]=l.domain[0],u[3]=l.domain[1])}var y=t._context.plotGlPixelRatio,m=a.l*y,R=a.b*y,L=a.w*y,z=a.h*y;b.viewport=[m,R,L+m,z+R],s.matrix===!0&&(s.matrix=d(v));var F=o.clickmode.indexOf("select")>-1,N=E(c)||!!n.selectedpoints||F,O=!0;if(N){var P=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var U=n.selectedpoints,B={};for(_=0;_<U.length;_++)B[U[_]]=!0;var X=[];for(_=0;_<P;_++)B[_]||X.push(_);s.unselectBatch=X}var $=i.xpx=new Array(g),le=i.ypx=new Array(g);for(A=0;A<M.length;A++){if(_=M[A],T=S.getFromId(t,n._diag[_][0]),T)for($[A]=new Array(P),w=0;w<P;w++)$[A][w]=T.c2p(f[A][w]);if(l=S.getFromId(t,n._diag[_][1]),l)for(le[A]=new Array(P),w=0;w<P;w++)le[A][w]=l.c2p(f[A][w])}if(s.selectBatch.length||s.unselectBatch.length){var ce=x.extendFlat({},h,s.unselectedOptions,b),de=x.extendFlat({},h,s.selectedOptions,b);s.matrix.update(ce,de),O=!1}}else i.xpx=i.ypx=null;if(O){var G=x.extendFlat({},h,b);s.matrix.update(G,null)}}}}}),v6=He({"src/traces/splom/helpers.js"(Z){"use strict";Z.getDimIndex=function(d,x){for(var S=x._id,E=S.charAt(0),e={x:0,y:1}[E],t=d._visibleDims,r=0;r<t.length;r++){var o=t[r];if(d._diag[o][e]===S)return r}return!1}}}),jq=He({"src/traces/splom/hover.js"(Z,V){"use strict";var d=v6(),x=pT().calcHover,S=Ho().getFromId,E=Qo().extendFlat;function e(r,o,a,n,i){i||(i={});var s=(n||"").charAt(0)==="x",h=(n||"").charAt(0)==="y",f=t(r,o,a);if((s||h)&&i.hoversubplots==="axis"&&f[0])for(var v=(s?r.xa:r.ya)._subplotsWith,c=i.gd,T=E({},r),l=0;l<v.length;l++){var _=v[l];if(_!==r.xa._id+r.ya._id){h?T.xa=S(c,_,"x"):T.ya=S(c,_,"y");var w=s||h,A=t(T,o,a,w);f=f.concat(A)}}return f}function t(r,o,a,n){var i=r.cd,s=i[0].trace,h=r.scene,f=h.matrixOptions.cdata,v=r.xa,c=r.ya,T=v.c2p(o),l=c.c2p(a),_=r.distance,w=d.getDimIndex(s,v),A=d.getDimIndex(s,c);if(w===!1||A===!1)return[r];for(var M=f[w],g=f[A],b,p,u=_,y=0;y<M.length;y++)if(!(n&&y!==r.index)){var m=M[y],R=g[y],L=v.c2p(m)-T,z=c.c2p(R)-l,F=Math.sqrt(L*L+z*z);(n||F<u)&&(u=p=F,b=y)}return r.index=b,r.distance=u,r.dxy=p,b===void 0?[r]:[x(r,M,g,s)]}V.exports={hoverPoints:e}}}),qq=He({"src/traces/splom/select.js"(Z,V){"use strict";var d=sa(),x=d.pushUnique,S=Fu(),E=v6();V.exports=function(t,r){var o=t.cd,a=o[0].trace,n=o[0].t,i=t.scene,s=i.matrixOptions.cdata,h=t.xaxis,f=t.yaxis,v=[];if(!i)return v;var c=!S.hasMarkers(a)&&!S.hasText(a);if(a.visible!==!0||c)return v;var T=E.getDimIndex(a,h),l=E.getDimIndex(a,f);if(T===!1||l===!1)return v;var _=n.xpx[T],w=n.ypx[l],A=s[T],M=s[l],g=(t.scene.selectBatch||[]).slice(),b=[];if(r!==!1&&!r.degenerate)for(var p=0;p<A.length;p++)r.contains([_[p],w[p]],null,p,t)?(v.push({pointNumber:p,x:A[p],y:M[p]}),x(g,p)):g.indexOf(p)!==-1?x(g,p):b.push(p);var u=i.matrixOptions;return!g.length&&!b.length?i.matrix.update(u,null):!i.selectBatch.length&&!i.unselectBatch.length&&i.matrix.update(i.unselectedOptions,d.extendFlat({},u,i.selectedOptions,i.viewOpts)),i.selectBatch=g,i.unselectBatch=b,v}}}),Vq=He({"src/traces/splom/edit_style.js"(Z,V){"use strict";var d=sa(),x=Fd(),S=yg().markerStyle;V.exports=function(e,t){var r=t.trace,o=e._fullLayout._splomScenes[r.uid];if(o){x(e,r),d.extendFlat(o.matrixOptions,S(e,r));var a=d.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(a,null)}}}}),Gq=He({"src/traces/splom/base_index.js"(Z,V){"use strict";var d=lo(),x=X5();V.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:d6(),supplyDefaults:Rq(),colorbar:pp(),calc:zq(),plot:Uq(),hoverPoints:jq().hoverPoints,selectPoints:qq(),editStyle:Vq(),meta:{}},d.register(x)}}),Hq=He({"src/traces/splom/base_plot.js"(Z,V){"use strict";var d=a6(),x=lo(),S=xT(),E=Hh().getModuleCalcData,e=Kf(),t=ef().getFromId,r=Ho().shouldShowZeroLine,o="splom",a={};function n(c){var T=c._fullLayout,l=x.getModule(o),_=E(c.calcdata,l)[0],w=S(c,["ANGLE_instanced_arrays","OES_element_index_uint"],a);w&&(T._hasOnlyLargeSploms&&h(c),l.plot(c,{},_))}function i(c){var T=c.calcdata,l=c._fullLayout;l._hasOnlyLargeSploms&&h(c);for(var _=0;_<T.length;_++){var w=T[_][0],A=w.trace,M=l._splomScenes[A.uid];A.type==="splom"&&M&&M.matrix&&s(c,A,M)}}function s(c,T,l){for(var _=l.matrixOptions.data.length,w=T._visibleDims,A=l.viewOpts.ranges=new Array(_),M=0;M<w.length;M++){var g=w[M],b=A[M]=new Array(4),p=t(c,T._diag[g][0]);p&&(b[0]=p.r2l(p.range[0]),b[2]=p.r2l(p.range[1]));var u=t(c,T._diag[g][1]);u&&(b[1]=u.r2l(u.range[0]),b[3]=u.r2l(u.range[1]))}l.selectBatch.length||l.unselectBatch.length?l.matrix.update({ranges:A},{ranges:A}):l.matrix.update({ranges:A})}function h(c){var T=c._fullLayout,l=T._glcanvas.data()[0].regl,_=T._splomGrid;_||(_=T._splomGrid=d(l)),_.update(f(c))}function f(c){var T=c._context.plotGlPixelRatio,l=c._fullLayout,_=l._size,w=[0,0,l.width*T,l.height*T],A={},M;function g(X,$,le,ce,de,G){le*=T,ce*=T,de*=T,G*=T;var Y=$[X+"color"],ee=$[X+"width"],q=String(Y+ee);q in A?A[q].data.push(NaN,NaN,le,ce,de,G):A[q]={data:[le,ce,de,G],join:"rect",thickness:ee*T,color:Y,viewport:w,range:w,overlay:!1}}for(M in l._splomSubplots){var b=l._plots[M],p=b.xaxis,u=b.yaxis,y=p._gridVals,m=u._gridVals,R=p._offset,L=p._length,z=u._length,F=_.b+u.domain[0]*_.h,N=-u._m,O=-N*u.r2l(u.range[0],u.calendar),P,U;if(p.showgrid)for(M=0;M<y.length;M++)P=R+p.l2p(y[M].x),g("grid",p,P,F,P,F+z);if(u.showgrid)for(M=0;M<m.length;M++)U=F+O+N*m[M].x,g("grid",u,R,U,R+L,U);r(c,p,u)&&(P=R+p.l2p(0),g("zeroline",p,P,F,P,F+z)),r(c,u,p)&&(U=F+O+0,g("zeroline",u,R,U,R+L,U))}var B=[];for(M in A)B.push(A[M]);return B}function v(c,T,l,_){var w={},A;if(_._splomScenes){for(A=0;A<c.length;A++){var M=c[A];M.type==="splom"&&(w[M.uid]=1)}for(A=0;A<l.length;A++){var g=l[A];if(!w[g.uid]){var b=_._splomScenes[g.uid];b&&b.destroy&&b.destroy(),_._splomScenes[g.uid]=null,delete _._splomScenes[g.uid]}}}Object.keys(_._splomScenes||{}).length===0&&delete _._splomScenes,_._splomGrid&&!T._hasOnlyLargeSploms&&_._hasOnlyLargeSploms&&(_._splomGrid.destroy(),_._splomGrid=null,delete _._splomGrid),e.clean(c,T,l,_)}V.exports={name:o,attr:e.attr,attrRegex:e.attrRegex,layoutAttributes:e.layoutAttributes,supplyLayoutDefaults:e.supplyLayoutDefaults,drawFramework:e.drawFramework,plot:n,drag:i,updateGrid:h,clean:v,updateFx:e.updateFx,toSVG:e.toSVG,reglPrecompiled:a}}}),Wq=He({"src/traces/splom/index.js"(Z,V){"use strict";var d=Gq();d.basePlotModule=Hq(),V.exports=d}}),Xq=He({"lib/splom.js"(Z,V){"use strict";V.exports=Wq()}}),m6=He({"src/traces/parcoords/attributes.js"(Z,V){"use strict";var d=ku(),x=Wh(),S=tc(),E=wc().attributes,e=Qo().extendFlat,t=zl().templatedArray;V.exports={domain:E({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:S({editType:"plot"}),tickfont:S({autoShadowDflt:!0,editType:"plot"}),rangefont:S({editType:"plot"}),dimensions:t("dimension",{label:{valType:"string",editType:"plot"},tickvals:e({},x.tickvals,{editType:"plot"}),ticktext:e({},x.ticktext,{editType:"plot"}),tickformat:e({},x.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:e({editType:"calc"},d("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"}}}}),Ax=He({"src/traces/parcoords/constants.js"(Z,V){"use strict";V.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"}}}}),kv=He({"src/lib/gup.js"(Z,V){"use strict";var d=S_();function x(S){return[S]}V.exports={keyFun:function(S){return S.key},repeat:x,descend:d,wrap:x,unwrap:function(S){return S[0]}}}}),g6=He({"src/traces/parcoords/axisbrush.js"(Z,V){"use strict";var d=Ax(),x=Wn(),S=kv().keyFun,E=kv().repeat,e=sa().sorterAsc,t=sa().strTranslate,r=d.bar.snapRatio;function o(B,X){return B*(1-r)+X*r}var a=d.bar.snapClose;function n(B,X){return B*(1-a)+X*a}function i(B,X,$,le){if(s($,le))return $;var ce=B?-1:1,de=0,G=X.length-1;if(ce<0){var Y=de;de=G,G=Y}for(var ee=X[de],q=ee,se=de;ce*se<ce*G;se+=ce){var ae=se+ce,j=X[ae];if(ce*$<ce*n(ee,j))return o(ee,q);if(ce*$<ce*j||ae===G)return o(j,ee);q=ee,ee=j}}function s(B,X){for(var $=0;$<X.length;$++)if(B>=X[$][0]&&B<=X[$][1])return!0;return!1}function h(B){B.attr("x",-d.bar.captureWidth/2).attr("width",d.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function v(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var X=c(B.brush.filter.getConsolidated(),B.height),$=[0],le,ce,de,G=X.length?X[0][0]:null,Y=0;Y<X.length;Y++)le=X[Y],ce=le[1]-le[0],$.push(G),$.push(ce),de=Y+1,de<X.length&&(G=X[de][0]-le[1]);return $.push(B.height),$}function c(B,X){return B.map(function($){return $.map(function(le){return Math.max(0,le*X)}).sort(e)})}function T(B,X){var $=d.bar.handleHeight;if(!(X>B[1]+$||X<B[0]-$))return X>=.9*B[1]+.1*B[0]?"n":X<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){x.select(document.body).style("cursor",null)}function _(B){B.attr("stroke-dasharray",v)}function w(B,X){var $=x.select(B).selectAll(".highlight, .highlight-shadow"),le=X?$.transition().duration(d.bar.snapDuration).each("end",X):$;_(le)}function A(B,X){var $=B.brush,le=$.filterSpecified,ce=NaN,de={},G;if(le){var Y=B.height,ee=$.filter.getConsolidated(),q=c(ee,Y),se=NaN,ae=NaN,j=NaN;for(G=0;G<=q.length;G++){var Q=q[G];if(Q&&Q[0]<=X&&X<=Q[1]){se=G;break}else if(ae=G?G-1:NaN,Q&&Q[0]>X){j=G;break}}if(ce=se,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=X-q[ae][1]<q[j][0]-X?ae:j),!isNaN(ce)){var re=q[ce],pe=T(re,X);pe&&(de.interval=ee[ce],de.intervalPix=re,de.region=pe)}}if(B.ordinal&&!de.region){var we=B.unitTickvals,Se=B.unitToPaddedPx.invert(X);for(G=0;G<we.length;G++){var Ie=[we[Math.max(G-1,0)]*.25+we[G]*.75,we[Math.min(G+1,we.length-1)]*.25+we[G]*.75];if(Se>=Ie[0]&&Se<=Ie[1]){de.clickableOrdinalRange=Ie;break}}}return de}function M(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=X.unitToPaddedPx.invert($),ce=X.brush,de=A(X,$),G=de.interval,Y=ce.svgBrush;if(Y.wasDragged=!1,Y.grabbingBar=de.region==="ns",Y.grabbingBar){var ee=G.map(X.unitToPaddedPx);Y.grabPoint=$-ee[0]-d.verticalPadding,Y.barLength=ee[1]-ee[0]}Y.clickableOrdinalRange=de.clickableOrdinalRange,Y.stayingIntervals=X.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],G&&(Y.stayingIntervals=Y.stayingIntervals.filter(function(q){return q[0]!==G[0]&&q[1]!==G[1]})),Y.startExtent=de.region?G[de.region==="s"?1:0]:le,X.parent.inBrushDrag=!0,Y.brushStartCallback()}function g(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=X.brush.svgBrush;le.wasDragged=!0,le._dragging=!0,le.grabbingBar?le.newExtent=[$-le.grabPoint,$+le.barLength-le.grabPoint].map(X.unitToPaddedPx.invert):le.newExtent=[le.startExtent,X.unitToPaddedPx.invert($)].sort(e),X.brush.filterSpecified=!0,le.extent=le.stayingIntervals.concat([le.newExtent]),le.brushCallback(X),w(B.parentNode)}function b(B,X){var $=X.brush,le=$.filter,ce=$.svgBrush;ce._dragging||(p(B,X),g(B,X),X.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=x.event;de.sourceEvent.stopPropagation();var G=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,X.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&X.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):G?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(X),w(B.parentNode),ce.brushEndCallback($.filterSpecified?le.getConsolidated():[]);return}var Y=function(){le.set(le.getConsolidated())};if(X.ordinal){var ee=X.unitTickvals;ee[ee.length-1]<ee[0]&&ee.reverse(),ce.newExtent=[i(0,ee,ce.newExtent[0],ce.stayingIntervals),i(1,ee,ce.newExtent[1],ce.stayingIntervals)];var q=ce.newExtent[1]>ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(q?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(X),q?w(B.parentNode,Y):(Y(),w(B.parentNode))}else Y();ce.brushEndCallback($.filterSpecified?le.getConsolidated():[])}function p(B,X){var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=A(X,$),ce="crosshair";le.clickableOrdinalRange?ce="pointer":le.region&&(ce=le.region+"-resize"),x.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(X){x.event.preventDefault(),X.parent.inBrushDrag||p(this,X)}).on("mouseleave",function(X){X.parent.inBrushDrag||l()}).call(x.behavior.drag().on("dragstart",function(X){M(this,X)}).on("drag",function(X){g(this,X)}).on("dragend",function(X){b(this,X)}))}function y(B,X){return B[0]-X[0]}function m(B,X,$){var le=$._context.staticPlot,ce=B.selectAll(".background").data(E);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",le?"none":"auto").attr("transform",t(0,d.verticalPadding)),ce.call(u).attr("height",function(Y){return Y.height-d.verticalPadding});var de=B.selectAll(".highlight-shadow").data(E);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width+d.bar.strokeWidth).attr("stroke",X).attr("opacity",d.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(Y){return Y.height}).call(_);var G=B.selectAll(".highlight").data(E);G.enter().append("line").classed("highlight",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width-d.bar.strokeWidth).attr("stroke",d.bar.fillColor).attr("opacity",d.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(Y){return Y.height}).call(_)}function R(B,X,$){var le=B.selectAll("."+d.cn.axisBrush).data(E,S);le.enter().append("g").classed(d.cn.axisBrush,!0),m(le,X,$)}function L(B){return B.svgBrush.extent.map(function(X){return X.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var le=$.brush,ce=L(le),de=ce.slice();le.filter.set(de),B()}}function N(B){for(var X=B.slice(),$=[],le,ce=X.shift();ce;){for(le=ce.slice();(ce=X.shift())&&ce[0]<=le[1];)le[1]=Math.max(le[1],ce[1]);$.push(le)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],X,$;return{set:function(le){B=le.map(function(ce){return ce.slice().sort(e)}).sort(y),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),X=N(B),$=B.reduce(function(ce,de){return[Math.min(ce[0],de[0]),Math.max(ce[1],de[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return X},getBounds:function(){return $}}}function P(B,X,$,le,ce,de){var G=O();return G.set($),{filter:G,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:le,brushCallback:F(ce),brushEndCallback:de}}}function U(B,X){if(Array.isArray(B[0])?(B=B.map(function(le){return le.sort(e)}),X.multiselect?B=N(B.sort(y)):B=[B[0]]):B=[B.sort(e)],X.tickvals){var $=X.tickvals.slice().sort(e);if(B=B.map(function(le){var ce=[i(0,$,le[0],[]),i(1,$,le[1],[])];if(ce[1]>ce[0])return ce}).filter(function(le){return le}),!B.length)return}return B.length>1?B:B[0]}V.exports={makeBrush:P,ensureAxisBrush:R,cleanRanges:U}}}),Zq=He({"src/traces/parcoords/defaults.js"(Z,V){"use strict";var d=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=Ho(),r=m6(),o=g6(),a=Ax().maxDimensionCount,n=bT();function i(h,f,v,c,T){var l=T("line.color",v);if(x(h,"line")&&d.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=v}return 1/0}function s(h,f,v,c){function T(M,g){return d.coerce(h,f,r.dimensions,M,g)}var l=T("values"),_=T("visible");if(l&&l.length||(_=f.visible=!1),_){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var w=T("range");f._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:w},t.setConvert(f._ax,c.layout),T("multiselect");var A=T("constraintrange");A&&(f.constraintrange=o.cleanRanges(A,f))}}V.exports=function(f,v,c,T){function l(g,b){return d.coerce(f,v,r,g,b)}var _=f.dimensions;Array.isArray(_)&&_.length>a&&(d.log("parcoords traces support up to "+a+" dimensions at the moment"),_.splice(a));var w=e(f,v,{name:"dimensions",layout:T,handleItemDefaults:s}),A=i(f,v,c,T,l);E(v,T,l),(!Array.isArray(w)||!w.length)&&(v.visible=!1),n(v,w,"values",A);var M=d.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});d.coerceFont(l,"labelfont",M),d.coerceFont(l,"tickfont",M,{autoShadowDflt:!0}),d.coerceFont(l,"rangefont",M),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Yq=He({"src/traces/parcoords/calc.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray,x=rc(),S=kv().wrap;V.exports=function(t,r){var o,a;return x.hasColorscale(r,"line")&&d(r.line.color)?(o=r.line.color,a=x.extractOpts(r.line).colorscale,x.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=E(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function E(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}}});function Kq(Z){var V,d,x,S=[],E=1,e;if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(Z=String(Z).toLowerCase(),wT.default[Z])S=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")E=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;E=1,o?(S=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(E=parseInt(t[3]+t[3],16)/255)):(S=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],r===8&&(E=parseInt(t[6]+t[7],16)/255)),S[0]||(S[0]=0),S[1]||(S[1]=0),S[2]||(S[2]=0),e="rgb"}else if(x=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=x[1];e=a.replace(/a$/,"");var n=e==="cmyk"?4:e==="gray"?1:3;S=x[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:e==="rgb"?i*255:e[0]==="h"||e[0]==="l"&&!s?i*100:e==="lab"?i*125:e==="lch"?s<2?i*150:i*360:e[0]==="o"&&!s?i:e==="oklab"?i*.4:e==="oklch"?s<2?i*.4:i*360:i;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[i]!==void 0)return TT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),E=S.length>n?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),e=((d=(V=Z.match(/([a-z])/ig))==null?void 0:V.join(""))==null?void 0:d.toLowerCase())||"rgb");return{space:e,values:S,alpha:E}}var wT,y6,TT,Jq=Go({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Kq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Go({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,$q=Go({"node_modules/color-space/hsl.js"(){_6(),Mx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Z){var V=Z[0]/360,d=Z[1]/100,x=Z[2]/100,S,E,e,t,r,o=0;if(d===0)return r=x*255,[r,r,r];for(E=x<.5?x*(1+d):x+d-x*d,S=2*x-E,t=[0,0,0];o<3;)e=V+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(E-S)*6*e:2*e<1?E:3*e<2?S+(E-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var V=Z[0]/255,d=Z[1]/255,x=Z[2]/255,S=Math.min(V,d,x),E=Math.max(V,d,x),e=E-S,t,r,o;return E===S?t=0:V===E?t=(d-x)/e:d===E?t=2+(x-V)/e:x===E&&(t=4+(V-d)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+E)/2,E===S?r=0:o<=.5?r=e/(E+S):r=e/(2-E-S),[t,r*100,o*100]}}}),x6={};Kl(x6,{default:()=>Qq});function Qq(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var V,d,x,S=y6(Z);if(!S.space)return[];let E=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return V=Array(3),V[0]=Math.min(Math.max(S.values[0],E[0]),e[0]),V[1]=Math.min(Math.max(S.values[1],E[1]),e[1]),V[2]=Math.min(Math.max(S.values[2],E[2]),e[2]),S.space[0]==="h"&&(V=Mx.rgb(V)),V.push(Math.min(Math.max(S.alpha,0),1)),V}var eV=Go({"node_modules/color-rgba/index.js"(){Jq(),_6(),$q()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var V=sa().isTypedArray;Z.convertTypedArray=function(d){return V(d)?Array.prototype.slice.call(d):d},Z.isOrdinal=function(d){return!!d.tickvals},Z.isVisible=function(d){return d.visible||!("visible"in d)}}}),tV=He({"src/traces/parcoords/lines.js"(Z,V){"use strict";var d=["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(`
`),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(`
`),S=Ax().maxDimensionCount,E=sa(),e=1e-6,t=2048,r=new Uint8Array(4),o=new Uint8Array(4),a={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(b){b.read({x:0,y:0,width:1,height:1,data:r})}function i(b,p,u,y,m){var R=b._gl;R.enable(R.SCISSOR_TEST),R.scissor(p,u,y,m),b.clear({color:[0,0,0,0],depth:1})}function s(b,p,u,y,m,R){var L=R.key;function z(F){var N=Math.min(y,m-F*y);F===0&&(window.cancelAnimationFrame(u.currentRafs[L]),delete u.currentRafs[L],i(b,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!u.clearOnly&&(R.count=2*N,R.offset=2*F*y,p(R),F*y+N<m&&(u.currentRafs[L]=window.requestAnimationFrame(function(){z(F+1)})),u.drawCompleted=!1)}u.drawCompleted||(n(b),u.drawCompleted=!0),z(0)}function h(b){return Math.max(e,Math.min(1-e,b))}function f(b,p){for(var u=new Array(256),y=0;y<256;y++)u[y]=b(y/255).concat(p);return u}function v(b,p){return(b>>>8*p)%256/255}function c(b,p,u){for(var y=new Array(b*(S+4)),m=0,R=0;R<b;R++){for(var L=0;L<S;L++)y[m++]=L<p.length?p[L].paddedUnitValues[R]:.5;y[m++]=v(R,2),y[m++]=v(R,1),y[m++]=v(R,0),y[m++]=h(u[R])}return y}function T(b,p,u){for(var y=new Array(p*8),m=0,R=0;R<p;R++)for(var L=0;L<2;L++)for(var z=0;z<4;z++){var F=b*4+z,N=u[R*64+F];F===63&&L===0&&(N*=-1),y[m++]=N}return y}function l(b){var p="0"+b;return p.slice(-2)}function _(b){return b<S?"p"+l(b+1)+"_"+l(b+4):"colors"}function w(b,p,u){for(var y=0;y<=S;y+=4)b[_(y)](T(y/4,p,u))}function A(b){for(var p={},u=0;u<=S;u+=4)p[_(u)]=b.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return p}function M(b,p,u,y,m,R,L,z,F,N,O,P,U,B){for(var X=[[],[]],$=0;$<64;$++)X[0][$]=$===m?1:0,X[1][$]=$===R?1:0;L*=B,z*=B,F*=B,N*=B;var le=b.lines.canvasOverdrag*B,ce=b.domain,de=b.canvasWidth*B,G=b.canvasHeight*B,Y=b.pad.l*B,ee=b.pad.b*B,q=b.layoutHeight*B,se=b.layoutWidth*B,ae=b.deselectedLines.color,j=b.deselectedLines.opacity,Q=E.extendFlat({key:O,resolution:[de,G],viewBoxPos:[L+le,z],viewBoxSize:[F,N],i0:m,i1:R,dim0A:X[0].slice(0,16),dim0B:X[0].slice(16,32),dim0C:X[0].slice(32,48),dim0D:X[0].slice(48,64),dim1A:X[1].slice(0,16),dim1B:X[1].slice(16,32),dim1C:X[1].slice(32,48),dim1D:X[1].slice(48,64),drwLayer:P,contextColor:[ae[0]/255,ae[1]/255,ae[2]/255,j!=="auto"?ae[3]*j:Math.max(1/255,Math.pow(1/b.lines.color.length,1/3))],scissorX:(y===p?0:L+le)+(Y-le)+se*ce.x[0],scissorWidth:(y===u?de-L+le:F+.5)+(y===p?L+le:0),scissorY:z+ee+q*ce.y[0],scissorHeight:N,viewportX:Y-le+se*ce.x[0],viewportY:ee+q*ce.y[0],viewportWidth:de,viewportHeight:G},U);return Q}function g(b){var p=t-1,u=Math.max(0,Math.floor(b[0]*p),0),y=Math.min(p,Math.ceil(b[1]*p),p);return[Math.min(u,y),Math.max(u,y)]}V.exports=function(b,p){var u=p.context,y=p.pick,m=p.regl,R=m._gl,L=R.getParameter(R.ALIASED_LINE_WIDTH_RANGE),z=Math.max(L[0],Math.min(L[1],p.viewModel.plotGlPixelRatio)),F={currentRafs:{},drawCompleted:!0,clearOnly:!1},N,O,P,U,B=A(m),X,$=m.texture(a),le=[];de(p);var ce=m({profile:!1,blend:{enable:u,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!u,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:m.prop("scissorX"),y:m.prop("scissorY"),width:m.prop("scissorWidth"),height:m.prop("scissorHeight")}},viewport:{x:m.prop("viewportX"),y:m.prop("viewportY"),width:m.prop("viewportWidth"),height:m.prop("viewportHeight")},dither:!1,vert:d,frag:x,primitive:"lines",lineWidth:z,attributes:B,uniforms:{resolution:m.prop("resolution"),viewBoxPos:m.prop("viewBoxPos"),viewBoxSize:m.prop("viewBoxSize"),dim0A:m.prop("dim0A"),dim1A:m.prop("dim1A"),dim0B:m.prop("dim0B"),dim1B:m.prop("dim1B"),dim0C:m.prop("dim0C"),dim1C:m.prop("dim1C"),dim0D:m.prop("dim0D"),dim1D:m.prop("dim1D"),loA:m.prop("loA"),hiA:m.prop("hiA"),loB:m.prop("loB"),hiB:m.prop("hiB"),loC:m.prop("loC"),hiC:m.prop("hiC"),loD:m.prop("loD"),hiD:m.prop("hiD"),palette:$,contextColor:m.prop("contextColor"),maskTexture:m.prop("maskTexture"),drwLayer:m.prop("drwLayer"),maskHeight:m.prop("maskHeight")},offset:m.prop("offset"),count:m.prop("count")});function de(ae){N=ae.model,O=ae.viewModel,P=O.dimensions.slice(),U=P[0]?P[0].values.length:0;var j=N.lines,Q=y?j.color.map(function(pe,we){return we/j.color.length}):j.color,re=c(U,P,Q);w(B,U,re),!u&&!y&&($=m.texture(E.extendFlat({data:f(N.unitToColor,255)},a)))}function G(ae){var j,Q,re,pe=[[],[]];for(re=0;re<64;re++){var we=!ae&&re<P.length?P[re].brush.filter.getBounds():[-1/0,1/0];pe[0][re]=we[0],pe[1][re]=we[1]}var Se=t*8,Ie=new Array(Se);for(j=0;j<Se;j++)Ie[j]=255;if(!ae)for(j=0;j<P.length;j++){var Re=j%8,We=(j-Re)/8,at=Math.pow(2,Re),nt=P[j],tt=nt.brush.filter.get();if(!(tt.length<2)){var qe=g(tt[0])[1];for(Q=1;Q<tt.length;Q++){var he=g(tt[Q]);for(re=qe+1;re<he[0];re++)Ie[re*8+We]&=~at;qe=Math.max(qe,he[1])}}}var ue={shape:[8,t],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Ie};return X?X(ue):X=m.texture(ue),{maskTexture:X,maskHeight:t,loA:pe[0].slice(0,16),loB:pe[0].slice(16,32),loC:pe[0].slice(32,48),loD:pe[0].slice(48,64),hiA:pe[1].slice(0,16),hiB:pe[1].slice(16,32),hiC:pe[1].slice(32,48),hiD:pe[1].slice(48,64)}}function Y(ae,j,Q){var re=ae.length,pe,we,Se,Ie=1/0,Re=-1/0;for(pe=0;pe<re;pe++)ae[pe].dim0.canvasX<Ie&&(Ie=ae[pe].dim0.canvasX,we=pe),ae[pe].dim1.canvasX>Re&&(Re=ae[pe].dim1.canvasX,Se=pe);re===0&&i(m,0,0,N.canvasWidth,N.canvasHeight);var We=G(u);for(pe=0;pe<re;pe++){var at=ae[pe],nt=at.dim0.crossfilterDimensionIndex,tt=at.dim1.crossfilterDimensionIndex,qe=at.canvasX,he=at.canvasY,ue=qe+at.panelSizeX,ne=at.plotGlPixelRatio;if(j||!le[nt]||le[nt][0]!==qe||le[nt][1]!==ue){le[nt]=[qe,ue];var Ce=M(N,we,Se,pe,nt,tt,qe,he,at.panelSizeX,at.panelSizeY,at.dim0.crossfilterDimensionIndex,u?0:y?2:1,We,ne);F.clearOnly=Q;var Ye=j?N.lines.blockLineCount:U;s(m,ce,F,Ye,U,Ce)}}}function ee(ae,j){return m.read({x:ae,y:j,width:1,height:1,data:o}),o}function q(ae,j,Q,re){var pe=new Uint8Array(4*Q*re);return m.read({x:ae,y:j,width:Q,height:re,data:pe}),pe}function se(){b.style["pointer-events"]="none",$.destroy(),X&&X.destroy();for(var ae in B)B[ae].destroy()}return{render:Y,readPixel:ee,readPixels:q,destroy:se,update:de}}}}),rV=He({"src/traces/parcoords/parcoords.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=x.isArrayOrTypedArray,E=x.numberFormat,e=(eV(),zf(x6)).default,t=Ho(),r=x.strRotate,o=x.strTranslate,a=ou(),n=es(),i=rc(),s=kv(),h=s.keyFun,f=s.repeat,v=s.unwrap,c=b6(),T=Ax(),l=g6(),_=tV();function w(le,ce,de){return x.aggNums(le,null,ce,de)}function A(le,ce){return g(w(Math.min,le,ce),w(Math.max,le,ce))}function M(le){var ce=le.range;return ce?g(ce[0],ce[1]):A(le.values,le._length)}function g(le,ce){return(isNaN(le)||!isFinite(le))&&(le=0),(isNaN(ce)||!isFinite(ce))&&(ce=0),le===ce&&(le===0?(le-=1,ce+=1):(le*=.9,ce*=1.1)),[le,ce]}function b(le,ce){return ce?function(de,G){var Y=ce[G];return Y??le(de)}:le}function p(le,ce,de,G,Y){var ee=M(de);return G?d.scale.ordinal().domain(G.map(b(E(de.tickformat),Y))).range(G.map(function(q){var se=(q-ee[0])/(ee[1]-ee[0]);return le-ce+se*(2*ce-le)})):d.scale.linear().domain(ee).range([le-ce,ce])}function u(le,ce){return d.scale.linear().range([ce,le-ce])}function y(le,ce){return d.scale.linear().domain(M(le)).range([ce,1-ce])}function m(le){if(le.tickvals){var ce=M(le);return d.scale.ordinal().domain(le.tickvals).range(le.tickvals.map(function(de){return(de-ce[0])/(ce[1]-ce[0])}))}}function R(le){var ce=le.map(function(ee){return ee[0]}),de=le.map(function(ee){var q=e(ee[1]);return d.rgb("rgb("+q[0]+","+q[1]+","+q[2]+")")}),G=function(ee){return function(q){return q[ee]}},Y="rgb".split("").map(function(ee){return d.scale.linear().clamp(!0).domain(ce).range(de.map(G(ee)))});return function(ee){return Y.map(function(q){return q(ee)})}}function L(le){return le.dimensions.some(function(ce){return ce.brush.filterSpecified})}function z(le,ce,de){var G=v(ce),Y=G.trace,ee=c.convertTypedArray(G.lineColor),q=Y.line,se={color:e(Y.unselected.line.color),opacity:Y.unselected.line.opacity},ae=i.extractOpts(q),j=ae.reversescale?i.flipScale(G.cscale):G.cscale,Q=Y.domain,re=Y.dimensions,pe=le.width,we=Y.labelangle,Se=Y.labelside,Ie=Y.labelfont,Re=Y.tickfont,We=Y.rangefont,at=x.extendDeepNoArrays({},q,{color:ee.map(d.scale.linear().domain(M({values:ee,range:[ae.min,ae.max],_length:Y._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),nt=Math.floor(pe*(Q.x[1]-Q.x[0])),tt=Math.floor(le.height*(Q.y[1]-Q.y[0])),qe=le.margin||{l:80,r:80,t:100,b:80},he=nt,ue=tt;return{key:de,colCount:re.filter(c.isVisible).length,dimensions:re,tickDistance:T.tickDistance,unitToColor:R(j),lines:at,deselectedLines:se,labelAngle:we,labelSide:Se,labelFont:Ie,tickFont:Re,rangeFont:We,layoutWidth:pe,layoutHeight:le.height,domain:Q,translateX:Q.x[0]*pe,translateY:le.height-Q.y[1]*le.height,pad:qe,canvasWidth:he*T.canvasPixelRatio+2*at.canvasOverdrag,canvasHeight:ue*T.canvasPixelRatio,width:he,height:ue,canvasPixelRatio:T.canvasPixelRatio}}function F(le,ce,de){var G=de.width,Y=de.height,ee=de.dimensions,q=de.canvasPixelRatio,se=function(pe){return G*pe/Math.max(1,de.colCount-1)},ae=T.verticalPadding/Y,j=u(Y,T.verticalPadding),Q={key:de.key,xScale:se,model:de,inBrushDrag:!1},re={};return Q.dimensions=ee.filter(c.isVisible).map(function(pe,we){var Se=y(pe,ae),Ie=re[pe.label];re[pe.label]=(Ie||0)+1;var Re=pe.label+(Ie?"__"+Ie:""),We=pe.constraintrange,at=We&&We.length;at&&!S(We[0])&&(We=[We]);var nt=at?We.map(function(Mt){return Mt.map(Se)}):[[-1/0,1/0]],tt=function(){var Mt=Q;Mt.focusLayer&&Mt.focusLayer.render(Mt.panels,!0);var kt=L(Mt);!le.contextShown()&&kt?(Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!0),le.contextShown(!0)):le.contextShown()&&!kt&&(Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!0,!0),le.contextShown(!1))},qe=pe.values;qe.length>pe._length&&(qe=qe.slice(0,pe._length));var he=pe.tickvals,ue;function ne(Mt,kt){return{val:Mt,text:ue[kt]}}function Ce(Mt,kt){return Mt.val-kt.val}if(S(he)&&he.length){x.isTypedArray(he)&&(he=Array.from(he)),ue=pe.ticktext,!S(ue)||!ue.length?ue=he.map(E(pe.tickformat)):ue.length>he.length?ue=ue.slice(0,he.length):he.length>ue.length&&(he=he.slice(0,ue.length));for(var Ye=1;Ye<he.length;Ye++)if(he[Ye]<he[Ye-1]){for(var rt=he.map(ne).sort(Ce),Ke=0;Ke<he.length;Ke++)he[Ke]=rt[Ke].val,ue[Ke]=rt[Ke].text;break}}else he=void 0;return qe=c.convertTypedArray(qe),{key:Re,label:pe.label,tickFormat:pe.tickformat,tickvals:he,ticktext:ue,ordinal:c.isOrdinal(pe),multiselect:pe.multiselect,xIndex:we,crossfilterDimensionIndex:we,visibleIndex:pe._index,height:Y,values:qe,paddedUnitValues:qe.map(Se),unitTickvals:he&&he.map(Se),xScale:se,x:se(we),canvasX:se(we)*q,unitToPaddedPx:j,domainScale:p(Y,T.verticalPadding,pe,he,ue),ordinalScale:m(pe),parent:Q,model:de,brush:l.makeBrush(le,at,nt,function(){le.linePickActive(!1)},tt,function(Mt){if(Q.focusLayer.render(Q.panels,!0),Q.pickLayer&&Q.pickLayer.render(Q.panels,!0),le.linePickActive(!0),ce&&ce.filterChanged){var kt=Se.invert,Nt=Mt.map(function(Gt){return Gt.map(kt).sort(x.sorterAsc)}).sort(function(Gt,Mr){return Gt[0]-Mr[0]});ce.filterChanged(Q.key,pe._index,Nt)}})}}),Q}function N(le){le.classed(T.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function O(){var le=!0,ce=!1;return{linePickActive:function(de){return arguments.length?le=!!de:le},contextShown:function(de){return arguments.length?ce=!!de:ce}}}function P(le,ce){var de=ce==="top"?1:-1,G=le*Math.PI/180,Y=Math.sin(G),ee=Math.cos(G);return{dir:de,dx:Y,dy:ee,degrees:le}}function U(le,ce,de){for(var G=ce.panels||(ce.panels=[]),Y=le.data(),ee=0;ee<Y.length-1;ee++){var q=G[ee]||(G[ee]={}),se=Y[ee],ae=Y[ee+1];q.dim0=se,q.dim1=ae,q.canvasX=se.canvasX,q.panelSizeX=ae.canvasX-se.canvasX,q.panelSizeY=ce.model.canvasHeight,q.y=0,q.canvasY=0,q.plotGlPixelRatio=de}}function B(le){for(var ce=0;ce<le.length;ce++)for(var de=0;de<le[ce].length;de++)for(var G=le[ce][de].trace,Y=G.dimensions,ee=0;ee<Y.length;ee++){var q=Y[ee].values,se=Y[ee]._ax;se&&(se.range?se.range=g(se.range[0],se.range[1]):se.range=A(q,G._length),se.dtick||(se.dtick=.01*(Math.abs(se.range[1]-se.range[0])||1)),se.tickformat=Y[ee].tickformat,t.calcTicks(se),se.cleanRange())}}function X(le,ce){return t.tickText(le._ax,ce,!1).text}function $(le,ce){if(le.ordinal)return"";var de=le.domainScale.domain(),G=de[ce?de.length-1:0];return X(le.model.dimensions[le.visibleIndex],G)}V.exports=function(ce,de,G,Y){var ee=ce._context.staticPlot,q=ce._fullLayout,se=q._toppaper,ae=q._glcontainer,j=ce._context.plotGlPixelRatio,Q=ce._fullLayout.paper_bgcolor;B(de);var re=O(),pe=de.filter(function(Ke){return v(Ke).trace.visible}).map(z.bind(0,G)).map(F.bind(0,re,Y));ae.each(function(Ke,Mt){return x.extendFlat(Ke,pe[Mt])});var we=ae.selectAll(".gl-canvas").each(function(Ke){Ke.viewModel=pe[0],Ke.viewModel.plotGlPixelRatio=j,Ke.viewModel.paperColor=Q,Ke.model=Ke.viewModel?Ke.viewModel.model:null}),Se=null,Ie=we.filter(function(Ke){return Ke.pick});Ie.style("pointer-events",ee?"none":"auto").on("mousemove",function(Ke){if(re.linePickActive()&&Ke.lineLayer&&Y&&Y.hover){var Mt=d.event,kt=this.width,Nt=this.height,Gt=d.mouse(this),Mr=Gt[0],mr=Gt[1];if(Mr<0||mr<0||Mr>=kt||mr>=Nt)return;var qr=Ke.lineLayer.readPixel(Mr,Nt-1-mr),Er=qr[3]!==0,Ir=Er?qr[2]+256*(qr[1]+256*qr[0]):null,_t={x:Mr,y:mr,clientX:Mt.clientX,clientY:Mt.clientY,dataIndex:Ke.model.key,curveNumber:Ir};Ir!==Se&&(Er?Y.hover(_t):Y.unhover&&Y.unhover(_t),Se=Ir)}}),we.style("opacity",function(Ke){return Ke.pick?0:1}),se.style("background","rgba(255, 255, 255, 0)");var Re=se.selectAll("."+T.cn.parcoords).data(pe,h);Re.exit().remove(),Re.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Re.attr("transform",function(Ke){return o(Ke.model.translateX,Ke.model.translateY)});var We=Re.selectAll("."+T.cn.parcoordsControlView).data(f,h);We.enter().append("g").classed(T.cn.parcoordsControlView,!0),We.attr("transform",function(Ke){return o(Ke.model.pad.l,Ke.model.pad.t)});var at=We.selectAll("."+T.cn.yAxis).data(function(Ke){return Ke.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),We.each(function(Ke){U(at,Ke,j)}),we.each(function(Ke){if(Ke.viewModel){!Ke.lineLayer||Y?Ke.lineLayer=_(this,Ke):Ke.lineLayer.update(Ke),(Ke.key||Ke.key===0)&&(Ke.viewModel[Ke.key]=Ke.lineLayer);var Mt=!Ke.context||Y;Ke.lineLayer.render(Ke.viewModel.panels,Mt)}}),at.attr("transform",function(Ke){return o(Ke.xScale(Ke.xIndex),0)}),at.call(d.behavior.drag().origin(function(Ke){return Ke}).on("drag",function(Ke){var Mt=Ke.parent;re.linePickActive(!1),Ke.x=Math.max(-T.overdrag,Math.min(Ke.model.width+T.overdrag,d.event.x)),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,at.sort(function(kt,Nt){return kt.x-Nt.x}).each(function(kt,Nt){kt.xIndex=Nt,kt.x=Ke===kt?kt.x:kt.xScale(kt.xIndex),kt.canvasX=kt.x*kt.model.canvasPixelRatio}),U(at,Mt,j),at.filter(function(kt){return Math.abs(Ke.xIndex-kt.xIndex)!==0}).attr("transform",function(kt){return o(kt.xScale(kt.xIndex),0)}),d.select(this).attr("transform",o(Ke.x,0)),at.each(function(kt,Nt,Gt){Gt===Ke.parent.key&&(Mt.dimensions[Nt]=kt)}),Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!1,!L(Mt)),Mt.focusLayer.render&&Mt.focusLayer.render(Mt.panels)}).on("dragend",function(Ke){var Mt=Ke.parent;Ke.x=Ke.xScale(Ke.xIndex),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,U(at,Mt,j),d.select(this).attr("transform",function(kt){return o(kt.x,0)}),Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!1,!L(Mt)),Mt.focusLayer&&Mt.focusLayer.render(Mt.panels),Mt.pickLayer&&Mt.pickLayer.render(Mt.panels,!0),re.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Mt.key,Mt.dimensions.map(function(kt){return kt.crossfilterDimensionIndex}))})),at.exit().remove();var nt=at.selectAll("."+T.cn.axisOverlays).data(f,h);nt.enter().append("g").classed(T.cn.axisOverlays,!0),nt.selectAll("."+T.cn.axis).remove();var tt=nt.selectAll("."+T.cn.axis).data(f,h);tt.enter().append("g").classed(T.cn.axis,!0),tt.each(function(Ke){var Mt=Ke.model.height/Ke.model.tickDistance,kt=Ke.domainScale,Nt=kt.domain();d.select(this).call(d.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Mt,Ke.tickFormat).tickValues(Ke.ordinal?Nt:null).tickFormat(function(Gt){return c.isOrdinal(Ke)?Gt:X(Ke.model.dimensions[Ke.visibleIndex],Gt)}).scale(kt)),n.font(tt.selectAll("text"),Ke.model.tickFont)}),tt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),tt.selectAll("text").style("cursor","default");var qe=nt.selectAll("."+T.cn.axisHeading).data(f,h);qe.enter().append("g").classed(T.cn.axisHeading,!0);var he=qe.selectAll("."+T.cn.axisTitle).data(f,h);he.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",ee?"none":"auto"),he.text(function(Ke){return Ke.label}).each(function(Ke){var Mt=d.select(this);n.font(Mt,Ke.model.labelFont),a.convertToTspans(Mt,ce)}).attr("transform",function(Ke){var Mt=P(Ke.model.labelAngle,Ke.model.labelSide),kt=T.axisTitleOffset;return(Mt.dir>0?"":o(0,2*kt+Ke.model.height))+r(Mt.degrees)+o(-kt*Mt.dx,-kt*Mt.dy)}).attr("text-anchor",function(Ke){var Mt=P(Ke.model.labelAngle,Ke.model.labelSide),kt=Math.abs(Mt.dx),Nt=Math.abs(Mt.dy);return 2*kt>Nt?Mt.dir*Mt.dx<0?"start":"end":"middle"});var ue=nt.selectAll("."+T.cn.axisExtent).data(f,h);ue.enter().append("g").classed(T.cn.axisExtent,!0);var ne=ue.selectAll("."+T.cn.axisExtentTop).data(f,h);ne.enter().append("g").classed(T.cn.axisExtentTop,!0),ne.attr("transform",o(0,-T.axisExtentOffset));var Ce=ne.selectAll("."+T.cn.axisExtentTopText).data(f,h);Ce.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(N),Ce.text(function(Ke){return $(Ke,!0)}).each(function(Ke){n.font(d.select(this),Ke.model.rangeFont)});var Ye=ue.selectAll("."+T.cn.axisExtentBottom).data(f,h);Ye.enter().append("g").classed(T.cn.axisExtentBottom,!0),Ye.attr("transform",function(Ke){return o(0,Ke.model.height+T.axisExtentOffset)});var rt=Ye.selectAll("."+T.cn.axisExtentBottomText).data(f,h);rt.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(N),rt.text(function(Ke){return $(Ke,!1)}).each(function(Ke){n.font(d.select(this),Ke.model.rangeFont)}),l.ensureAxisBrush(nt,Q,ce)}}}),w6=He({"src/traces/parcoords/plot.js"(r,V){"use strict";var d=rV(),x=xT(),S=b6().isVisible,E={};function e(o,a,n){var i=a.indexOf(n),s=o.indexOf(i);return s===-1&&(s+=a.length),s}function t(o,a){return function(i,s){return e(o,a,i)-e(o,a,s)}}var r=V.exports=function(a,n){var i=a._fullLayout,s=x(a,[],E);if(s){var h={},f={},v={},c={},T=i._size;n.forEach(function(M,g){var b=M[0].trace;v[g]=b.index;var p=c[g]=b.index;h[g]=a.data[p].dimensions,f[g]=a.data[p].dimensions.slice()});var l=function(M,g,b){var p=f[M][g],u=b.map(function(F){return F.slice()}),y="dimensions["+g+"].constraintrange",m=i._tracePreGUI[a._fullData[v[M]]._fullInput.uid];if(m[y]===void 0){var R=p.constraintrange;m[y]=R||null}var L=a._fullData[v[M]].dimensions[g];u.length?(u.length===1&&(u=u[0]),p.constraintrange=u,L.constraintrange=u.slice(),u=[u]):(delete p.constraintrange,delete L.constraintrange,u=null);var z={};z[y]=u,a.emit("plotly_restyle",[z,[c[M]]])},_=function(M){a.emit("plotly_hover",M)},w=function(M){a.emit("plotly_unhover",M)},A=function(M,g){var b=t(g,f[M].filter(S));h[M].sort(b),f[M].filter(function(p){return!S(p)}).sort(function(p){return f[M].indexOf(p)}).forEach(function(p){h[M].splice(h[M].indexOf(p),1),h[M].splice(f[M].indexOf(p),0,p)}),a.emit("plotly_restyle",[{dimensions:[h[M]]},[c[M]]])};d(a,n,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:_,unhover:w,axesMoved:A})}};r.reglPrecompiled=E}}),aV=He({"src/traces/parcoords/base_plot.js"(Z){"use strict";var V=Wn(),d=Hh().getModuleCalcData,x=w6(),S=vd();Z.name="parcoords",Z.plot=function(E){var e=d(E.calcdata,"parcoords")[0];e.length&&x(E,e)},Z.clean=function(E,e,t,r){var o=r._has&&r._has("parcoords"),a=e._has&&e._has("parcoords");o&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Z.toSVG=function(E){var e=E._fullLayout._glimages,t=V.select(E).selectAll(".svg-container"),r=t.filter(function(a,n){return n===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function o(){var a=this,n=a.toDataURL("image/png"),i=e.append("svg:image");i.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(o),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),iV=He({"src/traces/parcoords/base_index.js"(Z,V){"use strict";V.exports={attributes:m6(),supplyDefaults:Zq(),calc:Yq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:aV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),nV=He({"src/traces/parcoords/index.js"(Z,V){"use strict";var d=iV();d.plot=w6(),V.exports=d}}),oV=He({"lib/parcoords.js"(Z,V){"use strict";V.exports=nV()}}),T6=He({"src/traces/parcats/attributes.js"(Z,V){"use strict";var d=Qo().extendFlat,x=ru(),S=tc(),E=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=wc().attributes,o=d({editType:"calc"},E("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:t({editType:"plot"})});V.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:d({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:t({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:S({editType:"calc"}),tickfont:S({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:o,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}}}),sV=He({"src/traces/parcats/defaults.js"(Z,V){"use strict";var d=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=T6(),r=bT(),o=bp().isTypedArraySpec;function a(i,s,h,f,v){v("line.shape"),v("line.hovertemplate"),v("line.hovertemplatefallback");var c=v("line.color",f.colorway[0]);if(x(i,"line")&&d.isArrayOrTypedArray(c)){if(c.length)return v("line.colorscale"),S(i,s,f,v,{prefix:"line.",cLetter:"c"}),c.length;s.line.color=h}return 1/0}function n(i,s){function h(w,A){return d.coerce(i,s,t.dimensions,w,A)}var f=h("values"),v=h("visible");if(f&&f.length||(v=s.visible=!1),v){h("label"),h("displayindex",s._index);var c=i.categoryarray,T=d.isArrayOrTypedArray(c)&&c.length>0||o(c),l;T&&(l="array");var _=h("categoryorder",l);_==="array"?(h("categoryarray"),h("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&_==="array"&&(s.categoryorder="trace")}}V.exports=function(s,h,f,v){function c(w,A){return d.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:n}),l=a(s,h,f,v,c);E(h,v,c),(!Array.isArray(T)||!T.length)&&(h.visible=!1),r(h,T,"values",l),c("hoveron"),c("hovertemplate"),c("hovertemplatefallback"),c("arrangement"),c("bundlecolors"),c("sortpaths"),c("counts");var _=v.font;d.coerceFont(c,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),d.coerceFont(c,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),lV=He({"src/traces/parcats/calc.js"(Z,V){"use strict";var d=kv().wrap,x=wp().hasColorscale,S=Tp(),E=r5(),e=es(),t=sa(),r=as();V.exports=function(_,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var M=A.map(function(G){var Y;if(G.categoryorder==="trace")Y=null;else if(G.categoryorder==="array")Y=G.categoryarray;else{Y=E(G.values);for(var ee=!0,q=0;q<Y.length;q++)if(!r(Y[q])){ee=!1;break}Y.sort(ee?t.sorterAsc:void 0),G.categoryorder==="category descending"&&(Y=Y.reverse())}return f(G.values,Y)}),g,b,p;t.isArrayOrTypedArray(w.counts)?g=w.counts:g=[w.counts],v(A),A.forEach(function(G,Y){c(G,M[Y])});var u=w.line,y;u?(x(w,"line")&&S(_,w,{vals:w.line.color,containerStr:"line",cLetter:"c"}),y=e.tryColorscale(u)):y=t.identity;function m(G){var Y,ee;return t.isArrayOrTypedArray(u.color)?(Y=u.color[G%u.color.length],ee=Y):Y=u.color,{color:y(Y),rawColor:ee}}var R=A[0].values.length,L={},z=M.map(function(G){return G.inds});p=0;var F,N;for(F=0;F<R;F++){var O=[];for(N=0;N<z.length;N++)O.push(z[N][F]);b=g[F%g.length],p+=b;var P=m(F),U=O+"-"+P.rawColor;L[U]===void 0&&(L[U]=s(O,P.color,P.rawColor)),h(L[U],F,b)}var B=A.map(function(G,Y){return a(Y,G._index,G._displayindex,G.label,p)});for(F=0;F<R;F++)for(b=g[F%g.length],N=0;N<B.length;N++){var X=B[N].containerInd,$=M[N].inds[F],le=B[N].categories;if(le[$]===void 0){var ce=w.dimensions[X]._categoryarray[$],de=w.dimensions[X]._ticktext[$];le[$]=n(N,$,ce,de)}i(le[$],F,b)}return d(o(B,L,p))};function o(l,_,w){var A=l.map(function(M){return M.categories.length}).reduce(function(M,g){return Math.max(M,g)});return{dimensions:l,paths:_,trace:void 0,maxCats:A,count:w}}function a(l,_,w,A,M){return{dimensionInd:l,containerInd:_,displayInd:w,dimensionLabel:A,count:M,categories:[],dragX:null}}function n(l,_,w,A){return{dimensionInd:l,categoryInd:_,categoryValue:w,displayInd:_,categoryLabel:A,valueInds:[],count:0,dragY:null}}function i(l,_,w){l.valueInds.push(_),l.count+=w}function s(l,_,w){return{categoryInds:l,color:_,rawColor:w,valueInds:[],count:0}}function h(l,_,w){l.valueInds.push(_),l.count+=w}function f(l,_){_==null?_=[]:_=_.map(function(y){return y});var w={},A={},M=[];_.forEach(function(y,m){w[y]=0,A[y]=m});for(var g=0;g<l.length;g++){var b=l[g],p;w[b]===void 0?(w[b]=1,p=_.push(b)-1,A[b]=p):(w[b]++,p=A[b]),M.push(p)}var u=_.map(function(y){return w[y]});return{uniqueValues:_,uniqueCounts:u,inds:M}}function v(l){var _=l.map(function(A){return A.displayindex}),w;if(T(_))for(w=0;w<l.length;w++)l[w]._displayindex=l[w].displayindex;else for(w=0;w<l.length;w++)l[w]._displayindex=w}function c(l,_){l._categoryarray=_.uniqueValues,l.ticktext===null||l.ticktext===void 0?l._ticktext=[]:l._ticktext=l.ticktext.slice();for(var w=l._ticktext.length;w<_.uniqueValues.length;w++)l._ticktext.push(_.uniqueValues[w])}function T(l){for(var _=new Array(l.length),w=0;w<l.length;w++){if(l[w]<0||l[w]>=l.length||_[l[w]]!==void 0)return!1;_[l[w]]=!0}return!0}}}),uV=He({"src/traces/parcats/parcats.js"(Z,V){"use strict";var d=Wn(),x=(pg(),zf(p0)).interpolateNumber,S=k2(),E=rf(),e=sa(),t=e.strTranslate,r=es(),o=Ch(),a=ou();function n(q,se,ae,j){var Q=se._context.staticPlot,re=q.map(ce.bind(0,se,ae)),pe=j.selectAll("g.parcatslayer").data([null]);pe.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var we=pe.selectAll("g.trace.parcats").data(re,i),Se=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(ne){return t(ne.x,ne.y)}),Se.append("g").attr("class","paths");var Ie=we.select("g.paths"),Re=Ie.selectAll("path.path").data(function(ne){return ne.paths},i);Re.attr("fill",function(ne){return ne.model.color});var We=Re.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);_(We),Re.attr("d",function(ne){return ne.svgD}),We.empty()||Re.sort(h),Re.exit().remove(),Re.on("mouseover",f).on("mouseout",v).on("click",l),Se.append("g").attr("class","dimensions");var at=we.select("g.dimensions"),nt=at.selectAll("g.dimension").data(function(ne){return ne.dimensions},i);nt.enter().append("g").attr("class","dimension"),nt.attr("transform",function(ne){return t(ne.x,0)}),nt.exit().remove();var tt=nt.selectAll("g.category").data(function(ne){return ne.categories},i),qe=tt.enter().append("g").attr("class","category");tt.attr("transform",function(ne){return t(0,ne.y)}),qe.append("rect").attr("class","catrect").attr("pointer-events","none"),tt.select("rect.catrect").attr("fill","none").attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}),M(qe);var he=tt.selectAll("rect.bandrect").data(function(ne){return ne.bands},i);he.each(function(){e.raiseToTop(this)}),he.attr("fill",function(ne){return ne.color});var ue=he.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ne){return ne.color}).attr("fill-opacity",0);he.attr("fill",function(ne){return ne.color}).attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}).attr("y",function(ne){return ne.y}).attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(ue),he.exit().remove(),qe.append("text").attr("class","catlabel").attr("pointer-events","none"),tt.select("text.catlabel").attr("text-anchor",function(ne){return s(ne)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ne){return s(ne)?ne.width+5:-5}).attr("y",function(ne){return ne.height/2}).text(function(ne){return ne.model.categoryLabel}).each(function(ne){r.font(d.select(this),ne.parcatsViewModel.categorylabelfont),a.convertToTspans(d.select(this),se)}),qe.append("text").attr("class","dimlabel"),tt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ne){return ne.width/2}).attr("y",-5).text(function(ne,Ce){return Ce===0?ne.parcatsViewModel.model.dimensions[ne.model.dimensionInd].dimensionLabel:null}).each(function(ne){r.font(d.select(this),ne.parcatsViewModel.labelfont)}),tt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),tt.exit().remove(),nt.call(d.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",P).on("drag",U).on("dragend",B)),we.each(function(ne){ne.traceSelection=d.select(this),ne.pathSelection=d.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=d.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(q,se,ae,j){n(ae,q,j,se)};function i(q){return q.key}function s(q){var se=q.parcatsViewModel.dimensions.length,ae=q.parcatsViewModel.dimensions[se-1].model.dimensionInd;return q.model.dimensionInd===ae}function h(q,se){return q.model.rawColor>se.model.rawColor?1:q.model.rawColor<se.model.rawColor?-1:0}function f(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),w(d.select(this));var se=c(q),ae=T(q);if(q.parcatsViewModel.graphDiv.emit("plotly_hover",{points:se,event:d.event,constraints:ae}),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var j=d.mouse(this)[0],Q=q.parcatsViewModel.graphDiv,re=q.parcatsViewModel.trace,pe=Q._fullLayout,we=pe._paperdiv.node().getBoundingClientRect(),Se=q.parcatsViewModel.graphDiv.getBoundingClientRect(),Ie,Re,We;for(We=0;We<q.leftXs.length-1;We++)if(q.leftXs[We]+q.dimWidths[We]-2<=j&&j<=q.leftXs[We+1]+2){var at=q.parcatsViewModel.dimensions[We],nt=q.parcatsViewModel.dimensions[We+1];Ie=(at.x+at.width+nt.x)/2,Re=(q.topYs[We]+q.topYs[We+1]+q.height)/2;break}var tt=q.parcatsViewModel.x+Ie,qe=q.parcatsViewModel.y+Re,he=o.mostReadable(q.model.color,["black","white"]),ue=q.model.count,ne=ue/q.parcatsViewModel.model.count,Ce={countLabel:ue,probabilityLabel:ne.toFixed(3)},Ye=[];q.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ye.push(["Count:",Ce.countLabel].join(" ")),q.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ye.push(["P:",Ce.probabilityLabel].join(" "));var rt=Ye.join("<br>"),Ke=d.mouse(Q)[0];E.loneHover({trace:re,x:tt-we.left+Se.left,y:qe-we.top+Se.top,text:rt,color:q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:he,idealAlign:Ke<tt?"right":"left",hovertemplate:(re.line||{}).hovertemplate,hovertemplateLabels:Ce,eventData:[{data:re._input,fullData:re,count:ue,probability:ne}]},{container:pe._hoverlayer.node(),outerContainer:pe._paper.node(),gd:Q})}}}function v(q){if(!q.parcatsViewModel.dragDimension&&(_(d.select(this)),E.loneUnhover(q.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),q.parcatsViewModel.pathSelection.sort(h),q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var se=c(q),ae=T(q);q.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:se,event:d.event,constraints:ae})}}function c(q){for(var se=[],ae=X(q.parcatsViewModel),j=0;j<q.model.valueInds.length;j++){var Q=q.model.valueInds[j];se.push({curveNumber:ae,pointNumber:Q})}return se}function T(q){for(var se={},ae=q.parcatsViewModel.model.dimensions,j=0;j<ae.length;j++){var Q=ae[j],re=Q.categories[q.model.categoryInds[j]];se[Q.containerInd]=re.categoryValue}return q.model.rawColor!==void 0&&(se.color=q.model.rawColor),se}function l(q){if(q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var se=c(q),ae=T(q);q.parcatsViewModel.graphDiv.emit("plotly_click",{points:se,event:d.event,constraints:ae})}}function _(q){q.attr("fill",function(se){return se.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function w(q){q.attr("fill-opacity",.8).attr("stroke",function(se){return o.mostReadable(se.model.color,["black","white"])}).attr("stroke-width",.3)}function A(q){q.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function M(q){q.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function g(q){q.attr("stroke","black").attr("stroke-width",1.5)}function b(q){q.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function p(q){var se=q.parcatsViewModel.pathSelection,ae=q.categoryViewModel.model.dimensionInd,j=q.categoryViewModel.model.categoryInd;return se.filter(function(Q){return Q.model.categoryInds[ae]===j&&Q.model.color===q.color})}function u(q){var se=d.select(q.parentNode).selectAll("rect.bandrect");se.each(function(ae){var j=p(ae);w(j),j.each(function(){e.raiseToTop(this)})}),A(d.select(q.parentNode))}function y(q){var se=d.select(q).datum(),ae=p(se);w(ae),ae.each(function(){e.raiseToTop(this)}),d.select(q.parentNode).selectAll("rect.bandrect").filter(function(j){return j.color===se.color}).each(function(){e.raiseToTop(this),g(d.select(this))})}function m(q,se,ae){var j=d.select(q).datum(),Q=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,pe=d.select(q.parentNode).selectAll("rect.bandrect"),we=[];pe.each(function(Ie){var Re=p(Ie);Re.each(function(We){Array.prototype.push.apply(we,c(We))})});var Se={};Se[Q.dimensionInd]=Q.categoryValue,re.emit(se,{points:we,event:ae,constraints:Se})}function R(q,se,ae){var j=d.select(q).datum(),Q=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,pe=p(j),we=[];pe.each(function(Ie){Array.prototype.push.apply(we,c(Ie))});var Se={};Se[Q.dimensionInd]=Q.categoryValue,j.rawColor!==void 0&&(Se.color=j.rawColor),re.emit(se,{points:we,event:ae,constraints:Se})}function L(q,se,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=d.select(ae.parentNode).select("rect.catrect"),pe=re.node().getBoundingClientRect(),we=re.datum(),Se=we.parcatsViewModel,Ie=Se.model.dimensions[we.model.dimensionInd],Re=Se.trace,We=pe.top+pe.height/2,at,nt;Se.dimensions.length>1&&Ie.displayInd===Se.dimensions.length-1?(at=pe.left,nt="left"):(at=pe.left+pe.width,nt="right");var tt=we.model.count,qe=we.model.categoryLabel,he=tt/we.parcatsViewModel.model.count,ue={countLabel:tt,categoryLabel:qe,probabilityLabel:he.toFixed(3)},ne=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",ue.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+ue.categoryLabel+"):",ue.probabilityLabel].join(" "));var Ce=ne.join("<br>");return{trace:Re,x:j*(at-se.left),y:Q*(We-se.top),text:Ce,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:Re.hovertemplate,hovertemplateLabels:ue,eventData:[{data:Re._input,fullData:Re,count:tt,category:qe,probability:he}]}}function z(q,se,ae){var j=[];return d.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;j.push(L(q,se,Q))}),j}function F(q,se,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=ae.getBoundingClientRect(),pe=d.select(ae).datum(),we=pe.categoryViewModel,Se=we.parcatsViewModel,Ie=Se.model.dimensions[we.model.dimensionInd],Re=Se.trace,We=re.y+re.height/2,at,nt;Se.dimensions.length>1&&Ie.displayInd===Se.dimensions.length-1?(at=re.left,nt="left"):(at=re.left+re.width,nt="right");var tt=we.model.categoryLabel,qe=pe.parcatsViewModel.model.count,he=0;pe.categoryViewModel.bands.forEach(function(Gt){Gt.color===pe.color&&(he+=Gt.count)});var ue=we.model.count,ne=0;Se.pathSelection.each(function(Gt){Gt.model.color===pe.color&&(ne+=Gt.model.count)});var Ce=he/qe,Ye=he/ne,rt=he/ue,Ke={countLabel:he,categoryLabel:tt,probabilityLabel:Ce.toFixed(3)},Mt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Ke.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Mt.push("P(color \u2229 "+tt+"): "+Ke.probabilityLabel),Mt.push("P("+tt+" | color): "+Ye.toFixed(3)),Mt.push("P(color | "+tt+"): "+rt.toFixed(3)));var kt=Mt.join("<br>"),Nt=o.mostReadable(pe.color,["black","white"]);return{trace:Re,x:j*(at-se.left),y:Q*(We-se.top),text:kt,color:pe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Nt,fontSize:10,idealAlign:nt,hovertemplate:Re.hovertemplate,hovertemplateLabels:Ke,eventData:[{data:Re._input,fullData:Re,category:tt,count:qe,probability:Ce,categorycount:ue,colorcount:ne,bandcolorcount:he}]}}function N(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var se=d.mouse(this)[1];if(se<-1)return;var ae=q.parcatsViewModel.graphDiv,j=ae._fullLayout,Q=j._paperdiv.node().getBoundingClientRect(),re=q.parcatsViewModel.hoveron,pe=this;if(re==="color"?(y(pe),R(pe,"plotly_hover",d.event)):(u(pe),m(pe,"plotly_hover",d.event)),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;re==="category"?we=L(ae,Q,pe):re==="color"?we=F(ae,Q,pe):re==="dimension"&&(we=z(ae,Q,pe)),we&&E.loneHover(we,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(q){var se=q.parcatsViewModel;if(!se.dragDimension&&(_(se.pathSelection),M(se.dimensionSelection.selectAll("g.category")),b(se.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),E.loneUnhover(se.graphDiv._fullLayout._hoverlayer.node()),se.pathSelection.sort(h),se.hoverinfoItems.indexOf("skip")===-1)){var ae=q.parcatsViewModel.hoveron,j=this;ae==="color"?R(j,"plotly_unhover",d.event):m(j,"plotly_unhover",d.event)}}function P(q){q.parcatsViewModel.arrangement!=="fixed"&&(q.dragDimensionDisplayInd=q.model.displayInd,q.initialDragDimensionDisplayInds=q.parcatsViewModel.model.dimensions.map(function(se){return se.displayInd}),q.dragHasMoved=!1,q.dragCategoryDisplayInd=null,d.select(this).selectAll("g.category").select("rect.catrect").each(function(se){var ae=d.mouse(this)[0],j=d.mouse(this)[1];-2<=ae&&ae<=se.width+2&&-2<=j&&j<=se.height+2&&(q.dragCategoryDisplayInd=se.model.displayInd,q.initialDragCategoryDisplayInds=q.model.categories.map(function(Q){return Q.displayInd}),se.model.dragY=se.y,e.raiseToTop(this.parentNode),d.select(this.parentNode).selectAll("rect.bandrect").each(function(Q){Q.y<j&&j<=Q.y+Q.height&&(q.potentialClickBand=this)}))}),q.parcatsViewModel.dragDimension=q,E.loneUnhover(q.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function U(q){if(q.parcatsViewModel.arrangement!=="fixed"&&(q.dragHasMoved=!0,q.dragDimensionDisplayInd!==null)){var se=q.dragDimensionDisplayInd,ae=se-1,j=se+1,Q=q.parcatsViewModel.dimensions[se];if(q.dragCategoryDisplayInd!==null){var re=Q.categories[q.dragCategoryDisplayInd];re.model.dragY+=d.event.dy;var pe=re.model.dragY,we=re.model.displayInd,Se=Q.categories,Ie=Se[we-1],Re=Se[we+1];Ie!==void 0&&pe<Ie.y+Ie.height/2&&(re.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),Re!==void 0&&pe+re.height>Re.y+Re.height/2&&(re.model.displayInd=Re.model.displayInd,Re.model.displayInd=we),q.dragCategoryDisplayInd=re.model.displayInd}if(q.dragCategoryDisplayInd===null||q.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=d.event.x;var We=q.parcatsViewModel.dimensions[ae],at=q.parcatsViewModel.dimensions[j];We!==void 0&&Q.model.dragX<We.x+We.width&&(Q.model.displayInd=We.model.displayInd,We.model.displayInd=se),at!==void 0&&Q.model.dragX+Q.width>at.x&&(Q.model.displayInd=at.model.displayInd,at.model.displayInd=q.dragDimensionDisplayInd),q.dragDimensionDisplayInd=Q.model.displayInd}Y(q.parcatsViewModel),G(q.parcatsViewModel),le(q.parcatsViewModel),$(q.parcatsViewModel)}}function B(q){if(q.parcatsViewModel.arrangement!=="fixed"&&q.dragDimensionDisplayInd!==null){d.select(this).selectAll("text").attr("font-weight","normal");var se={},ae=X(q.parcatsViewModel),j=q.parcatsViewModel.model.dimensions.map(function(at){return at.displayInd}),Q=q.initialDragDimensionDisplayInds.some(function(at,nt){return at!==j[nt]});Q&&j.forEach(function(at,nt){var tt=q.parcatsViewModel.model.dimensions[nt].containerInd;se["dimensions["+tt+"].displayindex"]=at});var re=!1;if(q.dragCategoryDisplayInd!==null){var pe=q.model.categories.map(function(at){return at.displayInd});if(re=q.initialDragCategoryDisplayInds.some(function(at,nt){return at!==pe[nt]}),re){var we=q.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Se=we.map(function(at){return at.categoryValue}),Ie=we.map(function(at){return at.categoryLabel});se["dimensions["+q.model.containerInd+"].categoryarray"]=[Se],se["dimensions["+q.model.containerInd+"].ticktext"]=[Ie],se["dimensions["+q.model.containerInd+"].categoryorder"]="array"}}if(q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!q.dragHasMoved&&q.potentialClickBand&&(q.parcatsViewModel.hoveron==="color"?R(q.potentialClickBand,"plotly_click",d.event.sourceEvent):m(q.potentialClickBand,"plotly_click",d.event.sourceEvent)),q.model.dragX=null,q.dragCategoryDisplayInd!==null){var Re=q.parcatsViewModel.dimensions[q.dragDimensionDisplayInd].categories[q.dragCategoryDisplayInd];Re.model.dragY=null,q.dragCategoryDisplayInd=null}q.dragDimensionDisplayInd=null,q.parcatsViewModel.dragDimension=null,q.dragHasMoved=null,q.potentialClickBand=null,Y(q.parcatsViewModel),G(q.parcatsViewModel);var We=d.transition().duration(300).ease("cubic-in-out");We.each(function(){le(q.parcatsViewModel,!0),$(q.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&S.restyle(q.parcatsViewModel.graphDiv,se,[ae])})}}function X(q){for(var se,ae=q.graphDiv._fullData,j=0;j<ae.length;j++)if(q.key===ae[j].uid){se=j;break}return se}function $(q,se){se===void 0&&(se=!1);function ae(j){return se?j.transition():j}q.pathSelection.data(function(j){return j.paths},i),ae(q.pathSelection).attr("d",function(j){return j.svgD})}function le(q,se){se===void 0&&(se=!1);function ae(Se){return se?Se.transition():Se}q.dimensionSelection.data(function(Se){return Se.dimensions},i);var j=q.dimensionSelection.selectAll("g.category").data(function(Se){return Se.categories},i);ae(q.dimensionSelection).attr("transform",function(Se){return t(Se.x,0)}),ae(j).attr("transform",function(Se){return t(0,Se.y)});var Q=j.select(".dimlabel");Q.text(function(Se,Ie){return Ie===0?Se.parcatsViewModel.model.dimensions[Se.model.dimensionInd].dimensionLabel:null});var re=j.select(".catlabel");re.attr("text-anchor",function(Se){return s(Se)?"start":"end"}).attr("x",function(Se){return s(Se)?Se.width+5:-5}).each(function(Se){var Ie,Re;s(Se)?(Ie=Se.width+5,Re="start"):(Ie=-5,Re="end"),d.select(this).selectAll("tspan").attr("x",Ie).attr("text-anchor",Re)});var pe=j.selectAll("rect.bandrect").data(function(Se){return Se.bands},i),we=pe.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Se){return Se.color}).attr("fill-opacity",0);pe.attr("fill",function(Se){return Se.color}).attr("width",function(Se){return Se.width}).attr("height",function(Se){return Se.height}).attr("y",function(Se){return Se.y}),b(we),pe.each(function(){e.raiseToTop(this)}),pe.exit().remove()}function ce(q,se,ae){var j=ae[0],Q=se.margin||{l:80,r:80,t:100,b:80},re=j.trace,pe=re.domain,we=se.width,Se=se.height,Ie=Math.floor(we*(pe.x[1]-pe.x[0])),Re=Math.floor(Se*(pe.y[1]-pe.y[0])),We=pe.x[0]*we+Q.l,at=se.height-pe.y[1]*se.height+Q.t,nt=re.line.shape,tt;re.hoverinfo==="all"?tt=["count","probability"]:tt=(re.hoverinfo||"").split("+");var qe={trace:re,key:re.uid,model:j,x:We,y:at,width:Ie,height:Re,hoveron:re.hoveron,hoverinfoItems:tt,arrangement:re.arrangement,bundlecolors:re.bundlecolors,sortpaths:re.sortpaths,labelfont:re.labelfont,categorylabelfont:re.tickfont,pathShape:nt,dragDimension:null,margin:Q,paths:[],dimensions:[],graphDiv:q,traceSelection:null,pathSelection:null,dimensionSelection:null};return j.dimensions&&(Y(qe),G(qe)),qe}function de(q,se,ae,j,Q){var re=[],pe=[],we,Se;for(Se=0;Se<ae.length-1;Se++)we=x(ae[Se]+q[Se],q[Se+1]),re.push(we(Q)),pe.push(we(1-Q));var Ie="M "+q[0]+","+se[0];for(Ie+="l"+ae[0]+",0 ",Se=1;Se<ae.length;Se++)Ie+="C"+re[Se-1]+","+se[Se-1]+" "+pe[Se-1]+","+se[Se]+" "+q[Se]+","+se[Se],Ie+="l"+ae[Se]+",0 ";for(Ie+="l0,"+j+" ",Ie+="l -"+ae[ae.length-1]+",0 ",Se=ae.length-2;Se>=0;Se--)Ie+="C"+pe[Se]+","+(se[Se+1]+j)+" "+re[Se]+","+(se[Se]+j)+" "+(q[Se]+ae[Se])+","+(se[Se]+j),Ie+="l-"+ae[Se]+",0 ";return Ie+="Z",Ie}function G(q){var se=q.dimensions,ae=q.model,j=se.map(function(qr){return qr.categories.map(function(Er){return Er.y})}),Q=q.model.dimensions.map(function(qr){return qr.categories.map(function(Er){return Er.displayInd})}),re=q.model.dimensions.map(function(qr){return qr.displayInd}),pe=q.dimensions.map(function(qr){return qr.model.dimensionInd}),we=se.map(function(qr){return qr.x}),Se=se.map(function(qr){return qr.width}),Ie=[];for(var Re in ae.paths)ae.paths.hasOwnProperty(Re)&&Ie.push(ae.paths[Re]);function We(qr){var Er=qr.categoryInds.map(function(_t,Oe){return Q[Oe][_t]}),Ir=pe.map(function(_t){return Er[_t]});return Ir}Ie.sort(function(qr,Er){var Ir=We(qr),_t=We(Er);return q.sortpaths==="backward"&&(Ir.reverse(),_t.reverse()),Ir.push(qr.valueInds[0]),_t.push(Er.valueInds[0]),q.bundlecolors&&(Ir.unshift(qr.rawColor),_t.unshift(Er.rawColor)),Ir<_t?-1:Ir>_t?1:0});for(var at=new Array(Ie.length),nt=se[0].model.count,tt=se[0].categories.map(function(qr){return qr.height}).reduce(function(qr,Er){return qr+Er}),qe=0;qe<Ie.length;qe++){var he=Ie[qe],ue;nt>0?ue=tt*(he.count/nt):ue=0;for(var ne=new Array(j.length),Ce=0;Ce<he.categoryInds.length;Ce++){var Ye=he.categoryInds[Ce],rt=Q[Ce][Ye],Ke=re[Ce];ne[Ke]=j[Ke][rt],j[Ke][rt]+=ue;var Mt=q.dimensions[Ke].categories[rt],kt=Mt.bands.length,Nt=Mt.bands[kt-1];if(Nt===void 0||he.rawColor!==Nt.rawColor){var Gt=Nt===void 0?0:Nt.y+Nt.height;Mt.bands.push({key:Gt,color:he.color,rawColor:he.rawColor,height:ue,width:Mt.width,count:he.count,y:Gt,categoryViewModel:Mt,parcatsViewModel:q})}else{var Mr=Mt.bands[kt-1];Mr.height+=ue,Mr.count+=he.count}}var mr;q.pathShape==="hspline"?mr=de(we,ne,Se,ue,.5):mr=de(we,ne,Se,ue,0),at[qe]={key:he.valueInds[0],model:he,height:ue,leftXs:we,topYs:ne,dimWidths:Se,svgD:mr,parcatsViewModel:q}}q.paths=at}function Y(q){var se=q.model.dimensions.map(function(pe){return{displayInd:pe.displayInd,dimensionInd:pe.dimensionInd}});se.sort(function(pe,we){return pe.displayInd-we.displayInd});var ae=[];for(var j in se){var Q=se[j].dimensionInd,re=q.model.dimensions[Q];ae.push(ee(q,re))}q.dimensions=ae}function ee(q,se){var ae=40,j=16,Q=q.model.dimensions.length,re=se.displayInd,pe,we,Se;Q>1?pe=(q.width-2*ae-j)/(Q-1):pe=0,we=ae,Se=we+pe*re;var Ie=[],Re=q.model.maxCats,We=se.categories.length,at=8,nt=se.count,tt=q.height-at*(Re-1),qe,he,ue,ne,Ce,Ye=(Re-We)*at/2,rt=se.categories.map(function(Ke){return{displayInd:Ke.displayInd,categoryInd:Ke.categoryInd}});for(rt.sort(function(Ke,Mt){return Ke.displayInd-Mt.displayInd}),Ce=0;Ce<We;Ce++)ne=rt[Ce].categoryInd,he=se.categories[ne],nt>0?qe=he.count/nt*tt:qe=0,ue={key:he.valueInds[0],model:he,width:j,height:qe,y:he.dragY!==null?he.dragY:Ye,bands:[],parcatsViewModel:q},Ye=Ye+qe+at,Ie.push(ue);return{key:se.dimensionInd,x:se.dragX!==null?se.dragX:Se,y:0,width:j,model:se,categories:Ie,parcatsViewModel:q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=He({"src/traces/parcats/plot.js"(Z,V){"use strict";var d=uV();V.exports=function(S,E,e,t){var r=S._fullLayout,o=r._paper,a=r._size;d(S,o,E,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),cV=He({"src/traces/parcats/base_plot.js"(Z){"use strict";var V=Hh().getModuleCalcData,d=A6(),x="parcats";Z.name=x,Z.plot=function(S,E,e,t){var r=V(S.calcdata,x);if(r.length){var o=r[0];d(S,o,e,t)}},Z.clean=function(S,E,e,t){var r=t._has&&t._has("parcats"),o=E._has&&E._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),fV=He({"src/traces/parcats/index.js"(Z,V){"use strict";V.exports={attributes:T6(),supplyDefaults:sV(),calc:lV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:cV(),categories:["noOpacity"],meta:{}}}}),hV=He({"lib/parcats.js"(Z,V){"use strict";V.exports=fV()}}),im=He({"src/plots/mapbox/constants.js"(Z,V){"use strict";var d=Jm(),x="1.13.4",S='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',E=['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>',S].join(" "),e=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),t=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},o=d(r);V.exports={requiredVersion:x,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:o,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+x+"."].join(`
`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(`
`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",o.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(`
`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(`
`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}}),Ex=He({"src/plots/mapbox/layout_attributes.js"(Z,V){"use strict";var d=sa(),x=Jn().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=im(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=t({_arrayAttrRegexps:[d.counterRegex("mapbox",".layers",!0)],domain:S({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:o.styleValuesMapbox.concat(o.styleValuesNonMapbox),dflt:o.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("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:x},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:x}},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:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),AT=He({"src/traces/scattermapbox/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=Ex(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=Ex(),h=e.line,f=e.marker;V.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.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:n({},f.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d(),hovertemplatefallback:S()},"calc","nested")}}),S6=He({"src/traces/scattermapbox/constants.js"(Z,V){"use strict";var d=["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"];V.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),pV=He({"src/traces/scattermapbox/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;V.exports=function(i,s,h,f){function v(y,m){return d.coerce(i,s,r,y,m)}function c(y,m){return d.coerce2(i,s,r,y,m)}var T=a(i,s,v);if(!T){s.visible=!1;return}if(v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback"),v("mode"),v("below"),x.hasMarkers(s)){S(i,s,h,f,v,{noLine:!0,noAngle:!0}),v("marker.allowoverlap"),v("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,f,v,{noDash:!0}),v("connectgaps"));var _=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),M=c("cluster.size"),g=c("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,p=v("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(i,s,f,v,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}v("fill"),s.fill!=="none"&&t(i,s,h,v),d.coerceSelectionMarkerOpacity(s,v)};function a(n,i,s){var h=s("lon")||[],f=s("lat")||[],v=Math.min(h.length,f.length);return i._length=v,v}}}),M6=He({"src/traces/scattermapbox/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),E6=He({"src/plots/mapbox/convert_text_opts.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(E)?d.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),dV=He({"src/traces/scattermapbox/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=S6().isSupportedFont,n=E6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;V.exports=function(g,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,y=p.fill!=="none",m=o.hasLines(p),R=o.hasMarkers(p),L=o.hasText(p),z=R&&p.marker.symbol==="circle",F=R&&p.marker.symbol!=="circle",N=p.cluster&&p.cluster.enabled,O=f("fill"),P=f("line"),U=f("circle"),B=f("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||m)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),m&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var le=v(b);U.geojson=le.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(p),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":le.mcc,"circle-radius":le.mrc,"circle-opacity":le.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=c(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var ce=(p.marker||{}).size,de=n(p.textposition,ce);x.extendFlat(B.layout,{"text-size":p.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(p)}),x.extendFlat(B.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return X};function f(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function v(M){var g=M[0].trace,b=g.marker,p=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),m=x.isArrayOrTypedArray(b.opacity),R;function L(ce){return g.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;m&&(O=function(ce){var de=d(ce)?+x.constrain(ce,0,1):0;return L(de)});var P=[];for(R=0;R<M.length;R++){var U=M[R],B=U.lonlat;if(!_(B)){var X={};F&&(X.mcc=U.mcc=F(U.mc)),N&&(X.mrc=U.mrc=N(U.ms)),O&&(X.mo=O(U.mo)),p&&(X.selected=U.selected||0),P.push({type:"Feature",id:R+1,geometry:{type:"Point",coordinates:B},properties:X})}}var $;if(p)for($=t.makeSelectedPointStyleFns(g),R=0;R<P.length;R++){var le=P[R].properties;$.selectedOpacityFn&&(le.mo=L($.selectedOpacityFn(le))),$.selectedColorFn&&(le.mcc=$.selectedColorFn(le)),$.selectedSizeFn&&(le.mrc=$.selectedSizeFn(le))}return{geojson:{type:"FeatureCollection",features:P},mcc:u||$&&$.selectedColorFn?{type:"identity",property:"mcc"}:b.color,mrc:y||$&&$.selectedSizeFn?{type:"identity",property:"mrc"}:z(b.size),mo:m||$&&$.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function c(M,g){for(var b=g._fullLayout,p=M[0].trace,u=p.marker||{},y=u.symbol,m=u.angle,R=y!=="circle"?T(y):l,L=m!=="auto"?T(m,!0):l,z=o.hasText(p)?T(p.text):l,F=[],N=0;N<M.length;N++){var O=M[N];if(!_(O.lonlat)){var P=p.texttemplate,U;if(P){var B=Array.isArray(P)?P[N]||"":P,X=p._module.formatLabels(O,p,b),$={};i($,p,O.i),U=x.texttemplateString({data:[$,O,p._meta],fallback:p.texttemplatefallback,labels:X,locale:b._d3locale,template:B})}else U=z(N);U&&(U=U.replace(s,"").replace(h,`
`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:R(N),angle:L(N),text:U}})}}return{type:"FeatureCollection",features:F}}function T(M,g){return x.isArrayOrTypedArray(M)?g?function(b){return d(M[b])?+M[b]:0}:function(b){return M[b]}:M?function(){return M}:l}function l(){return""}function _(M){return M[0]===S}function w(M,g){var b;if(x.isArrayOrTypedArray(M)&&x.isArrayOrTypedArray(g)){b=["step",["get","point_count"],M[0]];for(var p=1;p<M.length;p++)b.push(g[p-1],M[p])}else b=M;return b}function A(M){var g=M.textfont,b=g.family,p=g.style,u=g.weight,y=b.split(" "),m=y[y.length-1]==="Italic";m&&y.pop(),m=m||p==="italic";var R=y.join(" ");u==="bold"&&y.indexOf("Bold")===-1?R+=" Bold":u<=1e3&&(y[0]==="Metropolis"?(R="Metropolis",u>850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),m&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),vV=He({"src/traces/scattermapbox/plot.js"(Z,V){"use strict";var d=sa(),x=dV(),S=im().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f<h.length;f++)if(h[f].id===i){s=!0;break}s?(this.subplot.setOptions(i,"setLayoutProperty",n.layout),n.layout.visibility==="visible"&&this.subplot.setOptions(i,"setPaintProperty",n.paint)):this.subplot.addLayer(n,a)},t.update=function(o){var a=o[0].trace,n=this.subplot,i=n.map,s=x(n.gd,o),h=n.belowLookup["trace-"+this.uid],f=!!(a.cluster&&a.cluster.enabled),v=!!this.clusterEnabled,c=this;function T(u){u||c.addSource("circle",s.circle,a.cluster);for(var y=E.cluster,m=0;m<y.length;m++){var R=y[m],L=s[R];c.addLayer(R,L,h)}}function l(u){for(var y=E.cluster,m=y.length-1;m>=0;m--){var R=y[m];i.removeLayer(c.layerIds[R])}u||i.removeSource(c.sourceIds.circle)}function _(u){for(var y=E.nonCluster,m=0;m<y.length;m++){var R=y[m],L=s[R];u||c.addSource(R,L),c.addLayer(R,L,h)}}function w(u){for(var y=E.nonCluster,m=y.length-1;m>=0;m--){var R=y[m];i.removeLayer(c.layerIds[R]),u||i.removeSource(c.sourceIds[R])}}function A(u){v?l(u):w(u)}function M(u){f?T(u):_(u)}function g(){for(var u=f?E.cluster:E.nonCluster,y=0;y<u.length;y++){var m=u[y],R=s[m];R&&(n.setOptions(c.layerIds[m],"setLayoutProperty",R.layout),R.layout.visibility==="visible"&&(m!=="cluster"&&c.setSourceData(m,R),n.setOptions(c.layerIds[m],"setPaintProperty",R.paint)))}}var b=this.isHidden,p=a.visible!==!0;p?b||A():b?p||M():v!==f?(A(),M()):(this.below!==h&&(A(!0),M(!0)),g()),this.clusterEnabled=f,this.isHidden=p,this.below=h,o[0].trace._glTrace=this},t.dispose=function(){for(var o=this.subplot.map,a=this.clusterEnabled?E.cluster:E.nonCluster,n=a.length-1;n>=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},V.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),f=x(o.gd,a),v=h.below=o.belowLookup["trace-"+n.uid],c,T,l;if(i)for(h.addSource("circle",f.circle,n.cluster),c=0;c<E.cluster.length;c++)T=E.cluster[c],l=f[T],h.addLayer(T,l,v);else for(c=0;c<E.nonCluster.length;c++)T=E.nonCluster[c],l=f[T],h.addSource(T,l,n.cluster),h.addLayer(T,l,v);return a[0].trace._glTrace=h,h}}}),ST=He({"src/traces/scattermapbox/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=l1(),E=x.fillText,e=Ws().BADNUM,t=im().traceLayerPrefix;function r(a,n,i){var s=a.cd,h=s[0].trace,f=a.xa,v=a.ya,c=a.subplot,T=[],l=t+h.uid+"-circle",_=h.cluster&&h.cluster.enabled;if(_){var w=c.map.queryRenderedFeatures(null,{layers:[l]});T=w.map(function(N){return N.id})}var A=n>=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=c.project([P,U]),X=B.x-f.c2p([g,U]),$=B.y-v.c2p([P,i]),le=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-le,1-3/le)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],m=f.c2p(y),R=v.c2p(y),L=p.mrc||1;a.x0=m-L,a.x1=m+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(p,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,p),a.extraText=o(h,p,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,v=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return f||v&&c?l.push("("+_(T[1])+", "+_(T[0])+")"):v?l.push(i.lon+_(T[0])):c&&l.push(i.lat+_(T[1])),(f||h.indexOf("text")!==-1)&&E(n,a,l),l.join("<br>")}V.exports={hoverPoints:r,getExtraText:o}}}),mV=He({"src/traces/scattermapbox/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),gV=He({"src/traces/scattermapbox/select.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=Ws().BADNUM;V.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s<r.length;s++)r[s].selected=0;else for(s=0;s<r.length;s++){var h=r[s],f=h.lonlat;if(f[0]!==S){var v=[d.modHalf(f[0],360),f[1]],c=[o.c2p(v),a.c2p(v)];t.contains(c,null,s,e)?(n.push({pointNumber:s,lon:f[0],lat:f[1]}),h.selected=1):h.selected=0}}return n}}}),k6=He({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?V.exports=x():(d=d||self,d.mapboxgl=x())})(Z,function(){"use strict";var d,x,S;function E(e,t){if(!d)d=t;else if(!x)x=t;else{var r="var sharedChunk = {}; ("+d+")(sharedChunk); ("+x+")(sharedChunk);",o={};d(o),S=t(o),typeof window<"u"&&(S.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return E(["exports"],function(e){"use strict";function t(k,C){return C={exports:{}},k(C,C.exports),C.exports}var r="1.13.4",o=a;function a(k,C,H,oe){this.cx=3*k,this.bx=3*(H-k)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*C,this.by=3*(oe-C)-this.cy,this.ay=1-this.cy-this.by,this.p1x=k,this.p1y=oe,this.p2x=H,this.p2y=oe}a.prototype.sampleCurveX=function(k){return((this.ax*k+this.bx)*k+this.cx)*k},a.prototype.sampleCurveY=function(k){return((this.ay*k+this.by)*k+this.cy)*k},a.prototype.sampleCurveDerivativeX=function(k){return(3*this.ax*k+2*this.bx)*k+this.cx},a.prototype.solveCurveX=function(k,C){typeof C>"u"&&(C=1e-6);var H,oe,be,Pe,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Pe=this.sampleCurveX(be)-k,Math.abs(Pe)<C)return be;var ft=this.sampleCurveDerivativeX(be);if(Math.abs(ft)<1e-6)break;be=be-Pe/ft}if(H=0,oe=1,be=k,be<H)return H;if(be>oe)return oe;for(;H<oe;){if(Pe=this.sampleCurveX(be),Math.abs(Pe-k)<C)return be;k>Pe?H=be:oe=be,be=(oe-H)*.5+H}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var n=i;function i(k,C){this.x=k,this.y=C}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(k){return this.clone()._add(k)},sub:function(k){return this.clone()._sub(k)},multByPoint:function(k){return this.clone()._multByPoint(k)},divByPoint:function(k){return this.clone()._divByPoint(k)},mult:function(k){return this.clone()._mult(k)},div:function(k){return this.clone()._div(k)},rotate:function(k){return this.clone()._rotate(k)},rotateAround:function(k,C){return this.clone()._rotateAround(k,C)},matMult:function(k){return this.clone()._matMult(k)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(k){return this.x===k.x&&this.y===k.y},dist:function(k){return Math.sqrt(this.distSqr(k))},distSqr:function(k){var C=k.x-this.x,H=k.y-this.y;return C*C+H*H},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(k){return Math.atan2(this.y-k.y,this.x-k.x)},angleWith:function(k){return this.angleWithSep(k.x,k.y)},angleWithSep:function(k,C){return Math.atan2(this.x*C-this.y*k,this.x*k+this.y*C)},_matMult:function(k){var C=k[0]*this.x+k[1]*this.y,H=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=H,this},_add:function(k){return this.x+=k.x,this.y+=k.y,this},_sub:function(k){return this.x-=k.x,this.y-=k.y,this},_mult:function(k){return this.x*=k,this.y*=k,this},_div:function(k){return this.x/=k,this.y/=k,this},_multByPoint:function(k){return this.x*=k.x,this.y*=k.y,this},_divByPoint:function(k){return this.x/=k.x,this.y/=k.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var k=this.y;return this.y=this.x,this.x=-k,this},_rotate:function(k){var C=Math.cos(k),H=Math.sin(k),oe=C*this.x-H*this.y,be=H*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var H=Math.cos(k),oe=Math.sin(k),be=C.x+H*(this.x-C.x)-oe*(this.y-C.y),Pe=C.y+oe*(this.x-C.x)+H*(this.y-C.y);return this.x=be,this.y=Pe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(k){return k instanceof i?k:Array.isArray(k)?new i(k[0],k[1]):k};var s=typeof self<"u"?self:{};function h(k,C){if(Array.isArray(k)){if(!Array.isArray(C)||k.length!==C.length)return!1;for(var H=0;H<k.length;H++)if(!h(k[H],C[H]))return!1;return!0}if(typeof k=="object"&&k!==null&&C!==null){if(typeof C!="object")return!1;var oe=Object.keys(k);if(oe.length!==Object.keys(C).length)return!1;for(var be in k)if(!h(k[be],C[be]))return!1;return!0}return k===C}var f=Math.pow(2,53)-1;function v(k){if(k<=0)return 0;if(k>=1)return 1;var C=k*k,H=C*k;return 4*(k<.5?H:3*(k-C)+H-.75)}function c(k,C,H,oe){var be=new o(k,C,H,oe);return function(Pe){return be.solve(Pe)}}var T=c(.25,.1,.25,1);function l(k,C,H){return Math.min(H,Math.max(C,k))}function _(k,C,H){var oe=H-C,be=((k-C)%oe+oe)%oe+C;return be===C?H:be}function w(k,C,H){if(!k.length)return H(null,[]);var oe=k.length,be=new Array(k.length),Pe=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Pe=It),be[ft]=Ht,--oe===0&&H(Pe,be)})})}function A(k){var C=[];for(var H in k)C.push(k[H]);return C}function M(k,C){var H=[];for(var oe in k)oe in C||H.push(oe);return H}function g(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe];for(var Ne in Pe)k[Ne]=Pe[Ne]}return k}function b(k,C){for(var H={},oe=0;oe<C.length;oe++){var be=C[oe];be in k&&(H[be]=k[be])}return H}var p=1;function u(){return p++}function y(){function k(C){return C?(C^Math.random()*16>>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function m(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function R(k){return k?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(k):!1}function L(k,C){k.forEach(function(H){C[H]&&(C[H]=C[H].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,H){var oe={};for(var be in k)oe[be]=C.call(H||this,k[be],be,k);return oe}function N(k,C,H){var oe={};for(var be in k)C.call(H||this,k[be],be,k)&&(oe[be]=k[be]);return oe}function O(k){return Array.isArray(k)?k.map(O):typeof k=="object"&&k?F(k,O):k}function P(k,C){for(var H=0;H<k.length;H++)if(C.indexOf(k[H])>=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function X(k,C,H){return(H.y-k.y)*(C.x-k.x)>(C.y-k.y)*(H.x-k.x)}function $(k){for(var C=0,H=0,oe=k.length,be=oe-1,Pe=void 0,Ne=void 0;H<oe;be=H++)Pe=k[H],Ne=k[be],C+=(Ne.x-Pe.x)*(Pe.y+Ne.y);return C}function le(k){var C=k[0],H=k[1],oe=k[2];return H+=90,H*=Math.PI/180,oe*=Math.PI/180,{x:C*Math.cos(H)*Math.sin(oe),y:C*Math.sin(H)*Math.sin(oe),z:C*Math.cos(oe)}}function ce(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function de(k){var C=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,H={};if(k.replace(C,function(be,Pe,Ne,ft){var It=Ne||ft;return H[Pe]=It?It.toLowerCase():!0,""}),H["max-age"]){var oe=parseInt(H["max-age"],10);isNaN(oe)?delete H["max-age"]:H["max-age"]=oe}return H}var G=null;function Y(k){if(G==null){var C=k.navigator?k.navigator.userAgent:null;G=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return G}function ee(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function q(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,H){return String.fromCharCode(+("0x"+H))}))}function se(k){return decodeURIComponent(s.atob(k).split("").map(function(C){return"%"+("00"+C.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ae=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),j=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,Q=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,re,pe,we={now:ae,frame:function(C){var H=j(C);return{cancel:function(){return Q(H)}}},getImageData:function(C,H){H===void 0&&(H=0);var oe=s.document.createElement("canvas"),be=oe.getContext("2d");if(!be)throw new Error("failed to create canvas 2d context");return oe.width=C.width,oe.height=C.height,be.drawImage(C,0,0,C.width,C.height),be.getImageData(-H,-H,C.width+2*H,C.height+2*H)},resolveURL:function(C){return re||(re=s.document.createElement("a")),re.href=C,re.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(pe==null&&(pe=s.matchMedia("(prefers-reduced-motion: reduce)")),pe.matches):!1}},Se={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Ie={supported:!1,testSupport:tt},Re,We=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Re&&qe(Re),Re=null,nt=!0},at.onerror=function(){We=!0,Re=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){We||!at||(nt?qe(k):Re=k)}function qe(k){var C=k.createTexture();k.bindTexture(k.TEXTURE_2D,C);try{if(k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,at),k.isContextLost())return;Ie.supported=!0}catch{}k.deleteTexture(C),We=!0}var he="01";function ue(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",H="",oe=0;oe<10;oe++)H+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Pe=[k,he,H].join(""),Ne=Date.now()+be;return{token:Pe,tokenExpiresAt:Ne}}var ne=function(C,H){this._transformRequestFn=C,this._customAccessToken=H,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=ue();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,H){return this._transformRequestFn?this._transformRequestFn(C,H)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeGlyphsURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeSourceURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeSpriteURL=function(C,H,oe,be){var Pe=Nt(C);return Ce(C)?(Pe.path="/styles/v1"+Pe.path+"/sprite"+H+oe,this._makeAPIURL(Pe,this._customAccessToken||be)):(Pe.path+=""+H+oe,Gt(Pe))},ne.prototype.normalizeTileURL=function(C,H){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Nt(C),be=/(\.(png|jpg)\d*)(?=$)/,Pe=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||H===512?"@2x":"",ft=Ie.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Pe,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||Mt(oe.params)||Se.ACCESS_TOKEN;return Se.REQUIRE_ACCESS_TOKEN&&It&&this._skuToken&&oe.params.push("sku="+this._skuToken),this._makeAPIURL(oe,It)},ne.prototype.canonicalizeTileURL=function(C,H){var oe="/v4/",be=/\.[\w]+$/,Pe=Nt(C);if(!Pe.path.match(/(^\/v4\/)/)||!Pe.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Pe.path.replace(oe,"");var ft=Pe.params;return H&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,H){for(var oe=H?Ce(H):!1,be=[],Pe=0,Ne=C.tiles||[];Pe<Ne.length;Pe+=1){var ft=Ne[Pe];rt(ft)?be.push(this.canonicalizeTileURL(ft,oe)):be.push(ft)}return be},ne.prototype._makeAPIURL=function(C,H){var oe="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",be=Nt(Se.API_URL);if(C.protocol=be.protocol,C.authority=be.authority,C.protocol==="http"){var Pe=C.params.indexOf("secure");Pe>=0&&C.params.splice(Pe,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Gt(C);if(H=H||Se.ACCESS_TOKEN,!H)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(H[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+oe);return C.params=C.params.filter(function(Ne){return Ne.indexOf("access_token")===-1}),C.params.push("access_token="+H),Gt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ye=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ye.test(k)}function Ke(k){return k.indexOf("sku=")>0&&rt(k)}function Mt(k){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C],be=oe.match(/^access_token=(.*)$/);if(be)return be[1]}return null}var kt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Nt(k){var C=k.match(kt);if(!C)throw new Error("Unable to parse URL object");return{protocol:C[1],authority:C[2],path:C[3]||"/",params:C[4]?C[4].split("&"):[]}}function Gt(k){var C=k.params.length?"?"+k.params.join("&"):"";return k.protocol+"://"+k.authority+k.path+C}var Mr="mapbox.eventData";function mr(k){if(!k)return null;var C=k.split(".");if(!C||C.length!==3)return null;try{var H=JSON.parse(se(C[1]));return H}catch{return null}}var qr=function(C){this.type=C,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};qr.prototype.getStorageKey=function(C){var H=mr(Se.ACCESS_TOKEN),oe="";return H&&H.u?oe=q(H.u):oe=Se.ACCESS_TOKEN||"",C?Mr+"."+C+":"+oe:Mr+":"+oe},qr.prototype.fetchEventData=function(){var C=ee("localStorage"),H=this.getStorageKey(),oe=this.getStorageKey("uuid");if(C)try{var be=s.localStorage.getItem(H);be&&(this.eventData=JSON.parse(be));var Pe=s.localStorage.getItem(oe);Pe&&(this.anonId=Pe)}catch{B("Unable to read from LocalStorage")}},qr.prototype.saveEventData=function(){var C=ee("localStorage"),H=this.getStorageKey(),oe=this.getStorageKey("uuid");if(C)try{s.localStorage.setItem(oe,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(H,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,H,oe,be){var Pe=this;if(Se.EVENTS_URL){var Ne=Nt(Se.EVENTS_URL);Ne.params.push("access_token="+(be||Se.ACCESS_TOKEN||""));var ft={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:he,userId:this.anonId},It=H?g(ft,H):ft,Ht={url:Gt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Pe.pendingRequest=null,oe(er),Pe.saveEventData(),Pe.processRequests(be)})}},qr.prototype.queueRequest=function(C,H){this.queue.push(C),this.processRequests(H)};var Er=function(k){function C(){k.call(this,"map.load"),this.success={},this.skuToken=""}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postMapLoadEvent=function(oe,be,Pe,Ne){this.skuToken=Pe,(Se.EVENTS_URL&&Ne||Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(ft){return Ce(ft)||rt(ft)}))&&this.queueRequest({id:be,timestamp:Date.now()},Ne)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){var Pe=this.queue.shift(),Ne=Pe.id,ft=Pe.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=y()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ir=function(k){function C(H){k.call(this,"appUserTurnstile"),this._customAccessToken=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postTurnstileEvent=function(oe,be){Se.EVENTS_URL&&Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(Pe){return Ce(Pe)||rt(Pe)})&&this.queueRequest(Date.now(),be)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Pe=mr(Se.ACCESS_TOKEN),Ne=Pe?Pe.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;R(this.anonId)||(this.anonId=y(),ft=!0);var It=this.queue.shift();if(this.eventData.lastSuccess){var Ht=new Date(this.eventData.lastSuccess),er=new Date(It),Lr=(It-this.eventData.lastSuccess)/(24*60*60*1e3);ft=ft||Lr>=1||Lr<-1||Ht.getDate()!==er.getDate()}else ft=!0;if(!ft)return this.processRequests();this.postEvent(It,{"enabled.telemetry":!1},function(Zr){Zr||(be.eventData.lastSuccess=It,be.eventData.tokenU=Ne)},oe)}},C}(qr),_t=new Ir,Oe=_t.postTurnstileEvent.bind(_t),Je=new Er,Ae=Je.postMapLoadEvent.bind(Je),Le="mapbox-tiles",Ue=500,Ze=50,st=1e3*60*7,ut;function Ut(){s.caches&&!ut&&(ut=s.caches.open(Le))}var Ct;function Pt(k,C){if(Ct===void 0)try{new Response(new ReadableStream),Ct=!0}catch{Ct=!1}Ct?C(k.body):k.blob().then(C)}function jt(k,C,H){if(Ut(),!!ut){var oe={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(Ne,ft){return oe.headers.set(ft,Ne)});var be=de(C.headers.get("Cache-Control")||"");if(!be["no-store"]){be["max-age"]&&oe.headers.set("Expires",new Date(H+be["max-age"]*1e3).toUTCString());var Pe=new Date(oe.headers.get("Expires")).getTime()-H;Pe<st||Pt(C,function(Ne){var ft=new s.Response(Ne,oe);Ut(),ut&&ut.then(function(It){return It.put(fr(k.url),ft)}).catch(function(It){return B(It.message)})})}}}function fr(k){var C=k.indexOf("?");return C<0?k:k.slice(0,C)}function ur(k,C){if(Ut(),!ut)return C(null);var H=fr(k.url);ut.then(function(oe){oe.match(H).then(function(be){var Pe=sr(be);oe.delete(H),Pe&&oe.put(H,be.clone()),C(null,be,Pe)}).catch(C)}).catch(C)}function sr(k){if(!k)return!1;var C=new Date(k.headers.get("Expires")||0),H=de(k.headers.get("Cache-Control")||"");return C>Date.now()&&!H["no-cache"]}var Pr=1/0;function Ta(k){Pr++,Pr>Ze&&(k.getActor().send("enforceCacheSizeLimit",Ue),Pr=0)}function Oa(k){Ut(),ut&&ut.then(function(C){C.keys().then(function(H){for(var oe=0;oe<H.length-k;oe++)C.delete(H[oe])})})}function Ia(k){var C=s.caches.delete(Le);k&&C.catch(k).then(function(){return k()})}function qa(k,C){Ue=k,Ze=C}var Wa;function Ca(){return Wa==null&&(Wa=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&typeof s.createImageBitmap=="function"),Wa}var hi={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(hi);var wi=function(k){function C(H,oe,be){oe===401&&rt(be)&&(H+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),k.call(this,H),this.status=oe,this.url=be,this.name=this.constructor.name,this.message=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},C}(Error),Kt=ce()?function(){return self.worker&&self.worker.referrer}:function(){return(s.location.protocol==="blob:"?s.parent:s).location.href},Dt=function(k){return/^file:/.test(k)||/^file:/.test(Kt())&&!/^\w+:/.test(k)};function Yt(k,C){var H=new s.AbortController,oe=new s.Request(k.url,{method:k.method||"GET",body:k.body,credentials:k.credentials,headers:k.headers,referrer:Kt(),signal:H.signal}),be=!1,Pe=!1,Ne=Ke(oe.url);k.type==="json"&&oe.headers.set("Accept","application/json");var ft=function(Ht,er,Lr){if(!Pe){if(Ht&&Ht.message!=="SecurityError"&&B(Ht),er&&Lr)return It(er);var Zr=Date.now();s.fetch(oe).then(function(Vr){if(Vr.ok){var ua=Ne?Vr.clone():null;return It(Vr,ua,Zr)}else return C(new wi(Vr.statusText,Vr.status,k.url))}).catch(function(Vr){Vr.code!==20&&C(new Error(Vr.message))})}},It=function(Ht,er,Lr){(k.type==="arrayBuffer"?Ht.arrayBuffer():k.type==="json"?Ht.json():Ht.text()).then(function(Zr){Pe||(er&&Lr&&jt(oe,er,Lr),be=!0,C(null,Zr,Ht.headers.get("Cache-Control"),Ht.headers.get("Expires")))}).catch(function(Zr){Pe||C(new Error(Zr.message))})};return Ne?ur(oe,ft):ft(null,null),{cancel:function(){Pe=!0,be||H.abort()}}}function Jt(k,C){var H=new s.XMLHttpRequest;H.open(k.method||"GET",k.url,!0),k.type==="arrayBuffer"&&(H.responseType="arraybuffer");for(var oe in k.headers)H.setRequestHeader(oe,k.headers[oe]);return k.type==="json"&&(H.responseType="text",H.setRequestHeader("Accept","application/json")),H.withCredentials=k.credentials==="include",H.onerror=function(){C(new Error(H.statusText))},H.onload=function(){if((H.status>=200&&H.status<300||H.status===0)&&H.response!==null){var be=H.response;if(k.type==="json")try{be=JSON.parse(H.response)}catch(Pe){return C(Pe)}C(null,be,H.getResponseHeader("Cache-Control"),H.getResponseHeader("Expires"))}else C(new wi(H.statusText,H.status,k.url))},H.send(k.body),{cancel:function(){return H.abort()}}}var Fr=function(k,C){if(!Dt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Yt(k,C);if(ce()&&self.worker&&self.worker.actor){var H=!0;return self.worker.actor.send("getResource",k,C,void 0,H)}}return Jt(k,C)},ta=function(k,C){return Fr(g(k,{type:"json"}),C)},ra=function(k,C){return Fr(g(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(g(k,{method:"POST"}),C)};function Ba(k){var C=s.document.createElement("a");return C.href=k,C.protocol===s.document.location.protocol&&C.host===s.document.location.host}var $a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Za(k,C,H,oe){var be=new s.Image,Pe=s.URL;be.onload=function(){C(null,be),Pe.revokeObjectURL(be.src),be.onload=null,s.requestAnimationFrame(function(){be.src=$a})},be.onerror=function(){return C(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Ne=new s.Blob([new Uint8Array(k)],{type:"image/png"});be.cacheControl=H,be.expires=oe,be.src=k.byteLength?Pe.createObjectURL(Ne):$a}function ri(k,C){var H=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(H).then(function(oe){C(null,oe)}).catch(function(oe){C(new Error("Could not load image because of "+oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ra,an=function(){pi=[],Ra=0};an();var tn=function(k,C){if(Ie.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ra>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var H={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(H),H}Ra++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ra--;pi.length&&Ra<Se.MAX_PARALLEL_IMAGE_REQUESTS;){var Ne=pi.shift(),ft=Ne.requestParameters,It=Ne.callback,Ht=Ne.cancelled;Ht||(Ne.cancel=tn(ft,It).cancel)}},Pe=ra(k,function(Ne,ft,It,Ht){be(),Ne?C(Ne):ft&&(Ca()?ri(ft,C):Za(ft,C,It,Ht))});return{cancel:function(){Pe.cancel(),be()}}},fn=function(k,C){var H=s.document.createElement("video");H.muted=!0,H.onloadstart=function(){C(null,H)};for(var oe=0;oe<k.length;oe++){var be=s.document.createElement("source");Ba(k[oe])||(H.crossOrigin="Anonymous"),be.src=k[oe],H.appendChild(be)}return{cancel:function(){}}};function xt(k,C,H){var oe=H[k]&&H[k].indexOf(C)!==-1;oe||(H[k]=H[k]||[],H[k].push(C))}function lt(k,C,H){if(H&&H[k]){var oe=H[k].indexOf(C);oe!==-1&&H[k].splice(oe,1)}}var Br=function(C,H){H===void 0&&(H={}),g(this,H),this.type=C},Cr=function(k){function C(H,oe){oe===void 0&&(oe={}),k.call(this,"error",g({error:H},oe))}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Br),xr=function(){};xr.prototype.on=function(C,H){return this._listeners=this._listeners||{},xt(C,H,this._listeners),this},xr.prototype.off=function(C,H){return lt(C,H,this._listeners),lt(C,H,this._oneTimeListeners),this},xr.prototype.once=function(C,H){return this._oneTimeListeners=this._oneTimeListeners||{},xt(C,H,this._oneTimeListeners),this},xr.prototype.fire=function(C,H){typeof C=="string"&&(C=new Br(C,H||{}));var oe=C.type;if(this.listens(oe)){C.target=this;for(var be=this._listeners&&this._listeners[oe]?this._listeners[oe].slice():[],Pe=0,Ne=be;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];ft.call(this,C)}for(var It=this._oneTimeListeners&&this._oneTimeListeners[oe]?this._oneTimeListeners[oe].slice():[],Ht=0,er=It;Ht<er.length;Ht+=1){var Lr=er[Ht];lt(oe,Lr,this._oneTimeListeners),Lr.call(this,C)}var Zr=this._eventedParent;Zr&&(g(C,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Zr.fire(C))}else C instanceof Cr&&console.error(C.error);return this},xr.prototype.listens=function(C){return this._listeners&&this._listeners[C]&&this._listeners[C].length>0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},xr.prototype.setEventedParent=function(C,H){return this._eventedParent=C,this._eventedParentData=H,this};var Rr=8,Ur={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Hr={"*":{type:"source"}},gt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Xt={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},vr={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:"*"}},Or={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},ba={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Pa={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"}}},ma={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"}}},la={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_a=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ai={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ki={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ki={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ln={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Bn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xo={type:"array",value:"*"},Co={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Fs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Mn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ao={type:"array",value:"*",minimum:1},On={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}},ts=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],is={"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"}},_s={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Oo={"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"}},io={"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"}},Gn={"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"}},eo={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ns={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gs={"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"}},Ls={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Xo={"*":{type:"string"}},Gi={$version:Rr,$root:Ur,sources:Hr,source:gt,source_vector:Xt,source_raster:vr,source_raster_dem:Or,source_geojson:ba,source_video:Pa,source_image:ma,layer:la,layout:_a,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:yn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Ln,layout_symbol:kn,layout_raster:Bn,layout_hillshade:ao,filter:xo,filter_operator:Co,geometry_type:Fs,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:Mn,expression:Ao,light:On,paint:ts,paint_fill:is,"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:_s,paint_circle:Oo,paint_heatmap:io,paint_symbol:Gn,paint_raster:eo,paint_hillshade:ns,paint_background:gs,transition:Ls,"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:Xo},Pn=function(C,H,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),H!=null&&H.__line__&&(this.line=H.__line__)};function js(k){var C=k.key,H=k.value;return H?[new Pn(C,H,"constants have been deprecated as of v8")]:[]}function xs(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe];for(var Ne in Pe)k[Ne]=Pe[Ne]}return k}function Hn(k){return k instanceof Number||k instanceof String||k instanceof Boolean?k.valueOf():k}function Os(k){if(Array.isArray(k))return k.map(Os);if(k instanceof Object&&!(k instanceof Number||k instanceof String||k instanceof Boolean)){var C={};for(var H in k)C[H]=Os(k[H]);return C}return Hn(k)}var ds=function(k){function C(H,oe){k.call(this,oe),this.message=oe,this.key=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Error),Xs=function(C,H){H===void 0&&(H=[]),this.parent=C,this.bindings={};for(var oe=0,be=H;oe<be.length;oe+=1){var Pe=be[oe],Ne=Pe[0],ft=Pe[1];this.bindings[Ne]=ft}};Xs.prototype.concat=function(C){return new Xs(this,C)},Xs.prototype.get=function(C){if(this.bindings[C])return this.bindings[C];if(this.parent)return this.parent.get(C);throw new Error(C+" not found in scope.")},Xs.prototype.has=function(C){return this.bindings[C]?!0:this.parent?this.parent.has(C):!1};var il={kind:"null"},_n={kind:"number"},Lo={kind:"string"},bo={kind:"boolean"},Rs={kind:"color"},pu={kind:"object"},uo={kind:"value"},Gs={kind:"error"},vl={kind:"collator"},As={kind:"formatted"},qs={kind:"resolvedImage"};function us(k,C){return{kind:"array",itemType:k,N:C}}function Ss(k){if(k.kind==="array"){var C=Ss(k.itemType);return typeof k.N=="number"?"array<"+C+", "+k.N+">":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Nl=[il,_n,Lo,bo,Rs,As,pu,us(uo),qs];function su(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!su(k.itemType,C.itemType))&&(typeof k.N!="number"||k.N===C.N))return null}else{if(k.kind===C.kind)return null;if(k.kind==="value")for(var H=0,oe=Nl;H<oe.length;H+=1){var be=oe[H];if(!su(be,C))return null}}return"Expected "+Ss(k)+" but found "+Ss(C)+" instead."}function Tc(k,C){return C.some(function(H){return H.kind===k.kind})}function du(k,C){return C.some(function(H){return H==="null"?k===null:H==="array"?Array.isArray(k):H==="object"?k&&!Array.isArray(k)&&typeof k=="object":H===typeof k})}var Sf=t(function(k,C){var H={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function oe(Ht){return Ht=Math.round(Ht),Ht<0?0:Ht>255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Pe(Ht){return Ht[Ht.length-1]==="%"?oe(parseFloat(Ht)/100*255):oe(parseInt(Ht))}function Ne(Ht){return Ht[Ht.length-1]==="%"?be(parseFloat(Ht)/100):be(parseFloat(Ht))}function ft(Ht,er,Lr){return Lr<0?Lr+=1:Lr>1&&(Lr-=1),Lr*6<1?Ht+(er-Ht)*Lr*6:Lr*2<1?er:Lr*3<2?Ht+(er-Ht)*(2/3-Lr)*6:Ht}function It(Ht){var er=Ht.replace(/ /g,"").toLowerCase();if(er in H)return H[er].slice();if(er[0]==="#"){if(er.length===4){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=4095?[(Lr&3840)>>4|(Lr&3840)>>8,Lr&240|(Lr&240)>>4,Lr&15|(Lr&15)<<4,1]:null}else if(er.length===7){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=16777215?[(Lr&16711680)>>16,(Lr&65280)>>8,Lr&255,1]:null}return null}var Zr=er.indexOf("("),Vr=er.indexOf(")");if(Zr!==-1&&Vr+1===er.length){var ua=er.substr(0,Zr),Fa=er.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Fa.length!==4)return null;Mi=Ne(Fa.pop());case"rgb":return Fa.length!==3?null:[Pe(Fa[0]),Pe(Fa[1]),Pe(Fa[2]),Mi];case"hsla":if(Fa.length!==4)return null;Mi=Ne(Fa.pop());case"hsl":if(Fa.length!==3)return null;var ii=(parseFloat(Fa[0])%360+360)%360/360,$i=Ne(Fa[1]),Oi=Ne(Fa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[oe(ft(ln,Ji,ii+1/3)*255),oe(ft(ln,Ji,ii)*255),oe(ft(ln,Ji,ii-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=It}catch{}}),Uc=Sf.parseCSSColor,Bs=function(C,H,oe,be){be===void 0&&(be=1),this.r=C,this.g=H,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var H=Uc(C);if(H)return new Bs(H[0]/255*H[3],H[1]/255*H[3],H[2]/255*H[3],H[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),H=C[0],oe=C[1],be=C[2],Pe=C[3];return"rgba("+Math.round(H)+","+Math.round(oe)+","+Math.round(be)+","+Pe+")"},Bs.prototype.toArray=function(){var C=this,H=C.r,oe=C.g,be=C.b,Pe=C.a;return Pe===0?[0,0,0,0]:[H*255/Pe,oe*255/Pe,be*255/Pe,Pe]},Bs.black=new Bs(0,0,0,1),Bs.white=new Bs(1,1,1,1),Bs.transparent=new Bs(0,0,0,0),Bs.red=new Bs(1,0,0,1);var dc=function(C,H,oe){C?this.sensitivity=H?"variant":"case":this.sensitivity=H?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,H){return this.collator.compare(C,H)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Hc=function(C,H,oe,be,Pe){this.text=C,this.image=H,this.scale=oe,this.fontStack=be,this.textColor=Pe},lu=function(C){this.sections=C};lu.fromString=function(C){return new lu([new Hc(C,null,null,null,null)])},lu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},lu.factory=function(C){return C instanceof lu?C:lu.fromString(C)},lu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},lu.prototype.serialize=function(){for(var C=["format"],H=0,oe=this.sections;H<oe.length;H+=1){var be=oe[H];if(be.image){C.push(["image",be.image.name]);continue}C.push(be.text);var Pe={};be.fontStack&&(Pe["text-font"]=["literal",be.fontStack.split(",")]),be.scale&&(Pe["font-scale"]=be.scale),be.textColor&&(Pe["text-color"]=["rgba"].concat(be.textColor.toArray())),C.push(Pe)}return C};var Pl=function(C){this.name=C.name,this.available=C.available};Pl.prototype.toString=function(){return this.name},Pl.fromString=function(C){return C?new Pl({name:C,available:!1}):null},Pl.prototype.serialize=function(){return["image",this.name]};function ic(k,C,H,oe){if(!(typeof k=="number"&&k>=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof H=="number"&&H>=0&&H<=255)){var be=typeof oe=="number"?[k,C,H,oe]:[k,C,H];return"Invalid rgba value ["+be.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof oe>"u"||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[k,C,H,oe].join(", ")+"]: 'a' must be between 0 and 1."}function Ou(k){if(k===null)return!0;if(typeof k=="string")return!0;if(typeof k=="boolean")return!0;if(typeof k=="number")return!0;if(k instanceof Bs)return!0;if(k instanceof dc)return!0;if(k instanceof lu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C];if(!Ou(oe))return!1}return!0}else if(typeof k=="object"){for(var be in k)if(!Ou(k[be]))return!1;return!0}else return!1}function nl(k){if(k===null)return il;if(typeof k=="string")return Lo;if(typeof k=="boolean")return bo;if(typeof k=="number")return _n;if(k instanceof Bs)return Rs;if(k instanceof dc)return vl;if(k instanceof lu)return As;if(k instanceof Pl)return qs;if(Array.isArray(k)){for(var C=k.length,H,oe=0,be=k;oe<be.length;oe+=1){var Pe=be[oe],Ne=nl(Pe);if(!H)H=Ne;else{if(H===Ne)continue;H=uo;break}}return us(H||uo,C)}else return pu}function ml(k){var C=typeof k;return k===null?"":C==="string"||C==="number"||C==="boolean"?String(k):k instanceof Bs||k instanceof lu||k instanceof Pl?k.toString():JSON.stringify(k)}var bs=function(C,H){this.type=C,this.value=H};bs.parse=function(C,H){if(C.length!==2)return H.error("'literal' expression requires exactly one argument, but found "+(C.length-1)+" instead.");if(!Ou(C[1]))return H.error("invalid value");var oe=C[1],be=nl(oe),Pe=H.expectedType;return be.kind==="array"&&be.N===0&&Pe&&Pe.kind==="array"&&(typeof Pe.N!="number"||Pe.N===0)&&(be=Pe),new bs(be,oe)},bs.prototype.evaluate=function(){return this.value},bs.prototype.eachChild=function(){},bs.prototype.outputDefined=function(){return!0},bs.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Bs?["rgba"].concat(this.value.toArray()):this.value instanceof lu?this.value.serialize():this.value};var Zs=function(C){this.name="ExpressionEvaluationError",this.message=C};Zs.prototype.toJSON=function(){return this.message};var nc={string:Lo,number:_n,boolean:bo,object:pu},Ul=function(C,H){this.type=C,this.args=H};Ul.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var oe=1,be,Pe=C[0];if(Pe==="array"){var Ne;if(C.length>2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return H.error('The item type argument of "array" must be one of string, number, boolean',1);Ne=nc[ft],oe++}else Ne=uo;var It;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return H.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=us(Ne,It)}else be=nc[Pe];for(var Ht=[];oe<C.length;oe++){var er=H.parse(C[oe],oe,uo);if(!er)return null;Ht.push(er)}return new Ul(be,Ht)},Ul.prototype.evaluate=function(C){for(var H=0;H<this.args.length;H++){var oe=this.args[H].evaluate(C),be=su(this.type,nl(oe));if(be){if(H===this.args.length-1)throw new Zs("Expected value to be of type "+Ss(this.type)+", but found "+Ss(nl(oe))+" instead.")}else return oe}return null},Ul.prototype.eachChild=function(C){this.args.forEach(C)},Ul.prototype.outputDefined=function(){return this.args.every(function(C){return C.outputDefined()})},Ul.prototype.serialize=function(){var C=this.type,H=[C.kind];if(C.kind==="array"){var oe=C.itemType;if(oe.kind==="string"||oe.kind==="number"||oe.kind==="boolean"){H.push(oe.kind);var be=C.N;(typeof be=="number"||this.args.length>1)&&H.push(be)}}return H.concat(this.args.map(function(Pe){return Pe.serialize()}))};var qu=function(C){this.type=As,this.sections=C};qu.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return H.error("First argument must be an image or text section.");for(var be=[],Pe=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Pe&&typeof ft=="object"&&!Array.isArray(ft)){Pe=!1;var It=null;if(ft["font-scale"]&&(It=H.parse(ft["font-scale"],1,_n),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=H.parse(ft["text-font"],1,us(Lo)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=H.parse(ft["text-color"],1,Rs),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Zr=H.parse(C[Ne],1,uo);if(!Zr)return null;var Vr=Zr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return H.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Pe=!0,be.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var H=function(oe){var be=oe.content.evaluate(C);return nl(be)===qs?new Hc("",be,null,null,null):new Hc(ml(be),null,oe.scale?oe.scale.evaluate(C):null,oe.font?oe.font.evaluate(C).join(","):null,oe.textColor?oe.textColor.evaluate(C):null)};return new lu(this.sections.map(H))},qu.prototype.eachChild=function(C){for(var H=0,oe=this.sections;H<oe.length;H+=1){var be=oe[H];C(be.content),be.scale&&C(be.scale),be.font&&C(be.font),be.textColor&&C(be.textColor)}},qu.prototype.outputDefined=function(){return!1},qu.prototype.serialize=function(){for(var C=["format"],H=0,oe=this.sections;H<oe.length;H+=1){var be=oe[H];C.push(be.content.serialize());var Pe={};be.scale&&(Pe["font-scale"]=be.scale.serialize()),be.font&&(Pe["text-font"]=be.font.serialize()),be.textColor&&(Pe["text-color"]=be.textColor.serialize()),C.push(Pe)}return C};var fl=function(C){this.type=qs,this.input=C};fl.parse=function(C,H){if(C.length!==2)return H.error("Expected two arguments.");var oe=H.parse(C[1],1,Lo);return oe?new fl(oe):H.error("No image name provided.")},fl.prototype.evaluate=function(C){var H=this.input.evaluate(C),oe=Pl.fromString(H);return oe&&C.availableImages&&(oe.available=C.availableImages.indexOf(H)>-1),oe},fl.prototype.eachChild=function(C){C(this.input)},fl.prototype.outputDefined=function(){return!1},fl.prototype.serialize=function(){return["image",this.input.serialize()]};var xh={"to-boolean":bo,"to-color":Rs,"to-number":_n,"to-string":Lo},ss=function(C,H){this.type=C,this.args=H};ss.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return H.error("Expected one argument.");for(var be=xh[oe],Pe=[],Ne=1;Ne<C.length;Ne++){var ft=H.parse(C[Ne],Ne,uo);if(!ft)return null;Pe.push(ft)}return new ss(be,Pe)},ss.prototype.evaluate=function(C){if(this.type.kind==="boolean")return!!this.args[0].evaluate(C);if(this.type.kind==="color"){for(var H,oe,be=0,Pe=this.args;be<Pe.length;be+=1){var Ne=Pe[be];if(H=Ne.evaluate(C),oe=null,H instanceof Bs)return H;if(typeof H=="string"){var ft=C.parseColor(H);if(ft)return ft}else if(Array.isArray(H)&&(H.length<3||H.length>4?oe="Invalid rbga value "+JSON.stringify(H)+": expected an array containing either three or four numeric values.":oe=ic(H[0],H[1],H[2],H[3]),!oe))return new Bs(H[0]/255,H[1]/255,H[2]/255,H[3])}throw new Zs(oe||"Could not parse color from value '"+(typeof H=="string"?H:String(JSON.stringify(H)))+"'")}else if(this.type.kind==="number"){for(var It=null,Ht=0,er=this.args;Ht<er.length;Ht+=1){var Lr=er[Ht];if(It=Lr.evaluate(C),It===null)return 0;var Zr=Number(It);if(!isNaN(Zr))return Zr}throw new Zs("Could not convert "+JSON.stringify(It)+" to number.")}else return this.type.kind==="formatted"?lu.fromString(ml(this.args[0].evaluate(C))):this.type.kind==="resolvedImage"?Pl.fromString(ml(this.args[0].evaluate(C))):ml(this.args[0].evaluate(C))},ss.prototype.eachChild=function(C){this.args.forEach(C)},ss.prototype.outputDefined=function(){return this.args.every(function(C){return C.outputDefined()})},ss.prototype.serialize=function(){if(this.type.kind==="formatted")return new qu([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fl(this.args[0]).serialize();var C=["to-"+this.type.kind];return this.eachChild(function(H){C.push(H.serialize())}),C};var bh=["Unknown","Point","LineString","Polygon"],ks=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};ks.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},ks.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?bh[this.feature.type]:this.feature.type:null},ks.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},ks.prototype.canonicalID=function(){return this.canonical},ks.prototype.properties=function(){return this.feature&&this.feature.properties||{}},ks.prototype.parseColor=function(C){var H=this._parseColorCache[C];return H||(H=this._parseColorCache[C]=Bs.parse(C)),H};var to=function(C,H,oe,be){this.name=C,this.type=H,this._evaluate=oe,this.args=be};to.prototype.evaluate=function(C){return this._evaluate(C,this.args)},to.prototype.eachChild=function(C){this.args.forEach(C)},to.prototype.outputDefined=function(){return!1},to.prototype.serialize=function(){return[this.name].concat(this.args.map(function(C){return C.serialize()}))},to.parse=function(C,H){var oe,be=C[0],Pe=to.definitions[be];if(!Pe)return H.error('Unknown expression "'+be+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Ne=Array.isArray(Pe)?Pe[0]:Pe.type,ft=Array.isArray(Pe)?[[Pe[1],Pe[2]]]:Pe.overloads,It=ft.filter(function(Eo){var Ro=Eo[0];return!Array.isArray(Ro)||Ro.length===C.length-1}),Ht=null,er=0,Lr=It;er<Lr.length;er+=1){var Zr=Lr[er],Vr=Zr[0],ua=Zr[1];Ht=new ol(H.registry,H.path,null,H.scope);for(var Fa=[],Mi=!1,ii=1;ii<C.length;ii++){var $i=C[ii],Oi=Array.isArray(Vr)?Vr[ii-1]:Vr.type,Ji=Ht.parse($i,1+Fa.length,Oi);if(!Ji){Mi=!0;break}Fa.push(Ji)}if(!Mi){if(Array.isArray(Vr)&&Vr.length!==Fa.length){Ht.error("Expected "+Vr.length+" arguments, but found "+Fa.length+" instead.");continue}for(var ln=0;ln<Fa.length;ln++){var wn=Array.isArray(Vr)?Vr[ln]:Vr.type,Vn=Fa[ln];Ht.concat(ln+1).checkSubtype(wn,Vn.type)}if(Ht.errors.length===0)return new to(be,Ne,ua,Fa)}}if(It.length===1)(oe=H.errors).push.apply(oe,Ht.errors);else{for(var Un=It.length?It:ft,Mo=Un.map(function(Eo){var Ro=Eo[0];return Wc(Ro)}).join(" | "),so=[],mo=1;mo<C.length;mo++){var Cs=H.parse(C[mo],1+so.length);if(!Cs)return null;so.push(Ss(Cs.type))}H.error("Expected arguments of type "+Mo+", but found ("+so.join(", ")+") instead.")}return null},to.register=function(C,H){to.definitions=H;for(var oe in H)C[oe]=to};function Wc(k){return Array.isArray(k)?"("+k.map(Ss).join(", ")+")":"("+Ss(k.type)+"...)"}var Vu=function(C,H,oe){this.type=vl,this.locale=oe,this.caseSensitive=C,this.diacriticSensitive=H};Vu.parse=function(C,H){if(C.length!==2)return H.error("Expected one argument.");var oe=C[1];if(typeof oe!="object"||Array.isArray(oe))return H.error("Collator options argument must be an object.");var be=H.parse(oe["case-sensitive"]===void 0?!1:oe["case-sensitive"],1,bo);if(!be)return null;var Pe=H.parse(oe["diacritic-sensitive"]===void 0?!1:oe["diacritic-sensitive"],1,bo);if(!Pe)return null;var Ne=null;return oe.locale&&(Ne=H.parse(oe.locale,1,Lo),!Ne)?null:new Vu(be,Pe,Ne)},Vu.prototype.evaluate=function(C){return new dc(this.caseSensitive.evaluate(C),this.diacriticSensitive.evaluate(C),this.locale?this.locale.evaluate(C):null)},Vu.prototype.eachChild=function(C){C(this.caseSensitive),C(this.diacriticSensitive),this.locale&&C(this.locale)},Vu.prototype.outputDefined=function(){return!1},Vu.prototype.serialize=function(){var C={};return C["case-sensitive"]=this.caseSensitive.serialize(),C["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(C.locale=this.locale.serialize()),["collator",C]};var jl=8192;function Mf(k,C){k[0]=Math.min(k[0],C[0]),k[1]=Math.min(k[1],C[1]),k[2]=Math.max(k[2],C[0]),k[3]=Math.max(k[3],C[1])}function Ac(k){return(180+k)/360}function nf(k){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+k*Math.PI/360)))/360}function $l(k,C){return!(k[0]<=C[0]||k[2]>=C[2]||k[1]<=C[1]||k[3]>=C[3])}function Jf(k,C){var H=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(H*be*jl),Math.round(oe*be*jl)]}function Of(k,C,H){var oe=k[0]-C[0],be=k[1]-C[1],Pe=k[0]-H[0],Ne=k[1]-H[1];return oe*Ne-Pe*be===0&&oe*Pe<=0&&be*Ne<=0}function of(k,C,H){return C[1]>k[1]!=H[1]>k[1]&&k[0]<(H[0]-C[0])*(k[1]-C[1])/(H[1]-C[1])+C[0]}function jc(k,C){for(var H=!1,oe=0,be=C.length;oe<be;oe++)for(var Pe=C[oe],Ne=0,ft=Pe.length;Ne<ft-1;Ne++){if(Of(k,Pe[Ne],Pe[Ne+1]))return!1;of(k,Pe[Ne],Pe[Ne+1])&&(H=!H)}return H}function Bf(k,C){for(var H=0;H<C.length;H++)if(jc(k,C[H]))return!0;return!1}function Nf(k,C){return k[0]*C[1]-k[1]*C[0]}function Gu(k,C,H,oe){var be=k[0]-H[0],Pe=k[1]-H[1],Ne=C[0]-H[0],ft=C[1]-H[1],It=oe[0]-H[0],Ht=oe[1]-H[1],er=be*Ht-It*Pe,Lr=Ne*Ht-It*ft;return er>0&&Lr<0||er<0&&Lr>0}function Ef(k,C,H,oe){var be=[C[0]-k[0],C[1]-k[1]],Pe=[oe[0]-H[0],oe[1]-H[1]];return Nf(Pe,be)===0?!1:!!(Gu(k,C,H,oe)&&Gu(H,oe,k,C))}function oc(k,C,H){for(var oe=0,be=H;oe<be.length;oe+=1)for(var Pe=be[oe],Ne=0;Ne<Pe.length-1;++Ne)if(Ef(k,C,Pe[Ne],Pe[Ne+1]))return!0;return!1}function Xc(k,C){for(var H=0;H<k.length;++H)if(!jc(k[H],C))return!1;for(var oe=0;oe<k.length-1;++oe)if(oc(k[oe],k[oe+1],C))return!1;return!0}function Ql(k,C){for(var H=0;H<C.length;H++)if(Xc(k,C[H]))return!0;return!1}function qc(k,C,H){for(var oe=[],be=0;be<k.length;be++){for(var Pe=[],Ne=0;Ne<k[be].length;Ne++){var ft=Jf(k[be][Ne],H);Mf(C,ft),Pe.push(ft)}oe.push(Pe)}return oe}function Sc(k,C,H){for(var oe=[],be=0;be<k.length;be++){var Pe=qc(k[be],C,H);oe.push(Pe)}return oe}function Ys(k,C,H,oe){if(k[0]<H[0]||k[0]>H[2]){var be=oe*.5,Pe=k[0]-H[0]>be?-oe:H[0]-k[0]>be?oe:0;Pe===0&&(Pe=k[0]-H[2]>be?-oe:H[2]-k[0]>be?oe:0),k[0]+=Pe}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,H,oe){for(var be=Math.pow(2,oe.z)*jl,Pe=[oe.x*jl,oe.y*jl],Ne=[],ft=0,It=k;ft<It.length;ft+=1)for(var Ht=It[ft],er=0,Lr=Ht;er<Lr.length;er+=1){var Zr=Lr[er],Vr=[Zr.x+Pe[0],Zr.y+Pe[1]];Ys(Vr,C,H,be),Ne.push(Vr)}return Ne}function Uf(k,C,H,oe){for(var be=Math.pow(2,oe.z)*jl,Pe=[oe.x*jl,oe.y*jl],Ne=[],ft=0,It=k;ft<It.length;ft+=1){for(var Ht=It[ft],er=[],Lr=0,Zr=Ht;Lr<Zr.length;Lr+=1){var Vr=Zr[Lr],ua=[Vr.x+Pe[0],Vr.y+Pe[1]];Mf(C,ua),er.push(ua)}Ne.push(er)}if(C[2]-C[0]<=be/2){kf(C);for(var Fa=0,Mi=Ne;Fa<Mi.length;Fa+=1)for(var ii=Mi[Fa],$i=0,Oi=ii;$i<Oi.length;$i+=1){var Ji=Oi[$i];Ys(Ji,C,H,be)}}return Ne}function Zc(k,C){var H=[1/0,1/0,-1/0,-1/0],oe=[1/0,1/0,-1/0,-1/0],be=k.canonicalID();if(C.type==="Polygon"){var Pe=qc(C.coordinates,oe,be),Ne=fh(k.geometry(),H,oe,be);if(!$l(H,oe))return!1;for(var ft=0,It=Ne;ft<It.length;ft+=1){var Ht=It[ft];if(!jc(Ht,Pe))return!1}}if(C.type==="MultiPolygon"){var er=Sc(C.coordinates,oe,be),Lr=fh(k.geometry(),H,oe,be);if(!$l(H,oe))return!1;for(var Zr=0,Vr=Lr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(!Bf(ua,er))return!1}}return!0}function $f(k,C){var H=[1/0,1/0,-1/0,-1/0],oe=[1/0,1/0,-1/0,-1/0],be=k.canonicalID();if(C.type==="Polygon"){var Pe=qc(C.coordinates,oe,be),Ne=Uf(k.geometry(),H,oe,be);if(!$l(H,oe))return!1;for(var ft=0,It=Ne;ft<It.length;ft+=1){var Ht=It[ft];if(!Xc(Ht,Pe))return!1}}if(C.type==="MultiPolygon"){var er=Sc(C.coordinates,oe,be),Lr=Uf(k.geometry(),H,oe,be);if(!$l(H,oe))return!1;for(var Zr=0,Vr=Lr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(!Ql(ua,er))return!1}}return!0}var Cu=function(C,H){this.type=bo,this.geojson=C,this.geometries=H};Cu.parse=function(C,H){if(C.length!==2)return H.error("'within' expression requires exactly one argument, but found "+(C.length-1)+" instead.");if(Ou(C[1])){var oe=C[1];if(oe.type==="FeatureCollection")for(var be=0;be<oe.features.length;++be){var Pe=oe.features[be].geometry.type;if(Pe==="Polygon"||Pe==="MultiPolygon")return new Cu(oe,oe.features[be].geometry)}else if(oe.type==="Feature"){var Ne=oe.geometry.type;if(Ne==="Polygon"||Ne==="MultiPolygon")return new Cu(oe,oe.geometry)}else if(oe.type==="Polygon"||oe.type==="MultiPolygon")return new Cu(oe,oe)}return H.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Cu.prototype.evaluate=function(C){if(C.geometry()!=null&&C.canonicalID()!=null){if(C.geometryType()==="Point")return Zc(C,this.geometries);if(C.geometryType()==="LineString")return $f(C,this.geometries)}return!1},Cu.prototype.eachChild=function(){},Cu.prototype.outputDefined=function(){return!0},Cu.prototype.serialize=function(){return["within",this.geojson]};function jf(k){if(k instanceof to){if(k.name==="get"&&k.args.length===1)return!1;if(k.name==="feature-state")return!1;if(k.name==="has"&&k.args.length===1)return!1;if(k.name==="properties"||k.name==="geometry-type"||k.name==="id")return!1;if(/^filter-/.test(k.name))return!1}if(k instanceof Cu)return!1;var C=!0;return k.eachChild(function(H){C&&!jf(H)&&(C=!1)}),C}function yl(k){if(k instanceof to&&k.name==="feature-state")return!1;var C=!0;return k.eachChild(function(H){C&&!yl(H)&&(C=!1)}),C}function Lu(k,C){if(k instanceof to&&C.indexOf(k.name)>=0)return!1;var H=!0;return k.eachChild(function(oe){H&&!Lu(oe,C)&&(H=!1)}),H}var Mc=function(C,H){this.type=H.type,this.name=C,this.boundExpression=H};Mc.parse=function(C,H){if(C.length!==2||typeof C[1]!="string")return H.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return H.scope.has(oe)?new Mc(oe,H.scope.get(oe)):H.error('Unknown variable "'+oe+'". Make sure "'+oe+'" has been bound in an enclosing "let" expression before using it.',1)},Mc.prototype.evaluate=function(C){return this.boundExpression.evaluate(C)},Mc.prototype.eachChild=function(){},Mc.prototype.outputDefined=function(){return!1},Mc.prototype.serialize=function(){return["var",this.name]};var ol=function(C,H,oe,be,Pe){H===void 0&&(H=[]),be===void 0&&(be=new Xs),Pe===void 0&&(Pe=[]),this.registry=C,this.path=H,this.key=H.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Pe,this.expectedType=oe};ol.prototype.parse=function(C,H,oe,be,Pe){return Pe===void 0&&(Pe={}),H?this.concat(H,oe,be)._parse(C,Pe):this._parse(C,Pe)},ol.prototype._parse=function(C,H){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Zr){return Zr==="assert"?new Ul(Lr,[er]):Zr==="coerce"?new ss(Lr,[er]):er}if(Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var be=C[0];if(typeof be!="string")return this.error("Expression name must be a string, but found "+typeof be+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Pe=this.registry[be];if(Pe){var Ne=Pe.parse(C,this);if(!Ne)return null;if(this.expectedType){var ft=this.expectedType,It=Ne.type;if((ft.kind==="string"||ft.kind==="number"||ft.kind==="boolean"||ft.kind==="object"||ft.kind==="array")&&It.kind==="value")Ne=oe(Ne,ft,H.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,H.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof bs)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new ks;try{Ne=new bs(Ne.type,Ne.evaluate(Ht))}catch(er){return this.error(er.message),null}}return Ne}return this.error('Unknown expression "'+be+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof C>"u"?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},ol.prototype.concat=function(C,H,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Pe=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,H||null,Pe,this.errors)},ol.prototype.error=function(C){for(var H=[],oe=arguments.length-1;oe-- >0;)H[oe]=arguments[oe+1];var be=""+this.key+H.map(function(Pe){return"["+Pe+"]"}).join("");this.errors.push(new ds(be,C))},ol.prototype.checkSubtype=function(C,H){var oe=su(C,H);return oe&&this.error(oe),oe};function vc(k){if(k instanceof Mc)return vc(k.boundExpression);if(k instanceof to&&k.name==="error")return!1;if(k instanceof Vu)return!1;if(k instanceof Cu)return!1;var C=k instanceof ss||k instanceof Ul,H=!0;return k.eachChild(function(oe){C?H=H&&vc(oe):H=H&&oe instanceof bs}),H?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var H=k.length-1,oe=0,be=H,Pe=0,Ne,ft;oe<=be;)if(Pe=Math.floor((oe+be)/2),Ne=k[Pe],ft=k[Pe+1],Ne<=C){if(Pe===H||C<ft)return Pe;oe=Pe+1}else if(Ne>C)be=Pe-1;else throw new Zs("Input is not a number.");return 0}var Tu=function(C,H,oe){this.type=C,this.input=H,this.labels=[],this.outputs=[];for(var be=0,Pe=oe;be<Pe.length;be+=1){var Ne=Pe[be],ft=Ne[0],It=Ne[1];this.labels.push(ft),this.outputs.push(It)}};Tu.parse=function(C,H){if(C.length-1<4)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return H.error("Expected an even number of arguments.");var oe=H.parse(C[1],1,_n);if(!oe)return null;var be=[],Pe=null;H.expectedType&&H.expectedType.kind!=="value"&&(Pe=H.expectedType);for(var Ne=1;Ne<C.length;Ne+=2){var ft=Ne===1?-1/0:C[Ne],It=C[Ne+1],Ht=Ne,er=Ne+1;if(typeof ft!="number")return H.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ht);if(be.length&&be[be.length-1][0]>=ft)return H.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=H.parse(It,er,Pe);if(!Lr)return null;Pe=Pe||Lr.type,be.push([ft,Lr])}return new Tu(Pe,oe,be)},Tu.prototype.evaluate=function(C){var H=this.labels,oe=this.outputs;if(H.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=H[0])return oe[0].evaluate(C);var Pe=H.length;if(be>=H[Pe-1])return oe[Pe-1].evaluate(C);var Ne=yu(H,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var H=0,oe=this.outputs;H<oe.length;H+=1){var be=oe[H];C(be)}},Tu.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})},Tu.prototype.serialize=function(){for(var C=["step",this.input.serialize()],H=0;H<this.labels.length;H++)H>0&&C.push(this.labels[H]),C.push(this.outputs[H].serialize());return C};function El(k,C,H){return k*(1-H)+C*H}function qf(k,C,H){return new Bs(El(k.r,C.r,H),El(k.g,C.g,H),El(k.b,C.b,H),El(k.a,C.a,H))}function Qf(k,C,H){return k.map(function(oe,be){return El(oe,C[be],H)})}var Bu=Object.freeze({__proto__:null,number:El,color:qf,array:Qf}),Ec=.95047,mc=1,Lh=1.08883,sf=4/29,vf=6/29,Nu=3*vf*vf,lf=vf*vf*vf,au=Math.PI/180,Yc=180/Math.PI;function hh(k){return k>lf?Math.pow(k,1/3):k/Nu+sf}function mf(k){return k>vf?k*k*k:Nu*(k-sf)}function sl(k){return 255*(k<=.0031308?12.92*k:1.055*Math.pow(k,1/2.4)-.055)}function _u(k){return k/=255,k<=.04045?k/12.92:Math.pow((k+.055)/1.055,2.4)}function Pu(k){var C=_u(k.r),H=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*H+.1804375*oe)/Ec),Pe=hh((.2126729*C+.7151522*H+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*H+.9503041*oe)/Lh);return{l:116*Pe-16,a:500*(be-Pe),b:200*(Pe-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,H=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),H=Ec*mf(H),oe=Lh*mf(oe),new Bs(sl(3.2404542*H-1.5371385*C-.4985314*oe),sl(-.969266*H+1.8760108*C+.041556*oe),sl(.0556434*H-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,H){return{l:El(k.l,C.l,H),a:El(k.a,C.a,H),b:El(k.b,C.b,H),alpha:El(k.alpha,C.alpha,H)}}function uf(k){var C=Pu(k),H=C.l,oe=C.a,be=C.b,Pe=Math.atan2(be,oe)*Yc;return{h:Pe<0?Pe+360:Pe,c:Math.sqrt(oe*oe+be*be),l:H,alpha:k.a}}function kc(k){var C=k.h*au,H=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*H,b:Math.sin(C)*H,alpha:k.alpha})}function Hu(k,C,H){var oe=C-k;return k+H*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,H){return{h:Hu(k.h,C.h,H),c:El(k.c,C.c,H),l:El(k.l,C.l,H),alpha:El(k.alpha,C.alpha,H)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Kc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Kc}),iu=function(C,H,oe,be,Pe){this.type=C,this.operator=H,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Pe;Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=It[0],er=It[1];this.labels.push(Ht),this.outputs.push(er)}};iu.interpolationFactor=function(C,H,oe,be){var Pe=0;if(C.name==="exponential")Pe=Vf(H,C.base,oe,be);else if(C.name==="linear")Pe=Vf(H,1,oe,be);else if(C.name==="cubic-bezier"){var Ne=C.controlPoints,ft=new o(Ne[0],Ne[1],Ne[2],Ne[3]);Pe=ft.solve(Vf(H,1,oe,be))}return Pe},iu.parse=function(C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=C.slice(3);if(!Array.isArray(be)||be.length===0)return H.error("Expected an interpolation type expression.",1);if(be[0]==="linear")be={name:"linear"};else if(be[0]==="exponential"){var ft=be[1];if(typeof ft!="number")return H.error("Exponential interpolation requires a numeric base.",1,1);be={name:"exponential",base:ft}}else if(be[0]==="cubic-bezier"){var It=be.slice(1);if(It.length!==4||It.some(function(ii){return typeof ii!="number"||ii<0||ii>1}))return H.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return H.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return H.error("Expected an even number of arguments.");if(Pe=H.parse(Pe,2,_n),!Pe)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Rs:H.expectedType&&H.expectedType.kind!=="value"&&(er=H.expectedType);for(var Lr=0;Lr<Ne.length;Lr+=2){var Zr=Ne[Lr],Vr=Ne[Lr+1],ua=Lr+3,Fa=Lr+4;if(typeof Zr!="number")return H.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ua);if(Ht.length&&Ht[Ht.length-1][0]>=Zr)return H.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=H.parse(Vr,Fa,er);if(!Mi)return null;er=er||Mi.type,Ht.push([Zr,Mi])}return er.kind!=="number"&&er.kind!=="color"&&!(er.kind==="array"&&er.itemType.kind==="number"&&typeof er.N=="number")?H.error("Type "+Ss(er)+" is not interpolatable."):new iu(er,oe,be,Pe,Ht)},iu.prototype.evaluate=function(C){var H=this.labels,oe=this.outputs;if(H.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=H[0])return oe[0].evaluate(C);var Pe=H.length;if(be>=H[Pe-1])return oe[Pe-1].evaluate(C);var Ne=yu(H,be),ft=H[Ne],It=H[Ne+1],Ht=iu.interpolationFactor(this.interpolation,be,ft,It),er=oe[Ne].evaluate(C),Lr=oe[Ne+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](er,Lr,Ht):this.operator==="interpolate-hcl"?Kc.reverse(Kc.interpolate(Kc.forward(er),Kc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},iu.prototype.eachChild=function(C){C(this.input);for(var H=0,oe=this.outputs;H<oe.length;H+=1){var be=oe[H];C(be)}},iu.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})},iu.prototype.serialize=function(){var C;this.interpolation.name==="linear"?C=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?C=["linear"]:C=["exponential",this.interpolation.base]:C=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var H=[this.operator,C,this.input.serialize()],oe=0;oe<this.labels.length;oe++)H.push(this.labels[oe],this.outputs[oe].serialize());return H};function Vf(k,C,H,oe){var be=oe-H,Pe=k-H;return be===0?0:C===1?Pe/be:(Math.pow(C,Pe)-1)/(Math.pow(C,be)-1)}var Xu=function(C,H){this.type=C,this.args=H};Xu.parse=function(C,H){if(C.length<2)return H.error("Expectected at least one argument.");var oe=null,be=H.expectedType;be&&be.kind!=="value"&&(oe=be);for(var Pe=[],Ne=0,ft=C.slice(1);Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=H.parse(It,1+Pe.length,oe,void 0,{typeAnnotation:"omit"});if(!Ht)return null;oe=oe||Ht.type,Pe.push(Ht)}var er=be&&Pe.some(function(Lr){return su(be,Lr.type)});return er?new Xu(uo,Pe):new Xu(oe,Pe)},Xu.prototype.evaluate=function(C){for(var H=null,oe=0,be,Pe=0,Ne=this.args;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];if(oe++,H=ft.evaluate(C),H&&H instanceof Pl&&!H.available&&(be||(be=H.name),H=null,oe===this.args.length&&(H=be)),H!==null)break}return H},Xu.prototype.eachChild=function(C){this.args.forEach(C)},Xu.prototype.outputDefined=function(){return this.args.every(function(C){return C.outputDefined()})},Xu.prototype.serialize=function(){var C=["coalesce"];return this.eachChild(function(H){C.push(H.serialize())}),C};var Cc=function(C,H){this.type=H.type,this.bindings=[].concat(C),this.result=H};Cc.prototype.evaluate=function(C){return this.result.evaluate(C)},Cc.prototype.eachChild=function(C){for(var H=0,oe=this.bindings;H<oe.length;H+=1){var be=oe[H];C(be[1])}C(this.result)},Cc.parse=function(C,H){if(C.length<4)return H.error("Expected at least 3 arguments, but found "+(C.length-1)+" instead.");for(var oe=[],be=1;be<C.length-1;be+=2){var Pe=C[be];if(typeof Pe!="string")return H.error("Expected string, but found "+typeof Pe+" instead.",be);if(/[^a-zA-Z0-9_]/.test(Pe))return H.error("Variable names must contain only alphanumeric characters or '_'.",be);var Ne=H.parse(C[be+1],be+1);if(!Ne)return null;oe.push([Pe,Ne])}var ft=H.parse(C[C.length-1],C.length-1,H.expectedType,oe);return ft?new Cc(oe,ft):null},Cc.prototype.outputDefined=function(){return this.result.outputDefined()},Cc.prototype.serialize=function(){for(var C=["let"],H=0,oe=this.bindings;H<oe.length;H+=1){var be=oe[H],Pe=be[0],Ne=be[1];C.push(Pe,Ne.serialize())}return C.push(this.result.serialize()),C};var gc=function(C,H,oe){this.type=C,this.index=H,this.input=oe};gc.parse=function(C,H){if(C.length!==3)return H.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,_n),be=H.parse(C[2],2,us(H.expectedType||uo));if(!oe||!be)return null;var Pe=be.type;return new gc(Pe.itemType,oe,be)},gc.prototype.evaluate=function(C){var H=this.index.evaluate(C),oe=this.input.evaluate(C);if(H<0)throw new Zs("Array index out of bounds: "+H+" < 0.");if(H>=oe.length)throw new Zs("Array index out of bounds: "+H+" > "+(oe.length-1)+".");if(H!==Math.floor(H))throw new Zs("Array index must be an integer, but found "+H+" instead.");return oe[H]},gc.prototype.eachChild=function(C){C(this.index),C(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ql=function(C,H){this.type=bo,this.needle=C,this.haystack=H};ql.parse=function(C,H){if(C.length!==3)return H.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[bo,Lo,_n,il,uo])?new ql(oe,be):H.error("Expected first argument to be of type boolean, string, number or null, but found "+Ss(oe.type)+" instead")},ql.prototype.evaluate=function(C){var H=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(H,["boolean","string","number","null"]))throw new Zs("Expected first argument to be of type boolean, string, number or null, but found "+Ss(nl(H))+" instead.");if(!du(oe,["string","array"]))throw new Zs("Expected second argument to be of type array or string, but found "+Ss(nl(oe))+" instead.");return oe.indexOf(H)>=0},ql.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},ql.prototype.outputDefined=function(){return!0},ql.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,H,oe){this.type=_n,this.needle=C,this.haystack=H,this.fromIndex=oe};xu.parse=function(C,H){if(C.length<=2||C.length>=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[bo,Lo,_n,il,uo]))return H.error("Expected first argument to be of type boolean, string, number or null, but found "+Ss(oe.type)+" instead");if(C.length===4){var Pe=H.parse(C[3],3,_n);return Pe?new xu(oe,be,Pe):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var H=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(H,["boolean","string","number","null"]))throw new Zs("Expected first argument to be of type boolean, string, number or null, but found "+Ss(nl(H))+" instead.");if(!du(oe,["string","array"]))throw new Zs("Expected second argument to be of type array or string, but found "+Ss(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(H,be)}return oe.indexOf(H)},xu.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Lc=function(C,H,oe,be,Pe,Ne){this.inputType=C,this.type=H,this.input=oe,this.cases=be,this.outputs=Pe,this.otherwise=Ne};Lc.parse=function(C,H){if(C.length<5)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return H.error("Expected an even number of arguments.");var oe,be;H.expectedType&&H.expectedType.kind!=="value"&&(be=H.expectedType);for(var Pe={},Ne=[],ft=2;ft<C.length-1;ft+=2){var It=C[ft],Ht=C[ft+1];Array.isArray(It)||(It=[It]);var er=H.concat(ft);if(It.length===0)return er.error("Expected at least one branch label.");for(var Lr=0,Zr=It;Lr<Zr.length;Lr+=1){var Vr=Zr[Lr];if(typeof Vr!="number"&&typeof Vr!="string")return er.error("Branch labels must be numbers or strings.");if(typeof Vr=="number"&&Math.abs(Vr)>Number.MAX_SAFE_INTEGER)return er.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return er.error("Numeric branch labels must be integer values.");if(!oe)oe=nl(Vr);else if(er.checkSubtype(oe,nl(Vr)))return null;if(typeof Pe[String(Vr)]<"u")return er.error("Branch labels must be unique.");Pe[String(Vr)]=Ne.length}var ua=H.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Fa=H.parse(C[1],1,uo);if(!Fa)return null;var Mi=H.parse(C[C.length-1],C.length-1,be);return!Mi||Fa.type.kind!=="value"&&H.concat(1).checkSubtype(oe,Fa.type)?null:new Lc(oe,be,Fa,Pe,Ne,Mi)},Lc.prototype.evaluate=function(C){var H=this.input.evaluate(C),oe=nl(H)===this.inputType&&this.outputs[this.cases[H]]||this.otherwise;return oe.evaluate(C)},Lc.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Lc.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Lc.prototype.serialize=function(){for(var C=this,H=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Pe={},Ne=0,ft=oe;Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=Pe[this.cases[It]];Ht===void 0?(Pe[this.cases[It]]=be.length,be.push([this.cases[It],[It]])):be[Ht][1].push(It)}for(var er=function(Fa){return C.inputType.kind==="number"?Number(Fa):Fa},Lr=0,Zr=be;Lr<Zr.length;Lr+=1){var Vr=Zr[Lr],Ht=Vr[0],ua=Vr[1];ua.length===1?H.push(er(ua[0])):H.push(ua.map(er)),H.push(this.outputs[outputIndex$1].serialize())}return H.push(this.otherwise.serialize()),H};var Jc=function(C,H,oe){this.type=C,this.branches=H,this.otherwise=oe};Jc.parse=function(C,H){if(C.length<4)return H.error("Expected at least 3 arguments, but found only "+(C.length-1)+".");if(C.length%2!==0)return H.error("Expected an odd number of arguments.");var oe;H.expectedType&&H.expectedType.kind!=="value"&&(oe=H.expectedType);for(var be=[],Pe=1;Pe<C.length-1;Pe+=2){var Ne=H.parse(C[Pe],Pe,bo);if(!Ne)return null;var ft=H.parse(C[Pe+1],Pe+1,oe);if(!ft)return null;be.push([Ne,ft]),oe=oe||ft.type}var It=H.parse(C[C.length-1],C.length-1,oe);return It?new Jc(oe,be,It):null},Jc.prototype.evaluate=function(C){for(var H=0,oe=this.branches;H<oe.length;H+=1){var be=oe[H],Pe=be[0],Ne=be[1];if(Pe.evaluate(C))return Ne.evaluate(C)}return this.otherwise.evaluate(C)},Jc.prototype.eachChild=function(C){for(var H=0,oe=this.branches;H<oe.length;H+=1){var be=oe[H],Pe=be[0],Ne=be[1];C(Pe),C(Ne)}C(this.otherwise)},Jc.prototype.outputDefined=function(){return this.branches.every(function(C){var H=C[0],oe=C[1];return oe.outputDefined()})&&this.otherwise.outputDefined()},Jc.prototype.serialize=function(){var C=["case"];return this.eachChild(function(H){C.push(H.serialize())}),C};var sc=function(C,H,oe,be){this.type=C,this.input=H,this.beginIndex=oe,this.endIndex=be};sc.parse=function(C,H){if(C.length<=2||C.length>=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,_n);if(!oe||!be)return null;if(!Tc(oe.type,[us(uo),Lo,uo]))return H.error("Expected first argument to be of type array or string, but found "+Ss(oe.type)+" instead");if(C.length===4){var Pe=H.parse(C[3],3,_n);return Pe?new sc(oe.type,oe,be,Pe):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var H=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(H,["string","array"]))throw new Zs("Expected first argument to be of type array or string, but found "+Ss(nl(H))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return H.slice(oe,be)}return H.slice(oe)},sc.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Pc(k,C){return k==="=="||k==="!="?C.kind==="boolean"||C.kind==="string"||C.kind==="number"||C.kind==="null"||C.kind==="value":C.kind==="string"||C.kind==="number"||C.kind==="value"}function Qt(k,C,H){return C===H}function br(k,C,H){return C!==H}function aa(k,C,H){return C<H}function $r(k,C,H){return C>H}function ka(k,C,H){return C<=H}function li(k,C,H){return C>=H}function Ci(k,C,H,oe){return oe.compare(C,H)===0}function Hi(k,C,H,oe){return!Ci(k,C,H,oe)}function Qi(k,C,H,oe){return oe.compare(C,H)<0}function pn(k,C,H,oe){return oe.compare(C,H)>0}function Pi(k,C,H,oe){return oe.compare(C,H)<=0}function Di(k,C,H,oe){return oe.compare(C,H)>=0}function Ni(k,C,H){var oe=k!=="=="&&k!=="!=";return function(){function be(Pe,Ne,ft){this.type=bo,this.lhs=Pe,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Pe.type.kind==="value"||Ne.type.kind==="value"}return be.parse=function(Ne,ft){if(Ne.length!==3&&Ne.length!==4)return ft.error("Expected two or three arguments.");var It=Ne[0],Ht=ft.parse(Ne[1],1,uo);if(!Ht)return null;if(!Pc(It,Ht.type))return ft.concat(1).error('"'+It+`" comparisons are not supported for type '`+Ss(Ht.type)+"'.");var er=ft.parse(Ne[2],2,uo);if(!er)return null;if(!Pc(It,er.type))return ft.concat(2).error('"'+It+`" comparisons are not supported for type '`+Ss(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Ss(Ht.type)+"' and '"+Ss(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new Ul(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new Ul(Ht.type,[er])));var Lr=null;if(Ne.length===4){if(Ht.type.kind!=="string"&&er.type.kind!=="string"&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot use collator to compare non-string types.");if(Lr=ft.parse(Ne[3],3,vl),!Lr)return null}return new be(Ht,er,Lr)},be.prototype.evaluate=function(Ne){var ft=this.lhs.evaluate(Ne),It=this.rhs.evaluate(Ne);if(oe&&this.hasUntypedArgument){var Ht=nl(ft),er=nl(It);if(Ht.kind!==er.kind||!(Ht.kind==="string"||Ht.kind==="number"))throw new Zs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Ht.kind+", "+er.kind+") instead.")}if(this.collator&&!oe&&this.hasUntypedArgument){var Lr=nl(ft),Zr=nl(It);if(Lr.kind!=="string"||Zr.kind!=="string")return C(Ne,ft,It)}return this.collator?H(Ne,ft,It,this.collator.evaluate(Ne)):C(Ne,ft,It)},be.prototype.eachChild=function(Ne){Ne(this.lhs),Ne(this.rhs),this.collator&&Ne(this.collator)},be.prototype.outputDefined=function(){return!0},be.prototype.serialize=function(){var Ne=[k];return this.eachChild(function(ft){Ne.push(ft.serialize())}),Ne},be}()}var mi=Ni("==",Qt,Ci),Sn=Ni("!=",br,Hi),$n=Ni("<",aa,Qi),no=Ni(">",$r,pn),Qn=Ni("<=",ka,Pi),co=Ni(">=",li,Di),Tn=function(C,H,oe,be,Pe){this.type=Lo,this.number=C,this.locale=H,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Pe};Tn.parse=function(C,H){if(C.length!==3)return H.error("Expected two arguments.");var oe=H.parse(C[1],1,_n);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return H.error("NumberFormat options argument must be an object.");var Pe=null;if(be.locale&&(Pe=H.parse(be.locale,1,Lo),!Pe))return null;var Ne=null;if(be.currency&&(Ne=H.parse(be.currency,1,Lo),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=H.parse(be["min-fraction-digits"],1,_n),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=H.parse(be["max-fraction-digits"],1,_n),!It)?null:new Tn(oe,Pe,Ne,ft,It)},Tn.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},Tn.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},Tn.prototype.outputDefined=function(){return!1},Tn.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var un=function(C){this.type=_n,this.input=C};un.parse=function(C,H){if(C.length!==2)return H.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?H.error("Expected argument of type string or array, but found "+Ss(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var H=this.input.evaluate(C);if(typeof H=="string")return H.length;if(Array.isArray(H))return H.length;throw new Zs("Expected value to be of type string or array, but found "+Ss(nl(H))+" instead.")},un.prototype.eachChild=function(C){C(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var C=["length"];return this.eachChild(function(H){C.push(H.serialize())}),C};var go={"==":mi,"!=":Sn,">":no,"<":$n,">=":co,"<=":Qn,array:Ul,at:gc,boolean:Ul,case:Jc,coalesce:Xu,collator:Vu,format:qu,image:fl,in:ql,"index-of":xu,interpolate:iu,"interpolate-hcl":iu,"interpolate-lab":iu,length:un,let:Cc,literal:bs,match:Lc,number:Ul,"number-format":Tn,object:Ul,slice:sc,step:Tu,string:Ul,"to-boolean":ss,"to-color":ss,"to-number":ss,"to-string":ss,var:Mc,within:Cu};function Ko(k,C){var H=C[0],oe=C[1],be=C[2],Pe=C[3];H=H.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Pe?Pe.evaluate(k):1,ft=ic(H,oe,be,Ne);if(ft)throw new Zs(ft);return new Bs(H/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function Ms(k,C){return k in C}function rl(k,C){var H=C[k];return typeof H>"u"?null:H}function Ns(k,C,H,oe){for(;H<=oe;){var be=H+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:H=be+1}return!1}function el(k){return{type:k}}to.register(go,{error:[Gs,[Lo],function(k,C){var H=C[0];throw new Zs(H.evaluate(k))}],typeof:[Lo,[uo],function(k,C){var H=C[0];return Ss(nl(H.evaluate(k)))}],"to-rgba":[us(_n,4),[Rs],function(k,C){var H=C[0];return H.evaluate(k).toArray()}],rgb:[Rs,[_n,_n,_n],Ko],rgba:[Rs,[_n,_n,_n,_n],Ko],has:{type:bo,overloads:[[[Lo],function(k,C){var H=C[0];return Ms(H.evaluate(k),k.properties())}],[[Lo,pu],function(k,C){var H=C[0],oe=C[1];return Ms(H.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Lo],function(k,C){var H=C[0];return rl(H.evaluate(k),k.properties())}],[[Lo,pu],function(k,C){var H=C[0],oe=C[1];return rl(H.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Lo],function(k,C){var H=C[0];return rl(H.evaluate(k),k.featureState||{})}],properties:[pu,[],function(k){return k.properties()}],"geometry-type":[Lo,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[_n,[],function(k){return k.globals.zoom}],"heatmap-density":[_n,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[_n,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[_n,el(_n),function(k,C){for(var H=0,oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe];H+=Pe.evaluate(k)}return H}],"*":[_n,el(_n),function(k,C){for(var H=1,oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe];H*=Pe.evaluate(k)}return H}],"-":{type:_n,overloads:[[[_n,_n],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)-oe.evaluate(k)}],[[_n],function(k,C){var H=C[0];return-H.evaluate(k)}]]},"/":[_n,[_n,_n],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)/oe.evaluate(k)}],"%":[_n,[_n,_n],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)%oe.evaluate(k)}],ln2:[_n,[],function(){return Math.LN2}],pi:[_n,[],function(){return Math.PI}],e:[_n,[],function(){return Math.E}],"^":[_n,[_n,_n],function(k,C){var H=C[0],oe=C[1];return Math.pow(H.evaluate(k),oe.evaluate(k))}],sqrt:[_n,[_n],function(k,C){var H=C[0];return Math.sqrt(H.evaluate(k))}],log10:[_n,[_n],function(k,C){var H=C[0];return Math.log(H.evaluate(k))/Math.LN10}],ln:[_n,[_n],function(k,C){var H=C[0];return Math.log(H.evaluate(k))}],log2:[_n,[_n],function(k,C){var H=C[0];return Math.log(H.evaluate(k))/Math.LN2}],sin:[_n,[_n],function(k,C){var H=C[0];return Math.sin(H.evaluate(k))}],cos:[_n,[_n],function(k,C){var H=C[0];return Math.cos(H.evaluate(k))}],tan:[_n,[_n],function(k,C){var H=C[0];return Math.tan(H.evaluate(k))}],asin:[_n,[_n],function(k,C){var H=C[0];return Math.asin(H.evaluate(k))}],acos:[_n,[_n],function(k,C){var H=C[0];return Math.acos(H.evaluate(k))}],atan:[_n,[_n],function(k,C){var H=C[0];return Math.atan(H.evaluate(k))}],min:[_n,el(_n),function(k,C){return Math.min.apply(Math,C.map(function(H){return H.evaluate(k)}))}],max:[_n,el(_n),function(k,C){return Math.max.apply(Math,C.map(function(H){return H.evaluate(k)}))}],abs:[_n,[_n],function(k,C){var H=C[0];return Math.abs(H.evaluate(k))}],round:[_n,[_n],function(k,C){var H=C[0],oe=H.evaluate(k);return oe<0?-Math.round(-oe):Math.round(oe)}],floor:[_n,[_n],function(k,C){var H=C[0];return Math.floor(H.evaluate(k))}],ceil:[_n,[_n],function(k,C){var H=C[0];return Math.ceil(H.evaluate(k))}],"filter-==":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1];return k.properties()[H.value]===oe.value}],"filter-id-==":[bo,[uo],function(k,C){var H=C[0];return k.id()===H.value}],"filter-type-==":[bo,[Lo],function(k,C){var H=C[0];return k.geometryType()===H.value}],"filter-<":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be<Pe}],"filter-id-<":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe<be}],"filter->":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be>Pe}],"filter-id->":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be<=Pe}],"filter-id-<=":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be>=Pe}],"filter-id->=":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[bo,[uo],function(k,C){var H=C[0];return H.value in k.properties()}],"filter-has-id":[bo,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[bo,[us(Lo)],function(k,C){var H=C[0];return H.value.indexOf(k.geometryType())>=0}],"filter-id-in":[bo,[us(uo)],function(k,C){var H=C[0];return H.value.indexOf(k.id())>=0}],"filter-in-small":[bo,[Lo,us(uo)],function(k,C){var H=C[0],oe=C[1];return oe.value.indexOf(k.properties()[H.value])>=0}],"filter-in-large":[bo,[Lo,us(uo)],function(k,C){var H=C[0],oe=C[1];return Ns(k.properties()[H.value],oe.value,0,oe.value.length-1)}],all:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)&&oe.evaluate(k)}],[el(bo),function(k,C){for(var H=0,oe=C;H<oe.length;H+=1){var be=oe[H];if(!be.evaluate(k))return!1}return!0}]]},any:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)||oe.evaluate(k)}],[el(bo),function(k,C){for(var H=0,oe=C;H<oe.length;H+=1){var be=oe[H];if(be.evaluate(k))return!0}return!1}]]},"!":[bo,[bo],function(k,C){var H=C[0];return!H.evaluate(k)}],"is-supported-script":[bo,[Lo],function(k,C){var H=C[0],oe=k.globals&&k.globals.isSupportedScript;return oe?oe(H.evaluate(k)):!0}],upcase:[Lo,[Lo],function(k,C){var H=C[0];return H.evaluate(k).toUpperCase()}],downcase:[Lo,[Lo],function(k,C){var H=C[0];return H.evaluate(k).toLowerCase()}],concat:[Lo,el(uo),function(k,C){return C.map(function(H){return ml(H.evaluate(k))}).join("")}],"resolved-locale":[Lo,[vl],function(k,C){var H=C[0];return H.evaluate(k).resolvedLocale()}]});function ws(k){return{result:"success",value:k}}function Fl(k){return{result:"error",value:k}}function _l(k){return k["property-type"]==="data-driven"||k["property-type"]==="cross-faded-data-driven"}function ll(k){return!!k.expression&&k.expression.parameters.indexOf("zoom")>-1}function jn(k){return!!k.expression&&k.expression.interpolated}function Io(k){return k instanceof Number?"number":k instanceof String?"string":k instanceof Boolean?"boolean":Array.isArray(k)?"array":k===null?"null":typeof k}function Js(k){return typeof k=="object"&&k!==null&&!Array.isArray(k)}function Ds(k){return k}function uu(k,C){var H=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Pe=oe||!be,Ne=k.type||(jn(C)?"exponential":"interval");if(H&&(k=xs({},k),k.stops&&(k.stops=k.stops.map(function(Un){return[Un[0],Bs.parse(Un[1])]})),k.default?k.default=Bs.parse(k.default):k.default=Bs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var ft,It,Ht;if(Ne==="exponential")ft=bu;else if(Ne==="interval")ft=Ic;else if(Ne==="categorical"){ft=Zu,It=Object.create(null);for(var er=0,Lr=k.stops;er<Lr.length;er+=1){var Zr=Lr[er];It[Zr[0]]=Zr[1]}Ht=typeof k.stops[0][0]}else if(Ne==="identity")ft=Rc;else throw new Error('Unknown function type "'+Ne+'"');if(oe){for(var Vr={},ua=[],Fa=0;Fa<k.stops.length;Fa++){var Mi=k.stops[Fa],ii=Mi[0].zoom;Vr[ii]===void 0&&(Vr[ii]={zoom:ii,type:k.type,property:k.property,default:k.default,stops:[]},ua.push(ii)),Vr[ii].stops.push([Mi[0].value,Mi[1]])}for(var $i=[],Oi=0,Ji=ua;Oi<Ji.length;Oi+=1){var ln=Ji[Oi];$i.push([Vr[ln].zoom,uu(Vr[ln],C)])}var wn={name:"linear"};return{kind:"composite",interpolationType:wn,interpolationFactor:iu.interpolationFactor.bind(void 0,wn),zoomStops:$i.map(function(Un){return Un[0]}),evaluate:function(Mo,so){var mo=Mo.zoom;return bu({stops:$i,base:k.base},C,mo).evaluate(mo,so)}}}else if(Pe){var Vn=Ne==="exponential"?{name:"exponential",base:k.base!==void 0?k.base:1}:null;return{kind:"camera",interpolationType:Vn,interpolationFactor:iu.interpolationFactor.bind(void 0,Vn),zoomStops:k.stops.map(function(Un){return Un[0]}),evaluate:function(Un){var Mo=Un.zoom;return ft(k,C,Mo,It,Ht)}}}else return{kind:"source",evaluate:function(Mo,so){var mo=so&&so.properties?so.properties[k.property]:void 0;return mo===void 0?Iu(k.default,C.default):ft(k,C,mo,It,Ht)}}}function Iu(k,C,H){if(k!==void 0)return k;if(C!==void 0)return C;if(H!==void 0)return H}function Zu(k,C,H,oe,be){var Pe=typeof H===be?oe[H]:void 0;return Iu(Pe,k.default,C.default)}function Ic(k,C,H){if(Io(H)!=="number")return Iu(k.default,C.default);var oe=k.stops.length;if(oe===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[oe-1][0])return k.stops[oe-1][1];var be=yu(k.stops.map(function(Pe){return Pe[0]}),H);return k.stops[be][1]}function bu(k,C,H){var oe=k.base!==void 0?k.base:1;if(Io(H)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[be-1][0])return k.stops[be-1][1];var Pe=yu(k.stops.map(function(Lr){return Lr[0]}),H),Ne=Au(H,oe,k.stops[Pe][0],k.stops[Pe+1][0]),ft=k.stops[Pe][1],It=k.stops[Pe+1][1],Ht=Bu[C.type]||Ds;if(k.colorSpace&&k.colorSpace!=="rgb"){var er=Lf[k.colorSpace];Ht=function(Lr,Zr){return er.reverse(er.interpolate(er.forward(Lr),er.forward(Zr),Ne))}}return typeof ft.evaluate=="function"?{evaluate:function(){for(var Zr=[],Vr=arguments.length;Vr--;)Zr[Vr]=arguments[Vr];var ua=ft.evaluate.apply(void 0,Zr),Fa=It.evaluate.apply(void 0,Zr);if(!(ua===void 0||Fa===void 0))return Ht(ua,Fa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,H){return C.type==="color"?H=Bs.parse(H):C.type==="formatted"?H=lu.fromString(H.toString()):C.type==="resolvedImage"?H=Pl.fromString(H.toString()):Io(H)!==C.type&&(C.type!=="enum"||!C.values[H])&&(H=void 0),Iu(H,k.default,C.default)}function Au(k,C,H,oe){var be=oe-H,Pe=k-H;return be===0?0:C===1?Pe/be:(Math.pow(C,Pe)-1)/(Math.pow(C,be)-1)}var yc=function(C,H){this.expression=C,this._warningHistory={},this._evaluator=new ks,this._defaultValue=H?Me(H):null,this._enumValues=H&&H.type==="enum"?H.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._evaluator.globals=C,this._evaluator.feature=H,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Pe||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){this._evaluator.globals=C,this._evaluator.feature=H||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Pe||null,this._evaluator.formattedSection=Ne||null;try{var ft=this.expression.evaluate(this._evaluator);if(ft==null||typeof ft=="number"&&ft!==ft)return this._defaultValue;if(this._enumValues&&!(ft in this._enumValues))throw new Zs("Expected value to be one of "+Object.keys(this._enumValues).map(function(It){return JSON.stringify(It)}).join(", ")+", but found "+JSON.stringify(ft)+" instead.");return ft}catch(It){return this._warningHistory[It.message]||(this._warningHistory[It.message]=!0,typeof console<"u"&&console.warn(It.message)),this._defaultValue}};function fo(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in go}function zo(k,C){var H=new ol(go,[],C?Te(C):void 0),oe=H.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?ws(new yc(oe,C)):Fl(H.errors)}var Dc=function(C,H){this.kind=C,this._styleExpression=H,this.isStateDependent=C!=="constant"&&!yl(H.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,H,oe,be,Pe,Ne)},Dc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluate(C,H,oe,be,Pe,Ne)};var lc=function(C,H,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=H,this.isStateDependent=C!=="camera"&&!yl(H.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,H,oe,be,Pe,Ne)},lc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluate(C,H,oe,be,Pe,Ne)},lc.prototype.interpolationFactor=function(C,H,oe){return this.interpolationType?iu.interpolationFactor(this.interpolationType,C,H,oe):0};function Yu(k,C){if(k=zo(k,C),k.result==="error")return k;var H=k.value.expression,oe=jf(H);if(!oe&&!_l(C))return Fl([new ds("","data expressions not supported")]);var be=Lu(H,["zoom"]);if(!be&&!ll(C))return Fl([new ds("","zoom expressions not supported")]);var Pe=ie(H);if(!Pe&&!be)return Fl([new ds("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Pe instanceof ds)return Fl([Pe]);if(Pe instanceof iu&&!jn(C))return Fl([new ds("",'"interpolate" expressions cannot be used with this property')]);if(!Pe)return ws(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Pe instanceof iu?Pe.interpolation:void 0;return ws(oe?new lc("camera",k.value,Pe.labels,Ne):new lc("composite",k.value,Pe.labels,Ne))}var Fe=function(C,H){this._parameters=C,this._specification=H,xs(this,uu(this._parameters,this._specification))};Fe.deserialize=function(C){return new Fe(C._parameters,C._specification)},Fe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Fe(k,C);if(fo(k)){var H=Yu(k,C);if(H.result==="error")throw new Error(H.value.map(function(be){return be.key+": "+be.message}).join(", "));return H.value}else{var oe=k;return typeof k=="string"&&C.type==="color"&&(oe=Bs.parse(k)),{kind:"constant",evaluate:function(){return oe}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var H=0,oe=k.args;H<oe.length;H+=1){var be=oe[H];if(C=ie(be),C)break}else(k instanceof Tu||k instanceof iu)&&k.input instanceof to&&k.input.name==="zoom"&&(C=k);return C instanceof ds||k.eachChild(function(Pe){var Ne=ie(Pe);Ne instanceof ds?C=Ne:!C&&Ne?C=new ds("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):C&&Ne&&C!==Ne&&(C=new ds("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),C}function Te(k){var C={color:Rs,string:Lo,number:_n,enum:Lo,boolean:bo,formatted:As,resolvedImage:qs};return k.type==="array"?us(C[k.value]||uo,k.length):C[k.type]}function Me(k){return k.type==="color"&&Js(k.default)?new Bs(0,0,0,0):k.type==="color"?Bs.parse(k.default)||null:k.default===void 0?null:k.default}function ze(k){var C=k.key,H=k.value,oe=k.valueSpec||{},be=k.objectElementValidators||{},Pe=k.style,Ne=k.styleSpec,ft=[],It=Io(H);if(It!=="object")return[new Pn(C,H,"object expected, "+It+" found")];for(var Ht in H){var er=Ht.split(".")[0],Lr=oe[er]||oe["*"],Zr=void 0;if(be[er])Zr=be[er];else if(oe[er])Zr=So;else if(be["*"])Zr=be["*"];else if(oe["*"])Zr=So;else{ft.push(new Pn(C,H[Ht],'unknown property "'+Ht+'"'));continue}ft=ft.concat(Zr({key:(C&&C+".")+Ht,value:H[Ht],valueSpec:Lr,style:Pe,styleSpec:Ne,object:H,objectKey:Ht},H))}for(var Vr in oe)be[Vr]||oe[Vr].required&&oe[Vr].default===void 0&&H[Vr]===void 0&&ft.push(new Pn(C,H,'missing required property "'+Vr+'"'));return ft}function ht(k){var C=k.value,H=k.valueSpec,oe=k.style,be=k.styleSpec,Pe=k.key,Ne=k.arrayElementValidator||So;if(Io(C)!=="array")return[new Pn(Pe,C,"array expected, "+Io(C)+" found")];if(H.length&&C.length!==H.length)return[new Pn(Pe,C,"array length "+H.length+" expected, length "+C.length+" found")];if(H["min-length"]&&C.length<H["min-length"])return[new Pn(Pe,C,"array length at least "+H["min-length"]+" expected, length "+C.length+" found")];var ft={type:H.value,values:H.values};be.$version<7&&(ft.function=H.function),Io(H.value)==="object"&&(ft=H.value);for(var It=[],Ht=0;Ht<C.length;Ht++)It=It.concat(Ne({array:C,arrayIndex:Ht,value:C[Ht],valueSpec:ft,style:oe,styleSpec:be,key:Pe+"["+Ht+"]"}));return It}function wt(k){var C=k.key,H=k.value,oe=k.valueSpec,be=Io(H);return be==="number"&&H!==H&&(be="NaN"),be!=="number"?[new Pn(C,H,"number expected, "+be+" found")]:"minimum"in oe&&H<oe.minimum?[new Pn(C,H,H+" is less than the minimum value "+oe.minimum)]:"maximum"in oe&&H>oe.maximum?[new Pn(C,H,H+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,H=Hn(k.value.type),oe,be={},Pe,Ne,ft=H!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Io(k.value.stops)==="array"&&Io(k.value.stops[0])==="array"&&Io(k.value.stops[0][0])==="object",er=ze({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Lr,default:ua}});return H==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),H!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),H==="exponential"&&k.valueSpec.expression&&!jn(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!_l(k.valueSpec)?er.push(new Pn(k.key,k.value,"property functions not supported")):ft&&!ll(k.valueSpec)&&er.push(new Pn(k.key,k.value,"zoom functions not supported"))),(H==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Fa){if(H==="identity")return[new Pn(Fa.key,Fa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Fa.value;return Mi=Mi.concat(ht({key:Fa.key,value:ii,valueSpec:Fa.valueSpec,style:Fa.style,styleSpec:Fa.styleSpec,arrayElementValidator:Zr})),Io(ii)==="array"&&ii.length===0&&Mi.push(new Pn(Fa.key,ii,"array must have at least one stop")),Mi}function Zr(Fa){var Mi=[],ii=Fa.value,$i=Fa.key;if(Io(ii)!=="array")return[new Pn($i,ii,"array expected, "+Io(ii)+" found")];if(ii.length!==2)return[new Pn($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Ht){if(Io(ii[0])!=="object")return[new Pn($i,ii,"object expected, "+Io(ii[0])+" found")];if(ii[0].zoom===void 0)return[new Pn($i,ii,"object stop key must have zoom")];if(ii[0].value===void 0)return[new Pn($i,ii,"object stop key must have value")];if(Ne&&Ne>Hn(ii[0].zoom))return[new Pn($i,ii[0].zoom,"stop zoom values must appear in ascending order")];Hn(ii[0].zoom)!==Ne&&(Ne=Hn(ii[0].zoom),Pe=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Fa.style,styleSpec:Fa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Fa.style,styleSpec:Fa.styleSpec},ii));return fo(Os(ii[1]))?Mi.concat([new Pn($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(So({key:$i+"[1]",value:ii[1],valueSpec:C,style:Fa.style,styleSpec:Fa.styleSpec}))}function Vr(Fa,Mi){var ii=Io(Fa.value),$i=Hn(Fa.value),Oi=Fa.value!==null?Fa.value:Mi;if(!oe)oe=ii;else if(ii!==oe)return[new Pn(Fa.key,Oi,ii+" stop domain type must match previous stop domain type "+oe)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Pn(Fa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ii!=="number"&&H!=="categorical"){var Ji="number expected, "+ii+" found";return _l(C)&&H===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Fa.key,Oi,Ji)]}return H==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Fa.key,Oi,"integer expected, found "+$i)]:H!=="categorical"&&ii==="number"&&Pe!==void 0&&$i<Pe?[new Pn(Fa.key,Oi,"stop domain values must appear in ascending order")]:(Pe=$i,H==="categorical"&&$i in be?[new Pn(Fa.key,Oi,"stop domain values must be unique")]:(be[$i]=!0,[]))}function ua(Fa){return So({key:Fa.key,value:Fa.value,valueSpec:C,style:Fa.style,styleSpec:Fa.styleSpec})}}function $t(k){var C=(k.expressionContext==="property"?Yu:zo)(Os(k.value),k.valueSpec);if(C.result==="error")return C.value.map(function(oe){return new Pn(""+k.key+oe.key,k.value,oe.message)});var H=C.value.expression||C.value._styleExpression.expression;if(k.expressionContext==="property"&&k.propertyKey==="text-font"&&!H.outputDefined())return[new Pn(k.key,k.value,'Invalid data expression for "'+k.propertyKey+'". Output values must be contained as literals within the expression.')];if(k.expressionContext==="property"&&k.propertyType==="layout"&&!yl(H))return[new Pn(k.key,k.value,'"feature-state" data expressions are not supported with layout properties.')];if(k.expressionContext==="filter"&&!yl(H))return[new Pn(k.key,k.value,'"feature-state" data expressions are not supported with filters.')];if(k.expressionContext&&k.expressionContext.indexOf("cluster")===0){if(!Lu(H,["zoom","feature-state"]))return[new Pn(k.key,k.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(k.expressionContext==="cluster-initial"&&!jf(H))return[new Pn(k.key,k.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Tr(k){var C=k.value,H=k.key,oe=Io(C);return oe!=="boolean"?[new Pn(H,C,"boolean expected, "+oe+" found")]:[]}function Ar(k){var C=k.key,H=k.value,oe=Io(H);return oe!=="string"?[new Pn(C,H,"color expected, "+oe+" found")]:Uc(H)===null?[new Pn(C,H,'color expected, "'+H+'" found')]:[]}function Kr(k){var C=k.key,H=k.value,oe=k.valueSpec,be=[];return Array.isArray(oe.values)?oe.values.indexOf(Hn(H))===-1&&be.push(new Pn(C,H,"expected one of ["+oe.values.join(", ")+"], "+JSON.stringify(H)+" found")):Object.keys(oe.values).indexOf(Hn(H))===-1&&be.push(new Pn(C,H,"expected one of ["+Object.keys(oe.values).join(", ")+"], "+JSON.stringify(H)+" found")),be}function na(k){if(k===!0||k===!1)return!0;if(!Array.isArray(k)||k.length===0)return!1;switch(k[0]){case"has":return k.length>=2&&k[1]!=="$id"&&k[1]!=="$type";case"in":return k.length>=3&&(typeof k[1]!="string"||Array.isArray(k[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return k.length!==3||Array.isArray(k[1])||Array.isArray(k[2]);case"any":case"all":for(var C=0,H=k.slice(1);C<H.length;C+=1){var oe=H[C];if(!na(oe)&&typeof oe!="boolean")return!1}return!0;default:return!0}}var Ve={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function $e(k){if(k==null)return{filter:function(){return!0},needGeometry:!1};na(k)||(k=Et(k));var C=zo(k,Ve);if(C.result==="error")throw new Error(C.value.map(function(oe){return oe.key+": "+oe.message}).join(", "));var H=pt(k);return{filter:function(oe,be,Pe){return C.value.evaluate(oe,be,{},Pe)},needGeometry:H}}function ot(k,C){return k<C?-1:k>C?1:0}function pt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C<k.length;C++)if(pt(k[C]))return!0;return!1}function Et(k){if(!k)return!0;var C=k[0];if(k.length<=1)return C!=="any";var H=C==="=="?bt(k[1],k[2],"=="):C==="!="?kr(bt(k[1],k[2],"==")):C==="<"||C===">"||C==="<="||C===">="?bt(k[1],k[2],C):C==="any"?Rt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(kr)):C==="in"?lr(k[1],k.slice(2)):C==="!in"?kr(lr(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?kr(yr(k[1])):C==="within"?k:!0;return H}function bt(k,C,H){switch(k){case"$type":return["filter-type-"+H,C];case"$id":return["filter-id-"+H,C];default:return["filter-"+H,k,C]}}function Rt(k){return["any"].concat(k.map(Et))}function lr(k,C){if(C.length===0)return!1;switch(k){case"$type":return["filter-type-in",["literal",C]];case"$id":return["filter-id-in",["literal",C]];default:return C.length>200&&!C.some(function(H){return typeof H!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(ot)]]:["filter-in-small",k,["literal",C]]}}function yr(k){switch(k){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",k]}}function kr(k){return["!",k]}function jr(k){return na(Os(k.value))?$t(xs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,H=k.key;if(Io(C)!=="array")return[new Pn(H,C,"array expected, "+Io(C)+" found")];var oe=k.styleSpec,be,Pe=[];if(C.length<1)return[new Pn(H,C,"filter array must have at least 1 element")];switch(Pe=Pe.concat(Kr({key:H+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),Hn(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&Hn(C[1])==="$type"&&Pe.push(new Pn(H,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Pe.push(new Pn(H,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Io(C[1]),be!=="string"&&Pe.push(new Pn(H+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne<C.length;Ne++)be=Io(C[Ne]),Hn(C[1])==="$type"?Pe=Pe.concat(Kr({key:H+"["+Ne+"]",value:C[Ne],valueSpec:oe.geometry_type,style:k.style,styleSpec:k.styleSpec})):be!=="string"&&be!=="number"&&be!=="boolean"&&Pe.push(new Pn(H+"["+Ne+"]",C[Ne],"string, number, or boolean expected, "+be+" found"));break;case"any":case"all":case"none":for(var ft=1;ft<C.length;ft++)Pe=Pe.concat(Qr({key:H+"["+ft+"]",value:C[ft],style:k.style,styleSpec:k.styleSpec}));break;case"has":case"!has":be=Io(C[1]),C.length!==2?Pe.push(new Pn(H,C,'filter array for "'+C[0]+'" operator must have 2 elements')):be!=="string"&&Pe.push(new Pn(H+"[1]",C[1],"string expected, "+be+" found"));break;case"within":be=Io(C[1]),C.length!==2?Pe.push(new Pn(H,C,'filter array for "'+C[0]+'" operator must have 2 elements')):be!=="object"&&Pe.push(new Pn(H+"[1]",C[1],"object expected, "+be+" found"));break}return Pe}function ha(k,C){var H=k.key,oe=k.style,be=k.styleSpec,Pe=k.value,Ne=k.objectKey,ft=be[C+"_"+k.layerType];if(!ft)return[];var It=Ne.match(/^(.*)-transition$/);if(C==="paint"&&It&&ft[It[1]]&&ft[It[1]].transition)return So({key:H,value:Pe,valueSpec:be.transition,style:oe,styleSpec:be});var Ht=k.valueSpec||ft[Ne];if(!Ht)return[new Pn(H,Pe,'unknown property "'+Ne+'"')];var er;if(Io(Pe)==="string"&&_l(Ht)&&!Ht.tokens&&(er=/^{([^}]+)}$/.exec(Pe)))return[new Pn(H,Pe,'"'+Ne+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(er[1])+" }`.")];var Lr=[];return k.layerType==="symbol"&&(Ne==="text-field"&&oe&&!oe.glyphs&&Lr.push(new Pn(H,Pe,'use of "text-field" requires a style "glyphs" property')),Ne==="text-font"&&Js(Os(Pe))&&Hn(Pe.type)==="identity"&&Lr.push(new Pn(H,Pe,'"text-font" does not support identity functions'))),Lr.concat(So({key:k.key,value:Pe,valueSpec:Ht,style:oe,styleSpec:be,expressionContext:"property",propertyType:C,propertyKey:Ne}))}function Aa(k){return ha(k,"paint")}function Da(k){return ha(k,"layout")}function ci(k){var C=[],H=k.value,oe=k.key,be=k.style,Pe=k.styleSpec;!H.type&&!H.ref&&C.push(new Pn(oe,H,'either "type" or "ref" is required'));var Ne=Hn(H.type),ft=Hn(H.ref);if(H.id)for(var It=Hn(H.id),Ht=0;Ht<k.arrayIndex;Ht++){var er=be.layers[Ht];Hn(er.id)===It&&C.push(new Pn(oe,H.id,'duplicate layer id "'+H.id+'", previously used at line '+er.id.__line__))}if("ref"in H){["type","source","source-layer","filter","layout"].forEach(function(ua){ua in H&&C.push(new Pn(oe,H[ua],'"'+ua+'" is prohibited for ref layers'))});var Lr;be.layers.forEach(function(ua){Hn(ua.id)===ft&&(Lr=ua)}),Lr?Lr.ref?C.push(new Pn(oe,H.ref,"ref cannot reference another ref layer")):Ne=Hn(Lr.type):C.push(new Pn(oe,H.ref,'ref layer "'+ft+'" not found'))}else if(Ne!=="background")if(!H.source)C.push(new Pn(oe,H,'missing required property "source"'));else{var Zr=be.sources&&be.sources[H.source],Vr=Zr&&Hn(Zr.type);Zr?Vr==="vector"&&Ne==="raster"?C.push(new Pn(oe,H.source,'layer "'+H.id+'" requires a raster source')):Vr==="raster"&&Ne!=="raster"?C.push(new Pn(oe,H.source,'layer "'+H.id+'" requires a vector source')):Vr==="vector"&&!H["source-layer"]?C.push(new Pn(oe,H,'layer "'+H.id+'" must specify a "source-layer"')):Vr==="raster-dem"&&Ne!=="hillshade"?C.push(new Pn(oe,H.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ne==="line"&&H.paint&&H.paint["line-gradient"]&&(Vr!=="geojson"||!Zr.lineMetrics)&&C.push(new Pn(oe,H,'layer "'+H.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):C.push(new Pn(oe,H.source,'source "'+H.source+'" not found'))}return C=C.concat(ze({key:oe,value:H,valueSpec:Pe.layer,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return So({key:oe+".type",value:H.type,valueSpec:Pe.layer.type,style:k.style,styleSpec:k.styleSpec,object:H,objectKey:"type"})},filter:jr,layout:function(Fa){return ze({layer:H,key:Fa.key,value:Fa.value,style:Fa.style,styleSpec:Fa.styleSpec,objectElementValidators:{"*":function(ii){return Da(xs({layerType:Ne},ii))}}})},paint:function(Fa){return ze({layer:H,key:Fa.key,value:Fa.value,style:Fa.style,styleSpec:Fa.styleSpec,objectElementValidators:{"*":function(ii){return Aa(xs({layerType:Ne},ii))}}})}}})),C}function Vi(k){var C=k.value,H=k.key,oe=Io(C);return oe!=="string"?[new Pn(H,C,"string expected, "+oe+" found")]:[]}var ji={promoteId:An};function on(k){var C=k.value,H=k.key,oe=k.styleSpec,be=k.style;if(!C.type)return[new Pn(H,C,'"type" is required')];var Pe=Hn(C.type),Ne;switch(Pe){case"vector":case"raster":case"raster-dem":return Ne=ze({key:H,value:C,valueSpec:oe["source_"+Pe.replace("-","_")],style:k.style,styleSpec:oe,objectElementValidators:ji}),Ne;case"geojson":if(Ne=ze({key:H,value:C,valueSpec:oe.source_geojson,style:be,styleSpec:oe,objectElementValidators:ji}),C.cluster)for(var ft in C.clusterProperties){var It=C.clusterProperties[ft],Ht=It[0],er=It[1],Lr=typeof Ht=="string"?[Ht,["accumulated"],["get",ft]]:Ht;Ne.push.apply(Ne,$t({key:H+"."+ft+".map",value:er,expressionContext:"cluster-map"})),Ne.push.apply(Ne,$t({key:H+"."+ft+".reduce",value:Lr,expressionContext:"cluster-reduce"}))}return Ne;case"video":return ze({key:H,value:C,valueSpec:oe.source_video,style:be,styleSpec:oe});case"image":return ze({key:H,value:C,valueSpec:oe.source_image,style:be,styleSpec:oe});case"canvas":return[new Pn(H,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Kr({key:H+".type",value:C.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:be,styleSpec:oe})}}function An(k){var C=k.key,H=k.value;if(Io(H)==="string")return Vi({key:C,value:H});var oe=[];for(var be in H)oe.push.apply(oe,Vi({key:C+"."+be,value:H[be]}));return oe}function Yn(k){var C=k.value,H=k.styleSpec,oe=H.light,be=k.style,Pe=[],Ne=Io(C);if(C===void 0)return Pe;if(Ne!=="object")return Pe=Pe.concat([new Pn("light",C,"object expected, "+Ne+" found")]),Pe;for(var ft in C){var It=ft.match(/^(.*)-transition$/);It&&oe[It[1]]&&oe[It[1]].transition?Pe=Pe.concat(So({key:ft,value:C[ft],valueSpec:H.transition,style:be,styleSpec:H})):oe[ft]?Pe=Pe.concat(So({key:ft,value:C[ft],valueSpec:oe[ft],style:be,styleSpec:H})):Pe=Pe.concat([new Pn(ft,C[ft],'unknown property "'+ft+'"')])}return Pe}function Nn(k){return Vi(k).length===0?[]:$t(k)}function wo(k){return Vi(k).length===0?[]:$t(k)}var os={"*":function(){return[]},array:ht,boolean:Tr,number:wt,color:Ar,constants:js,enum:Kr,filter:jr,function:Ot,layer:ci,object:ze,source:on,light:Yn,string:Vi,formatted:Nn,resolvedImage:wo};function So(k){var C=k.value,H=k.valueSpec,oe=k.styleSpec;if(H.expression&&Js(Hn(C)))return Ot(k);if(H.expression&&fo(Os(C)))return $t(k);if(H.type&&os[H.type])return os[H.type](k);var be=ze(xs({},k,{valueSpec:H.type?oe[H.type]:H}));return be}function Zo(k){var C=k.value,H=k.key,oe=Vi(k);return oe.length||(C.indexOf("{fontstack}")===-1&&oe.push(new Pn(H,C,'"glyphs" url must include a "{fontstack}" token')),C.indexOf("{range}")===-1&&oe.push(new Pn(H,C,'"glyphs" url must include a "{range}" token'))),oe}function hs(k,C){C===void 0&&(C=Gi);var H=[];return H=H.concat(So({key:"",value:k,valueSpec:C.$root,styleSpec:C,style:k,objectElementValidators:{glyphs:Zo,"*":function(){return[]}}})),k.constants&&(H=H.concat(js({key:"constants",value:k.constants,style:k,styleSpec:C}))),ul(H)}hs.source=tl(on),hs.light=tl(Yn),hs.layer=tl(ci),hs.filter=tl(jr),hs.paintProperty=tl(Aa),hs.layoutProperty=tl(Da);function ul(k){return[].concat(k).sort(function(C,H){return C.line-H.line})}function tl(k){return function(){for(var C=[],H=arguments.length;H--;)C[H]=arguments[H];return ul(k.apply(this,C))}}var Jo=hs,$o=Jo.light,Il=Jo.paintProperty,eu=Jo.layoutProperty;function Ru(k,C){var H=!1;if(C&&C.length)for(var oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe];k.fire(new Cr(new Error(Pe.message))),H=!0}return H}var vu=cu,Tl=3;function cu(k,C,H){var oe=this.cells=[];if(k instanceof ArrayBuffer){this.arrayBuffer=k;var be=new Int32Array(this.arrayBuffer);k=be[0],C=be[1],H=be[2],this.d=C+2*H;for(var Pe=0;Pe<this.d*this.d;Pe++){var Ne=be[Tl+Pe],ft=be[Tl+Pe+1];oe.push(Ne===ft?null:be.subarray(Ne,ft))}var It=be[Tl+oe.length],Ht=be[Tl+oe.length+1];this.keys=be.subarray(It,Ht),this.bboxes=be.subarray(Ht),this.insert=this._insertReadonly}else{this.d=C+2*H;for(var er=0;er<this.d*this.d;er++)oe.push([]);this.keys=[],this.bboxes=[]}this.n=C,this.extent=k,this.padding=H,this.scale=C/k,this.uid=0;var Lr=H/C*k;this.min=-Lr,this.max=k+Lr}cu.prototype.insert=function(k,C,H,oe,be){this._forEachCell(C,H,oe,be,this._insertCell,this.uid++),this.keys.push(k),this.bboxes.push(C),this.bboxes.push(H),this.bboxes.push(oe),this.bboxes.push(be)},cu.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},cu.prototype._insertCell=function(k,C,H,oe,be,Pe){this.cells[be].push(Pe)},cu.prototype.query=function(k,C,H,oe,be){var Pe=this.min,Ne=this.max;if(k<=Pe&&C<=Pe&&Ne<=H&&Ne<=oe&&!be)return Array.prototype.slice.call(this.keys);var ft=[],It={};return this._forEachCell(k,C,H,oe,this._queryCell,ft,It,be),ft},cu.prototype._queryCell=function(k,C,H,oe,be,Pe,Ne,ft){var It=this.cells[be];if(It!==null)for(var Ht=this.keys,er=this.bboxes,Lr=0;Lr<It.length;Lr++){var Zr=It[Lr];if(Ne[Zr]===void 0){var Vr=Zr*4;(ft?ft(er[Vr+0],er[Vr+1],er[Vr+2],er[Vr+3]):k<=er[Vr+2]&&C<=er[Vr+3]&&H>=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Zr]=!0,Pe.push(Ht[Zr])):Ne[Zr]=!1}}},cu.prototype._forEachCell=function(k,C,H,oe,be,Pe,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(H),Lr=this._convertToCellCoord(oe),Zr=It;Zr<=er;Zr++)for(var Vr=Ht;Vr<=Lr;Vr++){var ua=this.d*Vr+Zr;if(!(ft&&!ft(this._convertFromCellCoord(Zr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Zr+1),this._convertFromCellCoord(Vr+1)))&&be.call(this,k,C,H,oe,ua,Pe,Ne,ft))return}},cu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},cu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},cu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=Tl+this.cells.length+1+1,H=0,oe=0;oe<this.cells.length;oe++)H+=this.cells[oe].length;var be=new Int32Array(C+H+this.keys.length+this.bboxes.length);be[0]=this.extent,be[1]=this.n,be[2]=this.padding;for(var Pe=C,Ne=0;Ne<k.length;Ne++){var ft=k[Ne];be[Tl+Ne]=Pe,be.set(ft,Pe),Pe+=ft.length}return be[Tl+k.length]=Pe,be.set(this.keys,Pe),Pe+=this.keys.length,be[Tl+k.length+1]=Pe,be.set(this.bboxes,Pe),Pe+=this.bboxes.length,be.buffer};var uc=s.ImageData,Vl=s.ImageBitmap,Gl={};function me(k,C,H){H===void 0&&(H={}),Object.defineProperty(C,"_classRegistryKey",{value:k,writeable:!1}),Gl[k]={klass:C,omit:H.omit||[],shallow:H.shallow||[]}}me("Object",Object),vu.serialize=function(C,H){var oe=C.toArrayBuffer();return H&&H.push(oe),{buffer:oe}},vu.deserialize=function(C){return new vu(C.buffer)},me("Grid",vu),me("Color",Bs),me("Error",Error),me("ResolvedImage",Pl),me("StylePropertyFunction",Fe),me("StyleExpression",yc,{omit:["_evaluator"]}),me("ZoomDependentExpression",lc),me("ZoomConstantExpression",Dc),me("CompoundExpression",to,{omit:["_evaluate"]});for(var De in go)go[De]._classRegistryKey||me("Expression_"+De,go[De]);function et(k){return k&&typeof ArrayBuffer<"u"&&(k instanceof ArrayBuffer||k.constructor&&k.constructor.name==="ArrayBuffer")}function dt(k){return Vl&&k instanceof Vl}function yt(k,C){if(k==null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||k instanceof Boolean||k instanceof Number||k instanceof String||k instanceof Date||k instanceof RegExp)return k;if(et(k)||dt(k))return C&&C.push(k),k;if(ArrayBuffer.isView(k)){var H=k;return C&&C.push(H.buffer),H}if(k instanceof uc)return C&&C.push(k.data.buffer),k;if(Array.isArray(k)){for(var oe=[],be=0,Pe=k;be<Pe.length;be+=1){var Ne=Pe[be];oe.push(yt(Ne,C))}return oe}if(typeof k=="object"){var ft=k.constructor,It=ft._classRegistryKey;if(!It)throw new Error("can't serialize object of unregistered class");var Ht=ft.serialize?ft.serialize(k,C):{};if(!ft.serialize){for(var er in k)if(k.hasOwnProperty(er)&&!(Gl[It].omit.indexOf(er)>=0)){var Lr=k[er];Ht[er]=Gl[It].shallow.indexOf(er)>=0?Lr:yt(Lr,C)}k instanceof Error&&(Ht.message=k.message)}if(Ht.$name)throw new Error("$name property is reserved for worker serialization logic.");return It!=="Object"&&(Ht.$name=It),Ht}throw new Error("can't serialize object of type "+typeof k)}function Tt(k){if(k==null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||k instanceof Boolean||k instanceof Number||k instanceof String||k instanceof Date||k instanceof RegExp||et(k)||dt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Tt);if(typeof k=="object"){var C=k.$name||"Object",H=Gl[C],oe=H.klass;if(!oe)throw new Error("can't deserialize unregistered class "+C);if(oe.deserialize)return oe.deserialize(k);for(var be=Object.create(oe.prototype),Pe=0,Ne=Object.keys(k);Pe<Ne.length;Pe+=1){var ft=Ne[Pe];if(ft!=="$name"){var It=k[ft];be[ft]=Gl[C].shallow.indexOf(ft)>=0?It:Tt(It)}}return be}throw new Error("can't deserialize object of type "+typeof k)}var tr=function(){this.first=!0};tr.prototype.update=function(C,H){var oe=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=H):this.lastFloorZoom<oe&&(this.lastIntegerZoom=oe,this.lastIntegerZoomTime=H),C!==this.lastZoom?(this.lastZoom=C,this.lastFloorZoom=oe,!0):!1)};var zt={"Latin-1 Supplement":function(k){return k>=128&&k<=255},Arabic:function(k){return k>=1536&&k<=1791},"Arabic Supplement":function(k){return k>=1872&&k<=1919},"Arabic Extended-A":function(k){return k>=2208&&k<=2303},"Hangul Jamo":function(k){return k>=4352&&k<=4607},"Unified Canadian Aboriginal Syllabics":function(k){return k>=5120&&k<=5759},Khmer:function(k){return k>=6016&&k<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(k){return k>=6320&&k<=6399},"General Punctuation":function(k){return k>=8192&&k<=8303},"Letterlike Symbols":function(k){return k>=8448&&k<=8527},"Number Forms":function(k){return k>=8528&&k<=8591},"Miscellaneous Technical":function(k){return k>=8960&&k<=9215},"Control Pictures":function(k){return k>=9216&&k<=9279},"Optical Character Recognition":function(k){return k>=9280&&k<=9311},"Enclosed Alphanumerics":function(k){return k>=9312&&k<=9471},"Geometric Shapes":function(k){return k>=9632&&k<=9727},"Miscellaneous Symbols":function(k){return k>=9728&&k<=9983},"Miscellaneous Symbols and Arrows":function(k){return k>=11008&&k<=11263},"CJK Radicals Supplement":function(k){return k>=11904&&k<=12031},"Kangxi Radicals":function(k){return k>=12032&&k<=12255},"Ideographic Description Characters":function(k){return k>=12272&&k<=12287},"CJK Symbols and Punctuation":function(k){return k>=12288&&k<=12351},Hiragana:function(k){return k>=12352&&k<=12447},Katakana:function(k){return k>=12448&&k<=12543},Bopomofo:function(k){return k>=12544&&k<=12591},"Hangul Compatibility Jamo":function(k){return k>=12592&&k<=12687},Kanbun:function(k){return k>=12688&&k<=12703},"Bopomofo Extended":function(k){return k>=12704&&k<=12735},"CJK Strokes":function(k){return k>=12736&&k<=12783},"Katakana Phonetic Extensions":function(k){return k>=12784&&k<=12799},"Enclosed CJK Letters and Months":function(k){return k>=12800&&k<=13055},"CJK Compatibility":function(k){return k>=13056&&k<=13311},"CJK Unified Ideographs Extension A":function(k){return k>=13312&&k<=19903},"Yijing Hexagram Symbols":function(k){return k>=19904&&k<=19967},"CJK Unified Ideographs":function(k){return k>=19968&&k<=40959},"Yi Syllables":function(k){return k>=40960&&k<=42127},"Yi Radicals":function(k){return k>=42128&&k<=42191},"Hangul Jamo Extended-A":function(k){return k>=43360&&k<=43391},"Hangul Syllables":function(k){return k>=44032&&k<=55215},"Hangul Jamo Extended-B":function(k){return k>=55216&&k<=55295},"Private Use Area":function(k){return k>=57344&&k<=63743},"CJK Compatibility Ideographs":function(k){return k>=63744&&k<=64255},"Arabic Presentation Forms-A":function(k){return k>=64336&&k<=65023},"Vertical Forms":function(k){return k>=65040&&k<=65055},"CJK Compatibility Forms":function(k){return k>=65072&&k<=65103},"Small Form Variants":function(k){return k>=65104&&k<=65135},"Arabic Presentation Forms-B":function(k){return k>=65136&&k<=65279},"Halfwidth and Fullwidth Forms":function(k){return k>=65280&&k<=65519}};function _r(k){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C];if(pa(oe.charCodeAt(0)))return!0}return!1}function Gr(k){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C];if(!Xr(oe.charCodeAt(0)))return!1}return!0}function Xr(k){return!(zt.Arabic(k)||zt["Arabic Supplement"](k)||zt["Arabic Extended-A"](k)||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k))}function xa(k){return k<11904?!1:!!(zt["Bopomofo Extended"](k)||zt.Bopomofo(k)||zt["CJK Compatibility Forms"](k)||zt["CJK Compatibility Ideographs"](k)||zt["CJK Compatibility"](k)||zt["CJK Radicals Supplement"](k)||zt["CJK Strokes"](k)||zt["CJK Symbols and Punctuation"](k)||zt["CJK Unified Ideographs Extension A"](k)||zt["CJK Unified Ideographs"](k)||zt["Enclosed CJK Letters and Months"](k)||zt["Halfwidth and Fullwidth Forms"](k)||zt.Hiragana(k)||zt["Ideographic Description Characters"](k)||zt["Kangxi Radicals"](k)||zt["Katakana Phonetic Extensions"](k)||zt.Katakana(k)||zt["Vertical Forms"](k)||zt["Yi Radicals"](k)||zt["Yi Syllables"](k))}function pa(k){return k===746||k===747?!0:k<4352?!1:!!(zt["Bopomofo Extended"](k)||zt.Bopomofo(k)||zt["CJK Compatibility Forms"](k)&&!(k>=65097&&k<=65103)||zt["CJK Compatibility Ideographs"](k)||zt["CJK Compatibility"](k)||zt["CJK Radicals Supplement"](k)||zt["CJK Strokes"](k)||zt["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||zt["CJK Unified Ideographs Extension A"](k)||zt["CJK Unified Ideographs"](k)||zt["Enclosed CJK Letters and Months"](k)||zt["Hangul Compatibility Jamo"](k)||zt["Hangul Jamo Extended-A"](k)||zt["Hangul Jamo Extended-B"](k)||zt["Hangul Jamo"](k)||zt["Hangul Syllables"](k)||zt.Hiragana(k)||zt["Ideographic Description Characters"](k)||zt.Kanbun(k)||zt["Kangxi Radicals"](k)||zt["Katakana Phonetic Extensions"](k)||zt.Katakana(k)&&k!==12540||zt["Halfwidth and Fullwidth Forms"](k)&&k!==65288&&k!==65289&&k!==65293&&!(k>=65306&&k<=65310)&&k!==65339&&k!==65341&&k!==65343&&!(k>=65371&&k<=65503)&&k!==65507&&!(k>=65512&&k<=65519)||zt["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||zt["Unified Canadian Aboriginal Syllabics"](k)||zt["Unified Canadian Aboriginal Syllabics Extended"](k)||zt["Vertical Forms"](k)||zt["Yijing Hexagram Symbols"](k)||zt["Yi Syllables"](k)||zt["Yi Radicals"](k))}function Ja(k){return!!(zt["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||zt["General Punctuation"](k)&&(k===8214||k===8224||k===8225||k===8240||k===8241||k===8251||k===8252||k===8258||k===8263||k===8264||k===8265||k===8273)||zt["Letterlike Symbols"](k)||zt["Number Forms"](k)||zt["Miscellaneous Technical"](k)&&(k>=8960&&k<=8967||k>=8972&&k<=8991||k>=8996&&k<=9e3||k===9003||k>=9085&&k<=9114||k>=9150&&k<=9165||k===9167||k>=9169&&k<=9179||k>=9186&&k<=9215)||zt["Control Pictures"](k)&&k!==9251||zt["Optical Character Recognition"](k)||zt["Enclosed Alphanumerics"](k)||zt["Geometric Shapes"](k)||zt["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||zt["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||zt["CJK Symbols and Punctuation"](k)||zt.Katakana(k)||zt["Private Use Area"](k)||zt["CJK Compatibility Forms"](k)||zt["Small Form Variants"](k)||zt["Halfwidth and Fullwidth Forms"](k)||k===8734||k===8756||k===8757||k>=9984&&k<=10087||k>=10102&&k<=10131||k===65532||k===65533)}function ti(k){return!(pa(k)||Ja(k))}function Sa(k){return zt.Arabic(k)||zt["Arabic Supplement"](k)||zt["Arabic Extended-A"](k)||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function za(k){return k>=1424&&k<=2303||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&za(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||zt.Khmer(k))}function fi(k){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C];if(za(oe.charCodeAt(0)))return!0}return!1}function ni(k,C){for(var H=0,oe=k;H<oe.length;H+=1){var be=oe[H];if(!Xa(be.charCodeAt(0),C))return!1}return!0}var La={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},sn=null,rn=La.unavailable,dn=null,In=function(k){k&&typeof k=="string"&&k.indexOf("NetworkError")>-1&&(rn=La.error),sn&&sn(k)};function Kn(){ro.fire(new Br("pluginStateChange",{pluginStatus:rn,pluginURL:dn}))}var ro=new xr,Yo=function(){return rn},oo=function(k){return k({pluginStatus:rn,pluginURL:dn}),ro.on("pluginStateChange",k),k},Wo=function(k,C,H){if(H===void 0&&(H=!1),rn===La.deferred||rn===La.loading||rn===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),rn=La.deferred,sn=C,Kn(),H||cl()},cl=function(){if(rn!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");rn=La.loading,Kn(),dn&&ra({url:dn},function(k){k?In(k):(rn=La.loaded,Kn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return rn===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return rn===La.loading},setState:function(C){rn=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},xl=function(){!al.isLoading()&&!al.isLoaded()&&Yo()==="deferred"&&cl()},mn=function(C,H){this.zoom=C,H?(this.now=H.now,this.fadeDuration=H.fadeDuration,this.zoomHistory=H.zoomHistory,this.transition=H.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new tr,this.transition={})};mn.prototype.isSupportedScript=function(C){return ni(C,al.isLoaded())},mn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},mn.prototype.getCrossfadeParameters=function(){var C=this.zoom,H=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:H+(1-H)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*H}};var po=function(C,H){this.property=C,this.value=H,this.expression=I(H===void 0?C.specification.default:H,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,H,oe){return this.property.possiblyEvaluate(this,C,H,oe)};var cs=function(C){this.property=C,this.value=new po(C,void 0)};cs.prototype.transitioned=function(C,H){return new Al(this.property,this.value,H,g({},C.transition,this.transition),C.now)},cs.prototype.untransitioned=function(){return new Al(this.property,this.value,null,{},0)};var vs=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};vs.prototype.getValue=function(C){return O(this._values[C].value.value)},vs.prototype.setValue=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,H===null?void 0:O(H))},vs.prototype.getTransition=function(C){return O(this._values[C].transition)},vs.prototype.setTransition=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].transition=O(H)||void 0},vs.prototype.serialize=function(){for(var C={},H=0,oe=Object.keys(this._values);H<oe.length;H+=1){var be=oe[H],Pe=this.getValue(be);Pe!==void 0&&(C[be]=Pe);var Ne=this.getTransition(be);Ne!==void 0&&(C[be+"-transition"]=Ne)}return C},vs.prototype.transitioned=function(C,H){for(var oe=new Hl(this._properties),be=0,Pe=Object.keys(this._values);be<Pe.length;be+=1){var Ne=Pe[be];oe._values[Ne]=this._values[Ne].transitioned(C,H._values[Ne])}return oe},vs.prototype.untransitioned=function(){for(var C=new Hl(this._properties),H=0,oe=Object.keys(this._values);H<oe.length;H+=1){var be=oe[H];C._values[be]=this._values[be].untransitioned()}return C};var Al=function(C,H,oe,be,Pe){this.property=C,this.value=H,this.begin=Pe+be.delay||0,this.end=this.begin+be.duration||0,C.specification.transition&&(be.delay||be.duration)&&(this.prior=oe)};Al.prototype.possiblyEvaluate=function(C,H,oe){var be=C.now||0,Pe=this.value.possiblyEvaluate(C,H,oe),Ne=this.prior;if(Ne){if(be>this.end)return this.prior=null,Pe;if(this.value.isDataDriven())return this.prior=null,Pe;if(be<this.begin)return Ne.possiblyEvaluate(C,H,oe);var ft=(be-this.begin)/(this.end-this.begin);return this.property.interpolate(Ne.possiblyEvaluate(C,H,oe),Pe,v(ft))}else return Pe};var Hl=function(C){this._properties=C,this._values=Object.create(C.defaultTransitioningPropertyValues)};Hl.prototype.possiblyEvaluate=function(C,H,oe){for(var be=new _c(this._properties),Pe=0,Ne=Object.keys(this._values);Pe<Ne.length;Pe+=1){var ft=Ne[Pe];be._values[ft]=this._values[ft].possiblyEvaluate(C,H,oe)}return be},Hl.prototype.hasTransition=function(){for(var C=0,H=Object.keys(this._values);C<H.length;C+=1){var oe=H[C];if(this._values[oe].prior)return!0}return!1};var Su=function(C){this._properties=C,this._values=Object.create(C.defaultPropertyValues)};Su.prototype.getValue=function(C){return O(this._values[C].value)},Su.prototype.setValue=function(C,H){this._values[C]=new po(this._values[C].property,H===null?void 0:O(H))},Su.prototype.serialize=function(){for(var C={},H=0,oe=Object.keys(this._values);H<oe.length;H+=1){var be=oe[H],Pe=this.getValue(be);Pe!==void 0&&(C[be]=Pe)}return C},Su.prototype.possiblyEvaluate=function(C,H,oe){for(var be=new _c(this._properties),Pe=0,Ne=Object.keys(this._values);Pe<Ne.length;Pe+=1){var ft=Ne[Pe];be._values[ft]=this._values[ft].possiblyEvaluate(C,H,oe)}return be};var Rl=function(C,H,oe){this.property=C,this.value=H,this.parameters=oe};Rl.prototype.isConstant=function(){return this.value.kind==="constant"},Rl.prototype.constantOr=function(C){return this.value.kind==="constant"?this.value.value:C},Rl.prototype.evaluate=function(C,H,oe,be){return this.property.evaluate(this.value,this.parameters,C,H,oe,be)};var _c=function(C){this._properties=C,this._values=Object.create(C.defaultPossiblyEvaluatedValues)};_c.prototype.get=function(C){return this._values[C]};var it=function(C){this.specification=C};it.prototype.possiblyEvaluate=function(C,H){return C.expression.evaluate(H)},it.prototype.interpolate=function(C,H,oe){var be=Bu[this.specification.type];return be?be(C,H,oe):C};var Zt=function(C,H){this.specification=C,this.overrides=H};Zt.prototype.possiblyEvaluate=function(C,H,oe,be){return C.expression.kind==="constant"||C.expression.kind==="camera"?new Rl(this,{kind:"constant",value:C.expression.evaluate(H,null,{},oe,be)},H):new Rl(this,C.expression,H)},Zt.prototype.interpolate=function(C,H,oe){if(C.value.kind!=="constant"||H.value.kind!=="constant")return C;if(C.value.value===void 0||H.value.value===void 0)return new Rl(this,{kind:"constant",value:void 0},C.parameters);var be=Bu[this.specification.type];return be?new Rl(this,{kind:"constant",value:be(C.value.value,H.value.value,oe)},C.parameters):C},Zt.prototype.evaluate=function(C,H,oe,be,Pe,Ne){return C.kind==="constant"?C.value:C.evaluate(H,oe,be,Pe,Ne)};var cr=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(oe,be,Pe,Ne){if(oe.value===void 0)return new Rl(this,{kind:"constant",value:void 0},be);if(oe.expression.kind==="constant"){var ft=oe.expression.evaluate(be,null,{},Pe,Ne),It=oe.property.specification.type==="resolvedImage",Ht=It&&typeof ft!="string"?ft.name:ft,er=this._calculate(Ht,Ht,Ht,be);return new Rl(this,{kind:"constant",value:er},be)}else if(oe.expression.kind==="camera"){var Lr=this._calculate(oe.expression.evaluate({zoom:be.zoom-1}),oe.expression.evaluate({zoom:be.zoom}),oe.expression.evaluate({zoom:be.zoom+1}),be);return new Rl(this,{kind:"constant",value:Lr},be)}else return new Rl(this,oe.expression,be)},C.prototype.evaluate=function(oe,be,Pe,Ne,ft,It){if(oe.kind==="source"){var Ht=oe.evaluate(be,Pe,Ne,ft,It);return this._calculate(Ht,Ht,Ht,be)}else return oe.kind==="composite"?this._calculate(oe.evaluate({zoom:Math.floor(be.zoom)-1},Pe,Ne),oe.evaluate({zoom:Math.floor(be.zoom)},Pe,Ne),oe.evaluate({zoom:Math.floor(be.zoom)+1},Pe,Ne),be):oe.value},C.prototype._calculate=function(oe,be,Pe,Ne){var ft=Ne.zoom;return ft>Ne.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Pe,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Zt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,H,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Pe=C.expression.evaluate(H,null,{},oe,be);return this._calculate(Pe,Pe,Pe,H)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(H.zoom-1),H)),C.expression.evaluate(new mn(Math.floor(H.zoom),H)),C.expression.evaluate(new mn(Math.floor(H.zoom+1),H)),H)},oa.prototype._calculate=function(C,H,oe,be){var Pe=be.zoom;return Pe>be.zoomHistory.lastIntegerZoom?{from:C,to:H}:{from:oe,to:H}},oa.prototype.interpolate=function(C){return C};var wa=function(C){this.specification=C};wa.prototype.possiblyEvaluate=function(C,H,oe,be){return!!C.expression.evaluate(H,null,{},oe,be)},wa.prototype.interpolate=function(){return!1};var va=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var H in C){var oe=C[H];oe.specification.overridable&&this.overridableProperties.push(H);var be=this.defaultPropertyValues[H]=new po(oe,void 0),Pe=this.defaultTransitionablePropertyValues[H]=new cs(oe);this.defaultTransitioningPropertyValues[H]=Pe.untransitioned(),this.defaultPossiblyEvaluatedValues[H]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Zt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",cr),me("CrossFadedProperty",oa),me("ColorRampProperty",wa);var ya="-transition",Ya=function(k){function C(H,oe){if(k.call(this),this.id=H.id,this.type=H.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},H.type!=="custom"&&(H=H,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),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new vs(oe.paint);for(var be in H.paint)this.setPaintProperty(be,H.paint[be],{validate:!1});for(var Pe in H.layout)this.setLayoutProperty(Pe,H.layout[Pe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(oe.paint)}}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},C.prototype.getLayoutProperty=function(oe){return oe==="visibility"?this.visibility:this._unevaluatedLayout.getValue(oe)},C.prototype.setLayoutProperty=function(oe,be,Pe){if(Pe===void 0&&(Pe={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(eu,Ne,oe,be,Pe))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,ya)?this._transitionablePaint.getTransition(oe.slice(0,-ya.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Pe){if(Pe===void 0&&(Pe={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Pe))return!1}if(z(oe,ya))return this._transitionablePaint.setTransition(oe.slice(0,-ya.length),be||void 0),!1;var ft=this._transitionablePaint._values[oe],It=ft.property.specification["property-type"]==="cross-faded-data-driven",Ht=ft.value.isDataDriven(),er=ft.value;this._transitionablePaint.setValue(oe,be),this._handleSpecialPaintPropertyUpdate(oe);var Lr=this._transitionablePaint._values[oe].value,Zr=Lr.isDataDriven();return Zr||Ht||It||this._handleOverridablePaintPropertyUpdate(oe,er,Lr)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Pe){return!1},C.prototype.isHidden=function(oe){return this.minzoom&&oe<this.minzoom||this.maxzoom&&oe>=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(oe){this._transitioningPaint=this._transitionablePaint.transitioned(oe,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(oe,be){oe.getCrossfadeParameters&&(this._crossfadeParameters=oe.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(oe,void 0,be)),this.paint=this._transitioningPaint.possiblyEvaluate(oe,void 0,be)},C.prototype.serialize=function(){var oe={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(oe.layout=oe.layout||{},oe.layout.visibility=this.visibility),N(oe,function(be,Pe){return be!==void 0&&!(Pe==="layout"&&!Object.keys(be).length)&&!(Pe==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Pe,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(Jo,{key:be,layerType:this.type,objectKey:Pe,value:Ne,styleSpec:Gi,style:{glyphs:!0,sprite:!0}}))},C.prototype.is3D=function(){return!1},C.prototype.isTileClipped=function(){return!1},C.prototype.hasOffscreenPass=function(){return!1},C.prototype.resize=function(){},C.prototype.isStateDependent=function(){for(var oe in this.paint._values){var be=this.paint.get(oe);if(!(!(be instanceof Rl)||!_l(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(xr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,H){this._structArray=C,this._pos1=H*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},si=128,gn=5,zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};zi.serialize=function(C,H){return C._trim(),H&&(C.isTransferred=!0,H.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var H=Object.create(this.prototype);return H.arrayBuffer=C.arrayBuffer,H.length=C.length,H.capacity=C.arrayBuffer.byteLength/H.bytesPerElement,H._refreshViews(),H},zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zi.prototype.clear=function(){this.length=0},zi.prototype.resize=function(C){this.reserve(C),this.length=C},zi.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(this.capacity*gn),si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var H=this.uint8;this._refreshViews(),H&&this.uint8.set(H)}},zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Ei(k,C){C===void 0&&(C=1);var H=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=H=ea(H,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),H+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Pe=ea(H,Math.max(oe,C));return{members:be,size:Pe,alignment:C}}function Na(k){return bi[k].BYTES_PER_ELEMENT}function ea(k,C){return Math.ceil(k/C)*C}var Ma=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Pe,oe},C}(zi);Ma.prototype.bytesPerElement=4,me("StructArrayLayout2i4",Ma);var Qa=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Pe,this.int16[It+2]=Ne,this.int16[It+3]=ft,oe},C}(zi);Qa.prototype.bytesPerElement=8,me("StructArrayLayout4i8",Qa);var di=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);di.prototype.bytesPerElement=12,me("StructArrayLayout2i4i12",di);var Va=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.uint8[Lr+4]=Ne,this.uint8[Lr+5]=ft,this.uint8[Lr+6]=It,this.uint8[Lr+7]=Ht,oe},C}(zi);Va.prototype.bytesPerElement=8,me("StructArrayLayout2i4ub8",Va);var Bi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Pe,oe},C}(zi);Bi.prototype.bytesPerElement=8,me("StructArrayLayout2f8",Bi);var Li=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Pe,this.uint16[ua+2]=Ne,this.uint16[ua+3]=ft,this.uint16[ua+4]=It,this.uint16[ua+5]=Ht,this.uint16[ua+6]=er,this.uint16[ua+7]=Lr,this.uint16[ua+8]=Zr,this.uint16[ua+9]=Vr,oe},C}(zi);Li.prototype.bytesPerElement=20,me("StructArrayLayout10ui20",Li);var hn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua){var Fa=this.length;return this.resize(Fa+1),this.emplace(Fa,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Pe,this.int16[Mi+2]=Ne,this.int16[Mi+3]=ft,this.uint16[Mi+4]=It,this.uint16[Mi+5]=Ht,this.uint16[Mi+6]=er,this.uint16[Mi+7]=Lr,this.int16[Mi+8]=Zr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Fa,oe},C}(zi);hn.prototype.bytesPerElement=24,me("StructArrayLayout4i4ui4i24",hn);var Ha=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Pe,this.float32[ft+2]=Ne,oe},C}(zi);Ha.prototype.bytesPerElement=12,me("StructArrayLayout3f12",Ha);var Ua=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.uint32[Pe+0]=be,oe},C}(zi);Ua.prototype.bytesPerElement=4,me("StructArrayLayout1ul4",Ua);var Yi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,oe,be,Pe,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Pe,this.int16[Vr+2]=Ne,this.int16[Vr+3]=ft,this.int16[Vr+4]=It,this.int16[Vr+5]=Ht,this.uint32[ua+3]=er,this.uint16[Vr+8]=Lr,this.uint16[Vr+9]=Zr,oe},C}(zi);Yi.prototype.bytesPerElement=20,me("StructArrayLayout6i1ul2ui20",Yi);var Ri=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);Ri.prototype.bytesPerElement=12,me("StructArrayLayout2i2i2i12",Ri);var Ti=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Pe,Ne,ft)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Pe,this.float32[Ht+2]=Ne,this.int16[er+6]=ft,this.int16[er+7]=It,oe},C}(zi);Ti.prototype.bytesPerElement=16,me("StructArrayLayout2f1f2i16",Ti);var xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Pe,this.float32[Ht+1]=Ne,this.float32[Ht+2]=ft,oe},C}(zi);xi.prototype.bytesPerElement=12,me("StructArrayLayout2ub2f12",xi);var Xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Pe,this.uint16[ft+2]=Ne,oe},C}(zi);Xi.prototype.bytesPerElement=6,me("StructArrayLayout3ui6",Xi);var vn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji){var ln=oe*24,wn=oe*12,Vn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Pe,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[wn+2]=It,this.uint32[wn+3]=Ht,this.uint32[wn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[wn+7]=ua,this.float32[wn+8]=Fa,this.uint8[Vn+36]=Mi,this.uint8[Vn+37]=ii,this.uint8[Vn+38]=$i,this.uint32[wn+10]=Oi,this.int16[ln+22]=Ji,oe},C}(zi);vn.prototype.bytesPerElement=48,me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",vn);var Rn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro,$s){var Ts=oe*34,Xl=oe*17;return this.int16[Ts+0]=be,this.int16[Ts+1]=Pe,this.int16[Ts+2]=Ne,this.int16[Ts+3]=ft,this.int16[Ts+4]=It,this.int16[Ts+5]=Ht,this.int16[Ts+6]=er,this.int16[Ts+7]=Lr,this.uint16[Ts+8]=Zr,this.uint16[Ts+9]=Vr,this.uint16[Ts+10]=ua,this.uint16[Ts+11]=Fa,this.uint16[Ts+12]=Mi,this.uint16[Ts+13]=ii,this.uint16[Ts+14]=$i,this.uint16[Ts+15]=Oi,this.uint16[Ts+16]=Ji,this.uint16[Ts+17]=ln,this.uint16[Ts+18]=wn,this.uint16[Ts+19]=Vn,this.uint16[Ts+20]=Un,this.uint16[Ts+21]=Mo,this.uint16[Ts+22]=so,this.uint32[Xl+12]=mo,this.float32[Xl+13]=Cs,this.float32[Xl+14]=Eo,this.float32[Xl+15]=Ro,this.float32[Xl+16]=$s,oe},C}(zi);Rn.prototype.bytesPerElement=68,me("StructArrayLayout8i15ui1ul4f68",Rn);var Ii=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.float32[Pe+0]=be,oe},C}(zi);Ii.prototype.bytesPerElement=4,me("StructArrayLayout1f4",Ii);var nn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Pe,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var En=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Pe,this.uint16[It+3]=Ne,oe},C}(zi);En.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",En);var Dn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Pe,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Xn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.uint16[Pe+0]=be,oe},C}(zi);Xn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Xn);var zs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Pe,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);zs.prototype.bytesPerElement=16,me("StructArrayLayout4f16",zs);var bl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return H.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},H.x1.get=function(){return this._structArray.int16[this._pos2+2]},H.y1.get=function(){return this._structArray.int16[this._pos2+3]},H.x2.get=function(){return this._structArray.int16[this._pos2+4]},H.y2.get=function(){return this._structArray.int16[this._pos2+5]},H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,H),C}(yi);bl.prototype.size=20;var ho=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new bl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Wl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},H.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},H.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},H.segment.get=function(){return this._structArray.uint16[this._pos2+10]},H.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},H.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},H.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},H.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},H.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},H.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},H.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},H.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},H.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},H.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},H.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,H),C}(yi);Wl.prototype.size=48;var fs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Wl(this,oe)},C}(vn);me("PlacedSymbolArray",fs);var Sl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},H.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},H.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},H.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},H.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},H.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},H.key.get=function(){return this._structArray.uint16[this._pos2+8]},H.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},H.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},H.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},H.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},H.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},H.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},H.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},H.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},H.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},H.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},H.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},H.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},H.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},H.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},H.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},H.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},H.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},H.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,H),C}(yi);Sl.prototype.size=68;var kl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Sl(this,oe)},C}(Rn);me("SymbolInstanceArray",kl);var tu=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getoffsetX=function(oe){return this.float32[oe*1+0]},C}(Ii);me("GlyphOffsetArray",tu);var Vs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getx=function(oe){return this.int16[oe*3+0]},C.prototype.gety=function(oe){return this.int16[oe*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(oe){return this.int16[oe*3+2]},C}(nn);me("SymbolLineVertexArray",Vs);var pl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,H),C}(yi);pl.prototype.size=8;var wl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new pl(this,oe)},C}(En);me("FeatureIndexArray",wl);var Zn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),Cl=Zn.members,Po=function(C){C===void 0&&(C=[]),this.segments=C};Po.prototype.prepareSegment=function(C,H,oe,be){var Pe=this.segments[this.segments.length-1];return C>Po.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Po.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Pe||Pe.vertexLength+C>Po.MAX_VERTEX_ARRAY_LENGTH||Pe.sortKey!==be)&&(Pe={vertexOffset:H.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Pe.sortKey=be),this.segments.push(Pe)),Pe},Po.prototype.get=function(){return this.segments},Po.prototype.destroy=function(){for(var C=0,H=this.segments;C<H.length;C+=1){var oe=H[C];for(var be in oe.vaos)oe.vaos[be].destroy()}},Po.simpleSegment=function(C,H,oe,be){return new Po([{vertexOffset:C,primitiveOffset:H,vertexLength:oe,primitiveLength:be,vaos:{},sortKey:0}])},Po.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,me("SegmentVector",Po);function ge(k,C){return k=l(Math.floor(k),0,255),C=l(Math.floor(C),0,255),256*k+C}var K=Ei([{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"}]),xe=t(function(k){function C(H,oe){var be,Pe,Ne,ft,It,Ht,er,Lr;for(be=H.length&3,Pe=H.length-be,Ne=oe,It=3432918353,Ht=461845907,Lr=0;Lr<Pe;)er=H.charCodeAt(Lr)&255|(H.charCodeAt(++Lr)&255)<<8|(H.charCodeAt(++Lr)&255)<<16|(H.charCodeAt(++Lr)&255)<<24,++Lr,er=(er&65535)*It+(((er>>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er,Ne=Ne<<13|Ne>>>19,ft=(Ne&65535)*5+(((Ne>>>16)*5&65535)<<16)&4294967295,Ne=(ft&65535)+27492+(((ft>>>16)+58964&65535)<<16);switch(er=0,be){case 3:er^=(H.charCodeAt(Lr+2)&255)<<16;case 2:er^=(H.charCodeAt(Lr+1)&255)<<8;case 1:er^=H.charCodeAt(Lr)&255,er=(er&65535)*It+(((er>>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er}return Ne^=H.length,Ne^=Ne>>>16,Ne=(Ne&65535)*2246822507+(((Ne>>>16)*2246822507&65535)<<16)&4294967295,Ne^=Ne>>>13,Ne=(Ne&65535)*3266489909+(((Ne>>>16)*3266489909&65535)<<16)&4294967295,Ne^=Ne>>>16,Ne>>>0}k.exports=C}),te=t(function(k){function C(H,oe){for(var be=H.length,Pe=oe^be,Ne=0,ft;be>=4;)ft=H.charCodeAt(Ne)&255|(H.charCodeAt(++Ne)&255)<<8|(H.charCodeAt(++Ne)&255)<<16|(H.charCodeAt(++Ne)&255)<<24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),ft^=ft>>>24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Pe^=(H.charCodeAt(Ne+2)&255)<<16;case 2:Pe^=(H.charCodeAt(Ne+1)&255)<<8;case 1:Pe^=H.charCodeAt(Ne)&255,Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16)}return Pe^=Pe>>>13,Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16),Pe^=Pe>>>15,Pe>>>0}k.exports=C}),ye=xe,je=xe,ke=te;ye.murmur3=je,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,H,oe,be){this.ids.push(qt(C)),this.positions.push(H,oe,be)},Qe.prototype.getPositions=function(C){for(var H=qt(C),oe=0,be=this.ids.length-1;oe<be;){var Pe=oe+be>>1;this.ids[Pe]>=H?be=Pe:oe=Pe+1}for(var Ne=[];this.ids[oe]===H;){var ft=this.positions[3*oe],It=this.positions[3*oe+1],Ht=this.positions[3*oe+2];Ne.push({index:ft,start:It,end:Ht}),oe++}return Ne},Qe.serialize=function(C,H){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return wr(oe,be,0,oe.length-1),H&&H.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var H=new Qe;return H.ids=C.ids,H.positions=C.positions,H.indexed=!0,H};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function wr(k,C,H,oe){for(;H<oe;){for(var be=k[H+oe>>1],Pe=H-1,Ne=oe+1;;){do Pe++;while(k[Pe]<be);do Ne--;while(k[Ne]>be);if(Pe>=Ne)break;Nr(k,Pe,Ne),Nr(C,3*Pe,3*Ne),Nr(C,3*Pe+1,3*Ne+1),Nr(C,3*Pe+2,3*Ne+2)}Ne-H<oe-Ne?(wr(k,C,H,Ne),H=Ne+1):(wr(k,C,Ne+1,oe),oe=Ne)}}function Nr(k,C,H){var oe=k[C];k[C]=k[H],k[H]=oe}me("FeaturePositionMap",Qe);var pr=function(C,H){this.gl=C.gl,this.location=H},mt=function(k){function C(H,oe){k.call(this,H,oe),this.current=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){this.current!==oe&&(this.current=oe,this.gl.uniform1i(this.location,oe))},C}(pr),St=function(k){function C(H,oe){k.call(this,H,oe),this.current=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){this.current!==oe&&(this.current=oe,this.gl.uniform1f(this.location,oe))},C}(pr),Ft=function(k){function C(H,oe){k.call(this,H,oe),this.current=[0,0]}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1])&&(this.current=oe,this.gl.uniform2f(this.location,oe[0],oe[1]))},C}(pr),rr=function(k){function C(H,oe){k.call(this,H,oe),this.current=[0,0,0]}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1]||oe[2]!==this.current[2])&&(this.current=oe,this.gl.uniform3f(this.location,oe[0],oe[1],oe[2]))},C}(pr),hr=function(k){function C(H,oe){k.call(this,H,oe),this.current=[0,0,0,0]}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){(oe[0]!==this.current[0]||oe[1]!==this.current[1]||oe[2]!==this.current[2]||oe[3]!==this.current[3])&&(this.current=oe,this.gl.uniform4f(this.location,oe[0],oe[1],oe[2],oe[3]))},C}(pr),nr=function(k){function C(H,oe){k.call(this,H,oe),this.current=Bs.transparent}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){(oe.r!==this.current.r||oe.g!==this.current.g||oe.b!==this.current.b||oe.a!==this.current.a)&&(this.current=oe,this.gl.uniform4f(this.location,oe.r,oe.g,oe.b,oe.a))},C}(pr),dr=new Float32Array(16),or=function(k){function C(H,oe){k.call(this,H,oe),this.current=dr}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(oe){if(oe[12]!==this.current[12]||oe[0]!==this.current[0]){this.current=oe,this.gl.uniformMatrix4fv(this.location,!1,oe);return}for(var be=1;be<16;be++)if(oe[be]!==this.current[be]){this.current=oe,this.gl.uniformMatrix4fv(this.location,!1,oe);break}},C}(pr);function Wt(k){return[ge(255*k.r,255*k.g),ge(255*k.b,255*k.a)]}var ir=function(C,H,oe){this.value=C,this.uniformNames=H.map(function(be){return"u_"+be}),this.type=oe};ir.prototype.setUniform=function(C,H,oe){C.set(oe.constantOr(this.value))},ir.prototype.getBinding=function(C,H,oe){return this.type==="color"?new nr(C,H):new St(C,H)};var Vt=function(C,H){this.uniformNames=H.map(function(oe){return"u_"+oe}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Vt.prototype.setConstantPatternPositions=function(C,H){this.pixelRatioFrom=H.pixelRatio,this.pixelRatioTo=C.pixelRatio,this.patternFrom=H.tlbr,this.patternTo=C.tlbr},Vt.prototype.setUniform=function(C,H,oe,be){var Pe=be==="u_pattern_to"?this.patternTo:be==="u_pattern_from"?this.patternFrom:be==="u_pixel_ratio_to"?this.pixelRatioTo:be==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Pe&&C.set(Pe)},Vt.prototype.getBinding=function(C,H,oe){return oe.substr(0,9)==="u_pattern"?new hr(C,H):new St(C,H)};var Dr=function(C,H,oe,be){this.expression=C,this.type=oe,this.maxValue=0,this.paintVertexAttributes=H.map(function(Pe){return{name:"a_"+Pe,type:"Float32",components:oe==="color"?2:1,offset:0}}),this.paintVertexArray=new be};Dr.prototype.populatePaintArray=function(C,H,oe,be,Pe){var Ne=this.paintVertexArray.length,ft=this.expression.evaluate(new mn(0),H,{},be,[],Pe);this.paintVertexArray.resize(C),this._setPaintValue(Ne,C,ft)},Dr.prototype.updatePaintArray=function(C,H,oe,be){var Pe=this.expression.evaluate({zoom:0},oe,be);this._setPaintValue(C,H,Pe)},Dr.prototype._setPaintValue=function(C,H,oe){if(this.type==="color")for(var be=Wt(oe),Pe=C;Pe<H;Pe++)this.paintVertexArray.emplace(Pe,be[0],be[1]);else{for(var Ne=C;Ne<H;Ne++)this.paintVertexArray.emplace(Ne,oe);this.maxValue=Math.max(this.maxValue,Math.abs(oe))}},Dr.prototype.upload=function(C){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=C.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Dr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Jr=function(C,H,oe,be,Pe,Ne){this.expression=C,this.uniformNames=H.map(function(ft){return"u_"+ft+"_t"}),this.type=oe,this.useIntegerZoom=be,this.zoom=Pe,this.maxValue=0,this.paintVertexAttributes=H.map(function(ft){return{name:"a_"+ft,type:"Float32",components:oe==="color"?4:2,offset:0}}),this.paintVertexArray=new Ne};Jr.prototype.populatePaintArray=function(C,H,oe,be,Pe){var Ne=this.expression.evaluate(new mn(this.zoom),H,{},be,[],Pe),ft=this.expression.evaluate(new mn(this.zoom+1),H,{},be,[],Pe),It=this.paintVertexArray.length;this.paintVertexArray.resize(C),this._setPaintValue(It,C,Ne,ft)},Jr.prototype.updatePaintArray=function(C,H,oe,be){var Pe=this.expression.evaluate({zoom:this.zoom},oe,be),Ne=this.expression.evaluate({zoom:this.zoom+1},oe,be);this._setPaintValue(C,H,Pe,Ne)},Jr.prototype._setPaintValue=function(C,H,oe,be){if(this.type==="color")for(var Pe=Wt(oe),Ne=Wt(be),ft=C;ft<H;ft++)this.paintVertexArray.emplace(ft,Pe[0],Pe[1],Ne[0],Ne[1]);else{for(var It=C;It<H;It++)this.paintVertexArray.emplace(It,oe,be);this.maxValue=Math.max(this.maxValue,Math.abs(oe),Math.abs(be))}},Jr.prototype.upload=function(C){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=C.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Jr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Jr.prototype.setUniform=function(C,H){var oe=this.useIntegerZoom?Math.floor(H.zoom):H.zoom,be=l(this.expression.interpolationFactor(oe,this.zoom,this.zoom+1),0,1);C.set(be)},Jr.prototype.getBinding=function(C,H,oe){return new St(C,H)};var ga=function(C,H,oe,be,Pe,Ne){this.expression=C,this.type=H,this.useIntegerZoom=oe,this.zoom=be,this.layerId=Ne,this.zoomInPaintVertexArray=new Pe,this.zoomOutPaintVertexArray=new Pe};ga.prototype.populatePaintArray=function(C,H,oe){var be=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(C),this.zoomOutPaintVertexArray.resize(C),this._setPaintValues(be,C,H.patterns&&H.patterns[this.layerId],oe)},ga.prototype.updatePaintArray=function(C,H,oe,be,Pe){this._setPaintValues(C,H,oe.patterns&&oe.patterns[this.layerId],Pe)},ga.prototype._setPaintValues=function(C,H,oe,be){if(!(!be||!oe)){var Pe=oe.min,Ne=oe.mid,ft=oe.max,It=be[Pe],Ht=be[Ne],er=be[ft];if(!(!It||!Ht||!er))for(var Lr=C;Lr<H;Lr++)this.zoomInPaintVertexArray.emplace(Lr,Ht.tl[0],Ht.tl[1],Ht.br[0],Ht.br[1],It.tl[0],It.tl[1],It.br[0],It.br[1],Ht.pixelRatio,It.pixelRatio),this.zoomOutPaintVertexArray.emplace(Lr,Ht.tl[0],Ht.tl[1],Ht.br[0],Ht.br[1],er.tl[0],er.tl[1],er.br[0],er.br[1],Ht.pixelRatio,er.pixelRatio)}},ga.prototype.upload=function(C){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=C.createVertexBuffer(this.zoomInPaintVertexArray,K.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=C.createVertexBuffer(this.zoomOutPaintVertexArray,K.members,this.expression.isStateDependent))},ga.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var vi=function(C,H,oe){this.binders={},this._buffers=[];var be=[];for(var Pe in C.paint._values)if(oe(Pe)){var Ne=C.paint.get(Pe);if(!(!(Ne instanceof Rl)||!_l(Ne.property.specification))){var ft=ai(Pe,C.type),It=Ne.value,Ht=Ne.property.specification.type,er=Ne.property.useIntegerZoom,Lr=Ne.property.specification["property-type"],Zr=Lr==="cross-faded"||Lr==="cross-faded-data-driven";if(It.kind==="constant")this.binders[Pe]=Zr?new Vt(It.value,ft):new ir(It.value,ft,Ht),be.push("/u_"+Pe);else if(It.kind==="source"||Zr){var Vr=Fi(Pe,Ht,"source");this.binders[Pe]=Zr?new ga(It,Ht,er,H,Vr,C.id):new Dr(It,ft,Ht,Vr),be.push("/a_"+Pe)}else{var ua=Fi(Pe,Ht,"composite");this.binders[Pe]=new Jr(It,ft,Ht,er,H,ua),be.push("/z_"+Pe)}}}this.cacheKey=be.sort().join("")};vi.prototype.getMaxValue=function(C){var H=this.binders[C];return H instanceof Dr||H instanceof Jr?H.maxValue:0},vi.prototype.populatePaintArrays=function(C,H,oe,be,Pe){for(var Ne in this.binders){var ft=this.binders[Ne];(ft instanceof Dr||ft instanceof Jr||ft instanceof ga)&&ft.populatePaintArray(C,H,oe,be,Pe)}},vi.prototype.setConstantPatternPositions=function(C,H){for(var oe in this.binders){var be=this.binders[oe];be instanceof Vt&&be.setConstantPatternPositions(C,H)}},vi.prototype.updatePaintArrays=function(C,H,oe,be,Pe){var Ne=!1;for(var ft in C)for(var It=H.getPositions(ft),Ht=0,er=It;Ht<er.length;Ht+=1){var Lr=er[Ht],Zr=oe.feature(Lr.index);for(var Vr in this.binders){var ua=this.binders[Vr];if((ua instanceof Dr||ua instanceof Jr||ua instanceof ga)&&ua.expression.isStateDependent===!0){var Fa=be.paint.get(Vr);ua.expression=Fa.value,ua.updatePaintArray(Lr.start,Lr.end,Zr,C[ft],Pe),Ne=!0}}}return Ne},vi.prototype.defines=function(){var C=[];for(var H in this.binders){var oe=this.binders[H];(oe instanceof ir||oe instanceof Vt)&&C.push.apply(C,oe.uniformNames.map(function(be){return"#define HAS_UNIFORM_"+be}))}return C},vi.prototype.getBinderAttributes=function(){var C=[];for(var H in this.binders){var oe=this.binders[H];if(oe instanceof Dr||oe instanceof Jr)for(var be=0;be<oe.paintVertexAttributes.length;be++)C.push(oe.paintVertexAttributes[be].name);else if(oe instanceof ga)for(var Pe=0;Pe<K.members.length;Pe++)C.push(K.members[Pe].name)}return C},vi.prototype.getBinderUniforms=function(){var C=[];for(var H in this.binders){var oe=this.binders[H];if(oe instanceof ir||oe instanceof Vt||oe instanceof Jr)for(var be=0,Pe=oe.uniformNames;be<Pe.length;be+=1){var Ne=Pe[be];C.push(Ne)}}return C},vi.prototype.getPaintVertexBuffers=function(){return this._buffers},vi.prototype.getUniforms=function(C,H){var oe=[];for(var be in this.binders){var Pe=this.binders[be];if(Pe instanceof ir||Pe instanceof Vt||Pe instanceof Jr)for(var Ne=0,ft=Pe.uniformNames;Ne<ft.length;Ne+=1){var It=ft[Ne];if(H[It]){var Ht=Pe.getBinding(C,H[It],It);oe.push({name:It,property:be,binding:Ht})}}}return oe},vi.prototype.setUniforms=function(C,H,oe,be){for(var Pe=0,Ne=H;Pe<Ne.length;Pe+=1){var ft=Ne[Pe],It=ft.name,Ht=ft.property,er=ft.binding;this.binders[Ht].setUniform(er,be,oe.get(Ht),It)}},vi.prototype.updatePaintBuffers=function(C){this._buffers=[];for(var H in this.binders){var oe=this.binders[H];if(C&&oe instanceof ga){var be=C.fromScale===2?oe.zoomInPaintVertexBuffer:oe.zoomOutPaintVertexBuffer;be&&this._buffers.push(be)}else(oe instanceof Dr||oe instanceof Jr)&&oe.paintVertexBuffer&&this._buffers.push(oe.paintVertexBuffer)}},vi.prototype.upload=function(C){for(var H in this.binders){var oe=this.binders[H];(oe instanceof Dr||oe instanceof Jr||oe instanceof ga)&&oe.upload(C)}this.updatePaintBuffers()},vi.prototype.destroy=function(){for(var C in this.binders){var H=this.binders[C];(H instanceof Dr||H instanceof Jr||H instanceof ga)&&H.destroy()}};var Ga=function(C,H,oe){oe===void 0&&(oe=function(){return!0}),this.programConfigurations={};for(var be=0,Pe=C;be<Pe.length;be+=1){var Ne=Pe[be];this.programConfigurations[Ne.id]=new vi(Ne,H,oe)}this.needsUpload=!1,this._featureMap=new Qe,this._bufferOffset=0};Ga.prototype.populatePaintArrays=function(C,H,oe,be,Pe,Ne){for(var ft in this.programConfigurations)this.programConfigurations[ft].populatePaintArrays(C,H,be,Pe,Ne);H.id!==void 0&&this._featureMap.add(H.id,oe,this._bufferOffset,C),this._bufferOffset=C,this.needsUpload=!0},Ga.prototype.updatePaintArrays=function(C,H,oe,be){for(var Pe=0,Ne=oe;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];this.needsUpload=this.programConfigurations[ft.id].updatePaintArrays(C,this._featureMap,H,ft,be)||this.needsUpload}},Ga.prototype.get=function(C){return this.programConfigurations[C]},Ga.prototype.upload=function(C){if(this.needsUpload){for(var H in this.programConfigurations)this.programConfigurations[H].upload(C);this.needsUpload=!1}},Ga.prototype.destroy=function(){for(var C in this.programConfigurations)this.programConfigurations[C].destroy()};function ai(k,C){var H={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]};return H[k]||[k.replace(C+"-","").replace(/-/g,"_")]}function Zi(k){var C={"line-pattern":{source:Li,composite:Li},"fill-pattern":{source:Li,composite:Li},"fill-extrusion-pattern":{source:Li,composite:Li}};return C[k]}function Fi(k,C,H){var oe={color:{source:Bi,composite:zs},number:{source:Ii,composite:Bi}},be=Zi(k);return be&&be[H]||oe[C][H]}me("ConstantBinder",ir),me("CrossFadedConstantBinder",Vt),me("SourceExpressionBinder",Dr),me("CrossFadedCompositeBinder",ga),me("CompositeExpressionBinder",Jr),me("ProgramConfiguration",vi,{omit:["_buffers"]}),me("ProgramConfigurationSet",Ga);var ui=8192,_i=15,Si=Math.pow(2,_i-1)-1,Ui=-Si-1;function cn(k){for(var C=ui/k.extent,H=k.loadGeometry(),oe=0;oe<H.length;oe++)for(var be=H[oe],Pe=0;Pe<be.length;Pe++){var Ne=be[Pe],ft=Math.round(Ne.x*C),It=Math.round(Ne.y*C);Ne.x=l(ft,Ui,Si),Ne.y=l(It,Ui,Si),(ft<Ne.x||ft>Ne.x+1||It<Ne.y||It>Ne.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return H}function yo(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?cn(k):[]}}function Uo(k,C,H,oe,be){k.emplaceBack(C*2+(oe+1)/2,H*2+(be+1)/2)}var Is=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Po,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Is.prototype.populate=function(C,H,oe){var be=this.layers[0],Pe=[],Ne=null;be.type==="circle"&&(Ne=be.layout.get("circle-sort-key"));for(var ft=0,It=C;ft<It.length;ft+=1){var Ht=It[ft],er=Ht.feature,Lr=Ht.id,Zr=Ht.index,Vr=Ht.sourceLayerIndex,ua=this.layers[0]._featureFilter.needGeometry,Fa=yo(er,ua);if(this.layers[0]._featureFilter.filter(new mn(this.zoom),Fa,oe)){var Mi=Ne?Ne.evaluate(Fa,{},oe):void 0,ii={id:Lr,properties:er.properties,type:er.type,sourceLayerIndex:Vr,index:Zr,geometry:ua?Fa.geometry:cn(er),patterns:{},sortKey:Mi};Pe.push(ii)}}Ne&&Pe.sort(function(so,mo){return so.sortKey-mo.sortKey});for(var $i=0,Oi=Pe;$i<Oi.length;$i+=1){var Ji=Oi[$i],ln=Ji,wn=ln.geometry,Vn=ln.index,Un=ln.sourceLayerIndex,Mo=C[Vn].feature;this.addFeature(Ji,wn,Vn,oe),H.featureIndex.insert(Mo,wn,Vn,Un,this.index)}},Is.prototype.update=function(C,H,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,oe)},Is.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Is.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Is.prototype.upload=function(C){this.uploaded||(this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,Cl),this.indexBuffer=C.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(C),this.uploaded=!0},Is.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Is.prototype.addFeature=function(C,H,oe,be){for(var Pe=0,Ne=H;Pe<Ne.length;Pe+=1)for(var ft=Ne[Pe],It=0,Ht=ft;It<Ht.length;It+=1){var er=Ht[It],Lr=er.x,Zr=er.y;if(!(Lr<0||Lr>=ui||Zr<0||Zr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Uo(this.layoutVertexArray,Lr,Zr,-1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,1),Uo(this.layoutVertexArray,Lr,Zr,-1,1),this.indexArray.emplaceBack(ua,ua+1,ua+2),this.indexArray.emplaceBack(ua,ua+3,ua+2),Vr.vertexLength+=4,Vr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,{},be)},me("CircleBucket",Is,{omit:["layers"]});function Fo(k,C){for(var H=0;H<k.length;H++)if(Ih(C,k[H]))return!0;for(var oe=0;oe<C.length;oe++)if(Ih(k,C[oe]))return!0;return!!kp(k,C)}function Es(k,C,H){return!!(Ih(k,C)||qp(C,k,H))}function Ks(k,C){if(k.length===1)return ed(C,k[0]);for(var H=0;H<C.length;H++)for(var oe=C[H],be=0;be<oe.length;be++)if(Ih(k,oe[be]))return!0;for(var Pe=0;Pe<k.length;Pe++)if(ed(C,k[Pe]))return!0;for(var Ne=0;Ne<C.length;Ne++)if(kp(k,C[Ne]))return!0;return!1}function mu(k,C,H){for(var oe=0;oe<C.length;oe++){var be=C[oe];if(k.length>=3){for(var Pe=0;Pe<be.length;Pe++)if(Ih(k,be[Pe]))return!0}if(Ep(k,be,H))return!0}return!1}function Ep(k,C,H){if(k.length>1){if(kp(k,C))return!0;for(var oe=0;oe<C.length;oe++)if(qp(C[oe],k,H))return!0}for(var be=0;be<k.length;be++)if(qp(k[be],C,H))return!0;return!1}function kp(k,C){if(k.length===0||C.length===0)return!1;for(var H=0;H<k.length-1;H++)for(var oe=k[H],be=k[H+1],Pe=0;Pe<C.length-1;Pe++){var Ne=C[Pe],ft=C[Pe+1];if(Ph(oe,be,Ne,ft))return!0}return!1}function Ph(k,C,H,oe){return X(k,H,oe)!==X(C,H,oe)&&X(k,C,H)!==X(k,C,oe)}function qp(k,C,H){var oe=H*H;if(C.length===1)return k.distSqr(C[0])<oe;for(var be=1;be<C.length;be++){var Pe=C[be-1],Ne=C[be];if(qd(k,Pe,Ne)<oe)return!0}return!1}function qd(k,C,H){var oe=C.distSqr(H);if(oe===0)return k.distSqr(C);var be=((k.x-C.x)*(H.x-C.x)+(k.y-C.y)*(H.y-C.y))/oe;return be<0?k.distSqr(C):be>1?k.distSqr(H):k.distSqr(H.sub(C)._mult(be)._add(C))}function ed(k,C){for(var H=!1,oe,be,Pe,Ne=0;Ne<k.length;Ne++){oe=k[Ne];for(var ft=0,It=oe.length-1;ft<oe.length;It=ft++)be=oe[ft],Pe=oe[It],be.y>C.y!=Pe.y>C.y&&C.x<(Pe.x-be.x)*(C.y-be.y)/(Pe.y-be.y)+be.x&&(H=!H)}return H}function Ih(k,C){for(var H=!1,oe=0,be=k.length-1;oe<k.length;be=oe++){var Pe=k[oe],Ne=k[be];Pe.y>C.y!=Ne.y>C.y&&C.x<(Ne.x-Pe.x)*(C.y-Pe.y)/(Ne.y-Pe.y)+Pe.x&&(H=!H)}return H}function td(k,C,H,oe,be){for(var Pe=0,Ne=k;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];if(C<=ft.x&&H<=ft.y&&oe>=ft.x&&be>=ft.y)return!0}var It=[new n(C,H),new n(C,be),new n(oe,be),new n(oe,H)];if(k.length>2)for(var Ht=0,er=It;Ht<er.length;Ht+=1){var Lr=er[Ht];if(Ih(k,Lr))return!0}for(var Zr=0;Zr<k.length-1;Zr++){var Vr=k[Zr],ua=k[Zr+1];if(Kh(Vr,ua,It))return!0}return!1}function Kh(k,C,H){var oe=H[0],be=H[2];if(k.x<oe.x&&C.x<oe.x||k.x>be.x&&C.x>be.x||k.y<oe.y&&C.y<oe.y||k.y>be.y&&C.y>be.y)return!1;var Pe=X(k,C,H[0]);return Pe!==X(k,C,H[1])||Pe!==X(k,C,H[2])||Pe!==X(k,C,H[3])}function Rh(k,C,H){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:H.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,H,oe,be){if(!C[0]&&!C[1])return k;var Pe=n.convert(C)._mult(be);H==="viewport"&&Pe._rotate(-oe);for(var Ne=[],ft=0;ft<k.length;ft++){var It=k[ft];Ne.push(It.sub(Pe))}return Ne}var Lp=new va({"circle-sort-key":new Zt(Gi.layout_circle["circle-sort-key"])}),Cv=new va({"circle-radius":new Zt(Gi.paint_circle["circle-radius"]),"circle-color":new Zt(Gi.paint_circle["circle-color"]),"circle-blur":new Zt(Gi.paint_circle["circle-blur"]),"circle-opacity":new Zt(Gi.paint_circle["circle-opacity"]),"circle-translate":new it(Gi.paint_circle["circle-translate"]),"circle-translate-anchor":new it(Gi.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new it(Gi.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new it(Gi.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Zt(Gi.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Zt(Gi.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Zt(Gi.paint_circle["circle-stroke-opacity"])}),Vd={paint:Cv,layout:Lp},Gf=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var k=arguments,C=0,H=arguments.length;H--;)C+=k[H]*k[H];return Math.sqrt(C)});function Gd(){var k=new Gf(4);return Gf!=Float32Array&&(k[1]=0,k[2]=0),k[0]=1,k[3]=1,k}function Lv(k,C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=C[3],ft=Math.sin(H),It=Math.cos(H);return k[0]=oe*It+Pe*ft,k[1]=be*It+Ne*ft,k[2]=oe*-ft+Pe*It,k[3]=be*-ft+Ne*It,k}function ph(){var k=new Gf(9);return Gf!=Float32Array&&(k[1]=0,k[2]=0,k[3]=0,k[5]=0,k[6]=0,k[7]=0),k[0]=1,k[4]=1,k[8]=1,k}function iv(k,C){var H=Math.sin(C),oe=Math.cos(C);return k[0]=oe,k[1]=H,k[2]=0,k[3]=-H,k[4]=oe,k[5]=0,k[6]=0,k[7]=0,k[8]=1,k}function nm(){var k=new Gf(16);return Gf!=Float32Array&&(k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[11]=0,k[12]=0,k[13]=0,k[14]=0),k[0]=1,k[5]=1,k[10]=1,k[15]=1,k}function om(k){var C=new Gf(16);return C[0]=k[0],C[1]=k[1],C[2]=k[2],C[3]=k[3],C[4]=k[4],C[5]=k[5],C[6]=k[6],C[7]=k[7],C[8]=k[8],C[9]=k[9],C[10]=k[10],C[11]=k[11],C[12]=k[12],C[13]=k[13],C[14]=k[14],C[15]=k[15],C}function Pv(k){return k[0]=1,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=1,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[10]=1,k[11]=0,k[12]=0,k[13]=0,k[14]=0,k[15]=1,k}function nv(k,C){var H=C[0],oe=C[1],be=C[2],Pe=C[3],Ne=C[4],ft=C[5],It=C[6],Ht=C[7],er=C[8],Lr=C[9],Zr=C[10],Vr=C[11],ua=C[12],Fa=C[13],Mi=C[14],ii=C[15],$i=H*ft-oe*Ne,Oi=H*It-be*Ne,Ji=H*Ht-Pe*Ne,ln=oe*It-be*ft,wn=oe*Ht-Pe*ft,Vn=be*Ht-Pe*It,Un=er*Fa-Lr*ua,Mo=er*Mi-Zr*ua,so=er*ii-Vr*ua,mo=Lr*Mi-Zr*Fa,Cs=Lr*ii-Vr*Fa,Eo=Zr*ii-Vr*Mi,Ro=$i*Eo-Oi*Cs+Ji*mo+ln*so-wn*Mo+Vn*Un;return Ro?(Ro=1/Ro,k[0]=(ft*Eo-It*Cs+Ht*mo)*Ro,k[1]=(be*Cs-oe*Eo-Pe*mo)*Ro,k[2]=(Fa*Vn-Mi*wn+ii*ln)*Ro,k[3]=(Zr*wn-Lr*Vn-Vr*ln)*Ro,k[4]=(It*so-Ne*Eo-Ht*Mo)*Ro,k[5]=(H*Eo-be*so+Pe*Mo)*Ro,k[6]=(Mi*Ji-ua*Vn-ii*Oi)*Ro,k[7]=(er*Vn-Zr*Ji+Vr*Oi)*Ro,k[8]=(Ne*Cs-ft*so+Ht*Un)*Ro,k[9]=(oe*so-H*Cs-Pe*Un)*Ro,k[10]=(ua*wn-Fa*Ji+ii*$i)*Ro,k[11]=(Lr*Ji-er*wn-Vr*$i)*Ro,k[12]=(ft*Mo-Ne*mo-It*Un)*Ro,k[13]=(H*mo-oe*Mo+be*Un)*Ro,k[14]=(Fa*Oi-ua*ln-Mi*$i)*Ro,k[15]=(er*ln-Lr*Oi+Zr*$i)*Ro,k):null}function ov(k,C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=C[3],ft=C[4],It=C[5],Ht=C[6],er=C[7],Lr=C[8],Zr=C[9],Vr=C[10],ua=C[11],Fa=C[12],Mi=C[13],ii=C[14],$i=C[15],Oi=H[0],Ji=H[1],ln=H[2],wn=H[3];return k[0]=Oi*oe+Ji*ft+ln*Lr+wn*Fa,k[1]=Oi*be+Ji*It+ln*Zr+wn*Mi,k[2]=Oi*Pe+Ji*Ht+ln*Vr+wn*ii,k[3]=Oi*Ne+Ji*er+ln*ua+wn*$i,Oi=H[4],Ji=H[5],ln=H[6],wn=H[7],k[4]=Oi*oe+Ji*ft+ln*Lr+wn*Fa,k[5]=Oi*be+Ji*It+ln*Zr+wn*Mi,k[6]=Oi*Pe+Ji*Ht+ln*Vr+wn*ii,k[7]=Oi*Ne+Ji*er+ln*ua+wn*$i,Oi=H[8],Ji=H[9],ln=H[10],wn=H[11],k[8]=Oi*oe+Ji*ft+ln*Lr+wn*Fa,k[9]=Oi*be+Ji*It+ln*Zr+wn*Mi,k[10]=Oi*Pe+Ji*Ht+ln*Vr+wn*ii,k[11]=Oi*Ne+Ji*er+ln*ua+wn*$i,Oi=H[12],Ji=H[13],ln=H[14],wn=H[15],k[12]=Oi*oe+Ji*ft+ln*Lr+wn*Fa,k[13]=Oi*be+Ji*It+ln*Zr+wn*Mi,k[14]=Oi*Pe+Ji*Ht+ln*Vr+wn*ii,k[15]=Oi*Ne+Ji*er+ln*ua+wn*$i,k}function cc(k,C,H){var oe=H[0],be=H[1],Pe=H[2],Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii;return C===k?(k[12]=C[0]*oe+C[4]*be+C[8]*Pe+C[12],k[13]=C[1]*oe+C[5]*be+C[9]*Pe+C[13],k[14]=C[2]*oe+C[6]*be+C[10]*Pe+C[14],k[15]=C[3]*oe+C[7]*be+C[11]*Pe+C[15]):(Ne=C[0],ft=C[1],It=C[2],Ht=C[3],er=C[4],Lr=C[5],Zr=C[6],Vr=C[7],ua=C[8],Fa=C[9],Mi=C[10],ii=C[11],k[0]=Ne,k[1]=ft,k[2]=It,k[3]=Ht,k[4]=er,k[5]=Lr,k[6]=Zr,k[7]=Vr,k[8]=ua,k[9]=Fa,k[10]=Mi,k[11]=ii,k[12]=Ne*oe+er*be+ua*Pe+C[12],k[13]=ft*oe+Lr*be+Fa*Pe+C[13],k[14]=It*oe+Zr*be+Mi*Pe+C[14],k[15]=Ht*oe+Vr*be+ii*Pe+C[15]),k}function fu(k,C,H){var oe=H[0],be=H[1],Pe=H[2];return k[0]=C[0]*oe,k[1]=C[1]*oe,k[2]=C[2]*oe,k[3]=C[3]*oe,k[4]=C[4]*be,k[5]=C[5]*be,k[6]=C[6]*be,k[7]=C[7]*be,k[8]=C[8]*Pe,k[9]=C[9]*Pe,k[10]=C[10]*Pe,k[11]=C[11]*Pe,k[12]=C[12],k[13]=C[13],k[14]=C[14],k[15]=C[15],k}function Dh(k,C,H){var oe=Math.sin(H),be=Math.cos(H),Pe=C[4],Ne=C[5],ft=C[6],It=C[7],Ht=C[8],er=C[9],Lr=C[10],Zr=C[11];return C!==k&&(k[0]=C[0],k[1]=C[1],k[2]=C[2],k[3]=C[3],k[12]=C[12],k[13]=C[13],k[14]=C[14],k[15]=C[15]),k[4]=Pe*be+Ht*oe,k[5]=Ne*be+er*oe,k[6]=ft*be+Lr*oe,k[7]=It*be+Zr*oe,k[8]=Ht*be-Pe*oe,k[9]=er*be-Ne*oe,k[10]=Lr*be-ft*oe,k[11]=Zr*be-It*oe,k}function Iv(k,C,H){var oe=Math.sin(H),be=Math.cos(H),Pe=C[0],Ne=C[1],ft=C[2],It=C[3],Ht=C[4],er=C[5],Lr=C[6],Zr=C[7];return C!==k&&(k[8]=C[8],k[9]=C[9],k[10]=C[10],k[11]=C[11],k[12]=C[12],k[13]=C[13],k[14]=C[14],k[15]=C[15]),k[0]=Pe*be+Ht*oe,k[1]=Ne*be+er*oe,k[2]=ft*be+Lr*oe,k[3]=It*be+Zr*oe,k[4]=Ht*be-Pe*oe,k[5]=er*be-Ne*oe,k[6]=Lr*be-ft*oe,k[7]=Zr*be-It*oe,k}function sm(k,C,H,oe,be){var Pe=1/Math.tan(C/2),Ne;return k[0]=Pe/H,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=Pe,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[11]=-1,k[12]=0,k[13]=0,k[15]=0,be!=null&&be!==1/0?(Ne=1/(oe-be),k[10]=(be+oe)*Ne,k[14]=2*be*oe*Ne):(k[10]=-1,k[14]=-2*oe),k}function Mu(k,C,H,oe,be,Pe,Ne){var ft=1/(C-H),It=1/(oe-be),Ht=1/(Pe-Ne);return k[0]=-2*ft,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=-2*It,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[10]=2*Ht,k[11]=0,k[12]=(C+H)*ft,k[13]=(be+oe)*It,k[14]=(Ne+Pe)*Ht,k[15]=1,k}var w0=ov;function sv(){var k=new Gf(3);return Gf!=Float32Array&&(k[0]=0,k[1]=0,k[2]=0),k}function xg(k){var C=new Gf(3);return C[0]=k[0],C[1]=k[1],C[2]=k[2],C}function Pp(k,C,H){return k[0]=C[0]+H[0],k[1]=C[1]+H[1],k[2]=C[2]+H[2],k}function lv(k,C,H){return k[0]=C[0]-H[0],k[1]=C[1]-H[1],k[2]=C[2]-H[2],k}function bg(k,C,H){return k[0]=C[0]*H,k[1]=C[1]*H,k[2]=C[2]*H,k}function T0(k,C){var H=C[0],oe=C[1],be=C[2],Pe=H*H+oe*oe+be*be;return Pe>0&&(Pe=1/Math.sqrt(Pe)),k[0]=C[0]*Pe,k[1]=C[1]*Pe,k[2]=C[2]*Pe,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=H[0],ft=H[1],It=H[2];return k[0]=be*It-Pe*ft,k[1]=Pe*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,H){var oe=C[0],be=C[1],Pe=C[2];return k[0]=oe*H[0]+be*H[3]+Pe*H[6],k[1]=oe*H[1]+be*H[4]+Pe*H[7],k[2]=oe*H[2]+be*H[5]+Pe*H[8],k}var VT=lv,vk=function(){var k=sv();return function(C,H,oe,be,Pe,Ne){var ft,It;for(H||(H=3),oe||(oe=0),be?It=Math.min(be*H+oe,C.length):It=C.length,ft=oe;ft<It;ft+=H)k[0]=C[ft],k[1]=C[ft+1],k[2]=C[ft+2],Pe(k,k,Ne),C[ft]=k[0],C[ft+1]=k[1],C[ft+2]=k[2];return C}}();function GT(){var k=new Gf(4);return Gf!=Float32Array&&(k[0]=0,k[1]=0,k[2]=0,k[3]=0),k}function HT(k,C,H){return k[0]=C[0]*H,k[1]=C[1]*H,k[2]=C[2]*H,k[3]=C[3]*H,k}function WT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]+k[3]*C[3]}function Rv(k,C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=C[3];return k[0]=H[0]*oe+H[4]*be+H[8]*Pe+H[12]*Ne,k[1]=H[1]*oe+H[5]*be+H[9]*Pe+H[13]*Ne,k[2]=H[2]*oe+H[6]*be+H[10]*Pe+H[14]*Ne,k[3]=H[3]*oe+H[7]*be+H[11]*Pe+H[15]*Ne,k}var A0=function(){var k=GT();return function(C,H,oe,be,Pe,Ne){var ft,It;for(H||(H=4),oe||(oe=0),be?It=Math.min(be*H+oe,C.length):It=C.length,ft=oe;ft<It;ft+=H)k[0]=C[ft],k[1]=C[ft+1],k[2]=C[ft+2],k[3]=C[ft+3],Pe(k,k,Ne),C[ft]=k[0],C[ft+1]=k[1],C[ft+2]=k[2],C[ft+3]=k[3];return C}}();function Lx(){var k=new Gf(2);return Gf!=Float32Array&&(k[0]=0,k[1]=0),k}function P1(k){var C=k[0],H=k[1];return C*C+H*H}var I1=P1,mk=function(){var k=Lx();return function(C,H,oe,be,Pe,Ne){var ft,It;for(H||(H=2),oe||(oe=0),be?It=Math.min(be*H+oe,C.length):It=C.length,ft=oe;ft<It;ft+=H)k[0]=C[ft],k[1]=C[ft+1],Pe(k,k,Ne),C[ft]=k[0],C[ft+1]=k[1];return C}}(),XT=function(k){function C(H){k.call(this,H,Vd)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new Is(oe)},C.prototype.queryRadius=function(oe){var be=oe;return Rh("circle-radius",this,be)+Rh("circle-stroke-width",this,be)+Cp(this.paint.get("circle-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht,er){for(var Lr=Vp(oe,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),It.angle,Ht),Zr=this.paint.get("circle-radius").evaluate(be,Pe),Vr=this.paint.get("circle-stroke-width").evaluate(be,Pe),ua=Zr+Vr,Fa=this.paint.get("circle-pitch-alignment")==="map",Mi=Fa?Lr:Ix(Lr,er),ii=Fa?ua*Ht:ua,$i=0,Oi=Ne;$i<Oi.length;$i+=1)for(var Ji=Oi[$i],ln=0,wn=Ji;ln<wn.length;ln+=1){var Vn=wn[ln],Un=Fa?Vn:Px(Vn,er),Mo=ii,so=Rv([],[Vn.x,Vn.y,0,1],er);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Mo*=so[3]/It.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Mo*=It.cameraToCenterDistance/so[3]),Es(Mi,Un,Mo))return!0}return!1},C}(Ya);function Px(k,C){var H=Rv([],[k.x,k.y,0,1],C);return new n(H[0]/H[3],H[1]/H[3])}function Ix(k,C){return k.map(function(H){return Px(H,C)})}var R1=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Is);me("HeatmapBucket",R1,{omit:["layers"]});function zh(k,C,H,oe){var be=C.width,Pe=C.height;if(!oe)oe=new Uint8Array(be*Pe*H);else if(oe instanceof Uint8ClampedArray)oe=new Uint8Array(oe.buffer);else if(oe.length!==be*Pe*H)throw new RangeError("mismatched image size");return k.width=be,k.height=Pe,k.data=oe,k}function wg(k,C,H){var oe=C.width,be=C.height;if(!(oe===k.width&&be===k.height)){var Pe=zh({},{width:oe,height:be},H);Tg(k,Pe,{x:0,y:0},{x:0,y:0},{width:Math.min(k.width,oe),height:Math.min(k.height,be)},H),k.width=oe,k.height=be,k.data=Pe.data}}function Tg(k,C,H,oe,be,Pe){if(be.width===0||be.height===0)return C;if(be.width>k.width||be.height>k.height||H.x>k.width-be.width||H.y>k.height-be.height)throw new RangeError("out of range source coordinates for image copy");if(be.width>C.width||be.height>C.height||oe.x>C.width-be.width||oe.y>C.height-be.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ne=k.data,ft=C.data,It=0;It<be.height;It++)for(var Ht=((H.y+It)*k.width+H.x)*Pe,er=((oe.y+It)*C.width+oe.x)*Pe,Lr=0;Lr<be.width*Pe;Lr++)ft[er+Lr]=Ne[Ht+Lr];return C}var Ip=function(C,H){zh(this,C,1,H)};Ip.prototype.resize=function(C){wg(this,C,1)},Ip.prototype.clone=function(){return new Ip({width:this.width,height:this.height},new Uint8Array(this.data))},Ip.copy=function(C,H,oe,be,Pe){Tg(C,H,oe,be,Pe,1)};var eh=function(C,H){zh(this,C,4,H)};eh.prototype.resize=function(C){wg(this,C,4)},eh.prototype.replace=function(C,H){H?this.data.set(C):C instanceof Uint8ClampedArray?this.data=new Uint8Array(C.buffer):this.data=C},eh.prototype.clone=function(){return new eh({width:this.width,height:this.height},new Uint8Array(this.data))},eh.copy=function(C,H,oe,be,Pe){Tg(C,H,oe,be,Pe,4)},me("AlphaImage",Ip),me("RGBAImage",eh);var S0=new va({"heatmap-radius":new Zt(Gi.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Zt(Gi.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new it(Gi.paint_heatmap["heatmap-intensity"]),"heatmap-color":new wa(Gi.paint_heatmap["heatmap-color"]),"heatmap-opacity":new it(Gi.paint_heatmap["heatmap-opacity"])}),lm={paint:S0};function M0(k){var C={},H=k.resolution||256,oe=k.clips?k.clips.length:1,be=k.image||new eh({width:H,height:oe}),Pe=function($i,Oi,Ji){C[k.evaluationKey]=Ji;var ln=k.expression.evaluate(C);be.data[$i+Oi+0]=Math.floor(ln.r*255/ln.a),be.data[$i+Oi+1]=Math.floor(ln.g*255/ln.a),be.data[$i+Oi+2]=Math.floor(ln.b*255/ln.a),be.data[$i+Oi+3]=Math.floor(ln.a*255)};if(k.clips)for(var Ht=0,er=0;Ht<oe;++Ht,er+=H*4)for(var Lr=0,Zr=0;Lr<H;Lr++,Zr+=4){var Vr=Lr/(H-1),ua=k.clips[Ht],Fa=ua.start,Mi=ua.end,ii=Fa*(1-Vr)+Mi*Vr;Pe(er,Zr,ii)}else for(var Ne=0,ft=0;Ne<H;Ne++,ft+=4){var It=Ne/(H-1);Pe(0,ft,It)}return be}var Ag=function(k){function C(H){k.call(this,H,lm),this._updateColorRamp()}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new R1(oe)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){oe==="heatmap-color"&&this._updateColorRamp()},C.prototype._updateColorRamp=function(){var oe=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=M0({expression:oe,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},C.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},C.prototype.queryRadius=function(){return 0},C.prototype.queryIntersectsFeature=function(){return!1},C.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},C}(Ya),ZT=new va({"hillshade-illumination-direction":new it(Gi.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new it(Gi.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new it(Gi.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new it(Gi.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new it(Gi.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new it(Gi.paint_hillshade["hillshade-accent-color"])}),YT={paint:ZT},Rx=function(k){function C(H){k.call(this,H,YT)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},C}(Ya),Dx=Ei([{name:"a_pos",components:2,type:"Int16"}],4),KT=Dx.members,Sg=um,zx=um;function um(k,C,H){H=H||2;var oe=C&&C.length,be=oe?C[0]*H:k.length,Pe=Mg(k,0,be,H,!0),Ne=[];if(!Pe||Pe.next===Pe.prev)return Ne;var ft,It,Ht,er,Lr,Zr,Vr;if(oe&&(Pe=cv(k,C,Pe,H)),k.length>80*H){ft=Ht=k[0],It=er=k[1];for(var ua=H;ua<be;ua+=H)Lr=k[ua],Zr=k[ua+1],Lr<ft&&(ft=Lr),Zr<It&&(It=Zr),Lr>Ht&&(Ht=Lr),Zr>er&&(er=Zr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Pe,Ne,H,ft,It,Vr),Ne}function Mg(k,C,H,oe,be){var Pe,Ne;if(be===U1(k,C,H,oe)>0)for(Pe=C;Pe<H;Pe+=oe)Ne=Ux(Pe,k[Pe],k[Pe+1],Ne);else for(Pe=H-oe;Pe>=C;Pe-=oe)Ne=Ux(Pe,k[Pe],k[Pe+1],Ne);return Ne&&C0(Ne,Ne.next)&&(I0(Ne),Ne=Ne.next),Ne}function uv(k,C){if(!k)return k;C||(C=k);var H=k,oe;do if(oe=!1,!H.steiner&&(C0(H,H.next)||cf(H.prev,H,H.next)===0)){if(I0(H),H=C=H.prev,H===H.next)break;oe=!0}else H=H.next;while(oe||H!==C);return C}function E0(k,C,H,oe,be,Pe,Ne){if(k){!Ne&&Pe&&Eg(k,oe,be,Pe);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Pe?Ox(k,oe,be,Pe):Fx(k)){C.push(It.i/H),C.push(k.i/H),C.push(Ht.i/H),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,H),E0(k,C,H,oe,be,Pe,2)):Ne===2&&yd(k,C,H,oe,be,Pe):E0(uv(k),C,H,oe,be,Pe,1);break}}}}function Fx(k){var C=k.prev,H=k,oe=k.next;if(cf(C,H,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,H.x,H.y,oe.x,oe.y,be.x,be.y)&&cf(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function Ox(k,C,H,oe){var be=k.prev,Pe=k,Ne=k.next;if(cf(be,Pe,Ne)>=0)return!1;for(var ft=be.x<Pe.x?be.x<Ne.x?be.x:Ne.x:Pe.x<Ne.x?Pe.x:Ne.x,It=be.y<Pe.y?be.y<Ne.y?be.y:Ne.y:Pe.y<Ne.y?Pe.y:Ne.y,Ht=be.x>Pe.x?be.x>Ne.x?be.x:Ne.x:Pe.x>Ne.x?Pe.x:Ne.x,er=be.y>Pe.y?be.y>Ne.y?be.y:Ne.y:Pe.y>Ne.y?Pe.y:Ne.y,Lr=F1(ft,It,C,H,oe),Zr=F1(Ht,er,C,H,oe),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Lr&&ua&&ua.z<=Zr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Lr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.prevZ}for(;ua&&ua.z<=Zr;){if(ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0)return!1;ua=ua.nextZ}return!0}function k0(k,C,H){var oe=k;do{var be=oe.prev,Pe=oe.next.next;!C0(be,Pe)&&kg(be,oe,oe.next,Pe)&&P0(be,Pe)&&P0(Pe,be)&&(C.push(be.i/H),C.push(oe.i/H),C.push(Pe.i/H),I0(oe),I0(oe.next),oe=k=Pe),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,H,oe,be,Pe){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&cm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,H,oe,be,Pe),E0(It,C,H,oe,be,Pe);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,H,oe){var be=[],Pe,Ne,ft,It,Ht;for(Pe=0,Ne=C.length;Pe<Ne;Pe++)ft=C[Pe]*oe,It=Pe<Ne-1?C[Pe+1]*oe:k.length,Ht=Mg(k,ft,It,oe,!1),Ht===Ht.next&&(Ht.steiner=!0),be.push(O1(Ht));for(be.sort(Bx),Pe=0;Pe<be.length;Pe++)D1(be[Pe],H),H=uv(H,H.next);return H}function Bx(k,C){return k.x-C.x}function D1(k,C){if(C=JT(k,C),C){var H=B1(C,k);uv(C,C.next),uv(H,H.next)}}function JT(k,C){var H=C,oe=k.x,be=k.y,Pe=-1/0,Ne;do{if(be<=H.y&&be>=H.next.y&&H.next.y!==H.y){var ft=H.x+(be-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(ft<=oe&&ft>Pe){if(Pe=ft,ft===oe){if(be===H.y)return H;if(be===H.next.y)return H.next}Ne=H.x<H.next.x?H:H.next}}H=H.next}while(H!==C);if(!Ne)return null;if(oe===Pe)return Ne;var It=Ne,Ht=Ne.x,er=Ne.y,Lr=1/0,Zr;H=Ne;do oe>=H.x&&H.x>=Ht&&oe!==H.x&&fv(be<er?oe:Pe,be,Ht,er,be<er?Pe:oe,be,H.x,H.y)&&(Zr=Math.abs(be-H.y)/(oe-H.x),P0(H,k)&&(Zr<Lr||Zr===Lr&&(H.x>Ne.x||H.x===Ne.x&&$T(Ne,H)))&&(Ne=H,Lr=Zr)),H=H.next;while(H!==It);return Ne}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,H,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,H,oe)),be.prevZ=be.prev,be.nextZ=be.next,be=be.next;while(be!==k);be.prevZ.nextZ=null,be.prevZ=null,z1(be)}function z1(k){var C,H,oe,be,Pe,Ne,ft,It,Ht=1;do{for(H=k,k=null,Pe=null,Ne=0;H;){for(Ne++,oe=H,ft=0,C=0;C<Ht&&(ft++,oe=oe.nextZ,!!oe);C++);for(It=Ht;ft>0||It>0&&oe;)ft!==0&&(It===0||!oe||H.z<=oe.z)?(be=H,H=H.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Pe?Pe.nextZ=be:k=be,be.prevZ=Pe,Pe=be;H=oe}Pe.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,H,oe,be){return k=32767*(k-H)*be,C=32767*(C-oe)*be,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k|C<<1}function O1(k){var C=k,H=k;do(C.x<H.x||C.x===H.x&&C.y<H.y)&&(H=C),C=C.next;while(C!==k);return H}function fv(k,C,H,oe,be,Pe,Ne,ft){return(be-Ne)*(C-ft)-(k-Ne)*(Pe-ft)>=0&&(k-Ne)*(oe-ft)-(H-Ne)*(C-ft)>=0&&(H-Ne)*(Pe-ft)-(be-Ne)*(oe-ft)>=0}function cm(k,C){return k.next.i!==C.i&&k.prev.i!==C.i&&!Nx(k,C)&&(P0(k,C)&&P0(C,k)&&QT(k,C)&&(cf(k.prev,k,C.prev)||cf(k,C.prev,C))||C0(k,C)&&cf(k.prev,k,k.next)>0&&cf(C.prev,C,C.next)>0)}function cf(k,C,H){return(C.y-k.y)*(H.x-C.x)-(C.x-k.x)*(H.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,H,oe){var be=Dv(cf(k,C,H)),Pe=Dv(cf(k,C,oe)),Ne=Dv(cf(H,oe,k)),ft=Dv(cf(H,oe,C));return!!(be!==Pe&&Ne!==ft||be===0&&L0(k,H,C)||Pe===0&&L0(k,oe,C)||Ne===0&&L0(H,k,oe)||ft===0&&L0(H,C,oe))}function L0(k,C,H){return C.x<=Math.max(k.x,H.x)&&C.x>=Math.min(k.x,H.x)&&C.y<=Math.max(k.y,H.y)&&C.y>=Math.min(k.y,H.y)}function Dv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var H=k;do{if(H.i!==k.i&&H.next.i!==k.i&&H.i!==C.i&&H.next.i!==C.i&&kg(H,H.next,k,C))return!0;H=H.next}while(H!==k);return!1}function P0(k,C){return cf(k.prev,k,k.next)<0?cf(k,C,k.next)>=0&&cf(k,k.prev,C)>=0:cf(k,C,k.prev)<0||cf(k,k.next,C)<0}function QT(k,C){var H=k,oe=!1,be=(k.x+C.x)/2,Pe=(k.y+C.y)/2;do H.y>Pe!=H.next.y>Pe&&H.next.y!==H.y&&be<(H.next.x-H.x)*(Pe-H.y)/(H.next.y-H.y)+H.x&&(oe=!oe),H=H.next;while(H!==k);return oe}function B1(k,C){var H=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Pe=C.prev;return k.next=C,C.prev=k,H.next=be,be.prev=H,oe.next=H,H.prev=oe,Pe.next=oe,oe.prev=Pe,oe}function Ux(k,C,H,oe){var be=new N1(k,C,H);return oe?(be.next=oe.next,be.prev=oe,oe.next.prev=be,oe.next=be):(be.prev=be,be.next=be),be}function I0(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function N1(k,C,H){this.i=k,this.x=C,this.y=H,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}um.deviation=function(k,C,H,oe){var be=C&&C.length,Pe=be?C[0]*H:k.length,Ne=Math.abs(U1(k,0,Pe,H));if(be)for(var ft=0,It=C.length;ft<It;ft++){var Ht=C[ft]*H,er=ft<It-1?C[ft+1]*H:k.length;Ne-=Math.abs(U1(k,Ht,er,H))}var Lr=0;for(ft=0;ft<oe.length;ft+=3){var Zr=oe[ft]*H,Vr=oe[ft+1]*H,ua=oe[ft+2]*H;Lr+=Math.abs((k[Zr]-k[ua])*(k[Vr+1]-k[Zr+1])-(k[Zr]-k[Vr])*(k[ua+1]-k[Zr+1]))}return Ne===0&&Lr===0?0:Math.abs((Lr-Ne)/Ne)};function U1(k,C,H,oe){for(var be=0,Pe=C,Ne=H-oe;Pe<H;Pe+=oe)be+=(k[Ne]-k[Pe])*(k[Pe+1]+k[Ne+1]),Ne=Pe;return be}um.flatten=function(k){for(var C=k[0][0].length,H={vertices:[],holes:[],dimensions:C},oe=0,be=0;be<k.length;be++){for(var Pe=0;Pe<k[be].length;Pe++)for(var Ne=0;Ne<C;Ne++)H.vertices.push(k[be][Pe][Ne]);be>0&&(oe+=k[be-1].length,H.holes.push(oe))}return H},Sg.default=zx;function j1(k,C,H,oe,be){Hd(k,C,H||0,oe||k.length-1,be||jx)}function Hd(k,C,H,oe,be){for(;oe>H;){if(oe-H>600){var Pe=oe-H+1,Ne=C-H+1,ft=Math.log(Pe),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Pe-It)/Pe)*(Ne-Pe/2<0?-1:1),er=Math.max(H,Math.floor(C-Ne*It/Pe+Ht)),Lr=Math.min(oe,Math.floor(C+(Pe-Ne)*It/Pe+Ht));Hd(k,C,er,Lr,be)}var Zr=k[C],Vr=H,ua=oe;for(fm(k,H,C),be(k[oe],Zr)>0&&fm(k,H,oe);Vr<ua;){for(fm(k,Vr,ua),Vr++,ua--;be(k[Vr],Zr)<0;)Vr++;for(;be(k[ua],Zr)>0;)ua--}be(k[H],Zr)===0?fm(k,H,ua):(ua++,fm(k,ua,oe)),ua<=C&&(H=ua+1),C<=ua&&(oe=ua-1)}}function fm(k,C,H){var oe=k[C];k[C]=k[H],k[H]=oe}function jx(k,C){return k<C?-1:k>C?1:0}function Cg(k,C){var H=k.length;if(H<=1)return[k];for(var oe=[],be,Pe,Ne=0;Ne<H;Ne++){var ft=$(k[Ne]);ft!==0&&(k[Ne].area=Math.abs(ft),Pe===void 0&&(Pe=ft<0),Pe===ft<0?(be&&oe.push(be),be=[k[Ne]]):be.push(k[Ne]))}if(be&&oe.push(be),C>1)for(var It=0;It<oe.length;It++)oe[It].length<=C||(j1(oe[It],C,1,oe[It].length-1,qx),oe[It]=oe[It].slice(0,C));return oe}function qx(k,C){return C.area-k.area}function Lg(k,C,H){for(var oe=H.patternDependencies,be=!1,Pe=0,Ne=C;Pe<Ne.length;Pe+=1){var ft=Ne[Pe],It=ft.paint.get(k+"-pattern");It.isConstant()||(be=!0);var Ht=It.constantOr(null);Ht&&(be=!0,oe[Ht.to]=!0,oe[Ht.from]=!0)}return be}function R0(k,C,H,oe,be){for(var Pe=be.patternDependencies,Ne=0,ft=C;Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=It.paint.get(k+"-pattern"),er=Ht.value;if(er.kind!=="constant"){var Lr=er.evaluate({zoom:oe-1},H,{},be.availableImages),Zr=er.evaluate({zoom:oe},H,{},be.availableImages),Vr=er.evaluate({zoom:oe+1},H,{},be.availableImages);Lr=Lr&&Lr.name?Lr.name:Lr,Zr=Zr&&Zr.name?Zr.name:Zr,Vr=Vr&&Vr.name?Vr.name:Vr,Pe[Lr]=!0,Pe[Zr]=!0,Pe[Vr]=!0,H.patterns[It.id]={min:Lr,mid:Zr,max:Vr}}}return H}var D0=500,rd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.indexArray2=new Dn,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Po,this.segments2=new Po,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};rd.prototype.populate=function(C,H,oe){this.hasPattern=Lg("fill",this.layers,H);for(var be=this.layers[0].layout.get("fill-sort-key"),Pe=[],Ne=0,ft=C;Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=It.feature,er=It.id,Lr=It.index,Zr=It.sourceLayerIndex,Vr=this.layers[0]._featureFilter.needGeometry,ua=yo(Ht,Vr);if(this.layers[0]._featureFilter.filter(new mn(this.zoom),ua,oe)){var Fa=be?be.evaluate(ua,{},oe,H.availableImages):void 0,Mi={id:er,properties:Ht.properties,type:Ht.type,sourceLayerIndex:Zr,index:Lr,geometry:Vr?ua.geometry:cn(Ht),patterns:{},sortKey:Fa};Pe.push(Mi)}}be&&Pe.sort(function(so,mo){return so.sortKey-mo.sortKey});for(var ii=0,$i=Pe;ii<$i.length;ii+=1){var Oi=$i[ii],Ji=Oi,ln=Ji.geometry,wn=Ji.index,Vn=Ji.sourceLayerIndex;if(this.hasPattern){var Un=R0("fill",this.layers,Oi,this.zoom,H);this.patternFeatures.push(Un)}else this.addFeature(Oi,ln,wn,oe,{});var Mo=C[wn].feature;H.featureIndex.insert(Mo,ln,wn,Vn,this.index)}},rd.prototype.update=function(C,H,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,oe)},rd.prototype.addFeatures=function(C,H,oe){for(var be=0,Pe=this.patternFeatures;be<Pe.length;be+=1){var Ne=Pe[be];this.addFeature(Ne,Ne.geometry,Ne.index,H,oe)}},rd.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},rd.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},rd.prototype.upload=function(C){this.uploaded||(this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,KT),this.indexBuffer=C.createIndexBuffer(this.indexArray),this.indexBuffer2=C.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(C),this.uploaded=!0},rd.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},rd.prototype.addFeature=function(C,H,oe,be,Pe){for(var Ne=0,ft=Cg(H,D0);Ne<ft.length;Ne+=1){for(var It=ft[Ne],Ht=0,er=0,Lr=It;er<Lr.length;er+=1){var Zr=Lr[er];Ht+=Zr.length}for(var Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray),ua=Vr.vertexLength,Fa=[],Mi=[],ii=0,$i=It;ii<$i.length;ii+=1){var Oi=$i[ii];if(Oi.length!==0){Oi!==It[0]&&Mi.push(Fa.length/2);var Ji=this.segments2.prepareSegment(Oi.length,this.layoutVertexArray,this.indexArray2),ln=Ji.vertexLength;this.layoutVertexArray.emplaceBack(Oi[0].x,Oi[0].y),this.indexArray2.emplaceBack(ln+Oi.length-1,ln),Fa.push(Oi[0].x),Fa.push(Oi[0].y);for(var wn=1;wn<Oi.length;wn++)this.layoutVertexArray.emplaceBack(Oi[wn].x,Oi[wn].y),this.indexArray2.emplaceBack(ln+wn-1,ln+wn),Fa.push(Oi[wn].x),Fa.push(Oi[wn].y);Ji.vertexLength+=Oi.length,Ji.primitiveLength+=Oi.length}}for(var Vn=Sg(Fa,Mi),Un=0;Un<Vn.length;Un+=3)this.indexArray.emplaceBack(ua+Vn[Un],ua+Vn[Un+1],ua+Vn[Un+2]);Vr.vertexLength+=Ht,Vr.primitiveLength+=Vn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,Pe,be)},me("FillBucket",rd,{omit:["layers","patternFeatures"]});var q1=new va({"fill-sort-key":new Zt(Gi.layout_fill["fill-sort-key"])}),Vx=new va({"fill-antialias":new it(Gi.paint_fill["fill-antialias"]),"fill-opacity":new Zt(Gi.paint_fill["fill-opacity"]),"fill-color":new Zt(Gi.paint_fill["fill-color"]),"fill-outline-color":new Zt(Gi.paint_fill["fill-outline-color"]),"fill-translate":new it(Gi.paint_fill["fill-translate"]),"fill-translate-anchor":new it(Gi.paint_fill["fill-translate-anchor"]),"fill-pattern":new cr(Gi.paint_fill["fill-pattern"])}),Gp={paint:Vx,layout:q1},z0=function(k){function C(H){k.call(this,H,Gp)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(oe,be){k.prototype.recalculate.call(this,oe,be);var Pe=this.paint._values["fill-outline-color"];Pe.value.kind==="constant"&&Pe.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},C.prototype.createBucket=function(oe){return new rd(oe)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht){var er=Vp(oe,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),It.angle,Ht);return Ks(er,Ne)},C.prototype.isTileClipped=function(){return!0},C}(Ya),Gx=Ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Hx=Gx.members,V1=zv;function zv(k,C,H,oe,be){this.properties={},this.extent=H,this.type=0,this._pbf=k,this._geometry=-1,this._keys=oe,this._values=be,k.readFields(Wx,this,C)}function Wx(k,C,H){k==1?C.id=H.readVarint():k==2?Xx(H,C):k==3?C.type=H.readVarint():k==4&&(C._geometry=H.pos)}function Xx(k,C){for(var H=k.readVarint()+k.pos;k.pos<H;){var oe=C._keys[k.readVarint()],be=C._values[k.readVarint()];C.properties[oe]=be}}zv.types=["Unknown","Point","LineString","Polygon"],zv.prototype.loadGeometry=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,H=1,oe=0,be=0,Pe=0,Ne=[],ft;k.pos<C;){if(oe<=0){var It=k.readVarint();H=It&7,oe=It>>3}if(oe--,H===1||H===2)be+=k.readSVarint(),Pe+=k.readSVarint(),H===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new n(be,Pe));else if(H===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+H)}return ft&&Ne.push(ft),Ne},zv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,H=1,oe=0,be=0,Pe=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos<C;){if(oe<=0){var er=k.readVarint();H=er&7,oe=er>>3}if(oe--,H===1||H===2)be+=k.readSVarint(),Pe+=k.readSVarint(),be<Ne&&(Ne=be),be>ft&&(ft=be),Pe<It&&(It=Pe),Pe>Ht&&(Ht=Pe);else if(H!==7)throw new Error("unknown command "+H)}return[Ne,It,ft,Ht]},zv.prototype.toGeoJSON=function(k,C,H){var oe=this.extent*Math.pow(2,H),be=this.extent*k,Pe=this.extent*C,Ne=this.loadGeometry(),ft=zv.types[this.type],It,Ht;function er(Vr){for(var ua=0;ua<Vr.length;ua++){var Fa=Vr[ua],Mi=180-(Fa.y+Pe)*360/oe;Vr[ua]=[(Fa.x+be)*360/oe-180,360/Math.PI*Math.atan(Math.exp(Mi*Math.PI/180))-90]}}switch(this.type){case 1:var Lr=[];for(It=0;It<Ne.length;It++)Lr[It]=Ne[It][0];Ne=Lr,er(Ne);break;case 2:for(It=0;It<Ne.length;It++)er(Ne[It]);break;case 3:for(Ne=eA(Ne),It=0;It<Ne.length;It++)for(Ht=0;Ht<Ne[It].length;Ht++)er(Ne[It][Ht]);break}Ne.length===1?Ne=Ne[0]:ft="Multi"+ft;var Zr={type:"Feature",geometry:{type:ft,coordinates:Ne},properties:this.properties};return"id"in this&&(Zr.id=this.id),Zr};function eA(k){var C=k.length;if(C<=1)return[k];for(var H=[],oe,be,Pe=0;Pe<C;Pe++){var Ne=Zx(k[Pe]);Ne!==0&&(be===void 0&&(be=Ne<0),be===Ne<0?(oe&&H.push(oe),oe=[k[Pe]]):oe.push(k[Pe]))}return oe&&H.push(oe),H}function Zx(k){for(var C=0,H=0,oe=k.length,be=oe-1,Pe,Ne;H<oe;be=H++)Pe=k[H],Ne=k[be],C+=(Ne.x-Pe.x)*(Pe.y+Ne.y);return C}var Wd=G1;function G1(k,C){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=k,this._keys=[],this._values=[],this._features=[],k.readFields(Yx,this,C),this.length=this._features.length}function Yx(k,C,H){k===15?C.version=H.readVarint():k===1?C.name=H.readString():k===5?C.extent=H.readVarint():k===2?C._features.push(H.pos):k===3?C._keys.push(H.readString()):k===4&&C._values.push(Kx(H))}function Kx(k){for(var C=null,H=k.readVarint()+k.pos;k.pos<H;){var oe=k.readVarint()>>3;C=oe===1?k.readString():oe===2?k.readFloat():oe===3?k.readDouble():oe===4?k.readVarint64():oe===5?k.readVarint():oe===6?k.readSVarint():oe===7?k.readBoolean():null}return C}G1.prototype.feature=function(k){if(k<0||k>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[k];var C=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,C,this.extent,this._keys,this._values)};var Jx=tA;function tA(k,C){this.layers=k.readFields(rA,{},C)}function rA(k,C,H){if(k===3){var oe=new Wd(H,H.readVarint()+H.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,hm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:hm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,pm=Math.pow(2,13);function hv(k,C,H,oe,be,Pe,Ne,ft){k.emplaceBack(C,H,Math.floor(oe*pm)*2+Ne,be*pm*2,Pe*pm*2,Math.round(ft))}var cd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new di,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Po,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};cd.prototype.populate=function(C,H,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,H);for(var be=0,Pe=C;be<Pe.length;be+=1){var Ne=Pe[be],ft=Ne.feature,It=Ne.id,Ht=Ne.index,er=Ne.sourceLayerIndex,Lr=this.layers[0]._featureFilter.needGeometry,Zr=yo(ft,Lr);if(this.layers[0]._featureFilter.filter(new mn(this.zoom),Zr,oe)){var Vr={id:It,sourceLayerIndex:er,index:Ht,geometry:Lr?Zr.geometry:cn(ft),properties:ft.properties,type:ft.type,patterns:{}};this.hasPattern?this.features.push(R0("fill-extrusion",this.layers,Vr,this.zoom,H)):this.addFeature(Vr,Vr.geometry,Ht,oe,{}),H.featureIndex.insert(ft,Vr.geometry,Ht,er,this.index,!0)}}},cd.prototype.addFeatures=function(C,H,oe){for(var be=0,Pe=this.features;be<Pe.length;be+=1){var Ne=Pe[be],ft=Ne.geometry;this.addFeature(Ne,ft,Ne.index,H,oe)}},cd.prototype.update=function(C,H,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,oe)},cd.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},cd.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},cd.prototype.upload=function(C){this.uploaded||(this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,Hx),this.indexBuffer=C.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(C),this.uploaded=!0},cd.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},cd.prototype.addFeature=function(C,H,oe,be,Pe){for(var Ne=0,ft=Cg(H,Pg);Ne<ft.length;Ne+=1){for(var It=ft[Ne],Ht=0,er=0,Lr=It;er<Lr.length;er+=1){var Zr=Lr[er];Ht+=Zr.length}for(var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),ua=0,Fa=It;ua<Fa.length;ua+=1){var Mi=Fa[ua];if(Mi.length!==0&&!iA(Mi))for(var ii=0,$i=0;$i<Mi.length;$i++){var Oi=Mi[$i];if($i>=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Po.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),wn=Ji.dist(Oi);ii+wn>32768&&(ii=0),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,1,ii),ii+=wn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ii);var Vn=Vr.vertexLength;this.indexArray.emplaceBack(Vn,Vn+2,Vn+1),this.indexArray.emplaceBack(Vn+1,Vn+2,Vn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Po.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Un=[],Mo=[],so=Vr.vertexLength,mo=0,Cs=It;mo<Cs.length;mo+=1){var Eo=Cs[mo];if(Eo.length!==0){Eo!==It[0]&&Mo.push(Un.length/2);for(var Ro=0;Ro<Eo.length;Ro++){var $s=Eo[Ro];hv(this.layoutVertexArray,$s.x,$s.y,0,0,1,1,0),Un.push($s.x),Un.push($s.y)}}}for(var Ts=Sg(Un,Mo),Xl=0;Xl<Ts.length;Xl+=3)this.indexArray.emplaceBack(so+Ts[Xl],so+Ts[Xl+2],so+Ts[Xl+1]);Vr.primitiveLength+=Ts.length/3,Vr.vertexLength+=Ht}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,Pe,be)},me("FillExtrusionBucket",cd,{omit:["layers","features"]});function aA(k,C){return k.x===C.x&&(k.x<0||k.x>ui)||k.y===C.y&&(k.y<0||k.y>ui)}function iA(k){return k.every(function(C){return C.x<0})||k.every(function(C){return C.x>ui})||k.every(function(C){return C.y<0})||k.every(function(C){return C.y>ui})}var dm=new va({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new cr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:dm},pv=function(k){function C(H){k.call(this,H,wh)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new cd(oe)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht,er){var Lr=Vp(oe,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),It.angle,Ht),Zr=this.paint.get("fill-extrusion-height").evaluate(be,Pe),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Pe),ua=nA(Lr,er,It,0),Fa=W1(Ne,Vr,Zr,er),Mi=Fa[0],ii=Fa[1];return tb(Mi,ii,ua)},C}(Ya);function Fv(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var H=0,oe=C[H++],be;!be||oe.equals(be);)if(be=C[H++],!be)return 1/0;for(;H<C.length;H++){var Pe=C[H],Ne=k[0],ft=be.sub(oe),It=Pe.sub(oe),Ht=Ne.sub(oe),er=Fv(ft,ft),Lr=Fv(ft,It),Zr=Fv(It,It),Vr=Fv(Ht,ft),ua=Fv(Ht,It),Fa=er*Zr-Lr*Lr,Mi=(Zr*Vr-Lr*ua)/Fa,ii=(er*ua-Lr*Vr)/Fa,$i=1-Mi-ii,Oi=oe.z*$i+be.z*Mi+Pe.z*ii;if(isFinite(Oi))return Oi}return 1/0}else{for(var Ji=1/0,ln=0,wn=C;ln<wn.length;ln+=1){var Vn=wn[ln];Ji=Math.min(Ji,Vn.z)}return Ji}}function tb(k,C,H){var oe=1/0;Ks(H,C)&&(oe=H1(H,C[0]));for(var be=0;be<C.length;be++)for(var Pe=C[be],Ne=k[be],ft=0;ft<Pe.length-1;ft++){var It=Pe[ft],Ht=Pe[ft+1],er=Ne[ft],Lr=Ne[ft+1],Zr=[It,Ht,Lr,er,It];Fo(H,Zr)&&(oe=Math.min(oe,H1(H,Zr)))}return oe===1/0?!1:oe}function W1(k,C,H,oe){for(var be=[],Pe=[],Ne=oe[8]*C,ft=oe[9]*C,It=oe[10]*C,Ht=oe[11]*C,er=oe[8]*H,Lr=oe[9]*H,Zr=oe[10]*H,Vr=oe[11]*H,ua=0,Fa=k;ua<Fa.length;ua+=1){for(var Mi=Fa[ua],ii=[],$i=[],Oi=0,Ji=Mi;Oi<Ji.length;Oi+=1){var ln=Ji[Oi],wn=ln.x,Vn=ln.y,Un=oe[0]*wn+oe[4]*Vn+oe[12],Mo=oe[1]*wn+oe[5]*Vn+oe[13],so=oe[2]*wn+oe[6]*Vn+oe[14],mo=oe[3]*wn+oe[7]*Vn+oe[15],Cs=Un+Ne,Eo=Mo+ft,Ro=so+It,$s=mo+Ht,Ts=Un+er,Xl=Mo+Lr,zu=so+Zr,Zl=mo+Vr,Yl=new n(Cs/$s,Eo/$s);Yl.z=Ro/$s,ii.push(Yl);var Ol=new n(Ts/Zl,Xl/Zl);Ol.z=zu/Zl,$i.push(Ol)}be.push(ii),Pe.push($i)}return[be,Pe]}function nA(k,C,H,oe){for(var be=[],Pe=0,Ne=k;Pe<Ne.length;Pe+=1){var ft=Ne[Pe],It=[ft.x,ft.y,oe,1];Rv(It,It,C),be.push(new n(It[0]/It[3],It[1]/It[3]))}return be}var rb=Ei([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),ab=rb.members,oA=Ei([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),ib=oA.members,X1=Xd.VectorTileFeature.types,Ig=63,nb=Math.cos(75/2*(Math.PI/180)),F0=15,Z1=20,ob=15,Rg=1/2,O0=Math.pow(2,ob-1)/Rg,Hf=function(C){var H=this;this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(oe){return oe.id}),this.index=C.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(oe){H.gradients[oe.id]={}}),this.layoutVertexArray=new Va,this.layoutVertexArray2=new Bi,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Po,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(oe){return oe.isStateDependent()}).map(function(oe){return oe.id})};Hf.prototype.populate=function(C,H,oe){this.hasPattern=Lg("line",this.layers,H);for(var be=this.layers[0].layout.get("line-sort-key"),Pe=[],Ne=0,ft=C;Ne<ft.length;Ne+=1){var It=ft[Ne],Ht=It.feature,er=It.id,Lr=It.index,Zr=It.sourceLayerIndex,Vr=this.layers[0]._featureFilter.needGeometry,ua=yo(Ht,Vr);if(this.layers[0]._featureFilter.filter(new mn(this.zoom),ua,oe)){var Fa=be?be.evaluate(ua,{},oe):void 0,Mi={id:er,properties:Ht.properties,type:Ht.type,sourceLayerIndex:Zr,index:Lr,geometry:Vr?ua.geometry:cn(Ht),patterns:{},sortKey:Fa};Pe.push(Mi)}}be&&Pe.sort(function(so,mo){return so.sortKey-mo.sortKey});for(var ii=0,$i=Pe;ii<$i.length;ii+=1){var Oi=$i[ii],Ji=Oi,ln=Ji.geometry,wn=Ji.index,Vn=Ji.sourceLayerIndex;if(this.hasPattern){var Un=R0("line",this.layers,Oi,this.zoom,H);this.patternFeatures.push(Un)}else this.addFeature(Oi,ln,wn,oe,{});var Mo=C[wn].feature;H.featureIndex.insert(Mo,ln,wn,Vn,this.index)}},Hf.prototype.update=function(C,H,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,oe)},Hf.prototype.addFeatures=function(C,H,oe){for(var be=0,Pe=this.patternFeatures;be<Pe.length;be+=1){var Ne=Pe[be];this.addFeature(Ne,Ne.geometry,Ne.index,H,oe)}},Hf.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Hf.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Hf.prototype.upload=function(C){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=C.createVertexBuffer(this.layoutVertexArray2,ib)),this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,ab),this.indexBuffer=C.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(C),this.uploaded=!0},Hf.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Hf.prototype.lineFeatureClips=function(C){if(C.properties&&C.properties.hasOwnProperty("mapbox_clip_start")&&C.properties.hasOwnProperty("mapbox_clip_end")){var H=+C.properties.mapbox_clip_start,oe=+C.properties.mapbox_clip_end;return{start:H,end:oe}}},Hf.prototype.addFeature=function(C,H,oe,be,Pe){var Ne=this.layers[0].layout,ft=Ne.get("line-join").evaluate(C,{}),It=Ne.get("line-cap"),Ht=Ne.get("line-miter-limit"),er=Ne.get("line-round-limit");this.lineClips=this.lineFeatureClips(C);for(var Lr=0,Zr=H;Lr<Zr.length;Lr+=1){var Vr=Zr[Lr];this.addLine(Vr,C,ft,It,Ht,er)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,Pe,be)},Hf.prototype.addLine=function(C,H,oe,be,Pe,Ne){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var ft=0;ft<C.length-1;ft++)this.totalDistance+=C[ft].dist(C[ft+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var It=X1[H.type]==="Polygon",Ht=C.length;Ht>=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er<Ht-1&&C[er].equals(C[er+1]);)er++;if(!(Ht<(It?3:2))){oe==="bevel"&&(Pe=1.05);var Lr=this.overscaling<=16?F0*ui/(512*this.overscaling):0,Zr=this.segments.prepareSegment(Ht*10,this.layoutVertexArray,this.indexArray),Vr,ua=void 0,Fa=void 0,Mi=void 0,ii=void 0;this.e1=this.e2=-1,It&&(Vr=C[Ht-2],ii=C[er].sub(Vr)._unit()._perp());for(var $i=er;$i<Ht;$i++)if(Fa=$i===Ht-1?It?C[er+1]:void 0:C[$i+1],!(Fa&&C[$i].equals(Fa))){ii&&(Mi=ii),Vr&&(ua=Vr),Vr=C[$i],ii=Fa?Fa.sub(Vr)._unit()._perp():Mi,Mi=Mi||ii;var Oi=Mi.add(ii);(Oi.x!==0||Oi.y!==0)&&Oi._unit();var Ji=Mi.x*ii.x+Mi.y*ii.y,ln=Oi.x*ii.x+Oi.y*ii.y,wn=ln!==0?1/ln:1/0,Vn=2*Math.sqrt(2-2*ln),Un=ln<nb&&ua&&Fa,Mo=Mi.x*ii.y-Mi.y*ii.x>0;if(Un&&$i>er){var so=Vr.dist(ua);if(so>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/so)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Zr),ua=mo}}var Cs=ua&&Fa,Eo=Cs?oe:It?"butt":be;if(Cs&&Eo==="round"&&(wn<Ne?Eo="miter":wn<=2&&(Eo="fakeround")),Eo==="miter"&&wn>Pe&&(Eo="bevel"),Eo==="bevel"&&(wn>2&&(Eo="flipbevel"),wn<Pe&&(Eo="miter")),ua&&this.updateDistance(ua,Vr),Eo==="miter")Oi._mult(wn),this.addCurrentVertex(Vr,Oi,0,0,Zr);else if(Eo==="flipbevel"){if(wn>100)Oi=ii.mult(-1);else{var Ro=wn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Ro*(Mo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(Eo==="bevel"||Eo==="fakeround"){var $s=-Math.sqrt(wn*wn-1),Ts=Mo?$s:0,Xl=Mo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ts,Xl,Zr),Eo==="fakeround")for(var zu=Math.round(Vn*180/Math.PI/Z1),Zl=1;Zl<zu;Zl++){var Yl=Zl/zu;if(Yl!==.5){var Ol=Yl-.5,$u=1.0904+Ji*(-3.2452+Ji*(3.55645-Ji*1.43519)),hc=.848013+Ji*(-1.06021+Ji*.215638);Yl=Yl+Yl*Ol*(Yl-1)*($u*Ol*Ol+hc)}var hf=ii.sub(Mi)._mult(Yl)._add(Mi)._unit()._mult(Mo?-1:1);this.addHalfVertex(Vr,hf.x,hf.y,!1,Mo,0,Zr)}Fa&&this.addCurrentVertex(Vr,ii,-Ts,-Xl,Zr)}else if(Eo==="butt")this.addCurrentVertex(Vr,Oi,0,0,Zr);else if(Eo==="square"){var _f=ua?1:-1;this.addCurrentVertex(Vr,Oi,_f,_f,Zr)}else Eo==="round"&&(ua&&(this.addCurrentVertex(Vr,Mi,0,0,Zr),this.addCurrentVertex(Vr,Mi,1,1,Zr,!0)),Fa&&(this.addCurrentVertex(Vr,ii,-1,-1,Zr,!0),this.addCurrentVertex(Vr,ii,0,0,Zr)));if(Un&&$i<Ht-1){var gh=Vr.dist(Fa);if(gh>2*Lr){var Zf=Vr.add(Fa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,H,oe,be,Pe,Ne){Ne===void 0&&(Ne=!1);var ft=H.x+H.y*oe,It=H.y-H.x*oe,Ht=-H.x+H.y*be,er=-H.y-H.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Pe),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Pe),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,H,oe,be,Pe,Ne))},Hf.prototype.addHalfVertex=function(C,H,oe,be,Pe,Ne,ft){var It=C.x,Ht=C.y,er=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Lr=er*Rg;if(this.layoutVertexArray.emplaceBack((It<<1)+(be?1:0),(Ht<<1)+(Pe?1:0),Math.round(Ig*H)+128,Math.round(Ig*oe)+128,(Ne===0?0:Ne<0?-1:1)+1|(Lr&63)<<2,Lr>>6),this.lineClips){var Zr=this.scaledDistance-this.lineClips.start,Vr=this.lineClips.end-this.lineClips.start,ua=Zr/Vr;this.layoutVertexArray2.emplaceBack(ua,this.lineClipsArray.length)}var Fa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Fa),ft.primitiveLength++),Pe?this.e2=Fa:this.e1=Fa},Hf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Hf.prototype.updateDistance=function(C,H){this.distance+=C.dist(H),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new va({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Zt(Gi.layout_line["line-join"]),"line-miter-limit":new it(Gi.layout_line["line-miter-limit"]),"line-round-limit":new it(Gi.layout_line["line-round-limit"]),"line-sort-key":new Zt(Gi.layout_line["line-sort-key"])}),K1=new va({"line-opacity":new Zt(Gi.paint_line["line-opacity"]),"line-color":new Zt(Gi.paint_line["line-color"]),"line-translate":new it(Gi.paint_line["line-translate"]),"line-translate-anchor":new it(Gi.paint_line["line-translate-anchor"]),"line-width":new Zt(Gi.paint_line["line-width"]),"line-gap-width":new Zt(Gi.paint_line["line-gap-width"]),"line-offset":new Zt(Gi.paint_line["line-offset"]),"line-blur":new Zt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new cr(Gi.paint_line["line-pattern"]),"line-gradient":new wa(Gi.paint_line["line-gradient"])}),Dg={paint:K1,layout:Y1},sA=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(oe,be){return be=new mn(Math.floor(be.zoom),{now:be.now,fadeDuration:be.fadeDuration,zoomHistory:be.zoomHistory,transition:be.transition}),k.prototype.possiblyEvaluate.call(this,oe,be)},C.prototype.evaluate=function(oe,be,Pe,Ne){return be=g({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Pe,Ne)},C}(Zt),W=new sA(Dg.paint.properties["line-width"].specification);W.useIntegerZoom=!0;var D=function(k){function C(H){k.call(this,H,Dg),this.gradientVersion=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._handleSpecialPaintPropertyUpdate=function(oe){if(oe==="line-gradient"){var be=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=be._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%f}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(oe,be){k.prototype.recalculate.call(this,oe,be),this.paint._values["line-floorwidth"]=W.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,oe)},C.prototype.createBucket=function(oe){return new Hf(oe)},C.prototype.queryRadius=function(oe){var be=oe,Pe=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Pe/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht){var er=Vp(oe,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),It.angle,Ht),Lr=Ht/2*J(this.paint.get("line-width").evaluate(be,Pe),this.paint.get("line-gap-width").evaluate(be,Pe)),Zr=this.paint.get("line-offset").evaluate(be,Pe);return Zr&&(Ne=ve(Ne,Zr*Ht)),mu(er,Ne,Lr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function ve(k,C){for(var H=[],oe=new n(0,0),be=0;be<k.length;be++){for(var Pe=k[be],Ne=[],ft=0;ft<Pe.length;ft++){var It=Pe[ft-1],Ht=Pe[ft],er=Pe[ft+1],Lr=ft===0?oe:Ht.sub(It)._unit()._perp(),Zr=ft===Pe.length-1?oe:er.sub(Ht)._unit()._perp(),Vr=Lr._add(Zr)._unit(),ua=Vr.x*Zr.x+Vr.y*Zr.y;Vr._mult(1/ua),Ne.push(Vr._mult(C)._add(Ht))}H.push(Ne)}return H}var Ee=Ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Be=Ei([{name:"a_projected_pos",components:3,type:"Float32"}],4),Ge=Ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ct=Ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),At=Ei([{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"}]),Bt=Ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),ar=Ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),Sr=Ei([{name:"triangle",components:3,type:"Uint16"}]),zr=Ei([{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"}]),Wr=Ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),ia=Ei([{type:"Float32",name:"offsetX"}]),fa=Ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function ja(k,C,H){var oe=C.layout.get("text-transform").evaluate(H,{});return oe==="uppercase"?k=k.toLocaleUpperCase():oe==="lowercase"&&(k=k.toLocaleLowerCase()),al.applyArabicShaping&&(k=al.applyArabicShaping(k)),k}function Ka(k,C,H){return k.sections.forEach(function(oe){oe.text=ja(oe.text,C,H)}),k}function Wi(k){var C={},H={},oe=[],be=0;function Pe(ii){oe.push(k[ii]),be++}function Ne(ii,$i,Oi){var Ji=H[ii];return delete H[ii],H[$i]=Ji,oe[Ji].geometry[0].pop(),oe[Ji].geometry[0]=oe[Ji].geometry[0].concat(Oi[0]),Ji}function ft(ii,$i,Oi){var Ji=C[$i];return delete C[$i],C[ii]=Ji,oe[Ji].geometry[0].shift(),oe[Ji].geometry[0]=Oi[0].concat(oe[Ji].geometry[0]),Ji}function It(ii,$i,Oi){var Ji=Oi?$i[0][$i[0].length-1]:$i[0][0];return ii+":"+Ji.x+":"+Ji.y}for(var Ht=0;Ht<k.length;Ht++){var er=k[Ht],Lr=er.geometry,Zr=er.text?er.text.toString():null;if(!Zr){Pe(Ht);continue}var Vr=It(Zr,Lr),ua=It(Zr,Lr,!0);if(Vr in H&&ua in C&&H[Vr]!==C[ua]){var Fa=ft(Vr,ua,Lr),Mi=Ne(Vr,ua,oe[Fa].geometry);delete C[Vr],delete H[ua],H[It(Zr,oe[Mi].geometry,!0)]=Mi,oe[Fa].geometry=null}else Vr in H?Ne(Vr,ua,Lr):ua in C?ft(Vr,ua,Lr):(Pe(Ht),C[Vr]=be-1,H[ua]=be-1)}return oe.filter(function(ii){return ii.geometry})}var gi={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function qi(k){for(var C="",H=0;H<k.length;H++){var oe=k.charCodeAt(H+1)||null,be=k.charCodeAt(H-1)||null,Pe=(!oe||!ti(oe)||gi[k[H+1]])&&(!be||!ti(be)||gi[k[H-1]]);Pe&&gi[k[H]]?C+=gi[k[H]]:C+=k[H]}return C}var en=24,qn=function(k,C,H,oe,be){var Pe,Ne,ft=be*8-oe-1,It=(1<<ft)-1,Ht=It>>1,er=-7,Lr=H?be-1:0,Zr=H?-1:1,Vr=k[C+Lr];for(Lr+=Zr,Pe=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Pe=Pe*256+k[C+Lr],Lr+=Zr,er-=8);for(Ne=Pe&(1<<-er)-1,Pe>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Zr,er-=8);if(Pe===0)Pe=1-Ht;else{if(Pe===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Pe=Pe-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Pe-oe)},ko=function(k,C,H,oe,be,Pe){var Ne,ft,It,Ht=Pe*8-be-1,er=(1<<Ht)-1,Lr=er>>1,Zr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Pe-1,ua=oe?1:-1,Fa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(ft=isNaN(C)?1:0,Ne=er):(Ne=Math.floor(Math.log(C)/Math.LN2),C*(It=Math.pow(2,-Ne))<1&&(Ne--,It*=2),Ne+Lr>=1?C+=Zr/It:C+=Zr*Math.pow(2,1-Lr),C*It>=2&&(Ne++,It/=2),Ne+Lr>=er?(ft=0,Ne=er):Ne+Lr>=1?(ft=(C*It-1)*Math.pow(2,be),Ne=Ne+Lr):(ft=C*Math.pow(2,Lr-1)*Math.pow(2,be),Ne=0));be>=8;k[H+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<<be|ft,Ht+=be;Ht>0;k[H+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[H+Vr-ua]|=Fa*128},ys={read:qn,write:ko},vo=zn;function zn(k){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(k)?k:new Uint8Array(k||0),this.pos=0,this.type=0,this.length=this.buf.length}zn.Varint=0,zn.Fixed64=1,zn.Bytes=2,zn.Fixed32=5;var rs=65536*65536,jo=1/rs,Bo=12,bn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,H){for(H=H||this.length;this.pos<H;){var oe=this.readVarint(),be=oe>>3,Pe=this.pos;this.type=oe&7,k(be,C,this),this.pos===Pe&&this.skip(oe)}return C},readMessage:function(k,C){return this.readFields(k,C,this.readVarint()+this.pos)},readFixed32:function(){var k=dh(this.buf,this.pos);return this.pos+=4,k},readSFixed32:function(){var k=Rp(this.buf,this.pos);return this.pos+=4,k},readFixed64:function(){var k=dh(this.buf,this.pos)+dh(this.buf,this.pos+4)*rs;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*rs;return this.pos+=8,k},readFloat:function(){var k=ys.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=ys.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,H,oe;return oe=C[this.pos++],H=oe&127,oe<128||(oe=C[this.pos++],H|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],H|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],H|=(oe&127)<<21,oe<128)?H:(oe=C[this.pos],H|=(oe&15)<<28,ls(H,k,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var k=this.readVarint();return k%2===1?(k+1)/-2:k/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var k=this.readVarint()+this.pos,C=this.pos;return this.pos=k,k-C>=Bo&&bn?hu(this.buf,C,k):dp(this.buf,C,k)},readBytes:function(){var k=this.readVarint()+this.pos,C=this.buf.subarray(this.pos,k);return this.pos=k,C},readPackedVarint:function(k,C){if(this.type!==zn.Bytes)return k.push(this.readVarint(C));var H=No(this);for(k=k||[];this.pos<H;)k.push(this.readVarint(C));return k},readPackedSVarint:function(k){if(this.type!==zn.Bytes)return k.push(this.readSVarint());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readSVarint());return k},readPackedBoolean:function(k){if(this.type!==zn.Bytes)return k.push(this.readBoolean());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readBoolean());return k},readPackedFloat:function(k){if(this.type!==zn.Bytes)return k.push(this.readFloat());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readFloat());return k},readPackedDouble:function(k){if(this.type!==zn.Bytes)return k.push(this.readDouble());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readDouble());return k},readPackedFixed32:function(k){if(this.type!==zn.Bytes)return k.push(this.readFixed32());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readFixed32());return k},readPackedSFixed32:function(k){if(this.type!==zn.Bytes)return k.push(this.readSFixed32());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readSFixed32());return k},readPackedFixed64:function(k){if(this.type!==zn.Bytes)return k.push(this.readFixed64());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readFixed64());return k},readPackedSFixed64:function(k){if(this.type!==zn.Bytes)return k.push(this.readSFixed64());var C=No(this);for(k=k||[];this.pos<C;)k.push(this.readSFixed64());return k},skip:function(k){var C=k&7;if(C===zn.Varint)for(;this.buf[this.pos++]>127;);else if(C===zn.Bytes)this.pos=this.readVarint()+this.pos;else if(C===zn.Fixed32)this.pos+=4;else if(C===zn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+C)},writeTag:function(k,C){this.writeVarint(k<<3|C)},realloc:function(k){for(var C=this.length||16;C<this.pos+k;)C*=2;if(C!==this.length){var H=new Uint8Array(C);H.set(this.buf),this.buf=H,this.length=C}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(k){this.realloc(4),yf(this.buf,k,this.pos),this.pos+=4},writeSFixed32:function(k){this.realloc(4),yf(this.buf,k,this.pos),this.pos+=4},writeFixed64:function(k){this.realloc(8),yf(this.buf,k&-1,this.pos),yf(this.buf,Math.floor(k*jo),this.pos+4),this.pos+=8},writeSFixed64:function(k){this.realloc(8),yf(this.buf,k&-1,this.pos),yf(this.buf,Math.floor(k*jo),this.pos+4),this.pos+=8},writeVarint:function(k){if(k=+k||0,k>268435455||k<0){Ku(k,this);return}this.realloc(4),this.buf[this.pos++]=k&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=k>>>7&127)))},writeSVarint:function(k){this.writeVarint(k<0?-k*2-1:k*2)},writeBoolean:function(k){this.writeVarint(!!k)},writeString:function(k){k=String(k),this.realloc(k.length*4),this.pos++;var C=this.pos;this.pos=fc(this.buf,k,this.pos);var H=this.pos-C;H>=128&&Hp(C,H,this),this.pos=C-1,this.writeVarint(H),this.pos+=H},writeFloat:function(k){this.realloc(4),ys.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),ys.write(this.buf,k,this.pos,!0,52,8),this.pos+=8},writeBytes:function(k){var C=k.length;this.writeVarint(C),this.realloc(C);for(var H=0;H<C;H++)this.buf[this.pos++]=k[H]},writeRawMessage:function(k,C){this.pos++;var H=this.pos;k(C,this);var oe=this.pos-H;oe>=128&&Hp(H,oe,this),this.pos=H-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,H){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,H)},writePackedVarint:function(k,C){C.length&&this.writeMessage(k,Th,C)},writePackedSVarint:function(k,C){C.length&&this.writeMessage(k,rh,C)},writePackedBoolean:function(k,C){C.length&&this.writeMessage(k,Qh,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,Jh,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedFixed32:function(k,C){C.length&&this.writeMessage(k,ff,C)},writePackedSFixed32:function(k,C){C.length&&this.writeMessage(k,ah,C)},writePackedFixed64:function(k,C){C.length&&this.writeMessage(k,Fh,C)},writePackedSFixed64:function(k,C){C.length&&this.writeMessage(k,Ah,C)},writeBytesField:function(k,C){this.writeTag(k,zn.Bytes),this.writeBytes(C)},writeFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFixed32(C)},writeSFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeSFixed32(C)},writeFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeFixed64(C)},writeSFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeSFixed64(C)},writeVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeVarint(C)},writeSVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeSVarint(C)},writeStringField:function(k,C){this.writeTag(k,zn.Bytes),this.writeString(C)},writeFloatField:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFloat(C)},writeDoubleField:function(k,C){this.writeTag(k,zn.Fixed64),this.writeDouble(C)},writeBooleanField:function(k,C){this.writeVarintField(k,!!C)}};function ls(k,C,H){var oe=H.buf,be,Pe;if(Pe=oe[H.pos++],be=(Pe&112)>>4,Pe<128||(Pe=oe[H.pos++],be|=(Pe&127)<<3,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<10,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<17,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<24,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&1)<<31,Pe<128))return Ps(k,be,C);throw new Error("Expected varint not more than 10 bytes")}function No(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Ps(k,C,H){return H?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var H,oe;if(k>=0?(H=k%4294967296|0,oe=k/4294967296|0):(H=~(-k%4294967296),oe=~(-k/4294967296),H^4294967295?H=H+1|0:(H=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(H,oe,C),th(oe,C)}function Uu(k,C,H){H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos]=k&127}function th(k,C){var H=(k&7)<<4;C.buf[C.pos++]|=H|((k>>>=3)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127)))))}function Hp(k,C,H){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));H.realloc(oe);for(var be=H.pos-1;be>=k;be--)H.buf[be+oe]=H.buf[be]}function Th(k,C){for(var H=0;H<k.length;H++)C.writeVarint(k[H])}function rh(k,C){for(var H=0;H<k.length;H++)C.writeSVarint(k[H])}function Jh(k,C){for(var H=0;H<k.length;H++)C.writeFloat(k[H])}function $h(k,C){for(var H=0;H<k.length;H++)C.writeDouble(k[H])}function Qh(k,C){for(var H=0;H<k.length;H++)C.writeBoolean(k[H])}function ff(k,C){for(var H=0;H<k.length;H++)C.writeFixed32(k[H])}function ah(k,C){for(var H=0;H<k.length;H++)C.writeSFixed32(k[H])}function Fh(k,C){for(var H=0;H<k.length;H++)C.writeFixed64(k[H])}function Ah(k,C){for(var H=0;H<k.length;H++)C.writeSFixed64(k[H])}function dh(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+k[C+3]*16777216}function yf(k,C,H){k[H]=C,k[H+1]=C>>>8,k[H+2]=C>>>16,k[H+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function dp(k,C,H){for(var oe="",be=C;be<H;){var Pe=k[be],Ne=null,ft=Pe>239?4:Pe>223?3:Pe>191?2:1;if(be+ft>H)break;var It,Ht,er;ft===1?Pe<128&&(Ne=Pe):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Pe&31)<<6|It&63,Ne<=127&&(Ne=null))):ft===3?(It=k[be+1],Ht=k[be+2],(It&192)===128&&(Ht&192)===128&&(Ne=(Pe&15)<<12|(It&63)<<6|Ht&63,(Ne<=2047||Ne>=55296&&Ne<=57343)&&(Ne=null))):ft===4&&(It=k[be+1],Ht=k[be+2],er=k[be+3],(It&192)===128&&(Ht&192)===128&&(er&192)===128&&(Ne=(Pe&15)<<18|(It&63)<<12|(Ht&63)<<6|er&63,(Ne<=65535||Ne>=1114112)&&(Ne=null))),Ne===null?(Ne=65533,ft=1):Ne>65535&&(Ne-=65536,oe+=String.fromCharCode(Ne>>>10&1023|55296),Ne=56320|Ne&1023),oe+=String.fromCharCode(Ne),be+=ft}return oe}function hu(k,C,H){return bn.decode(k.subarray(C,H))}function fc(k,C,H){for(var oe=0,be,Pe;oe<C.length;oe++){if(be=C.charCodeAt(oe),be>55295&&be<57344)if(Pe)if(be<56320){k[H++]=239,k[H++]=191,k[H++]=189,Pe=be;continue}else be=Pe-55296<<10|be-56320|65536,Pe=null;else{be>56319||oe+1===C.length?(k[H++]=239,k[H++]=191,k[H++]=189):Pe=be;continue}else Pe&&(k[H++]=239,k[H++]=191,k[H++]=189,Pe=null);be<128?k[H++]=be:(be<2048?k[H++]=be>>6|192:(be<65536?k[H++]=be>>12|224:(k[H++]=be>>18|240,k[H++]=be>>12&63|128),k[H++]=be>>6&63|128),k[H++]=be&63|128)}return H}var Ju=3;function Dp(k,C,H){k===1&&H.readMessage($c,C)}function $c(k,C,H){if(k===3){var oe=H.readMessage(vm,{}),be=oe.id,Pe=oe.bitmap,Ne=oe.width,ft=oe.height,It=oe.left,Ht=oe.top,er=oe.advance;C.push({id:be,bitmap:new Ip({width:Ne+2*Ju,height:ft+2*Ju},Pe),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function vm(k,C,H){k===1?C.id=H.readVarint():k===2?C.bitmap=H.readBytes():k===3?C.width=H.readVarint():k===4?C.height=H.readVarint():k===5?C.left=H.readSVarint():k===6?C.top=H.readSVarint():k===7&&(C.advance=H.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,H=0,oe=0,be=k;oe<be.length;oe+=1){var Pe=be[oe];C+=Pe.w*Pe.h,H=Math.max(H,Pe.w)}k.sort(function(Mi,ii){return ii.h-Mi.h});for(var Ne=Math.max(Math.ceil(Math.sqrt(C/.95)),H),ft=[{x:0,y:0,w:Ne,h:1/0}],It=0,Ht=0,er=0,Lr=k;er<Lr.length;er+=1)for(var Zr=Lr[er],Vr=ft.length-1;Vr>=0;Vr--){var ua=ft[Vr];if(!(Zr.w>ua.w||Zr.h>ua.h)){if(Zr.x=ua.x,Zr.y=ua.y,Ht=Math.max(Ht,Zr.y+Zr.h),It=Math.max(It,Zr.x+Zr.w),Zr.w===ua.w&&Zr.h===ua.h){var Fa=ft.pop();Vr<ft.length&&(ft[Vr]=Fa)}else Zr.h===ua.h?(ua.x+=Zr.w,ua.w-=Zr.w):Zr.w===ua.w?(ua.y+=Zr.h,ua.h-=Zr.h):(ft.push({x:ua.x+Zr.w,y:ua.y,w:ua.w-Zr.w,h:Zr.h}),ua.y+=Zr.h,ua.h-=Zr.h);break}}return{w:It,h:Ht,fill:C/(It*Ht)||0}}var zc=1,Pf=function(C,H){var oe=H.pixelRatio,be=H.version,Pe=H.stretchX,Ne=H.stretchY,ft=H.content;this.paddedRect=C,this.pixelRatio=oe,this.stretchX=Pe,this.stretchY=Ne,this.content=ft,this.version=be},Xp={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Xp.tl.get=function(){return[this.paddedRect.x+zc,this.paddedRect.y+zc]},Xp.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-zc,this.paddedRect.y+this.paddedRect.h-zc]},Xp.tlbr.get=function(){return this.tl.concat(this.br)},Xp.displaySize.get=function(){return[(this.paddedRect.w-zc*2)/this.pixelRatio,(this.paddedRect.h-zc*2)/this.pixelRatio]},Object.defineProperties(Pf.prototype,Xp);var Zd=function(C,H){var oe={},be={};this.haveRenderCallbacks=[];var Pe=[];this.addImages(C,oe,Pe),this.addImages(H,be,Pe);var Ne=Wp(Pe),ft=Ne.w,It=Ne.h,Ht=new eh({width:ft||1,height:It||1});for(var er in C){var Lr=C[er],Zr=oe[er].paddedRect;eh.copy(Lr.data,Ht,{x:0,y:0},{x:Zr.x+zc,y:Zr.y+zc},Lr.data)}for(var Vr in H){var ua=H[Vr],Fa=be[Vr].paddedRect,Mi=Fa.x+zc,ii=Fa.y+zc,$i=ua.data.width,Oi=ua.data.height;eh.copy(ua.data,Ht,{x:0,y:0},{x:Mi,y:ii},ua.data),eh.copy(ua.data,Ht,{x:0,y:Oi-1},{x:Mi,y:ii-1},{width:$i,height:1}),eh.copy(ua.data,Ht,{x:0,y:0},{x:Mi,y:ii+Oi},{width:$i,height:1}),eh.copy(ua.data,Ht,{x:$i-1,y:0},{x:Mi-1,y:ii},{width:1,height:Oi}),eh.copy(ua.data,Ht,{x:0,y:0},{x:Mi+$i,y:ii},{width:1,height:Oi})}this.image=Ht,this.iconPositions=oe,this.patternPositions=be};Zd.prototype.addImages=function(C,H,oe){for(var be in C){var Pe=C[be],Ne={x:0,y:0,w:Pe.data.width+2*zc,h:Pe.data.height+2*zc};oe.push(Ne),H[be]=new Pf(Ne,Pe),Pe.hasRenderCallback&&this.haveRenderCallbacks.push(be)}},Zd.prototype.patchUpdatedImages=function(C,H){C.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var oe in C.updatedImages)this.patchUpdatedImage(this.iconPositions[oe],C.getImage(oe),H),this.patchUpdatedImage(this.patternPositions[oe],C.getImage(oe),H)},Zd.prototype.patchUpdatedImage=function(C,H,oe){if(!(!C||!H)&&C.version!==H.version){C.version=H.version;var be=C.tl,Pe=be[0],Ne=be[1];oe.update(H.data,void 0,{x:Pe,y:Ne})}},me("ImagePosition",Pf),me("ImageAtlas",Zd);var vp={horizontal:1,vertical:2,horizontalOnly:3},mm=-17;function J1(k){for(var C=0,H=k;C<H.length;C+=1){var oe=H[C];if(oe.positionedGlyphs.length!==0)return!1}return!0}var zg=57344,xd=63743,Ov=function(){this.scale=1,this.fontStack="",this.imageName=null};Ov.forText=function(C,H){var oe=new Ov;return oe.scale=C||1,oe.fontStack=H,oe},Ov.forImage=function(C){var H=new Ov;return H.imageName=C,H};var vh=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};vh.fromFeature=function(C,H){for(var oe=new vh,be=0;be<C.sections.length;be++){var Pe=C.sections[be];Pe.image?oe.addImageSection(Pe):oe.addTextSection(Pe,H)}return oe},vh.prototype.length=function(){return this.text.length},vh.prototype.getSection=function(C){return this.sections[this.sectionIndex[C]]},vh.prototype.getSectionIndex=function(C){return this.sectionIndex[C]},vh.prototype.getCharCode=function(C){return this.text.charCodeAt(C)},vh.prototype.verticalizePunctuation=function(){this.text=qi(this.text)},vh.prototype.trim=function(){for(var C=0,H=0;H<this.text.length&&bd[this.text.charCodeAt(H)];H++)C++;for(var oe=this.text.length,be=this.text.length-1;be>=0&&be>=C&&bd[this.text.charCodeAt(be)];be--)oe--;this.text=this.text.substring(C,oe),this.sectionIndex=this.sectionIndex.slice(C,oe)},vh.prototype.substring=function(C,H){var oe=new vh;return oe.text=this.text.substring(C,H),oe.sectionIndex=this.sectionIndex.slice(C,H),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(H,oe){return Math.max(H,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,H){this.text+=C.text,this.sections.push(Ov.forText(C.scale,C.fontStack||H));for(var oe=this.sections.length-1,be=0;be<C.text.length;++be)this.sectionIndex.push(oe)},vh.prototype.addImageSection=function(C){var H=C.image?C.image.name:"";if(H.length===0){B("Can't add FormattedSection with an empty image.");return}var oe=this.getNextImageSectionCharCode();if(!oe){B("Reached maximum number of images "+(xd-zg+2));return}this.text+=String.fromCharCode(oe),this.sections.push(Ov.forImage(H)),this.sectionIndex.push(this.sections.length-1)},vh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=xd?null:++this.imageSectionID:(this.imageSectionID=zg,this.imageSectionID)};function lA(k,C){for(var H=[],oe=k.text,be=0,Pe=0,Ne=C;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];H.push(k.substring(be,ft)),be=ft}return be<oe.length&&H.push(k.substring(be,oe.length)),H}function Fg(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa){var Mi=vh.fromFeature(k,be);Lr===vp.vertical&&Mi.verticalizePunctuation();var ii,$i=al.processBidirectionalText,Oi=al.processStyledBidirectionalText;if($i&&Mi.sections.length===1){ii=[];for(var Ji=$i(Mi.toString(),Og(Mi,Ht,Pe,C,oe,Vr,ua)),ln=0,wn=Ji;ln<wn.length;ln+=1){var Vn=wn[ln],Un=new vh;Un.text=Vn,Un.sections=Mi.sections;for(var Mo=0;Mo<Vn.length;Mo++)Un.sectionIndex.push(0);ii.push(Un)}}else if(Oi){ii=[];for(var so=Oi(Mi.text,Mi.sectionIndex,Og(Mi,Ht,Pe,C,oe,Vr,ua)),mo=0,Cs=so;mo<Cs.length;mo+=1){var Eo=Cs[mo],Ro=new vh;Ro.text=Eo[0],Ro.sectionIndex=Eo[1],Ro.sections=Mi.sections,ii.push(Ro)}}else ii=lA(Mi,Og(Mi,Ht,Pe,C,oe,Vr,ua));var $s=[],Ts={positionedLines:$s,text:Mi.toString(),top:er[1],bottom:er[1],left:er[0],right:er[0],writingMode:Lr,iconsInText:!1,verticalizable:!1};return fA(Ts,C,H,oe,ii,Ne,ft,It,Lr,Ht,Zr,Fa),J1($s)?!1:Ts}var bd={};bd[9]=!0,bd[10]=!0,bd[11]=!0,bd[12]=!0,bd[13]=!0,bd[32]=!0;var mp={};mp[10]=!0,mp[32]=!0,mp[38]=!0,mp[40]=!0,mp[41]=!0,mp[43]=!0,mp[45]=!0,mp[47]=!0,mp[173]=!0,mp[183]=!0,mp[8203]=!0,mp[8208]=!0,mp[8211]=!0,mp[8231]=!0;function sb(k,C,H,oe,be,Pe){if(C.imageName){var It=oe[C.imageName];return It?It.displaySize[0]*C.scale*en/Pe+be:0}else{var Ne=H[C.fontStack],ft=Ne&&Ne[k];return ft?ft.metrics.advance*C.scale+be:0}}function uA(k,C,H,oe,be,Pe){for(var Ne=0,ft=0;ft<k.length();ft++){var It=k.getSection(ft);Ne+=sb(k.getCharCode(ft),It,oe,be,C,Pe)}var Ht=Math.max(1,Math.ceil(Ne/H));return Ne/Ht}function lb(k,C,H,oe){var be=Math.pow(k-C,2);return oe?k<C?be/2:be*2:be+Math.abs(H)*H}function cA(k,C,H){var oe=0;return k===10&&(oe-=1e4),H&&(oe+=150),(k===40||k===65288)&&(oe+=50),(C===41||C===65289)&&(oe+=50),oe}function ad(k,C,H,oe,be,Pe){for(var Ne=null,ft=lb(C,H,be,Pe),It=0,Ht=oe;It<Ht.length;It+=1){var er=Ht[It],Lr=C-er.x,Zr=lb(Lr,H,be,Pe)+er.badness;Zr<=ft&&(Ne=er,ft=Zr)}return{index:k,x:C,priorBreak:Ne,badness:ft}}function B0(k){return k?B0(k.priorBreak).concat(k.index):[]}function Og(k,C,H,oe,be,Pe,Ne){if(Pe!=="point")return[];if(!k)return[];for(var ft=[],It=uA(k,C,H,oe,be,Ne),Ht=k.text.indexOf("\u200B")>=0,er=0,Lr=0;Lr<k.length();Lr++){var Zr=k.getSection(Lr),Vr=k.getCharCode(Lr);if(bd[Vr]||(er+=sb(Vr,Zr,oe,be,C,Ne)),Lr<k.length()-1){var ua=xa(Vr);(mp[Vr]||ua||Zr.imageName)&&ft.push(ad(Lr+1,er,It,ft,cA(Vr,k.getCharCode(Lr+1),ua&&Ht),!1))}}return B0(ad(k.length(),er,It,ft,0,!0))}function $1(k){var C=.5,H=.5;switch(k){case"right":case"top-right":case"bottom-right":C=1;break;case"left":case"top-left":case"bottom-left":C=0;break}switch(k){case"bottom":case"bottom-right":case"bottom-left":H=1;break;case"top":case"top-right":case"top-left":H=0;break}return{horizontalAlign:C,verticalAlign:H}}function fA(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr){for(var Zr=0,Vr=mm,ua=0,Fa=0,Mi=ft==="right"?1:ft==="left"?0:.5,ii=0,$i=0,Oi=be;$i<Oi.length;$i+=1){var Ji=Oi[$i];Ji.trim();var ln=Ji.getMaxScale(),wn=(ln-1)*en,Vn={positionedGlyphs:[],lineOffset:0};k.positionedLines[ii]=Vn;var Un=Vn.positionedGlyphs,Mo=0;if(!Ji.length()){Vr+=Pe,++ii;continue}for(var so=0;so<Ji.length();so++){var mo=Ji.getSection(so),Cs=Ji.getSectionIndex(so),Eo=Ji.getCharCode(so),Ro=0,$s=null,Ts=null,Xl=null,zu=en,Zl=!(It===vp.horizontal||!er&&!pa(Eo)||er&&(bd[Eo]||Sa(Eo)));if(mo.imageName){var hf=oe[mo.imageName];if(!hf)continue;Xl=mo.imageName,k.iconsInText=k.iconsInText||!0,Ts=hf.paddedRect;var _f=hf.displaySize;mo.scale=mo.scale*en/Lr,$s={width:_f[0],height:_f[1],left:zc,top:-fd,advance:Zl?_f[1]:_f[0]};var gh=en-_f[1]*mo.scale;Ro=wn+gh,zu=$s.advance;var Zf=Zl?_f[0]*mo.scale-en*ln:_f[1]*mo.scale-en*ln;Zf>0&&Zf>Mo&&(Mo=Zf)}else{var Yl=H[mo.fontStack],Ol=Yl&&Yl[Eo];if(Ol&&Ol.rect)Ts=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[Eo];if(!hc)continue;$s=hc.metrics}Ro=(ln-mo.scale)*en}Zl?(k.verticalizable=!0,Un.push({glyph:Eo,imageName:Xl,x:Zr,y:Vr+Ro,vertical:Zl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Cs,metrics:$s,rect:Ts}),Zr+=zu*mo.scale+Ht):(Un.push({glyph:Eo,imageName:Xl,x:Zr,y:Vr+Ro,vertical:Zl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Cs,metrics:$s,rect:Ts}),Zr+=$s.advance*mo.scale+Ht)}if(Un.length!==0){var tp=Zr-Ht;ua=Math.max(tp,ua),hA(Un,0,Un.length-1,Mi,Mo)}Zr=0;var rp=Pe*ln+Mo;Vn.lineOffset=Math.max(Mo,wn),Vr+=rp,Fa=Math.max(rp,Fa),++ii}var yh=Vr-mm,gp=$1(Ne),yp=gp.horizontalAlign,ih=gp.verticalAlign;Oh(k.positionedLines,Mi,yp,ih,ua,Fa,Pe,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-yp*ua,k.right=k.left+ua}function hA(k,C,H,oe,be){if(!(!oe&&!be))for(var Pe=k[H],Ne=Pe.metrics.advance*Pe.scale,ft=(k[H].x+Ne)*oe,It=C;It<=H;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,H,oe,be,Pe,Ne,ft,It){var Ht=(C-H)*be,er=0;Pe!==Ne?er=-ft*oe-mm:er=(-oe*It+.5)*Ne;for(var Lr=0,Zr=k;Lr<Zr.length;Lr+=1)for(var Vr=Zr[Lr],ua=0,Fa=Vr.positionedGlyphs;ua<Fa.length;ua+=1){var Mi=Fa[ua];Mi.x+=Ht,Mi.y+=er}}function Zp(k,C,H){var oe=$1(H),be=oe.horizontalAlign,Pe=oe.verticalAlign,Ne=C[0],ft=C[1],It=Ne-k.displaySize[0]*be,Ht=It+k.displaySize[0],er=ft-k.displaySize[1]*Pe,Lr=er+k.displaySize[1];return{image:k,top:er,bottom:Lr,left:It,right:Ht}}function dv(k,C,H,oe,be,Pe){var Ne=k.image,ft;if(Ne.content){var It=Ne.content,Ht=Ne.pixelRatio||1;ft=[It[0]/Ht,It[1]/Ht,Ne.displaySize[0]-It[2]/Ht,Ne.displaySize[1]-It[3]/Ht]}var er=C.left*Pe,Lr=C.right*Pe,Zr,Vr,ua,Fa;H==="width"||H==="both"?(Fa=be[0]+er-oe[3],Vr=be[0]+Lr+oe[1]):(Fa=be[0]+(er+Lr-Ne.displaySize[0])/2,Vr=Fa+Ne.displaySize[0]);var Mi=C.top*Pe,ii=C.bottom*Pe;return H==="height"||H==="both"?(Zr=be[1]+Mi-oe[0],ua=be[1]+ii+oe[2]):(Zr=be[1]+(Mi+ii-Ne.displaySize[1])/2,ua=Zr+Ne.displaySize[1]),{image:Ne,top:Zr,right:Vr,bottom:ua,left:Fa,collisionPadding:ft}}var ep=function(k){function C(H,oe,be,Pe){k.call(this,H,oe),this.angle=be,Pe!==void 0&&(this.segment=Pe)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.clone=function(){return new C(this.x,this.y,this.angle,this.segment)},C}(n);me("Anchor",ep);var Bh=128;function id(k,C){var H=C.expression;if(H.kind==="constant"){var oe=H.evaluate(new mn(k+1));return{kind:"constant",layoutSize:oe}}else{if(H.kind==="source")return{kind:"source"};for(var be=H.zoomStops,Pe=H.interpolationType,Ne=0;Ne<be.length&&be[Ne]<=k;)Ne++;Ne=Math.max(0,Ne-1);for(var ft=Ne;ft<be.length&&be[ft]<k+1;)ft++;ft=Math.min(be.length-1,ft);var It=be[Ne],Ht=be[ft];if(H.kind==="composite")return{kind:"composite",minZoom:It,maxZoom:Ht,interpolationType:Pe};var er=H.evaluate(new mn(It)),Lr=H.evaluate(new mn(Ht));return{kind:"camera",minZoom:It,maxZoom:Ht,minSize:er,maxSize:Lr,interpolationType:Pe}}}function gk(k,C,H){var oe=C.uSize,be=C.uSizeT,Pe=H.lowerSize,Ne=H.upperSize;return k.kind==="source"?Pe/Bh:k.kind==="composite"?El(Pe/Bh,Ne/Bh,be):oe}function yk(k,C){var H=0,oe=0;if(k.kind==="constant")oe=k.layoutSize;else if(k.kind!=="source"){var be=k.interpolationType,Pe=k.minZoom,Ne=k.maxZoom,ft=be?l(iu.interpolationFactor(be,C,Pe,Ne),0,1):0;k.kind==="camera"?oe=El(k.minSize,k.maxSize,ft):H=ft}return{uSizeT:H,uSize:oe}}var yW=Object.freeze({__proto__:null,getSizeData:id,evaluateSizeForFeature:gk,evaluateSizeForZoom:yk,SIZE_PACK_FACTOR:Bh});function _k(k,C,H,oe,be){if(C.segment===void 0)return!0;for(var Pe=C,Ne=C.segment+1,ft=0;ft>-H/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Pe),Pe=k[Ne]}ft+=k[Ne].dist(k[Ne+1]),Ne++;for(var It=[],Ht=0;ft<H/2;){var er=k[Ne-1],Lr=k[Ne],Zr=k[Ne+1];if(!Zr)return!1;var Vr=er.angleTo(Lr)-Lr.angleTo(Zr);for(Vr=Math.abs((Vr+3*Math.PI)%(Math.PI*2)-Math.PI),It.push({distance:ft,angleDelta:Vr}),Ht+=Vr;ft-It[0].distance>oe;)Ht-=It.shift().angleDelta;if(Ht>be)return!1;Ne++,ft+=Lr.dist(Zr)}return!0}function xk(k){for(var C=0,H=0;H<k.length-1;H++)C+=k[H].dist(k[H+1]);return C}function bk(k,C,H){return k?3/5*C*H:0}function wk(k,C){return Math.max(k?k.right-k.left:0,C?C.right-C.left:0)}function _W(k,C,H,oe,be,Pe){for(var Ne=bk(H,be,Pe),ft=wk(H,oe)*Pe,It=0,Ht=xk(k)/2,er=0;er<k.length-1;er++){var Lr=k[er],Zr=k[er+1],Vr=Lr.dist(Zr);if(It+Vr>Ht){var ua=(Ht-It)/Vr,Fa=El(Lr.x,Zr.x,ua),Mi=El(Lr.y,Zr.y,ua),ii=new ep(Fa,Mi,Zr.angleTo(Lr),er);return ii._round(),!Ne||_k(k,ii,ft,Ne,C)?ii:void 0}It+=Vr}}function xW(k,C,H,oe,be,Pe,Ne,ft,It){var Ht=bk(oe,Pe,Ne),er=wk(oe,be),Lr=er*Ne,Zr=k[0].x===0||k[0].x===It||k[0].y===0||k[0].y===It;C-Lr<C/4&&(C=Lr+C/4);var Vr=Pe*2,ua=Zr?C/2*ft%C:(er/2+Vr)*Ne*ft%C;return Tk(k,ua,C,Ht,H,Lr,Zr,!1,It)}function Tk(k,C,H,oe,be,Pe,Ne,ft,It){for(var Ht=Pe/2,er=xk(k),Lr=0,Zr=C-H,Vr=[],ua=0;ua<k.length-1;ua++){for(var Fa=k[ua],Mi=k[ua+1],ii=Fa.dist(Mi),$i=Mi.angleTo(Fa);Zr+H<Lr+ii;){Zr+=H;var Oi=(Zr-Lr)/ii,Ji=El(Fa.x,Mi.x,Oi),ln=El(Fa.y,Mi.y,Oi);if(Ji>=0&&Ji<It&&ln>=0&&ln<It&&Zr-Ht>=0&&Zr+Ht<=er){var wn=new ep(Ji,ln,$i,ua);wn._round(),(!oe||_k(k,wn,Pe,oe,be))&&Vr.push(wn)}}Lr+=ii}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,H,oe,be,Pe,Ne,!0,It)),Vr}function Ak(k,C,H,oe,be){for(var Pe=[],Ne=0;Ne<k.length;Ne++)for(var ft=k[Ne],It=void 0,Ht=0;Ht<ft.length-1;Ht++){var er=ft[Ht],Lr=ft[Ht+1];er.x<C&&Lr.x<C||(er.x<C?er=new n(C,er.y+(Lr.y-er.y)*((C-er.x)/(Lr.x-er.x)))._round():Lr.x<C&&(Lr=new n(C,er.y+(Lr.y-er.y)*((C-er.x)/(Lr.x-er.x)))._round()),!(er.y<H&&Lr.y<H)&&(er.y<H?er=new n(er.x+(Lr.x-er.x)*((H-er.y)/(Lr.y-er.y)),H)._round():Lr.y<H&&(Lr=new n(er.x+(Lr.x-er.x)*((H-er.y)/(Lr.y-er.y)),H)._round()),!(er.x>=oe&&Lr.x>=oe)&&(er.x>=oe?er=new n(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new n(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round()),!(er.y>=be&&Lr.y>=be)&&(er.y>=be?er=new n(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new n(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Pe.push(It)),It.push(Lr)))))}return Pe}var Bg=zc;function Sk(k,C,H,oe){var be=[],Pe=k.image,Ne=Pe.pixelRatio,ft=Pe.paddedRect.w-2*Bg,It=Pe.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Pe.stretchX||[[0,ft]],Zr=Pe.stretchY||[[0,It]],Vr=function(Yl,Ol){return Yl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Fa=Zr.reduce(Vr,0),Mi=ft-ua,ii=It-Fa,$i=0,Oi=ua,Ji=0,ln=Fa,wn=0,Vn=Mi,Un=0,Mo=ii;if(Pe.content&&oe){var so=Pe.content;$i=ub(Lr,0,so[0]),Ji=ub(Zr,0,so[1]),Oi=ub(Lr,so[0],so[2]),ln=ub(Zr,so[1],so[3]),wn=so[0]-$i,Un=so[1]-Ji,Vn=so[2]-so[0]-Oi,Mo=so[3]-so[1]-ln}var mo=function(Yl,Ol,$u,hc){var hf=cb(Yl.stretch-$i,Oi,Ht,k.left),_f=fb(Yl.fixed-wn,Vn,Yl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Un,Mo,Ol.stretch,Fa),tp=cb($u.stretch-$i,Oi,Ht,k.left),rp=fb($u.fixed-wn,Vn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),gp=fb(hc.fixed-Un,Mo,hc.stretch,Fa),yp=new n(hf,gh),ih=new n(tp,gh),_p=new n(tp,yh),nd=new n(hf,yh),Uv=new n(_f/Ne,Zf/Ne),_m=new n(rp/Ne,gp/Ne),xm=C*Math.PI/180;if(xm){var bm=Math.sin(xm),Wg=Math.cos(xm),wd=[Wg,-bm,bm,Wg];yp._matMult(wd),ih._matMult(wd),nd._matMult(wd),_p._matMult(wd)}var gb=Yl.stretch+Yl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Pe.paddedRect.x+Bg+gb,y:Pe.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=Vn/Ne/Ht,_b=Mo/Ne/er;return{tl:yp,tr:ih,bl:nd,br:_p,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Uv,pixelOffsetBR:_m,minFontScaleX:Xg,minFontScaleY:_b,isSDF:H}};if(!oe||!Pe.stretchX&&!Pe.stretchY)be.push(mo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ft+1},{fixed:0,stretch:It+1}));else for(var Cs=Mk(Lr,Mi,ua),Eo=Mk(Zr,ii,Fa),Ro=0;Ro<Cs.length-1;Ro++)for(var $s=Cs[Ro],Ts=Cs[Ro+1],Xl=0;Xl<Eo.length-1;Xl++){var zu=Eo[Xl],Zl=Eo[Xl+1];be.push(mo($s,zu,Ts,Zl))}return be}function ub(k,C,H){for(var oe=0,be=0,Pe=k;be<Pe.length;be+=1){var Ne=Pe[be];oe+=Math.max(C,Math.min(H,Ne[1]))-Math.max(C,Math.min(H,Ne[0]))}return oe}function Mk(k,C,H){for(var oe=[{fixed:-Bg,stretch:0}],be=0,Pe=k;be<Pe.length;be+=1){var Ne=Pe[be],ft=Ne[0],It=Ne[1],Ht=oe[oe.length-1];oe.push({fixed:ft-Ht.stretch,stretch:Ht.stretch}),oe.push({fixed:ft-Ht.stretch,stretch:Ht.stretch+(It-ft)})}return oe.push({fixed:C+Bg,stretch:H}),oe}function cb(k,C,H,oe){return k/C*H+oe}function fb(k,C,H,oe){return k-C*H/oe}function bW(k,C,H,oe,be,Pe,Ne,ft){for(var It=oe.layout.get("text-rotate").evaluate(Pe,{})*Math.PI/180,Ht=[],er=0,Lr=C.positionedLines;er<Lr.length;er+=1)for(var Zr=Lr[er],Vr=0,ua=Zr.positionedGlyphs;Vr<ua.length;Vr+=1){var Fa=ua[Vr];if(Fa.rect){var Mi=Fa.rect||{},ii=1,$i=fd+ii,Oi=!0,Ji=1,ln=0,wn=(be||ft)&&Fa.vertical,Vn=Fa.metrics.advance*Fa.scale/2;if(ft&&C.verticalizable){var Un=(Fa.scale-1)*en,Mo=(en-Fa.metrics.width*Fa.scale)/2;ln=Zr.lineOffset/2-(Fa.imageName?-Mo:Un)}if(Fa.imageName){var so=Ne[Fa.imageName];Oi=so.sdf,Ji=so.pixelRatio,$i=zc/Ji}var mo=be?[Fa.x+Vn,Fa.y]:[0,0],Cs=be?[0,0]:[Fa.x+Vn+H[0],Fa.y+H[1]-ln],Eo=[0,0];wn&&(Eo=Cs,Cs=[0,0]);var Ro=(Fa.metrics.left-$i)*Fa.scale-Vn+Cs[0],$s=(-Fa.metrics.top-$i)*Fa.scale+Cs[1],Ts=Ro+Mi.w*Fa.scale/Ji,Xl=$s+Mi.h*Fa.scale/Ji,zu=new n(Ro,$s),Zl=new n(Ts,$s),Yl=new n(Ro,Xl),Ol=new n(Ts,Xl);if(wn){var $u=new n(-Vn,Vn-mm),hc=-Math.PI/2,hf=en/2-Vn,_f=Fa.imageName?hf:0,gh=new n(5-mm-hf,-_f),Zf=new(Function.prototype.bind.apply(n,[null].concat(Eo)));zu._rotateAround(hc,$u)._add(gh)._add(Zf),Zl._rotateAround(hc,$u)._add(gh)._add(Zf),Yl._rotateAround(hc,$u)._add(gh)._add(Zf),Ol._rotateAround(hc,$u)._add(gh)._add(Zf)}if(It){var tp=Math.sin(It),rp=Math.cos(It),yh=[rp,-tp,tp,rp];zu._matMult(yh),Zl._matMult(yh),Yl._matMult(yh),Ol._matMult(yh)}var gp=new n(0,0),yp=new n(0,0),ih=0,_p=0;Ht.push({tl:zu,tr:Zl,bl:Yl,br:Ol,tex:Mi,writingMode:C.writingMode,glyphOffset:mo,sectionIndex:Fa.sectionIndex,isSDF:Oi,pixelOffsetTL:gp,pixelOffsetBR:yp,minFontScaleX:ih,minFontScaleY:_p})}}return Ht}var hb=function(C,H,oe,be,Pe,Ne,ft,It,Ht,er){if(this.boxStartIndex=C.length,Ht){var Lr=Ne.top,Zr=Ne.bottom,Vr=Ne.collisionPadding;Vr&&(Lr-=Vr[1],Zr+=Vr[3]);var ua=Zr-Lr;ua>0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Fa=Ne.top*ft-It,Mi=Ne.bottom*ft+It,ii=Ne.left*ft-It,$i=Ne.right*ft+It,Oi=Ne.collisionPadding;if(Oi&&(ii-=Oi[0]*ft,Fa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new n(ii,Fa),ln=new n($i,Fa),wn=new n(ii,Mi),Vn=new n($i,Mi),Un=er*Math.PI/180;Ji._rotate(Un),ln._rotate(Un),wn._rotate(Un),Vn._rotate(Un),ii=Math.min(Ji.x,ln.x,wn.x,Vn.x),$i=Math.max(Ji.x,ln.x,wn.x,Vn.x),Fa=Math.min(Ji.y,ln.y,wn.y,Vn.y),Mi=Math.max(Ji.y,ln.y,wn.y,Vn.y)}C.emplaceBack(H.x,H.y,ii,Fa,$i,Mi,oe,be,Pe)}this.boxEndIndex=C.length},Ng=function(C,H){if(C===void 0&&(C=[]),H===void 0&&(H=wW),this.data=C,this.length=this.data.length,this.compare=H,this.length>0)for(var oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)};Ng.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},Ng.prototype.pop=function(){if(this.length!==0){var C=this.data[0],H=this.data.pop();return this.length--,this.length>0&&(this.data[0]=H,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var H=this,oe=H.data,be=H.compare,Pe=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Pe,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Pe},Ng.prototype._down=function(C){for(var H=this,oe=H.data,be=H.compare,Pe=this.length>>1,Ne=oe[C];C<Pe;){var ft=(C<<1)+1,It=oe[ft],Ht=ft+1;if(Ht<this.length&&be(oe[Ht],It)<0&&(ft=Ht,It=oe[Ht]),be(It,Ne)>=0)break;oe[C]=It,C=ft}oe[C]=Ne};function wW(k,C){return k<C?-1:k>C?1:0}function TW(k,C,H){C===void 0&&(C=1),H===void 0&&(H=!1);for(var oe=1/0,be=1/0,Pe=-1/0,Ne=-1/0,ft=k[0],It=0;It<ft.length;It++){var Ht=ft[It];(!It||Ht.x<oe)&&(oe=Ht.x),(!It||Ht.y<be)&&(be=Ht.y),(!It||Ht.x>Pe)&&(Pe=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Pe-oe,Lr=Ne-be,Zr=Math.min(er,Lr),Vr=Zr/2,ua=new Ng([],AW);if(Zr===0)return new n(oe,be);for(var Fa=oe;Fa<Pe;Fa+=Zr)for(var Mi=be;Mi<Ne;Mi+=Zr)ua.push(new Ug(Fa+Vr,Mi+Vr,Vr,k));for(var ii=MW(k),$i=ua.length;ua.length;){var Oi=ua.pop();(Oi.d>ii.d||!ii.d)&&(ii=Oi,H&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ii.d<=C)&&(Vr=Oi.h/2,ua.push(new Ug(Oi.p.x-Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x-Vr,Oi.p.y+Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y+Vr,Vr,k)),$i+=4)}return H&&(console.log("num probes: "+$i),console.log("best distance: "+ii.d)),ii.p}function AW(k,C){return C.max-k.max}function Ug(k,C,H,oe){this.p=new n(k,C),this.h=H,this.d=SW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function SW(k,C){for(var H=!1,oe=1/0,be=0;be<C.length;be++)for(var Pe=C[be],Ne=0,ft=Pe.length,It=ft-1;Ne<ft;It=Ne++){var Ht=Pe[Ne],er=Pe[It];Ht.y>k.y!=er.y>k.y&&k.x<(er.x-Ht.x)*(k.y-Ht.y)/(er.y-Ht.y)+Ht.x&&(H=!H),oe=Math.min(oe,qd(k,Ht,er))}return(H?1:-1)*Math.sqrt(oe)}function MW(k){for(var C=0,H=0,oe=0,be=k[0],Pe=0,Ne=be.length,ft=Ne-1;Pe<Ne;ft=Pe++){var It=be[Pe],Ht=be[ft],er=It.x*Ht.y-Ht.x*It.y;H+=(It.x+Ht.x)*er,oe+=(It.y+Ht.y)*er,C+=er*3}return new Ug(H/C,oe/C,0,k)}var jg=7,pA=Number.POSITIVE_INFINITY;function Ek(k,C){function H(be,Pe){var Ne=0,ft=0;Pe<0&&(Pe=0);var It=Pe/Math.sqrt(2);switch(be){case"top-right":case"top-left":ft=It-jg;break;case"bottom-right":case"bottom-left":ft=-It+jg;break;case"bottom":ft=-Pe+jg;break;case"top":ft=Pe-jg;break}switch(be){case"top-right":case"bottom-right":Ne=-It;break;case"top-left":case"bottom-left":Ne=It;break;case"left":Ne=Pe;break;case"right":Ne=-Pe;break}return[Ne,ft]}function oe(be,Pe,Ne){var ft=0,It=0;switch(Pe=Math.abs(Pe),Ne=Math.abs(Ne),be){case"top-right":case"top-left":case"top":It=Ne-jg;break;case"bottom-right":case"bottom-left":case"bottom":It=-Ne+jg;break}switch(be){case"top-right":case"bottom-right":case"right":ft=-Pe;break;case"top-left":case"bottom-left":case"left":ft=Pe;break}return[ft,It]}return C[1]!==pA?oe(k,C[0],C[1]):H(k,C[0])}function EW(k,C,H,oe,be,Pe,Ne){k.createArrays();var ft=512*k.overscaling;k.tilePixelRatio=ui/ft,k.compareText={},k.iconsNeedLinear=!1;var It=k.layers[0].layout,Ht=k.layers[0]._unevaluatedLayout._values,er={};if(k.textSizeData.kind==="composite"){var Lr=k.textSizeData,Zr=Lr.minZoom,Vr=Lr.maxZoom;er.compositeTextSizes=[Ht["text-size"].possiblyEvaluate(new mn(Zr),Ne),Ht["text-size"].possiblyEvaluate(new mn(Vr),Ne)]}if(k.iconSizeData.kind==="composite"){var ua=k.iconSizeData,Fa=ua.minZoom,Mi=ua.maxZoom;er.compositeIconSizes=[Ht["icon-size"].possiblyEvaluate(new mn(Fa),Ne),Ht["icon-size"].possiblyEvaluate(new mn(Mi),Ne)]}er.layoutTextSize=Ht["text-size"].possiblyEvaluate(new mn(k.zoom+1),Ne),er.layoutIconSize=Ht["icon-size"].possiblyEvaluate(new mn(k.zoom+1),Ne),er.textMaxSize=Ht["text-size"].possiblyEvaluate(new mn(18));for(var ii=It.get("text-line-height")*en,$i=It.get("text-rotation-alignment")==="map"&&It.get("symbol-placement")!=="point",Oi=It.get("text-keep-upright"),Ji=It.get("text-size"),ln=function(){var Un=Vn[wn],Mo=It.get("text-font").evaluate(Un,{},Ne).join(","),so=Ji.evaluate(Un,{},Ne),mo=er.layoutTextSize.evaluate(Un,{},Ne),Cs=er.layoutIconSize.evaluate(Un,{},Ne),Eo={horizontal:{},vertical:void 0},Ro=Un.text,$s=[0,0];if(Ro){var Ts=Ro.toString(),Xl=It.get("text-letter-spacing").evaluate(Un,{},Ne)*en,zu=Gr(Ts)?Xl:0,Zl=It.get("text-anchor").evaluate(Un,{},Ne),Yl=It.get("text-variable-anchor");if(!Yl){var Ol=It.get("text-radial-offset").evaluate(Un,{},Ne);Ol?$s=Ek(Zl,[Ol*en,pA]):$s=It.get("text-offset").evaluate(Un,{},Ne).map(function(Uv){return Uv*en})}var $u=$i?"center":It.get("text-justify").evaluate(Un,{},Ne),hc=It.get("symbol-placement"),hf=hc==="point"?It.get("text-max-width").evaluate(Un,{},Ne)*en:0,_f=function(){k.allowVerticalPlacement&&_r(Ts)&&(Eo.vertical=Fg(Ro,C,H,be,Mo,hf,ii,Zl,"left",zu,$s,vp.vertical,!0,hc,mo,so))};if(!$i&&Yl){for(var gh=$u==="auto"?Yl.map(function(Uv){return dA(Uv)}):[$u],Zf=!1,tp=0;tp<gh.length;tp++){var rp=gh[tp];if(!Eo.horizontal[rp])if(Zf)Eo.horizontal[rp]=Eo.horizontal[0];else{var yh=Fg(Ro,C,H,be,Mo,hf,ii,"center",rp,zu,$s,vp.horizontal,!1,hc,mo,so);yh&&(Eo.horizontal[rp]=yh,Zf=yh.positionedLines.length===1)}}_f()}else{$u==="auto"&&($u=dA(Zl));var gp=Fg(Ro,C,H,be,Mo,hf,ii,Zl,$u,zu,$s,vp.horizontal,!1,hc,mo,so);gp&&(Eo.horizontal[$u]=gp),_f(),_r(Ts)&&$i&&Oi&&(Eo.vertical=Fg(Ro,C,H,be,Mo,hf,ii,Zl,$u,zu,$s,vp.vertical,!1,hc,mo,so))}}var yp=void 0,ih=!1;if(Un.icon&&Un.icon.name){var _p=oe[Un.icon.name];_p&&(yp=Zp(be[Un.icon.name],It.get("icon-offset").evaluate(Un,{},Ne),It.get("icon-anchor").evaluate(Un,{},Ne)),ih=_p.sdf,k.sdfIcons===void 0?k.sdfIcons=_p.sdf:k.sdfIcons!==_p.sdf&&B("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(_p.pixelRatio!==k.pixelRatio||It.get("icon-rotate").constantOr(1)!==0)&&(k.iconsNeedLinear=!0))}var nd=Ck(Eo.horizontal)||Eo.vertical;k.iconsInText=nd?nd.iconsInText:!1,(nd||yp)&&kW(k,Un,Eo,yp,oe,er,mo,Cs,$s,ih,Ne)},wn=0,Vn=k.features;wn<Vn.length;wn+=1)ln();Pe&&k.generateCollisionDebugBuffers()}function dA(k){switch(k){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function kW(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er){var Lr=Pe.textMaxSize.evaluate(C,{});Lr===void 0&&(Lr=Ne);var Zr=k.layers[0].layout,Vr=Zr.get("icon-offset").evaluate(C,{},er),ua=Ck(H.horizontal),Fa=24,Mi=Ne/Fa,ii=k.tilePixelRatio*Mi,$i=k.tilePixelRatio*Lr/Fa,Oi=k.tilePixelRatio*ft,Ji=k.tilePixelRatio*Zr.get("symbol-spacing"),ln=Zr.get("text-padding")*k.tilePixelRatio,wn=Zr.get("icon-padding")*k.tilePixelRatio,Vn=Zr.get("text-max-angle")/180*Math.PI,Un=Zr.get("text-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",Mo=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",so=Zr.get("symbol-placement"),mo=Ji/2,Cs=Zr.get("icon-text-fit"),Eo;oe&&Cs!=="none"&&(k.allowVerticalPlacement&&H.vertical&&(Eo=dv(oe,H.vertical,Cs,Zr.get("icon-text-fit-padding"),Vr,Mi)),ua&&(oe=dv(oe,ua,Cs,Zr.get("icon-text-fit-padding"),Vr,Mi)));var Ro=function(Wg,wd){wd.x<0||wd.x>=ui||wd.y<0||wd.y>=ui||CW(k,wd,Wg,H,oe,be,Eo,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Un,It,Oi,wn,Mo,Vr,C,Pe,Ht,er,Ne)};if(so==="line")for(var $s=0,Ts=Ak(C.geometry,0,0,ui,ui);$s<Ts.length;$s+=1)for(var Xl=Ts[$s],zu=xW(Xl,Ji,Vn,H.vertical||ua,oe,Fa,$i,k.overscaling,ui),Zl=0,Yl=zu;Zl<Yl.length;Zl+=1){var Ol=Yl[Zl],$u=ua;(!$u||!LW(k,$u.text,mo,Ol))&&Ro(Xl,Ol)}else if(so==="line-center")for(var hc=0,hf=C.geometry;hc<hf.length;hc+=1){var _f=hf[hc];if(_f.length>1){var gh=_W(_f,Vn,H.vertical||ua,oe,Fa,$i);gh&&Ro(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,tp=Cg(C.geometry,0);Zf<tp.length;Zf+=1){var rp=tp[Zf],yh=TW(rp,16);Ro(rp[0],new ep(yh.x,yh.y,0))}else if(C.type==="LineString")for(var gp=0,yp=C.geometry;gp<yp.length;gp+=1){var ih=yp[gp];Ro(ih,new ep(ih[0].x,ih[0].y,0))}else if(C.type==="Point")for(var _p=0,nd=C.geometry;_p<nd.length;_p+=1)for(var Uv=nd[_p],_m=0,xm=Uv;_m<xm.length;_m+=1){var bm=xm[_m];Ro([bm],new ep(bm.x,bm.y,0))}}var Q1=255,gm=Q1*Bh;function kk(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua){var Fa=bW(C,H,ft,be,Pe,Ne,oe,k.allowVerticalPlacement),Mi=k.textSizeData,ii=null;Mi.kind==="source"?(ii=[Bh*be.layout.get("text-size").evaluate(Ne,{})],ii[0]>gm&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ii=[Bh*Vr.compositeTextSizes[0].evaluate(Ne,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(Ne,{},ua)],(ii[0]>gm||ii[1]>gm)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Fa,ii,ft,Pe,Ne,Ht,C,It.lineStartIndex,It.lineLength,Zr,ua);for(var $i=0,Oi=er;$i<Oi.length;$i+=1){var Ji=Oi[$i];Lr[Ji]=k.text.placedSymbolArray.length-1}return Fa.length*4}function Ck(k){for(var C in k)return k[C];return null}function CW(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un){var Mo,so=k.addToLineVertexArray(C,H),mo,Cs,Eo,Ro,$s=0,Ts=0,Xl=0,zu=0,Zl=-1,Yl=-1,Ol={},$u=ye(""),hc=0,hf=0;if(ft._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Mo=ft.layout.get("text-offset").evaluate(Ji,{},Vn).map(function(r_){return r_*en}),hc=Mo[0],hf=Mo[1]):(hc=ft.layout.get("text-radial-offset").evaluate(Ji,{},Vn)*en,hf=pA),k.allowVerticalPlacement&&oe.vertical){var _f=ft.layout.get("text-rotate").evaluate(Ji,{},Vn),gh=_f+90,Zf=oe.vertical;Eo=new hb(It,C,Ht,er,Lr,Zf,Zr,Vr,ua,gh),Ne&&(Ro=new hb(It,C,Ht,er,Lr,Ne,Mi,ii,ua,gh))}if(be){var tp=ft.layout.get("icon-rotate").evaluate(Ji,{}),rp=ft.layout.get("icon-text-fit")!=="none",yh=Sk(be,tp,wn,rp),gp=Ne?Sk(Ne,tp,wn,rp):void 0;Cs=new hb(It,C,Ht,er,Lr,be,Mi,ii,!1,tp),$s=yh.length*4;var yp=k.iconSizeData,ih=null;yp.kind==="source"?(ih=[Bh*ft.layout.get("icon-size").evaluate(Ji,{})],ih[0]>gm&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):yp.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},Vn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},Vn)],(ih[0]>gm||ih[1]>gm)&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),k.addSymbols(k.icon,yh,ih,Oi,$i,Ji,!1,C,so.lineStartIndex,so.lineLength,-1,Vn),Zl=k.icon.placedSymbolArray.length-1,gp&&(Ts=gp.length*4,k.addSymbols(k.icon,gp,ih,Oi,$i,Ji,vp.vertical,C,so.lineStartIndex,so.lineLength,-1,Vn),Yl=k.icon.placedSymbolArray.length-1)}for(var _p in oe.horizontal){var nd=oe.horizontal[_p];if(!mo){$u=ye(nd.text);var Uv=ft.layout.get("text-rotate").evaluate(Ji,{},Vn);mo=new hb(It,C,Ht,er,Lr,nd,Zr,Vr,ua,Uv)}var _m=nd.positionedLines.length===1;if(Xl+=kk(k,C,nd,Pe,ft,ua,Ji,Fa,so,oe.vertical?vp.horizontal:vp.horizontalOnly,_m?Object.keys(oe.horizontal):[_p],Ol,Zl,ln,Vn),_m)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Pe,ft,ua,Ji,Fa,so,vp.vertical,["vertical"],Ol,Yl,ln,Vn));var xm=mo?mo.boxStartIndex:k.collisionBoxArray.length,bm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=Eo?Eo.boxStartIndex:k.collisionBoxArray.length,wd=Eo?Eo.boxEndIndex:k.collisionBoxArray.length,gb=Cs?Cs.boxStartIndex:k.collisionBoxArray.length,xA=Cs?Cs.boxEndIndex:k.collisionBoxArray.length,yb=Ro?Ro.boxStartIndex:k.collisionBoxArray.length,bA=Ro?Ro.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(mo,hd),hd=Xg(Eo,hd),hd=Xg(Cs,hd),hd=Xg(Ro,hd);var _b=hd>-1?1:0;_b&&(hd*=Un/en),k.glyphOffsetArray.length>=Du.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ji.sortKey!==void 0&&k.addToSortKeyRanges(k.symbolInstances.length,Ji.sortKey),k.symbolInstances.emplaceBack(C.x,C.y,Ol.right>=0?Ol.right:-1,Ol.center>=0?Ol.center:-1,Ol.left>=0?Ol.left:-1,Ol.vertical||-1,Zl,Yl,$u,xm,bm,Wg,wd,gb,xA,yb,bA,Ht,Xl,zu,$s,Ts,_b,0,Zr,hc,hf,hd)}function LW(k,C,H,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Pe=be[C],Ne=Pe.length-1;Ne>=0;Ne--)if(oe.dist(Pe[Ne])<H)return!0;return be[C].push(oe),!1}var PW=Xd.VectorTileFeature.types,IW=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function pb(k,C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){var Vr=ft?Math.min(gm,Math.round(ft[0])):0,ua=ft?Math.min(gm,Math.round(ft[1])):0;k.emplaceBack(C,H,Math.round(oe*32),Math.round(be*32),Pe,Ne,(Vr<<1)+(It?1:0),ua,Ht*16,er*16,Lr*256,Zr*256)}function vA(k,C,H){k.emplaceBack(C.x,C.y,H),k.emplaceBack(C.x,C.y,H),k.emplaceBack(C.x,C.y,H),k.emplaceBack(C.x,C.y,H)}function RW(k){for(var C=0,H=k.sections;C<H.length;C+=1){var oe=H[C];if(fi(oe.text))return!0}return!1}var qg=function(C){this.layoutVertexArray=new hn,this.indexArray=new Xi,this.programConfigurations=C,this.segments=new Po,this.dynamicLayoutVertexArray=new Ha,this.opacityVertexArray=new Ua,this.placedSymbolArray=new fs};qg.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},qg.prototype.upload=function(C,H,oe,be){this.isEmpty()||(oe&&(this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,Ee.members),this.indexBuffer=C.createIndexBuffer(this.indexArray,H),this.dynamicLayoutVertexBuffer=C.createVertexBuffer(this.dynamicLayoutVertexArray,Be.members,!0),this.opacityVertexBuffer=C.createVertexBuffer(this.opacityVertexArray,IW,!0),this.opacityVertexBuffer.itemSize=1),(oe||be)&&this.programConfigurations.upload(C))},qg.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},me("SymbolBuffers",qg);var e_=function(C,H,oe){this.layoutVertexArray=new C,this.layoutAttributes=H,this.indexArray=new oe,this.segments=new Po,this.collisionVertexArray=new xi};e_.prototype.upload=function(C){this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=C.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=C.createVertexBuffer(this.collisionVertexArray,ct.members,!0)},e_.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},me("CollisionBuffers",e_);var Du=function(C){this.collisionBoxArray=C.collisionBoxArray,this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(It){return It.id}),this.index=C.index,this.pixelRatio=C.pixelRatio,this.sourceLayerIndex=C.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Pv([]),this.placementViewportMatrix=Pv([]);var H=this.layers[0],oe=H._unevaluatedLayout._values;this.textSizeData=id(this.zoom,oe["text-size"]),this.iconSizeData=id(this.zoom,oe["icon-size"]);var be=this.layers[0].layout,Pe=be.get("symbol-sort-key"),Ne=be.get("symbol-z-order");this.canOverlap=be.get("text-allow-overlap")||be.get("icon-allow-overlap")||be.get("text-ignore-placement")||be.get("icon-ignore-placement"),this.sortFeaturesByKey=Ne!=="viewport-y"&&Pe.constantOr(1)!==void 0;var ft=Ne==="viewport-y"||Ne==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=ft&&this.canOverlap,be.get("symbol-placement")==="point"&&(this.writingModes=be.get("text-writing-mode").map(function(It){return vp[It]})),this.stateDependentLayerIds=this.layers.filter(function(It){return It.isStateDependent()}).map(function(It){return It.id}),this.sourceID=C.sourceID};Du.prototype.createArrays=function(){this.text=new qg(new Ga(this.layers,this.zoom,function(C){return/^text/.test(C)})),this.icon=new qg(new Ga(this.layers,this.zoom,function(C){return/^icon/.test(C)})),this.glyphOffsetArray=new tu,this.lineVertexArray=new Vs,this.symbolInstances=new kl},Du.prototype.calculateGlyphDependencies=function(C,H,oe,be,Pe){for(var Ne=0;Ne<C.length;Ne++)if(H[C.charCodeAt(Ne)]=!0,(oe||be)&&Pe){var ft=gi[C.charAt(Ne)];ft&&(H[ft.charCodeAt(0)]=!0)}},Du.prototype.populate=function(C,H,oe){var be=this.layers[0],Pe=be.layout,Ne=Pe.get("text-font"),ft=Pe.get("text-field"),It=Pe.get("icon-image"),Ht=(ft.value.kind!=="constant"||ft.value.value instanceof lu&&!ft.value.value.isEmpty()||ft.value.value.toString().length>0)&&(Ne.value.kind!=="constant"||Ne.value.value.length>0),er=It.value.kind!=="constant"||!!It.value.value||Object.keys(It.parameters).length>0,Lr=Pe.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Zr=H.iconDependencies,Vr=H.glyphDependencies,ua=H.availableImages,Fa=new mn(this.zoom),Mi=0,ii=C;Mi<ii.length;Mi+=1){var $i=ii[Mi],Oi=$i.feature,Ji=$i.id,ln=$i.index,wn=$i.sourceLayerIndex,Vn=be._featureFilter.needGeometry,Un=yo(Oi,Vn);if(be._featureFilter.filter(Fa,Un,oe)){Vn||(Un.geometry=cn(Oi));var Mo=void 0;if(Ht){var so=be.getValueAndResolveTokens("text-field",Un,oe,ua),mo=lu.factory(so);RW(mo)&&(this.hasRTLText=!0),(!this.hasRTLText||Yo()==="unavailable"||this.hasRTLText&&al.isParsed())&&(Mo=Ka(mo,be,Un))}var Cs=void 0;if(er){var Eo=be.getValueAndResolveTokens("icon-image",Un,oe,ua);Eo instanceof Pl?Cs=Eo:Cs=Pl.fromString(Eo)}if(!(!Mo&&!Cs)){var Ro=this.sortFeaturesByKey?Lr.evaluate(Un,{},oe):void 0,$s={id:Ji,text:Mo,icon:Cs,index:ln,sourceLayerIndex:wn,geometry:Un.geometry,properties:Oi.properties,type:PW[Oi.type],sortKey:Ro};if(this.features.push($s),Cs&&(Zr[Cs.name]=!0),Mo){var Ts=Ne.evaluate(Un,{},oe).join(","),Xl=Pe.get("text-rotation-alignment")==="map"&&Pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(vp.vertical)>=0;for(var zu=0,Zl=Mo.sections;zu<Zl.length;zu+=1){var Yl=Zl[zu];if(Yl.image)Zr[Yl.image.name]=!0;else{var Ol=_r(Mo.toString()),$u=Yl.fontStack||Ts,hc=Vr[$u]=Vr[$u]||{};this.calculateGlyphDependencies(Yl.text,hc,Xl,this.allowVerticalPlacement,Ol)}}}}}}Pe.get("symbol-placement")==="line"&&(this.features=Wi(this.features)),this.sortFeaturesByKey&&this.features.sort(function(hf,_f){return hf.sortKey-_f.sortKey})}},Du.prototype.update=function(C,H,oe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(C,H,this.layers,oe),this.icon.programConfigurations.updatePaintArrays(C,H,this.layers,oe))},Du.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Du.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Du.prototype.upload=function(C){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(C),this.iconCollisionBox.upload(C)),this.text.upload(C,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(C,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Du.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Du.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Du.prototype.addToLineVertexArray=function(C,H){var oe=this.lineVertexArray.length;if(C.segment!==void 0){for(var be=C.dist(H[C.segment+1]),Pe=C.dist(H[C.segment]),Ne={},ft=C.segment+1;ft<H.length;ft++)Ne[ft]={x:H[ft].x,y:H[ft].y,tileUnitDistanceFromAnchor:be},ft<H.length-1&&(be+=H[ft+1].dist(H[ft]));for(var It=C.segment||0;It>=0;It--)Ne[It]={x:H[It].x,y:H[It].y,tileUnitDistanceFromAnchor:Pe},It>0&&(Pe+=H[It-1].dist(H[It]));for(var Ht=0;Ht<H.length;Ht++){var er=Ne[Ht];this.lineVertexArray.emplaceBack(er.x,er.y,er.tileUnitDistanceFromAnchor)}}return{lineStartIndex:oe,lineLength:this.lineVertexArray.length-oe}},Du.prototype.addSymbols=function(C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){for(var Vr=C.indexArray,ua=C.layoutVertexArray,Fa=C.segments.prepareSegment(4*H.length,ua,Vr,this.canOverlap?Ne.sortKey:void 0),Mi=this.glyphOffsetArray.length,ii=Fa.vertexLength,$i=this.allowVerticalPlacement&&ft===vp.vertical?Math.PI/2:0,Oi=Ne.text&&Ne.text.sections,Ji=0;Ji<H.length;Ji++){var ln=H[Ji],wn=ln.tl,Vn=ln.tr,Un=ln.bl,Mo=ln.br,so=ln.tex,mo=ln.pixelOffsetTL,Cs=ln.pixelOffsetBR,Eo=ln.minFontScaleX,Ro=ln.minFontScaleY,$s=ln.glyphOffset,Ts=ln.isSDF,Xl=ln.sectionIndex,zu=Fa.vertexLength,Zl=$s[1];pb(ua,It.x,It.y,wn.x,Zl+wn.y,so.x,so.y,oe,Ts,mo.x,mo.y,Eo,Ro),pb(ua,It.x,It.y,Vn.x,Zl+Vn.y,so.x+so.w,so.y,oe,Ts,Cs.x,mo.y,Eo,Ro),pb(ua,It.x,It.y,Un.x,Zl+Un.y,so.x,so.y+so.h,oe,Ts,mo.x,Cs.y,Eo,Ro),pb(ua,It.x,It.y,Mo.x,Zl+Mo.y,so.x+so.w,so.y+so.h,oe,Ts,Cs.x,Cs.y,Eo,Ro),vA(C.dynamicLayoutVertexArray,It,$i),Vr.emplaceBack(zu,zu+1,zu+2),Vr.emplaceBack(zu+1,zu+2,zu+3),Fa.vertexLength+=4,Fa.primitiveLength+=2,this.glyphOffsetArray.emplaceBack($s[0]),(Ji===H.length-1||Xl!==H[Ji+1].sectionIndex)&&C.programConfigurations.populatePaintArrays(ua.length,Ne,Ne.index,{},Zr,Oi&&Oi[Xl])}C.placedSymbolArray.emplaceBack(It.x,It.y,Mi,this.glyphOffsetArray.length-Mi,ii,Ht,er,It.segment,oe?oe[0]:0,oe?oe[1]:0,be[0],be[1],ft,0,!1,0,Lr)},Du.prototype._addCollisionDebugVertex=function(C,H,oe,be,Pe,Ne){return H.emplaceBack(0,0),C.emplaceBack(oe.x,oe.y,be,Pe,Math.round(Ne.x),Math.round(Ne.y))},Du.prototype.addCollisionDebugVertices=function(C,H,oe,be,Pe,Ne,ft){var It=Pe.segments.prepareSegment(4,Pe.layoutVertexArray,Pe.indexArray),Ht=It.vertexLength,er=Pe.layoutVertexArray,Lr=Pe.collisionVertexArray,Zr=ft.anchorX,Vr=ft.anchorY;this._addCollisionDebugVertex(er,Lr,Ne,Zr,Vr,new n(C,H)),this._addCollisionDebugVertex(er,Lr,Ne,Zr,Vr,new n(oe,H)),this._addCollisionDebugVertex(er,Lr,Ne,Zr,Vr,new n(oe,be)),this._addCollisionDebugVertex(er,Lr,Ne,Zr,Vr,new n(C,be)),It.vertexLength+=4;var ua=Pe.indexArray;ua.emplaceBack(Ht,Ht+1),ua.emplaceBack(Ht+1,Ht+2),ua.emplaceBack(Ht+2,Ht+3),ua.emplaceBack(Ht+3,Ht),It.primitiveLength+=4},Du.prototype.addDebugCollisionBoxes=function(C,H,oe,be){for(var Pe=C;Pe<H;Pe++){var Ne=this.collisionBoxArray.get(Pe),ft=Ne.x1,It=Ne.y1,Ht=Ne.x2,er=Ne.y2;this.addCollisionDebugVertices(ft,It,Ht,er,be?this.textCollisionBox:this.iconCollisionBox,Ne.anchorPoint,oe)}},Du.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new e_(Ri,Bt.members,Dn),this.iconCollisionBox=new e_(Ri,Bt.members,Dn);for(var C=0;C<this.symbolInstances.length;C++){var H=this.symbolInstances.get(C);this.addDebugCollisionBoxes(H.textBoxStartIndex,H.textBoxEndIndex,H,!0),this.addDebugCollisionBoxes(H.verticalTextBoxStartIndex,H.verticalTextBoxEndIndex,H,!0),this.addDebugCollisionBoxes(H.iconBoxStartIndex,H.iconBoxEndIndex,H,!1),this.addDebugCollisionBoxes(H.verticalIconBoxStartIndex,H.verticalIconBoxEndIndex,H,!1)}},Du.prototype._deserializeCollisionBoxesForSymbol=function(C,H,oe,be,Pe,Ne,ft,It,Ht){for(var er={},Lr=H;Lr<oe;Lr++){var Zr=C.get(Lr);er.textBox={x1:Zr.x1,y1:Zr.y1,x2:Zr.x2,y2:Zr.y2,anchorPointX:Zr.anchorPointX,anchorPointY:Zr.anchorPointY},er.textFeatureIndex=Zr.featureIndex;break}for(var Vr=be;Vr<Pe;Vr++){var ua=C.get(Vr);er.verticalTextBox={x1:ua.x1,y1:ua.y1,x2:ua.x2,y2:ua.y2,anchorPointX:ua.anchorPointX,anchorPointY:ua.anchorPointY},er.verticalTextFeatureIndex=ua.featureIndex;break}for(var Fa=Ne;Fa<ft;Fa++){var Mi=C.get(Fa);er.iconBox={x1:Mi.x1,y1:Mi.y1,x2:Mi.x2,y2:Mi.y2,anchorPointX:Mi.anchorPointX,anchorPointY:Mi.anchorPointY},er.iconFeatureIndex=Mi.featureIndex;break}for(var ii=It;ii<Ht;ii++){var $i=C.get(ii);er.verticalIconBox={x1:$i.x1,y1:$i.y1,x2:$i.x2,y2:$i.y2,anchorPointX:$i.anchorPointX,anchorPointY:$i.anchorPointY},er.verticalIconFeatureIndex=$i.featureIndex;break}return er},Du.prototype.deserializeCollisionBoxes=function(C){this.collisionArrays=[];for(var H=0;H<this.symbolInstances.length;H++){var oe=this.symbolInstances.get(H);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(C,oe.textBoxStartIndex,oe.textBoxEndIndex,oe.verticalTextBoxStartIndex,oe.verticalTextBoxEndIndex,oe.iconBoxStartIndex,oe.iconBoxEndIndex,oe.verticalIconBoxStartIndex,oe.verticalIconBoxEndIndex))}},Du.prototype.hasTextData=function(){return this.text.segments.get().length>0},Du.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Du.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Du.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Du.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Du.prototype.addIndicesForPlacedSymbol=function(C,H){for(var oe=C.placedSymbolArray.get(H),be=oe.vertexStartIndex+oe.numGlyphs*4,Pe=oe.vertexStartIndex;Pe<be;Pe+=4)C.indexArray.emplaceBack(Pe,Pe+1,Pe+2),C.indexArray.emplaceBack(Pe+1,Pe+2,Pe+3)},Du.prototype.getSortedSymbolIndexes=function(C){if(this.sortedAngle===C&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var H=Math.sin(C),oe=Math.cos(C),be=[],Pe=[],Ne=[],ft=0;ft<this.symbolInstances.length;++ft){Ne.push(ft);var It=this.symbolInstances.get(ft);be.push(Math.round(H*It.anchorX+oe*It.anchorY)|0),Pe.push(It.featureIndex)}return Ne.sort(function(Ht,er){return be[Ht]-be[er]||Pe[er]-Pe[Ht]}),Ne},Du.prototype.addToSortKeyRanges=function(C,H){var oe=this.sortKeyRanges[this.sortKeyRanges.length-1];oe&&oe.sortKey===H?oe.symbolInstanceEnd=C+1:this.sortKeyRanges.push({sortKey:H,symbolInstanceStart:C,symbolInstanceEnd:C+1})},Du.prototype.sortFeatures=function(C){var H=this;if(this.sortFeaturesByY&&this.sortedAngle!==C&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var oe=0,be=this.symbolInstanceIndexes;oe<be.length;oe+=1){var Pe=be[oe],Ne=this.symbolInstances.get(Pe);this.featureSortOrder.push(Ne.featureIndex),[Ne.rightJustifiedTextSymbolIndex,Ne.centerJustifiedTextSymbolIndex,Ne.leftJustifiedTextSymbolIndex].forEach(function(ft,It,Ht){ft>=0&&Ht.indexOf(ft)===It&&H.addIndicesForPlacedSymbol(H.text,ft)}),Ne.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ne.verticalPlacedTextSymbolIndex),Ne.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.placedIconSymbolIndex),Ne.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},me("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function DW(k,C){return C.replace(/{([^{}]+)}/g,function(H,oe){return oe in k?String(k[oe]):""})}var zW=new va({"symbol-placement":new it(Gi.layout_symbol["symbol-placement"]),"symbol-spacing":new it(Gi.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new it(Gi.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Zt(Gi.layout_symbol["symbol-sort-key"]),"symbol-z-order":new it(Gi.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new it(Gi.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new it(Gi.layout_symbol["icon-ignore-placement"]),"icon-optional":new it(Gi.layout_symbol["icon-optional"]),"icon-rotation-alignment":new it(Gi.layout_symbol["icon-rotation-alignment"]),"icon-size":new Zt(Gi.layout_symbol["icon-size"]),"icon-text-fit":new it(Gi.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new it(Gi.layout_symbol["icon-text-fit-padding"]),"icon-image":new Zt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Zt(Gi.layout_symbol["icon-rotate"]),"icon-padding":new it(Gi.layout_symbol["icon-padding"]),"icon-keep-upright":new it(Gi.layout_symbol["icon-keep-upright"]),"icon-offset":new Zt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Zt(Gi.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new it(Gi.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new it(Gi.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new it(Gi.layout_symbol["text-rotation-alignment"]),"text-field":new Zt(Gi.layout_symbol["text-field"]),"text-font":new Zt(Gi.layout_symbol["text-font"]),"text-size":new Zt(Gi.layout_symbol["text-size"]),"text-max-width":new Zt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Zt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Zt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Zt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Zt(Gi.layout_symbol["text-anchor"]),"text-max-angle":new it(Gi.layout_symbol["text-max-angle"]),"text-writing-mode":new it(Gi.layout_symbol["text-writing-mode"]),"text-rotate":new Zt(Gi.layout_symbol["text-rotate"]),"text-padding":new it(Gi.layout_symbol["text-padding"]),"text-keep-upright":new it(Gi.layout_symbol["text-keep-upright"]),"text-transform":new Zt(Gi.layout_symbol["text-transform"]),"text-offset":new Zt(Gi.layout_symbol["text-offset"]),"text-allow-overlap":new it(Gi.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new it(Gi.layout_symbol["text-ignore-placement"]),"text-optional":new it(Gi.layout_symbol["text-optional"])}),FW=new va({"icon-opacity":new Zt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Zt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Zt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Zt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Zt(Gi.paint_symbol["icon-halo-blur"]),"icon-translate":new it(Gi.paint_symbol["icon-translate"]),"icon-translate-anchor":new it(Gi.paint_symbol["icon-translate-anchor"]),"text-opacity":new Zt(Gi.paint_symbol["text-opacity"]),"text-color":new Zt(Gi.paint_symbol["text-color"],{runtimeType:Rs,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Zt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Zt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Zt(Gi.paint_symbol["text-halo-blur"]),"text-translate":new it(Gi.paint_symbol["text-translate"]),"text-translate-anchor":new it(Gi.paint_symbol["text-translate-anchor"])}),mA={paint:FW,layout:zW},Vg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:il,this.defaultValue=C};Vg.prototype.evaluate=function(C){if(C.formattedSection){var H=this.defaultValue.property.overrides;if(H&&H.hasOverride(C.formattedSection))return H.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},Vg.prototype.eachChild=function(C){if(!this.defaultValue.isConstant()){var H=this.defaultValue.value;C(H._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var OW=function(k){function C(H){k.call(this,H,mA)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(oe,be){if(k.prototype.recalculate.call(this,oe,be),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Pe=this.layout.get("text-writing-mode");if(Pe){for(var Ne=[],ft=0,It=Pe;ft<It.length;ft+=1){var Ht=It[ft];Ne.indexOf(Ht)<0&&Ne.push(Ht)}this.layout._values["text-writing-mode"]=Ne}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},C.prototype.getValueAndResolveTokens=function(oe,be,Pe,Ne){var ft=this.layout.get(oe).evaluate(be,{},Pe,Ne),It=this._unevaluatedLayout._values[oe];return!It.isDataDriven()&&!fo(It.value)&&ft?DW(be.properties,ft):ft},C.prototype.createBucket=function(oe){return new Du(oe)},C.prototype.queryRadius=function(){return 0},C.prototype.queryIntersectsFeature=function(){return!1},C.prototype._setPaintOverrides=function(){for(var oe=0,be=mA.paint.overridableProperties;oe<be.length;oe+=1){var Pe=be[oe];if(C.hasPaintOverride(this.layout,Pe)){var Ne=this.paint.get(Pe),ft=new Vg(Ne),It=new yc(ft,Ne.property.specification),Ht=null;Ne.value.kind==="constant"||Ne.value.kind==="source"?Ht=new Dc("source",It):Ht=new lc("composite",It,Ne.value.zoomStops,Ne.value._interpolationType),this.paint._values[Pe]=new Rl(Ne.property,Ht,Ne.parameters)}}},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Pe){return!this.layout||be.isDataDriven()||Pe.isDataDriven()?!1:C.hasPaintOverride(this.layout,oe)},C.hasPaintOverride=function(oe,be){var Pe=oe.get("text-field"),Ne=mA.paint.properties[be],ft=!1,It=function(Lr){for(var Zr=0,Vr=Lr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(Ne.overrides&&Ne.overrides.hasOverride(ua)){ft=!0;return}}};if(Pe.value.kind==="constant"&&Pe.value.value instanceof lu)It(Pe.value.value.sections);else if(Pe.value.kind==="source"){var Ht=function(Lr){if(!ft)if(Lr instanceof bs&&nl(Lr.value)===As){var Zr=Lr.value;It(Zr.sections)}else Lr instanceof qu?It(Lr.sections):Lr.eachChild(Ht)},er=Pe.value;er._styleExpression&&Ht(er._styleExpression.expression)}return ft},C}(Ya),BW=new va({"background-color":new it(Gi.paint_background["background-color"]),"background-pattern":new oa(Gi.paint_background["background-pattern"]),"background-opacity":new it(Gi.paint_background["background-opacity"])}),NW={paint:BW},UW=function(k){function C(H){k.call(this,H,NW)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Ya),jW=new va({"raster-opacity":new it(Gi.paint_raster["raster-opacity"]),"raster-hue-rotate":new it(Gi.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new it(Gi.paint_raster["raster-brightness-min"]),"raster-brightness-max":new it(Gi.paint_raster["raster-brightness-max"]),"raster-saturation":new it(Gi.paint_raster["raster-saturation"]),"raster-contrast":new it(Gi.paint_raster["raster-contrast"]),"raster-resampling":new it(Gi.paint_raster["raster-resampling"]),"raster-fade-duration":new it(Gi.paint_raster["raster-fade-duration"])}),qW={paint:jW},VW=function(k){function C(H){k.call(this,H,qW)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Ya);function GW(k){var C=[],H=k.id;return H===void 0&&C.push({message:"layers."+H+': missing required property "id"'}),k.render===void 0&&C.push({message:"layers."+H+': missing required method "render"'}),k.renderingMode&&k.renderingMode!=="2d"&&k.renderingMode!=="3d"&&C.push({message:"layers."+H+': property "renderingMode" must be either "2d" or "3d"'}),C}var HW=function(k){function C(H){k.call(this,H,{}),this.implementation=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},C.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},C.prototype.recalculate=function(){},C.prototype.updateTransitions=function(){},C.prototype.hasTransition=function(){},C.prototype.serialize=function(){},C.prototype.onAdd=function(oe){this.implementation.onAdd&&this.implementation.onAdd(oe,oe.painter.context.gl)},C.prototype.onRemove=function(oe){this.implementation.onRemove&&this.implementation.onRemove(oe,oe.painter.context.gl)},C}(Ya),WW={circle:XT,heatmap:Ag,hillshade:Rx,fill:z0,"fill-extrusion":pv,line:D,symbol:OW,background:UW,raster:VW};function XW(k){return k.type==="custom"?new HW(k):new WW[k.type](k)}var Lk=s.HTMLImageElement,Pk=s.HTMLCanvasElement,Ik=s.HTMLVideoElement,Rk=s.ImageData,db=s.ImageBitmap,N0=function(C,H,oe,be){this.context=C,this.format=oe,this.texture=C.gl.createTexture(),this.update(H,be)};N0.prototype.update=function(C,H,oe){var be=C.width,Pe=C.height,Ne=(!this.size||this.size[0]!==be||this.size[1]!==Pe)&&!oe,ft=this,It=ft.context,Ht=It.gl;if(this.useMipmap=!!(H&&H.useMipmap),Ht.bindTexture(Ht.TEXTURE_2D,this.texture),It.pixelStoreUnpackFlipY.set(!1),It.pixelStoreUnpack.set(1),It.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ht.RGBA&&(!H||H.premultiply!==!1)),Ne)this.size=[be,Pe],C instanceof Lk||C instanceof Pk||C instanceof Ik||C instanceof Rk||db&&C instanceof db?Ht.texImage2D(Ht.TEXTURE_2D,0,this.format,this.format,Ht.UNSIGNED_BYTE,C):Ht.texImage2D(Ht.TEXTURE_2D,0,this.format,be,Pe,0,this.format,Ht.UNSIGNED_BYTE,C.data);else{var er=oe||{x:0,y:0},Lr=er.x,Zr=er.y;C instanceof Lk||C instanceof Pk||C instanceof Ik||C instanceof Rk||db&&C instanceof db?Ht.texSubImage2D(Ht.TEXTURE_2D,0,Lr,Zr,Ht.RGBA,Ht.UNSIGNED_BYTE,C):Ht.texSubImage2D(Ht.TEXTURE_2D,0,Lr,Zr,be,Pe,Ht.RGBA,Ht.UNSIGNED_BYTE,C.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ht.generateMipmap(Ht.TEXTURE_2D)},N0.prototype.bind=function(C,H,oe){var be=this,Pe=be.context,Ne=Pe.gl;Ne.bindTexture(Ne.TEXTURE_2D,this.texture),oe===Ne.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(oe=Ne.LINEAR),C!==this.filter&&(Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_MAG_FILTER,C),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_MIN_FILTER,oe||C),this.filter=C),H!==this.wrap&&(Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_WRAP_S,H),Ne.texParameteri(Ne.TEXTURE_2D,Ne.TEXTURE_WRAP_T,H),this.wrap=H)},N0.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},N0.prototype.destroy=function(){var C=this.context,H=C.gl;H.deleteTexture(this.texture),this.texture=null};var gA=function(C){var H=this;this._callback=C,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){H._triggered=!1,H._callback()})};gA.prototype.trigger=function(){var C=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){C._triggered=!1,C._callback()},0))},gA.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Gg=function(C,H,oe){this.target=C,this.parent=H,this.mapId=oe,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},L(["receive","process"],this),this.invoker=new gA(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=ce()?C:s};Gg.prototype.send=function(C,H,oe,be,Pe){var Ne=this;Pe===void 0&&(Pe=!1);var ft=Math.round(Math.random()*1e18).toString(36).substring(0,10);oe&&(this.callbacks[ft]=oe);var It=Y(this.globalScope)?void 0:[];return this.target.postMessage({id:ft,type:C,hasCallback:!!oe,targetMapId:be,mustQueue:Pe,sourceMapId:this.mapId,data:yt(H,It)},It),{cancel:function(){oe&&delete Ne.callbacks[ft],Ne.target.postMessage({id:ft,type:"<cancel>",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var H=C.data,oe=H.id;if(oe&&!(H.targetMapId&&this.mapId!==H.targetMapId))if(H.type==="<cancel>"){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||H.mustQueue?(this.tasks[oe]=H,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,H)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),H=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),H&&this.processTask(C,H)}},Gg.prototype.processTask=function(C,H){var oe=this;if(H.type==="<response>"){var be=this.callbacks[C];delete this.callbacks[C],be&&(H.error?be(Tt(H.error)):be(null,Tt(H.data)))}else{var Pe=!1,Ne=Y(this.globalScope)?void 0:[],ft=H.hasCallback?function(Zr,Vr){Pe=!0,delete oe.cancelCallbacks[C],oe.target.postMessage({id:C,type:"<response>",sourceMapId:oe.mapId,error:Zr?yt(Zr):null,data:yt(Vr,Ne)},Ne)}:function(Zr){Pe=!0},It=null,Ht=Tt(H.data);if(this.parent[H.type])It=this.parent[H.type](H.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=H.type.split("."),Lr=this.parent.getWorkerSource(H.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+H.type));!Pe&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function ZW(k,C,H){C=Math.pow(2,H)-C-1;var oe=Dk(k*256,C*256,H),be=Dk((k+1)*256,(C+1)*256,H);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,H){var oe=2*Math.PI*6378137/256/Math.pow(2,H),be=k*oe-2*Math.PI*6378137/2,Pe=C*oe-2*Math.PI*6378137/2;return[be,Pe]}var Wf=function(C,H){C&&(H?this.setSouthWest(C).setNorthEast(H):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};Wf.prototype.setNorthEast=function(C){return this._ne=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.setSouthWest=function(C){return this._sw=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.extend=function(C){var H=this._sw,oe=this._ne,be,Pe;if(C instanceof Fc)be=C,Pe=C;else if(C instanceof Wf){if(be=C._sw,Pe=C._ne,!be||!Pe)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var Ne=C;return this.extend(Wf.convert(Ne))}else{var ft=C;return this.extend(Fc.convert(ft))}return this}return!H&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Pe.lng,Pe.lat)):(H.lng=Math.min(be.lng,H.lng),H.lat=Math.min(be.lat,H.lat),oe.lng=Math.max(Pe.lng,oe.lng),oe.lat=Math.max(Pe.lat,oe.lat)),this},Wf.prototype.getCenter=function(){return new Fc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wf.prototype.getSouthWest=function(){return this._sw},Wf.prototype.getNorthEast=function(){return this._ne},Wf.prototype.getNorthWest=function(){return new Fc(this.getWest(),this.getNorth())},Wf.prototype.getSouthEast=function(){return new Fc(this.getEast(),this.getSouth())},Wf.prototype.getWest=function(){return this._sw.lng},Wf.prototype.getSouth=function(){return this._sw.lat},Wf.prototype.getEast=function(){return this._ne.lng},Wf.prototype.getNorth=function(){return this._ne.lat},Wf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wf.prototype.contains=function(C){var H=Fc.convert(C),oe=H.lng,be=H.lat,Pe=this._sw.lat<=be&&be<=this._ne.lat,Ne=this._sw.lng<=oe&&oe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ne=this._sw.lng>=oe&&oe>=this._ne.lng),Pe&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,H){if(isNaN(C)||isNaN(H))throw new Error("Invalid LngLat object: ("+C+", "+H+")");if(this.lng=+C,this.lat=+H,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Fc.prototype.wrap=function(){return new Fc(_(this.lng,-180,180),this.lat)},Fc.prototype.toArray=function(){return[this.lng,this.lat]},Fc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Fc.prototype.distanceTo=function(C){var H=Math.PI/180,oe=this.lat*H,be=C.lat*H,Pe=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*H),Ne=zk*Math.acos(Math.min(Pe,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var H=40075017,oe=360*C/H,be=oe/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-be,this.lat-oe),new Fc(this.lng+be,this.lat+oe))},Fc.convert=function(C){if(C instanceof Fc)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new Fc(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new Fc(Number("lng"in C?C.lng:C.lon),Number(C.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Fk=2*Math.PI*zk;function Ok(k){return Fk*Math.cos(k*Math.PI/180)}function Bk(k){return(180+k)/360}function Nk(k){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+k*Math.PI/360)))/360}function Uk(k,C){return k/Ok(C)}function YW(k){return k*360-180}function yA(k){var C=180-k*360;return 360/Math.PI*Math.atan(Math.exp(C*Math.PI/180))-90}function KW(k,C){return k*Ok(yA(C))}function JW(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,H,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+H,this.z=+oe};U0.fromLngLat=function(C,H){H===void 0&&(H=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(H,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(YW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return KW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*JW(yA(this.y))};var j0=function(C,H,oe){this.z=C,this.x=H,this.y=oe,this.key=t_(0,C,C,H,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,H){var oe=ZW(this.x,this.y,this.z),be=$W(this.z,this.x,this.y);return C[(this.x+this.y)%C.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(H==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",be).replace("{bbox-epsg-3857}",oe)},j0.prototype.getTilePoint=function(C){var H=Math.pow(2,this.z);return new n((C.x*H-this.x)*ui,(C.y*H-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,H){this.wrap=C,this.canonical=H,this.key=t_(C,H.z,H.z,H.x,H.y)},Xf=function(C,H,oe,be,Pe){this.overscaledZ=C,this.wrap=H,this.canonical=new j0(oe,+be,+Pe),this.key=t_(H,C,oe,be,Pe)};Xf.prototype.equals=function(C){return this.overscaledZ===C.overscaledZ&&this.wrap===C.wrap&&this.canonical.equals(C.canonical)},Xf.prototype.scaledTo=function(C){var H=this.canonical.z-C;return C>this.canonical.z?new Xf(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Xf(C,this.wrap,C,this.canonical.x>>H,this.canonical.y>>H)},Xf.prototype.calculateScaledKey=function(C,H){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+H,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+H,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var H=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ<this.overscaledZ&&C.canonical.x===this.canonical.x>>H&&C.canonical.y===this.canonical.y>>H},Xf.prototype.children=function(C){if(this.overscaledZ>=C)return[new Xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var H=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(H,this.wrap,H,oe,be),new Xf(H,this.wrap,H,oe+1,be),new Xf(H,this.wrap,H,oe,be+1),new Xf(H,this.wrap,H,oe+1,be+1)]},Xf.prototype.isLessThan=function(C){return this.wrap<C.wrap?!0:this.wrap>C.wrap?!1:this.overscaledZ<C.overscaledZ?!0:this.overscaledZ>C.overscaledZ?!1:this.canonical.x<C.canonical.x?!0:this.canonical.x>C.canonical.x?!1:this.canonical.y<C.canonical.y},Xf.prototype.wrapped=function(){return new Xf(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Xf.prototype.unwrapTo=function(C){return new Xf(this.overscaledZ,C,this.canonical.z,this.canonical.x,this.canonical.y)},Xf.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Xf.prototype.toUnwrapped=function(){return new jk(this.wrap,this.canonical)},Xf.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Xf.prototype.getTilePoint=function(C){return this.canonical.getTilePoint(new U0(C.x-this.wrap,C.y))};function t_(k,C,H,oe,be){k*=2,k<0&&(k=k*-1-1);var Pe=1<<H;return(Pe*Pe*k+Pe*be+oe).toString(36)+H.toString(36)+C.toString(36)}function $W(k,C,H){for(var oe="",be,Pe=k;Pe>0;Pe--)be=1<<Pe-1,oe+=(C&be?1:0)+(H&be?2:0);return oe}me("CanonicalTileID",j0),me("OverscaledTileID",Xf,{omit:["posMatrix"]});var Bv=function(C,H,oe){if(this.uid=C,H.height!==H.width)throw new RangeError("DEM tiles must be square");if(oe&&oe!=="mapbox"&&oe!=="terrarium")return B('"'+oe+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=H.height;var be=this.dim=H.height-2;this.data=new Uint32Array(H.data.buffer),this.encoding=oe||"mapbox";for(var Pe=0;Pe<be;Pe++)this.data[this._idx(-1,Pe)]=this.data[this._idx(0,Pe)],this.data[this._idx(be,Pe)]=this.data[this._idx(be-1,Pe)],this.data[this._idx(Pe,-1)]=this.data[this._idx(Pe,0)],this.data[this._idx(Pe,be)]=this.data[this._idx(Pe,be-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(be,-1)]=this.data[this._idx(be-1,0)],this.data[this._idx(-1,be)]=this.data[this._idx(0,be-1)],this.data[this._idx(be,be)]=this.data[this._idx(be-1,be-1)]};Bv.prototype.get=function(C,H){var oe=new Uint8Array(this.data.buffer),be=this._idx(C,H)*4,Pe=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return Pe(oe[be],oe[be+1],oe[be+2])},Bv.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Bv.prototype._idx=function(C,H){if(C<-1||C>=this.dim+1||H<-1||H>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(H+1)*this.stride+(C+1)},Bv.prototype._unpackMapbox=function(C,H,oe){return(C*256*256+H*256+oe)/10-1e4},Bv.prototype._unpackTerrarium=function(C,H,oe){return C*256+H+oe/256-32768},Bv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Bv.prototype.backfillBorder=function(C,H,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=H*this.dim,Pe=H*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(H){case-1:be=Pe-1;break;case 1:Pe=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-H*this.dim,Ht=-oe*this.dim,er=Ne;er<ft;er++)for(var Lr=be;Lr<Pe;Lr++)this.data[this._idx(Lr,er)]=C.data[this._idx(Lr+It,er+Ht)]},me("DEMData",Bv);function QW(k,C){var H={};if(!C)return H;for(var oe=function(){var Ne=Pe[be],ft=Ne.layerIds.map(function(Lr){return C.getLayer(Lr)}).filter(Boolean);if(ft.length!==0){Ne.layers=ft,Ne.stateDependentLayerIds&&(Ne.stateDependentLayers=Ne.stateDependentLayerIds.map(function(Lr){return ft.filter(function(Zr){return Zr.id===Lr})[0]}));for(var It=0,Ht=ft;It<Ht.length;It+=1){var er=Ht[It];H[er.id]=Ne}}},be=0,Pe=k;be<Pe.length;be+=1)oe();return H}var vb=function(C){this._stringToNumber={},this._numberToString=[];for(var H=0;H<C.length;H++){var oe=C[H];this._stringToNumber[oe]=H,this._numberToString[H]=oe}};vb.prototype.encode=function(C){return this._stringToNumber[C]},vb.prototype.decode=function(C){return this._numberToString[C]};var mb=function(C,H,oe,be,Pe){this.type="Feature",this._vectorTileFeature=C,C._z=H,C._x=oe,C._y=be,this.properties=C.properties,this.id=Pe},_A={geometry:{configurable:!0}};_A.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},_A.geometry.set=function(k){this._geometry=k},mb.prototype.toJSON=function(){var C={geometry:this.geometry};for(var H in this)H==="_geometry"||H==="_vectorTileFeature"||(C[H]=this[H]);return C},Object.defineProperties(mb.prototype,_A);var Hg=function(){this.state={},this.stateChanges={},this.deletedStates={}};Hg.prototype.updateState=function(C,H,oe){var be=String(H);if(this.stateChanges[C]=this.stateChanges[C]||{},this.stateChanges[C][be]=this.stateChanges[C][be]||{},g(this.stateChanges[C][be],oe),this.deletedStates[C]===null){this.deletedStates[C]={};for(var Pe in this.state[C])Pe!==be&&(this.deletedStates[C][Pe]=null)}else{var Ne=this.deletedStates[C]&&this.deletedStates[C][be]===null;if(Ne){this.deletedStates[C][be]={};for(var ft in this.state[C][be])oe[ft]||(this.deletedStates[C][be][ft]=null)}else for(var It in oe){var Ht=this.deletedStates[C]&&this.deletedStates[C][be]&&this.deletedStates[C][be][It]===null;Ht&&delete this.deletedStates[C][be][It]}}},Hg.prototype.removeFeatureState=function(C,H,oe){var be=this.deletedStates[C]===null;if(!be){var Pe=String(H);if(this.deletedStates[C]=this.deletedStates[C]||{},oe&&H!==void 0)this.deletedStates[C][Pe]!==null&&(this.deletedStates[C][Pe]=this.deletedStates[C][Pe]||{},this.deletedStates[C][Pe][oe]=null);else if(H!==void 0){var Ne=this.stateChanges[C]&&this.stateChanges[C][Pe];if(Ne){this.deletedStates[C][Pe]={};for(oe in this.stateChanges[C][Pe])this.deletedStates[C][Pe][oe]=null}else this.deletedStates[C][Pe]=null}else this.deletedStates[C]=null}},Hg.prototype.getState=function(C,H){var oe=String(H),be=this.state[C]||{},Pe=this.stateChanges[C]||{},Ne=g({},be[oe],Pe[oe]);if(this.deletedStates[C]===null)return{};if(this.deletedStates[C]){var ft=this.deletedStates[C][H];if(ft===null)return{};for(var It in ft)delete Ne[It]}return Ne},Hg.prototype.initializeTileState=function(C,H){C.setFeatureState(this.state,H)},Hg.prototype.coalesceChanges=function(C,H){var oe={};for(var be in this.stateChanges){this.state[be]=this.state[be]||{};var Pe={};for(var Ne in this.stateChanges[be])this.state[be][Ne]||(this.state[be][Ne]={}),g(this.state[be][Ne],this.stateChanges[be][Ne]),Pe[Ne]=this.state[be][Ne];oe[be]=Pe}for(var ft in this.deletedStates){this.state[ft]=this.state[ft]||{};var It={};if(this.deletedStates[ft]===null)for(var Ht in this.state[ft])It[Ht]={},this.state[ft][Ht]={};else for(var er in this.deletedStates[ft]){var Lr=this.deletedStates[ft][er]===null;if(Lr)this.state[ft][er]={};else for(var Zr=0,Vr=Object.keys(this.deletedStates[ft][er]);Zr<Vr.length;Zr+=1){var ua=Vr[Zr];delete this.state[ft][er][ua]}It[er]=this.state[ft][er]}oe[ft]=oe[ft]||{},g(oe[ft],It)}if(this.stateChanges={},this.deletedStates={},Object.keys(oe).length!==0)for(var Fa in C){var Mi=C[Fa];Mi.setFeatureState(oe,H)}};var Nv=function(C,H){this.tileID=C,this.x=C.canonical.x,this.y=C.canonical.y,this.z=C.canonical.z,this.grid=new vu(ui,16,0),this.grid3D=new vu(ui,16,0),this.featureIndexArray=new wl,this.promoteId=H};Nv.prototype.insert=function(C,H,oe,be,Pe,Ne){var ft=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(oe,be,Pe);for(var It=Ne?this.grid3D:this.grid,Ht=0;Ht<H.length;Ht++){for(var er=H[Ht],Lr=[1/0,1/0,-1/0,-1/0],Zr=0;Zr<er.length;Zr++){var Vr=er[Zr];Lr[0]=Math.min(Lr[0],Vr.x),Lr[1]=Math.min(Lr[1],Vr.y),Lr[2]=Math.max(Lr[2],Vr.x),Lr[3]=Math.max(Lr[3],Vr.y)}Lr[0]<ui&&Lr[1]<ui&&Lr[2]>=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Nv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new vo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nv.prototype.query=function(C,H,oe,be){var Pe=this;this.loadVTLayers();for(var Ne=C.params||{},ft=ui/C.tileSize/C.scale,It=$e(Ne.filter),Ht=C.queryGeometry,er=C.queryPadding*ft,Lr=Vk(Ht),Zr=this.grid.query(Lr.minX-er,Lr.minY-er,Lr.maxX+er,Lr.maxY+er),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-er,Vr.minY-er,Vr.maxX+er,Vr.maxY+er,function(wn,Vn,Un,Mo){return td(C.cameraQueryGeometry,wn-er,Vn-er,Un+er,Mo+er)}),Fa=0,Mi=ua;Fa<Mi.length;Fa+=1){var ii=Mi[Fa];Zr.push(ii)}Zr.sort(eX);for(var $i={},Oi,Ji=function(wn){var Vn=Zr[wn];if(Vn!==Oi){Oi=Vn;var Un=Pe.featureIndexArray.get(Vn),Mo=null;Pe.loadMatchingFeature($i,Un.bucketIndex,Un.sourceLayerIndex,Un.featureIndex,It,Ne.layers,Ne.availableImages,H,oe,be,function(so,mo,Cs){return Mo||(Mo=cn(so)),mo.queryIntersectsFeature(Ht,so,Cs,Mo,Pe.z,C.transform,ft,C.pixelPosMatrix)})}},ln=0;ln<Zr.length;ln++)Ji(ln);return $i},Nv.prototype.loadMatchingFeature=function(C,H,oe,be,Pe,Ne,ft,It,Ht,er,Lr){var Zr=this.bucketLayerIDs[H];if(!(Ne&&!P(Ne,Zr))){var Vr=this.sourceLayerCoder.decode(oe),ua=this.vtLayers[Vr],Fa=ua.feature(be);if(Pe.needGeometry){var Mi=yo(Fa,!0);if(!Pe.filter(new mn(this.tileID.overscaledZ),Mi,this.tileID.canonical))return}else if(!Pe.filter(new mn(this.tileID.overscaledZ),Fa))return;for(var ii=this.getId(Fa,Vr),$i=0;$i<Zr.length;$i++){var Oi=Zr[$i];if(!(Ne&&Ne.indexOf(Oi)<0)){var Ji=It[Oi];if(Ji){var ln={};ii!==void 0&&er&&(ln=er.getState(Ji.sourceLayer||"_geojsonTileLayer",ii));var wn=g({},Ht[Oi]);wn.paint=qk(wn.paint,Ji.paint,Fa,ln,ft),wn.layout=qk(wn.layout,Ji.layout,Fa,ln,ft);var Vn=!Lr||Lr(Fa,Ji,ln);if(Vn){var Un=new mb(Fa,this.z,this.x,this.y,ii);Un.layer=wn;var Mo=C[Oi];Mo===void 0&&(Mo=C[Oi]=[]),Mo.push({featureIndex:be,feature:Un,intersectionZ:Vn})}}}}}},Nv.prototype.lookupSymbolFeatures=function(C,H,oe,be,Pe,Ne,ft,It){var Ht={};this.loadVTLayers();for(var er=$e(Pe),Lr=0,Zr=C;Lr<Zr.length;Lr+=1){var Vr=Zr[Lr];this.loadMatchingFeature(Ht,oe,be,Vr,er,Ne,ft,It,H)}return Ht},Nv.prototype.hasLayer=function(C){for(var H=0,oe=this.bucketLayerIDs;H<oe.length;H+=1)for(var be=oe[H],Pe=0,Ne=be;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];if(C===ft)return!0}return!1},Nv.prototype.getId=function(C,H){var oe=C.id;if(this.promoteId){var be=typeof this.promoteId=="string"?this.promoteId:this.promoteId[H];oe=C.properties[be],typeof oe=="boolean"&&(oe=Number(oe))}return oe},me("FeatureIndex",Nv,{omit:["rawTileData","sourceLayerCoder"]});function qk(k,C,H,oe,be){return F(k,function(Pe,Ne){var ft=C instanceof _c?C.get(Ne):null;return ft&&ft.evaluate?ft.evaluate(H,oe,be):ft})}function Vk(k){for(var C=1/0,H=1/0,oe=-1/0,be=-1/0,Pe=0,Ne=k;Pe<Ne.length;Pe+=1){var ft=Ne[Pe];C=Math.min(C,ft.x),H=Math.min(H,ft.y),oe=Math.max(oe,ft.x),be=Math.max(be,ft.y)}return{minX:C,minY:H,maxX:oe,maxY:be}}function eX(k,C){return C-k}var tX=3e4,mh=function(C,H){this.tileID=C,this.uid=u(),this.uses=0,this.tileSize=H,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};mh.prototype.registerFadeDuration=function(C){var H=C+this.timeAdded;H<we.now()||this.fadeEndTime&&H<this.fadeEndTime||(this.fadeEndTime=H)},mh.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},mh.prototype.loadVectorData=function(C,H,oe){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!C){this.collisionBoxArray=new ho;return}C.featureIndex&&(this.latestFeatureIndex=C.featureIndex,C.rawTileData?(this.latestRawTileData=C.rawTileData,this.latestFeatureIndex.rawTileData=C.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=C.collisionBoxArray,this.buckets=QW(C.buckets,H.style),this.hasSymbolBuckets=!1;for(var be in this.buckets){var Pe=this.buckets[be];if(Pe instanceof Du)if(this.hasSymbolBuckets=!0,oe)Pe.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Ne in this.buckets){var ft=this.buckets[Ne];if(ft instanceof Du&&ft.hasRTLText){this.hasRTLText=!0,xl();break}}this.queryPadding=0;for(var It in this.buckets){var Ht=this.buckets[It];this.queryPadding=Math.max(this.queryPadding,H.style.getLayer(It).queryRadius(Ht))}C.imageAtlas&&(this.imageAtlas=C.imageAtlas),C.glyphAtlasImage&&(this.glyphAtlasImage=C.glyphAtlasImage)},mh.prototype.unloadVectorData=function(){for(var C in this.buckets)this.buckets[C].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},mh.prototype.getBucket=function(C){return this.buckets[C.id]},mh.prototype.upload=function(C){for(var H in this.buckets){var oe=this.buckets[H];oe.uploadPending()&&oe.upload(C)}var be=C.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new N0(C,this.imageAtlas.image,be.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new N0(C,this.glyphAtlasImage,be.ALPHA),this.glyphAtlasImage=null)},mh.prototype.prepare=function(C){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(C,this.imageAtlasTexture)},mh.prototype.queryRenderedFeatures=function(C,H,oe,be,Pe,Ne,ft,It,Ht,er){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:be,cameraQueryGeometry:Pe,scale:Ne,tileSize:this.tileSize,pixelPosMatrix:er,transform:It,params:ft,queryPadding:this.queryPadding*Ht},C,H,oe)},mh.prototype.querySourceFeatures=function(C,H){var oe=this.latestFeatureIndex;if(!(!oe||!oe.rawTileData)){var be=oe.loadVTLayers(),Pe=H?H.sourceLayer:"",Ne=be._geojsonTileLayer||be[Pe];if(Ne)for(var ft=$e(H&&H.filter),It=this.tileID.canonical,Ht=It.z,er=It.x,Lr=It.y,Zr={z:Ht,x:er,y:Lr},Vr=0;Vr<Ne.length;Vr++){var ua=Ne.feature(Vr);if(ft.needGeometry){var Fa=yo(ua,!0);if(!ft.filter(new mn(this.tileID.overscaledZ),Fa,this.tileID.canonical))continue}else if(!ft.filter(new mn(this.tileID.overscaledZ),ua))continue;var Mi=oe.getId(ua,Pe),ii=new mb(ua,Ht,er,Lr,Mi);ii.tile=Zr,C.push(ii)}}},mh.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},mh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},mh.prototype.setExpiryData=function(C){var H=this.expirationTime;if(C.cacheControl){var oe=de(C.cacheControl);oe["max-age"]&&(this.expirationTime=Date.now()+oe["max-age"]*1e3)}else C.expires&&(this.expirationTime=new Date(C.expires).getTime());if(this.expirationTime){var be=Date.now(),Pe=!1;if(this.expirationTime>be)Pe=!1;else if(!H)Pe=!0;else if(this.expirationTime<H)Pe=!0;else{var Ne=this.expirationTime-H;Ne?this.expirationTime=be+Math.max(Ne,tX):Pe=!0}Pe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},mh.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},mh.prototype.setFeatureState=function(C,H){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(C).length===0)){var oe=this.latestFeatureIndex.loadVTLayers();for(var be in this.buckets)if(H.style.hasLayer(be)){var Pe=this.buckets[be],Ne=Pe.layers[0].sourceLayer||"_geojsonTileLayer",ft=oe[Ne],It=C[Ne];if(!(!ft||!It||Object.keys(It).length===0)){Pe.update(It,ft,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Ht=H&&H.style&&H.style.getLayer(be);Ht&&(this.queryPadding=Math.max(this.queryPadding,Ht.queryRadius(Pe)))}}}},mh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},mh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<we.now()},mh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},mh.prototype.setHoldDuration=function(C){this.symbolFadeHoldUntil=we.now()+C},mh.prototype.setDependencies=function(C,H){for(var oe={},be=0,Pe=H;be<Pe.length;be+=1){var Ne=Pe[be];oe[Ne]=!0}this.dependencies[C]=oe},mh.prototype.hasDependency=function(C,H){for(var oe=0,be=C;oe<be.length;oe+=1){var Pe=be[oe],Ne=this.dependencies[Pe];if(Ne)for(var ft=0,It=H;ft<It.length;ft+=1){var Ht=It[ft];if(Ne[Ht])return!0}}return!1};var rX=["type","source","source-layer","minzoom","maxzoom","filter","layout"],ym=s.performance,Gk=function(C){this._marks={start:[C.url,"start"].join("#"),end:[C.url,"end"].join("#"),measure:C.url.toString()},ym.mark(this._marks.start)};Gk.prototype.finish=function(){ym.mark(this._marks.end);var C=ym.getEntriesByName(this._marks.measure);return C.length===0&&(ym.measure(this._marks.measure,this._marks.start,this._marks.end),C=ym.getEntriesByName(this._marks.measure),ym.clearMarks(this._marks.start),ym.clearMarks(this._marks.end),ym.clearMeasures(this._marks.measure)),C},e.Actor=Gg,e.AlphaImage=Ip,e.CanonicalTileID=j0,e.CollisionBoxArray=ho,e.Color=Bs,e.DEMData=Bv,e.DataConstantProperty=it,e.DictionaryCoder=vb,e.EXTENT=ui,e.ErrorEvent=Cr,e.EvaluationParameters=mn,e.Event=Br,e.Evented=xr,e.FeatureIndex=Nv,e.FillBucket=rd,e.FillExtrusionBucket=cd,e.ImageAtlas=Zd,e.ImagePosition=Pf,e.LineBucket=Hf,e.LngLat=Fc,e.LngLatBounds=Wf,e.MercatorCoordinate=U0,e.ONE_EM=en,e.OverscaledTileID=Xf,e.Point=n,e.Point$1=n,e.Properties=va,e.Protobuf=vo,e.RGBAImage=eh,e.RequestManager=ne,e.RequestPerformance=Gk,e.ResourceType=hi,e.SegmentVector=Po,e.SourceFeatureState=Hg,e.StructArrayLayout1ui2=Xn,e.StructArrayLayout2f1f2i16=Ti,e.StructArrayLayout2i4=Ma,e.StructArrayLayout3ui6=Xi,e.StructArrayLayout4i8=Qa,e.SymbolBucket=Du,e.Texture=N0,e.Tile=mh,e.Transitionable=vs,e.Uniform1f=St,e.Uniform1i=mt,e.Uniform2f=Ft,e.Uniform3f=rr,e.Uniform4f=hr,e.UniformColor=nr,e.UniformMatrix4f=or,e.UnwrappedTileID=jk,e.ValidationError=Pn,e.WritingMode=vp,e.ZoomHistory=tr,e.add=Pp,e.addDynamicAttributes=vA,e.asyncAll=w,e.bezier=c,e.bindAll=L,e.browser=we,e.cacheEntryPossiblyAdded=Ta,e.clamp=l,e.clearTileCache=Ia,e.clipLine=Ak,e.clone=om,e.clone$1=O,e.clone$2=xg,e.collisionCircleLayout=ar,e.config=Se,e.create=nm,e.create$1=ph,e.create$2=Gd,e.createCommonjsModule=t,e.createExpression=zo,e.createLayout=Ei,e.createStyleLayer=XW,e.cross=jT,e.deepEqual=h,e.dot=UT,e.dot$1=WT,e.ease=T,e.emitValidationErrors=Ru,e.endsWith=z,e.enforceCacheSizeLimit=Oa,e.evaluateSizeForFeature=gk,e.evaluateSizeForZoom=yk,e.evaluateVariableOffset=Ek,e.evented=ro,e.extend=g,e.featureFilter=$e,e.filterObject=N,e.fromRotation=iv,e.getAnchorAlignment=$1,e.getAnchorJustification=dA,e.getArrayBuffer=ra,e.getImage=tn,e.getJSON=ta,e.getRTLTextPluginStatus=Yo,e.getReferrer=Kt,e.getVideo=fn,e.identity=Pv,e.invert=nv,e.isChar=zt,e.isMapboxURL=Ce,e.keysDifference=M,e.makeRequest=Fr,e.mapObject=F,e.mercatorXfromLng=Bk,e.mercatorYfromLat=Nk,e.mercatorZfromAltitude=Uk,e.mul=w0,e.multiply=ov,e.mvt=Xd,e.nextPowerOfTwo=m,e.normalize=T0,e.number=El,e.offscreenCanvasSupported=Ca,e.ortho=Mu,e.parseGlyphPBF=_d,e.pbf=vo,e.performSymbolLayout=EW,e.perspective=sm,e.pick=b,e.plugin=al,e.polygonIntersectsPolygon=Fo,e.postMapLoadEvent=Ae,e.postTurnstileEvent=Oe,e.potpack=Wp,e.refProperties=rX,e.register=me,e.registerForPluginStateChange=oo,e.renderColorRamp=M0,e.rotate=Lv,e.rotateX=Dh,e.rotateZ=Iv,e.scale=fu,e.scale$1=HT,e.scale$2=bg,e.setCacheLimits=qa,e.setRTLTextPlugin=Wo,e.sphericalToCartesian=le,e.sqrLen=I1,e.styleSpec=Gi,e.sub=VT,e.symbolSize=yW,e.transformMat3=qT,e.transformMat4=Rv,e.translate=cc,e.triggerPluginCompletionEvent=In,e.uniqueId=u,e.validateCustomStyleLayer=GW,e.validateLight=$o,e.validateStyle=Jo,e.values=A,e.vectorTile=Xd,e.version=r,e.warnOnce=B,e.webpSupported=Ie,e.window=s,e.wrap=_}),E(["./shared"],function(e){"use strict";function t(Kt){var Dt=typeof Kt;if(Dt==="number"||Dt==="boolean"||Dt==="string"||Kt===void 0||Kt===null)return JSON.stringify(Kt);if(Array.isArray(Kt)){for(var Yt="[",Jt=0,Fr=Kt;Jt<Fr.length;Jt+=1){var ta=Fr[Jt];Yt+=t(ta)+","}return Yt+"]"}for(var ra=Object.keys(Kt).sort(),ca="{",Ba=0;Ba<ra.length;Ba++)ca+=JSON.stringify(ra[Ba])+":"+t(Kt[ra[Ba]])+",";return ca+"}"}function r(Kt){for(var Dt="",Yt=0,Jt=e.refProperties;Yt<Jt.length;Yt+=1){var Fr=Jt[Yt];Dt+="/"+t(Kt[Fr])}return Dt}function o(Kt,Dt){for(var Yt={},Jt=0;Jt<Kt.length;Jt++){var Fr=Dt&&Dt[Kt[Jt].id]||r(Kt[Jt]);Dt&&(Dt[Kt[Jt].id]=Fr);var ta=Yt[Fr];ta||(ta=Yt[Fr]=[]),ta.push(Kt[Jt])}var ra=[];for(var ca in Yt)ra.push(Yt[ca]);return ra}var a=function(Dt){this.keyCache={},Dt&&this.replace(Dt)};a.prototype.replace=function(Dt){this._layerConfigs={},this._layers={},this.update(Dt,[])},a.prototype.update=function(Dt,Yt){for(var Jt=this,Fr=0,ta=Dt;Fr<ta.length;Fr+=1){var ra=ta[Fr];this._layerConfigs[ra.id]=ra;var ca=this._layers[ra.id]=e.createStyleLayer(ra);ca._featureFilter=e.featureFilter(ca.filter),this.keyCache[ra.id]&&delete this.keyCache[ra.id]}for(var Ba=0,$a=Yt;Ba<$a.length;Ba+=1){var Za=$a[Ba];delete this.keyCache[Za],delete this._layerConfigs[Za],delete this._layers[Za]}this.familiesBySource={};for(var ri=o(e.values(this._layerConfigs),this.keyCache),pi=0,Ra=ri;pi<Ra.length;pi+=1){var an=Ra[pi],tn=an.map(function(xr){return Jt._layers[xr.id]}),fn=tn[0];if(fn.visibility!=="none"){var xt=fn.source||"",lt=this.familiesBySource[xt];lt||(lt=this.familiesBySource[xt]={});var Br=fn.sourceLayer||"_geojsonTileLayer",Cr=lt[Br];Cr||(Cr=lt[Br]=[]),Cr.push(tn)}}};var n=1,i=function(Dt){var Yt={},Jt=[];for(var Fr in Dt){var ta=Dt[Fr],ra=Yt[Fr]={};for(var ca in ta){var Ba=ta[+ca];if(!(!Ba||Ba.bitmap.width===0||Ba.bitmap.height===0)){var $a={x:0,y:0,w:Ba.bitmap.width+2*n,h:Ba.bitmap.height+2*n};Jt.push($a),ra[ca]={rect:$a,metrics:Ba.metrics}}}}var Za=e.potpack(Jt),ri=Za.w,pi=Za.h,Ra=new e.AlphaImage({width:ri||1,height:pi||1});for(var an in Dt){var tn=Dt[an];for(var fn in tn){var xt=tn[+fn];if(!(!xt||xt.bitmap.width===0||xt.bitmap.height===0)){var lt=Yt[an][fn].rect;e.AlphaImage.copy(xt.bitmap,Ra,{x:0,y:0},{x:lt.x+n,y:lt.y+n},xt.bitmap)}}}this.image=Ra,this.positions=Yt};e.register("GlyphAtlas",i);var s=function(Dt){this.tileID=new e.OverscaledTileID(Dt.tileID.overscaledZ,Dt.tileID.wrap,Dt.tileID.canonical.z,Dt.tileID.canonical.x,Dt.tileID.canonical.y),this.uid=Dt.uid,this.zoom=Dt.zoom,this.pixelRatio=Dt.pixelRatio,this.tileSize=Dt.tileSize,this.source=Dt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Dt.showCollisionBoxes,this.collectResourceTiming=!!Dt.collectResourceTiming,this.returnDependencies=!!Dt.returnDependencies,this.promoteId=Dt.promoteId};s.prototype.parse=function(Dt,Yt,Jt,Fr,ta){var ra=this;this.status="parsing",this.data=Dt,this.collisionBoxArray=new e.CollisionBoxArray;var ca=new e.DictionaryCoder(Object.keys(Dt.layers).sort()),Ba=new e.FeatureIndex(this.tileID,this.promoteId);Ba.bucketLayerIDs=[];var $a={},Za={featureIndex:Ba,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Jt},ri=Yt.familiesBySource[this.source];for(var pi in ri){var Ra=Dt.layers[pi];if(Ra){Ra.version===1&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+pi+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var an=ca.encode(pi),tn=[],fn=0;fn<Ra.length;fn++){var xt=Ra.feature(fn),lt=Ba.getId(xt,pi);tn.push({feature:xt,id:lt,index:fn,sourceLayerIndex:an})}for(var Br=0,Cr=ri[pi];Br<Cr.length;Br+=1){var xr=Cr[Br],Rr=xr[0];if(!(Rr.minzoom&&this.zoom<Math.floor(Rr.minzoom))&&!(Rr.maxzoom&&this.zoom>=Rr.maxzoom)&&Rr.visibility!=="none"){h(xr,this.zoom,Jt);var Ur=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:xr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:an,sourceID:this.source});Ur.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(xr.map(function(la){return la.id}))}}}}var Hr,gt,Xt,vr,Or=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Or).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Or},function(la,_a){Hr||(Hr=la,gt=_a,ma.call(ra))}):gt={};var ba=Object.keys(Za.iconDependencies);ba.length?Fr.send("getImages",{icons:ba,source:this.source,tileID:this.tileID,type:"icons"},function(la,_a){Hr||(Hr=la,Xt=_a,ma.call(ra))}):Xt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,_a){Hr||(Hr=la,vr=_a,ma.call(ra))}):vr={},ma.call(this);function ma(){if(Hr)return ta(Hr);if(gt&&Xt&&vr){var la=new i(gt),_a=new e.ImageAtlas(Xt,vr);for(var Ai in $a){var ki=$a[Ai];ki instanceof e.SymbolBucket?(h(ki.layers,this.zoom,Jt),e.performSymbolLayout(ki,gt,la.positions,Xt,_a.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ki.hasPattern&&(ki instanceof e.LineBucket||ki instanceof e.FillBucket||ki instanceof e.FillExtrusionBucket)&&(h(ki.layers,this.zoom,Jt),ki.addFeatures(Za,this.tileID.canonical,_a.patternPositions))}this.status="done",ta(null,{buckets:e.values($a).filter(function(Ki){return!Ki.isEmpty()}),featureIndex:Ba,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:la.image,imageAtlas:_a,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Xt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Kt,Dt,Yt){for(var Jt=new e.EvaluationParameters(Dt),Fr=0,ta=Kt;Fr<ta.length;Fr+=1){var ra=ta[Fr];ra.recalculate(Jt,Yt)}}function f(Kt,Dt){var Yt=e.getArrayBuffer(Kt.request,function(Jt,Fr,ta,ra){Jt?Dt(Jt):Fr&&Dt(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(Fr)),rawData:Fr,cacheControl:ta,expires:ra})});return function(){Yt.cancel(),Dt()}}var v=function(Dt,Yt,Jt,Fr){this.actor=Dt,this.layerIndex=Yt,this.availableImages=Jt,this.loadVectorData=Fr||f,this.loading={},this.loaded={}};v.prototype.loadTile=function(Dt,Yt){var Jt=this,Fr=Dt.uid;this.loading||(this.loading={});var ta=Dt&&Dt.request&&Dt.request.collectResourceTiming?new e.RequestPerformance(Dt.request):!1,ra=this.loading[Fr]=new s(Dt);ra.abort=this.loadVectorData(Dt,function(ca,Ba){if(delete Jt.loading[Fr],ca||!Ba)return ra.status="done",Jt.loaded[Fr]=ra,Yt(ca);var $a=Ba.rawData,Za={};Ba.expires&&(Za.expires=Ba.expires),Ba.cacheControl&&(Za.cacheControl=Ba.cacheControl);var ri={};if(ta){var pi=ta.finish();pi&&(ri.resourceTiming=JSON.parse(JSON.stringify(pi)))}ra.vectorTile=Ba.vectorTile,ra.parse(Ba.vectorTile,Jt.layerIndex,Jt.availableImages,Jt.actor,function(Ra,an){if(Ra||!an)return Yt(Ra);Yt(null,e.extend({rawTileData:$a.slice(0)},an,Za,ri))}),Jt.loaded=Jt.loaded||{},Jt.loaded[Fr]=ra})},v.prototype.reloadTile=function(Dt,Yt){var Jt=this,Fr=this.loaded,ta=Dt.uid,ra=this;if(Fr&&Fr[ta]){var ca=Fr[ta];ca.showCollisionBoxes=Dt.showCollisionBoxes;var Ba=function($a,Za){var ri=ca.reloadCallback;ri&&(delete ca.reloadCallback,ca.parse(ca.vectorTile,ra.layerIndex,Jt.availableImages,ra.actor,ri)),Yt($a,Za)};ca.status==="parsing"?ca.reloadCallback=Ba:ca.status==="done"&&(ca.vectorTile?ca.parse(ca.vectorTile,this.layerIndex,this.availableImages,this.actor,Ba):Ba())}},v.prototype.abortTile=function(Dt,Yt){var Jt=this.loading,Fr=Dt.uid;Jt&&Jt[Fr]&&Jt[Fr].abort&&(Jt[Fr].abort(),delete Jt[Fr]),Yt()},v.prototype.removeTile=function(Dt,Yt){var Jt=this.loaded,Fr=Dt.uid;Jt&&Jt[Fr]&&delete Jt[Fr],Yt()};var c=e.window.ImageBitmap,T=function(){this.loaded={}};T.prototype.loadTile=function(Dt,Yt){var Jt=Dt.uid,Fr=Dt.encoding,ta=Dt.rawImageData,ra=c&&ta instanceof c?this.getImageData(ta):ta,ca=new e.DEMData(Jt,ra,Fr);this.loaded=this.loaded||{},this.loaded[Jt]=ca,Yt(null,ca)},T.prototype.getImageData=function(Dt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Dt.width,Dt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Dt.width,this.offscreenCanvas.height=Dt.height,this.offscreenCanvasContext.drawImage(Dt,0,0,Dt.width,Dt.height);var Yt=this.offscreenCanvasContext.getImageData(-1,-1,Dt.width+2,Dt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:Yt.width,height:Yt.height},Yt.data)},T.prototype.removeTile=function(Dt){var Yt=this.loaded,Jt=Dt.uid;Yt&&Yt[Jt]&&delete Yt[Jt]};var l=_;function _(Kt,Dt){var Yt=Kt&&Kt.type,Jt;if(Yt==="FeatureCollection")for(Jt=0;Jt<Kt.features.length;Jt++)_(Kt.features[Jt],Dt);else if(Yt==="GeometryCollection")for(Jt=0;Jt<Kt.geometries.length;Jt++)_(Kt.geometries[Jt],Dt);else if(Yt==="Feature")_(Kt.geometry,Dt);else if(Yt==="Polygon")w(Kt.coordinates,Dt);else if(Yt==="MultiPolygon")for(Jt=0;Jt<Kt.coordinates.length;Jt++)w(Kt.coordinates[Jt],Dt);return Kt}function w(Kt,Dt){if(Kt.length!==0){A(Kt[0],Dt);for(var Yt=1;Yt<Kt.length;Yt++)A(Kt[Yt],!Dt)}}function A(Kt,Dt){for(var Yt=0,Jt=0,Fr=Kt.length,ta=Fr-1;Jt<Fr;ta=Jt++)Yt+=(Kt[Jt][0]-Kt[ta][0])*(Kt[ta][1]+Kt[Jt][1]);Yt>=0!=!!Dt&&Kt.reverse()}var M=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(Dt){this._feature=Dt,this.extent=e.EXTENT,this.type=Dt.type,this.properties=Dt.tags,"id"in Dt&&!isNaN(Dt.id)&&(this.id=parseInt(Dt.id,10))};g.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Dt=[],Yt=0,Jt=this._feature.geometry;Yt<Jt.length;Yt+=1){var Fr=Jt[Yt];Dt.push([new e.Point$1(Fr[0],Fr[1])])}return Dt}else{for(var ta=[],ra=0,ca=this._feature.geometry;ra<ca.length;ra+=1){for(var Ba=ca[ra],$a=[],Za=0,ri=Ba;Za<ri.length;Za+=1){var pi=ri[Za];$a.push(new e.Point$1(pi[0],pi[1]))}ta.push($a)}return ta}},g.prototype.toGeoJSON=function(Dt,Yt,Jt){return M.call(this,Dt,Yt,Jt)};var b=function(Dt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=Dt.length,this._features=Dt};b.prototype.feature=function(Dt){return new g(this._features[Dt])};var p=e.vectorTile.VectorTileFeature,u=y;function y(Kt,Dt){this.options=Dt||{},this.features=Kt,this.length=Kt.length}y.prototype.feature=function(Kt){return new m(this.features[Kt],this.options.extent)};function m(Kt,Dt){this.id=typeof Kt.id=="number"?Kt.id:void 0,this.type=Kt.type,this.rawGeometry=Kt.type===1?[Kt.geometry]:Kt.geometry,this.properties=Kt.tags,this.extent=Dt||4096}m.prototype.loadGeometry=function(){var Kt=this.rawGeometry;this.geometry=[];for(var Dt=0;Dt<Kt.length;Dt++){for(var Yt=Kt[Dt],Jt=[],Fr=0;Fr<Yt.length;Fr++)Jt.push(new e.Point$1(Yt[Fr][0],Yt[Fr][1]));this.geometry.push(Jt)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Kt=this.geometry,Dt=1/0,Yt=-1/0,Jt=1/0,Fr=-1/0,ta=0;ta<Kt.length;ta++)for(var ra=Kt[ta],ca=0;ca<ra.length;ca++){var Ba=ra[ca];Dt=Math.min(Dt,Ba.x),Yt=Math.max(Yt,Ba.x),Jt=Math.min(Jt,Ba.y),Fr=Math.max(Fr,Ba.y)}return[Dt,Jt,Yt,Fr]},m.prototype.toGeoJSON=p.prototype.toGeoJSON;var R=N,L=N,z=O,F=u;function N(Kt){var Dt=new e.pbf;return P(Kt,Dt),Dt.finish()}function O(Kt,Dt){Dt=Dt||{};var Yt={};for(var Jt in Kt)Yt[Jt]=new u(Kt[Jt].features,Dt),Yt[Jt].name=Jt,Yt[Jt].version=Dt.version,Yt[Jt].extent=Dt.extent;return N({layers:Yt})}function P(Kt,Dt){for(var Yt in Kt.layers)Dt.writeMessage(3,U,Kt.layers[Yt])}function U(Kt,Dt){Dt.writeVarintField(15,Kt.version||1),Dt.writeStringField(1,Kt.name||""),Dt.writeVarintField(5,Kt.extent||4096);var Yt,Jt={keys:[],values:[],keycache:{},valuecache:{}};for(Yt=0;Yt<Kt.length;Yt++)Jt.feature=Kt.feature(Yt),Dt.writeMessage(2,B,Jt);var Fr=Jt.keys;for(Yt=0;Yt<Fr.length;Yt++)Dt.writeStringField(3,Fr[Yt]);var ta=Jt.values;for(Yt=0;Yt<ta.length;Yt++)Dt.writeMessage(4,de,ta[Yt])}function B(Kt,Dt){var Yt=Kt.feature;Yt.id!==void 0&&Dt.writeVarintField(1,Yt.id),Dt.writeMessage(2,X,Kt),Dt.writeVarintField(3,Yt.type),Dt.writeMessage(4,ce,Yt)}function X(Kt,Dt){var Yt=Kt.feature,Jt=Kt.keys,Fr=Kt.values,ta=Kt.keycache,ra=Kt.valuecache;for(var ca in Yt.properties){var Ba=ta[ca];typeof Ba>"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Dt.writeVarint(Ba);var $a=Yt.properties[ca],Za=typeof $a;Za!=="string"&&Za!=="boolean"&&Za!=="number"&&($a=JSON.stringify($a));var ri=Za+":"+$a,pi=ra[ri];typeof pi>"u"&&(Fr.push($a),pi=Fr.length-1,ra[ri]=pi),Dt.writeVarint(pi)}}function $(Kt,Dt){return(Dt<<3)+(Kt&7)}function le(Kt){return Kt<<1^Kt>>31}function ce(Kt,Dt){for(var Yt=Kt.loadGeometry(),Jt=Kt.type,Fr=0,ta=0,ra=Yt.length,ca=0;ca<ra;ca++){var Ba=Yt[ca],$a=1;Jt===1&&($a=Ba.length),Dt.writeVarint($(1,$a));for(var Za=Jt===3?Ba.length-1:Ba.length,ri=0;ri<Za;ri++){ri===1&&Jt!==1&&Dt.writeVarint($(2,Za-1));var pi=Ba[ri].x-Fr,Ra=Ba[ri].y-ta;Dt.writeVarint(le(pi)),Dt.writeVarint(le(Ra)),Fr+=pi,ta+=Ra}Jt===3&&Dt.writeVarint($(7,1))}}function de(Kt,Dt){var Yt=typeof Kt;Yt==="string"?Dt.writeStringField(1,Kt):Yt==="boolean"?Dt.writeBooleanField(7,Kt):Yt==="number"&&(Kt%1!==0?Dt.writeDoubleField(3,Kt):Kt<0?Dt.writeSVarintField(6,Kt):Dt.writeVarintField(5,Kt))}R.fromVectorTileJs=L,R.fromGeojsonVt=z,R.GeoJSONWrapper=F;function G(Kt,Dt,Yt,Jt,Fr,ta){if(!(Fr-Jt<=Yt)){var ra=Jt+Fr>>1;Y(Kt,Dt,ra,Jt,Fr,ta%2),G(Kt,Dt,Yt,Jt,ra-1,ta+1),G(Kt,Dt,Yt,ra+1,Fr,ta+1)}}function Y(Kt,Dt,Yt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Yt-Jt+1,Ba=Math.log(ra),$a=.5*Math.exp(2*Ba/3),Za=.5*Math.sqrt(Ba*$a*(ra-$a)/ra)*(ca-ra/2<0?-1:1),ri=Math.max(Jt,Math.floor(Yt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Yt+(ra-ca)*$a/ra+Za));Y(Kt,Dt,Yt,ri,pi,ta)}var Ra=Dt[2*Yt+ta],an=Jt,tn=Fr;for(ee(Kt,Dt,Jt,Yt),Dt[2*Fr+ta]>Ra&&ee(Kt,Dt,Jt,Fr);an<tn;){for(ee(Kt,Dt,an,tn),an++,tn--;Dt[2*an+ta]<Ra;)an++;for(;Dt[2*tn+ta]>Ra;)tn--}Dt[2*Jt+ta]===Ra?ee(Kt,Dt,Jt,tn):(tn++,ee(Kt,Dt,tn,Fr)),tn<=Yt&&(Jt=tn+1),Yt<=tn&&(Fr=tn-1)}}function ee(Kt,Dt,Yt,Jt){q(Kt,Yt,Jt),q(Dt,2*Yt,2*Jt),q(Dt,2*Yt+1,2*Jt+1)}function q(Kt,Dt,Yt){var Jt=Kt[Dt];Kt[Dt]=Kt[Yt],Kt[Yt]=Jt}function se(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=[0,Kt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ra=ca.pop();if(pi-Ra<=ra){for(var an=Ra;an<=pi;an++)$a=Dt[2*an],Za=Dt[2*an+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[an]);continue}var tn=Math.floor((Ra+pi)/2);$a=Dt[2*tn],Za=Dt[2*tn+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[tn]);var fn=(ri+1)%2;(ri===0?Yt<=$a:Jt<=Za)&&(ca.push(Ra),ca.push(tn-1),ca.push(fn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(fn))}return Ba}function ae(Kt,Dt,Yt,Jt,Fr,ta){for(var ra=[0,Kt.length-1,0],ca=[],Ba=Fr*Fr;ra.length;){var $a=ra.pop(),Za=ra.pop(),ri=ra.pop();if(Za-ri<=ta){for(var pi=ri;pi<=Za;pi++)j(Dt[2*pi],Dt[2*pi+1],Yt,Jt)<=Ba&&ca.push(Kt[pi]);continue}var Ra=Math.floor((ri+Za)/2),an=Dt[2*Ra],tn=Dt[2*Ra+1];j(an,tn,Yt,Jt)<=Ba&&ca.push(Kt[Ra]);var fn=($a+1)%2;($a===0?Yt-Fr<=an:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ra-1),ra.push(fn)),($a===0?Yt+Fr>=an:Jt+Fr>=tn)&&(ra.push(Ra+1),ra.push(Za),ra.push(fn))}return ca}function j(Kt,Dt,Yt,Jt){var Fr=Kt-Yt,ta=Dt-Jt;return Fr*Fr+ta*ta}var Q=function(Kt){return Kt[0]},re=function(Kt){return Kt[1]},pe=function(Dt,Yt,Jt,Fr,ta){Yt===void 0&&(Yt=Q),Jt===void 0&&(Jt=re),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Dt;for(var ra=Dt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Dt.length),Ba=this.coords=new ta(Dt.length*2),$a=0;$a<Dt.length;$a++)ca[$a]=$a,Ba[2*$a]=Yt(Dt[$a]),Ba[2*$a+1]=Jt(Dt[$a]);G(ca,Ba,Fr,0,ca.length-1,0)};pe.prototype.range=function(Dt,Yt,Jt,Fr){return se(this.ids,this.coords,Dt,Yt,Jt,Fr,this.nodeSize)},pe.prototype.within=function(Dt,Yt,Jt){return ae(this.ids,this.coords,Dt,Yt,Jt,this.nodeSize)};var we={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Kt){return Kt}},Se=function(Dt){this.options=ue(Object.create(we),Dt),this.trees=new Array(this.options.maxZoom+1)};Se.prototype.load=function(Dt){var Yt=this.options,Jt=Yt.log,Fr=Yt.minZoom,ta=Yt.maxZoom,ra=Yt.nodeSize;Jt&&console.time("total time");var ca="prepare "+Dt.length+" points";Jt&&console.time(ca),this.points=Dt;for(var Ba=[],$a=0;$a<Dt.length;$a++)Dt[$a].geometry&&Ba.push(Re(Dt[$a],$a));this.trees[ta+1]=new pe(Ba,ne,Ce,ra,Float32Array),Jt&&console.timeEnd(ca);for(var Za=ta;Za>=Fr;Za--){var ri=+Date.now();Ba=this._cluster(Ba,Za),this.trees[Za]=new pe(Ba,ne,Ce,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Se.prototype.getClusters=function(Dt,Yt){var Jt=((Dt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Dt[1])),ta=Dt[2]===180?180:((Dt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Dt[3]));if(Dt[2]-Dt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Yt),Ba=this.getClusters([-180,Fr,ta,ra],Yt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Yt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ra=Za;pi<Ra.length;pi+=1){var an=Ra[pi],tn=$a.points[an];ri.push(tn.numPoints?We(tn):this.points[tn.index])}return ri},Se.prototype.getChildren=function(Dt){var Yt=this._getOriginId(Dt),Jt=this._getOriginZoom(Dt),Fr="No cluster with the specified id.",ta=this.trees[Jt];if(!ta)throw new Error(Fr);var ra=ta.points[Yt];if(!ra)throw new Error(Fr);for(var ca=this.options.radius/(this.options.extent*Math.pow(2,Jt-1)),Ba=ta.within(ra.x,ra.y,ca),$a=[],Za=0,ri=Ba;Za<ri.length;Za+=1){var pi=ri[Za],Ra=ta.points[pi];Ra.parentId===Dt&&$a.push(Ra.numPoints?We(Ra):this.points[Ra.index])}if($a.length===0)throw new Error(Fr);return $a},Se.prototype.getLeaves=function(Dt,Yt,Jt){Yt=Yt||10,Jt=Jt||0;var Fr=[];return this._appendLeaves(Fr,Dt,Yt,Jt,0),Fr},Se.prototype.getTile=function(Dt,Yt,Jt){var Fr=this.trees[this._limitZoom(Dt)],ta=Math.pow(2,Dt),ra=this.options,ca=ra.extent,Ba=ra.radius,$a=Ba/ca,Za=(Jt-$a)/ta,ri=(Jt+1+$a)/ta,pi={features:[]};return this._addTileFeatures(Fr.range((Yt-$a)/ta,Za,(Yt+1+$a)/ta,ri),Fr.points,Yt,Jt,ta,pi),Yt===0&&this._addTileFeatures(Fr.range(1-$a/ta,Za,1,ri),Fr.points,ta,Jt,ta,pi),Yt===ta-1&&this._addTileFeatures(Fr.range(0,Za,$a/ta,ri),Fr.points,-1,Jt,ta,pi),pi.features.length?pi:null},Se.prototype.getClusterExpansionZoom=function(Dt){for(var Yt=this._getOriginZoom(Dt)-1;Yt<=this.options.maxZoom;){var Jt=this.getChildren(Dt);if(Yt++,Jt.length!==1)break;Dt=Jt[0].properties.cluster_id}return Yt},Se.prototype._appendLeaves=function(Dt,Yt,Jt,Fr,ta){for(var ra=this.getChildren(Yt),ca=0,Ba=ra;ca<Ba.length;ca+=1){var $a=Ba[ca],Za=$a.properties;if(Za&&Za.cluster?ta+Za.point_count<=Fr?ta+=Za.point_count:ta=this._appendLeaves(Dt,Za.cluster_id,Jt,Fr,ta):ta<Fr?ta++:Dt.push($a),Dt.length===Jt)break}return ta},Se.prototype._addTileFeatures=function(Dt,Yt,Jt,Fr,ta,ra){for(var ca=0,Ba=Dt;ca<Ba.length;ca+=1){var $a=Ba[ca],Za=Yt[$a],ri=Za.numPoints,pi={type:1,geometry:[[Math.round(this.options.extent*(Za.x*ta-Jt)),Math.round(this.options.extent*(Za.y*ta-Fr))]],tags:ri?at(Za):this.points[Za.index].properties},Ra=void 0;ri?Ra=Za.id:this.options.generateId?Ra=Za.index:this.points[Za.index].id&&(Ra=this.points[Za.index].id),Ra!==void 0&&(pi.id=Ra),ra.features.push(pi)}},Se.prototype._limitZoom=function(Dt){return Math.max(this.options.minZoom,Math.min(+Dt,this.options.maxZoom+1))},Se.prototype._cluster=function(Dt,Yt){for(var Jt=[],Fr=this.options,ta=Fr.radius,ra=Fr.extent,ca=Fr.reduce,Ba=Fr.minPoints,$a=ta/(ra*Math.pow(2,Yt)),Za=0;Za<Dt.length;Za++){var ri=Dt[Za];if(!(ri.zoom<=Yt)){ri.zoom=Yt;for(var pi=this.trees[Yt+1],Ra=pi.within(ri.x,ri.y,$a),an=ri.numPoints||1,tn=an,fn=0,xt=Ra;fn<xt.length;fn+=1){var lt=xt[fn],Br=pi.points[lt];Br.zoom>Yt&&(tn+=Br.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*an,xr=ri.y*an,Rr=ca&&an>1?this._map(ri,!0):null,Ur=(Za<<5)+(Yt+1)+this.points.length,Hr=0,gt=Ra;Hr<gt.length;Hr+=1){var Xt=gt[Hr],vr=pi.points[Xt];if(!(vr.zoom<=Yt)){vr.zoom=Yt;var Or=vr.numPoints||1;Cr+=vr.x*Or,xr+=vr.y*Or,vr.parentId=Ur,ca&&(Rr||(Rr=this._map(ri,!0)),ca(Rr,this._map(vr)))}}ri.parentId=Ur,Jt.push(Ie(Cr/tn,xr/tn,Ur,tn,Rr))}else if(Jt.push(ri),tn>1)for(var ba=0,Pa=Ra;ba<Pa.length;ba+=1){var ma=Pa[ba],la=pi.points[ma];la.zoom<=Yt||(la.zoom=Yt,Jt.push(la))}}}return Jt},Se.prototype._getOriginId=function(Dt){return Dt-this.points.length>>5},Se.prototype._getOriginZoom=function(Dt){return(Dt-this.points.length)%32},Se.prototype._map=function(Dt,Yt){if(Dt.numPoints)return Yt?ue({},Dt.properties):Dt.properties;var Jt=this.points[Dt.index].properties,Fr=this.options.map(Jt);return Yt&&Fr===Jt?ue({},Fr):Fr};function Ie(Kt,Dt,Yt,Jt,Fr){return{x:Kt,y:Dt,zoom:1/0,id:Yt,parentId:-1,numPoints:Jt,properties:Fr}}function Re(Kt,Dt){var Yt=Kt.geometry.coordinates,Jt=Yt[0],Fr=Yt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Dt,parentId:-1}}function We(Kt){return{type:"Feature",id:Kt.id,properties:at(Kt),geometry:{type:"Point",coordinates:[qe(Kt.x),he(Kt.y)]}}}function at(Kt){var Dt=Kt.numPoints,Yt=Dt>=1e4?Math.round(Dt/1e3)+"k":Dt>=1e3?Math.round(Dt/100)/10+"k":Dt;return ue(ue({},Kt.properties),{cluster:!0,cluster_id:Kt.id,point_count:Dt,point_count_abbreviated:Yt})}function nt(Kt){return Kt/360+.5}function tt(Kt){var Dt=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Dt)/(1-Dt))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function qe(Kt){return(Kt-.5)*360}function he(Kt){var Dt=(180-Kt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Dt))/Math.PI-90}function ue(Kt,Dt){for(var Yt in Dt)Kt[Yt]=Dt[Yt];return Kt}function ne(Kt){return Kt.x}function Ce(Kt){return Kt.y}function Ye(Kt,Dt,Yt,Jt){for(var Fr=Jt,ta=Yt-Dt>>1,ra=Yt-Dt,ca,Ba=Kt[Dt],$a=Kt[Dt+1],Za=Kt[Yt],ri=Kt[Yt+1],pi=Dt+3;pi<Yt;pi+=3){var Ra=rt(Kt[pi],Kt[pi+1],Ba,$a,Za,ri);if(Ra>Fr)ca=pi,Fr=Ra;else if(Ra===Fr){var an=Math.abs(pi-ta);an<ra&&(ca=pi,ra=an)}}Fr>Jt&&(ca-Dt>3&&Ye(Kt,Dt,ca,Jt),Kt[ca+2]=Fr,Yt-ca>3&&Ye(Kt,ca,Yt,Jt))}function rt(Kt,Dt,Yt,Jt,Fr,ta){var ra=Fr-Yt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Kt-Yt)*ra+(Dt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Yt=Fr,Jt=ta):Ba>0&&(Yt+=ra*Ba,Jt+=ca*Ba)}return ra=Kt-Yt,ca=Dt-Jt,ra*ra+ca*ca}function Ke(Kt,Dt,Yt,Jt){var Fr={id:typeof Kt>"u"?null:Kt,type:Dt,geometry:Yt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Mt(Fr),Fr}function Mt(Kt){var Dt=Kt.geometry,Yt=Kt.type;if(Yt==="Point"||Yt==="MultiPoint"||Yt==="LineString")kt(Kt,Dt);else if(Yt==="Polygon"||Yt==="MultiLineString")for(var Jt=0;Jt<Dt.length;Jt++)kt(Kt,Dt[Jt]);else if(Yt==="MultiPolygon")for(Jt=0;Jt<Dt.length;Jt++)for(var Fr=0;Fr<Dt[Jt].length;Fr++)kt(Kt,Dt[Jt][Fr])}function kt(Kt,Dt){for(var Yt=0;Yt<Dt.length;Yt+=3)Kt.minX=Math.min(Kt.minX,Dt[Yt]),Kt.minY=Math.min(Kt.minY,Dt[Yt+1]),Kt.maxX=Math.max(Kt.maxX,Dt[Yt]),Kt.maxY=Math.max(Kt.maxY,Dt[Yt+1])}function Nt(Kt,Dt){var Yt=[];if(Kt.type==="FeatureCollection")for(var Jt=0;Jt<Kt.features.length;Jt++)Gt(Yt,Kt.features[Jt],Dt,Jt);else Kt.type==="Feature"?Gt(Yt,Kt,Dt):Gt(Yt,{geometry:Kt},Dt);return Yt}function Gt(Kt,Dt,Yt,Jt){if(Dt.geometry){var Fr=Dt.geometry.coordinates,ta=Dt.geometry.type,ra=Math.pow(Yt.tolerance/((1<<Yt.maxZoom)*Yt.extent),2),ca=[],Ba=Dt.id;if(Yt.promoteId?Ba=Dt.properties[Yt.promoteId]:Yt.generateId&&(Ba=Jt||0),ta==="Point")Mr(Fr,ca);else if(ta==="MultiPoint")for(var $a=0;$a<Fr.length;$a++)Mr(Fr[$a],ca);else if(ta==="LineString")mr(Fr,ca,ra,!1);else if(ta==="MultiLineString")if(Yt.lineMetrics){for($a=0;$a<Fr.length;$a++)ca=[],mr(Fr[$a],ca,ra,!1),Kt.push(Ke(Ba,"LineString",ca,Dt.properties));return}else qr(Fr,ca,ra,!1);else if(ta==="Polygon")qr(Fr,ca,ra,!0);else if(ta==="MultiPolygon")for($a=0;$a<Fr.length;$a++){var Za=[];qr(Fr[$a],Za,ra,!0),ca.push(Za)}else if(ta==="GeometryCollection"){for($a=0;$a<Dt.geometry.geometries.length;$a++)Gt(Kt,{id:Ba,geometry:Dt.geometry.geometries[$a],properties:Dt.properties},Yt,Jt);return}else throw new Error("Input data is not a valid GeoJSON object.");Kt.push(Ke(Ba,ta,ca,Dt.properties))}}function Mr(Kt,Dt){Dt.push(Er(Kt[0])),Dt.push(Ir(Kt[1])),Dt.push(0)}function mr(Kt,Dt,Yt,Jt){for(var Fr,ta,ra=0,ca=0;ca<Kt.length;ca++){var Ba=Er(Kt[ca][0]),$a=Ir(Kt[ca][1]);Dt.push(Ba),Dt.push($a),Dt.push(0),ca>0&&(Jt?ra+=(Fr*$a-Ba*ta)/2:ra+=Math.sqrt(Math.pow(Ba-Fr,2)+Math.pow($a-ta,2))),Fr=Ba,ta=$a}var Za=Dt.length-3;Dt[2]=1,Ye(Dt,0,Za,Yt),Dt[Za+2]=1,Dt.size=Math.abs(ra),Dt.start=0,Dt.end=Dt.size}function qr(Kt,Dt,Yt,Jt){for(var Fr=0;Fr<Kt.length;Fr++){var ta=[];mr(Kt[Fr],ta,Yt,Jt),Dt.push(ta)}}function Er(Kt){return Kt/360+.5}function Ir(Kt){var Dt=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Dt)/(1-Dt))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function _t(Kt,Dt,Yt,Jt,Fr,ta,ra,ca){if(Yt/=Dt,Jt/=Dt,ta>=Yt&&ra<Jt)return Kt;if(ra<Yt||ta>=Jt)return null;for(var Ba=[],$a=0;$a<Kt.length;$a++){var Za=Kt[$a],ri=Za.geometry,pi=Za.type,Ra=Fr===0?Za.minX:Za.minY,an=Fr===0?Za.maxX:Za.maxY;if(Ra>=Yt&&an<Jt){Ba.push(Za);continue}else if(an<Yt||Ra>=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Oe(ri,tn,Yt,Jt,Fr);else if(pi==="LineString")Je(ri,tn,Yt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Yt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Yt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var fn=0;fn<ri.length;fn++){var xt=[];Le(ri[fn],xt,Yt,Jt,Fr,!0),xt.length&&tn.push(xt)}if(tn.length){if(ca.lineMetrics&&pi==="LineString"){for(fn=0;fn<tn.length;fn++)Ba.push(Ke(Za.id,pi,tn[fn],Za.tags));continue}(pi==="LineString"||pi==="MultiLineString")&&(tn.length===1?(pi="LineString",tn=tn[0]):pi="MultiLineString"),(pi==="Point"||pi==="MultiPoint")&&(pi=tn.length===3?"Point":"MultiPoint"),Ba.push(Ke(Za.id,pi,tn,Za.tags))}}return Ba.length?Ba:null}function Oe(Kt,Dt,Yt,Jt,Fr){for(var ta=0;ta<Kt.length;ta+=3){var ra=Kt[ta+Fr];ra>=Yt&&ra<=Jt&&(Dt.push(Kt[ta]),Dt.push(Kt[ta+1]),Dt.push(Kt[ta+2]))}}function Je(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=Ae(Kt),Ba=Fr===0?Ze:st,$a=Kt.start,Za,ri,pi=0;pi<Kt.length-3;pi+=3){var Ra=Kt[pi],an=Kt[pi+1],tn=Kt[pi+2],fn=Kt[pi+3],xt=Kt[pi+4],lt=Fr===0?Ra:an,Br=Fr===0?fn:xt,Cr=!1;ra&&(Za=Math.sqrt(Math.pow(Ra-fn,2)+Math.pow(an-xt,2))),lt<Yt?Br>Yt&&(ri=Ba(ca,Ra,an,fn,xt,Yt),ra&&(ca.start=$a+Za*ri)):lt>Jt?Br<Jt&&(ri=Ba(ca,Ra,an,fn,xt,Jt),ra&&(ca.start=$a+Za*ri)):Ue(ca,Ra,an,tn),Br<Yt&&lt>=Yt&&(ri=Ba(ca,Ra,an,fn,xt,Yt),Cr=!0),Br>Jt&&lt<=Jt&&(ri=Ba(ca,Ra,an,fn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Dt.push(ca),ca=Ae(Kt)),ra&&($a+=Za)}var xr=Kt.length-3;Ra=Kt[xr],an=Kt[xr+1],tn=Kt[xr+2],lt=Fr===0?Ra:an,lt>=Yt&&lt<=Jt&&Ue(ca,Ra,an,tn),xr=ca.length-3,ta&&xr>=3&&(ca[xr]!==ca[0]||ca[xr+1]!==ca[1])&&Ue(ca,ca[0],ca[1],ca[2]),ca.length&&Dt.push(ca)}function Ae(Kt){var Dt=[];return Dt.size=Kt.size,Dt.start=Kt.start,Dt.end=Kt.end,Dt}function Le(Kt,Dt,Yt,Jt,Fr,ta){for(var ra=0;ra<Kt.length;ra++)Je(Kt[ra],Dt,Yt,Jt,Fr,ta,!1)}function Ue(Kt,Dt,Yt,Jt){Kt.push(Dt),Kt.push(Yt),Kt.push(Jt)}function Ze(Kt,Dt,Yt,Jt,Fr,ta){var ra=(ta-Dt)/(Jt-Dt);return Kt.push(ta),Kt.push(Yt+(Fr-Yt)*ra),Kt.push(1),ra}function st(Kt,Dt,Yt,Jt,Fr,ta){var ra=(ta-Yt)/(Fr-Yt);return Kt.push(Dt+(Jt-Dt)*ra),Kt.push(ta),Kt.push(1),ra}function ut(Kt,Dt){var Yt=Dt.buffer/Dt.extent,Jt=Kt,Fr=_t(Kt,1,-1-Yt,Yt,0,-1,2,Dt),ta=_t(Kt,1,1-Yt,2+Yt,0,-1,2,Dt);return(Fr||ta)&&(Jt=_t(Kt,1,-Yt,1+Yt,0,-1,2,Dt)||[],Fr&&(Jt=Ut(Fr,1).concat(Jt)),ta&&(Jt=Jt.concat(Ut(ta,-1)))),Jt}function Ut(Kt,Dt){for(var Yt=[],Jt=0;Jt<Kt.length;Jt++){var Fr=Kt[Jt],ta=Fr.type,ra;if(ta==="Point"||ta==="MultiPoint"||ta==="LineString")ra=Ct(Fr.geometry,Dt);else if(ta==="MultiLineString"||ta==="Polygon"){ra=[];for(var ca=0;ca<Fr.geometry.length;ca++)ra.push(Ct(Fr.geometry[ca],Dt))}else if(ta==="MultiPolygon")for(ra=[],ca=0;ca<Fr.geometry.length;ca++){for(var Ba=[],$a=0;$a<Fr.geometry[ca].length;$a++)Ba.push(Ct(Fr.geometry[ca][$a],Dt));ra.push(Ba)}Yt.push(Ke(Fr.id,ta,ra,Fr.tags))}return Yt}function Ct(Kt,Dt){var Yt=[];Yt.size=Kt.size,Kt.start!==void 0&&(Yt.start=Kt.start,Yt.end=Kt.end);for(var Jt=0;Jt<Kt.length;Jt+=3)Yt.push(Kt[Jt]+Dt,Kt[Jt+1],Kt[Jt+2]);return Yt}function Pt(Kt,Dt){if(Kt.transformed)return Kt;var Yt=1<<Kt.z,Jt=Kt.x,Fr=Kt.y,ta,ra,ca;for(ta=0;ta<Kt.features.length;ta++){var Ba=Kt.features[ta],$a=Ba.geometry,Za=Ba.type;if(Ba.geometry=[],Za===1)for(ra=0;ra<$a.length;ra+=2)Ba.geometry.push(jt($a[ra],$a[ra+1],Dt,Yt,Jt,Fr));else for(ra=0;ra<$a.length;ra++){var ri=[];for(ca=0;ca<$a[ra].length;ca+=2)ri.push(jt($a[ra][ca],$a[ra][ca+1],Dt,Yt,Jt,Fr));Ba.geometry.push(ri)}}return Kt.transformed=!0,Kt}function jt(Kt,Dt,Yt,Jt,Fr,ta){return[Math.round(Yt*(Kt*Jt-Fr)),Math.round(Yt*(Dt*Jt-ta))]}function fr(Kt,Dt,Yt,Jt,Fr){for(var ta=Dt===Fr.maxZoom?0:Fr.tolerance/((1<<Dt)*Fr.extent),ra={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Yt,y:Jt,z:Dt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},ca=0;ca<Kt.length;ca++){ra.numFeatures++,ur(ra,Kt[ca],ta,Fr);var Ba=Kt[ca].minX,$a=Kt[ca].minY,Za=Kt[ca].maxX,ri=Kt[ca].maxY;Ba<ra.minX&&(ra.minX=Ba),$a<ra.minY&&(ra.minY=$a),Za>ra.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function ur(Kt,Dt,Yt,Jt){var Fr=Dt.geometry,ta=Dt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca<Fr.length;ca+=3)ra.push(Fr[ca]),ra.push(Fr[ca+1]),Kt.numPoints++,Kt.numSimplified++;else if(ta==="LineString")sr(ra,Fr,Kt,Yt,!1,!1);else if(ta==="MultiLineString"||ta==="Polygon")for(ca=0;ca<Fr.length;ca++)sr(ra,Fr[ca],Kt,Yt,ta==="Polygon",ca===0);else if(ta==="MultiPolygon")for(var Ba=0;Ba<Fr.length;Ba++){var $a=Fr[Ba];for(ca=0;ca<$a.length;ca++)sr(ra,$a[ca],Kt,Yt,!0,ca===0)}if(ra.length){var Za=Dt.tags||null;if(ta==="LineString"&&Jt.lineMetrics){Za={};for(var ri in Dt.tags)Za[ri]=Dt.tags[ri];Za.mapbox_clip_start=Fr.start/Fr.size,Za.mapbox_clip_end=Fr.end/Fr.size}var pi={geometry:ra,type:ta==="Polygon"||ta==="MultiPolygon"?3:ta==="LineString"||ta==="MultiLineString"?2:1,tags:Za};Dt.id!==null&&(pi.id=Dt.id),Kt.features.push(pi)}}function sr(Kt,Dt,Yt,Jt,Fr,ta){var ra=Jt*Jt;if(Jt>0&&Dt.size<(Fr?ra:Jt)){Yt.numPoints+=Dt.length/3;return}for(var ca=[],Ba=0;Ba<Dt.length;Ba+=3)(Jt===0||Dt[Ba+2]>ra)&&(Yt.numSimplified++,ca.push(Dt[Ba]),ca.push(Dt[Ba+1])),Yt.numPoints++;Fr&&Pr(ca,ta),Kt.push(ca)}function Pr(Kt,Dt){for(var Yt=0,Jt=0,Fr=Kt.length,ta=Fr-2;Jt<Fr;ta=Jt,Jt+=2)Yt+=(Kt[Jt]-Kt[ta])*(Kt[Jt+1]+Kt[ta+1]);if(Yt>0===Dt)for(Jt=0,Fr=Kt.length;Jt<Fr/2;Jt+=2){var ra=Kt[Jt],ca=Kt[Jt+1];Kt[Jt]=Kt[Fr-2-Jt],Kt[Jt+1]=Kt[Fr-1-Jt],Kt[Fr-2-Jt]=ra,Kt[Fr-1-Jt]=ca}}function Ta(Kt,Dt){return new Oa(Kt,Dt)}function Oa(Kt,Dt){Dt=this.options=qa(Object.create(this.options),Dt);var Yt=Dt.debug;if(Yt&&console.time("preprocess data"),Dt.maxZoom<0||Dt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Dt.promoteId&&Dt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Nt(Kt,Dt);this.tiles={},this.tileCoords=[],Yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Dt.indexMaxZoom,Dt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ut(Jt,Dt),Jt.length&&this.splitTile(Jt,0,0,0),Yt&&(Jt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Oa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Oa.prototype.splitTile=function(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=[Kt,Dt,Yt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Yt=ca.pop(),Dt=ca.pop(),Kt=ca.pop();var Za=1<<Dt,ri=Ia(Dt,Yt,Jt),pi=this.tiles[ri];if(!pi&&($a>1&&console.time("creation"),pi=this.tiles[ri]=fr(Kt,Dt,Yt,Jt,Ba),this.tileCoords.push({z:Dt,x:Yt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Dt,Yt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ra="z"+Dt;this.stats[Ra]=(this.stats[Ra]||0)+1,this.total++}if(pi.source=Kt,Fr){if(Dt===Ba.maxZoom||Dt===Fr)continue;var an=1<<Fr-Dt;if(Yt!==Math.floor(ta/an)||Jt!==Math.floor(ra/an))continue}else if(Dt===Ba.indexMaxZoom||pi.numPoints<=Ba.indexMaxPoints)continue;if(pi.source=null,Kt.length!==0){$a>1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,fn=.5-tn,xt=.5+tn,lt=1+tn,Br,Cr,xr,Rr,Ur,Hr;Br=Cr=xr=Rr=null,Ur=_t(Kt,Za,Yt-tn,Yt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Kt,Za,Yt+fn,Yt+lt,0,pi.minX,pi.maxX,Ba),Kt=null,Ur&&(Br=_t(Ur,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Ur,Za,Jt+fn,Jt+lt,1,pi.minY,pi.maxY,Ba),Ur=null),Hr&&(xr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+fn,Jt+lt,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Br||[],Dt+1,Yt*2,Jt*2),ca.push(Cr||[],Dt+1,Yt*2,Jt*2+1),ca.push(xr||[],Dt+1,Yt*2+1,Jt*2),ca.push(Rr||[],Dt+1,Yt*2+1,Jt*2+1)}}},Oa.prototype.getTile=function(Kt,Dt,Yt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Kt<0||Kt>24)return null;var ra=1<<Kt;Dt=(Dt%ra+ra)%ra;var ca=Ia(Kt,Dt,Yt);if(this.tiles[ca])return Pt(this.tiles[ca],Fr);ta>1&&console.log("drilling down to z%d-%d-%d",Kt,Dt,Yt);for(var Ba=Kt,$a=Dt,Za=Yt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ia(Ba,$a,Za)];return!ri||!ri.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ba,$a,Za),ta>1&&console.time("drilling down"),this.splitTile(ri.source,Ba,$a,Za,Kt,Dt,Yt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ia(Kt,Dt,Yt){return((1<<Kt)*Yt+Dt)*32+Kt}function qa(Kt,Dt){for(var Yt in Dt)Kt[Yt]=Dt[Yt];return Kt}function Wa(Kt,Dt){var Yt=Kt.tileID.canonical;if(!this._geoJSONIndex)return Dt(null,null);var Jt=this._geoJSONIndex.getTile(Yt.z,Yt.x,Yt.y);if(!Jt)return Dt(null,null);var Fr=new b(Jt.features),ta=R(Fr);(ta.byteOffset!==0||ta.byteLength!==ta.buffer.byteLength)&&(ta=new Uint8Array(ta)),Dt(null,{vectorTile:Fr,rawData:ta.buffer})}var Ca=function(Kt){function Dt(Yt,Jt,Fr,ta){Kt.call(this,Yt,Jt,Fr,Wa),ta&&(this.loadGeoJSON=ta)}return Kt&&(Dt.__proto__=Kt),Dt.prototype=Object.create(Kt&&Kt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.loadData=function(Jt,Fr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Fr,this._pendingLoadDataParams=Jt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Dt.prototype._loadData=function(){var Jt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Fr=this._pendingCallback,ta=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ra=ta&&ta.request&&ta.request.collectResourceTiming?new e.RequestPerformance(ta.request):!1;this.loadGeoJSON(ta,function(ca,Ba){if(ca||!Ba)return Fr(ca);if(typeof Ba!="object")return Fr(new Error("Input data given to '"+ta.source+"' is not a valid GeoJSON object."));l(Ba,!0);try{if(ta.filter){var $a=e.createExpression(ta.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if($a.result==="error")throw new Error($a.value.map(function(Ra){return Ra.key+": "+Ra.message}).join(", "));var Za=Ba.features.filter(function(Ra){return $a.value.evaluate({zoom:0},Ra)});Ba={type:"FeatureCollection",features:Za}}Jt._geoJSONIndex=ta.cluster?new Se(hi(ta)).load(Ba.features):Ta(Ba,ta.geojsonVtOptions)}catch(Ra){return Fr(Ra)}Jt.loaded={};var ri={};if(ra){var pi=ra.finish();pi&&(ri.resourceTiming={},ri.resourceTiming[ta.source]=JSON.parse(JSON.stringify(pi)))}Fr(null,ri)})}},Dt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Dt.prototype.reloadTile=function(Jt,Fr){var ta=this.loaded,ra=Jt.uid;return ta&&ta[ra]?Kt.prototype.reloadTile.call(this,Jt,Fr):this.loadTile(Jt,Fr)},Dt.prototype.loadGeoJSON=function(Jt,Fr){if(Jt.request)e.getJSON(Jt.request,Fr);else if(typeof Jt.data=="string")try{return Fr(null,JSON.parse(Jt.data))}catch{return Fr(new Error("Input data given to '"+Jt.source+"' is not a valid GeoJSON object."))}else return Fr(new Error("Input data given to '"+Jt.source+"' is not a valid GeoJSON object."))},Dt.prototype.removeSource=function(Jt,Fr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Fr()},Dt.prototype.getClusterExpansionZoom=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getClusterExpansionZoom(Jt.clusterId))}catch(ta){Fr(ta)}},Dt.prototype.getClusterChildren=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getChildren(Jt.clusterId))}catch(ta){Fr(ta)}},Dt.prototype.getClusterLeaves=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getLeaves(Jt.clusterId,Jt.limit,Jt.offset))}catch(ta){Fr(ta)}},Dt}(v);function hi(Kt){var Dt=Kt.superclusterOptions,Yt=Kt.clusterProperties;if(!Yt||!Dt)return Dt;for(var Jt={},Fr={},ta={accumulated:null,zoom:0},ra={properties:null},ca=Object.keys(Yt),Ba=0,$a=ca;Ba<$a.length;Ba+=1){var Za=$a[Ba],ri=Yt[Za],pi=ri[0],Ra=ri[1],an=e.createExpression(Ra),tn=e.createExpression(typeof pi=="string"?[pi,["accumulated"],["get",Za]]:pi);Jt[Za]=an.value,Fr[Za]=tn.value}return Dt.map=function(fn){ra.properties=fn;for(var xt={},lt=0,Br=ca;lt<Br.length;lt+=1){var Cr=Br[lt];xt[Cr]=Jt[Cr].evaluate(ta,ra)}return xt},Dt.reduce=function(fn,xt){ra.properties=xt;for(var lt=0,Br=ca;lt<Br.length;lt+=1){var Cr=Br[lt];ta.accumulated=fn[Cr],fn[Cr]=Fr[Cr].evaluate(ta,ra)}},Dt}var wi=function(Dt){var Yt=this;this.self=Dt,this.actor=new e.Actor(Dt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:v,geojson:Ca},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Jt,Fr){if(Yt.workerSourceTypes[Jt])throw new Error('Worker source with name "'+Jt+'" already registered.');Yt.workerSourceTypes[Jt]=Fr},this.self.registerRTLTextPlugin=function(Jt){if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=Jt.applyArabicShaping,e.plugin.processBidirectionalText=Jt.processBidirectionalText,e.plugin.processStyledBidirectionalText=Jt.processStyledBidirectionalText}};return wi.prototype.setReferrer=function(Dt,Yt){this.referrer=Yt},wi.prototype.setImages=function(Dt,Yt,Jt){this.availableImages[Dt]=Yt;for(var Fr in this.workerSources[Dt]){var ta=this.workerSources[Dt][Fr];for(var ra in ta)ta[ra].availableImages=Yt}Jt()},wi.prototype.setLayers=function(Dt,Yt,Jt){this.getLayerIndex(Dt).replace(Yt),Jt()},wi.prototype.updateLayers=function(Dt,Yt,Jt){this.getLayerIndex(Dt).update(Yt.layers,Yt.removedIds),Jt()},wi.prototype.loadTile=function(Dt,Yt,Jt){this.getWorkerSource(Dt,Yt.type,Yt.source).loadTile(Yt,Jt)},wi.prototype.loadDEMTile=function(Dt,Yt,Jt){this.getDEMWorkerSource(Dt,Yt.source).loadTile(Yt,Jt)},wi.prototype.reloadTile=function(Dt,Yt,Jt){this.getWorkerSource(Dt,Yt.type,Yt.source).reloadTile(Yt,Jt)},wi.prototype.abortTile=function(Dt,Yt,Jt){this.getWorkerSource(Dt,Yt.type,Yt.source).abortTile(Yt,Jt)},wi.prototype.removeTile=function(Dt,Yt,Jt){this.getWorkerSource(Dt,Yt.type,Yt.source).removeTile(Yt,Jt)},wi.prototype.removeDEMTile=function(Dt,Yt){this.getDEMWorkerSource(Dt,Yt.source).removeTile(Yt)},wi.prototype.removeSource=function(Dt,Yt,Jt){if(!(!this.workerSources[Dt]||!this.workerSources[Dt][Yt.type]||!this.workerSources[Dt][Yt.type][Yt.source])){var Fr=this.workerSources[Dt][Yt.type][Yt.source];delete this.workerSources[Dt][Yt.type][Yt.source],Fr.removeSource!==void 0?Fr.removeSource(Yt,Jt):Jt()}},wi.prototype.loadWorkerSource=function(Dt,Yt,Jt){try{this.self.importScripts(Yt.url),Jt()}catch(Fr){Jt(Fr.toString())}},wi.prototype.syncRTLPluginState=function(Dt,Yt,Jt){try{e.plugin.setState(Yt);var Fr=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&Fr!=null){this.self.importScripts(Fr);var ta=e.plugin.isParsed(),ra=ta?void 0:new Error("RTL Text Plugin failed to import scripts from "+Fr);Jt(ra,ta)}}catch(ca){Jt(ca.toString())}},wi.prototype.getAvailableImages=function(Dt){var Yt=this.availableImages[Dt];return Yt||(Yt=[]),Yt},wi.prototype.getLayerIndex=function(Dt){var Yt=this.layerIndexes[Dt];return Yt||(Yt=this.layerIndexes[Dt]=new a),Yt},wi.prototype.getWorkerSource=function(Dt,Yt,Jt){var Fr=this;if(this.workerSources[Dt]||(this.workerSources[Dt]={}),this.workerSources[Dt][Yt]||(this.workerSources[Dt][Yt]={}),!this.workerSources[Dt][Yt][Jt]){var ta={send:function(ra,ca,Ba){Fr.actor.send(ra,ca,Ba,Dt)}};this.workerSources[Dt][Yt][Jt]=new this.workerSourceTypes[Yt](ta,this.getLayerIndex(Dt),this.getAvailableImages(Dt))}return this.workerSources[Dt][Yt][Jt]},wi.prototype.getDEMWorkerSource=function(Dt,Yt){return this.demWorkerSources[Dt]||(this.demWorkerSources[Dt]={}),this.demWorkerSources[Dt][Yt]||(this.demWorkerSources[Dt][Yt]=new T),this.demWorkerSources[Dt][Yt]},wi.prototype.enforceCacheSizeLimit=function(Dt,Yt){e.enforceCacheSizeLimit(Yt)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new wi(self)),wi}),E(["./shared"],function(e){"use strict";var t=e.createCommonjsModule(function(ge){ge.exports?ge.exports=K:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=K,window.mapboxgl.notSupportedReason=xe);function K(rr){return!xe(rr)}function xe(rr){if(!te())return"not a browser";if(!ye())return"insufficent Array support";if(!je())return"insufficient Function support";if(!ke())return"insufficient Object support";if(!Qe())return"insufficient JSON support";if(!vt())return"insufficient worker support";if(!qt())return"insufficient Uint8ClampedArray support";if(!wr())return"insufficient ArrayBuffer support";if(!Nr())return"insufficient Canvas/getImageData support";if(!mt(rr&&rr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function te(){return typeof window<"u"&&typeof document<"u"}function ye(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function je(){return Function.prototype&&Function.prototype.bind}function ke(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function Qe(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function vt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var rr=new Blob([""],{type:"text/javascript"}),hr=URL.createObjectURL(rr),nr,dr;try{dr=new Worker(hr),nr=!0}catch{nr=!1}return dr&&dr.terminate(),URL.revokeObjectURL(hr),nr}function qt(){return"Uint8ClampedArray"in window}function wr(){return ArrayBuffer.isView}function Nr(){var rr=document.createElement("canvas");rr.width=rr.height=1;var hr=rr.getContext("2d");if(!hr)return!1;var nr=hr.getImageData(0,0,1,1);return nr&&nr.width===rr.width}var pr={};function mt(rr){return pr[rr]===void 0&&(pr[rr]=Ft(rr)),pr[rr]}K.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function St(rr){var hr=document.createElement("canvas"),nr=Object.create(K.webGLContextAttributes);return nr.failIfMajorPerformanceCaveat=rr,hr.probablySupportsContext?hr.probablySupportsContext("webgl",nr)||hr.probablySupportsContext("experimental-webgl",nr):hr.supportsContext?hr.supportsContext("webgl",nr)||hr.supportsContext("experimental-webgl",nr):hr.getContext("webgl",nr)||hr.getContext("experimental-webgl",nr)}function Ft(rr){var hr=St(rr);if(!hr)return!1;var nr=hr.createShader(hr.VERTEX_SHADER);return!nr||hr.isContextLost()?!1:(hr.shaderSource(nr,"void main() {}"),hr.compileShader(nr),hr.getShaderParameter(nr,hr.COMPILE_STATUS)===!0)}}),r={};r.create=function(ge,K,xe){var te=e.window.document.createElement(ge);return K!==void 0&&(te.className=K),xe&&xe.appendChild(te),te},r.createNS=function(ge,K){var xe=e.window.document.createElementNS(ge,K);return xe};var o=e.window.document&&e.window.document.documentElement.style;function a(ge){if(!o)return ge[0];for(var K=0;K<ge.length;K++)if(ge[K]in o)return ge[K];return ge[0]}var n=a(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),i;r.disableDrag=function(){o&&n&&(i=o[n],o[n]="none")},r.enableDrag=function(){o&&n&&(o[n]=i)};var s=a(["transform","WebkitTransform"]);r.setTransform=function(ge,K){ge.style[s]=K};var h=!1;try{var f=Object.defineProperty({},"passive",{get:function(){h=!0}});e.window.addEventListener("test",f,f),e.window.removeEventListener("test",f,f)}catch{h=!1}r.addEventListener=function(ge,K,xe,te){te===void 0&&(te={}),"passive"in te&&h?ge.addEventListener(K,xe,te):ge.addEventListener(K,xe,te.capture)},r.removeEventListener=function(ge,K,xe,te){te===void 0&&(te={}),"passive"in te&&h?ge.removeEventListener(K,xe,te):ge.removeEventListener(K,xe,te.capture)};var v=function(ge){ge.preventDefault(),ge.stopPropagation(),e.window.removeEventListener("click",v,!0)};r.suppressClick=function(){e.window.addEventListener("click",v,!0),e.window.setTimeout(function(){e.window.removeEventListener("click",v,!0)},0)},r.mousePos=function(ge,K){var xe=ge.getBoundingClientRect();return new e.Point(K.clientX-xe.left-ge.clientLeft,K.clientY-xe.top-ge.clientTop)},r.touchPos=function(ge,K){for(var xe=ge.getBoundingClientRect(),te=[],ye=0;ye<K.length;ye++)te.push(new e.Point(K[ye].clientX-xe.left-ge.clientLeft,K[ye].clientY-xe.top-ge.clientTop));return te},r.mouseButton=function(ge){return typeof e.window.InstallTrigger<"u"&&ge.button===2&&ge.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var te,ye,je,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(wr,Nr){Qe=null,je||(je=wr,te=Nr,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(wr,Nr){vt=null,je||(je=wr,ye=Nr,qt())});function qt(){if(je)xe(je);else if(te&&ye){var wr=e.browser.getImageData(ye),Nr={};for(var pr in te){var mt=te[pr],St=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,nr=mt.sdf,dr=mt.pixelRatio,or=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Vt=new e.RGBAImage({width:St,height:Ft});e.RGBAImage.copy(wr,Vt,{x:rr,y:hr},{x:0,y:0},{width:St,height:Ft}),Nr[pr]={data:Vt,pixelRatio:dr,sdf:nr,stretchX:or,stretchY:Wt,content:ir}}xe(null,Nr)}}return{cancel:function(){Qe&&(Qe.cancel(),Qe=null),vt&&(vt.cancel(),vt=null)}}}function T(ge){var K=ge.userImage;if(K&&K.render){var xe=K.render();if(xe)return ge.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,_=function(ge){function K(){ge.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(te){if(this.loaded!==te&&(this.loaded=te,te)){for(var ye=0,je=this.requestors;ye<je.length;ye+=1){var ke=je[ye],Qe=ke.ids,vt=ke.callback;this._notify(Qe,vt)}this.requestors=[]}},K.prototype.getImage=function(te){return this.images[te]},K.prototype.addImage=function(te,ye){this._validate(te,ye)&&(this.images[te]=ye)},K.prototype._validate=function(te,ye){var je=!0;return this._validateStretch(ye.stretchX,ye.data&&ye.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchX" value'))),je=!1),this._validateStretch(ye.stretchY,ye.data&&ye.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchY" value'))),je=!1),this._validateContent(ye.content,ye)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "content" value'))),je=!1),je},K.prototype._validateStretch=function(te,ye){if(!te)return!0;for(var je=0,ke=0,Qe=te;ke<Qe.length;ke+=1){var vt=Qe[ke];if(vt[0]<je||vt[1]<vt[0]||ye<vt[1])return!1;je=vt[1]}return!0},K.prototype._validateContent=function(te,ye){return te?!(te.length!==4||te[0]<0||ye.data.width<te[0]||te[1]<0||ye.data.height<te[1]||te[2]<0||ye.data.width<te[2]||te[3]<0||ye.data.height<te[3]||te[2]<te[0]||te[3]<te[1]):!0},K.prototype.updateImage=function(te,ye){var je=this.images[te];ye.version=je.version+1,this.images[te]=ye,this.updatedImages[te]=!0},K.prototype.removeImage=function(te){var ye=this.images[te];delete this.images[te],delete this.patterns[te],ye.userImage&&ye.userImage.onRemove&&ye.userImage.onRemove()},K.prototype.listImages=function(){return Object.keys(this.images)},K.prototype.getImages=function(te,ye){var je=!0;if(!this.isLoaded())for(var ke=0,Qe=te;ke<Qe.length;ke+=1){var vt=Qe[ke];this.images[vt]||(je=!1)}this.isLoaded()||je?this._notify(te,ye):this.requestors.push({ids:te,callback:ye})},K.prototype._notify=function(te,ye){for(var je={},ke=0,Qe=te;ke<Qe.length;ke+=1){var vt=Qe[ke];this.images[vt]||this.fire(new e.Event("styleimagemissing",{id:vt}));var qt=this.images[vt];qt?je[vt]={data:qt.data.clone(),pixelRatio:qt.pixelRatio,sdf:qt.sdf,version:qt.version,stretchX:qt.stretchX,stretchY:qt.stretchY,content:qt.content,hasRenderCallback:!!(qt.userImage&&qt.userImage.render)}:e.warnOnce('Image "'+vt+'" 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.')}ye(null,je)},K.prototype.getPixelSize=function(){var te=this.atlasImage,ye=te.width,je=te.height;return{width:ye,height:je}},K.prototype.getPattern=function(te){var ye=this.patterns[te],je=this.getImage(te);if(!je)return null;if(ye&&ye.position.version===je.version)return ye.position;if(ye)ye.position.version=je.version;else{var ke=je.data.width+l*2,Qe=je.data.height+l*2,vt={w:ke,h:Qe,x:0,y:0},qt=new e.ImagePosition(vt,je);this.patterns[te]={bin:vt,position:qt}}return this._updatePatternAtlas(),this.patterns[te].position},K.prototype.bind=function(te){var ye=te.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(te,this.atlasImage,ye.RGBA),this.atlasTexture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE)},K.prototype._updatePatternAtlas=function(){var te=[];for(var ye in this.patterns)te.push(this.patterns[ye].bin);var je=e.potpack(te),ke=je.w,Qe=je.h,vt=this.atlasImage;vt.resize({width:ke||1,height:Qe||1});for(var qt in this.patterns){var wr=this.patterns[qt],Nr=wr.bin,pr=Nr.x+l,mt=Nr.y+l,St=this.images[qt].data,Ft=St.width,rr=St.height;e.RGBAImage.copy(St,vt,{x:0,y:0},{x:pr,y:mt},{width:Ft,height:rr}),e.RGBAImage.copy(St,vt,{x:0,y:rr-1},{x:pr,y:mt-1},{width:Ft,height:1}),e.RGBAImage.copy(St,vt,{x:0,y:0},{x:pr,y:mt+rr},{width:Ft,height:1}),e.RGBAImage.copy(St,vt,{x:Ft-1,y:0},{x:pr-1,y:mt},{width:1,height:rr}),e.RGBAImage.copy(St,vt,{x:0,y:0},{x:pr+Ft,y:mt},{width:1,height:rr})}this.dirty=!0},K.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},K.prototype.dispatchRenderCallbacks=function(te){for(var ye=0,je=te;ye<je.length;ye+=1){var ke=je[ye];if(!this.callbackDispatchedThisFrame[ke]){this.callbackDispatchedThisFrame[ke]=!0;var Qe=this.images[ke],vt=T(Qe);vt&&this.updateImage(ke,Qe)}}},K}(e.Evented);function w(ge,K,xe,te,ye){var je=K*256,ke=je+255,Qe=te.transformRequest(te.normalizeGlyphsURL(xe).replace("{fontstack}",ge).replace("{range}",je+"-"+ke),e.ResourceType.Glyphs);e.getArrayBuffer(Qe,function(vt,qt){if(vt)ye(vt);else if(qt){for(var wr={},Nr=0,pr=e.parseGlyphPBF(qt);Nr<pr.length;Nr+=1){var mt=pr[Nr];wr[mt.id]=mt}ye(null,wr)}})}var A=b,M=b,g=1e20;function b(ge,K,xe,te,ye,je){this.fontSize=ge||24,this.buffer=K===void 0?3:K,this.cutoff=te||.25,this.fontFamily=ye||"sans-serif",this.fontWeight=je||"normal",this.radius=xe||8;var ke=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=ke,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(ke*ke),this.gridInner=new Float64Array(ke*ke),this.f=new Float64Array(ke),this.d=new Float64Array(ke),this.z=new Float64Array(ke+1),this.v=new Int16Array(ke),this.middle=Math.round(ke/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}b.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),xe=new Uint8ClampedArray(this.size*this.size),te=0;te<this.size*this.size;te++){var ye=K.data[te*4+3]/255;this.gridOuter[te]=ye===1?0:ye===0?g:Math.pow(Math.max(0,.5-ye),2),this.gridInner[te]=ye===1?g:ye===0?0:Math.pow(Math.max(0,ye-.5),2)}for(p(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),p(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),te=0;te<this.size*this.size;te++){var je=this.gridOuter[te]-this.gridInner[te];xe[te]=Math.max(0,Math.min(255,Math.round(255-255*(je/this.radius+this.cutoff))))}return xe};function p(ge,K,xe,te,ye,je,ke){for(var Qe=0;Qe<K;Qe++){for(var vt=0;vt<xe;vt++)te[vt]=ge[vt*K+Qe];for(u(te,ye,je,ke,xe),vt=0;vt<xe;vt++)ge[vt*K+Qe]=ye[vt]}for(vt=0;vt<xe;vt++){for(Qe=0;Qe<K;Qe++)te[Qe]=ge[vt*K+Qe];for(u(te,ye,je,ke,K),Qe=0;Qe<K;Qe++)ge[vt*K+Qe]=Math.sqrt(ye[Qe])}}function u(ge,K,xe,te,ye){xe[0]=0,te[0]=-g,te[1]=+g;for(var je=1,ke=0;je<ye;je++){for(var Qe=(ge[je]+je*je-(ge[xe[ke]]+xe[ke]*xe[ke]))/(2*je-2*xe[ke]);Qe<=te[ke];)ke--,Qe=(ge[je]+je*je-(ge[xe[ke]]+xe[ke]*xe[ke]))/(2*je-2*xe[ke]);ke++,xe[ke]=je,te[ke]=Qe,te[ke+1]=+g}for(je=0,ke=0;je<ye;je++){for(;te[ke+1]<je;)ke++;K[je]=(je-xe[ke])*(je-xe[ke])+ge[xe[ke]]}}A.default=M;var y=function(K,xe){this.requestManager=K,this.localIdeographFontFamily=xe,this.entries={}};y.prototype.setURL=function(K){this.url=K},y.prototype.getGlyphs=function(K,xe){var te=this,ye=[];for(var je in K)for(var ke=0,Qe=K[je];ke<Qe.length;ke+=1){var vt=Qe[ke];ye.push({stack:je,id:vt})}e.asyncAll(ye,function(qt,wr){var Nr=qt.stack,pr=qt.id,mt=te.entries[Nr];mt||(mt=te.entries[Nr]={glyphs:{},requests:{},ranges:{}});var St=mt.glyphs[pr];if(St!==void 0){wr(null,{stack:Nr,id:pr,glyph:St});return}if(St=te._tinySDF(mt,Nr,pr),St){mt.glyphs[pr]=St,wr(null,{stack:Nr,id:pr,glyph:St});return}var Ft=Math.floor(pr/256);if(Ft*256>65535){wr(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){wr(null,{stack:Nr,id:pr,glyph:St});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],y.loadGlyphRange(Nr,Ft,te.url,te.requestManager,function(hr,nr){if(nr){for(var dr in nr)te._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=nr[+dr]);mt.ranges[Ft]=!0}for(var or=0,Wt=rr;or<Wt.length;or+=1){var ir=Wt[or];ir(hr,nr)}delete mt.requests[Ft]})),rr.push(function(hr,nr){hr?wr(hr):nr&&wr(null,{stack:Nr,id:pr,glyph:nr[pr]||null})})},function(qt,wr){if(qt)xe(qt);else if(wr){for(var Nr={},pr=0,mt=wr;pr<mt.length;pr+=1){var St=mt[pr],Ft=St.stack,rr=St.id,hr=St.glyph;(Nr[Ft]||(Nr[Ft]={}))[rr]=hr&&{id:hr.id,bitmap:hr.bitmap.clone(),metrics:hr.metrics}}xe(null,Nr)}})},y.prototype._doesCharSupportLocalGlyph=function(K){return!!this.localIdeographFontFamily&&(e.isChar["CJK Unified Ideographs"](K)||e.isChar["Hangul Syllables"](K)||e.isChar.Hiragana(K)||e.isChar.Katakana(K))},y.prototype._tinySDF=function(K,xe,te){var ye=this.localIdeographFontFamily;if(ye&&this._doesCharSupportLocalGlyph(te)){var je=K.tinySDF;if(!je){var ke="400";/bold/i.test(xe)?ke="900":/medium/i.test(xe)?ke="500":/light/i.test(xe)&&(ke="200"),je=K.tinySDF=new y.TinySDF(24,3,8,.25,ye,ke)}return{id:te,bitmap:new e.AlphaImage({width:30,height:30},je.draw(String.fromCharCode(te))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},y.loadGlyphRange=w,y.TinySDF=A;var m=function(){this.specification=e.styleSpec.light.position};m.prototype.possiblyEvaluate=function(K,xe){return e.sphericalToCartesian(K.expression.evaluate(xe))},m.prototype.interpolate=function(K,xe,te){return{x:e.number(K.x,xe.x,te),y:e.number(K.y,xe.y,te),z:e.number(K.z,xe.z,te)}};var R=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new m,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),L="-transition",z=function(ge){function K(xe){ge.call(this),this._transitionable=new e.Transitionable(R),this.setLight(xe),this._transitioning=this._transitionable.untransitioned()}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getLight=function(){return this._transitionable.serialize()},K.prototype.setLight=function(te,ye){if(ye===void 0&&(ye={}),!this._validate(e.validateLight,te,ye))for(var je in te){var ke=te[je];e.endsWith(je,L)?this._transitionable.setTransition(je.slice(0,-L.length),ke):this._transitionable.setValue(je,ke)}},K.prototype.updateTransitions=function(te){this._transitioning=this._transitionable.transitioned(te,this._transitioning)},K.prototype.hasTransition=function(){return this._transitioning.hasTransition()},K.prototype.recalculate=function(te){this.properties=this._transitioning.possiblyEvaluate(te)},K.prototype._validate=function(te,ye,je){return je&&je.validate===!1?!1:e.emitValidationErrors(this,te.call(e.validateStyle,e.extend({value:ye,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},K}(e.Evented),F=function(K,xe){this.width=K,this.height=xe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};F.prototype.getDash=function(K,xe){var te=K.join(",")+String(xe);return this.dashEntry[te]||(this.dashEntry[te]=this.addDash(K,xe)),this.dashEntry[te]},F.prototype.getDashRanges=function(K,xe,te){var ye=K.length%2===1,je=[],ke=ye?-K[K.length-1]*te:0,Qe=K[0]*te,vt=!0;je.push({left:ke,right:Qe,isDash:vt,zeroLength:K[0]===0});for(var qt=K[0],wr=1;wr<K.length;wr++){vt=!vt;var Nr=K[wr];ke=qt*te,qt+=Nr,Qe=qt*te,je.push({left:ke,right:Qe,isDash:vt,zeroLength:Nr===0})}return je},F.prototype.addRoundDash=function(K,xe,te){for(var ye=xe/2,je=-te;je<=te;je++)for(var ke=this.nextRow+te+je,Qe=this.width*ke,vt=0,qt=K[vt],wr=0;wr<this.width;wr++){wr/qt.right>1&&(qt=K[++vt]);var Nr=Math.abs(wr-qt.left),pr=Math.abs(wr-qt.right),mt=Math.min(Nr,pr),St=void 0,Ft=je/te*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);St=Math.sqrt(mt*mt+rr*rr)}else St=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+wr]=Math.max(0,Math.min(255,St+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var te=K[xe],ye=K[xe+1];te.zeroLength?K.splice(xe,1):ye&&ye.isDash===te.isDash&&(ye.left=te.left,K.splice(xe,1))}var je=K[0],ke=K[K.length-1];je.isDash===ke.isDash&&(je.left=ke.left-this.width,ke.right=je.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],wr=0;wr<this.width;wr++){wr/qt.right>1&&(qt=K[++vt]);var Nr=Math.abs(wr-qt.left),pr=Math.abs(wr-qt.right),mt=Math.min(Nr,pr),St=qt.isDash?mt:-mt;this.data[Qe+wr]=Math.max(0,Math.min(255,St+128))}},F.prototype.addDash=function(K,xe){var te=xe?7:0,ye=2*te+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var je=0,ke=0;ke<K.length;ke++)je+=K[ke];if(je!==0){var Qe=this.width/je,vt=this.getDashRanges(K,this.width,Qe);xe?this.addRoundDash(vt,Qe,te):this.addRegularDash(vt)}var qt={y:(this.nextRow+te+.5)/this.height,height:2*te/this.height,width:je};return this.nextRow+=ye,this.dirty=!0,qt},F.prototype.bind=function(K){var xe=K.gl;this.texture?(xe.bindTexture(xe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,xe.texSubImage2D(xe.TEXTURE_2D,0,0,0,this.width,this.height,xe.ALPHA,xe.UNSIGNED_BYTE,this.data))):(this.texture=xe.createTexture(),xe.bindTexture(xe.TEXTURE_2D,this.texture),xe.texParameteri(xe.TEXTURE_2D,xe.TEXTURE_WRAP_S,xe.REPEAT),xe.texParameteri(xe.TEXTURE_2D,xe.TEXTURE_WRAP_T,xe.REPEAT),xe.texParameteri(xe.TEXTURE_2D,xe.TEXTURE_MIN_FILTER,xe.LINEAR),xe.texParameteri(xe.TEXTURE_2D,xe.TEXTURE_MAG_FILTER,xe.LINEAR),xe.texImage2D(xe.TEXTURE_2D,0,xe.ALPHA,this.width,this.height,0,xe.ALPHA,xe.UNSIGNED_BYTE,this.data))};var N=function ge(K,xe){this.workerPool=K,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var te=this.workerPool.acquire(this.id),ye=0;ye<te.length;ye++){var je=te[ye],ke=new ge.Actor(je,xe,this.id);ke.name="Worker "+ye,this.actors.push(ke)}};N.prototype.broadcast=function(K,xe,te){te=te||function(){},e.asyncAll(this.actors,function(ye,je){ye.send(K,xe,je)},te)},N.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},N.prototype.remove=function(){this.actors.forEach(function(K){K.remove()}),this.actors=[],this.workerPool.release(this.id)},N.Actor=e.Actor;function O(ge,K,xe){var te=function(ye,je){if(ye)return xe(ye);if(je){var ke=e.pick(e.extend(je,ge),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);je.vector_layers&&(ke.vectorLayers=je.vector_layers,ke.vectorLayerIds=ke.vectorLayers.map(function(Qe){return Qe.id})),ke.tiles=K.canonicalizeTileset(ke,ge.url),xe(null,ke)}};return ge.url?e.getJSON(K.transformRequest(K.normalizeSourceURL(ge.url),e.ResourceType.Source),te):e.browser.frame(function(){return te(null,ge)})}var P=function(K,xe,te){this.bounds=e.LngLatBounds.convert(this.validateBounds(K)),this.minzoom=xe||0,this.maxzoom=te||24};P.prototype.validateBounds=function(K){return!Array.isArray(K)||K.length!==4?[-180,-90,180,90]:[Math.max(-180,K[0]),Math.max(-90,K[1]),Math.min(180,K[2]),Math.min(90,K[3])]},P.prototype.contains=function(K){var xe=Math.pow(2,K.z),te={minX:Math.floor(e.mercatorXfromLng(this.bounds.getWest())*xe),minY:Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*xe),maxX:Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*xe),maxY:Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*xe)},ye=K.x>=te.minX&&K.x<te.maxX&&K.y>=te.minY&&K.y<te.maxY;return ye};var U=function(ge){function K(xe,te,ye,je){if(ge.call(this),this.id=xe,this.dispatcher=ye,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(te,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},te),this._collectResourceTiming=te.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(je)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=O(this._options,this.map._requestManager,function(ye,je){te._tileJSONRequest=null,te._loaded=!0,ye?te.fire(new e.ErrorEvent(ye)):je&&(e.extend(te,je),je.bounds&&(te.tileBounds=new P(je.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(je.tiles,te.map._requestManager._customAccessToken),e.postMapLoadEvent(je.tiles,te.map._getMapId(),te.map._requestManager._skuToken,te.map._requestManager._customAccessToken),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},K.prototype.loaded=function(){return this._loaded},K.prototype.hasTile=function(te){return!this.tileBounds||this.tileBounds.contains(te.canonical)},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setSourceProperty=function(te){this._tileJSONRequest&&this._tileJSONRequest.cancel(),te();var ye=this.map.style.sourceCaches[this.id];ye.clearTiles(),this.load()},K.prototype.setTiles=function(te){var ye=this;return this.setSourceProperty(function(){ye._options.tiles=te}),this},K.prototype.setUrl=function(te){var ye=this;return this.setSourceProperty(function(){ye.url=te,ye._options.url=te}),this},K.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},K.prototype.serialize=function(){return e.extend({},this._options)},K.prototype.loadTile=function(te,ye){var je=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme)),ke={request:this.map._requestManager.transformRequest(je,e.ResourceType.Tile),uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,tileSize:this.tileSize*te.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ke.request.collectResourceTiming=this._collectResourceTiming,!te.actor||te.state==="expired"?(te.actor=this.dispatcher.getActor(),te.request=te.actor.send("loadTile",ke,Qe.bind(this))):te.state==="loading"?te.reloadCallback=ye:te.request=te.actor.send("reloadTile",ke,Qe.bind(this));function Qe(vt,qt){if(delete te.request,te.aborted)return ye(null);if(vt&&vt.status!==404)return ye(vt);qt&&qt.resourceTiming&&(te.resourceTiming=qt.resourceTiming),this.map._refreshExpiredTiles&&qt&&te.setExpiryData(qt),te.loadVectorData(qt,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),ye(null),te.reloadCallback&&(this.loadTile(te,te.reloadCallback),te.reloadCallback=null)}},K.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.actor&&te.actor.send("abortTile",{uid:te.uid,type:this.type,source:this.id},void 0)},K.prototype.unloadTile=function(te){te.unloadVectorData(),te.actor&&te.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id},void 0)},K.prototype.hasTransition=function(){return!1},K}(e.Evented),B=function(ge){function K(xe,te,ye,je){ge.call(this),this.id=xe,this.dispatcher=ye,this.setEventedParent(je),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},te),e.extend(this,e.pick(te,["url","scheme","tileSize"]))}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=O(this._options,this.map._requestManager,function(ye,je){te._tileJSONRequest=null,te._loaded=!0,ye?te.fire(new e.ErrorEvent(ye)):je&&(e.extend(te,je),je.bounds&&(te.tileBounds=new P(je.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(je.tiles),e.postMapLoadEvent(je.tiles,te.map._getMapId(),te.map._requestManager._skuToken),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},K.prototype.loaded=function(){return this._loaded},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},K.prototype.serialize=function(){return e.extend({},this._options)},K.prototype.hasTile=function(te){return!this.tileBounds||this.tileBounds.contains(te.canonical)},K.prototype.loadTile=function(te,ye){var je=this,ke=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(ke,e.ResourceType.Tile),function(Qe,vt){if(delete te.request,te.aborted)te.state="unloaded",ye(null);else if(Qe)te.state="errored",ye(Qe);else if(vt){je.map._refreshExpiredTiles&&te.setExpiryData(vt),delete vt.cacheControl,delete vt.expires;var qt=je.map.painter.context,wr=qt.gl;te.texture=je.map.painter.getTileTexture(vt.width),te.texture?te.texture.update(vt,{useMipmap:!0}):(te.texture=new e.Texture(qt,vt,wr.RGBA,{useMipmap:!0}),te.texture.bind(wr.LINEAR,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),qt.extTextureFilterAnisotropic&&wr.texParameterf(wr.TEXTURE_2D,qt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,qt.extTextureFilterAnisotropicMax)),te.state="loaded",e.cacheEntryPossiblyAdded(je.dispatcher),ye(null)}})},K.prototype.abortTile=function(te,ye){te.request&&(te.request.cancel(),delete te.request),ye()},K.prototype.unloadTile=function(te,ye){te.texture&&this.map.painter.saveTileTexture(te.texture),ye()},K.prototype.hasTransition=function(){return!1},K}(e.Evented),X=function(ge){function K(xe,te,ye,je){ge.call(this,xe,te,ye,je),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},te),this.encoding=te.encoding||"mapbox"}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},K.prototype.loadTile=function(te,ye){var je=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(je,e.ResourceType.Tile),ke.bind(this)),te.neighboringTiles=this._getNeighboringTiles(te.tileID);function ke(vt,qt){if(delete te.request,te.aborted)te.state="unloaded",ye(null);else if(vt)te.state="errored",ye(vt);else if(qt){this.map._refreshExpiredTiles&&te.setExpiryData(qt),delete qt.cacheControl,delete qt.expires;var wr=e.window.ImageBitmap&&qt instanceof e.window.ImageBitmap&&e.offscreenCanvasSupported(),Nr=wr?qt:e.browser.getImageData(qt,1),pr={uid:te.uid,coord:te.tileID,source:this.id,rawImageData:Nr,encoding:this.encoding};(!te.actor||te.state==="expired")&&(te.actor=this.dispatcher.getActor(),te.actor.send("loadDEMTile",pr,Qe.bind(this)))}}function Qe(vt,qt){vt&&(te.state="errored",ye(vt)),qt&&(te.dem=qt,te.needsHillshadePrepare=!0,te.state="loaded",ye(null))}},K.prototype._getNeighboringTiles=function(te){var ye=te.canonical,je=Math.pow(2,ye.z),ke=(ye.x-1+je)%je,Qe=ye.x===0?te.wrap-1:te.wrap,vt=(ye.x+1+je)%je,qt=ye.x+1===je?te.wrap+1:te.wrap,wr={};return wr[new e.OverscaledTileID(te.overscaledZ,Qe,ye.z,ke,ye.y).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,qt,ye.z,vt,ye.y).key]={backfilled:!1},ye.y>0&&(wr[new e.OverscaledTileID(te.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+1<je&&(wr[new e.OverscaledTileID(te.overscaledZ,Qe,ye.z,ke,ye.y+1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,ye.z,ye.x,ye.y+1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,qt,ye.z,vt,ye.y+1).key]={backfilled:!1}),wr},K.prototype.unloadTile=function(te){te.demTexture&&this.map.painter.saveTileTexture(te.demTexture),te.fbo&&(te.fbo.destroy(),delete te.fbo),te.dem&&delete te.dem,delete te.neighboringTiles,te.state="unloaded",te.actor&&te.actor.send("removeDEMTile",{uid:te.uid,source:this.id})},K}(B),$=function(ge){function K(xe,te,ye,je){ge.call(this),this.id=xe,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=ye.getActor(),this.setEventedParent(je),this._data=te.data,this._options=e.extend({},te),this._collectResourceTiming=te.collectResourceTiming,this._resourceTiming=[],te.maxzoom!==void 0&&(this.maxzoom=te.maxzoom),te.type&&(this.type=te.type),te.attribution&&(this.attribution=te.attribution),this.promoteId=te.promoteId;var ke=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:te.cluster||!1,geojsonVtOptions:{buffer:(te.buffer!==void 0?te.buffer:128)*ke,tolerance:(te.tolerance!==void 0?te.tolerance:.375)*ke,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:te.lineMetrics||!1,generateId:te.generateId||!1},superclusterOptions:{maxZoom:te.clusterMaxZoom!==void 0?Math.min(te.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,te.clusterMinPoints||2),extent:e.EXTENT,radius:(te.clusterRadius||50)*ke,log:!1,generateId:te.generateId||!1},clusterProperties:te.clusterProperties,filter:te.filter},te.workerOptions)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ye){if(ye){te.fire(new e.ErrorEvent(ye));return}var je={dataType:"source",sourceDataType:"metadata"};te._collectResourceTiming&&te._resourceTiming&&te._resourceTiming.length>0&&(je.resourceTiming=te._resourceTiming,te._resourceTiming=[]),te.fire(new e.Event("data",je))})},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setData=function(te){var ye=this;return this._data=te,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(je){if(je){ye.fire(new e.ErrorEvent(je));return}var ke={dataType:"source",sourceDataType:"content"};ye._collectResourceTiming&&ye._resourceTiming&&ye._resourceTiming.length>0&&(ke.resourceTiming=ye._resourceTiming,ye._resourceTiming=[]),ye.fire(new e.Event("data",ke))}),this},K.prototype.getClusterExpansionZoom=function(te,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:te,source:this.id},ye),this},K.prototype.getClusterChildren=function(te,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:te,source:this.id},ye),this},K.prototype.getClusterLeaves=function(te,ye,je,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:te,limit:ye,offset:je},ke),this},K.prototype._updateWorkerData=function(te){var ye=this;this._loaded=!1;var je=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(je.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),je.request.collectResourceTiming=this._collectResourceTiming):je.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",je,function(Qe,vt){ye._removed||vt&&vt.abandoned||(ye._loaded=!0,vt&&vt.resourceTiming&&vt.resourceTiming[ye.id]&&(ye._resourceTiming=vt.resourceTiming[ye.id].slice(0)),ye.actor.send(ye.type+".coalesce",{source:je.source},null),te(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(te,ye){var je=this,ke=te.actor?"reloadTile":"loadTile";te.actor=this.actor;var Qe={type:this.type,uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};te.request=this.actor.send(ke,Qe,function(vt,qt){return delete te.request,te.unloadVectorData(),te.aborted?ye(null):vt?ye(vt):(te.loadVectorData(qt,je.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.aborted=!0},K.prototype.unloadTile=function(te){te.unloadVectorData(),this.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(e.Evented),le=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,te,ye,je){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=te.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(je),this.options=te}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(te,ye){var je=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),function(ke,Qe){je._loaded=!0,ke?je.fire(new e.ErrorEvent(ke)):Qe&&(je.image=Qe,te&&(je.coordinates=te),ye&&ye(),je._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(te){var ye=this;return!this.image||!te.url?this:(this.options.url=te.url,this.load(te.coordinates,function(){ye.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setCoordinates=function(te){var ye=this;this.coordinates=te;var je=te.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(je),this.minzoom=this.maxzoom=this.tileID.z;var ke=je.map(function(Qe){return ye.tileID.getTilePoint(Qe)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(ke[0].x,ke[0].y,0,0),this._boundsArray.emplaceBack(ke[1].x,ke[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(ke[3].x,ke[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(ke[2].x,ke[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var te=this.map.painter.context,ye=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(te,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var je in this.tiles){var ke=this.tiles[je];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(te,ye){this.tileID&&this.tileID.equals(te.tileID.canonical)?(this.tiles[String(te.tileID.wrap)]=te,te.buckets={},ye(null)):(te.state="errored",ye(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(e.Evented);function de(ge){for(var K=1/0,xe=1/0,te=-1/0,ye=-1/0,je=0,ke=ge;je<ke.length;je+=1){var Qe=ke[je];K=Math.min(K,Qe.x),xe=Math.min(xe,Qe.y),te=Math.max(te,Qe.x),ye=Math.max(ye,Qe.y)}var vt=te-K,qt=ye-xe,wr=Math.max(vt,qt),Nr=Math.max(0,Math.floor(-Math.log(wr)/Math.LN2)),pr=Math.pow(2,Nr);return new e.CanonicalTileID(Nr,Math.floor((K+te)/2*pr),Math.floor((xe+ye)/2*pr))}var G=function(ge){function K(xe,te,ye,je){ge.call(this,xe,te,ye,je),this.roundZoom=!0,this.type="video",this.options=te}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this._loaded=!1;var ye=this.options;this.urls=[];for(var je=0,ke=ye.urls;je<ke.length;je+=1){var Qe=ke[je];this.urls.push(this.map._requestManager.transformRequest(Qe,e.ResourceType.Source).url)}e.getVideo(this.urls,function(vt,qt){te._loaded=!0,vt?te.fire(new e.ErrorEvent(vt)):qt&&(te.video=qt,te.video.loop=!0,te.video.addEventListener("playing",function(){te.map.triggerRepaint()}),te.map&&te.video.play(),te._finishLoading())})},K.prototype.pause=function(){this.video&&this.video.pause()},K.prototype.play=function(){this.video&&this.video.play()},K.prototype.seek=function(te){if(this.video){var ye=this.video.seekable;te<ye.start(0)||te>ye.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ye.start(0)+" and "+ye.end(0)+"-second mark."))):this.video.currentTime=te}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(te){this.map||(this.map=te,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var te=this.map.painter.context,ye=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,ye.RGBA,ye.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(te,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var je in this.tiles){var ke=this.tiles[je];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(ce),Y=function(ge){function K(xe,te,ye,je){ge.call(this,xe,te,ye,je),te.coordinates?(!Array.isArray(te.coordinates)||te.coordinates.length!==4||te.coordinates.some(function(ke){return!Array.isArray(ke)||ke.length!==2||ke.some(function(Qe){return typeof Qe!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "coordinates"'))),te.animate&&typeof te.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),te.canvas?typeof te.canvas!="string"&&!(te.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,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 e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "canvas"'))),this.options=te,this.animate=te.animate!==void 0?te.animate:!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(te){this.map=te,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var te=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,te=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,te=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,je=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(te||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,je.RGBA,{premultiply:!0});for(var ke in this.tiles){var Qe=this.tiles[ke];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var te=0,ye=[this.canvas.width,this.canvas.height];te<ye.length;te+=1){var je=ye[te];if(isNaN(je)||je<=0)return!0}return!1},K}(ce),ee={vector:U,raster:B,"raster-dem":X,geojson:$,video:G,image:ce,canvas:Y},q=function(ge,K,xe,te){var ye=new ee[K.type](ge,K,xe,te);if(ye.id!==ge)throw new Error("Expected Source id to be "+ge+" instead of "+ye.id);return e.bindAll(["load","abort","unload","serialize","prepare"],ye),ye},se=function(ge){return ee[ge]},ae=function(ge,K){ee[ge]=K};function j(ge,K){var xe=e.identity([]);return e.translate(xe,xe,[1,1,0]),e.scale(xe,xe,[ge.width*.5,ge.height*.5,1]),e.multiply(xe,xe,ge.calculatePosMatrix(K.toUnwrapped()))}function Q(ge,K,xe){if(ge)for(var te=0,ye=ge;te<ye.length;te+=1){var je=ye[te],ke=K[je];if(ke&&ke.source===xe&&ke.type==="fill-extrusion")return!0}else for(var Qe in K){var vt=K[Qe];if(vt.source===xe&&vt.type==="fill-extrusion")return!0}return!1}function re(ge,K,xe,te,ye,je){var ke=Q(ye&&ye.layers,K,ge.id),Qe=je.maxPitchScaleFactor(),vt=ge.tilesIn(te,Qe,ke);vt.sort(Se);for(var qt=[],wr=0,Nr=vt;wr<Nr.length;wr+=1){var pr=Nr[wr];qt.push({wrappedTileID:pr.tileID.wrapped().key,queryResults:pr.tile.queryRenderedFeatures(K,xe,ge._state,pr.queryGeometry,pr.cameraQueryGeometry,pr.scale,ye,je,Qe,j(ge.transform,pr.tileID))})}var mt=Ie(qt);for(var St in mt)mt[St].forEach(function(Ft){var rr=Ft.feature,hr=ge.getFeatureState(rr.layer["source-layer"],rr.id);rr.source=rr.layer.source,rr.layer["source-layer"]&&(rr.sourceLayer=rr.layer["source-layer"]),rr.state=hr});return mt}function pe(ge,K,xe,te,ye,je,ke){for(var Qe={},vt=je.queryRenderedSymbols(te),qt=[],wr=0,Nr=Object.keys(vt).map(Number);wr<Nr.length;wr+=1){var pr=Nr[wr];qt.push(ke[pr])}qt.sort(Se);for(var mt=function(){var nr=Ft[St],dr=nr.featureIndex.lookupSymbolFeatures(vt[nr.bucketInstanceId],K,nr.bucketIndex,nr.sourceLayerIndex,ye.filter,ye.layers,ye.availableImages,ge);for(var or in dr){var Wt=Qe[or]=Qe[or]||[],ir=dr[or];ir.sort(function(ga,vi){var Ga=nr.featureSortOrder;if(Ga){var ai=Ga.indexOf(ga.featureIndex),Zi=Ga.indexOf(vi.featureIndex);return Zi-ai}else return vi.featureIndex-ga.featureIndex});for(var Vt=0,Dr=ir;Vt<Dr.length;Vt+=1){var Jr=Dr[Vt];Wt.push(Jr)}}},St=0,Ft=qt;St<Ft.length;St+=1)mt();var rr=function(nr){Qe[nr].forEach(function(dr){var or=dr.feature,Wt=ge[nr],ir=xe[Wt.source],Vt=ir.getFeatureState(or.layer["source-layer"],or.id);or.source=or.layer.source,or.layer["source-layer"]&&(or.sourceLayer=or.layer["source-layer"]),or.state=Vt})};for(var hr in Qe)rr(hr);return Qe}function we(ge,K){for(var xe=ge.getRenderableIds().map(function(vt){return ge.getTileByID(vt)}),te=[],ye={},je=0;je<xe.length;je++){var ke=xe[je],Qe=ke.tileID.canonical.key;ye[Qe]||(ye[Qe]=!0,ke.querySourceFeatures(te,K))}return te}function Se(ge,K){var xe=ge.tileID,te=K.tileID;return xe.overscaledZ-te.overscaledZ||xe.canonical.y-te.canonical.y||xe.wrap-te.wrap||xe.canonical.x-te.canonical.x}function Ie(ge){for(var K={},xe={},te=0,ye=ge;te<ye.length;te+=1){var je=ye[te],ke=je.queryResults,Qe=je.wrappedTileID,vt=xe[Qe]=xe[Qe]||{};for(var qt in ke)for(var wr=ke[qt],Nr=vt[qt]=vt[qt]||{},pr=K[qt]=K[qt]||[],mt=0,St=wr;mt<St.length;mt+=1){var Ft=St[mt];Nr[Ft.featureIndex]||(Nr[Ft.featureIndex]=!0,pr.push(Ft))}}return K}var Re=function(K,xe){this.max=K,this.onRemove=xe,this.reset()};Re.prototype.reset=function(){for(var K in this.data)for(var xe=0,te=this.data[K];xe<te.length;xe+=1){var ye=te[xe];ye.timeout&&clearTimeout(ye.timeout),this.onRemove(ye.value)}return this.data={},this.order=[],this},Re.prototype.add=function(K,xe,te){var ye=this,je=K.wrapped().key;this.data[je]===void 0&&(this.data[je]=[]);var ke={value:xe,timeout:void 0};if(te!==void 0&&(ke.timeout=setTimeout(function(){ye.remove(K,ke)},te)),this.data[je].push(ke),this.order.push(je),this.order.length>this.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Re.prototype.has=function(K){return K.wrapped().key in this.data},Re.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Re.prototype._getAndRemoveByKey=function(K){var xe=this.data[K].shift();return xe.timeout&&clearTimeout(xe.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),xe.value},Re.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Re.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Re.prototype.remove=function(K,xe){if(!this.has(K))return this;var te=K.wrapped().key,ye=xe===void 0?0:this.data[te].indexOf(xe),je=this.data[te][ye];return this.data[te].splice(ye,1),je.timeout&&clearTimeout(je.timeout),this.data[te].length===0&&delete this.data[te],this.onRemove(je.value),this.order.splice(this.order.indexOf(te),1),this},Re.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this},Re.prototype.filter=function(K){var xe=[];for(var te in this.data)for(var ye=0,je=this.data[te];ye<je.length;ye+=1){var ke=je[ye];K(ke.value)||xe.push(ke)}for(var Qe=0,vt=xe;Qe<vt.length;Qe+=1){var qt=vt[Qe];this.remove(qt.value.tileID,qt)}};var We=function(K,xe,te){this.context=K;var ye=K.gl;this.buffer=ye.createBuffer(),this.dynamicDraw=!!te,this.context.unbindVAO(),K.bindElementBuffer.set(this.buffer),ye.bufferData(ye.ELEMENT_ARRAY_BUFFER,xe.arrayBuffer,this.dynamicDraw?ye.DYNAMIC_DRAW:ye.STATIC_DRAW),this.dynamicDraw||delete xe.arrayBuffer};We.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},We.prototype.updateData=function(K){var xe=this.context.gl;this.context.unbindVAO(),this.bind(),xe.bufferSubData(xe.ELEMENT_ARRAY_BUFFER,0,K.arrayBuffer)},We.prototype.destroy=function(){var K=this.context.gl;this.buffer&&(K.deleteBuffer(this.buffer),delete this.buffer)};var at={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},nt=function(K,xe,te,ye){this.length=xe.length,this.attributes=te,this.itemSize=xe.bytesPerElement,this.dynamicDraw=ye,this.context=K;var je=K.gl;this.buffer=je.createBuffer(),K.bindVertexBuffer.set(this.buffer),je.bufferData(je.ARRAY_BUFFER,xe.arrayBuffer,this.dynamicDraw?je.DYNAMIC_DRAW:je.STATIC_DRAW),this.dynamicDraw||delete xe.arrayBuffer};nt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},nt.prototype.updateData=function(K){var xe=this.context.gl;this.bind(),xe.bufferSubData(xe.ARRAY_BUFFER,0,K.arrayBuffer)},nt.prototype.enableAttributes=function(K,xe){for(var te=0;te<this.attributes.length;te++){var ye=this.attributes[te],je=xe.attributes[ye.name];je!==void 0&&K.enableVertexAttribArray(je)}},nt.prototype.setVertexAttribPointers=function(K,xe,te){for(var ye=0;ye<this.attributes.length;ye++){var je=this.attributes[ye],ke=xe.attributes[je.name];ke!==void 0&&K.vertexAttribPointer(ke,je.components,K[at[je.type]],!1,this.itemSize,je.offset+this.itemSize*(te||0))}},nt.prototype.destroy=function(){var K=this.context.gl;this.buffer&&(K.deleteBuffer(this.buffer),delete this.buffer)};var tt=function(K){this.gl=K.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};tt.prototype.get=function(){return this.current},tt.prototype.set=function(K){},tt.prototype.getDefault=function(){return this.default},tt.prototype.setDefault=function(){this.set(this.default)};var qe=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return e.Color.transparent},K.prototype.set=function(te){var ye=this.current;te.r===ye.r&&te.g===ye.g&&te.b===ye.b&&te.a===ye.a&&!this.dirty||(this.gl.clearColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},K}(tt),he=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return 1},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.clearDepth(te),this.current=te,this.dirty=!1)},K}(tt),ue=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return 0},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.clearStencil(te),this.current=te,this.dirty=!1)},K}(tt),ne=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return[!0,!0,!0,!0]},K.prototype.set=function(te){var ye=this.current;te[0]===ye[0]&&te[1]===ye[1]&&te[2]===ye[2]&&te[3]===ye[3]&&!this.dirty||(this.gl.colorMask(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},K}(tt),Ce=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!0},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.depthMask(te),this.current=te,this.dirty=!1)},K}(tt),Ye=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return 255},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.stencilMask(te),this.current=te,this.dirty=!1)},K}(tt),rt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},K.prototype.set=function(te){var ye=this.current;te.func===ye.func&&te.ref===ye.ref&&te.mask===ye.mask&&!this.dirty||(this.gl.stencilFunc(te.func,te.ref,te.mask),this.current=te,this.dirty=!1)},K}(tt),Ke=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){var te=this.gl;return[te.KEEP,te.KEEP,te.KEEP]},K.prototype.set=function(te){var ye=this.current;te[0]===ye[0]&&te[1]===ye[1]&&te[2]===ye[2]&&!this.dirty||(this.gl.stencilOp(te[0],te[1],te[2]),this.current=te,this.dirty=!1)},K}(tt),Mt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;te?ye.enable(ye.STENCIL_TEST):ye.disable(ye.STENCIL_TEST),this.current=te,this.dirty=!1}},K}(tt),kt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return[0,1]},K.prototype.set=function(te){var ye=this.current;te[0]===ye[0]&&te[1]===ye[1]&&!this.dirty||(this.gl.depthRange(te[0],te[1]),this.current=te,this.dirty=!1)},K}(tt),Nt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;te?ye.enable(ye.DEPTH_TEST):ye.disable(ye.DEPTH_TEST),this.current=te,this.dirty=!1}},K}(tt),Gt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return this.gl.LESS},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.depthFunc(te),this.current=te,this.dirty=!1)},K}(tt),Mr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;te?ye.enable(ye.BLEND):ye.disable(ye.BLEND),this.current=te,this.dirty=!1}},K}(tt),mr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){var te=this.gl;return[te.ONE,te.ZERO]},K.prototype.set=function(te){var ye=this.current;te[0]===ye[0]&&te[1]===ye[1]&&!this.dirty||(this.gl.blendFunc(te[0],te[1]),this.current=te,this.dirty=!1)},K}(tt),qr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return e.Color.transparent},K.prototype.set=function(te){var ye=this.current;te.r===ye.r&&te.g===ye.g&&te.b===ye.b&&te.a===ye.a&&!this.dirty||(this.gl.blendColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},K}(tt),Er=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return this.gl.FUNC_ADD},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.blendEquation(te),this.current=te,this.dirty=!1)},K}(tt),Ir=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;te?ye.enable(ye.CULL_FACE):ye.disable(ye.CULL_FACE),this.current=te,this.dirty=!1}},K}(tt),_t=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return this.gl.BACK},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.cullFace(te),this.current=te,this.dirty=!1)},K}(tt),Oe=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return this.gl.CCW},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.frontFace(te),this.current=te,this.dirty=!1)},K}(tt),Je=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.useProgram(te),this.current=te,this.dirty=!1)},K}(tt),Ae=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return this.gl.TEXTURE0},K.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.activeTexture(te),this.current=te,this.dirty=!1)},K}(tt),Le=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){var te=this.gl;return[0,0,te.drawingBufferWidth,te.drawingBufferHeight]},K.prototype.set=function(te){var ye=this.current;te[0]===ye[0]&&te[1]===ye[1]&&te[2]===ye[2]&&te[3]===ye[3]&&!this.dirty||(this.gl.viewport(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},K}(tt),Ue=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.bindFramebuffer(ye.FRAMEBUFFER,te),this.current=te,this.dirty=!1}},K}(tt),Ze=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.bindRenderbuffer(ye.RENDERBUFFER,te),this.current=te,this.dirty=!1}},K}(tt),st=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.bindTexture(ye.TEXTURE_2D,te),this.current=te,this.dirty=!1}},K}(tt),ut=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.bindBuffer(ye.ARRAY_BUFFER,te),this.current=te,this.dirty=!1}},K}(tt),Ut=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){var ye=this.gl;ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,te),this.current=te,this.dirty=!1},K}(tt),Ct=function(ge){function K(xe){ge.call(this,xe),this.vao=xe.extVertexArrayObject}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){!this.vao||te===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(te),this.current=te,this.dirty=!1)},K}(tt),Pt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return 4},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.pixelStorei(ye.UNPACK_ALIGNMENT,te),this.current=te,this.dirty=!1}},K}(tt),jt=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,te),this.current=te,this.dirty=!1}},K}(tt),fr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var ye=this.gl;ye.pixelStorei(ye.UNPACK_FLIP_Y_WEBGL,te),this.current=te,this.dirty=!1}},K}(tt),ur=function(ge){function K(xe,te){ge.call(this,xe),this.context=xe,this.parent=te}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K}(tt),sr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.setDirty=function(){this.dirty=!0},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var ye=this.gl;ye.framebufferTexture2D(ye.FRAMEBUFFER,ye.COLOR_ATTACHMENT0,ye.TEXTURE_2D,te,0),this.current=te,this.dirty=!1}},K}(ur),Pr=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var ye=this.gl;ye.framebufferRenderbuffer(ye.FRAMEBUFFER,ye.DEPTH_ATTACHMENT,ye.RENDERBUFFER,te),this.current=te,this.dirty=!1}},K}(ur),Ta=function(K,xe,te,ye){this.context=K,this.width=xe,this.height=te;var je=K.gl,ke=this.framebuffer=je.createFramebuffer();this.colorAttachment=new sr(K,ke),ye&&(this.depthAttachment=new Pr(K,ke))};Ta.prototype.destroy=function(){var K=this.context.gl,xe=this.colorAttachment.get();if(xe&&K.deleteTexture(xe),this.depthAttachment){var te=this.depthAttachment.get();te&&K.deleteRenderbuffer(te)}K.deleteFramebuffer(this.framebuffer)};var Oa=519,Ia=function(K,xe,te){this.func=K,this.mask=xe,this.range=te};Ia.ReadOnly=!1,Ia.ReadWrite=!0,Ia.disabled=new Ia(Oa,Ia.ReadOnly,[0,1]);var qa=519,Wa=7680,Ca=function(K,xe,te,ye,je,ke){this.test=K,this.ref=xe,this.mask=te,this.fail=ye,this.depthFail=je,this.pass=ke};Ca.disabled=new Ca({func:qa,mask:0},0,0,Wa,Wa,Wa);var hi=0,wi=1,Kt=771,Dt=function(K,xe,te){this.blendFunction=K,this.blendColor=xe,this.mask=te};Dt.Replace=[wi,hi],Dt.disabled=new Dt(Dt.Replace,e.Color.transparent,[!1,!1,!1,!1]),Dt.unblended=new Dt(Dt.Replace,e.Color.transparent,[!0,!0,!0,!0]),Dt.alphaBlended=new Dt([wi,Kt],e.Color.transparent,[!0,!0,!0,!0]);var Yt=1029,Jt=2305,Fr=function(K,xe,te){this.enable=K,this.mode=xe,this.frontFace=te};Fr.disabled=new Fr(!1,Yt,Jt),Fr.backCCW=new Fr(!0,Yt,Jt);var ta=function(K){this.gl=K,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new qe(this),this.clearDepth=new he(this),this.clearStencil=new ue(this),this.colorMask=new ne(this),this.depthMask=new Ce(this),this.stencilMask=new Ye(this),this.stencilFunc=new rt(this),this.stencilOp=new Ke(this),this.stencilTest=new Mt(this),this.depthRange=new kt(this),this.depthTest=new Nt(this),this.depthFunc=new Gt(this),this.blend=new Mr(this),this.blendFunc=new mr(this),this.blendColor=new qr(this),this.blendEquation=new Er(this),this.cullFace=new Ir(this),this.cullFaceSide=new _t(this),this.frontFace=new Oe(this),this.program=new Je(this),this.activeTexture=new Ae(this),this.viewport=new Le(this),this.bindFramebuffer=new Ue(this),this.bindRenderbuffer=new Ze(this),this.bindTexture=new st(this),this.bindVertexBuffer=new ut(this),this.bindElementBuffer=new Ut(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Ct(this),this.pixelStoreUnpack=new Pt(this),this.pixelStoreUnpackPremultiplyAlpha=new jt(this),this.pixelStoreUnpackFlipY=new fr(this),this.extTextureFilterAnisotropic=K.getExtension("EXT_texture_filter_anisotropic")||K.getExtension("MOZ_EXT_texture_filter_anisotropic")||K.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=K.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=K.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(K.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=K.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=K.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=K.getParameter(K.MAX_TEXTURE_SIZE)};ta.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},ta.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},ta.prototype.createIndexBuffer=function(K,xe){return new We(this,K,xe)},ta.prototype.createVertexBuffer=function(K,xe,te){return new nt(this,K,xe,te)},ta.prototype.createRenderbuffer=function(K,xe,te){var ye=this.gl,je=ye.createRenderbuffer();return this.bindRenderbuffer.set(je),ye.renderbufferStorage(ye.RENDERBUFFER,K,xe,te),this.bindRenderbuffer.set(null),je},ta.prototype.createFramebuffer=function(K,xe,te){return new Ta(this,K,xe,te)},ta.prototype.clear=function(K){var xe=K.color,te=K.depth,ye=this.gl,je=0;xe&&(je|=ye.COLOR_BUFFER_BIT,this.clearColor.set(xe),this.colorMask.set([!0,!0,!0,!0])),typeof te<"u"&&(je|=ye.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(te),this.depthMask.set(!0)),ye.clear(je)},ta.prototype.setCullFace=function(K){K.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(K.mode),this.frontFace.set(K.frontFace))},ta.prototype.setDepthMode=function(K){K.func===this.gl.ALWAYS&&!K.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(K.func),this.depthMask.set(K.mask),this.depthRange.set(K.range))},ta.prototype.setStencilMode=function(K){K.test.func===this.gl.ALWAYS&&!K.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(K.mask),this.stencilOp.set([K.fail,K.depthFail,K.pass]),this.stencilFunc.set({func:K.test.func,ref:K.ref,mask:K.test.mask}))},ta.prototype.setColorMode=function(K){e.deepEqual(K.blendFunction,Dt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(K.blendFunction),this.blendColor.set(K.blendColor)),this.colorMask.set(K.mask)},ta.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ra=function(ge){function K(xe,te,ye){var je=this;ge.call(this),this.id=xe,this.dispatcher=ye,this.on("data",function(ke){ke.dataType==="source"&&ke.sourceDataType==="metadata"&&(je._sourceLoaded=!0),je._sourceLoaded&&!je._paused&&ke.dataType==="source"&&ke.sourceDataType==="content"&&(je.reload(),je.transform&&je.update(je.transform))}),this.on("error",function(){je._sourceErrored=!0}),this._source=q(xe,te,ye,this),this._tiles={},this._cache=new Re(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new e.SourceFeatureState}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(te){this.map=te,this._maxTileCacheSize=te?te._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(te)},K.prototype.onRemove=function(te){this._source&&this._source.onRemove&&this._source.onRemove(te)},K.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var te in this._tiles){var ye=this._tiles[te];if(ye.state!=="loaded"&&ye.state!=="errored")return!1}return!0},K.prototype.getSource=function(){return this._source},K.prototype.pause=function(){this._paused=!0},K.prototype.resume=function(){if(this._paused){var te=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,te&&this.reload(),this.transform&&this.update(this.transform)}},K.prototype._loadTile=function(te,ye){return this._source.loadTile(te,ye)},K.prototype._unloadTile=function(te){if(this._source.unloadTile)return this._source.unloadTile(te,function(){})},K.prototype._abortTile=function(te){if(this._source.abortTile)return this._source.abortTile(te,function(){})},K.prototype.serialize=function(){return this._source.serialize()},K.prototype.prepare=function(te){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var ye in this._tiles){var je=this._tiles[ye];je.upload(te),je.prepare(this.map.style.imageManager)}},K.prototype.getIds=function(){return e.values(this._tiles).map(function(te){return te.tileID}).sort(ca).map(function(te){return te.key})},K.prototype.getRenderableIds=function(te){var ye=this,je=[];for(var ke in this._tiles)this._isIdRenderable(ke,te)&&je.push(this._tiles[ke]);return te?je.sort(function(Qe,vt){var qt=Qe.tileID,wr=vt.tileID,Nr=new e.Point(qt.canonical.x,qt.canonical.y)._rotate(ye.transform.angle),pr=new e.Point(wr.canonical.x,wr.canonical.y)._rotate(ye.transform.angle);return qt.overscaledZ-wr.overscaledZ||pr.y-Nr.y||pr.x-Nr.x}).map(function(Qe){return Qe.tileID.key}):je.map(function(Qe){return Qe.tileID}).sort(ca).map(function(Qe){return Qe.key})},K.prototype.hasRenderableParent=function(te){var ye=this.findLoadedParent(te,0);return ye?this._isIdRenderable(ye.tileID.key):!1},K.prototype._isIdRenderable=function(te,ye){return this._tiles[te]&&this._tiles[te].hasData()&&!this._coveredTiles[te]&&(ye||!this._tiles[te].holdingForFade())},K.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var te in this._tiles)this._tiles[te].state!=="errored"&&this._reloadTile(te,"reloading")},K.prototype._reloadTile=function(te,ye){var je=this._tiles[te];je&&(je.state!=="loading"&&(je.state=ye),this._loadTile(je,this._tileLoaded.bind(this,je,te,ye)))},K.prototype._tileLoaded=function(te,ye,je,ke){if(ke){te.state="errored",ke.status!==404?this._source.fire(new e.ErrorEvent(ke,{tile:te})):this.update(this.transform);return}te.timeAdded=e.browser.now(),je==="expired"&&(te.refreshedUponExpiration=!0),this._setTileReloadTimer(ye,te),this.getSource().type==="raster-dem"&&te.dem&&this._backfillDEM(te),this._state.initializeTileState(te,this.map?this.map.painter:null),this._source.fire(new e.Event("data",{dataType:"source",tile:te,coord:te.tileID}))},K.prototype._backfillDEM=function(te){for(var ye=this.getRenderableIds(),je=0;je<ye.length;je++){var ke=ye[je];if(te.neighboringTiles&&te.neighboringTiles[ke]){var Qe=this.getTileByID(ke);vt(te,Qe),vt(Qe,te)}}function vt(qt,wr){qt.needsHillshadePrepare=!0;var Nr=wr.tileID.canonical.x-qt.tileID.canonical.x,pr=wr.tileID.canonical.y-qt.tileID.canonical.y,mt=Math.pow(2,qt.tileID.canonical.z),St=wr.tileID.key;Nr===0&&pr===0||Math.abs(pr)>1||(Math.abs(Nr)>1&&(Math.abs(Nr+mt)===1?Nr+=mt:Math.abs(Nr-mt)===1&&(Nr-=mt)),!(!wr.dem||!qt.dem)&&(qt.dem.backfillBorder(wr.dem,Nr,pr),qt.neighboringTiles&&qt.neighboringTiles[St]&&(qt.neighboringTiles[St].backfilled=!0)))}},K.prototype.getTile=function(te){return this.getTileByID(te.key)},K.prototype.getTileByID=function(te){return this._tiles[te]},K.prototype._retainLoadedChildren=function(te,ye,je,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>je)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var wr=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[wr.key],vt&&vt.hasData()&&(qt=wr)}for(var Nr=qt;Nr.overscaledZ>ye;)if(Nr=Nr.scaledTo(Nr.overscaledZ-1),te[Nr.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(te,ye){if(te.key in this._loadedParentTiles){var je=this._loadedParentTiles[te.key];return je&&je.tileID.overscaledZ>=ye?je:null}for(var ke=te.overscaledZ-1;ke>=ye;ke--){var Qe=te.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(te){var ye=this._tiles[te.key];if(ye&&ye.hasData())return ye;var je=this._cache.getByKey(te.wrapped().key);return je},K.prototype.updateCacheSize=function(te){var ye=Math.ceil(te.width/this._source.tileSize)+1,je=Math.ceil(te.height/this._source.tileSize)+1,ke=ye*je,Qe=5,vt=Math.floor(ke*Qe),qt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,vt):vt;this._cache.setMaxSize(qt)},K.prototype.handleWrapJump=function(te){var ye=this._prevLng===void 0?te:this._prevLng,je=te-ye,ke=je/360,Qe=Math.round(ke);if(this._prevLng=te,Qe){var vt={};for(var qt in this._tiles){var wr=this._tiles[qt];wr.tileID=wr.tileID.unwrapTo(wr.tileID.wrap+Qe),vt[wr.tileID.key]=wr}this._tiles=vt;for(var Nr in this._timers)clearTimeout(this._timers[Nr]),delete this._timers[Nr];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(te){var ye=this;if(this.transform=te,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(te),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var je;this.used?this._source.tileID?je=te.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ga){return new e.OverscaledTileID(ga.canonical.z,ga.wrap,ga.canonical.z,ga.canonical.x,ga.canonical.y)}):(je=te.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(je=je.filter(function(ga){return ye._source.hasTile(ga)}))):je=[];var ke=te.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(je,ke);if(Ba(this._source.type)){for(var wr={},Nr={},pr=Object.keys(qt),mt=0,St=pr;mt<St.length;mt+=1){var Ft=St[mt],rr=qt[Ft],hr=this._tiles[Ft];if(!(!hr||hr.fadeEndTime&&hr.fadeEndTime<=e.browser.now())){var nr=this.findLoadedParent(rr,Qe);nr&&(this._addTile(nr.tileID),wr[nr.tileID.key]=nr.tileID),Nr[Ft]=rr}}this._retainLoadedChildren(Nr,ke,vt,qt);for(var dr in wr)qt[dr]||(this._coveredTiles[dr]=!0,qt[dr]=wr[dr])}for(var or in qt)this._tiles[or].clearFadeHold();for(var Wt=e.keysDifference(this._tiles,qt),ir=0,Vt=Wt;ir<Vt.length;ir+=1){var Dr=Vt[ir],Jr=this._tiles[Dr];Jr.hasSymbolBuckets&&!Jr.holdingForFade()?Jr.setHoldDuration(this.map._fadeDuration):(!Jr.hasSymbolBuckets||Jr.symbolFadeFinished())&&this._removeTile(Dr)}this._updateLoadedParentTileCache()}},K.prototype.releaseSymbolFadeTiles=function(){for(var te in this._tiles)this._tiles[te].holdingForFade()&&this._removeTile(te)},K.prototype._updateRetainedTiles=function(te,ye){for(var je={},ke={},Qe=Math.max(ye-K.maxOverzooming,this._source.minzoom),vt=Math.max(ye+K.maxUnderzooming,this._source.minzoom),qt={},wr=0,Nr=te;wr<Nr.length;wr+=1){var pr=Nr[wr],mt=this._addTile(pr);je[pr.key]=pr,!mt.hasData()&&ye<this._source.maxzoom&&(qt[pr.key]=pr)}this._retainLoadedChildren(qt,ye,vt,je);for(var St=0,Ft=te;St<Ft.length;St+=1){var rr=Ft[St],hr=this._tiles[rr.key];if(!hr.hasData()){if(ye+1>this._source.maxzoom){var nr=rr.children(this._source.maxzoom)[0],dr=this.getTile(nr);if(dr&&dr.hasData()){je[nr.key]=nr;continue}}else{var or=rr.children(this._source.maxzoom);if(je[or[0].key]&&je[or[1].key]&&je[or[2].key]&&je[or[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Vt=rr.scaledTo(ir);if(ke[Vt.key]||(ke[Vt.key]=!0,hr=this.getTile(Vt),!hr&&Wt&&(hr=this._addTile(Vt)),hr&&(je[Vt.key]=Vt,Wt=hr.wasRequested(),hr.hasData())))break}}}return je},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var te in this._tiles){for(var ye=[],je=void 0,ke=this._tiles[te].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){je=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(je=this._getLoadedTile(Qe),je)break;ke=Qe}for(var vt=0,qt=ye;vt<qt.length;vt+=1){var wr=qt[vt];this._loadedParentTiles[wr]=je}}},K.prototype._addTile=function(te){var ye=this._tiles[te.key];if(ye)return ye;ye=this._cache.getAndRemove(te),ye&&(this._setTileReloadTimer(te.key,ye),ye.tileID=te,this._state.initializeTileState(ye,this.map?this.map.painter:null),this._cacheTimers[te.key]&&(clearTimeout(this._cacheTimers[te.key]),delete this._cacheTimers[te.key],this._setTileReloadTimer(te.key,ye)));var je=!!ye;return je||(ye=new e.Tile(te,this._source.tileSize*te.overscaleFactor()),this._loadTile(ye,this._tileLoaded.bind(this,ye,te.key,ye.state))),ye?(ye.uses++,this._tiles[te.key]=ye,je||this._source.fire(new e.Event("dataloading",{tile:ye,coord:ye.tileID,dataType:"source"})),ye):null},K.prototype._setTileReloadTimer=function(te,ye){var je=this;te in this._timers&&(clearTimeout(this._timers[te]),delete this._timers[te]);var ke=ye.getExpiryTimeout();ke&&(this._timers[te]=setTimeout(function(){je._reloadTile(te,"expired"),delete je._timers[te]},ke))},K.prototype._removeTile=function(te){var ye=this._tiles[te];ye&&(ye.uses--,delete this._tiles[te],this._timers[te]&&(clearTimeout(this._timers[te]),delete this._timers[te]),!(ye.uses>0)&&(ye.hasData()&&ye.state!=="reloading"?this._cache.add(ye.tileID,ye,ye.getExpiryTimeout()):(ye.aborted=!0,this._abortTile(ye),this._unloadTile(ye))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var te in this._tiles)this._removeTile(te);this._cache.reset()},K.prototype.tilesIn=function(te,ye,je){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=je?vt.getCameraQueryGeometry(te):te,wr=te.map(function(ir){return vt.pointCoordinate(ir)}),Nr=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,St=1/0,Ft=-1/0,rr=-1/0,hr=0,nr=Nr;hr<nr.length;hr+=1){var dr=nr[hr];mt=Math.min(mt,dr.x),St=Math.min(St,dr.y),Ft=Math.max(Ft,dr.x),rr=Math.max(rr,dr.y)}for(var or=function(ir){var Vt=ke._tiles[pr[ir]];if(!Vt.holdingForFade()){var Dr=Vt.tileID,Jr=Math.pow(2,vt.zoom-Vt.tileID.overscaledZ),ga=ye*Vt.queryPadding*e.EXTENT/Vt.tileSize/Jr,vi=[Dr.getTilePoint(new e.MercatorCoordinate(mt,St)),Dr.getTilePoint(new e.MercatorCoordinate(Ft,rr))];if(vi[0].x-ga<e.EXTENT&&vi[0].y-ga<e.EXTENT&&vi[1].x+ga>=0&&vi[1].y+ga>=0){var Ga=wr.map(function(Zi){return Dr.getTilePoint(Zi)}),ai=Nr.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Vt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Wt=0;Wt<pr.length;Wt++)or(Wt);return Qe},K.prototype.getVisibleCoordinates=function(te){for(var ye=this,je=this.getRenderableIds(te).map(function(qt){return ye._tiles[qt].tileID}),ke=0,Qe=je;ke<Qe.length;ke+=1){var vt=Qe[ke];vt.posMatrix=this.transform.calculatePosMatrix(vt.toUnwrapped())}return je},K.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ba(this._source.type))for(var te in this._tiles){var ye=this._tiles[te];if(ye.fadeEndTime!==void 0&&ye.fadeEndTime>=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(te,ye,je){te=te||"_geojsonTileLayer",this._state.updateState(te,ye,je)},K.prototype.removeFeatureState=function(te,ye,je){te=te||"_geojsonTileLayer",this._state.removeFeatureState(te,ye,je)},K.prototype.getFeatureState=function(te,ye){return te=te||"_geojsonTileLayer",this._state.getState(te,ye)},K.prototype.setDependencies=function(te,ye,je){var ke=this._tiles[te];ke&&ke.setDependencies(ye,je)},K.prototype.reloadTilesForDependencies=function(te,ye){for(var je in this._tiles){var ke=this._tiles[je];ke.hasDependency(te,ye)&&this._reloadTile(je,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(te,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),te=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||te-xe||K.canonical.y-ge.canonical.y||K.canonical.x-ge.canonical.x}function Ba(ge){return ge==="raster"||ge==="image"||ge==="video"}function $a(){return new e.window.Worker(Po.workerUrl)}var Za="mapboxgl_preloaded_worker_pool",ri=function(){this.active={}};ri.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length<ri.workerCount;)this.workers.push(new $a);return this.active[K]=!0,this.workers.slice()},ri.prototype.release=function(K){delete this.active[K],this.numActive()===0&&(this.workers.forEach(function(xe){xe.terminate()}),this.workers=null)},ri.prototype.isPreloaded=function(){return!!this.active[Za]},ri.prototype.numActive=function(){return Object.keys(this.active).length};var pi=Math.floor(e.browser.hardwareConcurrency/2);ri.workerCount=Math.max(Math.min(pi,6),1);var Ra;function an(){return Ra||(Ra=new ri),Ra}function tn(){var ge=an();ge.acquire(Za)}function fn(){var ge=Ra;ge&&(ge.isPreloaded()&&ge.numActive()===1?(ge.release(Za),Ra=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()"))}function xt(ge,K){var xe={};for(var te in ge)te!=="ref"&&(xe[te]=ge[te]);return e.refProperties.forEach(function(ye){ye in K&&(xe[ye]=K[ye])}),xe}function lt(ge){ge=ge.slice();for(var K=Object.create(null),xe=0;xe<ge.length;xe++)K[ge[xe].id]=ge[xe];for(var te=0;te<ge.length;te++)"ref"in ge[te]&&(ge[te]=xt(ge[te],K[ge[te].ref]));return ge}function Br(){var ge={},K=e.styleSpec.$version;for(var xe in e.styleSpec.$root){var te=e.styleSpec.$root[xe];if(te.required){var ye=null;xe==="version"?ye=K:te.type==="array"?ye=[]:ye={},ye!=null&&(ge[xe]=ye)}}return ge}var Cr={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function xr(ge,K,xe){xe.push({command:Cr.addSource,args:[ge,K[ge]]})}function Rr(ge,K,xe){K.push({command:Cr.removeSource,args:[ge]}),xe[ge]=!0}function Ur(ge,K,xe,te){Rr(ge,xe,te),xr(ge,K,xe)}function Hr(ge,K,xe){var te;for(te in ge[xe])if(ge[xe].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ge[xe][te],K[xe][te]))return!1;for(te in K[xe])if(K[xe].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ge[xe][te],K[xe][te]))return!1;return!0}function gt(ge,K,xe,te){ge=ge||{},K=K||{};var ye;for(ye in ge)ge.hasOwnProperty(ye)&&(K.hasOwnProperty(ye)||Rr(ye,xe,te));for(ye in K)K.hasOwnProperty(ye)&&(ge.hasOwnProperty(ye)?e.deepEqual(ge[ye],K[ye])||(ge[ye].type==="geojson"&&K[ye].type==="geojson"&&Hr(ge,K,ye)?xe.push({command:Cr.setGeoJSONSourceData,args:[ye,K[ye].data]}):Ur(ye,K,xe,te)):xr(ye,K,xe))}function Xt(ge,K,xe,te,ye,je){ge=ge||{},K=K||{};var ke;for(ke in ge)ge.hasOwnProperty(ke)&&(e.deepEqual(ge[ke],K[ke])||xe.push({command:je,args:[te,ke,K[ke],ye]}));for(ke in K)!K.hasOwnProperty(ke)||ge.hasOwnProperty(ke)||e.deepEqual(ge[ke],K[ke])||xe.push({command:je,args:[te,ke,K[ke],ye]})}function vr(ge){return ge.id}function Or(ge,K){return ge[K.id]=K,ge}function ba(ge,K,xe){ge=ge||[],K=K||[];var te=ge.map(vr),ye=K.map(vr),je=ge.reduce(Or,{}),ke=K.reduce(Or,{}),Qe=te.slice(),vt=Object.create(null),qt,wr,Nr,pr,mt,St,Ft;for(qt=0,wr=0;qt<te.length;qt++)Nr=te[qt],ke.hasOwnProperty(Nr)?wr++:(xe.push({command:Cr.removeLayer,args:[Nr]}),Qe.splice(Qe.indexOf(Nr,wr),1));for(qt=0,wr=0;qt<ye.length;qt++)Nr=ye[ye.length-1-qt],Qe[Qe.length-1-qt]!==Nr&&(je.hasOwnProperty(Nr)?(xe.push({command:Cr.removeLayer,args:[Nr]}),Qe.splice(Qe.lastIndexOf(Nr,Qe.length-wr),1)):wr++,St=Qe[Qe.length-qt],xe.push({command:Cr.addLayer,args:[ke[Nr],St]}),Qe.splice(Qe.length-qt,0,Nr),vt[Nr]=!0);for(qt=0;qt<ye.length;qt++)if(Nr=ye[qt],pr=je[Nr],mt=ke[Nr],!(vt[Nr]||e.deepEqual(pr,mt))){if(!e.deepEqual(pr.source,mt.source)||!e.deepEqual(pr["source-layer"],mt["source-layer"])||!e.deepEqual(pr.type,mt.type)){xe.push({command:Cr.removeLayer,args:[Nr]}),St=Qe[Qe.lastIndexOf(Nr)+1],xe.push({command:Cr.addLayer,args:[mt,St]});continue}Xt(pr.layout,mt.layout,xe,Nr,null,Cr.setLayoutProperty),Xt(pr.paint,mt.paint,xe,Nr,null,Cr.setPaintProperty),e.deepEqual(pr.filter,mt.filter)||xe.push({command:Cr.setFilter,args:[Nr,mt.filter]}),(!e.deepEqual(pr.minzoom,mt.minzoom)||!e.deepEqual(pr.maxzoom,mt.maxzoom))&&xe.push({command:Cr.setLayerZoomRange,args:[Nr,mt.minzoom,mt.maxzoom]});for(Ft in pr)pr.hasOwnProperty(Ft)&&(Ft==="layout"||Ft==="paint"||Ft==="filter"||Ft==="metadata"||Ft==="minzoom"||Ft==="maxzoom"||(Ft.indexOf("paint.")===0?Xt(pr[Ft],mt[Ft],xe,Nr,Ft.slice(6),Cr.setPaintProperty):e.deepEqual(pr[Ft],mt[Ft])||xe.push({command:Cr.setLayerProperty,args:[Nr,Ft,mt[Ft]]})));for(Ft in mt)!mt.hasOwnProperty(Ft)||pr.hasOwnProperty(Ft)||Ft==="layout"||Ft==="paint"||Ft==="filter"||Ft==="metadata"||Ft==="minzoom"||Ft==="maxzoom"||(Ft.indexOf("paint.")===0?Xt(pr[Ft],mt[Ft],xe,Nr,Ft.slice(6),Cr.setPaintProperty):e.deepEqual(pr[Ft],mt[Ft])||xe.push({command:Cr.setLayerProperty,args:[Nr,Ft,mt[Ft]]}))}}function Pa(ge,K){if(!ge)return[{command:Cr.setStyle,args:[K]}];var xe=[];try{if(!e.deepEqual(ge.version,K.version))return[{command:Cr.setStyle,args:[K]}];e.deepEqual(ge.center,K.center)||xe.push({command:Cr.setCenter,args:[K.center]}),e.deepEqual(ge.zoom,K.zoom)||xe.push({command:Cr.setZoom,args:[K.zoom]}),e.deepEqual(ge.bearing,K.bearing)||xe.push({command:Cr.setBearing,args:[K.bearing]}),e.deepEqual(ge.pitch,K.pitch)||xe.push({command:Cr.setPitch,args:[K.pitch]}),e.deepEqual(ge.sprite,K.sprite)||xe.push({command:Cr.setSprite,args:[K.sprite]}),e.deepEqual(ge.glyphs,K.glyphs)||xe.push({command:Cr.setGlyphs,args:[K.glyphs]}),e.deepEqual(ge.transition,K.transition)||xe.push({command:Cr.setTransition,args:[K.transition]}),e.deepEqual(ge.light,K.light)||xe.push({command:Cr.setLight,args:[K.light]});var te={},ye=[];gt(ge.sources,K.sources,ye,te);var je=[];ge.layers&&ge.layers.forEach(function(ke){te[ke.source]?xe.push({command:Cr.removeLayer,args:[ke.id]}):je.push(ke)}),xe=xe.concat(ye),ba(je,K.layers,xe)}catch(ke){console.warn("Unable to compute style diff:",ke),xe=[{command:Cr.setStyle,args:[K]}]}return xe}var ma=function(K,xe){this.reset(K,xe)};ma.prototype.reset=function(K,xe){this.points=K||[],this._distances=[0];for(var te=1;te<this.points.length;te++)this._distances[te]=this._distances[te-1]+this.points[te].dist(this.points[te-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(xe||0,this.length*.5),this.paddedLength=this.length-this.padding*2},ma.prototype.lerp=function(K){if(this.points.length===1)return this.points[0];K=e.clamp(K,0,1);for(var xe=1,te=this._distances[xe],ye=K*this.paddedLength+this.padding;te<ye&&xe<this._distances.length;)te=this._distances[++xe];var je=xe-1,ke=this._distances[je],Qe=te-ke,vt=Qe>0?(ye-ke)/Qe:0;return this.points[je].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,te){var ye=this.boxCells=[],je=this.circleCells=[];this.xCellCount=Math.ceil(K/te),this.yCellCount=Math.ceil(xe/te);for(var ke=0;ke<this.xCellCount*this.yCellCount;ke++)ye.push([]),je.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=K,this.height=xe,this.xScale=this.xCellCount/K,this.yScale=this.yCellCount/xe,this.boxUid=0,this.circleUid=0};la.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},la.prototype.insert=function(K,xe,te,ye,je){this._forEachCell(xe,te,ye,je,this._insertBoxCell,this.boxUid++),this.boxKeys.push(K),this.bboxes.push(xe),this.bboxes.push(te),this.bboxes.push(ye),this.bboxes.push(je)},la.prototype.insertCircle=function(K,xe,te,ye){this._forEachCell(xe-ye,te-ye,xe+ye,te+ye,this._insertCircleCell,this.circleUid++),this.circleKeys.push(K),this.circles.push(xe),this.circles.push(te),this.circles.push(ye)},la.prototype._insertBoxCell=function(K,xe,te,ye,je,ke){this.boxCells[je].push(ke)},la.prototype._insertCircleCell=function(K,xe,te,ye,je,ke){this.circleCells[je].push(ke)},la.prototype._query=function(K,xe,te,ye,je,ke){if(te<0||K>this.width||ye<0||xe>this.height)return je?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=te&&this.height<=ye){if(je)return!0;for(var vt=0;vt<this.boxKeys.length;vt++)Qe.push({key:this.boxKeys[vt],x1:this.bboxes[vt*4],y1:this.bboxes[vt*4+1],x2:this.bboxes[vt*4+2],y2:this.bboxes[vt*4+3]});for(var qt=0;qt<this.circleKeys.length;qt++){var wr=this.circles[qt*3],Nr=this.circles[qt*3+1],pr=this.circles[qt*3+2];Qe.push({key:this.circleKeys[qt],x1:wr-pr,y1:Nr-pr,x2:wr+pr,y2:Nr+pr})}return ke?Qe.filter(ke):Qe}else{var mt={hitTest:je,seenUids:{box:{},circle:{}}};return this._forEachCell(K,xe,te,ye,this._queryCell,Qe,mt,ke),je?Qe.length>0:Qe}},la.prototype._queryCircle=function(K,xe,te,ye,je){var ke=K-te,Qe=K+te,vt=xe-te,qt=xe+te;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var wr=[],Nr={hitTest:ye,circle:{x:K,y:xe,radius:te},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,wr,Nr,je),ye?wr.length>0:wr},la.prototype.query=function(K,xe,te,ye,je){return this._query(K,xe,te,ye,!1,je)},la.prototype.hitTest=function(K,xe,te,ye,je){return this._query(K,xe,te,ye,!0,je)},la.prototype.hitTestCircle=function(K,xe,te,ye){return this._queryCircle(K,xe,te,!0,ye)},la.prototype._queryCell=function(K,xe,te,ye,je,ke,Qe,vt){var qt=Qe.seenUids,wr=this.boxCells[je];if(wr!==null)for(var Nr=this.bboxes,pr=0,mt=wr;pr<mt.length;pr+=1){var St=mt[pr];if(!qt.box[St]){qt.box[St]=!0;var Ft=St*4;if(K<=Nr[Ft+2]&&xe<=Nr[Ft+3]&&te>=Nr[Ft+0]&&ye>=Nr[Ft+1]&&(!vt||vt(this.boxKeys[St]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[St],x1:Nr[Ft],y1:Nr[Ft+1],x2:Nr[Ft+2],y2:Nr[Ft+3]})}}}var rr=this.circleCells[je];if(rr!==null)for(var hr=this.circles,nr=0,dr=rr;nr<dr.length;nr+=1){var or=dr[nr];if(!qt.circle[or]){qt.circle[or]=!0;var Wt=or*3;if(this._circleAndRectCollide(hr[Wt],hr[Wt+1],hr[Wt+2],K,xe,te,ye)&&(!vt||vt(this.circleKeys[or]))){if(Qe.hitTest)return ke.push(!0),!0;var ir=hr[Wt],Vt=hr[Wt+1],Dr=hr[Wt+2];ke.push({key:this.circleKeys[or],x1:ir-Dr,y1:Vt-Dr,x2:ir+Dr,y2:Vt+Dr})}}}},la.prototype._queryCellCircle=function(K,xe,te,ye,je,ke,Qe,vt){var qt=Qe.circle,wr=Qe.seenUids,Nr=this.boxCells[je];if(Nr!==null)for(var pr=this.bboxes,mt=0,St=Nr;mt<St.length;mt+=1){var Ft=St[mt];if(!wr.box[Ft]){wr.box[Ft]=!0;var rr=Ft*4;if(this._circleAndRectCollide(qt.x,qt.y,qt.radius,pr[rr+0],pr[rr+1],pr[rr+2],pr[rr+3])&&(!vt||vt(this.boxKeys[Ft])))return ke.push(!0),!0}}var hr=this.circleCells[je];if(hr!==null)for(var nr=this.circles,dr=0,or=hr;dr<or.length;dr+=1){var Wt=or[dr];if(!wr.circle[Wt]){wr.circle[Wt]=!0;var ir=Wt*3;if(this._circlesCollide(nr[ir],nr[ir+1],nr[ir+2],qt.x,qt.y,qt.radius)&&(!vt||vt(this.circleKeys[Wt])))return ke.push(!0),!0}}},la.prototype._forEachCell=function(K,xe,te,ye,je,ke,Qe,vt){for(var qt=this._convertToXCellCoord(K),wr=this._convertToYCellCoord(xe),Nr=this._convertToXCellCoord(te),pr=this._convertToYCellCoord(ye),mt=qt;mt<=Nr;mt++)for(var St=wr;St<=pr;St++){var Ft=this.xCellCount*St+mt;if(je.call(this,K,xe,te,ye,Ft,ke,Qe,vt))return}},la.prototype._convertToXCellCoord=function(K){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(K*this.xScale)))},la.prototype._convertToYCellCoord=function(K){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(K*this.yScale)))},la.prototype._circlesCollide=function(K,xe,te,ye,je,ke){var Qe=ye-K,vt=je-xe,qt=te+ke;return qt*qt>Qe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,te,ye,je,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+te)return!1;var wr=(Qe-je)/2,Nr=Math.abs(xe-(je+wr));if(Nr>wr+te)return!1;if(qt<=vt||Nr<=wr)return!0;var pr=qt-vt,mt=Nr-wr;return pr*pr+mt*mt<=te*te};function _a(ge,K,xe,te,ye){var je=e.create();return K?(e.scale(je,je,[1/ye,1/ye,1]),xe||e.rotateZ(je,je,te.angle)):e.multiply(je,te.labelPlaneMatrix,ge),je}function Ai(ge,K,xe,te,ye){if(K){var je=e.clone(ge);return e.scale(je,je,[ye,ye,1]),xe||e.rotateZ(je,je,-te.angle),je}else return te.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];Ao(xe,xe,K);var te=xe[3];return{point:new e.Point(xe[0]/te,xe[1]/te),signedDistanceFromCamera:te}}function Ki(ge,K){return .5+.5*(ge/K)}function yn(ge,K){var xe=ge[0]/ge[3],te=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&te>=-K[1]&&te<=K[1];return ye}function Ln(ge,K,xe,te,ye,je,ke,Qe){var vt=te?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),wr=[256/xe.width*2+1,256/xe.height*2+1],Nr=te?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Nr.clear();for(var pr=ge.lineVertexArray,mt=te?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,St=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rr<mt.length;rr++){var hr=mt.get(rr);if(hr.hidden||hr.writingMode===e.WritingMode.vertical&&!Ft){Mn(hr.numGlyphs,Nr);continue}Ft=!1;var nr=[hr.anchorX,hr.anchorY,0,1];if(e.transformMat4(nr,nr,K),!yn(nr,wr)){Mn(hr.numGlyphs,Nr);continue}var dr=nr[3],or=Ki(xe.transform.cameraToCenterDistance,dr),Wt=e.evaluateSizeForFeature(vt,qt,hr),ir=ke?Wt/or:Wt*or,Vt=new e.Point(hr.anchorX,hr.anchorY),Dr=ki(Vt,ye).point,Jr={},ga=ao(hr,ir,!1,Qe,K,ye,je,ge.glyphOffsetArray,pr,Nr,Dr,Vt,Jr,St);Ft=ga.useVertical,(ga.notEnoughRoom||Ft||ga.needsFlipping&&ao(hr,ir,!0,Qe,K,ye,je,ge.glyphOffsetArray,pr,Nr,Dr,Vt,Jr,St).notEnoughRoom)&&Mn(hr.numGlyphs,Nr)}te?ge.text.dynamicLayoutVertexBuffer.updateData(Nr):ge.icon.dynamicLayoutVertexBuffer.updateData(Nr)}function kn(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr){var Nr=Qe.glyphStartIndex+Qe.numGlyphs,pr=Qe.lineStartIndex,mt=Qe.lineStartIndex+Qe.lineLength,St=K.getoffsetX(Qe.glyphStartIndex),Ft=K.getoffsetX(Nr-1),rr=Co(ge*St,xe,te,ye,je,ke,Qe.segment,pr,mt,vt,qt,wr);if(!rr)return null;var hr=Co(ge*Ft,xe,te,ye,je,ke,Qe.segment,pr,mt,vt,qt,wr);return hr?{first:rr,last:hr}:null}function Bn(ge,K,xe,te){if(ge===e.WritingMode.horizontal){var ye=Math.abs(xe.y-K.y),je=Math.abs(xe.x-K.x)*te;if(ye>je)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.y<xe.y:K.x>xe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr,pr,mt){var St=K/24,Ft=ge.lineOffsetX*St,rr=ge.lineOffsetY*St,hr;if(ge.numGlyphs>1){var nr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,or=ge.lineStartIndex+ge.lineLength,Wt=kn(St,Qe,Ft,rr,xe,wr,Nr,ge,vt,je,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Vt=ki(Wt.last.point,ke).point;if(te&&!xe){var Dr=Bn(ge.writingMode,ir,Vt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr<nr-1;Jr++)hr.push(Co(St*Qe.getoffsetX(Jr),Ft,rr,xe,wr,Nr,ge.segment,dr,or,vt,je,pr));hr.push(Wt.last)}else{if(te&&!xe){var ga=ki(Nr,ye).point,vi=ge.lineStartIndex+ge.segment+1,Ga=new e.Point(vt.getx(vi),vt.gety(vi)),ai=ki(Ga,ye),Zi=ai.signedDistanceFromCamera>0?ai.point:xo(Nr,Ga,ga,1,ye),Fi=Bn(ge.writingMode,ga,Zi,mt);if(Fi)return Fi}var ui=Co(St*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,wr,Nr,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,je,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i<Si.length;_i+=1){var Ui=Si[_i];e.addDynamicAttributes(qt,Ui.point,Ui.angle)}return{}}function xo(ge,K,xe,te,ye){var je=ki(ge.add(ge.sub(K)._unit()),ye).point,ke=xe.sub(je);return xe.add(ke._mult(te/ke.mag()))}function Co(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr){var pr=te?ge-K:ge+K,mt=pr>0?1:-1,St=0;te&&(mt*=-1,St=Math.PI),mt<0&&(St+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,nr=0,dr=0,or=Math.abs(pr),Wt=[];nr+dr<=or;){if(Ft+=mt,Ft<Qe||Ft>=vt)return null;if(hr=rr,Wt.push(rr),rr=Nr[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Vt=ki(ir,wr);if(Vt.signedDistanceFromCamera>0)rr=Nr[Ft]=Vt.point;else{var Dr=Ft-mt,Jr=nr===0?je:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=xo(Jr,ir,hr,or-nr+1,wr)}}nr+=dr,dr=hr.dist(rr)}var ga=(or-nr)/dr,vi=rr.sub(hr),Ga=vi.mult(ga)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ai=St+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ai,path:Wt}}var Fs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Mn(ge,K){for(var xe=0;xe<ge;xe++){var te=K.length;K.resize(te+4),K.float32.set(Fs,te*3)}}function Ao(ge,K,xe){var te=K[0],ye=K[1];return ge[0]=xe[0]*te+xe[4]*ye+xe[12],ge[1]=xe[1]*te+xe[5]*ye+xe[13],ge[3]=xe[3]*te+xe[7]*ye+xe[15],ge}var On=100,ts=function(K,xe,te){xe===void 0&&(xe=new la(K.width+2*On,K.height+2*On,25)),te===void 0&&(te=new la(K.width+2*On,K.height+2*On,25)),this.transform=K,this.grid=xe,this.ignoredGrid=te,this.pitchfactor=Math.cos(K._pitch)*K.cameraToCenterDistance,this.screenRightBoundary=K.width+On,this.screenBottomBoundary=K.height+On,this.gridRightBoundary=K.width+2*On,this.gridBottomBoundary=K.height+2*On};ts.prototype.placeCollisionBox=function(K,xe,te,ye,je){var ke=this.projectAndGetPerspectiveRatio(ye,K.anchorPointX,K.anchorPointY),Qe=te*ke.perspectiveRatio,vt=K.x1*Qe+ke.point.x,qt=K.y1*Qe+ke.point.y,wr=K.x2*Qe+ke.point.x,Nr=K.y2*Qe+ke.point.y;return!this.isInsideGrid(vt,qt,wr,Nr)||!xe&&this.grid.hitTest(vt,qt,wr,Nr,je)?{box:[],offscreen:!1}:{box:[vt,qt,wr,Nr],offscreen:this.isOffscreen(vt,qt,wr,Nr)}},ts.prototype.placeCollisionCircles=function(K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr,pr,mt){var St=[],Ft=new e.Point(xe.anchorX,xe.anchorY),rr=ki(Ft,ke),hr=Ki(this.transform.cameraToCenterDistance,rr.signedDistanceFromCamera),nr=wr?je/hr:je*hr,dr=nr/e.ONE_EM,or=ki(Ft,Qe).point,Wt={},ir=xe.lineOffsetX*dr,Vt=xe.lineOffsetY*dr,Dr=kn(dr,ye,ir,Vt,!1,or,Ft,xe,te,Qe,Wt),Jr=!1,ga=!1,vi=!0;if(Dr){for(var Ga=pr*.5*hr+mt,ai=new e.Point(-On,-On),Zi=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),Fi=new ma,ui=Dr.first,_i=Dr.last,Si=[],Ui=ui.path.length-1;Ui>=1;Ui--)Si.push(ui.path[Ui]);for(var cn=1;cn<_i.path.length;cn++)Si.push(_i.path[cn]);var yo=Ga*2.5;if(vt){var Uo=Si.map(function(Lp){return ki(Lp,vt)});Uo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Uo.map(function(Lp){return Lp.point})}var Is=[];if(Si.length>0){for(var Fo=Si[0].clone(),Es=Si[0].clone(),Ks=1;Ks<Si.length;Ks++)Fo.x=Math.min(Fo.x,Si[Ks].x),Fo.y=Math.min(Fo.y,Si[Ks].y),Es.x=Math.max(Es.x,Si[Ks].x),Es.y=Math.max(Es.y,Si[Ks].y);Fo.x>=ai.x&&Es.x<=Zi.x&&Fo.y>=ai.y&&Es.y<=Zi.y?Is=[Si]:Es.x<ai.x||Fo.x>Zi.x||Es.y<ai.y||Fo.y>Zi.y?Is=[]:Is=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Is;mu<Ep.length;mu+=1){var kp=Ep[mu];Fi.reset(kp,Ga*.25);var Ph=0;Fi.length<=.5*Ga?Ph=1:Ph=Math.ceil(Fi.paddedLength/yo)+1;for(var qp=0;qp<Ph;qp++){var qd=qp/Math.max(Ph-1,1),ed=Fi.lerp(qd),Ih=ed.x+On,td=ed.y+On;St.push(Ih,td,Ga,0);var Kh=Ih-Ga,Rh=td-Ga,Cp=Ih+Ga,Vp=td+Ga;if(vi=vi&&this.isOffscreen(Kh,Rh,Cp,Vp),ga=ga||this.isInsideGrid(Kh,Rh,Cp,Vp),!K&&this.grid.hitTestCircle(Ih,td,Ga,Nr)&&(Jr=!0,!qt))return{circles:[],offscreen:!1,collisionDetected:Jr}}}}return{circles:!qt&&Jr||!ga?[]:St,offscreen:vi,collisionDetected:Jr}},ts.prototype.queryRenderedSymbols=function(K){if(K.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var xe=[],te=1/0,ye=1/0,je=-1/0,ke=-1/0,Qe=0,vt=K;Qe<vt.length;Qe+=1){var qt=vt[Qe],wr=new e.Point(qt.x+On,qt.y+On);te=Math.min(te,wr.x),ye=Math.min(ye,wr.y),je=Math.max(je,wr.x),ke=Math.max(ke,wr.y),xe.push(wr)}for(var Nr=this.grid.query(te,ye,je,ke).concat(this.ignoredGrid.query(te,ye,je,ke)),pr={},mt={},St=0,Ft=Nr;St<Ft.length;St+=1){var rr=Ft[St],hr=rr.key;if(pr[hr.bucketInstanceId]===void 0&&(pr[hr.bucketInstanceId]={}),!pr[hr.bucketInstanceId][hr.featureIndex]){var nr=[new e.Point(rr.x1,rr.y1),new e.Point(rr.x2,rr.y1),new e.Point(rr.x2,rr.y2),new e.Point(rr.x1,rr.y2)];e.polygonIntersectsPolygon(xe,nr)&&(pr[hr.bucketInstanceId][hr.featureIndex]=!0,mt[hr.bucketInstanceId]===void 0&&(mt[hr.bucketInstanceId]=[]),mt[hr.bucketInstanceId].push(hr.featureIndex))}}return mt},ts.prototype.insertCollisionBox=function(K,xe,te,ye,je){var ke=xe?this.ignoredGrid:this.grid,Qe={bucketInstanceId:te,featureIndex:ye,collisionGroupID:je};ke.insert(Qe,K[0],K[1],K[2],K[3])},ts.prototype.insertCollisionCircles=function(K,xe,te,ye,je){for(var ke=xe?this.ignoredGrid:this.grid,Qe={bucketInstanceId:te,featureIndex:ye,collisionGroupID:je},vt=0;vt<K.length;vt+=4)ke.insertCircle(Qe,K[vt],K[vt+1],K[vt+2])},ts.prototype.projectAndGetPerspectiveRatio=function(K,xe,te){var ye=[xe,te,0,1];Ao(ye,ye,K);var je=new e.Point((ye[0]/ye[3]+1)/2*this.transform.width+On,(-ye[1]/ye[3]+1)/2*this.transform.height+On);return{point:je,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/ye[3])}},ts.prototype.isOffscreen=function(K,xe,te,ye){return te<On||K>=this.screenRightBoundary||ye<On||xe>this.screenBottomBoundary},ts.prototype.isInsideGrid=function(K,xe,te,ye){return te>=0&&K<this.gridRightBoundary&&ye>=0&&xe<this.gridBottomBoundary},ts.prototype.getViewportMatrix=function(){var K=e.identity([]);return e.translate(K,K,[-On,-On,0]),K};function is(ge,K,xe){return K*(e.EXTENT/(ge.tileSize*Math.pow(2,xe-ge.tileID.overscaledZ)))}var _s=function(K,xe,te,ye){K?this.opacity=Math.max(0,Math.min(1,K.opacity+(K.placed?xe:-xe))):this.opacity=ye&&te?1:0,this.placed=te};_s.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Oo=function(K,xe,te,ye,je){this.text=new _s(K?K.text:null,xe,te,je),this.icon=new _s(K?K.icon:null,xe,ye,je)};Oo.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var io=function(K,xe,te){this.text=K,this.icon=xe,this.skipFade=te},Gn=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},eo=function(K,xe,te,ye,je){this.bucketInstanceId=K,this.featureIndex=xe,this.sourceLayerIndex=te,this.bucketIndex=ye,this.tileID=je},ns=function(K){this.crossSourceCollisions=K,this.maxGroupID=0,this.collisionGroups={}};ns.prototype.get=function(K){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[K]){var xe=++this.maxGroupID;this.collisionGroups[K]={ID:xe,predicate:function(te){return te.collisionGroupID===xe}}}return this.collisionGroups[K]};function gs(ge,K,xe,te,ye){var je=e.getAnchorAlignment(ge),ke=je.horizontalAlign,Qe=je.verticalAlign,vt=-(ke-.5)*K,qt=-(Qe-.5)*xe,wr=e.evaluateVariableOffset(ge,te);return new e.Point(vt+wr[0]*ye,qt+wr[1]*ye)}function Ls(ge,K,xe,te,ye,je){var ke=ge.x1,Qe=ge.x2,vt=ge.y1,qt=ge.y2,wr=ge.anchorPointX,Nr=ge.anchorPointY,pr=new e.Point(K,xe);return te&&pr._rotate(ye?je:-je),{x1:ke+pr.x,y1:vt+pr.y,x2:Qe+pr.x,y2:qt+pr.y,anchorPointX:wr,anchorPointY:Nr}}var Xo=function(K,xe,te,ye){this.transform=K.clone(),this.collisionIndex=new ts(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=xe,this.retainedQueryData={},this.collisionGroups=new ns(te),this.collisionCircleArrays={},this.prevPlacement=ye,ye&&(ye.prevPlacement=void 0),this.placedOrientations={}};Xo.prototype.getBucketParts=function(K,xe,te,ye){var je=te.getBucket(xe),ke=te.latestFeatureIndex;if(!(!je||!ke||xe.id!==je.layerIds[0])){var Qe=te.collisionBoxArray,vt=je.layers[0].layout,qt=Math.pow(2,this.transform.zoom-te.tileID.overscaledZ),wr=te.tileSize/e.EXTENT,Nr=this.transform.calculatePosMatrix(te.tileID.toUnwrapped()),pr=vt.get("text-pitch-alignment")==="map",mt=vt.get("text-rotation-alignment")==="map",St=is(te,1,this.transform.zoom),Ft=_a(Nr,pr,mt,this.transform,St),rr=null;if(pr){var hr=Ai(Nr,pr,mt,this.transform,St);rr=e.multiply([],this.transform.labelPlaneMatrix,hr)}this.retainedQueryData[je.bucketInstanceId]=new eo(je.bucketInstanceId,ke,je.sourceLayerIndex,je.index,te.tileID);var nr={bucket:je,layout:vt,posMatrix:Nr,textLabelPlaneMatrix:Ft,labelToScreenMatrix:rr,scale:qt,textPixelRatio:wr,holdingForFade:te.holdingForFade(),collisionBoxArray:Qe,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(je.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(je.sourceID)};if(ye)for(var dr=0,or=je.sortKeyRanges;dr<or.length;dr+=1){var Wt=or[dr],ir=Wt.sortKey,Vt=Wt.symbolInstanceStart,Dr=Wt.symbolInstanceEnd;K.push({sortKey:ir,symbolInstanceStart:Vt,symbolInstanceEnd:Dr,parameters:nr})}else K.push({symbolInstanceStart:0,symbolInstanceEnd:je.symbolInstances.length,parameters:nr})}},Xo.prototype.attemptAnchorPlacement=function(K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr,pr,mt,St,Ft){var rr=[pr.textOffset0,pr.textOffset1],hr=gs(K,te,ye,rr,je),nr=this.collisionIndex.placeCollisionBox(Ls(xe,hr.x,hr.y,ke,Qe,this.transform.angle),Nr,vt,qt,wr.predicate);if(Ft){var dr=this.collisionIndex.placeCollisionBox(Ls(Ft,hr.x,hr.y,ke,Qe,this.transform.angle),Nr,vt,qt,wr.predicate);if(dr.box.length===0)return}if(nr.box.length>0){var or;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(or=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:te,height:ye,anchor:K,textBoxScale:je,prevAnchor:or},this.markUsedJustification(mt,K,pr,St),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,St,pr),this.placedOrientations[pr.crossTileID]=St),{shift:hr,placedGlyphBoxes:nr}}},Xo.prototype.placeLayerBucketPart=function(K,xe,te){var ye=this,je=K.parameters,ke=je.bucket,Qe=je.layout,vt=je.posMatrix,qt=je.textLabelPlaneMatrix,wr=je.labelToScreenMatrix,Nr=je.textPixelRatio,pr=je.holdingForFade,mt=je.collisionBoxArray,St=je.partiallyEvaluatedTextSize,Ft=je.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),nr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),or=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Vt=Qe.get("symbol-z-order")==="viewport-y",Dr=nr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(nr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ga=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new io(!1,!1,!1);return}var Si=!1,Ui=!1,cn=!0,yo=null,Uo={box:null,offscreen:null},Is={box:null,offscreen:null},Fo=null,Es=null,Ks=null,mu=0,Ep=0,kp=0;_i.textFeatureIndex?mu=_i.textFeatureIndex:ui.useRuntimeCollisionCircles&&(mu=ui.featureIndex),_i.verticalTextFeatureIndex&&(Ep=_i.verticalTextFeatureIndex);var Ph=_i.textBox;if(Ph){var qp=function(cc){var fu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,fu=Dh,ye.markUsedOrientation(ke,fu,ui))}return fu},qd=function(cc,fu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Iv=ke.writingModes;Dh<Iv.length;Dh+=1){var sm=Iv[Dh];if(sm===e.WritingMode.vertical?(Uo=fu(),Is=Uo):Uo=cc(),Uo&&Uo.box&&Uo.box.length)break}else Uo=cc()};if(Qe.get("text-variable-anchor")){var Kh=Qe.get("text-variable-anchor");if(ye.prevPlacement&&ye.prevPlacement.variableOffsets[ui.crossTileID]){var Rh=ye.prevPlacement.variableOffsets[ui.crossTileID];Kh.indexOf(Rh.anchor)>0&&(Kh=Kh.filter(function(cc){return cc!==Rh.anchor}),Kh.unshift(Rh.anchor))}var Cp=function(cc,fu,Dh){for(var Iv=cc.x2-cc.x1,sm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?fu:null,sv={box:[],offscreen:!1},xg=nr?Kh.length*2:Kh.length,Pp=0;Pp<xg;++Pp){var lv=Kh[Pp%Kh.length],bg=Pp>=Kh.length,T0=ye.attemptAnchorPlacement(lv,cc,Iv,sm,Mu,or,Wt,Nr,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,yo=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,fu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!fu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,cn=Uo.offscreen);var Cv=qp(Uo&&Uo.box);if(!Si&&ye.prevPlacement){var Vd=ye.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(ye.variableOffsets[ui.crossTileID]=Vd,ye.markUsedJustification(ke,Vd.anchor,ui,Cv))}}else{var ed=function(cc,fu){var Dh=ye.collisionIndex.placeCollisionBox(cc,nr,Nr,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,fu,ui),ye.placedOrientations[ui.crossTileID]=fu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Uo&&Uo.box&&Uo.box.length)}}if(Fo=Uo,Si=Fo&&Fo.box&&Fo.box.length>0,cn=Fo&&Fo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,St,Gf),Lv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Es=ye.collisionIndex.placeCollisionCircles(nr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,wr,te,Wt,Ft.predicate,ph,Lv),Si=nr||Es.circles.length>0&&!Es.collisionDetected,cn=cn&&Es.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var fu=ir&&yo?Ls(cc,yo.x,yo.y,or,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(fu,dr,Nr,vt,Ft.predicate)};Is&&Is.box&&Is.box.length&&_i.verticalIconBox?(Ks=iv(_i.verticalIconBox),Ui=Ks.box.length>0):(Ks=iv(_i.iconBox),Ui=Ks.box.length>0),cn=cn&&Ks.offscreen}var nm=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,om=hr||ui.numIconVertices===0;if(!nm&&!om?Ui=Si=Ui&&Si:om?nm||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Fo&&Fo.box&&(Is&&Is.box&&Ep?ye.collisionIndex.insertCollisionBox(Fo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Fo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ks&&ye.collisionIndex.insertCollisionBox(Ks.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Es&&(Si&&ye.collisionIndex.insertCollisionCircles(Es.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),te)){var Pv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Pv];nv===void 0&&(nv=ye.collisionCircleArrays[Pv]=new Gn);for(var ov=0;ov<Es.circles.length;ov+=4)nv.circles.push(Es.circles[ov+0]),nv.circles.push(Es.circles[ov+1]),nv.circles.push(Es.circles[ov+2]),nv.circles.push(Es.collisionDetected?1:0)}ye.placements[ui.crossTileID]=new io(Si||Dr,Ui||Jr,cn||ke.justReloaded),xe[ui.crossTileID]=!0}};if(Vt)for(var vi=ke.getSortedSymbolIndexes(this.transform.angle),Ga=vi.length-1;Ga>=0;--Ga){var ai=vi[Ga];ga(ke.symbolInstances.get(ai),ke.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi<K.symbolInstanceEnd;Zi++)ga(ke.symbolInstances.get(Zi),ke.collisionArrays[Zi]);if(te&&ke.bucketInstanceId in this.collisionCircleArrays){var Fi=this.collisionCircleArrays[ke.bucketInstanceId];e.invert(Fi.invProjMatrix,vt),Fi.viewportMatrix=this.collisionIndex.getViewportMatrix()}ke.justReloaded=!1},Xo.prototype.markUsedJustification=function(K,xe,te,ye){var je={left:te.leftJustifiedTextSymbolIndex,center:te.centerJustifiedTextSymbolIndex,right:te.rightJustifiedTextSymbolIndex},ke;ye===e.WritingMode.vertical?ke=te.verticalPlacedTextSymbolIndex:ke=je[e.getAnchorJustification(xe)];for(var Qe=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex,te.verticalPlacedTextSymbolIndex],vt=0,qt=Qe;vt<qt.length;vt+=1){var wr=qt[vt];wr>=0&&(ke>=0&&wr!==ke?K.text.placedSymbolArray.get(wr).crossTileID=0:K.text.placedSymbolArray.get(wr).crossTileID=te.crossTileID)}},Xo.prototype.markUsedOrientation=function(K,xe,te){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,je=xe===e.WritingMode.vertical?xe:0,ke=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe<vt.length;Qe+=1){var qt=vt[Qe];K.text.placedSymbolArray.get(qt).placedOrientation=ye}te.verticalPlacedTextSymbolIndex&&(K.text.placedSymbolArray.get(te.verticalPlacedTextSymbolIndex).placedOrientation=je)},Xo.prototype.commit=function(K){this.commitTime=K,this.zoomAtLastRecencyCheck=this.transform.zoom;var xe=this.prevPlacement,te=!1;this.prevZoomAdjustment=xe?xe.zoomAdjustment(this.transform.zoom):0;var ye=xe?xe.symbolFadeChange(K):1,je=xe?xe.opacities:{},ke=xe?xe.variableOffsets:{},Qe=xe?xe.placedOrientations:{};for(var vt in this.placements){var qt=this.placements[vt],wr=je[vt];wr?(this.opacities[vt]=new Oo(wr,ye,qt.text,qt.icon),te=te||qt.text!==wr.text.placed||qt.icon!==wr.icon.placed):(this.opacities[vt]=new Oo(null,ye,qt.text,qt.icon,qt.skipFade),te=te||qt.text||qt.icon)}for(var Nr in je){var pr=je[Nr];if(!this.opacities[Nr]){var mt=new Oo(pr,ye,!1,!1);mt.isHidden()||(this.opacities[Nr]=mt,te=te||pr.text.placed||pr.icon.placed)}}for(var St in ke)!this.variableOffsets[St]&&this.opacities[St]&&!this.opacities[St].isHidden()&&(this.variableOffsets[St]=ke[St]);for(var Ft in Qe)!this.placedOrientations[Ft]&&this.opacities[Ft]&&!this.opacities[Ft].isHidden()&&(this.placedOrientations[Ft]=Qe[Ft]);te?this.lastPlacementChangeTime=K:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=xe?xe.lastPlacementChangeTime:K)},Xo.prototype.updateLayerOpacities=function(K,xe){for(var te={},ye=0,je=xe;ye<je.length;ye+=1){var ke=je[ye],Qe=ke.getBucket(K);Qe&&ke.latestFeatureIndex&&K.id===Qe.layerIds[0]&&this.updateBucketOpacities(Qe,te,ke.collisionBoxArray)}},Xo.prototype.updateBucketOpacities=function(K,xe,te){var ye=this;K.hasTextData()&&K.text.opacityVertexArray.clear(),K.hasIconData()&&K.icon.opacityVertexArray.clear(),K.hasIconCollisionBoxData()&&K.iconCollisionBox.collisionVertexArray.clear(),K.hasTextCollisionBoxData()&&K.textCollisionBox.collisionVertexArray.clear();var je=K.layers[0].layout,ke=new Oo(null,0,!1,!1,!0),Qe=je.get("text-allow-overlap"),vt=je.get("icon-allow-overlap"),qt=je.get("text-variable-anchor"),wr=je.get("text-rotation-alignment")==="map",Nr=je.get("text-pitch-alignment")==="map",pr=je.get("icon-text-fit")!=="none",mt=new Oo(null,0,Qe&&(vt||!K.hasIconData()||je.get("icon-optional")),vt&&(Qe||!K.hasTextData()||je.get("text-optional")),!0);!K.collisionArrays&&te&&(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData())&&K.deserializeCollisionBoxes(te);for(var St=function(nr,dr,or){for(var Wt=0;Wt<dr/4;Wt++)nr.opacityVertexArray.emplaceBack(or)},Ft=function(nr){var dr=K.symbolInstances.get(nr),or=dr.numHorizontalGlyphVertices,Wt=dr.numVerticalGlyphVertices,ir=dr.crossTileID,Vt=xe[ir],Dr=ye.opacities[ir];Vt?Dr=ke:Dr||(Dr=mt,ye.opacities[ir]=Dr),xe[ir]=!0;var Jr=or>0||Wt>0,ga=dr.numIconVertices>0,vi=ye.placedOrientations[dr.crossTileID],Ga=vi===e.WritingMode.vertical,ai=vi===e.WritingMode.horizontal||vi===e.WritingMode.horizontalOnly;if(Jr){var Zi=il(Dr.text),Fi=Ga?_n:Zi;St(K.text,or,Fi);var ui=ai?_n:Zi;St(K.text,Wt,ui);var _i=Dr.text.isHidden();[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex].forEach(function(kp){kp>=0&&(K.text.placedSymbolArray.get(kp).hidden=_i||Ga?1:0)}),dr.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=_i||ai?1:0);var Si=ye.variableOffsets[dr.crossTileID];Si&&ye.markUsedJustification(K,Si.anchor,dr,vi);var Ui=ye.placedOrientations[dr.crossTileID];Ui&&(ye.markUsedJustification(K,"left",dr,Ui),ye.markUsedOrientation(K,Ui,dr))}if(ga){var cn=il(Dr.icon),yo=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=yo?cn:_n;St(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Is=yo?_n:cn;St(K.icon,dr.numVerticalIconVertices,Is),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Fo=K.collisionArrays[nr];if(Fo){var Es=new e.Point(0,0);if(Fo.textBox||Fo.verticalTextBox){var Ks=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Es=gs(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),wr&&Es._rotate(Nr?ye.transform.angle:-ye.transform.angle)):Ks=!1}Fo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ks||Ga,Es.x,Es.y),Fo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ks||ai,Es.x,Es.y)}var Ep=!!(!ai&&Fo.verticalIconBox);Fo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Es.x:0,pr?Es.y:0),Fo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Es.x:0,pr?Es.y:0)}}},rr=0;rr<K.symbolInstances.length;rr++)Ft(rr);if(K.sortFeatures(this.transform.angle),this.retainedQueryData[K.bucketInstanceId]&&(this.retainedQueryData[K.bucketInstanceId].featureSortOrder=K.featureSortOrder),K.hasTextData()&&K.text.opacityVertexBuffer&&K.text.opacityVertexBuffer.updateData(K.text.opacityVertexArray),K.hasIconData()&&K.icon.opacityVertexBuffer&&K.icon.opacityVertexBuffer.updateData(K.icon.opacityVertexArray),K.hasIconCollisionBoxData()&&K.iconCollisionBox.collisionVertexBuffer&&K.iconCollisionBox.collisionVertexBuffer.updateData(K.iconCollisionBox.collisionVertexArray),K.hasTextCollisionBoxData()&&K.textCollisionBox.collisionVertexBuffer&&K.textCollisionBox.collisionVertexBuffer.updateData(K.textCollisionBox.collisionVertexArray),K.bucketInstanceId in this.collisionCircleArrays){var hr=this.collisionCircleArrays[K.bucketInstanceId];K.placementInvProjMatrix=hr.invProjMatrix,K.placementViewportMatrix=hr.viewportMatrix,K.collisionCircleArray=hr.circles,delete this.collisionCircleArrays[K.bucketInstanceId]}},Xo.prototype.symbolFadeChange=function(K){return this.fadeDuration===0?1:(K-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Xo.prototype.zoomAdjustment=function(K){return Math.max(0,(this.transform.zoom-K)/1.5)},Xo.prototype.hasTransitions=function(K){return this.stale||K-this.lastPlacementChangeTime<this.fadeDuration},Xo.prototype.stillRecent=function(K,xe){var te=this.zoomAtLastRecencyCheck===xe?1-this.zoomAdjustment(xe):1;return this.zoomAtLastRecencyCheck=xe,this.commitTime+this.fadeDuration*te>K},Xo.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,te,ye){ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0)}var Pn=Math.pow(2,25),js=Math.pow(2,24),xs=Math.pow(2,17),Hn=Math.pow(2,16),Os=Math.pow(2,9),ds=Math.pow(2,8),Xs=Math.pow(2,1);function il(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var K=ge.placed?1:0,xe=Math.floor(ge.opacity*127);return xe*Pn+K*js+xe*xs+K*Hn+xe*Os+K*ds+xe*Xs+K}var _n=0,Lo=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Lo.prototype.continuePlacement=function(K,xe,te,ye,je){for(var ke=this._bucketParts;this._currentTileIndex<K.length;){var Qe=K[this._currentTileIndex];if(xe.getBucketParts(ke,ye,Qe,this._sortAcrossTiles),this._currentTileIndex++,je())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ke.sort(function(qt,wr){return qt.sortKey-wr.sortKey}));this._currentPartIndex<ke.length;){var vt=ke[this._currentPartIndex];if(xe.placeLayerBucketPart(vt,this._seenCrossTileIDs,te),this._currentPartIndex++,je())return!0}return!1};var bo=function(K,xe,te,ye,je,ke,Qe){this.placement=new Xo(K,je,ke,Qe),this._currentPlacementIndex=xe.length-1,this._forceFullPlacement=te,this._showCollisionBoxes=ye,this._done=!1};bo.prototype.isDone=function(){return this._done},bo.prototype.continuePlacement=function(K,xe,te){for(var ye=this,je=e.browser.now(),ke=function(){var Nr=e.browser.now()-je;return ye._forceFullPlacement?!1:Nr>2};this._currentPlacementIndex>=0;){var Qe=K[this._currentPlacementIndex],vt=xe[Qe],qt=this.placement.collisionIndex.transform.zoom;if(vt.type==="symbol"&&(!vt.minzoom||vt.minzoom<=qt)&&(!vt.maxzoom||vt.maxzoom>qt)){this._inProgressLayer||(this._inProgressLayer=new Lo(vt));var wr=this._inProgressLayer.continuePlacement(te[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(wr)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},bo.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Rs=512/e.EXTENT/2,pu=function(K,xe,te){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=te;for(var ye=0;ye<xe.length;ye++){var je=xe.get(ye),ke=je.key;this.indexedSymbolInstances[ke]||(this.indexedSymbolInstances[ke]=[]),this.indexedSymbolInstances[ke].push({crossTileID:je.crossTileID,coord:this.getScaledCoordinates(je,K)})}};pu.prototype.getScaledCoordinates=function(K,xe){var te=xe.canonical.z-this.tileID.canonical.z,ye=Rs/Math.pow(2,te);return{x:Math.floor((xe.canonical.x*e.EXTENT+K.anchorX)*ye),y:Math.floor((xe.canonical.y*e.EXTENT+K.anchorY)*ye)}},pu.prototype.findMatches=function(K,xe,te){for(var ye=this.tileID.canonical.z<xe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-xe.canonical.z),je=0;je<K.length;je++){var ke=K.get(je);if(!ke.crossTileID){var Qe=this.indexedSymbolInstances[ke.key];if(Qe)for(var vt=this.getScaledCoordinates(ke,xe),qt=0,wr=Qe;qt<wr.length;qt+=1){var Nr=wr[qt];if(Math.abs(Nr.coord.x-vt.x)<=ye&&Math.abs(Nr.coord.y-vt.y)<=ye&&!te[Nr.crossTileID]){te[Nr.crossTileID]=!0,ke.crossTileID=Nr.crossTileID;break}}}}};var uo=function(){this.maxCrossTileID=0};uo.prototype.generate=function(){return++this.maxCrossTileID};var Gs=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Gs.prototype.handleWrapJump=function(K){var xe=Math.round((K-this.lng)/360);if(xe!==0)for(var te in this.indexes){var ye=this.indexes[te],je={};for(var ke in ye){var Qe=ye[ke];Qe.tileID=Qe.tileID.unwrapTo(Qe.tileID.wrap+xe),je[Qe.tileID.key]=Qe}this.indexes[te]=je}this.lng=K},Gs.prototype.addBucket=function(K,xe,te){if(this.indexes[K.overscaledZ]&&this.indexes[K.overscaledZ][K.key]){if(this.indexes[K.overscaledZ][K.key].bucketInstanceId===xe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(K.overscaledZ,this.indexes[K.overscaledZ][K.key])}for(var ye=0;ye<xe.symbolInstances.length;ye++){var je=xe.symbolInstances.get(ye);je.crossTileID=0}this.usedCrossTileIDs[K.overscaledZ]||(this.usedCrossTileIDs[K.overscaledZ]={});var ke=this.usedCrossTileIDs[K.overscaledZ];for(var Qe in this.indexes){var vt=this.indexes[Qe];if(Number(Qe)>K.overscaledZ)for(var qt in vt){var wr=vt[qt];wr.tileID.isChildOf(K)&&wr.findMatches(xe.symbolInstances,K,ke)}else{var Nr=K.scaledTo(Number(Qe)),pr=vt[Nr.key];pr&&pr.findMatches(xe.symbolInstances,K,ke)}}for(var mt=0;mt<xe.symbolInstances.length;mt++){var St=xe.symbolInstances.get(mt);St.crossTileID||(St.crossTileID=te.generate(),ke[St.crossTileID]=!0)}return this.indexes[K.overscaledZ]===void 0&&(this.indexes[K.overscaledZ]={}),this.indexes[K.overscaledZ][K.key]=new pu(K,xe.symbolInstances,xe.bucketInstanceId),!0},Gs.prototype.removeBucketCrossTileIDs=function(K,xe){for(var te in xe.indexedSymbolInstances)for(var ye=0,je=xe.indexedSymbolInstances[te];ye<je.length;ye+=1){var ke=je[ye];delete this.usedCrossTileIDs[K][ke.crossTileID]}},Gs.prototype.removeStaleBuckets=function(K){var xe=!1;for(var te in this.indexes){var ye=this.indexes[te];for(var je in ye)K[ye[je].bucketInstanceId]||(this.removeBucketCrossTileIDs(te,ye[je]),delete ye[je],xe=!0)}return xe};var vl=function(){this.layerIndexes={},this.crossTileIDs=new uo,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};vl.prototype.addLayer=function(K,xe,te){var ye=this.layerIndexes[K.id];ye===void 0&&(ye=this.layerIndexes[K.id]=new Gs);var je=!1,ke={};ye.handleWrapJump(te);for(var Qe=0,vt=xe;Qe<vt.length;Qe+=1){var qt=vt[Qe],wr=qt.getBucket(K);!wr||K.id!==wr.layerIds[0]||(wr.bucketInstanceId||(wr.bucketInstanceId=++this.maxBucketInstanceId),ye.addBucket(qt.tileID,wr,this.crossTileIDs)&&(je=!0),ke[wr.bucketInstanceId]=!0)}return ye.removeStaleBuckets(ke)&&(je=!0),je},vl.prototype.pruneUnusedLayers=function(K){var xe={};K.forEach(function(ye){xe[ye]=!0});for(var te in this.layerIndexes)xe[te]||delete this.layerIndexes[te]};var As=function(ge,K){return e.emitValidationErrors(ge,K&&K.filter(function(xe){return xe.identifier!=="source.canvas"}))},qs=e.pick(Cr,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),us=e.pick(Cr,["setCenter","setZoom","setBearing","setPitch"]),Ss=Br(),Nl=function(ge){function K(xe,te){var ye=this;te===void 0&&(te={}),ge.call(this),this.map=xe,this.dispatcher=new N(an(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new y(xe._requestManager,te.localIdeographFontFamily),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new vl,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());var je=this;this._rtlTextPluginCallback=K.registerForPluginStateChange(function(ke){var Qe={pluginStatus:ke.pluginStatus,pluginURL:ke.pluginURL};je.dispatcher.broadcast("syncRTLPluginState",Qe,function(vt,qt){if(e.triggerPluginCompletionEvent(vt),qt){var wr=qt.every(function(pr){return pr});if(wr)for(var Nr in je.sourceCaches)je.sourceCaches[Nr].reload()}})}),this.on("data",function(ke){if(!(ke.dataType!=="source"||ke.sourceDataType!=="metadata")){var Qe=ye.sourceCaches[ke.sourceId];if(Qe){var vt=Qe.getSource();if(!(!vt||!vt.vectorLayerIds))for(var qt in ye._layers){var wr=ye._layers[qt];wr.source===vt.id&&ye._validateLayer(wr)}}}})}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.loadURL=function(te,ye){var je=this;ye===void 0&&(ye={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var ke=typeof ye.validate=="boolean"?ye.validate:!e.isMapboxURL(te);te=this.map._requestManager.normalizeStyleURL(te,ye.accessToken);var Qe=this.map._requestManager.transformRequest(te,e.ResourceType.Style);this._request=e.getJSON(Qe,function(vt,qt){je._request=null,vt?je.fire(new e.ErrorEvent(vt)):qt&&je._load(qt,ke)})},K.prototype.loadJSON=function(te,ye){var je=this;ye===void 0&&(ye={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame(function(){je._request=null,je._load(te,ye.validate!==!1)})},K.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Ss,!1)},K.prototype._load=function(te,ye){if(!(ye&&As(this,e.validateStyle(te)))){this._loaded=!0,this.stylesheet=te;for(var je in te.sources)this.addSource(je,te.sources[je],{validate:!1});te.sprite?this._loadSprite(te.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(te.glyphs);var ke=lt(this.stylesheet.layers);this._order=ke.map(function(wr){return wr.id}),this._layers={},this._serializedLayers={};for(var Qe=0,vt=ke;Qe<vt.length;Qe+=1){var qt=vt[Qe];qt=e.createStyleLayer(qt),qt.setEventedParent(this,{layer:{id:qt.id}}),this._layers[qt.id]=qt,this._serializedLayers[qt.id]=qt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new z(this.stylesheet.light),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}},K.prototype._loadSprite=function(te){var ye=this;this._spriteRequest=c(te,this.map._requestManager,function(je,ke){if(ye._spriteRequest=null,je)ye.fire(new e.ErrorEvent(je));else if(ke)for(var Qe in ke)ye.imageManager.addImage(Qe,ke[Qe]);ye.imageManager.setLoaded(!0),ye._availableImages=ye.imageManager.listImages(),ye.dispatcher.broadcast("setImages",ye._availableImages),ye.fire(new e.Event("data",{dataType:"style"}))})},K.prototype._validateLayer=function(te){var ye=this.sourceCaches[te.source];if(ye){var je=te.sourceLayer;if(je){var ke=ye.getSource();(ke.type==="geojson"||ke.vectorLayerIds&&ke.vectorLayerIds.indexOf(je)===-1)&&this.fire(new e.ErrorEvent(new Error('Source layer "'+je+'" does not exist on source "'+ke.id+'" as specified by style layer "'+te.id+'"')))}}},K.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var te in this.sourceCaches)if(!this.sourceCaches[te].loaded())return!1;return!!this.imageManager.isLoaded()},K.prototype._serializeLayers=function(te){for(var ye=[],je=0,ke=te;je<ke.length;je+=1){var Qe=ke[je],vt=this._layers[Qe];vt.type!=="custom"&&ye.push(vt.serialize())}return ye},K.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var te in this.sourceCaches)if(this.sourceCaches[te].hasTransition())return!0;for(var ye in this._layers)if(this._layers[ye].hasTransition())return!0;return!1},K.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},K.prototype.update=function(te){if(this._loaded){var ye=this._changed;if(this._changed){var je=Object.keys(this._updatedLayers),ke=Object.keys(this._removedLayers);(je.length||ke.length)&&this._updateWorkerLayers(je,ke);for(var Qe in this._updatedSources){var vt=this._updatedSources[Qe];vt==="reload"?this._reloadSource(Qe):vt==="clear"&&this._clearSource(Qe)}this._updateTilesForChangedImages();for(var qt in this._updatedPaintProps)this._layers[qt].updateTransitions(te);this.light.updateTransitions(te),this._resetUpdates()}var wr={};for(var Nr in this.sourceCaches){var pr=this.sourceCaches[Nr];wr[Nr]=pr.used,pr.used=!1}for(var mt=0,St=this._order;mt<St.length;mt+=1){var Ft=St[mt],rr=this._layers[Ft];rr.recalculate(te,this._availableImages),!rr.isHidden(te.zoom)&&rr.source&&(this.sourceCaches[rr.source].used=!0)}for(var hr in wr){var nr=this.sourceCaches[hr];wr[hr]!==nr.used&&nr.fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:hr}))}this.light.recalculate(te),this.z=te.zoom,ye&&this.fire(new e.Event("data",{dataType:"style"}))}},K.prototype._updateTilesForChangedImages=function(){var te=Object.keys(this._changedImages);if(te.length){for(var ye in this.sourceCaches)this.sourceCaches[ye].reloadTilesForDependencies(["icons","patterns"],te);this._changedImages={}}},K.prototype._updateWorkerLayers=function(te,ye){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(te),removedIds:ye})},K.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},K.prototype.setState=function(te){var ye=this;if(this._checkLoaded(),As(this,e.validateStyle(te)))return!1;te=e.clone$1(te),te.layers=lt(te.layers);var je=Pa(this.serialize(),te).filter(function(Qe){return!(Qe.command in us)});if(je.length===0)return!1;var ke=je.filter(function(Qe){return!(Qe.command in qs)});if(ke.length>0)throw new Error("Unimplemented: "+ke.map(function(Qe){return Qe.command}).join(", ")+".");return je.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=te,!0},K.prototype.addImage=function(te,ye){if(this.getImage(te))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(te,ye),this._afterImageUpdated(te)},K.prototype.updateImage=function(te,ye){this.imageManager.updateImage(te,ye)},K.prototype.getImage=function(te){return this.imageManager.getImage(te)},K.prototype.removeImage=function(te){if(!this.getImage(te))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(te),this._afterImageUpdated(te)},K.prototype._afterImageUpdated=function(te){this._availableImages=this.imageManager.listImages(),this._changedImages[te]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(te,ye,je){var ke=this;if(je===void 0&&(je={}),this._checkLoaded(),this.sourceCaches[te]!==void 0)throw new Error("There is already a source with this ID");if(!ye.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(ye).join(", ")+".");var Qe=["vector","raster","geojson","video","image"],vt=Qe.indexOf(ye.type)>=0;if(!(vt&&this._validate(e.validateStyle.source,"sources."+te,ye,null,je))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[te]=new ra(te,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:te}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(te){if(this._checkLoaded(),this.sourceCaches[te]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===te)return this.fire(new e.ErrorEvent(new Error('Source "'+te+'" cannot be removed while layer "'+ye+'" is using it.')));var je=this.sourceCaches[te];delete this.sourceCaches[te],delete this._updatedSources[te],je.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:te})),je.setEventedParent(null),je.clearTiles(),je.onRemove&&je.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(te,ye){this._checkLoaded();var je=this.sourceCaches[te].getSource();je.setData(ye),this._changed=!0},K.prototype.getSource=function(te){return this.sourceCaches[te]&&this.sourceCaches[te].getSource()},K.prototype.addLayer=function(te,ye,je){je===void 0&&(je={}),this._checkLoaded();var ke=te.id;if(this.getLayer(ke)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ke+'" already exists on this map')));return}var Qe;if(te.type==="custom"){if(As(this,e.validateCustomStyleLayer(te)))return;Qe=e.createStyleLayer(te)}else{if(typeof te.source=="object"&&(this.addSource(ke,te.source),te=e.clone$1(te),te=e.extend(te,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,te,{arrayIndex:-1},je))return;Qe=e.createStyleLayer(te),this._validateLayer(Qe),Qe.setEventedParent(this,{layer:{id:ke}}),this._serializedLayers[Qe.id]=Qe.serialize()}var vt=ye?this._order.indexOf(ye):this._order.length;if(ye&&vt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}if(this._order.splice(vt,0,ke),this._layerOrderChanged=!0,this._layers[ke]=Qe,this._removedLayers[ke]&&Qe.source&&Qe.type!=="custom"){var qt=this._removedLayers[ke];delete this._removedLayers[ke],qt.type!==Qe.type?this._updatedSources[Qe.source]="clear":(this._updatedSources[Qe.source]="reload",this.sourceCaches[Qe.source].pause())}this._updateLayer(Qe),Qe.onAdd&&Qe.onAdd(this.map)},K.prototype.moveLayer=function(te,ye){this._checkLoaded(),this._changed=!0;var je=this._layers[te];if(!je){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be moved.")));return}if(te!==ye){var ke=this._order.indexOf(te);this._order.splice(ke,1);var Qe=ye?this._order.indexOf(ye):this._order.length;if(ye&&Qe===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}this._order.splice(Qe,0,te),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(te){this._checkLoaded();var ye=this._layers[te];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var je=this._order.indexOf(te);this._order.splice(je,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[te]=ye,delete this._layers[te],delete this._serializedLayers[te],delete this._updatedLayers[te],delete this._updatedPaintProps[te],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(te){return this._layers[te]},K.prototype.hasLayer=function(te){return te in this._layers},K.prototype.setLayerZoomRange=function(te,ye,je){this._checkLoaded();var ke=this.getLayer(te);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===je||(ye!=null&&(ke.minzoom=ye),je!=null&&(ke.maxzoom=je),this._updateLayer(ke))},K.prototype.setFilter=function(te,ye,je){je===void 0&&(je={}),this._checkLoaded();var ke=this.getLayer(te);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(ke.filter,ye)){if(ye==null){ke.filter=void 0,this._updateLayer(ke);return}this._validate(e.validateStyle.filter,"layers."+ke.id+".filter",ye,null,je)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(te){return e.clone$1(this.getLayer(te).filter)},K.prototype.setLayoutProperty=function(te,ye,je,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(te);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),je)||(Qe.setLayoutProperty(ye,je,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(te,ye){var je=this.getLayer(te);if(!je){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style.")));return}return je.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(te,ye,je,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(te);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),je)){var vt=Qe.setPaintProperty(ye,je,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[te]=!0}},K.prototype.getPaintProperty=function(te,ye){return this.getLayer(te).getPaintProperty(ye)},K.prototype.setFeatureState=function(te,ye){this._checkLoaded();var je=te.source,ke=te.sourceLayer,Qe=this.sourceCaches[je];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+je+"' does not exist in the map's style.")));return}var vt=Qe.getSource().type;if(vt==="geojson"&&ke){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(vt==="vector"&&!ke){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,te.id,ye)},K.prototype.removeFeatureState=function(te,ye){this._checkLoaded();var je=te.source,ke=this.sourceCaches[je];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+je+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?te.sourceLayer:void 0;if(Qe==="vector"&&!vt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ye&&typeof te.id!="string"&&typeof te.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,te.id,ye)},K.prototype.getFeatureState=function(te){this._checkLoaded();var ye=te.source,je=te.sourceLayer,ke=this.sourceCaches[ye];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+ye+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type;if(Qe==="vector"&&!je){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(je,te.id)},K.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,function(te){return te.serialize()}),layers:this._serializeLayers(this._order)},function(te){return te!==void 0})},K.prototype._updateLayer=function(te){this._updatedLayers[te.id]=!0,te.source&&!this._updatedSources[te.source]&&this.sourceCaches[te.source].getSource().type!=="raster"&&(this._updatedSources[te.source]="reload",this.sourceCaches[te.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(te){for(var ye=this,je=function(ai){return ye._layers[ai].type==="fill-extrusion"},ke={},Qe=[],vt=this._order.length-1;vt>=0;vt--){var qt=this._order[vt];if(je(qt)){ke[qt]=vt;for(var wr=0,Nr=te;wr<Nr.length;wr+=1){var pr=Nr[wr],mt=pr[qt];if(mt)for(var St=0,Ft=mt;St<Ft.length;St+=1){var rr=Ft[St];Qe.push(rr)}}}}Qe.sort(function(ai,Zi){return Zi.intersectionZ-ai.intersectionZ});for(var hr=[],nr=this._order.length-1;nr>=0;nr--){var dr=this._order[nr];if(je(dr))for(var or=Qe.length-1;or>=0;or--){var Wt=Qe[or].feature;if(ke[Wt.layer.id]<nr)break;hr.push(Wt),Qe.pop()}else for(var ir=0,Vt=te;ir<Vt.length;ir+=1){var Dr=Vt[ir],Jr=Dr[dr];if(Jr)for(var ga=0,vi=Jr;ga<vi.length;ga+=1){var Ga=vi[ga];hr.push(Ga.feature)}}}return hr},K.prototype.queryRenderedFeatures=function(te,ye,je){ye&&ye.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",ye.filter,null,ye);var ke={};if(ye&&ye.layers){if(!Array.isArray(ye.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var Qe=0,vt=ye.layers;Qe<vt.length;Qe+=1){var qt=vt[Qe],wr=this._layers[qt];if(!wr)return this.fire(new e.ErrorEvent(new Error("The layer '"+qt+"' does not exist in the map's style and cannot be queried for features."))),[];ke[wr.source]=!0}}var Nr=[];ye.availableImages=this._availableImages;for(var pr in this.sourceCaches)ye.layers&&!ke[pr]||Nr.push(re(this.sourceCaches[pr],this._layers,this._serializedLayers,te,ye,je));return this.placement&&Nr.push(pe(this._layers,this._serializedLayers,this.sourceCaches,te,ye,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Nr)},K.prototype.querySourceFeatures=function(te,ye){ye&&ye.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",ye.filter,null,ye);var je=this.sourceCaches[te];return je?we(je,ye):[]},K.prototype.addSourceType=function(te,ye,je){if(K.getSourceType(te))return je(new Error('A source type called "'+te+'" already exists.'));if(K.setSourceType(te,ye),!ye.workerSourceURL)return je(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:te,url:ye.workerSourceURL},je)},K.prototype.getLight=function(){return this.light.getLight()},K.prototype.setLight=function(te,ye){ye===void 0&&(ye={}),this._checkLoaded();var je=this.light.getLight(),ke=!1;for(var Qe in te)if(!e.deepEqual(te[Qe],je[Qe])){ke=!0;break}if(ke){var vt={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(te,ye),this.light.updateTransitions(vt)}},K.prototype._validate=function(te,ye,je,ke,Qe){return Qe===void 0&&(Qe={}),Qe&&Qe.validate===!1?!1:As(this,te.call(e.validateStyle,e.extend({key:ye,style:this.serialize(),value:je,styleSpec:e.styleSpec},ke)))},K.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var te in this._layers){var ye=this._layers[te];ye.setEventedParent(null)}for(var je in this.sourceCaches)this.sourceCaches[je].clearTiles(),this.sourceCaches[je].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},K.prototype._clearSource=function(te){this.sourceCaches[te].clearTiles()},K.prototype._reloadSource=function(te){this.sourceCaches[te].resume(),this.sourceCaches[te].reload()},K.prototype._updateSources=function(te){for(var ye in this.sourceCaches)this.sourceCaches[ye].update(te)},K.prototype._generateCollisionBoxes=function(){for(var te in this.sourceCaches)this._reloadSource(te)},K.prototype._updatePlacement=function(te,ye,je,ke,Qe){Qe===void 0&&(Qe=!1);for(var vt=!1,qt=!1,wr={},Nr=0,pr=this._order;Nr<pr.length;Nr+=1){var mt=pr[Nr],St=this._layers[mt];if(St.type==="symbol"){if(!wr[St.source]){var Ft=this.sourceCaches[St.source];wr[St.source]=Ft.getRenderableIds(!0).map(function(ir){return Ft.getTileByID(ir)}).sort(function(ir,Vt){return Vt.tileID.overscaledZ-ir.tileID.overscaledZ||(ir.tileID.isLessThan(Vt.tileID)?-1:1)})}var rr=this.crossTileSymbolIndex.addLayer(St,wr[St.source],te.center.lng);vt=vt||rr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),Qe=Qe||this._layerOrderChanged||je===0,(Qe||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),te.zoom))&&(this.pauseablePlacement=new bo(te,this._order,Qe,ye,je,ke,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,wr),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),qt=!0),vt&&this.pauseablePlacement.placement.setStale()),qt||vt)for(var hr=0,nr=this._order;hr<nr.length;hr+=1){var dr=nr[hr],or=this._layers[dr];or.type==="symbol"&&this.placement.updateLayerOpacities(or,wr[or.source])}var Wt=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now());return Wt},K.prototype._releaseSymbolFadeTiles=function(){for(var te in this.sourceCaches)this.sourceCaches[te].releaseSymbolFadeTiles()},K.prototype.getImages=function(te,ye,je){this.imageManager.getImages(ye.icons,je),this._updateTilesForChangedImages();var ke=this.sourceCaches[ye.source];ke&&ke.setDependencies(ye.tileID.key,ye.type,ye.icons)},K.prototype.getGlyphs=function(te,ye,je){this.glyphManager.getGlyphs(ye.stacks,je)},K.prototype.getResource=function(te,ye,je){return e.makeRequest(ye,je)},K}(e.Evented);Nl.getSourceType=se,Nl.setSourceType=ae,Nl.registerForPluginStateChange=e.registerForPluginStateChange;var su=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),Tc=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,du=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,Sf=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Uc="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Bs=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,dc="uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",Hc=`varying vec3 v_data;
#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);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,lu=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
#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 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,Pl="void main() {gl_FragColor=vec4(1.0);}",ic="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Ou=`uniform highp float u_intensity;varying 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);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,nl=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#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 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,ml=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,bs="uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}",Zs="varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",nc="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",Ul="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",qu="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",fl="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",xh="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",ss=`#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_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,bh=`attribute vec2 a_pos;uniform mat4 u_matrix;
#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=u_matrix*vec4(a_pos,0,1);}`,ks=`varying vec2 v_pos;
#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);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,to=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#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=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,Wc=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#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=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Vu=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#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=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,jl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying 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=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Mf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#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=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,Ac=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,nf=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
#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;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,$l=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Jf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Of=`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,of="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",jc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Bf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Nf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Gu=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Ef=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,oc=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Xc=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ql=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,qc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Sc=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Ys=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,kf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",fh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Uf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Zc=`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,$f=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Cu=`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,jf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,yl=hl(Tc,du),Lu=hl(Sf,Uc),Mc=hl(Bs,dc),ol=hl(Hc,lu),vc=hl(Pl,ic),yu=hl(Ou,nl),Tu=hl(ml,bs),El=hl(Zs,nc),qf=hl(Ul,qu),Qf=hl(fl,xh),Bu=hl(ss,bh),Ec=hl(ks,to),mc=hl(Wc,Vu),Lh=hl(jl,Mf),sf=hl(Ac,nf),vf=hl($l,Jf),Nu=hl(Of,of),lf=hl(jc,Bf),au=hl(Nf,Gu),Yc=hl(Ef,oc),hh=hl(Xc,Ql),mf=hl(qc,Sc),sl=hl(Ys,kf),_u=hl(fh,Uf),Pu=hl(Zc,$f),Cf=hl(Cu,jf);function hl(ge,K){var xe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,te=K.match(/attribute ([\w]+) ([\w]+)/g),ye=ge.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),je=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=je?je.concat(ye):ye,Qe={};return ge=ge.replace(xe,function(vt,qt,wr,Nr,pr){return Qe[pr]=!0,qt==="define"?`
#ifndef HAS_UNIFORM_u_`+pr+`
varying `+wr+" "+Nr+" "+pr+`;
#else
uniform `+wr+" "+Nr+" u_"+pr+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+pr+`
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`}),K=K.replace(xe,function(vt,qt,wr,Nr,pr){var mt=Nr==="float"?"vec2":"vec4",St=pr.match(/color/)?"color":mt;return Qe[pr]?qt==="define"?`
#ifndef HAS_UNIFORM_u_`+pr+`
uniform lowp float u_`+pr+`_t;
attribute `+wr+" "+mt+" a_"+pr+`;
varying `+wr+" "+Nr+" "+pr+`;
#else
uniform `+wr+" "+Nr+" u_"+pr+`;
#endif
`:St==="vec4"?`
#ifndef HAS_UNIFORM_u_`+pr+`
`+pr+" = a_"+pr+`;
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+pr+`
`+pr+" = unpack_mix_"+St+"(a_"+pr+", u_"+pr+`_t);
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`:qt==="define"?`
#ifndef HAS_UNIFORM_u_`+pr+`
uniform lowp float u_`+pr+`_t;
attribute `+wr+" "+mt+" a_"+pr+`;
#else
uniform `+wr+" "+Nr+" u_"+pr+`;
#endif
`:St==="vec4"?`
#ifndef HAS_UNIFORM_u_`+pr+`
`+wr+" "+Nr+" "+pr+" = a_"+pr+`;
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+pr+`
`+wr+" "+Nr+" "+pr+" = unpack_mix_"+St+"(a_"+pr+", u_"+pr+`_t);
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`}),{fragmentSource:ge,vertexSource:K,staticAttributes:te,staticUniforms:ke}}var uf=Object.freeze({__proto__:null,prelude:yl,background:Lu,backgroundPattern:Mc,circle:ol,clippingMask:vc,heatmap:yu,heatmapTexture:Tu,collisionBox:El,collisionCircle:qf,debug:Qf,fill:Bu,fillOutline:Ec,fillOutlinePattern:mc,fillPattern:Lh,fillExtrusion:sf,fillExtrusionPattern:vf,hillshadePrepare:Nu,hillshade:lf,line:au,lineGradient:Yc,linePattern:hh,lineSDF:mf,raster:sl,symbolIcon:_u,symbolSDF:Pu,symbolTextAndIcon:Cf}),kc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};kc.prototype.bind=function(K,xe,te,ye,je,ke,Qe,vt){this.context=K;for(var qt=this.boundPaintVertexBuffers.length!==ye.length,wr=0;!qt&&wr<ye.length;wr++)this.boundPaintVertexBuffers[wr]!==ye[wr]&&(qt=!0);var Nr=!this.vao||this.boundProgram!==xe||this.boundLayoutVertexBuffer!==te||qt||this.boundIndexBuffer!==je||this.boundVertexOffset!==ke||this.boundDynamicVertexBuffer!==Qe||this.boundDynamicVertexBuffer2!==vt;!K.extVertexArrayObject||Nr?this.freshBind(xe,te,ye,je,ke,Qe,vt):(K.bindVertexArrayOES.set(this.vao),Qe&&Qe.bind(),je&&je.dynamicDraw&&je.bind(),vt&&vt.bind())},kc.prototype.freshBind=function(K,xe,te,ye,je,ke,Qe){var vt,qt=K.numAttributes,wr=this.context,Nr=wr.gl;if(wr.extVertexArrayObject)this.vao&&this.destroy(),this.vao=wr.extVertexArrayObject.createVertexArrayOES(),wr.bindVertexArrayOES.set(this.vao),vt=0,this.boundProgram=K,this.boundLayoutVertexBuffer=xe,this.boundPaintVertexBuffers=te,this.boundIndexBuffer=ye,this.boundVertexOffset=je,this.boundDynamicVertexBuffer=ke,this.boundDynamicVertexBuffer2=Qe;else{vt=wr.currentNumAttributes||0;for(var pr=qt;pr<vt;pr++)Nr.disableVertexAttribArray(pr)}xe.enableAttributes(Nr,K);for(var mt=0,St=te;mt<St.length;mt+=1){var Ft=St[mt];Ft.enableAttributes(Nr,K)}ke&&ke.enableAttributes(Nr,K),Qe&&Qe.enableAttributes(Nr,K),xe.bind(),xe.setVertexAttribPointers(Nr,K,je);for(var rr=0,hr=te;rr<hr.length;rr+=1){var nr=hr[rr];nr.bind(),nr.setVertexAttribPointers(Nr,K,je)}ke&&(ke.bind(),ke.setVertexAttribPointers(Nr,K,je)),ye&&ye.bind(),Qe&&(Qe.bind(),Qe.setVertexAttribPointers(Nr,K,je)),wr.currentNumAttributes=qt},kc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Hu(ge){for(var K=[],xe=0;xe<ge.length;xe++)if(ge[xe]!==null){var te=ge[xe].split(" ");K.push(te.pop())}return K}var gf=function(K,xe,te,ye,je,ke){var Qe=K.gl;this.program=Qe.createProgram();for(var vt=Hu(te.staticAttributes),qt=ye?ye.getBinderAttributes():[],wr=vt.concat(qt),Nr=te.staticUniforms?Hu(te.staticUniforms):[],pr=ye?ye.getBinderUniforms():[],mt=Nr.concat(pr),St=[],Ft=0,rr=mt;Ft<rr.length;Ft+=1){var hr=rr[Ft];St.indexOf(hr)<0&&St.push(hr)}var nr=ye?ye.defines():[];ke&&nr.push("#define OVERDRAW_INSPECTOR;");var dr=nr.concat(yl.fragmentSource,te.fragmentSource).join(`
`),or=nr.concat(yl.vertexSource,te.vertexSource).join(`
`),Wt=Qe.createShader(Qe.FRAGMENT_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(Wt,dr),Qe.compileShader(Wt),Qe.attachShader(this.program,Wt);var ir=Qe.createShader(Qe.VERTEX_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(ir,or),Qe.compileShader(ir),Qe.attachShader(this.program,ir),this.attributes={};var Vt={};this.numAttributes=wr.length;for(var Dr=0;Dr<this.numAttributes;Dr++)wr[Dr]&&(Qe.bindAttribLocation(this.program,Dr,wr[Dr]),this.attributes[wr[Dr]]=Dr);Qe.linkProgram(this.program),Qe.deleteShader(ir),Qe.deleteShader(Wt);for(var Jr=0;Jr<St.length;Jr++){var ga=St[Jr];if(ga&&!Vt[ga]){var vi=Qe.getUniformLocation(this.program,ga);vi&&(Vt[ga]=vi)}}this.fixedUniforms=je(K,Vt),this.binderUniforms=ye?ye.getUniforms(K,Vt):[]};gf.prototype.draw=function(K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr,pr,mt,St,Ft,rr){var hr,nr=K.gl;if(!this.failedToCreate){K.program.set(this.program),K.setDepthMode(te),K.setStencilMode(ye),K.setColorMode(je),K.setCullFace(ke);for(var dr in this.fixedUniforms)this.fixedUniforms[dr].set(Qe[dr]);St&&St.setUniforms(K,this.binderUniforms,pr,{zoom:mt});for(var or=(hr={},hr[nr.LINES]=2,hr[nr.TRIANGLES]=3,hr[nr.LINE_STRIP]=1,hr)[xe],Wt=0,ir=Nr.get();Wt<ir.length;Wt+=1){var Vt=ir[Wt],Dr=Vt.vaos||(Vt.vaos={}),Jr=Dr[vt]||(Dr[vt]=new kc);Jr.bind(K,this,qt,St?St.getPaintVertexBuffers():[],wr,Vt.vertexOffset,Ft,rr),nr.drawElements(xe,Vt.primitiveLength*or,nr.UNSIGNED_SHORT,Vt.primitiveOffset*or*2)}}};function Wu(ge,K,xe){var te=1/is(xe,1,K.transform.tileZoom),ye=Math.pow(2,xe.tileID.overscaledZ),je=xe.tileSize*Math.pow(2,K.transform.tileZoom)/ye,ke=je*(xe.tileID.canonical.x+xe.tileID.wrap*ye),Qe=je*xe.tileID.canonical.y;return{u_image:0,u_texsize:xe.imageAtlasTexture.size,u_scale:[te,ge.fromScale,ge.toScale],u_fade:ge.t,u_pixel_coord_upper:[ke>>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Kc(ge,K,xe,te){var ye=xe.imageManager.getPattern(ge.from.toString()),je=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,te.tileID.overscaledZ),wr=te.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Nr=wr*(te.tileID.canonical.x+te.tileID.wrap*qt),pr=wr*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:je.tl,u_pattern_br_b:je.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:je.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/is(te,1,xe.transform.tileZoom),u_pixel_coord_upper:[Nr>>16,pr>>16],u_pixel_coord_lower:[Nr&65535,pr&65535]}}var Lf=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},iu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ge,K.u_height_factor),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Vf=function(ge,K,xe,te){var ye=K.style.light,je=ye.properties.get("position"),ke=[je.x,je.y,je.z],Qe=e.create$1();ye.properties.get("anchor")==="viewport"&&e.fromRotation(Qe,-K.transform.angle),e.transformMat3(ke,ke,Qe);var vt=ye.properties.get("color");return{u_matrix:ge,u_lightpos:ke,u_lightintensity:ye.properties.get("intensity"),u_lightcolor:[vt.r,vt.g,vt.b],u_vertical_gradient:+xe,u_opacity:te}},Xu=function(ge,K,xe,te,ye,je,ke){return e.extend(Vf(ge,K,xe,te),Wu(je,K,ke),{u_height_factor:-Math.pow(2,ye.overscaledZ)/ke.tileSize/8})},Cc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},gc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},ql=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world)}},xu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Lc=function(ge){return{u_matrix:ge}},Jc=function(ge,K,xe,te){return e.extend(Lc(ge),Wu(xe,K,te))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,te,ye){return e.extend(Jc(ge,K,xe,te),{u_world:ye})},Qt=function(ge,K){return{u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ge,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},br=function(ge,K,xe,te){var ye=ge.transform,je,ke;if(te.paint.get("circle-pitch-alignment")==="map"){var Qe=is(xe,1,ye.zoom);je=!0,ke=[Qe,Qe]}else je=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+je,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ke}},aa=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ge,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ge,K.u_overscale_factor)}},$r=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ge,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ge,K.u_viewport_size)}},ka=function(ge,K,xe){var te=is(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),je=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[K.pixelsToGLUnits[0]/(te*ye),K.pixelsToGLUnits[1]/(te*ye)],u_overscale_factor:je}},li=function(ge,K,xe){return{u_matrix:ge,u_inv_matrix:K,u_camera_to_center_distance:xe.cameraToCenterDistance,u_viewport_size:[xe.width,xe.height]}},Ci=function(ge,K){return{u_color:new e.UniformColor(ge,K.u_color),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_overlay:new e.Uniform1i(ge,K.u_overlay),u_overlay_scale:new e.Uniform1f(ge,K.u_overlay_scale)}},Hi=function(ge,K,xe){return xe===void 0&&(xe=1),{u_matrix:ge,u_color:K,u_overlay:0,u_overlay_scale:xe}},Qi=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},pn=function(ge){return{u_matrix:ge}},Pi=function(ge,K){return{u_extrude_scale:new e.Uniform1f(ge,K.u_extrude_scale),u_intensity:new e.Uniform1f(ge,K.u_intensity),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},Di=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_color_ramp:new e.Uniform1i(ge,K.u_color_ramp),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Ni=function(ge,K,xe,te){return{u_matrix:ge,u_extrude_scale:is(K,1,xe),u_intensity:te}},mi=function(ge,K,xe,te){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var je=ge.context.gl;return{u_matrix:ye,u_world:[je.drawingBufferWidth,je.drawingBufferHeight],u_image:xe,u_color_ramp:te,u_opacity:K.paint.get("heatmap-opacity")}},Sn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_latrange:new e.Uniform2f(ge,K.u_latrange),u_light:new e.Uniform2f(ge,K.u_light),u_shadow:new e.UniformColor(ge,K.u_shadow),u_highlight:new e.UniformColor(ge,K.u_highlight),u_accent:new e.UniformColor(ge,K.u_accent)}},$n=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_dimension:new e.Uniform2f(ge,K.u_dimension),u_zoom:new e.Uniform1f(ge,K.u_zoom),u_unpack:new e.Uniform4f(ge,K.u_unpack)}},no=function(ge,K,xe){var te=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),je=xe.paint.get("hillshade-accent-color"),ke=xe.paint.get("hillshade-illumination-direction")*(Math.PI/180);xe.paint.get("hillshade-illumination-anchor")==="viewport"&&(ke-=ge.transform.angle);var Qe=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(K.tileID.toUnwrapped(),Qe),u_image:0,u_latrange:co(ge,K.tileID),u_light:[xe.paint.get("hillshade-exaggeration"),ke],u_shadow:te,u_highlight:ye,u_accent:je}},Qn=function(ge,K){var xe=K.stride,te=e.create();return e.ortho(te,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(te,te,[0,-e.EXTENT,0]),{u_matrix:te,u_image:1,u_dimension:[xe,xe],u_zoom:ge.overscaledZ,u_unpack:K.getUnpackVector()}};function co(ge,K){var xe=Math.pow(2,K.canonical.z),te=K.canonical.y;return[new e.MercatorCoordinate(0,te/xe).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/xe).toLngLat().lat]}var Tn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels)}},un=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_image:new e.Uniform1i(ge,K.u_image),u_image_height:new e.Uniform1f(ge,K.u_image_height)}},go=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ge,K.u_image),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Ko=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ge,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ge,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ge,K.u_sdfgamma),u_image:new e.Uniform1i(ge,K.u_image),u_tex_y_a:new e.Uniform1f(ge,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ge,K.u_tex_y_b),u_mix:new e.Uniform1f(ge,K.u_mix)}},Ms=function(ge,K,xe){var te=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/is(K,1,te.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,te){return e.extend(Ms(ge,K,xe),{u_image:0,u_image_height:te})},Ns=function(ge,K,xe,te){var ye=ge.transform,je=ws(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/is(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[je,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,te,ye){var je=ge.transform,ke=ge.lineAtlas,Qe=ws(K,je),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(te.from,vt),wr=ke.getDash(te.to,vt),Nr=qt.width*ye.fromScale,pr=wr.width*ye.toScale;return e.extend(Ms(ge,K,xe),{u_patternscale_a:[Qe/Nr,-qt.height/2],u_patternscale_b:[Qe/pr,-wr.height/2],u_sdfgamma:ke.width/(Math.min(Nr,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:wr.y,u_mix:ye.t})};function ws(ge,K){return 1/is(ge,1,K.tileZoom)}function Fl(ge,K,xe){return ge.translatePosMatrix(K.tileID.posMatrix,K,xe.paint.get("line-translate"),xe.paint.get("line-translate-anchor"))}var _l=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_tl_parent:new e.Uniform2f(ge,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ge,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ge,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ge,K.u_fade_t),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image0:new e.Uniform1i(ge,K.u_image0),u_image1:new e.Uniform1i(ge,K.u_image1),u_brightness_low:new e.Uniform1f(ge,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ge,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ge,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ge,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ge,K.u_spin_weights)}},ll=function(ge,K,xe,te,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:te.mix,u_opacity:te.opacity*ye.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ye.paint.get("raster-brightness-min"),u_brightness_high:ye.paint.get("raster-brightness-max"),u_saturation_factor:Js(ye.paint.get("raster-saturation")),u_contrast_factor:Io(ye.paint.get("raster-contrast")),u_spin_weights:jn(ye.paint.get("raster-hue-rotate"))}};function jn(ge){ge*=Math.PI/180;var K=Math.sin(ge),xe=Math.cos(ge);return[(2*xe+1)/3,(-Math.sqrt(3)*K-xe+1)/3,(Math.sqrt(3)*K-xe+1)/3]}function Io(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Ds=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture)}},uu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Iu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texsize_icon:new e.Uniform2f(ge,K.u_texsize_icon),u_texture:new e.Uniform1i(ge,K.u_texture),u_texture_icon:new e.Uniform1i(ge,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Zu=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt){var wr=ye.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:wr.cameraToCenterDistance,u_pitch:wr.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:wr.width/wr.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:je,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+te,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr){var Nr=ye.transform;return e.extend(Zu(ge,K,xe,te,ye,je,ke,Qe,vt,qt),{u_gamma_scale:te?Math.cos(Nr._pitch)*Nr.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+wr})},bu=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,te,ye,je,ke,Qe,!0,vt,!0),{u_texsize_icon:qt,u_texture_icon:1})},Rc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_color:new e.UniformColor(ge,K.u_color)}},Au=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image:new e.Uniform1i(ge,K.u_image),u_pattern_tl_a:new e.Uniform2f(ge,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ge,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ge,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ge,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_mix:new e.Uniform1f(ge,K.u_mix),u_pattern_size_a:new e.Uniform2f(ge,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ge,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ge,K.u_scale_a),u_scale_b:new e.Uniform1f(ge,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ge,K.u_tile_units_to_pixels)}},yc=function(ge,K,xe){return{u_matrix:ge,u_opacity:K,u_color:xe}},fo=function(ge,K,xe,te,ye,je){return e.extend(Kc(te,je,xe,ye),{u_matrix:ge,u_opacity:K})},zo={fillExtrusion:Lf,fillExtrusionPattern:iu,fill:Cc,fillPattern:gc,fillOutline:ql,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Sn,hillshadePrepare:$n,line:Tn,lineGradient:un,linePattern:go,lineSDF:Ko,raster:_l,symbolIcon:Ds,symbolSDF:uu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,te,ye,je,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),wr=[],Nr=0,pr=0,mt=0;mt<te.length;mt++){var St=te[mt],Ft=K.getTile(St),rr=Ft.getBucket(xe);if(rr){var hr=St.posMatrix;(ye[0]!==0||ye[1]!==0)&&(hr=ge.translatePosMatrix(St.posMatrix,Ft,ye,je));var nr=ke?rr.textCollisionBox:rr.iconCollisionBox,dr=rr.collisionCircleArray;if(dr.length>0){var or=e.create(),Wt=hr;e.mul(or,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(or,or,rr.placementViewportMatrix),wr.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:or}),Nr+=dr.length/4,pr=Nr}nr&&qt.draw(Qe,vt.LINES,Ia.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,nr.layoutVertexBuffer,nr.indexBuffer,nr.segments,null,ge.transform.zoom,null,null,nr.collisionVertexBuffer)}}if(!(!ke||!wr.length)){var ir=ge.useProgram("collisionCircle"),Vt=new e.StructArrayLayout2f1f2i16;Vt.resize(Nr*4),Vt._trim();for(var Dr=0,Jr=0,ga=wr;Jr<ga.length;Jr+=1)for(var vi=ga[Jr],Ga=0;Ga<vi.circleArray.length/4;Ga++){var ai=Ga*4,Zi=vi.circleArray[ai+0],Fi=vi.circleArray[ai+1],ui=vi.circleArray[ai+2],_i=vi.circleArray[ai+3];Vt.emplace(Dr++,Zi,Fi,ui,_i,0),Vt.emplace(Dr++,Zi,Fi,ui,_i,1),Vt.emplace(Dr++,Zi,Fi,ui,_i,2),Vt.emplace(Dr++,Zi,Fi,ui,_i,3)}(!Dc||Dc.length<Nr*2)&&(Dc=Yu(Nr));for(var Si=Qe.createIndexBuffer(Dc,!0),Ui=Qe.createVertexBuffer(Vt,e.collisionCircleLayout.members,!0),cn=0,yo=wr;cn<yo.length;cn+=1){var Uo=yo[cn],Is=li(Uo.transform,Uo.invTransform,ge.transform);ir.draw(Qe,vt.TRIANGLES,Ia.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,Is,xe.id,Ui,Si,e.SegmentVector.simpleSegment(0,Uo.circleOffset*2,Uo.circleArray.length,Uo.circleArray.length/2),null,ge.transform.zoom,null,null,null)}Ui.destroy(),Si.destroy()}}function Yu(ge){var K=ge*2,xe=new e.StructArrayLayout3ui6;xe.resize(K),xe._trim();for(var te=0;te<K;te++){var ye=te*6;xe.uint16[ye+0]=te*4+0,xe.uint16[ye+1]=te*4+1,xe.uint16[ye+2]=te*4+2,xe.uint16[ye+3]=te*4+2,xe.uint16[ye+4]=te*4+3,xe.uint16[ye+5]=te*4+0}return xe}var Fe=e.identity(new Float32Array(16));function I(ge,K,xe,te,ye){if(ge.renderPass==="translucent"){var je=Ca.disabled,ke=ge.colorModeForRenderPass(),Qe=xe.layout.get("text-variable-anchor");Qe&&Te(te,ge,xe,K,xe.layout.get("text-rotation-alignment"),xe.layout.get("text-pitch-alignment"),ye),xe.paint.get("icon-opacity").constantOr(1)!==0&&ht(ge,K,xe,te,!1,xe.paint.get("icon-translate"),xe.paint.get("icon-translate-anchor"),xe.layout.get("icon-rotation-alignment"),xe.layout.get("icon-pitch-alignment"),xe.layout.get("icon-keep-upright"),je,ke),xe.paint.get("text-opacity").constantOr(1)!==0&&ht(ge,K,xe,te,!0,xe.paint.get("text-translate"),xe.paint.get("text-translate-anchor"),xe.layout.get("text-rotation-alignment"),xe.layout.get("text-pitch-alignment"),xe.layout.get("text-keep-upright"),je,ke),K.map.showCollisionBoxes&&(lc(ge,K,xe,te,xe.paint.get("text-translate"),xe.paint.get("text-translate-anchor"),!0),lc(ge,K,xe,te,xe.paint.get("icon-translate"),xe.paint.get("icon-translate-anchor"),!1))}}function ie(ge,K,xe,te,ye,je){var ke=e.getAnchorAlignment(ge),Qe=ke.horizontalAlign,vt=ke.verticalAlign,qt=-(Qe-.5)*K,wr=-(vt-.5)*xe,Nr=e.evaluateVariableOffset(ge,te);return new e.Point((qt/ye+Nr[0])*je,(wr/ye+Nr[1])*je)}function Te(ge,K,xe,te,ye,je,ke){for(var Qe=K.transform,vt=ye==="map",qt=je==="map",wr=0,Nr=ge;wr<Nr.length;wr+=1){var pr=Nr[wr],mt=te.getTile(pr),St=mt.getBucket(xe);if(!(!St||!St.text||!St.text.segments.get().length)){var Ft=St.textSizeData,rr=e.evaluateSizeForZoom(Ft,Qe.zoom),hr=is(mt,1,K.transform.zoom),nr=_a(pr.posMatrix,qt,vt,K.transform,hr),dr=xe.layout.get("icon-text-fit")!=="none"&&St.hasIconData();if(rr){var or=Math.pow(2,Qe.zoom-mt.tileID.overscaledZ);Me(St,vt,qt,ke,e.symbolSize,Qe,nr,pr.posMatrix,or,rr,dr)}}}}function Me(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr){var Nr=ge.text.placedSymbolArray,pr=ge.text.dynamicLayoutVertexArray,mt=ge.icon.dynamicLayoutVertexArray,St={};pr.clear();for(var Ft=0;Ft<Nr.length;Ft++){var rr=Nr.get(Ft),hr=ge.allowVerticalPlacement&&!rr.placedOrientation,nr=!rr.hidden&&rr.crossTileID&&!hr?te[rr.crossTileID]:null;if(!nr)Mn(rr.numGlyphs,pr);else{var dr=new e.Point(rr.anchorX,rr.anchorY),or=ki(dr,xe?Qe:ke),Wt=Ki(je.cameraToCenterDistance,or.signedDistanceFromCamera),ir=ye.evaluateSizeForFeature(ge.textSizeData,qt,rr)*Wt/e.ONE_EM;xe&&(ir*=ge.tilePixelRatio/vt);for(var Vt=nr.width,Dr=nr.height,Jr=nr.anchor,ga=nr.textOffset,vi=nr.textBoxScale,Ga=ie(Jr,Vt,Dr,ga,vi,ir),ai=xe?ki(dr.add(Ga),ke).point:or.point.add(K?Ga.rotate(-je.angle):Ga),Zi=ge.allowVerticalPlacement&&rr.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Fi=0;Fi<rr.numGlyphs;Fi++)e.addDynamicAttributes(pr,ai,Zi);wr&&rr.associatedIconIndex>=0&&(St[rr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(wr){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i<ui.length;_i++){var Si=ui.get(_i);if(Si.hidden)Mn(Si.numGlyphs,mt);else{var Ui=St[_i];if(!Ui)Mn(Si.numGlyphs,mt);else for(var cn=0;cn<Si.numGlyphs;cn++)e.addDynamicAttributes(mt,Ui.shiftedAnchor,Ui.angle)}}ge.icon.dynamicLayoutVertexBuffer.updateData(mt)}ge.text.dynamicLayoutVertexBuffer.updateData(pr)}function ze(ge,K,xe){return xe.iconsInText&&K?"symbolTextAndIcon":ge?"symbolSDF":"symbolIcon"}function ht(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr){for(var pr=ge.context,mt=pr.gl,St=ge.transform,Ft=Qe==="map",rr=vt==="map",hr=Ft&&xe.layout.get("symbol-placement")!=="point",nr=Ft&&!rr&&!hr,dr=xe.layout.get("symbol-sort-key").constantOr(1)!==void 0,or=!1,Wt=ge.depthModeForSublayer(0,Ia.ReadOnly),ir=xe.layout.get("text-variable-anchor"),Vt=[],Dr=0,Jr=te;Dr<Jr.length;Dr+=1){var ga=Jr[Dr],vi=K.getTile(ga),Ga=vi.getBucket(xe);if(Ga){var ai=ye?Ga.text:Ga.icon;if(!(!ai||!ai.segments.get().length)){var Zi=ai.programConfigurations.get(xe.id),Fi=ye||Ga.sdfIcons,ui=ye?Ga.textSizeData:Ga.iconSizeData,_i=rr||St.pitch!==0,Si=ge.useProgram(ze(Fi,ye,Ga),Zi),Ui=e.evaluateSizeForZoom(ui,St.zoom),cn=void 0,yo=[0,0],Uo=void 0,Is=void 0,Fo=null,Es=void 0;if(ye){if(Uo=vi.glyphAtlasTexture,Is=mt.LINEAR,cn=vi.glyphAtlasTexture.size,Ga.iconsInText){yo=vi.imageAtlasTexture.size,Fo=vi.imageAtlasTexture;var Ks=ui.kind==="composite"||ui.kind==="camera";Es=_i||ge.options.rotating||ge.options.zooming||Ks?mt.LINEAR:mt.NEAREST}}else{var mu=xe.layout.get("icon-size").constantOr(0)!==1||Ga.iconsNeedLinear;Uo=vi.imageAtlasTexture,Is=Fi||ge.options.rotating||ge.options.zooming||mu||_i?mt.LINEAR:mt.NEAREST,cn=vi.imageAtlasTexture.size}var Ep=is(vi,1,ge.transform.zoom),kp=_a(ga.posMatrix,rr,Ft,ge.transform,Ep),Ph=Ai(ga.posMatrix,rr,Ft,ge.transform,Ep),qp=ir&&Ga.hasTextData(),qd=xe.layout.get("icon-text-fit")!=="none"&&qp&&Ga.hasIconData();hr&&Ln(Ga,ga.posMatrix,ge,ye,kp,Ph,rr,qt);var ed=ge.translatePosMatrix(ga.posMatrix,vi,je,ke),Ih=hr||ye&&ir||qd?Fe:kp,td=ge.translatePosMatrix(Ph,vi,je,ke,!0),Kh=Fi&&xe.paint.get(ye?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Rh=void 0;Fi?Ga.iconsInText?Rh=bu(ui.kind,Ui,nr,rr,ge,ed,Ih,td,cn,yo):Rh=Ic(ui.kind,Ui,nr,rr,ge,ed,Ih,td,ye,cn,!0):Rh=Zu(ui.kind,Ui,nr,rr,ge,ed,Ih,td,ye,cn);var Cp={program:Si,buffers:ai,uniformValues:Rh,atlasTexture:Uo,atlasTextureIcon:Fo,atlasInterpolation:Is,atlasInterpolationIcon:Es,isSDF:Fi,hasHalo:Kh};if(dr&&Ga.canOverlap){or=!0;for(var Vp=ai.segments.get(),Lp=0,Cv=Vp;Lp<Cv.length;Lp+=1){var Vd=Cv[Lp];Vt.push({segments:new e.SegmentVector([Vd]),sortKey:Vd.sortKey,state:Cp})}}else Vt.push({segments:ai.segments,sortKey:0,state:Cp})}}}or&&Vt.sort(function(nm,om){return nm.sortKey-om.sortKey});for(var Gf=0,Gd=Vt;Gf<Gd.length;Gf+=1){var Lv=Gd[Gf],ph=Lv.state;if(pr.activeTexture.set(mt.TEXTURE0),ph.atlasTexture.bind(ph.atlasInterpolation,mt.CLAMP_TO_EDGE),ph.atlasTextureIcon&&(pr.activeTexture.set(mt.TEXTURE1),ph.atlasTextureIcon&&ph.atlasTextureIcon.bind(ph.atlasInterpolationIcon,mt.CLAMP_TO_EDGE)),ph.isSDF){var iv=ph.uniformValues;ph.hasHalo&&(iv.u_is_halo=1,wt(ph.buffers,Lv.segments,xe,ge,ph.program,Wt,wr,Nr,iv)),iv.u_is_halo=0}wt(ph.buffers,Lv.segments,xe,ge,ph.program,Wt,wr,Nr,ph.uniformValues)}}function wt(ge,K,xe,te,ye,je,ke,Qe,vt){var qt=te.context,wr=qt.gl;ye.draw(qt,wr.TRIANGLES,je,ke,Qe,Fr.disabled,vt,xe.id,ge.layoutVertexBuffer,ge.indexBuffer,K,xe.paint,te.transform.zoom,ge.programConfigurations.get(xe.id),ge.dynamicLayoutVertexBuffer,ge.opacityVertexBuffer)}function Ot(ge,K,xe,te){if(ge.renderPass==="translucent"){var ye=xe.paint.get("circle-opacity"),je=xe.paint.get("circle-stroke-width"),ke=xe.paint.get("circle-stroke-opacity"),Qe=xe.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(ye.constantOr(1)===0&&(je.constantOr(1)===0||ke.constantOr(1)===0))){for(var vt=ge.context,qt=vt.gl,wr=ge.depthModeForSublayer(0,Ia.ReadOnly),Nr=Ca.disabled,pr=ge.colorModeForRenderPass(),mt=[],St=0;St<te.length;St++){var Ft=te[St],rr=K.getTile(Ft),hr=rr.getBucket(xe);if(hr){var nr=hr.programConfigurations.get(xe.id),dr=ge.useProgram("circle",nr),or=hr.layoutVertexBuffer,Wt=hr.indexBuffer,ir=br(ge,Ft,rr,xe),Vt={programConfiguration:nr,program:dr,layoutVertexBuffer:or,indexBuffer:Wt,uniformValues:ir};if(Qe)for(var Dr=hr.segments.get(),Jr=0,ga=Dr;Jr<ga.length;Jr+=1){var vi=ga[Jr];mt.push({segments:new e.SegmentVector([vi]),sortKey:vi.sortKey,state:Vt})}else mt.push({segments:hr.segments,sortKey:0,state:Vt})}}Qe&&mt.sort(function(Uo,Is){return Uo.sortKey-Is.sortKey});for(var Ga=0,ai=mt;Ga<ai.length;Ga+=1){var Zi=ai[Ga],Fi=Zi.state,ui=Fi.programConfiguration,_i=Fi.program,Si=Fi.layoutVertexBuffer,Ui=Fi.indexBuffer,cn=Fi.uniformValues,yo=Zi.segments;_i.draw(vt,qt.TRIANGLES,wr,Nr,pr,Fr.disabled,cn,xe.id,Si,Ui,yo,xe.paint,ge.transform.zoom,ui)}}}}function $t(ge,K,xe,te){if(xe.paint.get("heatmap-opacity")!==0)if(ge.renderPass==="offscreen"){var ye=ge.context,je=ye.gl,ke=Ca.disabled,Qe=new Dt([je.ONE,je.ONE],e.Color.transparent,[!0,!0,!0,!0]);Tr(ye,ge,xe),ye.clear({color:e.Color.transparent});for(var vt=0;vt<te.length;vt++){var qt=te[vt];if(!K.hasRenderableParent(qt)){var wr=K.getTile(qt),Nr=wr.getBucket(xe);if(Nr){var pr=Nr.programConfigurations.get(xe.id),mt=ge.useProgram("heatmap",pr),St=ge.transform,Ft=St.zoom;mt.draw(ye,je.TRIANGLES,Ia.disabled,ke,Qe,Fr.disabled,Ni(qt.posMatrix,wr,Ft,xe.paint.get("heatmap-intensity")),xe.id,Nr.layoutVertexBuffer,Nr.indexBuffer,Nr.segments,xe.paint,ge.transform.zoom,pr)}}}ye.viewport.set([0,0,ge.width,ge.height])}else ge.renderPass==="translucent"&&(ge.context.setColorMode(ge.colorModeForRenderPass()),Kr(ge,xe))}function Tr(ge,K,xe){var te=ge.gl;ge.activeTexture.set(te.TEXTURE1),ge.viewport.set([0,0,K.width/4,K.height/4]);var ye=xe.heatmapFbo;if(ye)te.bindTexture(te.TEXTURE_2D,ye.colorAttachment.get()),ge.bindFramebuffer.set(ye.framebuffer);else{var je=te.createTexture();te.bindTexture(te.TEXTURE_2D,je),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_S,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_T,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,te.LINEAR),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,te.LINEAR),ye=xe.heatmapFbo=ge.createFramebuffer(K.width/4,K.height/4,!1),Ar(ge,K,je,ye)}}function Ar(ge,K,xe,te){var ye=ge.gl,je=ge.extRenderToTextureHalfFloat?ge.extTextureHalfFloat.HALF_FLOAT_OES:ye.UNSIGNED_BYTE;ye.texImage2D(ye.TEXTURE_2D,0,ye.RGBA,K.width/4,K.height/4,0,ye.RGBA,je,null),te.colorAttachment.set(xe)}function Kr(ge,K){var xe=ge.context,te=xe.gl,ye=K.heatmapFbo;if(ye){xe.activeTexture.set(te.TEXTURE0),te.bindTexture(te.TEXTURE_2D,ye.colorAttachment.get()),xe.activeTexture.set(te.TEXTURE1);var je=K.colorRampTexture;je||(je=K.colorRampTexture=new e.Texture(xe,K.colorRamp,te.RGBA)),je.bind(te.LINEAR,te.CLAMP_TO_EDGE),ge.useProgram("heatmapTexture").draw(xe,te.TRIANGLES,Ia.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,mi(ge,K,0,1),K.id,ge.viewportBuffer,ge.quadTriangleIndexBuffer,ge.viewportSegments,K.paint,ge.transform.zoom)}}function na(ge,K,xe,te){if(ge.renderPass==="translucent"){var ye=xe.paint.get("line-opacity"),je=xe.paint.get("line-width");if(!(ye.constantOr(1)===0||je.constantOr(1)===0))for(var ke=ge.depthModeForSublayer(0,Ia.ReadOnly),Qe=ge.colorModeForRenderPass(),vt=xe.paint.get("line-dasharray"),qt=xe.paint.get("line-pattern"),wr=qt.constantOr(1),Nr=xe.paint.get("line-gradient"),pr=xe.getCrossfadeParameters(),mt=wr?"linePattern":vt?"lineSDF":Nr?"lineGradient":"line",St=ge.context,Ft=St.gl,rr=!0,hr=0,nr=te;hr<nr.length;hr+=1){var dr=nr[hr],or=K.getTile(dr);if(!(wr&&!or.patternsLoaded())){var Wt=or.getBucket(xe);if(Wt){var ir=Wt.programConfigurations.get(xe.id),Vt=ge.context.program.get(),Dr=ge.useProgram(mt,ir),Jr=rr||Dr.program!==Vt,ga=qt.constantOr(null);if(ga&&or.imageAtlas){var vi=or.imageAtlas,Ga=vi.patternPositions[ga.to.toString()],ai=vi.patternPositions[ga.from.toString()];Ga&&ai&&ir.setConstantPatternPositions(Ga,ai)}var Zi=wr?Ns(ge,or,xe,pr):vt?el(ge,or,xe,vt,pr):Nr?rl(ge,or,xe,Wt.lineClipsArray.length):Ms(ge,or,xe);if(wr)St.activeTexture.set(Ft.TEXTURE0),or.imageAtlasTexture.bind(Ft.LINEAR,Ft.CLAMP_TO_EDGE),ir.updatePaintBuffers(pr);else if(vt&&(Jr||ge.lineAtlas.dirty))St.activeTexture.set(Ft.TEXTURE0),ge.lineAtlas.bind(St);else if(Nr){var Fi=Wt.gradients[xe.id],ui=Fi.texture;if(xe.gradientVersion!==Fi.version){var _i=256;if(xe.stepInterpolant){var Si=K.getSource().maxzoom,Ui=dr.canonical.z===Si?Math.ceil(1<<ge.transform.maxZoom-dr.canonical.z):1,cn=Wt.maxLineLength/e.EXTENT,yo=1024,Uo=cn*yo*Ui;_i=e.clamp(e.nextPowerOfTwo(Uo),256,St.maxTextureSize)}Fi.gradient=e.renderColorRamp({expression:xe.gradientExpression(),evaluationKey:"lineProgress",resolution:_i,image:Fi.gradient||void 0,clips:Wt.lineClipsArray}),Fi.texture?Fi.texture.update(Fi.gradient):Fi.texture=new e.Texture(St,Fi.gradient,Ft.RGBA),Fi.version=xe.gradientVersion,ui=Fi.texture}St.activeTexture.set(Ft.TEXTURE0),ui.bind(xe.stepInterpolant?Ft.NEAREST:Ft.LINEAR,Ft.CLAMP_TO_EDGE)}Dr.draw(St,Ft.TRIANGLES,ke,ge.stencilModeForClipping(dr),Qe,Fr.disabled,Zi,xe.id,Wt.layoutVertexBuffer,Wt.indexBuffer,Wt.segments,xe.paint,ge.transform.zoom,ir,Wt.layoutVertexBuffer2),rr=!1}}}}}function Ve(ge,K,xe,te){var ye=xe.paint.get("fill-color"),je=xe.paint.get("fill-opacity");if(je.constantOr(1)!==0){var ke=ge.colorModeForRenderPass(),Qe=xe.paint.get("fill-pattern"),vt=ge.opaquePassEnabledForLayer()&&!Qe.constantOr(1)&&ye.constantOr(e.Color.transparent).a===1&&je.constantOr(0)===1?"opaque":"translucent";if(ge.renderPass===vt){var qt=ge.depthModeForSublayer(1,ge.renderPass==="opaque"?Ia.ReadWrite:Ia.ReadOnly);$e(ge,K,xe,te,qt,ke,!1)}if(ge.renderPass==="translucent"&&xe.paint.get("fill-antialias")){var wr=ge.depthModeForSublayer(xe.getPaintProperty("fill-outline-color")?2:0,Ia.ReadOnly);$e(ge,K,xe,te,wr,ke,!0)}}}function $e(ge,K,xe,te,ye,je,ke){var Qe=ge.context.gl,vt=xe.paint.get("fill-pattern"),qt=vt&&vt.constantOr(1),wr=xe.getCrossfadeParameters(),Nr,pr,mt,St,Ft;ke?(pr=qt&&!xe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Nr=Qe.LINES):(pr=qt?"fillPattern":"fill",Nr=Qe.TRIANGLES);for(var rr=0,hr=te;rr<hr.length;rr+=1){var nr=hr[rr],dr=K.getTile(nr);if(!(qt&&!dr.patternsLoaded())){var or=dr.getBucket(xe);if(or){var Wt=or.programConfigurations.get(xe.id),ir=ge.useProgram(pr,Wt);qt&&(ge.context.activeTexture.set(Qe.TEXTURE0),dr.imageAtlasTexture.bind(Qe.LINEAR,Qe.CLAMP_TO_EDGE),Wt.updatePaintBuffers(wr));var Vt=vt.constantOr(null);if(Vt&&dr.imageAtlas){var Dr=dr.imageAtlas,Jr=Dr.patternPositions[Vt.to.toString()],ga=Dr.patternPositions[Vt.from.toString()];Jr&&ga&&Wt.setConstantPatternPositions(Jr,ga)}var vi=ge.translatePosMatrix(nr.posMatrix,dr,xe.paint.get("fill-translate"),xe.paint.get("fill-translate-anchor"));if(!ke)St=or.indexBuffer,Ft=or.segments,mt=qt?Jc(vi,ge,wr,dr):Lc(vi);else{St=or.indexBuffer2,Ft=or.segments2;var Ga=[Qe.drawingBufferWidth,Qe.drawingBufferHeight];mt=pr==="fillOutlinePattern"&&qt?Pc(vi,ge,wr,dr,Ga):sc(vi,Ga)}ir.draw(ge.context,Nr,ye,ge.stencilModeForClipping(nr),je,Fr.disabled,mt,xe.id,or.layoutVertexBuffer,St,Ft,xe.paint,ge.transform.zoom,Wt)}}}}function ot(ge,K,xe,te){var ye=xe.paint.get("fill-extrusion-opacity");if(ye!==0&&ge.renderPass==="translucent"){var je=new Ia(ge.context.gl.LEQUAL,Ia.ReadWrite,ge.depthRangeFor3D);if(ye===1&&!xe.paint.get("fill-extrusion-pattern").constantOr(1)){var ke=ge.colorModeForRenderPass();pt(ge,K,xe,te,je,Ca.disabled,ke)}else pt(ge,K,xe,te,je,Ca.disabled,Dt.disabled),pt(ge,K,xe,te,je,ge.stencilModeFor3D(),ge.colorModeForRenderPass())}}function pt(ge,K,xe,te,ye,je,ke){for(var Qe=ge.context,vt=Qe.gl,qt=xe.paint.get("fill-extrusion-pattern"),wr=qt.constantOr(1),Nr=xe.getCrossfadeParameters(),pr=xe.paint.get("fill-extrusion-opacity"),mt=0,St=te;mt<St.length;mt+=1){var Ft=St[mt],rr=K.getTile(Ft),hr=rr.getBucket(xe);if(hr){var nr=hr.programConfigurations.get(xe.id),dr=ge.useProgram(wr?"fillExtrusionPattern":"fillExtrusion",nr);wr&&(ge.context.activeTexture.set(vt.TEXTURE0),rr.imageAtlasTexture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE),nr.updatePaintBuffers(Nr));var or=qt.constantOr(null);if(or&&rr.imageAtlas){var Wt=rr.imageAtlas,ir=Wt.patternPositions[or.to.toString()],Vt=Wt.patternPositions[or.from.toString()];ir&&Vt&&nr.setConstantPatternPositions(ir,Vt)}var Dr=ge.translatePosMatrix(Ft.posMatrix,rr,xe.paint.get("fill-extrusion-translate"),xe.paint.get("fill-extrusion-translate-anchor")),Jr=xe.paint.get("fill-extrusion-vertical-gradient"),ga=wr?Xu(Dr,ge,Jr,pr,Ft,Nr,rr):Vf(Dr,ge,Jr,pr);dr.draw(Qe,Qe.gl.TRIANGLES,ye,je,ke,Fr.backCCW,ga,xe.id,hr.layoutVertexBuffer,hr.indexBuffer,hr.segments,xe.paint,ge.transform.zoom,nr)}}}function Et(ge,K,xe,te){if(!(ge.renderPass!=="offscreen"&&ge.renderPass!=="translucent")){for(var ye=ge.context,je=ge.depthModeForSublayer(0,Ia.ReadOnly),ke=ge.colorModeForRenderPass(),Qe=ge.renderPass==="translucent"?ge.stencilConfigForOverlap(te):[{},te],vt=Qe[0],qt=Qe[1],wr=0,Nr=qt;wr<Nr.length;wr+=1){var pr=Nr[wr],mt=K.getTile(pr);mt.needsHillshadePrepare&&ge.renderPass==="offscreen"?Rt(ge,mt,xe,je,Ca.disabled,ke):ge.renderPass==="translucent"&&bt(ge,mt,xe,je,vt[pr.overscaledZ],ke)}ye.viewport.set([0,0,ge.width,ge.height])}}function bt(ge,K,xe,te,ye,je){var ke=ge.context,Qe=ke.gl,vt=K.fbo;if(vt){var qt=ge.useProgram("hillshade");ke.activeTexture.set(Qe.TEXTURE0),Qe.bindTexture(Qe.TEXTURE_2D,vt.colorAttachment.get());var wr=no(ge,K,xe);qt.draw(ke,Qe.TRIANGLES,te,ye,je,Fr.disabled,wr,xe.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments)}}function Rt(ge,K,xe,te,ye,je){var ke=ge.context,Qe=ke.gl,vt=K.dem;if(vt&&vt.data){var qt=vt.dim,wr=vt.stride,Nr=vt.getPixels();if(ke.activeTexture.set(Qe.TEXTURE1),ke.pixelStoreUnpackPremultiplyAlpha.set(!1),K.demTexture=K.demTexture||ge.getTileTexture(wr),K.demTexture){var pr=K.demTexture;pr.update(Nr,{premultiply:!1}),pr.bind(Qe.NEAREST,Qe.CLAMP_TO_EDGE)}else K.demTexture=new e.Texture(ke,Nr,Qe.RGBA,{premultiply:!1}),K.demTexture.bind(Qe.NEAREST,Qe.CLAMP_TO_EDGE);ke.activeTexture.set(Qe.TEXTURE0);var mt=K.fbo;if(!mt){var St=new e.Texture(ke,{width:qt,height:qt,data:null},Qe.RGBA);St.bind(Qe.LINEAR,Qe.CLAMP_TO_EDGE),mt=K.fbo=ke.createFramebuffer(qt,qt,!0),mt.colorAttachment.set(St.texture)}ke.bindFramebuffer.set(mt.framebuffer),ke.viewport.set([0,0,qt,qt]),ge.useProgram("hillshadePrepare").draw(ke,Qe.TRIANGLES,te,ye,je,Fr.disabled,Qn(K.tileID,vt),xe.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments),K.needsHillshadePrepare=!1}}function lr(ge,K,xe,te){if(ge.renderPass==="translucent"&&xe.paint.get("raster-opacity")!==0&&te.length)for(var ye=ge.context,je=ye.gl,ke=K.getSource(),Qe=ge.useProgram("raster"),vt=ge.colorModeForRenderPass(),qt=ke instanceof ce?[{},te]:ge.stencilConfigForOverlap(te),wr=qt[0],Nr=qt[1],pr=Nr[Nr.length-1].overscaledZ,mt=!ge.options.moving,St=0,Ft=Nr;St<Ft.length;St+=1){var rr=Ft[St],hr=ge.depthModeForSublayer(rr.overscaledZ-pr,xe.paint.get("raster-opacity")===1?Ia.ReadWrite:Ia.ReadOnly,je.LESS),nr=K.getTile(rr),dr=ge.transform.calculatePosMatrix(rr.toUnwrapped(),mt);nr.registerFadeDuration(xe.paint.get("raster-fade-duration"));var or=K.findLoadedParent(rr,0),Wt=yr(nr,or,K,xe,ge.transform),ir=void 0,Vt=void 0,Dr=xe.paint.get("raster-resampling")==="nearest"?je.NEAREST:je.LINEAR;ye.activeTexture.set(je.TEXTURE0),nr.texture.bind(Dr,je.CLAMP_TO_EDGE,je.LINEAR_MIPMAP_NEAREST),ye.activeTexture.set(je.TEXTURE1),or?(or.texture.bind(Dr,je.CLAMP_TO_EDGE,je.LINEAR_MIPMAP_NEAREST),ir=Math.pow(2,or.tileID.overscaledZ-nr.tileID.overscaledZ),Vt=[nr.tileID.canonical.x*ir%1,nr.tileID.canonical.y*ir%1]):nr.texture.bind(Dr,je.CLAMP_TO_EDGE,je.LINEAR_MIPMAP_NEAREST);var Jr=ll(dr,Vt||[0,0],ir||1,Wt,xe);ke instanceof ce?Qe.draw(ye,je.TRIANGLES,hr,Ca.disabled,vt,Fr.disabled,Jr,xe.id,ke.boundsBuffer,ge.quadTriangleIndexBuffer,ke.boundsSegments):Qe.draw(ye,je.TRIANGLES,hr,wr[rr.overscaledZ],vt,Fr.disabled,Jr,xe.id,ge.rasterBoundsBuffer,ge.quadTriangleIndexBuffer,ge.rasterBoundsSegments)}}function yr(ge,K,xe,te,ye){var je=te.paint.get("raster-fade-duration");if(je>0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/je,vt=K?(ke-K.timeAdded)/je:-1,qt=xe.getSource(),wr=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Nr=!K||Math.abs(K.tileID.overscaledZ-wr)>Math.abs(ge.tileID.overscaledZ-wr),pr=Nr&&ge.refreshedUponExpiration?1:e.clamp(Nr?Qe:1-vt,0,1);return ge.refreshedUponExpiration&&Qe>=1&&(ge.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function kr(ge,K,xe){var te=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var je=ge.context,ke=je.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var wr=!qt&&te.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===wr){var Nr=Ca.disabled,pr=ge.depthModeForSublayer(0,wr==="opaque"?Ia.ReadWrite:Ia.ReadOnly),mt=ge.colorModeForRenderPass(),St=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(je.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,nr=Ft;hr<nr.length;hr+=1){var dr=nr[hr],or=ge.transform.calculatePosMatrix(dr.toUnwrapped()),Wt=qt?fo(or,ye,ge,qt,{tileID:dr,tileSize:vt},rr):yc(or,ye,te);St.draw(je,ke.TRIANGLES,pr,Nr,mt,Fr.disabled,Wt,xe.id,ge.tileExtentBuffer,ge.quadTriangleIndexBuffer,ge.tileExtentSegments)}}}}}var jr=new e.Color(1,0,0,1),Qr=new e.Color(0,1,0,1),ha=new e.Color(0,0,1,1),Aa=new e.Color(1,0,1,1),Da=new e.Color(0,1,1,1);function ci(ge){var K=ge.transform.padding,xe=3;ji(ge,ge.transform.height-(K.top||0),xe,jr),ji(ge,K.bottom||0,xe,Qr),on(ge,K.left||0,xe,ha),on(ge,ge.transform.width-(K.right||0),xe,Aa);var te=ge.transform.centerPoint;Vi(ge,te.x,ge.transform.height-te.y,Da)}function Vi(ge,K,xe,te){var ye=20,je=2;An(ge,K-je/2,xe-ye/2,je,ye,te),An(ge,K-ye/2,xe-je/2,ye,je,te)}function ji(ge,K,xe,te){An(ge,0,K+xe/2,ge.transform.width,xe,te)}function on(ge,K,xe,te){An(ge,K-xe/2,0,xe,ge.transform.height,te)}function An(ge,K,xe,te,ye,je){var ke=ge.context,Qe=ke.gl;Qe.enable(Qe.SCISSOR_TEST),Qe.scissor(K*e.browser.devicePixelRatio,xe*e.browser.devicePixelRatio,te*e.browser.devicePixelRatio,ye*e.browser.devicePixelRatio),ke.clear({color:je}),Qe.disable(Qe.SCISSOR_TEST)}function Yn(ge,K,xe){for(var te=0;te<xe.length;te++)Nn(ge,K,xe[te])}function Nn(ge,K,xe){var te=ge.context,ye=te.gl,je=xe.posMatrix,ke=ge.useProgram("debug"),Qe=Ia.disabled,vt=Ca.disabled,qt=ge.colorModeForRenderPass(),wr="$debug";te.activeTexture.set(ye.TEXTURE0),ge.emptyTexture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ke.draw(te,ye.LINE_STRIP,Qe,vt,qt,Fr.disabled,Hi(je,e.Color.red),wr,ge.debugBuffer,ge.tileBorderIndexBuffer,ge.debugSegments);var Nr=K.getTileByID(xe.key).latestRawTileData,pr=Nr&&Nr.byteLength||0,mt=Math.floor(pr/1024),St=K.getTile(xe).tileSize,Ft=512/Math.min(St,512)*(xe.overscaledZ/ge.transform.zoom)*.5,rr=xe.canonical.toString();xe.overscaledZ!==xe.canonical.z&&(rr+=" => "+xe.overscaledZ);var hr=rr+" "+mt+"kb";wo(ge,hr),ke.draw(te,ye.TRIANGLES,Qe,vt,Dt.alphaBlended,Fr.disabled,Hi(je,e.Color.transparent,Ft),wr,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function wo(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,te=ge.context.gl,ye=ge.debugOverlayCanvas.getContext("2d");ye.clearRect(0,0,xe.width,xe.height),ye.shadowColor="white",ye.shadowBlur=2,ye.lineWidth=1.5,ye.strokeStyle="white",ye.textBaseline="top",ye.font="bold 36px Open Sans, sans-serif",ye.fillText(K,5,5),ye.strokeText(K,5,5),ge.debugOverlayTexture.update(xe),ge.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function os(ge,K,xe){var te=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var je=ye.prerender;je&&(ge.setCustomLayerDefaults(),te.setColorMode(ge.colorModeForRenderPass()),je.call(ye,te.gl,ge.transform.customLayerMatrix()),te.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),te.setColorMode(ge.colorModeForRenderPass()),te.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ia(ge.context.gl.LEQUAL,Ia.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ia.ReadOnly);te.setDepthMode(ke),ye.render(te.gl,ge.transform.customLayerMatrix()),te.setDirty(),ge.setBaseState(),te.bindFramebuffer.set(null)}}var So={symbol:I,circle:Ot,heatmap:$t,line:na,fill:Ve,"fill-extrusion":ot,hillshade:Et,raster:lr,background:kr,debug:Yn,custom:os},Zo=function(K,xe){this.context=new ta(K),this.transform=xe,this._tileTextures={},this.setup(),this.numSublayers=ra.maxUnderzooming+ra.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new vl,this.gpuTimers={}};Zo.prototype.resize=function(K,xe){if(this.width=K*e.browser.devicePixelRatio,this.height=xe*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,ye=this.style._order;te<ye.length;te+=1){var je=ye[te];this.style._layers[je].resize()}},Zo.prototype.setup=function(){var K=this.context,xe=new e.StructArrayLayout2i4;xe.emplaceBack(0,0),xe.emplaceBack(e.EXTENT,0),xe.emplaceBack(0,e.EXTENT),xe.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=K.createVertexBuffer(xe,su.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var te=new e.StructArrayLayout2i4;te.emplaceBack(0,0),te.emplaceBack(e.EXTENT,0),te.emplaceBack(0,e.EXTENT),te.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=K.createVertexBuffer(te,su.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var ye=new e.StructArrayLayout4i8;ye.emplaceBack(0,0,0,0),ye.emplaceBack(e.EXTENT,0,e.EXTENT,0),ye.emplaceBack(0,e.EXTENT,0,e.EXTENT),ye.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=K.createVertexBuffer(ye,le.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var je=new e.StructArrayLayout2i4;je.emplaceBack(0,0),je.emplaceBack(1,0),je.emplaceBack(0,1),je.emplaceBack(1,1),this.viewportBuffer=K.createVertexBuffer(je,su.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var ke=new e.StructArrayLayout1ui2;ke.emplaceBack(0),ke.emplaceBack(1),ke.emplaceBack(3),ke.emplaceBack(2),ke.emplaceBack(0),this.tileBorderIndexBuffer=K.createIndexBuffer(ke);var Qe=new e.StructArrayLayout3ui6;Qe.emplaceBack(0,1,2),Qe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=K.createIndexBuffer(Qe),this.emptyTexture=new e.Texture(K,{width:1,height:1,data:new Uint8Array([0,0,0,0])},K.gl.RGBA);var vt=this.context.gl;this.stencilClearMode=new Ca({func:vt.ALWAYS,mask:0},0,255,vt.ZERO,vt.ZERO,vt.ZERO)},Zo.prototype.clearStencil=function(){var K=this.context,xe=K.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var te=e.create();e.ortho(te,0,this.width,this.height,0,0,1),e.scale(te,te,[xe.drawingBufferWidth,xe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(K,xe.TRIANGLES,Ia.disabled,this.stencilClearMode,Dt.disabled,Fr.disabled,pn(te),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Zo.prototype._renderTileClippingMasks=function(K,xe){if(!(this.currentStencilSource===K.source||!K.isTileClipped()||!xe||!xe.length)){this.currentStencilSource=K.source;var te=this.context,ye=te.gl;this.nextStencilID+xe.length>256&&this.clearStencil(),te.setColorMode(Dt.disabled),te.setDepthMode(Ia.disabled);var je=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ke=0,Qe=xe;ke<Qe.length;ke+=1){var vt=Qe[ke],qt=this._tileClippingMaskIDs[vt.key]=this.nextStencilID++;je.draw(te,ye.TRIANGLES,Ia.disabled,new Ca({func:ye.ALWAYS,mask:0},qt,255,ye.KEEP,ye.KEEP,ye.REPLACE),Dt.disabled,Fr.disabled,pn(vt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Zo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var K=this.nextStencilID++,xe=this.context.gl;return new Ca({func:xe.NOTEQUAL,mask:255},K,255,xe.KEEP,xe.KEEP,xe.REPLACE)},Zo.prototype.stencilModeForClipping=function(K){var xe=this.context.gl;return new Ca({func:xe.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,xe.KEEP,xe.KEEP,xe.REPLACE)},Zo.prototype.stencilConfigForOverlap=function(K){var xe,te=this.context.gl,ye=K.sort(function(qt,wr){return wr.overscaledZ-qt.overscaledZ}),je=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-je+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt<ke;vt++)Qe[vt+je]=new Ca({func:te.GEQUAL,mask:255},vt+this.nextStencilID,255,te.KEEP,te.KEEP,te.REPLACE);return this.nextStencilID+=ke,[Qe,ye]}return[(xe={},xe[je]=Ca.disabled,xe),ye]},Zo.prototype.colorModeForRenderPass=function(){var K=this.context.gl;if(this._showOverdrawInspector){var xe=8,te=1/xe;return new Dt([K.CONSTANT_COLOR,K.ONE],new e.Color(te,te,te,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Dt.unblended:Dt.alphaBlended},Zo.prototype.depthModeForSublayer=function(K,xe,te){if(!this.opaquePassEnabledForLayer())return Ia.disabled;var ye=1-((1+this.currentLayer)*this.numSublayers+K)*this.depthEpsilon;return new Ia(te||this.context.gl.LEQUAL,xe,[ye,ye])},Zo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Zo.prototype.render=function(K,xe){var te=this;this.style=K,this.options=xe,this.lineAtlas=K.lineAtlas,this.imageManager=K.imageManager,this.glyphManager=K.glyphManager,this.symbolFadeChange=K.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var ye=this.style._order,je=this.style.sourceCaches;for(var ke in je){var Qe=je[ke];Qe.used&&Qe.prepare(this.context)}var vt={},qt={},wr={};for(var Nr in je){var pr=je[Nr];vt[Nr]=pr.getVisibleCoordinates(),qt[Nr]=vt[Nr].slice().reverse(),wr[Nr]=pr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var mt=0;mt<ye.length;mt++){var St=ye[mt];if(this.style._layers[St].is3D()){this.opaquePassCutoff=mt;break}}this.renderPass="offscreen";for(var Ft=0,rr=ye;Ft<rr.length;Ft+=1){var hr=rr[Ft],nr=this.style._layers[hr];if(!(!nr.hasOffscreenPass()||nr.isHidden(this.transform.zoom))){var dr=qt[nr.source];nr.type!=="custom"&&!dr.length||this.renderLayer(this,je[nr.source],nr,dr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:xe.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=xe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(K._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=ye.length-1;this.currentLayer>=0;this.currentLayer--){var or=this.style._layers[ye[this.currentLayer]],Wt=je[or.source],ir=vt[or.source];this._renderTileClippingMasks(or,ir),this.renderLayer(this,Wt,or,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<ye.length;this.currentLayer++){var Vt=this.style._layers[ye[this.currentLayer]],Dr=je[Vt.source],Jr=(Vt.type==="symbol"?wr:qt)[Vt.source];this._renderTileClippingMasks(Vt,vt[Vt.source]),this.renderLayer(this,Dr,Vt,Jr)}if(this.options.showTileBoundaries){var ga,vi,Ga=e.values(this.style._layers);Ga.forEach(function(ai){ai.source&&!ai.isHidden(te.transform.zoom)&&(ai.source!==(vi&&vi.id)&&(vi=te.style.sourceCaches[ai.source]),(!ga||ga.getSource().maxzoom<vi.getSource().maxzoom)&&(ga=vi))}),ga&&So.debug(this,ga,ga.getVisibleCoordinates())}this.options.showPadding&&ci(this),this.context.setDefault()},Zo.prototype.renderLayer=function(K,xe,te,ye){te.isHidden(this.transform.zoom)||te.type!=="background"&&te.type!=="custom"&&!ye.length||(this.id=te.id,this.gpuTimingStart(te),So[te.type](K,xe,te,ye,this.style.placement.variableOffsets),this.gpuTimingEnd())},Zo.prototype.gpuTimingStart=function(K){if(this.options.gpuTiming){var xe=this.context.extTimerQuery,te=this.gpuTimers[K.id];te||(te=this.gpuTimers[K.id]={calls:0,cpuTime:0,query:xe.createQueryEXT()}),te.calls++,xe.beginQueryEXT(xe.TIME_ELAPSED_EXT,te.query)}},Zo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var K=this.context.extTimerQuery;K.endQueryEXT(K.TIME_ELAPSED_EXT)}},Zo.prototype.collectGpuTimers=function(){var K=this.gpuTimers;return this.gpuTimers={},K},Zo.prototype.queryGpuTimers=function(K){var xe={};for(var te in K){var ye=K[te],je=this.context.extTimerQuery,ke=je.getQueryObjectEXT(ye.query,je.QUERY_RESULT_EXT)/(1e3*1e3);je.deleteQueryEXT(ye.query),xe[te]=ke}return xe},Zo.prototype.translatePosMatrix=function(K,xe,te,ye,je){if(!te[0]&&!te[1])return K;var ke=je?ye==="map"?this.transform.angle:0:ye==="viewport"?-this.transform.angle:0;if(ke){var Qe=Math.sin(ke),vt=Math.cos(ke);te=[te[0]*vt-te[1]*Qe,te[0]*Qe+te[1]*vt]}var qt=[je?te[0]:is(xe,te[0],this.transform.zoom),je?te[1]:is(xe,te[1],this.transform.zoom),0],wr=new Float32Array(16);return e.translate(wr,K,qt),wr},Zo.prototype.saveTileTexture=function(K){var xe=this._tileTextures[K.size[0]];xe?xe.push(K):this._tileTextures[K.size[0]]=[K]},Zo.prototype.getTileTexture=function(K){var xe=this._tileTextures[K];return xe&&xe.length>0?xe.pop():null},Zo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),te=this.imageManager.getPattern(K.to.toString());return!xe||!te},Zo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var te=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new gf(this.context,K,uf[K],xe,zo[K],this._showOverdrawInspector)),this.cache[te]},Zo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Zo.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Zo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Zo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var hs=function(K,xe){this.points=K,this.planes=xe};hs.fromInvProjectionMatrix=function(K,xe,te){var ye=[[-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]],je=Math.pow(2,te),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*je)}),Qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],vt=Qe.map(function(qt){var wr=e.sub([],ke[qt[0]],ke[qt[1]]),Nr=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],wr,Nr)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new hs(ke,vt)};var ul=function(K,xe){this.min=K,this.max=xe,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var xe=[K%2===0,K<2],te=e.clone$2(this.min),ye=e.clone$2(this.max),je=0;je<xe.length;je++)te[je]=xe[je]?this.min[je]:this.center[je],ye[je]=xe[je]?this.center[je]:this.max[je];return ye[2]=this.max[2],new ul(te,ye)},ul.prototype.distanceX=function(K){var xe=Math.max(Math.min(this.max[0],K[0]),this.min[0]);return xe-K[0]},ul.prototype.distanceY=function(K){var xe=Math.max(Math.min(this.max[1],K[1]),this.min[1]);return xe-K[1]},ul.prototype.intersects=function(K){for(var xe=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],te=!0,ye=0;ye<K.planes.length;ye++){for(var je=K.planes[ye],ke=0,Qe=0;Qe<xe.length;Qe++)ke+=e.dot$1(je,xe[Qe])>=0;if(ke===0)return 0;ke!==xe.length&&(te=!1)}if(te)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,wr=-Number.MAX_VALUE,Nr=0;Nr<K.points.length;Nr++){var pr=K.points[Nr][vt]-this.min[vt];qt=Math.min(qt,pr),wr=Math.max(wr,pr)}if(wr<0||qt>this.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,te,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),te===void 0&&(te=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(te)||te<0||isNaN(ye)||ye<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=xe,this.left=te,this.right=ye};tl.prototype.interpolate=function(K,xe,te){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,te)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,te)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,te)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,te)),this},tl.prototype.getCenter=function(K,xe){var te=e.clamp((this.left+K-this.right)/2,0,K),ye=e.clamp((this.top+xe-this.bottom)/2,0,xe);return new e.Point(te,ye)},tl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},tl.prototype.clone=function(){return new tl(this.top,this.bottom,this.left,this.right)},tl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jo=function(K,xe,te,ye,je){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=je===void 0?!0:je,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=te??0,this._maxPitch=ye??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new tl,this._posMatrixCache={},this._alignedPosMatrixCache={}},$o={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Jo.prototype.clone=function(){var K=new Jo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},$o.minZoom.get=function(){return this._minZoom},$o.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},$o.maxZoom.get=function(){return this._maxZoom},$o.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},$o.minPitch.get=function(){return this._minPitch},$o.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},$o.maxPitch.get=function(){return this._maxPitch},$o.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},$o.renderWorldCopies.get=function(){return this._renderWorldCopies},$o.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},$o.worldSize.get=function(){return this.tileSize*this.scale},$o.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},$o.size.get=function(){return new e.Point(this.width,this.height)},$o.bearing.get=function(){return-this.angle/Math.PI*180},$o.bearing.set=function(ge){var K=-e.wrap(ge,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},$o.pitch.get=function(){return this._pitch/Math.PI*180},$o.pitch.set=function(ge){var K=e.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},$o.fov.get=function(){return this._fov/Math.PI*180},$o.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},$o.zoom.get=function(){return this._zoom},$o.zoom.set=function(ge){var K=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},$o.center.get=function(){return this._center},$o.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},$o.padding.get=function(){return this._edgeInsets.toJSON()},$o.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},$o.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jo.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Jo.prototype.interpolatePadding=function(K,xe,te){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,te),this._constrain(),this._calcMatrices()},Jo.prototype.coveringZoomLevel=function(K){var xe=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,xe)},Jo.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),je=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(te.x,ye.x,je.x,ke.x)),vt=Math.floor(Math.max(te.x,ye.x,je.x,ke.x)),qt=1,wr=Qe-qt;wr<=vt+qt;wr++)wr!==0&&xe.push(new e.UnwrappedTileID(wr,K));return xe},Jo.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),te=xe;if(K.minzoom!==void 0&&xe<K.minzoom)return[];K.maxzoom!==void 0&&xe>K.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),je=Math.pow(2,xe),ke=[je*ye.x,je*ye.y,0],Qe=hs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,wr=function(Ga){return{aabb:new ul([Ga*je,0,0],[(Ga+1)*je,je,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Nr=[],pr=[],mt=xe,St=K.reparseOverscaled?te:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Nr.push(wr(-Ft)),Nr.push(wr(Ft));for(Nr.push(wr(0));Nr.length>0;){var rr=Nr.pop(),hr=rr.x,nr=rr.y,dr=rr.fullyVisible;if(!dr){var or=rr.aabb.intersects(Qe);if(or===0)continue;dr=or===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Vt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<<mt-rr.zoom)-2;if(rr.zoom===mt||Vt>Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?St:rr.zoom,rr.wrap,rr.zoom,hr,nr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-nr])});continue}for(var Jr=0;Jr<4;Jr++){var ga=(hr<<1)+Jr%2,vi=(nr<<1)+(Jr>>1);Nr.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ga,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ai){return Ga.distanceSq-ai.distanceSq}).map(function(Ga){return Ga.tileID})},Jo.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},$o.unmodified.get=function(){return this._unmodified},Jo.prototype.zoomScale=function(K){return Math.pow(2,K)},Jo.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Jo.prototype.project=function(K){var xe=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(xe)*this.worldSize)},Jo.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},$o.point.get=function(){return this.project(this.center)},Jo.prototype.setLocationAtPoint=function(K,xe){var te=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),je=this.locationCoordinate(K),ke=new e.MercatorCoordinate(je.x-(te.x-ye.x),je.y-(te.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},Jo.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Jo.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Jo.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},Jo.prototype.coordinateLocation=function(K){return K.toLngLat()},Jo.prototype.pointCoordinate=function(K){var xe=0,te=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var je=te[3],ke=ye[3],Qe=te[0]/je,vt=ye[0]/ke,qt=te[1]/je,wr=ye[1]/ke,Nr=te[2]/je,pr=ye[2]/ke,mt=Nr===pr?0:(xe-Nr)/(pr-Nr);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,wr,mt)/this.worldSize)},Jo.prototype.coordinatePoint=function(K){var xe=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(xe,xe,this.pixelMatrix),new e.Point(xe[0]/xe[3],xe[1]/xe[3])},Jo.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},Jo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Jo.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jo.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var te=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[te])return ye[te];var je=K.canonical,ke=this.worldSize/this.zoomScale(je.z),Qe=je.x+Math.pow(2,je.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,je.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[te]=new Float32Array(vt),ye[te]},Jo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,xe=90,te=-180,ye=180,je,ke,Qe,vt,qt=this.size,wr=this._unmodified;if(this.latRange){var Nr=this.latRange;K=e.mercatorYfromLat(Nr[1])*this.worldSize,xe=e.mercatorYfromLat(Nr[0])*this.worldSize,je=xe-K<qt.y?qt.y/(xe-K):0}if(this.lngRange){var pr=this.lngRange;te=e.mercatorXfromLng(pr[0])*this.worldSize,ye=e.mercatorXfromLng(pr[1])*this.worldSize,ke=ye-te<qt.x?qt.x/(ye-te):0}var mt=this.point,St=Math.max(ke||0,je||0);if(St){this.center=this.unproject(new e.Point(ke?(ye+te)/2:mt.x,je?(xe+K)/2:mt.y)),this.zoom+=this.scaleZoom(St),this._unmodified=wr,this._constraining=!1;return}if(this.latRange){var Ft=mt.y,rr=qt.y/2;Ft-rr<K&&(vt=K+rr),Ft+rr>xe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,nr=qt.x/2;hr-nr<te&&(Qe=te+nr),hr+nr>ye&&(Qe=ye-nr)}(Qe!==void 0||vt!==void 0)&&(this.center=this.unproject(new e.Point(Qe!==void 0?Qe:mt.x,vt!==void 0?vt:mt.y))),this._unmodified=wr,this._constraining=!1}},Jo.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var te=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),je=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*je+this.cameraToCenterDistance,wr=qt*1.01,Nr=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Nr,wr),pr[8]=-xe.x*2/this.width,pr[9]=xe.y*2/this.height,e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[0,0,-this.cameraToCenterDistance]),e.rotateX(pr,pr,this._pitch),e.rotateZ(pr,pr,this.angle),e.translate(pr,pr,[-Qe,-vt,0]),this.mercatorMatrix=e.scale([],pr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(pr,pr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=pr,this.invProjMatrix=e.invert([],this.projMatrix);var mt=this.width%2/2,St=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*St,nr=vt-Math.round(vt)+Ft*St+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,nr>.5?nr-1:nr,0]),this.alignedProjMatrix=dr,pr=e.create(),e.scale(pr,pr,[this.width/2,-this.height/2,1]),e.translate(pr,pr,[1,-1,0]),this.labelPlaneMatrix=pr,pr=e.create(),e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[-1,-1,0]),e.scale(pr,pr,[2/this.width,2/this.height,1]),this.glCoordMatrix=pr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),pr=e.invert(new Float64Array(16),this.pixelMatrix),!pr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),xe=[K.x*this.worldSize,K.y*this.worldSize,0,1],te=e.transformMat4(xe,xe,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},Jo.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},Jo.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var te=xe.x,ye=xe.y,je=xe.x,ke=xe.y,Qe=0,vt=K;Qe<vt.length;Qe+=1){var qt=vt[Qe];te=Math.min(te,qt.x),ye=Math.min(ye,qt.y),je=Math.max(je,qt.x),ke=Math.max(ke,qt.y)}return[new e.Point(te,ye),new e.Point(je,ye),new e.Point(je,ke),new e.Point(te,ke),new e.Point(te,ye)]},Object.defineProperties(Jo.prototype,$o);function Il(ge,K){var xe=!1,te=null,ye=function(){te=null,xe&&(ge(),te=setTimeout(ye,K),xe=!1)};return function(){return xe=!0,te||ye(),te}}var eu=function(K){this._hashName=K&&encodeURIComponent(K),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Il(this._updateHashUnthrottled.bind(this),30*1e3/100)};eu.prototype.addTo=function(K){return this._map=K,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},eu.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},eu.prototype.getHashString=function(K){var xe=this._map.getCenter(),te=Math.round(this._map.getZoom()*100)/100,ye=Math.ceil((te*Math.LN2+Math.log(512/360/.5))/Math.LN10),je=Math.pow(10,ye),ke=Math.round(xe.lng*je)/je,Qe=Math.round(xe.lat*je)/je,vt=this._map.getBearing(),qt=this._map.getPitch(),wr="";if(K?wr+="/"+ke+"/"+Qe+"/"+te:wr+=te+"/"+Qe+"/"+ke,(vt||qt)&&(wr+="/"+Math.round(vt*10)/10),qt&&(wr+="/"+Math.round(qt)),this._hashName){var Nr=this._hashName,pr=!1,mt=e.window.location.hash.slice(1).split("&").map(function(St){var Ft=St.split("=")[0];return Ft===Nr?(pr=!0,Ft+"="+wr):St}).filter(function(St){return St});return pr||mt.push(Nr+"="+wr),"#"+mt.join("&")}return"#"+wr},eu.prototype._getCurrentHash=function(){var K=this,xe=e.window.location.hash.replace("#","");if(this._hashName){var te;return xe.split("&").map(function(ye){return ye.split("=")}).forEach(function(ye){ye[0]===K._hashName&&(te=ye)}),(te&&te[1]||"").split("/")}return xe.split("/")},eu.prototype._onHashChange=function(){var K=this._getCurrentHash();if(K.length>=3&&!K.some(function(te){return isNaN(te)})){var xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:xe,pitch:+(K[4]||0)}),!0}return!1},eu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},vu=e.extend({deceleration:2500,maxSpeed:1400},Ru),Tl=e.extend({deceleration:20,maxSpeed:1400},Ru),cu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Vl=function(K){this._map=K,this.clear()};Vl.prototype.clear=function(){this._inertiaBuffer=[]},Vl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Vl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),te=160;K.length>0&&xe-K[0].time>te;)K.shift()},Vl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var xe={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,ye=this._inertiaBuffer;te<ye.length;te+=1){var je=ye[te],ke=je.settings;xe.zoom+=ke.zoomDelta||0,xe.bearing+=ke.bearingDelta||0,xe.pitch+=ke.pitchDelta||0,ke.panDelta&&xe.pan._add(ke.panDelta),ke.around&&(xe.around=ke.around),ke.pinchAround&&(xe.pinchAround=ke.pinchAround)}var Qe=this._inertiaBuffer[this._inertiaBuffer.length-1],vt=Qe.time-this._inertiaBuffer[0].time,qt={};if(xe.pan.mag()){var wr=me(xe.pan.mag(),vt,e.extend({},vu,K||{}));qt.offset=xe.pan.mult(wr.amount/xe.pan.mag()),qt.center=this._map.transform.center,Gl(qt,wr)}if(xe.zoom){var Nr=me(xe.zoom,vt,Tl);qt.zoom=this._map.transform.zoom+Nr.amount,Gl(qt,Nr)}if(xe.bearing){var pr=me(xe.bearing,vt,cu);qt.bearing=this._map.transform.bearing+e.clamp(pr.amount,-179,179),Gl(qt,pr)}if(xe.pitch){var mt=me(xe.pitch,vt,uc);qt.pitch=this._map.transform.pitch+mt.amount,Gl(qt,mt)}if(qt.zoom||qt.bearing){var St=xe.pinchAround===void 0?xe.around:xe.pinchAround;qt.around=St?this._map.unproject(St):this._map.getCenter()}return this.clear(),e.extend(qt,{noMoveStart:!0})}};function Gl(ge,K){(!ge.duration||ge.duration<K.duration)&&(ge.duration=K.duration,ge.easing=K.easing)}function me(ge,K,xe){var te=xe.maxSpeed,ye=xe.linearity,je=xe.deceleration,ke=e.clamp(ge*ye/(K/1e3),-te,te),Qe=Math.abs(ke)/(je*ye);return{easing:xe.easing,duration:Qe*1e3,amount:ke*(Qe/2)}}var De=function(ge){function K(te,ye,je,ke){ke===void 0&&(ke={});var Qe=r.mousePos(ye.getCanvasContainer(),je),vt=ye.unproject(Qe);ge.call(this,te,e.extend({point:Qe,lngLat:vt,originalEvent:je},ke)),this._defaultPrevented=!1,this.target=ye}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},xe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,xe),K}(e.Event),et=function(ge){function K(te,ye,je){var ke=te==="touchend"?je.changedTouches:je.touches,Qe=r.touchPos(ye.getCanvasContainer(),ke),vt=Qe.map(function(Nr){return ye.unproject(Nr)}),qt=Qe.reduce(function(Nr,pr,mt,St){return Nr.add(pr.div(St.length))},new e.Point(0,0)),wr=ye.unproject(qt);ge.call(this,te,{points:Qe,point:qt,lngLats:vt,lngLat:wr,originalEvent:je}),this._defaultPrevented=!1}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},xe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,xe),K}(e.Event),dt=function(ge){function K(te,ye,je){ge.call(this,te,{originalEvent:je}),this._defaultPrevented=!1}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},xe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,xe),K}(e.Event),yt=function(K,xe){this._map=K,this._clickTolerance=xe.clickTolerance};yt.prototype.reset=function(){delete this._mousedownPos},yt.prototype.wheel=function(K){return this._firePreventable(new dt(K.type,this._map,K))},yt.prototype.mousedown=function(K,xe){return this._mousedownPos=xe,this._firePreventable(new De(K.type,this._map,K))},yt.prototype.mouseup=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.click=function(K,xe){this._mousedownPos&&this._mousedownPos.dist(xe)>=this._clickTolerance||this._map.fire(new De(K.type,this._map,K))},yt.prototype.dblclick=function(K){return this._firePreventable(new De(K.type,this._map,K))},yt.prototype.mouseover=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.mouseout=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},yt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Tt=function(K){this._map=K};Tt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Tt.prototype.mousemove=function(K){this._map.fire(new De(K.type,this._map,K))},Tt.prototype.mousedown=function(){this._delayContextMenu=!0},Tt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new De("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Tt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new De(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var tr=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=xe.clickTolerance||1};tr.prototype.isEnabled=function(){return!!this._enabled},tr.prototype.isActive=function(){return!!this._active},tr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},tr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},tr.prototype.mousedown=function(K,xe){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=xe,this._active=!0)},tr.prototype.mousemoveWindow=function(K,xe){if(this._active){var te=xe;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)<this._clickTolerance)){var ye=this._startPos;this._lastPos=te,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",K));var je=Math.min(ye.x,te.x),ke=Math.max(ye.x,te.x),Qe=Math.min(ye.y,te.y),vt=Math.max(ye.y,te.y);r.setTransform(this._box,"translate("+je+"px,"+Qe+"px)"),this._box.style.width=ke-je+"px",this._box.style.height=vt-Qe+"px"}}},tr.prototype.mouseupWindow=function(K,xe){var te=this;if(this._active&&K.button===0){var ye=this._startPos,je=xe;if(this.reset(),r.suppressClick(),ye.x===je.x&&ye.y===je.y)this._fireEvent("boxzoomcancel",K);else return this._map.fire(new e.Event("boxzoomend",{originalEvent:K})),{cameraAnimation:function(ke){return ke.fitScreenCoordinates(ye,je,te._map.getBearing(),{linear:!0})}}}},tr.prototype.keydown=function(K){this._active&&K.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",K))},tr.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},tr.prototype._fireEvent=function(K,xe){return this._map.fire(new e.Event(K,{originalEvent:xe}))};function zt(ge,K){for(var xe={},te=0;te<ge.length;te++)xe[ge[te].identifier]=K[te];return xe}function _r(ge){for(var K=new e.Point(0,0),xe=0,te=ge;xe<te.length;xe+=1){var ye=te[xe];K._add(ye)}return K.div(ge.length)}var Gr=500,Xr=500,xa=30,pa=function(K){this.reset(),this.numTouches=K.numTouches};pa.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},pa.prototype.touchstart=function(K,xe,te){(this.centroid||te.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),te.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(te,xe)))},pa.prototype.touchmove=function(K,xe,te){if(!(this.aborted||!this.centroid)){var ye=zt(te,xe);for(var je in this.touches){var ke=this.touches[je],Qe=ye[je];(!Qe||Qe.dist(ke)>xa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,te){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),te.length===0){var ye=!this.aborted&&this.centroid;if(this.reset(),ye)return ye}};var Ja=function(K){this.singleTap=new pa(K),this.numTaps=K.numTaps,this.reset()};Ja.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ja.prototype.touchstart=function(K,xe,te){this.singleTap.touchstart(K,xe,te)},Ja.prototype.touchmove=function(K,xe,te){this.singleTap.touchmove(K,xe,te)},Ja.prototype.touchend=function(K,xe,te){var ye=this.singleTap.touchend(K,xe,te);if(ye){var je=K.timeStamp-this.lastTime<Gr,ke=!this.lastTap||this.lastTap.dist(ye)<xa;if((!je||!ke)&&this.reset(),this.count++,this.lastTime=K.timeStamp,this.lastTap=ye,this.count===this.numTaps)return this.reset(),ye}};var ti=function(){this._zoomIn=new Ja({numTouches:1,numTaps:2}),this._zoomOut=new Ja({numTouches:2,numTaps:1}),this.reset()};ti.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ti.prototype.touchstart=function(K,xe,te){this._zoomIn.touchstart(K,xe,te),this._zoomOut.touchstart(K,xe,te)},ti.prototype.touchmove=function(K,xe,te){this._zoomIn.touchmove(K,xe,te),this._zoomOut.touchmove(K,xe,te)},ti.prototype.touchend=function(K,xe,te){var ye=this,je=this._zoomIn.touchend(K,xe,te),ke=this._zoomOut.touchend(K,xe,te);if(je)return this._active=!0,K.preventDefault(),setTimeout(function(){return ye.reset()},0),{cameraAnimation:function(Qe){return Qe.easeTo({duration:300,zoom:Qe.getZoom()+1,around:Qe.unproject(je)},{originalEvent:K})}};if(ke)return this._active=!0,K.preventDefault(),setTimeout(function(){return ye.reset()},0),{cameraAnimation:function(Qe){return Qe.easeTo({duration:300,zoom:Qe.getZoom()-1,around:Qe.unproject(ke)},{originalEvent:K})}}},ti.prototype.touchcancel=function(){this.reset()},ti.prototype.enable=function(){this._enabled=!0},ti.prototype.disable=function(){this._enabled=!1,this.reset()},ti.prototype.isEnabled=function(){return this._enabled},ti.prototype.isActive=function(){return this._active};var Sa=0,za=2,Xa={};Xa[Sa]=1,Xa[za]=2;function fi(ge,K){var xe=Xa[K];return ge.buttons===void 0||(ge.buttons&xe)!==xe}var ni=function(K){this.reset(),this._clickTolerance=K.clickTolerance||1};ni.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ni.prototype._correctButton=function(K,xe){return!1},ni.prototype._move=function(K,xe){return{}},ni.prototype.mousedown=function(K,xe){if(!this._lastPoint){var te=r.mouseButton(K);this._correctButton(K,te)&&(this._lastPoint=xe,this._eventButton=te)}},ni.prototype.mousemoveWindow=function(K,xe){var te=this._lastPoint;if(te){if(K.preventDefault(),fi(K,this._eventButton)){this.reset();return}if(!(!this._moved&&xe.dist(te)<this._clickTolerance))return this._moved=!0,this._lastPoint=xe,this._move(te,xe)}},ni.prototype.mouseupWindow=function(K){if(this._lastPoint){var xe=r.mouseButton(K);xe===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())}},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var La=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.mousedown=function(te,ye){ge.prototype.mousedown.call(this,te,ye),this._lastPoint&&(this._active=!0)},K.prototype._correctButton=function(te,ye){return ye===Sa&&!te.ctrlKey},K.prototype._move=function(te,ye){return{around:ye,panDelta:ye.sub(te)}},K}(ni),sn=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,ye){return ye===Sa&&te.ctrlKey||ye===za},K.prototype._move=function(te,ye){var je=.8,ke=(ye.x-te.x)*je;if(ke)return this._active=!0,{bearingDelta:ke}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(ni),rn=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,ye){return ye===Sa&&te.ctrlKey||ye===za},K.prototype._move=function(te,ye){var je=-.5,ke=(ye.y-te.y)*je;if(ke)return this._active=!0,{pitchDelta:ke}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(ni),dn=function(K){this._minTouches=1,this._clickTolerance=K.clickTolerance||1,this.reset()};dn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},dn.prototype.touchstart=function(K,xe,te){return this._calculateTransform(K,xe,te)},dn.prototype.touchmove=function(K,xe,te){if(!(!this._active||te.length<this._minTouches))return K.preventDefault(),this._calculateTransform(K,xe,te)},dn.prototype.touchend=function(K,xe,te){this._calculateTransform(K,xe,te),this._active&&te.length<this._minTouches&&this.reset()},dn.prototype.touchcancel=function(){this.reset()},dn.prototype._calculateTransform=function(K,xe,te){te.length>0&&(this._active=!0);var ye=zt(te,xe),je=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],wr=this._touches[vt];wr&&(je._add(qt),ke._add(qt.sub(wr)),Qe++,ye[vt]=qt)}if(this._touches=ye,!(Qe<this._minTouches||!ke.mag())){var Nr=ke.div(Qe);if(this._sum._add(Nr),!(this._sum.mag()<this._clickTolerance)){var pr=je.div(Qe);return{around:pr,panDelta:Nr}}}},dn.prototype.enable=function(){this._enabled=!0},dn.prototype.disable=function(){this._enabled=!1,this.reset()},dn.prototype.isEnabled=function(){return this._enabled},dn.prototype.isActive=function(){return this._active};var In=function(){this.reset()};In.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},In.prototype._start=function(K){},In.prototype._move=function(K,xe,te){return{}},In.prototype.touchstart=function(K,xe,te){this._firstTwoTouches||te.length<2||(this._firstTwoTouches=[te[0].identifier,te[1].identifier],this._start([xe[0],xe[1]]))},In.prototype.touchmove=function(K,xe,te){if(this._firstTwoTouches){K.preventDefault();var ye=this._firstTwoTouches,je=ye[0],ke=ye[1],Qe=Kn(te,xe,je),vt=Kn(te,xe,ke);if(!(!Qe||!vt)){var qt=this._aroundCenter?null:Qe.add(vt).div(2);return this._move([Qe,vt],qt,K)}}},In.prototype.touchend=function(K,xe,te){if(this._firstTwoTouches){var ye=this._firstTwoTouches,je=ye[0],ke=ye[1],Qe=Kn(te,xe,je),vt=Kn(te,xe,ke);Qe&&vt||(this._active&&r.suppressClick(),this.reset())}},In.prototype.touchcancel=function(){this.reset()},In.prototype.enable=function(K){this._enabled=!0,this._aroundCenter=!!K&&K.around==="center"},In.prototype.disable=function(){this._enabled=!1,this.reset()},In.prototype.isEnabled=function(){return this._enabled},In.prototype.isActive=function(){return this._active};function Kn(ge,K,xe){for(var te=0;te<ge.length;te++)if(ge[te].identifier===xe)return K[te]}var ro=.1;function Yo(ge,K){return Math.log(ge/K)/Math.LN2}var oo=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),delete this._distance,delete this._startDistance},K.prototype._start=function(te){this._startDistance=this._distance=te[0].dist(te[1])},K.prototype._move=function(te,ye){var je=this._distance;if(this._distance=te[0].dist(te[1]),!(!this._active&&Math.abs(Yo(this._distance,this._startDistance))<ro))return this._active=!0,{zoomDelta:Yo(this._distance,je),pinchAround:ye}},K}(In),Wo=25;function cl(ge,K){return ge.angleWith(K)*180/Math.PI}var al=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},K.prototype._start=function(te){this._startVector=this._vector=te[0].sub(te[1]),this._minDiameter=te[0].dist(te[1])},K.prototype._move=function(te,ye){var je=this._vector;if(this._vector=te[0].sub(te[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:cl(this._vector,je),pinchAround:ye}},K.prototype._isBelowThreshold=function(te){this._minDiameter=Math.min(this._minDiameter,te.mag());var ye=Math.PI*this._minDiameter,je=Wo/ye*360,ke=cl(te,this._startVector);return Math.abs(ke)<je},K}(In);function xl(ge){return Math.abs(ge.y)>Math.abs(ge.x)}var mn=100,po=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(te){this._lastPoints=te,xl(te[0].sub(te[1]))&&(this._valid=!1)},K.prototype._move=function(te,ye,je){var ke=te[0].sub(this._lastPoints[0]),Qe=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,je.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(te,ye,je){if(this._valid!==void 0)return this._valid;var ke=2,Qe=te.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=je),je-this._firstMove<mn?void 0:!1;var qt=te.y>0==ye.y>0;return xl(te)&&xl(ye)&&qt}},K}(In),cs={panStep:100,bearingStep:15,pitchStep:10},vs=function(){var K=cs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};vs.prototype.reset=function(){this._active=!1},vs.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var te=0,ye=0,je=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:te=1;break;case 189:case 109:case 173:te=-1;break;case 37:K.shiftKey?ye=-1:(K.preventDefault(),ke=-1);break;case 39:K.shiftKey?ye=1:(K.preventDefault(),ke=1);break;case 38:K.shiftKey?je=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?je=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,je=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Al,zoom:te?Math.round(qt)+te*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+je*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},vs.prototype.enable=function(){this._enabled=!0},vs.prototype.disable=function(){this._enabled=!1,this.reset()},vs.prototype.isEnabled=function(){return this._enabled},vs.prototype.isActive=function(){return this._active},vs.prototype.disableRotation=function(){this._rotationDisabled=!0},vs.prototype.enableRotation=function(){this._rotationDisabled=!1};function Al(ge){return ge*(2-ge)}var Hl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._handler=xe,this._delta=0,this._defaultZoomRate=Su,this._wheelZoomRate=Rl,e.bindAll(["_onTimeout"],this)};it.prototype.setZoomRate=function(K){this._defaultZoomRate=K},it.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},it.prototype.isEnabled=function(){return!!this._enabled},it.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},it.prototype.isZooming=function(){return!!this._zooming},it.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},it.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},it.prototype.wheel=function(K){if(this.isEnabled()){var xe=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,te=e.browser.now(),ye=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,xe!==0&&xe%Hl===0?this._type="wheel":xe!==0&&Math.abs(xe)<4?this._type="trackpad":ye>400?(this._type=null,this._lastValue=xe,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(ye*xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,xe+=this._lastValue)),K.shiftKey&&xe&&(xe=xe/4),this._type&&(this._lastWheelEvent=K,this._delta-=xe,this._active||this._start(K)),K.preventDefault()}},it.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},it.prototype._start=function(K){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var xe=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(xe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},it.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var xe=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>Hl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&ye!==0&&(ye=1/ye);var je=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(je*ye))),this._type==="wheel"&&(this._startZoom=xe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ke=typeof this._targetZoom=="number"?this._targetZoom:xe.zoom,Qe=this._startZoom,vt=this._easing,qt=!1,wr;if(this._type==="wheel"&&Qe&&vt){var Nr=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Nr);wr=e.number(Qe,ke,pr),Nr<1?this._frameId||(this._frameId=!0):qt=!0}else wr=ke,qt=!0;return this._active=!0,qt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qt,zoomDelta:wr-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var te=this._prevEase,ye=(e.browser.now()-te.start)/te.duration,je=te.easing(ye+.01)-te.easing(ye),ke=.27/Math.sqrt(je*je+1e-4)*.01,Qe=Math.sqrt(.27*.27-ke*ke);xe=e.bezier(ke,Qe,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:xe},xe},it.prototype.reset=function(){this._active=!1};var Zt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Zt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Zt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Zt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Zt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var cr=function(){this.reset()};cr.prototype.reset=function(){this._active=!1},cr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(K.shiftKey?-1:1),around:te.unproject(xe)},{originalEvent:K})}}},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var oa=function(){this._tap=new Ja({numTouches:1,numTaps:1}),this.reset()};oa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},oa.prototype.touchstart=function(K,xe,te){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=xe[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(K,xe,te))},oa.prototype.touchmove=function(K,xe,te){if(!this._tapTime)this._tap.touchmove(K,xe,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var ye=xe[0],je=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:je/128}}},oa.prototype.touchend=function(K,xe,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,te);ye&&(this._tapTime=K.timeStamp)}},oa.prototype.touchcancel=function(){this.reset()},oa.prototype.enable=function(){this._enabled=!0},oa.prototype.disable=function(){this._enabled=!1,this.reset()},oa.prototype.isEnabled=function(){return this._enabled},oa.prototype.isActive=function(){return this._active};var wa=function(K,xe,te){this._el=K,this._mousePan=xe,this._touchPan=te};wa.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},wa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},wa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},wa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var va=function(K,xe,te){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=te};va.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},va.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},va.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},va.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ya=function(K,xe,te,ye){this._el=K,this._touchZoom=xe,this._touchRotate=te,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};ya.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ya.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ya.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ya.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ya.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ya.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},bi=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var si=function(K,xe){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Vl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var te=this._el;this._listeners=[[te,"touchstart",{passive:!0}],[te,"touchmove",{passive:!1}],[te,"touchend",void 0],[te,"touchcancel",void 0],[te,"mousedown",void 0],[te,"mousemove",void 0],[te,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[te,"mouseover",void 0],[te,"mouseout",void 0],[te,"dblclick",void 0],[te,"click",void 0],[te,"keydown",{capture:!1}],[te,"keyup",void 0],[te,"wheel",{passive:!1}],[te,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,je=this._listeners;ye<je.length;ye+=1){var ke=je[ye],Qe=ke[0],vt=ke[1],qt=ke[2];r.addEventListener(Qe,vt,Qe===e.window.document?this.handleWindowEvent:this.handleEvent,qt)}};si.prototype.destroy=function(){for(var K=0,xe=this._listeners;K<xe.length;K+=1){var te=xe[K],ye=te[0],je=te[1],ke=te[2];r.removeEventListener(ye,je,ye===e.window.document?this.handleWindowEvent:this.handleEvent,ke)}},si.prototype._addDefaultHandlers=function(K){var xe=this._map,te=xe.getCanvasContainer();this._add("mapEvent",new yt(xe,K));var ye=xe.boxZoom=new tr(xe,K);this._add("boxZoom",ye);var je=new ti,ke=new cr;xe.doubleClickZoom=new Zt(ke,je),this._add("tapZoom",je),this._add("clickZoom",ke);var Qe=new oa;this._add("tapDragZoom",Qe);var vt=xe.touchPitch=new po;this._add("touchPitch",vt);var qt=new sn(K),wr=new rn(K);xe.dragRotate=new va(K,qt,wr),this._add("mouseRotate",qt,["mousePitch"]),this._add("mousePitch",wr,["mouseRotate"]);var Nr=new La(K),pr=new dn(K);xe.dragPan=new wa(te,Nr,pr),this._add("mousePan",Nr),this._add("touchPan",pr,["touchZoom","touchRotate"]);var mt=new al,St=new oo;xe.touchZoomRotate=new ya(te,St,mt,Qe),this._add("touchRotate",mt,["touchPan","touchZoom"]),this._add("touchZoom",St,["touchPan","touchRotate"]);var Ft=xe.scrollZoom=new it(xe,this);this._add("scrollZoom",Ft,["mousePan"]);var rr=xe.keyboard=new vs;this._add("keyboard",rr),this._add("blockableMapEvent",new Tt(xe));for(var hr=0,nr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];hr<nr.length;hr+=1){var dr=nr[hr];K.interactive&&K[dr]&&xe[dr].enable(K[dr])}},si.prototype._add=function(K,xe,te){this._handlers.push({handlerName:K,handler:xe,allowed:te}),this._handlersById[K]=xe},si.prototype.stop=function(K){if(!this._updatingCamera){for(var xe=0,te=this._handlers;xe<te.length;xe+=1){var ye=te[xe],je=ye.handler;je.reset()}this._inertia.clear(),this._fireEvents({},{},K),this._changes=[]}},si.prototype.isActive=function(){for(var K=0,xe=this._handlers;K<xe.length;K+=1){var te=xe[K],ye=te.handler;if(ye.isActive())return!0}return!1},si.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},si.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},si.prototype.isMoving=function(){return!!Ya(this._eventsInProgress)||this.isZooming()},si.prototype._blockedByActive=function(K,xe,te){for(var ye in K)if(ye!==te&&(!xe||xe.indexOf(ye)<0))return!0;return!1},si.prototype.handleWindowEvent=function(K){this.handleEvent(K,K.type+"Window")},si.prototype._getMapTouches=function(K){for(var xe=[],te=0,ye=K;te<ye.length;te+=1){var je=ye[te],ke=je.target;this._el.contains(ke)&&xe.push(je)}return xe},si.prototype.handleEvent=function(K,xe){if(K.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var te=K.type==="renderFrame"?void 0:K,ye={needsRenderFrame:!1},je={},ke={},Qe=K.touches?this._getMapTouches(K.touches):void 0,vt=Qe?r.touchPos(this._el,Qe):r.mousePos(this._el,K),qt=0,wr=this._handlers;qt<wr.length;qt+=1){var Nr=wr[qt],pr=Nr.handlerName,mt=Nr.handler,St=Nr.allowed;if(mt.isEnabled()){var Ft=void 0;this._blockedByActive(ke,St,pr)?mt.reset():mt[xe||K.type]&&(Ft=mt[xe||K.type](K,vt,Qe),this.mergeHandlerResult(ye,je,Ft,pr,te),Ft&&Ft.needsRenderFrame&&this._triggerRenderFrame()),(Ft||mt.isActive())&&(ke[pr]=mt)}}var rr={};for(var hr in this._previousActiveHandlers)ke[hr]||(rr[hr]=te);this._previousActiveHandlers=ke,(Object.keys(rr).length||yi(ye))&&(this._changes.push([ye,je,rr]),this._triggerRenderFrame()),(Object.keys(ke).length||yi(ye))&&this._map._stop(!0),this._updatingCamera=!1;var nr=ye.cameraAnimation;nr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],nr(this._map))},si.prototype.mergeHandlerResult=function(K,xe,te,ye,je){if(te){e.extend(K,te);var ke={handlerName:ye,originalEvent:te.originalEvent||je};te.zoomDelta!==void 0&&(xe.zoom=ke),te.panDelta!==void 0&&(xe.drag=ke),te.pitchDelta!==void 0&&(xe.pitch=ke),te.bearingDelta!==void 0&&(xe.rotate=ke)}},si.prototype._applyChanges=function(){for(var K={},xe={},te={},ye=0,je=this._changes;ye<je.length;ye+=1){var ke=je[ye],Qe=ke[0],vt=ke[1],qt=ke[2];Qe.panDelta&&(K.panDelta=(K.panDelta||new e.Point(0,0))._add(Qe.panDelta)),Qe.zoomDelta&&(K.zoomDelta=(K.zoomDelta||0)+Qe.zoomDelta),Qe.bearingDelta&&(K.bearingDelta=(K.bearingDelta||0)+Qe.bearingDelta),Qe.pitchDelta&&(K.pitchDelta=(K.pitchDelta||0)+Qe.pitchDelta),Qe.around!==void 0&&(K.around=Qe.around),Qe.pinchAround!==void 0&&(K.pinchAround=Qe.pinchAround),Qe.noInertia&&(K.noInertia=Qe.noInertia),e.extend(xe,vt),e.extend(te,qt)}this._updateMapTransform(K,xe,te),this._changes=[]},si.prototype._updateMapTransform=function(K,xe,te){var ye=this._map,je=ye.transform;if(!yi(K))return this._fireEvents(xe,te,!0);var ke=K.panDelta,Qe=K.zoomDelta,vt=K.bearingDelta,qt=K.pitchDelta,wr=K.around,Nr=K.pinchAround;Nr!==void 0&&(wr=Nr),ye._stop(!0),wr=wr||ye.transform.centerPoint;var pr=je.pointLocation(ke?wr.sub(ke):wr);vt&&(je.bearing+=vt),qt&&(je.pitch+=qt),Qe&&(je.zoom+=Qe),je.setLocationAtPoint(pr,wr),this._map._update(),K.noInertia||this._inertia.record(K),this._fireEvents(xe,te,!0)},si.prototype._fireEvents=function(K,xe,te){var ye=this,je=Ya(this._eventsInProgress),ke=Ya(K),Qe={};for(var vt in K){var qt=K[vt],wr=qt.originalEvent;this._eventsInProgress[vt]||(Qe[vt+"start"]=wr),this._eventsInProgress[vt]=K[vt]}!je&&ke&&this._fireEvent("movestart",ke.originalEvent);for(var Nr in Qe)this._fireEvent(Nr,Qe[Nr]);ke&&this._fireEvent("move",ke.originalEvent);for(var pr in K){var mt=K[pr],St=mt.originalEvent;this._fireEvent(pr,St)}var Ft={},rr;for(var hr in this._eventsInProgress){var nr=this._eventsInProgress[hr],dr=nr.handlerName,or=nr.originalEvent;this._handlersById[dr].isActive()||(delete this._eventsInProgress[hr],rr=xe[dr]||or,Ft[hr+"end"]=rr)}for(var Wt in Ft)this._fireEvent(Wt,Ft[Wt]);var ir=Ya(this._eventsInProgress);if(te&&(je||ke)&&!ir){this._updatingCamera=!0;var Vt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Dr=function(Jr){return Jr!==0&&-ye._bearingSnap<Jr&&Jr<ye._bearingSnap};Vt?(Dr(Vt.bearing||this._map.getBearing())&&(Vt.bearing=0),this._map.easeTo(Vt,{originalEvent:rr})):(this._map.fire(new e.Event("moveend",{originalEvent:rr})),Dr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},si.prototype._fireEvent=function(K,xe){this._map.fire(new e.Event(K,xe?{originalEvent:xe}:{}))},si.prototype._requestFrame=function(){var K=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(xe){delete K._frameId,K.handleEvent(new bi("renderFrame",{timeStamp:xe})),K._applyChanges()})},si.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var gn=function(ge){function K(xe,te){ge.call(this),this._moving=!1,this._zooming=!1,this.transform=xe,this._bearingSnap=te.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},K.prototype.setCenter=function(te,ye){return this.jumpTo({center:te},ye)},K.prototype.panBy=function(te,ye,je){return te=e.Point.convert(te).mult(-1),this.panTo(this.transform.center,e.extend({offset:te},ye),je)},K.prototype.panTo=function(te,ye,je){return this.easeTo(e.extend({center:te},ye),je)},K.prototype.getZoom=function(){return this.transform.zoom},K.prototype.setZoom=function(te,ye){return this.jumpTo({zoom:te},ye),this},K.prototype.zoomTo=function(te,ye,je){return this.easeTo(e.extend({zoom:te},ye),je)},K.prototype.zoomIn=function(te,ye){return this.zoomTo(this.getZoom()+1,te,ye),this},K.prototype.zoomOut=function(te,ye){return this.zoomTo(this.getZoom()-1,te,ye),this},K.prototype.getBearing=function(){return this.transform.bearing},K.prototype.setBearing=function(te,ye){return this.jumpTo({bearing:te},ye),this},K.prototype.getPadding=function(){return this.transform.padding},K.prototype.setPadding=function(te,ye){return this.jumpTo({padding:te},ye),this},K.prototype.rotateTo=function(te,ye,je){return this.easeTo(e.extend({bearing:te},ye),je)},K.prototype.resetNorth=function(te,ye){return this.rotateTo(0,e.extend({duration:1e3},te),ye),this},K.prototype.resetNorthPitch=function(te,ye){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},te),ye),this},K.prototype.snapToNorth=function(te,ye){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(te,ye):this},K.prototype.getPitch=function(){return this.transform.pitch},K.prototype.setPitch=function(te,ye){return this.jumpTo({pitch:te},ye),this},K.prototype.cameraForBounds=function(te,ye){te=e.LngLatBounds.convert(te);var je=ye&&ye.bearing||0;return this._cameraForBoxAndBearing(te.getNorthWest(),te.getSouthEast(),je,ye)},K.prototype._cameraForBoxAndBearing=function(te,ye,je,ke){var Qe={top:0,bottom:0,right:0,left:0};if(ke=e.extend({padding:Qe,offset:[0,0],maxZoom:this.transform.maxZoom},ke),typeof ke.padding=="number"){var vt=ke.padding;ke.padding={top:vt,bottom:vt,right:vt,left:vt}}ke.padding=e.extend(Qe,ke.padding);var qt=this.transform,wr=qt.padding,Nr=qt.project(e.LngLat.convert(te)),pr=qt.project(e.LngLat.convert(ye)),mt=Nr.rotate(-je*Math.PI/180),St=pr.rotate(-je*Math.PI/180),Ft=new e.Point(Math.max(mt.x,St.x),Math.max(mt.y,St.y)),rr=new e.Point(Math.min(mt.x,St.x),Math.min(mt.y,St.y)),hr=Ft.sub(rr),nr=(qt.width-(wr.left+wr.right+ke.padding.left+ke.padding.right))/hr.x,dr=(qt.height-(wr.top+wr.bottom+ke.padding.top+ke.padding.bottom))/hr.y;if(dr<0||nr<0){e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var or=Math.min(qt.scaleZoom(qt.scale*Math.min(nr,dr)),ke.maxZoom),Wt=typeof ke.offset.x=="number"?new e.Point(ke.offset.x,ke.offset.y):e.Point.convert(ke.offset),ir=(ke.padding.left-ke.padding.right)/2,Vt=(ke.padding.top-ke.padding.bottom)/2,Dr=new e.Point(ir,Vt),Jr=Dr.rotate(je*Math.PI/180),ga=Wt.add(Jr),vi=ga.mult(qt.scale/qt.zoomScale(or)),Ga=qt.unproject(Nr.add(pr).div(2).sub(vi));return{center:Ga,zoom:or,bearing:je}},K.prototype.fitBounds=function(te,ye,je){return this._fitInternal(this.cameraForBounds(te,ye),ye,je)},K.prototype.fitScreenCoordinates=function(te,ye,je,ke,Qe){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(te)),this.transform.pointLocation(e.Point.convert(ye)),je,ke),ke,Qe)},K.prototype._fitInternal=function(te,ye,je){return te?(ye=e.extend(te,ye),delete ye.padding,ye.linear?this.easeTo(ye,je):this.flyTo(ye,je)):this},K.prototype.jumpTo=function(te,ye){this.stop();var je=this.transform,ke=!1,Qe=!1,vt=!1;return"zoom"in te&&je.zoom!==+te.zoom&&(ke=!0,je.zoom=+te.zoom),te.center!==void 0&&(je.center=e.LngLat.convert(te.center)),"bearing"in te&&je.bearing!==+te.bearing&&(Qe=!0,je.bearing=+te.bearing),"pitch"in te&&je.pitch!==+te.pitch&&(vt=!0,je.pitch=+te.pitch),te.padding!=null&&!je.isPaddingEqual(te.padding)&&(je.padding=te.padding),this.fire(new e.Event("movestart",ye)).fire(new e.Event("move",ye)),ke&&this.fire(new e.Event("zoomstart",ye)).fire(new e.Event("zoom",ye)).fire(new e.Event("zoomend",ye)),Qe&&this.fire(new e.Event("rotatestart",ye)).fire(new e.Event("rotate",ye)).fire(new e.Event("rotateend",ye)),vt&&this.fire(new e.Event("pitchstart",ye)).fire(new e.Event("pitch",ye)).fire(new e.Event("pitchend",ye)),this.fire(new e.Event("moveend",ye))},K.prototype.easeTo=function(te,ye){var je=this;this._stop(!1,te.easeId),te=e.extend({offset:[0,0],duration:500,easing:e.ease},te),(te.animate===!1||!te.essential&&e.browser.prefersReducedMotion)&&(te.duration=0);var ke=this.transform,Qe=this.getZoom(),vt=this.getBearing(),qt=this.getPitch(),wr=this.getPadding(),Nr="zoom"in te?+te.zoom:Qe,pr="bearing"in te?this._normalizeBearing(te.bearing,vt):vt,mt="pitch"in te?+te.pitch:qt,St="padding"in te?te.padding:ke.padding,Ft=e.Point.convert(te.offset),rr=ke.centerPoint.add(Ft),hr=ke.pointLocation(rr),nr=e.LngLat.convert(te.center||hr);this._normalizeCenter(nr);var dr=ke.project(hr),or=ke.project(nr).sub(dr),Wt=ke.zoomScale(Nr-Qe),ir,Vt;te.around&&(ir=e.LngLat.convert(te.around),Vt=ke.locationPoint(ir));var Dr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nr!==Qe,this._rotating=this._rotating||vt!==pr,this._pitching=this._pitching||mt!==qt,this._padding=!ke.isPaddingEqual(St),this._easeId=te.easeId,this._prepareEase(ye,te.noMoveStart,Dr),this._ease(function(Jr){if(je._zooming&&(ke.zoom=e.number(Qe,Nr,Jr)),je._rotating&&(ke.bearing=e.number(vt,pr,Jr)),je._pitching&&(ke.pitch=e.number(qt,mt,Jr)),je._padding&&(ke.interpolatePadding(wr,St,Jr),rr=ke.centerPoint.add(Ft)),ir)ke.setLocationAtPoint(ir,Vt);else{var ga=ke.zoomScale(ke.zoom-Qe),vi=Nr>Qe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ai=ke.unproject(dr.add(or.mult(Jr*Ga)).mult(ga));ke.setLocationAtPoint(ke.renderWorldCopies?ai.wrap():ai,rr)}je._fireMoveEvents(ye)},function(Jr){je._afterEase(ye,Jr)},te),this},K.prototype._prepareEase=function(te,ye,je){je===void 0&&(je={}),this._moving=!0,!ye&&!je.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!je.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!je.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!je.pitching&&this.fire(new e.Event("pitchstart",te))},K.prototype._fireMoveEvents=function(te){this.fire(new e.Event("move",te)),this._zooming&&this.fire(new e.Event("zoom",te)),this._rotating&&this.fire(new e.Event("rotate",te)),this._pitching&&this.fire(new e.Event("pitch",te))},K.prototype._afterEase=function(te,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var je=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,je&&this.fire(new e.Event("zoomend",te)),ke&&this.fire(new e.Event("rotateend",te)),Qe&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},K.prototype.flyTo=function(te,ye){var je=this;if(!te.essential&&e.browser.prefersReducedMotion){var ke=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),wr=this.getPitch(),Nr=this.getPadding(),pr="zoom"in te?e.clamp(+te.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in te?this._normalizeBearing(te.bearing,qt):qt,St="pitch"in te?+te.pitch:wr,Ft="padding"in te?te.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(te.offset),nr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(nr),or=e.LngLat.convert(te.center||dr);this._normalizeCenter(or);var Wt=Qe.project(dr),ir=Qe.project(or).sub(Wt),Vt=te.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ga=ir.mag();if("minZoom"in te){var vi=e.clamp(Math.min(te.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Vt=Math.sqrt(Ga/ga*2)}var ai=Vt*Vt;function Zi(Fo){var Es=(Jr*Jr-Dr*Dr+(Fo?-1:1)*ai*ai*ga*ga)/(2*(Fo?Jr:Dr)*ai*ga);return Math.log(Math.sqrt(Es*Es+1)-Es)}function Fi(Fo){return(Math.exp(Fo)-Math.exp(-Fo))/2}function ui(Fo){return(Math.exp(Fo)+Math.exp(-Fo))/2}function _i(Fo){return Fi(Fo)/ui(Fo)}var Si=Zi(0),Ui=function(Fo){return ui(Si)/ui(Si+Vt*Fo)},cn=function(Fo){return Dr*((ui(Si)*_i(Si+Vt*Fo)-Fi(Si))/ai)/ga},yo=(Zi(1)-Si)/Vt;if(Math.abs(ga)<1e-6||!isFinite(yo)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(te,ye);var Uo=Jr<Dr?-1:1;yo=Math.abs(Math.log(Jr/Dr))/Vt,cn=function(){return 0},Ui=function(Fo){return Math.exp(Uo*Vt*Fo)}}if("duration"in te)te.duration=+te.duration;else{var Is="screenSpeed"in te?+te.screenSpeed/Vt:+te.speed;te.duration=1e3*yo/Is}return te.maxDuration&&te.duration>te.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=St!==wr,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Fo){var Es=Fo*yo,Ks=1/Ui(Es);Qe.zoom=Fo===1?pr:vt+Qe.scaleZoom(Ks),je._rotating&&(Qe.bearing=e.number(qt,mt,Fo)),je._pitching&&(Qe.pitch=e.number(wr,St,Fo)),je._padding&&(Qe.interpolatePadding(Nr,Ft,Fo),nr=Qe.centerPoint.add(hr));var mu=Fo===1?or:Qe.unproject(Wt.add(ir.mult(cn(Es))).mult(Ks));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,nr),je._fireMoveEvents(ye)},function(){return je._afterEase(ye)},te),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(te,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var je=this._onEaseEnd;delete this._onEaseEnd,je.call(this,ye)}if(!te){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(te,ye,je){je.animate===!1||je.duration===0?(te(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=je,this._onEaseFrame=te,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var te=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(te)),te<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(te,ye){te=e.wrap(te,-180,180);var je=Math.abs(te-ye);return Math.abs(te-360-ye)<je&&(te-=360),Math.abs(te+360-ye)<je&&(te+=360),te},K.prototype._normalizeCenter=function(te){var ye=this.transform;if(!(!ye.renderWorldCopies||ye.lngRange)){var je=te.lng-ye.center.lng;te.lng+=je>180?-360:je<-180?360:0}},K}(e.Evented),zi=function(K){K===void 0&&(K={}),this.options=K,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};zi.prototype.getDefaultPosition=function(){return"bottom-right"},zi.prototype.onAdd=function(K){var xe=this.options&&this.options.compact;return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),xe&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),xe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},zi.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},zi.prototype._setElementTitle=function(K,xe){var te=this._map._getUIString("AttributionControl."+xe);K.title=te,K.setAttribute("aria-label",te)},zi.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},zi.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var xe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var te=xe.reduce(function(ye,je,ke){return je.value&&(ye+=je.key+"="+je.value+(ke<xe.length-1?"&":"")),ye},"?");K.href=e.config.FEEDBACK_URL+"/"+te+(this._map._hash?this._map._hash.getHashString(!0):""),K.rel="noopener nofollow",this._setElementTitle(K,"MapFeedback")}},zi.prototype._updateData=function(K){K&&(K.sourceDataType==="metadata"||K.sourceDataType==="visibility"||K.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},zi.prototype._updateAttributions=function(){if(this._map.style){var K=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?K=K.concat(this.options.customAttribution.map(function(vt){return typeof vt!="string"?"":vt})):typeof this.options.customAttribution=="string"&&K.push(this.options.customAttribution)),this._map.style.stylesheet){var xe=this._map.style.stylesheet;this.styleOwner=xe.owner,this.styleId=xe.id}var te=this._map.style.sourceCaches;for(var ye in te){var je=te[ye];if(je.used){var ke=je.getSource();ke.attribution&&K.indexOf(ke.attribution)<0&&K.push(ke.attribution)}}K.sort(function(vt,qt){return vt.length-qt.length}),K=K.filter(function(vt,qt){for(var wr=qt+1;wr<K.length;wr++)if(K[wr].indexOf(vt)>=0)return!1;return!0});var Qe=K.join(" | ");Qe!==this._attribHTML&&(this._attribHTML=Qe,K.length?(this._innerContainer.innerHTML=Qe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},zi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ei=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Ei.prototype.onAdd=function(K){this._map=K,this._container=r.create("div","mapboxgl-ctrl");var xe=r.create("a","mapboxgl-ctrl-logo");return xe.target="_blank",xe.rel="noopener nofollow",xe.href="https://www.mapbox.com/",xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(xe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ei.prototype.getDefaultPosition=function(){return"bottom-left"},Ei.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Ei.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var xe in K){var te=K[xe].getSource();if(te.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var xe=K[0];this._map.getCanvasContainer().offsetWidth<250?xe.classList.add("mapboxgl-compact"):xe.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var xe=++this._id,te=this._queue;return te.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,te=xe?this._queue.concat(xe):this._queue,ye=0,je=te;ye<je.length;ye+=1){var ke=je[ye];if(ke.id===K){ke.cancelled=!0;return}}},Na.prototype.run=function(K){K===void 0&&(K=0);var xe=this._currentlyRunning=this._queue;this._queue=[];for(var te=0,ye=xe;te<ye.length;te+=1){var je=ye[te];if(!je.cancelled&&(je.callback(K),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Na.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ea={"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":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Ma=e.window.HTMLImageElement,Qa=e.window.HTMLElement,di=e.window.ImageBitmap,Va=-2,Bi=22,Li=0,hn=60,Ha={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Va,maxZoom:Bi,minPitch:Li,maxPitch:hn,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Ua=function(ge){function K(te){var ye=this;if(te=e.extend({},Ha,te),te.minZoom!=null&&te.maxZoom!=null&&te.minZoom>te.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(te.minPitch!=null&&te.maxPitch!=null&&te.minPitch>te.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(te.minPitch!=null&&te.minPitch<Li)throw new Error("minPitch must be greater than or equal to "+Li);if(te.maxPitch!=null&&te.maxPitch>hn)throw new Error("maxPitch must be less than or equal to "+hn);var je=new Jo(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ge.call(this,je,te),this._interactive=te.interactive,this._maxTileCacheSize=te.maxTileCacheSize,this._failIfMajorPerformanceCaveat=te.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=te.preserveDrawingBuffer,this._antialias=te.antialias,this._trackResize=te.trackResize,this._bearingSnap=te.bearingSnap,this._refreshExpiredTiles=te.refreshExpiredTiles,this._fadeDuration=te.fadeDuration,this._crossSourceCollisions=te.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=te.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,te.locale),this._clickTolerance=te.clickTolerance,this._requestManager=new e.RequestManager(te.transformRequest,te.accessToken),typeof te.container=="string"){if(this._container=e.window.document.getElementById(te.container),!this._container)throw new Error("Container '"+te.container+"' not found.")}else if(te.container instanceof Qa)this._container=te.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(te.maxBounds&&this.setMaxBounds(te.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return ye._update(!1)}),this.on("moveend",function(){return ye._update(!1)}),this.on("zoom",function(){return ye._update(!0)}),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new si(this,te);var ke=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new eu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:te.center,zoom:te.zoom,bearing:te.bearing,pitch:te.pitch}),te.bounds&&(this.resize(),this.fitBounds(te.bounds,e.extend({},te.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=te.localIdeographFontFamily,te.style&&this.setStyle(te.style,{localIdeographFontFamily:te.localIdeographFontFamily}),te.attributionControl&&this.addControl(new zi({customAttribution:te.customAttribution})),this.addControl(new Ei,te.logoPosition),this.on("style.load",function(){ye.transform.unmodified&&ye.jumpTo(ye.style.stylesheet)}),this.on("data",function(Qe){ye._update(Qe.dataType==="style"),ye.fire(new e.Event(Qe.dataType+"data",Qe))}),this.on("dataloading",function(Qe){ye.fire(new e.Event(Qe.dataType+"dataloading",Qe))})}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(ye,je){if(je===void 0&&(ye.getDefaultPosition?je=ye.getDefaultPosition():je="top-right"),!ye||!ye.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ke=ye.onAdd(this);this._controls.push(ye);var Qe=this._controlPositions[je];return je.indexOf("bottom")!==-1?Qe.insertBefore(ke,Qe.firstChild):Qe.appendChild(ke),this},K.prototype.removeControl=function(ye){if(!ye||!ye.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var je=this._controls.indexOf(ye);return je>-1&&this._controls.splice(je,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var je=this._containerDimensions(),ke=je[0],Qe=je[1];this._resizeCanvas(ke,Qe),this.transform.resize(ke,Qe),this.painter.resize(ke,Qe);var vt=!this._moving;return vt&&(this.stop(),this.fire(new e.Event("movestart",ye)).fire(new e.Event("move",ye))),this.fire(new e.Event("resize",ye)),vt&&this.fire(new e.Event("moveend",ye)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(ye){return this.transform.setMaxBounds(e.LngLatBounds.convert(ye)),this._update()},K.prototype.setMinZoom=function(ye){if(ye=ye??Va,ye>=Va&&ye<=this.transform.maxZoom)return this.transform.minZoom=ye,this._update(),this.getZoom()<ye&&this.setZoom(ye),this;throw new Error("minZoom must be between "+Va+" and the current maxZoom, inclusive")},K.prototype.getMinZoom=function(){return this.transform.minZoom},K.prototype.setMaxZoom=function(ye){if(ye=ye??Bi,ye>=this.transform.minZoom)return this.transform.maxZoom=ye,this._update(),this.getZoom()>ye&&this.setZoom(ye),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(ye){if(ye=ye??Li,ye<Li)throw new Error("minPitch must be greater than or equal to "+Li);if(ye>=Li&&ye<=this.transform.maxPitch)return this.transform.minPitch=ye,this._update(),this.getPitch()<ye&&this.setPitch(ye),this;throw new Error("minPitch must be between "+Li+" and the current maxPitch, inclusive")},K.prototype.getMinPitch=function(){return this.transform.minPitch},K.prototype.setMaxPitch=function(ye){if(ye=ye??hn,ye>hn)throw new Error("maxPitch must be less than or equal to "+hn);if(ye>=this.transform.minPitch)return this.transform.maxPitch=ye,this._update(),this.getPitch()>ye&&this.setPitch(ye),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(ye){return this.transform.renderWorldCopies=ye,this._update()},K.prototype.project=function(ye){return this.transform.locationPoint(e.LngLat.convert(ye))},K.prototype.unproject=function(ye){return this.transform.pointLocation(e.Point.convert(ye))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(ye,je,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,wr=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Nr=function(){qt=!1};return{layer:je,listener:ke,delegates:{mousemove:wr,mouseout:Nr}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},St=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:je,listener:ke,delegates:{mousemove:mt,mouseout:St}}}else{var Ft=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:je,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,je,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,je);var Qe=this._createDelegatedListener(ye,je,ke);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ye]=this._delegatedListeners[ye]||[],this._delegatedListeners[ye].push(Qe);for(var vt in Qe.delegates)this.on(vt,Qe.delegates[vt]);return this},K.prototype.once=function(ye,je,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,je);var Qe=this._createDelegatedListener(ye,je,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,je,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,je);var vt=function(qt){for(var wr=qt[ye],Nr=0;Nr<wr.length;Nr++){var pr=wr[Nr];if(pr.layer===je&&pr.listener===ke){for(var mt in pr.delegates)Qe.off(mt,pr.delegates[mt]);return wr.splice(Nr,1),Qe}}};return this._delegatedListeners&&this._delegatedListeners[ye]&&vt(this._delegatedListeners),this},K.prototype.queryRenderedFeatures=function(ye,je){if(!this.style)return[];je===void 0&&ye!==void 0&&!(ye instanceof e.Point)&&!Array.isArray(ye)&&(je=ye,ye=void 0),je=je||{},ye=ye||[[0,0],[this.transform.width,this.transform.height]];var ke;if(ye instanceof e.Point||typeof ye[0]=="number")ke=[e.Point.convert(ye)];else{var Qe=e.Point.convert(ye[0]),vt=e.Point.convert(ye[1]);ke=[Qe,new e.Point(vt.x,Qe.y),vt,new e.Point(Qe.x,vt.y),Qe]}return this.style.queryRenderedFeatures(ke,je,this.transform)},K.prototype.querySourceFeatures=function(ye,je){return this.style.querySourceFeatures(ye,je)},K.prototype.setStyle=function(ye,je){return je=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},je),je.diff!==!1&&je.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ye?(this._diffStyle(ye,je),this):(this._localIdeographFontFamily=je.localIdeographFontFamily,this._updateStyle(ye,je))},K.prototype._getUIString=function(ye){var je=this._locale[ye];if(je==null)throw new Error("Missing UI string '"+ye+"'");return je},K.prototype._updateStyle=function(ye,je){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),ye)this.style=new Nl(this,je||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof ye=="string"?this.style.loadURL(ye):this.style.loadJSON(ye),this},K.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Nl(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},K.prototype._diffStyle=function(ye,je){var ke=this;if(typeof ye=="string"){var Qe=this._requestManager.normalizeStyleURL(ye),vt=this._requestManager.transformRequest(Qe,e.ResourceType.Style);e.getJSON(vt,function(qt,wr){qt?ke.fire(new e.ErrorEvent(qt)):wr&&ke._updateDiff(wr,je)})}else typeof ye=="object"&&this._updateDiff(ye,je)},K.prototype._updateDiff=function(ye,je){try{this.style.setState(ye)&&this._update(!0)}catch(ke){e.warnOnce("Unable to perform style diff: "+(ke.message||ke.error||ke)+". Rebuilding the style from scratch."),this._updateStyle(ye,je)}},K.prototype.getStyle=function(){if(this.style)return this.style.serialize()},K.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},K.prototype.addSource=function(ye,je){return this._lazyInitEmptyStyle(),this.style.addSource(ye,je),this._update(!0)},K.prototype.isSourceLoaded=function(ye){var je=this.style&&this.style.sourceCaches[ye];if(je===void 0){this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+ye+"'")));return}return je.loaded()},K.prototype.areTilesLoaded=function(){var ye=this.style&&this.style.sourceCaches;for(var je in ye){var ke=ye[je],Qe=ke._tiles;for(var vt in Qe){var qt=Qe[vt];if(!(qt.state==="loaded"||qt.state==="errored"))return!1}}return!0},K.prototype.addSourceType=function(ye,je,ke){return this._lazyInitEmptyStyle(),this.style.addSourceType(ye,je,ke)},K.prototype.removeSource=function(ye){return this.style.removeSource(ye),this._update(!0)},K.prototype.getSource=function(ye){return this.style.getSource(ye)},K.prototype.addImage=function(ye,je,ke){ke===void 0&&(ke={});var Qe=ke.pixelRatio;Qe===void 0&&(Qe=1);var vt=ke.sdf;vt===void 0&&(vt=!1);var qt=ke.stretchX,wr=ke.stretchY,Nr=ke.content;this._lazyInitEmptyStyle();var pr=0;if(je instanceof Ma||di&&je instanceof di){var mt=e.browser.getImageData(je),St=mt.width,Ft=mt.height,rr=mt.data;this.style.addImage(ye,{data:new e.RGBAImage({width:St,height:Ft},rr),pixelRatio:Qe,stretchX:qt,stretchY:wr,content:Nr,sdf:vt,version:pr})}else{if(je.width===void 0||je.height===void 0)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var hr=je.width,nr=je.height,dr=je.data,or=je;this.style.addImage(ye,{data:new e.RGBAImage({width:hr,height:nr},new Uint8Array(dr)),pixelRatio:Qe,stretchX:qt,stretchY:wr,content:Nr,sdf:vt,version:pr,userImage:or}),or.onAdd&&or.onAdd(this,ye)}},K.prototype.updateImage=function(ye,je){var ke=this.style.getImage(ye);if(!ke)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var Qe=je instanceof Ma||di&&je instanceof di?e.browser.getImageData(je):je,vt=Qe.width,qt=Qe.height,wr=Qe.data;if(vt===void 0||qt===void 0)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(vt!==ke.data.width||qt!==ke.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var Nr=!(je instanceof Ma||di&&je instanceof di);ke.data.replace(wr,Nr),this.style.updateImage(ye,ke)},K.prototype.hasImage=function(ye){return ye?!!this.style.getImage(ye):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},K.prototype.removeImage=function(ye){this.style.removeImage(ye)},K.prototype.loadImage=function(ye,je){e.getImage(this._requestManager.transformRequest(ye,e.ResourceType.Image),je)},K.prototype.listImages=function(){return this.style.listImages()},K.prototype.addLayer=function(ye,je){return this._lazyInitEmptyStyle(),this.style.addLayer(ye,je),this._update(!0)},K.prototype.moveLayer=function(ye,je){return this.style.moveLayer(ye,je),this._update(!0)},K.prototype.removeLayer=function(ye){return this.style.removeLayer(ye),this._update(!0)},K.prototype.getLayer=function(ye){return this.style.getLayer(ye)},K.prototype.setLayerZoomRange=function(ye,je,ke){return this.style.setLayerZoomRange(ye,je,ke),this._update(!0)},K.prototype.setFilter=function(ye,je,ke){return ke===void 0&&(ke={}),this.style.setFilter(ye,je,ke),this._update(!0)},K.prototype.getFilter=function(ye){return this.style.getFilter(ye)},K.prototype.setPaintProperty=function(ye,je,ke,Qe){return Qe===void 0&&(Qe={}),this.style.setPaintProperty(ye,je,ke,Qe),this._update(!0)},K.prototype.getPaintProperty=function(ye,je){return this.style.getPaintProperty(ye,je)},K.prototype.setLayoutProperty=function(ye,je,ke,Qe){return Qe===void 0&&(Qe={}),this.style.setLayoutProperty(ye,je,ke,Qe),this._update(!0)},K.prototype.getLayoutProperty=function(ye,je){return this.style.getLayoutProperty(ye,je)},K.prototype.setLight=function(ye,je){return je===void 0&&(je={}),this._lazyInitEmptyStyle(),this.style.setLight(ye,je),this._update(!0)},K.prototype.getLight=function(){return this.style.getLight()},K.prototype.setFeatureState=function(ye,je){return this.style.setFeatureState(ye,je),this._update()},K.prototype.removeFeatureState=function(ye,je){return this.style.removeFeatureState(ye,je),this._update()},K.prototype.getFeatureState=function(ye){return this.style.getFeatureState(ye)},K.prototype.getContainer=function(){return this._container},K.prototype.getCanvasContainer=function(){return this._canvasContainer},K.prototype.getCanvas=function(){return this._canvas},K.prototype._containerDimensions=function(){var ye=0,je=0;return this._container&&(ye=this._container.clientWidth||400,je=this._container.clientHeight||300),[ye,je]},K.prototype._detectMissingCSS=function(){var ye=e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");ye!=="rgb(250, 128, 114)"&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},K.prototype._setupContainer=function(){var ye=this._container;ye.classList.add("mapboxgl-map");var je=this._missingCSSCanary=r.create("div","mapboxgl-canary",ye);je.style.visibility="hidden",this._detectMissingCSS();var ke=this._canvasContainer=r.create("div","mapboxgl-canvas-container",ye);this._interactive&&ke.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",ke),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var Qe=this._containerDimensions();this._resizeCanvas(Qe[0],Qe[1]);var vt=this._controlContainer=r.create("div","mapboxgl-control-container",ye),qt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(wr){qt[wr]=r.create("div","mapboxgl-ctrl-"+wr,vt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},K.prototype._resizeCanvas=function(ye,je){var ke=e.browser.devicePixelRatio||1;this._canvas.width=ke*ye,this._canvas.height=ke*je,this._canvas.style.width=ye+"px",this._canvas.style.height=je+"px"},K.prototype._setupPainter=function(){var ye=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),je=this._canvas.getContext("webgl",ye)||this._canvas.getContext("experimental-webgl",ye);if(!je){this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Zo(je,this.transform),e.webpSupported.testSupport(je)},K.prototype._contextLost=function(ye){ye.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:ye}))},K.prototype._contextRestored=function(ye){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:ye}))},K.prototype._onMapScroll=function(ye){if(ye.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},K.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},K.prototype._update=function(ye){return this.style?(this._styleDirty=this._styleDirty||ye,this._sourcesDirty=!0,this.triggerRepaint(),this):this},K.prototype._requestRenderFrame=function(ye){return this._update(),this._renderTaskQueue.add(ye)},K.prototype._cancelRenderFrame=function(ye){this._renderTaskQueue.remove(ye)},K.prototype._render=function(ye){var je=this,ke,Qe=0,vt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ke=vt.createQueryEXT(),vt.beginQueryEXT(vt.TIME_ELAPSED_EXT,ke),Qe=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ye),!this._removed){var qt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var wr=this.transform.zoom,Nr=e.browser.now();this.style.zoomHistory.update(wr,Nr);var pr=new e.EvaluationParameters(wr,{now:Nr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),mt=pr.crossFadingFactor();(mt!==1||mt!==this._crossFadingFactor)&&(qt=!0,this._crossFadingFactor=mt),this.style.update(pr)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||qt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var St=e.browser.now()-Qe;vt.endQueryEXT(vt.TIME_ELAPSED_EXT,ke),setTimeout(function(){var hr=vt.getQueryObjectEXT(ke,vt.QUERY_RESULT_EXT)/1e6;vt.deleteQueryEXT(ke),je.fire(new e.Event("gpu-timing-frame",{cpuTime:St,gpuTime:hr}))},50)}if(this.listens("gpu-timing-layer")){var Ft=this.painter.collectGpuTimers();setTimeout(function(){var hr=je.painter.queryGpuTimers(Ft);je.fire(new e.Event("gpu-timing-layer",{layerTimes:hr}))},50)}var rr=this._sourcesDirty||this._styleDirty||this._placementDirty;return rr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),this._loaded&&!this._fullyLoaded&&!rr&&(this._fullyLoaded=!0),this}},K.prototype.remove=function(){this._hash&&this._hash.remove();for(var ye=0,je=this._controls;ye<je.length;ye+=1){var ke=je[ye];ke.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof e.window<"u"&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("orientationchange",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var Qe=this.painter.context.gl.getExtension("WEBGL_lose_context");Qe&&Qe.loseContext&&Qe.loseContext(),Yi(this._canvasContainer),Yi(this._controlContainer),Yi(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},K.prototype.triggerRepaint=function(){var ye=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(je){ye._frame=null,ye._render(je)}))},K.prototype._onWindowOnline=function(){this._update()},K.prototype._onWindowResize=function(ye){this._trackResize&&this.resize({originalEvent:ye})._update()},xe.showTileBoundaries.get=function(){return!!this._showTileBoundaries},xe.showTileBoundaries.set=function(te){this._showTileBoundaries!==te&&(this._showTileBoundaries=te,this._update())},xe.showPadding.get=function(){return!!this._showPadding},xe.showPadding.set=function(te){this._showPadding!==te&&(this._showPadding=te,this._update())},xe.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},xe.showCollisionBoxes.set=function(te){this._showCollisionBoxes!==te&&(this._showCollisionBoxes=te,te?this.style._generateCollisionBoxes():this._update())},xe.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},xe.showOverdrawInspector.set=function(te){this._showOverdrawInspector!==te&&(this._showOverdrawInspector=te,this._update())},xe.repaint.get=function(){return!!this._repaint},xe.repaint.set=function(te){this._repaint!==te&&(this._repaint=te,this.triggerRepaint())},xe.vertices.get=function(){return!!this._vertices},xe.vertices.set=function(te){this._vertices=te,this._update()},K.prototype._setCacheLimits=function(ye,je){e.setCacheLimits(ye,je)},xe.version.get=function(){return e.version},Object.defineProperties(K.prototype,xe),K}(gn);function Yi(ge){ge.parentNode&&ge.parentNode.removeChild(ge)}var Ri={showCompass:!0,showZoom:!0,visualizePitch:!1},Ti=function(K){var xe=this;this.options=e.extend({},Ri,K),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(te){return te.preventDefault()}),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(te){return xe._map.zoomIn({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(te){return xe._map.zoomOut({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(te){xe.options.visualizePitch?xe._map.resetNorthPitch({},{originalEvent:te}):xe._map.resetNorth({},{originalEvent:te})}),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Ti.prototype._updateZoomButtons=function(){var K=this._map.getZoom(),xe=K===this._map.getMaxZoom(),te=K===this._map.getMinZoom();this._zoomInButton.disabled=xe,this._zoomOutButton.disabled=te,this._zoomInButton.setAttribute("aria-disabled",xe.toString()),this._zoomOutButton.setAttribute("aria-disabled",te.toString())},Ti.prototype._rotateCompassArrow=function(){var K=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=K},Ti.prototype.onAdd=function(K){return this._map=K,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new xi(this._map,this._compass,this.options.visualizePitch)),this._container},Ti.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Ti.prototype._createButton=function(K,xe){var te=r.create("button",K,this._container);return te.type="button",te.addEventListener("click",xe),te},Ti.prototype._setButtonTitle=function(K,xe){var te=this._map._getUIString("NavigationControl."+xe);K.title=te,K.setAttribute("aria-label",te)};var xi=function(K,xe,te){te===void 0&&(te=!1),this._clickTolerance=10,this.element=xe,this.mouseRotate=new sn({clickTolerance:K.dragRotate._mouseRotate._clickTolerance}),this.map=K,te&&(this.mousePitch=new rn({clickTolerance:K.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(xe,"mousedown",this.mousedown),r.addEventListener(xe,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(xe,"touchmove",this.touchmove),r.addEventListener(xe,"touchend",this.touchend),r.addEventListener(xe,"touchcancel",this.reset)};xi.prototype.down=function(K,xe){this.mouseRotate.mousedown(K,xe),this.mousePitch&&this.mousePitch.mousedown(K,xe),r.disableDrag()},xi.prototype.move=function(K,xe){var te=this.map,ye=this.mouseRotate.mousemoveWindow(K,xe);if(ye&&ye.bearingDelta&&te.setBearing(te.getBearing()+ye.bearingDelta),this.mousePitch){var je=this.mousePitch.mousemoveWindow(K,xe);je&&je.pitchDelta&&te.setPitch(te.getPitch()+je.pitchDelta)}},xi.prototype.off=function(){var K=this.element;r.removeEventListener(K,"mousedown",this.mousedown),r.removeEventListener(K,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(K,"touchmove",this.touchmove),r.removeEventListener(K,"touchend",this.touchend),r.removeEventListener(K,"touchcancel",this.reset),this.offTemp()},xi.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},xi.prototype.mousedown=function(K){this.down(e.extend({},K,{ctrlKey:!0,preventDefault:function(){return K.preventDefault()}}),r.mousePos(this.element,K)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},xi.prototype.mousemove=function(K){this.move(K,r.mousePos(this.element,K))},xi.prototype.mouseup=function(K){this.mouseRotate.mouseupWindow(K),this.mousePitch&&this.mousePitch.mouseupWindow(K),this.offTemp()},xi.prototype.touchstart=function(K){K.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,K.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return K.preventDefault()}},this._startPos))},xi.prototype.touchmove=function(K){K.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,K.targetTouches)[0],this.move({preventDefault:function(){return K.preventDefault()}},this._lastPos))},xi.prototype.touchend=function(K){K.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},xi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function Xi(ge,K,xe){if(ge=new e.LngLat(ge.lng,ge.lat),K){var te=new e.LngLat(ge.lng-360,ge.lat),ye=new e.LngLat(ge.lng+360,ge.lat),je=xe.locationPoint(ge).distSqr(K);xe.locationPoint(te).distSqr(K)<je?ge=te:xe.locationPoint(ye).distSqr(K)<je&&(ge=ye)}for(;Math.abs(ge.lng-xe.center.lng)>180;){var ke=xe.locationPoint(ge);if(ke.x>=0&&ke.y>=0&&ke.x<=xe.width&&ke.y<=xe.height)break;ge.lng>xe.center.lng?ge.lng-=360:ge.lng+=360}return ge}var vn={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 Rn(ge,K,xe){var te=ge.classList;for(var ye in vn)te.remove("mapboxgl-"+xe+"-anchor-"+ye);te.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,te){if(ge.call(this),(xe instanceof e.window.HTMLElement||te)&&(xe=e.extend({element:xe},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=xe&&xe.anchor||"center",this._color=xe&&xe.color||"#3FB1CE",this._scale=xe&&xe.scale||1,this._draggable=xe&&xe.draggable||!1,this._clickTolerance=xe&&xe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=xe&&xe.rotation||0,this._rotationAlignment=xe&&xe.rotationAlignment||"auto",this._pitchAlignment=xe&&xe.pitchAlignment&&xe.pitchAlignment!=="auto"?xe.pitchAlignment:this._rotationAlignment,!xe||!xe.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var ye=r.createNS("http://www.w3.org/2000/svg","svg"),je=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",je+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+je);var Qe=r.createNS("http://www.w3.org/2000/svg","g");Qe.setAttributeNS(null,"stroke","none"),Qe.setAttributeNS(null,"stroke-width","1"),Qe.setAttributeNS(null,"fill","none"),Qe.setAttributeNS(null,"fill-rule","evenodd");var vt=r.createNS("http://www.w3.org/2000/svg","g");vt.setAttributeNS(null,"fill-rule","nonzero");var qt=r.createNS("http://www.w3.org/2000/svg","g");qt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),qt.setAttributeNS(null,"fill","#000000");for(var wr=[{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"}],Nr=0,pr=wr;Nr<pr.length;Nr+=1){var mt=pr[Nr],St=r.createNS("http://www.w3.org/2000/svg","ellipse");St.setAttributeNS(null,"opacity","0.04"),St.setAttributeNS(null,"cx","10.5"),St.setAttributeNS(null,"cy","5.80029008"),St.setAttributeNS(null,"rx",mt.rx),St.setAttributeNS(null,"ry",mt.ry),qt.appendChild(St)}var Ft=r.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"fill",this._color);var rr=r.createNS("http://www.w3.org/2000/svg","path");rr.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"),Ft.appendChild(rr);var hr=r.createNS("http://www.w3.org/2000/svg","g");hr.setAttributeNS(null,"opacity","0.25"),hr.setAttributeNS(null,"fill","#000000");var nr=r.createNS("http://www.w3.org/2000/svg","path");nr.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"),hr.appendChild(nr);var dr=r.createNS("http://www.w3.org/2000/svg","g");dr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),dr.setAttributeNS(null,"fill","#FFFFFF");var or=r.createNS("http://www.w3.org/2000/svg","g");or.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Wt=r.createNS("http://www.w3.org/2000/svg","circle");Wt.setAttributeNS(null,"fill","#000000"),Wt.setAttributeNS(null,"opacity","0.25"),Wt.setAttributeNS(null,"cx","5.5"),Wt.setAttributeNS(null,"cy","5.5"),Wt.setAttributeNS(null,"r","5.4999962");var ir=r.createNS("http://www.w3.org/2000/svg","circle");ir.setAttributeNS(null,"fill","#FFFFFF"),ir.setAttributeNS(null,"cx","5.5"),ir.setAttributeNS(null,"cy","5.5"),ir.setAttributeNS(null,"r","5.4999962"),or.appendChild(Wt),or.appendChild(ir),vt.appendChild(qt),vt.appendChild(Ft),vt.appendChild(hr),vt.appendChild(dr),vt.appendChild(or),ye.appendChild(vt),ye.setAttributeNS(null,"height",je*this._scale+"px"),ye.setAttributeNS(null,"width",ke*this._scale+"px"),this._element.appendChild(ye),this._offset=e.Point.convert(xe&&xe.offset||[0,-14])}else this._element=xe.element,this._offset=e.Point.convert(xe&&xe.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(Vt){Vt.preventDefault()}),this._element.addEventListener("mousedown",function(Vt){Vt.preventDefault()}),Rn(this._element,this._anchor,"marker"),this._popup=null}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this.remove(),this._map=te,te.getCanvasContainer().appendChild(this._element),te.on("move",this._update),te.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},K.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},K.prototype.getElement=function(){return this._element},K.prototype.setPopup=function(te){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),te){if(!("offset"in te.options)){var ye=38.1,je=13.5,ke=Math.sqrt(Math.pow(je,2)/2);te.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-ye],"bottom-left":[ke,(ye-je+ke)*-1],"bottom-right":[-ke,(ye-je+ke)*-1],left:[je,(ye-je)*-1],right:[-je,(ye-je)*-1]}:this._offset}this._popup=te,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},K.prototype._onKeyPress=function(te){var ye=te.code,je=te.charCode||te.keyCode;(ye==="Space"||ye==="Enter"||je===32||je===13)&&this.togglePopup()},K.prototype._onMapClick=function(te){var ye=te.originalEvent.target,je=this._element;this._popup&&(ye===je||je.contains(ye))&&this.togglePopup()},K.prototype.getPopup=function(){return this._popup},K.prototype.togglePopup=function(){var te=this._popup;if(te)te.isOpen()?te.remove():te.addTo(this._map);else return this;return this},K.prototype._update=function(te){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Xi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var ye="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ye="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(ye="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var je="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?je="rotateX(0deg)":this._pitchAlignment==="map"&&(je="rotateX("+this._map.getPitch()+"deg)"),(!te||te.type==="moveend")&&(this._pos=this._pos.round()),r.setTransform(this._element,vn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+je+" "+ye)}},K.prototype.getOffset=function(){return this._offset},K.prototype.setOffset=function(te){return this._offset=e.Point.convert(te),this._update(),this},K.prototype._onMove=function(te){if(!this._isDragging){var ye=this._clickTolerance||this._map._clickTolerance;this._isDragging=te.point.dist(this._pointerdownPos)>=ye}this._isDragging&&(this._pos=te.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 e.Event("dragstart"))),this.fire(new e.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(te){this._element.contains(te.originalEvent.target)&&(te.preventDefault(),this._positionDelta=te.point.sub(this._pos).add(this._offset),this._pointerdownPos=te.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))},K.prototype.setDraggable=function(te){return this._draggable=!!te,this._map&&(te?(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},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(te){return this._rotation=te||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(te){return this._rotationAlignment=te||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(te){return this._pitchAlignment=te&&te!=="auto"?te:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},En;function Dn(ge){En!==void 0?ge(En):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){En=K.state!=="denied",ge(En)}):(En=!!e.window.navigator.geolocation,ge(En))}var Xn=0,zs=!1,bl=function(ge){function K(xe){ge.call(this),this.options=e.extend({},nn,xe),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(te){return this._map=te,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Dn(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,zs=!1},K.prototype._isOutOfMapMaxBounds=function(te){var ye=this._map.getMaxBounds(),je=te.coords;return ye&&(je.longitude<ye.getWest()||je.longitude>ye.getEast()||je.latitude<ye.getSouth()||je.latitude>ye.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(te){if(this._map){if(this._isOutOfMapMaxBounds(te)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",te)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=te,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(te),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(te),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",te)),this._finish()}},K.prototype._updateCamera=function(te){var ye=new e.LngLat(te.coords.longitude,te.coords.latitude),je=te.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(je),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(te){if(te){var ye=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=te.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var te=this._map._container.clientHeight/2,ye=this._map.unproject([0,te]),je=this._map.unproject([1,te]),ke=ye.distanceTo(je),Qe=Math.ceil(2*this._accuracy/ke);this._circleElement.style.width=Qe+"px",this._circleElement.style.height=Qe+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(te){if(this._map){if(this.options.trackUserLocation)if(te.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ye=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ye,this._geolocateButton.setAttribute("aria-label",ye),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&zs)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",te)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(te){var ye=this;if(this._container.addEventListener("contextmenu",function(Qe){return Qe.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",te===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var je=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=je,this._geolocateButton.setAttribute("aria-label",je)}else{var ke=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ke,this._geolocateButton.setAttribute("aria-label",ke)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ii(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ii({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(Qe){var vt=Qe.originalEvent&&Qe.originalEvent.type==="resize";!Qe.geolocateSource&&ye._watchState==="ACTIVE_LOCK"&&!vt&&(ye._watchState="BACKGROUND",ye._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ye._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ye.fire(new e.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,zs=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++;var te;Xn>1?(te={maximumAge:6e5,timeout:0},zs=!0):(te=this.options.positionOptions,zs=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,te)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(e.Evented),ho={maxWidth:100,unit:"metric"},Wl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Wl.prototype.getDefaultPosition=function(){return"bottom-left"},Wl.prototype._onMove=function(){fs(this._map,this._container,this.options)},Wl.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Wl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Wl.prototype.setUnit=function(K){this.options.unit=K,fs(this._map,this._container,this.options)};function fs(ge,K,xe){var te=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,je=ge.unproject([0,ye]),ke=ge.unproject([te,ye]),Qe=je.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Sl(K,te,qt,ge._getUIString("ScaleControl.Miles"))}else Sl(K,te,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var wr=Qe/1852;Sl(K,te,wr,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Sl(K,te,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Sl(K,te,Qe,ge._getUIString("ScaleControl.Meters"))}function Sl(ge,K,xe,te){var ye=tu(xe),je=ye/xe;ge.style.width=K*je+"px",ge.innerHTML=ye+"&nbsp;"+te}function kl(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function tu(ge){var K=Math.pow(10,(""+Math.floor(ge)).length-1),xe=ge/K;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:kl(xe),K*xe}var Vs=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof e.window.HTMLElement?this._container=K.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Vs.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Vs.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Vs.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Vs.prototype._setupUI=function(){var K=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Vs.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},Vs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Vs.prototype._isFullscreen=function(){return this._fullscreen},Vs.prototype._changeIcon=function(){var K=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Vs.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var pl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},wl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Zn=function(ge){function K(xe){ge.call(this),this.options=e.extend(Object.create(pl),xe),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this._map&&this.remove(),this._map=te,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(te){return this.setDOMContent(e.window.document.createTextNode(te))},K.prototype.setHTML=function(te){var ye=e.window.document.createDocumentFragment(),je=e.window.document.createElement("body"),ke;for(je.innerHTML=te;ke=je.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(te){return this.options.maxWidth=te,this._update(),this},K.prototype.setDOMContent=function(te){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(te),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(te){this._container&&this._container.classList.add(te)},K.prototype.removeClassName=function(te){this._container&&this._container.classList.remove(te)},K.prototype.setOffset=function(te){return this.options.offset=te,this._update(),this},K.prototype.toggleClassName=function(te){if(this._container)return this._container.classList.toggle(te)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(te){this._update(te.point)},K.prototype._onMouseMove=function(te){this._update(te.point)},K.prototype._onDrag=function(te){this._update(te.point)},K.prototype._update=function(te){var ye=this,je=this._lngLat||this._trackPointer;if(!(!this._map||!je||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(mt){return ye._container.classList.add(mt)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Xi(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!te))){var ke=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),Qe=this.options.anchor,vt=Cl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,wr=this._container.offsetHeight,Nr;ke.y+vt.bottom.y<wr?Nr=["top"]:ke.y>this._map.transform.height-wr?Nr=["bottom"]:Nr=[],ke.x<qt/2?Nr.push("left"):ke.x>this._map.transform.width-qt/2&&Nr.push("right"),Nr.length===0?Qe="bottom":Qe=Nr.join("-")}var pr=ke.add(vt[Qe]).round();r.setTransform(this._container,vn[Qe]+" translate("+pr.x+"px,"+pr.y+"px)"),Rn(this._container,Qe,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var te=this._container.querySelector(wl);te&&te.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function Cl(ge){if(ge)if(typeof ge=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new e.Point(0,0),top:new e.Point(0,ge),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ge),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ge,0),right:new e.Point(-ge,0)}}else if(ge instanceof e.Point||Array.isArray(ge)){var xe=e.Point.convert(ge);return{center:xe,top:xe,"top-left":xe,"top-right":xe,bottom:xe,"bottom-left":xe,"bottom-right":xe,left:xe,right:xe}}else return{center:e.Point.convert(ge.center||[0,0]),top:e.Point.convert(ge.top||[0,0]),"top-left":e.Point.convert(ge["top-left"]||[0,0]),"top-right":e.Point.convert(ge["top-right"]||[0,0]),bottom:e.Point.convert(ge.bottom||[0,0]),"bottom-left":e.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ge["bottom-right"]||[0,0]),left:e.Point.convert(ge.left||[0,0]),right:e.Point.convert(ge.right||[0,0])};else return Cl(new e.Point(0,0))}var Po={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:bl,AttributionControl:zi,ScaleControl:Wl,FullscreenControl:Vs,Popup:Zn,Marker:Ii,Style:Nl,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:fn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ge){e.config.ACCESS_TOKEN=ge},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ge){e.config.API_URL=ge},get workerCount(){return ri.workerCount},set workerCount(ge){ri.workerCount=ge},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Po}),S})}}),yV=He({"src/plots/mapbox/layers.js"(Z,V){"use strict";var d=sa(),x=ou().sanitizeHTML,S=E6(),E=im();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s<i.length;s++){var h=i[s].id;if(typeof h=="string"&&h.indexOf(E.traceLayerPrefix)===0){n=h;break}}return n},t.updateLayer=function(n){var i=this.subplot,s=o(n),h=this.lookupBelow(),f=this.findFollowingMapboxLayerId(h);this.removeLayer(),r(n)&&i.addLayer({id:this.idLayer,source:this.idSource,"source-layer":n.sourcelayer||"",type:n.type,minzoom:n.minzoom,maxzoom:n.maxzoom,layout:s.layout,paint:s.paint},f),this.layerType=n.type,this.below=h},t.updateStyle=function(n){if(r(n)){var i=o(n);this.subplot.setOptions(this.idLayer,"setLayoutProperty",i.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",i.paint)}},t.removeLayer=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer)},t.dispose=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer),n.getSource(this.idSource)&&n.removeSource(this.idSource)};function r(n){if(!n.visible)return!1;var i=n.source;if(Array.isArray(i)&&i.length>0){for(var s=0;s<i.length;s++)if(typeof i[s]!="string"||i[s].length===0)return!1;return!0}return d.isPlainObject(i)||typeof i=="string"&&i.length>0}function o(n){var i={},s={};switch(n.type){case"circle":d.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":d.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,f=S(h.textposition,h.iconsize);d.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),d.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},f;return i==="geojson"?f="data":i==="vector"?f=typeof s=="string"?"url":"tiles":i==="raster"?(f="tiles",h.tileSize=256):i==="image"&&(f="url",h.coordinates=n.coordinates),h[f]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}V.exports=function(i,s,h){var f=new e(i,s);return f.update(h),f}}}),_V=He({"src/plots/mapbox/mapbox.js"(Z,V){"use strict";var d=k6(),x=sa(),S=g0(),E=lo(),e=Ho(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,v=im(),c=yV();function T(g,b){this.id=b,this.gd=g;var p=g._fullLayout,u=g._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,p){var u=this,y=b[u.id];u.map&&y.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var m;u.map?m=new Promise(function(R,L){u.updateMap(g,b,R,L)}):m=new Promise(function(R,L){u.createMap(g,b,R,L)}),p.push(m)},l.createMap=function(g,b,p,u){var y=this,m=b[y.id],R=y.styleObj=w(m.style,b);y.accessToken=m.accesstoken;var L=m.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new d.Map({container:y.div,style:R.style,center:M(m.center),zoom:m.zoom,bearing:m.bearing,pitch:m.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(g)),Promise.all(N).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.updateMap=function(g,b,p,u){var y=this,m=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style,b);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,m.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){m.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(g,b){var p=b[this.id],u=p.layers,y,m,R=this.belowLookup={},L=!1;for(y=0;y<g.length;y++){var z=g[y][0].trace,F=z._module;typeof z.below=="string"?m=z.below:F.getBelow&&(m=F.getBelow(z,this)),m===""&&(L=!0),R["trace-"+z.uid]=m||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?m=N.below:L?m="traces":m="",R["layout-"+y]=m}var O={},P,U;for(P in R)m=R[P],O[m]?O[m].push(P):O[m]=[P];for(m in O){var B=O[m];if(B.length>1)for(y=0;y<B.length;y++)P=B[y],P.indexOf("trace-")===0?(U=P.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):P.indexOf("layout-")===0&&(U=P.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};l.updateData=function(g){var b=this.traceHash,p,u,y,m,R=g.slice().sort(function(O,P){return _[O[0].trace.type]-_[P[0].trace.type]});for(y=0;y<R.length;y++){var L=R[y];u=L[0].trace,p=b[u.uid];var z=!1;p&&(p.type===u.type?(p.update(L),z=!0):p.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(y=0;y<F.length;y++){var N=F[y];for(m=0;m<g.length;m++)if(u=g[m][0].trace,N===u.uid)continue e;p=b[N],p.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,p=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(p.center)),b.setZoom(p.zoom),b.setBearing(p.bearing),b.setPitch(p.pitch)),this.updateLayers(g),this.updateFramework(g),this.updateFx(g),this.map.resize(),this.gd._context._scrollZoom.mapbox?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(g){var b=this.map;b.on("render",function p(){b.loaded()&&(b.off("render",p),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function p(){g(new Error(v.mapOnErrorMsg))}b.once("error",p),b.once("style.error",p),b.once("source.error",p),b.once("tile.error",p),b.once("layer.error",p)},l.createFramework=function(g){var b=this,p=b.div=document.createElement("div");p.id=b.uid,p.style.position="absolute",b.container.appendChild(p),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(g),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,g)},l.initFx=function(g,b){var p=this,u=p.gd,y=p.map;y.on("moveend",function(L){if(p.map){var z=u._fullLayout;if(L.originalEvent||p.wheeling){var F=z[p.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,p.getViewEdits(F));var N=p.getView();F._input.center=F.center=N.center,F._input.zoom=F.zoom=N.zoom,F._input.bearing=F.bearing=N.bearing,F._input.pitch=F.pitch=N.pitch,u.emit("plotly_relayout",p.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?p.dragging=!1:p.wheeling&&(p.wheeling=!1),z._rehover&&z._rehover()}}),y.on("wheel",function(){p.wheeling=!0}),y.on("mousemove",function(L){var z=p.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},p.xaxis.p2c=function(){return y.unproject(F).lng},p.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===p.id&&u._fullLayout[p.id]&&r.hover(u,L,p.id)},r.hover(u,L,p.id),u._fullLayout._hoversubplot=p.id});function m(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){p.dragging=!0,m()}),y.on("zoomstart",m),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=p.getView();u.emit("plotly_relayouting",p.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[p.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,p.getViewEdits(L));var z=p.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=p.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",p.getViewEditsWithDerived(F))}),p.clearOutline=function(){h(p.dragOptions),s(p.dragOptions.gd)},p.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var m=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),n(m)||a(m)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,m)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,p=g._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],p=b.layers,u=this.layerList,y;if(p.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<p.length;y++)u.push(c(this,y,p[y]))}else for(y=0;y<p.length;y++)u[y].update(p[y])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(g,b,p){for(var u in p)this.map[b](g,u,p[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var p=this.map;if(typeof b=="string"){if(b===""){p.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){p.addLayer(g,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}p.addLayer(g)},l.project=function(g){return this.map.project(new d.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),p=b.lng,u=b.lat,y={lon:p,lat:u},m=g.getCanvas(),R=parseInt(m.style.width),L=parseInt(m.style.height);return{center:y,zoom:g.getZoom(),bearing:g.getBearing(),pitch:g.getPitch(),_derived:{coordinates:[g.unproject([0,0]).toArray(),g.unproject([R,0]).toArray(),g.unproject([R,L]).toArray(),g.unproject([0,L]).toArray()]}}},l.getViewEdits=function(g){for(var b=this.id,p=["center","zoom","bearing","pitch"],u={},y=0;y<p.length;y++){var m=p[y];u[b+"."+m]=g[m]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,p=this.getViewEdits(g);return p[b+"._derived"]=g._derived,p};function w(g,b){var p={};if(x.isPlainObject(g))p.id=g.id,p.style=g;else if(typeof g=="string")if(p.id=g,v.styleValuesMapbox.indexOf(g)!==-1)p.style=A(g);else if(v.stylesNonMapbox[g]){p.style=v.stylesNonMapbox[g];var u=p.style.sources["plotly-"+g],y=u?u.tiles:void 0;y&&y[0]&&y[0].slice(-9)==="?api_key="&&(y[0]+=b._mapboxAccessToken)}else p.style=g;else p.id=v.styleValueDflt,p.style=A(v.styleValueDflt);return p.transition={duration:0,delay:0},p}function A(g){return v.styleUrlPrefix+g+"-"+v.styleUrlSuffix}function M(g){return[g.lon,g.lat]}V.exports=T}}),xV=He({"src/plots/mapbox/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=o0(),S=hp(),E=Ex();V.exports=function(o,a,n){x(o,a,n,{type:"mapbox",attributes:E,handleDefaults:e,partition:"y",accessToken:a._mapboxAccessToken})};function e(r,o,a,n){a("accesstoken",n.accessToken),a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var i=a("bounds.west"),s=a("bounds.east"),h=a("bounds.south"),f=a("bounds.north");(i===void 0||s===void 0||h===void 0||f===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(v,c){return d.coerce(r,o,E.layers,v,c)}var n=a("visible");if(n){var i=a("sourcetype"),s=i==="raster"||i==="image";a("source"),a("sourceattribution"),i==="vector"&&a("sourcelayer"),i==="image"&&a("coordinates");var h;s&&(h="raster");var f=a("type",h);s&&f!=="raster"&&(f=o.type="raster",d.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),f==="circle"&&a("circle.radius"),f==="line"&&(a("line.width"),a("line.dash")),f==="fill"&&a("fill.outlinecolor"),f==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),d.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),MT=He({"src/plots/mapbox/index.js"(Z){"use strict";var V=k6(),d=sa(),x=d.strTranslate,S=d.strScale,E=Hh().getSubplotCalcData,e=vd(),t=Wn(),r=es(),o=ou(),a=_V(),n="mapbox",i=Z.constants=im();Z.name=n,Z.attr="subplot",Z.idRoot=n,Z.idRegex=Z.attrRegex=d.counterRegex(n);var s=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Z.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Z.layoutAttributes=Ex(),Z.supplyLayoutDefaults=xV();var h=!0;Z.plot=function(T){h&&(h=!1,d.warn(s));var l=T._fullLayout,_=T.calcdata,w=l._subplots[n];if(V.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var A=f(T,w);V.accessToken=A;for(var M=0;M<w.length;M++){var g=w[M],b=E(_,n,g),p=l[g],u=p._subplot;u||(u=new a(T,g),l[g]._subplot=u),u.viewInitial||(u.viewInitial={center:d.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),u.plot(b,l,T._promises)}},Z.clean=function(c,T,l,_){for(var w=_._subplots[n]||[],A=0;A<w.length;A++){var M=w[A];!T[M]&&_[M]._subplot&&_[M]._subplot.destroy()}},Z.toSVG=function(c){for(var T=c._fullLayout,l=T._subplots[n],_=T._size,w=0;w<l.length;w++){var A=T[l[w]],M=A.domain,g=A._subplot,b=g.toImage("png"),p=T._glimages.append("svg:image");p.attr({xmlns:e.svg,"xlink:href":b,x:_.l+_.w*M.x[0],y:_.t+_.h*(1-M.y[1]),width:_.w*(M.x[1]-M.x[0]),height:_.h*(M.y[1]-M.y[0]),preserveAspectRatio:"none"});var u=t.select(A._subplot.div),y=u.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!y){var m=T._glimages.append("g");m.attr("transform",x(_.l+_.w*M.x[0]+10,_.t+_.h*(1-M.y[0])-31)),m.append("path").attr("d",i.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),m.append("path").attr("d",i.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),m.append("path").attr("d",i.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),m.append("polygon").attr("points",i.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var R=u.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),L=T._glimages.append("g"),z=L.append("text");z.text(R).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":R});var F=r.bBox(z.node()),N=_.w*(M.x[1]-M.x[0]);if(F.width>N/2){var O=R.split("|").join("<br>");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",x(-3,-F.height+8)),L.insert("rect",".static-attribution").attr({x:-F.width-6,y:-F.height-3,width:F.width+6,height:F.height+3,fill:"rgba(255, 255, 255, 0.75)"});var P=1;F.width+6>N&&(P=N/(F.width+6));var U=[_.l+_.w*M.x[1],_.t+_.h*(1-M.y[0])];L.attr("transform",x(U[0],U[1])+S(P))}};function f(c,T){var l=c._fullLayout,_=c._context;if(_.mapboxAccessToken==="")return"";for(var w=[],A=[],M=!1,g=!1,b=0;b<T.length;b++){var p=l[T[b]],u=p.accesstoken;v(p.style)&&(u?d.pushUnique(w,u):(v(p._input.style)&&(d.error("Uses Mapbox map style, but did not set an access token."),M=!0),g=!0)),u&&d.pushUnique(A,u)}if(g){var y=M?i.noAccessTokenErrorMsg:i.missingStyleErrorMsg;throw d.error(y),new Error(y)}return w.length?(w.length>1&&d.warn(i.multipleTokensErrorMsg),w[0]):(A.length&&d.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function v(c){return typeof c=="string"&&(i.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[n],_=0;_<l.length;_++){var w=T[l[_]]._subplot;w.updateFx(T)}}}}),bV=He({"src/traces/scattermapbox/index.js"(Z,V){"use strict";var d=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");V.exports={attributes:AT(),supplyDefaults:pV(),colorbar:pp(),formatLabels:M6(),calc:iT(),plot:vV(),hoverPoints:ST().hoverPoints,eventData:mV(),selectPoints:gV(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.update(S)}},moduleType:"trace",name:"scattermapbox",basePlotModule:MT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),wV=He({"lib/scattermapbox.js"(Z,V){"use strict";V.exports=bV()}}),C6=He({"src/traces/choroplethmapbox/attributes.js"(Z,V){"use strict";var d=k1(),x=ku(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ru(),t=Qo().extendFlat;V.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},d.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d.text,hovertext:d.hovertext,marker:{line:{color:t({},d.marker.line.color,{editType:"plot"}),width:t({},d.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},d.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},d.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},d.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),TV=He({"src/traces/choroplethmapbox/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=C6();V.exports=function(e,t,r,o){function a(f,v){return d.coerce(e,t,S,f,v)}var n=a("locations"),i=a("z"),s=a("geojson");if(!d.isArrayOrTypedArray(n)||!n.length||!d.isArrayOrTypedArray(i)||!i.length||!(typeof s=="string"&&s!==""||d.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,i.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var h=a("marker.line.width");h&&a("marker.line.color"),a("marker.opacity"),x(e,t,o,a,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(t,a)}}}),L6=He({"src/traces/choroplethmapbox/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=rc(),E=es(),e=m0().makeBlank,t=g0();function r(a){var n=a[0].trace,i=n.visible===!0&&n._length!==0,s={layout:{visibility:"none"},paint:{}},h={layout:{visibility:"none"},paint:{}},f=n._opts={fill:s,line:h,geojson:e()};if(!i)return f;var v=t.extractTraceFeature(a);if(!v)return f;var c=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var m=y.mo;return d(m)?+x.constrain(m,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(y){return y.mlc});var A;x.isArrayOrTypedArray(l.width)&&(A=function(y){return y.mlw});for(var M=0;M<a.length;M++){var g=a[M],b=g.fOut;if(b){var p=b.properties;p.fc=c(g.z),_&&(p.mo=_(g)),w&&(p.mlc=w(g)),A&&(p.mlw=A(g)),g.ct=p.ct,g._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(h.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",h.layout.visibility="visible",f.geojson={type:"FeatureCollection",features:v},o(a),f}function o(a){var n=a[0].trace,i=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),f=0;f<a.length;f++){var v=a[f];v.fOut&&(v.fOut.properties.mo2=h.selectedOpacityFn(v))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(n.marker.opacity)?{type:"identity",property:"mo"}:n.marker.opacity;return x.extendFlat(i.fill.paint,{"fill-opacity":s}),x.extendFlat(i.line.paint,{"line-opacity":s}),i}V.exports={convert:r,convertOnSelect:o}}}),AV=He({"src/traces/choroplethmapbox/plot.js"(Z,V){"use strict";var d=L6().convert,x=L6().convertOnSelect,S=im().traceLayerPrefix;function E(t,r){this.type="choroplethmapbox",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(d(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var n=0;n<o.length;n++){var i=o[n],s=i[0],h=i[1],f=t[s];r.setOptions(h,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",f.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,n=this.sourceId,i=0;i<a.length;i++){var s=a[i],h=s[0],f=t[h];o.addLayer({type:h,id:s[1],source:n,layout:f.layout,paint:f.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},V.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=d(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),SV=He({"src/traces/choroplethmapbox/index.js"(Z,V){"use strict";var d=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");V.exports={attributes:C6(),supplyDefaults:TV(),colorbar:n0(),calc:lT(),plot:AV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.updateOnSelect(S)}},getBelow:function(x,S){for(var E=S.getMapLayers(),e=E.length-2;e>=0;e--){var t=E[e].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=e+1;r<E.length;r++)if(t=E[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:MT(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),MV=He({"lib/choroplethmapbox.js"(Z,V){"use strict";V.exports=SV()}}),P6=He({"src/traces/densitymapbox/attributes.js"(Z,V){"use strict";var d=ku(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ru(),e=AT(),t=Qo().extendFlat;V.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},d("",{cLetter:"z",editTypeOverride:"calc"}))}}),EV=He({"src/traces/densitymapbox/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=P6();V.exports=function(e,t,r,o){function a(h,f){return d.coerce(e,t,S,h,f)}var n=a("lon")||[],i=a("lat")||[],s=Math.min(n.length,i.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),x(e,t,o,a,{prefix:"",cLetter:"z"})}}}),kV=He({"src/traces/densitymapbox/calc.js"(Z,V){"use strict";var d=as(),x=sa().isArrayOrTypedArray,S=Ws().BADNUM,E=Tp(),e=sa()._;V.exports=function(r,o){for(var a=o._length,n=new Array(a),i=o.z,s=x(i)&&i.length,h=0;h<a;h++){var f=n[h]={},v=o.lon[h],c=o.lat[h];if(f.lonlat=d(v)&&d(c)?[+v,+c]:[S,S],s){var T=i[h];f.z=d(T)?T:S}}return E(r,o,{vals:s?i:[0,1],containerStr:"",cLetter:"z"}),a&&(n[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),n}}}),CV=He({"src/traces/densitymapbox/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Jn(),E=rc(),e=Ws().BADNUM,t=m0().makeBlank;V.exports=function(o){var a=o[0].trace,n=a.visible===!0&&a._length!==0,i={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:i,geojson:t()};if(!n)return s;var h=[],f,v=a.z,c=a.radius,T=x.isArrayOrTypedArray(v)&&v.length,l=x.isArrayOrTypedArray(c);for(f=0;f<o.length;f++){var _=o[f],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=d(c[f])&&c[f]>0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,p=b[0][1],u=S.opacity(p)<1?p:S.addOpacity(p,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f<b.length;f++)y.push(b[f][0],b[f][1]);var m=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?m:1/(g.max-g.min),"heatmap-color":y,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:h},s.heatmap.layout.visibility="visible",s}}}),LV=He({"src/traces/densitymapbox/plot.js"(Z,V){"use strict";var d=CV(),x=im().traceLayerPrefix;function S(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=d(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var n=0;n<r.length;n++){var i=r[n],s=i[0],h=i[1],f=o[s];t.setOptions(h,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",f.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,n=0;n<o.length;n++){var i=o[n],s=i[0],h=e[s];r.addLayer({type:s,id:i[1],source:a,layout:h.layout,paint:h.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),PV=He({"src/traces/densitymapbox/hover.js"(Z,V){"use strict";var d=Ho(),x=ST().hoverPoints,S=ST().getExtraText;V.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),IV=He({"src/traces/densitymapbox/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),RV=He({"src/traces/densitymapbox/index.js"(Z,V){"use strict";var d=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");V.exports={attributes:P6(),supplyDefaults:EV(),colorbar:n0(),formatLabels:M6(),calc:kV(),plot:LV(),hoverPoints:PV(),eventData:IV(),getBelow:function(x,S){for(var E=S.getMapLayers(),e=0;e<E.length;e++){var t=E[e],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymapbox",basePlotModule:MT(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),DV=He({"lib/densitymapbox.js"(Z,V){"use strict";V.exports=RV()}}),zV=He({"src/plots/map/styles/arcgis-sat-hybrid.js"(Z,V){V.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 &copy; <a href='http://www.esri.com'>ESRI</a>"},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"}}}),FV=He({"src/plots/map/styles/arcgis-sat.js"(Z,V){V.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 &copy; <a href='http://www.esri.com'>ESRI</a>"},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"}}]}}}),b0=He({"src/plots/map/constants.js"(Z,V){"use strict";var d=Jm(),x=zV(),S=FV(),E='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',e="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:e,dark:t,satellite:S,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:E,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":e,"carto-darkmatter":t,"carto-voyager":r,"carto-positron-nolabels":o,"carto-darkmatter-nolabels":a,"carto-voyager-nolabels":n},s=d(i);V.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}}}),kx=He({"src/plots/map/layout_attributes.js"(Z,V){"use strict";var d=sa(),x=Jn().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=b0(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=t({_arrayAttrRegexps:[d.counterRegex("map",".layers",!0)],domain:S({name:"map"}),style:{valType:"any",values:o.styleValuesMap,dflt:o.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("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:x},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:x}},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:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),ET=He({"src/traces/scattermap/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=kx(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=kx(),h=e.line,f=e.marker;V.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.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:n({},f.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d(),hovertemplatefallback:S()},"calc","nested")}}),I6=He({"src/traces/scattermap/constants.js"(Z,V){"use strict";var d=["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"];V.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),OV=He({"src/traces/scattermap/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;V.exports=function(i,s,h,f){function v(y,m){return d.coerce(i,s,r,y,m)}function c(y,m){return d.coerce2(i,s,r,y,m)}var T=a(i,s,v);if(!T){s.visible=!1;return}if(v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback"),v("mode"),v("below"),x.hasMarkers(s)){S(i,s,h,f,v,{noLine:!0,noAngle:!0}),v("marker.allowoverlap"),v("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,f,v,{noDash:!0}),v("connectgaps"));var _=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),M=c("cluster.size"),g=c("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,p=v("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(i,s,f,v,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}v("fill"),s.fill!=="none"&&t(i,s,h,v),d.coerceSelectionMarkerOpacity(s,v)};function a(n,i,s){var h=s("lon")||[],f=s("lat")||[],v=Math.min(h.length,f.length);return i._length=v,v}}}),R6=He({"src/traces/scattermap/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),D6=He({"src/plots/map/convert_text_opts.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(E)?d.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),BV=He({"src/traces/scattermap/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=I6().isSupportedFont,n=D6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;V.exports=function(g,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,y=p.fill!=="none",m=o.hasLines(p),R=o.hasMarkers(p),L=o.hasText(p),z=R&&p.marker.symbol==="circle",F=R&&p.marker.symbol!=="circle",N=p.cluster&&p.cluster.enabled,O=f("fill"),P=f("line"),U=f("circle"),B=f("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||m)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),m&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var le=v(b);U.geojson=le.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(p),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":le.mcc,"circle-radius":le.mrc,"circle-opacity":le.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=c(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var ce=(p.marker||{}).size,de=n(p.textposition,ce);x.extendFlat(B.layout,{"text-size":p.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(p)}),x.extendFlat(B.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return X};function f(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function v(M){var g=M[0].trace,b=g.marker,p=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),m=x.isArrayOrTypedArray(b.opacity),R;function L(ce){return g.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;m&&(O=function(ce){var de=d(ce)?+x.constrain(ce,0,1):0;return L(de)});var P=[];for(R=0;R<M.length;R++){var U=M[R],B=U.lonlat;if(!_(B)){var X={};F&&(X.mcc=U.mcc=F(U.mc)),N&&(X.mrc=U.mrc=N(U.ms)),O&&(X.mo=O(U.mo)),p&&(X.selected=U.selected||0),P.push({type:"Feature",id:R+1,geometry:{type:"Point",coordinates:B},properties:X})}}var $;if(p)for($=t.makeSelectedPointStyleFns(g),R=0;R<P.length;R++){var le=P[R].properties;$.selectedOpacityFn&&(le.mo=L($.selectedOpacityFn(le))),$.selectedColorFn&&(le.mcc=$.selectedColorFn(le)),$.selectedSizeFn&&(le.mrc=$.selectedSizeFn(le))}return{geojson:{type:"FeatureCollection",features:P},mcc:u||$&&$.selectedColorFn?{type:"identity",property:"mcc"}:b.color,mrc:y||$&&$.selectedSizeFn?{type:"identity",property:"mrc"}:z(b.size),mo:m||$&&$.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function c(M,g){for(var b=g._fullLayout,p=M[0].trace,u=p.marker||{},y=u.symbol,m=u.angle,R=y!=="circle"?T(y):l,L=m!=="auto"?T(m,!0):l,z=o.hasText(p)?T(p.text):l,F=[],N=0;N<M.length;N++){var O=M[N];if(!_(O.lonlat)){var P=p.texttemplate,U;if(P){var B=Array.isArray(P)?P[N]||"":P,X=p._module.formatLabels(O,p,b),$={};i($,p,O.i),U=x.texttemplateString({data:[$,O,p._meta],fallback:p.texttemplatefallback,labels:X,locale:b._d3locale,template:B})}else U=z(N);U&&(U=U.replace(s,"").replace(h,`
`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:R(N),angle:L(N),text:U}})}}return{type:"FeatureCollection",features:F}}function T(M,g){return x.isArrayOrTypedArray(M)?g?function(b){return d(M[b])?+M[b]:0}:function(b){return M[b]}:M?function(){return M}:l}function l(){return""}function _(M){return M[0]===S}function w(M,g){var b;if(x.isArrayOrTypedArray(M)&&x.isArrayOrTypedArray(g)){b=["step",["get","point_count"],M[0]];for(var p=1;p<M.length;p++)b.push(g[p-1],M[p])}else b=M;return b}function A(M){var g=M.textfont,b=g.family,p=g.style,u=g.weight,y=b.split(" "),m=y[y.length-1]==="Italic";m&&y.pop(),m=m||p==="italic";var R=y.join(" ");u==="bold"&&y.indexOf("Bold")===-1?R+=" Bold":u<=1e3&&(y[0]==="Metropolis"?(R="Metropolis",u>850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),m&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),NV=He({"src/traces/scattermap/plot.js"(Z,V){"use strict";var d=sa(),x=BV(),S=b0().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f<h.length;f++)if(h[f].id===i){s=!0;break}s?(this.subplot.setOptions(i,"setLayoutProperty",n.layout),n.layout.visibility==="visible"&&this.subplot.setOptions(i,"setPaintProperty",n.paint)):this.subplot.addLayer(n,a)},t.update=function(o){var a=o[0].trace,n=this.subplot,i=n.map,s=x(n.gd,o),h=n.belowLookup["trace-"+this.uid],f=!!(a.cluster&&a.cluster.enabled),v=!!this.clusterEnabled,c=this;function T(u){u||c.addSource("circle",s.circle,a.cluster);for(var y=E.cluster,m=0;m<y.length;m++){var R=y[m],L=s[R];c.addLayer(R,L,h)}}function l(u){for(var y=E.cluster,m=y.length-1;m>=0;m--){var R=y[m];i.removeLayer(c.layerIds[R])}u||i.removeSource(c.sourceIds.circle)}function _(u){for(var y=E.nonCluster,m=0;m<y.length;m++){var R=y[m],L=s[R];u||c.addSource(R,L),c.addLayer(R,L,h)}}function w(u){for(var y=E.nonCluster,m=y.length-1;m>=0;m--){var R=y[m];i.removeLayer(c.layerIds[R]),u||i.removeSource(c.sourceIds[R])}}function A(u){v?l(u):w(u)}function M(u){f?T(u):_(u)}function g(){for(var u=f?E.cluster:E.nonCluster,y=0;y<u.length;y++){var m=u[y],R=s[m];R&&(n.setOptions(c.layerIds[m],"setLayoutProperty",R.layout),R.layout.visibility==="visible"&&(m!=="cluster"&&c.setSourceData(m,R),n.setOptions(c.layerIds[m],"setPaintProperty",R.paint)))}}var b=this.isHidden,p=a.visible!==!0;p?b||A():b?p||M():v!==f?(A(),M()):(this.below!==h&&(A(!0),M(!0)),g()),this.clusterEnabled=f,this.isHidden=p,this.below=h,o[0].trace._glTrace=this},t.dispose=function(){for(var o=this.subplot.map,a=this.clusterEnabled?E.cluster:E.nonCluster,n=a.length-1;n>=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},V.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),f=x(o.gd,a),v=h.below=o.belowLookup["trace-"+n.uid],c,T,l;if(i)for(h.addSource("circle",f.circle,n.cluster),c=0;c<E.cluster.length;c++)T=E.cluster[c],l=f[T],h.addLayer(T,l,v);else for(c=0;c<E.nonCluster.length;c++)T=E.nonCluster[c],l=f[T],h.addSource(T,l,n.cluster),h.addLayer(T,l,v);return a[0].trace._glTrace=h,h}}}),kT=He({"src/traces/scattermap/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=l1(),E=x.fillText,e=Ws().BADNUM,t=b0().traceLayerPrefix;function r(a,n,i){var s=a.cd,h=s[0].trace,f=a.xa,v=a.ya,c=a.subplot,T=[],l=t+h.uid+"-circle",_=h.cluster&&h.cluster.enabled;if(_){var w=c.map.queryRenderedFeatures(null,{layers:[l]});T=w.map(function(N){return N.id})}var A=n>=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=c.project([P,U]),X=B.x-f.c2p([g,U]),$=B.y-v.c2p([P,i]),le=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-le,1-3/le)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],m=f.c2p(y),R=v.c2p(y),L=p.mrc||1;a.x0=m-L,a.x1=m+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(p,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,p),a.extraText=o(h,p,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,v=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return f||v&&c?l.push("("+_(T[1])+", "+_(T[0])+")"):v?l.push(i.lon+_(T[0])):c&&l.push(i.lat+_(T[1])),(f||h.indexOf("text")!==-1)&&E(n,a,l),l.join("<br>")}V.exports={hoverPoints:r,getExtraText:o}}}),UV=He({"src/traces/scattermap/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),jV=He({"src/traces/scattermap/select.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=Ws().BADNUM;V.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s<r.length;s++)r[s].selected=0;else for(s=0;s<r.length;s++){var h=r[s],f=h.lonlat;if(f[0]!==S){var v=[d.modHalf(f[0],360),f[1]],c=[o.c2p(v),a.c2p(v)];t.contains(c,null,s,e)?(n.push({pointNumber:s,lon:f[0],lat:f[1]}),h.selected=1):h.selected=0}}return n}}}),qV=He({"node_modules/maplibre-gl/dist/maplibre-gl.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?V.exports=x():(d=typeof globalThis<"u"?globalThis:d||self,d.maplibregl=x())})(Z,function(){"use strict";var d={},x={};function S(e,t,r){if(x[e]=r,e==="index"){var o="var sharedModule = {}; ("+x.shared+")(sharedModule); ("+x.worker+")(sharedModule);",a={};return x.shared(a),x.index(d,a),typeof window<"u"&&d.setWorkerUrl(window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))),d}}S("shared",["exports"],function(e){"use strict";function t(W,D,J,ve){return new(J||(J=Promise))(function(Ee,Be){function Ge(Bt){try{At(ve.next(Bt))}catch(ar){Be(ar)}}function ct(Bt){try{At(ve.throw(Bt))}catch(ar){Be(ar)}}function At(Bt){var ar;Bt.done?Ee(Bt.value):(ar=Bt.value,ar instanceof J?ar:new J(function(Sr){Sr(ar)})).then(Ge,ct)}At((ve=ve.apply(W,D||[])).next())})}function r(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}typeof SuppressedError=="function"&&SuppressedError;var o=a;function a(W,D){this.x=W,this.y=D}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(W){return this.clone()._add(W)},sub:function(W){return this.clone()._sub(W)},multByPoint:function(W){return this.clone()._multByPoint(W)},divByPoint:function(W){return this.clone()._divByPoint(W)},mult:function(W){return this.clone()._mult(W)},div:function(W){return this.clone()._div(W)},rotate:function(W){return this.clone()._rotate(W)},rotateAround:function(W,D){return this.clone()._rotateAround(W,D)},matMult:function(W){return this.clone()._matMult(W)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(W){return this.x===W.x&&this.y===W.y},dist:function(W){return Math.sqrt(this.distSqr(W))},distSqr:function(W){var D=W.x-this.x,J=W.y-this.y;return D*D+J*J},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(W){return Math.atan2(this.y-W.y,this.x-W.x)},angleWith:function(W){return this.angleWithSep(W.x,W.y)},angleWithSep:function(W,D){return Math.atan2(this.x*D-this.y*W,this.x*W+this.y*D)},_matMult:function(W){var D=W[2]*this.x+W[3]*this.y;return this.x=W[0]*this.x+W[1]*this.y,this.y=D,this},_add:function(W){return this.x+=W.x,this.y+=W.y,this},_sub:function(W){return this.x-=W.x,this.y-=W.y,this},_mult:function(W){return this.x*=W,this.y*=W,this},_div:function(W){return this.x/=W,this.y/=W,this},_multByPoint:function(W){return this.x*=W.x,this.y*=W.y,this},_divByPoint:function(W){return this.x/=W.x,this.y/=W.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var W=this.y;return this.y=this.x,this.x=-W,this},_rotate:function(W){var D=Math.cos(W),J=Math.sin(W),ve=J*this.x+D*this.y;return this.x=D*this.x-J*this.y,this.y=ve,this},_rotateAround:function(W,D){var J=Math.cos(W),ve=Math.sin(W),Ee=D.y+ve*(this.x-D.x)+J*(this.y-D.y);return this.x=D.x+J*(this.x-D.x)-ve*(this.y-D.y),this.y=Ee,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(W){return W instanceof a?W:Array.isArray(W)?new a(W[0],W[1]):W};var n=r(o),i=s;function s(W,D,J,ve){this.cx=3*W,this.bx=3*(J-W)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(ve-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=ve}s.prototype={sampleCurveX:function(W){return((this.ax*W+this.bx)*W+this.cx)*W},sampleCurveY:function(W){return((this.ay*W+this.by)*W+this.cy)*W},sampleCurveDerivativeX:function(W){return(3*this.ax*W+2*this.bx)*W+this.cx},solveCurveX:function(W,D){if(D===void 0&&(D=1e-6),W<0)return 0;if(W>1)return 1;for(var J=W,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-W;if(Math.abs(Ee)<D)return J;var Be=this.sampleCurveDerivativeX(J);if(Math.abs(Be)<1e-6)break;J-=Ee/Be}var Ge=0,ct=1;for(J=W,ve=0;ve<20&&(Ee=this.sampleCurveX(J),!(Math.abs(Ee-W)<D));ve++)W>Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var h=r(i);let f,v;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(v==null&&(v=!1,c())){let D=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(D){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;D.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,D.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=D.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){v=!0;break}}}return v||!1}function l(W,D,J,ve){let Ee=new h(W,D,J,ve);return Be=>Ee.solve(Be)}let _=l(.25,.1,.25,1);function w(W,D,J){return Math.min(J,Math.max(D,W))}function A(W,D,J){let ve=J-D,Ee=((W-D)%ve+ve)%ve+D;return Ee===D?J:Ee}function M(W,...D){for(let J of D)for(let ve in J)W[ve]=J[ve];return W}let g=1;function b(W,D,J){let ve={};for(let Ee in W)ve[Ee]=D.call(this,W[Ee],Ee,W);return ve}function p(W,D,J){let ve={};for(let Ee in W)D.call(this,W[Ee],Ee,W)&&(ve[Ee]=W[Ee]);return ve}function u(W){return Array.isArray(W)?W.map(u):typeof W=="object"&&W?b(W,u):W}let y={};function m(W){y[W]||(typeof console<"u"&&console.warn(W),y[W]=!0)}function R(W,D,J){return(J.y-W.y)*(D.x-W.x)>(D.y-W.y)*(J.x-W.x)}function L(W){return typeof WorkerGlobalScope<"u"&&W!==void 0&&W instanceof WorkerGlobalScope}let z=null;function F(W){return typeof ImageBitmap<"u"&&W instanceof ImageBitmap}let N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(W,D,J,ve,Ee){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Be=new VideoFrame(W,{timestamp:0});try{let Ge=Be?.format;if(!Ge||!Ge.startsWith("BGR")&&!Ge.startsWith("RGB"))throw new Error(`Unrecognized format ${Ge}`);let ct=Ge.startsWith("BGR"),At=new Uint8ClampedArray(ve*Ee*4);if(yield Be.copyTo(At,function(Bt,ar,Sr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Sr)-Sr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Sr);return{rect:{x:Ka,y:Wi,width:Math.min(Bt.width,ar+zr)-Ka,height:Math.min(Bt.height,Sr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(W,D,J,ve,Ee)),ct)for(let Bt=0;Bt<At.length;Bt+=4){let ar=At[Bt];At[Bt]=At[Bt+2],At[Bt+2]=ar}return At}finally{Be.close()}})}let P,U,B="AbortError";function X(){return new Error(B)}let $={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function le(W){return $.REGISTERED_PROTOCOLS[W.substring(0,W.indexOf("://"))]}let ce="global-dispatcher";class de extends Error{constructor(D,J,ve,Ee){super(`AJAXError: ${J} (${D}): ${ve}`),this.status=D,this.statusText=J,this.url=ve,this.body=Ee}}let G=()=>L(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Y=function(W,D){if(/:\/\//.test(W.url)&&!/^https?:|^file:/.test(W.url)){let ve=le(W.url);if(ve)return ve(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,targetMapId:ce},D)}if(!(/^file:/.test(J=W.url)||/^file:/.test(G())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(ve,Ee){return t(this,void 0,void 0,function*(){let Be=new Request(ve.url,{method:ve.method||"GET",body:ve.body,credentials:ve.credentials,headers:ve.headers,cache:ve.cache,referrer:G(),signal:Ee.signal});ve.type!=="json"||Be.headers.has("Accept")||Be.headers.set("Accept","application/json");let Ge=yield fetch(Be);if(!Ge.ok){let Bt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Bt)}let ct;ct=ve.type==="arrayBuffer"||ve.type==="image"?Ge.arrayBuffer():ve.type==="json"?Ge.json():Ge.text();let At=yield ct;if(Ee.signal.aborted)throw X();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,mustQueue:!0,targetMapId:ce},D)}var J;return function(ve,Ee){return new Promise((Be,Ge)=>{var ct;let At=new XMLHttpRequest;At.open(ve.method||"GET",ve.url,!0),ve.type!=="arrayBuffer"&&ve.type!=="image"||(At.responseType="arraybuffer");for(let Bt in ve.headers)At.setRequestHeader(Bt,ve.headers[Bt]);ve.type==="json"&&(At.responseType="text",!((ct=ve.headers)===null||ct===void 0)&&ct.Accept||At.setRequestHeader("Accept","application/json")),At.withCredentials=ve.credentials==="include",At.onerror=()=>{Ge(new Error(At.statusText))},At.onload=()=>{if(!Ee.signal.aborted)if((At.status>=200&&At.status<300||At.status===0)&&At.response!==null){let Bt=At.response;if(ve.type==="json")try{Bt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Bt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Bt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Bt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(X())}),At.send(ve.body)})}(W,D)};function ee(W){if(!W||W.indexOf("://")<=0||W.indexOf("data:image/")===0||W.indexOf("blob:")===0)return!0;let D=new URL(W),J=window.location;return D.protocol===J.protocol&&D.host===J.host}function q(W,D,J){J[W]&&J[W].indexOf(D)!==-1||(J[W]=J[W]||[],J[W].push(D))}function se(W,D,J){if(J&&J[W]){let ve=J[W].indexOf(D);ve!==-1&&J[W].splice(ve,1)}}class ae{constructor(D,J={}){M(this,J),this.type=D}}class j extends ae{constructor(D,J={}){super("error",M({error:D},J))}}class Q{on(D,J){return this._listeners=this._listeners||{},q(D,J,this._listeners),this}off(D,J){return se(D,J,this._listeners),se(D,J,this._oneTimeListeners),this}once(D,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},q(D,J,this._oneTimeListeners),this):new Promise(ve=>this.once(D,ve))}fire(D,J){typeof D=="string"&&(D=new ae(D,J||{}));let ve=D.type;if(this.listens(ve)){D.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,D);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)se(ve,ct,this._oneTimeListeners),ct.call(this,D);let Ge=this._eventedParent;Ge&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(D))}else D instanceof j&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,J){return this._eventedParent=D,this._eventedParentData=J,this}}var re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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:"*"},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:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"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","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let pe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function we(W,D){let J={};for(let ve in W)ve!=="ref"&&(J[ve]=W[ve]);return pe.forEach(ve=>{ve in D&&(J[ve]=D[ve])}),J}function Se(W,D){if(Array.isArray(W)){if(!Array.isArray(D)||W.length!==D.length)return!1;for(let J=0;J<W.length;J++)if(!Se(W[J],D[J]))return!1;return!0}if(typeof W=="object"&&W!==null&&D!==null){if(typeof D!="object"||Object.keys(W).length!==Object.keys(D).length)return!1;for(let J in W)if(!Se(W[J],D[J]))return!1;return!0}return W===D}function Ie(W,D){W.push(D)}function Re(W,D,J){Ie(J,{command:"addSource",args:[W,D[W]]})}function We(W,D,J){Ie(D,{command:"removeSource",args:[W]}),J[W]=!0}function at(W,D,J,ve){We(W,J,ve),Re(W,D,J)}function nt(W,D,J){let ve;for(ve in W[J])if(Object.prototype.hasOwnProperty.call(W[J],ve)&&ve!=="data"&&!Se(W[J][ve],D[J][ve]))return!1;for(ve in D[J])if(Object.prototype.hasOwnProperty.call(D[J],ve)&&ve!=="data"&&!Se(W[J][ve],D[J][ve]))return!1;return!0}function tt(W,D,J,ve,Ee,Be){W=W||{},D=D||{};for(let Ge in W)Object.prototype.hasOwnProperty.call(W,Ge)&&(Se(W[Ge],D[Ge])||J.push({command:Be,args:[ve,Ge,D[Ge],Ee]}));for(let Ge in D)Object.prototype.hasOwnProperty.call(D,Ge)&&!Object.prototype.hasOwnProperty.call(W,Ge)&&(Se(W[Ge],D[Ge])||J.push({command:Be,args:[ve,Ge,D[Ge],Ee]}))}function qe(W){return W.id}function he(W,D){return W[D.id]=D,W}class ue{constructor(D,J,ve,Ee){this.message=(D?`${D}: `:"")+ve,Ee&&(this.identifier=Ee),J!=null&&J.__line__&&(this.line=J.__line__)}}function ne(W,...D){for(let J of D)for(let ve in J)W[ve]=J[ve];return W}class Ce extends Error{constructor(D,J){super(J),this.message=J,this.key=D}}class Ye{constructor(D,J=[]){this.parent=D,this.bindings={};for(let[ve,Ee]of J)this.bindings[ve]=Ee}concat(D){return new Ye(this,D)}get(D){if(this.bindings[D])return this.bindings[D];if(this.parent)return this.parent.get(D);throw new Error(`${D} not found in scope.`)}has(D){return!!this.bindings[D]||!!this.parent&&this.parent.has(D)}}let rt={kind:"null"},Ke={kind:"number"},Mt={kind:"string"},kt={kind:"boolean"},Nt={kind:"color"},Gt={kind:"object"},Mr={kind:"value"},mr={kind:"collator"},qr={kind:"formatted"},Er={kind:"padding"},Ir={kind:"resolvedImage"},_t={kind:"variableAnchorOffsetCollection"};function Oe(W,D){return{kind:"array",itemType:W,N:D}}function Je(W){if(W.kind==="array"){let D=Je(W.itemType);return typeof W.N=="number"?`array<${D}, ${W.N}>`:W.itemType.kind==="value"?"array":`array<${D}>`}return W.kind}let Ae=[rt,Ke,Mt,kt,Nt,qr,Gt,Oe(Mr),Er,Ir,_t];function Le(W,D){if(D.kind==="error")return null;if(W.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!Le(W.itemType,D.itemType))&&(typeof W.N!="number"||W.N===D.N))return null}else{if(W.kind===D.kind)return null;if(W.kind==="value"){for(let J of Ae)if(!Le(J,D))return null}}return`Expected ${Je(W)} but found ${Je(D)} instead.`}function Ue(W,D){return D.some(J=>J.kind===W.kind)}function Ze(W,D){return D.some(J=>J==="null"?W===null:J==="array"?Array.isArray(W):J==="object"?W&&!Array.isArray(W)&&typeof W=="object":J===typeof W)}function st(W,D){return W.kind==="array"&&D.kind==="array"?W.itemType.kind===D.itemType.kind&&typeof W.N=="number":W.kind===D.kind}let ut=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,fr=Pt*Pt*Pt,ur=Math.PI/180,sr=180/Math.PI;function Pr(W){return(W%=360)<0&&(W+=360),W}function Ta([W,D,J,ve]){let Ee,Be,Ge=Ia((.2225045*(W=Oa(W))+.7168786*(D=Oa(D))+.0606169*(J=Oa(J)))/1);W===D&&D===J?Ee=Be=Ge:(Ee=Ia((.4360747*W+.3850649*D+.1430804*J)/ut),Be=Ia((.0139322*W+.0971045*D+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Oa(W){return W<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Ia(W){return W>fr?Math.pow(W,1/3):W/jt+Ct}function qa([W,D,J,ve]){let Ee=(W+16)/116,Be=isNaN(D)?Ee:Ee+D/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ut*Ca(Be),Ge=Ut*Ca(Ge),[Wa(3.1338561*Be-1.6168667*Ee-.4906146*Ge),Wa(-.9787684*Be+1.9161415*Ee+.033454*Ge),Wa(.0719453*Be-.2289914*Ee+1.4052427*Ge),ve]}function Wa(W){return(W=W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055)<0?0:W>1?1:W}function Ca(W){return W>Pt?W*W*W:jt*(W-Ct)}function hi(W){return parseInt(W.padEnd(2,W),16)/255}function wi(W,D){return Kt(D?W/100:W,0,1)}function Kt(W,D,J){return Math.min(Math.max(D,W),J)}function Dt(W){return!W.some(Number.isNaN)}let Yt={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]};class Jt{constructor(D,J,ve,Ee=1,Be=!0){this.r=D,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[D,J,ve,Ee]))}static parse(D){if(D instanceof Jt)return D;if(typeof D!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Yt[ve];if(Ee){let[Ge,ct,At]=Ee;return[Ge/255,ct/255,At/255,1]}if(ve.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(ve)){let Ge=ve.length<6?1:2,ct=1;return[hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+Ge)||"ff")]}if(ve.startsWith("rgb")){let Ge=ve.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Ge){let[ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Bt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let qn=[Kt(+At/en,0,1),Kt(+Sr/en,0,1),Kt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Dt(qn))return qn}}return}}let Be=ve.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Be){let[Ge,ct,At,Bt,ar,Sr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Kt(+Bt,0,100),Kt(+Sr,0,100),Wr?wi(+Wr,ia):1];if(Dt(ja))return function([Ka,Wi,gi,qi]){function en(qn){let ko=(qn+Ka/30)%12,ys=Wi*Math.min(gi,1-gi);return gi-ys*Math.max(-1,Math.min(ko-3,9-ko,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(D);return J?new Jt(...J,!1):void 0}get rgb(){let{r:D,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[D/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(D){let[J,ve,Ee,Be]=Ta(D),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*sr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Ta(this.rgb))}overwriteGetter(D,J){return Object.defineProperty(this,D,{value:J}),J}toString(){let[D,J,ve,Ee]=this.rgb;return`rgba(${[D,J,ve].map(Be=>Math.round(255*Be)).join(",")},${Ee})`}}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1);class Fr{constructor(D,J,ve){this.sensitivity=D?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,J){return this.collator.compare(D,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(D,J,ve,Ee,Be){this.text=D,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(D){this.sections=D}static fromString(D){return new ra([new ta(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof ra?D:ra.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class ca{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ca)return D;if(typeof D=="number")return new ca([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let J of D)if(typeof J!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new ca(D)}}toString(){return JSON.stringify(this.values)}}let Ba=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $a{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof $a)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let J=0;J<D.length;J+=2){let ve=D[J],Ee=D[J+1];if(typeof ve!="string"||!Ba.has(ve)||!Array.isArray(Ee)||Ee.length!==2||typeof Ee[0]!="number"||typeof Ee[1]!="number")return}return new $a(D)}}toString(){return JSON.stringify(this.values)}}class Za{constructor(D){this.name=D.name,this.available=D.available}toString(){return this.name}static fromString(D){return D?new Za({name:D,available:!1}):null}}function ri(W,D,J,ve){return typeof W=="number"&&W>=0&&W<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[W,D,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[W,D,J,ve]:[W,D,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(W){if(W===null||typeof W=="string"||typeof W=="boolean"||typeof W=="number"||W instanceof Jt||W instanceof Fr||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za)return!0;if(Array.isArray(W)){for(let D of W)if(!pi(D))return!1;return!0}if(typeof W=="object"){for(let D in W)if(!pi(W[D]))return!1;return!0}return!1}function Ra(W){if(W===null)return rt;if(typeof W=="string")return Mt;if(typeof W=="boolean")return kt;if(typeof W=="number")return Ke;if(W instanceof Jt)return Nt;if(W instanceof Fr)return mr;if(W instanceof ra)return qr;if(W instanceof ca)return Er;if(W instanceof $a)return _t;if(W instanceof Za)return Ir;if(Array.isArray(W)){let D=W.length,J;for(let ve of W){let Ee=Ra(ve);if(J){if(J===Ee)continue;J=Mr;break}J=Ee}return Oe(J||Mr,D)}return Gt}function an(W){let D=typeof W;return W===null?"":D==="string"||D==="number"||D==="boolean"?String(W):W instanceof Jt||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za?W.toString():JSON.stringify(W)}class tn{constructor(D,J){this.type=D,this.value=J}static parse(D,J){if(D.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!pi(D[1]))return J.error("invalid value");let ve=D[1],Ee=Ra(ve),Be=J.expectedType;return Ee.kind!=="array"||Ee.N!==0||!Be||Be.kind!=="array"||typeof Be.N=="number"&&Be.N!==0||(Ee=Be),new tn(Ee,ve)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class fn{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let xt={string:Mt,number:Ke,boolean:kt,object:Gt};class lt{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=D[0];if(Be==="array"){let ct,At;if(D.length>2){let Bt=D[1];if(typeof Bt!="string"||!(Bt in xt)||Bt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Bt],Ee++}else ct=Mr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=D[2],Ee++}ve=Oe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;Ee<D.length;Ee++){let ct=J.parse(D[Ee],Ee,Mr);if(!ct)return null;Ge.push(ct)}return new lt(ve,Ge)}evaluate(D){for(let J=0;J<this.args.length;J++){let ve=this.args[J].evaluate(D);if(!Le(this.type,Ra(ve)))return ve;if(J===this.args.length-1)throw new fn(`Expected value to be of type ${Je(this.type)}, but found ${Je(Ra(ve))} instead.`)}throw new Error}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br={"to-boolean":kt,"to-color":Nt,"to-number":Ke,"to-string":Mt};class Cr{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve=D[0];if(!Br[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&D.length!==2)return J.error("Expected one argument.");let Ee=Br[ve],Be=[];for(let Ge=1;Ge<D.length;Ge++){let ct=J.parse(D[Ge],Ge,Mr);if(!ct)return null;Be.push(ct)}return new Cr(Ee,Be)}evaluate(D){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(D);case"color":{let J,ve;for(let Ee of this.args){if(J=Ee.evaluate(D),ve=null,J instanceof Jt)return J;if(typeof J=="string"){let Be=D.parseColor(J);if(Be)return Be}else if(Array.isArray(J)&&(ve=J.length<3||J.length>4?`Invalid rbga value ${JSON.stringify(J)}: expected an array containing either three or four numeric values.`:ri(J[0],J[1],J[2],J[3]),!ve))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new fn(ve||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let ve of this.args){J=ve.evaluate(D);let Ee=ca.parse(J);if(Ee)return Ee}throw new fn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let ve of this.args){J=ve.evaluate(D);let Ee=$a.parse(J);if(Ee)return Ee}throw new fn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let ve of this.args){if(J=ve.evaluate(D),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new fn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(an(this.args[0].evaluate(D)));case"resolvedImage":return Za.fromString(an(this.args[0].evaluate(D)));default:return an(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let xr=["Unknown","Point","LineString","Polygon"];class Rr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},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"?xr[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(D){let J=this._parseColorCache[D];return J||(J=this._parseColorCache[D]=Jt.parse(D)),J}}class Ur{constructor(D,J,ve=[],Ee,Be=new Ye,Ge=[]){this.registry=D,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(D,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(D,Be):this._parse(D,Be)}_parse(D,J){function ve(Ee,Be,Ge){return Ge==="assert"?new lt(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=D[0];if(typeof Ee!="string")return this.error(`Expression name must be a string, but found ${typeof Ee} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Be=this.registry[Ee];if(Be){let Ge=Be.parse(D,this);if(!Ge)return null;if(this.expectedType){let ct=this.expectedType,At=Ge.type;if(ct.kind!=="string"&&ct.kind!=="number"&&ct.kind!=="boolean"&&ct.kind!=="object"&&ct.kind!=="array"||At.kind!=="value")if(ct.kind!=="color"&&ct.kind!=="formatted"&&ct.kind!=="resolvedImage"||At.kind!=="value"&&At.kind!=="string")if(ct.kind!=="padding"||At.kind!=="value"&&At.kind!=="number"&&At.kind!=="array")if(ct.kind!=="variableAnchorOffsetCollection"||At.kind!=="value"&&At.kind!=="array"){if(this.checkSubtype(ct,At))return null}else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"assert")}if(!(Ge instanceof tn)&&Ge.type.kind!=="resolvedImage"&&this._isConstant(Ge)){let ct=new Rr;try{Ge=new tn(Ge.type,Ge.evaluate(ct))}catch(At){return this.error(At.message),null}}return Ge}return this.error(`Unknown expression "${Ee}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,J,ve){let Ee=typeof D=="number"?this.path.concat(D):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Ur(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(D,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,D))}checkSubtype(D,J){let ve=Le(D,J);return ve&&this.error(ve),ve}}class Hr{constructor(D,J){this.type=J.type,this.bindings=[].concat(D),this.result=J}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let J of this.bindings)D(J[1]);D(this.result)}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let ve=[];for(let Be=1;Be<D.length-1;Be+=2){let Ge=D[Be];if(typeof Ge!="string")return J.error(`Expected string, but found ${typeof Ge} instead.`,Be);if(/[^a-zA-Z0-9_]/.test(Ge))return J.error("Variable names must contain only alphanumeric characters or '_'.",Be);let ct=J.parse(D[Be+1],Be+1);if(!ct)return null;ve.push([Ge,ct])}let Ee=J.parse(D[D.length-1],D.length-1,J.expectedType,ve);return Ee?new Hr(ve,Ee):null}outputDefined(){return this.result.outputDefined()}}class gt{constructor(D,J){this.type=J.type,this.name=D,this.boundExpression=J}static parse(D,J){if(D.length!==2||typeof D[1]!="string")return J.error("'var' expression requires exactly one string literal argument.");let ve=D[1];return J.scope.has(ve)?new gt(ve,J.scope.get(ve)):J.error(`Unknown variable "${ve}". Make sure "${ve}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(D){return this.boundExpression.evaluate(D)}eachChild(){}outputDefined(){return!1}}class Xt{constructor(D,J,ve){this.type=D,this.index=J,this.input=ve}static parse(D,J){if(D.length!==3)return J.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Ke),Ee=J.parse(D[2],2,Oe(J.expectedType||Mr));return ve&&Ee?new Xt(Ee.type.itemType,ve,Ee):null}evaluate(D){let J=this.index.evaluate(D),ve=this.input.evaluate(D);if(J<0)throw new fn(`Array index out of bounds: ${J} < 0.`);if(J>=ve.length)throw new fn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new fn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class vr{constructor(D,J){this.type=kt,this.needle=D,this.haystack=J}static parse(D,J){if(D.length!==3)return J.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Mr);return ve&&Ee?Ue(ve.type,[kt,Mt,Ke,rt,Mr])?new vr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(ve.type)} instead`):null}evaluate(D){let J=this.needle.evaluate(D),ve=this.haystack.evaluate(D);if(!ve)return!1;if(!Ze(J,["boolean","string","number","null"]))throw new fn(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Ra(J))} instead.`);if(!Ze(ve,["string","array"]))throw new fn(`Expected second argument to be of type array or string, but found ${Je(Ra(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class Or{constructor(D,J,ve){this.type=Ke,this.needle=D,this.haystack=J,this.fromIndex=ve}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Mr);if(!ve||!Ee)return null;if(!Ue(ve.type,[kt,Mt,Ke,rt,Mr]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(ve.type)} instead`);if(D.length===4){let Be=J.parse(D[3],3,Ke);return Be?new Or(ve,Ee,Be):null}return new Or(ve,Ee)}evaluate(D){let J=this.needle.evaluate(D),ve=this.haystack.evaluate(D);if(!Ze(J,["boolean","string","number","null"]))throw new fn(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Ra(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(D)),Ze(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ze(ve,["array"]))return ve.indexOf(J,Ee);throw new fn(`Expected second argument to be of type array or string, but found ${Je(Ra(ve))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class ba{constructor(D,J,ve,Ee,Be,Ge){this.inputType=D,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(D,J){if(D.length<5)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return J.error("Expected an even number of arguments.");let ve,Ee;J.expectedType&&J.expectedType.kind!=="value"&&(Ee=J.expectedType);let Be={},Ge=[];for(let Bt=2;Bt<D.length-1;Bt+=2){let ar=D[Bt],Sr=D[Bt+1];Array.isArray(ar)||(ar=[ar]);let zr=J.concat(Bt);if(ar.length===0)return zr.error("Expected at least one branch label.");for(let ia of ar){if(typeof ia!="number"&&typeof ia!="string")return zr.error("Branch labels must be numbers or strings.");if(typeof ia=="number"&&Math.abs(ia)>Number.MAX_SAFE_INTEGER)return zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ia=="number"&&Math.floor(ia)!==ia)return zr.error("Numeric branch labels must be integer values.");if(ve){if(zr.checkSubtype(ve,Ra(ia)))return null}else ve=Ra(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Sr,Bt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(D[1],1,Mr);if(!ct)return null;let At=J.parse(D[D.length-1],D.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new ba(ve,Ee,ct,Be,Ge,At):null}evaluate(D){let J=this.input.evaluate(D);return(Ra(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(D,J,ve){this.type=D,this.branches=J,this.otherwise=ve}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return J.error("Expected an odd number of arguments.");let ve;J.expectedType&&J.expectedType.kind!=="value"&&(ve=J.expectedType);let Ee=[];for(let Ge=1;Ge<D.length-1;Ge+=2){let ct=J.parse(D[Ge],Ge,kt);if(!ct)return null;let At=J.parse(D[Ge+1],Ge+1,ve);if(!At)return null;Ee.push([ct,At]),ve=ve||At.type}let Be=J.parse(D[D.length-1],D.length-1,ve);if(!Be)return null;if(!ve)throw new Error("Can't infer output type");return new Pa(ve,Ee,Be)}evaluate(D){for(let[J,ve]of this.branches)if(J.evaluate(D))return ve.evaluate(D);return this.otherwise.evaluate(D)}eachChild(D){for(let[J,ve]of this.branches)D(J),D(ve);D(this.otherwise)}outputDefined(){return this.branches.every(([D,J])=>J.outputDefined())&&this.otherwise.outputDefined()}}class ma{constructor(D,J,ve,Ee){this.type=D,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Ke);if(!ve||!Ee)return null;if(!Ue(ve.type,[Oe(Mr),Mt,Mr]))return J.error(`Expected first argument to be of type array or string, but found ${Je(ve.type)} instead`);if(D.length===4){let Be=J.parse(D[3],3,Ke);return Be?new ma(ve.type,ve,Ee,Be):null}return new ma(ve.type,ve,Ee)}evaluate(D){let J=this.input.evaluate(D),ve=this.beginIndex.evaluate(D),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(D)),Ze(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ze(J,["array"]))return J.slice(ve,Ee);throw new fn(`Expected first argument to be of type array or string, but found ${Je(Ra(J))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function la(W,D){let J=W.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=W[ct],Ee=W[ct+1],ve<=D){if(ct===J||D<Ee)return ct;Be=ct+1}else{if(!(ve>D))throw new fn("Input is not a number.");Ge=ct-1}return 0}class _a{constructor(D,J,ve){this.type=D,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(D,J){if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(D[1],1,Ke);if(!ve)return null;let Ee=[],Be=null;J.expectedType&&J.expectedType.kind!=="value"&&(Be=J.expectedType);for(let Ge=1;Ge<D.length;Ge+=2){let ct=Ge===1?-1/0:D[Ge],At=D[Ge+1],Bt=Ge,ar=Ge+1;if(typeof ct!="number")return J.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Bt);if(Ee.length&&Ee[Ee.length-1][0]>=ct)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Bt);let Sr=J.parse(At,ar,Be);if(!Sr)return null;Be=Be||Sr.type,Ee.push([ct,Sr])}return new _a(Be,ve,Ee)}evaluate(D){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(D);let Ee=this.input.evaluate(D);if(Ee<=J[0])return ve[0].evaluate(D);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(D):ve[la(J,Ee)].evaluate(D)}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Ai(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var ki=Ki;function Ki(W,D,J,ve){this.cx=3*W,this.bx=3*(J-W)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(ve-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=ve}Ki.prototype={sampleCurveX:function(W){return((this.ax*W+this.bx)*W+this.cx)*W},sampleCurveY:function(W){return((this.ay*W+this.by)*W+this.cy)*W},sampleCurveDerivativeX:function(W){return(3*this.ax*W+2*this.bx)*W+this.cx},solveCurveX:function(W,D){if(D===void 0&&(D=1e-6),W<0)return 0;if(W>1)return 1;for(var J=W,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-W;if(Math.abs(Ee)<D)return J;var Be=this.sampleCurveDerivativeX(J);if(Math.abs(Be)<1e-6)break;J-=Ee/Be}var Ge=0,ct=1;for(J=W,ve=0;ve<20&&(Ee=this.sampleCurveX(J),!(Math.abs(Ee-W)<D));ve++)W>Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var yn=Ai(ki);function Ln(W,D,J){return W+J*(D-W)}function kn(W,D,J){return W.map((ve,Ee)=>Ln(ve,D[Ee],J))}let Bn={number:Ln,color:function(W,D,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=kn(W.rgb,D.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=W.hcl,[At,Bt,ar,Sr]=D.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Bt)):(zr=Ee,ar!==1&&ar!==0||(Wr=Be));else{let Wi=At-Ee;At>Ee&&Wi>180?Wi-=360:At<Ee&&Ee-At>180&&(Wi+=360),zr=Ee+J*Wi}let[ia,fa,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*ur,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Ln(Be,Bt,J),Ln(Ge,ar,J),Ln(ct,Sr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(kn(W.lab,D.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:kn,padding:function(W,D,J){return new ca(kn(W.values,D.values,J))},variableAnchorOffsetCollection:function(W,D,J){let ve=W.values,Ee=D.values;if(ve.length!==Ee.length)throw new fn(`Cannot interpolate values of different length. from: ${W.toString()}, to: ${D.toString()}`);let Be=[];for(let Ge=0;Ge<ve.length;Ge+=2){if(ve[Ge]!==Ee[Ge])throw new fn(`Cannot interpolate values containing mismatched anchors. from[${Ge}]: ${ve[Ge]}, to[${Ge}]: ${Ee[Ge]}`);Be.push(ve[Ge]);let[ct,At]=ve[Ge+1],[Bt,ar]=Ee[Ge+1];Be.push([Ln(ct,Bt,J),Ln(At,ar,J)])}return new $a(Be)}};class ao{constructor(D,J,ve,Ee,Be){this.type=D,this.operator=J,this.interpolation=ve,this.input=Ee,this.labels=[],this.outputs=[];for(let[Ge,ct]of Be)this.labels.push(Ge),this.outputs.push(ct)}static interpolationFactor(D,J,ve,Ee){let Be=0;if(D.name==="exponential")Be=xo(J,D.base,ve,Ee);else if(D.name==="linear")Be=xo(J,1,ve,Ee);else if(D.name==="cubic-bezier"){let Ge=D.controlPoints;Be=new yn(Ge[0],Ge[1],Ge[2],Ge[3]).solve(xo(J,1,ve,Ee))}return Be}static parse(D,J){let[ve,Ee,Be,...Ge]=D;if(!Array.isArray(Ee)||Ee.length===0)return J.error("Expected an interpolation type expression.",1);if(Ee[0]==="linear")Ee={name:"linear"};else if(Ee[0]==="exponential"){let Bt=Ee[1];if(typeof Bt!="number")return J.error("Exponential interpolation requires a numeric base.",1,1);Ee={name:"exponential",base:Bt}}else{if(Ee[0]!=="cubic-bezier")return J.error(`Unknown interpolation type ${String(Ee[0])}`,1,0);{let Bt=Ee.slice(1);if(Bt.length!==4||Bt.some(ar=>typeof ar!="number"||ar<0||ar>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ee={name:"cubic-bezier",controlPoints:Bt}}}if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Ke),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Nt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Bt=0;Bt<Ge.length;Bt+=2){let ar=Ge[Bt],Sr=Ge[Bt+1],zr=Bt+3,Wr=Bt+4;if(typeof ar!="number")return J.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',zr);if(ct.length&&ct[ct.length-1][0]>=ar)return J.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let ia=J.parse(Sr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Ke)||st(At,Nt)||st(At,Er)||st(At,_t)||st(At,Oe(Ke))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Je(At)} is not interpolatable.`)}evaluate(D){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(D);let Ee=this.input.evaluate(D);if(Ee<=J[0])return ve[0].evaluate(D);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(D);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(D),Bt=ve[Ge+1].evaluate(D);switch(this.operator){case"interpolate":return Bn[this.type.kind](At,Bt,ct);case"interpolate-hcl":return Bn.color(At,Bt,ct,"hcl");case"interpolate-lab":return Bn.color(At,Bt,ct,"lab")}}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function xo(W,D,J,ve){let Ee=ve-J,Be=W-J;return Ee===0?0:D===1?Be/Ee:(Math.pow(D,Be)-1)/(Math.pow(D,Ee)-1)}class Co{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expectected at least one argument.");let ve=null,Ee=J.expectedType;Ee&&Ee.kind!=="value"&&(ve=Ee);let Be=[];for(let ct of D.slice(1)){let At=J.parse(ct,1+Be.length,ve,void 0,{typeAnnotation:"omit"});if(!At)return null;ve=ve||At.type,Be.push(At)}if(!ve)throw new Error("No output type");let Ge=Ee&&Be.some(ct=>Le(Ee,ct.type));return new Co(Ge?Mr:ve,Be)}evaluate(D){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(D),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function Fs(W,D){return W==="=="||W==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Mn(W,D,J,ve){return ve.compare(D,J)===0}function Ao(W,D,J){let ve=W!=="=="&&W!=="!=";return class t7{constructor(Be,Ge,ct){this.type=kt,this.lhs=Be,this.rhs=Ge,this.collator=ct,this.hasUntypedArgument=Be.type.kind==="value"||Ge.type.kind==="value"}static parse(Be,Ge){if(Be.length!==3&&Be.length!==4)return Ge.error("Expected two or three arguments.");let ct=Be[0],At=Ge.parse(Be[1],1,Mr);if(!At)return null;if(!Fs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Je(At.type)}'.`);let Bt=Ge.parse(Be[2],2,Mr);if(!Bt)return null;if(!Fs(ct,Bt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Je(Bt.type)}'.`);if(At.type.kind!==Bt.type.kind&&At.type.kind!=="value"&&Bt.type.kind!=="value")return Ge.error(`Cannot compare types '${Je(At.type)}' and '${Je(Bt.type)}'.`);ve&&(At.type.kind==="value"&&Bt.type.kind!=="value"?At=new lt(Bt.type,[At]):At.type.kind!=="value"&&Bt.type.kind==="value"&&(Bt=new lt(At.type,[Bt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Bt.type.kind!=="string"&&At.type.kind!=="value"&&Bt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,mr),!ar)return null}return new t7(At,Bt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ra(Ge),Bt=Ra(ct);if(At.kind!==Bt.kind||At.kind!=="string"&&At.kind!=="number")throw new fn(`Expected arguments for "${W}" to be (string, string) or (number, number), but found (${At.kind}, ${Bt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ra(Ge),Bt=Ra(ct);if(At.kind!=="string"||Bt.kind!=="string")return D(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):D(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let On=Ao("==",function(W,D,J){return D===J},Mn),ts=Ao("!=",function(W,D,J){return D!==J},function(W,D,J,ve){return!Mn(0,D,J,ve)}),is=Ao("<",function(W,D,J){return D<J},function(W,D,J,ve){return ve.compare(D,J)<0}),_s=Ao(">",function(W,D,J){return D>J},function(W,D,J,ve){return ve.compare(D,J)>0}),Oo=Ao("<=",function(W,D,J){return D<=J},function(W,D,J,ve){return ve.compare(D,J)<=0}),io=Ao(">=",function(W,D,J){return D>=J},function(W,D,J,ve){return ve.compare(D,J)>=0});class Gn{constructor(D,J,ve){this.type=mr,this.locale=ve,this.caseSensitive=D,this.diacriticSensitive=J}static parse(D,J){if(D.length!==2)return J.error("Expected one argument.");let ve=D[1];if(typeof ve!="object"||Array.isArray(ve))return J.error("Collator options argument must be an object.");let Ee=J.parse(ve["case-sensitive"]!==void 0&&ve["case-sensitive"],1,kt);if(!Ee)return null;let Be=J.parse(ve["diacritic-sensitive"]!==void 0&&ve["diacritic-sensitive"],1,kt);if(!Be)return null;let Ge=null;return ve.locale&&(Ge=J.parse(ve.locale,1,Mt),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(D){return new Fr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class eo{constructor(D,J,ve,Ee,Be){this.type=Mt,this.number=D,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(D,J){if(D.length!==3)return J.error("Expected two arguments.");let ve=J.parse(D[1],1,Ke);if(!ve)return null;let Ee=D[2];if(typeof Ee!="object"||Array.isArray(Ee))return J.error("NumberFormat options argument must be an object.");let Be=null;if(Ee.locale&&(Be=J.parse(Ee.locale,1,Mt),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,Mt),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Ke),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Ke),!At)?null:new eo(ve,Be,Ge,ct,At)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class ns{constructor(D){this.type=qr,this.sections=D}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve=D[1];if(!Array.isArray(ve)&&typeof ve=="object")return J.error("First argument must be an image or text section.");let Ee=[],Be=!1;for(let Ge=1;Ge<=D.length-1;++Ge){let ct=D[Ge];if(Be&&typeof ct=="object"&&!Array.isArray(ct)){Be=!1;let At=null;if(ct["font-scale"]&&(At=J.parse(ct["font-scale"],1,Ke),!At))return null;let Bt=null;if(ct["text-font"]&&(Bt=J.parse(ct["text-font"],1,Oe(Mt)),!Bt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Nt),!ar))return null;let Sr=Ee[Ee.length-1];Sr.scale=At,Sr.font=Bt,Sr.textColor=ar}else{let At=J.parse(D[Ge],1,Mr);if(!At)return null;let Bt=At.type.kind;if(Bt!=="string"&&Bt!=="value"&&Bt!=="null"&&Bt!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Be=!0,Ee.push({content:At,scale:null,font:null,textColor:null})}}return new ns(Ee)}evaluate(D){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(D);return Ra(ve)===Ir?new ta("",ve,null,null,null):new ta(an(ve),null,J.scale?J.scale.evaluate(D):null,J.font?J.font.evaluate(D).join(","):null,J.textColor?J.textColor.evaluate(D):null)}))}eachChild(D){for(let J of this.sections)D(J.content),J.scale&&D(J.scale),J.font&&D(J.font),J.textColor&&D(J.textColor)}outputDefined(){return!1}}class gs{constructor(D){this.type=Ir,this.input=D}static parse(D,J){if(D.length!==2)return J.error("Expected two arguments.");let ve=J.parse(D[1],1,Mt);return ve?new gs(ve):J.error("No image name provided.")}evaluate(D){let J=this.input.evaluate(D),ve=Za.fromString(J);return ve&&D.availableImages&&(ve.available=D.availableImages.indexOf(J)>-1),ve}eachChild(D){D(this.input)}outputDefined(){return!1}}class Ls{constructor(D){this.type=Ke,this.input=D}static parse(D,J){if(D.length!==2)return J.error(`Expected 1 argument, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1);return ve?ve.type.kind!=="array"&&ve.type.kind!=="string"&&ve.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Je(ve.type)} instead.`):new Ls(ve):null}evaluate(D){let J=this.input.evaluate(D);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new fn(`Expected value to be of type string or array, but found ${Je(Ra(J))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Xo=8192;function Gi(W,D){let J=(180+W[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W[1]*Math.PI/360)))/360,Ee=Math.pow(2,D.z);return[Math.round(J*Ee*Xo),Math.round(ve*Ee*Xo)]}function Pn(W,D){let J=Math.pow(2,D.z);return[(Ee=(W[0]/Xo+D.x)/J,360*Ee-180),(ve=(W[1]/Xo+D.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function js(W,D){W[0]=Math.min(W[0],D[0]),W[1]=Math.min(W[1],D[1]),W[2]=Math.max(W[2],D[0]),W[3]=Math.max(W[3],D[1])}function xs(W,D){return!(W[0]<=D[0]||W[2]>=D[2]||W[1]<=D[1]||W[3]>=D[3])}function Hn(W,D,J){let ve=W[0]-D[0],Ee=W[1]-D[1],Be=W[0]-J[0],Ge=W[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Os(W,D,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[D[0]-W[0],D[1]-W[1]])[1]-Ee[1]*Be[0]!=0&&!(!bo(W,D,J,ve)||!bo(J,ve,W,D));var Ee,Be}function ds(W,D,J){for(let ve of J)for(let Ee=0;Ee<ve.length-1;++Ee)if(Os(W,D,ve[Ee],ve[Ee+1]))return!0;return!1}function Xs(W,D,J=!1){let ve=!1;for(let ct of D)for(let At=0;At<ct.length-1;At++){if(Hn(W,ct[At],ct[At+1]))return J;(Be=ct[At])[1]>(Ee=W)[1]!=(Ge=ct[At+1])[1]>Ee[1]&&Ee[0]<(Ge[0]-Be[0])*(Ee[1]-Be[1])/(Ge[1]-Be[1])+Be[0]&&(ve=!ve)}var Ee,Be,Ge;return ve}function il(W,D){for(let J of D)if(Xs(W,J))return!0;return!1}function _n(W,D){for(let J of W)if(!Xs(J,D))return!1;for(let J=0;J<W.length-1;++J)if(ds(W[J],W[J+1],D))return!1;return!0}function Lo(W,D){for(let J of D)if(_n(W,J))return!0;return!1}function bo(W,D,J,ve){let Ee=ve[0]-J[0],Be=ve[1]-J[1],Ge=(W[0]-J[0])*Be-Ee*(W[1]-J[1]),ct=(D[0]-J[0])*Be-Ee*(D[1]-J[1]);return Ge>0&&ct<0||Ge<0&&ct>0}function Rs(W,D,J){let ve=[];for(let Ee=0;Ee<W.length;Ee++){let Be=[];for(let Ge=0;Ge<W[Ee].length;Ge++){let ct=Gi(W[Ee][Ge],J);js(D,ct),Be.push(ct)}ve.push(Be)}return ve}function pu(W,D,J){let ve=[];for(let Ee=0;Ee<W.length;Ee++){let Be=Rs(W[Ee],D,J);ve.push(Be)}return ve}function uo(W,D,J,ve){if(W[0]<J[0]||W[0]>J[2]){let Ee=.5*ve,Be=W[0]-J[0]>Ee?-ve:J[0]-W[0]>Ee?ve:0;Be===0&&(Be=W[0]-J[2]>Ee?-ve:J[2]-W[0]>Ee?ve:0),W[0]+=Be}js(D,W)}function Gs(W,D,J,ve){let Ee=Math.pow(2,ve.z)*Xo,Be=[ve.x*Xo,ve.y*Xo],Ge=[];for(let ct of W)for(let At of ct){let Bt=[At.x+Be[0],At.y+Be[1]];uo(Bt,D,J,Ee),Ge.push(Bt)}return Ge}function vl(W,D,J,ve){let Ee=Math.pow(2,ve.z)*Xo,Be=[ve.x*Xo,ve.y*Xo],Ge=[];for(let At of W){let Bt=[];for(let ar of At){let Sr=[ar.x+Be[0],ar.y+Be[1]];js(D,Sr),Bt.push(Sr)}Ge.push(Bt)}if(D[2]-D[0]<=Ee/2){(ct=D)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Bt of At)uo(Bt,D,J,Ee)}var ct;return Ge}class As{constructor(D,J){this.type=kt,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let ve=D[1];if(ve.type==="FeatureCollection"){let Ee=[];for(let Be of ve.features){let{type:Ge,coordinates:ct}=Be.geometry;Ge==="Polygon"&&Ee.push(ct),Ge==="MultiPolygon"&&Ee.push(...ct)}if(Ee.length)return new As(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new As(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new As(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Rs(ve.coordinates,Be,Ge),At=Gs(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!Xs(Bt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=pu(ve.coordinates,Be,Ge),At=Gs(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!il(Bt,ct))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Rs(ve.coordinates,Be,Ge),At=vl(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!_n(Bt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=pu(ve.coordinates,Be,Ge),At=vl(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!Lo(Bt,ct))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let qs=class{constructor(W=[],D=(J,ve)=>J<ve?-1:J>ve?1:0){if(this.data=W,this.length=this.data.length,this.compare=D,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(W){this.data.push(W),this._up(this.length++)}pop(){if(this.length===0)return;let W=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),W}peek(){return this.data[0]}_up(W){let{data:D,compare:J}=this,ve=D[W];for(;W>0;){let Ee=W-1>>1,Be=D[Ee];if(J(ve,Be)>=0)break;D[W]=Be,W=Ee}D[W]=ve}_down(W){let{data:D,compare:J}=this,ve=this.length>>1,Ee=D[W];for(;W<ve;){let Be=1+(W<<1),Ge=Be+1;if(Ge<this.length&&J(D[Ge],D[Be])<0&&(Be=Ge),J(D[Be],Ee)>=0)break;D[W]=D[Be],W=Be}D[W]=Ee}};function us(W,D,J,ve,Ee){Ss(W,D,J,ve||W.length-1,Ee||su)}function Ss(W,D,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=D-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Bt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Ss(W,D,Math.max(J,Math.floor(D-Ge*At/Be+Bt)),Math.min(ve,Math.floor(D+(Be-Ge)*At/Be+Bt)),Ee)}var ar=W[D],Sr=J,zr=ve;for(Nl(W,J,D),Ee(W[ve],ar)>0&&Nl(W,J,ve);Sr<zr;){for(Nl(W,Sr,zr),Sr++,zr--;Ee(W[Sr],ar)<0;)Sr++;for(;Ee(W[zr],ar)>0;)zr--}Ee(W[J],ar)===0?Nl(W,J,zr):Nl(W,++zr,ve),zr<=D&&(J=zr+1),D<=zr&&(ve=zr-1)}}function Nl(W,D,J){var ve=W[D];W[D]=W[J],W[J]=ve}function su(W,D){return W<D?-1:W>D?1:0}function Tc(W,D){if(W.length<=1)return[W];let J=[],ve,Ee;for(let Be of W){let Ge=Sf(Be);Ge!==0&&(Be.area=Math.abs(Ge),Ee===void 0&&(Ee=Ge<0),Ee===Ge<0?(ve&&J.push(ve),ve=[Be]):ve.push(Be))}if(ve&&J.push(ve),D>1)for(let Be=0;Be<J.length;Be++)J[Be].length<=D||(us(J[Be],D,1,J[Be].length-1,du),J[Be]=J[Be].slice(0,D));return J}function du(W,D){return D.area-W.area}function Sf(W){let D=0;for(let J,ve,Ee=0,Be=W.length,Ge=Be-1;Ee<Be;Ge=Ee++)J=W[Ee],ve=W[Ge],D+=(ve.x-J.x)*(J.y+ve.y);return D}let Uc=1/298.257223563,Bs=Uc*(2-Uc),dc=Math.PI/180;class Hc{constructor(D){let J=6378.137*dc*1e3,ve=Math.cos(D*dc),Ee=1/(1-Bs*(1-ve*ve)),Be=Math.sqrt(Ee);this.kx=J*Be*ve,this.ky=J*Be*Ee*(1-Bs)}distance(D,J){let ve=this.wrap(D[0]-J[0])*this.kx,Ee=(D[1]-J[1])*this.ky;return Math.sqrt(ve*ve+Ee*Ee)}pointOnLine(D,J){let ve,Ee,Be,Ge,ct=1/0;for(let At=0;At<D.length-1;At++){let Bt=D[At][0],ar=D[At][1],Sr=this.wrap(D[At+1][0]-Bt)*this.kx,zr=(D[At+1][1]-ar)*this.ky,Wr=0;Sr===0&&zr===0||(Wr=(this.wrap(J[0]-Bt)*this.kx*Sr+(J[1]-ar)*this.ky*zr)/(Sr*Sr+zr*zr),Wr>1?(Bt=D[At+1][0],ar=D[At+1][1]):Wr>0&&(Bt+=Sr/this.kx*Wr,ar+=zr/this.ky*Wr)),Sr=this.wrap(J[0]-Bt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Sr*Sr+zr*zr;ia<ct&&(ct=ia,ve=Bt,Ee=ar,Be=At,Ge=Wr)}return{point:[ve,Ee],index:Be,t:Math.max(0,Math.min(1,Ge))}}wrap(D){for(;D<-180;)D+=360;for(;D>180;)D-=360;return D}}function lu(W,D){return D[0]-W[0]}function Pl(W){return W[1]-W[0]+1}function ic(W,D){return W[1]>=W[0]&&W[1]<D}function Ou(W,D){if(W[0]>W[1])return[null,null];let J=Pl(W);if(D){if(J===2)return[W,null];let Ee=Math.floor(J/2);return[[W[0],W[0]+Ee],[W[0]+Ee,W[1]]]}if(J===1)return[W,null];let ve=Math.floor(J/2)-1;return[[W[0],W[0]+ve],[W[0]+ve+1,W[1]]]}function nl(W,D){if(!ic(D,W.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=D[0];ve<=D[1];++ve)js(J,W[ve]);return J}function ml(W){let D=[1/0,1/0,-1/0,-1/0];for(let J of W)for(let ve of J)js(D,ve);return D}function bs(W){return W[0]!==-1/0&&W[1]!==-1/0&&W[2]!==1/0&&W[3]!==1/0}function Zs(W,D,J){if(!bs(W)||!bs(D))return NaN;let ve=0,Ee=0;return W[2]<D[0]&&(ve=D[0]-W[2]),W[0]>D[2]&&(ve=W[0]-D[2]),W[1]>D[3]&&(Ee=W[1]-D[3]),W[3]<D[1]&&(Ee=D[1]-W[3]),J.distance([0,0],[ve,Ee])}function nc(W,D,J){let ve=J.pointOnLine(D,W);return J.distance(W,ve.point)}function Ul(W,D,J,ve,Ee){let Be=Math.min(nc(W,[J,ve],Ee),nc(D,[J,ve],Ee)),Ge=Math.min(nc(J,[W,D],Ee),nc(ve,[W,D],Ee));return Math.min(Be,Ge)}function qu(W,D,J,ve,Ee){if(!ic(D,W.length)||!ic(ve,J.length))return 1/0;let Be=1/0;for(let Ge=D[0];Ge<D[1];++Ge){let ct=W[Ge],At=W[Ge+1];for(let Bt=ve[0];Bt<ve[1];++Bt){let ar=J[Bt],Sr=J[Bt+1];if(Os(ct,At,ar,Sr))return 0;Be=Math.min(Be,Ul(ct,At,ar,Sr,Ee))}}return Be}function fl(W,D,J,ve,Ee){if(!ic(D,W.length)||!ic(ve,J.length))return NaN;let Be=1/0;for(let Ge=D[0];Ge<=D[1];++Ge)for(let ct=ve[0];ct<=ve[1];++ct)if(Be=Math.min(Be,Ee.distance(W[Ge],J[ct])),Be===0)return Be;return Be}function xh(W,D,J){if(Xs(W,D,!0))return 0;let ve=1/0;for(let Ee of D){let Be=Ee[0],Ge=Ee[Ee.length-1];if(Be!==Ge&&(ve=Math.min(ve,nc(W,[Ge,Be],J)),ve===0))return ve;let ct=J.pointOnLine(Ee,W);if(ve=Math.min(ve,J.distance(W,ct.point)),ve===0)return ve}return ve}function ss(W,D,J,ve){if(!ic(D,W.length))return NaN;for(let Be=D[0];Be<=D[1];++Be)if(Xs(W[Be],J,!0))return 0;let Ee=1/0;for(let Be=D[0];Be<D[1];++Be){let Ge=W[Be],ct=W[Be+1];for(let At of J)for(let Bt=0,ar=At.length,Sr=ar-1;Bt<ar;Sr=Bt++){let zr=At[Sr],Wr=At[Bt];if(Os(Ge,ct,zr,Wr))return 0;Ee=Math.min(Ee,Ul(Ge,ct,zr,Wr,ve))}}return Ee}function bh(W,D){for(let J of W)for(let ve of J)if(Xs(ve,D,!0))return!0;return!1}function ks(W,D,J,ve=1/0){let Ee=ml(W),Be=ml(D);if(ve!==1/0&&Zs(Ee,Be,J)>=ve)return ve;if(xs(Ee,Be)){if(bh(W,D))return 0}else if(bh(D,W))return 0;let Ge=1/0;for(let ct of W)for(let At=0,Bt=ct.length,ar=Bt-1;At<Bt;ar=At++){let Sr=ct[ar],zr=ct[At];for(let Wr of D)for(let ia=0,fa=Wr.length,ja=fa-1;ia<fa;ja=ia++){let Ka=Wr[ja],Wi=Wr[ia];if(Os(Sr,zr,Ka,Wi))return 0;Ge=Math.min(Ge,Ul(Sr,zr,Ka,Wi,J))}}return Ge}function to(W,D,J,ve,Ee,Be){if(!Be)return;let Ge=Zs(nl(ve,Be),Ee,J);Ge<D&&W.push([Ge,Be,[0,0]])}function Wc(W,D,J,ve,Ee,Be,Ge){if(!Be||!Ge)return;let ct=Zs(nl(ve,Be),nl(Ee,Ge),J);ct<D&&W.push([ct,Be,Ge])}function Vu(W,D,J,ve,Ee=1/0){let Be=Math.min(ve.distance(W[0],J[0][0]),Ee);if(Be===0)return Be;let Ge=new qs([[0,[0,W.length-1],[0,0]]],lu),ct=ml(J);for(;Ge.length>0;){let At=Ge.pop();if(At[0]>=Be)continue;let Bt=At[1],ar=D?50:100;if(Pl(Bt)<=ar){if(!ic(Bt,W.length))return NaN;if(D){let Sr=ss(W,Bt,J,ve);if(isNaN(Sr)||Sr===0)return Sr;Be=Math.min(Be,Sr)}else for(let Sr=Bt[0];Sr<=Bt[1];++Sr){let zr=xh(W[Sr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Sr=Ou(Bt,D);to(Ge,Be,ve,W,ct,Sr[0]),to(Ge,Be,ve,W,ct,Sr[1])}}return Be}function jl(W,D,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(W[0],J[0]));if(Ge===0)return Ge;let ct=new qs([[0,[0,W.length-1],[0,J.length-1]]],lu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Bt=At[1],ar=At[2],Sr=D?50:100,zr=ve?50:100;if(Pl(Bt)<=Sr&&Pl(ar)<=zr){if(!ic(Bt,W.length)&&ic(ar,J.length))return NaN;let Wr;if(D&&ve)Wr=qu(W,Bt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(D&&!ve){let ia=W.slice(Bt[0],Bt[1]+1);for(let fa=ar[0];fa<=ar[1];++fa)if(Wr=nc(J[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else if(!D&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Bt[0];fa<=Bt[1];++fa)if(Wr=nc(W[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(W,Bt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Bt,D),ia=Ou(ar,ve);Wc(ct,Ge,Ee,W,J,Wr[0],ia[0]),Wc(ct,Ge,Ee,W,J,Wr[0],ia[1]),Wc(ct,Ge,Ee,W,J,Wr[1],ia[0]),Wc(ct,Ge,Ee,W,J,Wr[1],ia[1])}}return Ge}function Mf(W){return W.type==="MultiPolygon"?W.coordinates.map(D=>({type:"Polygon",coordinates:D})):W.type==="MultiLineString"?W.coordinates.map(D=>({type:"LineString",coordinates:D})):W.type==="MultiPoint"?W.coordinates.map(D=>({type:"Point",coordinates:D})):[W]}class Ac{constructor(D,J){this.type=Ke,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let ve=D[1];if(ve.type==="FeatureCollection")return new Ac(ve,ve.features.map(Ee=>Mf(Ee.geometry)).flat());if(ve.type==="Feature")return new Ac(ve,Mf(ve.geometry));if("type"in ve&&"coordinates"in ve)return new Ac(ve,Mf(ve))}return J.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Hc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,jl(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,jl(Be,!1,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!1,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Hc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,jl(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,jl(Be,!0,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!0,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries);if(D.geometryType()==="Polygon")return function(J,ve){let Ee=J.geometry();if(Ee.length===0||Ee[0].length===0)return NaN;let Be=Tc(Ee,0).map(At=>At.map(Bt=>Bt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Hc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Bt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Bt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Bt,Ge,ct));break;case"Polygon":ct=Math.min(ct,ks(Bt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":On,"!=":ts,">":_s,"<":is,">=":io,"<=":Oo,array:lt,at:Xt,boolean:lt,case:Pa,coalesce:Co,collator:Gn,format:ns,image:gs,in:vr,"index-of":Or,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:Ls,let:Hr,literal:tn,match:ba,number:lt,"number-format":eo,object:lt,slice:ma,step:_a,string:lt,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:As,distance:Ac};class $l{constructor(D,J,ve,Ee){this.name=D,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,J){let ve=D[0],Ee=$l.definitions[ve];if(!Ee)return J.error(`Unknown expression "${ve}". If you wanted a literal array, use ["literal", [...]].`,0);let Be=Array.isArray(Ee)?Ee[0]:Ee.type,Ge=Array.isArray(Ee)?[[Ee[1],Ee[2]]]:Ee.overloads,ct=Ge.filter(([Bt])=>!Array.isArray(Bt)||Bt.length===D.length-1),At=null;for(let[Bt,ar]of ct){At=new Ur(J.registry,Bf,J.path,null,J.scope);let Sr=[],zr=!1;for(let Wr=1;Wr<D.length;Wr++){let ia=D[Wr],fa=Array.isArray(Bt)?Bt[Wr-1]:Bt.type,ja=At.parse(ia,1+Sr.length,fa);if(!ja){zr=!0;break}Sr.push(ja)}if(!zr)if(Array.isArray(Bt)&&Bt.length!==Sr.length)At.error(`Expected ${Bt.length} arguments, but found ${Sr.length} instead.`);else{for(let Wr=0;Wr<Sr.length;Wr++){let ia=Array.isArray(Bt)?Bt[Wr]:Bt.type,fa=Sr[Wr];At.concat(Wr+1).checkSubtype(ia,fa.type)}if(At.errors.length===0)return new $l(ve,Be,ar,Sr)}}if(ct.length===1)J.errors.push(...At.errors);else{let Bt=(ct.length?ct:Ge).map(([Sr])=>{return zr=Sr,Array.isArray(zr)?`(${zr.map(Je).join(", ")})`:`(${Je(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Sr=1;Sr<D.length;Sr++){let zr=J.parse(D[Sr],1+ar.length);if(!zr)return null;ar.push(Je(zr.type))}J.error(`Expected arguments of type ${Bt}, but found (${ar.join(", ")}) instead.`)}return null}static register(D,J){$l.definitions=J;for(let ve in J)D[ve]=$l}}function Jf(W,[D,J,ve,Ee]){D=D.evaluate(W),J=J.evaluate(W),ve=ve.evaluate(W);let Be=Ee?Ee.evaluate(W):1,Ge=ri(D,J,ve,Be);if(Ge)throw new fn(Ge);return new Jt(D/255,J/255,ve/255,Be,!1)}function Of(W,D){return W in D}function of(W,D){let J=D[W];return J===void 0?null:J}function jc(W){return{type:W}}function Bf(W){if(W instanceof gt)return Bf(W.boundExpression);if(W instanceof $l&&W.name==="error"||W instanceof Gn||W instanceof As||W instanceof Ac)return!1;let D=W instanceof Cr||W instanceof lt,J=!0;return W.eachChild(ve=>{J=D?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(W)&&Ef(W,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(W){if(W instanceof $l&&(W.name==="get"&&W.args.length===1||W.name==="feature-state"||W.name==="has"&&W.args.length===1||W.name==="properties"||W.name==="geometry-type"||W.name==="id"||/^filter-/.test(W.name))||W instanceof As||W instanceof Ac)return!1;let D=!0;return W.eachChild(J=>{D&&!Nf(J)&&(D=!1)}),D}function Gu(W){if(W instanceof $l&&W.name==="feature-state")return!1;let D=!0;return W.eachChild(J=>{D&&!Gu(J)&&(D=!1)}),D}function Ef(W,D){if(W instanceof $l&&D.indexOf(W.name)>=0)return!1;let J=!0;return W.eachChild(ve=>{J&&!Ef(ve,D)&&(J=!1)}),J}function oc(W){return{result:"success",value:W}}function Xc(W){return{result:"error",value:W}}function Ql(W){return W["property-type"]==="data-driven"||W["property-type"]==="cross-faded-data-driven"}function qc(W){return!!W.expression&&W.expression.parameters.indexOf("zoom")>-1}function Sc(W){return!!W.expression&&W.expression.interpolated}function Ys(W){return W instanceof Number?"number":W instanceof String?"string":W instanceof Boolean?"boolean":Array.isArray(W)?"array":W===null?"null":typeof W}function kf(W){return typeof W=="object"&&W!==null&&!Array.isArray(W)}function fh(W){return W}function Uf(W,D){let J=D.type==="color",ve=W.stops&&typeof W.stops[0][0]=="object",Ee=ve||!(ve||W.property!==void 0),Be=W.type||(Sc(D)?"exponential":"interval");if(J||D.type==="padding"){let ar=J?Jt.parse:ca.parse;(W=ne({},W)).stops&&(W.stops=W.stops.map(Sr=>[Sr[0],ar(Sr[1])])),W.default=ar(W.default?W.default:D.default)}if(W.colorSpace&&(Ge=W.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${W.colorSpace}"`);var Ge;let ct,At,Bt;if(Be==="exponential")ct=jf;else if(Be==="interval")ct=Cu;else if(Be==="categorical"){ct=$f,At=Object.create(null);for(let ar of W.stops)At[ar[0]]=ar[1];Bt=typeof W.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=yl}if(ve){let ar={},Sr=[];for(let ia=0;ia<W.stops.length;ia++){let fa=W.stops[ia],ja=fa[0].zoom;ar[ja]===void 0&&(ar[ja]={zoom:ja,type:W.type,property:W.property,default:W.default,stops:[]},Sr.push(ja)),ar[ja].stops.push([fa[0].value,fa[1]])}let zr=[];for(let ia of Sr)zr.push([ar[ia].zoom,Uf(ar[ia],D)]);let Wr={name:"linear"};return{kind:"composite",interpolationType:Wr,interpolationFactor:ao.interpolationFactor.bind(void 0,Wr),zoomStops:zr.map(ia=>ia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:W.base},D,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:W.base!==void 0?W.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:W.stops.map(Sr=>Sr[0]),evaluate:({zoom:Sr})=>ct(W,D,Sr,At,Bt)}}return{kind:"source",evaluate(ar,Sr){let zr=Sr&&Sr.properties?Sr.properties[W.property]:void 0;return zr===void 0?Zc(W.default,D.default):ct(W,D,zr,At,Bt)}}}function Zc(W,D,J){return W!==void 0?W:D!==void 0?D:J!==void 0?J:void 0}function $f(W,D,J,ve,Ee){return Zc(typeof J===Ee?ve[J]:void 0,W.default,D.default)}function Cu(W,D,J){if(Ys(J)!=="number")return Zc(W.default,D.default);let ve=W.stops.length;if(ve===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[ve-1][0])return W.stops[ve-1][1];let Ee=la(W.stops.map(Be=>Be[0]),J);return W.stops[Ee][1]}function jf(W,D,J){let ve=W.base!==void 0?W.base:1;if(Ys(J)!=="number")return Zc(W.default,D.default);let Ee=W.stops.length;if(Ee===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[Ee-1][0])return W.stops[Ee-1][1];let Be=la(W.stops.map(ar=>ar[0]),J),Ge=function(ar,Sr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Sr===1?fa/ia:(Math.pow(Sr,fa)-1)/(Math.pow(Sr,ia)-1)}(J,ve,W.stops[Be][0],W.stops[Be+1][0]),ct=W.stops[Be][1],At=W.stops[Be+1][1],Bt=Bn[D.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Sr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Sr!==void 0&&zr!==void 0)return Bt(Sr,zr,Ge,W.colorSpace)}}:Bt(ct,At,Ge,W.colorSpace)}function yl(W,D,J){switch(D.type){case"color":J=Jt.parse(J);break;case"formatted":J=ra.fromString(J.toString());break;case"resolvedImage":J=Za.fromString(J.toString());break;case"padding":J=ca.parse(J);break;default:Ys(J)===D.type||D.type==="enum"&&D.values[J]||(J=void 0)}return Zc(J,W.default,D.default)}$l.register(nf,{error:[{kind:"error"},[Mt],(W,[D])=>{throw new fn(D.evaluate(W))}],typeof:[Mt,[Mr],(W,[D])=>Je(Ra(D.evaluate(W)))],"to-rgba":[Oe(Ke,4),[Nt],(W,[D])=>{let[J,ve,Ee,Be]=D.evaluate(W).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Nt,[Ke,Ke,Ke],Jf],rgba:[Nt,[Ke,Ke,Ke,Ke],Jf],has:{type:kt,overloads:[[[Mt],(W,[D])=>Of(D.evaluate(W),W.properties())],[[Mt,Gt],(W,[D,J])=>Of(D.evaluate(W),J.evaluate(W))]]},get:{type:Mr,overloads:[[[Mt],(W,[D])=>of(D.evaluate(W),W.properties())],[[Mt,Gt],(W,[D,J])=>of(D.evaluate(W),J.evaluate(W))]]},"feature-state":[Mr,[Mt],(W,[D])=>of(D.evaluate(W),W.featureState||{})],properties:[Gt,[],W=>W.properties()],"geometry-type":[Mt,[],W=>W.geometryType()],id:[Mr,[],W=>W.id()],zoom:[Ke,[],W=>W.globals.zoom],"heatmap-density":[Ke,[],W=>W.globals.heatmapDensity||0],"line-progress":[Ke,[],W=>W.globals.lineProgress||0],accumulated:[Mr,[],W=>W.globals.accumulated===void 0?null:W.globals.accumulated],"+":[Ke,jc(Ke),(W,D)=>{let J=0;for(let ve of D)J+=ve.evaluate(W);return J}],"*":[Ke,jc(Ke),(W,D)=>{let J=1;for(let ve of D)J*=ve.evaluate(W);return J}],"-":{type:Ke,overloads:[[[Ke,Ke],(W,[D,J])=>D.evaluate(W)-J.evaluate(W)],[[Ke],(W,[D])=>-D.evaluate(W)]]},"/":[Ke,[Ke,Ke],(W,[D,J])=>D.evaluate(W)/J.evaluate(W)],"%":[Ke,[Ke,Ke],(W,[D,J])=>D.evaluate(W)%J.evaluate(W)],ln2:[Ke,[],()=>Math.LN2],pi:[Ke,[],()=>Math.PI],e:[Ke,[],()=>Math.E],"^":[Ke,[Ke,Ke],(W,[D,J])=>Math.pow(D.evaluate(W),J.evaluate(W))],sqrt:[Ke,[Ke],(W,[D])=>Math.sqrt(D.evaluate(W))],log10:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))/Math.LN10],ln:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))],log2:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))/Math.LN2],sin:[Ke,[Ke],(W,[D])=>Math.sin(D.evaluate(W))],cos:[Ke,[Ke],(W,[D])=>Math.cos(D.evaluate(W))],tan:[Ke,[Ke],(W,[D])=>Math.tan(D.evaluate(W))],asin:[Ke,[Ke],(W,[D])=>Math.asin(D.evaluate(W))],acos:[Ke,[Ke],(W,[D])=>Math.acos(D.evaluate(W))],atan:[Ke,[Ke],(W,[D])=>Math.atan(D.evaluate(W))],min:[Ke,jc(Ke),(W,D)=>Math.min(...D.map(J=>J.evaluate(W)))],max:[Ke,jc(Ke),(W,D)=>Math.max(...D.map(J=>J.evaluate(W)))],abs:[Ke,[Ke],(W,[D])=>Math.abs(D.evaluate(W))],round:[Ke,[Ke],(W,[D])=>{let J=D.evaluate(W);return J<0?-Math.round(-J):Math.round(J)}],floor:[Ke,[Ke],(W,[D])=>Math.floor(D.evaluate(W))],ceil:[Ke,[Ke],(W,[D])=>Math.ceil(D.evaluate(W))],"filter-==":[kt,[Mt,Mr],(W,[D,J])=>W.properties()[D.value]===J.value],"filter-id-==":[kt,[Mr],(W,[D])=>W.id()===D.value],"filter-type-==":[kt,[Mt],(W,[D])=>W.geometryType()===D.value],"filter-<":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve<Ee}],"filter-id-<":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J<ve}],"filter->":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Mr],(W,[D])=>D.value in W.properties()],"filter-has-id":[kt,[],W=>W.id()!==null&&W.id()!==void 0],"filter-type-in":[kt,[Oe(Mt)],(W,[D])=>D.value.indexOf(W.geometryType())>=0],"filter-id-in":[kt,[Oe(Mr)],(W,[D])=>D.value.indexOf(W.id())>=0],"filter-in-small":[kt,[Mt,Oe(Mr)],(W,[D,J])=>J.value.indexOf(W.properties()[D.value])>=0],"filter-in-large":[kt,[Mt,Oe(Mr)],(W,[D,J])=>function(ve,Ee,Be,Ge){for(;Be<=Ge;){let ct=Be+Ge>>1;if(Ee[ct]===ve)return!0;Ee[ct]>ve?Ge=ct-1:Be=ct+1}return!1}(W.properties()[D.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(W,[D,J])=>D.evaluate(W)&&J.evaluate(W)],[jc(kt),(W,D)=>{for(let J of D)if(!J.evaluate(W))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(W,[D,J])=>D.evaluate(W)||J.evaluate(W)],[jc(kt),(W,D)=>{for(let J of D)if(J.evaluate(W))return!0;return!1}]]},"!":[kt,[kt],(W,[D])=>!D.evaluate(W)],"is-supported-script":[kt,[Mt],(W,[D])=>{let J=W.globals&&W.globals.isSupportedScript;return!J||J(D.evaluate(W))}],upcase:[Mt,[Mt],(W,[D])=>D.evaluate(W).toUpperCase()],downcase:[Mt,[Mt],(W,[D])=>D.evaluate(W).toLowerCase()],concat:[Mt,jc(Mr),(W,D)=>D.map(J=>an(J.evaluate(W))).join("")],"resolved-locale":[Mt,[mr],(W,[D])=>D.evaluate(W).resolvedLocale()]});class Lu{constructor(D,J){var ve;this.expression=D,this._warningHistory={},this._evaluator=new Rr,this._defaultValue=J?(ve=J).type==="color"&&kf(ve.default)?new Jt(0,0,0,0):ve.type==="color"?Jt.parse(ve.default)||null:ve.type==="padding"?ca.parse(ve.default)||null:ve.type==="variableAnchorOffsetCollection"?$a.parse(ve.default)||null:ve.default===void 0?null:ve.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._evaluator.globals=D,this._evaluator.feature=J,this._evaluator.featureState=ve,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge,this.expression.evaluate(this._evaluator)}evaluate(D,J,ve,Ee,Be,Ge){this._evaluator.globals=D,this._evaluator.feature=J||null,this._evaluator.featureState=ve||null,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge||null;try{let ct=this.expression.evaluate(this._evaluator);if(ct==null||typeof ct=="number"&&ct!=ct)return this._defaultValue;if(this._enumValues&&!(ct in this._enumValues))throw new fn(`Expected value to be one of ${Object.keys(this._enumValues).map(At=>JSON.stringify(At)).join(", ")}, but found ${JSON.stringify(ct)} instead.`);return ct}catch(ct){return this._warningHistory[ct.message]||(this._warningHistory[ct.message]=!0,typeof console<"u"&&console.warn(ct.message)),this._defaultValue}}}function Mc(W){return Array.isArray(W)&&W.length>0&&typeof W[0]=="string"&&W[0]in nf}function ol(W,D){let J=new Ur(nf,Bf,[],D?function(Ee){let Be={color:Nt,string:Mt,number:Ke,enum:Mt,boolean:kt,formatted:qr,padding:Er,resolvedImage:Ir,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Oe(Be[Ee.value]||Mr,Ee.length):Be[Ee.type]}(D):void 0),ve=J.parse(W,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,D)):Xc(J.errors)}class vc{constructor(D,J){this.kind=D,this._styleExpression=J,this.isStateDependent=D!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge)}evaluate(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(D,J,ve,Ee,Be,Ge)}}class yu{constructor(D,J,ve,Ee){this.kind=D,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=D!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge)}evaluate(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(D,J,ve,Ee,Be,Ge)}interpolationFactor(D,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,D,J,ve):0}}function Tu(W,D){let J=ol(W,D);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!Ql(D))return Xc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(D))return Xc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Xc([Ge]):Ge instanceof ao&&!Sc(D)?Xc([new Ce("",'"interpolate" expressions cannot be used with this property')]):oc(Ge?new yu(Ee?"camera":"composite",J.value,Ge.labels,Ge instanceof ao?Ge.interpolation:void 0):new vc(Ee?"constant":"source",J.value)):Xc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class El{constructor(D,J){this._parameters=D,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(D){return new El(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function qf(W){let D=null;if(W instanceof Hr)D=qf(W.result);else if(W instanceof Co){for(let J of W.args)if(D=qf(J),D)break}else(W instanceof _a||W instanceof ao)&&W.input instanceof $l&&W.input.name==="zoom"&&(D=W);return D instanceof Ce||W.eachChild(J=>{let ve=qf(J);ve instanceof Ce?D=ve:!D&&ve?D=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&ve&&D!==ve&&(D=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function Qf(W){if(W===!0||W===!1)return!0;if(!Array.isArray(W)||W.length===0)return!1;switch(W[0]){case"has":return W.length>=2&&W[1]!=="$id"&&W[1]!=="$type";case"in":return W.length>=3&&(typeof W[1]!="string"||Array.isArray(W[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return W.length!==3||Array.isArray(W[1])||Array.isArray(W[2]);case"any":case"all":for(let D of W.slice(1))if(!Qf(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let Bu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ec(W){if(W==null)return{filter:()=>!0,needGeometry:!1};Qf(W)||(W=sf(W));let D=ol(W,Bu);if(D.result==="error")throw new Error(D.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>D.value.evaluate(J,ve,{},Ee),needGeometry:Lh(W)}}function mc(W,D){return W<D?-1:W>D?1:0}function Lh(W){if(!Array.isArray(W))return!1;if(W[0]==="within"||W[0]==="distance")return!0;for(let D=1;D<W.length;D++)if(Lh(W[D]))return!0;return!1}function sf(W){if(!W)return!0;let D=W[0];return W.length<=1?D!=="any":D==="=="?vf(W[1],W[2],"=="):D==="!="?au(vf(W[1],W[2],"==")):D==="<"||D===">"||D==="<="||D===">="?vf(W[1],W[2],D):D==="any"?(J=W.slice(1),["any"].concat(J.map(sf))):D==="all"?["all"].concat(W.slice(1).map(sf)):D==="none"?["all"].concat(W.slice(1).map(sf).map(au)):D==="in"?Nu(W[1],W.slice(2)):D==="!in"?au(Nu(W[1],W.slice(2))):D==="has"?lf(W[1]):D!=="!has"||au(lf(W[1]));var J}function vf(W,D,J){switch(W){case"$type":return[`filter-type-${J}`,D];case"$id":return[`filter-id-${J}`,D];default:return[`filter-${J}`,W,D]}}function Nu(W,D){if(D.length===0)return!1;switch(W){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(J=>typeof J!=typeof D[0])?["filter-in-large",W,["literal",D.sort(mc)]]:["filter-in-small",W,["literal",D]]}}function lf(W){switch(W){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",W]}}function au(W){return["!",W]}function Yc(W){let D=typeof W;if(D==="number"||D==="boolean"||D==="string"||W==null)return JSON.stringify(W);if(Array.isArray(W)){let Ee="[";for(let Be of W)Ee+=`${Yc(Be)},`;return`${Ee}]`}let J=Object.keys(W).sort(),ve="{";for(let Ee=0;Ee<J.length;Ee++)ve+=`${JSON.stringify(J[Ee])}:${Yc(W[J[Ee]])},`;return`${ve}}`}function hh(W){let D="";for(let J of pe)D+=`/${Yc(W[J])}`;return D}function mf(W){let D=W.value;return D?[new ue(W.key,D,"constants have been deprecated as of v8")]:[]}function sl(W){return W instanceof Number||W instanceof String||W instanceof Boolean?W.valueOf():W}function _u(W){if(Array.isArray(W))return W.map(_u);if(W instanceof Object&&!(W instanceof Number||W instanceof String||W instanceof Boolean)){let D={};for(let J in W)D[J]=_u(W[J]);return D}return sl(W)}function Pu(W){let D=W.key,J=W.value,ve=W.valueSpec||{},Ee=W.objectElementValidators||{},Be=W.style,Ge=W.styleSpec,ct=W.validateSpec,At=[],Bt=Ys(J);if(Bt!=="object")return[new ue(D,J,`object expected, ${Bt} found`)];for(let ar in J){let Sr=ar.split(".")[0],zr=ve[Sr]||ve["*"],Wr;if(Ee[Sr])Wr=Ee[Sr];else if(ve[Sr])Wr=ct;else if(Ee["*"])Wr=Ee["*"];else{if(!ve["*"]){At.push(new ue(D,J[ar],`unknown property "${ar}"`));continue}Wr=ct}At=At.concat(Wr({key:(D&&`${D}.`)+ar,value:J[ar],valueSpec:zr,style:Be,styleSpec:Ge,object:J,objectKey:ar,validateSpec:ct},J))}for(let ar in ve)Ee[ar]||ve[ar].required&&ve[ar].default===void 0&&J[ar]===void 0&&At.push(new ue(D,J,`missing required property "${ar}"`));return At}function Cf(W){let D=W.value,J=W.valueSpec,ve=W.style,Ee=W.styleSpec,Be=W.key,Ge=W.arrayElementValidator||W.validateSpec;if(Ys(D)!=="array")return[new ue(Be,D,`array expected, ${Ys(D)} found`)];if(J.length&&D.length!==J.length)return[new ue(Be,D,`array length ${J.length} expected, length ${D.length} found`)];if(J["min-length"]&&D.length<J["min-length"])return[new ue(Be,D,`array length at least ${J["min-length"]} expected, length ${D.length} found`)];let ct={type:J.value,values:J.values};Ee.$version<7&&(ct.function=J.function),Ys(J.value)==="object"&&(ct=J.value);let At=[];for(let Bt=0;Bt<D.length;Bt++)At=At.concat(Ge({array:D,arrayIndex:Bt,value:D[Bt],valueSpec:ct,validateSpec:W.validateSpec,style:ve,styleSpec:Ee,key:`${Be}[${Bt}]`}));return At}function hl(W){let D=W.key,J=W.value,ve=W.valueSpec,Ee=Ys(J);return Ee==="number"&&J!=J&&(Ee="NaN"),Ee!=="number"?[new ue(D,J,`number expected, ${Ee} found`)]:"minimum"in ve&&J<ve.minimum?[new ue(D,J,`${J} is less than the minimum value ${ve.minimum}`)]:"maximum"in ve&&J>ve.maximum?[new ue(D,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(W){let D=W.valueSpec,J=sl(W.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&W.value.property===void 0,At=!ct,Bt=Ys(W.value.stops)==="array"&&Ys(W.value.stops[0])==="array"&&Ys(W.value.stops[0][0])==="object",ar=Pu({key:W.key,value:W.value,valueSpec:W.styleSpec.function,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new ue(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],fa=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:fa,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Sr})),Ys(fa)==="array"&&fa.length===0&&ia.push(new ue(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new ue(W.key,W.value,'missing required property "property"')),J==="identity"||W.value.stops||ar.push(new ue(W.key,W.value,'missing required property "stops"')),J==="exponential"&&W.valueSpec.expression&&!Sc(W.valueSpec)&&ar.push(new ue(W.key,W.value,"exponential functions not supported")),W.styleSpec.$version>=8&&(At&&!Ql(W.valueSpec)?ar.push(new ue(W.key,W.value,"property functions not supported")):ct&&!qc(W.valueSpec)&&ar.push(new ue(W.key,W.value,"zoom functions not supported"))),J!=="categorical"&&!Bt||W.value.property!==void 0||ar.push(new ue(W.key,W.value,'"property" property is required')),ar;function Sr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Ys(fa)!=="array")return[new ue(ja,fa,`array expected, ${Ys(fa)} found`)];if(fa.length!==2)return[new ue(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Bt){if(Ys(fa[0])!=="object")return[new ue(ja,fa,`object expected, ${Ys(fa[0])} found`)];if(fa[0].zoom===void 0)return[new ue(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new ue(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new ue(ja,fa[0].zoom,"stop zoom values must appear in ascending order")];sl(fa[0].zoom)!==Be&&(Be=sl(fa[0].zoom),Ee=void 0,Ge={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:fa[0],valueSpec:{zoom:{}},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,objectElementValidators:{zoom:hl,value:zr}}))}else ia=ia.concat(zr({key:`${ja}[0]`,value:fa[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},fa));return Mc(_u(fa[1]))?ia.concat([new ue(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Ys(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new ue(Wr.key,Ka,`${fa} stop domain type must match previous stop domain type ${ve}`)]}else ve=fa;if(fa!=="number"&&fa!=="string"&&fa!=="boolean")return[new ue(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(fa!=="number"&&J!=="categorical"){let Wi=`number expected, ${fa} found`;return Ql(D)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ue(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&ja<Ee?[new ue(Wr.key,Ka,"stop domain values must appear in ascending order")]:(Ee=ja,J==="categorical"&&ja in Ge?[new ue(Wr.key,Ka,"stop domain values must be unique")]:(Ge[ja]=!0,[])):[new ue(Wr.key,Ka,`integer expected, found ${ja}`)]}}function kc(W){let D=(W.expressionContext==="property"?Tu:ol)(_u(W.value),W.valueSpec);if(D.result==="error")return D.value.map(ve=>new ue(`${W.key}${ve.key}`,W.value,ve.message));let J=D.value.expression||D.value._styleExpression.expression;if(W.expressionContext==="property"&&W.propertyKey==="text-font"&&!J.outputDefined())return[new ue(W.key,W.value,`Invalid data expression for "${W.propertyKey}". Output values must be contained as literals within the expression.`)];if(W.expressionContext==="property"&&W.propertyType==="layout"&&!Gu(J))return[new ue(W.key,W.value,'"feature-state" data expressions are not supported with layout properties.')];if(W.expressionContext==="filter"&&!Gu(J))return[new ue(W.key,W.value,'"feature-state" data expressions are not supported with filters.')];if(W.expressionContext&&W.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new ue(W.key,W.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(W.expressionContext==="cluster-initial"&&!Nf(J))return[new ue(W.key,W.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(W){let D=W.key,J=W.value,ve=W.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new ue(D,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new ue(D,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(W){return Qf(_u(W.value))?kc(ne({},W,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(W)}function Wu(W){let D=W.value,J=W.key;if(Ys(D)!=="array")return[new ue(J,D,`array expected, ${Ys(D)} found`)];let ve=W.styleSpec,Ee,Be=[];if(D.length<1)return[new ue(J,D,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:D[0],valueSpec:ve.filter_operator,style:W.style,styleSpec:W.styleSpec})),sl(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&sl(D[1])==="$type"&&Be.push(new ue(J,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Be.push(new ue(J,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Ee=Ys(D[1]),Ee!=="string"&&Be.push(new ue(`${J}[1]`,D[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge<D.length;Ge++)Ee=Ys(D[Ge]),sl(D[1])==="$type"?Be=Be.concat(Hu({key:`${J}[${Ge}]`,value:D[Ge],valueSpec:ve.geometry_type,style:W.style,styleSpec:W.styleSpec})):Ee!=="string"&&Ee!=="number"&&Ee!=="boolean"&&Be.push(new ue(`${J}[${Ge}]`,D[Ge],`string, number, or boolean expected, ${Ee} found`));break;case"any":case"all":case"none":for(let Ge=1;Ge<D.length;Ge++)Be=Be.concat(Wu({key:`${J}[${Ge}]`,value:D[Ge],style:W.style,styleSpec:W.styleSpec}));break;case"has":case"!has":Ee=Ys(D[1]),D.length!==2?Be.push(new ue(J,D,`filter array for "${D[0]}" operator must have 2 elements`)):Ee!=="string"&&Be.push(new ue(`${J}[1]`,D[1],`string expected, ${Ee} found`))}return Be}function Kc(W,D){let J=W.key,ve=W.validateSpec,Ee=W.style,Be=W.styleSpec,Ge=W.value,ct=W.objectKey,At=Be[`${D}_${W.layerType}`];if(!At)return[];let Bt=ct.match(/^(.*)-transition$/);if(D==="paint"&&Bt&&At[Bt[1]]&&At[Bt[1]].transition)return ve({key:J,value:Ge,valueSpec:Be.transition,style:Ee,styleSpec:Be});let ar=W.valueSpec||At[ct];if(!ar)return[new ue(J,Ge,`unknown property "${ct}"`)];let Sr;if(Ys(Ge)==="string"&&Ql(ar)&&!ar.tokens&&(Sr=/^{([^}]+)}$/.exec(Ge)))return[new ue(J,Ge,`"${ct}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Sr[1])} }\`.`)];let zr=[];return W.layerType==="symbol"&&(ct==="text-field"&&Ee&&!Ee.glyphs&&zr.push(new ue(J,Ge,'use of "text-field" requires a style "glyphs" property')),ct==="text-font"&&kf(_u(Ge))&&sl(Ge.type)==="identity"&&zr.push(new ue(J,Ge,'"text-font" does not support identity functions'))),zr.concat(ve({key:W.key,value:Ge,valueSpec:ar,style:Ee,styleSpec:Be,expressionContext:"property",propertyType:D,propertyKey:ct}))}function Lf(W){return Kc(W,"paint")}function iu(W){return Kc(W,"layout")}function Vf(W){let D=[],J=W.value,ve=W.key,Ee=W.style,Be=W.styleSpec;J.type||J.ref||D.push(new ue(ve,J,'either "type" or "ref" is required'));let Ge=sl(J.type),ct=sl(J.ref);if(J.id){let At=sl(J.id);for(let Bt=0;Bt<W.arrayIndex;Bt++){let ar=Ee.layers[Bt];sl(ar.id)===At&&D.push(new ue(ve,J.id,`duplicate layer id "${J.id}", previously used at line ${ar.id.__line__}`))}}if("ref"in J){let At;["type","source","source-layer","filter","layout"].forEach(Bt=>{Bt in J&&D.push(new ue(ve,J[Bt],`"${Bt}" is prohibited for ref layers`))}),Ee.layers.forEach(Bt=>{sl(Bt.id)===ct&&(At=Bt)}),At?At.ref?D.push(new ue(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):D.push(new ue(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Bt=At&&sl(At.type);At?Bt==="vector"&&Ge==="raster"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a raster source`)):Bt!=="raster-dem"&&Ge==="hillshade"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Bt==="raster"&&Ge!=="raster"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a vector source`)):Bt!=="vector"||J["source-layer"]?Bt==="raster-dem"&&Ge!=="hillshade"?D.push(new ue(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Bt==="geojson"&&At.lineMetrics||D.push(new ue(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new ue(ve,J,`layer "${J.id}" must specify a "source-layer"`)):D.push(new ue(ve,J.source,`source "${J.source}" not found`))}else D.push(new ue(ve,J,'missing required property "source"'));return D=D.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":()=>[],type:()=>W.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Bt=>iu(ne({layerType:Ge},Bt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Bt=>Lf(ne({layerType:Ge},Bt))}})}})),D}function Xu(W){let D=W.value,J=W.key,ve=Ys(D);return ve!=="string"?[new ue(J,D,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:W,value:D}){if(Ys(D)==="string")return Xu({key:W,value:D});{let J=[];for(let ve in D)J.push(...Xu({key:`${W}.${ve}`,value:D[ve]}));return J}}};function gc(W){let D=W.value,J=W.key,ve=W.styleSpec,Ee=W.style,Be=W.validateSpec;if(!D.type)return[new ue(J,D,'"type" is required')];let Ge=sl(D.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:D,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:W.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Bt;let ar=(Bt=At.sourceName)!==null&&Bt!==void 0?Bt:"",Sr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Ys(Sr);if(Sr===void 0)return fa;if(ja!=="object")return fa.push(new ue("source_raster_dem",Sr,`object expected, ${ja} found`)),fa;let Ka=sl(Sr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Sr)!Ka&&Wi.includes(qi)?fa.push(new ue(qi,Sr[qi],`In "${ar}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?fa=fa.concat(At.validateSpec({key:qi,value:Sr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new ue(qi,Sr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:D,style:W.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:D,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),D.cluster)for(let At in D.clusterProperties){let[Bt,ar]=D.clusterProperties[At],Sr=typeof Bt=="string"?[Bt,["accumulated"],["get",At]]:Bt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Sr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:D,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:D,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new ue(J,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${J}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function ql(W){let D=W.value,J=W.styleSpec,ve=J.light,Ee=W.style,Be=[],Ge=Ys(D);if(D===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new ue("light",D,`object expected, ${Ge} found`)]),Be;for(let ct in D){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?W.validateSpec({key:ct,value:D[ct],valueSpec:J.transition,validateSpec:W.validateSpec,style:Ee,styleSpec:J}):ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],validateSpec:W.validateSpec,style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)])}return Be}function xu(W){let D=W.value,J=W.styleSpec,ve=J.sky,Ee=W.style,Be=Ys(D);if(D===void 0)return[];if(Be!=="object")return[new ue("sky",D,`object expected, ${Be} found`)];let Ge=[];for(let ct in D)Ge=Ge.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Ge}function Lc(W){let D=W.value,J=W.styleSpec,ve=J.terrain,Ee=W.style,Be=[],Ge=Ys(D);if(D===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new ue("terrain",D,`object expected, ${Ge} found`)]),Be;for(let ct in D)Be=Be.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],validateSpec:W.validateSpec,style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Be}function Jc(W){let D=[],J=W.value,ve=W.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&D.push(new ue(ve,J,`all the sprites' ids must be unique, but ${J[Ge].id} is duplicated`)),Ee.push(J[Ge].id),J[Ge].url&&Be.includes(J[Ge].url)&&D.push(new ue(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),D=D.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:W.validateSpec}));return D}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(W){let D=W.value,J=W.key,ve=Ys(D);return ve!=="boolean"?[new ue(J,D,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(W){let D=W.key,J=W.value,ve=Ys(J);return ve!=="string"?[new ue(D,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new ue(D,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:ql,sky:xu,terrain:Lc,projection:function(W){let D=W.value,J=W.styleSpec,ve=J.projection,Ee=W.style,Be=Ys(D);if(D===void 0)return[];if(Be!=="object")return[new ue("projection",D,`object expected, ${Be} found`)];let Ge=[];for(let ct in D)Ge=Ge.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(W){return Xu(W).length===0?[]:kc(W)},resolvedImage:function(W){return Xu(W).length===0?[]:kc(W)},padding:function(W){let D=W.key,J=W.value;if(Ys(J)==="array"){if(J.length<1||J.length>4)return[new ue(D,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be<J.length;Be++)Ee=Ee.concat(W.validateSpec({key:`${D}[${Be}]`,value:J[Be],validateSpec:W.validateSpec,valueSpec:ve}));return Ee}return hl({key:D,value:J,valueSpec:{}})},variableAnchorOffsetCollection:function(W){let D=W.key,J=W.value,ve=Ys(J),Ee=W.styleSpec;if(ve!=="array"||J.length<1||J.length%2!=0)return[new ue(D,J,"variableAnchorOffsetCollection requires a non-empty array of even length")];let Be=[];for(let Ge=0;Ge<J.length;Ge+=2)Be=Be.concat(Hu({key:`${D}[${Ge}]`,value:J[Ge],valueSpec:Ee.layout_symbol["text-anchor"]})),Be=Be.concat(Cf({key:`${D}[${Ge+1}]`,value:J[Ge+1],valueSpec:{length:2,value:"number"},validateSpec:W.validateSpec,style:W.style,styleSpec:Ee}));return Be},sprite:Jc};function Pc(W){let D=W.value,J=W.valueSpec,ve=W.styleSpec;return W.validateSpec=Pc,J.expression&&kf(sl(D))?uf(W):J.expression&&Mc(_u(D))?kc(W):J.type&&sc[J.type]?sc[J.type](W):Pu(ne({},W,{valueSpec:J.type?ve[J.type]:J}))}function Qt(W){let D=W.value,J=W.key,ve=Xu(W);return ve.length||(D.indexOf("{fontstack}")===-1&&ve.push(new ue(J,D,'"glyphs" url must include a "{fontstack}" token')),D.indexOf("{range}")===-1&&ve.push(new ue(J,D,'"glyphs" url must include a "{range}" token'))),ve}function br(W,D=re){let J=[];return J=J.concat(Pc({key:"",value:W,valueSpec:D.$root,styleSpec:D,style:W,validateSpec:Pc,objectElementValidators:{glyphs:Qt,"*":()=>[]}})),W.constants&&(J=J.concat(mf({key:"constants",value:W.constants,style:W,styleSpec:D,validateSpec:Pc}))),$r(J)}function aa(W){return function(D){return W(ps(To({},D),{validateSpec:Pc}))}}function $r(W){return[].concat(W).sort((D,J)=>D.line-J.line)}function ka(W){return function(...D){return $r(W.apply(this,D))}}br.source=ka(aa(gc)),br.sprite=ka(aa(Jc)),br.glyphs=ka(aa(Qt)),br.light=ka(aa(ql)),br.sky=ka(aa(xu)),br.terrain=ka(aa(Lc)),br.layer=ka(aa(Vf)),br.filter=ka(aa(gf)),br.paintProperty=ka(aa(Lf)),br.layoutProperty=ka(aa(iu));let li=br,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(W,D){let J=!1;if(D&&D.length)for(let ve of D)W.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(D,J,ve){let Ee=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Ge=new Int32Array(this.arrayBuffer);D=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At<this.d*this.d;At++){let Bt=Ge[3+At],ar=Ge[3+At+1];Ee.push(Bt===ar?null:Ge.subarray(Bt,ar))}let ct=Ge[3+Ee.length+1];this.keys=Ge.subarray(Ge[3+Ee.length],ct),this.bboxes=Ge.subarray(ct),this.insert=this._insertReadonly}else{this.d=J+2*ve;for(let Ge=0;Ge<this.d*this.d;Ge++)Ee.push([]);this.keys=[],this.bboxes=[]}this.n=J,this.extent=D,this.padding=ve,this.scale=J/D,this.uid=0;let Be=ve/J*D;this.min=-Be,this.max=D+Be}insert(D,J,ve,Ee,Be){this._forEachCell(J,ve,Ee,Be,this._insertCell,this.uid++,void 0,void 0),this.keys.push(D),this.bboxes.push(J),this.bboxes.push(ve),this.bboxes.push(Ee),this.bboxes.push(Be)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(D,J,ve,Ee,Be,Ge){this.cells[Be].push(Ge)}query(D,J,ve,Ee,Be){let Ge=this.min,ct=this.max;if(D<=Ge&&J<=Ge&&ct<=ve&&ct<=Ee&&!Be)return Array.prototype.slice.call(this.keys);{let At=[];return this._forEachCell(D,J,ve,Ee,this._queryCell,At,{},Be),At}}_queryCell(D,J,ve,Ee,Be,Ge,ct,At){let Bt=this.cells[Be];if(Bt!==null){let ar=this.keys,Sr=this.bboxes;for(let zr=0;zr<Bt.length;zr++){let Wr=Bt[zr];if(ct[Wr]===void 0){let ia=4*Wr;(At?At(Sr[ia+0],Sr[ia+1],Sr[ia+2],Sr[ia+3]):D<=Sr[ia+2]&&J<=Sr[ia+3]&&ve>=Sr[ia+0]&&Ee>=Sr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(D,J,ve,Ee,Be,Ge,ct,At){let Bt=this._convertToCellCoord(D),ar=this._convertToCellCoord(J),Sr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Bt;Wr<=Sr;Wr++)for(let ia=ar;ia<=zr;ia++){let fa=this.d*ia+Wr;if((!At||At(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&Be.call(this,D,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge<this.cells.length;Ge++)ve+=this.cells[Ge].length;let Ee=new Int32Array(J+ve+this.keys.length+this.bboxes.length);Ee[0]=this.extent,Ee[1]=this.n,Ee[2]=this.padding;let Be=J;for(let Ge=0;Ge<D.length;Ge++){let ct=D[Ge];Ee[3+Ge]=Be,Ee.set(ct,Be),Be+=ct.length}return Ee[3+D.length]=Be,Ee.set(this.keys,Be),Be+=this.keys.length,Ee[3+D.length+1]=Be,Ee.set(this.bboxes,Be),Be+=this.bboxes.length,Ee.buffer}static serialize(D,J){let ve=D.toArrayBuffer();return J&&J.push(ve),{buffer:ve}}static deserialize(D){return new Di(D.buffer)}}let Ni={};function mi(W,D,J={}){if(Ni[W])throw new Error(`${W} is already registered.`);Object.defineProperty(D,"_classRegistryKey",{value:W,writeable:!1}),Ni[W]={klass:D,omit:J.omit||[],shallow:J.shallow||[]}}mi("Object",Object),mi("TransferableGridIndex",Di),mi("Color",Jt),mi("Error",Error),mi("AJAXError",de),mi("ResolvedImage",Za),mi("StylePropertyFunction",El),mi("StyleExpression",Lu,{omit:["_evaluator"]}),mi("ZoomDependentExpression",yu),mi("ZoomConstantExpression",vc),mi("CompoundExpression",$l,{omit:["_evaluate"]});for(let W in nf)nf[W]._classRegistryKey||mi(`Expression_${W}`,nf[W]);function Sn(W){return W&&typeof ArrayBuffer<"u"&&(W instanceof ArrayBuffer||W.constructor&&W.constructor.name==="ArrayBuffer")}function $n(W){return W.$name||W.constructor._classRegistryKey}function no(W){return!function(D){if(D===null||typeof D!="object")return!1;let J=$n(D);return!(!J||J==="Object")}(W)&&(W==null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||W instanceof Boolean||W instanceof Number||W instanceof String||W instanceof Date||W instanceof RegExp||W instanceof Blob||W instanceof Error||Sn(W)||F(W)||ArrayBuffer.isView(W)||W instanceof ImageData)}function Qn(W,D){if(no(W))return(Sn(W)||F(W))&&D&&D.push(W),ArrayBuffer.isView(W)&&D&&D.push(W.buffer),W instanceof ImageData&&D&&D.push(W.data.buffer),W;if(Array.isArray(W)){let Be=[];for(let Ge of W)Be.push(Qn(Ge,D));return Be}if(typeof W!="object")throw new Error("can't serialize object of type "+typeof W);let J=$n(W);if(!J)throw new Error(`can't serialize object of unregistered class ${W.constructor.name}`);if(!Ni[J])throw new Error(`${J} is not registered.`);let{klass:ve}=Ni[J],Ee=ve.serialize?ve.serialize(W,D):{};if(ve.serialize){if(D&&Ee===D[D.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let Be in W){if(!W.hasOwnProperty(Be)||Ni[J].omit.indexOf(Be)>=0)continue;let Ge=W[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:Qn(Ge,D)}W instanceof Error&&(Ee.message=W.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(W){if(no(W))return W;if(Array.isArray(W))return W.map(co);if(typeof W!="object")throw new Error("can't deserialize object of type "+typeof W);let D=$n(W)||"Object";if(!Ni[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:J}=Ni[D];if(!J)throw new Error(`can't deserialize unregistered class ${D}`);if(J.deserialize)return J.deserialize(W);let ve=Object.create(J.prototype);for(let Ee of Object.keys(W)){if(Ee==="$name")continue;let Be=W[Ee];ve[Ee]=Ni[D].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class Tn{constructor(){this.first=!0}update(D,J){let ve=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoom<ve&&(this.lastIntegerZoom=ve,this.lastIntegerZoomTime=J),D!==this.lastZoom&&(this.lastZoom=D,this.lastFloorZoom=ve,!0))}}let un={"Latin-1 Supplement":W=>W>=128&&W<=255,"Hangul Jamo":W=>W>=4352&&W<=4607,Khmer:W=>W>=6016&&W<=6143,"General Punctuation":W=>W>=8192&&W<=8303,"Letterlike Symbols":W=>W>=8448&&W<=8527,"Number Forms":W=>W>=8528&&W<=8591,"Miscellaneous Technical":W=>W>=8960&&W<=9215,"Control Pictures":W=>W>=9216&&W<=9279,"Optical Character Recognition":W=>W>=9280&&W<=9311,"Enclosed Alphanumerics":W=>W>=9312&&W<=9471,"Geometric Shapes":W=>W>=9632&&W<=9727,"Miscellaneous Symbols":W=>W>=9728&&W<=9983,"Miscellaneous Symbols and Arrows":W=>W>=11008&&W<=11263,"Ideographic Description Characters":W=>W>=12272&&W<=12287,"CJK Symbols and Punctuation":W=>W>=12288&&W<=12351,Katakana:W=>W>=12448&&W<=12543,Kanbun:W=>W>=12688&&W<=12703,"CJK Strokes":W=>W>=12736&&W<=12783,"Enclosed CJK Letters and Months":W=>W>=12800&&W<=13055,"CJK Compatibility":W=>W>=13056&&W<=13311,"Yijing Hexagram Symbols":W=>W>=19904&&W<=19967,"Private Use Area":W=>W>=57344&&W<=63743,"Vertical Forms":W=>W>=65040&&W<=65055,"CJK Compatibility Forms":W=>W>=65072&&W<=65103,"Small Form Variants":W=>W>=65104&&W<=65135,"Halfwidth and Fullwidth Forms":W=>W>=65280&&W<=65519};function go(W){for(let D of W)if(ws(D.charCodeAt(0)))return!0;return!1}function Ko(W){for(let D of W)if(!Ns(D.charCodeAt(0)))return!1;return!0}function Ms(W){let D=W.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(D.join("|"),"u")}let rl=Ms(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(W){return!rl.test(String.fromCodePoint(W))}let el=Ms(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ws(W){return!(W!==746&&W!==747&&(W<4352||!(un["CJK Compatibility Forms"](W)&&!(W>=65097&&W<=65103)||un["CJK Compatibility"](W)||un["CJK Strokes"](W)||!(!un["CJK Symbols and Punctuation"](W)||W>=12296&&W<=12305||W>=12308&&W<=12319||W===12336)||un["Enclosed CJK Letters and Months"](W)||un["Ideographic Description Characters"](W)||un.Kanbun(W)||un.Katakana(W)&&W!==12540||!(!un["Halfwidth and Fullwidth Forms"](W)||W===65288||W===65289||W===65293||W>=65306&&W<=65310||W===65339||W===65341||W===65343||W>=65371&&W<=65503||W===65507||W>=65512&&W<=65519)||!(!un["Small Form Variants"](W)||W>=65112&&W<=65118||W>=65123&&W<=65126)||un["Vertical Forms"](W)||un["Yijing Hexagram Symbols"](W)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(W))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(W))||el.test(String.fromCodePoint(W)))))}function Fl(W){return!(ws(W)||function(D){return!!(un["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||un["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||un["Letterlike Symbols"](D)||un["Number Forms"](D)||un["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||un["Control Pictures"](D)&&D!==9251||un["Optical Character Recognition"](D)||un["Enclosed Alphanumerics"](D)||un["Geometric Shapes"](D)||un["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||un["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||un["CJK Symbols and Punctuation"](D)||un.Katakana(D)||un["Private Use Area"](D)||un["CJK Compatibility Forms"](D)||un["Small Form Variants"](D)||un["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(W))}let _l=Ms(["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 ll(W){return _l.test(String.fromCodePoint(W))}function jn(W,D){return!(!D&&ll(W)||W>=2304&&W<=3583||W>=3840&&W<=4255||un.Khmer(W))}function Io(W){for(let D of W)if(ll(D.charCodeAt(0)))return!0;return!1}let Js=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(W){this.pluginStatus=W.pluginStatus,this.pluginURL=W.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(W){this.applyArabicShaping=W.applyArabicShaping,this.processBidirectionalText=W.processBidirectionalText,this.processStyledBidirectionalText=W.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ds{constructor(D,J){this.zoom=D,J?(this.now=J.now,this.fadeDuration=J.fadeDuration,this.zoomHistory=J.zoomHistory,this.transition=J.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Tn,this.transition={})}isSupportedScript(D){return function(J,ve){for(let Ee of J)if(!jn(Ee.charCodeAt(0),ve))return!1;return!0}(D,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,J=D-Math.floor(D),ve=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class uu{constructor(D,J){this.property=D,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new El(ve,Ee);if(Mc(ve)){let Be=Tu(ve,Ee);if(Be.result==="error")throw new Error(Be.value.map(Ge=>`${Ge.key}: ${Ge.message}`).join(", "));return Be.value}{let Be=ve;return Ee.type==="color"&&typeof ve=="string"?Be=Jt.parse(ve):Ee.type!=="padding"||typeof ve!="number"&&!Array.isArray(ve)?Ee.type==="variableAnchorOffsetCollection"&&Array.isArray(ve)&&(Be=$a.parse(ve)):Be=ca.parse(ve),{kind:"constant",evaluate:()=>Be}}}(J===void 0?D.specification.default:J,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,J,ve){return this.property.possiblyEvaluate(this,D,J,ve)}}class Iu{constructor(D){this.property=D,this.value=new uu(D,void 0)}transitioned(D,J){return new Ic(this.property,this.value,J,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return u(this._values[D].value.value)}setValue(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].value=new uu(this._values[D].property,J===null?void 0:u(J))}getTransition(D){return u(this._values[D].transition)}setTransition(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].transition=u(J)||void 0}serialize(){let D={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(D[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(D[`${J}-transition`]=Ee)}return D}transitioned(D,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(D,J._values[Ee]);return ve}untransitioned(){let D=new bu(this._properties);for(let J of Object.keys(this._values))D._values[J]=this._values[J].untransitioned();return D}}class Ic{constructor(D,J,ve,Ee,Be){this.property=D,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,D.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(D,J,ve){let Ee=D.now||0,Be=this.value.possiblyEvaluate(D,J,ve),Ge=this.prior;if(Ge){if(Ee>this.end)return this.prior=null,Be;if(this.value.isDataDriven())return this.prior=null,Be;if(Ee<this.begin)return Ge.possiblyEvaluate(D,J,ve);{let ct=(Ee-this.begin)/(this.end-this.begin);return this.property.interpolate(Ge.possiblyEvaluate(D,J,ve),Be,function(At){if(At<=0)return 0;if(At>=1)return 1;let Bt=At*At,ar=Bt*At;return 4*(At<.5?ar:3*(At-Bt)+ar-.75)}(ct))}}return Be}}class bu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(D,J,ve);return Ee}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Rc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return u(this._values[D].value)}setValue(D,J){this._values[D]=new uu(this._values[D].property,J===null?void 0:u(J))}serialize(){let D={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(D[J]=ve)}return D}possiblyEvaluate(D,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(D,J,ve);return Ee}}class Au{constructor(D,J,ve){this.property=D,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,D,J,ve,Ee)}}class yc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class fo{constructor(D){this.specification=D}possiblyEvaluate(D,J){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(J)}interpolate(D,J,ve){let Ee=Bn[this.specification.type];return Ee?Ee(D,J,ve):D}}class zo{constructor(D,J){this.specification=D,this.overrides=J}possiblyEvaluate(D,J,ve,Ee){return new Au(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(J,null,{},ve,Ee)}:D.expression,J)}interpolate(D,J,ve){if(D.value.kind!=="constant"||J.value.kind!=="constant")return D;if(D.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},D.parameters);let Ee=Bn[this.specification.type];if(Ee){let Be=Ee(D.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},D.parameters)}return D}evaluate(D,J,ve,Ee,Be,Ge){return D.kind==="constant"?D.value:D.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends zo{possiblyEvaluate(D,J,ve,Ee){if(D.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(D.expression.kind==="constant"){let Be=D.expression.evaluate(J,null,{},ve,Ee),Ge=D.property.specification.type==="resolvedImage"&&typeof Be!="string"?Be.name:Be,ct=this._calculate(Ge,Ge,Ge,J);return new Au(this,{kind:"constant",value:ct},J)}if(D.expression.kind==="camera"){let Be=this._calculate(D.expression.evaluate({zoom:J.zoom-1}),D.expression.evaluate({zoom:J.zoom}),D.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,D.expression,J)}evaluate(D,J,ve,Ee,Be,Ge){if(D.kind==="source"){let ct=D.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),D.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),D.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):D.value}_calculate(D,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:ve,to:J}}interpolate(D){return D}}class lc{constructor(D){this.specification=D}possiblyEvaluate(D,J,ve,Ee){if(D.value!==void 0){if(D.expression.kind==="constant"){let Be=D.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(D.expression.evaluate(new Ds(Math.floor(J.zoom-1),J)),D.expression.evaluate(new Ds(Math.floor(J.zoom),J)),D.expression.evaluate(new Ds(Math.floor(J.zoom+1),J)),J)}}_calculate(D,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:ve,to:J}}interpolate(D){return D}}class Yu{constructor(D){this.specification=D}possiblyEvaluate(D,J,ve,Ee){return!!D.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Fe{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in D){let ve=D[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new uu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",zo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends Q{constructor(D,J){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in D.paint)this.setPaintProperty(ve,D.paint[ve],{validate:!1});for(let ve in D.layout)this.setLayoutProperty(ve,D.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${D}`,D,J,ve)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,J):this.visibility=J)}getPaintProperty(D){return D.endsWith(I)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${D}`,D,J,ve))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[D],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(D,J),this._handleSpecialPaintPropertyUpdate(D);let At=this._transitionablePaint._values[D].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(D,ct,At)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,J,ve){return!1}isHidden(D){return!!(this.minzoom&&D<this.minzoom)||!!(this.maxzoom&&D>=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,J){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,J)}serialize(){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:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),p(D,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(D,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,D.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let J=this.paint.get(D);if(J instanceof Au&&Ql(J.property.specification)&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1}}let Te={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Me{constructor(D,J){this._structArray=D,this._pos1=J*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ze{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,J){return D._trim(),J&&(D.isTransferred=!0,J.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let J=Object.create(this.prototype);return J.arrayBuffer=D.arrayBuffer,J.length=D.length,J.capacity=D.arrayBuffer.byteLength/J.bytesPerElement,J._refreshViews(),J}_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(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let J=this.uint8;this._refreshViews(),J&&this.uint8.set(J)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ht(W,D=1){let J=0,ve=0;return{members:W.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(D,Be)),ct=Ee.components||1;return ve=Math.max(ve,Be),J+=Be*ct,{name:Ee.name,type:Ee.type,components:ct,offset:Ge}}),size:wt(J,Math.max(ve,D)),alignment:D}}function wt(W,D){return Math.ceil(W/D)*D}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,D}}Ot.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Ot);class $t extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,D}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,D,J,ve,Ee)}emplace(D,J,ve,Ee,Be){let Ge=4*D;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,D}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Ar extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=6*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,D}}Ar.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Ar);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=4*D,Bt=8*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Bt+4]=Ee,this.uint8[Bt+5]=Be,this.uint8[Bt+6]=Ge,this.uint8[Bt+7]=ct,D}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,D}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class Ve extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=this.length;return this.resize(Sr+1),this.emplace(Sr,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr){let zr=10*D;return this.uint16[zr+0]=J,this.uint16[zr+1]=ve,this.uint16[zr+2]=Ee,this.uint16[zr+3]=Be,this.uint16[zr+4]=Ge,this.uint16[zr+5]=ct,this.uint16[zr+6]=At,this.uint16[zr+7]=Bt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Sr,D}}Ve.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",Ve);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr){let ia=12*D;return this.int16[ia+0]=J,this.int16[ia+1]=ve,this.int16[ia+2]=Ee,this.int16[ia+3]=Be,this.uint16[ia+4]=Ge,this.uint16[ia+5]=ct,this.uint16[ia+6]=At,this.uint16[ia+7]=Bt,this.int16[ia+8]=ar,this.int16[ia+9]=Sr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,D}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,D}}ot.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",ot);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint32[1*D+0]=J,D}}pt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",pt);class Et extends ze{_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(D,J,ve,Ee,Be,Ge,ct,At,Bt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,D,J,ve,Ee,Be,Ge,ct,At,Bt)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=10*D,zr=5*D;return this.int16[Sr+0]=J,this.int16[Sr+1]=ve,this.int16[Sr+2]=Ee,this.int16[Sr+3]=Be,this.int16[Sr+4]=Ge,this.int16[Sr+5]=ct,this.uint32[zr+3]=At,this.uint16[Sr+8]=Bt,this.uint16[Sr+9]=ar,D}}Et.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Et);class bt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=6*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,D}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Rt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,D,J,ve,Ee,Be)}emplace(D,J,ve,Ee,Be,Ge){let ct=4*D,At=8*D;return this.float32[ct+0]=J,this.float32[ct+1]=ve,this.float32[ct+2]=Ee,this.int16[At+6]=Be,this.int16[At+7]=Ge,D}}Rt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Rt);class lr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=16*D,Bt=4*D,ar=8*D;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Bt+1]=Ee,this.float32[Bt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,D}}lr.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",lr);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,D}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class kr extends ze{_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(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*D,qi=12*D,en=48*D;return this.int16[gi+0]=J,this.int16[gi+1]=ve,this.uint16[gi+2]=Ee,this.uint16[gi+3]=Be,this.uint32[qi+2]=Ge,this.uint32[qi+3]=ct,this.uint32[qi+4]=At,this.uint16[gi+10]=Bt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Sr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=fa,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,D}}kr.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",kr);class jr extends ze{_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(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo,Bo){let bn=32*D,ls=16*D;return this.int16[bn+0]=J,this.int16[bn+1]=ve,this.int16[bn+2]=Ee,this.int16[bn+3]=Be,this.int16[bn+4]=Ge,this.int16[bn+5]=ct,this.int16[bn+6]=At,this.int16[bn+7]=Bt,this.uint16[bn+8]=ar,this.uint16[bn+9]=Sr,this.uint16[bn+10]=zr,this.uint16[bn+11]=Wr,this.uint16[bn+12]=ia,this.uint16[bn+13]=fa,this.uint16[bn+14]=ja,this.uint16[bn+15]=Ka,this.uint16[bn+16]=Wi,this.uint16[bn+17]=gi,this.uint16[bn+18]=qi,this.uint16[bn+19]=en,this.uint16[bn+20]=qn,this.uint16[bn+21]=ko,this.uint16[bn+22]=ys,this.uint32[ls+12]=vo,this.float32[ls+13]=zn,this.float32[ls+14]=rs,this.uint16[bn+30]=jo,this.uint16[bn+31]=Bo,D}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.float32[1*D+0]=J,D}}Qr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",Qr);class ha extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.uint16[6*D+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,D}}ha.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",ha);class Aa extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=4*D;return this.uint32[2*D+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,D}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class Da extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,D}}Da.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Da);class ci extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint16[1*D+0]=J,D}}ci.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",ci);class Vi extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,D,J,ve,Ee)}emplace(D,J,ve,Ee,Be){let Ge=4*D;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,D}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Me{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 n(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class on extends Et{get(D){return new ji(this,D)}}mi("CollisionBoxArray",on);class An extends Me{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(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}An.prototype.size=48;class Yn extends kr{get(D){return new An(this,D)}}mi("PlacedSymbolArray",Yn);class Nn extends Me{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(D){this._structArray.uint32[this._pos4+12]=D}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]}}Nn.prototype.size=64;class wo extends jr{get(D){return new Nn(this,D)}}mi("SymbolInstanceArray",wo);class os extends Qr{getoffsetX(D){return this.float32[1*D+0]}}mi("GlyphOffsetArray",os);class So extends $t{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}mi("SymbolLineVertexArray",So);class Zo extends Me{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]}}Zo.prototype.size=12;class hs extends ha{get(D){return new Zo(this,D)}}mi("TextAnchorOffsetArray",hs);class ul extends Me{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]}}ul.prototype.size=8;class tl extends Aa{get(D){return new ul(this,D)}}mi("FeatureIndexArray",tl);class Jo extends Ot{}class $o extends Ot{}class Il extends Ot{}class eu extends Ar{}class Ru extends Kr{}class vu extends na{}class Tl extends Ve{}class cu extends $e{}class uc extends ot{}class Vl extends pt{}class Gl extends bt{}class me extends lr{}class De extends yr{}class et extends Da{}let dt=ht([{name:"a_pos",components:2,type:"Int16"}],4),{members:yt}=dt;class Tt{constructor(D=[]){this.segments=D}prepareSegment(D,J,ve,Ee){let Be=this.segments[this.segments.length-1];return D>Tt.MAX_VERTEX_ARRAY_LENGTH&&m(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Be||Be.vertexLength+D>Tt.MAX_VERTEX_ARRAY_LENGTH||Be.sortKey!==Ee)&&(Be={vertexOffset:J.length,primitiveOffset:ve.length,vertexLength:0,primitiveLength:0},Ee!==void 0&&(Be.sortKey=Ee),this.segments.push(Be)),Be}get(){return this.segments}destroy(){for(let D of this.segments)for(let J in D.vaos)D.vaos[J].destroy()}static simpleSegment(D,J,ve,Ee){return new Tt([{vertexOffset:D,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(W,D){return 256*(W=w(Math.floor(W),0,255))+w(Math.floor(D),0,255)}Tt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Tt);let zt=ht([{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"}]);var _r={exports:{}},Gr={exports:{}};Gr.exports=function(W,D){var J,ve,Ee,Be,Ge,ct,At,Bt;for(ve=W.length-(J=3&W.length),Ee=D,Ge=3432918353,ct=461845907,Bt=0;Bt<ve;)At=255&W.charCodeAt(Bt)|(255&W.charCodeAt(++Bt))<<8|(255&W.charCodeAt(++Bt))<<16|(255&W.charCodeAt(++Bt))<<24,++Bt,Ee=27492+(65535&(Be=5*(65535&(Ee=(Ee^=At=(65535&(At=(At=(65535&At)*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295)<<13|Ee>>>19))+((5*(Ee>>>16)&65535)<<16)&4294967295))+((58964+(Be>>>16)&65535)<<16);switch(At=0,J){case 3:At^=(255&W.charCodeAt(Bt+2))<<16;case 2:At^=(255&W.charCodeAt(Bt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&W.charCodeAt(Bt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=W.length,Ee=2246822507*(65535&(Ee^=Ee>>>16))+((2246822507*(Ee>>>16)&65535)<<16)&4294967295,Ee=3266489909*(65535&(Ee^=Ee>>>13))+((3266489909*(Ee>>>16)&65535)<<16)&4294967295,(Ee^=Ee>>>16)>>>0};var Xr=Gr.exports,xa={exports:{}};xa.exports=function(W,D){for(var J,ve=W.length,Ee=D^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&W.charCodeAt(Be)|(255&W.charCodeAt(++Be))<<8|(255&W.charCodeAt(++Be))<<16|(255&W.charCodeAt(++Be))<<24))+((1540483477*(J>>>16)&65535)<<16),Ee=1540483477*(65535&Ee)+((1540483477*(Ee>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),ve-=4,++Be;switch(ve){case 3:Ee^=(255&W.charCodeAt(Be+2))<<16;case 2:Ee^=(255&W.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&W.charCodeAt(Be)))+((1540483477*(Ee>>>16)&65535)<<16)}return Ee=1540483477*(65535&(Ee^=Ee>>>13))+((1540483477*(Ee>>>16)&65535)<<16),(Ee^=Ee>>>15)>>>0};var pa=Xr,Ja=xa.exports;_r.exports=pa,_r.exports.murmur3=pa,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,J,ve,Ee){this.ids.push(za(D)),this.positions.push(J,ve,Ee)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(D),ve=0,Ee=this.ids.length-1;for(;ve<Ee;){let Ge=ve+Ee>>1;this.ids[Ge]>=J?Ee=Ge:ve=Ge+1}let Be=[];for(;this.ids[ve]===J;)Be.push({index:this.positions[3*ve],start:this.positions[3*ve+1],end:this.positions[3*ve+2]}),ve++;return Be}static serialize(D,J){let ve=new Float64Array(D.ids),Ee=new Uint32Array(D.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(D){let J=new Sa;return J.ids=D.ids,J.positions=D.positions,J.indexed=!0,J}}function za(W){let D=+W;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:ti(String(W))}function Xa(W,D,J,ve){for(;J<ve;){let Ee=W[J+ve>>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(W[Be]<Ee);do Ge--;while(W[Ge]>Ee);if(Be>=Ge)break;fi(W,Be,Ge),fi(D,3*Be,3*Ge),fi(D,3*Be+1,3*Ge+1),fi(D,3*Be+2,3*Ge+2)}Ge-J<ve-Ge?(Xa(W,D,J,Ge),J=Ge+1):(Xa(W,D,Ge+1,ve),ve=Ge)}}function fi(W,D,J){let ve=W[D];W[D]=W[J],W[J]=ve}mi("FeaturePositionMap",Sa);class ni{constructor(D,J){this.gl=D.gl,this.location=J}}class La extends ni{constructor(D,J){super(D,J),this.current=0}set(D){this.current!==D&&(this.current=D,this.gl.uniform1f(this.location,D))}}class sn extends ni{constructor(D,J){super(D,J),this.current=[0,0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]&&D[3]===this.current[3]||(this.current=D,this.gl.uniform4f(this.location,D[0],D[1],D[2],D[3]))}}class rn extends ni{constructor(D,J){super(D,J),this.current=Jt.transparent}set(D){D.r===this.current.r&&D.g===this.current.g&&D.b===this.current.b&&D.a===this.current.a||(this.current=D,this.gl.uniform4f(this.location,D.r,D.g,D.b,D.a))}}let dn=new Float32Array(16);function In(W){return[tr(255*W.r,255*W.g),tr(255*W.b,255*W.a)]}class Kn{constructor(D,J,ve){this.value=D,this.uniformNames=J.map(Ee=>`u_${Ee}`),this.type=ve}setUniform(D,J,ve){D.set(ve.constantOr(this.value))}getBinding(D,J,ve){return this.type==="color"?new rn(D,J):new La(D,J)}}class ro{constructor(D,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=D.tlbr}setUniform(D,J,ve,Ee){let Be=Ee==="u_pattern_to"?this.patternTo:Ee==="u_pattern_from"?this.patternFrom:Ee==="u_pixel_ratio_to"?this.pixelRatioTo:Ee==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Be&&D.set(Be)}getBinding(D,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(D,J):new La(D,J)}}class Yo{constructor(D,J,ve,Ee){this.expression=D,this.type=ve,this.maxValue=0,this.paintVertexAttributes=J.map(Be=>({name:`a_${Be}`,type:"Float32",components:ve==="color"?2:1,offset:0})),this.paintVertexArray=new Ee}populatePaintArray(D,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Ds(0),J,{},Ee,[],Be);this.paintVertexArray.resize(D),this._setPaintValue(Ge,D,ct)}updatePaintArray(D,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(D,J,Be)}_setPaintValue(D,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=D;Be<J;Be++)this.paintVertexArray.emplace(Be,Ee[0],Ee[1])}else{for(let Ee=D;Ee<J;Ee++)this.paintVertexArray.emplace(Ee,ve);this.maxValue=Math.max(this.maxValue,Math.abs(ve))}}upload(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class oo{constructor(D,J,ve,Ee,Be,Ge){this.expression=D,this.uniformNames=J.map(ct=>`u_${ct}_t`),this.type=ve,this.useIntegerZoom=Ee,this.zoom=Be,this.maxValue=0,this.paintVertexAttributes=J.map(ct=>({name:`a_${ct}`,type:"Float32",components:ve==="color"?4:2,offset:0})),this.paintVertexArray=new Ge}populatePaintArray(D,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Ds(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Ds(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(At,D,Ge,ct)}updatePaintArray(D,J,ve,Ee){let Be=this.expression.evaluate({zoom:this.zoom},ve,Ee),Ge=this.expression.evaluate({zoom:this.zoom+1},ve,Ee);this._setPaintValue(D,J,Be,Ge)}_setPaintValue(D,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=D;ct<J;ct++)this.paintVertexArray.emplace(ct,Be[0],Be[1],Ge[0],Ge[1])}else{for(let Be=D;Be<J;Be++)this.paintVertexArray.emplace(Be,ve,Ee);this.maxValue=Math.max(this.maxValue,Math.abs(ve),Math.abs(Ee))}}upload(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(D,J){let ve=this.useIntegerZoom?Math.floor(J.zoom):J.zoom,Ee=w(this.expression.interpolationFactor(ve,this.zoom,this.zoom+1),0,1);D.set(Ee)}getBinding(D,J,ve){return new La(D,J)}}class Wo{constructor(D,J,ve,Ee,Be,Ge){this.expression=D,this.type=J,this.useIntegerZoom=ve,this.zoom=Ee,this.layerId=Ge,this.zoomInPaintVertexArray=new Be,this.zoomOutPaintVertexArray=new Be}populatePaintArray(D,J,ve){let Ee=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(D),this.zoomOutPaintVertexArray.resize(D),this._setPaintValues(Ee,D,J.patterns&&J.patterns[this.layerId],ve)}updatePaintArray(D,J,ve,Ee,Be){this._setPaintValues(D,J,ve.patterns&&ve.patterns[this.layerId],Be)}_setPaintValues(D,J,ve,Ee){if(!Ee||!ve)return;let{min:Be,mid:Ge,max:ct}=ve,At=Ee[Be],Bt=Ee[Ge],ar=Ee[ct];if(At&&Bt&&ar)for(let Sr=D;Sr<J;Sr++)this.zoomInPaintVertexArray.emplace(Sr,Bt.tl[0],Bt.tl[1],Bt.br[0],Bt.br[1],At.tl[0],At.tl[1],At.br[0],At.br[1],Bt.pixelRatio,At.pixelRatio),this.zoomOutPaintVertexArray.emplace(Sr,Bt.tl[0],Bt.tl[1],Bt.br[0],Bt.br[1],ar.tl[0],ar.tl[1],ar.br[0],ar.br[1],Bt.pixelRatio,ar.pixelRatio)}upload(D){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=D.createVertexBuffer(this.zoomInPaintVertexArray,zt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=D.createVertexBuffer(this.zoomOutPaintVertexArray,zt.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class cl{constructor(D,J,ve){this.binders={},this._buffers=[];let Ee=[];for(let Be in D.paint._values){if(!ve(Be))continue;let Ge=D.paint.get(Be);if(!(Ge instanceof Au&&Ql(Ge.property.specification)))continue;let ct=xl(Be,D.type),At=Ge.value,Bt=Ge.property.specification.type,ar=Ge.property.useIntegerZoom,Sr=Ge.property.specification["property-type"],zr=Sr==="cross-faded"||Sr==="cross-faded-data-driven";if(At.kind==="constant")this.binders[Be]=zr?new ro(At.value,ct):new Kn(At.value,ct,Bt),Ee.push(`/u_${Be}`);else if(At.kind==="source"||zr){let Wr=mn(Be,Bt,"source");this.binders[Be]=zr?new Wo(At,Bt,ar,J,Wr,D.id):new Yo(At,ct,Bt,Wr),Ee.push(`/a_${Be}`)}else{let Wr=mn(Be,Bt,"composite");this.binders[Be]=new oo(At,ct,Bt,ar,J,Wr),Ee.push(`/z_${Be}`)}}this.cacheKey=Ee.sort().join("")}getMaxValue(D){let J=this.binders[D];return J instanceof Yo||J instanceof oo?J.maxValue:0}populatePaintArrays(D,J,ve,Ee,Be){for(let Ge in this.binders){let ct=this.binders[Ge];(ct instanceof Yo||ct instanceof oo||ct instanceof Wo)&&ct.populatePaintArray(D,J,ve,Ee,Be)}}setConstantPatternPositions(D,J){for(let ve in this.binders){let Ee=this.binders[ve];Ee instanceof ro&&Ee.setConstantPatternPositions(D,J)}}updatePaintArrays(D,J,ve,Ee,Be){let Ge=!1;for(let ct in D){let At=J.getPositions(ct);for(let Bt of At){let ar=ve.feature(Bt.index);for(let Sr in this.binders){let zr=this.binders[Sr];if((zr instanceof Yo||zr instanceof oo||zr instanceof Wo)&&zr.expression.isStateDependent===!0){let Wr=Ee.paint.get(Sr);zr.expression=Wr.value,zr.updatePaintArray(Bt.start,Bt.end,ar,D[ct],Be),Ge=!0}}}}return Ge}defines(){let D=[];for(let J in this.binders){let ve=this.binders[J];(ve instanceof Kn||ve instanceof ro)&&D.push(...ve.uniformNames.map(Ee=>`#define HAS_UNIFORM_${Ee}`))}return D}getBinderAttributes(){let D=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof Yo||ve instanceof oo)for(let Ee=0;Ee<ve.paintVertexAttributes.length;Ee++)D.push(ve.paintVertexAttributes[Ee].name);else if(ve instanceof Wo)for(let Ee=0;Ee<zt.members.length;Ee++)D.push(zt.members[Ee].name)}return D}getBinderUniforms(){let D=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof Kn||ve instanceof ro||ve instanceof oo)for(let Ee of ve.uniformNames)D.push(Ee)}return D}getPaintVertexBuffers(){return this._buffers}getUniforms(D,J){let ve=[];for(let Ee in this.binders){let Be=this.binders[Ee];if(Be instanceof Kn||Be instanceof ro||Be instanceof oo){for(let Ge of Be.uniformNames)if(J[Ge]){let ct=Be.getBinding(D,J[Ge],Ge);ve.push({name:Ge,property:Ee,binding:ct})}}}return ve}setUniforms(D,J,ve,Ee){for(let{name:Be,property:Ge,binding:ct}of J)this.binders[Ge].setUniform(ct,Ee,ve.get(Ge),Be)}updatePaintBuffers(D){this._buffers=[];for(let J in this.binders){let ve=this.binders[J];if(D&&ve instanceof Wo){let Ee=D.fromScale===2?ve.zoomInPaintVertexBuffer:ve.zoomOutPaintVertexBuffer;Ee&&this._buffers.push(Ee)}else(ve instanceof Yo||ve instanceof oo)&&ve.paintVertexBuffer&&this._buffers.push(ve.paintVertexBuffer)}}upload(D){for(let J in this.binders){let ve=this.binders[J];(ve instanceof Yo||ve instanceof oo||ve instanceof Wo)&&ve.upload(D)}this.updatePaintBuffers()}destroy(){for(let D in this.binders){let J=this.binders[D];(J instanceof Yo||J instanceof oo||J instanceof Wo)&&J.destroy()}}}class al{constructor(D,J,ve=()=>!0){this.programConfigurations={};for(let Ee of D)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(D,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(D,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(D,this._featureMap,J,Be,Ee)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function xl(W,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[W]||[W.replace(`${D}-`,"").replace(/-/g,"_")]}function mn(W,D,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:Tl,composite:Tl},"fill-pattern":{source:Tl,composite:Tl},"fill-extrusion-pattern":{source:Tl,composite:Tl}}[Be]}(W);return Ee&&Ee[J]||ve[D][J]}mi("ConstantBinder",Kn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",Yo),mi("CrossFadedCompositeBinder",Wo),mi("CompositeExpressionBinder",oo),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,cs=Math.pow(2,14)-1,vs=-cs-1;function Al(W){let D=po/W.extent,J=W.loadGeometry();for(let ve=0;ve<J.length;ve++){let Ee=J[ve];for(let Be=0;Be<Ee.length;Be++){let Ge=Ee[Be],ct=Math.round(Ge.x*D),At=Math.round(Ge.y*D);Ge.x=w(ct,vs,cs),Ge.y=w(At,vs,cs),(ct<Ge.x||ct>Ge.x+1||At<Ge.y||At>Ge.y+1)&&m("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Hl(W,D){return{type:W.type,id:W.id,properties:W.properties,geometry:D?Al(W):[]}}function Su(W,D,J,ve,Ee){W.emplaceBack(2*D+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new $o,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){let Ee=this.layers[0],Be=[],Ge=null,ct=!1;Ee.type==="circle"&&(Ge=Ee.layout.get("circle-sort-key"),ct=!Ge.isConstant());for(let{feature:At,id:Bt,index:ar,sourceLayerIndex:Sr}of D){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Hl(At,zr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Bt,properties:At.properties,type:At.type,sourceLayerIndex:Sr,index:ar,geometry:zr?Wr.geometry:Al(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Bt)=>At.sortKey-Bt.sortKey);for(let At of Be){let{geometry:Bt,index:ar,sourceLayerIndex:Sr}=At,zr=D[ar].feature;this.addFeature(At,Bt,ar,ve),J.featureIndex.insert(zr,Bt,ar,Sr,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,J,ve,Ee){for(let Be of J)for(let Ge of Be){let ct=Ge.x,At=Ge.y;if(ct<0||ct>=po||At<0||At>=po)continue;let Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),ar=Bt.vertexLength;Su(this.layoutVertexArray,ct,At,-1,-1),Su(this.layoutVertexArray,ct,At,1,-1),Su(this.layoutVertexArray,ct,At,1,1),Su(this.layoutVertexArray,ct,At,-1,1),this.indexArray.emplaceBack(ar,ar+1,ar+2),this.indexArray.emplaceBack(ar,ar+3,ar+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,{},Ee)}}function _c(W,D){for(let J=0;J<W.length;J++)if(bi(D,W[J]))return!0;for(let J=0;J<D.length;J++)if(bi(W,D[J]))return!0;return!!oa(W,D)}function it(W,D,J){return!!bi(W,D)||!!va(D,W,J)}function Zt(W,D){if(W.length===1)return Ya(D,W[0]);for(let J=0;J<D.length;J++){let ve=D[J];for(let Ee=0;Ee<ve.length;Ee++)if(bi(W,ve[Ee]))return!0}for(let J=0;J<W.length;J++)if(Ya(D,W[J]))return!0;for(let J=0;J<D.length;J++)if(oa(W,D[J]))return!0;return!1}function cr(W,D,J){if(W.length>1){if(oa(W,D))return!0;for(let ve=0;ve<D.length;ve++)if(va(D[ve],W,J))return!0}for(let ve=0;ve<W.length;ve++)if(va(W[ve],D,J))return!0;return!1}function oa(W,D){if(W.length===0||D.length===0)return!1;for(let J=0;J<W.length-1;J++){let ve=W[J],Ee=W[J+1];for(let Be=0;Be<D.length-1;Be++)if(wa(ve,Ee,D[Be],D[Be+1]))return!0}return!1}function wa(W,D,J,ve){return R(W,J,ve)!==R(D,J,ve)&&R(W,D,J)!==R(W,D,ve)}function va(W,D,J){let ve=J*J;if(D.length===1)return W.distSqr(D[0])<ve;for(let Ee=1;Ee<D.length;Ee++)if(ya(W,D[Ee-1],D[Ee])<ve)return!0;return!1}function ya(W,D,J){let ve=D.distSqr(J);if(ve===0)return W.distSqr(D);let Ee=((W.x-D.x)*(J.x-D.x)+(W.y-D.y)*(J.y-D.y))/ve;return W.distSqr(Ee<0?D:Ee>1?J:J.sub(D)._mult(Ee)._add(D))}function Ya(W,D){let J,ve,Ee,Be=!1;for(let Ge=0;Ge<W.length;Ge++){J=W[Ge];for(let ct=0,At=J.length-1;ct<J.length;At=ct++)ve=J[ct],Ee=J[At],ve.y>D.y!=Ee.y>D.y&&D.x<(Ee.x-ve.x)*(D.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(W,D){let J=!1;for(let ve=0,Ee=W.length-1;ve<W.length;Ee=ve++){let Be=W[ve],Ge=W[Ee];Be.y>D.y!=Ge.y>D.y&&D.x<(Ge.x-Be.x)*(D.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(W,D,J){let ve=J[0],Ee=J[2];if(W.x<ve.x&&D.x<ve.x||W.x>Ee.x&&D.x>Ee.x||W.y<ve.y&&D.y<ve.y||W.y>Ee.y&&D.y>Ee.y)return!1;let Be=R(W,D,J[0]);return Be!==R(W,D,J[1])||Be!==R(W,D,J[2])||Be!==R(W,D,J[3])}function si(W,D,J){let ve=D.paint.get(W).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(D.id).getMaxValue(W)}function gn(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])}function zi(W,D,J,ve,Ee){if(!D[0]&&!D[1])return W;let Be=n.convert(D)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ct<W.length;ct++)Ge.push(W[ct].sub(Be));return Ge}let Ei,Na;mi("CircleBucket",Rl,{omit:["layers"]});var ea={get paint(){return Na=Na||new Fe({"circle-radius":new zo(re.paint_circle["circle-radius"]),"circle-color":new zo(re.paint_circle["circle-color"]),"circle-blur":new zo(re.paint_circle["circle-blur"]),"circle-opacity":new zo(re.paint_circle["circle-opacity"]),"circle-translate":new fo(re.paint_circle["circle-translate"]),"circle-translate-anchor":new fo(re.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new fo(re.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new fo(re.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zo(re.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zo(re.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zo(re.paint_circle["circle-stroke-opacity"])})},get layout(){return Ei=Ei||new Fe({"circle-sort-key":new zo(re.layout_circle["circle-sort-key"])})}},Ma=1e-6,Qa=typeof Float32Array<"u"?Float32Array:Array;function di(W){return W[0]=1,W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=1,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=1,W[11]=0,W[12]=0,W[13]=0,W[14]=0,W[15]=1,W}function Va(W,D,J){var ve=D[0],Ee=D[1],Be=D[2],Ge=D[3],ct=D[4],At=D[5],Bt=D[6],ar=D[7],Sr=D[8],zr=D[9],Wr=D[10],ia=D[11],fa=D[12],ja=D[13],Ka=D[14],Wi=D[15],gi=J[0],qi=J[1],en=J[2],qn=J[3];return W[0]=gi*ve+qi*ct+en*Sr+qn*fa,W[1]=gi*Ee+qi*At+en*zr+qn*ja,W[2]=gi*Be+qi*Bt+en*Wr+qn*Ka,W[3]=gi*Ge+qi*ar+en*ia+qn*Wi,W[4]=(gi=J[4])*ve+(qi=J[5])*ct+(en=J[6])*Sr+(qn=J[7])*fa,W[5]=gi*Ee+qi*At+en*zr+qn*ja,W[6]=gi*Be+qi*Bt+en*Wr+qn*Ka,W[7]=gi*Ge+qi*ar+en*ia+qn*Wi,W[8]=(gi=J[8])*ve+(qi=J[9])*ct+(en=J[10])*Sr+(qn=J[11])*fa,W[9]=gi*Ee+qi*At+en*zr+qn*ja,W[10]=gi*Be+qi*Bt+en*Wr+qn*Ka,W[11]=gi*Ge+qi*ar+en*ia+qn*Wi,W[12]=(gi=J[12])*ve+(qi=J[13])*ct+(en=J[14])*Sr+(qn=J[15])*fa,W[13]=gi*Ee+qi*At+en*zr+qn*ja,W[14]=gi*Be+qi*Bt+en*Wr+qn*Ka,W[15]=gi*Ge+qi*ar+en*ia+qn*Wi,W}Math.hypot||(Math.hypot=function(){for(var W=0,D=arguments.length;D--;)W+=arguments[D]*arguments[D];return Math.sqrt(W)});var Bi,Li=Va;function hn(W,D,J){var ve=D[0],Ee=D[1],Be=D[2],Ge=D[3];return W[0]=J[0]*ve+J[4]*Ee+J[8]*Be+J[12]*Ge,W[1]=J[1]*ve+J[5]*Ee+J[9]*Be+J[13]*Ge,W[2]=J[2]*ve+J[6]*Ee+J[10]*Be+J[14]*Ge,W[3]=J[3]*ve+J[7]*Ee+J[11]*Be+J[15]*Ge,W}Bi=new Qa(4),Qa!=Float32Array&&(Bi[0]=0,Bi[1]=0,Bi[2]=0,Bi[3]=0);class Ha extends ie{constructor(D){super(D,ea)}createBucket(D){return new Rl(D)}queryRadius(D){let J=D;return si("circle-radius",this,J)+si("circle-stroke-width",this,J)+gn(this.paint.get("circle-translate"))}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct,At){let Bt=zi(D,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Ge.angle,ct),ar=this.paint.get("circle-radius").evaluate(J,ve)+this.paint.get("circle-stroke-width").evaluate(J,ve),Sr=this.paint.get("circle-pitch-alignment")==="map",zr=Sr?Bt:function(ia,fa){return ia.map(ja=>Ua(ja,fa))}(Bt,At),Wr=Sr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Sr?fa:Ua(fa,At),Ka=Wr,Wi=hn([],[fa.x,fa.y,0,1],At);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/Ge.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=Ge.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(W,D){let J=hn([],[W.x,W.y,0,1],D);return new n(J[0]/J[3],J[1]/J[3])}class Yi extends Rl{}let Ri;mi("HeatmapBucket",Yi,{omit:["layers"]});var Ti={get paint(){return Ri=Ri||new Fe({"heatmap-radius":new zo(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zo(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(re.paint_heatmap["heatmap-opacity"])})}};function xi(W,{width:D,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==D*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${D*J*ve}`)}else Ee=new Uint8Array(D*J*ve);return W.width=D,W.height=J,W.data=Ee,W}function Xi(W,{width:D,height:J},ve){if(D===W.width&&J===W.height)return;let Ee=xi({},{width:D,height:J},ve);vn(W,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(W.width,D),height:Math.min(W.height,J)},ve),W.width=D,W.height=J,W.data=Ee.data}function vn(W,D,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return D;if(Ee.width>W.width||Ee.height>W.height||J.x>W.width-Ee.width||J.y>W.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>D.width||Ee.height>D.height||ve.x>D.width-Ee.width||ve.y>D.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=W.data,ct=D.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At<Ee.height;At++){let Bt=((J.y+At)*W.width+J.x)*Be,ar=((ve.y+At)*D.width+ve.x)*Be;for(let Sr=0;Sr<Ee.width*Be;Sr++)ct[ar+Sr]=Ge[Bt+Sr]}return D}class Rn{constructor(D,J){xi(this,D,1,J)}resize(D){Xi(this,D,1)}clone(){return new Rn({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(D,J,ve,Ee,Be){vn(D,J,ve,Ee,Be,1)}}class Ii{constructor(D,J){xi(this,D,4,J)}resize(D){Xi(this,D,4)}replace(D,J){J?this.data.set(D):this.data=D instanceof Uint8ClampedArray?new Uint8Array(D.buffer):D}clone(){return new Ii({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(D,J,ve,Ee,Be){vn(D,J,ve,Ee,Be,4)}}function nn(W){let D={},J=W.resolution||256,ve=W.clips?W.clips.length:1,Ee=W.image||new Ii({width:J,height:ve});if(Math.log(J)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${J}`);let Be=(Ge,ct,At)=>{D[W.evaluationKey]=At;let Bt=W.expression.evaluate(D);Ee.data[Ge+ct+0]=Math.floor(255*Bt.r/Bt.a),Ee.data[Ge+ct+1]=Math.floor(255*Bt.g/Bt.a),Ee.data[Ge+ct+2]=Math.floor(255*Bt.b/Bt.a),Ee.data[Ge+ct+3]=Math.floor(255*Bt.a)};if(W.clips)for(let Ge=0,ct=0;Ge<ve;++Ge,ct+=4*J)for(let At=0,Bt=0;At<J;At++,Bt+=4){let ar=At/(J-1),{start:Sr,end:zr}=W.clips[Ge];Be(ct,Bt,Sr*(1-ar)+zr*ar)}else for(let Ge=0,ct=0;Ge<J;Ge++,ct+=4)Be(0,ct,Ge/(J-1));return Ee}mi("AlphaImage",Rn),mi("RGBAImage",Ii);let En="big-fb";class Dn extends ie{createBucket(D){return new Yi(D)}constructor(D){super(D,Ti),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(D){D==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=nn({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(En)&&this.heatmapFbos.delete(En)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Xn;var zs={get paint(){return Xn=Xn||new Fe({"hillshade-illumination-direction":new fo(re.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new fo(re.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new fo(re.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new fo(re.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new fo(re.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new fo(re.paint_hillshade["hillshade-accent-color"])})}};class bl extends ie{constructor(D){super(D,zs)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let ho=ht([{name:"a_pos",components:2,type:"Int16"}],4),{members:Wl}=ho;function fs(W,D,J=2){let ve=D&&D.length,Ee=ve?D[0]*J:W.length,Be=Sl(W,0,Ee,J,!0),Ge=[];if(!Be||Be.next===Be.prev)return Ge;let ct,At,Bt;if(ve&&(Be=function(ar,Sr,zr,Wr){let ia=[];for(let fa=0,ja=Sr.length;fa<ja;fa++){let Ka=Sl(ar,Sr[fa]*Wr,fa<ja-1?Sr[fa+1]*Wr:ar.length,Wr,!1);Ka===Ka.next&&(Ka.steiner=!0),ia.push(xe(Ka))}ia.sort(Cl);for(let fa=0;fa<ia.length;fa++)zr=Po(ia[fa],zr);return zr}(W,D,Be,J)),W.length>80*J){ct=1/0,At=1/0;let ar=-1/0,Sr=-1/0;for(let zr=J;zr<Ee;zr+=J){let Wr=W[zr],ia=W[zr+1];Wr<ct&&(ct=Wr),ia<At&&(At=ia),Wr>ar&&(ar=Wr),ia>Sr&&(Sr=ia)}Bt=Math.max(ar-ct,Sr-At),Bt=Bt!==0?32767/Bt:0}return tu(Be,Ge,J,ct,At,Bt,0),Ge}function Sl(W,D,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Bt){let ar=0;for(let Sr=ct,zr=At-Bt;Sr<At;Sr+=Bt)ar+=(Ge[zr]-Ge[Sr])*(Ge[Sr+1]+Ge[zr+1]),zr=Sr;return ar}(W,D,J,ve)>0)for(let Ge=D;Ge<J;Ge+=ve)Be=pr(Ge/ve|0,W[Ge],W[Ge+1],Be);else for(let Ge=J-ve;Ge>=D;Ge-=ve)Be=pr(Ge/ve|0,W[Ge],W[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function kl(W,D){if(!W)return W;D||(D=W);let J,ve=W;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&je(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=D=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==D);return D}function tu(W,D,J,ve,Ee,Be,Ge){if(!W)return;!Ge&&Be&&function(At,Bt,ar,Sr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Bt,ar,Sr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==At);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,fa=1;do{let ja,Ka=Wr;Wr=null;let Wi=null;for(ia=0;Ka;){ia++;let gi=Ka,qi=0;for(let qn=0;qn<fa&&(qi++,gi=gi.nextZ,gi);qn++);let en=fa;for(;qi>0||en>0&&gi;)qi!==0&&(en===0||!gi||Ka.z<=gi.z)?(ja=Ka,Ka=Ka.nextZ,qi--):(ja=gi,gi=gi.nextZ,en--),Wi?Wi.nextZ=ja:Wr=ja,ja.prevZ=Wi,Wi=ja;Ka=gi}Wi.nextZ=null,fa*=2}while(ia>1)}(zr)}(W,ve,Ee,Be);let ct=W;for(;W.prev!==W.next;){let At=W.prev,Bt=W.next;if(Be?pl(W,ve,Ee,Be):Vs(W))D.push(At.i,W.i,Bt.i),mt(W),W=Bt.next,ct=Bt.next;else if((W=Bt)===ct){Ge?Ge===1?tu(W=wl(kl(W),D),D,J,ve,Ee,Be,2):Ge===2&&Zn(W,D,J,ve,Ee,Be):tu(kl(W),D,J,ve,Ee,Be,1);break}}}function Vs(W){let D=W.prev,J=W,ve=W.next;if(je(D,J,ve)>=0)return!1;let Ee=D.x,Be=J.x,Ge=ve.x,ct=D.y,At=J.y,Bt=ve.y,ar=Ee<Be?Ee<Ge?Ee:Ge:Be<Ge?Be:Ge,Sr=ct<At?ct<Bt?ct:Bt:At<Bt?At:Bt,zr=Ee>Be?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Bt?ct:Bt:At>Bt?At:Bt,ia=ve.next;for(;ia!==D;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Sr&&ia.y<=Wr&&te(Ee,ct,Be,At,Ge,Bt,ia.x,ia.y)&&je(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(W,D,J,ve){let Ee=W.prev,Be=W,Ge=W.next;if(je(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Bt=Ge.x,ar=Ee.y,Sr=Be.y,zr=Ge.y,Wr=ct<At?ct<Bt?ct:Bt:At<Bt?At:Bt,ia=ar<Sr?ar<zr?ar:zr:Sr<zr?Sr:zr,fa=ct>At?ct>Bt?ct:Bt:At>Bt?At:Bt,ja=ar>Sr?ar>zr?ar:zr:Sr>zr?Sr:zr,Ka=K(Wr,ia,D,J,ve),Wi=K(fa,ja,D,J,ve),gi=W.prevZ,qi=W.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&te(ct,ar,At,Sr,Bt,zr,gi.x,gi.y)&&je(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&te(ct,ar,At,Sr,Bt,zr,qi.x,qi.y)&&je(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&te(ct,ar,At,Sr,Bt,zr,gi.x,gi.y)&&je(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&te(ct,ar,At,Sr,Bt,zr,qi.x,qi.y)&&je(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function wl(W,D){let J=W;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&wr(ve,Ee)&&wr(Ee,ve)&&(D.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=W=Ee),J=J.next}while(J!==W);return kl(J)}function Zn(W,D,J,ve,Ee,Be){let Ge=W;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Nr(Ge,ct);return Ge=kl(Ge,Ge.next),At=kl(At,At.next),tu(Ge,D,J,ve,Ee,Be,0),void tu(At,D,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==W)}function Cl(W,D){return W.x-D.x}function Po(W,D){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Bt,ar=-1/0;do{if(At<=Ge.y&&At>=Ge.next.y&&Ge.next.y!==Ge.y){let fa=Ge.x+(At-Ge.y)*(Ge.next.x-Ge.x)/(Ge.next.y-Ge.y);if(fa<=ct&&fa>ar&&(ar=fa,Bt=Ge.x<Ge.next.x?Ge:Ge.next,fa===ct))return Bt}Ge=Ge.next}while(Ge!==Be);if(!Bt)return null;let Sr=Bt,zr=Bt.x,Wr=Bt.y,ia=1/0;Ge=Bt;do{if(ct>=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&te(At<Wr?ct:ar,At,zr,Wr,At<Wr?ar:ct,At,Ge.x,Ge.y)){let fa=Math.abs(At-Ge.y)/(ct-Ge.x);wr(Ge,Ee)&&(fa<ia||fa===ia&&(Ge.x>Bt.x||Ge.x===Bt.x&&ge(Bt,Ge)))&&(Bt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Sr);return Bt}(W,D);if(!J)return D;let ve=Nr(J,W);return kl(ve,ve.next),kl(J,J.next)}function ge(W,D){return je(W.prev,W,D.prev)<0&&je(D.next,W,W.next)<0}function K(W,D,J,ve,Ee){return(W=1431655765&((W=858993459&((W=252645135&((W=16711935&((W=(W-J)*Ee|0)|W<<8))|W<<4))|W<<2))|W<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-ve)*Ee|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function xe(W){let D=W,J=W;do(D.x<J.x||D.x===J.x&&D.y<J.y)&&(J=D),D=D.next;while(D!==W);return J}function te(W,D,J,ve,Ee,Be,Ge,ct){return(Ee-Ge)*(D-ct)>=(W-Ge)*(Be-ct)&&(W-Ge)*(ve-ct)>=(J-Ge)*(D-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(W,D){return W.next.i!==D.i&&W.prev.i!==D.i&&!function(J,ve){let Ee=J;do{if(Ee.i!==J.i&&Ee.next.i!==J.i&&Ee.i!==ve.i&&Ee.next.i!==ve.i&&Qe(Ee,Ee.next,J,ve))return!0;Ee=Ee.next}while(Ee!==J);return!1}(W,D)&&(wr(W,D)&&wr(D,W)&&function(J,ve){let Ee=J,Be=!1,Ge=(J.x+ve.x)/2,ct=(J.y+ve.y)/2;do Ee.y>ct!=Ee.next.y>ct&&Ee.next.y!==Ee.y&&Ge<(Ee.next.x-Ee.x)*(ct-Ee.y)/(Ee.next.y-Ee.y)+Ee.x&&(Be=!Be),Ee=Ee.next;while(Ee!==J);return Be}(W,D)&&(je(W.prev,W,D.prev)||je(W,D.prev,D))||ke(W,D)&&je(W.prev,W,W.next)>0&&je(D.prev,D,D.next)>0)}function je(W,D,J){return(D.y-W.y)*(J.x-D.x)-(D.x-W.x)*(J.y-D.y)}function ke(W,D){return W.x===D.x&&W.y===D.y}function Qe(W,D,J,ve){let Ee=qt(je(W,D,J)),Be=qt(je(W,D,ve)),Ge=qt(je(J,ve,W)),ct=qt(je(J,ve,D));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(W,J,D))||!(Be!==0||!vt(W,ve,D))||!(Ge!==0||!vt(J,W,ve))||!(ct!==0||!vt(J,D,ve))}function vt(W,D,J){return D.x<=Math.max(W.x,J.x)&&D.x>=Math.min(W.x,J.x)&&D.y<=Math.max(W.y,J.y)&&D.y>=Math.min(W.y,J.y)}function qt(W){return W>0?1:W<0?-1:0}function wr(W,D){return je(W.prev,W,W.next)<0?je(W,D,W.next)>=0&&je(W,W.prev,D)>=0:je(W,D,W.prev)<0||je(W,W.next,D)<0}function Nr(W,D){let J=St(W.i,W.x,W.y),ve=St(D.i,D.x,D.y),Ee=W.next,Be=D.prev;return W.next=D,D.prev=W,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(W,D,J,ve){let Ee=St(W,D,J);return ve?(Ee.next=ve.next,Ee.prev=ve,ve.next.prev=Ee,ve.next=Ee):(Ee.prev=Ee,Ee.next=Ee),Ee}function mt(W){W.next.prev=W.prev,W.prev.next=W.next,W.prevZ&&(W.prevZ.nextZ=W.nextZ),W.nextZ&&(W.nextZ.prevZ=W.prevZ)}function St(W,D,J){return{i:W,x:D,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(W,D,J){let ve=J.patternDependencies,Ee=!1;for(let Be of D){let Ge=Be.paint.get(`${W}-pattern`);Ge.isConstant()||(Ee=!0);let ct=Ge.constantOr(null);ct&&(Ee=!0,ve[ct.to]=!0,ve[ct.from]=!0)}return Ee}function rr(W,D,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of D){let ct=Ge.paint.get(`${W}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Bt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Bt=Bt&&Bt.name?Bt.name:Bt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Bt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Bt,max:ar}}}return J}class hr{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.hasPattern=Ft("fill",this.layers,J);let Ee=this.layers[0].layout.get("fill-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Bt,sourceLayerIndex:ar}of D){let Sr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ct,Sr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve,J.availableImages):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Bt,geometry:Sr?zr.geometry:Al(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Bt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Sr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Sr)}else this.addFeature(ct,At,Bt,ve,{});J.featureIndex.insert(D[Bt].feature,At,Bt,ar,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}addFeatures(D,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Wl),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),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(D,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct=0;for(let Wr of Ge)ct+=Wr.length;let At=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray),Bt=At.vertexLength,ar=[],Sr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Sr.push(ar.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),fa=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(fa+Wr.length-1,fa),ar.push(Wr[0].x),ar.push(Wr[0].y);for(let ja=1;ja<Wr.length;ja++)this.layoutVertexArray.emplaceBack(Wr[ja].x,Wr[ja].y),this.indexArray2.emplaceBack(fa+ja-1,fa+ja),ar.push(Wr[ja].x),ar.push(Wr[ja].y);ia.vertexLength+=Wr.length,ia.primitiveLength+=Wr.length}let zr=fs(ar,Sr);for(let Wr=0;Wr<zr.length;Wr+=3)this.indexArray.emplaceBack(Bt+zr[Wr],Bt+zr[Wr+1],Bt+zr[Wr+2]);At.vertexLength+=ct,At.primitiveLength+=zr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,Be,Ee)}}let nr,dr;mi("FillBucket",hr,{omit:["layers","patternFeatures"]});var or={get paint(){return dr=dr||new Fe({"fill-antialias":new fo(re.paint_fill["fill-antialias"]),"fill-opacity":new zo(re.paint_fill["fill-opacity"]),"fill-color":new zo(re.paint_fill["fill-color"]),"fill-outline-color":new zo(re.paint_fill["fill-outline-color"]),"fill-translate":new fo(re.paint_fill["fill-translate"]),"fill-translate-anchor":new fo(re.paint_fill["fill-translate-anchor"]),"fill-pattern":new Dc(re.paint_fill["fill-pattern"])})},get layout(){return nr=nr||new Fe({"fill-sort-key":new zo(re.layout_fill["fill-sort-key"])})}};class Wt extends ie{constructor(D){super(D,or)}recalculate(D,J){super.recalculate(D,J);let ve=this.paint._values["fill-outline-color"];ve.value.kind==="constant"&&ve.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(D){return new hr(D)}queryRadius(){return gn(this.paint.get("fill-translate"))}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct){return Zt(zi(D,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Ge.angle,ct),Ee)}isTileClipped(){return!0}}let ir=ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Vt=ht([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Dr}=ir;var Jr={},ga=o,vi=Ga;function Ga(W,D,J,ve,Ee){this.properties={},this.extent=J,this.type=0,this._pbf=W,this._geometry=-1,this._keys=ve,this._values=Ee,W.readFields(ai,this,D)}function ai(W,D,J){W==1?D.id=J.readVarint():W==2?function(ve,Ee){for(var Be=ve.readVarint()+ve.pos;ve.pos<Be;){var Ge=Ee._keys[ve.readVarint()],ct=Ee._values[ve.readVarint()];Ee.properties[Ge]=ct}}(J,D):W==3?D.type=J.readVarint():W==4&&(D._geometry=J.pos)}function Zi(W){for(var D,J,ve=0,Ee=0,Be=W.length,Ge=Be-1;Ee<Be;Ge=Ee++)ve+=((J=W[Ge]).x-(D=W[Ee]).x)*(D.y+J.y);return ve}Ga.types=["Unknown","Point","LineString","Polygon"],Ga.prototype.loadGeometry=function(){var W=this._pbf;W.pos=this._geometry;for(var D,J=W.readVarint()+W.pos,ve=1,Ee=0,Be=0,Ge=0,ct=[];W.pos<J;){if(Ee<=0){var At=W.readVarint();ve=7&At,Ee=At>>3}if(Ee--,ve===1||ve===2)Be+=W.readSVarint(),Ge+=W.readSVarint(),ve===1&&(D&&ct.push(D),D=[]),D.push(new ga(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);D&&D.push(D[0].clone())}}return D&&ct.push(D),ct},Ga.prototype.bbox=function(){var W=this._pbf;W.pos=this._geometry;for(var D=W.readVarint()+W.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Bt=-1/0;W.pos<D;){if(ve<=0){var ar=W.readVarint();J=7&ar,ve=ar>>3}if(ve--,J===1||J===2)(Ee+=W.readSVarint())<Ge&&(Ge=Ee),Ee>ct&&(ct=Ee),(Be+=W.readSVarint())<At&&(At=Be),Be>Bt&&(Bt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Bt]},Ga.prototype.toGeoJSON=function(W,D,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*W,ct=this.extent*D,At=this.loadGeometry(),Bt=Ga.types[this.type];function ar(Wr){for(var ia=0;ia<Wr.length;ia++){var fa=Wr[ia];Wr[ia]=[360*(fa.x+Ge)/Be-180,360/Math.PI*Math.atan(Math.exp((180-360*(fa.y+ct)/Be)*Math.PI/180))-90]}}switch(this.type){case 1:var Sr=[];for(ve=0;ve<At.length;ve++)Sr[ve]=At[ve][0];ar(At=Sr);break;case 2:for(ve=0;ve<At.length;ve++)ar(At[ve]);break;case 3:for(At=function(Wr){var ia=Wr.length;if(ia<=1)return[Wr];for(var fa,ja,Ka=[],Wi=0;Wi<ia;Wi++){var gi=Zi(Wr[Wi]);gi!==0&&(ja===void 0&&(ja=gi<0),ja===gi<0?(fa&&Ka.push(fa),fa=[Wr[Wi]]):fa.push(Wr[Wi]))}return fa&&Ka.push(fa),Ka}(At),ve=0;ve<At.length;ve++)for(Ee=0;Ee<At[ve].length;Ee++)ar(At[ve][Ee])}At.length===1?At=At[0]:Bt="Multi"+Bt;var zr={type:"Feature",geometry:{type:Bt,coordinates:At},properties:this.properties};return"id"in this&&(zr.id=this.id),zr};var Fi=vi,ui=_i;function _i(W,D){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=W,this._keys=[],this._values=[],this._features=[],W.readFields(Si,this,D),this.length=this._features.length}function Si(W,D,J){W===15?D.version=J.readVarint():W===1?D.name=J.readString():W===5?D.extent=J.readVarint():W===2?D._features.push(J.pos):W===3?D._keys.push(J.readString()):W===4&&D._values.push(function(ve){for(var Ee=null,Be=ve.readVarint()+ve.pos;ve.pos<Be;){var Ge=ve.readVarint()>>3;Ee=Ge===1?ve.readString():Ge===2?ve.readFloat():Ge===3?ve.readDouble():Ge===4?ve.readVarint64():Ge===5?ve.readVarint():Ge===6?ve.readSVarint():Ge===7?ve.readBoolean():null}return Ee}(J))}_i.prototype.feature=function(W){if(W<0||W>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[W];var D=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,D,this.extent,this._keys,this._values)};var Ui=ui;function cn(W,D,J){if(W===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(D[ve.name]=ve)}}Jr.VectorTile=function(W,D){this.layers=W.readFields(cn,{},D)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let yo=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Is(W,D,J,ve,Ee,Be,Ge,ct){W.emplaceBack(D,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Fo{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new eu,this.centroidVertexArray=new Jo,this.indexArray=new De,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of D){let At=this.layers[0]._featureFilter.needGeometry,Bt=Hl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),Bt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Bt.geometry:Al(Ee),properties:Ee.properties,type:Ee.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,ar,this.zoom,J)):this.addFeature(ar,ar.geometry,Ge,ve,{}),J.featureIndex.insert(Ee,ar.geometry,Ge,ct,this.index,!0)}}addFeatures(D,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Vt.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct={x:0,y:0,vertexCount:0},At=0;for(let ia of Ge)At+=ia.length;let Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ks(ia))continue;let fa=0;for(let ja=0;ja<ia.length;ja++){let Ka=ia[ja];if(ja>=1){let Wi=ia[ja-1];if(!Es(Ka,Wi)){Bt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Is(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Is(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,fa),ct.x+=2*Ka.x,ct.y+=2*Ka.y,ct.vertexCount+=2,fa+=qi,Is(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Is(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,fa),ct.x+=2*Wi.x,ct.y+=2*Wi.y,ct.vertexCount+=2;let en=Bt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),yo[D.type]!=="Polygon")continue;let ar=[],Sr=[],zr=Bt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Sr.push(ar.length/2);for(let fa=0;fa<ia.length;fa++){let ja=ia[fa];Is(this.layoutVertexArray,ja.x,ja.y,0,0,1,1,0),ct.x+=ja.x,ct.y+=ja.y,ct.vertexCount+=1,ar.push(ja.x),ar.push(ja.y)}}let Wr=fs(ar,Sr);for(let ia=0;ia<Wr.length;ia+=3)this.indexArray.emplaceBack(zr+Wr[ia],zr+Wr[ia+2],zr+Wr[ia+1]);Bt.primitiveLength+=Wr.length/3,Bt.vertexLength+=At;for(let ia=0;ia<ct.vertexCount;ia++){let fa=Math.floor(ct.x/ct.vertexCount),ja=Math.floor(ct.y/ct.vertexCount);this.centroidVertexArray.emplaceBack(fa,ja)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,Be,Ee)}}function Es(W,D){return W.x===D.x&&(W.x<0||W.x>po)||W.y===D.y&&(W.y<0||W.y>po)}function Ks(W){return W.every(D=>D.x<0)||W.every(D=>D.x>po)||W.every(D=>D.y<0)||W.every(D=>D.y>po)}let mu;mi("FillExtrusionBucket",Fo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Fe({"fill-extrusion-opacity":new fo(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zo(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zo(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zo(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(D){super(D,Ep)}createBucket(D){return new Fo(D)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct,At){let Bt=zi(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Ge.angle,ct),ar=this.paint.get("fill-extrusion-height").evaluate(J,ve),Sr=this.paint.get("fill-extrusion-base").evaluate(J,ve),zr=function(ia,fa,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];hn(qi,qi,fa),Wi.push(new n(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Bt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,qn=Ka[10]*fa,ko=Ka[11]*fa,ys=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,rs=Ka[11]*ja;for(let jo of ia){let Bo=[],bn=[];for(let ls of jo){let No=ls.x,Ps=ls.y,Ku=Ka[0]*No+Ka[4]*Ps+Ka[12],Uu=Ka[1]*No+Ka[5]*Ps+Ka[13],th=Ka[2]*No+Ka[6]*Ps+Ka[14],Hp=Ka[3]*No+Ka[7]*Ps+Ka[15],Th=th+qn,rh=Hp+ko,Jh=Ku+ys,$h=Uu+vo,Qh=th+zn,ff=Hp+rs,ah=new n((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new n(Jh/ff,$h/ff);Fh.z=Qh/ff,bn.push(Fh)}Wi.push(Bo),gi.push(bn)}return[Wi,gi]}(Ee,Sr,ar,At);return function(ia,fa,ja){let Ka=1/0;Zt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;Wi<fa.length;Wi++){let gi=fa[Wi],qi=ia[Wi];for(let en=0;en<gi.length-1;en++){let qn=gi[en],ko=[qn,gi[en+1],qi[en+1],qi[en],qn];_c(ja,ko)&&(Ka=Math.min(Ka,qp(ja,ko)))}}return Ka!==1/0&&Ka}(Wr[0],Wr[1],zr)}}function Ph(W,D){return W.x*D.x+W.y*D.y}function qp(W,D){if(W.length===1){let J=0,ve=D[J++],Ee;for(;!Ee||ve.equals(Ee);)if(Ee=D[J++],!Ee)return 1/0;for(;J<D.length;J++){let Be=D[J],Ge=W[0],ct=Ee.sub(ve),At=Be.sub(ve),Bt=Ge.sub(ve),ar=Ph(ct,ct),Sr=Ph(ct,At),zr=Ph(At,At),Wr=Ph(Bt,ct),ia=Ph(Bt,At),fa=ar*zr-Sr*Sr,ja=(zr*Wr-Sr*ia)/fa,Ka=(ar*ia-Sr*Wr)/fa,Wi=ve.z*(1-ja-Ka)+Ee.z*ja+Be.z*Ka;if(isFinite(Wi))return Wi}return 1/0}{let J=1/0;for(let ve of D)J=Math.min(J,ve.z);return J}}let qd=ht([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:ed}=qd,Ih=ht([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:td}=Ih,Kh=Jr.VectorTileFeature.types,Rh=Math.cos(Math.PI/180*37.5),Cp=Math.pow(2,14)/.5;class Vp{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(J=>{this.gradients[J.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new vu,this.indexArray=new De,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.hasPattern=Ft("line",this.layers,J);let Ee=this.layers[0].layout.get("line-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Bt,sourceLayerIndex:ar}of D){let Sr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ct,Sr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Bt,geometry:Sr?zr.geometry:Al(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Bt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Sr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Sr)}else this.addFeature(ct,At,Bt,ve,{});J.featureIndex.insert(D[Bt].feature,At,Bt,ar,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}addFeatures(D,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(D,{}),At=Ge.get("line-cap"),Bt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Sr of J)this.addLine(Sr,D,ct,At,Bt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,Be,Ee)}addLine(D,J,ve,Ee,Be,Ge){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ka=0;Ka<D.length-1;Ka++)this.totalDistance+=D[Ka].dist(D[Ka+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let ct=Kh[J.type]==="Polygon",At=D.length;for(;At>=2&&D[At-1].equals(D[At-2]);)At--;let Bt=0;for(;Bt<At-1&&D[Bt].equals(D[Bt+1]);)Bt++;if(At<(ct?3:2))return;ve==="bevel"&&(Be=1.05);let ar=this.overscaling<=16?15*po/(512*this.overscaling):0,Sr=this.segments.prepareSegment(10*At,this.layoutVertexArray,this.indexArray),zr,Wr,ia,fa,ja;this.e1=this.e2=-1,ct&&(zr=D[At-2],ja=D[Bt].sub(zr)._unit()._perp());for(let Ka=Bt;Ka<At;Ka++){if(ia=Ka===At-1?ct?D[Bt+1]:void 0:D[Ka+1],ia&&D[Ka].equals(ia))continue;ja&&(fa=ja),zr&&(Wr=zr),zr=D[Ka],ja=ia?ia.sub(zr)._unit()._perp():fa,fa=fa||ja;let Wi=fa.add(ja);Wi.x===0&&Wi.y===0||Wi._unit();let gi=fa.x*ja.x+fa.y*ja.y,qi=Wi.x*ja.x+Wi.y*ja.y,en=qi!==0?1/qi:1/0,qn=2*Math.sqrt(2-2*qi),ko=qi<Rh&&Wr&&ia,ys=fa.x*ja.y-fa.y*ja.x>0;if(ko&&Ka>Bt){let rs=zr.dist(Wr);if(rs>2*ar){let jo=zr.sub(zr.sub(Wr)._mult(ar/rs)._round());this.updateDistance(Wr,jo),this.addCurrentVertex(jo,fa,0,0,Sr),Wr=jo}}let vo=Wr&&ia,zn=vo?ve:ct?"butt":Ee;if(vo&&zn==="round"&&(en<Ge?zn="miter":en<=2&&(zn="fakeround")),zn==="miter"&&en>Be&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en<Be&&(zn="miter")),Wr&&this.updateDistance(Wr,zr),zn==="miter")Wi._mult(en),this.addCurrentVertex(zr,Wi,0,0,Sr);else if(zn==="flipbevel"){if(en>100)Wi=ja.mult(-1);else{let rs=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(rs*(ys?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Sr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Sr)}else if(zn==="bevel"||zn==="fakeround"){let rs=-Math.sqrt(en*en-1),jo=ys?rs:0,Bo=ys?0:rs;if(Wr&&this.addCurrentVertex(zr,fa,jo,Bo,Sr),zn==="fakeround"){let bn=Math.round(180*qn/Math.PI/20);for(let ls=1;ls<bn;ls++){let No=ls/bn;if(No!==.5){let Ku=No-.5;No+=No*Ku*(No-1)*((1.0904+gi*(gi*(3.55645-1.43519*gi)-3.2452))*Ku*Ku+(.848013+gi*(.215638*gi-1.06021)))}let Ps=ja.sub(fa)._mult(No)._add(fa)._unit()._mult(ys?-1:1);this.addHalfVertex(zr,Ps.x,Ps.y,!1,ys,0,Sr)}}ia&&this.addCurrentVertex(zr,ja,-jo,-Bo,Sr)}else if(zn==="butt")this.addCurrentVertex(zr,Wi,0,0,Sr);else if(zn==="square"){let rs=Wr?1:-1;this.addCurrentVertex(zr,Wi,rs,rs,Sr)}else zn==="round"&&(Wr&&(this.addCurrentVertex(zr,fa,0,0,Sr),this.addCurrentVertex(zr,fa,1,1,Sr,!0)),ia&&(this.addCurrentVertex(zr,ja,-1,-1,Sr,!0),this.addCurrentVertex(zr,ja,0,0,Sr)));if(ko&&Ka<At-1){let rs=zr.dist(ia);if(rs>2*ar){let jo=zr.add(ia.sub(zr)._mult(ar/rs)._round());this.updateDistance(zr,jo),this.addCurrentVertex(jo,ja,0,0,Sr),zr=jo}}}}addCurrentVertex(D,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(D,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(D,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,J,ve,Ee,Be,Ge))}addHalfVertex({x:D,y:J},ve,Ee,Be,Ge,ct,At){let Bt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Be?1:0),(J<<1)+(Ge?1:0),Math.round(63*ve)+128,Math.round(63*Ee)+128,1+(ct===0?0:ct<0?-1:1)|(63&Bt)<<2,Bt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ar=At.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ar),At.primitiveLength++),Ge?this.e2=ar:this.e1=ar}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,J){this.distance+=D.dist(J),this.updateScaledDistance()}}let Lp,Cv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Cv=Cv||new Fe({"line-opacity":new zo(re.paint_line["line-opacity"]),"line-color":new zo(re.paint_line["line-color"]),"line-translate":new fo(re.paint_line["line-translate"]),"line-translate-anchor":new fo(re.paint_line["line-translate-anchor"]),"line-width":new zo(re.paint_line["line-width"]),"line-gap-width":new zo(re.paint_line["line-gap-width"]),"line-offset":new zo(re.paint_line["line-offset"]),"line-blur":new zo(re.paint_line["line-blur"]),"line-dasharray":new lc(re.paint_line["line-dasharray"]),"line-pattern":new Dc(re.paint_line["line-pattern"]),"line-gradient":new Yu(re.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Fe({"line-cap":new fo(re.layout_line["line-cap"]),"line-join":new zo(re.layout_line["line-join"]),"line-miter-limit":new fo(re.layout_line["line-miter-limit"]),"line-round-limit":new fo(re.layout_line["line-round-limit"]),"line-sort-key":new zo(re.layout_line["line-sort-key"])})}};class Gf extends zo{possiblyEvaluate(D,J){return J=new Ds(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(D,J)}evaluate(D,J,ve,Ee){return J=M({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(D,J,ve,Ee)}}let Gd;class Lv extends ie{constructor(D){super(D,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof _a,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,J){super.recalculate(D,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new Vp(D)}queryRadius(D){let J=D,ve=ph(si("line-width",this,J),si("line-gap-width",this,J)),Ee=si("line-offset",this,J);return ve/2+Math.abs(Ee)+gn(this.paint.get("line-translate"))}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct){let At=zi(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Bt=ct/2*ph(this.paint.get("line-width").evaluate(J,ve),this.paint.get("line-gap-width").evaluate(J,ve)),ar=this.paint.get("line-offset").evaluate(J,ve);return ar&&(Ee=function(Sr,zr){let Wr=[];for(let ia=0;ia<Sr.length;ia++){let fa=Sr[ia],ja=[];for(let Ka=0;Ka<fa.length;Ka++){let Wi=fa[Ka-1],gi=fa[Ka],qi=fa[Ka+1],en=Ka===0?new n(0,0):gi.sub(Wi)._unit()._perp(),qn=Ka===fa.length-1?new n(0,0):qi.sub(gi)._unit()._perp(),ko=en._add(qn)._unit(),ys=ko.x*qn.x+ko.y*qn.y;ys!==0&&ko._mult(1/ys),ja.push(ko._mult(zr)._add(gi))}Wr.push(ja)}return Wr}(Ee,ar*ct)),function(Sr,zr,Wr){for(let ia=0;ia<zr.length;ia++){let fa=zr[ia];if(Sr.length>=3){for(let ja=0;ja<fa.length;ja++)if(bi(Sr,fa[ja]))return!0}if(cr(Sr,fa,Wr))return!0}return!1}(At,Ee,Bt)}isTileClipped(){return!0}}function ph(W,D){return D>0?D+2*W:W}let iv=ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nm=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let om=ht([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ht([{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 Pv=ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=ht([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ov(W,D,J){return W.sections.forEach(ve=>{ve.text=function(Ee,Be,Ge){let ct=Be.layout.get("text-transform").evaluate(Ge,{});return ct==="uppercase"?Ee=Ee.toLocaleUpperCase():ct==="lowercase"&&(Ee=Ee.toLocaleLowerCase()),Js.applyArabicShaping&&(Ee=Js.applyArabicShaping(Ee)),Ee}(ve.text,D,J)}),W}ht([{name:"triangle",components:3,type:"Uint16"}]),ht([{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"}]),ht([{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"}]),ht([{type:"Float32",name:"offsetX"}]),ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ht([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let cc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var fu=24,Dh=Mu,Iv=function(W,D,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<<ct)-1,Bt=At>>1,ar=-7,Sr=J?Ee-1:0,zr=J?-1:1,Wr=W[D+Sr];for(Sr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+W[D+Sr],Sr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+W[D+Sr],Sr+=zr,ar-=8);if(Be===0)Be=1-Bt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Bt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},sm=function(W,D,J,ve,Ee,Be){var Ge,ct,At,Bt=8*Be-Ee-1,ar=(1<<Bt)-1,Sr=ar>>1,zr=Ee===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=ve?0:Be-1,ia=ve?1:-1,fa=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(ct=isNaN(D)?1:0,Ge=ar):(Ge=Math.floor(Math.log(D)/Math.LN2),D*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(D+=Ge+Sr>=1?zr/At:zr*Math.pow(2,1-Sr))*At>=2&&(Ge++,At/=2),Ge+Sr>=ar?(ct=0,Ge=ar):Ge+Sr>=1?(ct=(D*At-1)*Math.pow(2,Ee),Ge+=Sr):(ct=D*Math.pow(2,Sr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;W[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<<Ee|ct,Bt+=Ee;Bt>0;W[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Bt-=8);W[J+Wr-ia]|=128*fa};function Mu(W){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(W)?W:new Uint8Array(W||0),this.pos=0,this.type=0,this.length=this.buf.length}Mu.Varint=0,Mu.Fixed64=1,Mu.Bytes=2,Mu.Fixed32=5;var w0=4294967296,sv=1/w0,xg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(W){return W.type===Mu.Bytes?W.readVarint()+W.pos:W.pos+1}function lv(W,D,J){return J?4294967296*D+(W>>>0):4294967296*(D>>>0)+(W>>>0)}function bg(W,D,J){var ve=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=W;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(W,D){for(var J=0;J<W.length;J++)D.writeVarint(W[J])}function UT(W,D){for(var J=0;J<W.length;J++)D.writeSVarint(W[J])}function jT(W,D){for(var J=0;J<W.length;J++)D.writeFloat(W[J])}function qT(W,D){for(var J=0;J<W.length;J++)D.writeDouble(W[J])}function VT(W,D){for(var J=0;J<W.length;J++)D.writeBoolean(W[J])}function vk(W,D){for(var J=0;J<W.length;J++)D.writeFixed32(W[J])}function GT(W,D){for(var J=0;J<W.length;J++)D.writeSFixed32(W[J])}function HT(W,D){for(var J=0;J<W.length;J++)D.writeFixed64(W[J])}function WT(W,D){for(var J=0;J<W.length;J++)D.writeSFixed64(W[J])}function Rv(W,D){return(W[D]|W[D+1]<<8|W[D+2]<<16)+16777216*W[D+3]}function A0(W,D,J){W[J]=D,W[J+1]=D>>>8,W[J+2]=D>>>16,W[J+3]=D>>>24}function Lx(W,D){return(W[D]|W[D+1]<<8|W[D+2]<<16)+(W[D+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(W,D,J){for(J=J||this.length;this.pos<J;){var ve=this.readVarint(),Ee=ve>>3,Be=this.pos;this.type=7&ve,W(Ee,D,this),this.pos===Be&&this.skip(ve)}return D},readMessage:function(W,D){return this.readFields(W,D,this.readVarint()+this.pos)},readFixed32:function(){var W=Rv(this.buf,this.pos);return this.pos+=4,W},readSFixed32:function(){var W=Lx(this.buf,this.pos);return this.pos+=4,W},readFixed64:function(){var W=Rv(this.buf,this.pos)+Rv(this.buf,this.pos+4)*w0;return this.pos+=8,W},readSFixed64:function(){var W=Rv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,W},readFloat:function(){var W=Iv(this.buf,this.pos,!0,23,4);return this.pos+=4,W},readDouble:function(){var W=Iv(this.buf,this.pos,!0,52,8);return this.pos+=8,W},readVarint:function(W){var D,J,ve=this.buf;return D=127&(J=ve[this.pos++]),J<128?D:(D|=(127&(J=ve[this.pos++]))<<7,J<128?D:(D|=(127&(J=ve[this.pos++]))<<14,J<128?D:(D|=(127&(J=ve[this.pos++]))<<21,J<128?D:function(Ee,Be,Ge){var ct,At,Bt=Ge.buf;if(ct=(112&(At=Bt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Bt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Bt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(J=ve[this.pos]))<<28,W,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var W=this.readVarint();return W%2==1?(W+1)/-2:W/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var W=this.readVarint()+this.pos,D=this.pos;return this.pos=W,W-D>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,D,W):function(J,ve,Ee){for(var Be="",Ge=ve;Ge<Ee;){var ct,At,Bt,ar=J[Ge],Sr=null,zr=ar>239?4:ar>223?3:ar>191?2:1;if(Ge+zr>Ee)break;zr===1?ar<128&&(Sr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Sr=(31&ar)<<6|63&ct)<=127&&(Sr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Sr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Sr>=55296&&Sr<=57343)&&(Sr=null)):zr===4&&(At=J[Ge+2],Bt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Bt)==128&&((Sr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Bt)<=65535||Sr>=1114112)&&(Sr=null)),Sr===null?(Sr=65533,zr=1):Sr>65535&&(Sr-=65536,Be+=String.fromCharCode(Sr>>>10&1023|55296),Sr=56320|1023&Sr),Be+=String.fromCharCode(Sr),Ge+=zr}return Be}(this.buf,D,W)},readBytes:function(){var W=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,W);return this.pos=W,D},readPackedVarint:function(W,D){if(this.type!==Mu.Bytes)return W.push(this.readVarint(D));var J=Pp(this);for(W=W||[];this.pos<J;)W.push(this.readVarint(D));return W},readPackedSVarint:function(W){if(this.type!==Mu.Bytes)return W.push(this.readSVarint());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readSVarint());return W},readPackedBoolean:function(W){if(this.type!==Mu.Bytes)return W.push(this.readBoolean());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readBoolean());return W},readPackedFloat:function(W){if(this.type!==Mu.Bytes)return W.push(this.readFloat());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readFloat());return W},readPackedDouble:function(W){if(this.type!==Mu.Bytes)return W.push(this.readDouble());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readDouble());return W},readPackedFixed32:function(W){if(this.type!==Mu.Bytes)return W.push(this.readFixed32());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readFixed32());return W},readPackedSFixed32:function(W){if(this.type!==Mu.Bytes)return W.push(this.readSFixed32());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readSFixed32());return W},readPackedFixed64:function(W){if(this.type!==Mu.Bytes)return W.push(this.readFixed64());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readFixed64());return W},readPackedSFixed64:function(W){if(this.type!==Mu.Bytes)return W.push(this.readSFixed64());var D=Pp(this);for(W=W||[];this.pos<D;)W.push(this.readSFixed64());return W},skip:function(W){var D=7&W;if(D===Mu.Varint)for(;this.buf[this.pos++]>127;);else if(D===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Mu.Fixed32)this.pos+=4;else{if(D!==Mu.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(W,D){this.writeVarint(W<<3|D)},realloc:function(W){for(var D=this.length||16;D<this.pos+W;)D*=2;if(D!==this.length){var J=new Uint8Array(D);J.set(this.buf),this.buf=J,this.length=D}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(W){this.realloc(4),A0(this.buf,W,this.pos),this.pos+=4},writeSFixed32:function(W){this.realloc(4),A0(this.buf,W,this.pos),this.pos+=4},writeFixed64:function(W){this.realloc(8),A0(this.buf,-1&W,this.pos),A0(this.buf,Math.floor(W*sv),this.pos+4),this.pos+=8},writeSFixed64:function(W){this.realloc(8),A0(this.buf,-1&W,this.pos),A0(this.buf,Math.floor(W*sv),this.pos+4),this.pos+=8},writeVarint:function(W){(W=+W||0)>268435455||W<0?function(D,J){var ve,Ee;if(D>=0?(ve=D%4294967296|0,Ee=D/4294967296|0):(Ee=~(-D/4294967296),4294967295^(ve=~(-D%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(Be,Ge,ct){ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,ct.buf[ct.pos]=127&(Be>>>=7)}(ve,0,J),function(Be,Ge){var ct=(7&Be)<<4;Ge.buf[Ge.pos++]|=ct|((Be>>>=3)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be)))))}(Ee,J)}(W,this):(this.realloc(4),this.buf[this.pos++]=127&W|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=W>>>7&127))))},writeSVarint:function(W){this.writeVarint(W<0?2*-W-1:2*W)},writeBoolean:function(W){this.writeVarint(!!W)},writeString:function(W){W=String(W),this.realloc(4*W.length),this.pos++;var D=this.pos;this.pos=function(ve,Ee,Be){for(var Ge,ct,At=0;At<Ee.length;At++){if((Ge=Ee.charCodeAt(At))>55295&&Ge<57344){if(!ct){Ge>56319||At+1===Ee.length?(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189):ct=Ge;continue}if(Ge<56320){ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=Ge;continue}Ge=ct-55296<<10|Ge-56320|65536,ct=null}else ct&&(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=null);Ge<128?ve[Be++]=Ge:(Ge<2048?ve[Be++]=Ge>>6|192:(Ge<65536?ve[Be++]=Ge>>12|224:(ve[Be++]=Ge>>18|240,ve[Be++]=Ge>>12&63|128),ve[Be++]=Ge>>6&63|128),ve[Be++]=63&Ge|128)}return Be}(this.buf,W,this.pos);var J=this.pos-D;J>=128&&bg(D,J,this),this.pos=D-1,this.writeVarint(J),this.pos+=J},writeFloat:function(W){this.realloc(4),sm(this.buf,W,this.pos,!0,23,4),this.pos+=4},writeDouble:function(W){this.realloc(8),sm(this.buf,W,this.pos,!0,52,8),this.pos+=8},writeBytes:function(W){var D=W.length;this.writeVarint(D),this.realloc(D);for(var J=0;J<D;J++)this.buf[this.pos++]=W[J]},writeRawMessage:function(W,D){this.pos++;var J=this.pos;W(D,this);var ve=this.pos-J;ve>=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(W,D,J){this.writeTag(W,Mu.Bytes),this.writeRawMessage(D,J)},writePackedVarint:function(W,D){D.length&&this.writeMessage(W,T0,D)},writePackedSVarint:function(W,D){D.length&&this.writeMessage(W,UT,D)},writePackedBoolean:function(W,D){D.length&&this.writeMessage(W,VT,D)},writePackedFloat:function(W,D){D.length&&this.writeMessage(W,jT,D)},writePackedDouble:function(W,D){D.length&&this.writeMessage(W,qT,D)},writePackedFixed32:function(W,D){D.length&&this.writeMessage(W,vk,D)},writePackedSFixed32:function(W,D){D.length&&this.writeMessage(W,GT,D)},writePackedFixed64:function(W,D){D.length&&this.writeMessage(W,HT,D)},writePackedSFixed64:function(W,D){D.length&&this.writeMessage(W,WT,D)},writeBytesField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeBytes(D)},writeFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeSFixed64(D)},writeVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeVarint(D)},writeSVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeSVarint(D)},writeStringField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeString(D)},writeFloatField:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFloat(D)},writeDoubleField:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeDouble(D)},writeBooleanField:function(W,D){this.writeVarintField(W,!!D)}};var P1=r(Dh);let I1=3;function mk(W,D,J){W===1&&J.readMessage(XT,D)}function XT(W,D,J){if(W===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Bt}=J.readMessage(Px,{});D.push({id:ve,bitmap:new Rn({width:Be+2*I1,height:Ge+2*I1},Ee),metrics:{width:Be,height:Ge,left:ct,top:At,advance:Bt}})}}function Px(W,D,J){W===1?D.id=J.readVarint():W===2?D.bitmap=J.readBytes():W===3?D.width=J.readVarint():W===4?D.height=J.readVarint():W===5?D.left=J.readSVarint():W===6?D.top=J.readSVarint():W===7&&(D.advance=J.readVarint())}let Ix=I1;function R1(W){let D=0,J=0;for(let Ge of W)D+=Ge.w*Ge.h,J=Math.max(J,Ge.w);W.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of W)for(let ct=ve.length-1;ct>=0;ct--){let At=ve[ct];if(!(Ge.w>At.w||Ge.h>At.h)){if(Ge.x=At.x,Ge.y=At.y,Be=Math.max(Be,Ge.y+Ge.h),Ee=Math.max(Ee,Ge.x+Ge.w),Ge.w===At.w&&Ge.h===At.h){let Bt=ve.pop();ct<ve.length&&(ve[ct]=Bt)}else Ge.h===At.h?(At.x+=Ge.w,At.w-=Ge.w):Ge.w===At.w?(At.y+=Ge.h,At.h-=Ge.h):(ve.push({x:At.x+Ge.w,y:At.y,w:At.w-Ge.w,h:Ge.h}),At.y+=Ge.h,At.h-=Ge.h);break}}return{w:Ee,h:Be,fill:D/(Ee*Be)||0}}let zh=1;class wg{constructor(D,{pixelRatio:J,version:ve,stretchX:Ee,stretchY:Be,content:Ge,textFitWidth:ct,textFitHeight:At}){this.paddedRect=D,this.pixelRatio=J,this.stretchX=Ee,this.stretchY=Be,this.content=Ge,this.version=ve,this.textFitWidth=ct,this.textFitHeight=At}get tl(){return[this.paddedRect.x+zh,this.paddedRect.y+zh]}get br(){return[this.paddedRect.x+this.paddedRect.w-zh,this.paddedRect.y+this.paddedRect.h-zh]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*zh)/this.pixelRatio,(this.paddedRect.h-2*zh)/this.pixelRatio]}}class Tg{constructor(D,J){let ve={},Ee={};this.haveRenderCallbacks=[];let Be=[];this.addImages(D,ve,Be),this.addImages(J,Ee,Be);let{w:Ge,h:ct}=R1(Be),At=new Ii({width:Ge||1,height:ct||1});for(let Bt in D){let ar=D[Bt],Sr=ve[Bt].paddedRect;Ii.copy(ar.data,At,{x:0,y:0},{x:Sr.x+zh,y:Sr.y+zh},ar.data)}for(let Bt in J){let ar=J[Bt],Sr=Ee[Bt].paddedRect,zr=Sr.x+zh,Wr=Sr.y+zh,ia=ar.data.width,fa=ar.data.height;Ii.copy(ar.data,At,{x:0,y:0},{x:zr,y:Wr},ar.data),Ii.copy(ar.data,At,{x:0,y:fa-1},{x:zr,y:Wr-1},{width:ia,height:1}),Ii.copy(ar.data,At,{x:0,y:0},{x:zr,y:Wr+fa},{width:ia,height:1}),Ii.copy(ar.data,At,{x:ia-1,y:0},{x:zr-1,y:Wr},{width:1,height:fa}),Ii.copy(ar.data,At,{x:0,y:0},{x:zr+ia,y:Wr},{width:1,height:fa})}this.image=At,this.iconPositions=ve,this.patternPositions=Ee}addImages(D,J,ve){for(let Ee in D){let Be=D[Ee],Ge={x:0,y:0,w:Be.data.width+2*zh,h:Be.data.height+2*zh};ve.push(Ge),J[Ee]=new wg(Ge,Be),Be.hasRenderCallback&&this.haveRenderCallbacks.push(Ee)}}patchUpdatedImages(D,J){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let ve in D.updatedImages)this.patchUpdatedImage(this.iconPositions[ve],D.getImage(ve),J),this.patchUpdatedImage(this.patternPositions[ve],D.getImage(ve),J)}patchUpdatedImage(D,J,ve){if(!D||!J||D.version===J.version)return;D.version=J.version;let[Ee,Be]=D.tl;ve.update(J.data,void 0,{x:Ee,y:Be})}}var Ip;mi("ImagePosition",wg),mi("ImageAtlas",Tg),e.ah=void 0,(Ip=e.ah||(e.ah={}))[Ip.none=0]="none",Ip[Ip.horizontal=1]="horizontal",Ip[Ip.vertical=2]="vertical",Ip[Ip.horizontalOnly=3]="horizontalOnly";let eh=-17;class S0{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(D,J){let ve=new S0;return ve.scale=D||1,ve.fontStack=J,ve}static forImage(D){let J=new S0;return J.imageName=D,J}}class lm{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(D,J){let ve=new lm;for(let Ee=0;Ee<D.sections.length;Ee++){let Be=D.sections[Ee];Be.image?ve.addImageSection(Be):ve.addTextSection(Be,J)}return ve}length(){return this.text.length}getSection(D){return this.sections[this.sectionIndex[D]]}getSectionIndex(D){return this.sectionIndex[D]}getCharCode(D){return this.text.charCodeAt(D)}verticalizePunctuation(){this.text=function(D){let J="";for(let ve=0;ve<D.length;ve++){let Ee=D.charCodeAt(ve+1)||null,Be=D.charCodeAt(ve-1)||null;J+=Ee&&Fl(Ee)&&!cc[D[ve+1]]||Be&&Fl(Be)&&!cc[D[ve-1]]||!cc[D[ve]]?D[ve]:cc[D[ve]]}return J}(this.text)}trim(){let D=0;for(let ve=0;ve<this.text.length&&Ag[this.text.charCodeAt(ve)];ve++)D++;let J=this.text.length;for(let ve=this.text.length-1;ve>=0&&ve>=D&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(D,J),this.sectionIndex=this.sectionIndex.slice(D,J)}substring(D,J){let ve=new lm;return ve.text=this.text.substring(D,J),ve.sectionIndex=this.sectionIndex.slice(D,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,J)=>Math.max(D,this.sections[J].scale),0)}addTextSection(D,J){this.text+=D.text,this.sections.push(S0.forText(D.scale,D.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee<D.text.length;++Ee)this.sectionIndex.push(ve)}addImageSection(D){let J=D.image?D.image.name:"";if(J.length===0)return void m("Can't add FormattedSection with an empty image.");let ve=this.getNextImageSectionCharCode();ve?(this.text+=String.fromCharCode(ve),this.sections.push(S0.forImage(J)),this.sectionIndex.push(this.sections.length-1)):m("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia){let fa=lm.fromFeature(W,Ee),ja;Sr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),um(fa,Bt,Be,D,ve,Wr));for(let qn of en){let ko=new lm;ko.text=qn,ko.sections=fa.sections;for(let ys=0;ys<qn.length;ys++)ko.sectionIndex.push(0);ja.push(ko)}}else if(Wi){ja=[];let en=Wi(fa.text,fa.sectionIndex,um(fa,Bt,Be,D,ve,Wr));for(let qn of en){let ko=new lm;ko.text=qn[0],ko.sectionIndex=qn[1],ko.sections=fa.sections,ja.push(ko)}}else ja=function(en,qn){let ko=[],ys=en.text,vo=0;for(let zn of qn)ko.push(en.substring(vo,zn)),vo=zn;return vo<ys.length&&ko.push(en.substring(vo,ys.length)),ko}(fa,um(fa,Bt,Be,D,ve,Wr));let gi=[],qi={positionedLines:gi,text:fa.toString(),top:ar[1],bottom:ar[1],left:ar[0],right:ar[0],writingMode:Sr,iconsInText:!1,verticalizable:!1};return function(en,qn,ko,ys,vo,zn,rs,jo,Bo,bn,ls,No){let Ps=0,Ku=eh,Uu=0,th=0,Hp=jo==="right"?1:jo==="left"?0:.5,Th=0;for(let ff of vo){ff.trim();let ah=ff.getMaxScale(),Fh=(ah-1)*fu,Ah={positionedGlyphs:[],lineOffset:0};en.positionedLines[Th]=Ah;let dh=Ah.positionedGlyphs,yf=0;if(!ff.length()){Ku+=zn,++Th;continue}for(let dp=0;dp<ff.length();dp++){let hu=ff.getSection(dp),fc=ff.getSectionIndex(dp),Ju=ff.getCharCode(dp),Dp=0,$c=null,vm=null,_d=null,fd=fu,Wp=!(Bo===e.ah.horizontal||!ls&&!ws(Ju)||ls&&(Ag[Ju]||(rh=Ju,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(rh)))));if(hu.imageName){let zc=ys[hu.imageName];if(!zc)continue;_d=hu.imageName,en.iconsInText=en.iconsInText||!0,vm=zc.paddedRect;let Pf=zc.displaySize;hu.scale=hu.scale*fu/No,$c={width:Pf[0],height:Pf[1],left:zh,top:-Ix,advance:Wp?Pf[1]:Pf[0]},Dp=Fh+(fu-Pf[1]*hu.scale),fd=$c.advance;let Xp=Wp?Pf[0]*hu.scale-fu*ah:Pf[1]*hu.scale-fu*ah;Xp>0&&Xp>yf&&(yf=Xp)}else{let zc=ko[hu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)vm=Pf.rect,$c=Pf.metrics;else{let Xp=qn[hu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;$c=Zd.metrics}Dp=(ah-hu.scale)*fu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Ps,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ps+=fd*hu.scale+bn):(dh.push({glyph:Ju,imageName:_d,x:Ps,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ps+=$c.advance*hu.scale+bn)}dh.length!==0&&(Uu=Math.max(Ps-bn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Ps=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let Jh=Ku-eh,{horizontalAlign:$h,verticalAlign:Qh}=Mg(rs);(function(ff,ah,Fh,Ah,dh,yf,Rp,dp,hu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-dp*Ah-eh:(-Ah*hu+.5)*Rp;for(let Dp of ff)for(let $c of Dp.positionedGlyphs)$c.x+=fc,$c.y+=Ju})(en.positionedLines,Hp,$h,Qh,Uu,th,zn,Jh,vo.length),en.top+=-Qh*Jh,en.bottom=en.top+Jh,en.left+=-$h*Uu,en.right=en.left+Uu}(qi,D,J,ve,ja,Ge,ct,At,Sr,Bt,zr,ia),!function(en){for(let qn of en)if(qn.positionedGlyphs.length!==0)return!1;return!0}(gi)&&qi}let Ag={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ZT={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},YT={40:!0};function Rx(W,D,J,ve,Ee,Be){if(D.imageName){let Ge=ve[D.imageName];return Ge?Ge.displaySize[0]*D.scale*fu/Be+Ee:0}{let Ge=J[D.fontStack],ct=Ge&&Ge[W];return ct?ct.metrics.advance*D.scale+Ee:0}}function Dx(W,D,J,ve){let Ee=Math.pow(W-D,2);return ve?W<D?Ee/2:2*Ee:Ee+Math.abs(J)*J}function KT(W,D,J){let ve=0;return W===10&&(ve-=1e4),J&&(ve+=150),W!==40&&W!==65288||(ve+=50),D!==41&&D!==65289||(ve+=50),ve}function Sg(W,D,J,ve,Ee,Be){let Ge=null,ct=Dx(D,J,Ee,Be);for(let At of ve){let Bt=Dx(D-At.x,J,Ee,Be)+At.badness;Bt<=ct&&(Ge=At,ct=Bt)}return{index:W,x:D,priorBreak:Ge,badness:ct}}function zx(W){return W?zx(W.priorBreak).concat(W.index):[]}function um(W,D,J,ve,Ee,Be){if(!W)return[];let Ge=[],ct=function(Sr,zr,Wr,ia,fa,ja){let Ka=0;for(let Wi=0;Wi<Sr.length();Wi++){let gi=Sr.getSection(Wi);Ka+=Rx(Sr.getCharCode(Wi),gi,ia,fa,zr,ja)}return Ka/Math.max(1,Math.ceil(Ka/Wr))}(W,D,J,ve,Ee,Be),At=W.text.indexOf("\u200B")>=0,Bt=0;for(let Sr=0;Sr<W.length();Sr++){let zr=W.getSection(Sr),Wr=W.getCharCode(Sr);if(Ag[Wr]||(Bt+=Rx(Wr,zr,ve,Ee,D,Be)),Sr<W.length()-1){let ia=!((ar=Wr)<11904)&&(!!un["CJK Compatibility Forms"](ar)||!!un["CJK Compatibility"](ar)||!!un["CJK Strokes"](ar)||!!un["CJK Symbols and Punctuation"](ar)||!!un["Enclosed CJK Letters and Months"](ar)||!!un["Halfwidth and Fullwidth Forms"](ar)||!!un["Ideographic Description Characters"](ar)||!!un["Vertical Forms"](ar)||el.test(String.fromCodePoint(ar)));(ZT[Wr]||ia||zr.imageName||Sr!==W.length()-2&&YT[W.getCharCode(Sr+1)])&&Ge.push(Sg(Sr+1,Bt,ct,Ge,KT(Wr,W.getCharCode(Sr+1),ia&&At),!1))}}var ar;return zx(Sg(W.length(),Bt,ct,Ge,0,!0))}function Mg(W){let D=.5,J=.5;switch(W){case"right":case"top-right":case"bottom-right":D=1;break;case"left":case"top-left":case"bottom-left":D=0}switch(W){case"bottom":case"bottom-right":case"bottom-left":J=1;break;case"top":case"top-right":case"top-left":J=0}return{horizontalAlign:D,verticalAlign:J}}function uv(W,D,J,ve,Ee){if(!ve&&!Ee)return;let Be=W[J],Ge=(W[J].x+Be.metrics.advance*Be.scale)*ve;for(let ct=D;ct<=J;ct++)W[ct].x-=Ge,W[ct].y+=Ee}function E0(W,D,J){let{horizontalAlign:ve,verticalAlign:Ee}=Mg(J),Be=D[0]-W.displaySize[0]*ve,Ge=D[1]-W.displaySize[1]*Ee;return{image:W,top:Ge,bottom:Ge+W.displaySize[1],left:Be,right:Be+W.displaySize[0]}}function Fx(W){var D,J;let ve=W.left,Ee=W.top,Be=W.right-ve,Ge=W.bottom-Ee,ct=(D=W.image.textFitWidth)!==null&&D!==void 0?D:"stretchOrShrink",At=(J=W.image.textFitHeight)!==null&&J!==void 0?J:"stretchOrShrink",Bt=(W.image.content[2]-W.image.content[0])/(W.image.content[3]-W.image.content[1]);if(At==="proportional"){if(ct==="stretchOnly"&&Be/Ge<Bt||ct==="proportional"){let ar=Math.ceil(Ge*Bt);ve*=ar/Be,Be=ar}}else if(ct==="proportional"&&At==="stretchOnly"&&Bt!==0&&Be/Ge>Bt){let ar=Math.ceil(Be/Bt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(W,D,J,ve,Ee,Be){let Ge=W.image,ct;if(Ge.content){let ja=Ge.content,Ka=Ge.pixelRatio||1;ct=[ja[0]/Ka,ja[1]/Ka,Ge.displaySize[0]-ja[2]/Ka,Ge.displaySize[1]-ja[3]/Ka]}let At=D.left*Be,Bt=D.right*Be,ar,Sr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Sr=Ee[0]+Bt+ve[1]):(Wr=Ee[0]+(At+Bt-Ge.displaySize[0])/2,Sr=Wr+Ge.displaySize[0]);let ia=D.top*Be,fa=D.bottom*Be;return J==="height"||J==="both"?(ar=Ee[1]+ia-ve[0],zr=Ee[1]+fa+ve[2]):(ar=Ee[1]+(ia+fa-Ge.displaySize[1])/2,zr=ar+Ge.displaySize[1]),{image:Ge,top:ar,right:Sr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(W,D){let{expression:J}=D;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Ds(W+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;Be<ve.length&&ve[Be]<=W;)Be++;Be=Math.max(0,Be-1);let Ge=Be;for(;Ge<ve.length&&ve[Ge]<W+1;)Ge++;Ge=Math.min(ve.length-1,Ge);let ct=ve[Be],At=ve[Ge];return J.kind==="composite"?{kind:"composite",minZoom:ct,maxZoom:At,interpolationType:Ee}:{kind:"camera",minZoom:ct,maxZoom:At,minSize:J.evaluate(new Ds(ct)),maxSize:J.evaluate(new Ds(At)),interpolationType:Ee}}}function D1(W,D,J){let ve="never",Ee=W.get(D);return Ee?ve=Ee:W.get(J)&&(ve="always"),ve}let JT=Jr.VectorTileFeature.types,$T=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Eg(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr){let Wr=ct?Math.min(cv,Math.round(ct[0])):0,ia=ct?Math.min(cv,Math.round(ct[1])):0;W.emplaceBack(D,J,Math.round(32*ve),Math.round(32*Ee),Be,Ge,(Wr<<1)+(At?1:0),ia,16*Bt,16*ar,256*Sr,256*zr)}function z1(W,D,J){W.emplaceBack(D.x,D.y,J),W.emplaceBack(D.x,D.y,J),W.emplaceBack(D.x,D.y,J),W.emplaceBack(D.x,D.y,J)}function F1(W){for(let D of W.sections)if(Io(D.text))return!0;return!1}class O1{constructor(D){this.layoutVertexArray=new cu,this.indexArray=new De,this.programConfigurations=D,this.segments=new Tt,this.dynamicLayoutVertexArray=new uc,this.opacityVertexArray=new Vl,this.hasVisibleVertices=!1,this.placedSymbolArray=new Yn}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(D,J,ve,Ee){this.isEmpty()||(ve&&(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,iv.members),this.indexBuffer=D.createIndexBuffer(this.indexArray,J),this.dynamicLayoutVertexBuffer=D.createVertexBuffer(this.dynamicLayoutVertexArray,nm.members,!0),this.opacityVertexBuffer=D.createVertexBuffer(this.opacityVertexArray,$T,!0),this.opacityVertexBuffer.itemSize=1),(ve||Ee)&&this.programConfigurations.upload(D))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}mi("SymbolBuffers",O1);class fv{constructor(D,J,ve){this.layoutVertexArray=new D,this.layoutAttributes=J,this.indexArray=new ve,this.segments=new Tt,this.collisionVertexArray=new me}upload(D){this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=D.createVertexBuffer(this.collisionVertexArray,om.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}mi("CollisionBuffers",fv);class cm{constructor(D){this.collisionBoxArray=D.collisionBoxArray,this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(Ge=>Ge.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=di([]),this.placementViewportMatrix=di([]);let J=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Bx(this.zoom,J["text-size"]),this.iconSizeData=Bx(this.zoom,J["icon-size"]);let ve=this.layers[0].layout,Ee=ve.get("symbol-sort-key"),Be=ve.get("symbol-z-order");this.canOverlap=D1(ve,"text-overlap","text-allow-overlap")!=="never"||D1(ve,"icon-overlap","icon-allow-overlap")!=="never"||ve.get("text-ignore-placement")||ve.get("icon-ignore-placement"),this.sortFeaturesByKey=Be!=="viewport-y"&&!Ee.isConstant(),this.sortFeaturesByY=(Be==="viewport-y"||Be==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,ve.get("symbol-placement")==="point"&&(this.writingModes=ve.get("text-writing-mode").map(Ge=>e.ah[Ge])),this.stateDependentLayerIds=this.layers.filter(Ge=>Ge.isStateDependent()).map(Ge=>Ge.id),this.sourceID=D.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new O1(new al(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new os,this.lineVertexArray=new So,this.symbolInstances=new wo,this.textAnchorOffsets=new hs}calculateGlyphDependencies(D,J,ve,Ee,Be){for(let Ge=0;Ge<D.length;Ge++)if(J[D.charCodeAt(Ge)]=!0,(ve||Ee)&&Be){let ct=cc[D.charAt(Ge)];ct&&(J[ct.charCodeAt(0)]=!0)}}populate(D,J,ve){let Ee=this.layers[0],Be=Ee.layout,Ge=Be.get("text-font"),ct=Be.get("text-field"),At=Be.get("icon-image"),Bt=(ct.value.kind!=="constant"||ct.value.value instanceof ra&&!ct.value.value.isEmpty()||ct.value.value.toString().length>0)&&(Ge.value.kind!=="constant"||Ge.value.value.length>0),ar=At.value.kind!=="constant"||!!At.value.value||Object.keys(At.parameters).length>0,Sr=Be.get("symbol-sort-key");if(this.features=[],!Bt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Ds(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of D){let qi=Ee._featureFilter.needGeometry,en=Hl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let qn,ko;if(qi||(en.geometry=Al(ja)),Bt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),rs=this.hasRTLText=this.hasRTLText||F1(zn);(!rs||Js.getRTLTextPluginStatus()==="unavailable"||rs&&Js.isParsed())&&(qn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);ko=vo instanceof Za?vo:Za.fromString(vo)}if(!qn&&!ko)continue;let ys=this.sortFeaturesByKey?Sr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:qn,icon:ko,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:ys}),ko&&(zr[ko.name]=!0),qn){let vo=Ge.evaluate(en,{},ve).join(","),zn=Be.get("text-rotation-alignment")!=="viewport"&&Be.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let rs of qn.sections)if(rs.image)zr[rs.image.name]=!0;else{let jo=go(qn.toString()),Bo=rs.fontStack||vo,bn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(rs.text,bn,zn,this.allowVerticalPlacement,jo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function qn(vo,zn,rs){let jo=Wi[vo];return delete Wi[vo],Wi[zn]=jo,gi[jo].geometry[0].pop(),gi[jo].geometry[0]=gi[jo].geometry[0].concat(rs[0]),jo}function ko(vo,zn,rs){let jo=Ka[zn];return delete Ka[zn],Ka[vo]=jo,gi[jo].geometry[0].shift(),gi[jo].geometry[0]=rs[0].concat(gi[jo].geometry[0]),jo}function ys(vo,zn,rs){let jo=rs?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${jo.x}:${jo.y}`}for(let vo=0;vo<ja.length;vo++){let zn=ja[vo],rs=zn.geometry,jo=zn.text?zn.text.toString():null;if(!jo){en(vo);continue}let Bo=ys(jo,rs),bn=ys(jo,rs,!0);if(Bo in Wi&&bn in Ka&&Wi[Bo]!==Ka[bn]){let ls=ko(Bo,bn,rs),No=qn(Bo,bn,gi[ls].geometry);delete Ka[Bo],delete Wi[bn],Wi[ys(jo,gi[No].geometry,!0)]=No,gi[ls].geometry=null}else Bo in Wi?qn(Bo,bn,rs):bn in Ka?ko(Bo,bn,rs):(en(vo),Ka[Bo]=qi-1,Wi[bn]=qi-1)}return gi.filter(vo=>vo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(D,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(D,J,this.layers,ve))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,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(D,J){let ve=this.lineVertexArray.length;if(D.segment!==void 0){let Ee=D.dist(J[D.segment+1]),Be=D.dist(J[D.segment]),Ge={};for(let ct=D.segment+1;ct<J.length;ct++)Ge[ct]={x:J[ct].x,y:J[ct].y,tileUnitDistanceFromAnchor:Ee},ct<J.length-1&&(Ee+=J[ct+1].dist(J[ct]));for(let ct=D.segment||0;ct>=0;ct--)Ge[ct]={x:J[ct].x,y:J[ct].y,tileUnitDistanceFromAnchor:Be},ct>0&&(Be+=J[ct-1].dist(J[ct]));for(let ct=0;ct<J.length;ct++){let At=Ge[ct];this.lineVertexArray.emplaceBack(At.x,At.y,At.tileUnitDistanceFromAnchor)}}return{lineStartIndex:ve,lineLength:this.lineVertexArray.length-ve}}addSymbols(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr){let Wr=D.indexArray,ia=D.layoutVertexArray,fa=D.segments.prepareSegment(4*J.length,ia,Wr,this.canOverlap?Ge.sortKey:void 0),ja=this.glyphOffsetArray.length,Ka=fa.vertexLength,Wi=this.allowVerticalPlacement&&ct===e.ah.vertical?Math.PI/2:0,gi=Ge.text&&Ge.text.sections;for(let qi=0;qi<J.length;qi++){let{tl:en,tr:qn,bl:ko,br:ys,tex:vo,pixelOffsetTL:zn,pixelOffsetBR:rs,minFontScaleX:jo,minFontScaleY:Bo,glyphOffset:bn,isSDF:ls,sectionIndex:No}=J[qi],Ps=fa.vertexLength,Ku=bn[1];Eg(ia,At.x,At.y,en.x,Ku+en.y,vo.x,vo.y,ve,ls,zn.x,zn.y,jo,Bo),Eg(ia,At.x,At.y,qn.x,Ku+qn.y,vo.x+vo.w,vo.y,ve,ls,rs.x,zn.y,jo,Bo),Eg(ia,At.x,At.y,ko.x,Ku+ko.y,vo.x,vo.y+vo.h,ve,ls,zn.x,rs.y,jo,Bo),Eg(ia,At.x,At.y,ys.x,Ku+ys.y,vo.x+vo.w,vo.y+vo.h,ve,ls,rs.x,rs.y,jo,Bo),z1(D.dynamicLayoutVertexArray,At,Wi),Wr.emplaceBack(Ps,Ps+1,Ps+2),Wr.emplaceBack(Ps+1,Ps+2,Ps+3),fa.vertexLength+=4,fa.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(bn[0]),qi!==J.length-1&&No===J[qi+1].sectionIndex||D.programConfigurations.populatePaintArrays(ia.length,Ge,Ge.index,{},zr,gi&&gi[No])}D.placedSymbolArray.emplaceBack(At.x,At.y,ja,this.glyphOffsetArray.length-ja,Ka,Bt,ar,At.segment,ve?ve[0]:0,ve?ve[1]:0,Ee[0],Ee[1],ct,0,!1,0,Sr)}_addCollisionDebugVertex(D,J,ve,Ee,Be,Ge){return J.emplaceBack(0,0),D.emplaceBack(ve.x,ve.y,Ee,Be,Math.round(Ge.x),Math.round(Ge.y))}addCollisionDebugVertices(D,J,ve,Ee,Be,Ge,ct){let At=Be.segments.prepareSegment(4,Be.layoutVertexArray,Be.indexArray),Bt=At.vertexLength,ar=Be.layoutVertexArray,Sr=Be.collisionVertexArray,zr=ct.anchorX,Wr=ct.anchorY;this._addCollisionDebugVertex(ar,Sr,Ge,zr,Wr,new n(D,J)),this._addCollisionDebugVertex(ar,Sr,Ge,zr,Wr,new n(ve,J)),this._addCollisionDebugVertex(ar,Sr,Ge,zr,Wr,new n(ve,Ee)),this._addCollisionDebugVertex(ar,Sr,Ge,zr,Wr,new n(D,Ee)),At.vertexLength+=4;let ia=Be.indexArray;ia.emplaceBack(Bt,Bt+1),ia.emplaceBack(Bt+1,Bt+2),ia.emplaceBack(Bt+2,Bt+3),ia.emplaceBack(Bt+3,Bt),At.primitiveLength+=4}addDebugCollisionBoxes(D,J,ve,Ee){for(let Be=D;Be<J;Be++){let Ge=this.collisionBoxArray.get(Be);this.addCollisionDebugVertices(Ge.x1,Ge.y1,Ge.x2,Ge.y2,Ee?this.textCollisionBox:this.iconCollisionBox,Ge.anchorPoint,ve)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new fv(Gl,Pv.members,et),this.iconCollisionBox=new fv(Gl,Pv.members,et);for(let D=0;D<this.symbolInstances.length;D++){let J=this.symbolInstances.get(D);this.addDebugCollisionBoxes(J.textBoxStartIndex,J.textBoxEndIndex,J,!0),this.addDebugCollisionBoxes(J.verticalTextBoxStartIndex,J.verticalTextBoxEndIndex,J,!0),this.addDebugCollisionBoxes(J.iconBoxStartIndex,J.iconBoxEndIndex,J,!1),this.addDebugCollisionBoxes(J.verticalIconBoxStartIndex,J.verticalIconBoxEndIndex,J,!1)}}_deserializeCollisionBoxesForSymbol(D,J,ve,Ee,Be,Ge,ct,At,Bt){let ar={};for(let Sr=J;Sr<ve;Sr++){let zr=D.get(Sr);ar.textBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},ar.textFeatureIndex=zr.featureIndex;break}for(let Sr=Ee;Sr<Be;Sr++){let zr=D.get(Sr);ar.verticalTextBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},ar.verticalTextFeatureIndex=zr.featureIndex;break}for(let Sr=Ge;Sr<ct;Sr++){let zr=D.get(Sr);ar.iconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},ar.iconFeatureIndex=zr.featureIndex;break}for(let Sr=At;Sr<Bt;Sr++){let zr=D.get(Sr);ar.verticalIconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},ar.verticalIconFeatureIndex=zr.featureIndex;break}return ar}deserializeCollisionBoxes(D){this.collisionArrays=[];for(let J=0;J<this.symbolInstances.length;J++){let ve=this.symbolInstances.get(J);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(D,ve.textBoxStartIndex,ve.textBoxEndIndex,ve.verticalTextBoxStartIndex,ve.verticalTextBoxEndIndex,ve.iconBoxStartIndex,ve.iconBoxEndIndex,ve.verticalIconBoxStartIndex,ve.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(D,J){let ve=D.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;Be<Ee;Be+=4)D.indexArray.emplaceBack(Be,Be+1,Be+2),D.indexArray.emplaceBack(Be+1,Be+2,Be+3)}getSortedSymbolIndexes(D){if(this.sortedAngle===D&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let J=Math.sin(D),ve=Math.cos(D),Ee=[],Be=[],Ge=[];for(let ct=0;ct<this.symbolInstances.length;++ct){Ge.push(ct);let At=this.symbolInstances.get(ct);Ee.push(0|Math.round(J*At.anchorX+ve*At.anchorY)),Be.push(At.featureIndex)}return Ge.sort((ct,At)=>Ee[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(D,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let J of this.symbolInstanceIndexes){let ve=this.symbolInstances.get(J);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach((Ee,Be,Ge)=>{Ee>=0&&Ge.indexOf(Ee)===Be&&this.addIndicesForPlacedSymbol(this.text,Ee)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let cf,C0;mi("SymbolBucket",cm,{omit:["layers","collisionBoxArray","features","compareText"]}),cm.MAX_GLYPHS=65535,cm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Fe({"icon-opacity":new zo(re.paint_symbol["icon-opacity"]),"icon-color":new zo(re.paint_symbol["icon-color"]),"icon-halo-color":new zo(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new zo(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zo(re.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new zo(re.paint_symbol["text-opacity"]),"text-color":new zo(re.paint_symbol["text-color"],{runtimeType:Nt,getOverride:W=>W.textColor,hasOverride:W=>!!W.textColor}),"text-halo-color":new zo(re.paint_symbol["text-halo-color"]),"text-halo-width":new zo(re.paint_symbol["text-halo-width"]),"text-halo-blur":new zo(re.paint_symbol["text-halo-blur"]),"text-translate":new fo(re.paint_symbol["text-translate"]),"text-translate-anchor":new fo(re.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Fe({"symbol-placement":new fo(re.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zo(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new zo(re.layout_symbol["icon-size"]),"icon-text-fit":new fo(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new zo(re.layout_symbol["icon-image"]),"icon-rotate":new zo(re.layout_symbol["icon-rotate"]),"icon-padding":new zo(re.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(re.layout_symbol["icon-keep-upright"]),"icon-offset":new zo(re.layout_symbol["icon-offset"]),"icon-anchor":new zo(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(re.layout_symbol["text-rotation-alignment"]),"text-field":new zo(re.layout_symbol["text-field"]),"text-font":new zo(re.layout_symbol["text-font"]),"text-size":new zo(re.layout_symbol["text-size"]),"text-max-width":new zo(re.layout_symbol["text-max-width"]),"text-line-height":new fo(re.layout_symbol["text-line-height"]),"text-letter-spacing":new zo(re.layout_symbol["text-letter-spacing"]),"text-justify":new zo(re.layout_symbol["text-justify"]),"text-radial-offset":new zo(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zo(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zo(re.layout_symbol["text-anchor"]),"text-max-angle":new fo(re.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(re.layout_symbol["text-writing-mode"]),"text-rotate":new zo(re.layout_symbol["text-rotate"]),"text-padding":new fo(re.layout_symbol["text-padding"]),"text-keep-upright":new fo(re.layout_symbol["text-keep-upright"]),"text-transform":new zo(re.layout_symbol["text-transform"]),"text-offset":new zo(re.layout_symbol["text-offset"]),"text-allow-overlap":new fo(re.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(re.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(re.layout_symbol["text-ignore-placement"]),"text-optional":new fo(re.layout_symbol["text-optional"])})}};class L0{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:rt,this.defaultValue=D}evaluate(D){if(D.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(D.formattedSection))return J.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class Dv extends ie{constructor(D){super(D,kg)}recalculate(D,J){if(super.recalculate(D,J),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 ve=this.layout.get("text-writing-mode");if(ve){let Ee=[];for(let Be of ve)Ee.indexOf(Be)<0&&Ee.push(Be);this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,J,ve,Ee){let Be=this.layout.get(D).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[D];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Bt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(D){return new cm(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of kg.paint.overridableProperties){if(!Dv.hasPaintOverride(this.layout,D))continue;let J=this.paint.get(D),ve=new L0(J),Ee=new Lu(ve,J.property.specification),Be=null;Be=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",Ee):new yu("composite",Ee,J.value.zoomStops),this.paint._values[D]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(D,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&Dv.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,J){let ve=D.get("text-field"),Ee=kg.paint.properties[J],Be=!1,Ge=ct=>{for(let At of ct)if(Ee.overrides&&Ee.overrides.hasOverride(At))return void(Be=!0)};if(ve.value.kind==="constant"&&ve.value.value instanceof ra)Ge(ve.value.value.sections);else if(ve.value.kind==="source"){let ct=Bt=>{Be||(Bt instanceof tn&&Ra(Bt.value)===qr?Ge(Bt.value.sections):Bt instanceof ns?Ge(Bt.sections):Bt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Fe({"background-color":new fo(re.paint_background["background-color"]),"background-pattern":new lc(re.paint_background["background-pattern"]),"background-opacity":new fo(re.paint_background["background-opacity"])})}};class QT extends ie{constructor(D){super(D,P0)}}let B1;var Ux={get paint(){return B1=B1||new Fe({"raster-opacity":new fo(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(re.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(re.paint_raster["raster-saturation"]),"raster-contrast":new fo(re.paint_raster["raster-contrast"]),"raster-resampling":new fo(re.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(re.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(D){super(D,Ux)}}class N1 extends ie{constructor(D){super(D,{}),this.onAdd=J=>{this.implementation.onAdd&&this.implementation.onAdd(J,J.painter.context.gl)},this.onRemove=J=>{this.implementation.onRemove&&this.implementation.onRemove(J,J.painter.context.gl)},this.implementation=D}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 U1{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let j1=63710088e-1;class Hd{constructor(D,J){if(isNaN(D)||isNaN(J))throw new Error(`Invalid LngLat object: (${D}, ${J})`);if(this.lng=+D,this.lat=+J,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let J=Math.PI/180,ve=this.lat*J,Ee=D.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((D.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(D){if(D instanceof Hd)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new Hd(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new Hd(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}let fm=2*Math.PI*j1;function jx(W){return fm*Math.cos(W*Math.PI/180)}function Cg(W){return(180+W)/360}function qx(W){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W*Math.PI/360)))/360}function Lg(W,D){return W/jx(D)}function R0(W){return 360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90}class D0{constructor(D,J,ve=0){this.x=+D,this.y=+J,this.z=+ve}static fromLngLat(D,J=0){let ve=Hd.convert(D);return new D0(Cg(ve.lng),qx(ve.lat),Lg(J,ve.lat))}toLngLat(){return new Hd(360*this.x-180,R0(this.y))}toAltitude(){return this.z*jx(R0(this.y))}meterInMercatorCoordinateUnits(){return 1/fm*(D=R0(this.y),1/Math.cos(D*Math.PI/180));var D}}function rd(W,D,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[W*ve-2*Math.PI*6378137/2,D*ve-2*Math.PI*6378137/2]}class q1{constructor(D,J,ve){if(!function(Ee,Be,Ge){return!(Ee<0||Ee>25||Ge<0||Ge>=Math.pow(2,Ee)||Be<0||Be>=Math.pow(2,Ee))}(D,J,ve))throw new Error(`x=${J}, y=${ve}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=J,this.y=ve,this.key=z0(0,D,D,J,ve)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,J,ve){let Ee=(Ge=this.y,ct=this.z,At=rd(256*(Be=this.x),256*(Ge=Math.pow(2,ct)-Ge-1),ct),Bt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Bt[0]+","+Bt[1]);var Be,Ge,ct,At,Bt;let ar=function(Sr,zr,Wr){let ia,fa="";for(let ja=Sr;ja>0;ja--)ia=1<<ja-1,fa+=(zr&ia?1:0)+(Wr&ia?2:0);return fa}(this.z,this.x,this.y);return D[(this.x+this.y)%D.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(ve==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,J>1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(D){let J=this.z-D.z;return J>0&&D.x===this.x>>J&&D.y===this.y>>J}getTilePoint(D){let J=Math.pow(2,this.z);return new n((D.x*J-this.x)*po,(D.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(D,J){this.wrap=D,this.canonical=J,this.key=z0(D,J.z,J.z,J.x,J.y)}}class Gp{constructor(D,J,ve,Ee,Be){if(D<ve)throw new Error(`overscaledZ should be >= z; overscaledZ = ${D}; z = ${ve}`);this.overscaledZ=D,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,D,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-D;return D>this.canonical.z?new Gp(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(D,this.wrap,D,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(D,J){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-D;return D>this.canonical.z?z0(this.wrap*+J,D,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,D,D,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let J=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ<this.overscaledZ&&D.canonical.x===this.canonical.x>>J&&D.canonical.y===this.canonical.y>>J}children(D){if(this.overscaledZ>=D)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let J=this.canonical.z+1,ve=2*this.canonical.x,Ee=2*this.canonical.y;return[new Gp(J,this.wrap,J,ve,Ee),new Gp(J,this.wrap,J,ve+1,Ee),new Gp(J,this.wrap,J,ve,Ee+1),new Gp(J,this.wrap,J,ve+1,Ee+1)]}isLessThan(D){return this.wrap<D.wrap||!(this.wrap>D.wrap)&&(this.overscaledZ<D.overscaledZ||!(this.overscaledZ>D.overscaledZ)&&(this.canonical.x<D.canonical.x||!(this.canonical.x>D.canonical.x)&&this.canonical.y<D.canonical.y))}wrapped(){return new Gp(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(D){return new Gp(this.overscaledZ,D,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Vx(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(D){return this.canonical.getTilePoint(new D0(D.x-this.wrap,D.y))}}function z0(W,D,J,ve,Ee){(W*=2)<0&&(W=-1*W-1);let Be=1<<J;return(Be*Be*W+Be*Ee+ve).toString(36)+J.toString(36)+D.toString(36)}mi("CanonicalTileID",q1),mi("OverscaledTileID",Gp,{omit:["posMatrix"]});class Gx{constructor(D,J,ve,Ee=1,Be=1,Ge=1,ct=0){if(this.uid=D,J.height!==J.width)throw new RangeError("DEM tiles must be square");if(ve&&!["mapbox","terrarium","custom"].includes(ve))return void m(`"${ve}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=J.height;let At=this.dim=J.height-2;switch(this.data=new Uint32Array(J.data.buffer),ve){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=Ee,this.greenFactor=Be,this.blueFactor=Ge,this.baseShift=ct;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let Bt=0;Bt<At;Bt++)this.data[this._idx(-1,Bt)]=this.data[this._idx(0,Bt)],this.data[this._idx(At,Bt)]=this.data[this._idx(At-1,Bt)],this.data[this._idx(Bt,-1)]=this.data[this._idx(Bt,0)],this.data[this._idx(Bt,At)]=this.data[this._idx(Bt,At-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(At,-1)]=this.data[this._idx(At-1,0)],this.data[this._idx(-1,At)]=this.data[this._idx(0,At-1)],this.data[this._idx(At,At)]=this.data[this._idx(At-1,At-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let Bt=0;Bt<At;Bt++)for(let ar=0;ar<At;ar++){let Sr=this.get(Bt,ar);Sr>this.max&&(this.max=Sr),Sr<this.min&&(this.min=Sr)}}get(D,J){let ve=new Uint8Array(this.data.buffer),Ee=4*this._idx(D,J);return this.unpack(ve[Ee],ve[Ee+1],ve[Ee+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(D,J){if(D<-1||D>=this.dim+1||J<-1||J>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(J+1)*this.stride+(D+1)}unpack(D,J,ve){return D*this.redFactor+J*this.greenFactor+ve*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,J,ve){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Ee=J*this.dim,Be=J*this.dim+this.dim,Ge=ve*this.dim,ct=ve*this.dim+this.dim;switch(J){case-1:Ee=Be-1;break;case 1:Be=Ee+1}switch(ve){case-1:Ge=ct-1;break;case 1:ct=Ge+1}let At=-J*this.dim,Bt=-ve*this.dim;for(let ar=Ge;ar<ct;ar++)for(let Sr=Ee;Sr<Be;Sr++)this.data[this._idx(Sr,ar)]=D.data[this._idx(Sr+At,ar+Bt)]}}mi("DEMData",Gx);class Hx{constructor(D){this._stringToNumber={},this._numberToString=[];for(let J=0;J<D.length;J++){let ve=D[J];this._stringToNumber[ve]=J,this._numberToString[J]=ve}}encode(D){return this._stringToNumber[D]}decode(D){if(D>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class V1{constructor(D,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=D,D._z=J,D._x=ve,D._y=Ee,this.properties=D.properties,this.id=Be}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(D[J]=this[J]);return D}}class zv{constructor(D,J){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(D,J,ve,Ee,Be,Ge){let ct=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ve,Ee,Be);let At=Ge?this.grid3D:this.grid;for(let Bt=0;Bt<J.length;Bt++){let ar=J[Bt],Sr=[1/0,1/0,-1/0,-1/0];for(let zr=0;zr<ar.length;zr++){let Wr=ar[zr];Sr[0]=Math.min(Sr[0],Wr.x),Sr[1]=Math.min(Sr[1],Wr.y),Sr[2]=Math.max(Sr[2],Wr.x),Sr[3]=Math.max(Sr[3],Wr.y)}Sr[0]<po&&Sr[1]<po&&Sr[2]>=0&&Sr[3]>=0&&At.insert(ct,Sr[0],Sr[1],Sr[2],Sr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Jr.VectorTile(new P1(this.rawTileData)).layers,this.sourceLayerCoder=new Hx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,J,ve,Ee){this.loadVTLayers();let Be=D.params||{},Ge=po/D.tileSize/D.scale,ct=Ec(Be.filter),At=D.queryGeometry,Bt=D.queryPadding*Ge,ar=Xx(At),Sr=this.grid.query(ar.minX-Bt,ar.minY-Bt,ar.maxX+Bt,ar.maxY+Bt),zr=Xx(D.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Bt,zr.minY-Bt,zr.maxX+Bt,zr.maxY+Bt,(ja,Ka,Wi,gi)=>function(qi,en,qn,ko,ys){for(let zn of qi)if(en<=zn.x&&qn<=zn.y&&ko>=zn.x&&ys>=zn.y)return!0;let vo=[new n(en,qn),new n(en,ys),new n(ko,ys),new n(ko,qn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn<qi.length-1;zn++)if(yi(qi[zn],qi[zn+1],vo))return!0;return!1}(D.cameraQueryGeometry,ja-Bt,Ka-Bt,Wi+Bt,gi+Bt));for(let ja of Wr)Sr.push(ja);Sr.sort(eA);let ia={},fa;for(let ja=0;ja<Sr.length;ja++){let Ka=Sr[ja];if(Ka===fa)continue;fa=Ka;let Wi=this.featureIndexArray.get(Ka),gi=null;this.loadMatchingFeature(ia,Wi.bucketIndex,Wi.sourceLayerIndex,Wi.featureIndex,ct,Be.layers,Be.availableImages,J,ve,Ee,(qi,en,qn)=>(gi||(gi=Al(qi)),en.queryIntersectsFeature(At,qi,qn,gi,this.z,D.transform,Ge,D.pixelPosMatrix)))}return ia}loadMatchingFeature(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr){let zr=this.bucketLayerIDs[J];if(Ge&&!function(ja,Ka){for(let Wi=0;Wi<ja.length;Wi++)if(Ka.indexOf(ja[Wi])>=0)return!0;return!1}(Ge,zr))return;let Wr=this.sourceLayerCoder.decode(ve),ia=this.vtLayers[Wr].feature(Ee);if(Be.needGeometry){let ja=Hl(ia,!0);if(!Be.filter(new Ds(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Ds(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja<zr.length;ja++){let Ka=zr[ja];if(Ge&&Ge.indexOf(Ka)<0)continue;let Wi=At[Ka];if(!Wi)continue;let gi={};fa&&ar&&(gi=ar.getState(Wi.sourceLayer||"_geojsonTileLayer",fa));let qi=M({},Bt[Ka]);qi.paint=Wx(qi.paint,Wi.paint,ia,gi,ct),qi.layout=Wx(qi.layout,Wi.layout,ia,gi,ct);let en=!Sr||Sr(ia,Wi,gi);if(!en)continue;let qn=new V1(ia,this.z,this.x,this.y,fa);qn.layer=qi;let ko=D[Ka];ko===void 0&&(ko=D[Ka]=[]),ko.push({featureIndex:Ee,feature:qn,intersectionZ:en})}}lookupSymbolFeatures(D,J,ve,Ee,Be,Ge,ct,At){let Bt={};this.loadVTLayers();let ar=Ec(Be);for(let Sr of D)this.loadMatchingFeature(Bt,ve,Ee,Sr,ar,Ge,ct,At,J);return Bt}hasLayer(D){for(let J of this.bucketLayerIDs)for(let ve of J)if(D===ve)return!0;return!1}getId(D,J){let ve=D.id;return this.promoteId&&(ve=D.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[J]],typeof ve=="boolean"&&(ve=Number(ve))),ve}}function Wx(W,D,J,ve,Ee){return b(W,(Be,Ge)=>{let ct=D instanceof yc?D.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(W){let D=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of W)D=Math.min(D,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:D,minY:J,maxX:ve,maxY:Ee}}function eA(W,D){return D-W}function Zx(W,D,J,ve,Ee){let Be=[];for(let Ge=0;Ge<W.length;Ge++){let ct=W[Ge],At;for(let Bt=0;Bt<ct.length-1;Bt++){let ar=ct[Bt],Sr=ct[Bt+1];ar.x<D&&Sr.x<D||(ar.x<D?ar=new n(D,ar.y+(D-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round():Sr.x<D&&(Sr=new n(D,ar.y+(D-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round()),ar.y<J&&Sr.y<J||(ar.y<J?ar=new n(ar.x+(J-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),J)._round():Sr.y<J&&(Sr=new n(ar.x+(J-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),J)._round()),ar.x>=ve&&Sr.x>=ve||(ar.x>=ve?ar=new n(ve,ar.y+(ve-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round():Sr.x>=ve&&(Sr=new n(ve,ar.y+(ve-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round()),ar.y>=Ee&&Sr.y>=Ee||(ar.y>=Ee?ar=new n(ar.x+(Ee-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),Ee)._round():Sr.y>=Ee&&(Sr=new n(ar.x+(Ee-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Sr)))))}}return Be}mi("FeatureIndex",zv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends n{constructor(D,J,ve,Ee){super(D,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(W,D,J,ve,Ee){if(D.segment===void 0||J===0)return!0;let Be=D,Ge=D.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=W[Ge].dist(Be),Be=W[Ge]}ct+=W[Ge].dist(W[Ge+1]),Ge++;let At=[],Bt=0;for(;ct<J/2;){let ar=W[Ge],Sr=W[Ge+1];if(!Sr)return!1;let zr=W[Ge-1].angleTo(ar)-ar.angleTo(Sr);for(zr=Math.abs((zr+3*Math.PI)%(2*Math.PI)-Math.PI),At.push({distance:ct,angleDelta:zr}),Bt+=zr;ct-At[0].distance>ve;)Bt-=At.shift().angleDelta;if(Bt>Ee)return!1;Ge++,ct+=ar.dist(Sr)}return!0}function Yx(W){let D=0;for(let J=0;J<W.length-1;J++)D+=W[J].dist(W[J+1]);return D}function Kx(W,D,J){return W?.6*D*J:0}function Jx(W,D){return Math.max(W?W.right-W.left:0,D?D.right-D.left:0)}function tA(W,D,J,ve,Ee,Be){let Ge=Kx(J,Ee,Be),ct=Jx(J,ve)*Be,At=0,Bt=Yx(W)/2;for(let ar=0;ar<W.length-1;ar++){let Sr=W[ar],zr=W[ar+1],Wr=Sr.dist(zr);if(At+Wr>Bt){let ia=(Bt-At)/Wr,fa=Bn.number(Sr.x,zr.x,ia),ja=Bn.number(Sr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Sr),ar);return Ka._round(),!Ge||G1(W,Ka,ct,Ge,D)?Ka:void 0}At+=Wr}}function rA(W,D,J,ve,Ee,Be,Ge,ct,At){let Bt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Sr=ar*Ge,zr=W[0].x===0||W[0].x===At||W[0].y===0||W[0].y===At;return D-Sr<D/4&&(D=Sr+D/4),$x(W,zr?D/2*ct%D:(ar/2+2*Be)*Ge*ct%D,D,Bt,J,Sr,zr,!1,At)}function $x(W,D,J,ve,Ee,Be,Ge,ct,At){let Bt=Be/2,ar=Yx(W),Sr=0,zr=D-J,Wr=[];for(let ia=0;ia<W.length-1;ia++){let fa=W[ia],ja=W[ia+1],Ka=fa.dist(ja),Wi=ja.angleTo(fa);for(;zr+J<Sr+Ka;){zr+=J;let gi=(zr-Sr)/Ka,qi=Bn.number(fa.x,ja.x,gi),en=Bn.number(fa.y,ja.y,gi);if(qi>=0&&qi<At&&en>=0&&en<At&&zr-Bt>=0&&zr+Bt<=ar){let qn=new Wd(qi,en,Wi,ia);qn._round(),ve&&!G1(W,qn,Be,ve,Ee)||Wr.push(qn)}}Sr+=Ka}return ct||Wr.length||Ge||(Wr=$x(W,Sr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let hm=zh;function Qx(W,D,J,ve){let Ee=[],Be=W.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*hm,At=Be.paddedRect.h-2*hm,Bt={x1:W.left,y1:W.top,x2:W.right,y2:W.bottom},ar=Be.stretchX||[[0,ct]],Sr=Be.stretchY||[[0,At]],zr=(bn,ls)=>bn+ls[1]-ls[0],Wr=ar.reduce(zr,0),ia=Sr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,qn=fa,ko=0,ys=ja;if(Be.content&&ve){let bn=Be.content,ls=bn[2]-bn[0],No=bn[3]-bn[1];(Be.textFitWidth||Be.textFitHeight)&&(Bt=Fx(W)),Ka=Xd(ar,0,bn[0]),gi=Xd(Sr,0,bn[1]),Wi=Xd(ar,bn[0],bn[2]),qi=Xd(Sr,bn[1],bn[3]),en=bn[0]-Ka,ko=bn[1]-gi,qn=ls-Wi,ys=No-qi}let vo=Bt.x1,zn=Bt.y1,rs=Bt.x2-vo,jo=Bt.y2-zn,Bo=(bn,ls,No,Ps)=>{let Ku=Pg(bn.stretch-Ka,Wi,rs,vo),Uu=pm(bn.fixed-en,qn,bn.stretch,Wr),th=Pg(ls.stretch-gi,qi,jo,zn),Hp=pm(ls.fixed-ko,ys,ls.stretch,ia),Th=Pg(No.stretch-Ka,Wi,rs,vo),rh=pm(No.fixed-en,qn,No.stretch,Wr),Jh=Pg(Ps.stretch-gi,qi,jo,zn),$h=pm(Ps.fixed-ko,ys,Ps.stretch,ia),Qh=new n(Ku,th),ff=new n(Th,th),ah=new n(Th,Jh),Fh=new n(Ku,Jh),Ah=new n(Uu/Ge,Hp/Ge),dh=new n(rh/Ge,$h/Ge),yf=D*Math.PI/180;if(yf){let hu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-hu,hu,fc];Qh._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=bn.stretch+bn.fixed,dp=ls.stretch+ls.fixed;return{tl:Qh,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+hm+Rp,y:Be.paddedRect.y+hm+dp,w:No.stretch+No.fixed-Rp,h:Ps.stretch+Ps.fixed-dp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:qn/Ge/rs,minFontScaleY:ys/Ge/jo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let bn=eb(ar,fa,Wr),ls=eb(Sr,ja,ia);for(let No=0;No<bn.length-1;No++){let Ps=bn[No],Ku=bn[No+1];for(let Uu=0;Uu<ls.length-1;Uu++)Ee.push(Bo(Ps,ls[Uu],Ku,ls[Uu+1]))}}else Ee.push(Bo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ct+1},{fixed:0,stretch:At+1}));return Ee}function Xd(W,D,J){let ve=0;for(let Ee of W)ve+=Math.max(D,Math.min(J,Ee[1]))-Math.max(D,Math.min(J,Ee[0]));return ve}function eb(W,D,J){let ve=[{fixed:-hm,stretch:0}];for(let[Ee,Be]of W){let Ge=ve[ve.length-1];ve.push({fixed:Ee-Ge.stretch,stretch:Ge.stretch}),ve.push({fixed:Ee-Ge.stretch,stretch:Ge.stretch+(Be-Ee)})}return ve.push({fixed:D+hm,stretch:J}),ve}function Pg(W,D,J,ve){return W/D*J+ve}function pm(W,D,J,ve){return W-D*J/ve}class hv{constructor(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){var Sr;if(this.boxStartIndex=D.length,Bt){let zr=Ge.top,Wr=Ge.bottom,ia=Ge.collisionPadding;ia&&(zr-=ia[1],Wr+=ia[3]);let fa=Wr-zr;fa>0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Sr=Ge.image)===null||Sr===void 0)&&Sr.content&&(Ge.image.textFitWidth||Ge.image.textFitHeight)?Fx(Ge):{x1:Ge.left,y1:Ge.top,x2:Ge.right,y2:Ge.bottom};zr.y1=zr.y1*ct-At[0],zr.y2=zr.y2*ct+At[2],zr.x1=zr.x1*ct-At[3],zr.x2=zr.x2*ct+At[1];let Wr=Ge.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ct,zr.y1-=Wr[1]*ct,zr.x2+=Wr[2]*ct,zr.y2+=Wr[3]*ct),ar){let ia=new n(zr.x1,zr.y1),fa=new n(zr.x2,zr.y1),ja=new n(zr.x1,zr.y2),Ka=new n(zr.x2,zr.y2),Wi=ar*Math.PI/180;ia._rotate(Wi),fa._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,fa.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,fa.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,fa.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,fa.y,ja.y,Ka.y)}D.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=D.length}}class cd{constructor(D=[],J=(ve,Ee)=>ve<Ee?-1:ve>Ee?1:0){if(this.data=D,this.length=this.data.length,this.compare=J,this.length>0)for(let ve=(this.length>>1)-1;ve>=0;ve--)this._down(ve)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:J,compare:ve}=this,Ee=J[D];for(;D>0;){let Be=D-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[D]=Ge,D=Be}J[D]=Ee}_down(D){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[D];for(;D<Ee;){let Ge=1+(D<<1),ct=Ge+1;if(ct<this.length&&ve(J[ct],J[Ge])<0&&(Ge=ct),ve(J[Ge],Be)>=0)break;J[D]=J[Ge],D=Ge}J[D]=Be}}function aA(W,D=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=W[0];for(let Wr=0;Wr<ct.length;Wr++){let ia=ct[Wr];(!Wr||ia.x<ve)&&(ve=ia.x),(!Wr||ia.y<Ee)&&(Ee=ia.y),(!Wr||ia.x>Be)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Bt=At/2,ar=new cd([],iA);if(At===0)return new n(ve,Ee);for(let Wr=ve;Wr<Be;Wr+=At)for(let ia=Ee;ia<Ge;ia+=At)ar.push(new dm(Wr+Bt,ia+Bt,Bt,W));let Sr=function(Wr){let ia=0,fa=0,ja=0,Ka=Wr[0];for(let Wi=0,gi=Ka.length,qi=gi-1;Wi<gi;qi=Wi++){let en=Ka[Wi],qn=Ka[qi],ko=en.x*qn.y-qn.x*en.y;fa+=(en.x+qn.x)*ko,ja+=(en.y+qn.y)*ko,ia+=3*ko}return new dm(fa/ia,ja/ia,0,Wr)}(W),zr=ar.length;for(;ar.length;){let Wr=ar.pop();(Wr.d>Sr.d||!Sr.d)&&(Sr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Sr.d<=D||(Bt=Wr.h/2,ar.push(new dm(Wr.p.x-Bt,Wr.p.y-Bt,Bt,W)),ar.push(new dm(Wr.p.x+Bt,Wr.p.y-Bt,Bt,W)),ar.push(new dm(Wr.p.x-Bt,Wr.p.y+Bt,Bt,W)),ar.push(new dm(Wr.p.x+Bt,Wr.p.y+Bt,Bt,W)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Sr.d}`)),Sr.p}function iA(W,D){return D.max-W.max}function dm(W,D,J,ve){this.p=new n(W,D),this.h=J,this.d=function(Ee,Be){let Ge=!1,ct=1/0;for(let At=0;At<Be.length;At++){let Bt=Be[At];for(let ar=0,Sr=Bt.length,zr=Sr-1;ar<Sr;zr=ar++){let Wr=Bt[ar],ia=Bt[zr];Wr.y>Ee.y!=ia.y>Ee.y&&Ee.x<(ia.x-Wr.x)*(Ee.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(Ge=!Ge),ct=Math.min(ct,ya(Ee,Wr,ia))}}return(Ge?1:-1)*Math.sqrt(ct)}(this.p,ve),this.max=this.d+this.h*Math.SQRT2}var wh;e.aq=void 0,(wh=e.aq||(e.aq={}))[wh.center=1]="center",wh[wh.left=2]="left",wh[wh.right=3]="right",wh[wh.top=4]="top",wh[wh.bottom=5]="bottom",wh[wh["top-left"]=6]="top-left",wh[wh["top-right"]=7]="top-right",wh[wh["bottom-left"]=8]="bottom-left",wh[wh["bottom-right"]=9]="bottom-right";let pv=7,Fv=Number.POSITIVE_INFINITY;function H1(W,D){return D[1]!==Fv?function(J,ve,Ee){let Be=0,Ge=0;switch(ve=Math.abs(ve),Ee=Math.abs(Ee),J){case"top-right":case"top-left":case"top":Ge=Ee-pv;break;case"bottom-right":case"bottom-left":case"bottom":Ge=-Ee+pv}switch(J){case"top-right":case"bottom-right":case"right":Be=-ve;break;case"top-left":case"bottom-left":case"left":Be=ve}return[Be,Ge]}(W,D[0],D[1]):function(J,ve){let Ee=0,Be=0;ve<0&&(ve=0);let Ge=ve/Math.SQRT2;switch(J){case"top-right":case"top-left":Be=Ge-pv;break;case"bottom-right":case"bottom-left":Be=-Ge+pv;break;case"bottom":Be=-ve+pv;break;case"top":Be=ve-pv}switch(J){case"top-right":case"bottom-right":Ee=-Ge;break;case"top-left":case"bottom-left":Ee=Ge;break;case"left":Ee=ve;break;case"right":Ee=-ve}return[Ee,Be]}(W,D[0])}function tb(W,D,J){var ve;let Ee=W.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(D,{},J);if(Be){let ct=Be.values,At=[];for(let Bt=0;Bt<ct.length;Bt+=2){let ar=At[Bt]=ct[Bt],Sr=ct[Bt+1].map(zr=>zr*fu);ar.startsWith("top")?Sr[1]-=pv:ar.startsWith("bottom")&&(Sr[1]+=pv),At[Bt+1]=Sr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=W._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(D,{},J)*fu,Fv]:Ee.get("text-offset").evaluate(D,{},J).map(Bt=>Bt*fu);let At=[];for(let Bt of Ge)At.push(Bt,H1(Bt,ct));return new $a(At)}return null}function W1(W){switch(W){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=Be.textMaxSize.evaluate(D,{});Sr===void 0&&(Sr=Ge);let zr=W.layers[0].layout,Wr=zr.get("icon-offset").evaluate(D,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=W.tilePixelRatio*fa,Ka=W.tilePixelRatio*Sr/24,Wi=W.tilePixelRatio*ct,gi=W.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*W.tilePixelRatio,en=function(bn,ls,No,Ps=1){let Ku=bn.get("icon-padding").evaluate(ls,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Ps,Uu[1]*Ps,Uu[2]*Ps,Uu[3]*Ps]}(zr,D,ar,W.tilePixelRatio),qn=zr.get("text-max-angle")/180*Math.PI,ko=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",ys=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,rs=zr.get("icon-text-fit"),jo;ve&&rs!=="none"&&(W.allowVerticalPlacement&&J.vertical&&(jo=Ox(ve,J.vertical,rs,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,rs,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(bn,ls)=>{ls.x<0||ls.x>=po||ls.y<0||ls.y>=po||function(No,Ps,Ku,Uu,th,Hp,Th,rh,Jh,$h,Qh,ff,ah,Fh,Ah,dh,yf,Rp,dp,hu,fc,Ju,Dp,$c,vm){let _d=No.addToLineVertexArray(Ps,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,vp=0,mm=0,J1=-1,zg=-1,xd={},Ov=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},$c)+90;zc=new hv(Jh,Ps,$h,Qh,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv(Jh,Ps,$h,Qh,ff,Th,yf,Rp,Ah,Oh))}if(th){let Oh=rh.layout.get("icon-rotate").evaluate(fc,{}),Zp=rh.layout.get("icon-text-fit")!=="none",dv=Qx(th,Oh,Dp,Zp),ep=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv(Jh,Ps,$h,Qh,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=No.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&m(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},$c),yd*Ju.compositeIconSizes[1].evaluate(fc,{},$c)],(id[0]>cv||id[1]>cv)&&m(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,hu,dp,fc,e.ah.none,Ps,_d.lineStartIndex,_d.lineLength,-1,$c),J1=No.icon.placedSymbolArray.length-1,ep&&(Zd=4*ep.length,No.addSymbols(No.icon,ep,id,hu,dp,fc,e.ah.vertical,Ps,_d.lineStartIndex,_d.lineLength,-1,$c),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Ov=ti(Zp.text);let ep=rh.layout.get("text-rotate").evaluate(fc,{},$c);fd=new hv(Jh,Ps,$h,Qh,ff,Zp,ah,Fh,Ah,ep)}let dv=Zp.positionedLines.length===1;if(vp+=rb(No,Ps,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,$c),dv)break}Uu.vertical&&(mm+=rb(No,Ps,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,$c));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,mp=zc?zc.boxEndIndex:No.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:No.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:No.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:No.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:No.collisionBoxArray.length,ad=-1,B0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;ad=B0(fd,ad),ad=B0(zc,ad),ad=B0(Wp,ad),ad=B0(Pf,ad);let Og=ad>-1?1:0;Og&&(ad*=vm/fu),No.glyphOffsetArray.length>=cm.MAX_GLYPHS&&m("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),fc.sortKey!==void 0&&No.addToSortKeyRanges(No.symbolInstances.length,fc.sortKey);let $1=tb(rh,fc,$c),[fA,hA]=function(Oh,Zp){let dv=Oh.length,ep=Zp?.values;if(ep?.length>0)for(let Bh=0;Bh<ep.length;Bh+=2){let id=ep[Bh+1];Oh.emplaceBack(e.aq[ep[Bh]],id[0],id[1])}return[dv,Oh.length]}(No.textAnchorOffsets,$1);No.symbolInstances.emplaceBack(Ps.x,Ps.y,xd.right>=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,zg,Ov,lA,Fg,bd,mp,sb,uA,lb,cA,$h,vp,mm,Xp,Zd,Og,0,ah,ad,fA,hA)}(W,ls,bn,J,ve,Ee,jo,W.layers[0],W.collisionBoxArray,D.index,D.sourceLayerIndex,W.index,ja,[qi,qi,qi,qi],ko,At,Wi,en,ys,Wr,D,Be,Bt,ar,Ge)};if(vo==="line")for(let bn of Zx(D.geometry,0,0,po,po)){let ls=rA(bn,gi,qn,J.vertical||ia,ve,24,Ka,W.overscaling,po);for(let No of ls)ia&&oA(W,ia.text,zn,No)||Bo(bn,No)}else if(vo==="line-center"){for(let bn of D.geometry)if(bn.length>1){let ls=tA(bn,qn,J.vertical||ia,ve,24,Ka);ls&&Bo(bn,ls)}}else if(D.type==="Polygon")for(let bn of Tc(D.geometry,0)){let ls=aA(bn,16);Bo(bn[0],new Wd(ls.x,ls.y,0))}else if(D.type==="LineString")for(let bn of D.geometry)Bo(bn,new Wd(bn[0].x,bn[0].y,0));else if(D.type==="Point")for(let bn of D.geometry)for(let ls of bn)Bo([ls],new Wd(ls.x,ls.y,0))}function rb(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,qn,ko,ys,vo){let zn=en.layout.get("text-rotate").evaluate(ko,{})*Math.PI/180,rs=[];for(let jo of gi.positionedLines)for(let Bo of jo.positionedGlyphs){if(!Bo.rect)continue;let bn=Bo.rect||{},ls=Ix+1,No=!0,Ps=1,Ku=0,Uu=(qn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=jo.lineOffset/2-(Bo.imageName?-(fu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*fu)),Bo.imageName){let hu=ys[Bo.imageName];No=hu.sdf,Ps=hu.pixelRatio,ls=zh/Ps}let Hp=qn?[Bo.x+th,Bo.y]:[0,0],Th=qn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let Jh=Bo.metrics.isDoubleResolution?2:1,$h=(Bo.metrics.left-ls)*Bo.scale-th+Th[0],Qh=(-Bo.metrics.top-ls)*Bo.scale+Th[1],ff=$h+bn.w/Jh*Bo.scale/Ps,ah=Qh+bn.h/Jh*Bo.scale/Ps,Fh=new n($h,Qh),Ah=new n(ff,Qh),dh=new n($h,ah),yf=new n(ff,ah);if(Uu){let hu=new n(-th,th-eh),fc=-Math.PI/2,Ju=fu/2-th,Dp=new n(5-eh-Ju,-(Bo.imageName?Ju:0)),$c=new n(...rh);Fh._rotateAround(fc,hu)._add(Dp)._add($c),Ah._rotateAround(fc,hu)._add(Dp)._add($c),dh._rotateAround(fc,hu)._add(Dp)._add($c),yf._rotateAround(fc,hu)._add(Dp)._add($c)}if(zn){let hu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-hu,hu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new n(0,0),dp=new n(0,0);rs.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:bn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:dp,minFontScaleX:0,minFontScaleY:0})}return rs}(0,J,ct,Ee,Be,Ge,ve,W.allowVerticalPlacement),ja=W.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&m(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(Ge,{},ia),yd*Wr.compositeTextSizes[1].evaluate(Ge,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&m(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),W.addSymbols(W.text,fa,Ka,ct,Be,Ge,Bt,D,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Sr[Wi]=W.text.placedSymbolArray.length-1;return 4*fa.length}function ab(W){for(let D in W)return W[D];return null}function oA(W,D,J,ve){let Ee=W.compareText;if(D in Ee){let Be=Ee[D];for(let Ge=Be.length-1;Ge>=0;Ge--)if(ve.dist(Be[Ge])<J)return!0}else Ee[D]=[];return Ee[D].push(ve),!1}let ib=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class X1{static from(D){if(!(D instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[J,ve]=new Uint8Array(D,0,2);if(J!==219)throw new Error("Data does not appear to be in a KDBush format.");let Ee=ve>>4;if(Ee!==1)throw new Error(`Got v${Ee} data when expected v1.`);let Be=ib[15&ve];if(!Be)throw new Error("Unrecognized array type.");let[Ge]=new Uint16Array(D,2,1),[ct]=new Uint32Array(D,4,1);return new X1(ct,Ge,Be,D)}constructor(D,J=64,ve=Float64Array,Ee){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*D*this.ArrayType.BYTES_PER_ELEMENT,ct=D*this.IndexArrayType.BYTES_PER_ELEMENT,At=(8-ct%8)%8;if(Be<0)throw new Error(`Unexpected typed array class: ${ve}.`);Ee&&Ee instanceof ArrayBuffer?(this.data=Ee,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ct+At,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ct+At,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Be]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=D)}add(D,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=D,this.coords[this._pos++]=J,ve}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,J,ve,Ee){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Be,coords:Ge,nodeSize:ct}=this,At=[0,Be.length-1,0],Bt=[];for(;At.length;){let ar=At.pop()||0,Sr=At.pop()||0,zr=At.pop()||0;if(Sr-zr<=ct){for(let ja=zr;ja<=Sr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=D&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Bt.push(Be[ja])}continue}let Wr=zr+Sr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=D&&ia<=ve&&fa>=J&&fa<=Ee&&Bt.push(Be[Wr]),(ar===0?D<=ia:J<=fa)&&(At.push(zr),At.push(Wr-1),At.push(1-ar)),(ar===0?ve>=ia:Ee>=fa)&&(At.push(Wr+1),At.push(Sr),At.push(1-ar))}return Bt}within(D,J,ve){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Ee,coords:Be,nodeSize:Ge}=this,ct=[0,Ee.length-1,0],At=[],Bt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Sr=ct.pop()||0,zr=ct.pop()||0;if(Sr-zr<=Ge){for(let ja=zr;ja<=Sr;ja++)ob(Be[2*ja],Be[2*ja+1],D,J)<=Bt&&At.push(Ee[ja]);continue}let Wr=zr+Sr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,D,J)<=Bt&&At.push(Ee[Wr]),(ar===0?D-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?D+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Sr),ct.push(1-ar))}return At}}function Ig(W,D,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(W,D,Ge,ve,Ee,Be),Ig(W,D,J,ve,Ge-1,1-Be),Ig(W,D,J,Ge+1,Ee,1-Be)}function nb(W,D,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Bt=Ee-ve+1,ar=J-ve+1,Sr=Math.log(Bt),zr=.5*Math.exp(2*Sr/3),Wr=.5*Math.sqrt(Sr*zr*(Bt-zr)/Bt)*(ar-Bt/2<0?-1:1);nb(W,D,J,Math.max(ve,Math.floor(J-ar*zr/Bt+Wr)),Math.min(Ee,Math.floor(J+(Bt-ar)*zr/Bt+Wr)),Be)}let Ge=D[2*J+Be],ct=ve,At=Ee;for(F0(W,D,ve,J),D[2*Ee+Be]>Ge&&F0(W,D,ve,Ee);ct<At;){for(F0(W,D,ct,At),ct++,At--;D[2*ct+Be]<Ge;)ct++;for(;D[2*At+Be]>Ge;)At--}D[2*ve+Be]===Ge?F0(W,D,ve,At):(At++,F0(W,D,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(W,D,J,ve){Z1(W,J,ve),Z1(D,2*J,2*ve),Z1(D,2*J+1,2*ve+1)}function Z1(W,D,J){let ve=W[D];W[D]=W[J],W[J]=ve}function ob(W,D,J,ve){let Ee=W-J,Be=D-ve;return Ee*Ee+Be*Be}var Rg;e.bg=void 0,(Rg=e.bg||(e.bg={})).create="create",Rg.load="load",Rg.fullLoad="fullLoad";let O0=null,Hf=[],Y1=1e3/60,K1="loadTime",Dg="fullLoadTime",sA={mark(W){performance.mark(W)},frame(W){let D=W;O0!=null&&Hf.push(D-O0),O0=D},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let W in e.bg)performance.clearMarks(e.bg[W])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let W=performance.getEntriesByName(K1)[0].duration,D=performance.getEntriesByName(Dg)[0].duration,J=Hf.length,ve=1/(Hf.reduce((Be,Ge)=>Be+Ge,0)/J/1e3),Ee=Hf.filter(Be=>Be>Y1).reduce((Be,Ge)=>Be+(Ge-Y1)/Y1,0);return{loadTime:W,fullLoadTime:D,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(W){if(z==null){let D=W.navigator?W.navigator.userAgent:null;z=!!W.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return z},e.D=fo,e.E=Q,e.F=class{constructor(W,D){this.target=W,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(J,ve,Ee,Be){return J.addEventListener(ve,Ee,!1),{unsubscribe:()=>{J.removeEventListener(ve,Ee,!1)}}}(this.target,"message",J=>this.receive(J)),this.globalScope=L(self)?W:window}registerMessageHandler(W,D){this.messageHandlers[W]=D}sendAsync(W,D){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"<cancel>",origin:location.origin,targetMapId:W.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},W),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:Qn(W.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(W){let D=W.data,J=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type==="<cancel>"){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(L(self)||D.mustQueue)return this.tasks[J]=D,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,D)}}process(){if(this.taskQueue.length===0)return;let W=this.taskQueue.shift(),D=this.tasks[W];delete this.tasks[W],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(W,D)}processTask(W,D){return t(this,void 0,void 0,function*(){if(D.type==="<response>"){let Ee=this.resolveRejects[W];return delete this.resolveRejects[W],Ee?void(D.error?Ee.reject(co(D.error)):Ee.resolve(co(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(W,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(D.data),ve=new AbortController;this.abortControllers[W]=ve;try{let Ee=yield this.messageHandlers[D.type](D.sourceMapId,J,ve);this.completeTask(W,null,Ee)}catch(Ee){this.completeTask(W,Ee)}})}completeTask(W,D,J){let ve=[];delete this.abortControllers[W];let Ee={id:W,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:D?Qn(D):null,data:Qn(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var W=new Qa(16);return Qa!=Float32Array&&(W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=0,W[12]=0,W[13]=0,W[14]=0),W[0]=1,W[5]=1,W[10]=1,W[15]=1,W},e.I=wg,e.J=function(W,D,J){var ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return D===W?(W[12]=D[0]*fa+D[4]*ja+D[8]*Ka+D[12],W[13]=D[1]*fa+D[5]*ja+D[9]*Ka+D[13],W[14]=D[2]*fa+D[6]*ja+D[10]*Ka+D[14],W[15]=D[3]*fa+D[7]*ja+D[11]*Ka+D[15]):(Ee=D[1],Be=D[2],Ge=D[3],ct=D[4],At=D[5],Bt=D[6],ar=D[7],Sr=D[8],zr=D[9],Wr=D[10],ia=D[11],W[0]=ve=D[0],W[1]=Ee,W[2]=Be,W[3]=Ge,W[4]=ct,W[5]=At,W[6]=Bt,W[7]=ar,W[8]=Sr,W[9]=zr,W[10]=Wr,W[11]=ia,W[12]=ve*fa+ct*ja+Sr*Ka+D[12],W[13]=Ee*fa+At*ja+zr*Ka+D[13],W[14]=Be*fa+Bt*ja+Wr*Ka+D[14],W[15]=Ge*fa+ar*ja+ia*Ka+D[15]),W},e.K=function(W,D,J){var ve=J[0],Ee=J[1],Be=J[2];return W[0]=D[0]*ve,W[1]=D[1]*ve,W[2]=D[2]*ve,W[3]=D[3]*ve,W[4]=D[4]*Ee,W[5]=D[5]*Ee,W[6]=D[6]*Ee,W[7]=D[7]*Ee,W[8]=D[8]*Be,W[9]=D[9]*Be,W[10]=D[10]*Be,W[11]=D[11]*Be,W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15],W},e.L=Va,e.M=function(W,D){let J={};for(let ve=0;ve<D.length;ve++){let Ee=D[ve];Ee in W&&(J[Ee]=W[Ee])}return J},e.N=Hd,e.O=Cg,e.P=n,e.Q=qx,e.R=Ii,e.S=Gp,e.T=Zu,e.U=c,e.V=T,e.W=O,e.X=po,e.Y=ht,e.Z=D0,e._=t,e.a=$,e.a$=function(W,D){var J=W[0],ve=W[1],Ee=W[2],Be=W[3],Ge=W[4],ct=W[5],At=W[6],Bt=W[7],ar=W[8],Sr=W[9],zr=W[10],Wr=W[11],ia=W[12],fa=W[13],ja=W[14],Ka=W[15],Wi=D[0],gi=D[1],qi=D[2],en=D[3],qn=D[4],ko=D[5],ys=D[6],vo=D[7],zn=D[8],rs=D[9],jo=D[10],Bo=D[11],bn=D[12],ls=D[13],No=D[14],Ps=D[15];return Math.abs(J-Wi)<=Ma*Math.max(1,Math.abs(J),Math.abs(Wi))&&Math.abs(ve-gi)<=Ma*Math.max(1,Math.abs(ve),Math.abs(gi))&&Math.abs(Ee-qi)<=Ma*Math.max(1,Math.abs(Ee),Math.abs(qi))&&Math.abs(Be-en)<=Ma*Math.max(1,Math.abs(Be),Math.abs(en))&&Math.abs(Ge-qn)<=Ma*Math.max(1,Math.abs(Ge),Math.abs(qn))&&Math.abs(ct-ko)<=Ma*Math.max(1,Math.abs(ct),Math.abs(ko))&&Math.abs(At-ys)<=Ma*Math.max(1,Math.abs(At),Math.abs(ys))&&Math.abs(Bt-vo)<=Ma*Math.max(1,Math.abs(Bt),Math.abs(vo))&&Math.abs(ar-zn)<=Ma*Math.max(1,Math.abs(ar),Math.abs(zn))&&Math.abs(Sr-rs)<=Ma*Math.max(1,Math.abs(Sr),Math.abs(rs))&&Math.abs(zr-jo)<=Ma*Math.max(1,Math.abs(zr),Math.abs(jo))&&Math.abs(Wr-Bo)<=Ma*Math.max(1,Math.abs(Wr),Math.abs(Bo))&&Math.abs(ia-bn)<=Ma*Math.max(1,Math.abs(ia),Math.abs(bn))&&Math.abs(fa-ls)<=Ma*Math.max(1,Math.abs(fa),Math.abs(ls))&&Math.abs(ja-No)<=Ma*Math.max(1,Math.abs(ja),Math.abs(No))&&Math.abs(Ka-Ps)<=Ma*Math.max(1,Math.abs(Ka),Math.abs(Ps))},e.a0=Tt,e.a1=q1,e.a2=ue,e.a3=W=>{let D=window.document.createElement("video");return D.muted=!0,new Promise(J=>{D.onloadstart=()=>{J(D)};for(let ve of W){let Ee=window.document.createElement("source");ee(ve)||(D.crossOrigin="Anonymous"),Ee.src=ve,D.appendChild(Ee)}})},e.a4=function(){return g++},e.a5=on,e.a6=cm,e.a7=Ec,e.a8=Hl,e.a9=V1,e.aA=function(W){if(W.type==="custom")return new N1(W);switch(W.type){case"background":return new QT(W);case"circle":return new Ha(W);case"fill":return new Wt(W);case"fill-extrusion":return new kp(W);case"heatmap":return new Dn(W);case"hillshade":return new bl(W);case"line":return new Lv(W);case"raster":return new I0(W);case"symbol":return new Dv(W)}},e.aB=u,e.aC=function(W,D){if(!W)return[{command:"setStyle",args:[D]}];let J=[];try{if(!Se(W.version,D.version))return[{command:"setStyle",args:[D]}];Se(W.center,D.center)||J.push({command:"setCenter",args:[D.center]}),Se(W.zoom,D.zoom)||J.push({command:"setZoom",args:[D.zoom]}),Se(W.bearing,D.bearing)||J.push({command:"setBearing",args:[D.bearing]}),Se(W.pitch,D.pitch)||J.push({command:"setPitch",args:[D.pitch]}),Se(W.sprite,D.sprite)||J.push({command:"setSprite",args:[D.sprite]}),Se(W.glyphs,D.glyphs)||J.push({command:"setGlyphs",args:[D.glyphs]}),Se(W.transition,D.transition)||J.push({command:"setTransition",args:[D.transition]}),Se(W.light,D.light)||J.push({command:"setLight",args:[D.light]}),Se(W.terrain,D.terrain)||J.push({command:"setTerrain",args:[D.terrain]}),Se(W.sky,D.sky)||J.push({command:"setSky",args:[D.sky]}),Se(W.projection,D.projection)||J.push({command:"setProjection",args:[D.projection]});let ve={},Ee=[];(function(Ge,ct,At,Bt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||We(ar,At,Bt));for(ar in ct)Object.prototype.hasOwnProperty.call(ct,ar)&&(Object.prototype.hasOwnProperty.call(Ge,ar)?Se(Ge[ar],ct[ar])||(Ge[ar].type==="geojson"&&ct[ar].type==="geojson"&&nt(Ge,ct,ar)?Ie(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Bt)):Re(ar,ct,At))})(W.sources,D.sources,Ee,ve);let Be=[];W.layers&&W.layers.forEach(Ge=>{"source"in Ge&&ve[Ge.source]?J.push({command:"removeLayer",args:[Ge.id]}):Be.push(Ge)}),J=J.concat(Ee),function(Ge,ct,At){ct=ct||[];let Bt=(Ge=Ge||[]).map(qe),ar=ct.map(qe),Sr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Bt.slice(),ia=Object.create(null),fa,ja,Ka,Wi,gi;for(let qi=0,en=0;qi<Bt.length;qi++)fa=Bt[qi],Object.prototype.hasOwnProperty.call(zr,fa)?en++:(Ie(At,{command:"removeLayer",args:[fa]}),Wr.splice(Wr.indexOf(fa,en),1));for(let qi=0,en=0;qi<ar.length;qi++)fa=ar[ar.length-1-qi],Wr[Wr.length-1-qi]!==fa&&(Object.prototype.hasOwnProperty.call(Sr,fa)?(Ie(At,{command:"removeLayer",args:[fa]}),Wr.splice(Wr.lastIndexOf(fa,Wr.length-en),1)):en++,Wi=Wr[Wr.length-qi],Ie(At,{command:"addLayer",args:[zr[fa],Wi]}),Wr.splice(Wr.length-qi,0,fa),ia[fa]=!0);for(let qi=0;qi<ar.length;qi++)if(fa=ar[qi],ja=Sr[fa],Ka=zr[fa],!ia[fa]&&!Se(ja,Ka))if(Se(ja.source,Ka.source)&&Se(ja["source-layer"],Ka["source-layer"])&&Se(ja.type,Ka.type)){for(gi in tt(ja.layout,Ka.layout,At,fa,null,"setLayoutProperty"),tt(ja.paint,Ka.paint,At,fa,null,"setPaintProperty"),Se(ja.filter,Ka.filter)||Ie(At,{command:"setFilter",args:[fa,Ka.filter]}),Se(ja.minzoom,Ka.minzoom)&&Se(ja.maxzoom,Ka.maxzoom)||Ie(At,{command:"setLayerZoomRange",args:[fa,Ka.minzoom,Ka.maxzoom]}),ja)Object.prototype.hasOwnProperty.call(ja,gi)&&gi!=="layout"&&gi!=="paint"&&gi!=="filter"&&gi!=="metadata"&&gi!=="minzoom"&&gi!=="maxzoom"&&(gi.indexOf("paint.")===0?tt(ja[gi],Ka[gi],At,fa,gi.slice(6),"setPaintProperty"):Se(ja[gi],Ka[gi])||Ie(At,{command:"setLayerProperty",args:[fa,gi,Ka[gi]]}));for(gi in Ka)Object.prototype.hasOwnProperty.call(Ka,gi)&&!Object.prototype.hasOwnProperty.call(ja,gi)&&gi!=="layout"&&gi!=="paint"&&gi!=="filter"&&gi!=="metadata"&&gi!=="minzoom"&&gi!=="maxzoom"&&(gi.indexOf("paint.")===0?tt(ja[gi],Ka[gi],At,fa,gi.slice(6),"setPaintProperty"):Se(ja[gi],Ka[gi])||Ie(At,{command:"setLayerProperty",args:[fa,gi,Ka[gi]]}))}else Ie(At,{command:"removeLayer",args:[fa]}),Wi=Wr[Wr.lastIndexOf(fa)+1],Ie(At,{command:"addLayer",args:[Ka,Wi]})}(Be,D.layers,J)}catch(ve){console.warn("Unable to compute style diff:",ve),J=[{command:"setStyle",args:[D]}]}return J},e.aD=function(W){let D=[],J=W.id;return J===void 0&&D.push({message:`layers.${J}: missing required property "id"`}),W.render===void 0&&D.push({message:`layers.${J}: missing required method "render"`}),W.renderingMode&&W.renderingMode!=="2d"&&W.renderingMode!=="3d"&&D.push({message:`layers.${J}: property "renderingMode" must be either "2d" or "3d"`}),D},e.aE=function W(D,J){if(Array.isArray(D)){if(!Array.isArray(J)||D.length!==J.length)return!1;for(let ve=0;ve<D.length;ve++)if(!W(D[ve],J[ve]))return!1;return!0}if(typeof D=="object"&&D!==null&&J!==null){if(typeof J!="object"||Object.keys(D).length!==Object.keys(J).length)return!1;for(let ve in D)if(!W(D[ve],J[ve]))return!1;return!0}return D===J},e.aF=b,e.aG=p,e.aH=class extends ni{constructor(W,D){super(W,D),this.current=0}set(W){this.current!==W&&(this.current=W,this.gl.uniform1i(this.location,W))}},e.aI=La,e.aJ=class extends ni{constructor(W,D){super(W,D),this.current=dn}set(W){if(W[12]!==this.current[12]||W[0]!==this.current[0])return this.current=W,void this.gl.uniformMatrix4fv(this.location,!1,W);for(let D=1;D<16;D++)if(W[D]!==this.current[D]){this.current=W,this.gl.uniformMatrix4fv(this.location,!1,W);break}}},e.aK=sn,e.aL=rn,e.aM=Jt,e.aN=class extends ni{constructor(W,D){super(W,D),this.current=[0,0,0]}set(W){W[0]===this.current[0]&&W[1]===this.current[1]&&W[2]===this.current[2]||(this.current=W,this.gl.uniform3f(this.location,W[0],W[1],W[2]))}},e.aO=class extends ni{constructor(W,D){super(W,D),this.current=[0,0]}set(W){W[0]===this.current[0]&&W[1]===this.current[1]||(this.current=W,this.gl.uniform2f(this.location,W[0],W[1]))}},e.aP=function(W,D,J,ve,Ee,Be,Ge){var ct=1/(D-J),At=1/(ve-Ee),Bt=1/(Be-Ge);return W[0]=-2*ct,W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=-2*At,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=2*Bt,W[11]=0,W[12]=(D+J)*ct,W[13]=(Ee+ve)*At,W[14]=(Ge+Be)*Bt,W[15]=1,W},e.aQ=Li,e.aR=class extends Rt{},e.aS=nv,e.aT=class extends yr{},e.aU=En,e.aV=function(W){return W<=1?1:Math.pow(2,Math.ceil(Math.log(W)/Math.LN2))},e.aW=nn,e.aX=Jo,e.aY=De,e.aZ=class extends ci{},e.a_=function(W,D){return W[0]===D[0]&&W[1]===D[1]&&W[2]===D[2]&&W[3]===D[3]&&W[4]===D[4]&&W[5]===D[5]&&W[6]===D[6]&&W[7]===D[7]&&W[8]===D[8]&&W[9]===D[9]&&W[10]===D[10]&&W[11]===D[11]&&W[12]===D[12]&&W[13]===D[13]&&W[14]===D[14]&&W[15]===D[15]},e.aa=function(W){let D={};if(W.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(J,ve,Ee,Be)=>{let Ge=Ee||Be;return D[ve]=!Ge||Ge.toLowerCase(),""}),D["max-age"]){let J=parseInt(D["max-age"],10);isNaN(J)?delete D["max-age"]:D["max-age"]=J}return D},e.ab=function(W,D){let J=[];for(let ve in W)ve in D||J.push(ve);return J},e.ac=w,e.ad=function(W,D,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=D[0],Ge=D[1],ct=D[2],At=D[3],Bt=D[4],ar=D[5],Sr=D[6],zr=D[7];return D!==W&&(W[8]=D[8],W[9]=D[9],W[10]=D[10],W[11]=D[11],W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15]),W[0]=Be*Ee+Bt*ve,W[1]=Ge*Ee+ar*ve,W[2]=ct*Ee+Sr*ve,W[3]=At*Ee+zr*ve,W[4]=Bt*Ee-Be*ve,W[5]=ar*Ee-Ge*ve,W[6]=Sr*Ee-ct*ve,W[7]=zr*Ee-At*ve,W},e.ae=function(W){var D=new Qa(16);return D[0]=W[0],D[1]=W[1],D[2]=W[2],D[3]=W[3],D[4]=W[4],D[5]=W[5],D[6]=W[6],D[7]=W[7],D[8]=W[8],D[9]=W[9],D[10]=W[10],D[11]=W[11],D[12]=W[12],D[13]=W[13],D[14]=W[14],D[15]=W[15],D},e.af=hn,e.ag=function(W,D){let J=0,ve=0;if(W.kind==="constant")ve=W.layoutSize;else if(W.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=W,ct=Ee?w(ao.interpolationFactor(Ee,D,Be,Ge),0,1):0;W.kind==="camera"?ve=Bn.number(W.minSize,W.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(W,{uSize:D,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return W.kind==="source"?ve/yd:W.kind==="composite"?Bn.number(ve/yd,Ee/yd,J):D},e.aj=z1,e.ak=function(W,D,J,ve){let Ee=D.y-W.y,Be=D.x-W.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Bt=(ct*(W.y-J.y)-Ge*(W.x-J.x))/At;return new n(W.x+Bt*Be,W.y+Bt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(W){let D=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of W)D=Math.min(D,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[D,J,ve,Ee]},e.ap=fu,e.ar=D1,e.as=function(W,D){var J=D[0],ve=D[1],Ee=D[2],Be=D[3],Ge=D[4],ct=D[5],At=D[6],Bt=D[7],ar=D[8],Sr=D[9],zr=D[10],Wr=D[11],ia=D[12],fa=D[13],ja=D[14],Ka=D[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Bt-Be*Ge,en=ve*At-Ee*ct,qn=ve*Bt-Be*ct,ko=Ee*Bt-Be*At,ys=ar*fa-Sr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,rs=Sr*ja-zr*fa,jo=Sr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,bn=Wi*Bo-gi*jo+qi*rs+en*zn-qn*vo+ko*ys;return bn?(W[0]=(ct*Bo-At*jo+Bt*rs)*(bn=1/bn),W[1]=(Ee*jo-ve*Bo-Be*rs)*bn,W[2]=(fa*ko-ja*qn+Ka*en)*bn,W[3]=(zr*qn-Sr*ko-Wr*en)*bn,W[4]=(At*zn-Ge*Bo-Bt*vo)*bn,W[5]=(J*Bo-Ee*zn+Be*vo)*bn,W[6]=(ja*qi-ia*ko-Ka*gi)*bn,W[7]=(ar*ko-zr*qi+Wr*gi)*bn,W[8]=(Ge*jo-ct*zn+Bt*ys)*bn,W[9]=(ve*zn-J*jo-Be*ys)*bn,W[10]=(ia*qn-fa*qi+Ka*Wi)*bn,W[11]=(Sr*qi-ar*qn-Wr*Wi)*bn,W[12]=(ct*vo-Ge*rs-At*ys)*bn,W[13]=(J*rs-ve*vo+Ee*ys)*bn,W[14]=(fa*gi-ia*en-ja*Wi)*bn,W[15]=(ar*en-Sr*gi+zr*Wi)*bn,W):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let W={},D=re.$version;for(let J in re.$root){let ve=re.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?D:ve.type==="array"?[]:{},Ee!=null&&(W[J]=Ee)}}return W},e.ax=Tn,e.ay=G,e.az=function(W){W=W.slice();let D=Object.create(null);for(let J=0;J<W.length;J++)D[W[J].id]=W[J];for(let J=0;J<W.length;J++)"ref"in W[J]&&(W[J]=we(W[J],D[W[J].ref]));return W},e.b=F,e.b0=function(W,D){return W[0]=D[0],W[1]=D[1],W[2]=D[2],W[3]=D[3],W[4]=D[4],W[5]=D[5],W[6]=D[6],W[7]=D[7],W[8]=D[8],W[9]=D[9],W[10]=D[10],W[11]=D[11],W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15],W},e.b1=function(W,D,J){return W[0]=D[0]*J[0],W[1]=D[1]*J[1],W[2]=D[2]*J[2],W[3]=D[3]*J[3],W},e.b2=function(W,D){return W[0]*D[0]+W[1]*D[1]+W[2]*D[2]+W[3]*D[3]},e.b3=A,e.b4=Vx,e.b5=Lg,e.b6=function(W,D,J,ve,Ee){var Be,Ge=1/Math.tan(D/2);return W[0]=Ge/J,W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=Ge,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=-1,W[12]=0,W[13]=0,W[15]=0,Ee!=null&&Ee!==1/0?(W[10]=(Ee+ve)*(Be=1/(ve-Ee)),W[14]=2*Ee*ve*Be):(W[10]=-1,W[14]=-2*ve),W},e.b7=function(W,D,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=D[4],Ge=D[5],ct=D[6],At=D[7],Bt=D[8],ar=D[9],Sr=D[10],zr=D[11];return D!==W&&(W[0]=D[0],W[1]=D[1],W[2]=D[2],W[3]=D[3],W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15]),W[4]=Be*Ee+Bt*ve,W[5]=Ge*Ee+ar*ve,W[6]=ct*Ee+Sr*ve,W[7]=At*Ee+zr*ve,W[8]=Bt*Ee-Be*ve,W[9]=ar*Ee-Ge*ve,W[10]=Sr*Ee-ct*ve,W[11]=zr*Ee-At*ve,W},e.b8=l,e.b9=_,e.bA=Dh,e.bB=function(W){return W.message===B},e.bC=ol,e.bD=Js,e.ba=function(W){return W*Math.PI/180},e.bb=function(W,D){let{x:J,y:ve}=D0.fromLngLat(D);return!(W<0||W>25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(W,D){return W[0]=D[0],W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=D[1],W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=D[2],W[11]=0,W[12]=0,W[13]=0,W[14]=0,W[15]=1,W},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=de,e.bi=function(W,D){$.REGISTERED_PROTOCOLS[W]=D},e.bj=function(W){delete $.REGISTERED_PROTOCOLS[W]},e.bk=function(W,D){let J={};for(let Ee=0;Ee<W.length;Ee++){let Be=D&&D[W[Ee].id]||hh(W[Ee]);D&&(D[W[Ee].id]=Be);let Ge=J[Be];Ge||(Ge=J[Be]=[]),Ge.push(W[Ee])}let ve=[];for(let Ee in J)ve.push(J[Ee]);return ve},e.bl=mi,e.bm=Hx,e.bn=zv,e.bo=Tg,e.bp=function(W){W.bucket.createArrays(),W.bucket.tilePixelRatio=po/(512*W.bucket.overscaling),W.bucket.compareText={},W.bucket.iconsNeedLinear=!1;let D=W.bucket.layers[0],J=D.layout,ve=D._unevaluatedLayout._values,Ee={layoutIconSize:ve["icon-size"].possiblyEvaluate(new Ds(W.bucket.zoom+1),W.canonical),layoutTextSize:ve["text-size"].possiblyEvaluate(new Ds(W.bucket.zoom+1),W.canonical),textMaxSize:ve["text-size"].possiblyEvaluate(new Ds(18))};if(W.bucket.textSizeData.kind==="composite"){let{minZoom:Bt,maxZoom:ar}=W.bucket.textSizeData;Ee.compositeTextSizes=[ve["text-size"].possiblyEvaluate(new Ds(Bt),W.canonical),ve["text-size"].possiblyEvaluate(new Ds(ar),W.canonical)]}if(W.bucket.iconSizeData.kind==="composite"){let{minZoom:Bt,maxZoom:ar}=W.bucket.iconSizeData;Ee.compositeIconSizes=[ve["icon-size"].possiblyEvaluate(new Ds(Bt),W.canonical),ve["icon-size"].possiblyEvaluate(new Ds(ar),W.canonical)]}let Be=J.get("text-line-height")*fu,Ge=J.get("text-rotation-alignment")!=="viewport"&&J.get("symbol-placement")!=="point",ct=J.get("text-keep-upright"),At=J.get("text-size");for(let Bt of W.bucket.features){let ar=J.get("text-font").evaluate(Bt,{},W.canonical).join(","),Sr=At.evaluate(Bt,{},W.canonical),zr=Ee.layoutTextSize.evaluate(Bt,{},W.canonical),Wr=Ee.layoutIconSize.evaluate(Bt,{},W.canonical),ia={horizontal:{},vertical:void 0},fa=Bt.text,ja,Ka=[0,0];if(fa){let qi=fa.toString(),en=J.get("text-letter-spacing").evaluate(Bt,{},W.canonical)*fu,qn=Ko(qi)?en:0,ko=J.get("text-anchor").evaluate(Bt,{},W.canonical),ys=tb(D,Bt,W.canonical);if(!ys){let jo=J.get("text-radial-offset").evaluate(Bt,{},W.canonical);Ka=jo?H1(ko,[jo*fu,Fv]):J.get("text-offset").evaluate(Bt,{},W.canonical).map(Bo=>Bo*fu)}let vo=Ge?"center":J.get("text-justify").evaluate(Bt,{},W.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Bt,{},W.canonical)*fu:1/0,rs=()=>{W.bucket.allowVerticalPlacement&&go(qi)&&(ia.vertical=M0(fa,W.glyphMap,W.glyphPositions,W.imagePositions,ar,zn,Be,ko,"left",qn,Ka,e.ah.vertical,!0,zr,Sr))};if(!Ge&&ys){let jo=new Set;if(vo==="auto")for(let bn=0;bn<ys.values.length;bn+=2)jo.add(W1(ys.values[bn]));else jo.add(vo);let Bo=!1;for(let bn of jo)if(!ia.horizontal[bn])if(Bo)ia.horizontal[bn]=ia.horizontal[0];else{let ls=M0(fa,W.glyphMap,W.glyphPositions,W.imagePositions,ar,zn,Be,"center",bn,qn,Ka,e.ah.horizontal,!1,zr,Sr);ls&&(ia.horizontal[bn]=ls,Bo=ls.positionedLines.length===1)}rs()}else{vo==="auto"&&(vo=W1(ko));let jo=M0(fa,W.glyphMap,W.glyphPositions,W.imagePositions,ar,zn,Be,ko,vo,qn,Ka,e.ah.horizontal,!1,zr,Sr);jo&&(ia.horizontal[vo]=jo),rs(),go(qi)&&Ge&&ct&&(ia.vertical=M0(fa,W.glyphMap,W.glyphPositions,W.imagePositions,ar,zn,Be,ko,vo,qn,Ka,e.ah.vertical,!1,zr,Sr))}}let Wi=!1;if(Bt.icon&&Bt.icon.name){let qi=W.imageMap[Bt.icon.name];qi&&(ja=E0(W.imagePositions[Bt.icon.name],J.get("icon-offset").evaluate(Bt,{},W.canonical),J.get("icon-anchor").evaluate(Bt,{},W.canonical)),Wi=!!qi.sdf,W.bucket.sdfIcons===void 0?W.bucket.sdfIcons=Wi:W.bucket.sdfIcons!==Wi&&m("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(qi.pixelRatio!==W.bucket.pixelRatio||J.get("icon-rotate").constantOr(1)!==0)&&(W.bucket.iconsNeedLinear=!0))}let gi=ab(ia.horizontal)||ia.vertical;W.bucket.iconsInText=!!gi&&gi.iconsInText,(gi||ja)&&nA(W.bucket,Bt,ia,ja,W.imageMap,Ee,zr,Wr,Ka,Wi,W.canonical)}W.showCollisionBoxes&&W.bucket.generateCollisionDebugBuffers()},e.bq=Vp,e.br=hr,e.bs=Fo,e.bt=Jr,e.bu=P1,e.bv=class{constructor(W){this._marks={start:[W.url,"start"].join("#"),end:[W.url,"end"].join("#"),measure:W.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let W=performance.getEntriesByName(this._marks.measure);return W.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),W=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),W}},e.bw=function(W,D,J,ve,Ee){return t(this,void 0,void 0,function*(){if(T())try{return yield O(W,D,J,ve,Ee)}catch{}return function(Be,Ge,ct,At,Bt){let ar=Be.width,Sr=Be.height;P&&U||(P=new OffscreenCanvas(ar,Sr),U=P.getContext("2d",{willReadFrequently:!0})),P.width=ar,P.height=Sr,U.drawImage(Be,0,0,ar,Sr);let zr=U.getImageData(Ge,ct,At,Bt);return U.clearRect(0,0,ar,Sr),zr.data}(W,D,J,ve,Ee)})},e.bx=Gx,e.by=r,e.bz=o,e.c=X,e.d=W=>t(void 0,void 0,void 0,function*(){if(W.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(W)],{type:"image/png"});try{return createImageBitmap(D)}catch(J){throw new Error(`Could not load image because of ${J.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.e=M,e.f=W=>new Promise((D,J)=>{let ve=new Image;ve.onload=()=>{D(ve),URL.revokeObjectURL(ve.src),ve.onload=null,window.requestAnimationFrame(()=>{ve.src=N})},ve.onerror=()=>J(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 Ee=new Blob([new Uint8Array(W)],{type:"image/png"});ve.src=W.byteLength?URL.createObjectURL(Ee):N}),e.g=le,e.h=(W,D)=>Y(M(W,{type:"json"}),D),e.i=L,e.j=j,e.k=ae,e.l=(W,D)=>Y(M(W,{type:"arrayBuffer"}),D),e.m=Y,e.n=function(W){return new P1(W).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Fe,e.r=Ci,e.s=ee,e.t=Pi,e.u=li,e.v=re,e.w=m,e.x=function([W,D,J]){return D+=90,D*=Math.PI/180,J*=Math.PI/180,{x:W*Math.cos(D)*Math.sin(J),y:W*Math.sin(D)*Math.sin(J),z:W*Math.cos(J)}},e.y=Bn,e.z=Ds}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Oe){this.keyCache={},Oe&&this.replace(Oe)}replace(Oe){this._layerConfigs={},this._layers={},this.update(Oe,[])}update(Oe,Je){for(let Le of Oe){this._layerConfigs[Le.id]=Le;let Ue=this._layers[Le.id]=e.aA(Le);Ue._featureFilter=e.a7(Ue.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Je)delete this.keyCache[Le],delete this._layerConfigs[Le],delete this._layers[Le];this.familiesBySource={};let Ae=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Le of Ae){let Ue=Le.map(Pt=>this._layers[Pt.id]),Ze=Ue[0];if(Ze.visibility==="none")continue;let st=Ze.source||"",ut=this.familiesBySource[st];ut||(ut=this.familiesBySource[st]={});let Ut=Ze.sourceLayer||"_geojsonTileLayer",Ct=ut[Ut];Ct||(Ct=ut[Ut]=[]),Ct.push(Ue)}}}class r{constructor(Oe){let Je={},Ae=[];for(let st in Oe){let ut=Oe[st],Ut=Je[st]={};for(let Ct in ut){let Pt=ut[+Ct];if(!Pt||Pt.bitmap.width===0||Pt.bitmap.height===0)continue;let jt={x:0,y:0,w:Pt.bitmap.width+2,h:Pt.bitmap.height+2};Ae.push(jt),Ut[Ct]={rect:jt,metrics:Pt.metrics}}}let{w:Le,h:Ue}=e.p(Ae),Ze=new e.o({width:Le||1,height:Ue||1});for(let st in Oe){let ut=Oe[st];for(let Ut in ut){let Ct=ut[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Je[st][Ut].rect;e.o.copy(Ct.bitmap,Ze,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ze,this.positions=Je}}e.bl("GlyphAtlas",r);class o{constructor(Oe){this.tileID=new e.S(Oe.tileID.overscaledZ,Oe.tileID.wrap,Oe.tileID.canonical.z,Oe.tileID.canonical.x,Oe.tileID.canonical.y),this.uid=Oe.uid,this.zoom=Oe.zoom,this.pixelRatio=Oe.pixelRatio,this.tileSize=Oe.tileSize,this.source=Oe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Oe.showCollisionBoxes,this.collectResourceTiming=!!Oe.collectResourceTiming,this.returnDependencies=!!Oe.returnDependencies,this.promoteId=Oe.promoteId,this.inFlightDependencies=[]}parse(Oe,Je,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Oe,this.collisionBoxArray=new e.a5;let Ue=new e.bm(Object.keys(Oe.layers).sort()),Ze=new e.bn(this.tileID,this.promoteId);Ze.bucketLayerIDs=[];let st={},ut={featureIndex:Ze,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Je.familiesBySource[this.source];for(let Wa in Ut){let Ca=Oe.layers[Wa];if(!Ca)continue;Ca.version===1&&e.w(`Vector tile source "${this.source}" layer "${Wa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let hi=Ue.encode(Wa),wi=[];for(let Kt=0;Kt<Ca.length;Kt++){let Dt=Ca.feature(Kt),Yt=Ze.getId(Dt,Wa);wi.push({feature:Dt,id:Yt,index:Kt,sourceLayerIndex:hi})}for(let Kt of Ut[Wa]){let Dt=Kt[0];Dt.source!==this.source&&e.w(`layer.source = ${Dt.source} does not equal this.source = ${this.source}`),Dt.minzoom&&this.zoom<Math.floor(Dt.minzoom)||Dt.maxzoom&&this.zoom>=Dt.maxzoom||Dt.visibility!=="none"&&(a(Kt,this.zoom,Ae),(st[Dt.id]=Dt.createBucket({index:Ze.bucketLayerIDs.length,layers:Kt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ut,this.tileID.canonical),Ze.bucketLayerIDs.push(Kt.map(Yt=>Yt.id)))}}let Ct=e.aF(ut.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let Pt=Promise.resolve({});if(Object.keys(Ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),Pt=Le.sendAsync({type:"GG",data:{stacks:Ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let jt=Object.keys(ut.iconDependencies),fr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),fr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let ur=Object.keys(ut.patternDependencies),sr=Promise.resolve({});if(ur.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),sr=Le.sendAsync({type:"GI",data:{icons:ur,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,Ta,Oa]=yield Promise.all([Pt,fr,sr]),Ia=new r(Pr),qa=new e.bo(Ta,Oa);for(let Wa in st){let Ca=st[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Ae),e.bp({bucket:Ca,glyphMap:Pr,glyphPositions:Ia.positions,imageMap:Ta,imagePositions:qa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ca.hasPattern&&(Ca instanceof e.bq||Ca instanceof e.br||Ca instanceof e.bs)&&(a(Ca.layers,this.zoom,Ae),Ca.addFeatures(ut,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ze,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ia.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?Ta:null,glyphPositions:this.returnDependencies?Ia.positions:null}})}}function a(_t,Oe,Je){let Ae=new e.z(Oe);for(let Le of _t)Le.recalculate(Ae,Je)}class n{constructor(Oe,Je,Ae){this.actor=Oe,this.layerIndex=Je,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Oe.request,Je);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let Ue=new Uint8Array(Ae.data),Ze=`Unable to parse the tile at ${Oe.request.url}, `;throw Ze+=Ue[0]===31&&Ue[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Le.message}`,new Error(Ze)}})}loadTile(Oe){return e._(this,void 0,void 0,function*(){let Je=Oe.uid,Ae=!!(Oe&&Oe.request&&Oe.request.collectResourceTiming)&&new e.bv(Oe.request),Le=new o(Oe);this.loading[Je]=Le;let Ue=new AbortController;Le.abort=Ue;try{let Ze=yield this.loadVectorTile(Oe,Ue);if(delete this.loading[Je],!Ze)return null;let st=Ze.rawData,ut={};Ze.expires&&(ut.expires=Ze.expires),Ze.cacheControl&&(ut.cacheControl=Ze.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ze.vectorTile;let Ct=Le.parse(Ze.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=Le,this.fetching[Je]={rawTileData:st,cacheControl:ut,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ut,Ut)}finally{delete this.fetching[Je]}}catch(Ze){throw delete this.loading[Je],Le.status="done",this.loaded[Je]=Le,Ze}})}reloadTile(Oe){return e._(this,void 0,void 0,function*(){let Je=Oe.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Je];if(Ae.showCollisionBoxes=Oe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),Ue;if(this.fetching[Je]){let{rawTileData:Ze,cacheControl:st,resourceTiming:ut}=this.fetching[Je];delete this.fetching[Je],Ue=e.e({rawTileData:Ze.slice(0)},Le,st,ut)}else Ue=Le;return Ue}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Oe){return e._(this,void 0,void 0,function*(){let Je=this.loading,Ae=Oe.uid;Je&&Je[Ae]&&Je[Ae].abort&&(Je[Ae].abort.abort(),delete Je[Ae])})}removeTile(Oe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Oe.uid]&&delete this.loaded[Oe.uid]})}}class i{constructor(){this.loaded={}}loadTile(Oe){return e._(this,void 0,void 0,function*(){let{uid:Je,encoding:Ae,rawImageData:Le,redFactor:Ue,greenFactor:Ze,blueFactor:st,baseShift:ut}=Oe,Ut=Le.width+2,Ct=Le.height+2,Pt=e.b(Le)?new e.R({width:Ut,height:Ct},yield e.bw(Le,-1,-1,Ut,Ct)):Le,jt=new e.bx(Je,Pt,Ae,Ue,Ze,st,ut);return this.loaded=this.loaded||{},this.loaded[Je]=jt,jt})}removeTile(Oe){let Je=this.loaded,Ae=Oe.uid;Je&&Je[Ae]&&delete Je[Ae]}}function s(_t,Oe){if(_t.length!==0){h(_t[0],Oe);for(var Je=1;Je<_t.length;Je++)h(_t[Je],!Oe)}}function h(_t,Oe){for(var Je=0,Ae=0,Le=0,Ue=_t.length,Ze=Ue-1;Le<Ue;Ze=Le++){var st=(_t[Le][0]-_t[Ze][0])*(_t[Ze][1]+_t[Le][1]),ut=Je+st;Ae+=Math.abs(Je)>=Math.abs(st)?Je-ut+st:st-ut+Je,Je=ut}Je+Ae>=0!=!!Oe&&_t.reverse()}var f=e.by(function _t(Oe,Je){var Ae,Le=Oe&&Oe.type;if(Le==="FeatureCollection")for(Ae=0;Ae<Oe.features.length;Ae++)_t(Oe.features[Ae],Je);else if(Le==="GeometryCollection")for(Ae=0;Ae<Oe.geometries.length;Ae++)_t(Oe.geometries[Ae],Je);else if(Le==="Feature")_t(Oe.geometry,Je);else if(Le==="Polygon")s(Oe.coordinates,Je);else if(Le==="MultiPolygon")for(Ae=0;Ae<Oe.coordinates.length;Ae++)s(Oe.coordinates[Ae],Je);return Oe});let v=e.bt.VectorTileFeature.prototype.toGeoJSON;var c={exports:{}},T=e.bz,l=e.bt.VectorTileFeature,_=w;function w(_t,Oe){this.options=Oe||{},this.features=_t,this.length=_t.length}function A(_t,Oe){this.id=typeof _t.id=="number"?_t.id:void 0,this.type=_t.type,this.rawGeometry=_t.type===1?[_t.geometry]:_t.geometry,this.properties=_t.tags,this.extent=Oe||4096}w.prototype.feature=function(_t){return new A(this.features[_t],this.options.extent)},A.prototype.loadGeometry=function(){var _t=this.rawGeometry;this.geometry=[];for(var Oe=0;Oe<_t.length;Oe++){for(var Je=_t[Oe],Ae=[],Le=0;Le<Je.length;Le++)Ae.push(new T(Je[Le][0],Je[Le][1]));this.geometry.push(Ae)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var _t=this.geometry,Oe=1/0,Je=-1/0,Ae=1/0,Le=-1/0,Ue=0;Ue<_t.length;Ue++)for(var Ze=_t[Ue],st=0;st<Ze.length;st++){var ut=Ze[st];Oe=Math.min(Oe,ut.x),Je=Math.max(Je,ut.x),Ae=Math.min(Ae,ut.y),Le=Math.max(Le,ut.y)}return[Oe,Ae,Je,Le]},A.prototype.toGeoJSON=l.prototype.toGeoJSON;var M=e.bA,g=_;function b(_t){var Oe=new M;return function(Je,Ae){for(var Le in Je.layers)Ae.writeMessage(3,p,Je.layers[Le])}(_t,Oe),Oe.finish()}function p(_t,Oe){var Je;Oe.writeVarintField(15,_t.version||1),Oe.writeStringField(1,_t.name||""),Oe.writeVarintField(5,_t.extent||4096);var Ae={keys:[],values:[],keycache:{},valuecache:{}};for(Je=0;Je<_t.length;Je++)Ae.feature=_t.feature(Je),Oe.writeMessage(2,u,Ae);var Le=Ae.keys;for(Je=0;Je<Le.length;Je++)Oe.writeStringField(3,Le[Je]);var Ue=Ae.values;for(Je=0;Je<Ue.length;Je++)Oe.writeMessage(4,z,Ue[Je])}function u(_t,Oe){var Je=_t.feature;Je.id!==void 0&&Oe.writeVarintField(1,Je.id),Oe.writeMessage(2,y,_t),Oe.writeVarintField(3,Je.type),Oe.writeMessage(4,L,Je)}function y(_t,Oe){var Je=_t.feature,Ae=_t.keys,Le=_t.values,Ue=_t.keycache,Ze=_t.valuecache;for(var st in Je.properties){var ut=Je.properties[st],Ut=Ue[st];if(ut!==null){Ut===void 0&&(Ae.push(st),Ue[st]=Ut=Ae.length-1),Oe.writeVarint(Ut);var Ct=typeof ut;Ct!=="string"&&Ct!=="boolean"&&Ct!=="number"&&(ut=JSON.stringify(ut));var Pt=Ct+":"+ut,jt=Ze[Pt];jt===void 0&&(Le.push(ut),Ze[Pt]=jt=Le.length-1),Oe.writeVarint(jt)}}}function m(_t,Oe){return(Oe<<3)+(7&_t)}function R(_t){return _t<<1^_t>>31}function L(_t,Oe){for(var Je=_t.loadGeometry(),Ae=_t.type,Le=0,Ue=0,Ze=Je.length,st=0;st<Ze;st++){var ut=Je[st],Ut=1;Ae===1&&(Ut=ut.length),Oe.writeVarint(m(1,Ut));for(var Ct=Ae===3?ut.length-1:ut.length,Pt=0;Pt<Ct;Pt++){Pt===1&&Ae!==1&&Oe.writeVarint(m(2,Ct-1));var jt=ut[Pt].x-Le,fr=ut[Pt].y-Ue;Oe.writeVarint(R(jt)),Oe.writeVarint(R(fr)),Le+=jt,Ue+=fr}Ae===3&&Oe.writeVarint(m(7,1))}}function z(_t,Oe){var Je=typeof _t;Je==="string"?Oe.writeStringField(1,_t):Je==="boolean"?Oe.writeBooleanField(7,_t):Je==="number"&&(_t%1!=0?Oe.writeDoubleField(3,_t):_t<0?Oe.writeSVarintField(6,_t):Oe.writeVarintField(5,_t))}c.exports=b,c.exports.fromVectorTileJs=b,c.exports.fromGeojsonVt=function(_t,Oe){Oe=Oe||{};var Je={};for(var Ae in _t)Je[Ae]=new g(_t[Ae].features,Oe),Je[Ae].name=Ae,Je[Ae].version=Oe.version,Je[Ae].extent=Oe.extent;return b({layers:Je})},c.exports.GeoJSONWrapper=g;var F=e.by(c.exports);let N={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:_t=>_t},O=Math.fround||(P=new Float32Array(1),_t=>(P[0]=+_t,P[0]));var P;let U=3,B=5,X=6;class ${constructor(Oe){this.options=Object.assign(Object.create(N),Oe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Oe){let{log:Je,minZoom:Ae,maxZoom:Le}=this.options;Je&&console.time("total time");let Ue=`prepare ${Oe.length} points`;Je&&console.time(Ue),this.points=Oe;let Ze=[];for(let ut=0;ut<Oe.length;ut++){let Ut=Oe[ut];if(!Ut.geometry)continue;let[Ct,Pt]=Ut.geometry.coordinates,jt=O(de(Ct)),fr=O(G(Pt));Ze.push(jt,fr,1/0,ut,-1,1),this.options.reduce&&Ze.push(0)}let st=this.trees[Le+1]=this._createTree(Ze);Je&&console.timeEnd(Ue);for(let ut=Le;ut>=Ae;ut--){let Ut=+Date.now();st=this.trees[ut]=this._createTree(this._cluster(st,ut)),Je&&console.log("z%d: %d clusters in %dms",ut,st.numItems,+Date.now()-Ut)}return Je&&console.timeEnd("total time"),this}getClusters(Oe,Je){let Ae=((Oe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Oe[1])),Ue=Oe[2]===180?180:((Oe[2]+180)%360+360)%360-180,Ze=Math.max(-90,Math.min(90,Oe[3]));if(Oe[2]-Oe[0]>=360)Ae=-180,Ue=180;else if(Ae>Ue){let Pt=this.getClusters([Ae,Le,180,Ze],Je),jt=this.getClusters([-180,Le,Ue,Ze],Je);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Je)],ut=st.range(de(Ae),G(Ze),de(Ue),G(Le)),Ut=st.data,Ct=[];for(let Pt of ut){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?le(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Oe){let Je=this._getOriginId(Oe),Ae=this._getOriginZoom(Oe),Le="No cluster with the specified id.",Ue=this.trees[Ae];if(!Ue)throw new Error(Le);let Ze=Ue.data;if(Je*this.stride>=Ze.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ut=Ue.within(Ze[Je*this.stride],Ze[Je*this.stride+1],st),Ut=[];for(let Ct of ut){let Pt=Ct*this.stride;Ze[Pt+4]===Oe&&Ut.push(Ze[Pt+B]>1?le(Ze,Pt,this.clusterProps):this.points[Ze[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Oe,Je,Ae){let Le=[];return this._appendLeaves(Le,Oe,Je=Je||10,Ae=Ae||0,0),Le}getTile(Oe,Je,Ae){let Le=this.trees[this._limitZoom(Oe)],Ue=Math.pow(2,Oe),{extent:Ze,radius:st}=this.options,ut=st/Ze,Ut=(Ae-ut)/Ue,Ct=(Ae+1+ut)/Ue,Pt={features:[]};return this._addTileFeatures(Le.range((Je-ut)/Ue,Ut,(Je+1+ut)/Ue,Ct),Le.data,Je,Ae,Ue,Pt),Je===0&&this._addTileFeatures(Le.range(1-ut/Ue,Ut,1,Ct),Le.data,Ue,Ae,Ue,Pt),Je===Ue-1&&this._addTileFeatures(Le.range(0,Ut,ut/Ue,Ct),Le.data,-1,Ae,Ue,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Oe){let Je=this._getOriginZoom(Oe)-1;for(;Je<=this.options.maxZoom;){let Ae=this.getChildren(Oe);if(Je++,Ae.length!==1)break;Oe=Ae[0].properties.cluster_id}return Je}_appendLeaves(Oe,Je,Ae,Le,Ue){let Ze=this.getChildren(Je);for(let st of Ze){let ut=st.properties;if(ut&&ut.cluster?Ue+ut.point_count<=Le?Ue+=ut.point_count:Ue=this._appendLeaves(Oe,ut.cluster_id,Ae,Le,Ue):Ue<Le?Ue++:Oe.push(st),Oe.length===Ae)break}return Ue}_createTree(Oe){let Je=new e.av(Oe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Ae=0;Ae<Oe.length;Ae+=this.stride)Je.add(Oe[Ae],Oe[Ae+1]);return Je.finish(),Je.data=Oe,Je}_addTileFeatures(Oe,Je,Ae,Le,Ue,Ze){for(let st of Oe){let ut=st*this.stride,Ut=Je[ut+B]>1,Ct,Pt,jt;if(Ut)Ct=ce(Je,ut,this.clusterProps),Pt=Je[ut],jt=Je[ut+1];else{let sr=this.points[Je[ut+U]];Ct=sr.properties;let[Pr,Ta]=sr.geometry.coordinates;Pt=de(Pr),jt=G(Ta)}let fr={type:1,geometry:[[Math.round(this.options.extent*(Pt*Ue-Ae)),Math.round(this.options.extent*(jt*Ue-Le))]],tags:Ct},ur;ur=Ut||this.options.generateId?Je[ut+U]:this.points[Je[ut+U]].id,ur!==void 0&&(fr.id=ur),Ze.features.push(fr)}}_limitZoom(Oe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Oe),this.options.maxZoom+1))}_cluster(Oe,Je){let{radius:Ae,extent:Le,reduce:Ue,minPoints:Ze}=this.options,st=Ae/(Le*Math.pow(2,Je)),ut=Oe.data,Ut=[],Ct=this.stride;for(let Pt=0;Pt<ut.length;Pt+=Ct){if(ut[Pt+2]<=Je)continue;ut[Pt+2]=Je;let jt=ut[Pt],fr=ut[Pt+1],ur=Oe.within(ut[Pt],ut[Pt+1],st),sr=ut[Pt+B],Pr=sr;for(let Ta of ur){let Oa=Ta*Ct;ut[Oa+2]>Je&&(Pr+=ut[Oa+B])}if(Pr>sr&&Pr>=Ze){let Ta,Oa=jt*sr,Ia=fr*sr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Je+1)+this.points.length;for(let Ca of ur){let hi=Ca*Ct;if(ut[hi+2]<=Je)continue;ut[hi+2]=Je;let wi=ut[hi+B];Oa+=ut[hi]*wi,Ia+=ut[hi+1]*wi,ut[hi+4]=Wa,Ue&&(Ta||(Ta=this._map(ut,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(Ta)),Ue(Ta,this._map(ut,hi)))}ut[Pt+4]=Wa,Ut.push(Oa/Pr,Ia/Pr,1/0,Wa,-1,Pr),Ue&&Ut.push(qa)}else{for(let Ta=0;Ta<Ct;Ta++)Ut.push(ut[Pt+Ta]);if(Pr>1)for(let Ta of ur){let Oa=Ta*Ct;if(!(ut[Oa+2]<=Je)){ut[Oa+2]=Je;for(let Ia=0;Ia<Ct;Ia++)Ut.push(ut[Oa+Ia])}}}}return Ut}_getOriginId(Oe){return Oe-this.points.length>>5}_getOriginZoom(Oe){return(Oe-this.points.length)%32}_map(Oe,Je,Ae){if(Oe[Je+B]>1){let Ze=this.clusterProps[Oe[Je+X]];return Ae?Object.assign({},Ze):Ze}let Le=this.points[Oe[Je+U]].properties,Ue=this.options.map(Le);return Ae&&Ue===Le?Object.assign({},Ue):Ue}}function le(_t,Oe,Je){return{type:"Feature",id:_t[Oe+U],properties:ce(_t,Oe,Je),geometry:{type:"Point",coordinates:[(Ae=_t[Oe],360*(Ae-.5)),Y(_t[Oe+1])]}};var Ae}function ce(_t,Oe,Je){let Ae=_t[Oe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,Ue=_t[Oe+X],Ze=Ue===-1?{}:Object.assign({},Je[Ue]);return Object.assign(Ze,{cluster:!0,cluster_id:_t[Oe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function G(_t){let Oe=Math.sin(_t*Math.PI/180),Je=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return Je<0?0:Je>1?1:Je}function Y(_t){let Oe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Oe))/Math.PI-90}function ee(_t,Oe,Je,Ae){let Le=Ae,Ue=Oe+(Je-Oe>>1),Ze,st=Je-Oe,ut=_t[Oe],Ut=_t[Oe+1],Ct=_t[Je],Pt=_t[Je+1];for(let jt=Oe+3;jt<Je;jt+=3){let fr=q(_t[jt],_t[jt+1],ut,Ut,Ct,Pt);if(fr>Le)Ze=jt,Le=fr;else if(fr===Le){let ur=Math.abs(jt-Ue);ur<st&&(Ze=jt,st=ur)}}Le>Ae&&(Ze-Oe>3&&ee(_t,Oe,Ze,Ae),_t[Ze+2]=Le,Je-Ze>3&&ee(_t,Ze,Je,Ae))}function q(_t,Oe,Je,Ae,Le,Ue){let Ze=Le-Je,st=Ue-Ae;if(Ze!==0||st!==0){let ut=((_t-Je)*Ze+(Oe-Ae)*st)/(Ze*Ze+st*st);ut>1?(Je=Le,Ae=Ue):ut>0&&(Je+=Ze*ut,Ae+=st*ut)}return Ze=_t-Je,st=Oe-Ae,Ze*Ze+st*st}function se(_t,Oe,Je,Ae){let Le={id:_t??null,type:Oe,geometry:Je,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Oe==="Point"||Oe==="MultiPoint"||Oe==="LineString")ae(Le,Je);else if(Oe==="Polygon")ae(Le,Je[0]);else if(Oe==="MultiLineString")for(let Ue of Je)ae(Le,Ue);else if(Oe==="MultiPolygon")for(let Ue of Je)ae(Le,Ue[0]);return Le}function ae(_t,Oe){for(let Je=0;Je<Oe.length;Je+=3)_t.minX=Math.min(_t.minX,Oe[Je]),_t.minY=Math.min(_t.minY,Oe[Je+1]),_t.maxX=Math.max(_t.maxX,Oe[Je]),_t.maxY=Math.max(_t.maxY,Oe[Je+1])}function j(_t,Oe,Je,Ae){if(!Oe.geometry)return;let Le=Oe.geometry.coordinates;if(Le&&Le.length===0)return;let Ue=Oe.geometry.type,Ze=Math.pow(Je.tolerance/((1<<Je.maxZoom)*Je.extent),2),st=[],ut=Oe.id;if(Je.promoteId?ut=Oe.properties[Je.promoteId]:Je.generateId&&(ut=Ae||0),Ue==="Point")Q(Le,st);else if(Ue==="MultiPoint")for(let Ut of Le)Q(Ut,st);else if(Ue==="LineString")re(Le,st,Ze,!1);else if(Ue==="MultiLineString"){if(Je.lineMetrics){for(let Ut of Le)st=[],re(Ut,st,Ze,!1),_t.push(se(ut,"LineString",st,Oe.properties));return}pe(Le,st,Ze,!1)}else if(Ue==="Polygon")pe(Le,st,Ze,!0);else{if(Ue!=="MultiPolygon"){if(Ue==="GeometryCollection"){for(let Ut of Oe.geometry.geometries)j(_t,{id:ut,geometry:Ut,properties:Oe.properties},Je,Ae);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let Ut of Le){let Ct=[];pe(Ut,Ct,Ze,!0),st.push(Ct)}}_t.push(se(ut,Ue,st,Oe.properties))}function Q(_t,Oe){Oe.push(we(_t[0]),Se(_t[1]),0)}function re(_t,Oe,Je,Ae){let Le,Ue,Ze=0;for(let ut=0;ut<_t.length;ut++){let Ut=we(_t[ut][0]),Ct=Se(_t[ut][1]);Oe.push(Ut,Ct,0),ut>0&&(Ze+=Ae?(Le*Ct-Ut*Ue)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-Ue,2))),Le=Ut,Ue=Ct}let st=Oe.length-3;Oe[2]=1,ee(Oe,0,st,Je),Oe[st+2]=1,Oe.size=Math.abs(Ze),Oe.start=0,Oe.end=Oe.size}function pe(_t,Oe,Je,Ae){for(let Le=0;Le<_t.length;Le++){let Ue=[];re(_t[Le],Ue,Je,Ae),Oe.push(Ue)}}function we(_t){return _t/360+.5}function Se(_t){let Oe=Math.sin(_t*Math.PI/180),Je=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return Je<0?0:Je>1?1:Je}function Ie(_t,Oe,Je,Ae,Le,Ue,Ze,st){if(Ae/=Oe,Ue>=(Je/=Oe)&&Ze<Ae)return _t;if(Ze<Je||Ue>=Ae)return null;let ut=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,fr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Je&&fr<Ae){ut.push(Ut);continue}if(fr<Je||jt>=Ae)continue;let ur=[];if(Pt==="Point"||Pt==="MultiPoint")Re(Ct,ur,Je,Ae,Le);else if(Pt==="LineString")We(Ct,ur,Je,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,ur,Je,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,ur,Je,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let sr of Ct){let Pr=[];nt(sr,Pr,Je,Ae,Le,!0),Pr.length&&ur.push(Pr)}if(ur.length){if(st.lineMetrics&&Pt==="LineString"){for(let sr of ur)ut.push(se(Ut.id,Pt,sr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(ur.length===1?(Pt="LineString",ur=ur[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=ur.length===3?"Point":"MultiPoint"),ut.push(se(Ut.id,Pt,ur,Ut.tags))}}return ut.length?ut:null}function Re(_t,Oe,Je,Ae,Le){for(let Ue=0;Ue<_t.length;Ue+=3){let Ze=_t[Ue+Le];Ze>=Je&&Ze<=Ae&&tt(Oe,_t[Ue],_t[Ue+1],_t[Ue+2])}}function We(_t,Oe,Je,Ae,Le,Ue,Ze){let st=at(_t),ut=Le===0?qe:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let Ta=_t[Pr],Oa=_t[Pr+1],Ia=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?Ta:Oa,hi=Le===0?qa:Wa,wi=!1;Ze&&(Ut=Math.sqrt(Math.pow(Ta-qa,2)+Math.pow(Oa-Wa,2))),Ca<Je?hi>Je&&(Ct=ut(st,Ta,Oa,qa,Wa,Je),Ze&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi<Ae&&(Ct=ut(st,Ta,Oa,qa,Wa,Ae),Ze&&(st.start=Pt+Ut*Ct)):tt(st,Ta,Oa,Ia),hi<Je&&Ca>=Je&&(Ct=ut(st,Ta,Oa,qa,Wa,Je),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ut(st,Ta,Oa,qa,Wa,Ae),wi=!0),!Ue&&wi&&(Ze&&(st.end=Pt+Ut*Ct),Oe.push(st),st=at(_t)),Ze&&(Pt+=Ut)}let jt=_t.length-3,fr=_t[jt],ur=_t[jt+1],sr=Le===0?fr:ur;sr>=Je&&sr<=Ae&&tt(st,fr,ur,_t[jt+2]),jt=st.length-3,Ue&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Oe.push(st)}function at(_t){let Oe=[];return Oe.size=_t.size,Oe.start=_t.start,Oe.end=_t.end,Oe}function nt(_t,Oe,Je,Ae,Le,Ue){for(let Ze of _t)We(Ze,Oe,Je,Ae,Le,Ue,!1)}function tt(_t,Oe,Je,Ae){_t.push(Oe,Je,Ae)}function qe(_t,Oe,Je,Ae,Le,Ue){let Ze=(Ue-Oe)/(Ae-Oe);return tt(_t,Ue,Je+(Le-Je)*Ze,1),Ze}function he(_t,Oe,Je,Ae,Le,Ue){let Ze=(Ue-Je)/(Le-Je);return tt(_t,Oe+(Ae-Oe)*Ze,Ue,1),Ze}function ue(_t,Oe){let Je=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],Ue=Le.type,Ze;if(Ue==="Point"||Ue==="MultiPoint"||Ue==="LineString")Ze=ne(Le.geometry,Oe);else if(Ue==="MultiLineString"||Ue==="Polygon"){Ze=[];for(let st of Le.geometry)Ze.push(ne(st,Oe))}else if(Ue==="MultiPolygon"){Ze=[];for(let st of Le.geometry){let ut=[];for(let Ut of st)ut.push(ne(Ut,Oe));Ze.push(ut)}}Je.push(se(Le.id,Ue,Ze,Le.tags))}return Je}function ne(_t,Oe){let Je=[];Je.size=_t.size,_t.start!==void 0&&(Je.start=_t.start,Je.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Je.push(_t[Ae]+Oe,_t[Ae+1],_t[Ae+2]);return Je}function Ce(_t,Oe){if(_t.transformed)return _t;let Je=1<<_t.z,Ae=_t.x,Le=_t.y;for(let Ue of _t.features){let Ze=Ue.geometry,st=Ue.type;if(Ue.geometry=[],st===1)for(let ut=0;ut<Ze.length;ut+=2)Ue.geometry.push(Ye(Ze[ut],Ze[ut+1],Oe,Je,Ae,Le));else for(let ut=0;ut<Ze.length;ut++){let Ut=[];for(let Ct=0;Ct<Ze[ut].length;Ct+=2)Ut.push(Ye(Ze[ut][Ct],Ze[ut][Ct+1],Oe,Je,Ae,Le));Ue.geometry.push(Ut)}}return _t.transformed=!0,_t}function Ye(_t,Oe,Je,Ae,Le,Ue){return[Math.round(Je*(_t*Ae-Le)),Math.round(Je*(Oe*Ae-Ue))]}function rt(_t,Oe,Je,Ae,Le){let Ue=Oe===Le.maxZoom?0:Le.tolerance/((1<<Oe)*Le.extent),Ze={features:[],numPoints:0,numSimplified:0,numFeatures:_t.length,source:null,x:Je,y:Ae,z:Oe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let st of _t)Ke(Ze,st,Ue,Le);return Ze}function Ke(_t,Oe,Je,Ae){let Le=Oe.geometry,Ue=Oe.type,Ze=[];if(_t.minX=Math.min(_t.minX,Oe.minX),_t.minY=Math.min(_t.minY,Oe.minY),_t.maxX=Math.max(_t.maxX,Oe.maxX),_t.maxY=Math.max(_t.maxY,Oe.maxY),Ue==="Point"||Ue==="MultiPoint")for(let st=0;st<Le.length;st+=3)Ze.push(Le[st],Le[st+1]),_t.numPoints++,_t.numSimplified++;else if(Ue==="LineString")Mt(Ze,Le,_t,Je,!1,!1);else if(Ue==="MultiLineString"||Ue==="Polygon")for(let st=0;st<Le.length;st++)Mt(Ze,Le[st],_t,Je,Ue==="Polygon",st===0);else if(Ue==="MultiPolygon")for(let st=0;st<Le.length;st++){let ut=Le[st];for(let Ut=0;Ut<ut.length;Ut++)Mt(Ze,ut[Ut],_t,Je,!0,Ut===0)}if(Ze.length){let st=Oe.tags||null;if(Ue==="LineString"&&Ae.lineMetrics){st={};for(let Ut in Oe.tags)st[Ut]=Oe.tags[Ut];st.mapbox_clip_start=Le.start/Le.size,st.mapbox_clip_end=Le.end/Le.size}let ut={geometry:Ze,type:Ue==="Polygon"||Ue==="MultiPolygon"?3:Ue==="LineString"||Ue==="MultiLineString"?2:1,tags:st};Oe.id!==null&&(ut.id=Oe.id),_t.features.push(ut)}}function Mt(_t,Oe,Je,Ae,Le,Ue){let Ze=Ae*Ae;if(Ae>0&&Oe.size<(Le?Ze:Ae))return void(Je.numPoints+=Oe.length/3);let st=[];for(let ut=0;ut<Oe.length;ut+=3)(Ae===0||Oe[ut+2]>Ze)&&(Je.numSimplified++,st.push(Oe[ut],Oe[ut+1])),Je.numPoints++;Le&&function(ut,Ut){let Ct=0;for(let Pt=0,jt=ut.length,fr=jt-2;Pt<jt;fr=Pt,Pt+=2)Ct+=(ut[Pt]-ut[fr])*(ut[Pt+1]+ut[fr+1]);if(Ct>0===Ut)for(let Pt=0,jt=ut.length;Pt<jt/2;Pt+=2){let fr=ut[Pt],ur=ut[Pt+1];ut[Pt]=ut[jt-2-Pt],ut[Pt+1]=ut[jt-1-Pt],ut[jt-2-Pt]=fr,ut[jt-1-Pt]=ur}}(st,Ue),_t.push(st)}let kt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Nt{constructor(Oe,Je){let Ae=(Je=this.options=function(Ue,Ze){for(let st in Ze)Ue[st]=Ze[st];return Ue}(Object.create(kt),Je)).debug;if(Ae&&console.time("preprocess data"),Je.maxZoom<0||Je.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(Ue,Ze){let st=[];if(Ue.type==="FeatureCollection")for(let ut=0;ut<Ue.features.length;ut++)j(st,Ue.features[ut],Ze,ut);else j(st,Ue.type==="Feature"?Ue:{geometry:Ue},Ze);return st}(Oe,Je);this.tiles={},this.tileCoords=[],Ae&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Je.indexMaxZoom,Je.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Le=function(Ue,Ze){let st=Ze.buffer/Ze.extent,ut=Ue,Ut=Ie(Ue,1,-1-st,st,0,-1,2,Ze),Ct=Ie(Ue,1,1-st,2+st,0,-1,2,Ze);return(Ut||Ct)&&(ut=Ie(Ue,1,-st,1+st,0,-1,2,Ze)||[],Ut&&(ut=ue(Ut,1).concat(ut)),Ct&&(ut=ut.concat(ue(Ct,-1)))),ut}(Le,Je),Le.length&&this.splitTile(Le,0,0,0),Ae&&(Le.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(Oe,Je,Ae,Le,Ue,Ze,st){let ut=[Oe,Je,Ae,Le],Ut=this.options,Ct=Ut.debug;for(;ut.length;){Le=ut.pop(),Ae=ut.pop(),Je=ut.pop(),Oe=ut.pop();let Pt=1<<Je,jt=Gt(Je,Ae,Le),fr=this.tiles[jt];if(!fr&&(Ct>1&&console.time("creation"),fr=this.tiles[jt]=rt(Oe,Je,Ae,Le,Ut),this.tileCoords.push({z:Je,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,Ae,Le,fr.numFeatures,fr.numPoints,fr.numSimplified),console.timeEnd("creation"));let wi=`z${Je}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(fr.source=Oe,Ue==null){if(Je===Ut.indexMaxZoom||fr.numPoints<=Ut.indexMaxPoints)continue}else{if(Je===Ut.maxZoom||Je===Ue)continue;if(Ue!=null){let wi=Ue-Je;if(Ae!==Ze>>wi||Le!==st>>wi)continue}}if(fr.source=null,Oe.length===0)continue;Ct>1&&console.time("clipping");let ur=.5*Ut.buffer/Ut.extent,sr=.5-ur,Pr=.5+ur,Ta=1+ur,Oa=null,Ia=null,qa=null,Wa=null,Ca=Ie(Oe,Pt,Ae-ur,Ae+Pr,0,fr.minX,fr.maxX,Ut),hi=Ie(Oe,Pt,Ae+sr,Ae+Ta,0,fr.minX,fr.maxX,Ut);Oe=null,Ca&&(Oa=Ie(Ca,Pt,Le-ur,Le+Pr,1,fr.minY,fr.maxY,Ut),Ia=Ie(Ca,Pt,Le+sr,Le+Ta,1,fr.minY,fr.maxY,Ut),Ca=null),hi&&(qa=Ie(hi,Pt,Le-ur,Le+Pr,1,fr.minY,fr.maxY,Ut),Wa=Ie(hi,Pt,Le+sr,Le+Ta,1,fr.minY,fr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ut.push(Oa||[],Je+1,2*Ae,2*Le),ut.push(Ia||[],Je+1,2*Ae,2*Le+1),ut.push(qa||[],Je+1,2*Ae+1,2*Le),ut.push(Wa||[],Je+1,2*Ae+1,2*Le+1)}}getTile(Oe,Je,Ae){Oe=+Oe,Je=+Je,Ae=+Ae;let Le=this.options,{extent:Ue,debug:Ze}=Le;if(Oe<0||Oe>24)return null;let st=1<<Oe,ut=Gt(Oe,Je=Je+st&st-1,Ae);if(this.tiles[ut])return Ce(this.tiles[ut],Ue);Ze>1&&console.log("drilling down to z%d-%d-%d",Oe,Je,Ae);let Ut,Ct=Oe,Pt=Je,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Gt(Ct,Pt,jt)];return Ut&&Ut.source?(Ze>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Oe,Je,Ae),Ze>1&&console.timeEnd("drilling down"),this.tiles[ut]?Ce(this.tiles[ut],Ue):null):null}}function Gt(_t,Oe,Je){return 32*((1<<_t)*Je+Oe)+_t}function Mr(_t,Oe){return Oe?_t.properties[Oe]:_t.id}function mr(_t,Oe){if(_t==null)return!0;if(_t.type==="Feature")return Mr(_t,Oe)!=null;if(_t.type==="FeatureCollection"){let Je=new Set;for(let Ae of _t.features){let Le=Mr(Ae,Oe);if(Le==null||Je.has(Le))return!1;Je.add(Le)}return!0}return!1}function qr(_t,Oe){let Je=new Map;if(_t!=null)if(_t.type==="Feature")Je.set(Mr(_t,Oe),_t);else for(let Ae of _t.features)Je.set(Mr(Ae,Oe),Ae);return Je}class Er extends n{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=Oe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Le=this._geoJSONIndex.getTile(Ae.z,Ae.x,Ae.y);if(!Le)return null;let Ue=new class{constructor(st){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=st.length,this._features=st}feature(st){return new class{constructor(ut){this._feature=ut,this.extent=e.X,this.type=ut.type,this.properties=ut.tags,"id"in ut&&!isNaN(ut.id)&&(this.id=parseInt(ut.id,10))}loadGeometry(){if(this._feature.type===1){let ut=[];for(let Ut of this._feature.geometry)ut.push([new e.P(Ut[0],Ut[1])]);return ut}{let ut=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ut.push(Ct)}return ut}}toGeoJSON(ut,Ut,Ct){return v.call(this,ut,Ut,Ct)}}(this._features[st])}}(Le.features),Ze=F(Ue);return Ze.byteOffset===0&&Ze.byteLength===Ze.buffer.byteLength||(Ze=new Uint8Array(Ze)),{vectorTile:Ue,rawData:Ze.buffer}})}loadData(Oe){return e._(this,void 0,void 0,function*(){var Je;(Je=this._pendingRequest)===null||Je===void 0||Je.abort();let Ae=!!(Oe&&Oe.request&&Oe.request.collectResourceTiming)&&new e.bv(Oe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Oe,this._pendingRequest),this._geoJSONIndex=Oe.cluster?new $(function({superclusterOptions:Ze,clusterProperties:st}){if(!st||!Ze)return Ze;let ut={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let fr of jt){let[ur,sr]=st[fr],Pr=e.bC(sr),Ta=e.bC(typeof ur=="string"?[ur,["accumulated"],["get",fr]]:ur);ut[fr]=Pr.value,Ut[fr]=Ta.value}return Ze.map=fr=>{Pt.properties=fr;let ur={};for(let sr of jt)ur[sr]=ut[sr].evaluate(Ct,Pt);return ur},Ze.reduce=(fr,ur)=>{Pt.properties=ur;for(let sr of jt)Ct.accumulated=fr[sr],fr[sr]=Ut[sr].evaluate(Ct,Pt)},Ze}(Oe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Nt(Le,Oe.geojsonVtOptions)),this.loaded={};let Ue={};if(Ae){let Ze=Ae.finish();Ze&&(Ue.resourceTiming={},Ue.resourceTiming[Oe.source]=JSON.parse(JSON.stringify(Ze)))}return Ue}catch(Ue){if(delete this._pendingRequest,e.bB(Ue))return{abandoned:!0};throw Ue}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Oe){let Je=this.loaded;return Je&&Je[Oe.uid]?super.reloadTile(Oe):this.loadTile(Oe)}loadAndProcessGeoJSON(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Oe,Je);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Oe.filter){let Le=e.bC(Oe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ze=>`${Ze.key}: ${Ze.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ze=>Le.value.evaluate({zoom:0},Ze))}}return Ae})}loadGeoJSON(Oe,Je){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Oe;if(Oe.request){let Le=yield e.h(Oe.request,Je);return this._dataUpdateable=mr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Oe.data=="string")try{let Le=JSON.parse(Oe.data);return this._dataUpdateable=mr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`)}if(!Oe.dataDiff)throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Oe.source}`);return function(Le,Ue,Ze){var st,ut,Ut,Ct;if(Ue.removeAll&&Le.clear(),Ue.remove)for(let Pt of Ue.remove)Le.delete(Pt);if(Ue.add)for(let Pt of Ue.add){let jt=Mr(Pt,Ze);jt!=null&&Le.set(jt,Pt)}if(Ue.update)for(let Pt of Ue.update){let jt=Le.get(Pt.id);if(jt==null)continue;let fr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ut=Pt.addOrUpdateProperties)===null||ut===void 0?void 0:ut.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||fr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),fr&&(jt.properties=Object.assign({},jt.properties))),Pt.newGeometry&&(jt.geometry=Pt.newGeometry),Pt.removeAllProperties)jt.properties={};else if(((Ut=Pt.removeProperties)===null||Ut===void 0?void 0:Ut.length)>0)for(let ur of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,ur)&&delete jt.properties[ur];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:ur,value:sr}of Pt.addOrUpdateProperties)jt.properties[ur]=sr}}(this._dataUpdateable,Oe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Oe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Oe){return this._geoJSONIndex.getClusterExpansionZoom(Oe.clusterId)}getClusterChildren(Oe){return this._geoJSONIndex.getChildren(Oe.clusterId)}getClusterLeaves(Oe){return this._geoJSONIndex.getLeaves(Oe.clusterId,Oe.limit,Oe.offset)}}class Ir{constructor(Oe){this.self=Oe,this.actor=new e.F(Oe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,Ae)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Je=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,Ae)=>this._getDEMWorkerSource(Je,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Je,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][Ae.type]||!this.workerSources[Je][Ae.type][Ae.source])return;let Le=this.workerSources[Je][Ae.type][Ae.source];delete this.workerSources[Je][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Je=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Je,Ae)=>this._syncRTLPluginState(Je,Ae)),this.actor.registerMessageHandler("IS",(Je,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Je,Ae)=>this._setImages(Je,Ae)),this.actor.registerMessageHandler("UL",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(Ae)}))}_setImages(Oe,Je){return e._(this,void 0,void 0,function*(){this.availableImages[Oe]=Je;for(let Ae in this.workerSources[Oe]){let Le=this.workerSources[Oe][Ae];for(let Ue in Le)Le[Ue].availableImages=Je}})}_syncRTLPluginState(Oe,Je){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Je.pluginStatus!=="loading")return e.bD.setState(Je),Je;let Ae=Je.pluginURL;if(this.self.importScripts(Ae),e.bD.isParsed()){let Le={pluginStatus:"loaded",pluginURL:Ae};return e.bD.setState(Le),Le}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ae}`)})}_getAvailableImages(Oe){let Je=this.availableImages[Oe];return Je||(Je=[]),Je}_getLayerIndex(Oe){let Je=this.layerIndexes[Oe];return Je||(Je=this.layerIndexes[Oe]=new t),Je}_getWorkerSource(Oe,Je,Ae){if(this.workerSources[Oe]||(this.workerSources[Oe]={}),this.workerSources[Oe][Je]||(this.workerSources[Oe][Je]={}),!this.workerSources[Oe][Je][Ae]){let Le={sendAsync:(Ue,Ze)=>(Ue.targetMapId=Oe,this.actor.sendAsync(Ue,Ze))};switch(Je){case"vector":this.workerSources[Oe][Je][Ae]=new n(Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe));break;case"geojson":this.workerSources[Oe][Je][Ae]=new Er(Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe));break;default:this.workerSources[Oe][Je][Ae]=new this.externalWorkerSourceTypes[Je](Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe))}}return this.workerSources[Oe][Je][Ae]}_getDEMWorkerSource(Oe,Je){return this.demWorkerSources[Oe]||(this.demWorkerSources[Oe]={}),this.demWorkerSources[Oe][Je]||(this.demWorkerSources[Oe][Je]=new i),this.demWorkerSources[Oe][Je]}}return e.i(self)&&(self.worker=new Ir(self)),Ir}),S("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,n={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Fe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Fe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Fe,I=0){return this.getImageCanvasContext(Fe).getImageData(-I,-I,Fe.width+2*I,Fe.height+2*I)},getImageCanvasContext(Fe){let I=window.document.createElement("canvas"),ie=I.getContext("2d",{willReadFrequently:!0});if(!ie)throw new Error("failed to create canvas 2d context");return I.width=Fe.width,I.height=Fe.height,ie.drawImage(Fe,0,0,Fe.width,Fe.height),ie},resolveURL:Fe=>(o||(o=document.createElement("a")),o.href=Fe,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class i{static testProp(I){if(!i.docStyle)return I[0];for(let ie=0;ie<I.length;ie++)if(I[ie]in i.docStyle)return I[ie];return I[0]}static create(I,ie,Te){let Me=window.document.createElement(I);return ie!==void 0&&(Me.className=ie),Te&&Te.appendChild(Me),Me}static createNS(I,ie){return window.document.createElementNS(I,ie)}static disableDrag(){i.docStyle&&i.selectProp&&(i.userSelect=i.docStyle[i.selectProp],i.docStyle[i.selectProp]="none")}static enableDrag(){i.docStyle&&i.selectProp&&(i.docStyle[i.selectProp]=i.userSelect)}static setTransform(I,ie){I.style[i.transformProp]=ie}static addEventListener(I,ie,Te,Me={}){I.addEventListener(ie,Te,"passive"in Me?Me:Me.capture)}static removeEventListener(I,ie,Te,Me={}){I.removeEventListener(ie,Te,"passive"in Me?Me:Me.capture)}static suppressClickInternal(I){I.preventDefault(),I.stopPropagation(),window.removeEventListener("click",i.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",i.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(I){let ie=I.getBoundingClientRect();return{x:ie.width/I.offsetWidth||1,y:ie.height/I.offsetHeight||1,boundingClientRect:ie}}static getPoint(I,ie,Te){let Me=ie.boundingClientRect;return new t.P((Te.clientX-Me.left)/ie.x-I.clientLeft,(Te.clientY-Me.top)/ie.y-I.clientTop)}static mousePos(I,ie){let Te=i.getScale(I);return i.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=i.getScale(I);for(let ze=0;ze<ie.length;ze++)Te.push(i.getPoint(I,Me,ie[ze]));return Te}static mouseButton(I){return I.button}static remove(I){I.parentNode&&I.parentNode.removeChild(I)}}i.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,i.selectProp=i.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),i.transformProp=i.testProp(["transform","WebkitTransform"]);let s={supported:!1,testSupport:function(Fe){!v&&f&&(c?T(Fe):h=Fe)}},h,f,v=!1,c=!1;function T(Fe){let I=Fe.createTexture();Fe.bindTexture(Fe.TEXTURE_2D,I);try{if(Fe.texImage2D(Fe.TEXTURE_2D,0,Fe.RGBA,Fe.RGBA,Fe.UNSIGNED_BYTE,f),Fe.isContextLost())return;s.supported=!0}catch{}Fe.deleteTexture(I),v=!0}var l;typeof document<"u"&&(f=document.createElement("img"),f.onload=()=>{h&&T(h),h=null,c=!0},f.onerror=()=>{v=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Fe){let I,ie,Te,Me;Fe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Fe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Fe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Fe.getImage=(Ot,$t,Tr=!0)=>new Promise((Ar,Kr)=>{s.supported&&(Ot.headers||(Ot.headers={}),Ot.headers.accept="image/webp,*/*"),t.e(Ot,{type:"image"}),I.push({abortController:$t,requestParameters:Ot,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Ar(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Ar,onSuccess:Kr,abortController:na}=Ot,Ve=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((pt,Et)=>pt&&Et==="accept",!0));ie++;let $e=Ve?wt($t,na):t.m($t,na);try{let pt=yield $e;delete Ot.abortController,Ot.state="completed",pt.data instanceof HTMLImageElement||t.b(pt.data)?Kr(pt):pt.data&&Kr({data:yield(ot=pt.data,typeof createImageBitmap=="function"?t.d(ot):t.f(ot)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Ar(pt)}finally{ie--,ht()}var ot}),ht=()=>{let Ot=(()=>{for(let $t of Object.keys(Me))if(Me[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ie;$t<Ot&&I.length>0;$t++){let Tr=I.shift();Tr.abortController.signal.aborted?$t--:ze(Tr)}},wt=(Ot,$t)=>new Promise((Tr,Ar)=>{let Kr=new Image,na=Ot.url,Ve=Ot.credentials;Ve&&Ve==="include"?Kr.crossOrigin="use-credentials":(Ve&&Ve==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Ar(t.c())}),Kr.fetchPriority="high",Kr.onload=()=>{Kr.onerror=Kr.onload=null,Tr({data:Kr})},Kr.onerror=()=>{Kr.onerror=Kr.onload=null,$t.signal.aborted||Ar(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."))},Kr.src=na})}(l||(l={})),l.resetRequestQueue();class _{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Fe){var I=new t.A(3);return I[0]=Fe[0],I[1]=Fe[1],I[2]=Fe[2],I}var A,M=function(Fe,I,ie){return Fe[0]=I[0]-ie[0],Fe[1]=I[1]-ie[1],Fe[2]=I[2]-ie[2],Fe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var g=function(Fe){var I=Fe[0],ie=Fe[1];return I*I+ie*ie};function b(Fe){let I=[];if(typeof Fe=="string")I.push({id:"default",url:Fe});else if(Fe&&Fe.length>0){let ie=[];for(let{id:Te,url:Me}of Fe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function p(Fe,I,ie){let Te=Fe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Fe=new t.A(2);t.A!=Float32Array&&(Fe[0]=0,Fe[1]=0)})();class u{constructor(I,ie,Te,Me){this.context=I,this.format=Te,this.texture=I.gl.createTexture(),this.update(ie,Me)}update(I,ie,Te){let{width:Me,height:ze}=I,ht=!(this.size&&this.size[0]===Me&&this.size[1]===ze||Te),{context:wt}=this,{gl:Ot}=wt;if(this.useMipmap=!!(ie&&ie.useMipmap),Ot.bindTexture(Ot.TEXTURE_2D,this.texture),wt.pixelStoreUnpackFlipY.set(!1),wt.pixelStoreUnpack.set(1),wt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ot.RGBA&&(!ie||ie.premultiply!==!1)),ht)this.size=[Me,ze],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,this.format,Ot.UNSIGNED_BYTE,I):Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,Me,ze,0,this.format,Ot.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=Te||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Ot.RGBA,Ot.UNSIGNED_BYTE,I):Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Me,ze,Ot.RGBA,Ot.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ot.generateMipmap(Ot.TEXTURE_2D)}bind(I,ie,Te){let{context:Me}=this,{gl:ze}=Me;ze.bindTexture(ze.TEXTURE_2D,this.texture),Te!==ze.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Te=ze.LINEAR),I!==this.filter&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,I),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,Te||I),this.filter=I),ie!==this.wrap&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ie),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ie),this.wrap=ie)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function y(Fe){let{userImage:I}=Fe;return!!(I&&I.render&&I.render())&&(Fe.data.replace(new Uint8Array(I.data.buffer)),!0)}class m extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ie,promiseResolve:Te}of this.requestors)Te(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let Te=ie.spriteData;ie.data=new t.R({width:Te.width,height:Te.height},Te.context.getImageData(Te.x,Te.y,Te.width,Te.height).data),ie.spriteData=null}return ie}addImage(I,ie){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ie)&&(this.images[I]=ie)}_validate(I,ie){let Te=!0,Me=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Me&&Me.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Te=!1),this._validateStretch(ie.stretchY,Me&&Me.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Te=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),Te=!1),Te}_validateStretch(I,ie){if(!I)return!0;let Te=0;for(let Me of I){if(Me[0]<Te||Me[1]<Me[0]||ie<Me[1])return!1;Te=Me[1]}return!0}_validateContent(I,ie){if(!I)return!0;if(I.length!==4)return!1;let Te=ie.spriteData,Me=Te&&Te.width||ie.data.width,ze=Te&&Te.height||ie.data.height;return!(I[0]<0||Me<I[0]||I[1]<0||ze<I[1]||I[2]<0||Me<I[2]||I[3]<0||ze<I[3]||I[2]<I[0]||I[3]<I[1])}updateImage(I,ie,Te=!0){let Me=this.getImage(I);if(Te&&(Me.data.width!==ie.data.width||Me.data.height!==ie.data.height))throw new Error(`size mismatch between old image (${Me.data.width}x${Me.data.height}) and new image (${ie.data.width}x${ie.data.height}).`);ie.version=Me.version+1,this.images[I]=ie,this.updatedImages[I]=!0}removeImage(I){let ie=this.images[I];delete this.images[I],delete this.patterns[I],ie.userImage&&ie.userImage.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(I){return new Promise((ie,Te)=>{let Me=!0;if(!this.isLoaded())for(let ze of I)this.images[ze]||(Me=!1);this.isLoaded()||Me?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let Te of I){let Me=this.getImage(Te);Me||(this.fire(new t.k("styleimagemissing",{id:Te})),Me=this.getImage(Te)),Me?ie[Te]={data:Me.data.clone(),pixelRatio:Me.pixelRatio,sdf:Me.sdf,version:Me.version,stretchX:Me.stretchX,stretchY:Me.stretchY,content:Me.content,textFitWidth:Me.textFitWidth,textFitHeight:Me.textFitHeight,hasRenderCallback:!!(Me.userImage&&Me.userImage.render)}:t.w(`Image "${Te}" 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 ie}getPixelSize(){let{width:I,height:ie}=this.atlasImage;return{width:I,height:ie}}getPattern(I){let ie=this.patterns[I],Te=this.getImage(I);if(!Te)return null;if(ie&&ie.position.version===Te.version)return ie.position;if(ie)ie.position.version=Te.version;else{let Me={w:Te.data.width+2,h:Te.data.height+2,x:0,y:0},ze=new t.I(Me,Te);this.patterns[I]={bin:Me,position:ze}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ie=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(I,this.atlasImage,ie.RGBA),this.atlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let ze in this.patterns)I.push(this.patterns[ze].bin);let{w:ie,h:Te}=t.p(I),Me=this.atlasImage;Me.resize({width:ie||1,height:Te||1});for(let ze in this.patterns){let{bin:ht}=this.patterns[ze],wt=ht.x+1,Ot=ht.y+1,$t=this.getImage(ze).data,Tr=$t.width,Ar=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Ar}),t.R.copy($t,Me,{x:0,y:Ar-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Ar},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Ar}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Ar})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ie of I){if(this.callbackDispatchedThisFrame[ie])continue;this.callbackDispatchedThisFrame[ie]=!0;let Te=this.getImage(ie);Te||t.w(`Image with ID: "${ie}" was not found`),y(Te)&&this.updateImage(ie,Te)}}}let R=1e20;function L(Fe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t<I+Te;$t++)z(Fe,ie*ze+$t,ze,Me,ht,wt,Ot);for(let $t=ie;$t<ie+Me;$t++)z(Fe,$t*ze+I,1,Te,ht,wt,Ot)}function z(Fe,I,ie,Te,Me,ze,ht){ze[0]=0,ht[0]=-R,ht[1]=R,Me[0]=Fe[I];for(let wt=1,Ot=0,$t=0;wt<Te;wt++){Me[wt]=Fe[I+wt*ie];let Tr=wt*wt;do{let Ar=ze[Ot];$t=(Me[wt]-Me[Ar]+Tr-Ar*Ar)/(wt-Ar)/2}while($t<=ht[Ot]&&--Ot>-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=R}for(let wt=0,Ot=0;wt<Te;wt++){for(;ht[Ot+1]<wt;)Ot++;let $t=ze[Ot],Tr=wt-$t;Fe[I+wt*ie]=Me[$t]+Tr*Tr}}class F{constructor(I,ie){this.requestManager=I,this.localIdeographFontFamily=ie,this.entries={}}setURL(I){this.url=I}getGlyphs(I){return t._(this,void 0,void 0,function*(){let ie=[];for(let ze in I)for(let ht of I[ze])ie.push(this._getAndCacheGlyphsPromise(ze,ht));let Te=yield Promise.all(ie),Me={};for(let{stack:ze,id:ht,glyph:wt}of Te)Me[ze]||(Me[ze]={}),Me[ze][ht]=wt&&{id:wt.id,bitmap:wt.bitmap.clone(),metrics:wt.metrics};return Me})}_getAndCacheGlyphsPromise(I,ie){return t._(this,void 0,void 0,function*(){let Te=this.entries[I];Te||(Te=this.entries[I]={glyphs:{},requests:{},ranges:{}});let Me=Te.glyphs[ie];if(Me!==void 0)return{stack:I,id:ie,glyph:Me};if(Me=this._tinySDF(Te,I,ie),Me)return Te.glyphs[ie]=Me,{stack:I,id:ie,glyph:Me};let ze=Math.floor(ie/256);if(256*ze>65535)throw new Error("glyphs > 65535 not supported");if(Te.ranges[ze])return{stack:I,id:ie,glyph:Me};if(!this.url)throw new Error("glyphsUrl is not set");if(!Te.requests[ze]){let wt=F.loadGlyphRange(I,ze,this.url,this.requestManager);Te.requests[ze]=wt}let ht=yield Te.requests[ze];for(let wt in ht)this._doesCharSupportLocalGlyph(+wt)||(Te.glyphs[+wt]=ht[+wt]);return Te.ranges[ze]=!0,{stack:I,id:ie,glyph:ht[ie]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ie,Te){let Me=this.localIdeographFontFamily;if(!Me||!this._doesCharSupportLocalGlyph(Te))return;let ze=I.tinySDF;if(!ze){let wt="400";/bold/i.test(ie)?wt="900":/medium/i.test(ie)?wt="500":/light/i.test(ie)&&(wt="200"),ze=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Me,fontWeight:wt})}let ht=ze.draw(String.fromCharCode(Te));return{id:Te,bitmap:new t.o({width:ht.width||60,height:ht.height||60},ht.data),metrics:{width:ht.glyphWidth/2||24,height:ht.glyphHeight/2||24,left:ht.glyphLeft/2+.5||0,top:ht.glyphTop/2-27.5||-8,advance:ht.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Fe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Fe).replace("{range}",`${Me}-${ze}`),"Glyphs"),wt=yield t.l(ht,new AbortController);if(!wt||!wt.data)throw new Error(`Could not load glyph range. range: ${I}, ${Me}-${ze}`);let Ot={};for(let $t of t.n(wt.data))Ot[$t.id]=$t;return Ot})},F.TinySDF=class{constructor({fontSize:Fe=24,buffer:I=3,radius:ie=8,cutoff:Te=.25,fontFamily:Me="sans-serif",fontWeight:ze="normal",fontStyle:ht="normal"}={}){this.buffer=I,this.cutoff=Te,this.radius=ie;let wt=this.size=Fe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Fe}px ${Me}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(wt*wt),this.gridInner=new Float64Array(wt*wt),this.f=new Float64Array(wt),this.z=new Float64Array(wt+1),this.v=new Uint16Array(wt)}_createCanvas(Fe){let I=document.createElement("canvas");return I.width=I.height=Fe,I}draw(Fe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Fe),ht=Math.ceil(ie),wt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(ze-Me))),Ot=Math.min(this.size-this.buffer,ht+Math.ceil(Te)),$t=wt+2*this.buffer,Tr=Ot+2*this.buffer,Ar=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Ar),na={data:Kr,width:$t,height:Tr,glyphWidth:wt,glyphHeight:Ot,glyphTop:ht,glyphLeft:0,glyphAdvance:I};if(wt===0||Ot===0)return na;let{ctx:Ve,buffer:$e,gridInner:ot,gridOuter:pt}=this;Ve.clearRect($e,$e,wt,Ot),Ve.fillText(Fe,$e,$e+ht);let Et=Ve.getImageData($e,$e,wt,Ot);pt.fill(R,0,Ar),ot.fill(0,0,Ar);for(let bt=0;bt<Ot;bt++)for(let Rt=0;Rt<wt;Rt++){let lr=Et.data[4*(bt*wt+Rt)+3]/255;if(lr===0)continue;let yr=(bt+$e)*$t+Rt+$e;if(lr===1)pt[yr]=0,ot[yr]=R;else{let kr=.5-lr;pt[yr]=kr>0?kr*kr:0,ot[yr]=kr<0?kr*kr:0}}L(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),L(ot,$e,$e,wt,Ot,$t,this.f,this.v,this.z);for(let bt=0;bt<Ar;bt++){let Rt=Math.sqrt(pt[bt])-Math.sqrt(ot[bt]);Kr[bt]=Math.round(255-255*(Rt/this.radius+this.cutoff))}return na}};class N{constructor(){this.specification=t.v.light.position}possiblyEvaluate(I,ie){return t.x(I.expression.evaluate(ie))}interpolate(I,ie,Te){return{x:t.y.number(I.x,ie.x,Te),y:t.y.number(I.y,ie.y,Te),z:t.y.number(I.z,ie.z,Te)}}}let O;class P extends t.E{constructor(I){super(),O=O||new t.q({anchor:new t.D(t.v.light.anchor),position:new N,color:new t.D(t.v.light.color),intensity:new t.D(t.v.light.intensity)}),this._transitionable=new t.T(O),this.setLight(I),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(I,ie={}){if(!this._validate(t.r,I,ie))for(let Te in I){let Me=I[Te];Te.endsWith("-transition")?this._transitionable.setTransition(Te.slice(0,-11),Me):this._transitionable.setValue(Te,Me)}}updateTransitions(I){this._transitioning=this._transitionable.transitioned(I,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(I){this.properties=this._transitioning.possiblyEvaluate(I)}_validate(I,ie,Te){return(!Te||Te.validate!==!1)&&t.t(this,I.call(t.u,{value:ie,style:{glyphs:!0,sprite:!0},styleSpec:t.v}))}}let U=new t.q({"sky-color":new t.D(t.v.sky["sky-color"]),"horizon-color":new t.D(t.v.sky["horizon-color"]),"fog-color":new t.D(t.v.sky["fog-color"]),"fog-ground-blend":new t.D(t.v.sky["fog-ground-blend"]),"horizon-fog-blend":new t.D(t.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new t.D(t.v.sky["sky-horizon-blend"]),"atmosphere-blend":new t.D(t.v.sky["atmosphere-blend"])});class B extends t.E{constructor(I){super(),this._transitionable=new t.T(U),this.setSky(I),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.z(0))}setSky(I,ie={}){if(!this._validate(t.B,I,ie)){I||(I={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let Te in I){let Me=I[Te];Te.endsWith("-transition")?this._transitionable.setTransition(Te.slice(0,-11),Me):this._transitionable.setValue(Te,Me)}}}getSky(){return this._transitionable.serialize()}updateTransitions(I){this._transitioning=this._transitionable.transitioned(I,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(I){this.properties=this._transitioning.possiblyEvaluate(I)}_validate(I,ie,Te={}){return Te?.validate!==!1&&t.t(this,I.call(t.u,t.e({value:ie,style:{glyphs:!0,sprite:!0},styleSpec:t.v})))}calculateFogBlendOpacity(I){return I<60?0:I<70?(I-60)/10:1}}class X{constructor(I,ie){this.width=I,this.height=ie,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(I,ie){let Te=I.join(",")+String(ie);return this.dashEntry[Te]||(this.dashEntry[Te]=this.addDash(I,ie)),this.dashEntry[Te]}getDashRanges(I,ie,Te){let Me=[],ze=I.length%2==1?-I[I.length-1]*Te:0,ht=I[0]*Te,wt=!0;Me.push({left:ze,right:ht,isDash:wt,zeroLength:I[0]===0});let Ot=I[0];for(let $t=1;$t<I.length;$t++){wt=!wt;let Tr=I[$t];ze=Ot*Te,Ot+=Tr,ht=Ot*Te,Me.push({left:ze,right:ht,isDash:wt,zeroLength:Tr===0})}return Me}addRoundDash(I,ie,Te){let Me=ie/2;for(let ze=-Te;ze<=Te;ze++){let ht=this.width*(this.nextRow+Te+ze),wt=0,Ot=I[wt];for(let $t=0;$t<this.width;$t++){$t/Ot.right>1&&(Ot=I[++wt]);let Tr=Math.abs($t-Ot.left),Ar=Math.abs($t-Ot.right),Kr=Math.min(Tr,Ar),na,Ve=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(Ve);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+Ve*Ve);this.data[ht+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let wt=I.length-1;wt>=0;--wt){let Ot=I[wt],$t=I[wt+1];Ot.zeroLength?I.splice(wt,1):$t&&$t.isDash===Ot.isDash&&($t.left=Ot.left,I.splice(wt,1))}let ie=I[0],Te=I[I.length-1];ie.isDash===Te.isDash&&(ie.left=Te.left-this.width,Te.right=ie.right+this.width);let Me=this.width*this.nextRow,ze=0,ht=I[ze];for(let wt=0;wt<this.width;wt++){wt/ht.right>1&&(ht=I[++ze]);let Ot=Math.abs(wt-ht.left),$t=Math.abs(wt-ht.right),Tr=Math.min(Ot,$t);this.data[Me+wt]=Math.max(0,Math.min(255,(ht.isDash?Tr:-Tr)+128))}}addDash(I,ie){let Te=ie?7:0,Me=2*Te+1;if(this.nextRow+Me>this.height)return t.w("LineAtlas out of space"),null;let ze=0;for(let wt=0;wt<I.length;wt++)ze+=I[wt];if(ze!==0){let wt=this.width/ze,Ot=this.getDashRanges(I,this.width,wt);ie?this.addRoundDash(Ot,wt,Te):this.addRegularDash(Ot)}let ht={y:(this.nextRow+Te+.5)/this.height,height:2*Te/this.height,width:ze};return this.nextRow+=Me,this.dirty=!0,ht}bind(I){let ie=I.gl;this.texture?(ie.bindTexture(ie.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,this.width,this.height,ie.ALPHA,ie.UNSIGNED_BYTE,this.data))):(this.texture=ie.createTexture(),ie.bindTexture(ie.TEXTURE_2D,this.texture),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.REPEAT),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.REPEAT),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.LINEAR),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.LINEAR),ie.texImage2D(ie.TEXTURE_2D,0,ie.ALPHA,this.width,this.height,0,ie.ALPHA,ie.UNSIGNED_BYTE,this.data))}}let $="maplibre_preloaded_worker_pool";class le{constructor(){this.active={}}acquire(I){if(!this.workers)for(this.workers=[];this.workers.length<le.workerCount;)this.workers.push(new Worker(t.a.WORKER_URL));return this.active[I]=!0,this.workers.slice()}release(I){delete this.active[I],this.numActive()===0&&(this.workers.forEach(ie=>{ie.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[$]}numActive(){return Object.keys(this.active).length}}let ce=Math.floor(n.hardwareConcurrency/2),de,G;function Y(){return de||(de=new le),de}le.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class ee{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let Te=this.workerPool.acquire(ie);for(let Me=0;Me<Te.length;Me++){let ze=new t.F(Te[Me],ie);ze.name=`Worker ${Me}`,this.actors.push(ze)}if(!this.actors.length)throw new Error("No actors found")}broadcast(I,ie){let Te=[];for(let Me of this.actors)Te.push(Me.sendAsync({type:I,data:ie}));return Promise.all(Te)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(I=!0){this.actors.forEach(ie=>{ie.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ie){for(let Te of this.actors)Te.registerMessageHandler(I,ie)}}function q(){return G||(G=new ee(Y(),t.G),G.registerMessageHandler("GR",(Fe,I,ie)=>t.m(I,ie))),G}function se(Fe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Fe.width,.5*Fe.height,1]),t.L(ie,ie,Fe.calculatePosMatrix(I.toUnwrapped()))}function ae(Fe,I,ie,Te,Me,ze){let ht=function(Ar,Kr,na){if(Ar)for(let Ve of Ar){let $e=Kr[Ve];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let Ve in Kr){let $e=Kr[Ve];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Fe.id),wt=ze.maxPitchScaleFactor(),Ot=Fe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Ar of Ot)$t.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(I,ie,Fe._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,Me,ze,wt,se(Fe.transform,Ar.tileID))});let Tr=function(Ar){let Kr={},na={};for(let Ve of Ar){let $e=Ve.queryResults,ot=Ve.wrappedTileID,pt=na[ot]=na[ot]||{};for(let Et in $e){let bt=$e[Et],Rt=pt[Et]=pt[Et]||{},lr=Kr[Et]=Kr[Et]||[];for(let yr of bt)Rt[yr.featureIndex]||(Rt[yr.featureIndex]=!0,lr.push(yr))}}return Kr}($t);for(let Ar in Tr)Tr[Ar].forEach(Kr=>{let na=Kr.feature,Ve=Fe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=Ve});return Tr}function j(Fe,I){let ie=Fe.tileID,Te=I.tileID;return ie.overscaledZ-Te.overscaledZ||ie.canonical.y-Te.canonical.y||ie.wrap-Te.wrap||ie.canonical.x-Te.canonical.x}function Q(Fe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Fe;if(Fe.url?Te=(yield t.h(I.transformRequest(Fe.url,"Source"),ie)).data:yield n.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Fe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Te&&Te.vector_layers&&(Me.vectorLayerIds=Te.vector_layers.map(ze=>ze.id)),Me})}class re{constructor(I,ie){I&&(ie?this.setSouthWest(I).setNorthEast(ie):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}extend(I){let ie=this._sw,Te=this._ne,Me,ze;if(I instanceof t.N)Me=I,ze=I;else{if(!(I instanceof re))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(re.convert(I)):this.extend(t.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(t.N.convert(I)):this;if(Me=I._sw,ze=I._ne,!Me||!ze)return this}return ie||Te?(ie.lng=Math.min(Me.lng,ie.lng),ie.lat=Math.min(Me.lat,ie.lat),Te.lng=Math.max(ze.lng,Te.lng),Te.lat=Math.max(ze.lat,Te.lat)):(this._sw=new t.N(Me.lng,Me.lat),this._ne=new t.N(ze.lng,ze.lat)),this}getCenter(){return new t.N((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 t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.N(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(I){let{lng:ie,lat:Te}=t.N.convert(I),Me=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Me=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=Te&&Te<=this._ne.lat&&Me}static convert(I){return I instanceof re?I:I&&new re(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new re(new t.N(I.lng-Me,I.lat-Te),new t.N(I.lng+Me,I.lat+Te))}adjustAntiMeridian(){let I=new t.N(this._sw.lng,this._sw.lat),ie=new t.N(this._ne.lng,this._ne.lat);return new re(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=re.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=Te||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ie=Math.pow(2,I.z),Te=Math.floor(t.O(this.bounds.getWest())*ie),Me=Math.floor(t.Q(this.bounds.getNorth())*ie),ze=Math.ceil(t.O(this.bounds.getEast())*ie),ht=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=Te&&I.x<ze&&I.y>=Me&&I.y<ht}}class we extends t.E{constructor(I,ie,Te,Me){if(super(),this.id=I,this.dispatcher=Te,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.e(this,t.M(ie,["url","scheme","tileSize","promoteId"])),this._options=t.e({type:"vector"},ie),this._collectResourceTiming=ie.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Me)}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),I&&(t.e(this,I),I.bounds&&(this.tileBounds=new pe(I.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(I){this._tileJSONRequest=null,this.fire(new t.j(I))}})}loaded(){return this._loaded}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}onAdd(I){this.map=I,this.load()}setSourceProperty(I){this._tileJSONRequest&&this._tileJSONRequest.abort(),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te={request:this.map._requestManager.transformRequest(ie,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Te.request.collectResourceTiming=this._collectResourceTiming;let Me="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((ze,ht)=>{I.reloadPromise={resolve:ze,reject:ht}})}else I.actor=this.dispatcher.getActor(),Me="LT";I.abortController=new AbortController;try{let ze=yield I.actor.sendAsync({type:Me,data:Te},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,ze)}catch(ze){if(delete I.abortController,I.aborted)return;if(ze&&ze.status!==404)throw ze;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ie){if(ie&&ie.resourceTiming&&(I.resourceTiming=ie.resourceTiming),ie&&this.map._refreshExpiredTiles&&I.setExpiryData(ie),I.loadVectorData(ie,this.map.painter),I.reloadPromise){let Te=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Te.resolve).catch(Te.reject)}}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Se extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.setEventedParent(Me),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},ie),t.e(this,t.M(ie,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(t.e(this,I),I.bounds&&(this.tileBounds=new pe(I.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(I){this._tileJSONRequest=null,this.fire(new t.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return t.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Te=yield l.getImage(this.map._requestManager.transformRequest(ie,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Te&&Te.data){this.map._refreshExpiredTiles&&Te.cacheControl&&Te.expires&&I.setExpiryData({cacheControl:Te.cacheControl,expires:Te.expires});let Me=this.map.painter.context,ze=Me.gl,ht=Te.data;I.texture=this.map.painter.getTileTexture(ht.width),I.texture?I.texture.update(ht,{useMipmap:!0}):(I.texture=new u(Me,ht,ze.RGBA,{useMipmap:!0}),I.texture.bind(ze.LINEAR,ze.CLAMP_TO_EDGE,ze.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Te){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Te)throw I.state="errored",Te}})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Ie extends Se{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},ie),this.encoding=ie.encoding||"mapbox",this.redFactor=ie.redFactor,this.greenFactor=ie.greenFactor,this.blueFactor=ie.blueFactor,this.baseShift=ie.baseShift}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Me=yield l.getImage(Te,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Me&&Me.data){let ze=Me.data;this.map._refreshExpiredTiles&&Me.cacheControl&&Me.expires&&I.setExpiryData({cacheControl:Me.cacheControl,expires:Me.expires});let ht=t.b(ze)&&t.U()?ze:yield this.readImageNow(ze),wt={type:this.type,uid:I.uid,source:this.id,rawImageData:ht,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ot=yield I.actor.sendAsync({type:"LDT",data:wt});I.dem=Ot,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Me){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Me)throw I.state="errored",Me}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,Te=I.height+2;try{return new t.R({width:ie,height:Te},yield t.W(I,-1,-1,ie,Te))}catch{}}return n.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,Te=Math.pow(2,ie.z),Me=(ie.x-1+Te)%Te,ze=ie.x===0?I.wrap-1:I.wrap,ht=(ie.x+1+Te)%Te,wt=ie.x+1===Te?I.wrap+1:I.wrap,Ot={};return Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y).key]={backfilled:!1},ie.y>0&&(Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y-1).key]={backfilled:!1}),ie.y+1<Te&&(Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y+1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y+1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y+1).key]={backfilled:!1}),Ot}unloadTile(I){return t._(this,void 0,void 0,function*(){I.demTexture&&this.map.painter.saveTileTexture(I.demTexture),I.fbo&&(I.fbo.destroy(),delete I.fbo),I.dem&&delete I.dem,delete I.neighboringTiles,I.state="unloaded",I.actor&&(yield I.actor.sendAsync({type:"RDT",data:{type:this.type,uid:I.uid,source:this.id}}))})}}class Re extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Te.getActor(),this.setEventedParent(Me),this._data=ie.data,this._options=t.e({},ie),this._collectResourceTiming=ie.collectResourceTiming,ie.maxzoom!==void 0&&(this.maxzoom=ie.maxzoom),ie.type&&(this.type=ie.type),ie.attribution&&(this.attribution=ie.attribution),this.promoteId=ie.promoteId;let ze=t.X/this.tileSize;ie.clusterMaxZoom!==void 0&&this.maxzoom<=ie.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${ie.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,cluster:ie.cluster||!1,geojsonVtOptions:{buffer:(ie.buffer!==void 0?ie.buffer:128)*ze,tolerance:(ie.tolerance!==void 0?ie.tolerance:.375)*ze,extent:t.X,maxZoom:this.maxzoom,lineMetrics:ie.lineMetrics||!1,generateId:ie.generateId||!1},superclusterOptions:{maxZoom:ie.clusterMaxZoom!==void 0?ie.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,ie.clusterMinPoints||2),extent:t.X,radius:(ie.clusterRadius||50)*ze,log:!1,generateId:ie.generateId||!1},clusterProperties:ie.clusterProperties,filter:ie.filter},ie.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(I){this.map=I,this.load()}setData(I){return this._data=I,this._updateWorkerData(),this}updateData(I){return this._updateWorkerData(I),this}getData(){return t._(this,void 0,void 0,function*(){let I=t.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:I})})}setClusterOptions(I){return this.workerOptions.cluster=I.cluster,I&&(I.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=I.clusterRadius),I.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=I.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(I){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:I,source:this.id}})}getClusterChildren(I){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:I,source:this.id}})}getClusterLeaves(I,ie,Te){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:I,limit:ie,offset:Te}})}_updateWorkerData(I){return t._(this,void 0,void 0,function*(){let ie=t.e({type:this.type},this.workerOptions);I?ie.dataDiff=I:typeof this._data=="string"?(ie.request=this.map._requestManager.transformRequest(n.resolveURL(this._data),"Source"),ie.request.collectResourceTiming=this._collectResourceTiming):ie.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new t.k("dataloading",{dataType:"source"}));try{let Te=yield this.actor.sendAsync({type:"LD",data:ie});if(this._pendingLoads--,this._removed||Te.abandoned)return void this.fire(new t.k("dataabort",{dataType:"source"}));let Me=null;Te.resourceTiming&&Te.resourceTiming[this.id]&&(Me=Te.resourceTiming[this.id].slice(0));let ze={dataType:"source"};this._collectResourceTiming&&Me&&Me.length>0&&t.e(ze,{resourceTiming:Me}),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"content"})))}catch(Te){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(Te))}})}loaded(){return this._pendingLoads===0}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.actor?"RT":"LT";I.actor=this.actor;let Te={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let Me=yield this.actor.sendAsync({type:ie,data:Te},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Me,this.map.painter,ie==="RT")})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.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 t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var We=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class at extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Me),this.options=ie}load(I){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ie=yield l.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ie&&ie.data&&(this.image=ie.data,I&&(this.coordinates=I),this._finishLoading())}catch(ie){this._request=null,this._loaded=!0,this.fire(new t.j(ie))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ie=I.map(t.Z.fromLngLat);this.tileID=function(Me){let ze=1/0,ht=1/0,wt=-1/0,Ot=-1/0;for(let Kr of Me)ze=Math.min(ze,Kr.x),ht=Math.min(ht,Kr.y),wt=Math.max(wt,Kr.x),Ot=Math.max(Ot,Kr.y);let $t=Math.max(wt-ze,Ot-ht),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Ar=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Ar),Math.floor((ht+Ot)/2*Ar))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let Te=ie.map(Me=>this.tileID.getTilePoint(Me)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(Te[0].x,Te[0].y,0,0),this._boundsArray.emplaceBack(Te[1].x,Te[1].y,t.X,0),this._boundsArray.emplaceBack(Te[3].x,Te[3].y,0,t.X),this._boundsArray.emplaceBack(Te[2].x,Te[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(I,this.image,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class nt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.roundZoom=!0,this.type="video",this.options=ie}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ie of I.urls)this.urls.push(this.map._requestManager.transformRequest(ie,"Source").url);try{let ie=yield t.a3(this.urls);if(this._loaded=!0,!ie)return;this.video=ie,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ie){this.fire(new t.j(ie))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ie=this.video.seekable;I<ie.start(0)||I>ie.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ie.start(0)} and ${ie.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new u(I,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("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 tt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(ze=>!Array.isArray(ze)||ze.length!==2||ze.some(ht=>typeof ht!="number"))||this.fire(new t.j(new t.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new t.j(new t.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${I}`,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 t.j(new t.a2(`sources.${I}`,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.animate}load(){return t._(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 t.j(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(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ie=this.map.painter.context,Te=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(ie,this.canvas,Te.RGBA,{premultiply:!0});let Me=!1;for(let ze in this.tiles){let ht=this.tiles[ze];ht.state!=="loaded"&&(ht.state="loaded",ht.texture=this.texture,Me=!0)}Me&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let qe={},he=Fe=>{switch(Fe){case"geojson":return Re;case"image":return at;case"raster":return Se;case"raster-dem":return Ie;case"vector":return we;case"video":return nt;case"canvas":return tt}return qe[Fe]},ue="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=q()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ie=>{throw this.status="error",ie})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return t._(this,arguments,void 0,function*(ie,Te=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(ie),!this.url)throw new Error(`requested url ${ie} is invalid`);if(this.status==="unavailable"){if(!Te)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(ue))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ye(){return Ce||(Ce=new ne),Ce}class rt{constructor(I,ie){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=t.a4(),this.uses=0,this.tileSize=ie,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(I){let ie=I+this.timeAdded;ie<this.fadeEndTime||(this.fadeEndTime=ie)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(I){this.demTexture&&I.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(I,ie,Te){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",I){I.featureIndex&&(this.latestFeatureIndex=I.featureIndex,I.rawTileData?(this.latestRawTileData=I.rawTileData,this.latestFeatureIndex.rawTileData=I.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=I.collisionBoxArray,this.buckets=function(Me,ze){let ht={};if(!ze)return ht;for(let wt of Me){let Ot=wt.layerIds.map($t=>ze.getLayer($t)).filter(Boolean);if(Ot.length!==0){wt.layers=Ot,wt.stateDependentLayerIds&&(wt.stateDependentLayers=wt.stateDependentLayerIds.map($t=>Ot.filter(Tr=>Tr.id===$t)[0]));for(let $t of Ot)ht[$t.id]=wt}}return ht}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6){if(this.hasSymbolBuckets=!0,!Te)break;ze.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6&&ze.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let Me in this.buckets){let ze=this.buckets[Me];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Me).queryRadius(ze))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(I){return this.buckets[I.id]}upload(I){for(let Te in this.buckets){let Me=this.buckets[Te];Me.uploadPending()&&Me.upload(I)}let ie=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(I,this.imageAtlas.image,ie.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(I,this.glyphAtlasImage,ie.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Me,cameraQueryGeometry:ze,scale:ht,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Ot,params:wt,queryPadding:this.queryPadding*$t},I,ie,Te):{}}querySourceFeatures(I,ie){let Te=this.latestFeatureIndex;if(!Te||!Te.rawTileData)return;let Me=Te.loadVTLayers(),ze=ie&&ie.sourceLayer?ie.sourceLayer:"",ht=Me._geojsonTileLayer||Me[ze];if(!ht)return;let wt=t.a7(ie&&ie.filter),{z:Ot,x:$t,y:Tr}=this.tileID.canonical,Ar={z:Ot,x:$t,y:Tr};for(let Kr=0;Kr<ht.length;Kr++){let na=ht.feature(Kr);if(wt.needGeometry){let ot=t.a8(na,!0);if(!wt.filter(new t.z(this.tileID.overscaledZ),ot,this.tileID.canonical))continue}else if(!wt.filter(new t.z(this.tileID.overscaledZ),na))continue;let Ve=Te.getId(na,ze),$e=new t.a9(na,Ot,$t,Tr,Ve);$e.tile=Ar,I.push($e)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(I){let ie=this.expirationTime;if(I.cacheControl){let Te=t.aa(I.cacheControl);Te["max-age"]&&(this.expirationTime=Date.now()+1e3*Te["max-age"])}else I.expires&&(this.expirationTime=new Date(I.expires).getTime());if(this.expirationTime){let Te=Date.now(),Me=!1;if(this.expirationTime>Te)Me=!1;else if(ie)if(this.expirationTime<ie)Me=!0;else{let ze=this.expirationTime-ie;ze?this.expirationTime=Te+Math.max(ze,3e4):Me=!0}else Me=!0;Me?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(I,ie){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(I).length===0)return;let Te=this.latestFeatureIndex.loadVTLayers();for(let Me in this.buckets){if(!ie.style.hasLayer(Me))continue;let ze=this.buckets[Me],ht=ze.layers[0].sourceLayer||"_geojsonTileLayer",wt=Te[ht],Ot=I[ht];if(!wt||!Ot||Object.keys(Ot).length===0)continue;ze.update(Ot,wt,this.imageAtlas&&this.imageAtlas.patternPositions||{});let $t=ie&&ie.style&&ie.style.getLayer(Me);$t&&(this.queryPadding=Math.max(this.queryPadding,$t.queryRadius(ze)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<n.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(I){this.symbolFadeHoldUntil=n.now()+I}setDependencies(I,ie){let Te={};for(let Me of ie)Te[Me]=!0;this.dependencies[I]=Te}hasDependency(I,ie){for(let Te of I){let Me=this.dependencies[Te];if(Me){for(let ze of ie)if(Me[ze])return!0}}return!1}}class Ke{constructor(I,ie){this.max=I,this.onRemove=ie,this.reset()}reset(){for(let I in this.data)for(let ie of this.data[I])ie.timeout&&clearTimeout(ie.timeout),this.onRemove(ie.value);return this.data={},this.order=[],this}add(I,ie,Te){let Me=I.wrapped().key;this.data[Me]===void 0&&(this.data[Me]=[]);let ze={value:ie,timeout:void 0};if(Te!==void 0&&(ze.timeout=setTimeout(()=>{this.remove(I,ze)},Te)),this.data[Me].push(ze),this.order.push(Me),this.order.length>this.max){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ie=this.data[I].shift();return ie.timeout&&clearTimeout(ie.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ie.value}getByKey(I){let ie=this.data[I];return ie?ie[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ie){if(!this.has(I))return this;let Te=I.wrapped().key,Me=ie===void 0?0:this.data[Te].indexOf(ie),ze=this.data[Te][Me];return this.data[Te].splice(Me,1),ze.timeout&&clearTimeout(ze.timeout),this.data[Te].length===0&&delete this.data[Te],this.onRemove(ze.value),this.order.splice(this.order.indexOf(Te),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ie=this._getAndRemoveByKey(this.order[0]);ie&&this.onRemove(ie)}return this}filter(I){let ie=[];for(let Te in this.data)for(let Me of this.data[Te])I(Me.value)||ie.push(Me);for(let Te of ie)this.remove(Te.value.tileID,Te)}}class Mt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,Te){let Me=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Me]=this.stateChanges[I][Me]||{},t.e(this.stateChanges[I][Me],Te),this.deletedStates[I]===null){this.deletedStates[I]={};for(let ze in this.state[I])ze!==Me&&(this.deletedStates[I][ze]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Me]===null){this.deletedStates[I][Me]={};for(let ze in this.state[I][Me])Te[ze]||(this.deletedStates[I][Me][ze]=null)}else for(let ze in Te)this.deletedStates[I]&&this.deletedStates[I][Me]&&this.deletedStates[I][Me][ze]===null&&delete this.deletedStates[I][Me][ze]}removeFeatureState(I,ie,Te){if(this.deletedStates[I]===null)return;let Me=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},Te&&ie!==void 0)this.deletedStates[I][Me]!==null&&(this.deletedStates[I][Me]=this.deletedStates[I][Me]||{},this.deletedStates[I][Me][Te]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Me])for(Te in this.deletedStates[I][Me]={},this.stateChanges[I][Me])this.deletedStates[I][Me][Te]=null;else this.deletedStates[I][Me]=null;else this.deletedStates[I]=null}getState(I,ie){let Te=String(ie),Me=t.e({},(this.state[I]||{})[Te],(this.stateChanges[I]||{})[Te]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let ze=this.deletedStates[I][ie];if(ze===null)return{};for(let ht in ze)delete Me[ht]}return Me}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let Te={};for(let Me in this.stateChanges){this.state[Me]=this.state[Me]||{};let ze={};for(let ht in this.stateChanges[Me])this.state[Me][ht]||(this.state[Me][ht]={}),t.e(this.state[Me][ht],this.stateChanges[Me][ht]),ze[ht]=this.state[Me][ht];Te[Me]=ze}for(let Me in this.deletedStates){this.state[Me]=this.state[Me]||{};let ze={};if(this.deletedStates[Me]===null)for(let ht in this.state[Me])ze[ht]={},this.state[Me][ht]={};else for(let ht in this.deletedStates[Me]){if(this.deletedStates[Me][ht]===null)this.state[Me][ht]={};else for(let wt of Object.keys(this.deletedStates[Me][ht]))delete this.state[Me][ht][wt];ze[ht]=this.state[Me][ht]}Te[Me]=Te[Me]||{},t.e(Te[Me],ze)}if(this.stateChanges={},this.deletedStates={},Object.keys(Te).length!==0)for(let Me in I)I[Me].setFeatureState(Te,ie)}}class kt extends t.E{constructor(I,ie,Te){super(),this.id=I,this.dispatcher=Te,this.on("data",Me=>this._dataHandler(Me)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Me,ze,ht,wt)=>{let Ot=new(he(ze.type))(Me,ze,ht,wt);if(Ot.id!==Me)throw new Error(`Expected Source id to be ${Me} instead of ${Ot.id}`);return Ot})(I,ie,Te,this),this._tiles={},this._cache=new Ke(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Mt,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}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 I in this._tiles){let ie=this._tiles[I];if(ie.state!=="loaded"&&ie.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ie,Te){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,Te)}catch(Me){I.state="errored",Me.status!==404?this._source.fire(new t.j(Me,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new t.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ie in this._tiles){let Te=this._tiles[ie];Te.upload(I),Te.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(Nt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let Te in this._tiles)this._isIdRenderable(Te,I)&&ie.push(this._tiles[Te]);return I?ie.sort((Te,Me)=>{let ze=Te.tileID,ht=Me.tileID,wt=new t.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle),Ot=new t.P(ht.canonical.x,ht.canonical.y)._rotate(this.transform.angle);return ze.overscaledZ-ht.overscaledZ||Ot.y-wt.y||Ot.x-wt.x}).map(Te=>Te.tileID.key):ie.map(Te=>Te.tileID).sort(Nt).map(Te=>Te.key)}hasRenderableParent(I){let ie=this.findLoadedParent(I,0);return!!ie&&this._isIdRenderable(ie.tileID.key)}_isIdRenderable(I,ie){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ie||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ie){return t._(this,void 0,void 0,function*(){let Te=this._tiles[I];Te&&(Te.state!=="loading"&&(Te.state=ie),yield this._loadTile(Te,I,ie))})}_tileLoaded(I,ie,Te){I.timeAdded=n.now(),Te==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ie,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ie=this.getRenderableIds();for(let Me=0;Me<ie.length;Me++){let ze=ie[Me];if(I.neighboringTiles&&I.neighboringTiles[ze]){let ht=this.getTileByID(ze);Te(I,ht),Te(ht,I)}}function Te(Me,ze){Me.needsHillshadePrepare=!0,Me.needsTerrainPrepare=!0;let ht=ze.tileID.canonical.x-Me.tileID.canonical.x,wt=ze.tileID.canonical.y-Me.tileID.canonical.y,Ot=Math.pow(2,Me.tileID.canonical.z),$t=ze.tileID.key;ht===0&&wt===0||Math.abs(wt)>1||(Math.abs(ht)>1&&(Math.abs(ht+Ot)===1?ht+=Ot:Math.abs(ht-Ot)===1&&(ht-=Ot)),ze.dem&&Me.dem&&(Me.dem.backfillBorder(ze.dem,ht,wt),Me.neighboringTiles&&Me.neighboringTiles[$t]&&(Me.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,Te,Me){for(let ze in this._tiles){let ht=this._tiles[ze];if(Me[ze]||!ht.hasData()||ht.tileID.overscaledZ<=ie||ht.tileID.overscaledZ>Te)continue;let wt=ht.tileID;for(;ht&&ht.tileID.overscaledZ>ie+1;){let $t=ht.tileID.scaledTo(ht.tileID.overscaledZ-1);ht=this._tiles[$t.key],ht&&ht.hasData()&&(wt=$t)}let Ot=wt;for(;Ot.overscaledZ>ie;)if(Ot=Ot.scaledTo(Ot.overscaledZ-1),I[Ot.key]){Me[wt.key]=wt;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let Te=this._loadedParentTiles[I.key];return Te&&Te.tileID.overscaledZ>=ie?Te:null}for(let Te=I.overscaledZ-1;Te>=ie;Te--){let Me=I.scaledTo(Te),ze=this._getLoadedTile(Me);if(ze)return ze}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ie=this._tiles[I.key];return ie&&ie.hasData()?ie:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ie=Math.ceil(I.width/this._source.tileSize)+1,Te=Math.ceil(I.height/this._source.tileSize)+1,Me=Math.floor(ie*Te*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Me):Me;this._cache.setMaxSize(ze)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let Te={};for(let Me in this._tiles){let ze=this._tiles[Me];ze.tileID=ze.tileID.unwrapTo(ze.tileID.wrap+ie),Te[ze.tileID.key]=ze}this._tiles=Te;for(let Me in this._timers)clearTimeout(this._timers[Me]),delete this._timers[Me];for(let Me in this._tiles)this._setTileReloadTimer(Me,this._tiles[Me])}}_updateCoveredAndRetainedTiles(I,ie,Te,Me,ze,ht){let wt={},Ot={},$t=Object.keys(I),Tr=n.now();for(let Ar of $t){let Kr=I[Ar],na=this._tiles[Ar];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let Ve=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),ot=Ve||$e||null;ot&&(this._addTile(ot.tileID),wt[ot.tileID.key]=ot.tileID),Ot[Ar]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Ar in wt)I[Ar]||(this._coveredTiles[Ar]=!0,I[Ar]=wt[Ar]);if(ht){let Ar={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Ar[na.key]=na:Kr[na.key]=na;for(let na in Kr){let Ve=Kr[na].children(this._source.maxzoom);this._tiles[Ve[0].key]&&this._tiles[Ve[1].key]&&this._tiles[Ve[2].key]&&this._tiles[Ve[3].key]&&(Ar[Ve[0].key]=I[Ve[0].key]=Ve[0],Ar[Ve[1].key]=I[Ve[1].key]=Ve[1],Ar[Ve[2].key]=I[Ve[2].key]=Ve[2],Ar[Ve[3].key]=I[Ve[3].key]=Ve[3],delete Kr[na])}for(let na in Kr){let Ve=Kr[na],$e=this.findLoadedParent(Ve,this._source.minzoom),ot=this.findLoadedSibling(Ve),pt=$e||ot||null;if(pt){Ar[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Ar)Ar[Et].isChildOf(pt.tileID)&&delete Ar[Et]}}for(let na in this._tiles)Ar[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let Te;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Te=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(Te=I.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ie}),this._source.hasTile&&(Te=Te.filter(Tr=>this._source.hasTile(Tr)))):Te=[];let Me=I.coveringZoomLevel(this._source),ze=Math.max(Me-kt.maxOverzooming,this._source.minzoom),ht=Math.max(Me+kt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Ar of Te)if(Ar.canonical.z>this._source.minzoom){let Kr=Ar.scaledTo(Ar.canonical.z-1);Tr[Kr.key]=Kr;let na=Ar.scaledTo(Math.max(this._source.minzoom,Math.min(Ar.canonical.z,5)));Tr[na.key]=na}Te=Te.concat(Object.values(Tr))}let wt=Te.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,wt&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ot=this._updateRetainedTiles(Te,Me);Gt(this._source.type)&&this._updateCoveredAndRetainedTiles(Ot,ze,ht,Me,Te,ie);for(let Tr in Ot)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Ot);for(let Tr of $t){let Ar=this._tiles[Tr];Ar.hasSymbolBuckets&&!Ar.holdingForFade()?Ar.setHoldDuration(this.map._fadeDuration):Ar.hasSymbolBuckets&&!Ar.symbolFadeFinished()||this._removeTile(Tr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ie){var Te;let Me={},ze={},ht=Math.max(ie-kt.maxOverzooming,this._source.minzoom),wt=Math.max(ie+kt.maxUnderzooming,this._source.minzoom),Ot={};for(let $t of I){let Tr=this._addTile($t);Me[$t.key]=$t,Tr.hasData()||ie<this._source.maxzoom&&(Ot[$t.key]=$t)}this._retainLoadedChildren(Ot,ie,wt,Me);for(let $t of I){let Tr=this._tiles[$t.key];if(Tr.hasData())continue;if(ie+1>this._source.maxzoom){let Kr=$t.children(this._source.maxzoom)[0],na=this.getTile(Kr);if(na&&na.hasData()){Me[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Me[Kr[0].key]&&Me[Kr[1].key]&&Me[Kr[2].key]&&Me[Kr[3].key])continue}let Ar=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=ht;--Kr){let na=$t.scaledTo(Kr);if(ze[na.key])break;if(ze[na.key]=!0,Tr=this.getTile(na),!Tr&&Ar&&(Tr=this._addTile(na)),Tr){let Ve=Tr.hasData();if((Ve||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Ar)&&(Me[na.key]=na),Ar=Tr.wasRequested(),Ve)break}}}return Me}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],Te,Me=this._tiles[I].tileID;for(;Me.overscaledZ>0;){if(Me.key in this._loadedParentTiles){Te=this._loadedParentTiles[Me.key];break}ie.push(Me.key);let ze=Me.scaledTo(Me.overscaledZ-1);if(Te=this._getLoadedTile(ze),Te)break;Me=ze}for(let ze of ie)this._loadedParentTiles[ze]=Te}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,Te=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=Te}}_addTile(I){let ie=this._tiles[I.key];if(ie)return ie;ie=this._cache.getAndRemove(I),ie&&(this._setTileReloadTimer(I.key,ie),ie.tileID=I,this._state.initializeTileState(ie,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ie)));let Te=ie;return ie||(ie=new rt(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,Te||this._source.fire(new t.k("dataloading",{tile:ie,coord:ie.tileID,dataType:"source"})),ie}_setTileReloadTimer(I,ie){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Te=ie.getExpiryTimeout();Te&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Te))}_removeTile(I){let ie=this._tiles[I];ie&&(ie.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ie.uses>0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))}_dataHandler(I){let ie=I.sourceDataType;I.dataType==="source"&&ie==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ie==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ie,Te){let Me=[],ze=this.transform;if(!ze)return Me;let ht=Te?ze.getCameraQueryGeometry(I):I,wt=I.map(Ve=>ze.pointCoordinate(Ve,this.terrain)),Ot=ht.map(Ve=>ze.pointCoordinate(Ve,this.terrain)),$t=this.getIds(),Tr=1/0,Ar=1/0,Kr=-1/0,na=-1/0;for(let Ve of Ot)Tr=Math.min(Tr,Ve.x),Ar=Math.min(Ar,Ve.y),Kr=Math.max(Kr,Ve.x),na=Math.max(na,Ve.y);for(let Ve=0;Ve<$t.length;Ve++){let $e=this._tiles[$t[Ve]];if($e.holdingForFade())continue;let ot=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[ot.getTilePoint(new t.Z(Tr,Ar)),ot.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et<t.X&&bt[0].y-Et<t.X&&bt[1].x+Et>=0&&bt[1].y+Et>=0){let Rt=wt.map(yr=>ot.getTilePoint(yr)),lr=Ot.map(yr=>ot.getTilePoint(yr));Me.push({tile:$e,tileID:ot,queryGeometry:Rt,cameraQueryGeometry:lr,scale:pt})}}return Me}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(Te=>this._tiles[Te].tileID);for(let Te of ie)Te.posMatrix=this.transform.calculatePosMatrix(Te.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Gt(this._source.type)){let I=n.now();for(let ie in this._tiles)if(this._tiles[ie].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ie,Te){this._state.updateState(I=I||"_geojsonTileLayer",ie,Te)}removeFeatureState(I,ie,Te){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,Te)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,Te){let Me=this._tiles[I];Me&&Me.setDependencies(ie,Te)}reloadTilesForDependencies(I,ie){for(let Te in this._tiles)this._tiles[Te].hasDependency(I,ie)&&this._reloadTile(Te,"reloading");this._cache.filter(Te=>!Te.hasDependency(I,ie))}}function Nt(Fe,I){let ie=Math.abs(2*Fe.wrap)-+(Fe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Fe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Fe.canonical.y||I.canonical.x-Fe.canonical.x}function Gt(Fe){return Fe==="raster"||Fe==="image"||Fe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Mr{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let Te=1;Te<this.points.length;Te++)this._distances[Te]=this._distances[Te-1]+this.points[Te].dist(this.points[Te-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(ie||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(I){if(this.points.length===1)return this.points[0];I=t.ac(I,0,1);let ie=1,Te=this._distances[ie],Me=I*this.paddedLength+this.padding;for(;Te<Me&&ie<this._distances.length;)Te=this._distances[++ie];let ze=ie-1,ht=this._distances[ze],wt=Te-ht,Ot=wt>0?(Me-ht)/wt:0;return this.points[ze].mult(1-Ot).add(this.points[ie].mult(Ot))}}function mr(Fe,I){let ie=!0;return Fe==="always"||Fe!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,Te){let Me=this.boxCells=[],ze=this.circleCells=[];this.xCellCount=Math.ceil(I/Te),this.yCellCount=Math.ceil(ie/Te);for(let ht=0;ht<this.xCellCount*this.yCellCount;ht++)Me.push([]),ze.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=I,this.height=ie,this.xScale=this.xCellCount/I,this.yScale=this.yCellCount/ie,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(I,ie,Te,Me,ze){this._forEachCell(ie,Te,Me,ze,this._insertBoxCell,this.boxUid++),this.boxKeys.push(I),this.bboxes.push(ie),this.bboxes.push(Te),this.bboxes.push(Me),this.bboxes.push(ze)}insertCircle(I,ie,Te,Me){this._forEachCell(ie-Me,Te-Me,ie+Me,Te+Me,this._insertCircleCell,this.circleUid++),this.circleKeys.push(I),this.circles.push(ie),this.circles.push(Te),this.circles.push(Me)}_insertBoxCell(I,ie,Te,Me,ze,ht){this.boxCells[ze].push(ht)}_insertCircleCell(I,ie,Te,Me,ze,ht){this.circleCells[ze].push(ht)}_query(I,ie,Te,Me,ze,ht,wt){if(Te<0||I>this.width||Me<0||ie>this.height)return[];let Ot=[];if(I<=0&&ie<=0&&this.width<=Te&&this.height<=Me){if(ze)return[{key:null,x1:I,y1:ie,x2:Te,y2:Me}];for(let $t=0;$t<this.boxKeys.length;$t++)Ot.push({key:this.boxKeys[$t],x1:this.bboxes[4*$t],y1:this.bboxes[4*$t+1],x2:this.bboxes[4*$t+2],y2:this.bboxes[4*$t+3]});for(let $t=0;$t<this.circleKeys.length;$t++){let Tr=this.circles[3*$t],Ar=this.circles[3*$t+1],Kr=this.circles[3*$t+2];Ot.push({key:this.circleKeys[$t],x1:Tr-Kr,y1:Ar-Kr,x2:Tr+Kr,y2:Ar+Kr})}}else this._forEachCell(I,ie,Te,Me,this._queryCell,Ot,{hitTest:ze,overlapMode:ht,seenUids:{box:{},circle:{}}},wt);return Ot}query(I,ie,Te,Me){return this._query(I,ie,Te,Me,!1,null)}hitTest(I,ie,Te,Me,ze,ht){return this._query(I,ie,Te,Me,!0,ze,ht).length>0}hitTestCircle(I,ie,Te,Me,ze){let ht=I-Te,wt=I+Te,Ot=ie-Te,$t=ie+Te;if(wt<0||ht>this.width||$t<0||Ot>this.height)return!1;let Tr=[];return this._forEachCell(ht,Ot,wt,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Me,circle:{x:I,y:ie,radius:Te},seenUids:{box:{},circle:{}}},ze),Tr.length>0}_queryCell(I,ie,Te,Me,ze,ht,wt,Ot){let{seenUids:$t,hitTest:Tr,overlapMode:Ar}=wt,Kr=this.boxCells[ze];if(Kr!==null){let Ve=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let ot=4*$e,pt=this.boxKeys[$e];if(I<=Ve[ot+2]&&ie<=Ve[ot+3]&&Te>=Ve[ot+0]&&Me>=Ve[ot+1]&&(!Ot||Ot(pt))&&(!Tr||!mr(Ar,pt.overlapMode))&&(ht.push({key:pt,x1:Ve[ot],y1:Ve[ot+1],x2:Ve[ot+2],y2:Ve[ot+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let Ve=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let ot=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(Ve[ot],Ve[ot+1],Ve[ot+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!mr(Ar,pt.overlapMode))){let Et=Ve[ot],bt=Ve[ot+1],Rt=Ve[ot+2];if(ht.push({key:pt,x1:Et-Rt,y1:bt-Rt,x2:Et+Rt,y2:bt+Rt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Ar}=wt,Kr=this.boxCells[ze];if(Kr!==null){let Ve=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let ot=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,Ve[ot+0],Ve[ot+1],Ve[ot+2],Ve[ot+3])&&(!Ot||Ot(pt))&&!mr(Ar,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let Ve=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let ot=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(Ve[ot],Ve[ot+1],Ve[ot+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!mr(Ar,pt.overlapMode))return ht.push(!0),!0}}}_forEachCell(I,ie,Te,Me,ze,ht,wt,Ot){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Ar=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Ar;na++)for(let Ve=Tr;Ve<=Kr;Ve++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*Ve+na,ht,wt,Ot))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ie,Te,Me,ze,ht){let wt=Me-I,Ot=ze-ie,$t=Te+ht;return $t*$t>wt*wt+Ot*Ot}_circleAndRectCollide(I,ie,Te,Me,ze,ht,wt){let Ot=(ht-Me)/2,$t=Math.abs(I-(Me+Ot));if($t>Ot+Te)return!1;let Tr=(wt-ze)/2,Ar=Math.abs(ie-(ze+Tr));if(Ar>Tr+Te)return!1;if($t<=Ot||Ar<=Tr)return!0;let Kr=$t-Ot,na=Ar-Tr;return Kr*Kr+na*na<=Te*Te}}function Er(Fe,I,ie,Te,Me){let ze=t.H();return I?(t.K(ze,ze,[1/Me,1/Me,1]),ie||t.ad(ze,ze,Te.angle)):t.L(ze,Te.labelPlaneMatrix,Fe),ze}function Ir(Fe,I,ie,Te,Me){if(I){let ze=t.ae(Fe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Fe,I,ie,Te){let Me;Te?(Me=[Fe,I,Te(Fe,I),1],t.af(Me,Me,ie)):(Me=[Fe,I,0,1],sr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Oe(Fe,I){return .5+Fe/I*.5}function Je(Fe,I){return Fe.x>=-I[0]&&Fe.x<=I[0]&&Fe.y>=-I[1]&&Fe.y<=I[1]}function Ae(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve){let $e=Te?Fe.textSizeData:Fe.iconSizeData,ot=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Fe.text.dynamicLayoutVertexArray:Fe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Fe.lineVertexArray,Rt=Te?Fe.text.placedSymbolArray:Fe.icon.placedSymbolArray,lr=ie.transform.width/ie.transform.height,yr=!1;for(let kr=0;kr<Rt.length;kr++){let jr=Rt.get(kr);if(jr.hidden||jr.writingMode===t.ah.vertical&&!yr){ur(jr.numGlyphs,Et);continue}yr=!1;let Qr=_t(jr.anchorX,jr.anchorY,I,Ve);if(!Je(Qr.point,pt)){ur(jr.numGlyphs,Et);continue}let ha=Oe(ie.transform.cameraToCenterDistance,Qr.signedDistanceFromCamera),Aa=t.ai($e,ot,jr),Da=ht?Aa/ha:Aa*ha,ci={getElevation:Ve,labelPlaneMatrix:Me,lineVertexArray:bt,pitchWithMap:ht,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:$t,tileAnchorPoint:new t.P(jr.anchorX,jr.anchorY),unwrappedTileID:Tr,width:Ar,height:Kr,translation:na},Vi=Ze(ci,jr,Da,!1,wt,I,ze,Fe.glyphOffsetArray,Et,lr,Ot);yr=Vi.useVertical,(Vi.notEnoughRoom||yr||Vi.needsFlipping&&Ze(ci,jr,Da,!0,wt,I,ze,Fe.glyphOffsetArray,Et,lr,Ot).notEnoughRoom)&&ur(jr.numGlyphs,Et)}Te?Fe.text.dynamicLayoutVertexBuffer.updateData(Et):Fe.icon.dynamicLayoutVertexBuffer.updateData(Et)}function Le(Fe,I,ie,Te,Me,ze,ht,wt){let Ot=ze.glyphStartIndex+ze.numGlyphs,$t=ze.lineStartIndex,Tr=ze.lineStartIndex+ze.lineLength,Ar=I.getoffsetX(ze.glyphStartIndex),Kr=I.getoffsetX(Ot-1),na=jt(Fe*Ar,ie,Te,Me,ze.segment,$t,Tr,wt,ht);if(!na)return null;let Ve=jt(Fe*Kr,ie,Te,Me,ze.segment,$t,Tr,wt,ht);return Ve?wt.projectionCache.anyProjectionOccluded?null:{first:na,last:Ve}:null}function Ue(Fe,I,ie,Te){return Fe===t.ah.horizontal&&Math.abs(ie.y-I.y)>Math.abs(ie.x-I.x)*Te?{useVertical:!0}:(Fe===t.ah.vertical?I.y<ie.y:I.x>ie.x)?{needsFlipping:!0}:null}function Ze(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Ar=ie/24,Kr=I.lineOffsetX*Ar,na=I.lineOffsetY*Ar,Ve;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,ot=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Ar,wt,Kr,na,Te,I,Tr,Fe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Fe.getElevation).point,Rt=_t(Et.last.point.x,Et.last.point.y,ht,Fe.getElevation).point;if(Me&&!Te){let lr=Ue(I.writingMode,bt,Rt,$t);if(lr)return lr}Ve=[Et.first];for(let lr=I.glyphStartIndex+1;lr<$e-1;lr++)Ve.push(jt(Ar*wt.getoffsetX(lr),Kr,na,Te,I.segment,ot,pt,Fe,Tr));Ve.push(Et.last)}else{if(Me&&!Te){let ot=_t(Fe.tileAnchorPoint.x,Fe.tileAnchorPoint.y,ze,Fe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Fe.lineVertexArray.getx(pt),Fe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Fe.getElevation),Rt=bt.signedDistanceFromCamera>0?bt.point:function(yr,kr,jr,Qr,ha,Aa){return st(yr,kr,jr,1,ha,Aa)}(Fe.tileAnchorPoint,Et,ot,0,ze,Fe),lr=Ue(I.writingMode,ot,Rt,$t);if(lr)return lr}let $e=jt(Ar*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Fe,Tr);if(!$e||Fe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Ve=[$e]}for(let $e of Ve)t.aj(Ot,$e.point,$e.angle);return{}}function st(Fe,I,ie,Te,Me,ze){let ht=Fe.add(Fe.sub(I)._unit()),wt=Me!==void 0?_t(ht.x,ht.y,Me,ze.getElevation).point:Ut(ht.x,ht.y,ze).point,Ot=ie.sub(wt);return ie.add(Ot._mult(Te/Ot.mag()))}function ut(Fe,I,ie){let Te=I.projectionCache;if(Te.projections[Fe])return Te.projections[Fe];let Me=new t.P(I.lineVertexArray.getx(Fe),I.lineVertexArray.gety(Fe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Fe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Fe-ie.direction;return function(wt,Ot,$t,Tr,Ar){return st(wt,Ot,$t,Tr,void 0,Ar)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(ht),I.lineVertexArray.gety(ht)),Me,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function Ut(Fe,I,ie){let Te=Fe+ie.translation[0],Me=I+ie.translation[1],ze;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(ze=ie.projection.projectTileCoordinates(Te,Me,ie.unwrappedTileID,ie.getElevation),ze.point.x=(.5*ze.point.x+.5)*ie.width,ze.point.y=(.5*-ze.point.y+.5)*ie.height):(ze=_t(Te,Me,ie.labelPlaneMatrix,ie.getElevation),ze.isOccluded=!1),ze}function Ct(Fe,I,ie){return Fe._unit()._perp()._mult(I*ie)}function Pt(Fe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Fe])return wt.projectionCache.offsets[Fe];let $t=ie.add(I);if(Fe+Ot.direction<Te||Fe+Ot.direction>=Me)return wt.projectionCache.offsets[Fe]=$t,$t;let Tr=ut(Fe+Ot.direction,wt,Ot),Ar=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Ar),na=Tr.add(Ar);return wt.projectionCache.offsets[Fe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Fe]}function jt(Fe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Fe-I:Fe+I,Tr=$t>0?1:-1,Ar=0;Te&&(Tr*=-1,Ar=Math.PI),Tr<0&&(Ar+=Math.PI);let Kr,na=Tr>0?ze+Me:ze+Me+1;wt.projectionCache.cachedAnchorPoint?Kr=wt.projectionCache.cachedAnchorPoint:(Kr=Ut(wt.tileAnchorPoint.x,wt.tileAnchorPoint.y,wt).point,wt.projectionCache.cachedAnchorPoint=Kr);let Ve,$e,ot=Kr,pt=Kr,Et=0,bt=0,Rt=Math.abs($t),lr=[],yr;for(;Et+bt<=Rt;){if(na+=Tr,na<ze||na>=ht)return null;Et+=bt,pt=ot,$e=Ve;let Qr={absOffsetX:Rt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(ot=ut(na,wt,Qr),ie===0)lr.push(pt),yr=ot.sub(pt);else{let ha,Aa=ot.sub(pt);ha=Aa.mag()===0?Ct(ut(na+Tr,wt,Qr).sub(ot),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),Ve=Pt(na,ha,ot,ze,ht,$e,ie,wt,Qr),lr.push($e),yr=Ve.sub($e)}bt=yr.mag()}let kr=yr._mult((Rt-Et)/bt)._add($e||pt),jr=Ar+Math.atan2(ot.y-pt.y,ot.x-pt.x);return lr.push(kr),{point:kr,angle:Ot?jr:0,path:lr}}let fr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ur(Fe,I){for(let ie=0;ie<Fe;ie++){let Te=I.length;I.resize(Te+4),I.float32.set(fr,3*Te)}}function sr(Fe,I,ie){let Te=I[0],Me=I[1];return Fe[0]=ie[0]*Te+ie[4]*Me+ie[12],Fe[1]=ie[1]*Te+ie[5]*Me+ie[13],Fe[3]=ie[3]*Te+ie[7]*Me+ie[15],Fe}let Pr=100;class Ta{constructor(I,ie,Te=new qr(I.width+200,I.height+200,25),Me=new qr(I.width+200,I.height+200,25)){this.transform=I,this.mapProjection=ie,this.grid=Te,this.ignoredGrid=Me,this.pitchFactor=Math.cos(I._pitch)*I.cameraToCenterDistance,this.screenRightBoundary=I.width+Pr,this.screenBottomBoundary=I.height+Pr,this.gridRightBoundary=I.width+200,this.gridBottomBoundary=I.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar){let Kr=I.anchorPointX+Ot[0],na=I.anchorPointY+Ot[1],Ve=this.projectAndGetPerspectiveRatio(Me,Kr,na,ze,Tr),$e=Te*Ve.perspectiveRatio,ot;if(ht||wt)ot=this._projectCollisionBox(I,$e,Me,ze,ht,wt,Ot,Ve,Tr,Ar);else{let lr=Ve.point.x+(Ar?Ar.x*$e:0),yr=Ve.point.y+(Ar?Ar.y*$e:0);ot={allPointsOccluded:!1,box:[lr+I.x1*$e,yr+I.y1*$e,lr+I.x2*$e,yr+I.y2*$e]}}let[pt,Et,bt,Rt]=ot.box;return this.mapProjection.useSpecialProjectionForSymbols&&(ht?ot.allPointsOccluded:this.mapProjection.isOccluded(Kr,na,ze))||Ve.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(pt,Et,bt,Rt)||ie!=="always"&&this.grid.hitTest(pt,Et,bt,Rt,ie,$t)?{box:[pt,Et,bt,Rt],placeable:!1,offscreen:!1}:{box:[pt,Et,bt,Rt],placeable:!0,offscreen:this.isOffscreen(pt,Et,bt,Rt)}}placeCollisionCircles(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve,$e,ot){let pt=[],Et=new t.P(ie.anchorX,ie.anchorY),bt=this.getPerspectiveRatio(ht,Et.x,Et.y,wt,ot),Rt=(Ar?ze/bt:ze*bt)/t.ap,lr={getElevation:ot,labelPlaneMatrix:Ot,lineVertexArray:Te,pitchWithMap:Ar,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Et,unwrappedTileID:wt,width:this.transform.width,height:this.transform.height,translation:$e},yr=Le(Rt,Me,ie.lineOffsetX*Rt,ie.lineOffsetY*Rt,!1,ie,!1,lr),kr=!1,jr=!1,Qr=!0;if(yr){let ha=.5*na*bt+Ve,Aa=new t.P(-100,-100),Da=new t.P(this.screenRightBoundary,this.screenBottomBoundary),ci=new Mr,Vi=yr.first,ji=yr.last,on=[];for(let Nn=Vi.path.length-1;Nn>=1;Nn--)on.push(Vi.path[Nn]);for(let Nn=1;Nn<ji.path.length;Nn++)on.push(ji.path[Nn]);let An=2.5*ha;if($t){let Nn=this.projectPathToScreenSpace(on,lr,$t);on=Nn.some(wo=>wo.signedDistanceFromCamera<=0)?[]:Nn.map(wo=>wo.point)}let Yn=[];if(on.length>0){let Nn=on[0].clone(),wo=on[0].clone();for(let os=1;os<on.length;os++)Nn.x=Math.min(Nn.x,on[os].x),Nn.y=Math.min(Nn.y,on[os].y),wo.x=Math.max(wo.x,on[os].x),wo.y=Math.max(wo.y,on[os].y);Yn=Nn.x>=Aa.x&&wo.x<=Da.x&&Nn.y>=Aa.y&&wo.y<=Da.y?[on]:wo.x<Aa.x||Nn.x>Da.x||wo.y<Aa.y||Nn.y>Da.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Nn of Yn){ci.reset(Nn,.25*ha);let wo=0;wo=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/An)+1;for(let os=0;os<wo;os++){let So=os/Math.max(wo-1,1),Zo=ci.lerp(So),hs=Zo.x+Pr,ul=Zo.y+Pr;pt.push(hs,ul,ha,0);let tl=hs-ha,Jo=ul-ha,$o=hs+ha,Il=ul+ha;if(Qr=Qr&&this.isOffscreen(tl,Jo,$o,Il),jr=jr||this.isInsideGrid(tl,Jo,$o,Il),I!=="always"&&this.grid.hitTestCircle(hs,ul,ha,I,Kr)&&(kr=!0,!Tr))return{circles:[],offscreen:!1,collisionDetected:kr}}}}return{circles:!Tr&&kr||!jr||bt<this.perspectiveRatioCutoff?[]:pt,offscreen:Qr,collisionDetected:kr}}projectPathToScreenSpace(I,ie,Te){return I.map(Me=>_t(Me.x,Me.y,Te,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],Te=1/0,Me=1/0,ze=-1/0,ht=-1/0;for(let Tr of I){let Ar=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Ar.x),Me=Math.min(Me,Ar.y),ze=Math.max(ze,Ar.x),ht=Math.max(ht,Ar.y),ie.push(Ar)}let wt=this.grid.query(Te,Me,ze,ht).concat(this.ignoredGrid.query(Te,Me,ze,ht)),Ot={},$t={};for(let Tr of wt){let Ar=Tr.key;if(Ot[Ar.bucketInstanceId]===void 0&&(Ot[Ar.bucketInstanceId]={}),Ot[Ar.bucketInstanceId][Ar.featureIndex])continue;let Kr=[new t.P(Tr.x1,Tr.y1),new t.P(Tr.x2,Tr.y1),new t.P(Tr.x2,Tr.y2),new t.P(Tr.x1,Tr.y2)];t.am(ie,Kr)&&(Ot[Ar.bucketInstanceId][Ar.featureIndex]=!0,$t[Ar.bucketInstanceId]===void 0&&($t[Ar.bucketInstanceId]=[]),$t[Ar.bucketInstanceId].push(Ar.featureIndex))}return $t}insertCollisionBox(I,ie,Te,Me,ze,ht){(Te?this.ignoredGrid:this.grid).insert({bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,Te,Me,ze,ht){let wt=Te?this.ignoredGrid:this.grid,Ot={bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie};for(let $t=0;$t<I.length;$t+=4)wt.insertCircle(Ot,I[$t],I[$t+1],I[$t+2])}projectAndGetPerspectiveRatio(I,ie,Te,Me,ze){let ht;ze?(ht=[ie,Te,ze(ie,Te),1],t.af(ht,ht,I)):(ht=[ie,Te,0,1],sr(ht,ht,I));let wt=ht[3];return{point:new t.P((ht[0]/wt+1)/2*this.transform.width+Pr,(-ht[1]/wt+1)/2*this.transform.height+Pr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/wt*.5,isOccluded:!1,signedDistanceFromCamera:wt}}getPerspectiveRatio(I,ie,Te,Me,ze){let ht=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(ie,Te,Me,ze):_t(ie,Te,I,ze);return .5+this.transform.cameraToCenterDistance/ht.signedDistanceFromCamera*.5}isOffscreen(I,ie,Te,Me){return Te<Pr||I>=this.screenRightBoundary||Me<Pr||ie>this.screenBottomBoundary}isInsideGrid(I,ie,Te,Me){return Te>=0&&I<this.gridRightBoundary&&Me>=0&&ie<this.gridBottomBoundary}getViewportMatrix(){let I=t.an([]);return t.J(I,I,[-100,-100,0]),I}_projectCollisionBox(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Ar=new t.P(1,0),Kr=new t.P(0,1),na=new t.P(I.anchorPointX+wt[0],I.anchorPointY+wt[1]);if(ht&&!ze){let Qr=this.projectAndGetPerspectiveRatio(Te,na.x+1,na.y,Me,$t).point.sub(Ot.point).unit(),ha=Math.atan(Qr.y/Qr.x)+(Qr.x<0?Math.PI:0),Aa=Math.sin(ha),Da=Math.cos(ha);Ar=new t.P(Da,Aa),Kr=new t.P(-Aa,Da)}else if(!ht&&ze){let Qr=-this.transform.angle,ha=Math.sin(Qr),Aa=Math.cos(Qr);Ar=new t.P(Aa,ha),Kr=new t.P(-ha,Aa)}let Ve=Ot.point,$e=ie;if(ze){Ve=na;let Qr=this.transform.zoom-Math.floor(this.transform.zoom);$e=Math.pow(2,-Qr),$e*=this.mapProjection.getPitchedTextCorrection(this.transform,na,Me),Tr||($e*=t.ac(.5+Ot.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Tr&&(Ve=Ve.add(Ar.mult(Tr.x*$e)).add(Kr.mult(Tr.y*$e)));let ot=I.x1*$e,pt=I.x2*$e,Et=(ot+pt)/2,bt=I.y1*$e,Rt=I.y2*$e,lr=(bt+Rt)/2,yr=[{offsetX:ot,offsetY:bt},{offsetX:Et,offsetY:bt},{offsetX:pt,offsetY:bt},{offsetX:pt,offsetY:lr},{offsetX:pt,offsetY:Rt},{offsetX:Et,offsetY:Rt},{offsetX:ot,offsetY:Rt},{offsetX:ot,offsetY:lr}],kr=[];for(let{offsetX:Qr,offsetY:ha}of yr)kr.push(new t.P(Ve.x+Ar.x*Qr+Kr.x*ha,Ve.y+Ar.y*Qr+Kr.y*ha));let jr=!1;if(ze){let Qr=kr.map(ha=>this.projectAndGetPerspectiveRatio(Te,ha.x,ha.y,Me,$t));jr=Qr.some(ha=>!ha.isOccluded),kr=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(kr),allPointsOccluded:!jr}}}function Oa(Fe,I,ie){return I*(t.X/(Fe.tileSize*Math.pow(2,ie-Fe.tileID.overscaledZ)))}class Ia{constructor(I,ie,Te,Me){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Me&&Te?1:0,this.placed=Te}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,Te,Me,ze){this.text=new Ia(I?I.text:null,ie,Te,ze),this.icon=new Ia(I?I.icon:null,ie,Me,ze)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,Te){this.text=I,this.icon=ie,this.skipFade=Te}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,Te,Me,ze){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=Te,this.bucketIndex=Me,this.tileID=ze}}class wi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ie=++this.maxGroupID;this.collisionGroups[I]={ID:ie,predicate:Te=>Te.collisionGroupID===ie}}return this.collisionGroups[I]}}function Kt(Fe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Fe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Dt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new Ta(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Me,this.retainedQueryData={},this.collisionGroups=new wi(ze),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ht,ht&&(ht.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(Te,Me)=>ie.getElevation(I,Te,Me):null}getBucketParts(I,ie,Te,Me){let ze=Te.getBucket(ie),ht=Te.latestFeatureIndex;if(!ze||!ht||ie.id!==ze.layerIds[0])return;let wt=Te.collisionBoxArray,Ot=ze.layers[0].layout,$t=ze.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-Te.tileID.overscaledZ),Ar=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),Ve=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",ot=Oa(Te,1,this.transform.zoom),pt=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("text-translate"),$t.get("text-translate-anchor")),Et=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("icon-translate"),$t.get("icon-translate-anchor")),bt=Er(na,Ve,$e,this.transform,ot),Rt=null;if(Ve){let yr=Ir(na,Ve,$e,this.transform,ot);Rt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let lr={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Rt,scale:Tr,textPixelRatio:Ar,holdingForFade:Te.holdingForFade(),collisionBoxArray:wt,partiallyEvaluatedTextSize:t.ag(ze.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ze.sourceID)};if(Me)for(let yr of ze.sortKeyRanges){let{sortKey:kr,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:kr,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:lr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:lr})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve,$e,ot,pt,Et,bt){let Rt=t.aq[I.textAnchor],lr=[I.textOffset0,I.textOffset1],yr=Kt(Rt,Te,Me,lr,ze),kr=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,ot,Ar.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Ar.predicate,bt,yr).placeable)&&kr.placeable){let jr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID].text&&(jr=this.prevPlacement.variableOffsets[na.crossTileID].anchor),na.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[na.crossTileID]={textOffset:lr,width:Te,height:Me,anchor:Rt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(Ve,Rt,na,$e),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:kr}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Ar,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:Ve,partiallyEvaluatedTextSize:$e,collisionGroup:ot}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Rt=bt==="always",lr=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=lr==="always",kr=ze.get("text-rotation-alignment")==="map",jr=ze.get("text-pitch-alignment")==="map",Qr=ze.get("icon-text-fit")!=="none",ha=ze.get("symbol-z-order")==="viewport-y",Aa=Rt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Rt||!Me.hasTextData()||pt);!Me.collisionArrays&&Ve&&Me.deserializeCollisionBoxes(Ve);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,An)=>{var Yn,Nn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let wo=!1,os=!1,So=!0,Zo=null,hs={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,Jo=null,$o=null,Il=0,eu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(eu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Vl=et=>{let dt=t.ah.horizontal;if(Me.allowVerticalPlacement&&!et&&this.prevPlacement){let yt=this.prevPlacement.placedOrientations[ji.crossTileID];yt&&(this.placedOrientations[ji.crossTileID]=yt,dt=yt,this.markUsedOrientation(Me,dt,ji))}return dt},Gl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(hs=dt(),ul=hs):hs=et(),hs&&hs.placeable)break}else hs=et()},me=ji.textAnchorOffsetStartIndex,De=ji.textAnchorOffsetEndIndex;if(De===me){let et=(dt,yt)=>{let Tt=this.collisionIndex.placeCollisionBox(dt,bt,Kr,Ot,$t,jr,kr,ht,ot.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Gl(()=>et(vu,t.ah.horizontal),()=>{let dt=on.verticalTextBox;return Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&dt?et(dt,t.ah.vertical):{box:null,offscreen:null}}),Vl(hs&&hs.placeable)}else{let et=t.aq[(Nn=(Yn=this.prevPlacement)===null||Yn===void 0?void 0:Yn.variableOffsets[ji.crossTileID])===null||Nn===void 0?void 0:Nn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,xa=Qr&&lr==="never"?tr:null,pa=null,Ja=bt==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Sa<Ja;Sa++){for(let za=me;za<De;za++){let Xa=Me.textAnchorOffsets.get(za);if(et&&Xa.textAnchor!==et)continue;let fi=this.attemptAnchorPlacement(Xa,Tt,_r,Gr,Xr,kr,jr,Kr,Ot,$t,ot,ti,ji,Me,zt,ht,wt,xa,ci);if(fi&&(pa=fi.placedGlyphBoxes,pa&&pa.placeable))return wo=!0,Zo=fi.shift,pa}et?et=null:ti=bt}return Te&&!pa&&(pa={box:this.collisionIndex.placeCollisionBox(vu,"always",Kr,Ot,$t,jr,kr,ht,ot.predicate,ci,new t.P(0,0)).box,offscreen:!1,placeable:!1}),pa};Gl(()=>dt(vu,on.iconBox,t.ah.horizontal),()=>{let Tt=on.verticalTextBox;return Me.allowVerticalPlacement&&(!hs||!hs.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),hs&&(wo=hs.placeable,So=hs.offscreen);let yt=Vl(hs&&hs.placeable);if(!wo&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=hs,wo=tl&&tl.placeable,So=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Vl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Gl=t.ai(Me.textSizeData,$e,Vl),me=ze.get("text-padding");Jo=this.collisionIndex.placeCollisionCircles(bt,Vl,Me.lineVertexArray,Me.glyphOffsetArray,Gl,Ot,$t,Tr,Ar,Te,jr,ot.predicate,ji.collisionCircleDiameter,me,ht,ci),Jo.circles.length&&Jo.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),wo=Rt||Jo.circles.length>0&&!Jo.collisionDetected,So=So&&Jo.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Vl=Gl=>this.collisionIndex.placeCollisionBox(Gl,lr,Kr,Ot,$t,jr,kr,wt,ot.predicate,ci,Qr&&Zo?Zo:void 0);ul&&ul.placeable&&on.verticalIconBox?($o=Vl(on.verticalIconBox),os=$o.placeable):($o=Vl(on.iconBox),os=$o.placeable),So=So&&$o.offscreen}let Tl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,cu=Et||ji.numIconVertices===0;Tl||cu?cu?Tl||(os=os&&wo):wo=os&&wo:os=wo=os&&wo;let uc=os&&$o.placeable;if(wo&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&eu?eu:Il,ot.ID),uc&&this.collisionIndex.insertCollisionBox($o.box,lr,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,ot.ID),Jo&&wo&&this.collisionIndex.insertCollisionCircles(Jo.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,ot.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,An,on,tl,$o,Jo),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Me.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(wo||Aa,os||Da,So||Me.justReloaded),ie[ji.crossTileID]=!0};if(ha){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Me.getSortedSymbolIndexes(this.transform.angle);for(let on=ji.length-1;on>=0;--on){let An=ji[on];Vi(Me.symbolInstances.get(An),Me.collisionArrays[An],An)}}else for(let ji=I.symbolInstanceStart;ji<I.symbolInstanceEnd;ji++)Vi(Me.symbolInstances.get(ji),Me.collisionArrays[ji],ji);if(Te&&Me.bucketInstanceId in this.collisionCircleArrays){let ji=this.collisionCircleArrays[Me.bucketInstanceId];t.as(ji.invProjMatrix,Ot),ji.viewportMatrix=this.collisionIndex.getViewportMatrix()}Me.justReloaded=!1}storeCollisionData(I,ie,Te,Me,ze,ht){if(Te.textBox||Te.iconBox){let wt,Ot;this.collisionBoxArrays.has(I)?wt=this.collisionBoxArrays.get(I):(wt=new Map,this.collisionBoxArrays.set(I,wt)),wt.has(ie)?Ot=wt.get(ie):(Ot={text:null,icon:null},wt.set(ie,Ot)),Te.textBox&&(Ot.text=Me.box),Te.iconBox&&(Ot.icon=ze.box)}if(ht){let wt=this.collisionCircleArrays[I];wt===void 0&&(wt=this.collisionCircleArrays[I]=new Ca);for(let Ot=0;Ot<ht.circles.length;Ot+=4)wt.circles.push(ht.circles[Ot+0]),wt.circles.push(ht.circles[Ot+1]),wt.circles.push(ht.circles[Ot+2]),wt.circles.push(ht.collisionDetected?1:0)}}markUsedJustification(I,ie,Te,Me){let ze;ze=Me===t.ah.vertical?Te.verticalPlacedTextSymbolIndex:{left:Te.leftJustifiedTextSymbolIndex,center:Te.centerJustifiedTextSymbolIndex,right:Te.rightJustifiedTextSymbolIndex}[t.at(ie)];let ht=[Te.leftJustifiedTextSymbolIndex,Te.centerJustifiedTextSymbolIndex,Te.rightJustifiedTextSymbolIndex,Te.verticalPlacedTextSymbolIndex];for(let wt of ht)wt>=0&&(I.text.placedSymbolArray.get(wt).crossTileID=ze>=0&&wt!==ze?0:Te.crossTileID)}markUsedOrientation(I,ie,Te){let Me=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,ze=ie===t.ah.vertical?ie:0,ht=[Te.leftJustifiedTextSymbolIndex,Te.centerJustifiedTextSymbolIndex,Te.rightJustifiedTextSymbolIndex];for(let wt of ht)I.text.placedSymbolArray.get(wt).placedOrientation=Me;Te.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Te.verticalPlacedTextSymbolIndex).placedOrientation=ze)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,Te=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Me=ie?ie.symbolFadeChange(I):1,ze=ie?ie.opacities:{},ht=ie?ie.variableOffsets:{},wt=ie?ie.placedOrientations:{};for(let Ot in this.placements){let $t=this.placements[Ot],Tr=ze[Ot];Tr?(this.opacities[Ot]=new qa(Tr,Me,$t.text,$t.icon),Te=Te||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Ot]=new qa(null,Me,$t.text,$t.icon,$t.skipFade),Te=Te||$t.text||$t.icon)}for(let Ot in ze){let $t=ze[Ot];if(!this.opacities[Ot]){let Tr=new qa($t,Me,!1,!1);Tr.isHidden()||(this.opacities[Ot]=Tr,Te=Te||$t.text.placed||$t.icon.placed)}}for(let Ot in ht)this.variableOffsets[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.variableOffsets[Ot]=ht[Ot]);for(let Ot in wt)this.placedOrientations[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.placedOrientations[Ot]=wt[Ot]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Te?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let Te={};for(let Me of ie){let ze=Me.getBucket(I);ze&&Me.latestFeatureIndex&&I.id===ze.layerIds[0]&&this.updateBucketOpacities(ze,Me.tileID,Te,Me.collisionBoxArray)}}updateBucketOpacities(I,ie,Te,Me){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let ze=I.layers[0],ht=ze.layout,wt=new qa(null,0,!1,!1,!0),Ot=ht.get("text-allow-overlap"),$t=ht.get("icon-allow-overlap"),Tr=ze._unevaluatedLayout.hasValue("text-variable-anchor")||ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ar=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",Ve=new qa(null,0,Ot&&($t||!I.hasIconData()||ht.get("icon-optional")),$t&&(Ot||!I.hasTextData()||ht.get("text-optional")),!0);!I.collisionArrays&&Me&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Me);let $e=(pt,Et,bt)=>{for(let Rt=0;Rt<Et/4;Rt++)pt.opacityVertexArray.emplaceBack(bt);pt.hasVisibleVertices=pt.hasVisibleVertices||bt!==ri},ot=this.collisionBoxArrays.get(I.bucketInstanceId);for(let pt=0;pt<I.symbolInstances.length;pt++){let Et=I.symbolInstances.get(pt),{numHorizontalGlyphVertices:bt,numVerticalGlyphVertices:Rt,crossTileID:lr}=Et,yr=this.opacities[lr];Te[lr]?yr=wt:yr||(yr=Ve,this.opacities[lr]=yr),Te[lr]=!0;let kr=Et.numIconVertices>0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Rt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Rt,ha?ri:Da);let ci=yr.text.isHidden();[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex].forEach(on=>{on>=0&&(I.text.placedSymbolArray.get(on).hidden=ci||Qr?1:0)}),Et.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=ci||ha?1:0);let Vi=this.variableOffsets[Et.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Et,jr);let ji=this.placedOrientations[Et.crossTileID];ji&&(this.markUsedJustification(I,"left",Et,ji),this.markUsedOrientation(I,ji,Et))}if(kr){let Da=Za(yr.icon),ci=!(na&&Et.verticalPlacedIconSymbolIndex&&Qr);Et.placedIconSymbolIndex>=0&&($e(I.icon,Et.numIconVertices,ci?Da:ri),I.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&($e(I.icon,Et.numVerticalIconVertices,ci?ri:Da),I.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=ot&&ot.has(pt)?ot.get(pt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let Da=I.collisionArrays[pt];if(Da){let ci=new t.P(0,0);if(Da.textBox||Da.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[lr];ji?(ci=Kt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Ar&&ci._rotate(Kr?this.transform.angle:-this.transform.angle)):Vi=!1}if(Da.textBox||Da.verticalTextBox){let ji;Da.textBox&&(ji=Qr),Da.verticalTextBox&&(ji=ha),Yt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(Da.iconBox||Da.verticalIconBox){let Vi=!!(!ha&&Da.verticalIconBox),ji;Da.iconBox&&(ji=Vi),Da.verticalIconBox&&(ji=!Vi),Yt(I.iconCollisionBox.collisionVertexArray,yr.icon.placed,ji,Aa.icon,na?ci.x:0,na?ci.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let pt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=pt.invProjMatrix,I.placementViewportMatrix=pt.viewportMatrix,I.collisionCircleArray=pt.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(I,ie){let Te=this.zoomAtLastRecencyCheck===ie?1-this.zoomAdjustment(ie):1;return this.zoomAtLastRecencyCheck=ie,this.commitTime+this.fadeDuration*Te>I}setStale(){this.stale=!0}}function Yt(Fe,I,ie,Te,Me,ze){Te&&Te.length!==0||(Te=[0,0,0,0]);let ht=Te[0]-Pr,wt=Te[1]-Pr,Ot=Te[2]-Pr,$t=Te[3]-Pr;Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,$t)}let Jt=Math.pow(2,25),Fr=Math.pow(2,24),ta=Math.pow(2,17),ra=Math.pow(2,16),ca=Math.pow(2,9),Ba=Math.pow(2,8),$a=Math.pow(2,1);function Za(Fe){if(Fe.opacity===0&&!Fe.placed)return 0;if(Fe.opacity===1&&Fe.placed)return 4294967295;let I=Fe.placed?1:0,ie=Math.floor(127*Fe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Fe,I,ie)=>!1,getPitchedTextCorrection:(Fe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Fe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Fe,I,ie,Te)=>function(Me,ze,ht,wt,Ot=!1){if(!ht[0]&&!ht[1])return[0,0];let $t=Ot?wt==="map"?Me.angle:0:wt==="viewport"?-Me.angle:0;if($t){let Tr=Math.sin($t),Ar=Math.cos($t);ht=[ht[0]*Ar-ht[1]*Tr,ht[0]*Tr+ht[1]*Ar]}return[Ot?ht[0]:Oa(ze,ht[0],Me.zoom),Ot?ht[1]:Oa(ze,ht[1],Me.zoom)]}(Fe,I,ie,Te),getCircleRadiusCorrection:Fe=>1}}class Ra{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ie,Te,Me,ze){let ht=this._bucketParts;for(;this._currentTileIndex<I.length;)if(ie.getBucketParts(ht,Me,I[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,ze())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ht.sort((wt,Ot)=>wt.sortKey-Ot.sortKey));this._currentPartIndex<ht.length;)if(ie.placeLayerBucketPart(ht[this._currentPartIndex],this._seenCrossTileIDs,Te),this._currentPartIndex++,ze())return!0;return!1}}class an{constructor(I,ie,Te,Me,ze,ht,wt,Ot){this.placement=new Dt(I,pi(),ie,ht,wt,Ot),this._currentPlacementIndex=Te.length-1,this._forceFullPlacement=Me,this._showCollisionBoxes=ze,this._done=!1}isDone(){return this._done}continuePlacement(I,ie,Te){let Me=n.now(),ze=()=>!this._forceFullPlacement&&n.now()-Me>2;for(;this._currentPlacementIndex>=0;){let ht=ie[I[this._currentPlacementIndex]],wt=this.placement.collisionIndex.transform.zoom;if(ht.type==="symbol"&&(!ht.minzoom||ht.minzoom<=wt)&&(!ht.maxzoom||ht.maxzoom>wt)){if(this._inProgressLayer||(this._inProgressLayer=new Ra(ht)),this._inProgressLayer.continuePlacement(Te[ht.source],this.placement,this._showCollisionBoxes,ht,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let tn=512/t.X/2;class fn{constructor(I,ie,Te){this.tileID=I,this.bucketInstanceId=Te,this._symbolsByKey={};let Me=new Map;for(let ze=0;ze<ie.length;ze++){let ht=ie.get(ze),wt=ht.key,Ot=Me.get(wt);Ot?Ot.push(ht):Me.set(wt,[ht])}for(let[ze,ht]of Me){let wt={positions:ht.map(Ot=>({x:Math.floor(Ot.anchorX*tn),y:Math.floor(Ot.anchorY*tn)})),crossTileIDs:ht.map(Ot=>Ot.crossTileID)};if(wt.positions.length>128){let Ot=new t.av(wt.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of wt.positions)Ot.add($t,Tr);Ot.finish(),delete wt.positions,wt.index=Ot}this._symbolsByKey[ze]=wt}}getScaledCoordinates(I,ie){let{x:Te,y:Me,z:ze}=this.tileID.canonical,{x:ht,y:wt,z:Ot}=ie.canonical,$t=tn/Math.pow(2,Ot-ze),Tr=(wt*t.X+I.anchorY)*$t,Ar=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Ar)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.z<ie.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ie.canonical.z);for(let ze=0;ze<I.length;ze++){let ht=I.get(ze);if(ht.crossTileID)continue;let wt=this._symbolsByKey[ht.key];if(!wt)continue;let Ot=this.getScaledCoordinates(ht,ie);if(wt.index){let $t=wt.index.range(Ot.x-Me,Ot.y-Me,Ot.x+Me,Ot.y+Me).sort();for(let Tr of $t){let Ar=wt.crossTileIDs[Tr];if(!Te[Ar]){Te[Ar]=!0,ht.crossTileID=Ar;break}}}else if(wt.positions)for(let $t=0;$t<wt.positions.length;$t++){let Tr=wt.positions[$t],Ar=wt.crossTileIDs[$t];if(Math.abs(Tr.x-Ot.x)<=Me&&Math.abs(Tr.y-Ot.y)<=Me&&!Te[Ar]){Te[Ar]=!0,ht.crossTileID=Ar;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:I})=>I)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class lt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ie=Math.round((I-this.lng)/360);if(ie!==0)for(let Te in this.indexes){let Me=this.indexes[Te],ze={};for(let ht in Me){let wt=Me[ht];wt.tileID=wt.tileID.unwrapTo(wt.tileID.wrap+ie),ze[wt.tileID.key]=wt}this.indexes[Te]=ze}this.lng=I}addBucket(I,ie,Te){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ie.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let ze=0;ze<ie.symbolInstances.length;ze++)ie.symbolInstances.get(ze).crossTileID=0;this.usedCrossTileIDs[I.overscaledZ]||(this.usedCrossTileIDs[I.overscaledZ]={});let Me=this.usedCrossTileIDs[I.overscaledZ];for(let ze in this.indexes){let ht=this.indexes[ze];if(Number(ze)>I.overscaledZ)for(let wt in ht){let Ot=ht[wt];Ot.tileID.isChildOf(I)&&Ot.findMatches(ie.symbolInstances,I,Me)}else{let wt=ht[I.scaledTo(Number(ze)).key];wt&&wt.findMatches(ie.symbolInstances,I,Me)}}for(let ze=0;ze<ie.symbolInstances.length;ze++){let ht=ie.symbolInstances.get(ze);ht.crossTileID||(ht.crossTileID=Te.generate(),Me[ht.crossTileID]=!0)}return this.indexes[I.overscaledZ]===void 0&&(this.indexes[I.overscaledZ]={}),this.indexes[I.overscaledZ][I.key]=new fn(I,ie.symbolInstances,ie.bucketInstanceId),!0}removeBucketCrossTileIDs(I,ie){for(let Te of ie.getCrossTileIDsLists())for(let Me of Te)delete this.usedCrossTileIDs[I][Me]}removeStaleBuckets(I){let ie=!1;for(let Te in this.indexes){let Me=this.indexes[Te];for(let ze in Me)I[Me[ze].bucketInstanceId]||(this.removeBucketCrossTileIDs(Te,Me[ze]),delete Me[ze],ie=!0)}return ie}}class Br{constructor(){this.layerIndexes={},this.crossTileIDs=new xt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(I,ie,Te){let Me=this.layerIndexes[I.id];Me===void 0&&(Me=this.layerIndexes[I.id]=new lt);let ze=!1,ht={};Me.handleWrapJump(Te);for(let wt of ie){let Ot=wt.getBucket(I);Ot&&I.id===Ot.layerIds[0]&&(Ot.bucketInstanceId||(Ot.bucketInstanceId=++this.maxBucketInstanceId),Me.addBucket(wt.tileID,Ot,this.crossTileIDs)&&(ze=!0),ht[Ot.bucketInstanceId]=!0)}return Me.removeStaleBuckets(ht)&&(ze=!0),ze}pruneUnusedLayers(I){let ie={};I.forEach(Te=>{ie[Te]=!0});for(let Te in this.layerIndexes)ie[Te]||delete this.layerIndexes[Te]}}let Cr=(Fe,I)=>t.t(Fe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),xr=t.aw();class Rr extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let Te in this.sourceCaches){let Me=this.sourceCaches[Te].getSource().type;Me!=="vector"&&Me!=="geojson"||this.sourceCaches[Te].reload()}},this.map=I,this.dispatcher=new ee(Y(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Te,Me)=>this.getGlyphs(Te,Me)),this.dispatcher.registerMessageHandler("GI",(Te,Me)=>this.getImages(Te,Me)),this.imageManager=new m,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new Br,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),Ye().on(ue,this._rtlPluginLoaded),this.on("data",Te=>{if(Te.dataType!=="source"||Te.sourceDataType!=="metadata")return;let Me=this.sourceCaches[Te.sourceId];if(!Me)return;let ze=Me.getSource();if(ze&&ze.vectorLayerIds)for(let ht in this._layers){let wt=this._layers[ht];wt.source===ze.id&&this._validateLayer(wt)}})}loadURL(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Me=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let ze=this._loadStyleRequest;t.h(Me,this._loadStyleRequest).then(ht=>{this._loadStyleRequest=null,this._load(ht.data,ie,Te)}).catch(ht=>{this._loadStyleRequest=null,ht&&!ze.signal.aborted&&this.fire(new t.j(ht))})}loadJSON(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ie.validate=ie.validate!==!1,this._load(I,ie,Te)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(xr,{validate:!1})}_load(I,ie,Te){var Me;let ze=ie.transformStyle?ie.transformStyle(Te,I):I;if(!ie.validate||!Cr(this,t.u(ze))){this._loaded=!0,this.stylesheet=ze;for(let ht in ze.sources)this.addSource(ht,ze.sources[ht],{validate:!1});ze.sprite?this._loadSprite(ze.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ze.glyphs),this._createLayers(),this.light=new P(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Me=this.stylesheet.terrain)!==null&&Me!==void 0?Me:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let I=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ie=>ie.id),this._layers={},this._serializedLayers=null;for(let ie of I){let Te=t.aA(ie);Te.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=Te}}_loadSprite(I,ie=!1,Te=void 0){let Me;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(ze,ht,wt,Ot){return t._(this,void 0,void 0,function*(){let $t=b(ze),Tr=wt>1?"@2x":"",Ar={},Kr={};for(let{id:na,url:Ve}of $t){let $e=ht.transformRequest(p(Ve,Tr,".json"),"SpriteJSON");Ar[na]=t.h($e,Ot);let ot=ht.transformRequest(p(Ve,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(ot,Ot)}return yield Promise.all([...Object.values(Ar),...Object.values(Kr)]),function(na,Ve){return t._(this,void 0,void 0,function*(){let $e={};for(let ot in na){$e[ot]={};let pt=n.getImageCanvasContext((yield Ve[ot]).data),Et=(yield na[ot]).data;for(let bt in Et){let{width:Rt,height:lr,x:yr,y:kr,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[ot][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Rt,height:lr,x:yr,y:kr,context:pt}}}}return $e})}(Ar,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(ze=>{if(this._spriteRequest=null,ze)for(let ht in ze){this._spritesImagesIds[ht]=[];let wt=this._spritesImagesIds[ht]?this._spritesImagesIds[ht].filter(Ot=>!(Ot in ze)):[];for(let Ot of wt)this.imageManager.removeImage(Ot),this._changedImages[Ot]=!0;for(let Ot in ze[ht]){let $t=ht==="default"?Ot:`${ht}:${Ot}`;this._spritesImagesIds[ht].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,ze[ht][Ot],!1):this.imageManager.addImage($t,ze[ht][Ot]),ie&&(this._changedImages[$t]=!0)}}}).catch(ze=>{this._spriteRequest=null,Me=ze,this.fire(new t.j(Me))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ie&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),Te&&Te(Me)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(I){let ie=this.sourceCaches[I.source];if(!ie)return;let Te=I.sourceLayer;if(!Te)return;let Me=ie.getSource();(Me.type==="geojson"||Me.vectorLayerIds&&Me.vectorLayerIds.indexOf(Te)===-1)&&this.fire(new t.j(new Error(`Source layer "${Te}" does not exist on source "${Me.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ie=!1){let Te=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(Te):Te);let Me=[];for(let ze of I)if(Te[ze]){let ht=ie?t.aB(Te[ze]):Te[ze];Me.push(ht)}return Me}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let Te of ie){let Me=this._layers[Te];Me.type!=="custom"&&(I[Te]=Me.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ie=this._changed;if(ie){let Me=Object.keys(this._updatedLayers),ze=Object.keys(this._removedLayers);(Me.length||ze.length)&&this._updateWorkerLayers(Me,ze);for(let ht in this._updatedSources){let wt=this._updatedSources[ht];if(wt==="reload")this._reloadSource(ht);else{if(wt!=="clear")throw new Error(`Invalid action ${wt}`);this._clearSource(ht)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ht in this._updatedPaintProps)this._layers[ht].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Te={};for(let Me in this.sourceCaches){let ze=this.sourceCaches[Me];Te[Me]=ze.used,ze.used=!1}for(let Me of this._order){let ze=this._layers[Me];ze.recalculate(I,this._availableImages),!ze.isHidden(I.zoom)&&ze.source&&(this.sourceCaches[ze.source].used=!0)}for(let Me in Te){let ze=this.sourceCaches[Me];!!Te[Me]!=!!ze.used&&ze.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Me}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ie&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ie in this.sourceCaches)this.sourceCaches[ie].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ie){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ie})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ie={}){var Te;this._checkLoaded();let Me=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Me,I):I,((Te=ie.validate)===null||Te===void 0||Te)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let ze=t.aC(Me,I),ht=this._getOperationsToPerform(ze);if(ht.unimplemented.length>0)throw new Error(`Unimplemented: ${ht.unimplemented.join(", ")}.`);if(ht.operations.length===0)return!1;for(let wt of ht.operations)wt();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],Te=[];for(let Me of I)switch(Me.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Me.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Me.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Me.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Me.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Me.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Me.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Me.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Me.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Me.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Me.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Me.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Me.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Me.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Me.args));break;case"setTransition":ie.push(()=>{});break;default:Te.push(Me.command)}return{operations:ie,unimplemented:Te}}addImage(I,ie){if(this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ie),this._afterImageUpdated(I)}updateImage(I,ie){this.imageManager.updateImage(I,ie)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(I,ie,Te={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ie.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ie).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(t.u.source,`sources.${I}`,ie,null,Te))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Me=this.sourceCaches[I]=new kt(I,ie,this.dispatcher);Me.style=this,Me.setEventedParent(this,()=>({isSourceLoaded:Me.loaded(),source:Me.serialize(),sourceId:I})),Me.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Te in this._layers)if(this._layers[Te].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${Te}" is using it.`)));let ie=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ie.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ie.setEventedParent(null),ie.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ie){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Te=this.sourceCaches[I].getSource();if(Te.type!=="geojson")throw new Error(`geojsonSource.type is ${Te.type}, which is !== 'geojson`);Te.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,Te={}){this._checkLoaded();let Me=I.id;if(this.getLayer(Me))return void this.fire(new t.j(new Error(`Layer "${Me}" already exists on this map.`)));let ze;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;ze=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Me,I.source),I=t.aB(I),I=t.e(I,{source:Me})),this._validate(t.u.layer,`layers.${Me}`,I,{arrayIndex:-1},Te))return;ze=t.aA(I),this._validateLayer(ze),ze.setEventedParent(this,{layer:{id:Me}})}let ht=ie?this._order.indexOf(ie):this._order.length;if(ie&&ht===-1)this.fire(new t.j(new Error(`Cannot add layer "${Me}" before non-existing layer "${ie}".`)));else{if(this._order.splice(ht,0,Me),this._layerOrderChanged=!0,this._layers[Me]=ze,this._removedLayers[Me]&&ze.source&&ze.type!=="custom"){let wt=this._removedLayers[Me];delete this._removedLayers[Me],wt.type!==ze.type?this._updatedSources[ze.source]="clear":(this._updatedSources[ze.source]="reload",this.sourceCaches[ze.source].pause())}this._updateLayer(ze),ze.onAdd&&ze.onAdd(this.map)}}moveLayer(I,ie){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new t.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ie)return;let Te=this._order.indexOf(I);this._order.splice(Te,1);let Me=ie?this._order.indexOf(ie):this._order.length;ie&&Me===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Me,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ie=this._layers[I];if(!ie)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${I}".`)));ie.setEventedParent(null);let Te=this._order.indexOf(I);this._order.splice(Te,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ie,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ie.onRemove&&ie.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ie,Te){this._checkLoaded();let Me=this.getLayer(I);Me?Me.minzoom===ie&&Me.maxzoom===Te||(ie!=null&&(Me.minzoom=ie),Te!=null&&(Me.maxzoom=Te),this._updateLayer(Me)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,Te={}){this._checkLoaded();let Me=this.getLayer(I);if(Me){if(!t.aE(Me.filter,ie))return ie==null?(Me.filter=void 0,void this._updateLayer(Me)):void(this._validate(t.u.filter,`layers.${Me.id}.filter`,ie,null,Te)||(Me.filter=t.aB(ie),this._updateLayer(Me)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return t.aB(this.getLayer(I).filter)}setLayoutProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getLayoutProperty(ie),Te)||(ze.setLayoutProperty(ie,Te,Me),this._updateLayer(ze)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let Te=this.getLayer(I);if(Te)return Te.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getPaintProperty(ie),Te)||(ze.setPaintProperty(ie,Te,Me)&&this._updateLayer(ze),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ie){return this.getLayer(I).getPaintProperty(ie)}setFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=I.sourceLayer,ze=this.sourceCaches[Te];if(ze===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ht=ze.getSource().type;ht==="geojson"&&Me?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ht!=="vector"||Me?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),ze.setFeatureState(Me,I.id,ie)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=this.sourceCaches[Te];if(Me===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ze=Me.getSource().type,ht=ze==="vector"?I.sourceLayer:void 0;ze!=="vector"||ht?ie&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):Me.removeFeatureState(ht,I.id,ie):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ie=I.source,Te=I.sourceLayer,Me=this.sourceCaches[ie];if(Me!==void 0)return Me.getSource().type!=="vector"||Te?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Me.getFeatureState(Te,I.id)):void this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(new Error(`The source '${ie}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let I=t.aF(this.sourceCaches,ze=>ze.serialize()),ie=this._serializeByIds(this._order,!0),Te=this.map.getTerrain()||void 0,Me=this.stylesheet;return t.aG({version:Me.version,name:Me.name,metadata:Me.metadata,light:Me.light,sky:Me.sky,center:Me.center,zoom:Me.zoom,bearing:Me.bearing,pitch:Me.pitch,sprite:Me.sprite,glyphs:Me.glyphs,transition:Me.transition,sources:I,layers:ie,terrain:Te},ze=>ze!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ie=ht=>this._layers[ht].type==="fill-extrusion",Te={},Me=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt)){Te[wt]=ht;for(let Ot of I){let $t=Ot[wt];if($t)for(let Tr of $t)Me.push(Tr)}}}Me.sort((ht,wt)=>wt.intersectionZ-ht.intersectionZ);let ze=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt))for(let Ot=Me.length-1;Ot>=0;Ot--){let $t=Me[Ot].feature;if(Te[$t.layer.id]<ht)break;ze.push($t),Me.pop()}else for(let Ot of I){let $t=Ot[wt];if($t)for(let Tr of $t)ze.push(Tr.feature)}}return ze}queryRenderedFeatures(I,ie,Te){ie&&ie.filter&&this._validate(t.u.filter,"queryRenderedFeatures.filter",ie.filter,null,ie);let Me={};if(ie&&ie.layers){if(!Array.isArray(ie.layers))return this.fire(new t.j(new Error("parameters.layers must be an Array."))),[];for(let wt of ie.layers){let Ot=this._layers[wt];if(!Ot)return this.fire(new t.j(new Error(`The layer '${wt}' does not exist in the map's style and cannot be queried for features.`))),[];Me[Ot.source]=!0}}let ze=[];ie.availableImages=this._availableImages;let ht=this._serializedAllLayers();for(let wt in this.sourceCaches)ie.layers&&!Me[wt]||ze.push(ae(this.sourceCaches[wt],this._layers,ht,I,ie,Te));return this.placement&&ze.push(function(wt,Ot,$t,Tr,Ar,Kr,na){let Ve={},$e=Kr.queryRenderedSymbols(Tr),ot=[];for(let pt of Object.keys($e).map(Number))ot.push(na[pt]);ot.sort(j);for(let pt of ot){let Et=pt.featureIndex.lookupSymbolFeatures($e[pt.bucketInstanceId],Ot,pt.bucketIndex,pt.sourceLayerIndex,Ar.filter,Ar.layers,Ar.availableImages,wt);for(let bt in Et){let Rt=Ve[bt]=Ve[bt]||[],lr=Et[bt];lr.sort((yr,kr)=>{let jr=pt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(kr.featureIndex)-Qr}return kr.featureIndex-yr.featureIndex});for(let yr of lr)Rt.push(yr)}}for(let pt in Ve)Ve[pt].forEach(Et=>{let bt=Et.feature,Rt=$t[wt[pt].source].getFeatureState(bt.layer["source-layer"],bt.id);bt.source=bt.layer.source,bt.layer["source-layer"]&&(bt.sourceLayer=bt.layer["source-layer"]),bt.state=Rt});return Ve}(this._layers,ht,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ze)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let Te=this.sourceCaches[I];return Te?function(Me,ze){let ht=Me.getRenderableIds().map($t=>Me.getTileByID($t)),wt=[],Ot={};for(let $t=0;$t<ht.length;$t++){let Tr=ht[$t],Ar=Tr.tileID.canonical.key;Ot[Ar]||(Ot[Ar]=!0,Tr.querySourceFeatures(wt,ze))}return wt}(Te,ie):[]}getLight(){return this.light.getLight()}setLight(I,ie={}){this._checkLoaded();let Te=this.light.getLight(),Me=!1;for(let ht in I)if(!t.aE(I[ht],Te[ht])){Me=!0;break}if(!Me)return;let ze={now:n.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(I,ie),this.light.updateTransitions(ze)}getSky(){var I;return(I=this.stylesheet)===null||I===void 0?void 0:I.sky}setSky(I,ie={}){let Te=this.getSky(),Me=!1;if(!I&&!Te)return;if(I&&!Te)Me=!0;else if(!I&&Te)Me=!0;else for(let ht in I)if(!t.aE(I[ht],Te[ht])){Me=!0;break}if(!Me)return;let ze={now:n.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=I,this.sky.setSky(I,ie),this.sky.updateTransitions(ze)}_validate(I,ie,Te,Me,ze={}){return(!ze||ze.validate!==!1)&&Cr(this,I.call(t.u,t.e({key:ie,style:this.serialize(),value:Te,styleSpec:t.v},Me)))}_remove(I=!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),Ye().off(ue,this._rtlPluginLoaded);for(let ie in this._layers)this._layers[ie].setEventedParent(null);for(let ie in this.sourceCaches){let Te=this.sourceCaches[ie];Te.setEventedParent(null),Te.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),I&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(I)}_clearSource(I){this.sourceCaches[I].clearTiles()}_reloadSource(I){this.sourceCaches[I].resume(),this.sourceCaches[I].reload()}_updateSources(I){for(let ie in this.sourceCaches)this.sourceCaches[ie].update(I,this.map.terrain)}_generateCollisionBoxes(){for(let I in this.sourceCaches)this._reloadSource(I)}_updatePlacement(I,ie,Te,Me,ze=!1){let ht=!1,wt=!1,Ot={};for(let $t of this._order){let Tr=this._layers[$t];if(Tr.type!=="symbol")continue;if(!Ot[Tr.source]){let Kr=this.sourceCaches[Tr.source];Ot[Tr.source]=Kr.getRenderableIds(!0).map(na=>Kr.getTileByID(na)).sort((na,Ve)=>Ve.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(Ve.tileID)?-1:1))}let Ar=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),I.zoom))&&(this.pauseablePlacement=new an(I,this.map.terrain,this._order,ze,ie,Te,Me,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),wt=!0),ht&&this.pauseablePlacement.placement.setStale()),wt||ht)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Ot[Tr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,ie.icons),Te})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.glyphManager.getGlyphs(ie.stacks),Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,[""]),Te})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ie={}){this._checkLoaded(),I&&this._validate(t.u.glyphs,"glyphs",I,null,ie)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ie,Te={},Me){this._checkLoaded();let ze=[{id:I,url:ie}],ht=[...b(this.stylesheet.sprite),...ze];this._validate(t.u.sprite,"sprite",ht,null,Te)||(this.stylesheet.sprite=ht,this._loadSprite(ze,!0,Me))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(Te=>Te.id===I)){if(this._spritesImagesIds[I])for(let Te of this._spritesImagesIds[I])this.imageManager.removeImage(Te),this._changedImages[Te]=!0;ie.splice(ie.findIndex(Te=>Te.id===I),1),this.stylesheet.sprite=ie.length>0?ie:void 0,delete this._spritesImagesIds[I],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(new Error(`Sprite "${I}" doesn't exists on this map.`)))}getSprite(){return b(this.stylesheet.sprite)}setSprite(I,ie={},Te){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Te):(this._unloadSprite(),Te&&Te(null)))}}var Ur=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 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=(texture2D(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
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
}`),background:gt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:gt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:gt(`varying vec3 v_data;varying 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));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying 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 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:gt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:gt(`uniform highp float u_intensity;varying 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);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#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 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:gt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:gt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}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:gt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:gt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:gt(`#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_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#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=u_matrix*vec4(a_pos,0,1);}`),fillOutline:gt(`varying vec2 v_pos;
#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);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#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=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:gt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#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=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#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=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:gt(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying 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=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#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=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:gt(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying 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);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:gt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#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 z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:gt(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:gt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:gt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:gt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:gt(`#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;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:gt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:gt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:gt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#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);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;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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:gt(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform 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;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#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;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);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;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:gt(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#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);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;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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:gt("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;varying vec2 v_texture_pos;varying 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=texture2D(u_texture,v_texture_pos);if (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);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:gt("varying 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() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:gt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:gt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function gt(Fe,I){let ie=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Te=I.match(/attribute ([\w]+) ([\w]+)/g),Me=Fe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ze=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ht=ze?ze.concat(Me):Me,wt={};return{fragmentSource:Fe=Fe.replace(ie,(Ot,$t,Tr,Ar,Kr)=>(wt[Kr]=!0,$t==="define"?`
#ifndef HAS_UNIFORM_u_${Kr}
varying ${Tr} ${Ar} ${Kr};
#else
uniform ${Tr} ${Ar} u_${Kr};
#endif
`:`
#ifdef HAS_UNIFORM_u_${Kr}
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`)),vertexSource:I=I.replace(ie,(Ot,$t,Tr,Ar,Kr)=>{let na=Ar==="float"?"vec2":"vec4",Ve=Kr.match(/color/)?"color":na;return wt[Kr]?$t==="define"?`
#ifndef HAS_UNIFORM_u_${Kr}
uniform lowp float u_${Kr}_t;
attribute ${Tr} ${na} a_${Kr};
varying ${Tr} ${Ar} ${Kr};
#else
uniform ${Tr} ${Ar} u_${Kr};
#endif
`:Ve==="vec4"?`
#ifndef HAS_UNIFORM_u_${Kr}
${Kr} = a_${Kr};
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Kr}
${Kr} = unpack_mix_${Ve}(a_${Kr}, u_${Kr}_t);
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`:$t==="define"?`
#ifndef HAS_UNIFORM_u_${Kr}
uniform lowp float u_${Kr}_t;
attribute ${Tr} ${na} a_${Kr};
#else
uniform ${Tr} ${Ar} u_${Kr};
#endif
`:Ve==="vec4"?`
#ifndef HAS_UNIFORM_u_${Kr}
${Tr} ${Ar} ${Kr} = a_${Kr};
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Kr}
${Tr} ${Ar} ${Kr} = unpack_mix_${Ve}(a_${Kr}, u_${Kr}_t);
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`}),staticAttributes:Te,staticUniforms:ht}}class Xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ie,Te,Me,ze,ht,wt,Ot,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Me.length;for(let Ar=0;!Tr&&Ar<Me.length;Ar++)this.boundPaintVertexBuffers[Ar]!==Me[Ar]&&(Tr=!0);!this.vao||this.boundProgram!==ie||this.boundLayoutVertexBuffer!==Te||Tr||this.boundIndexBuffer!==ze||this.boundVertexOffset!==ht||this.boundDynamicVertexBuffer!==wt||this.boundDynamicVertexBuffer2!==Ot||this.boundDynamicVertexBuffer3!==$t?this.freshBind(ie,Te,Me,ze,ht,wt,Ot,$t):(I.bindVertexArray.set(this.vao),wt&&wt.bind(),ze&&ze.dynamicDraw&&ze.bind(),Ot&&Ot.bind(),$t&&$t.bind())}freshBind(I,ie,Te,Me,ze,ht,wt,Ot){let $t=I.numAttributes,Tr=this.context,Ar=Tr.gl;this.vao&&this.destroy(),this.vao=Tr.createVertexArray(),Tr.bindVertexArray.set(this.vao),this.boundProgram=I,this.boundLayoutVertexBuffer=ie,this.boundPaintVertexBuffers=Te,this.boundIndexBuffer=Me,this.boundVertexOffset=ze,this.boundDynamicVertexBuffer=ht,this.boundDynamicVertexBuffer2=wt,this.boundDynamicVertexBuffer3=Ot,ie.enableAttributes(Ar,I);for(let Kr of Te)Kr.enableAttributes(Ar,I);ht&&ht.enableAttributes(Ar,I),wt&&wt.enableAttributes(Ar,I),Ot&&Ot.enableAttributes(Ar,I),ie.bind(),ie.setVertexAttribPointers(Ar,I,ze);for(let Kr of Te)Kr.bind(),Kr.setVertexAttribPointers(Ar,I,ze);ht&&(ht.bind(),ht.setVertexAttribPointers(Ar,I,ze)),Me&&Me.bind(),wt&&(wt.bind(),wt.setVertexAttribPointers(Ar,I,ze)),Ot&&(Ot.bind(),Ot.setVertexAttribPointers(Ar,I,ze)),Tr.currentNumAttributes=$t}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let vr=(Fe,I,ie,Te,Me)=>({u_matrix:Fe,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:Te?Te.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:Te?Te.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Te?Te.calculateFogBlendOpacity(Me):0,u_horizon_color:Te?Te.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:Te?Te.properties.get("horizon-fog-blend"):1});function Or(Fe){let I=[];for(let ie=0;ie<Fe.length;ie++){if(Fe[ie]===null)continue;let Te=Fe[ie].split(" ");I.push(Te.pop())}return I}class ba{constructor(I,ie,Te,Me,ze,ht){let wt=I.gl;this.program=wt.createProgram();let Ot=Or(ie.staticAttributes),$t=Te?Te.getBinderAttributes():[],Tr=Ot.concat($t),Ar=Hr.prelude.staticUniforms?Or(Hr.prelude.staticUniforms):[],Kr=ie.staticUniforms?Or(ie.staticUniforms):[],na=Te?Te.getBinderUniforms():[],Ve=Ar.concat(Kr).concat(na),$e=[];for(let yr of Ve)$e.indexOf(yr)<0&&$e.push(yr);let ot=Te?Te.defines():[];ze&&ot.push("#define OVERDRAW_INSPECTOR;"),ht&&ot.push("#define TERRAIN3D;");let pt=ot.concat(Hr.prelude.fragmentSource,ie.fragmentSource).join(`
`),Et=ot.concat(Hr.prelude.vertexSource,ie.vertexSource).join(`
`),bt=wt.createShader(wt.FRAGMENT_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(bt,pt),wt.compileShader(bt),!wt.getShaderParameter(bt,wt.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${wt.getShaderInfoLog(bt)}`);wt.attachShader(this.program,bt);let Rt=wt.createShader(wt.VERTEX_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(Rt,Et),wt.compileShader(Rt),!wt.getShaderParameter(Rt,wt.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${wt.getShaderInfoLog(Rt)}`);wt.attachShader(this.program,Rt),this.attributes={};let lr={};this.numAttributes=Tr.length;for(let yr=0;yr<this.numAttributes;yr++)Tr[yr]&&(wt.bindAttribLocation(this.program,yr,Tr[yr]),this.attributes[Tr[yr]]=yr);if(wt.linkProgram(this.program),!wt.getProgramParameter(this.program,wt.LINK_STATUS))throw new Error(`Program failed to link: ${wt.getProgramInfoLog(this.program)}`);wt.deleteShader(Rt),wt.deleteShader(bt);for(let yr=0;yr<$e.length;yr++){let kr=$e[yr];if(kr&&!lr[kr]){let jr=wt.getUniformLocation(this.program,kr);jr&&(lr[kr]=jr)}}this.fixedUniforms=Me(I,lr),this.terrainUniforms=((yr,kr)=>({u_depth:new t.aH(yr,kr.u_depth),u_terrain:new t.aH(yr,kr.u_terrain),u_terrain_dim:new t.aI(yr,kr.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,kr.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,kr.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,kr.u_terrain_exaggeration)}))(I,lr),this.binderUniforms=Te?Te.getUniforms(I,lr):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve,$e,ot,pt,Et){let bt=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Te),I.setStencilMode(Me),I.setColorMode(ze),I.setCullFace(ht),Ot){I.activeTexture.set(bt.TEXTURE2),bt.bindTexture(bt.TEXTURE_2D,Ot.depthTexture),I.activeTexture.set(bt.TEXTURE3),bt.bindTexture(bt.TEXTURE_2D,Ot.texture);for(let lr in this.terrainUniforms)this.terrainUniforms[lr].set(Ot[lr])}for(let lr in this.fixedUniforms)this.fixedUniforms[lr].set(wt[lr]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:Ve});let Rt=0;switch(ie){case bt.LINES:Rt=2;break;case bt.TRIANGLES:Rt=3;break;case bt.LINE_STRIP:Rt=1}for(let lr of Kr.get()){let yr=lr.vaos||(lr.vaos={});(yr[$t]||(yr[$t]=new Xt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Ar,lr.vertexOffset,ot,pt,Et),bt.drawElements(ie,lr.primitiveLength*Rt,bt.UNSIGNED_SHORT,lr.primitiveOffset*Rt*2)}}}function Pa(Fe,I,ie){let Te=1/Oa(ie,1,I.transform.tileZoom),Me=Math.pow(2,ie.tileID.overscaledZ),ze=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Me,ht=ze*(ie.tileID.canonical.x+ie.tileID.wrap*Me),wt=ze*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[Te,Fe.fromScale,Fe.toScale],u_fade:Fe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ma=(Fe,I,ie,Te)=>{let Me=I.style.light,ze=Me.properties.get("position"),ht=[ze.x,ze.y,ze.z],wt=function(){var $t=new t.A(9);return t.A!=Float32Array&&($t[1]=0,$t[2]=0,$t[3]=0,$t[5]=0,$t[6]=0,$t[7]=0),$t[0]=1,$t[4]=1,$t[8]=1,$t}();Me.properties.get("anchor")==="viewport"&&function($t,Tr){var Ar=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Ar,$t[2]=0,$t[3]=-Ar,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Ar){var Kr=Tr[0],na=Tr[1],Ve=Tr[2];$t[0]=Kr*Ar[0]+na*Ar[3]+Ve*Ar[6],$t[1]=Kr*Ar[1]+na*Ar[4]+Ve*Ar[7],$t[2]=Kr*Ar[2]+na*Ar[5]+Ve*Ar[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Fe,u_lightpos:ht,u_lightintensity:Me.properties.get("intensity"),u_lightcolor:[Ot.r,Ot.g,Ot.b],u_vertical_gradient:+ie,u_opacity:Te}},la=(Fe,I,ie,Te,Me,ze,ht)=>t.e(ma(Fe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),_a=Fe=>({u_matrix:Fe}),Ai=(Fe,I,ie,Te)=>t.e(_a(Fe),Pa(ie,I,Te)),ki=(Fe,I)=>({u_matrix:Fe,u_world:I}),Ki=(Fe,I,ie,Te,Me)=>t.e(Ai(Fe,I,ie,Te),{u_world:Me}),yn=(Fe,I,ie,Te)=>{let Me=Fe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Oa(ie,1,Me.zoom);ze=!0,ht=[wt,wt]}else ze=!1,ht=Me.pixelsToGLUnits;return{u_camera_to_center_distance:Me.cameraToCenterDistance,u_scale_with_map:+(Te.paint.get("circle-pitch-scale")==="map"),u_matrix:Fe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Fe.pixelRatio,u_extrude_scale:ht}},Ln=(Fe,I,ie)=>({u_matrix:Fe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),kn=(Fe,I,ie=1)=>({u_matrix:Fe,u_color:I,u_overlay:0,u_overlay_scale:ie}),Bn=Fe=>({u_matrix:Fe}),ao=(Fe,I,ie,Te)=>({u_matrix:Fe,u_extrude_scale:Oa(I,1,ie),u_intensity:Te}),xo=(Fe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Fe.width,Fe.height,0,0,1);let ze=Fe.context.gl;return{u_matrix:Me,u_world:[ze.drawingBufferWidth,ze.drawingBufferHeight],u_image:ie,u_color_ramp:Te,u_opacity:I.paint.get("heatmap-opacity")}};function Co(Fe,I){let ie=Math.pow(2,I.canonical.z),Te=I.canonical.y;return[new t.Z(0,Te/ie).toLngLat().lat,new t.Z(0,(Te+1)/ie).toLngLat().lat]}let Fs=(Fe,I,ie,Te)=>{let Me=Fe.transform;return{u_matrix:is(Fe,I,ie,Te),u_ratio:1/Oa(I,1,Me.zoom),u_device_pixel_ratio:Fe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},Mn=(Fe,I,ie,Te,Me)=>t.e(Fs(Fe,I,ie,Me),{u_image:0,u_image_height:Te}),Ao=(Fe,I,ie,Te,Me)=>{let ze=Fe.transform,ht=ts(I,ze);return{u_matrix:is(Fe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Oa(I,1,ze.zoom),u_device_pixel_ratio:Fe.pixelRatio,u_image:0,u_scale:[ht,Te.fromScale,Te.toScale],u_fade:Te.t,u_units_to_pixels:[1/ze.pixelsToGLUnits[0],1/ze.pixelsToGLUnits[1]]}},On=(Fe,I,ie,Te,Me,ze)=>{let ht=Fe.lineAtlas,wt=ts(I,Fe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Ar=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(Fs(Fe,I,ie,ze),{u_patternscale_a:[wt/Ar,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Ar,Kr)*Fe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function ts(Fe,I){return 1/Oa(Fe,1,I.tileZoom)}function is(Fe,I,ie,Te){return Fe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let _s=(Fe,I,ie,Te,Me)=>{return{u_matrix:Fe,u_tl_parent:I,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:Te.mix,u_opacity:Te.opacity*Me.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Me.paint.get("raster-brightness-min"),u_brightness_high:Me.paint.get("raster-brightness-max"),u_saturation_factor:(ht=Me.paint.get("raster-saturation"),ht>0?1-1/(1.001-ht):-ht),u_contrast_factor:(ze=Me.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:Oo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function Oo(Fe){Fe*=Math.PI/180;let I=Math.sin(Fe),ie=Math.cos(Fe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let io=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na)=>{let Ve=ht.transform;return{u_is_size_zoom_constant:+(Fe==="constant"||Fe==="source"),u_is_size_feature_constant:+(Fe==="constant"||Fe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:Ve.cameraToCenterDistance,u_pitch:Ve.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:Ve.width/Ve.height,u_fade_change:ht.options.fadeDuration?ht.symbolFadeChange:1,u_matrix:wt,u_label_plane_matrix:Ot,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+Te,u_is_along_line:Me,u_is_variable_anchor:ze,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},Gn=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve)=>{let $e=ht.transform;return t.e(io(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,Ve),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},eo=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na)=>t.e(Gn(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Ar,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ns=(Fe,I,ie)=>({u_matrix:Fe,u_opacity:I,u_color:ie}),gs=(Fe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Ar=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),Ve=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/Ve,ot=$e*($t.tileID.canonical.x+$t.tileID.wrap*Ve),pt=$e*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Ar.tl,u_pattern_br_b:Ar.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Oa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[ot>>16,pt>>16],u_pixel_coord_lower:[65535&ot,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Fe,u_opacity:I}),Ls={fillExtrusion:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_lightpos:new t.aN(Fe,I.u_lightpos),u_lightintensity:new t.aI(Fe,I.u_lightintensity),u_lightcolor:new t.aN(Fe,I.u_lightcolor),u_vertical_gradient:new t.aI(Fe,I.u_vertical_gradient),u_opacity:new t.aI(Fe,I.u_opacity)}),fillExtrusionPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_lightpos:new t.aN(Fe,I.u_lightpos),u_lightintensity:new t.aI(Fe,I.u_lightintensity),u_lightcolor:new t.aN(Fe,I.u_lightcolor),u_vertical_gradient:new t.aI(Fe,I.u_vertical_gradient),u_height_factor:new t.aI(Fe,I.u_height_factor),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade),u_opacity:new t.aI(Fe,I.u_opacity)}),fill:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix)}),fillPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),fillOutline:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world)}),fillOutlinePattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),circle:(Fe,I)=>({u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Fe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Fe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Fe,I.u_matrix)}),collisionBox:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Fe,I.u_pixel_extrude_scale)}),collisionCircle:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_inv_matrix:new t.aJ(Fe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Fe,I.u_viewport_size)}),debug:(Fe,I)=>({u_color:new t.aL(Fe,I.u_color),u_matrix:new t.aJ(Fe,I.u_matrix),u_overlay:new t.aH(Fe,I.u_overlay),u_overlay_scale:new t.aI(Fe,I.u_overlay_scale)}),clippingMask:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix)}),heatmap:(Fe,I)=>({u_extrude_scale:new t.aI(Fe,I.u_extrude_scale),u_intensity:new t.aI(Fe,I.u_intensity),u_matrix:new t.aJ(Fe,I.u_matrix)}),heatmapTexture:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world),u_image:new t.aH(Fe,I.u_image),u_color_ramp:new t.aH(Fe,I.u_color_ramp),u_opacity:new t.aI(Fe,I.u_opacity)}),hillshade:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_latrange:new t.aO(Fe,I.u_latrange),u_light:new t.aO(Fe,I.u_light),u_shadow:new t.aL(Fe,I.u_shadow),u_highlight:new t.aL(Fe,I.u_highlight),u_accent:new t.aL(Fe,I.u_accent)}),hillshadePrepare:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_dimension:new t.aO(Fe,I.u_dimension),u_zoom:new t.aI(Fe,I.u_zoom),u_unpack:new t.aK(Fe,I.u_unpack)}),line:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels)}),lineGradient:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_image:new t.aH(Fe,I.u_image),u_image_height:new t.aI(Fe,I.u_image_height)}),linePattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texsize:new t.aO(Fe,I.u_texsize),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_image:new t.aH(Fe,I.u_image),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),lineSDF:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Fe,I.u_patternscale_a),u_patternscale_b:new t.aO(Fe,I.u_patternscale_b),u_sdfgamma:new t.aI(Fe,I.u_sdfgamma),u_image:new t.aH(Fe,I.u_image),u_tex_y_a:new t.aI(Fe,I.u_tex_y_a),u_tex_y_b:new t.aI(Fe,I.u_tex_y_b),u_mix:new t.aI(Fe,I.u_mix)}),raster:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_tl_parent:new t.aO(Fe,I.u_tl_parent),u_scale_parent:new t.aI(Fe,I.u_scale_parent),u_buffer_scale:new t.aI(Fe,I.u_buffer_scale),u_fade_t:new t.aI(Fe,I.u_fade_t),u_opacity:new t.aI(Fe,I.u_opacity),u_image0:new t.aH(Fe,I.u_image0),u_image1:new t.aH(Fe,I.u_image1),u_brightness_low:new t.aI(Fe,I.u_brightness_low),u_brightness_high:new t.aI(Fe,I.u_brightness_high),u_saturation_factor:new t.aI(Fe,I.u_saturation_factor),u_contrast_factor:new t.aI(Fe,I.u_contrast_factor),u_spin_weights:new t.aN(Fe,I.u_spin_weights)}),symbolIcon:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texture:new t.aH(Fe,I.u_texture),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),symbolSDF:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texture:new t.aH(Fe,I.u_texture),u_gamma_scale:new t.aI(Fe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Fe,I.u_is_halo),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),symbolTextAndIcon:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texsize_icon:new t.aO(Fe,I.u_texsize_icon),u_texture:new t.aH(Fe,I.u_texture),u_texture_icon:new t.aH(Fe,I.u_texture_icon),u_gamma_scale:new t.aI(Fe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Fe,I.u_is_halo),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),background:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_opacity:new t.aI(Fe,I.u_opacity),u_color:new t.aL(Fe,I.u_color)}),backgroundPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_opacity:new t.aI(Fe,I.u_opacity),u_image:new t.aH(Fe,I.u_image),u_pattern_tl_a:new t.aO(Fe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Fe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Fe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Fe,I.u_pattern_br_b),u_texsize:new t.aO(Fe,I.u_texsize),u_mix:new t.aI(Fe,I.u_mix),u_pattern_size_a:new t.aO(Fe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Fe,I.u_pattern_size_b),u_scale_a:new t.aI(Fe,I.u_scale_a),u_scale_b:new t.aI(Fe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Fe,I.u_tile_units_to_pixels)}),terrain:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texture:new t.aH(Fe,I.u_texture),u_ele_delta:new t.aI(Fe,I.u_ele_delta),u_fog_matrix:new t.aJ(Fe,I.u_fog_matrix),u_fog_color:new t.aL(Fe,I.u_fog_color),u_fog_ground_blend:new t.aI(Fe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Fe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Fe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Fe,I.u_horizon_fog_blend)}),terrainDepth:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ele_delta:new t.aI(Fe,I.u_ele_delta)}),terrainCoords:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texture:new t.aH(Fe,I.u_texture),u_terrain_coords_id:new t.aI(Fe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Fe,I.u_ele_delta)}),sky:(Fe,I)=>({u_sky_color:new t.aL(Fe,I.u_sky_color),u_horizon_color:new t.aL(Fe,I.u_horizon_color),u_horizon:new t.aI(Fe,I.u_horizon),u_sky_horizon_blend:new t.aI(Fe,I.u_sky_horizon_blend)})};class Xo{constructor(I,ie,Te){this.context=I;let Me=I.gl;this.buffer=Me.createBuffer(),this.dynamicDraw=!!Te,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Me.bufferData(Me.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Me.DYNAMIC_DRAW:Me.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ie=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ie.bufferSubData(ie.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Gi={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pn{constructor(I,ie,Te,Me){this.length=ie.length,this.attributes=Te,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Me,this.context=I;let ze=I.gl;this.buffer=ze.createBuffer(),I.bindVertexBuffer.set(this.buffer),ze.bufferData(ze.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?ze.DYNAMIC_DRAW:ze.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ie=this.context.gl;this.bind(),ie.bufferSubData(ie.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ie){for(let Te=0;Te<this.attributes.length;Te++){let Me=ie.attributes[this.attributes[Te].name];Me!==void 0&&I.enableVertexAttribArray(Me)}}setVertexAttribPointers(I,ie,Te){for(let Me=0;Me<this.attributes.length;Me++){let ze=this.attributes[Me],ht=ie.attributes[ze.name];ht!==void 0&&I.vertexAttribPointer(ht,ze.components,I[Gi[ze.type]],!1,this.itemSize,ze.offset+this.itemSize*(Te||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let js=new WeakMap;function xs(Fe){var I;if(js.has(Fe))return js.get(Fe);{let ie=(I=Fe.getParameter(Fe.VERSION))===null||I===void 0?void 0:I.startsWith("WebGL 2.0");return js.set(Fe,ie),ie}}class Hn{constructor(I){this.gl=I.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(I){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Os extends Hn{getDefault(){return t.aM.transparent}set(I){let ie=this.current;(I.r!==ie.r||I.g!==ie.g||I.b!==ie.b||I.a!==ie.a||this.dirty)&&(this.gl.clearColor(I.r,I.g,I.b,I.a),this.current=I,this.dirty=!1)}}class ds extends Hn{getDefault(){return 1}set(I){(I!==this.current||this.dirty)&&(this.gl.clearDepth(I),this.current=I,this.dirty=!1)}}class Xs extends Hn{getDefault(){return 0}set(I){(I!==this.current||this.dirty)&&(this.gl.clearStencil(I),this.current=I,this.dirty=!1)}}class il extends Hn{getDefault(){return[!0,!0,!0,!0]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||I[3]!==ie[3]||this.dirty)&&(this.gl.colorMask(I[0],I[1],I[2],I[3]),this.current=I,this.dirty=!1)}}class _n extends Hn{getDefault(){return!0}set(I){(I!==this.current||this.dirty)&&(this.gl.depthMask(I),this.current=I,this.dirty=!1)}}class Lo extends Hn{getDefault(){return 255}set(I){(I!==this.current||this.dirty)&&(this.gl.stencilMask(I),this.current=I,this.dirty=!1)}}class bo extends Hn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(I){let ie=this.current;(I.func!==ie.func||I.ref!==ie.ref||I.mask!==ie.mask||this.dirty)&&(this.gl.stencilFunc(I.func,I.ref,I.mask),this.current=I,this.dirty=!1)}}class Rs extends Hn{getDefault(){let I=this.gl;return[I.KEEP,I.KEEP,I.KEEP]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||this.dirty)&&(this.gl.stencilOp(I[0],I[1],I[2]),this.current=I,this.dirty=!1)}}class pu extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.STENCIL_TEST):ie.disable(ie.STENCIL_TEST),this.current=I,this.dirty=!1}}class uo extends Hn{getDefault(){return[0,1]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||this.dirty)&&(this.gl.depthRange(I[0],I[1]),this.current=I,this.dirty=!1)}}class Gs extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.DEPTH_TEST):ie.disable(ie.DEPTH_TEST),this.current=I,this.dirty=!1}}class vl extends Hn{getDefault(){return this.gl.LESS}set(I){(I!==this.current||this.dirty)&&(this.gl.depthFunc(I),this.current=I,this.dirty=!1)}}class As extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.BLEND):ie.disable(ie.BLEND),this.current=I,this.dirty=!1}}class qs extends Hn{getDefault(){let I=this.gl;return[I.ONE,I.ZERO]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||this.dirty)&&(this.gl.blendFunc(I[0],I[1]),this.current=I,this.dirty=!1)}}class us extends Hn{getDefault(){return t.aM.transparent}set(I){let ie=this.current;(I.r!==ie.r||I.g!==ie.g||I.b!==ie.b||I.a!==ie.a||this.dirty)&&(this.gl.blendColor(I.r,I.g,I.b,I.a),this.current=I,this.dirty=!1)}}class Ss extends Hn{getDefault(){return this.gl.FUNC_ADD}set(I){(I!==this.current||this.dirty)&&(this.gl.blendEquation(I),this.current=I,this.dirty=!1)}}class Nl extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;I?ie.enable(ie.CULL_FACE):ie.disable(ie.CULL_FACE),this.current=I,this.dirty=!1}}class su extends Hn{getDefault(){return this.gl.BACK}set(I){(I!==this.current||this.dirty)&&(this.gl.cullFace(I),this.current=I,this.dirty=!1)}}class Tc extends Hn{getDefault(){return this.gl.CCW}set(I){(I!==this.current||this.dirty)&&(this.gl.frontFace(I),this.current=I,this.dirty=!1)}}class du extends Hn{getDefault(){return null}set(I){(I!==this.current||this.dirty)&&(this.gl.useProgram(I),this.current=I,this.dirty=!1)}}class Sf extends Hn{getDefault(){return this.gl.TEXTURE0}set(I){(I!==this.current||this.dirty)&&(this.gl.activeTexture(I),this.current=I,this.dirty=!1)}}class Uc extends Hn{getDefault(){let I=this.gl;return[0,0,I.drawingBufferWidth,I.drawingBufferHeight]}set(I){let ie=this.current;(I[0]!==ie[0]||I[1]!==ie[1]||I[2]!==ie[2]||I[3]!==ie[3]||this.dirty)&&(this.gl.viewport(I[0],I[1],I[2],I[3]),this.current=I,this.dirty=!1)}}class Bs extends Hn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindFramebuffer(ie.FRAMEBUFFER,I),this.current=I,this.dirty=!1}}class dc extends Hn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindRenderbuffer(ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class Hc extends Hn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindTexture(ie.TEXTURE_2D,I),this.current=I,this.dirty=!1}}class lu extends Hn{getDefault(){return null}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.bindBuffer(ie.ARRAY_BUFFER,I),this.current=I,this.dirty=!1}}class Pl extends Hn{getDefault(){return null}set(I){let ie=this.gl;ie.bindBuffer(ie.ELEMENT_ARRAY_BUFFER,I),this.current=I,this.dirty=!1}}class ic extends Hn{getDefault(){return null}set(I){var ie;if(I===this.current&&!this.dirty)return;let Te=this.gl;xs(Te)?Te.bindVertexArray(I):(ie=Te.getExtension("OES_vertex_array_object"))===null||ie===void 0||ie.bindVertexArrayOES(I),this.current=I,this.dirty=!1}}class Ou extends Hn{getDefault(){return 4}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_ALIGNMENT,I),this.current=I,this.dirty=!1}}class nl extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I),this.current=I,this.dirty=!1}}class ml extends Hn{getDefault(){return!1}set(I){if(I===this.current&&!this.dirty)return;let ie=this.gl;ie.pixelStorei(ie.UNPACK_FLIP_Y_WEBGL,I),this.current=I,this.dirty=!1}}class bs extends Hn{constructor(I,ie){super(I),this.context=I,this.parent=ie}getDefault(){return null}}class Zs extends bs{setDirty(){this.dirty=!0}set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferTexture2D(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,I,0),this.current=I,this.dirty=!1}}class nc extends bs{set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferRenderbuffer(ie.FRAMEBUFFER,ie.DEPTH_ATTACHMENT,ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class Ul extends bs{set(I){if(I===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ie=this.gl;ie.framebufferRenderbuffer(ie.FRAMEBUFFER,ie.DEPTH_STENCIL_ATTACHMENT,ie.RENDERBUFFER,I),this.current=I,this.dirty=!1}}class qu{constructor(I,ie,Te,Me,ze){this.context=I,this.width=ie,this.height=Te;let ht=I.gl,wt=this.framebuffer=ht.createFramebuffer();if(this.colorAttachment=new Zs(I,wt),Me)this.depthAttachment=ze?new Ul(I,wt):new nc(I,wt);else if(ze)throw new Error("Stencil cannot be set without depth");if(ht.checkFramebufferStatus(ht.FRAMEBUFFER)!==ht.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){let I=this.context.gl,ie=this.colorAttachment.get();if(ie&&I.deleteTexture(ie),this.depthAttachment){let Te=this.depthAttachment.get();Te&&I.deleteRenderbuffer(Te)}I.deleteFramebuffer(this.framebuffer)}}class fl{constructor(I,ie,Te){this.blendFunction=I,this.blendColor=ie,this.mask=Te}}fl.Replace=[1,0],fl.disabled=new fl(fl.Replace,t.aM.transparent,[!1,!1,!1,!1]),fl.unblended=new fl(fl.Replace,t.aM.transparent,[!0,!0,!0,!0]),fl.alphaBlended=new fl([1,771],t.aM.transparent,[!0,!0,!0,!0]);class xh{constructor(I){var ie,Te;if(this.gl=I,this.clearColor=new Os(this),this.clearDepth=new ds(this),this.clearStencil=new Xs(this),this.colorMask=new il(this),this.depthMask=new _n(this),this.stencilMask=new Lo(this),this.stencilFunc=new bo(this),this.stencilOp=new Rs(this),this.stencilTest=new pu(this),this.depthRange=new uo(this),this.depthTest=new Gs(this),this.depthFunc=new vl(this),this.blend=new As(this),this.blendFunc=new qs(this),this.blendColor=new us(this),this.blendEquation=new Ss(this),this.cullFace=new Nl(this),this.cullFaceSide=new su(this),this.frontFace=new Tc(this),this.program=new du(this),this.activeTexture=new Sf(this),this.viewport=new Uc(this),this.bindFramebuffer=new Bs(this),this.bindRenderbuffer=new dc(this),this.bindTexture=new Hc(this),this.bindVertexBuffer=new lu(this),this.bindElementBuffer=new Pl(this),this.bindVertexArray=new ic(this),this.pixelStoreUnpack=new Ou(this),this.pixelStoreUnpackPremultiplyAlpha=new nl(this),this.pixelStoreUnpackFlipY=new ml(this),this.extTextureFilterAnisotropic=I.getExtension("EXT_texture_filter_anisotropic")||I.getExtension("MOZ_EXT_texture_filter_anisotropic")||I.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=I.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=I.getParameter(I.MAX_TEXTURE_SIZE),xs(I)){this.HALF_FLOAT=I.HALF_FLOAT;let Me=I.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ie=I.RGBA16F)!==null&&ie!==void 0?ie:Me?.RGBA16F_EXT,this.RGB16F=(Te=I.RGB16F)!==null&&Te!==void 0?Te:Me?.RGB16F_EXT,I.getExtension("EXT_color_buffer_float")}else{I.getExtension("EXT_color_buffer_half_float"),I.getExtension("OES_texture_half_float_linear");let Me=I.getExtension("OES_texture_half_float");this.HALF_FLOAT=Me?.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(I,ie){return new Xo(this,I,ie)}createVertexBuffer(I,ie,Te){return new Pn(this,I,ie,Te)}createRenderbuffer(I,ie,Te){let Me=this.gl,ze=Me.createRenderbuffer();return this.bindRenderbuffer.set(ze),Me.renderbufferStorage(Me.RENDERBUFFER,I,ie,Te),this.bindRenderbuffer.set(null),ze}createFramebuffer(I,ie,Te,Me){return new qu(this,I,ie,Te,Me)}clear({color:I,depth:ie,stencil:Te}){let Me=this.gl,ze=0;I&&(ze|=Me.COLOR_BUFFER_BIT,this.clearColor.set(I),this.colorMask.set([!0,!0,!0,!0])),ie!==void 0&&(ze|=Me.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ie),this.depthMask.set(!0)),Te!==void 0&&(ze|=Me.STENCIL_BUFFER_BIT,this.clearStencil.set(Te),this.stencilMask.set(255)),Me.clear(ze)}setCullFace(I){I.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(I.mode),this.frontFace.set(I.frontFace))}setDepthMode(I){I.func!==this.gl.ALWAYS||I.mask?(this.depthTest.set(!0),this.depthFunc.set(I.func),this.depthMask.set(I.mask),this.depthRange.set(I.range)):this.depthTest.set(!1)}setStencilMode(I){I.test.func!==this.gl.ALWAYS||I.mask?(this.stencilTest.set(!0),this.stencilMask.set(I.mask),this.stencilOp.set([I.fail,I.depthFail,I.pass]),this.stencilFunc.set({func:I.test.func,ref:I.ref,mask:I.test.mask})):this.stencilTest.set(!1)}setColorMode(I){t.aE(I.blendFunction,fl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(I.blendFunction),this.blendColor.set(I.blendColor)),this.colorMask.set(I.mask)}createVertexArray(){var I;return xs(this.gl)?this.gl.createVertexArray():(I=this.gl.getExtension("OES_vertex_array_object"))===null||I===void 0?void 0:I.createVertexArrayOES()}deleteVertexArray(I){var ie;return xs(this.gl)?this.gl.deleteVertexArray(I):(ie=this.gl.getExtension("OES_vertex_array_object"))===null||ie===void 0?void 0:ie.deleteVertexArrayOES(I)}unbindVAO(){this.bindVertexArray.set(null)}}class ss{constructor(I,ie,Te){this.func=I,this.mask=ie,this.range=Te}}ss.ReadOnly=!1,ss.ReadWrite=!0,ss.disabled=new ss(519,ss.ReadOnly,[0,1]);let bh=7680;class ks{constructor(I,ie,Te,Me,ze,ht){this.test=I,this.ref=ie,this.mask=Te,this.fail=Me,this.depthFail=ze,this.pass=ht}}ks.disabled=new ks({func:519,mask:0},0,0,bh,bh,bh);class to{constructor(I,ie,Te){this.enable=I,this.mode=ie,this.frontFace=Te}}let Wc;function Vu(Fe,I,ie,Te,Me){let ze=Fe.context,ht=ze.gl,wt=Fe.useProgram("collisionBox"),Ot=[],$t=0,Tr=0;for(let pt=0;pt<Te.length;pt++){let Et=Te[pt],bt=I.getTile(Et).getBucket(ie);if(!bt)continue;let Rt=Me?bt.textCollisionBox:bt.iconCollisionBox,lr=bt.collisionCircleArray;if(lr.length>0){let yr=t.H();t.aQ(yr,bt.placementInvProjMatrix,Fe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:lr,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=lr.length/4,Tr=$t}Rt&&wt.draw(ze,ht.LINES,ss.disabled,ks.disabled,Fe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Ar=Fe.transform).width,1/Ar.height]},Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(Et),ie.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,Fe.transform.zoom,null,null,Rt.collisionVertexBuffer)}var Ar;if(!Me||!Ot.length)return;let Kr=Fe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let Ve=0;for(let pt of Ot)for(let Et=0;Et<pt.circleArray.length/4;Et++){let bt=4*Et,Rt=pt.circleArray[bt+0],lr=pt.circleArray[bt+1],yr=pt.circleArray[bt+2],kr=pt.circleArray[bt+3];na.emplace(Ve++,Rt,lr,yr,kr,0),na.emplace(Ve++,Rt,lr,yr,kr,1),na.emplace(Ve++,Rt,lr,yr,kr,2),na.emplace(Ve++,Rt,lr,yr,kr,3)}(!Wc||Wc.length<2*$t)&&(Wc=function(pt){let Et=2*pt,bt=new t.aT;bt.resize(Et),bt._trim();for(let Rt=0;Rt<Et;Rt++){let lr=6*Rt;bt.uint16[lr+0]=4*Rt+0,bt.uint16[lr+1]=4*Rt+1,bt.uint16[lr+2]=4*Rt+2,bt.uint16[lr+3]=4*Rt+2,bt.uint16[lr+4]=4*Rt+3,bt.uint16[lr+5]=4*Rt+0}return bt}($t));let $e=ze.createIndexBuffer(Wc,!0),ot=ze.createVertexBuffer(na,t.aS.members,!0);for(let pt of Ot){let Et=Ln(pt.transform,pt.invTransform,Fe.transform);Kr.draw(ze,ht.TRIANGLES,ss.disabled,ks.disabled,Fe.colorModeForRenderPass(),to.disabled,Et,Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(pt.coord),ie.id,ot,$e,t.a0.simpleSegment(0,2*pt.circleOffset,pt.circleArray.length,pt.circleArray.length/2),null,Fe.transform.zoom,null,null,null)}ot.destroy(),$e.destroy()}to.disabled=new to(!1,1029,2305),to.backCCW=new to(!0,1029,2305);let jl=t.an(new Float32Array(16));function Mf(Fe,I,ie,Te,Me,ze){let{horizontalAlign:ht,verticalAlign:wt}=t.au(Fe);return new t.P((-(ht-.5)*I/Me+Te[0])*ze,(-(wt-.5)*ie/Me+Te[1])*ze)}function Ac(Fe,I,ie,Te,Me,ze){let ht=I.tileAnchorPoint.add(new t.P(I.translation[0],I.translation[1]));if(I.pitchWithMap){let wt=Te.mult(ze);ie||(wt=wt.rotate(-Me));let Ot=ht.add(wt);return _t(Ot.x,Ot.y,I.labelPlaneMatrix,I.getElevation).point}if(ie){let wt=Ut(I.tileAnchorPoint.x+1,I.tileAnchorPoint.y,I).point.sub(Fe),Ot=Math.atan(wt.y/wt.x)+(wt.x<0?Math.PI:0);return Fe.add(Te.rotate(Ot))}return Fe.add(Te)}function nf(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na){let Ve=Fe.text.placedSymbolArray,$e=Fe.text.dynamicLayoutVertexArray,ot=Fe.icon.dynamicLayoutVertexArray,pt={};$e.clear();for(let Et=0;Et<Ve.length;Et++){let bt=Ve.get(Et),Rt=bt.hidden||!bt.crossTileID||Fe.allowVerticalPlacement&&!bt.placedOrientation?null:Te[bt.crossTileID];if(Rt){let lr=new t.P(bt.anchorX,bt.anchorY),yr={getElevation:na,width:Me.width,height:Me.height,labelPlaneMatrix:ze,lineVertexArray:null,pitchWithMap:ie,projection:Tr,projectionCache:null,tileAnchorPoint:lr,translation:Ar,unwrappedTileID:Kr},kr=ie?_t(lr.x,lr.y,ht,na):Ut(lr.x,lr.y,yr),jr=Oe(Me.cameraToCenterDistance,kr.signedDistanceFromCamera),Qr=t.ai(Fe.textSizeData,Ot,bt)*jr/t.ap;ie&&(Qr*=Fe.tilePixelRatio/wt);let{width:ha,height:Aa,anchor:Da,textOffset:ci,textBoxScale:Vi}=Rt,ji=Mf(Da,ha,Aa,ci,Vi,Qr),on=Tr.getPitchedTextCorrection(Me,lr.add(new t.P(Ar[0],Ar[1])),Kr),An=Ac(kr.point,yr,I,ji,Me.angle,on),Yn=Fe.allowVerticalPlacement&&bt.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let Nn=0;Nn<bt.numGlyphs;Nn++)t.aj($e,An,Yn);$t&&bt.associatedIconIndex>=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:An,angle:Yn})}else ur(bt.numGlyphs,$e)}if($t){ot.clear();let Et=Fe.icon.placedSymbolArray;for(let bt=0;bt<Et.length;bt++){let Rt=Et.get(bt);if(Rt.hidden)ur(Rt.numGlyphs,ot);else{let lr=pt[bt];if(lr)for(let yr=0;yr<Rt.numGlyphs;yr++)t.aj(ot,lr.shiftedAnchor,lr.angle);else ur(Rt.numGlyphs,ot)}}Fe.icon.dynamicLayoutVertexBuffer.updateData(ot)}Fe.text.dynamicLayoutVertexBuffer.updateData($e)}function $l(Fe,I,ie){return ie.iconsInText&&I?"symbolTextAndIcon":Fe?"symbolSDF":"symbolIcon"}function Jf(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar){let Kr=Fe.context,na=Kr.gl,Ve=Fe.transform,$e=pi(),ot=wt==="map",pt=Ot==="map",Et=wt!=="viewport"&&ie.layout.get("symbol-placement")!=="point",bt=ot&&!pt&&!Et,Rt=!pt&&Et,lr=!ie.layout.get("symbol-sort-key").isConstant(),yr=!1,kr=Fe.depthModeForSublayer(0,ss.ReadOnly),jr=ie._unevaluatedLayout.hasValue("text-variable-anchor")||ie._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Qr=[],ha=$e.getCircleRadiusCorrection(Ve);for(let Aa of Te){let Da=I.getTile(Aa),ci=Da.getBucket(ie);if(!ci)continue;let Vi=Me?ci.text:ci.icon;if(!Vi||!Vi.segments.get().length||!Vi.hasVisibleVertices)continue;let ji=Vi.programConfigurations.get(ie.id),on=Me||ci.sdfIcons,An=Me?ci.textSizeData:ci.iconSizeData,Yn=pt||Ve.pitch!==0,Nn=Fe.useProgram($l(on,Me,ci),ji),wo=t.ag(An,Ve.zoom),os=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(Aa),So,Zo,hs,ul,tl=[0,0],Jo=null;if(Me)Zo=Da.glyphAtlasTexture,hs=na.LINEAR,So=Da.glyphAtlasTexture.size,ci.iconsInText&&(tl=Da.imageAtlasTexture.size,Jo=Da.imageAtlasTexture,ul=Yn||Fe.options.rotating||Fe.options.zooming||An.kind==="composite"||An.kind==="camera"?na.LINEAR:na.NEAREST);else{let Tt=ie.layout.get("icon-size").constantOr(0)!==1||ci.iconsNeedLinear;Zo=Da.imageAtlasTexture,hs=on||Fe.options.rotating||Fe.options.zooming||Tt||Yn?na.LINEAR:na.NEAREST,So=Da.imageAtlasTexture.size}let $o=Oa(Da,1,Fe.transform.zoom),Il=Rt?Aa.posMatrix:jl,eu=Er(Il,pt,ot,Fe.transform,$o),Ru=Ir(Il,pt,ot,Fe.transform,$o),vu=Ir(Aa.posMatrix,pt,ot,Fe.transform,$o),Tl=$e.translatePosition(Fe.transform,Da,ze,ht),cu=jr&&ci.hasTextData(),uc=ie.layout.get("icon-text-fit")!=="none"&&cu&&ci.hasIconData();if(Et){let Tt=Fe.style.map.terrain?(zt,_r)=>Fe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Fe,Me,eu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),Ve.width,Ve.height,Tl,Tt)}let Vl=Aa.posMatrix,Gl=Me&&jr||uc,me=Et||Gl?jl:eu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?eo(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,So,tl,ha):Gn(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,Me,So,!0,ha):io(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,Me,So,ha);let yt={program:Nn,buffers:Vi,uniformValues:dt,atlasTexture:Zo,atlasTextureIcon:Jo,atlasInterpolation:hs,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(lr&&ci.canOverlap){yr=!0;let Tt=Vi.segments.get();for(let tr of Tt)Qr.push({segments:new t.a0([tr]),sortKey:tr.sortKey,state:yt,terrainData:os})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:os})}yr&&Qr.sort((Aa,Da)=>Aa.sortKey-Da.sortKey);for(let Aa of Qr){let Da=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),Da.atlasTexture.bind(Da.atlasInterpolation,na.CLAMP_TO_EDGE),Da.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),Da.atlasTextureIcon&&Da.atlasTextureIcon.bind(Da.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),Da.isSDF){let ci=Da.uniformValues;Da.hasHalo&&(ci.u_is_halo=1,Of(Da.buffers,Aa.segments,ie,Fe,Da.program,kr,Tr,Ar,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Fe,Da.program,kr,Tr,Ar,Da.uniformValues,Aa.terrainData)}}function Of(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t){let Tr=Te.context;Me.draw(Tr,Tr.gl.TRIANGLES,ze,ht,wt,to.disabled,Ot,$t,ie.id,Fe.layoutVertexBuffer,Fe.indexBuffer,I,ie.paint,Te.transform.zoom,Fe.programConfigurations.get(ie.id),Fe.dynamicLayoutVertexBuffer,Fe.opacityVertexBuffer)}function of(Fe,I,ie,Te){let Me=Fe.context,ze=Me.gl,ht=ks.disabled,wt=new fl([ze.ONE,ze.ONE],t.aM.transparent,[!0,!0,!0,!0]),Ot=I.getBucket(ie);if(!Ot)return;let $t=Te.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Me,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Me.bindFramebuffer.set(Tr.framebuffer),Me.viewport.set([0,0,I.tileSize,I.tileSize]),Me.clear({color:t.aM.transparent});let Ar=Ot.programConfigurations.get(ie.id),Kr=Fe.useProgram("heatmap",Ar),na=Fe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,ss.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Fe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Fe.transform.zoom,Ar)}function jc(Fe,I,ie){let Te=Fe.context,Me=Te.gl;Te.setColorMode(Fe.colorModeForRenderPass());let ze=Nf(Te,I),ht=ie.key,wt=I.heatmapFbos.get(ht);wt&&(Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,wt.colorAttachment.get()),Te.activeTexture.set(Me.TEXTURE1),ze.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),Fe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,ss.disabled,ks.disabled,Fe.colorModeForRenderPass(),to.disabled,xo(Fe,I,0,1),null,I.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments,I.paint,Fe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Fe,I,ie){var Te,Me;let ze=Fe.gl,ht=ze.createTexture();ze.bindTexture(ze.TEXTURE_2D,ht),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,ze.LINEAR),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,ze.LINEAR);let wt=(Te=Fe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Fe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Fe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Fe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Fe,I.colorRamp,Fe.gl.RGBA)),I.colorRampTexture}function Gu(Fe,I,ie,Te,Me){if(!ie||!Te||!Te.imageAtlas)return;let ze=Te.imageAtlas.patternPositions,ht=ze[ie.to.toString()],wt=ze[ie.from.toString()];if(!ht&&wt&&(ht=wt),!wt&&ht&&(wt=ht),!ht||!wt){let Ot=Me.getPaintProperty(I);ht=ze[Ot],wt=ze[Ot]}ht&&wt&&Fe.setConstantPatternPositions(ht,wt)}function Ef(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Ar=ie.getCrossfadeParameters(),Kr,na,Ve,$e,ot;ht?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=wt.LINES):(na=Tr?"fillPattern":"fill",Kr=wt.TRIANGLES);let pt=$t.constantOr(null);for(let Et of Te){let bt=I.getTile(Et);if(Tr&&!bt.patternsLoaded())continue;let Rt=bt.getBucket(ie);if(!Rt)continue;let lr=Rt.programConfigurations.get(ie.id),yr=Fe.useProgram(na,lr),kr=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(Et);Tr&&(Fe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),lr.updatePaintBuffers(Ar)),Gu(lr,Ot,pt,bt,ie);let jr=kr?Et:null,Qr=Fe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Rt.indexBuffer2,ot=Rt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];Ve=na==="fillOutlinePattern"&&Tr?Ki(Qr,Fe,Ar,bt,ha):ki(Qr,ha)}else $e=Rt.indexBuffer,ot=Rt.segments,Ve=Tr?Ai(Qr,Fe,Ar,bt):_a(Qr);yr.draw(Fe.context,Kr,Me,Fe.stencilModeForClipping(Et),ze,to.disabled,Ve,kr,ie.id,Rt.layoutVertexBuffer,$e,ot,ie.paint,Fe.transform.zoom,lr)}}function oc(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Ar=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),Ve=Tr.constantOr(null);for(let $e of Te){let ot=I.getTile($e),pt=ot.getBucket(ie);if(!pt)continue;let Et=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Rt=Fe.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",bt);Ar&&(Fe.context.activeTexture.set(Ot.TEXTURE0),ot.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,Ve,ot,ie);let lr=Fe.translatePosMatrix($e.posMatrix,ot,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),kr=Ar?la(lr,Fe,yr,na,$e,Kr,ot):ma(lr,Fe,yr,na);Rt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,kr,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Fe.transform.zoom,bt,Fe.style.map.terrain&&pt.centroidVertexBuffer)}}function Xc(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Fe.useProgram("hillshade"),Ar=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(I);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(wt,Ot.TRIANGLES,Me,ze,ht,to.disabled,((Kr,na,Ve,$e)=>{let ot=Ve.paint.get("hillshade-shadow-color"),pt=Ve.paint.get("hillshade-highlight-color"),Et=Ve.paint.get("hillshade-accent-color"),bt=Ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);Ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Rt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Rt),u_image:0,u_latrange:Co(0,na.tileID),u_light:[Ve.paint.get("hillshade-exaggeration"),bt],u_shadow:ot,u_highlight:pt,u_accent:Et}})(Fe,ie,Te,Ar?I:null),Ar,Te.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments)}function Ql(Fe,I,ie,Te,Me,ze){let ht=Fe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Ar=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Fe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Ar,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Ar,wt.RGBA,{premultiply:!1}),I.demTexture.bind(wt.NEAREST,wt.CLAMP_TO_EDGE);ht.activeTexture.set(wt.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(ht,{width:$t,height:$t,data:null},wt.RGBA);na.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),Kr=I.fbo=ht.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}ht.bindFramebuffer.set(Kr.framebuffer),ht.viewport.set([0,0,$t,$t]),Fe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,Ve)=>{let $e=Ve.stride,ot=t.H();return t.aP(ot,0,t.X,-t.X,0,0,1),t.J(ot,ot,[0,-t.X,0]),{u_matrix:ot,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:Ve.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Fe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=n.now(),Ot=(wt-Fe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Ar=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Ar)>Math.abs(Fe.tileID.overscaledZ-Ar),na=Kr&&Fe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Fe.refreshedUponExpiration&&Ot>=1&&(Fe.refreshedUponExpiration=!1),I?{opacity:1,mix:1-na}:{opacity:na,mix:0}}return{opacity:1,mix:0}}let Sc=new t.aM(1,0,0,1),Ys=new t.aM(0,1,0,1),kf=new t.aM(0,0,1,1),fh=new t.aM(1,0,1,1),Uf=new t.aM(0,1,1,1);function Zc(Fe,I,ie,Te){Cu(Fe,0,I+ie/2,Fe.transform.width,ie,Te)}function $f(Fe,I,ie,Te){Cu(Fe,I-ie/2,0,ie,Fe.transform.height,Te)}function Cu(Fe,I,ie,Te,Me,ze){let ht=Fe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Fe.pixelRatio,ie*Fe.pixelRatio,Te*Fe.pixelRatio,Me*Fe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Fe,I,ie){let Te=Fe.context,Me=Te.gl,ze=ie.posMatrix,ht=Fe.useProgram("debug"),wt=ss.disabled,Ot=ks.disabled,$t=Fe.colorModeForRenderPass(),Tr="$debug",Ar=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(ie);Te.activeTexture.set(Me.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),Ve=I.getTile(ie).tileSize,$e=512/Math.min(Ve,512)*(ie.overscaledZ/Fe.transform.zoom)*.5,ot=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(ot+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Rt=pt.context.gl,lr=pt.debugOverlayCanvas.getContext("2d");lr.clearRect(0,0,bt.width,bt.height),lr.shadowColor="white",lr.shadowBlur=2,lr.lineWidth=1.5,lr.strokeStyle="white",lr.textBaseline="top",lr.font="bold 36px Open Sans, sans-serif",lr.fillText(Et,5,5),lr.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Rt.LINEAR,Rt.CLAMP_TO_EDGE)}(Fe,`${ot} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,kn(ze,t.aM.transparent,$e),null,Tr,Fe.debugBuffer,Fe.quadTriangleIndexBuffer,Fe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,kn(ze,t.aM.red),Ar,Tr,Fe.debugBuffer,Fe.tileBorderIndexBuffer,Fe.debugSegments)}function yl(Fe,I,ie){let Te=Fe.context,Me=Te.gl,ze=Fe.colorModeForRenderPass(),ht=new ss(Me.LEQUAL,ss.ReadWrite,Fe.depthRangeFor3D),wt=Fe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Fe.width,Fe.height]);for(let $t of ie){let Tr=Fe.renderToTexture.getTexture($t),Ar=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Fe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Fe.transform.zoom),Ve=Fe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=vr(Kr,na,Ve,Fe.style.sky,Fe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,ks.disabled,ze,to.backCCW,$e,Ar,"terrain",Ot.vertexBuffer,Ot.indexBuffer,Ot.segments)}}class Lu{constructor(I,ie,Te){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=Te}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Mc{constructor(I,ie){this.context=new xh(I),this.transform=ie,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Br}resize(I,ie,Te){if(this.width=Math.floor(I*Te),this.height=Math.floor(ie*Te),this.pixelRatio=Te,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Me of this.style._order)this.style._layers[Me].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Ur.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let Te=new t.aX;Te.emplaceBack(0,0),Te.emplaceBack(t.X,0),Te.emplaceBack(0,t.X),Te.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(Te,Ur.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Me=new t.$;Me.emplaceBack(0,0,0,0),Me.emplaceBack(t.X,0,t.X,0),Me.emplaceBack(0,t.X,0,t.X),Me.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Me,We.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let ze=new t.aX;ze.emplaceBack(0,0),ze.emplaceBack(1,0),ze.emplaceBack(0,1),ze.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(ze,Ur.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let ht=new t.aZ;ht.emplaceBack(0),ht.emplaceBack(1),ht.emplaceBack(3),ht.emplaceBack(2),ht.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ht);let wt=new t.aY;wt.emplaceBack(0,1,2),wt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(wt);let Ot=this.context.gl;this.stencilClearMode=new ks({func:Ot.ALWAYS,mask:0},0,255,Ot.ZERO,Ot.ZERO,Ot.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Te=t.H();t.aP(Te,0,this.width,this.height,0,0,1),t.K(Te,Te,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,ss.disabled,this.stencilClearMode,fl.disabled,to.disabled,Bn(Te),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ie){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ie||!ie.length)return;this.currentStencilSource=I.source;let Te=this.context,Me=Te.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),Te.setColorMode(fl.disabled),Te.setDepthMode(ss.disabled);let ze=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ht of ie){let wt=this._tileClippingMaskIDs[ht.key]=this.nextStencilID++,Ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ht);ze.draw(Te,Me.TRIANGLES,ss.disabled,new ks({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,Bn(ht.posMatrix),Ot,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ie=this.context.gl;return new ks({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new ks({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,Te=I.sort((ht,wt)=>wt.overscaledZ-ht.overscaledZ),Me=Te[Te.length-1].overscaledZ,ze=Te[0].overscaledZ-Me+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();let ht={};for(let wt=0;wt<ze;wt++)ht[wt+Me]=new ks({func:ie.GEQUAL,mask:255},wt+this.nextStencilID,255,ie.KEEP,ie.KEEP,ie.REPLACE);return this.nextStencilID+=ze,[ht,Te]}return[{[Me]:ks.disabled},Te]}colorModeForRenderPass(){let I=this.context.gl;return this._showOverdrawInspector?new fl([I.CONSTANT_COLOR,I.ONE],new t.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?fl.unblended:fl.alphaBlended}depthModeForSublayer(I,ie,Te){if(!this.opaquePassEnabledForLayer())return ss.disabled;let Me=1-((1+this.currentLayer)*this.numSublayers+I)*this.depthEpsilon;return new ss(Te||this.context.gl.LEQUAL,ie,[Me,Me])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(I,ie){this.style=I,this.options=ie,this.lineAtlas=I.lineAtlas,this.imageManager=I.imageManager,this.glyphManager=I.glyphManager,this.symbolFadeChange=I.placement.symbolFadeChange(n.now()),this.imageManager.beginFrame();let Te=this.style._order,Me=this.style.sourceCaches,ze={},ht={},wt={};for(let Ot in Me){let $t=Me[Ot];$t.used&&$t.prepare(this.context),ze[Ot]=$t.getVisibleCoordinates(),ht[Ot]=ze[Ot].slice().reverse(),wt[Ot]=$t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ot=0;Ot<Te.length;Ot++)if(this.style._layers[Te[Ot]].is3D()){this.opaquePassCutoff=Ot;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let Ot of Te){let $t=this.style._layers[Ot];if(!$t.hasOffscreenPass()||$t.isHidden(this.transform.zoom))continue;let Tr=ht[$t.source];($t.type==="custom"||Tr.length)&&this.renderLayer(this,Me[$t.source],$t,Tr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:ie.showOverdrawInspector?t.aM.black:t.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(Ot,$t){let Tr=Ot.context,Ar=Tr.gl,Kr=((pt,Et,bt)=>({u_sky_color:pt.properties.get("sky-color"),u_horizon_color:pt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*bt,u_sky_horizon_blend:pt.properties.get("sky-horizon-blend")*Et.height/2*bt}))($t,Ot.style.map.transform,Ot.pixelRatio),na=new ss(Ar.LEQUAL,ss.ReadWrite,[0,1]),Ve=ks.disabled,$e=Ot.colorModeForRenderPass(),ot=Ot.useProgram("sky");if(!$t.mesh){let pt=new t.aX;pt.emplaceBack(-1,-1),pt.emplaceBack(1,-1),pt.emplaceBack(1,1),pt.emplaceBack(-1,1);let Et=new t.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(pt,Ur.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}ot.draw(Tr,Ar.TRIANGLES,na,Ve,$e,to.disabled,Kr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ie.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Te.length-1;this.currentLayer>=0;this.currentLayer--){let Ot=this.style._layers[Te[this.currentLayer]],$t=Me[Ot.source],Tr=ze[Ot.source];this._renderTileClippingMasks(Ot,Tr),this.renderLayer(this,$t,Ot,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Te.length;this.currentLayer++){let Ot=this.style._layers[Te[this.currentLayer]],$t=Me[Ot.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ot))continue;let Tr=(Ot.type==="symbol"?wt:ht)[Ot.source];this._renderTileClippingMasks(Ot,ze[Ot.source]),this.renderLayer(this,$t,Ot,Tr)}if(this.options.showTileBoundaries){let Ot=function($t,Tr){let Ar=null,Kr=Object.values($t._layers).flatMap(ot=>ot.source&&!ot.isHidden(Tr)?[$t.sourceCaches[ot.source]]:[]),na=Kr.filter(ot=>ot.getSource().type==="vector"),Ve=Kr.filter(ot=>ot.getSource().type!=="vector"),$e=ot=>{(!Ar||Ar.getSource().maxzoom<ot.getSource().maxzoom)&&(Ar=ot)};return na.forEach(ot=>$e(ot)),Ar||Ve.forEach(ot=>$e(ot)),Ar}(this.style,this.transform.zoom);Ot&&function($t,Tr,Ar){for(let Kr=0;Kr<Ar.length;Kr++)jf($t,Tr,Ar[Kr])}(this,Ot,Ot.getVisibleCoordinates())}this.options.showPadding&&function(Ot){let $t=Ot.transform.padding;Zc(Ot,Ot.transform.height-($t.top||0),3,Sc),Zc(Ot,$t.bottom||0,3,Ys),$f(Ot,$t.left||0,3,kf),$f(Ot,Ot.transform.width-($t.right||0),3,fh);let Tr=Ot.transform.centerPoint;(function(Ar,Kr,na,Ve){Cu(Ar,Kr-1,na-10,2,20,Ve),Cu(Ar,Kr-10,na-1,20,2,Ve)})(Ot,Tr.x,Ot.transform.height-Tr.y,Uf)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(I){if(!this.style||!this.style.map||!this.style.map.terrain)return;let ie=this.terrainFacilitator.matrix,Te=this.transform.modelViewProjectionMatrix,Me=this.terrainFacilitator.dirty;Me||(Me=I?!t.a_(ie,Te):!t.a$(ie,Te)),Me||(Me=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Me&&(t.b0(ie,Te),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new ss(Ot.LEQUAL,ss.ReadWrite,[0,1]),Ar=ht.getTerrainMesh(),Kr=ht.sourceCache.getRenderableTiles(),na=ze.useProgram("terrainDepth");wt.bindFramebuffer.set(ht.getFramebuffer("depth").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1});for(let Ve of Kr){let $e=ht.getTerrainData(Ve.tileID),ot={u_matrix:ze.transform.calculatePosMatrix(Ve.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,ks.disabled,$t,to.backCCW,ot,$e,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain),function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new ss(Ot.LEQUAL,ss.ReadWrite,[0,1]),Ar=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),Ve=ze.useProgram("terrainCoords");wt.bindFramebuffer.set(ht.getFramebuffer("coords").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1}),ht.coordsIndex=[];for(let $e of na){let ot=ht.getTerrainData($e.tileID);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Kr.texture);let pt={u_matrix:ze.transform.calculatePosMatrix($e.tileID.toUnwrapped()),u_terrain_coords_id:(255-ht.coordsIndex.length)/255,u_texture:0,u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};Ve.draw(wt,Ot.TRIANGLES,Tr,ks.disabled,$t,to.backCCW,pt,ot,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),ht.coordsIndex.push($e.tileID.key)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain))}renderLayer(I,ie,Te,Me){if(!Te.isHidden(this.transform.zoom)&&(Te.type==="background"||Te.type==="custom"||(Me||[]).length))switch(this.id=Te.id,Te.type){case"symbol":(function(ze,ht,wt,Ot,$t){if(ze.renderPass!=="translucent")return;let Tr=ks.disabled,Ar=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,Ve,$e,ot,pt,Et,bt,Rt){let lr=na.transform,yr=pi(),kr=ot==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(Ve);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,lr.zoom),ci=Oa(ha,1,na.transform.zoom),Vi=Er(Qr.posMatrix,jr,kr,na.transform,ci),ji=Ve.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,lr.zoom-ha.tileID.overscaledZ),An=na.style.map.terrain?(Nn,wo)=>na.style.map.terrain.getElevation(Qr,Nn,wo):null,Yn=yr.translatePosition(lr,ha,Et,bt);nf(Aa,kr,jr,Rt,lr,Vi,Qr.posMatrix,on,Da,ji,yr,Yn,Qr.toUnwrapped(),An)}}}(Ot,ze,wt,ht,wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),$t),wt.paint.get("icon-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!1,wt.paint.get("icon-translate"),wt.paint.get("icon-translate-anchor"),wt.layout.get("icon-rotation-alignment"),wt.layout.get("icon-pitch-alignment"),wt.layout.get("icon-keep-upright"),Tr,Ar),wt.paint.get("text-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!0,wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.layout.get("text-keep-upright"),Tr,Ar),ht.map.showCollisionBoxes&&(Vu(ze,ht,wt,Ot,!0),Vu(ze,ht,wt,Ot,!1))})(I,ie,Te,Me,this.style.placement.variableOffsets);break;case"circle":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent")return;let $t=wt.paint.get("circle-opacity"),Tr=wt.paint.get("circle-stroke-width"),Ar=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Ar.constantOr(1)===0))return;let na=ze.context,Ve=na.gl,$e=ze.depthModeForSublayer(0,ss.ReadOnly),ot=ks.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;bt<Ot.length;bt++){let Rt=Ot[bt],lr=ht.getTile(Rt),yr=lr.getBucket(wt);if(!yr)continue;let kr=yr.programConfigurations.get(wt.id),jr=ze.useProgram("circle",kr),Qr=yr.layoutVertexBuffer,ha=yr.indexBuffer,Aa=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Rt),Da={programConfiguration:kr,program:jr,layoutVertexBuffer:Qr,indexBuffer:ha,uniformValues:yn(ze,Rt,lr,wt),terrainData:Aa};if(Kr){let ci=yr.segments.get();for(let Vi of ci)Et.push({segments:new t.a0([Vi]),sortKey:Vi.sortKey,state:Da})}else Et.push({segments:yr.segments,sortKey:0,state:Da})}Kr&&Et.sort((bt,Rt)=>bt.sortKey-Rt.sortKey);for(let bt of Et){let{programConfiguration:Rt,program:lr,layoutVertexBuffer:yr,indexBuffer:kr,uniformValues:jr,terrainData:Qr}=bt.state;lr.draw(na,Ve.TRIANGLES,$e,ot,pt,to.disabled,jr,Qr,wt.id,yr,kr,bt.segments,wt.paint,ze.transform.zoom,Rt)}})(I,ie,Te,Me);break;case"heatmap":(function(ze,ht,wt,Ot){if(wt.paint.get("heatmap-opacity")===0)return;let $t=ze.context;if(ze.style.map.terrain){for(let Tr of Ot){let Ar=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Ar,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Ar,Kr,na){let Ve=Tr.context,$e=Ve.gl,ot=ks.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Rt){let lr=Et.gl;Et.activeTexture.set(lr.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Rt.heatmapFbos.get(t.aU);yr?(lr.bindTexture(lr.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Rt.heatmapFbos.set(t.aU,yr))})(Ve,Tr,Kr),Ve.clear({color:t.aM.transparent});for(let Et=0;Et<na.length;Et++){let bt=na[Et];if(Ar.hasRenderableParent(bt))continue;let Rt=Ar.getTile(bt),lr=Rt.getBucket(Kr);if(!lr)continue;let yr=lr.programConfigurations.get(Kr.id),kr=Tr.useProgram("heatmap",yr),{zoom:jr}=Tr.transform;kr.draw(Ve,$e.TRIANGLES,ss.disabled,ot,pt,to.disabled,ao(bt.posMatrix,Rt,jr,Kr.paint.get("heatmap-intensity")),null,Kr.id,lr.layoutVertexBuffer,lr.indexBuffer,lr.segments,Kr.paint,Tr.transform.zoom,yr)}Ve.viewport.set([0,0,Tr.width,Tr.height])}(ze,ht,wt,Ot):ze.renderPass==="translucent"&&function(Tr,Ar){let Kr=Tr.context,na=Kr.gl;Kr.setColorMode(Tr.colorModeForRenderPass());let Ve=Ar.heatmapFbos.get(t.aU);Ve&&(Kr.activeTexture.set(na.TEXTURE0),na.bindTexture(na.TEXTURE_2D,Ve.colorAttachment.get()),Kr.activeTexture.set(na.TEXTURE1),Nf(Kr,Ar).bind(na.LINEAR,na.CLAMP_TO_EDGE),Tr.useProgram("heatmapTexture").draw(Kr,na.TRIANGLES,ss.disabled,ks.disabled,Tr.colorModeForRenderPass(),to.disabled,xo(Tr,Ar,0,1),null,Ar.id,Tr.viewportBuffer,Tr.quadTriangleIndexBuffer,Tr.viewportSegments,Ar.paint,Tr.transform.zoom))}(ze,wt)})(I,ie,Te,Me);break;case"line":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent")return;let $t=wt.paint.get("line-opacity"),Tr=wt.paint.get("line-width");if($t.constantOr(1)===0||Tr.constantOr(1)===0)return;let Ar=ze.depthModeForSublayer(0,ss.ReadOnly),Kr=ze.colorModeForRenderPass(),na=wt.paint.get("line-dasharray"),Ve=wt.paint.get("line-pattern"),$e=Ve.constantOr(1),ot=wt.paint.get("line-gradient"),pt=wt.getCrossfadeParameters(),Et=$e?"linePattern":na?"lineSDF":ot?"lineGradient":"line",bt=ze.context,Rt=bt.gl,lr=!0;for(let yr of Ot){let kr=ht.getTile(yr);if($e&&!kr.patternsLoaded())continue;let jr=kr.getBucket(wt);if(!jr)continue;let Qr=jr.programConfigurations.get(wt.id),ha=ze.context.program.get(),Aa=ze.useProgram(Et,Qr),Da=lr||Aa.program!==ha,ci=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(yr),Vi=Ve.constantOr(null);if(Vi&&kr.imageAtlas){let An=kr.imageAtlas,Yn=An.patternPositions[Vi.to.toString()],Nn=An.patternPositions[Vi.from.toString()];Yn&&Nn&&Qr.setConstantPatternPositions(Yn,Nn)}let ji=ci?yr:null,on=$e?Ao(ze,kr,wt,pt,ji):na?On(ze,kr,wt,na,pt,ji):ot?Mn(ze,kr,wt,jr.lineClipsArray.length,ji):Fs(ze,kr,wt,ji);if($e)bt.activeTexture.set(Rt.TEXTURE0),kr.imageAtlasTexture.bind(Rt.LINEAR,Rt.CLAMP_TO_EDGE),Qr.updatePaintBuffers(pt);else if(na&&(Da||ze.lineAtlas.dirty))bt.activeTexture.set(Rt.TEXTURE0),ze.lineAtlas.bind(bt);else if(ot){let An=jr.gradients[wt.id],Yn=An.texture;if(wt.gradientVersion!==An.version){let Nn=256;if(wt.stepInterpolant){let wo=ht.getSource().maxzoom,os=yr.canonical.z===wo?Math.ceil(1<<ze.transform.maxZoom-yr.canonical.z):1;Nn=t.ac(t.aV(jr.maxLineLength/t.X*1024*os),256,bt.maxTextureSize)}An.gradient=t.aW({expression:wt.gradientExpression(),evaluationKey:"lineProgress",resolution:Nn,image:An.gradient||void 0,clips:jr.lineClipsArray}),An.texture?An.texture.update(An.gradient):An.texture=new u(bt,An.gradient,Rt.RGBA),An.version=wt.gradientVersion,Yn=An.texture}bt.activeTexture.set(Rt.TEXTURE0),Yn.bind(wt.stepInterpolant?Rt.NEAREST:Rt.LINEAR,Rt.CLAMP_TO_EDGE)}Aa.draw(bt,Rt.TRIANGLES,Ar,ze.stencilModeForClipping(yr),Kr,to.disabled,on,ci,wt.id,jr.layoutVertexBuffer,jr.indexBuffer,jr.segments,wt.paint,ze.transform.zoom,Qr,jr.layoutVertexBuffer2),lr=!1}})(I,ie,Te,Me);break;case"fill":(function(ze,ht,wt,Ot){let $t=wt.paint.get("fill-color"),Tr=wt.paint.get("fill-opacity");if(Tr.constantOr(1)===0)return;let Ar=ze.colorModeForRenderPass(),Kr=wt.paint.get("fill-pattern"),na=ze.opaquePassEnabledForLayer()&&!Kr.constantOr(1)&&$t.constantOr(t.aM.transparent).a===1&&Tr.constantOr(0)===1?"opaque":"translucent";if(ze.renderPass===na){let Ve=ze.depthModeForSublayer(1,ze.renderPass==="opaque"?ss.ReadWrite:ss.ReadOnly);Ef(ze,ht,wt,Ot,Ve,Ar,!1)}if(ze.renderPass==="translucent"&&wt.paint.get("fill-antialias")){let Ve=ze.depthModeForSublayer(wt.getPaintProperty("fill-outline-color")?2:0,ss.ReadOnly);Ef(ze,ht,wt,Ot,Ve,Ar,!0)}})(I,ie,Te,Me);break;case"fill-extrusion":(function(ze,ht,wt,Ot){let $t=wt.paint.get("fill-extrusion-opacity");if($t!==0&&ze.renderPass==="translucent"){let Tr=new ss(ze.context.gl.LEQUAL,ss.ReadWrite,ze.depthRangeFor3D);if($t!==1||wt.paint.get("fill-extrusion-pattern").constantOr(1))oc(ze,ht,wt,Ot,Tr,ks.disabled,fl.disabled),oc(ze,ht,wt,Ot,Tr,ze.stencilModeFor3D(),ze.colorModeForRenderPass());else{let Ar=ze.colorModeForRenderPass();oc(ze,ht,wt,Ot,Tr,ks.disabled,Ar)}}})(I,ie,Te,Me);break;case"hillshade":(function(ze,ht,wt,Ot){if(ze.renderPass!=="offscreen"&&ze.renderPass!=="translucent")return;let $t=ze.context,Tr=ze.depthModeForSublayer(0,ss.ReadOnly),Ar=ze.colorModeForRenderPass(),[Kr,na]=ze.renderPass==="translucent"?ze.stencilConfigForOverlap(Ot):[{},Ot];for(let Ve of na){let $e=ht.getTile(Ve);$e.needsHillshadePrepare!==void 0&&$e.needsHillshadePrepare&&ze.renderPass==="offscreen"?Ql(ze,$e,wt,Tr,ks.disabled,Ar):ze.renderPass==="translucent"&&Xc(ze,Ve,$e,wt,Tr,Kr[Ve.overscaledZ],Ar)}$t.viewport.set([0,0,ze.width,ze.height])})(I,ie,Te,Me);break;case"raster":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent"||wt.paint.get("raster-opacity")===0||!Ot.length)return;let $t=ze.context,Tr=$t.gl,Ar=ht.getSource(),Kr=ze.useProgram("raster"),na=ze.colorModeForRenderPass(),[Ve,$e]=Ar instanceof at?[{},Ot]:ze.stencilConfigForOverlap(Ot),ot=$e[$e.length-1].overscaledZ,pt=!ze.options.moving;for(let Et of $e){let bt=ze.depthModeForSublayer(Et.overscaledZ-ot,wt.paint.get("raster-opacity")===1?ss.ReadWrite:ss.ReadOnly,Tr.LESS),Rt=ht.getTile(Et);Rt.registerFadeDuration(wt.paint.get("raster-fade-duration"));let lr=ht.findLoadedParent(Et,0),yr=ht.findLoadedSibling(Et),kr=qc(Rt,lr||yr||null,ht,wt,ze.transform,ze.style.map.terrain),jr,Qr,ha=wt.paint.get("raster-resampling")==="nearest"?Tr.NEAREST:Tr.LINEAR;$t.activeTexture.set(Tr.TEXTURE0),Rt.texture.bind(ha,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),$t.activeTexture.set(Tr.TEXTURE1),lr?(lr.texture.bind(ha,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),jr=Math.pow(2,lr.tileID.overscaledZ-Rt.tileID.overscaledZ),Qr=[Rt.tileID.canonical.x*jr%1,Rt.tileID.canonical.y*jr%1]):Rt.texture.bind(ha,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),Rt.texture.useMipmap&&$t.extTextureFilterAnisotropic&&ze.transform.pitch>20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Et),Da=Aa?Et:null,ci=Da?Da.posMatrix:ze.transform.calculatePosMatrix(Et.toUnwrapped(),pt),Vi=_s(ci,Qr||[0,0],jr||1,kr,wt);Ar instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,ks.disabled,na,to.disabled,Vi,Aa,wt.id,Ar.boundsBuffer,ze.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,Ve[Et.overscaledZ],na,to.disabled,Vi,Aa,wt.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}})(I,ie,Te,Me);break;case"background":(function(ze,ht,wt,Ot){let $t=wt.paint.get("background-color"),Tr=wt.paint.get("background-opacity");if(Tr===0)return;let Ar=ze.context,Kr=Ar.gl,na=ze.transform,Ve=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let ot=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==ot)return;let pt=ks.disabled,Et=ze.depthModeForSublayer(0,ot==="opaque"?ss.ReadWrite:ss.ReadOnly),bt=ze.colorModeForRenderPass(),Rt=ze.useProgram($e?"backgroundPattern":"background"),lr=Ot||na.coveringTiles({tileSize:Ve,terrain:ze.style.map.terrain});$e&&(Ar.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let kr of lr){let jr=Ot?kr.posMatrix:ze.transform.calculatePosMatrix(kr.toUnwrapped()),Qr=$e?gs(jr,Tr,ze,$e,{tileID:kr,tileSize:Ve},yr):ns(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(kr);Rt.draw(Ar,Kr.TRIANGLES,Et,pt,bt,to.disabled,Qr,ha,wt.id,ze.tileExtentBuffer,ze.quadTriangleIndexBuffer,ze.tileExtentSegments)}})(I,0,Te,Me);break;case"custom":(function(ze,ht,wt){let Ot=ze.context,$t=wt.implementation;if(ze.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Tr.call($t,Ot.gl,ze.transform.customLayerMatrix()),Ot.setDirty(),ze.setBaseState())}else if(ze.renderPass==="translucent"){ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Ot.setStencilMode(ks.disabled);let Tr=$t.renderingMode==="3d"?new ss(ze.context.gl.LEQUAL,ss.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,ss.ReadOnly);Ot.setDepthMode(Tr),$t.render(Ot.gl,ze.transform.customLayerMatrix(),{farZ:ze.transform.farZ,nearZ:ze.transform.nearZ,fov:ze.transform._fov,modelViewProjectionMatrix:ze.transform.modelViewProjectionMatrix,projectionMatrix:ze.transform.projectionMatrix}),Ot.setDirty(),ze.setBaseState(),Ot.bindFramebuffer.set(null)}})(I,0,Te)}}translatePosMatrix(I,ie,Te,Me,ze){if(!Te[0]&&!Te[1])return I;let ht=ze?Me==="map"?this.transform.angle:0:Me==="viewport"?-this.transform.angle:0;if(ht){let $t=Math.sin(ht),Tr=Math.cos(ht);Te=[Te[0]*Tr-Te[1]*$t,Te[0]*$t+Te[1]*Tr]}let wt=[ze?Te[0]:Oa(ie,Te[0],this.transform.zoom),ze?Te[1]:Oa(ie,Te[1],this.transform.zoom),0],Ot=new Float32Array(16);return t.J(Ot,I,wt),Ot}saveTileTexture(I){let ie=this._tileTextures[I.size[0]];ie?ie.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ie=this._tileTextures[I];return ie&&ie.length>0?ie.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ie=this.imageManager.getPattern(I.from.toString()),Te=this.imageManager.getPattern(I.to.toString());return!ie||!Te}useProgram(I,ie){this.cache=this.cache||{};let Te=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Te]||(this.cache[Te]=new ba(this.context,Hr[I],ie,Ls[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Te]}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 I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:I,drawingBufferHeight:ie}=this.context.gl;return this.width!==I||this.height!==ie}}class ol{constructor(I,ie){this.points=I,this.planes=ie}static fromInvProjectionMatrix(I,ie,Te){let Me=Math.pow(2,Te),ze=[[-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(wt=>{let Ot=1/(wt=t.af([],wt,I))[3]/ie*Me;return t.b1(wt,wt,[Ot,Ot,1/wt[3],Ot])}),ht=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(wt=>{let Ot=function(Kr,na){var Ve=na[0],$e=na[1],ot=na[2],pt=Ve*Ve+$e*$e+ot*ot;return pt>0&&(pt=1/Math.sqrt(pt)),Kr[0]=na[0]*pt,Kr[1]=na[1]*pt,Kr[2]=na[2]*pt,Kr}([],function(Kr,na,Ve){var $e=na[0],ot=na[1],pt=na[2],Et=Ve[0],bt=Ve[1],Rt=Ve[2];return Kr[0]=ot*Rt-pt*bt,Kr[1]=pt*Et-$e*Rt,Kr[2]=$e*bt-ot*Et,Kr}([],M([],ze[wt[0]],ze[wt[1]]),M([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Ar=ze[wt[1]])[0]+Tr[1]*Ar[1]+Tr[2]*Ar[2]);var Tr,Ar;return Ot.concat($t)});return new ol(ze,ht)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(Te,Me,ze){return Te[0]=.5*Me[0],Te[1]=.5*Me[1],Te[2]=.5*Me[2],Te}([],function(Te,Me,ze){return Te[0]=Me[0]+ze[0],Te[1]=Me[1]+ze[1],Te[2]=Me[2]+ze[2],Te}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],Te=w(this.min),Me=w(this.max);for(let ze=0;ze<ie.length;ze++)Te[ze]=ie[ze]?this.min[ze]:this.center[ze],Me[ze]=ie[ze]?this.center[ze]:this.max[ze];return Me[2]=this.max[2],new vc(Te,Me)}distanceX(I){return Math.max(Math.min(this.max[0],I[0]),this.min[0])-I[0]}distanceY(I){return Math.max(Math.min(this.max[1],I[1]),this.min[1])-I[1]}intersects(I){let ie=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]],Te=!0;for(let Me=0;Me<I.planes.length;Me++){let ze=I.planes[Me],ht=0;for(let wt=0;wt<ie.length;wt++)t.b2(ze,ie[wt])>=0&&ht++;if(ht===0)return 0;ht!==ie.length&&(Te=!1)}if(Te)return 2;for(let Me=0;Me<3;Me++){let ze=Number.MAX_VALUE,ht=-Number.MAX_VALUE;for(let wt=0;wt<I.points.length;wt++){let Ot=I.points[wt][Me]-this.min[Me];ze=Math.min(ze,Ot),ht=Math.max(ht,Ot)}if(ht<0||ze>this.max[Me]-this.min[Me])return 0}return 1}}class yu{constructor(I=0,ie=0,Te=0,Me=0){if(isNaN(I)||I<0||isNaN(ie)||ie<0||isNaN(Te)||Te<0||isNaN(Me)||Me<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=ie,this.left=Te,this.right=Me}interpolate(I,ie,Te){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,Te)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,Te)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,Te)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,Te)),this}getCenter(I,ie){let Te=t.ac((this.left+I-this.right)/2,0,I),Me=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(Te,Me)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class El{constructor(I,ie,Te,Me,ze){this.tileSize=512,this._renderWorldCopies=ze===void 0||!!ze,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=Te??0,this._maxPitch=Me??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new El(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var Te=new t.A(4);return t.A!=Float32Array&&(Te[1]=0,Te[2]=0),Te[0]=1,Te[3]=1,Te}(),function(Te,Me,ze){var ht=Me[0],wt=Me[1],Ot=Me[2],$t=Me[3],Tr=Math.sin(ze),Ar=Math.cos(ze);Te[0]=ht*Ar+Ot*Tr,Te[1]=wt*Ar+$t*Tr,Te[2]=ht*-Tr+Ot*Ar,Te[3]=wt*-Tr+$t*Ar}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,Te){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,Te),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ie=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ie)}getVisibleUnwrappedCoordinates(I){let ie=[new t.b4(0,I)];if(this._renderWorldCopies){let Te=this.pointCoordinate(new t.P(0,0)),Me=this.pointCoordinate(new t.P(this.width,0)),ze=this.pointCoordinate(new t.P(this.width,this.height)),ht=this.pointCoordinate(new t.P(0,this.height)),wt=Math.floor(Math.min(Te.x,Me.x,ze.x,ht.x)),Ot=Math.floor(Math.max(Te.x,Me.x,ze.x,ht.x)),$t=1;for(let Tr=wt-$t;Tr<=Ot+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,Te;let Me=this.coveringZoomLevel(I),ze=Me;if(I.minzoom!==void 0&&Me<I.minzoom)return[];I.maxzoom!==void 0&&Me>I.maxzoom&&(Me=I.maxzoom);let ht=this.pointCoordinate(this.getCameraPoint()),wt=t.Z.fromLngLat(this.center),Ot=Math.pow(2,Me),$t=[Ot*ht.x,Ot*ht.y,0],Tr=[Ot*wt.x,Ot*wt.y,0],Ar=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Me),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Me);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,Ve=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],ot=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(Ve(-bt)),$e.push(Ve(bt));for($e.push(Ve(0));$e.length>0;){let bt=$e.pop(),Rt=bt.x,lr=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Ar);if(Aa===0)continue;yr=Aa===2}let kr=I.terrain?$t:Tr,jr=bt.aabb.distanceX(kr),Qr=bt.aabb.distanceY(kr),ha=Math.max(Math.abs(jr),Math.abs(Qr));if(bt.zoom===pt||ha>na+(1<<pt-bt.zoom)-2&&bt.zoom>=Kr){let Aa=pt-bt.zoom,Da=$t[0]-.5-(Rt<<Aa),ci=$t[1]-.5-(lr<<Aa);ot.push({tileID:new t.S(bt.zoom===pt?Et:bt.zoom,bt.wrap,bt.zoom,Rt,lr),distanceSq:g([Tr[0]-.5-Rt,Tr[1]-.5-lr]),tileDistanceToCamera:Math.sqrt(Da*Da+ci*ci)})}else for(let Aa=0;Aa<4;Aa++){let Da=(Rt<<1)+Aa%2,ci=(lr<<1)+(Aa>>1),Vi=bt.zoom+1,ji=bt.aabb.quadrant(Aa);if(I.terrain){let on=new t.S(Vi,bt.wrap,Vi,Da,ci),An=I.terrain.getMinMaxElevation(on),Yn=(ie=An.minElevation)!==null&&ie!==void 0?ie:this.elevation,Nn=(Te=An.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Yn],[ji.max[0],ji.max[1],Nn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return ot.sort((bt,Rt)=>bt.distanceSq-Rt.distanceSq).map(bt=>bt.tileID)}resize(I,ie){this.width=I,this.height=ie,this.pixelsToGLUnits=[2/I,-2/ie],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ie=t.ac(I.lat,-85.051129,Tu);return new t.P(t.O(I.lng)*this.worldSize,t.Q(ie)*this.worldSize)}unproject(I){return new t.Z(I.x/this.worldSize,I.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(I){let ie=this.elevation,Te=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Me=this.pointLocation(this.centerPoint,I),ze=I.getElevationForLngLatZoom(Me,this.tileZoom);if(!(this.elevation-ze))return;let ht=Te+ie-ze,wt=Math.cos(this._pitch)*this.cameraToCenterDistance/ht/t.b5(1,Me.lat),Ot=this.scaleZoom(wt/this.tileSize);this._elevation=ze,this._center=Me,this.zoom=Ot}setLocationAtPoint(I,ie){let Te=this.pointCoordinate(ie),Me=this.pointCoordinate(this.centerPoint),ze=this.locationCoordinate(I),ht=new t.Z(ze.x-(Te.x-Me.x),ze.y-(Te.y-Me.y));this.center=this.coordinateLocation(ht),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ie){return ie?this.coordinatePoint(this.locationCoordinate(I),ie.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ie){return this.coordinateLocation(this.pointCoordinate(I,ie))}locationCoordinate(I){return t.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ie){if(ie){let Kr=ie.pointCoordinate(I);if(Kr!=null)return Kr}let Te=[I.x,I.y,0,1],Me=[I.x,I.y,1,1];t.af(Te,Te,this.pixelMatrixInverse),t.af(Me,Me,this.pixelMatrixInverse);let ze=Te[3],ht=Me[3],wt=Te[1]/ze,Ot=Me[1]/ht,$t=Te[2]/ze,Tr=Me[2]/ht,Ar=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Ar)/this.worldSize,t.y.number(wt,Ot,Ar)/this.worldSize)}coordinatePoint(I,ie=0,Te=this.pixelMatrix){let Me=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Me,Me,Te),new t.P(Me[0]/Me[3],Me[1]/Me[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,Te=this.worldSize/this.zoomScale(ie.z),Me=ie.x+Math.pow(2,ie.z)*I.wrap,ze=t.an(new Float64Array(16));return t.J(ze,ze,[Me*Te,ie.y*Te,0]),t.K(ze,ze,[Te/t.X,Te/t.X,1]),ze}calculatePosMatrix(I,ie=!1){let Te=I.key,Me=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Me[Te])return Me[Te];let ze=this.calculateTileMatrix(I);return t.L(ze,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,ze),Me[Te]=new Float32Array(ze),Me[Te]}calculateFogMatrix(I){let ie=I.key,Te=this._fogMatrixCache;if(Te[ie])return Te[ie];let Me=this.calculateTileMatrix(I);return t.L(Me,this.fogMatrix,Me),Te[ie]=new Float32Array(Me),Te[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let Te={center:new t.N(I.lng,I.lat),zoom:ie},Me=this.lngRange;if(!this._renderWorldCopies&&Me===null){let bt=179.9999999999;Me=[-bt,bt]}let ze=this.tileSize*this.zoomScale(Te.zoom),ht=0,wt=ze,Ot=0,$t=ze,Tr=0,Ar=0,{x:Kr,y:na}=this.size;if(this.latRange){let bt=this.latRange;ht=t.Q(bt[1])*ze,wt=t.Q(bt[0])*ze,wt-ht<na&&(Tr=na/(wt-ht))}Me&&(Ot=t.b3(t.O(Me[0])*ze,0,ze),$t=t.b3(t.O(Me[1])*ze,0,ze),$t<Ot&&($t+=ze),$t-Ot<Kr&&(Ar=Kr/($t-Ot)));let{x:Ve,y:$e}=this.project.call({worldSize:ze},I),ot,pt,Et=Math.max(Ar||0,Tr||0);if(Et){let bt=new t.P(Ar?($t+Ot)/2:Ve,Tr?(wt+ht)/2:$e);return Te.center=this.unproject.call({worldSize:ze},bt).wrap(),Te.zoom+=this.scaleZoom(Et),Te}if(this.latRange){let bt=na/2;$e-bt<ht&&(pt=ht+bt),$e+bt>wt&&(pt=wt-bt)}if(Me){let bt=(Ot+$t)/2,Rt=Ve;this._renderWorldCopies&&(Rt=t.b3(Ve,bt-ze/2,bt+ze/2));let lr=Kr/2;Rt-lr<Ot&&(ot=Ot+lr),Rt+lr>$t&&(ot=$t-lr)}if(ot!==void 0||pt!==void 0){let bt=new t.P(ot??Ve,pt??$e);Te.center=this.unproject.call({worldSize:ze},bt).wrap()}return Te}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:Te}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=Te,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,Te=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Me=t.an(new Float64Array(16));t.K(Me,Me,[this.width/2,-this.height/2,1]),t.J(Me,Me,[1,-1,0]),this.labelPlaneMatrix=Me,Me=t.an(new Float64Array(16)),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[-1,-1,0]),t.K(Me,Me,[2/this.width,2/this.height,1]),this.glCoordMatrix=Me;let ze=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ht=Math.min(this.elevation,this.minElevationForCurrentTile),wt=ze-ht*this._pixelPerMeter/Math.cos(this._pitch),Ot=ht<0?wt:ze,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Ar=Math.sin(Tr)*Ot/Math.sin(t.ac(Math.PI-$t-Tr,.01,Math.PI-.01)),Kr=this.getHorizon(),na=2*Math.atan(Kr/this.cameraToCenterDistance)*(.5+I.y/(2*Kr)),Ve=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Ar,Ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*$e+Ot),this.nearZ=this.height/50,Me=new Float64Array(16),t.b6(Me,this._fov,this.width/this.height,this.nearZ,this.farZ),Me[8]=2*-I.x/this.width,Me[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Me),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[0,0,-this.cameraToCenterDistance]),t.b7(Me,Me,this._pitch),t.ad(Me,Me,this.angle),t.J(Me,Me,[-ie,-Te,0]),this.mercatorMatrix=t.K([],Me,[this.worldSize,this.worldSize,this.worldSize]),t.K(Me,Me,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Me),t.J(Me,Me,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Me,this.invModelViewProjectionMatrix=t.as([],Me),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ze,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ie,-Te,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Me);let ot=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Rt=ie-Math.round(ie)+Et*ot+bt*pt,lr=Te-Math.round(Te)+Et*pt+bt*ot,yr=new Float64Array(Me);if(t.J(yr,yr,[Rt>.5?Rt-1:Rt,lr>.5?lr-1:lr,0]),this.alignedModelViewProjectionMatrix=yr,Me=t.as(new Float64Array(16),this.pixelMatrix),!Me)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Me,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new t.P(0,0)),ie=[I.x*this.worldSize,I.y*this.worldSize,0,1];return t.af(ie,ie,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,I))}getCameraQueryGeometry(I){let ie=this.getCameraPoint();if(I.length===1)return[I[0],ie];{let Te=ie.x,Me=ie.y,ze=ie.x,ht=ie.y;for(let wt of I)Te=Math.min(Te,wt.x),Me=Math.min(Me,wt.y),ze=Math.max(ze,wt.x),ht=Math.max(ht,wt.y);return[new t.P(Te,Me),new t.P(ze,Me),new t.P(ze,ht),new t.P(Te,ht),new t.P(Te,Me)]}}lngLatToCameraDepth(I,ie){let Te=this.locationCoordinate(I),Me=[Te.x*this.worldSize,Te.y*this.worldSize,ie,1];return t.af(Me,Me,this.modelViewProjectionMatrix),Me[2]/Me[3]}}function qf(Fe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Fe.apply(ze,ie),Me=setTimeout(ht,I),Te=!1)};return(...wt)=>(Te=!0,ze=this,ie=wt,Me||ht(),Me)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let Te;return ie.split("&").map(Me=>Me.split("=")).forEach(Me=>{Me[0]===this._hashName&&(Te=Me)}),(Te&&Te[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(Te=>isNaN(Te))){let Te=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ie[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ie[2],+ie[1]],zoom:+ie[0],bearing:Te,pitch:+(ie[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ie=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ie)},this._removeHash=()=>{let ie=this._getCurrentHash();if(ie.length===0)return;let Te=ie.join("/"),Me=Te;Me.split("&").length>0&&(Me=Me.split("&")[0]),this._hashName&&(Me=`${this._hashName}=${Te}`);let ze=window.location.hash.replace(Me,"");ze.startsWith("#&")?ze=ze.slice(0,1)+ze.slice(2):ze==="#"&&(ze="");let ht=window.location.href.replace(/(#.+)?$/,ze);ht=ht.replace("&&","&"),window.history.replaceState(window.history.state,null,ht)},this._updateHash=qf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,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(I){let ie=this._map.getCenter(),Te=Math.round(100*this._map.getZoom())/100,Me=Math.ceil((Te*Math.LN2+Math.log(512/360/.5))/Math.LN10),ze=Math.pow(10,Me),ht=Math.round(ie.lng*ze)/ze,wt=Math.round(ie.lat*ze)/ze,Ot=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${ht}/${wt}/${Te}`:`${Te}/${wt}/${ht}`,(Ot||$t)&&(Tr+="/"+Math.round(10*Ot)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(Ve=>{let $e=Ve.split("=")[0];return $e===Ar?(Kr=!0,`${$e}=${Tr}`):Ve}).filter(Ve=>Ve);return Kr||na.push(`${Ar}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=n.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:ze}of this._inertiaBuffer)ie.zoom+=ze.zoomDelta||0,ie.bearing+=ze.bearingDelta||0,ie.pitch+=ze.pitchDelta||0,ze.panDelta&&ie.pan._add(ze.panDelta),ze.around&&(ie.around=ze.around),ze.pinchAround&&(ie.pinchAround=ze.pinchAround);let Te=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Me={};if(ie.pan.mag()){let ze=lf(ie.pan.mag(),Te,t.e({},Ec,I||{}));Me.offset=ie.pan.mult(ze.amount/ie.pan.mag()),Me.center=this._map.transform.center,Nu(Me,ze)}if(ie.zoom){let ze=lf(ie.zoom,Te,mc);Me.zoom=this._map.transform.zoom+ze.amount,Nu(Me,ze)}if(ie.bearing){let ze=lf(ie.bearing,Te,Lh);Me.bearing=this._map.transform.bearing+t.ac(ze.amount,-179,179),Nu(Me,ze)}if(ie.pitch){let ze=lf(ie.pitch,Te,sf);Me.pitch=this._map.transform.pitch+ze.amount,Nu(Me,ze)}if(Me.zoom||Me.bearing){let ze=ie.pinchAround===void 0?ie.around:ie.pinchAround;Me.around=ze?this._map.unproject(ze):this._map.getCenter()}return this.clear(),t.e(Me,{noMoveStart:!0})}}function Nu(Fe,I){(!Fe.duration||Fe.duration<I.duration)&&(Fe.duration=I.duration,Fe.easing=I.easing)}function lf(Fe,I,ie){let{maxSpeed:Te,linearity:Me,deceleration:ze}=ie,ht=t.ac(Fe*Me/(I/1e3),-Te,Te),wt=Math.abs(ht)/(ze*Me);return{easing:ie.easing,duration:1e3*wt,amount:ht*(wt/2)}}class au extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te,Me={}){let ze=i.mousePos(ie.getCanvas(),Te),ht=ie.unproject(ze);super(I,t.e({point:ze,lngLat:ht,originalEvent:Te},Me)),this._defaultPrevented=!1,this.target=ie}}class Yc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te){let Me=I==="touchend"?Te.changedTouches:Te.touches,ze=i.touchPos(ie.getCanvasContainer(),Me),ht=ze.map(Ot=>ie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Ar)=>Ot.add($t.div(Ar.length)),new t.P(0,0));super(I,{points:ze,point:wt,lngLats:ht,lngLat:ie.unproject(wt),originalEvent:Te}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te){super(I,{originalEvent:Te}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new au(I.type,this._map,I))}mouseup(I){this._map.fire(new au(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new au(I.type,this._map,I))}dblclick(I){return this._firePreventable(new au(I.type,this._map,I))}mouseover(I){this._map.fire(new au(I.type,this._map,I))}mouseout(I){this._map.fire(new au(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Yc(I.type,this._map,I))}touchmove(I){this._map.fire(new Yc(I.type,this._map,I))}touchend(I){this._map.fire(new Yc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Yc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new au(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new au("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new au(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}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(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let Te=ie;if(this._lastPos.equals(Te)||!this._box&&Te.dist(this._startPos)<this._clickTolerance)return;let Me=this._startPos;this._lastPos=Te,this._box||(this._box=i.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",I));let ze=Math.min(Me.x,Te.x),ht=Math.max(Me.x,Te.x),wt=Math.min(Me.y,Te.y),Ot=Math.max(Me.y,Te.y);i.setTransform(this._box,`translate(${ze}px,${wt}px)`),this._box.style.width=ht-ze+"px",this._box.style.height=Ot-wt+"px"}mouseupWindow(I,ie){if(!this._active||I.button!==0)return;let Te=this._startPos,Me=ie;if(this.reset(),i.suppressClick(),Te.x!==Me.x||Te.y!==Me.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:I})),{cameraAnimation:ze=>ze.fitScreenCoordinates(Te,Me,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Fe,I){if(Fe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Fe.length}, points ${I.length}`);let ie={};for(let Te=0;Te<Fe.length;Te++)ie[Fe[Te].identifier]=I[Te];return ie}class hl{constructor(I){this.reset(),this.numTouches=I.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(I,ie,Te){(this.centroid||Te.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Te.length===this.numTouches&&(this.centroid=function(Me){let ze=new t.P(0,0);for(let ht of Me)ze._add(ht);return ze.div(Me.length)}(ie),this.touches=Cf(Te,ie)))}touchmove(I,ie,Te){if(this.aborted||!this.centroid)return;let Me=Cf(Te,ie);for(let ze in this.touches){let ht=Me[ze];(!ht||ht.dist(this.touches[ze])>30)&&(this.aborted=!0)}}touchend(I,ie,Te){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Te.length===0){let Me=!this.aborted&&this.centroid;if(this.reset(),Me)return Me}}}class uf{constructor(I){this.singleTap=new hl(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ie,Te){this.singleTap.touchstart(I,ie,Te)}touchmove(I,ie,Te){this.singleTap.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this.singleTap.touchend(I,ie,Te);if(Me){let ze=I.timeStamp-this.lastTime<500,ht=!this.lastTap||this.lastTap.dist(Me)<30;if(ze&&ht||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Me,this.count===this.numTaps)return this.reset(),Me}}}class kc{constructor(I){this._tr=new _u(I),this._zoomIn=new uf({numTouches:1,numTaps:2}),this._zoomOut=new uf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ie,Te){this._zoomIn.touchstart(I,ie,Te),this._zoomOut.touchstart(I,ie,Te)}touchmove(I,ie,Te){this._zoomIn.touchmove(I,ie,Te),this._zoomOut.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this._zoomIn.touchend(I,ie,Te),ze=this._zoomOut.touchend(I,ie,Te),ht=this._tr;return Me?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom+1,around:ht.unproject(Me)},{originalEvent:I})}):ze?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom-1,around:ht.unproject(ze)},{originalEvent:I})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hu{constructor(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ie=this._moveFunction(...I);if(ie.bearingDelta||ie.pitchDelta||ie.around||ie.panDelta)return this._active=!0,ie}dragStart(I,ie){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ie.length?ie[0]:ie,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ie){if(!this.isEnabled())return;let Te=this._lastPoint;if(!Te)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Me=ie.length?ie[0]:ie;return!this._moved&&Me.dist(Te)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Me,this._move(Te,Me))}dragEnd(I){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(I)&&(this._moved&&i.suppressClick(),this.reset(I))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let gf={0:1,2:2};class Wu{constructor(I){this._correctEvent=I.checkCorrectEvent}startMove(I){let ie=i.mouseButton(I);this._eventButton=ie}endMove(I){delete this._eventButton}isValidStartEvent(I){return this._correctEvent(I)}isValidMoveEvent(I){return!function(ie,Te){let Me=gf[Te];return ie.buttons===void 0||(ie.buttons&Me)!==Me}(I,this._eventButton)}isValidEndEvent(I){return i.mouseButton(I)===this._eventButton}}class Kc{constructor(){this._firstTouch=void 0}_isOneFingerTouch(I){return I.targetTouches.length===1}_isSameTouchEvent(I){return I.targetTouches[0].identifier===this._firstTouch}startMove(I){this._firstTouch=I.targetTouches[0].identifier}endMove(I){delete this._firstTouch}isValidStartEvent(I){return this._isOneFingerTouch(I)}isValidMoveEvent(I){return this._isOneFingerTouch(I)&&this._isSameTouchEvent(I)}isValidEndEvent(I){return this._isOneFingerTouch(I)&&this._isSameTouchEvent(I)}}let Lf=Fe=>{Fe.mousedown=Fe.dragStart,Fe.mousemoveWindow=Fe.dragMove,Fe.mouseup=Fe.dragEnd,Fe.contextmenu=I=>{I.preventDefault()}},iu=({enable:Fe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>i.mouseButton(Me)===0&&Me.ctrlKey||i.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Fe,assignEvents:Lf})},Vf=({enable:Fe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>i.mouseButton(Me)===0&&Me.ctrlKey||i.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Fe,assignEvents:Lf})};class Xu{constructor(I,ie){this._clickTolerance=I.clickTolerance||1,this._map=ie,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ie,Te){return this._calculateTransform(I,ie,Te)}touchmove(I,ie,Te){if(this._active){if(!this._shouldBePrevented(Te.length))return I.preventDefault(),this._calculateTransform(I,ie,Te);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,Te){this._calculateTransform(I,ie,Te),this._active&&this._shouldBePrevented(Te.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,Te){Te.length>0&&(this._active=!0);let Me=Cf(Te,ie),ze=new t.P(0,0),ht=new t.P(0,0),wt=0;for(let $t in Me){let Tr=Me[$t],Ar=this._touches[$t];Ar&&(ze._add(Tr),ht._add(Tr.sub(Ar)),wt++,Me[$t]=Tr)}if(this._touches=Me,this._shouldBePrevented(wt)||!ht.mag())return;let Ot=ht.div(wt);return this._sum._add(Ot),this._sum.mag()<this._clickTolerance?void 0:{around:ze.div(wt),panDelta:Ot}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(I,ie,Te){this._firstTwoTouches||Te.length<2||(this._firstTwoTouches=[Te[0].identifier,Te[1].identifier],this._start([ie[0],ie[1]]))}touchmove(I,ie,Te){if(!this._firstTwoTouches)return;I.preventDefault();let[Me,ze]=this._firstTwoTouches,ht=gc(Te,ie,Me),wt=gc(Te,ie,ze);if(!ht||!wt)return;let Ot=this._aroundCenter?null:ht.add(wt).div(2);return this._move([ht,wt],Ot,I)}touchend(I,ie,Te){if(!this._firstTwoTouches)return;let[Me,ze]=this._firstTwoTouches,ht=gc(Te,ie,Me),wt=gc(Te,ie,ze);ht&&wt||(this._active&&i.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(I){this._enabled=!0,this._aroundCenter=!!I&&I.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function gc(Fe,I,ie){for(let Te=0;Te<Fe.length;Te++)if(Fe[Te].identifier===ie)return I[Te]}function ql(Fe,I){return Math.log(Fe/I)/Math.LN2}class xu extends Cc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(I){this._startDistance=this._distance=I[0].dist(I[1])}_move(I,ie){let Te=this._distance;if(this._distance=I[0].dist(I[1]),this._active||!(Math.abs(ql(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ql(this._distance,Te),pinchAround:ie}}}function Lc(Fe,I){return 180*Fe.angleWith(I)/Math.PI}class Jc extends Cc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(I){this._startVector=this._vector=I[0].sub(I[1]),this._minDiameter=I[0].dist(I[1])}_move(I,ie,Te){let Me=this._vector;if(this._vector=I[0].sub(I[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Lc(this._vector,Me),pinchAround:ie}}_isBelowThreshold(I){this._minDiameter=Math.min(this._minDiameter,I.mag());let ie=25/(Math.PI*this._minDiameter)*360,Te=Lc(I,this._startVector);return Math.abs(Te)<ie}}function sc(Fe){return Math.abs(Fe.y)>Math.abs(Fe.x)}class Pc extends Cc{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ie,Te){super.touchstart(I,ie,Te),this._currentTouchCount=Te.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,Te){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Me=I[0].sub(this._lastPoints[0]),ze=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Me,ze,Te.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Me.y+ze.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,Te){if(this._valid!==void 0)return this._valid;let Me=I.mag()>=2,ze=ie.mag()>=2;if(!Me&&!ze)return;if(!Me||!ze)return this._firstMove===void 0&&(this._firstMove=Te),Te-this._firstMove<100&&void 0;let ht=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&ht}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class br{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,Te=0,Me=0,ze=0,ht=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ie=1;break;case 189:case 109:case 173:ie=-1;break;case 37:I.shiftKey?Te=-1:(I.preventDefault(),ze=-1);break;case 39:I.shiftKey?Te=1:(I.preventDefault(),ze=1);break;case 38:I.shiftKey?Me=1:(I.preventDefault(),ht=-1);break;case 40:I.shiftKey?Me=-1:(I.preventDefault(),ht=1);break;default:return}return this._rotationDisabled&&(Te=0,Me=0),{cameraAnimation:wt=>{let Ot=this._tr;wt.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Ot.zoom)+ie*(I.shiftKey?2:1):Ot.zoom,bearing:Ot.bearing+Te*this._bearingStep,pitch:Ot.pitch+Me*this._pitchStep,offset:[-ze*this._panStep,-ht*this._panStep],center:Ot.center},{originalEvent:I})}}}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 aa(Fe){return Fe*(2-Fe)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=Te=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Te)},this._map=I,this._tr=new _u(I),this._triggerRenderFrame=ie,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ie=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Te=n.now(),Me=Te-(this._lastWheelEventTime||0);this._lastWheelEventTime=Te,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Me>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Me*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ie=i.mousePos(this._map.getCanvas(),I),Te=this._tr;this._around=ie.y>Te.transform.height/2-Te.transform.getHorizon()?t.N.convert(this._aroundCenter?Te.center:Te.unproject(ie)):t.N.convert(Te.center),this._aroundPoint=Te.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ot=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Ot)));this._delta<0&&$t!==0&&($t=1/$t);let Tr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Tr*$t))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ie=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Te=this._startZoom,Me=this._easing,ze,ht=!1,wt=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Te&&Me&&wt){let Ot=Math.min(wt/200,1),$t=Me(Ot);ze=t.y.number(Te,ie,$t),Ot<1?this._frameId||(this._frameId=!0):ht=!0}else ze=ie,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:ze-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let Te=this._prevEase,Me=(n.now()-Te.start)/Te.duration,ze=Te.easing(Me+.01)-Te.easing(Me),ht=.27/Math.sqrt(ze*ze+1e-4)*.01,wt=Math.sqrt(.0729-ht*ht);ie=t.b8(ht,wt,.25,1)}return this._prevEase={start:n.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}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 Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:Te=>{Te.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ie)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hi{constructor(){this._tap=new uf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(I,ie,Te){if(!this._swipePoint)if(this._tapTime){let Me=ie[0],ze=I.timeStamp-this._tapTime<500,ht=this._tapPoint.dist(Me)<30;ze&&ht?Te.length>0&&(this._swipePoint=Me,this._swipeTouch=Te[0].identifier):this.reset()}else this._tap.touchstart(I,ie,Te)}touchmove(I,ie,Te){if(this._tapTime){if(this._swipePoint){if(Te[0].identifier!==this._swipeTouch)return;let Me=ie[0],ze=Me.y-this._swipePoint.y;return this._swipePoint=Me,I.preventDefault(),this._active=!0,{zoomDelta:ze/128}}}else this._tap.touchmove(I,ie,Te)}touchend(I,ie,Te){if(this._tapTime)this._swipePoint&&Te.length===0&&this.reset();else{let Me=this._tap.touchend(I,ie,Te);Me&&(this._tapTime=I.timeStamp,this._tapPoint=Me)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qi{constructor(I,ie,Te){this._el=I,this._mousePan=ie,this._touchPan=Te}enable(I){this._inertiaOptions=I||{},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 pn{constructor(I,ie,Te){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=Te}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Pi{constructor(I,ie,Te,Me){this._el=I,this._touchZoom=ie,this._touchRotate=Te,this._tapDragZoom=Me,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),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()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Te=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Me=document.createElement("div");Me.className="maplibregl-desktop-message",Me.textContent=ie,this._container.appendChild(Me);let ze=document.createElement("div");ze.className="maplibregl-mobile-message",ze.textContent=Te,this._container.appendChild(ze),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),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(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Fe=>Fe.zoom||Fe.drag||Fe.pitch||Fe.rotate;class mi extends t.k{}function Sn(Fe){return Fe.panDelta&&Fe.panDelta.mag()||Fe.zoomDelta||Fe.bearingDelta||Fe.pitchDelta}class $n{constructor(I,ie){this.handleWindowEvent=Me=>{this.handleEvent(Me,`${Me.type}Window`)},this.handleEvent=(Me,ze)=>{if(Me.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ht=Me.type==="renderFrame"?void 0:Me,wt={needsRenderFrame:!1},Ot={},$t={},Tr=Me.touches,Ar=Tr?this._getMapTouches(Tr):void 0,Kr=Ar?i.touchPos(this._map.getCanvas(),Ar):i.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:ot,allowed:pt}of this._handlers){if(!ot.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?ot.reset():ot[ze||Me.type]&&(Et=ot[ze||Me.type](Me,Kr,Ar),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||ot.isActive())&&($t[$e]=ot)}let na={};for(let $e in this._previousActiveHandlers)$t[$e]||(na[$e]=ht);this._previousActiveHandlers=$t,(Object.keys(na).length||Sn(wt))&&(this._changes.push([wt,Ot,na]),this._triggerRenderFrame()),(Object.keys($t).length||Sn(wt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ve}=wt;Ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ve(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vf(I),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie);let Te=this._el;this._listeners=[[Te,"touchstart",{passive:!0}],[Te,"touchmove",{passive:!1}],[Te,"touchend",void 0],[Te,"touchcancel",void 0],[Te,"mousedown",void 0],[Te,"mousemove",void 0],[Te,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Te,"mouseover",void 0],[Te,"mouseout",void 0],[Te,"dblclick",void 0],[Te,"click",void 0],[Te,"keydown",{capture:!1}],[Te,"keyup",void 0],[Te,"wheel",{passive:!1}],[Te,"contextmenu",void 0],[window,"blur",void 0]];for(let[Me,ze,ht]of this._listeners)i.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)i.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,Te)}_addDefaultHandlers(I){let ie=this._map,Te=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Me=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Me),I.interactive&&I.boxZoom&&Me.enable();let ze=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",ze),I.cooperativeGestures&&ze.enable();let ht=new kc(ie),wt=new Ci(ie);ie.doubleClickZoom=new li(wt,ht),this._add("tapZoom",ht),this._add("clickZoom",wt),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Ot=new Hi;this._add("tapDragZoom",Ot);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=iu(I),Ar=Vf(I);ie.dragRotate=new pn(I,Tr,Ar),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Rt=new Wu({checkCorrectEvent:lr=>i.mouseButton(lr)===0&&!lr.ctrlKey});return new Hu({clickTolerance:bt,move:(lr,yr)=>({around:yr,panDelta:yr.sub(lr)}),activateOnStart:!0,moveStateManager:Rt,enable:Et,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(Te,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let Ve=new Jc,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,Ve,Ot),this._add("touchRotate",Ve,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let ot=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",ot,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new br(ie);this._add("keyboard",pt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,Te){this._handlers.push({handlerName:I,handler:ie,allowed:Te}),this._handlersById[I]=ie}stop(I){if(!this._updatingCamera){for(let{handler:ie}of this._handlers)ie.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ni(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ie,Te){for(let Me in I)if(Me!==Te&&(!ie||ie.indexOf(Me)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let Te of I)this._el.contains(Te.target)&&ie.push(Te);return ie}mergeHandlerResult(I,ie,Te,Me,ze){if(!Te)return;t.e(I,Te);let ht={handlerName:Me,originalEvent:Te.originalEvent||ze};Te.zoomDelta!==void 0&&(ie.zoom=ht),Te.panDelta!==void 0&&(ie.drag=ht),Te.pitchDelta!==void 0&&(ie.pitch=ht),Te.bearingDelta!==void 0&&(ie.rotate=ht)}_applyChanges(){let I={},ie={},Te={};for(let[Me,ze,ht]of this._changes)Me.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Me.panDelta)),Me.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Me.zoomDelta),Me.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Me.bearingDelta),Me.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Me.pitchDelta),Me.around!==void 0&&(I.around=Me.around),Me.pinchAround!==void 0&&(I.pinchAround=Me.pinchAround),Me.noInertia&&(I.noInertia=Me.noInertia),t.e(ie,ze),t.e(Te,ht);this._updateMapTransform(I,ie,Te),this._changes=[]}_updateMapTransform(I,ie,Te){let Me=this._map,ze=Me._getTransformForUpdate(),ht=Me.terrain;if(!(Sn(I)||ht&&this._terrainMovement))return this._fireEvents(ie,Te,!0);let{panDelta:wt,zoomDelta:Ot,bearingDelta:$t,pitchDelta:Tr,around:Ar,pinchAround:Kr}=I;Kr!==void 0&&(Ar=Kr),Me._stop(!0),Ar=Ar||Me.transform.centerPoint;let na=ze.pointLocation(wt?Ar.sub(wt):Ar);$t&&(ze.bearing+=$t),Tr&&(ze.pitch+=Tr),Ot&&(ze.zoom+=Ot),ht?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?ze.center=ze.pointLocation(ze.centerPoint.sub(wt)):ze.setLocationAtPoint(na,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Ar)):ze.setLocationAtPoint(na,Ar),Me._applyUpdatedTransform(ze),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,Te,!0)}_fireEvents(I,ie,Te){let Me=Ni(this._eventsInProgress),ze=Ni(I),ht={};for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._eventsInProgress[Ar]||(ht[`${Ar}start`]=Kr),this._eventsInProgress[Ar]=I[Ar]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Ar in ht)this._fireEvent(Ar,ht[Ar]);ze&&this._fireEvent("move",ze.originalEvent);for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._fireEvent(Ar,Kr)}let wt={},Ot;for(let Ar in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Ar];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Ar],Ot=ie[Kr]||na,wt[`${Ar}end`]=Ot)}for(let Ar in wt)this._fireEvent(Ar,wt[Ar]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ar=this._map._getTransformForUpdate();Ar.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ar)}if(Te&&Tr){this._updatingCamera=!0;let Ar=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap<na&&na<this._bearingSnap;!Ar||!Ar.essential&&n.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:Ot})),Kr(this._map.getBearing())&&this._map.resetNorth()):(Kr(Ar.bearing||this._map.getBearing())&&(Ar.bearing=0),Ar.freezeElevation=!0,this._map.easeTo(Ar,{originalEvent:Ot})),this._updatingCamera=!1}}_fireEvent(I,ie){this._map.fire(new t.k(I,ie?{originalEvent:ie}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(I=>{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class no extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Te)),Te<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ie.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ie){return this.jumpTo({center:I},ie)}panBy(I,ie,Te){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),Te)}panTo(I,ie,Te){return this.easeTo(t.e({center:I},ie),Te)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,Te){return this.easeTo(t.e({zoom:I},ie),Te)}zoomIn(I,ie){return this.zoomTo(this.getZoom()+1,I,ie),this}zoomOut(I,ie){return this.zoomTo(this.getZoom()-1,I,ie),this}getBearing(){return this.transform.bearing}setBearing(I,ie){return this.jumpTo({bearing:I},ie),this}getPadding(){return this.transform.padding}setPadding(I,ie){return this.jumpTo({padding:I},ie),this}rotateTo(I,ie,Te){return this.easeTo(t.e({bearing:I},ie),Te)}resetNorth(I,ie){return this.rotateTo(0,t.e({duration:1e3},I),ie),this}resetNorthPitch(I,ie){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},I),ie),this}snapToNorth(I,ie){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(I,ie):this}getPitch(){return this.transform.pitch}setPitch(I,ie){return this.jumpTo({pitch:I},ie),this}cameraForBounds(I,ie){I=re.convert(I).adjustAntiMeridian();let Te=ie&&ie.bearing||0;return this._cameraForBoxAndBearing(I.getNorthWest(),I.getSouthEast(),Te,ie)}_cameraForBoxAndBearing(I,ie,Te,Me){let ze={top:0,bottom:0,right:0,left:0};if(typeof(Me=t.e({padding:ze,offset:[0,0],maxZoom:this.transform.maxZoom},Me)).padding=="number"){let Aa=Me.padding;Me.padding={top:Aa,bottom:Aa,right:Aa,left:Aa}}Me.padding=t.e(ze,Me.padding);let ht=this.transform,wt=ht.padding,Ot=new re(I,ie),$t=ht.project(Ot.getNorthWest()),Tr=ht.project(Ot.getNorthEast()),Ar=ht.project(Ot.getSouthEast()),Kr=ht.project(Ot.getSouthWest()),na=t.ba(-Te),Ve=$t.rotate(na),$e=Tr.rotate(na),ot=Ar.rotate(na),pt=Kr.rotate(na),Et=new t.P(Math.max(Ve.x,$e.x,pt.x,ot.x),Math.max(Ve.y,$e.y,pt.y,ot.y)),bt=new t.P(Math.min(Ve.x,$e.x,pt.x,ot.x),Math.min(Ve.y,$e.y,pt.y,ot.y)),Rt=Et.sub(bt),lr=(ht.width-(wt.left+wt.right+Me.padding.left+Me.padding.right))/Rt.x,yr=(ht.height-(wt.top+wt.bottom+Me.padding.top+Me.padding.bottom))/Rt.y;if(yr<0||lr<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let kr=Math.min(ht.scaleZoom(ht.scale*Math.min(lr,yr)),Me.maxZoom),jr=t.P.convert(Me.offset),Qr=new t.P((Me.padding.left-Me.padding.right)/2,(Me.padding.top-Me.padding.bottom)/2).rotate(t.ba(Te)),ha=jr.add(Qr).mult(ht.scale/ht.zoomScale(kr));return{center:ht.unproject($t.add(Ar).div(2).sub(ha)),zoom:kr,bearing:Te}}fitBounds(I,ie,Te){return this._fitInternal(this.cameraForBounds(I,ie),ie,Te)}fitScreenCoordinates(I,ie,Te,Me,ze){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(I)),this.transform.pointLocation(t.P.convert(ie)),Te,Me),Me,ze)}_fitInternal(I,ie,Te){return I?(delete(ie=t.e(I,ie)).padding,ie.linear?this.easeTo(ie,Te):this.flyTo(ie,Te)):this}jumpTo(I,ie){this.stop();let Te=this._getTransformForUpdate(),Me=!1,ze=!1,ht=!1;return"zoom"in I&&Te.zoom!==+I.zoom&&(Me=!0,Te.zoom=+I.zoom),I.center!==void 0&&(Te.center=t.N.convert(I.center)),"bearing"in I&&Te.bearing!==+I.bearing&&(ze=!0,Te.bearing=+I.bearing),"pitch"in I&&Te.pitch!==+I.pitch&&(ht=!0,Te.pitch=+I.pitch),I.padding==null||Te.isPaddingEqual(I.padding)||(Te.padding=I.padding),this._applyUpdatedTransform(Te),this.fire(new t.k("movestart",ie)).fire(new t.k("move",ie)),Me&&this.fire(new t.k("zoomstart",ie)).fire(new t.k("zoom",ie)).fire(new t.k("zoomend",ie)),ze&&this.fire(new t.k("rotatestart",ie)).fire(new t.k("rotate",ie)).fire(new t.k("rotateend",ie)),ht&&this.fire(new t.k("pitchstart",ie)).fire(new t.k("pitch",ie)).fire(new t.k("pitchend",ie)),this.fire(new t.k("moveend",ie))}calculateCameraOptionsFromTo(I,ie,Te,Me=0){let ze=t.Z.fromLngLat(I,ie),ht=t.Z.fromLngLat(Te,Me),wt=ht.x-ze.x,Ot=ht.y-ze.y,$t=ht.z-ze.z,Tr=Math.hypot(wt,Ot,$t);if(Tr===0)throw new Error("Can't calculate camera options with same From and To");let Ar=Math.hypot(wt,Ot),Kr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Tr/this.transform.tileSize),na=180*Math.atan2(wt,-Ot)/Math.PI,Ve=180*Math.acos(Ar/Tr)/Math.PI;return Ve=$t<0?90-Ve:90+Ve,{center:ht.toLngLat(),zoom:Kr,pitch:Ve,bearing:na}}easeTo(I,ie){var Te;this._stop(!1,I.easeId),((I=t.e({offset:[0,0],duration:500,easing:t.b9},I)).animate===!1||!I.essential&&n.prefersReducedMotion)&&(I.duration=0);let Me=this._getTransformForUpdate(),ze=Me.zoom,ht=Me.bearing,wt=Me.pitch,Ot=Me.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,ht):ht,Tr="pitch"in I?+I.pitch:wt,Ar="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),Ve=Me.pointLocation(na),{center:$e,zoom:ot}=Me.getConstrained(t.N.convert(I.center||Ve),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.project(Ve),Et=Me.project($e).sub(pt),bt=Me.zoomScale(ot-ze),Rt,lr;I.around&&(Rt=t.N.convert(I.around),lr=Me.locationPoint(Rt));let yr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||ot!==ze,this._rotating=this._rotating||ht!==$t,this._pitching=this._pitching||Tr!==wt,this._padding=!Me.isPaddingEqual(Ar),this._easeId=I.easeId,this._prepareEase(ie,I.noMoveStart,yr),this.terrain&&this._prepareElevation($e),this._ease(kr=>{if(this._zooming&&(Me.zoom=t.y.number(ze,ot,kr)),this._rotating&&(Me.bearing=t.y.number(ht,$t,kr)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,kr)),this._padding&&(Me.interpolatePadding(Ot,Ar,kr),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(kr),Rt)Me.setLocationAtPoint(Rt,lr);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=ot>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-kr),Aa=Me.unproject(pt.add(Et.mult(kr*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},kr=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,kr)},I),this}_prepareEase(I,ie,Te={}){this._moving=!0,ie||Te.moving||this.fire(new t.k("movestart",I)),this._zooming&&!Te.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!Te.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!Te.pitching&&this.fire(new t.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ie=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ie!==this._elevationTarget){let Te=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Te-(ie-(Te*I+this._elevationStart))/(1-I)),this._elevationTarget=ie}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,I)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(I){let ie=I.getCameraPosition(),Te=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitude<Te){let Me=this.calculateCameraOptionsFromTo(ie.lngLat,Te,I.center,I.elevation);return{pitch:Me.pitch,zoom:Me.zoom}}return{}}_applyUpdatedTransform(I){let ie=[];if(this.terrain&&ie.push(Me=>this._elevateCameraIfInsideTerrain(Me)),this.transformCameraUpdate&&ie.push(Me=>this.transformCameraUpdate(Me)),!ie.length)return;let Te=I.clone();for(let Me of ie){let ze=Te.clone(),{center:ht,zoom:wt,pitch:Ot,bearing:$t,elevation:Tr}=Me(ze);ht&&(ze.center=ht),wt!==void 0&&(ze.zoom=wt),Ot!==void 0&&(ze.pitch=Ot),$t!==void 0&&(ze.bearing=$t),Tr!==void 0&&(ze.elevation=Tr),Te.apply(ze)}this.transform.apply(Te)}_fireMoveEvents(I){this.fire(new t.k("move",I)),this._zooming&&this.fire(new t.k("zoom",I)),this._rotating&&this.fire(new t.k("rotate",I)),this._pitching&&this.fire(new t.k("pitch",I))}_afterEase(I,ie){if(this._easeId&&ie&&this._easeId===ie)return;delete this._easeId;let Te=this._zooming,Me=this._rotating,ze=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Te&&this.fire(new t.k("zoomend",I)),Me&&this.fire(new t.k("rotateend",I)),ze&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var Te;if(!I.essential&&n.prefersReducedMotion){let on=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Me=this._getTransformForUpdate(),ze=Me.zoom,ht=Me.bearing,wt=Me.pitch,Ot=Me.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,ht):ht,Tr="pitch"in I?+I.pitch:wt,Ar="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),Ve=Me.pointLocation(na),{center:$e,zoom:ot}=Me.getConstrained(t.N.convert(I.center||Ve),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(ot-ze),Et=Me.project(Ve),bt=Me.project($e).sub(Et),Rt=I.curve,lr=Math.max(Me.width,Me.height),yr=lr/pt,kr=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,ot),Me.minZoom,Me.maxZoom),An=lr/Me.zoomScale(on-ze);Rt=Math.sqrt(An/kr*2)}let jr=Rt*Rt;function Qr(on){let An=(yr*yr-lr*lr+(on?-1:1)*jr*jr*kr*kr)/(2*(on?yr:lr)*jr*kr);return Math.log(Math.sqrt(An*An+1)-An)}function ha(on){return(Math.exp(on)-Math.exp(-on))/2}function Aa(on){return(Math.exp(on)+Math.exp(-on))/2}let Da=Qr(!1),ci=function(on){return Aa(Da)/Aa(Da+Rt*on)},Vi=function(on){return lr*((Aa(Da)*(ha(An=Da+Rt*on)/Aa(An))-ha(Da))/jr)/kr;var An},ji=(Qr(!0)-Da)/Rt;if(Math.abs(kr)<1e-6||!isFinite(ji)){if(Math.abs(lr-yr)<1e-6)return this.easeTo(I,ie);let on=yr<lr?-1:1;ji=Math.abs(Math.log(yr/lr))/Rt,Vi=()=>0,ci=An=>Math.exp(on*Rt*An)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Rt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ht!==$t,this._pitching=Tr!==wt,this._padding=!Me.isPaddingEqual(Ar),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let An=on*ji,Yn=1/ci(An);Me.zoom=on===1?ot:ze+Me.scaleZoom(Yn),this._rotating&&(Me.bearing=t.y.number(ht,$t,on)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,on)),this._padding&&(Me.interpolatePadding(Ot,Ar,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Nn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(An))).mult(Yn));Me.setLocationAtPoint(Me.renderWorldCopies?Nn.wrap():Nn,na),this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ie){var Te;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Me=this._onEaseEnd;delete this._onEaseEnd,Me.call(this,ie)}return I||(Te=this.handlers)===null||Te===void 0||Te.stop(!1),this}_ease(I,ie,Te){Te.animate===!1||Te.duration===0?(I(1),ie()):(this._easeStart=n.now(),this._easeOptions=Te,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let Te=Math.abs(I-ie);return Math.abs(I-360-ie)<Te&&(I-=360),Math.abs(I+360-ie)<Te&&(I+=360),I}_normalizeCenter(I,ie){if(!ie.renderWorldCopies||ie.lngRange)return;let Te=I.lng-ie.center.lng;I.lng+=Te>180?-360:Te<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let Qn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class co{constructor(I=Qn){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=ie=>{!ie||ie.sourceDataType!=="metadata"&&ie.sourceDataType!=="visibility"&&ie.dataType!=="style"&&ie.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=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.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(){i.remove(this._container),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(I,ie){let Te=this._map._getUIString(`AttributionControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Me=>typeof Me!="string"?"":Me)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Me=this._map.style.stylesheet;this.styleOwner=Me.owner,this.styleId=Me.id}let ie=this._map.style.sourceCaches;for(let Me in ie){let ze=ie[Me];if(ze.used||ze.usedForTerrain){let ht=ze.getSource();ht.attribution&&I.indexOf(ht.attribution)<0&&I.push(ht.attribution)}}I=I.filter(Me=>String(Me).trim()),I.sort((Me,ze)=>Me.length-ze.length),I=I.filter((Me,ze)=>{for(let ht=ze+1;ht<I.length;ht++)if(I[ht].indexOf(Me)>=0)return!1;return!0});let Te=I.join(" | ");Te!==this._attribHTML&&(this._attribHTML=Te,I.length?(this._innerContainer.innerHTML=Te,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Tn{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let Te=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Te.classList.add("maplibregl-compact"):Te.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ie=i.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class un{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,Te=ie?this._queue.concat(ie):this._queue;for(let Me of Te)if(Me.id===I)return void(Me.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ie=this._currentlyRunning=this._queue;this._queue=[];for(let Te of ie)if(!Te.cancelled&&(Te.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var go=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ko extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let Te={};for(let Me of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))Te[Me.key]=!0,this._renderableTilesKeys.push(Me.key),this._tiles[Me.key]||(Me.posMatrix=new Float64Array(16),t.aP(Me.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Me.key]=new rt(Me,this.tileSize));for(let Me in this._tiles)Te[Me]||delete this._tiles[Me]}freeRtt(I){for(let ie in this._tiles){let Te=this._tiles[ie];(!I||Te.tileID.equals(I)||Te.tileID.isChildOf(I)||I.isChildOf(Te.tileID))&&(Te.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let Te of this._renderableTilesKeys){let Me=this._tiles[Te].tileID;if(Me.canonical.equals(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16),t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),ie[Te]=ze}else if(Me.canonical.isChildOf(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=Me.canonical.z-I.canonical.z,wt=Me.canonical.x-(Me.canonical.x>>ht<<ht),Ot=Me.canonical.y-(Me.canonical.y>>ht<<ht),$t=t.X>>ht;t.aP(ze.posMatrix,0,$t,0,$t,0,1),t.J(ze.posMatrix,ze.posMatrix,[-wt*$t,-Ot*$t,0]),ie[Te]=ze}else if(I.canonical.isChildOf(Me.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=I.canonical.z-Me.canonical.z,wt=I.canonical.x-(I.canonical.x>>ht<<ht),Ot=I.canonical.y-(I.canonical.y>>ht<<ht),$t=t.X>>ht;t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),t.J(ze.posMatrix,ze.posMatrix,[wt*$t,Ot*$t,0]),t.K(ze.posMatrix,ze.posMatrix,[1/2**ht,1/2**ht,0]),ie[Te]=ze}}return ie}getSourceTile(I,ie){let Te=this.sourceCache._source,Me=I.overscaledZ-this.deltaZoom;if(Me>Te.maxzoom&&(Me=Te.maxzoom),Me<Te.minzoom)return null;this._sourceTileCache[I.key]||(this._sourceTileCache[I.key]=I.scaledTo(Me).key);let ze=this.sourceCache.getTileByID(this._sourceTileCache[I.key]);if((!ze||!ze.dem)&&ie)for(;Me>=Te.minzoom&&(!ze||!ze.dem);)ze=this.sourceCache.getTileByID(I.scaledTo(Me--).key);return ze}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class Ms{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Ko(ie),this.options=Te,this.exaggeration=typeof Te.exaggeration=="number"?Te.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,Te,Me=t.X){var ze;if(!(ie>=0&&ie<Me&&Te>=0&&Te<Me))return 0;let ht=this.getTerrainData(I),wt=(ze=ht.tile)===null||ze===void 0?void 0:ze.dem;if(!wt)return 0;let Ot=function(Ve,$e,ot){var pt=$e[0],Et=$e[1];return Ve[0]=ot[0]*pt+ot[4]*Et+ot[12],Ve[1]=ot[1]*pt+ot[5]*Et+ot[13],Ve}([],[ie/Me*t.X,Te/Me*t.X],ht.u_terrain_matrix),$t=[Ot[0]*wt.dim,Ot[1]*wt.dim],Tr=Math.floor($t[0]),Ar=Math.floor($t[1]),Kr=$t[0]-Tr,na=$t[1]-Ar;return wt.get(Tr,Ar)*(1-Kr)*(1-na)+wt.get(Tr+1,Ar)*Kr*(1-na)+wt.get(Tr,Ar+1)*(1-Kr)*na+wt.get(Tr+1,Ar+1)*Kr*na}getElevationForLngLatZoom(I,ie){if(!t.bb(ie,I.wrap()))return 0;let{tileID:Te,mercatorX:Me,mercatorY:ze}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return this.getElevation(Te,Me%t.X,ze%t.X,t.X)}getElevation(I,ie,Te,Me=t.X){return this.getDEMElevation(I,ie,Te,Me)*this.exaggeration}getTerrainData(I){if(!this._emptyDemTexture){let Me=this.painter.context,ze=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Me,ze,Me.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Me,new t.R({width:1,height:1}),Me.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Me.gl.NEAREST,Me.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}let ie=this.sourceCache.getSourceTile(I,!0);if(ie&&ie.dem&&(!ie.demTexture||ie.needsTerrainPrepare)){let Me=this.painter.context;ie.demTexture=this.painter.getTileTexture(ie.dem.stride),ie.demTexture?ie.demTexture.update(ie.dem.getPixels(),{premultiply:!1}):ie.demTexture=new u(Me,ie.dem.getPixels(),Me.gl.RGBA,{premultiply:!1}),ie.demTexture.bind(Me.gl.NEAREST,Me.gl.CLAMP_TO_EDGE),ie.needsTerrainPrepare=!1}let Te=ie&&ie+ie.tileID.key+I.key;if(Te&&!this._demMatrixCache[Te]){let Me=this.sourceCache.sourceCache._source.maxzoom,ze=I.canonical.z-ie.tileID.canonical.z;I.overscaledZ>I.canonical.z&&(I.canonical.z>=Me?ze=I.canonical.z-Me:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ht=I.canonical.x-(I.canonical.x>>ze<<ze),wt=I.canonical.y-(I.canonical.y>>ze<<ze),Ot=t.bc(new Float64Array(16),[1/(t.X<<ze),1/(t.X<<ze),0]);t.J(Ot,Ot,[ht*t.X,wt*t.X,0]),this._demMatrixCache[I.key]={matrix:Ot,coord:I}}return{u_depth:2,u_terrain:3,u_terrain_dim:ie&&ie.dem&&ie.dem.dim||1,u_terrain_matrix:Te?this._demMatrixCache[I.key].matrix:this._emptyDemMatrix,u_terrain_unpack:ie&&ie.dem&&ie.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(ie&&ie.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:ie}}getFramebuffer(I){let ie=this.painter,Te=ie.width/devicePixelRatio,Me=ie.height/devicePixelRatio;return!this._fbo||this._fbo.width===Te&&this._fbo.height===Me||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(ie.context,{width:Te,height:Me,data:null},ie.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(ie.context.gl.NEAREST,ie.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(ie.context,{width:Te,height:Me,data:null},ie.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(ie.context.gl.NEAREST,ie.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=ie.context.createFramebuffer(Te,Me,!0,!1),this._fbo.depthAttachment.set(ie.context.createRenderbuffer(ie.context.gl.DEPTH_COMPONENT16,Te,Me))),this._fbo.colorAttachment.set(I==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let I=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let ie=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let ze=0,ht=0;ze<this._coordsTextureSize;ze++)for(let wt=0;wt<this._coordsTextureSize;wt++,ht+=4)ie[ht+0]=255&wt,ie[ht+1]=255&ze,ie[ht+2]=wt>>8<<4|ze>>8,ie[ht+3]=0;let Te=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Me=new u(I,Te,I.gl.RGBA,{premultiply:!1});return Me.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Me,Me}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),Te=this.painter.context,Me=Te.gl,ze=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ht=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),wt=Math.round(this.painter.height/devicePixelRatio);Te.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Me.readPixels(ze,wt-ht-1,1,1,Me.RGBA,Me.UNSIGNED_BYTE,ie),Te.bindFramebuffer.set(null);let Ot=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Ar=Tr&&this.sourceCache.getTileByID(Tr);if(!Ar)return null;let Kr=this._coordsTextureSize,na=(1<<Ar.tileID.canonical.z)*Kr;return new t.Z((Ar.tileID.canonical.x*Kr+Ot)/na+Ar.tileID.wrap,(Ar.tileID.canonical.y*Kr+$t)/na,this.getElevation(Ar.tileID,Ot,$t,Kr))}depthAtPoint(I){let ie=new Uint8Array(4),Te=this.painter.context,Me=Te.gl;return Te.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Me.readPixels(I.x,this.painter.height/devicePixelRatio-I.y-1,1,1,Me.RGBA,Me.UNSIGNED_BYTE,ie),Te.bindFramebuffer.set(null),(ie[0]/16777216+ie[1]/65536+ie[2]/256+ie[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let I=this.painter.context,ie=new t.bd,Te=new t.aY,Me=this.meshSize,ze=t.X/Me,ht=Me*Me;for(let Ar=0;Ar<=Me;Ar++)for(let Kr=0;Kr<=Me;Kr++)ie.emplaceBack(Kr*ze,Ar*ze,0);for(let Ar=0;Ar<ht;Ar+=Me+1)for(let Kr=0;Kr<Me;Kr++)Te.emplaceBack(Kr+Ar,Me+Kr+Ar+1,Me+Kr+Ar+2),Te.emplaceBack(Kr+Ar,Me+Kr+Ar+2,Kr+Ar+1);let wt=ie.length,Ot=wt+2*(Me+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Me;Kr++)for(let na of[0,1])ie.emplaceBack(Kr*ze,Ar*t.X,na);for(let Ar=0;Ar<2*Me;Ar+=2)Te.emplaceBack(Ot+Ar,Ot+Ar+1,Ot+Ar+3),Te.emplaceBack(Ot+Ar,Ot+Ar+3,Ot+Ar+2),Te.emplaceBack(wt+Ar,wt+Ar+3,wt+Ar+1),Te.emplaceBack(wt+Ar,wt+Ar+2,wt+Ar+3);let $t=ie.length,Tr=$t+2*(Me+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Me;Kr++)for(let na of[0,1])ie.emplaceBack(Ar*t.X,Kr*ze,na);for(let Ar=0;Ar<2*Me;Ar+=2)Te.emplaceBack($t+Ar,$t+Ar+1,$t+Ar+3),Te.emplaceBack($t+Ar,$t+Ar+3,$t+Ar+2),Te.emplaceBack(Tr+Ar,Tr+Ar+3,Tr+Ar+1),Te.emplaceBack(Tr+Ar,Tr+Ar+2,Tr+Ar+3);return this._mesh=new Lu(I.createVertexBuffer(ie,go.members),I.createIndexBuffer(Te),t.a0.simpleSegment(0,0,ie.length,Te.length)),this._mesh}getMeshFrameDelta(I){return 2*Math.PI*t.be/Math.pow(2,I)/5}getMinTileElevationForLngLatZoom(I,ie){var Te;let{tileID:Me}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return(Te=this.getMinMaxElevation(Me).minElevation)!==null&&Te!==void 0?Te:0}getMinMaxElevation(I){let ie=this.getTerrainData(I).tile,Te={minElevation:null,maxElevation:null};return ie&&ie.dem&&(Te.minElevation=ie.dem.min*this.exaggeration,Te.maxElevation=ie.dem.max*this.exaggeration),Te}_getOverscaledTileIDFromLngLatZoom(I,ie){let Te=t.Z.fromLngLat(I.wrap()),Me=(1<<ie)*t.X,ze=Te.x*Me,ht=Te.y*Me,wt=Math.floor(ze/t.X),Ot=Math.floor(ht/t.X);return{tileID:new t.S(ie,0,ie,wt,Ot),mercatorX:ze,mercatorY:ht}}}class rl{constructor(I,ie,Te){this._context=I,this._size=ie,this._tileSize=Te,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let I of this._objects)I.texture.destroy(),I.fbo.destroy()}_createObject(I){let ie=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Te=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Te.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),ie.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),ie.colorAttachment.set(Te.texture),{id:I,fbo:ie,texture:Te,stamp:-1,inUse:!1}}getObjectForId(I){return this._objects[I]}useObject(I){I.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(ie=>I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(I=>!I.inUse)===!1}}let Ns={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class el{constructor(I,ie){this.painter=I,this.terrain=ie,this.pool=new rl(I.context,30,ie.sourceCache.tileSize*ie.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ie){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Te=>!I._layers[Te].isHidden(ie)),this._coordsDescendingInv={};for(let Te in I.sourceCaches){this._coordsDescendingInv[Te]={};let Me=I.sourceCaches[Te].getVisibleCoordinates();for(let ze of Me){let ht=this.terrain.sourceCache.getTerrainCoords(ze);for(let wt in ht)this._coordsDescendingInv[Te][wt]||(this._coordsDescendingInv[Te][wt]=[]),this._coordsDescendingInv[Te][wt].push(ht[wt])}}this._coordsDescendingInvStr={};for(let Te of I._order){let Me=I._layers[Te],ze=Me.source;if(Ns[Me.type]&&!this._coordsDescendingInvStr[ze]){this._coordsDescendingInvStr[ze]={};for(let ht in this._coordsDescendingInv[ze])this._coordsDescendingInvStr[ze][ht]=this._coordsDescendingInv[ze][ht].map(wt=>wt.key).sort().join()}}for(let Te of this._renderableTiles)for(let Me in this._coordsDescendingInvStr){let ze=this._coordsDescendingInvStr[Me][Te.tileID.key];ze&&ze!==Te.rttCoords[Me]&&(Te.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,Te=this.painter,Me=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Ns[ie]&&(this._prevType&&Ns[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Me))return!0;if(Ns[this._prevType]||Ns[ie]&&Me){this._prevType=ie;let ze=this._stacks.length-1,ht=this._stacks[ze]||[];for(let wt of this._renderableTiles){if(this.pool.isFull()&&(yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(wt),wt.rtt[ze]){let $t=this.pool.getObjectForId(wt.rtt[ze].id);if($t.stamp===wt.rtt[ze].stamp){this.pool.useObject($t);continue}}let Ot=this.pool.getOrCreateFreeObject();this.pool.useObject(Ot),this.pool.stampObject(Ot),wt.rtt[ze]={id:Ot.id,stamp:Ot.stamp},Te.context.bindFramebuffer.set(Ot.fbo.framebuffer),Te.context.clear({color:t.aM.transparent,stencil:0}),Te.currentStencilSource=void 0;for(let $t=0;$t<ht.length;$t++){let Tr=Te.style._layers[ht[$t]],Ar=Tr.source?this._coordsDescendingInv[Tr.source][wt.tileID.key]:[wt.tileID];Te.context.viewport.set([0,0,Ot.fbo.width,Ot.fbo.height]),Te._renderTileClippingMasks(Tr,Ar),Te.renderLayer(Te,Te.style.sourceCaches[Tr.source],Tr,Ar),Tr.source&&(wt.rttCoords[Tr.source]=this._coordsDescendingInvStr[Tr.source][wt.tileID.key])}}return yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Ns[ie]}return!1}}let ws={"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":"Reset bearing to 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","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"},Fl=r,_l={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Qn,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!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],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},ll=Fe=>{Fe.touchstart=Fe.dragStart,Fe.touchmoveWindow=Fe.dragMove,Fe.touchend=Fe.dragEnd},jn={showCompass:!0,showZoom:!0,visualizePitch:!1};class Io{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),i.mousePos(this.element,ht)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,i.mousePos(this.element,ht))},this.mouseup=ht=>{this.mouseRotate.dragEnd(ht),this.mousePitch&&this.mousePitch.dragEnd(ht),this.offTemp()},this.touchstart=ht=>{ht.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ht.targetTouches)[0],this.moveTouch(ht,this._lastPos))},this.touchend=ht=>{ht.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let Me=I.dragRotate._mouseRotate.getClickTolerance(),ze=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=iu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Kc;return new Hu({clickTolerance:wt,move:(Tr,Ar)=>({bearingDelta:(Ar.x-Tr.x)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:Me,enable:!0}),this.map=I,Te&&(this.mousePitch=Vf({clickTolerance:ze,enable:!0}),this.touchPitch=(({enable:ht,clickTolerance:wt,pitchDegreesPerPixelMoved:Ot=-.5})=>{let $t=new Kc;return new Hu({clickTolerance:wt,move:(Tr,Ar)=>({pitchDelta:(Ar.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),i.addEventListener(ie,"mousedown",this.mousedown),i.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),i.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),i.disableDrag()}moveMouse(I,ie){let Te=this.map,{bearingDelta:Me}=this.mouseRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.mousePitch){let{pitchDelta:ze}=this.mousePitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}moveTouch(I,ie){let Te=this.map,{bearingDelta:Me}=this.touchRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.touchPitch){let{pitchDelta:ze}=this.touchPitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Js;function Ds(Fe,I,ie){let Te=new t.N(Fe.lng,Fe.lat);if(Fe=new t.N(Fe.lng,Fe.lat),I){let Me=new t.N(Fe.lng-360,Fe.lat),ze=new t.N(Fe.lng+360,Fe.lat),ht=ie.locationPoint(Fe).distSqr(I);ie.locationPoint(Me).distSqr(I)<ht?Fe=Me:ie.locationPoint(ze).distSqr(I)<ht&&(Fe=ze)}for(;Math.abs(Fe.lng-ie.center.lng)>180;){let Me=ie.locationPoint(Fe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Fe.lng>ie.center.lng?Fe.lng-=360:Fe.lng+=360}return Fe.lng!==Te.lng&&ie.locationPoint(Fe).y>ie.height/2-ie.getHorizon()?Fe:Te}let uu={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 Iu(Fe,I,ie){let Te=Fe.classList;for(let Me in uu)Te.remove(`maplibregl-${ie}-anchor-${Me}`);Te.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let Te=ie.code,Me=ie.charCode||ie.keyCode;Te!=="Space"&&Te!=="Enter"&&Me!==32&&Me!==13||this.togglePopup()},this._onMapClick=ie=>{let Te=ie.originalEvent.target,Me=this._element;this._popup&&(Te===Me||Me.contains(Te))&&this.togglePopup()},this._update=ie=>{var Te;if(!this._map)return;let Me=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Me)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Ds(this._lngLat,this._flatPos,this._map.transform):(Te=this._lngLat)===null||Te===void 0?void 0:Te.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let ze="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ze=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ze=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ht="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ht="rotateX(0deg)":this._pitchAlignment==="map"&&(ht=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${uu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let Te=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=Te}this._isDragging&&(this._pos=ie.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 t.k("dragstart"))),this.fire(new t.k("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 t.k("dragend")),this._state="inactive"},this._addDragHandler=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.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=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ie=i.createNS("http://www.w3.org/2000/svg","svg"),Te=41,Me=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${Te}px`),ie.setAttributeNS(null,"width",`${Me}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Me} ${Te}`);let ze=i.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"stroke","none"),ze.setAttributeNS(null,"stroke-width","1"),ze.setAttributeNS(null,"fill","none"),ze.setAttributeNS(null,"fill-rule","evenodd");let ht=i.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=i.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),wt.setAttributeNS(null,"fill","#000000");let Ot=[{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 pt of Ot){let Et=i.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",pt.rx),Et.setAttributeNS(null,"ry",pt.ry),wt.appendChild(Et)}let $t=i.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=i.createNS("http://www.w3.org/2000/svg","path");Tr.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"),$t.appendChild(Tr);let Ar=i.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"opacity","0.25"),Ar.setAttributeNS(null,"fill","#000000");let Kr=i.createNS("http://www.w3.org/2000/svg","path");Kr.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"),Ar.appendChild(Kr);let na=i.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let Ve=i.createNS("http://www.w3.org/2000/svg","g");Ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=i.createNS("http://www.w3.org/2000/svg","circle");$e.setAttributeNS(null,"fill","#000000"),$e.setAttributeNS(null,"opacity","0.25"),$e.setAttributeNS(null,"cx","5.5"),$e.setAttributeNS(null,"cy","5.5"),$e.setAttributeNS(null,"r","5.4999962");let ot=i.createNS("http://www.w3.org/2000/svg","circle");ot.setAttributeNS(null,"fill","#FFFFFF"),ot.setAttributeNS(null,"cx","5.5"),ot.setAttributeNS(null,"cy","5.5"),ot.setAttributeNS(null,"r","5.4999962"),Ve.appendChild($e),Ve.appendChild(ot),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Ar),ht.appendChild(na),ht.appendChild(Ve),ie.appendChild(ht),ie.setAttributeNS(null,"height",Te*this._scale+"px"),ie.setAttributeNS(null,"width",Me*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),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("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),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Me=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Me,-1*(38.1-13.5+Me)],"bottom-right":[-Me,-1*(38.1-13.5+Me)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ie,Te;if(!(!((ie=this._map)===null||ie===void 0)&&ie.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Me=this._map,ze=Me.terrain.depthAtPoint(this._pos),ht=Me.terrain.getElevationForLngLatZoom(this._lngLat,Me.transform.tileZoom);if(Me.transform.lngLatToCameraDepth(this._lngLat,ht)-ze<.006)return void(this._element.style.opacity=this._opacity);let wt=-this._offset.y/Me.transform._pixelPerMeter,Ot=Math.sin(Me.getPitch()*Math.PI/180)*wt,$t=Me.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Me.transform.lngLatToCameraDepth(this._lngLat,ht+Ot)-$t>.006;!((Te=this._popup)===null||Te===void 0)&&Te.isOpen()&&Tr&&this._popup.remove(),this._element.style.opacity=Tr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=t.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(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(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ie){return I===void 0&&ie===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ie!==void 0&&(this._opacityWhenCovered=ie),this._map&&this._updateOpacity(!0),this}}let Ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Rc=!1,Au={maxWidth:100,unit:"metric"};function yc(Fe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Fe._container.clientHeight/2,ze=Fe.unproject([0,Me]),ht=Fe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Fe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Fe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Fe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Fe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Fe._getUIString("ScaleControl.Meters"))}function fo(Fe,I,ie,Te){let Me=function(ze){let ht=Math.pow(10,`${Math.floor(ze)}`.length-1),wt=ze/ht;return wt=wt>=10?10:wt>=5?5:wt>=3?3:wt>=2?2:wt>=1?1:function(Ot){let $t=Math.pow(10,Math.ceil(-Math.log(Ot)/Math.LN10));return Math.round(Ot*$t)/$t}(wt),ht*wt}(ie);Fe.style.width=I*(Me/ie)+"px",Fe.innerHTML=`${Me}&nbsp;${Te}`}let zo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Dc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function lc(Fe){if(Fe){if(typeof Fe=="number"){let I=Math.round(Math.abs(Fe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Fe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Fe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Fe,0),right:new t.P(-Fe,0)}}if(Fe instanceof t.P||Array.isArray(Fe)){let I=t.P.convert(Fe);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:t.P.convert(Fe.center||[0,0]),top:t.P.convert(Fe.top||[0,0]),"top-left":t.P.convert(Fe["top-left"]||[0,0]),"top-right":t.P.convert(Fe["top-right"]||[0,0]),bottom:t.P.convert(Fe.bottom||[0,0]),"bottom-left":t.P.convert(Fe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Fe["bottom-right"]||[0,0]),left:t.P.convert(Fe.left||[0,0]),right:t.P.convert(Fe.right||[0,0])}}return lc(new t.P(0,0))}let Yu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=co,e.BoxZoomHandler=Pu,e.CanvasSource=tt,e.CooperativeGesturesHandler=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=pn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Fe={}){super(),this._onFullscreenChange=()=>{var I;let ie=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ie?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Fe&&Fe.container&&(Fe.container instanceof HTMLElement?this._container=Fe.container:t.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(Fe){return this._map=Fe,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Fe=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Fe).setAttribute("aria-hidden","true"),Fe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Fe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Fe),this._fullscreenButton.title=Fe}_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 t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=Re,e.GeolocateControl=class extends t.E{constructor(Fe){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,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(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ie=new t.N(I.coords.longitude,I.coords.latitude),Te=I.coords.accuracy,Me=this._map.getBearing(),ze=t.e({bearing:Me},this.options.fitBoundsOptions),ht=re.fromLngLat(ie,Te);this._map.fitBounds(ht,ze,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=I=>{if(this._map){if(this.options.trackUserLocation)if(I.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 ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},Ic,Fe)}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),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(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Fe){let I=this._map.getMaxBounds(),ie=Fe.coords;return I&&(ie.longitude<I.getWest()||ie.longitude>I.getEast()||ie.latitude<I.getSouth()||ie.latitude>I.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":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Fe=this._map.getBounds(),I=Fe.getSouthEast(),ie=Fe.getNorthEast(),Te=I.distanceTo(ie),Me=Math.ceil(this._accuracy/(Te/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Me}px`,this._circleElement.style.height=`${Me}px`}trigger(){if(!this._setup)return t.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 t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":bu--,Rc=!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 t.k("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 t.k("trackuserlocationstart")),this.fire(new t.k("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 Fe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Fe={maximumAge:6e5,timeout:0},Rc=!0):(Fe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Fe)}}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)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=br,e.LngLatBounds=re,e.LogoControl=Tn,e.Map=class extends no{constructor(Fe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},_l),Fe);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new El(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ws),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ie=!1,Te=qf(Me=>{this._trackResize&&!this._removed&&(this.resize(Me),this.redraw())},50);this._resizeObserver=new ResizeObserver(Me=>{ie?Te(Me):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new $n(this,I),this._hash=I.hash&&new Qf(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,t.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new co(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new Tn,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ie=>{this._update(ie.dataType==="style"),this.fire(new t.k(`${ie.dataType}data`,ie))}),this.on("dataloading",ie=>{this.fire(new t.k(`${ie.dataType}dataloading`,ie))}),this.on("dataabort",ie=>{this.fire(new t.k("sourcedataabort",ie))})}_getMapId(){return this._mapId}addControl(Fe,I){if(I===void 0&&(I=Fe.getDefaultPosition?Fe.getDefaultPosition():"top-right"),!Fe||!Fe.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ie=Fe.onAdd(this);this._controls.push(Fe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Fe){if(!Fe||!Fe.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let I=this._controls.indexOf(Fe);return I>-1&&this._controls.splice(I,1),Fe.onRemove(this),this}hasControl(Fe){return this._controls.indexOf(Fe)>-1}calculateCameraOptionsFromTo(Fe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Fe,I,ie,Te)}resize(Fe){var I;let ie=this._containerDimensions(),Te=ie[0],Me=ie[1],ze=this._getClampedPixelRatio(Te,Me);if(this._resizeCanvas(Te,Me,ze),this.painter.resize(Te,Me,ze),this.painter.overLimit()){let wt=this.painter.context.gl;this._maxCanvasSize=[wt.drawingBufferWidth,wt.drawingBufferHeight];let Ot=this._getClampedPixelRatio(Te,Me);this._resizeCanvas(Te,Me,Ot),this.painter.resize(Te,Me,Ot)}this.transform.resize(Te,Me),(I=this._requestedCameraState)===null||I===void 0||I.resize(Te,Me);let ht=!this._moving;return ht&&(this.stop(),this.fire(new t.k("movestart",Fe)).fire(new t.k("move",Fe))),this.fire(new t.k("resize",Fe)),ht&&this.fire(new t.k("moveend",Fe)),this}_getClampedPixelRatio(Fe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Fe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Fe;return(Fe=this._overridePixelRatio)!==null&&Fe!==void 0?Fe:devicePixelRatio}setPixelRatio(Fe){this._overridePixelRatio=Fe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Fe){return this.transform.setMaxBounds(re.convert(Fe)),this._update()}setMinZoom(Fe){if((Fe=Fe??-2)>=-2&&Fe<=this.transform.maxZoom)return this.transform.minZoom=Fe,this._update(),this.getZoom()<Fe&&this.setZoom(Fe),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Fe){if((Fe=Fe??22)>=this.transform.minZoom)return this.transform.maxZoom=Fe,this._update(),this.getZoom()>Fe&&this.setZoom(Fe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Fe){if((Fe=Fe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Fe>=0&&Fe<=this.transform.maxPitch)return this.transform.minPitch=Fe,this._update(),this.getPitch()<Fe&&this.setPitch(Fe),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Fe){if((Fe=Fe??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Fe>=this.transform.minPitch)return this.transform.maxPitch=Fe,this._update(),this.getPitch()>Fe&&this.setPitch(Fe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Fe){return this.transform.renderWorldCopies=Fe,this._update()}project(Fe){return this.transform.locationPoint(t.N.convert(Fe),this.style&&this.terrain)}unproject(Fe){return this.transform.pointLocation(t.P.convert(Fe),this.terrain)}isMoving(){var Fe;return this._moving||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isMoving())}isZooming(){var Fe;return this._zooming||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isZooming())}isRotating(){var Fe;return this._rotating||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isRotating())}_createDelegatedListener(Fe,I,ie){if(Fe==="mouseenter"||Fe==="mouseover"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ze=>{let ht=I.filter(Ot=>this.getLayer(Ot)),wt=ht.length!==0?this.queryRenderedFeatures(ze.point,{layers:ht}):[];wt.length?Te||(Te=!0,ie.call(this,new au(Fe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Fe==="mouseleave"||Fe==="mouseout"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ht=>{let wt=I.filter(Ot=>this.getLayer(Ot));(wt.length!==0?this.queryRenderedFeatures(ht.point,{layers:wt}):[]).length?Te=!0:Te&&(Te=!1,ie.call(this,new au(Fe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new au(Fe,this,ht.originalEvent)))}}}}{let Te=Me=>{let ze=I.filter(wt=>this.getLayer(wt)),ht=ze.length!==0?this.queryRenderedFeatures(Me.point,{layers:ze}):[];ht.length&&(Me.features=ht,ie.call(this,Me),delete Me.features)};return{layers:I,listener:ie,delegates:{[Fe]:Te}}}}_saveDelegatedListener(Fe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Fe]=this._delegatedListeners[Fe]||[],this._delegatedListeners[Fe].push(I)}_removeDelegatedListener(Fe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Fe])return;let Te=this._delegatedListeners[Fe];for(let Me=0;Me<Te.length;Me++){let ze=Te[Me];if(ze.listener===ie&&ze.layers.length===I.length&&ze.layers.every(ht=>I.includes(ht))){for(let ht in ze.delegates)this.off(ht,ze.delegates[ht]);return void Te.splice(Me,1)}}}on(Fe,I,ie){if(ie===void 0)return super.on(Fe,I);let Te=this._createDelegatedListener(Fe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Fe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Fe,I,ie){if(ie===void 0)return super.once(Fe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Fe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Fe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Fe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Fe,I,ie){return ie===void 0?super.off(Fe,I):(this._removeDelegatedListener(Fe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Fe,I){if(!this.style)return[];let ie,Te=Fe instanceof t.P||Array.isArray(Fe),Me=Te?Fe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Fe)||{},Me instanceof t.P||typeof Me[0]=="number")ie=[t.P.convert(Me)];else{let ze=t.P.convert(Me[0]),ht=t.P.convert(Me[1]);ie=[ze,new t.P(ht.x,ze.y),ht,new t.P(ze.x,ht.y),ze]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Fe,I){return this.style.querySourceFeatures(Fe,I)}setStyle(Fe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Fe?(this._diffStyle(Fe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Fe,I))}setTransformRequest(Fe){return this._requestManager.setTransformRequest(Fe),this}_getUIString(Fe){let I=this._locale[Fe];if(I==null)throw new Error(`Missing UI string '${Fe}'`);return I}_updateStyle(Fe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Fe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Fe)),Fe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Fe=="string"?this.style.loadURL(Fe,I,ie):this.style.loadJSON(Fe,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Rr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Fe,I){if(typeof Fe=="string"){let ie=this._requestManager.transformRequest(Fe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Fe=="object"&&this._updateDiff(Fe,I)}_updateDiff(Fe,I){try{this.style.setState(Fe,I)&&this._update(!0)}catch(ie){t.w(`Unable to perform style diff: ${ie.message||ie.error||ie}. Rebuilding the style from scratch.`),this._updateStyle(Fe,I)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(Fe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Fe,I),this._update(!0)}isSourceLoaded(Fe){let I=this.style&&this.style.sourceCaches[Fe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Fe}'`)))}setTerrain(Fe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Fe){let I=this.style.sourceCaches[Fe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Fe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Fe.source&&t.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.")}this.terrain=new Ms(this.painter,I,Fe),this.painter.renderToTexture=new el(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ie=>{ie.dataType==="style"?this.terrain.sourceCache.freeRtt():ie.dataType==="source"&&ie.tile&&(ie.sourceId!==Fe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ie.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:Fe})),this}getTerrain(){var Fe,I;return(I=(Fe=this.terrain)===null||Fe===void 0?void 0:Fe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Fe=this.style&&this.style.sourceCaches;for(let I in Fe){let ie=Fe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Fe){return this.style.removeSource(Fe),this._update(!0)}getSource(Fe){return this.style.getSource(Fe)}addImage(Fe,I,ie={}){let{pixelRatio:Te=1,sdf:Me=!1,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new t.j(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:Tr,height:Ar,data:Kr}=I,na=I;return this.style.addImage(Fe,{data:new t.R({width:Tr,height:Ar},new Uint8Array(Kr)),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Fe),this}}{let{width:Tr,height:Ar,data:Kr}=n.getImageData(I);this.style.addImage(Fe,{data:new t.R({width:Tr,height:Ar},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Fe,I){let ie=this.style.getImage(Fe);if(!ie)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Te=I instanceof HTMLImageElement||t.b(I)?n.getImageData(I):I,{width:Me,height:ze,data:ht}=Te;if(Me===void 0||ze===void 0)return this.fire(new t.j(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(Me!==ie.data.width||ze!==ie.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let wt=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(ht,wt),this.style.updateImage(Fe,ie),this}getImage(Fe){return this.style.getImage(Fe)}hasImage(Fe){return Fe?!!this.style.getImage(Fe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Fe){this.style.removeImage(Fe)}loadImage(Fe){return l.getImage(this._requestManager.transformRequest(Fe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Fe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Fe,I),this._update(!0)}moveLayer(Fe,I){return this.style.moveLayer(Fe,I),this._update(!0)}removeLayer(Fe){return this.style.removeLayer(Fe),this._update(!0)}getLayer(Fe){return this.style.getLayer(Fe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Fe,I,ie){return this.style.setLayerZoomRange(Fe,I,ie),this._update(!0)}setFilter(Fe,I,ie={}){return this.style.setFilter(Fe,I,ie),this._update(!0)}getFilter(Fe){return this.style.getFilter(Fe)}setPaintProperty(Fe,I,ie,Te={}){return this.style.setPaintProperty(Fe,I,ie,Te),this._update(!0)}getPaintProperty(Fe,I){return this.style.getPaintProperty(Fe,I)}setLayoutProperty(Fe,I,ie,Te={}){return this.style.setLayoutProperty(Fe,I,ie,Te),this._update(!0)}getLayoutProperty(Fe,I){return this.style.getLayoutProperty(Fe,I)}setGlyphs(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Fe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Fe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Fe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Fe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Fe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Fe,I,ie=>{ie||this._update(!0)}),this}setLight(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Fe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Fe){return this._lazyInitEmptyStyle(),this.style.setSky(Fe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Fe,I){return this.style.setFeatureState(Fe,I),this._update()}removeFeatureState(Fe,I){return this.style.removeFeatureState(Fe,I),this._update()}getFeatureState(Fe){return this.style.getFeatureState(Fe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Fe=0,I=0;return this._container&&(Fe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Fe,I]}_setupContainer(){let Fe=this._container;Fe.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",Fe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),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 ie=this._containerDimensions(),Te=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],Te);let Me=this._controlContainer=i.create("div","maplibregl-control-container",Fe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=i.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Fe,I,ie){this._canvas.width=Math.floor(ie*Fe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Fe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Fe={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Te=>{I={requestedAttributes:Fe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Fe)||this._canvas.getContext("webgl",Fe);if(!ie){let Te="Failed to initialize WebGL";throw I?(I.message=Te,new Error(JSON.stringify(I))):new Error(Te)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Fe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Fe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Fe){return this._update(),this._renderTaskQueue.add(Fe)}_cancelRenderFrame(Fe){this._renderTaskQueue.remove(Fe)}_render(Fe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Fe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=n.now();this.style.zoomHistory.update(Me,ze);let ht=new t.z(Me,{now:ze,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),wt=ht.crossFadingFactor();wt===1&&wt===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=wt),this.style.update(ht)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ie)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Te=this._sourcesDirty||this._styleDirty||this._placementDirty;return Te||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||Te||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Fe;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(Fe=this._resizeObserver)===null||Fe===void 0||Fe.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Fe=>{t.bf.frame(Fe),this._frameRequest=null,this._render(Fe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Fe){this._showTileBoundaries!==Fe&&(this._showTileBoundaries=Fe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Fe){this._showPadding!==Fe&&(this._showPadding=Fe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Fe){this._showCollisionBoxes!==Fe&&(this._showCollisionBoxes=Fe,Fe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Fe){this._showOverdrawInspector!==Fe&&(this._showOverdrawInspector=Fe,this._update())}get repaint(){return!!this._repaint}set repaint(Fe){this._repaint!==Fe&&(this._repaint=Fe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Fe){this._vertices=Fe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=au,e.MapTouchEvent=Yc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Fe){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),Te=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=Te,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",Te.toString())},this._rotateCompassArrow=()=>{let I=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=I},this._setButtonTitle=(I,ie)=>{let Te=this._map._getUIString(`NavigationControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)},this.options=t.e({},jn,Fe),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Fe){return this._map=Fe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Io(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Fe,I){let ie=i.create("button",Fe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Fe){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let wt of this.options.className.split(" "))this._container.classList.add(wt);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Ds(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let Te=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let Me=this.options.anchor,ze=lc(this.options.offset);if(!Me){let wt=this._container.offsetWidth,Ot=this._container.offsetHeight,$t;$t=Te.y+ze.bottom.y<Ot?["top"]:Te.y>this._map.transform.height-Ot?["bottom"]:[],Te.x<wt/2?$t.push("left"):Te.x>this._map.transform.width-wt/2&&$t.push("right"),Me=$t.length===0?"bottom":$t.join("-")}let ht=Te.add(ze[Me]);this.options.subpixelPositioning||(ht=ht.round()),i.setTransform(this._container,`${uu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(zo),Fe)}addTo(Fe){return this._map&&this.remove(),this._map=Fe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Fe){return this._lngLat=t.N.convert(Fe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("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._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Fe){return this.setDOMContent(document.createTextNode(Fe))}setHTML(Fe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Fe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Fe;return(Fe=this._container)===null||Fe===void 0?void 0:Fe.style.maxWidth}setMaxWidth(Fe){return this.options.maxWidth=Fe,this._update(),this}setDOMContent(Fe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Fe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Fe){return this._container&&this._container.classList.add(Fe),this}removeClassName(Fe){return this._container&&this._container.classList.remove(Fe),this}setOffset(Fe){return this.options.offset=Fe,this._update(),this}toggleClassName(Fe){if(this._container)return this._container.classList.toggle(Fe)}setSubpixelPositioning(Fe){this.options.subpixelPositioning=Fe}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Fe=this._container.querySelector(Dc);Fe&&Fe.focus()}},e.RasterDEMTileSource=Ie,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Fe){this._onMove=()=>{yc(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Au),Fe)}getDefaultPosition(){return"bottom-left"}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Fe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Rr,e.TerrainControl=class{constructor(Fe){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=Fe}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.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(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=Jc,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Fe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Fe))throw new Error(`A source type called "${Fe}" already exists.`);((ie,Te)=>{qe[ie]=Te})(Fe,I)}),e.clearPrewarmedResources=function(){let Fe=de;Fe&&(Fe.isPreloaded()&&Fe.numActive()===1?(Fe.release($),de=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()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return le.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Fe){return q().broadcast("IS",Fe)},e.prewarm=function(){Y().acquire($)},e.setMaxParallelImageRequests=function(Fe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Fe},e.setRTLTextPlugin=function(Fe,I){return Ye().setRTLTextPlugin(Fe,I)},e.setWorkerCount=function(Fe){le.workerCount=Fe},e.setWorkerUrl=function(Fe){t.a.WORKER_URL=Fe}});var E=d;return E})}}),VV=He({"src/plots/map/layers.js"(Z,V){"use strict";var d=sa(),x=ou().sanitizeHTML,S=D6(),E=b0();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s<i.length;s++){var h=i[s].id;if(typeof h=="string"&&h.indexOf(E.traceLayerPrefix)===0){n=h;break}}return n},t.updateLayer=function(n){var i=this.subplot,s=o(n),h=this.lookupBelow(),f=this.findFollowingMapLayerId(h);this.removeLayer(),r(n)&&i.addLayer({id:this.idLayer,source:this.idSource,"source-layer":n.sourcelayer||"",type:n.type,minzoom:n.minzoom,maxzoom:n.maxzoom,layout:s.layout,paint:s.paint},f),this.layerType=n.type,this.below=h},t.updateStyle=function(n){if(r(n)){var i=o(n);this.subplot.setOptions(this.idLayer,"setLayoutProperty",i.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",i.paint)}},t.removeLayer=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer)},t.dispose=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer),n.getSource(this.idSource)&&n.removeSource(this.idSource)};function r(n){if(!n.visible)return!1;var i=n.source;if(Array.isArray(i)&&i.length>0){for(var s=0;s<i.length;s++)if(typeof i[s]!="string"||i[s].length===0)return!1;return!0}return d.isPlainObject(i)||typeof i=="string"&&i.length>0}function o(n){var i={},s={};switch(n.type){case"circle":d.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":d.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,f=S(h.textposition,h.iconsize);d.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),d.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},f;return i==="geojson"?f="data":i==="vector"?f=typeof s=="string"?"url":"tiles":i==="raster"?(f="tiles",h.tileSize=256):i==="image"&&(f="url",h.coordinates=n.coordinates),h[f]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}V.exports=function(i,s,h){var f=new e(i,s);return f.update(h),f}}}),GV=He({"src/plots/map/map.js"(Z,V){"use strict";var d=qV(),x=sa(),S=g0(),E=lo(),e=Ho(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,v=b0(),c=VV();function T(g,b){this.id=b,this.gd=g;var p=g._fullLayout,u=g._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,p){var u=this,y;u.map?y=new Promise(function(m,R){u.updateMap(g,b,m,R)}):y=new Promise(function(m,R){u.createMap(g,b,m,R)}),p.push(y)},l.createMap=function(g,b,p,u){var y=this,m=b[y.id],R=y.styleObj=w(m.style),L=m.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new d.Map({container:y.div,style:R.style,center:M(m.center),zoom:m.zoom,bearing:m.bearing,pitch:m.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(P){var U=P.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".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",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var O=[];O.push(new Promise(function(P){F.once("load",P)})),O=O.concat(S.fetchTraceGeoData(g)),Promise.all(O).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.updateMap=function(g,b,p,u){var y=this,m=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,m.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){m.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(g,b){var p=b[this.id],u=p.layers,y,m,R=this.belowLookup={},L=!1;for(y=0;y<g.length;y++){var z=g[y][0].trace,F=z._module;typeof z.below=="string"?m=z.below:F.getBelow&&(m=F.getBelow(z,this)),m===""&&(L=!0),R["trace-"+z.uid]=m||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?m=N.below:L?m="traces":m="",R["layout-"+y]=m}var O={},P,U;for(P in R)m=R[P],O[m]?O[m].push(P):O[m]=[P];for(m in O){var B=O[m];if(B.length>1)for(y=0;y<B.length;y++)P=B[y],P.indexOf("trace-")===0?(U=P.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):P.indexOf("layout-")===0&&(U=P.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var _={choroplethmap:0,densitymap:1,scattermap:2};l.updateData=function(g){var b=this.traceHash,p,u,y,m,R=g.slice().sort(function(O,P){return _[O[0].trace.type]-_[P[0].trace.type]});for(y=0;y<R.length;y++){var L=R[y];u=L[0].trace,p=b[u.uid];var z=!1;p&&(p.type===u.type?(p.update(L),z=!0):p.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(y=0;y<F.length;y++){var N=F[y];for(m=0;m<g.length;m++)if(u=g[m][0].trace,N===u.uid)continue e;p=b[N],p.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,p=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(p.center)),b.setZoom(p.zoom),b.setBearing(p.bearing),b.setPitch(p.pitch)),this.updateLayers(g),this.updateFramework(g),this.updateFx(g),this.map.resize(),this.gd._context._scrollZoom.map?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(g){var b=this.map;b.on("render",function p(){b.loaded()&&(b.off("render",p),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function p(){g(new Error(v.mapOnErrorMsg))}b.once("error",p),b.once("style.error",p),b.once("source.error",p),b.once("tile.error",p),b.once("layer.error",p)},l.createFramework=function(g){var b=this,p=b.div=document.createElement("div");p.id=b.uid,p.style.position="absolute",b.container.appendChild(p),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(g),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,g)},l.initFx=function(g,b){var p=this,u=p.gd,y=p.map;y.on("moveend",function(L){if(p.map){var z=u._fullLayout;if(L.originalEvent||p.wheeling){var F=z[p.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,p.getViewEdits(F));var N=p.getView();F._input.center=F.center=N.center,F._input.zoom=F.zoom=N.zoom,F._input.bearing=F.bearing=N.bearing,F._input.pitch=F.pitch=N.pitch,u.emit("plotly_relayout",p.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?p.dragging=!1:p.wheeling&&(p.wheeling=!1),z&&z._rehover&&z._rehover()}}),y.on("wheel",function(){p.wheeling=!0}),y.on("mousemove",function(L){var z=p.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},p.xaxis.p2c=function(){return y.unproject(F).lng},p.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===p.id&&u._fullLayout[p.id]&&r.hover(u,L,p.id)},r.hover(u,L,p.id),u._fullLayout._hoversubplot=p.id});function m(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){p.dragging=!0,m()}),y.on("zoomstart",m),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=p.getView();u.emit("plotly_relayouting",p.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[p.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,p.getViewEdits(L));var z=p.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=p.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",p.getViewEditsWithDerived(F))}),p.clearOutline=function(){h(p.dragOptions),s(p.dragOptions.gd)},p.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var m=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),n(m)||a(m)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,m)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,p=g._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],p=b.layers,u=this.layerList,y;if(p.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<p.length;y++)u.push(c(this,y,p[y]))}else for(y=0;y<p.length;y++)u[y].update(p[y])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(g,b,p){for(var u in p)this.map[b](g,u,p[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var p=this.map;if(typeof b=="string"){if(b===""){p.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){p.addLayer(g,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}p.addLayer(g)},l.project=function(g){return this.map.project(new d.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),p=b.lng,u=b.lat,y={lon:p,lat:u},m=g.getCanvas(),R=parseInt(m.style.width),L=parseInt(m.style.height);return{center:y,zoom:g.getZoom(),bearing:g.getBearing(),pitch:g.getPitch(),_derived:{coordinates:[g.unproject([0,0]).toArray(),g.unproject([R,0]).toArray(),g.unproject([R,L]).toArray(),g.unproject([0,L]).toArray()]}}},l.getViewEdits=function(g){for(var b=this.id,p=["center","zoom","bearing","pitch"],u={},y=0;y<p.length;y++){var m=p[y];u[b+"."+m]=g[m]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,p=this.getViewEdits(g);return p[b+"._derived"]=g._derived,p};function w(g){var b={};return x.isPlainObject(g)?(b.id=g.id,b.style=g):typeof g=="string"?(b.id=g,v.stylesMap[g]?b.style=v.stylesMap[g]:b.style=g):(b.id=v.styleValueDflt,b.style=A(v.styleValueDflt)),b.transition={duration:0,delay:0},b}function A(g){return v.styleUrlPrefix+g+"-"+v.styleUrlSuffix}function M(g){return[g.lon,g.lat]}V.exports=T}}),HV=He({"src/plots/map/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=o0(),S=hp(),E=kx();V.exports=function(o,a,n){x(o,a,n,{type:"map",attributes:E,handleDefaults:e,partition:"y"})};function e(r,o,a){a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var n=a("bounds.west"),i=a("bounds.east"),s=a("bounds.south"),h=a("bounds.north");(n===void 0||i===void 0||s===void 0||h===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(v,c){return d.coerce(r,o,E.layers,v,c)}var n=a("visible");if(n){var i=a("sourcetype"),s=i==="raster"||i==="image";a("source"),a("sourceattribution"),i==="vector"&&a("sourcelayer"),i==="image"&&a("coordinates");var h;s&&(h="raster");var f=a("type",h);s&&f!=="raster"&&(f=o.type="raster",d.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),f==="circle"&&a("circle.radius"),f==="line"&&(a("line.width"),a("line.dash")),f==="fill"&&a("fill.outlinecolor"),f==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),d.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),CT=He({"src/plots/map/index.js"(Z){"use strict";var V=sa(),d=V.strTranslate,x=V.strScale,S=Hh().getSubplotCalcData,E=vd(),e=Wn(),t=es(),r=ou(),o=GV(),a="map";Z.name=a,Z.attr="subplot",Z.idRoot=a,Z.idRegex=Z.attrRegex=V.counterRegex(a),Z.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Z.layoutAttributes=kx(),Z.supplyLayoutDefaults=HV(),Z.plot=function(i){for(var s=i._fullLayout,h=i.calcdata,f=s._subplots[a],v=0;v<f.length;v++){var c=f[v],T=S(h,a,c),l=s[c],_=l._subplot;_||(_=new o(i,c),s[c]._subplot=_),_.viewInitial||(_.viewInitial={center:V.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),_.plot(T,s,i._promises)}},Z.clean=function(n,i,s,h){for(var f=h._subplots[a]||[],v=0;v<f.length;v++){var c=f[v];!i[c]&&h[c]._subplot&&h[c]._subplot.destroy()}},Z.toSVG=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=i._size,f=0;f<s.length;f++){var v=i[s[f]],c=v.domain,T=v._subplot,l=T.toImage("png"),_=i._glimages.append("svg:image");_.attr({xmlns:E.svg,"xlink:href":l,x:h.l+h.w*c.x[0],y:h.t+h.h*(1-c.y[1]),width:h.w*(c.x[1]-c.x[0]),height:h.h*(c.y[1]-c.y[0]),preserveAspectRatio:"none"});var w=e.select(v._subplot.div),A=w.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),M=i._glimages.append("g"),g=M.append("text");g.text(A).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":A});var b=t.bBox(g.node()),p=h.w*(c.x[1]-c.x[0]);if(b.width>p/2){var u=A.split("|").join("<br>");g.text(u).attr("data-unformatted",u).call(r.convertToTspans,n),b=t.bBox(g.node())}g.attr("transform",d(-3,-b.height+8)),M.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;b.width+6>p&&(y=p/(b.width+6));var m=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];M.attr("transform",d(m[0],m[1])+x(y))}},Z.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=0;h<s.length;h++){var f=i[s[h]]._subplot;f.updateFx(i)}}}}),WV=He({"src/traces/scattermap/index.js"(Z,V){"use strict";V.exports={attributes:ET(),supplyDefaults:OV(),colorbar:pp(),formatLabels:R6(),calc:iT(),plot:NV(),hoverPoints:kT().hoverPoints,eventData:UV(),selectPoints:jV(),styleOnSelect:function(d,x){if(x){var S=x[0].trace;S._glTrace.update(x)}},moduleType:"trace",name:"scattermap",basePlotModule:CT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),XV=He({"lib/scattermap.js"(Z,V){"use strict";V.exports=WV()}}),z6=He({"src/traces/choroplethmap/attributes.js"(Z,V){"use strict";var d=k1(),x=ku(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ru(),t=Qo().extendFlat;V.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},d.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d.text,hovertext:d.hovertext,marker:{line:{color:t({},d.marker.line.color,{editType:"plot"}),width:t({},d.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},d.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},d.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},d.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),ZV=He({"src/traces/choroplethmap/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=z6();V.exports=function(e,t,r,o){function a(f,v){return d.coerce(e,t,S,f,v)}var n=a("locations"),i=a("z"),s=a("geojson");if(!d.isArrayOrTypedArray(n)||!n.length||!d.isArrayOrTypedArray(i)||!i.length||!(typeof s=="string"&&s!==""||d.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,i.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var h=a("marker.line.width");h&&a("marker.line.color"),a("marker.opacity"),x(e,t,o,a,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(t,a)}}}),F6=He({"src/traces/choroplethmap/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=rc(),E=es(),e=m0().makeBlank,t=g0();function r(a){var n=a[0].trace,i=n.visible===!0&&n._length!==0,s={layout:{visibility:"none"},paint:{}},h={layout:{visibility:"none"},paint:{}},f=n._opts={fill:s,line:h,geojson:e()};if(!i)return f;var v=t.extractTraceFeature(a);if(!v)return f;var c=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var m=y.mo;return d(m)?+x.constrain(m,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(y){return y.mlc});var A;x.isArrayOrTypedArray(l.width)&&(A=function(y){return y.mlw});for(var M=0;M<a.length;M++){var g=a[M],b=g.fOut;if(b){var p=b.properties;p.fc=c(g.z),_&&(p.mo=_(g)),w&&(p.mlc=w(g)),A&&(p.mlw=A(g)),g.ct=p.ct,g._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(h.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",h.layout.visibility="visible",f.geojson={type:"FeatureCollection",features:v},o(a),f}function o(a){var n=a[0].trace,i=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),f=0;f<a.length;f++){var v=a[f];v.fOut&&(v.fOut.properties.mo2=h.selectedOpacityFn(v))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(n.marker.opacity)?{type:"identity",property:"mo"}:n.marker.opacity;return x.extendFlat(i.fill.paint,{"fill-opacity":s}),x.extendFlat(i.line.paint,{"line-opacity":s}),i}V.exports={convert:r,convertOnSelect:o}}}),YV=He({"src/traces/choroplethmap/plot.js"(Z,V){"use strict";var d=F6().convert,x=F6().convertOnSelect,S=b0().traceLayerPrefix;function E(t,r){this.type="choroplethmap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(d(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var n=0;n<o.length;n++){var i=o[n],s=i[0],h=i[1],f=t[s];r.setOptions(h,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",f.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,n=this.sourceId,i=0;i<a.length;i++){var s=a[i],h=s[0],f=t[h];o.addLayer({type:h,id:s[1],source:n,layout:f.layout,paint:f.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},V.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=d(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),KV=He({"src/traces/choroplethmap/index.js"(Z,V){"use strict";V.exports={attributes:z6(),supplyDefaults:ZV(),colorbar:n0(),calc:lT(),plot:YV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(d,x){if(x){var S=x[0].trace;S._glTrace.updateOnSelect(x)}},getBelow:function(d,x){for(var S=x.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t<S.length;t++)if(e=S[t].id,typeof e=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmap",basePlotModule:CT(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),JV=He({"lib/choroplethmap.js"(Z,V){"use strict";V.exports=KV()}}),O6=He({"src/traces/densitymap/attributes.js"(Z,V){"use strict";var d=ku(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ru(),e=ET(),t=Qo().extendFlat;V.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},d("",{cLetter:"z",editTypeOverride:"calc"}))}}),$V=He({"src/traces/densitymap/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=O6();V.exports=function(e,t,r,o){function a(h,f){return d.coerce(e,t,S,h,f)}var n=a("lon")||[],i=a("lat")||[],s=Math.min(n.length,i.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),x(e,t,o,a,{prefix:"",cLetter:"z"})}}}),QV=He({"src/traces/densitymap/calc.js"(Z,V){"use strict";var d=as(),x=sa().isArrayOrTypedArray,S=Ws().BADNUM,E=Tp(),e=sa()._;V.exports=function(r,o){for(var a=o._length,n=new Array(a),i=o.z,s=x(i)&&i.length,h=0;h<a;h++){var f=n[h]={},v=o.lon[h],c=o.lat[h];if(f.lonlat=d(v)&&d(c)?[+v,+c]:[S,S],s){var T=i[h];f.z=d(T)?T:S}}return E(r,o,{vals:s?i:[0,1],containerStr:"",cLetter:"z"}),a&&(n[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),n}}}),eG=He({"src/traces/densitymap/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Jn(),E=rc(),e=Ws().BADNUM,t=m0().makeBlank;V.exports=function(o){var a=o[0].trace,n=a.visible===!0&&a._length!==0,i={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:i,geojson:t()};if(!n)return s;var h=[],f,v=a.z,c=a.radius,T=x.isArrayOrTypedArray(v)&&v.length,l=x.isArrayOrTypedArray(c);for(f=0;f<o.length;f++){var _=o[f],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=d(c[f])&&c[f]>0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,p=b[0][1],u=S.opacity(p)<1?p:S.addOpacity(p,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f<b.length;f++)y.push(b[f][0],b[f][1]);var m=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?m:1/(g.max-g.min),"heatmap-color":y,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:h},s.heatmap.layout.visibility="visible",s}}}),tG=He({"src/traces/densitymap/plot.js"(Z,V){"use strict";var d=eG(),x=b0().traceLayerPrefix;function S(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=d(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var n=0;n<r.length;n++){var i=r[n],s=i[0],h=i[1],f=o[s];t.setOptions(h,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",f.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,n=0;n<o.length;n++){var i=o[n],s=i[0],h=e[s];r.addLayer({type:s,id:i[1],source:a,layout:h.layout,paint:h.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),rG=He({"src/traces/densitymap/hover.js"(Z,V){"use strict";var d=Ho(),x=kT().hoverPoints,S=kT().getExtraText;V.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),aG=He({"src/traces/densitymap/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),iG=He({"src/traces/densitymap/index.js"(Z,V){"use strict";V.exports={attributes:O6(),supplyDefaults:$V(),colorbar:n0(),formatLabels:R6(),calc:QV(),plot:tG(),hoverPoints:rG(),eventData:aG(),getBelow:function(d,x){for(var S=x.getMapLayers(),E=0;E<S.length;E++){var e=S[E],t=e.id;if(e.type==="symbol"&&typeof t=="string"&&t.indexOf("plotly-")===-1)return t}},moduleType:"trace",name:"densitymap",basePlotModule:CT(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),nG=He({"lib/densitymap.js"(Z,V){"use strict";V.exports=iG()}}),B6=He({"src/traces/sankey/attributes.js"(Z,V){"use strict";var d=tc(),x=ru(),S=sh(),E=Ky(),e=wc().attributes,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=ku(),a=zl().templatedArray,n=tf().descriptionOnlyNumbers,i=Qo().extendFlat,s=pc().overrideAll,h=V.exports=s({hoverinfo:i({},x.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:E.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:n("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:d({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:S.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:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},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:S.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:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:a("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(o().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),oG=He({"src/traces/sankey/defaults.js"(Z,V){"use strict";var d=sa(),x=B6(),S=Jn(),E=Ch(),e=wc().defaults,t=k_(),r=zl(),o=hp();V.exports=function(i,s,h,f){function v(L,z){return d.coerce(i,s,x,L,z)}var c=d.extendDeep(f.hoverlabel,i.hoverlabel),T=i.node,l=r.newContainer(s,"node");function _(L,z){return d.coerce(T,l,x.node,L,z)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",i.hoverinfo),t(T,l,_,c),_("hovertemplate"),_("align");var w=f.colorway,A=function(L){return w[L%w.length]};_("color",l.label.map(function(L,z){return S.addOpacity(A(z),.8)})),_("customdata");var M=i.link||{},g=r.newContainer(s,"link");function b(L,z){return d.coerce(M,g,x.link,L,z)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",i.hoverinfo),t(M,g,b,c),b("hovertemplate");var p=E(f.paper_bgcolor).getLuminance()<.333,u=p?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=b("color",u);function m(L){var z=E(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=p?z.brighten():z.darken(),z.toRgbString()}b("hovercolor",Array.isArray(y)?y.map(m):m(y)),b("customdata"),o(M,g,{name:"colorscales",handleItemDefaults:a}),e(s,f,v),v("orientation"),v("valueformat"),v("valuesuffix");var R;l.x.length&&l.y.length&&(R="freeform"),v("arrangement",R),d.coerceFont(v,"textfont",f.font,{autoShadowDflt:!0}),s._length=null};function a(n,i){function s(h,f){return d.coerce(n,i,x.link.colorscales,h,f)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),N6=He({"node_modules/strongly-connected-components/scc.js"(Z,V){"use strict";V.exports=d;function d(x){for(var S=x.length,E=new Array(S),e=new Array(S),t=new Array(S),r=new Array(S),o=new Array(S),a=new Array(S),n=0;n<S;++n)E[n]=-1,e[n]=0,t[n]=!1,r[n]=0,o[n]=-1,a[n]=[];var i=0,s=[],h=[];function f(l){var _=[l],w=[l];for(E[l]=e[l]=i,t[l]=!0,i+=1;w.length>0;){l=w[w.length-1];var A=x[l];if(r[l]<A.length){for(var M=r[l];M<A.length;++M){var g=A[M];if(E[g]<0){E[g]=e[g]=i,t[g]=!0,i+=1,_.push(g),w.push(g);break}else t[g]&&(e[l]=Math.min(e[l],e[g])|0);o[g]>=0&&a[l].push(o[g])}r[l]=M}else{if(e[l]===E[l]){for(var b=[],p=[],u=0,M=_.length-1;M>=0;--M){var y=_[M];if(t[y]=!1,b.push(y),p.push(a[y]),u+=a[y].length,o[y]=s.length,y===l){_.length=M;break}}s.push(b);for(var m=new Array(u),M=0;M<p.length;M++)for(var R=0;R<p[M].length;R++)m[--u]=p[M][R];h.push(m)}w.pop()}}}for(var n=0;n<S;++n)E[n]<0&&f(n);for(var v,n=0;n<h.length;n++){var c=h[n];if(c.length!==0){c.sort(function(_,w){return _-w}),v=[c[0]];for(var T=1;T<c.length;T++)c[T]!==c[T-1]&&v.push(c[T]);h[n]=v}}return{components:s,adjacencyList:h}}}}),sG=He({"src/traces/sankey/calc.js"(Z,V){"use strict";var d=N6(),x=sa(),S=kv().wrap,E=x.isArrayOrTypedArray,e=x.isIndex,t=rc();function r(a){var n=a.node,i=a.link,s=[],h=E(i.color),f=E(i.hovercolor),v=E(i.customdata),c={},T={},l=i.colorscales.length,_;for(_=0;_<l;_++){var w=i.colorscales[_],A=t.extractScale(w,{cLetter:"c"}),M=t.makeColorScaleFunc(A);T[w.label]=M}var g=0;for(_=0;_<i.value.length;_++)i.source[_]>g&&(g=i.source[_]),i.target[_]>g&&(g=i.target[_]);var b=g+1;a.node._count=b;var p,u=a.node.groups,y={};for(_=0;_<u.length;_++){var m=u[_];for(p=0;p<m.length;p++){var R=m[p],L=b+_;y.hasOwnProperty(R)?x.warn("Node "+R+" is already part of a group."):y[R]=L}}var z={source:[],target:[]};for(_=0;_<i.value.length;_++){var F=i.value[_],N=i.source[_],O=i.target[_];if(F>0&&e(N,b)&&e(O,b)&&!(y.hasOwnProperty(N)&&y.hasOwnProperty(O)&&y[N]===y[O])){y.hasOwnProperty(O)&&(O=y[O]),y.hasOwnProperty(N)&&(N=y[N]),N=+N,O=+O,c[N]=c[O]=!0;var P="";i.label&&i.label[_]&&(P=i.label[_]);var U=null;P&&T.hasOwnProperty(P)&&(U=T[P]),s.push({pointNumber:_,label:P,color:h?i.color[_]:i.color,hovercolor:f?i.hovercolor[_]:i.hovercolor,customdata:v?i.customdata[_]:i.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,X=E(n.color),$=E(n.customdata),le=[];for(_=0;_<B;_++)if(c[_]){var ce=n.label[_];le.push({group:_>b-1,childrenNodes:[],pointNumber:_,label:ce,color:X?n.color[_]:n.color,customdata:$?n.customdata[_]:n.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:le,groups:u,groupLookup:y}}function o(a,n,i){for(var s=x.init2dArray(a,0),h=0;h<Math.min(n.length,i.length);h++)if(x.isIndex(n[h],a)&&x.isIndex(i[h],a)){if(n[h]===i[h])return!0;s[n[h]].push(i[h])}var f=d(s);return f.components.some(function(v){return v.length>1})}V.exports=function(n,i){var s=r(i);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),lG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){var p=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(p,u),p,u,b)}function S(b,p,u,y){if(isNaN(p)||isNaN(u))return b;var m,R=b._root,L={data:y},z=b._x0,F=b._y0,N=b._x1,O=b._y1,P,U,B,X,$,le,ce,de;if(!R)return b._root=L,b;for(;R.length;)if(($=p>=(P=(z+N)/2))?z=P:N=P,(le=u>=(U=(F+O)/2))?F=U:O=U,m=R,!(R=R[ce=le<<1|$]))return m[ce]=L,b;if(B=+b._x.call(null,R.data),X=+b._y.call(null,R.data),p===B&&u===X)return L.next=R,m?m[ce]=L:b._root=L,b;do m=m?m[ce]=new Array(4):b._root=new Array(4),($=p>=(P=(z+N)/2))?z=P:N=P,(le=u>=(U=(F+O)/2))?F=U:O=U;while((ce=le<<1|$)===(de=(X>=U)<<1|B>=P));return m[de]=R,m[ce]=L,b}function E(b){var p,u,y=b.length,m,R,L=new Array(y),z=new Array(y),F=1/0,N=1/0,O=-1/0,P=-1/0;for(u=0;u<y;++u)isNaN(m=+this._x.call(null,p=b[u]))||isNaN(R=+this._y.call(null,p))||(L[u]=m,z[u]=R,m<F&&(F=m),m>O&&(O=m),R<N&&(N=R),R>P&&(P=R));if(F>O||N>P)return this;for(this.cover(F,N).cover(O,P),u=0;u<y;++u)S(this,L[u],z[u],b[u]);return this}function e(b,p){if(isNaN(b=+b)||isNaN(p=+p))return this;var u=this._x0,y=this._y0,m=this._x1,R=this._y1;if(isNaN(u))m=(u=Math.floor(b))+1,R=(y=Math.floor(p))+1;else{for(var L=m-u,z=this._root,F,N;u>b||b>=m||y>p||p>=R;)switch(N=(p<y)<<1|b<u,F=new Array(4),F[N]=z,z=F,L*=2,N){case 0:m=u+L,R=y+L;break;case 1:u=m-L,R=y+L;break;case 2:m=u+L,y=R-L;break;case 3:u=m-L,y=R-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=y,this._x1=m,this._y1=R,this}function t(){var b=[];return this.visit(function(p){if(!p.length)do b.push(p.data);while(p=p.next)}),b}function r(b){return arguments.length?this.cover(+b[0][0],+b[0][1]).cover(+b[1][0],+b[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(b,p,u,y,m){this.node=b,this.x0=p,this.y0=u,this.x1=y,this.y1=m}function a(b,p,u){var y,m=this._x0,R=this._y0,L,z,F,N,O=this._x1,P=this._y1,U=[],B=this._root,X,$;for(B&&U.push(new o(B,m,R,O,P)),u==null?u=1/0:(m=b-u,R=p-u,O=b+u,P=p+u,u*=u);X=U.pop();)if(!(!(B=X.node)||(L=X.x0)>O||(z=X.y0)>P||(F=X.x1)<m||(N=X.y1)<R))if(B.length){var le=(L+F)/2,ce=(z+N)/2;U.push(new o(B[3],le,ce,F,N),new o(B[2],L,ce,le,N),new o(B[1],le,z,F,ce),new o(B[0],L,z,le,ce)),($=(p>=ce)<<1|b>=le)&&(X=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=X)}else{var de=b-+this._x.call(null,B.data),G=p-+this._y.call(null,B.data),Y=de*de+G*G;if(Y<u){var ee=Math.sqrt(u=Y);m=b-ee,R=p-ee,O=b+ee,P=p+ee,y=B.data}}return y}function n(b){if(isNaN(O=+this._x.call(null,b))||isNaN(P=+this._y.call(null,b)))return this;var p,u=this._root,y,m,R,L=this._x0,z=this._y0,F=this._x1,N=this._y1,O,P,U,B,X,$,le,ce;if(!u)return this;if(u.length)for(;;){if((X=O>=(U=(L+F)/2))?L=U:F=U,($=P>=(B=(z+N)/2))?z=B:N=B,p=u,!(u=u[le=$<<1|X]))return this;if(!u.length)break;(p[le+1&3]||p[le+2&3]||p[le+3&3])&&(y=p,ce=le)}for(;u.data!==b;)if(m=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,m?(R?m.next=R:delete m.next,this):p?(R?p[le]=R:delete p[le],(u=p[0]||p[1]||p[2]||p[3])&&u===(p[3]||p[2]||p[1]||p[0])&&!u.length&&(y?y[ce]=u:this._root=u),this):(this._root=R,this)}function i(b){for(var p=0,u=b.length;p<u;++p)this.remove(b[p]);return this}function s(){return this._root}function h(){var b=0;return this.visit(function(p){if(!p.length)do++b;while(p=p.next)}),b}function f(b){var p=[],u,y=this._root,m,R,L,z,F;for(y&&p.push(new o(y,this._x0,this._y0,this._x1,this._y1));u=p.pop();)if(!b(y=u.node,R=u.x0,L=u.y0,z=u.x1,F=u.y1)&&y.length){var N=(R+z)/2,O=(L+F)/2;(m=y[3])&&p.push(new o(m,N,O,z,F)),(m=y[2])&&p.push(new o(m,R,O,N,F)),(m=y[1])&&p.push(new o(m,N,L,z,O)),(m=y[0])&&p.push(new o(m,R,L,N,O))}return this}function v(b){var p=[],u=[],y;for(this._root&&p.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));y=p.pop();){var m=y.node;if(m.length){var R,L=y.x0,z=y.y0,F=y.x1,N=y.y1,O=(L+F)/2,P=(z+N)/2;(R=m[0])&&p.push(new o(R,L,z,O,P)),(R=m[1])&&p.push(new o(R,O,z,F,P)),(R=m[2])&&p.push(new o(R,L,P,O,N)),(R=m[3])&&p.push(new o(R,O,P,F,N))}u.push(y)}for(;y=u.pop();)b(y.node,y.x0,y.y0,y.x1,y.y1);return this}function c(b){return b[0]}function T(b){return arguments.length?(this._x=b,this):this._x}function l(b){return b[1]}function _(b){return arguments.length?(this._y=b,this):this._y}function w(b,p,u){var y=new A(p??c,u??l,NaN,NaN,NaN,NaN);return b==null?y:y.addAll(b)}function A(b,p,u,y,m,R){this._x=b,this._y=p,this._x0=u,this._y0=y,this._x1=m,this._y1=R,this._root=void 0}function M(b){for(var p={data:b.data},u=p;b=b.next;)u=u.next={data:b.data};return p}var g=w.prototype=A.prototype;g.copy=function(){var b=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),p=this._root,u,y;if(!p)return b;if(!p.length)return b._root=M(p),b;for(u=[{source:p,target:b._root=new Array(4)}];p=u.pop();)for(var m=0;m<4;++m)(y=p.source[m])&&(y.length?u.push({source:y,target:p.target[m]=new Array(4)}):p.target[m]=M(y));return b},g.add=x,g.addAll=E,g.cover=e,g.data=t,g.extent=r,g.find=a,g.remove=n,g.removeAll=i,g.root=s,g.size=h,g.visit=f,g.visitAfter=v,g.x=T,g.y=_,d.quadtree=w,Object.defineProperty(d,"__esModule",{value:!0})})}}),LT=He({"node_modules/d3-collection/dist/d3-collection.js"(Z,V){(function(d,x){x(typeof Z=="object"&&typeof V<"u"?Z:d.d3=d.d3||{})})(Z,function(d){"use strict";var x="$";function S(){}S.prototype=E.prototype={constructor:S,has:function(c){return x+c in this},get:function(c){return this[x+c]},set:function(c,T){return this[x+c]=T,this},remove:function(c){var T=x+c;return T in this&&delete this[T]},clear:function(){for(var c in this)c[0]===x&&delete this[c]},keys:function(){var c=[];for(var T in this)T[0]===x&&c.push(T.slice(1));return c},values:function(){var c=[];for(var T in this)T[0]===x&&c.push(this[T]);return c},entries:function(){var c=[];for(var T in this)T[0]===x&&c.push({key:T.slice(1),value:this[T]});return c},size:function(){var c=0;for(var T in this)T[0]===x&&++c;return c},empty:function(){for(var c in this)if(c[0]===x)return!1;return!0},each:function(c){for(var T in this)T[0]===x&&c(this[T],T.slice(1),this)}};function E(c,T){var l=new S;if(c instanceof S)c.each(function(g,b){l.set(b,g)});else if(Array.isArray(c)){var _=-1,w=c.length,A;if(T==null)for(;++_<w;)l.set(_,c[_]);else for(;++_<w;)l.set(T(A=c[_],_,c),A)}else if(c)for(var M in c)l.set(M,c[M]);return l}function e(){var c=[],T=[],l,_,w;function A(g,b,p,u){if(b>=c.length)return l!=null&&g.sort(l),_!=null?_(g):g;for(var y=-1,m=g.length,R=c[b++],L,z,F=E(),N,O=p();++y<m;)(N=F.get(L=R(z=g[y])+""))?N.push(z):F.set(L,[z]);return F.each(function(P,U){u(O,U,A(P,b,p,u))}),O}function M(g,b){if(++b>c.length)return g;var p,u=T[b-1];return _!=null&&b>=c.length?p=g.entries():(p=[],g.each(function(y,m){p.push({key:m,values:M(y,b)})})),u!=null?p.sort(function(y,m){return u(y.key,m.key)}):p}return w={object:function(g){return A(g,0,t,r)},map:function(g){return A(g,0,o,a)},entries:function(g){return M(A(g,0,o,a),0)},key:function(g){return c.push(g),w},sortKeys:function(g){return T[c.length-1]=g,w},sortValues:function(g){return l=g,w},rollup:function(g){return _=g,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return E()}function a(c,T,l){c.set(T,l)}function n(){}var i=E.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(c){return c+="",this[x+c]=c,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(c,T){var l=new n;if(c instanceof n)c.each(function(A){l.add(A)});else if(c){var _=-1,w=c.length;if(T==null)for(;++_<w;)l.add(c[_]);else for(;++_<w;)l.add(T(c[_],_,c))}return l}function h(c){var T=[];for(var l in c)T.push(l);return T}function f(c){var T=[];for(var l in c)T.push(c[l]);return T}function v(c){var T=[];for(var l in c)T.push({key:l,value:c[l]});return T}d.nest=e,d.set=s,d.map=E,d.keys=h,d.values=f,d.entries=v,Object.defineProperty(d,"__esModule",{value:!0})})}}),uG=He({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x={value:function(){}};function S(){for(var o=0,a=arguments.length,n={},i;o<a;++o){if(!(i=arguments[o]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new E(n)}function E(o){this._=o}function e(o,a){return o.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!a.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var n=this._,i=e(o+"",n),s,h=-1,f=i.length;if(arguments.length<2){for(;++h<f;)if((s=(o=i[h]).type)&&(s=t(n[s],o.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++h<f;)if(s=(o=i[h]).type)n[s]=r(n[s],o.name,a);else if(a==null)for(s in n)n[s]=r(n[s],o.name,null);return this},copy:function(){var o={},a=this._;for(var n in a)o[n]=a[n].slice();return new E(o)},call:function(o,a){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,h;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(h=this._[o],i=0,s=h.length;i<s;++i)h[i].value.apply(a,n)},apply:function(o,a,n){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var i=this._[o],s=0,h=i.length;s<h;++s)i[s].value.apply(a,n)}};function t(o,a){for(var n=0,i=o.length,s;n<i;++n)if((s=o[n]).name===a)return s.value}function r(o,a,n){for(var i=0,s=o.length;i<s;++i)if(o[i].name===a){o[i]=x,o=o.slice(0,i).concat(o.slice(i+1));break}return n!=null&&o.push({name:a,value:n}),o}d.dispatch=S,Object.defineProperty(d,"__esModule",{value:!0})})}}),cG=He({"node_modules/d3-timer/dist/d3-timer.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=0,S=0,E=0,e=1e3,t,r,o=0,a=0,n=0,i=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(b){setTimeout(b,17)};function h(){return a||(s(f),a=i.now()+n)}function f(){a=0}function v(){this._call=this._time=this._next=null}v.prototype=c.prototype={constructor:v,restart:function(b,p,u){if(typeof b!="function")throw new TypeError("callback is not a function");u=(u==null?h():+u)+(p==null?0:+p),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=b,this._time=u,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function c(b,p,u){var y=new v;return y.restart(b,p,u),y}function T(){h(),++x;for(var b=t,p;b;)(p=a-b._time)>=0&&b._call.call(null,p),b=b._next;--x}function l(){a=(o=i.now())+n,x=S=0;try{T()}finally{x=0,w(),a=0}}function _(){var b=i.now(),p=b-o;p>e&&(n-=p,o=b)}function w(){for(var b,p=t,u,y=1/0;p;)p._call?(y>p._time&&(y=p._time),b=p,p=p._next):(u=p._next,p._next=null,p=b?b._next=u:t=u);r=b,A(y)}function A(b){if(!x){S&&(S=clearTimeout(S));var p=b-a;p>24?(b<1/0&&(S=setTimeout(l,b-i.now()-n)),E&&(E=clearInterval(E))):(E||(o=i.now(),E=setInterval(_,e)),x=1,s(l))}}function M(b,p,u){var y=new v;return p=p==null?0:+p,y.restart(function(m){y.stop(),b(m+p)},p,u),y}function g(b,p,u){var y=new v,m=p;return p==null?(y.restart(b,p,u),y):(p=+p,u=u==null?h():+u,y.restart(function R(L){L+=m,y.restart(R,m+=p,u),b(L)},p,u),y)}d.interval=g,d.now=h,d.timeout=M,d.timer=c,d.timerFlush=T,Object.defineProperty(d,"__esModule",{value:!0})})}}),fG=He({"node_modules/d3-force/dist/d3-force.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,lG(),LT(),uG(),cG()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3,d.d3)})(Z,function(d,x,S,E,e){"use strict";function t(b,p){var u;b==null&&(b=0),p==null&&(p=0);function y(){var m,R=u.length,L,z=0,F=0;for(m=0;m<R;++m)L=u[m],z+=L.x,F+=L.y;for(z=z/R-b,F=F/R-p,m=0;m<R;++m)L=u[m],L.x-=z,L.y-=F}return y.initialize=function(m){u=m},y.x=function(m){return arguments.length?(b=+m,y):b},y.y=function(m){return arguments.length?(p=+m,y):p},y}function r(b){return function(){return b}}function o(){return(Math.random()-.5)*1e-6}function a(b){return b.x+b.vx}function n(b){return b.y+b.vy}function i(b){var p,u,y=1,m=1;typeof b!="function"&&(b=r(b==null?1:+b));function R(){for(var F,N=p.length,O,P,U,B,X,$,le=0;le<m;++le)for(O=x.quadtree(p,a,n).visitAfter(L),F=0;F<N;++F)P=p[F],X=u[P.index],$=X*X,U=P.x+P.vx,B=P.y+P.vy,O.visit(ce);function ce(de,G,Y,ee,q){var se=de.data,ae=de.r,j=X+ae;if(se){if(se.index>P.index){var Q=U-se.x-se.vx,re=B-se.y-se.vy,pe=Q*Q+re*re;pe<j*j&&(Q===0&&(Q=o(),pe+=Q*Q),re===0&&(re=o(),pe+=re*re),pe=(j-(pe=Math.sqrt(pe)))/pe*y,P.vx+=(Q*=pe)*(j=(ae*=ae)/($+ae)),P.vy+=(re*=pe)*j,se.vx-=Q*(j=1-j),se.vy-=re*j)}return}return G>U+j||ee<U-j||Y>B+j||q<B-j}}function L(F){if(F.data)return F.r=u[F.data.index];for(var N=F.r=0;N<4;++N)F[N]&&F[N].r>F.r&&(F.r=F[N].r)}function z(){if(p){var F,N=p.length,O;for(u=new Array(N),F=0;F<N;++F)O=p[F],u[O.index]=+b(O,F,p)}}return R.initialize=function(F){p=F,z()},R.iterations=function(F){return arguments.length?(m=+F,R):m},R.strength=function(F){return arguments.length?(y=+F,R):y},R.radius=function(F){return arguments.length?(b=typeof F=="function"?F:r(+F),z(),R):b},R}function s(b){return b.index}function h(b,p){var u=b.get(p);if(!u)throw new Error("missing: "+p);return u}function f(b){var p=s,u=O,y,m=r(30),R,L,z,F,N=1;b==null&&(b=[]);function O($){return 1/Math.min(z[$.source.index],z[$.target.index])}function P($){for(var le=0,ce=b.length;le<N;++le)for(var de=0,G,Y,ee,q,se,ae,j;de<ce;++de)G=b[de],Y=G.source,ee=G.target,q=ee.x+ee.vx-Y.x-Y.vx||o(),se=ee.y+ee.vy-Y.y-Y.vy||o(),ae=Math.sqrt(q*q+se*se),ae=(ae-R[de])/ae*$*y[de],q*=ae,se*=ae,ee.vx-=q*(j=F[de]),ee.vy-=se*j,Y.vx+=q*(j=1-j),Y.vy+=se*j}function U(){if(L){var $,le=L.length,ce=b.length,de=S.map(L,p),G;for($=0,z=new Array(le);$<ce;++$)G=b[$],G.index=$,typeof G.source!="object"&&(G.source=h(de,G.source)),typeof G.target!="object"&&(G.target=h(de,G.target)),z[G.source.index]=(z[G.source.index]||0)+1,z[G.target.index]=(z[G.target.index]||0)+1;for($=0,F=new Array(ce);$<ce;++$)G=b[$],F[$]=z[G.source.index]/(z[G.source.index]+z[G.target.index]);y=new Array(ce),B(),R=new Array(ce),X()}}function B(){if(L)for(var $=0,le=b.length;$<le;++$)y[$]=+u(b[$],$,b)}function X(){if(L)for(var $=0,le=b.length;$<le;++$)R[$]=+m(b[$],$,b)}return P.initialize=function($){L=$,U()},P.links=function($){return arguments.length?(b=$,U(),P):b},P.id=function($){return arguments.length?(p=$,P):p},P.iterations=function($){return arguments.length?(N=+$,P):N},P.strength=function($){return arguments.length?(u=typeof $=="function"?$:r(+$),B(),P):u},P.distance=function($){return arguments.length?(m=typeof $=="function"?$:r(+$),X(),P):m},P}function v(b){return b.x}function c(b){return b.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function _(b){var p,u=1,y=.001,m=1-Math.pow(y,1/300),R=0,L=.6,z=S.map(),F=e.timer(O),N=E.dispatch("tick","end");b==null&&(b=[]);function O(){P(),N.call("tick",p),u<y&&(F.stop(),N.call("end",p))}function P(X){var $,le=b.length,ce;X===void 0&&(X=1);for(var de=0;de<X;++de)for(u+=(R-u)*m,z.each(function(G){G(u)}),$=0;$<le;++$)ce=b[$],ce.fx==null?ce.x+=ce.vx*=L:(ce.x=ce.fx,ce.vx=0),ce.fy==null?ce.y+=ce.vy*=L:(ce.y=ce.fy,ce.vy=0);return p}function U(){for(var X=0,$=b.length,le;X<$;++X){if(le=b[X],le.index=X,le.fx!=null&&(le.x=le.fx),le.fy!=null&&(le.y=le.fy),isNaN(le.x)||isNaN(le.y)){var ce=T*Math.sqrt(X),de=X*l;le.x=ce*Math.cos(de),le.y=ce*Math.sin(de)}(isNaN(le.vx)||isNaN(le.vy))&&(le.vx=le.vy=0)}}function B(X){return X.initialize&&X.initialize(b),X}return U(),p={tick:P,restart:function(){return F.restart(O),p},stop:function(){return F.stop(),p},nodes:function(X){return arguments.length?(b=X,U(),z.each(B),p):b},alpha:function(X){return arguments.length?(u=+X,p):u},alphaMin:function(X){return arguments.length?(y=+X,p):y},alphaDecay:function(X){return arguments.length?(m=+X,p):+m},alphaTarget:function(X){return arguments.length?(R=+X,p):R},velocityDecay:function(X){return arguments.length?(L=1-X,p):1-L},force:function(X,$){return arguments.length>1?($==null?z.remove(X):z.set(X,B($)),p):z.get(X)},find:function(X,$,le){var ce=0,de=b.length,G,Y,ee,q,se;for(le==null?le=1/0:le*=le,ce=0;ce<de;++ce)q=b[ce],G=X-q.x,Y=$-q.y,ee=G*G+Y*Y,ee<le&&(se=q,le=ee);return se},on:function(X,$){return arguments.length>1?(N.on(X,$),p):N.on(X)}}}function w(){var b,p,u,y=r(-30),m,R=1,L=1/0,z=.81;function F(U){var B,X=b.length,$=x.quadtree(b,v,c).visitAfter(O);for(u=U,B=0;B<X;++B)p=b[B],$.visit(P)}function N(){if(b){var U,B=b.length,X;for(m=new Array(B),U=0;U<B;++U)X=b[U],m[X.index]=+y(X,U,b)}}function O(U){var B=0,X,$,le=0,ce,de,G;if(U.length){for(ce=de=G=0;G<4;++G)(X=U[G])&&($=Math.abs(X.value))&&(B+=X.value,le+=$,ce+=$*X.x,de+=$*X.y);U.x=ce/le,U.y=de/le}else{X=U,X.x=X.data.x,X.y=X.data.y;do B+=m[X.data.index];while(X=X.next)}U.value=B}function P(U,B,X,$){if(!U.value)return!0;var le=U.x-p.x,ce=U.y-p.y,de=$-B,G=le*le+ce*ce;if(de*de/z<G)return G<L&&(le===0&&(le=o(),G+=le*le),ce===0&&(ce=o(),G+=ce*ce),G<R&&(G=Math.sqrt(R*G)),p.vx+=le*U.value*u/G,p.vy+=ce*U.value*u/G),!0;if(U.length||G>=L)return;(U.data!==p||U.next)&&(le===0&&(le=o(),G+=le*le),ce===0&&(ce=o(),G+=ce*ce),G<R&&(G=Math.sqrt(R*G)));do U.data!==p&&(de=m[U.data.index]*u/G,p.vx+=le*de,p.vy+=ce*de);while(U=U.next)}return F.initialize=function(U){b=U,N()},F.strength=function(U){return arguments.length?(y=typeof U=="function"?U:r(+U),N(),F):y},F.distanceMin=function(U){return arguments.length?(R=U*U,F):Math.sqrt(R)},F.distanceMax=function(U){return arguments.length?(L=U*U,F):Math.sqrt(L)},F.theta=function(U){return arguments.length?(z=U*U,F):Math.sqrt(z)},F}function A(b,p,u){var y,m=r(.1),R,L;typeof b!="function"&&(b=r(+b)),p==null&&(p=0),u==null&&(u=0);function z(N){for(var O=0,P=y.length;O<P;++O){var U=y[O],B=U.x-p||1e-6,X=U.y-u||1e-6,$=Math.sqrt(B*B+X*X),le=(L[O]-$)*R[O]*N/$;U.vx+=B*le,U.vy+=X*le}}function F(){if(y){var N,O=y.length;for(R=new Array(O),L=new Array(O),N=0;N<O;++N)L[N]=+b(y[N],N,y),R[N]=isNaN(L[N])?0:+m(y[N],N,y)}}return z.initialize=function(N){y=N,F()},z.strength=function(N){return arguments.length?(m=typeof N=="function"?N:r(+N),F(),z):m},z.radius=function(N){return arguments.length?(b=typeof N=="function"?N:r(+N),F(),z):b},z.x=function(N){return arguments.length?(p=+N,z):p},z.y=function(N){return arguments.length?(u=+N,z):u},z}function M(b){var p=r(.1),u,y,m;typeof b!="function"&&(b=r(b==null?0:+b));function R(z){for(var F=0,N=u.length,O;F<N;++F)O=u[F],O.vx+=(m[F]-O.x)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),m=new Array(F),z=0;z<F;++z)y[z]=isNaN(m[z]=+b(u[z],z,u))?0:+p(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(p=typeof z=="function"?z:r(+z),L(),R):p},R.x=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}function g(b){var p=r(.1),u,y,m;typeof b!="function"&&(b=r(b==null?0:+b));function R(z){for(var F=0,N=u.length,O;F<N;++F)O=u[F],O.vy+=(m[F]-O.y)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),m=new Array(F),z=0;z<F;++z)y[z]=isNaN(m[z]=+b(u[z],z,u))?0:+p(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(p=typeof z=="function"?z:r(+z),L(),R):p},R.y=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}d.forceCenter=t,d.forceCollide=i,d.forceLink=f,d.forceManyBody=w,d.forceRadial=A,d.forceSimulation=_,d.forceX=M,d.forceY=g,Object.defineProperty(d,"__esModule",{value:!0})})}}),hG=He({"node_modules/d3-path/dist/d3-path.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=Math.PI,S=2*x,E=1e-6,e=S-E;function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new t}t.prototype=r.prototype={constructor:t,moveTo:function(o,a){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(o,a){this._+="L"+(this._x1=+o)+","+(this._y1=+a)},quadraticCurveTo:function(o,a,n,i){this._+="Q"+ +o+","+ +a+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(o,a,n,i,s,h){this._+="C"+ +o+","+ +a+","+ +n+","+ +i+","+(this._x1=+s)+","+(this._y1=+h)},arcTo:function(o,a,n,i,s){o=+o,a=+a,n=+n,i=+i,s=+s;var h=this._x1,f=this._y1,v=n-o,c=i-a,T=h-o,l=f-a,_=T*T+l*l;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=o)+","+(this._y1=a);else if(_>E)if(!(Math.abs(l*v-c*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=n-h,A=i-f,M=v*v+c*c,g=w*w+A*A,b=Math.sqrt(M),p=Math.sqrt(_),u=s*Math.tan((x-Math.acos((M+_-g)/(2*b*p)))/2),y=u/p,m=u/b;Math.abs(y-1)>E&&(this._+="L"+(o+y*T)+","+(a+y*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+m*v)+","+(this._y1=a+m*c)}},arc:function(o,a,n,i,s,h){o=+o,a=+a,n=+n,h=!!h;var f=n*Math.cos(i),v=n*Math.sin(i),c=o+f,T=a+v,l=1^h,_=h?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+c+","+T),n&&(_<0&&(_=_%S+S),_>e?this._+="A"+n+","+n+",0,1,"+l+","+(o-f)+","+(a-v)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):_>E&&(this._+="A"+n+","+n+",0,"+ +(_>=x)+","+l+","+(this._x1=o+n*Math.cos(s))+","+(this._y1=a+n*Math.sin(s))))},rect:function(o,a,n,i){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},d.path=r,Object.defineProperty(d,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,hG()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function S(gt){return function(){return gt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,h=s/2,f=2*s;function v(gt){return gt>1?0:gt<-1?s:Math.acos(gt)}function c(gt){return gt>=1?h:gt<=-1?-h:Math.asin(gt)}function T(gt){return gt.innerRadius}function l(gt){return gt.outerRadius}function _(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&&gt.padAngle}function M(gt,Xt,vr,Or,ba,Pa,ma,la){var _a=vr-gt,Ai=Or-Xt,ki=ma-ba,Ki=la-Pa,yn=Ki*_a-ki*Ai;if(!(yn*yn<i))return yn=(ki*(Xt-Pa)-Ki*(gt-ba))/yn,[gt+yn*_a,Xt+yn*Ai]}function g(gt,Xt,vr,Or,ba,Pa,ma){var la=gt-vr,_a=Xt-Or,Ai=(ma?Pa:-Pa)/n(la*la+_a*_a),ki=Ai*_a,Ki=-Ai*la,yn=gt+ki,Ln=Xt+Ki,kn=vr+ki,Bn=Or+Ki,ao=(yn+kn)/2,xo=(Ln+Bn)/2,Co=kn-yn,Fs=Bn-Ln,Mn=Co*Co+Fs*Fs,Ao=ba-Pa,On=yn*Bn-kn*Ln,ts=(Fs<0?-1:1)*n(r(0,Ao*Ao*Mn-On*On)),is=(On*Fs-Co*ts)/Mn,_s=(-On*Co-Fs*ts)/Mn,Oo=(On*Fs+Co*ts)/Mn,io=(-On*Co+Fs*ts)/Mn,Gn=is-ao,eo=_s-xo,ns=Oo-ao,gs=io-xo;return Gn*Gn+eo*eo>ns*ns+gs*gs&&(is=Oo,_s=io),{cx:is,cy:_s,x01:-ki,y01:-Ki,x11:is*(ba/Ao-1),y11:_s*(ba/Ao-1)}}function b(){var gt=T,Xt=l,vr=S(0),Or=null,ba=_,Pa=w,ma=A,la=null;function _a(){var Ai,ki,Ki=+gt.apply(this,arguments),yn=+Xt.apply(this,arguments),Ln=ba.apply(this,arguments)-h,kn=Pa.apply(this,arguments)-h,Bn=E(kn-Ln),ao=kn>Ln;if(la||(la=Ai=x.path()),yn<Ki&&(ki=yn,yn=Ki,Ki=ki),!(yn>i))la.moveTo(0,0);else if(Bn>f-i)la.moveTo(yn*t(Ln),yn*a(Ln)),la.arc(0,0,yn,Ln,kn,!ao),Ki>i&&(la.moveTo(Ki*t(kn),Ki*a(kn)),la.arc(0,0,Ki,kn,Ln,ao));else{var xo=Ln,Co=kn,Fs=Ln,Mn=kn,Ao=Bn,On=Bn,ts=ma.apply(this,arguments)/2,is=ts>i&&(Or?+Or.apply(this,arguments):n(Ki*Ki+yn*yn)),_s=o(E(yn-Ki)/2,+vr.apply(this,arguments)),Oo=_s,io=_s,Gn,eo;if(is>i){var ns=c(is/Ki*a(ts)),gs=c(is/yn*a(ts));(Ao-=ns*2)>i?(ns*=ao?1:-1,Fs+=ns,Mn-=ns):(Ao=0,Fs=Mn=(Ln+kn)/2),(On-=gs*2)>i?(gs*=ao?1:-1,xo+=gs,Co-=gs):(On=0,xo=Co=(Ln+kn)/2)}var Ls=yn*t(xo),Xo=yn*a(xo),Gi=Ki*t(Mn),Pn=Ki*a(Mn);if(_s>i){var js=yn*t(Co),xs=yn*a(Co),Hn=Ki*t(Fs),Os=Ki*a(Fs),ds;if(Bn<s&&(ds=M(Ls,Xo,Hn,Os,js,xs,Gi,Pn))){var Xs=Ls-ds[0],il=Xo-ds[1],_n=js-ds[0],Lo=xs-ds[1],bo=1/a(v((Xs*_n+il*Lo)/(n(Xs*Xs+il*il)*n(_n*_n+Lo*Lo)))/2),Rs=n(ds[0]*ds[0]+ds[1]*ds[1]);Oo=o(_s,(Ki-Rs)/(bo-1)),io=o(_s,(yn-Rs)/(bo+1))}}On>i?io>i?(Gn=g(Hn,Os,Ls,Xo,yn,io,ao),eo=g(js,xs,Gi,Pn,yn,io,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),io<_s?la.arc(Gn.cx,Gn.cy,io,e(Gn.y01,Gn.x01),e(eo.y01,eo.x01),!ao):(la.arc(Gn.cx,Gn.cy,io,e(Gn.y01,Gn.x01),e(Gn.y11,Gn.x11),!ao),la.arc(0,0,yn,e(Gn.cy+Gn.y11,Gn.cx+Gn.x11),e(eo.cy+eo.y11,eo.cx+eo.x11),!ao),la.arc(eo.cx,eo.cy,io,e(eo.y11,eo.x11),e(eo.y01,eo.x01),!ao))):(la.moveTo(Ls,Xo),la.arc(0,0,yn,xo,Co,!ao)):la.moveTo(Ls,Xo),!(Ki>i)||!(Ao>i)?la.lineTo(Gi,Pn):Oo>i?(Gn=g(Gi,Pn,js,xs,Ki,-Oo,ao),eo=g(Ls,Xo,Hn,Os,Ki,-Oo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Oo<_s?la.arc(Gn.cx,Gn.cy,Oo,e(Gn.y01,Gn.x01),e(eo.y01,eo.x01),!ao):(la.arc(Gn.cx,Gn.cy,Oo,e(Gn.y01,Gn.x01),e(Gn.y11,Gn.x11),!ao),la.arc(0,0,Ki,e(Gn.cy+Gn.y11,Gn.cx+Gn.x11),e(eo.cy+eo.y11,eo.cx+eo.x11),ao),la.arc(eo.cx,eo.cy,Oo,e(eo.y11,eo.x11),e(eo.y01,eo.x01),!ao))):la.arc(0,0,Ki,Mn,Fs,ao)}if(la.closePath(),Ai)return la=null,Ai+""||null}return _a.centroid=function(){var Ai=(+gt.apply(this,arguments)+ +Xt.apply(this,arguments))/2,ki=(+ba.apply(this,arguments)+ +Pa.apply(this,arguments))/2-s/2;return[t(ki)*Ai,a(ki)*Ai]},_a.innerRadius=function(Ai){return arguments.length?(gt=typeof Ai=="function"?Ai:S(+Ai),_a):gt},_a.outerRadius=function(Ai){return arguments.length?(Xt=typeof Ai=="function"?Ai:S(+Ai),_a):Xt},_a.cornerRadius=function(Ai){return arguments.length?(vr=typeof Ai=="function"?Ai:S(+Ai),_a):vr},_a.padRadius=function(Ai){return arguments.length?(Or=Ai==null?null:typeof Ai=="function"?Ai:S(+Ai),_a):Or},_a.startAngle=function(Ai){return arguments.length?(ba=typeof Ai=="function"?Ai:S(+Ai),_a):ba},_a.endAngle=function(Ai){return arguments.length?(Pa=typeof Ai=="function"?Ai:S(+Ai),_a):Pa},_a.padAngle=function(Ai){return arguments.length?(ma=typeof Ai=="function"?Ai:S(+Ai),_a):ma},_a.context=function(Ai){return arguments.length?(la=Ai??null,_a):la},_a}function p(gt){this._context=gt}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;default:this._context.lineTo(gt,Xt);break}}};function u(gt){return new p(gt)}function y(gt){return gt[0]}function m(gt){return gt[1]}function R(){var gt=y,Xt=m,vr=S(!0),Or=null,ba=u,Pa=null;function ma(la){var _a,Ai=la.length,ki,Ki=!1,yn;for(Or==null&&(Pa=ba(yn=x.path())),_a=0;_a<=Ai;++_a)!(_a<Ai&&vr(ki=la[_a],_a,la))===Ki&&((Ki=!Ki)?Pa.lineStart():Pa.lineEnd()),Ki&&Pa.point(+gt(ki,_a,la),+Xt(ki,_a,la));if(yn)return Pa=null,yn+""||null}return ma.x=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ma):gt},ma.y=function(la){return arguments.length?(Xt=typeof la=="function"?la:S(+la),ma):Xt},ma.defined=function(la){return arguments.length?(vr=typeof la=="function"?la:S(!!la),ma):vr},ma.curve=function(la){return arguments.length?(ba=la,Or!=null&&(Pa=ba(Or)),ma):ba},ma.context=function(la){return arguments.length?(la==null?Or=Pa=null:Pa=ba(Or=la),ma):Or},ma}function L(){var gt=y,Xt=null,vr=S(0),Or=m,ba=S(!0),Pa=null,ma=u,la=null;function _a(ki){var Ki,yn,Ln,kn=ki.length,Bn,ao=!1,xo,Co=new Array(kn),Fs=new Array(kn);for(Pa==null&&(la=ma(xo=x.path())),Ki=0;Ki<=kn;++Ki){if(!(Ki<kn&&ba(Bn=ki[Ki],Ki,ki))===ao)if(ao=!ao)yn=Ki,la.areaStart(),la.lineStart();else{for(la.lineEnd(),la.lineStart(),Ln=Ki-1;Ln>=yn;--Ln)la.point(Co[Ln],Fs[Ln]);la.lineEnd(),la.areaEnd()}ao&&(Co[Ki]=+gt(Bn,Ki,ki),Fs[Ki]=+vr(Bn,Ki,ki),la.point(Xt?+Xt(Bn,Ki,ki):Co[Ki],Or?+Or(Bn,Ki,ki):Fs[Ki]))}if(xo)return la=null,xo+""||null}function Ai(){return R().defined(ba).curve(ma).context(Pa)}return _a.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Xt=null,_a):gt},_a.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),_a):gt},_a.x1=function(ki){return arguments.length?(Xt=ki==null?null:typeof ki=="function"?ki:S(+ki),_a):Xt},_a.y=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Or=null,_a):vr},_a.y0=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),_a):vr},_a.y1=function(ki){return arguments.length?(Or=ki==null?null:typeof ki=="function"?ki:S(+ki),_a):Or},_a.lineX0=_a.lineY0=function(){return Ai().x(gt).y(vr)},_a.lineY1=function(){return Ai().x(gt).y(Or)},_a.lineX1=function(){return Ai().x(Xt).y(vr)},_a.defined=function(ki){return arguments.length?(ba=typeof ki=="function"?ki:S(!!ki),_a):ba},_a.curve=function(ki){return arguments.length?(ma=ki,Pa!=null&&(la=ma(Pa)),_a):ma},_a.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ma(Pa=ki),_a):Pa},_a}function z(gt,Xt){return Xt<gt?-1:Xt>gt?1:Xt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Xt=z,vr=null,Or=S(0),ba=S(f),Pa=S(0);function ma(la){var _a,Ai=la.length,ki,Ki,yn=0,Ln=new Array(Ai),kn=new Array(Ai),Bn=+Or.apply(this,arguments),ao=Math.min(f,Math.max(-f,ba.apply(this,arguments)-Bn)),xo,Co=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),Fs=Co*(ao<0?-1:1),Mn;for(_a=0;_a<Ai;++_a)(Mn=kn[Ln[_a]=_a]=+gt(la[_a],_a,la))>0&&(yn+=Mn);for(Xt!=null?Ln.sort(function(Ao,On){return Xt(kn[Ao],kn[On])}):vr!=null&&Ln.sort(function(Ao,On){return vr(la[Ao],la[On])}),_a=0,Ki=yn?(ao-Ai*Fs)/yn:0;_a<Ai;++_a,Bn=xo)ki=Ln[_a],Mn=kn[ki],xo=Bn+(Mn>0?Mn*Ki:0)+Fs,kn[ki]={data:la[ki],index:_a,value:Mn,startAngle:Bn,endAngle:xo,padAngle:Co};return kn}return ma.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ma):gt},ma.sortValues=function(la){return arguments.length?(Xt=la,vr=null,ma):Xt},ma.sort=function(la){return arguments.length?(vr=la,Xt=null,ma):vr},ma.startAngle=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ma):Or},ma.endAngle=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ma):ba},ma.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ma):Pa},ma}var O=U(u);function P(gt){this._curve=gt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Xt){this._curve.point(Xt*Math.sin(gt),Xt*-Math.cos(gt))}};function U(gt){function Xt(vr){return new P(gt(vr))}return Xt._curve=gt,Xt}function B(gt){var Xt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(vr){return arguments.length?Xt(U(vr)):Xt()._curve},gt}function X(){return B(R().curve(O))}function $(){var gt=L().curve(O),Xt=gt.curve,vr=gt.lineX0,Or=gt.lineX1,ba=gt.lineY0,Pa=gt.lineY1;return gt.angle=gt.x,delete gt.x,gt.startAngle=gt.x0,delete gt.x0,gt.endAngle=gt.x1,delete gt.x1,gt.radius=gt.y,delete gt.y,gt.innerRadius=gt.y0,delete gt.y0,gt.outerRadius=gt.y1,delete gt.y1,gt.lineStartAngle=function(){return B(vr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Or())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(ba())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ma){return arguments.length?Xt(U(ma)):Xt()._curve},gt}function le(gt,Xt){return[(Xt=+Xt)*Math.cos(gt-=Math.PI/2),Xt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function G(gt){return gt.target}function Y(gt){var Xt=de,vr=G,Or=y,ba=m,Pa=null;function ma(){var la,_a=ce.call(arguments),Ai=Xt.apply(this,_a),ki=vr.apply(this,_a);if(Pa||(Pa=la=x.path()),gt(Pa,+Or.apply(this,(_a[0]=Ai,_a)),+ba.apply(this,_a),+Or.apply(this,(_a[0]=ki,_a)),+ba.apply(this,_a)),la)return Pa=null,la+""||null}return ma.source=function(la){return arguments.length?(Xt=la,ma):Xt},ma.target=function(la){return arguments.length?(vr=la,ma):vr},ma.x=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ma):Or},ma.y=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ma):ba},ma.context=function(la){return arguments.length?(Pa=la??null,ma):Pa},ma}function ee(gt,Xt,vr,Or,ba){gt.moveTo(Xt,vr),gt.bezierCurveTo(Xt=(Xt+Or)/2,vr,Xt,ba,Or,ba)}function q(gt,Xt,vr,Or,ba){gt.moveTo(Xt,vr),gt.bezierCurveTo(Xt,vr=(vr+ba)/2,Or,vr,Or,ba)}function se(gt,Xt,vr,Or,ba){var Pa=le(Xt,vr),ma=le(Xt,vr=(vr+ba)/2),la=le(Or,vr),_a=le(Or,ba);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ma[0],ma[1],la[0],la[1],_a[0],_a[1])}function ae(){return Y(ee)}function j(){return Y(q)}function Q(){var gt=Y(se);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var re={draw:function(gt,Xt){var vr=Math.sqrt(Xt/s);gt.moveTo(vr,0),gt.arc(0,0,vr,0,f)}},pe={draw:function(gt,Xt){var vr=Math.sqrt(Xt/5)/2;gt.moveTo(-3*vr,-vr),gt.lineTo(-vr,-vr),gt.lineTo(-vr,-3*vr),gt.lineTo(vr,-3*vr),gt.lineTo(vr,-vr),gt.lineTo(3*vr,-vr),gt.lineTo(3*vr,vr),gt.lineTo(vr,vr),gt.lineTo(vr,3*vr),gt.lineTo(-vr,3*vr),gt.lineTo(-vr,vr),gt.lineTo(-3*vr,vr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Ie={draw:function(gt,Xt){var vr=Math.sqrt(Xt/Se),Or=vr*we;gt.moveTo(0,-vr),gt.lineTo(Or,0),gt.lineTo(0,vr),gt.lineTo(-Or,0),gt.closePath()}},Re=.8908130915292852,We=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*We,nt=-Math.cos(f/10)*We,tt={draw:function(gt,Xt){var vr=Math.sqrt(Xt*Re),Or=at*vr,ba=nt*vr;gt.moveTo(0,-vr),gt.lineTo(Or,ba);for(var Pa=1;Pa<5;++Pa){var ma=f*Pa/5,la=Math.cos(ma),_a=Math.sin(ma);gt.lineTo(_a*vr,-la*vr),gt.lineTo(la*Or-_a*ba,_a*Or+la*ba)}gt.closePath()}},qe={draw:function(gt,Xt){var vr=Math.sqrt(Xt),Or=-vr/2;gt.rect(Or,Or,vr,vr)}},he=Math.sqrt(3),ue={draw:function(gt,Xt){var vr=-Math.sqrt(Xt/(he*3));gt.moveTo(0,vr*2),gt.lineTo(-he*vr,-vr),gt.lineTo(he*vr,-vr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ye=1/Math.sqrt(12),rt=(Ye/2+1)*3,Ke={draw:function(gt,Xt){var vr=Math.sqrt(Xt/rt),Or=vr/2,ba=vr*Ye,Pa=Or,ma=vr*Ye+vr,la=-Pa,_a=ma;gt.moveTo(Or,ba),gt.lineTo(Pa,ma),gt.lineTo(la,_a),gt.lineTo(ne*Or-Ce*ba,Ce*Or+ne*ba),gt.lineTo(ne*Pa-Ce*ma,Ce*Pa+ne*ma),gt.lineTo(ne*la-Ce*_a,Ce*la+ne*_a),gt.lineTo(ne*Or+Ce*ba,ne*ba-Ce*Or),gt.lineTo(ne*Pa+Ce*ma,ne*ma-Ce*Pa),gt.lineTo(ne*la+Ce*_a,ne*_a-Ce*la),gt.closePath()}},Mt=[re,pe,Ie,qe,tt,ue,Ke];function kt(){var gt=S(re),Xt=S(64),vr=null;function Or(){var ba;if(vr||(vr=ba=x.path()),gt.apply(this,arguments).draw(vr,+Xt.apply(this,arguments)),ba)return vr=null,ba+""||null}return Or.type=function(ba){return arguments.length?(gt=typeof ba=="function"?ba:S(ba),Or):gt},Or.size=function(ba){return arguments.length?(Xt=typeof ba=="function"?ba:S(+ba),Or):Xt},Or.context=function(ba){return arguments.length?(vr=ba??null,Or):vr},Or}function Nt(){}function Gt(gt,Xt,vr){gt._context.bezierCurveTo((2*gt._x0+gt._x1)/3,(2*gt._y0+gt._y1)/3,(gt._x0+2*gt._x1)/3,(gt._y0+2*gt._y1)/3,(gt._x0+4*gt._x1+Xt)/6,(gt._y0+4*gt._y1+vr)/6)}function Mr(gt){this._context=gt}Mr.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:Gt(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(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);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:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function mr(gt){return new Mr(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Nt,areaEnd:Nt,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(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Xt;break;case 1:this._point=2,this._x3=gt,this._y3=Xt;break;case 2:this._point=3,this._x4=gt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Xt)/6);break;default:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function Er(gt){return new qr(gt)}function Ir(gt){this._context=gt}Ir.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(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var vr=(this._x0+4*this._x1+gt)/6,Or=(this._y0+4*this._y1+Xt)/6;this._line?this._context.lineTo(vr,Or):this._context.moveTo(vr,Or);break;case 3:this._point=4;default:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function _t(gt){return new Ir(gt)}function Oe(gt,Xt){this._basis=new Mr(gt),this._beta=Xt}Oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Xt=this._y,vr=gt.length-1;if(vr>0)for(var Or=gt[0],ba=Xt[0],Pa=gt[vr]-Or,ma=Xt[vr]-ba,la=-1,_a;++la<=vr;)_a=la/vr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Or+_a*Pa),this._beta*Xt[la]+(1-this._beta)*(ba+_a*ma));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Xt){this._x.push(+gt),this._y.push(+Xt)}};var Je=function gt(Xt){function vr(Or){return Xt===1?new Mr(Or):new Oe(Or,Xt)}return vr.beta=function(Or){return gt(+Or)},vr}(.85);function Ae(gt,Xt,vr){gt._context.bezierCurveTo(gt._x1+gt._k*(gt._x2-gt._x0),gt._y1+gt._k*(gt._y2-gt._y0),gt._x2+gt._k*(gt._x1-Xt),gt._y2+gt._k*(gt._y1-vr),gt._x2,gt._y2)}function Le(gt,Xt){this._context=gt,this._k=(1-Xt)/6}Le.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:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2,this._x1=gt,this._y1=Xt;break;case 2:this._point=3;default:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ue=function gt(Xt){function vr(Or){return new Le(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function Ze(gt,Xt){this._context=gt,this._k=(1-Xt)/6}Ze.prototype={areaStart:Nt,areaEnd:Nt,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(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Xt);break;case 2:this._point=3,this._x5=gt,this._y5=Xt;break;default:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var st=function gt(Xt){function vr(Or){return new Ze(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function ut(gt,Xt){this._context=gt,this._k=(1-Xt)/6}ut.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(gt,Xt){switch(gt=+gt,Xt=+Xt,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:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ut=function gt(Xt){function vr(Or){return new ut(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function Ct(gt,Xt,vr){var Or=gt._x1,ba=gt._y1,Pa=gt._x2,ma=gt._y2;if(gt._l01_a>i){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,_a=3*gt._l01_a*(gt._l01_a+gt._l12_a);Or=(Or*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/_a,ba=(ba*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/_a}if(gt._l23_a>i){var Ai=2*gt._l23_2a+3*gt._l23_a*gt._l12_a+gt._l12_2a,ki=3*gt._l23_a*(gt._l23_a+gt._l12_a);Pa=(Pa*Ai+gt._x1*gt._l23_2a-Xt*gt._l12_2a)/ki,ma=(ma*Ai+gt._y1*gt._l23_2a-vr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Or,ba,Pa,ma,gt._x2,gt._y2)}function Pt(gt,Xt){this._context=gt,this._alpha=Xt}Pt.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(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Xt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var jt=function gt(Xt){function vr(Or){return Xt?new Pt(Or,Xt):new Le(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function fr(gt,Xt){this._context=gt,this._alpha=Xt}fr.prototype={areaStart:Nt,areaEnd:Nt,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(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Xt);break;case 2:this._point=3,this._x5=gt,this._y5=Xt;break;default:Ct(this,gt,Xt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var ur=function gt(Xt){function vr(Or){return Xt?new fr(Or,Xt):new Ze(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function sr(gt,Xt){this._context=gt,this._alpha=Xt}sr.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(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,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:Ct(this,gt,Xt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Pr=function gt(Xt){function vr(Or){return Xt?new sr(Or,Xt):new ut(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function Ta(gt){this._context=gt}Ta.prototype={areaStart:Nt,areaEnd:Nt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Xt){gt=+gt,Xt=+Xt,this._point?this._context.lineTo(gt,Xt):(this._point=1,this._context.moveTo(gt,Xt))}};function Oa(gt){return new Ta(gt)}function Ia(gt){return gt<0?-1:1}function qa(gt,Xt,vr){var Or=gt._x1-gt._x0,ba=Xt-gt._x1,Pa=(gt._y1-gt._y0)/(Or||ba<0&&-0),ma=(vr-gt._y1)/(ba||Or<0&&-0),la=(Pa*ba+ma*Or)/(Or+ba);return(Ia(Pa)+Ia(ma))*Math.min(Math.abs(Pa),Math.abs(ma),.5*Math.abs(la))||0}function Wa(gt,Xt){var vr=gt._x1-gt._x0;return vr?(3*(gt._y1-gt._y0)/vr-Xt)/2:Xt}function Ca(gt,Xt,vr){var Or=gt._x0,ba=gt._y0,Pa=gt._x1,ma=gt._y1,la=(Pa-Or)/3;gt._context.bezierCurveTo(Or+la,ba+la*Xt,Pa-la,ma-la*vr,Pa,ma)}function hi(gt){this._context=gt}hi.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:Ca(this,this._t0,Wa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){var vr=NaN;if(gt=+gt,Xt=+Xt,!(gt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,vr=qa(this,gt,Xt)),vr);break;default:Ca(this,this._t0,vr=qa(this,gt,Xt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt,this._t0=vr}}};function wi(gt){this._context=new Kt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Xt){hi.prototype.point.call(this,Xt,gt)};function Kt(gt){this._context=gt}Kt.prototype={moveTo:function(gt,Xt){this._context.moveTo(Xt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Xt){this._context.lineTo(Xt,gt)},bezierCurveTo:function(gt,Xt,vr,Or,ba,Pa){this._context.bezierCurveTo(Xt,gt,Or,vr,Pa,ba)}};function Dt(gt){return new hi(gt)}function Yt(gt){return new wi(gt)}function Jt(gt){this._context=gt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var gt=this._x,Xt=this._y,vr=gt.length;if(vr)if(this._line?this._context.lineTo(gt[0],Xt[0]):this._context.moveTo(gt[0],Xt[0]),vr===2)this._context.lineTo(gt[1],Xt[1]);else for(var Or=Fr(gt),ba=Fr(Xt),Pa=0,ma=1;ma<vr;++Pa,++ma)this._context.bezierCurveTo(Or[0][Pa],ba[0][Pa],Or[1][Pa],ba[1][Pa],gt[ma],Xt[ma]);(this._line||this._line!==0&&vr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(gt,Xt){this._x.push(+gt),this._y.push(+Xt)}};function Fr(gt){var Xt,vr=gt.length-1,Or,ba=new Array(vr),Pa=new Array(vr),ma=new Array(vr);for(ba[0]=0,Pa[0]=2,ma[0]=gt[0]+2*gt[1],Xt=1;Xt<vr-1;++Xt)ba[Xt]=1,Pa[Xt]=4,ma[Xt]=4*gt[Xt]+2*gt[Xt+1];for(ba[vr-1]=2,Pa[vr-1]=7,ma[vr-1]=8*gt[vr-1]+gt[vr],Xt=1;Xt<vr;++Xt)Or=ba[Xt]/Pa[Xt-1],Pa[Xt]-=Or,ma[Xt]-=Or*ma[Xt-1];for(ba[vr-1]=ma[vr-1]/Pa[vr-1],Xt=vr-2;Xt>=0;--Xt)ba[Xt]=(ma[Xt]-ba[Xt+1])/Pa[Xt];for(Pa[vr-1]=(gt[vr]+ba[vr-1])/2,Xt=0;Xt<vr-1;++Xt)Pa[Xt]=2*gt[Xt+1]-ba[Xt+1];return[ba,Pa]}function ta(gt){return new Jt(gt)}function ra(gt,Xt){this._context=gt,this._t=Xt}ra.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(gt,Xt);else{var vr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(vr,this._y),this._context.lineTo(vr,Xt)}break}}this._x=gt,this._y=Xt}};function ca(gt){return new ra(gt,.5)}function Ba(gt){return new ra(gt,0)}function $a(gt){return new ra(gt,1)}function Za(gt,Xt){if((ma=gt.length)>1)for(var vr=1,Or,ba,Pa=gt[Xt[0]],ma,la=Pa.length;vr<ma;++vr)for(ba=Pa,Pa=gt[Xt[vr]],Or=0;Or<la;++Or)Pa[Or][1]+=Pa[Or][0]=isNaN(ba[Or][1])?ba[Or][0]:ba[Or][1]}function ri(gt){for(var Xt=gt.length,vr=new Array(Xt);--Xt>=0;)vr[Xt]=Xt;return vr}function pi(gt,Xt){return gt[Xt]}function Ra(){var gt=S([]),Xt=ri,vr=Za,Or=pi;function ba(Pa){var ma=gt.apply(this,arguments),la,_a=Pa.length,Ai=ma.length,ki=new Array(Ai),Ki;for(la=0;la<Ai;++la){for(var yn=ma[la],Ln=ki[la]=new Array(_a),kn=0,Bn;kn<_a;++kn)Ln[kn]=Bn=[0,+Or(Pa[kn],yn,kn,Pa)],Bn.data=Pa[kn];Ln.key=yn}for(la=0,Ki=Xt(ki);la<Ai;++la)ki[Ki[la]].index=la;return vr(ki,Ki),ki}return ba.keys=function(Pa){return arguments.length?(gt=typeof Pa=="function"?Pa:S(ce.call(Pa)),ba):gt},ba.value=function(Pa){return arguments.length?(Or=typeof Pa=="function"?Pa:S(+Pa),ba):Or},ba.order=function(Pa){return arguments.length?(Xt=Pa==null?ri:typeof Pa=="function"?Pa:S(ce.call(Pa)),ba):Xt},ba.offset=function(Pa){return arguments.length?(vr=Pa??Za,ba):vr},ba}function an(gt,Xt){if((Or=gt.length)>0){for(var vr,Or,ba=0,Pa=gt[0].length,ma;ba<Pa;++ba){for(ma=vr=0;vr<Or;++vr)ma+=gt[vr][ba][1]||0;if(ma)for(vr=0;vr<Or;++vr)gt[vr][ba][1]/=ma}Za(gt,Xt)}}function tn(gt,Xt){if((_a=gt.length)>0)for(var vr,Or=0,ba,Pa,ma,la,_a,Ai=gt[Xt[0]].length;Or<Ai;++Or)for(ma=la=0,vr=0;vr<_a;++vr)(Pa=(ba=gt[Xt[vr]][Or])[1]-ba[0])>0?(ba[0]=ma,ba[1]=ma+=Pa):Pa<0?(ba[1]=la,ba[0]=la+=Pa):(ba[0]=0,ba[1]=Pa)}function fn(gt,Xt){if((ba=gt.length)>0){for(var vr=0,Or=gt[Xt[0]],ba,Pa=Or.length;vr<Pa;++vr){for(var ma=0,la=0;ma<ba;++ma)la+=gt[ma][vr][1]||0;Or[vr][1]+=Or[vr][0]=-la/2}Za(gt,Xt)}}function xt(gt,Xt){if(!(!((ma=gt.length)>0)||!((Pa=(ba=gt[Xt[0]]).length)>0))){for(var vr=0,Or=1,ba,Pa,ma;Or<Pa;++Or){for(var la=0,_a=0,Ai=0;la<ma;++la){for(var ki=gt[Xt[la]],Ki=ki[Or][1]||0,yn=ki[Or-1][1]||0,Ln=(Ki-yn)/2,kn=0;kn<la;++kn){var Bn=gt[Xt[kn]],ao=Bn[Or][1]||0,xo=Bn[Or-1][1]||0;Ln+=ao-xo}_a+=Ki,Ai+=Ln*Ki}ba[Or-1][1]+=ba[Or-1][0]=vr,_a&&(vr-=Ai/_a)}ba[Or-1][1]+=ba[Or-1][0]=vr,Za(gt,Xt)}}function lt(gt){var Xt=gt.map(Br);return ri(gt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function Br(gt){for(var Xt=-1,vr=0,Or=gt.length,ba,Pa=-1/0;++Xt<Or;)(ba=+gt[Xt][1])>Pa&&(Pa=ba,vr=Xt);return vr}function Cr(gt){var Xt=gt.map(xr);return ri(gt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function xr(gt){for(var Xt=0,vr=-1,Or=gt.length,ba;++vr<Or;)(ba=+gt[vr][1])&&(Xt+=ba);return Xt}function Rr(gt){return Cr(gt).reverse()}function Ur(gt){var Xt=gt.length,vr,Or,ba=gt.map(xr),Pa=lt(gt),ma=0,la=0,_a=[],Ai=[];for(vr=0;vr<Xt;++vr)Or=Pa[vr],ma<la?(ma+=ba[Or],_a.push(Or)):(la+=ba[Or],Ai.push(Or));return Ai.reverse().concat(_a)}function Hr(gt){return ri(gt).reverse()}d.arc=b,d.area=L,d.areaRadial=$,d.curveBasis=mr,d.curveBasisClosed=Er,d.curveBasisOpen=_t,d.curveBundle=Je,d.curveCardinal=Ue,d.curveCardinalClosed=st,d.curveCardinalOpen=Ut,d.curveCatmullRom=jt,d.curveCatmullRomClosed=ur,d.curveCatmullRomOpen=Pr,d.curveLinear=u,d.curveLinearClosed=Oa,d.curveMonotoneX=Dt,d.curveMonotoneY=Yt,d.curveNatural=ta,d.curveStep=ca,d.curveStepAfter=$a,d.curveStepBefore=Ba,d.line=R,d.lineRadial=X,d.linkHorizontal=ae,d.linkRadial=Q,d.linkVertical=j,d.pie=N,d.pointRadial=le,d.radialArea=$,d.radialLine=X,d.stack=Ra,d.stackOffsetDiverging=tn,d.stackOffsetExpand=an,d.stackOffsetNone=Za,d.stackOffsetSilhouette=fn,d.stackOffsetWiggle=xt,d.stackOrderAppearance=lt,d.stackOrderAscending=Cr,d.stackOrderDescending=Rr,d.stackOrderInsideOut=Ur,d.stackOrderNone=ri,d.stackOrderReverse=Hr,d.symbol=kt,d.symbolCircle=re,d.symbolCross=pe,d.symbolDiamond=Ie,d.symbolSquare=qe,d.symbolStar=tt,d.symbolTriangle=ue,d.symbolWye=Ke,d.symbols=Mt,Object.defineProperty(d,"__esModule",{value:!0})})}}),pG=He({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,_x(),LT(),U6()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3)})(Z,function(d,x,S,E){"use strict";function e(u){return u.target.depth}function t(u){return u.depth}function r(u,y){return y-1-u.height}function o(u,y){return u.sourceLinks.length?u.depth:y-1}function a(u){return u.targetLinks.length?u.depth:u.sourceLinks.length?x.min(u.sourceLinks,e)-1:0}function n(u){return function(){return u}}function i(u,y){return h(u.source,y.source)||u.index-y.index}function s(u,y){return h(u.target,y.target)||u.index-y.index}function h(u,y){return u.y0-y.y0}function f(u){return u.value}function v(u){return(u.y0+u.y1)/2}function c(u){return v(u.source)*u.value}function T(u){return v(u.target)*u.value}function l(u){return u.index}function _(u){return u.nodes}function w(u){return u.links}function A(u,y){var m=u.get(y);if(!m)throw new Error("missing: "+y);return m}var M=function(){var u=0,y=0,m=1,R=1,L=24,z=8,F=l,N=o,O=_,P=w,U=32,B=2/3;function X(){var Y={nodes:O.apply(null,arguments),links:P.apply(null,arguments)};return $(Y),le(Y),ce(Y),de(Y,U),G(Y),Y}X.update=function(Y){return G(Y),Y},X.nodeId=function(Y){return arguments.length?(F=typeof Y=="function"?Y:n(Y),X):F},X.nodeAlign=function(Y){return arguments.length?(N=typeof Y=="function"?Y:n(Y),X):N},X.nodeWidth=function(Y){return arguments.length?(L=+Y,X):L},X.nodePadding=function(Y){return arguments.length?(z=+Y,X):z},X.nodes=function(Y){return arguments.length?(O=typeof Y=="function"?Y:n(Y),X):O},X.links=function(Y){return arguments.length?(P=typeof Y=="function"?Y:n(Y),X):P},X.size=function(Y){return arguments.length?(u=y=0,m=+Y[0],R=+Y[1],X):[m-u,R-y]},X.extent=function(Y){return arguments.length?(u=+Y[0][0],m=+Y[1][0],y=+Y[0][1],R=+Y[1][1],X):[[u,y],[m,R]]},X.iterations=function(Y){return arguments.length?(U=+Y,X):U};function $(Y){Y.nodes.forEach(function(q,se){q.index=se,q.sourceLinks=[],q.targetLinks=[]});var ee=S.map(Y.nodes,F);Y.links.forEach(function(q,se){q.index=se;var ae=q.source,j=q.target;typeof ae!="object"&&(ae=q.source=A(ee,ae)),typeof j!="object"&&(j=q.target=A(ee,j)),ae.sourceLinks.push(q),j.targetLinks.push(q)})}function le(Y){Y.nodes.forEach(function(ee){ee.value=Math.max(x.sum(ee.sourceLinks,f),x.sum(ee.targetLinks,f))})}function ce(Y){var ee,q,se;for(ee=Y.nodes,q=[],se=0;ee.length;++se,ee=q,q=[])ee.forEach(function(j){j.depth=se,j.sourceLinks.forEach(function(Q){q.indexOf(Q.target)<0&&q.push(Q.target)})});for(ee=Y.nodes,q=[],se=0;ee.length;++se,ee=q,q=[])ee.forEach(function(j){j.height=se,j.targetLinks.forEach(function(Q){q.indexOf(Q.source)<0&&q.push(Q.source)})});var ae=(m-u-L)/(se-1);Y.nodes.forEach(function(j){j.x1=(j.x0=u+Math.max(0,Math.min(se-1,Math.floor(N.call(null,j,se))))*ae)+L})}function de(Y){var ee=S.nest().key(function(pe){return pe.x0}).sortKeys(x.ascending).entries(Y.nodes).map(function(pe){return pe.values});ae(),re();for(var q=1,se=U;se>0;--se)Q(q*=.99),re(),j(q),re();function ae(){var pe=x.max(ee,function(Ie){return Ie.length}),we=B*(R-y)/(pe-1);z>we&&(z=we);var Se=x.min(ee,function(Ie){return(R-y-(Ie.length-1)*z)/x.sum(Ie,f)});ee.forEach(function(Ie){Ie.forEach(function(Re,We){Re.y1=(Re.y0=We)+Re.value*Se})}),Y.links.forEach(function(Ie){Ie.width=Ie.value*Se})}function j(pe){ee.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Ie=(x.sum(Se.targetLinks,c)/x.sum(Se.targetLinks,f)-v(Se))*pe;Se.y0+=Ie,Se.y1+=Ie}})})}function Q(pe){ee.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Ie=(x.sum(Se.sourceLinks,T)/x.sum(Se.sourceLinks,f)-v(Se))*pe;Se.y0+=Ie,Se.y1+=Ie}})})}function re(){ee.forEach(function(pe){var we,Se,Ie=y,Re=pe.length,We;for(pe.sort(h),We=0;We<Re;++We)we=pe[We],Se=Ie-we.y0,Se>0&&(we.y0+=Se,we.y1+=Se),Ie=we.y1+z;if(Se=Ie-z-R,Se>0)for(Ie=we.y0-=Se,we.y1-=Se,We=Re-2;We>=0;--We)we=pe[We],Se=we.y1+z-Ie,Se>0&&(we.y0-=Se,we.y1-=Se),Ie=we.y0})}}function G(Y){Y.nodes.forEach(function(ee){ee.sourceLinks.sort(s),ee.targetLinks.sort(i)}),Y.nodes.forEach(function(ee){var q=ee.y0,se=q;ee.sourceLinks.forEach(function(ae){ae.y0=q+ae.width/2,q+=ae.width}),ee.targetLinks.forEach(function(ae){ae.y1=se+ae.width/2,se+=ae.width})})}return X};function g(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var p=function(){return E.linkHorizontal().source(g).target(b)};d.sankey=M,d.sankeyCenter=a,d.sankeyLeft=t,d.sankeyRight=r,d.sankeyJustify=o,d.sankeyLinkHorizontal=p,Object.defineProperty(d,"__esModule",{value:!0})})}}),dG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,V){var d=N6();V.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],n;function i(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&i(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var g,b;for(g=0;g<a[A].length;g++)b=a[A][g],b===n?(h(n,t),M=!0):r[b]||(M=s(b));if(M)i(A);else for(g=0;g<a[A].length;g++){b=a[A][g];var p=o[b];p||(p={},o[b]=p),p[b]=!0}return t.pop(),M}function h(A,M){var g=[].concat(M).concat(A);E?E(s):e.push(g)}function f(A){for(var M=0;M<S.length;M++)M<A&&(S[M]=[]),S[M]=S[M].filter(function(g){return g>=A})}function v(A){f(A);for(var M=S,g=d(M),b=g.components.filter(function(z){return z.length>1}),p=1/0,u,y=0;y<b.length;y++)for(var m=0;m<b[y].length;m++)b[y][m]<p&&(p=b[y][m],u=y);var R=b[u];if(!R)return!1;var L=S.map(function(z,F){return R.indexOf(F)===-1?[]:z.filter(function(N){return R.indexOf(N)!==-1})});return{leastVertex:p,adjList:L}}n=0;for(var c=S.length;n<c;){var T=v(n);if(n=T.leastVertex,a=T.adjList,a){for(var l=0;l<a.length;l++)for(var _=0;_<a[l].length;_++){var w=a[l][_];r[+w]=!1,o[w]={}}s(n),n=n+1}else n=c}if(!E)return e}}}),vG=He({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,_x(),LT(),U6(),dG()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3,null)})(Z,function(d,x,S,E,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function t(Re){return Re.target.depth}function r(Re){return Re.depth}function o(Re,We){return We-1-Re.height}function a(Re,We){return Re.sourceLinks.length?Re.depth:We-1}function n(Re){return Re.targetLinks.length?Re.depth:Re.sourceLinks.length?x.min(Re.sourceLinks,t)-1:0}function i(Re){return function(){return Re}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Re){return typeof Re}:function(Re){return Re&&typeof Symbol=="function"&&Re.constructor===Symbol&&Re!==Symbol.prototype?"symbol":typeof Re};function h(Re,We){return v(Re.source,We.source)||Re.index-We.index}function f(Re,We){return v(Re.target,We.target)||Re.index-We.index}function v(Re,We){return Re.partOfCycle===We.partOfCycle?Re.y0-We.y0:Re.circularLinkType==="top"||We.circularLinkType==="bottom"?-1:1}function c(Re){return Re.value}function T(Re){return(Re.y0+Re.y1)/2}function l(Re){return T(Re.source)}function _(Re){return T(Re.target)}function w(Re){return Re.index}function A(Re){return Re.nodes}function M(Re){return Re.links}function g(Re,We){var at=Re.get(We);if(!at)throw new Error("missing: "+We);return at}function b(Re,We){return We(Re)}var p=25,u=10,y=.3;function m(){var Re=0,We=0,at=1,nt=1,tt=24,qe,he=w,ue=a,ne=A,Ce=M,Ye=32,rt=2,Ke,Mt=null;function kt(){var _t={nodes:ne.apply(null,arguments),links:Ce.apply(null,arguments)};Nt(_t),R(_t,he,Mt),Gt(_t),qr(_t),L(_t,he),Er(_t,Ye,he),Ir(_t);for(var Oe=4,Je=0;Je<Oe;Je++)Q(_t,nt,he),re(_t,nt,he),se(_t,We,nt,he),Q(_t,nt,he),re(_t,nt,he);return Ie(_t,We,nt),U(_t,rt,nt,he),_t}kt.nodeId=function(_t){return arguments.length?(he=typeof _t=="function"?_t:i(_t),kt):he},kt.nodeAlign=function(_t){return arguments.length?(ue=typeof _t=="function"?_t:i(_t),kt):ue},kt.nodeWidth=function(_t){return arguments.length?(tt=+_t,kt):tt},kt.nodePadding=function(_t){return arguments.length?(qe=+_t,kt):qe},kt.nodes=function(_t){return arguments.length?(ne=typeof _t=="function"?_t:i(_t),kt):ne},kt.links=function(_t){return arguments.length?(Ce=typeof _t=="function"?_t:i(_t),kt):Ce},kt.size=function(_t){return arguments.length?(Re=We=0,at=+_t[0],nt=+_t[1],kt):[at-Re,nt-We]},kt.extent=function(_t){return arguments.length?(Re=+_t[0][0],at=+_t[1][0],We=+_t[0][1],nt=+_t[1][1],kt):[[Re,We],[at,nt]]},kt.iterations=function(_t){return arguments.length?(Ye=+_t,kt):Ye},kt.circularLinkGap=function(_t){return arguments.length?(rt=+_t,kt):rt},kt.nodePaddingRatio=function(_t){return arguments.length?(Ke=+_t,kt):Ke},kt.sortNodes=function(_t){return arguments.length?(Mt=_t,kt):Mt},kt.update=function(_t){return L(_t,he),Ir(_t),_t.links.forEach(function(Oe){Oe.circular&&(Oe.circularLinkType=Oe.y0+Oe.y1<nt?"top":"bottom",Oe.source.circularLinkType=Oe.circularLinkType,Oe.target.circularLinkType=Oe.circularLinkType)}),Q(_t,nt,he,!1),re(_t,nt,he),U(_t,rt,nt,he),_t};function Nt(_t){_t.nodes.forEach(function(Je,Ae){Je.index=Ae,Je.sourceLinks=[],Je.targetLinks=[]});var Oe=S.map(_t.nodes,he);return _t.links.forEach(function(Je,Ae){Je.index=Ae;var Le=Je.source,Ue=Je.target;(typeof Le>"u"?"undefined":s(Le))!=="object"&&(Le=Je.source=g(Oe,Le)),(typeof Ue>"u"?"undefined":s(Ue))!=="object"&&(Ue=Je.target=g(Oe,Ue)),Le.sourceLinks.push(Je),Ue.targetLinks.push(Je)}),_t}function Gt(_t){_t.nodes.forEach(function(Oe){Oe.partOfCycle=!1,Oe.value=Math.max(x.sum(Oe.sourceLinks,c),x.sum(Oe.targetLinks,c)),Oe.sourceLinks.forEach(function(Je){Je.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Je.circularLinkType)}),Oe.targetLinks.forEach(function(Je){Je.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Je.circularLinkType)})})}function Mr(_t){var Oe=0,Je=0,Ae=0,Le=0,Ue=x.max(_t.nodes,function(Ze){return Ze.column});return _t.links.forEach(function(Ze){Ze.circular&&(Ze.circularLinkType=="top"?Oe=Oe+Ze.width:Je=Je+Ze.width,Ze.target.column==0&&(Le=Le+Ze.width),Ze.source.column==Ue&&(Ae=Ae+Ze.width))}),Oe=Oe>0?Oe+p+u:Oe,Je=Je>0?Je+p+u:Je,Ae=Ae>0?Ae+p+u:Ae,Le=Le>0?Le+p+u:Le,{top:Oe,bottom:Je,left:Le,right:Ae}}function mr(_t,Oe){var Je=x.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Re,Le=nt-We,Ue=Ae+Oe.right+Oe.left,Ze=Le+Oe.top+Oe.bottom,st=Ae/Ue,ut=Le/Ze;return Re=Re*st+Oe.left,at=Oe.right==0?at:at*st,We=We*ut+Oe.top,nt=nt*ut,_t.nodes.forEach(function(Ut){Ut.x0=Re+Ut.column*((at-Re-tt)/Je),Ut.x1=Ut.x0+tt}),ut}function qr(_t){var Oe,Je,Ae;for(Oe=_t.nodes,Je=[],Ae=0;Oe.length;++Ae,Oe=Je,Je=[])Oe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(Ue){Je.indexOf(Ue.target)<0&&!Ue.circular&&Je.push(Ue.target)})});for(Oe=_t.nodes,Je=[],Ae=0;Oe.length;++Ae,Oe=Je,Je=[])Oe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(Ue){Je.indexOf(Ue.source)<0&&!Ue.circular&&Je.push(Ue.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(ue.call(null,Le,Ae))})}function Er(_t,Oe,Je){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(x.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ze(Je),ut();for(var Le=1,Ue=Oe;Ue>0;--Ue)st(Le*=.99,Je),ut();function Ze(Ut){if(Ke){var Ct=1/0;Ae.forEach(function(ur){var sr=nt*Ke/(ur.length+1);Ct=sr<Ct?sr:Ct}),qe=Ct}var Pt=x.min(Ae,function(ur){return(nt-We-(ur.length-1)*qe)/x.sum(ur,c)});Pt=Pt*y,_t.links.forEach(function(ur){ur.width=ur.value*Pt});var jt=Mr(_t),fr=mr(_t,jt);Pt=Pt*fr,_t.links.forEach(function(ur){ur.width=ur.value*Pt}),Ae.forEach(function(ur){var sr=ur.length;ur.forEach(function(Pr,Ta){Pr.depth==Ae.length-1&&sr==1||Pr.depth==0&&sr==1?(Pr.y0=nt/2-Pr.value*Pt,Pr.y1=Pr.y0+Pr.value*Pt):Pr.partOfCycle?N(Pr,Ut)==0?(Pr.y0=nt/2+Ta,Pr.y1=Pr.y0+Pr.value*Pt):Pr.circularLinkType=="top"?(Pr.y0=We+Ta,Pr.y1=Pr.y0+Pr.value*Pt):(Pr.y0=nt-Pr.value*Pt-Ta,Pr.y1=Pr.y0+Pr.value*Pt):jt.top==0||jt.bottom==0?(Pr.y0=(nt-We)/sr*Ta,Pr.y1=Pr.y0+Pr.value*Pt):(Pr.y0=(nt-We)/2-sr/2+Ta,Pr.y1=Pr.y0+Pr.value*Pt)})})}function st(Ut,Ct){var Pt=Ae.length;Ae.forEach(function(jt){var fr=jt.length,ur=jt[0].depth;jt.forEach(function(sr){var Pr;if((sr.sourceLinks.length||sr.targetLinks.length)&&!(sr.partOfCycle&&N(sr,Ct)>0))if(ur==0&&fr==1)Pr=sr.y1-sr.y0,sr.y0=nt/2-Pr/2,sr.y1=nt/2+Pr/2;else if(ur==Pt-1&&fr==1)Pr=sr.y1-sr.y0,sr.y0=nt/2-Pr/2,sr.y1=nt/2+Pr/2;else{var Ta=0,Oa=x.mean(sr.sourceLinks,_),Ia=x.mean(sr.targetLinks,l);Oa&&Ia?Ta=(Oa+Ia)/2:Ta=Oa||Ia;var qa=(Ta-T(sr))*Ut;sr.y0+=qa,sr.y1+=qa}})})}function ut(){Ae.forEach(function(Ut){var Ct,Pt,jt=We,fr=Ut.length,ur;for(Ut.sort(v),ur=0;ur<fr;++ur)Ct=Ut[ur],Pt=jt-Ct.y0,Pt>0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+qe;if(Pt=jt-qe-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,ur=fr-2;ur>=0;--ur)Ct=Ut[ur],Pt=Ct.y1+qe-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ir(_t){_t.nodes.forEach(function(Oe){Oe.sourceLinks.sort(f),Oe.targetLinks.sort(h)}),_t.nodes.forEach(function(Oe){var Je=Oe.y0,Ae=Je,Le=Oe.y1,Ue=Le;Oe.sourceLinks.forEach(function(Ze){Ze.circular?(Ze.y0=Le-Ze.width/2,Le=Le-Ze.width):(Ze.y0=Je+Ze.width/2,Je+=Ze.width)}),Oe.targetLinks.forEach(function(Ze){Ze.circular?(Ze.y1=Ue-Ze.width/2,Ue=Ue-Ze.width):(Ze.y1=Ae+Ze.width/2,Ae+=Ze.width)})})}return kt}function R(Re,We,at){var nt=0;if(at===null){for(var tt=[],qe=0;qe<Re.links.length;qe++){var he=Re.links[qe],ue=he.source.index,ne=he.target.index;tt[ue]||(tt[ue]=[]),tt[ne]||(tt[ne]=[]),tt[ue].indexOf(ne)===-1&&tt[ue].push(ne)}var Ce=e(tt);Ce.sort(function(Mt,kt){return Mt.length-kt.length});var Ye={};for(qe=0;qe<Ce.length;qe++){var rt=Ce[qe],Ke=rt.slice(-2);Ye[Ke[0]]||(Ye[Ke[0]]={}),Ye[Ke[0]][Ke[1]]=!0}Re.links.forEach(function(Mt){var kt=Mt.target.index,Nt=Mt.source.index;kt===Nt||Ye[Nt]&&Ye[Nt][kt]?(Mt.circular=!0,Mt.circularLinkID=nt,nt=nt+1):Mt.circular=!1})}else Re.links.forEach(function(Mt){Mt.source[at]<Mt.target[at]?Mt.circular=!1:(Mt.circular=!0,Mt.circularLinkID=nt,nt=nt+1)})}function L(Re,We){var at=0,nt=0;Re.links.forEach(function(tt){tt.circular&&(tt.source.circularLinkType||tt.target.circularLinkType?tt.circularLinkType=tt.source.circularLinkType?tt.source.circularLinkType:tt.target.circularLinkType:tt.circularLinkType=at<nt?"top":"bottom",tt.circularLinkType=="top"?at=at+1:nt=nt+1,Re.nodes.forEach(function(qe){(b(qe,We)==b(tt.source,We)||b(qe,We)==b(tt.target,We))&&(qe.circularLinkType=tt.circularLinkType)}))}),Re.links.forEach(function(tt){tt.circular&&(tt.source.circularLinkType==tt.target.circularLinkType&&(tt.circularLinkType=tt.source.circularLinkType),Se(tt,We)&&(tt.circularLinkType=tt.source.circularLinkType))})}function z(Re){var We=Math.abs(Re.y1-Re.y0),at=Math.abs(Re.target.x0-Re.source.x1);return Math.atan(at/We)}function F(Re,We){return Re.source.column<We.target.column?!1:!(Re.target.column>We.source.column)}function N(Re,We){var at=0;Re.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,We)?at+1:at});var nt=0;return Re.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,We)?nt+1:nt}),at+nt}function O(Re){var We=Re.source.sourceLinks,at=0;We.forEach(function(qe){at=qe.circular?at+1:at});var nt=Re.target.targetLinks,tt=0;return nt.forEach(function(qe){tt=qe.circular?tt+1:tt}),!(at>1||tt>1)}function P(Re,We,at){return Re.sort(X),Re.forEach(function(nt,tt){var qe=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=qe+nt.width/2;else{var he=0;for(he;he<tt;he++)if(F(Re[tt],Re[he])){var ue=Re[he].circularPathData.verticalBuffer+Re[he].width/2+We;qe=ue>qe?ue:qe}nt.circularPathData.verticalBuffer=qe+nt.width/2}}),Re}function U(Re,We,at,nt){var tt=5,qe=x.min(Re.links,function(ne){return ne.source.y0});Re.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Re.links.filter(function(ne){return ne.circularLinkType=="top"});P(he,We,nt);var ue=Re.links.filter(function(ne){return ne.circularLinkType=="bottom"});P(ue,We,nt),Re.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+u,ne.circularPathData.leftNodeBuffer=tt,ne.circularPathData.rightNodeBuffer=tt,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,Se(ne,nt)&&O(ne))ne.circularPathData.leftSmallArcRadius=u+ne.width/2,ne.circularPathData.leftLargeArcRadius=u+ne.width/2,ne.circularPathData.rightSmallArcRadius=u+ne.width/2,ne.circularPathData.rightLargeArcRadius=u+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+p+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-p-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var Ce=ne.source.column,Ye=ne.circularLinkType,rt=Re.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ye});ne.circularLinkType=="bottom"?rt.sort(le):rt.sort($);var Ke=0;rt.forEach(function(kt,Nt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Ke,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Nt*We+Ke),Ke=Ke+kt.width}),Ce=ne.target.column,rt=Re.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ye}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Ke=0,rt.forEach(function(kt,Nt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Ke,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Nt*We+Ke),Ke=Ke+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+p+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=qe-p-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=B(ne);else{var Mt=E.linkHorizontal().source(function(kt){var Nt=kt.source.x0+(kt.source.x1-kt.source.x0),Gt=kt.y0;return[Nt,Gt]}).target(function(kt){var Nt=kt.target.x0,Gt=kt.y1;return[Nt,Gt]});ne.path=Mt(ne)}})}function B(Re){var We="";return Re.circularLinkType=="top"?We="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 0 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY-Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 0 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 0 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY-Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 0 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY:We="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 1 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY+Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 1 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 1 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY+Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 1 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY,We}function X(Re,We){return G(Re)==G(We)?Re.circularLinkType=="bottom"?le(Re,We):$(Re,We):G(We)-G(Re)}function $(Re,We){return Re.y0-We.y0}function le(Re,We){return We.y0-Re.y0}function ce(Re,We){return Re.y1-We.y1}function de(Re,We){return We.y1-Re.y1}function G(Re){return Re.target.column-Re.source.column}function Y(Re){return Re.target.x0-Re.source.x1}function ee(Re,We){var at=z(Re),nt=Y(We)/Math.tan(at),tt=we(Re)=="up"?Re.y1+nt:Re.y1-nt;return tt}function q(Re,We){var at=z(Re),nt=Y(We)/Math.tan(at),tt=we(Re)=="up"?Re.y1-nt:Re.y1+nt;return tt}function se(Re,We,at,nt){Re.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var qe=tt.source.column+1,he=tt.target.column-1,ue=1,ne=he-qe+1;for(ue=1;qe<=he;qe++,ue++)Re.nodes.forEach(function(Ce){if(Ce.column==qe){var Ye=ue/(ne+1),rt=Math.pow(1-Ye,3),Ke=3*Ye*Math.pow(1-Ye,2),Mt=3*Math.pow(Ye,2)*(1-Ye),kt=Math.pow(Ye,3),Nt=rt*tt.y0+Ke*tt.y0+Mt*tt.y1+kt*tt.y1,Gt=Nt-tt.width/2,Mr=Nt+tt.width/2,mr;Gt>Ce.y0&&Gt<Ce.y1?(mr=Ce.y1-Gt+10,mr=Ce.circularLinkType=="bottom"?mr:-mr,Ce=j(Ce,mr,We,at),Re.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||ae(Ce,qr)&&j(qr,mr,We,at)})):Mr>Ce.y0&&Mr<Ce.y1?(mr=Mr-Ce.y0+10,Ce=j(Ce,mr,We,at),Re.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0<Ce.y1&&qr.y1>Ce.y1&&j(qr,mr,We,at)})):Gt<Ce.y0&&Mr>Ce.y1&&(mr=Mr-Ce.y0+10,Ce=j(Ce,mr,We,at),Re.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0<Ce.y1&&qr.y1>Ce.y1&&j(qr,mr,We,at)}))}})}})}function ae(Re,We){return Re.y0>We.y0&&Re.y0<We.y1||Re.y1>We.y0&&Re.y1<We.y1?!0:Re.y0<We.y0&&Re.y1>We.y1}function j(Re,We,at,nt){return Re.y0+We>=at&&Re.y1+We<=nt&&(Re.y0=Re.y0+We,Re.y1=Re.y1+We,Re.targetLinks.forEach(function(tt){tt.y1=tt.y1+We}),Re.sourceLinks.forEach(function(tt){tt.y0=tt.y0+We})),Re}function Q(Re,We,at,nt){Re.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>We&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-We));var qe=Re.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=qe.length;he>1&&qe.sort(function(ne,Ce){if(!ne.circular&&!Ce.circular){if(ne.target.column==Ce.target.column)return ne.y1-Ce.y1;if(pe(ne,Ce)){if(ne.target.column>Ce.target.column){var Ye=q(Ce,ne);return ne.y1-Ye}if(Ce.target.column>ne.target.column){var rt=q(ne,Ce);return rt-Ce.y1}}else return ne.y1-Ce.y1}if(ne.circular&&!Ce.circular)return ne.circularLinkType=="top"?-1:1;if(Ce.circular&&!ne.circular)return Ce.circularLinkType=="top"?1:-1;if(ne.circular&&Ce.circular)return ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===Ce.target.column?ne.target.y1-Ce.target.y1:Ce.target.column-ne.target.column:ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===Ce.target.column?Ce.target.y1-ne.target.y1:ne.target.column-Ce.target.column:ne.circularLinkType=="top"?-1:1});var ue=tt.y0;qe.forEach(function(ne){ne.y0=ue+ne.width/2,ue=ue+ne.width}),qe.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ye=Ce+1,rt=0;for(Ye;Ye<he;Ye++)rt=rt+qe[Ye].width;ne.y0=tt.y1-rt-ne.width/2}})})}function re(Re,We,at){Re.nodes.forEach(function(nt){var tt=Re.links.filter(function(ue){return b(ue.target,at)==b(nt,at)}),qe=tt.length;qe>1&&tt.sort(function(ue,ne){if(!ue.circular&&!ne.circular){if(ue.source.column==ne.source.column)return ue.y0-ne.y0;if(pe(ue,ne)){if(ne.source.column<ue.source.column){var Ce=ee(ne,ue);return ue.y0-Ce}if(ue.source.column<ne.source.column){var Ye=ee(ue,ne);return Ye-ne.y0}}else return ue.y0-ne.y0}if(ue.circular&&!ne.circular)return ue.circularLinkType=="top"?-1:1;if(ne.circular&&!ue.circular)return ne.circularLinkType=="top"?1:-1;if(ue.circular&&ne.circular)return ue.circularLinkType===ne.circularLinkType&&ue.circularLinkType=="top"?ue.source.column===ne.source.column?ue.source.y1-ne.source.y1:ue.source.column-ne.source.column:ue.circularLinkType===ne.circularLinkType&&ue.circularLinkType=="bottom"?ue.source.column===ne.source.column?ue.source.y1-ne.source.y1:ne.source.column-ue.source.column:ue.circularLinkType=="top"?-1:1});var he=nt.y0;tt.forEach(function(ue){ue.y1=he+ue.width/2,he=he+ue.width}),tt.forEach(function(ue,ne){if(ue.circularLinkType=="bottom"){var Ce=ne+1,Ye=0;for(Ce;Ce<qe;Ce++)Ye=Ye+tt[Ce].width;ue.y1=nt.y1-Ye-ue.width/2}})})}function pe(Re,We){return we(Re)==we(We)}function we(Re){return Re.y0-Re.y1>0?"up":"down"}function Se(Re,We){return b(Re.source,We)==b(Re.target,We)}function Ie(Re,We,at){var nt=Re.nodes,tt=Re.links,qe=!1,he=!1;if(tt.forEach(function(Ke){Ke.circularLinkType=="top"?qe=!0:Ke.circularLinkType=="bottom"&&(he=!0)}),qe==!1||he==!1){var ue=x.min(nt,function(Ke){return Ke.y0}),ne=x.max(nt,function(Ke){return Ke.y1}),Ce=ne-ue,Ye=at-We,rt=Ye/Ce;nt.forEach(function(Ke){var Mt=(Ke.y1-Ke.y0)*rt;Ke.y0=(Ke.y0-ue)*rt,Ke.y1=Ke.y0+Mt}),tt.forEach(function(Ke){Ke.y0=(Ke.y0-ue)*rt,Ke.y1=(Ke.y1-ue)*rt,Ke.width=Ke.width*rt})}}d.sankeyCircular=m,d.sankeyCenter=n,d.sankeyLeft=r,d.sankeyRight=o,d.sankeyJustify=a,Object.defineProperty(d,"__esModule",{value:!0})})}}),j6=He({"src/traces/sankey/constants.js"(Z,V){"use strict";V.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"}}}}),mG=He({"src/traces/sankey/render.js"(Z,V){"use strict";var d=fG(),x=(pg(),zf(p0)).interpolateNumber,S=Wn(),E=pG(),e=vG(),t=j6(),r=Ch(),o=Jn(),a=es(),n=sa(),i=n.strTranslate,s=n.strRotate,h=kv(),f=h.keyFun,v=h.repeat,c=h.unwrap,T=ou(),l=lo(),_=uh(),w=_.CAP_SHIFT,A=_.LINE_SPACING,M=3;function g(ee,q,se){var ae=c(q),j=ae.trace,Q=j.domain,re=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[j.node.align],Ie=ee.width*(Q.x[1]-Q.x[0]),Re=ee.height*(Q.y[1]-Q.y[0]),We=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=E.sankey(),tt.iterations(t.sankeyIterations).size(re?[Ie,Re]:[Re,Ie]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(We).links(at);var qe=tt();tt.nodePadding()<pe&&n.warn("node.pad was reduced to ",tt.nodePadding()," to fit within the figure.");var he,ue,ne;for(var Ce in ae._groupLookup){var Ye=parseInt(ae._groupLookup[Ce]),rt;for(he=0;he<qe.nodes.length;he++)if(qe.nodes[he].pointNumber===Ye){rt=qe.nodes[he];break}if(rt){var Ke={pointNumber:parseInt(Ce),x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};qe.nodes.unshift(Ke),rt.childrenNodes.unshift(Ke)}}function Mt(){for(he=0;he<qe.nodes.length;he++){var qr=qe.nodes[he],Er={},Ir,_t;for(ue=0;ue<qr.targetLinks.length;ue++)_t=qr.targetLinks[ue],Ir=_t.source.pointNumber+":"+_t.target.pointNumber,Er.hasOwnProperty(Ir)||(Er[Ir]=[]),Er[Ir].push(_t);var Oe=Object.keys(Er);for(ue=0;ue<Oe.length;ue++){Ir=Oe[ue];var Je=Er[Ir],Ae=0,Le={};for(ne=0;ne<Je.length;ne++)_t=Je[ne],Le[_t.label]||(Le[_t.label]=0),Le[_t.label]+=_t.value,Ae+=_t.value;for(ne=0;ne<Je.length;ne++)_t=Je[ne],_t.flow={value:Ae,labelConcentration:Le[_t.label]/Ae,concentration:_t.value/Ae,links:Je},_t.concentrationscale&&(_t.color=r(_t.concentrationscale(_t.flow.labelConcentration)))}var Ue=0;for(ue=0;ue<qr.sourceLinks.length;ue++)Ue+=qr.sourceLinks[ue].value;for(ue=0;ue<qr.sourceLinks.length;ue++)_t=qr.sourceLinks[ue],_t.concentrationOut=_t.value/Ue;var Ze=0;for(ue=0;ue<qr.targetLinks.length;ue++)Ze+=qr.targetLinks[ue].value;for(ue=0;ue<qr.targetLinks.length;ue++)_t=qr.targetLinks[ue],_t.concenrationIn=_t.value/Ze}}Mt();function kt(qr){qr.forEach(function(Er){var Ir,_t,Oe=0,Je=Er.length,Ae;for(Er.sort(function(Le,Ue){return Le.y0-Ue.y0}),Ae=0;Ae<Je;++Ae)Ir=Er[Ae],Ir.y0>=Oe||(_t=Oe-Ir.y0,_t>1e-6&&(Ir.y0+=_t,Ir.y1+=_t)),Oe=Ir.y1+pe})}function Nt(qr){var Er=qr.map(function(Ue,Ze){return{x0:Ue.x0,index:Ze}}).sort(function(Ue,Ze){return Ue.x0-Ze.x0}),Ir=[],_t=-1,Oe,Je=-1/0,Ae;for(he=0;he<Er.length;he++){var Le=qr[Er[he].index];Le.x0>Je+we&&(_t+=1,Oe=Le.x0),Je=Le.x0,Ir[_t]||(Ir[_t]=[]),Ir[_t].push(Le),Ae=Oe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ir}if(j.node.x.length&&j.node.y.length){for(he=0;he<Math.min(j.node.x.length,j.node.y.length,qe.nodes.length);he++)if(j.node.x[he]&&j.node.y[he]){var Gt=[j.node.x[he]*Ie,j.node.y[he]*Re];qe.nodes[he].x0=Gt[0]-we/2,qe.nodes[he].x1=Gt[0]+we/2;var Mr=qe.nodes[he].y1-qe.nodes[he].y0;qe.nodes[he].y0=Gt[1]-Mr/2,qe.nodes[he].y1=Gt[1]+Mr/2}if(j.arrangement==="snap"){We=qe.nodes;var mr=Nt(We);kt(mr)}tt.update(qe)}return{circular:nt,key:se,trace:j,guid:n.randstr(),horizontal:re,width:Ie,height:Re,nodePad:j.node.pad,nodeLineColor:j.node.line.color,nodeLineWidth:j.node.line.width,linkLineColor:j.link.line.color,linkLineWidth:j.link.line.width,linkArrowLength:j.link.arrowlen,valueFormat:j.valueformat,valueSuffix:j.valuesuffix,textFont:j.textfont,translateX:Q.x[0]*ee.width+ee.margin.l,translateY:ee.height-Q.y[1]*ee.height+ee.margin.t,dragParallel:re?Re:Ie,dragPerpendicular:re?Ie:Re,arrangement:j.arrangement,sankey:tt,graph:qe,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(ee,q,se){var ae=r(q.color),j=r(q.hovercolor),Q=q.source.label+"|"+q.target.label,re=Q+"__"+se;return q.trace=ee.trace,q.curveNumber=ee.trace.index,{circular:ee.circular,key:re,traceId:ee.key,pointNumber:q.pointNumber,link:q,tinyColorHue:o.tinyRGB(ae),tinyColorAlpha:ae.getAlpha(),tinyColorHoverHue:o.tinyRGB(j),tinyColorHoverAlpha:j.getAlpha(),linkPath:u,linkLineColor:ee.linkLineColor,linkLineWidth:ee.linkLineWidth,linkArrowLength:ee.linkArrowLength,valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,parent:ee,interactionState:ee.interactionState,flow:q.flow}}function p(ee,q){var se="",ae=ee.width/2,j=ee.circularPathData,Q=j.sourceX+j.verticalBuffer<j.targetX,re=j.rightFullExtent-j.rightLargeArcRadius-q<=j.leftFullExtent-ae,pe=Math.abs(j.rightFullExtent-j.leftFullExtent-ae)<ae;return ee.circularLinkType==="top"?(se="M "+(j.targetX-q)+" "+(j.targetY+ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+"A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent-ae-q)+" "+(j.targetY-j.rightSmallArcRadius)+"L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ae))+" L "+(j.rightFullExtent+ae-(j.rightLargeArcRadius-ae)-q)+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ae))+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalRightInnerExtent:Q?se+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 0 "+(j.rightFullExtent-ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ae))+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ae))+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,se+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY-j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.sourceY+ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.leftInnerExtent+" "+(j.sourceY-ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 0 "+(j.leftFullExtent-ae)+" "+(j.sourceY-j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?se+=" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent-ae)+" "+(j.verticalFullExtent+ae)+"L"+(j.rightFullExtent+ae-q)+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?se+=" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent-ae-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:se+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,se+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY-j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" L "+(j.targetX-q)+" "+(j.targetY-ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(se="M "+(j.targetX-q)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-q)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:Q?se+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-q-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,se+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?se+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-q+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-q-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:se+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,se+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+" L "+(j.targetX-q)+" "+(j.targetY+ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),se}function u(){var ee=.5;function q(se){var ae=se.linkArrowLength;if(se.link.circular)return p(se.link,ae);var j=Math.abs((se.link.target.x0-se.link.source.x1)/2);ae>j&&(ae=j);var Q=se.link.source.x1,re=se.link.target.x0-ae,pe=x(Q,re),we=pe(ee),Se=pe(1-ee),Ie=se.link.y0-se.link.width/2,Re=se.link.y0+se.link.width/2,We=se.link.y1-se.link.width/2,at=se.link.y1+se.link.width/2,nt="M"+Q+","+Ie,tt="C"+we+","+Ie+" "+Se+","+We+" "+re+","+We,qe="C"+Se+","+at+" "+we+","+Re+" "+Q+","+Re,he=ae>0?"L"+(re+ae)+","+(We+se.link.width/2):"";return he+="L"+re+","+at,nt+tt+he+qe+"Z"}return q}function y(ee,q){var se=r(q.color),ae=t.nodePadAcross,j=ee.nodePad/2;q.dx=q.x1-q.x0,q.dy=q.y1-q.y0;var Q=q.dx,re=Math.max(.5,q.dy),pe="node_"+q.pointNumber;return q.group&&(pe=n.randstr()),q.trace=ee.trace,q.curveNumber=ee.trace.index,{index:q.pointNumber,key:pe,partOfGroup:q.partOfGroup||!1,group:q.group,traceId:ee.key,trace:ee.trace,node:q,nodePad:ee.nodePad,nodeLineColor:ee.nodeLineColor,nodeLineWidth:ee.nodeLineWidth,textFont:ee.textFont,size:ee.horizontal?ee.height:ee.width,visibleWidth:Math.ceil(Q),visibleHeight:re,zoneX:-ae,zoneY:-j,zoneWidth:Q+2*ae,zoneHeight:re+2*j,labelY:ee.horizontal?q.dy/2+1:q.dx/2+1,left:q.originalLayer===1,sizeAcross:ee.width,forceLayouts:ee.forceLayouts,horizontal:ee.horizontal,darkBackground:se.getBrightness()<=128,tinyColorHue:o.tinyRGB(se),tinyColorAlpha:se.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,pe].join("_"),interactionState:ee.interactionState,figure:ee}}function m(ee){ee.attr("transform",function(q){return i(q.node.x0.toFixed(3),q.node.y0.toFixed(3))})}function R(ee){ee.call(m)}function L(ee,q){ee.call(R),q.attr("d",u())}function z(ee){ee.attr("width",function(q){return q.node.x1-q.node.x0}).attr("height",function(q){return q.visibleHeight})}function F(ee){return ee.link.width>1||ee.linkLineWidth>0}function N(ee){var q=i(ee.translateX,ee.translateY);return q+(ee.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(ee,q,se){ee.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.hover(this,ae,q),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.unhover(this,ae,q),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(se.unhover(this,ae,q),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&se.select(this,ae,q)})}function P(ee,q,se,ae){var j=S.behavior.drag().origin(function(Q){return{x:Q.node.x0+Q.visibleWidth/2,y:Q.node.y0+Q.visibleHeight/2}}).on("dragstart",function(Q){if(Q.arrangement!=="fixed"&&(n.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),n.raiseToTop(this),Q.interactionState.dragInProgress=Q.node,ce(Q.node),Q.interactionState.hovered&&(se.nodeEvents.unhover.apply(0,Q.interactionState.hovered),Q.interactionState.hovered=!1),Q.arrangement==="snap")){var re=Q.traceId+"|"+Q.key;Q.forceLayouts[re]?Q.forceLayouts[re].alpha(1):U(ee,re,Q,ae),B(ee,q,Q,re,ae)}}).on("drag",function(Q){if(Q.arrangement!=="fixed"){var re=S.event.x,pe=S.event.y;Q.arrangement==="snap"?(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2,Q.node.y0=pe-Q.visibleHeight/2,Q.node.y1=pe+Q.visibleHeight/2):(Q.arrangement==="freeform"&&(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2),pe=Math.max(0,Math.min(Q.size-Q.visibleHeight/2,pe)),Q.node.y0=pe-Q.visibleHeight/2,Q.node.y1=pe+Q.visibleHeight/2),ce(Q.node),Q.arrangement!=="snap"&&(Q.sankey.update(Q.graph),L(ee.filter(de(Q)),q))}}).on("dragend",function(Q){if(Q.arrangement!=="fixed"){Q.interactionState.dragInProgress=!1;for(var re=0;re<Q.node.childrenNodes.length;re++)Q.node.childrenNodes[re].x=Q.node.x,Q.node.childrenNodes[re].y=Q.node.y;Q.arrangement!=="snap"&&$(Q,ae)}});ee.on(".drag",null).call(j)}function U(ee,q,se,ae){G(se.graph.nodes);var j=se.graph.nodes.filter(function(Q){return Q.originalX===se.node.originalX}).filter(function(Q){return!Q.partOfGroup});se.forceLayouts[q]=d.forceSimulation(j).alphaDecay(0).force("collide",d.forceCollide().radius(function(Q){return Q.dy/2+se.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",X(ee,q,j,se,ae)).stop()}function B(ee,q,se,ae,j){window.requestAnimationFrame(function Q(){var re;for(re=0;re<t.forceTicksPerFrame;re++)se.forceLayouts[ae].tick();var pe=se.graph.nodes;if(Y(pe),se.sankey.update(se.graph),L(ee.filter(de(se)),q),se.forceLayouts[ae].alpha()>0)window.requestAnimationFrame(Q);else{var we=se.node.originalX;se.node.x0=we-se.visibleWidth/2,se.node.x1=we+se.visibleWidth/2,$(se,j)}})}function X(ee,q,se,ae){return function(){for(var Q=0,re=0;re<se.length;re++){var pe=se[re];pe===ae.interactionState.dragInProgress?(pe.x=pe.lastDraggedX,pe.y=pe.lastDraggedY):(pe.vx=(pe.originalX-pe.x)/t.forceTicksPerFrame,pe.y=Math.min(ae.size-pe.dy/2,Math.max(pe.dy/2,pe.y))),Q=Math.max(Q,Math.abs(pe.vx),Math.abs(pe.vy))}!ae.interactionState.dragInProgress&&Q<.1&&ae.forceLayouts[q].alpha()>0&&ae.forceLayouts[q].alpha(0)}}function $(ee,q){for(var se=[],ae=[],j=0;j<ee.graph.nodes.length;j++){var Q=(ee.graph.nodes[j].x0+ee.graph.nodes[j].x1)/2,re=(ee.graph.nodes[j].y0+ee.graph.nodes[j].y1)/2;se.push(Q/ee.figure.width),ae.push(re/ee.figure.height)}l.call("_guiRestyle",q,{"node.x":[se],"node.y":[ae]},ee.trace.index).then(function(){q._fullLayout._dragCover&&q._fullLayout._dragCover.remove()})}function le(ee){var q=[],se;for(se=0;se<ee.length;se++)ee[se].originalX=(ee[se].x0+ee[se].x1)/2,ee[se].originalY=(ee[se].y0+ee[se].y1)/2,q.indexOf(ee[se].originalX)===-1&&q.push(ee[se].originalX);for(q.sort(function(ae,j){return ae-j}),se=0;se<ee.length;se++)ee[se].originalLayerIndex=q.indexOf(ee[se].originalX),ee[se].originalLayer=ee[se].originalLayerIndex/(q.length-1)}function ce(ee){ee.lastDraggedX=ee.x0+ee.dx/2,ee.lastDraggedY=ee.y0+ee.dy/2}function de(ee){return function(q){return q.node.originalX===ee.node.originalX}}function G(ee){for(var q=0;q<ee.length;q++)ee[q].y=(ee[q].y0+ee[q].y1)/2,ee[q].x=(ee[q].x0+ee[q].x1)/2}function Y(ee){for(var q=0;q<ee.length;q++)ee[q].y0=ee[q].y-ee[q].dy/2,ee[q].y1=ee[q].y0+ee[q].dy,ee[q].x0=ee[q].x-ee[q].dx/2,ee[q].x1=ee[q].x0+ee[q].dx}V.exports=function(ee,q,se,ae,j){var Q=ee._context.staticPlot,re=!1;n.ensureSingle(ee._fullLayout._infolayer,"g","first-render",function(){re=!0});var pe=ee._fullLayout._dragCover,we=se.filter(function(qe){return c(qe).trace.visible}).map(g.bind(null,ae)),Se=q.selectAll("."+t.cn.sankey).data(we,f);Se.exit().remove(),Se.enter().append("g").classed(t.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",Q?"none":"auto").attr("transform",N),Se.each(function(qe,he){ee._fullData[he]._sankey=qe;var ue="bgsankey-"+qe.trace.uid+"-"+he;n.ensureSingle(ee._fullLayout._draggers,"rect",ue),ee._fullData[he]._bgRect=S.select("."+ue),ee._fullData[he]._bgRect.style("pointer-events",Q?"none":"all").attr("width",qe.width).attr("height",qe.height).attr("x",qe.translateX).attr("y",qe.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Se.transition().ease(t.ease).duration(t.duration).attr("transform",N);var Ie=Se.selectAll("."+t.cn.sankeyLinks).data(v,f);Ie.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var Re=Ie.selectAll("."+t.cn.sankeyLink).data(function(qe){var he=qe.graph.links;return he.filter(function(ue){return ue.value}).map(b.bind(null,qe))},f);Re.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Se,j.linkEvents),Re.style("stroke",function(qe){return F(qe)?o.tinyRGB(r(qe.linkLineColor)):qe.tinyColorHue}).style("stroke-opacity",function(qe){return F(qe)?o.opacity(qe.linkLineColor):qe.tinyColorAlpha}).style("fill",function(qe){return qe.tinyColorHue}).style("fill-opacity",function(qe){return qe.tinyColorAlpha}).style("stroke-width",function(qe){return F(qe)?qe.linkLineWidth:1}).attr("d",u()),Re.style("opacity",function(){return ee._context.staticPlot||re||pe?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),Re.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var We=Se.selectAll("."+t.cn.sankeyNodeSet).data(v,f);We.enter().append("g").classed(t.cn.sankeyNodeSet,!0),We.style("cursor",function(qe){switch(qe.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var at=We.selectAll("."+t.cn.sankeyNode).data(function(qe){var he=qe.graph.nodes;return le(he),he.map(y.bind(null,qe))},f);at.enter().append("g").classed(t.cn.sankeyNode,!0).call(m).style("opacity",function(qe){return(ee._context.staticPlot||re)&&!qe.partOfGroup?1:0}),at.call(O,Se,j.nodeEvents).call(P,Re,j,ee),at.transition().ease(t.ease).duration(t.duration).call(m).style("opacity",function(qe){return qe.partOfGroup?0:1}),at.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var nt=at.selectAll("."+t.cn.nodeRect).data(v);nt.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),nt.style("stroke-width",function(qe){return qe.nodeLineWidth}).style("stroke",function(qe){return o.tinyRGB(r(qe.nodeLineColor))}).style("stroke-opacity",function(qe){return o.opacity(qe.nodeLineColor)}).style("fill",function(qe){return qe.tinyColorHue}).style("fill-opacity",function(qe){return qe.tinyColorAlpha}),nt.transition().ease(t.ease).duration(t.duration).call(z);var tt=at.selectAll("."+t.cn.nodeLabel).data(v);tt.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),tt.attr("data-notex",1).text(function(qe){return qe.node.label}).each(function(qe){var he=S.select(this);a.font(he,qe.textFont),T.convertToTspans(he,ee)}).attr("text-anchor",function(qe){return qe.horizontal&&qe.left?"end":"start"}).attr("transform",function(qe){var he=S.select(this),ue=T.lineCount(he),ne=qe.textFont.size*((ue-1)*A-w),Ce=qe.nodeLineWidth/2+M,Ye=((qe.horizontal?qe.visibleHeight:qe.visibleWidth)-ne)/2;qe.horizontal&&(qe.left?Ce=-Ce:Ce+=qe.visibleWidth);var rt=qe.horizontal?"":"scale(-1,1)"+s(90);return i(qe.horizontal?Ce:Ye,qe.horizontal?Ye:Ce)+rt}),tt.transition().ease(t.ease).duration(t.duration)}}}),q6=He({"src/traces/sankey/plot.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=x.numberFormat,E=mG(),e=rf(),t=Jn(),r=j6().cn,o=x._;function a(w){return w!==""}function n(w,A){return w.filter(function(M){return M.key===A.traceId})}function i(w,A){d.select(w).select("path").style("fill-opacity",A),d.select(w).select("rect").style("fill-opacity",A)}function s(w){d.select(w).select("text.name").style("fill","black")}function h(w){return function(A){return w.node.sourceLinks.indexOf(A.link)!==-1||w.node.targetLinks.indexOf(A.link)!==-1}}function f(w){return function(A){return A.node.sourceLinks.indexOf(w.link)!==-1||A.node.targetLinks.indexOf(w.link)!==-1}}function v(w,A,M){A&&M&&n(M,A).selectAll("."+r.sankeyLink).filter(h(A)).call(T.bind(0,A,M,!1))}function c(w,A,M){A&&M&&n(M,A).selectAll("."+r.sankeyLink).filter(h(A)).call(l.bind(0,A,M,!1))}function T(w,A,M,g){g.style("fill",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverHue}).style("fill-opacity",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverAlpha}),g.each(function(b){var p=b.link.label;p!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===p}).style("fill",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverHue}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverAlpha})}),M&&n(A,w).selectAll("."+r.sankeyNode).filter(f(w)).call(v)}function l(w,A,M,g){g.style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}),g.each(function(b){var p=b.link.label;p!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===p}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),M&&n(A,w).selectAll(r.sankeyNode).filter(f(w)).call(c)}function _(w,A){var M=w.hoverlabel||{},g=x.nestedProperty(M,A).get();return Array.isArray(g)?!1:g}V.exports=function(A,M){for(var g=A._fullLayout,b=g._paper,p=g._size,u=0;u<A._fullData.length;u++)if(A._fullData[u].visible&&A._fullData[u].type===r.sankey&&!A._fullData[u]._viewInitial){var y=A._fullData[u].node;A._fullData[u]._viewInitial={node:{groups:y.groups.slice(),x:y.x.slice(),y:y.y.slice()}}}var m=function(ce,de){var G=de.link;G.originalEvent=d.event,A._hoverdata=[G],e.click(A,{target:!0})},R=function(ce,de,G){A._fullLayout.hovermode!==!1&&(d.select(ce).call(T.bind(0,de,G,!0)),de.link.trace.link.hoverinfo!=="skip"&&(de.link.fullData=de.link.trace,A.emit("plotly_hover",{event:d.event,points:[de.link]})))},L=o(A,"source:")+" ",z=o(A,"target:")+" ",F=o(A,"concentration:")+" ",N=o(A,"incoming flow count:")+" ",O=o(A,"outgoing flow count:")+" ",P=function(ce,de){if(A._fullLayout.hovermode===!1)return;var G=de.link.trace.link;if(G.hoverinfo==="none"||G.hoverinfo==="skip")return;var Y=[];function ee(pe){var we,Se;pe.circular?(we=(pe.circularPathData.leftInnerExtent+pe.circularPathData.rightInnerExtent)/2,Se=pe.circularPathData.verticalFullExtent):(we=(pe.source.x1+pe.target.x0)/2,Se=(pe.y0+pe.y1)/2);var Ie=[we,Se];return pe.trace.orientation==="v"&&Ie.reverse(),Ie[0]+=de.parent.translateX,Ie[1]+=de.parent.translateY,Ie}for(var q=0,se=0;se<de.flow.links.length;se++){var ae=de.flow.links[se];if(!(A._fullLayout.hovermode==="closest"&&de.link.pointNumber!==ae.pointNumber)){de.link.pointNumber===ae.pointNumber&&(q=se),ae.fullData=ae.trace,G=de.link.trace.link;var j=ee(ae),Q={valueLabel:S(de.valueFormat)(ae.value)+de.valueSuffix};Y.push({x:j[0],y:j[1],name:Q.valueLabel,text:[ae.label||"",L+ae.source.label,z+ae.target.label,ae.concentrationscale?F+S("%0.2f")(ae.flow.labelConcentration):""].filter(a).join("<br>"),color:_(G,"bgcolor")||t.addOpacity(ae.color,1),borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:d.event.x<j[0]?"right":"left",hovertemplate:G.hovertemplate,hovertemplateLabels:Q,eventData:[ae]})}}var re=e.loneHover(Y,{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A,anchorIndex:q});re.each(function(){var pe=this;de.link.concentrationscale||i(pe,.65),s(pe)})},U=function(ce,de,G){A._fullLayout.hovermode!==!1&&(d.select(ce).call(l.bind(0,de,G,!0)),de.link.trace.link.hoverinfo!=="skip"&&(de.link.fullData=de.link.trace,A.emit("plotly_unhover",{event:d.event,points:[de.link]})),e.loneUnhover(g._hoverlayer.node()))},B=function(ce,de,G){var Y=de.node;Y.originalEvent=d.event,A._hoverdata=[Y],d.select(ce).call(c,de,G),e.click(A,{target:!0})},X=function(ce,de,G){A._fullLayout.hovermode!==!1&&(d.select(ce).call(v,de,G),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_hover",{event:d.event,points:[de.node]})))},$=function(ce,de){if(A._fullLayout.hovermode!==!1){var G=de.node.trace.node;if(!(G.hoverinfo==="none"||G.hoverinfo==="skip")){var Y=d.select(ce).select("."+r.nodeRect),ee=A._fullLayout._paperdiv.node().getBoundingClientRect(),q=Y.node().getBoundingClientRect(),se=q.left-2-ee.left,ae=q.right+2-ee.left,j=q.top+q.height/4-ee.top,Q={valueLabel:S(de.valueFormat)(de.node.value)+de.valueSuffix};de.node.fullData=de.node.trace,A._fullLayout._calcInverseTransform(A);var re=A._fullLayout._invScaleX,pe=A._fullLayout._invScaleY,we=e.loneHover({x0:re*se,x1:re*ae,y:pe*j,name:S(de.valueFormat)(de.node.value)+de.valueSuffix,text:[de.node.label,N+de.node.targetLinks.length,O+de.node.sourceLinks.length].filter(a).join("<br>"),color:_(G,"bgcolor")||de.tinyColorHue,borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:Q,eventData:[de.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(we,.85),s(we)}}},le=function(ce,de,G){A._fullLayout.hovermode!==!1&&(d.select(ce).call(c,de,G),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:d.event,points:[de.node]})),e.loneUnhover(g._hoverlayer.node()))};E(A,b,M,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{linkEvents:{hover:R,follow:P,unhover:U,select:m},nodeEvents:{hover:X,follow:$,unhover:le,select:B}})}}}),gG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var V=pc().overrideAll,d=Hh().getModuleCalcData,x=q6(),S=Zm(),E=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=lo(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=V({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(i){var s=d(i.calcdata,a)[0];x(i,s),Z.updateFx(i)},Z.clean=function(i,s,h,f){var v=f._has&&f._has(a),c=s._has&&s._has(a);v&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(i){for(var s=0;s<i._fullData.length;s++)n(i,s)};function n(i,s){var h=i._fullData[s],f=i._fullLayout,v=f.dragmode,c=f.dragmode==="pan"?"move":"crosshair",T=h._bgRect;if(T&&!(v==="pan"||v==="zoom")){E(T,c);var l={_id:"x",c2p:r.identity,_offset:h._sankey.translateX,_length:h._sankey.width},_={_id:"y",c2p:r.identity,_offset:h._sankey.translateY,_length:h._sankey.height},w={gd:i,element:T.node(),plotinfo:{id:s,xaxis:l,yaxis:_,fillRangeItems:r.noop},subplot:s,xaxes:[l],yaxes:[_],doneFnCompleted:function(A){var M=i._fullData[s],g,b=M.node.groups.slice(),p=[];function u(L){for(var z=M._sankey.graph.nodes,F=0;F<z.length;F++)if(z[F].pointNumber===L)return z[F]}for(var y=0;y<A.length;y++){var m=u(A[y].pointNumber);if(m)if(m.group){for(var R=0;R<m.childrenNodes.length;R++)p.push(m.childrenNodes[R].pointNumber);b[m.pointNumber-M.node._count]=!1}else p.push(m.pointNumber)}g=b.filter(Boolean).concat([p]),o.call("_guiRestyle",i,{"node.groups":[g]},s)}};w.prepFn=function(A,M,g){t(A,M,g,w,v)},e.init(w)}}}}),yG=He({"src/traces/sankey/select.js"(Z,V){"use strict";V.exports=function(x,S){for(var E=x.cd,e=[],t=E[0].trace,r=t._sankey.graph.nodes,o=0;o<r.length;o++){var a=r[o];if(!a.partOfGroup){var n=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];t.orientation==="v"&&n.reverse(),S&&S.contains(n,!1,o,x)&&e.push({pointNumber:a.pointNumber})}}return e}}}),_G=He({"src/traces/sankey/index.js"(Z,V){"use strict";V.exports={attributes:B6(),supplyDefaults:oG(),calc:sG(),plot:q6(),moduleType:"trace",name:"sankey",basePlotModule:gG(),selectPoints:yG(),categories:["noOpacity"],meta:{}}}}),xG=He({"lib/sankey.js"(Z,V){"use strict";V.exports=_G()}}),bG=He({"src/traces/indicator/base_plot.js"(Z){"use strict";var V=bc();Z.name="indicator",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),V6=He({"src/traces/indicator/attributes.js"(Z,V){"use strict";var d=Qo().extendFlat,x=Qo().extendDeep,S=pc().overrideAll,E=tc(),e=sh(),t=wc().attributes,r=Wh(),o=zl().templatedArray,a=d1(),n=tf().descriptionOnlyNumbers,i=E({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.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"},h={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},f=o("step",x({},s,{range:h}));V.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:t({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:d({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:n("value")},font:d({},i,{}),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:n("value")},increasing:{symbol:{valType:"string",dflt:a.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:a.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:d({},i,{}),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:x({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:S({range:h,visible:d({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:d({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:E({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:f,threshold:{line:{color:d({},s.line.color,{}),width:d({},s.line.width,{dflt:1}),editType:"plot"},thickness:d({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),G6=He({"src/traces/indicator/constants.js"(Z,V){"use strict";V.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),wG=He({"src/traces/indicator/defaults.js"(Z,V){"use strict";var d=sa(),x=V6(),S=wc().defaults,E=zl(),e=hp(),t=G6(),r=Y0(),o=t1(),a=Qm(),n=e0();function i(h,f,v,c){function T(P,U){return d.coerce(h,f,x,P,U)}S(f,c,T),T("mode"),f._hasNumber=f.mode.indexOf("number")!==-1,f._hasDelta=f.mode.indexOf("delta")!==-1,f._hasGauge=f.mode.indexOf("gauge")!==-1;var l=T("value");f._range=[0,typeof l=="number"?1.5*l:1];var _=new Array(2),w;if(f._hasNumber){T("number.valueformat");var A=d.extendFlat({},c.font);A.size=void 0,d.coerceFont(T,"number.font",A),f.number.font.size===void 0&&(f.number.font.size=t.defaultNumberFontSize,_[0]=!0),T("number.prefix"),T("number.suffix"),w=f.number.font.size}var M;if(f._hasDelta){var g=d.extendFlat({},c.font);g.size=void 0,d.coerceFont(T,"delta.font",g),f.delta.font.size===void 0&&(f.delta.font.size=(f._hasNumber?.5:1)*(w||t.defaultNumberFontSize),_[1]=!0),T("delta.reference",f.value),T("delta.relative"),T("delta.valueformat",f.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=f.delta.font.size}f._scaleNumbers=(!f._hasNumber||_[0])&&(!f._hasDelta||_[1])||!1;var b=d.extendFlat({},c.font);b.size=.25*(w||M||t.defaultNumberFontSize),d.coerceFont(T,"title.font",b),T("title.text");var p,u,y,m;function R(P,U){return d.coerce(p,u,x.gauge,P,U)}function L(P,U){return d.coerce(y,m,x.gauge.axis,P,U)}if(f._hasGauge){p=h.gauge,p||(p={}),u=E.newContainer(f,"gauge"),R("shape");var z=f._isBullet=f.gauge.shape==="bullet";z||T("title.align","center");var F=f._isAngular=f.gauge.shape==="angular";F||T("align","center"),R("bgcolor",c.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var N=t.valueThickness*(f.gauge.shape==="bullet"?.5:1);R("bar.thickness",N),e(p,u,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),y={},p&&(y=p.axis||{}),m=E.newContainer(u,"axis"),L("visible"),f._range=L("range",f._range);var O={font:c.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(y,m,L,"linear"),n(y,m,L,"linear",O),a(y,m,L,"linear",O),o(y,m,L,O)}else T("title.align","center"),T("align","center"),f._isAngular=f._isBullet=!1;f._length=null}function s(h,f){function v(c,T){return d.coerce(h,f,x.gauge.steps,c,T)}v("color"),v("line.color"),v("line.width"),v("range"),v("thickness")}V.exports={supplyDefaults:i}}}),TG=He({"src/traces/indicator/calc.js"(Z,V){"use strict";function d(x,S){var E=[],e=S.value;typeof S._lastValue!="number"&&(S._lastValue=S.value);var t=S._lastValue,r=t;return S._hasDelta&&typeof S.delta.reference=="number"&&(r=S.delta.reference),E[0]={y:e,lastY:t,delta:e-r,relativeDelta:(e-r)/r},E}V.exports={calc:d}}}),AG=He({"src/traces/indicator/plot.js"(Z,V){"use strict";var d=Wn(),x=(pg(),zf(p0)).interpolate,S=(pg(),zf(p0)).interpolateNumber,E=sa(),e=E.strScale,t=E.strTranslate,r=E.rad2deg,o=uh().MID_SHIFT,a=es(),n=G6(),i=ou(),s=Ho(),h=F_(),f=R2(),v=Wh(),c=Jn(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(z){return z&&z.duration>0}V.exports=function(F,N,O,P){var U=F._fullLayout,B;w(O)&&P&&(B=P()),E.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(X){var $=X[0],le=$.trace,ce=d.select(this),de=le._hasGauge,G=le._isAngular,Y=le._isBullet,ee=le.domain,q={w:U._size.w*(ee.x[1]-ee.x[0]),h:U._size.h*(ee.y[1]-ee.y[0]),l:U._size.l+U._size.w*ee.x[0],r:U._size.r+U._size.w*(1-ee.x[1]),t:U._size.t+U._size.h*(1-ee.y[1]),b:U._size.b+U._size.h*ee.y[0]},se=q.l+q.w/2,ae=q.t+q.h/2,j=Math.min(q.w/2,q.h),Q=n.innerRadius*j,re,pe,we,Se=le.align||"center";if(pe=ae,!de)re=q.l+l[Se]*q.w,we=function(ne){return y(ne,q.w,q.h)};else if(G&&(re=se,pe=ae+j/2,we=function(ne){return m(ne,.9*Q)}),Y){var Ie=n.bulletPadding,Re=1-n.bulletNumberDomainSize+Ie;re=q.l+(Re+(1-Re)*l[Se])*q.w,we=function(ne){return y(ne,(n.bulletNumberDomainSize-Ie)*q.w,q.h)}}g(F,ce,X,{numbersX:re,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var We,at;de&&(We={range:le.gauge.axis.range,color:le.gauge.bgcolor,line:{color:le.gauge.bordercolor,width:0},thickness:1},at={range:le.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:le.gauge.bordercolor,width:le.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(G?X:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(G?X:[]);tt.exit().remove(),G&&M(F,ce,X,{radius:j,innerRadius:Q,gauge:nt,layer:tt,size:q,gaugeBg:We,gaugeOutline:at,transitionOpts:O,onComplete:B});var qe=ce.selectAll("g.bullet").data(Y?X:[]);qe.exit().remove();var he=ce.selectAll("g.bulletaxis").data(Y?X:[]);he.exit().remove(),Y&&A(F,ce,X,{gauge:qe,layer:he,size:q,gaugeBg:We,gaugeOutline:at,transitionOpts:O,onComplete:B});var ue=ce.selectAll("text.title").data(X);ue.exit().remove(),ue.enter().append("text").classed("title",!0),ue.attr("text-anchor",function(){return Y?T.right:T[le.title.align]}).text(le.title.text).call(a.font,le.title.font).call(i.convertToTspans,F),ue.attr("transform",function(){var ne=q.l+q.w*l[le.title.align],Ce,Ye=n.titlePadding,rt=a.bBox(ue.node());if(de){if(G)if(le.gauge.axis.visible){var Ke=a.bBox(tt.node());Ce=Ke.top-Ye-rt.bottom}else Ce=q.t+q.h/2-j/2-rt.bottom-Ye;Y&&(Ce=pe-(rt.top+rt.bottom)/2,ne=q.l-n.bulletPadding*q.w)}else Ce=le._numbersTop-Ye-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var P=N[0].trace,U=O.gauge,B=O.layer,X=O.gaugeBg,$=O.gaugeOutline,le=O.size,ce=P.domain,de=O.transitionOpts,G=O.onComplete,Y,ee,q,se,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(le.l,le.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=le.h,Q=P.gauge.bar.thickness*j,re=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);Y=u(z,P.gauge.axis),Y._id="xbulletaxis",Y.domain=[re,pe],Y.setScale(),ee=s.calcTicks(Y),q=s.makeTransTickFn(Y),se=s.getTickSigns(Y)[2],ae=le.t+le.h,Y.visible&&(s.drawTicks(z,Y,{vals:Y.ticks==="inside"?s.clipEnds(Y,ee):ee,layer:B,path:s.makeTickPath(Y,ae,se),transFn:q}),s.drawLabels(z,Y,{vals:ee,layer:B,transFn:q,labelFns:s.makeLabelFns(Y,ae)}));function we(tt){tt.attr("width",function(qe){return Math.max(0,Y.c2p(qe.range[1])-Y.c2p(qe.range[0]))}).attr("x",function(qe){return Y.c2p(qe.range[0])}).attr("y",function(qe){return .5*(1-qe.thickness)*j}).attr("height",function(qe){return qe.thickness*j})}var Se=[X].concat(P.gauge.steps),Ie=U.selectAll("g.bg-bullet").data(Se);Ie.enter().append("g").classed("bg-bullet",!0).append("rect"),Ie.select("rect").call(we).call(b),Ie.exit().remove();var Re=U.selectAll("g.value-bullet").data([P.gauge.bar]);Re.enter().append("g").classed("value-bullet",!0).append("rect"),Re.select("rect").attr("height",Q).attr("y",(j-Q)/2).call(b),w(de)?Re.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y)))):Re.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y))):0),Re.exit().remove();var We=N.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(We);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",Y.c2p(P.gauge.threshold.value)).attr("x2",Y.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*j).call(c.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(we).call(b),nt.exit().remove()}function M(z,F,N,O){var P=N[0].trace,U=O.size,B=O.radius,X=O.innerRadius,$=O.gaugeBg,le=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,G=O.layer,Y=O.transitionOpts,ee=O.onComplete,q=Math.PI/2;function se(Mt){var kt=P.gauge.axis.range[0],Nt=P.gauge.axis.range[1],Gt=(Mt-kt)/(Nt-kt)*Math.PI-q;return Gt<-q?-q:Gt>q?q:Gt}function ae(Mt){return d.svg.arc().innerRadius((X+B)/2-Mt/2*(B-X)).outerRadius((X+B)/2+Mt/2*(B-X)).startAngle(-q)}function j(Mt){Mt.attr("d",function(kt){return ae(kt.thickness).startAngle(se(kt.range[0])).endAngle(se(kt.range[1]))()})}var Q,re,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),Q=u(z,P.gauge.axis),Q.type="linear",Q.range=P.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var Se=function(Mt){return(Q.range[0]-Mt.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},Ie={},Re=s.makeLabelFns(Q,0),We=Re.labelStandoff;Ie.xFn=function(Mt){var kt=Se(Mt);return Math.cos(kt)*We},Ie.yFn=function(Mt){var kt=Se(Mt),Nt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(We+Mt.fontSize*Nt)+Math.abs(Math.cos(kt))*(Mt.fontSize*o)},Ie.anchorFn=function(Mt){var kt=Se(Mt),Nt=Math.cos(kt);return Math.abs(Nt)<.1?"middle":Nt>0?"start":"end"},Ie.heightFn=function(Mt,kt,Nt){var Gt=Se(Mt);return-.5*(1+Math.sin(Gt))*Nt};var at=function(Mt){return t(ce[0]+B*Math.cos(Mt),ce[1]-B*Math.sin(Mt))};pe=function(Mt){return at(Se(Mt))};var nt=function(Mt){var kt=Se(Mt);return at(kt)+"rotate("+-r(kt)+")"};if(re=s.calcTicks(Q),we=s.getTickSigns(Q)[2],Q.visible){we=Q.ticks==="inside"?-1:1;var tt=(Q.linewidth||1)/2;s.drawTicks(z,Q,{vals:re,layer:G,path:"M"+we*tt+",0h"+we*Q.ticklen,transFn:nt}),s.drawLabels(z,Q,{vals:re,layer:G,transFn:pe,labelFns:Ie})}var qe=[$].concat(P.gauge.steps),he=de.selectAll("g.bg-arc").data(qe);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var ue=ae(P.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([P.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(Y)?(Ce.transition().duration(Y.duration).ease(Y.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",p(ue,se(N[0].lastY),se(N[0].y))),P._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?ue.endAngle(se(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),qe=[];var Ye=P.gauge.threshold.value;(Ye||Ye===0)&&qe.push({range:[Ye,Ye],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(qe);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Ke=de.selectAll("g.gauge-outline").data([le]);Ke.enter().append("g").classed("gauge-outline",!0).append("path"),Ke.select("path").call(j).call(b),Ke.exit().remove()}function g(z,F,N,O){var P=N[0].trace,U=O.numbersX,B=O.numbersY,X=P.align||"center",$=T[X],le=O.transitionOpts,ce=O.onComplete,de=E.ensureSingle(F,"g","numbers"),G,Y,ee,q=[];P._hasNumber&&q.push("number"),P._hasDelta&&(q.push("delta"),P.delta.position==="left"&&q.reverse());var se=de.selectAll("text").data(q);se.enter().append("text"),se.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),se.exit().remove();function ae(at,nt,tt,qe){if(at.match("s")&&tt>=0!=qe>=0&&!nt(tt).slice(-1).match(_)&&!nt(qe).slice(-1).match(_)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),ue=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(ue,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:P.number.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=P.number.suffix,qe=P.number.prefix,he=de.select("text.number");function ue(){var ne=typeof N[0].y=="number"?qe+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,P.number.font).call(i.convertToTspans,z)}return w(le)?he.transition().duration(le.duration).ease(le.easing).each("end",function(){ue(),ce&&ce()}).each("interrupt",function(){ue(),ce&&ce()}).attrTween("text",function(){var ne=d.select(this),Ce=S(N[0].lastY,N[0].y);P._lastValue=N[0].y;var Ye=ae(P.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(qe+Ye(Ce(rt))+tt)}}):ue(),G=R(qe+nt(N[0].y)+tt,P.number.font,$,z),he}function Q(){var at=u(z,{tickformat:P.delta.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=P.delta.suffix,qe=P.delta.prefix,he=function(rt){var Ke=P.delta.relative?rt.relativeDelta:rt.delta;return Ke},ue=function(rt,Ke){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+qe+Ke(rt)+tt},ne=function(rt){return rt.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,P.delta.font).call(c.fill,ne({delta:P._deltaLastValue}));function Ye(){Ce.text(ue(he(N[0]),nt)).call(c.fill,ne(N[0])).call(i.convertToTspans,z)}return w(le)?Ce.transition().duration(le.duration).ease(le.easing).tween("text",function(){var rt=d.select(this),Ke=he(N[0]),Mt=P._deltaLastValue,kt=ae(P.delta.valueformat,nt,Mt,Ke),Nt=S(Mt,Ke);return P._deltaLastValue=Ke,function(Gt){rt.text(ue(Nt(Gt),kt)),rt.call(c.fill,ne({delta:Nt(Gt)}))}}).each("end",function(){Ye(),ce&&ce()}).each("interrupt",function(){Ye(),ce&&ce()}):Ye(),Y=R(ue(he(N[0]),nt),P.delta.font,$,z),Ce}var re=P.mode+P.align,pe;if(P._hasDelta&&(pe=Q(),re+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,re+=P.delta.increasing.symbol+P.delta.decreasing.symbol,ee=Y),P._hasNumber&&(j(),re+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,ee=G),P._hasDelta&&P._hasNumber){var we=[(G.left+G.right)/2,(G.top+G.bottom)/2],Se=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Ie,Re,We=.75*P.delta.font.size;P.delta.position==="left"&&(Ie=L(P,"deltaPos",0,-1*(G.width*l[P.align]+Y.width*(1-l[P.align])+We),re,Math.min),Re=we[1]-Se[1],ee={width:G.width+Y.width+We,height:Math.max(G.height,Y.height),left:Y.left+Ie,right:G.right,top:Math.min(G.top,Y.top+Re),bottom:Math.max(G.bottom,Y.bottom+Re)}),P.delta.position==="right"&&(Ie=L(P,"deltaPos",0,G.width*(1-l[P.align])+Y.width*l[P.align]+We,re,Math.max),Re=we[1]-Se[1],ee={width:G.width+Y.width+We,height:Math.max(G.height,Y.height),left:G.left,right:Y.right+Ie,top:Math.min(G.top,Y.top+Re),bottom:Math.max(G.bottom,Y.bottom+Re)}),P.delta.position==="bottom"&&(Ie=null,Re=Y.height,ee={width:Math.max(G.width,Y.width),height:G.height+Y.height,left:Math.min(G.left,Y.left),right:Math.max(G.right,Y.right),top:G.bottom-G.height,bottom:G.bottom+Y.height}),P.delta.position==="top"&&(Ie=null,Re=G.top,ee={width:Math.max(G.width,Y.width),height:G.height+Y.height,left:Math.min(G.left,Y.left),right:Math.max(G.right,Y.right),top:G.bottom-G.height-Y.height,bottom:G.bottom}),pe.attr({dx:Ie,dy:Re})}(P._hasNumber||P._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(ee);re+=at[2];var nt=L(P,"numbersScale",1,at[0],re,Math.min),tt;P._scaleNumbers||(nt=1),P._isAngular?tt=B-nt*ee.bottom:tt=B-nt*(ee.top+ee.bottom)/2,P._numbersTop=nt*ee.top+tt;var qe=ee[X];X==="center"&&(qe=(ee.left+ee.right)/2);var he=U-nt*qe;return he=L(P,"numbersTranslate",0,he,re,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(d.select(this),F.line.color)}).each(function(F){c.fill(d.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function p(z,F,N){return function(){var O=x(F,N);return function(P){return z.endAngle(O(P))()}}}function u(z,F,N){var O=z._fullLayout,P=E.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X($,le){return E.coerce(P,U,v,$,le)}return h(P,U,X,B,O),f(P,U,X,B),U}function y(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function m(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function R(z,F,N,O){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),U=d.select(P);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(i.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function L(z,F,N,O,P,U){var B="_cache"+F;z[B]&&z[B].key===P||(z[B]={key:P,value:N});var X=E.aggNums(U,null,[z[B].value,O],2);return z[B].value=X,X}}}),SG=He({"src/traces/indicator/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:bG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:wG().supplyDefaults,calc:TG().calc,plot:AG(),meta:{}}}}),MG=He({"lib/indicator.js"(Z,V){"use strict";V.exports=SG()}}),H6=He({"src/traces/table/attributes.js"(Z,V){"use strict";var d=$0(),x=Qo().extendFlat,S=pc().overrideAll,E=tc(),e=wc().attributes,t=tf().descriptionOnlyNumbers,r=V.exports=S({domain:e({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:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},d.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:x({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},d.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:x({},E({arrayOk:!0}))}},"calc","from-root")}}),EG=He({"src/traces/table/defaults.js"(Z,V){"use strict";var d=sa(),x=H6(),S=wc().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),n=a.slice().sort(function(h,f){return h-f}),i=a.map(function(h){return n.indexOf(h)}),s=i.length;s<o;s++)i.push(s);t("columnorder",i)}V.exports=function(t,r,o,a){function n(i,s){return d.coerce(t,r,x,i,s)}S(r,a,n),n("columnwidth"),n("header.values"),n("header.format"),n("header.align"),n("header.prefix"),n("header.suffix"),n("header.height"),n("header.line.width"),n("header.line.color"),n("header.fill.color"),d.coerceFont(n,"header.font",a.font),E(r,n),n("cells.values"),n("cells.format"),n("cells.align"),n("cells.prefix"),n("cells.suffix"),n("cells.height"),n("cells.line.width"),n("cells.line.color"),n("cells.fill.color"),d.coerceFont(n,"cells.font",a.font),r._length=null}}}),kG=He({"src/traces/table/calc.js"(Z,V){"use strict";var d=kv().wrap;V.exports=function(){return d({})}}}),W6=He({"src/traces/table/constants.js"(Z,V){"use strict";V.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),CG=He({"src/traces/table/data_preparation_helper.js"(Z,V){"use strict";var d=W6(),x=Qo().extendFlat,S=as(),E=bp().isTypedArray,e=bp().isArrayOrTypedArray;V.exports=function(v,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},_=o(c.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),A=c.domain,M=Math.floor(v._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(v._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[d.emptyHeaderHeight],p=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),y=g-u,m=y+d.uplift,R=s(p,m),L=s(b,u),z=i(L,[]),F=i(R,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,le){return le})));var P=w.map(function($,le){var ce=e(c.columnwidth)?c.columnwidth[Math.min(le,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=P.reduce(r,0);P=P.map(function($){return $/U*M});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),X={key:c.uid+v._context.staticPlot,translateX:A.x[0]*v._fullLayout._size.w,translateY:v._fullLayout._size.h*(1-A.y[1]),size:v._fullLayout._size,width:M,maxLineWidth:B,height:g,columnOrder:O,groupHeight:g,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},c.cells,{values:T}),headerCells:x({},c.header,{values:w}),gdColumns:w.map(function($){return $[0]}),gdColumnsOriginalOrder:w.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function($,le){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:le,xIndex:O[le],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[le]}})};return X.columns.forEach(function($){$.calcdata=X,$.x=n($)}),X};function t(f){if(e(f)){for(var v=0,c=0;c<f.length;c++)v=Math.max(v,t(f[c]));return v}return f}function r(f,v){return f+v}function o(f){var v=f.slice(),c=1/0,T=0,l;for(l=0;l<v.length;l++)E(v[l])?v[l]=Array.from(v[l]):e(v[l])||(v[l]=[v[l]]),c=Math.min(c,v[l].length),T=Math.max(T,v[l].length);if(c!==T)for(l=0;l<v.length;l++){var _=T-v[l].length;_&&(v[l]=v[l].concat(a(_)))}return v}function a(f){for(var v=new Array(f),c=0;c<f;c++)v[c]="";return v}function n(f){return f.calcdata.columns.reduce(function(v,c){return c.xIndex<f.xIndex?v+c.columnWidth:v},0)}function i(f,v){var c=Object.keys(f);return c.map(function(T){return x({},f[T],{auxiliaryBlocks:v})})}function s(f,v){for(var c={},T,l=0,_=0,w=h(),A=0,M=0,g=0;g<f.length;g++)T=f[g],w.rows.push({rowIndex:g,rowHeight:T}),_+=T,(_>=v||g===f.length-1)&&(c[l]=w,w.key=M++,w.firstRowIndex=A,w.lastRowIndex=g,w=h(),l+=_,A=g+1,_=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),LG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var V=Qo().extendFlat;Z.splitToPanels=function(x){var S=[0,0],E=V({},x,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:V({},x.calcdata,{cells:x.calcdata.headerCells})}),e=V({},x,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),t=V({},x,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[e,t,E]},Z.splitToCells=function(x){var S=d(x);return(x.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:E}})};function d(x){var S=x.rowBlocks[x.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),X6=He({"src/traces/table/plot.js"(Z,V){"use strict";var d=W6(),x=Wn(),S=sa(),E=S.numberFormat,e=kv(),t=es(),r=ou(),o=sa().raiseToTop,a=sa().strTranslate,n=sa().cancelTransition,i=CG(),s=LG(),h=Jn();V.exports=function(re,pe){var we=!re._context.staticPlot,Se=re._fullLayout._paper.selectAll("."+d.cn.table).data(pe.map(function(Ke){var Mt=e.unwrap(Ke),kt=Mt.trace;return i(re,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(d.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"),Se.attr("width",function(Ke){return Ke.width+Ke.size.l+Ke.size.r}).attr("height",function(Ke){return Ke.height+Ke.size.t+Ke.size.b}).attr("transform",function(Ke){return a(Ke.translateX,Ke.translateY)});var Ie=Se.selectAll("."+d.cn.tableControlView).data(e.repeat,e.keyFun),Re=Ie.enter().append("g").classed(d.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var We="onwheel"in document?"wheel":"mousewheel";Re.on("mousemove",function(Ke){Ie.filter(function(Mt){return Ke===Mt}).call(l,re)}).on(We,function(Ke){if(!Ke.scrollbarState.wheeling){Ke.scrollbarState.wheeling=!0;var Mt=Ke.scrollY+x.event.deltaY,kt=$(re,Ie,null,Mt)(Ke);kt||(x.event.stopPropagation(),x.event.preventDefault()),Ke.scrollbarState.wheeling=!1}}).call(l,re,!0)}Ie.attr("transform",function(Ke){return a(Ke.size.l,Ke.size.t)});var at=Ie.selectAll("."+d.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(d.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Ke){return Ke.width}).attr("height",function(Ke){return Ke.height}),Ie.each(function(Ke){t.setClipUrl(x.select(this),v(re,Ke),re)});var nt=Ie.selectAll("."+d.cn.yColumn).data(function(Ke){return Ke.columns},e.keyFun);nt.enter().append("g").classed(d.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Ke){return a(Ke.x,0)}),we&&nt.call(x.behavior.drag().origin(function(Ke){var Mt=x.select(this);return N(Mt,Ke,-d.uplift),o(this),Ke.calcdata.columnDragInProgress=!0,l(Ie.filter(function(kt){return Ke.calcdata.key===kt.key}),re),Ke}).on("drag",function(Ke){var Mt=x.select(this),kt=function(Mr){return(Ke===Mr?x.event.x:Mr.x)+Mr.columnWidth/2};Ke.x=Math.max(-d.overdrag,Math.min(Ke.calcdata.width+d.overdrag-Ke.columnWidth,x.event.x));var Nt=T(nt).filter(function(Mr){return Mr.calcdata.key===Ke.calcdata.key}),Gt=Nt.sort(function(Mr,mr){return kt(Mr)-kt(mr)});Gt.forEach(function(Mr,mr){Mr.xIndex=mr,Mr.x=Ke===Mr?Mr.x:Mr.xScale(Mr)}),nt.filter(function(Mr){return Ke!==Mr}).transition().ease(d.transitionEase).duration(d.transitionDuration).attr("transform",function(Mr){return a(Mr.x,0)}),Mt.call(n).attr("transform",a(Ke.x,-d.uplift))}).on("dragend",function(Ke){var Mt=x.select(this),kt=Ke.calcdata;Ke.x=Ke.xScale(Ke),Ke.calcdata.columnDragInProgress=!1,N(Mt,Ke,0),z(re,kt,kt.columns.map(function(Nt){return Nt.xIndex}))})),nt.each(function(Ke){t.setClipUrl(x.select(this),c(re,Ke),re)});var tt=nt.selectAll("."+d.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(d.cn.columnBlock,!0).attr("id",function(Ke){return Ke.key}),tt.style("cursor",function(Ke){return Ke.dragHandle?"ew-resize":Ke.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var qe=tt.filter(P),he=tt.filter(O);we&&he.call(x.behavior.drag().origin(function(Ke){return x.event.stopPropagation(),Ke}).on("drag",$(re,Ie,-1)).on("dragend",function(){})),_(re,Ie,qe,tt),_(re,Ie,he,tt);var ue=Ie.selectAll("."+d.cn.scrollAreaClip).data(e.repeat,e.keyFun);ue.enter().append("clipPath").classed(d.cn.scrollAreaClip,!0).attr("id",function(Ke){return v(re,Ke)});var ne=ue.selectAll("."+d.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(d.cn.scrollAreaClipRect,!0).attr("x",-d.overdrag).attr("y",-d.uplift).attr("fill","none"),ne.attr("width",function(Ke){return Ke.width+2*d.overdrag}).attr("height",function(Ke){return Ke.height+d.uplift});var Ce=nt.selectAll("."+d.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(d.cn.columnBoundary,!0);var Ye=nt.selectAll("."+d.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ye.enter().append("clipPath").classed(d.cn.columnBoundaryClippath,!0),Ye.attr("id",function(Ke){return c(re,Ke)});var rt=Ye.selectAll("."+d.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(d.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Ke){return Ke.columnWidth+2*f(Ke)}).attr("height",function(Ke){return Ke.calcdata.height+2*f(Ke)+d.uplift}).attr("x",function(Ke){return-f(Ke)}).attr("y",function(Ke){return-f(Ke)}),X(null,he,Ie)};function f(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function v(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function c(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function T(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function l(Q,re,pe){function we(nt){var tt=nt.rowBlocks;return ee(tt,tt.length-1)+(tt.length?q(tt[tt.length-1],1/0):1)}var Se=Q.selectAll("."+d.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(d.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Se.each(function(nt){var tt=nt.scrollbarState;tt.totalHeight=we(nt),tt.scrollableAreaHeight=nt.groupHeight-U(nt),tt.currentlyVisibleHeight=Math.min(tt.totalHeight,tt.scrollableAreaHeight),tt.ratio=tt.currentlyVisibleHeight/tt.totalHeight,tt.barLength=Math.max(tt.ratio*tt.currentlyVisibleHeight,d.goldenRatio*d.scrollbarWidth),tt.barWiggleRoom=tt.currentlyVisibleHeight-tt.barLength,tt.wiggleRoom=Math.max(0,tt.totalHeight-tt.scrollableAreaHeight),tt.topY=tt.barWiggleRoom===0?0:nt.scrollY/tt.wiggleRoom*tt.barWiggleRoom,tt.bottomY=tt.topY+tt.barLength,tt.dragMultiplier=tt.wiggleRoom/tt.barWiggleRoom}).attr("transform",function(nt){var tt=nt.width+d.scrollbarWidth/2+d.scrollbarOffset;return a(tt,U(nt))});var Ie=Se.selectAll("."+d.cn.scrollbar).data(e.repeat,e.keyFun);Ie.enter().append("g").classed(d.cn.scrollbar,!0);var Re=Ie.selectAll("."+d.cn.scrollbarSlider).data(e.repeat,e.keyFun);Re.enter().append("g").classed(d.cn.scrollbarSlider,!0),Re.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var We=Re.selectAll("."+d.cn.scrollbarGlyph).data(e.repeat,e.keyFun);We.enter().append("line").classed(d.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",d.scrollbarWidth).attr("stroke-linecap","round").attr("y1",d.scrollbarWidth/2),We.attr("y2",function(nt){return nt.scrollbarState.barLength-d.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),We.transition().delay(0).duration(0),We.transition().delay(d.scrollbarHideDelay).duration(d.scrollbarHideDuration).attr("stroke-opacity",0);var at=Ie.selectAll("."+d.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(d.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",d.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=x.event.y,qe=this.getBoundingClientRect(),he=nt.scrollbarState,ue=tt-qe.top,ne=x.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=ue&&ue<=he.bottomY||$(re,Q,null,ne(ue-he.barLength/2))(nt)}).call(x.behavior.drag().origin(function(nt){return x.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(re,Q)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(We.remove(),at.remove())}function _(Q,re,pe,we){var Se=w(pe),Ie=A(Se);p(Ie);var Re=M(Ie);y(Re);var We=b(Ie),at=g(We);u(at),m(at,re,we,Q),Y(Ie)}function w(Q){var re=Q.selectAll("."+d.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(d.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+d.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return re.enter().append("g").classed(d.cn.columnCell,!0),re.exit().remove(),re}function M(Q){var re=Q.selectAll("."+d.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("rect").classed(d.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+d.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("text").classed(d.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(Q){var re=Q.selectAll("."+d.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("g").classed(d.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function p(Q){Q.each(function(re,pe){var we=re.calcdata.cells.font,Se=re.column.specIndex,Ie={size:F(we.size,Se,pe),color:F(we.color,Se,pe),family:F(we.family,Se,pe),weight:F(we.weight,Se,pe),style:F(we.style,Se,pe),variant:F(we.variant,Se,pe),textcase:F(we.textcase,Se,pe),lineposition:F(we.lineposition,Se,pe),shadow:F(we.shadow,Se,pe)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Se,pe),re.cellBorderWidth=F(re.calcdata.cells.line.width,Se,pe),re.font=Ie})}function u(Q){Q.each(function(re){t.font(x.select(this),re.font)})}function y(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var pe=x.select(this);h.stroke(pe,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),h.fill(pe,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function m(Q,re,pe,we){Q.text(function(Se){var Ie=Se.column.specIndex,Re=Se.rowNumber,We=Se.value,at=typeof We=="string",nt=at&&We.match(/<br>/i),tt=!at||nt;Se.mayHaveMarkup=at&&We.match(/[<&>]/);var qe=R(We);Se.latex=qe;var he=qe?"":F(Se.calcdata.cells.prefix,Ie,Re)||"",ue=qe?"":F(Se.calcdata.cells.suffix,Ie,Re)||"",ne=qe?null:F(Se.calcdata.cells.format,Ie,Re)||null,Ce=he+(ne?E(ne)(Se.value):Se.value)+ue,Ye;Se.wrappingNeeded=!Se.wrapped&&!tt&&!qe&&(Ye=L(Ce)),Se.cellHeightMayIncrease=nt||qe||Se.mayHaveMarkup||(Ye===void 0?L(Ce):Ye),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Ke=d.wrapSplitCharacter===" "?Ce.replace(/<a href=/ig,"<a_href="):Ce,Mt=Ke.split(d.wrapSplitCharacter),kt=d.wrapSplitCharacter===" "?Mt.map(function(Nt){return Nt.replace(/<a_href=/ig,"<a href=")}):Mt;Se.fragments=kt.map(function(Nt){return{text:Nt,width:null}}),Se.fragments.push({fragment:d.wrapSpacer,width:null}),rt=kt.join(d.lineBreaker)+d.lineBreaker+d.wrapSpacer}else delete Se.fragments,rt=Ce;return rt}).attr("dy",function(Se){return Se.needsConvertToTspans?0:"0.75em"}).each(function(Se){var Ie=this,Re=x.select(Ie),We=Se.wrappingNeeded?ce:de;Se.needsConvertToTspans?r.convertToTspans(Re,we,We(pe,Ie,re,we,Se)):x.select(Ie.parentNode).attr("transform",function(at){return a(G(at),d.cellPad)}).attr("text-anchor",function(at){return{left:"start",center:"middle",right:"end"}[at.align]})})}function R(Q){return typeof Q=="string"&&Q.match(d.latexCheck)}function L(Q){return Q.indexOf(d.wrapSplitCharacter)!==-1}function z(Q,re,pe){var we=re.gdColumnsOriginalOrder;re.gdColumns.sort(function(Se,Ie){return pe[we.indexOf(Se)]-pe[we.indexOf(Ie)]}),re.columnorder=pe,Q.emit("plotly_restyle")}function F(Q,re,pe){if(S.isArrayOrTypedArray(Q)){var we=Q[Math.min(re,Q.length-1)];return S.isArrayOrTypedArray(we)?we[Math.min(pe,we.length-1)]:we}else return Q}function N(Q,re,pe){Q.transition().ease(d.releaseTransitionEase).duration(d.releaseTransitionDuration).attr("transform",a(re.x,pe))}function O(Q){return Q.type==="cells"}function P(Q){return Q.type==="header"}function U(Q){var re=Q.rowBlocks.length?Q.rowBlocks[0].auxiliaryBlocks:[];return re.reduce(function(pe,we){return pe+q(we,1/0)},0)}function B(Q,re,pe){for(var we=[],Se=0,Ie=0;Ie<Q.length;Ie++){for(var Re=Q[Ie],We=Re.rows,at=0,nt=0;nt<We.length;nt++)at+=We[nt].rowHeight;Re.allRowsHeight=at;var tt=Se+at,qe=re,he=qe+pe;qe<tt&&he>Se&&we.push(Ie),Se+=at}return we}function X(Q,re,pe){var we=T(re)[0];if(we!==void 0){var Se=we.rowBlocks,Ie=we.calcdata,Re=ee(Se,Se.length),We=we.calcdata.groupHeight-U(we),at=Ie.scrollY=Math.max(0,Math.min(Re-We,Ie.scrollY)),nt=B(Se,at,We);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),re.each(function(tt,qe){tt.page=nt[qe],tt.scrollY=at}),re.attr("transform",function(tt){var qe=ee(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,qe)}),Q&&(le(Q,pe,re,nt,we.prevPages,we,0),le(Q,pe,re,nt,we.prevPages,we,1),l(pe,Q))}}function $(Q,re,pe,we){return function(Ie){var Re=Ie.calcdata?Ie.calcdata:Ie,We=re.filter(function(qe){return Re.key===qe.key}),at=pe||Re.scrollbarState.dragMultiplier,nt=Re.scrollY;Re.scrollY=we===void 0?Re.scrollY+at*x.event.dy:we;var tt=We.selectAll("."+d.cn.yColumn).selectAll("."+d.cn.columnBlock).filter(O);return X(Q,tt,We),Re.scrollY===nt}}function le(Q,re,pe,we,Se,Ie,Re){var We=we[Re]!==Se[Re];We&&(clearTimeout(Ie.currentRepaint[Re]),Ie.currentRepaint[Re]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Re&&we[tt]!==Se[tt]});_(Q,re,at,pe),Se[Re]=we[Re]}))}function ce(Q,re,pe,we){return function(){var Ie=x.select(re.parentNode);Ie.each(function(Re){var We=Re.fragments;Ie.selectAll("tspan.line").each(function(Ce,Ye){We[Ye].width=this.getComputedTextLength()});var at=We[We.length-1].width,nt=We.slice(0,-1),tt=[],qe,he,ue=0,ne=Re.column.columnWidth-2*d.cellPad;for(Re.value="";nt.length;)qe=nt.shift(),he=qe.width+at,ue+he>ne&&(Re.value+=tt.join(d.wrapSpacer)+d.lineBreaker,tt=[],ue=0),tt.push(qe.text),ue+=he;ue&&(Re.value+=tt.join(d.wrapSpacer)),Re.wrapped=!0}),Ie.selectAll("tspan.line").remove(),m(Ie.select("."+d.cn.cellText),pe,Q,we),x.select(re.parentNode.parentNode).call(Y)}}function de(Q,re,pe,we,Se){return function(){if(!Se.settledY){var Re=x.select(re.parentNode),We=ae(Se),at=Se.key-We.firstRowIndex,nt=We.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*d.cellPad:nt,qe=Math.max(tt,nt),he=qe-We.rows[at].rowHeight;he&&(We.rows[at].rowHeight=qe,Q.selectAll("."+d.cn.columnCell).call(Y),X(null,Q.filter(O),0),l(pe,we,!0)),Re.attr("transform",function(){var ue=this,ne=ue.parentNode,Ce=ne.getBoundingClientRect(),Ye=x.select(ue.parentNode).select("."+d.cn.cellRect).node().getBoundingClientRect(),rt=ue.transform.baseVal.consolidate(),Ke=Ye.top-Ce.top+(rt?rt.matrix.f:d.cellPad);return a(G(Se,x.select(ue.parentNode).select("."+d.cn.cellTextHolder).node().getBoundingClientRect().width),Ke)}),Se.settledY=!0}}}function G(Q,re){switch(Q.align){case"left":return d.cellPad;case"right":return Q.column.columnWidth-(re||0)-d.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return d.cellPad}}function Y(Q){Q.attr("transform",function(re){var pe=re.rowBlocks[0].auxiliaryBlocks.reduce(function(Re,We){return Re+q(We,1/0)},0),we=ae(re),Se=q(we,re.key),Ie=Se+pe;return a(0,Ie)}).selectAll("."+d.cn.cellRect).attr("height",function(re){return j(ae(re),re.key).rowHeight})}function ee(Q,re){for(var pe=0,we=re-1;we>=0;we--)pe+=se(Q[we]);return pe}function q(Q,re){for(var pe=0,we=0;we<Q.rows.length&&Q.rows[we].rowIndex<re;we++)pe+=Q.rows[we].rowHeight;return pe}function se(Q){var re=Q.allRowsHeight;if(re!==void 0)return re;for(var pe=0,we=0;we<Q.rows.length;we++)pe+=Q.rows[we].rowHeight;return Q.allRowsHeight=pe,pe}function ae(Q){return Q.rowBlocks[Q.page]}function j(Q,re){return Q.rows[re-Q.firstRowIndex]}}}),PG=He({"src/traces/table/base_plot.js"(Z){"use strict";var V=Hh().getModuleCalcData,d=X6(),x="table";Z.name=x,Z.plot=function(S){var E=V(S.calcdata,x)[0];E.length&&d(S,E)},Z.clean=function(S,E,e,t){var r=t._has&&t._has(x),o=E._has&&E._has(x);r&&!o&&t._paperdiv.selectAll(".table").remove()}}}),IG=He({"src/traces/table/index.js"(Z,V){"use strict";V.exports={attributes:H6(),supplyDefaults:EG(),calc:kG(),plot:X6(),moduleType:"trace",name:"table",basePlotModule:PG(),categories:["noOpacity"],meta:{}}}}),RG=He({"lib/table.js"(Z,V){"use strict";V.exports=IG()}}),DG=He({"src/traces/carpet/axis_attributes.js"(Z,V){"use strict";var d=tc(),x=sh(),S=Wh(),E=tf().descriptionWithDates,e=pc().overrideAll,t=Gh().dash,r=Qo().extendFlat;V.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:d({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:S.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:r({},S.labelalias,{editType:"calc"}),tickfont:d({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:E("tick label")},tickformatstops:e(S.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:x.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:r({},t,{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:r({},t,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:x.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"}}}),PT=He({"src/traces/carpet/attributes.js"(Z,V){"use strict";var d=tc(),x=DG(),S=sh(),E=d({editType:"calc"}),e=af().zorder;E.family.dflt='"Open Sans", verdana, arial, sans-serif',E.size.dflt=12,E.color.dflt=S.defaultLine,V.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:x,baxis:x,font:E,color:{valType:"color",dflt:S.defaultLine,editType:"plot"},zorder:e}}}),zG=He({"src/traces/carpet/xy_defaults.js"(Z,V){"use strict";var d=sa().isArray1D;V.exports=function(S,E,e){var t=e("x"),r=t&&t.length,o=e("y"),a=o&&o.length;if(!r&&!a)return!1;if(E._cheater=!t,(!r||d(t))&&(!a||d(o))){var n=r?t.length:1/0;a&&(n=Math.min(n,o.length)),E.a&&E.a.length&&(n=Math.min(n,E.a.length)),E.b&&E.b.length&&(n=Math.min(n,E.b.length)),E._length=n}else E._length=null;return!0}}}),FG=He({"src/traces/carpet/axis_defaults.js"(Z,V){"use strict";var d=PT(),x=Jn().addOpacity,S=lo(),E=sa(),e=Y0(),t=Qm(),r=e0(),o=I2(),a=wv(),n=a1();V.exports=function(h,f,v){var c=v.letter,T=v.font||{},l=d[c+"axis"];function _(B,X){return E.coerce(h,f,l,B,X)}function w(B,X){return E.coerce2(h,f,l,B,X)}v.name&&(f._name=v.name,f._id=v.name),_("autotypenumbers",v.autotypenumbersDflt);var A=_("type");if(A==="-"&&(v.data&&i(f,v.data),f.type==="-"?f.type="linear":A=h.type=f.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",c+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),f.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),f._hovertitle=c,A==="date"){var M=S.getComponentMethod("calendars","handleDefaults");M(h,f,"calendar",v.calendar)}a(f,v.fullLayout),f.c2p=E.identity;var g=_("color",v.dfltColor),b=g===h.color?g:T.color,p=_("title.text");p&&(E.coerceFont(_,"title.font",T,{overrideDflt:{size:E.bigFont(T.size),color:b}}),_("title.offset")),_("tickangle");var u=_("autorange",!f.isValidRange(h.range));u&&_("rangemode"),_("range"),f.cleanRange(),_("fixedrange"),e(h,f,_,A),r(h,f,_,A,v),t(h,f,_,A,v),o(h,f,_,{data:v.data,dataAttr:c});var y=w("gridcolor",x(g,.3)),m=w("gridwidth"),R=w("griddash"),L=_("showgrid");L||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var z=w("startlinecolor",g),F=w("startlinewidth",m),N=_("startline",f.showgrid||!!z||!!F);N||(delete f.startlinecolor,delete f.startlinewidth);var O=w("endlinecolor",g),P=w("endlinewidth",m),U=_("endline",f.showgrid||!!O||!!P);return U||(delete f.endlinecolor,delete f.endlinewidth),L?(_("minorgridcount"),_("minorgridwidth",m),_("minorgriddash",R),_("minorgridcolor",x(y,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,_("tickmode"),f};function i(s,h){if(s.type==="-"){var f=s._id,v=f.charAt(0),c=v+"calendar",T=s[c];s.type=n(h,T,{autotypenumbers:s.autotypenumbers})}}}}),OG=He({"src/traces/carpet/ab_defaults.js"(Z,V){"use strict";var d=FG(),x=zl();V.exports=function(e,t,r,o,a){var n=o("a");n||(o("da"),o("a0"));var i=o("b");i||(o("db"),o("b0")),S(e,t,r,a)};function S(E,e,t,r){var o=["aaxis","baxis"];o.forEach(function(a){var n=a.charAt(0),i=E[a]||{},s=x.newContainer(e,a),h={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:n+"axis",letter:n,font:e.font,name:a,data:E[n],calendar:e.calendar,dfltColor:r,bgColor:t.paper_bgcolor,autotypenumbersDflt:t.autotypenumbers,fullLayout:t};d(i,s,h),s._categories=s._categories||[],!E[a]&&i.type!=="-"&&(E[a]={type:i.type})})}}}),BG=He({"src/traces/carpet/defaults.js"(Z,V){"use strict";var d=sa(),x=zG(),S=OG(),E=PT(),e=sh();V.exports=function(r,o,a,n){function i(f,v){return d.coerce(r,o,E,f,v)}o._clipPathId="clip"+o.uid+"carpet";var s=i("color",e.defaultLine);if(d.coerceFont(i,"font",n.font),i("carpet"),S(r,o,n,i,s),!o.a||!o.b){o.visible=!1;return}o.a.length<3&&(o.aaxis.smoothing=0),o.b.length<3&&(o.baxis.smoothing=0);var h=x(r,o,i);h||(o.visible=!1),o._cheater&&i("cheaterslope"),i("zorder")}}}),Z6=He({"src/traces/carpet/map_1d_array.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(S,E,e){var t;for(d(S)?S.length>E.length&&(S=S.slice(0,E.length)):S=[],t=0;t<E.length;t++)S[t]=e(E[t]);return S}}}),Y6=He({"src/traces/carpet/makepath.js"(Z,V){"use strict";V.exports=function(x,S,E){if(x.length===0)return"";var e,t=[],r=E?3:1;for(e=0;e<x.length;e+=r)t.push(x[e]+","+S[e]),E&&e<x.length-r&&(t.push("C"),t.push([x[e+1]+","+S[e+1],x[e+2]+","+S[e+2]+" "].join(" ")));return t.join(E?"":"L")}}}),NG=He({"src/traces/carpet/orient_text.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t,r){var o=t[0]*x.dpdx(S),a=t[1]*x.dpdy(E),n=1,i=1;if(r){var s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),f=(t[0]*r[0]+t[1]*r[1])/s/h;i=Math.max(0,f)}var v=Math.atan2(a,o)*180/Math.PI;return v<-90?(v+=180,n=-n):v>90&&(v-=180,n=-n),{angle:v,flip:n,p:x.c2p(e,S,E),offsetMultplier:i}}}}),UG=He({"src/traces/carpet/plot.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Z6(),E=Y6(),e=NG(),t=ou(),r=sa(),o=r.strRotate,a=r.strTranslate,n=uh();V.exports=function(_,w,A,M){var g=_._context.staticPlot,b=w.xaxis,p=w.yaxis,u=_._fullLayout,y=u._clips;r.makeTraceGroups(M,A,"trace").each(function(m){var R=d.select(this),L=m[0],z=L.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),P=r.ensureSingle(R,"g","majorlayer"),U=r.ensureSingle(R,"g","boundarylayer"),B=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(b,p,P,F,"a",F._gridlines,!0,g),s(b,p,P,N,"b",N._gridlines,!0,g),s(b,p,O,F,"a",F._minorgridlines,!0,g),s(b,p,O,N,"b",N._minorgridlines,!0,g),s(b,p,U,F,"a-boundary",F._boundarylines,g),s(b,p,U,N,"b-boundary",N._boundarylines,g);var X=h(_,b,p,z,L,B,F._labels,"a-label"),$=h(_,b,p,z,L,B,N._labels,"b-label");f(_,B,z,L,b,p,X,$),i(z,L,y,b,p)})};function i(l,_,w,A,M){var g,b,p,u,y=w.select("#"+l._clipPathId);y.size()||(y=w.append("clipPath").classed("carpetclip",!0));var m=r.ensureSingle(y,"path","carpetboundary"),R=_.clipsegments,L=[];for(u=0;u<R.length;u++)g=R[u],b=S([],g.x,A.c2p),p=S([],g.y,M.c2p),L.push(E(b,p,g.bicubic));var z="M"+L.join("L")+"Z";y.attr("id",l._clipPathId),m.attr("d",z)}function s(l,_,w,A,M,g,b){var p="const-"+M+"-lines",u=w.selectAll("."+p).data(g);u.enter().append("path").classed(p,!0).style("vector-effect",b?"none":"non-scaling-stroke"),u.each(function(y){var m=y,R=m.x,L=m.y,z=S([],R,l.c2p),F=S([],L,_.c2p),N="M"+E(z,F,m.smoothing),O=d.select(this);O.attr("d",N).style("stroke-width",m.width).style("stroke",m.color).style("stroke-dasharray",x.dashStyle(m.dash,m.width)).style("fill","none")}),u.exit().remove()}function h(l,_,w,A,M,g,b,p){var u=g.selectAll("text."+p).data(b);u.enter().append("text").classed(p,!0);var y=0,m={};return u.each(function(R,L){var z;if(R.axis.tickangle==="auto")z=e(A,_,w,R.xy,R.dxy);else{var F=(R.axis.tickangle+180)*Math.PI/180;z=e(A,_,w,R.xy,[Math.cos(F),Math.sin(F)])}L||(m={angle:z.angle,flip:z.flip});var N=(R.endAnchor?-1:1)*z.flip,O=d.select(this).attr({"text-anchor":N>0?"start":"end","data-notex":1}).call(x.font,R.font).text(R.text).call(t.convertToTspans,l),P=x.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*N,P.height*.3)),y=Math.max(y,P.width+R.axis.labelpadding)}),u.exit().remove(),m.maxExtent=y,m}function f(l,_,w,A,M,g,b,p){var u,y,m,R,L=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(L+z),y=F,m=w.ab2xy(u,y,!0),R=w.dxyda_rough(u,y),b.angle===void 0&&r.extendFlat(b,e(w,M,g,m,w.dxydb_rough(u,y))),T(l,_,w,A,m,R,w.aaxis,M,g,b,"a-title"),u=L,y=.5*(F+N),m=w.ab2xy(u,y,!0),R=w.dxydb_rough(u,y),p.angle===void 0&&r.extendFlat(p,e(w,M,g,m,w.dxyda_rough(u,y))),T(l,_,w,A,m,R,w.baxis,M,g,p,"b-title")}var v=n.LINE_SPACING,c=(1-n.MID_SHIFT)/v+1;function T(l,_,w,A,M,g,b,p,u,y,m){var R=[];b.title.text&&R.push(b.title.text);var L=_.selectAll("text."+m).data(R),z=y.maxExtent;L.enter().append("text").classed(m,!0),L.each(function(){var F=e(w,p,u,M,g);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=y.angle+(y.flip<0?180:0),P=(O-F.angle+450)%360,U=P>90&&P<270,B=d.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*v*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(x.font,b.title.font)}),L.exit().remove()}}}),jG=He({"src/traces/carpet/cheater_basis.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(x,S,E){var e,t,r,o,a,n,i=[],s=d(x)?x.length:x,h=d(S)?S.length:S,f=d(x)?x:null,v=d(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),v&&(o=(v.length-1)/(v[v.length-1]-v[0])/(h-1));var c,T=1/0,l=-1/0;for(t=0;t<h;t++)for(i[t]=[],n=v?(v[t]-v[0])*o:t/(h-1),e=0;e<s;e++)a=f?(f[e]-f[0])*r:e/(s-1),c=a-n*E,T=Math.min(c,T),l=Math.max(c,l),i[t][e]=c;var _=1/(l-T),w=-T*_;for(t=0;t<h;t++)for(e=0;e<s;e++)i[t][e]=_*i[t][e]+w;return i}}}),qG=He({"src/traces/carpet/array_minmax.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(S){return x(S,0)};function x(S,E){if(!d(S)||E>=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o<r;o++){var a=S[o];if(d(a)){var n=x(a,E+1);n&&(e=Math.min(n[0],e),t=Math.max(n[1],t))}else e=Math.min(a,e),t=Math.max(a,t)}return[e,t]}}}),VG=He({"src/traces/carpet/calc_gridlines.js"(Z,V){"use strict";var d=Ho(),x=Qo().extendFlat;V.exports=function(E,e,t){var r,o,a,n,i,s,h,f,v,c,T,l,_,w,A=E["_"+e],M=E[e+"axis"],g=M._gridlines=[],b=M._minorgridlines=[],p=M._boundarylines=[],u=E["_"+t],y=E[t+"axis"];M.tickmode==="array"&&(M.tickvals=A.slice());var m=E._xctrl,R=E._yctrl,L=m[0].length,z=m.length,F=E._a.length,N=E._b.length;d.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var O=M.smoothing?3:1;function P(B){var X,$,le,ce,de,G,Y,ee,q,se,ae,j,Q=[],re=[],pe={};if(e==="b")for($=E.b2j(B),le=Math.floor(Math.max(0,Math.min(N-2,$))),ce=$-le,pe.length=N,pe.crossLength=F,pe.xy=function(we){return E.evalxy([],we,$)},pe.dxy=function(we,Se){return E.dxydi([],we,le,Se,ce)},X=0;X<F;X++)G=Math.min(F-2,X),Y=X-G,ee=E.evalxy([],X,$),y.smoothing&&X>0&&(q=E.dxydi([],X-1,le,0,ce),Q.push(de[0]+q[0]/3),re.push(de[1]+q[1]/3),se=E.dxydi([],X-1,le,1,ce),Q.push(ee[0]-se[0]/3),re.push(ee[1]-se[1]/3)),Q.push(ee[0]),re.push(ee[1]),de=ee;else for(X=E.a2i(B),G=Math.floor(Math.max(0,Math.min(F-2,X))),Y=X-G,pe.length=F,pe.crossLength=N,pe.xy=function(we){return E.evalxy([],X,we)},pe.dxy=function(we,Se){return E.dxydj([],G,we,Y,Se)},$=0;$<N;$++)le=Math.min(N-2,$),ce=$-le,ee=E.evalxy([],X,$),y.smoothing&&$>0&&(ae=E.dxydj([],G,$-1,Y,0),Q.push(de[0]+ae[0]/3),re.push(de[1]+ae[1]/3),j=E.dxydj([],G,$-1,Y,1),Q.push(ee[0]-j[0]/3),re.push(ee[1]-j[1]/3)),Q.push(ee[0]),re.push(ee[1]),de=ee;return pe.axisLetter=e,pe.axis=M,pe.crossAxis=y,pe.value=B,pe.constvar=t,pe.index=f,pe.x=Q,pe.y=re,pe.smoothing=y.smoothing,pe}function U(B){var X,$,le,ce,de,G=[],Y=[],ee={};if(ee.length=A.length,ee.crossLength=u.length,e==="b")for(le=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-le)),ee.xy=function(q){return E.evalxy([],q,B)},ee.dxy=function(q,se){return E.dxydi([],q,le,se,de)},X=0;X<L;X++)G[X]=m[B*O][X],Y[X]=R[B*O][X];else for($=Math.max(0,Math.min(F-2,B)),ce=Math.min(1,Math.max(0,B-$)),ee.xy=function(q){return E.evalxy([],B,q)},ee.dxy=function(q,se){return E.dxydj([],$,q,ce,se)},X=0;X<z;X++)G[X]=m[X][B*O],Y[X]=R[X][B*O];return ee.axisLetter=e,ee.axis=M,ee.crossAxis=y,ee.value=A[B],ee.constvar=t,ee.index=B,ee.x=G,ee.y=Y,ee.smoothing=y.smoothing,ee}if(M.tickmode==="array"){for(n=5e-15,i=[Math.floor((A.length-1-M.arraytick0)/M.arraydtick*(1+n)),Math.ceil(-M.arraytick0/M.arraydtick/(1+n))].sort(function(B,X){return B-X}),s=i[0]-1,h=i[1]+1,f=s;f<h;f++)o=M.arraytick0+M.arraydtick*f,!(o<0||o>A.length-1)&&g.push(x(U(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=s;f<h;f++)if(a=M.arraytick0+M.arraydtick*f,T=Math.min(a+M.arraydtick,A.length-1),!(a<0||a>A.length-1)&&!(T<0||T>A.length-1))for(l=A[a],_=A[T],r=0;r<M.minorgridcount;r++)w=T-a,!(w<=0)&&(c=l+(_-l)*(r+1)/(M.minorgridcount+1)*(M.arraydtick/w),!(c<A[0]||c>A[A.length-1])&&b.push(x(P(c),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&p.push(x(U(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&p.push(x(U(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+n)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+n))].sort(function(B,X){return B-X}),s=i[0],h=i[1],f=s;f<=h;f++)v=M.tick0+M.dtick*f,g.push(x(P(v),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=s-1;f<h+1;f++)for(v=M.tick0+M.dtick*f,r=0;r<M.minorgridcount;r++)c=v+M.dtick*(r+1)/(M.minorgridcount+1),!(c<A[0]||c>A[A.length-1])&&b.push(x(P(c),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&p.push(x(P(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&p.push(x(P(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),GG=He({"src/traces/carpet/calc_labels.js"(Z,V){"use strict";var d=Ho(),x=Qo().extendFlat;V.exports=function(E,e){var t,r,o,a,n,i=e._labels=[],s=e._gridlines;for(t=0;t<s.length;t++)n=s[t],["start","both"].indexOf(e.showticklabels)!==-1&&(r=d.tickText(e,n.value),x(r,{prefix:o,suffix:a,endAnchor:!0,xy:n.xy(0),dxy:n.dxy(0,0),axis:n.axis,length:n.crossAxis.length,font:n.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),i.push(r)),["end","both"].indexOf(e.showticklabels)!==-1&&(r=d.tickText(e,n.value),x(r,{endAnchor:!1,xy:n.xy(n.crossLength-1),dxy:n.dxy(n.crossLength-2,1),axis:n.axis,length:n.crossAxis.length,font:n.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),i.push(r))}}}),HG=He({"src/traces/carpet/calc_clippath.js"(Z,V){"use strict";V.exports=function(x,S,E,e){var t,r,o,a=[],n=!!E.smoothing,i=!!e.smoothing,s=x[0].length-1,h=x.length-1;for(t=0,r=[],o=[];t<=s;t++)r[t]=x[0][t],o[t]=S[0][t];for(a.push({x:r,y:o,bicubic:n}),t=0,r=[],o=[];t<=h;t++)r[t]=x[t][s],o[t]=S[t][s];for(a.push({x:r,y:o,bicubic:i}),t=s,r=[],o=[];t>=0;t--)r[s-t]=x[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:n}),t=h,r=[],o=[];t>=0;t--)r[h-t]=x[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:i}),a}}}),WG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E,e){var t,r,o,a=[],n=[],i=S[0].length,s=S.length;function h($,le){var ce=0,de,G=0;return $>0&&(de=S[le][$-1])!==void 0&&(G++,ce+=de),$<i-1&&(de=S[le][$+1])!==void 0&&(G++,ce+=de),le>0&&(de=S[le-1][$])!==void 0&&(G++,ce+=de),le<s-1&&(de=S[le+1][$])!==void 0&&(G++,ce+=de),ce/Math.max(1,G)}var f=0;for(t=0;t<i;t++)for(r=0;r<s;r++)S[r][t]===void 0&&(a.push(t),n.push(r),S[r][t]=h(t,r)),f=Math.max(f,Math.abs(S[r][t]));if(!a.length)return S;var v,c,T,l,_,w,A,M,g,b,p,u=1e-5,y=0,m=100,R=0,L=a.length;do{for(y=0,o=0;o<L;o++){t=a[o],r=n[o];var z=0,F=0,N,O,P,U,B,X;t===0?(B=Math.min(i-1,2),P=E[B],U=E[1],N=S[r][B],O=S[r][1],F+=O+(O-N)*(E[0]-U)/(U-P),z++):t===i-1&&(B=Math.max(0,i-3),P=E[B],U=E[i-2],N=S[r][B],O=S[r][i-2],F+=O+(O-N)*(E[i-1]-U)/(U-P),z++),(t===0||t===i-1)&&r>0&&r<s-1&&(v=e[r+1]-e[r],c=e[r]-e[r-1],F+=(c*S[r+1][t]+v*S[r-1][t])/(c+v),z++),r===0?(X=Math.min(s-1,2),P=e[X],U=e[1],N=S[X][t],O=S[1][t],F+=O+(O-N)*(e[0]-U)/(U-P),z++):r===s-1&&(X=Math.max(0,s-3),P=e[X],U=e[s-2],N=S[X][t],O=S[s-2][t],F+=O+(O-N)*(e[s-1]-U)/(U-P),z++),(r===0||r===s-1)&&t>0&&t<i-1&&(v=E[t+1]-E[t],c=E[t]-E[t-1],F+=(c*S[r][t+1]+v*S[r][t-1])/(c+v),z++),z?F/=z:(T=E[t+1]-E[t],l=E[t]-E[t-1],_=e[r+1]-e[r],w=e[r]-e[r-1],A=T*l*(T+l),M=_*w*(_+w),F=(A*(w*S[r+1][t]+_*S[r-1][t])+M*(l*S[r][t+1]+T*S[r][t-1]))/(M*(l+T)+A*(w+_))),g=F-S[r][t],b=g/f,y+=b*b,p=z?0:.85,S[r][t]+=g*(1+p)}y=Math.sqrt(y)}while(R++<m&&y>u);return d.log("Smoother converged to",y,"after",R,"iterations"),S}}}),XG=He({"src/traces/carpet/constants.js"(Z,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),ZG=He({"src/traces/carpet/catmull_rom.js"(Z,V){"use strict";var d=.5;V.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],n=e[1]-E[1],i=Math.pow(r*r+o*o,d/2),s=Math.pow(a*a+n*n,d/2),h=(s*s*r-i*i*a)*t,f=(s*s*o-i*i*n)*t,v=s*(i+s)*3,c=i*(i+s)*3;return[[E[0]+(v&&h/v),E[1]+(v&&f/v)],[E[0]-(c&&h/c),E[1]-(c&&f/c)]]}}}),YG=He({"src/traces/carpet/compute_control_points.js"(Z,V){"use strict";var d=ZG(),x=sa().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}V.exports=function(e,t,r,o,a,n){var i,s,h,f,v,c,T,l,_,w,A=r[0].length,M=r.length,g=a?3*A-2:A,b=n?3*M-2:M;for(e=x(e,b),t=x(t,b),h=0;h<b;h++)e[h]=x(e[h],g),t[h]=x(t[h],g);for(s=0,f=0;s<M;s++,f+=n?3:1)for(v=e[f],c=t[f],T=r[s],l=o[s],i=0,h=0;i<A;i++,h+=a?3:1)v[h]=T[i],c[h]=l[i];if(a)for(s=0,f=0;s<M;s++,f+=n?3:1){for(i=1,h=3;i<A-1;i++,h+=3)_=d([r[s][i-1],o[s][i-1]],[r[s][i],o[s][i]],[r[s][i+1],o[s][i+1]],a),e[f][h-1]=_[0][0],t[f][h-1]=_[0][1],e[f][h+1]=_[1][0],t[f][h+1]=_[1][1];w=S([e[f][0],t[f][0]],[e[f][2],t[f][2]],[e[f][3],t[f][3]]),e[f][1]=w[0],t[f][1]=w[1],w=S([e[f][g-1],t[f][g-1]],[e[f][g-3],t[f][g-3]],[e[f][g-4],t[f][g-4]]),e[f][g-2]=w[0],t[f][g-2]=w[1]}if(n)for(h=0;h<g;h++){for(f=3;f<b-3;f+=3)_=d([e[f-3][h],t[f-3][h]],[e[f][h],t[f][h]],[e[f+3][h],t[f+3][h]],n),e[f-1][h]=_[0][0],t[f-1][h]=_[0][1],e[f+1][h]=_[1][0],t[f+1][h]=_[1][1];w=S([e[0][h],t[0][h]],[e[2][h],t[2][h]],[e[3][h],t[3][h]]),e[1][h]=w[0],t[1][h]=w[1],w=S([e[b-1][h],t[b-1][h]],[e[b-3][h],t[b-3][h]],[e[b-4][h],t[b-4][h]]),e[b-2][h]=w[0],t[b-2][h]=w[1]}if(a&&n)for(f=1;f<b;f+=(f+1)%3===0?2:1){for(h=3;h<g-3;h+=3)_=d([e[f][h-3],t[f][h-3]],[e[f][h],t[f][h]],[e[f][h+3],t[f][h+3]],a),e[f][h-1]=.5*(e[f][h-1]+_[0][0]),t[f][h-1]=.5*(t[f][h-1]+_[0][1]),e[f][h+1]=.5*(e[f][h+1]+_[1][0]),t[f][h+1]=.5*(t[f][h+1]+_[1][1]);w=S([e[f][0],t[f][0]],[e[f][2],t[f][2]],[e[f][3],t[f][3]]),e[f][1]=.5*(e[f][1]+w[0]),t[f][1]=.5*(t[f][1]+w[1]),w=S([e[f][g-1],t[f][g-1]],[e[f][g-3],t[f][g-3]],[e[f][g-4],t[f][g-4]]),e[f][g-2]=.5*(e[f][g-2]+w[0]),t[f][g-2]=.5*(t[f][g-2]+w[1])}return[e,t]}}}),KG=He({"src/traces/carpet/create_spline_evaluator.js"(Z,V){"use strict";V.exports=function(d,x,S,E,e){var t=x-2,r=S-2;return E&&e?function(o,a,n){o||(o=[]);var i,s,h,f,v,c,T=Math.max(0,Math.min(Math.floor(a),t)),l=Math.max(0,Math.min(Math.floor(n),r)),_=Math.max(0,Math.min(1,a-T)),w=Math.max(0,Math.min(1,n-l));T*=3,l*=3;var A=_*_,M=A*_,g=1-_,b=g*g,p=b*g,u=w*w,y=u*w,m=1-w,R=m*m,L=R*m;for(c=0;c<d.length;c++)v=d[c],i=p*v[l][T]+3*(b*_*v[l][T+1]+g*A*v[l][T+2])+M*v[l][T+3],s=p*v[l+1][T]+3*(b*_*v[l+1][T+1]+g*A*v[l+1][T+2])+M*v[l+1][T+3],h=p*v[l+2][T]+3*(b*_*v[l+2][T+1]+g*A*v[l+2][T+2])+M*v[l+2][T+3],f=p*v[l+3][T]+3*(b*_*v[l+3][T+1]+g*A*v[l+3][T+2])+M*v[l+3][T+3],o[c]=L*i+3*(R*w*s+m*u*h)+y*f;return o}:E?function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),f=Math.max(0,Math.min(1,n-s)),v,c,T,l,_,w;i*=3;var A=h*h,M=A*h,g=1-h,b=g*g,p=b*g,u=1-f;for(_=0;_<d.length;_++)w=d[_],v=u*w[s][i]+f*w[s+1][i],c=u*w[s][i+1]+f*w[s+1][i+1],T=u*w[s][i+2]+f*w[s+1][i+1],l=u*w[s][i+3]+f*w[s+1][i+1],o[_]=p*v+3*(b*h*c+g*A*T)+M*l;return o}:e?function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),f=Math.max(0,Math.min(1,n-s)),v,c,T,l,_,w;s*=3;var A=f*f,M=A*f,g=1-f,b=g*g,p=b*g,u=1-h;for(_=0;_<d.length;_++)w=d[_],v=u*w[s][i]+h*w[s][i+1],c=u*w[s+1][i]+h*w[s+1][i+1],T=u*w[s+2][i]+h*w[s+2][i+1],l=u*w[s+3][i]+h*w[s+3][i+1],o[_]=p*v+3*(b*f*c+g*A*T)+M*l;return o}:function(o,a,n){o||(o=[]);var i=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(n),r)),h=Math.max(0,Math.min(1,a-i)),f=Math.max(0,Math.min(1,n-s)),v,c,T,l,_=1-f,w=1-h;for(T=0;T<d.length;T++)l=d[T],v=w*l[s][i]+h*l[s][i+1],c=w*l[s+1][i]+h*l[s+1][i+1],o[T]=_*v+f*c;return o}}}}),JG=He({"src/traces/carpet/create_i_derivative_evaluator.js"(Z,V){"use strict";V.exports=function(d,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,f;e*=3,t*=3;var v=r*r,c=1-r,T=c*c,l=c*r*2,_=-3*T,w=3*(T-l),A=3*(l-v),M=3*v,g=o*o,b=g*o,p=1-o,u=p*p,y=u*p;for(f=0;f<d.length;f++)h=d[f],a=_*h[t][e]+w*h[t][e+1]+A*h[t][e+2]+M*h[t][e+3],n=_*h[t+1][e]+w*h[t+1][e+1]+A*h[t+1][e+2]+M*h[t+1][e+3],i=_*h[t+2][e]+w*h[t+2][e+1]+A*h[t+2][e+2]+M*h[t+2][e+3],s=_*h[t+3][e]+w*h[t+3][e+1]+A*h[t+3][e+2]+M*h[t+3][e+3],E[f]=y*a+3*(u*o*n+p*g*i)+b*s;return E}:x?function(E,e,t,r,o){E||(E=[]);var a,n,i,s;e*=3;var h=r*r,f=1-r,v=f*f,c=f*r*2,T=-3*v,l=3*(v-c),_=3*(c-h),w=3*h,A=1-o;for(i=0;i<d.length;i++)s=d[i],a=T*s[t][e]+l*s[t][e+1]+_*s[t][e+2]+w*s[t][e+3],n=T*s[t+1][e]+l*s[t+1][e+1]+_*s[t+1][e+2]+w*s[t+1][e+3],E[i]=A*a+o*n;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,f;t*=3;var v=o*o,c=v*o,T=1-o,l=T*T,_=l*T;for(h=0;h<d.length;h++)f=d[h],a=f[t][e+1]-f[t][e],n=f[t+1][e+1]-f[t+1][e],i=f[t+2][e+1]-f[t+2][e],s=f[t+3][e+1]-f[t+3][e],E[h]=_*a+3*(l*o*n+T*v*i)+c*s;return E}:function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h=1-o;for(i=0;i<d.length;i++)s=d[i],a=s[t][e+1]-s[t][e],n=s[t+1][e+1]-s[t+1][e],E[i]=h*a+o*n;return E}}}}),$G=He({"src/traces/carpet/create_j_derivative_evaluator.js"(Z,V){"use strict";V.exports=function(d,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,f;e*=3,t*=3;var v=r*r,c=v*r,T=1-r,l=T*T,_=l*T,w=o*o,A=1-o,M=A*A,g=A*o*2,b=-3*M,p=3*(M-g),u=3*(g-w),y=3*w;for(f=0;f<d.length;f++)h=d[f],a=b*h[t][e]+p*h[t+1][e]+u*h[t+2][e]+y*h[t+3][e],n=b*h[t][e+1]+p*h[t+1][e+1]+u*h[t+2][e+1]+y*h[t+3][e+1],i=b*h[t][e+2]+p*h[t+1][e+2]+u*h[t+2][e+2]+y*h[t+3][e+2],s=b*h[t][e+3]+p*h[t+1][e+3]+u*h[t+2][e+3]+y*h[t+3][e+3],E[f]=_*a+3*(l*r*n+T*v*i)+c*s;return E}:x?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,f;e*=3;var v=o*o,c=v*o,T=1-o,l=T*T,_=l*T;for(h=0;h<d.length;h++)f=d[h],a=f[t+1][e]-f[t][e],n=f[t+1][e+1]-f[t][e+1],i=f[t+1][e+2]-f[t][e+2],s=f[t+1][e+3]-f[t][e+3],E[h]=_*a+3*(l*o*n+T*v*i)+c*s;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s;t*=3;var h=1-r,f=o*o,v=1-o,c=v*v,T=v*o*2,l=-3*c,_=3*(c-T),w=3*(T-f),A=3*f;for(i=0;i<d.length;i++)s=d[i],a=l*s[t][e]+_*s[t+1][e]+w*s[t+2][e]+A*s[t+3][e],n=l*s[t][e+1]+_*s[t+1][e+1]+w*s[t+2][e+1]+A*s[t+3][e+1],E[i]=h*a+r*n;return E}:function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h=1-r;for(i=0;i<d.length;i++)s=d[i],a=s[t+1][e]-s[t][e],n=s[t+1][e+1]-s[t][e+1],E[i]=h*a+r*n;return E}}}}),QG=He({"src/traces/carpet/set_convert.js"(Z,V){"use strict";var d=XG(),x=g2().findBin,S=YG(),E=KG(),e=JG(),t=$G();V.exports=function(o){var a=o._a,n=o._b,i=a.length,s=n.length,h=o.aaxis,f=o.baxis,v=a[0],c=a[i-1],T=n[0],l=n[s-1],_=a[a.length-1]-a[0],w=n[n.length-1]-n[0],A=_*d.RELATIVE_CULL_TOLERANCE,M=w*d.RELATIVE_CULL_TOLERANCE;v-=A,c+=A,T-=M,l+=M,o.isVisible=function(g,b){return g>v&&g<c&&b>T&&b<l},o.isOccluded=function(g,b){return g<v||g>c||b<T||b>l},o.setScale=function(){var g=o._x,b=o._y,p=S(o._xctrl,o._yctrl,g,b,h.smoothing,f.smoothing);o._xctrl=p[0],o._yctrl=p[1],o.evalxy=E([o._xctrl,o._yctrl],i,s,h.smoothing,f.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,f.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,f.smoothing)},o.i2a=function(g){var b=Math.max(0,Math.floor(g[0]),i-2),p=g[0]-b;return(1-p)*a[b]+p*a[b+1]},o.j2b=function(g){var b=Math.max(0,Math.floor(g[1]),i-2),p=g[1]-b;return(1-p)*n[b]+p*n[b+1]},o.ij2ab=function(g){return[o.i2a(g[0]),o.j2b(g[1])]},o.a2i=function(g){var b=Math.max(0,Math.min(x(g,a),i-2)),p=a[b],u=a[b+1];return Math.max(0,Math.min(i-1,b+(g-p)/(u-p)))},o.b2j=function(g){var b=Math.max(0,Math.min(x(g,n),s-2)),p=n[b],u=n[b+1];return Math.max(0,Math.min(s-1,b+(g-p)/(u-p)))},o.ab2ij=function(g){return[o.a2i(g[0]),o.b2j(g[1])]},o.i2c=function(g,b){return o.evalxy([],g,b)},o.ab2xy=function(g,b,p){if(!p&&(g<a[0]||g>a[i-1]|b<n[0]||b>n[s-1]))return[!1,!1];var u=o.a2i(g),y=o.b2j(b),m=o.evalxy([],u,y);if(p){var R=0,L=0,z=[],F,N,O,P;g<a[0]?(F=0,N=0,R=(g-a[0])/(a[1]-a[0])):g>a[i-1]?(F=i-2,N=1,R=(g-a[i-1])/(a[i-1]-a[i-2])):(F=Math.max(0,Math.min(i-2,Math.floor(u))),N=u-F),b<n[0]?(O=0,P=0,L=(b-n[0])/(n[1]-n[0])):b>n[s-1]?(O=s-2,P=1,L=(b-n[s-1])/(n[s-1]-n[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(y))),P=y-O),R&&(o.dxydi(z,F,O,N,P),m[0]+=z[0]*R,m[1]+=z[1]*R),L&&(o.dxydj(z,F,O,N,P),m[0]+=z[0]*L,m[1]+=z[1]*L)}return m},o.c2p=function(g,b,p){return[b.c2p(g[0]),p.c2p(g[1])]},o.p2x=function(g,b,p){return[b.p2c(g[0]),p.p2c(g[1])]},o.dadi=function(g){var b=Math.max(0,Math.min(a.length-2,g));return a[b+1]-a[b]},o.dbdj=function(g){var b=Math.max(0,Math.min(n.length-2,g));return n[b+1]-n[b]},o.dxyda=function(g,b,p,u){var y=o.dxydi(null,g,b,p,u),m=o.dadi(g,p);return[y[0]/m,y[1]/m]},o.dxydb=function(g,b,p,u){var y=o.dxydj(null,g,b,p,u),m=o.dbdj(b,u);return[y[0]/m,y[1]/m]},o.dxyda_rough=function(g,b,p){var u=_*(p||.1),y=o.ab2xy(g+u,b,!0),m=o.ab2xy(g-u,b,!0);return[(y[0]-m[0])*.5/u,(y[1]-m[1])*.5/u]},o.dxydb_rough=function(g,b,p){var u=w*(p||.1),y=o.ab2xy(g,b+u,!0),m=o.ab2xy(g,b-u,!0);return[(y[0]-m[0])*.5/u,(y[1]-m[1])*.5/u]},o.dpdx=function(g){return g._m},o.dpdy=function(g){return g._m}}}}),eH=He({"src/traces/carpet/calc.js"(Z,V){"use strict";var d=Ho(),x=sa().isArray1D,S=jG(),E=qG(),e=VG(),t=GG(),r=HG(),o=Y2(),a=WG(),n=Z2(),i=QG();V.exports=function(h,f){var v=d.getFromId(h,f.xaxis),c=d.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,_=f.x,w=f.y,A=[];_&&x(_)&&A.push("x"),w&&x(w)&&A.push("y"),A.length&&n(f,T,l,"a","b",A);var M=f._a=f._a||f.a,g=f._b=f._b||f.b;_=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var p=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?g.length:g;_=S(p,u,f.cheaterslope)}f._x=_=o(_),f._y=w=o(w),a(_,M,g),a(w,M,g),i(f),f.setScale();var y=E(_),m=E(w),R=.5*(y[1]-y[0]),L=.5*(y[1]+y[0]),z=.5*(m[1]-m[0]),F=.5*(m[1]+m[0]),N=1.3;return y=[L-R*N,L+R*N],m=[F-z*N,F+z*N],f._extremes[v._id]=d.findExtremes(v,y,{padded:!0}),f._extremes[c._id]=d.findExtremes(c,m,{padded:!0}),e(f,"a","b"),e(f,"b","a"),t(f,T),t(f,l),b.clipsegments=r(f._xctrl,f._yctrl,T,l),b.x=_,b.y=w,b.a=M,b.b=g,[b]}}}),tH=He({"src/traces/carpet/index.js"(Z,V){"use strict";V.exports={attributes:PT(),supplyDefaults:BG(),plot:UG(),calc:eH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),rH=He({"lib/carpet.js"(Z,V){"use strict";V.exports=tH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,V){"use strict";var d=$d(),x=af(),S=ru(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=ku(),o=Qo().extendFlat,a=x.marker,n=x.line,i=a.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},x.mode,{dflt:"markers"}),text:o({},x.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:o({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:o({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:d(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:i.width,dash:i.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:x.zorder}}}),aH=He({"src/traces/scattercarpet/defaults.js"(Z,V){"use strict";var d=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();V.exports=function(i,s,h,f){function v(M,g){return d.coerce(i,s,a,M,g)}v("carpet"),s.xaxis="x",s.yaxis="y";var c=v("a"),T=v("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext");var _=l<x.PTS_LINESONLY?"lines+markers":"lines";v("mode",_),S.hasMarkers(s)&&E(i,s,h,f,v,{gradient:!0}),S.hasLines(s)&&(e(i,s,h,f,v,{backoff:!0}),t(i,s,v),v("connectgaps")),S.hasText(s)&&r(i,s,f,v);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(v("marker.maxdisplayed"),w.push("points")),v("fill"),s.fill!=="none"&&(o(i,s,h,v),S.hasLines(s)||t(i,s,v)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=v("hoveron",w.join("+")||"points");A!=="fills"&&(v("hovertemplate"),v("hovertemplatefallback")),v("zorder"),d.coerceSelectionMarkerOpacity(s,v)}}}),iH=He({"src/traces/scattercarpet/format_labels.js"(Z,V){"use strict";V.exports=function(x,S){var E={},e=S._carpet,t=e.ab2ij([x.a,x.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),n=t[1]-a,i=e.evalxy([],r,a,o,n);return E.yLabel=i[1].toFixed(3),E}}}),IT=He({"src/traces/carpet/lookup_carpetid.js"(Z,V){"use strict";V.exports=function(d,x){for(var S=d._fullData.length,E,e=0;e<S;e++){var t=d._fullData[e];if(t.index!==x.index&&t.type==="carpet"&&(E||(E=t),t.carpet===x.carpet))return t}return E}}}),nH=He({"src/traces/scattercarpet/calc.js"(Z,V){"use strict";var d=as(),x=Fd(),S=Av(),E=Od(),e=Bd().calcMarkerSize,t=IT();V.exports=function(o,a){var n=a._carpetTrace=t(o,a);if(!(!n||!n.visible||n.visible==="legendonly")){var i;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var s=a._length,h=new Array(s),f,v,c=!1;for(i=0;i<s;i++)if(f=a.a[i],v=a.b[i],d(f)&&d(v)){var T=n.ab2xy(+f,+v,!0),l=n.isVisible(+f,+v);l||(c=!0),h[i]={x:T[0],y:T[1],a:f,b:v,vis:l}}else h[i]={x:!1,y:!1};return a._needsCull=c,h[0].carpet=n,h[0].trace=a,e(a,s),x(o,a),S(h,a),E(h,a),h}}}}),oH=He({"src/traces/scattercarpet/plot.js"(Z,V){"use strict";var d=s1(),x=Ho(),S=es();V.exports=function(e,t,r,o){var a,n,i,s=r[0][0].carpet,h=x.getFromId(e,s.xaxis||"x"),f=x.getFromId(e,s.yaxis||"y"),v={xaxis:h,yaxis:f,plot:t.plot};for(a=0;a<r.length;a++)n=r[a][0].trace,n._xA=h,n._yA=f;for(d(e,v,r,o),a=0;a<r.length;a++)n=r[a][0].trace,i=o.selectAll("g.trace"+n.uid+" .js-line"),S.setClipUrl(i,r[a][0].carpet._clipPathId,e)}}}),sH=He({"src/traces/scattercarpet/hover.js"(Z,V){"use strict";var d=u1(),x=sa().fillText;V.exports=function(E,e,t,r){var o=d(E,e,t,r);if(!o||o[0].index===!1)return;var a=o[0];if(a.index===void 0){var n=1-a.y0/E.ya._length,i=E.xa._length,s=i*n/2,h=i-s;return a.x0=Math.max(Math.min(a.x0,h),s),a.x1=Math.max(Math.min(a.x1,h),s),o}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var v=a.trace,c=v._carpet,T=v._module.formatLabels(f,v);a.yLabel=T.yLabel,delete a.text;var l=[];function _(M,g){var b;M.labelprefix&&M.labelprefix.length>0?b=M.labelprefix.replace(/ = $/,""):b=M._hovertitle,l.push(b+": "+g.toFixed(3)+M.labelsuffix)}if(!v.hovertemplate){var w=f.hi||v.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&_(c.aaxis,f.a),A.indexOf("b")!==-1&&_(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&x(f,v,l),a.extraText=l.join("<br>")}return o}}}),lH=He({"src/traces/scattercarpet/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){var r=e[t];return x.a=r.a,x.b=r.b,x.y=r.y,x}}}),uH=He({"src/traces/scattercarpet/index.js"(Z,V){"use strict";V.exports={attributes:K6(),supplyDefaults:aH(),colorbar:pp(),formatLabels:iH(),calc:nH(),plot:oH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:sH(),selectPoints:c1(),eventData:lH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),cH=He({"lib/scattercarpet.js"(Z,V){"use strict";V.exports=uH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,V){"use strict";var d=p1(),x=V_(),S=ku(),E=Qo().extendFlat,e=x.contours;V.exports=E({carpet:{valType:"string",editType:"calc"},z:d.z,a:d.x,a0:d.x0,da:d.dx,b:d.y,b0:d.y0,db:d.dy,text:d.text,hovertext:d.hovertext,transpose:d.transpose,atype:d.xtype,btype:d.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,V){"use strict";var d=sa(),x=X2(),S=J6(),E=TS(),e=s3(),t=l3();V.exports=function(o,a,n,i){function s(c,T){return d.coerce(o,a,S,c,T)}function h(c){return d.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=x(o,a,s,i,"a","b");if(!f){a.visible=!1;return}s("text");var v=s("contours.type")==="constraint";v?E(o,a,s,i,n,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,i,{hasHover:!1}))}else a._defaultColor=n,a._length=null;s("zorder")}}}),fH=He({"src/traces/contourcarpet/calc.js"(Z,V){"use strict";var d=Tp(),x=sa(),S=Z2(),E=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),n=dS();V.exports=function(h,f){var v=f._carpetTrace=a(h,f);if(!(!v||!v.visible||v.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[v.index],T=h.data[f.index];T.a||(T.a=c.a),T.b||(T.b=c.b),o(T,f,f._defaultColor,h._fullLayout)}var l=i(h,f);return n(f,f._z),l}};function i(s,h){var f=h._carpetTrace,v=f.aaxis,c=f.baxis,T,l,_,w,A,M,g;v._minDtick=0,c._minDtick=0,x.isArray1D(h.z)&&S(h,v,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?v.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,_=h.da||1,A=h.b0||0,M=h.db||1,g=h._z=E(h._z||h.z,h.transpose),h._emptypoints=t(g),e(g,h._emptypoints);var b=x.maxRowLength(g),p=h.xtype==="scaled"?"":T,u=r(h,p,l,_,b,v),y=h.ytype==="scaled"?"":w,m=r(h,y,A,M,g.length,c),R={a:u,b:m,z:g};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&d(s,h,{vals:g,containerStr:"",cLetter:"z"}),[R]}}}),hH=He({"src/traces/carpet/axis_aligned_line.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(x,S,E,e){var t,r,o,a,n,i,s,h,f,v,c,T,l,_=d(E)?"a":"b",w=_==="a"?x.aaxis:x.baxis,A=w.smoothing,M=_==="a"?x.a2i:x.b2j,g=_==="a"?E:e,b=_==="a"?e:E,p=_==="a"?S.a.length:S.b.length,u=_==="a"?S.b.length:S.a.length,y=Math.floor(_==="a"?x.b2j(b):x.a2i(b)),m=_==="a"?function(le){return x.evalxy([],le,y)}:function(le){return x.evalxy([],y,le)};A&&(o=Math.max(0,Math.min(u-2,y)),a=y-o,r=_==="a"?function(le,ce){return x.dxydi([],le,o,ce,a)}:function(le,ce){return x.dxydj([],o,le,a,ce)});var R=M(g[0]),L=M(g[1]),z=R<L?1:-1,F=(L-R)*1e-8,N=z>0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,P=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(R+F),X=O(L-F);s=m(R);var $=[[s]];for(t=B;t*z<X*z;t+=z)n=[],c=U(R,t),T=P(L,t+z),l=T-c,i=Math.max(0,Math.min(p-2,Math.floor(.5*(c+T)))),h=m(T),A&&(f=r(i,c-i),v=r(i,T-i),n.push([s[0]+f[0]/3*l,s[1]+f[1]/3*l]),n.push([h[0]-v[0]/3*l,h[1]-v[1]/3*l])),n.push(h),$.push(n),s=h;return $}}}),pH=He({"src/traces/contourcarpet/plot.js"(Z,V){"use strict";var d=Wn(),x=Z6(),S=Y6(),E=es(),e=sa(),t=mS(),r=gS(),o=u3(),a=H_(),n=_S(),i=yS(),s=xS(),h=IT(),f=hH();V.exports=function(p,u,y,m){var R=u.xaxis,L=u.yaxis;e.makeTraceGroups(m,y,"contour").each(function(z){var F=d.select(this),N=z[0],O=N.trace,P=O._carpetTrace=h(p,O),U=p.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var B=N.a,X=N.b,$=O.contours,le=i($,u,N),ce=$.type==="constraint",de=$._operation,G=ce?de==="="?"lines":"fill":$.coloring;function Y(Ie){var Re=P.ab2xy(Ie[0],Ie[1],!0);return[R.c2p(Re[0]),L.c2p(Re[1])]}var ee=[[B[0],X[X.length-1]],[B[B.length-1],X[X.length-1]],[B[B.length-1],X[0]],[B[0],X[0]]];t(le);var q=(B[B.length-1]-B[0])*1e-8,se=(X[X.length-1]-X[0])*1e-8;r(le,q,se);var ae=le;$.type==="constraint"&&(ae=n(le,de)),v(le,Y);var j,Q,re,pe,we=[];for(pe=U.clipsegments.length-1;pe>=0;pe--)j=U.clipsegments[pe],Q=x([],j.x,R.c2p),re=x([],j.y,L.c2p),Q.reverse(),re.reverse(),we.push(S(Q,re,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,R,L,ce,G),M(O,F,R,L,ae,ee,Y,P,U,G,Se),c(F,le,p,N,$,u,P),E.setClipUrl(F,P._clipPathId,p)})};function v(b,p){var u,y,m,R,L,z,F,N,O;for(u=0;u<b.length;u++){for(R=b[u],L=R.pedgepaths=[],z=R.ppaths=[],y=0;y<R.edgepaths.length;y++){for(O=R.edgepaths[y],F=[],m=0;m<O.length;m++)F[m]=p(O[m]);L.push(F)}for(y=0;y<R.paths.length;y++){for(O=R.paths[y],N=[],m=0;m<O.length;m++)N[m]=p(O[m]);z.push(N)}}}function c(b,p,u,y,m,R,L){var z=u._context.staticPlot,F=e.ensureSingle(b,"g","contourlines"),N=m.showlines!==!1,O=m.showlabels,P=N&&O,U=o.createLines(F,N||O,p,z),B=o.createLineClip(F,P,u,y.trace.uid),X=b.selectAll("g.contourlabels").data(O?[0]:[]);if(X.exit().remove(),X.enter().append("g").classed("contourlabels",!0),O){var $=R.xaxis,le=R.yaxis,ce=$._length,de=le._length,G=[[[0,0],[ce,0],[ce,de],[0,de]]],Y=[];e.clearLocationCache();var ee=o.labelFormatter(u,y),q=E.tester.append("text").attr("data-notex",1).call(E.font,m.labelfont),se={left:0,right:ce,center:ce/2,top:0,bottom:de,middle:de/2},ae=Math.sqrt(ce*ce+de*de),j=a.LABELDISTANCE*ae/Math.max(1,p.length/a.LABELINCREASE);U.each(function(Q){var re=o.calcTextOpts(Q.level,ee,q,u);d.select(this).selectAll("path").each(function(pe){var we=this,Se=e.getVisibleSegment(we,se,re.height/2);if(Se&&(T(we,pe,Q,Se,L,re.height),!(Se.len<(re.width+re.height)*a.LABELMIN)))for(var Ie=Math.min(Math.ceil(Se.len/j),a.LABELMAX),Re=0;Re<Ie;Re++){var We=o.findBestTextLocation(we,Se,re,Y,se);if(!We)break;o.addLabelData(We,re,Y,G)}})}),q.remove(),o.drawLabels(X,Y,u,B,P?G:null)}O&&!N&&U.remove()}function T(b,p,u,y,m,R){for(var L,z=0;z<u.pedgepaths.length;z++)p===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=m.a[0],N=m.a[m.a.length-1],O=m.b[0],P=m.b[m.b.length-1];function U(ce,de){var G=0,Y,ee=.1;return(Math.abs(ce[0]-F)<ee||Math.abs(ce[0]-N)<ee)&&(Y=_(m.dxydb_rough(ce[0],ce[1],ee)),G=Math.max(G,R*w(de,Y)/2)),(Math.abs(ce[1]-O)<ee||Math.abs(ce[1]-P)<ee)&&(Y=_(m.dxyda_rough(ce[0],ce[1],ee)),G=Math.max(G,R*w(de,Y)/2)),G}var B=l(b,0,1),X=l(b,y.total,y.total-1),$=U(L[0],B),le=y.total-U(L[L.length-1],X);y.min<$&&(y.min=$),y.max>le&&(y.max=le),y.len=y.max-y.min}function l(b,p,u){var y=b.getPointAtLength(p),m=b.getPointAtLength(u),R=m.x-y.x,L=m.y-y.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function _(b){var p=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/p,b[1]/p]}function w(b,p){var u=Math.abs(b[0]*p[0]+b[1]*p[1]),y=Math.sqrt(1-u*u);return y/u}function A(b,p,u,y,m,R){var L,z,F,N,O=e.ensureSingle(b,"g","contourbg"),P=O.selectAll("path").data(R==="fill"&&!m?[0]:[]);P.enter().append("path"),P.exit().remove();var U=[];for(N=0;N<p.length;N++)L=p[N],z=x([],L.x,u.c2p),F=x([],L.y,y.c2p),U.push(S(z,F,L.bicubic));P.attr("d","M"+U.join("L")+"Z").style("stroke","none")}function M(b,p,u,y,m,R,L,z,F,N,O){var P=N==="fill";P&&s(m,b.contours);var U=e.ensureSingle(p,"g","contourfill"),B=U.selectAll("path").data(P?m:[]);B.enter().append("path"),B.exit().remove(),B.each(function(X){var $=(X.prefixBoundary?O:"")+g(b,X,R,L,z,F,u,y);$?d.select(this).attr("d",$).style("stroke","none"):d.select(this).remove()})}function g(b,p,u,y,m,R,L,z){var F,N="",O=p.edgepaths.map(function(re,pe){return pe}),P=!0,U,B,X,$,le,ce,de=Math.abs(u[0][0]-u[2][0])*1e-4,G=Math.abs(u[0][1]-u[2][1])*1e-4;function Y(re){return Math.abs(re[1]-u[0][1])<G}function ee(re){return Math.abs(re[1]-u[2][1])<G}function q(re){return Math.abs(re[0]-u[0][0])<de}function se(re){return Math.abs(re[0]-u[2][0])<de}function ae(re,pe){var we,Se,Ie,Re,We="";for(Y(re)&&!se(re)||ee(re)&&!q(re)?(Re=m.aaxis,Ie=f(m,R,[re[0],pe[0]],.5*(re[1]+pe[1]))):(Re=m.baxis,Ie=f(m,R,.5*(re[0]+pe[0]),[re[1],pe[1]])),we=1;we<Ie.length;we++)for(We+=Re.smoothing?"C":"L",Se=0;Se<Ie[we].length;Se++){var at=Ie[we][Se];We+=[L.c2p(at[0]),z.c2p(at[1])]+" "}return We}for(F=0,U=null;O.length;){var j=p.edgepaths[F][0];for(U&&(N+=ae(U,j)),ce=E.smoothopen(p.edgepaths[F].map(y),p.smoothing),N+=P?ce:ce.replace(/^M/,"L"),O.splice(O.indexOf(F),1),U=p.edgepaths[F][p.edgepaths[F].length-1],$=-1,X=0;X<4;X++){if(!U){e.log("Missing end?",F,p);break}for(Y(U)&&!se(U)?B=u[1]:q(U)?B=u[0]:ee(U)?B=u[3]:se(U)&&(B=u[2]),le=0;le<p.edgepaths.length;le++){var Q=p.edgepaths[le][0];Math.abs(U[0]-B[0])<de?Math.abs(U[0]-Q[0])<de&&(Q[1]-U[1])*(B[1]-Q[1])>=0&&(B=Q,$=le):Math.abs(U[1]-B[1])<G?Math.abs(U[1]-Q[1])<G&&(Q[0]-U[0])*(B[0]-Q[0])>=0&&(B=Q,$=le):e.log("endpt to newendpt is not vert. or horz.",U,B,Q)}if($>=0)break;N+=ae(U,B),U=B}if($===p.edgepaths.length){e.log("unclosed perimeter path");break}F=$,P=O.indexOf(F)===-1,P&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;F<p.paths.length;F++)N+=E.smoothclosed(p.paths[F].map(y),p.smoothing);return N}}}),dH=He({"src/traces/contourcarpet/index.js"(Z,V){"use strict";V.exports={attributes:J6(),supplyDefaults:$6(),colorbar:f3(),calc:fH(),plot:pH(),style:c3(),moduleType:"trace",name:"contourcarpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),vH=He({"lib/contourcarpet.js"(Z,V){"use strict";V.exports=dH()}}),RT=He({"src/traces/ohlc/attributes.js"(Z,V){"use strict";var d=sa().extendFlat,x=af(),S=tf().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=Gh().dash,r=Ky(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i=x.line;function s(h){return{line:{color:d({},i.color,{dflt:h}),width:i.width,dash:t,editType:"style"},editType:"style"}}V.exports={xperiod:x.xperiod,xperiod0:x.xperiod0,xperiodalignment:x.xperiodalignment,xhoverformat:S("x"),yhoverformat:S("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:d({},i.width,{}),dash:d({},t,{}),editType:"style"},increasing:s(a),decreasing:s(n),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({},{keys:["open","high","low","close"]}),hovertemplatefallback:e(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:d({},r.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:x.zorder}}}),Q6=He({"src/traces/ohlc/ohlc_defaults.js"(Z,V){"use strict";var d=lo(),x=sa();V.exports=function(E,e,t,r){var o=t("x"),a=t("open"),n=t("high"),i=t("low"),s=t("close");t("hoverlabel.split");var h=d.getComponentMethod("calendars","handleTraceDefaults");if(h(E,e,["x"],r),!!(a&&n&&i&&s)){var f=Math.min(a.length,n.length,i.length,s.length);return o&&(f=Math.min(f,x.minRowLength(o))),e._length=f,f}}}}),mH=He({"src/traces/ohlc/defaults.js"(Z,V){"use strict";var d=sa(),x=Q6(),S=Qd(),E=RT();V.exports=function(r,o,a,n){function i(h,f){return d.coerce(r,o,E,h,f)}var s=x(r,o,i,n);if(!s){o.visible=!1;return}S(r,o,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),e(r,o,i,"increasing"),e(r,o,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),n._requestRangeslider[o.xaxis]=!0,i("zorder")};function e(t,r,o,a){o(a+".line.color"),o(a+".line.width",r.line.width),o(a+".line.dash",r.line.dash)}}}),ek=He({"src/traces/ohlc/calc.js"(Z,V){"use strict";var d=sa(),x=d._,S=Ho(),E=tv(),e=Ws().BADNUM;function t(n,i){var s=S.getFromId(n,i.xaxis),h=S.getFromId(n,i.yaxis),f=a(n,s,i),v=i._minDiff;i._minDiff=null;var c=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var l=o(n,i,c,T,h,r);return i._extremes[s._id]=S.findExtremes(s,T,{vpad:v/2}),l.length?(d.extendFlat(l[0].t,{wHover:v/2,tickLen:f}),l):[{t:{empty:!0}}]}function r(n,i,s,h){return{o:n,h:i,l:s,c:h}}function o(n,i,s,h,f,v){for(var c=f.makeCalcdata(i,"open"),T=f.makeCalcdata(i,"high"),l=f.makeCalcdata(i,"low"),_=f.makeCalcdata(i,"close"),w=d.isArrayOrTypedArray(i.text),A=d.isArrayOrTypedArray(i.hovertext),M=!0,g=null,b=!!i.xperiodalignment,p=[],u=0;u<h.length;u++){var y=h[u],m=c[u],R=T[u],L=l[u],z=_[u];if(y!==e&&m!==e&&R!==e&&L!==e&&z!==e){z===m?g!==null&&z!==g&&(M=z>g):M=z>m,g=z;var F=v(m,R,L,z);F.pos=y,F.yc=(m+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],b&&(F.orig_p=s[u]),w&&(F.tx=i.text[u]),A&&(F.htx=i.hovertext[u]),p.push(F)}else p.push({pos:y,empty:!0})}return i._extremes[f._id]=S.findExtremes(f,d.concat(l,T),{padded:!0}),p.length&&(p[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),p}function a(n,i,s){var h=s._minDiff;if(!h){var f=n._fullData,v=[];h=1/0;var c;for(c=0;c<f.length;c++){var T=f[c];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===i._id){v.push(T);var l=i.makeCalcdata(T,"x");T._origX=l;var _=E(s,i,"x",l).vals;T._xcalc=_;var w=d.distinctVals(_).minDiff;w&&isFinite(w)&&(h=Math.min(h,w))}}for(h===1/0&&(h=1),c=0;c<v.length;c++)v[c]._minDiff=h}return h*s.tickwidth}V.exports={calc:t,calcCommon:o}}}),gH=He({"src/traces/ohlc/plot.js"(Z,V){"use strict";var d=Wn(),x=sa();V.exports=function(E,e,t,r){var o=e.yaxis,a=e.xaxis,n=!!a.rangebreaks;x.makeTraceGroups(r,t,"trace ohlc").each(function(i){var s=d.select(this),h=i[0],f=h.t,v=h.trace;if(v.visible!==!0||f.empty){s.remove();return}var c=f.tickLen,T=s.selectAll("path").data(x.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(l){if(l.empty)return"M0,0Z";var _=a.c2p(l.pos-c,!0),w=a.c2p(l.pos+c,!0),A=n?(_+w)/2:a.c2p(l.pos,!0),M=o.c2p(l.o,!0),g=o.c2p(l.h,!0),b=o.c2p(l.l,!0),p=o.c2p(l.c,!0);return"M"+_+","+M+"H"+A+"M"+A+","+g+"V"+b+"M"+w+","+p+"H"+A})})}}}),yH=He({"src/traces/ohlc/style.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Jn();V.exports=function(e,t,r){var o=r||d.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",function(a){return a[0].trace.opacity}),o.each(function(a){var n=a[0].trace;d.select(this).selectAll("path").each(function(i){if(!i.empty){var s=n[i.dir].line;d.select(this).style("fill","none").call(S.stroke,s.color).call(x.dashLine,s.dash,s.width).style("opacity",n.selectedpoints&&!i.selected?.3:1)}})})}}}),tk=He({"src/traces/ohlc/hover.js"(Z,V){"use strict";var d=Ho(),x=sa(),S=rf(),E=Jn(),e=sa().fillText,t=d1(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,h,f,v){var c=s.cd,T=c[0].trace;return T.hoverlabel.split?n(s,h,f,v):i(s,h,f,v)}function a(s,h,f,v){var c=s.cd,T=s.xa,l=c[0].trace,_=c[0].t,w=l.type,A=w==="ohlc"?"l":"min",M=w==="ohlc"?"h":"max",g,b,p=_.bPos||0,u=function(X){return X.pos+p-h},y=_.bdPos||_.tickLen,m=_.wHover,R=Math.min(1,y/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));g=s.maxHoverDistance-R,b=s.maxSpikeDistance-R;function L(X){var $=u(X);return S.inbox($-m,$+m,g)}function z(X){var $=X[A],le=X[M];return $===le||S.inbox($-f,le-f,g)}function F(X){return(L(X)+z(X))/2}var N=S.getDistanceFunction(v,L,z,F);if(S.getClosest(c,N,s),s.index===!1)return null;var O=c[s.index];if(O.empty)return null;var P=O.dir,U=l[P],B=U.line.color;return E.opacity(B)&&U.line.width?s.color=B:s.color=U.fillcolor,s.x0=T.c2p(O.pos+p-y,!0),s.x1=T.c2p(O.pos+p+y,!0),s.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,s.spikeDistance=F(O)*b/g,s.xSpike=T.c2p(O.pos,!0),s}function n(s,h,f,v){var c=s.cd,T=s.ya,l=c[0].trace,_=c[0].t,w=[],A=a(s,h,f,v);if(!A)return[];var M=c[A.index],g=M.hi||l.hoverinfo||"";if(g==="none"||g==="skip")return[];for(var b=["high","open","close","low"],p={},u=0;u<b.length;u++){var y=b[u],m=l[y][A.index],R=T.c2p(m,!0),L;m in p?(L=p[m],L.yLabel+="<br>"+_.labels[y]+d.hoverLabelText(T,m,l.yhoverformat)):(L=x.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=m,L.yLabel=_.labels[y]+d.hoverLabelText(T,m,l.yhoverformat),L.name="",w.push(L),p[m]=L)}return w}function i(s,h,f,v){var c=s.cd,T=s.ya,l=c[0].trace,_=c[0].t,w=a(s,h,f,v);if(!w)return[];var A=w.index,M=c[A],g=w.index=M.i,b=M.dir;function p(F){return _.labels[F]+d.hoverLabelText(T,l[F][g],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",y=u.split("+"),m=u==="all",R=m||y.indexOf("y")!==-1,L=m||y.indexOf("text")!==-1,z=R?[p("open"),p("high"),p("low"),p("close")+" "+r[b]]:[];return L&&e(M,l,z),w.extraText=z.join("<br>"),w.y0=w.y1=T.c2p(M.yc,!0),[w]}V.exports={hoverPoints:o,hoverSplit:n,hoverOnPoints:i}}}),rk=He({"src/traces/ohlc/select.js"(Z,V){"use strict";V.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;o<E.length;o++)E[o].selected=0;else for(o=0;o<E.length;o++){var n=E[o];S.contains([e.c2p(n.pos+a),t.c2p(n.yc)],null,n.i,x)?(r.push({pointNumber:n.i,x:e.c2d(n.pos),y:t.c2d(n.yc)}),n.selected=1):n.selected=0}return r}}}),_H=He({"src/traces/ohlc/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"ohlc",basePlotModule:Kf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:RT(),supplyDefaults:mH(),calc:ek().calc,plot:gH(),style:yH(),hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),xH=He({"lib/ohlc.js"(Z,V){"use strict";V.exports=_H()}}),ak=He({"src/traces/candlestick/attributes.js"(Z,V){"use strict";var d=sa().extendFlat,x=tf().axisHoverFormat,S=RT(),E=N_();function e(t){return{line:{color:d({},E.line.color,{dflt:t}),width:E.line.width,editType:"style"},fillcolor:E.fillcolor,editType:"style"}}V.exports={xperiod:S.xperiod,xperiod0:S.xperiod0,xperiodalignment:S.xperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),x:S.x,open:S.open,high:S.high,low:S.low,close:S.close,line:{width:d({},E.line.width,{}),editType:"style"},increasing:e(S.increasing.line.color.dflt),decreasing:e(S.decreasing.line.color.dflt),text:S.text,hovertext:S.hovertext,hovertemplate:S.hovertemplate,hovertemplatefallback:S.hovertemplatefallback,whiskerwidth:d({},E.whiskerwidth,{dflt:0}),hoverlabel:S.hoverlabel,zorder:E.zorder}}}),bH=He({"src/traces/candlestick/defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=Q6(),E=Qd(),e=ak();V.exports=function(o,a,n,i){function s(f,v){return d.coerce(o,a,e,f,v)}var h=S(o,a,s,i);if(!h){a.visible=!1;return}E(o,a,i,s,{x:!0}),s("xhoverformat"),s("yhoverformat"),s("line.width"),t(o,a,s,"increasing"),t(o,a,s,"decreasing"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("whiskerwidth"),i._requestRangeslider[a.xaxis]=!0,s("zorder")};function t(r,o,a,n){var i=a(n+".line.color");a(n+".line.width",o.line.width),a(n+".fillcolor",x.addOpacity(i,.5))}}}),wH=He({"src/traces/candlestick/calc.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=tv(),E=ek().calcCommon;V.exports=function(t,r){var o=t._fullLayout,a=x.getFromId(t,r.xaxis),n=x.getFromId(t,r.yaxis),i=a.makeCalcdata(r,"x"),s=S(r,a,"x",i).vals,h=E(t,r,i,s,n,e);return h.length?(d.extendFlat(h[0].t,{num:o._numBoxes,dPos:d.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,h):[{t:{empty:!0}}]};function e(t,r,o,a){return{min:o,q1:Math.min(t,a),med:a,q3:Math.max(t,a),max:r}}}}),TH=He({"src/traces/candlestick/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"candlestick",basePlotModule:Kf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:ak(),layoutAttributes:U_(),supplyLayoutDefaults:V2().supplyLayoutDefaults,crossTraceCalc:G2().crossTraceCalc,supplyDefaults:bH(),calc:wH(),plot:H2().plot,layerName:"boxlayer",style:W2().style,hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),AH=He({"lib/candlestick.js"(Z,V){"use strict";V.exports=TH()}}),ik=He({"src/plots/polar/set_convert.js"(Z,V){"use strict";var d=sa(),x=wv(),S=d.deg2rad,E=d.rad2deg;V.exports=function(n,i,s){switch(x(n,s),n._id){case"x":case"radialaxis":e(n,i);break;case"angularaxis":o(n,i);break}};function e(a,n){var i=n._subplot;a.setGeometry=function(){var s=a._rl[0],h=a._rl[1],f=i.innerRadius,v=(i.radius-f)/(h-s),c=f/v,T=s>h?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var _=a.c2l(l)-s;return(T(_)?_:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*v},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,n){return n==="degrees"?S(a):a}function r(a,n){return n==="degrees"?E(a):a}function o(a,n){var i=a.type;if(i==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(f,v){return t(s(f),v)},a.c2d=function(f,v){return h(r(f,v))}}a.makeCalcdata=function(f,v){var c=f[v],T=f._length,l,_,w=function(p){return a.d2c(p,f.thetaunit)};if(c)for(l=new Array(T),_=0;_<T;_++)l[_]=w(c[_]);else{var A=v+"0",M="d"+v,g=A in f?w(f[A]):0,b=f[M]?w(f[M]):(a.period||2*Math.PI)/T;for(l=new Array(T),_=0;_<T;_++)l[_]=g+_*b}return l},a.setGeometry=function(){var f=n.sector,v=f.map(S),c={clockwise:-1,counterclockwise:1}[a.direction],T=S(a.rotation),l=function(u){return c*u+T},_=function(u){return(u-T)/c},w,A,M,g;switch(i){case"linear":A=w=d.identity,g=S,M=E,a.range=d.isFullCircle(v)?[f[0],f[0]+360]:v.map(_).map(E);break;case"category":var b=a._categories.length,p=a.period?Math.max(a.period,b):b;p===0&&(p=1),A=g=function(u){return u*2*Math.PI/p},w=M=function(u){return u*p/Math.PI/2},a.range=[0,p];break}a.c2g=function(u){return l(A(u))},a.g2c=function(u){return w(_(u))},a.t2g=function(u){return l(g(u))},a.g2t=function(u){return M(_(u))}}}}}),DT=He({"src/plots/polar/constants.js"(Z,V){"use strict";V.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}}}),zT=He({"src/plots/polar/helpers.js"(Z,V){"use strict";var d=sa(),x=I_().tester,S=d.findIndexOfMin,E=d.isAngleInsideSector,e=d.angleDelta,t=d.angleDist;function r(_,w,A,M,g){if(!E(w,M))return!1;var b,p;A[0]<A[1]?(b=A[0],p=A[1]):(b=A[1],p=A[0]);var u=x(s(b,M[0],M[1],g)),y=x(s(p,M[0],M[1],g)),m=[_*Math.cos(w),_*Math.sin(w)];return y.contains(m)&&!u.contains(m)}function o(_,w,A,M){var g,b,p=M[0],u=M[1],y=v(Math.sin(w)-Math.sin(_)),m=v(Math.cos(w)-Math.cos(_)),R=Math.tan(A),L=v(1/R),z=y/m,F=u-z*p;return L?y&&m?(g=F/(R-z),b=R*g):m?(g=u*L,b=u):(g=p,b=p*R):y&&m?(g=0,b=F):m?(g=0,b=u):g=b=NaN,[g,b]}function a(_,w,A,M){var g=-w*A,b=w*w+1,p=2*(w*g-A),u=g*g+A*A-_*_,y=Math.sqrt(p*p-4*b*u),m=(-p+y)/(2*b),R=(-p-y)/(2*b);return[[m,w*m+g+M],[R,w*R+g+M]]}function n(_,w){var A=w.length,M=new Array(A+1),g;for(g=0;g<A;g++){var b=w[g];M[g]=[_*Math.cos(b),_*Math.sin(b)]}return M[g]=M[0].slice(),M}function i(_,w,A,M){var g=M.length,b=[],p,u;function y(U){return[_*Math.cos(U),_*Math.sin(U)]}function m(U,B,X){return o(U,B,X,y(U))}function R(U){return d.mod(U,g)}function L(U){return E(U,[w,A])}var z=S(M,function(U){return L(U)?t(U,w):1/0}),F=m(M[z],M[R(z-1)],w);for(b.push(F),p=z,u=0;u<g;p++,u++){var N=M[R(p)];if(!L(N))break;b.push(y(N))}var O=S(M,function(U){return L(U)?t(U,A):1/0}),P=m(M[O],M[R(O+1)],A);return b.push(P),b.push([0,0]),b.push(b[0].slice()),b}function s(_,w,A,M){return d.isFullCircle([w,A])?n(_,M):i(_,w,A,M)}function h(_,w,A,M){for(var g=1/0,b=1/0,p=s(_,w,A,M),u=0;u<p.length;u++){var y=p[u];g=Math.min(g,y[0]),b=Math.min(b,-y[1])}return[g,b]}function f(_,w){var A=function(b){var p=e(b,_);return p>0?p:1/0},M=S(w,A),g=d.mod(M+1,w.length);return[w[M],w[g]]}function v(_){return Math.abs(_)>1e-10?_:0}function c(_,w,A){w=w||0,A=A||0;for(var M=_.length,g=new Array(M),b=0;b<M;b++){var p=_[b];g[b]=[w+p[0],A-p[1]]}return g}function T(_,w,A,M,g,b){var p=s(_,w,A,M);return"M"+c(p,g,b).join("L")}function l(_,w,A,M,g,b,p){var u,y;_<w?(u=_,y=w):(u=w,y=_);var m=c(s(u,A,M,g),b,p),R=c(s(y,A,M,g),b,p);return"M"+R.reverse().join("L")+"M"+m.join("L")}V.exports={isPtInsidePolygon:r,findPolygonOffset:h,findEnclosingVertexAngles:f,findIntersectionXY:o,findXYatLength:a,clampTiny:v,pathPolygon:T,pathPolygonAnnulus:l}}}),nk=He({"src/plots/smith/helpers.js"(Z,V){"use strict";function d(r){return r<0?-1:r>0?1:0}function x(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var n=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/n,2*a/n]}function S(r,o){var a=o[0],n=o[1];return[a*r.radius+r.cx,-n*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,n){var i=S(r,x([a,o])),s=i[0],h=i[1],f=S(r,x([n,o])),v=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+v+","+c].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+v+","+c].join(" ")}function t(r,o,a,n){var i=E(r,1/(o+1)),s=S(r,x([o,a])),h=s[0],f=s[1],v=S(r,x([o,n])),c=v[0],T=v[1];if(d(a)!==d(n)){var l=S(r,x([o,0])),_=l[0],w=l[1];return["M"+h+","+f,"A"+i+","+i+" 0 0,"+(0<a?0:1)+" "+_+","+w,"A"+i+","+i+" 0 0,"+(n<0?0:1)+c+","+T].join(" ")}return["M"+h+","+f,"A"+i+","+i+" 0 0,"+(n<a?0:1)+" "+c+","+T].join(" ")}V.exports={smith:x,reactanceArc:e,resistanceArc:t,smithTransform:S}}}),ok=He({"src/plots/polar/polar.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=lo(),E=sa(),e=E.strRotate,t=E.strTranslate,r=Jn(),o=es(),a=bc(),n=Ho(),i=wv(),s=ik(),h=Yd().doAutoRange,f=P5(),v=Ap(),c=rf(),T=K0(),l=Af().prepSelect,_=Af().selectOnClick,w=Af().clearOutline,A=Kd(),M=C_(),g=P_().redrawReglTraces,b=uh().MID_SHIFT,p=DT(),u=zT(),y=nk(),m=y.smith,R=y.reactanceArc,L=y.resistanceArc,z=y.smithTransform,F=E._,N=E.mod,O=E.deg2rad,P=E.rad2deg;function U(de,G,Y){this.isSmith=Y||!1,this.id=G,this.gd=de,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var ee=de._fullLayout,q="clip"+ee._uid+G;this.clipIds.forTraces=q+"-for-traces",this.clipPaths.forTraces=ee._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=ee["_"+(Y?"smith":"polar")+"layer"].append("g").attr("class",G),this.getHole=function(se){return this.isSmith?0:se.hole},this.getSector=function(se){return this.isSmith?[0,360]:se.sector},this.getRadial=function(se){return this.isSmith?se.realaxis:se.radialaxis},this.getAngular=function(se){return this.isSmith?se.imaginaryaxis:se.angularaxis},Y||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=U.prototype;V.exports=function(G,Y,ee){return new U(G,Y,ee)},B.plot=function(de,G){for(var Y=this,ee=G[Y.id],q=!1,se=0;se<de.length;se++){var ae=de[se][0].trace;if(ae.cliponaxis===!1){q=!0;break}}Y._hasClipOnAxisFalse=q,Y.updateLayers(G,ee),Y.updateLayout(G,ee),a.generalUpdatePerTraceModule(Y.gd,Y,de,ee),Y.updateFx(G,ee),Y.isSmith&&(delete ee.realaxis.range,delete ee.imaginaryaxis.range)},B.updateLayers=function(de,G){var Y=this,ee=Y.isSmith,q=Y.layers,se=Y.getRadial(G),ae=Y.getAngular(G),j=p.layerNames,Q=j.indexOf("frontplot"),re=j.slice(0,Q),pe=ae.layer==="below traces",we=se.layer==="below traces";pe&&re.push("angular-line"),we&&re.push("radial-line"),pe&&re.push("angular-axis"),we&&re.push("radial-axis"),re.push("frontplot"),pe||re.push("angular-line"),we||re.push("radial-line"),pe||re.push("angular-axis"),we||re.push("radial-axis");var Se=(ee?"smith":"polar")+"sublayer",Ie=Y.framework.selectAll("."+Se).data(re,String);Ie.enter().append("g").attr("class",function(Re){return Se+" "+Re}).each(function(Re){var We=q[Re]=d.select(this);switch(Re){case"frontplot":ee||We.append("g").classed("barlayer",!0),We.append("g").classed("scatterlayer",!0);break;case"backplot":We.append("g").classed("maplayer",!0);break;case"plotbg":q.bg=We.append("path");break;case"radial-grid":We.style("fill","none");break;case"angular-grid":We.style("fill","none");break;case"radial-line":We.append("line").style("fill","none");break;case"angular-line":We.append("path").style("fill","none");break}}),Ie.order()},B.updateLayout=function(de,G){var Y=this,ee=Y.layers,q=de._size,se=Y.getRadial(G),ae=Y.getAngular(G),j=G.domain.x,Q=G.domain.y;Y.xOffset=q.l+q.w*j[0],Y.yOffset=q.t+q.h*(1-Q[1]);var re=Y.xLength=q.w*(j[1]-j[0]),pe=Y.yLength=q.h*(Q[1]-Q[0]),we=Y.getSector(G);Y.sectorInRad=we.map(O);var Se=Y.sectorBBox=$(we),Ie=Se[2]-Se[0],Re=Se[3]-Se[1],We=pe/re,at=Math.abs(Re/Ie),nt,tt,qe,he,ue;We>at?(nt=re,tt=re*at,ue=(pe-tt)/q.h/2,qe=[j[0],j[1]],he=[Q[0]+ue,Q[1]-ue]):(nt=pe/at,tt=pe,ue=(re-nt)/q.w/2,qe=[j[0]+ue,j[1]-ue],he=[Q[0],Q[1]]),Y.xLength2=nt,Y.yLength2=tt,Y.xDomain2=qe,Y.yDomain2=he;var ne=Y.xOffset2=q.l+q.w*qe[0],Ce=Y.yOffset2=q.t+q.h*(1-he[1]),Ye=Y.radius=nt/Ie,rt=Y.innerRadius=Y.getHole(G)*Ye,Ke=Y.cx=ne-Ye*Se[0],Mt=Y.cy=Ce+Ye*Se[3],kt=Y.cxx=Ke-ne,Nt=Y.cyy=Mt-Ce,Gt=se.side,Mr;Gt==="counterclockwise"?(Mr=Gt,Gt="top"):Gt==="clockwise"&&(Mr=Gt,Gt="bottom"),Y.radialAxis=Y.mockAxis(de,G,se,{_id:"x",side:Gt,_trueSide:Mr,domain:[rt/q.w,Ye/q.w]}),Y.angularAxis=Y.mockAxis(de,G,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),Y.doAutoRange(de,G),Y.updateAngularAxis(de,G),Y.updateRadialAxis(de,G),Y.updateRadialAxisTitle(de,G),Y.xaxis=Y.mockCartesianAxis(de,G,{_id:"x",domain:qe}),Y.yaxis=Y.mockCartesianAxis(de,G,{_id:"y",domain:he});var mr=Y.pathSubplot();Y.clipPaths.forTraces.select("path").attr("d",mr).attr("transform",t(kt,Nt)),ee.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,Y._hasClipOnAxisFalse?null:Y.clipIds.forTraces,Y.gd),ee.bg.attr("d",mr).attr("transform",t(Ke,Mt)).call(r.fill,G.bgcolor)},B.mockAxis=function(de,G,Y,ee){var q=E.extendFlat({},Y,ee);return s(q,G,de),q},B.mockCartesianAxis=function(de,G,Y){var ee=this,q=ee.isSmith,se=Y._id,ae=E.extendFlat({type:"linear"},Y);i(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var Q=ee.sectorBBox,re=j[se],pe=ee.radialAxis._rl,we=(pe[1]-pe[0])/(1-ee.getHole(G));ae.range=[Q[re[0]]*we,Q[re[1]]*we]},ae.isPtWithinRange=se==="x"&&!q?function(Q){return ee.isPtInside(Q)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,G){var Y=this,ee=Y.gd,q=Y.radialAxis,se=Y.getRadial(G);h(ee,q);var ae=q.range;if(se.range=ae.slice(),se._input.range=ae.slice(),q._rl=[q.r2l(ae[0],null,"gregorian"),q.r2l(ae[1],null,"gregorian")],q.minallowed!==void 0){var j=q.r2l(q.minallowed);q._rl[0]>q._rl[1]?q._rl[1]=Math.max(q._rl[1],j):q._rl[0]=Math.max(q._rl[0],j)}if(q.maxallowed!==void 0){var Q=q.r2l(q.maxallowed);q._rl[0]<q._rl[1]?q._rl[1]=Math.min(q._rl[1],Q):q._rl[0]=Math.min(q._rl[0],Q)}},B.updateRadialAxis=function(de,G){var Y=this,ee=Y.gd,q=Y.layers,se=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getRadial(G),pe=N(Y.getSector(G)[0],360),we=Y.radialAxis,Se=ae<se,Ie=Y.isSmith;Ie||(Y.fillViewInitialKey("radialaxis.angle",re.angle),Y.fillViewInitialKey("radialaxis.range",we.range.slice()),we.setGeometry()),we.tickangle==="auto"&&pe>90&&pe<=270&&(we.tickangle=180);var Re=Ie?function(Ye){var rt=z(Y,m([Ye.x,0]));return t(rt[0]-j,rt[1]-Q)}:function(Ye){return t(we.l2p(Ye.x)+ae,0)},We=Ie?function(Ye){return L(Y,Ye.x,-1/0,1/0)}:function(Ye){return Y.pathArc(we.r2p(Ye.x)+ae)},at=X(re);if(Y.radialTickLayout!==at&&(q["radial-axis"].selectAll(".xtick").remove(),Y.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Ie?(we.tickvals||[]).filter(function(Ye){return Ye>=0}).map(function(Ye){return n.tickText(we,Ye,!0,!1)}):n.calcTicks(we),qe=Ie?tt:n.clipEnds(we,tt),he=n.getTickSigns(we)[2];Ie&&((we.ticks==="top"&&we.side==="bottom"||we.ticks==="bottom"&&we.side==="top")&&(he=-he),we.ticks==="top"&&we.side==="top"&&(nt=-we.ticklen),we.ticks==="bottom"&&we.side==="bottom"&&(nt=we.ticklen)),n.drawTicks(ee,we,{vals:tt,layer:q["radial-axis"],path:n.makeTickPath(we,0,he),transFn:Re,crisp:!1}),n.drawGrid(ee,we,{vals:qe,layer:q["radial-grid"],path:We,transFn:E.noop,crisp:!1}),n.drawLabels(ee,we,{vals:tt,layer:q["radial-axis"],transFn:Re,labelFns:n.makeLabelFns(we,nt)})}var ue=Y.radialAxisAngle=Y.vangles?P(le(O(re.angle),Y.vangles)):re.angle,ne=t(j,Q),Ce=ne+e(-ue);ce(q["radial-axis"],Se&&(re.showticklabels||re.ticks),{transform:Ce}),ce(q["radial-grid"],Se&&re.showgrid,{transform:Ie?"":ne}),ce(q["radial-line"].select("line"),Se&&re.showline,{x1:Ie?-se:ae,y1:0,x2:se,y2:0,transform:Ce}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateRadialAxisTitle=function(de,G,Y){if(!this.isSmith){var ee=this,q=ee.gd,se=ee.radius,ae=ee.cx,j=ee.cy,Q=ee.getRadial(G),re=ee.id+"title",pe=0;if(Q.title){var we=o.bBox(ee.layers["radial-axis"].node()).height,Se=Q.title.font.size,Ie=Q.side;pe=Ie==="top"?Se:Ie==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Re=Y!==void 0?Y:ee.radialAxisAngle,We=O(Re),at=Math.cos(We),nt=Math.sin(We),tt=ae+se/2*at+pe*nt,qe=j-se/2*nt+pe*at;ee.layers["radial-axis-title"]=T.draw(q,re,{propContainer:Q,propName:ee.id+".radialaxis.title.text",placeholder:F(q,"Click to enter radial axis title"),attributes:{x:tt,y:qe,"text-anchor":"middle"},transform:{rotate:-Re}})}},B.updateAngularAxis=function(de,G){var Y=this,ee=Y.gd,q=Y.layers,se=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getAngular(G),pe=Y.angularAxis,we=Y.isSmith;we||(Y.fillViewInitialKey("angularaxis.rotation",re.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Ke=z(Y,m([0,rt.x]));return Math.atan2(Ke[0]-j,Ke[1]-Q)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=P(pe.tick0),pe.dtick=P(pe.dtick));var Ie=function(rt){return t(j+se*Math.cos(rt),Q-se*Math.sin(rt))},Re=we?function(rt){var Ke=z(Y,m([0,rt.x]));return t(Ke[0],Ke[1])}:function(rt){return Ie(Se(rt))},We=we?function(rt){var Ke=z(Y,m([0,rt.x])),Mt=Math.atan2(Ke[0]-j,Ke[1]-Q)-Math.PI/2;return t(Ke[0],Ke[1])+e(-P(Mt))}:function(rt){var Ke=Se(rt);return Ie(Ke)+e(-P(Ke))},at=we?function(rt){return R(Y,rt.x,0,1/0)}:function(rt){var Ke=Se(rt),Mt=Math.cos(Ke),kt=Math.sin(Ke);return"M"+[j+ae*Mt,Q-ae*kt]+"L"+[j+se*Mt,Q-se*kt]},nt=n.makeLabelFns(pe,0),tt=nt.labelStandoff,qe={};qe.xFn=function(rt){var Ke=Se(rt);return Math.cos(Ke)*tt},qe.yFn=function(rt){var Ke=Se(rt),Mt=Math.sin(Ke)>0?.2:1;return-Math.sin(Ke)*(tt+rt.fontSize*Mt)+Math.abs(Math.cos(Ke))*(rt.fontSize*b)},qe.anchorFn=function(rt){var Ke=Se(rt),Mt=Math.cos(Ke);return Math.abs(Mt)<.1?"middle":Mt>0?"start":"end"},qe.heightFn=function(rt,Ke,Mt){var kt=Se(rt);return-.5*(1+Math.sin(kt))*Mt};var he=X(re);Y.angularTickLayout!==he&&(q["angular-axis"].selectAll("."+pe._id+"tick").remove(),Y.angularTickLayout=he);var ue=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return n.tickText(pe,rt,!0,!1)}):n.calcTicks(pe);we&&(ue[0].text="\u221E",ue[0].fontSize*=1.75);var ne;if(G.gridshape==="linear"?(ne=ue.map(Se),E.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,Y.vangles=ne,pe.type==="category"&&(ue=ue.filter(function(rt){return E.isAngleInsideSector(Se(rt),Y.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ye=(pe.linewidth||1)/2;n.drawTicks(ee,pe,{vals:ue,layer:q["angular-axis"],path:"M"+Ce*Ye+",0h"+Ce*pe.ticklen,transFn:We,crisp:!1}),n.drawGrid(ee,pe,{vals:ue,layer:q["angular-grid"],path:at,transFn:E.noop,crisp:!1}),n.drawLabels(ee,pe,{vals:ue,layer:q["angular-axis"],repositionOnUpdate:!0,transFn:Re,labelFns:qe})}ce(q["angular-line"].select("path"),re.showline,{d:Y.pathSubplot(),transform:t(j,Q)}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateFx=function(de,G){if(!this.gd._context.staticPlot){var Y=!this.isSmith;Y&&(this.updateAngularDrag(de),this.updateRadialDrag(de,G,0),this.updateRadialDrag(de,G,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var G=this,Y=G.isSmith,ee=G.gd,q=G.layers,se=de._zoomlayer,ae=p.MINZOOM,j=p.OFFEDGE,Q=G.radius,re=G.innerRadius,pe=G.cx,we=G.cy,Se=G.cxx,Ie=G.cyy,Re=G.sectorInRad,We=G.vangles,at=G.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,qe=u.findEnclosingVertexAngles,he=p.cornerHalfWidth,ue=p.cornerLen/2,ne,Ce,Ye=f.makeDragger(q,"path","maindrag",de.dragmode===!1?"none":"crosshair");d.select(Ye).attr("d",G.pathSubplot()).attr("transform",t(pe,we)),Ye.onmousemove=function(ur){c.hover(ee,ur,G.id),ee._fullLayout._lasthover=Ye,ee._fullLayout._hoversubplot=G.id},Ye.onmouseout=function(ur){ee._dragging||v.unhover(ee,ur)};var rt={element:Ye,gd:ee,subplot:G.id,plotinfo:{id:G.id,xaxis:G.xaxis,yaxis:G.yaxis},xaxes:[G.xaxis],yaxes:[G.yaxis]},Ke,Mt,kt,Nt,Gt,Mr,mr,qr,Er;function Ir(ur,sr){return Math.sqrt(ur*ur+sr*sr)}function _t(ur,sr){return Ir(ur-Se,sr-Ie)}function Oe(ur,sr){return Math.atan2(Ie-sr,ur-Se)}function Je(ur,sr){return[ur*Math.cos(sr),ur*Math.sin(-sr)]}function Ae(ur,sr){if(ur===0)return G.pathSector(2*he);var Pr=ue/ur,Ta=sr-Pr,Oa=sr+Pr,Ia=Math.max(0,Math.min(ur,Q)),qa=Ia-he,Wa=Ia+he;return"M"+Je(qa,Ta)+"A"+[qa,qa]+" 0,0,0 "+Je(qa,Oa)+"L"+Je(Wa,Oa)+"A"+[Wa,Wa]+" 0,0,1 "+Je(Wa,Ta)+"Z"}function Le(ur,sr,Pr){if(ur===0)return G.pathSector(2*he);var Ta=Je(ur,sr),Oa=Je(ur,Pr),Ia=nt((Ta[0]+Oa[0])/2),qa=nt((Ta[1]+Oa[1])/2),Wa,Ca;if(Ia&&qa){var hi=qa/Ia,wi=-1/hi,Kt=tt(he,hi,Ia,qa);Wa=tt(ue,wi,Kt[0][0],Kt[0][1]),Ca=tt(ue,wi,Kt[1][0],Kt[1][1])}else{var Dt,Yt;qa?(Dt=ue,Yt=he):(Dt=he,Yt=ue),Wa=[[Ia-Dt,qa-Yt],[Ia+Dt,qa-Yt]],Ca=[[Ia-Dt,qa+Yt],[Ia+Dt,qa+Yt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function Ue(){kt=null,Nt=null,Gt=G.pathSubplot(),Mr=!1;var ur=ee._fullLayout[G.id];mr=x(ur.bgcolor).getLuminance(),qr=f.makeZoombox(se,mr,pe,we,Gt),qr.attr("fill-rule","evenodd"),Er=f.makeCorners(se,pe,we),w(ee)}function Ze(ur,sr){return sr=Math.max(Math.min(sr,Q),re),ur<j?ur=0:Q-ur<j?ur=Q:sr<j?sr=0:Q-sr<j&&(sr=Q),Math.abs(sr-ur)>ae?(ur<sr?(kt=ur,Nt=sr):(kt=sr,Nt=ur),!0):(kt=null,Nt=null,!1)}function st(ur,sr){ur=ur||Gt,sr=sr||"M0,0Z",qr.attr("d",ur),Er.attr("d",sr),f.transitionZoombox(qr,Er,Mr,mr),Mr=!0;var Pr={};jt(Pr),ee.emit("plotly_relayouting",Pr)}function ut(ur,sr){ur=ur*ne,sr=sr*Ce;var Pr=Ke+ur,Ta=Mt+sr,Oa=_t(Ke,Mt),Ia=Math.min(_t(Pr,Ta),Q),qa=Oe(Ke,Mt),Wa,Ca;Ze(Oa,Ia)&&(Wa=Gt+G.pathSector(Nt),kt&&(Wa+=G.pathSector(kt)),Ca=Ae(kt,qa)+Ae(Nt,qa)),st(Wa,Ca)}function Ut(ur,sr,Pr,Ta){var Oa=u.findIntersectionXY(Pr,Ta,Pr,[ur-Se,Ie-sr]);return Ir(Oa[0],Oa[1])}function Ct(ur,sr){var Pr=Ke+ur,Ta=Mt+sr,Oa=Oe(Ke,Mt),Ia=Oe(Pr,Ta),qa=qe(Oa,We),Wa=qe(Ia,We),Ca=Ut(Ke,Mt,qa[0],qa[1]),hi=Math.min(Ut(Pr,Ta,Wa[0],Wa[1]),Q),wi,Kt;Ze(Ca,hi)&&(wi=Gt+G.pathSector(Nt),kt&&(wi+=G.pathSector(kt)),Kt=[Le(kt,qa[0],qa[1]),Le(Nt,qa[0],qa[1])].join(" ")),st(wi,Kt)}function Pt(){if(f.removeZoombox(ee),!(kt===null||Nt===null)){var ur={};jt(ur),f.showDoubleClickNotifier(ee),S.call("_guiRelayout",ee,ur)}}function jt(ur){var sr=at._rl,Pr=(sr[1]-sr[0])/(1-re/Q)/Q,Ta=[sr[0]+(kt-re)*Pr,sr[0]+(Nt-re)*Pr];ur[G.id+".radialaxis.range"]=Ta}function fr(ur,sr){var Pr=ee._fullLayout.clickmode;if(f.removeZoombox(ee),ur===2){var Ta={};for(var Oa in G.viewInitial)Ta[G.id+"."+Oa]=G.viewInitial[Oa];ee.emit("plotly_doubleclick",null),S.call("_guiRelayout",ee,Ta)}Pr.indexOf("select")>-1&&ur===1&&_(sr,ee,[G.xaxis],[G.yaxis],G.id,rt),Pr.indexOf("event")>-1&&c.click(ee,sr,G.id)}rt.prepFn=function(ur,sr,Pr){var Ta=ee._fullLayout.dragmode,Oa=Ye.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Ia=ee._fullLayout._invTransform;ne=ee._fullLayout._invScaleX,Ce=ee._fullLayout._invScaleY;var qa=E.apply3DTransform(Ia)(sr-Oa.left,Pr-Oa.top);if(Ke=qa[0],Mt=qa[1],We){var Wa=u.findPolygonOffset(Q,Re[0],Re[1],We);Ke+=Se+Wa[0],Mt+=Ie+Wa[1]}switch(Ta){case"zoom":rt.clickFn=fr,Y||(We?rt.moveFn=Ct:rt.moveFn=ut,rt.doneFn=Pt,Ue(ur,sr,Pr));break;case"select":case"lasso":l(ur,sr,Pr,rt,Ta);break}},v.init(rt)},B.updateRadialDrag=function(de,G,Y){var ee=this,q=ee.gd,se=ee.layers,ae=ee.radius,j=ee.innerRadius,Q=ee.cx,re=ee.cy,pe=ee.radialAxis,we=p.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Ie=O(ee.radialAxisAngle),Re=pe._rl,We=Re[0],at=Re[1],nt=Re[Y],tt=.75*(Re[1]-Re[0])/(1-ee.getHole(G))/ae,qe,he,ue;Y?(qe=Q+(ae+Se)*Math.cos(Ie),he=re-(ae+Se)*Math.sin(Ie),ue="radialdrag"):(qe=Q+(j-Se)*Math.cos(Ie),he=re-(j-Se)*Math.sin(Ie),ue="radialdrag-inner");var ne=f.makeRectDragger(se,ue,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:q};de.dragmode===!1&&(Ce.dragmode=!1),ce(d.select(ne),pe.visible&&j<ae,{transform:t(qe,he)});var Ye,rt,Ke;function Mt(mr,qr){if(Ye)Ye(mr,qr);else{var Er=[mr,-qr],Ir=[Math.cos(Ie),Math.sin(Ie)],_t=Math.abs(E.dot(Er,Ir)/Math.sqrt(E.dot(Er,Er)));isNaN(_t)||(Ye=_t<.5?Gt:Mr)}var Oe={};kt(Oe),q.emit("plotly_relayouting",Oe)}function kt(mr){rt!==null?mr[ee.id+".radialaxis.angle"]=rt:Ke!==null&&(mr[ee.id+".radialaxis.range["+Y+"]"]=Ke)}function Nt(){rt!==null?S.call("_guiRelayout",q,ee.id+".radialaxis.angle",rt):Ke!==null&&S.call("_guiRelayout",q,ee.id+".radialaxis.range["+Y+"]",Ke)}function Gt(mr,qr){if(Y!==0){var Er=qe+mr,Ir=he+qr;rt=Math.atan2(re-Ir,Er-Q),ee.vangles&&(rt=le(rt,ee.vangles)),rt=P(rt);var _t=t(Q,re)+e(-rt);se["radial-axis"].attr("transform",_t),se["radial-line"].select("line").attr("transform",_t);var Oe=ee.gd._fullLayout,Je=Oe[ee.id];ee.updateRadialAxisTitle(Oe,Je,rt)}}function Mr(mr,qr){var Er=E.dot([mr,-qr],[Math.cos(Ie),Math.sin(Ie)]);if(Ke=nt-tt*Er,tt>0!=(Y?Ke>We:Ke<at)){Ke=null;return}var Ir=q._fullLayout,_t=Ir[ee.id];pe.range[Y]=Ke,pe._rl[Y]=Ke,ee.updateRadialAxis(Ir,_t),ee.xaxis.setRange(),ee.xaxis.setScale(),ee.yaxis.setRange(),ee.yaxis.setScale();var Oe=!1;for(var Je in ee.traceHash){var Ae=ee.traceHash[Je],Le=E.filterVisible(Ae),Ue=Ae[0][0].trace._module;Ue.plot(q,ee,Le,_t),S.traceIs(Je,"gl")&&Le.length&&(Oe=!0)}Oe&&(M(q),g(q))}Ce.prepFn=function(){Ye=null,rt=null,Ke=null,Ce.moveFn=Mt,Ce.doneFn=Nt,w(q)},Ce.clampFn=function(mr,qr){return Math.sqrt(mr*mr+qr*qr)<p.MINDRAG&&(mr=0,qr=0),[mr,qr]},v.init(Ce)},B.updateAngularDrag=function(de){var G=this,Y=G.gd,ee=G.layers,q=G.radius,se=G.angularAxis,ae=G.cx,j=G.cy,Q=G.cxx,re=G.cyy,pe=p.angularDragBoxSize,we=f.makeDragger(ee,"path","angulardrag",de.dragmode===!1?"none":"move"),Se={element:we,gd:Y};de.dragmode===!1?Se.dragmode=!1:d.select(we).attr("d",G.pathAnnulus(q,q+pe)).attr("transform",t(ae,j)).call(A,"move");function Ie(Ke,Mt){return Math.atan2(re+pe-Mt,Ke-Q-pe)}var Re=ee.frontplot.select(".scatterlayer").selectAll(".trace"),We=Re.selectAll(".point"),at=Re.selectAll(".textpoint"),nt,tt,qe,he,ue,ne;function Ce(Ke,Mt){var kt=G.gd._fullLayout,Nt=kt[G.id],Gt=nt+Ke*de._invScaleX,Mr=tt+Mt*de._invScaleY,mr=Ie(Gt,Mr),qr=P(mr-ne);if(he=qe+qr,ee.frontplot.attr("transform",t(G.xOffset2,G.yOffset2)+e([-qr,Q,re])),G.vangles){ue=G.radialAxisAngle+qr;var Er=t(ae,j)+e(-qr),Ir=t(ae,j)+e(-ue);ee.bg.attr("transform",Er),ee["radial-grid"].attr("transform",Er),ee["radial-axis"].attr("transform",Ir),ee["radial-line"].select("line").attr("transform",Ir),G.updateRadialAxisTitle(kt,Nt,ue)}else G.clipPaths.forTraces.select("path").attr("transform",t(Q,re)+e(qr));We.each(function(){var Ze=d.select(this),st=o.getTranslate(Ze);Ze.attr("transform",t(st.x,st.y)+e([qr]))}),at.each(function(){var Ze=d.select(this),st=Ze.select("text"),ut=o.getTranslate(Ze);Ze.attr("transform",e([qr,st.attr("x"),st.attr("y")])+t(ut.x,ut.y))}),se.rotation=E.modHalf(he,360),G.updateAngularAxis(kt,Nt),G._hasClipOnAxisFalse&&!E.isFullCircle(G.sectorInRad)&&Re.call(o.hideOutsideRangePoints,G);var _t=!1;for(var Oe in G.traceHash)if(S.traceIs(Oe,"gl")){var Je=G.traceHash[Oe],Ae=E.filterVisible(Je),Le=Je[0][0].trace._module;Le.plot(Y,G,Ae,Nt),Ae.length&&(_t=!0)}_t&&(M(Y),g(Y));var Ue={};Ye(Ue),Y.emit("plotly_relayouting",Ue)}function Ye(Ke){Ke[G.id+".angularaxis.rotation"]=he,G.vangles&&(Ke[G.id+".radialaxis.angle"]=ue)}function rt(){at.select("text").attr("transform",null);var Ke={};Ye(Ke),S.call("_guiRelayout",Y,Ke)}Se.prepFn=function(Ke,Mt,kt){var Nt=de[G.id];qe=Nt.angularaxis.rotation;var Gt=we.getBoundingClientRect();nt=Mt-Gt.left,tt=kt-Gt.top,Y._fullLayout._calcInverseTransform(Y);var Mr=E.apply3DTransform(de._invTransform)(nt,tt);nt=Mr[0],tt=Mr[1],ne=Ie(nt,tt),Se.moveFn=Ce,Se.doneFn=rt,w(Y)},G.vangles&&!E.isFullCircle(G.sectorInRad)&&(Se.prepFn=E.noop,A(d.select(we),null)),v.init(Se)},B.isPtInside=function(de){if(this.isSmith)return!0;var G=this.sectorInRad,Y=this.vangles,ee=this.angularAxis.c2g(de.theta),q=this.radialAxis,se=q.c2l(de.r),ae=q._rl,j=Y?u.isPtInsidePolygon:E.isPtInsideSector;return j(se,ee,ae,G,Y)},B.pathArc=function(de){var G=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathArc;return ee(de,G[0],G[1],Y)},B.pathSector=function(de){var G=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathSector;return ee(de,G[0],G[1],Y)},B.pathAnnulus=function(de,G){var Y=this.sectorInRad,ee=this.vangles,q=ee?u.pathPolygonAnnulus:E.pathAnnulus;return q(de,G,Y[0],Y[1],ee)},B.pathSubplot=function(){var de=this.innerRadius,G=this.radius;return de?this.pathAnnulus(de,G):this.pathSector(G)},B.fillViewInitialKey=function(de,G){de in this.viewInitial||(this.viewInitial[de]=G)};function X(de){var G=de.ticks+String(de.ticklen)+String(de.showticklabels);return"side"in de&&(G+=de.side),G}function $(de){var G=de[0],Y=de[1],ee=Y-G,q=N(G,360),se=q+ee,ae=Math.cos(O(q)),j=Math.sin(O(q)),Q=Math.cos(O(se)),re=Math.sin(O(se)),pe,we,Se,Ie;return q<=90&&se>=90||q>90&&se>=450?Ie=1:j<=0&&re<=0?Ie=0:Ie=Math.max(j,re),q<=180&&se>=180||q>180&&se>=540?pe=-1:ae>=0&&Q>=0?pe=0:pe=Math.min(ae,Q),q<=270&&se>=270||q>270&&se>=630?we=-1:j>=0&&re>=0?we=0:we=Math.min(j,re),se>=360?Se=1:ae<=0&&Q<=0?Se=0:Se=Math.max(ae,Q),[pe,we,Se,Ie]}function le(de,G){var Y=function(q){return E.angleDist(de,q)},ee=E.findIndexOfMin(G,Y);return G[ee]}function ce(de,G,Y){return G?(de.attr("display",null),de.attr(Y)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),o={visible:E({},x.visible,{dflt:!0}),type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:E({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},x.minallowed,{editType:"plot"}),maxallowed:E({},x.maxallowed,{editType:"plot"}),range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},x.title.text,{editType:"plot",dflt:""}),font:E({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.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:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),V.exports={domain:S({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:d.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),SH=He({"src/plots/polar/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=o0(),e=Hh().getSubplotData,t=Y0(),r=t1(),o=Qm(),a=e0(),n=I2(),i=z_(),s=f5(),h=a1(),f=sk(),v=ik(),c=DT(),T=c.axisNames;function l(w,A,M,g){var b=M("bgcolor");g.bgColor=x.combine(b,g.paper_bgcolor);var p=M("sector");M("hole");var u=e(g.fullData,c.name,g.id),y=g.layoutOut,m;function R(we,Se){return M(m+"."+we,Se)}for(var L=0;L<T.length;L++){m=T[L],d.isPlainObject(w[m])||(w[m]={});var z=w[m],F=S.newContainer(A,m);F._id=F._name=m,F._attr=g.id+"."+m,F._traceIndices=u.map(function(we){return we.index});var N=c.axisName2dataArray[m],O=_(z,F,R,u,N,g);n(z,F,R,{axData:u,dataAttr:N});var P=R("visible");switch(v(F,A,y),R("uirevision",A.uirevision),F._m=1,m){case"radialaxis":R("minallowed"),R("maxallowed");var U=R("range"),B=F.getAutorangeDflt(U),X=R("autorange",B),$;U&&(U[0]===null&&U[1]===null||(U[0]===null||U[1]===null)&&(X==="reversed"||X===!0)||U[0]!==null&&(X==="min"||X==="max reversed")||U[1]!==null&&(X==="max"||X==="min reversed"))&&(U=void 0,delete F.range,F.autorange=!0,$=!0),$||(B=F.getAutorangeDflt(U),X=R("autorange",B)),z.autorange=X,X&&(s(R,X,U),(O==="linear"||O==="-")&&R("rangemode"),F.isReversed()&&(F._m=-1)),F.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){d.log("Polar plots do not support date angular axes yet.");for(var le=0;le<u.length;le++)u[le].visible=!1;O=z.type=F.type="linear"}R(O==="linear"?"thetaunit":"period");var ce=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[ce]);break}if(a(z,F,R,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"\xB0":void 0}),P){var de,G,Y,ee,q,se,ae,j,Q,re,pe=g.font||{};de=R("color"),G=de===z.color?de:pe.color,Y=pe.size,ee=pe.family,q=pe.weight,se=pe.style,ae=pe.variant,j=pe.textcase,Q=pe.lineposition,re=pe.shadow,t(z,F,R,F.type),o(z,F,R,F.type,{font:{weight:q,style:se,variant:ae,textcase:j,lineposition:Q,shadow:re,color:G,size:Y,family:ee},noAutotickangles:m==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,R,{outerTicks:!0}),i(z,F,R,{dfltColor:de,bgColor:g.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:f[m]}),R("layer"),m==="radialaxis"&&(R("side"),R("angle",p[0]),R("title.text"),d.coerceFont(R,"title.font",{weight:q,style:se,variant:ae,textcase:j,lineposition:Q,shadow:re,color:G,size:d.bigFont(Y),family:ee}))}O!=="category"&&R("hoverformat"),F._input=z}A.angularaxis.type==="category"&&M("gridshape")}function _(w,A,M,g,b,p){var u=M("autotypenumbers",p.autotypenumbersDflt),y=M("type");if(y==="-"){for(var m,R=0;R<g.length;R++)if(g[R].visible){m=g[R];break}m&&m[b]&&(A.type=h(m[b],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),A.type==="-"?A.type="linear":w.type=A.type}return A.type}V.exports=function(A,M,g){E(A,M,g,{type:c.name,attributes:f,handleDefaults:l,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:g,layoutOut:M})}}}),FT=He({"src/plots/polar/index.js"(Z,V){"use strict";var d=Hh().getSubplotCalcData,x=sa().counterRegex,S=ok(),E=DT(),e=E.attr,t=E.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(i){for(var s=i._fullLayout,h=i.calcdata,f=s._subplots[t],v=0;v<f.length;v++){var c=f[v],T=d(h,t,c),l=s[c]._subplot;l||(l=S(i,c),s[c]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,f){for(var v=f._subplots[t]||[],c=f._has&&f._has("gl"),T=s._has&&s._has("gl"),l=c&&!T,_=0;_<v.length;_++){var w=v[_],A=f[w]._subplot;if(!s[w]&&A){A.framework.remove(),A.layers["radial-axis-title"].remove();for(var M in A.clipPaths)A.clipPaths[M].remove()}l&&A._scene&&(A._scene.destroy(),A._scene=null)}}V.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:sk(),supplyLayoutDefaults:SH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),Cx=He({"src/traces/scatterpolar/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;V.exports={mode:t.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:x({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:t.hoveron,hovertemplate:d(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),OT=He({"src/traces/scatterpolar/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=Cx();function n(s,h,f,v){function c(_,w){return d.coerce(s,h,a,_,w)}var T=i(s,h,v,c);if(!T){h.visible=!1;return}c("thetaunit"),c("mode",T<o?"lines+markers":"lines"),c("text"),c("hovertext"),h.hoveron!=="fills"&&(c("hovertemplate"),c("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,f,v,c,{gradient:!0}),x.hasLines(h)&&(E(s,h,f,v,c,{backoff:!0}),e(s,h,c),c("connectgaps")),x.hasText(h)&&(c("texttemplate"),c("texttemplatefallback"),t(s,h,v,c));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(c("cliponaxis"),c("marker.maxdisplayed"),l.push("points")),c("fill"),h.fill!=="none"&&(r(s,h,f,c),x.hasLines(h)||e(s,h,c)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),c("hoveron",l.join("+")||"points"),d.coerceSelectionMarkerOpacity(h,c)}function i(s,h,f,v){var c=v("r"),T=v("theta");d.isTypedArray(c)&&(h.r=c=Array.from(c)),d.isTypedArray(T)&&(h.theta=T=Array.from(T));var l;if(c)T?l=Math.min(c.length,T.length):(l=c.length,v("theta0"),v("dtheta"));else{if(!T)return 0;l=h.theta.length,v("r0"),v("dr")}return h._length=l,l}V.exports={handleRThetaDefaults:i,supplyDefaults:n}}}),BT=He({"src/traces/scatterpolar/format_labels.js"(Z,V){"use strict";var d=sa(),x=Ho();V.exports=function(E,e,t){var r={},o=t[e.subplot]._subplot,a,n;o?(a=o.radialAxis,n=o.angularAxis):(o=t[e.subplot],a=o.radialaxis,n=o.angularaxis);var i=a.c2l(E.r);r.rLabel=x.tickText(a,i,!0).text;var s=n.thetaunit==="degrees"?d.rad2deg(E.theta):E.theta;return r.thetaLabel=x.tickText(n,s,!0).text,r}}}),MH=He({"src/traces/scatterpolar/calc.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=Ho(),E=Fd(),e=Av(),t=Od(),r=Bd().calcMarkerSize;V.exports=function(a,n){for(var i=a._fullLayout,s=n.subplot,h=i[s].radialaxis,f=i[s].angularaxis,v=h.makeCalcdata(n,"r"),c=f.makeCalcdata(n,"theta"),T=n._length,l=new Array(T),_=0;_<T;_++){var w=v[_],A=c[_],M=l[_]={};d(w)&&d(A)?(M.r=w,M.theta=A):M.r=x}var g=r(n,T);return n._extremes.x=S.findExtremes(h,v,{ppad:g}),E(a,n),e(l,n),t(l,n),l}}}),EH=He({"src/traces/scatterpolar/plot.js"(Z,V){"use strict";var d=s1(),x=Ws().BADNUM;V.exports=function(E,e,t){for(var r=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,a=e.yaxis,n={xaxis:o,yaxis:a,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},i=e.radialAxis,s=e.angularAxis,h=0;h<t.length;h++)for(var f=t[h],v=0;v<f.length;v++){v===0&&(f[0].trace._xA=o,f[0].trace._yA=a);var c=f[v],T=c.r;if(T===x)c.x=c.y=x;else{var l=i.c2g(T),_=s.c2g(c.theta);c.x=l*Math.cos(_),c.y=l*Math.sin(_)}}d(E,n,t,r)}}}),NT=He({"src/traces/scatterpolar/hover.js"(Z,V){"use strict";var d=u1();function x(E,e,t,r){var o=d(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var n=E.subplot,i=a.cd[a.index],s=a.trace;if(n.isPtInside(i))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(i,s,n,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="r",a._hovertitle="\u03B8";var n={};n[e.subplot]={_subplot:t};var i=e._module.formatLabels(E,e,n);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var s=E.hi||e.hoverinfo,h=[];function f(c,T){h.push(c._hovertitle+": "+T)}if(!e.hovertemplate){var v=s.split("+");v.indexOf("all")!==-1&&(v=["r","theta","text"]),v.indexOf("r")!==-1&&f(o,r.rLabel),v.indexOf("theta")!==-1&&f(a,r.thetaLabel),v.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}V.exports={hoverPoints:x,makeHoverPointText:S}}}),kH=He({"src/traces/scatterpolar/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:pp(),formatLabels:BT(),calc:MH(),plot:EH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),CH=He({"lib/scatterpolar.js"(Z,V){"use strict";V.exports=kH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,V){"use strict";var d=Cx(),{cliponaxis:x,hoveron:S}=d,E=Qs(d,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:n,marker:i,textfont:s,textposition:h}=xx();V.exports=ps(To({},E),{connectgaps:e,fill:a,fillcolor:n,line:{color:t,dash:r,editType:"calc",width:o},marker:i,textfont:s,textposition:h})}}),LH=He({"src/traces/scatterpolargl/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=OT().handleRThetaDefaults,E=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();V.exports=function(i,s,h,f){function v(T,l){return d.coerce(i,s,a,T,l)}var c=S(i,s,f,v);if(!c){s.visible=!1;return}v("thetaunit"),v("mode",c<o?"lines+markers":"lines"),v("text"),v("hovertext"),s.hoveron!=="fills"&&(v("hovertemplate"),v("hovertemplatefallback")),x.hasMarkers(s)&&E(i,s,h,f,v,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),x.hasLines(s)&&(e(i,s,h,f,v),v("connectgaps")),x.hasText(s)&&(v("texttemplate"),v("texttemplatefallback"),t(i,s,f,v,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),v("fill"),s.fill!=="none"&&r(i,s,h,v),d.coerceSelectionMarkerOpacity(s,v)}}}),PH=He({"src/traces/scatterpolargl/format_labels.js"(Z,V){"use strict";var d=BT();V.exports=function(S,E,e){var t=S.i;return"r"in S||(S.r=E._r[t]),"theta"in S||(S.theta=E._theta[t]),d(S,E,e)}}}),IH=He({"src/traces/scatterpolargl/calc.js"(Z,V){"use strict";var d=Fd(),x=Bd().calcMarkerSize,S=yg(),E=Ho(),e=y0().TOO_MANY_POINTS;V.exports=function(r,o){var a=r._fullLayout,n=o.subplot,i=a[n].radialaxis,s=a[n].angularaxis,h=o._r=i.makeCalcdata(o,"r"),f=o._theta=s.makeCalcdata(o,"theta"),v=o._length,c={};v<h.length&&(h=h.slice(0,v)),v<f.length&&(f=f.slice(0,v)),c.r=h,c.theta=f,d(r,o);var T=c.opts=S.style(r,o),l;return v<e?l=x(o,v):T.marker&&(l=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),o._extremes.x=E.findExtremes(i,h,{ppad:l}),[{x:!1,y:!1,t:c,trace:o}]}}}),RH=He({"src/traces/scatterpolargl/hover.js"(Z,V){"use strict";var d=pT(),x=NT().makeHoverPointText;function S(E,e,t,r){var o=E.cd,a=o[0].t,n=a.r,i=a.theta,s=d.hoverPoints(E,e,t,r);if(!(!s||s[0].index===!1)){var h=s[0];if(h.index===void 0)return s;var f=E.subplot,v=h.cd[h.index],c=h.trace;if(v.r=n[h.index],v.theta=i[h.index],!!f.isPtInside(v))return h.xLabelVal=void 0,h.yLabelVal=void 0,x(v,c,f,h),s}}V.exports={hoverPoints:S}}}),DH=He({"src/traces/scatterpolargl/base_index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:FT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:lk(),supplyDefaults:LH(),colorbar:pp(),formatLabels:PH(),calc:IH(),hoverPoints:RH().hoverPoints,selectPoints:VE(),meta:{}}}}),zH=He({"src/traces/scatterpolargl/plot.js"(Z,V){"use strict";var d=vT(),x=as(),S=p6(),E=jE(),e=yg(),t=sa(),r=y0().TOO_MANY_POINTS,o={};V.exports=function(n,i,s){if(s.length){var h=i.radialAxis,f=i.angularAxis,v=E(n,i);return s.forEach(function(c){if(!(!c||!c[0]||!c[0].trace)){var T=c[0],l=T.trace,_=T.t,w=l._length,A=_.r,M=_.theta,g=_.opts,b,p=A.slice(),u=M.slice();for(b=0;b<A.length;b++)i.isPtInside({r:A[b],theta:M[b]})||(p[b]=NaN,u[b]=NaN);var y=new Array(w*2),m=Array(w),R=Array(w);for(b=0;b<w;b++){var L=p[b],z,F;if(x(L)){var N=h.c2g(L),O=f.c2g(u[b],l.thetaunit);z=N*Math.cos(O),F=N*Math.sin(O)}else z=F=NaN;m[b]=y[b*2]=z,R[b]=y[b*2+1]=F}_.tree=d(y),g.marker&&w>=r&&(g.marker.cluster=_.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=y),g.line&&y.length>1&&t.extendFlat(g.line,e.linePositions(n,l,y)),g.text&&(t.extendFlat(g.text,{positions:y},e.textPosition(n,l,g.text,g.marker)),t.extendFlat(g.textSel,{positions:y},e.textPosition(n,l,g.text,g.markerSel)),t.extendFlat(g.textUnsel,{positions:y},e.textPosition(n,l,g.text,g.markerUnsel))),g.fill&&!v.fill2d&&(v.fill2d=!0),g.marker&&!v.scatter2d&&(v.scatter2d=!0),g.line&&!v.line2d&&(v.line2d=!0),g.text&&!v.glText&&(v.glText=!0),v.lineOptions.push(g.line),v.fillOptions.push(g.fill),v.markerOptions.push(g.marker),v.markerSelectedOptions.push(g.markerSel),v.markerUnselectedOptions.push(g.markerUnsel),v.textOptions.push(g.text),v.textSelectedOptions.push(g.textSel),v.textUnselectedOptions.push(g.textUnsel),v.selectBatch.push([]),v.unselectBatch.push([]),_.x=m,_.y=R,_.rawx=m,_.rawy=R,_.r=A,_.theta=M,_.positions=y,_._scene=v,_.index=v.count,v.count++}}),S(n,i,s)}},V.exports.reglPrecompiled=o}}),FH=He({"src/traces/scatterpolargl/index.js"(Z,V){"use strict";var d=DH();d.plot=zH(),V.exports=d}}),OH=He({"lib/scatterpolargl.js"(Z,V){"use strict";V.exports=FH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,templatefallbackAttrs:x}=Jl(),S=Qo().extendFlat,E=Cx(),e=Sv();V.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:d(),hovertemplatefallback:x(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=He({"src/traces/barpolar/layout_attributes.js"(Z,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),BH=He({"src/traces/barpolar/defaults.js"(Z,V){"use strict";var d=sa(),x=OT().handleRThetaDefaults,S=j2(),E=uk();V.exports=function(t,r,o,a){function n(s,h){return d.coerce(t,r,E,s,h)}var i=x(t,r,a,n);if(!i){r.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),S(t,r,n,o,a),d.coerceSelectionMarkerOpacity(r,n)}}}),NH=He({"src/traces/barpolar/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=ck();V.exports=function(S,E,e){var t={},r;function o(i,s){return d.coerce(S[r]||{},E[r],x,i,s)}for(var a=0;a<e.length;a++){var n=e[a];n.type==="barpolar"&&n.visible===!0&&(r=n.subplot,t[r]||(o("barmode"),o("bargap"),t[r]=1))}}}}),fk=He({"src/traces/barpolar/calc.js"(Z,V){"use strict";var d=wp().hasColorscale,x=Tp(),S=sa().isArrayOrTypedArray,E=B_(),e=eg().setGroupPositions,t=Od(),r=lo().traceIs,o=sa().extendFlat;function a(i,s){for(var h=i._fullLayout,f=s.subplot,v=h[f].radialaxis,c=h[f].angularaxis,T=v.makeCalcdata(s,"r"),l=c.makeCalcdata(s,"theta"),_=s._length,w=new Array(_),A=T,M=l,g=0;g<_;g++)w[g]={p:M[g],s:A[g]};function b(p){var u=s[p];u!==void 0&&(s["_"+p]=S(u)?c.makeCalcdata(s,p):c.d2c(u,s.thetaunit))}return c.type==="linear"&&(b("width"),b("offset")),d(s,"marker")&&x(i,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),d(s,"marker.line")&&x(i,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}),E(w,s),t(w,s),w}function n(i,s,h){for(var f=i.calcdata,v=[],c=0;c<f.length;c++){var T=f[c],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===h&&v.push(T)}var _=o({},s.radialaxis,{_id:"x"}),w=s.angularaxis;e(i,w,_,v,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}V.exports={calc:a,crossTraceCalc:n}}}),UH=He({"src/traces/barpolar/plot.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=es(),e=zT();V.exports=function(o,a,n){var i=o._context.staticPlot,s=a.xaxis,h=a.yaxis,f=a.radialAxis,v=a.angularAxis,c=t(a),T=a.layers.frontplot.select("g.barlayer");S.makeTraceGroups(T,n,"trace bars").each(function(){var l=d.select(this),_=S.ensureSingle(l,"g","points"),w=_.selectAll("g.point").data(S.identity);w.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),w.exit().remove(),w.each(function(A){var M=d.select(this),g=A.rp0=f.c2p(A.s0),b=A.rp1=f.c2p(A.s1),p=A.thetag0=v.c2g(A.p0),u=A.thetag1=v.c2g(A.p1),y;if(!x(g)||!x(b)||!x(p)||!x(u)||g===b||p===u)y="M0,0Z";else{var m=f.c2g(A.s1),R=(p+u)/2;A.ct=[s.c2p(m*Math.cos(R)),h.c2p(m*Math.sin(R))],y=c(g,b,p,u)}S.ensureSingle(M,"path").attr("d",y)}),E.setClipUrl(l,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,o)})};function t(r){var o=r.cxx,a=r.cyy;return r.vangles?function(n,i,s,h){var f,v;S.angleDelta(s,h)>0?(f=s,v=h):(f=h,v=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(v,r.vangles)[1],l=[c,(f+v)/2,T];return e.pathPolygonAnnulus(n,i,f,v,l,o,a)}:function(n,i,s,h){return S.pathAnnulus(n,i,s,h,o,a)}}}}),jH=He({"src/traces/barpolar/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=f1().getTraceColor,E=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;V.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.subplot,f=h.radialAxis,v=h.angularAxis,c=h.vangles,T=c?t:x.isPtInsideSector,l=o.maxHoverDistance,_=v._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),A=Math.atan2(n,a);f.range[0]>f.range[1]&&(A+=Math.PI);var M=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],c)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(d.getClosest(i,M,o),o.index!==!1){var g=o.index,b=i[g];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var p=x.extendFlat({},b,{r:b.s,theta:b.p});return E(b,s,o),e(p,s,h,o),o.hovertemplate=s.hovertemplate,o.color=S(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),qH=He({"src/traces/barpolar/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:BH(),supplyLayoutDefaults:NH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:UH(),colorbar:pp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:jH(),selectPoints:h1(),meta:{}}}}),VH=He({"lib/barpolar.js"(Z,V){"use strict";V.exports=qH()}}),hk=He({"src/plots/smith/constants.js"(Z,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({ticklen:x.ticklen,tickwidth:E({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),o=E({visible:E({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},t,r);V.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:d.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),GH=He({"src/plots/smith/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=o0(),e=Hh().getSubplotData,t=e0(),r=Qm(),o=z_(),a=wv(),n=pk(),i=hk(),s=i.axisNames,h=v(function(c){return d.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,_){var w=l("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var A=e(_.fullData,i.name,_.id),M=_.layoutOut,g;function b(B,X){return l(g+"."+B,X)}for(var p=0;p<s.length;p++){g=s[p],d.isPlainObject(c[g])||(c[g]={});var u=c[g],y=S.newContainer(T,g);y._id=y._name=g,y._attr=_.id+"."+g,y._traceIndices=A.map(function(B){return B.index});var m=b("visible");if(y.type="linear",a(y,M),t(u,y,b,y.type),m){var R=g==="realaxis";if(R&&b("side"),R)b("tickvals");else{var L=h(T.realaxis.tickvals||n.realaxis.tickvals.dflt);b("tickvals",L)}d.isTypedArray(y.tickvals)&&(y.tickvals=Array.from(y.tickvals));var z,F,N,O,P=_.font||{};m&&(z=b("color"),F=z===u.color?z:P.color,N=P.size,O=P.family),r(u,y,b,y.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!R,noExp:!0,font:{color:F,size:N,family:O}}),d.coerce2(c,T,n,g+".ticklen"),d.coerce2(c,T,n,g+".tickwidth"),d.coerce2(c,T,n,g+".tickcolor",T.color);var U=b("ticks");U||(delete T[g].ticklen,delete T[g].tickwidth,delete T[g].tickcolor),o(u,y,b,{dfltColor:z,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n[g]}),b("layer")}b("hoverformat"),delete y.type,y._input=u}}V.exports=function(T,l,_){E(T,l,_,{noUirevision:!0,type:i.name,attributes:n,handleDefaults:f,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:_,layoutOut:l})};function v(c,T){var l={};return function(_){var w=T?T(_):_;if(w in l)return l[w];var A=c(_);return l[w]=A,A}}}}),HH=He({"src/plots/smith/index.js"(Z,V){"use strict";var d=Hh().getSubplotCalcData,x=sa().counterRegex,S=ok(),E=hk(),e=E.attr,t=E.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(i){for(var s=i._fullLayout,h=i.calcdata,f=s._subplots[t],v=0;v<f.length;v++){var c=f[v],T=d(h,t,c),l=s[c]._subplot;l||(l=S(i,c,!0),s[c]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,f){for(var v=f._subplots[t]||[],c=0;c<v.length;c++){var T=v[c],l=f[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var _ in l.clipPaths)l.clipPaths[_].remove()}}}V.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:pk(),supplyLayoutDefaults:GH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),dk=He({"src/traces/scattersmith/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;V.exports={mode:t.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:x({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:t.hoveron,hovertemplate:d(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),WH=He({"src/traces/scattersmith/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=dk();V.exports=function(s,h,f,v){function c(_,w){return d.coerce(s,h,a,_,w)}var T=n(s,h,v,c);if(!T){h.visible=!1;return}c("mode",T<o?"lines+markers":"lines"),c("text"),c("hovertext"),h.hoveron!=="fills"&&(c("hovertemplate"),c("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,f,v,c,{gradient:!0}),x.hasLines(h)&&(E(s,h,f,v,c,{backoff:!0}),e(s,h,c),c("connectgaps")),x.hasText(h)&&(c("texttemplate"),c("texttemplatefallback"),t(s,h,v,c));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(c("cliponaxis"),c("marker.maxdisplayed"),l.push("points")),c("fill"),h.fill!=="none"&&(r(s,h,f,c),x.hasLines(h)||e(s,h,c)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),c("hoveron",l.join("+")||"points"),d.coerceSelectionMarkerOpacity(h,c)};function n(i,s,h,f){var v=f("real"),c=f("imag"),T;return v&&c&&(T=Math.min(v.length,c.length)),d.isTypedArray(v)&&(s.real=v=Array.from(v)),d.isTypedArray(c)&&(s.imag=c=Array.from(c)),s._length=T,T}}}),XH=He({"src/traces/scattersmith/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.realLabel=d.tickText(r.radialAxis,S.real,!0).text,t.imagLabel=d.tickText(r.angularAxis,S.imag,!0).text,t}}}),ZH=He({"src/traces/scattersmith/calc.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=Fd(),E=Av(),e=Od(),t=Bd().calcMarkerSize;V.exports=function(o,a){for(var n=o._fullLayout,i=a.subplot,s=n[i].realaxis,h=n[i].imaginaryaxis,f=s.makeCalcdata(a,"real"),v=h.makeCalcdata(a,"imag"),c=a._length,T=new Array(c),l=0;l<c;l++){var _=f[l],w=v[l],A=T[l]={};d(_)&&d(w)?(A.real=_,A.imag=w):A.real=x}return t(a,c),S(o,a),E(T,a),e(T,a),T}}}),YH=He({"src/traces/scattersmith/plot.js"(Z,V){"use strict";var d=s1(),x=Ws().BADNUM,S=nk(),E=S.smith;V.exports=function(t,r,o){for(var a=r.layers.frontplot.select("g.scatterlayer"),n=r.xaxis,i=r.yaxis,s={xaxis:n,yaxis:i,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},h=0;h<o.length;h++)for(var f=o[h],v=0;v<f.length;v++){v===0&&(f[0].trace._xA=n,f[0].trace._yA=i);var c=f[v],T=c.real;if(T===x)c.x=c.y=x;else{var l=E([T,c.imag]);c.x=l[0],c.y=l[1]}}d(t,s,o,a)}}}),KH=He({"src/traces/scattersmith/hover.js"(Z,V){"use strict";var d=u1();function x(E,e,t,r){var o=d(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var n=E.subplot,i=a.cd[a.index],s=a.trace;if(n.isPtInside(i))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(i,s,n,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="real",a._hovertitle="imag";var n={};n[e.subplot]={_subplot:t};var i=e._module.formatLabels(E,e,n);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var s=E.hi||e.hoverinfo,h=[];function f(c,T){h.push(c._hovertitle+": "+T)}if(!e.hovertemplate){var v=s.split("+");v.indexOf("all")!==-1&&(v=["real","imag","text"]),v.indexOf("real")!==-1&&f(o,r.realLabel),v.indexOf("imag")!==-1&&f(a,r.imagLabel),v.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}V.exports={hoverPoints:x,makeHoverPointText:S}}}),JH=He({"src/traces/scattersmith/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:HH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:WH(),colorbar:pp(),formatLabels:XH(),calc:ZH(),plot:YH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:KH().hoverPoints,selectPoints:c1(),meta:{}}}}),$H=He({"lib/scattersmith.js"(Z,V){"use strict";V.exports=JH()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,V){var d=ch();function x(){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={}}d(x.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var n=this._localCals[o+"-"+a];if(!n&&this.calendars[o]&&(n=new this.calendars[o](a),this._localCals[o+"-"+a]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return n},newDate:function(o,a,n,i,s){return i=(o!=null&&o.year?o.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(o,a,n)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(n){return o[n]})}},substituteChineseDigits:function(o,a){return function(n){for(var i="",s=0;n>0;){var h=n%10;i=(h===0?"":o[h]+a[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(o[1]+a[1])===0&&(i=i.substr(1)),i||o[0]}}});function S(o,a,n,i){if(this._calendar=o,this._year=a,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}d(S.prototype,{newDate:function(o,a,n){return this._calendar.newDate(o??this,a,n)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,n){if(!this._calendar.isValid(o,a,n))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=n,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(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}d(e.prototype,{_validateLevel:0,newDate:function(o,a,n){return o==null?this.today():(o.year&&(this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),n=o.day(),a=o.month(),o=o.year()),new S(this,o,a,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(o,a){var n=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),n},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(o,a,n){return this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,n){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,n),a,n)},_add:function(o,a,n){if(this._validateLevel++,n==="d"||n==="w"){var i=o.toJD()+a*(n==="w"?this.daysInWeek():1),s=o.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(n==="y"?a:0),f=o.monthOfYear()+(n==="m"?a:0),s=o.day(),v=function(l){for(;f<l.minMonth;)h--,f+=l.monthsInYear(h);for(var _=l.monthsInYear(h);f>_-1+l.minMonth;)h++,f-=_,_=l.monthsInYear(h)};n==="y"?(o.month()!==this.fromMonthOfYear(h,f)&&(f=this.newDate(h,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f)))):n==="m"&&(v(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f))));var c=[h,this.fromMonthOfYear(h,f),s];return this._validateLevel--,c}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],h=n<0?-1:1;a=this._add(o,n*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,n){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=n==="y"?a:o.year(),s=n==="m"?a:o.month(),h=n==="d"?a:o.day();return(n==="y"||n==="m")&&(h=Math.min(h,this.daysInMonth(i,s))),o.date(i,s,h)},isValid:function(o,a,n){this._validateLevel++;var i=this.hasYearZero||o!==0;if(i){var s=this.newDate(o,a,this.minDay);i=a>=this.minMonth&&a-this.minMonth<this.monthsInYear(s)&&n>=this.minDay&&n-this.minDay<this.daysInMonth(s)}return this._validateLevel--,i},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return r.instance().fromJD(this.toJD(i)).toJSDate()},fromJSDate:function(o){return this.fromJD(r.instance().fromJSDate(o).toJD())},_validate:function(o,a,n,i){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,a,n))throw i.replace(/\{0\}/,this.local.name);var s=this.newDate(o,a,n);return this._validateLevel--,s}catch(h){throw this._validateLevel--,h}}});function t(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}t.prototype=new e,d(t.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(n){var a=this._validate(n,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),n=a.year()+(a.year()<0?1:0);return n%4===0&&(n%100!==0||n%400===0)},weekOfYear:function(o,a,n){var i=this.newDate(o,a,n);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===2&&this.leapYear(n.year())?1:0)},weekDay:function(o,a,n){return(this.dayOfWeek(o,a,n)||7)<6},toJD:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);o=i.year(),a=i.month(),n=i.day(),o<0&&o++,a<3&&(a+=12,o--);var s=Math.floor(o/100),h=2-s+Math.floor(s/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(a+1))+n+h-1524.5},fromJD:function(o){var a=Math.floor(o+.5),n=Math.floor((a-186721625e-2)/36524.25);n=a+1+n-Math.floor(n/4);var i=n+1524,s=Math.floor((i-122.1)/365.25),h=Math.floor(365.25*s),f=Math.floor((i-h)/30.6001),v=i-h-Math.floor(f*30.6001),c=f-(f>13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,v)},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=V.exports=new x;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),QH=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),V=Mp();Z(V.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"}),V.local=V.regionalOptions[""],Z(V.cdate.prototype,{formatDate:function(d,x){return typeof d!="string"&&(x=d,d=""),this._calendar.formatDate(d||"",this,x)}}),Z(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*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(d,x,S){if(typeof d!="string"&&(S=x,x=d,d=""),!x)return"";if(x.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;d=d||this.local.dateFormat,S=S||{};for(var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,n=function(A,M){for(var g=1;w+g<d.length&&d.charAt(w+g)===A;)g++;return w+=g-1,Math.floor(g/(M||1))>1},i=function(A,M,g,b){var p=""+M;if(n(A,b))for(;p.length<g;)p="0"+p;return p},s=function(A,M,g,b){return n(A)?b[M]:g[M]},h=this,f=function(A){return typeof t=="function"?t.call(h,A,n("m")):T(i("m",A.month(),2))},v=function(A,M){return M?typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]:typeof r=="function"?r.call(h,A):r[A.month()-h.minMonth]},c=this.local.digits,T=function(A){return S.localNumbers&&c?c(A):A},l="",_=!1,w=0;w<d.length;w++)if(_)d.charAt(w)==="'"&&!n("'")?_=!1:l+=d.charAt(w);else switch(d.charAt(w)){case"d":l+=T(i("d",x.day(),2));break;case"D":l+=s("D",x.dayOfWeek(),E,e);break;case"o":l+=i("o",x.dayOfYear(),3);break;case"w":l+=i("w",x.weekOfYear(),2);break;case"m":l+=f(x);break;case"M":l+=v(x,n("M"));break;case"y":l+=n("y",2)?x.year():(x.year()%100<10?"0":"")+x.year()%100;break;case"Y":n("Y",2),l+=x.formatYear();break;case"J":l+=x.toJD();break;case"@":l+=(x.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":l+=(x.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":n("'")?l+="'":_=!0;break;default:l+=d.charAt(w)}return l},parseDate:function(d,x,S){if(x==null)throw V.local.invalidArguments||V.regionalOptions[""].invalidArguments;if(x=typeof x=="object"?x.toString():x+"",x==="")return null;d=d||this.local.dateFormat,S=S||{};var E=S.shortYearCutoff||this.shortYearCutoff;E=typeof E!="string"?E:this.today().year()%100+parseInt(E,10);for(var e=S.dayNamesShort||this.local.dayNamesShort,t=S.dayNames||this.local.dayNames,r=S.parseMonth||this.local.parseMonth,o=S.monthNumbers||this.local.monthNumbers,a=S.monthNamesShort||this.local.monthNamesShort,n=S.monthNames||this.local.monthNames,i=-1,s=-1,h=-1,f=-1,v=-1,c=!1,T=!1,l=function(R,L){for(var z=1;u+z<d.length&&d.charAt(u+z)===R;)z++;return u+=z-1,Math.floor(z/(L||1))>1},_=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=x.substring(p).match(N);if(!O)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,p);return p+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(w,x.substring(p));return p+=R.length,R}return _("m")},M=function(R,L,z,F){for(var N=l(R,F)?z:L,O=0;O<N.length;O++)if(x.substr(p,N[O].length).toLowerCase()===N[O].toLowerCase())return p+=N[O].length,O+w.minMonth;throw(V.local.unknownNameAt||V.regionalOptions[""].unknownNameAt).replace(/\{0\}/,p)},g=function(){if(typeof n=="function"){var R=l("M")?n.call(w,x.substring(p)):a.call(w,x.substring(p));return p+=R.length,R}return M("M",a,n)},b=function(){if(x.charAt(p)!==d.charAt(u))throw(V.local.unexpectedLiteralAt||V.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,p);p++},p=0,u=0;u<d.length;u++)if(T)d.charAt(u)==="'"&&!l("'")?T=!1:b();else switch(d.charAt(u)){case"d":f=_("d");break;case"D":M("D",e,t);break;case"o":v=_("o");break;case"w":_("w");break;case"m":h=A();break;case"M":h=g();break;case"y":var y=u;c=!l("y",2),u=y,s=_("y",2);break;case"Y":s=_("Y",2);break;case"J":i=_("J")+.5,x.charAt(p)==="."&&(p++,_("J"));break;case"@":i=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":i=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":p=x.length;break;case"'":l("'")?b():T=!0;break;default:b()}if(p<x.length)throw V.local.unexpectedText||V.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&c&&(s+=E===-1?1900:this.today().year()-this.today().year()%100-(s<=E?0:100)),typeof h=="string"&&(h=r.call(this,s,h)),v>-1){h=1,f=v;for(var m=this.daysInMonth(s,h);f>m;m=this.daysInMonth(s,h))h++,f-=m}return i>-1?this.fromJD(i):this.newDate(s,h,f)},determineDate:function(d,x,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(o);i;)a.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(o);return a};return x=x?x.newDate():null,d=d==null?x:typeof d=="string"?r(d):typeof d=="number"?isNaN(d)||d===1/0||d===-1/0?x:t.today().add(d,"d"):t.newDate(d),d}})}}),eW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var h=i.match(E);return h?h[0]:""}var f=this._validateYear(i),v=i.month(),c=""+this.toChineseMonth(f,v);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,v)&&(c+="i"),c},monthNames:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var h=this._validateYear(i),f=i.month(),v=this.toChineseMonth(h,f),c=["\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"][v-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var h=this._validateYear(i),f=i.month(),v=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][v-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(i,s){i=this._validateYear(i);var h=parseInt(s),f;if(isNaN(h))s[0]==="\u95F0"&&(f=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),h=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var v=s[s.length-1];f=v==="i"||v==="I"}var c=this.toMonthIndex(i,h,f);return c},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(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,h){var f=this.intercalaryMonth(i),v=h&&s!==f;if(v||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c;return f?!h&&s<=f?c=s-1:c=s:c=s-1,c},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return h?s<h?v=s+1:v=s:v=s+1,v},intercalaryMonth:function(i){i=this._validateYear(i);var s=r[i-r[0]],h=s>>13;return h},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i);return!!h&&h===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,h){var f=this._validateYear(i,Z.local.invalidyear),v=o[f-o[0]],c=v>>9&4095,T=v>>5&15,l=v&31,_;_=d.newDate(c,T,l),_.add(4-(_.dayOfWeek()||7),"d");var w=this.toJD(i,s,h)-_.toJD();return 1+Math.floor(w/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var h=r[i-r[0]],f=h>>13,v=f?12:11;if(s>v)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(i,s,h){return(this.dayOfWeek(i,s,h)||7)<6},toJD:function(i,s,h){var f=this._validate(i,c,h,Z.local.invalidDate);i=this._validateYear(f.year()),s=f.month(),h=f.day();var v=this.isIntercalaryMonth(i,s),c=this.toChineseMonth(i,s),T=n(i,c,h,v);return d.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=d.fromJD(i),h=a(s.year(),s.month(),s.day()),f=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,f,h.day)},fromString:function(i){var s=i.match(S),h=this._validateYear(+s[1]),f=+s[2],v=!!s[3],c=this.toMonthIndex(h,f,v),T=+s[4];return this.newDate(h,c,T)},add:function(i,s,h){var f=i.year(),v=i.month(),c=this.isIntercalaryMonth(f,v),T=this.toChineseMonth(f,v),l=Object.getPrototypeOf(x.prototype).add.call(this,i,s,h);if(h==="y"){var _=l.year(),w=l.month(),A=this.isIntercalaryMonth(_,T),M=c&&A?this.toMonthIndex(_,T,!0):this.toMonthIndex(_,T,!1);M!==w&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=x;var r=[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],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(i,s,h,f){var v,c;if(typeof i=="object")v=i,c=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var _=typeof h=="number"&&h>=1&&h<=31;if(!_)throw new Error("Solar day outside range 1 - 31");v={year:i,month:s,day:h},c=f||{}}var w=o[v.year-o[0]],A=v.year<<9|v.month<<5|v.day;c.year=A>=w?v.year:v.year-1,w=o[c.year-o[0]];var M=w>>9&4095,g=w>>5&15,b=w&31,p,u=new Date(M,g-1,b),y=new Date(v.year,v.month-1,v.day);p=Math.round((y-u)/(24*3600*1e3));var m=r[c.year-r[0]],R;for(R=0;R<13;R++){var L=m&1<<12-R?30:29;if(p<L)break;p-=L}var z=m>>13;return!z||R<z?(c.isIntercalary=!1,c.month=1+R):R===z?(c.isIntercalary=!0,c.month=R):(c.isIntercalary=!1,c.month=R),c.day=1+p,c}function n(i,s,h,f,v){var c,T;if(typeof i=="object")T=i,c=s||{};else{var l=typeof i=="number"&&i>=1888&&i<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var _=typeof s=="number"&&s>=1&&s<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof f=="object"?(A=!1,c=f):(A=!!f,c=v||{}),T={year:i,month:s,day:h,isIntercalary:A}}var M;M=T.day-1;var g=r[T.year-r[0]],b=g>>13,p;b&&(T.month>b||T.isIntercalary)?p=T.month:p=T.month-1;for(var u=0;u<p;u++){var y=g&1<<12-u?30:29;M+=y}var m=o[T.year-o[0]],R=m>>9&4095,L=m>>5&15,z=m&31,F=new Date(R,L-1,z+M);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),tW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.coptic=d}}),rW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{century:x[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var x={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=d}}),aW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.ethiopian=d}}),iW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,x(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Z.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&x(this.daysInYear(S),10)===5?30:E===9&&x(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a<E;a++)o+=this.daysInMonth(S,a)}else for(var a=7;a<E;a++)o+=this.daysInMonth(S,a);return o},_delay1:function(S){var E=Math.floor((235*S-234)/19),e=12084+13753*E,t=E*29+Math.floor(e/25920);return x(3*(t+1),7)<3&&t++,t},_delay2:function(S){var E=this._delay1(S-1),e=this._delay1(S),t=this._delay1(S+1);return t-e===356?2:e-E===382?1:0},fromJD:function(S){S=Math.floor(S)+.5;for(var E=Math.floor((S-this.jdEpoch)*98496/35975351)-1;S>=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=S<this.toJD(E,1,1)?7:1;S>this.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function x(S,E){return S-E*Math.floor(S/E)}Z.calendars.hebrew=d}}),nW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==5},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x=x<=0?x+1:x,E+Math.ceil(29.5*(S-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var S=Math.floor((30*(x-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((x-29-this.toJD(S,1,1))/29.5)+1),e=x-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Z.calendars.islamic=d}}),oW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x<0&&x++,S<=2&&(x--,S+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(x){var S=Math.floor(x+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),n=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,n)}}),Z.calendars.julian=d}}),sW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),V=ch();function d(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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,Z.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t<E.length;t++){var r=parseInt(E[t],10);if(Math.abs(r)>19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),n=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=x(E+8+17*20,365);return[Math.floor(e/20)+1,x(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function x(E,e){return E-e*Math.floor(E/e)}function S(E,e){return x(E-1,e)+1}Z.calendars.mayan=d}}),lW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");V(d.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(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return x.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a<t.month();a++)o+=this.daysPerMonth[a-1];return o+x.toJD(r+1468,3,13)},fromJD:function(S){S=Math.floor(S+.5);for(var E=Math.floor((S-(this.jdEpoch-1))/366);S>=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Z.calendars.nanakshahi=d}}),uW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);if(x=S.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[x][e];return E},daysInMonth:function(x,S){return x.year&&(S=x.month(),x=x.year()),this._validate(x,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[x][S]},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);x=e.year(),S=e.month(),E=e.day();var t=Z.instance(),r=0,o=S,a=x;this._createMissingCalendarData(x);var n=x-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(n))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(n,1,1).add(r,"d").toJD()},fromJD:function(x){var S=Z.instance(),E=S.fromJD(x),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],n=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>n;)o++,o>12&&(o=1,r++),n+=this.NEPALI_CALENDAR_DATA[r][o];var i=this.NEPALI_CALENDAR_DATA[r][o]-(n-t);return this.newDate(r,o,i)},_createMissingCalendarData:function(x){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=x-1;E<x+2;E++)typeof this.NEPALI_CALENDAR_DATA[E]>"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Z.calendars.nepali=d}}),cW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function x(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}d.prototype=new Z.baseCalendar,V(d.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(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return x(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o<S;o++)x(o)&&r++;else if(S<0)for(var o=S;o<0;o++)x(o)&&r--;return e+(E<=7?(E-1)*31:(E-1)*30+6)+(S>0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,x(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=d,Z.calendars.jalali=d}}),fW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.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(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return d.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(S){var E=d.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=x}}),hW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.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(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return d.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(S){var E=d.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=x}}),pW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.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(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<x.length;o++){if(x[o]>t)return x[r]-x[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+x[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;t<x.length&&!(x[t]>E);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,n=r-12*o,i=E-x[e-1]+1;return this.newDate(a,n,i)},isValid:function(S,E,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Z.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Z.calendars.ummalqura=d;var x=[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]}}),dW=He({"src/components/calendars/calendars.js"(Z,V){"use strict";V.exports=Mp(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW()}}),vW=He({"src/components/calendars/index.js"(Z,V){"use strict";var d=dW(),x=sa(),S=Ws(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(d.calendars),editType:"calc",dflt:"gregorian"},r=function(g,b,p,u){var y={};return y[p]=t,x.coerce(g,b,y,p,u)},o=function(g,b,p,u){for(var y=0;y<p.length;y++)r(g,b,p[y]+"calendar",u.calendar)},a={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},n={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},i={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},s="##",h={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:s,w:s,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function f(g,b,p){for(var u=Math.floor((b+.05)/e)+E,y=c(p).fromJD(u),m=0,R,L,z,F,N;(m=g.indexOf("%",m))!==-1;)R=g.charAt(m+1),R==="0"||R==="-"||R==="_"?(z=3,L=g.charAt(m+2),R==="_"&&(R="-")):(L=R,R="0",z=2),F=h[L],F?(F===s?N=s:N=y.formatDate(F[R]),g=g.slice(0,m)+N+g.slice(m+z),m+=N.length):m+=z;return g}var v={};function c(g){var b=v[g];return b||(b=v[g]=d.instance(g),b)}function T(g){return x.extendFlat({},t,{description:g})}function l(g){return"Sets the calendar system to use with `"+g+"` date data."}var _={xcalendar:T(l("x"))},w=x.extendFlat({},_,{ycalendar:T(l("y"))}),A=x.extendFlat({},w,{zcalendar:T(l("z"))}),M=T(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));V.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:w,bar:w,box:w,heatmap:w,contour:w,histogram:w,histogram2d:w,histogram2dcontour:w,scatter3d:A,surface:A,mesh3d:A,scattergl:w,ohlc:_,candlestick:_},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:M},yaxis:{calendar:M},scene:{xaxis:{calendar:M},yaxis:{calendar:M},zaxis:{calendar:M}},polar:{radialaxis:{calendar:M}}}},layoutAttributes:t,handleDefaults:r,handleTraceDefaults:o,CANONICAL_SUNDAY:n,CANONICAL_TICK:a,DFLTRANGE:i,getCal:c,worldCalFmt:f}}}),mW=He({"lib/calendars.js"(Z,V){"use strict";V.exports=vW()}}),gW=He({"lib/index.js"(Z,V){var d=X9();d.register([J9(),eF(),iF(),uF(),pF(),gF(),xF(),PF(),UF(),JF(),sO(),EB(),RB(),_N(),kN(),FN(),VN(),oU(),cU(),hU(),mU(),bU(),MU(),LU(),WU(),YU(),Iq(),Xq(),oV(),hV(),wV(),MV(),DV(),XV(),JV(),nG(),xG(),MG(),RG(),rH(),cH(),vH(),xH(),AH(),CH(),OH(),VH(),$H(),mW()]),V.exports=d}});return gW()})();return window.Plotly=fe,fe})});var fX=typeof global=="object"&&global&&global.Object===Object&&global,xb=fX;var hX=typeof self=="object"&&self&&self.Object===Object&&self,pX=xb||hX||Function("return this")(),wu=pX;var dX=wu.Symbol,If=dX;var Xk=Object.prototype,vX=Xk.hasOwnProperty,mX=Xk.toString,a_=If?If.toStringTag:void 0;function gX(fe){var _e=vX.call(fe,a_),Xe=fe[a_];try{fe[a_]=void 0;var Lt=!0}catch{}var gr=mX.call(fe);return Lt&&(_e?fe[a_]=Xe:delete fe[a_]),gr}var Zk=gX;var yX=Object.prototype,_X=yX.toString;function xX(fe){return _X.call(fe)}var Yk=xX;var bX="[object Null]",wX="[object Undefined]",Kk=If?If.toStringTag:void 0;function TX(fe){return fe==null?fe===void 0?wX:bX:Kk&&Kk in Object(fe)?Zk(fe):Yk(fe)}var Oc=TX;function AX(fe){return fe!=null&&typeof fe=="object"}var Dl=AX;var SX="[object Symbol]";function MX(fe){return typeof fe=="symbol"||Dl(fe)&&Oc(fe)==SX}var Rf=MX;var EX=NaN;function kX(fe){return typeof fe=="number"?fe:Rf(fe)?EX:+fe}var wA=kX;function CX(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length,gr=Array(Lt);++Xe<Lt;)gr[Xe]=_e(fe[Xe],Xe,fe);return gr}var Ml=CX;var LX=Array.isArray,Do=LX;var PX=1/0,Jk=If?If.prototype:void 0,$k=Jk?Jk.toString:void 0;function Qk(fe){if(typeof fe=="string")return fe;if(Do(fe))return Ml(fe,Qk)+"";if(Rf(fe))return $k?$k.call(fe):"";var _e=fe+"";return _e=="0"&&1/fe==-PX?"-0":_e}var nh=Qk;function IX(fe,_e){return function(Xe,Lt){var gr;if(Xe===void 0&&Lt===void 0)return _e;if(Xe!==void 0&&(gr=Xe),Lt!==void 0){if(gr===void 0)return Lt;typeof Xe=="string"||typeof Lt=="string"?(Xe=nh(Xe),Lt=nh(Lt)):(Xe=wA(Xe),Lt=wA(Lt)),gr=fe(Xe,Lt)}return gr}}var wm=IX;var RX=wm(function(fe,_e){return fe+_e},0),eC=RX;var DX=/\s/;function zX(fe){for(var _e=fe.length;_e--&&DX.test(fe.charAt(_e)););return _e}var bb=zX;var FX=/^\s+/;function OX(fe){return fe&&fe.slice(0,bb(fe)+1).replace(FX,"")}var wb=OX;function BX(fe){var _e=typeof fe;return fe!=null&&(_e=="object"||_e=="function")}var Ll=BX;var tC=NaN,NX=/^[-+]0x[0-9a-f]+$/i,UX=/^0b[01]+$/i,jX=/^0o[0-7]+$/i,qX=parseInt;function VX(fe){if(typeof fe=="number")return fe;if(Rf(fe))return tC;if(Ll(fe)){var _e=typeof fe.valueOf=="function"?fe.valueOf():fe;fe=Ll(_e)?_e+"":_e}if(typeof fe!="string")return fe===0?fe:+fe;fe=wb(fe);var Xe=UX.test(fe);return Xe||jX.test(fe)?qX(fe.slice(2),Xe?2:8):NX.test(fe)?tC:+fe}var Sh=VX;var rC=1/0,GX=17976931348623157e292;function HX(fe){if(!fe)return fe===0?fe:0;if(fe=Sh(fe),fe===rC||fe===-rC){var _e=fe<0?-1:1;return _e*GX}return fe===fe?fe:0}var od=HX;function WX(fe){var _e=od(fe),Xe=_e%1;return _e===_e?Xe?_e-Xe:_e:0}var qo=WX;var XX="Expected a function";function ZX(fe,_e){if(typeof _e!="function")throw new TypeError(XX);return fe=qo(fe),function(){if(--fe<1)return _e.apply(this,arguments)}}var aC=ZX;function YX(fe){return fe}var Bc=YX;var KX="[object AsyncFunction]",JX="[object Function]",$X="[object GeneratorFunction]",QX="[object Proxy]";function eZ(fe){if(!Ll(fe))return!1;var _e=Oc(fe);return _e==JX||_e==$X||_e==KX||_e==QX}var ap=eZ;var tZ=wu["__core-js_shared__"],Zg=tZ;var iC=function(){var fe=/[^.]+$/.exec(Zg&&Zg.keys&&Zg.keys.IE_PROTO||"");return fe?"Symbol(src)_1."+fe:""}();function rZ(fe){return!!iC&&iC in fe}var nC=rZ;var aZ=Function.prototype,iZ=aZ.toString;function nZ(fe){if(fe!=null){try{return iZ.call(fe)}catch{}try{return fe+""}catch{}}return""}var jv=nZ;var oZ=/[\\^$.*+?()[\]{}|]/g,sZ=/^\[object .+?Constructor\]$/,lZ=Function.prototype,uZ=Object.prototype,cZ=lZ.toString,fZ=uZ.hasOwnProperty,hZ=RegExp("^"+cZ.call(fZ).replace(oZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pZ(fe){if(!Ll(fe)||nC(fe))return!1;var _e=ap(fe)?hZ:sZ;return _e.test(jv(fe))}var Tb=pZ;function dZ(fe,_e){return fe?.[_e]}var oC=dZ;function vZ(fe,_e){var Xe=oC(fe,_e);return Tb(Xe)?Xe:void 0}var sd=vZ;var mZ=sd(wu,"WeakMap"),q0=mZ;var gZ=q0&&new q0,Yg=gZ;var yZ=Yg?function(fe,_e){return Yg.set(fe,_e),fe}:Bc,Ab=yZ;var sC=Object.create,_Z=function(){function fe(){}return function(_e){if(!Ll(_e))return{};if(sC)return sC(_e);fe.prototype=_e;var Xe=new fe;return fe.prototype=void 0,Xe}}(),Td=_Z;function xZ(fe){return function(){var _e=arguments;switch(_e.length){case 0:return new fe;case 1:return new fe(_e[0]);case 2:return new fe(_e[0],_e[1]);case 3:return new fe(_e[0],_e[1],_e[2]);case 4:return new fe(_e[0],_e[1],_e[2],_e[3]);case 5:return new fe(_e[0],_e[1],_e[2],_e[3],_e[4]);case 6:return new fe(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5]);case 7:return new fe(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5],_e[6])}var Xe=Td(fe.prototype),Lt=fe.apply(Xe,_e);return Ll(Lt)?Lt:Xe}}var qv=xZ;var bZ=1;function wZ(fe,_e,Xe){var Lt=_e&bZ,gr=qv(fe);function Yr(){var Ea=this&&this!==wu&&this instanceof Yr?gr:fe;return Ea.apply(Lt?Xe:this,arguments)}return Yr}var lC=wZ;function TZ(fe,_e,Xe){switch(Xe.length){case 0:return fe.call(_e);case 1:return fe.call(_e,Xe[0]);case 2:return fe.call(_e,Xe[0],Xe[1]);case 3:return fe.call(_e,Xe[0],Xe[1],Xe[2])}return fe.apply(_e,Xe)}var xf=TZ;var AZ=Math.max;function SZ(fe,_e,Xe,Lt){for(var gr=-1,Yr=fe.length,Ea=Xe.length,ei=-1,oi=_e.length,Cn=AZ(Yr-Ea,0),xn=Array(oi+Cn),Fn=!Lt;++ei<oi;)xn[ei]=_e[ei];for(;++gr<Ea;)(Fn||gr<Yr)&&(xn[Xe[gr]]=fe[gr]);for(;Cn--;)xn[ei++]=fe[gr++];return xn}var Sb=SZ;var MZ=Math.max;function EZ(fe,_e,Xe,Lt){for(var gr=-1,Yr=fe.length,Ea=-1,ei=Xe.length,oi=-1,Cn=_e.length,xn=MZ(Yr-ei,0),Fn=Array(xn+Cn),To=!Lt;++gr<xn;)Fn[gr]=fe[gr];for(var ps=gr;++oi<Cn;)Fn[ps+oi]=_e[oi];for(;++Ea<ei;)(To||gr<Yr)&&(Fn[ps+Xe[Ea]]=fe[gr++]);return Fn}var Mb=EZ;function kZ(fe,_e){for(var Xe=fe.length,Lt=0;Xe--;)fe[Xe]===_e&&++Lt;return Lt}var uC=kZ;function CZ(){}var Tm=CZ;var LZ=4294967295;function Eb(fe){this.__wrapped__=fe,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=LZ,this.__views__=[]}Eb.prototype=Td(Tm.prototype);Eb.prototype.constructor=Eb;var Bl=Eb;function PZ(){}var Kg=PZ;var IZ=Yg?function(fe){return Yg.get(fe)}:Kg,Jg=IZ;var RZ={},Am=RZ;var DZ=Object.prototype,zZ=DZ.hasOwnProperty;function FZ(fe){for(var _e=fe.name+"",Xe=Am[_e],Lt=zZ.call(Am,_e)?Xe.length:0;Lt--;){var gr=Xe[Lt],Yr=gr.func;if(Yr==null||Yr==fe)return gr.name}return _e}var $g=FZ;function kb(fe,_e){this.__wrapped__=fe,this.__actions__=[],this.__chain__=!!_e,this.__index__=0,this.__values__=void 0}kb.prototype=Td(Tm.prototype);kb.prototype.constructor=kb;var zp=kb;function OZ(fe,_e){var Xe=-1,Lt=fe.length;for(_e||(_e=Array(Lt));++Xe<Lt;)_e[Xe]=fe[Xe];return _e}var pf=OZ;function BZ(fe){if(fe instanceof Bl)return fe.clone();var _e=new zp(fe.__wrapped__,fe.__chain__);return _e.__actions__=pf(fe.__actions__),_e.__index__=fe.__index__,_e.__values__=fe.__values__,_e}var Cb=BZ;var NZ=Object.prototype,UZ=NZ.hasOwnProperty;function Lb(fe){if(Dl(fe)&&!Do(fe)&&!(fe instanceof Bl)){if(fe instanceof zp)return fe;if(UZ.call(fe,"__wrapped__"))return Cb(fe)}return new zp(fe)}Lb.prototype=Tm.prototype;Lb.prototype.constructor=Lb;var da=Lb;function jZ(fe){var _e=$g(fe),Xe=da[_e];if(typeof Xe!="function"||!(_e in Bl.prototype))return!1;if(fe===Xe)return!0;var Lt=Jg(Xe);return!!Lt&&fe===Lt[0]}var i_=jZ;var qZ=800,VZ=16,GZ=Date.now;function HZ(fe){var _e=0,Xe=0;return function(){var Lt=GZ(),gr=VZ-(Lt-Xe);if(Xe=Lt,gr>0){if(++_e>=qZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=HZ;var WZ=Pb(Ab),Ib=WZ;var XZ=/\{\n\/\* \[wrapped with (.+)\] \*/,ZZ=/,? & /;function YZ(fe){var _e=fe.match(XZ);return _e?_e[1].split(ZZ):[]}var cC=YZ;var KZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function JZ(fe,_e){var Xe=_e.length;if(!Xe)return fe;var Lt=Xe-1;return _e[Lt]=(Xe>1?"& ":"")+_e[Lt],_e=_e.join(Xe>2?", ":" "),fe.replace(KZ,`{
/* [wrapped with `+_e+`] */
`)}var fC=JZ;function $Z(fe){return function(){return fe}}var Qg=$Z;var QZ=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=QZ;var eY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=eY;var tY=Pb(hC),ty=tY;function rY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe<Lt&&_e(fe[Xe],Xe,fe)!==!1;);return fe}var Nh=rY;function aY(fe,_e,Xe,Lt){for(var gr=fe.length,Yr=Xe+(Lt?1:-1);Lt?Yr--:++Yr<gr;)if(_e(fe[Yr],Yr,fe))return Yr;return-1}var Sm=aY;function iY(fe){return fe!==fe}var Rb=iY;function nY(fe,_e,Xe){for(var Lt=Xe-1,gr=fe.length;++Lt<gr;)if(fe[Lt]===_e)return Lt;return-1}var pC=nY;function oY(fe,_e,Xe){return _e===_e?pC(fe,_e,Xe):Sm(fe,Rb,Xe)}var Ad=oY;function sY(fe,_e){var Xe=fe==null?0:fe.length;return!!Xe&&Ad(fe,_e,0)>-1}var Mm=sY;var lY=1,uY=2,cY=8,fY=16,hY=32,pY=64,dY=128,vY=256,mY=512,gY=[["ary",dY],["bind",lY],["bindKey",uY],["curry",cY],["curryRight",fY],["flip",mY],["partial",hY],["partialRight",pY],["rearg",vY]];function yY(fe,_e){return Nh(gY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Mm(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=yY;function _Y(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=_Y;var xY=1,bY=2,wY=4,TY=8,vC=32,mC=64;function AY(fe,_e,Xe,Lt,gr,Yr,Ea,ei,oi,Cn){var xn=_e&TY,Fn=xn?Ea:void 0,To=xn?void 0:Ea,ps=xn?Yr:void 0,Qs=xn?void 0:Yr;_e|=xn?vC:mC,_e&=~(xn?mC:vC),_e&wY||(_e&=~(xY|bY));var Go=[fe,_e,gr,ps,Fn,Qs,To,ei,oi,Cn],He=Xe.apply(void 0,Go);return i_(fe)&&Ib(He,Go),He.placeholder=Lt,Db(He,fe,_e)}var zb=AY;function SY(fe){var _e=fe;return _e.placeholder}var Sd=SY;var MY=9007199254740991,EY=/^(?:0|[1-9]\d*)$/;function kY(fe,_e){var Xe=typeof fe;return _e=_e??MY,!!_e&&(Xe=="number"||Xe!="symbol"&&EY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var ip=kY;var CY=Math.min;function LY(fe,_e){for(var Xe=fe.length,Lt=CY(_e.length,Xe),gr=pf(fe);Lt--;){var Yr=_e[Lt];fe[Lt]=ip(Yr,Xe)?gr[Yr]:void 0}return fe}var gC=LY;var yC="__lodash_placeholder__";function PY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Yr=[];++Xe<Lt;){var Ea=fe[Xe];(Ea===_e||Ea===yC)&&(fe[Xe]=yC,Yr[gr++]=Xe)}return Yr}var Yp=PY;var IY=1,RY=2,DY=8,zY=16,FY=128,OY=512;function _C(fe,_e,Xe,Lt,gr,Yr,Ea,ei,oi,Cn){var xn=_e&FY,Fn=_e&IY,To=_e&RY,ps=_e&(DY|zY),Qs=_e&OY,Go=To?void 0:qv(fe);function He(){for(var Kl=arguments.length,nu=Array(Kl),jp=Kl;jp--;)nu[jp]=arguments[jp];if(ps)var zf=Sd(He),fp=uC(nu,zf);if(Lt&&(nu=Sb(nu,Lt,gr,ps)),Yr&&(nu=Mb(nu,Yr,Ea,ps)),Kl-=fp,ps&&Kl<Cn){var Ff=Yp(nu,zf);return zb(fe,_e,_C,He.placeholder,Xe,nu,Ff,ei,oi,Cn-Kl)}var Wn=Fn?Xe:this,dd=To?Wn[fe]:fe;return Kl=nu.length,ei?nu=gC(nu,ei):Qs&&Kl>1&&nu.reverse(),xn&&oi<Kl&&(nu.length=oi),this&&this!==wu&&this instanceof He&&(dd=Go||qv(dd)),dd.apply(Wn,nu)}return He}var ry=_C;function BY(fe,_e,Xe){var Lt=qv(fe);function gr(){for(var Yr=arguments.length,Ea=Array(Yr),ei=Yr,oi=Sd(gr);ei--;)Ea[ei]=arguments[ei];var Cn=Yr<3&&Ea[0]!==oi&&Ea[Yr-1]!==oi?[]:Yp(Ea,oi);if(Yr-=Cn.length,Yr<Xe)return zb(fe,_e,ry,gr.placeholder,void 0,Ea,Cn,void 0,void 0,Xe-Yr);var xn=this&&this!==wu&&this instanceof gr?Lt:fe;return xf(xn,this,Ea)}return gr}var xC=BY;var NY=1;function UY(fe,_e,Xe,Lt){var gr=_e&NY,Yr=qv(fe);function Ea(){for(var ei=-1,oi=arguments.length,Cn=-1,xn=Lt.length,Fn=Array(xn+oi),To=this&&this!==wu&&this instanceof Ea?Yr:fe;++Cn<xn;)Fn[Cn]=Lt[Cn];for(;oi--;)Fn[Cn++]=arguments[++ei];return xf(To,gr?Xe:this,Fn)}return Ea}var bC=UY;var wC="__lodash_placeholder__",TA=1,jY=2,qY=4,TC=8,n_=128,AC=256,VY=Math.min;function GY(fe,_e){var Xe=fe[1],Lt=_e[1],gr=Xe|Lt,Yr=gr<(TA|jY|n_),Ea=Lt==n_&&Xe==TC||Lt==n_&&Xe==AC&&fe[7].length<=_e[8]||Lt==(n_|AC)&&_e[7].length<=_e[8]&&Xe==TC;if(!(Yr||Ea))return fe;Lt&TA&&(fe[2]=_e[2],gr|=Xe&TA?0:qY);var ei=_e[3];if(ei){var oi=fe[3];fe[3]=oi?Sb(oi,ei,_e[4]):ei,fe[4]=oi?Yp(fe[3],wC):_e[4]}return ei=_e[5],ei&&(oi=fe[5],fe[5]=oi?Mb(oi,ei,_e[6]):ei,fe[6]=oi?Yp(fe[5],wC):_e[6]),ei=_e[7],ei&&(fe[7]=ei),Lt&n_&&(fe[8]=fe[8]==null?_e[8]:VY(fe[8],_e[8])),fe[9]==null&&(fe[9]=_e[9]),fe[0]=_e[0],fe[1]=gr,fe}var SC=GY;var HY="Expected a function",MC=1,WY=2,AA=8,SA=16,MA=32,EC=64,kC=Math.max;function XY(fe,_e,Xe,Lt,gr,Yr,Ea,ei){var oi=_e&WY;if(!oi&&typeof fe!="function")throw new TypeError(HY);var Cn=Lt?Lt.length:0;if(Cn||(_e&=~(MA|EC),Lt=gr=void 0),Ea=Ea===void 0?Ea:kC(qo(Ea),0),ei=ei===void 0?ei:qo(ei),Cn-=gr?gr.length:0,_e&EC){var xn=Lt,Fn=gr;Lt=gr=void 0}var To=oi?void 0:Jg(fe),ps=[fe,_e,Xe,Lt,gr,xn,Fn,Yr,Ea,ei];if(To&&SC(ps,To),fe=ps[0],_e=ps[1],Xe=ps[2],Lt=ps[3],gr=ps[4],ei=ps[9]=ps[9]===void 0?oi?0:fe.length:kC(ps[9]-Cn,0),!ei&&_e&(AA|SA)&&(_e&=~(AA|SA)),!_e||_e==MC)var Qs=lC(fe,_e,Xe);else _e==AA||_e==SA?Qs=xC(fe,_e,ei):(_e==MA||_e==(MC|MA))&&!gr.length?Qs=bC(fe,_e,Xe,Lt):Qs=ry.apply(void 0,ps);var Go=To?Ab:Ib;return Db(Go(Qs,ps),fe,_e)}var np=XY;var ZY=128;function YY(fe,_e,Xe){return _e=Xe?void 0:_e,_e=fe&&_e==null?fe.length:_e,np(fe,ZY,void 0,void 0,void 0,void 0,_e)}var Fb=YY;function KY(fe,_e,Xe){_e=="__proto__"&&ey?ey(fe,_e,{configurable:!0,enumerable:!0,value:Xe,writable:!0}):fe[_e]=Xe}var op=KY;function JY(fe,_e){return fe===_e||fe!==fe&&_e!==_e}var oh=JY;var $Y=Object.prototype,QY=$Y.hasOwnProperty;function eK(fe,_e,Xe){var Lt=fe[_e];(!(QY.call(fe,_e)&&oh(Lt,Xe))||Xe===void 0&&!(_e in fe))&&op(fe,_e,Xe)}var vv=eK;function tK(fe,_e,Xe,Lt){var gr=!Xe;Xe||(Xe={});for(var Yr=-1,Ea=_e.length;++Yr<Ea;){var ei=_e[Yr],oi=Lt?Lt(Xe[ei],fe[ei],ei,Xe,fe):void 0;oi===void 0&&(oi=fe[ei]),gr?op(Xe,ei,oi):vv(Xe,ei,oi)}return Xe}var Mh=tK;var CC=Math.max;function rK(fe,_e,Xe){return _e=CC(_e===void 0?fe.length-1:_e,0),function(){for(var Lt=arguments,gr=-1,Yr=CC(Lt.length-_e,0),Ea=Array(Yr);++gr<Yr;)Ea[gr]=Lt[_e+gr];gr=-1;for(var ei=Array(_e+1);++gr<_e;)ei[gr]=Lt[gr];return ei[_e]=Xe(Ea),xf(fe,this,ei)}}var Ob=rK;function aK(fe,_e){return ty(Ob(fe,_e,Bc),fe+"")}var Vo=aK;var iK=9007199254740991;function nK(fe){return typeof fe=="number"&&fe>-1&&fe%1==0&&fe<=iK}var Em=nK;function oK(fe){return fe!=null&&Em(fe.length)&&!ap(fe)}var Vc=oK;function sK(fe,_e,Xe){if(!Ll(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&ip(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=sK;function lK(fe){return Vo(function(_e,Xe){var Lt=-1,gr=Xe.length,Yr=gr>1?Xe[gr-1]:void 0,Ea=gr>2?Xe[2]:void 0;for(Yr=fe.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Xe[0],Xe[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),_e=Object(_e);++Lt<gr;){var ei=Xe[Lt];ei&&fe(_e,ei,Lt,Yr)}return _e})}var Md=lK;var uK=Object.prototype;function cK(fe){var _e=fe&&fe.constructor,Xe=typeof _e=="function"&&_e.prototype||uK;return fe===Xe}var mv=cK;function fK(fe,_e){for(var Xe=-1,Lt=Array(fe);++Xe<fe;)Lt[Xe]=_e(Xe);return Lt}var ay=fK;var hK="[object Arguments]";function pK(fe){return Dl(fe)&&Oc(fe)==hK}var EA=pK;var LC=Object.prototype,dK=LC.hasOwnProperty,vK=LC.propertyIsEnumerable,mK=EA(function(){return arguments}())?EA:function(fe){return Dl(fe)&&dK.call(fe,"callee")&&!vK.call(fe,"callee")},pd=mK;function gK(){return!1}var iy=gK;var RC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,PC=RC&&typeof module=="object"&&module&&!module.nodeType&&module,yK=PC&&PC.exports===RC,IC=yK?wu.Buffer:void 0,_K=IC?IC.isBuffer:void 0,xK=_K||iy,Kp=xK;var bK="[object Arguments]",wK="[object Array]",TK="[object Boolean]",AK="[object Date]",SK="[object Error]",MK="[object Function]",EK="[object Map]",kK="[object Number]",CK="[object Object]",LK="[object RegExp]",PK="[object Set]",IK="[object String]",RK="[object WeakMap]",DK="[object ArrayBuffer]",zK="[object DataView]",FK="[object Float32Array]",OK="[object Float64Array]",BK="[object Int8Array]",NK="[object Int16Array]",UK="[object Int32Array]",jK="[object Uint8Array]",qK="[object Uint8ClampedArray]",VK="[object Uint16Array]",GK="[object Uint32Array]",bf={};bf[FK]=bf[OK]=bf[BK]=bf[NK]=bf[UK]=bf[jK]=bf[qK]=bf[VK]=bf[GK]=!0;bf[bK]=bf[wK]=bf[DK]=bf[TK]=bf[zK]=bf[AK]=bf[SK]=bf[MK]=bf[EK]=bf[kK]=bf[CK]=bf[LK]=bf[PK]=bf[IK]=bf[RK]=!1;function HK(fe){return Dl(fe)&&Em(fe.length)&&!!bf[Oc(fe)]}var DC=HK;function WK(fe){return function(_e){return fe(_e)}}var wf=WK;var zC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o_=zC&&typeof module=="object"&&module&&!module.nodeType&&module,XK=o_&&o_.exports===zC,kA=XK&&xb.process,ZK=function(){try{var fe=o_&&o_.require&&o_.require("util").types;return fe||kA&&kA.binding&&kA.binding("util")}catch{}}(),sp=ZK;var FC=sp&&sp.isTypedArray,YK=FC?wf(FC):DC,Ed=YK;var KK=Object.prototype,JK=KK.hasOwnProperty;function $K(fe,_e){var Xe=Do(fe),Lt=!Xe&&pd(fe),gr=!Xe&&!Lt&&Kp(fe),Yr=!Xe&&!Lt&&!gr&&Ed(fe),Ea=Xe||Lt||gr||Yr,ei=Ea?ay(fe.length,String):[],oi=ei.length;for(var Cn in fe)(_e||JK.call(fe,Cn))&&!(Ea&&(Cn=="length"||gr&&(Cn=="offset"||Cn=="parent")||Yr&&(Cn=="buffer"||Cn=="byteLength"||Cn=="byteOffset")||ip(Cn,oi)))&&ei.push(Cn);return ei}var Bb=$K;function QK(fe,_e){return function(Xe){return fe(_e(Xe))}}var Nb=QK;var eJ=Nb(Object.keys,Object),OC=eJ;var tJ=Object.prototype,rJ=tJ.hasOwnProperty;function aJ(fe){if(!mv(fe))return OC(fe);var _e=[];for(var Xe in Object(fe))rJ.call(fe,Xe)&&Xe!="constructor"&&_e.push(Xe);return _e}var ny=aJ;function iJ(fe){return Vc(fe)?Bb(fe):ny(fe)}var gu=iJ;var nJ=Object.prototype,oJ=nJ.hasOwnProperty,sJ=Md(function(fe,_e){if(mv(_e)||Vc(_e)){Mh(_e,gu(_e),fe);return}for(var Xe in _e)oJ.call(_e,Xe)&&vv(fe,Xe,_e[Xe])}),BC=sJ;function lJ(fe){var _e=[];if(fe!=null)for(var Xe in Object(fe))_e.push(Xe);return _e}var NC=lJ;var uJ=Object.prototype,cJ=uJ.hasOwnProperty;function fJ(fe){if(!Ll(fe))return NC(fe);var _e=mv(fe),Xe=[];for(var Lt in fe)Lt=="constructor"&&(_e||!cJ.call(fe,Lt))||Xe.push(Lt);return Xe}var UC=fJ;function hJ(fe){return Vc(fe)?Bb(fe,!0):UC(fe)}var Gc=hJ;var pJ=Md(function(fe,_e){Mh(_e,Gc(_e),fe)}),s_=pJ;var dJ=Md(function(fe,_e,Xe,Lt){Mh(_e,Gc(_e),fe,Lt)}),km=dJ;var vJ=Md(function(fe,_e,Xe,Lt){Mh(_e,gu(_e),fe,Lt)}),jC=vJ;var mJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gJ=/^\w*$/;function yJ(fe,_e){if(Do(fe))return!1;var Xe=typeof fe;return Xe=="number"||Xe=="symbol"||Xe=="boolean"||fe==null||Rf(fe)?!0:gJ.test(fe)||!mJ.test(fe)||_e!=null&&fe in Object(_e)}var oy=yJ;var _J=sd(Object,"create"),Vv=_J;function xJ(){this.__data__=Vv?Vv(null):{},this.size=0}var qC=xJ;function bJ(fe){var _e=this.has(fe)&&delete this.__data__[fe];return this.size-=_e?1:0,_e}var VC=bJ;var wJ="__lodash_hash_undefined__",TJ=Object.prototype,AJ=TJ.hasOwnProperty;function SJ(fe){var _e=this.__data__;if(Vv){var Xe=_e[fe];return Xe===wJ?void 0:Xe}return AJ.call(_e,fe)?_e[fe]:void 0}var GC=SJ;var MJ=Object.prototype,EJ=MJ.hasOwnProperty;function kJ(fe){var _e=this.__data__;return Vv?_e[fe]!==void 0:EJ.call(_e,fe)}var HC=kJ;var CJ="__lodash_hash_undefined__";function LJ(fe,_e){var Xe=this.__data__;return this.size+=this.has(fe)?0:1,Xe[fe]=Vv&&_e===void 0?CJ:_e,this}var WC=LJ;function sy(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e<Xe;){var Lt=fe[_e];this.set(Lt[0],Lt[1])}}sy.prototype.clear=qC;sy.prototype.delete=VC;sy.prototype.get=GC;sy.prototype.has=HC;sy.prototype.set=WC;var CA=sy;function PJ(){this.__data__=[],this.size=0}var XC=PJ;function IJ(fe,_e){for(var Xe=fe.length;Xe--;)if(oh(fe[Xe][0],_e))return Xe;return-1}var Cm=IJ;var RJ=Array.prototype,DJ=RJ.splice;function zJ(fe){var _e=this.__data__,Xe=Cm(_e,fe);if(Xe<0)return!1;var Lt=_e.length-1;return Xe==Lt?_e.pop():DJ.call(_e,Xe,1),--this.size,!0}var ZC=zJ;function FJ(fe){var _e=this.__data__,Xe=Cm(_e,fe);return Xe<0?void 0:_e[Xe][1]}var YC=FJ;function OJ(fe){return Cm(this.__data__,fe)>-1}var KC=OJ;function BJ(fe,_e){var Xe=this.__data__,Lt=Cm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=BJ;function ly(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e<Xe;){var Lt=fe[_e];this.set(Lt[0],Lt[1])}}ly.prototype.clear=XC;ly.prototype.delete=ZC;ly.prototype.get=YC;ly.prototype.has=KC;ly.prototype.set=JC;var Lm=ly;var NJ=sd(wu,"Map"),Pm=NJ;function UJ(){this.size=0,this.__data__={hash:new CA,map:new(Pm||Lm),string:new CA}}var $C=UJ;function jJ(fe){var _e=typeof fe;return _e=="string"||_e=="number"||_e=="symbol"||_e=="boolean"?fe!=="__proto__":fe===null}var QC=jJ;function qJ(fe,_e){var Xe=fe.__data__;return QC(_e)?Xe[typeof _e=="string"?"string":"hash"]:Xe.map}var Im=qJ;function VJ(fe){var _e=Im(this,fe).delete(fe);return this.size-=_e?1:0,_e}var eL=VJ;function GJ(fe){return Im(this,fe).get(fe)}var tL=GJ;function HJ(fe){return Im(this,fe).has(fe)}var rL=HJ;function WJ(fe,_e){var Xe=Im(this,fe),Lt=Xe.size;return Xe.set(fe,_e),this.size+=Xe.size==Lt?0:1,this}var aL=WJ;function uy(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e<Xe;){var Lt=fe[_e];this.set(Lt[0],Lt[1])}}uy.prototype.clear=$C;uy.prototype.delete=eL;uy.prototype.get=tL;uy.prototype.has=rL;uy.prototype.set=aL;var V0=uy;var XJ="Expected a function";function LA(fe,_e){if(typeof fe!="function"||_e!=null&&typeof _e!="function")throw new TypeError(XJ);var Xe=function(){var Lt=arguments,gr=_e?_e.apply(this,Lt):Lt[0],Yr=Xe.cache;if(Yr.has(gr))return Yr.get(gr);var Ea=fe.apply(this,Lt);return Xe.cache=Yr.set(gr,Ea)||Yr,Ea};return Xe.cache=new(LA.Cache||V0),Xe}LA.Cache=V0;var Ub=LA;var ZJ=500;function YJ(fe){var _e=Ub(fe,function(Lt){return Xe.size===ZJ&&Xe.clear(),Lt}),Xe=_e.cache;return _e}var iL=YJ;var KJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JJ=/\\(\\)?/g,$J=iL(function(fe){var _e=[];return fe.charCodeAt(0)===46&&_e.push(""),fe.replace(KJ,function(Xe,Lt,gr,Yr){_e.push(gr?Yr.replace(JJ,"$1"):Lt||Xe)}),_e}),jb=$J;function QJ(fe){return fe==null?"":nh(fe)}var Us=QJ;function e$(fe,_e){return Do(fe)?fe:oy(fe,_e)?[fe]:jb(Us(fe))}var Fp=e$;var t$=1/0;function r$(fe){if(typeof fe=="string"||Rf(fe))return fe;var _e=fe+"";return _e=="0"&&1/fe==-t$?"-0":_e}var Eh=r$;function a$(fe,_e){_e=Fp(_e,fe);for(var Xe=0,Lt=_e.length;fe!=null&&Xe<Lt;)fe=fe[Eh(_e[Xe++])];return Xe&&Xe==Lt?fe:void 0}var ld=a$;function i$(fe,_e,Xe){var Lt=fe==null?void 0:ld(fe,_e);return Lt===void 0?Xe:Lt}var cy=i$;function n$(fe,_e){for(var Xe=-1,Lt=_e.length,gr=Array(Lt),Yr=fe==null;++Xe<Lt;)gr[Xe]=Yr?void 0:cy(fe,_e[Xe]);return gr}var fy=n$;function o$(fe,_e){for(var Xe=-1,Lt=_e.length,gr=fe.length;++Xe<Lt;)fe[gr+Xe]=_e[Xe];return fe}var Op=o$;var nL=If?If.isConcatSpreadable:void 0;function s$(fe){return Do(fe)||pd(fe)||!!(nL&&fe&&fe[nL])}var oL=s$;function sL(fe,_e,Xe,Lt,gr){var Yr=-1,Ea=fe.length;for(Xe||(Xe=oL),gr||(gr=[]);++Yr<Ea;){var ei=fe[Yr];_e>0&&Xe(ei)?_e>1?sL(ei,_e-1,Xe,Lt,gr):Op(gr,ei):Lt||(gr[gr.length]=ei)}return gr}var Qu=sL;function l$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=l$;function u$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var lp=u$;var c$=lp(fy),lL=c$;var f$=Nb(Object.getPrototypeOf,Object),Rm=f$;var h$="[object Object]",p$=Function.prototype,d$=Object.prototype,uL=p$.toString,v$=d$.hasOwnProperty,m$=uL.call(Object);function g$(fe){if(!Dl(fe)||Oc(fe)!=h$)return!1;var _e=Rm(fe);if(_e===null)return!0;var Xe=v$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==m$}var gv=g$;var y$="[object DOMException]",_$="[object Error]";function x$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==_$||_e==y$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=x$;var b$=Vo(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=b$;var w$="Expected a function";function T$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(w$);return fe=qo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=T$;var A$=1,S$=32,PA=Vo(function(fe,_e,Xe){var Lt=A$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=S$}return np(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var M$=lp(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),op(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=M$;var E$=1,k$=2,C$=32,IA=Vo(function(fe,_e,Xe){var Lt=E$|k$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=C$}return np(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function L$(fe,_e,Xe){var Lt=-1,gr=fe.length;_e<0&&(_e=-_e>gr?0:gr+_e),Xe=Xe>gr?gr:Xe,Xe<0&&(Xe+=gr),gr=_e>Xe?0:Xe-_e>>>0,_e>>>=0;for(var Yr=Array(gr);++Lt<gr;)Yr[Lt]=fe[Lt+_e];return Yr}var Yf=L$;function P$(fe,_e,Xe){var Lt=fe.length;return Xe=Xe===void 0?Lt:Xe,!_e&&Xe>=Lt?fe:Yf(fe,_e,Xe)}var Bp=P$;var I$="\\ud800-\\udfff",R$="\\u0300-\\u036f",D$="\\ufe20-\\ufe2f",z$="\\u20d0-\\u20ff",F$=R$+D$+z$,O$="\\ufe0e\\ufe0f",B$="\\u200d",N$=RegExp("["+B$+I$+F$+O$+"]");function U$(fe){return N$.test(fe)}var kd=U$;function j$(fe){return fe.split("")}var hL=j$;var pL="\\ud800-\\udfff",q$="\\u0300-\\u036f",V$="\\ufe20-\\ufe2f",G$="\\u20d0-\\u20ff",H$=q$+V$+G$,W$="\\ufe0e\\ufe0f",X$="["+pL+"]",RA="["+H$+"]",DA="\\ud83c[\\udffb-\\udfff]",Z$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",Y$="\\u200d",gL=Z$+"?",yL="["+W$+"]?",K$="(?:"+Y$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",J$=yL+gL+K$,$$="(?:"+[dL+RA+"?",RA,vL,mL,X$].join("|")+")",Q$=RegExp(DA+"(?="+DA+")|"+$$+J$,"g");function eQ(fe){return fe.match(Q$)||[]}var _L=eQ;function tQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=tQ;function rQ(fe){return function(_e){_e=Us(_e);var Xe=kd(_e)?Uh(_e):void 0,Lt=Xe?Xe[0]:_e.charAt(0),gr=Xe?Bp(Xe,1).join(""):_e.slice(1);return Lt[fe]()+gr}}var Wb=rQ;var aQ=Wb("toUpperCase"),py=aQ;function iQ(fe){return py(Us(fe).toLowerCase())}var Xb=iQ;function nQ(fe,_e,Xe,Lt){var gr=-1,Yr=fe==null?0:fe.length;for(Lt&&Yr&&(Xe=fe[++gr]);++gr<Yr;)Xe=_e(Xe,fe[gr],gr,fe);return Xe}var dy=nQ;function oQ(fe){return function(_e){return fe?.[_e]}}var vy=oQ;var sQ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},lQ=vy(sQ),xL=lQ;var uQ=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cQ="\\u0300-\\u036f",fQ="\\ufe20-\\ufe2f",hQ="\\u20d0-\\u20ff",pQ=cQ+fQ+hQ,dQ="["+pQ+"]",vQ=RegExp(dQ,"g");function mQ(fe){return fe=Us(fe),fe&&fe.replace(uQ,xL).replace(vQ,"")}var Zb=mQ;var gQ=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function yQ(fe){return fe.match(gQ)||[]}var bL=yQ;var _Q=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function xQ(fe){return _Q.test(fe)}var wL=xQ;var EL="\\ud800-\\udfff",bQ="\\u0300-\\u036f",wQ="\\ufe20-\\ufe2f",TQ="\\u20d0-\\u20ff",AQ=bQ+wQ+TQ,kL="\\u2700-\\u27bf",CL="a-z\\xdf-\\xf6\\xf8-\\xff",SQ="\\xac\\xb1\\xd7\\xf7",MQ="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",EQ="\\u2000-\\u206f",kQ=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",LL="A-Z\\xc0-\\xd6\\xd8-\\xde",CQ="\\ufe0e\\ufe0f",PL=SQ+MQ+EQ+kQ,IL="['\u2019]",TL="["+PL+"]",LQ="["+AQ+"]",RL="\\d+",PQ="["+kL+"]",DL="["+CL+"]",zL="[^"+EL+PL+RL+kL+CL+LL+"]",IQ="\\ud83c[\\udffb-\\udfff]",RQ="(?:"+LQ+"|"+IQ+")",DQ="[^"+EL+"]",FL="(?:\\ud83c[\\udde6-\\uddff]){2}",OL="[\\ud800-\\udbff][\\udc00-\\udfff]",my="["+LL+"]",zQ="\\u200d",AL="(?:"+DL+"|"+zL+")",FQ="(?:"+my+"|"+zL+")",SL="(?:"+IL+"(?:d|ll|m|re|s|t|ve))?",ML="(?:"+IL+"(?:D|LL|M|RE|S|T|VE))?",BL=RQ+"?",NL="["+CQ+"]?",OQ="(?:"+zQ+"(?:"+[DQ,FL,OL].join("|")+")"+NL+BL+")*",BQ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",NQ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",UQ=NL+BL+OQ,jQ="(?:"+[PQ,FL,OL].join("|")+")"+UQ,qQ=RegExp([my+"?"+DL+"+"+SL+"(?="+[TL,my,"$"].join("|")+")",FQ+"+"+ML+"(?="+[TL,my+AL,"$"].join("|")+")",my+"?"+AL+"+"+SL,my+"+"+ML,NQ,BQ,RL,jQ].join("|"),"g");function VQ(fe){return fe.match(qQ)||[]}var UL=VQ;function GQ(fe,_e,Xe){return fe=Us(fe),_e=Xe?void 0:_e,_e===void 0?wL(fe)?UL(fe):bL(fe):fe.match(_e)||[]}var Yb=GQ;var HQ="['\u2019]",WQ=RegExp(HQ,"g");function XQ(fe){return function(_e){return dy(Yb(Zb(_e).replace(WQ,"")),fe,"")}}var Cd=XQ;var ZQ=Cd(function(fe,_e,Xe){return _e=_e.toLowerCase(),fe+(Xe?Xb(_e):_e)}),jL=ZQ;function YQ(){if(!arguments.length)return[];var fe=arguments[0];return Do(fe)?fe:[fe]}var qL=YQ;var KQ=wu.isFinite,JQ=Math.min;function $Q(fe){var _e=Math[fe];return function(Xe,Lt){if(Xe=Sh(Xe),Lt=Lt==null?0:JQ(qo(Lt),292),Lt&&KQ(Xe)){var gr=(Us(Xe)+"e").split("e"),Yr=_e(gr[0]+"e"+(+gr[1]+Lt));return gr=(Us(Yr)+"e").split("e"),+(gr[0]+"e"+(+gr[1]-Lt))}return _e(Xe)}}var gy=$Q;var QQ=gy("ceil"),VL=QQ;function eee(fe){var _e=da(fe);return _e.__chain__=!0,_e}var Kb=eee;var tee=Math.ceil,ree=Math.max;function aee(fe,_e,Xe){(Xe?Nc(fe,_e,Xe):_e===void 0)?_e=1:_e=ree(qo(_e),0);var Lt=fe==null?0:fe.length;if(!Lt||_e<1)return[];for(var gr=0,Yr=0,Ea=Array(tee(Lt/_e));gr<Lt;)Ea[Yr++]=Yf(fe,gr,gr+=_e);return Ea}var GL=aee;function iee(fe,_e,Xe){return fe===fe&&(Xe!==void 0&&(fe=fe<=Xe?fe:Xe),_e!==void 0&&(fe=fe>=_e?fe:_e)),fe}var ud=iee;function nee(fe,_e,Xe){return Xe===void 0&&(Xe=_e,_e=void 0),Xe!==void 0&&(Xe=Sh(Xe),Xe=Xe===Xe?Xe:0),_e!==void 0&&(_e=Sh(_e),_e=_e===_e?_e:0),ud(Sh(fe),_e,Xe)}var HL=nee;function oee(){this.__data__=new Lm,this.size=0}var WL=oee;function see(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=see;function lee(fe){return this.__data__.get(fe)}var ZL=lee;function uee(fe){return this.__data__.has(fe)}var YL=uee;var cee=200;function fee(fe,_e){var Xe=this.__data__;if(Xe instanceof Lm){var Lt=Xe.__data__;if(!Pm||Lt.length<cee-1)return Lt.push([fe,_e]),this.size=++Xe.size,this;Xe=this.__data__=new V0(Lt)}return Xe.set(fe,_e),this.size=Xe.size,this}var KL=fee;function yy(fe){var _e=this.__data__=new Lm(fe);this.size=_e.size}yy.prototype.clear=WL;yy.prototype.delete=XL;yy.prototype.get=ZL;yy.prototype.has=YL;yy.prototype.set=KL;var yv=yy;function hee(fe,_e){return fe&&Mh(_e,gu(_e),fe)}var Jb=hee;function pee(fe,_e){return fe&&Mh(_e,Gc(_e),fe)}var JL=pee;var tP=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$L=tP&&typeof module=="object"&&module&&!module.nodeType&&module,dee=$L&&$L.exports===tP,QL=dee?wu.Buffer:void 0,eP=QL?QL.allocUnsafe:void 0;function vee(fe,_e){if(_e)return fe.slice();var Xe=fe.length,Lt=eP?eP(Xe):new fe.constructor(Xe);return fe.copy(Lt),Lt}var $b=vee;function mee(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length,gr=0,Yr=[];++Xe<Lt;){var Ea=fe[Xe];_e(Ea,Xe,fe)&&(Yr[gr++]=Ea)}return Yr}var Np=mee;function gee(){return[]}var _y=gee;var yee=Object.prototype,_ee=yee.propertyIsEnumerable,rP=Object.getOwnPropertySymbols,xee=rP?function(fe){return fe==null?[]:(fe=Object(fe),Np(rP(fe),function(_e){return _ee.call(fe,_e)}))}:_y,xy=xee;function bee(fe,_e){return Mh(fe,xy(fe),_e)}var aP=bee;var wee=Object.getOwnPropertySymbols,Tee=wee?function(fe){for(var _e=[];fe;)Op(_e,xy(fe)),fe=Rm(fe);return _e}:_y,Qb=Tee;function Aee(fe,_e){return Mh(fe,Qb(fe),_e)}var iP=Aee;function See(fe,_e,Xe){var Lt=_e(fe);return Do(fe)?Lt:Op(Lt,Xe(fe))}var ew=See;function Mee(fe){return ew(fe,gu,xy)}var l_=Mee;function Eee(fe){return ew(fe,Gc,Qb)}var by=Eee;var kee=sd(wu,"DataView"),tw=kee;var Cee=sd(wu,"Promise"),rw=Cee;var Lee=sd(wu,"Set"),Dm=Lee;var nP="[object Map]",Pee="[object Object]",oP="[object Promise]",sP="[object Set]",lP="[object WeakMap]",uP="[object DataView]",Iee=jv(tw),Ree=jv(Pm),Dee=jv(rw),zee=jv(Dm),Fee=jv(q0),G0=Oc;(tw&&G0(new tw(new ArrayBuffer(1)))!=uP||Pm&&G0(new Pm)!=nP||rw&&G0(rw.resolve())!=oP||Dm&&G0(new Dm)!=sP||q0&&G0(new q0)!=lP)&&(G0=function(fe){var _e=Oc(fe),Xe=_e==Pee?fe.constructor:void 0,Lt=Xe?jv(Xe):"";if(Lt)switch(Lt){case Iee:return uP;case Ree:return nP;case Dee:return oP;case zee:return sP;case Fee:return lP}return _e});var jh=G0;var Oee=Object.prototype,Bee=Oee.hasOwnProperty;function Nee(fe){var _e=fe.length,Xe=new fe.constructor(_e);return _e&&typeof fe[0]=="string"&&Bee.call(fe,"index")&&(Xe.index=fe.index,Xe.input=fe.input),Xe}var cP=Nee;var Uee=wu.Uint8Array,wy=Uee;function jee(fe){var _e=new fe.constructor(fe.byteLength);return new wy(_e).set(new wy(fe)),_e}var Ty=jee;function qee(fe,_e){var Xe=_e?Ty(fe.buffer):fe.buffer;return new fe.constructor(Xe,fe.byteOffset,fe.byteLength)}var fP=qee;var Vee=/\w*$/;function Gee(fe){var _e=new fe.constructor(fe.source,Vee.exec(fe));return _e.lastIndex=fe.lastIndex,_e}var hP=Gee;var pP=If?If.prototype:void 0,dP=pP?pP.valueOf:void 0;function Hee(fe){return dP?Object(dP.call(fe)):{}}var vP=Hee;function Wee(fe,_e){var Xe=_e?Ty(fe.buffer):fe.buffer;return new fe.constructor(Xe,fe.byteOffset,fe.length)}var aw=Wee;var Xee="[object Boolean]",Zee="[object Date]",Yee="[object Map]",Kee="[object Number]",Jee="[object RegExp]",$ee="[object Set]",Qee="[object String]",ete="[object Symbol]",tte="[object ArrayBuffer]",rte="[object DataView]",ate="[object Float32Array]",ite="[object Float64Array]",nte="[object Int8Array]",ote="[object Int16Array]",ste="[object Int32Array]",lte="[object Uint8Array]",ute="[object Uint8ClampedArray]",cte="[object Uint16Array]",fte="[object Uint32Array]";function hte(fe,_e,Xe){var Lt=fe.constructor;switch(_e){case tte:return Ty(fe);case Xee:case Zee:return new Lt(+fe);case rte:return fP(fe,Xe);case ate:case ite:case nte:case ote:case ste:case lte:case ute:case cte:case fte:return aw(fe,Xe);case Yee:return new Lt;case Kee:case Qee:return new Lt(fe);case Jee:return hP(fe);case $ee:return new Lt;case ete:return vP(fe)}}var mP=hte;function pte(fe){return typeof fe.constructor=="function"&&!mv(fe)?Td(Rm(fe)):{}}var iw=pte;var dte="[object Map]";function vte(fe){return Dl(fe)&&jh(fe)==dte}var gP=vte;var yP=sp&&sp.isMap,mte=yP?wf(yP):gP,nw=mte;var gte="[object Set]";function yte(fe){return Dl(fe)&&jh(fe)==gte}var _P=yte;var xP=sp&&sp.isSet,_te=xP?wf(xP):_P,ow=_te;var xte=1,bte=2,wte=4,bP="[object Arguments]",Tte="[object Array]",Ate="[object Boolean]",Ste="[object Date]",Mte="[object Error]",wP="[object Function]",Ete="[object GeneratorFunction]",kte="[object Map]",Cte="[object Number]",TP="[object Object]",Lte="[object RegExp]",Pte="[object Set]",Ite="[object String]",Rte="[object Symbol]",Dte="[object WeakMap]",zte="[object ArrayBuffer]",Fte="[object DataView]",Ote="[object Float32Array]",Bte="[object Float64Array]",Nte="[object Int8Array]",Ute="[object Int16Array]",jte="[object Int32Array]",qte="[object Uint8Array]",Vte="[object Uint8ClampedArray]",Gte="[object Uint16Array]",Hte="[object Uint32Array]",df={};df[bP]=df[Tte]=df[zte]=df[Fte]=df[Ate]=df[Ste]=df[Ote]=df[Bte]=df[Nte]=df[Ute]=df[jte]=df[kte]=df[Cte]=df[TP]=df[Lte]=df[Pte]=df[Ite]=df[Rte]=df[qte]=df[Vte]=df[Gte]=df[Hte]=!0;df[Mte]=df[wP]=df[Dte]=!1;function sw(fe,_e,Xe,Lt,gr,Yr){var Ea,ei=_e&xte,oi=_e&bte,Cn=_e&wte;if(Xe&&(Ea=gr?Xe(fe,Lt,gr,Yr):Xe(fe)),Ea!==void 0)return Ea;if(!Ll(fe))return fe;var xn=Do(fe);if(xn){if(Ea=cP(fe),!ei)return pf(fe,Ea)}else{var Fn=jh(fe),To=Fn==wP||Fn==Ete;if(Kp(fe))return $b(fe,ei);if(Fn==TP||Fn==bP||To&&!gr){if(Ea=oi||To?{}:iw(fe),!ei)return oi?iP(fe,JL(Ea,fe)):aP(fe,Jb(Ea,fe))}else{if(!df[Fn])return gr?fe:{};Ea=mP(fe,Fn,ei)}}Yr||(Yr=new yv);var ps=Yr.get(fe);if(ps)return ps;Yr.set(fe,Ea),ow(fe)?fe.forEach(function(He){Ea.add(sw(He,_e,Xe,He,fe,Yr))}):nw(fe)&&fe.forEach(function(He,Kl){Ea.set(Kl,sw(He,_e,Xe,Kl,fe,Yr))});var Qs=Cn?oi?by:l_:oi?Gc:gu,Go=xn?void 0:Qs(fe);return Nh(Go||fe,function(He,Kl){Go&&(Kl=He,He=fe[Kl]),vv(Ea,Kl,sw(He,_e,Xe,Kl,fe,Yr))}),Ea}var up=sw;var Wte=4;function Xte(fe){return up(fe,Wte)}var AP=Xte;var Zte=1,Yte=4;function Kte(fe){return up(fe,Zte|Yte)}var SP=Kte;var Jte=1,$te=4;function Qte(fe,_e){return _e=typeof _e=="function"?_e:void 0,up(fe,Jte|$te,_e)}var MP=Qte;var ere=4;function tre(fe,_e){return _e=typeof _e=="function"?_e:void 0,up(fe,ere,_e)}var EP=tre;function rre(){return new zp(this.value(),this.__chain__)}var kP=rre;function are(fe){for(var _e=-1,Xe=fe==null?0:fe.length,Lt=0,gr=[];++_e<Xe;){var Yr=fe[_e];Yr&&(gr[Lt++]=Yr)}return gr}var CP=are;function ire(){var fe=arguments.length;if(!fe)return[];for(var _e=Array(fe-1),Xe=arguments[0],Lt=fe;Lt--;)_e[Lt-1]=arguments[Lt];return Op(Do(Xe)?pf(Xe):[Xe],Qu(_e,1))}var LP=ire;var nre="__lodash_hash_undefined__";function ore(fe){return this.__data__.set(fe,nre),this}var PP=ore;function sre(fe){return this.__data__.has(fe)}var IP=sre;function lw(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.__data__=new V0;++_e<Xe;)this.add(fe[_e])}lw.prototype.add=lw.prototype.push=PP;lw.prototype.has=IP;var zm=lw;function lre(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe<Lt;)if(_e(fe[Xe],Xe,fe))return!0;return!1}var Ay=lre;function ure(fe,_e){return fe.has(_e)}var Gv=ure;var cre=1,fre=2;function hre(fe,_e,Xe,Lt,gr,Yr){var Ea=Xe&cre,ei=fe.length,oi=_e.length;if(ei!=oi&&!(Ea&&oi>ei))return!1;var Cn=Yr.get(fe),xn=Yr.get(_e);if(Cn&&xn)return Cn==_e&&xn==fe;var Fn=-1,To=!0,ps=Xe&fre?new zm:void 0;for(Yr.set(fe,_e),Yr.set(_e,fe);++Fn<ei;){var Qs=fe[Fn],Go=_e[Fn];if(Lt)var He=Ea?Lt(Go,Qs,Fn,_e,fe,Yr):Lt(Qs,Go,Fn,fe,_e,Yr);if(He!==void 0){if(He)continue;To=!1;break}if(ps){if(!Ay(_e,function(Kl,nu){if(!Gv(ps,nu)&&(Qs===Kl||gr(Qs,Kl,Xe,Lt,Yr)))return ps.push(nu)})){To=!1;break}}else if(!(Qs===Go||gr(Qs,Go,Xe,Lt,Yr))){To=!1;break}}return Yr.delete(fe),Yr.delete(_e),To}var uw=hre;function pre(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt,gr){Xe[++_e]=[gr,Lt]}),Xe}var Sy=pre;function dre(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=Lt}),Xe}var Fm=dre;var vre=1,mre=2,gre="[object Boolean]",yre="[object Date]",_re="[object Error]",xre="[object Map]",bre="[object Number]",wre="[object RegExp]",Tre="[object Set]",Are="[object String]",Sre="[object Symbol]",Mre="[object ArrayBuffer]",Ere="[object DataView]",RP=If?If.prototype:void 0,zA=RP?RP.valueOf:void 0;function kre(fe,_e,Xe,Lt,gr,Yr,Ea){switch(Xe){case Ere:if(fe.byteLength!=_e.byteLength||fe.byteOffset!=_e.byteOffset)return!1;fe=fe.buffer,_e=_e.buffer;case Mre:return!(fe.byteLength!=_e.byteLength||!Yr(new wy(fe),new wy(_e)));case gre:case yre:case bre:return oh(+fe,+_e);case _re:return fe.name==_e.name&&fe.message==_e.message;case wre:case Are:return fe==_e+"";case xre:var ei=Sy;case Tre:var oi=Lt&vre;if(ei||(ei=Fm),fe.size!=_e.size&&!oi)return!1;var Cn=Ea.get(fe);if(Cn)return Cn==_e;Lt|=mre,Ea.set(fe,_e);var xn=uw(ei(fe),ei(_e),Lt,gr,Yr,Ea);return Ea.delete(fe),xn;case Sre:if(zA)return zA.call(fe)==zA.call(_e)}return!1}var DP=kre;var Cre=1,Lre=Object.prototype,Pre=Lre.hasOwnProperty;function Ire(fe,_e,Xe,Lt,gr,Yr){var Ea=Xe&Cre,ei=l_(fe),oi=ei.length,Cn=l_(_e),xn=Cn.length;if(oi!=xn&&!Ea)return!1;for(var Fn=oi;Fn--;){var To=ei[Fn];if(!(Ea?To in _e:Pre.call(_e,To)))return!1}var ps=Yr.get(fe),Qs=Yr.get(_e);if(ps&&Qs)return ps==_e&&Qs==fe;var Go=!0;Yr.set(fe,_e),Yr.set(_e,fe);for(var He=Ea;++Fn<oi;){To=ei[Fn];var Kl=fe[To],nu=_e[To];if(Lt)var jp=Ea?Lt(nu,Kl,To,_e,fe,Yr):Lt(Kl,nu,To,fe,_e,Yr);if(!(jp===void 0?Kl===nu||gr(Kl,nu,Xe,Lt,Yr):jp)){Go=!1;break}He||(He=To=="constructor")}if(Go&&!He){var zf=fe.constructor,fp=_e.constructor;zf!=fp&&"constructor"in fe&&"constructor"in _e&&!(typeof zf=="function"&&zf instanceof zf&&typeof fp=="function"&&fp instanceof fp)&&(Go=!1)}return Yr.delete(fe),Yr.delete(_e),Go}var zP=Ire;var Rre=1,FP="[object Arguments]",OP="[object Array]",cw="[object Object]",Dre=Object.prototype,BP=Dre.hasOwnProperty;function zre(fe,_e,Xe,Lt,gr,Yr){var Ea=Do(fe),ei=Do(_e),oi=Ea?OP:jh(fe),Cn=ei?OP:jh(_e);oi=oi==FP?cw:oi,Cn=Cn==FP?cw:Cn;var xn=oi==cw,Fn=Cn==cw,To=oi==Cn;if(To&&Kp(fe)){if(!Kp(_e))return!1;Ea=!0,xn=!1}if(To&&!xn)return Yr||(Yr=new yv),Ea||Ed(fe)?uw(fe,_e,Xe,Lt,gr,Yr):DP(fe,_e,oi,Xe,Lt,gr,Yr);if(!(Xe&Rre)){var ps=xn&&BP.call(fe,"__wrapped__"),Qs=Fn&&BP.call(_e,"__wrapped__");if(ps||Qs){var Go=ps?fe.value():fe,He=Qs?_e.value():_e;return Yr||(Yr=new yv),gr(Go,He,Xe,Lt,Yr)}}return To?(Yr||(Yr=new yv),zP(fe,_e,Xe,Lt,gr,Yr)):!1}var NP=zre;function UP(fe,_e,Xe,Lt,gr){return fe===_e?!0:fe==null||_e==null||!Dl(fe)&&!Dl(_e)?fe!==fe&&_e!==_e:NP(fe,_e,Xe,Lt,UP,gr)}var Om=UP;var Fre=1,Ore=2;function Bre(fe,_e,Xe,Lt){var gr=Xe.length,Yr=gr,Ea=!Lt;if(fe==null)return!Yr;for(fe=Object(fe);gr--;){var ei=Xe[gr];if(Ea&&ei[2]?ei[1]!==fe[ei[0]]:!(ei[0]in fe))return!1}for(;++gr<Yr;){ei=Xe[gr];var oi=ei[0],Cn=fe[oi],xn=ei[1];if(Ea&&ei[2]){if(Cn===void 0&&!(oi in fe))return!1}else{var Fn=new yv;if(Lt)var To=Lt(Cn,xn,oi,fe,_e,Fn);if(!(To===void 0?Om(xn,Cn,Fre|Ore,Lt,Fn):To))return!1}}return!0}var My=Bre;function Nre(fe){return fe===fe&&!Ll(fe)}var fw=Nre;function Ure(fe){for(var _e=gu(fe),Xe=_e.length;Xe--;){var Lt=_e[Xe],gr=fe[Lt];_e[Xe]=[Lt,gr,fw(gr)]}return _e}var Ey=Ure;function jre(fe,_e){return function(Xe){return Xe==null?!1:Xe[fe]===_e&&(_e!==void 0||fe in Object(Xe))}}var hw=jre;function qre(fe){var _e=Ey(fe);return _e.length==1&&_e[0][2]?hw(_e[0][0],_e[0][1]):function(Xe){return Xe===fe||My(Xe,fe,_e)}}var pw=qre;function Vre(fe,_e){return fe!=null&&_e in Object(fe)}var jP=Vre;function Gre(fe,_e,Xe){_e=Fp(_e,fe);for(var Lt=-1,gr=_e.length,Yr=!1;++Lt<gr;){var Ea=Eh(_e[Lt]);if(!(Yr=fe!=null&&Xe(fe,Ea)))break;fe=fe[Ea]}return Yr||++Lt!=gr?Yr:(gr=fe==null?0:fe.length,!!gr&&Em(gr)&&ip(Ea,gr)&&(Do(fe)||pd(fe)))}var dw=Gre;function Hre(fe,_e){return fe!=null&&dw(fe,_e,jP)}var ky=Hre;var Wre=1,Xre=2;function Zre(fe,_e){return oy(fe)&&fw(_e)?hw(Eh(fe),_e):function(Xe){var Lt=cy(Xe,fe);return Lt===void 0&&Lt===_e?ky(Xe,fe):Om(_e,Lt,Wre|Xre)}}var vw=Zre;function Yre(fe){return function(_e){return _e?.[fe]}}var Cy=Yre;function Kre(fe){return function(_e){return ld(_e,fe)}}var qP=Kre;function Jre(fe){return oy(fe)?Cy(Eh(fe)):qP(fe)}var mw=Jre;function $re(fe){return typeof fe=="function"?fe:fe==null?Bc:typeof fe=="object"?Do(fe)?vw(fe[0],fe[1]):pw(fe):mw(fe)}var _o=$re;var Qre="Expected a function";function eae(fe){var _e=fe==null?0:fe.length,Xe=_o;return fe=_e?Ml(fe,function(Lt){if(typeof Lt[1]!="function")throw new TypeError(Qre);return[Xe(Lt[0]),Lt[1]]}):[],Vo(function(Lt){for(var gr=-1;++gr<_e;){var Yr=fe[gr];if(xf(Yr[0],this,Lt))return xf(Yr[1],this,Lt)}})}var VP=eae;function tae(fe,_e,Xe){var Lt=Xe.length;if(fe==null)return!Lt;for(fe=Object(fe);Lt--;){var gr=Xe[Lt],Yr=_e[gr],Ea=fe[gr];if(Ea===void 0&&!(gr in fe)||!Yr(Ea))return!1}return!0}var gw=tae;function rae(fe){var _e=gu(fe);return function(Xe){return gw(Xe,fe,_e)}}var GP=rae;var aae=1;function iae(fe){return GP(up(fe,aae))}var HP=iae;function nae(fe,_e){return _e==null||gw(fe,_e,gu(_e))}var WP=nae;function oae(fe,_e,Xe,Lt){for(var gr=-1,Yr=fe==null?0:fe.length;++gr<Yr;){var Ea=fe[gr];_e(Lt,Ea,Xe(Ea),fe)}return Lt}var XP=oae;function sae(fe){return function(_e,Xe,Lt){for(var gr=-1,Yr=Object(_e),Ea=Lt(_e),ei=Ea.length;ei--;){var oi=Ea[fe?ei:++gr];if(Xe(Yr[oi],oi,Yr)===!1)break}return _e}}var yw=sae;var lae=yw(),Ly=lae;function uae(fe,_e){return fe&&Ly(fe,_e,gu)}var cp=uae;function cae(fe,_e){return function(Xe,Lt){if(Xe==null)return Xe;if(!Vc(Xe))return fe(Xe,Lt);for(var gr=Xe.length,Yr=_e?gr:-1,Ea=Object(Xe);(_e?Yr--:++Yr<gr)&&Lt(Ea[Yr],Yr,Ea)!==!1;);return Xe}}var _w=cae;var fae=_w(cp),Up=fae;function hae(fe,_e,Xe,Lt){return Up(fe,function(gr,Yr,Ea){_e(Lt,gr,Xe(gr),Ea)}),Lt}var ZP=hae;function pae(fe,_e){return function(Xe,Lt){var gr=Do(Xe)?XP:ZP,Yr=_e?_e():{};return gr(Xe,fe,_o(Lt,2),Yr)}}var Bm=pae;var dae=Object.prototype,vae=dae.hasOwnProperty,mae=Bm(function(fe,_e,Xe){vae.call(fe,Xe)?++fe[Xe]:op(fe,Xe,1)}),YP=mae;function gae(fe,_e){var Xe=Td(fe);return _e==null?Xe:Jb(Xe,_e)}var KP=gae;var yae=8;function FA(fe,_e,Xe){_e=Xe?void 0:_e;var Lt=np(fe,yae,void 0,void 0,void 0,void 0,void 0,_e);return Lt.placeholder=FA.placeholder,Lt}FA.placeholder={};var JP=FA;var _ae=16;function OA(fe,_e,Xe){_e=Xe?void 0:_e;var Lt=np(fe,_ae,void 0,void 0,void 0,void 0,void 0,_e);return Lt.placeholder=OA.placeholder,Lt}OA.placeholder={};var $P=OA;var xae=function(){return wu.Date.now()},Py=xae;var bae="Expected a function",wae=Math.max,Tae=Math.min;function Aae(fe,_e,Xe){var Lt,gr,Yr,Ea,ei,oi,Cn=0,xn=!1,Fn=!1,To=!0;if(typeof fe!="function")throw new TypeError(bae);_e=Sh(_e)||0,Ll(Xe)&&(xn=!!Xe.leading,Fn="maxWait"in Xe,Yr=Fn?wae(Sh(Xe.maxWait)||0,_e):Yr,To="trailing"in Xe?!!Xe.trailing:To);function ps(Ff){var Wn=Lt,dd=gr;return Lt=gr=void 0,Cn=Ff,Ea=fe.apply(dd,Wn),Ea}function Qs(Ff){return Cn=Ff,ei=setTimeout(Kl,_e),xn?ps(Ff):Ea}function Go(Ff){var Wn=Ff-oi,dd=Ff-Cn,Xv=_e-Wn;return Fn?Tae(Xv,Yr-dd):Xv}function He(Ff){var Wn=Ff-oi,dd=Ff-Cn;return oi===void 0||Wn>=_e||Wn<0||Fn&&dd>=Yr}function Kl(){var Ff=Py();if(He(Ff))return nu(Ff);ei=setTimeout(Kl,Go(Ff))}function nu(Ff){return ei=void 0,To&&Lt?ps(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Cn=0,Lt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:nu(Py())}function fp(){var Ff=Py(),Wn=He(Ff);if(Lt=arguments,gr=this,oi=Ff,Wn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Kl,_e),ps(oi)}return ei===void 0&&(ei=setTimeout(Kl,_e)),Ea}return fp.cancel=jp,fp.flush=zf,fp}var xw=Aae;function Sae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Sae;var eI=Object.prototype,Mae=eI.hasOwnProperty,Eae=Vo(function(fe,_e){fe=Object(fe);var Xe=-1,Lt=_e.length,gr=Lt>2?_e[2]:void 0;for(gr&&Nc(_e[0],_e[1],gr)&&(Lt=1);++Xe<Lt;)for(var Yr=_e[Xe],Ea=Gc(Yr),ei=-1,oi=Ea.length;++ei<oi;){var Cn=Ea[ei],xn=fe[Cn];(xn===void 0||oh(xn,eI[Cn])&&!Mae.call(fe,Cn))&&(fe[Cn]=Yr[Cn])}return fe}),tI=Eae;function kae(fe,_e,Xe){(Xe!==void 0&&!oh(fe[_e],Xe)||Xe===void 0&&!(_e in fe))&&op(fe,_e,Xe)}var u_=kae;function Cae(fe){return Dl(fe)&&Vc(fe)}var Eu=Cae;function Lae(fe,_e){if(!(_e==="constructor"&&typeof fe[_e]=="function")&&_e!="__proto__")return fe[_e]}var c_=Lae;function Pae(fe){return Mh(fe,Gc(fe))}var bw=Pae;function Iae(fe,_e,Xe,Lt,gr,Yr,Ea){var ei=c_(fe,Xe),oi=c_(_e,Xe),Cn=Ea.get(oi);if(Cn){u_(fe,Xe,Cn);return}var xn=Yr?Yr(ei,oi,Xe+"",fe,_e,Ea):void 0,Fn=xn===void 0;if(Fn){var To=Do(oi),ps=!To&&Kp(oi),Qs=!To&&!ps&&Ed(oi);xn=oi,To||ps||Qs?Do(ei)?xn=ei:Eu(ei)?xn=pf(ei):ps?(Fn=!1,xn=$b(oi,!0)):Qs?(Fn=!1,xn=aw(oi,!0)):xn=[]:gv(oi)||pd(oi)?(xn=ei,pd(ei)?xn=bw(ei):(!Ll(ei)||ap(ei))&&(xn=iw(oi))):Fn=!1}Fn&&(Ea.set(oi,xn),gr(xn,oi,Lt,Yr,Ea),Ea.delete(oi)),u_(fe,Xe,xn)}var rI=Iae;function aI(fe,_e,Xe,Lt,gr){fe!==_e&&Ly(_e,function(Yr,Ea){if(gr||(gr=new yv),Ll(Yr))rI(fe,_e,Ea,Xe,aI,Lt,gr);else{var ei=Lt?Lt(c_(fe,Ea),Yr,Ea+"",fe,_e,gr):void 0;ei===void 0&&(ei=Yr),u_(fe,Ea,ei)}},Gc)}var Iy=aI;function iI(fe,_e,Xe,Lt,gr,Yr){return Ll(fe)&&Ll(_e)&&(Yr.set(_e,fe),Iy(fe,_e,void 0,iI,Yr),Yr.delete(_e)),fe}var nI=iI;var Rae=Md(function(fe,_e,Xe,Lt){Iy(fe,_e,Xe,Lt)}),ww=Rae;var Dae=Vo(function(fe){return fe.push(void 0,nI),xf(ww,void 0,fe)}),oI=Dae;var zae="Expected a function";function Fae(fe,_e,Xe){if(typeof fe!="function")throw new TypeError(zae);return setTimeout(function(){fe.apply(void 0,Xe)},_e)}var Tw=Fae;var Oae=Vo(function(fe,_e){return Tw(fe,1,_e)}),sI=Oae;var Bae=Vo(function(fe,_e,Xe){return Tw(fe,Sh(_e)||0,Xe)}),lI=Bae;function Nae(fe,_e,Xe){for(var Lt=-1,gr=fe==null?0:fe.length;++Lt<gr;)if(Xe(_e,fe[Lt]))return!0;return!1}var Ry=Nae;var Uae=200;function jae(fe,_e,Xe,Lt){var gr=-1,Yr=Mm,Ea=!0,ei=fe.length,oi=[],Cn=_e.length;if(!ei)return oi;Xe&&(_e=Ml(_e,wf(Xe))),Lt?(Yr=Ry,Ea=!1):_e.length>=Uae&&(Yr=Gv,Ea=!1,_e=new zm(_e));e:for(;++gr<ei;){var xn=fe[gr],Fn=Xe==null?xn:Xe(xn);if(xn=Lt||xn!==0?xn:0,Ea&&Fn===Fn){for(var To=Cn;To--;)if(_e[To]===Fn)continue e;oi.push(xn)}else Yr(_e,Fn,Lt)||oi.push(xn)}return oi}var _v=jae;var qae=Vo(function(fe,_e){return Eu(fe)?_v(fe,Qu(_e,1,Eu,!0)):[]}),uI=qae;function Vae(fe){var _e=fe==null?0:fe.length;return _e?fe[_e-1]:void 0}var Tf=Vae;var Gae=Vo(function(fe,_e){var Xe=Tf(_e);return Eu(Xe)&&(Xe=void 0),Eu(fe)?_v(fe,Qu(_e,1,Eu,!0),_o(Xe,2)):[]}),cI=Gae;var Hae=Vo(function(fe,_e){var Xe=Tf(_e);return Eu(Xe)&&(Xe=void 0),Eu(fe)?_v(fe,Qu(_e,1,Eu,!0),void 0,Xe):[]}),fI=Hae;var Wae=wm(function(fe,_e){return fe/_e},1),hI=Wae;function Xae(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:qo(_e),Yf(fe,_e<0?0:_e,Lt)):[]}var pI=Xae;function Zae(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:qo(_e),_e=Lt-_e,Yf(fe,0,_e<0?0:_e)):[]}var dI=Zae;function Yae(fe,_e,Xe,Lt){for(var gr=fe.length,Yr=Lt?gr:-1;(Lt?Yr--:++Yr<gr)&&_e(fe[Yr],Yr,fe););return Xe?Yf(fe,Lt?0:Yr,Lt?Yr+1:gr):Yf(fe,Lt?Yr+1:0,Lt?gr:Yr)}var Nm=Yae;function Kae(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3),!0,!0):[]}var vI=Kae;function Jae(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3),!0):[]}var mI=Jae;function $ae(fe){return typeof fe=="function"?fe:Bc}var kh=$ae;function Qae(fe,_e){var Xe=Do(fe)?Nh:Up;return Xe(fe,kh(_e))}var f_=Qae;function eie(fe,_e){for(var Xe=fe==null?0:fe.length;Xe--&&_e(fe[Xe],Xe,fe)!==!1;);return fe}var gI=eie;var tie=yw(!0),Aw=tie;function rie(fe,_e){return fe&&Aw(fe,_e,gu)}var Dy=rie;var aie=_w(Dy,!0),Sw=aie;function iie(fe,_e){var Xe=Do(fe)?gI:Sw;return Xe(fe,kh(_e))}var h_=iie;function nie(fe,_e,Xe){fe=Us(fe),_e=nh(_e);var Lt=fe.length;Xe=Xe===void 0?Lt:ud(qo(Xe),0,Lt);var gr=Xe;return Xe-=_e.length,Xe>=0&&fe.slice(Xe,gr)==_e}var yI=nie;function oie(fe,_e){return Ml(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=oie;function sie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=sie;var lie="[object Map]",uie="[object Set]";function cie(fe){return function(_e){var Xe=jh(_e);return Xe==lie?Sy(_e):Xe==uie?xI(_e):_I(_e,fe(_e))}}var Mw=cie;var fie=Mw(gu),p_=fie;var hie=Mw(Gc),d_=hie;var pie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},die=vy(pie),bI=die;var wI=/[&<>"']/g,vie=RegExp(wI.source);function mie(fe){return fe=Us(fe),fe&&vie.test(fe)?fe.replace(wI,bI):fe}var Ew=mie;var TI=/[\\^$.*+?()[\]{}|]/g,gie=RegExp(TI.source);function yie(fe){return fe=Us(fe),fe&&gie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=yie;function _ie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe<Lt;)if(!_e(fe[Xe],Xe,fe))return!1;return!0}var kw=_ie;function xie(fe,_e){var Xe=!0;return Up(fe,function(Lt,gr,Yr){return Xe=!!_e(Lt,gr,Yr),Xe}),Xe}var SI=xie;function bie(fe,_e,Xe){var Lt=Do(fe)?kw:SI;return Xe&&Nc(fe,_e,Xe)&&(_e=void 0),Lt(fe,_o(_e,3))}var MI=bie;var wie=4294967295;function Tie(fe){return fe?ud(qo(fe),0,wie):0}var Cw=Tie;function Aie(fe,_e,Xe,Lt){var gr=fe.length;for(Xe=qo(Xe),Xe<0&&(Xe=-Xe>gr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:qo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe<Lt;)fe[Xe++]=_e;return fe}var EI=Aie;function Sie(fe,_e,Xe,Lt){var gr=fe==null?0:fe.length;return gr?(Xe&&typeof Xe!="number"&&Nc(fe,_e,Xe)&&(Xe=0,Lt=gr),EI(fe,_e,Xe,Lt)):[]}var kI=Sie;function Mie(fe,_e){var Xe=[];return Up(fe,function(Lt,gr,Yr){_e(Lt,gr,Yr)&&Xe.push(Lt)}),Xe}var Lw=Mie;function Eie(fe,_e){var Xe=Do(fe)?Np:Lw;return Xe(fe,_o(_e,3))}var CI=Eie;function kie(fe){return function(_e,Xe,Lt){var gr=Object(_e);if(!Vc(_e)){var Yr=_o(Xe,3);_e=gu(_e),Xe=function(ei){return Yr(gr[ei],ei,gr)}}var Ea=fe(_e,Xe,Lt);return Ea>-1?gr[Yr?_e[Ea]:Ea]:void 0}}var Pw=kie;var Cie=Math.max;function Lie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:qo(Xe);return gr<0&&(gr=Cie(Lt+gr,0)),Sm(fe,_o(_e,3),gr)}var Iw=Lie;var Pie=Pw(Iw),LI=Pie;function Iie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Yr,Ea){if(_e(gr,Yr,Ea))return Lt=Yr,!1}),Lt}var Rw=Iie;function Rie(fe,_e){return Rw(fe,_o(_e,3),cp)}var PI=Rie;var Die=Math.max,zie=Math.min;function Fie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=qo(Xe),gr=Xe<0?Die(Lt+gr,0):zie(gr,Lt-1)),Sm(fe,_o(_e,3),gr,!0)}var Dw=Fie;var Oie=Pw(Dw),II=Oie;function Bie(fe,_e){return Rw(fe,_o(_e,3),Dy)}var RI=Bie;function Nie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Nie;function Uie(fe,_e){var Xe=-1,Lt=Vc(fe)?Array(fe.length):[];return Up(fe,function(gr,Yr,Ea){Lt[++Xe]=_e(gr,Yr,Ea)}),Lt}var zw=Uie;function jie(fe,_e){var Xe=Do(fe)?Ml:zw;return Xe(fe,_o(_e,3))}var Um=jie;function qie(fe,_e){return Qu(Um(fe,_e),1)}var DI=qie;var Vie=1/0;function Gie(fe,_e){return Qu(Um(fe,_e),Vie)}var zI=Gie;function Hie(fe,_e,Xe){return Xe=Xe===void 0?1:qo(Xe),Qu(Um(fe,_e),Xe)}var FI=Hie;var Wie=1/0;function Xie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Wie):[]}var OI=Xie;function Zie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:qo(_e),Qu(fe,_e)):[]}var BI=Zie;var Yie=512;function Kie(fe){return np(fe,Yie)}var NI=Kie;var Jie=gy("floor"),UI=Jie;var $ie="Expected a function",Qie=8,ene=32,tne=128,rne=256;function ane(fe){return lp(function(_e){var Xe=_e.length,Lt=Xe,gr=zp.prototype.thru;for(fe&&_e.reverse();Lt--;){var Yr=_e[Lt];if(typeof Yr!="function")throw new TypeError($ie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt<Xe;){Yr=_e[Lt];var ei=$g(Yr),oi=ei=="wrapper"?Jg(Yr):void 0;oi&&i_(oi[0])&&oi[1]==(tne|Qie|ene|rne)&&!oi[4].length&&oi[9]==1?Ea=Ea[$g(oi[0])].apply(Ea,oi[3]):Ea=Yr.length==1&&i_(Yr)?Ea[ei]():Ea.thru(Yr)}return function(){var Cn=arguments,xn=Cn[0];if(Ea&&Cn.length==1&&Do(xn))return Ea.plant(xn).value();for(var Fn=0,To=Xe?_e[Fn].apply(this,Cn):xn;++Fn<Xe;)To=_e[Fn].call(this,To);return To}})}var Fw=ane;var ine=Fw(),jI=ine;var nne=Fw(!0),qI=nne;function one(fe,_e){return fe==null?fe:Ly(fe,kh(_e),Gc)}var VI=one;function sne(fe,_e){return fe==null?fe:Aw(fe,kh(_e),Gc)}var GI=sne;function lne(fe,_e){return fe&&cp(fe,kh(_e))}var HI=lne;function une(fe,_e){return fe&&Dy(fe,kh(_e))}var WI=une;function cne(fe){for(var _e=-1,Xe=fe==null?0:fe.length,Lt={};++_e<Xe;){var gr=fe[_e];Lt[gr[0]]=gr[1]}return Lt}var XI=cne;function fne(fe,_e){return Np(_e,function(Xe){return ap(fe[Xe])})}var jm=fne;function hne(fe){return fe==null?[]:jm(fe,gu(fe))}var ZI=hne;function pne(fe){return fe==null?[]:jm(fe,Gc(fe))}var YI=pne;var dne=Object.prototype,vne=dne.hasOwnProperty,mne=Bm(function(fe,_e,Xe){vne.call(fe,Xe)?fe[Xe].push(_e):op(fe,Xe,[_e])}),KI=mne;function gne(fe,_e){return fe>_e}var zy=gne;function yne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var qm=yne;var _ne=qm(zy),JI=_ne;var xne=qm(function(fe,_e){return fe>=_e}),$I=xne;var bne=Object.prototype,wne=bne.hasOwnProperty;function Tne(fe,_e){return fe!=null&&wne.call(fe,_e)}var QI=Tne;function Ane(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Ane;var Sne=Math.max,Mne=Math.min;function Ene(fe,_e,Xe){return fe>=Mne(_e,Xe)&&fe<Sne(_e,Xe)}var t8=Ene;function kne(fe,_e,Xe){return _e=od(_e),Xe===void 0?(Xe=_e,_e=0):Xe=od(Xe),fe=Sh(fe),t8(fe,_e,Xe)}var r8=kne;var Cne="[object String]";function Lne(fe){return typeof fe=="string"||!Do(fe)&&Dl(fe)&&Oc(fe)==Cne}var Vm=Lne;function Pne(fe,_e){return Ml(_e,function(Xe){return fe[Xe]})}var Fy=Pne;function Ine(fe){return fe==null?[]:Fy(fe,gu(fe))}var Ld=Ine;var Rne=Math.max;function Dne(fe,_e,Xe,Lt){fe=Vc(fe)?fe:Ld(fe),Xe=Xe&&!Lt?qo(Xe):0;var gr=fe.length;return Xe<0&&(Xe=Rne(gr+Xe,0)),Vm(fe)?Xe<=gr&&fe.indexOf(_e,Xe)>-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=Dne;var zne=Math.max;function Fne(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:qo(Xe);return gr<0&&(gr=zne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=Fne;function One(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=One;var Bne=Math.min;function Nne(fe,_e,Xe){for(var Lt=Xe?Ry:Mm,gr=fe[0].length,Yr=fe.length,Ea=Yr,ei=Array(Yr),oi=1/0,Cn=[];Ea--;){var xn=fe[Ea];Ea&&_e&&(xn=Ml(xn,wf(_e))),oi=Bne(xn.length,oi),ei[Ea]=!Xe&&(_e||gr>=120&&xn.length>=120)?new zm(Ea&&xn):void 0}xn=fe[0];var Fn=-1,To=ei[0];e:for(;++Fn<gr&&Cn.length<oi;){var ps=xn[Fn],Qs=_e?_e(ps):ps;if(ps=Xe||ps!==0?ps:0,!(To?Gv(To,Qs):Lt(Cn,Qs,Xe))){for(Ea=Yr;--Ea;){var Go=ei[Ea];if(!(Go?Gv(Go,Qs):Lt(fe[Ea],Qs,Xe)))continue e}To&&To.push(Qs),Cn.push(ps)}}return Cn}var Oy=Nne;function Une(fe){return Eu(fe)?fe:[]}var By=Une;var jne=Vo(function(fe){var _e=Ml(fe,By);return _e.length&&_e[0]===fe[0]?Oy(_e):[]}),o8=jne;var qne=Vo(function(fe){var _e=Tf(fe),Xe=Ml(fe,By);return _e===Tf(Xe)?_e=void 0:Xe.pop(),Xe.length&&Xe[0]===fe[0]?Oy(Xe,_o(_e,2)):[]}),s8=qne;var Vne=Vo(function(fe){var _e=Tf(fe),Xe=Ml(fe,By);return _e=typeof _e=="function"?_e:void 0,_e&&Xe.pop(),Xe.length&&Xe[0]===fe[0]?Oy(Xe,void 0,_e):[]}),l8=Vne;function Gne(fe,_e,Xe,Lt){return cp(fe,function(gr,Yr,Ea){_e(Lt,Xe(gr),Yr,Ea)}),Lt}var u8=Gne;function Hne(fe,_e){return function(Xe,Lt){return u8(Xe,fe,_e(Lt),{})}}var Ow=Hne;var Wne=Object.prototype,Xne=Wne.toString,Zne=Ow(function(fe,_e,Xe){_e!=null&&typeof _e.toString!="function"&&(_e=Xne.call(_e)),fe[_e]=Xe},Qg(Bc)),c8=Zne;var f8=Object.prototype,Yne=f8.hasOwnProperty,Kne=f8.toString,Jne=Ow(function(fe,_e,Xe){_e!=null&&typeof _e.toString!="function"&&(_e=Kne.call(_e)),Yne.call(fe,_e)?fe[_e].push(Xe):fe[_e]=[Xe]},_o),h8=Jne;function $ne(fe,_e){return _e.length<2?fe:ld(fe,Yf(_e,0,-1))}var Bw=$ne;function Qne(fe,_e,Xe){_e=Fp(_e,fe),fe=Bw(fe,_e);var Lt=fe==null?fe:fe[Eh(Tf(_e))];return Lt==null?void 0:xf(Lt,fe,Xe)}var xv=Qne;var eoe=Vo(xv),p8=eoe;var toe=Vo(function(fe,_e,Xe){var Lt=-1,gr=typeof _e=="function",Yr=Vc(fe)?Array(fe.length):[];return Up(fe,function(Ea){Yr[++Lt]=gr?xf(_e,Ea,Xe):xv(Ea,_e,Xe)}),Yr}),d8=toe;var roe="[object ArrayBuffer]";function aoe(fe){return Dl(fe)&&Oc(fe)==roe}var v8=aoe;var m8=sp&&sp.isArrayBuffer,ioe=m8?wf(m8):v8,g8=ioe;var noe="[object Boolean]";function ooe(fe){return fe===!0||fe===!1||Dl(fe)&&Oc(fe)==noe}var y8=ooe;var soe="[object Date]";function loe(fe){return Dl(fe)&&Oc(fe)==soe}var _8=loe;var x8=sp&&sp.isDate,uoe=x8?wf(x8):_8,b8=uoe;function coe(fe){return Dl(fe)&&fe.nodeType===1&&!gv(fe)}var w8=coe;var foe="[object Map]",hoe="[object Set]",poe=Object.prototype,doe=poe.hasOwnProperty;function voe(fe){if(fe==null)return!0;if(Vc(fe)&&(Do(fe)||typeof fe=="string"||typeof fe.splice=="function"||Kp(fe)||Ed(fe)||pd(fe)))return!fe.length;var _e=jh(fe);if(_e==foe||_e==hoe)return!fe.size;if(mv(fe))return!ny(fe).length;for(var Xe in fe)if(doe.call(fe,Xe))return!1;return!0}var T8=voe;function moe(fe,_e){return Om(fe,_e)}var A8=moe;function goe(fe,_e,Xe){Xe=typeof Xe=="function"?Xe:void 0;var Lt=Xe?Xe(fe,_e):void 0;return Lt===void 0?Om(fe,_e,void 0,Xe):!!Lt}var S8=goe;var yoe=wu.isFinite;function _oe(fe){return typeof fe=="number"&&yoe(fe)}var M8=_oe;function xoe(fe){return typeof fe=="number"&&fe==qo(fe)}var Nw=xoe;function boe(fe,_e){return fe===_e||My(fe,_e,Ey(_e))}var E8=boe;function woe(fe,_e,Xe){return Xe=typeof Xe=="function"?Xe:void 0,My(fe,_e,Ey(_e),Xe)}var k8=woe;var Toe="[object Number]";function Aoe(fe){return typeof fe=="number"||Dl(fe)&&Oc(fe)==Toe}var Uw=Aoe;function Soe(fe){return Uw(fe)&&fe!=+fe}var C8=Soe;var Moe=Zg?ap:iy,L8=Moe;var Eoe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function koe(fe){if(L8(fe))throw new Error(Eoe);return Tb(fe)}var P8=koe;function Coe(fe){return fe==null}var I8=Coe;function Loe(fe){return fe===null}var R8=Loe;var Poe="[object RegExp]";function Ioe(fe){return Dl(fe)&&Oc(fe)==Poe}var D8=Ioe;var z8=sp&&sp.isRegExp,Roe=z8?wf(z8):D8,Ny=Roe;var F8=9007199254740991;function Doe(fe){return Nw(fe)&&fe>=-F8&&fe<=F8}var O8=Doe;function zoe(fe){return fe===void 0}var B8=zoe;var Foe="[object WeakMap]";function Ooe(fe){return Dl(fe)&&jh(fe)==Foe}var N8=Ooe;var Boe="[object WeakSet]";function Noe(fe){return Dl(fe)&&Oc(fe)==Boe}var U8=Noe;var Uoe=1;function joe(fe){return _o(typeof fe=="function"?fe:up(fe,Uoe))}var j8=joe;var qoe=Array.prototype,Voe=qoe.join;function Goe(fe,_e){return fe==null?"":Voe.call(fe,_e)}var q8=Goe;var Hoe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Hoe;var Woe=Bm(function(fe,_e,Xe){op(fe,Xe,_e)}),G8=Woe;function Xoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Xoe;var Zoe=Math.max,Yoe=Math.min;function Koe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=qo(Xe),gr=gr<0?Zoe(Lt+gr,0):Yoe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Sm(fe,Rb,gr,!0)}var W8=Koe;var Joe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=Joe;var $oe=Wb("toLowerCase"),Z8=$oe;function Qoe(fe,_e){return fe<_e}var Uy=Qoe;var ese=qm(Uy),Y8=ese;var tse=qm(function(fe,_e){return fe<=_e}),K8=tse;function rse(fe,_e){var Xe={};return _e=_o(_e,3),cp(fe,function(Lt,gr,Yr){op(Xe,_e(Lt,gr,Yr),Lt)}),Xe}var J8=rse;function ase(fe,_e){var Xe={};return _e=_o(_e,3),cp(fe,function(Lt,gr,Yr){op(Xe,gr,_e(Lt,gr,Yr))}),Xe}var $8=ase;var ise=1;function nse(fe){return pw(up(fe,ise))}var Q8=nse;var ose=1;function sse(fe,_e){return vw(fe,up(_e,ose))}var eR=sse;function lse(fe,_e,Xe){for(var Lt=-1,gr=fe.length;++Lt<gr;){var Yr=fe[Lt],Ea=_e(Yr);if(Ea!=null&&(ei===void 0?Ea===Ea&&!Rf(Ea):Xe(Ea,ei)))var ei=Ea,oi=Yr}return oi}var Gm=lse;function use(fe){return fe&&fe.length?Gm(fe,Bc,zy):void 0}var tR=use;function cse(fe,_e){return fe&&fe.length?Gm(fe,_o(_e,2),zy):void 0}var rR=cse;function fse(fe,_e){for(var Xe,Lt=-1,gr=fe.length;++Lt<gr;){var Yr=_e(fe[Lt]);Yr!==void 0&&(Xe=Xe===void 0?Yr:Xe+Yr)}return Xe}var jy=fse;var hse=NaN;function pse(fe,_e){var Xe=fe==null?0:fe.length;return Xe?jy(fe,_e)/Xe:hse}var jw=pse;function dse(fe){return jw(fe,Bc)}var aR=dse;function vse(fe,_e){return jw(fe,_o(_e,2))}var iR=vse;var mse=Md(function(fe,_e,Xe){Iy(fe,_e,Xe)}),nR=mse;var gse=Vo(function(fe,_e){return function(Xe){return xv(Xe,fe,_e)}}),oR=gse;var yse=Vo(function(fe,_e){return function(Xe){return xv(fe,Xe,_e)}}),sR=yse;function _se(fe){return fe&&fe.length?Gm(fe,Bc,Uy):void 0}var lR=_se;function xse(fe,_e){return fe&&fe.length?Gm(fe,_o(_e,2),Uy):void 0}var uR=xse;function bse(fe,_e,Xe){var Lt=gu(_e),gr=jm(_e,Lt),Yr=!(Ll(Xe)&&"chain"in Xe)||!!Xe.chain,Ea=ap(fe);return Nh(gr,function(ei){var oi=_e[ei];fe[ei]=oi,Ea&&(fe.prototype[ei]=function(){var Cn=this.__chain__;if(Yr||Cn){var xn=fe(this.__wrapped__),Fn=xn.__actions__=pf(this.__actions__);return Fn.push({func:oi,args:arguments,thisArg:fe}),xn.__chain__=Cn,xn}return oi.apply(fe,Op([this.value()],arguments))})}),fe}var qw=bse;var wse=wm(function(fe,_e){return fe*_e},1),cR=wse;var Tse="Expected a function";function Ase(fe){if(typeof fe!="function")throw new TypeError(Tse);return function(){var _e=arguments;switch(_e.length){case 0:return!fe.call(this);case 1:return!fe.call(this,_e[0]);case 2:return!fe.call(this,_e[0],_e[1]);case 3:return!fe.call(this,_e[0],_e[1],_e[2])}return!fe.apply(this,_e)}}var Hv=Ase;function Sse(fe){for(var _e,Xe=[];!(_e=fe.next()).done;)Xe.push(_e.value);return Xe}var fR=Sse;var Mse="[object Map]",Ese="[object Set]",BA=If?If.iterator:void 0;function kse(fe){if(!fe)return[];if(Vc(fe))return Vm(fe)?Uh(fe):pf(fe);if(BA&&fe[BA])return fR(fe[BA]());var _e=jh(fe),Xe=_e==Mse?Sy:_e==Ese?Fm:Ld;return Xe(fe)}var Vw=kse;function Cse(){this.__values__===void 0&&(this.__values__=Vw(this.value()));var fe=this.__index__>=this.__values__.length,_e=fe?void 0:this.__values__[this.__index__++];return{done:fe,value:_e}}var hR=Cse;function Lse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,ip(_e,Xe)?fe[_e]:void 0}var Gw=Lse;function Pse(fe,_e){return fe&&fe.length?Gw(fe,qo(_e)):void 0}var pR=Pse;function Ise(fe){return fe=qo(fe),Vo(function(_e){return Gw(_e,fe)})}var dR=Ise;function Rse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Rse;function Dse(fe){return gv(fe)?void 0:fe}var vR=Dse;var zse=1,Fse=2,Ose=4,Bse=lp(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Ml(_e,function(Yr){return Yr=Fp(Yr,fe),Lt||(Lt=Yr.length>1),Yr}),Mh(fe,by(fe),Xe),Lt&&(Xe=up(Xe,zse|Fse|Ose,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Bse;function Nse(fe,_e,Xe,Lt){if(!Ll(fe))return fe;_e=Fp(_e,fe);for(var gr=-1,Yr=_e.length,Ea=Yr-1,ei=fe;ei!=null&&++gr<Yr;){var oi=Eh(_e[gr]),Cn=Xe;if(oi==="__proto__"||oi==="constructor"||oi==="prototype")return fe;if(gr!=Ea){var xn=ei[oi];Cn=Lt?Lt(xn,oi,ei):void 0,Cn===void 0&&(Cn=Ll(xn)?xn:ip(_e[gr+1])?[]:{})}vv(ei,oi,Cn),ei=ei[oi]}return fe}var bv=Nse;function Use(fe,_e,Xe){for(var Lt=-1,gr=_e.length,Yr={};++Lt<gr;){var Ea=_e[Lt],ei=ld(fe,Ea);Xe(ei,Ea)&&bv(Yr,Fp(Ea,fe),ei)}return Yr}var Hw=Use;function jse(fe,_e){if(fe==null)return{};var Xe=Ml(by(fe),function(Lt){return[Lt]});return _e=_o(_e),Hw(fe,Xe,function(Lt,gr){return _e(Lt,gr[0])})}var Ww=jse;function qse(fe,_e){return Ww(fe,Hv(_o(_e)))}var gR=qse;function Vse(fe){return Gb(2,fe)}var yR=Vse;function Gse(fe,_e){var Xe=fe.length;for(fe.sort(_e);Xe--;)fe[Xe]=fe[Xe].value;return fe}var _R=Gse;function Hse(fe,_e){if(fe!==_e){var Xe=fe!==void 0,Lt=fe===null,gr=fe===fe,Yr=Rf(fe),Ea=_e!==void 0,ei=_e===null,oi=_e===_e,Cn=Rf(_e);if(!ei&&!Cn&&!Yr&&fe>_e||Yr&&Ea&&oi&&!ei&&!Cn||Lt&&Ea&&oi||!Xe&&oi||!gr)return 1;if(!Lt&&!Yr&&!Cn&&fe<_e||Cn&&Xe&&gr&&!Lt&&!Yr||ei&&Xe&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Hse;function Wse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Yr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt<Ea;){var oi=Xw(gr[Lt],Yr[Lt]);if(oi){if(Lt>=ei)return oi;var Cn=Xe[Lt];return oi*(Cn=="desc"?-1:1)}}return fe.index-_e.index}var xR=Wse;function Xse(fe,_e,Xe){_e.length?_e=Ml(_e,function(Yr){return Do(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):_e=[Bc];var Lt=-1;_e=Ml(_e,wf(_o));var gr=zw(fe,function(Yr,Ea,ei){var oi=Ml(_e,function(Cn){return Cn(Yr)});return{criteria:oi,index:++Lt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Xe)})}var Zw=Xse;function Zse(fe,_e,Xe,Lt){return fe==null?[]:(Do(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,Do(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Zse;function Yse(fe){return lp(function(_e){return _e=Ml(_e,wf(_o)),Vo(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Yse;var Kse=Vy(Ml),wR=Kse;var Jse=Vo,TR=Jse;var $se=Math.min,Qse=TR(function(fe,_e){_e=_e.length==1&&Do(_e[0])?Ml(_e[0],wf(_o)):Ml(Qu(_e,1),wf(_o));var Xe=_e.length;return Vo(function(Lt){for(var gr=-1,Yr=$se(Lt.length,Xe);++gr<Yr;)Lt[gr]=_e[gr].call(this,Lt[gr]);return xf(fe,this,Lt)})}),AR=Qse;var ele=Vy(kw),SR=ele;var tle=Vy(Ay),MR=tle;var rle=9007199254740991,ale=Math.floor;function ile(fe,_e){var Xe="";if(!fe||_e<1||_e>rle)return Xe;do _e%2&&(Xe+=fe),_e=ale(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=ile;var nle=Cy("length"),ER=nle;var CR="\\ud800-\\udfff",ole="\\u0300-\\u036f",sle="\\ufe20-\\ufe2f",lle="\\u20d0-\\u20ff",ule=ole+sle+lle,cle="\\ufe0e\\ufe0f",fle="["+CR+"]",NA="["+ule+"]",UA="\\ud83c[\\udffb-\\udfff]",hle="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",ple="\\u200d",RR=hle+"?",DR="["+cle+"]?",dle="(?:"+ple+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",vle=DR+RR+dle,mle="(?:"+[LR+NA+"?",NA,PR,IR,fle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+mle+vle,"g");function gle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=gle;function yle(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=yle;var _le=Math.ceil;function xle(fe,_e){_e=_e===void 0?" ":nh(_e);var Xe=_e.length;if(Xe<2)return Xe?m_(_e,fe):_e;var Lt=m_(_e,_le(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=xle;var ble=Math.ceil,wle=Math.floor;function Tle(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(wle(gr),Xe)+fe+H0(ble(gr),Xe)}var FR=Tle;function Ale(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Sle;var Mle=/^\s+/,Ele=wu.parseInt;function kle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),Ele(Us(fe).replace(Mle,""),_e||0)}var NR=kle;var Cle=32,jA=Vo(function(fe,_e){var Xe=Yp(_e,Sd(jA));return np(fe,Cle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Lle=64,qA=Vo(function(fe,_e){var Xe=Yp(_e,Sd(qA));return np(fe,Lle,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ple=Bm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ple;function Ile(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Ile;var Rle=lp(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Rle;function Dle(fe){for(var _e,Xe=this;Xe instanceof Tm;){var Lt=Cb(Xe);Lt.__index__=0,Lt.__values__=void 0,_e?gr.__wrapped__=Lt:_e=Lt;var gr=Lt;Xe=Xe.__wrapped__}return gr.__wrapped__=fe,_e}var GR=Dle;function zle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=zle;function Fle(fe,_e,Xe,Lt){for(var gr=Xe-1,Yr=fe.length;++gr<Yr;)if(Lt(fe[gr],_e))return gr;return-1}var WR=Fle;var Ole=Array.prototype,XR=Ole.splice;function Ble(fe,_e,Xe,Lt){var gr=Lt?WR:Ad,Yr=-1,Ea=_e.length,ei=fe;for(fe===_e&&(_e=pf(_e)),Xe&&(ei=Ml(fe,wf(Xe)));++Yr<Ea;)for(var oi=0,Cn=_e[Yr],xn=Xe?Xe(Cn):Cn;(oi=gr(ei,xn,oi,Lt))>-1;)ei!==fe&&XR.call(ei,oi,1),XR.call(fe,oi,1);return fe}var Gy=Ble;function Nle(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Nle;var Ule=Vo(Kw),ZR=Ule;function jle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,_o(Xe,2)):fe}var YR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=qle;var Vle=Array.prototype,Gle=Vle.splice;function Hle(fe,_e){for(var Xe=fe?_e.length:0,Lt=Xe-1;Xe--;){var gr=_e[Xe];if(Xe==Lt||gr!==Yr){var Yr=gr;ip(gr)?Gle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Hle;var Wle=lp(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Ml(_e,function(gr){return ip(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Wle;var Xle=Math.floor,Zle=Math.random;function Yle(fe,_e){return fe+Xle(Zle()*(_e-fe+1))}var Hy=Yle;var Kle=parseFloat,Jle=Math.min,$le=Math.random;function Qle(fe,_e,Xe){if(Xe&&typeof Xe!="boolean"&&Nc(fe,_e,Xe)&&(_e=Xe=void 0),Xe===void 0&&(typeof _e=="boolean"?(Xe=_e,_e=void 0):typeof fe=="boolean"&&(Xe=fe,fe=void 0)),fe===void 0&&_e===void 0?(fe=0,_e=1):(fe=od(fe),_e===void 0?(_e=fe,fe=0):_e=od(_e)),fe>_e){var Lt=fe;fe=_e,_e=Lt}if(Xe||fe%1||_e%1){var gr=$le();return Jle(fe+gr*(_e-fe+Kle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=Qle;var eue=Math.ceil,tue=Math.max;function rue(fe,_e,Xe,Lt){for(var gr=-1,Yr=tue(eue((_e-fe)/(Xe||1)),0),Ea=Array(Yr);Yr--;)Ea[Lt?Yr:++gr]=fe,fe+=Xe;return Ea}var QR=rue;function aue(fe){return function(_e,Xe,Lt){return Lt&&typeof Lt!="number"&&Nc(_e,Xe,Lt)&&(Xe=Lt=void 0),_e=od(_e),Xe===void 0?(Xe=_e,_e=0):Xe=od(Xe),Lt=Lt===void 0?_e<Xe?1:-1:od(Lt),QR(_e,Xe,Lt,fe)}}var $w=aue;var iue=$w(),e4=iue;var nue=$w(!0),t4=nue;var oue=256,sue=lp(function(fe,_e){return np(fe,oue,void 0,void 0,void 0,_e)}),r4=sue;function lue(fe,_e,Xe,Lt,gr){return gr(fe,function(Yr,Ea,ei){Xe=Lt?(Lt=!1,Yr):_e(Xe,Yr,Ea,ei)}),Xe}var Qw=lue;function uue(fe,_e,Xe){var Lt=Do(fe)?dy:Qw,gr=arguments.length<3;return Lt(fe,_o(_e,4),Xe,gr,Up)}var a4=uue;function cue(fe,_e,Xe,Lt){var gr=fe==null?0:fe.length;for(Lt&&gr&&(Xe=fe[--gr]);gr--;)Xe=_e(Xe,fe[gr],gr,fe);return Xe}var i4=cue;function fue(fe,_e,Xe){var Lt=Do(fe)?i4:Qw,gr=arguments.length<3;return Lt(fe,_o(_e,4),Xe,gr,Sw)}var n4=fue;function hue(fe,_e){var Xe=Do(fe)?Np:Lw;return Xe(fe,Hv(_o(_e,3)))}var o4=hue;function pue(fe,_e){var Xe=[];if(!(fe&&fe.length))return Xe;var Lt=-1,gr=[],Yr=fe.length;for(_e=_o(_e,3);++Lt<Yr;){var Ea=fe[Lt];_e(Ea,Lt,fe)&&(Xe.push(Ea),gr.push(Lt))}return Jw(fe,gr),Xe}var s4=pue;function due(fe,_e,Xe){return(Xe?Nc(fe,_e,Xe):_e===void 0)?_e=1:_e=qo(_e),m_(Us(fe),_e)}var l4=due;function vue(){var fe=arguments,_e=Us(fe[0]);return fe.length<3?_e:_e.replace(fe[1],fe[2])}var u4=vue;var mue="Expected a function";function gue(fe,_e){if(typeof fe!="function")throw new TypeError(mue);return _e=_e===void 0?_e:qo(_e),Vo(fe,_e)}var c4=gue;function yue(fe,_e,Xe){_e=Fp(_e,fe);var Lt=-1,gr=_e.length;for(gr||(gr=1,fe=void 0);++Lt<gr;){var Yr=fe?.[Eh(_e[Lt])];Yr===void 0&&(Lt=gr,Yr=Xe),fe=ap(Yr)?Yr.call(fe):Yr}return fe}var f4=yue;var _ue=Array.prototype,xue=_ue.reverse;function bue(fe){return fe==null?fe:xue.call(fe)}var g_=bue;var wue=gy("round"),h4=wue;function Tue(fe){var _e=fe.length;return _e?fe[Hy(0,_e-1)]:void 0}var e2=Tue;function Aue(fe){return e2(Ld(fe))}var p4=Aue;function Sue(fe){var _e=Do(fe)?e2:p4;return _e(fe)}var d4=Sue;function Mue(fe,_e){var Xe=-1,Lt=fe.length,gr=Lt-1;for(_e=_e===void 0?Lt:_e;++Xe<_e;){var Yr=Hy(Xe,gr),Ea=fe[Yr];fe[Yr]=fe[Xe],fe[Xe]=Ea}return fe.length=_e,fe}var Hm=Mue;function Eue(fe,_e){return Hm(pf(fe),ud(_e,0,fe.length))}var v4=Eue;function kue(fe,_e){var Xe=Ld(fe);return Hm(Xe,ud(_e,0,Xe.length))}var m4=kue;function Cue(fe,_e,Xe){(Xe?Nc(fe,_e,Xe):_e===void 0)?_e=1:_e=qo(_e);var Lt=Do(fe)?v4:m4;return Lt(fe,_e)}var g4=Cue;function Lue(fe,_e,Xe){return fe==null?fe:bv(fe,_e,Xe)}var y4=Lue;function Pue(fe,_e,Xe,Lt){return Lt=typeof Lt=="function"?Lt:void 0,fe==null?fe:bv(fe,_e,Xe,Lt)}var _4=Pue;function Iue(fe){return Hm(pf(fe))}var x4=Iue;function Rue(fe){return Hm(Ld(fe))}var b4=Rue;function Due(fe){var _e=Do(fe)?x4:b4;return _e(fe)}var w4=Due;var zue="[object Map]",Fue="[object Set]";function Oue(fe){if(fe==null)return 0;if(Vc(fe))return Vm(fe)?Pd(fe):fe.length;var _e=jh(fe);return _e==zue||_e==Fue?fe.size:ny(fe).length}var T4=Oue;function Bue(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(Xe&&typeof Xe!="number"&&Nc(fe,_e,Xe)?(_e=0,Xe=Lt):(_e=_e==null?0:qo(_e),Xe=Xe===void 0?Lt:qo(Xe)),Yf(fe,_e,Xe)):[]}var A4=Bue;var Nue=Cd(function(fe,_e,Xe){return fe+(Xe?"_":"")+_e.toLowerCase()}),S4=Nue;function Uue(fe,_e){var Xe;return Up(fe,function(Lt,gr,Yr){return Xe=_e(Lt,gr,Yr),!Xe}),!!Xe}var M4=Uue;function jue(fe,_e,Xe){var Lt=Do(fe)?Ay:M4;return Xe&&Nc(fe,_e,Xe)&&(_e=void 0),Lt(fe,_o(_e,3))}var E4=jue;var que=Vo(function(fe,_e){if(fe==null)return[];var Xe=_e.length;return Xe>1&&Nc(fe,_e[0],_e[1])?_e=[]:Xe>2&&Nc(_e[0],_e[1],_e[2])&&(_e=[_e[0]]),Zw(fe,Qu(_e,1),[])}),k4=que;var Vue=4294967295,Gue=Vue-1,Hue=Math.floor,Wue=Math.min;function Xue(fe,_e,Xe,Lt){var gr=0,Yr=fe==null?0:fe.length;if(Yr===0)return 0;_e=Xe(_e);for(var Ea=_e!==_e,ei=_e===null,oi=Rf(_e),Cn=_e===void 0;gr<Yr;){var xn=Hue((gr+Yr)/2),Fn=Xe(fe[xn]),To=Fn!==void 0,ps=Fn===null,Qs=Fn===Fn,Go=Rf(Fn);if(Ea)var He=Lt||Qs;else Cn?He=Qs&&(Lt||To):ei?He=Qs&&To&&(Lt||!ps):oi?He=Qs&&To&&!ps&&(Lt||!Go):ps||Go?He=!1:He=Lt?Fn<=_e:Fn<_e;He?gr=xn+1:Yr=xn}return Wue(Yr,Gue)}var Wy=Xue;var Zue=4294967295,Yue=Zue>>>1;function Kue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Yue){for(;Lt<gr;){var Yr=Lt+gr>>>1,Ea=fe[Yr];Ea!==null&&!Rf(Ea)&&(Xe?Ea<=_e:Ea<_e)?Lt=Yr+1:gr=Yr}return gr}return Wy(fe,_e,Bc,Xe)}var Wm=Kue;function Jue(fe,_e){return Wm(fe,_e)}var C4=Jue;function $ue(fe,_e,Xe){return Wy(fe,_e,_o(Xe,2))}var L4=$ue;function Que(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Wm(fe,_e);if(Lt<Xe&&oh(fe[Lt],_e))return Lt}return-1}var P4=Que;function ece(fe,_e){return Wm(fe,_e,!0)}var I4=ece;function tce(fe,_e,Xe){return Wy(fe,_e,_o(Xe,2),!0)}var R4=tce;function rce(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Wm(fe,_e,!0)-1;if(oh(fe[Lt],_e))return Lt}return-1}var D4=rce;function ace(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Yr=[];++Xe<Lt;){var Ea=fe[Xe],ei=_e?_e(Ea):Ea;if(!Xe||!oh(ei,oi)){var oi=ei;Yr[gr++]=Ea===0?0:Ea}}return Yr}var t2=ace;function ice(fe){return fe&&fe.length?t2(fe):[]}var z4=ice;function nce(fe,_e){return fe&&fe.length?t2(fe,_o(_e,2)):[]}var F4=nce;var oce=4294967295;function sce(fe,_e,Xe){return Xe&&typeof Xe!="number"&&Nc(fe,_e,Xe)&&(_e=Xe=void 0),Xe=Xe===void 0?oce:Xe>>>0,Xe?(fe=Us(fe),fe&&(typeof _e=="string"||_e!=null&&!Ny(_e))&&(_e=nh(_e),!_e&&kd(fe))?Bp(Uh(fe),0,Xe):fe.split(_e,Xe)):[]}var O4=sce;var lce="Expected a function",uce=Math.max;function cce(fe,_e){if(typeof fe!="function")throw new TypeError(lce);return _e=_e==null?0:uce(qo(_e),0),Vo(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=cce;var fce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=fce;function hce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(qo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=hce;function pce(){return{}}var j4=pce;function dce(){return""}var q4=dce;function vce(){return!0}var V4=vce;var mce=wm(function(fe,_e){return fe-_e},0),G4=mce;function gce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=gce;function yce(fe,_e){return fe&&fe.length?jy(fe,_o(_e,2)):0}var W4=yce;function _ce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=_ce;function xce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:qo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=xce;function bce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:qo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=bce;function wce(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3),!1,!0):[]}var K4=wce;function Tce(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3)):[]}var J4=Tce;function Ace(fe,_e){return _e(fe),fe}var $4=Ace;var Q4=Object.prototype,Sce=Q4.hasOwnProperty;function Mce(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Sce.call(Lt,Xe)?_e:fe}var VA=Mce;var Ece={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function kce(fe){return"\\"+Ece[fe]}var eD=kce;var Cce=/<%=([\s\S]+?)%>/g,r2=Cce;var Lce=/<%-([\s\S]+?)%>/g,tD=Lce;var Pce=/<%([\s\S]+?)%>/g,rD=Pce;var Ice={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Ice;var Rce="Invalid `variable` option passed into `_.template`",Dce=/\b__p \+= '';/g,zce=/\b(__p \+=) '' \+/g,Fce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oce=/[()=,{}\[\]\/\s]/,Bce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Nce=/['\n\r\u2028\u2029\\]/g,Uce=Object.prototype,aD=Uce.hasOwnProperty;function jce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=km({},_e,Lt,VA);var gr=km({},_e.imports,Lt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Cn=0,xn=_e.interpolate||a2,Fn="__p += '",To=RegExp((_e.escape||a2).source+"|"+xn.source+"|"+(xn===r2?Bce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),ps=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+`
`:"";fe.replace(To,function(He,Kl,nu,jp,zf,fp){return nu||(nu=jp),Fn+=fe.slice(Cn,fp).replace(Nce,eD),Kl&&(ei=!0,Fn+=`' +
__e(`+Kl+`) +
'`),zf&&(oi=!0,Fn+=`';
`+zf+`;
__p += '`),nu&&(Fn+=`' +
((__t = (`+nu+`)) == null ? '' : __t) +
'`),Cn=fp+He.length,He}),Fn+=`';
`;var Qs=aD.call(_e,"variable")&&_e.variable;if(!Qs)Fn=`with (obj) {
`+Fn+`
}
`;else if(Oce.test(Qs))throw new Error(Rce);Fn=(oi?Fn.replace(Dce,""):Fn).replace(zce,"$1").replace(Fce,"$1;"),Fn="function("+(Qs||"obj")+`) {
`+(Qs?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(oi?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Fn+`return __p
}`;var Go=Vb(function(){return Function(Yr,ps+"return "+Fn).apply(void 0,Ea)});if(Go.source=Fn,hy(Go))throw Go;return Go}var iD=jce;var qce="Expected a function";function Vce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(qce);return Ll(Xe)&&(Lt="leading"in Xe?!!Xe.leading:Lt,gr="trailing"in Xe?!!Xe.trailing:gr),xw(fe,_e,{leading:Lt,maxWait:_e,trailing:gr})}var nD=Vce;function Gce(fe,_e){return _e(fe)}var Wv=Gce;var Hce=9007199254740991,GA=4294967295,Wce=Math.min;function Xce(fe,_e){if(fe=qo(fe),fe<1||fe>Hce)return[];var Xe=GA,Lt=Wce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe<fe;)_e(Xe);return gr}var oD=Xce;function Zce(){return this}var sD=Zce;function Yce(fe,_e){var Xe=fe;return Xe instanceof Bl&&(Xe=Xe.value()),dy(_e,function(Lt,gr){return gr.func.apply(gr.thisArg,Op([Lt],gr.args))},Xe)}var i2=Yce;function Kce(){return i2(this.__wrapped__,this.__actions__)}var Xm=Kce;function Jce(fe){return Us(fe).toLowerCase()}var lD=Jce;function $ce(fe){return Do(fe)?Ml(fe,Eh):Rf(fe)?[fe]:pf(jb(Us(fe)))}var uD=$ce;var cD=9007199254740991;function Qce(fe){return fe?ud(qo(fe),-cD,cD):fe===0?fe:0}var fD=Qce;function efe(fe){return Us(fe).toUpperCase()}var hD=efe;function tfe(fe,_e,Xe){var Lt=Do(fe),gr=Lt||Kp(fe)||Ed(fe);if(_e=_o(_e,4),Xe==null){var Yr=fe&&fe.constructor;gr?Xe=Lt?new Yr:[]:Ll(fe)?Xe=ap(Yr)?Td(Rm(fe)):{}:Xe={}}return(gr?Nh:cp)(fe,function(Ea,ei,oi){return _e(Xe,Ea,ei,oi)}),Xe}var pD=tfe;function rfe(fe,_e){for(var Xe=fe.length;Xe--&&Ad(_e,fe[Xe],0)>-1;);return Xe}var n2=rfe;function afe(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe<Lt&&Ad(_e,fe[Xe],0)>-1;);return Xe}var o2=afe;function ife(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return wb(fe);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=Uh(_e),Yr=o2(Lt,gr),Ea=n2(Lt,gr)+1;return Bp(Lt,Yr,Ea).join("")}var dD=ife;function nfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.slice(0,bb(fe)+1);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=n2(Lt,Uh(_e))+1;return Bp(Lt,0,gr).join("")}var vD=nfe;var ofe=/^\s+/;function sfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(ofe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=sfe;var lfe=30,ufe="...",cfe=/\w*$/;function ffe(fe,_e){var Xe=lfe,Lt=ufe;if(Ll(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?qo(_e.length):Xe,Lt="omission"in _e?nh(_e.omission):Lt}fe=Us(fe);var Yr=fe.length;if(kd(fe)){var Ea=Uh(fe);Yr=Ea.length}if(Xe>=Yr)return fe;var ei=Xe-Pd(Lt);if(ei<1)return Lt;var oi=Ea?Bp(Ea,0,ei).join(""):fe.slice(0,ei);if(gr===void 0)return oi+Lt;if(Ea&&(ei+=oi.length-ei),Ny(gr)){if(fe.slice(ei).search(gr)){var Cn,xn=oi;for(gr.global||(gr=RegExp(gr.source,Us(cfe.exec(gr))+"g")),gr.lastIndex=0;Cn=gr.exec(xn);)var Fn=Cn.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var To=oi.lastIndexOf(gr);To>-1&&(oi=oi.slice(0,To))}return oi+Lt}var gD=ffe;function hfe(fe){return Fb(fe,1)}var yD=hfe;var pfe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},dfe=vy(pfe),_D=dfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,vfe=RegExp(xD.source);function mfe(fe){return fe=Us(fe),fe&&vfe.test(fe)?fe.replace(xD,_D):fe}var bD=mfe;var gfe=1/0,yfe=Dm&&1/Fm(new Dm([,-0]))[1]==gfe?function(fe){return new Dm(fe)}:Kg,wD=yfe;var _fe=200;function xfe(fe,_e,Xe){var Lt=-1,gr=Mm,Yr=fe.length,Ea=!0,ei=[],oi=ei;if(Xe)Ea=!1,gr=Ry;else if(Yr>=_fe){var Cn=_e?null:wD(fe);if(Cn)return Fm(Cn);Ea=!1,gr=Gv,oi=new zm}else oi=_e?[]:ei;e:for(;++Lt<Yr;){var xn=fe[Lt],Fn=_e?_e(xn):xn;if(xn=Xe||xn!==0?xn:0,Ea&&Fn===Fn){for(var To=oi.length;To--;)if(oi[To]===Fn)continue e;_e&&oi.push(Fn),ei.push(xn)}else gr(oi,Fn,Xe)||(oi!==ei&&oi.push(Fn),ei.push(xn))}return ei}var Jp=xfe;var bfe=Vo(function(fe){return Jp(Qu(fe,1,Eu,!0))}),TD=bfe;var wfe=Vo(function(fe){var _e=Tf(fe);return Eu(_e)&&(_e=void 0),Jp(Qu(fe,1,Eu,!0),_o(_e,2))}),AD=wfe;var Tfe=Vo(function(fe){var _e=Tf(fe);return _e=typeof _e=="function"?_e:void 0,Jp(Qu(fe,1,Eu,!0),void 0,_e)}),SD=Tfe;function Afe(fe){return fe&&fe.length?Jp(fe):[]}var MD=Afe;function Sfe(fe,_e){return fe&&fe.length?Jp(fe,_o(_e,2)):[]}var ED=Sfe;function Mfe(fe,_e){return _e=typeof _e=="function"?_e:void 0,fe&&fe.length?Jp(fe,void 0,_e):[]}var kD=Mfe;var Efe=0;function kfe(fe){var _e=++Efe;return Us(fe)+_e}var CD=kfe;function Cfe(fe,_e){return fe==null?!0:qy(fe,_e)}var LD=Cfe;var Lfe=Math.max;function Pfe(fe){if(!(fe&&fe.length))return[];var _e=0;return fe=Np(fe,function(Xe){if(Eu(Xe))return _e=Lfe(Xe.length,_e),!0}),ay(_e,function(Xe){return Ml(fe,Cy(Xe))})}var Xy=Pfe;function Ife(fe,_e){if(!(fe&&fe.length))return[];var Xe=Xy(fe);return _e==null?Xe:Ml(Xe,function(Lt){return xf(_e,void 0,Lt)})}var s2=Ife;function Rfe(fe,_e,Xe,Lt){return bv(fe,_e,Xe(ld(fe,_e)),Lt)}var l2=Rfe;function Dfe(fe,_e,Xe){return fe==null?fe:l2(fe,_e,kh(Xe))}var PD=Dfe;function zfe(fe,_e,Xe,Lt){return Lt=typeof Lt=="function"?Lt:void 0,fe==null?fe:l2(fe,_e,kh(Xe),Lt)}var ID=zfe;var Ffe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toUpperCase()}),RD=Ffe;function Ofe(fe){return fe==null?[]:Fy(fe,Gc(fe))}var DD=Ofe;var Bfe=Vo(function(fe,_e){return Eu(fe)?_v(fe,_e):[]}),zD=Bfe;function Nfe(fe,_e){return Yw(kh(_e),fe)}var FD=Nfe;var Ufe=lp(function(fe){var _e=fe.length,Xe=_e?fe[0]:0,Lt=this.__wrapped__,gr=function(Yr){return fy(Yr,fe)};return _e>1||this.__actions__.length||!(Lt instanceof Bl)||!ip(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Wv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Yr){return _e&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=Ufe;function jfe(){return Kb(this)}var BD=jfe;function qfe(){var fe=this.__wrapped__;if(fe instanceof Bl){var _e=fe;return this.__actions__.length&&(_e=new Bl(this)),_e=_e.reverse(),_e.__actions__.push({func:Wv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=qfe;function Vfe(fe,_e,Xe){var Lt=fe.length;if(Lt<2)return Lt?Jp(fe[0]):[];for(var gr=-1,Yr=Array(Lt);++gr<Lt;)for(var Ea=fe[gr],ei=-1;++ei<Lt;)ei!=gr&&(Yr[gr]=_v(Yr[gr]||Ea,fe[ei],_e,Xe));return Jp(Qu(Yr,1),_e,Xe)}var Zy=Vfe;var Gfe=Vo(function(fe){return Zy(Np(fe,Eu))}),UD=Gfe;var Hfe=Vo(function(fe){var _e=Tf(fe);return Eu(_e)&&(_e=void 0),Zy(Np(fe,Eu),_o(_e,2))}),jD=Hfe;var Wfe=Vo(function(fe){var _e=Tf(fe);return _e=typeof _e=="function"?_e:void 0,Zy(Np(fe,Eu),void 0,_e)}),qD=Wfe;var Xfe=Vo(Xy),VD=Xfe;function Zfe(fe,_e,Xe){for(var Lt=-1,gr=fe.length,Yr=_e.length,Ea={};++Lt<gr;){var ei=Lt<Yr?_e[Lt]:void 0;Xe(Ea,fe[Lt],ei)}return Ea}var u2=Zfe;function Yfe(fe,_e){return u2(fe||[],_e||[],vv)}var GD=Yfe;function Kfe(fe,_e){return u2(fe||[],_e||[],bv)}var HD=Kfe;var Jfe=Vo(function(fe){var _e=fe.length,Xe=_e>1?fe[_e-1]:void 0;return Xe=typeof Xe=="function"?(fe.pop(),Xe):void 0,s2(fe,Xe)}),WD=Jfe;var ms={chunk:GL,compact:CP,concat:LP,difference:uI,differenceBy:cI,differenceWith:fI,drop:pI,dropRight:dI,dropRightWhile:vI,dropWhile:mI,fill:kI,findIndex:Iw,findLastIndex:Dw,first:v_,flatten:qb,flattenDeep:OI,flattenDepth:BI,fromPairs:XI,head:v_,indexOf:i8,initial:n8,intersection:o8,intersectionBy:s8,intersectionWith:l8,join:q8,last:Tf,lastIndexOf:W8,nth:pR,pull:ZR,pullAll:Kw,pullAllBy:YR,pullAllWith:KR,pullAt:JR,remove:s4,reverse:g_,slice:A4,sortedIndex:C4,sortedIndexBy:L4,sortedIndexOf:P4,sortedLastIndex:I4,sortedLastIndexBy:R4,sortedLastIndexOf:D4,sortedUniq:z4,sortedUniqBy:F4,tail:X4,take:Z4,takeRight:Y4,takeRightWhile:K4,takeWhile:J4,union:TD,unionBy:AD,unionWith:SD,uniq:MD,uniqBy:ED,uniqWith:kD,unzip:Xy,unzipWith:s2,without:zD,xor:UD,xorBy:jD,xorWith:qD,zip:VD,zipObject:GD,zipObjectDeep:HD,zipWith:WD};var xc={countBy:YP,each:f_,eachRight:h_,every:MI,filter:CI,find:LI,findLast:II,flatMap:DI,flatMapDeep:zI,flatMapDepth:FI,forEach:f_,forEachRight:h_,groupBy:KI,includes:a8,invokeMap:d8,keyBy:G8,map:Um,orderBy:bR,partition:jR,reduce:a4,reduceRight:n4,reject:o4,sample:d4,sampleSize:g4,shuffle:w4,size:T4,some:E4,sortBy:k4};var HA={now:Py};var Df={after:aC,ary:Fb,before:Gb,bind:Hb,bindKey:fL,curry:JP,curryRight:$P,debounce:xw,defer:sI,delay:lI,flip:NI,memoize:Ub,negate:Hv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Hs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:Do,isArrayBuffer:g8,isArrayLike:Vc,isArrayLikeObject:Eu,isBoolean:y8,isBuffer:Kp,isDate:b8,isElement:w8,isEmpty:T8,isEqual:A8,isEqualWith:S8,isError:hy,isFinite:M8,isFunction:ap,isInteger:Nw,isLength:Em,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Ll,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Vm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:qo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var xp={add:eC,ceil:VL,divide:hI,floor:UI,max:tR,maxBy:rR,mean:aR,meanBy:iR,min:lR,minBy:uR,multiply:cR,round:h4,subtract:G4,sum:H4,sumBy:W4};var __={clamp:HL,inRange:r8,random:$R};var dl={assign:BC,assignIn:s_,assignInWith:km,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:km,findKey:PI,findLastKey:RI,forIn:VI,forInRight:GI,forOwn:HI,forOwnRight:WI,functions:ZI,functionsIn:YI,get:cy,has:e8,hasIn:ky,invert:c8,invertBy:h8,invoke:p8,keys:gu,keysIn:Gc,mapKeys:J8,mapValues:$8,merge:nR,mergeWith:ww,omit:mR,omitBy:gR,pick:VR,pickBy:Ww,result:f4,set:y4,setWith:_4,toPairs:p_,toPairsIn:d_,transform:pD,unset:LD,update:PD,updateWith:ID,values:Ld,valuesIn:DD};var Id={at:OD,chain:Kb,commit:kP,lodash:da,next:hR,plant:GR,reverse:ND,tap:$4,thru:Wv,toIterator:sD,toJSON:Xm,value:Xm,valueOf:Xm,wrapperChain:BD};var ju={camelCase:jL,capitalize:Xb,deburr:Zb,endsWith:yI,escape:Ew,escapeRegExp:AI,kebabCase:V8,lowerCase:X8,lowerFirst:Z8,pad:FR,padEnd:OR,padStart:BR,parseInt:NR,repeat:l4,replace:u4,snakeCase:S4,split:O4,startCase:N4,startsWith:U4,template:iD,templateSettings:y_,toLower:lD,toUpper:hD,trim:dD,trimEnd:vD,trimStart:mD,truncate:gD,unescape:bD,upperCase:RD,upperFirst:py,words:Yb};var ec={attempt:Vb,bindAll:cL,cond:VP,conforms:HP,constant:Qg,defaultTo:QP,flow:jI,flowRight:qI,identity:Bc,iteratee:j8,matches:Q8,matchesProperty:eR,method:oR,methodOf:sR,mixin:qw,noop:Kg,nthArg:dR,over:wR,overEvery:SR,overSome:MR,property:mw,propertyOf:HR,range:e4,rangeRight:t4,stubArray:_y,stubFalse:iy,stubObject:j4,stubString:q4,stubTrue:V4,times:oD,toPath:uD,uniqueId:CD};function $fe(){var fe=new Bl(this.__wrapped__);return fe.__actions__=pf(this.__actions__),fe.__dir__=this.__dir__,fe.__filtered__=this.__filtered__,fe.__iteratees__=pf(this.__iteratees__),fe.__takeCount__=this.__takeCount__,fe.__views__=pf(this.__views__),fe}var XD=$fe;function Qfe(){if(this.__filtered__){var fe=new Bl(this);fe.__dir__=-1,fe.__filtered__=!0}else fe=this.clone(),fe.__dir__*=-1;return fe}var ZD=Qfe;var ehe=Math.max,the=Math.min;function rhe(fe,_e,Xe){for(var Lt=-1,gr=Xe.length;++Lt<gr;){var Yr=Xe[Lt],Ea=Yr.size;switch(Yr.type){case"drop":fe+=Ea;break;case"dropRight":_e-=Ea;break;case"take":_e=the(_e,fe+Ea);break;case"takeRight":fe=ehe(fe,_e-Ea);break}}return{start:fe,end:_e}}var YD=rhe;var ahe=1,ihe=2,nhe=Math.min;function ohe(){var fe=this.__wrapped__.value(),_e=this.__dir__,Xe=Do(fe),Lt=_e<0,gr=Xe?fe.length:0,Yr=YD(0,gr,this.__views__),Ea=Yr.start,ei=Yr.end,oi=ei-Ea,Cn=Lt?ei:Ea-1,xn=this.__iteratees__,Fn=xn.length,To=0,ps=nhe(oi,this.__takeCount__);if(!Xe||!Lt&&gr==oi&&ps==oi)return i2(fe,this.__actions__);var Qs=[];e:for(;oi--&&To<ps;){Cn+=_e;for(var Go=-1,He=fe[Cn];++Go<Fn;){var Kl=xn[Go],nu=Kl.iteratee,jp=Kl.type,zf=nu(He);if(jp==ihe)He=zf;else if(!zf){if(jp==ahe)continue e;break e}}Qs[To++]=He}return Qs}var KD=ohe;var she="4.17.21",lhe=2,uhe=1,che=3,QD=4294967295,fhe=Array.prototype,hhe=Object.prototype,e7=hhe.hasOwnProperty,JD=If?If.iterator:void 0,phe=Math.max,$D=Math.min,WA=function(fe){return function(_e,Xe,Lt){if(Lt==null){var gr=Ll(Xe),Yr=gr&&gu(Xe),Ea=Yr&&Yr.length&&jm(Xe,Yr);(Ea?Ea.length:gr)||(Lt=Xe,Xe=_e,_e=this)}return fe(_e,Xe,Lt)}}(qw);da.after=Df.after;da.ary=Df.ary;da.assign=dl.assign;da.assignIn=dl.assignIn;da.assignInWith=dl.assignInWith;da.assignWith=dl.assignWith;da.at=dl.at;da.before=Df.before;da.bind=Df.bind;da.bindAll=ec.bindAll;da.bindKey=Df.bindKey;da.castArray=Hs.castArray;da.chain=Id.chain;da.chunk=ms.chunk;da.compact=ms.compact;da.concat=ms.concat;da.cond=ec.cond;da.conforms=ec.conforms;da.constant=ec.constant;da.countBy=xc.countBy;da.create=dl.create;da.curry=Df.curry;da.curryRight=Df.curryRight;da.debounce=Df.debounce;da.defaults=dl.defaults;da.defaultsDeep=dl.defaultsDeep;da.defer=Df.defer;da.delay=Df.delay;da.difference=ms.difference;da.differenceBy=ms.differenceBy;da.differenceWith=ms.differenceWith;da.drop=ms.drop;da.dropRight=ms.dropRight;da.dropRightWhile=ms.dropRightWhile;da.dropWhile=ms.dropWhile;da.fill=ms.fill;da.filter=xc.filter;da.flatMap=xc.flatMap;da.flatMapDeep=xc.flatMapDeep;da.flatMapDepth=xc.flatMapDepth;da.flatten=ms.flatten;da.flattenDeep=ms.flattenDeep;da.flattenDepth=ms.flattenDepth;da.flip=Df.flip;da.flow=ec.flow;da.flowRight=ec.flowRight;da.fromPairs=ms.fromPairs;da.functions=dl.functions;da.functionsIn=dl.functionsIn;da.groupBy=xc.groupBy;da.initial=ms.initial;da.intersection=ms.intersection;da.intersectionBy=ms.intersectionBy;da.intersectionWith=ms.intersectionWith;da.invert=dl.invert;da.invertBy=dl.invertBy;da.invokeMap=xc.invokeMap;da.iteratee=ec.iteratee;da.keyBy=xc.keyBy;da.keys=gu;da.keysIn=dl.keysIn;da.map=xc.map;da.mapKeys=dl.mapKeys;da.mapValues=dl.mapValues;da.matches=ec.matches;da.matchesProperty=ec.matchesProperty;da.memoize=Df.memoize;da.merge=dl.merge;da.mergeWith=dl.mergeWith;da.method=ec.method;da.methodOf=ec.methodOf;da.mixin=WA;da.negate=Hv;da.nthArg=ec.nthArg;da.omit=dl.omit;da.omitBy=dl.omitBy;da.once=Df.once;da.orderBy=xc.orderBy;da.over=ec.over;da.overArgs=Df.overArgs;da.overEvery=ec.overEvery;da.overSome=ec.overSome;da.partial=Df.partial;da.partialRight=Df.partialRight;da.partition=xc.partition;da.pick=dl.pick;da.pickBy=dl.pickBy;da.property=ec.property;da.propertyOf=ec.propertyOf;da.pull=ms.pull;da.pullAll=ms.pullAll;da.pullAllBy=ms.pullAllBy;da.pullAllWith=ms.pullAllWith;da.pullAt=ms.pullAt;da.range=ec.range;da.rangeRight=ec.rangeRight;da.rearg=Df.rearg;da.reject=xc.reject;da.remove=ms.remove;da.rest=Df.rest;da.reverse=ms.reverse;da.sampleSize=xc.sampleSize;da.set=dl.set;da.setWith=dl.setWith;da.shuffle=xc.shuffle;da.slice=ms.slice;da.sortBy=xc.sortBy;da.sortedUniq=ms.sortedUniq;da.sortedUniqBy=ms.sortedUniqBy;da.split=ju.split;da.spread=Df.spread;da.tail=ms.tail;da.take=ms.take;da.takeRight=ms.takeRight;da.takeRightWhile=ms.takeRightWhile;da.takeWhile=ms.takeWhile;da.tap=Id.tap;da.throttle=Df.throttle;da.thru=Wv;da.toArray=Hs.toArray;da.toPairs=dl.toPairs;da.toPairsIn=dl.toPairsIn;da.toPath=ec.toPath;da.toPlainObject=Hs.toPlainObject;da.transform=dl.transform;da.unary=Df.unary;da.union=ms.union;da.unionBy=ms.unionBy;da.unionWith=ms.unionWith;da.uniq=ms.uniq;da.uniqBy=ms.uniqBy;da.uniqWith=ms.uniqWith;da.unset=dl.unset;da.unzip=ms.unzip;da.unzipWith=ms.unzipWith;da.update=dl.update;da.updateWith=dl.updateWith;da.values=dl.values;da.valuesIn=dl.valuesIn;da.without=ms.without;da.words=ju.words;da.wrap=Df.wrap;da.xor=ms.xor;da.xorBy=ms.xorBy;da.xorWith=ms.xorWith;da.zip=ms.zip;da.zipObject=ms.zipObject;da.zipObjectDeep=ms.zipObjectDeep;da.zipWith=ms.zipWith;da.entries=dl.toPairs;da.entriesIn=dl.toPairsIn;da.extend=dl.assignIn;da.extendWith=dl.assignInWith;WA(da,da);da.add=xp.add;da.attempt=ec.attempt;da.camelCase=ju.camelCase;da.capitalize=ju.capitalize;da.ceil=xp.ceil;da.clamp=__.clamp;da.clone=Hs.clone;da.cloneDeep=Hs.cloneDeep;da.cloneDeepWith=Hs.cloneDeepWith;da.cloneWith=Hs.cloneWith;da.conformsTo=Hs.conformsTo;da.deburr=ju.deburr;da.defaultTo=ec.defaultTo;da.divide=xp.divide;da.endsWith=ju.endsWith;da.eq=Hs.eq;da.escape=ju.escape;da.escapeRegExp=ju.escapeRegExp;da.every=xc.every;da.find=xc.find;da.findIndex=ms.findIndex;da.findKey=dl.findKey;da.findLast=xc.findLast;da.findLastIndex=ms.findLastIndex;da.findLastKey=dl.findLastKey;da.floor=xp.floor;da.forEach=xc.forEach;da.forEachRight=xc.forEachRight;da.forIn=dl.forIn;da.forInRight=dl.forInRight;da.forOwn=dl.forOwn;da.forOwnRight=dl.forOwnRight;da.get=dl.get;da.gt=Hs.gt;da.gte=Hs.gte;da.has=dl.has;da.hasIn=dl.hasIn;da.head=ms.head;da.identity=Bc;da.includes=xc.includes;da.indexOf=ms.indexOf;da.inRange=__.inRange;da.invoke=dl.invoke;da.isArguments=Hs.isArguments;da.isArray=Do;da.isArrayBuffer=Hs.isArrayBuffer;da.isArrayLike=Hs.isArrayLike;da.isArrayLikeObject=Hs.isArrayLikeObject;da.isBoolean=Hs.isBoolean;da.isBuffer=Hs.isBuffer;da.isDate=Hs.isDate;da.isElement=Hs.isElement;da.isEmpty=Hs.isEmpty;da.isEqual=Hs.isEqual;da.isEqualWith=Hs.isEqualWith;da.isError=Hs.isError;da.isFinite=Hs.isFinite;da.isFunction=Hs.isFunction;da.isInteger=Hs.isInteger;da.isLength=Hs.isLength;da.isMap=Hs.isMap;da.isMatch=Hs.isMatch;da.isMatchWith=Hs.isMatchWith;da.isNaN=Hs.isNaN;da.isNative=Hs.isNative;da.isNil=Hs.isNil;da.isNull=Hs.isNull;da.isNumber=Hs.isNumber;da.isObject=Ll;da.isObjectLike=Hs.isObjectLike;da.isPlainObject=Hs.isPlainObject;da.isRegExp=Hs.isRegExp;da.isSafeInteger=Hs.isSafeInteger;da.isSet=Hs.isSet;da.isString=Hs.isString;da.isSymbol=Hs.isSymbol;da.isTypedArray=Hs.isTypedArray;da.isUndefined=Hs.isUndefined;da.isWeakMap=Hs.isWeakMap;da.isWeakSet=Hs.isWeakSet;da.join=ms.join;da.kebabCase=ju.kebabCase;da.last=Tf;da.lastIndexOf=ms.lastIndexOf;da.lowerCase=ju.lowerCase;da.lowerFirst=ju.lowerFirst;da.lt=Hs.lt;da.lte=Hs.lte;da.max=xp.max;da.maxBy=xp.maxBy;da.mean=xp.mean;da.meanBy=xp.meanBy;da.min=xp.min;da.minBy=xp.minBy;da.stubArray=ec.stubArray;da.stubFalse=ec.stubFalse;da.stubObject=ec.stubObject;da.stubString=ec.stubString;da.stubTrue=ec.stubTrue;da.multiply=xp.multiply;da.nth=ms.nth;da.noop=ec.noop;da.now=HA.now;da.pad=ju.pad;da.padEnd=ju.padEnd;da.padStart=ju.padStart;da.parseInt=ju.parseInt;da.random=__.random;da.reduce=xc.reduce;da.reduceRight=xc.reduceRight;da.repeat=ju.repeat;da.replace=ju.replace;da.result=dl.result;da.round=xp.round;da.sample=xc.sample;da.size=xc.size;da.snakeCase=ju.snakeCase;da.some=xc.some;da.sortedIndex=ms.sortedIndex;da.sortedIndexBy=ms.sortedIndexBy;da.sortedIndexOf=ms.sortedIndexOf;da.sortedLastIndex=ms.sortedLastIndex;da.sortedLastIndexBy=ms.sortedLastIndexBy;da.sortedLastIndexOf=ms.sortedLastIndexOf;da.startCase=ju.startCase;da.startsWith=ju.startsWith;da.subtract=xp.subtract;da.sum=xp.sum;da.sumBy=xp.sumBy;da.template=ju.template;da.times=ec.times;da.toFinite=Hs.toFinite;da.toInteger=qo;da.toLength=Hs.toLength;da.toLower=ju.toLower;da.toNumber=Hs.toNumber;da.toSafeInteger=Hs.toSafeInteger;da.toString=Hs.toString;da.toUpper=ju.toUpper;da.trim=ju.trim;da.trimEnd=ju.trimEnd;da.trimStart=ju.trimStart;da.truncate=ju.truncate;da.unescape=ju.unescape;da.uniqueId=ec.uniqueId;da.upperCase=ju.upperCase;da.upperFirst=ju.upperFirst;da.each=xc.forEach;da.eachRight=xc.forEachRight;da.first=ms.head;WA(da,function(){var fe={};return cp(da,function(_e,Xe){e7.call(da.prototype,Xe)||(fe[Xe]=_e)}),fe}(),{chain:!1});da.VERSION=she;(da.templateSettings=ju.templateSettings).imports._=da;Nh(["bind","bindKey","curry","curryRight","partial","partialRight"],function(fe){da[fe].placeholder=da});Nh(["drop","take"],function(fe,_e){Bl.prototype[fe]=function(Xe){Xe=Xe===void 0?1:phe(qo(Xe),0);var Lt=this.__filtered__&&!_e?new Bl(this):this.clone();return Lt.__filtered__?Lt.__takeCount__=$D(Xe,Lt.__takeCount__):Lt.__views__.push({size:$D(Xe,QD),type:fe+(Lt.__dir__<0?"Right":"")}),Lt},Bl.prototype[fe+"Right"]=function(Xe){return this.reverse()[fe](Xe).reverse()}});Nh(["filter","map","takeWhile"],function(fe,_e){var Xe=_e+1,Lt=Xe==uhe||Xe==che;Bl.prototype[fe]=function(gr){var Yr=this.clone();return Yr.__iteratees__.push({iteratee:_o(gr,3),type:Xe}),Yr.__filtered__=Yr.__filtered__||Lt,Yr}});Nh(["head","last"],function(fe,_e){var Xe="take"+(_e?"Right":"");Bl.prototype[fe]=function(){return this[Xe](1).value()[0]}});Nh(["initial","tail"],function(fe,_e){var Xe="drop"+(_e?"":"Right");Bl.prototype[fe]=function(){return this.__filtered__?new Bl(this):this[Xe](1)}});Bl.prototype.compact=function(){return this.filter(Bc)};Bl.prototype.find=function(fe){return this.filter(fe).head()};Bl.prototype.findLast=function(fe){return this.reverse().find(fe)};Bl.prototype.invokeMap=Vo(function(fe,_e){return typeof fe=="function"?new Bl(this):this.map(function(Xe){return xv(Xe,fe,_e)})});Bl.prototype.reject=function(fe){return this.filter(Hv(_o(fe)))};Bl.prototype.slice=function(fe,_e){fe=qo(fe);var Xe=this;return Xe.__filtered__&&(fe>0||_e<0)?new Bl(Xe):(fe<0?Xe=Xe.takeRight(-fe):fe&&(Xe=Xe.drop(fe)),_e!==void 0&&(_e=qo(_e),Xe=_e<0?Xe.dropRight(-_e):Xe.take(_e-fe)),Xe)};Bl.prototype.takeRightWhile=function(fe){return this.reverse().takeWhile(fe).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};cp(Bl.prototype,function(fe,_e){var Xe=/^(?:filter|find|map|reject)|While$/.test(_e),Lt=/^(?:head|last)$/.test(_e),gr=da[Lt?"take"+(_e=="last"?"Right":""):_e],Yr=Lt||/^find/.test(_e);gr&&(da.prototype[_e]=function(){var Ea=this.__wrapped__,ei=Lt?[1]:arguments,oi=Ea instanceof Bl,Cn=ei[0],xn=oi||Do(Ea),Fn=function(Kl){var nu=gr.apply(da,Op([Kl],ei));return Lt&&To?nu[0]:nu};xn&&Xe&&typeof Cn=="function"&&Cn.length!=1&&(oi=xn=!1);var To=this.__chain__,ps=!!this.__actions__.length,Qs=Yr&&!To,Go=oi&&!ps;if(!Yr&&xn){Ea=Go?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Wv,args:[Fn],thisArg:void 0}),new zp(He,To)}return Qs&&Go?fe.apply(this,ei):(He=this.thru(Fn),Qs?Lt?He.value()[0]:He.value():He)})});Nh(["pop","push","shift","sort","splice","unshift"],function(fe){var _e=fhe[fe],Xe=/^(?:push|sort|unshift)$/.test(fe)?"tap":"thru",Lt=/^(?:pop|shift)$/.test(fe);da.prototype[fe]=function(){var gr=arguments;if(Lt&&!this.__chain__){var Yr=this.value();return _e.apply(Do(Yr)?Yr:[],gr)}return this[Xe](function(Ea){return _e.apply(Do(Ea)?Ea:[],gr)})}});cp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Am,Lt)||(Am[Lt]=[]),Am[Lt].push({name:_e,func:Xe})}});Am[ry(void 0,lhe).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;da.prototype.at=Id.at;da.prototype.chain=Id.wrapperChain;da.prototype.commit=Id.commit;da.prototype.next=Id.next;da.prototype.plant=Id.plant;da.prototype.reverse=Id.reverse;da.prototype.toJSON=da.prototype.valueOf=da.prototype.value=Id.value;da.prototype.first=da.prototype.head;JD&&(da.prototype[JD]=Id.toIterator);var Qc=da;var Rd=cX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(_e,Xe){this.model=_e,this.serializers=Xe}get(_e){let Xe=this.serializers[_e],Lt=this.model.get(_e);return Xe?.deserialize?Xe.deserialize(Lt):Lt}set(_e,Xe){let Lt=this.serializers[_e];Lt?.serialize&&(Xe=Lt.serialize(Xe)),this.model.set(_e,Xe)}on(_e,Xe){this.model.on(_e,Xe)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(_e){if(_e==null){var Xe=this.model.get("_widget_data").length;_e=Qc.range(Xe)}return Array.isArray(_e)||(_e=[_e]),_e}do_data(){}do_layout(){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.trace_data;Qc.forEach(Lt,function(gr){Xe.push(gr)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this.model.get("_widget_data");Xe.slice().reverse().forEach(function(gr){Lt.splice(gr,1)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.current_trace_inds,gr=_e.new_trace_inds;yhe(Xe,Lt,gr)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this._normalize_trace_indexes(_e.restyle_traces);n7(this.model.get("_widget_data"),Xe,Lt)}}do_relayout(){var _e=this.model.get("_py2js_relayout");_e!==null&&f2(this.model.get("_widget_layout"),_e.relayout_data)}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces);n7(this.model.get("_widget_data"),Xe,gr),f2(this.model.get("_widget_layout"),Lt)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){for(var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces),Yr=0;Yr<Xe.length;Yr++){var Ea=Xe[Yr],ei=gr[Yr],oi=this.model.get("_widget_data")[ei];f2(oi,Ea)}f2(this.model.get("_widget_layout"),Lt)}}do_removeLayoutProps(){var _e=this.model.get("_py2js_removeLayoutProps");if(_e!==null){var Xe=_e.remove_props,Lt=this.model.get("_widget_layout");o7(Lt,Xe)}}do_removeTraceProps(){var _e=this.model.get("_py2js_removeTraceProps");if(_e!==null){var Xe=_e.remove_props,Lt=_e.remove_trace,gr=this.model.get("_widget_data")[Lt];o7(gr,Xe)}}},dhe={_widget_data:{deserialize:Vh,serialize:qh},_widget_layout:{deserialize:Vh,serialize:qh},_py2js_addTraces:{deserialize:Vh,serialize:qh},_py2js_deleteTraces:{deserialize:Vh,serialize:qh},_py2js_moveTraces:{deserialize:Vh,serialize:qh},_py2js_restyle:{deserialize:Vh,serialize:qh},_py2js_relayout:{deserialize:Vh,serialize:qh},_py2js_update:{deserialize:Vh,serialize:qh},_py2js_animate:{deserialize:Vh,serialize:qh},_py2js_removeLayoutProps:{deserialize:Vh,serialize:qh},_py2js_removeTraceProps:{deserialize:Vh,serialize:qh},_js2py_restyle:{deserialize:Vh,serialize:qh},_js2py_relayout:{deserialize:Vh,serialize:qh},_js2py_update:{deserialize:Vh,serialize:qh},_js2py_layoutDelta:{deserialize:Vh,serialize:qh},_js2py_traceDeltas:{deserialize:Vh,serialize:qh},_js2py_pointsCallback:{deserialize:Vh,serialize:qh}},ZA=class{constructor(_e,Xe){this.model=_e,this.el=Xe}perform_render(){var _e=this;this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Xe=this.model.get("_last_layout_edit_id"),Lt=this.model.get("_last_trace_edit_id");this.viewID=s7();var gr=Qc.cloneDeep(this.model.get("_widget_data")),Yr=Qc.cloneDeep(this.model.get("_widget_layout"));Yr.height||(Yr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(_e.el,gr,Yr,Ea).then(function(){_e._sendTraceDeltas(Lt),_e._sendLayoutDelta(Xe),_e.el.on("plotly_restyle",function(oi){_e.handle_plotly_restyle(oi)}),_e.el.on("plotly_relayout",function(oi){_e.handle_plotly_relayout(oi)}),_e.el.on("plotly_update",function(oi){_e.handle_plotly_update(oi)}),_e.el.on("plotly_click",function(oi){_e.handle_plotly_click(oi)}),_e.el.on("plotly_hover",function(oi){_e.handle_plotly_hover(oi)}),_e.el.on("plotly_unhover",function(oi){_e.handle_plotly_unhover(oi)}),_e.el.on("plotly_selected",function(oi){_e.handle_plotly_selected(oi)}),_e.el.on("plotly_deselect",function(oi){_e.handle_plotly_deselect(oi)}),_e.el.on("plotly_doubleclick",function(oi){_e.handle_plotly_doubleclick(oi)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:_e.el,viewID:_e.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(_e,Xe){Xe.apply(this,arguments);var Lt=this;switch(_e.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Lt.el,[],{xaxis:gr,yaxis:gr}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var _e=this,Xe=_e.model.get("_widget_layout");(Qc.isNil(Xe)||Qc.isNil(Xe.width))&&Rd.default.Plots.resize(_e.el).then(function(){var Lt=_e.model.get("_last_layout_edit_id");_e._sendLayoutDelta(Lt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Qc.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return Qc.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(_e){var Xe;if(_e.hasOwnProperty("points")){var Lt=_e.points,gr=Lt.length,Yr=!0;for(let xn=0;xn<gr&&(Yr=Yr&&Lt[xn].hasOwnProperty("pointNumbers"),!!Yr);xn++);var Ea=gr;if(Yr){Ea=0;for(let xn=0;xn<gr;xn++)Ea+=Lt[xn].pointNumbers.length}if(Xe={trace_indexes:new Array(Ea),point_indexes:new Array(Ea),xs:new Array(Ea),ys:new Array(Ea)},Yr){for(var ei=0,oi=0;oi<gr;oi++)for(let Fn=0;Fn<Lt[oi].pointNumbers.length;Fn++,ei++)Xe.point_indexes[ei]=Lt[oi].pointNumbers[Fn],Xe.xs[ei]=Lt[oi].x,Xe.ys[ei]=Lt[oi].y,Xe.trace_indexes[ei]=Lt[oi].curveNumber;let xn=!0;for(let Fn=1;Fn<Ea&&(xn=xn&&Xe.trace_indexes[Fn-1]===Xe.trace_indexes[Fn],!!xn);Fn++);xn&&Xe.point_indexes.sort(function(Fn,To){return Fn-To})}else for(var oi=0;oi<gr;oi++)Xe.trace_indexes[oi]=Lt[oi].curveNumber,Xe.point_indexes[oi]=Lt[oi].pointNumber,Xe.xs[oi]=Lt[oi].x,Xe.ys[oi]=Lt[oi].y;var Cn=Lt[0]!==void 0&&Lt[0].hasOwnProperty("z");if(Cn)for(Xe.zs=new Array(gr),oi=0;oi<gr;oi++)Xe.zs[oi]=Lt[oi].z;return Xe}else return null}buildInputDeviceStateObject(_e){var Xe=_e.event;if(Xe===void 0)return null;var Lt={alt:Xe.altKey,ctrl:Xe.ctrlKey,meta:Xe.metaKey,shift:Xe.shiftKey,button:Xe.button,buttons:Xe.buttons};return Lt}buildSelectorObject(_e){var Xe;return _e.hasOwnProperty("range")?Xe={type:"box",selector_state:{xrange:_e.range.x,yrange:_e.range.y}}:_e.hasOwnProperty("lassoPoints")?Xe={type:"lasso",selector_state:{xs:_e.lassoPoints.x,ys:_e.lassoPoints.y}}:Xe=null,Xe}handle_plotly_restyle(_e){if(_e!=null&&!(_e[0]&&_e[0].hasOwnProperty("_doNotReportToPy"))){var Xe=_e[0],Lt=_e[1],gr={style_data:Xe,style_traces:Lt,source_view_id:this.viewID};this.model.set("_js2py_restyle",gr),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(_e){if(_e!=null&&!_e.hasOwnProperty("_doNotReportToPy")){var Xe={relayout_data:_e,source_view_id:this.viewID};this.model.set("_js2py_relayout",Xe),this.touch()}}handle_plotly_update(_e){if(_e!=null&&!(_e.data&&_e.data[0].hasOwnProperty("_doNotReportToPy"))){var Xe={style_data:_e.data[0],style_traces:_e.data[1],layout_data:_e.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Xe),this.touch()}}handle_plotly_click(_e){this._send_points_callback_message(_e,"plotly_click")}handle_plotly_hover(_e){this._send_points_callback_message(_e,"plotly_hover")}handle_plotly_unhover(_e){this._send_points_callback_message(_e,"plotly_unhover")}handle_plotly_selected(_e){this._send_points_callback_message(_e,"plotly_selected")}handle_plotly_deselect(_e){_e={points:[]},this._send_points_callback_message(_e,"plotly_deselect")}_send_points_callback_message(_e,Xe){if(_e!=null){var Lt={event_type:Xe,points:this.buildPointsObject(_e),device_state:this.buildInputDeviceStateObject(_e),selector:this.buildSelectorObject(_e)};Lt.points!==null&&Lt.points!==void 0&&(this.model.set("_js2py_pointsCallback",Lt),this.touch())}}handle_plotly_doubleclick(_e){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this;Rd.default.addTraces(this.el,_e.trace_data).then(function(){Xe._sendTraceDeltas(_e.trace_edit_id);var Lt=_e.layout_edit_id;Xe._sendLayoutDelta(Lt)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this;Rd.default.deleteTraces(this.el,Xe).then(function(){var gr=_e.trace_edit_id;Lt._sendTraceDeltas(gr);var Yr=_e.layout_edit_id;Lt._sendLayoutDelta(Yr)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=_e.current_trace_inds,Lt=_e.new_trace_inds,gr=Qc.isEqual(Xe,Lt);gr||Rd.default.moveTraces(this.el,Xe,Lt)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this.model._normalize_trace_indexes(_e.restyle_traces);Xe._doNotReportToPy=!0,Rd.default.restyle(this.el,Xe,Lt),this._sendTraceDeltas(_e.trace_edit_id);var gr=_e.layout_edit_id;this._sendLayoutDelta(gr)}}do_relayout(){var _e=this.model.get("_py2js_relayout");if(_e!==null){if(_e.source_view_id!==this.viewID){var Xe=_e.relayout_data;Xe._doNotReportToPy=!0,Rd.default.relayout(this.el,_e.relayout_data)}var Lt=_e.layout_edit_id;this._sendLayoutDelta(Lt)}}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data||{},Lt=_e.layout_data||{},gr=this.model._normalize_trace_indexes(_e.style_traces);Xe._doNotReportToPy=!0,Rd.default.update(this.el,Xe,Lt,gr),this._sendTraceDeltas(_e.trace_edit_id);var Yr=_e.layout_edit_id;this._sendLayoutDelta(Yr)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){var Xe=_e.animation_opts,Lt=_e.style_data,gr=_e.layout_data,Yr=this.model._normalize_trace_indexes(_e.style_traces),Ea={data:Lt,layout:gr,traces:Yr};Ea._doNotReportToPy=!0;var ei=this;Rd.default.animate(this.el,Ea,Xe).then(function(){ei._sendTraceDeltas(_e.trace_edit_id);var oi=_e.layout_edit_id;ei._sendLayoutDelta(oi)})}}_sendLayoutDelta(_e){var Xe=x_(this.getFullLayout(),this.model.get("_widget_layout")),Lt={layout_delta:Xe,layout_edit_id:_e};this.model.set("_js2py_widget_layoutDelta",Lt),this.touch()}_sendTraceDeltas(_e){for(var Xe=this.model.get("_widget_data"),Lt=Qc.range(Xe.length),gr=new Array(Lt.length),Yr=this.getFullData(),Ea=0;Ea<Lt.length;Ea++){var ei=Lt[Ea];gr[Ea]=x_(Yr[ei],Xe[ei])}var oi={trace_deltas:gr,trace_edit_id:_e};this.model.set("_js2py_traceDeltas",oi),this.touch()}},vhe={int8:Int8Array,int16:Int16Array,int32:Int32Array,uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,float32:Float32Array,float64:Float64Array};function mhe(fe){var _e;if(fe instanceof Int8Array)_e="int8";else if(fe instanceof Int16Array)_e="int16";else if(fe instanceof Int32Array)_e="int32";else if(fe instanceof Uint8Array)_e="uint8";else if(fe instanceof Uint16Array)_e="uint16";else if(fe instanceof Uint32Array)_e="uint32";else if(fe instanceof Float32Array)_e="float32";else if(fe instanceof Float64Array)_e="float64";else return fe;var Xe={dtype:_e,shape:[fe.length],value:fe.buffer};return Xe}function qh(fe,_e){var Xe;if(Qc.isTypedArray(fe))Xe=mhe(fe);else if(Array.isArray(fe)){Xe=new Array(fe.length);for(var Lt=0;Lt<fe.length;Lt++)Xe[Lt]=qh(fe[Lt])}else if(Qc.isObject(fe)){Xe={};for(var gr in fe)fe.hasOwnProperty(gr)&&(Xe[gr]=qh(fe[gr]))}else fe===void 0?Xe="_undefined_":Xe=fe;return Xe}function Vh(fe,_e){var Xe;if(Array.isArray(fe)){Xe=new Array(fe.length);for(var Lt=0;Lt<fe.length;Lt++)Xe[Lt]=Vh(fe[Lt])}else if(Qc.isObject(fe))if((Qc.has(fe,"value")||Qc.has(fe,"buffer"))&&Qc.has(fe,"dtype")&&Qc.has(fe,"shape")){var gr=vhe[fe.dtype],Yr=Qc.has(fe,"value")?fe.value.buffer:fe.buffer.buffer;Xe=new gr(Yr)}else{Xe={};for(var Ea in fe)fe.hasOwnProperty(Ea)&&(Xe[Ea]=Vh(fe[Ea]))}else fe==="_undefined_"?Xe=void 0:Xe=fe;return Xe}function ghe(fe){return ArrayBuffer.isView(fe)&&!(fe instanceof DataView)}function i7(fe,_e,Xe){if(Xe[0]==="_")return null;if(ghe(_e))return _e}function f2(fe,_e){for(var Xe in _e)if(_e.hasOwnProperty(Xe)){var Lt=_e[Xe];Lt===null?Qc.unset(fe,Xe):Qc.set(fe,Xe,Lt)}}function n7(fe,_e,Xe){for(var Lt in _e)if(_e.hasOwnProperty(Lt)){var gr=_e[Lt];Array.isArray(gr)||(gr=[gr]);for(var Yr=0;Yr<Xe.length;Yr++){var Ea=Xe[Yr],ei=fe[Ea],oi=gr[Yr%gr.length];oi===null?Qc.unset(ei,Lt):oi!==void 0&&Qc.set(ei,Lt,oi)}}}function yhe(fe,_e,Xe){for(var Lt=[],gr=_e.length-1;gr>=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Yr=Qc(Xe).zip(Lt).sortBy(0).unzip().value();Xe=Yr[0],Lt=Yr[1];for(var Ea=0;Ea<Xe.length;Ea++)fe.splice(Xe[Ea],0,Lt[Ea])}function o7(fe,_e){for(var Xe=0;Xe<_e.length;Xe++){var Lt=_e[Xe];Qc.unset(fe,Lt)}}function x_(fe,_e){var Xe;Array.isArray(fe)?Xe=new Array(fe.length):Xe={},_e==null&&(_e={});for(var Lt in fe)if(Lt[0]!=="_"&&fe.hasOwnProperty(Lt)&&fe[Lt]!==null){var gr;if(gr=Qc.isEqual(fe[Lt],_e[Lt]),!gr||Lt==="uid"){var Yr=fe[Lt];if(_e.hasOwnProperty(Lt)&&typeof Yr=="object")if(Array.isArray(Yr))if(Yr.length>0&&typeof Yr[0]=="object"){Xe[Lt]=new Array(Yr.length);for(var Ea=0;Ea<Yr.length;Ea++)!Array.isArray(_e[Lt])||_e[Lt].length<=Ea?Xe[Lt][Ea]=Yr[Ea]:Xe[Lt][Ea]=x_(Yr[Ea],_e[Lt][Ea])}else Xe[Lt]=Yr;else{var ei=x_(Yr,_e[Lt]);Object.keys(ei).length>0&&(Xe[Lt]=ei)}else typeof Yr=="object"&&!Array.isArray(Yr)?Xe[Lt]=x_(Yr,{}):Yr!==void 0&&typeof Yr!="function"&&(Xe[Lt]=Yr)}}return Xe}function s7(fe,_e,Xe,Lt){if(Xe||(Xe=16),_e===void 0&&(_e=24),_e<=0)return"0";var gr=Math.log(Math.pow(2,_e))/Math.log(Xe),Yr="",Ea,ei,oi;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,_e/Ea))/Math.log(Xe)*Ea;var Cn=gr-Math.floor(gr);for(Ea=0;Ea<Math.floor(gr);Ea++)oi=Math.floor(Math.random()*Xe).toString(Xe),Yr=oi+Yr;Cn&&(ei=Math.pow(Xe,Cn),oi=Math.floor(Math.random()*ei).toString(Xe),Yr=oi+Yr);var xn=parseInt(Yr,Xe);return fe&&fe[Yr]||xn!==1/0&&xn>=Math.pow(2,_e)?Lt>10?(console.warn("randstr failed uniqueness"),Yr):s7(fe,_e,Xe,(Lt||0)+1):Yr}var EHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,dhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,EHe as default};
/*! Bundled license information:
plotly.js/dist/plotly.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
(*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
(*!
* pad-left <https://github.com/jonschlinkert/pad-left>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT license.
*)
(*!
* repeat-string <https://github.com/jonschlinkert/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 <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
assert/build/internal/util/comparisons.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @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/v4.7.1/LICENSE.txt
*)
*)
lodash-es/lodash.default.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
*/