TIFNJK_E41221588/venv/Lib/site-packages/plotly/package_data/widgetbundle.js

3910 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 rX=Object.create;var Wk=Object.defineProperty;var aX=Object.getOwnPropertyDescriptor;var iX=Object.getOwnPropertyNames;var nX=Object.getPrototypeOf,oX=Object.prototype.hasOwnProperty;var sX=(ue,ge)=>()=>(ge||ue((ge={exports:{}}).exports,ge),ge.exports);var lX=(ue,ge,Ye,Rt)=>{if(ge&&typeof ge=="object"||typeof ge=="function")for(let gr of iX(ge))!oX.call(ue,gr)&&gr!==Ye&&Wk(ue,gr,{get:()=>ge[gr],enumerable:!(Rt=aX(ge,gr))||Rt.enumerable});return ue};var uX=(ue,ge,Ye)=>(Ye=ue!=null?rX(nX(ue)):{},lX(ge||!ue||!ue.__esModule?Wk(Ye,"default",{value:ue,enumerable:!0}):Ye,ue));var a7=sX((r7,c2)=>{(function(ue,ge){typeof c2=="object"&&c2.exports?c2.exports=ge():ue.moduleName=ge()})(typeof self<"u"?self:r7,()=>{"use strict";var ue=(()=>{var ge=Object.create,Ye=Object.defineProperty,Rt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Yr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,oi=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Fn=(Z,G,v)=>G in Z?Ye(Z,G,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[G]=v,To=(Z,G)=>{for(var v in G||(G={}))Cn.call(G,v)&&Fn(Z,v,G[v]);if(ei)for(var v of ei(G))bn.call(G,v)&&Fn(Z,v,G[v]);return Z},ds=(Z,G)=>Rt(Z,Yr(G)),Qs=(Z,G)=>{var v={};for(var x in Z)Cn.call(Z,x)&&G.indexOf(x)<0&&(v[x]=Z[x]);if(Z!=null&&ei)for(var x of ei(Z))G.indexOf(x)<0&&bn.call(Z,x)&&(v[x]=Z[x]);return v},Vo=(Z,G)=>function(){return Z&&(G=(0,Z[Ea(Z)[0]])(Z=0)),G},Xe=(Z,G)=>function(){return G||(0,Z[Ea(Z)[0]])((G={exports:{}}).exports,G),G.exports},Kl=(Z,G)=>{for(var v in G)Ye(Z,v,{get:G[v],enumerable:!0})},nu=(Z,G,v,x)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of Ea(G))!Cn.call(Z,S)&&S!==v&&Ye(Z,S,{get:()=>G[S],enumerable:!(x=gr(G,S))||x.enumerable});return Z},jp=(Z,G,v)=>(v=Z!=null?ge(oi(Z)):{},nu(G||!Z||!Z.__esModule?Ye(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>nu(Ye({},"__esModule",{value:!0}),Z),fp=Xe({"src/version.js"(Z){"use strict";Z.version="3.4.0"}}),Ff=Xe({"node_modules/native-promise-only/lib/npo.src.js"(Z,G){(function(x,S,E){S[x]=S[x]||E(),typeof G<"u"&&G.exports&&(G.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,d){A=new M(b,d),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 c(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 c(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 c(l){this.def=l,this.triggered=!1}function m(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new m(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(d,u){if(typeof d!="function"||typeof u!="function")throw TypeError("Not a function");g.resolve=d,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",p,!1);return p.prototype=T,x(T,"__NPO__",0,!1),x(p,"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(p,"reject",function(_){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(_)})}),x(p,"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,d=Array(b),u=0;h(w,_,function(f,R){d[f]=R,++u===b&&M(d)},g)})}),x(p,"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(d,u){M(u)},g)})}),p})}}),Hn=Xe({"node_modules/@plotly/d3/d3.js"(Z,G){(function(){var v={version:"3.8.2"},x=[].slice,S=function(de){return x.call(de)},E=self.document;function e(de){return de&&(de.ownerDocument||de.document||de).documentElement}function t(de){return de&&(de.ownerDocument&&de.ownerDocument.defaultView||de.document&&de||de.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(Fe){for(var et=Fe.length,mt=new Array(et);et--;)mt[et]=Fe[et];return mt}}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(Fe,et){o.call(this,Fe,et+"")},r.setAttributeNS=function(Fe,et,mt){a.call(this,Fe,et,mt+"")},n.setProperty=function(Fe,et,mt){i.call(this,Fe,et+"",mt)}}v.ascending=s;function s(de,Fe){return de<Fe?-1:de>Fe?1:de>=Fe?0:NaN}v.descending=function(de,Fe){return Fe<de?-1:Fe>de?1:Fe>=de?0:NaN},v.min=function(de,Fe){var et=-1,mt=de.length,bt,Mt;if(arguments.length===1){for(;++et<mt;)if((Mt=de[et])!=null&&Mt>=Mt){bt=Mt;break}for(;++et<mt;)(Mt=de[et])!=null&&bt>Mt&&(bt=Mt)}else{for(;++et<mt;)if((Mt=Fe.call(de,de[et],et))!=null&&Mt>=Mt){bt=Mt;break}for(;++et<mt;)(Mt=Fe.call(de,de[et],et))!=null&&bt>Mt&&(bt=Mt)}return bt},v.max=function(de,Fe){var et=-1,mt=de.length,bt,Mt;if(arguments.length===1){for(;++et<mt;)if((Mt=de[et])!=null&&Mt>=Mt){bt=Mt;break}for(;++et<mt;)(Mt=de[et])!=null&&Mt>bt&&(bt=Mt)}else{for(;++et<mt;)if((Mt=Fe.call(de,de[et],et))!=null&&Mt>=Mt){bt=Mt;break}for(;++et<mt;)(Mt=Fe.call(de,de[et],et))!=null&&Mt>bt&&(bt=Mt)}return bt},v.extent=function(de,Fe){var et=-1,mt=de.length,bt,Mt,ar;if(arguments.length===1){for(;++et<mt;)if((Mt=de[et])!=null&&Mt>=Mt){bt=ar=Mt;break}for(;++et<mt;)(Mt=de[et])!=null&&(bt>Mt&&(bt=Mt),ar<Mt&&(ar=Mt))}else{for(;++et<mt;)if((Mt=Fe.call(de,de[et],et))!=null&&Mt>=Mt){bt=ar=Mt;break}for(;++et<mt;)(Mt=Fe.call(de,de[et],et))!=null&&(bt>Mt&&(bt=Mt),ar<Mt&&(ar=Mt))}return[bt,ar]};function h(de){return de===null?NaN:+de}function c(de){return!isNaN(de)}v.sum=function(de,Fe){var et=0,mt=de.length,bt,Mt=-1;if(arguments.length===1)for(;++Mt<mt;)c(bt=+de[Mt])&&(et+=bt);else for(;++Mt<mt;)c(bt=+Fe.call(de,de[Mt],Mt))&&(et+=bt);return et},v.mean=function(de,Fe){var et=0,mt=de.length,bt,Mt=-1,ar=mt;if(arguments.length===1)for(;++Mt<mt;)c(bt=h(de[Mt]))?et+=bt:--ar;else for(;++Mt<mt;)c(bt=h(Fe.call(de,de[Mt],Mt)))?et+=bt:--ar;if(ar)return et/ar},v.quantile=function(de,Fe){var et=(de.length-1)*Fe+1,mt=Math.floor(et),bt=+de[mt-1],Mt=et-mt;return Mt?bt+Mt*(de[mt]-bt):bt},v.median=function(de,Fe){var et=[],mt=de.length,bt,Mt=-1;if(arguments.length===1)for(;++Mt<mt;)c(bt=h(de[Mt]))&&et.push(bt);else for(;++Mt<mt;)c(bt=h(Fe.call(de,de[Mt],Mt)))&&et.push(bt);if(et.length)return v.quantile(et.sort(s),.5)},v.variance=function(de,Fe){var et=de.length,mt=0,bt,Mt,ar=0,Ot=-1,_r=0;if(arguments.length===1)for(;++Ot<et;)c(bt=h(de[Ot]))&&(Mt=bt-mt,mt+=Mt/++_r,ar+=Mt*(bt-mt));else for(;++Ot<et;)c(bt=h(Fe.call(de,de[Ot],Ot)))&&(Mt=bt-mt,mt+=Mt/++_r,ar+=Mt*(bt-mt));if(_r>1)return ar/(_r-1)},v.deviation=function(){var de=v.variance.apply(this,arguments);return de&&Math.sqrt(de)};function m(de){return{left:function(Fe,et,mt,bt){for(arguments.length<3&&(mt=0),arguments.length<4&&(bt=Fe.length);mt<bt;){var Mt=mt+bt>>>1;de(Fe[Mt],et)<0?mt=Mt+1:bt=Mt}return mt},right:function(Fe,et,mt,bt){for(arguments.length<3&&(mt=0),arguments.length<4&&(bt=Fe.length);mt<bt;){var Mt=mt+bt>>>1;de(Fe[Mt],et)>0?bt=Mt:mt=Mt+1}return mt}}}var p=m(s);v.bisectLeft=p.left,v.bisect=v.bisectRight=p.right,v.bisector=function(de){return m(de.length===1?function(Fe,et){return s(de(Fe),et)}:de)},v.shuffle=function(de,Fe,et){(mt=arguments.length)<3&&(et=de.length,mt<2&&(Fe=0));for(var mt=et-Fe,bt,Mt;mt;)Mt=Math.random()*mt--|0,bt=de[mt+Fe],de[mt+Fe]=de[Mt+Fe],de[Mt+Fe]=bt;return de},v.permute=function(de,Fe){for(var et=Fe.length,mt=new Array(et);et--;)mt[et]=de[Fe[et]];return mt},v.pairs=function(de){for(var Fe=0,et=de.length-1,mt,bt=de[0],Mt=new Array(et<0?0:et);Fe<et;)Mt[Fe]=[mt=bt,bt=de[++Fe]];return Mt},v.transpose=function(de){if(!(Mt=de.length))return[];for(var Fe=-1,et=v.min(de,T),mt=new Array(et);++Fe<et;)for(var bt=-1,Mt,ar=mt[Fe]=new Array(Mt);++bt<Mt;)ar[bt]=de[bt][Fe];return mt};function T(de){return de.length}v.zip=function(){return v.transpose(arguments)},v.keys=function(de){var Fe=[];for(var et in de)Fe.push(et);return Fe},v.values=function(de){var Fe=[];for(var et in de)Fe.push(de[et]);return Fe},v.entries=function(de){var Fe=[];for(var et in de)Fe.push({key:et,value:de[et]});return Fe},v.merge=function(de){for(var Fe=de.length,et,mt=-1,bt=0,Mt,ar;++mt<Fe;)bt+=de[mt].length;for(Mt=new Array(bt);--Fe>=0;)for(ar=de[Fe],et=ar.length;--et>=0;)Mt[--bt]=ar[et];return Mt};var l=Math.abs;v.range=function(de,Fe,et){if(arguments.length<3&&(et=1,arguments.length<2&&(Fe=de,de=0)),(Fe-de)/et===1/0)throw new Error("infinite range");var mt=[],bt=_(l(et)),Mt=-1,ar;if(de*=bt,Fe*=bt,et*=bt,et<0)for(;(ar=de+et*++Mt)>Fe;)mt.push(ar/bt);else for(;(ar=de+et*++Mt)<Fe;)mt.push(ar/bt);return mt};function _(de){for(var Fe=1;de*Fe%1;)Fe*=10;return Fe}function w(de,Fe){for(var et in Fe)Object.defineProperty(de.prototype,et,{value:Fe[et],enumerable:!1})}v.map=function(de,Fe){var et=new A;if(de instanceof A)de.forEach(function(Ot,_r){et.set(Ot,_r)});else if(Array.isArray(de)){var mt=-1,bt=de.length,Mt;if(arguments.length===1)for(;++mt<bt;)et.set(mt,de[mt]);else for(;++mt<bt;)et.set(Fe.call(de,Mt=de[mt],mt),Mt)}else for(var ar in de)et.set(ar,de[ar]);return et};function A(){this._=Object.create(null)}var M="__proto__",g="\0";w(A,{has:u,get:function(de){return this._[b(de)]},set:function(de,Fe){return this._[b(de)]=Fe},remove:y,keys:f,values:function(){var de=[];for(var Fe in this._)de.push(this._[Fe]);return de},entries:function(){var de=[];for(var Fe in this._)de.push({key:d(Fe),value:this._[Fe]});return de},size:R,empty:L,forEach:function(de){for(var Fe in this._)de.call(this,d(Fe),this._[Fe])}});function b(de){return(de+="")===M||de[0]===g?g+de:de}function d(de){return(de+="")[0]===g?de.slice(1):de}function u(de){return b(de)in this._}function y(de){return(de=b(de))in this._&&delete this._[de]}function f(){var de=[];for(var Fe in this._)de.push(d(Fe));return de}function R(){var de=0;for(var Fe in this._)++de;return de}function L(){for(var de in this._)return!1;return!0}v.nest=function(){var de={},Fe=[],et=[],mt,bt;function Mt(Ot,_r,Gr){if(Gr>=Fe.length)return bt?bt.call(de,_r):mt?_r.sort(mt):_r;for(var Xr=-1,xa=_r.length,da=Fe[Gr++],Ja,ti,Sa,Fa=new A,Xa;++Xr<xa;)(Xa=Fa.get(Ja=da(ti=_r[Xr])))?Xa.push(ti):Fa.set(Ja,[ti]);return Ot?(ti=Ot(),Sa=function(fi,ni){ti.set(fi,Mt(Ot,ni,Gr))}):(ti={},Sa=function(fi,ni){ti[fi]=Mt(Ot,ni,Gr)}),Fa.forEach(Sa),ti}function ar(Ot,_r){if(_r>=Fe.length)return Ot;var Gr=[],Xr=et[_r++];return Ot.forEach(function(xa,da){Gr.push({key:xa,values:ar(da,_r)})}),Xr?Gr.sort(function(xa,da){return Xr(xa.key,da.key)}):Gr}return de.map=function(Ot,_r){return Mt(_r,Ot,0)},de.entries=function(Ot){return ar(Mt(v.map,Ot,0),0)},de.key=function(Ot){return Fe.push(Ot),de},de.sortKeys=function(Ot){return et[Fe.length-1]=Ot,de},de.sortValues=function(Ot){return mt=Ot,de},de.rollup=function(Ot){return bt=Ot,de},de},v.set=function(de){var Fe=new z;if(de)for(var et=0,mt=de.length;et<mt;++et)Fe.add(de[et]);return Fe};function z(){this._=Object.create(null)}w(z,{has:u,add:function(de){return this._[b(de+="")]=!0,de},remove:y,values:f,size:R,empty:L,forEach:function(de){for(var Fe in this._)de.call(this,d(Fe))}}),v.behavior={};function F(de){return de}v.rebind=function(de,Fe){for(var et=1,mt=arguments.length,bt;++et<mt;)de[bt=arguments[et]]=N(de,Fe,Fe[bt]);return de};function N(de,Fe,et){return function(){var mt=et.apply(Fe,arguments);return mt===Fe?de:mt}}function O(de,Fe){if(Fe in de)return Fe;Fe=Fe.charAt(0).toUpperCase()+Fe.slice(1);for(var et=0,mt=P.length;et<mt;++et){var bt=P[et]+Fe;if(bt in de)return bt}}var P=["webkit","ms","moz","Moz","o","O"];function U(){}v.dispatch=function(){for(var de=new B,Fe=-1,et=arguments.length;++Fe<et;)de[arguments[Fe]]=X(de);return de};function B(){}B.prototype.on=function(de,Fe){var et=de.indexOf("."),mt="";if(et>=0&&(mt=de.slice(et+1),de=de.slice(0,et)),de)return arguments.length<2?this[de].on(mt):this[de].on(mt,Fe);if(arguments.length===2){if(Fe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(mt,null);return this}};function X(de){var Fe=[],et=new A;function mt(){for(var bt=Fe,Mt=-1,ar=bt.length,Ot;++Mt<ar;)(Ot=bt[Mt].on)&&Ot.apply(this,arguments);return de}return mt.on=function(bt,Mt){var ar=et.get(bt),Ot;return arguments.length<2?ar&&ar.on:(ar&&(ar.on=null,Fe=Fe.slice(0,Ot=Fe.indexOf(ar)).concat(Fe.slice(Ot+1)),et.remove(bt)),Mt&&Fe.push(et.set(bt,{on:Mt})),de)},mt}v.event=null;function $(){v.event.preventDefault()}function se(){for(var de=v.event,Fe;Fe=de.sourceEvent;)de=Fe;return de}function le(de){for(var Fe=new B,et=0,mt=arguments.length;++et<mt;)Fe[arguments[et]]=X(Fe);return Fe.of=function(bt,Mt){return function(ar){try{var Ot=ar.sourceEvent=v.event;ar.target=de,v.event=ar,Fe[ar.type].apply(bt,Mt)}finally{v.event=Ot}}},Fe}v.requote=function(de){return de.replace(fe,"\\$&")};var fe=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(de,Fe){de.__proto__=Fe}:function(de,Fe){for(var et in Fe)de[et]=Fe[et]};function Y(de){return V(de,ae),de}var ee=function(de,Fe){return Fe.querySelector(de)},q=function(de,Fe){return Fe.querySelectorAll(de)},oe=function(de,Fe){var et=de.matches||de[O(de,"matchesSelector")];return oe=function(mt,bt){return et.call(mt,bt)},oe(de,Fe)};typeof Sizzle=="function"&&(ee=function(de,Fe){return Sizzle(de,Fe)[0]||null},q=Sizzle,oe=Sizzle.matchesSelector),v.selection=function(){return v.select(E.documentElement)};var ae=v.selection.prototype=[];ae.select=function(de){var Fe=[],et,mt,bt,Mt;de=j(de);for(var ar=-1,Ot=this.length;++ar<Ot;){Fe.push(et=[]),et.parentNode=(bt=this[ar]).parentNode;for(var _r=-1,Gr=bt.length;++_r<Gr;)(Mt=bt[_r])?(et.push(mt=de.call(Mt,Mt.__data__,_r,ar)),mt&&"__data__"in Mt&&(mt.__data__=Mt.__data__)):et.push(null)}return Y(Fe)};function j(de){return typeof de=="function"?de:function(){return ee(de,this)}}ae.selectAll=function(de){var Fe=[],et,mt;de=Q(de);for(var bt=-1,Mt=this.length;++bt<Mt;)for(var ar=this[bt],Ot=-1,_r=ar.length;++Ot<_r;)(mt=ar[Ot])&&(Fe.push(et=S(de.call(mt,mt.__data__,Ot,bt))),et.parentNode=mt);return Y(Fe)};function Q(de){return typeof de=="function"?de:function(){return q(de,this)}}var re="http://www.w3.org/1999/xhtml",ce={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/"};v.ns={prefix:ce,qualify:function(de){var Fe=de.indexOf(":"),et=de;return Fe>=0&&(et=de.slice(0,Fe))!=="xmlns"&&(de=de.slice(Fe+1)),ce.hasOwnProperty(et)?{space:ce[et],local:de}:de}},ae.attr=function(de,Fe){if(arguments.length<2){if(typeof de=="string"){var et=this.node();return de=v.ns.qualify(de),de.local?et.getAttributeNS(de.space,de.local):et.getAttribute(de)}for(Fe in de)this.each(be(Fe,de[Fe]));return this}return this.each(be(de,Fe))};function be(de,Fe){de=v.ns.qualify(de);function et(){this.removeAttribute(de)}function mt(){this.removeAttributeNS(de.space,de.local)}function bt(){this.setAttribute(de,Fe)}function Mt(){this.setAttributeNS(de.space,de.local,Fe)}function ar(){var _r=Fe.apply(this,arguments);_r==null?this.removeAttribute(de):this.setAttribute(de,_r)}function Ot(){var _r=Fe.apply(this,arguments);_r==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,_r)}return Fe==null?de.local?mt:et:typeof Fe=="function"?de.local?Ot:ar:de.local?Mt:bt}function Ae(de){return de.trim().replace(/\s+/g," ")}ae.classed=function(de,Fe){if(arguments.length<2){if(typeof de=="string"){var et=this.node(),mt=(de=ze(de)).length,bt=-1;if(Fe=et.classList){for(;++bt<mt;)if(!Fe.contains(de[bt]))return!1}else for(Fe=et.getAttribute("class");++bt<mt;)if(!De(de[bt]).test(Fe))return!1;return!0}for(Fe in de)this.each(Ze(Fe,de[Fe]));return this}return this.each(Ze(de,Fe))};function De(de){return new RegExp("(?:^|\\s+)"+v.requote(de)+"(?:\\s+|$)","g")}function ze(de){return(de+"").trim().split(/^|\s+/)}function Ze(de,Fe){de=ze(de).map(at);var et=de.length;function mt(){for(var Mt=-1;++Mt<et;)de[Mt](this,Fe)}function bt(){for(var Mt=-1,ar=Fe.apply(this,arguments);++Mt<et;)de[Mt](this,ar)}return typeof Fe=="function"?bt:mt}function at(de){var Fe=De(de);return function(et,mt){if(bt=et.classList)return mt?bt.add(de):bt.remove(de);var bt=et.getAttribute("class")||"";mt?(Fe.lastIndex=0,Fe.test(bt)||et.setAttribute("class",Ae(bt+" "+de))):et.setAttribute("class",Ae(bt.replace(Fe," ")))}}ae.style=function(de,Fe,et){var mt=arguments.length;if(mt<3){if(typeof de!="string"){mt<2&&(Fe="");for(et in de)this.each(nt(et,de[et],Fe));return this}if(mt<2){var bt=this.node();return t(bt).getComputedStyle(bt,null).getPropertyValue(de)}et=""}return this.each(nt(de,Fe,et))};function nt(de,Fe,et){function mt(){this.style.removeProperty(de)}function bt(){this.style.setProperty(de,Fe,et)}function Mt(){var ar=Fe.apply(this,arguments);ar==null?this.style.removeProperty(de):this.style.setProperty(de,ar,et)}return Fe==null?mt:typeof Fe=="function"?Mt:bt}ae.property=function(de,Fe){if(arguments.length<2){if(typeof de=="string")return this.node()[de];for(Fe in de)this.each(rt(Fe,de[Fe]));return this}return this.each(rt(de,Fe))};function rt(de,Fe){function et(){delete this[de]}function mt(){this[de]=Fe}function bt(){var Mt=Fe.apply(this,arguments);Mt==null?delete this[de]:this[de]=Mt}return Fe==null?et:typeof Fe=="function"?bt:mt}ae.text=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Fe=de.apply(this,arguments);this.textContent=Fe??""}:de==null?function(){this.textContent=""}:function(){this.textContent=de}):this.node().textContent},ae.html=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Fe=de.apply(this,arguments);this.innerHTML=Fe??""}:de==null?function(){this.innerHTML=""}:function(){this.innerHTML=de}):this.node().innerHTML},ae.append=function(de){return de=st(de),this.select(function(){return this.appendChild(de.apply(this,arguments))})};function st(de){function Fe(){var mt=this.ownerDocument,bt=this.namespaceURI;return bt===re&&mt.documentElement.namespaceURI===re?mt.createElement(de):mt.createElementNS(bt,de)}function et(){return this.ownerDocument.createElementNS(de.space,de.local)}return typeof de=="function"?de:(de=v.ns.qualify(de)).local?et:Fe}ae.insert=function(de,Fe){return de=st(de),Fe=j(Fe),this.select(function(){return this.insertBefore(de.apply(this,arguments),Fe.apply(this,arguments)||null)})},ae.remove=function(){return this.each(Me)};function Me(){var de=this.parentNode;de&&de.removeChild(this)}ae.data=function(de,Fe){var et=-1,mt=this.length,bt,Mt;if(!arguments.length){for(de=new Array(mt=(bt=this[0]).length);++et<mt;)(Mt=bt[et])&&(de[et]=Mt.__data__);return de}function ar(Xr,xa){var da,Ja=Xr.length,ti=xa.length,Sa=Math.min(Ja,ti),Fa=new Array(ti),Xa=new Array(ti),fi=new Array(Ja),ni,La;if(Fe){var sn=new A,rn=new Array(Ja),vn;for(da=-1;++da<Ja;)(ni=Xr[da])&&(sn.has(vn=Fe.call(ni,ni.__data__,da))?fi[da]=ni:sn.set(vn,ni),rn[da]=vn);for(da=-1;++da<ti;)(ni=sn.get(vn=Fe.call(xa,La=xa[da],da)))?ni!==!0&&(Fa[da]=ni,ni.__data__=La):Xa[da]=ye(La),sn.set(vn,!0);for(da=-1;++da<Ja;)da in rn&&sn.get(rn[da])!==!0&&(fi[da]=Xr[da])}else{for(da=-1;++da<Sa;)ni=Xr[da],La=xa[da],ni?(ni.__data__=La,Fa[da]=ni):Xa[da]=ye(La);for(;da<ti;++da)Xa[da]=ye(xa[da]);for(;da<Ja;++da)fi[da]=Xr[da]}Xa.update=Fa,Xa.parentNode=Fa.parentNode=fi.parentNode=Xr.parentNode,Ot.push(Xa),_r.push(Fa),Gr.push(fi)}var Ot=ot([]),_r=Y([]),Gr=Y([]);if(typeof de=="function")for(;++et<mt;)ar(bt=this[et],de.call(bt,bt.parentNode.__data__,et));else for(;++et<mt;)ar(bt=this[et],de);return _r.enter=function(){return Ot},_r.exit=function(){return Gr},_r};function ye(de){return{__data__:de}}ae.datum=function(de){return arguments.length?this.property("__data__",de):this.property("__data__")},ae.filter=function(de){var Fe=[],et,mt,bt;typeof de!="function"&&(de=he(de));for(var Mt=0,ar=this.length;Mt<ar;Mt++){Fe.push(et=[]),et.parentNode=(mt=this[Mt]).parentNode;for(var Ot=0,_r=mt.length;Ot<_r;Ot++)(bt=mt[Ot])&&de.call(bt,bt.__data__,Ot,Mt)&&et.push(bt)}return Y(Fe)};function he(de){return function(){return oe(this,de)}}ae.order=function(){for(var de=-1,Fe=this.length;++de<Fe;)for(var et=this[de],mt=et.length-1,bt=et[mt],Mt;--mt>=0;)(Mt=et[mt])&&(bt&&bt!==Mt.nextSibling&&bt.parentNode.insertBefore(Mt,bt),bt=Mt);return this},ae.sort=function(de){de=Oe.apply(this,arguments);for(var Fe=-1,et=this.length;++Fe<et;)this[Fe].sort(de);return this.order()};function Oe(de){return arguments.length||(de=s),function(Fe,et){return Fe&&et?de(Fe.__data__,et.__data__):!Fe-!et}}ae.each=function(de){return tt(this,function(Fe,et,mt){de.call(Fe,Fe.__data__,et,mt)})};function tt(de,Fe){for(var et=0,mt=de.length;et<mt;et++)for(var bt=de[et],Mt=0,ar=bt.length,Ot;Mt<ar;Mt++)(Ot=bt[Mt])&&Fe(Ot,Mt,et);return de}ae.call=function(de){var Fe=S(arguments);return de.apply(Fe[0]=this,Fe),this},ae.empty=function(){return!this.node()},ae.node=function(){for(var de=0,Fe=this.length;de<Fe;de++)for(var et=this[de],mt=0,bt=et.length;mt<bt;mt++){var Mt=et[mt];if(Mt)return Mt}return null},ae.size=function(){var de=0;return tt(this,function(){++de}),de};function ot(de){return V(de,Qe),de}var Qe=[];v.selection.enter=ot,v.selection.enter.prototype=Qe,Qe.append=ae.append,Qe.empty=ae.empty,Qe.node=ae.node,Qe.call=ae.call,Qe.size=ae.size,Qe.select=function(de){for(var Fe=[],et,mt,bt,Mt,ar,Ot=-1,_r=this.length;++Ot<_r;){bt=(Mt=this[Ot]).update,Fe.push(et=[]),et.parentNode=Mt.parentNode;for(var Gr=-1,Xr=Mt.length;++Gr<Xr;)(ar=Mt[Gr])?(et.push(bt[Gr]=mt=de.call(Mt.parentNode,ar.__data__,Gr,Ot)),mt.__data__=ar.__data__):et.push(null)}return Y(Fe)},Qe.insert=function(de,Fe){return arguments.length<2&&(Fe=Pt(this)),ae.insert.call(this,de,Fe)};function Pt(de){var Fe,et;return function(mt,bt,Mt){var ar=de[Mt].update,Ot=ar.length,_r;for(Mt!=et&&(et=Mt,Fe=0),bt>=Fe&&(Fe=bt+1);!(_r=ar[Fe])&&++Fe<Ot;);return _r}}v.select=function(de){var Fe;return typeof de=="string"?(Fe=[ee(de,E)],Fe.parentNode=E.documentElement):(Fe=[de],Fe.parentNode=e(de)),Y([Fe])},v.selectAll=function(de){var Fe;return typeof de=="string"?(Fe=S(q(de,E)),Fe.parentNode=E.documentElement):(Fe=S(de),Fe.parentNode=null),Y([Fe])},ae.on=function(de,Fe,et){var mt=arguments.length;if(mt<3){if(typeof de!="string"){mt<2&&(Fe=!1);for(et in de)this.each(It(et,de[et],Fe));return this}if(mt<2)return(mt=this.node()["__on"+de])&&mt._;et=!1}return this.each(It(de,Fe,et))};function It(de,Fe,et){var mt="__on"+de,bt=de.indexOf("."),Mt=Wt;bt>0&&(de=de.slice(0,bt));var ar=qt.get(de);ar&&(de=ar,Mt=kr);function Ot(){var Xr=this[mt];Xr&&(this.removeEventListener(de,Xr,Xr.$),delete this[mt])}function _r(){var Xr=Mt(Fe,S(arguments));Ot.call(this),this.addEventListener(de,this[mt]=Xr,Xr.$=et),Xr._=Fe}function Gr(){var Xr=new RegExp("^__on([^.]+)"+v.requote(de)+"$"),xa;for(var da in this)if(xa=da.match(Xr)){var Ja=this[da];this.removeEventListener(xa[1],Ja,Ja.$),delete this[da]}}return bt?Fe?_r:Ot:Fe?U:Gr}var qt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&qt.forEach(function(de){"on"+de in E&&qt.remove(de)});function Wt(de,Fe){return function(et){var mt=v.event;v.event=et,Fe[0]=this.__data__;try{de.apply(this,Fe)}finally{v.event=mt}}}function kr(de,Fe){var et=Wt(de,Fe);return function(mt){var bt=this,Mt=mt.relatedTarget;(!Mt||Mt!==bt&&!(Mt.compareDocumentPosition(bt)&8))&&et.call(bt,mt)}}var mr,qr=0;function Sr(de){var Fe=".dragsuppress-"+ ++qr,et="click"+Fe,mt=v.select(t(de)).on("touchmove"+Fe,$).on("dragstart"+Fe,$).on("selectstart"+Fe,$);if(mr==null&&(mr="onselectstart"in de?!1:O(de.style,"userSelect")),mr){var bt=e(de).style,Mt=bt[mr];bt[mr]="none"}return function(ar){if(mt.on(Fe,null),mr&&(bt[mr]=Mt),ar){var Ot=function(){mt.on(et,null)};mt.on(et,function(){$(),Ot()},!0),setTimeout(Ot,0)}}}v.mouse=function(de){return wt(de,se())};var Rr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function wt(de,Fe){Fe.changedTouches&&(Fe=Fe.changedTouches[0]);var et=de.ownerSVGElement||de;if(et.createSVGPoint){var mt=et.createSVGPoint();if(Rr<0){var bt=t(de);if(bt.scrollX||bt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Mt=et[0][0].getScreenCTM();Rr=!(Mt.f||Mt.e),et.remove()}}return Rr?(mt.x=Fe.pageX,mt.y=Fe.pageY):(mt.x=Fe.clientX,mt.y=Fe.clientY),mt=mt.matrixTransform(de.getScreenCTM().inverse()),[mt.x,mt.y]}var ar=de.getBoundingClientRect();return[Fe.clientX-ar.left-de.clientLeft,Fe.clientY-ar.top-de.clientTop]}v.touch=function(de,Fe,et){if(arguments.length<3&&(et=Fe,Fe=se().changedTouches),Fe){for(var mt=0,bt=Fe.length,Mt;mt<bt;++mt)if((Mt=Fe[mt]).identifier===et)return wt(de,Mt)}},v.behavior.drag=function(){var de=le(bt,"drag","dragstart","dragend"),Fe=null,et=Mt(U,v.mouse,t,"mousemove","mouseup"),mt=Mt(Ne,v.touch,F,"touchmove","touchend");function bt(){this.on("mousedown.drag",et).on("touchstart.drag",mt)}function Mt(ar,Ot,_r,Gr,Xr){return function(){var xa=this,da=v.event.target.correspondingElement||v.event.target,Ja=xa.parentNode,ti=de.of(xa,arguments),Sa=0,Fa=ar(),Xa=".drag"+(Fa==null?"":"-"+Fa),fi,ni=v.select(_r(da)).on(Gr+Xa,rn).on(Xr+Xa,vn),La=Sr(da),sn=Ot(Ja,Fa);Fe?(fi=Fe.apply(xa,arguments),fi=[fi.x-sn[0],fi.y-sn[1]]):fi=[0,0],ti({type:"dragstart"});function rn(){var Pn=Ot(Ja,Fa),Jn,ro;Pn&&(Jn=Pn[0]-sn[0],ro=Pn[1]-sn[1],Sa|=Jn|ro,sn=Pn,ti({type:"drag",x:Pn[0]+fi[0],y:Pn[1]+fi[1],dx:Jn,dy:ro}))}function vn(){Ot(Ja,Fa)&&(ni.on(Gr+Xa,null).on(Xr+Xa,null),La(Sa),ti({type:"dragend"}))}}}return bt.origin=function(ar){return arguments.length?(Fe=ar,bt):Fe},v.rebind(bt,de,"on")};function Ne(){return v.event.changedTouches[0].identifier}v.touches=function(de,Fe){return arguments.length<2&&(Fe=se().touches),Fe?S(Fe).map(function(et){var mt=wt(de,et);return mt.identifier=et.identifier,mt}):[]};var Ke=1e-6,Te=Ke*Ke,Ie=Math.PI,Ve=2*Ie,Ce=Ve-Ke,Ee=Ie/2,Pe=Ie/180,ft=180/Ie;function ct(de){return de>0?1:de<0?-1:0}function _t(de,Fe,et){return(Fe[0]-de[0])*(et[1]-de[1])-(Fe[1]-de[1])*(et[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ie:Math.acos(de)}function ir(de){return de>1?Ee:de<-1?-Ee:Math.asin(de)}function rr(de){return((de=Math.exp(de))-1/de)/2}function er(de){return((de=Math.exp(de))+1/de)/2}function Lr(de){return((de=Math.exp(2*de))-1)/(de+1)}function fa(de){return(de=Math.sin(de/2))*de}var Da=Math.SQRT2,Ia=2,qa=4;v.interpolateZoom=function(de,Fe){var et=de[0],mt=de[1],bt=de[2],Mt=Fe[0],ar=Fe[1],Ot=Fe[2],_r=Mt-et,Gr=ar-mt,Xr=_r*_r+Gr*Gr,xa,da;if(Xr<Te)da=Math.log(Ot/bt)/Da,xa=function(fi){return[et+fi*_r,mt+fi*Gr,bt*Math.exp(Da*fi*da)]};else{var Ja=Math.sqrt(Xr),ti=(Ot*Ot-bt*bt+qa*Xr)/(2*bt*Ia*Ja),Sa=(Ot*Ot-bt*bt-qa*Xr)/(2*Ot*Ia*Ja),Fa=Math.log(Math.sqrt(ti*ti+1)-ti),Xa=Math.log(Math.sqrt(Sa*Sa+1)-Sa);da=(Xa-Fa)/Da,xa=function(fi){var ni=fi*da,La=er(Fa),sn=bt/(Ia*Ja)*(La*Lr(Da*ni+Fa)-rr(Fa));return[et+sn*_r,mt+sn*Gr,bt*La/er(Da*ni+Fa)]}}return xa.duration=da*1e3,xa},v.behavior.zoom=function(){var de={x:0,y:0,k:1},Fe,et,mt,bt=[960,500],Mt=Wa,ar=250,Ot=0,_r="mousedown.zoom",Gr="mousemove.zoom",Xr="mouseup.zoom",xa,da="touchstart.zoom",Ja,ti=le(ni,"zoomstart","zoom","zoomend"),Sa,Fa,Xa,fi;hi||(hi="onwheel"in E?(Ca=function(){return-v.event.deltaY*(v.event.deltaMode?120:1)},"wheel"):"onmousewheel"in E?(Ca=function(){return v.event.wheelDelta},"mousewheel"):(Ca=function(){return-v.event.detail},"MozMousePixelScroll"));function ni(gn){gn.on(_r,Ho).on(hi+".zoom",al).on("dblclick.zoom",xl).on(da,cl)}ni.event=function(gn){gn.each(function(){var vo=ti.of(this,arguments),cs=de;ps?v.select(this).transition().each("start.zoom",function(){de=this.__chart__||{x:0,y:0,k:1},ro(vo)}).tween("zoom:zoom",function(){var ms=bt[0],Al=bt[1],Hl=et?et[0]:ms/2,Su=et?et[1]:Al/2,Rl=v.interpolateZoom([(Hl-de.x)/de.k,(Su-de.y)/de.k,ms/de.k],[(Hl-cs.x)/cs.k,(Su-cs.y)/cs.k,ms/cs.k]);return function(_c){var it=Rl(_c),Zt=ms/it[2];this.__chart__=de={x:Hl-it[0]*Zt,y:Su-it[1]*Zt,k:Zt},Yo(vo)}}).each("interrupt.zoom",function(){io(vo)}).each("end.zoom",function(){io(vo)}):(this.__chart__=de,ro(vo),Yo(vo),io(vo))})},ni.translate=function(gn){return arguments.length?(de={x:+gn[0],y:+gn[1],k:de.k},Jn(),ni):[de.x,de.y]},ni.scale=function(gn){return arguments.length?(de={x:de.x,y:de.y,k:null},rn(+gn),Jn(),ni):de.k},ni.scaleExtent=function(gn){return arguments.length?(Mt=gn==null?Wa:[+gn[0],+gn[1]],ni):Mt},ni.center=function(gn){return arguments.length?(mt=gn&&[+gn[0],+gn[1]],ni):mt},ni.size=function(gn){return arguments.length?(bt=gn&&[+gn[0],+gn[1]],ni):bt},ni.duration=function(gn){return arguments.length?(ar=+gn,ni):ar},ni.x=function(gn){return arguments.length?(Fa=gn,Sa=gn.copy(),de={x:0,y:0,k:1},ni):Fa},ni.y=function(gn){return arguments.length?(fi=gn,Xa=gn.copy(),de={x:0,y:0,k:1},ni):fi};function La(gn){return[(gn[0]-de.x)/de.k,(gn[1]-de.y)/de.k]}function sn(gn){return[gn[0]*de.k+de.x,gn[1]*de.k+de.y]}function rn(gn){de.k=Math.max(Mt[0],Math.min(Mt[1],gn))}function vn(gn,vo){vo=sn(vo),de.x+=gn[0]-vo[0],de.y+=gn[1]-vo[1]}function Pn(gn,vo,cs,ms){gn.__chart__={x:de.x,y:de.y,k:de.k},rn(Math.pow(2,ms)),vn(et=vo,cs),gn=v.select(gn),ar>0&&(gn=gn.transition().duration(ar)),gn.call(ni.event)}function Jn(){Fa&&Fa.domain(Sa.range().map(function(gn){return(gn-de.x)/de.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(gn){return(gn-de.y)/de.k}).map(Xa.invert))}function ro(gn){Ot++||gn({type:"zoomstart"})}function Yo(gn){Jn(),gn({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function io(gn){--Ot||(gn({type:"zoomend"}),et=null)}function Ho(){var gn=this,vo=ti.of(gn,arguments),cs=0,ms=v.select(t(gn)).on(Gr,Su).on(Xr,Rl),Al=La(v.mouse(gn)),Hl=Sr(gn);Bn.call(gn),ro(vo);function Su(){cs=1,vn(v.mouse(gn),Al),Yo(vo)}function Rl(){ms.on(Gr,null).on(Xr,null),Hl(cs),io(vo)}}function cl(){var gn=this,vo=ti.of(gn,arguments),cs={},ms=0,Al,Hl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Hl,Rl="touchend"+Hl,_c=[],it=v.select(gn),Zt=Sr(gn);oa(),ro(vo),it.on(_r,null).on(da,oa);function fr(){var _a=v.touches(gn);return Al=de.k,_a.forEach(function(Ya){Ya.identifier in cs&&(cs[Ya.identifier]=La(Ya))}),_a}function oa(){var _a=v.event.target;v.select(_a).on(Su,wa).on(Rl,ma),_c.push(_a);for(var Ya=v.event.changedTouches,bi=0,yi=Ya.length;bi<yi;++bi)cs[Ya[bi].identifier]=null;var si=fr(),yn=Date.now();if(si.length===1){if(yn-Ja<500){var zi=si[0];Pn(gn,zi,cs[zi.identifier],Math.floor(Math.log(de.k)/Math.LN2)+1),$()}Ja=yn}else if(si.length>1){var zi=si[0],Ei=si[1],Na=zi[0]-Ei[0],ea=zi[1]-Ei[1];ms=Na*Na+ea*ea}}function wa(){var _a=v.touches(gn),Ya,bi,yi,si;Bn.call(gn);for(var yn=0,zi=_a.length;yn<zi;++yn,si=null)if(yi=_a[yn],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=ms&&Math.sqrt(Ei/ms);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,vn(Ya,bi),Yo(vo)}function ma(){if(v.event.touches.length){for(var _a=v.event.changedTouches,Ya=0,bi=_a.length;Ya<bi;++Ya)delete cs[_a[Ya].identifier];for(var yi in cs)return void fr()}v.selectAll(_c).on(Hl,null),it.on(_r,Ho).on(da,cl),Zt(),io(vo)}}function al(){var gn=ti.of(this,arguments);xa?clearTimeout(xa):(Bn.call(this),Fe=La(et=mt||v.mouse(this)),ro(gn)),xa=setTimeout(function(){xa=null,io(gn)},50),$(),rn(Math.pow(2,Ca()*.002)*de.k),vn(et,Fe),Yo(gn)}function xl(){var gn=v.mouse(this),vo=Math.log(de.k)/Math.LN2;Pn(this,gn,La(gn),v.event.shiftKey?Math.ceil(vo)-1:Math.floor(vo)+1)}return v.rebind(ni,ti,"on")};var Wa=[0,1/0],Ca,hi;v.color=wi;function wi(){}wi.prototype.toString=function(){return this.rgb()+""},v.hsl=Kt;function Kt(de,Fe,et){return this instanceof Kt?(this.h=+de,this.s=+Fe,void(this.l=+et)):arguments.length<2?de instanceof Kt?new Kt(de.h,de.s,de.l):Ir(""+de,Ur,Kt):new Kt(de,Fe,et)}var Ft=Kt.prototype=new wi;Ft.brighter=function(de){return de=Math.pow(.7,arguments.length?de:1),new Kt(this.h,this.s,this.l/de)},Ft.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Kt(this.h,this.s,de*this.l)},Ft.rgb=function(){return Yt(this.h,this.s,this.l)};function Yt(de,Fe,et){var mt,bt;de=isNaN(de)?0:(de%=360)<0?de+360:de,Fe=isNaN(Fe)||Fe<0?0:Fe>1?1:Fe,et=et<0?0:et>1?1:et,bt=et<=.5?et*(1+Fe):et+Fe-et*Fe,mt=2*et-bt;function Mt(Ot){return Ot>360?Ot-=360:Ot<0&&(Ot+=360),Ot<60?mt+(bt-mt)*Ot/60:Ot<180?bt:Ot<240?mt+(bt-mt)*(240-Ot)/60:mt}function ar(Ot){return Math.round(Mt(Ot)*255)}return new Tt(ar(de+120),ar(de),ar(de-120))}v.hcl=Jt;function Jt(de,Fe,et){return this instanceof Jt?(this.h=+de,this.c=+Fe,void(this.l=+et)):arguments.length<2?de instanceof Jt?new Jt(de.h,de.c,de.l):de instanceof ra?Ra(de.l,de.a,de.b):Ra((de=Hr((de=v.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Jt(de,Fe,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(de){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?de:1)))},Fr.darker=function(de){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?de:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(de,Fe,et){return isNaN(de)&&(de=0),isNaN(Fe)&&(Fe=0),new ra(et,Math.cos(de*=Pe)*Fe,Math.sin(de)*Fe)}v.lab=ra;function ra(de,Fe,et){return this instanceof ra?(this.l=+de,this.a=+Fe,void(this.b=+et)):arguments.length<2?de instanceof ra?new ra(de.l,de.a,de.b):de instanceof Jt?ta(de.h,de.c,de.l):Hr((de=Tt(de)).r,de.g,de.b):new ra(de,Fe,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(de){return new ra(Math.min(100,this.l+ca*(arguments.length?de:1)),this.a,this.b)},ri.darker=function(de){return new ra(Math.max(0,this.l-ca*(arguments.length?de:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(de,Fe,et){var mt=(de+16)/116,bt=mt+Fe/500,Mt=mt-et/200;return bt=tn(bt)*Ba,mt=tn(mt)*$a,Mt=tn(Mt)*Za,new Tt(hn(3.2404542*bt-1.5371385*mt-.4985314*Mt),hn(-.969266*bt+1.8760108*mt+.041556*Mt),hn(.0556434*bt-.2040259*mt+1.0572252*Mt))}function Ra(de,Fe,et){return de>0?new Jt(Math.atan2(et,Fe)*ft,Math.sqrt(Fe*Fe+et*et),de):new Jt(NaN,NaN,de)}function tn(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function on(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function hn(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}v.rgb=Tt;function Tt(de,Fe,et){return this instanceof Tt?(this.r=~~de,this.g=~~Fe,void(this.b=~~et)):arguments.length<2?de instanceof Tt?new Tt(de.r,de.g,de.b):Ir(""+de,Tt,Yt):new Tt(de,Fe,et)}function ut(de){return new Tt(de>>16,de>>8&255,de&255)}function Br(de){return ut(de)+""}var Cr=Tt.prototype=new wi;Cr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Fe=this.r,et=this.g,mt=this.b,bt=30;return!Fe&&!et&&!mt?new Tt(bt,bt,bt):(Fe&&Fe<bt&&(Fe=bt),et&&et<bt&&(et=bt),mt&&mt<bt&&(mt=bt),new Tt(Math.min(255,Fe/de),Math.min(255,et/de),Math.min(255,mt/de)))},Cr.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Tt(de*this.r,de*this.g,de*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(de){return de<16?"0"+Math.max(0,de).toString(16):Math.min(255,de).toString(16)}function Ir(de,Fe,et){var mt=0,bt=0,Mt=0,ar,Ot,_r;if(ar=/([a-z]+)\((.*)\)/.exec(de=de.toLowerCase()),ar)switch(Ot=ar[2].split(","),ar[1]){case"hsl":return et(parseFloat(Ot[0]),parseFloat(Ot[1])/100,parseFloat(Ot[2])/100);case"rgb":return Fe(Xt(Ot[0]),Xt(Ot[1]),Xt(Ot[2]))}return(_r=vr.get(de))?Fe(_r.r,_r.g,_r.b):(de!=null&&de.charAt(0)==="#"&&!isNaN(_r=parseInt(de.slice(1),16))&&(de.length===4?(mt=(_r&3840)>>4,mt=mt>>4|mt,bt=_r&240,bt=bt>>4|bt,Mt=_r&15,Mt=Mt<<4|Mt):de.length===7&&(mt=(_r&16711680)>>16,bt=(_r&65280)>>8,Mt=_r&255)),Fe(mt,bt,Mt))}function Ur(de,Fe,et){var mt=Math.min(de/=255,Fe/=255,et/=255),bt=Math.max(de,Fe,et),Mt=bt-mt,ar,Ot,_r=(bt+mt)/2;return Mt?(Ot=_r<.5?Mt/(bt+mt):Mt/(2-bt-mt),de==bt?ar=(Fe-et)/Mt+(Fe<et?6:0):Fe==bt?ar=(et-de)/Mt+2:ar=(de-Fe)/Mt+4,ar*=60):(ar=NaN,Ot=_r>0&&_r<1?0:ar),new Kt(ar,Ot,_r)}function Hr(de,Fe,et){de=xt(de),Fe=xt(Fe),et=xt(et);var mt=on((.4124564*de+.3575761*Fe+.1804375*et)/Ba),bt=on((.2126729*de+.7151522*Fe+.072175*et)/$a),Mt=on((.0193339*de+.119192*Fe+.9503041*et)/Za);return ra(116*bt-16,500*(mt-bt),200*(bt-Mt))}function xt(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Xt(de){var Fe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Fe*2.55):Fe}var vr=v.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(de,Fe){vr.set(de,ut(Fe))});function Or(de){return typeof de=="function"?de:function(){return de}}v.functor=Or,v.xhr=ba(F);function ba(de){return function(Fe,et,mt){return arguments.length===2&&typeof et=="function"&&(mt=et,et=null),Pa(Fe,et,de,mt)}}function Pa(de,Fe,et,mt){var bt={},Mt=v.dispatch("beforesend","progress","load","error"),ar={},Ot=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in Ot)&&/^(http(s)?:)?\/\//.test(de)&&(Ot=new XDomainRequest),"onload"in Ot?Ot.onload=Ot.onerror=Gr:Ot.onreadystatechange=function(){Ot.readyState>3&&Gr()};function Gr(){var Xr=Ot.status,xa;if(!Xr&&la(Ot)||Xr>=200&&Xr<300||Xr===304){try{xa=et.call(bt,Ot)}catch(da){Mt.error.call(bt,da);return}Mt.load.call(bt,xa)}else Mt.error.call(bt,Ot)}return Ot.onprogress=function(Xr){var xa=v.event;v.event=Xr;try{Mt.progress.call(bt,Ot)}finally{v.event=xa}},bt.header=function(Xr,xa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?ar[Xr]:(xa==null?delete ar[Xr]:ar[Xr]=xa+"",bt)},bt.mimeType=function(Xr){return arguments.length?(Fe=Xr==null?null:Xr+"",bt):Fe},bt.responseType=function(Xr){return arguments.length?(_r=Xr,bt):_r},bt.response=function(Xr){return et=Xr,bt},["get","post"].forEach(function(Xr){bt[Xr]=function(){return bt.send.apply(bt,[Xr].concat(S(arguments)))}}),bt.send=function(Xr,xa,da){if(arguments.length===2&&typeof xa=="function"&&(da=xa,xa=null),Ot.open(Xr,de,!0),Fe!=null&&!("accept"in ar)&&(ar.accept=Fe+",*/*"),Ot.setRequestHeader)for(var Ja in ar)Ot.setRequestHeader(Ja,ar[Ja]);return Fe!=null&&Ot.overrideMimeType&&Ot.overrideMimeType(Fe),_r!=null&&(Ot.responseType=_r),da!=null&&bt.on("error",da).on("load",function(ti){da(null,ti)}),Mt.beforesend.call(bt,Ot),Ot.send(xa??null),bt},bt.abort=function(){return Ot.abort(),bt},v.rebind(bt,Mt,"on"),mt==null?bt:bt.get(ya(mt))}function ya(de){return de.length===1?function(Fe,et){de(Fe==null?et:null)}:de}function la(de){var Fe=de.responseType;return Fe&&Fe!=="text"?de.response:de.responseText}v.dsv=function(de,Fe){var et=new RegExp('["'+de+`
]`),mt=de.charCodeAt(0);function bt(Gr,Xr,xa){arguments.length<3&&(xa=Xr,Xr=null);var da=Pa(Gr,Fe,Xr==null?Mt:ar(Xr),xa);return da.row=function(Ja){return arguments.length?da.response((Xr=Ja)==null?Mt:ar(Ja)):Xr},da}function Mt(Gr){return bt.parse(Gr.responseText)}function ar(Gr){return function(Xr){return bt.parse(Xr.responseText,Gr)}}bt.parse=function(Gr,Xr){var xa;return bt.parseRows(Gr,function(da,Ja){if(xa)return xa(da,Ja-1);var ti=function(Sa){for(var Fa={},Xa=da.length,fi=0;fi<Xa;++fi)Fa[da[fi]]=Sa[fi];return Fa};xa=Xr?function(Sa,Fa){return Xr(ti(Sa),Fa)}:ti})},bt.parseRows=function(Gr,Xr){var xa={},da={},Ja=[],ti=Gr.length,Sa=0,Fa=0,Xa,fi;function ni(){if(Sa>=ti)return da;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 vn=Gr.charCodeAt(rn+1);return vn===13?(fi=!0,Gr.charCodeAt(rn+2)===10&&++Sa):vn===10&&(fi=!0),Gr.slice(sn+1,rn).replace(/""/g,'"')}for(;Sa<ti;){var vn=Gr.charCodeAt(Sa++),Pn=1;if(vn===10)fi=!0;else if(vn===13)fi=!0,Gr.charCodeAt(Sa)===10&&(++Sa,++Pn);else if(vn!==mt)continue;return Gr.slice(sn,Sa-Pn)}return Gr.slice(sn)}for(;(Xa=ni())!==da;){for(var La=[];Xa!==xa&&Xa!==da;)La.push(Xa),Xa=ni();Xr&&(La=Xr(La,Fa++))==null||Ja.push(La)}return Ja},bt.format=function(Gr){if(Array.isArray(Gr[0]))return bt.formatRows(Gr);var Xr=new z,xa=[];return Gr.forEach(function(da){for(var Ja in da)Xr.has(Ja)||xa.push(Xr.add(Ja))}),[xa.map(_r).join(de)].concat(Gr.map(function(da){return xa.map(function(Ja){return _r(da[Ja])}).join(de)})).join(`
`)},bt.formatRows=function(Gr){return Gr.map(Ot).join(`
`)};function Ot(Gr){return Gr.map(_r).join(de)}function _r(Gr){return et.test(Gr)?'"'+Gr.replace(/\"/g,'""')+'"':Gr}return bt},v.csv=v.dsv(",","text/csv"),v.tsv=v.dsv(" ","text/tab-separated-values");var Ta,Ai,ki,Ki,_n=this[O(this,"requestAnimationFrame")]||function(de){setTimeout(de,17)};v.timer=function(){Rn.apply(this,arguments)};function Rn(de,Fe,et){var mt=arguments.length;mt<2&&(Fe=0),mt<3&&(et=Date.now());var bt=et+Fe,Mt={c:de,t:bt,n:null};return Ai?Ai.n=Mt:Ta=Mt,Ai=Mt,ki||(Ki=clearTimeout(Ki),ki=1,_n(En)),Mt}function En(){var de=On(),Fe=no()-de;Fe>24?(isFinite(Fe)&&(clearTimeout(Ki),Ki=setTimeout(En,Fe)),ki=0):(ki=1,_n(En))}v.timer.flush=function(){On(),no()};function On(){for(var de=Date.now(),Fe=Ta;Fe;)de>=Fe.t&&Fe.c(de-Fe.t)&&(Fe.c=null),Fe=Fe.n;return de}function no(){for(var de,Fe=Ta,et=1/0;Fe;)Fe.c?(Fe.t<et&&(et=Fe.t),Fe=(de=Fe).n):Fe=de?de.n=Fe.n:Ta=Fe.n;return Ai=de,et}v.round=function(de,Fe){return Fe?Math.round(de*(Fe=Math.pow(10,Fe)))/Fe:Math.round(de)},v.geom={};function cn(de){return de[0]}function lo(de){return de[1]}v.geom.hull=function(de){var Fe=cn,et=lo;if(arguments.length)return mt(de);function mt(bt){if(bt.length<3)return[];var Mt=Or(Fe),ar=Or(et),Ot,_r=bt.length,Gr=[],Xr=[];for(Ot=0;Ot<_r;Ot++)Gr.push([+Mt.call(this,bt[Ot],Ot),+ar.call(this,bt[Ot],Ot),Ot]);for(Gr.sort(hs),Ot=0;Ot<_r;Ot++)Xr.push([Gr[Ot][0],-Gr[Ot][1]]);var xa=Wo(Gr),da=Wo(Xr),Ja=da[0]===xa[0],ti=da[da.length-1]===xa[xa.length-1],Sa=[];for(Ot=xa.length-1;Ot>=0;--Ot)Sa.push(bt[Gr[xa[Ot]][2]]);for(Ot=+Ja;Ot<da.length-ti;++Ot)Sa.push(bt[Gr[da[Ot]][2]]);return Sa}return mt.x=function(bt){return arguments.length?(Fe=bt,mt):Fe},mt.y=function(bt){return arguments.length?(et=bt,mt):et},mt};function Wo(de){for(var Fe=de.length,et=[0,1],mt=2,bt=2;bt<Fe;bt++){for(;mt>1&&_t(de[et[mt-2]],de[et[mt-1]],de[bt])<=0;)--mt;et[mt++]=bt}return et.slice(0,mt)}function hs(de,Fe){return de[0]-Fe[0]||de[1]-Fe[1]}v.geom.polygon=function(de){return V(de,Oo),de};var Oo=v.geom.polygon.prototype=[];Oo.area=function(){for(var de=-1,Fe=this.length,et,mt=this[Fe-1],bt=0;++de<Fe;)et=mt,mt=this[de],bt+=et[1]*mt[0]-et[0]*mt[1];return bt*.5},Oo.centroid=function(de){var Fe=-1,et=this.length,mt=0,bt=0,Mt,ar=this[et-1],Ot;for(arguments.length||(de=-1/(6*this.area()));++Fe<et;)Mt=ar,ar=this[Fe],Ot=Mt[0]*ar[1]-ar[0]*Mt[1],mt+=(Mt[0]+ar[0])*Ot,bt+=(Mt[1]+ar[1])*Ot;return[mt*de,bt*de]},Oo.clip=function(de){for(var Fe,et=as(de),mt=-1,bt=this.length-as(this),Mt,ar,Ot=this[bt-1],_r,Gr,Xr;++mt<bt;){for(Fe=de.slice(),de.length=0,_r=this[mt],Gr=Fe[(ar=Fe.length-et)-1],Mt=-1;++Mt<ar;)Xr=Fe[Mt],Wn(Xr,Ot,_r)?(Wn(Gr,Ot,_r)||de.push(No(Gr,Xr,Ot,_r)),de.push(Xr)):Wn(Gr,Ot,_r)&&de.push(No(Gr,Xr,Ot,_r)),Gr=Xr;et&&de.push(de[0]),Ot=_r}return de};function Wn(de,Fe,et){return(et[0]-Fe[0])*(de[1]-Fe[1])<(et[1]-Fe[1])*(de[0]-Fe[0])}function No(de,Fe,et,mt){var bt=de[0],Mt=et[0],ar=Fe[0]-bt,Ot=mt[0]-Mt,_r=de[1],Gr=et[1],Xr=Fe[1]-_r,xa=mt[1]-Gr,da=(Ot*(_r-Gr)-xa*(bt-Mt))/(xa*ar-Ot*Xr);return[bt+da*ar,_r+da*Xr]}function as(de){var Fe=de[0],et=de[de.length-1];return!(Fe[0]-et[0]||Fe[1]-et[1])}var Ns,ss,uo,jn=[],Xn,ls,Cs=[];function Ks(){As(this),this.edge=this.site=this.circle=null}function Xo(de){var Fe=jn.pop()||new Ks;return Fe.site=de,Fe}function Gi(de){ko(de),uo.remove(de),jn.push(de),As(de)}function Ln(de){var Fe=de.circle,et=Fe.x,mt=Fe.cy,bt={x:et,y:mt},Mt=de.P,ar=de.N,Ot=[de];Gi(de);for(var _r=Mt;_r.circle&&l(et-_r.circle.x)<Ke&&l(mt-_r.circle.cy)<Ke;)Mt=_r.P,Ot.unshift(_r),Gi(_r),_r=Mt;Ot.unshift(_r),ko(_r);for(var Gr=ar;Gr.circle&&l(et-Gr.circle.x)<Ke&&l(mt-Gr.circle.cy)<Ke;)ar=Gr.N,Ot.push(Gr),Gi(Gr),Gr=ar;Ot.push(Gr),ko(Gr);var Xr=Ot.length,xa;for(xa=1;xa<Xr;++xa)Gr=Ot[xa],_r=Ot[xa-1],Ts(Gr.edge,_r.site,Gr.site,bt);_r=Ot[0],Gr=Ot[Xr-1],Gr.edge=Vs(_r.site,Gr.site,null,bt),xn(_r),xn(Gr)}function Us(de){for(var Fe=de.x,et=de.y,mt,bt,Mt,ar,Ot=uo._;Ot;)if(Mt=_s(Ot,et)-Fe,Mt>Ke)Ot=Ot.L;else if(ar=Fe-Gn(Ot,et),ar>Ke){if(!Ot.R){mt=Ot;break}Ot=Ot.R}else{Mt>-Ke?(mt=Ot.P,bt=Ot):ar>-Ke?(mt=Ot,bt=Ot.N):mt=bt=Ot;break}var _r=Xo(de);if(uo.insert(mt,_r),!(!mt&&!bt)){if(mt===bt){ko(mt),bt=Xo(mt.site),uo.insert(_r,bt),_r.edge=bt.edge=Vs(mt.site,_r.site),xn(mt),xn(bt);return}if(!bt){_r.edge=Vs(mt.site,_r.site);return}ko(mt),ko(bt);var Gr=mt.site,Xr=Gr.x,xa=Gr.y,da=de.x-Xr,Ja=de.y-xa,ti=bt.site,Sa=ti.x-Xr,Fa=ti.y-xa,Xa=2*(da*Fa-Ja*Sa),fi=da*da+Ja*Ja,ni=Sa*Sa+Fa*Fa,La={x:(Fa*fi-Ja*ni)/Xa+Xr,y:(da*ni-Sa*fi)/Xa+xa};Ts(bt.edge,Gr,ti,La),_r.edge=Vs(Gr,de,null,La),bt.edge=Vs(de,ti,null,La),xn(mt),xn(bt)}}function _s(de,Fe){var et=de.site,mt=et.x,bt=et.y,Mt=bt-Fe;if(!Mt)return mt;var ar=de.P;if(!ar)return-1/0;et=ar.site;var Ot=et.x,_r=et.y,Gr=_r-Fe;if(!Gr)return Ot;var Xr=Ot-mt,xa=1/Mt-1/Gr,da=Xr/Gr;return xa?(-da+Math.sqrt(da*da-2*xa*(Xr*Xr/(-2*Gr)-_r+Gr/2+bt-Mt/2)))/xa+mt:(mt+Ot)/2}function Gn(de,Fe){var et=de.N;if(et)return _s(et,Fe);var mt=de.site;return mt.y===Fe?mt.x:1/0}function zs(de){this.site=de,this.edges=[]}zs.prototype.prepare=function(){for(var de=this.edges,Fe=de.length,et;Fe--;)et=de[Fe].edge,(!et.b||!et.a)&&de.splice(Fe,1);return de.sort(Ws),de.length};function vs(de){for(var Fe=de[0][0],et=de[1][0],mt=de[0][1],bt=de[1][1],Mt,ar,Ot,_r,Gr=ss,Xr=Gr.length,xa,da,Ja,ti,Sa,Fa;Xr--;)if(xa=Gr[Xr],!(!xa||!xa.prepare()))for(Ja=xa.edges,ti=Ja.length,da=0;da<ti;)Fa=Ja[da].end(),Ot=Fa.x,_r=Fa.y,Sa=Ja[++da%ti].start(),Mt=Sa.x,ar=Sa.y,(l(Ot-Mt)>Ke||l(_r-ar)>Ke)&&(Ja.splice(da,0,new js(vl(xa.site,Fa,l(Ot-Fe)<Ke&&bt-_r>Ke?{x:Fe,y:l(Mt-Fe)<Ke?ar:bt}:l(_r-bt)<Ke&&et-Ot>Ke?{x:l(ar-bt)<Ke?Mt:et,y:bt}:l(Ot-et)<Ke&&_r-mt>Ke?{x:et,y:l(Mt-et)<Ke?ar:mt}:l(_r-mt)<Ke&&Ot-Fe>Ke?{x:l(ar-mt)<Ke?Mt:Fe,y:mt}:null),xa.site,null)),++ti)}function Ws(de,Fe){return Fe.angle-de.angle}function il(){As(this),this.x=this.y=this.arc=this.site=this.cy=null}function xn(de){var Fe=de.P,et=de.N;if(!(!Fe||!et)){var mt=Fe.site,bt=de.site,Mt=et.site;if(mt!==Mt){var ar=bt.x,Ot=bt.y,_r=mt.x-ar,Gr=mt.y-Ot,Xr=Mt.x-ar,Fa=Mt.y-Ot,xa=2*(_r*Fa-Gr*Xr);if(!(xa>=-Te)){var da=_r*_r+Gr*Gr,Ja=Xr*Xr+Fa*Fa,ti=(Fa*da-Gr*Ja)/xa,Sa=(_r*Ja-Xr*da)/xa,Fa=Sa+Ot,Xa=Cs.pop()||new il;Xa.arc=de,Xa.site=bt,Xa.x=ti+ar,Xa.y=Fa+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=Fa,de.circle=Xa;for(var fi=null,ni=ls._;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}ls.insert(fi,Xa),fi||(Xn=Xa)}}}}function ko(de){var Fe=de.circle;Fe&&(Fe.P||(Xn=Fe.N),ls.remove(Fe),Cs.push(Fe),As(Fe),de.circle=null)}function bo(de,Fe,et,mt){return function(bt){var Mt=bt.a,ar=bt.b,Ot=Mt.x,_r=Mt.y,Gr=ar.x,Xr=ar.y,xa=0,da=1,Ja=Gr-Ot,ti=Xr-_r,Sa;if(Sa=de-Ot,!(!Ja&&Sa>0)){if(Sa/=Ja,Ja<0){if(Sa<xa)return;Sa<da&&(da=Sa)}else if(Ja>0){if(Sa>da)return;Sa>xa&&(xa=Sa)}if(Sa=et-Ot,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>da)return;Sa>xa&&(xa=Sa)}else if(Ja>0){if(Sa<xa)return;Sa<da&&(da=Sa)}if(Sa=Fe-_r,!(!ti&&Sa>0)){if(Sa/=ti,ti<0){if(Sa<xa)return;Sa<da&&(da=Sa)}else if(ti>0){if(Sa>da)return;Sa>xa&&(xa=Sa)}if(Sa=mt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>da)return;Sa>xa&&(xa=Sa)}else if(ti>0){if(Sa<xa)return;Sa<da&&(da=Sa)}return xa>0&&(bt.a={x:Ot+xa*Ja,y:_r+xa*ti}),da<1&&(bt.b={x:Ot+da*Ja,y:_r+da*ti}),bt}}}}}}function Is(de){for(var Fe=Ns,et=bo(de[0][0],de[0][1],de[1][0],de[1][1]),mt=Fe.length,bt;mt--;)bt=Fe[mt],(!pu(bt,de)||!et(bt)||l(bt.a.x-bt.b.x)<Ke&&l(bt.a.y-bt.b.y)<Ke)&&(bt.a=bt.b=null,Fe.splice(mt,1))}function pu(de,Fe){var et=de.b;if(et)return!0;var mt=de.a,bt=Fe[0][0],Mt=Fe[1][0],ar=Fe[0][1],Ot=Fe[1][1],_r=de.l,Gr=de.r,Xr=_r.x,xa=_r.y,da=Gr.x,Ja=Gr.y,ti=(Xr+da)/2,Sa=(xa+Ja)/2,Fa,Xa;if(Ja===xa){if(ti<bt||ti>=Mt)return;if(Xr>da){if(!mt)mt={x:ti,y:ar};else if(mt.y>=Ot)return;et={x:ti,y:Ot}}else{if(!mt)mt={x:ti,y:Ot};else if(mt.y<ar)return;et={x:ti,y:ar}}}else if(Fa=(Xr-da)/(Ja-xa),Xa=Sa-Fa*ti,Fa<-1||Fa>1)if(Xr>da){if(!mt)mt={x:(ar-Xa)/Fa,y:ar};else if(mt.y>=Ot)return;et={x:(Ot-Xa)/Fa,y:Ot}}else{if(!mt)mt={x:(Ot-Xa)/Fa,y:Ot};else if(mt.y<ar)return;et={x:(ar-Xa)/Fa,y:ar}}else if(xa<Ja){if(!mt)mt={x:bt,y:Fa*bt+Xa};else if(mt.x>=Mt)return;et={x:Mt,y:Fa*Mt+Xa}}else{if(!mt)mt={x:Mt,y:Fa*Mt+Xa};else if(mt.x<bt)return;et={x:bt,y:Fa*bt+Xa}}return de.a=mt,de.b=et,!0}function co(de,Fe){this.l=de,this.r=Fe,this.a=this.b=null}function Vs(de,Fe,et,mt){var bt=new co(de,Fe);return Ns.push(bt),et&&Ts(bt,de,Fe,et),mt&&Ts(bt,Fe,de,mt),ss[de.i].edges.push(new js(bt,de,Fe)),ss[Fe.i].edges.push(new js(bt,Fe,de)),bt}function vl(de,Fe,et){var mt=new co(de,null);return mt.a=Fe,mt.b=et,Ns.push(mt),mt}function Ts(de,Fe,et,mt){!de.a&&!de.b?(de.a=mt,de.l=Fe,de.r=et):de.l===et?de.b=mt:de.a=mt}function js(de,Fe,et){var mt=de.a,bt=de.b;this.edge=de,this.site=Fe,this.angle=et?Math.atan2(et.y-Fe.y,et.x-Fe.x):de.l===Fe?Math.atan2(bt.x-mt.x,mt.y-bt.y):Math.atan2(mt.x-bt.x,bt.y-mt.y)}js.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 As(de){de.U=de.C=de.L=de.R=de.P=de.N=null}us.prototype={insert:function(de,Fe){var et,mt,bt;if(de){if(Fe.P=de,Fe.N=de.N,de.N&&(de.N.P=Fe),de.N=Fe,de.R){for(de=de.R;de.L;)de=de.L;de.L=Fe}else de.R=Fe;et=de}else this._?(de=Tc(this._),Fe.P=null,Fe.N=de,de.P=de.L=Fe,et=de):(Fe.P=Fe.N=null,this._=Fe,et=null);for(Fe.L=Fe.R=null,Fe.U=et,Fe.C=!0,de=Fe;et&&et.C;)mt=et.U,et===mt.L?(bt=mt.R,bt&&bt.C?(et.C=bt.C=!1,mt.C=!0,de=mt):(de===et.R&&(Nl(this,et),de=et,et=de.U),et.C=!1,mt.C=!0,su(this,mt))):(bt=mt.L,bt&&bt.C?(et.C=bt.C=!1,mt.C=!0,de=mt):(de===et.L&&(su(this,et),de=et,et=de.U),et.C=!1,mt.C=!0,Nl(this,mt))),et=de.U;this._.C=!1},remove:function(de){de.N&&(de.N.P=de.P),de.P&&(de.P.N=de.N),de.N=de.P=null;var Fe=de.U,et,mt=de.L,bt=de.R,Mt,ar;if(mt?bt?Mt=Tc(bt):Mt=mt:Mt=bt,Fe?Fe.L===de?Fe.L=Mt:Fe.R=Mt:this._=Mt,mt&&bt?(ar=Mt.C,Mt.C=de.C,Mt.L=mt,mt.U=Mt,Mt!==bt?(Fe=Mt.U,Mt.U=de.U,de=Mt.R,Fe.L=de,Mt.R=bt,bt.U=Mt):(Mt.U=Fe,Fe=Mt,de=Mt.R)):(ar=de.C,de=Mt),de&&(de.U=Fe),!ar){if(de&&de.C){de.C=!1;return}do{if(de===this._)break;if(de===Fe.L){if(et=Fe.R,et.C&&(et.C=!1,Fe.C=!0,Nl(this,Fe),et=Fe.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=Fe.R),et.C=Fe.C,Fe.C=et.R.C=!1,Nl(this,Fe),de=this._;break}}else if(et=Fe.L,et.C&&(et.C=!1,Fe.C=!0,su(this,Fe),et=Fe.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=Fe.L),et.C=Fe.C,Fe.C=et.L.C=!1,su(this,Fe),de=this._;break}et.C=!0,de=Fe,Fe=Fe.U}while(!de.C);de&&(de.C=!1)}}};function Nl(de,Fe){var et=Fe,mt=Fe.R,bt=et.U;bt?bt.L===et?bt.L=mt:bt.R=mt:de._=mt,mt.U=bt,et.U=mt,et.R=mt.L,et.R&&(et.R.U=et),mt.L=et}function su(de,Fe){var et=Fe,mt=Fe.L,bt=et.U;bt?bt.L===et?bt.L=mt:bt.R=mt:de._=mt,mt.U=bt,et.U=mt,et.L=mt.R,et.L&&(et.L.U=et),mt.R=et}function Tc(de){for(;de.L;)de=de.L;return de}function du(de,Fe){var et=de.sort(Sf).pop(),mt,bt,Mt;for(Ns=[],ss=new Array(de.length),uo=new us,ls=new us;;)if(Mt=Xn,et&&(!Mt||et.y<Mt.y||et.y===Mt.y&&et.x<Mt.x))(et.x!==mt||et.y!==bt)&&(ss[et.i]=new zs(et),Us(et),mt=et.x,bt=et.y),et=de.pop();else if(Mt)Ln(Mt.arc);else break;Fe&&(Is(Fe),vs(Fe));var ar={cells:ss,edges:Ns};return uo=ls=Ns=ss=null,ar}function Sf(de,Fe){return Fe.y-de.y||Fe.x-de.x}v.geom.voronoi=function(de){var Fe=cn,et=lo,mt=Fe,bt=et,Mt=Uc;if(de)return ar(de);function ar(_r){var Gr=new Array(_r.length),Xr=Mt[0][0],xa=Mt[0][1],da=Mt[1][0],Ja=Mt[1][1];return du(Ot(_r),Mt).cells.forEach(function(ti,Sa){var Fa=ti.edges,Xa=ti.site,fi=Gr[Sa]=Fa.length?Fa.map(function(ni){var La=ni.start();return[La.x,La.y]}):Xa.x>=Xr&&Xa.x<=da&&Xa.y>=xa&&Xa.y<=Ja?[[Xr,Ja],[da,Ja],[da,xa],[Xr,xa]]:[];fi.point=_r[Sa]}),Gr}function Ot(_r){return _r.map(function(Gr,Xr){return{x:Math.round(mt(Gr,Xr)/Ke)*Ke,y:Math.round(bt(Gr,Xr)/Ke)*Ke,i:Xr}})}return ar.links=function(_r){return du(Ot(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},ar.triangles=function(_r){var Gr=[];return du(Ot(_r)).cells.forEach(function(Xr,xa){for(var da=Xr.site,Ja=Xr.edges.sort(Ws),ti=-1,Sa=Ja.length,Fa,Xa,fi=Ja[Sa-1].edge,ni=fi.l===da?fi.r:fi.l;++ti<Sa;)Fa=fi,Xa=ni,fi=Ja[ti].edge,ni=fi.l===da?fi.r:fi.l,xa<Xa.i&&xa<ni.i&&Fs(da,Xa,ni)<0&&Gr.push([_r[xa],_r[Xa.i],_r[ni.i]])}),Gr},ar.x=function(_r){return arguments.length?(mt=Or(Fe=_r),ar):Fe},ar.y=function(_r){return arguments.length?(bt=Or(et=_r),ar):et},ar.clipExtent=function(_r){return arguments.length?(Mt=_r??Uc,ar):Mt===Uc?null:Mt},ar.size=function(_r){return arguments.length?ar.clipExtent(_r&&[[0,0],_r]):Mt===Uc?null:Mt&&Mt[1]},ar};var Uc=[[-1e6,-1e6],[1e6,1e6]];function Fs(de,Fe,et){return(de.x-et.x)*(Fe.y-de.y)-(de.x-Fe.x)*(et.y-de.y)}v.geom.delaunay=function(de){return v.geom.voronoi().triangles(de)},v.geom.quadtree=function(de,Fe,et,mt,bt){var Mt=cn,ar=lo,Ot;if(Ot=arguments.length)return Mt=dc,ar=Hc,Ot===3&&(bt=et,mt=Fe,et=Fe=0),_r(de);function _r(Gr){var Xr,xa=Or(Mt),da=Or(ar),Ja,ti,Sa,Fa,Xa,fi,ni,La;if(Fe!=null)Xa=Fe,fi=et,ni=mt,La=bt;else if(ni=La=-(Xa=fi=1/0),Ja=[],ti=[],Fa=Gr.length,Ot)for(Sa=0;Sa<Fa;++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<Fa;++Sa){var sn=+xa(Xr=Gr[Sa],Sa),rn=+da(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 vn=ni-Xa,Pn=La-fi;vn>Pn?La=fi+vn:ni=Xa+Pn;function Jn(io,Ho,cl,al,xl,gn,vo,cs){if(!(isNaN(cl)||isNaN(al)))if(io.leaf){var ms=io.x,Al=io.y;if(ms!=null)if(l(ms-cl)+l(Al-al)<.01)ro(io,Ho,cl,al,xl,gn,vo,cs);else{var Hl=io.point;io.x=io.y=io.point=null,ro(io,Hl,ms,Al,xl,gn,vo,cs),ro(io,Ho,cl,al,xl,gn,vo,cs)}else io.x=cl,io.y=al,io.point=Ho}else ro(io,Ho,cl,al,xl,gn,vo,cs)}function ro(io,Ho,cl,al,xl,gn,vo,cs){var ms=(xl+vo)*.5,Al=(gn+cs)*.5,Hl=cl>=ms,Su=al>=Al,Rl=Su<<1|Hl;io.leaf=!1,io=io.nodes[Rl]||(io.nodes[Rl]=lu()),Hl?xl=ms:vo=ms,Su?gn=Al:cs=Al,Jn(io,Ho,cl,al,xl,gn,vo,cs)}var Yo=lu();if(Yo.add=function(io){Jn(Yo,io,+xa(io,++Sa),+da(io,Sa),Xa,fi,ni,La)},Yo.visit=function(io){Pl(io,Yo,Xa,fi,ni,La)},Yo.find=function(io){return ic(Yo,io[0],io[1],Xa,fi,ni,La)},Sa=-1,Fe==null){for(;++Sa<Fa;)Jn(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?(Mt=Gr,_r):Mt},_r.y=function(Gr){return arguments.length?(ar=Gr,_r):ar},_r.extent=function(Gr){return arguments.length?(Gr==null?Fe=et=mt=bt=null:(Fe=+Gr[0][0],et=+Gr[0][1],mt=+Gr[1][0],bt=+Gr[1][1]),_r):Fe==null?null:[[Fe,et],[mt,bt]]},_r.size=function(Gr){return arguments.length?(Gr==null?Fe=et=mt=bt=null:(Fe=et=0,mt=+Gr[0],bt=+Gr[1]),_r):Fe==null?null:[mt-Fe,bt-et]},_r};function dc(de){return de.x}function Hc(de){return de.y}function lu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Pl(de,Fe,et,mt,bt,Mt){if(!de(Fe,et,mt,bt,Mt)){var ar=(et+bt)*.5,Ot=(mt+Mt)*.5,_r=Fe.nodes;_r[0]&&Pl(de,_r[0],et,mt,ar,Ot),_r[1]&&Pl(de,_r[1],ar,mt,bt,Ot),_r[2]&&Pl(de,_r[2],et,Ot,ar,Mt),_r[3]&&Pl(de,_r[3],ar,Ot,bt,Mt)}}function ic(de,Fe,et,mt,bt,Mt,ar){var Ot=1/0,_r;return function Gr(Xr,xa,da,Ja,ti){if(!(xa>Mt||da>ar||Ja<mt||ti<bt)){if(Sa=Xr.point){var Sa,Fa=Fe-Xr.x,Xa=et-Xr.y,fi=Fa*Fa+Xa*Xa;if(fi<Ot){var ni=Math.sqrt(Ot=fi);mt=Fe-ni,bt=et-ni,Mt=Fe+ni,ar=et+ni,_r=Sa}}for(var La=Xr.nodes,sn=(xa+Ja)*.5,rn=(da+ti)*.5,vn=Fe>=sn,Pn=et>=rn,Jn=Pn<<1|vn,ro=Jn+4;Jn<ro;++Jn)if(Xr=La[Jn&3])switch(Jn&3){case 0:Gr(Xr,xa,da,sn,rn);break;case 1:Gr(Xr,sn,da,Ja,rn);break;case 2:Gr(Xr,xa,rn,sn,ti);break;case 3:Gr(Xr,sn,rn,Ja,ti);break}}}(de,mt,bt,Mt,ar),_r}v.interpolateRgb=Ou;function Ou(de,Fe){de=v.rgb(de),Fe=v.rgb(Fe);var et=de.r,mt=de.g,bt=de.b,Mt=Fe.r-et,ar=Fe.g-mt,Ot=Fe.b-bt;return function(_r){return"#"+xr(Math.round(et+Mt*_r))+xr(Math.round(mt+ar*_r))+xr(Math.round(bt+Ot*_r))}}v.interpolateObject=nl;function nl(de,Fe){var et={},mt={},bt;for(bt in de)bt in Fe?et[bt]=Ul(de[bt],Fe[bt]):mt[bt]=de[bt];for(bt in Fe)bt in de||(mt[bt]=Fe[bt]);return function(Mt){for(bt in et)mt[bt]=et[bt](Mt);return mt}}v.interpolateNumber=ml;function ml(de,Fe){return de=+de,Fe=+Fe,function(et){return de*(1-et)+Fe*et}}v.interpolateString=xs;function xs(de,Fe){var et=Xs.lastIndex=nc.lastIndex=0,mt,bt,Mt,ar=-1,Ot=[],_r=[];for(de=de+"",Fe=Fe+"";(mt=Xs.exec(de))&&(bt=nc.exec(Fe));)(Mt=bt.index)>et&&(Mt=Fe.slice(et,Mt),Ot[ar]?Ot[ar]+=Mt:Ot[++ar]=Mt),(mt=mt[0])===(bt=bt[0])?Ot[ar]?Ot[ar]+=bt:Ot[++ar]=bt:(Ot[++ar]=null,_r.push({i:ar,x:ml(mt,bt)})),et=nc.lastIndex;return et<Fe.length&&(Mt=Fe.slice(et),Ot[ar]?Ot[ar]+=Mt:Ot[++ar]=Mt),Ot.length<2?_r[0]?(Fe=_r[0].x,function(Gr){return Fe(Gr)+""}):function(){return Fe}:(Fe=_r.length,function(Gr){for(var Xr=0,xa;Xr<Fe;++Xr)Ot[(xa=_r[Xr]).i]=xa.x(Gr);return Ot.join("")})}var Xs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(Xs.source,"g");v.interpolate=Ul;function Ul(de,Fe){for(var et=v.interpolators.length,mt;--et>=0&&!(mt=v.interpolators[et](de,Fe)););return mt}v.interpolators=[function(de,Fe){var et=typeof Fe;return(et==="string"?vr.has(Fe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Fe)?Ou:xs:Fe instanceof wi?Ou:Array.isArray(Fe)?qu:et==="object"&&isNaN(Fe)?nl:ml)(de,Fe)}],v.interpolateArray=qu;function qu(de,Fe){var et=[],mt=[],bt=de.length,Mt=Fe.length,ar=Math.min(de.length,Fe.length),Ot;for(Ot=0;Ot<ar;++Ot)et.push(Ul(de[Ot],Fe[Ot]));for(;Ot<bt;++Ot)mt[Ot]=de[Ot];for(;Ot<Mt;++Ot)mt[Ot]=Fe[Ot];return function(_r){for(Ot=0;Ot<ar;++Ot)mt[Ot]=et[Ot](_r);return mt}}var fl=function(){return F},xh=v.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}}),ns=v.map({in:F,out:Es,"in-out":to,"out-in":function(de){return to(Es(de))}});v.ease=function(de){var Fe=de.indexOf("-"),et=Fe>=0?de.slice(0,Fe):de,mt=Fe>=0?de.slice(Fe+1):"in";return et=xh.get(et)||fl,mt=ns.get(mt)||F,bh(mt(et.apply(null,x.call(arguments,1))))};function bh(de){return function(Fe){return Fe<=0?0:Fe>=1?1:de(Fe)}}function Es(de){return function(Fe){return 1-de(1-Fe)}}function to(de){return function(Fe){return .5*(Fe<.5?de(2*Fe):2-de(2-2*Fe))}}function Wc(de){return de*de}function Vu(de){return de*de*de}function jl(de){if(de<=0)return 0;if(de>=1)return 1;var Fe=de*de,et=Fe*de;return 4*(de<.5?et:3*(de-Fe)+et-.75)}function Mf(de){return function(Fe){return Math.pow(Fe,de)}}function Ac(de){return 1-Math.cos(de*Ee)}function nf(de){return Math.pow(2,10*(de-1))}function $l(de){return 1-Math.sqrt(1-de*de)}function Jf(de,Fe){var et;return arguments.length<2&&(Fe=.45),arguments.length?et=Fe/Ve*Math.asin(1/de):(de=1,et=Fe/4),function(mt){return 1+de*Math.pow(2,-10*mt)*Math.sin((mt-et)*Ve/Fe)}}function Of(de){return de||(de=1.70158),function(Fe){return Fe*Fe*((de+1)*Fe-de)}}function of(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}v.interpolateHcl=jc;function jc(de,Fe){de=v.hcl(de),Fe=v.hcl(Fe);var et=de.h,mt=de.c,bt=de.l,Mt=Fe.h-et,ar=Fe.c-mt,Ot=Fe.l-bt;return isNaN(ar)&&(ar=0,mt=isNaN(mt)?Fe.c:mt),isNaN(Mt)?(Mt=0,et=isNaN(et)?Fe.h:et):Mt>180?Mt-=360:Mt<-180&&(Mt+=360),function(_r){return ta(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateHsl=Bf;function Bf(de,Fe){de=v.hsl(de),Fe=v.hsl(Fe);var et=de.h,mt=de.s,bt=de.l,Mt=Fe.h-et,ar=Fe.s-mt,Ot=Fe.l-bt;return isNaN(ar)&&(ar=0,mt=isNaN(mt)?Fe.s:mt),isNaN(Mt)?(Mt=0,et=isNaN(et)?Fe.h:et):Mt>180?Mt-=360:Mt<-180&&(Mt+=360),function(_r){return Yt(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateLab=Nf;function Nf(de,Fe){de=v.lab(de),Fe=v.lab(Fe);var et=de.l,mt=de.a,bt=de.b,Mt=Fe.l-et,ar=Fe.a-mt,Ot=Fe.b-bt;return function(_r){return pi(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateRound=Gu;function Gu(de,Fe){return Fe-=de,function(et){return Math.round(de+Fe*et)}}v.transform=function(de){var Fe=E.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(et){if(et!=null){Fe.setAttribute("transform",et);var mt=Fe.transform.baseVal.consolidate()}return new Ef(mt?mt.matrix:qc)})(de)};function Ef(de){var Fe=[de.a,de.b],et=[de.c,de.d],mt=Xc(Fe),bt=oc(Fe,et),Mt=Xc(Ql(et,Fe,-bt))||0;Fe[0]*et[1]<et[0]*Fe[1]&&(Fe[0]*=-1,Fe[1]*=-1,mt*=-1,bt*=-1),this.rotate=(mt?Math.atan2(Fe[1],Fe[0]):Math.atan2(-et[0],et[1]))*ft,this.translate=[de.e,de.f],this.scale=[mt,Mt],this.skew=Mt?Math.atan2(bt,Mt)*ft:0}Ef.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function oc(de,Fe){return de[0]*Fe[0]+de[1]*Fe[1]}function Xc(de){var Fe=Math.sqrt(oc(de,de));return Fe&&(de[0]/=Fe,de[1]/=Fe),Fe}function Ql(de,Fe,et){return de[0]+=et*Fe[0],de[1]+=et*Fe[1],de}var qc={a:1,b:0,c:0,d:1,e:0,f:0};v.interpolateTransform=Zc;function Sc(de){return de.length?de.pop()+",":""}function Zs(de,Fe,et,mt){if(de[0]!==Fe[0]||de[1]!==Fe[1]){var bt=et.push("translate(",null,",",null,")");mt.push({i:bt-4,x:ml(de[0],Fe[0])},{i:bt-2,x:ml(de[1],Fe[1])})}else(Fe[0]||Fe[1])&&et.push("translate("+Fe+")")}function kf(de,Fe,et,mt){de!==Fe?(de-Fe>180?Fe+=360:Fe-de>180&&(de+=360),mt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:ml(de,Fe)})):Fe&&et.push(Sc(et)+"rotate("+Fe+")")}function fh(de,Fe,et,mt){de!==Fe?mt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:ml(de,Fe)}):Fe&&et.push(Sc(et)+"skewX("+Fe+")")}function Uf(de,Fe,et,mt){if(de[0]!==Fe[0]||de[1]!==Fe[1]){var bt=et.push(Sc(et)+"scale(",null,",",null,")");mt.push({i:bt-4,x:ml(de[0],Fe[0])},{i:bt-2,x:ml(de[1],Fe[1])})}else(Fe[0]!==1||Fe[1]!==1)&&et.push(Sc(et)+"scale("+Fe+")")}function Zc(de,Fe){var et=[],mt=[];return de=v.transform(de),Fe=v.transform(Fe),Zs(de.translate,Fe.translate,et,mt),kf(de.rotate,Fe.rotate,et,mt),fh(de.skew,Fe.skew,et,mt),Uf(de.scale,Fe.scale,et,mt),de=Fe=null,function(bt){for(var Mt=-1,ar=mt.length,Ot;++Mt<ar;)et[(Ot=mt[Mt]).i]=Ot.x(bt);return et.join("")}}function $f(de,Fe){return Fe=(Fe-=de=+de)||1/Fe,function(et){return(et-de)/Fe}}function Cu(de,Fe){return Fe=(Fe-=de=+de)||1/Fe,function(et){return Math.max(0,Math.min(1,(et-de)/Fe))}}v.layout={},v.layout.bundle=function(){return function(de){for(var Fe=[],et=-1,mt=de.length;++et<mt;)Fe.push(jf(de[et]));return Fe}};function jf(de){for(var Fe=de.source,et=de.target,mt=Lu(Fe,et),bt=[Fe];Fe!==mt;)Fe=Fe.parent,bt.push(Fe);for(var Mt=bt.length;et!==mt;)bt.splice(Mt,0,et),et=et.parent;return bt}function yl(de){for(var Fe=[],et=de.parent;et!=null;)Fe.push(de),de=et,et=et.parent;return Fe.push(de),Fe}function Lu(de,Fe){if(de===Fe)return de;for(var et=yl(de),mt=yl(Fe),bt=et.pop(),Mt=mt.pop(),ar=null;bt===Mt;)ar=bt,bt=et.pop(),Mt=mt.pop();return ar}v.layout.chord=function(){var de={},Fe,et,mt,bt,Mt=0,ar,Ot,_r;function Gr(){var xa={},da=[],Ja=v.range(bt),ti=[],Sa,Fa,Xa,fi,ni;for(Fe=[],et=[],Sa=0,fi=-1;++fi<bt;){for(Fa=0,ni=-1;++ni<bt;)Fa+=mt[fi][ni];da.push(Fa),ti.push(v.range(bt)),Sa+=Fa}for(ar&&Ja.sort(function(Yo,io){return ar(da[Yo],da[io])}),Ot&&ti.forEach(function(Yo,io){Yo.sort(function(Ho,cl){return Ot(mt[io][Ho],mt[io][cl])})}),Sa=(Ve-Mt*bt)/Sa,Fa=0,fi=-1;++fi<bt;){for(Xa=Fa,ni=-1;++ni<bt;){var La=Ja[fi],sn=ti[La][ni],rn=mt[La][sn],vn=Fa,Pn=Fa+=rn*Sa;xa[La+"-"+sn]={index:La,subindex:sn,startAngle:vn,endAngle:Pn,value:rn}}et[La]={index:La,startAngle:Xa,endAngle:Fa,value:da[La]},Fa+=Mt}for(fi=-1;++fi<bt;)for(ni=fi-1;++ni<bt;){var Jn=xa[fi+"-"+ni],ro=xa[ni+"-"+fi];(Jn.value||ro.value)&&Fe.push(Jn.value<ro.value?{source:ro,target:Jn}:{source:Jn,target:ro})}_r&&Xr()}function Xr(){Fe.sort(function(xa,da){return _r((xa.source.value+xa.target.value)/2,(da.source.value+da.target.value)/2)})}return de.matrix=function(xa){return arguments.length?(bt=(mt=xa)&&mt.length,Fe=et=null,de):mt},de.padding=function(xa){return arguments.length?(Mt=xa,Fe=et=null,de):Mt},de.sortGroups=function(xa){return arguments.length?(ar=xa,Fe=et=null,de):ar},de.sortSubgroups=function(xa){return arguments.length?(Ot=xa,Fe=null,de):Ot},de.sortChords=function(xa){return arguments.length?(_r=xa,Fe&&Xr(),de):_r},de.chords=function(){return Fe||Gr(),Fe},de.groups=function(){return et||Gr(),et},de},v.layout.force=function(){var de={},Fe=v.dispatch("start","tick","end"),et,mt=[1,1],bt,Mt,ar=.9,Ot=El,_r=qf,Gr=-30,Xr=Qf,xa=.1,da=.64,Ja=[],ti=[],Sa,Fa,Xa;function fi(La){return function(sn,rn,vn,Pn){if(sn.point!==La){var Jn=sn.cx-La.x,ro=sn.cy-La.y,Yo=Pn-rn,io=Jn*Jn+ro*ro;if(Yo*Yo/da<io){if(io<Xr){var Ho=sn.charge/io;La.px-=Jn*Ho,La.py-=ro*Ho}return!0}if(sn.point&&io&&io<Xr){var Ho=sn.pointCharge/io;La.px-=Jn*Ho,La.py-=ro*Ho}}return!sn.charge}}de.tick=function(){if((Mt*=.99)<.005)return et=null,Fe.end({type:"end",alpha:Mt=0}),!0;var La=Ja.length,sn=ti.length,rn,vn,Pn,Jn,ro,Yo,io,Ho,cl;for(vn=0;vn<sn;++vn)Pn=ti[vn],Jn=Pn.source,ro=Pn.target,Ho=ro.x-Jn.x,cl=ro.y-Jn.y,(Yo=Ho*Ho+cl*cl)&&(Yo=Mt*Fa[vn]*((Yo=Math.sqrt(Yo))-Sa[vn])/Yo,Ho*=Yo,cl*=Yo,ro.x-=Ho*(io=Jn.weight+ro.weight?Jn.weight/(Jn.weight+ro.weight):.5),ro.y-=cl*io,Jn.x+=Ho*(io=1-io),Jn.y+=cl*io);if((io=Mt*xa)&&(Ho=mt[0]/2,cl=mt[1]/2,vn=-1,io))for(;++vn<La;)Pn=Ja[vn],Pn.x+=(Ho-Pn.x)*io,Pn.y+=(cl-Pn.y)*io;if(Gr)for(Tu(rn=v.geom.quadtree(Ja),Mt,Xa),vn=-1;++vn<La;)(Pn=Ja[vn]).fixed||rn.visit(fi(Pn));for(vn=-1;++vn<La;)Pn=Ja[vn],Pn.fixed?(Pn.x=Pn.px,Pn.y=Pn.py):(Pn.x-=(Pn.px-(Pn.px=Pn.x))*ar,Pn.y-=(Pn.py-(Pn.py=Pn.y))*ar);Fe.tick({type:"tick",alpha:Mt})},de.nodes=function(La){return arguments.length?(Ja=La,de):Ja},de.links=function(La){return arguments.length?(ti=La,de):ti},de.size=function(La){return arguments.length?(mt=La,de):mt},de.linkDistance=function(La){return arguments.length?(Ot=typeof La=="function"?La:+La,de):Ot},de.distance=de.linkDistance,de.linkStrength=function(La){return arguments.length?(_r=typeof La=="function"?La:+La,de):_r},de.friction=function(La){return arguments.length?(ar=+La,de):ar},de.charge=function(La){return arguments.length?(Gr=typeof La=="function"?La:+La,de):Gr},de.chargeDistance=function(La){return arguments.length?(Xr=La*La,de):Math.sqrt(Xr)},de.gravity=function(La){return arguments.length?(xa=+La,de):xa},de.theta=function(La){return arguments.length?(da=La*La,de):Math.sqrt(da)},de.alpha=function(La){return arguments.length?(La=+La,Mt?La>0?Mt=La:(et.c=null,et.t=NaN,et=null,Fe.end({type:"end",alpha:Mt=0})):La>0&&(Fe.start({type:"start",alpha:Mt=La}),et=Rn(de.tick)),de):Mt},de.start=function(){var La,sn=Ja.length,rn=ti.length,vn=mt[0],Pn=mt[1],Jn,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",vn)),isNaN(ro.y)&&(ro.y=Yo("y",Pn)),isNaN(ro.px)&&(ro.px=ro.x),isNaN(ro.py)&&(ro.py=ro.y);if(Sa=[],typeof Ot=="function")for(La=0;La<rn;++La)Sa[La]=+Ot.call(this,ti[La],La);else for(La=0;La<rn;++La)Sa[La]=Ot;if(Fa=[],typeof _r=="function")for(La=0;La<rn;++La)Fa[La]=+_r.call(this,ti[La],La);else for(La=0;La<rn;++La)Fa[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(io,Ho){if(!Jn){for(Jn=new Array(sn),xl=0;xl<sn;++xl)Jn[xl]=[];for(xl=0;xl<rn;++xl){var cl=ti[xl];Jn[cl.source.index].push(cl.target),Jn[cl.target.index].push(cl.source)}}for(var al=Jn[La],xl=-1,gn=al.length,vo;++xl<gn;)if(!isNaN(vo=al[xl][io]))return vo;return Math.random()*Ho}return de.resume()},de.resume=function(){return de.alpha(.1)},de.stop=function(){return de.alpha(0)},de.drag=function(){if(bt||(bt=v.behavior.drag().origin(F).on("dragstart.force",Mc).on("drag.force",ni).on("dragend.force",ol)),!arguments.length)return bt;this.on("mouseover.force",vc).on("mouseout.force",yu).call(bt)};function ni(La){La.px=v.event.x,La.py=v.event.y,de.resume()}return v.rebind(de,Fe,"on")};function Mc(de){de.fixed|=2}function ol(de){de.fixed&=-7}function vc(de){de.fixed|=4,de.px=de.x,de.py=de.y}function yu(de){de.fixed&=-5}function Tu(de,Fe,et){var mt=0,bt=0;if(de.charge=0,!de.leaf)for(var Mt=de.nodes,ar=Mt.length,Ot=-1,_r;++Ot<ar;)_r=Mt[Ot],_r!=null&&(Tu(_r,Fe,et),de.charge+=_r.charge,mt+=_r.charge*_r.cx,bt+=_r.charge*_r.cy);if(de.point){de.leaf||(de.point.x+=Math.random()-.5,de.point.y+=Math.random()-.5);var Gr=Fe*et[de.point.index];de.charge+=de.pointCharge=Gr,mt+=Gr*de.point.x,bt+=Gr*de.point.y}de.cx=mt/de.charge,de.cy=bt/de.charge}var El=20,qf=1,Qf=1/0;v.layout.hierarchy=function(){var de=vf,Fe=Lh,et=sf;function mt(bt){var Mt=[bt],ar=[],Ot;for(bt.depth=0;(Ot=Mt.pop())!=null;)if(ar.push(Ot),(Gr=Fe.call(mt,Ot,Ot.depth))&&(_r=Gr.length)){for(var _r,Gr,Xr;--_r>=0;)Mt.push(Xr=Gr[_r]),Xr.parent=Ot,Xr.depth=Ot.depth+1;et&&(Ot.value=0),Ot.children=Gr}else et&&(Ot.value=+et.call(mt,Ot,Ot.depth)||0),delete Ot.children;return mc(bt,function(xa){var da,Ja;de&&(da=xa.children)&&da.sort(de),et&&(Ja=xa.parent)&&(Ja.value+=xa.value)}),ar}return mt.sort=function(bt){return arguments.length?(de=bt,mt):de},mt.children=function(bt){return arguments.length?(Fe=bt,mt):Fe},mt.value=function(bt){return arguments.length?(et=bt,mt):et},mt.revalue=function(bt){return et&&(Ec(bt,function(Mt){Mt.children&&(Mt.value=0)}),mc(bt,function(Mt){var ar;Mt.children||(Mt.value=+et.call(mt,Mt,Mt.depth)||0),(ar=Mt.parent)&&(ar.value+=Mt.value)})),bt},mt};function Bu(de,Fe){return v.rebind(de,Fe,"sort","children","value"),de.nodes=de,de.links=Nu,de}function Ec(de,Fe){for(var et=[de];(de=et.pop())!=null;)if(Fe(de),(bt=de.children)&&(mt=bt.length))for(var mt,bt;--mt>=0;)et.push(bt[mt])}function mc(de,Fe){for(var et=[de],mt=[];(de=et.pop())!=null;)if(mt.push(de),(ar=de.children)&&(Mt=ar.length))for(var bt=-1,Mt,ar;++bt<Mt;)et.push(ar[bt]);for(;(de=mt.pop())!=null;)Fe(de)}function Lh(de){return de.children}function sf(de){return de.value}function vf(de,Fe){return Fe.value-de.value}function Nu(de){return v.merge(de.map(function(Fe){return(Fe.children||[]).map(function(et){return{source:Fe,target:et}})}))}v.layout.partition=function(){var de=v.layout.hierarchy(),Fe=[1,1];function et(Mt,ar,Ot,_r){var Gr=Mt.children;if(Mt.x=ar,Mt.y=Mt.depth*_r,Mt.dx=Ot,Mt.dy=_r,Gr&&(xa=Gr.length)){var Xr=-1,xa,da,Ja;for(Ot=Mt.value?Ot/Mt.value:0;++Xr<xa;)et(da=Gr[Xr],ar,Ja=da.value*Ot,_r),ar+=Ja}}function mt(Mt){var ar=Mt.children,Ot=0;if(ar&&(Gr=ar.length))for(var _r=-1,Gr;++_r<Gr;)Ot=Math.max(Ot,mt(ar[_r]));return 1+Ot}function bt(Mt,ar){var Ot=de.call(this,Mt,ar);return et(Ot[0],0,Fe[0],Fe[1]/mt(Ot[0])),Ot}return bt.size=function(Mt){return arguments.length?(Fe=Mt,bt):Fe},Bu(bt,de)},v.layout.pie=function(){var de=Number,Fe=lf,et=0,mt=Ve,bt=0;function Mt(ar){var Ot=ar.length,_r=ar.map(function(fi,ni){return+de.call(Mt,fi,ni)}),Gr=+(typeof et=="function"?et.apply(this,arguments):et),Xr=(typeof mt=="function"?mt.apply(this,arguments):mt)-Gr,xa=Math.min(Math.abs(Xr)/Ot,+(typeof bt=="function"?bt.apply(this,arguments):bt)),da=xa*(Xr<0?-1:1),Ja=v.sum(_r),ti=Ja?(Xr-Ot*da)/Ja:0,Sa=v.range(Ot),Fa=[],Xa;return Fe!=null&&Sa.sort(Fe===lf?function(fi,ni){return _r[ni]-_r[fi]}:function(fi,ni){return Fe(ar[fi],ar[ni])}),Sa.forEach(function(fi){Fa[fi]={data:ar[fi],value:Xa=_r[fi],startAngle:Gr,endAngle:Gr+=Xa*ti+da,padAngle:xa}}),Fa}return Mt.value=function(ar){return arguments.length?(de=ar,Mt):de},Mt.sort=function(ar){return arguments.length?(Fe=ar,Mt):Fe},Mt.startAngle=function(ar){return arguments.length?(et=ar,Mt):et},Mt.endAngle=function(ar){return arguments.length?(mt=ar,Mt):mt},Mt.padAngle=function(ar){return arguments.length?(bt=ar,Mt):bt},Mt};var lf={};v.layout.stack=function(){var de=F,Fe=_u,et=Pu,mt=hh,bt=au,Mt=Yc;function ar(Ot,_r){if(!(ti=Ot.length))return Ot;var Gr=Ot.map(function(fi,ni){return de.call(ar,fi,ni)}),Xr=Gr.map(function(fi){return fi.map(function(ni,La){return[bt.call(ar,ni,La),Mt.call(ar,ni,La)]})}),xa=Fe.call(ar,Xr,_r);Gr=v.permute(Gr,xa),Xr=v.permute(Xr,xa);var da=et.call(ar,Xr,_r),Ja=Gr[0].length,ti,Sa,Fa,Xa;for(Fa=0;Fa<Ja;++Fa)for(mt.call(ar,Gr[0][Fa],Xa=da[Fa],Xr[0][Fa][1]),Sa=1;Sa<ti;++Sa)mt.call(ar,Gr[Sa][Fa],Xa+=Xr[Sa-1][Fa][1],Xr[Sa][Fa][1]);return Ot}return ar.values=function(Ot){return arguments.length?(de=Ot,ar):de},ar.order=function(Ot){return arguments.length?(Fe=typeof Ot=="function"?Ot:mf.get(Ot)||_u,ar):Fe},ar.offset=function(Ot){return arguments.length?(et=typeof Ot=="function"?Ot:sl.get(Ot)||Pu,ar):et},ar.x=function(Ot){return arguments.length?(bt=Ot,ar):bt},ar.y=function(Ot){return arguments.length?(Mt=Ot,ar):Mt},ar.out=function(Ot){return arguments.length?(mt=Ot,ar):mt},ar};function au(de){return de.x}function Yc(de){return de.y}function hh(de,Fe,et){de.y0=Fe,de.y=et}var mf=v.map({"inside-out":function(de){var Fe=de.length,et,mt,bt=de.map(Cf),Mt=de.map(hl),ar=v.range(Fe).sort(function(xa,da){return bt[xa]-bt[da]}),Ot=0,_r=0,Gr=[],Xr=[];for(et=0;et<Fe;++et)mt=ar[et],Ot<_r?(Ot+=Mt[mt],Gr.push(mt)):(_r+=Mt[mt],Xr.push(mt));return Xr.reverse().concat(Gr)},reverse:function(de){return v.range(de.length).reverse()},default:_u}),sl=v.map({silhouette:function(de){var Fe=de.length,et=de[0].length,mt=[],bt=0,Mt,ar,Ot,_r=[];for(ar=0;ar<et;++ar){for(Mt=0,Ot=0;Mt<Fe;Mt++)Ot+=de[Mt][ar][1];Ot>bt&&(bt=Ot),mt.push(Ot)}for(ar=0;ar<et;++ar)_r[ar]=(bt-mt[ar])/2;return _r},wiggle:function(de){var Fe=de.length,et=de[0],mt=et.length,bt,Mt,ar,Ot,_r,Gr,Xr,xa,da,Ja=[];for(Ja[0]=xa=da=0,Mt=1;Mt<mt;++Mt){for(bt=0,Ot=0;bt<Fe;++bt)Ot+=de[bt][Mt][1];for(bt=0,_r=0,Xr=et[Mt][0]-et[Mt-1][0];bt<Fe;++bt){for(ar=0,Gr=(de[bt][Mt][1]-de[bt][Mt-1][1])/(2*Xr);ar<bt;++ar)Gr+=(de[ar][Mt][1]-de[ar][Mt-1][1])/Xr;_r+=Gr*de[bt][Mt][1]}Ja[Mt]=xa-=Ot?_r/Ot*Xr:0,xa<da&&(da=xa)}for(Mt=0;Mt<mt;++Mt)Ja[Mt]-=da;return Ja},expand:function(de){var Fe=de.length,et=de[0].length,mt=1/Fe,bt,Mt,ar,Ot=[];for(Mt=0;Mt<et;++Mt){for(bt=0,ar=0;bt<Fe;bt++)ar+=de[bt][Mt][1];if(ar)for(bt=0;bt<Fe;bt++)de[bt][Mt][1]/=ar;else for(bt=0;bt<Fe;bt++)de[bt][Mt][1]=mt}for(Mt=0;Mt<et;++Mt)Ot[Mt]=0;return Ot},zero:Pu});function _u(de){return v.range(de.length)}function Pu(de){for(var Fe=-1,et=de[0].length,mt=[];++Fe<et;)mt[Fe]=0;return mt}function Cf(de){for(var Fe=1,et=0,mt=de[0][1],bt,Mt=de.length;Fe<Mt;++Fe)(bt=de[Fe][1])>mt&&(et=Fe,mt=bt);return et}function hl(de){return de.reduce(uf,0)}function uf(de,Fe){return de+Fe[1]}v.layout.histogram=function(){var de=!0,Fe=Number,et=gf,mt=kc;function bt(Mt,da){for(var Ot=[],_r=Mt.map(Fe,this),Gr=et.call(this,_r,da),Xr=mt.call(this,Gr,_r,da),xa,da=-1,Ja=_r.length,ti=Xr.length-1,Sa=de?1:1/Ja,Fa;++da<ti;)xa=Ot[da]=[],xa.dx=Xr[da+1]-(xa.x=Xr[da]),xa.y=0;if(ti>0)for(da=-1;++da<Ja;)Fa=_r[da],Fa>=Gr[0]&&Fa<=Gr[1]&&(xa=Ot[v.bisect(Xr,Fa,1,ti)-1],xa.y+=Sa,xa.push(Mt[da]));return Ot}return bt.value=function(Mt){return arguments.length?(Fe=Mt,bt):Fe},bt.range=function(Mt){return arguments.length?(et=Or(Mt),bt):et},bt.bins=function(Mt){return arguments.length?(mt=typeof Mt=="number"?function(ar){return Hu(ar,Mt)}:Or(Mt),bt):mt},bt.frequency=function(Mt){return arguments.length?(de=!!Mt,bt):de},bt};function kc(de,Fe){return Hu(de,Math.ceil(Math.log(Fe.length)/Math.LN2+1))}function Hu(de,Fe){for(var et=-1,mt=+de[0],bt=(de[1]-mt)/Fe,Mt=[];++et<=Fe;)Mt[et]=bt*et+mt;return Mt}function gf(de){return[v.min(de),v.max(de)]}v.layout.pack=function(){var de=v.layout.hierarchy().sort(Wu),Fe=0,et=[1,1],mt;function bt(Mt,ar){var Ot=de.call(this,Mt,ar),_r=Ot[0],Gr=et[0],Xr=et[1],xa=mt==null?Math.sqrt:typeof mt=="function"?mt:function(){return mt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+xa(Ja.value)}),mc(_r,Vf),Fe){var da=Fe*(mt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=da}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=da})}return gc(_r,Gr/2,Xr/2,mt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),Ot}return bt.size=function(Mt){return arguments.length?(et=Mt,bt):et},bt.radius=function(Mt){return arguments.length?(mt=Mt==null||typeof Mt=="function"?Mt:+Mt,bt):mt},bt.padding=function(Mt){return arguments.length?(Fe=+Mt,bt):Fe},Bu(bt,de)};function Wu(de,Fe){return de.value-Fe.value}function Kc(de,Fe){var et=de._pack_next;de._pack_next=Fe,Fe._pack_prev=de,Fe._pack_next=et,et._pack_prev=Fe}function Lf(de,Fe){de._pack_next=Fe,Fe._pack_prev=de}function iu(de,Fe){var et=Fe.x-de.x,mt=Fe.y-de.y,bt=de.r+Fe.r;return .999*bt*bt>et*et+mt*mt}function Vf(de){if(!(Fe=de.children)||!(da=Fe.length))return;var Fe,et=1/0,mt=-1/0,bt=1/0,Mt=-1/0,ar,Ot,_r,Gr,Xr,xa,da;function Ja(La){et=Math.min(La.x-La.r,et),mt=Math.max(La.x+La.r,mt),bt=Math.min(La.y-La.r,bt),Mt=Math.max(La.y+La.r,Mt)}if(Fe.forEach(Xu),ar=Fe[0],ar.x=-ar.r,ar.y=0,Ja(ar),da>1&&(Ot=Fe[1],Ot.x=Ot.r,Ot.y=0,Ja(Ot),da>2))for(_r=Fe[2],ql(ar,Ot,_r),Ja(_r),Kc(ar,_r),ar._pack_prev=_r,Kc(_r,Ot),Ot=ar._pack_next,Gr=3;Gr<da;Gr++){ql(ar,Ot,_r=Fe[Gr]);var ti=0,Sa=1,Fa=1;for(Xr=Ot._pack_next;Xr!==Ot;Xr=Xr._pack_next,Sa++)if(iu(Xr,_r)){ti=1;break}if(ti==1)for(xa=ar._pack_prev;xa!==Xr._pack_prev&&!iu(xa,_r);xa=xa._pack_prev,Fa++);ti?(Sa<Fa||Sa==Fa&&Ot.r<ar.r?Lf(ar,Ot=Xr):Lf(ar=xa,Ot),Gr--):(Kc(ar,_r),Ot=_r,Ja(_r))}var Xa=(et+mt)/2,fi=(bt+Mt)/2,ni=0;for(Gr=0;Gr<da;Gr++)_r=Fe[Gr],_r.x-=Xa,_r.y-=fi,ni=Math.max(ni,_r.r+Math.sqrt(_r.x*_r.x+_r.y*_r.y));de.r=ni,Fe.forEach(Cc)}function Xu(de){de._pack_next=de._pack_prev=de}function Cc(de){delete de._pack_next,delete de._pack_prev}function gc(de,Fe,et,mt){var bt=de.children;if(de.x=Fe+=mt*de.x,de.y=et+=mt*de.y,de.r*=mt,bt)for(var Mt=-1,ar=bt.length;++Mt<ar;)gc(bt[Mt],Fe,et,mt)}function ql(de,Fe,et){var mt=de.r+et.r,bt=Fe.x-de.x,Mt=Fe.y-de.y;if(mt&&(bt||Mt)){var ar=Fe.r+et.r,Ot=bt*bt+Mt*Mt;ar*=ar,mt*=mt;var _r=.5+(mt-ar)/(2*Ot),Gr=Math.sqrt(Math.max(0,2*ar*(mt+Ot)-(mt-=Ot)*mt-ar*ar))/(2*Ot);et.x=de.x+_r*bt+Gr*Mt,et.y=de.y+_r*Mt-Gr*bt}else et.x=de.x+mt,et.y=de.y}v.layout.tree=function(){var de=v.layout.hierarchy().sort(null).value(null),Fe=xu,et=[1,1],mt=null;function bt(Xr,xa){var da=de.call(this,Xr,xa),Ja=da[0],ti=Mt(Ja);if(mc(ti,ar),ti.parent.m=-ti.z,Ec(ti,Ot),mt)Ec(Ja,Gr);else{var Sa=Ja,Fa=Ja,Xa=Ja;Ec(Ja,function(sn){sn.x<Sa.x&&(Sa=sn),sn.x>Fa.x&&(Fa=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=Fe(Sa,Fa)/2-Sa.x,ni=et[0]/(Fa.x+Fe(Fa,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 da}function Mt(Xr){for(var xa={A:null,children:[Xr]},da=[xa],Ja;(Ja=da.pop())!=null;)for(var ti=Ja.children,Sa,Fa=0,Xa=ti.length;Fa<Xa;++Fa)da.push((ti[Fa]=Sa={_:ti[Fa],parent:Ja,children:(Sa=ti[Fa].children)&&Sa.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Fa}).a=Sa);return xa.children[0]}function ar(Xr){var xa=Xr.children,da=Xr.parent.children,Ja=Xr.i?da[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+Fe(Xr._,Ja._),Xr.m=Xr.z-ti):Xr.z=ti}else Ja&&(Xr.z=Ja.z+Fe(Xr._,Ja._));Xr.parent.A=_r(Xr,Ja,Xr.parent.A||da[0])}function Ot(Xr){Xr._.x=Xr.z+Xr.parent.m,Xr.m+=Xr.parent.m}function _r(Xr,xa,da){if(xa){for(var Ja=Xr,ti=Xr,Sa=xa,Fa=Ja.parent.children[0],Xa=Ja.m,fi=ti.m,ni=Sa.m,La=Fa.m,sn;Sa=Jc(Sa),Ja=Lc(Ja),Sa&&Ja;)Fa=Lc(Fa),ti=Jc(ti),ti.a=Xr,sn=Sa.z+ni-Ja.z-Xa+Fe(Sa._,Ja._),sn>0&&(sc(Qt(Sa,Xr,da),Xr,sn),Xa+=sn,fi+=sn),ni+=Sa.m,Xa+=Ja.m,La+=Fa.m,fi+=ti.m;Sa&&!Jc(ti)&&(ti.t=Sa,ti.m+=ni-fi),Ja&&!Lc(Fa)&&(Fa.t=Ja,Fa.m+=Xa-La,da=Xr)}return da}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return bt.separation=function(Xr){return arguments.length?(Fe=Xr,bt):Fe},bt.size=function(Xr){return arguments.length?(mt=(et=Xr)==null?Gr:null,bt):mt?null:et},bt.nodeSize=function(Xr){return arguments.length?(mt=(et=Xr)==null?null:Gr,bt):mt?et:null},Bu(bt,de)};function xu(de,Fe){return de.parent==Fe.parent?1:2}function Lc(de){var Fe=de.children;return Fe.length?Fe[0]:de.t}function Jc(de){var Fe=de.children,et;return(et=Fe.length)?Fe[et-1]:de.t}function sc(de,Fe,et){var mt=et/(Fe.i-de.i);Fe.c-=mt,Fe.s+=et,de.c+=mt,Fe.z+=et,Fe.m+=et}function Pc(de){for(var Fe=0,et=0,mt=de.children,bt=mt.length,Mt;--bt>=0;)Mt=mt[bt],Mt.z+=Fe,Mt.m+=Fe,Fe+=Mt.s+(et+=Mt.c)}function Qt(de,Fe,et){return de.a.parent===Fe.parent?de.a:et}v.layout.cluster=function(){var de=v.layout.hierarchy().sort(null).value(null),Fe=xu,et=[1,1],mt=!1;function bt(Mt,ar){var Ot=de.call(this,Mt,ar),_r=Ot[0],Gr,Xr=0;mc(_r,function(Sa){var Fa=Sa.children;Fa&&Fa.length?(Sa.x=aa(Fa),Sa.y=br(Fa)):(Sa.x=Gr?Xr+=Fe(Sa,Gr):0,Sa.y=0,Gr=Sa)});var xa=$r(_r),da=ka(_r),Ja=xa.x-Fe(xa,da)/2,ti=da.x+Fe(da,xa)/2;return mc(_r,mt?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]}),Ot}return bt.separation=function(Mt){return arguments.length?(Fe=Mt,bt):Fe},bt.size=function(Mt){return arguments.length?(mt=(et=Mt)==null,bt):mt?null:et},bt.nodeSize=function(Mt){return arguments.length?(mt=(et=Mt)!=null,bt):mt?et:null},Bu(bt,de)};function br(de){return 1+v.max(de,function(Fe){return Fe.y})}function aa(de){return de.reduce(function(Fe,et){return Fe+et.x},0)/de.length}function $r(de){var Fe=de.children;return Fe&&Fe.length?$r(Fe[0]):de}function ka(de){var Fe=de.children,et;return Fe&&(et=Fe.length)?ka(Fe[et-1]):de}v.layout.treemap=function(){var de=v.layout.hierarchy(),Fe=Math.round,et=[1,1],mt=null,bt=li,Mt=!1,ar,Ot="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,Fa){for(var Xa=-1,fi=Sa.length,ni,La;++Xa<fi;)La=(ni=Sa[Xa]).value*(Fa<0?0:Fa),ni.area=isNaN(La)||La<=0?0:La}function Xr(Sa){var Fa=Sa.children;if(Fa&&Fa.length){var Xa=bt(Sa),fi=[],ni=Fa.slice(),La,sn=1/0,rn,vn=Ot==="slice"?Xa.dx:Ot==="dice"?Xa.dy:Ot==="slice-dice"?Sa.depth&1?Xa.dy:Xa.dx:Math.min(Xa.dx,Xa.dy),Pn;for(Gr(ni,Xa.dx*Xa.dy/Sa.value),fi.area=0;(Pn=ni.length)>0;)fi.push(La=ni[Pn-1]),fi.area+=La.area,Ot!=="squarify"||(rn=da(fi,vn))<=sn?(ni.pop(),sn=rn):(fi.area-=fi.pop().area,Ja(fi,vn,Xa,!1),vn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,vn,Xa,!0),fi.length=fi.area=0),Fa.forEach(Xr)}}function xa(Sa){var Fa=Sa.children;if(Fa&&Fa.length){var Xa=bt(Sa),fi=Fa.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);Fa.forEach(xa)}}function da(Sa,Fa){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,Fa*=Fa,Xa?Math.max(Fa*ni*_r/Xa,Xa/(Fa*La*_r)):1/0}function Ja(Sa,Fa,Xa,fi){var ni=-1,La=Sa.length,sn=Xa.x,rn=Xa.y,vn=Fa?Fe(Sa.area/Fa):0,Pn;if(Fa==Xa.dx){for((fi||vn>Xa.dy)&&(vn=Xa.dy);++ni<La;)Pn=Sa[ni],Pn.x=sn,Pn.y=rn,Pn.dy=vn,sn+=Pn.dx=Math.min(Xa.x+Xa.dx-sn,vn?Fe(Pn.area/vn):0);Pn.z=!0,Pn.dx+=Xa.x+Xa.dx-sn,Xa.y+=vn,Xa.dy-=vn}else{for((fi||vn>Xa.dx)&&(vn=Xa.dx);++ni<La;)Pn=Sa[ni],Pn.x=sn,Pn.y=rn,Pn.dx=vn,rn+=Pn.dy=Math.min(Xa.y+Xa.dy-rn,vn?Fe(Pn.area/vn):0);Pn.z=!1,Pn.dy+=Xa.y+Xa.dy-rn,Xa.x+=vn,Xa.dx-=vn}}function ti(Sa){var Fa=ar||de(Sa),Xa=Fa[0];return Xa.x=Xa.y=0,Xa.value?(Xa.dx=et[0],Xa.dy=et[1]):Xa.dx=Xa.dy=0,ar&&de.revalue(Xa),Gr([Xa],Xa.dx*Xa.dy/Xa.value),(ar?xa:Xr)(Xa),Mt&&(ar=Fa),Fa}return ti.size=function(Sa){return arguments.length?(et=Sa,ti):et},ti.padding=function(Sa){if(!arguments.length)return mt;function Fa(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 bt=(mt=Sa)==null?li:(fi=typeof Sa)=="function"?Fa:(fi==="number"&&(Sa=[Sa,Sa,Sa,Sa]),Xa),ti},ti.round=function(Sa){return arguments.length?(Fe=Sa?Math.round:Number,ti):Fe!=Number},ti.sticky=function(Sa){return arguments.length?(Mt=Sa,ar=null,ti):Mt},ti.ratio=function(Sa){return arguments.length?(_r=Sa,ti):_r},ti.mode=function(Sa){return arguments.length?(Ot=Sa+"",ti):Ot},Bu(ti,de)};function li(de){return{x:de.x,y:de.y,dx:de.dx,dy:de.dy}}function Ci(de,Fe){var et=de.x+Fe[3],mt=de.y+Fe[0],bt=de.dx-Fe[1]-Fe[3],Mt=de.dy-Fe[0]-Fe[2];return bt<0&&(et+=bt/2,bt=0),Mt<0&&(mt+=Mt/2,Mt=0),{x:et,y:mt,dx:bt,dy:Mt}}v.random={normal:function(de,Fe){var et=arguments.length;return et<2&&(Fe=1),et<1&&(de=0),function(){var mt,bt,Mt;do mt=Math.random()*2-1,bt=Math.random()*2-1,Mt=mt*mt+bt*bt;while(!Mt||Mt>1);return de+Fe*mt*Math.sqrt(-2*Math.log(Mt)/Mt)}},logNormal:function(){var de=v.random.normal.apply(v,arguments);return function(){return Math.exp(de())}},bates:function(de){var Fe=v.random.irwinHall(de);return function(){return Fe()/de}},irwinHall:function(de){return function(){for(var Fe=0,et=0;et<de;et++)Fe+=Math.random();return Fe}}},v.scale={};function Hi(de){var Fe=de[0],et=de[de.length-1];return Fe<et?[Fe,et]:[et,Fe]}function Qi(de){return de.rangeExtent?de.rangeExtent():Hi(de.range())}function dn(de,Fe,et,mt){var bt=et(de[0],de[1]),Mt=mt(Fe[0],Fe[1]);return function(ar){return Mt(bt(ar))}}function Pi(de,Fe){var et=0,mt=de.length-1,bt=de[et],Mt=de[mt],ar;return Mt<bt&&(ar=et,et=mt,mt=ar,ar=bt,bt=Mt,Mt=ar),de[et]=Fe.floor(bt),de[mt]=Fe.ceil(Mt),de}function Di(de){return de?{floor:function(Fe){return Math.floor(Fe/de)*de},ceil:function(Fe){return Math.ceil(Fe/de)*de}}:Ni}var Ni={floor:F,ceil:F};function mi(de,Fe,et,mt){var bt=[],Mt=[],ar=0,Ot=Math.min(de.length,Fe.length)-1;for(de[Ot]<de[0]&&(de=de.slice().reverse(),Fe=Fe.slice().reverse());++ar<=Ot;)bt.push(et(de[ar-1],de[ar])),Mt.push(mt(Fe[ar-1],Fe[ar]));return function(_r){var Gr=v.bisect(de,_r,1,Ot)-1;return Mt[Gr](bt[Gr](_r))}}v.scale.linear=function(){return Mn([0,1],[0,1],Ul,!1)};function Mn(de,Fe,et,mt){var bt,Mt;function ar(){var _r=Math.min(de.length,Fe.length)>2?mi:dn,Gr=mt?Cu:$f;return bt=_r(de,Fe,Gr,et),Mt=_r(Fe,de,Gr,Ul),Ot}function Ot(_r){return bt(_r)}return Ot.invert=function(_r){return Mt(_r)},Ot.domain=function(_r){return arguments.length?(de=_r.map(Number),ar()):de},Ot.range=function(_r){return arguments.length?(Fe=_r,ar()):Fe},Ot.rangeRound=function(_r){return Ot.range(_r).interpolate(Gu)},Ot.clamp=function(_r){return arguments.length?(mt=_r,ar()):mt},Ot.interpolate=function(_r){return arguments.length?(et=_r,ar()):et},Ot.ticks=function(_r){return fo(de,_r)},Ot.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(de,_r,Gr)},Ot.nice=function(_r){return ao(de,_r),ar()},Ot.copy=function(){return Mn(de,Fe,et,mt)},ar()}function Qn(de,Fe){return v.rebind(de,Fe,"range","rangeRound","interpolate","clamp")}function ao(de,Fe){return Pi(de,Di(eo(de,Fe)[2])),Pi(de,Di(eo(de,Fe)[2])),de}function eo(de,Fe){Fe==null&&(Fe=10);var et=Hi(de),mt=et[1]-et[0],bt=Math.pow(10,Math.floor(Math.log(mt/Fe)/Math.LN10)),Mt=Fe/mt*bt;return Mt<=.15?bt*=10:Mt<=.35?bt*=5:Mt<=.75&&(bt*=2),et[0]=Math.ceil(et[0]/bt)*bt,et[1]=Math.floor(et[1]/bt)*bt+bt*.5,et[2]=bt,et}function fo(de,Fe){return v.range.apply(v,eo(de,Fe))}var An={s:1,g:1,p:1,r:1,e:1};function un(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function yo(de,Fe){var et=un(Fe[2]);return de in An?Math.abs(et-un(Math.max(l(Fe[0]),l(Fe[1]))))+ +(de!=="e"):et-(de==="%")*2}v.scale.log=function(){return Ko(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(de,Fe,et,mt){function bt(Ot){return(et?Math.log(Ot<0?0:Ot):-Math.log(Ot>0?0:-Ot))/Math.log(Fe)}function Mt(Ot){return et?Math.pow(Fe,Ot):-Math.pow(Fe,-Ot)}function ar(Ot){return de(bt(Ot))}return ar.invert=function(Ot){return Mt(de.invert(Ot))},ar.domain=function(Ot){return arguments.length?(et=Ot[0]>=0,de.domain((mt=Ot.map(Number)).map(bt)),ar):mt},ar.base=function(Ot){return arguments.length?(Fe=+Ot,de.domain(mt.map(bt)),ar):Fe},ar.nice=function(){var Ot=Pi(mt.map(bt),et?Math:Ss);return de.domain(Ot),mt=Ot.map(Mt),ar},ar.ticks=function(){var Ot=Hi(mt),_r=[],Gr=Ot[0],Xr=Ot[1],xa=Math.floor(bt(Gr)),da=Math.ceil(bt(Xr)),Ja=Fe%1?2:Fe;if(isFinite(da-xa)){if(et){for(;xa<da;xa++)for(var ti=1;ti<Ja;ti++)_r.push(Mt(xa)*ti);_r.push(Mt(xa))}else for(_r.push(Mt(xa));xa++<da;)for(var ti=Ja-1;ti>0;ti--)_r.push(Mt(xa)*ti);for(xa=0;_r[xa]<Gr;xa++);for(da=_r.length;_r[da-1]>Xr;da--);_r=_r.slice(xa,da)}return _r},ar.copy=function(){return Ko(de.copy(),Fe,et,mt)},Qn(ar,de)}var Ss={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};v.scale.pow=function(){return rl(v.scale.linear(),1,[0,1])};function rl(de,Fe,et){var mt=Os(Fe),bt=Os(1/Fe);function Mt(ar){return de(mt(ar))}return Mt.invert=function(ar){return bt(de.invert(ar))},Mt.domain=function(ar){return arguments.length?(de.domain((et=ar.map(Number)).map(mt)),Mt):et},Mt.ticks=function(ar){return fo(et,ar)},Mt.tickFormat=function(ar,Ot){return d3_scale_linearTickFormat(et,ar,Ot)},Mt.nice=function(ar){return Mt.domain(ao(et,ar))},Mt.exponent=function(ar){return arguments.length?(mt=Os(Fe=ar),bt=Os(1/Fe),de.domain(et.map(mt)),Mt):Fe},Mt.copy=function(){return rl(de.copy(),Fe,et)},Qn(Mt,de)}function Os(de){return function(Fe){return Fe<0?-Math.pow(-Fe,de):Math.pow(Fe,de)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(de,Fe){var et,mt,bt;function Mt(Ot){return mt[((et.get(Ot)||(Fe.t==="range"?et.set(Ot,de.push(Ot)):NaN))-1)%mt.length]}function ar(Ot,_r){return v.range(de.length).map(function(Gr){return Ot+_r*Gr})}return Mt.domain=function(Ot){if(!arguments.length)return de;de=[],et=new A;for(var _r=-1,Gr=Ot.length,Xr;++_r<Gr;)et.has(Xr=Ot[_r])||et.set(Xr,de.push(Xr));return Mt[Fe.t].apply(Mt,Fe.a)},Mt.range=function(Ot){return arguments.length?(mt=Ot,bt=0,Fe={t:"range",a:arguments},Mt):mt},Mt.rangePoints=function(Ot,_r){arguments.length<2&&(_r=0);var Gr=Ot[0],Xr=Ot[1],xa=de.length<2?(Gr=(Gr+Xr)/2,0):(Xr-Gr)/(de.length-1+_r);return mt=ar(Gr+xa*_r/2,xa),bt=0,Fe={t:"rangePoints",a:arguments},Mt},Mt.rangeRoundPoints=function(Ot,_r){arguments.length<2&&(_r=0);var Gr=Ot[0],Xr=Ot[1],xa=de.length<2?(Gr=Xr=Math.round((Gr+Xr)/2),0):(Xr-Gr)/(de.length-1+_r)|0;return mt=ar(Gr+Math.round(xa*_r/2+(Xr-Gr-(de.length-1+_r)*xa)/2),xa),bt=0,Fe={t:"rangeRoundPoints",a:arguments},Mt},Mt.rangeBands=function(Ot,_r,Gr){arguments.length<2&&(_r=0),arguments.length<3&&(Gr=_r);var Xr=Ot[1]<Ot[0],xa=Ot[Xr-0],da=Ot[1-Xr],Ja=(da-xa)/(de.length-_r+2*Gr);return mt=ar(xa+Ja*Gr,Ja),Xr&&mt.reverse(),bt=Ja*(1-_r),Fe={t:"rangeBands",a:arguments},Mt},Mt.rangeRoundBands=function(Ot,_r,Gr){arguments.length<2&&(_r=0),arguments.length<3&&(Gr=_r);var Xr=Ot[1]<Ot[0],xa=Ot[Xr-0],da=Ot[1-Xr],Ja=Math.floor((da-xa)/(de.length-_r+2*Gr));return mt=ar(xa+Math.round((da-xa-(de.length-_r)*Ja)/2),Ja),Xr&&mt.reverse(),bt=Math.round(Ja*(1-_r)),Fe={t:"rangeRoundBands",a:arguments},Mt},Mt.rangeBand=function(){return bt},Mt.rangeExtent=function(){return Hi(Fe.a[0])},Mt.copy=function(){return el(de,Fe)},Mt.domain(de)}v.scale.category10=function(){return v.scale.ordinal().range(bs)},v.scale.category20=function(){return v.scale.ordinal().range(Fl)},v.scale.category20b=function(){return v.scale.ordinal().range(_l)},v.scale.category20c=function(){return v.scale.ordinal().range(ll)};var bs=[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);v.scale.quantile=function(){return Un([],[])};function Un(de,Fe){var et;function mt(){var Mt=0,ar=Fe.length;for(et=[];++Mt<ar;)et[Mt-1]=v.quantile(de,Mt/ar);return bt}function bt(Mt){if(!isNaN(Mt=+Mt))return Fe[v.bisect(et,Mt)]}return bt.domain=function(Mt){return arguments.length?(de=Mt.map(h).filter(c).sort(s),mt()):de},bt.range=function(Mt){return arguments.length?(Fe=Mt,mt()):Fe},bt.quantiles=function(){return et},bt.invertExtent=function(Mt){return Mt=Fe.indexOf(Mt),Mt<0?[NaN,NaN]:[Mt>0?et[Mt-1]:de[0],Mt<et.length?et[Mt]:de[de.length-1]]},bt.copy=function(){return Un(de,Fe)},mt()}v.scale.quantize=function(){return Lo(0,1,[0,1])};function Lo(de,Fe,et){var mt,bt;function Mt(Ot){return et[Math.max(0,Math.min(bt,Math.floor(mt*(Ot-de))))]}function ar(){return mt=et.length/(Fe-de),bt=et.length-1,Mt}return Mt.domain=function(Ot){return arguments.length?(de=+Ot[0],Fe=+Ot[Ot.length-1],ar()):[de,Fe]},Mt.range=function(Ot){return arguments.length?(et=Ot,ar()):et},Mt.invertExtent=function(Ot){return Ot=et.indexOf(Ot),Ot=Ot<0?NaN:Ot/mt+de,[Ot,Ot+1/mt]},Mt.copy=function(){return Lo(de,Fe,et)},ar()}v.scale.threshold=function(){return Js([.5],[0,1])};function Js(de,Fe){function et(mt){if(mt<=mt)return Fe[v.bisect(de,mt)]}return et.domain=function(mt){return arguments.length?(de=mt,et):de},et.range=function(mt){return arguments.length?(Fe=mt,et):Fe},et.invertExtent=function(mt){return mt=Fe.indexOf(mt),[de[mt-1],de[mt]]},et.copy=function(){return Js(de,Fe)},et}v.scale.identity=function(){return Rs([0,1])};function Rs(de){function Fe(et){return+et}return Fe.invert=Fe,Fe.domain=Fe.range=function(et){return arguments.length?(de=et.map(Fe),Fe):de},Fe.ticks=function(et){return fo(de,et)},Fe.tickFormat=function(et,mt){return d3_scale_linearTickFormat(de,et,mt)},Fe.copy=function(){return Rs(de)},Fe}v.svg={};function uu(){return 0}v.svg.arc=function(){var de=Zu,Fe=Ic,et=uu,mt=Iu,bt=bu,Mt=Rc,ar=Au;function Ot(){var Gr=Math.max(0,+de.apply(this,arguments)),Xr=Math.max(0,+Fe.apply(this,arguments)),xa=bt.apply(this,arguments)-Ee,da=Mt.apply(this,arguments)-Ee,Ja=Math.abs(da-xa),ti=xa>da?0:1;if(Xr<Gr&&(Sa=Xr,Xr=Gr,Gr=Sa),Ja>=Ce)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,Fa,Xa,fi,ni=0,La=0,sn,rn,vn,Pn,Jn,ro,Yo,io,Ho=[];if((fi=(+ar.apply(this,arguments)||0)/2)&&(Xa=mt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+mt.apply(this,arguments),ti||(La*=-1),Xr&&(La=ir(Xa/Xr*Math.sin(fi))),Gr&&(ni=ir(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(xa+La),rn=Xr*Math.sin(xa+La),vn=Xr*Math.cos(da-La),Pn=Xr*Math.sin(da-La);var cl=Math.abs(da-xa-2*La)<=Ie?0:1;if(La&&yc(sn,rn,vn,Pn)===ti^cl){var al=(xa+da)/2;sn=Xr*Math.cos(al),rn=Xr*Math.sin(al),vn=Pn=null}}else sn=rn=0;if(Gr){Jn=Gr*Math.cos(da-ni),ro=Gr*Math.sin(da-ni),Yo=Gr*Math.cos(xa+ni),io=Gr*Math.sin(xa+ni);var xl=Math.abs(xa-da+2*ni)<=Ie?0:1;if(ni&&yc(Jn,ro,Yo,io)===1-ti^xl){var gn=(xa+da)/2;Jn=Gr*Math.cos(gn),ro=Gr*Math.sin(gn),Yo=io=null}}else Jn=ro=0;if(Ja>Ke&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){Fa=Gr<Xr^ti?0:1;var vo=Sa,cs=Sa;if(Ja<Ie){var ms=Yo==null?[Jn,ro]:vn==null?[sn,rn]:No([sn,rn],[Yo,io],[vn,Pn],[Jn,ro]),Al=sn-ms[0],Hl=rn-ms[1],Su=vn-ms[0],Rl=Pn-ms[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(ms[0]*ms[0]+ms[1]*ms[1]);cs=Math.min(Sa,(Gr-it)/(_c-1)),vo=Math.min(Sa,(Xr-it)/(_c+1))}if(vn!=null){var Zt=ho(Yo==null?[Jn,ro]:[Yo,io],[sn,rn],Xr,vo,ti),fr=ho([vn,Pn],[Jn,ro],Xr,vo,ti);Sa===vo?Ho.push("M",Zt[0],"A",vo,",",vo," 0 0,",Fa," ",Zt[1],"A",Xr,",",Xr," 0 ",1-ti^yc(Zt[1][0],Zt[1][1],fr[1][0],fr[1][1]),",",ti," ",fr[1],"A",vo,",",vo," 0 0,",Fa," ",fr[0]):Ho.push("M",Zt[0],"A",vo,",",vo," 0 1,",Fa," ",fr[0])}else Ho.push("M",sn,",",rn);if(Yo!=null){var oa=ho([sn,rn],[Yo,io],Gr,-cs,ti),wa=ho([Jn,ro],vn==null?[sn,rn]:[vn,Pn],Gr,-cs,ti);Sa===cs?Ho.push("L",wa[0],"A",cs,",",cs," 0 0,",Fa," ",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,",Fa," ",oa[0]):Ho.push("L",wa[0],"A",cs,",",cs," 0 0,",Fa," ",oa[0])}else Ho.push("L",Jn,",",ro)}else Ho.push("M",sn,",",rn),vn!=null&&Ho.push("A",Xr,",",Xr," 0 ",cl,",",ti," ",vn,",",Pn),Ho.push("L",Jn,",",ro),Yo!=null&&Ho.push("A",Gr,",",Gr," 0 ",xl,",",1-ti," ",Yo,",",io);return Ho.push("Z"),Ho.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 Ot.innerRadius=function(Gr){return arguments.length?(de=Or(Gr),Ot):de},Ot.outerRadius=function(Gr){return arguments.length?(Fe=Or(Gr),Ot):Fe},Ot.cornerRadius=function(Gr){return arguments.length?(et=Or(Gr),Ot):et},Ot.padRadius=function(Gr){return arguments.length?(mt=Gr==Iu?Iu:Or(Gr),Ot):mt},Ot.startAngle=function(Gr){return arguments.length?(bt=Or(Gr),Ot):bt},Ot.endAngle=function(Gr){return arguments.length?(Mt=Or(Gr),Ot):Mt},Ot.padAngle=function(Gr){return arguments.length?(ar=Or(Gr),Ot):ar},Ot.centroid=function(){var Gr=(+de.apply(this,arguments)+ +Fe.apply(this,arguments))/2,Xr=(+bt.apply(this,arguments)+ +Mt.apply(this,arguments))/2-Ee;return[Math.cos(Xr)*Gr,Math.sin(Xr)*Gr]},Ot};var Iu="auto";function Zu(de){return de.innerRadius}function Ic(de){return de.outerRadius}function bu(de){return de.startAngle}function Rc(de){return de.endAngle}function Au(de){return de&&de.padAngle}function yc(de,Fe,et,mt){return(de-et)*Fe-(Fe-mt)*de>0?0:1}function ho(de,Fe,et,mt,bt){var Mt=de[0]-Fe[0],ar=de[1]-Fe[1],Ot=(bt?mt:-mt)/Math.sqrt(Mt*Mt+ar*ar),_r=Ot*ar,Gr=-Ot*Mt,Xr=de[0]+_r,xa=de[1]+Gr,da=Fe[0]+_r,Ja=Fe[1]+Gr,ti=(Xr+da)/2,Sa=(xa+Ja)/2,Fa=da-Xr,Xa=Ja-xa,fi=Fa*Fa+Xa*Xa,ni=et-mt,La=Xr*Ja-da*xa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),rn=(La*Xa-Fa*sn)/fi,vn=(-La*Fa-Xa*sn)/fi,Pn=(La*Xa+Fa*sn)/fi,Jn=(-La*Fa+Xa*sn)/fi,ro=rn-ti,Yo=vn-Sa,io=Pn-ti,Ho=Jn-Sa;return ro*ro+Yo*Yo>io*io+Ho*Ho&&(rn=Pn,vn=Jn),[[rn-_r,vn-Gr],[rn*et/ni,vn*et/ni]]}function Ro(){return!0}function Dc(de){var Fe=cn,et=lo,mt=Ro,bt=Yu,Mt=bt.key,ar=.7;function Ot(_r){var Gr=[],Xr=[],xa=-1,da=_r.length,Ja,ti=Or(Fe),Sa=Or(et);function Fa(){Gr.push("M",bt(de(Xr),ar))}for(;++xa<da;)mt.call(this,Ja=_r[xa],xa)?Xr.push([+ti.call(this,Ja,xa),+Sa.call(this,Ja,xa)]):Xr.length&&(Fa(),Xr=[]);return Xr.length&&Fa(),Gr.length?Gr.join(""):null}return Ot.x=function(_r){return arguments.length?(Fe=_r,Ot):Fe},Ot.y=function(_r){return arguments.length?(et=_r,Ot):et},Ot.defined=function(_r){return arguments.length?(mt=_r,Ot):mt},Ot.interpolate=function(_r){return arguments.length?(typeof _r=="function"?Mt=bt=_r:Mt=(bt=lc.get(_r)||Yu).key,Ot):Mt},Ot.tension=function(_r){return arguments.length?(ar=_r,Ot):ar},Ot}v.svg.line=function(){return Dc(F)};var lc=v.map({linear:Yu,"linear-closed":Ue,step:I,"step-before":ie,"step-after":we,basis:$t,"basis-open":Tr,"basis-closed":Ar,bundle:Kr,cardinal:dt,"cardinal-open":Se,"cardinal-closed":Be,monotone:cr});lc.forEach(function(de,Fe){Fe.key=de,Fe.closed=/-closed$/.test(de)});function Yu(de){return de.length>1?de.join("L"):de+"Z"}function Ue(de){return de.join("L")+"Z"}function I(de){for(var Fe=0,et=de.length,mt=de[0],bt=[mt[0],",",mt[1]];++Fe<et;)bt.push("H",(mt[0]+(mt=de[Fe])[0])/2,"V",mt[1]);return et>1&&bt.push("H",mt[0]),bt.join("")}function ie(de){for(var Fe=0,et=de.length,mt=de[0],bt=[mt[0],",",mt[1]];++Fe<et;)bt.push("V",(mt=de[Fe])[1],"H",mt[0]);return bt.join("")}function we(de){for(var Fe=0,et=de.length,mt=de[0],bt=[mt[0],",",mt[1]];++Fe<et;)bt.push("H",(mt=de[Fe])[0],"V",mt[1]);return bt.join("")}function Se(de,Fe){return de.length<4?Yu(de):de[1]+St(de.slice(1,-1),Nt(de,Fe))}function Be(de,Fe){return de.length<3?Ue(de):de[0]+St((de.push(de[0]),de),Nt([de[de.length-2]].concat(de,[de[1]]),Fe))}function dt(de,Fe){return de.length<3?Yu(de):de[0]+St(de,Nt(de,Fe))}function St(de,Fe){if(Fe.length<1||de.length!=Fe.length&&de.length!=Fe.length+2)return Yu(de);var et=de.length!=Fe.length,mt="",bt=de[0],Mt=de[1],ar=Fe[0],Ot=ar,_r=1;if(et&&(mt+="Q"+(Mt[0]-ar[0]*2/3)+","+(Mt[1]-ar[1]*2/3)+","+Mt[0]+","+Mt[1],bt=de[1],_r=2),Fe.length>1){Ot=Fe[1],Mt=de[_r],_r++,mt+="C"+(bt[0]+ar[0])+","+(bt[1]+ar[1])+","+(Mt[0]-Ot[0])+","+(Mt[1]-Ot[1])+","+Mt[0]+","+Mt[1];for(var Gr=2;Gr<Fe.length;Gr++,_r++)Mt=de[_r],Ot=Fe[Gr],mt+="S"+(Mt[0]-Ot[0])+","+(Mt[1]-Ot[1])+","+Mt[0]+","+Mt[1]}if(et){var Xr=de[_r];mt+="Q"+(Mt[0]+Ot[0]*2/3)+","+(Mt[1]+Ot[1]*2/3)+","+Xr[0]+","+Xr[1]}return mt}function Nt(de,Fe){for(var et=[],mt=(1-Fe)/2,bt,Mt=de[0],ar=de[1],Ot=1,_r=de.length;++Ot<_r;)bt=Mt,Mt=ar,ar=de[Ot],et.push([mt*(ar[0]-bt[0]),mt*(ar[1]-bt[1])]);return et}function $t(de){if(de.length<3)return Yu(de);var Fe=1,et=de.length,mt=de[0],bt=mt[0],Mt=mt[1],ar=[bt,bt,bt,(mt=de[1])[0]],Ot=[Mt,Mt,Mt,mt[1]],_r=[bt,",",Mt,"L",na(lt,ar),",",na(lt,Ot)];for(de.push(de[et-1]);++Fe<=et;)mt=de[Fe],ar.shift(),ar.push(mt[0]),Ot.shift(),Ot.push(mt[1]),vt(_r,ar,Ot);return de.pop(),_r.push("L",mt),_r.join("")}function Tr(de){if(de.length<4)return Yu(de);for(var Fe=[],et=-1,mt=de.length,bt,Mt=[0],ar=[0];++et<3;)bt=de[et],Mt.push(bt[0]),ar.push(bt[1]);for(Fe.push(na(lt,Mt)+","+na(lt,ar)),--et;++et<mt;)bt=de[et],Mt.shift(),Mt.push(bt[0]),ar.shift(),ar.push(bt[1]),vt(Fe,Mt,ar);return Fe.join("")}function Ar(de){for(var Fe,et=-1,mt=de.length,bt=mt+4,Mt,ar=[],Ot=[];++et<4;)Mt=de[et%mt],ar.push(Mt[0]),Ot.push(Mt[1]);for(Fe=[na(lt,ar),",",na(lt,Ot)],--et;++et<bt;)Mt=de[et%mt],ar.shift(),ar.push(Mt[0]),Ot.shift(),Ot.push(Mt[1]),vt(Fe,ar,Ot);return Fe.join("")}function Kr(de,Fe){var et=de.length-1;if(et)for(var mt=de[0][0],bt=de[0][1],Mt=de[et][0]-mt,ar=de[et][1]-bt,Ot=-1,_r,Gr;++Ot<=et;)_r=de[Ot],Gr=Ot/et,_r[0]=Fe*_r[0]+(1-Fe)*(mt+Gr*Mt),_r[1]=Fe*_r[1]+(1-Fe)*(bt+Gr*ar);return $t(de)}function na(de,Fe){return de[0]*Fe[0]+de[1]*Fe[1]+de[2]*Fe[2]+de[3]*Fe[3]}var He=[0,2/3,1/3,0],Je=[0,1/3,2/3,0],lt=[0,1/6,2/3,1/6];function vt(de,Fe,et){de.push("C",na(He,Fe),",",na(He,et),",",na(Je,Fe),",",na(Je,et),",",na(lt,Fe),",",na(lt,et))}function Lt(de,Fe){return(Fe[1]-de[1])/(Fe[0]-de[0])}function At(de){for(var Fe=0,et=de.length-1,mt=[],bt=de[0],Mt=de[1],ar=mt[0]=Lt(bt,Mt);++Fe<et;)mt[Fe]=(ar+(ar=Lt(bt=Mt,Mt=de[Fe+1])))/2;return mt[Fe]=ar,mt}function zt(de){for(var Fe=[],et,mt,bt,Mt,ar=At(de),Ot=-1,_r=de.length-1;++Ot<_r;)et=Lt(de[Ot],de[Ot+1]),l(et)<Ke?ar[Ot]=ar[Ot+1]=0:(mt=ar[Ot]/et,bt=ar[Ot+1]/et,Mt=mt*mt+bt*bt,Mt>9&&(Mt=et*3/Math.sqrt(Mt),ar[Ot]=Mt*mt,ar[Ot+1]=Mt*bt));for(Ot=-1;++Ot<=_r;)Mt=(de[Math.min(_r,Ot+1)][0]-de[Math.max(0,Ot-1)][0])/(6*(1+ar[Ot]*ar[Ot])),Fe.push([Mt||0,ar[Ot]*Mt||0]);return Fe}function cr(de){return de.length<3?Yu(de):de[0]+St(de,zt(de))}v.svg.line.radial=function(){var de=Dc(yr);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function yr(de){for(var Fe,et=-1,mt=de.length,bt,Mt;++et<mt;)Fe=de[et],bt=Fe[0],Mt=Fe[1]-Ee,Fe[0]=bt*Math.cos(Mt),Fe[1]=bt*Math.sin(Mt);return de}function Er(de){var Fe=cn,et=cn,mt=0,bt=lo,Mt=Ro,ar=Yu,Ot=ar.key,_r=ar,Gr="L",Xr=.7;function xa(da){var Ja=[],ti=[],Sa=[],Fa=-1,Xa=da.length,fi,ni=Or(Fe),La=Or(mt),sn=Fe===et?function(){return vn}:Or(et),rn=mt===bt?function(){return Pn}:Or(bt),vn,Pn;function Jn(){Ja.push("M",ar(de(Sa),Xr),Gr,_r(de(ti.reverse()),Xr),"Z")}for(;++Fa<Xa;)Mt.call(this,fi=da[Fa],Fa)?(ti.push([vn=+ni.call(this,fi,Fa),Pn=+La.call(this,fi,Fa)]),Sa.push([+sn.call(this,fi,Fa),+rn.call(this,fi,Fa)])):ti.length&&(Jn(),ti=[],Sa=[]);return ti.length&&Jn(),Ja.length?Ja.join(""):null}return xa.x=function(da){return arguments.length?(Fe=et=da,xa):et},xa.x0=function(da){return arguments.length?(Fe=da,xa):Fe},xa.x1=function(da){return arguments.length?(et=da,xa):et},xa.y=function(da){return arguments.length?(mt=bt=da,xa):bt},xa.y0=function(da){return arguments.length?(mt=da,xa):mt},xa.y1=function(da){return arguments.length?(bt=da,xa):bt},xa.defined=function(da){return arguments.length?(Mt=da,xa):Mt},xa.interpolate=function(da){return arguments.length?(typeof da=="function"?Ot=ar=da:Ot=(ar=lc.get(da)||Yu).key,_r=ar.reverse||ar,Gr=ar.closed?"M":"L",xa):Ot},xa.tension=function(da){return arguments.length?(Xr=da,xa):Xr},xa}ie.reverse=we,we.reverse=ie,v.svg.area=function(){return Er(F)},v.svg.area.radial=function(){var de=Er(yr);return de.radius=de.x,delete de.x,de.innerRadius=de.x0,delete de.x0,de.outerRadius=de.x1,delete de.x1,de.angle=de.y,delete de.y,de.startAngle=de.y0,delete de.y0,de.endAngle=de.y1,delete de.y1,de};function jr(de){return de.source}function Qr(de){return de.target}v.svg.chord=function(){var de=jr,Fe=Qr,et=pa,mt=bu,bt=Rc;function Mt(Xr,xa){var da=ar(this,de,Xr,xa),Ja=ar(this,Fe,Xr,xa);return"M"+da.p0+_r(da.r,da.p1,da.a1-da.a0)+(Ot(da,Ja)?Gr(da.r,da.p1,da.r,da.p0):Gr(da.r,da.p1,Ja.r,Ja.p0)+_r(Ja.r,Ja.p1,Ja.a1-Ja.a0)+Gr(Ja.r,Ja.p1,da.r,da.p0))+"Z"}function ar(Xr,xa,da,Ja){var ti=xa.call(Xr,da,Ja),Sa=et.call(Xr,ti,Ja),Fa=mt.call(Xr,ti,Ja)-Ee,Xa=bt.call(Xr,ti,Ja)-Ee;return{r:Sa,a0:Fa,a1:Xa,p0:[Sa*Math.cos(Fa),Sa*Math.sin(Fa)],p1:[Sa*Math.cos(Xa),Sa*Math.sin(Xa)]}}function Ot(Xr,xa){return Xr.a0==xa.a0&&Xr.a1==xa.a1}function _r(Xr,xa,da){return"A"+Xr+","+Xr+" 0 "+ +(da>Ie)+",1 "+xa}function Gr(Xr,xa,da,Ja){return"Q 0,0 "+Ja}return Mt.radius=function(Xr){return arguments.length?(et=Or(Xr),Mt):et},Mt.source=function(Xr){return arguments.length?(de=Or(Xr),Mt):de},Mt.target=function(Xr){return arguments.length?(Fe=Or(Xr),Mt):Fe},Mt.startAngle=function(Xr){return arguments.length?(mt=Or(Xr),Mt):mt},Mt.endAngle=function(Xr){return arguments.length?(bt=Or(Xr),Mt):bt},Mt};function pa(de){return de.radius}v.svg.diagonal=function(){var de=jr,Fe=Qr,et=Aa;function mt(bt,Mt){var ar=de.call(this,bt,Mt),Ot=Fe.call(this,bt,Mt),_r=(ar.y+Ot.y)/2,Gr=[ar,{x:ar.x,y:_r},{x:Ot.x,y:_r},Ot];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return mt.source=function(bt){return arguments.length?(de=Or(bt),mt):de},mt.target=function(bt){return arguments.length?(Fe=Or(bt),mt):Fe},mt.projection=function(bt){return arguments.length?(et=bt,mt):et},mt};function Aa(de){return[de.x,de.y]}v.svg.diagonal.radial=function(){var de=v.svg.diagonal(),Fe=Aa,et=de.projection;return de.projection=function(mt){return arguments.length?et(za(Fe=mt)):Fe},de};function za(de){return function(){var Fe=de.apply(this,arguments),et=Fe[0],mt=Fe[1]-Ee;return[et*Math.cos(mt),et*Math.sin(mt)]}}v.svg.symbol=function(){var de=Vi,Fe=ci;function et(mt,bt){return(nn.get(de.call(this,mt,bt))||ji)(Fe.call(this,mt,bt))}return et.type=function(mt){return arguments.length?(de=Or(mt),et):de},et.size=function(mt){return arguments.length?(Fe=Or(mt),et):Fe},et};function ci(){return 64}function Vi(){return"circle"}function ji(de){var Fe=Math.sqrt(de/Ie);return"M0,"+Fe+"A"+Fe+","+Fe+" 0 1,1 0,"+-Fe+"A"+Fe+","+Fe+" 0 1,1 0,"+Fe+"Z"}var nn=v.map({circle:ji,cross:function(de){var Fe=Math.sqrt(de/5)/2;return"M"+-3*Fe+","+-Fe+"H"+-Fe+"V"+-3*Fe+"H"+Fe+"V"+-Fe+"H"+3*Fe+"V"+Fe+"H"+Fe+"V"+3*Fe+"H"+-Fe+"V"+Fe+"H"+-3*Fe+"Z"},diamond:function(de){var Fe=Math.sqrt(de/(2*Kn)),et=Fe*Kn;return"M0,"+-Fe+"L"+et+",0 0,"+Fe+" "+-et+",0Z"},square:function(de){var Fe=Math.sqrt(de)/2;return"M"+-Fe+","+-Fe+"L"+Fe+","+-Fe+" "+Fe+","+Fe+" "+-Fe+","+Fe+"Z"},"triangle-down":function(de){var Fe=Math.sqrt(de/Sn),et=Fe*Sn/2;return"M0,"+et+"L"+Fe+","+-et+" "+-Fe+","+-et+"Z"},"triangle-up":function(de){var Fe=Math.sqrt(de/Sn),et=Fe*Sn/2;return"M0,"+-et+"L"+Fe+","+et+" "+-Fe+","+et+"Z"}});v.svg.symbolTypes=nn.keys();var Sn=Math.sqrt(3),Kn=Math.tan(30*Pe);ae.transition=function(de){for(var Fe=ps||++Zo,et=$o(de),mt=[],bt,Mt,ar=ul||{time:Date.now(),ease:jl,delay:0,duration:250},Ot=-1,_r=this.length;++Ot<_r;){mt.push(bt=[]);for(var Gr=this[Ot],Xr=-1,xa=Gr.length;++Xr<xa;)(Mt=Gr[Xr])&&Il(Mt,Xr,et,Fe,ar),bt.push(Mt)}return is(mt,et,Fe)},ae.interrupt=function(de){return this.each(de==null?Bn:wo($o(de)))};var Bn=wo($o());function wo(de){return function(){var Fe,et,mt;(Fe=this[de])&&(mt=Fe[et=Fe.active])&&(mt.timer.c=null,mt.timer.t=NaN,--Fe.count?delete Fe[et]:delete this[de],Fe.active+=.5,mt.event&&mt.event.interrupt.call(this,this.__data__,mt.index))}}function is(de,Fe,et){return V(de,Ao),de.namespace=Fe,de.id=et,de}var Ao=[],Zo=0,ps,ul;Ao.call=ae.call,Ao.empty=ae.empty,Ao.node=ae.node,Ao.size=ae.size,v.transition=function(de,Fe){return de&&de.transition?ps?de.transition(Fe):de:v.selection().transition(de)},v.transition.prototype=Ao,Ao.select=function(de){var Fe=this.id,et=this.namespace,mt=[],bt,Mt,ar;de=j(de);for(var Ot=-1,_r=this.length;++Ot<_r;){mt.push(bt=[]);for(var Gr=this[Ot],Xr=-1,xa=Gr.length;++Xr<xa;)(ar=Gr[Xr])&&(Mt=de.call(ar,ar.__data__,Xr,Ot))?("__data__"in ar&&(Mt.__data__=ar.__data__),Il(Mt,Xr,et,Fe,ar[et][Fe]),bt.push(Mt)):bt.push(null)}return is(mt,et,Fe)},Ao.selectAll=function(de){var Fe=this.id,et=this.namespace,mt=[],bt,Mt,ar,Ot,_r;de=Q(de);for(var Gr=-1,Xr=this.length;++Gr<Xr;)for(var xa=this[Gr],da=-1,Ja=xa.length;++da<Ja;)if(ar=xa[da]){_r=ar[et][Fe],Mt=de.call(ar,ar.__data__,da,Gr),mt.push(bt=[]);for(var ti=-1,Sa=Mt.length;++ti<Sa;)(Ot=Mt[ti])&&Il(Ot,ti,et,Fe,_r),bt.push(Ot)}return is(mt,et,Fe)},Ao.filter=function(de){var Fe=[],et,mt,bt;typeof de!="function"&&(de=he(de));for(var Mt=0,ar=this.length;Mt<ar;Mt++){Fe.push(et=[]);for(var mt=this[Mt],Ot=0,_r=mt.length;Ot<_r;Ot++)(bt=mt[Ot])&&de.call(bt,bt.__data__,Ot,Mt)&&et.push(bt)}return is(Fe,this.namespace,this.id)},Ao.tween=function(de,Fe){var et=this.id,mt=this.namespace;return arguments.length<2?this.node()[mt][et].tween.get(de):tt(this,Fe==null?function(bt){bt[mt][et].tween.remove(de)}:function(bt){bt[mt][et].tween.set(de,Fe)})};function tl(de,Fe,et,mt){var bt=de.id,Mt=de.namespace;return tt(de,typeof et=="function"?function(ar,Ot,_r){ar[Mt][bt].tween.set(Fe,mt(et.call(ar,ar.__data__,Ot,_r)))}:(et=mt(et),function(ar){ar[Mt][bt].tween.set(Fe,et)}))}Ao.attr=function(de,Fe){if(arguments.length<2){for(Fe in de)this.attr(Fe,de[Fe]);return this}var et=de=="transform"?Zc:Ul,mt=v.ns.qualify(de);function bt(){this.removeAttribute(mt)}function Mt(){this.removeAttributeNS(mt.space,mt.local)}function ar(_r){return _r==null?bt:(_r+="",function(){var Gr=this.getAttribute(mt),Xr;return Gr!==_r&&(Xr=et(Gr,_r),function(xa){this.setAttribute(mt,Xr(xa))})})}function Ot(_r){return _r==null?Mt:(_r+="",function(){var Gr=this.getAttributeNS(mt.space,mt.local),Xr;return Gr!==_r&&(Xr=et(Gr,_r),function(xa){this.setAttributeNS(mt.space,mt.local,Xr(xa))})})}return tl(this,"attr."+de,Fe,mt.local?Ot:ar)},Ao.attrTween=function(de,Fe){var et=v.ns.qualify(de);function mt(Mt,ar){var Ot=Fe.call(this,Mt,ar,this.getAttribute(et));return Ot&&function(_r){this.setAttribute(et,Ot(_r))}}function bt(Mt,ar){var Ot=Fe.call(this,Mt,ar,this.getAttributeNS(et.space,et.local));return Ot&&function(_r){this.setAttributeNS(et.space,et.local,Ot(_r))}}return this.tween("attr."+de,et.local?bt:mt)},Ao.style=function(de,Fe,et){var mt=arguments.length;if(mt<3){if(typeof de!="string"){mt<2&&(Fe="");for(et in de)this.style(et,de[et],Fe);return this}et=""}function bt(){this.style.removeProperty(de)}function Mt(ar){return ar==null?bt:(ar+="",function(){var Ot=t(this).getComputedStyle(this,null).getPropertyValue(de),_r;return Ot!==ar&&(_r=Ul(Ot,ar),function(Gr){this.style.setProperty(de,_r(Gr),et)})})}return tl(this,"style."+de,Fe,Mt)},Ao.styleTween=function(de,Fe,et){arguments.length<3&&(et="");function mt(bt,Mt){var ar=Fe.call(this,bt,Mt,t(this).getComputedStyle(this,null).getPropertyValue(de));return ar&&function(Ot){this.style.setProperty(de,ar(Ot),et)}}return this.tween("style."+de,mt)},Ao.text=function(de){return tl(this,"text",de,Jo)};function Jo(de){return de==null&&(de=""),function(){this.textContent=de}}Ao.remove=function(){var de=this.namespace;return this.each("end.transition",function(){var Fe;this[de].count<2&&(Fe=this.parentNode)&&Fe.removeChild(this)})},Ao.ease=function(de){var Fe=this.id,et=this.namespace;return arguments.length<1?this.node()[et][Fe].ease:(typeof de!="function"&&(de=v.ease.apply(v,arguments)),tt(this,function(mt){mt[et][Fe].ease=de}))},Ao.delay=function(de){var Fe=this.id,et=this.namespace;return arguments.length<1?this.node()[et][Fe].delay:tt(this,typeof de=="function"?function(mt,bt,Mt){mt[et][Fe].delay=+de.call(mt,mt.__data__,bt,Mt)}:(de=+de,function(mt){mt[et][Fe].delay=de}))},Ao.duration=function(de){var Fe=this.id,et=this.namespace;return arguments.length<1?this.node()[et][Fe].duration:tt(this,typeof de=="function"?function(mt,bt,Mt){mt[et][Fe].duration=Math.max(1,de.call(mt,mt.__data__,bt,Mt))}:(de=Math.max(1,de),function(mt){mt[et][Fe].duration=de}))},Ao.each=function(de,Fe){var et=this.id,mt=this.namespace;if(arguments.length<2){var bt=ul,Mt=ps;try{ps=et,tt(this,function(ar,Ot,_r){ul=ar[mt][et],de.call(ar,ar.__data__,Ot,_r)})}finally{ul=bt,ps=Mt}}else tt(this,function(ar){var Ot=ar[mt][et];(Ot.event||(Ot.event=v.dispatch("start","end","interrupt"))).on(de,Fe)});return this},Ao.transition=function(){for(var de=this.id,Fe=++Zo,et=this.namespace,mt=[],bt,Mt,ar,Ot,_r=0,Gr=this.length;_r<Gr;_r++){mt.push(bt=[]);for(var Mt=this[_r],Xr=0,xa=Mt.length;Xr<xa;Xr++)(ar=Mt[Xr])&&(Ot=ar[et][de],Il(ar,Xr,et,Fe,{time:Ot.time,ease:Ot.ease,delay:Ot.delay+Ot.duration,duration:Ot.duration})),bt.push(ar)}return is(mt,et,Fe)};function $o(de){return de==null?"__transition__":"__transition_"+de+"__"}function Il(de,Fe,et,mt,bt){var Mt=de[et]||(de[et]={active:0,count:0}),ar=Mt[mt],Ot,_r,Gr,Xr,xa;function da(Sa){var Fa=ar.delay;if(_r.t=Fa+Ot,Fa<=Sa)return Ja(Sa-Fa);_r.c=Ja}function Ja(Sa){var Fa=Mt.active,Xa=Mt[Fa];Xa&&(Xa.timer.c=null,Xa.timer.t=NaN,--Mt.count,delete Mt[Fa],Xa.event&&Xa.event.interrupt.call(de,de.__data__,Xa.index));for(var fi in Mt)if(+fi<mt){var ni=Mt[fi];ni.timer.c=null,ni.timer.t=NaN,--Mt.count,delete Mt[fi]}_r.c=ti,Rn(function(){return _r.c&&ti(Sa||1)&&(_r.c=null,_r.t=NaN),1},0,Ot),Mt.active=mt,ar.event&&ar.event.start.call(de,de.__data__,Fe),xa=[],ar.tween.forEach(function(La,sn){(sn=sn.call(de,de.__data__,Fe))&&xa.push(sn)}),Xr=ar.ease,Gr=ar.duration}function ti(Sa){for(var Fa=Sa/Gr,Xa=Xr(Fa),fi=xa.length;fi>0;)xa[--fi].call(de,Xa);if(Fa>=1)return ar.event&&ar.event.end.call(de,de.__data__,Fe),--Mt.count?delete Mt[mt]:delete de[et],1}ar||(Ot=bt.time,_r=Rn(da,0,Ot),ar=Mt[mt]={tween:new A,time:Ot,timer:_r,delay:bt.delay,duration:bt.duration,ease:bt.ease,index:Fe},bt=null,++Mt.count)}v.svg.axis=function(){var de=v.scale.linear(),Fe=eu,et=6,mt=6,bt=3,Mt=[10],ar=null,Ot;function _r(Gr){Gr.each(function(){var Xr=v.select(this),xa=this.__chart__||de,da=this.__chart__=de.copy(),Ja=ar??(da.ticks?da.ticks.apply(da,Mt):da.domain()),ti=Ot??(da.tickFormat?da.tickFormat.apply(da,Mt):F),Sa=Xr.selectAll(".tick").data(Ja,da),Fa=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Ke),Xa=v.transition(Sa.exit()).style("opacity",Ke).remove(),fi=v.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+bt,La,sn=Qi(da),rn=Xr.selectAll(".domain").data([0]),vn=(rn.enter().append("path").attr("class","domain"),v.transition(rn));Fa.append("line"),Fa.append("text");var Pn=Fa.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),Yo=Fa.select("text"),io=fi.select("text"),Ho=Fe==="top"||Fe==="left"?-1:1,cl,al,xl,gn;if(Fe==="bottom"||Fe==="top"?(La=vu,cl="x",xl="y",al="x2",gn="y2",ro.attr("dy",Ho<0?"0em":".71em").style("text-anchor","middle"),vn.attr("d","M"+sn[0]+","+Ho*mt+"V0H"+sn[1]+"V"+Ho*mt)):(La=Tl,cl="y",xl="x",al="y2",gn="x2",ro.attr("dy",".32em").style("text-anchor",Ho<0?"end":"start"),vn.attr("d","M"+Ho*mt+","+sn[0]+"H0V"+sn[1]+"H"+Ho*mt)),Pn.attr(gn,Ho*et),Yo.attr(xl,Ho*ni),Jn.attr(al,0).attr(gn,Ho*et),io.attr(cl,0).attr(xl,Ho*ni),da.rangeBand){var vo=da,cs=vo.rangeBand()/2;xa=da=function(ms){return vo(ms)+cs}}else xa.rangeBand?xa=da:Xa.call(La,da,xa);Fa.call(La,xa,da),fi.call(La,da,da)})}return _r.scale=function(Gr){return arguments.length?(de=Gr,_r):de},_r.orient=function(Gr){return arguments.length?(Fe=Gr in Ru?Gr+"":eu,_r):Fe},_r.ticks=function(){return arguments.length?(Mt=S(arguments),_r):Mt},_r.tickValues=function(Gr){return arguments.length?(ar=Gr,_r):ar},_r.tickFormat=function(Gr){return arguments.length?(Ot=Gr,_r):Ot},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,mt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(mt=+Gr,_r):mt},_r.tickPadding=function(Gr){return arguments.length?(bt=+Gr,_r):bt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var eu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(de,Fe,et){de.attr("transform",function(mt){var bt=Fe(mt);return"translate("+(isFinite(bt)?bt:et(mt))+",0)"})}function Tl(de,Fe,et){de.attr("transform",function(mt){var bt=Fe(mt);return"translate(0,"+(isFinite(bt)?bt:et(mt))+")"})}v.svg.brush=function(){var de=le(Xr,"brushstart","brush","brushend"),Fe=null,et=null,mt=[0,0],bt=[0,0],Mt,ar,Ot=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var Fa=v.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=Fa.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Fa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=Fa.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=v.transition(Fa),La=v.transition(Xa),sn;Fe&&(sn=Qi(Fe),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),da(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 Fa=de.of(this,arguments),Xa={x:mt,y:bt,i:Mt,j:ar},fi=this.__chart__||Xa;this.__chart__=Xa,ps?v.select(this).transition().each("start.brush",function(){Mt=fi.i,ar=fi.j,mt=fi.x,bt=fi.y,Fa({type:"brushstart"})}).tween("brush:brush",function(){var ni=qu(mt,Xa.x),La=qu(bt,Xa.y);return Mt=ar=null,function(sn){mt=Xa.x=ni(sn),bt=Xa.y=La(sn),Fa({type:"brush",mode:"resize"})}}).each("end.brush",function(){Mt=Xa.i,ar=Xa.j,Fa({type:"brush",mode:"resize"}),Fa({type:"brushend"})}):(Fa({type:"brushstart"}),Fa({type:"brush",mode:"resize"}),Fa({type:"brushend"}))})};function xa(Sa){Sa.selectAll(".resize").attr("transform",function(Fa){return"translate("+mt[+/e$/.test(Fa)]+","+bt[+/^s/.test(Fa)]+")"})}function da(Sa){Sa.select(".extent").attr("x",mt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",mt[1]-mt[0])}function Ja(Sa){Sa.select(".extent").attr("y",bt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",bt[1]-bt[0])}function ti(){var Sa=this,Fa=v.select(v.event.target),Xa=de.of(Sa,arguments),fi=v.select(Sa),ni=Fa.datum(),La=!/^(n|s)$/.test(ni)&&Fe,sn=!/^(e|w)$/.test(ni)&&et,rn=Fa.classed("extent"),vn=Sr(Sa),Pn,Jn=v.mouse(Sa),ro,Yo=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?Yo.on("touchmove.brush",xl).on("touchend.brush",vo):Yo.on("mousemove.brush",xl).on("mouseup.brush",vo),fi.interrupt().selectAll("*").interrupt(),rn)Jn[0]=mt[0]-Jn[0],Jn[1]=bt[0]-Jn[1];else if(ni){var io=+/w$/.test(ni),Ho=+/^n/.test(ni);ro=[mt[1-io]-Jn[0],bt[1-Ho]-Jn[1]],Jn[0]=mt[io],Jn[1]=bt[Ho]}else v.event.altKey&&(Pn=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",Fa.style("cursor")),Xa({type:"brushstart"}),xl();function cl(){v.event.keyCode==32&&(rn||(Pn=null,Jn[0]-=mt[1],Jn[1]-=bt[1],rn=2),$())}function al(){v.event.keyCode==32&&rn==2&&(Jn[0]+=mt[1],Jn[1]+=bt[1],rn=0,$())}function xl(){var cs=v.mouse(Sa),ms=!1;ro&&(cs[0]+=ro[0],cs[1]+=ro[1]),rn||(v.event.altKey?(Pn||(Pn=[(mt[0]+mt[1])/2,(bt[0]+bt[1])/2]),Jn[0]=mt[+(cs[0]<Pn[0])],Jn[1]=bt[+(cs[1]<Pn[1])]):Pn=null),La&&gn(cs,Fe,0)&&(da(fi),ms=!0),sn&&gn(cs,et,1)&&(Ja(fi),ms=!0),ms&&(xa(fi),Xa({type:"brush",mode:rn?"move":"resize"}))}function gn(cs,ms,Al){var Hl=Qi(ms),Su=Hl[0],Rl=Hl[1],_c=Jn[Al],it=Al?bt:mt,Zt=it[1]-it[0],fr,oa;if(rn&&(Su-=_c,Rl-=Zt+_c),fr=(Al?_r:Ot)?Math.max(Su,Math.min(Rl,cs[Al])):cs[Al],rn?oa=(fr+=_c)+Zt:(Pn&&(_c=Math.max(Su,Math.min(Rl,2*Pn[Al]-fr))),_c<fr?(oa=fr,fr=_c):oa=_c),it[0]!=fr||it[1]!=oa)return Al?ar=null:Mt=null,it[0]=fr,it[1]=oa,!0}function vo(){xl(),fi.style("pointer-events","all").selectAll(".resize").style("display",Xr.empty()?"none":null),v.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),vn(),Xa({type:"brushend"})}}return Xr.x=function(Sa){return arguments.length?(Fe=Sa,Gr=uc[!Fe<<1|!et],Xr):Fe},Xr.y=function(Sa){return arguments.length?(et=Sa,Gr=uc[!Fe<<1|!et],Xr):et},Xr.clamp=function(Sa){return arguments.length?(Fe&&et?(Ot=!!Sa[0],_r=!!Sa[1]):Fe?Ot=!!Sa:et&&(_r=!!Sa),Xr):Fe&&et?[Ot,_r]:Fe?Ot:et?_r:null},Xr.extent=function(Sa){var Fa,Xa,fi,ni,La;return arguments.length?(Fe&&(Fa=Sa[0],Xa=Sa[1],et&&(Fa=Fa[0],Xa=Xa[0]),Mt=[Fa,Xa],Fe.invert&&(Fa=Fe(Fa),Xa=Fe(Xa)),Xa<Fa&&(La=Fa,Fa=Xa,Xa=La),(Fa!=mt[0]||Xa!=mt[1])&&(mt=[Fa,Xa])),et&&(fi=Sa[0],ni=Sa[1],Fe&&(fi=fi[1],ni=ni[1]),ar=[fi,ni],et.invert&&(fi=et(fi),ni=et(ni)),ni<fi&&(La=fi,fi=ni,ni=La),(fi!=bt[0]||ni!=bt[1])&&(bt=[fi,ni])),Xr):(Fe&&(Mt?(Fa=Mt[0],Xa=Mt[1]):(Fa=mt[0],Xa=mt[1],Fe.invert&&(Fa=Fe.invert(Fa),Xa=Fe.invert(Xa)),Xa<Fa&&(La=Fa,Fa=Xa,Xa=La))),et&&(ar?(fi=ar[0],ni=ar[1]):(fi=bt[0],ni=bt[1],et.invert&&(fi=et.invert(fi),ni=et.invert(ni)),ni<fi&&(La=fi,fi=ni,ni=La))),Fe&&et?[[Fa,fi],[Xa,ni]]:Fe?[Fa,Xa]:et&&[fi,ni])},Xr.clear=function(){return Xr.empty()||(mt=[0,0],bt=[0,0],Mt=ar=null),Xr},Xr.empty=function(){return!!Fe&&mt[0]==mt[1]||!!et&&bt[0]==bt[1]},v.rebind(Xr,de,"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"],[]];v.text=ba(function(de){return de.responseText}),v.json=function(de,Fe){return Pa(de,"application/json",Vl,Fe)};function Vl(de){return JSON.parse(de.responseText)}v.html=function(de,Fe){return Pa(de,"text/html",Gl,Fe)};function Gl(de){var Fe=E.createRange();return Fe.selectNode(E.body),Fe.createContextualFragment(de.responseText)}v.xml=ba(function(de){return de.responseXML}),typeof G=="object"&&G.exports?G.exports=v:this.d3=v}).apply(self)}}),dd=Xe({"node_modules/d3-time/dist/d3-time.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";var x=new Date,S=new Date;function E(he,Oe,tt,ot){function Qe(Pt){return he(Pt=arguments.length===0?new Date:new Date(+Pt)),Pt}return Qe.floor=function(Pt){return he(Pt=new Date(+Pt)),Pt},Qe.ceil=function(Pt){return he(Pt=new Date(Pt-1)),Oe(Pt,1),he(Pt),Pt},Qe.round=function(Pt){var It=Qe(Pt),qt=Qe.ceil(Pt);return Pt-It<qt-Pt?It:qt},Qe.offset=function(Pt,It){return Oe(Pt=new Date(+Pt),It==null?1:Math.floor(It)),Pt},Qe.range=function(Pt,It,qt){var Wt=[],kr;if(Pt=Qe.ceil(Pt),qt=qt==null?1:Math.floor(qt),!(Pt<It)||!(qt>0))return Wt;do Wt.push(kr=new Date(+Pt)),Oe(Pt,qt),he(Pt);while(kr<Pt&&Pt<It);return Wt},Qe.filter=function(Pt){return E(function(It){if(It>=It)for(;he(It),!Pt(It);)It.setTime(It-1)},function(It,qt){if(It>=It)if(qt<0)for(;++qt<=0;)for(;Oe(It,-1),!Pt(It););else for(;--qt>=0;)for(;Oe(It,1),!Pt(It););})},tt&&(Qe.count=function(Pt,It){return x.setTime(+Pt),S.setTime(+It),he(x),he(S),Math.floor(tt(x,S))},Qe.every=function(Pt){return Pt=Math.floor(Pt),!isFinite(Pt)||!(Pt>0)?null:Pt>1?Qe.filter(ot?function(It){return ot(It)%Pt===0}:function(It){return Qe.count(0,It)%Pt===0}):Qe}),Qe}var e=E(function(){},function(he,Oe){he.setTime(+he+Oe)},function(he,Oe){return Oe-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(Oe){Oe.setTime(Math.floor(Oe/he)*he)},function(Oe,tt){Oe.setTime(+Oe+tt*he)},function(Oe,tt){return(tt-Oe)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,n=864e5,i=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,Oe){he.setTime(+he+Oe*r)},function(he,Oe){return(Oe-he)/r},function(he){return he.getUTCSeconds()}),h=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,Oe){he.setTime(+he+Oe*o)},function(he,Oe){return(Oe-he)/o},function(he){return he.getMinutes()}),m=c.range,p=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,Oe){he.setTime(+he+Oe*a)},function(he,Oe){return(Oe-he)/a},function(he){return he.getHours()}),T=p.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,Oe){he.setDate(he.getDate()+Oe)},function(he,Oe){return(Oe-he-(Oe.getTimezoneOffset()-he.getTimezoneOffset())*o)/n},function(he){return he.getDate()-1}),_=l.range;function w(he){return E(function(Oe){Oe.setDate(Oe.getDate()-(Oe.getDay()+7-he)%7),Oe.setHours(0,0,0,0)},function(Oe,tt){Oe.setDate(Oe.getDate()+tt*7)},function(Oe,tt){return(tt-Oe-(tt.getTimezoneOffset()-Oe.getTimezoneOffset())*o)/i})}var A=w(0),M=w(1),g=w(2),b=w(3),d=w(4),u=w(5),y=w(6),f=A.range,R=M.range,L=g.range,z=b.range,F=d.range,N=u.range,O=y.range,P=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,Oe){he.setMonth(he.getMonth()+Oe)},function(he,Oe){return Oe.getMonth()-he.getMonth()+(Oe.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),U=P.range,B=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,Oe){he.setFullYear(he.getFullYear()+Oe)},function(he,Oe){return Oe.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});B.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(Oe){Oe.setFullYear(Math.floor(Oe.getFullYear()/he)*he),Oe.setMonth(0,1),Oe.setHours(0,0,0,0)},function(Oe,tt){Oe.setFullYear(Oe.getFullYear()+tt*he)})};var X=B.range,$=E(function(he){he.setUTCSeconds(0,0)},function(he,Oe){he.setTime(+he+Oe*o)},function(he,Oe){return(Oe-he)/o},function(he){return he.getUTCMinutes()}),se=$.range,le=E(function(he){he.setUTCMinutes(0,0,0)},function(he,Oe){he.setTime(+he+Oe*a)},function(he,Oe){return(Oe-he)/a},function(he){return he.getUTCHours()}),fe=le.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCDate(he.getUTCDate()+Oe)},function(he,Oe){return(Oe-he)/n},function(he){return he.getUTCDate()-1}),Y=V.range;function ee(he){return E(function(Oe){Oe.setUTCDate(Oe.getUTCDate()-(Oe.getUTCDay()+7-he)%7),Oe.setUTCHours(0,0,0,0)},function(Oe,tt){Oe.setUTCDate(Oe.getUTCDate()+tt*7)},function(Oe,tt){return(tt-Oe)/i})}var q=ee(0),oe=ee(1),ae=ee(2),j=ee(3),Q=ee(4),re=ee(5),ce=ee(6),be=q.range,Ae=oe.range,De=ae.range,ze=j.range,Ze=Q.range,at=re.range,nt=ce.range,rt=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCMonth(he.getUTCMonth()+Oe)},function(he,Oe){return Oe.getUTCMonth()-he.getUTCMonth()+(Oe.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),st=rt.range,Me=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCFullYear(he.getUTCFullYear()+Oe)},function(he,Oe){return Oe.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Me.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(Oe){Oe.setUTCFullYear(Math.floor(Oe.getUTCFullYear()/he)*he),Oe.setUTCMonth(0,1),Oe.setUTCHours(0,0,0,0)},function(Oe,tt){Oe.setUTCFullYear(Oe.getUTCFullYear()+tt*he)})};var ye=Me.range;v.timeDay=l,v.timeDays=_,v.timeFriday=u,v.timeFridays=N,v.timeHour=p,v.timeHours=T,v.timeInterval=E,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=c,v.timeMinutes=m,v.timeMonday=M,v.timeMondays=R,v.timeMonth=P,v.timeMonths=U,v.timeSaturday=y,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=f,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=g,v.timeTuesdays=L,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=f,v.timeYear=B,v.timeYears=X,v.utcDay=V,v.utcDays=Y,v.utcFriday=re,v.utcFridays=at,v.utcHour=le,v.utcHours=fe,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=se,v.utcMonday=oe,v.utcMondays=Ae,v.utcMonth=rt,v.utcMonths=st,v.utcSaturday=ce,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=q,v.utcSundays=be,v.utcThursday=Q,v.utcThursdays=Ze,v.utcTuesday=ae,v.utcTuesdays=De,v.utcWednesday=j,v.utcWednesdays=ze,v.utcWeek=q,v.utcWeeks=be,v.utcYear=Me,v.utcYears=ye,Object.defineProperty(v,"__esModule",{value:!0})})}}),Xv=Xe({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,dd()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,x){"use strict";function S(Ne){if(0<=Ne.y&&Ne.y<100){var Ke=new Date(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L);return Ke.setFullYear(Ne.y),Ke}return new Date(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L)}function E(Ne){if(0<=Ne.y&&Ne.y<100){var Ke=new Date(Date.UTC(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L));return Ke.setUTCFullYear(Ne.y),Ke}return new Date(Date.UTC(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L))}function e(Ne,Ke,Te){return{y:Ne,m:Ke,d:Te,H:0,M:0,S:0,L:0}}function t(Ne){var Ke=Ne.dateTime,Te=Ne.date,Ie=Ne.time,Ve=Ne.periods,Ce=Ne.days,Ee=Ne.shortDays,Pe=Ne.months,ft=Ne.shortMonths,ct=h(Ve),_t=c(Ve),Ct=h(Ce),ir=c(Ce),rr=h(Ee),er=c(Ee),Lr=h(Pe),fa=c(Pe),Da=h(ft),Ia=c(ft),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:P,e:P,f:se,H:U,I:B,j:X,L:$,m:le,M:fe,p:Ra,q:tn,Q:It,s:qt,S:V,u:Y,U:ee,V:q,w:oe,W:ae,x:null,X:null,y:j,Y:Q,Z:re,"%":Pt},Wa={a:on,A:hn,b:Tt,B:ut,c:null,d:ce,e:ce,f:Ze,H:be,I:Ae,j:De,L:ze,m:at,M:nt,p:Br,q:Cr,Q:It,s:qt,S:rt,u:st,U:Me,V:ye,w:he,W:Oe,x:null,X:null,y:tt,Y:ot,Z:Qe,"%":Pt},Ca={a:Yt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:y,I:y,j:u,L,m:b,M:f,p:Ft,q:g,Q:N,s:O,S:R,u:p,U:T,V:l,w:m,W:_,x:ca,X:Ba,y:A,Y:w,Z:M,"%":F};qa.x=hi(Te,qa),qa.X=hi(Ie,qa),qa.c=hi(Ke,qa),Wa.x=hi(Te,Wa),Wa.X=hi(Ie,Wa),Wa.c=hi(Ke,Wa);function hi(xr,Ir){return function(Ur){var Hr=[],xt=-1,Xt=0,vr=xr.length,Or,ba,Pa;for(Ur instanceof Date||(Ur=new Date(+Ur));++xt<vr;)xr.charCodeAt(xt)===37&&(Hr.push(xr.slice(Xt,xt)),(ba=r[Or=xr.charAt(++xt)])!=null?Or=xr.charAt(++xt):ba=Or==="e"?" ":"0",(Pa=Ir[Or])&&(Or=Pa(Ur,ba)),Hr.push(Or),Xt=xt+1);return Hr.push(xr.slice(Xt,xt)),Hr.join("")}}function wi(xr,Ir){return function(Ur){var Hr=e(1900,void 0,1),xt=Kt(Hr,xr,Ur+="",0),Xt,vr;if(xt!=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(Ir&&!("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,Ir,Ur,Hr){for(var xt=0,Xt=Ir.length,vr=Ur.length,Or,ba;xt<Xt;){if(Hr>=vr)return-1;if(Or=Ir.charCodeAt(xt++),Or===37){if(Or=Ir.charAt(xt++),ba=Ca[Or in r?Ir.charAt(xt++):Or],!ba||(Hr=ba(xr,Ur,Hr))<0)return-1}else if(Or!=Ur.charCodeAt(Hr++))return-1}return Hr}function Ft(xr,Ir,Ur){var Hr=ct.exec(Ir.slice(Ur));return Hr?(xr.p=_t[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Yt(xr,Ir,Ur){var Hr=rr.exec(Ir.slice(Ur));return Hr?(xr.w=er[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Jt(xr,Ir,Ur){var Hr=Ct.exec(Ir.slice(Ur));return Hr?(xr.w=ir[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Fr(xr,Ir,Ur){var Hr=Da.exec(Ir.slice(Ur));return Hr?(xr.m=Ia[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ta(xr,Ir,Ur){var Hr=Lr.exec(Ir.slice(Ur));return Hr?(xr.m=fa[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ra(xr,Ir,Ur){return Kt(xr,Ke,Ir,Ur)}function ca(xr,Ir,Ur){return Kt(xr,Te,Ir,Ur)}function Ba(xr,Ir,Ur){return Kt(xr,Ie,Ir,Ur)}function $a(xr){return Ee[xr.getDay()]}function Za(xr){return Ce[xr.getDay()]}function ri(xr){return ft[xr.getMonth()]}function pi(xr){return Pe[xr.getMonth()]}function Ra(xr){return Ve[+(xr.getHours()>=12)]}function tn(xr){return 1+~~(xr.getMonth()/3)}function on(xr){return Ee[xr.getUTCDay()]}function hn(xr){return Ce[xr.getUTCDay()]}function Tt(xr){return ft[xr.getUTCMonth()]}function ut(xr){return Pe[xr.getUTCMonth()]}function Br(xr){return Ve[+(xr.getUTCHours()>=12)]}function Cr(xr){return 1+~~(xr.getUTCMonth()/3)}return{format:function(xr){var Ir=hi(xr+="",qa);return Ir.toString=function(){return xr},Ir},parse:function(xr){var Ir=wi(xr+="",!1);return Ir.toString=function(){return xr},Ir},utcFormat:function(xr){var Ir=hi(xr+="",Wa);return Ir.toString=function(){return xr},Ir},utcParse:function(xr){var Ir=wi(xr+="",!0);return Ir.toString=function(){return xr},Ir}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Ne,Ke,Te){var Ie=Ne<0?"-":"",Ve=(Ie?-Ne:Ne)+"",Ce=Ve.length;return Ie+(Ce<Te?new Array(Te-Ce+1).join(Ke)+Ve:Ve)}function s(Ne){return Ne.replace(n,"\\$&")}function h(Ne){return new RegExp("^(?:"+Ne.map(s).join("|")+")","i")}function c(Ne){for(var Ke={},Te=-1,Ie=Ne.length;++Te<Ie;)Ke[Ne[Te].toLowerCase()]=Te;return Ke}function m(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+1));return Ie?(Ne.w=+Ie[0],Te+Ie[0].length):-1}function p(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+1));return Ie?(Ne.u=+Ie[0],Te+Ie[0].length):-1}function T(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.U=+Ie[0],Te+Ie[0].length):-1}function l(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.V=+Ie[0],Te+Ie[0].length):-1}function _(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.W=+Ie[0],Te+Ie[0].length):-1}function w(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+4));return Ie?(Ne.y=+Ie[0],Te+Ie[0].length):-1}function A(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.y=+Ie[0]+(+Ie[0]>68?1900:2e3),Te+Ie[0].length):-1}function M(Ne,Ke,Te){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ke.slice(Te,Te+6));return Ie?(Ne.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Te+Ie[0].length):-1}function g(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+1));return Ie?(Ne.q=Ie[0]*3-3,Te+Ie[0].length):-1}function b(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.m=Ie[0]-1,Te+Ie[0].length):-1}function d(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.d=+Ie[0],Te+Ie[0].length):-1}function u(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+3));return Ie?(Ne.m=0,Ne.d=+Ie[0],Te+Ie[0].length):-1}function y(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.H=+Ie[0],Te+Ie[0].length):-1}function f(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.M=+Ie[0],Te+Ie[0].length):-1}function R(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.S=+Ie[0],Te+Ie[0].length):-1}function L(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+3));return Ie?(Ne.L=+Ie[0],Te+Ie[0].length):-1}function z(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+6));return Ie?(Ne.L=Math.floor(Ie[0]/1e3),Te+Ie[0].length):-1}function F(Ne,Ke,Te){var Ie=a.exec(Ke.slice(Te,Te+1));return Ie?Te+Ie[0].length:-1}function N(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te));return Ie?(Ne.Q=+Ie[0],Te+Ie[0].length):-1}function O(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te));return Ie?(Ne.s=+Ie[0],Te+Ie[0].length):-1}function P(Ne,Ke){return i(Ne.getDate(),Ke,2)}function U(Ne,Ke){return i(Ne.getHours(),Ke,2)}function B(Ne,Ke){return i(Ne.getHours()%12||12,Ke,2)}function X(Ne,Ke){return i(1+x.timeDay.count(x.timeYear(Ne),Ne),Ke,3)}function $(Ne,Ke){return i(Ne.getMilliseconds(),Ke,3)}function se(Ne,Ke){return $(Ne,Ke)+"000"}function le(Ne,Ke){return i(Ne.getMonth()+1,Ke,2)}function fe(Ne,Ke){return i(Ne.getMinutes(),Ke,2)}function V(Ne,Ke){return i(Ne.getSeconds(),Ke,2)}function Y(Ne){var Ke=Ne.getDay();return Ke===0?7:Ke}function ee(Ne,Ke){return i(x.timeSunday.count(x.timeYear(Ne)-1,Ne),Ke,2)}function q(Ne,Ke){var Te=Ne.getDay();return Ne=Te>=4||Te===0?x.timeThursday(Ne):x.timeThursday.ceil(Ne),i(x.timeThursday.count(x.timeYear(Ne),Ne)+(x.timeYear(Ne).getDay()===4),Ke,2)}function oe(Ne){return Ne.getDay()}function ae(Ne,Ke){return i(x.timeMonday.count(x.timeYear(Ne)-1,Ne),Ke,2)}function j(Ne,Ke){return i(Ne.getFullYear()%100,Ke,2)}function Q(Ne,Ke){return i(Ne.getFullYear()%1e4,Ke,4)}function re(Ne){var Ke=Ne.getTimezoneOffset();return(Ke>0?"-":(Ke*=-1,"+"))+i(Ke/60|0,"0",2)+i(Ke%60,"0",2)}function ce(Ne,Ke){return i(Ne.getUTCDate(),Ke,2)}function be(Ne,Ke){return i(Ne.getUTCHours(),Ke,2)}function Ae(Ne,Ke){return i(Ne.getUTCHours()%12||12,Ke,2)}function De(Ne,Ke){return i(1+x.utcDay.count(x.utcYear(Ne),Ne),Ke,3)}function ze(Ne,Ke){return i(Ne.getUTCMilliseconds(),Ke,3)}function Ze(Ne,Ke){return ze(Ne,Ke)+"000"}function at(Ne,Ke){return i(Ne.getUTCMonth()+1,Ke,2)}function nt(Ne,Ke){return i(Ne.getUTCMinutes(),Ke,2)}function rt(Ne,Ke){return i(Ne.getUTCSeconds(),Ke,2)}function st(Ne){var Ke=Ne.getUTCDay();return Ke===0?7:Ke}function Me(Ne,Ke){return i(x.utcSunday.count(x.utcYear(Ne)-1,Ne),Ke,2)}function ye(Ne,Ke){var Te=Ne.getUTCDay();return Ne=Te>=4||Te===0?x.utcThursday(Ne):x.utcThursday.ceil(Ne),i(x.utcThursday.count(x.utcYear(Ne),Ne)+(x.utcYear(Ne).getUTCDay()===4),Ke,2)}function he(Ne){return Ne.getUTCDay()}function Oe(Ne,Ke){return i(x.utcMonday.count(x.utcYear(Ne)-1,Ne),Ke,2)}function tt(Ne,Ke){return i(Ne.getUTCFullYear()%100,Ke,2)}function ot(Ne,Ke){return i(Ne.getUTCFullYear()%1e4,Ke,4)}function Qe(){return"+0000"}function Pt(){return"%"}function It(Ne){return+Ne}function qt(Ne){return Math.floor(+Ne/1e3)}var Wt;kr({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 kr(Ne){return Wt=t(Ne),v.timeFormat=Wt.format,v.timeParse=Wt.parse,v.utcFormat=Wt.utcFormat,v.utcParse=Wt.utcParse,Wt}var mr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Ne){return Ne.toISOString()}var Sr=Date.prototype.toISOString?qr:v.utcFormat(mr);function Rr(Ne){var Ke=new Date(Ne);return isNaN(Ke)?null:Ke}var wt=+new Date("2000-01-01T00:00:00.000Z")?Rr:v.utcParse(mr);v.isoFormat=Sr,v.isoParse=wt,v.timeFormatDefaultLocale=kr,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=Xe({"node_modules/d3-format/dist/d3-format.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=typeof globalThis<"u"?globalThis:v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,d){if((u=(b=d?b.toExponential(d-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,d){return function(u,y){for(var f=u.length,R=[],L=0,z=b[0],F=0;f>0&&z>0&&(F+z+1>y&&(z=Math.max(1,y-F)),R.push(u.substring(f-=z,f+z)),!((F+=z+1)>y));)z=b[L=(L+1)%b.length];return R.reverse().join(d)}}function t(b){return function(d){return d.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(d=r.exec(b)))throw new Error("invalid format: "+b);var d;return new a({fill:d[1],align:d[2],sign:d[3],symbol:d[4],zero:d[5],width:d[6],comma:d[7],precision:d[8]&&d[8].slice(1),trim:d[9],type:d[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 d=b.length,u=1,y=-1,f;u<d;++u)switch(b[u]){case".":y=f=u;break;case"0":y===0&&(y=u),f=u;break;default:if(!+b[u])break e;y>0&&(y=0);break}return y>0?b.slice(0,y)+b.slice(f+1):b}var i;function s(b,d){var u=S(b,d);if(!u)return b+"";var y=u[0],f=u[1],R=f-(i=Math.max(-8,Math.min(8,Math.floor(f/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,d+R-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var y=u[0],f=u[1];return f<0?"0."+new Array(-f).join("0")+y:y.length>f+1?y.slice(0,f+1)+"."+y.slice(f+1):y+new Array(f-y.length+2).join("0")}var c={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:x,e:function(b,d){return b.toExponential(d)},f:function(b,d){return b.toFixed(d)},g:function(b,d){return b.toPrecision(d)},o:function(b){return Math.round(b).toString(8)},p:function(b,d){return h(b*100,d)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function m(b){return b}var p=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var d=b.grouping===void 0||b.thousands===void 0?m:e(p.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",y=b.currency===void 0?"":b.currency[1]+"",f=b.decimal===void 0?".":b.decimal+"",R=b.numerals===void 0?m:t(p.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,se=P.zero,le=P.width,fe=P.comma,V=P.precision,Y=P.trim,ee=P.type;ee==="n"?(fe=!0,ee="g"):c[ee]||(V===void 0&&(V=12),Y=!0,ee="g"),(se||U==="0"&&B==="=")&&(se=!0,U="0",B="=");var q=$==="$"?u:$==="#"&&/[boxX]/.test(ee)?"0"+ee.toLowerCase():"",oe=$==="$"?y:/[%p]/.test(ee)?L:"",ae=c[ee],j=/[defgprs%]/.test(ee);V=V===void 0?6:/[gprs]/.test(ee)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function Q(re){var ce=q,be=oe,Ae,De,ze;if(ee==="c")be=ae(re)+be,re="";else{re=+re;var Ze=re<0||1/re<0;if(re=isNaN(re)?F:ae(Math.abs(re),V),Y&&(re=n(re)),Ze&&+re==0&&X!=="+"&&(Ze=!1),ce=(Ze?X==="("?X:z:X==="-"||X==="("?"":X)+ce,be=(ee==="s"?T[8+i/3]:"")+be+(Ze&&X==="("?")":""),j){for(Ae=-1,De=re.length;++Ae<De;)if(ze=re.charCodeAt(Ae),48>ze||ze>57){be=(ze===46?f+re.slice(Ae+1):re.slice(Ae))+be,re=re.slice(0,Ae);break}}}fe&&!se&&(re=d(re,1/0));var at=ce.length+re.length+be.length,nt=at<le?new Array(le-at+1).join(U):"";switch(fe&&se&&(re=d(nt+re,nt.length?le-be.length:1/0),nt=""),B){case"<":re=ce+re+be+nt;break;case"=":re=ce+nt+re+be;break;case"^":re=nt.slice(0,at=nt.length>>1)+ce+re+be+nt.slice(at);break;default:re=nt+ce+re+be;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),se=T[8+X/3];return function(le){return B($*le)+se}}return{format:N,formatPrefix:O}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return _=l(b),v.format=_.format,v.formatPrefix=_.formatPrefix,_}function A(b){return Math.max(0,-E(Math.abs(b)))}function M(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(d)/3)))*3-E(Math.abs(b)))}function g(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,E(d)-E(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=M,v.precisionRound=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=Xe({"node_modules/is-string-blank/index.js"(Z,G){"use strict";G.exports=function(v){for(var x=v.length,S,E=0;E<x;E++)if(S=v.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}}}),rs=Xe({"node_modules/fast-isnumeric/index.js"(Z,G){"use strict";var v=l7();G.exports=function(x){var S=typeof x;if(S==="string"){var E=x;if(x=+x,x===0&&v(E))return!1}else if(S!=="number")return!1;return x-x<1}}}),Hs=Xe({"src/constants/numerical.js"(Z,G){"use strict";G.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=Xe({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=typeof globalThis<"u"?globalThis:v||self,x(v["base64-arraybuffer"]={}))})(Z,function(v){"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,c,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var p=new ArrayBuffer(o),T=new Uint8Array(p);for(n=0;n<a;n+=4)s=S[r.charCodeAt(n)],h=S[r.charCodeAt(n+1)],c=S[r.charCodeAt(n+2)],m=S[r.charCodeAt(n+3)],T[i++]=s<<2|h>>4,T[i++]=(h&15)<<4|c>>2,T[i++]=(c&3)<<6|m&63;return p};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=Xe({"src/lib/is_plain_object.js"(Z,G){"use strict";G.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=Xe({"src/lib/array.js"(Z){"use strict";var G=KA().decode,v=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=[],c=n(s),m=c.dtype,p=o[m];if(!p)throw new Error('Error in dtype: "'+m+'"');var T=p.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var _=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");_.reverse();var w=_.length,A,M,g=+_[0],b=T*g,d=0;if(w===1)h=new p(l);else if(w===2)for(A=+_[1],M=0;M<A;M++)h[M]=new p(l,d,g),d+=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 p(l,d,g),d+=b}else throw new Error("ndim: "+w+'is not supported with the shape:"'+c.shape+'"');return h.bdata=c.bdata,h.dtype=c.dtype,h.shape=_.reverse().join(","),s._inputArray=h,h},Z.isTypedArraySpec=function(s){return v(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,c=0,m,p,T,l,_,w,A,M;for(T=0;T<arguments.length;T++)l=arguments[T],w=l.length,w&&(p?s.push(l):(p=l,_=w),x(l)?m=!1:(h=!1,c?m!==l.constructor&&(m=!1):m=l.constructor),c+=w);if(!c)return[];if(!s.length)return p;if(h)return p.concat.apply(p,s);if(m){for(A=new m(c),A.set(p),T=0;T<s.length;T++)l=s[T],A.set(l,_),_+=l.length;return A}for(A=new Array(c),M=0;M<p.length;M++)A[M]=p[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,c){if(t(s))if(t(s[0])){for(var m=c,p=0;p<s.length;p++)m=h(m,s[p].length);return m}else return s.length;return 0}}}),b_=Xe({"src/lib/nested_property.js"(Z,G){"use strict";var v=rs(),x=bp().isArrayOrTypedArray;G.exports=function(s,h){if(v(h))h=String(h);else if(typeof h!="string"||h.slice(-4)==="[-1]")throw"bad property string";var c=h.split("."),m,p,T,l;for(l=0;l<c.length;l++)if(String(c[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<c.length;){if(m=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),m){if(m[1])c[l]=m[1];else if(l===0)c.splice(0,1);else throw"bad property string";for(p=m[2].slice(1,-1).split("]["),T=0;T<p.length;T++)l++,c.splice(l,0,Number(p[T]))}l++}return typeof s!="object"?n(s,h,c):{set:t(s,c,h),get:S(s,c),astr:h,parts:c,obj:s}};function S(i,s){return function(h){var c=i,m,p,T,l,_;for(l=0;l<s.length-1;l++){if(m=s[l],m===-1){for(p=!0,T=[],_=0;_<c.length;_++)T[_]=S(c[_],s.slice(l+1))(h),T[_]!==T[0]&&(p=!1);return p?T[0]:T}if(typeof m=="number"&&!x(c)||(c=c[m],typeof c!="object"||c===null))return}if(!(typeof c!="object"||c===null)&&(T=c[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(c){var m=i,p="",T=[[i,p]],l=e(c,h),_,w;for(w=0;w<s.length-1;w++){if(_=s[w],typeof _=="number"&&!x(m))throw"array index but container is not an array";if(_===-1){if(l=!o(m,s.slice(w+1),c,h),l)break;return}if(!a(m,_,s[w+1],l))break;if(m=m[_],typeof m!="object"||m===null)throw"container is not an object";p=r(p,_),T.push([m,p])}if(l){if(w===s.length-1&&(delete m[s[w]],Array.isArray(m)&&+s[w]===m.length-1))for(;m.length&&m[m.length-1]===void 0;)m.pop()}else m[s[w]]=c}}function r(i,s){var h=s;return v(s)?h="["+s+"]":i&&(h="."+s),i+h}function o(i,s,h,c){var m=x(h),p=!0,T=h,l=c.replace("-1",0),_=m?!1:e(h,l),w=s[0],A;for(A=0;A<i.length;A++)l=c.replace("-1",A),m&&(T=h[A%h.length],_=e(T,l)),_&&(p=!1),a(i,A,w,_)&&t(i[A],s,c.replace("-1",A))(T);return p}function a(i,s,h,c){if(i[s]===void 0){if(c)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=Xe({"src/lib/keyed_container.js"(Z,G){"use strict";var v=b_(),x=/^\w*$/,S=0,E=1,e=2,t=3,r=4;G.exports=function(a,n,i,s){i=i||"name",s=s||"value";var h,c,m,p={};n&&n.length?(m=v(a,n),c=m.get()):c=a,n=n||"";var T={};if(c)for(h=0;h<c.length;h++)T[c[h][i]]=h;var l=x.test(s),_={set:function(w,A){var M=A===null?r:S;if(!c){if(!m||M===r)return;c=[],m.set(c)}var g=T[w];if(g===void 0){if(M===r)return;M=M|t,g=c.length,T[w]=g}else A!==(l?c[g][s]:v(c[g],s).get())&&(M=M|e);var b=c[g]=c[g]||{};return b[i]=w,l?b[s]=A:v(b,s).set(A),A!==null&&(M=M&~r),p[g]=p[g]|M,_},get:function(w){if(c){var A=T[w];if(A!==void 0)return l?c[A][s]:v(c[A],s).get()}},rename:function(w,A){var M=T[w];return M===void 0||(p[M]=p[M]|E,T[A]=M,delete T[w],c[M][i]=A),_},remove:function(w){var A=T[w];if(A===void 0)return _;var M=c[A];if(Object.keys(M).length>2)return p[A]=p[A]|e,_.set(w,null);if(l){for(h=A;h<c.length;h++)p[h]=p[h]|t;for(h=A;h<c.length;h++)T[c[h][i]]--;c.splice(A,1),delete T[w]}else v(M,s).set(null),p[A]=p[A]|e|r;return _},constructUpdate:function(){for(var w,A,M={},g=Object.keys(p),b=0;b<g.length;b++)A=g[b],w=n+"["+A+"]",c[A]?(p[A]&E&&(M[w+"."+i]=c[A][i]),p[A]&e&&(l?M[w+"."+s]=p[A]&r?null:c[A][s]:M[w+"."+s]=p[A]&r?null:v(c[A],s).get())):M[w]=null;return M}};return _}}}),c7=Xe({"src/lib/relative_attr.js"(Z,G){"use strict";var v=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,x=/^[^\.\[\]]+$/;G.exports=function(S,E){for(;E;){var e=S.match(v);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=Xe({"src/lib/to_log_range.js"(Z,G){"use strict";var v=rs();G.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 v(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),f7=Xe({"src/lib/relink_private.js"(Z,G){"use strict";var v=bp().isArrayOrTypedArray,x=Zv();G.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(v(r)&&v(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=Xe({"src/lib/mod.js"(Z,G){"use strict";function v(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}G.exports={mod:v,modHalf:x}}}),Ch=Xe({"node_modules/tinycolor2/tinycolor.js"(Z,G){(function(v){var x=/^\s+/,S=/\s+$/,E=0,e=v.round,t=v.min,r=v.max,o=v.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,ce,be,Ae,De;return Q=j.r/255,re=j.g/255,ce=j.b/255,Q<=.03928?be=Q/12.92:be=v.pow((Q+.055)/1.055,2.4),re<=.03928?Ae=re/12.92:Ae=v.pow((re+.055)/1.055,2.4),ce<=.03928?De=ce/12.92:De=v.pow((ce+.055)/1.055,2.4),.2126*be+.7152*Ae+.0722*De},setAlpha:function(j){return this._a=P(j),this._roundA=e(100*this._a)/100,this},toHsv:function(){var j=c(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=c(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),ce=e(j.v*100);return this._a==1?"hsv("+Q+", "+re+"%, "+ce+"%)":"hsva("+Q+", "+re+"%, "+ce+"%, "+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),ce=e(j.l*100);return this._a==1?"hsl("+Q+", "+re+"%, "+ce+"%)":"hsla("+Q+", "+re+"%, "+ce+"%, "+this._roundA+")"},toHex:function(j){return p(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[p(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var Q="#"+l(this._r,this._g,this._b,this._a),re=Q,ce=this._gradientType?"GradientType = 1, ":"";if(j){var be=a(j);re="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+Q+",endColorstr="+re+")"},toString:function(j){var Q=!!j;j=j||this._format;var re=!1,ce=this._a<1&&this._a>=0,be=!Q&&ce&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return be?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(d,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(f,arguments)}},a.fromRatio=function(j,Q){if(typeof j=="object"){var re={};for(var ce in j)j.hasOwnProperty(ce)&&(ce==="a"?re[ce]=j[ce]:re[ce]=fe(j[ce]));j=re}return a(j,Q)};function n(j){var Q={r:0,g:0,b:0},re=1,ce=null,be=null,Ae=null,De=!1,ze=!1;return typeof j=="string"&&(j=oe(j)),typeof j=="object"&&(q(j.r)&&q(j.g)&&q(j.b)?(Q=i(j.r,j.g,j.b),De=!0,ze=String(j.r).substr(-1)==="%"?"prgb":"rgb"):q(j.h)&&q(j.s)&&q(j.v)?(ce=fe(j.s),be=fe(j.v),Q=m(j.h,ce,be),De=!0,ze="hsv"):q(j.h)&&q(j.s)&&q(j.l)&&(ce=fe(j.s),Ae=fe(j.l),Q=h(j.h,ce,Ae),De=!0,ze="hsl"),j.hasOwnProperty("a")&&(re=j.a)),re=P(re),{ok:De,format:j.format||ze,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 ce=r(j,Q,re),be=t(j,Q,re),Ae,De,ze=(ce+be)/2;if(ce==be)Ae=De=0;else{var Ze=ce-be;switch(De=ze>.5?Ze/(2-ce-be):Ze/(ce+be),ce){case j:Ae=(Q-re)/Ze+(Q<re?6:0);break;case Q:Ae=(re-j)/Ze+2;break;case re:Ae=(j-Q)/Ze+4;break}Ae/=6}return{h:Ae,s:De,l:ze}}function h(j,Q,re){var ce,be,Ae;j=U(j,360),Q=U(Q,100),re=U(re,100);function De(at,nt,rt){return rt<0&&(rt+=1),rt>1&&(rt-=1),rt<1/6?at+(nt-at)*6*rt:rt<1/2?nt:rt<2/3?at+(nt-at)*(2/3-rt)*6:at}if(Q===0)ce=be=Ae=re;else{var ze=re<.5?re*(1+Q):re+Q-re*Q,Ze=2*re-ze;ce=De(Ze,ze,j+1/3),be=De(Ze,ze,j),Ae=De(Ze,ze,j-1/3)}return{r:ce*255,g:be*255,b:Ae*255}}function c(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var ce=r(j,Q,re),be=t(j,Q,re),Ae,De,ze=ce,Ze=ce-be;if(De=ce===0?0:Ze/ce,ce==be)Ae=0;else{switch(ce){case j:Ae=(Q-re)/Ze+(Q<re?6:0);break;case Q:Ae=(re-j)/Ze+2;break;case re:Ae=(j-Q)/Ze+4;break}Ae/=6}return{h:Ae,s:De,v:ze}}function m(j,Q,re){j=U(j,360)*6,Q=U(Q,100),re=U(re,100);var ce=v.floor(j),be=j-ce,Ae=re*(1-Q),De=re*(1-be*Q),ze=re*(1-(1-be)*Q),Ze=ce%6,at=[re,De,Ae,Ae,ze,re][Ze],nt=[ze,re,re,De,Ae,Ae][Ze],rt=[Ae,Ae,ze,re,re,De][Ze];return{r:at*255,g:nt*255,b:rt*255}}function p(j,Q,re,ce){var be=[le(e(j).toString(16)),le(e(Q).toString(16)),le(e(re).toString(16))];return ce&&be[0].charAt(0)==be[0].charAt(1)&&be[1].charAt(0)==be[1].charAt(1)&&be[2].charAt(0)==be[2].charAt(1)?be[0].charAt(0)+be[1].charAt(0)+be[2].charAt(0):be.join("")}function T(j,Q,re,ce,be){var Ae=[le(e(j).toString(16)),le(e(Q).toString(16)),le(e(re).toString(16)),le(V(ce))];return be&&Ae[0].charAt(0)==Ae[0].charAt(1)&&Ae[1].charAt(0)==Ae[1].charAt(1)&&Ae[2].charAt(0)==Ae[2].charAt(1)&&Ae[3].charAt(0)==Ae[3].charAt(1)?Ae[0].charAt(0)+Ae[1].charAt(0)+Ae[2].charAt(0)+Ae[3].charAt(0):Ae.join("")}function l(j,Q,re,ce){var be=[le(V(ce)),le(e(j).toString(16)),le(e(Q).toString(16)),le(e(re).toString(16))];return be.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 d(j,Q){var re=a(j).toHsl(),ce=(re.h+Q)%360;return re.h=ce<0?360+ce:ce,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 f(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 ce=a(j).toHsl(),be=360/re,Ae=[a(j)];for(ce.h=(ce.h-(be*Q>>1)+720)%360;--Q;)ce.h=(ce.h+be)%360,Ae.push(a(ce));return Ae}function z(j,Q){Q=Q||6;for(var re=a(j).toHsv(),ce=re.h,be=re.s,Ae=re.v,De=[],ze=1/Q;Q--;)De.push(a({h:ce,s:be,v:Ae})),Ae=(Ae+ze)%1;return De}a.mix=function(j,Q,re){re=re===0?0:re||50;var ce=a(j).toRgb(),be=a(Q).toRgb(),Ae=re/100,De={r:(be.r-ce.r)*Ae+ce.r,g:(be.g-ce.g)*Ae+ce.g,b:(be.b-ce.b)*Ae+ce.b,a:(be.a-ce.a)*Ae+ce.a};return a(De)},a.readability=function(j,Q){var re=a(j),ce=a(Q);return(v.max(re.getLuminance(),ce.getLuminance())+.05)/(v.min(re.getLuminance(),ce.getLuminance())+.05)},a.isReadable=function(j,Q,re){var ce=a.readability(j,Q),be,Ae;switch(Ae=!1,be=ae(re),be.level+be.size){case"AAsmall":case"AAAlarge":Ae=ce>=4.5;break;case"AAlarge":Ae=ce>=3;break;case"AAAsmall":Ae=ce>=7;break}return Ae},a.mostReadable=function(j,Q,re){var ce=null,be=0,Ae,De,ze,Ze;re=re||{},De=re.includeFallbackColors,ze=re.level,Ze=re.size;for(var at=0;at<Q.length;at++)Ae=a.readability(j,Q[at]),Ae>be&&(be=Ae,ce=a(Q[at]));return a.isReadable(j,ce,{level:ze,size:Ze})||!De?ce:(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=se(j);return j=t(Q,r(0,parseFloat(j))),re&&(j=parseInt(j*Q,10)/100),v.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 se(j){return typeof j=="string"&&j.indexOf("%")!=-1}function le(j){return j.length==1?"0"+j:""+j}function fe(j){return j<=1&&(j=j*100+"%"),j}function V(j){return v.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+")",ce="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",be="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+be),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 oe(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 G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Qo=Xe({"src/lib/extend.js"(Z){"use strict";var G=Zv(),v=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,c,m,p;if(a===2&&v(o)&&v(E[1])&&o.length===0){if(p=x(E[1],o),p)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&&v(h)?o[i]=h:e&&h&&(G(h)||(c=v(h)))?(c?(c=!1,m=s&&v(s)?s:[]):m=s&&G(s)?s:{},o[i]=S([m,h],e,t,r)):(typeof h<"u"||t)&&(o[i]=h)}return o}}}),tc=Xe({"src/plots/font_attributes.js"(Z,G){"use strict";G.exports=function(v){var x=v.variantValues,S=v.editType,E=v.colorEditType;E===void 0&&(E=S);var e={editType:S,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};v.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:v.noFontVariant?void 0:{editType:S,valType:"enumerated",values:x||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:v.noFontTextcase?void 0:{editType:S,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:v.noFontLineposition?void 0:{editType:S,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:v.noFontShadow?void 0:{editType:S,valType:"string",dflt:v.autoShadowDflt?"auto":"none"},editType:S};return v.autoSize&&(t.size.dflt="auto"),v.autoColor&&(t.color.dflt="auto"),v.arrayOk&&(t.family.arrayOk=!0,t.weight.arrayOk=!0,t.style.arrayOk=!0,v.noFontVariant||(t.variant.arrayOk=!0),v.noFontTextcase||(t.textcase.arrayOk=!0),v.noFontLineposition||(t.lineposition.arrayOk=!0),v.noFontShadow||(t.shadow.arrayOk=!0),t.size.arrayOk=!0,t.color.arrayOk=!0),t}}}),w_=Xe({"src/components/fx/constants.js"(Z,G){"use strict";G.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Zm=Xe({"src/components/fx/layout_attributes.js"(Z,G){"use strict";var v=w_(),x=tc(),S=x({editType:"none"});S.family.dflt=v.HOVERFONT,S.size.dflt=v.HOVERFONTSIZE,G.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font: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=Xe({"src/components/fx/attributes.js"(Z,G){"use strict";var v=tc(),x=Zm().hoverlabel,S=Qo().extendFlat;G.exports={hoverlabel:{bgcolor:S({},x.bgcolor,{arrayOk:!0}),bordercolor:S({},x.bordercolor,{arrayOk:!0}),font:v({arrayOk:!0,editType:"none"}),align:S({},x.align,{arrayOk:!0}),namelength:S({},x.namelength,{arrayOk:!0}),showarrow:S({},x.showarrow),editType:"none"}}}}),ru=Xe({"src/plots/attributes.js"(Z,G){"use strict";var v=tc(),x=Ky();G.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:v({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=Xe({"src/components/colorscale/scales.js"(Z,G){"use strict";var v=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||!v(n[1]).isValid())return!1;o=+n[0]}return!0}function t(r){return x[r]!==void 0?!0:e(r)}G.exports={scales:x,defaultScale:S,get:E,isValid:t}}}),sh=Xe({"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}}),$n=Xe({"src/components/color/index.js"(Z,G){"use strict";var v=Ch(),x=rs(),S=bp().isTypedArray,E=G.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(v(a))},E.opacity=function(a){return a?v(a).getAlpha():0},E.addOpacity=function(a,n){var i=v(a).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+n+")"},E.combine=function(a,n){var i=v(a).toRgb();if(i.a===1)return v(a).toRgbString();var s=v(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},c={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 v(c).toRgbString()},E.interpolate=function(a,n,i){var s=v(a).toRgb(),h=v(n).toRgb(),c={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 v(c).toRgbString()},E.contrast=function(a,n,i){var s=v(a);s.getAlpha()!==1&&(s=v(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=v(n);a.style({stroke:E.tinyRGB(i),"stroke-opacity":i.getAlpha()})},E.fill=function(a,n){var i=v(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,c;for(i=0;i<n.length;i++)if(h=n[i],c=a[h],h.slice(-5)==="color")if(Array.isArray(c))for(s=0;s<c.length;s++)c[s]=o(c[s]);else a[h]=o(c);else if(h.slice(-10)==="colorscale"&&Array.isArray(c))for(s=0;s<c.length;s++)Array.isArray(c[s])&&(c[s][1]=o(c[s][1]));else if(Array.isArray(c)){var m=c[0];if(!Array.isArray(m)&&m&&typeof m=="object")for(s=0;s<c.length;s++)E.clean(c[s])}else c&&typeof c=="object"&&!S(c)&&E.clean(c)}};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 c=0;c<s.length;c++){if(!s[c].length||(s[c]=Number(s[c]),!(s[c]>=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=1)return a}var m=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+m+", "+s[3]+")":"rgb("+m+")"}}}),Ym=Xe({"src/constants/interactions.js"(Z,G){"use strict";G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=Xe({"src/lib/regex.js"(Z){"use strict";Z.counter=function(G,v,x,S){var E=(v||"")+(x?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),h7=Xe({"src/lib/coerce.js"(Z){"use strict";var G=rs(),v=Ch(),x=Qo().extendFlat,S=ru(),E=W0(),e=$n(),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(c,m,p){m.set(n(c)?c:i(c)?s(c):p)}},enumerated:{coerceFunction:function(c,m,p,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?m.set(p):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var p=m.values,T=0;T<p.length;T++){var l=String(p[T]);if(l.charAt(0)==="/"&&l.charAt(l.length-1)==="/"){var _=new RegExp(l.slice(1,-1));if(_.test(c))return!0}else if(c===p[T])return!0}return!1}},boolean:{coerceFunction:function(c,m,p,T){let l=_=>_===!0||_===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?m.set(c):m.set(p)}},number:{coerceFunction:function(c,m,p,T){i(c)&&(c=s(c)),!G(c)||T.min!==void 0&&c<T.min||T.max!==void 0&&c>T.max?m.set(p):m.set(+c)}},integer:{coerceFunction:function(c,m,p,T){if((T.extras||[]).indexOf(c)!==-1){m.set(c);return}i(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&c<T.min||T.max!==void 0&&c>T.max?m.set(p):m.set(+c)}},string:{coerceFunction:function(c,m,p,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?m.set(p):m.set(String(c))}else T.noBlank&&!c?m.set(p):m.set(c)}},color:{coerceFunction:function(c,m,p){i(c)&&(c=s(c)),v(c).isValid()?m.set(c):m.set(p)}},colorlist:{coerceFunction:function(c,m,p){function T(l){return v(l).isValid()}!Array.isArray(c)||!c.length?m.set(p):c.every(T)?m.set(c):m.set(p)}},colorscale:{coerceFunction:function(c,m,p){m.set(E.get(c,p))}},angle:{coerceFunction:function(c,m,p){i(c)&&(c=s(c)),c==="auto"?m.set("auto"):G(c)?m.set(a(+c,360)):m.set(p)}},subplotid:{coerceFunction:function(c,m,p,T){var l=T.regex||o(p);let _=w=>typeof w=="string"&&l.test(w);_(c)||T.arrayOk&&n(c)&&c.length>0&&c.every(_)?m.set(c):m.set(p)},validateFunction:function(c,m){var p=m.dflt;return c===p?!0:typeof c!="string"?!1:!!o(p).test(c)}},flaglist:{coerceFunction:function(c,m,p,T){if((T.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(p);return}for(var l=c.split("+"),_=0;_<l.length;){var w=l[_];T.flags.indexOf(w)===-1||l.indexOf(w)<_?l.splice(_,1):_++}l.length?m.set(l.join("+")):m.set(p)}},any:{coerceFunction:function(c,m,p){c===void 0?m.set(p):m.set(i(c)?s(c):c)}},info_array:{coerceFunction:function(c,m,p,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(c)&&(c=s(c)),!n(c)){m.set(p);return}var _=T.dimensions===2||T.dimensions==="1-2"&&Array.isArray(c)&&n(c[0]),w=T.items,A=[],M=Array.isArray(w),g=M&&_&&n(w[0]),b=_&&M&&!g,d=M&&!b?w.length:c.length,u,y,f,R,L,z;if(p=Array.isArray(p)?p:[],_)for(u=0;u<d;u++)for(A[u]=[],f=n(c[u])?c[u]:[],b?L=w.length:M?L=w[u].length:L=f.length,y=0;y<L;y++)b?R=w[y]:M?R=w[u][y]:R=w,z=l(f[y],R,(p[u]||[])[y]),z!==void 0&&(A[u][y]=z);else for(u=0;u<d;u++)z=l(c[u],M?w[u]:w,p[u]),z!==void 0&&(A[u]=z);m.set(A)},validateFunction:function(c,m){if(!n(c))return!1;var p=m.items,T=Array.isArray(p),l=m.dimensions===2;if(!m.freeLength&&c.length!==p.length)return!1;for(var _=0;_<c.length;_++)if(l){if(!n(c[_])||!m.freeLength&&c[_].length!==p[_].length)return!1;for(var w=0;w<c[_].length;w++)if(!h(c[_][w],T?p[_][w]:p))return!1}else if(!h(c[_],T?p[_]:p))return!1;return!0}}},Z.coerce=function(c,m,p,T,l){var _=r(p,T).get(),w=r(c,T),A=r(m,T),M=w.get(),g=m._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 d=A.get();return g&&d===l&&!h(M,_)&&(M=r(g,T).get(),b(M,A,l,_),d=A.get()),d},Z.coerce2=function(c,m,p,T,l){var _=r(c,T),w=Z.coerce(c,m,p,T,l),A=_.get();return A!=null?w:!1},Z.coerceFont=function(c,m,p,T){T||(T={}),p=x({},p),p=x(p,T.overrideDflt||{});var l={family:c(m+".family",p.family),size:c(m+".size",p.size),color:c(m+".color",p.color),weight:c(m+".weight",p.weight),style:c(m+".style",p.style)};if(T.noFontVariant||(l.variant=c(m+".variant",p.variant)),T.noFontLineposition||(l.lineposition=c(m+".lineposition",p.lineposition)),T.noFontTextcase||(l.textcase=c(m+".textcase",p.textcase)),!T.noFontShadow){var _=p.shadow;_==="none"&&T.autoShadowDflt&&(_="auto"),l.shadow=c(m+".shadow",_)}return l},Z.coercePattern=function(c,m,p,T){var l=c(m+".shape"),_;if(l||(_=c(m+".path")),l||_){l&&c(m+".solidity"),c(m+".size");var w=c(m+".fillmode"),A=w==="overlay";if(!T){var M=c(m+".bgcolor",A?p:void 0);c(m+".fgcolor",A?e.contrast(M):p)}c(m+".fgopacity",A?.5:1)}},Z.coerceHoverinfo=function(c,m,p){var T=m._module.attributes,l=T.hoverinfo?T:S,_=l.hoverinfo,w;if(p._dataLength===1){var A=_.dflt==="all"?_.flags.slice():_.dflt.split("+");A.splice(A.indexOf("name"),1),w=A.join("+")}return Z.coerce(c,m,l,"hoverinfo",w)},Z.coerceSelectionMarkerOpacity=function(c,m){if(c.marker){var p=c.marker.opacity;if(p!==void 0){var T,l;!n(p)&&!c.selected&&!c.unselected&&(T=p,l=t*p),m("selected.marker.opacity",T),m("unselected.marker.opacity",l)}}};function h(c,m){var p=Z.valObjectMeta[m.valType];if(m.arrayOk&&n(c))return!0;if(p.validateFunction)return p.validateFunction(c,m);var T={},l=T,_={set:function(w){l=w}};return p.coerceFunction(c,_,T,m),l!==T}Z.validate=h}}),X0=Xe({"src/plot_api/plot_config.js"(Z,G){"use strict";var v={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},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(v,x),G.exports={configAttributes:v,dfltConfig:x}}}),JA=Xe({"src/lib/notifier.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=[];G.exports=function(E,e){if(S.indexOf(E)!==-1)return;S.push(E);var t=1e3;x(e)?t=e:e==="long"&&(t=3e3);var r=v.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var o=r.selectAll(".notifier-note").data(S);function a(n){n.duration(700).style("opacity",0).each("end",function(i){var s=S.indexOf(i);s!==-1&&S.splice(s,1),v.select(this).remove()})}o.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(n){var i=v.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){i.transition().call(a)});for(var s=i.append("p"),h=n.split(/<br\s*\/?>/g),c=0;c<h.length;c++)c&&s.append("br"),s.append("span").text(h[c]);e==="stick"?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(t).call(a)})}}}),Km=Xe({"src/lib/loggers.js"(Z,G){"use strict";var v=X0().dfltConfig,x=JA(),S=G.exports={};S.log=function(){var E;if(v.logging>1){var e=["LOG:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(v.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(v.logging>0){var e=["WARN:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(v.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(v.logging>0){var e=["ERROR:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.error.apply(console,e)}if(v.notifyOnLogging>0){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);x(t.join("<br>"),"stick")}}}}),p2=Xe({"src/lib/noop.js"(Z,G){"use strict";G.exports=function(){}}}),$A=Xe({"src/lib/push_unique.js"(Z,G){"use strict";G.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=Xe({"node_modules/gl-mat4/create.js"(Z,G){G.exports=v;function v(){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=Xe({"node_modules/gl-mat4/clone.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/copy.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/identity.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/transpose.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/invert.js"(Z,G){G.exports=v;function v(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],c=S[10],m=S[11],p=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,d=t*i-r*n,u=s*T-h*p,y=s*l-c*p,f=s*_-m*p,R=h*l-c*T,L=h*_-m*T,z=c*_-m*l,F=w*z-A*L+M*R+g*f-b*y+d*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*d-l*b+_*g)*F,x[3]=(c*b-h*d-m*g)*F,x[4]=(n*f-o*z-i*y)*F,x[5]=(E*z-t*f+r*y)*F,x[6]=(l*M-p*d-_*A)*F,x[7]=(s*d-c*M+m*A)*F,x[8]=(o*L-a*f+i*u)*F,x[9]=(e*f-E*L-r*u)*F,x[10]=(p*b-T*M+_*w)*F,x[11]=(h*M-s*b-m*w)*F,x[12]=(a*y-o*R-n*u)*F,x[13]=(E*R-e*y+t*u)*F,x[14]=(T*A-p*g-l*w)*F,x[15]=(s*g-h*A+c*w)*F,x):null}}}),y7=Xe({"node_modules/gl-mat4/adjoint.js"(Z,G){G.exports=v;function v(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],c=S[10],m=S[11],p=S[12],T=S[13],l=S[14],_=S[15];return x[0]=a*(c*_-m*l)-h*(n*_-i*l)+T*(n*m-i*c),x[1]=-(e*(c*_-m*l)-h*(t*_-r*l)+T*(t*m-r*c)),x[2]=e*(n*_-i*l)-a*(t*_-r*l)+T*(t*i-r*n),x[3]=-(e*(n*m-i*c)-a*(t*m-r*c)+h*(t*i-r*n)),x[4]=-(o*(c*_-m*l)-s*(n*_-i*l)+p*(n*m-i*c)),x[5]=E*(c*_-m*l)-s*(t*_-r*l)+p*(t*m-r*c),x[6]=-(E*(n*_-i*l)-o*(t*_-r*l)+p*(t*i-r*n)),x[7]=E*(n*m-i*c)-o*(t*m-r*c)+s*(t*i-r*n),x[8]=o*(h*_-m*T)-s*(a*_-i*T)+p*(a*m-i*h),x[9]=-(E*(h*_-m*T)-s*(e*_-r*T)+p*(e*m-r*h)),x[10]=E*(a*_-i*T)-o*(e*_-r*T)+p*(e*i-r*a),x[11]=-(E*(a*m-i*h)-o*(e*m-r*h)+s*(e*i-r*a)),x[12]=-(o*(h*l-c*T)-s*(a*l-n*T)+p*(a*c-n*h)),x[13]=E*(h*l-c*T)-s*(e*l-t*T)+p*(e*c-t*h),x[14]=-(E*(a*l-n*T)-o*(e*l-t*T)+p*(e*n-t*a)),x[15]=E*(a*c-n*h)-o*(e*c-t*h)+s*(e*n-t*a),x}}}),_7=Xe({"node_modules/gl-mat4/determinant.js"(Z,G){G.exports=v;function v(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],c=x[11],m=x[12],p=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,d=i*p-s*m,u=i*T-h*m,y=i*l-c*m,f=s*T-h*p,R=s*l-c*p,L=h*l-c*T;return _*L-w*R+A*f+M*y-g*u+b*d}}}),x7=Xe({"node_modules/gl-mat4/multiply.js"(Z,G){G.exports=v;function v(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],c=S[9],m=S[10],p=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*c+b*l,x[2]=A*r+M*i+g*m+b*_,x[3]=A*o+M*s+g*p+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*c+b*l,x[6]=A*r+M*i+g*m+b*_,x[7]=A*o+M*s+g*p+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*c+b*l,x[10]=A*r+M*i+g*m+b*_,x[11]=A*o+M*s+g*p+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*c+b*l,x[14]=A*r+M*i+g*m+b*_,x[15]=A*o+M*s+g*p+b*w,x}}}),b7=Xe({"node_modules/gl-mat4/translate.js"(Z,G){G.exports=v;function v(x,S,E){var e=E[0],t=E[1],r=E[2],o,a,n,i,s,h,c,m,p,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],c=S[6],m=S[7],p=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]=c,x[7]=m,x[8]=p,x[9]=T,x[10]=l,x[11]=_,x[12]=o*e+s*t+p*r+S[12],x[13]=a*e+h*t+T*r+S[13],x[14]=n*e+c*t+l*r+S[14],x[15]=i*e+m*t+_*r+S[15]),x}}}),w7=Xe({"node_modules/gl-mat4/scale.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/rotate.js"(Z,G){G.exports=v;function v(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,c,m,p,T,l,_,w,A,M,g,b,d,u,y,f,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],c=S[1],m=S[2],p=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],d=t*t*s+i,u=r*t*s+o*n,y=o*t*s-r*n,f=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*d+T*u+A*y,x[1]=c*d+l*u+M*y,x[2]=m*d+_*u+g*y,x[3]=p*d+w*u+b*y,x[4]=h*f+T*R+A*L,x[5]=c*f+l*R+M*L,x[6]=m*f+_*R+g*L,x[7]=p*f+w*R+b*L,x[8]=h*z+T*F+A*N,x[9]=c*z+l*F+M*N,x[10]=m*z+_*F+g*N,x[11]=p*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=Xe({"node_modules/gl-mat4/rotateX.js"(Z,G){G.exports=v;function v(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],c=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+c*e,x[8]=i*t-r*e,x[9]=s*t-o*e,x[10]=h*t-a*e,x[11]=c*t-n*e,x}}}),S7=Xe({"node_modules/gl-mat4/rotateY.js"(Z,G){G.exports=v;function v(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],c=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-c*e,x[8]=r*e+i*t,x[9]=o*e+s*t,x[10]=a*e+h*t,x[11]=n*e+c*t,x}}}),M7=Xe({"node_modules/gl-mat4/rotateZ.js"(Z,G){G.exports=v;function v(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],c=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+c*e,x[4]=i*t-r*e,x[5]=s*t-o*e,x[6]=h*t-a*e,x[7]=c*t-n*e,x}}}),E7=Xe({"node_modules/gl-mat4/fromRotation.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,G){G.exports=v;function v(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,c=e*i,m=t*n,p=t*i,T=r*i,l=o*a,_=o*n,w=o*i;return x[0]=1-(m+T),x[1]=h+w,x[2]=c-_,x[3]=0,x[4]=h-w,x[5]=1-(s+T),x[6]=p+l,x[7]=0,x[8]=c+_,x[9]=p-l,x[10]=1-(s+m),x[11]=0,x[12]=E[0],x[13]=E[1],x[14]=E[2],x[15]=1,x}}}),C7=Xe({"node_modules/gl-mat4/fromScaling.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromTranslation.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromXRotation.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromYRotation.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromZRotation.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/fromQuat.js"(Z,G){G.exports=v;function v(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,c=t*o,m=t*a,p=t*n,T=r*o,l=r*a,_=r*n;return x[0]=1-h-p,x[1]=s+_,x[2]=c-l,x[3]=0,x[4]=s-_,x[5]=1-i-p,x[6]=m+T,x[7]=0,x[8]=c+l,x[9]=m-T,x[10]=1-i-h,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),z7=Xe({"node_modules/gl-mat4/frustum.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/perspective.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/ortho.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/lookAt.js"(Z,G){var v=QA();G.exports=x;function x(S,E,e,t){var r,o,a,n,i,s,h,c,m,p,T=E[0],l=E[1],_=E[2],w=t[0],A=t[1],M=t[2],g=e[0],b=e[1],d=e[2];return Math.abs(T-g)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(_-d)<1e-6?v(S):(h=T-g,c=l-b,m=_-d,p=1/Math.sqrt(h*h+c*c+m*m),h*=p,c*=p,m*=p,r=A*m-M*c,o=M*h-w*m,a=w*c-A*h,p=Math.sqrt(r*r+o*o+a*a),p?(p=1/p,r*=p,o*=p,a*=p):(r=0,o=0,a=0),n=c*a-m*o,i=m*r-h*a,s=h*o-c*r,p=Math.sqrt(n*n+i*i+s*s),p?(p=1/p,n*=p,i*=p,s*=p):(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]=c,S[7]=0,S[8]=a,S[9]=s,S[10]=m,S[11]=0,S[12]=-(r*T+o*l+a*_),S[13]=-(n*T+i*l+s*_),S[14]=-(h*T+c*l+m*_),S[15]=1,S)}}}),U7=Xe({"node_modules/gl-mat4/str.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/gl-mat4/index.js"(Z,G){G.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=Xe({"src/lib/matrix.js"(Z){"use strict";var G=e5();Z.init2dArray=function(v,x){for(var S=new Array(v),E=0;E<v;E++)S[E]=new Array(x);return S},Z.transposeRagged=function(v){var x=0,S=v.length,E,e;for(E=0;E<S;E++)x=Math.max(x,v[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]=v[e][E];return t},Z.dot=function(v,x){if(!(v.length&&x.length)||v.length!==x.length)return null;var S=v.length,E,e;if(v[0].length)for(E=new Array(S),e=0;e<S;e++)E[e]=Z.dot(v[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(v,t[e])}else for(E=0,e=0;e<S;e++)E+=v[e]*x[e];return E},Z.translationMatrix=function(v,x){return[[1,0,v],[0,1,x],[0,0,1]]},Z.rotationMatrix=function(v){var x=v*Math.PI/180;return[[Math.cos(x),-Math.sin(x),0],[Math.sin(x),Math.cos(x),0],[0,0,1]]},Z.rotationXYMatrix=function(v,x,S){return Z.dot(Z.dot(Z.translationMatrix(x,S),Z.rotationMatrix(v)),Z.translationMatrix(-x,-S))},Z.apply3DTransform=function(v){return function(){var x=arguments,S=arguments.length===1?x[0]:[x[0],x[1],x[2]||0];return Z.dot(v,[S[0],S[1],S[2],1]).slice(0,3)}},Z.apply2DTransform=function(v){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(v,[S[0],S[1],1]).slice(0,2)}},Z.apply2DTransform2=function(v){var x=Z.apply2DTransform(v);return function(S){return x(S.slice(0,2)).concat(x(S.slice(2,4)))}},Z.convertCssMatrix=function(v){if(v){var x=v.length;if(x===16)return v;if(x===6)return[v[0],v[1],0,0,v[2],v[3],0,0,0,0,1,0,v[4],v[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},Z.inverseTransformMatrix=function(v){var x=[];return G.invert(x,v),[[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_=Xe({"src/lib/dom.js"(Z,G){"use strict";var v=Hn(),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=v.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(":"),d="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(u){u.getAttribute(d)||(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(d,!0))})}function s(T){var l=c(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 c(T){for(var l=[];m(T);)l.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return l}function m(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function p(T,l){return T&&l&&T.top===l.top&&T.left===l.left&&T.right===l.right&&T.bottom===l.bottom}G.exports={getGraphDiv:e,isPlotDiv:t,removeElement:r,addStyleRule:o,addRelatedStyleRule:a,deleteRelatedStyleRule:n,setStyleOnHover:i,getFullTransformMatrix:s,getElementTransformMatrix:h,getElementAndAncestors:c,equalDomRects:p}}}),A_=Xe({"src/plots/animation_attributes.js"(Z,G){"use strict";G.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=Xe({"src/plot_api/edit_types.js"(Z,G){"use strict";var v=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");G.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("+"),c=0;c<h.length;c++)n[h[c]]=!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=v({},n);for(var c in h){var m=h[c];x(m)&&(h[c]=a(m,i,s,c))}return s==="from-root"&&(h.editType=i),h}function a(n,i,s,h){if(n.valType){var c=v({},n);if(c.editType=i,Array.isArray(n.items)){c.items=new Array(n.items.length);for(var m=0;m<n.items.length;m++)c.items[m]=a(n.items[m],i,"from-root")}return c}else return o(n,i,h.charAt(0)==="_"?"nested":"from-root")}}}),Gh=Xe({"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=Xe({"src/constants/docs.js"(Z,G){"use strict";G.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=Xe({"src/plots/template_attributes.js"(Z){"use strict";var{DATE_FORMAT_LINK:G,FORMAT_LINK:v}=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}".`,v,"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}".`,G,"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=Xe({"src/components/shapes/label_texttemplate.js"(Z,G){"use strict";function v(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 v(A.x1,M)+o(A)-v(A.x0,M)-r(A)}function s(A,M,g){return v(A.y1,g)+n(A)-v(A.y0,g)-a(A)}function h(A,M){return Math.abs(i(A,M))}function c(A,M,g){return Math.abs(s(A,M,g))}function m(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 p(A,M){return x((v(A.x1,M)+o(A)+v(A.x0,M)+r(A))/2,M)}function T(A,M,g){return x((v(A.y1,g)+n(A)+v(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"];G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:i,dy:s,width:h,height:c,length:m,xcenter:p,ycenter:T,simpleXVariables:_,simpleYVariables:w}}}),j7=Xe({"src/components/shapes/draw_newshape/attributes.js"(Z,G){"use strict";var v=pc().overrideAll,x=ru(),S=tc(),E=Gh().dash,e=Qo().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=v2();G.exports=v({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=Xe({"src/components/selections/draw_newselection/attributes.js"(Z,G){"use strict";var v=Gh().dash,x=Qo().extendFlat;G.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({},v,{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=Xe({"src/plots/pad_attributes.js"(Z,G){"use strict";G.exports=function(v){var x=v.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=Xe({"src/plots/layout_attributes.js"(Z,G){"use strict";var v=tc(),x=A_(),S=sh(),E=j7(),e=q7(),t=m2(),r=Qo().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({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=Xe({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0")){var Z=document.createElement("style");Z.id="a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0",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)}})()}}),so=Xe({"src/registry.js"(Z){"use strict";var G=Km(),v=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":c(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||(_&&G.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]||v},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]){G.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 d in Z.componentsRegistry)p(d,w);_.layoutAttributes&&o(Z.traceLayoutAttributes,_.layoutAttributes);var u=_.basePlotModule,y=u.name;if(y==="mapbox"){var f=u.constants.styleRules;for(var R in f)E(".js-plotly-plot .plotly .mapboxgl-"+R,f[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]){G.log("Plot type "+w+" already registered.");return}m(_),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),m(_));for(var A in Z.modules)p(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&&G.log([w+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),S(_.attributes)||G.log(w+" registered without an *attributes* object."),typeof _.supplyDefaults!="function"&&G.log(w+" registered without a *supplyDefaults* method.")}function c(_){var w=_.name,A=w.split("-")[0],M=_.dictionary,g=_.format,b=M&&Object.keys(M).length,d=g&&Object.keys(g).length,u=Z.localeRegistry,y=u[w];if(y||(u[w]=y={}),A!==w){var f=u[A];f||(u[A]=f={}),b&&f.dictionary===y.dictionary&&(f.dictionary=M),d&&f.format===y.format&&(f.format=g)}b&&(y.dictionary=M),d&&(y.format=g)}function m(_){if(_.layoutAttributes){var w=_.layoutAttributes._arrayAttrRegexps;if(w)for(var A=0;A<w.length;A++)x(Z.layoutArrayRegexes,w[A])}}function p(_,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 d=A.subplots[b];g&&d&&a(g,d)}}function l(_){return typeof _=="object"&&(_=_.type),_}}}),G7=Xe({"src/lib/dates.js"(Z){"use strict";var G=Xv().timeFormat,v=rs(),x=Km(),S=Yy().mod,E=Hs(),e=E.BADNUM,t=E.ONEDAY,r=E.ONEHOUR,o=E.ONEMIN,a=E.ONESEC,n=E.EPOCHJD,i=so(),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,c=/^\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,m=new Date().getFullYear()-70;function p(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 p(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 p(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=p(N),X=F.charAt(0);B&&(X==="G"||X==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",se=F.match($?c:h);if(!se)return e;var le=se[1],fe=se[3]||"1",V=Number(se[5]||1),Y=Number(se[7]||0),ee=Number(se[9]||0),q=Number(se[11]||0);if(B){if(le.length===2)return e;le=Number(le);var oe;try{var ae=i.getComponentMethod("calendars","getCal")(N);if($){var j=fe.charAt(fe.length-1)==="i";fe=parseInt(fe,10),oe=ae.newDate(le,ae.toMonthIndex(le,fe,j),V)}else oe=ae.newDate(le,Number(fe),V)}catch{return e}return oe?(oe.toJD()-n)*t+Y*r+ee*o+q*a:e}le.length===2?le=(Number(le)+2e3-m)%100+m:le=Number(le),fe-=1;var Q=new Date(Date.UTC(2e3,fe,V,Y,ee));return Q.setUTCFullYear(le),Q.getUTCMonth()!==fe||Q.getUTCDate()!==V?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,$,se,le,fe;if(p(O)){var V=Math.floor(U/t)+n,Y=Math.floor(S(F,t));try{B=i.getComponentMethod("calendars","getCal")(O).fromJD(V).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,se=N<M?Math.floor(Y%o/a):0,le=N<g?Y%a*10+P:0}else fe=new Date(U),B=s("%Y-%m-%d")(fe),X=N<A?fe.getUTCHours():0,$=N<A?fe.getUTCMinutes():0,se=N<M?fe.getUTCSeconds():0,le=N<g?fe.getUTCMilliseconds()*10+P:0;return b(B,X,$,se,le)},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=G("%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(p(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 d=/%\d?f/g,u=/%h/g,y={1:"1",2:"1",3:"2",4:"2"};function f(F,N,O,P){F=F.replace(d,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)]}),p(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"){v(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=p(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)+`
`+f(B.dayMonthYear,F,P,U);return f(N,F,P,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=p(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,$,se=p(N)&&i.getComponentMethod("calendars","getCal")(N),le=0;le<F.length;le++){if($=F[le],!v($)){B++;continue}if(!($%t))if(se)try{X=se.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 fe=F.length-B;return{exactYears:O/fe,exactMonths:P/fe,exactDays:U/fe}}}}),S_=Xe({"src/lib/identity.js"(Z,G){"use strict";G.exports=function(x){return x}}}),g2=Xe({"src/lib/search.js"(Z){"use strict";var G=rs(),v=Km(),x=S_(),S=Hs().BADNUM,E=1e-9;Z.findBin=function(a,n,i){if(G(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,c=0,m=h>1?(n[h-1]-n[0])/(h-1):1,p,T;for(m>=0?T=i?e:t:T=i?o:r,a+=m*E*(i?-1:1)*(m>=0?1:-1);s<h&&c++<100;)p=Math.floor((s+h)/2),T(n[p],a)?s=p+1:h=p;return c>90&&v.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,c=[],m,p=0;p<=i;p++){var T=n[p],l=T-m;m===void 0?(c.push(T),m=T):l>h&&(s=Math.min(s,l),c.push(T),m=T)}return{vals:c,minDiff:s}},Z.roundUp=function(a,n,i){for(var s=0,h=n.length-1,c,m=0,p=i?0:1,T=i?1:0,l=i?Math.ceil:Math.floor;s<h&&m++<100;)c=l((s+h)/2),n[c]<=a?s=c+p:h=c-T;return n[s]},Z.sort=function(a,n){for(var i=0,s=0,h=1;h<a.length;h++){var c=n(a[h],a[h-1]);if(c<0?i=1:c>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 c=n(a[h]);c<i&&(i=c,s=h)}return s}}}),Jm=Xe({"src/lib/sort_object_keys.js"(Z,G){"use strict";G.exports=function(x){return Object.keys(x).sort()}}}),H7=Xe({"src/lib/stats.js"(Z){"use strict";var G=rs(),v=bp().isArrayOrTypedArray;Z.aggNums=function(x,S,E,e){var t,r;if((!e||e>E.length)&&(e=E.length),G(S)||(S=!1),v(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++)G(S)?G(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)),G(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(!G(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=Xe({"src/lib/angles.js"(Z,G){"use strict";var v=Yy(),x=v.mod,S=v.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]),d,u,y,f,R;b?(d=0,u=E,y=e):_<w?(d=_,y=w):(d=w,y=_),T<l?(f=T,R=l):(f=l,R=T);function L(O,P){return[O*Math.cos(P)+A,M-O*Math.sin(P)]}var z=Math.abs(y-d)<=E?0:1;function F(O,P,U){return"A"+[O,O]+" "+[0,z,U]+" "+L(O,P)}var N;return b?f===null?N="M"+L(R,d)+F(R,u,0)+F(R,y,0)+"Z":N="M"+L(f,d)+F(f,u,0)+F(f,y,0)+"ZM"+L(R,d)+F(R,u,1)+F(R,y,1)+"Z":f===null?(N="M"+L(R,d)+F(R,y,0),g&&(N+="L0,0Z")):N="M"+L(f,d)+"L"+L(R,d)+F(R,y,0)+"L"+L(f,y)+F(f,d,1)+"Z",N}function c(T,l,_,w,A){return h(null,T,l,_,w,A,0)}function m(T,l,_,w,A){return h(null,T,l,_,w,A,1)}function p(T,l,_,w,A,M){return h(T,l,_,w,A,M,1)}G.exports={deg2rad:t,rad2deg:r,angleDelta:a,angleDist:n,isFullCircle:o,isAngleInsideSector:i,isPtInsideSector:s,pathArc:c,pathSector:m,pathAnnulus:p}}}),X7=Xe({"src/lib/anchor_utils.js"(Z){"use strict";Z.isLeftAnchor=function(v){return v.xanchor==="left"||v.xanchor==="auto"&&v.x<=1/3},Z.isCenterAnchor=function(v){return v.xanchor==="center"||v.xanchor==="auto"&&v.x>1/3&&v.x<2/3},Z.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},Z.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},Z.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},Z.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),Z7=Xe({"src/lib/geometry2d.js"(Z){"use strict";var G=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,n,i,s,h){var c=o-t,m=n-t,p=s-n,T=a-r,l=i-r,_=h-i,w=c*_-p*T;if(w===0)return null;var A=(m*_-p*l)/w,M=(m*T-c*l)/w;return M<0||M>1||A<0||A>1?null:{x:t+c*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,n,i,s,h,c){if(v(r,o,a,n,i,s,h,c))return 0;var m=a-r,p=n-o,T=h-i,l=c-s,_=m*m+p*p,w=T*T+l*l,A=Math.min(x(m,p,_,i-r,s-o),x(m,p,_,h-r,c-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 c=a*r-n*t;return c*c/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(G(a-n/2,o)),s=r.getPointAtLength(G(a+n/2,o)),h=Math.atan((s.y-i.y)/(s.x-i.x)),c=r.getPointAtLength(G(a,o)),m=(c.x*4+i.x+s.x)/6,p=(c.y*4+i.y+s.y)/6,T={x:m,y:p,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,c=0,m=r.getTotalLength(),p=m,T,l;function _(A){var M=r.getPointAtLength(A);A===0?T=M:A===m&&(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=_(c);w;){if(c+=w+a,c>p)return;w=_(c)}for(w=_(p);w;){if(p-=w+a,c>p)return;w=_(p)}return{min:c,max:p,len:p-c,total:m,isClosed:c===0&&p===m&&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,c=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,m=0,p=0,T=i,l,_,w;m<h;){if(l=(p+T)/2,_=r.getPointAtLength(l),w=_[a]-o,Math.abs(w)<s)return _;c*w>0?T=l:p=l,m++}return _}}}),y2=Xe({"src/lib/throttle.js"(Z){"use strict";var G={};Z.throttle=function(S,E,e){var t=G[S],r=Date.now();if(!t){for(var o in G)G[o].ts<r-6e4&&delete G[o];t=G[S]={ts:0,timer:null}}v(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=G[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)v(G[x]),delete G[x];else for(var S in G)Z.clear(S)};function v(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),Y7=Xe({"src/lib/clear_responsive.js"(Z,G){"use strict";G.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),K7=Xe({"node_modules/is-mobile/index.js"(Z,G){"use strict";G.exports=E,G.exports.isMobile=E,G.exports.default=E;var v=/(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=v.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=Xe({"src/lib/preserve_drawing_buffer.js"(Z,G){"use strict";var v=rs(),x=K7();G.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(v(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=Xe({"src/lib/make_trace_groups.js"(Z,G){"use strict";var v=Hn();G.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]=v.select(this)}),t}}}),Q7=Xe({"src/lib/localize.js"(Z,G){"use strict";var v=so();G.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=v.localeRegistry}var i=e.split("-")[0];if(i===e)break;e=i}return E}}}),r5=Xe({"src/lib/filter_unique.js"(Z,G){"use strict";G.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=Xe({"src/lib/filter_visible.js"(Z,G){"use strict";G.exports=function(e){for(var t=S(e)?x:v,r=[],o=0;o<e.length;o++){var a=e[o];t(a)&&r.push(a)}return r};function v(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=Xe({"src/lib/increment.js"(Z,G){"use strict";G.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=Xe({"src/lib/clean_number.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;G.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):x}}}),sa=Xe({"src/lib/index.js"(Z,G){"use strict";var v=Hn(),x=Xv().utcFormat,S=YA().format,E=rs(),e=Hs(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=G.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 c=G7();a.dateTime2ms=c.dateTime2ms,a.isDateTime=c.isDateTime,a.ms2DateTime=c.ms2DateTime,a.ms2DateTimeLocal=c.ms2DateTimeLocal,a.cleanDate=c.cleanDate,a.isJSDate=c.isJSDate,a.formatDate=c.formatDate,a.incrementMonth=c.incrementMonth,a.dateTick0=c.dateTick0,a.dfltRange=c.dfltRange,a.findExactDates=c.findExactDates,a.MIN_MS=c.MIN_MS,a.MAX_MS=c.MAX_MS;var m=g2();a.findBin=m.findBin,a.sorterAsc=m.sorterAsc,a.sorterDes=m.sorterDes,a.distinctVals=m.distinctVals,a.roundUp=m.roundUp,a.sort=m.sort,a.findIndexOfMin=m.findIndexOfMin,a.sortObjectKeys=Jm();var p=H7();a.aggNums=p.aggNums,a.len=p.len,a.mean=p.mean,a.geometricMean=p.geometricMean,a.median=p.median,a.midRange=p.midRange,a.variance=p.variance,a.stdev=p.stdev,a.interp=p.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 d=T_();a.getGraphDiv=d.getGraphDiv,a.isPlotDiv=d.isPlotDiv,a.removeElement=d.removeElement,a.addStyleRule=d.addStyleRule,a.addRelatedStyleRule=d.addRelatedStyleRule,a.deleteRelatedStyleRule=d.deleteRelatedStyleRule,a.setStyleOnHover=d.setStyleOnHover,a.getFullTransformMatrix=d.getFullTransformMatrix,a.getElementTransformMatrix=d.getElementTransformMatrix,a.getElementAndAncestors=d.getElementAndAncestors,a.equalDomRects=d.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 ce=0;ce<j.length;ce++){var be=j[ce],Ae=a.nestedProperty(ae,be.replace("?",Q)),De=a.nestedProperty(ae,be.replace("?",re)),ze=Ae.get();Ae.set(De.get()),De.set(ze)}},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,ce){for(var be=ae.length,Ae=new Array(be),De=0;De<be;De++)Ae[De]=j(ae[De],Q,re,ce);return Ae},a.randstr=function ae(j,Q,re,ce){if(re||(re=16),Q===void 0&&(Q=24),Q<=0)return"0";var be=Math.log(Math.pow(2,Q))/Math.log(re),Ae="",De,ze,Ze;for(De=2;be===1/0;De*=2)be=Math.log(Math.pow(2,Q/De))/Math.log(re)*De;var at=be-Math.floor(be);for(De=0;De<Math.floor(be);De++)Ze=Math.floor(Math.random()*re).toString(re),Ae=Ze+Ae;at&&(ze=Math.pow(re,at),Ze=Math.floor(Math.random()*ze).toString(re),Ae=Ze+Ae);var nt=parseInt(Ae,re);return j&&j[Ae]||nt!==1/0&&nt>=Math.pow(2,Q)?ce>10?(a.warn("randstr failed uniqueness"),Ae):ae(j,Q,re,(ce||0)+1):Ae},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,ce=2*j-1,be=new Array(ce),Ae=new Array(Q),De,ze,Ze,at;for(De=0;De<ce;De++)be[De]=(1-Math.cos(Math.PI*(De+1)/j))/(2*j);for(De=0;De<Q;De++){for(at=0,ze=0;ze<ce;ze++)Ze=De+ze+1-j,Ze<-Q?Ze-=re*Math.round(Ze/re):Ze>=re&&(Ze-=re*Math.floor(Ze/re)),Ze<0?Ze=-1-Ze:Ze>=Q&&(Ze=re-1-Ze),at+=ae[Ze]*be[ze];Ae[De]=at}return Ae},a.syncOrAsync=function(ae,j,Q){var re,ce;function be(){return a.syncOrAsync(ae,j,Q)}for(;ae.length;)if(ce=ae.splice(0,1)[0],re=ce(j),re&&re.then)return re.then(be);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,ce=!0,be,Ae;for(be=0;be<Q.length;be++)Ae=ae[Q[be]],Ae!=null?re=!0:ce=!1;if(re&&!ce)for(be=0;be<Q.length;be++)ae[Q[be]]=j[Q[be]]}},a.mergeArray=function(ae,j,Q,re){var ce=typeof re=="function";if(a.isArrayOrTypedArray(ae))for(var be=Math.min(ae.length,j.length),Ae=0;Ae<be;Ae++){var De=ae[Ae];j[Ae][Q]=ce?re(De):De}},a.mergeArrayCastPositive=function(ae,j,Q){return a.mergeArray(ae,j,Q,function(re){var ce=+re;return isFinite(ce)&&ce>0?ce:0})},a.fillArray=function(ae,j,Q,re){if(re=re||a.identity,a.isArrayOrTypedArray(ae))for(var ce=0;ce<j.length;ce++)j[ce][Q]=re(ae[ce])},a.castOption=function(ae,j,Q,re){re=re||a.identity;var ce=a.nestedProperty(ae,Q).get();return a.isArrayOrTypedArray(ce)?Array.isArray(j)&&a.isArrayOrTypedArray(ce[j[0]])?re(ce[j[0]][j[1]]):re(ce[j]):ce},a.extractOption=function(ae,j,Q,re){if(Q in ae)return ae[Q];var ce=a.nestedProperty(j,re).get();if(!Array.isArray(ce))return ce};function u(ae){var j={};for(var Q in ae)for(var re=ae[Q],ce=0;ce<re.length;ce++)j[re[ce]]=+Q;return j}a.tagSelected=function(ae,j,Q){var re=j.selectedpoints,ce=j._indexToPoints,be;ce&&(be=u(ce));function Ae(nt){return nt!==void 0&&nt<ae.length}for(var De=0;De<re.length;De++){var ze=re[De];if(a.isIndex(ze)||a.isArrayOrTypedArray(ze)&&a.isIndex(ze[0])&&a.isIndex(ze[1])){var Ze=be?be[ze]:ze,at=Q?Q[Ze]:Ze;Ae(at)&&(ae[at].selected=1)}}},a.selIndices2selPoints=function(ae){var j=ae.selectedpoints,Q=ae._indexToPoints;if(Q){for(var re=u(Q),ce=[],be=0;be<j.length;be++){var Ae=j[be];if(a.isIndex(Ae)){var De=re[Ae];a.isIndex(De)&&ce.push(De)}}return ce}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 ce=Q==="pieLike"?-1:3,be=Object.keys(ae),Ae,De,ze;for(Ae=0;Ae<be.length;Ae++)De=be[Ae],ze=ae[De],!(De.charAt(0)==="_"||typeof ze=="function")&&(De==="module"?re[De]=ze:Array.isArray(ze)?De==="colorscale"||ce===-1?re[De]=ze.slice():re[De]=ze.slice(0,ce):a.isTypedArray(ze)?ce===-1?re[De]=ze.subarray():re[De]=ze.subarray(0,ce):ze&&typeof ze=="object"?re[De]=y(ae[De],j[De],Q):re[De]=ze);for(be=Object.keys(j),Ae=0;Ae<be.length;Ae++)De=be[Ae],ze=j[De],(typeof ze!="object"||!(De in re)||typeof re[De]!="object")&&(re[De]=ze);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 f=/Version\/[\d\.]+.*Safari/;a.isSafari=function(){return f.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 v.selection},a.ensureSingle=function(ae,j,Q,re){var ce=ae.select(j+(Q?"."+Q:""));if(ce.size())return ce;var be=ae.append(j);return Q&&be.classed(Q,!0),re&&be.call(re),be},a.ensureSingleById=function(ae,j,Q,re){var ce=ae.select(j+"#"+Q);if(ce.size())return ce;var be=ae.append(j).attr("id",Q);return re&&be.call(re),be},a.objectFromPath=function(ae,j){for(var Q=ae.split("."),re,ce=re={},be=0;be<Q.length;be++){var Ae=Q[be],De=null,ze=Q[be].match(/(.*)\[([0-9]+)\]/);ze?(Ae=ze[1],De=ze[2],re=re[Ae]=[],be===Q.length-1?re[De]=j:re[De]={},re=re[De]):(be===Q.length-1?re[Ae]=j:re[Ae]={},re=re[Ae])}return ce};var F=/^([^\[\.]+)\.(.+)?/,N=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function O(ae){return ae.slice(0,2)==="__"}a.expandObjectPaths=function(ae){var j,Q,re,ce,be,Ae,De;if(typeof ae=="object"&&!Array.isArray(ae)){for(Q in ae)if(ae.hasOwnProperty(Q))if(j=Q.match(F)){if(ce=ae[Q],re=j[1],O(re))continue;delete ae[Q],ae[re]=a.extendDeepNoArrays(ae[re]||{},a.objectFromPath(Q,a.expandObjectPaths(ce))[re])}else if(j=Q.match(N)){if(ce=ae[Q],re=j[1],O(re))continue;if(be=parseInt(j[2]),delete ae[Q],ae[re]=ae[re]||[],j[3]===".")De=j[4],Ae=ae[re][be]=ae[re][be]||{},a.extendDeepNoArrays(Ae,a.objectFromPath(De,a.expandObjectPaths(ce)));else{if(O(re))continue;ae[re][be]=a.expandObjectPaths(ce)}}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})/,ce=j.charAt(0),be=j.charAt(1),Ae=ae.split("."),De=Ae[0],ze=Ae.length>1?ce+Ae[1]:"";if(be&&(Ae.length>1||De.length>4||Q))for(;re.test(De);)De=De.replace(re,"$1"+be+"$2");return De+ze},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,ce){var be;return P.test(ce)?be=j[ce]:(Q[ce]=Q[ce]||a.nestedProperty(j,ce).get,be=Q[ce](!0)),be!==void 0?be:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>fe(ds(To({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>fe(ds(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 se={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>fe(ds(To({},ae),{opts:se}));var le=/^[:|\|]/;function fe({data:ae=[],locale:j,fallback:Q,labels:re={},opts:ce,template:be}){return be.replace(a.TEMPLATE_STRING_REGEX,(Ae,De,ze)=>{let Ze=["xother","yother"].includes(De),at=["_xother","_yother"].includes(De),nt=["_xother_","_yother_"].includes(De),rt=["xother_","yother_"].includes(De),st=Ze||at||rt||nt;(at||nt)&&(De=De.substring(1)),(rt||nt)&&(De=De.substring(0,De.length-1));let Me=null,ye=null;if(ce.parseMultDiv){var he=$(De);De=he.key,Me=he.op,ye=he.number}let Oe;if(st){if(re[De]===void 0)return"";Oe=re[De]}else for(let Pt of ae)if(Pt){if(Pt.hasOwnProperty(De)){Oe=Pt[De];break}if(P.test(De)||(Oe=a.nestedProperty(Pt,De).get(!0)),Oe!==void 0)break}if(Oe===void 0){let{count:Pt,max:It,name:qt}=ce,Wt=Q===!1?Ae:Q;return Pt<It&&a.warn([`Variable '${De}' in ${qt} could not be found!`,"Please verify that the template is correct.",`Using value: '${Wt}'.`].join(" ")),Pt===It&&a.warn(`Too many '${qt}' warnings - additional warnings will be suppressed.`),ce.count++,Wt}if(Me==="*"&&(Oe*=ye),Me==="/"&&(Oe/=ye),ze){var tt;if(ze[0]===":"&&(tt=j?j.numberFormat:a.numberFormat,Oe!==""&&(Oe=tt(ze.replace(le,""))(Oe))),ze[0]==="|"){tt=j?j.timeFormat:x;var ot=a.dateTime2ms(Oe);Oe=a.formatDate(ot,ze.replace(le,""),!1,tt)}}else{var Qe=De+"Label";re.hasOwnProperty(Qe)&&(Oe=re[Qe])}return st&&(Oe="("+Oe+")",(at||nt)&&(Oe=" "+Oe),(rt||nt)&&(Oe=Oe+" ")),Oe})}var V=48,Y=57;a.subplotSort=function(ae,j){for(var Q=Math.min(ae.length,j.length)+1,re=0,ce=0,be=0;be<Q;be++){var Ae=ae.charCodeAt(be)||0,De=j.charCodeAt(be)||0,ze=Ae>=V&&Ae<=Y,Ze=De>=V&&De<=Y;if(ze&&(re=10*re+Ae-V),Ze&&(ce=10*ce+De-V),!ze||!Ze){if(re!==ce)return re-ce;if(Ae!==De)return Ae-De}}return ce-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(Ae){Q.push(Ae)}:function(Ae){Q.text=Ae},ce=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(ce))return re(ce);var be=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(be))return re(be)},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,ce=ae.targetX,be=ae.targetY,Ae=ae.anchorX||0,De=ae.anchorY||0,ze=ae.rotate,Ze=ae.scale;return Ze?Ze>1&&(Ze=1):Ze=0,a.strTranslate(ce-Ze*(Q+Ae),be-Ze*(re+De))+a.strScale(Ze)+(ze?"rotate("+ze+(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(),oe=q!==null&&q<86;a.getPositionFromD3Event=function(){return oe?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=Xe({"build/plotcss.js"(){"use strict";var Z=sa(),G={"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 G)v=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,G[x]);var v,x}}),a5=Xe({"node_modules/is-browser/client.js"(Z,G){G.exports=!0}}),i5=Xe({"node_modules/has-hover/index.js"(Z,G){"use strict";var v=a5(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=v,G.exports=x}}),Z0=Xe({"node_modules/events/events.js"(Z,G){"use strict";var v=typeof Reflect=="object"?Reflect:null,x=v&&typeof v.apply=="function"?v.apply:function(M,g,b){return Function.prototype.apply.call(M,g,b)},S;v&&typeof v.ownKeys=="function"?S=v.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)}G.exports=t,G.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 d=M==="error",u=this._events;if(u!==void 0)d=d&&u.error===void 0;else if(!d)return!1;if(d){var y;if(g.length>0&&(y=g[0]),y instanceof Error)throw y;var f=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw f.context=y,f}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=m(R,L),b=0;b<L;++b)x(z[b],this,g);return!0};function n(A,M,g,b){var d,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),d=a(A),d>0&&y.length>d&&!y.warned){y.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=A,f.type=M,f.count=y.length,E(f)}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},d=i.bind(b);return d.listener=g,b.wrapFn=d,d}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,d,u,y,f;if(o(g),d=this._events,d===void 0)return this;if(b=d[M],b===void 0)return this;if(b===g||b.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete d[M],d.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){f=b[y].listener,u=y;break}if(u<0)return this;u===0?b.shift():p(b,u),b.length===1&&(d[M]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",M,f||g)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(M){var g,b,d;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(d=0;d<u.length;++d)y=u[d],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(d=g.length-1;d>=0;d--)this.removeListener(M,g[d]);return this};function h(A,M,g){var b=A._events;if(b===void 0)return[];var d=b[M];return d===void 0?[]:typeof d=="function"?g?[d.listener||d]:[d]:g?T(d):m(d,d.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):c.call(A,M)},t.prototype.listenerCount=c;function c(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 m(A,M){for(var g=new Array(M),b=0;b<M;++b)g[b]=A[b];return g}function p(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 d(y){A.removeListener(M,u),b(y)}function u(){typeof A.removeListener=="function"&&A.removeListener("error",d),g([].slice.call(arguments))}w(A,M,u,{once:!0}),M!=="error"&&_(A,d,{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 d(u){b.once&&A.removeEventListener(M,d),g(u)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}}}),Qy=Xe({"src/lib/events.js"(Z,G){"use strict";var v=Z0().EventEmitter,x={init:function(S){if(S._ev instanceof v)return S;var E=new v,e=new v;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}};G.exports=x}}),iz=Xe({"src/lib/queue.js"(Z,G){"use strict";var v=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)?v.extendDeep([],o):v.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)},G.exports=E}}),n5=Xe({"src/plots/frame_attributes.js"(Z,G){"use strict";G.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),e1=Xe({"src/plot_api/plot_schema.js"(Z){"use strict";var G=so(),v=sa(),x=ru(),S=$y(),E=n5(),e=A_(),t=X0().configAttributes,r=pc(),o=v.extendDeepAll,a=v.isPlainObject,n=v.isArrayOrTypedArray,i=v.nestedProperty,s=v.valObjectMeta,h="_isSubplotObj",c="_isLinkedToArray",m="_arrayAttrRegexps",p="_deprecated",T=[h,c,m,p];Z.IS_SUBPLOT_OBJ=h,Z.IS_LINKED_TO_ARRAY=c,Z.DEPRECATED=p,Z.UNDERSCORE_ATTRS=T,Z.get=function(){var L={};return G.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,$,se,le){F=F.slice(0,le).concat([$]),N=N.slice(0,le).concat([X&&X._isLinkedToArray]);var fe=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(F[le-1]==="colorbar"&&($==="ticktext"||$==="tickvals"));fe&&B(O,0,"")}function B(X,$,se){var le=X[F[$]],fe=se+F[$];if($===F.length-1)n(le)&&z.push(P+fe);else if(N[$]){if(Array.isArray(le))for(var V=0;V<le.length;V++)a(le[V])&&B(le[V],$+1,fe+"["+V+"].")}else a(le)&&B(le,$+1,fe+".")}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=(G.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 G.componentsRegistry){if(O=G.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=G.modules[L]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},x),P=o({},z.attributes);Z.crawl(P,function(X,$,se,le,fe){i(O,fe).set(void 0),X===void 0&&i(P,fe).set(void 0)}),o(N,O),G.traceIs(L,"noOpacity")&&delete N.opacity,G.traceIs(L,"showLegend")||(delete N.showlegend,delete N.legendgroup),G.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 G.subplotsRegistry)if(F=G.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N<F.attr.length;N++)f(L,F,F.attr[N]);else{var O=F.attr==="subplot"?F.name:F.attr;f(L,F,O)}for(z in G.componentsRegistry){F=G.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 d(L),u(L),y(L),L}function d(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[c];P&&(delete F[c],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 f(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=Xe({"src/plot_api/plot_template.js"(Z){"use strict";var G=sa(),v=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=G.coerce(i,{},v,"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]);G.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(m){var p={name:m.name,_input:m},T=p[x]=m[x];if(!E(T))return p._template=n,p;for(var l=0;l<i.length;l++){var _=i[l];if(_.name===T)return s[T]=1,p._template=_,p}return p[o]=m[o]||!1,p._template=!1,p}function c(){for(var m=[],p=0;p<i.length;p++){var T=i[p],l=T.name;if(E(l)&&!s[l]){var _={_template:T,name:l,_input:{_templateitemname:l}};_[x]=T[x],m.push(_),s[l]=1}}return m}return{newItem:h,defaultItems:c}};function E(t){return t&&typeof t=="string"}function e(t){var r=t.length-1;return t.charAt(r)!=="s"&&G.warn("bad argument to arrayDefaultKey: "+t),t.slice(0,-1)+"defaults"}Z.arrayDefaultKey=e,Z.arrayEditor=function(t,r,o){var a=(G.nestedProperty(t,r).get()||[]).length,n=o._index,i=n>=a&&(o._input||{})._templateitemname;i&&(n=a);var s=r+"["+n+"]",h;function c(){h={},i&&(h[s]={},h[s][x]=i)}c();function m(_,w){h[_]=w}function p(_,w){i?G.nestedProperty(h[s],_).set(w):h[s+"."+_]=w}function T(){var _=h;return c(),_}function l(_,w){_&&p(_,w);var A=T();for(var M in A)G.nestedProperty(t,M).set(A[M])}return{modifyBase:m,modifyItem:p,getUpdateObj:T,applyUpdate:l}}}}),lh=Xe({"src/plots/cartesian/constants.js"(Z,G){"use strict";var v=Jy().counter;G.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("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=Xe({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var G=so(),v=lh();Z.id2name=function(E){if(!(typeof E!="string"||!E.match(v.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(v.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(v.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(G.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=Xe({"src/components/shapes/handle_outline.js"(Z,G){"use strict";function v(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}G.exports={clearOutlineControllers:v,clearOutline:x}}}),_2=Xe({"src/traces/scatter/layout_attributes.js"(Z,G){"use strict";G.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Hh=Xe({"src/plots/get_data.js"(Z){"use strict";var G=so(),v=lh().SUBPLOT_PATTERN;Z.getSubplotCalcData=function(x,S,E){var e=G.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=G.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(!G.subplotsRegistry[E])return[];for(var t=G.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=Xe({"src/plots/command.js"(Z){"use strict";var G=so(),v=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 c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],m=0;m<c.length;m++)r._internalOn(c[m],i.check);i.remove=function(){for(var p=0;p<c.length;p++)r._removeInternalListener(c[p],i.check)}}else v.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,c=o[n],m=c.method,p=c.args;if(Array.isArray(p)||(p=[]),!m)return!1;var T=Z.computeAPICommandBindings(r,m,p);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=v.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=G.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 v.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(v.isPlainObject(n))i=n;else return a;return t(i,function(s,h,c){a.push({type:"layout",prop:s,value:c})},"",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(v.isPlainObject(n))s=n,a===void 0&&(a=i);else return h;return a===void 0&&(a=null),t(s,function(c,m,p){var T,l;if(Array.isArray(p)){l=p.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=p,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:c,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;v.isPlainObject(s)?t(s,o,h,n+1):o(h,i,s)}})}}}),bc=Xe({"src/plots/plots.js"(Z,G){"use strict";var v=Hn(),x=Xv().timeFormatLocale,S=YA().formatLocale,E=rs(),e=KA(),t=so(),r=e1(),o=zl(),a=sa(),n=$n(),i=Hs().BADNUM,s=ef(),h=$m().clearOutline,c=_2(),m=A_(),p=n5(),T=Hh().getModuleCalcData,l=a.relinkPrivateKeys,_=a._,w=G.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(V){return V=a.getGraphDiv(V),new Promise(function(Y){setTimeout(function(){V._fullLayout&&(t.getComponentMethod("annotations","draw")(V),t.getComponentMethod("legend","draw")(V),t.getComponentMethod("colorbar","draw")(V),Y(w.previousPromises(V)))},300)})},w.resize=function(V){V=a.getGraphDiv(V);var Y,ee=new Promise(function(q,oe){(!V||a.isHidden(V))&&oe(new Error("Resize must be passed a displayed plot div element.")),V._redrawTimer&&clearTimeout(V._redrawTimer),V._resolveResize&&(Y=V._resolveResize),V._resolveResize=q,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||a.isHidden(V)){q(V);return}delete V.layout.width,delete V.layout.height;var ae=V.changed;V.autoplay=!0,t.call("relayout",V,{autosize:!0}).then(function(){V.changed=ae,V._resolveResize===q&&(delete V._resolveResize,q(V))})},100)});return Y&&Y(ee),ee},w.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},w.addLinks=function(V){if(!(!V._context.showLink&&!V._context.showSources)){var Y=V._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 ce=v.select(this);ce.append("tspan").classed("js-link-to-tool",!0),ce.append("tspan").classed("js-link-spacer",!0),ce.append("tspan").classed("js-sourcelinks",!0)})}),q=ee.node(),oe={y:Y._paper.attr("height")-9};document.body.contains(q)&&q.getComputedTextLength()>=Y.width-20?(oe["text-anchor"]="start",oe.x=5):(oe["text-anchor"]="end",oe.x=Y._paper.attr("width")-7),ee.attr(oe);var ae=ee.select(".js-link-to-tool"),j=ee.select(".js-link-spacer"),Q=ee.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&M(V,ae),j.text(ae.text()&&Q.text()?" - ":"")}};function M(V,Y){Y.text("");var ee=Y.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(V._context.linkText+" \xBB");if(V._context.sendData)ee.on("click",function(){w.sendDataToCloud(V)});else{var q=window.location.pathname.split("/"),oe=window.location.search;ee.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+q[2].split(".")[0]+"/"+q[1]+oe})}}w.sendDataToCloud=function(V){var Y=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Y){V.emit("plotly_beforeexport");var ee=v.select(V).append("div").attr("id","hiddenform").style("display","none"),q=ee.append("form").attr({action:Y+"/external",method:"post",target:"_blank"}),oe=q.append("input").attr({type:"text",name:"data"});return oe.node().value=w.graphJson(V,!1,"keepdata"),q.node().submit(),ee.remove(),V.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(V,Y){var ee=Y&&Y.skipUpdateCalc,q=V._fullLayout||{};if(q._skipDefaults){delete q._skipDefaults;return}var oe=V._fullLayout={},ae=V.layout||{},j=V._fullData||[],Q=V._fullData=[],re=V.data||[],ce=V.calcdata||[],be=V._context||{},Ae;V._transitionData||w.createTransitionData(V),oe._dfltTitle={plot:_(V,"Click to enter Plot title"),subtitle:_(V,"Click to enter Plot subtitle"),x:_(V,"Click to enter X axis title"),y:_(V,"Click to enter Y axis title"),colorbar:_(V,"Click to enter Colorscale title"),annotation:_(V,"new text")},oe._traceWord=_(V,"trace");var De=y(V,g);if(oe._mapboxAccessToken=be.mapboxAccessToken,q._initialAutoSizeIsDone){var ze=q.width,Ze=q.height;w.supplyLayoutGlobalDefaults(ae,oe,De),ae.width||(oe.width=ze),ae.height||(oe.height=Ze),w.sanitizeMargins(oe)}else{w.supplyLayoutGlobalDefaults(ae,oe,De);var at=!ae.width||!ae.height,nt=oe.autosize,rt=be.autosizable,st=at&&(nt||rt);st?w.plotAutoSize(V,ae,oe):at&&w.sanitizeMargins(oe),!nt&&at&&(ae.width=oe.width,ae.height=oe.height)}oe._d3locale=f(De,oe.separators),oe._extraFormat=y(V,b),oe._initialAutoSizeIsDone=!0,oe._dataLength=re.length,oe._modules=[],oe._visibleModules=[],oe._basePlotModules=[];var Me=oe._subplots=u(),ye=oe._splomAxes={x:{},y:{}},he=oe._splomSubplots={};oe._splomGridDflt={},oe._scatterStackOpts={},oe._firstScatter={},oe._alignmentOpts={},oe._colorAxes={},oe._requestRangeslider={},oe._traceUids=d(j,re),w.supplyDataDefaults(re,Q,ae,oe);var Oe=Object.keys(ye.x),tt=Object.keys(ye.y);if(Oe.length>1&&tt.length>1){for(t.getComponentMethod("grid","sizeDefaults")(ae,oe),Ae=0;Ae<Oe.length;Ae++)a.pushUnique(Me.xaxis,Oe[Ae]);for(Ae=0;Ae<tt.length;Ae++)a.pushUnique(Me.yaxis,tt[Ae]);for(var ot in he)a.pushUnique(Me.cartesian,ot)}if(oe._has=w._hasPlotType.bind(oe),j.length===Q.length)for(Ae=0;Ae<Q.length;Ae++)l(Q[Ae],j[Ae]);w.supplyLayoutModuleDefaults(ae,oe,Q,V._transitionData);var Qe=oe._visibleModules,Pt=[];for(Ae=0;Ae<Qe.length;Ae++){var It=Qe[Ae].crossTraceDefaults;It&&a.pushUnique(Pt,It)}for(Ae=0;Ae<Pt.length;Ae++)Pt[Ae](Q,oe);oe._hasOnlyLargeSploms=oe._basePlotModules.length===1&&oe._basePlotModules[0].name==="splom"&&Oe.length>15&&tt.length>15&&oe.shapes.length===0&&oe.images.length===0,w.linkSubplots(Q,oe,j,q),w.cleanPlot(Q,oe,j,q);var qt=!!(q._has&&q._has("cartesian")),Wt=!!(oe._has&&oe._has("cartesian")),kr=qt,mr=Wt;kr&&!mr?q._bgLayer.remove():mr&&!kr&&(oe._shouldCreateBgLayer=!0),q._zoomlayer&&!V._dragging&&h({_fullLayout:q}),R(Q,oe),l(oe,q),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,oe),oe._preGUI||(oe._preGUI={}),oe._tracePreGUI||(oe._tracePreGUI={});var qr=oe._tracePreGUI,Sr={},Rr;for(Rr in qr)Sr[Rr]="old";for(Ae=0;Ae<Q.length;Ae++)Rr=Q[Ae]._fullInput.uid,Sr[Rr]||(qr[Rr]={}),Sr[Rr]="new";for(Rr in Sr)Sr[Rr]==="old"&&delete qr[Rr];F(oe),t.getComponentMethod("rangeslider","makeData")(oe),!ee&&ce.length===Q.length&&w.supplyDefaultsUpdateCalc(ce,Q)},w.supplyDefaultsUpdateCalc=function(V,Y){for(var ee=0;ee<Y.length;ee++){var q=Y[ee],oe=(V[ee]||[])[0];if(oe&&oe.trace){var ae=oe.trace;if(ae._hasCalcTransform){var j=ae._arrayAttrs,Q,re,ce;for(Q=0;Q<j.length;Q++)re=j[Q],ce=a.nestedProperty(ae,re).get().slice(),a.nestedProperty(q,re).set(ce)}oe.trace=q}}};function d(V,Y){var ee=Y.length,q=[],oe,ae;for(oe=0;oe<V.length;oe++){var j=V[oe]._fullInput;j!==ae&&q.push(j),ae=j}var Q=q.length,re=new Array(ee),ce={};function be(ze,Ze){re[Ze]=ze,ce[ze]=1}function Ae(ze,Ze){if(ze&&typeof ze=="string"&&!ce[ze])return be(ze,Ze),!0}for(oe=0;oe<ee;oe++){var De=Y[oe].uid;typeof De=="number"&&(De=String(De)),!Ae(De,oe)&&(oe<Q&&Ae(q[oe].uid,oe)||be(a.randstr(ce),oe))}return re}function u(){var V=t.collectableSubplotTypes,Y={},ee,q;if(!V){V=[];var oe=t.subplotsRegistry;for(var ae in oe){var j=oe[ae],Q=j.attr;if(Q&&(V.push(ae),Array.isArray(Q)))for(q=0;q<Q.length;q++)a.pushUnique(V,Q[q])}}for(ee=0;ee<V.length;ee++)Y[V[ee]]=[];return Y}function y(V,Y){var ee=V._context.locale;ee||(ee="en-US");var q=!1,oe={};function ae(Ae){for(var De=!0,ze=0;ze<Y.length;ze++){var Ze=Y[ze];oe[Ze]||(Ae[Ze]?oe[Ze]=Ae[Ze]:De=!1)}De&&(q=!0)}for(var j=0;j<2;j++){for(var Q=V._context.locales,re=0;re<2;re++){var ce=(Q[ee]||{}).format;if(ce&&(ae(ce),q))break;Q=t.localeRegistry}var be=ee.split("-")[0];if(q||be===ee)break;ee=be}return q||ae(t.localeRegistry.en.format),oe}function f(V,Y){return V.decimal=Y.charAt(0),V.thousands=Y.charAt(1),{numberFormat:function(ee){try{ee=S(V).format(a.adjustFormat(ee))}catch{return a.warnBadFormat(ee),a.noFormat}return ee},timeFormat:x(V).utcFormat}}function R(V,Y){var ee,q=[];Y.meta&&(ee=Y._meta={meta:Y.meta,layout:{meta:Y.meta}});for(var oe=0;oe<V.length;oe++){var ae=V[oe];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(V){V._transitionData||(V._transitionData={}),V._transitionData._frames||(V._transitionData._frames=[]),V._transitionData._frameHash||(V._transitionData._frameHash={}),V._transitionData._counter||(V._transitionData._counter=0),V._transitionData._interruptCallbacks||(V._transitionData._interruptCallbacks=[])},w._hasPlotType=function(V){var Y,ee=this._basePlotModules||[];for(Y=0;Y<ee.length;Y++)if(ee[Y].name===V)return!0;var q=this._modules||[];for(Y=0;Y<q.length;Y++){var oe=q[Y].name;if(oe===V)return!0;var ae=t.modules[oe];if(ae&&ae.categories[V])return!0}return!1},w.cleanPlot=function(V,Y,ee,q){var oe,ae,j=q._basePlotModules||[];for(oe=0;oe<j.length;oe++){var Q=j[oe];Q.clean&&Q.clean(V,Y,ee,q)}var re=q._has&&q._has("gl"),ce=Y._has&&Y._has("gl");re&&!ce&&q._glcontainer!==void 0&&(q._glcontainer.selectAll(".gl-canvas").remove(),q._glcontainer.selectAll(".no-webgl").remove(),q._glcanvas=null);var be=!!q._infolayer;e:for(oe=0;oe<ee.length;oe++){var Ae=ee[oe],De=Ae.uid;for(ae=0;ae<V.length;ae++){var ze=V[ae];if(De===ze.uid)continue e}be&&q._infolayer.select(".cb"+De).remove()}},w.linkSubplots=function(V,Y,ee,q){var oe,ae,j=q._plots||{},Q=Y._plots={},re=Y._subplots,ce={_fullData:V,_fullLayout:Y},be=re.cartesian||[];for(oe=0;oe<be.length;oe++){var Ae=be[oe],De=j[Ae],ze=s.getFromId(ce,Ae,"x"),Ze=s.getFromId(ce,Ae,"y"),at;for(De?at=Q[Ae]=De:(at=Q[Ae]={},at.id=Ae),ze._counterAxes.push(Ze._id),Ze._counterAxes.push(ze._id),ze._subplotsWith.push(Ae),Ze._subplotsWith.push(Ae),at.xaxis=ze,at.yaxis=Ze,at._hasClipOnAxisFalse=!1,ae=0;ae<V.length;ae++){var nt=V[ae];if(nt.xaxis===at.xaxis._id&&nt.yaxis===at.yaxis._id&&nt.cliponaxis===!1){at._hasClipOnAxisFalse=!0;break}}}var rt=s.list(ce,null,!0),st;for(oe=0;oe<rt.length;oe++){st=rt[oe];var Me=null;st.overlaying&&(Me=s.getFromId(ce,st.overlaying),Me&&Me.overlaying&&(st.overlaying=!1,Me=null)),st._mainAxis=Me||st,Me&&(st.domain=Me.domain.slice()),st._anchorAxis=st.anchor==="free"?null:s.getFromId(ce,st.anchor)}for(oe=0;oe<rt.length;oe++)if(st=rt[oe],st._counterAxes.sort(s.idSort),st._subplotsWith.sort(a.subplotSort),st._mainSubplot=L(st,Y),st._counterAxes.length&&(st.spikemode&&st.spikemode.indexOf("across")!==-1||st.automargin&&st.mirror&&st.anchor!=="free"||t.getComponentMethod("rangeslider","isVisible")(st))){var ye=1,he=0;for(ae=0;ae<st._counterAxes.length;ae++){var Oe=s.getFromId(ce,st._counterAxes[ae]);ye=Math.min(ye,Oe.domain[0]),he=Math.max(he,Oe.domain[1])}ye<he&&(st._counterDomainMin=ye,st._counterDomainMax=he)}};function L(V,Y){var ee={_fullLayout:Y},q=V._id.charAt(0)==="x",oe=V._mainAxis._anchorAxis,ae="",j="",Q="";if(oe&&(Q=oe._mainAxis._id,ae=q?V._id+Q:Q+V._id),!ae||!Y._plots[ae]){ae="";for(var re=V._counterAxes,ce=0;ce<re.length;ce++){var be=re[ce],Ae=q?V._id+be:be+V._id;j||(j=Ae);var De=s.getFromId(ee,be);if(Q&&De.overlaying===Q){ae=Ae;break}}}return ae||j}w.clearExpandedTraceDefaultColors=function(V){var Y,ee,q;function oe(j,Q,re,ce){ee[ce]=Q,ee.length=ce+1,j.valType==="color"&&j.dflt===void 0&&Y.push(ee.join("."))}for(ee=[],Y=V._module._colorAttrs,Y||(V._module._colorAttrs=Y=[],r.crawl(V._module.attributes,oe)),q=0;q<Y.length;q++){var ae=a.nestedProperty(V,"_input."+Y[q]);ae.get()||a.nestedProperty(V,Y[q]).set(null)}},w.supplyDataDefaults=function(V,Y,ee,q){var oe=q._modules,ae=q._visibleModules,j=q._basePlotModules,Q=0,re=0,ce,be,Ae;q._transformModules=[];function De(st){Y.push(st);var Me=st._module;Me&&(a.pushUnique(oe,Me),st.visible===!0&&a.pushUnique(ae,Me),a.pushUnique(j,st._module.basePlotModule),Q++,st._input.visible!==!1&&re++)}var ze={},Ze=[],at=(ee.template||{}).data||{},nt=o.traceTemplater(at);for(ce=0;ce<V.length;ce++)Ae=V[ce],be=nt.newTrace(Ae),be.uid=q._traceUids[ce],w.supplyTraceDefaults(Ae,be,re,q,ce),be.index=ce,be._input=Ae,be._fullInput=be,De(be),t.traceIs(be,"carpetAxis")&&(ze[be.carpet]=be),t.traceIs(be,"carpetDependent")&&Ze.push(ce);for(ce=0;ce<Ze.length;ce++)if(be=Y[Ze[ce]],!!be.visible){var rt=ze[be.carpet];if(be._carpet=rt,!rt||!rt.visible){be.visible=!1;continue}be.xaxis=rt.xaxis,be.yaxis=rt.yaxis}},w.supplyAnimationDefaults=function(V){V=V||{};var Y,ee={};function q(oe,ae){return a.coerce(V||{},ee,m,oe,ae)}if(q("mode"),q("direction"),q("fromcurrent"),Array.isArray(V.frame))for(ee.frame=[],Y=0;Y<V.frame.length;Y++)ee.frame[Y]=w.supplyAnimationFrameDefaults(V.frame[Y]||{});else ee.frame=w.supplyAnimationFrameDefaults(V.frame||{});if(Array.isArray(V.transition))for(ee.transition=[],Y=0;Y<V.transition.length;Y++)ee.transition[Y]=w.supplyAnimationTransitionDefaults(V.transition[Y]||{});else ee.transition=w.supplyAnimationTransitionDefaults(V.transition||{});return ee},w.supplyAnimationFrameDefaults=function(V){var Y={};function ee(q,oe){return a.coerce(V||{},Y,m.frame,q,oe)}return ee("duration"),ee("redraw"),Y},w.supplyAnimationTransitionDefaults=function(V){var Y={};function ee(q,oe){return a.coerce(V||{},Y,m.transition,q,oe)}return ee("duration"),ee("easing"),Y},w.supplyFrameDefaults=function(V){var Y={};function ee(q,oe){return a.coerce(V,Y,p,q,oe)}return ee("group"),ee("name"),ee("traces"),ee("baseframe"),ee("data"),ee("layout"),Y},w.supplyTraceDefaults=function(V,Y,ee,q,oe){var ae=q.colorway||n.defaults,j=ae[ee%ae.length],Q;function re(Me,ye){return a.coerce(V,Y,w.attributes,Me,ye)}var ce=re("visible");re("type"),re("name",q._traceWord+" "+oe),re("uirevision",q.uirevision);var be=w.getModule(Y);if(Y._module=be,be){var Ae=be.basePlotModule,De=Ae.attr,ze=Ae.attributes;if(De&&ze){var Ze=q._subplots,at="";if(Array.isArray(De))for(Q=0;Q<De.length;Q++){var nt=De[Q],rt=a.coerce(V,Y,ze,nt);Ze[nt]&&a.pushUnique(Ze[nt],rt),at+=rt}else at=a.coerce(V,Y,ze,De);Ze[Ae.name]&&a.pushUnique(Ze[Ae.name],at)}}if(ce&&(re("customdata"),re("ids"),re("meta"),t.traceIs(Y,"showLegend")?(a.coerce(V,Y,be.attributes.showlegend?be.attributes:w.attributes,"showlegend"),a.coerce(V,Y,be.attributes.legend?be.attributes:w.attributes,"legend"),re("legendwidth"),re("legendgroup"),re("legendgrouptitle.text"),re("legendrank"),Y._dfltShowLegend=!0):Y._dfltShowLegend=!1,be&&be.supplyDefaults(V,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(V,Y,q),Y.type!=="parcats"&&t.getComponentMethod("fx","supplyDefaults")(V,Y,j,q)),be&&be.selectPoints)){var st=re("selectedpoints");a.isTypedArray(st)&&(Y.selectedpoints=Array.from(st))}return Y},w.supplyLayoutGlobalDefaults=function(V,Y,ee){function q(Ae,De){return a.coerce(V,Y,w.layoutAttributes,Ae,De)}var oe=V.template;a.isPlainObject(oe)&&(Y.template=oe,Y._template=oe.layout,Y._dataTemplate=oe.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 ce=q("uniformtext.mode");ce&&q("uniformtext.minsize"),q("autosize",!(V.width&&V.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"),V.width&&V.height&&w.sanitizeMargins(Y),t.getComponentMethod("grid","sizeDefaults")(V,Y),q("paper_bgcolor"),q("separators",ee.decimal+ee.thousands),q("hidesources"),q("colorway"),q("datarevision");var be=q("uirevision");q("editrevision",be),q("selectionrevision",be),t.getComponentMethod("modebar","supplyLayoutDefaults")(V,Y),t.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(V,Y,q),t.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(V,Y,q),q("meta"),a.isPlainObject(V.transition)&&(q("transition.duration"),q("transition.easing"),q("transition.ordering")),t.getComponentMethod("calendars","handleDefaults")(V,Y,"calendar"),t.getComponentMethod("fx","supplyLayoutGlobalDefaults")(V,Y,q),a.coerce(V,Y,c,"scattermode")};function z(V){return typeof V=="string"&&V.slice(-2)==="px"&&parseFloat(V)}w.plotAutoSize=function(Y,ee,q){var oe=Y._context||{},ae=oe.frameMargins,j,Q,re=a.isPlotDiv(Y);if(re&&Y.emit("plotly_autosize"),oe.fillFrame)j=window.innerWidth,Q=window.innerHeight,document.body.style.overflow="hidden";else{var ce=re?window.getComputedStyle(Y):{};if(j=z(ce.width)||z(ce.maxWidth)||q.width,Q=z(ce.height)||z(ce.maxHeight)||q.height,E(ae)&&ae>0){var be=1-2*ae;j=Math.round(be*j),Q=Math.round(be*Q)}}var Ae=w.layoutAttributes.width.min,De=w.layoutAttributes.height.min;j<Ae&&(j=Ae),Q<De&&(Q=De);var ze=!ee.width&&Math.abs(q.width-j)>1,Ze=!ee.height&&Math.abs(q.height-Q)>1;(Ze||ze)&&(ze&&(q.width=j),Ze&&(q.height=Q)),Y._initialAutoSize||(Y._initialAutoSize={width:j,height:Q}),w.sanitizeMargins(q)},w.supplyLayoutModuleDefaults=function(V,Y,ee,q){var oe=t.componentsRegistry,ae=Y._basePlotModules,j,Q,re,ce=t.subplotsRegistry.cartesian;for(j in oe)re=oe[j],re.includeBasePlot&&re.includeBasePlot(V,Y);ae.length||ae.push(ce),Y._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(V,Y),ce.finalizeSubplots(V,Y));for(var be in Y._subplots)Y._subplots[be].sort(a.subplotSort);for(Q=0;Q<ae.length;Q++)re=ae[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(V,Y,ee);var Ae=Y._modules;for(Q=0;Q<Ae.length;Q++)re=Ae[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(V,Y,ee);var De=Y._transformModules;for(Q=0;Q<De.length;Q++)re=De[Q],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(V,Y,ee,q);for(j in oe)re=oe[j],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(V,Y,ee)},w.purge=function(V){var Y=V._fullLayout||{};Y._glcontainer!==void 0&&(Y._glcontainer.selectAll(".gl-canvas").remove(),Y._glcontainer.remove(),Y._glcanvas=null),Y._modeBar&&Y._modeBar.destroy(),V._transitionData&&(V._transitionData._interruptCallbacks&&(V._transitionData._interruptCallbacks.length=0),V._transitionData._animationRaf&&window.cancelAnimationFrame(V._transitionData._animationRaf)),a.clearThrottle(),a.clearResponsive(V),delete V.data,delete V.layout,delete V._fullData,delete V._fullLayout,delete V.calcdata,delete V.empty,delete V.fid,delete V.undoqueue,delete V.undonum,delete V.autoplay,delete V.changed,delete V._promises,delete V._redrawTimer,delete V._hmlumcount,delete V._hmpixcount,delete V._transitionData,delete V._transitioning,delete V._initialAutoSize,delete V._transitioningWithDuration,delete V._dragging,delete V._dragged,delete V._dragdata,delete V._hoverdata,delete V._snapshotInProgress,delete V._editing,delete V._mouseDownTime,delete V._legendMouseDownTime,V.removeAllListeners&&V.removeAllListeners()},w.style=function(V){var Y=V._fullLayout._visibleModules,ee=[],q;for(q=0;q<Y.length;q++){var oe=Y[q];oe.style&&a.pushUnique(ee,oe.style)}for(q=0;q<ee.length;q++)ee[q](V)},w.sanitizeMargins=function(V){if(!(!V||!V.margin)){var Y=V.width,ee=V.height,q=V.margin,oe=Y-(q.l+q.r),ae=ee-(q.t+q.b),j;oe<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(V){V._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(V,Y){V._fullLayout._pushmarginIds[Y]=1};function F(V){var Y=V.margin;if(!V._size){var ee=V._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(V.width)-ee.l-ee.r,ee.h=Math.round(V.height)-ee.t-ee.b}V._pushmargin||(V._pushmargin={}),V._pushmarginIds||(V._pushmarginIds={}),V._reservedMargin||(V._reservedMargin={})}var N=2,O=2;w.autoMargin=function(V,Y,ee){var q=V._fullLayout,oe=q.width,ae=q.height,j=q.margin,Q=q.minreducedwidth,re=q.minreducedheight,ce=a.constrain(oe-j.l-j.r,N,Q),be=a.constrain(ae-j.t-j.b,O,re),Ae=Math.max(0,oe-ce),De=Math.max(0,ae-be),ze=q._pushmargin,Ze=q._pushmarginIds;if(j.autoexpand!==!1){if(!ee)delete ze[Y],delete Ze[Y];else{var at=ee.pad;if(at===void 0&&(at=Math.min(12,j.l,j.r,j.t,j.b)),Ae){var nt=(ee.l+ee.r)/Ae;nt>1&&(ee.l/=nt,ee.r/=nt)}if(De){var rt=(ee.t+ee.b)/De;rt>1&&(ee.t/=rt,ee.b/=rt)}var st=ee.xl!==void 0?ee.xl:ee.x,Me=ee.xr!==void 0?ee.xr:ee.x,ye=ee.yt!==void 0?ee.yt:ee.y,he=ee.yb!==void 0?ee.yb:ee.y;ze[Y]={l:{val:st,size:ee.l+at},r:{val:Me,size:ee.r+at},b:{val:he,size:ee.b+at},t:{val:ye,size:ee.t+at}},Ze[Y]=1}if(!q._replotting)return w.doAutoMargin(V)}};function P(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Y=s.list(V,"",!0);for(var ee in Y)if(Y[ee].autoshift||Y[ee].shift)return!0;return!1}w.doAutoMargin=function(V){var Y=V._fullLayout,ee=Y.width,q=Y.height;Y._size||(Y._size={}),F(Y);var oe=Y._size,ae=Y.margin,j={t:0,b:0,l:0,r:0},Q=a.extendFlat({},oe),re=ae.l,ce=ae.r,be=ae.t,Ae=ae.b,De=Y._pushmargin,ze=Y._pushmarginIds,Ze=Y.minreducedwidth,at=Y.minreducedheight;if(ae.autoexpand!==!1){for(var nt in De)ze[nt]||delete De[nt];var rt=V._fullLayout._reservedMargin;for(var st in rt)for(var Me in rt[st]){var ye=rt[st][Me];j[Me]=Math.max(j[Me],ye)}De.base={l:{val:0,size:re},r:{val:1,size:ce},t:{val:1,size:be},b:{val:0,size:Ae}};for(var he in j){var Oe=0;for(var tt in De)tt!=="base"&&E(De[tt][he].size)&&(Oe=De[tt][he].size>Oe?De[tt][he].size:Oe);var ot=Math.max(0,ae[he]-Oe);j[he]=Math.max(0,j[he]-ot)}for(var Qe in De){var Pt=De[Qe].l||{},It=De[Qe].b||{},qt=Pt.val,Wt=Pt.size,kr=It.val,mr=It.size,qr=ee-j.r-j.l,Sr=q-j.t-j.b;for(var Rr in De){if(E(Wt)&&De[Rr].r){var wt=De[Rr].r.val,Ne=De[Rr].r.size;if(wt>qt){var Ke=(Wt*wt+(Ne-qr)*qt)/(wt-qt),Te=(Ne*(1-qt)+(Wt-qr)*(1-wt))/(wt-qt);Ke+Te>re+ce&&(re=Ke,ce=Te)}}if(E(mr)&&De[Rr].t){var Ie=De[Rr].t.val,Ve=De[Rr].t.size;if(Ie>kr){var Ce=(mr*Ie+(Ve-Sr)*kr)/(Ie-kr),Ee=(Ve*(1-kr)+(mr-Sr)*(1-Ie))/(Ie-kr);Ce+Ee>Ae+be&&(Ae=Ce,be=Ee)}}}}}var Pe=a.constrain(ee-ae.l-ae.r,N,Ze),ft=a.constrain(q-ae.t-ae.b,O,at),ct=Math.max(0,ee-Pe),_t=Math.max(0,q-ft);if(ct){var Ct=(re+ce)/ct;Ct>1&&(re/=Ct,ce/=Ct)}if(_t){var ir=(Ae+be)/_t;ir>1&&(Ae/=ir,be/=ir)}if(oe.l=Math.round(re)+j.l,oe.r=Math.round(ce)+j.r,oe.t=Math.round(be)+j.t,oe.b=Math.round(Ae)+j.b,oe.p=Math.round(ae.pad),oe.w=Math.round(ee)-oe.l-oe.r,oe.h=Math.round(q)-oe.t-oe.b,!Y._replotting&&(w.didMarginChange(Q,oe)||P(V))){"_redrawFromAutoMarginCount"in Y?Y._redrawFromAutoMarginCount++:Y._redrawFromAutoMarginCount=1;var rr=3*(1+Object.keys(ze).length);if(Y._redrawFromAutoMarginCount<rr)return t.call("_doPlot",V);Y._size=Q,a.warn("Too many auto-margin redraws.")}U(V)};function U(V){var Y=s.list(V,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(ee){for(var q=0;q<Y.length;q++){var oe=Y[q][ee];oe&&oe()}})}var B=["l","r","t","b","p","w","h"];w.didMarginChange=function(V,Y){for(var ee=0;ee<B.length;ee++){var q=B[ee],oe=V[q],ae=Y[q];if(!E(oe)||Math.abs(ae-oe)>1)return!0}return!1},w.graphJson=function(V,Y,ee,q,oe,ae){(oe&&Y&&!V._fullData||oe&&!Y&&!V._fullLayout)&&w.supplyDefaults(V);var j=oe?V._fullData:V.data,Q=oe?V._fullLayout:V.layout,re=(V._transitionData||{})._frames;function ce(De,ze){if(typeof De=="function")return ze?"_function_":null;if(a.isPlainObject(De)){var Ze={},at;return Object.keys(De).sort().forEach(function(Me){if(["_","["].indexOf(Me.charAt(0))===-1){if(typeof De[Me]=="function"){ze&&(Ze[Me]="_function");return}if(ee==="keepdata"){if(Me.slice(-3)==="src")return}else if(ee==="keepstream"){if(at=De[Me+"src"],typeof at=="string"&&at.indexOf(":")>0&&!a.isPlainObject(De.stream))return}else if(ee!=="keepall"&&(at=De[Me+"src"],typeof at=="string"&&at.indexOf(":")>0))return;Ze[Me]=ce(De[Me],ze)}}),Ze}var nt=Array.isArray(De),rt=a.isTypedArray(De);if((nt||rt)&&De.dtype&&De.shape){var st=De.bdata;return ce({dtype:De.dtype,shape:De.shape,bdata:a.isArrayBuffer(st)?e.encode(st):st},ze)}return nt?De.map(function(Me){return ce(Me,ze)}):rt?a.simpleMap(De,a.identity):a.isJSDate(De)?a.ms2DateTimeLocal(+De):De}var be={data:(j||[]).map(function(De){var ze=ce(De);return Y&&delete ze.fit,ze})};if(!Y&&(be.layout=ce(Q),oe)){var Ae=Q._size;be.layout.computed={margin:{b:Ae.b,l:Ae.l,r:Ae.r,t:Ae.t}}}return re&&(be.frames=ce(re)),ae&&(be.config=ce(V._context,!0)),q==="object"?be:JSON.stringify(be)},w.modifyFrames=function(V,Y){var ee,q,oe,ae=V._transitionData._frames,j=V._transitionData._frameHash;for(ee=0;ee<Y.length;ee++)switch(q=Y[ee],q.type){case"replace":oe=q.value;var Q=(ae[q.index]||{}).name,re=oe.name;ae[q.index]=j[re]=oe,re!==Q&&(delete j[Q],j[re]=oe);break;case"insert":oe=q.value,j[oe.name]=oe,ae.splice(q.index,0,oe);break;case"delete":oe=ae[q.index],delete j[oe.name],ae.splice(q.index,1);break}return Promise.resolve()},w.computeFrame=function(V,Y){var ee=V._transitionData._frameHash,q,oe,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],ce=[Q.name];Q.baseframe&&(Q=ee[Q.baseframe.toString()])&&ce.indexOf(Q.name)===-1;)re.push(Q),ce.push(Q.name);for(var be={};Q=re.pop();)if(Q.layout&&(be.layout=w.extendLayout(be.layout,Q.layout)),Q.data){if(be.data||(be.data=[]),oe=Q.traces,!oe)for(oe=[],q=0;q<Q.data.length;q++)oe[q]=q;for(be.traces||(be.traces=[]),q=0;q<Q.data.length;q++)ae=oe[q],ae!=null&&(j=be.traces.indexOf(ae),j===-1&&(j=be.data.length,be.traces[j]=ae),be.data[j]=w.extendTrace(be.data[j],Q.data[q]))}return be},w.recomputeFrameHash=function(V){for(var Y=V._transitionData._frameHash={},ee=V._transitionData._frames,q=0;q<ee.length;q++){var oe=ee[q];oe&&oe.name&&(Y[oe.name]=oe)}},w.extendObjectWithContainers=function(V,Y,ee){var q,oe,ae,j,Q,re,ce,be,Ae=a.extendDeepNoArrays({},Y||{}),De=a.expandObjectPaths(Ae),ze={};if(ee&&ee.length)for(ae=0;ae<ee.length;ae++)q=a.nestedProperty(De,ee[ae]),oe=q.get(),oe===void 0?a.nestedProperty(ze,ee[ae]).set(null):(q.set(null),a.nestedProperty(ze,ee[ae]).set(oe));if(V=a.extendDeepNoArrays(V||{},De),ee&&ee.length){for(ae=0;ae<ee.length;ae++)if(Q=a.nestedProperty(ze,ee[ae]),ce=Q.get(),!!ce){for(re=a.nestedProperty(V,ee[ae]),be=re.get(),Array.isArray(be)||(be=[],re.set(be)),j=0;j<ce.length;j++){var Ze=ce[j];Ze===null?be[j]=null:be[j]=w.extendObjectWithContainers(be[j],Ze)}re.set(be)}}return V},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=t.layoutArrayContainers,w.extendTrace=function(V,Y){return w.extendObjectWithContainers(V,Y,w.dataArrayContainers)},w.extendLayout=function(V,Y){return w.extendObjectWithContainers(V,Y,w.layoutArrayContainers)},w.transition=function(V,Y,ee,q,oe,ae){var j={redraw:oe.redraw},Q={},re=[];return j.prepareFn=function(){for(var ce=Array.isArray(Y)?Y.length:0,be=q.slice(0,ce),Ae=0;Ae<be.length;Ae++){var De=be[Ae],ze=V._fullData[De],Ze=ze._module;if(Ze){if(Ze.animatable){var at=Ze.basePlotModule.name;Q[at]||(Q[at]=[]),Q[at].push(De)}V.data[be[Ae]]=w.extendTrace(V.data[be[Ae]],Y[Ae])}}var nt=a.expandObjectPaths(a.extendDeepNoArrays({},ee)),rt=/^[xy]axis[0-9]*$/;for(var st in nt)rt.test(st)&&delete nt[st].range;w.extendLayout(V.layout,nt),delete V.calcdata,w.supplyDefaults(V),w.doCalcdata(V);var Me=a.expandObjectPaths(ee);if(Me){var ye=V._fullLayout._plots;for(var he in ye){var Oe=ye[he],tt=Oe.xaxis,ot=Oe.yaxis,Qe=tt.range.slice(),Pt=ot.range.slice(),It=null,qt=null,Wt=null,kr=null;Array.isArray(Me[tt._name+".range"])?It=Me[tt._name+".range"].slice():Array.isArray((Me[tt._name]||{}).range)&&(It=Me[tt._name].range.slice()),Array.isArray(Me[ot._name+".range"])?qt=Me[ot._name+".range"].slice():Array.isArray((Me[ot._name]||{}).range)&&(qt=Me[ot._name].range.slice()),Qe&&It&&(tt.r2l(Qe[0])!==tt.r2l(It[0])||tt.r2l(Qe[1])!==tt.r2l(It[1]))&&(Wt={xr0:Qe,xr1:It}),Pt&&qt&&(ot.r2l(Pt[0])!==ot.r2l(qt[0])||ot.r2l(Pt[1])!==ot.r2l(qt[1]))&&(kr={yr0:Pt,yr1:qt}),(Wt||kr)&&re.push(a.extendFlat({plotinfo:Oe},Wt,kr))}}return Promise.resolve()},j.runFn=function(ce){var be,Ae=V._fullLayout._basePlotModules,De=re.length,ze;if(ee)for(ze=0;ze<Ae.length;ze++)Ae[ze].transitionAxes&&Ae[ze].transitionAxes(V,re,ae,ce);De?(be=a.extendFlat({},ae),be.duration=0,delete Q.cartesian):be=ae;for(var Ze in Q){var at=Q[Ze],nt=V._fullData[at[0]]._module;nt.basePlotModule.plot(V,at,be,ce)}},X(V,ae,j)},w.transitionFromReact=function(V,Y,ee,q){var oe=V._fullLayout,ae=oe.transition,j={},Q=[];return j.prepareFn=function(){var re=oe._plots;j.redraw=!1,Y.anim==="some"&&(j.redraw=!0),ee.anim==="some"&&(j.redraw=!0);for(var ce in re){var be=re[ce],Ae=be.xaxis,De=be.yaxis,ze=q[Ae._name].range.slice(),Ze=q[De._name].range.slice(),at=Ae.range.slice(),nt=De.range.slice();Ae.setScale(),De.setScale();var rt=null,st=null;(Ae.r2l(ze[0])!==Ae.r2l(at[0])||Ae.r2l(ze[1])!==Ae.r2l(at[1]))&&(rt={xr0:ze,xr1:at}),(De.r2l(Ze[0])!==De.r2l(nt[0])||De.r2l(Ze[1])!==De.r2l(nt[1]))&&(st={yr0:Ze,yr1:nt}),(rt||st)&&Q.push(a.extendFlat({plotinfo:be},rt,st))}return Promise.resolve()},j.runFn=function(re){for(var ce=V._fullData,be=V._fullLayout,Ae=be._basePlotModules,De,ze,Ze,at=[],nt=0;nt<ce.length;nt++)at.push(nt);function rt(){if(V._fullLayout)for(var Me=0;Me<Ae.length;Me++)Ae[Me].transitionAxes&&Ae[Me].transitionAxes(V,Q,De,re)}function st(){if(V._fullLayout)for(var Me=0;Me<Ae.length;Me++)Ae[Me].plot(V,Ze,ze,re)}Q.length&&Y.anim?ae.ordering==="traces first"?(De=a.extendFlat({},ae,{duration:0}),Ze=at,ze=ae,setTimeout(rt,ae.duration),st()):(De=ae,Ze=null,ze=a.extendFlat({},ae,{duration:0}),setTimeout(st,De.duration),rt()):Q.length?(De=ae,rt()):Y.anim&&(Ze=at,ze=ae,st())},X(V,ae,j)};function X(V,Y,ee){var q=!1;function oe(Ae){var De=Promise.resolve();if(!Ae)return De;for(;Ae.length;)De=De.then(Ae.shift());return De}function ae(Ae){if(Ae)for(;Ae.length;)Ae.shift()}function j(){return V.emit("plotly_transitioning",[]),new Promise(function(Ae){V._transitioning=!0,Y.duration>0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){q=!0}),ee.redraw&&V._transitionData._interruptCallbacks.push(function(){return t.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var De=0,ze=0;function Ze(){return De++,function(){ze++,!q&&ze===De&&Q(Ae)}}ee.runFn(Ze),setTimeout(Ze())})}function Q(Ae){if(V._transitionData)return ae(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ee.redraw)return t.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(Ae)}function re(){if(V._transitionData)return V._transitioning=!1,oe(V._transitionData._interruptCallbacks)}var ce=[w.previousPromises,re,ee.prepareFn,w.rehover,w.reselect,j],be=a.syncOrAsync(ce,V);return(!be||!be.then)&&(be=Promise.resolve()),be.then(function(){return V})}w.doCalcdata=function(V,Y){var ee=s.list(V),q=V._fullData,oe=V._fullLayout,ae,j,Q,re,ce=new Array(q.length),be=(V.calcdata||[]).slice();for(V.calcdata=ce,oe._numBoxes=0,oe._numViolins=0,oe._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,oe._piecolormap={},oe._sunburstcolormap={},oe._treemapcolormap={},oe._iciclecolormap={},oe._funnelareacolormap={},Q=0;Q<q.length;Q++)if(Array.isArray(Y)&&Y.indexOf(Q)===-1){ce[Q]=be[Q];continue}for(Q=0;Q<q.length;Q++)ae=q[Q],ae._arrayAttrs=r.findArrayAttributes(ae),ae._extremes={};var Ae=oe._subplots.polar||[];for(Q=0;Q<Ae.length;Q++)ee.push(oe[Ae[Q]].radialaxis,oe[Ae[Q]].angularaxis);for(var De in oe._colorAxes){var ze=oe[De];ze.cauto!==!1&&(delete ze.cmin,delete ze.cmax)}var Ze=!1;function at(st){if(ae=q[st],j=ae._module,ae.visible===!0&&ae.transforms){if(j&&j.calc){var Me=j.calc(V,ae);Me[0]&&Me[0].t&&Me[0].t._scene&&delete Me[0].t._scene.dirty}for(re=0;re<ae.transforms.length;re++){var ye=ae.transforms[re];j=transformsRegistry[ye.type],j&&j.calcTransform&&(ae._hasCalcTransform=!0,Ze=!0,j.calcTransform(V,ae,ye))}}}function nt(st,Me){if(ae=q[st],j=ae._module,!!j.isContainer===Me){var ye=[];if(ae.visible===!0&&ae._length!==0){delete ae._indexToPoints;var he=ae.transforms||[];for(re=he.length-1;re>=0;re--)if(he[re].enabled){ae._indexToPoints=he[re]._indexToPoints;break}j&&j.calc&&(ye=j.calc(V,ae))}(!Array.isArray(ye)||!ye[0])&&(ye=[{x:i,y:i}]),ye[0].t||(ye[0].t={}),ye[0].trace=ae,ce[st]=ye}}for(le(ee,q,oe),Q=0;Q<q.length;Q++)nt(Q,!0);for(Q=0;Q<q.length;Q++)at(Q);for(Ze&&le(ee,q,oe),Q=0;Q<q.length;Q++)nt(Q,!0);for(Q=0;Q<q.length;Q++)nt(Q,!1);fe(V);var rt=se(ee,V);if(rt.length){for(oe._numBoxes=0,oe._numViolins=0,Q=0;Q<rt.length;Q++)nt(rt[Q],!0);for(Q=0;Q<rt.length;Q++)nt(rt[Q],!1);fe(V)}t.getComponentMethod("fx","calc")(V),t.getComponentMethod("errorbars","calc")(V)};var $=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function se(V,Y){var ee=[],q,oe,ae,j,Q;function re(Rr,wt,Ne){var Ke=wt._id.charAt(0);if(Rr==="histogram2dcontour"){var Te=wt._counterAxes[0],Ie=s.getFromId(Y,Te),Ve=Ke==="x"||Te==="x"&&Ie.type==="category",Ce=Ke==="y"||Te==="y"&&Ie.type==="category";return function(Ee,Pe){return Ee===0||Pe===0||Ve&&Ee===Ne[Pe].length-1||Ce&&Pe===Ne.length-1?-1:(Ke==="y"?Pe:Ee)-1}}else return function(Ee,Pe){return Ke==="y"?Pe:Ee}}var ce={min:function(Rr){return a.aggNums(Math.min,null,Rr)},max:function(Rr){return a.aggNums(Math.max,null,Rr)},sum:function(Rr){return a.aggNums(function(wt,Ne){return wt+Ne},null,Rr)},total:function(Rr){return a.aggNums(function(wt,Ne){return wt+Ne},null,Rr)},mean:function(Rr){return a.mean(Rr)},"geometric mean":function(Rr){return a.geometricMean(Rr)},median:function(Rr){return a.median(Rr)}};function be(Rr,wt){return Rr[1]-wt[1]}function Ae(Rr,wt){return wt[1]-Rr[1]}for(q=0;q<V.length;q++){var De=V[q];if(De.type==="category"){var ze=De.categoryorder.match($);if(ze){var Ze=ze[1],at=ze[2],nt=De._id.charAt(0),rt=nt==="x",st=[];for(oe=0;oe<De._categories.length;oe++)st.push([De._categories[oe],[]]);for(oe=0;oe<De._traceIndices.length;oe++){var Me=De._traceIndices[oe],ye=Y._fullData[Me];if(ye.visible===!0){var he=ye.type;t.traceIs(ye,"histogram")&&(delete ye._xautoBinFinished,delete ye._yautoBinFinished);var Oe=he==="splom",tt=he==="scattergl",ot=Y.calcdata[Me];for(ae=0;ae<ot.length;ae++){var Qe=ot[ae],Pt,It;if(Oe){var qt=ye._axesDim[De._id];if(!rt){var Wt=ye._diag[qt][0];Wt&&(De=Y._fullLayout[s.id2name(Wt)])}var kr=Qe.trace.dimensions[qt].values;for(j=0;j<kr.length;j++)for(Pt=De._categoriesMap[kr[j]],Q=0;Q<Qe.trace.dimensions.length;Q++)if(Q!==qt){var mr=Qe.trace.dimensions[Q];st[Pt][1].push(mr.values[j])}}else if(tt){for(j=0;j<Qe.t.x.length;j++)rt?(Pt=Qe.t.x[j],It=Qe.t.y[j]):(Pt=Qe.t.y[j],It=Qe.t.x[j]),st[Pt][1].push(It);Qe.t&&Qe.t._scene&&delete Qe.t._scene.dirty}else if(Qe.hasOwnProperty("z")){It=Qe.z;var qr=re(ye.type,De,It);for(j=0;j<It.length;j++)for(Q=0;Q<It[j].length;Q++)Pt=qr(Q,j),Pt+1&&st[Pt][1].push(It[j][Q])}else for(Pt=Qe.p,Pt===void 0&&(Pt=Qe[nt]),It=Qe.s,It===void 0&&(It=Qe.v),It===void 0&&(It=rt?Qe.y:Qe.x),Array.isArray(It)||(It===void 0?It=[]:It=[It]),j=0;j<It.length;j++)st[Pt][1].push(It[j])}}}De._categoriesValue=st;var Sr=[];for(oe=0;oe<st.length;oe++)Sr.push([st[oe][0],ce[Ze](st[oe][1])]);Sr.sort(at==="descending"?Ae:be),De._categoriesAggregatedValue=Sr,De._initialCategories=Sr.map(function(Rr){return Rr[0]}),ee=ee.concat(De.sortByInitialCategories())}}}return ee}function le(V,Y,ee){var q={};function oe(re){re.clearCalc(),re.type==="multicategory"&&re.setupMultiCategory(Y),q[re._id]=1}a.simpleMap(V,oe);for(var ae=ee._axisMatchGroups||[],j=0;j<ae.length;j++)for(var Q in ae[j])q[Q]||oe(ee[s.id2name(Q)])}function fe(V){var Y=V._fullLayout,ee=Y._visibleModules,q={},oe,ae,j;for(ae=0;ae<ee.length;ae++){var Q=ee[ae],re=Q.crossTraceCalc;if(re){var ce=Q.basePlotModule.name;q[ce]?a.pushUnique(q[ce],re):q[ce]=[re]}}for(j in q){var be=q[j],Ae=Y._subplots[j];if(Array.isArray(Ae))for(oe=0;oe<Ae.length;oe++){var De=Ae[oe],ze=j==="cartesian"?Y._plots[De]:Y[De];for(ae=0;ae<be.length;ae++)be[ae](V,ze,De)}else for(ae=0;ae<be.length;ae++)be[ae](V)}}w.rehover=function(V){V._fullLayout._rehover&&V._fullLayout._rehover()},w.redrag=function(V){V._fullLayout._redrag&&V._fullLayout._redrag()},w.reselect=function(V){var Y=V._fullLayout,ee=(V.layout||{}).selections,q=Y._previousSelections;Y._previousSelections=ee;var oe=Y._reselect||JSON.stringify(ee)!==JSON.stringify(q);t.getComponentMethod("selections","reselect")(V,oe)},w.generalUpdatePerTraceModule=function(V,Y,ee,q){var oe=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 ce in oe)if(!ae[ce]){var be=oe[ce][0],Ae=be[0].trace;Ae.visible=!1,ae[ce]=[be]}for(var De in ae){var ze=ae[De],Ze=ze[0][0].trace._module;Ze.plot(V,Y,a.filterVisible(ze),q)}Y.traceHash=ae},w.plotBasePlot=function(V,Y,ee,q,oe){var ae=t.getModule(V),j=T(Y.calcdata,ae)[0];ae.plot(Y,j,q,oe)},w.cleanBasePlot=function(V,Y,ee,q,oe){var ae=oe._has&&oe._has(V),j=ee._has&&ee._has(V);ae&&!j&&oe["_"+V+"layer"].selectAll("g.trace").remove()}}}),vd=Xe({"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=Xe({"src/constants/alignment.js"(Z,G){"use strict";G.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=Xe({"src/lib/svg_text_utils.js"(Z){"use strict";var G=Hn(),v=sa(),x=v.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),$=G.select(O.node().parentNode);if($.empty())return;var se=O.attr("class")?O.attr("class").split(" ")[0]:"text";se+="-math",$.selectAll("svg."+se).remove(),$.selectAll("g."+se+"-group").remove(),O.style("display",null).attr({"data-unformatted":B,"data-math":"N"});function le(){$.empty()||(se=O.attr("class")+"-math",$.select("svg."+se).remove()),O.text("").style("white-space","pre");var fe=L(O.node(),B);fe&&O.style("pointer-events","all"),Z.positionText(O),U&&U.call(O)}return X?(P&&P._promises||[]).push(new Promise(function(fe){O.style("display","none");var V=parseInt(O.node().style.fontSize,10),Y={fontSize:V};n(X[2],Y,function(ee,q,oe){$.selectAll("svg."+se).remove(),$.selectAll("g."+se+"-group").remove();var ae=ee&&ee.select("svg");if(!ae||!ae.node()){le(),fe();return}var j=$.append("g").classed(se+"-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=oe.width,re=oe.height;ae.attr({class:se,height:re,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ce=O.node().style.fill||"black",be=ae.select("g");be.attr({fill:ce,stroke:ce});var Ae=be.node().getBoundingClientRect(),De=Ae.width,ze=Ae.height;(De>Q||ze>re)&&(ae.style("overflow","hidden"),Ae=ae.node().getBoundingClientRect(),De=Ae.width,ze=Ae.height);var Ze=+O.attr("x"),at=+O.attr("y"),nt=V||O.node().getBoundingClientRect().height,rt=-nt/4;if(se[0]==="y")j.attr({transform:"rotate("+[-90,Ze,at]+")"+x(-De/2,rt-ze/2)});else if(se[0]==="l")at=rt-ze/2;else if(se[0]==="a"&&se.indexOf("atitle")!==0)Ze=0,at=rt;else{var st=O.attr("text-anchor");Ze=Ze-De*(st==="middle"?.5:st==="end"?1:0),at=at+rt-ze/2}ae.attr({x:Ze,y:at}),U&&U.call(O,j),fe(j)})})):le(),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){v.warn("No MathJax version:",MathJax.version);return}var X,$,se,le,fe=function(){return $=v.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},V=function(){$=v.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 ce="math-output-"+v.randstr({},64);le=G.select("body").append("div").attr({id:ce}).style({visibility:"hidden",position:"absolute","font-size":P.fontSize+"px"}).text(o(O));var be=le.node();return B===2?MathJax.Hub.Typeset(be):MathJax.typeset([be])},oe=function(){var ce=le.select(B===2?".MathJax_SVG":".MathJax"),be=!ce.empty()&&le.select("svg").node();if(!be)v.log("There was an error in the tex syntax.",O),U();else{var Ae=be.getBoundingClientRect(),De;B===2?De=G.select("body").select("#MathJax_SVG_glyphs"):De=ce.select("defs"),U(ce,De,Ae)}le.remove()},ae=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},j=function(){X!=="svg"&&(MathJax.config.startup.output=X)},Q=function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config($)},re=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(fe,Y,q,oe,ae,Q):B===3&&(V(),ee(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){q(),oe(),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"},c="\u200B",m=["http:","https:","mailto:","",void 0,":"],p=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&&f(B)}var d=/(^|;)\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,se=O.split(T),le=[],fe="",V=0,Y=0;Y<se.length;Y++){var ee=se[Y],q=ee.match(l),oe=q&&q[2].toLowerCase();if(oe)B.indexOf(oe)!==-1&&(le.push(ee),fe=oe);else{var ae=ee.length;if(V+ae<U)le.push(ee),V+=ae;else if(V<U){var j=U-V;fe&&(fe!=="br"||j<=$||ae<=$)&&le.pop(),U>$?le.push(ee.slice(0,Math.max(0,j-$))+X):le.push(ee.slice(0,j));break}fe=""}}return le.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 f(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=f;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(p," ");var U=!1,B=[],X,$=-1;function se(){$++;var ze=document.createElementNS(S.svg,"tspan");G.select(ze).attr({class:"line",dy:$*E+"em"}),O.appendChild(ze),X=ze;var Ze=B;if(B=[{node:ze}],Ze.length>1)for(var at=1;at<Ze.length;at++)le(Ze[at])}function le(ze){var Ze=ze.type,at={},nt;if(Ze==="a"){nt="a";var rt=ze.target,st=ze.href,Me=ze.popup;st&&(at={"xlink:xlink:show":rt==="_blank"||rt.charAt(0)!=="_"?"new":"replace",target:rt,"xlink:xlink:href":st},Me&&(at.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Me+'");return false;'))}else nt="tspan";ze.style&&(at.style=ze.style);var ye=document.createElementNS(S.svg,nt);if(Ze==="sup"||Ze==="sub"){fe(X,c),X.appendChild(ye);var he=document.createElementNS(S.svg,"tspan");fe(he,c),G.select(he).attr("dy",h[Ze]),at.dy=s[Ze],X.appendChild(ye),X.appendChild(he)}else X.appendChild(ye);G.select(ye).attr(at),X=ze.node=ye,B.push(ze)}function fe(ze,Ze){ze.appendChild(document.createTextNode(Ze))}function V(ze){if(B.length===1){v.log("Ignoring unexpected end tag </"+ze+">.",P);return}var Ze=B.pop();ze!==Ze.type&&v.log("Start tag <"+Ze.type+"> doesnt match end tag <"+ze+">. Pretending it did match.",P),X=B[B.length-1].node}var Y=_.test(P);Y?se():(X=O,B=[{node:O}]);for(var ee=P.split(T),q=0;q<ee.length;q++){var oe=ee[q],ae=oe.match(l),j=ae&&ae[2].toLowerCase(),Q=i[j];if(j==="br")se();else if(Q===void 0)fe(X,f(oe));else if(ae[1])V(j);else{var re=ae[4],ce={type:j},be=b(re,w);if(be?(be=be.replace(d,"$1 fill:"),Q&&(be+=";"+Q)):Q&&(be=Q),be&&(ce.style=be),j==="a"){U=!0;var Ae=b(re,A);if(Ae){var De=z(Ae);De&&(ce.href=De,ce.target=b(re,M)||"_blank",ce.popup=b(re,g))}}le(ce)}}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 m.indexOf(X)!==-1&&m.indexOf($)!==-1?P:""}Z.sanitizeHTML=function(P){P=P.replace(p," ");for(var U=document.createElement("p"),B=U,X=[],$=P.split(T),se=0;se<$.length;se++){var le=$[se],fe=le.match(l),V=fe&&fe[2].toLowerCase();if(V in i)if(fe[1])X.length&&(B=X.pop());else{var Y=fe[4],ee=b(Y,w),q=ee?{style:ee}:{};if(V==="a"){var oe=b(Y,A);if(oe){var ae=z(oe);if(ae){q.href=ae;var j=b(Y,M);j&&(q.target=j)}}}var Q=document.createElement(V);B.appendChild(Q),G.select(Q).attr(q),B=Q,X.push(Q)}else B.appendChild(document.createTextNode(f(le)))}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=G.select(this);function $(fe,V){return V===void 0?(V=X.attr(fe),V===null&&(X.attr(fe,0),V=0)):X.attr(fe,V),V}var se=$("x",U),le=$("y",B);this.nodeName==="text"&&X.selectAll("tspan.line").attr({x:se,y:le})})};function F(O,P,U){var B=U.horizontalAlign,X=U.verticalAlign||"top",$=O.node().getBoundingClientRect(),se=P.node().getBoundingClientRect(),le,fe,V;return X==="bottom"?fe=function(){return $.bottom-le.height}:X==="middle"?fe=function(){return $.top+($.height-le.height)/2}:fe=function(){return $.top},B==="right"?V=function(){return $.right-le.width}:B==="center"?V=function(){return $.left+($.width-le.width)/2}:V=function(){return $.left},function(){le=this.node().getBoundingClientRect();var Y=V()-se.left,ee=fe()-se.top,q=U.gd||{};if(U.gd){q._fullLayout._calcInverseTransform(q);var oe=v.apply3DTransform(q._fullLayout._invTransform)(Y,ee);Y=oe[0],ee=oe[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=G.dispatch("edit","input","cancel"),$=B||O;if(O.style({"pointer-events":B?"none":"all"}),O.size()!==1)throw new Error("boo");function se(){fe(),O.style({opacity:0});var V=$.attr("class"),Y;V?Y="."+V.split(" ")[0]+"-math-group":Y="[class*=-math-group]",Y&&G.select(O.node().parentNode).select(Y).style({opacity:0})}function le(V){var Y=V.node(),ee=document.createRange();ee.selectNodeContents(Y);var q=window.getSelection();q.removeAllRanges(),q.addRange(ee),Y.focus()}function fe(){var V=G.select(U),Y=V.select(".svg-container"),ee=Y.append("div"),q=O.node().style,oe=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":oe,color:P.fill||q.fill||"black",opacity:1,"background-color":P.background||"transparent",outline:"#ffffff33 1px solid",margin:[-oe/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=G.select(this).attr("class"),Q;j?Q="."+j.split(" ")[0]+"-math-group":Q="[class*=-math-group]",Q&&G.select(O.node().parentNode).select(Q).style({opacity:0});var re=this.textContent;G.select(this).transition().duration(0).remove(),G.select(document).on("mouseup",null),X.edit.call(O,re)}).on("focus",function(){var j=this;U._editing=!0,G.select(document).on("mouseup",function(){if(G.event.target===j)return!1;document.activeElement===ee.node()&&ee.node().blur()})}).on("keyup",function(){G.event.which===27?(U._editing=!1,O.style({opacity:1}),G.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),X.cancel.call(O,this.textContent)):(X.input.call(O,this.textContent),G.select(this).call(F(O,Y,P)))}).on("keydown",function(){G.event.which===13&&this.blur()}).call(le)}return P.immediate?se():$.on("click",se),G.rebind(O,X,"on")}}}),wp=Xe({"src/components/colorscale/helpers.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=rs(),E=sa(),e=$n(),t=W0().isValid;function r(p,T,l){var _=T?E.nestedProperty(p,T).get()||{}:p,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(p){var T=p._colorAx,l=T||p,_={},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,d){var u=a.indexOf(b)!==-1?w+b:b;l[u]=l["_"+u]=d},_}function i(p){for(var T=n(p),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 d=w[b];M[b]=l+d[0]*(_-l),g[b]=d[1]}return{domain:M,range:g}}function s(p){for(var T=p.length,l=new Array(T),_=T-1,w=0;_>=0;_--,w++){var A=p[_];l[w]=[1-A[0],A[1]]}return l}function h(p,T){T=T||{};for(var l=p.domain,_=p.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=v.scale.linear().domain(l).range(A).clamp(!0),d=T.noNumericCheck,u=T.returnArray,y;return d&&u?y=b:d?y=function(f){return m(b(f))}:u?y=function(f){return S(f)?b(f):x(f).isValid()?f:e.defaultLine}:y=function(f){return S(f)?m(b(f)):x(f).isValid()?f:e.defaultLine},y.domain=b.domain,y.range=function(){return _},y}function c(p,T){return h(i(p),T)}function m(p){var T={r:p[0],g:p[1],b:p[2],a:p[3]};return x(T).toRgbString()}G.exports={hasColorscale:r,extractOpts:n,extractScale:i,flipScale:s,makeColorScaleFunc:h,makeColorScaleFuncFromTrace:c}}}),tf=Xe({"src/plots/cartesian/axis_format_attributes.js"(Z,G){"use strict";var v=t5(),x=v.FORMAT_LINK,S=v.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(" ")}G.exports={axisHoverFormat:E,descriptionOnlyNumbers:e,descriptionWithDates:t}}}),Wh=Xe({"src/plots/cartesian/layout_attributes.js"(Z,G){"use strict";var v=tc(),x=sh(),S=Gh().dash,E=Qo().extendFlat,e=zl().templatedArray,t=Jl().templateFormatStringDescription,r=tf().descriptionWithDates,o=Hs().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 c(u){return{valType:"integer",min:0,dflt:u?5:0,editType:"ticks"}}var m={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},p={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"}),d={valType:"boolean",editType:"ticks"};G.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:x.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:v({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:c(),tick0:m,dtick:p,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:v({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:d,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:c("minor"),tick0:m,dtick:p,tickvals:T,ticks:l,ticklen:_("minor"),tickwidth:w("minor"),tickcolor:A,gridcolor:M,gridwidth:g("minor"),griddash:b,showgrid:d,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=Xe({"src/components/colorbar/attributes.js"(Z,G){"use strict";var v=Wh(),x=tc(),S=Qo().extendFlat,E=pc().overrideAll;G.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:v.linecolor,outlinewidth:v.linewidth,bordercolor:v.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:S({},v.ticks,{dflt:""}),ticklabeloverflow:S({},v.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:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,ticklabelstep:v.ticklabelstep,showticklabels:v.showticklabels,labelalias:v.labelalias,tickfont:x({}),tickangle:v.tickangle,tickformat:v.tickformat,tickformatstops:v.tickformatstops,tickprefix:v.tickprefix,showtickprefix:v.showtickprefix,ticksuffix:v.ticksuffix,showticksuffix:v.showticksuffix,separatethousands:v.separatethousands,exponentformat:v.exponentformat,minexponent:v.minexponent,showexponent:v.showexponent,title:{text:{valType:"string"},font:x({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),ku=Xe({"src/components/colorscale/attributes.js"(Z,G){"use strict";var v=x2(),x=Jy().counter,S=Jm(),E=W0().scales,e=S(E);function t(r){return"`"+r+"`"}G.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",c=typeof a.colorscaleDflt=="string"?E[a.colorscaleDflt]:null,m=a.editTypeOverride||"",p=o?o+".":"",T,l;"colorAttr"in a?(T=a.colorAttr,l=a.colorAttr):(T={z:"z",c:"color"}[n],l="in "+t(p+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(p+w),d=t(p+A),u=t(p+M),y=d+" and "+u,f={};f[A]=f[M]=void 0;var R={};R[w]=!1;var L={};return T==="color"&&(L.color={valType:"color",arrayOk:!0,editType:m||"style"},a.anim&&(L.color.anim=!0)),L[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:f},L[A]={valType:"number",dflt:null,editType:m||"plot",impliedEdits:R},L[M]={valType:"number",dflt:null,editType:m||"plot",impliedEdits:R},L[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:f},L.colorscale={valType:"colorscale",editType:"calc",dflt:c,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=v),a.noColorAxis||(L.coloraxis={valType:"subplotid",regex:x("coloraxis"),dflt:null,editType:"calc"}),L}}}),o5=Xe({"src/components/colorscale/layout_attributes.js"(Z,G){"use strict";var v=Qo().extendFlat,x=ku(),S=W0().scales;G.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:v({_isSubplotObj:!0,editType:"calc"},x("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),s5=Xe({"src/components/colorbar/has_colorbar.js"(Z,G){"use strict";var v=sa();G.exports=function(S){return v.isPlainObject(S.colorbar)}}}),l5=Xe({"src/plots/cartesian/clean_ticks.js"(Z){"use strict";var G=rs(),v=sa(),x=Hs(),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(G(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=G(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 v.cleanDate(e,v.dateTick0(r,o%E===0?1:0));if(!(o==="D1"||o==="D2"))return G(e)?Number(e):0}}}),Y0=Xe({"src/plots/cartesian/tick_value_defaults.js"(Z,G){"use strict";var v=l5(),x=sa().isArrayOrTypedArray,S=bp().isTypedArraySpec,E=bp().decodeTypedArraySpec;G.exports=function(t,r,o,a,n){n||(n={});var i=n.isMinor,s=i?t.minor||{}:t,h=i?r.minor:r,c=i?"minor.":"";function m(g){var b=s[g];return S(b)&&(b=E(b)),b!==void 0?b:(h._template||{})[g]}var p=m("tick0"),T=m("dtick"),l=m("tickvals"),_=x(l)?"array":T?"linear":"auto",w=o(c+"tickmode",_);if(w==="auto"||w==="sync")o(c+"nticks");else if(w==="linear"){var A=h.dtick=v.dtick(T,a);h.tick0=v.tick0(p,a,r.calendar,A)}else if(a!=="multicategory"){var M=o(c+"tickvals");M===void 0?h.tickmode="auto":i||o("ticktext")}}}}),t1=Xe({"src/plots/cartesian/tick_mark_defaults.js"(Z,G){"use strict";var v=sa(),x=Wh();G.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=v.coerce2(a,n,i,"ticklen",o?(e.ticklen||5)*.6:void 0),c=v.coerce2(a,n,i,"tickwidth",o?e.tickwidth||1:void 0),m=v.coerce2(a,n,i,"tickcolor",(o?e.tickcolor:void 0)||n.color),p=t(s+"ticks",!o&&r.outerTicks||h||c||m?"outside":"");p||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}}),u5=Xe({"src/plots/cartesian/show_dflt.js"(Z,G){"use strict";G.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=Xe({"src/plots/array_container_defaults.js"(Z,G){"use strict";var v=sa(),x=zl();G.exports=function(E,e,t){var r=t.name,o=t.inclusionAttr||"visible",a=e[r],n=v.isArrayOrTypedArray(E[r])?E[r]:[],i=e[r]=[],s=x.arrayTemplater(e,r,o),h,c;for(h=0;h<n.length;h++){var m=n[h];v.isPlainObject(m)?c=s.newItem(m):(c=s.newItem({}),c[o]=!1),c._index=h,c[o]!==!1&&t.handleItemDefaults(m,c,e,t),i.push(c)}var p=s.defaultItems();for(h=0;h<p.length;h++)c=p[h],c._index=i.length,t.handleItemDefaults({},c,e,t,{}),i.push(c);if(v.isArrayOrTypedArray(a)){var T=Math.min(a.length,i.length);for(h=0;h<T;h++)v.relinkPrivateKeys(i[h],a[h])}return i}}}),Qm=Xe({"src/plots/cartesian/tick_label_defaults.js"(Z,G){"use strict";var v=sa(),x=$n().contrast,S=Wh(),E=u5(),e=hp();G.exports=function(o,a,n,i,s){s||(s={});var h=n("labelalias");v.isPlainObject(h)||delete a.labelalias;var c=E(o),m=n("showticklabels");if(m){s.noTicklabelshift||n("ticklabelshift"),s.noTicklabelstandoff||n("ticklabelstandoff");var p=s.font||{},T=a.color,l=a.ticklabelposition||"",_=l.indexOf("inside")!==-1?x(s.bgColor):T&&T!==S.color.dflt?T:p.color;if(v.coerceFont(n,"tickfont",p,{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",c),n("exponentformat"),n("minexponent"),n("separatethousands"))}!s.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function t(r,o){function a(i,s){return v.coerce(r,o,S.tickformatstops,i,s)}var n=a("enabled");n&&(a("dtickrange"),a("value"))}}}),e0=Xe({"src/plots/cartesian/prefix_suffix_defaults.js"(Z,G){"use strict";var v=u5();G.exports=function(S,E,e,t,r){r||(r={});var o=r.tickSuffixDflt,a=v(S),n=e("tickprefix");n&&e("showtickprefix",a);var i=e("ticksuffix",o);i&&e("showticksuffix",a)}}}),c5=Xe({"src/components/colorbar/defaults.js"(Z,G){"use strict";var v=sa(),x=zl(),S=Y0(),E=t1(),e=Qm(),t=e0(),r=x2();G.exports=function(a,n,i){var s=x.newContainer(n,"colorbar"),h=a.colorbar||{};function c(P,U){return v.coerce(h,s,r,P,U)}var m=i.margin||{t:0,b:0,l:0,r:0},p=i.width-m.l-m.r,T=i.height-m.t-m.b,l=c("orientation"),_=l==="v",w=c("thicknessmode");c("thickness",w==="fraction"?30/(_?p:T):30);var A=c("lenmode");c("len",A==="fraction"?1:_?T:p);var M=c("yref"),g=c("xref"),b=M==="paper",d=g==="paper",u,y,f,R="left";_?(f="middle",R=d?"left":"right",u=d?1.02:1,y=.5):(f=b?"bottom":"top",R="center",u=.5,y=b?1.02:1),v.coerce(h,s,{x:{valType:"number",min:d?-2:0,max:d?3:1,dflt:u}},"x"),v.coerce(h,s,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:y}},"y"),c("xanchor",R),c("xpad"),c("yanchor",f),c("ypad"),v.noneOrAll(h,s,["x","y"]),c("outlinecolor"),c("outlinewidth"),c("bordercolor"),c("borderwidth"),c("bgcolor");var L=v.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");c("ticklabeloverflow",L.indexOf("inside")!==-1?"hide past domain":"hide past div"),S(h,s,c,"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,c,"linear",F),e(h,s,c,"linear",F),E(h,s,c,"linear",F),c("title.text",i._dfltTitle.colorbar);var N=s.showticklabels?s.tickfont:z,O=v.extendFlat({},z,{family:N.family,size:v.bigFont(N.size)});v.coerceFont(c,"title.font",O),c("title.side",_?"top":"right")}}}),_h=Xe({"src/components/colorscale/defaults.js"(Z,G){"use strict";var v=rs(),x=sa(),S=s5(),E=c5(),e=W0().isValid,t=so().traceIs;function r(o,a){var n=a.slice(0,a.length-1);return a?x.nestedProperty(o,n).get()||{}:o}G.exports=function o(a,n,i,s,h){var c=h.prefix,m=h.cLetter,p="_module"in n,T=r(a,c),l=r(n,c),_=r(n._template||{},c)||{},w=function(){return delete a.coloraxis,delete n.coloraxis,o(a,n,i,s,h)};if(p){var A=i._colorAxes||{},M=s(c+"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 d=T[m+"min"],u=T[m+"max"],y=v(d)&&v(u)&&d<u,f=s(c+m+"auto",!y);f?s(c+m+"mid"):(s(c+m+"min"),s(c+m+"max"));var R=T.colorscale,L=_.colorscale,z;if(R!==void 0&&(z=!e(R)),L!==void 0&&(z=!e(L)),s(c+"autocolorscale",z),s(c+"colorscale"),s(c+"reversescale"),c!=="marker.line."){var F;c&&p&&(F=S(T));var N=s(c+"showscale",F);N&&(c&&_&&(l._template=_),E(T,l,i))}}}}),oz=Xe({"src/components/colorscale/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=zl(),S=o5(),E=_h();G.exports=function(t,r){function o(p,T){return v.coerce(t,r,S,p,T)}o("colorscale.sequential"),o("colorscale.sequentialminus"),o("colorscale.diverging");var a=r._colorAxes,n,i;function s(p,T){return v.coerce(n,i,S.coloraxis,p,T)}for(var h in a){var c=a[h];if(c[0])n=t[h]||{},i=x.newContainer(r,h,"coloraxis"),i._name=h,E(n,i,r,s,{prefix:"",cLetter:"c"});else{for(var m=0;m<c[2].length;m++)c[2][m]();delete r._colorAxes[h]}}}}}),sz=Xe({"src/components/colorscale/cross_trace_defaults.js"(Z,G){"use strict";var v=sa(),x=wp().hasColorscale,S=wp().extractOpts;G.exports=function(e,t){function r(c,m){var p=c["_"+m];p!==void 0&&(c[m]=p)}function o(c,m){var p=m.container?v.nestedProperty(c,m.container).get():c;if(p)if(p.coloraxis)p._colorAx=t[p.coloraxis];else{var T=S(p),l=T.auto;(l||T.min===void 0)&&r(p,m.min),(l||T.max===void 0)&&r(p,m.max),T.autocolorscale&&r(p,"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=Xe({"src/components/colorscale/calc.js"(Z,G){"use strict";var v=rs(),x=sa(),S=wp().extractOpts;G.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,c=s.min,m=s.max,p=s.mid,T=function(){return x.aggNums(Math.min,null,a)},l=function(){return x.aggNums(Math.max,null,a)};if(c===void 0?c=T():h&&(i._colorAx&&v(c)?c=Math.min(c,T()):c=T()),m===void 0?m=l():h&&(i._colorAx&&v(m)?m=Math.max(m,l()):m=l()),h&&p!==void 0&&(m-p>p-c?c=p-(m-p):m-p<p-c&&(m=p+(p-c))),c===m&&(c-=.5,m+=.5),s._sync("min",c),s._sync("max",m),s.autocolorscale){var _;c*m<0?_=o.colorscale.diverging:c>=0?_=o.colorscale.sequential:_=o.colorscale.sequentialminus,s._sync("colorscale",_)}}}}),rc=Xe({"src/components/colorscale/index.js"(Z,G){"use strict";var v=W0(),x=wp();G.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),Fu=Xe({"src/traces/scatter/subtypes.js"(Z,G){"use strict";var v=sa(),x=bp().isTypedArraySpec;G.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 v.isPlainObject(E)&&(v.isArrayOrTypedArray(E.size)||x(E.size))}}}}),r1=Xe({"src/traces/scatter/make_bubble_size_func.js"(Z,G){"use strict";var v=rs();G.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 v(n)&&n>0?Math.max(n,r):0}}}}),$p=Xe({"src/components/fx/helpers.js"(Z){"use strict";var G=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=G.nestedProperty(r,i).get(),c=S(h,o);c!==void 0&&(t[s]=c)}}},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=G.nestedProperty(r,i).get(),c=new Array(o.length),m=0;m<o.length;m++)c[m]=S(h,o[m]);t[s]=c}}};var v={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function x(t){return v[t]||t}function S(t,r){if(Array.isArray(r)){if(G.isArrayOrTypedArray(t)&&G.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_=Xe({"node_modules/parse-svg-path/index.js"(Z,G){G.exports=S;var v={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==v[i])return n.unshift(a),r.push(n);if(n.length<v[i])throw new Error("malformed path data");r.push([a].concat(n.splice(0,v[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=Xe({"src/components/drawing/symbol_defs.js"(Z,G){"use strict";var v=M_(),x=function(m,p){return p?Math.round(m*(p=Math.pow(10,p)))/p:Math.round(m)},S="M0,0Z",E=Math.sqrt(2),e=Math.sqrt(3),t=Math.PI,r=Math.cos,o=Math.sin;G.exports={circle:{n:0,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_="M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z";return T?c(p,T,_):_}},square:{n:1,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")}},diamond:{n:2,f:function(m,p,T){if(a(p))return S;var l=x(m*1.3,2);return c(p,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"Z")}},cross:{n:3,f:function(m,p,T){if(a(p))return S;var l=x(m*.4,2),_=x(m*1.2,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m*.8/E,2),_="l"+l+","+l,w="l"+l+",-"+l,A="l-"+l+",-"+l,M="l-"+l+","+l;return c(p,T,"M0,"+l+_+w+A+w+A+M+A+M+_+M+_+"Z")}},"triangle-up":{n:5,f:function(m,p,T){if(a(p))return S;var l=x(m*2/e,2),_=x(m/2,2),w=x(m,2);return c(p,T,"M-"+l+","+_+"H"+l+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(m,p,T){if(a(p))return S;var l=x(m*2/e,2),_=x(m/2,2),w=x(m,2);return c(p,T,"M-"+l+",-"+_+"H"+l+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(m,p,T){if(a(p))return S;var l=x(m*2/e,2),_=x(m/2,2),w=x(m,2);return c(p,T,"M"+_+",-"+l+"V"+l+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(m,p,T){if(a(p))return S;var l=x(m*2/e,2),_=x(m/2,2),w=x(m,2);return c(p,T,"M-"+_+",-"+l+"V"+l+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(m,p,T){if(a(p))return S;var l=x(m*.6,2),_=x(m*1.2,2);return c(p,T,"M-"+_+",-"+l+"H"+l+"V"+_+"Z")}},"triangle-se":{n:10,f:function(m,p,T){if(a(p))return S;var l=x(m*.6,2),_=x(m*1.2,2);return c(p,T,"M"+l+",-"+_+"V"+l+"H-"+_+"Z")}},"triangle-sw":{n:11,f:function(m,p,T){if(a(p))return S;var l=x(m*.6,2),_=x(m*1.2,2);return c(p,T,"M"+_+","+l+"H-"+l+"V-"+_+"Z")}},"triangle-nw":{n:12,f:function(m,p,T){if(a(p))return S;var l=x(m*.6,2),_=x(m*1.2,2);return c(p,T,"M-"+l+","+_+"V-"+l+"H"+_+"Z")}},pentagon:{n:13,f:function(m,p,T){if(a(p))return S;var l=x(m*.951,2),_=x(m*.588,2),w=x(-m,2),A=x(m*-.309,2),M=x(m*.809,2);return c(p,T,"M"+l+","+A+"L"+_+","+M+"H-"+_+"L-"+l+","+A+"L0,"+w+"Z")}},hexagon:{n:14,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m/2,2),w=x(m*e/2,2);return c(p,T,"M"+w+",-"+_+"V"+_+"L0,"+l+"L-"+w+","+_+"V-"+_+"L0,-"+l+"Z")}},hexagon2:{n:15,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m/2,2),w=x(m*e/2,2);return c(p,T,"M-"+_+","+w+"H"+_+"L"+l+",0L"+_+",-"+w+"H-"+_+"L-"+l+",0Z")}},octagon:{n:16,f:function(m,p,T){if(a(p))return S;var l=x(m*.924,2),_=x(m*.383,2);return c(p,T,"M-"+_+",-"+l+"H"+_+"L"+l+",-"+_+"V"+_+"L"+_+","+l+"H-"+_+"L-"+l+","+_+"V-"+_+"Z")}},star:{n:17,f:function(m,p,T){if(a(p))return S;var l=m*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),d=x(l*.118,2),u=x(l*.809,2),y=x(l*.382,2);return c(p,T,"M"+_+","+b+"H"+w+"L"+A+","+d+"L"+M+","+u+"L0,"+y+"L-"+M+","+u+"L-"+A+","+d+"L-"+w+","+b+"H-"+_+"L0,"+g+"Z")}},hexagram:{n:18,f:function(m,p,T){if(a(p))return S;var l=x(m*.66,2),_=x(m*.38,2),w=x(m*.76,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m*e*.8,2),_=x(m*.8,2),w=x(m*1.6,2),A=x(m*4,2),M="A "+A+","+A+" 0 0 1 ";return c(p,T,"M-"+l+","+_+M+l+","+_+M+"0,-"+w+M+"-"+l+","+_+"Z")}},"star-triangle-down":{n:20,f:function(m,p,T){if(a(p))return S;var l=x(m*e*.8,2),_=x(m*.8,2),w=x(m*1.6,2),A=x(m*4,2),M="A "+A+","+A+" 0 0 1 ";return c(p,T,"M"+l+",-"+_+M+"-"+l+",-"+_+M+"0,"+w+M+l+",-"+_+"Z")}},"star-square":{n:21,f:function(m,p,T){if(a(p))return S;var l=x(m*1.1,2),_=x(m*2,2),w="A "+_+","+_+" 0 0 1 ";return c(p,T,"M-"+l+",-"+l+w+"-"+l+","+l+w+l+","+l+w+l+",-"+l+w+"-"+l+",-"+l+"Z")}},"star-diamond":{n:22,f:function(m,p,T){if(a(p))return S;var l=x(m*1.4,2),_=x(m*1.9,2),w="A "+_+","+_+" 0 0 1 ";return c(p,T,"M-"+l+",0"+w+"0,"+l+w+l+",0"+w+"0,-"+l+w+"-"+l+",0Z")}},"diamond-tall":{n:23,f:function(m,p,T){if(a(p))return S;var l=x(m*.7,2),_=x(m*1.4,2);return c(p,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},"diamond-wide":{n:24,f:function(m,p,T){if(a(p))return S;var l=x(m*1.4,2),_=x(m*.7,2);return c(p,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},hourglass:{n:25,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+","+l+"H-"+l+"L"+l+",-"+l+"H-"+l+"Z")},noDot:!0},bowtie:{n:26,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+","+l+"V-"+l+"L-"+l+","+l+"V-"+l+"Z")},noDot:!0},"circle-cross":{n:27,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m/E,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m*1.3,2);return c(p,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(m,p,T){if(a(p))return S;var l=x(m*1.3,2),_=x(m*.65,2);return c(p,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM-"+_+",-"+_+"L"+_+","+_+"M-"+_+","+_+"L"+_+",-"+_)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m,p,T){if(a(p))return S;var l=x(m*1.4,2);return c(p,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m,p,T){if(a(p))return S;var l=x(m*1.2,2),_=x(m*.85,2);return c(p,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m,p,T){if(a(p))return S;var l=x(m/2,2),_=x(m,2);return c(p,T,"M"+l+","+_+"V-"+_+"M"+(l-_)+",-"+_+"V"+_+"M"+_+","+l+"H-"+_+"M-"+_+","+(l-_)+"H"+_)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m,p,T){if(a(p))return S;var l=x(m*1.2,2),_=x(m*1.6,2),w=x(m*.8,2);return c(p,T,"M-"+l+","+w+"L0,0M"+l+","+w+"L0,0M0,-"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m,p,T){if(a(p))return S;var l=x(m*1.2,2),_=x(m*1.6,2),w=x(m*.8,2);return c(p,T,"M-"+l+",-"+w+"L0,0M"+l+",-"+w+"L0,0M0,"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m,p,T){if(a(p))return S;var l=x(m*1.2,2),_=x(m*1.6,2),w=x(m*.8,2);return c(p,T,"M"+w+","+l+"L0,0M"+w+",-"+l+"L0,0M-"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m,p,T){if(a(p))return S;var l=x(m*1.2,2),_=x(m*1.6,2),w=x(m*.8,2);return c(p,T,"M-"+w+","+l+"L0,0M-"+w+",-"+l+"L0,0M"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m,p,T){if(a(p))return S;var l=x(m*1.4,2);return c(p,T,"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m,p,T){if(a(p))return S;var l=x(m*1.4,2);return c(p,T,"M0,"+l+"V-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m,p,T){if(a(p))return S;var l=x(m,2);return c(p,T,"M"+l+","+l+"L-"+l+",-"+l)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m*2,2);return c(p,T,"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m*2,2);return c(p,T,"M0,0L-"+l+",-"+_+"H"+l+"Z")},noDot:!0},"arrow-left":{n:47,f:function(m,p,T){if(a(p))return S;var l=x(m*2,2),_=x(m,2);return c(p,T,"M0,0L"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-right":{n:48,f:function(m,p,T){if(a(p))return S;var l=x(m*2,2),_=x(m,2);return c(p,T,"M0,0L-"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m*2,2);return c(p,T,"M-"+l+",0H"+l+"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m,p,T){if(a(p))return S;var l=x(m,2),_=x(m*2,2);return c(p,T,"M-"+l+",0H"+l+"M0,0L-"+l+",-"+_+"H"+l+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m,p,T){if(a(p))return S;var l=x(m*2,2),_=x(m,2);return c(p,T,"M0,-"+_+"V"+_+"M0,0L"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m,p,T){if(a(p))return S;var l=x(m*2,2),_=x(m,2);return c(p,T,"M0,-"+_+"V"+_+"M0,0L-"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(m,p,T){if(a(p))return S;var l=t/2.5,_=2*m*r(l),w=2*m*o(l);return c(p,T,"M0,0L"+-_+","+w+"L"+_+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(m,p,T){if(a(p))return S;var l=t/4,_=2*m*r(l),w=2*m*o(l);return c(p,T,"M0,0L"+-_+","+w+"A "+2*m+","+2*m+" 0 0 1 "+_+","+w+"Z")},backoff:.4,noDot:!0}};function a(m){return m===null}var n,i,s,h;function c(m,p,T){if((!m||m%360===0)&&!p)return T;if(s===m&&h===p&&n===T)return i;s=m,h=p,n=T;function l(z,F){var N=r(z),O=o(z),P=F[0],U=F[1]+(p||0);return[P*N-U*O,P*O+U*N]}for(var _=m/180*t,w=0,A=0,M=v(T),g="",b=0;b<M.length;b++){var d=M[b],u=d[0],y=w,f=A;if(u==="M"||u==="L")w=+d[1],A=+d[2];else if(u==="m"||u==="l")w+=+d[1],A+=+d[2];else if(u==="H")w=+d[1];else if(u==="h")w+=+d[1];else if(u==="V")A=+d[1];else if(u==="v")A+=+d[1];else if(u==="A"){w=+d[1],A=+d[2];var R=l(_,[+d[6],+d[7]]);d[6]=R[0],d[7]=R[1],d[3]=+d[3]+m}(u==="H"||u==="V")&&(u="L"),(u==="h"||u==="v")&&(u="l"),(u==="m"||u==="l")&&(w-=y,A-=f);var L=l(_,[w,A]);(u==="H"||u==="V")&&(u="L"),(u==="M"||u==="L"||u==="m"||u==="l")&&(d[1]=L[0],d[2]=L[1]),d[0]=u,g+=d[0]+d.slice(1).join(",")}return i=g,g}}}),es=Xe({"src/components/drawing/index.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.numberFormat,E=rs(),e=Ch(),t=so(),r=$n(),o=rc(),a=x.strTranslate,n=ou(),i=vd(),s=uh(),h=s.LINE_SPACING,c=Ym().DESELECTDIM,m=Fu(),p=r1(),T=$p().appendArrayPointValue,l=G.exports={};l.font=function(Me,ye){var he=ye.variant,Oe=ye.style,tt=ye.weight,ot=ye.color,Qe=ye.size,Pt=ye.family,It=ye.shadow,qt=ye.lineposition,Wt=ye.textcase;Pt&&Me.style("font-family",Pt),Qe+1&&Me.style("font-size",Qe+"px"),ot&&Me.call(r.fill,ot),tt&&Me.style("font-weight",tt),Oe&&Me.style("font-style",Oe),he&&Me.style("font-variant",he),Wt&&Me.style("text-transform",_(A(Wt))),It&&Me.style("text-shadow",It==="auto"?n.makeTextShadow(r.contrast(ot)):_(It)),qt&&Me.style("text-decoration-line",_(M(qt)))};function _(Me){return Me==="none"?void 0:Me}var w={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function A(Me){return w[Me]}function M(Me){return Me.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}l.setPosition=function(Me,ye,he){Me.attr("x",ye).attr("y",he)},l.setSize=function(Me,ye,he){Me.attr("width",ye).attr("height",he)},l.setRect=function(Me,ye,he,Oe,tt){Me.call(l.setPosition,ye,he).call(l.setSize,Oe,tt)},l.translatePoint=function(Me,ye,he,Oe){var tt=he.c2p(Me.x),ot=Oe.c2p(Me.y);if(E(tt)&&E(ot)&&ye.node())ye.node().nodeName==="text"?ye.attr("x",tt).attr("y",ot):ye.attr("transform",a(tt,ot));else return!1;return!0},l.translatePoints=function(Me,ye,he){Me.each(function(Oe){var tt=v.select(this);l.translatePoint(Oe,tt,ye,he)})},l.hideOutsideRangePoint=function(Me,ye,he,Oe,tt,ot){ye.attr("display",he.isPtWithinRange(Me,tt)&&Oe.isPtWithinRange(Me,ot)?null:"none")},l.hideOutsideRangePoints=function(Me,ye){if(ye._hasClipOnAxisFalse){var he=ye.xaxis,Oe=ye.yaxis;Me.each(function(tt){var ot=tt[0].trace,Qe=ot.xcalendar,Pt=ot.ycalendar,It=t.traceIs(ot,"bar-like")?".bartext":".point,.textpoint";Me.selectAll(It).each(function(qt){l.hideOutsideRangePoint(qt,v.select(this),he,Oe,Qe,Pt)})})}},l.crispRound=function(Me,ye,he){return!ye||!E(ye)?he||0:Me._context.staticPlot?ye:ye<1?1:Math.round(ye)},l.singleLineStyle=function(Me,ye,he,Oe,tt){ye.style("fill","none");var ot=(((Me||[])[0]||{}).trace||{}).line||{},Qe=he||ot.width||0,Pt=tt||ot.dash||"";r.stroke(ye,Oe||ot.color),l.dashLine(ye,Pt,Qe)},l.lineGroupStyle=function(Me,ye,he,Oe){Me.style("fill","none").each(function(tt){var ot=(((tt||[])[0]||{}).trace||{}).line||{},Qe=ye||ot.width||0,Pt=Oe||ot.dash||"";v.select(this).call(r.stroke,he||ot.color).call(l.dashLine,Pt,Qe)})},l.dashLine=function(Me,ye,he){he=+he||0,ye=l.dashStyle(ye,he),Me.style({"stroke-dasharray":ye,"stroke-width":he+"px"})},l.dashStyle=function(Me,ye){ye=+ye||1;var he=Math.max(ye,3);return Me==="solid"?Me="":Me==="dot"?Me=he+"px,"+he+"px":Me==="dash"?Me=3*he+"px,"+3*he+"px":Me==="longdash"?Me=5*he+"px,"+5*he+"px":Me==="dashdot"?Me=3*he+"px,"+he+"px,"+he+"px,"+he+"px":Me==="longdashdot"&&(Me=5*he+"px,"+2*he+"px,"+he+"px,"+2*he+"px"),Me};function g(Me,ye,he,Oe){var tt=ye.fillpattern,ot=ye.fillgradient,Qe=l.getPatternAttr,Pt=tt&&(Qe(tt.shape,0,"")||Qe(tt.path,0,""));if(Pt){var It=Qe(tt.bgcolor,0,null),qt=Qe(tt.fgcolor,0,null),Wt=tt.fgopacity,kr=Qe(tt.size,0,8),mr=Qe(tt.solidity,0,.3),qr=ye.uid;l.pattern(Me,"point",he,qr,Pt,kr,mr,void 0,tt.fillmode,It,qt,Wt)}else if(ot&&ot.type!=="none"){var Sr=ot.type,Rr="scatterfill-"+ye.uid;if(Oe&&(Rr="legendfill-"+ye.uid),!Oe&&(ot.start!==void 0||ot.stop!==void 0)){var wt,Ne;Sr==="horizontal"?(wt={x:ot.start,y:0},Ne={x:ot.stop,y:0}):Sr==="vertical"&&(wt={x:0,y:ot.start},Ne={x:0,y:ot.stop}),wt.x=ye._xA.c2p(wt.x===void 0?ye._extremes.x.min[0].val:wt.x,!0),wt.y=ye._yA.c2p(wt.y===void 0?ye._extremes.y.min[0].val:wt.y,!0),Ne.x=ye._xA.c2p(Ne.x===void 0?ye._extremes.x.max[0].val:Ne.x,!0),Ne.y=ye._yA.c2p(Ne.y===void 0?ye._extremes.y.max[0].val:Ne.y,!0),Me.call(L,he,Rr,"linear",ot.colorscale,"fill",wt,Ne,!0,!1)}else Sr==="horizontal"&&(Sr=Sr+"reversed"),Me.call(l.gradient,he,Rr,Sr,ot.colorscale,"fill")}else ye.fillcolor&&Me.call(r.fill,ye.fillcolor)}l.singleFillStyle=function(Me,ye){var he=v.select(Me.node()),Oe=he.data(),tt=((Oe[0]||[])[0]||{}).trace||{};g(Me,tt,ye,!1)},l.fillGroupStyle=function(Me,ye,he){Me.style("stroke-width",0).each(function(Oe){var tt=v.select(this);Oe[0].trace&&g(tt,Oe[0].trace,ye,he)})};var b=lz();l.symbolNames=[],l.symbolFuncs=[],l.symbolBackOffs=[],l.symbolNeedLines={},l.symbolNoDot={},l.symbolNoFill={},l.symbolList=[],Object.keys(b).forEach(function(Me){var ye=b[Me],he=ye.n;l.symbolList.push(he,String(he),Me,he+100,String(he+100),Me+"-open"),l.symbolNames[he]=Me,l.symbolFuncs[he]=ye.f,l.symbolBackOffs[he]=ye.backoff||0,ye.needLine&&(l.symbolNeedLines[he]=!0),ye.noDot?l.symbolNoDot[he]=!0:l.symbolList.push(he+200,String(he+200),Me+"-dot",he+300,String(he+300),Me+"-open-dot"),ye.noFill&&(l.symbolNoFill[he]=!0)});var d=l.symbolNames.length,u="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";l.symbolNumber=function(Me){if(E(Me))Me=+Me;else if(typeof Me=="string"){var ye=0;Me.indexOf("-open")>0&&(ye=100,Me=Me.replace("-open","")),Me.indexOf("-dot")>0&&(ye+=200,Me=Me.replace("-dot","")),Me=l.symbolNames.indexOf(Me),Me>=0&&(Me+=ye)}return Me%100>=d||Me>=400?0:Math.floor(Math.max(Me,0))};function y(Me,ye,he,Oe){var tt=Me%100;return l.symbolFuncs[tt](ye,he,Oe)+(Me>=200?u:"")}var f=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(Me,ye,he,Oe,tt,ot){var Qe=R[Oe];return L(Me,ye,he,Qe.type,tt,ot,Qe.start,Qe.stop,!1,Qe.reversed)};function L(Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt){var Wt=tt.length,kr;Oe==="linear"?kr={node:"linearGradient",attrs:{x1:Qe.x,y1:Qe.y,x2:Pt.x,y2:Pt.y,gradientUnits:It?"userSpaceOnUse":"objectBoundingBox"},reversed:qt}:Oe==="radial"&&(kr={node:"radialGradient",reversed:qt});for(var mr=new Array(Wt),qr=0;qr<Wt;qr++)kr.reversed?mr[Wt-1-qr]=[f((1-tt[qr][0])*100),tt[qr][1]]:mr[qr]=[f(tt[qr][0]*100),tt[qr][1]];var Sr=ye._fullLayout,Rr="g"+Sr._uid+"-"+he,wt=Sr._defs.select(".gradients").selectAll("#"+Rr).data([Oe+mr.join(";")],x.identity);wt.exit().remove(),wt.enter().append(kr.node).each(function(){var Ne=v.select(this);kr.attrs&&Ne.attr(kr.attrs),Ne.attr("id",Rr);var Ke=Ne.selectAll("stop").data(mr);Ke.exit().remove(),Ke.enter().append("stop"),Ke.each(function(Te){var Ie=e(Te[1]);v.select(this).attr({offset:Te[0]+"%","stop-color":r.tinyRGB(Ie),"stop-opacity":Ie.getAlpha()})})}),Me.style(ot,oe(Rr,ye)).style(ot+"-opacity",null),Me.classed("gradient_filled",!0)}l.pattern=function(Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt,Wt,kr){var mr=ye==="legend";Pt&&(It==="overlay"?(qt=Pt,Wt=r.contrast(qt)):(qt=void 0,Wt=Pt));var qr=he._fullLayout,Sr="p"+qr._uid+"-"+Oe,Rr,wt,Ne=function(ir,rr,er,Lr,fa){return Lr+(fa-Lr)*(ir-rr)/(er-rr)},Ke,Te,Ie,Ve,Ce={},Ee=e(Wt),Pe=r.tinyRGB(Ee),ft=Ee.getAlpha(),ct=kr*ft;switch(tt){case"/":Rr=ot*Math.sqrt(2),wt=ot*Math.sqrt(2),Ke="M-"+Rr/4+","+wt/4+"l"+Rr/2+",-"+wt/2+"M0,"+wt+"L"+Rr+",0M"+Rr/4*3+","+wt/4*5+"l"+Rr/2+",-"+wt/2,Te=Qe*ot,Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case"\\":Rr=ot*Math.sqrt(2),wt=ot*Math.sqrt(2),Ke="M"+Rr/4*3+",-"+wt/4+"l"+Rr/2+","+wt/2+"M0,0L"+Rr+","+wt+"M-"+Rr/4+","+wt/4*3+"l"+Rr/2+","+wt/2,Te=Qe*ot,Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case"x":Rr=ot*Math.sqrt(2),wt=ot*Math.sqrt(2),Ke="M-"+Rr/4+","+wt/4+"l"+Rr/2+",-"+wt/2+"M0,"+wt+"L"+Rr+",0M"+Rr/4*3+","+wt/4*5+"l"+Rr/2+",-"+wt/2+"M"+Rr/4*3+",-"+wt/4+"l"+Rr/2+","+wt/2+"M0,0L"+Rr+","+wt+"M-"+Rr/4+","+wt/4*3+"l"+Rr/2+","+wt/2,Te=ot-ot*Math.sqrt(1-Qe),Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case"|":Rr=ot,wt=ot,Ve="path",Ke="M"+Rr/2+",0L"+Rr/2+","+wt,Te=Qe*ot,Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case"-":Rr=ot,wt=ot,Ve="path",Ke="M0,"+wt/2+"L"+Rr+","+wt/2,Te=Qe*ot,Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case"+":Rr=ot,wt=ot,Ve="path",Ke="M"+Rr/2+",0L"+Rr/2+","+wt+"M0,"+wt/2+"L"+Rr+","+wt/2,Te=ot-ot*Math.sqrt(1-Qe),Ve="path",Ce={d:Ke,opacity:ct,stroke:Pe,"stroke-width":Te+"px"};break;case".":Rr=ot,wt=ot,Qe<Math.PI/4?Ie=Math.sqrt(Qe*ot*ot/Math.PI):Ie=Ne(Qe,Math.PI/4,1,ot/2,ot/Math.sqrt(2)),Ve="circle",Ce={cx:Rr/2,cy:wt/2,r:Ie,opacity:ct,fill:Pe};break;default:Rr=ot,wt=ot,Ve="path",Ce={d:tt,opacity:ct,fill:Pe};break}var _t=[tt||"noSh",qt||"noBg",Wt||"noFg",ot,Qe].join(";"),Ct=qr._defs.select(".patterns").selectAll("#"+Sr).data([_t],x.identity);Ct.exit().remove(),Ct.enter().append("pattern").each(function(){var ir=v.select(this);if(ir.attr({id:Sr,width:Rr+"px",height:wt+"px",patternUnits:"userSpaceOnUse",patternTransform:mr?"scale(0.8)":""}),qt){var rr=e(qt),er=r.tinyRGB(rr),Lr=rr.getAlpha(),fa=ir.selectAll("rect").data([0]);fa.exit().remove(),fa.enter().append("rect").attr({width:Rr+"px",height:wt+"px",fill:er,"fill-opacity":Lr})}var Da=ir.selectAll(Ve).data([0]);Da.exit().remove(),Da.enter().append(Ve).attr(Ce)}),Me.style("fill",oe(Sr,he)).style("fill-opacity",null),Me.classed("pattern_filled",!0)},l.initGradients=function(Me){var ye=Me._fullLayout,he=x.ensureSingle(ye._defs,"g","gradients");he.selectAll("linearGradient,radialGradient").remove(),v.select(Me).selectAll(".gradient_filled").classed("gradient_filled",!1)},l.initPatterns=function(Me){var ye=Me._fullLayout,he=x.ensureSingle(ye._defs,"g","patterns");he.selectAll("pattern").remove(),v.select(Me).selectAll(".pattern_filled").classed("pattern_filled",!1)},l.getPatternAttr=function(Me,ye,he){return Me&&x.isArrayOrTypedArray(Me)?ye<Me.length?Me[ye]:he:Me},l.pointStyle=function(Me,ye,he,Oe){if(Me.size()){var tt=l.makePointStyleFns(ye);Me.each(function(ot){l.singlePointStyle(ot,v.select(this),ye,tt,he,Oe)})}},l.singlePointStyle=function(Me,ye,he,Oe,tt,ot){var Qe=he.marker,Pt=Qe.line;if(ot&&ot.i>=0&&Me.i===void 0&&(Me.i=ot.i),ye.style("opacity",Oe.selectedOpacityFn?Oe.selectedOpacityFn(Me):Me.mo===void 0?Qe.opacity:Me.mo),Oe.ms2mrc){var It;Me.ms==="various"||Qe.size==="various"?It=3:It=Oe.ms2mrc(Me.ms),Me.mrc=It,Oe.selectedSizeFn&&(It=Me.mrc=Oe.selectedSizeFn(Me));var qt=l.symbolNumber(Me.mx||Qe.symbol)||0;Me.om=qt%200>=100;var Wt=st(Me,he),kr=Q(Me,he);ye.attr("d",y(qt,It,Wt,kr))}var mr=!1,qr,Sr,Rr;if(Me.so)Rr=Pt.outlierwidth,Sr=Pt.outliercolor,qr=Qe.outliercolor;else{var wt=(Pt||{}).width;Rr=(Me.mlw+1||wt+1||(Me.trace?(Me.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Me?Sr=Me.mlcc=Oe.lineScale(Me.mlc):x.isArrayOrTypedArray(Pt.color)?Sr=r.defaultLine:Sr=Pt.color,x.isArrayOrTypedArray(Qe.color)&&(qr=r.defaultLine,mr=!0),"mc"in Me?qr=Me.mcc=Oe.markerScale(Me.mc):qr=Qe.color||Qe.colors||"rgba(0,0,0,0)",Oe.selectedColorFn&&(qr=Oe.selectedColorFn(Me))}let Ne=Me.mld||(Pt||{}).dash;if(Ne&&l.dashLine(ye,Ne,Rr),Me.om)ye.call(r.stroke,qr).style({"stroke-width":(Rr||1)+"px",fill:"none"});else{ye.style("stroke-width",(Me.isBlank?0:Rr)+"px");var Ke=Qe.gradient,Te=Me.mgt;Te?mr=!0:Te=Ke&&Ke.type,x.isArrayOrTypedArray(Te)&&(Te=Te[0],R[Te]||(Te=0));var Ie=Qe.pattern,Ve=l.getPatternAttr,Ce=Ie&&(Ve(Ie.shape,Me.i,"")||Ve(Ie.path,Me.i,""));if(Te&&Te!=="none"){var Ee=Me.mgc;Ee?mr=!0:Ee=Ke.color;var Pe=he.uid;mr&&(Pe+="-"+Me.i),l.gradient(ye,tt,Pe,Te,[[0,Ee],[1,qr]],"fill")}else if(Ce){var ft=!1,ct=Ie.fgcolor;!ct&&ot&&ot.color&&(ct=ot.color,ft=!0);var _t=Ve(ct,Me.i,ot&&ot.color||null),Ct=Ve(Ie.bgcolor,Me.i,null),ir=Ie.fgopacity,rr=Ve(Ie.size,Me.i,8),er=Ve(Ie.solidity,Me.i,.3);ft=ft||Me.mcc||x.isArrayOrTypedArray(Ie.shape)||x.isArrayOrTypedArray(Ie.path)||x.isArrayOrTypedArray(Ie.bgcolor)||x.isArrayOrTypedArray(Ie.fgcolor)||x.isArrayOrTypedArray(Ie.size)||x.isArrayOrTypedArray(Ie.solidity);var Lr=he.uid;ft&&(Lr+="-"+Me.i),l.pattern(ye,"point",tt,Lr,Ce,rr,er,Me.mcc,Ie.fillmode,Ct,_t,ir)}else x.isArrayOrTypedArray(qr)?r.fill(ye,qr[Me.i]):r.fill(ye,qr);Rr&&r.stroke(ye,Sr)}},l.makePointStyleFns=function(Me){var ye={},he=Me.marker;return ye.markerScale=l.tryColorscale(he,""),ye.lineScale=l.tryColorscale(he,"line"),t.traceIs(Me,"symbols")&&(ye.ms2mrc=m.isBubble(Me)?p(Me):function(){return(he.size||6)/2}),Me.selectedpoints&&x.extendFlat(ye,l.makeSelectedPointStyleFns(Me)),ye},l.makeSelectedPointStyleFns=function(Me){var ye={},he=Me.selected||{},Oe=Me.unselected||{},tt=Me.marker||{},ot=he.marker||{},Qe=Oe.marker||{},Pt=tt.opacity,It=ot.opacity,qt=Qe.opacity,Wt=It!==void 0,kr=qt!==void 0;(x.isArrayOrTypedArray(Pt)||Wt||kr)&&(ye.selectedOpacityFn=function(Ie){var Ve=Ie.mo===void 0?tt.opacity:Ie.mo;return Ie.selected?Wt?It:Ve:kr?qt:c*Ve});var mr=tt.color,qr=ot.color,Sr=Qe.color;(qr||Sr)&&(ye.selectedColorFn=function(Ie){var Ve=Ie.mcc||mr;return Ie.selected?qr||Ve:Sr||Ve});var Rr=tt.size,wt=ot.size,Ne=Qe.size,Ke=wt!==void 0,Te=Ne!==void 0;return t.traceIs(Me,"symbols")&&(Ke||Te)&&(ye.selectedSizeFn=function(Ie){var Ve=Ie.mrc||Rr/2;return Ie.selected?Ke?wt/2:Ve:Te?Ne/2:Ve}),ye},l.makeSelectedTextStyleFns=function(Me){var ye={},he=Me.selected||{},Oe=Me.unselected||{},tt=Me.textfont||{},ot=he.textfont||{},Qe=Oe.textfont||{},Pt=tt.color,It=ot.color,qt=Qe.color;return ye.selectedTextColorFn=function(Wt){var kr=Wt.tc||Pt;return Wt.selected?It||kr:qt||(It?kr:r.addOpacity(kr,c))},ye},l.selectedPointStyle=function(Me,ye){if(!(!Me.size()||!ye.selectedpoints)){var he=l.makeSelectedPointStyleFns(ye),Oe=ye.marker||{},tt=[];he.selectedOpacityFn&&tt.push(function(ot,Qe){ot.style("opacity",he.selectedOpacityFn(Qe))}),he.selectedColorFn&&tt.push(function(ot,Qe){r.fill(ot,he.selectedColorFn(Qe))}),he.selectedSizeFn&&tt.push(function(ot,Qe){var Pt=Qe.mx||Oe.symbol||0,It=he.selectedSizeFn(Qe);ot.attr("d",y(l.symbolNumber(Pt),It,st(Qe,ye),Q(Qe,ye))),Qe.mrc2=It}),tt.length&&Me.each(function(ot){for(var Qe=v.select(this),Pt=0;Pt<tt.length;Pt++)tt[Pt](Qe,ot)})}},l.tryColorscale=function(Me,ye){var he=ye?x.nestedProperty(Me,ye).get():Me;if(he){var Oe=he.color;if((he.colorscale||he._colorAx)&&x.isArrayOrTypedArray(Oe))return o.makeColorScaleFuncFromTrace(he)}return x.identity};var z={start:1,end:-1,middle:0,bottom:1,top:-1};function F(Me,ye,he,Oe,tt){var ot=v.select(Me.node().parentNode),Qe=ye.indexOf("top")!==-1?"top":ye.indexOf("bottom")!==-1?"bottom":"middle",Pt=ye.indexOf("left")!==-1?"end":ye.indexOf("right")!==-1?"start":"middle",It=Oe?Oe/.8+1:0,qt=(n.lineCount(Me)-1)*h+1,Wt=z[Pt]*It,kr=he*.75+z[Qe]*It+(z[Qe]-1)*qt*he/2;Me.attr("text-anchor",Pt),tt||ot.attr("transform",a(Wt,kr))}function N(Me,ye){var he=Me.ts||ye.textfont.size;return E(he)&&he>0?he:0}l.textPointStyle=function(Me,ye,he){if(Me.size()){var Oe;if(ye.selectedpoints){var tt=l.makeSelectedTextStyleFns(ye);Oe=tt.selectedTextColorFn}var ot=ye.texttemplate,Qe=he._fullLayout;Me.each(function(Pt){var It=v.select(this),qt=ot?x.extractOption(Pt,ye,"txt","texttemplate"):x.extractOption(Pt,ye,"tx","text");if(!qt&&qt!==0){It.remove();return}if(ot){var Wt=ye._module.formatLabels,kr=Wt?Wt(Pt,ye,Qe):{},mr={};T(mr,ye,Pt.i),qt=x.texttemplateString({data:[mr,Pt,ye._meta],fallback:ye.texttemplatefallback,labels:kr,locale:Qe._d3locale,template:qt})}var qr=Pt.tp||ye.textposition,Sr=N(Pt,ye),Rr=Oe?Oe(Pt):Pt.tc||ye.textfont.color;It.call(l.font,{family:Pt.tf||ye.textfont.family,weight:Pt.tw||ye.textfont.weight,style:Pt.ty||ye.textfont.style,variant:Pt.tv||ye.textfont.variant,textcase:Pt.tC||ye.textfont.textcase,lineposition:Pt.tE||ye.textfont.lineposition,shadow:Pt.tS||ye.textfont.shadow,size:Sr,color:Rr}).text(qt).call(n.convertToTspans,he).call(F,qr,Sr,Pt.mrc)})}},l.selectedTextStyle=function(Me,ye){if(!(!Me.size()||!ye.selectedpoints)){var he=l.makeSelectedTextStyleFns(ye);Me.each(function(Oe){var tt=v.select(this),ot=he.selectedTextColorFn(Oe),Qe=Oe.tp||ye.textposition,Pt=N(Oe,ye);r.fill(tt,ot);var It=t.traceIs(ye,"bar-like");F(tt,Qe,Pt,Oe.mrc2||Oe.mrc,It)})}};var O=.5;l.smoothopen=function(Me,ye){if(Me.length<3)return"M"+Me.join("L");var he="M"+Me[0],Oe=[],tt;for(tt=1;tt<Me.length-1;tt++)Oe.push(se(Me[tt-1],Me[tt],Me[tt+1],ye));for(he+="Q"+Oe[0][0]+" "+Me[1],tt=2;tt<Me.length-1;tt++)he+="C"+Oe[tt-2][1]+" "+Oe[tt-1][0]+" "+Me[tt];return he+="Q"+Oe[Me.length-3][1]+" "+Me[Me.length-1],he},l.smoothclosed=function(Me,ye){if(Me.length<3)return"M"+Me.join("L")+"Z";var he="M"+Me[0],Oe=Me.length-1,tt=[se(Me[Oe],Me[0],Me[1],ye)],ot;for(ot=1;ot<Oe;ot++)tt.push(se(Me[ot-1],Me[ot],Me[ot+1],ye));for(tt.push(se(Me[Oe-1],Me[Oe],Me[0],ye)),ot=1;ot<=Oe;ot++)he+="C"+tt[ot-1][1]+" "+tt[ot][0]+" "+Me[ot];return he+="C"+tt[Oe][1]+" "+tt[0][0]+" "+Me[0]+"Z",he};var P,U;function B(Me,ye,he){return he&&(Me=V(Me)),ye?$(Me[1]):X(Me[0])}function X(Me){var ye=v.round(Me,2);return P=ye,ye}function $(Me){var ye=v.round(Me,2);return U=ye,ye}function se(Me,ye,he,Oe){var tt=Me[0]-ye[0],ot=Me[1]-ye[1],Qe=he[0]-ye[0],Pt=he[1]-ye[1],It=Math.pow(tt*tt+ot*ot,O/2),qt=Math.pow(Qe*Qe+Pt*Pt,O/2),Wt=(qt*qt*tt-It*It*Qe)*Oe,kr=(qt*qt*ot-It*It*Pt)*Oe,mr=3*qt*(It+qt),qr=3*It*(It+qt);return[[X(ye[0]+(mr&&Wt/mr)),$(ye[1]+(mr&&kr/mr))],[X(ye[0]-(qr&&Wt/qr)),$(ye[1]-(qr&&kr/qr))]]}var le={hv:function(Me,ye,he){return"H"+X(ye[0])+"V"+B(ye,1,he)},vh:function(Me,ye,he){return"V"+$(ye[1])+"H"+B(ye,0,he)},hvh:function(Me,ye,he){return"H"+X((Me[0]+ye[0])/2)+"V"+$(ye[1])+"H"+B(ye,0,he)},vhv:function(Me,ye,he){return"V"+$((Me[1]+ye[1])/2)+"H"+X(ye[0])+"V"+B(ye,1,he)}},fe=function(Me,ye,he){return"L"+B(ye,0,he)+","+B(ye,1,he)};l.steps=function(Me){var ye=le[Me]||fe;return function(he){for(var Oe="M"+X(he[0][0])+","+$(he[0][1]),tt=he.length,ot=1;ot<tt;ot++)Oe+=ye(he[ot-1],he[ot],ot===tt-1);return Oe}};function V(Me,ye){var he=Me.backoff,Oe=Me.trace,tt=Me.d,ot=Me.i;if(he&&Oe&&Oe.marker&&Oe.marker.angle%360===0&&Oe.line&&Oe.line.shape!=="spline"){var Qe=x.isArrayOrTypedArray(he),Pt=Me,It=ye?ye[0]:P||0,qt=ye?ye[1]:U||0,Wt=Pt[0],kr=Pt[1],mr=Wt-It,qr=kr-qt,Sr=Math.atan2(qr,mr),Rr=Qe?he[ot]:he;if(Rr==="auto"){var wt=Pt.i;Oe.type==="scatter"&&wt--;var Ne=Pt.marker,Ke=Ne.symbol;x.isArrayOrTypedArray(Ke)&&(Ke=Ke[wt]);var Te=Ne.size;x.isArrayOrTypedArray(Te)&&(Te=Te[wt]),Rr=Ne?l.symbolBackOffs[l.symbolNumber(Ke)]*Te:0,Rr+=l.getMarkerStandoff(tt[wt],Oe)||0}var Ie=Wt-Rr*Math.cos(Sr),Ve=kr-Rr*Math.sin(Sr);(Ie<=Wt&&Ie>=It||Ie>=Wt&&Ie<=It)&&(Ve<=kr&&Ve>=qt||Ve>=kr&&Ve<=qt)&&(Me=[Ie,Ve])}return Me}l.applyBackoff=V,l.makeTester=function(){var Me=x.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(he){he.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ye=x.ensureSingle(Me,"path","js-reference-point",function(he){he.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=Me,l.testref=ye},l.savedBBoxes={};var Y=0,ee=1e4;l.bBox=function(Me,ye,he){he||(he=q(Me));var Oe;if(he){if(Oe=l.savedBBoxes[he],Oe)return x.extendFlat({},Oe)}else if(Me.childNodes.length===1){var tt=Me.childNodes[0];if(he=q(tt),he){var ot=+tt.getAttribute("x")||0,Qe=+tt.getAttribute("y")||0,Pt=tt.getAttribute("transform");if(!Pt){var It=l.bBox(tt,!1,he);return ot&&(It.left+=ot,It.right+=ot),Qe&&(It.top+=Qe,It.bottom+=Qe),It}if(he+="~"+ot+"~"+Qe+"~"+Pt,Oe=l.savedBBoxes[he],Oe)return x.extendFlat({},Oe)}}var qt,Wt;ye?qt=Me:(Wt=l.tester.node(),qt=Me.cloneNode(!0),Wt.appendChild(qt)),v.select(qt).attr("transform",null).call(n.positionText,0,0);var kr=qt.getBoundingClientRect(),mr=l.testref.node().getBoundingClientRect();ye||Wt.removeChild(qt);var qr={height:kr.height,width:kr.width,left:kr.left-mr.left,top:kr.top-mr.top,right:kr.right-mr.left,bottom:kr.bottom-mr.top};return Y>=ee&&(l.savedBBoxes={},Y=0),he&&(l.savedBBoxes[he]=qr),Y++,x.extendFlat({},qr)};function q(Me){var ye=Me.getAttribute("data-unformatted");if(ye!==null)return ye+Me.getAttribute("data-math")+Me.getAttribute("text-anchor")+Me.getAttribute("style")}l.setClipUrl=function(Me,ye,he){Me.attr("clip-path",oe(ye,he))};function oe(Me,ye){if(!Me)return null;var he=ye._context,Oe=he._exportedPlot?"":he._baseUrl||"";return Oe?"url('"+Oe+"#"+Me+"')":"url(#"+Me+")"}l.getTranslate=function(Me){var ye=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,he=Me.attr?"attr":"getAttribute",Oe=Me[he]("transform")||"",tt=Oe.replace(ye,function(ot,Qe,Pt){return[Qe,Pt].join(" ")}).split(" ");return{x:+tt[0]||0,y:+tt[1]||0}},l.setTranslate=function(Me,ye,he){var Oe=/(\btranslate\(.*?\);?)/,tt=Me.attr?"attr":"getAttribute",ot=Me.attr?"attr":"setAttribute",Qe=Me[tt]("transform")||"";return ye=ye||0,he=he||0,Qe=Qe.replace(Oe,"").trim(),Qe+=a(ye,he),Qe=Qe.trim(),Me[ot]("transform",Qe),Qe},l.getScale=function(Me){var ye=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,he=Me.attr?"attr":"getAttribute",Oe=Me[he]("transform")||"",tt=Oe.replace(ye,function(ot,Qe,Pt){return[Qe,Pt].join(" ")}).split(" ");return{x:+tt[0]||1,y:+tt[1]||1}},l.setScale=function(Me,ye,he){var Oe=/(\bscale\(.*?\);?)/,tt=Me.attr?"attr":"getAttribute",ot=Me.attr?"attr":"setAttribute",Qe=Me[tt]("transform")||"";return ye=ye||1,he=he||1,Qe=Qe.replace(Oe,"").trim(),Qe+="scale("+ye+","+he+")",Qe=Qe.trim(),Me[ot]("transform",Qe),Qe};var ae=/\s*sc.*/;l.setPointGroupScale=function(Me,ye,he){if(ye=ye||1,he=he||1,!!Me){var Oe=ye===1&&he===1?"":"scale("+ye+","+he+")";Me.each(function(){var tt=(this.getAttribute("transform")||"").replace(ae,"");tt+=Oe,tt=tt.trim(),this.setAttribute("transform",tt)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(Me,ye,he){Me&&Me.each(function(){var Oe,tt=v.select(this),ot=tt.select("text");if(ot.node()){var Qe=parseFloat(ot.attr("x")||0),Pt=parseFloat(ot.attr("y")||0),It=(tt.attr("transform")||"").match(j);ye===1&&he===1?Oe=[]:Oe=[a(Qe,Pt),"scale("+ye+","+he+")",a(-Qe,-Pt)],It&&Oe.push(It),tt.attr("transform",Oe.join(""))}})};function Q(Me,ye){var he;return Me&&(he=Me.mf),he===void 0&&(he=ye.marker&&ye.marker.standoff||0),!ye._geo&&!ye._xA?-he:he}l.getMarkerStandoff=Q;var re=Math.atan2,ce=Math.cos,be=Math.sin;function Ae(Me,ye){var he=ye[0],Oe=ye[1];return[he*ce(Me)-Oe*be(Me),he*be(Me)+Oe*ce(Me)]}var De,ze,Ze,at,nt,rt;function st(Me,ye){var he=Me.ma;he===void 0&&(he=ye.marker.angle,(!he||x.isArrayOrTypedArray(he))&&(he=0));var Oe,tt,ot=ye.marker.angleref;if(ot==="previous"||ot==="north"){if(ye._geo){var Qe=ye._geo.project(Me.lonlat);Oe=Qe[0],tt=Qe[1]}else{var Pt=ye._xA,It=ye._yA;if(Pt&&It)Oe=Pt.c2p(Me.x),tt=It.c2p(Me.y);else return 90}if(ye._geo){var qt=Me.lonlat[0],Wt=Me.lonlat[1],kr=ye._geo.project([qt,Wt+1e-5]),mr=ye._geo.project([qt+1e-5,Wt]),qr=re(mr[1]-tt,mr[0]-Oe),Sr=re(kr[1]-tt,kr[0]-Oe),Rr;if(ot==="north")Rr=he/180*Math.PI;else if(ot==="previous"){var wt=qt/180*Math.PI,Ne=Wt/180*Math.PI,Ke=De/180*Math.PI,Te=ze/180*Math.PI,Ie=Ke-wt,Ve=ce(Te)*be(Ie),Ce=be(Te)*ce(Ne)-ce(Te)*be(Ne)*ce(Ie);Rr=-re(Ve,Ce)-Math.PI,De=qt,ze=Wt}var Ee=Ae(qr,[ce(Rr),0]),Pe=Ae(Sr,[be(Rr),0]);he=re(Ee[1]+Pe[1],Ee[0]+Pe[0])/Math.PI*180,ot==="previous"&&!(rt===ye.uid&&Me.i===nt+1)&&(he=null)}if(ot==="previous"&&!ye._geo)if(rt===ye.uid&&Me.i===nt+1&&E(Oe)&&E(tt)){var ft=Oe-Ze,ct=tt-at,_t=ye.line&&ye.line.shape||"",Ct=_t.slice(_t.length-1);Ct==="h"&&(ct=0),Ct==="v"&&(ft=0),he+=re(ct,ft)/Math.PI*180+90}else he=null}return Ze=Oe,at=tt,nt=Me.i,rt=ye.uid,he}l.getMarkerAngle=st}}),K0=Xe({"src/components/titles/index.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=bc(),E=so(),e=sa(),t=e.strTranslate,r=es(),o=$n(),a=ou(),n=Ym(),i=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,c=1.6;function m(p,T,l){var _=p._fullLayout,w=l.propContainer,A=l.propName,M=l.placeholder,g=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,y=l.containerGroup,f=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,se=F.lineposition,le=F.shadow,fe=l.subtitlePropName,V=!!fe,Y=l.subtitlePlaceholder,ee=(w.title||{}).subtitle||{text:"",font:{}},q=(ee.text||"").trim(),oe=!1,ae=1,j=ee.font,Q=j.family,re=j.size,ce=j.color,be=j.weight,Ae=j.style,De=j.variant,ze=j.textcase,Ze=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var rt=p._context.edits[nt];function st(mr,qr){return mr===void 0||qr===void 0?!1:mr.replace(s," % ")===qr.replace(s," % ")}L===""?f=0:st(L,M)&&(rt||(L=""),f=.2,z=!0),V&&(q===""?ae=0:st(q,Y)&&(rt||(q=""),ae=.2,oe=!0)),l._meta?L=e.templateString(L,l._meta):_._meta&&(L=e.templateString(L,_._meta));var Me=L||q||rt,ye;y||(y=e.ensureSingle(_._infolayer,"g","g-"+T),ye=_._hColorbarMoveTitle);var he=y.selectAll("text."+T).data(Me?[0]:[]);he.enter().append("text"),he.text(L).attr("class",T),he.exit().remove();var Oe=null,tt=T+"-subtitle",ot=q||rt;if(V&&(Oe=y.selectAll("text."+tt).data(ot?[0]:[]),Oe.enter().append("text"),Oe.text(q).attr("class",tt),Oe.exit().remove()),!Me)return y;function Qe(mr,qr){e.syncOrAsync([Pt,It],{title:mr,subtitle:qr})}function Pt(mr){var qr=mr.title,Sr=mr.subtitle,Rr;!u&&ye&&(u={}),u?(Rr="",u.rotate&&(Rr+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||ye)&&(Rr+=t(0,(u.offset||0)-(ye||0)))):Rr=null,qr.attr("transform",Rr);function wt(Ce){if(Ce){var Ee=v.select(Ce.node().parentNode).select("."+tt);if(!Ee.empty()){var Pe=Ce.node().getBBox();if(Pe.height){var ft=Pe.y+Pe.height+h*re;Ee.attr("y",ft)}}}}if(qr.style("opacity",f*o.opacity(P)).call(r.font,{color:o.rgb(P),size:v.round(O,2),family:N,weight:U,style:B,variant:X,textcase:$,shadow:le,lineposition:se}).attr(d).call(a.convertToTspans,p,wt),Sr&&!Sr.empty()){var Ne=y.select("."+T+"-math-group"),Ke=qr.node().getBBox(),Te=Ne.node()?Ne.node().getBBox():void 0,Ie=Te?Te.y+Te.height+h*re:Ke.y+Ke.height+c*re,Ve=e.extendFlat({},d,{y:Ie});Sr.attr("transform",Rr),Sr.style("opacity",ae*o.opacity(ce)).call(r.font,{color:o.rgb(ce),size:v.round(re,2),family:Q,weight:be,style:Ae,variant:De,textcase:ze,shadow:at,lineposition:Ze}).attr(Ve).call(a.convertToTspans,p)}return S.previousPromises(p)}function It(mr){var qr=mr.title,Sr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&L){Sr.attr("transform",null);var Rr=i[b.side],wt=b.side==="left"||b.side==="top"?-1:1,Ne=x(b.pad)?b.pad:2,Ke=r.bBox(Sr.node()),Te={t:0,b:0,l:0,r:0},Ie=p._fullLayout._reservedMargin;for(var Ve in Ie)for(var Ce in Ie[Ve]){var Ee=Ie[Ve][Ce];Te[Ce]=Math.max(Te[Ce],Ee)}var Pe={left:Te.l,top:Te.t,right:_.width-Te.r,bottom:_.height-Te.b},ft=b.maxShift||wt*(Pe[b.side]-Ke[b.side]),ct=0;if(ft<0)ct=ft;else{var _t=b.offsetLeft||0,Ct=b.offsetTop||0;Ke.left-=_t,Ke.right-=_t,Ke.top-=Ct,Ke.bottom-=Ct,b.selection.each(function(){var rr=r.bBox(this);e.bBoxIntersect(Ke,rr,Ne)&&(ct=Math.max(ct,wt*(rr[b.side]-Ke[Rr])+Ne))}),ct=Math.min(ft,ct),w._titleScoot=Math.abs(ct)}if(ct>0||ft<0){var ir={left:[-ct,0],right:[ct,0],top:[0,-ct],bottom:[0,ct]}[b.side];Sr.attr("transform",t(ir[0],ir[1]))}}}he.call(Qe,Oe);function qt(mr,qr){mr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(rt&&(L?he.on(".opacity",null):(qt(he,M),z=!0),he.call(a.makeEditable,{gd:p}).on("edit",function(mr){g!==void 0?E.call("_guiRestyle",p,A,mr,g):E.call("_guiRelayout",p,A,mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,d.x,d.y)}),V)){if(V&&!L){var Wt=he.node().getBBox(),kr=Wt.y+Wt.height+c*re;Oe.attr("y",kr)}q?Oe.on(".opacity",null):(qt(Oe,Y),oe=!0),Oe.call(a.makeEditable,{gd:p}).on("edit",function(mr){E.call("_guiRelayout",p,"title.subtitle.text",mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,Oe.attr("x"),Oe.attr("y"))})}return he.classed("js-placeholder",z),Oe&&!Oe.empty()&&Oe.classed("js-placeholder",oe),y}G.exports={draw:m,SUBTITLE_PADDING_EM:c,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=Xe({"src/plots/cartesian/set_convert.js"(Z,G){"use strict";var v=Hn(),x=Xv().utcFormat,S=sa(),E=S.numberFormat,e=rs(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,n=S.isArrayOrTypedArray,i=Hs(),s=i.FP_SAFE,h=i.BADNUM,c=i.LOG_CLIP,m=i.ONEWEEK,p=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 d(u){return u!=null}G.exports=function(y,f){f=f||{};var R=y._id||"x",L=R.charAt(0);function z(q,oe){if(q>0)return Math.log(q)/Math.LN10;if(q<=0&&oe&&y.range&&y.range.length===2){var ae=y.range[0],j=y.range[1];return .5*(ae+j-2*c*Math.abs(ae-j))}else return h}function F(q,oe,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),ce=Math.round(q-re/10);Q=o(new Date(ce))+re/10}else return h;return Q}function N(q,oe,ae){return r(q,oe,ae||y.calendar)}function O(q){return y._categories[Math.round(q)]}function P(q){if(d(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 oe=y._categories.length-1;return y._categoriesMap[q]=oe,oe}return h}function U(q,oe){for(var ae=new Array(oe),j=0;j<oe;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 oe=B(q);if(oe!==void 0)return oe;if(e(q))return+q}function $(q){return e(q)?+q:B(q)}function se(q,oe,ae){return v.round(ae+oe*q,2)}function le(q,oe,ae){return(q-ae)/oe}var fe=function(oe){return e(oe)?se(oe,y._m,y._b):h},V=function(q){return le(q,y._m,y._b)};if(y.rangebreaks){var Y=L==="y";fe=function(q){if(!e(q))return h;var oe=y._rangebreaks.length;if(!oe)return se(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,ce=0;ce<oe;ce++){var be=j*y._rangebreaks[ce].min,Ae=j*y._rangebreaks[ce].max;if(Q<be)break;if(Q>Ae)re=ce+1;else{re=Q<(be+Ae)/2?ce:ce+1;break}}var De=y._B[re]||0;return isFinite(De)?se(q,y._m2,De):0},V=function(q){var oe=y._rangebreaks.length;if(!oe)return le(q,y._m,y._b);for(var ae=0,j=0;j<oe&&!(q<y._rangebreaks[j].pmin);j++)q>y._rangebreaks[j].pmax&&(ae=j+1);return le(q,y._m2,y._B[ae])}}y.c2l=y.type==="log"?z:a,y.l2c=y.type==="log"?b:a,y.l2p=fe,y.p2l=V,y.c2p=y.type==="log"?function(q,oe){return fe(z(q,oe))}:fe,y.p2c=y.type==="log"?function(q){return b(V(q))}:V,["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=V,y.cleanPos=a):y.type==="log"?(y.d2r=y.d2l=function(q,oe){return z(t(q),oe)},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,oe){return y.l2p(y.d2r(q,oe))},y.p2d=function(q){return b(V(q))},y.r2p=function(q){return y.l2p(t(q))},y.p2r=V,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,oe,ae){return y.l2p(F(q,0,ae))},y.p2d=y.p2r=function(q,oe,ae){return N(V(q),oe,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 oe=$(q);return oe!==void 0?oe: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(V(q))},y.r2p=y.d2p,y.p2r=V,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 oe=X(q);return oe!==void 0?oe: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(V(q))},y.r2p=y.d2p,y.p2r=V,y.cleanPos=function(q){return Array.isArray(q)||typeof q=="string"&&q!==""?q:a(q)},y.setupMultiCategory=function(q){var oe=y._traceIndices,ae,j,Q=y._matchGroup;if(Q&&y._categories.length===0){for(var re in Q)if(re!==R){var ce=f[w.id2name(re)];oe=oe.concat(ce._traceIndices)}}var be=[[0,{}],[0,{}]],Ae=[];for(ae=0;ae<oe.length;ae++){var De=q[oe[ae]];if(L in De){var ze=De[L],Ze=De._length||S.minRowLength(ze);if(n(ze[0])&&n(ze[1]))for(j=0;j<Ze;j++){var at=ze[0][j],nt=ze[1][j];d(at)&&d(nt)&&(Ae.push([at,nt]),at in be[0][1]||(be[0][1][at]=be[0][0]++),nt in be[1][1]||(be[1][1][nt]=be[1][0]++))}}}for(Ae.sort(function(rt,st){var Me=be[0][1],ye=Me[rt[0]]-Me[st[0]];if(ye)return ye;var he=be[1][1];return he[rt[1]]-he[st[1]]}),ae=0;ae<Ae.length;ae++)P(Ae[ae])}),y.fraction2r=function(q){var oe=y.r2l(y.range[0]),ae=y.r2l(y.range[1]);return y.l2r(oe+q*(ae-oe))},y.r2fraction=function(q){var oe=y.r2l(y.range[0]),ae=y.r2l(y.range[1]);return(y.r2l(q)-oe)/(ae-oe)},y.limitRange=function(q){var oe=y.minallowed,ae=y.maxallowed;if(!(oe===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 ce=S.simpleMap([oe,ae],y.r2l);if(oe!==void 0&&Q[0]<ce[0]&&(j[re?1:0]=oe),ae!==void 0&&Q[1]>ce[1]&&(j[re?0:1]=ae),j[0]===j[1]){var be=y.l2r(oe),Ae=y.l2r(ae);if(oe!==void 0){var De=be+1;ae!==void 0&&(De=Math.min(De,Ae)),j[re?1:0]=De}if(ae!==void 0){var ze=Ae+1;oe!==void 0&&(ze=Math.max(ze,be)),j[re?0:1]=ze}}}},y.cleanRange=function(q,oe){y._cleanRange(q,oe),y.limitRange(q)},y._cleanRange=function(q,oe){oe||(oe={}),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=oe.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,ce=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 be=S.constrain(y.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=y.l2r(be-1e3),ae[1]=y.l2r(be+1e3);break}}else{if(!e(ae[j]))if(!(re||ce)&&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 Ae=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Ae,ae[1]+=Ae}}},y.setScale=function(q){var oe=f._size;if(y.overlaying){var ae=w.getFromId({_fullLayout:f},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),ce=y.r2l(y[j][1],Q),be=L==="y";if(be?(y._offset=oe.t+(1-y.domain[1])*oe.h,y._length=oe.h*(y.domain[1]-y.domain[0]),y._m=y._length/(re-ce),y._b=-y._m*ce):(y._offset=oe.l+y.domain[0]*oe.w,y._length=oe.w*(y.domain[1]-y.domain[0]),y._m=y._length/(ce-re),y._b=-y._m*re),y._rangebreaks=[],y._lBreaks=0,y._m2=0,y._B=[],y.rangebreaks){var Ae,De;if(y._rangebreaks=y.locateBreaks(Math.min(re,ce),Math.max(re,ce)),y._rangebreaks.length){for(Ae=0;Ae<y._rangebreaks.length;Ae++)De=y._rangebreaks[Ae],y._lBreaks+=Math.abs(De.max-De.min);var ze=be;re>ce&&(ze=!ze),ze&&y._rangebreaks.reverse();var Ze=ze?-1:1;for(y._m2=Ze*y._length/(Math.abs(ce-re)-y._lBreaks),y._B.push(-y._m2*(be?ce:re)),Ae=0;Ae<y._rangebreaks.length;Ae++)De=y._rangebreaks[Ae],y._B.push(y._B[y._B.length-1]-Ze*y._m2*(De.max-De.min));for(Ae=0;Ae<y._rangebreaks.length;Ae++)De=y._rangebreaks[Ae],De.pmin=fe(De.min),De.pmax=fe(De.max)}}if(!isFinite(y._m)||!isFinite(y._b)||y._length<0)throw f._replotting=!1,new Error("Something went wrong with axis scaling")},y.maskBreaks=function(q){var oe=y.rangebreaks||[],ae,j,Q,re,ce;oe._cachedPatterns||(oe._cachedPatterns=oe.map(function(Me){return Me.enabled&&Me.bounds?S.simpleMap(Me.bounds,Me.pattern?t:y.d2c):null})),oe._cachedValues||(oe._cachedValues=oe.map(function(Me){return Me.enabled&&Me.values?S.simpleMap(Me.values,y.d2c).sort(S.sorterAsc):null}));for(var be=0;be<oe.length;be++){var Ae=oe[be];if(Ae.enabled){if(Ae.bounds){var De=Ae.pattern;switch(ae=oe._cachedPatterns[be],j=ae[0],Q=ae[1],De){case g:ce=new Date(q),re=ce.getUTCDay(),j>Q&&(Q+=7,re<j&&(re+=7));break;case M:ce=new Date(q);var ze=ce.getUTCHours(),Ze=ce.getUTCMinutes(),at=ce.getUTCSeconds(),nt=ce.getUTCMilliseconds();re=ze+(Ze/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 rt=oe._cachedValues[be],st=0;st<rt.length;st++)if(j=rt[st],Q=j+Ae.dvalue,q>=j&&q<Q)return h}}return q},y.locateBreaks=function(q,oe){var ae,j,Q,re,ce=[];if(!y.rangebreaks)return ce;var be=y.rangebreaks.slice().sort(function(he,Oe){return he.pattern===g&&Oe.pattern===M?-1:Oe.pattern===g&&he.pattern===M?1:0}),Ae=function(he,Oe){if(he=S.constrain(he,q,oe),Oe=S.constrain(Oe,q,oe),he!==Oe){for(var tt=!0,ot=0;ot<ce.length;ot++){var Qe=ce[ot];he<Qe.max&&Oe>=Qe.min&&(he<Qe.min&&(Qe.min=he),Oe>Qe.max&&(Qe.max=Oe),tt=!1)}tt&&ce.push({min:he,max:Oe})}};for(ae=0;ae<be.length;ae++){var De=be[ae];if(De.enabled)if(De.bounds){var ze=q,Ze=oe;De.pattern&&(ze=Math.floor(ze)),j=S.simpleMap(De.bounds,De.pattern?t:y.r2l),Q=j[0],re=j[1];var at=new Date(ze),nt,rt;switch(De.pattern){case g:rt=m,nt=((re<Q?7:0)+(re-Q))*p,ze+=Q*p-(at.getUTCDay()*p+at.getUTCHours()*T+at.getUTCMinutes()*l+at.getUTCSeconds()*_+at.getUTCMilliseconds());break;case M:rt=p,nt=((re<Q?24:0)+(re-Q))*T,ze+=Q*T-(at.getUTCHours()*T+at.getUTCMinutes()*l+at.getUTCSeconds()*_+at.getUTCMilliseconds());break;default:ze=Math.min(j[0],j[1]),Ze=Math.max(j[0],j[1]),rt=Ze-ze,nt=rt}for(var st=ze;st<Ze;st+=rt)Ae(st,st+nt)}else for(var Me=S.simpleMap(De.values,y.d2c),ye=0;ye<Me.length;ye++)Q=Me[ye],re=Q+De.dvalue,Ae(Q,re)}return ce.sort(function(he,Oe){return he.min-Oe.min}),ce},y.makeCalcdata=function(q,oe,ae){var j,Q,re,ce,be=y.type,Ae=be==="date"&&q[oe+"calendar"];if(oe in q){if(j=q[oe],ce=q._length||S.minRowLength(j),S.isTypedArray(j)&&(be==="linear"||be==="log")){if(ce===j.length)return j;if(j.subarray)return j.subarray(0,ce)}if(be==="multicategory")return U(j,ce);for(Q=new Array(ce),re=0;re<ce;re++)Q[re]=y.d2c(j[re],0,Ae,ae)}else{var De=oe+"0"in q?y.d2c(q[oe+"0"],0,Ae):0,ze=q["d"+oe]?Number(q["d"+oe]):1;for(j=q[{x:"y",y:"x"}[oe]],ce=q._length||j.length,Q=new Array(ce),re=0;re<ce;re++)Q[re]=De+re*ze}if(y.rangebreaks)for(re=0;re<ce;re++)Q[re]=y.maskBreaks(Q[re]);return Q},y.isValidRange=function(q,oe){return Array.isArray(q)&&q.length===2&&(oe&&q[0]===null||e(y.r2l(q[0])))&&(oe&&q[1]===null||e(y.r2l(q[1])))},y.getAutorangeDflt=function(q,oe){var ae=!y.isValidRange(q,"nullOk");return ae&&oe&&oe.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,oe){var ae=y.c2l(q[L],null,oe),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 oe=null,ae=null;for(var j in q){var Q=f[w.id2name(j)];if(Q._categories){oe=Q._categories,ae=Q._categoriesMap;break}}oe&&ae?(y._categories=oe,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 oe=0;oe<y._initialCategories.length;oe++)P(y._initialCategories[oe]);q=q.concat(y._traceIndices);var ae=y._matchGroup;for(var j in ae)if(R!==j){var Q=f[w.id2name(j)];Q._categories=y._categories,Q._categoriesMap=y._categoriesMap,q=q.concat(Q._traceIndices)}return q};var ee=f._d3locale;y.type==="date"&&(y._dateFormat=ee?ee.timeFormat:x,y._extraFormat=f._extraFormat),y._separators=f.separators,y._numFormat=ee?ee.numberFormat:E,delete y._minDtick,delete y._forceTick0}}}),a1=Xe({"src/plots/cartesian/axis_autotype.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().BADNUM,E=x.isArrayOrTypedArray,e=x.isDateTime,t=x.cleanNumber,r=Math.round;G.exports=function(m,p,T){var l=m,_=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,p))return"date";var g=T.autotypenumbers!=="strict";return s(l,g)?"category":a(l,g)?"linear":"-"};function o(c,m){return m?v(c):typeof c=="number"}function a(c,m){for(var p=c.length,T=0;T<p;T++)if(o(c[T],m))return!0;return!1}function n(c,m){for(var p=c.length,T=i(p),l=0,_=0,w={},A=0;A<p;A+=T){var M=r(A),g=c[M],b=String(g);w[b]||(w[b]=1,e(g,m)&&l++,v(g)&&_++)}return l>_*2}function i(c){return Math.max(1,(c-1)/1e3)}function s(c,m){for(var p=c.length,T=i(p),l=0,_=0,w={},A=0;A<p;A+=T){var M=r(A),g=c[M],b=String(g);if(!w[b]){w[b]=1;var d=typeof g;d==="boolean"?_++:(m?t(g)!==S:d==="number")?l++:d==="string"&&_++}}return _>l*2}function h(c){return E(c[0])&&E(c[1])}}}),Yd=Xe({"src/plots/cartesian/autorange.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=Hs().FP_SAFE,e=so(),t=es(),r=ef(),o=r.getFromId,a=r.isLinked;G.exports={applyAutorangeOptions:y,getAutoRange:n,makePadFn:s,doAutoRange:p,findExtremes:T,concatExtremes:m};function n(f,R){var L,z,F=[],N=f._fullLayout,O=s(N,R,0),P=s(N,R,1),U=m(f,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,se=X[0].val;for(L=1;L<B.length&&$===se;L++)$=Math.min($,B[L].val);for(L=1;L<X.length&&$===se;L++)se=Math.max(se,X[L].val);var le=R.autorange,fe=le==="reversed"||le==="min reversed"||le==="max reversed";if(!fe&&R.range){var V=S.simpleMap(R.range,R.r2l);fe=V[1]<V[0]}R.autorange==="reversed"&&(R.autorange=!0);var Y=R.rangemode,ee=Y==="tozero",q=Y==="nonnegative",oe=R._length,ae=oe/10,j=0,Q,re,ce,be,Ae,De;for(L=0;L<B.length;L++)for(Q=B[L],z=0;z<X.length;z++)re=X[z],De=re.val-Q.val-i(R,Q.val,re.val),De>0&&(Ae=oe-O(Q)-P(re),Ae>ae?De/Ae>j&&(ce=Q,be=re,j=De/Ae):De/oe>j&&(ce={val:Q.val,nopad:1},be={val:re.val,nopad:1},j=De/oe));function ze(st,Me){return Math.max(st,P(Me))}if($===se){var Ze=$-1,at=$+1;if(ee)if($===0)F=[0,1];else{var nt=($>0?X:B).reduce(ze,0),rt=$/(1-Math.min(.5,nt/oe));F=$>0?[0,rt]:[rt,0]}else q?F=[Math.max(0,Ze),Math.max(1,at)]:F=[Ze,at]}else ee?(ce.val>=0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:0,nopad:1})):q&&(ce.val-j*O(ce)<0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:1,nopad:1})),j=(be.val-ce.val-i(R,Q.val,re.val))/(oe-O(ce)-P(be)),F=[ce.val-j*O(ce),be.val+j*P(be)];return F=y(F,R),R.limitRange&&R.limitRange(),fe&&F.reverse(),S.simpleMap(F,R.l2r||Number)}function i(f,R,L){var z=0;if(f.rangebreaks)for(var F=f.locateBreaks(R,L),N=0;N<F.length;N++){var O=F[N];z+=O.max-O.min}return z}function s(f,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(f,R._id)||(P=c(f,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 c(f,R,L){var z=0,F=R._id.charAt(0)==="x";for(var N in f._plots){var O=f._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",se=P._selections[$];se.each(function(q){var oe=v.select(this),ae=oe.select(".text-math-group");ae.empty()&&(q.bb=t.bBox(oe.node()))})}for(var le=0;le<P._vals.length;le++){var fe=P._vals[le],V=fe.bb;if(V){var Y=2*h+V.width,ee=2*h+V.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 m(f,R,L){var z=R._id,F=f._fullData,N=f._fullLayout,O=[],P=[],U,B,X;function $(Y,ee){for(U=0;U<ee.length;U++){var q=Y[ee[U]],oe=(q._extremes||{})[z];if(q.visible===!0&&oe){for(B=0;B<oe.min.length;B++)X=oe.min[B],l(O,X.val,X.pad,{extrapad:X.extrapad});for(B=0;B<oe.max.length;B++)X=oe.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 se in R._matchGroup)if(se!==R._id){var le=o(f,se),fe=m(f,le,!0),V=R._length/le._length;for(B=0;B<fe.min.length;B++)X=fe.min[B],l(O,X.val,X.pad*V,{extrapad:X.extrapad});for(B=0;B<fe.max.length;B++)X=fe.max[B],_(P,X.val,X.pad*V,{extrapad:X.extrapad})}}return{min:O,max:P}}function p(f,R,L){if(R.setScale(),R.autorange){R.range=L?L.slice():n(f,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",f.layout,f._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(f,R)),N._input.rangeslider[R._name]=S.extendFlat({},O)}}function T(f,R,L){L||(L={}),f._m||f.setScale();var z=[],F=[],N=R.length,O=L.padded||!1,P=L.tozero&&(f.type==="linear"||f.type==="-"),U=f.type==="log",B=!1,X=L.vpadLinearized||!1,$,se,le,fe,V,Y,ee,q,oe;function ae(ze){if(Array.isArray(ze))return B=!0,function(at){return Math.max(Number(ze[at]||0),0)};var Ze=Math.max(Number(ze||0),0);return function(){return Ze}}var j=ae((f._m>0?L.ppadplus:L.ppadminus)||L.ppad||0),Q=ae((f._m>0?L.ppadminus:L.ppadplus)||L.ppad||0),re=ae(L.vpadplus||L.vpad),ce=ae(L.vpadminus||L.vpad);if(!B){if(q=1/0,oe=-1/0,U)for($=0;$<N;$++)se=R[$],se<q&&se>0&&(q=se),se>oe&&se<E&&(oe=se);else for($=0;$<N;$++)se=R[$],se<q&&se>-E&&(q=se),se>oe&&se<E&&(oe=se);R=[q,oe],N=2}var be={tozero:P,extrapad:O};function Ae(ze){le=R[ze],x(le)&&(Y=j(ze),ee=Q(ze),X?(fe=f.c2l(le)-ce(ze),V=f.c2l(le)+re(ze)):(q=le-ce(ze),oe=le+re(ze),U&&q<oe/10&&(q=oe/10),fe=f.c2l(q),V=f.c2l(oe)),P&&(fe=Math.min(0,fe),V=Math.max(0,V)),A(fe)&&l(z,fe,ee,be),A(V)&&_(F,V,Y,be))}var De=Math.min(6,N);for($=0;$<De;$++)Ae($);for($=N-1;$>=De;$--)Ae($);return{min:z,max:F,opts:L}}function l(f,R,L,z){w(f,R,L,z,M)}function _(f,R,L,z){w(f,R,L,z,g)}function w(f,R,L,z,F){for(var N=z.tozero,O=z.extrapad,P=!0,U=0;U<f.length&&P;U++){var B=f[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)&&(f.splice(U,1),U--)}if(P){var X=N&&R===0;f.push({val:R,pad:X?0:L,extrapad:X?!1:O})}}function A(f){return x(f)&&Math.abs(f)<E}function M(f,R){return f<=R}function g(f,R){return f>=R}function b(f,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(f,R.d2l(L.clipmin)):f}function d(f,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(f,R.d2l(L.clipmax)):f}function u(f,R,L){return R!==void 0&&L!==void 0?(R=f.d2l(R),L=f.d2l(L),R<L):!0}function y(f,R){if(!R||!R.autorangeoptions)return f;var L=f[0],z=f[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=d(z,R),[L,z]}}}),Go=Xe({"src/plots/cartesian/axes.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=bc(),E=so(),e=sa(),t=e.strTranslate,r=ou(),o=K0(),a=$n(),n=es(),i=Wh(),s=l5(),h=lh(),c=Hs(),m=c.ONEMAXYEAR,p=c.ONEAVGYEAR,T=c.ONEMINYEAR,l=c.ONEMAXQUARTER,_=c.ONEAVGQUARTER,w=c.ONEMINQUARTER,A=c.ONEMAXMONTH,M=c.ONEAVGMONTH,g=c.ONEMINMONTH,b=c.ONEWEEK,d=c.ONEDAY,u=d/2,y=c.ONEHOUR,f=c.ONEMIN,R=c.ONESEC,L=c.ONEMILLI,z=c.ONEMICROSEC,F=c.MINUS_SIGN,N=c.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"]},se=uh(),le=se.MID_SHIFT,fe=se.CAP_SHIFT,V=se.LINE_SPACING,Y=se.OPPOSITE_SIDE,ee=3,q=G.exports={};q.setConvert=wv();var oe=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 ce=1e-4;function be(Tt){var ut=(Tt[1]-Tt[0])*ce;return[Tt[0]-ut,Tt[1]+ut]}q.coerceRef=function(Tt,ut,Br,Cr,xr,Ir){var Ur=Cr.charAt(Cr.length-1),Hr=Br._fullLayout._subplots[Ur+"axis"],xt=Cr+"ref",Xt={};return xr||(xr=Hr[0]||(typeof Ir=="string"?Ir:Ir[0])),Ir||(Ir=xr),Hr=Hr.concat(Hr.map(function(vr){return vr+" domain"})),Xt[xt]={valType:"enumerated",values:Hr.concat(Ir?typeof Ir=="string"?[Ir]:Ir:[]),dflt:xr},e.coerce(Tt,ut,Xt,xt)},q.coerceRefArray=function(Tt,ut,Br,Cr,xr,Ir,Ur){let Hr=Cr.charAt(Cr.length-1);var xt=Br._fullLayout._subplots[Hr+"axis"];let Xt=Cr+"ref";var vr=Tt[Xt];xr||(xr=xt[0]||(typeof Ir=="string"?Ir:Ir[0])),xt=xt.concat(xt.map(ba=>ba+" domain")),xt=xt.concat(Ir||[]),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],xt.includes(vr[Or])||(vr[Or]=xr);return ut[Xt]=vr,vr},q.getRefType=function(Tt){return Tt===void 0?Tt:Array.isArray(Tt)?"array":Tt==="paper"?"paper":Tt==="pixel"?"pixel":/( domain)$/.test(Tt)?"domain":"range"},q.coercePosition=function(Tt,ut,Br,Cr,xr,Ir){var Ur,Hr,xt=q.getRefType(Cr);if(xt!=="range")Ur=e.ensureNumber,Hr=Br(xr,Ir);else{var Xt=q.getFromId(ut,Cr);Ir=Xt.fraction2r(Ir),Hr=Br(xr,Ir),Ur=Xt.cleanPos}Tt[xr]=Ur(Hr)},q.cleanPosition=function(Tt,ut,Br){var Cr=Br==="paper"||Br==="pixel"?e.ensureNumber:q.getFromId(ut,Br).cleanPos;return Cr(Tt)},q.redrawComponents=function(Tt,ut){ut=ut||q.listIds(Tt);var Br=Tt._fullLayout;function Cr(xr,Ir,Ur,Hr){for(var xt=E.getComponentMethod(xr,Ir),Xt={},vr=0;vr<ut.length;vr++)for(var Or=Br[q.id2name(ut[vr])],ba=Or[Ur],Pa=0;Pa<ba.length;Pa++){var ya=ba[Pa];if(!Xt[ya]&&(xt(Tt,ya),Xt[ya]=1,Hr))return}}Cr("annotations","drawOne","_annIndices"),Cr("shapes","drawOne","_shapeIndices"),Cr("images","draw","_imgIndices",!0),Cr("selections","drawOne","_selectionIndices")};var Ae=q.getDataConversions=function(Tt,ut,Br,Cr){var xr,Ir=Br==="x"||Br==="y"||Br==="z"?Br:Cr;if(e.isArrayOrTypedArray(Ir)){if(xr={type:oe(Cr,void 0,{autotypenumbers:Tt._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(Tt,ut,Ir);return xr?{d2c:xr.d2c,c2d:xr.c2d}:Ir==="ids"?{d2c:ze,c2d:ze}:{d2c:De,c2d:De}};function De(Tt){return+Tt}function ze(Tt){return String(Tt)}q.getDataToCoordFunc=function(Tt,ut,Br,Cr){return Ae(Tt,ut,Br,Cr).d2c},q.counterLetter=function(Tt){var ut=Tt.charAt(0);if(ut==="x")return"y";if(ut==="y")return"x"},q.minDtick=function(Tt,ut,Br,Cr){["log","category","multicategory"].indexOf(Tt.type)!==-1||!Cr?Tt._minDtick=0:Tt._minDtick===void 0?(Tt._minDtick=ut,Tt._forceTick0=Br):Tt._minDtick&&((Tt._minDtick/ut+1e-6)%1<2e-6&&((Br-Tt._forceTick0)/ut%1+1.000001)%1<2e-6?(Tt._minDtick=ut,Tt._forceTick0=Br):((ut/Tt._minDtick+1e-6)%1>2e-6||((Br-Tt._forceTick0)/Tt._minDtick%1+1.000001)%1>2e-6)&&(Tt._minDtick=0))},q.saveRangeInitial=function(Tt,ut){for(var Br=q.list(Tt,"",!0),Cr=!1,xr=0;xr<Br.length;xr++){var Ir=Br[xr],Ur=Ir._rangeInitial0===void 0&&Ir._rangeInitial1===void 0,Hr=Ur||Ir.range[0]!==Ir._rangeInitial0||Ir.range[1]!==Ir._rangeInitial1,xt=Ir.autorange;(Ur&&xt!==!0||ut&&Hr)&&(Ir._rangeInitial0=xt==="min"||xt==="max reversed"?void 0:Ir.range[0],Ir._rangeInitial1=xt==="max"||xt==="min reversed"?void 0:Ir.range[1],Ir._autorangeInitial=xt,Cr=!0)}return Cr},q.saveShowSpikeInitial=function(Tt,ut){for(var Br=q.list(Tt,"",!0),Cr=!1,xr="on",Ir=0;Ir<Br.length;Ir++){var Ur=Br[Ir],Hr=Ur._showSpikeInitial===void 0,xt=Hr||Ur.showspikes!==Ur._showspikes;(Hr||ut&&xt)&&(Ur._showSpikeInitial=Ur.showspikes,Cr=!0),xr==="on"&&!Ur.showspikes&&(xr="off")}return Tt._fullLayout._cartesianSpikesEnabled=xr,Cr},q.autoBin=function(Tt,ut,Br,Cr,xr,Ir){var Ur=e.aggNums(Math.min,null,Tt),Hr=e.aggNums(Math.max,null,Tt);if(ut.type==="category"||ut.type==="multicategory")return{start:Ur-.5,end:Hr+.5,size:Math.max(1,Math.round(Ir)||1),_dataSpan:Hr-Ur};xr||(xr=ut.calendar);var xt;if(ut.type==="log"?xt={type:"linear",range:[Ur,Hr]}:xt={type:ut.type,range:e.simpleMap([Ur,Hr],ut.c2r,0,xr),calendar:xr},q.setConvert(xt),Ir=Ir&&s.dtick(Ir,xt.type),Ir)xt.dtick=Ir,xt.tick0=s.tick0(void 0,xt.type,xr);else{var Xt;if(Br)Xt=(Hr-Ur)/Br;else{var vr=e.distinctVals(Tt),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(Tt)/Math.pow(Tt.length,Cr?.25:.4)),x(Xt)||(Xt=1)}q.autoTicks(xt,Xt)}var Pa=xt.dtick,ya=q.tickIncrement(q.tickFirst(xt),Pa,"reverse",xr),la,Ta;if(typeof Pa=="number")ya=Ze(ya,Tt,xt,Ur,Hr),Ta=1+Math.floor((Hr-ya)/Pa),la=ya+Ta*Pa;else for(xt.dtick.charAt(0)==="M"&&(ya=at(ya,Tt,Pa,Ur,xr)),la=ya,Ta=0;la<=Hr;)la=q.tickIncrement(la,Pa,!1,xr),Ta++;return{start:ut.c2r(ya,0,xr),end:ut.c2r(la,0,xr),size:Pa,_dataSpan:Hr-Ur}};function Ze(Tt,ut,Br,Cr,xr){var Ir=0,Ur=0,Hr=0,xt=0;function Xt(Pa){return(1+(Pa-Tt)*100/Br.dtick)%100<2}for(var vr=0;vr<ut.length;vr++)ut[vr]%1===0?Hr++:x(ut[vr])||xt++,Xt(ut[vr])&&Ir++,Xt(ut[vr]+Br.dtick/2)&&Ur++;var Or=ut.length-xt;if(Hr===Or&&Br.type!=="date")Br.dtick<1?Tt=Cr-.5*Br.dtick:(Tt-=.5,Tt+Br.dtick<Cr&&(Tt+=Br.dtick));else if(Ur<Or*.1&&(Ir>Or*.3||Xt(Cr)||Xt(xr))){var ba=Br.dtick/2;Tt+=Tt+ba<Cr?ba:-ba}return Tt}function at(Tt,ut,Br,Cr,xr){var Ir=e.findExactDates(ut,xr),Ur=.8;if(Ir.exactDays>Ur){var Hr=Number(Br.slice(1));Ir.exactYears>Ur&&Hr%12===0?Tt=q.tickIncrement(Tt,"M6","reverse")+d*1.5:Ir.exactMonths>Ur?Tt=q.tickIncrement(Tt,"M1","reverse")+d*15.5:Tt-=u;var xt=q.tickIncrement(Tt,Br);if(xt<=Cr)return xt}return Tt}q.prepMinorTicks=function(Tt,ut,Br){if(!ut.minor.dtick){delete Tt.dtick;var Cr=ut.dtick&&x(ut._tmin),xr;if(Cr){var Ir=q.tickIncrement(ut._tmin,ut.dtick,!0);xr=[ut._tmin,Ir*.99+ut._tmin*.01]}else{var Ur=e.simpleMap(ut.range,ut.r2l);xr=[Ur[0],.8*Ur[0]+.2*Ur[1]]}if(Tt.range=e.simpleMap(xr,ut.l2r),Tt._isMinor=!0,q.prepTicks(Tt,Br),Cr){var Hr=x(ut.dtick),xt=x(Tt.dtick),Xt=Hr?ut.dtick:+ut.dtick.substring(1),vr=xt?Tt.dtick:+Tt.dtick.substring(1);Hr&&xt?nt(Xt,vr)?Xt===2*b&&vr===2*d&&(Tt.dtick=b):Xt===2*b&&vr===3*d?Tt.dtick=b:Xt===b&&!(ut._input.minor||{}).nticks?Tt.dtick=d:rt(Xt/vr,2.5)?Tt.dtick=Xt/2:Tt.dtick=Xt:String(ut.dtick).charAt(0)==="M"?xt?Tt.dtick="M1":nt(Xt,vr)?Xt>=12&&vr===2&&(Tt.dtick="M3"):Tt.dtick=ut.dtick:String(Tt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Xt,vr)||(Tt.dtick=rt(Xt/vr,2.5)?ut.dtick/2:ut.dtick):Tt.dtick="D1":Tt.dtick==="D2"&&+ut.dtick>1&&(Tt.dtick=1)}Tt.range=ut.range}ut.minor._tick0Init===void 0&&(Tt.tick0=ut.tick0)};function nt(Tt,ut){return Math.abs((Tt/ut+.5)%1-.5)<.001}function rt(Tt,ut){return Math.abs(Tt/ut-1)<.001}q.prepTicks=function(Tt,ut){var Br=e.simpleMap(Tt.range,Tt.r2l,void 0,void 0,ut);if(Tt.tickmode==="auto"||!Tt.dtick){var Cr=Tt.nticks,xr;Cr||(Tt.type==="category"||Tt.type==="multicategory"?(xr=Tt.tickfont?e.bigFont(Tt.tickfont.size||12):15,Cr=Tt._length/xr):(xr=Tt._id.charAt(0)==="y"?40:80,Cr=e.constrain(Tt._length/xr,4,9)+1),Tt._name==="radialaxis"&&(Cr*=2)),Tt.minor&&Tt.minor.tickmode!=="array"||Tt.tickmode==="array"&&(Cr*=100),Tt._roughDTick=Math.abs(Br[1]-Br[0])/Cr,q.autoTicks(Tt,Tt._roughDTick),Tt._minDtick>0&&Tt.dtick<Tt._minDtick*2&&(Tt.dtick=Tt._minDtick,Tt.tick0=Tt.l2r(Tt._forceTick0))}Tt.ticklabelmode==="period"&&Me(Tt),Tt.tick0||(Tt.tick0=Tt.type==="date"?"2000-01-01":0),Tt.type==="date"&&Tt.dtick<.1&&(Tt.dtick=.1),qr(Tt)};function st(Tt){return+Tt.substring(1)}function Me(Tt){var ut;function Br(){return!(x(Tt.dtick)||Tt.dtick.charAt(0)!=="M")}var Cr=Br(),xr=q.getTickFormat(Tt);if(xr){var Ir=Tt._dtickInit!==Tt.dtick;/%[fLQsSMX]/.test(xr)||(/%[HI]/.test(xr)?(ut=y,Ir&&!Cr&&Tt.dtick<y&&(Tt.dtick=y)):/%p/.test(xr)?(ut=u,Ir&&!Cr&&Tt.dtick<u&&(Tt.dtick=u)):/%[Aadejuwx]/.test(xr)?(ut=d,Ir&&!Cr&&Tt.dtick<d&&(Tt.dtick=d)):/%[UVW]/.test(xr)?(ut=b,Ir&&!Cr&&Tt.dtick<b&&(Tt.dtick=b)):/%[Bbm]/.test(xr)?(ut=M,Ir&&(Cr?st(Tt.dtick)<1:Tt.dtick<g)&&(Tt.dtick="M1")):/%[q]/.test(xr)?(ut=_,Ir&&(Cr?st(Tt.dtick)<3:Tt.dtick<w)&&(Tt.dtick="M3")):/%[Yy]/.test(xr)&&(ut=p,Ir&&(Cr?st(Tt.dtick)<12:Tt.dtick<T)&&(Tt.dtick="M12")))}Cr=Br(),Cr&&Tt.tick0===Tt._dowTick0&&(Tt.tick0=Tt._rawTick0),Tt._definedDelta=ut}function ye(Tt,ut,Br){for(var Cr=0;Cr<Tt.length;Cr++){var xr=Tt[Cr].value,Ir=Cr,Ur=Cr+1;Cr<Tt.length-1?(Ir=Cr,Ur=Cr+1):Cr>0?(Ir=Cr-1,Ur=Cr):(Ir=Cr,Ur=Cr);var Hr=Tt[Ir].value,xt=Tt[Ur].value,Xt=Math.abs(xt-Hr),vr=Br||Xt,Or=0;vr>=T?Xt>=T&&Xt<=m?Or=Xt:Or=p: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>=d?Or=d: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(ut.rangebreaks&&Or>0){for(var ya=84,la=0,Ta=0;Ta<ya;Ta++){var Ai=(Ta+.5)/ya;ut.maskBreaks(xr*(1-Ai)+Ai*Pa)!==N&&la++}Or*=la/ya,Or||(Tt[Cr].drop=!0),ba&&Xt>b&&(Or=Xt)}(Or>0||Cr===0)&&(Tt[Cr].periodX=xr+Or/2)}}q.calcTicks=function(ut,Br){for(var Cr=ut.type,xr=ut.calendar,Ir=ut.ticklabelstep,Ur=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],xt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Xt=e.simpleMap(ut.range,ut.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,ut._length||0),ya=[],la=[],Ta=[],Ai=[],ki=[],Ki=ut.minor&&(ut.minor.ticks||ut.minor.showgrid),_n=1;_n>=(Ki?0:1);_n--){var Rn=!_n;_n?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var En=_n?ut:e.extendFlat({},ut,ut.minor);if(Rn?q.prepMinorTicks(En,ut,Br):q.prepTicks(En,Br),En.tickmode==="array"){_n?(Ta=[],ya=tt(ut,!Rn)):(Ai=[],la=tt(ut,!Rn));continue}if(En.tickmode==="sync"){Ta=[],ya=Oe(ut);continue}var On=be(Xt),no=On[0],cn=On[1],lo=x(En.dtick),Wo=Cr==="log"&&!(lo||En.dtick.charAt(0)==="L"),hs=q.tickFirst(En,Br);if(_n){if(ut._tmin=hs,hs<no!==vr)break;(Cr==="category"||Cr==="multicategory")&&(cn=vr?Math.max(-.5,cn):Math.min(ut._categories.length-.5,cn))}var Oo=null,Wn=hs,No;if(_n){var as;lo?as=ut.dtick:Cr==="date"?typeof ut.dtick=="string"&&ut.dtick.charAt(0)==="M"&&(as=M*ut.dtick.substring(1)):as=ut._roughDTick,No=Math.round((ut.r2l(Wn)-ut.r2l(ut.tick0))/as)-1}var Ns=En.dtick;for(En.rangebreaks&&En._tick0Init!==En.tick0&&(Wn=ri(Wn,ut),vr||(Wn=q.tickIncrement(Wn,Ns,!vr,xr))),_n&&Ur&&(Wn=q.tickIncrement(Wn,Ns,!vr,xr),No--);vr?Wn>=cn:Wn<=cn;Wn=q.tickIncrement(Wn,Ns,vr,xr)){if(_n&&No++,En.rangebreaks&&!vr){if(Wn<no)continue;if(En.maskBreaks(Wn)===N&&ri(Wn,En)>=ba)break}if(Ta.length>Pa||Wn===Oo)break;Oo=Wn;var ss={value:Wn};_n?(Wo&&Wn!==(Wn|0)&&(ss.simpleLabel=!0),Ir>1&&No%Ir&&(ss.skipLabel=!0),Ta.push(ss)):(ss.minor=!0,Ai.push(ss))}}if(!Ai||Ai.length<2)xt=!1;else{var uo=(Ai[1].value-Ai[0].value)*(Hr?-1:1);hn(uo,ut.tickformat)||(xt=!1)}if(!xt)ki=Ta;else{var jn=Ta.concat(Ai);Ur&&Ta.length&&(jn=jn.slice(1)),jn=jn.sort(function(Vs,vl){return Vs.value-vl.value}).filter(function(Vs,vl,Ts){return vl===0||Vs.value!==Ts[vl-1].value});var Xn=jn.map(function(Vs,vl){return Vs.minor===void 0&&!Vs.skipLabel?vl:null}).filter(function(Vs){return Vs!==null});Xn.forEach(function(Vs){xt.map(function(vl){var Ts=Vs+vl;Ts>=0&&Ts<jn.length&&e.pushUnique(ki,jn[Ts])})})}if(Ki){var ls=ut.minor.ticks==="inside"&&ut.ticks==="outside"||ut.minor.ticks==="outside"&&ut.ticks==="inside";if(!ls){for(var Cs=Ta.map(function(Vs){return Vs.value}),Ks=[],Xo=0;Xo<Ai.length;Xo++){var Gi=Ai[Xo],Ln=Gi.value;if(Cs.indexOf(Ln)===-1){for(var Us=!1,_s=0;!Us&&_s<Ta.length;_s++)1e7+Ta[_s].value===1e7+Ln&&(Us=!0);Us||Ks.push(Gi)}}Ai=Ks}}Ur&&ye(ki,ut,ut._definedDelta);var Gn;if(ut.rangebreaks){var zs=ut._id.charAt(0)==="y",vs=1;ut.tickmode==="auto"&&(vs=ut.tickfont?ut.tickfont.size:12);var Ws=NaN;for(Gn=Ta.length-1;Gn>-1;Gn--){if(Ta[Gn].drop){Ta.splice(Gn,1);continue}Ta[Gn].value=ri(Ta[Gn].value,ut);var il=ut.c2p(Ta[Gn].value);(zs?Ws>il-vs:Ws<il+vs)?Ta.splice(vr?Gn+1:Gn,1):Ws=il}}Za(ut)&&Math.abs(Xt[1]-Xt[0])===360&&Ta.pop(),ut._tmax=(Ta[Ta.length-1]||{}).value,ut._prevDateHead="",ut._inCalcTicks=!0;var xn,ko=function(Vs){Vs.text="",ut._prevDateHead=xn};Ta=Ta.concat(Ai);function bo(Vs,vl){var Ts=q.tickText(Vs,vl.value,!1,vl.simpleLabel),js=vl.periodX;return js!==void 0&&(Ts.periodX=js,(js>ba||js<Or)&&(js>ba&&(Ts.periodX=ba),js<Or&&(Ts.periodX=Or),ko(Ts))),Ts}var Is;for(Gn=0;Gn<Ta.length;Gn++){var pu=Ta[Gn].minor,co=Ta[Gn].value;pu?(xt&&ki.indexOf(Ta[Gn])!==-1?Is=bo(ut,Ta[Gn]):Is={x:co},Is.minor=!0,la.push(Is)):(xn=ut._prevDateHead,Is=bo(ut,Ta[Gn]),(Ta[Gn].skipLabel||xt&&ki.indexOf(Ta[Gn])===-1)&&ko(Is),ya.push(Is))}return ya=ya.concat(la),ut._inCalcTicks=!1,Ur&&ya.length&&(ya[0].noTick=!0),ya};function he(Tt,ut){return Tt.rangebreaks&&(ut=ut.filter(function(Br){return Tt.maskBreaks(Br.x)!==N})),ut}function Oe(Tt){var ut=Tt._mainAxis,Br=[];if(ut._vals){for(var Cr=0;Cr<ut._vals.length;Cr++)if(!ut._vals[Cr].noTick){var xr=ut.l2p(ut._vals[Cr].x),Ir=Tt.p2l(xr),Ur=q.tickText(Tt,Ir);ut._vals[Cr].minor&&(Ur.minor=!0,Ur.text=""),Br.push(Ur)}}return Br=he(Tt,Br),Br}function tt(Tt,ut){var Br=e.simpleMap(Tt.range,Tt.r2l),Cr=be(Br),xr=Math.min(Cr[0],Cr[1]),Ir=Math.max(Cr[0],Cr[1]),Ur=Tt.type==="category"?Tt.d2l_noadd:Tt.d2l;Tt.type==="log"&&String(Tt.dtick).charAt(0)!=="L"&&(Tt.dtick="L"+Math.pow(10,Math.floor(Math.min(Tt.range[0],Tt.range[1]))-1));for(var Hr=[],xt=0;xt<=1;xt++)if(!(ut!==void 0&&(ut&&xt||ut===!1&&!xt))&&!(xt&&!Tt.minor)){var Xt=xt?Tt.minor.tickvals:Tt.tickvals,vr=xt?[]:Tt.ticktext;if(Xt){e.isArrayOrTypedArray(vr)||(vr=[]);for(var Or=0;Or<Xt.length;Or++){var ba=Ur(Xt[Or]);if(ba>xr&&ba<Ir){var Pa=q.tickText(Tt,ba,!1,String(vr[Or]));xt&&(Pa.minor=!0,Pa.text=""),Hr.push(Pa)}}}}return Hr=he(Tt,Hr),Hr}var ot=[2,5,10],Qe=[1,2,3,6,12],Pt=[1,2,5,10,15,30],It=[1,2,3,7,14],qt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Wt=[-.301,0,.301,.699,1],kr=[15,30,45,90,180];function mr(Tt,ut,Br){return ut*e.roundUp(Tt/ut,Br)}q.autoTicks=function(Tt,ut,Br){var Cr;function xr(Or){return Math.pow(Or,Math.floor(Math.log(ut)/Math.LN10))}if(Tt.type==="date"){Tt.tick0=e.dateTick0(Tt.calendar,0);var Ir=2*ut;if(Ir>p)ut/=p,Cr=xr(10),Tt.dtick="M"+12*mr(ut,Cr,ot);else if(Ir>M)ut/=M,Tt.dtick="M"+mr(ut,1,Qe);else if(Ir>d){if(Tt.dtick=mr(ut,d,Tt._hasDayOfWeekBreaks?[1,2,7,14]:It),!Br){var Ur=q.getTickFormat(Tt),Hr=Tt.ticklabelmode==="period";Hr&&(Tt._rawTick0=Tt.tick0),/%[uVW]/.test(Ur)?Tt.tick0=e.dateTick0(Tt.calendar,2):Tt.tick0=e.dateTick0(Tt.calendar,1),Hr&&(Tt._dowTick0=Tt.tick0)}}else Ir>y?Tt.dtick=mr(ut,y,Qe):Ir>f?Tt.dtick=mr(ut,f,Pt):Ir>R?Tt.dtick=mr(ut,R,Pt):(Cr=xr(10),Tt.dtick=mr(ut,Cr,ot))}else if(Tt.type==="log"){Tt.tick0=0;var xt=e.simpleMap(Tt.range,Tt.r2l);if(Tt._isMinor&&(ut*=1.5),ut>.7)Tt.dtick=Math.ceil(ut);else if(Math.abs(xt[1]-xt[0])<1){var Xt=1.5*Math.abs((xt[1]-xt[0])/ut);ut=Math.abs(Math.pow(10,xt[1])-Math.pow(10,xt[0]))/Xt,Cr=xr(10),Tt.dtick="L"+mr(ut,Cr,ot)}else Tt.dtick=ut>.3?"D2":"D1"}else Tt.type==="category"||Tt.type==="multicategory"?(Tt.tick0=0,Tt.dtick=Math.ceil(Math.max(ut,1))):Za(Tt)?(Tt.tick0=0,Cr=1,Tt.dtick=mr(ut,Cr,kr)):(Tt.tick0=0,Cr=xr(10),Tt.dtick=mr(ut,Cr,ot));if(Tt.dtick===0&&(Tt.dtick=1),!x(Tt.dtick)&&typeof Tt.dtick!="string"){var vr=Tt.dtick;throw Tt.dtick=1,"ax.dtick error: "+String(vr)}};function qr(Tt){var ut=Tt.dtick;if(Tt._tickexponent=0,!x(ut)&&typeof ut!="string"&&(ut=1),(Tt.type==="category"||Tt.type==="multicategory")&&(Tt._tickround=null),Tt.type==="date"){var Br=Tt.r2l(Tt.tick0),Cr=Tt.l2r(Br).replace(/(^-|i)/g,""),xr=Cr.length;if(String(ut).charAt(0)==="M")xr>10||Cr.slice(5)!=="01-01"?Tt._tickround="d":Tt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&xr<=10||ut>=d*15)Tt._tickround="d";else if(ut>=f&&xr<=16||ut>=y)Tt._tickround="M";else if(ut>=R&&xr<=19||ut>=f)Tt._tickround="S";else{var Ir=Tt.l2r(Br+ut).replace(/^-/,"").length;Tt._tickround=Math.max(xr,Ir)-20,Tt._tickround<0&&(Tt._tickround=4)}}else if(x(ut)||ut.charAt(0)==="L"){var Ur=Tt.range.map(Tt.r2d||Number);x(ut)||(ut=Number(ut.slice(1))),Tt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Ur[0]),Math.abs(Ur[1])),xt=Math.floor(Math.log(Hr)/Math.LN10+.01),Xt=Tt.minexponent===void 0?3:Tt.minexponent;Math.abs(xt)>Xt&&(Pe(Tt.exponentformat)&&Tt.exponentformat!=="SI extended"&&!ft(xt)||Pe(Tt.exponentformat)&&Tt.exponentformat==="SI extended"&&!ct(xt)?Tt._tickexponent=3*Math.round((xt-1)/3):Tt._tickexponent=xt)}else Tt._tickround=null}q.tickIncrement=function(Tt,ut,Br,Cr){var xr=Br?-1:1;if(x(ut))return e.increment(Tt,xr*ut);var Ir=ut.charAt(0),Ur=xr*Number(ut.slice(1));if(Ir==="M")return e.incrementMonth(Tt,Ur,Cr);if(Ir==="L")return Math.log(Math.pow(10,Tt)+Ur)/Math.LN10;if(Ir==="D"){var Hr=ut==="D2"?Wt:qt,xt=Tt+xr*.01,Xt=e.roundUp(e.mod(xt,1),Hr,Br);return Math.floor(xt)+Math.log(v.round(Math.pow(10,Xt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},q.tickFirst=function(Tt,ut){var Br=Tt.r2l||Number,Cr=e.simpleMap(Tt.range,Br,void 0,void 0,ut),xr=Cr[1]<Cr[0],Ir=xr?Math.floor:Math.ceil,Ur=be(Cr)[0],Hr=Tt.dtick,xt=Br(Tt.tick0);if(x(Hr)){var Xt=Ir((Ur-xt)/Hr)*Hr+xt;return(Tt.type==="category"||Tt.type==="multicategory")&&(Xt=e.constrain(Xt,0,Tt._categories.length-1)),Xt}var vr=Hr.charAt(0),Or=Number(Hr.slice(1));if(vr==="M"){for(var ba=0,Pa=xt,ya,la,Ta;ba<10;){if(ya=q.tickIncrement(Pa,Hr,xr,Tt.calendar),(ya-Ur)*(Pa-Ur)<=0)return xr?Math.min(Pa,ya):Math.max(Pa,ya);la=(Ur-(Pa+ya)/2)/(ya-Pa),Ta=vr+(Math.abs(Math.round(la))||1)*Or,Pa=q.tickIncrement(Pa,Ta,la<0?!xr:xr,Tt.calendar),ba++}return e.error("tickFirst did not converge",Tt),Pa}else{if(vr==="L")return Math.log(Ir((Math.pow(10,Ur)-xt)/Or)*Or+xt)/Math.LN10;if(vr==="D"){var Ai=Hr==="D2"?Wt:qt,ki=e.roundUp(e.mod(Ur,1),Ai,xr);return Math.floor(Ur)+Math.log(v.round(Math.pow(10,ki),1))/Math.LN10}else throw"unrecognized dtick "+String(Hr)}},q.tickText=function(Tt,ut,Br,Cr){var xr=Sr(Tt,ut),Ir=Tt.tickmode==="array",Ur=Br||Ir,Hr=Tt.type,xt=Hr==="category"?Tt.d2l_noadd:Tt.d2l,Xt,vr=function(Ta){var Ai=Tt.l2p(Ta);return Ai>=0&&Ai<=Tt._length?Ta:null};if(Ir&&e.isArrayOrTypedArray(Tt.ticktext)){var Or=e.simpleMap(Tt.range,Tt.r2l),ba=(Math.abs(Or[1]-Or[0])-(Tt._lBreaks||0))/1e4;for(Xt=0;Xt<Tt.ticktext.length&&!(Math.abs(ut-xt(Tt.tickvals[Xt]))<ba);Xt++);if(Xt<Tt.ticktext.length)return xr.text=String(Tt.ticktext[Xt]),xr.xbnd=[vr(xr.x-.5),vr(xr.x+Tt.dtick-.5)],xr}function Pa(Ta){if(Ta===void 0)return!0;if(Br)return Ta==="none";var Ai={first:Tt._tmin,last:Tt._tmax}[Ta];return Ta!=="all"&&ut!==Ai}var ya=Br?"never":Tt.exponentformat!=="none"&&Pa(Tt.showexponent)?"hide":"";if(Hr==="date"?Rr(Tt,xr,Br,Ur):Hr==="log"?wt(Tt,xr,Br,Ur,ya):Hr==="category"?Ne(Tt,xr):Hr==="multicategory"?Ke(Tt,xr,Br):Za(Tt)?Ie(Tt,xr,Br,Ur,ya):Te(Tt,xr,Br,Ur,ya),Cr||(Tt.tickprefix&&!Pa(Tt.showtickprefix)&&(xr.text=Tt.tickprefix+xr.text),Tt.ticksuffix&&!Pa(Tt.showticksuffix)&&(xr.text+=Tt.ticksuffix)),Tt.labelalias&&Tt.labelalias.hasOwnProperty(xr.text)){var la=Tt.labelalias[xr.text];typeof la=="string"&&(xr.text=la)}return(Tt.tickson==="boundaries"||Tt.showdividers)&&(xr.xbnd=[vr(xr.x-.5),vr(xr.x+Tt.dtick-.5)]),xr},q.hoverLabelText=function(Tt,ut,Br){Br&&(Tt=e.extendFlat({},Tt,{hoverformat:Br}));var Cr=e.isArrayOrTypedArray(ut)?ut[0]:ut,xr=e.isArrayOrTypedArray(ut)?ut[1]:void 0;if(xr!==void 0&&xr!==Cr)return q.hoverLabelText(Tt,Cr,Br)+" - "+q.hoverLabelText(Tt,xr,Br);var Ir=Tt.type==="log"&&Cr<=0,Ur=q.tickText(Tt,Tt.c2l(Ir?-Cr:Cr),"hover").text;return Ir?Cr===0?"0":F+Ur:Ur};function Sr(Tt,ut,Br){var Cr=Tt.tickfont||{};return{x:ut,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 Rr(Tt,ut,Br,Cr){var xr=Tt._tickround,Ir=Br&&Tt.hoverformat||q.getTickFormat(Tt);Cr=!Ir&&Cr,Cr&&(x(xr)?xr=4:xr={y:"m",m:"d",d:"M",M:"S",S:4}[xr]);var Ur=e.formatDate(ut.x,Ir,xr,Tt._dateFormat,Tt.calendar,Tt._extraFormat),Hr,xt=Ur.indexOf(`
`);if(xt!==-1&&(Hr=Ur.slice(xt+1),Ur=Ur.slice(0,xt)),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(!Tt._inCalcTicks||Tt._prevDateHead!==Hr)Tt._prevDateHead=Hr,Ur+="<br>"+Hr;else{var Xt=pi(Tt),vr=Tt._trueSide||Tt.side;(!Xt&&vr==="top"||Xt&&vr==="bottom")&&(Ur+="<br> ")}ut.text=Ur}function wt(Tt,ut,Br,Cr,xr){var Ir=Tt.dtick,Ur=ut.x,Hr=Tt.tickformat,xt=typeof Ir=="string"&&Ir.charAt(0);if(xr==="never"&&(xr=""),Cr&&xt!=="L"&&(Ir="L3",xt="L"),Hr||xt==="L")ut.text=Ct(Math.pow(10,Ur),Tt,xr,Cr);else if(x(Ir)||xt==="D"&&(Tt.minorloglabels==="complete"||e.mod(Ur+.01,1)<.1)){var Xt;Tt.minorloglabels==="complete"&&!(e.mod(Ur+.01,1)<.1)&&(Xt=!0,ut.fontSize*=.75);var vr=Math.pow(10,Ur).toExponential(0),Or=vr.split("e"),ba=+Or[1],Pa=Math.abs(ba),ya=Tt.exponentformat;ya==="power"||Pe(ya)&&ya!=="SI extended"&&ft(ba)||Pe(ya)&&ya==="SI extended"&&ct(ba)?(ut.text=Or[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),ba!==0&&ba!==1&&(ut.text+="<sup>"+(ba>0?"":F)+Pa+"</sup>"),ut.fontSize*=1.25):(ya==="e"||ya==="E")&&Pa>2?ut.text=Or[0]+ya+(ba>0?"+":F)+Pa:(ut.text=Ct(Math.pow(10,Ur),Tt,"","fakehover"),Ir==="D1"&&Tt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(xt==="D")ut.text=Tt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Ur,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(Tt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(Tt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(Tt.range[1]>Tt.range[0]?1:-1)*ut.fontSize*(Ur<0?.5:.25)))}}function Ne(Tt,ut){var Br=Tt._categories[Math.round(ut.x)];Br===void 0&&(Br=""),ut.text=String(Br)}function Ke(Tt,ut,Br){var Cr=Math.round(ut.x),xr=Tt._categories[Cr]||[],Ir=xr[1]===void 0?"":String(xr[1]),Ur=xr[0]===void 0?"":String(xr[0]);Br?ut.text=Ur+" - "+Ir:(ut.text=Ir,ut.text2=Ur)}function Te(Tt,ut,Br,Cr,xr){xr==="never"?xr="":Tt.showexponent==="all"&&Math.abs(ut.x/Tt.dtick)<1e-6&&(xr="hide"),ut.text=Ct(ut.x,Tt,xr,Cr)}function Ie(Tt,ut,Br,Cr,xr){if(Tt.thetaunit==="radians"&&!Br){var Ir=ut.x/180;if(Ir===0)ut.text="0";else{var Ur=Ve(Ir);if(Ur[1]>=100)ut.text=Ct(e.deg2rad(ut.x),Tt,xr,Cr);else{var Hr=ut.x<0;Ur[1]===1?Ur[0]===1?ut.text="\u03C0":ut.text=Ur[0]+"\u03C0":ut.text=["<sup>",Ur[0],"</sup>","\u2044","<sub>",Ur[1],"</sub>","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=Ct(ut.x,Tt,xr,Cr)}function Ve(Tt){function ut(Hr,xt){return Math.abs(Hr-xt)<=1e-6}function Br(Hr,xt){return ut(xt,0)?Hr:Br(xt,Hr%xt)}function Cr(Hr){for(var xt=1;!ut(Math.round(Hr*xt)/xt,Hr);)xt*=10;return xt}var xr=Cr(Tt),Ir=Tt*xr,Ur=Math.abs(Br(Ir,xr));return[Math.round(Ir/Ur),Math.round(xr/Ur)]}var Ce=["f","p","n","\u03BC","m","","k","M","G","T"],Ee=["q","r","y","z","a",...Ce,"P","E","Z","Y","R","Q"],Pe=Tt=>["SI","SI extended","B"].includes(Tt);function ft(Tt){return Tt>14||Tt<-15}function ct(Tt){return Tt>32||Tt<-30}function _t(Tt,ut){return Pe(ut)?!!(ut==="SI extended"&&ct(Tt)||ut!=="SI extended"&&ft(Tt)):!1}function Ct(Tt,ut,Br,Cr){var xr=Tt<0,Ir=ut._tickround,Ur=Br||ut.exponentformat||"B",Hr=ut._tickexponent,xt=q.getTickFormat(ut),Xt=ut.separatethousands;if(Cr){var vr={exponentformat:Ur,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:x(Tt)&&Math.abs(Tt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,Tt||1]};qr(vr),Ir=(Number(vr._tickround)||0)+4,Hr=vr._tickexponent,ut.hoverformat&&(xt=ut.hoverformat)}if(xt)return ut._numFormat(xt)(Tt).replace(/-/g,F);var Or=Math.pow(10,-Ir)/2;if(Ur==="none"&&(Hr=0),Tt=Math.abs(Tt),Tt<Or)Tt="0",xr=!1;else{if(Tt+=Or,Hr&&(Tt*=Math.pow(10,-Hr),Ir+=Hr),Ir===0)Tt=String(Math.floor(Tt));else if(Ir<0){Tt=String(Math.round(Tt)),Tt=Tt.slice(0,Math.max(0,Tt.length+Ir));for(var ba=Ir;ba<0;ba++)Tt+="0"}else{Tt=String(Tt);var Pa=Tt.indexOf(".")+1;Pa&&(Tt=Tt.slice(0,Pa+Ir).replace(/\.?0+$/,""))}Tt=e.numSeparate(Tt,ut._separators,Xt)}if(Hr&&Ur!=="hide"){_t(Hr,Ur)&&(Ur="power");var ya;Hr<0?ya=F+-Hr:Ur!=="power"?ya="+"+Hr:ya=String(Hr),Ur==="e"||Ur==="E"?Tt+=Ur+ya:Ur==="power"?Tt+="\xD710<sup>"+ya+"</sup>":Ur==="B"&&Hr===9?Tt+="B":Pe(Ur)&&(Tt+=Ur==="SI extended"?Ee[Hr/3+10]:Ce[Hr/3+5])}return xr?F+Tt:Tt}q.getTickFormat=function(Tt){var ut;function Br(xt){return typeof xt!="string"?xt:Number(xt.replace("M",""))*M}function Cr(xt,Xt){var vr=["L","D"];if(typeof xt==typeof Xt){if(typeof xt=="number")return xt-Xt;var Or=vr.indexOf(xt.charAt(0)),ba=vr.indexOf(Xt.charAt(0));return Or===ba?Number(xt.replace(/(L|D)/g,""))-Number(Xt.replace(/(L|D)/g,"")):Or-ba}else return typeof xt=="number"?1:-1}function xr(xt,Xt,vr){var Or=vr||function(ya){return ya},ba=Xt[0],Pa=Xt[1];return(!ba&&typeof ba!="number"||Or(ba)<=Or(xt))&&(!Pa&&typeof Pa!="number"||Or(Pa)>=Or(xt))}function Ir(xt,Xt){var vr=Xt[0]===null,Or=Xt[1]===null,ba=Cr(xt,Xt[0])>=0,Pa=Cr(xt,Xt[1])<=0;return(vr||ba)&&(Or||Pa)}var Ur,Hr;if(Tt.tickformatstops&&Tt.tickformatstops.length>0)switch(Tt.type){case"date":case"linear":{for(ut=0;ut<Tt.tickformatstops.length;ut++)if(Hr=Tt.tickformatstops[ut],Hr.enabled&&xr(Tt.dtick,Hr.dtickrange,Br)){Ur=Hr;break}break}case"log":{for(ut=0;ut<Tt.tickformatstops.length;ut++)if(Hr=Tt.tickformatstops[ut],Hr.enabled&&Ir(Tt.dtick,Hr.dtickrange)){Ur=Hr;break}break}default:}return Ur?Ur.value:Tt.tickformat},q.getSubplots=function(Tt,ut){var Br=Tt._fullLayout._subplots,Cr=Br.cartesian.concat(Br.gl2d||[]),xr=ut?q.findSubplotsWithAxis(Cr,ut):Cr;return xr.sort(function(Ir,Ur){var Hr=Ir.slice(1).split("y"),xt=Ur.slice(1).split("y");return Hr[0]===xt[0]?+Hr[1]-+xt[1]:+Hr[0]-+xt[0]}),xr},q.findSubplotsWithAxis=function(Tt,ut){for(var Br=new RegExp(ut._id.charAt(0)==="x"?"^"+ut._id+"y":ut._id+"$"),Cr=[],xr=0;xr<Tt.length;xr++){var Ir=Tt[xr];Br.test(Ir)&&Cr.push(Ir)}return Cr},q.makeClipPaths=function(Tt){var ut=Tt._fullLayout;if(!ut._hasOnlyLargeSploms){var Br={_offset:0,_length:ut.width,_id:""},Cr={_offset:0,_length:ut.height,_id:""},xr=q.list(Tt,"x",!0),Ir=q.list(Tt,"y",!0),Ur=[],Hr,xt;for(Hr=0;Hr<xr.length;Hr++)for(Ur.push({x:xr[Hr],y:Cr}),xt=0;xt<Ir.length;xt++)Hr===0&&Ur.push({x:Br,y:Ir[xt]}),Ur.push({x:xr[Hr],y:Ir[xt]});var Xt=ut._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"+ut._uid+vr.x._id+vr.y._id}).append("rect"),Xt.exit().remove(),Xt.each(function(vr){v.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(Tt,ut,Br){var Cr=Tt._fullLayout;ut==="redraw"&&Cr._paper.selectAll("g.subplot").each(function(xt){var Xt=xt[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=!ut||ut==="redraw"?q.listIds(Tt):ut,Ir=q.list(Tt),Ur=Ir.filter(function(xt){return xt.autoshift}).map(function(xt){return xt.overlaying});xr.map(function(xt){var Xt=q.getFromId(Tt,xt);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(xt){return function(){if(xt){var Xt=q.getFromId(Tt,xt);Br||(Br={}),Br.axShifts=Hr,Br.overlayingShiftedAx=Ur;var vr=q.drawOne(Tt,Xt,Br);return Xt._shiftPusher&&tn(Xt,Xt._fullDepth||0,Hr,!0),Xt._r=Xt.range.slice(),Xt._rl=e.simpleMap(Xt._r,Xt.r2l),vr}}}))},q.drawOne=function(Tt,ut,Br){Br=Br||{};var Cr=Br.axShifts||{},xr=Br.overlayingShiftedAx||[],Ir,Ur,Hr;ut.setScale();var xt=Tt._fullLayout,Xt=ut._id,vr=Xt.charAt(0),Or=q.counterLetter(Xt),ba=xt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!ba)return;if(ut._shiftPusher=ut.autoshift||xr.indexOf(ut._id)!==-1||xr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ya=ut.linewidth/2||0;ut.ticks==="inside"&&(ya+=ut.ticklen),tn(ut,ya,Cr,!0),tn(ut,ut.shift||0,Cr,!1)}(Br.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=on(ut,Cr));var la=ba[vr+"axislayer"],Ta=ut._mainLinePosition,Ai=Ta+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=q.calcTicks(ut),_n=[ut.mirror,Ai,ki].join("_");for(Ir=0;Ir<Ki.length;Ir++)Ki[Ir].axInfo=_n;ut._selections={},ut._tickAngles&&(ut._prevTickAngles=ut._tickAngles),ut._tickAngles={},ut._depth=null;var Rn={};function En(co){var Vs=Xt+(co||"tick");return Rn[Vs]||(Rn[Vs]=fa(ut,Vs,Ai)),Rn[Vs]}if(ut.visible){var On=q.makeTransTickFn(ut),no=q.makeTransTickLabelFn(ut),cn,lo,Wo=ut.ticks==="inside",hs=ut.ticks==="outside";if(ut.tickson==="boundaries"){var Oo=rr(ut,Ki);lo=q.clipEnds(ut,Oo),cn=Wo?lo:Oo}else lo=q.clipEnds(ut,Ki),cn=Wo&&ut.ticklabelmode!=="period"?lo:Ki;var Wn=ut._gridVals=lo,No=Lr(ut,Ki);if(!xt._hasOnlyLargeSploms){var as=ut._subplotsWith,Ns={};for(Ir=0;Ir<as.length;Ir++){Ur=as[Ir],Hr=xt._plots[Ur];var ss=Hr[Or+"axis"],uo=ss._mainAxis._id;if(!Ns[uo]){Ns[uo]=1;var jn=vr==="x"?"M0,"+ss._offset+"v"+ss._length:"M"+ss._offset+",0h"+ss._length;q.drawGrid(Tt,ut,{vals:Wn,counterAxis:ss,layer:Hr.gridlayer.select("."+Xt),minorLayer:Hr.minorGridlayer.select("."+Xt),path:jn,transFn:On}),q.drawZeroLine(Tt,ut,{counterAxis:ss,layer:Pa?Hr.zerolinelayerAbove:Hr.zerolinelayer,path:jn,transFn:On})}}}var Xn,ls=q.getTickSigns(ut),Cs=q.getTickSigns(ut,"minor");if(ut.ticks||ut.minor&&ut.minor.ticks){var Ks=q.makeTickPath(ut,Ai,ls[2]),Xo=q.makeTickPath(ut,Ai,Cs[2],{minor:!0}),Gi,Ln,Us,_s;if(ut._anchorAxis&&ut.mirror&&ut.mirror!==!0?(Gi=q.makeTickPath(ut,ki,ls[3]),Ln=q.makeTickPath(ut,ki,Cs[3],{minor:!0}),Us=Ks+Gi,_s=Xo+Ln):(Gi="",Ln="",Us=Ks,_s=Xo),ut.showdividers&&hs&&ut.tickson==="boundaries"){var Gn={};for(Ir=0;Ir<No.length;Ir++)Gn[No[Ir].x]=1;Xn=function(co){return Gn[co.x]?Gi:Us}}else Xn=function(co){return co.minor?_s:Us}}if(q.drawTicks(Tt,ut,{vals:cn,layer:la,path:Xn,transFn:On}),ut.mirror==="allticks"){var zs=Object.keys(ut._linepositions||{});for(Ir=0;Ir<zs.length;Ir++){Ur=zs[Ir],Hr=xt._plots[Ur];var vs=ut._linepositions[Ur]||[],Ws=vs[0],il=vs[1],xn=vs[2],ko=q.makeTickPath(ut,Ws,xn?ls[0]:Cs[0],{minor:xn})+q.makeTickPath(ut,il,xn?ls[1]:Cs[1],{minor:xn});q.drawTicks(Tt,ut,{vals:cn,layer:Hr[vr+"axislayer"],path:ko,transFn:On})}}var bo=[];if(bo.push(function(){return q.drawLabels(Tt,ut,{vals:Ki,layer:la,plotinfo:Hr,transFn:no,labelFns:q.makeLabelFns(ut,Ai)})}),ut.type==="multicategory"){var Is={x:2,y:10}[vr];bo.push(function(){var co={x:"height",y:"width"}[vr],Vs=En()[co]+Is+(ut._tickAngles[Xt+"tick"]?ut.tickfont.size*V:0);return q.drawLabels(Tt,ut,{vals:er(ut,Ki),layer:la,cls:Xt+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:On,labelFns:q.makeLabelFns(ut,Ai+Vs*ls[4])})}),bo.push(function(){return ut._depth=ls[4]*(En("tick2")[ut.side]-Ai),Wa(Tt,ut,{vals:No,layer:la,path:q.makeTickPath(ut,Ai,ls[4],{len:ut._depth}),transFn:On})})}else ut.title.hasOwnProperty("standoff")&&bo.push(function(){ut._depth=ls[4]*(En()[ut.side]-Ai)});var pu=E.getComponentMethod("rangeslider","isVisible")(ut);return!Br.skipTitle&&!(pu&&ut.side==="bottom")&&bo.push(function(){return hi(Tt,ut)}),bo.push(function(){var co=ut.side.charAt(0),Vs=Y[ut.side].charAt(0),vl=q.getPxPosition(Tt,ut),Ts=hs?ut.ticklen:0,js,us,As,Nl;(ut.automargin||pu||ut._shiftPusher)&&(ut.type==="multicategory"?js=En("tick2"):(js=En(),vr==="x"&&co==="b"&&(ut._depth=Math.max(js.width>0?js.bottom-vl:0,Ts))));var su=0,Tc=0;if(ut._shiftPusher&&(su=Math.max(Ts,js.height>0?co==="l"?vl-js.left:js.right-vl:0),ut.title.text!==xt._dfltTitle[vr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),co==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(su,Tc)),ut.automargin){us={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof ut._shift=="number"?ut._shift:0;if(vr==="x"){if(co==="b"?us[co]=ut._depth:(us[co]=ut._depth=Math.max(js.width>0?vl-js.top:0,Ts),du.reverse()),js.width>0){var Uc=js.right-(ut._offset+ut._length);Uc>0&&(us.xr=1,us.r=Uc);var Fs=ut._offset-js.left;Fs>0&&(us.xl=0,us.l=Fs)}}else if(co==="l"?(ut._depth=Math.max(js.height>0?vl-js.left:0,Ts),us[co]=ut._depth-Sf):(ut._depth=Math.max(js.height>0?js.right-vl:0,Ts),us[co]=ut._depth+Sf,du.reverse()),js.height>0){var dc=js.bottom-(ut._offset+ut._length);dc>0&&(us.yb=0,us.b=dc);var Hc=ut._offset-js.top;Hc>0&&(us.yt=1,us.t=Hc)}us[Or]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==xt._dfltTitle[vr]&&(us[co]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(As={x:0,y:0,r:0,l:0,t:0,b:0},As[Vs]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(As[Vs]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?As[Or]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(As[Or]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}pu&&(Nl=E.getComponentMethod("rangeslider","autoMarginOpts")(Tt,ut)),typeof ut.automargin=="string"&&(ir(us,ut.automargin),ir(As,ut.automargin)),S.autoMargin(Tt,Jt(ut),us),S.autoMargin(Tt,Fr(ut),As),S.autoMargin(Tt,ta(ut),Nl)}),e.syncOrAsync(bo)}};function ir(Tt,ut){if(Tt){var Br=Object.keys($).reduce(function(Cr,xr){return ut.indexOf(xr)!==-1&&$[xr].forEach(function(Ir){Cr[Ir]=1}),Cr},{});Object.keys(Tt).forEach(function(Cr){Br[Cr]||(Cr.length===1?Tt[Cr]=0:delete Tt[Cr])})}}function rr(Tt,ut){var Br=[],Cr,xr=function(Ir,Ur){var Hr=Ir.xbnd[Ur];Hr!==null&&Br.push(e.extendFlat({},Ir,{x:Hr}))};if(ut.length){for(Cr=0;Cr<ut.length;Cr++)xr(ut[Cr],0);xr(ut[Cr-1],1)}return Br}function er(Tt,ut){for(var Br=[],Cr={},xr=0;xr<ut.length;xr++){var Ir=ut[xr];Cr[Ir.text2]?Cr[Ir.text2].push(Ir.x):Cr[Ir.text2]=[Ir.x]}for(var Ur in Cr)Br.push(Sr(Tt,e.interp(Cr[Ur],.5),Ur));return Br}function Lr(Tt,ut){var Br=[],Cr,xr,Ir=ut.length&&ut[ut.length-1].x<ut[0].x,Ur=function(xt,Xt){var vr=xt.xbnd[Xt];vr!==null&&Br.push(e.extendFlat({},xt,{x:vr}))};if(Tt.showdividers&&ut.length){for(Cr=0;Cr<ut.length;Cr++){var Hr=ut[Cr];Hr.text2!==xr&&Ur(Hr,Ir?1:0),xr=Hr.text2}Ur(ut[Cr-1],Ir?0:1)}return Br}function fa(Tt,ut,Br){var Cr,xr,Ir,Ur;if(Tt._selections[ut].size())Cr=1/0,xr=-1/0,Ir=1/0,Ur=-1/0,Tt._selections[ut].each(function(){var xt=Yt(this);if(xt.node().style.display!=="none"){var Xt=n.bBox(xt.node().parentNode);Cr=Math.min(Cr,Xt.top),xr=Math.max(xr,Xt.bottom),Ir=Math.min(Ir,Xt.left),Ur=Math.max(Ur,Xt.right)}});else{var Hr=q.makeLabelFns(Tt,Br);Cr=xr=Hr.yFn({dx:0,dy:0,fontSize:0}),Ir=Ur=Hr.xFn({dx:0,dy:0,fontSize:0})}return{top:Cr,bottom:xr,left:Ir,right:Ur,height:xr-Cr,width:Ur-Ir}}q.getTickSigns=function(Tt,ut){var Br=Tt._id.charAt(0),Cr={x:"top",y:"right"}[Br],xr=Tt.side===Cr?1:-1,Ir=[-1,1,xr,-xr],Ur=ut?(Tt.minor||{}).ticks:Tt.ticks;return Ur!=="inside"==(Br==="x")&&(Ir=Ir.map(function(Hr){return-Hr})),Tt.side&&Ir.push({l:-1,t:-1,r:1,b:1}[Tt.side.charAt(0)]),Ir},q.makeTransTickFn=function(Tt){return Tt._id.charAt(0)==="x"?function(ut){return t(Tt._offset+Tt.l2p(ut.x),0)}:function(ut){return t(0,Tt._offset+Tt.l2p(ut.x))}},q.makeTransTickLabelFn=function(Tt){var ut=Ia(Tt),Br=Tt.ticklabelshift||0,Cr=Tt.ticklabelstandoff||0,xr=ut[0],Ir=ut[1],Ur=Tt.range[0]>Tt.range[1],Hr=Tt.ticklabelposition&&Tt.ticklabelposition.indexOf("inside")!==-1,xt=!Hr;if(Br){var Xt=Ur?-1:1;Br=Br*Xt}if(Cr){var vr=Tt.side,Or=Hr&&(vr==="top"||vr==="left")||xt&&(vr==="bottom"||vr==="right")?1:-1;Cr=Cr*Or}return Tt._id.charAt(0)==="x"?function(ba){return t(xr+Tt._offset+Tt.l2p(Da(ba))+Br,Ir+Cr)}:function(ba){return t(Ir+Cr,xr+Tt._offset+Tt.l2p(Da(ba))+Br)}};function Da(Tt){return Tt.periodX!==void 0?Tt.periodX:Tt.x}function Ia(Tt){var ut=Tt.ticklabelposition||"",Br=Tt.tickson||"",Cr=function(ya){return ut.indexOf(ya)!==-1},xr=Cr("top"),Ir=Cr("left"),Ur=Cr("right"),Hr=Cr("bottom"),xt=Cr("inside"),Xt=Br!=="boundaries"&&(Hr||Ir||xr||Ur);if(!Xt&&!xt)return[0,0];var vr=Tt.side,Or=Xt?(Tt.tickwidth||0)/2:0,ba=ee,Pa=Tt.tickfont?Tt.tickfont.size:12;return(Hr||xr)&&(Or+=Pa*fe,ba+=(Tt.linewidth||0)/2),(Ir||Ur)&&(Or+=(Tt.linewidth||0)/2,ba+=ee),xt&&vr==="top"&&(ba-=Pa*(1-fe)),(Ir||xr)&&(Or=-Or),(vr==="bottom"||vr==="right")&&(ba=-ba),[Xt?Or:0,xt?ba:0]}q.makeTickPath=function(Tt,ut,Br,Cr){Cr||(Cr={});var xr=Cr.minor;if(xr&&!Tt.minor)return"";var Ir=Cr.len!==void 0?Cr.len:xr?Tt.minor.ticklen:Tt.ticklen,Ur=Tt._id.charAt(0),Hr=(Tt.linewidth||1)/2;return Ur==="x"?"M0,"+(ut+Hr*Br)+"v"+Ir*Br:"M"+(ut+Hr*Br)+",0h"+Ir*Br},q.makeLabelFns=function(Tt,ut,Br){var Cr=Tt.ticklabelposition||"",xr=Tt.tickson||"",Ir=function(Oo){return Cr.indexOf(Oo)!==-1},Ur=Ir("top"),Hr=Ir("left"),xt=Ir("right"),Xt=Ir("bottom"),vr=xr!=="boundaries"&&(Xt||Hr||Ur||xt),Or=Ir("inside"),ba=Cr==="inside"&&Tt.ticks==="inside"||!Or&&Tt.ticks==="outside"&&xr!=="boundaries",Pa=0,ya=0,la=ba?Tt.ticklen:0;if(Or?la*=-1:vr&&(la=0),ba&&(Pa+=la,Br)){var Ta=e.deg2rad(Br);Pa=la*Math.cos(Ta)+1,ya=la*Math.sin(Ta)}Tt.showticklabels&&(ba||Tt.showline)&&(Pa+=.2*Tt.tickfont.size),Pa+=(Tt.linewidth||1)/2*(Or?-1:1);var Ai={labelStandoff:Pa,labelShift:ya},ki,Ki,_n,Rn,En=0,On=Tt.side,no=Tt._id.charAt(0),cn=Tt.tickangle,lo;if(no==="x")lo=!Or&&On==="bottom"||Or&&On==="top",Rn=lo?1:-1,Or&&(Rn*=-1),ki=ya*Rn,Ki=ut+Pa*Rn,_n=lo?1:-.2,Math.abs(cn)===90&&(Or?_n+=le:cn===-90&&On==="bottom"?_n=fe:cn===90&&On==="top"?_n=le:_n=.5,En=le/2*(cn/90)),Ai.xFn=function(Oo){return Oo.dx+ki+En*Oo.fontSize},Ai.yFn=function(Oo){return Oo.dy+Ki+Oo.fontSize*_n},Ai.anchorFn=function(Oo,Wn){if(vr){if(Hr)return"end";if(xt)return"start"}return!x(Wn)||Wn===0||Wn===180?"middle":Wn*Rn<0!==Or?"end":"start"},Ai.heightFn=function(Oo,Wn,No){return Wn<-60||Wn>60?-.5*No:Tt.side==="top"!==Or?-No:0};else if(no==="y"){if(lo=!Or&&On==="left"||Or&&On==="right",Rn=lo?1:-1,Or&&(Rn*=-1),ki=Pa,Ki=ya*Rn,_n=0,!Or&&Math.abs(cn)===90&&(cn===-90&&On==="left"||cn===90&&On==="right"?_n=fe:_n=.5),Or){var Wo=x(cn)?+cn:0;if(Wo!==0){var hs=e.deg2rad(Wo);En=Math.abs(Math.sin(hs))*fe*Rn,_n=0}}Ai.xFn=function(Oo){return Oo.dx+ut-(ki+Oo.fontSize*_n)*Rn+En*Oo.fontSize},Ai.yFn=function(Oo){return Oo.dy+Ki+Oo.fontSize*le},Ai.anchorFn=function(Oo,Wn){return x(Wn)&&Math.abs(Wn)===90?"middle":lo?"end":"start"},Ai.heightFn=function(Oo,Wn,No){return Tt.side==="right"&&(Wn*=-1),Wn<-30?-No:Wn<30?-.5*No:0}}return Ai};function qa(Tt){return[Tt.text,Tt.x,Tt.axInfo,Tt.font,Tt.fontSize,Tt.fontColor].join("_")}q.drawTicks=function(Tt,ut,Br){Br=Br||{};var Cr=ut._id+"tick",xr=[].concat(ut.minor&&ut.minor.ticks?Br.vals.filter(function(Ur){return Ur.minor&&!Ur.noTick}):[]).concat(ut.ticks?Br.vals.filter(function(Ur){return!Ur.minor&&!Ur.noTick}):[]),Ir=Br.layer.selectAll("path."+Cr).data(xr,qa);Ir.exit().remove(),Ir.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Br.crisp!==!1).each(function(Ur){return a.stroke(v.select(this),Ur.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Ur){return n.crispRound(Tt,Ur.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Br.path).style("display",null),Ra(ut,[B]),Ir.attr("transform",Br.transFn)},q.drawGrid=function(Tt,ut,Br){if(Br=Br||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",xr=ut.minor&&ut.minor.showgrid,Ir=xr?Br.vals.filter(function(Ai){return Ai.minor}):[],Ur=ut.showgrid?Br.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Br.counterAxis;if(Hr&&q.shouldShowZeroLine(Tt,ut,Hr))for(var xt=ut.tickmode==="array",Xt=0;Xt<Ur.length;Xt++){var vr=Ur[Xt].x;if(xt?!vr:Math.abs(vr)<ut.dtick/100)if(Ur=Ur.slice(0,Xt).concat(Ur.slice(Xt+1)),xt)Xt--;else break}ut._gw=n.crispRound(Tt,ut.gridwidth,1);for(var Or=xr?n.crispRound(Tt,ut.minor.gridwidth,1):0,ba=Br.layer,Pa=Br.minorLayer,ya=1;ya>=0;ya--){var la=ya?ba:Pa;if(la){var Ta=la.selectAll("path."+Cr).data(ya?Ur:Ir,qa);Ta.exit().remove(),Ta.enter().append("path").classed(Cr,1).classed("crisp",Br.crisp!==!1),Ta.attr("transform",Br.transFn).attr("d",Br.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return n.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Or:ut._gw)+"px"}).style("display",null),typeof Br.path=="function"&&Ta.attr("d",Br.path)}}Ra(ut,[P,U])}},q.drawZeroLine=function(Tt,ut,Br){Br=Br||Br;var Cr=ut._id+"zl",xr=q.shouldShowZeroLine(Tt,ut,Br.counterAxis),Ir=Br.layer.selectAll("path."+Cr).data(xr?[{x:0,id:ut._id}]:[]);Ir.exit().remove(),Ir.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)})}),Ir.attr("transform",Br.transFn).attr("d",Br.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",n.crispRound(Tt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ra(ut,[O])},q.drawLabels=function(Tt,ut,Br){Br=Br||{};var Cr=Tt._fullLayout,xr=ut._id,Ir=ut.zerolinelayer==="above traces",Ur=Br.cls||xr+"tick",Hr=Br.vals.filter(function(uo){return uo.text}),xt=Br.labelFns,Xt=Br.secondary?0:ut.tickangle,vr=(ut._prevTickAngles||{})[Ur],Or=Br.layer.selectAll("g."+Ur).data(ut.showticklabels?Hr:[],qa),ba=[];Or.enter().append("g").classed(Ur,1).append("text").attr("text-anchor","middle").each(function(uo){var jn=v.select(this),Xn=Tt._promises.length;jn.call(r.positionText,xt.xFn(uo),xt.yFn(uo)).call(n.font,{family:uo.font,size:uo.fontSize,color:uo.fontColor,weight:uo.fontWeight,style:uo.fontStyle,variant:uo.fontVariant,textcase:uo.fontTextcase,lineposition:uo.fontLineposition,shadow:uo.fontShadow}).text(uo.text).call(r.convertToTspans,Tt),Tt._promises[Xn]?ba.push(Tt._promises.pop().then(function(){Pa(jn,Xt)})):Pa(jn,Xt)}),Ra(ut,[X]),Or.exit().remove(),Br.repositionOnUpdate&&Or.each(function(uo){v.select(this).select("text").call(r.positionText,xt.xFn(uo),xt.yFn(uo))});function Pa(uo,jn){uo.each(function(Xn){var ls=v.select(this),Cs=ls.select(".text-math-group"),Ks=xt.anchorFn(Xn,jn),Xo=Br.transFn.call(ls.node(),Xn)+(x(jn)&&+jn!=0?" rotate("+jn+","+xt.xFn(Xn)+","+(xt.yFn(Xn)-Xn.fontSize/2)+")":""),Gi=r.lineCount(ls),Ln=V*Xn.fontSize,Us=xt.heightFn(Xn,x(jn)?+jn:0,(Gi-1)*Ln);if(Us&&(Xo+=t(0,Us)),Cs.empty()){var _s=ls.select("text");_s.attr({transform:Xo,"text-anchor":Ks}),_s.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var Gn=n.bBox(Cs.node()).width,zs=Gn*{end:-.5,start:.5}[Ks];Cs.attr("transform",Xo+t(zs,0))}})}ut._adjustTickLabelsOverflow=function(){var uo=ut.ticklabeloverflow;if(!(!uo||uo==="allow")){var jn=uo.indexOf("hide")!==-1,Xn=ut._id.charAt(0)==="x",ls=0,Cs=Xn?Tt._fullLayout.width:Tt._fullLayout.height;if(uo.indexOf("domain")!==-1){var Ks=e.simpleMap(ut.range,ut.r2l);ls=ut.l2p(Ks[0])+ut._offset,Cs=ut.l2p(Ks[1])+ut._offset}var Xo=Math.min(ls,Cs),Gi=Math.max(ls,Cs),Ln=ut.side,Us=1/0,_s=-1/0;Or.each(function(Ws){var il=v.select(this),xn=il.select(".text-math-group");if(xn.empty()){var ko=n.bBox(il.node()),bo=0;Xn?(ko.right>Gi||ko.left<Xo)&&(bo=1):(ko.bottom>Gi||ko.top+(ut.tickangle?0:Ws.fontSize/4)<Xo)&&(bo=1);var Is=il.select("text");bo?jn&&Is.style("display","none"):Is.node().style.display!=="none"&&(Is.style("display",null),Ln==="bottom"||Ln==="right"?Us=Math.min(Us,Xn?ko.top:ko.left):Us=-1/0,Ln==="top"||Ln==="left"?_s=Math.max(_s,Xn?ko.bottom:ko.right):_s=1/0)}});for(var Gn in Cr._plots){var zs=Cr._plots[Gn];if(!(ut._id!==zs.xaxis._id&&ut._id!==zs.yaxis._id)){var vs=Xn?zs.yaxis:zs.xaxis;vs&&(vs["_visibleLabelMin_"+ut._id]=Us,vs["_visibleLabelMax_"+ut._id]=_s)}}}},ut._hideCounterAxisInsideTickLabels=function(uo){var jn=ut._id.charAt(0)==="x",Xn=[];for(var ls in Cr._plots){var Cs=Cr._plots[ls];ut._id!==Cs.xaxis._id&&ut._id!==Cs.yaxis._id||Xn.push(jn?Cs.yaxis:Cs.xaxis)}Xn.forEach(function(Ks,Xo){Ks&&pi(Ks)&&(uo||[O,U,P,B,X]).forEach(function(Gi){var Ln=Gi.K==="tick"&&Gi.L==="text"&&ut.ticklabelmode==="period",Us=Cr._plots[ut._mainSubplot],_s;if(Gi.K===O.K){var Gn=Ir?Us.zerolinelayerAbove:Us.zerolinelayer;_s=Gn.selectAll("."+ut._id+"zl")}else Gi.K===U.K?_s=Us.minorGridlayer.selectAll("."+ut._id):Gi.K===P.K?_s=Us.gridlayer.selectAll("."+ut._id):_s=Us[ut._id.charAt(0)+"axislayer"];_s.each(function(){var zs=v.select(this);Gi.L&&(zs=zs.selectAll(Gi.L)),zs.each(function(vs){var Ws=ut.l2p(Ln?Da(vs):vs.x)+ut._offset,il=v.select(this);Ws<ut["_visibleLabelMax_"+Ks._id]&&Ws>ut["_visibleLabelMin_"+Ks._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 ya(){return ba.length&&Promise.all(ba)}var la=null;function Ta(){if(Pa(Or,Xt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var uo=0,jn=[],Xn,ls=1;Or.each(function(us){uo=Math.max(uo,us.fontSize);var As=ut.l2p(us.x),Nl=Yt(this),su=n.bBox(Nl.node());ls=Math.max(ls,r.lineCount(Nl)),jn.push({top:0,bottom:10,height:10,left:As-su.width/2,right:As+su.width/2+2,width:su.width+2})});var Cs=(ut.tickson==="boundaries"||ut.showdividers)&&!Br.secondary,Ks=Hr.length,Xo=Math.abs((Hr[Ks-1].x-Hr[0].x)*ut._m)/(Ks-1),Gi=Cs?Xo/2:Xo,Ln=Cs?ut.ticklen:uo*1.25*ls,Us=Math.sqrt(Math.pow(Gi,2)+Math.pow(Ln,2)),_s=Gi/Us,Gn=ut.autotickangles.map(function(us){return us*Math.PI/180}),zs=Gn.find(function(us){return Math.abs(Math.cos(us))<=_s});zs===void 0&&(zs=Gn.reduce(function(us,As){return Math.abs(Math.cos(us))<Math.abs(Math.cos(As))?us:As},Gn[0]));var vs=zs*(180/Math.PI);if(Cs){var Ws=2;for(ut.ticks&&(Ws+=ut.tickwidth/2),Xn=0;Xn<jn.length;Xn++){var il=Hr[Xn].xbnd,xn=jn[Xn];if(il[0]!==null&&xn.left-ut.l2p(il[0])<Ws||il[1]!==null&&ut.l2p(il[1])-xn.right<Ws){la=vs;break}}}else{var ko=ut.ticklabelposition||"",bo=ut.tickson||"",Is=function(us){return ko.indexOf(us)!==-1},pu=Is("top"),co=Is("left"),Vs=Is("right"),vl=Is("bottom"),Ts=bo!=="boundaries"&&(vl||co||pu||Vs),js=Ts?(ut.tickwidth||0)+2*ee:0;for(Xn=0;Xn<jn.length-1;Xn++)if(e.bBoxIntersect(jn[Xn],jn[Xn+1],js)){la=vs;break}}la&&Pa(Or,la)}}ut._selections&&(ut._selections[Ur]=Or);var Ai=[ya];ut.automargin&&Cr._redrawFromAutoMarginCount&&vr===90?(la=vr,Ai.push(function(){Pa(Or,vr)})):Ai.push(Ta),ut._tickAngles&&Ai.push(function(){ut._tickAngles[Ur]=la===null?x(Xt)?Xt:0:la});var ki=function(){var uo=0,jn=0;return Or.each(function(Xn,ls){var Cs=Yt(this),Ks=Cs.select(".text-math-group");if(Ks.empty()){var Xo;ut._vals[ls]&&(Xo=ut._vals[ls].bb||n.bBox(Cs.node()),ut._vals[ls].bb=Xo),uo=Math.max(uo,Xo.width),jn=Math.max(jn,Xo.height)}}),{labelsMaxW:uo,labelsMaxH:jn}},Ki=ut._anchorAxis;if(Ki&&(Ki.autorange||Ki.insiderange)&&pi(ut)&&!Q(Cr,ut._id)&&(Cr._insideTickLabelsUpdaterange||(Cr._insideTickLabelsUpdaterange={}),Ki.autorange&&(Cr._insideTickLabelsUpdaterange[Ki._name+".autorange"]=Ki.autorange,Ai.push(ki)),Ki.insiderange)){var _n=ki(),Rn=ut._id.charAt(0)==="y"?_n.labelsMaxW:_n.labelsMaxH;Rn+=2*ee,ut.ticklabelposition==="inside"&&(Rn+=ut.ticklen||0);var En=ut.side==="right"||ut.side==="top"?1:-1,On=En===1?1:0,no=En===1?0:1,cn=[];cn[no]=Ki.range[no];var lo=Ki.range,Wo=Ki.r2p(lo[On]),hs=Ki.r2p(lo[no]),Oo=Cr._insideTickLabelsUpdaterange[Ki._name+".range"];if(Oo){var Wn=Ki.r2p(Oo[On]),No=Ki.r2p(Oo[no]),as=En*(ut._id.charAt(0)==="y"?1:-1);as*Wo<as*Wn&&(Wo=Wn,cn[On]=lo[On]=Oo[On]),as*hs>as*No&&(hs=No,cn[no]=lo[no]=Oo[no])}var Ns=Math.abs(hs-Wo);Ns-Rn>0?(Ns-=Rn,Rn*=1+Rn/Ns):Rn=0,ut._id.charAt(0)!=="y"&&(Rn=-Rn),cn[On]=Ki.p2r(Ki.r2p(lo[On])+En*Rn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(cn[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(cn[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=cn}var ss=e.syncOrAsync(Ai);return ss&&ss.then&&Tt._promises.push(ss),ss};function Wa(Tt,ut,Br){var Cr=ut._id+"divider",xr=Br.vals,Ir=Br.layer.selectAll("path."+Cr).data(xr,qa);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",n.crispRound(Tt,ut.dividerwidth,1)+"px"),Ir.attr("transform",Br.transFn).attr("d",Br.path)}q.getPxPosition=function(Tt,ut){var Br=Tt._fullLayout._size,Cr=ut._id.charAt(0),xr=ut.side,Ir;if(ut.anchor!=="free"?Ir=ut._anchorAxis:Cr==="x"?Ir={_offset:Br.t+(1-(ut.position||0))*Br.h,_length:0}:Cr==="y"&&(Ir={_offset:Br.l+(ut.position||0)*Br.w+ut._shift,_length:0}),xr==="top"||xr==="left")return Ir._offset;if(xr==="bottom"||xr==="right")return Ir._offset+Ir._length};function Ca(Tt){var ut=Tt.title.font.size,Br=(Tt.title.text.match(r.BR_TAG_ALL)||[]).length;return Tt.title.hasOwnProperty("standoff")?ut*(fe+Br*V):Br?ut*(Br+1)*V:ut}function hi(Tt,ut){var Br=Tt._fullLayout,Cr=ut._id,xr=Cr.charAt(0),Ir=ut.title.font.size,Ur,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Ur=ut._depth+ut.title.standoff+Ir*fe:(ut.side==="top"||ut.side==="left")&&(Ur=ut._depth+ut.title.standoff+Ir*(le+Hr*V));else{var xt=pi(ut);if(ut.type==="multicategory")Ur=ut._depth;else{var Xt=1.5*Ir;xt&&(Xt=.5*Ir,ut.ticks==="outside"&&(Xt+=ut.ticklen)),Ur=10+Xt+(ut.linewidth?ut.linewidth-1:0)}xt||(xr==="x"?Ur+=ut.side==="top"?Ir*(ut.showticklabels?1:0):Ir*(ut.showticklabels?1.5:.5):Ur+=ut.side==="right"?Ir*(ut.showticklabels?1:.5):Ir*(ut.showticklabels?.5:0))}var vr=q.getPxPosition(Tt,ut),Or,ba,Pa;xr==="x"?(ba=ut._offset+ut._length/2,Pa=ut.side==="top"?vr-Ur:vr+Ur):(Pa=ut._offset+ut._length/2,ba=ut.side==="right"?vr+Ur:vr-Ur,Or={rotate:"-90",offset:0});var ya;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ya={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var Ta=n.getTranslate(la.node().parentNode);ya.offsetLeft=Ta.x,ya.offsetTop=Ta.y}ut.title.hasOwnProperty("standoff")&&(ya.pad=0)}return ut._titleStandoff=Ur,o.draw(Tt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Br._dfltTitle[xr],avoid:ya,transform:Or,attributes:{x:ba,y:Pa,"text-anchor":"middle"}})}q.shouldShowZeroLine=function(Tt,ut,Br){var Cr=e.simpleMap(ut.range,ut.r2l);return Cr[0]*Cr[1]<=0&&ut.zeroline&&(ut.type==="linear"||ut.type==="-")&&!(ut.rangebreaks&&ut.maskBreaks(0)===N)&&(wi(ut,0)||!Kt(Tt,ut,Br,Cr)||Ft(Tt,ut))},q.clipEnds=function(Tt,ut){return ut.filter(function(Br){return wi(Tt,Br.x)})};function wi(Tt,ut){var Br=Tt.l2p(ut);return Br>1&&Br<Tt._length-1}function Kt(Tt,ut,Br,Cr){var xr=Br._mainAxis;if(!xr)return;var Ir=Tt._fullLayout,Ur=ut._id.charAt(0),Hr=q.counterLetter(ut._id),xt=ut._offset+(Math.abs(Cr[0])<Math.abs(Cr[1])==(Ur==="x")?0:ut._length);function Xt(ya){if(!ya.showline||!ya.linewidth)return!1;var la=Math.max((ya.linewidth+ut.zerolinewidth)/2,1);function Ta(Ki){return typeof Ki=="number"&&Math.abs(Ki-xt)<la}if(Ta(ya._mainLinePosition)||Ta(ya._mainMirrorPosition))return!0;var Ai=ya._linepositions||{};for(var ki in Ai)if(Ta(Ai[ki][0])||Ta(Ai[ki][1]))return!0}var vr=Ir._plots[Br._mainSubplot];if(!(vr.mainplotinfo||vr).overlays.length)return Xt(Br,xt);for(var Or=q.list(Tt,Hr),ba=0;ba<Or.length;ba++){var Pa=Or[ba];if(Pa._mainAxis===xr&&Xt(Pa,xt))return!0}}function Ft(Tt,ut){for(var Br=Tt._fullData,Cr=ut._mainSubplot,xr=ut._id.charAt(0),Ir=0;Ir<Br.length;Ir++){var Ur=Br[Ir];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(Tt){var ut=v.select(Tt),Br=ut.select(".text-math-group");return Br.empty()?ut.select("text"):Br}q.allowAutoMargin=function(Tt){for(var ut=q.list(Tt,"",!0),Br=0;Br<ut.length;Br++){var Cr=ut[Br];Cr.automargin&&(S.allowAutoMargin(Tt,Jt(Cr)),Cr.mirror&&S.allowAutoMargin(Tt,Fr(Cr))),E.getComponentMethod("rangeslider","isVisible")(Cr)&&S.allowAutoMargin(Tt,ta(Cr))}};function Jt(Tt){return Tt._id+".automargin"}function Fr(Tt){return Jt(Tt)+".mirror"}function ta(Tt){return Tt._id+".rangeslider"}q.swap=function(Tt,ut){for(var Br=ra(Tt,ut),Cr=0;Cr<Br.length;Cr++)Ba(Tt,Br[Cr].x,Br[Cr].y)};function ra(Tt,ut){var Br=[],Cr,xr;for(Cr=0;Cr<ut.length;Cr++){var Ir=[],Ur=Tt._fullData[ut[Cr]].xaxis,Hr=Tt._fullData[ut[Cr]].yaxis;if(!(!Ur||!Hr)){for(xr=0;xr<Br.length;xr++)(Br[xr].x.indexOf(Ur)!==-1||Br[xr].y.indexOf(Hr)!==-1)&&Ir.push(xr);if(!Ir.length){Br.push({x:[Ur],y:[Hr]});continue}var xt=Br[Ir[0]],Xt;if(Ir.length>1)for(xr=1;xr<Ir.length;xr++)Xt=Br[Ir[xr]],ca(xt.x,Xt.x),ca(xt.y,Xt.y);ca(xt.x,[Ur]),ca(xt.y,[Hr])}}return Br}function ca(Tt,ut){for(var Br=0;Br<ut.length;Br++)Tt.indexOf(ut[Br])===-1&&Tt.push(ut[Br])}function Ba(Tt,ut,Br){var Cr=[],xr=[],Ir=Tt.layout,Ur,Hr;for(Ur=0;Ur<ut.length;Ur++)Cr.push(q.getFromId(Tt,ut[Ur]));for(Ur=0;Ur<Br.length;Ur++)xr.push(q.getFromId(Tt,Br[Ur]));var xt=Object.keys(i),Xt=["anchor","domain","overlaying","position","side","tickangle","editType"],vr=["linear","log"];for(Ur=0;Ur<xt.length;Ur++){var Or=xt[Ur],ba=Cr[0][Or],Pa=xr[0][Or],ya=!0,la=!1,Ta=!1;if(!(Or.charAt(0)==="_"||typeof ba=="function"||Xt.indexOf(Or)!==-1)){for(Hr=1;Hr<Cr.length&&ya;Hr++){var Ai=Cr[Hr][Or];Or==="type"&&vr.indexOf(ba)!==-1&&vr.indexOf(Ai)!==-1&&ba!==Ai?la=!0:Ai!==ba&&(ya=!1)}for(Hr=1;Hr<xr.length&&ya;Hr++){var ki=xr[Hr][Or];Or==="type"&&vr.indexOf(Pa)!==-1&&vr.indexOf(ki)!==-1&&Pa!==ki?Ta=!0:xr[Hr][Or]!==Pa&&(ya=!1)}ya&&(la&&(Ir[Cr[0]._name].type="linear"),Ta&&(Ir[xr[0]._name].type="linear"),$a(Ir,Or,Cr,xr,Tt._fullLayout._dfltTitle))}}for(Ur=0;Ur<Tt._fullLayout.annotations.length;Ur++){var Ki=Tt._fullLayout.annotations[Ur];ut.indexOf(Ki.xref)!==-1&&Br.indexOf(Ki.yref)!==-1&&e.swapAttrs(Ir.annotations[Ur],["?"])}}function $a(Tt,ut,Br,Cr,xr){var Ir=e.nestedProperty,Ur=Ir(Tt[Br[0]._name],ut).get(),Hr=Ir(Tt[Cr[0]._name],ut).get(),xt;for(ut==="title"&&(Ur&&Ur.text===xr.x&&(Ur.text=xr.y),Hr&&Hr.text===xr.y&&(Hr.text=xr.x)),xt=0;xt<Br.length;xt++)Ir(Tt,Br[xt]._name+"."+ut).set(Hr);for(xt=0;xt<Cr.length;xt++)Ir(Tt,Cr[xt]._name+"."+ut).set(Ur)}function Za(Tt){return Tt._id==="angularaxis"}function ri(Tt,ut){for(var Br=ut._rangebreaks.length,Cr=0;Cr<Br;Cr++){var xr=ut._rangebreaks[Cr];if(Tt>=xr.min&&Tt<xr.max)return xr.max}return Tt}function pi(Tt){return(Tt.ticklabelposition||"").indexOf("inside")!==-1}function Ra(Tt,ut){pi(Tt._anchorAxis||{})&&Tt._hideCounterAxisInsideTickLabels&&Tt._hideCounterAxisInsideTickLabels(ut)}function tn(Tt,ut,Br,Cr){var xr=Tt.anchor!=="free"&&(Tt.overlaying===void 0||Tt.overlaying===!1)?Tt._id:Tt.overlaying,Ir;Cr?Ir=Tt.side==="right"?ut:-ut:Ir=ut,xr in Br||(Br[xr]={}),Tt.side in Br[xr]||(Br[xr][Tt.side]=0),Br[xr][Tt.side]+=Ir}function on(Tt,ut){return Tt.autoshift?ut[Tt.overlaying][Tt.side]:Tt.shift||0}function hn(Tt,ut){return/%f/.test(ut)?Tt>=z:/%L/.test(ut)?Tt>=L:/%[SX]/.test(ut)?Tt>=R:/%M/.test(ut)?Tt>=f:/%[HI]/.test(ut)?Tt>=y:/%p/.test(ut)?Tt>=u:/%[Aadejuwx]/.test(ut)?Tt>=d:/%[UVW]/.test(ut)?Tt>=b:/%[Bbm]/.test(ut)?Tt>=g:/%[q]/.test(ut)?Tt>=w:/%[Yy]/.test(ut)?Tt>=T:!0}}}),f5=Xe({"src/plots/cartesian/autorange_options_defaults.js"(Z,G){"use strict";G.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=Xe({"src/plots/cartesian/range_defaults.js"(Z,G){"use strict";var v=f5();G.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&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),E.cleanRange()}}}),uz=Xe({"node_modules/mouse-event-offset/index.js"(Z,G){var v={left:0,top:0};G.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?v:E.getBoundingClientRect()}}}),b2=Xe({"node_modules/has-passive-events/index.js"(Z,G){"use strict";var v=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}G.exports=v&&x()}}),cz=Xe({"src/components/dragelement/align.js"(Z,G){"use strict";G.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=Xe({"src/components/dragelement/cursor.js"(Z,G){"use strict";var v=sa(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(E,e,t,r){return t==="left"?E=0:t==="center"?E=1:t==="right"?E=2:E=v.constrain(Math.floor(E*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),x[e][E]}}}),hz=Xe({"src/components/dragelement/unhover.js"(Z,G){"use strict";var v=Qy(),x=y2(),S=T_().getGraphDiv,E=w_(),e=G.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&&v.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=Xe({"src/components/dragelement/index.js"(Z,G){"use strict";var v=uz(),x=i5(),S=b2(),E=sa().removeElement,e=lh(),t=G.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,c=s._context.doubleClickDelay,m=i.element,p,T,l,_,w,A,M,g;s._mouseDownTime||(s._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,S?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;function b(R,L,z){return Math.abs(R)<z&&(R=0),Math.abs(L)<z&&(L=0),[R,L]}var d=i.clampFn||b;function u(R){s._dragged=!1,s._dragging=!0;var L=a(R);p=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=p,R.clientY=T),l=new Date().getTime(),l-s._mouseDownTime<c?h+=1:(h=1,s._mouseDownTime=l),i.prepFn&&i.prepFn(R,p,T),x&&!g?(w=o(),w.style.cursor=window.getComputedStyle(m).cursor):x||(w=document,_=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(m).cursor),document.addEventListener("mouseup",f),document.addEventListener("touchend",f),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=d(L[0]-p,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:m,dx:N,dy:O},i.moveFn(N,O))}function f(R){if(delete s._dragdata,i.dragmode!==!1&&(R.preventDefault(),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),x?E(w):_&&(w.documentElement.style.cursor=_,_=null),!s._dragging){s._dragged=!1;return}if(s._dragging=!1,new Date().getTime()-s._mouseDownTime>c&&(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 v(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Kd=Xe({"src/lib/setcursor.js"(Z,G){"use strict";G.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=Xe({"src/lib/override_cursor.js"(Z,G){"use strict";var v=Kd(),x="data-savedcursor",S="!!";G.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)}v(e,t)}else r&&(e.attr(x,null),r===S?v(e):v(e,r))}}}),p5=Xe({"src/components/legend/attributes.js"(Z,G){"use strict";var v=tc(),x=sh();G.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:v({editType:"legend"}),grouptitlefont:v({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:v({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),E_=Xe({"src/components/legend/helpers.js"(Z){"use strict";Z.isGrouped=function(v){return(v.traceorder||"").indexOf("grouped")!==-1},Z.isVertical=function(v){return v.orientation!=="h"},Z.isReversed=function(v){return(v.traceorder||"").indexOf("reversed")!==-1},Z.getId=function(v){return v._id||"legend"}}}),d5=Xe({"src/components/legend/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=zl(),E=ru(),e=p5(),t=$y(),r=E_();function o(a,n,i,s,h){var c=n[a]||{},m=S.newContainer(i,a);function p(Y,ee){return x.coerce(c,m,e,Y,ee)}var T=x.coerceFont(p,"font",i.font);p("bgcolor",i.paper_bgcolor),p("bordercolor");var l=p("visible");if(!l)return;var _,w=function(Y,ee){var q=_._input,oe=_;return x.coerce(q,oe,E,Y,ee)},A=i.font||{},M=x.coerceFont(p,"grouptitlefont",A,{overrideDflt:{size:Math.round(A.size*1.1)}}),g=0,b=!1,d="normal",u=(i.shapes||[]).filter(function(Y){return Y.showlegend});function y(Y){return v.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 oe=Y.legend.length;oe<Y._length;oe++)b=!0,g++});for(var f=s.concat(u).filter(function(Y){return!y(_)&&a===(Y.legend||"legend")}),R=0;R<f.length;R++)if(_=f[R],!!_.visible){var L=_._isShape;(_.showlegend||_._dfltShowLegend&&!(_._module&&_._module.attributes&&_._module.attributes.showlegend&&_._module.attributes.showlegend.dflt===!1))&&(g++,_.showlegend&&(b=!0,(!L&&v.traceIs(_,"pie-like")||_._input.showlegend===!0)&&g++),x.coerceFont(w,"legendgrouptitle.font",M)),(!L&&v.traceIs(_,"bar")&&i.barmode==="stack"||["tonextx","tonexty"].indexOf(_.fill)!==-1)&&(d=r.isGrouped({traceorder:d})?"grouped+reversed":"reversed"),_.legendgroup!==void 0&&_.legendgroup!==""&&(d=r.isReversed({traceorder:d})?"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&&!c.uirevision)&&(p("uirevision",i.uirevision),z!==!1)){p("borderwidth");var F=p("orientation"),N=p("yref"),O=p("xref"),P=F==="h",U=N==="paper",B=O==="paper",X,$,se,le="left";P?(X=0,v.getComponentMethod("rangeslider","isVisible")(n.xaxis)?U?($=1.1,se="bottom"):($=1,se="top"):U?($=-.1,se="top"):($=0,se="bottom")):($=1,se="auto",B?X=1.02:(X=1,le="right")),x.coerce(c,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:X}},"x"),x.coerce(c,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),p("traceorder",d),r.isGrouped(i[a])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",le),p("yanchor",se),p("maxheight"),p("valign"),x.noneOrAll(c,m,["x","y"]);var fe=p("title.text");if(fe){p("title.side",P?"left":"top");var V=x.extendFlat({},T,{size:x.bigFont(T.size)});x.coerceFont(p,"title.font",V);let Y=h>1;p("titleclick",Y?"toggle":!1),p("titledoubleclick",Y?"toggleothers":!1)}}}G.exports=function(n,i,s){var h,c=s.slice(),m=i.shapes;if(m)for(h=0;h<m.length;h++){var p=m[h];if(p.showlegend){var T={_input:p._input,visible:p.visible,showlegend:p.showlegend,legend:p.legend};c.push(T)}}var l=["legend"];for(h=0;h<c.length;h++)Array.isArray(c[h].legend)?l=l.concat(c[h].legend):x.pushUnique(l,c[h].legend);for(i._legends=[],h=0;h<l.length;h++){var _=l[h];o(_,n,i,c,l.length),i[_]&&(i[_]._id=_),i._legends.push(_)}}}}),v5=Xe({"src/components/legend/handle_click.js"(Z){"use strict";var G=so(),v=sa(),x=v.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&&(v.notifier(v._(r,"Double-click on legend to isolate one trace"),"long"),E=!1);var h=s==="togglegroup",c=n.hiddenlabels?n.hiddenlabels.slice():[],m=r._fullData,p=(n.shapes||[]).filter(function(rt){return rt.showlegend}),T=m.concat(p),l=i.trace;l._isShape&&(l=l._fullInput);var _=l.legendgroup,w,A,M,g,b,d,u={},y=[],f=[],R=[];function L(rt,st){var Me=y.indexOf(rt),ye=u.visible;return ye||(ye=u.visible=[]),y.indexOf(rt)===-1&&(y.push(rt),Me=y.length-1),ye[Me]=st,Me}var z=(n.shapes||[]).map(function(rt){return rt._input}),F=!1;function N(rt,st){z[rt].visible=st,F=!0}function O(rt,st){if(!(i.groupTitle&&!h)){var Me=rt._fullInput||rt,ye=Me._isShape,he=Me.index;he===void 0&&(he=Me._index);var Oe=Me.visible===!1?!1:st;ye?N(he,Oe):L(he,Oe)}}var P=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&G.traceIs(l,"pie-like")){var X=i.label,$=c.indexOf(X);if(a==="toggle")$===-1?c.push(X):c.splice($,1);else if(a==="toggleothers"){var se=$!==-1,le=[];for(w=0;w<r.calcdata.length;w++){var fe=r.calcdata[w];for(A=0;A<fe.length;A++){var V=fe[A],Y=V.label;P===fe[0].trace.legend&&X!==Y&&(c.indexOf(Y)===-1&&(se=!0),x(c,Y),le.push(Y))}}if(!se)for(var ee=0;ee<le.length;ee++){var q=c.indexOf(le[ee]);q!==-1&&c.splice(q,1)}}G.call("_guiRelayout",r,"hiddenlabels",c)}else{var oe=_&&_.length,ae=[],j;if(oe)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(oe)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 ce,be,Ae,De,ze,Ze=!0;for(w=0;w<T.length;w++)if(ze=T[w],ce=ze===l,Ae=ze.showlegend!==!0,!(ce||Ae)&&(be=oe&&ze.legendgroup===_,!be&&ze.legend===P&&ze.visible===!0&&!G.traceIs(ze,"notLegendIsolatable"))){Ze=!1;break}for(w=0;w<T.length;w++)if(ze=T[w],!(ze.visible===!1||ze.legend!==P)&&!G.traceIs(ze,"notLegendIsolatable"))switch(l.visible){case"legendonly":O(ze,!0);break;case!0:De=Ze?!0:"legendonly",ce=ze===l,Ae=ze.showlegend!==!0&&!ze.legendgroup,be=ce||oe&&ze.legendgroup===_,O(ze,be||Ae?!0:De);break}}for(w=0;w<f.length;w++)if(M=f[w],!!M){var at=M.constructUpdate(),nt=Object.keys(at);for(A=0;A<nt.length;A++)g=nt[A],d=u[g]=u[g]||[],d[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?G.call("_guiUpdate",r,u,{shapes:z},y):G.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 c(M){return(M.legend||"legend")===i}var m,p;if(o==="toggle")m=!h.some(function(g){return c(g)&&g.visible===!0}),p=!1;else{let M=h.some(function(g){return!c(g)&&g.visible===!0&&g.showlegend!==!1});m=!0,p=!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=c(M);if(!g){let u=M.showlegend!==!0&&!M.legendgroup;if(o==="toggle"||u)continue}let d=(g?m:p)?!0:"legendonly";M.visible!==!1&&M.visible!==d&&(M._isShape?(_[M._index].visible=d,w=!0):(l.push(M.index),T.visible.push(d)))}w?G.call("_guiUpdate",t,T,{shapes:_},l):l.length&&G.call("_guiRestyle",t,T,l)}}}),m5=Xe({"src/components/legend/constants.js"(Z,G){"use strict";G.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),dz=Xe({"src/components/legend/get_legend_data.js"(Z,G){"use strict";var v=so(),x=E_();G.exports=function(E,e,t){var r=e._inHover,o=x.isGrouped(e),a=x.isReversed(e),n={},i=[],s=!1,h={},c=0,m=0,p,T;function l(X,$,se){if(e.visible!==!1&&!(t&&X!==e._id))if($===""||!x.isGrouped(e)){var le="~~i"+c;i.push(le),n[le]=[se],c++}else i.indexOf($)===-1?(i.push($),s=!0,n[$]=[se]):n[$].push(se)}for(p=0;p<E.length;p++){var _=E[p],w=_[0],A=w.trace,M=A.legend,g=A.legendgroup;if(!(!r&&(!A.visible||!A.showlegend)))if(v.traceIs(A,"pie-like")){var b=Array.isArray(A.legend),d=Array.isArray(A.showlegend);for(h[g]||(h[g]={}),T=0;T<_.length;T++)if(!(d&&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,m=Math.max(m,(u||"").length))}}else l(M,g,w),m=Math.max(m,(A.name||"").length)}if(!i.length)return[];var y=!s||!o,f=[];for(p=0;p<i.length;p++){var R=n[i[p]];y?f.push(R[0]):f.push(R)}for(y&&(f=[f]),p=0;p<f.length;p++){var L=1/0;for(T=0;T<f[p].length;T++){var z=f[p][T].trace.legendrank;L>z&&(L=z)}f[p][0]._groupMinRank=L,f[p][0]._preGroupSort=p}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(f.forEach(function(X,$){X[0]._preGroupSort=$}),f.sort(F),p=0;p<f.length;p++){f[p].forEach(function(X,$){X._preSort=$}),f[p].sort(N);var O=f[p][0].trace,P=null;for(T=0;T<f[p].length;T++){var U=f[p][T].trace.legendgrouptitle;if(U&&U.text){P=U,r&&(U.font=e._groupTitleFont);break}}if(a&&f[p].reverse(),P){var B=!1;for(T=0;T<f[p].length;T++)if(v.traceIs(f[p][T].trace,"pie-like")){B=!0;break}f[p].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<f[p].length;T++)f[p][T]=[f[p][T]]}return e._lgroupsLength=f.length,e._maxNameLength=m,f}}}),t0=Xe({"src/traces/pie/helpers.js"(Z){"use strict";var G=sa();function v(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=v((S*100).toPrecision(3));return G.numSeparate(e,E)+"%"},Z.formatPieValue=function(S,E){var e=v(S.toPrecision(10));return G.numSeparate(e,E)},Z.getFirstFilled=function(S,E){if(G.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(G.isArrayOrTypedArray(S))return Z.getFirstFilled(S,E);if(S)return S},Z.getRotationAngle=function(x){return(x==="auto"?0:x)*Math.PI/180}}}),vz=Xe({"src/traces/pie/fill_one.js"(Z,G){"use strict";var v=es(),x=$n();G.exports=function(E,e,t,r){var o=t.marker.pattern;o&&o.shape?v.pointStyle(E,t,r,e):x.fill(E,e.color)}}}),i1=Xe({"src/traces/pie/style_one.js"(Z,G){"use strict";var v=$n(),x=t0().castOption,S=vz();G.exports=function(e,t,r,o){var a=r.marker.line,n=x(a.color,t.pts)||v.defaultLine,i=x(a.width,t.pts)||0;e.call(S,t,r,o).style("stroke-width",i).call(v.stroke,n)}}}),g5=Xe({"src/components/legend/style.js"(Z,G){"use strict";var v=Hn(),x=so(),S=sa(),E=S.strTranslate,e=es(),t=$n(),r=wp().extractOpts,o=Fu(),a=i1(),n=t0().castOption,i=m5(),s=12,h=5,c=2,m=10,p=5;G.exports=function(A,M,g){var b=M._fullLayout;g||(g=b.legend);var d=g.itemsizing==="constant",u=g.itemwidth,y=(u+i.itemGap*2)/2,f=E(y,0),R=function(V,Y,ee,q){var oe;if(V+1)oe=V;else if(Y&&Y.width>0)oe=Y.width;else return 0;return d?q:Math.min(oe,ee)};A.each(function(V){var Y=v.select(this),ee=S.ensureSingle(Y,"g","layers");ee.style("opacity",V[0].trace.opacity);var q=g.indentation,oe=g.valign,ae=V[0].lineHeight,j=V[0].height;if(oe==="middle"&&q===0||!ae||!j)ee.attr("transform",null);else{var Q={top:1,bottom:-1}[oe],re=Q*(.5*(ae-j+3))||0,ce=g.indentation;ee.attr("transform",E(ce,re))}var be=ee.selectAll("g.legendfill").data([V]);be.enter().append("g").classed("legendfill",!0);var Ae=ee.selectAll("g.legendlines").data([V]);Ae.enter().append("g").classed("legendlines",!0);var De=ee.selectAll("g.legendsymbols").data([V]);De.enter().append("g").classed("legendsymbols",!0),De.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(fe).each(F).each(O).each(N).each(U).each(se).each($).each(L).each(z).each(B).each(X);function L(V){var Y=l(V),ee=Y.showFill,q=Y.showLine,oe=Y.showGradientLine,ae=Y.showGradientFill,j=Y.anyFill,Q=Y.anyLine,re=V[0],ce=re.trace,be,Ae,De=r(ce),ze=De.colorscale,Ze=De.reversescale,at=function(Oe){if(Oe.size())if(ee)e.fillGroupStyle(Oe,M,!0);else{var tt="legendfill-"+ce.uid;e.gradient(Oe,M,tt,T(Ze),ze,"fill")}},nt=function(Oe){if(Oe.size()){var tt="legendline-"+ce.uid;e.lineGroupStyle(Oe),e.gradient(Oe,M,tt,T(Ze),ze,"stroke")}},rt=o.hasMarkers(ce)||!j?"M5,0":Q?"M5,-2":"M5,-3",st=v.select(this),Me=st.select(".legendfill").selectAll("path").data(ee||ae?[V]:[]);if(Me.enter().append("path").classed("js-fill",!0),Me.exit().remove(),Me.attr("d",rt+"h"+u+"v6h-"+u+"z").call(at),q||oe){var ye=R(void 0,ce.line,m,h);Ae=S.minExtend(ce,{line:{width:ye}}),be=[S.minExtend(re,{trace:Ae})]}var he=st.select(".legendlines").selectAll("path").data(q||oe?[be]:[]);he.enter().append("path").classed("js-line",!0),he.exit().remove(),he.attr("d",rt+(oe?"l"+u+",0.0001":"h"+u)).call(q?e.lineGroupStyle:nt)}function z(V){var Y=l(V),ee=Y.anyFill,q=Y.anyLine,oe=Y.showLine,ae=Y.showMarker,j=V[0],Q=j.trace,re=!ae&&!q&&!ee&&o.hasText(Q),ce,be;function Ae(Me,ye,he,Oe){var tt=S.nestedProperty(Q,Me).get(),ot=S.isArrayOrTypedArray(tt)&&ye?ye(tt):tt;if(d&&ot&&Oe!==void 0&&(ot=Oe),he){if(ot<he[0])return he[0];if(ot>he[1])return he[1]}return ot}function De(Me){return j._distinct&&j.index&&Me[j.index]?Me[j.index]:Me[0]}if(ae||re||oe){var ze={},Ze={};if(ae){ze.mc=Ae("marker.color",De),ze.mx=Ae("marker.symbol",De),ze.mo=Ae("marker.opacity",S.mean,[.2,1]),ze.mlc=Ae("marker.line.color",De),ze.mlw=Ae("marker.line.width",S.mean,[0,5],c),ze.mld=Q._isShape?"solid":Ae("marker.line.dash",De),Ze.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Ae("marker.size",S.mean,[2,16],s);ze.ms=at,Ze.marker.size=at}oe&&(Ze.line={width:Ae("line.width",De,[0,10],h)}),re&&(ze.tx="Aa",ze.tp=Ae("textposition",De),ze.ts=10,ze.tc=Ae("textfont.color",De),ze.tf=Ae("textfont.family",De),ze.tw=Ae("textfont.weight",De),ze.ty=Ae("textfont.style",De),ze.tv=Ae("textfont.variant",De),ze.tC=Ae("textfont.textcase",De),ze.tE=Ae("textfont.lineposition",De),ze.tS=Ae("textfont.shadow",De)),ce=[S.minExtend(j,ze)],be=S.minExtend(Q,Ze),be.selectedpoints=null,be.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),rt=nt.selectAll("path.scatterpts").data(ae?ce:[]);rt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",f),rt.exit().remove(),rt.call(e.pointStyle,be,M),ae&&(ce[0].mrc=3);var st=nt.selectAll("g.pointtext").data(re?ce:[]);st.enter().append("g").classed("pointtext",!0).append("text").attr("transform",f),st.exit().remove(),st.selectAll("text").call(e.textPointStyle,be,M)}function F(V){var Y=V[0].trace,ee=Y.type==="waterfall";if(V[0]._distinct&&ee){var q=V[0].trace[V[0].dir].marker;return V[0].mc=q.color,V[0].mlw=q.line.width,V[0].mlc=q.line.color,P(V,this,"waterfall")}var oe=[];Y.visible&&ee&&(oe=V[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=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(oe);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",f).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var Q=v.select(this),re=Y[j[0]].marker,ce=R(void 0,re.line,p,c);Q.attr("d",j[1]).style("stroke-width",ce+"px").call(t.fill,re.color),ce&&Q.call(t.stroke,re.line.color)})}function N(V){P(V,this)}function O(V){P(V,this,"funnel")}function P(V,Y,ee){var q=V[0].trace,oe=q.marker||{},ae=oe.line||{},j=oe.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=v.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(Q?[V]:[]);re.enter().append("path").classed("legend"+ee,!0).attr("d",j).attr("transform",f),re.exit().remove(),re.each(function(ce){var be=v.select(this),Ae=ce[0],De=R(Ae.mlw,oe.line,p,c);be.style("stroke-width",De+"px");var ze=Ae.mcc;if(!g._inHover&&"mc"in Ae){var Ze=r(oe),at=Ze.mid;at===void 0&&(at=(Ze.max+Ze.min)/2),ze=e.tryColorscale(oe,"")(at)}var nt=ze||Ae.mc||oe.color,rt=oe.pattern,st=e.getPatternAttr,Me=rt&&(st(rt.shape,0,"")||st(rt.path,0,""));if(Me){var ye=st(rt.bgcolor,0,null),he=st(rt.fgcolor,0,null),Oe=rt.fgopacity,tt=_(rt.size,8,10),ot=_(rt.solidity,.5,1),Qe="legend-"+q.uid;be.call(e.pattern,"legend",M,Qe,Me,tt,ot,ze,rt.fillmode,ye,he,Oe)}else be.call(t.fill,nt);De&&t.stroke(be,Ae.mlc||ae.color)})}function U(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Y.visible&&x.traceIs(Y,"box-violin")?[V]:[]);ee.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",f),ee.exit().remove(),ee.each(function(){var q=v.select(this);if((Y.boxpoints==="all"||Y.points==="all")&&t.opacity(Y.fillcolor)===0&&t.opacity((Y.line||{}).color)===0){var oe=S.minExtend(Y,{marker:{size:d?s:S.constrain(Y.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});ee.call(e.pointStyle,oe,M)}else{var ae=R(void 0,Y.line,p,c);q.style("stroke-width",ae+"px").call(t.fill,Y.fillcolor),ae&&t.stroke(q,Y.line.color)}})}function B(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Y.visible&&Y.type==="candlestick"?[V,V]:[]);ee.enter().append("path").classed("legendcandle",!0).attr("d",function(q,oe){return oe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",f).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,oe){var ae=v.select(this),j=Y[oe?"increasing":"decreasing"],Q=R(void 0,j.line,p,c);ae.style("stroke-width",Q+"px").call(t.fill,j.fillcolor),Q&&t.stroke(ae,j.line.color)})}function X(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Y.visible&&Y.type==="ohlc"?[V,V]:[]);ee.enter().append("path").classed("legendohlc",!0).attr("d",function(q,oe){return oe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",f).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,oe){var ae=v.select(this),j=Y[oe?"increasing":"decreasing"],Q=R(void 0,j.line,p,c);ae.style("fill","none").call(e.dashLine,j.line.dash,Q),Q&&t.stroke(ae,j.line.color)})}function $(V){le(V,this,"pie")}function se(V){le(V,this,"funnelarea")}function le(V,Y,ee){var q=V[0],oe=q.trace,ae=ee?oe.visible&&oe.type===ee:x.traceIs(oe,ee),j=v.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(ae?[V]:[]);if(j.enter().append("path").classed("legend"+ee,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",f),j.exit().remove(),j.size()){var Q=oe.marker||{},re=R(n(Q.line.width,q.pts),Q.line,p,c),ce="pieLike",be=S.minExtend(oe,{marker:{line:{width:re}}},ce),Ae=S.minExtend(q,{trace:be},ce);a(j,Ae,be,M)}}function fe(V){var Y=V[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 oe=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(q);oe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",f).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(ae,j){var Q=v.select(this),re=r(Y),ce=re.colorscale,be=re.reversescale,Ae=function(at){if(at.size()){var nt="legendfill-"+Y.uid;e.gradient(at,M,nt,T(be,ee==="radial"),ce,"fill")}},De;if(ce){if(!ee){var Ze=ce.length;De=j===0?ce[be?Ze-1:0][1]:j===1?ce[be?0:Ze-1][1]:ce[Math.floor((Ze-1)/2)][1]}}else{var ze=Y.vertexcolor||Y.facecolor||Y.color;De=S.isArrayOrTypedArray(ze)?ze[j]||ze[0]:ze}Q.attr("d",ae[0]),De?Q.call(t.fill,De):Q.call(Ae)})}};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),d=A.visible&&A.fill&&A.fill!=="none",u=!1,y=!1;if(M){var f=M.coloring;f==="lines"?u=!0:g=f==="none"||f==="heatmap"||M.showlines,M.type==="constraint"?d=M._operation!=="=":(f==="fill"||f==="heatmap")&&(y=!0)}return{showMarker:b,showLine:g,showFill:d,showGradientLine:u,showGradientFill:y,anyLine:g||u,anyFill:d||y}}function _(w,A,M){return w&&S.isArrayOrTypedArray(w)?A:w>M?M:w}}}),y5=Xe({"src/components/legend/draw.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=bc(),E=so(),e=Qy(),t=Ap(),r=es(),o=$n(),a=ou(),n=v5().handleItemClick,i=v5().handleTitleClick,s=m5(),h=uh(),c=h.LINE_SPACING,m=h.FROM_TL,p=h.FROM_BR,T=dz(),l=g5(),_=E_(),w=1,A=/^legend[0-9]*$/;G.exports=function(X,$){if($)g(X,$);else{var se=X._fullLayout,le=se._legends,fe=se._infolayer.selectAll('[class^="legend"]');fe.each(function(){var q=v.select(this),oe=q.attr("class"),ae=oe.split(" ")[0];ae.match(A)&&le.indexOf(ae)===-1&&q.remove()});for(var V=0;V<le.length;V++){var Y=le[V],ee=X._fullLayout[Y];g(X,ee)}}};function M(B,X,$){if(!(X.title.side!=="top center"&&X.title.side!=="top right")){var se=X.title.font,le=se.size*c,fe=0,V=B.node(),Y=r.bBox(V).width;X.title.side==="top center"?fe=.5*(X._width-2*$-2*s.titlePad-Y):X.title.side==="top right"&&(fe=X._width-2*$-2*s.titlePad-Y),a.positionText(B,$+s.titlePad+fe,$+le)}}function g(B,X){var $=X||{},se=B._fullLayout,le=_.getId($),fe,V,Y=$._inHover;if(Y?(V=$.layer,fe="hover"):(V=se._infolayer,fe=le),!!V){fe+=se._uid,B._legendMouseDownTime||(B._legendMouseDownTime=0);var ee;if(Y){if(!$.entries)return;ee=T($.entries,$)}else{for(var q=(B.calcdata||[]).slice(),oe=se.shapes,ae=0;ae<oe.length;ae++){var j=oe[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=se.showlegend&&T(q,$,se._legends.length>1)}var re=se.hiddenlabels||[];if(!Y&&(!se.showlegend||!ee.length))return V.selectAll("."+le).remove(),se._topdefs.select("#"+fe).remove(),S.autoMargin(B,le);var ce=x.ensureSingle(V,"g",le,function(st){Y||st.attr("pointer-events","all")}),be=x.ensureSingleById(se._topdefs,"clipPath",fe,function(st){st.append("rect")}),Ae=x.ensureSingle(ce,"rect","bg",function(st){st.attr("shape-rendering","crispEdges")});Ae.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var De=x.ensureSingle(ce,"g","scrollbox"),ze=$.title;$._titleWidth=0,$._titleHeight=0;var Ze;ze.text?(Ze=x.ensureSingle(De,"text",le+"titletext"),Ze.attr("text-anchor","start").call(r.font,ze.font).text(ze.text),L(Ze,De,B,$,w),!Y&&($.titleclick||$.titledoubleclick)&&R(De,B,$,le)):(De.selectAll("."+le+"titletext").remove(),De.selectAll("."+le+"titletoggle").remove());var at=x.ensureSingle(ce,"rect","scrollbar",function(st){st.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=De.selectAll("g.groups").data(ee);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var rt=nt.selectAll("g.traces").data(x.identity);rt.enter().append("g").attr("class","traces"),rt.exit().remove(),rt.style("opacity",function(st){let Me=st[0],ye=Me.trace;if(Me.groupTitle){let he=ye.legendgroup,Oe=(se.shapes||[]).filter(function(ot){return ot.showlegend});return B._fullData.concat(Oe).some(function(ot){return ot.legendgroup===he&&(ot.legend||"legend")===le&&ot.visible===!0})?1:.5}return E.traceIs(ye,"pie-like")?re.indexOf(st[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(st){Y||st[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(f,B,le)}),x.syncOrAsync([S.previousPromises,function(){return N(B,nt,rt,$,De)},function(){var st=se._size,Me=$.borderwidth,ye=$.xref==="paper",he=$.yref==="paper";if(ze.text){let ct=(se.shapes||[]).filter(function(Ct){return Ct.showlegend}),_t=B._fullData.concat(ct).some(function(Ct){let ir=Ct.legend||"legend";var rr=Array.isArray(ir)?ir.includes(le):ir===le;return rr&&Ct.visible===!0});Ze.style("opacity",_t?1:.5)}if(!Y){var Oe,tt;ye?Oe=st.l+st.w*$.x-m[P($)]*$._width:Oe=se.width*$.x-m[P($)]*$._width,he?tt=st.t+st.h*(1-$.y)-m[U($)]*$._effHeight:tt=se.height*(1-$.y)-m[U($)]*$._effHeight;var ot=O(B,le,Oe,tt);if(ot)return;if(se.margin.autoexpand){var Qe=Oe,Pt=tt;Oe=ye?x.constrain(Oe,0,se.width-$._width):Qe,tt=he?x.constrain(tt,0,se.height-$._effHeight):Pt,Oe!==Qe&&x.log("Constrain "+le+".x to make legend fit inside graph"),tt!==Pt&&x.log("Constrain "+le+".y to make legend fit inside graph")}r.setTranslate(ce,Oe,tt)}if(at.on(".drag",null),ce.on("wheel",null),Y||$._height<=$._maxHeight||B._context.staticPlot){var It=$._effHeight;Y&&(It=$._height),Ae.attr({width:$._width-Me,height:It-Me,x:Me/2,y:Me/2}),r.setTranslate(De,0,0),be.select("rect").attr({width:$._width-2*Me,height:It-2*Me,x:Me,y:Me}),r.setClipUrl(De,fe,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var qt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Wt=$._effHeight-qt-2*s.scrollBarMargin,kr=$._height-$._effHeight,mr=Wt/kr,qr=Math.min($._scrollY||0,kr);Ae.attr({width:$._width-2*Me+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-Me,x:Me/2,y:Me/2}),be.select("rect").attr({width:$._width-2*Me+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*Me,x:Me,y:Me+qr}),r.setClipUrl(De,fe,B),Ve(qr,qt,mr),ce.on("wheel",function(){qr=x.constrain($._scrollY+v.event.deltaY/kr*Wt,0,kr),Ve(qr,qt,mr),qr!==0&&qr!==kr&&v.event.preventDefault()});var Sr,Rr,wt,Ne=function(ct,_t,Ct){var ir=(Ct-_t)/mr+ct;return x.constrain(ir,0,kr)},Ke=function(ct,_t,Ct){var ir=(_t-Ct)/mr+ct;return x.constrain(ir,0,kr)},Te=v.behavior.drag().on("dragstart",function(){var ct=v.event.sourceEvent;ct.type==="touchstart"?Sr=ct.changedTouches[0].clientY:Sr=ct.clientY,wt=qr}).on("drag",function(){var ct=v.event.sourceEvent;ct.buttons===2||ct.ctrlKey||(ct.type==="touchmove"?Rr=ct.changedTouches[0].clientY:Rr=ct.clientY,qr=Ne(wt,Sr,Rr),Ve(qr,qt,mr))});at.call(Te);var Ie=v.behavior.drag().on("dragstart",function(){var ct=v.event.sourceEvent;ct.type==="touchstart"&&(Sr=ct.changedTouches[0].clientY,wt=qr)}).on("drag",function(){var ct=v.event.sourceEvent;ct.type==="touchmove"&&(Rr=ct.changedTouches[0].clientY,qr=Ke(wt,Sr,Rr),Ve(qr,qt,mr))});De.call(Ie)}function Ve(ct,_t,Ct){$._scrollY=B._fullLayout[le]._scrollY=ct,r.setTranslate(De,0,-ct),r.setRect(at,$._width,s.scrollBarMargin+ct*Ct,s.scrollBarWidth,_t),be.select("rect").attr("y",Me+ct)}if(B._context.edits.legendPosition){var Ce,Ee,Pe,ft;ce.classed("cursor-move",!0),t.init({element:ce.node(),gd:B,prepFn:function(ct){if(ct.target!==at.node()){var _t=r.getTranslate(ce);Pe=_t.x,ft=_t.y}},moveFn:function(ct,_t){if(Pe!==void 0&&ft!==void 0){var Ct=Pe+ct,ir=ft+_t;r.setTranslate(ce,Ct,ir),Ce=t.align(Ct,$._width,st.l,st.l+st.w,$.xanchor),Ee=t.align(ir+$._height,-$._height,st.t+st.h,st.t,$.yanchor)}},doneFn:function(){if(Ce!==void 0&&Ee!==void 0){var ct={};ct[le+".x"]=Ce,ct[le+".y"]=Ee,E.call("_guiRelayout",B,ct)}},clickFn:function(ct,_t){var Ct=V.selectAll("g.traces").filter(function(){var ir=this.getBoundingClientRect();return _t.clientX>=ir.left&&_t.clientX<=ir.right&&_t.clientY>=ir.top&&_t.clientY<=ir.bottom});Ct.size()>0&&d(B,$,Ct,ct,_t)}})}}],B)}}function b(B,X,$){var se=B[0],le=se.width,fe=X.entrywidthmode,V=se.trace.legendwidth||X.entrywidth;return fe==="fraction"?X._maxWidth*V:$+(V||le)}function d(B,X,$,se,le){var fe=B._fullLayout,V=$.data()[0][0].trace,Y=X.itemclick,ee=X.itemdoubleclick,q={event:le,node:$.node(),curveNumber:V.index,expandedIndex:V.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:fe};V._group&&(q.group=V._group),E.traceIs(V,"pie-like")&&(q.label=$.datum()[0].label);var oe=e.triggerHandler(B,"plotly_legendclick",q);if(se===1){if(oe===!1)return;X._clickTimeout=setTimeout(function(){B._fullLayout&&Y&&n($,B,X,Y)},B._context.doubleClickDelay)}else if(se===2){X._clickTimeout&&clearTimeout(X._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",q);ae!==!1&&oe!==!1&&ee&&n($,B,X,ee)}}function u(B,X,$){var se=_.getId($),le=B.data()[0][0],fe=le.trace,V=E.traceIs(fe,"pie-like"),Y=!$._inHover&&X._context.edits.legendText&&!V,ee=$._maxNameLength,q,oe;le.groupTitle?(q=le.groupTitle.text,oe=le.groupTitle.font):(oe=$.font,$.entries?q=le.text:(q=V?le.label:fe.name,fe._meta&&(q=x.templateString(q,fe._meta))));var ae=x.ensureSingle(B,"text",se+"text");ae.attr("text-anchor","start").call(r.font,oe).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=le.trace._fullInput||{},ce={};return ce.name=Q,re._isShape?E.call("_guiRelayout",X,"shapes["+fe.index+"].name",ce.name):E.call("_guiRestyle",X,ce,fe.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 se=$-B.length;se>0;se--)B+=" ";return B}function f(B,X,$){var se=X._context.doubleClickDelay,le,fe=1,V=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||(V.on("mousedown",function(){le=new Date().getTime(),le-X._legendMouseDownTime<se?fe+=1:(fe=1,X._legendMouseDownTime=le)}),V.on("mouseup",function(){if(!(X._dragged||X._editing)){var Y=X._fullLayout[$];new Date().getTime()-X._legendMouseDownTime>se&&(fe=Math.max(fe-1,1)),d(X,Y,B,fe,v.event)}}))}function R(B,X,$,se){if(X._fullData.some(function(q){let oe=q.legend||"legend";return(Array.isArray(oe)?oe.includes(se):oe===se)&&E.traceIs(q,"pie-like")}))return;let fe=X._context.doubleClickDelay;var V,Y=1;let ee=x.ensureSingle(B,"rect",se+"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(){V=new Date().getTime(),V-X._legendMouseDownTime<fe?Y+=1:(Y=1,X._legendMouseDownTime=V)}),ee.on("mouseup",function(){if(X._dragged||X._editing)return;new Date().getTime()-X._legendMouseDownTime>fe&&(Y=Math.max(Y-1,1));let q={event:v.event,legendId:se,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)},fe)}else Y===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),X._legendMouseDownTime=0,e.triggerHandler(X,"plotly_legendtitledoubleclick",q)!==!1&&$.titledoubleclick&&i(X,$,$.titledoubleclick))}))}function L(B,X,$,se,le){se._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(X,$,se,le)})}function z(B,X,$,se){var le=B.data()[0][0],fe=le&&le.trace.showlegend;if(Array.isArray(fe)&&(fe=fe[le.i]!==!1),!$._inHover&&le&&!fe){B.remove();return}var V=B.select("g[class*=math-group]"),Y=V.node(),ee=_.getId($);$||($=X._fullLayout[ee]);var q=$.borderwidth,oe;se===w?oe=$.title.font:le.groupTitle?oe=le.groupTitle.font:oe=$.font;var ae=oe.size*c,j,Q;if(Y){var re=r.bBox(Y);j=re.height,Q=re.width,se===w?r.setTranslate(V,q,q+j*.75):r.setTranslate(V,0,j*.25)}else{var ce="."+ee+(se===w?"title":"")+"text",be=B.select(ce),Ae=a.lineCount(be),De=be.node();if(j=ae*Ae,Q=De?r.bBox(De).width:0,se===w)$.title.side==="left"&&(Q+=s.itemGap*2),a.positionText(be,q+s.titlePad,q+ae);else{var ze=s.itemGap*2+$.indentation+$.itemwidth;le.groupTitle&&(ze=s.itemGap,Q-=$.indentation+$.itemwidth),a.positionText(be,ze,-ae*((Ae-1)/2-.3))}}se===w?($._titleWidth=Q,$._titleHeight=j):(le.lineHeight=ae,le.height=Math.max(j,16)+3,le.width=Q)}function F(B){var X=0,$=0,se=B.title.side;return se&&(se.indexOf("left")!==-1&&(X=B._titleWidth),se.indexOf("top")!==-1&&($=B._titleHeight)),[X,$]}function N(B,X,$,se,le){var fe=B._fullLayout,V=_.getId(se);se||(se=fe[V]);var Y=fe._size,ee=_.isVertical(se),q=_.isGrouped(se),oe=se.entrywidthmode==="fraction",ae=se.borderwidth,j=2*ae,Q=s.itemGap,re=se.indentation+se.itemwidth+Q*2,ce=2*(ae+Q),be=U(se),Ae=se.y<0||se.y===0&&be==="top",De=se.y>1||se.y===1&&be==="bottom",ze=se.tracegroupgap,Ze={};let{orientation:at,yref:nt}=se,{maxheight:rt}=se,st=Ae||De||at!=="v"||nt!=="paper";rt||(rt=st?.5:1);let Me=st?fe.height:Y.h;se._maxHeight=Math.max(rt>1?rt:rt*Me,30);var ye=0;se._width=0,se._height=0;var he=F(se);if(ee)$.each(function(ct){var _t=ct[0].height;r.setTranslate(this,ae+he[0],ae+he[1]+se._height+_t/2+Q),se._height+=_t,se._width=Math.max(se._width,ct[0].width)}),ye=re+se._width,se._width+=Q+re+j,se._height+=ce,q&&(X.each(function(ct,_t){r.setTranslate(this,0,_t*se.tracegroupgap)}),se._height+=(se._lgroupsLength-1)*se.tracegroupgap);else{var Oe=P(se),tt=se.x<0||se.x===0&&Oe==="right",ot=se.x>1||se.x===1&&Oe==="left",Qe=De||Ae,Pt=fe.width/2;se._maxWidth=Math.max(tt?Qe&&Oe==="left"?Y.l+Y.w:Pt:ot?Qe&&Oe==="right"?Y.r+Y.w:Pt:Y.w,2*re);var It=0,qt=0;$.each(function(ct){var _t=b(ct,se,re);It=Math.max(It,_t),qt+=_t}),ye=null;var Wt=0;if(q){var kr=0,mr=0,qr=0;X.each(function(){var ct=0,_t=0;v.select(this).selectAll("g.traces").each(function(ir){var rr=b(ir,se,re),er=ir[0].height;r.setTranslate(this,he[0],he[1]+ae+Q+er/2+_t),_t+=er,ct=Math.max(ct,rr),Ze[ir[0].trace.legendgroup]=ct});var Ct=ct+Q;mr>0&&Ct+ae+mr>se._maxWidth?(Wt=Math.max(Wt,mr),mr=0,qr+=kr+ze,kr=_t):kr=Math.max(kr,_t),r.setTranslate(this,mr,qr),mr+=Ct}),se._width=Math.max(Wt,mr)+ae,se._height=qr+kr+ce}else{var Sr=$.size(),Rr=qt+j+(Sr-1)*Q<se._maxWidth,wt=0,Ne=0,Ke=0,Te=0;$.each(function(ct){var _t=ct[0].height,Ct=b(ct,se,re,q),ir=Rr?Ct:It;oe||(ir+=Q),ir+ae+Ne-Q>=se._maxWidth&&(Wt=Math.max(Wt,Te),Ne=0,Ke+=wt,se._height+=wt,wt=0),r.setTranslate(this,he[0]+ae+Ne,he[1]+ae+Ke+_t/2+Q),Te=Ne+Ct+Q,Ne+=ir,wt=Math.max(wt,_t)}),Rr?(se._width=Ne+j,se._height=wt+ce):(se._width=Math.max(Wt,Te)+j,se._height+=wt+ce)}}se._width=Math.ceil(Math.max(se._width+he[0],se._titleWidth+2*(ae+s.titlePad))),se._height=Math.ceil(Math.max(se._height+he[1],se._titleHeight+2*(ae+s.itemGap))),se._effHeight=Math.min(se._height,se._maxHeight);var Ie=B._context.edits,Ve=Ie.legendText||Ie.legendPosition;$.each(function(ct){var _t=v.select(this).select("."+V+"toggle"),Ct=ct[0].height,ir=ct[0].trace.legendgroup,rr=b(ct,se,re);q&&ir!==""&&(rr=Ze[ir]);var er=Ve?re:ye||rr;!ee&&!oe&&(er+=Q/2),r.setRect(_t,0,-Ct/2,er,Ct)});var Ce=le.select("."+V+"titletext");Ce.node()&&M(Ce,se,ae);var Ee=le.select("."+V+"titletoggle");if(Ee.size()&&Ce.node()){var Pe=Ce.attr("x")||0,ft=s.titlePad;r.setRect(Ee,Pe-ft,ae,se._titleWidth+2*ft,se._titleHeight+2*ft)}}function O(B,X,$,se){var le=B._fullLayout,fe=le[X],V=P(fe),Y=U(fe),ee=fe.xref==="paper",q=fe.yref==="paper";B._fullLayout._reservedMargin[X]={};var oe=fe.y<.5?"b":"t",ae=fe.x<.5?"l":"r",j={r:le.width-$,l:$+fe._width,b:le.height-se,t:se+fe._effHeight};if(ee&&q)return S.autoMargin(B,X,{x:fe.x,y:fe.y,l:fe._width*m[V],r:fe._width*p[V],b:fe._effHeight*p[Y],t:fe._effHeight*m[Y]});ee?B._fullLayout._reservedMargin[X][oe]=j[oe]:q||fe.orientation==="v"?B._fullLayout._reservedMargin[X][ae]=j[ae]:B._fullLayout._reservedMargin[X][oe]=j[oe]}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=Xe({"src/components/fx/hover.js"(Z){"use strict";var G=Hn(),v=rs(),x=Ch(),S=sa(),E=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=ou(),a=pz(),n=es(),i=$n(),s=Ap(),h=Go(),c=lh().zindexSeparator,m=so(),p=$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),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,y={box:!0,ohlc:!0,violin:!0,candlestick:!0},f={scatter:!0,scattergl:!0,splom:!0};function R(j,Q){return j.distance-Q.distance}Z.hover=function(Q,re,ce,be){Q=S.getGraphDiv(Q);var Ae=re.target;S.throttle(Q._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){L(Q,re,ce,be,Ae)})},Z.loneHover=function(Q,re){var ce=!0;Array.isArray(Q)||(ce=!1,Q=[Q]);var be=re.gd,Ae=q(be),De=oe(be),ze=Q.map(function(Oe){var tt=Oe._x0||Oe.x0||Oe.x||0,ot=Oe._x1||Oe.x1||Oe.x||0,Qe=Oe._y0||Oe.y0||Oe.y||0,Pt=Oe._y1||Oe.y1||Oe.y||0,It=Oe.eventData;if(It){var qt=Math.min(tt,ot),Wt=Math.max(tt,ot),kr=Math.min(Qe,Pt),mr=Math.max(Qe,Pt),qr=Oe.trace;if(m.traceIs(qr,"gl3d")){var Sr=be._fullLayout[qr.scene]._scene.container,Rr=Sr.offsetLeft,wt=Sr.offsetTop;qt+=Rr,Wt+=Rr,kr+=wt,mr+=wt}It.bbox={x0:qt+De,x1:Wt+De,y0:kr+Ae,y1:mr+Ae},re.inOut_bbox&&re.inOut_bbox.push(It.bbox)}else It=!1;return{color:Oe.color||i.defaultLine,x0:Oe.x0||Oe.x||0,x1:Oe.x1||Oe.x||0,y0:Oe.y0||Oe.y||0,y1:Oe.y1||Oe.y||0,xLabel:Oe.xLabel,yLabel:Oe.yLabel,zLabel:Oe.zLabel,text:Oe.text,name:Oe.name,idealAlign:Oe.idealAlign,borderColor:Oe.borderColor,fontFamily:Oe.fontFamily,fontSize:Oe.fontSize,fontColor:Oe.fontColor,fontWeight:Oe.fontWeight,fontStyle:Oe.fontStyle,fontVariant:Oe.fontVariant,nameLength:Oe.nameLength,textAlign:Oe.textAlign,trace:Oe.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Oe.hovertemplate||!1,hovertemplateLabels:Oe.hovertemplateLabels||!1,eventData:It}}),Ze=!1,at=N(ze,{gd:be,hovermode:"closest",rotateLabels:Ze,bgColor:re.bgColor||i.background,container:G.select(re.container),outerContainer:re.outerContainer||re.container}),nt=at.hoverLabels,rt=5,st=0,Me=0;nt.sort(function(Oe,tt){return Oe.y0-tt.y0}).each(function(Oe,tt){var ot=Oe.y0-Oe.by/2;ot-rt<st?Oe.offset=st-ot+rt:Oe.offset=0,st=ot+Oe.by+Oe.offset,tt===re.anchorIndex&&(Me=Oe.offset)}).each(function(Oe){Oe.offset-=Me});var ye=be._fullLayout._invScaleX,he=be._fullLayout._invScaleY;return X(nt,Ze,ye,he),ce?nt:nt.node()};function L(j,Q,re,ce,be){re||(re="xy"),typeof re=="string"&&(re=re.split(c)[0]);var Ae=Array.isArray(re)?re:[re],De,ze=j._fullLayout,Ze=ze.hoversubplots,at=ze._plots||[],nt=at[re],rt=ze._has("cartesian"),st=Q.hovermode||ze.hovermode,Me=(st||"").charAt(0)==="x",ye=(st||"").charAt(0)==="y",he,Oe;if(rt&&(Me||ye)&&Ze==="axis"){for(var tt=Ae.length,ot=0;ot<tt;ot++)if(De=Ae[ot],at[De]){he=h.getFromId(j,De,"x"),Oe=h.getFromId(j,De,"y");var Qe=(Me?he:Oe)._subplotsWith;if(Qe&&Qe.length)for(var Pt=0;Pt<Qe.length;Pt++)E(Ae,Qe[Pt])}}if(nt&&Ze!=="single"){var It=nt.overlays.map(function(cn){return cn.id});Ae=Ae.concat(It)}for(var qt=Ae.length,Wt=new Array(qt),kr=new Array(qt),mr=!1,qr=0;qr<qt;qr++)if(De=Ae[qr],at[De])mr=!0,Wt[qr]=at[De].xaxis,kr[qr]=at[De].yaxis;else if(ze[De]&&ze[De]._subplot){var Sr=ze[De]._subplot;Wt[qr]=Sr.xaxis,kr[qr]=Sr.yaxis}else{S.warn("Unrecognized subplot: "+De);return}if(st&&!mr&&(st="closest"),["x","y","closest","x unified","y unified"].indexOf(st)===-1||!j.calcdata||j.querySelector(".zoombox")||j._dragging)return s.unhoverRaw(j,Q);var Rr=ze.hoverdistance;Rr===-1&&(Rr=1/0);var wt=ze.spikedistance;wt===-1&&(wt=1/0);var Ne=[],Ke=[],Te,Ie,Ve,Ce,Ee,Pe,ft,ct,_t,Ct,ir,rr,er,Lr={hLinePoint:null,vLinePoint:null},fa=!1;if(Array.isArray(Q))for(st="array",Ve=0;Ve<Q.length;Ve++)Ee=j.calcdata[Q[Ve].curveNumber||0],Ee&&(Pe=Ee[0].trace,Ee[0].trace.hoverinfo!=="skip"&&(Ke.push(Ee),Pe.orientation==="h"&&(fa=!0)));else{var Da=j.calcdata.slice();for(Da.sort(function(cn,lo){var Wo=cn[0].trace.zorder||0,hs=lo[0].trace.zorder||0;return Wo-hs}),Ce=0;Ce<Da.length;Ce++)Ee=Da[Ce],Pe=Ee[0].trace,Pe.hoverinfo!=="skip"&&p.isTraceInSubplots(Pe,Ae)&&(Ke.push(Ee),Pe.orientation==="h"&&(fa=!0));var Ia=!be,qa,Wa;if(Ia)"xpx"in Q?qa=Q.xpx:qa=Wt[0]._length/2,"ypx"in Q?Wa=Q.ypx:Wa=kr[0]._length/2;else{if(r.triggerHandler(j,"plotly_beforehover",Q)===!1)return;var Ca=be.getBoundingClientRect();qa=Q.clientX-Ca.left,Wa=Q.clientY-Ca.top,ze._calcInverseTransform(j);var hi=S.apply3DTransform(ze._invTransform)(qa,Wa);if(qa=hi[0],Wa=hi[1],qa<0||qa>Wt[0]._length||Wa<0||Wa>kr[0]._length)return s.unhoverRaw(j,Q)}if(Q.pointerX=qa+Wt[0]._offset,Q.pointerY=Wa+kr[0]._offset,"xval"in Q?Te=p.flat(Ae,Q.xval):Te=p.p2c(Wt,qa),"yval"in Q?Ie=p.flat(Ae,Q.yval):Ie=p.p2c(kr,Wa),!v(Te[0])||!v(Ie[0]))return S.warn("Fx.hover failed",Q,j),s.unhoverRaw(j,Q)}var wi=1/0;function Kt(cn,lo){for(Ce=0;Ce<Ke.length;Ce++)if(Ee=Ke[Ce],!(!Ee||!Ee[0]||!Ee[0].trace)&&(Pe=Ee[0].trace,!(Pe.visible!==!0||Pe._length===0)&&["carpet","contourcarpet"].indexOf(Pe._module.name)===-1)){if(_t=st,p.isUnifiedHover(_t)&&(_t=_t.charAt(0)),Pe.type==="splom"?(ct=0,ft=Ae[ct]):(ft=p.getSubplot(Pe),ct=Ae.indexOf(ft)),rr={cd:Ee,trace:Pe,xa:Wt[ct],ya:kr[ct],maxHoverDistance:Rr,maxSpikeDistance:wt,index:!1,distance:Math.min(wi,Rr),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:i.defaultLine,name:Pe.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},ze[ft]&&(rr.subplot=ze[ft]._subplot),ze._splomScenes&&ze._splomScenes[Pe.uid]&&(rr.scene=ze._splomScenes[Pe.uid]),_t==="array"){var Wo=Q[Ce];"pointNumber"in Wo?(rr.index=Wo.pointNumber,_t="closest"):(_t="","xval"in Wo&&(Ct=Wo.xval,_t="x"),"yval"in Wo&&(ir=Wo.yval,_t=_t?"closest":"y"))}else cn!==void 0&&lo!==void 0?(Ct=cn,ir=lo):(Ct=Te[ct],ir=Ie[ct]);if(er=Ne.length,Rr!==0)if(Pe._module&&Pe._module.hoverPoints){var hs=Pe._module.hoverPoints(rr,Ct,ir,_t,{finiteRange:!0,hoverLayer:ze._hoverlayer,hoversubplots:Ze,gd:j});if(hs)for(var Oo,Wn=0;Wn<hs.length;Wn++)Oo=hs[Wn],v(Oo.x0)&&v(Oo.y0)&&Ne.push($(Oo,st))}else S.log("Unrecognized trace type in hover:",Pe);if(st==="closest"&&Ne.length>er&&(Ne.splice(0,er),wi=Ne[0].distance),rt&&wt!==0&&Ne.length===0){rr.distance=wt,rr.index=!1;var No=Pe._module.hoverPoints(rr,Ct,ir,"closest",{hoverLayer:ze._hoverlayer});if(No&&(No=No.filter(function(Xn){return Xn.spikeDistance<=wt})),No&&No.length){var as,Ns=No.filter(function(Xn){return Xn.xa.showspikes&&Xn.xa.spikesnap!=="hovered data"});if(Ns.length){var ss=Ns[0];v(ss.x0)&&v(ss.y0)&&(as=Yt(ss),(!Lr.vLinePoint||Lr.vLinePoint.spikeDistance>as.spikeDistance)&&(Lr.vLinePoint=as))}var uo=No.filter(function(Xn){return Xn.ya.showspikes&&Xn.ya.spikesnap!=="hovered data"});if(uo.length){var jn=uo[0];v(jn.x0)&&v(jn.y0)&&(as=Yt(jn),(!Lr.hLinePoint||Lr.hLinePoint.spikeDistance>as.spikeDistance)&&(Lr.hLinePoint=as))}}}}}Kt();function Ft(cn,lo,Wo){for(var hs=null,Oo=1/0,Wn,No=0;No<cn.length;No++)he&&he._id!==cn[No].xa._id||Oe&&Oe._id!==cn[No].ya._id||(Wn=cn[No].spikeDistance,Wo&&No===0&&(Wn=-1/0),Wn<=Oo&&Wn<=lo&&(hs=cn[No],Oo=Wn));return hs}function Yt(cn){return cn?{xa:cn.xa,ya:cn.ya,x:cn.xSpike!==void 0?cn.xSpike:(cn.x0+cn.x1)/2,y:cn.ySpike!==void 0?cn.ySpike:(cn.y0+cn.y1)/2,distance:cn.distance,spikeDistance:cn.spikeDistance,curveNumber:cn.trace.index,color:cn.color,pointNumber:cn.index}:null}var Jt={fullLayout:ze,container:ze._hoverlayer,event:Q},Fr=j._spikepoints,ta={vLinePoint:Lr.vLinePoint,hLinePoint:Lr.hLinePoint};j._spikepoints=ta;var ra=function(){var cn=Ne.filter(function(Wo){return he&&he._id===Wo.xa._id&&Oe&&Oe._id===Wo.ya._id}),lo=Ne.filter(function(Wo){return!(he&&he._id===Wo.xa._id&&Oe&&Oe._id===Wo.ya._id)});cn.sort(R),lo.sort(R),Ne=cn.concat(lo),Ne=Y(Ne,st)};ra();var ca=st.charAt(0),Ba=(ca==="x"||ca==="y")&&Ne[0]&&f[Ne[0].trace.type];if(rt&&wt!==0&&Ne.length!==0){var $a=Ne.filter(function(cn){return cn.ya.showspikes}),Za=Ft($a,wt,Ba);Lr.hLinePoint=Yt(Za);var ri=Ne.filter(function(cn){return cn.xa.showspikes}),pi=Ft(ri,wt,Ba);Lr.vLinePoint=Yt(pi)}if(Ne.length===0){var Ra=s.unhoverRaw(j,Q);return rt&&(Lr.hLinePoint!==null||Lr.vLinePoint!==null)&&fe(Fr)&&se(j,Lr,Jt),Ra}if(rt&&fe(Fr)&&se(j,Lr,Jt),p.isXYhover(_t)&&Ne[0].length!==0&&Ne[0].trace.type!=="splom"){var tn=Ne[0];y[tn.trace.type]?Ne=Ne.filter(cn=>cn.trace.index===tn.trace.index):Ne=[tn];var on=Ne.length,hn=ee("x",tn,ze),Tt=ee("y",tn,ze);Kt(hn,Tt);var ut=[],Br={},Cr=0,xr=function(cn){var lo=y[cn.trace.type]?z(cn):cn.trace.index;if(!Br[lo])Cr++,Br[lo]=Cr,ut.push(cn);else{var Wo=Br[lo]-1,hs=ut[Wo];Wo>0&&Math.abs(cn.distance)<Math.abs(hs.distance)&&(ut[Wo]=cn)}},Ir;for(Ir=0;Ir<on;Ir++)xr(Ne[Ir]);for(Ir=Ne.length-1;Ir>on-1;Ir--)xr(Ne[Ir]);Ne=ut,ra()}var Ur=j._hoverdata,Hr=[],xt=q(j),Xt=oe(j);for(let cn of Ne){var vr=p.makeEventData(cn,cn.trace,cn.cd);if(cn.hovertemplate!==!1){var Or=!1;cn.cd[cn.index]&&cn.cd[cn.index].ht&&(Or=cn.cd[cn.index].ht),cn.hovertemplate=Or||cn.trace.hovertemplate||!1}if(cn.xa&&cn.ya){var ba=cn.x0+cn.xa._offset,Pa=cn.x1+cn.xa._offset,ya=cn.y0+cn.ya._offset,la=cn.y1+cn.ya._offset,Ta=Math.min(ba,Pa),Ai=Math.max(ba,Pa),ki=Math.min(ya,la),Ki=Math.max(ya,la);vr.bbox={x0:Ta+Xt,x1:Ai+Xt,y0:ki+xt,y1:Ki+xt}}cn.eventData=[vr],Hr.push(vr)}j._hoverdata=Hr;var _n=st==="y"&&(Ke.length>1||Ne.length>1)||st==="closest"&&fa&&Ne.length>1,Rn=i.combine(ze.plot_bgcolor||i.background,ze.paper_bgcolor),En=N(Ne,{gd:j,hovermode:st,rotateLabels:_n,bgColor:Rn,container:ze._hoverlayer,outerContainer:ze._paper.node(),commonLabelOpts:ze.hoverlabel,hoverdistance:ze.hoverdistance}),On=En.hoverLabels;if(p.isUnifiedHover(st)||(P(On,_n,ze,En.commonLabelBoundingBox),X(On,_n,ze._invScaleX,ze._invScaleY)),be&&be.tagName){var no=m.getComponentMethod("annotations","hasClickToShow")(j,Hr);a(G.select(be),no?"pointer":"")}!be||ce||!le(j,Q,Ur)||(Ur&&j.emit("plotly_unhover",{event:Q,points:Ur}),j.emit("plotly_hover",{event:Q,points:j._hoverdata,xaxes:Wt,yaxes:kr,xvals:Te,yvals:Ie}))}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,ce=re._fullLayout,be=Q.hovermode,Ae=Q.rotateLabels,De=Q.bgColor,ze=Q.container,Ze=Q.outerContainer,at=Q.commonLabelOpts||{};if(j.length===0)return[[]];var nt=Q.fontFamily||T.HOVERFONT,rt=Q.fontSize||T.HOVERFONTSIZE,st=Q.fontWeight||ce.font.weight,Me=Q.fontStyle||ce.font.style,ye=Q.fontVariant||ce.font.variant,he=Q.fontTextcase||ce.font.textcase,Oe=Q.fontLineposition||ce.font.lineposition,tt=Q.fontShadow||ce.font.shadow,ot=j[0],Qe=ot.xa,Pt=ot.ya,It=be.charAt(0),qt=It+"Label",Wt=ot[qt];if(Wt===void 0&&Qe.type==="multicategory")for(var kr=0;kr<j.length&&(Wt=j[kr][qt],Wt===void 0);kr++);var mr=ae(re,Ze),qr=mr.top,Sr=mr.width,Rr=mr.height,wt=Wt!==void 0&&ot.distance<=Q.hoverdistance&&(be==="x"||be==="y");if(wt){var Ne=!0,Ke,Te;for(Ke=0;Ke<j.length;Ke++)if(Ne&&j[Ke].zLabel===void 0&&(Ne=!1),Te=j[Ke].hoverinfo||j[Ke].trace.hoverinfo,Te){var Ie=Array.isArray(Te)?Te:Te.split("+");if(Ie.indexOf("all")===-1&&Ie.indexOf(be)===-1){wt=!1;break}}Ne&&(wt=!1)}var Ve=ze.selectAll("g.axistext").data(wt?[0]:[]);Ve.enter().append("g").classed("axistext",!0),Ve.exit().remove();var Ce={minX:0,maxX:0,minY:0,maxY:0};if(Ve.each(function(){var Ra=G.select(this),tn=S.ensureSingle(Ra,"path","",function(Ki){Ki.style({"stroke-width":"1px"})}),on=S.ensureSingle(Ra,"text","",function(Ki){Ki.attr("data-notex",1)}),hn=at.bgcolor||i.defaultLine,Tt=at.bordercolor||i.contrast(hn),ut=i.contrast(hn),Br=at.font,Cr={weight:Br.weight||st,style:Br.style||Me,variant:Br.variant||ye,textcase:Br.textcase||he,lineposition:Br.lineposition||Oe,shadow:Br.shadow||tt,family:Br.family||nt,size:Br.size||rt,color:Br.color||ut};tn.style({fill:hn,stroke:Tt}),on.text(Wt).call(n.font,Cr).call(o.positionText,0,0).call(o.convertToTspans,re),Ra.attr("transform","");var xr=ae(re,on.node()),Ir,Ur;if(be==="x"){var Hr=Qe.side==="top"?"-":"";on.attr("text-anchor","middle").call(o.positionText,0,Qe.side==="top"?qr-xr.bottom-d-u:qr-xr.top+d+u),Ir=Qe._offset+(ot.x0+ot.x1)/2,Ur=Pt._offset+(Qe.side==="top"?0:Pt._length);var xt=xr.width/2+u,Xt=Ir;Ir<xt?Xt=xt:Ir>ce.width-xt&&(Xt=ce.width-xt),tn.attr("d","M"+(Ir-Xt)+",0L"+(Ir-Xt+d)+","+Hr+d+"H"+xt+"v"+Hr+(u*2+xr.height)+"H"+-xt+"V"+Hr+d+"H"+(Ir-Xt-d)+"Z"),Ir=Xt,Ce.minX=Ir-xt,Ce.maxX=Ir+xt,Qe.side==="top"?(Ce.minY=Ur-(u*2+xr.height),Ce.maxY=Ur-u):(Ce.minY=Ur+u,Ce.maxY=Ur+(u*2+xr.height))}else{var vr,Or,ba;Pt.side==="right"?(vr="start",Or=1,ba="",Ir=Qe._offset+Qe._length):(vr="end",Or=-1,ba="-",Ir=Qe._offset),Ur=Pt._offset+(ot.y0+ot.y1)/2,on.attr("text-anchor",vr),tn.attr("d","M0,0L"+ba+d+","+d+"V"+(u+xr.height/2)+"h"+ba+(u*2+xr.width)+"V-"+(u+xr.height/2)+"H"+ba+d+"V-"+d+"Z"),Ce.minY=Ur-(u+xr.height/2),Ce.maxY=Ur+(u+xr.height/2),Pt.side==="right"?(Ce.minX=Ir+d,Ce.maxX=Ir+d+(u*2+xr.width)):(Ce.minX=Ir-d-(u*2+xr.width),Ce.maxX=Ir-d);var Pa=xr.height/2,ya=qr-xr.top-Pa,la="clip"+ce._uid+"commonlabel"+Pt._id,Ta;if(Ir<xr.width+2*u+d){Ta="M-"+(d+u)+"-"+Pa+"h-"+(xr.width-u)+"V"+Pa+"h"+(xr.width-u)+"Z";var Ai=xr.width-Ir+u;o.positionText(on,Ai,ya),vr==="end"&&on.selectAll("tspan").each(function(){var Ki=G.select(this),_n=n.tester.append("text").text(Ki.text()).call(n.font,Cr),Rn=ae(re,_n.node());Math.round(Rn.width)<Math.round(xr.width)&&Ki.attr("x",Ai-Rn.width),_n.remove()})}else o.positionText(on,Or*(u+d),ya),Ta=null;var ki=ce._topclips.selectAll("#"+la).data(Ta?[0]:[]);ki.enter().append("clipPath").attr("id",la).append("path"),ki.exit().remove(),ki.select("path").attr("d",Ta),n.setClipUrl(on,Ta?la:null,re)}Ra.attr("transform",e(Ir,Ur))}),p.isUnifiedHover(be)){ze.selectAll("g.hovertext").remove();let Ra=j.filter(tn=>tn.hoverinfo!=="none");if(Ra.length===0)return[];var Ee=ce.hoverlabel,Pe=Ee.font,ft=Ra[0],ct=((be==="x unified"?ft.xa:ft.ya).unifiedhovertitle||{}).text,_t=ct?S.hovertemplateString({data:be==="x unified"?[{xa:ft.xa,x:ft.xVal}]:[{ya:ft.ya,y:ft.yVal}],fallback:ft.trace.hovertemplatefallback,locale:ce._d3locale,template:ct}):Wt,Ct={showlegend:!0,legend:{title:{text:_t,font:Pe},font:Pe,bgcolor:Ee.bgcolor,bordercolor:Ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ce.legend?ce.legend.traceorder:void 0,orientation:"v"}},ir={font:Pe};l(Ct,ir,re._fullData);var rr=ir.legend;rr.entries=[];for(var er=0;er<Ra.length;er++){var Lr=Ra[er];if(Lr.hoverinfo!=="none"){var fa=O(Lr,!0,be,ce,Wt),Da=fa[0],Ia=fa[1];Lr.name=Ia,Ia!==""?Lr.text=Ia+" : "+Da:Lr.text=Da;var qa=Lr.cd[Lr.index];qa&&(qa.mc&&(Lr.mc=qa.mc),qa.mcc&&(Lr.mc=qa.mcc),qa.mlc&&(Lr.mlc=qa.mlc),qa.mlcc&&(Lr.mlc=qa.mlcc),qa.mlw&&(Lr.mlw=qa.mlw),qa.mrc&&(Lr.mrc=qa.mrc),qa.dir&&(Lr.dir=qa.dir)),Lr._distinct=!0,rr.entries.push([Lr])}}rr.entries.sort(function(tn,on){return tn[0].trace.index-on[0].trace.index}),rr.layer=ze,rr._inHover=!0,rr._groupTitleFont=Ee.grouptitlefont,_(re,rr);var Wa=ze.select("g.legend"),Ca=ae(re,Wa.node()),hi=Ca.width+2*u,wi=Ca.height+2*u,Kt=Ra[0],Ft=(Kt.x0+Kt.x1)/2,Yt=(Kt.y0+Kt.y1)/2,Jt=!(m.traceIs(Kt.trace,"bar-like")||m.traceIs(Kt.trace,"box-violin")),Fr,ta;It==="y"?Jt?(ta=Yt-u,Fr=Yt+u):(ta=Math.min.apply(null,Ra.map(function(tn){return Math.min(tn.y0,tn.y1)})),Fr=Math.max.apply(null,Ra.map(function(tn){return Math.max(tn.y0,tn.y1)}))):ta=Fr=S.mean(Ra.map(function(tn){return(tn.y0+tn.y1)/2}))-wi/2;var ra,ca;It==="x"?Jt?(ra=Ft+u,ca=Ft-u):(ra=Math.max.apply(null,Ra.map(function(tn){return Math.max(tn.x0,tn.x1)})),ca=Math.min.apply(null,Ra.map(function(tn){return Math.min(tn.x0,tn.x1)}))):ra=ca=S.mean(Ra.map(function(tn){return(tn.x0+tn.x1)/2}))-hi/2;var Ba=Qe._offset,$a=Pt._offset;Fr+=$a,ra+=Ba,ca+=Ba-hi,ta+=$a-wi;var Za,ri;return ra+hi<Sr&&ra>=0?Za=ra:ca+hi<Sr&&ca>=0?Za=ca:Ba+hi<Sr?Za=Ba:ra-Ft<Ft-ca+hi?Za=Sr-hi:Za=0,Za+=u,Fr+wi<Rr&&Fr>=0?ri=Fr:ta+wi<Rr&&ta>=0?ri=ta:$a+wi<Rr?ri=$a:Fr-Yt<Yt-ta+wi?ri=Rr-wi:ri=0,ri+=u,Wa.attr("transform",e(Za-1,ri-1)),Wa}var pi=ze.selectAll("g.hovertext").data(j,function(Ra){return z(Ra)});return pi.enter().append("g").classed("hovertext",!0).each(function(){var Ra=G.select(this);Ra.append("rect").call(i.fill,i.addOpacity(De,.8)),Ra.append("text").classed("name",!0),Ra.append("path").style("stroke-width","1px"),Ra.append("text").classed("nums",!0).call(n.font,{weight:st,style:Me,variant:ye,textcase:he,lineposition:Oe,shadow:tt,family:nt,size:rt})}),pi.exit().remove(),pi.each(function(Ra){var tn=G.select(this).attr("transform",""),on=Ra.color;Array.isArray(on)&&(on=on[Ra.eventData[0].pointNumber]);var hn=Ra.bgcolor||on,Tt=i.combine(i.opacity(hn)?hn:i.defaultLine,De),ut=i.combine(i.opacity(on)?on:i.defaultLine,De),Br=Ra.borderColor||i.contrast(Tt),Cr=O(Ra,wt,be,ce,Wt,tn),xr=Cr[0],Ir=Cr[1],Ur=tn.select("text.nums").call(n.font,{family:Ra.fontFamily||nt,size:Ra.fontSize||rt,color:Ra.fontColor||Br,weight:Ra.fontWeight||st,style:Ra.fontStyle||Me,variant:Ra.fontVariant||ye,textcase:Ra.fontTextcase||he,lineposition:Ra.fontLineposition||Oe,shadow:Ra.fontShadow||tt}).text(xr).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re),Hr=tn.select("text.name"),xt=0,Xt=0;if(Ir&&Ir!==xr){Hr.call(n.font,{family:Ra.fontFamily||nt,size:Ra.fontSize||rt,color:ut,weight:Ra.fontWeight||st,style:Ra.fontStyle||Me,variant:Ra.fontVariant||ye,textcase:Ra.fontTextcase||he,lineposition:Ra.fontLineposition||Oe,shadow:Ra.fontShadow||tt}).text(Ir).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re);var vr=ae(re,Hr.node());xt=vr.width+2*u,Xt=vr.height+2*u}else Hr.remove(),tn.select("rect").remove();tn.select("path").style({fill:Tt,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),ya=Math.abs(Ra.y1-Ra.y0),la=ae(re,Ur.node()),Ta=la.width/ce._invScaleX,Ai=la.height/ce._invScaleY;Ra.ty0=(qr-la.top)/ce._invScaleY,Ra.bx=Ta+2*u,Ra.by=Math.max(Ai+2*u,Xt),Ra.anchor="start",Ra.txwidth=Ta,Ra.tx2width=xt,Ra.offset=0;var ki=(Ta+d+u+xt)*ce._invScaleX,Ki,_n;if(Ae)Ra.pos=Or,Ki=ba+ya/2+ki<=Rr,_n=ba-ya/2-ki>=0,(Ra.idealAlign==="top"||!Ki)&&_n?(ba-=ya/2,Ra.anchor="end"):Ki?(ba+=ya/2,Ra.anchor="start"):Ra.anchor="middle",Ra.crossPos=ba;else{if(Ra.pos=ba,Ki=Or+Pa/2+ki<=Sr,_n=Or-Pa/2-ki>=0,(Ra.idealAlign==="left"||!Ki)&&_n)Or-=Pa/2,Ra.anchor="end";else if(Ki)Or+=Pa/2,Ra.anchor="start";else{Ra.anchor="middle";var Rn=ki/2,En=Or+Rn-Sr,On=Or-Rn;En>0&&(Or-=En),On<0&&(Or+=-On)}Ra.crossPos=Or}Ur.attr("text-anchor",Ra.anchor),xt&&Hr.attr("text-anchor",Ra.anchor),tn.attr("transform",e(Or,ba)+(Ae?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ce}}function O(j,Q,re,ce,be,Ae){var De,ze,Ze="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),Ze=V(j.name,j.nameLength));var nt=re.charAt(0),rt=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"]===be?at=j[rt+"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),Ae&&at===""&&!j.hovertemplate&&(Ze===""&&Ae.remove(),at=Ze),(ze=(De=j.trace)==null?void 0:De.hoverlabel)!=null&&ze.split&&(j.hovertemplate="");let{hovertemplate:st=!1}=j;if(st){let Me=j.hovertemplateLabels||j;j[nt+"Label"]!==be&&(Me[nt+"other"]=Me[nt+"Val"],Me[nt+"otherLabel"]=Me[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:Me,locale:ce._d3locale,template:st}),at=at.replace(F,(ye,he)=>(Ze=V(he,j.nameLength),""))}return[at,Ze]}function P(j,Q,re,ce){var be=Q?"xa":"ya",Ae=Q?"ya":"xa",De=0,ze=1,Ze=j.size(),at=new Array(Ze),nt=0,rt=ce.minX,st=ce.maxX,Me=ce.minY,ye=ce.maxY,he=function(Te){return Te*re._invScaleX},Oe=function(Te){return Te*re._invScaleY};j.each(function(Te){var Ie=Te[be],Ve=Te[Ae],Ce=Ie._id.charAt(0)==="x",Ee=Ie.range;nt===0&&Ee&&Ee[0]>Ee[1]!==Ce&&(ze=-1);var Pe=0,ft=Ce?re.width:re.height;if(re.hovermode==="x"||re.hovermode==="y"){var ct=U(Te,Q),_t=Te.anchor,Ct=_t==="end"?-1:1,ir,rr;if(_t==="middle")ir=Te.crossPos+(Ce?Oe(ct.y-Te.by/2):he(Te.bx/2+Te.tx2width/2)),rr=ir+(Ce?Oe(Te.by):he(Te.bx));else if(Ce)ir=Te.crossPos+Oe(d+ct.y)-Oe(Te.by/2-d),rr=ir+Oe(Te.by);else{var er=he(Ct*d+ct.x),Lr=er+he(Ct*Te.bx);ir=Te.crossPos+Math.min(er,Lr),rr=Te.crossPos+Math.max(er,Lr)}Ce?Me!==void 0&&ye!==void 0&&Math.min(rr,ye)-Math.max(ir,Me)>1&&(Ve.side==="left"?(Pe=Ve._mainLinePosition,ft=re.width):ft=Ve._mainLinePosition):rt!==void 0&&st!==void 0&&Math.min(rr,st)-Math.max(ir,rt)>1&&(Ve.side==="top"?(Pe=Ve._mainLinePosition,ft=re.height):ft=Ve._mainLinePosition)}at[nt++]=[{datum:Te,traceIndex:Te.trace.index,dp:0,pos:Te.pos,posref:Te.posref,size:Te.by*(Ce?M:1)/2,pmin:Pe,pmax:ft}]}),at.sort(function(Te,Ie){return Te[0].posref-Ie[0].posref||ze*(Ie[0].traceIndex-Te[0].traceIndex)});var tt,ot,Qe,Pt,It,qt,Wt;function kr(Te){var Ie=Te[0],Ve=Te[Te.length-1];if(ot=Ie.pmin-Ie.pos-Ie.dp+Ie.size,Qe=Ve.pos+Ve.dp+Ve.size-Ie.pmax,ot>.01){for(It=Te.length-1;It>=0;It--)Te[It].dp+=ot;tt=!1}if(!(Qe<.01)){if(ot<-.01){for(It=Te.length-1;It>=0;It--)Te[It].dp-=Qe;tt=!1}if(tt){var Ce=0;for(Pt=0;Pt<Te.length;Pt++)qt=Te[Pt],qt.pos+qt.dp+qt.size>Ie.pmax&&Ce++;for(Pt=Te.length-1;Pt>=0&&!(Ce<=0);Pt--)qt=Te[Pt],qt.pos>Ie.pmax-1&&(qt.del=!0,Ce--);for(Pt=0;Pt<Te.length&&!(Ce<=0);Pt++)if(qt=Te[Pt],qt.pos<Ie.pmin+1)for(qt.del=!0,Ce--,Qe=qt.size*2,It=Te.length-1;It>=0;It--)Te[It].dp-=Qe;for(Pt=Te.length-1;Pt>=0&&!(Ce<=0);Pt--)qt=Te[Pt],qt.pos+qt.dp+qt.size>Ie.pmax&&(qt.del=!0,Ce--)}}}for(;!tt&&De<=Ze;){for(De++,tt=!0,Pt=0;Pt<at.length-1;){var mr=at[Pt],qr=at[Pt+1],Sr=mr[mr.length-1],Rr=qr[0];if(ot=Sr.pos+Sr.dp+Sr.size-Rr.pos-Rr.dp+Rr.size,ot>.01){for(It=qr.length-1;It>=0;It--)qr[It].dp+=ot;for(mr.push.apply(mr,qr),at.splice(Pt+1,1),Wt=0,It=mr.length-1;It>=0;It--)Wt+=mr[It].dp;for(Qe=Wt/mr.length,It=mr.length-1;It>=0;It--)mr[It].dp-=Qe;tt=!1}else Pt++}at.forEach(kr)}for(Pt=at.length-1;Pt>=0;Pt--){var wt=at[Pt];for(It=wt.length-1;It>=0;It--){var Ne=wt[It],Ke=Ne.datum;Ke.offset=Ne.dp,Ke.del=Ne.del}}}function U(j,Q){var re=0,ce=j.offset;return Q&&(ce*=-b,re=j.offset*g),{x:re,y:ce}}function B(j){var Q={start:1,end:-1,middle:0}[j.anchor],re=Q*(d+u),ce=re+Q*(j.txwidth+u),be=j.anchor==="middle";return be&&(re-=j.tx2width/2,ce+=j.txwidth/2+u),{alignShift:Q,textShiftX:re,text2ShiftX:ce}}function X(j,Q,re,ce){var be=function(De){return De*re},Ae=function(De){return De*ce};j.each(function(De){var ze=G.select(this);if(De.del)return ze.remove();var Ze=ze.select("text.nums"),at=De.anchor,nt=at==="end"?-1:1,rt=B(De),st=U(De,Q),Me=st.x,ye=st.y,he=at==="middle",Oe="hoverlabel"in De.trace?De.trace.hoverlabel.showarrow:!0,tt;he?tt="M-"+be(De.bx/2+De.tx2width/2)+","+Ae(ye-De.by/2)+"h"+be(De.bx)+"v"+Ae(De.by)+"h-"+be(De.bx)+"Z":Oe?tt="M0,0L"+be(nt*d+Me)+","+Ae(d+ye)+"v"+Ae(De.by/2-d)+"h"+be(nt*De.bx)+"v-"+Ae(De.by)+"H"+be(nt*d+Me)+"V"+Ae(ye-d)+"Z":tt="M"+be(nt*d+Me)+","+Ae(ye-De.by/2)+"h"+be(nt*De.bx)+"v"+Ae(De.by)+"h"+be(-nt*De.bx)+"Z",ze.select("path").attr("d",tt);var ot=Me+rt.textShiftX,Qe=ye+De.ty0-De.by/2+u,Pt=De.textAlign||"auto";Pt!=="auto"&&(Pt==="left"&&at!=="start"?(Ze.attr("text-anchor","start"),ot=he?-De.bx/2-De.tx2width/2+u:-De.bx-u):Pt==="right"&&at!=="end"&&(Ze.attr("text-anchor","end"),ot=he?De.bx/2-De.tx2width/2-u:De.bx+u)),Ze.call(o.positionText,be(ot),Ae(Qe)),De.tx2width&&(ze.select("text.name").call(o.positionText,be(rt.text2ShiftX+rt.alignShift*u+Me),Ae(ye+De.ty0-De.by/2+u)),ze.select("rect").call(n.setRect,be(rt.text2ShiftX+(rt.alignShift-1)*De.tx2width/2+Me),Ae(ye-De.by/2-1),be(De.tx2width),Ae(De.by+2)))})}function $(j,Q){var re=j.index,ce=j.trace||{},be=j.cd[0],Ae=j.cd[re]||{};function De(st){return st||v(st)&&st===0}var ze=Array.isArray(re)?function(st,Me){var ye=S.castOption(be,re,st);return De(ye)?ye:S.extractOption({},ce,"",Me)}:function(st,Me){return S.extractOption(Ae,ce,st,Me)};function Ze(st,Me,ye){var he=ze(Me,ye);De(he)&&(j[st]=he)}if(Ze("hoverinfo","hi","hoverinfo"),Ze("bgcolor","hbg","hoverlabel.bgcolor"),Ze("borderColor","hbc","hoverlabel.bordercolor"),Ze("fontFamily","htf","hoverlabel.font.family"),Ze("fontSize","hts","hoverlabel.font.size"),Ze("fontColor","htc","hoverlabel.font.color"),Ze("fontWeight","htw","hoverlabel.font.weight"),Ze("fontStyle","hty","hoverlabel.font.style"),Ze("fontVariant","htv","hoverlabel.font.variant"),Ze("nameLength","hnl","hoverlabel.namelength"),Ze("textAlign","hta","hoverlabel.align"),j.posref=Q==="y"||Q==="closest"&&ce.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,ce.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,ce.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 rt=j.hoverinfo||j.trace.hoverinfo;return rt&&rt!=="all"&&(rt=Array.isArray(rt)?rt:rt.split("+"),rt.indexOf("x")===-1&&(j.xLabel=void 0),rt.indexOf("y")===-1&&(j.yLabel=void 0),rt.indexOf("z")===-1&&(j.zLabel=void 0),rt.indexOf("text")===-1&&(j.text=void 0),rt.indexOf("name")===-1&&(j.name=void 0)),j}function se(j,Q,re){var ce=re.container,be=re.fullLayout,Ae=be._size,De=re.event,ze=!!Q.hLinePoint,Ze=!!Q.vLinePoint,at,nt;if(ce.selectAll(".spikeline").remove(),!!(Ze||ze)){var rt=i.combine(be.plot_bgcolor,be.paper_bgcolor);if(ze){var st=Q.hLinePoint,Me,ye;at=st&&st.xa,nt=st&&st.ya;var he=nt.spikesnap;he==="cursor"?(Me=De.pointerX,ye=De.pointerY):(Me=at._offset+st.x,ye=nt._offset+st.y);var Oe=x.readability(st.color,rt)<1.5?i.contrast(rt):st.color,tt=nt.spikemode,ot=nt.spikethickness,Qe=nt.spikecolor||Oe,Pt=h.getPxPosition(j,nt),It,qt;if(tt.indexOf("toaxis")!==-1||tt.indexOf("across")!==-1){if(tt.indexOf("toaxis")!==-1&&(It=Pt,qt=Me),tt.indexOf("across")!==-1){var Wt=nt._counterDomainMin,kr=nt._counterDomainMax;nt.anchor==="free"&&(Wt=Math.min(Wt,nt.position),kr=Math.max(kr,nt.position)),It=Ae.l+Wt*Ae.w,qt=Ae.l+kr*Ae.w}ce.insert("line",":first-child").attr({x1:It,x2:qt,y1:ye,y2:ye,"stroke-width":ot,stroke:Qe,"stroke-dasharray":n.dashStyle(nt.spikedash,ot)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:It,x2:qt,y1:ye,y2:ye,"stroke-width":ot+2,stroke:rt}).classed("spikeline",!0).classed("crisp",!0)}tt.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Pt+(nt.side!=="right"?ot:-ot),cy:ye,r:ot,fill:Qe}).classed("spikeline",!0)}if(Ze){var mr=Q.vLinePoint,qr,Sr;at=mr&&mr.xa,nt=mr&&mr.ya;var Rr=at.spikesnap;Rr==="cursor"?(qr=De.pointerX,Sr=De.pointerY):(qr=at._offset+mr.x,Sr=nt._offset+mr.y);var wt=x.readability(mr.color,rt)<1.5?i.contrast(rt):mr.color,Ne=at.spikemode,Ke=at.spikethickness,Te=at.spikecolor||wt,Ie=h.getPxPosition(j,at),Ve,Ce;if(Ne.indexOf("toaxis")!==-1||Ne.indexOf("across")!==-1){if(Ne.indexOf("toaxis")!==-1&&(Ve=Ie,Ce=Sr),Ne.indexOf("across")!==-1){var Ee=at._counterDomainMin,Pe=at._counterDomainMax;at.anchor==="free"&&(Ee=Math.min(Ee,at.position),Pe=Math.max(Pe,at.position)),Ve=Ae.t+(1-Pe)*Ae.h,Ce=Ae.t+(1-Ee)*Ae.h}ce.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ve,y2:Ce,"stroke-width":Ke,stroke:Te,"stroke-dasharray":n.dashStyle(at.spikedash,Ke)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ve,y2:Ce,"stroke-width":Ke+2,stroke:rt}).classed("spikeline",!0).classed("crisp",!0)}Ne.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:qr,cy:Ie-(at.side!=="top"?Ke:-Ke),r:Ke,fill:Te}).classed("spikeline",!0)}}}function le(j,Q,re){if(!re||re.length!==j._hoverdata.length)return!0;for(var ce=re.length-1;ce>=0;ce--){var be=re[ce],Ae=j._hoverdata[ce];if(be.curveNumber!==Ae.curveNumber||String(be.pointNumber)!==String(Ae.pointNumber)||String(be.pointNumbers)!==String(Ae.pointNumbers)||be.binNumber!==Ae.binNumber)return!0}return!1}function fe(j,Q){return!Q||Q.vLinePoint!==j._spikepoints.vLinePoint||Q.hLinePoint!==j._spikepoints.hLinePoint}function V(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),ce=[],be=[],Ae=[],De=0;De<j.length;De++){var ze=j[De];m.traceIs(ze.trace,"bar-like")||m.traceIs(ze.trace,"box-violin")?Ae.push(ze):ze.trace[re+"period"]?be.push(ze):ce.push(ze)}return ce.concat(be).concat(Ae)}function ee(j,Q,re){var ce=Q[j+"a"],be=Q[j+"Val"],Ae=Q.cd[0];if(ce.type==="category"||ce.type==="multicategory")be=ce._categoriesMap[be];else if(ce.type==="date"){var De=Q.trace[j+"periodalignment"];if(De){var ze=Q.cd[Q.index],Ze=ze[j+"Start"];Ze===void 0&&(Ze=ze[j]);var at=ze[j+"End"];at===void 0&&(at=ze[j]);var nt=at-Ze;De==="end"?be+=nt:De==="middle"&&(be+=nt/2)}be=ce.d2c(be)}return Ae&&Ae.t&&Ae.t.posLetter===ce._id&&(re.boxmode==="group"||re.violinmode==="group")&&(be+=Ae.t.dPos),be}var q=j=>j.offsetTop+j.clientTop,oe=j=>j.offsetLeft+j.clientLeft;function ae(j,Q){var re=j._fullLayout,ce=Q.getBoundingClientRect(),be=ce.left,Ae=ce.top,De=be+ce.width,ze=Ae+ce.height,Ze=S.apply3DTransform(re._invTransform)(be,Ae),at=S.apply3DTransform(re._invTransform)(De,ze),nt=Ze[0],rt=Ze[1],st=at[0],Me=at[1];return{x:nt,y:rt,width:st-nt,height:Me-rt,top:Math.min(rt,Me),left:Math.min(nt,st),right:Math.max(nt,st),bottom:Math.max(rt,Me)}}}}),k_=Xe({"src/components/fx/hoverlabel_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=$p().isUnifiedHover;G.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),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=Xe({"src/components/fx/layout_global_defaults.js"(Z,G){"use strict";var v=sa(),x=k_(),S=Zm();G.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}x(e,t,r)}}}),gz=Xe({"src/components/fx/defaults.js"(Z,G){"use strict";var v=sa(),x=Ky(),S=k_();G.exports=function(e,t,r,o){function a(i,s){return v.coerce(e,t,x,i,s)}var n=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(n.namelength=-1),S(e,t,a,n)}}}),x5=Xe({"src/components/fx/hovermode_defaults.js"(Z,G){"use strict";var v=sa(),x=Zm();G.exports=function(E,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(E,e,x,r,o)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}}),yz=Xe({"src/components/fx/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=Zm(),S=x5(),E=k_();G.exports=function(t,r){function o(m,p){return v.coerce(t,r,x,m,p)}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"),c=r._basePlotModules.length;r.dragmode==="zoom"&&((i||s||h)&&c===1||(i||s)&&h&&c===2)&&(r.dragmode="pan"),E(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=Xe({"src/components/fx/calc.js"(Z,G){"use strict";var v=sa(),x=so();G.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(c){return v.coerceHoverinfo({hoverinfo:c},{_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:v.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||v.identity,Array.isArray(E)&&(e[0][t]=r(E))}}}),xz=Xe({"src/components/fx/click.js"(Z,G){"use strict";var v=so(),x=_5().hover;G.exports=function(E,e,t){var r=v.getComponentMethod("annotations","onClick")(E,E._hoverdata);t!==void 0&&x(E,e,t,!0);function o(){E.emit("plotly_click",{points:E._hoverdata,event:e})}E._hoverdata&&e&&e.target&&(r&&r.then?r.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}}}),rf=Xe({"src/components/fx/index.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=Ap(),E=$p(),e=Zm(),t=_5();G.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:v.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(c){return x.coerceHoverinfo({hoverinfo:c},{_module:n._module},i)}return x.castOption(n,s,"hoverinfo",h)}}}),Jd=Xe({"src/components/dragelement/helpers.js"(Z){"use strict";Z.selectMode=function(G){return G==="lasso"||G==="select"},Z.drawMode=function(G){return G==="drawclosedpath"||G==="drawopenpath"||G==="drawline"||G==="drawrect"||G==="drawcircle"},Z.openMode=function(G){return G==="drawline"||G==="drawopenpath"},Z.rectMode=function(G){return G==="select"||G==="drawline"||G==="drawrect"||G==="drawcircle"},Z.freeMode=function(G){return G==="lasso"||G==="drawclosedpath"||G==="drawopenpath"},Z.selectingOrDrawing=function(G){return Z.freeMode(G)||Z.rectMode(G)}}}),C_=Xe({"src/lib/clear_gl_canvases.js"(Z,G){"use strict";G.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=Xe({"src/fonts/ploticon.js"(Z,G){"use strict";G.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=Xe({"src/components/shapes/draw_newshape/constants.js"(Z,G){"use strict";var v=32;G.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=Xe({"src/components/selections/helpers.js"(Z,G){"use strict";var v=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 v(t.xaxis._offset,t.yaxis._offset)}G.exports={p2r:x,r2p:S,axValue:E,getTransform:e}}}),r0=Xe({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var G=M_(),v=T2(),x=v.CIRCLE_SIDES,S=v.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="",c=0;c<s;c++)for(var m=i[c].length,p=0;p<m;p++){var T=i[c][p][0];if(T==="Z")h+="Z";else for(var l=i[c][p].length,_=0;_<l;_++){var w=_;T==="Q"||T==="S"?w=o[_]:T==="C"&&(w=r[_]),h+=i[c][p][w],_>0&&_<l-1&&(h+=",")}}return h},Z.readPaths=function(i,s,h,c){var m=G(i),p=[],T=-1,l=function(){T++,p[T]=[]},_,w=0,A=0,M,g,b=function(){M=w,g=A};b();for(var d=0;d<m.length;d++){var u=[],y,f,R,L,z=m[d][0],F=z;switch(z){case"M":l(),w=+m[d][1],A=+m[d][2],u.push([F,w,A]),b();break;case"Q":case"S":y=+m[d][1],R=+m[d][2],w=+m[d][3],A=+m[d][4],u.push([F,w,A,y,R]);break;case"C":y=+m[d][1],R=+m[d][2],f=+m[d][3],L=+m[d][4],w=+m[d][5],A=+m[d][6],u.push([F,w,A,y,R,f,L]);break;case"T":case"L":w=+m[d][1],A=+m[d][2],u.push([F,w,A]);break;case"H":F="L",w=+m[d][1],u.push([F,w,A]);break;case"V":F="L",A=+m[d][1],u.push([F,w,A]);break;case"A":F="L";var N=+m[d][1],O=+m[d][2];+m[d][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,se=h&&h.xsizemode==="pixel",le=h&&h.ysizemode==="pixel",fe=c===!1,V=0;V<u.length;V++){for(_=0;_+2<7;_+=2){var Y=u[V][_+1],ee=u[V][_+2];Y===void 0||ee===void 0||(w=Y,A=ee,h&&(h.xaxis&&h.xaxis.p2r?(fe&&(Y-=h.xaxis._offset),se?Y=t(h.xaxis,h.xanchor)+Y:Y=e(h.xaxis,Y)):(fe&&(Y-=$.l),X?Y=X.x[0]+Y/$.w:Y=Y/$.w),h.yaxis&&h.yaxis.p2r?(fe&&(ee-=h.yaxis._offset),le?ee=t(h.yaxis,h.yanchor)-ee:ee=e(h.yaxis,ee)):(fe&&(ee-=$.t),X?ee=X.y[1]-ee/$.h:ee=1-ee/$.h)),u[V][_+1]=Y,u[V][_+2]=ee)}p[T].push(u[V].slice())}}return p};function a(i,s){return Math.abs(i-s)<=1e-6}function n(i,s){var h=s[1]-i[1],c=s[2]-i[2];return Math.sqrt(h*h+c*c)}Z.pointsOnRectangle=function(i){var s=i.length;if(s!==5)return!1;for(var h=1;h<3;h++){var c=i[0][h]-i[1][h],m=i[3][h]-i[2][h];if(!a(c,m))return!1;var p=i[0][h]-i[3][h],T=i[1][h]-i[2][h];if(!a(p,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 c=(s*2-h)%s,m=(s/2+c)%s,p=(s/2+h)%s;if(!a(n(i[h],i[p]),n(i[c],i[m])))return!1}return!0},Z.handleEllipse=function(i,s,h){if(!i)return[s,h];var c=Z.ellipseOver({x0:s[0],y0:s[1],x1:h[0],y1:h[1]}),m=(c.x1+c.x0)/2,p=(c.y1+c.y0)/2,T=(c.x1-c.x0)/2,l=(c.y1-c.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([m+T*Math.cos(A),p+l*Math.sin(A)])}return _},Z.ellipseOver=function(i){var s=i.x0,h=i.y0,c=i.x1,m=i.y1,p=c-s,T=m-h;s-=p,h-=T;var l=(s+c)/2,_=(h+m)/2,w=S;return p*=w,T*=w,{x0:l-p,y0:_-T,x1:l+p,y1:_+T}},Z.fixDatesForPaths=function(i,s,h){var c=s.type==="date",m=h.type==="date";if(!c&&!m)return i;for(var p=0;p<i.length;p++)for(var T=0;T<i[p].length;T++)for(var l=0;l+2<i[p][T].length;l+=2)c&&(i[p][T][l+1]=i[p][T][l+1].replace(" ","_")),m&&(i[p][T][l+2]=i[p][T][l+2].replace(" ","_"));return i}}}),S2=Xe({"src/components/shapes/draw_newshape/newshapes.js"(Z,G){"use strict";var v=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,c=s.r2p,m=$m(),p=m.clearOutline,T=r0(),l=T.readPaths,_=T.writePaths,w=T.ellipseOver,A=T.fixDatesForPaths;function M(b,d){if(b.length){var u=b[0][0];if(u){var y=d.gd,f=d.isActiveShape,R=d.dragmode,L=(y.layout||{}).shapes||[];if(!S(R)&&f!==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,d,R);p(y);for(var O=d.editHelpers,P=(O||{}).modifyItem,U=[],B=0;B<L.length;B++){var X=y._fullLayout.shapes[B];if(U[B]=X._input,f!==void 0&&B===y._fullLayout._activeShapeIndex){var $=N;switch(X.type){case"line":case"rect":case"circle":var se=v.getFromId(y,X.xref);X.xref.charAt(0)==="x"&&se.type.includes("category")?(P("x0",$.x0-(X.x0shift||0)),P("x1",$.x1-(X.x1shift||0))):(P("x0",$.x0),P("x1",$.x1));var le=v.getFromId(y,X.yref);X.yref.charAt(0)==="y"&&le.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 f===void 0?(U.push(N),U):O?O.getUpdateObj():{}}}}function g(b,d,u){var y=b[0][0],f=d.gd,R=y.getAttribute("d"),L=f._fullLayout.newshape,z=d.plotinfo,F=d.isActiveShape,N=z.xaxis,O=z.yaxis,P=!!z.domain||!z.xaxis,U=!!z.domain||!z.yaxis,B=E(u),X=l(R,f,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 se;if(X.length===1&&(se=X[0]),se&&se.length===5&&u==="drawrect")$.type="rect",$.x0=se[0][1],$.y0=se[0][2],$.x1=se[2][1],$.y1=se[2][2];else if(se&&u==="drawline")$.type="line",$.x0=se[0][1],$.y0=se[0][2],$.x1=se[1][1],$.y1=se[1][2];else if(se&&u==="drawcircle"){$.type="circle";var le=se[t][1],fe=se[r][1],V=se[o][1],Y=se[a][1],ee=se[t][2],q=se[r][2],oe=se[o][2],ae=se[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&&(le=c(z.xaxis,le),fe=c(z.xaxis,fe),V=c(z.xaxis,V),Y=c(z.xaxis,Y)),Q&&(ee=c(z.yaxis,ee),q=c(z.yaxis,q),oe=c(z.yaxis,oe),ae=c(z.yaxis,ae));var re=(fe+Y)/2,ce=(ee+oe)/2,be=(Y-fe+V-le)/2,Ae=(ae-q+oe-ee)/2,De=w({x0:re,y0:ce,x1:re+be*n,y1:ce+Ae*i});j&&(De.x0=h(z.xaxis,De.x0),De.x1=h(z.xaxis,De.x1)),Q&&(De.y0=h(z.yaxis,De.y0),De.y1=h(z.yaxis,De.y1)),$.x0=De.x0,$.y0=De.y0,$.x1=De.x1,$.y1=De.y1}else $.type="path",N&&O&&A(X,N,O),$.path=_(X),se=null;return $}G.exports={newShapes:M,createShapeObj:g}}}),b5=Xe({"src/components/selections/draw_newselection/newselections.js"(Z,G){"use strict";var v=Jd(),x=v.selectMode,S=$m(),E=S.clearOutline,e=r0(),t=e.readPaths,r=e.writePaths,o=e.fixDatesForPaths;G.exports=function(n,i){if(n.length){var s=n[0][0];if(s){var h=s.getAttribute("d"),c=i.gd,m=c._fullLayout.newselection,p=i.plotinfo,T=p.xaxis,l=p.yaxis,_=i.isActiveSelection,w=i.dragmode,A=(c.layout||{}).selections||[];if(!x(w)&&_!==void 0){var M=c._fullLayout._activeSelectionIndex;if(M<A.length)switch(c._fullLayout.selections[M].type){case"rect":w="select";break;case"path":w="lasso";break}}var g=t(h,c,p,_),b={xref:T._id,yref:l._id,opacity:m.opacity,line:{color:m.line.color,width:m.line.width,dash:m.line.dash}},d;g.length===1&&(d=g[0]),d&&d.length===5&&w==="select"?(b.type="rect",b.x0=d[0][1],b.y0=d[0][2],b.x1=d[2][1],b.y1=d[2][2]):(b.type="path",T&&l&&o(g,T,l),b.path=r(g),d=null),E(c);for(var u=i.editHelpers,y=(u||{}).modifyItem,f=[],R=0;R<A.length;R++){var L=c._fullLayout.selections[R];if(!L){f[R]=L;continue}if(f[R]=L._input,_!==void 0&&R===c._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?(f.push(b),f):u?u.getUpdateObj():{}}}}}}),L_=Xe({"src/components/shapes/constants.js"(Z,G){"use strict";G.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=Xe({"src/components/shapes/helpers.js"(Z){"use strict";var G=L_(),v=sa(),x=Go();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(G.segmentRE);return a.forEach(function(n){var i=t[n.charAt(0)].drawn;if(i!==void 0){var s=n.slice(1).match(G.paramRE);if(!(!s||s.length<i)){var h=s[i],c=r?h:v.cleanNumber(h);o.push(c)}}}),o},Z.countDefiningCoords=function(e,t,r){if(e!=="path")return 2;if(!t)return 0;let o=t.match(G.segmentRE);if(!o)return 0;let a=r==="x"?G.paramIsX:G.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 c=E(t,r);return t._offset+t.r2p(s(h,!0))+c},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,c,m,p,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),c=E(i[1],t.x1shift),_=T[0](t.x0)+h,w=T[1](t.x1)+c;else if(h=E(i,t.x0shift),c=E(i,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);_=z+t.x0+h,w=z+t.x1+c}else _=T(t.x0)+h,w=T(t.x1)+c;if(a==="array")m=E(s[0],t.y0shift),p=E(s[1],t.y1shift),A=l[0](t.y0)+m,M=l[1](t.y1)+p;else if(m=E(s,t.y0shift),p=E(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,M=z-t.y1+p}else A=l(t.y0)+m,M=l(t.y1)+p;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,d=(A+M)/2,u=Math.abs(b-_),y=Math.abs(d-A),f="A"+u+","+y,R=b+u+","+d,L=b+","+(d-y);return"M"+R+f+" 0 1,1 "+L+f+" 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),c=Array.isArray(e.yref);var m=0,p=0;return o.replace(G.segmentRE,function(T){var l=0,_=T.charAt(0),w=G.paramIsX[_],A=G.paramIsY[_],M=G.numParams[_];let g=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=c?r[p]:r;var y=T.slice(1).replace(G.paramRE,function(f){return w[l]?a==="pixel"?f=d(i)+Number(f):f=d(f):A[l]&&(n==="pixel"?f=u(s)-Number(f):f=u(f)),l++,l>M&&(f="X"),f});return l>M&&(y=y.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),g&&m++,b&&p++,_+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=Xe({"src/components/shapes/display_labels.js"(Z,G){"use strict";var v=sa(),x=Go(),S=ou(),E=es(),e=r0().readPaths,t=a0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;G.exports=function(h,c,m,p){if(p.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var T;if(m.label.texttemplate){var l={};if(m.type!=="path"){var _=x.getFromId(h,m.xref),w=x.getFromId(h,m.yref);let j=Array.isArray(m.xref),Q=Array.isArray(m.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 d=o[A](m,_,w);d!==void 0&&(l[A]=d)}}}T=v.texttemplateStringForShapes({data:[l],fallback:m.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:m.label.texttemplate})}else T=m.label.text;var u={"data-index":c},y=m.label.font,f={"data-notex":1},R=p.append("g").attr(u).classed("shape-label",!0),L=R.append("text").attr(f).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var P=r(h,m),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],se=1;se<$.length;se+=2){var le=$[se],fe=$[se+1];z=Math.min(z,le),F=Math.max(F,le),N=Math.min(N,fe),O=Math.max(O,fe)}}else{let j=Array.isArray(m.xref),Q=Array.isArray(m.yref),re=x.getFromId(h,j?m.xref[0]:m.xref),ce=x.getFromId(h,j?m.xref[1]:m.xref),be=x.getFromId(h,Q?m.yref[0]:m.yref),Ae=x.getFromId(h,Q?m.yref[1]:m.yref),De=x.getRefType(j?m.xref[0]:m.xref),ze=x.getRefType(j?m.xref[1]:m.xref),Ze=x.getRefType(Q?m.yref[0]:m.yref),at=x.getRefType(Q?m.yref[1]:m.yref),nt=function(st,Me,ye,he){return t.getDataToPixel(h,ye,Me,!1,he)(st)},rt=function(st,Me,ye,he){return t.getDataToPixel(h,ye,Me,!0,he)(st)};z=nt(m.x0,m.x0shift,re,De),F=nt(m.x1,m.x1shift,ce,ze),N=rt(m.y0,m.y0shift,be,Ze),O=rt(m.y1,m.y1shift,Ae,at)}var V=m.label.textangle;V==="auto"&&(m.type==="line"?V=n(z,N,F,O):V=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,m,V,Y),q=ee.textx,oe=ee.texty,ae=ee.xanchor;L.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:oe,x:q,transform:"rotate("+V+","+q+","+oe+")"}).call(S.positionText,q,oe)}};function n(s,h,c,m){var p,T;return T=Math.abs(c-s),c>=s?p=h-m:p=m-h,-180/Math.PI*Math.atan2(p,T)}function i(s,h,c,m,p,T,l){var _=p.label.textposition,w=p.label.textangle,A=p.label.padding,M=p.type,g=Math.PI/180*T,b=Math.sin(g),d=Math.cos(g),u=p.label.xanchor,y=p.label.yanchor,f,R,L,z;if(M==="line"){_==="start"?(f=s,R=h):_==="end"?(f=c,R=m):(f=(s+c)/2,R=(h+m)/2),u==="auto"&&(_==="start"?w==="auto"?c>s?u="left":c<s?u="right":u="center":c>s?u="right":c<s?u="left":u="center":_==="end"?w==="auto"?c>s?u="right":c<s?u="left":u="center":c>s?u="left":c<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*d*O}else{var P=F[u],U=N[y];L=A*P,z=A*U}f=f+L,R=R+z}else L=A+3,_.indexOf("right")!==-1?(f=Math.max(s,c)-L,u==="auto"&&(u="right")):_.indexOf("left")!==-1?(f=Math.min(s,c)+L,u==="auto"&&(u="left")):(f=(s+c)/2,u==="auto"&&(u="center")),_.indexOf("top")!==-1?R=Math.min(h,m):_.indexOf("bottom")!==-1?R=Math.max(h,m):R=(h+m)/2,z=A,y==="bottom"?R=R-z:y==="top"&&(R=R+z);var B=a[y],X=p.label.font.size,$=l.height,se=($*B-X)*b,le=-($*B-X)*d;return{textx:f+se,texty:R+le,xanchor:u}}}}),M2=Xe({"src/components/shapes/display_outlines.js"(Z,G){"use strict";var v=sa(),x=v.strTranslate,S=Ap(),E=Jd(),e=E.drawMode,t=E.selectMode,r=so(),o=$n(),a=T2(),n=a.i000,i=a.i090,s=a.i180,h=a.i270,c=$m(),m=c.clearOutlineControllers,p=r0(),T=p.pointsOnRectangle,l=p.pointsOnEllipse,_=p.writePaths,w=S2().newShapes,A=S2().createShapeObj,M=b5(),g=w5();G.exports=function y(f,R,L,z){z||(z=0);var F=L.gd;function N(){y(f,R,L,z++),(l(f[0])||L.hasText)&&O({redrawing:!0})}function O(rt){var st={};L.isActiveShape!==void 0&&(L.isActiveShape=!1,st=w(R,L)),L.isActiveSelection!==void 0&&(L.isActiveSelection=!1,st=M(R,L),F._fullLayout._reselect=!0),Object.keys(st).length&&r.call((rt||{}).redrawing?"relayout":"_guiRelayout",F,st)}var P=F._fullLayout,U=P._zoomlayer,B=L.dragmode,X=e(B),$=t(B);(X||$)&&(F._fullLayout._outlining=!0),m(F),R.attr("d",_(f));var se,le,fe,V,Y;if(!z&&(L.isActiveShape||L.isActiveSelection)){Y=b([],f);var ee=U.append("g").attr("class","outline-controllers");be(ee),nt()}if(X&&L.hasText){var q=U.select(".label-temp"),oe=A(R,L,L.dragmode);g(F,"label-temp",oe,q)}function ae(rt){fe=+rt.srcElement.getAttribute("data-i"),V=+rt.srcElement.getAttribute("data-j"),se[fe][V].moveFn=j}function j(rt,st){if(f.length){var Me=Y[fe][V][1],ye=Y[fe][V][2],he=f[fe],Oe=he.length;if(T(he)){var tt=rt,ot=st;if(L.isActiveSelection){var Qe=d(he,V);Qe[1]===he[V][1]?ot=0:tt=0}for(var Pt=0;Pt<Oe;Pt++)if(Pt!==V){var It=he[Pt];It[1]===he[V][1]&&(It[1]=Me+tt),It[2]===he[V][2]&&(It[2]=ye+ot)}if(he[V][1]=Me+tt,he[V][2]=ye+ot,!T(he))for(var qt=0;qt<Oe;qt++)for(var Wt=0;Wt<he[qt].length;Wt++)he[qt][Wt]=Y[fe][qt][Wt]}else he[V][1]=Me+rt,he[V][2]=ye+st;N()}}function Q(){O()}function re(){if(f.length&&f[fe]&&f[fe].length){for(var rt=[],st=0;st<f[fe].length;st++)st!==V&&rt.push(f[fe][st]);rt.length>1&&!(rt.length===2&&rt[1][0]==="Z")&&(V===0&&(rt[0][0]="M"),f[fe]=rt,N(),O())}}function ce(rt,st){if(rt===2){fe=+st.srcElement.getAttribute("data-i"),V=+st.srcElement.getAttribute("data-j");var Me=f[fe];!T(Me)&&!l(Me)&&re()}}function be(rt){se=[];for(var st=0;st<f.length;st++){var Me=f[st],ye=T(Me),he=!ye&&l(Me);se[st]=[];for(var Oe=Me.length,tt=0;tt<Oe;tt++)if(Me[tt][0]!=="Z"&&!(he&&tt!==n&&tt!==i&&tt!==s&&tt!==h)){var ot=ye&&L.isActiveSelection,Qe;ot&&(Qe=d(Me,tt));var Pt=Me[tt][1],It=Me[tt][2],qt=rt.append(ot?"rect":"circle").attr("data-i",st).attr("data-j",tt).style({fill:o.background,stroke:o.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(ot){var Wt=Qe[1]-Pt,kr=Qe[2]-It,mr=kr?5:Math.max(Math.min(25,Math.abs(Wt)-5),5),qr=Wt?5:Math.max(Math.min(25,Math.abs(kr)-5),5);qt.classed(kr?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",mr).attr("height",qr).attr("x",Pt-mr/2).attr("y",It-qr/2).attr("transform",x(Wt/2,kr/2))}else qt.classed("cursor-grab",!0).attr("r",5).attr("cx",Pt).attr("cy",It);se[st][tt]={element:qt.node(),gd:F,prepFn:ae,doneFn:Q,clickFn:ce},S.init(se[st][tt])}}}function Ae(rt,st){if(f.length)for(var Me=0;Me<f.length;Me++)for(var ye=0;ye<f[Me].length;ye++)for(var he=0;he+2<f[Me][ye].length;he+=2)f[Me][ye][he+1]=Y[Me][ye][he+1]+rt,f[Me][ye][he+2]=Y[Me][ye][he+2]+st}function De(rt,st){Ae(rt,st),N()}function ze(rt){fe=+rt.srcElement.getAttribute("data-i"),fe||(fe=0),le[fe].moveFn=De}function Ze(){O()}function at(rt){rt===2&&u(F)}function nt(){if(le=[],!!f.length){var rt=0;le[rt]={element:R[0][0],gd:F,prepFn:ze,doneFn:Ze,clickFn:at},S.init(le[rt])}}};function b(y,f){for(var R=0;R<f.length;R++){var L=f[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 d(y,f){var R=y[f][1],L=y[f][2],z=y.length,F,N,O;return F=(f+1)%z,N=y[F][1],O=y[F][2],N===R&&O===L&&(F=(f+2)%z,N=y[F][1],O=y[F][2]),[F,N,O]}function u(y){if(t(y._fullLayout.dragmode)){m(y);var f=y._fullLayout._activeSelectionIndex,R=(y.layout||{}).selections||[];if(f<R.length){for(var L=[],z=0;z<R.length;z++)z!==f&&L.push(R[z]);delete y._fullLayout._activeSelectionIndex;var F=y._fullLayout.selections[f];y._fullLayout._deselect={xref:F.xref,yref:F.yref},r.call("_guiRelayout",y,{selections:L})}}}}}),E2=Xe({"src/components/shapes/draw.js"(Z,G){"use strict";var v=Hn(),x=so(),S=sa(),E=Go(),e=r0().readPaths,t=M2(),r=w5(),o=$m().clearOutlineControllers,a=$n(),n=es(),i=zl().arrayEditor,s=Ap(),h=Kd(),c=L_(),m=a0(),p=m.getPathString;G.exports={draw:T,drawOne:w,eraseActiveShape:y,drawLabel:r};function T(f){var R=f._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(f,F)}function l(f){return!!f._fullLayout._outlining}function _(f){return!f._context.edits.shapePosition}function w(f,R){f._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+R+'"]').remove();var L=m.makeShapesOptionsAndPlotinfo(f,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(f._fullLayout._shapeUpperLayer);else if(z.xref.includes("paper")||z.yref.includes("paper"))P(f._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(f._fullLayout._shapeLowerLayer);function P(U){var B=p(f,z),X={"data-index":R,"fill-rule":z.fillrule,d:B},$=z.opacity,se=z.fillcolor,le=z.line.width?z.line.color:"rgba(0,0,0,0)",fe=z.line.width,V=z.line.dash;!fe&&z.editable===!0&&(fe=5,V="solid");var Y=B[B.length-1]!=="Z",ee=_(f)&&z.editable&&f._fullLayout._activeShapeIndex===R;ee&&(se=Y?"rgba(0,0,0,0)":f._fullLayout.activeshape.fillcolor,$=f._fullLayout.activeshape.opacity);var q=U.append("g").classed("shape-group",!0).attr({"data-index":R}),oe=q.append("path").attr(X).style("opacity",$).call(a.stroke,le).call(a.fill,se).call(n.dashLine,V,fe);A(q,f,z),r(f,R,z,q);var ae;if((ee||f._context.edits.shapePosition)&&(ae=i(f.layout,"shapes",z)),ee){oe.style({cursor:"move"});var j={element:oe.node(),plotinfo:F,gd:f,editHelpers:ae,hasText:z.label.text||z.label.texttemplate,isActiveShape:!0},Q=e(B,f);t(Q,oe,j)}else f._context.edits.shapePosition?g(f,oe,z,R,U,ae):z.editable===!0&&oe.style("pointer-events",Y||a.opacity(se)*$<=.5?"stroke":"all");oe.node().addEventListener("click",function(){return d(f,oe)})}}function A(f,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(f,N,R)}else{let N=(z+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(f,N?"clip"+R._fullLayout._uid+N:null,R)}}function M(f,R,L){let z=f._fullLayout._size;function F(P,U){let B=(Array.isArray(P)?P:[P]).map(se=>E.getFromId(f,se)).filter(Boolean);if(!B.length)return U?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=B.map(function(se){return se._offset}),$=B.map(function(se){return se._offset+se._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(f,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",se=N.modifyItem,le,fe,V,Y,ee,q,oe,ae,j,Q,re,ce,be,Ae,De,ze=v.select(R.node().parentNode),Ze=E.getFromId(f,L.xref),at=E.getRefType(L.xref),nt=E.getFromId(f,L.yref),rt=E.getRefType(L.yref),st=L.x0shift,Me=L.x1shift,ye=L.y0shift,he=L.y1shift,Oe=function(Ve,Ce){var Ee=m.getDataToPixel(f,Ze,Ce,!1,at);return Ee(Ve)},tt=function(Ve,Ce){var Ee=m.getDataToPixel(f,nt,Ce,!0,rt);return Ee(Ve)},ot=m.getPixelToData(f,Ze,!1,at),Qe=m.getPixelToData(f,nt,!0,rt),Pt=Wt(),It={element:Pt.node(),gd:f,prepFn:qr,doneFn:Sr,clickFn:Rr},qt;s.init(It),Pt.node().onmousemove=mr;function Wt(){return X?kr():R}function kr(){var Ve=10,Ce=Math.max(L.line.width,Ve),Ee=F.append("g").attr("data-index",z).attr("drag-helper",!0);Ee.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Ce,"stroke-opacity":"0"});var Pe={"fill-opacity":"0"},ft=Math.max(Ce/2,Ve);return Ee.append("circle").attr({"data-line-point":"start-point",cx:U?Oe(L.xanchor)+L.x0:Oe(L.x0,st),cy:B?tt(L.yanchor)-L.y0:tt(L.y0,ye),r:ft}).style(Pe).classed("cursor-grab",!0),Ee.append("circle").attr({"data-line-point":"end-point",cx:U?Oe(L.xanchor)+L.x1:Oe(L.x1,Me),cy:B?tt(L.yanchor)-L.y1:tt(L.y1,he),r:ft}).style(Pe).classed("cursor-grab",!0),Ee}function mr(Ve){if(l(f)){qt=null;return}if(X)Ve.target.tagName==="path"?qt="move":qt=Ve.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ce=It.element.getBoundingClientRect(),Ee=Ce.right-Ce.left,Pe=Ce.bottom-Ce.top,ft=Ve.clientX-Ce.left,ct=Ve.clientY-Ce.top,_t=!$&&Ee>O&&Pe>P&&!Ve.shiftKey?s.getCursor(ft/Ee,1-ct/Pe):"move";h(R,_t),qt=_t.split("-")[0]}}function qr(Ve){l(f)||(U&&(ee=Oe(L.xanchor)),B&&(q=tt(L.yanchor)),L.type==="path"?De=L.path:(le=U?L.x0:Oe(L.x0),fe=B?L.y0:tt(L.y0),V=U?L.x1:Oe(L.x1),Y=B?L.y1:tt(L.y1)),le<V?(j=le,be="x0",Q=V,Ae="x1"):(j=V,be="x1",Q=le,Ae="x0"),!B&&fe<Y||B&&fe>Y?(oe=fe,re="y0",ae=Y,ce="y1"):(oe=Y,re="y1",ae=fe,ce="y0"),mr(Ve),Ke(F,L),Ie(R,L,f),It.moveFn=qt==="move"?wt:Ne,It.altKey=Ve.altKey)}function Sr(){l(f)||(h(R),Te(F),A(R,f,L),x.call("_guiRelayout",f,N.getUpdateObj()))}function Rr(){l(f)||Te(F)}function wt(Ve,Ce){if(L.type==="path"){var Ee=function(ct){return ct},Pe=Ee,ft=Ee;U?se("xanchor",L.xanchor=ot(ee+Ve)):(Pe=function(_t){return ot(Oe(_t)+Ve)},Ze&&Ze.type==="date"&&(Pe=m.encodeDate(Pe))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(ft=function(_t){return Qe(tt(_t)+Ce)},nt&&nt.type==="date"&&(ft=m.encodeDate(ft))),se("path",L.path=b(De,Pe,ft))}else U?se("xanchor",L.xanchor=ot(ee+Ve)):(se("x0",L.x0=ot(le+Ve)),se("x1",L.x1=ot(V+Ve))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(se("y0",L.y0=Qe(fe+Ce)),se("y1",L.y1=Qe(Y+Ce)));R.attr("d",p(f,L)),Ke(F,L),r(f,z,L,ze)}function Ne(Ve,Ce){if($){var Ee=function(hi){return hi},Pe=Ee,ft=Ee;U?se("xanchor",L.xanchor=ot(ee+Ve)):(Pe=function(wi){return ot(Oe(wi)+Ve)},Ze&&Ze.type==="date"&&(Pe=m.encodeDate(Pe))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(ft=function(wi){return Qe(tt(wi)+Ce)},nt&&nt.type==="date"&&(ft=m.encodeDate(ft))),se("path",L.path=b(De,Pe,ft))}else if(X){if(qt==="resize-over-start-point"){var ct=le+Ve,_t=B?fe-Ce:fe+Ce;se("x0",L.x0=U?ct:ot(ct)),se("y0",L.y0=B?_t:Qe(_t))}else if(qt==="resize-over-end-point"){var Ct=V+Ve,ir=B?Y-Ce:Y+Ce;se("x1",L.x1=U?Ct:ot(Ct)),se("y1",L.y1=B?ir:Qe(ir))}}else{var rr=function(hi){return qt.indexOf(hi)!==-1},er=rr("n"),Lr=rr("s"),fa=rr("w"),Da=rr("e"),Ia=er?oe+Ce:oe,qa=Lr?ae+Ce:ae,Wa=fa?j+Ve:j,Ca=Da?Q+Ve:Q;B&&(er&&(Ia=oe-Ce),Lr&&(qa=ae-Ce)),(!B&&qa-Ia>P||B&&Ia-qa>P)&&(se(re,L[re]=B?Ia:Qe(Ia)),se(ce,L[ce]=B?qa:Qe(qa))),Ca-Wa>O&&(se(be,L[be]=U?Wa:ot(Wa)),se(Ae,L[Ae]=U?Ca:ot(Ca)))}R.attr("d",p(f,L)),Ke(F,L),r(f,z,L,ze)}function Ke(Ve,Ce){(U||B)&&Ee();function Ee(){var Pe=Ce.type!=="path",ft=Ve.selectAll(".visual-cue").data([0]),ct=1;ft.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ct}).classed("visual-cue",!0);var _t=Oe(U?Ce.xanchor:S.midRange(Pe?[Ce.x0,Ce.x1]:m.extractPathCoords(Ce.path,c.paramIsX))),Ct=tt(B?Ce.yanchor:S.midRange(Pe?[Ce.y0,Ce.y1]:m.extractPathCoords(Ce.path,c.paramIsY)));if(_t=m.roundPositionForSharpStrokeRendering(_t,ct),Ct=m.roundPositionForSharpStrokeRendering(Ct,ct),U&&B){var ir="M"+(_t-1-ct)+","+(Ct-1-ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ft.attr("d",ir)}else if(U){var rr="M"+(_t-1-ct)+","+(Ct-9-ct)+"v18 h2 v-18 Z";ft.attr("d",rr)}else{var er="M"+(_t-9-ct)+","+(Ct-1-ct)+"h18 v2 h-18 Z";ft.attr("d",er)}}}function Te(Ve){Ve.selectAll(".visual-cue").remove()}function Ie(Ve,Ce,Ee){var Pe=Ce.xref,ft=Ce.yref,ct=E.getFromId(Ee,Pe),_t=E.getFromId(Ee,ft),Ct="";Pe!=="paper"&&!ct.autorange&&(Ct+=Pe),ft!=="paper"&&!_t.autorange&&(Ct+=ft),n.setClipUrl(Ve,Ct?"clip"+Ee._fullLayout._uid+Ct:null,Ee)}}function b(f,R,L){return f.replace(c.segmentRE,function(z){var F=0,N=z.charAt(0),O=c.paramIsX[N],P=c.paramIsY[N],U=c.numParams[N],B=z.slice(1).replace(c.paramRE,function(X){return F>=U||(O[F]?X=R(X):P[F]&&(X=L(X)),F++),X});return N+B})}function d(f,R){if(_(f)){var L=R.node(),z=+L.getAttribute("data-index");if(z>=0){if(z===f._fullLayout._activeShapeIndex){u(f);return}f._fullLayout._activeShapeIndex=z,f._fullLayout._deactivateShape=u,T(f)}}}function u(f){if(_(f)){var R=f._fullLayout._activeShapeIndex;R>=0&&(o(f),delete f._fullLayout._activeShapeIndex,T(f))}}function y(f){if(_(f)){o(f);var R=f._fullLayout._activeShapeIndex,L=(f.layout||{}).shapes||[];if(R<L.length){for(var z=[],F=0;F<L.length;F++)F!==R&&z.push(L[F]);return delete f._fullLayout._activeShapeIndex,x.call("_guiRelayout",f,{shapes:z})}}}}}),T5=Xe({"src/components/modebar/buttons.js"(Z,G){"use strict";var v=so(),x=bc(),S=ef(),E=w2(),e=E2().eraseActiveShape,t=sa(),r=t._,o=G.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"),["filename","width","height","scale"].forEach(function(d){d in g&&(b[d]=g[d])}),v.call("downloadImage",M,b).then(function(d){t.notifier(r(M,"Snapshot succeeded")+" - "+d,"long")}).catch(function(){t.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},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,d=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout,f={},R=S.list(M,null,!0),L=y._cartesianSpikesEnabled,z,F;if(d==="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")f[U+".autorange"]=!0;else if(u==="reset")z._rangeInitial0===void 0&&z._rangeInitial1===void 0?f[U+".autorange"]=!0:z._rangeInitial0===void 0?(f[U+".autorange"]=z._autorangeInitial,f[U+".range"]=[null,z._rangeInitial1]):z._rangeInitial1===void 0?(f[U+".range"]=[z._rangeInitial0,null],f[U+".autorange"]=z._autorangeInitial):f[U+".range"]=[z._rangeInitial0,z._rangeInitial1],z._showSpikeInitial!==void 0&&(f[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]];f[U+".range[0]"]=z.l2r($[0]),f[U+".range[1]"]=z.l2r($[1])}}else d==="hovermode"&&(u==="x"||u==="y")&&(u=y._isHoriz?"y":"x",b.setAttribute("data-val",u)),f[d]=u;y._cartesianSpikesEnabled=L,v.call("_guiRelayout",M,f)}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,d=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout._subplots.gl3d||[],f={},R=d.split("."),L=0;L<y.length;L++)f[y[L]+"."+R[1]]=u;var z=u==="pan"?u:"zoom";f.dragmode=z,v.call("_guiRelayout",M,f)}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,d=b.getAttribute("data-attr"),u=d==="resetLastSave",y=d==="resetDefault",f=M._fullLayout,R=f._subplots.gl3d||[],L={},z=0;z<R.length;z++){var F=R[z],N=F+".camera",O=F+".aspectratio",P=F+".aspectmode",U=f[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)}v.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,d=b._previousVal,u=M._fullLayout,y=u._subplots.gl3d||[],f=["xaxis","yaxis","zaxis"],R={},L={};if(d)L=d,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=f[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);v.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:c},o.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:E.zoom_minus,click:c},o.resetGeo={name:"resetGeo",_cat:"reset",title:function(M){return r(M,"Reset")},attr:"reset",val:null,icon:E.autoscale,click:c},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:p};function c(M,g){for(var b=g.currentTarget,d=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,y=M._fullLayout,f=y._subplots.geo||[],R=0;R<f.length;R++){var L=f[R],z=y[L];if(d==="zoom"){var F=z.projection.scale,N=u==="in"?2*F:.5*F;v.call("_guiRelayout",M,L+".projection.scale",N)}}d==="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:p};function m(M){var g=M._fullLayout;return g.hovermode?!1:g._has("cartesian")?g._isHoriz?"y":"x":"closest"}function p(M){var g=m(M);v.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 d=M._fullData[b]._viewInitial;g["node.groups"].push(d.node.groups.slice()),g["node.x"].push(d.node.x.slice()),g["node.y"].push(d.node.y.slice())}v.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=m(M),v.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",v.call("_guiRelayout",M,T(M))}};function T(M){for(var g=M._fullLayout,b=g._cartesianSpikesEnabled==="on",d=S.list(M,null,!0),u={},y=0;y<d.length;y++){var f=d[y];u[f._name+".showspikes"]=b?!0:f._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 d=g.currentTarget,u=d.getAttribute("data-val"),y=M._fullLayout,f=y._subplots[b]||[],R=1.05,L={},z=0;z<f.length;z++){var F=f[z],N=y[F].zoom,O=u==="in"?R*N:N/R;L[F+".zoom"]=O}v.call("_guiRelayout",M,L)}function A(M,g){for(var b=M._fullLayout,d=b._subplots[g]||[],u={},y=0;y<d.length;y++)for(var f=d[y],R=b[f]._subplot,L=R.viewInitial,z=Object.keys(L),F=0;F<z.length;F++){var N=z[F];u[f+"."+N]=L[N]}v.call("_guiRelayout",M,u)}}}),A5=Xe({"src/components/modebar/constants.js"(Z,G){"use strict";var v=T5(),x=Object.keys(v),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(v[r])}),e.sort(),G.exports={DRAW_MODES:S,backButtons:E,foreButtons:e}}}),S5=Xe({"src/components/modebar/attributes.js"(Z,G){"use strict";var v=A5();G.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=Xe({"src/components/modebar/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=S5();G.exports=function(t,r){var o=t.modebar||{},a=S.newContainer(r,"modebar");function n(s,h){return v.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=Xe({"src/components/modebar/modebar.js"(Z,G){"use strict";var v=Hn(),x=rs(),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,c=this.graphInfo._fullLayout,m="modebar-"+c._uid;this.element.setAttribute("id",m),this.element.setAttribute("role","toolbar"),this._uid=m,this.element.className="modebar modebar--custom",h.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),c.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var p=c.modebar,T="#"+m+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=p.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"),c.modebar.orientation==="v"?this.element.insertBefore(A,this.element.childNodes[0]):this.element.appendChild(A),this.hasLogo=!0}this.updateActiveButton(),S.setStyleOnHover("#"+m+" .modebar-btn",".active",".icon path","fill: "+p.activecolor,"fill: "+p.color,this.element)},o.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(h){var c=s.createGroup();h.forEach(function(m){var p=m.name;if(!p)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(p)!==-1)throw new Error("button name '"+p+"' is taken");s.buttonsNames.push(p);var T=s.createButton(m);s.buttonElements.push(T),c.appendChild(T)}),s.element.appendChild(c)})},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 c=i.title;c===void 0?c=i.name:typeof c=="function"&&(c=c(this.graphInfo)),(c||c===0)&&(h.setAttribute("data-title",c),h.setAttribute("aria-label",c)),i.attr!==void 0&&h.setAttribute("data-attr",i.attr);var m=i.val;m!==void 0&&(typeof m=="function"&&(m=m(this.graphInfo)),h.setAttribute("data-val",m));var p=i.click;if(typeof p!="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&&v.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",c;if(i.path){c=document.createElementNS(h,"svg"),c.setAttribute("viewBox",[0,0,i.width,s].join(" ")),c.setAttribute("class","icon");var m=document.createElementNS(h,"path");m.setAttribute("d",i.path),i.transform?m.setAttribute("transform",i.transform):i.ascent!==void 0&&m.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),c.appendChild(m)}if(i.svg){var p=t.parseFromString(i.svg,"application/xml");c=p.childNodes[0]}return c.setAttribute("height","1em"),c.setAttribute("width","1em"),c},o.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,h=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(c){var m=c.getAttribute("data-val")||!0,p=c.getAttribute("data-attr"),T=c.getAttribute("data-toggle")==="true",l=v.select(c),_=function(M,g){var b=s.modebar,d=M.querySelector(".icon path");d&&(g||M.matches(":hover")?d.style.fill=b.activecolor:d.style.fill=b.color)};if(T){if(p===h){var w=!l.classed("active");l.classed("active",w),_(c,w)}}else{var A=p===null?p:S.nestedProperty(s,p).get();l.classed("active",A===m),_(c,A===m)}})},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 c=0;c<i[h].length;c++)if(i[h][c].name!==s[h][c].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,c=new r({graphInfo:i,container:h._modebardiv.node(),buttons:s});return h._privateplot&&v.select(c.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),c}G.exports=n}}),Tz=Xe({"src/components/modebar/manage.js"(Z,G){"use strict";var v=ef(),x=Fu(),S=so(),E=$p().isUnifiedHover,e=wz(),t=T5(),r=A5().DRAW_MODES,o=sa().extendDeep;G.exports=function(p){var T=p._fullLayout,l=p._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=c(w):!l.displayModeBar&&l.watermark?A=[]:A=a(p),_?_.update(p,A):T._modeBar=e(p,A)};function a(m){var p=m._fullLayout,T=m._fullData,l=m._context;function _(j,Q){if(typeof Q=="string"){if(Q.toLowerCase()===j.toLowerCase())return!0}else{var re=Q.name,ce=Q._cat||Q.name;if(re===j||ce===j.toLowerCase())return!0}return!1}var w=p.modebar.add;typeof w=="string"&&(w=[w]);var A=p.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=p._has("cartesian"),d=p._has("gl3d"),u=p._has("geo"),y=p._has("pie"),f=p._has("funnelarea"),R=p._has("ternary"),L=p._has("mapbox"),z=p._has("map"),F=p._has("polar"),N=p._has("smith"),O=p._has("sankey"),P=n(p),U=E(p.hovermode),B=[];function X(j){if(j.length){for(var Q=[],re=0;re<j.length;re++){for(var ce=j[re],be=t[ce],Ae=be.name.toLowerCase(),De=(be._cat||be.name).toLowerCase(),ze=!1,Ze=0;Ze<g.length;Ze++){var at=g[Ze].toLowerCase();if(at===Ae||at===De){ze=!0;break}}ze||Q.push(t[ce])}B.push(Q)}}var $=["toImage"];l.showEditInChartStudio?$.push("editInChartStudio"):l.showSendToCloud&&$.push("sendDataToCloud"),X($);var se=[],le=[],fe=[],V=[];(b||y||f||R)+u+d+L+z+F+N>1?(le=["toggleHover"],fe=["resetViews"]):u?(se=["zoomInGeo","zoomOutGeo"],le=["hoverClosestGeo"],fe=["resetGeo"]):d?(le=["hoverClosest3d"],fe=["resetCameraDefault3d","resetCameraLastSave3d"]):L?(se=["zoomInMapbox","zoomOutMapbox"],le=["toggleHover"],fe=["resetViewMapbox"]):z?(se=["zoomInMap","zoomOutMap"],le=["toggleHover"],fe=["resetViewMap"]):y?le=["hoverClosestPie"]:O?(le=["hoverClosestCartesian","hoverCompareCartesian"],fe=["resetViewSankey"]):le=["toggleHover"],b&&le.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(le=[]),b&&!P&&(se=["zoomIn2d","zoomOut2d","autoScale2d"],fe[0]!=="resetViews"&&(fe=["resetScale2d"])),d?V=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!P||R?V=["zoom2d","pan2d"]:L||z||u?V=["pan2d"]:F&&(V=["zoom2d"]),i(T)&&V.push("select2d","lasso2d");var Y=[],ee=function(j){Y.indexOf(j)===-1&&le.indexOf(j)!==-1&&Y.push(j)};if(Array.isArray(M)){for(var q=[],oe=0;oe<M.length;oe++){var ae=M[oe];typeof ae=="string"?(ae=ae.toLowerCase(),r.indexOf(ae)!==-1?(p._has("mapbox")||p._has("map")||p._has("cartesian"))&&V.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(V),X(se.concat(fe)),X(Y),h(B,M)}function n(m){for(var p=v.list({_fullLayout:m},null,!0),T=0;T<p.length;T++){var l=p[T].modebardisable;if(!p[T].fixedrange&&l!=="autoscale+zoominout"&&l!=="zoominout+autoscale")return!1}return!0}function i(m){for(var p=!1,T=0;T<m.length&&!p;T++){var l=m[T];!l._module||!l._module.selectPoints||(S.traceIs(l,"scatter-like")?(x.hasMarkers(l)||x.hasText(l))&&(p=!0):S.traceIs(l,"box-violin")?(l.boxpoints==="all"||l.points==="all")&&(p=!0):p=!0)}return p}function s(m){for(var p=0;p<m.length;p++)if(!S.traceIs(m[p],"noHover"))return!1;return!0}function h(m,p){if(p.length)if(Array.isArray(p[0]))for(var T=0;T<p.length;T++)m.push(p[T]);else m.push(p);return m}function c(m){for(var p=o([],m),T=0;T<p.length;T++)for(var l=p[T],_=0;_<l.length;_++){var w=l[_];if(typeof w=="string")if(t[w]!==void 0)p[T][_]=t[w];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return p}}}),M5=Xe({"src/components/modebar/index.js"(Z,G){"use strict";G.exports={moduleType:"component",name:"modebar",layoutAttributes:S5(),supplyLayoutDefaults:bz(),manage:Tz()}}}),E5=Xe({"src/plots/cartesian/scale_zoom.js"(Z,G){"use strict";var v=uh().FROM_BL;G.exports=function(S,E,e){e===void 0&&(e=v[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=Xe({"src/plots/cartesian/constraints.js"(Z){"use strict";var G=sa(),v=Yd(),x=ef().id2name,S=Wh(),E=E5(),e=wv(),t=Hs().ALMOST_EQUAL,r=uh().FROM_BL;Z.handleDefaults=function(m,p,T){var l=T.axIds,_=T.axHasImage,w=p._axisConstraintGroups=[],A=p._axisMatchGroups=[],M,g,b,d,u,y,f,R;for(M=0;M<l.length;M++)d=x(l[M]),u=m[d],y=p[d],o(u,y,{axIds:l,layoutOut:p,hasImage:_[d]});function L($,se){for(M=0;M<$.length;M++){g=$[M];for(b in g)p[x(b)][se]=g}}for(L(A,"_matchGroup"),M=0;M<w.length;M++){g=w[M];for(b in g)if(y=p[x(b)],y.fixedrange){for(var z in g){var F=x(z);(m[F]||{}).fixedrange===!1&&G.warn("fixedrange was specified as false for axis "+F+" but was overridden because another axis in its constraint group has fixedrange true"),p[F].fixedrange=!0}break}}for(M=0;M<w.length;){g=w[M];for(b in g){y=p[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[f],f==="rangebreaks"&&(P=y._hasDayOfWeekBreaks)}for(M=0;M<A.length;M++){g=A[M];for(var B=0;B<N.length;B++){f=N[B],R=null;var X;for(b in g)if(d=x(b),u=m[d],y=p[d],f in y){if(!y.matches&&(X=y,f in u)){U();break}R===null&&f in u&&U()}if(f==="range"&&R&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(O=!0),f==="autorange"&&R===null&&O&&(R=!1),R===null&&f in X&&(R=X[f]),R!==null)for(b in g)y=p[x(b)],y[f]=f==="range"?R.slice():R,f==="rangebreaks"&&(y._hasDayOfWeekBreaks=P,e(y,p))}}};function o(m,p,T){var l=T.axIds,_=T.layoutOut,w=T.hasImage,A=_._axisConstraintGroups,M=_._axisMatchGroups,g=p._id,b=g.charAt(0),d=((_._splomAxes||{})[b]||{})[g]||{},u=p._id,y=u.charAt(0)==="x";p._matchGroup=null,p._constraintGroup=null;function f(V,Y){return G.coerce(m,p,S,V,Y)}f("constrain",w?"domain":"range"),G.coerce(m,p,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var R=p.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&&(m.matches||d.matches)&&(B=G.coerce(m,p,{matches:{valType:"enumerated",values:F,dflt:F.indexOf(d.matches)!==-1?d.matches:void 0}},"matches"));var $=w&&!y?p.anchor:void 0;if(U&&!B&&(m.scaleanchor||$)&&(X=G.coerce(m,p,{scaleanchor:{valType:"enumerated",values:F.concat([!1])}},"scaleanchor",$)),B){p._matchGroup=i(M,u,B,1);var se=_[x(B)],le=a(_,p)/a(_,se);y!==(B.charAt(0)==="x")&&(le=(y?"x":"y")+le),i(A,u,B,le)}else m.matches&&l.indexOf(m.matches)!==-1&&G.warn("ignored "+p._name+'.matches: "'+m.matches+'" to avoid an infinite loop');if(X){var fe=f("scaleratio");fe||(fe=p.scaleratio=1),i(A,u,X,fe)}else m.scaleanchor&&l.indexOf(m.scaleanchor)!==-1&&G.warn("ignored "+p._name+'.scaleanchor: "'+m.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function a(m,p){var T=p.domain;return T||(T=m[x(p.overlaying)].domain),T[1]-T[0]}function n(m,p){for(var T=0;T<m.length;T++)if(m[T][p])return m[T];return null}function i(m,p,T,l){var _,w,A,M,g,b=n(m,p);b===null?(b={},b[p]=1,g=m.length,m.push(b)):g=m.indexOf(b);var d=Object.keys(b);for(_=0;_<m.length;_++)if(A=m[_],_!==g&&A[T]){var u=A[T];for(w=0;w<d.length;w++)M=d[w],A[M]=s(u,s(l,b[M]));m.splice(g,1);return}if(l!==1)for(w=0;w<d.length;w++){var y=d[w];b[y]=s(l,b[y])}b[T]=1}function s(m,p){var T="",l="",_,w;typeof m=="string"&&(T=m.match(/^[xy]*/)[0],_=T.length,m=+m.slice(_)),typeof p=="string"&&(l=p.match(/^[xy]*/)[0],w=l.length,p=+p.slice(w));var A=m*p;return!_&&!w?A:!_||!w||T.charAt(0)===l.charAt(0)?T+l+m*p:_===w?A:(_>w?T.slice(w):l.slice(_))+A}function h(m,p){for(var T=p._size,l=T.h/T.w,_={},w=Object.keys(m),A=0;A<w.length;A++){var M=w[A],g=m[M];if(typeof g=="string"){var b=g.match(/^[xy]*/)[0],d=b.length;g=+g.slice(d);for(var u=b.charAt(0)==="y"?l:1/l,y=0;y<d;y++)g*=u}_[M]=g}return _}Z.enforce=function(p){var T=p._fullLayout,l=T._axisConstraintGroups||[],_,w,A,M,g,b,d,u;for(_=0;_<l.length;_++){A=h(l[_],T);var y=Object.keys(A),f=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],f=Math.min(f,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(!(f>t*R&&!N)){for(w=0;w<y.length;w++)if(M=y[w],b=z[M],g=F[M],d=g.constrain,b!==L||d==="domain")if(u=b/L,d==="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,se=$,le=$,fe=Math.abs(X-$),V=$-fe*u*1.0001,Y=$+fe*u*1.0001,ee=v.makePadFn(T,g,0),q=v.makePadFn(T,g,1);c(g,u);var oe=Math.abs(g._m),ae=v.concatExtremes(p,g),j=ae.min,Q=ae.max,re,ce;for(ce=0;ce<j.length;ce++)re=j[ce].val-ee(j[ce])/oe,re>V&&re<se&&(se=re);for(ce=0;ce<Q.length;ce++)re=Q[ce].val+q(Q[ce])/oe,re<Y&&re>le&&(le=re);var be=(le-se)/(2*fe);u/=be,se=g.l2r(se),le=g.l2r(le),g.range=g._input.range=B<X?[se,le]:[le,se]}c(g,u)}}}},Z.getAxisGroup=function(p,T){for(var l=p._axisMatchGroups,_=0;_<l.length;_++){var w=l[_];if(w[T])return"g"+_}return T},Z.clean=function(p,T){if(T._inputDomain){for(var l=!1,_=T._id,w=p._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 c(m,p){var T=m._inputDomain,l=r[m.constraintoward],_=T[0]+(T[1]-T[0])*l;m.domain=m._input.domain=[_+(T[0]-_)/p,_+(T[1]-_)/p],m.setScale()}}}),P_=Xe({"src/plot_api/subroutines.js"(Z){"use strict";var G=Hn(),v=so(),x=bc(),S=sa(),E=ou(),e=C_(),t=$n(),r=es(),o=K0(),a=M5(),n=Go(),i=uh(),s=J0(),h=s.enforce,c=s.clean,m=Yd().doAutoRange,p="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),$,se,le,fe,V,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(Te,Ie,Ve){var Ce=Te._lw/2;if(Te._id.charAt(0)==="x"){if(Ie){if(Ve==="top")return Ie._offset-B-Ce}else return U.t+U.h*(1-(Te.position||0))+Ce%1;return Ie._offset+Ie._length+B+Ce}if(Ie){if(Ve==="right")return Ie._offset+Ie._length+B+Ce}else return U.l+U.w*(Te.position||0)+Ce%1;return Ie._offset-B-Ce}for($=0;$<X.length;$++){fe=X[$];var q=fe._anchorAxis;fe._linepositions={},fe._lw=r.crispRound(O,fe.linewidth,1),fe._mainLinePosition=ee(fe,q,fe.side),fe._mainMirrorPosition=fe.mirror&&q?ee(fe,q,i.OPPOSITE_SIDE[fe.side]):null}var oe=[],ae=[],j=[],Q=t.opacity(P.paper_bgcolor)===1&&t.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(se in P._plots)if(le=P._plots[se],le.mainplot)le.bg&&le.bg.remove(),le.bg=void 0;else{var re=le.xaxis.domain,ce=le.yaxis.domain,be=le.plotgroup;if(w(re,ce,j)&&se.indexOf(_)===-1){var Ae=be.node(),De=le.bg=S.ensureSingle(be,"rect","bg");Ae.insertBefore(De.node(),Ae.childNodes[0]),ae.push(se)}else be.select("rect.bg").remove(),j.push([re,ce]),Q||(oe.push(se),ae.push(se))}var ze=P._bgLayer.selectAll(".bg").data(oe);for(ze.enter().append("rect").classed("bg",!0),ze.exit().remove(),ze.each(function(Te){P._plots[Te].bg=G.select(this)}),$=0;$<ae.length;$++)le=P._plots[ae[$]],V=le.xaxis,Y=le.yaxis,le.bg&&V._offset!==void 0&&Y._offset!==void 0&&le.bg.call(r.setRect,V._offset-B,Y._offset-B,V._length+2*B,Y._length+2*B).call(t.fill,P.plot_bgcolor).style("stroke-width",0);if(!P._hasOnlyLargeSploms)for(se in P._plots){le=P._plots[se],V=le.xaxis,Y=le.yaxis;var Ze=le.clipId="clip"+P._uid+se+"plot",at=S.ensureSingleById(P._clips,"clipPath",Ze,function(Te){Te.classed("plotclip",!0).append("rect")});le.clipRect=at.select("rect").attr({width:V._length,height:Y._length}),r.setTranslate(le.plot,V._offset,Y._offset);var nt,rt;le._hasClipOnAxisFalse?(nt=null,rt=Ze):(nt=Ze,rt=null),r.setClipUrl(le.plot,nt,O),le.layerClipId=rt}var st,Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt,Wt,kr;function mr(Te){return"M"+st+","+Te+"H"+Me}function qr(Te){return"M"+V._offset+","+Te+"h"+V._length}function Sr(Te){return"M"+Te+","+Qe+"V"+ot}function Rr(Te){return Y._shift!==void 0&&(Te+=Y._shift),"M"+Te+","+Y._offset+"v"+Y._length}function wt(Te,Ie,Ve){if(!Te.showline||se!==Te._mainSubplot)return"";if(!Te._anchorAxis)return Ve(Te._mainLinePosition);var Ce=Ie(Te._mainLinePosition);return Te.mirror&&(Ce+=Ie(Te._mainMirrorPosition)),Ce}for(se in P._plots){le=P._plots[se],V=le.xaxis,Y=le.yaxis;var Ne="M0,0";M(V,se)&&(Oe=b(V,"left",Y,X),st=V._offset-(Oe?B+Oe:0),tt=b(V,"right",Y,X),Me=V._offset+V._length+(tt?B+tt:0),ye=ee(V,Y,"bottom"),he=ee(V,Y,"top"),kr=!V._anchorAxis||se!==V._mainSubplot,kr&&(V.mirror==="allticks"||V.mirror==="all")&&(V._linepositions[se]=[ye,he]),Ne=wt(V,mr,qr),kr&&V.showline&&(V.mirror==="all"||V.mirror==="allticks")&&(Ne+=mr(ye)+mr(he)),le.xlines.style("stroke-width",V._lw+"px").call(t.stroke,V.showline?V.linecolor:"rgba(0,0,0,0)")),le.xlines.attr("d",Ne);var Ke="M0,0";M(Y,se)&&(qt=b(Y,"bottom",V,X),ot=Y._offset+Y._length+(qt?B:0),Wt=b(Y,"top",V,X),Qe=Y._offset-(Wt?B:0),Pt=ee(Y,V,"left"),It=ee(Y,V,"right"),kr=!Y._anchorAxis||se!==Y._mainSubplot,kr&&(Y.mirror==="allticks"||Y.mirror==="all")&&(Y._linepositions[se]=[Pt,It]),Ke=wt(Y,Sr,Rr),kr&&Y.showline&&(Y.mirror==="all"||Y.mirror==="allticks")&&(Ke+=Sr(Pt)+Sr(It)),le.ylines.style("stroke-width",Y._lw+"px").call(t.stroke,Y.showline?Y.linecolor:"rgba(0,0,0,0)")),le.ylines.attr("d",Ke)}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),se=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:se,y:$,"text-anchor":B,dy:X}}),P.text&&P.automargin){var le=G.select(O).selectAll(".gtitle"),fe=r.bBox(G.select(O).selectAll(".g-gtitle").node()).height,V=y(O,P,fe);if(V>0){f(O,$,V,fe),le.attr({x:se,y:$,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,se,$);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),le.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-ee+"em";this.setAttribute("dy",Q)})}var q=G.select(O).selectAll(".gtitle-subtitle");if(q.node()){var oe=le.node().getBBox(),ae=oe.y+oe.height,j=ae+o.SUBTITLE_PADDING_EM*P.subtitle.font.size;q.attr({x:se,y:j,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,se,j)}}}};function d(O,P,U,B,X){var $=P.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,se=S.isTopAnchor(P)?B:B-X,le=U==="b"?$-se:se;return S.isTopAnchor(P)&&U==="t"||S.isBottomAnchor(P)&&U==="b"?!1:le<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",se=O._fullLayout.margin[$],le=0;return P.yref==="paper"?le=U+P.pad.t+P.pad.b:P.yref==="container"&&(le=u($,B,X,O._fullLayout.height,U)+P.pad.t+P.pad.b),le>se?le:0}function f(O,P,U,B){var X="title.automargin",$=O._fullLayout.title,se=$.y>.5?"t":"b",le={x:$.x,y:$.y,t:0,b:0},fe={};$.yref==="paper"&&d(O,$,se,P,B)?le[se]=U:$.yref==="container"&&(fe[se]=U,O._fullLayout._reservedMargin[X]=fe),x.allowAutoMargin(O,X),x.autoMargin(O,X,le)}function R(O,P){var U=O.title,B=O._size,X=0;switch(P===p?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=p),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]||{},se=$.trace||{},le=se._module||{},fe=le.arraysToCalcdata;fe&&fe(X,se);var V=le.editStyle;V&&U.push({fn:V,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),v.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doColorBars=function(O){return v.getComponentMethod("colorbar","draw")(O),x.previousPromises(O)},Z.layoutReplot=function(O){var P=O.layout;return O.layout=void 0,v.call("_doPlot",O,"",P)},Z.doLegend=function(O){return v.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doTicksRelayout=function(O){return n.draw(O,"redraw"),O._fullLayout._hasOnlyLargeSploms&&(v.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),v.getComponentMethod("selections","draw")(O),v.getComponentMethod("shapes","draw")(O),v.getComponentMethod("annotations","draw")(O),v.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=[],$,se;for(P._hasOnlyLargeSploms&&P._splomGrid.draw(),$=0;$<U.length;$++){var le=U[$];le.visible===!0&&le._length!==0&&(le.type==="splom"?P._splomScenes[le.uid].draw():le.type==="scattergl"?S.pushUnique(B,le.xaxis+le.yaxis):le.type==="scatterpolargl"&&S.pushUnique(X,le.subplot))}for($=0;$<B.length;$++)se=P._plots[B[$]],se._scene&&se._scene.draw();for($=0;$<X.length;$++)se=P[X[$]]._subplot,se._scene&&se._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,c(O,U),m(O,U);var $=U._matchGroup;if($)for(var se in $){var le=n.getFromId(O,se);m(O,le,U.range),B[se]=1}}h(O)},Z.finalDraw=function(O){v.getComponentMethod("rangeslider","draw")(O),v.getComponentMethod("rangeselector","draw")(O)},Z.drawMarginPushers=function(O){v.getComponentMethod("legend","draw")(O),v.getComponentMethod("rangeselector","draw")(O),v.getComponentMethod("sliders","draw")(O),v.getComponentMethod("updatemenus","draw")(O),v.getComponentMethod("colorbar","draw")(O)}}}),k5=Xe({"src/components/selections/draw.js"(Z,G){"use strict";var v=r0().readPaths,x=M2(),S=$m().clearOutlineControllers,E=$n(),e=es(),t=zl().arrayEditor,r=a0(),o=r.getPathString;G.exports={draw:a,drawOne:i,activateLastSelection:c};function a(p){var T=p._fullLayout;S(p),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(p,w)}function n(p){return p._context.editSelection}function i(p,T){p._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+T+'"]').remove();var l=r.makeSelectionsOptionsAndPlotinfo(p,T),_=l.options,w=l.plotinfo;if(!_._input)return;A(p._fullLayout._selectionLayer);function A(M){var g=o(p,_),b={"data-index":T,"fill-rule":"evenodd",d:g},d=_.opacity,u="rgba(0,0,0,0)",y=_.line.color||E.contrast(p._fullLayout.plot_bgcolor),f=_.line.width,R=_.line.dash;f||(f=5,R="solid");var L=n(p)&&p._fullLayout._activeSelectionIndex===T;L&&(u=p._fullLayout.activeselection.fillcolor,d=p._fullLayout.activeselection.opacity);for(var z=[],F=1;F>=0;F--){var N=M.append("path").attr(b).style("opacity",F?.1:d).call(E.stroke,y).call(E.fill,u).call(e.dashLine,F?"solid":R,F?4+f:f);if(s(N,p,_),L){var O=t(p.layout,"selections",_);N.style({cursor:"move"});var P={element:N.node(),plotinfo:w,gd:p,editHelpers:O,isActiveSelection:!0},U=v(g,p);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(p,B)})}}function s(p,T,l){var _=l.xref+l.yref;e.setClipUrl(p,"clip"+T._fullLayout._uid+_,T)}function h(p,T){if(n(p)){var l=T.node(),_=+l.getAttribute("data-index");if(_>=0){if(_===p._fullLayout._activeSelectionIndex){m(p);return}p._fullLayout._activeSelectionIndex=_,p._fullLayout._deactivateSelection=m,a(p)}}}function c(p){if(n(p)){var T=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=T,p._fullLayout._deactivateSelection=m,a(p)}}function m(p){if(n(p)){var T=p._fullLayout._activeSelectionIndex;T>=0&&(S(p),delete p._fullLayout._activeSelectionIndex,a(p))}}}}),Az=Xe({"node_modules/polybooljs/lib/build-log.js"(Z,G){function v(){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}G.exports=v}}),Sz=Xe({"node_modules/polybooljs/lib/epsilon.js"(Z,G){function v(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],c=E[1]-t[1],m=(n*c-i*h)/s,p=(o*c-a*h)/s,T={alongA:0,alongB:0,pt:[E[0]+m*o,E[1]+m*a]};return m<=-x?T.alongA=-2:m<x?T.alongA=-1:m-1<=-x?T.alongA=0:m-1<x?T.alongA=1:T.alongA=2,p<=-x?T.alongB=-2:p<x?T.alongB=-1:p-1<=-x?T.alongB=0:p-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}G.exports=v}}),Mz=Xe({"node_modules/polybooljs/lib/linked-list.js"(Z,G){var v={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}};G.exports=v}}),Ez=Xe({"node_modules/polybooljs/lib/intersecter.js"(Z,G){var v=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=v.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 _=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return n(_,T.end),_}function s(T,l,_){var w=v.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 c(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 m(T,l){var _=r(l,T.seg.end,T.seg);return c(T,l),h(_,T.primary)}function p(T,l){var _=v.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,se=B.start,le=B.end;e&&e.checkIntersection(U,B);var fe=E.linesIntersect(X,$,se,le);if(fe===!1){if(!E.pointsCollinear(X,$,se)||E.pointsSame(X,le)||E.pointsSame($,se))return!1;var V=E.pointsSame(X,se),Y=E.pointsSame($,le);if(V&&Y)return P;var ee=!V&&E.pointBetween(X,se,le),q=!Y&&E.pointBetween($,se,le);if(V)return q?m(P,$):m(O,le),P;ee&&(Y||(q?m(P,$):m(O,le)),m(P,X))}else fe.alongA===0&&(fe.alongB===-1?m(O,se):fe.alongB===0?m(O,fe.pt):fe.alongB===1&&m(O,le)),fe.alongB===0&&(fe.alongA===-1?m(P,X):fe.alongA===0?m(P,fe.pt):fe.alongA===1&&m(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 f?M(b,f):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),y=u.before?u.before.ev:null,f=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,y?y.seg:!1,f?f.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,f?b.seg.myFill.below=f.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;f?b.primary===f.primary?z=f.seg.otherFill.above:z=f.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,y?y.seg:!1,f?f.seg:!1),b.other.status=u.insert(v.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 p(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)}),p(l,w)}}}G.exports=x}}),kz=Xe({"node_modules/polybooljs/lib/segment-chainer.js"(Z,G){function v(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 c=0;c<e.length;c++){var m=e[c],p=m[0],T=m[1],l=m[m.length-1],_=m[m.length-2];if(S.pointsSame(p,o)){if(h(c,!0,!0))break}else if(S.pointsSame(p,a)){if(h(c,!0,!1))break}else if(S.pointsSame(l,o)){if(h(c,!1,!0))break}else if(S.pointsSame(l,a)&&h(c,!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,m=e[w],g=M?m[0]:m[m.length-1],b=M?m[1]:m[m.length-2],d=M?m[m.length-1]:m[0],u=M?m[m.length-2]:m[1];if(S.pointsCollinear(b,g,A)&&(M?(E&&E.chainRemoveHead(n.index,A),m.shift()):(E&&E.chainRemoveTail(n.index,A),m.pop()),g=b),S.pointsSame(d,A)){e.splice(w,1),S.pointsCollinear(u,d,g)&&(M?(E&&E.chainRemoveTail(n.index,g),m.pop()):(E&&E.chainRemoveHead(n.index,g),m.shift())),E&&E.chainClose(n.index),t.push(m);return}M?(E&&E.chainAddHead(n.index,A),m.unshift(A)):(E&&E.chainAddTail(n.index,A),m.push(A));return}function y(F){E&&E.chainReverse(F),e[F].reverse()}function f(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),f(R,L)):(y(L),f(L,R)):f(L,R):i.matches_head?f(R,L):z?(y(R),f(L,R)):(y(L),f(R,L))}),t}G.exports=v}}),Cz=Xe({"node_modules/polybooljs/lib/segment-selector.js"(Z,G){function v(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 v(S,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],E)},intersect:function(S,E){return v(S,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],E)},difference:function(S,E){return v(S,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],E)},differenceRev:function(S,E){return v(S,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],E)},xor:function(S,E){return v(S,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],E)}};G.exports=x}}),Lz=Xe({"node_modules/polybooljs/lib/geojson.js"(Z,G){var v={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(m,p){return S.pointInsideRegion([(m[0][0]+m[1][0])*.5,(m[0][1]+m[1][1])*.5],p)}function t(m){return{region:m,children:[]}}var r=t(null);function o(m,p){for(var T=0;T<m.children.length;T++){var l=m.children[T];if(e(p,l.region)){o(l,p);return}}for(var _=t(p),T=0;T<m.children.length;T++){var l=m.children[T];e(l.region,p)&&(_.children.push(l),m.children.splice(T,1),T--)}m.children.push(_)}for(var a=0;a<E.regions.length;a++){var n=E.regions[a];n.length<3||o(r,n)}function i(m,p){for(var T=0,l=m[m.length-1][0],_=m[m.length-1][1],w=[],A=0;A<m.length;A++){var M=m[A][0],g=m[A][1];w.push([M,g]),T+=g*l-M*_,l=M,_=g}var b=T<0;return b!==p&&w.reverse(),w.push([w[0][0],w[0][1]]),w}var s=[];function h(m){var p=[i(m.region,!1)];s.push(p);for(var T=0;T<m.children.length;T++)p.push(c(m.children[T]))}function c(m){for(var p=0;p<m.children.length;p++)h(m.children[p]);return i(m.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}}};G.exports=v}}),Pz=Xe({"node_modules/polybooljs/index.js"(Z,G){var v=Az(),x=Sz(),S=Ez(),E=kz(),e=Cz(),t=Lz(),r=!1,o=x(),a;a={buildLog:function(i){return i===!0?r=v():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 c=a.segments(i),m=a.segments(s),p=a.combine(c,m),T=h(p);return a.polygon(T)}typeof window=="object"&&(window.PolyBool=a),G.exports=a}}),Iz=Xe({"node_modules/point-in-polygon/nested.js"(Z,G){G.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],c=S[i+E][0],m=S[i+E][1],p=h>r!=m>r&&t<(c-s)*(r-h)/(m-h)+s;p&&(o=!o)}return o}}}),I_=Xe({"src/lib/polygon.js"(Z,G){"use strict";var v=d2().dot,x=Hs().BADNUM,S=G.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 c(l,_){var w=l[0],A=l[1];return!(w===x||w<r||w>o||A===x||A<a||A>n||_&&h(l))}function m(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],d=0,u,y,f,R,L;for(u=1;u<M;u++)if(y=g,f=b,g=t[u][0],b=t[u][1],R=Math.min(y,g),!(w<R||w>Math.max(y,g)||A>Math.max(f,b)))if(A<Math.min(f,b))w!==R&&d++;else{if(g===y?L=A:L=f+(w-y)*(b-f)/(g-y),A===L)return!(u===1&&_);A<=L&&w!==R&&d++}return d%2===1}var p=!0,T=t[0];for(i=1;i<t.length;i++)if(T[0]!==t[i][0]||T[1]!==t[i][1]){p=!1;break}return{xmin:r,xmax:o,ymin:a,ymax:n,pts:t,contains:s?c:m,isRect:s,degenerate:p}},S.isSegmentBent=function(e,t,r,o){var a=e[t],n=[e[r][0]-a[0],e[r][1]-a[1]],i=v(n,n),s=Math.sqrt(i),h=[-n[1]/s,n[0]/s],c,m,p;for(c=t+1;c<r;c++)if(m=[e[c][0]-a[0],e[c][1]-a[1]],p=v(m,n),p<0||p>i||Math.abs(v(m,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,c=o;r.splice(a+1);for(var m=c+1;m<e.length;m++)(m===e.length-1||S.isSegmentBent(e,c,m+1,t))&&(r.push(e[m]),r.length<h-2&&(o=m,a=r.length-1),c=m)}if(e.length>1){var i=e.pop();n(i)}return{addPt:n,raw:e,filtered:r}}}}),Rz=Xe({"src/components/selections/constants.js"(Z,G){"use strict";G.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Dz=Xe({"src/components/selections/select.js"(Z,G){"use strict";var v=Pz(),x=Iz(),S=so(),E=es().dashStyle,e=$n(),t=rf(),r=$p().makeEventData,o=Jd(),a=o.freeMode,n=o.rectMode,i=o.drawMode,s=o.openMode,h=o.selectMode,c=a0(),m=L_(),p=M2(),T=$m().clearOutline,l=r0(),_=l.handleEllipse,w=l.readPaths,A=S2().newShapes,M=b5(),g=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),y=y2(),f=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 $(Ne){return Ne.subplot!==void 0}function se(Ne,Ke,Te,Ie,Ve){var Ce=!$(Ie),Ee=a(Ve),Pe=n(Ve),ft=s(Ve),ct=i(Ve),_t=h(Ve),Ct=Ve==="drawline",ir=Ve==="drawcircle",rr=Ct||ir,er=Ie.gd,Lr=er._fullLayout,fa=_t&&Lr.newselection.mode==="immediate"&&Ce,Da=Lr._zoomlayer,Ia=Ie.element.getBoundingClientRect(),qa=Ie.plotinfo,Wa=X(qa),Ca=Ke-Ia.left,hi=Te-Ia.top;Lr._calcInverseTransform(er);var wi=b.apply3DTransform(Lr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Kt=Lr._invScaleX,Ft=Lr._invScaleY,Yt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Ie.xaxes[0],ra=Ie.yaxes[0],ca=ta._length,Ba=ra._length,$a=Ne.altKey&&!(i(Ve)&&ft),Za,ri,pi,Ra,tn,on,hn;q(Ne,er,Ie),Ee&&(Za=N([[Ca,hi]],z.BENDPX));var Tt=Da.selectAll("path.select-outline-"+qa.id).data([1]),ut=ct?Lr.newshape:Lr.newselection;ct&&(Ie.hasText=ut.label.text||ut.label.texttemplate);var Br=ct&&!ft?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ce?e.contrast(er._fullLayout.plot_bgcolor):"#7f7f7f");Tt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:ct?ut.opacity/2:1,"stroke-dasharray":E(ut.line.dash,ut.line.width),"stroke-width":ut.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=Da.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&&Ie.hasText){var Ir=Da.select(".label-temp");Ir.empty()&&(Ir=Da.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ur=Lr._uid+z.SELECTID,Hr=[],xt=re(er,Ie.xaxes,Ie.yaxes,Ie.subplot);fa&&!Ne.shiftKey&&(Ie._clearSubplotSelections=function(){if(Ce){var vr=ta._id,Or=ra._id;ot(er,vr,Or,xt);for(var ba=(er.layout||{}).selections||[],Pa=[],ya=!1,la=0;la<ba.length;la++){var Ta=Lr.selections[la];!Ta||Ta.xref!==vr||Ta.yref!==Or?Pa.push(ba[la]):ya=!0}ya&&(er._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",er,{selections:Pa}))}});var Xt=qr(Ie);Ie.moveFn=function(vr,Or){Ie._clearSubplotSelections&&(Ie._clearSubplotSelections(),Ie._clearSubplotSelections=void 0),Yt=Math.max(0,Math.min(ca,Kt*vr+Ca)),Jt=Math.max(0,Math.min(Ba,Ft*Or+hi));var ba=Math.abs(Yt-Ca),Pa=Math.abs(Jt-hi);if(Pe){var ya,la,Ta;if(_t){var Ai=Lr.selectdirection;switch(Ai==="any"?Pa<Math.min(ba*.6,F)?ya="h":ba<Math.min(Pa*.6,F)?ya="v":ya="d":ya=Ai,ya){case"h":la=ir?Ba/2:0,Ta=Ba;break;case"v":la=ir?ca/2:0,Ta=ca;break}}if(ct)switch(Lr.newshape.drawdirection){case"vertical":ya="h",la=ir?Ba/2:0,Ta=Ba;break;case"horizontal":ya="v",la=ir?ca/2:0,Ta=ca;break;case"ortho":ba<Pa?(ya="h",la=hi,Ta=Jt):(ya="v",la=Ca,Ta=Yt);break;default:ya="d"}ya==="h"?(Ra=rr?_(ir,[Yt,la],[Yt,Ta]):[[Ca,la],[Ca,Ta],[Yt,Ta],[Yt,la]],Ra.xmin=rr?Yt:Math.min(Ca,Yt),Ra.xmax=rr?Yt:Math.max(Ca,Yt),Ra.ymin=Math.min(la,Ta),Ra.ymax=Math.max(la,Ta),xr.attr("d","M"+Ra.xmin+","+(hi-F)+"h-4v"+2*F+"h4ZM"+(Ra.xmax-1)+","+(hi-F)+"h4v"+2*F+"h-4Z")):ya==="v"?(Ra=rr?_(ir,[la,Jt],[Ta,Jt]):[[la,hi],[la,Jt],[Ta,Jt],[Ta,hi]],Ra.xmin=Math.min(la,Ta),Ra.xmax=Math.max(la,Ta),Ra.ymin=rr?Jt:Math.min(hi,Jt),Ra.ymax=rr?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")):ya==="d"&&(Ra=rr?_(ir,[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 Ee&&(Za.addPt([Yt,Jt]),Ra=Za.filtered);if(Ie.selectionDefs&&Ie.selectionDefs.length?(pi=rt(Ie.mergedPolygons,Ra,$a),Ra.subtract=$a,ri=ee(Ie.selectionDefs.concat([Ra]))):(pi=[Ra],ri=O(Ra)),p(Me(pi,ft),Tt,Ie),_t){var ki=he(er,!1),Ki=ki.eventData?ki.eventData.points.slice():[];ki=he(er,!1,ri,xt,Ie),ri=ki.selectionTesters,hn=ki.eventData;var _n;Za?_n=Za.filtered:_n=Wt(pi),y.throttle(Ur,z.SELECTDELAY,function(){Hr=ye(ri,xt);for(var Rn=Hr.slice(),En=0;En<Ki.length;En++){for(var On=Ki[En],no=!1,cn=0;cn<Rn.length;cn++)if(Rn[cn].curveNumber===On.curveNumber&&Rn[cn].pointNumber===On.pointNumber){no=!0;break}no||Rn.push(On)}Rn.length&&(hn||(hn={}),hn.points=Rn),Xt(hn,_n),Sr(er,hn)})}},Ie.clickFn=function(vr,Or){if(xr.remove(),er._fullLayout._activeShapeIndex>=0){er._fullLayout._deactivateShape(er);return}if(!ct){var ba=Lr.clickmode;y.done(Ur).then(function(){if(y.clear(Ur),vr===2){for(Tt.remove(),tn=0;tn<xt.length;tn++)on=xt[tn],on._module.selectPoints(on,!1);if(at(er,xt),j(Ie),wt(er),xt.length){var Pa=xt[0].xaxis,ya=xt[0].yaxis;if(Pa&&ya){for(var la=[],Ta=er._fullLayout.selections,Ai=0;Ai<Ta.length;Ai++){var ki=Ta[Ai];ki&&(ki.xref!==Pa._id||ki.yref!==ya._id)&&la.push(ki)}la.length<Ta.length&&(er._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",er,{selections:la}))}}}else ba.indexOf("select")>-1&&le(Or,er,Ie.xaxes,Ie.yaxes,Ie.subplot,Ie,Tt),ba==="event"&&Rr(er,void 0);t.click(er,Or,qa.id)}).catch(b.error)}},Ie.doneFn=function(){xr.remove(),y.done(Ur).then(function(){y.clear(Ur),!fa&&Ra&&Ie.selectionDefs&&(Ra.subtract=$a,Ie.selectionDefs.push(Ra),Ie.mergedPolygons.length=0,[].push.apply(Ie.mergedPolygons,pi)),(fa||ct)&&j(Ie,fa),Ie.doneFnCompleted&&Ie.doneFnCompleted(Hr),_t&&Rr(er,hn)}).catch(b.error)}}function le(Ne,Ke,Te,Ie,Ve,Ce,Ee){var Pe=Ke._hoverdata,ft=Ke._fullLayout,ct=ft.clickmode,_t=ct.indexOf("event")>-1,Ct=[],ir,rr,er,Lr,fa,Da,Ia,qa,Wa,Ca;if(be(Pe)){q(Ne,Ke,Ce),ir=re(Ke,Te,Ie,Ve);var hi=Ae(Pe,ir),wi=hi.pointNumbers.length>0;if(wi?ze(ir,hi):Ze(ir)&&(Ia=De(hi))){for(Ee&&Ee.remove(),Ca=0;Ca<ir.length;Ca++)rr=ir[Ca],rr._module.selectPoints(rr,!1);at(Ke,ir),j(Ce),_t&&wt(Ke)}else{qa=Ne.shiftKey&&(Ia!==void 0?Ia:De(hi)),er=fe(hi.pointNumber,hi.searchInfo,qa);var Kt=Ce.selectionDefs.concat([er]);for(Lr=ee(Kt,Lr),Ca=0;Ca<ir.length;Ca++)if(fa=ir[Ca]._module.selectPoints(ir[Ca],Lr),Da=st(fa,ir[Ca]),Ct.length)for(var Ft=0;Ft<Da.length;Ft++)Ct.push(Da[Ft]);else Ct=Da;if(Wa={points:Ct},at(Ke,ir,Wa),er&&Ce&&Ce.selectionDefs.push(er),Ee){var Yt=Ce.mergedPolygons,Jt=s(Ce.dragmode);p(Me(Yt,Jt),Ee,Ce)}_t&&Rr(Ke,Wa)}}}function fe(Ne,Ke,Te){return{pointNumber:Ne,searchInfo:Ke,subtract:!!Te}}function V(Ne){return"pointNumber"in Ne&&"searchInfo"in Ne}function Y(Ne){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Ke,Te,Ie,Ve){var Ce=Ne.searchInfo.cd[0].trace.index,Ee=Ve.cd[0].trace.index;return Ee===Ce&&Ie===Ne.pointNumber},isRect:!1,degenerate:!1,subtract:!!Ne.subtract}}function ee(Ne){if(!Ne.length)return;for(var Ke=[],Te=V(Ne[0])?0:Ne[0][0][0],Ie=Te,Ve=V(Ne[0])?0:Ne[0][0][1],Ce=Ve,Ee=0;Ee<Ne.length;Ee++)if(V(Ne[Ee]))Ke.push(Y(Ne[Ee]));else{var Pe=O(Ne[Ee]);Pe.subtract=!!Ne[Ee].subtract,Ke.push(Pe),Te=Math.min(Te,Pe.xmin),Ie=Math.max(Ie,Pe.xmax),Ve=Math.min(Ve,Pe.ymin),Ce=Math.max(Ce,Pe.ymax)}function ft(ct,_t,Ct,ir){for(var rr=!1,er=0;er<Ke.length;er++)Ke[er].contains(ct,_t,Ct,ir)&&(rr=!Ke[er].subtract);return rr}return{xmin:Te,xmax:Ie,ymin:Ve,ymax:Ce,pts:[],contains:ft,isRect:!1,degenerate:!1}}function q(Ne,Ke,Te){var Ie=Ke._fullLayout,Ve=Te.plotinfo,Ce=Te.dragmode,Ee=Ie._lastSelectedSubplot&&Ie._lastSelectedSubplot===Ve.id,Pe=(Ne.shiftKey||Ne.altKey)&&!(i(Ce)&&s(Ce));Ee&&Pe&&Ve.selection&&Ve.selection.selectionDefs&&!Te.selectionDefs?(Te.selectionDefs=Ve.selection.selectionDefs,Te.mergedPolygons=Ve.selection.mergedPolygons):(!Pe||!Ve.selection)&&j(Te),Ee||(T(Ke),Ie._lastSelectedSubplot=Ve.id)}function oe(Ne){return Ne._fullLayout._activeShapeIndex>=0}function ae(Ne){return Ne._fullLayout._activeSelectionIndex>=0}function j(Ne,Ke){var Te=Ne.dragmode,Ie=Ne.plotinfo,Ve=Ne.gd;oe(Ve)&&Ve._fullLayout._deactivateShape(Ve),ae(Ve)&&Ve._fullLayout._deactivateSelection(Ve);var Ce=Ve._fullLayout,Ee=Ce._zoomlayer,Pe=i(Te),ft=h(Te);if(Pe||ft){var ct=Ee.selectAll(".select-outline-"+Ie.id);if(ct&&Ve._fullLayout._outlining){var _t;Pe&&(_t=A(ct,Ne)),_t&&S.call("_guiRelayout",Ve,{shapes:_t});var Ct;ft&&!$(Ne)&&(Ct=M(ct,Ne)),Ct&&(Ve._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",Ve,{selections:Ct}).then(function(){Ke&&g(Ve)})),Ve._fullLayout._outlining=!1}}Ie.selection={},Ie.selection.selectionDefs=Ne.selectionDefs=[],Ie.selection.mergedPolygons=Ne.mergedPolygons=[]}function Q(Ne){return Ne._id}function re(Ne,Ke,Te,Ie){if(!Ne.calcdata)return[];var Ve=[],Ce=Ke.map(Q),Ee=Te.map(Q),Pe,ft,ct;for(ct=0;ct<Ne.calcdata.length;ct++)if(Pe=Ne.calcdata[ct],ft=Pe[0].trace,!(ft.visible!==!0||!ft._module||!ft._module.selectPoints))if($({subplot:Ie})&&(ft.subplot===Ie||ft.geo===Ie))Ve.push(ce(ft._module,Pe,Ke[0],Te[0]));else if(ft.type==="splom"){if(ft._xaxes[Ce[0]]&&ft._yaxes[Ee[0]]){var _t=ce(ft._module,Pe,Ke[0],Te[0]);_t.scene=Ne._fullLayout._splomScenes[ft.uid],Ve.push(_t)}}else if(ft.type==="sankey"){var Ct=ce(ft._module,Pe,Ke[0],Te[0]);Ve.push(Ct)}else{if(Ce.indexOf(ft.xaxis)===-1&&(!ft._xA||!ft._xA.overlaying)||Ee.indexOf(ft.yaxis)===-1&&(!ft._yA||!ft._yA.overlaying))continue;Ve.push(ce(ft._module,Pe,f(Ne,ft.xaxis),f(Ne,ft.yaxis)))}return Ve}function ce(Ne,Ke,Te,Ie){return{_module:Ne,cd:Ke,xaxis:Te,yaxis:Ie}}function be(Ne){return Ne&&Array.isArray(Ne)&&Ne[0].hoverOnBox!==!0}function Ae(Ne,Ke){var Te=Ne[0],Ie=-1,Ve=[],Ce,Ee;for(Ee=0;Ee<Ke.length;Ee++)if(Ce=Ke[Ee],Te.fullData.index===Ce.cd[0].trace.index){if(Te.hoverOnBox===!0)break;Te.pointNumber!==void 0?Ie=Te.pointNumber:Te.binNumber!==void 0&&(Ie=Te.binNumber,Ve=Te.pointNumbers);break}return{pointNumber:Ie,pointNumbers:Ve,searchInfo:Ce}}function De(Ne){var Ke=Ne.searchInfo.cd[0].trace,Te=Ne.pointNumber,Ie=Ne.pointNumbers,Ve=Ie.length>0,Ce=Ve?Ie[0]:Te;return Ke.selectedpoints?Ke.selectedpoints.indexOf(Ce)>-1:!1}function ze(Ne,Ke){var Te=[],Ie,Ve,Ce,Ee;for(Ee=0;Ee<Ne.length;Ee++)Ie=Ne[Ee],Ie.cd[0].trace.selectedpoints&&Ie.cd[0].trace.selectedpoints.length>0&&Te.push(Ie);if(Te.length===1&&(Ce=Te[0]===Ke.searchInfo,Ce&&(Ve=Ke.searchInfo.cd[0].trace,Ve.selectedpoints.length===Ke.pointNumbers.length))){for(Ee=0;Ee<Ke.pointNumbers.length;Ee++)if(Ve.selectedpoints.indexOf(Ke.pointNumbers[Ee])<0)return!1;return!0}return!1}function Ze(Ne){var Ke=0,Te,Ie,Ve;for(Ve=0;Ve<Ne.length;Ve++)if(Te=Ne[Ve],Ie=Te.cd[0].trace,Ie.selectedpoints&&(Ie.selectedpoints.length>1||(Ke+=Ie.selectedpoints.length,Ke>1)))return!1;return Ke===1}function at(Ne,Ke,Te){var Ie;for(Ie=0;Ie<Ke.length;Ie++){var Ve=Ke[Ie].cd[0].trace._fullInput,Ce=Ne._fullLayout._tracePreGUI[Ve.uid]||{};Ce.selectedpoints===void 0&&(Ce.selectedpoints=Ve._input.selectedpoints||null)}var Ee;if(Te){var Pe=Te.points||[];for(Ie=0;Ie<Ke.length;Ie++)Ee=Ke[Ie].cd[0].trace,Ee._input.selectedpoints=Ee._fullInput.selectedpoints=[],Ee._fullInput!==Ee&&(Ee.selectedpoints=[]);for(var ft=0;ft<Pe.length;ft++){var ct=Pe[ft],_t=ct.data,Ct=ct.fullData,ir=ct.pointIndex,rr=ct.pointIndices;rr?([].push.apply(_t.selectedpoints,rr),Ee._fullInput!==Ee&&[].push.apply(Ct.selectedpoints,rr)):(_t.selectedpoints.push(ir),Ee._fullInput!==Ee&&Ct.selectedpoints.push(ir))}}else for(Ie=0;Ie<Ke.length;Ie++)Ee=Ke[Ie].cd[0].trace,delete Ee.selectedpoints,delete Ee._input.selectedpoints,Ee._fullInput!==Ee&&delete Ee._fullInput.selectedpoints;nt(Ne,Ke)}function nt(Ne,Ke){for(var Te=!1,Ie=0;Ie<Ke.length;Ie++){var Ve=Ke[Ie],Ce=Ve.cd;S.traceIs(Ce[0].trace,"regl")&&(Te=!0);var Ee=Ve._module,Pe=Ee.styleOnSelect||Ee.style;Pe&&(Pe(Ne,Ce,Ce[0].node3),Ce[0].nodeRangePlot3&&Pe(Ne,Ce,Ce[0].nodeRangePlot3))}Te&&(R(Ne),L(Ne))}function rt(Ne,Ke,Te){for(var Ie=Te?v.difference:v.union,Ve=Ie({regions:Ne},{regions:[Ke]}),Ce=Ve.regions.reverse(),Ee=0;Ee<Ce.length;Ee++){var Pe=Ce[Ee];Pe.subtract=It(Pe,Ce.slice(0,Ee))}return Ce}function st(Ne,Ke){if(Array.isArray(Ne))for(var Te=Ke.cd,Ie=Ke.cd[0].trace,Ve=0;Ve<Ne.length;Ve++)Ne[Ve]=r(Ne[Ve],Ie,Te);return Ne}function Me(Ne,Ke){for(var Te=[],Ie=0;Ie<Ne.length;Ie++){Te[Ie]=[];for(var Ve=0;Ve<Ne[Ie].length;Ve++){Te[Ie][Ve]=[],Te[Ie][Ve][0]=Ve?"L":"M";for(var Ce=0;Ce<Ne[Ie][Ve].length;Ce++)Te[Ie][Ve].push(Ne[Ie][Ve][Ce])}Ke||Te[Ie].push(["Z",Te[Ie][0][1],Te[Ie][0][2]])}return Te}function ye(Ne,Ke){for(var Te=[],Ie,Ve=[],Ce,Ee=0;Ee<Ke.length;Ee++){var Pe=Ke[Ee];Ce=Pe._module.selectPoints(Pe,Ne),Ve.push(Ce),Ie=st(Ce,Pe),Te=Te.concat(Ie)}return Te}function he(Ne,Ke,Te,Ie,Ve){var Ce=!!Ie,Ee,Pe,ft;Ve&&(Ee=Ve.plotinfo,Pe=Ve.xaxes[0]._id,ft=Ve.yaxes[0]._id);var ct=[],_t=[],Ct=Pt(Ne),ir=Ne._fullLayout;if(Ee){var rr=ir._zoomlayer,er=ir.dragmode,Lr=i(er),fa=h(er);if(Lr||fa){var Da=f(Ne,Pe,"x"),Ia=f(Ne,ft,"y");if(Da&&Ia){var qa=rr.selectAll(".select-outline-"+Ee.id);if(qa&&Ne._fullLayout._outlining&&qa.length){for(var Wa=qa[0][0],Ca=Wa.getAttribute("d"),hi=w(Ca,Ne,Ee),wi=[],Kt=0;Kt<hi.length;Kt++){for(var Ft=hi[Kt],Yt=[],Jt=0;Jt<Ft.length;Jt++)Yt.push([qt(Da,Ft[Jt][1]),qt(Ia,Ft[Jt][2])]);Yt.xref=Pe,Yt.yref=ft,Yt.subtract=It(Yt,wi),wi.push(Yt)}Ct=Ct.concat(wi)}}}}var Fr=Pe&&ft?[Pe+ft]:ir._subplots.cartesian;Oe(Ne);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=Pe&&ft?Te:void 0;if(ri=Qe(Ct,$a,Za,ri),ri){var pi=Ie;if(!Ce){var Ra=f(Ne,$a,"x"),tn=f(Ne,Za,"y");pi=re(Ne,[Ra],[tn],ca);for(var on=0;on<pi.length;on++){var hn=pi[on],Tt=hn.cd[0],ut=Tt.trace;if(hn._module.name==="scattergl"&&!Tt.t.xpx){var Br=ut.x,Cr=ut.y,xr=ut._length;Tt.t.xpx=[],Tt.t.ypx=[];for(var Ir=0;Ir<xr;Ir++)Tt.t.xpx[Ir]=Ra.c2p(Br[Ir]),Tt.t.ypx[Ir]=tn.c2p(Cr[Ir])}hn._module.name==="splom"&&(ta[ut.uid]||(ta[ut.uid]=!0))}}var Ur=ye(ri,pi);ct=ct.concat(Ur),_t=_t.concat(pi)}}var Hr={points:ct};at(Ne,_t,Hr);var xt=ir.clickmode,Xt=xt.indexOf("event")>-1&&Ke;if(!Ee&&Ke){var vr=Pt(Ne,!0);if(vr.length){var Or=vr[0].xref,ba=vr[0].yref;if(Or&&ba){var Pa=Wt(vr),ya=mr([f(Ne,Or,"x"),f(Ne,ba,"y")]);ya(Hr,Pa)}}Ne._fullLayout._noEmitSelectedAtStart?Ne._fullLayout._noEmitSelectedAtStart=!1:Xt&&Rr(Ne,Hr),ir._reselect=!1}if(!Ee&&ir._deselect){var la=ir._deselect;Pe=la.xref,ft=la.yref,tt(Pe,ft,_t)||ot(Ne,Pe,ft,Ie),Xt&&(Hr.points.length?Rr(Ne,Hr):wt(Ne)),ir._deselect=!1}return{eventData:Hr,selectionTesters:Te}}function Oe(Ne){var Ke=Ne.calcdata;if(Ke)for(var Te=0;Te<Ke.length;Te++){var Ie=Ke[Te][0],Ve=Ie.trace,Ce=Ne._fullLayout._splomScenes;if(Ce){var Ee=Ce[Ve.uid];Ee&&(Ee.selectBatch=[])}}}function tt(Ne,Ke,Te){for(var Ie=0;Ie<Te.length;Ie++){var Ve=Te[Ie];if(Ve.xaxis&&Ve.xaxis._id===Ne&&Ve.yaxis&&Ve.yaxis._id===Ke)return!0}return!1}function ot(Ne,Ke,Te,Ie){Ie=re(Ne,[f(Ne,Ke,"x")],[f(Ne,Te,"y")],Ke+Te);for(var Ve=0;Ve<Ie.length;Ve++){var Ce=Ie[Ve];Ce._module.selectPoints(Ce,!1)}at(Ne,Ie)}function Qe(Ne,Ke,Te,Ie){for(var Ve,Ce=0;Ce<Ne.length;Ce++){var Ee=Ne[Ce];if(!(Ke!==Ee.xref||Te!==Ee.yref))if(Ve){var Pe=!!Ee.subtract;Ve=rt(Ve,Ee,Pe),Ie=ee(Ve)}else Ve=[Ee],Ie=O(Ee)}return Ie}function Pt(Ne,Ke){for(var Te=[],Ie=Ne._fullLayout,Ve=Ie.selections,Ce=Ve.length,Ee=0;Ee<Ce;Ee++)if(!(Ke&&Ee!==Ie._activeSelectionIndex)){var Pe=Ve[Ee];if(Pe){var ft=Pe.xref,ct=Pe.yref,_t=f(Ne,ft,"x"),Ct=f(Ne,ct,"y"),ir,rr,er,Lr,fa;if(Pe.type==="rect"){fa=[];var Da=qt(_t,Pe.x0),Ia=qt(_t,Pe.x1),qa=qt(Ct,Pe.y0),Wa=qt(Ct,Pe.y1);fa=[[Da,qa],[Da,Wa],[Ia,Wa],[Ia,qa]],ir=Math.min(Da,Ia),rr=Math.max(Da,Ia),er=Math.min(qa,Wa),Lr=Math.max(qa,Wa),fa.xmin=ir,fa.xmax=rr,fa.ymin=er,fa.ymax=Lr,fa.xref=ft,fa.yref=ct,fa.subtract=!1,fa.isRect=!0,Te.push(fa)}else if(Pe.type==="path")for(var Ca=Pe.path.split("Z"),hi=[],wi=0;wi<Ca.length;wi++){var Kt=Ca[wi];if(Kt){Kt+="Z";var Ft=c.extractPathCoords(Kt,m.paramIsX,"raw"),Yt=c.extractPathCoords(Kt,m.paramIsY,"raw");ir=1/0,rr=-1/0,er=1/0,Lr=-1/0,fa=[];for(var Jt=0;Jt<Ft.length;Jt++){var Fr=qt(_t,Ft[Jt]),ta=qt(Ct,Yt[Jt]);fa.push([Fr,ta]),ir=Math.min(Fr,ir),rr=Math.max(Fr,rr),er=Math.min(ta,er),Lr=Math.max(ta,Lr)}fa.xmin=ir,fa.xmax=rr,fa.ymin=er,fa.ymax=Lr,fa.xref=ft,fa.yref=ct,fa.subtract=It(fa,hi),hi.push(fa),Te.push(fa)}}}}return Te}function It(Ne,Ke){for(var Te=!1,Ie=0;Ie<Ke.length;Ie++)for(var Ve=Ke[Ie],Ce=0;Ce<Ne.length;Ce++)if(x(Ne[Ce],Ve)){Te=!Te;break}return Te}function qt(Ne,Ke){return Ne.type==="date"&&(Ke=Ke.replace("_"," ")),Ne.type==="log"?Ne.c2p(Ke):Ne.r2p(Ke,null,Ne.calendar)}function Wt(Ne){for(var Ke=Ne.length,Te=[],Ie=0;Ie<Ke;Ie++){var Ve=Ne[Ie];Te=Te.concat(Ve),Te=Te.concat([Ve[0]])}return kr(Te)}function kr(Ne){return Ne.isRect=Ne.length===5&&Ne[0][0]===Ne[4][0]&&Ne[0][1]===Ne[4][1]&&Ne[0][0]===Ne[1][0]&&Ne[2][0]===Ne[3][0]&&Ne[0][1]===Ne[3][1]&&Ne[1][1]===Ne[2][1]||Ne[0][1]===Ne[1][1]&&Ne[2][1]===Ne[3][1]&&Ne[0][0]===Ne[3][0]&&Ne[1][0]===Ne[2][0],Ne.isRect&&(Ne.xmin=Math.min(Ne[0][0],Ne[2][0]),Ne.xmax=Math.max(Ne[0][0],Ne[2][0]),Ne.ymin=Math.min(Ne[0][1],Ne[2][1]),Ne.ymax=Math.max(Ne[0][1],Ne[2][1])),Ne}function mr(Ne){return function(Ke,Te){for(var Ie,Ve,Ce=0;Ce<Ne.length;Ce++){var Ee=Ne[Ce],Pe=Ee._id,ft=Pe.charAt(0);if(Te.isRect){Ie||(Ie={});var ct=Te[ft+"min"],_t=Te[ft+"max"];ct!==void 0&&_t!==void 0&&(Ie[Pe]=[U(Ee,ct),U(Ee,_t)].sort(d))}else Ve||(Ve={}),Ve[Pe]=Te.map(B(Ee))}Ie&&(Ke.range=Ie),Ve&&(Ke.lassoPoints=Ve)}}function qr(Ne){var Ke=Ne.plotinfo;return Ke.fillRangeItems||mr(Ne.xaxes.concat(Ne.yaxes))}function Sr(Ne,Ke){Ne.emit("plotly_selecting",Ke)}function Rr(Ne,Ke){Ke&&(Ke.selections=(Ne.layout||{}).selections||[]),Ne.emit("plotly_selected",Ke)}function wt(Ne){Ne.emit("plotly_deselect",null)}G.exports={reselect:he,prepSelect:se,clearOutline:T,clearSelectionsCache:j,selectOnClick:le}}}),C5=Xe({"src/components/annotations/arrow_paths.js"(Z,G){"use strict";G.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_=Xe({"src/constants/axis_placeable_objects.js"(Z,G){"use strict";G.exports={axisRefDescription:function(v,x,S){return["If set to a",v,"axis id (e.g. *"+v+"* or","*"+v+"2*), the `"+v+"` position refers to a",v,"coordinate. If set to *paper*, the `"+v+"`","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",v,"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.,","*"+v+"2 domain* refers to the domain of the second",v," axis and a",v,"position of 0.5 refers to the","point between the",x,"and the",S,"of the domain of the","second",v,"axis."].join(" ")}}}}),$0=Xe({"src/components/annotations/attributes.js"(Z,G){"use strict";var v=C5(),x=tc(),S=lh(),E=zl().templatedArray,e=R_();G.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:v.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:v.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=Xe({"src/traces/scatter/constants.js"(Z,G){"use strict";G.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),$d=Xe({"src/traces/scatter/fillcolor_attribute.js"(Z,G){"use strict";G.exports=function(x){return{valType:"color",editType:"style",anim:!0}}}}),af=Xe({"src/traces/scatter/attributes.js"(Z,G){"use strict";var v=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(p){return{valType:"any",dflt:0,editType:"calc"}}function c(p){return{valType:"any",editType:"calc"}}function m(p){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}G.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:c("x0"),yperiod0:c("y0"),xperiodalignment:m("x"),yperiodalignment:m("y"),xhoverformat:v("x"),yhoverformat:v("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=Xe({"src/components/selections/attributes.js"(Z,G){"use strict";var v=$0(),x=af().line,S=Gh().dash,E=Qo().extendFlat,e=pc().overrideAll,t=zl().templatedArray,r=R_();G.exports=e(t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:E({},v.xref,{}),yref:E({},v.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=Xe({"src/components/selections/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=L5(),e=a0();G.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 v.coerce(r,o,E,R,L)}var i=n("path"),s=i?"path":"rect",h=n("type",s),c=h!=="path";c&&delete o.path,n("opacity"),n("line.color"),n("line.width"),n("line.dash");for(var m=["x","y"],p=0;p<2;p++){var T=m[p],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(_),c){var g=T+"0",b=T+"1",d=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],f=o[b];y!==void 0&&f!==void 0&&(o[g]=A(y),o[b]=A(f),r[g]=d,r[b]=u)}}c&&v.noneOrAll(r,o,["x0","x1","y0","y1"])}}}),Fz=Xe({"src/components/selections/draw_newselection/defaults.js"(Z,G){"use strict";G.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_=Xe({"src/plots/cartesian/include_components.js"(Z,G){"use strict";var v=so(),x=sa(),S=ef();G.exports=function(e){return function(r,o){var a=r[e];if(Array.isArray(a))for(var n=v.subplotsRegistry.cartesian,i=n.idRegex,s=o._subplots,h=s.xaxis,c=s.yaxis,m=s.cartesian,p=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){p||x.pushUnique(o._basePlotModules,n);var g=!1;A&&h.indexOf(_)===-1&&(h.push(_),g=!0),M&&c.indexOf(w)===-1&&(c.push(w),g=!0),g&&A&&M&&m.push(_+w)}}}}}}}),Af=Xe({"src/components/selections/index.js"(Z,G){"use strict";var v=k5(),x=Dz();G.exports={moduleType:"component",name:"selections",layoutAttributes:L5(),supplyLayoutDefaults:zz(),supplyDrawNewSelectionDefaults:Fz(),includeBasePlot:D_()("selections"),draw:v.draw,drawOne:v.drawOne,reselect:x.reselect,prepSelect:x.prepSelect,clearOutline:x.clearOutline,clearSelectionsCache:x.clearSelectionsCache,selectOnClick:x.selectOnClick}}}),P5=Xe({"src/plots/cartesian/dragbox.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.numberFormat,E=Ch(),e=b2(),t=so(),r=x.strTranslate,o=ou(),a=$n(),n=es(),i=rf(),s=Go(),h=Kd(),c=Ap(),m=Jd(),p=m.selectingOrDrawing,T=m.freeMode,l=uh().FROM_TL,_=C_(),w=P_().redrawReglTraces,A=bc(),M=ef().getFromId,g=Af().prepSelect,b=Af().clearOutline,d=Af().selectOnClick,u=E5(),y=lh(),f=y.MINDRAG,R=y.MINZOOM,L=!0;function z(ce,be,Ae,De,ze,Ze,at,nt){var rt=ce._fullLayout._zoomlayer,st=at+nt==="nsew",Me=(at+nt).length===1,ye,he,Oe,tt,ot,Qe,Pt,It,qt,Wt,kr,mr,qr,Sr,Rr,wt,Ne,Ke,Te,Ie,Ve,Ce,Ee;Ae+=be.yaxis._shift;function Pe(){if(ye=be.xaxis,he=be.yaxis,qt=ye._length,Wt=he._length,Pt=ye._offset,It=he._offset,Oe={},Oe[ye._id]=ye,tt={},tt[he._id]=he,at&&nt)for(var Tt=be.overlays,ut=0;ut<Tt.length;ut++){var Br=Tt[ut].xaxis;Oe[Br._id]=Br;var Cr=Tt[ut].yaxis;tt[Cr._id]=Cr}ot=re(Oe),Qe=re(tt),qr=O(ot,nt),Sr=O(Qe,at),Rr=!Sr&&!qr,mr=j(ce,ce._fullLayout._axisMatchGroups,Oe,tt),kr=j(ce,ce._fullLayout._axisConstraintGroups,Oe,tt,mr);var xr=kr.isSubplotConstrained||mr.isSubplotConstrained;wt=nt||xr,Ne=at||xr;var Ir=ce._fullLayout;Ke=Ir._has("scattergl"),Te=Ir._has("splom"),Ie=Ir._has("svg")}Pe();var ft=$(Sr+qr,ce._fullLayout.dragmode,st),ct=N(be,at+nt+"drag",ft,Ae,De,ze,Ze);if(Rr&&!st)return ct.onmousedown=null,ct.style.pointerEvents="none",ct;var _t={element:ct,gd:ce,plotinfo:be};_t.prepFn=function(Tt,ut,Br){var Cr=_t.dragmode,xr=ce._fullLayout.dragmode;xr!==Cr&&(_t.dragmode=xr),Pe(),Ce=ce._fullLayout._invScaleX,Ee=ce._fullLayout._invScaleY,Rr||(st?Tt.shiftKey?xr==="pan"?xr="zoom":p(xr)||(xr="pan"):Tt.ctrlKey&&(xr="pan"):xr="pan"),T(xr)?_t.minDrag=1:_t.minDrag=void 0,p(xr)?(_t.xaxes=ot,_t.yaxes=Qe,g(Tt,ut,Br,_t,xr)):(_t.clickFn=ir,p(Cr)&&Ct(),Rr||(xr==="zoom"?(_t.moveFn=Kt,_t.doneFn=Yt,_t.minDrag=1,wi(Tt,ut,Br)):xr==="pan"&&(_t.moveFn=Ba,_t.doneFn=pi))),ce._fullLayout._redrag=function(){var Ir=ce._dragdata;if(Ir&&Ir.element===ct){var Ur=ce._fullLayout.dragmode;p(Ur)||(Pe(),Ra([0,0,qt,Wt]),_t.moveFn(Ir.dx,Ir.dy))}}};function Ct(){_t.plotinfo.selection=!1,b(ce)}function ir(Tt,ut){var Br=_t.gd;if(Br._fullLayout._activeShapeIndex>=0){Br._fullLayout._deactivateShape(Br);return}var Cr=Br._fullLayout.clickmode;if(Y(Br),Tt===2&&!Me&&ri(),st)Cr.indexOf("select")>-1&&d(ut,Br,ot,Qe,be.id,_t),Cr.indexOf("event")>-1&&i.click(Br,ut,be.id);else if(Tt===1&&Me){var xr=at?he:ye,Ir=at==="s"||nt==="w"?0:1,Ur=xr._name+".range["+Ir+"]",Hr=P(xr,Ir),xt="left",Xt="middle";if(xr.fixedrange)return;at?(Xt=at==="n"?"top":"bottom",xr.side==="right"&&(xt="right")):nt==="e"&&(xt="right"),Br._context.showAxisRangeEntryBoxes&&v.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:xt,verticalAlign:Xt}).on("edit",function(vr){var Or=xr.d2r(vr);Or!==void 0&&t.call("_guiRelayout",Br,Ur,Or)})}}c.init(_t);var rr,er,Lr,fa,Da,Ia,qa,Wa,Ca,hi;function wi(Tt,ut,Br){var Cr=ct.getBoundingClientRect();rr=ut-Cr.left,er=Br-Cr.top,ce._fullLayout._calcInverseTransform(ce);var xr=x.apply3DTransform(ce._fullLayout._invTransform)(rr,er);rr=xr[0],er=xr[1],Lr={l:rr,r:rr,w:0,t:er,b:er,h:0},fa=ce._hmpixcount?ce._hmlumcount/ce._hmpixcount:E(ce._fullLayout.plot_bgcolor).getLuminance(),Da="M0,0H"+qt+"V"+Wt+"H0V0",Ia=!1,qa="xy",hi=!1,Wa=se(rt,fa,Pt,It,Da),Ca=le(rt,Pt,It)}function Kt(Tt,ut){if(ce._transitioningWithDuration)return!1;var Br=Math.max(0,Math.min(qt,Ce*Tt+rr)),Cr=Math.max(0,Math.min(Wt,Ee*ut+er)),xr=Math.abs(Br-rr),Ir=Math.abs(Cr-er);Lr.l=Math.min(rr,Br),Lr.r=Math.max(rr,Br),Lr.t=Math.min(er,Cr),Lr.b=Math.max(er,Cr);function Ur(){qa="",Lr.r=Lr.l,Lr.t=Lr.b,Ca.attr("d","M0,0Z")}if(kr.isSubplotConstrained)xr>R||Ir>R?(qa="xy",xr/qt>Ir/Wt?(Ir=xr*Wt/qt,er>Cr?Lr.t=er-Ir:Lr.b=er+Ir):(xr=Ir*qt/Wt,rr>Br?Lr.l=rr-xr:Lr.r=rr+xr),Ca.attr("d",ae(Lr))):Ur();else if(mr.isSubplotConstrained)if(xr>R||Ir>R){qa="xy";var Hr=Math.min(Lr.l/qt,(Wt-Lr.b)/Wt),xt=Math.max(Lr.r/qt,(Wt-Lr.t)/Wt);Lr.l=Hr*qt,Lr.r=xt*qt,Lr.b=(1-Hr)*Wt,Lr.t=(1-xt)*Wt,Ca.attr("d",ae(Lr))}else Ur();else!Sr||Ir<Math.min(Math.max(xr*.6,f),R)?xr<f||!qr?Ur():(Lr.t=0,Lr.b=Wt,qa="x",Ca.attr("d",q(Lr,er))):!qr||xr<Math.min(Ir*.6,R)?(Lr.l=0,Lr.r=qt,qa="y",Ca.attr("d",oe(Lr,rr))):(qa="xy",Ca.attr("d",ae(Lr)));Lr.w=Lr.r-Lr.l,Lr.h=Lr.b-Lr.t,qa&&(hi=!0),ce._dragged=hi,fe(Wa,Ca,Lr,Da,Ia,fa),Ft(),ce.emit("plotly_relayouting",Ve),Ia=!0}function Ft(){Ve={},(qa==="xy"||qa==="x")&&(U(ot,Lr.l/qt,Lr.r/qt,Ve,kr.xaxes),$a("x",Ve)),(qa==="xy"||qa==="y")&&(U(Qe,(Wt-Lr.b)/Wt,(Wt-Lr.t)/Wt,Ve,kr.yaxes),$a("y",Ve))}function Yt(){Ft(),Y(ce),pi(),ee(ce)}var Jt=[0,0,qt,Wt],Fr=null,ta=y.REDRAWDELAY,ra=be.mainplot?ce._fullLayout._plots[be.mainplot]:be;function ca(Tt){if(!ce._context._scrollZoom.cartesian&&!ce._fullLayout._enablescrollzoom)return;if(Ct(),ce._transitioningWithDuration){Tt.preventDefault(),Tt.stopPropagation();return}Pe(),clearTimeout(Fr);var ut=-Tt.deltaY;if(isFinite(ut)||(ut=Tt.wheelDelta/10),!isFinite(ut)){x.log("Did not find wheel motion attributes: ",Tt);return}var Br=Math.exp(-Math.min(Math.max(ut,-20),20)/200),Cr=ra.draglayer.select(".nsewdrag").node().getBoundingClientRect(),xr=(Tt.clientX-Cr.left)/Cr.width,Ir=(Cr.bottom-Tt.clientY)/Cr.height,Ur;function Hr(xt,Xt,vr){if(xt.fixedrange)return;var Or=x.simpleMap(xt.range,xt.r2l),ba=Or[0]+(Or[1]-Or[0])*Xt;function Pa(ya){return xt.l2r(ba+(ya-ba)*vr)}xt.range=Or.map(Pa)}if(wt){for(nt||(xr=.5),Ur=0;Ur<ot.length;Ur++)Hr(ot[Ur],xr,Br);$a("x"),Jt[2]*=Br,Jt[0]+=Jt[2]*xr*(1/Br-1)}if(Ne){for(at||(Ir=.5),Ur=0;Ur<Qe.length;Ur++)Hr(Qe[Ur],Ir,Br);$a("y"),Jt[3]*=Br,Jt[1]+=Jt[3]*(1-Ir)*(1/Br-1)}Ra(Jt),Za(),ce.emit("plotly_relayouting",Ve),Fr=setTimeout(function(){ce._fullLayout&&(Jt=[0,0,qt,Wt],pi())},ta),Tt.preventDefault()}at.length*nt.length!==1&&Q(ct,ca);function Ba(Tt,ut){if(Tt=Tt*Ce,ut=ut*Ee,ce._transitioningWithDuration)return;if(ce._fullLayout._replotting=!0,qr==="ew"||Sr==="ns"){var Br=qr?-Tt:0,Cr=Sr?-ut:0;if(mr.isSubplotConstrained){if(qr&&Sr){var xr=(Tt/qt-ut/Wt)/2;Tt=xr*qt,ut=-xr*Wt,Br=-Tt,Cr=-ut}Sr?Br=-Cr*qt/Wt:Cr=-Br*Wt/qt}qr&&(B(ot,Tt),$a("x")),Sr&&(B(Qe,ut),$a("y")),Ra([Br,Cr,qt,Wt]),Za(),ce.emit("plotly_relayouting",Ve);return}function Ir(Pa,ya,la){for(var Ta=1-ya,Ai,ki,Ki=0;Ki<Pa.length;Ki++){var _n=Pa[Ki];if(!_n.fixedrange){Ai=_n,ki=_n._rl[Ta]+(_n._rl[ya]-_n._rl[Ta])/X(la/_n._length);var Rn=_n.l2r(ki);Rn!==!1&&Rn!==void 0&&(_n.range[ya]=Rn)}}return Ai._length*(Ai._rl[ya]-ki)/(Ai._rl[ya]-Ai._rl[Ta])}var Ur=qr==="w"==(Sr==="n")?1:-1;if(qr&&Sr&&(kr.isSubplotConstrained||mr.isSubplotConstrained)){var Hr=(Tt/qt+Ur*ut/Wt)/2;Tt=Hr*qt,ut=Ur*Hr*Wt}var xt,Xt;if(qr==="w"?Tt=Ir(ot,0,Tt):qr==="e"?Tt=Ir(ot,1,-Tt):qr||(Tt=0),Sr==="n"?ut=Ir(Qe,1,ut):Sr==="s"?ut=Ir(Qe,0,-ut):Sr||(ut=0),xt=qr==="w"?Tt:0,Xt=Sr==="n"?ut:0,kr.isSubplotConstrained&&!mr.isSubplotConstrained||mr.isSubplotConstrained&&qr&&Sr&&Ur>0){var vr;if(mr.isSubplotConstrained||!qr&&Sr.length===1){for(vr=0;vr<ot.length;vr++)ot[vr].range=ot[vr]._r.slice(),u(ot[vr],1-ut/Wt);Tt=ut*qt/Wt,xt=Tt/2}if(mr.isSubplotConstrained||!Sr&&qr.length===1){for(vr=0;vr<Qe.length;vr++)Qe[vr].range=Qe[vr]._r.slice(),u(Qe[vr],1-Tt/qt);ut=Tt*Wt/qt,Xt=ut/2}}(!mr.isSubplotConstrained||!Sr)&&$a("x"),(!mr.isSubplotConstrained||!qr)&&$a("y");var Or=qt-Tt,ba=Wt-ut;mr.isSubplotConstrained&&!(qr&&Sr)&&(qr?(Xt=xt?0:Tt*Wt/qt,ba=Or*Wt/qt):(xt=Xt?0:ut*qt/Wt,Or=ba*qt/Wt)),Ra([xt,Xt,Or,ba]),Za(),ce.emit("plotly_relayouting",Ve)}function $a(Tt,ut){for(var Br=mr.isSubplotConstrained?{x:Qe,y:ot}[Tt]:mr[Tt+"axes"],Cr=mr.isSubplotConstrained?{x:ot,y:Qe}[Tt]:[],xr=0;xr<Br.length;xr++){var Ir=Br[xr],Ur=Ir._id,Hr=mr.xLinks[Ur]||mr.yLinks[Ur],xt=Cr[0]||Oe[Hr]||tt[Hr];xt&&(ut?(ut[Ir._name+".range[0]"]=ut[xt._name+".range[0]"],ut[Ir._name+".range[1]"]=ut[xt._name+".range[1]"]):Ir.range=xt.range.slice())}}function Za(){var Tt=[],ut;function Br(Ur){for(ut=0;ut<Ur.length;ut++)Ur[ut].fixedrange||Tt.push(Ur[ut]._id)}function Cr(Ur,Hr){for(ut=0;ut<Ur.length;ut++){var xt=Ur[ut],Xt=xt[Hr];!xt.fixedrange&&Xt.tickmode==="sync"&&Tt.push(Xt._id)}}for(wt&&(Br(ot),Br(kr.xaxes),Br(mr.xaxes),Cr(be.overlays,"xaxis")),Ne&&(Br(Qe),Br(kr.yaxes),Br(mr.yaxes),Cr(be.overlays,"yaxis")),Ve={},ut=0;ut<Tt.length;ut++){var xr=Tt[ut],Ir=M(ce,xr);s.drawOne(ce,Ir,{skipTitle:!0}),Ve[Ir._name+".range[0]"]=Ir.range[0],Ve[Ir._name+".range[1]"]=Ir.range[1]}s.redrawComponents(ce,Tt)}function ri(){if(!ce._transitioningWithDuration){var Tt=ce._context.doubleClick,ut=[];qr&&(ut=ut.concat(ot)),Sr&&(ut=ut.concat(Qe)),mr.xaxes&&(ut=ut.concat(mr.xaxes)),mr.yaxes&&(ut=ut.concat(mr.yaxes));var Br={},Cr,xr;if(Tt==="reset+autosize")for(Tt="autosize",xr=0;xr<ut.length;xr++){Cr=ut[xr];var Ir=Cr._rangeInitial0,Ur=Cr._rangeInitial1,Hr=Ir!==void 0||Ur!==void 0;if(Hr&&(Ir!==void 0&&Ir!==Cr.range[0]||Ur!==void 0&&Ur!==Cr.range[1])||!Hr&&Cr.autorange!==!0){Tt="reset";break}}if(Tt==="autosize")for(xr=0;xr<ut.length;xr++)Cr=ut[xr],Cr.fixedrange||(Br[Cr._name+".autorange"]=!0);else if(Tt==="reset"){for((qr||kr.isSubplotConstrained)&&(ut=ut.concat(kr.xaxes)),Sr&&!kr.isSubplotConstrained&&(ut=ut.concat(kr.yaxes)),kr.isSubplotConstrained&&(qr?Sr||(ut=ut.concat(Qe)):ut=ut.concat(ot)),xr=0;xr<ut.length;xr++)if(Cr=ut[xr],!Cr.fixedrange){var xt=Cr._name,Xt=Cr._autorangeInitial;Cr._rangeInitial0===void 0&&Cr._rangeInitial1===void 0?Br[xt+".autorange"]=!0:Cr._rangeInitial0===void 0?(Br[xt+".autorange"]=Xt,Br[xt+".range"]=[null,Cr._rangeInitial1]):Cr._rangeInitial1===void 0?(Br[xt+".range"]=[Cr._rangeInitial0,null],Br[xt+".autorange"]=Xt):Br[xt+".range"]=[Cr._rangeInitial0,Cr._rangeInitial1]}}ce.emit("plotly_doubleclick",null),t.call("_guiRelayout",ce,Br)}}function pi(){Ra([0,0,qt,Wt]),x.syncOrAsync([A.previousPromises,function(){ce._fullLayout._replotting=!1,t.call("_guiRelayout",ce,Ve)}],ce)}function Ra(Tt){var ut=ce._fullLayout,Br=ut._plots,Cr=ut._subplots.cartesian,xr,Ir,Ur,Hr;if(Te&&t.subplotsRegistry.splom.drag(ce),Ke){for(xr=0;xr<Cr.length;xr++)if(Ir=Br[Cr[xr]],Ur=Ir.xaxis,Hr=Ir.yaxis,Ir._scene){Ur.limitRange&&Ur.limitRange(),Hr.limitRange&&Hr.limitRange();var xt=x.simpleMap(Ur.range,Ur.r2l),Xt=x.simpleMap(Hr.range,Hr.r2l);Ir._scene.update({range:[xt[0],Xt[0],xt[1],Xt[1]]})}}if((Te||Ke)&&(_(ce),w(ce)),Ie){var vr=Tt[2]/ye._length,Or=Tt[3]/he._length;for(xr=0;xr<Cr.length;xr++){Ir=Br[Cr[xr]],Ur=Ir.xaxis,Hr=Ir.yaxis;var ba=(wt||mr.isSubplotConstrained)&&!Ur.fixedrange&&Oe[Ur._id],Pa=(Ne||mr.isSubplotConstrained)&&!Hr.fixedrange&&tt[Hr._id],ya,la,Ta,Ai;if(ba?(ya=vr,Ta=nt||mr.isSubplotConstrained?Tt[0]:hn(Ur,ya)):mr.xaHash[Ur._id]?(ya=vr,Ta=Tt[0]*Ur._length/ye._length):mr.yaHash[Ur._id]?(ya=Or,Ta=Sr==="ns"?-Tt[1]*Ur._length/he._length:hn(Ur,ya,{n:"top",s:"bottom"}[Sr])):(ya=tn(Ur,vr,Or),Ta=on(Ur,ya)),ya>1&&(Ur.maxallowed!==void 0&&wt===(Ur.range[0]<Ur.range[1]?"e":"w")||Ur.minallowed!==void 0&&wt===(Ur.range[0]<Ur.range[1]?"w":"e"))&&(ya=1,Ta=0),Pa?(la=Or,Ai=at||mr.isSubplotConstrained?Tt[1]:hn(Hr,la)):mr.yaHash[Hr._id]?(la=Or,Ai=Tt[1]*Hr._length/he._length):mr.xaHash[Hr._id]?(la=vr,Ai=qr==="ew"?-Tt[0]*Hr._length/ye._length:hn(Hr,la,{e:"right",w:"left"}[qr])):(la=tn(Hr,vr,Or),Ai=on(Hr,la)),la>1&&(Hr.maxallowed!==void 0&&Ne===(Hr.range[0]<Hr.range[1]?"n":"s")||Hr.minallowed!==void 0&&Ne===(Hr.range[0]<Hr.range[1]?"s":"n"))&&(la=1,Ai=0),!(!ya&&!la)){ya||(ya=1),la||(la=1);var ki=Ur._offset-Ta/ya,Ki=Hr._offset-Ai/la;Ir.clipRect.call(n.setTranslate,Ta,Ai).call(n.setScale,ya,la),Ir.plot.call(n.setTranslate,ki,Ki).call(n.setScale,1/ya,1/la),(ya!==Ir.xScaleFactor||la!==Ir.yScaleFactor)&&(n.setPointGroupScale(Ir.zoomScalePts,ya,la),n.setTextPointsScale(Ir.zoomScaleTxt,ya,la)),n.hideOutsideRangePoints(Ir.clipOnAxisFalseTraces,Ir),Ir.xScaleFactor=ya,Ir.yScaleFactor=la}}}}function tn(Tt,ut,Br){return Tt.fixedrange?0:wt&&kr.xaHash[Tt._id]?ut:Ne&&(kr.isSubplotConstrained?kr.xaHash:kr.yaHash)[Tt._id]?Br:0}function on(Tt,ut){return ut?(Tt.range=Tt._r.slice(),u(Tt,ut),hn(Tt,ut)):0}function hn(Tt,ut,Br){return Tt._length*(1-ut)*l[Br||Tt.constraintoward||"middle"]}return ct}function F(ce,be,Ae,De){var ze=x.ensureSingle(ce.draglayer,be,Ae,function(Ze){Ze.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",ce.id)});return ze.call(h,De),ze.node()}function N(ce,be,Ae,De,ze,Ze,at){var nt=F(ce,"rect",be,Ae);return v.select(nt).call(n.setRect,De,ze,Ze,at),nt}function O(ce,be){for(var Ae=0;Ae<ce.length;Ae++)if(!ce[Ae].fixedrange)return be;return""}function P(ce,be){var Ae=ce.range[be],De=Math.abs(Ae-ce.range[1-be]),ze;return ce.type==="date"?Ae:ce.type==="log"?(ze=Math.ceil(Math.max(0,-Math.log(De)/Math.LN10))+3,S("."+ze+"g")(Math.pow(10,Ae))):(ze=Math.floor(Math.log(Math.abs(Ae))/Math.LN10)-Math.floor(Math.log(De)/Math.LN10)+4,S("."+String(ze)+"g")(Ae))}function U(ce,be,Ae,De,ze){for(var Ze=0;Ze<ce.length;Ze++){var at=ce[Ze];if(!at.fixedrange)if(at.rangebreaks){var nt=at._id.charAt(0)==="y",rt=nt?1-be:be,st=nt?1-Ae:Ae;De[at._name+".range[0]"]=at.l2r(at.p2l(rt*at._length)),De[at._name+".range[1]"]=at.l2r(at.p2l(st*at._length))}else{var Me=at._rl[0],ye=at._rl[1]-Me;De[at._name+".range[0]"]=at.l2r(Me+ye*be),De[at._name+".range[1]"]=at.l2r(Me+ye*Ae)}}if(ze&&ze.length){var he=(be+(1-Ae))/2;U(ze,he,1-he,De,[])}}function B(ce,be){for(var Ae=0;Ae<ce.length;Ae++){var De=ce[Ae];if(!De.fixedrange){if(De.rangebreaks){var ze=0,Ze=De._length,at=De.p2l(ze+be)-De.p2l(ze),nt=De.p2l(Ze+be)-De.p2l(Ze),rt=(at+nt)/2;De.range=[De.l2r(De._rl[0]-rt),De.l2r(De._rl[1]-rt)]}else De.range=[De.l2r(De._rl[0]-be/De._m),De.l2r(De._rl[1]-be/De._m)];De.limitRange&&De.limitRange()}}}function X(ce){return 1-(ce>=0?Math.min(ce,.9):1/(1/Math.max(ce,-.3)+3.222))}function $(ce,be,Ae){return ce?ce==="nsew"?Ae?"":be==="pan"?"move":"crosshair":ce.toLowerCase()+"-resize":"pointer"}function se(ce,be,Ae,De,ze){return ce.append("path").attr("class","zoombox").style({fill:be>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Ae,De)).attr("d",ze+"Z")}function le(ce,be,Ae){return ce.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(be,Ae)).attr("d","M0,0Z")}function fe(ce,be,Ae,De,ze,Ze){ce.attr("d",De+"M"+Ae.l+","+Ae.t+"v"+Ae.h+"h"+Ae.w+"v-"+Ae.h+"h-"+Ae.w+"Z"),V(ce,be,ze,Ze)}function V(ce,be,Ae,De){Ae||(ce.transition().style("fill",De>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),be.transition().style("opacity",1).duration(200))}function Y(ce){v.select(ce).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ee(ce){L&&ce.data&&ce._context.showTips&&(x.notifier(x._(ce,"Double-click to zoom back out"),"long"),L=!1)}function q(ce,be){return"M"+(ce.l-.5)+","+(be-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(ce.r+.5)+","+(be-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function oe(ce,be){return"M"+(be-R-.5)+","+(ce.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(be-R-.5)+","+(ce.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function ae(ce){var be=Math.floor(Math.min(ce.b-ce.t,ce.r-ce.l,R)/2);return"M"+(ce.l-3.5)+","+(ce.t-.5+be)+"h3v"+-be+"h"+be+"v-3h-"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.t-.5+be)+"h-3v"+-be+"h"+-be+"v-3h"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.b+.5-be)+"h-3v"+be+"h"+-be+"v3h"+(be+3)+"ZM"+(ce.l-3.5)+","+(ce.b+.5-be)+"h3v"+be+"h"+be+"v3h-"+(be+3)+"Z"}function j(ce,be,Ae,De,ze){for(var Ze=!1,at={},nt={},rt,st,Me,ye,he=(ze||{}).xaHash,Oe=(ze||{}).yaHash,tt=0;tt<be.length;tt++){var ot=be[tt];for(rt in Ae)if(ot[rt]){for(Me in ot)!(ze&&(he[Me]||Oe[Me]))&&!(Me.charAt(0)==="x"?Ae:De)[Me]&&(at[Me]=rt);for(st in De)!(ze&&(he[st]||Oe[st]))&&ot[st]&&(Ze=!0)}for(st in De)if(ot[st])for(ye in ot)!(ze&&(he[ye]||Oe[ye]))&&!(ye.charAt(0)==="x"?Ae:De)[ye]&&(nt[ye]=st)}Ze&&(x.extendFlat(at,nt),nt={});var Qe={},Pt=[];for(Me in at){var It=M(ce,Me);Pt.push(It),Qe[It._id]=It}var qt={},Wt=[];for(ye in nt){var kr=M(ce,ye);Wt.push(kr),qt[kr._id]=kr}return{xaHash:Qe,yaHash:qt,xaxes:Pt,yaxes:Wt,xLinks:at,yLinks:nt,isSubplotConstrained:Ze}}function Q(ce,be){if(!e)ce.onwheel!==void 0?ce.onwheel=be:ce.onmousewheel!==void 0?ce.onmousewheel=be:ce.isAddedWheelEvent||(ce.isAddedWheelEvent=!0,ce.addEventListener("wheel",be,{passive:!1}));else{var Ae=ce.onwheel!==void 0?"wheel":"mousewheel";ce._onwheel&&ce.removeEventListener(Ae,ce._onwheel),ce._onwheel=be,ce.addEventListener(Ae,be,{passive:!1})}}function re(ce){var be=[];for(var Ae in ce)be.push(ce[Ae]);return be}G.exports={makeDragBox:z,makeDragger:F,makeRectDragger:N,makeZoombox:se,makeCorners:le,updateZoombox:fe,xyCorners:ae,transitionZoombox:V,removeZoombox:Y,showDoubleClickNotifier:ee,attachWheelEventHandler:Q}}}),I5=Xe({"src/plots/cartesian/graph_interact.js"(Z){"use strict";var G=Hn(),v=rf(),x=Ap(),S=Kd(),E=P5().makeDragBox,e=lh().DRAGGERSIZE;Z.initInteractions=function(r){var o=r._fullLayout;if(r._context.staticPlot){G.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"),c=s.split("y");return h[0]===c[0]?Number(h[1]||1)-Number(c[1]||1):Number(h[0]||1)-Number(c[0]||1)}return o._plots[i].mainplot?1:-1});a.forEach(function(i){var s=o._plots[i],h=s.xaxis,c=s.yaxis;if(!s.mainplot){var m=E(r,s,h._offset,c._offset,h._length,c._length,"ns","ew");m.onmousemove=function(l){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&v.hover(r,l,i)},v.hover(r,l,i),r._fullLayout._lasthover=m,r._fullLayout._hoversubplot=i},m.onmouseout=function(l){r._dragging||(r._fullLayout._hoversubplot=null,x.unhover(r,l))},r._context.showAxisDragHandles&&(E(r,s,h._offset-e,c._offset-e,e,e,"n","w"),E(r,s,h._offset+h._length,c._offset-e,e,e,"n","e"),E(r,s,h._offset-e,c._offset+c._length,e,e,"s","w"),E(r,s,h._offset+h._length,c._offset+c._length,e,e,"s","e"))}if(r._context.showAxisDragHandles){if(i===h._mainSubplot){var p=h._mainLinePosition;h.side==="top"&&(p-=e),E(r,s,h._offset+h._length*.1,p,h._length*.8,e,"","ew"),E(r,s,h._offset,p,h._length*.1,e,"","w"),E(r,s,h._offset+h._length*.9,p,h._length*.1,e,"","e")}if(i===c._mainSubplot){var T=c._mainLinePosition;c.side!=="right"&&(T-=e),E(r,s,T,c._offset+c._length*.1,e,c._length*.8,"ns",""),E(r,s,T,c._offset+c._length*.9,e,c._length*.1,"s",""),E(r,s,T,c._offset,e,c._length*.1,"n","")}}});var n=o._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,v.hover(r,i,o._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,v.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=Xe({"src/plot_api/container_array_match.js"(Z,G){"use strict";var v=so();G.exports=function(S){for(var E=v.layoutArrayContainers,e=v.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=Xe({"src/plot_api/manage_arrays.js"(Z){"use strict";var G=Zv(),v=p2(),x=Km(),S=g2().sorterAsc,E=so();Z.containerArrayMatch=Oz();var e=Z.isAddVal=function(o){return o==="add"||G(o)},t=Z.isRemoveVal=function(o){return o===null||o==="remove"};Z.applyContainerArrayChanges=function(o,a,n,i,s){var h=a.astr,c=E.getComponentMethod(h,"supplyLayoutDefaults"),m=E.getComponentMethod(h,"draw"),p=E.getComponentMethod(h,"drawOne"),T=i.replot||i.recalc||c===v||m===v,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:(c(l,_),m(o),!0)}var A=Object.keys(n).map(Number).sort(S),M=a.get(),g=M||[],b=s(_,h).get(),d=[],u=-1,y=g.length,f,R,L,z,F,N,O,P;for(f=0;f<A.length;f++){if(L=A[f],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)?d.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(f=d.length-1;f>=0;f--)g.splice(d[f],1),b&&b.splice(d[f],1);if(g.length?M||a.set(g):a.set(null),T)return!1;if(c(l,_),p!==v){var U;if(u===-1)U=A;else{for(y=Math.max(g.length,y),U=[],f=0;f<A.length&&(L=A[f],!(L>=u));f++)U.push(L);for(f=u;f<y;f++)U.push(f)}for(f=0;f<U.length;f++)p(o,U[f])}else m(o);return!0}}}),Nz=Xe({"src/plot_api/helpers.js"(Z){"use strict";var G=rs(),v=so(),x=sa(),S=bc(),E=ef(),e=$n(),t=E.cleanId,r=E.getFromTrace,o=v.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,d=Object.keys(l);for(_=0;_<d.length;_++){var u=d[_];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,c(y,"domain")&&delete y.domain}}var f=Array.isArray(l.annotations)?l.annotations.length:0;for(_=0;_<f;_++){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=v.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 d=["x","y","z"];for(A=0;A<d.length;A++){var u=w.contours[d[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,f=(w.decreasing||{}).showlegend!==!1,R=i(w.increasing),L=i(w.decreasing);if(R!==!1&&L!==!1){var z=s(R,L,y,f);z&&(w.name=z)}else(R||L)&&!w.name&&(w.name=R||L)}c(w,"line")&&delete w.line,"marker"in w&&(c(w.marker,"line")&&delete w.marker.line,c(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 c(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(G(_))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],d=G(b);if(d&&_===null){var u=M.slice(0,g-1).join("."),y=x.nestedProperty(A,u).get();y.splice(b,1)}else d&&l.get()===void 0&&l.get()===void 0&&(w[l.astr]=null),l.set(_)};var m=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function p(l){var _=l.search(m);if(_>0)return l.slice(0,_)}Z.hasParent=function(l,_){for(var w=p(_);w;){if(w in l)return!0;w=p(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 d=b._name,u=b._id.slice(1);if(u.slice(0,5)==="scene"){if(w[u]!==void 0)continue;d=u+"."+d}var y=d+".type";w[d]===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=Xe({"src/plot_api/plot_api.js"(Z){"use strict";var G=Hn(),v=rs(),x=i5(),S=sa(),E=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),n=Go(),i=h5(),s=Wh(),h=es(),c=$n(),m=I5().initInteractions,p=vd(),T=Af().clearOutline,l=X0().dfltConfig,_=Bz(),w=Nz(),A=P_(),M=pc(),g=lh().AX_NAME_PATTERN,b=0,d=5;function u(Te,Ie,Ve,Ce){var Ee;if(Te=S.getGraphDiv(Te),e.init(Te),S.isPlainObject(Ie)){var Pe=Ie;Ie=Pe.data,Ve=Pe.layout,Ce=Pe.config,Ee=Pe.frames}var ft=e.triggerHandler(Te,"plotly_beforeplot",[Ie,Ve,Ce]);if(ft===!1)return Promise.reject();!Ie&&!Ve&&!S.isPlotDiv(Te)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Te);function ct(){if(Ee)return Z.addFrames(Te,Ee)}z(Te,Ce),Ve||(Ve={}),G.select(Te).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Te._promises)||(Te._promises=[]);var _t=(Te.data||[]).length===0&&Array.isArray(Ie);Array.isArray(Ie)&&(w.cleanData(Ie),_t?Te.data=Ie:Te.data.push.apply(Te.data,Ie),Te.empty=!1),(!Te.layout||_t)&&(Te.layout=w.cleanLayout(Ve)),a.supplyDefaults(Te);var Ct=Te._fullLayout,ir=Ct._has("cartesian");Ct._replotting=!0,(_t||Ct._shouldCreateBgLayer)&&(Ke(Te),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),h.initGradients(Te),h.initPatterns(Te),_t&&n.saveShowSpikeInitial(Te);var rr=!Te.calcdata||Te.calcdata.length!==(Te._fullData||[]).length;rr&&a.doCalcdata(Te);for(var er=0;er<Te.calcdata.length;er++)Te.calcdata[er][0].trace=Te._fullData[er];Te._context.responsive?Te._responsiveChartHandler||(Te._responsiveChartHandler=function(){S.isHidden(Te)||a.resize(Te)},window.addEventListener("resize",Te._responsiveChartHandler)):S.clearResponsive(Te);var Lr=S.extendFlat({},Ct._size),fa=0;function Da(){for(var Ft=Ct._basePlotModules,Yt=0;Yt<Ft.length;Yt++)Ft[Yt].drawFramework&&Ft[Yt].drawFramework(Te);!Ct._glcanvas&&Ct._has("gl")&&(Ct._glcanvas=Ct._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}),Ct._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=Te._context.plotGlPixelRatio;if(Ct._glcanvas){Ct._glcanvas.attr("width",Ct.width*Jt).attr("height",Ct.height*Jt).style("width",Ct.width+"px").style("height",Ct.height+"px");var Fr=Ct._glcanvas.data()[0].regl;if(Fr&&(Math.floor(Ct.width*Jt)!==Fr._gl.drawingBufferWidth||Math.floor(Ct.height*Jt)!==Fr._gl.drawingBufferHeight)){var ta="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(fa)S.error(ta);else return S.log(ta+" Clearing graph and plotting again."),a.cleanPlot([],{},Te._fullData,Ct),a.supplyDefaults(Te),Ct=Te._fullLayout,a.doCalcdata(Te),fa++,Da()}}return Ct.modebar.orientation==="h"?Ct._modebardiv.style("height",null).style("width","100%"):Ct._modebardiv.style("width",null).style("height",Ct.height+"px"),a.previousPromises(Te)}function Ia(){if(a.clearAutoMarginIds(Te),A.drawMarginPushers(Te),n.allowAutoMargin(Te),Te._fullLayout.title.text&&Te._fullLayout.title.automargin&&a.allowAutoMargin(Te,"title.automargin"),Ct._has("pie"))for(var Ft=Te._fullData,Yt=0;Yt<Ft.length;Yt++){var Jt=Ft[Yt];Jt.type==="pie"&&Jt.automargin&&a.allowAutoMargin(Te,"pie."+Jt.uid+".automargin")}return a.doAutoMargin(Te),a.previousPromises(Te)}function qa(){if(a.didMarginChange(Lr,Ct._size))return S.syncOrAsync([Ia,A.layoutStyles],Te)}function Wa(){if(!rr){Ca();return}return S.syncOrAsync([r.getComponentMethod("shapes","calcAutorange"),r.getComponentMethod("annotations","calcAutorange"),Ca],Te)}function Ca(){Te._transitioning||(A.doAutoRangeAndConstraints(Te),_t&&n.saveRangeInitial(Te),r.getComponentMethod("rangeslider","calcAutorange")(Te))}function hi(){return n.draw(Te,_t?"":"redraw")}var wi=[a.previousPromises,ct,Da,Ia,qa];ir&&wi.push(Wa),wi.push(A.layoutStyles),ir&&wi.push(hi,function(Yt){var Jt=Yt._fullLayout._insideTickLabelsUpdaterange;if(Jt)return Yt._fullLayout._insideTickLabelsUpdaterange=void 0,be(Yt,Jt).then(function(){n.saveRangeInitial(Yt,!0)})}),wi.push(A.drawData,A.finalDraw,m,a.addLinks,a.rehover,a.redrag,a.reselect,a.doAutoMargin,a.previousPromises);var Kt=S.syncOrAsync(wi,Te);return(!Kt||!Kt.then)&&(Kt=Promise.resolve()),Kt.then(function(){return y(Te),Te})}function y(Te){var Ie=Te._fullLayout;Ie._redrawFromAutoMarginCount?Ie._redrawFromAutoMarginCount--:Te.emit("plotly_afterplot")}function f(Te){return S.extendFlat(l,Te)}function R(Te,Ie){try{Te._fullLayout._paper.style("background",Ie)}catch(Ve){S.error(Ve)}}function L(Te,Ie){var Ve=c.combine(Ie,"white");R(Te,Ve)}function z(Te,Ie){if(!Te._context){Te._context=S.extendDeep({},l);var Ve=G.select("base");Te._context._baseUrl=Ve.size()&&Ve.attr("href")?window.location.href.split("#")[0]:""}var Ce=Te._context,Ee,Pe,ft;if(Ie){for(Pe=Object.keys(Ie),Ee=0;Ee<Pe.length;Ee++)ft=Pe[Ee],!(ft==="editable"||ft==="edits")&&ft in Ce&&(ft==="setBackground"&&Ie[ft]==="opaque"?Ce[ft]=L:Ce[ft]=Ie[ft]);var ct=Ie.editable;if(ct!==void 0)for(Ce.editable=ct,Pe=Object.keys(Ce.edits),Ee=0;Ee<Pe.length;Ee++)Ce.edits[Pe[Ee]]=ct;if(Ie.edits)for(Pe=Object.keys(Ie.edits),Ee=0;Ee<Pe.length;Ee++)ft=Pe[Ee],ft in Ce.edits&&(Ce.edits[ft]=Ie.edits[ft]);Ce._exportedPlot=Ie._exportedPlot}Ce.staticPlot&&(Ce.editable=!1,Ce.edits={},Ce.autosizable=!1,Ce.scrollZoom=!1,Ce.doubleClick=!1,Ce.showTips=!1,Ce.showLink=!1,Ce.displayModeBar=!1),Ce.displayModeBar==="hover"&&!x&&(Ce.displayModeBar=!0),(Ce.setBackground==="transparent"||typeof Ce.setBackground!="function")&&(Ce.setBackground=R),Ce._hasZeroHeight=Ce._hasZeroHeight||Te.clientHeight===0,Ce._hasZeroWidth=Ce._hasZeroWidth||Te.clientWidth===0;var _t=Ce.scrollZoom,Ct=Ce._scrollZoom={};if(_t===!0)Ct.cartesian=1,Ct.gl3d=1,Ct.geo=1,Ct.mapbox=1,Ct.map=1;else if(typeof _t=="string"){var ir=_t.split("+");for(Ee=0;Ee<ir.length;Ee++)Ct[ir[Ee]]=1}else _t!==!1&&(Ct.gl3d=1,Ct.geo=1,Ct.mapbox=1,Ct.map=1)}function F(Te){if(Te=S.getGraphDiv(Te),!S.isPlotDiv(Te))throw new Error("This element is not a Plotly plot: "+Te);return w.cleanData(Te.data),w.cleanLayout(Te.layout),Te.calcdata=void 0,Z._doPlot(Te).then(function(){return Te.emit("plotly_redraw"),Te})}function N(Te,Ie,Ve,Ce){return Te=S.getGraphDiv(Te),a.cleanPlot([],{},Te._fullData||[],Te._fullLayout||{}),a.purge(Te),Z._doPlot(Te,Ie,Ve,Ce)}function O(Te,Ie){var Ve=Ie+1,Ce=[],Ee,Pe;for(Ee=0;Ee<Te.length;Ee++)Pe=Te[Ee],Pe<0?Ce.push(Ve+Pe):Ce.push(Pe);return Ce}function P(Te,Ie,Ve){var Ce,Ee;for(Ce=0;Ce<Ie.length;Ce++){if(Ee=Ie[Ce],Ee!==parseInt(Ee,10))throw new Error("all values in "+Ve+" must be integers");if(Ee>=Te.data.length||Ee<-Te.data.length)throw new Error(Ve+" must be valid indices for gd.data.");if(Ie.indexOf(Ee,Ce+1)>-1||Ee>=0&&Ie.indexOf(-Te.data.length+Ee)>-1||Ee<0&&Ie.indexOf(Te.data.length+Ee)>-1)throw new Error("each index in "+Ve+" must be unique.")}}function U(Te,Ie,Ve){if(!Array.isArray(Te.data))throw new Error("gd.data must be an array.");if(typeof Ie>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ie)||(Ie=[Ie]),P(Te,Ie,"currentIndices"),typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&P(Te,Ve,"newIndices"),typeof Ve<"u"&&Ie.length!==Ve.length)throw new Error("current and new indices must be of equal length.")}function B(Te,Ie,Ve){var Ce,Ee;if(!Array.isArray(Te.data))throw new Error("gd.data must be an array.");if(typeof Ie>"u")throw new Error("traces must be defined.");for(Array.isArray(Ie)||(Ie=[Ie]),Ce=0;Ce<Ie.length;Ce++)if(Ee=Ie[Ce],typeof Ee!="object"||Array.isArray(Ee)||Ee===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&Ve.length!==Ie.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function X(Te,Ie,Ve,Ce){var Ee=S.isPlainObject(Ce);if(!Array.isArray(Te.data))throw new Error("gd.data must be an array");if(!S.isPlainObject(Ie))throw new Error("update must be a key:value object");if(typeof Ve>"u")throw new Error("indices must be an integer or array of integers");P(Te,Ve,"indices");for(var Pe in Ie){if(!Array.isArray(Ie[Pe])||Ie[Pe].length!==Ve.length)throw new Error("attribute "+Pe+" must be an array of length equal to indices array length");if(Ee&&(!(Pe in Ce)||!Array.isArray(Ce[Pe])||Ce[Pe].length!==Ie[Pe].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 $(Te,Ie,Ve,Ce){var Ee=S.isPlainObject(Ce),Pe=[],ft,ct,_t,Ct,ir;Array.isArray(Ve)||(Ve=[Ve]),Ve=O(Ve,Te.data.length-1);for(var rr in Ie)for(var er=0;er<Ve.length;er++){if(ft=Te.data[Ve[er]],_t=E(ft,rr),ct=_t.get(),Ct=Ie[rr][er],!S.isArrayOrTypedArray(Ct))throw new Error("attribute: "+rr+" index: "+er+" must be an array");if(!S.isArrayOrTypedArray(ct))throw new Error("cannot extend missing or non-array attribute: "+rr);if(ct.constructor!==Ct.constructor)throw new Error("cannot extend array with an array of a different type: "+rr);ir=Ee?Ce[rr][er]:Ce,v(ir)||(ir=-1),Pe.push({prop:_t,target:ct,insert:Ct,maxp:Math.floor(ir)})}return Pe}function se(Te,Ie,Ve,Ce,Ee){X(Te,Ie,Ve,Ce);for(var Pe=$(Te,Ie,Ve,Ce),ft={},ct={},_t=0;_t<Pe.length;_t++){var Ct=Pe[_t].prop,ir=Pe[_t].maxp,rr=Ee(Pe[_t].target,Pe[_t].insert,ir);Ct.set(rr[0]),Array.isArray(ft[Ct.astr])||(ft[Ct.astr]=[]),ft[Ct.astr].push(rr[1]),Array.isArray(ct[Ct.astr])||(ct[Ct.astr]=[]),ct[Ct.astr].push(Pe[_t].target.length)}return{update:ft,maxPoints:ct}}function le(Te,Ie){var Ve=new Te.constructor(Te.length+Ie.length);return Ve.set(Te),Ve.set(Ie,Te.length),Ve}function fe(Te,Ie,Ve,Ce){Te=S.getGraphDiv(Te);function Ee(_t,Ct,ir){var rr,er;if(S.isTypedArray(_t))if(ir<0){var Lr=new _t.constructor(0),fa=le(_t,Ct);ir<0?(rr=fa,er=Lr):(rr=Lr,er=fa)}else if(rr=new _t.constructor(ir),er=new _t.constructor(_t.length+Ct.length-ir),ir===Ct.length)rr.set(Ct),er.set(_t);else if(ir<Ct.length){var Da=Ct.length-ir;rr.set(Ct.subarray(Da)),er.set(_t),er.set(Ct.subarray(0,Da),_t.length)}else{var Ia=ir-Ct.length,qa=_t.length-Ia;rr.set(_t.subarray(qa)),rr.set(Ct,Ia),er.set(_t.subarray(0,qa))}else rr=_t.concat(Ct),er=ir>=0&&ir<rr.length?rr.splice(0,rr.length-ir):[];return[rr,er]}var Pe=se(Te,Ie,Ve,Ce,Ee),ft=Z.redraw(Te),ct=[Te,Pe.update,Ve,Pe.maxPoints];return t.add(Te,Z.prependTraces,ct,fe,arguments),ft}function V(Te,Ie,Ve,Ce){Te=S.getGraphDiv(Te);function Ee(_t,Ct,ir){var rr,er;if(S.isTypedArray(_t))if(ir<=0){var Lr=new _t.constructor(0),fa=le(Ct,_t);ir<0?(rr=fa,er=Lr):(rr=Lr,er=fa)}else if(rr=new _t.constructor(ir),er=new _t.constructor(_t.length+Ct.length-ir),ir===Ct.length)rr.set(Ct),er.set(_t);else if(ir<Ct.length){var Da=Ct.length-ir;rr.set(Ct.subarray(0,Da)),er.set(Ct.subarray(Da)),er.set(_t,Da)}else{var Ia=ir-Ct.length;rr.set(Ct),rr.set(_t.subarray(0,Ia),Ct.length),er.set(_t.subarray(Ia))}else rr=Ct.concat(_t),er=ir>=0&&ir<rr.length?rr.splice(ir,rr.length):[];return[rr,er]}var Pe=se(Te,Ie,Ve,Ce,Ee),ft=Z.redraw(Te),ct=[Te,Pe.update,Ve,Pe.maxPoints];return t.add(Te,Z.extendTraces,ct,V,arguments),ft}function Y(Te,Ie,Ve){Te=S.getGraphDiv(Te);var Ce=[],Ee=Z.deleteTraces,Pe=Y,ft=[Te,Ce],ct=[Te,Ie],_t,Ct;for(B(Te,Ie,Ve),Array.isArray(Ie)||(Ie=[Ie]),Ie=Ie.map(function(ir){return S.extendFlat({},ir)}),w.cleanData(Ie),_t=0;_t<Ie.length;_t++)Te.data.push(Ie[_t]);for(_t=0;_t<Ie.length;_t++)Ce.push(-Ie.length+_t);if(typeof Ve>"u")return Ct=Z.redraw(Te),t.add(Te,Ee,ft,Pe,ct),Ct;Array.isArray(Ve)||(Ve=[Ve]);try{U(Te,Ce,Ve)}catch(ir){throw Te.data.splice(Te.data.length-Ie.length,Ie.length),ir}return t.startSequence(Te),t.add(Te,Ee,ft,Pe,ct),Ct=Z.moveTraces(Te,Ce,Ve),t.stopSequence(Te),Ct}function ee(Te,Ie){Te=S.getGraphDiv(Te);var Ve=[],Ce=Z.addTraces,Ee=ee,Pe=[Te,Ve,Ie],ft=[Te,Ie],ct,_t;if(typeof Ie>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ie)||(Ie=[Ie]),P(Te,Ie,"indices"),Ie=O(Ie,Te.data.length-1),Ie.sort(S.sorterDes),ct=0;ct<Ie.length;ct+=1)_t=Te.data.splice(Ie[ct],1)[0],Ve.push(_t);var Ct=Z.redraw(Te);return t.add(Te,Ce,Pe,Ee,ft),Ct}function q(Te,Ie,Ve){Te=S.getGraphDiv(Te);var Ce=[],Ee=[],Pe=q,ft=q,ct=[Te,Ve,Ie],_t=[Te,Ie,Ve],Ct;if(U(Te,Ie,Ve),Ie=Array.isArray(Ie)?Ie:[Ie],typeof Ve>"u")for(Ve=[],Ct=0;Ct<Ie.length;Ct++)Ve.push(-Ie.length+Ct);for(Ve=Array.isArray(Ve)?Ve:[Ve],Ie=O(Ie,Te.data.length-1),Ve=O(Ve,Te.data.length-1),Ct=0;Ct<Te.data.length;Ct++)Ie.indexOf(Ct)===-1&&Ce.push(Te.data[Ct]);for(Ct=0;Ct<Ie.length;Ct++)Ee.push({newIndex:Ve[Ct],trace:Te.data[Ie[Ct]]});for(Ee.sort(function(rr,er){return rr.newIndex-er.newIndex}),Ct=0;Ct<Ee.length;Ct+=1)Ce.splice(Ee[Ct].newIndex,0,Ee[Ct].trace);Te.data=Ce;var ir=Z.redraw(Te);return t.add(Te,Pe,ct,ft,_t),ir}function oe(Te,Ie,Ve,Ce){Te=S.getGraphDiv(Te),w.clearPromiseQueue(Te);var Ee={};if(typeof Ie=="string")Ee[Ie]=Ve;else if(S.isPlainObject(Ie))Ee=S.extendFlat({},Ie),Ce===void 0&&(Ce=Ve);else return S.warn("Restyle fail.",Ie,Ve,Ce),Promise.reject();Object.keys(Ee).length&&(Te.changed=!0);var Pe=w.coerceTraceIndices(Te,Ce),ft=ce(Te,Ee,Pe),ct=ft.flags;ct.calc&&(Te.calcdata=void 0),ct.clearAxisTypes&&w.clearAxisTypes(Te,Pe,{});var _t=[];ct.fullReplot?_t.push(Z._doPlot):(_t.push(a.previousPromises),a.supplyDefaults(Te),ct.markerSize&&(a.doCalcdata(Te),De(_t)),ct.style&&_t.push(A.doTraceStyle),ct.colorbars&&_t.push(A.doColorBars),_t.push(y)),_t.push(a.rehover,a.redrag,a.reselect),t.add(Te,oe,[Te,ft.undoit,ft.traces],oe,[Te,ft.redoit,ft.traces]);var Ct=S.syncOrAsync(_t,Te);return(!Ct||!Ct.then)&&(Ct=Promise.resolve()),Ct.then(function(){return Te.emit("plotly_restyle",ft.eventData),Te})}function ae(Te){return Te===void 0?null:Te}function j(Te,Ie){return Ie?function(Ve,Ce,Ee){var Pe=E(Ve,Ce),ft=Pe.set;return Pe.set=function(ct){var _t=(Ee||"")+Ce;Q(_t,Pe.get(),ct,Te),ft(ct)},Pe}:E}function Q(Te,Ie,Ve,Ce){if(Array.isArray(Ie)||Array.isArray(Ve))for(var Ee=Array.isArray(Ie)?Ie:[],Pe=Array.isArray(Ve)?Ve:[],ft=Math.max(Ee.length,Pe.length),ct=0;ct<ft;ct++)Q(Te+"["+ct+"]",Ee[ct],Pe[ct],Ce);else if(S.isPlainObject(Ie)||S.isPlainObject(Ve)){var _t=S.isPlainObject(Ie)?Ie:{},Ct=S.isPlainObject(Ve)?Ve:{},ir=S.extendFlat({},_t,Ct);for(var rr in ir)Q(Te+"."+rr,_t[rr],Ct[rr],Ce)}else Ce[Te]===void 0&&(Ce[Te]=ae(Ie))}function re(Te,Ie,Ve){for(var Ce in Ve){var Ee=E(Te,Ce);Q(Ce,Ee.get(),Ve[Ce],Ie)}}function ce(Te,Ie,Ve){var Ce=Te._fullLayout,Ee=Te._fullData,Pe=Te.data,ft=Ce._guiEditing,ct=j(Ce._preGUI,ft),_t=S.extendDeepAll({},Ie),Ct,ir=M.traceFlags(),rr={},er={},Lr;function fa(){return Ve.map(function(){})}function Da(Xt){var vr=n.id2name(Xt);Lr.indexOf(vr)===-1&&Lr.push(vr)}function Ia(Xt){return"LAYOUT"+Xt+".autorange"}function qa(Xt){return"LAYOUT"+Xt+".range"}function Wa(Xt){for(var vr=Xt;vr<Ee.length;vr++)if(Ee[vr]._input===Pe[Xt])return Ee[vr]}function Ca(Xt,vr,Or){if(Array.isArray(Xt)){Xt.forEach(function(la){Ca(la,vr,Or)});return}if(!(Xt in Ie||w.hasParent(Ie,Xt))){var ba;if(Xt.slice(0,6)==="LAYOUT")ba=ct(Te.layout,Xt.replace("LAYOUT",""));else{var Pa=Ve[Or],ya=Ce._tracePreGUI[Wa(Pa)._fullInput.uid];ba=j(ya,ft)(Pe[Pa],Xt)}Xt in er||(er[Xt]=fa()),er[Xt][Or]===void 0&&(er[Xt][Or]=ae(ba.get())),vr!==void 0&&ba.set(vr)}}function hi(Xt){return function(vr){return Ee[vr][Xt]}}function wi(Xt){return function(vr,Or){return vr===!1?Ee[Ve[Or]][Xt]:null}}for(var Kt in Ie){if(w.hasParent(Ie,Kt))throw new Error("cannot set "+Kt+" and a parent attribute simultaneously");var Ft=Ie[Kt],Yt,Jt,Fr,ta,ra,ca;if((Kt==="autobinx"||Kt==="autobiny")&&(Kt=Kt.charAt(Kt.length-1)+"bins",Array.isArray(Ft)?Ft=Ft.map(wi(Kt)):Ft===!1?Ft=Ve.map(hi(Kt)):Ft=null),rr[Kt]=Ft,Kt.slice(0,6)==="LAYOUT"){Fr=ct(Te.layout,Kt.replace("LAYOUT","")),er[Kt]=[ae(Fr.get())],Fr.set(Array.isArray(Ft)?Ft[0]:Ft),ir.calc=!0;continue}for(er[Kt]=fa(),Ct=0;Ct<Ve.length;Ct++){Yt=Pe[Ve[Ct]],Jt=Wa(Ve[Ct]);var Ba=Ce._tracePreGUI[Jt._fullInput.uid];if(Fr=j(Ba,ft)(Yt,Kt),ta=Fr.get(),ra=Array.isArray(Ft)?Ft[Ct%Ft.length]:Ft,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],Ct);else if(($a==="thicknessmode"||$a==="lenmode")&&ta!==ra&&(ra==="fraction"||ra==="pixels")&&pi){var tn=Ce._size,on=pi.orient,hn=on==="top"||on==="bottom";if($a==="thicknessmode"){var Tt=hn?tn.h:tn.w;Ca(ri+"thickness",pi.thickness*(ra==="fraction"?1/Tt:Tt),Ct)}else{var ut=hn?tn.w:tn.h;Ca(ri+"len",pi.len*(ra==="fraction"?1/ut:ut),Ct)}}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()),Ce._pielayer.selectAll("g.trace").remove()):r.traceIs(Yt,"cartesian")&&E(Yt,"marker.colors").set(E(Yt,"marker.color").get())}er[Kt][Ct]=ae(ta);var xr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(xr.indexOf(Kt)!==-1){if(Kt==="orientation"){Fr.set(ra);var Ir=Yt.x&&!Yt.y?"h":"v";if((Fr.get()||Ir)===Jt.orientation)continue}else Kt==="orientationaxes"&&(Yt.orientation={v:"h",h:"v"}[Jt.orientation]);w.swapXYData(Yt),ir.calc=ir.clearAxisTypes=!0}else a.dataArrayContainers.indexOf(Fr.parts[0])!==-1?(w.manageArrayContainers(Fr,ra,er),ir.calc=!0):(ca?ca.arrayOk&&!r.traceIs(Jt,"regl")&&(S.isArrayOrTypedArray(ra)||S.isArrayOrTypedArray(ta))?ir.calc=!0:M.update(ir,ca):ir.calc=!0,Fr.set(ra))}}if(["swapxyaxes","orientationaxes"].indexOf(Kt)!==-1&&n.swap(Te,Ve),Kt==="orientationaxes"){var Ur=E(Te.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(Lr=[],Ct=0;Ct<Ve.length;Ct++){var xt=Pe[Ve[Ct]];r.traceIs(xt,"cartesian")&&(Da(xt.xaxis||"x"),Da(xt.yaxis||"y"))}Ca(Lr.map(Ia),!0,0),Ca(Lr.map(qa),[0,1],0)}}return(ir.calc||ir.plot)&&(ir.fullReplot=!0),{flags:ir,undoit:er,redoit:rr,traces:Ve,eventData:S.extendDeepNoArrays([],[_t,Ve])}}function be(Te,Ie,Ve){Te=S.getGraphDiv(Te),w.clearPromiseQueue(Te);var Ce={};if(typeof Ie=="string")Ce[Ie]=Ve;else if(S.isPlainObject(Ie))Ce=S.extendFlat({},Ie);else return S.warn("Relayout fail.",Ie,Ve),Promise.reject();Object.keys(Ce).length&&(Te.changed=!0);var Ee=nt(Te,Ce),Pe=Ee.flags;Pe.calc&&(Te.calcdata=void 0);var ft=[a.previousPromises];Pe.layoutReplot?ft.push(A.layoutReplot):Object.keys(Ce).length&&(Ae(Te,Pe,Ee)||a.supplyDefaults(Te),Pe.legend&&ft.push(A.doLegend),Pe.layoutstyle&&ft.push(A.layoutStyles),Pe.axrange&&De(ft,Ee.rangesAltered),Pe.ticks&&ft.push(A.doTicksRelayout),Pe.modebar&&ft.push(A.doModeBar),Pe.camera&&ft.push(A.doCamera),Pe.colorbars&&ft.push(A.doColorBars),ft.push(y)),ft.push(a.rehover,a.redrag,a.reselect),t.add(Te,be,[Te,Ee.undoit],be,[Te,Ee.redoit]);var ct=S.syncOrAsync(ft,Te);return(!ct||!ct.then)&&(ct=Promise.resolve(Te)),ct.then(function(){return Te.emit("plotly_relayout",Ee.eventData),Te})}function Ae(Te,Ie,Ve){var Ce=Te._fullLayout;if(!Ie.axrange)return!1;for(var Ee in Ie)if(Ee!=="axrange"&&Ie[Ee])return!1;var Pe,ft,ct=function(Lr,fa){return S.coerce(Pe,ft,s,Lr,fa)},_t={};for(var Ct in Ve.rangesAltered){var ir=n.id2name(Ct);if(Pe=Te.layout[ir],ft=Ce[ir],i(Pe,ft,ct,_t),ft._matchGroup){for(var rr in ft._matchGroup)if(rr!==Ct){var er=Ce[n.id2name(rr)];er.autorange=ft.autorange,er.range=ft.range.slice(),er._input.range=ft.range.slice()}}}return!0}function De(Te,Ie){var Ve=Ie?function(Ce){var Ee=[],Pe=!0;for(var ft in Ie){var ct=n.getFromId(Ce,ft);if(Ee.push(ft),(ct.ticklabelposition||"").indexOf("inside")!==-1&&ct._anchorAxis&&Ee.push(ct._anchorAxis._id),ct._matchGroup)for(var _t in ct._matchGroup)Ie[_t]||Ee.push(_t)}return n.draw(Ce,Ee,{skipTitle:Pe})}:function(Ce){return n.draw(Ce,"redraw")};Te.push(T,A.doAutoRangeAndConstraints,Ve,A.drawData,A.finalDraw)}var ze=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Ze=/^[xyz]axis[0-9]*\.autorange$/,at=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function nt(Te,Ie){var Ve=Te.layout,Ce=Te._fullLayout,Ee=Ce._guiEditing,Pe=j(Ce._preGUI,Ee),ft=Object.keys(Ie),ct=n.list(Te),_t=S.extendDeepAll({},Ie),Ct={},ir,rr,er;for(ft=Object.keys(Ie),rr=0;rr<ft.length;rr++)if(ft[rr].indexOf("allaxes")===0){for(er=0;er<ct.length;er++){var Lr=ct[er]._id.slice(1),fa=Lr.indexOf("scene")!==-1?Lr+".":"",Da=ft[rr].replace("allaxes",fa+ct[er]._name);Ie[Da]||(Ie[Da]=Ie[ft[rr]])}delete Ie[ft[rr]]}var Ia=M.layoutFlags(),qa={},Wa={};function Ca(ya,la){if(Array.isArray(ya)){ya.forEach(function(Ai){Ca(Ai,la)});return}if(!(ya in Ie||w.hasParent(Ie,ya))){var Ta=Pe(Ve,ya);ya in Wa||(Wa[ya]=ae(Ta.get())),la!==void 0&&Ta.set(la)}}var hi={},wi;function Kt(ya){var la=n.name2id(ya.split(".")[0]);return hi[la]=1,la}for(var Ft in Ie){if(w.hasParent(Ie,Ft))throw new Error("cannot set "+Ft+" and a parent attribute simultaneously");for(var Yt=Pe(Ve,Ft),Jt=Ie[Ft],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(Te.layout,Ba).get(),Za=E(Ce,Ba).get(),ri=Yt.get();if(Jt!==void 0){qa[Ft]=Jt,Wa[Ft]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ce,Yt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ra in pi.impliedEdits)Ca(S.relativeAttr(Ft,Ra),pi.impliedEdits[Ra]);if(["width","height"].indexOf(Ft)!==-1)if(Jt){Ca("autosize",null);var tn=Ft==="height"?"width":"height";Ca(tn,Ce[tn])}else Ce[Ft]=Te._initialAutoSize[Ft];else if(Ft==="autosize")Ca("width",Jt?null:Ce.width),Ca("height",Jt?null:Ce.height);else if(ca.match(ze))Kt(ca),E(Ce,Ba+"._inputRange").set(null);else if(ca.match(Ze)){Kt(ca),E(Ce,Ba+"._inputRange").set(null);var on=E(Ce,Ba).get();on._inputDomain&&(on._input.domain=on._inputDomain.slice())}else ca.match(at)&&E(Ce,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var hn=Za.type==="linear"&&Jt==="log",Tt=Za.type==="log"&&Jt==="linear";if(hn||Tt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)hn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Br=wi.range[1];hn?(ut<=0&&Br<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Br/1e6:Br<=0&&(Br=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Br)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Br)))}Array.isArray(Ce._subplots.polar)&&Ce._subplots.polar.length&&Ce[Yt.parts[0]]&&Yt.parts[1]==="radialaxis"&&delete Ce[Yt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Te,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Te,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);E(Ce,Ba+"._inputRange").set(null)}else if(ra.match(g)){var Cr=E(Ce,Ft).get(),xr=(Jt||{}).type;(!xr||xr==="-")&&(xr="linear"),r.getComponentMethod("annotations","convertCoords")(Te,Cr,xr,Ca),r.getComponentMethod("images","convertCoords")(Te,Cr,xr,Ca)}var Ir=_.containerArrayMatch(Ft);if(Ir){ir=Ir.array,rr=Ir.index;var Ur=Ir.property,Hr=pi||{editType:"calc"};rr!==""&&Ur===""&&(_.isAddVal(Jt)?Wa[Ft]=null:_.isRemoveVal(Jt)?Wa[Ft]=(E(Ve,ir).get()||[])[rr]:S.warn("unrecognized full object value",Ie)),M.update(Ia,Hr),Ct[ir]||(Ct[ir]={});var xt=Ct[ir][rr];xt||(xt=Ct[ir][rr]={}),xt[Ur]=Jt,delete Ie[Ft]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ia.calc=!0:Ia.plot=!0):(Ft==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ce._has("scatter-like")&&Ce._has("regl")&&Ft==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ia.plot=!0:pi?M.update(Ia,pi):Ia.calc=!0,Yt.set(Jt))}}for(ir in Ct){var Xt=_.applyContainerArrayChanges(Te,Pe(Ve,ir),Ct[ir],Ia,Pe);Xt||(Ia.plot=!0)}for(var vr in hi){wi=n.getFromId(Te,vr);var Or=wi&&wi._constraintGroup;if(Or){Ia.calc=!0;for(var ba in Or)hi[ba]||(n.getFromId(Te,ba)._constraintShrinkable=!0)}}(rt(Te)||Ie.height||Ie.width)&&(Ia.plot=!0);var Pa=Ce.shapes;for(rr=0;rr<Pa.length;rr++)if(Pa[rr].showlegend){Ia.calc=!0;break}return(Ia.plot||Ia.calc)&&(Ia.layoutReplot=!0),{flags:Ia,rangesAltered:hi,undoit:Wa,redoit:qa,eventData:_t}}function rt(Te){var Ie=Te._fullLayout,Ve=Ie.width,Ce=Ie.height;return Te.layout.autosize&&a.plotAutoSize(Te,Te.layout,Ie),Ie.width!==Ve||Ie.height!==Ce}function st(Te,Ie,Ve,Ce){Te=S.getGraphDiv(Te),w.clearPromiseQueue(Te),S.isPlainObject(Ie)||(Ie={}),S.isPlainObject(Ve)||(Ve={}),Object.keys(Ie).length&&(Te.changed=!0),Object.keys(Ve).length&&(Te.changed=!0);var Ee=w.coerceTraceIndices(Te,Ce),Pe=ce(Te,S.extendFlat({},Ie),Ee),ft=Pe.flags,ct=nt(Te,S.extendFlat({},Ve)),_t=ct.flags;(ft.calc||_t.calc)&&(Te.calcdata=void 0),ft.clearAxisTypes&&w.clearAxisTypes(Te,Ee,Ve);var Ct=[];_t.layoutReplot?Ct.push(A.layoutReplot):ft.fullReplot?Ct.push(Z._doPlot):(Ct.push(a.previousPromises),Ae(Te,_t,ct)||a.supplyDefaults(Te),ft.style&&Ct.push(A.doTraceStyle),(ft.colorbars||_t.colorbars)&&Ct.push(A.doColorBars),_t.legend&&Ct.push(A.doLegend),_t.layoutstyle&&Ct.push(A.layoutStyles),_t.axrange&&De(Ct,ct.rangesAltered),_t.ticks&&Ct.push(A.doTicksRelayout),_t.modebar&&Ct.push(A.doModeBar),_t.camera&&Ct.push(A.doCamera),Ct.push(y)),Ct.push(a.rehover,a.redrag,a.reselect),t.add(Te,st,[Te,Pe.undoit,ct.undoit,Pe.traces],st,[Te,Pe.redoit,ct.redoit,Pe.traces]);var ir=S.syncOrAsync(Ct,Te);return(!ir||!ir.then)&&(ir=Promise.resolve(Te)),ir.then(function(){return Te.emit("plotly_update",{data:Pe.eventData,layout:ct.eventData}),Te})}function Me(Te){return function(Ve){Ve._fullLayout._guiEditing=!0;var Ce=Te.apply(null,arguments);return Ve._fullLayout._guiEditing=!1,Ce}}var ye=[{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"}],he=[{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 Oe(Te,Ie){for(var Ve=0;Ve<Ie.length;Ve++){var Ce=Ie[Ve],Ee=Te.match(Ce.pattern);if(Ee){var Pe=Ee[1]||"";return{head:Pe,tail:Te.slice(Pe.length+1),attr:Ce.attr}}}}function tt(Te,Ie){var Ve=E(Ie,Te).get();if(Ve!==void 0)return Ve;var Ce=Te.split(".");for(Ce.pop();Ce.length>1;)if(Ce.pop(),Ve=E(Ie,Ce.join(".")+".uirevision").get(),Ve!==void 0)return Ve;return Ie.uirevision}function ot(Te,Ie){for(var Ve=0;Ve<Ie.length;Ve++)if(Ie[Ve]._fullInput.uid===Te)return Ve;return-1}function Qe(Te,Ie,Ve){for(var Ce=0;Ce<Ie.length;Ce++)if(Ie[Ce].uid===Te)return Ce;return!Ie[Ve]||Ie[Ve].uid?-1:Ve}function Pt(Te,Ie){var Ve=S.isPlainObject(Te),Ce=Array.isArray(Te);return Ve||Ce?(Ve&&S.isPlainObject(Ie)||Ce&&Array.isArray(Ie))&&JSON.stringify(Te)===JSON.stringify(Ie):Te===Ie}function It(Te,Ie,Ve,Ce){var Ee=Ce._preGUI,Pe,ft,ct,_t,Ct,ir,rr,er,Lr,fa,Da=[],Ia={},qa={};for(Pe in Ee){if(Ct=Oe(Pe,ye),Ct){if(Lr=Ct.head,fa=Ct.tail,ft=Ct.attr||Lr+".uirevision",ct=E(Ce,ft).get(),_t=ct&&tt(ft,Ie),_t&&_t===ct){if(ir=Ee[Pe],ir===null&&(ir=void 0),rr=E(Ie,Pe),er=rr.get(),Pt(er,ir)){er===void 0&&fa==="autorange"&&Da.push(Lr),rr.set(ae(E(Ce,Pe).get()));continue}else if(fa==="autorange"||fa.slice(0,6)==="range["){var Wa=Ee[Lr+".range[0]"],Ca=Ee[Lr+".range[1]"],hi=Ee[Lr+".autorange"];if(hi||hi===null&&Wa===null&&Ca===null){if(!(Lr in Ia)){var wi=E(Ie,Lr).get();Ia[Lr]=wi&&(wi.autorange||wi.autorange!==!1&&(!wi.range||wi.range.length!==2))}if(Ia[Lr]){rr.set(ae(E(Ce,Pe).get()));continue}}}}}else S.warn("unrecognized GUI edit: "+Pe);delete Ee[Pe],Ct&&Ct.tail.slice(0,6)==="range["&&(qa[Ct.head]=1)}for(var Kt=0;Kt<Da.length;Kt++){var Ft=Da[Kt];if(qa[Ft]){var Yt=E(Ie,Ft).get();Yt&&delete Yt.autorange}}var Jt=Ce._tracePreGUI;for(var Fr in Jt){var ta=Jt[Fr],ra=null,ca;for(Pe in ta){if(!ra){var Ba=ot(Fr,Ve);if(Ba<0){delete Jt[Fr];break}var $a=Ve[Ba];ca=$a._fullInput;var Za=Qe(Fr,Te,ca.index);if(Za<0){delete Jt[Fr];break}ra=Te[Za]}if(Ct=Oe(Pe,he),Ct){if(Ct.attr?(ct=E(Ce,Ct.attr).get(),_t=ct&&tt(Ct.attr,Ie)):(ct=ca.uirevision,_t=ra.uirevision,_t===void 0&&(_t=Ie.uirevision)),_t&&_t===ct&&(ir=ta[Pe],ir===null&&(ir=void 0),rr=E(ra,Pe),er=rr.get(),Pt(er,ir))){rr.set(ae(E(ca,Pe).get()));continue}}else S.warn("unrecognized GUI edit: "+Pe+" in trace uid "+Fr);delete ta[Pe]}}}function qt(Te,Ie,Ve,Ce){var Ee,Pe;function ft(){return Z.addFrames(Te,Ee)}Te=S.getGraphDiv(Te),w.clearPromiseQueue(Te);var ct=Te._fullData,_t=Te._fullLayout;if(!S.isPlotDiv(Te)||!ct||!_t)Pe=Z.newPlot(Te,Ie,Ve,Ce);else{if(S.isPlainObject(Ie)){var Ct=Ie;Ie=Ct.data,Ve=Ct.layout,Ce=Ct.config,Ee=Ct.frames}var ir=!1;if(Ce){let ca=S.extendDeepAll({},Te._context);Te._context=void 0,z(Te,Ce),ir=!w.collectionsAreEqual(ca,Te._context)}if(ir){let ca=Te._ev.eventNames().map(Ba=>[Ba,Te._ev.listeners(Ba)]);Pe=Z.newPlot(Te,Ie,Ve,Ce).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Te.on(Ba,Za));return Z.react(Te,Ie,Ve,Ce)})}else{Te.data=Ie||[],w.cleanData(Te.data),Te.layout=Ve||{},w.cleanLayout(Te.layout),It(Te.data,Te.layout,ct,_t),a.supplyDefaults(Te,{skipUpdateCalc:!0});var rr=Te._fullData,er=Te._fullLayout,Lr=er.datarevision===void 0,fa=er.transition,Da=kr(Te,_t,er,Lr,fa),Ia=Da.newDataRevision,qa=Wt(Te,ct,rr,Lr,fa,Ia);if(rt(Te)&&(Da.layoutReplot=!0),qa.calc||Da.calc){Te.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(er),Ca=0;Ca<Wa.length;Ca++){var hi=Wa[Ca],wi=hi.substring(0,5);if(wi==="xaxis"||wi==="yaxis"){var Kt=er[hi]._emptyCategories;Kt&&Kt()}}}else a.supplyDefaultsUpdateCalc(Te.calcdata,rr);var Ft=[];if(Ee&&(Te._transitionData={},a.createTransitionData(Te),Ft.push(ft)),er.transition&&(qa.anim||Da.anim))Da.ticks&&Ft.push(A.doTicksRelayout),a.doCalcdata(Te),A.doAutoRangeAndConstraints(Te),Ft.push(function(){return a.transitionFromReact(Te,qa,Da,_t)});else if(qa.fullReplot||Da.layoutReplot)Te._fullLayout._skipDefaults=!0,Ft.push(Z._doPlot);else{for(var Yt in Da.arrays){var Jt=Da.arrays[Yt];if(Jt.length){var Fr=r.getComponentMethod(Yt,"drawOne");if(Fr!==S.noop)for(var ta=0;ta<Jt.length;ta++)Fr(Te,Jt[ta]);else{var ra=r.getComponentMethod(Yt,"draw");if(ra===S.noop)throw new Error("cannot draw components: "+Yt);ra(Te)}}}Ft.push(a.previousPromises),qa.style&&Ft.push(A.doTraceStyle),(qa.colorbars||Da.colorbars)&&Ft.push(A.doColorBars),Da.legend&&Ft.push(A.doLegend),Da.layoutstyle&&Ft.push(A.layoutStyles),Da.axrange&&De(Ft),Da.ticks&&Ft.push(A.doTicksRelayout),Da.modebar&&Ft.push(A.doModeBar),Da.camera&&Ft.push(A.doCamera),Ft.push(y)}Ft.push(a.rehover,a.redrag,a.reselect),Pe=S.syncOrAsync(Ft,Te),(!Pe||!Pe.then)&&(Pe=Promise.resolve(Te))}}return Pe.then(()=>(ir||Te.emit("plotly_react",{config:Ce,data:Ie,layout:Ve}),Te))}function Wt(Te,Ie,Ve,Ce,Ee,Pe){var ft=Ie.length===Ve.length;if(!Ee&&!ft)return{fullReplot:!0,calc:!0};var ct=M.traceFlags();ct.arrays={},ct.nChanges=0,ct.nChangesAnim=0;var _t,Ct;function ir(Lr){var fa=o.getTraceValObject(Ct,Lr);return!Ct._module.animatable&&fa.anim&&(fa.anim=!1),fa}var rr={getValObject:ir,flags:ct,immutable:Ce,transition:Ee,newDataRevision:Pe,gd:Te},er={};for(_t=0;_t<Ie.length;_t++)if(Ve[_t]){if(Ct=Ve[_t]._fullInput,er[Ct.uid])continue;er[Ct.uid]=1,mr(Ie[_t]._fullInput,Ct,[],rr)}return(ct.calc||ct.plot)&&(ct.fullReplot=!0),Ee&&ct.nChanges&&ct.nChangesAnim&&(ct.anim=ct.nChanges===ct.nChangesAnim&&ft?"all":"some"),ct}function kr(Te,Ie,Ve,Ce,Ee){var Pe=M.layoutFlags();Pe.arrays={},Pe.rangesAltered={},Pe.nChanges=0,Pe.nChangesAnim=0;function ft(er){return o.getLayoutValObject(Ve,er)}for(var ct in Ve)if(!(!ct.startsWith("xaxis")&&!ct.startsWith("yaxis"))&&Ie[ct]){var _t=Ve[ct].domain,Ct=Ie[ct].domain,ir=Ie[ct]._inputDomain;Ie[ct]._inputDomain&&(_t[0]===ir[0]&&_t[1]===ir[1]?Ve[ct].domain=Ie[ct].domain:(_t[0]!==Ct[0]||_t[1]!==Ct[1])&&(Ve[ct]._inputDomain=null))}var rr={getValObject:ft,flags:Pe,immutable:Ce,transition:Ee,gd:Te};return mr(Ie,Ve,[],rr),(Pe.plot||Pe.calc)&&(Pe.layoutReplot=!0),Ee&&Pe.nChanges&&Pe.nChangesAnim&&(Pe.anim=Pe.nChanges===Pe.nChangesAnim?"all":"some"),Pe}function mr(Te,Ie,Ve,Ce){var Ee,Pe,ft,ct=Ce.getValObject,_t=Ce.flags,Ct=Ce.immutable,ir=Ce.inArray,rr=Ce.arrayIndex;function er(){var Ba=Ee.editType;if(ir&&Ba.indexOf("arraydraw")!==-1){S.pushUnique(_t.arrays[ir],rr);return}M.update(_t,Ee),Ba!=="none"&&_t.nChanges++,Ce.transition&&Ee.anim&&_t.nChangesAnim++,(ze.test(ft)||Ze.test(ft))&&(_t.rangesAltered[Ve[0]]=1),Pe==="datarevision"&&(_t.newDataRevision=1)}function Lr(Ba){return Ba.valType==="data_array"||Ba.arrayOk}for(Pe in Te){if(_t.calc&&!Ce.transition)return;var fa=Te[Pe],Da=Ie[Pe],Ia=Ve.concat(Pe);if(ft=Ia.join("."),!(Pe.charAt(0)==="_"||typeof fa=="function"||fa===Da)){if((Pe==="tick0"||Pe==="dtick")&&Ve[0]!=="geo"){var qa=Ie.tickmode;if(qa==="auto"||qa==="array"||!qa)continue}if(!(Pe==="range"&&Ie.autorange)&&!((Pe==="zmin"||Pe==="zmax")&&Ie.type==="contourcarpet")&&(Ee=ct(Ia),!!Ee&&!(Ee._compareAsJSON&&JSON.stringify(fa)===JSON.stringify(Da)))){var Wa=Ee.valType,Ca,hi=Lr(Ee),wi=Array.isArray(fa),Kt=Array.isArray(Da);if(wi&&Kt){var Ft="_input_"+Pe,Yt=Te[Ft],Jt=Ie[Ft];if(Array.isArray(Yt)&&Yt===Jt)continue}if(Da===void 0)hi&&wi?_t.calc=!0:er();else if(Ee._isLinkedToArray){var Fr=[],ta=!1;ir||(_t.arrays[Pe]=Fr);var ra=Math.min(fa.length,Da.length),ca=Math.max(fa.length,Da.length);if(ra!==ca)if(Ee.editType==="arraydraw")ta=!0;else{er();continue}for(Ca=0;Ca<ra;Ca++)mr(fa[Ca],Da[Ca],Ia.concat(Ca),S.extendFlat({inArray:Pe,arrayIndex:Ca},Ce));if(ta)for(Ca=ra;Ca<ca;Ca++)Fr.push(Ca)}else!Wa&&S.isPlainObject(fa)?mr(fa,Da,Ia,Ce):hi?wi&&Kt?(Ct&&(_t.calc=!0),(Ct||Ce.newDataRevision)&&er()):wi!==Kt?_t.calc=!0:er():wi&&Kt?(fa.length!==Da.length||String(fa)!==String(Da))&&er():er()}}}for(Pe in Ie)if(!(Pe in Te||Pe.charAt(0)==="_"||typeof Ie[Pe]=="function"))if(Ee=ct(Ve.concat(Pe)),Lr(Ee)&&Array.isArray(Ie[Pe])){_t.calc=!0;return}else er()}function qr(Te,Ie,Ve){if(Te=S.getGraphDiv(Te),!S.isPlotDiv(Te))throw new Error("This element is not a Plotly plot: "+Te+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var Ce=Te._transitionData;Ce._frameQueue||(Ce._frameQueue=[]),Ve=a.supplyAnimationDefaults(Ve);var Ee=Ve.transition,Pe=Ve.frame;Ce._frameWaitingCnt===void 0&&(Ce._frameWaitingCnt=0);function ft(Ct){return Array.isArray(Ee)?Ct>=Ee.length?Ee[0]:Ee[Ct]:Ee}function ct(Ct){return Array.isArray(Pe)?Ct>=Pe.length?Pe[0]:Pe[Ct]:Pe}function _t(Ct,ir){var rr=0;return function(){if(Ct&&++rr===ir)return Ct()}}return new Promise(function(Ct,ir){function rr(){if(Ce._frameQueue.length!==0){for(;Ce._frameQueue.length;){var ra=Ce._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Te.emit("plotly_animationinterrupted",[])}}function er(ra){if(ra.length!==0){for(var ca=0;ca<ra.length;ca++){var Ba;ra[ca].type==="byname"?Ba=a.computeFrame(Te,ra[ca].name):Ba=ra[ca].data;var $a=ct(ca),Za=ft(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=_t(Ct,2),ri.onInterrupt=ir),Ce._frameQueue.push(ri)}Ve.mode==="immediate"&&(Ce._lastFrameAt=-1/0),Ce._animationRaf||Da()}}function Lr(){Te.emit("plotly_animated"),window.cancelAnimationFrame(Ce._animationRaf),Ce._animationRaf=null}function fa(){Ce._currentFrame&&Ce._currentFrame.onComplete&&Ce._currentFrame.onComplete();var ra=Ce._currentFrame=Ce._frameQueue.shift();if(ra){var ca=ra.name?ra.name.toString():null;Te._fullLayout._currentFrame=ca,Ce._lastFrameAt=Date.now(),Ce._timeToNext=ra.frameOpts.duration,a.transition(Te,ra.frame.data,ra.frame.layout,w.coerceTraceIndices(Te,ra.frame.traces),ra.frameOpts,ra.transitionOpts).then(function(){ra.onComplete&&ra.onComplete()}),Te.emit("plotly_animatingframe",{name:ca,frame:ra.frame,animation:{frame:ra.frameOpts,transition:ra.transitionOpts}})}else Lr()}function Da(){Te.emit("plotly_animating"),Ce._lastFrameAt=-1/0,Ce._timeToNext=0,Ce._runningTransitions=0,Ce._currentFrame=null;var ra=function(){Ce._animationRaf=window.requestAnimationFrame(ra),Date.now()-Ce._lastFrameAt>Ce._timeToNext&&fa()};ra()}var Ia=0;function qa(ra){return Array.isArray(Ee)?Ia>=Ee.length?ra.transitionOpts=Ee[Ia]:ra.transitionOpts=Ee[0]:ra.transitionOpts=Ee,Ia++,ra}var Wa,Ca,hi=[],wi=Ie==null,Kt=Array.isArray(Ie),Ft=!wi&&!Kt&&S.isPlainObject(Ie);if(Ft)hi.push({type:"object",data:qa(S.extendFlat({},Ie))});else if(wi||["string","number"].indexOf(typeof Ie)!==-1)for(Wa=0;Wa<Ce._frames.length;Wa++)Ca=Ce._frames[Wa],Ca&&(wi||String(Ca.group)===String(Ie))&&hi.push({type:"byname",name:String(Ca.name),data:qa({name:Ca.name})});else if(Kt)for(Wa=0;Wa<Ie.length;Wa++){var Yt=Ie[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"&&!Ce._frameHash[Ca.data.name]){S.warn('animate failure: frame not found: "'+Ca.data.name+'"'),ir();return}["next","immediate"].indexOf(Ve.mode)!==-1&&rr(),Ve.direction==="reverse"&&hi.reverse();var Jt=Te._fullLayout._currentFrame;if(Jt&&Ve.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?er(hi):(Te.emit("plotly_animated"),Ct())})}function Sr(Te,Ie,Ve){if(Te=S.getGraphDiv(Te),Ie==null)return Promise.resolve();if(!S.isPlotDiv(Te))throw new Error("This element is not a Plotly plot: "+Te+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ce,Ee,Pe,ft,ct=Te._transitionData._frames,_t=Te._transitionData._frameHash;if(!Array.isArray(Ie))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ie);var Ct=ct.length+Ie.length*2,ir=[],rr={};for(Ce=Ie.length-1;Ce>=0;Ce--)if(S.isPlainObject(Ie[Ce])){var er=Ie[Ce].name,Lr=(_t[er]||rr[er]||{}).name,fa=Ie[Ce].name,Da=_t[Lr]||rr[Lr];Lr&&fa&&typeof fa=="number"&&Da&&b<d&&(b++,S.warn('addFrames: overwriting frame "'+(_t[Lr]||rr[Lr]).name+'" with a frame whose name of type "number" also equates to "'+Lr+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),b===d&&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.")),rr[er]={name:er},ir.push({frame:a.supplyFrameDefaults(Ie[Ce]),index:Ve&&Ve[Ce]!==void 0&&Ve[Ce]!==null?Ve[Ce]:Ct+Ce})}ir.sort(function(Ft,Yt){return Ft.index>Yt.index?-1:Ft.index<Yt.index?1:0});var Ia=[],qa=[],Wa=ct.length;for(Ce=ir.length-1;Ce>=0;Ce--){if(Ee=ir[Ce].frame,typeof Ee.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;_t[Ee.name="frame "+Te._transitionData._counter++];);if(_t[Ee.name]){for(Pe=0;Pe<ct.length&&(ct[Pe]||{}).name!==Ee.name;Pe++);Ia.push({type:"replace",index:Pe,value:Ee}),qa.unshift({type:"replace",index:Pe,value:ct[Pe]})}else ft=Math.max(0,Math.min(ir[Ce].index,Wa)),Ia.push({type:"insert",index:ft,value:Ee}),qa.unshift({type:"delete",index:ft}),Wa++}var Ca=a.modifyFrames,hi=a.modifyFrames,wi=[Te,qa],Kt=[Te,Ia];return t&&t.add(Te,Ca,wi,hi,Kt),a.modifyFrames(Te,Ia)}function Rr(Te,Ie){if(Te=S.getGraphDiv(Te),!S.isPlotDiv(Te))throw new Error("This element is not a Plotly plot: "+Te);var Ve,Ce,Ee=Te._transitionData._frames,Pe=[],ft=[];if(!Ie)for(Ie=[],Ve=0;Ve<Ee.length;Ve++)Ie.push(Ve);for(Ie=Ie.slice(),Ie.sort(),Ve=Ie.length-1;Ve>=0;Ve--)Ce=Ie[Ve],Pe.push({type:"delete",index:Ce}),ft.unshift({type:"insert",index:Ce,value:Ee[Ce]});var ct=a.modifyFrames,_t=a.modifyFrames,Ct=[Te,ft],ir=[Te,Pe];return t&&t.add(Te,ct,Ct,_t,ir),a.modifyFrames(Te,Pe)}function wt(Te){Te=S.getGraphDiv(Te);var Ie=Te._fullLayout||{},Ve=Te._fullData||[];return a.cleanPlot([],{},Ve,Ie),a.purge(Te),e.purge(Te),Ie._container&&Ie._container.remove(),delete Te._context,Te}function Ne(Te){var Ie=Te._fullLayout,Ve=Te.getBoundingClientRect();if(!S.equalDomRects(Ve,Ie._lastBBox)){var Ce=Ie._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Te));Ie._invScaleX=Math.sqrt(Ce[0][0]*Ce[0][0]+Ce[0][1]*Ce[0][1]+Ce[0][2]*Ce[0][2]),Ie._invScaleY=Math.sqrt(Ce[1][0]*Ce[1][0]+Ce[1][1]*Ce[1][1]+Ce[1][2]*Ce[1][2]),Ie._lastBBox=Ve}}function Ke(Te){var Ie=G.select(Te),Ve=Te._fullLayout;if(Ve._calcInverseTransform=Ne,Ve._calcInverseTransform(Te),Ve._container=Ie.selectAll(".plot-container").data([0]),Ve._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ve._paperdiv=Ve._container.selectAll(".svg-container").data([0]),Ve._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ve._glcontainer=Ve._paperdiv.selectAll(".gl-container").data([{}]),Ve._glcontainer.enter().append("div").classed("gl-container",!0),Ve._paperdiv.selectAll(".main-svg").remove(),Ve._paperdiv.select(".modebar-container").remove(),Ve._paper=Ve._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ve._toppaper=Ve._paperdiv.append("svg").classed("main-svg",!0),Ve._modebardiv=Ve._paperdiv.append("div"),delete Ve._modeBar,Ve._hoverpaper=Ve._paperdiv.append("svg").classed("main-svg",!0),!Ve._uid){var Ce={};G.selectAll("defs").each(function(){this.id&&(Ce[this.id.split("-")[1]]=1)}),Ve._uid=S.randstr(Ce)}Ve._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),Ve._defs=Ve._paper.append("defs").attr("id","defs-"+Ve._uid),Ve._clips=Ve._defs.append("g").classed("clips",!0),Ve._topdefs=Ve._toppaper.append("defs").attr("id","topdefs-"+Ve._uid),Ve._topclips=Ve._topdefs.append("g").classed("clips",!0),Ve._bgLayer=Ve._paper.append("g").classed("bglayer",!0),Ve._draggers=Ve._paper.append("g").classed("draglayer",!0);var Ee=Ve._paper.append("g").classed("layer-below",!0);Ve._imageLowerLayer=Ee.append("g").classed("imagelayer",!0),Ve._shapeLowerLayer=Ee.append("g").classed("shapelayer",!0),Ve._cartesianlayer=Ve._paper.append("g").classed("cartesianlayer",!0),Ve._polarlayer=Ve._paper.append("g").classed("polarlayer",!0),Ve._smithlayer=Ve._paper.append("g").classed("smithlayer",!0),Ve._ternarylayer=Ve._paper.append("g").classed("ternarylayer",!0),Ve._geolayer=Ve._paper.append("g").classed("geolayer",!0),Ve._funnelarealayer=Ve._paper.append("g").classed("funnelarealayer",!0),Ve._pielayer=Ve._paper.append("g").classed("pielayer",!0),Ve._iciclelayer=Ve._paper.append("g").classed("iciclelayer",!0),Ve._treemaplayer=Ve._paper.append("g").classed("treemaplayer",!0),Ve._sunburstlayer=Ve._paper.append("g").classed("sunburstlayer",!0),Ve._indicatorlayer=Ve._toppaper.append("g").classed("indicatorlayer",!0),Ve._glimages=Ve._paper.append("g").classed("glimages",!0);var Pe=Ve._toppaper.append("g").classed("layer-above",!0);Ve._imageUpperLayer=Pe.append("g").classed("imagelayer",!0),Ve._shapeUpperLayer=Pe.append("g").classed("shapelayer",!0),Ve._selectionLayer=Ve._toppaper.append("g").classed("selectionlayer",!0),Ve._infolayer=Ve._toppaper.append("g").classed("infolayer",!0),Ve._menulayer=Ve._toppaper.append("g").classed("menulayer",!0),Ve._zoomlayer=Ve._toppaper.append("g").classed("zoomlayer",!0),Ve._hoverlayer=Ve._hoverpaper.append("g").classed("hoverlayer",!0),Ve._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Te.emit("plotly_framework")}Z.animate=qr,Z.addFrames=Sr,Z.deleteFrames=Rr,Z.addTraces=Y,Z.deleteTraces=ee,Z.extendTraces=fe,Z.moveTraces=q,Z.prependTraces=V,Z.newPlot=N,Z._doPlot=u,Z.purge=wt,Z.react=qt,Z.redraw=F,Z.relayout=be,Z.restyle=oe,Z.setPlotConfig=f,Z.update=st,Z._guiRelayout=Me(be),Z._guiRestyle=Me(oe),Z._guiUpdate=Me(st),Z._storeDirectGUIEdit=re}}),Yv=Xe({"src/snapshot/helpers.js"(Z){"use strict";var G=so();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){G.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 v=window.URL||window.webkitURL;Z.createObjectURL=function(S){return v.createObjectURL(S)},Z.revokeObjectURL=function(S){return v.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=Xe({"src/snapshot/tosvg.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=$n(),e=vd(),t=/"/g,r="TOBESTRIPPED",o=new RegExp('("'+r+")|("+r+'")',"g");function a(i){var s=v.select("body").append("div").style({display:"none"}).html(""),h=i.replace(/(&[^;]*;)/gi,function(c){return c==="&lt;"?"&#60;":c==="&rt;"?"&#62;":c.indexOf("<")!==-1||c.indexOf(">")!==-1?"":s.html(c).text()});return s.remove(),h}function n(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}G.exports=function(s,h,c){var m=s._fullLayout,p=m._paper,T=m._toppaper,l=m.width,_=m.height,w;p.insert("rect",":first-child").call(S.setRect,0,0,l,_).call(E.fill,m.paper_bgcolor);var A=m._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 d=b[w];d.childNodes.length&&p.node().appendChild(d)}}m._draggers&&m._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var y=v.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){y.remove();return}else y.style({visibility:null,display:null});var f=this.style.fontFamily;f&&f.indexOf('"')!==-1&&y.style("font-family",f.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)}),p.selectAll(".gradient_filled,.pattern_filled").each(function(){var y=v.select(this),f=this.style.fill;f&&f.indexOf("url(")!==-1&&y.style("fill",f.replace(t,r));var R=this.style.stroke;R&&R.indexOf("url(")!==-1&&y.style("stroke",R.replace(t,r))}),(h==="pdf"||h==="eps")&&p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),h==="svg"&&c&&(p.attr("width",c*l),p.attr("height",c*_),p.attr("viewBox","0 0 "+l+" "+_));var u=new window.XMLSerializer().serializeToString(p.node());return u=a(u),u=n(u),u=u.replace(o,"'"),u}}}),L2=Xe({"src/snapshot/svgtoimg.js"(Z,G){"use strict";var v=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,c=e.scale||1,m=e.width||300,p=e.height||150,T=c*m,l=c*p,_=h.getContext("2d",{willReadFrequently:!0}),w=new n,A,M;s==="svg"||v.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}G.exports=E}}),R5=Xe({"src/plot_api/to_image.js"(Z,G){"use strict";var v=rs(),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,c,m,p;E.isPlainObject(i)?(h=i.data||[],c=i.layout||{},m=i.config||{},p={}):(i=E.getGraphDiv(i),h=E.extendDeep([],i.data),c=E.extendDeep({},i.layout),m=i._context,p=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"),d=_("imageDataOnly"),u=document.createElement("div");u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);var y=E.extendFlat({},c);A?y.width=A:s.width===null&&v(p.width)&&(y.width=p.width),M?y.height=M:s.height===null&&v(p.height)&&(y.height=p.height);var f=E.extendFlat({},m,{_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(d?$:e.encodeJSON($))}if(X(),w==="svg")return N(d?P:e.encodeSVG(P));var se=document.createElement("canvas");se.id=E.randstr(),r({format:w,width:U,height:B,scale:g,canvas:se,svg:P,promise:!0}).then(N).catch(O)})}function F(N){return d?N.replace(e.IMAGE_URL_PREFIX,""):N}return new Promise(function(N,O){x.newPlot(u,h,y,f).then(R).then(L).then(z).then(function(P){N(F(P))}).catch(function(P){O(P)})})}G.exports=n}}),Uz=Xe({"src/plot_api/validate.js"(Z,G){"use strict";var v=sa(),x=bc(),S=e1(),E=X0().dfltConfig,e=v.isPlainObject,t=Array.isArray,r=v.isArrayOrTypedArray;G.exports=function(_,w){_===void 0&&(_=[]),w===void 0&&(w={});var A=S.get(),M=[],g={_context:v.extendFlat({},E)},b,d;t(_)?(g.data=v.extendDeep([],_),b=_):(g.data=[],b=[],M.push(s("array","data"))),e(w)?(g.layout=v.extendDeep({},w),d=w):(g.layout={},d={},arguments.length>1&&M.push(s("object","layout"))),x.supplyDefaults(g);for(var u=g._fullData,y=b.length,f=0;f<y;f++){var R=b[f],L=["data",f];if(!e(R)){M.push(s("object",L));continue}var z=u[f],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(d,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),d=0;d<b.length;d++){var u=b[d],y=g.slice();y.push(u);var f=l[u],R=_[u],L=c(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(f)&&e(R)&&z!=="any")o(f,R,L,A,M,y);else if(F&&t(f)){f.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,$,se,le;if(L.dimensions===2)for(X=0;X<P;X++)if(t(f[X])){f[X].length>R[X].length&&A.push(s("unused",M,y.concat(X,R[X].length)));var fe=R[X].length;for(B=0;B<(U?Math.min(fe,O[X].length):fe);B++)$=U?O[X][B]:O,se=f[X][B],le=R[X][B],v.validate(se,$)?le!==se&&le!==+se&&A.push(s("dynamic",M,y.concat(X,B),se,le)):A.push(s("value",M,y.concat(X,B),se))}else A.push(s("array",M,y.concat(X),f[X]));else for(X=0;X<P;X++)$=U?O[X]:O,se=f[X],le=R[X],v.validate(se,$)?le!==se&&le!==+se&&A.push(s("dynamic",M,y.concat(X),se,le)):A.push(s("value",M,y.concat(X),se))}else if(L.items&&!F&&t(f)){var V=O[Object.keys(O)[0]],Y=[],ee,q;for(ee=0;ee<R.length;ee++){var oe=R[ee]._index||ee;if(q=y.slice(),q.push(oe),e(f[oe])&&e(R[ee])){Y.push(oe);var ae=f[oe],j=R[ee];e(ae)&&ae.visible!==!1&&j.visible===!1?A.push(s("invisible",M,q)):o(ae,j,V,A,M,q)}}for(ee=0;ee<f.length;ee++)q=y.slice(),q.push(ee),e(f[ee])?Y.indexOf(ee)===-1&&A.push(s("unused",M,q)):A.push(s("object",M,q,f[ee]))}else!e(f)&&e(R)?A.push(s("object",M,y,f)):!r(f)&&r(R)&&!F&&!N?A.push(s("array",M,y,f)):u in _?v.validate(f,L)?L.valType==="enumerated"&&(L.coerceNumber&&f!==+R||!r(f)&&f!==R||String(f)!==String(R))&&A.push(s("dynamic",M,y,f,R)):A.push(s("value",M,y,f)):A.push(s("unused",M,y,f))}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?v.extendFlat(w[g.attributes.subplot.dflt],b):v.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 d=T(w),u=n[l](_,d,A,M);return v.log(u),{code:l,container:g,trace:b,path:w,astr:d,msg:u}}function h(l,_){var w=p(_),A=w.keyMinusId,M=w.id;return A in l&&l[A]._isSubplotObj&&M?!0:_ in l}function c(l,_){if(_ in l)return l[_];var w=p(_);return l[w.keyMinusId]}var m=v.counterRegex("([a-z]+)");function p(l){var _=l.match(m);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=Xe({"src/snapshot/filesaver.js"(Z,G){"use strict";var v=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(v.isSafari()){var c=t==="svg"?",":";base64,";return x.octetStream(c+encodeURIComponent(E)),n(e)}i(new Error("download error"))});return a}G.exports=S}}),D5=Xe({"src/snapshot/download.js"(Z,G){"use strict";var v=sa(),x=R5(),S=jz(),E=Yv();function e(t,r){var o;return v.isPlainObject(t)||(o=v.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)})})}G.exports=e}}),qz=Xe({"src/plot_api/template_api.js"(Z){"use strict";var G=sa(),v=G.isPlainObject,x=e1(),S=bc(),E=ru(),e=zl(),t=X0().dfltConfig;Z.makeTemplate=function(m){m=G.isPlainObject(m)?m:G.getGraphDiv(m),m=G.extendDeep({_context:t},{data:m.data,layout:m.layout}),S.supplyDefaults(m);var p=m.data||[],T=m.layout||{};T._basePlotModules=m._fullLayout._basePlotModules,T._modules=m._fullLayout._modules;var l={data:{},layout:{}};p.forEach(function(f){var R={};a(f,R,i.bind(null,f));var L=G.coerce(f,{},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(v(_)){var w=_.layout,A,M,g,b,d,u;v(w)&&r(w,l.layout);var y=_.data;if(v(y)){for(M in l.data)if(g=y[M],Array.isArray(g)){for(d=l.data[M],u=d.length,b=g.length,A=0;A<u;A++)r(g[A%b],d[A]);for(A=u;A<b;A++)d.push(G.extendDeep({},g[A]))}for(M in y)M in l.data||(l.data[M]=G.extendDeep([],y[M]))}}return l};function r(m,p){m=G.extendDeep({},m);var T=Object.keys(m).sort(),l,_;function w(d,u,y){if(v(u)&&v(d))r(d,u);else if(Array.isArray(u)&&Array.isArray(d)){var f=e.arrayTemplater({_template:m},y);for(_=0;_<u.length;_++){var R=u[_],L=f.newItem(R)._template;L&&r(L,R)}var z=f.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=m[A];if(A in p?w(M,p[A],A):p[A]=M,o(A)===A)for(var g in p){var b=o(g);g!==b&&b===A&&!(g in m)&&w(M,p[g],A)}}}function o(m){return m.replace(/[0-9]+$/,"")}function a(m,p,T,l,_){var w=_&&T(_);for(var A in m){var M=m[A],g=s(m,A,l),b=s(m,A,_),d=T(b);if(!d){var u=o(A);u!==A&&(b=s(m,u,_),d=T(b))}if(!(w&&w===d)&&!(!d||d._noTemplating||d.valType==="data_array"||d.arrayOk&&Array.isArray(M)))if(!d.valType&&v(M))a(M,p,T,g,b);else if(d._isLinkedToArray&&Array.isArray(M))for(var y=!1,f=0,R={},L=0;L<M.length;L++){var z=M[L];if(v(z)){var F=z.name;if(F)R[F]||(a(z,p,T,s(M,f,g),s(M,f,b)),f++,R[F]=1);else if(!y){var N=e.arrayDefaultKey(A),O=s(m,N,l),P=s(M,f,g);a(z,p,T,P,s(M,f,b));var U=G.nestedProperty(p,P),B=G.nestedProperty(p,O);B.set(U.get()),U.set(null),y=!0}}}else{var X=G.nestedProperty(p,g);X.set(M)}}}function n(m,p){return x.getLayoutValObject(m,G.nestedProperty({},p).parts)}function i(m,p){return x.getTraceValObject(m,G.nestedProperty({},p).parts)}function s(m,p,T){var l;return T?Array.isArray(m)?l=T+"["+p+"]":l=T+"."+p:l=p,l}Z.validateTemplate=function(m,p){var T=G.extendDeep({},{_context:t,data:m.data,layout:m.layout}),l=T.layout||{};v(p)||(p=l.template||{});var _=p.layout,w=p.data,A=[];T.layout=l,T.layout.template=p,S.supplyDefaults(T);var M=T._fullLayout,g=T._fullData,b={};function d(O,P){for(var U in O)if(U.charAt(0)!=="_"&&v(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;d(O[U],X)}}function u(O,P){for(var U in O)if(U.indexOf("defaults")===-1&&v(O[U])){var B=s(O,U,P);b[B]?u(O[U],B):A.push({code:"unused",path:B})}}if(v(_)?(d(M,["layout"]),u(_,"layout")):A.push({code:"layout"}),!v(w))A.push({code:"data"});else{for(var y={},f,R=0;R<g.length;R++){var L=g[R];f=L.type,y[f]=(y[f]||0)+1,L._fullInput._template||A.push({code:"missing",index:L.index,traceType:f})}for(f in w){var z=w[f].length,F=y[f]||0;z>F?A.push({code:"unused",traceType:f,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:f,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);v(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(c)};function h(m){for(var p=0;p<m.length;p++)if(v(m[p]))return!0}function c(m){var p;switch(m.code){case"data":p="The template has no key data.";break;case"layout":p="The template has no key layout.";break;case"missing":m.path?p="There are no templates for item "+m.path+" with name "+m.templateitemname:p="There are no templates for trace "+m.index+", of type "+m.traceType+".";break;case"unused":m.path?p="The template item at "+m.path+" was not used in constructing the plot.":m.dataCount?p="Some of the templates of type "+m.traceType+" were not used. The template has "+m.templateCount+" traces, the data only has "+m.dataCount+" of this type.":p="The template has "+m.templateCount+" traces of type "+m.traceType+" but there are none in the data.";break;case"reused":p="Some of the templates of type "+m.traceType+" were used more than once. The template has "+m.templateCount+" traces, the data has "+m.dataCount+" of this type.";break}return m.msg=p,m}}}),Vz=Xe({"src/plot_api/index.js"(Z){"use strict";var G=k2();Z._doPlot=G._doPlot,Z.newPlot=G.newPlot,Z.restyle=G.restyle,Z.relayout=G.relayout,Z.redraw=G.redraw,Z.update=G.update,Z._guiRestyle=G._guiRestyle,Z._guiRelayout=G._guiRelayout,Z._guiUpdate=G._guiUpdate,Z._storeDirectGUIEdit=G._storeDirectGUIEdit,Z.react=G.react,Z.extendTraces=G.extendTraces,Z.prependTraces=G.prependTraces,Z.addTraces=G.addTraces,Z.deleteTraces=G.deleteTraces,Z.moveTraces=G.moveTraces,Z.purge=G.purge,Z.addFrames=G.addFrames,Z.deleteFrames=G.deleteFrames,Z.animate=G.animate,Z.setPlotConfig=G.setPlotConfig;var v=T_().getGraphDiv,x=E2().eraseActiveShape;Z.deleteActiveShape=function(E){return x(v(E))},Z.toImage=R5(),Z.validate=Uz(),Z.downloadImage=D5();var S=qz();Z.makeTemplate=S.makeTemplate,Z.validateTemplate=S.validateTemplate}}),n1=Xe({"src/traces/scatter/xy_defaults.js"(Z,G){"use strict";var v=sa(),x=so();G.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=v.minRowLength(o);a?n=Math.min(s,v.minRowLength(a)):(n=s,r("y0"),r("dy"))}else{if(!a)return 0;n=v.minRowLength(a),r("x0"),r("dx")}return e._length=n,n}}}),Qd=Xe({"src/traces/scatter/period_defaults.js"(Z,G){"use strict";var v=sa().dateTick0,x=Hs(),S=x.ONEWEEK;function E(e,t){return e%S===0?v(t,1):v(t,0)}G.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=Xe({"src/traces/scatter/stack_defaults.js"(Z,G){"use strict";var v=["orientation","groupnorm","stackgaps"];G.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"},c=0;c<v.length;c++){var m=v[c],p=m+"Found";if(!i[p]){var T=S[m]!==void 0,l=m==="orientation";if((T||s)&&(i[m]=t(m,h[m]),l&&(i.fillDflt=i[m]==="h"?"tonextx":"tonexty"),T&&(i[p]=!0,!s&&(delete i.traces[0][m],l))))for(var _=0;_<i.traces.length-1;_++){var w=i.traces[_];w._input.fill!==w.fill&&(w.fill=i.fillDflt)}}}return i}}}}),md=Xe({"src/traces/scatter/marker_defaults.js"(Z,G){"use strict";var v=$n(),x=wp().hasColorscale,S=_h(),E=Fu();G.exports=function(t,r,o,a,n,i={}){var s=E.isBubble(t),h=(t.line||{}).color,c;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?c=h:s?c=v.background:c=v.defaultLine,n("marker.line.color",c),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 m=n("marker.gradient.type");m!=="none"&&n("marker.gradient.color")}}}}),Dd=Xe({"src/traces/scatter/line_defaults.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray,x=wp().hasColorscale,S=_h();G.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=(v(i)?!1:i)||r;a("line.color",s)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}}),o1=Xe({"src/traces/scatter/line_shape_defaults.js"(Z,G){"use strict";G.exports=function(x,S,E){var e=E("line.shape");e==="spline"&&E("line.smoothing")}}}),zd=Xe({"src/traces/scatter/text_defaults.js"(Z,G){"use strict";var v=sa();G.exports=function(x,S,E,e,t){t=t||{},e("textposition"),v.coerceFont(e,"textfont",t.font||E.font,t),t.noSelect||(e("selected.textfont.color"),e("unselected.textfont.color"))}}}),ev=Xe({"src/traces/scatter/fillcolor_defaults.js"(Z,G){"use strict";var v=$n(),x=sa().isArrayOrTypedArray;function S(E){for(var e=v.interpolate(E[0][1],E[1][1],.5),t=2;t<E.length;t++){var r=v.interpolate(E[t-1][1],E[t][1],.5);e=v.interpolate(e,r,E[t-1][0]/E[t][0])}return e}G.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 c=o("fillgradient.type");if(c!=="none"){o("fillgradient.start"),o("fillgradient.stop");var m=o("fillgradient.colorscale");m&&(h=S(m))}}o("fillcolor",v.addOpacity((t.line||{}).color||n||h||r,.5))}}}),Hz=Xe({"src/traces/scatter/defaults.js"(Z,G){"use strict";var v=sa(),x=so(),S=af(),E=Tv(),e=Fu(),t=n1(),r=Qd(),o=Gz(),a=md(),n=Dd(),i=o1(),s=zd(),h=ev(),c=sa().coercePattern;G.exports=function(p,T,l,_){function w(f,R){return v.coerce(p,T,S,f,R)}var A=t(p,T,_,w);if(A||(T.visible=!1),!!T.visible){r(p,T,_,w),w("xhoverformat"),w("yhoverformat"),w("zorder");var M=o(p,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(p,T,l,_,w,{gradient:!0}),e.hasLines(T)&&(n(p,T,l,_,w,{backoff:!0}),i(p,T,w),w("connectgaps"),w("line.simplify")),e.hasText(T)&&(w("texttemplate"),w("texttemplatefallback"),s(p,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(p,T,l,w,{moduleHasFillgradient:!0}),e.hasLines(T)||i(p,T,w),c(w,"fillpattern",T.fillcolor,!1));var d=(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(p,T,d||u||l,{axis:"y"}),y(p,T,d||u||l,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(T,w)}}}}),Q0=Xe({"src/traces/scatter/grouping_defaults.js"(Z,G){"use strict";var v=J0().getAxisGroup;G.exports=function(S,E,e,t,r){var o=E.orientation,a=E[{v:"x",h:"y"}[o]+"axis"],n=v(e,a)+o,i=e._alignmentOpts||{},s=t("alignmentgroup"),h=i[n];h||(h=i[n]={});var c=h[s];c?c.traces.push(E):c=h[s]={traces:[E],alignmentIndex:Object.keys(h).length,offsetGroups:{}};var m=t("offsetgroup")||"",p=c.offsetGroups,T=p[m];E._offsetIndex=0,(r!=="group"||m)&&(T||(T=p[m]={offsetIndex:Object.keys(p).length}),E._offsetIndex=T.offsetIndex)}}}),z5=Xe({"src/traces/scatter/cross_trace_defaults.js"(Z,G){"use strict";var v=sa(),x=Q0(),S=af();G.exports=function(e,t){var r,o,a,n=t.scattermode;function i(p){return v.coerce(o._input,o,S,p)}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 c=a-1;c>=0;c--){var m=e[c];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Wz=Xe({"src/traces/scatter/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=_2();G.exports=function(S,E){function e(r,o){return v.coerce(S,E,x,r,o)}var t=E.barmode==="group";E.scattermode==="group"&&e("scattergap",t?E.bargap:.2)}}}),tv=Xe({"src/plots/cartesian/align_period.js"(Z,G){"use strict";var v=rs(),x=sa(),S=x.dateTime2ms,E=x.incrementMonth,e=Hs(),t=e.ONEAVGMONTH;G.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"],c;if(v(h)){if(h=+h,h<=0)return{vals:i}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)c=m;else return{vals:i}}for(var p=a.calendar,T=s==="start",l=s==="end",_=o[n+"period0"],w=S(_,p)||0,A=[],M=[],g=[],b=i.length,d=0;d<b;d++){var u=i[d],y,f,R;if(c){for(y=Math.round((u-w)/(c*t)),R=E(w,c*y,p);R>u;)R=E(R,-c,p);for(;R<=u;)R=E(R,c,p);f=E(R,-c,p)}else{for(y=Math.round((u-w)/h),R=w+y*h;R>u;)R-=h;for(;R<=u;)R+=h;f=R-h}A[d]=T?f:l?R:(f+R)/2,M[d]=f,g[d]=R}return{vals:A,starts:M,ends:g}}}}),Fd=Xe({"src/traces/scatter/colorscale_calc.js"(Z,G){"use strict";var v=wp().hasColorscale,x=Tp(),S=Fu();G.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&x(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&x(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&x(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=Xe({"src/traces/scatter/arrays_to_calcdata.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;v.mergeArray(E.text,S,"tx"),v.mergeArray(E.texttemplate,S,"txt"),v.mergeArray(E.hovertext,S,"htx"),v.mergeArray(E.customdata,S,"data"),v.mergeArray(E.textposition,S,"tp"),E.textfont&&(v.mergeArrayCastPositive(E.textfont.size,S,"ts"),v.mergeArray(E.textfont.color,S,"tc"),v.mergeArray(E.textfont.family,S,"tf"),v.mergeArray(E.textfont.weight,S,"tw"),v.mergeArray(E.textfont.style,S,"ty"),v.mergeArray(E.textfont.variant,S,"tv"),v.mergeArray(E.textfont.textcase,S,"tC"),v.mergeArray(E.textfont.lineposition,S,"tE"),v.mergeArray(E.textfont.shadow,S,"tS"));var t=E.marker;if(t){v.mergeArrayCastPositive(t.size,S,"ms"),v.mergeArrayCastPositive(t.opacity,S,"mo"),v.mergeArray(t.symbol,S,"mx"),v.mergeArray(t.angle,S,"ma"),v.mergeArray(t.standoff,S,"mf"),v.mergeArray(t.color,S,"mc");var r=t.line;t.line&&(v.mergeArray(r.color,S,"mlc"),v.mergeArrayCastPositive(r.width,S,"mlw"),v.mergeArray(r.dash,S,"mld"));var o=t.gradient;o&&o.type!=="none"&&(v.mergeArray(o.type,S,"mgt"),v.mergeArray(o.color,S,"mgc"))}}}}),Od=Xe({"src/traces/scatter/calc_selection.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){v.isArrayOrTypedArray(E.selectedpoints)&&v.tagSelected(S,E)}}}),Bd=Xe({"src/traces/scatter/calc.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Go(),E=tv(),e=Hs().BADNUM,t=Fu(),r=Fd(),o=Av(),a=Od();function n(p,T){var l=p._fullLayout,_=T._xA=S.getFromId(p,T.xaxis||"x","x"),w=T._yA=S.getFromId(p,T.yaxis||"y","y"),A=_.makeCalcdata(T,"x"),M=w.makeCalcdata(T,"y"),g=E(T,_,"x",A),b=E(T,w,"y",M),d=g.vals,u=b.vals,y=T._length,f=new Array(y),R=T.ids,L=m(T,l,_,w),z=!1,F,N,O,P,U,B;h(l,T);var X="x",$="y",se;if(L)x.pushUnique(L.traceIndices,T.index),F=L.orientation==="v",F?($="s",se="x"):(X="s",se="y"),U=L.stackgaps==="interpolate";else{var le=s(T,y);i(p,T,_,w,d,u,le)}var fe=!!T.xperiodalignment,V=!!T.yperiodalignment;for(N=0;N<y;N++){var Y=f[N]={},ee=v(d[N]),q=v(u[N]);ee&&q?(Y[X]=d[N],Y[$]=u[N],fe&&(Y.orig_x=A[N],Y.xEnd=g.ends[N],Y.xStart=g.starts[N]),V&&(Y.orig_y=M[N],Y.yEnd=b.ends[N],Y.yStart=b.starts[N])):L&&(F?ee:q)?(Y[se]=F?d[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(f,T),r(p,T),a(f,T),L){for(N=0;N<f.length;)f[N][se]===e?f.splice(N,1):N++;if(x.sort(f,function(Q,re){return Q[se]-re[se]||Q.i-re.i}),z){for(N=0;N<f.length-1&&f[N].gap;)N++;for(B=f[N].s,B||(B=f[N].s=0),O=0;O<N;O++)f[O].s=B;for(P=f.length-1;P>N&&f[P].gap;)P--;for(B=f[P].s,O=f.length-1;O>P;O--)f[O].s=B;for(;N<P;)if(N++,f[N].gap){for(O=N+1;f[O].gap;)O++;for(var oe=f[N-1][se],ae=f[N-1].s,j=(f[O].s-ae)/(f[O][se]-oe);N<O;)f[N].s=ae+(f[N][se]-oe)*j,N++}}}return f}function i(p,T,l,_,w,A,M){var g=T._length,b=p._fullLayout,d=l._id,u=_._id,y=b._firstScatter[c(T)]===T.uid,f=(m(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||f==="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||f==="v"))?z.tozero=!0:(R==="tonextx"||R==="tozerox")&&(z.padded=!1),d&&(T._extremes[d]=S.findExtremes(l,w,L)),u&&(T._extremes[u]=S.findExtremes(_,A,z))}function s(p,T){if(t.hasMarkers(p)){var l=p.marker,_=1.6*(p.marker.sizeref||1),w;if(p.marker.sizemode==="area"?w=function(d){return Math.max(Math.sqrt((d||0)/_),3)}:w=function(d){return Math.max((d||0)/_,3)},x.isArrayOrTypedArray(l.size)){var A={type:"linear"};S.setConvert(A);for(var M=A.makeCalcdata(p.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(p,T){var l=c(T),_=p._firstScatter;_[l]||(_[l]=T.uid)}function c(p){var T=p.stackgroup;return p.xaxis+p.yaxis+p.type+(T?"-"+T:"")}function m(p,T,l,_){var w=p.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}}G.exports={calc:n,calcMarkerSize:s,calcAxisExpansion:i,setFirstScatter:h,getStackOpts:m}}}),Xz=Xe({"src/traces/bar/sieve.js"(Z,G){"use strict";G.exports=x;var v=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=v(r);this.distinctPositions=h.vals,h.vals.length===1&&e!==1/0?this.minDiff=e:this.minDiff=Math.min(h.minDiff,e);var c=(E.posAxis||{}).type;(c==="category"||c==="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=Xe({"src/traces/bar/constants.js"(Z,G){"use strict";G.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),eg=Xe({"src/traces/bar/cross_trace_calc.js"(Z,G){"use strict";var v=rs(),{isArrayOrTypedArray:x}=sa(),{BADNUM:S}=Hs(),E=so(),e=Go(),{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,$=[],se=[],le=0;le<B.length;le++){var fe=B[le];if(fe.visible===!0&&E.traceIs(fe,"bar")&&fe.xaxis===O._id&&fe.yaxis===P._id&&(fe.orientation==="h"?$.push(X[le]):se.push(X[le]),fe._computePh))for(var V=F.calcdata[le],Y=0;Y<V.length;Y++)typeof V[Y].ph0=="function"&&(V[Y].ph0=V[Y].ph0()),typeof V[Y].ph1=="function"&&(V[Y].ph1=V[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,se,ee),s(F,P,O,$,ee)}function s(F,N,O,P,U){if(P.length){var B,X,$,se,le;switch(m(O,P),U.mode){case"overlay":p(F,N,O,P,U);break;case"group":for(B=[],X=[],$=0;$<P.length;$++)se=P[$],le=se[0].trace,le.offset===void 0?X.push(se):B.push(se);X.length&&T(F,N,O,X,U),B.length&&p(F,N,O,B,U);break;case"stack":case"relative":for(B=[],X=[],$=0;$<P.length;$++)se=P[$],le=se[0].trace,le.base===void 0?X.push(se):B.push(se);c(X),X.length&&l(F,N,O,X,U),B.length&&p(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=v(B)?+B:+B.slice(0,-1),$=v(B)?"px":"%",U.cornerradiusvalue=X,U.cornerradiusform=$))}function c(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=v(B)?+B:+B.slice(0,-1),$=v(B)?"px":"%",N=0;N<F.length;N++)O=F[N],U=O[0].t,U.cornerradiusvalue=X,U.cornerradiusform=$}}function m(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,$,se=B.orientation==="h"?B.xcalendar:B.ycalendar,le=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++)$=le(X[P],0,se),v($)?(U[P].b=+$,U[P].hasB=1):U[P].b=0;for(;P<U.length;P++)U[P].b=0}else{$=le(X,0,se);var fe=v($);for($=fe?$:0,P=0;P<U.length;P++)U[P].b=$,fe&&(U[P].hasB=1)}}}function p(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?(d($),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?(d(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],se=$[0].t.offsetindex,le=0;le<$.length;le++){var fe=$[le];if(fe.s!==S){var V=fe.b+fe.s===B.get(fe.p,se,fe.s);V&&(fe._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,se=O.traces,le=se.length,fe=B.length!==X.length,V=$*(1-P.gap),Y,ee,q,oe;if(N._id==="angularaxis")Y=V,ee=Y*(1-(P.groupgap||0)),q=-ee/2;else{var ae=t(U,N._id)+se[0][0].trace.orientation;oe=U._alignmentOpts[ae]||{}}for(var j=0;j<le;j++){var Q=se[j],re=Q[0].trace;if(N._id!=="angularaxis"){var ce=oe[re.alignmentgroup]||{},be=Object.keys(ce.offsetGroups||{}).length;be?Y=V/be:Y=fe?V/le:V,ee=Y*(1-(P.groupgap||0)),be?q=((2*re._offsetIndex+1-be)*Y-ee)/2:q=fe?((2*j+1-le)*Y-ee)/2:-ee/2}var Ae=Q[0].t;Ae.barwidth=ee,Ae.offsetindex=re._offsetIndex||0,Ae.poffset=q,Ae.bargroupwidth=V,Ae.bardelta=$}O.binWidth=se[0][0].t.barwidth/100,w(O),A(N,O),N._id==="angularaxis"?M(N,O):M(N,O,fe)}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,se=X._offset||X.offset,le=$.poffset,fe;if(x(se)){for(fe=Array.prototype.slice.call(se,0,U.length),P=0;P<fe.length;P++)v(fe[P])||(fe[P]=le);for(P=fe.length;P<U.length;P++)fe.push(le);$.poffset=fe}else se!==void 0&&($.poffset=se);var V=X._width||X.width,Y=$.barwidth;if(x(V)){var ee=Array.prototype.slice.call(V,0,U.length);for(P=0;P<ee.length;P++)v(ee[P])||(ee[P]=Y);for(P=ee.length;P<U.length;P++)ee.push(Y);if($.barwidth=ee,se===void 0){for(fe=[],P=0;P<U.length;P++)fe.push(le+(Y-ee[P])/2);$.poffset=fe}}else V!==void 0&&($.barwidth=V,se===void 0&&($.poffset=le+(Y-V)/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,se=x($),le=X.barwidth,fe=x(le),V=0;V<B.length;V++){var Y=B[V],ee=Y.w=fe?le[V]:le;Y.p===void 0&&(Y.p=Y[P],Y["orig_"+P]=Y[P]);var q=(se?$[V]:$)+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],se=$[0],le=se.trace,fe=[],V,Y,ee,q;for(q=0;q<$.length;q++)V=$[q],Y=V.p-B,ee=V.p+B,fe.push(Y,ee);if(le.width||le.offset){var oe=se.t,ae=oe.poffset,j=oe.barwidth,Q=x(ae),re=x(j);for(q=0;q<$.length;q++){V=$[q];var ce=Q?ae[q]:ae,be=re?j[q]:j;Y=V.p+ce,ee=Y+be,fe.push(Y,ee)}}le._extremes[F._id]=e.findExtremes(F,fe,{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",se=X.orientation==="v",le=[],fe=!1,V=0;V<B.length;V++){var Y=B[V],ee=$?0:Y.b,q=$?se?Y.y:Y.x:ee+Y.s;Y[P]=q,le.push(q),Y.hasB&&le.push(ee),(!Y.hasB||!Y.b)&&(fe=!0)}let{ppadminus:oe,ppadplus:ae}=f(X,B);X._extremes[F._id]=e.findExtremes(F,le,{tozero:fe,padded:!0,ppadplus:ae,ppadminus:oe})}}function b(F,N,O){var P=z(F),U=N.traces,B,X,$,se,le,fe,V;for(se=0;se<U.length;se++)if(B=U[se],X=B[0].trace,X.type==="funnel")for(V=B[0].t.offsetindex,le=0;le<B.length;le++)fe=B[le],fe.s!==S&&N.put(fe.p,V,-.5*fe.s);for(se=0;se<U.length;se++){B=U[se],X=B[0].trace,$=X.type==="funnel",V=X.type==="barpolar"?0:B[0].t.offsetindex;var Y=[];for(le=0;le<B.length;le++)if(fe=B[le],fe.s!==S){var ee;$?ee=fe.s:ee=fe.s+fe.b;var q=N.put(fe.p,V,ee),oe=q+ee;fe.b=q,fe[P]=oe,O.norm||(Y.push(oe),fe.hasB&&Y.push(q))}if(!O.norm){let{ppadminus:ae,ppadplus:j}=f(X,B);X._extremes[F._id]=e.findExtremes(F,Y,{tozero:!0,padded:!0,ppadplus:j,ppadminus:ae})}}}function d(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}),se=0;se<U.length;se++){var le=U[se];if(le.p!==S){var fe=$.put(le.p,X,le.b+le.s);fe&&(le.b=fe)}}}}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)),se=O.mode==="stack"?B:$;function le(Ae){return v(F.c2l(Ae))&&(Ae<$-X||Ae>se+X||!v($))}for(var fe=0;fe<P.length;fe++){for(var V=P[fe],Y=V[0].t.offsetindex,ee=V[0].trace,q=[],oe=!1,ae=!1,j=0;j<V.length;j++){var Q=V[j];if(Q.s!==S){var re=Math.abs(B/N.get(Q.p,Y,Q.s));Q.b*=re,Q.s*=re;var ce=Q.b,be=ce+Q.s;Q[U]=be,q.push(be),ae=ae||le(be),Q.hasB&&(q.push(ce),ae=ae||le(ce)),(!Q.hasB||!Q.b)&&(oe=!0)}}let{ppadminus:Ae,ppadplus:De}=f(ee,V);ee._extremes[F._id]=e.findExtremes(F,q,{tozero:oe,padded:ae,ppadplus:De,ppadminus:Ae})}}function f(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 se=X[$],le=se[U];se._sMin=N[le],se._sMax=O[le]}}function L(F,N){var O=z(N),P={},U,B,X,$=1/0,se=-1/0;for(U=0;U<F.length;U++)for(X=F[U],B=0;B<X.length;B++){var le=X[B].p;v(le)&&($=Math.min($,le),se=Math.max(se,le))}var fe=1e4/(se-$),V=P.round=function(ze){return String(Math.round(fe*(ze-$)))},Y={},ee={},q=F.some(function(ze){var Ze=ze[0].trace;return"marker"in Ze&&Ze.marker.cornerradius});for(U=0;U<F.length;U++){X=F[U],X[0].t.extents=P;var oe=X[0].t.poffset,ae=x(oe);for(B=0;B<X.length;B++){var j=X[B],Q=j[O]-j.w/2;if(v(Q)){var re=j[O]+j.w/2,ce=V(j.p);P[ce]?P[ce]=[Math.min(Q,P[ce][0]),Math.max(re,P[ce][1])]:P[ce]=[Q,re]}if(j.p0=j.p+(ae?oe[B]:oe),j.p1=j.p0+j.w,j.s0=j.b,j.s1=j.s0+j.s,q){var be=Math.min(j.s0,j.s1)||0,Ae=Math.max(j.s0,j.s1)||0,De=j[O];Y[De]=De in Y?Math.min(Y[De],be):be,ee[De]=De in ee?Math.max(ee[De],Ae):Ae}}}q&&R(F,Y,ee,N)}function z(F){return F._id.charAt(0)}G.exports={crossTraceCalc:i,setGroupPositions:s}}}),Zz=Xe({"src/traces/scatter/cross_trace_calc.js"(Z,G){"use strict";var v=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=[],c=[],m=0;m<i.length;m++){var p=i[m];p.visible===!0&&p.type==="scatter"&&p.xaxis===o._id&&p.yaxis===a._id&&(p.orientation==="h"?h.push(s[m]):p.orientation==="v"&&c.push(s[m]))}var T={mode:n.scattermode,gap:n.scattergap};x(t,o,a,c,T),x(t,a,o,h,T)}G.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,c,m,p,T,l,_,w,A,M,g,b,d,u,y,f;for(var R in s){g=s[R];var L=g.traceIndices;if(L.length){for(b=g.stackgaps==="interpolate",d=g.groupnorm,g.orientation==="v"?(u="x",y="y"):(u="y",y="x"),f=new Array(L.length),c=0;c<f.length;c++)f[c]=!1;_=h[L[0]];var z=new Array(_.length);for(c=0;c<_.length;c++)z[c]=_[c][u];for(c=1;c<L.length;c++){for(l=h[L[c]],m=p=0;m<l.length;m++){for(w=l[m][u];w>z[p]&&p<z.length;p++)E(l,m,z[p],c,f,b,u),m++;if(w!==z[p]){for(T=0;T<c;T++)E(h[L[T]],p,w,T,f,b,u);z.splice(p,0,w)}p++}for(;p<z.length;p++)E(l,m,z[p],c,f,b,u),m++}var F=z.length;for(m=0;m<_.length;m++){for(A=_[m][y]=_[m].s,c=1;c<L.length;c++)l=h[L[c]],l[0].trace._rawLength=l[0].trace._length,l[0].trace._length=F,A+=l[m].s,l[m][y]=A;if(d)for(M=(d==="fraction"?A:A/100)||1,c=0;c<L.length;c++){var N=h[L[c]][m];N[y]/=M,N.sNorm=N.s/M}}for(c=0;c<L.length;c++){l=h[L[c]];var O=l[0].trace,P=v.calcMarkerSize(O,O._rawLength),U=Array.isArray(P);if(P&&f[c]||U){var B=P;for(P=new Array(F),m=0;m<F;m++)P[m]=l[m].gap?0:U?B[l[m].i]:B}var X=new Array(F),$=new Array(F);for(m=0;m<F;m++)X[m]=l[m].x,$[m]=l[m].y;v.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 c=t[r-1];h.s=c.s,h.i=c.i,h.gap=c.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=Xe({"src/traces/scatter/line_points.js"(Z,G){"use strict";var v=es(),x=Hs(),S=x.BADNUM,E=x.LOG_CLIP,e=E+.5,t=E-.5,r=sa(),o=r.segmentsIntersect,a=r.constrain,n=Tv();G.exports=function(s,h){var c=h.trace||{},m=h.xaxis,p=h.yaxis,T=m.type==="log",l=p.type==="log",_=m._length,w=p._length,A=h.backoff,M=c.marker,g=h.connectGaps,b=h.baseTolerance,d=h.shape,u=d==="linear",y=c.fill&&c.fill!=="none",f=[],R=n.minTolerance,L=s.length,z=new Array(L),F=0,N,O,P,U,B,X,$,se,le,fe,V,Y,ee,q,oe,ae;function j(ct){var _t=s[ct];if(!_t)return!1;var Ct=h.linearized?m.l2p(_t.x):m.c2p(_t.x),ir=h.linearized?p.l2p(_t.y):p.c2p(_t.y);if(Ct===S){if(T&&(Ct=m.c2p(_t.x,!0)),Ct===S)return!1;l&&ir===S&&(Ct*=Math.abs(m._m*w*(m._m>0?e:t)/(p._m*_*(p._m>0?e:t)))),Ct*=1e3}if(ir===S){if(l&&(ir=p.c2p(_t.y,!0)),ir===S)return!1;ir*=1e3}return[Ct,ir]}function Q(ct,_t,Ct,ir){var rr=Ct-ct,er=ir-_t,Lr=.5-ct,fa=.5-_t,Da=rr*rr+er*er,Ia=rr*Lr+er*fa;if(Ia>0&&Ia<Da){var qa=Lr*er-fa*rr;if(qa*qa<Da)return!0}}var re,ce;function be(ct,_t){var Ct=ct[0]/_,ir=ct[1]/w,rr=Math.max(0,-Ct,Ct-1,-ir,ir-1);return rr&&re!==void 0&&Q(Ct,ir,re,ce)&&(rr=0),rr&&_t&&Q(Ct,ir,_t[0]/_,_t[1]/w)&&(rr=0),(1+n.toleranceGrowth*rr)*b}function Ae(ct,_t){var Ct=ct[0]-_t[0],ir=ct[1]-_t[1];return Math.sqrt(Ct*Ct+ir*ir)}var De=n.maxScreensAway,ze=-_*De,Ze=_*(1+De),at=-w*De,nt=w*(1+De),rt=[[ze,at,Ze,at],[Ze,at,Ze,nt],[Ze,nt,ze,nt],[ze,nt,ze,at]],st,Me,ye,he,Oe,tt;function ot(ct,_t){for(var Ct=[],ir=0,rr=0;rr<4;rr++){var er=rt[rr],Lr=o(ct[0],ct[1],_t[0],_t[1],er[0],er[1],er[2],er[3]);Lr&&(!ir||Math.abs(Lr.x-Ct[0][0])>1||Math.abs(Lr.y-Ct[0][1])>1)&&(Lr=[Lr.x,Lr.y],ir&&Ae(Lr,ct)<Ae(Ct[0],ct)?Ct.unshift(Lr):Ct.push(Lr),ir++)}return Ct}function Qe(ct){if(ct[0]<ze||ct[0]>Ze||ct[1]<at||ct[1]>nt)return[a(ct[0],ze,Ze),a(ct[1],at,nt)]}function Pt(ct,_t){if(ct[0]===_t[0]&&(ct[0]===ze||ct[0]===Ze)||ct[1]===_t[1]&&(ct[1]===at||ct[1]===nt))return!0}function It(ct,_t){var Ct=[],ir=Qe(ct),rr=Qe(_t);return ir&&rr&&Pt(ir,rr)||(ir&&Ct.push(ir),rr&&Ct.push(rr)),Ct}function qt(ct,_t,Ct){return function(ir,rr){var er=Qe(ir),Lr=Qe(rr),fa=[];if(er&&Lr&&Pt(er,Lr))return fa;er&&fa.push(er),Lr&&fa.push(Lr);var Da=2*r.constrain((ir[ct]+rr[ct])/2,_t,Ct)-((er||ir)[ct]+(Lr||rr)[ct]);if(Da){var Ia;er&&Lr?Ia=Da>0==er[ct]>Lr[ct]?er:Lr:Ia=er||Lr,Ia[ct]+=Da}return fa}}var Wt;d==="linear"||d==="spline"?Wt=ot:d==="hv"||d==="vh"?Wt=It:d==="hvh"?Wt=qt(0,ze,Ze):d==="vhv"&&(Wt=qt(1,at,nt));function kr(ct,_t){var Ct=_t[0]-ct[0],ir=(_t[1]-ct[1])/Ct,rr=(ct[1]*_t[0]-_t[1]*ct[0])/Ct;return rr>0?[ir>0?ze:Ze,nt]:[ir>0?Ze:ze,at]}function mr(ct){var _t=ct[0],Ct=ct[1],ir=_t===z[F-1][0],rr=Ct===z[F-1][1];if(!(ir&&rr))if(F>1){var er=_t===z[F-2][0],Lr=Ct===z[F-2][1];ir&&(_t===ze||_t===Ze)&&er?Lr?F--:z[F-1]=ct:rr&&(Ct===at||Ct===nt)&&Lr?er?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([ye,he]),mr(ct),Oe=null,ye=he=0}var Sr=r.isArrayOrTypedArray(M);function Rr(ct){if(ct&&A&&(ct.i=N,ct.d=s,ct.trace=c,ct.marker=Sr?M[ct.i]:M,ct.backoff=A),re=ct[0]/_,ce=ct[1]/w,st=ct[0]<ze?ze:ct[0]>Ze?Ze:0,Me=ct[1]<at?at:ct[1]>nt?nt:0,st||Me){if(!F)z[F++]=[st||ct[0],Me||ct[1]];else if(Oe){var _t=Wt(Oe,ct);_t.length>1&&(qr(_t[0]),z[F++]=_t[1])}else tt=Wt(z[F-1],ct)[0],z[F++]=tt;var Ct=z[F-1];st&&Me&&(Ct[0]!==st||Ct[1]!==Me)?(Oe&&(ye!==st&&he!==Me?mr(ye&&he?kr(Oe,ct):[ye||st,he||Me]):ye&&he&&mr([ye,he])),mr([st,Me])):ye-st&&he-Me&&mr([st||ye,Me||he]),Oe=ct,ye=st,he=Me}else Oe&&qr(Wt(Oe,ct)[0]),z[F++]=ct}for(N=0;N<L;N++)if(O=j(N),!!O){for(F=0,Oe=null,Rr(O),N++;N<L;N++){if(U=j(N),!U){if(g)continue;break}if(!u||!h.simplify){Rr(U);continue}var wt=j(N+1);if(fe=Ae(U,O),!(!(y&&(F===0||F===L-1))&&fe<be(U,wt)*R)){for(se=[(U[0]-O[0])/fe,(U[1]-O[1])/fe],B=O,V=fe,Y=q=oe=0,$=!1,P=U,N++;N<s.length;N++){if(X=wt,wt=j(N+1),!X){if(g)continue;break}if(le=[X[0]-O[0],X[1]-O[1]],ae=le[0]*se[1]-le[1]*se[0],q=Math.min(q,ae),oe=Math.max(oe,ae),oe-q>be(X,wt))break;P=X,ee=le[0]*se[0]+le[1]*se[1],ee>V?(V=ee,U=X,$=!1):ee<Y&&(Y=ee,B=X,$=!0)}if($?(Rr(U),P!==B&&Rr(B)):(B!==O&&Rr(B),P!==U&&Rr(U)),Rr(P),N>=s.length||!X)break;Rr(X),O=X}}Oe&&mr([ye||Oe[0],he||Oe[1]]),f.push(z.slice(0,F))}var Ne=d.slice(d.length-1);if(A&&Ne!=="h"&&Ne!=="v"){for(var Ke=!1,Te=-1,Ie=[],Ve=0;Ve<f.length;Ve++)for(var Ce=0;Ce<f[Ve].length-1;Ce++){var Ee=f[Ve][Ce],Pe=f[Ve][Ce+1],ft=v.applyBackoff(Pe,Ee);(ft[0]!==Pe[0]||ft[1]!==Pe[1])&&(Ke=!0),Ie[Te+1]||(Te++,Ie[Te]=[Ee,[ft[0],ft[1]]])}return Ke?Ie:f}return f}}}),O5=Xe({"src/traces/scatter/link_traces.js"(Z,G){"use strict";var v={tonextx:1,tonexty:1,tonext:1};G.exports=function(S,E,e){var t,r,o,a,n,i={},s=!1,h=-1,c=0,m=-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]=c,c++):t.fill in v&&m>=0?n=m:(n=m=c,c++),n<h&&(s=!0),t._groupIndex=h=n;var p=e.slice();s&&p.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<p.length;r++)t=p[r][0].trace,o=t.stackgroup||"",t.visible===!0?(t._nexttrace=null,t.fill in v&&(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 p}}}),s1=Xe({"src/traces/scatter/plot.js"(Z,G){"use strict";var v=Hn(),x=so(),S=sa(),E=S.ensureSingle,e=S.identity,t=es(),r=Fu(),o=F5(),a=O5(),n=I_().tester;G.exports=function(m,p,T,l,_,w){var A,M,g=!_,b=!!_&&_.duration>0,d=a(m,p,T);if(A=l.selectAll("g.trace").data(d,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(m,A,p),b){w&&(M=w());var u=v.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,f){s(m,f,p,y,d,this,_)})})}else A.each(function(y,f){s(m,f,p,y,d,this,_)});g&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function i(c,m,p){m.each(function(T){var l=E(v.select(this),"g","fills");t.setClipUrl(l,p.layerClipId,c);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(v.select(this),"path","js-fill")})})}function s(c,m,p,T,l,_,w){var A=c._context.staticPlot,M;h(c,m,p,T,l);var g=!!w&&w.duration>0;function b(mr){return g?mr.transition():mr}var d=p.xaxis,u=p.yaxis,y=T[0].trace,f=y.line,R=v.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")(c,L,p,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=d.c2p(0,!0)),T[0][p.isRangePlot?"nodeRangePlot3":"node3"]=R;var $="",se=[],le=y._prevtrace,fe=null,V=null;le&&($=le._prevRevpath||"",P=le._nextFill,se=le._ownPolygons,fe=le._fillsegments,V=le._fillElement);var Y,ee,q="",oe="",ae,j,Q,re,ce,be,Ae=[];y._polygons=[];var De=[],ze=[],Ze=S.noop;if(O=y._ownFill,r.hasLines(y)||y.fill!=="none"){P&&P.datum(T),["hv","vh","hvh","vhv"].indexOf(f.shape)!==-1?(ae=t.steps(f.shape),j=t.steps(f.shape.split("").reverse().join(""))):f.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),f.smoothing):t.smoothopen(mr,f.smoothing)}:ae=j=function(mr){return"M"+mr.join("L")},Q=function(mr){return j(mr.reverse())},ze=o(T,{xaxis:d,yaxis:u,trace:y,connectGaps:y.connectgaps,baseTolerance:Math.max(f.width||1,3)/4,shape:f.shape,backoff:f.backoff,simplify:f.simplify,fill:y.fill}),De=new Array(ze.length);var at=0;for(M=0;M<ze.length;M++){var nt,rt=ze[M];!nt||!U?(nt=rt.slice(),De[at]=nt,at++):nt.push.apply(nt,rt)}y._fillElement=null,y._fillExclusionElement=V,y._fillsegments=De.slice(0,at),De=y._fillsegments,ze.length&&(re=ze[0][0].slice(),ce=ze[ze.length-1],be=ce[ce.length-1].slice()),Ze=function(mr){return function(qr){if(Y=ae(qr),ee=Q(qr),q?U?(q+="L"+Y.slice(1),oe=ee+("L"+oe.slice(1))):(q+="Z"+Y,oe=ee+"Z"+oe):(q=Y,oe=ee),r.hasLines(y)){var Sr=v.select(this);if(Sr.datum(T),mr)b(Sr.style("opacity",0).attr("d",Y).call(t.lineGroupStyle)).style("opacity",1);else{var Rr=b(Sr);Rr.attr("d",Y),t.singleLineStyle(T,Rr)}}}}}var st=z.selectAll(".js-line").data(ze);b(st.exit()).style("opacity",0).remove(),st.each(Ze(!1)),st.enter().append("path").classed("js-line",!0).style("vector-effect",A?"none":"non-scaling-stroke").call(t.lineGroupStyle).each(Ze(!0)),t.setClipUrl(st,p.layerClipId,c);function Me(mr){b(mr).attr("d","M0,0Z")}var ye=function(){var mr=new Array(De.length);for(M=0;M<De.length;M++)mr[M]=n(De[M]);return mr},he=function(mr){var qr,Sr;if(!mr||mr.length===0)for(qr=new Array(De.length),Sr=0;Sr<De.length;Sr++){var Rr=De[Sr][0].slice(),wt=De[Sr][De[Sr].length-1].slice();Rr[B]=wt[B]=X;var Ne=[wt,Rr],Ke=Ne.concat(De[Sr]);qr[Sr]=n(Ke)}else{for(qr=new Array(mr.length-1+De.length),Sr=0;Sr<mr.length-1;Sr++)qr[Sr]=n(mr[Sr]);var Te=mr[mr.length-1].slice();for(Te.reverse(),Sr=0;Sr<De.length;Sr++)qr[mr.length-1+Sr]=n(De[Sr].concat(Te))}return qr};ze.length?(O?(O.datum(T),re&&be&&(U?(re[B]=be[B]=X,b(O).attr("d","M"+be+"L"+re+"L"+q.slice(1)).call(t.singleFillStyle,c),Ae=he(null)):(b(O).attr("d",q+"Z").call(t.singleFillStyle,c),Ae=ye())),y._polygons=Ae,y._fillElement=O):P&&(y.fill.slice(0,6)==="tonext"&&q&&$?(y.fill==="tonext"?(b(P).attr("d",q+"Z"+$+"Z").call(t.singleFillStyle,c),Ae=ye(),y._polygons=Ae.concat(se)):(b(P).attr("d",q+"L"+$.slice(1)+"Z").call(t.singleFillStyle,c),Ae=he(fe),y._polygons=Ae),y._fillElement=P):Me(P)),y._prevRevpath=oe):(O?Me(O):P&&Me(P),y._prevRevpath=null),y._ownPolygons=Ae;function Oe(mr){return mr.filter(function(qr){return!qr.gap&&qr.vis})}function tt(mr){return mr.filter(function(qr){return qr.vis})}function ot(mr){return mr.filter(function(qr){return!qr.gap})}function Qe(mr){return mr.id}function Pt(mr){if(mr.ids)return Qe}function It(){return!1}function qt(mr,qr,Sr){var Rr,wt,Ne,Ke=Sr[0].trace,Te=r.hasMarkers(Ke),Ie=r.hasText(Ke),Ve=Pt(Ke),Ce=It,Ee=It;if(Te||Ie){var Pe=e,ft=Ke.stackgroup,ct=ft&&c._fullLayout._scatterStackOpts[d._id+u._id][ft].stackgaps==="infer zero";Ke.marker.maxdisplayed||Ke._needsCull?Pe=ct?tt:Oe:ft&&!ct&&(Pe=ot),Te&&(Ce=Pe),Ie&&(Ee=Pe)}wt=mr.selectAll("path.point"),Rr=wt.data(Ce,Ve);var _t=Rr.enter().append("path").classed("point",!0);g&&_t.call(t.pointStyle,Ke,c).call(t.translatePoints,d,u).style("opacity",0).transition().style("opacity",1),Rr.order();var Ct;Te&&(Ct=t.makePointStyleFns(Ke)),Rr.each(function(ir){var rr=v.select(this),er=b(rr);Ne=t.translatePoint(ir,er,d,u),Ne?(t.singlePointStyle(ir,er,Ke,Ct,c),p.layerClipId&&t.hideOutsideRangePoint(ir,er,d,u,Ke.xcalendar,Ke.ycalendar),Ke.customdata&&rr.classed("plotly-customdata",ir.data!==null&&ir.data!==void 0)):er.remove()}),g?Rr.exit().transition().style("opacity",0).remove():Rr.exit().remove(),wt=qr.selectAll("g"),Rr=wt.data(Ee,Ve),Rr.enter().append("g").classed("textpoint",!0).append("text"),Rr.order(),Rr.each(function(ir){var rr=v.select(this),er=b(rr.select("text"));Ne=t.translatePoint(ir,er,d,u),Ne?p.layerClipId&&t.hideOutsideRangePoint(ir,rr,d,u,Ke.xcalendar,Ke.ycalendar):rr.remove()}),Rr.selectAll("text").call(t.textPointStyle,Ke,c).each(function(ir){var rr=d.c2p(ir.x),er=u.c2p(ir.y);v.select(this).selectAll("tspan.line").each(function(){b(v.select(this)).attr({x:rr,y:er})})}),Rr.exit().remove()}F.datum(T),N.datum(T),qt(F,N,T);var Wt=y.cliponaxis===!1,kr=Wt?null:p.layerClipId;t.setClipUrl(F,kr,c),t.setClipUrl(N,kr,c)}function h(c,m,p,T,l){var _=p.xaxis,w=p.yaxis,A=v.extent(S.simpleMap(_.range,_.r2c)),M=v.extent(S.simpleMap(w.range,w.r2c)),g=T[0].trace;if(r.hasMarkers(g)){var b=g.marker.maxdisplayed;if(b!==0){var d=T.filter(function(R){return R.x>=A[0]&&R.x<=A[1]&&R.y>=M[0]&&R.y<=M[1]}),u=Math.ceil(d.length/b),y=0;l.forEach(function(R,L){var z=R[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&L<m&&y++});var f=Math.round(y*u/3+Math.floor(y/3)*u/7.1);T.forEach(function(R){delete R.vis}),d.forEach(function(R,L){Math.round((L+f)%u)===0&&(R.vis=!0)})}}}}}),pp=Xe({"src/traces/scatter/marker_colorbar.js"(Z,G){"use strict";G.exports={container:"marker",min:"cmin",max:"cmax"}}}),P2=Xe({"src/traces/scatter/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r={_fullLayout:e},o=v.getFromTrace(r,E,"x"),a=v.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=v.tickText(o,o.c2l(n),!0).text,t.yLabel=v.tickText(a,a.c2l(i),!0).text,t}}}),Qp=Xe({"src/traces/scatter/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=so();function E(o){var a=v.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=v.select(this),s=n.trace||n[0].trace;e(i,s,o)}),a.selectAll("g.text").each(function(n){var i=v.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))}G.exports={style:E,stylePoints:e,styleText:t,styleOnSelect:r}}}),l1=Xe({"src/traces/scatter/get_trace_color.js"(Z,G){"use strict";var v=$n(),x=Fu();G.exports=function(E,e){var t,r;if(E.mode==="lines")return t=E.line.color,t&&v.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&&v.opacity(o)?o:a&&v.opacity(a)&&(e.mlw||((E.marker||{}).line||{}).width)?a:"",r?v.opacity(r)<.3?v.addOpacity(r,.3):r:(t=(E.line||{}).color,t&&v.opacity(t)&&x.hasLines(E)&&E.line.width?t:E.fillcolor)}}}),u1=Xe({"src/traces/scatter/hover.js"(Z,G){"use strict";var v=sa(),x=rf(),S=so(),E=l1(),e=$n(),t=v.fillText;G.exports=function(o,a,n,i){var s=o.cd,h=s[0].trace,c=o.xa,m=o.ya,p=c.c2p(a),T=m.c2p(n),l=[p,T],_=h.hoveron||"",w=h.mode.indexOf("markers")!==-1?3:.5,A=!!h.xperiodalignment,M=!!h.yperiodalignment;if(_.indexOf("points")!==-1){var g=function(se){if(A){var le=c.c2p(se.xStart),fe=c.c2p(se.xEnd);return p>=Math.min(le,fe)&&p<=Math.max(le,fe)?0:1/0}var V=Math.max(3,se.mrc||0),Y=1-1/V,ee=Math.abs(c.c2p(se.x)-p);return ee<V?Y*ee/V:ee-V+Y},b=function(se){if(M){var le=m.c2p(se.yStart),fe=m.c2p(se.yEnd);return T>=Math.min(le,fe)&&T<=Math.max(le,fe)?0:1/0}var V=Math.max(3,se.mrc||0),Y=1-1/V,ee=Math.abs(m.c2p(se.y)-T);return ee<V?Y*ee/V:ee-V+Y},d=function(se){var le=Math.max(w,se.mrc||0),fe=c.c2p(se.x)-p,V=m.c2p(se.y)-T;return Math.max(Math.sqrt(fe*fe+V*V)-le,1-w/le)},u=x.getDistanceFunction(i,g,b,d);if(x.getClosest(s,u,o),o.index!==!1){var y=s[o.index],f=c.c2p(y.x,!0),R=m.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 v.extendFlat(o,{color:E(h,y),x0:f-L,x1:f+L,xLabelVal:N,y0:R-L,y1:R+L,yLabelVal:O,spikeDistance:d(y),hovertemplate:h.hovertemplate}),t(y,h,o),S.getComponentMethod("errorbars","hoverInfo")(y,h,o),[o]}}function P(se){if(!se)return!1;var le=se.node();try{var fe=new DOMPoint(l[0],l[1]);return le.isPointInFill(fe)}catch{var V=le.ownerSVGElement.createSVGPoint();return V.x=l[0],V.y=l[1],le.isPointInFill(V)}}function U(se){var le,fe=[],V=1/0,Y=-1/0,ee=1/0,q=-1/0,oe;for(le=0;le<se.length;le++){var ae=se[le];ae.contains(l)&&(fe.push(ae),ee=Math.min(ee,ae.ymin),q=Math.max(q,ae.ymax))}if(fe.length===0)return null;ee=Math.max(ee,0),q=Math.min(q,m._length),oe=(ee+q)/2;var j,Q,re,ce,be,Ae,De;for(le=0;le<fe.length;le++)for(Q=fe[le].pts,j=1;j<Q.length;j++)Ae=Q[j-1][1],De=Q[j][1],Ae>oe!=De>=oe&&(ce=Q[j-1][0],be=Q[j][0],De-Ae&&(re=ce+(be-ce)*(oe-Ae)/(De-Ae),V=Math.min(V,re),Y=Math.max(Y,re)));return V=Math.max(V,0),Y=Math.min(Y,c._length),{x0:V,x1:Y,y0:oe,y1:oe}}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),v.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&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=Xe({"src/traces/scatter/select.js"(Z,G){"use strict";var v=Fu();G.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,n,i,s,h,c=!v.hasMarkers(a)&&!v.hasText(a);if(c)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=Xe({"src/plots/cartesian/attributes.js"(Z,G){"use strict";G.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),B5=Xe({"src/plots/cartesian/type_defaults.js"(Z,G){"use strict";var v=so().traceIs,x=a1();G.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",c=s[h],m={noMultiCategory:!v(s,"cartesian")||v(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&n==={h:"x",v:"y"}[s.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=r.autotypenumbers,t(s,n)){var p=e(s),T=[];for(i=0;i<o.length;i++){var l=o[i];!v(l,"box-violin")||(l[n+"axis"]||n)!==a||(l[p]!==void 0?T.push(l[p][0]):l.name!==void 0?T.push(l.name):T.push("text"),l[h]!==c&&(c=void 0))}r.type=x(T,c,m)}else if(s.type==="splom"){var _=s.dimensions,w=_[s._axesDim[a]];w.visible&&(r.type=x(w.values,c,m))}else r.type=x(s[n]||[s[n+"0"]],c,m)}}}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=v(r,"box-violin"),i=v(r._fullInput||{},"candlestick");return n&&!i&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=Xe({"src/plots/cartesian/category_order_defaults.js"(Z,G){"use strict";var v=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)}G.exports=function(E,e,t,r){if(e.type==="category"){var o=E.categoryarray,a=Array.isArray(o)&&o.length>0||v(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_=Xe({"src/plots/cartesian/line_grid_defaults.js"(Z,G){"use strict";var v=Ch().mix,x=sh(),S=sa();G.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function n(f,R){return S.coerce2(e,t,o.attributes,f,R)}var i=n("linecolor",a),s=n("linewidth"),h=r("showline",o.showLine||!!i||!!s);h||(delete t.linecolor,delete t.linewidth);var c=v(a,o.bgColor,o.blend||x.lightFraction).toRgbString(),m=n("gridcolor",c),p=n("gridwidth"),T=n("griddash"),l=r("showgrid",o.showGrid||!!m||!!p||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var _=v(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"),d=n("zerolinecolor",a),u=n("zerolinewidth"),y=r("zeroline",o.showGrid||!!d||!!u);y||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=Xe({"src/plots/cartesian/axis_defaults.js"(Z,G){"use strict";var v=rs(),x=so(),S=sa(),E=zl(),e=hp(),t=Wh(),r=Y0(),o=t1(),a=Qm(),n=e0(),i=I2(),s=z_(),h=h5(),c=wv(),m=lh().WEEKDAY_PATTERN,p=lh().HOUR_PATTERN;G.exports=function(A,M,g,b,d){var u=b.letter,y=b.font||{},f=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"),c(M,d),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=f.label||d._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 se=z==="multicategory";if(!b.noTickson&&(z==="category"||se)&&(M.ticks||M.showgrid)&&(se?(g("tickson","boundaries"),delete M.ticklabelposition):g("tickson")),se){var le=g("showdividers");le&&(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 fe=0;fe<M.rangebreaks.length;fe++)if(M.rangebreaks[fe].pattern===m){M._hasDayOfWeekBreaks=!0;break}if(c(M,d),d._has("scattergl")||d._has("splom"))for(var V=0;V<b.data.length;V++){var Y=b.data[V];(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 d=g("bounds");if(d&&d.length>=2){var u="",y,f;if(d.length===2){for(y=0;y<2;y++)if(f=_(d[y]),f){u=m;break}}var R=g("pattern",u);if(R===m)for(y=0;y<2;y++)f=_(d[y]),f&&(A.bounds[y]=d[y]=f-1);if(R)for(y=0;y<2;y++)switch(f=d[y],R){case m:if(!v(f)){A.enabled=!1;return}if(f=+f,f!==Math.floor(f)||f<0||f>=7){A.enabled=!1;return}A.bounds[y]=d[y]=f;break;case p:if(!v(f)){A.enabled=!1;return}if(f=+f,f<0||f>24){A.enabled=!1;return}A.bounds[y]=d[y]=f;break}if(M.autorange===!1){var L=M.range;if(L[0]<L[1]){if(d[0]<L[0]&&d[1]>L[1]){A.enabled=!1;return}}else if(d[0]>L[0]&&d[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=Xe({"src/plots/cartesian/position_defaults.js"(Z,G){"use strict";var v=rs(),x=sa();G.exports=function(E,e,t,r){var o=r.counterAxes||[],a=r.overlayableAxes||[],n=r.letter,i=r.grid,s=r.overlayingDomain,h,c,m,p,T,l;i&&(c=i._domains[n][i._axisMap[e._id]],h=i._anchors[e._id],c&&(m=i[n+"side"].split(" ")[0],p=i.domain[n][m==="right"||m==="top"?1:0])),c=c||[0,1],h=h||(v(E.position)?"free":o[0]||"free"),m=m||(n==="x"?"bottom":"left"),p=p||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:m}},"side");if(_==="free"){if(n==="y"){var A=t("autoshift");A&&(p=w==="left"?s[0]:s[1],l=e.automargin?e.automargin:!0,T=w==="left"?-3:3),t("shift",T)}t("position",p)}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",c);g[0]>g[1]-1/4096&&(e.domain=c),x.noneOrAll(E.domain,e.domain,c),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Kz=Xe({"src/plots/cartesian/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=$p().isUnifiedHover,E=x5(),e=zl(),t=$y(),r=Wh(),o=B5(),a=F_(),n=J0(),i=R2(),s=ef(),h=s.id2name,c=s.name2id,m=lh().AX_ID_PATTERN,p=so(),T=p.traceIs,l=p.getComponentMethod;function _(w,A,M){Array.isArray(w[A])?w[A].push(M):w[A]=[M]}G.exports=function(A,M,g){var b=M.autotypenumbers,d={},u={},y={},f={},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),_(d,X,B);else if(B.xaxes)for(U=0;U<B.xaxes.length;U++)_(d,h(B.xaxes[U]),B);var $;if(B.yaxis)$=h(B.yaxis),_(d,$,B);else if(B.yaxes)for(U=0;U<B.yaxes.length;U++)_(d,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&&(f[X]=!0)),B.type==="carpet"&&B._cheater&&X&&(u[X]=!0),T(B,"2dMap")&&(N[X]=!0,N[$]=!0),T(B,"oriented")){var se=B.orientation==="h"?$:X;O[se]=!0}}}var le=M._subplots,fe=le.xaxis,V=le.yaxis,Y=v.simpleMap(fe,h),ee=v.simpleMap(V,h),q=Y.concat(ee),oe=x.background;fe.length&&V.length&&(oe=v.coerce(A,M,t,"plot_bgcolor"));var ae=x.combine(oe,M.paper_bgcolor),j,Q,re,ce,be;function Ae(){var Ce=d[j]||[];be._traceIndices=Ce.map(function(Ee){return Ee.index}),be._annIndices=[],be._shapeIndices=[],be._selectionIndices=[],be._imgIndices=[],be._subplotsWith=[],be._counterAxes=[],be._name=be._attr=j,be._id=Q}function De(Ce,Ee){return v.coerce(ce,be,r,Ce,Ee)}function ze(Ce,Ee){return v.coerce2(ce,be,r,Ce,Ee)}function Ze(Ce){return Ce==="x"?V:fe}function at(Ce,Ee){for(var Pe=Ce==="x"?Y:ee,ft=[],ct=0;ct<Pe.length;ct++){var _t=Pe[ct];_t!==Ee&&!(A[_t]||{}).overlaying&&ft.push(c(_t))}return ft}var nt={x:Ze("x"),y:Ze("y")},rt=nt.x.concat(nt.y),st={},Me=[];function ye(){var Ce=ce.matches;m.test(Ce)&&rt.indexOf(Ce)===-1&&(st[Ce]=ce.type,Me=Object.keys(st))}var he=E(A,M),Oe=S(he);for(P=0;P<q.length;P++){j=q[P],Q=c(j),re=j.charAt(0),v.isPlainObject(A[j])||(A[j]={}),ce=A[j],be=e.newContainer(M,j,re+"axis"),Ae();var tt=re==="x"&&!f[j]&&u[j]||re==="y"&&!R[j]&&y[j],ot=re==="y"&&(!L[j]&&z[j]||F[j]),Qe={hasMinor:!0,letter:re,font:M.font,outerTicks:N[j],showGrid:!O[j],data:d[j]||[],bgColor:ae,calendar:M.calendar,automargin:!0,visibleDflt:tt,reverseDflt:ot,autotypenumbersDflt:b,splomStash:((M._splomAxes||{})[re]||{})[Q],noAutotickangles:re==="y"};De("uirevision",M.uirevision),o(ce,be,De,Qe),a(ce,be,De,Qe,M);var Pt=Oe&&re===he.charAt(0),It=ze("spikecolor",Oe?be.color:void 0),qt=ze("spikethickness",Oe?1.5:void 0),Wt=ze("spikedash",Oe?"dot":void 0),kr=ze("spikemode",Oe?"across":void 0),mr=ze("spikesnap"),qr=De("showspikes",!!Pt||!!It||!!qt||!!Wt||!!kr||!!mr);qr||(delete be.spikecolor,delete be.spikethickness,delete be.spikedash,delete be.spikemode,delete be.spikesnap);var Sr=h(ce.overlaying),Rr=[0,1];if(M[Sr]!==void 0){var wt=h(M[Sr].anchor);M[wt]!==void 0&&(Rr=M[wt].domain)}i(ce,be,De,{letter:re,counterAxes:nt[re],overlayableAxes:at(re,j),grid:M.grid,overlayingDomain:Rr}),De("title.standoff"),ye(),be._input=ce}for(P=0;P<Me.length;){Q=Me[P++],j=h(Q),re=j.charAt(0),v.isPlainObject(A[j])||(A[j]={}),ce=A[j],be=e.newContainer(M,j,re+"axis"),Ae();var Ne={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]};De("uirevision",M.uirevision),be.type=st[Q]||"linear",a(ce,be,De,Ne,M),i(ce,be,De,{letter:re,counterAxes:nt[re],overlayableAxes:at(re,j),grid:M.grid}),De("fixedrange"),De("modebardisable"),ye(),be._input=ce}var Ke=l("rangeslider","handleDefaults"),Te=l("rangeselector","handleDefaults");for(P=0;P<Y.length;P++)j=Y[P],ce=A[j],be=M[j],Ke(A,M,j),be.type==="date"&&Te(ce,be,M,ee,be.calendar),De("fixedrange"),De("modebardisable");for(P=0;P<ee.length;P++){j=ee[P],ce=A[j],be=M[j];var Ie=M[h(be.anchor)],Ve=l("rangeslider","isVisible")(Ie);De("fixedrange",Ve),De("modebardisable")}n.handleDefaults(A,M,{axIds:rt.concat(Me).sort(s.idSort),axHasImage:F})}}}),Jz=Xe({"src/plots/cartesian/transition_axes.js"(Z,G){"use strict";var v=Hn(),x=so(),S=sa(),E=es(),e=Go();G.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 d=M.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(E.setPointGroupScale,1,1),d.selectAll(".textpoint").call(E.setTextPointsScale,1,1),d.call(E.hideOutsideRangePoints,M)}function h(M,g){var b=M.plotinfo,d=b.xaxis,u=b.yaxis,y=d._length,f=u._length,R=!!M.xr1,L=!!M.yr1,z=[];if(R){var F=S.simpleMap(M.xr0,d.r2l),N=S.simpleMap(M.xr1,d.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),d.range[0]=d.l2r(F[0]*(1-g)+g*N[0]),d.range[1]=d.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])*f,z[3]=f*(1-g+g*$/X),u.range[0]=d.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]=f;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var se=R?y/z[2]:1,le=L?f/z[3]:1,fe=R?z[0]:0,V=L?z[1]:0,Y=R?z[0]/z[2]*y:0,ee=L?z[1]/z[3]*f:0,q=d._offset-Y,oe=u._offset-ee;b.clipRect.call(E.setTranslate,fe,V).call(E.setScale,1/se,1/le),b.plot.call(E.setTranslate,q,oe).call(E.setScale,se,le),E.setPointGroupScale(b.zoomScalePts,1/se,1/le),E.setTextPointsScale(b.zoomScaleTxt,1/se,1/le)}var c;n&&(c=n());function m(){for(var M={},g=0;g<o.length;g++){var b=o[g],d=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr1&&(M[d._name+".range"]=b.xr1.slice()),b.yr1&&(M[u._name+".range"]=b.yr1.slice())}return c&&c(),x.call("relayout",r,M).then(function(){for(var y=0;y<o.length;y++)s(o[y].plotinfo)})}function p(){for(var M={},g=0;g<o.length;g++){var b=o[g],d=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr0&&(M[d._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=v.ease(a.easing);r._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,p()});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?(m(),_=window.cancelAnimationFrame(A)):_=window.requestAnimationFrame(A)}return T=Date.now(),_=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=Xe({"src/plots/cartesian/index.js"(Z){"use strict";var G=Hn(),v=so(),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={},d={},u,y,f;for(u=0;u<g.length;u++){var R=g[u].split("y");b[R[0]]=1,d["y"+R[1]]=1}for(u=0;u<w.length;u++)y=w[u],b[y]||(f=(T[t.id2name(y)]||{}).anchor,r.idRegex.y.test(f)||(f="y"),M.push(y+f),g.push(y+f),d[f]||(d[f]=1,x.pushUnique(A,f)));for(u=0;u<A.length;u++)f=A[u],d[f]||(y=(T[t.id2name(f)]||{}).anchor,r.idRegex.x.test(y)||(y="x"),M.push(y+f),g.push(y+f),b[y]||(b[y]=1,x.pushUnique(w,y)));if(!g.length){y="",f="";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):(!f||+L.slice(5)<+f.slice(5))&&(f=L)}y=y?t.name2id(y):"x",f=f?t.name2id(f):"y",w.push(y),A.push(f),M.push(y+f)}},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 d=A._zindices,u=0;u<d.length;u++){var y=d[u];for(b=0;b<M.length;b++){var f=M[b],R=A._plots[f];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===f&&((l.indexOf(P.index)!==-1||P.carpet)&&(F&&F[0].trace.xaxis+F[0].trace.yaxis===f&&["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,d=g._modules,u,y,f,R=[],L=[],z=0;z<b.length;z++)for(var F=b[z],N=0;N<d.length;N++){u=d[N];var O=u.name,P=v.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),f=y[0],_=y[1],f.length&&R.push({i:M.indexOf(U),zindex:z,className:B,plotMethod:X,cdModule:f}),P.zoomScale&&L.push("."+B)}}R.sort(function(le,fe){return(le.zindex||0)-(fe.zindex||0)||le.i-fe.i});var $=l.plot.selectAll("g.mlayer").data(R,function(le){return le.className});if($.enter().append("g").attr("class",function(le){return le.className}).classed("mlayer",!0).classed("rangeplot",l.isRangePlot),$.exit().remove(),$.order(),$.each(function(le){var fe=G.select(this),V=le.className;le.plotMethod(T,l,le.cdModule,fe,w,A),r.clipOnAxisFalseQuery.indexOf("."+V)===-1&&E.setClipUrl(fe,l.layerClipId,T)}),g._has("scattergl")&&(u=v.getModule("scattergl"),f=e(_,u)[0],u.plot(T,l,f)),!T._context.staticPlot&&(l._hasClipOnAxisFalse&&(l.clipOnAxisFalseTraces=l.plot.selectAll(r.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),L.length)){var se=l.plot.selectAll(L.join(",")).selectAll(".trace");l.zoomScalePts=se.selectAll("path.point"),l.zoomScaleTxt=se.selectAll(".textpoint")}}Z.clean=function(T,l,_,w){var A=w._plots||{},M=l._plots||{},g=w._subplots||{},b,d,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"),f=l._has&&l._has("gl");if(y&&!f)for(u in A)b=A[u],b._scene&&b._scene.destroy();if(g.xaxis&&g.yaxis){var R=t.listIds({_fullLayout:w});for(d=0;d<R.length;d++){var L=R[d];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)m(w._cartesianlayer.selectAll(".subplot"),w),w._defs.selectAll(".axesclip").remove(),delete w._axisConstraintGroups,delete w._axisMatchGroups;else if(g.cartesian)for(d=0;d<g.cartesian.length;d++){var N=g.cartesian[d];if(N.indexOf(i)===-1&&!M[N]){var O="."+N+",."+N+"-x,."+N+"-y";w._cartesianlayer.selectAll(O).remove(),p(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 d=Object.keys(A).map(Number).sort(x.sorterAsc);d.length||(d=[0]),l._zindices=d;var u=h(T),y=u.length,f=[];for(w=0;w<y;w++)f[w]=u[w].slice();for(var R=1;R<d.length;R++){var L=[];for(w=0;w<y;w++)L[w]=u[w].slice(),L[w][0]+=i+(R+1);f=f.concat(L)}var z=l._cartesianlayer.selectAll(".subplot").data(f,String);z.enter().append("g").attr("class",function(F){return"subplot "+F[0]}),z.order(),z.exit().call(m,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=G.select(this),c(T,B),P||(B.draglayer=a(l._draggers,"g",N)))})},Z.rangePlot=function(T,l,_){c(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,d,u,y,f=[],R=[];for(M=0;M<A;M++){b=w[M],d=l._plots[b],u=d.xaxis,y=d.yaxis;var L=u._mainAxis,z=y._mainAxis,F=L._id+z._id,N=l._plots[F];d.overlays=[],F!==b&&N?(d.mainplot=F,d.mainplotinfo=N,R.push(b)):(d.mainplot=void 0,d.mainplotinfo=void 0,f.push(b))}for(M=0;M<R.length;M++)b=R[M],d=l._plots[b],d.mainplotinfo.overlays.push(d);var O=f.concat(R),P=[];for(M=0;M<A;M++){b=O[M],d=l._plots[b],u=d.xaxis,y=d.yaxis;for(var U=[],B=1;B<=_;B++){var X="";for(B>1&&(X+=i+B),U.push(b+X),g=0;g<d.overlays.length;g++)U.push(d.overlays[g].id+X)}U=U.concat([u.layer,y.layer,u.overlaying||"",y.overlaying||""]),P.push(U)}return P}function c(T,l){var _=T._fullLayout,w=l.plotgroup,A=l.id,M=A.indexOf(i),g=M!==-1,b=r.layerValue2layerClass[l.xaxis.layer],d=r.layerValue2layerClass[l.yaxis.layer],u=_._hasOnlyLargeSploms,y=_._zindices.length>1,f=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"),f&&y?(l.minorGridlayer=f.minorGridlayer,l.gridlayer=f.gridlayer,l.zerolinelayer=f.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),f&&y?l.zerolinelayerAbove=f.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-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=f.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=f.minorGridlayer,l.gridlayer=f.gridlayer,l.zerolinelayer=f.zerolinelayer,l.zerolinelayerAbove=f.zerolinelayerAbove,a(f.overlinesBelow,"path",F),a(f.overlinesBelow,"path",N),a(f.overaxesBelow,"g",F),a(f.overaxesBelow,"g",N),l.plot=a(f.overplot,"g",A),a(f.overlinesAbove,"path",F),a(f.overlinesAbove,"path",N),a(f.overaxesAbove,"g",F),a(f.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+d).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+d).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 m(T,l){if(T){var _={};T.each(function(d){var u=d[0],y=G.select(this);y.remove(),p(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 p(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,_=G.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=Xe({"src/traces/scatter/index.js"(Z,G){"use strict";var v=Fu();G.exports={hasLines:v.hasLines,hasMarkers:v.hasMarkers,hasText:v.hasText,isBubble:v.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=Xe({"src/components/annotations/draw_arrow_head.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=C5(),E=sa(),e=E.strScale,t=E.strRotate,r=E.strTranslate;G.exports=function(a,n,i){var s=a.node(),h=S[i.arrowhead||0],c=S[i.startarrowhead||0],m=(i.arrowwidth||1)*(i.arrowsize||1),p=(i.arrowwidth||1)*(i.startarrowsize||1),T=n.indexOf("start")>=0,l=n.indexOf("end")>=0,_=h.backoff*m+i.standoff,w=c.backoff*p+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 d=A.x-M.x,u=A.y-M.y;if(g=Math.atan2(u,d),b=g+Math.PI,_&&w&&_+w>Math.sqrt(d*d+u*u)){X();return}if(_){if(_*_>d*d+u*u){X();return}var y=_*Math.cos(g),f=_*Math.sin(g);M.x+=y,M.y+=f,a.attr({x2:M.x,y2:M.y})}if(w){if(w*w>d*d+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 $(se,le,fe,V){se.path&&(se.noRotate&&(fe=0),v.select(s.parentNode).append("path").attr({class:a.attr("class"),d:se.path,transform:r(le.x,le.y)+t(fe*180/Math.PI)+e(V)}).style({fill:x.rgb(i.arrowcolor),"stroke-width":0}))}T&&$(c,A,g,p),l&&$(h,M,b,m)}}}),D2=Xe({"src/components/annotations/draw.js"(Z,G){"use strict";var v=Hn(),x=so(),S=bc(),E=sa(),e=E.strTranslate,t=Go(),r=$n(),o=es(),a=rf(),n=ou(),i=Kd(),s=Ap(),h=zl().arrayEditor,c=Qz();G.exports={draw:m,drawOne:p,drawRaw:l};function m(_){var w=_._fullLayout;w._infolayer.selectAll(".annotation").remove();for(var A=0;A<w.annotations.length;A++)w.annotations[A].visible&&p(_,A);return S.previousPromises(_)}function p(_,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],d=g[A+"ref"],u=A.indexOf("y")!==-1,y=t.getRefType(d)==="domain",f=u?M.h:M.w;return _?y?b+(u?-w:w)/_._length:_.p2r(_.r2p(b)+w):b+(u?-w:w)/f}function l(_,w,A,M,g,b){var d=_._fullLayout,u=_._fullLayout._size,y=_._context.edits,f,R;M?(f="annotation-"+M,R=M+".annotations"):(f="annotation",R="annotations");var L=h(_.layout,R,w),z=L.modifyBase,F=L.modifyItem,N=L.getUpdateObj;d._infolayer.selectAll("."+f+'[data-index="'+A+'"]').remove();var O="clip"+d._uid+"_ann"+A;if(!w._input||w.visible===!1){v.selectAll("#"+O).remove();return}var P={x:{},y:{}},U=+w.textangle||0,B=d._infolayer.append("g").classed(f,!0).attr("data-index",String(A)).style("opacity",w.opacity),X=B.append("g").classed("annotation-text-g",!0),$=y[w.showarrow?"annotationTail":"annotationPosition"],se=w.captureevents||y.annotationText||$;function le(Ae){var De={index:A,annotation:w._input,fullAnnotation:w,event:Ae};return M&&(De.subplotId=M),De}var fe=X.append("g").style("pointer-events",se?"all":null).call(i,"pointer").on("click",function(){_._dragging=!1,_.emit("plotly_clickannotation",le(v.event))});w.hovertext&&fe.on("mouseover",function(){var Ae=w.hoverlabel,De=Ae.font,ze=this.getBoundingClientRect(),Ze=_.getBoundingClientRect();a.loneHover({x0:ze.left-Ze.left,x1:ze.right-Ze.left,y:(ze.top+ze.bottom)/2-Ze.top,text:w.hovertext,color:Ae.bgcolor,borderColor:Ae.bordercolor,fontFamily:De.family,fontSize:De.size,fontColor:De.color,fontWeight:De.weight,fontStyle:De.style,fontVariant:De.variant,fontShadow:De.fontShadow,fontLineposition:De.fontLineposition,fontTextcase:De.fontTextcase},{container:d._hoverlayer.node(),outerContainer:d._paper.node(),gd:_})}).on("mouseout",function(){a.loneUnhover(d._hoverlayer.node())});var V=w.borderwidth,Y=w.borderpad,ee=V+Y,q=fe.append("rect").attr("class","bg").style("stroke-width",V+"px").call(r.stroke,w.bordercolor).call(r.fill,w.bgcolor),oe=w.width||w.height,ae=d._topclips.selectAll("#"+O).data(oe?[0]:[]);ae.enter().append("clipPath").classed("annclip",!0).attr("id",O).append("rect"),ae.exit().remove();var j=w.font,Q=d._meta?E.templateString(w.text,d._meta):w.text,re=fe.append("text").classed("annotation-text",!0).text(Q);function ce(Ae){return Ae.call(o.font,j).attr({"text-anchor":{left:"start",right:"end"}[w.align]||"middle"}),n.convertToTspans(Ae,_,be),Ae}function be(){var Ae=re.selectAll("a");if(Ae.size()===1&&Ae.text()===re.text()){var De=fe.insert("a",":first-child").attr({"xlink:xlink:href":Ae.attr("xlink:href"),"xlink:xlink:show":Ae.attr("xlink:show")}).style({cursor:"pointer"});De.node().appendChild(q.node())}var ze=fe.select(".annotation-text-math-group"),Ze=!ze.empty(),at=o.bBox((Ze?ze:re).node()),nt=at.width,rt=at.height,st=w.width||nt,Me=w.height||rt,ye=Math.round(st+2*ee),he=Math.round(Me+2*ee);function Oe(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 tt=!1,ot=["x","y"],Qe=0;Qe<ot.length;Qe++){var Pt=ot[Qe],It=w[Pt+"ref"]||Pt,qt=w["a"+Pt+"ref"],Wt={x:g,y:b}[Pt],kr=(U+(Pt==="x"?0:-90))*Math.PI/180,mr=ye*Math.cos(kr),qr=he*Math.sin(kr),Sr=Math.abs(mr)+Math.abs(qr),Rr=w[Pt+"anchor"],wt=w[Pt+"shift"]*(Pt==="x"?1:-1),Ne=P[Pt],Ke,Te,Ie,Ve,Ce,Ee=t.getRefType(It);if(Wt&&Ee!=="domain"){var Pe=Wt.r2fraction(w[Pt]);(Pe<0||Pe>1)&&(qt===It?(Pe=Wt.r2fraction(w["a"+Pt]),(Pe<0||Pe>1)&&(tt=!0)):tt=!0),Ke=Wt._offset+Wt.r2p(w[Pt]),Ve=.5}else{var ft=Ee==="domain";Pt==="x"?(Ie=w[Pt],Ke=ft?Wt._offset+Wt._length*Ie:Ke=u.l+u.w*Ie):(Ie=1-w[Pt],Ke=ft?Wt._offset+Wt._length*Ie:Ke=u.t+u.h*Ie),Ve=w.showarrow?.5:Ie}if(w.showarrow){Ne.head=Ke;var ct=w["a"+Pt];if(Ce=mr*Oe(.5,w.xanchor)-qr*Oe(.5,w.yanchor),qt===It){var _t=t.getRefType(qt);_t==="domain"?(Pt==="y"&&(ct=1-ct),Ne.tail=Wt._offset+Wt._length*ct):_t==="paper"?Pt==="y"?(ct=1-ct,Ne.tail=u.t+u.h*ct):Ne.tail=u.l+u.w*ct:Ne.tail=Wt._offset+Wt.r2p(ct),Te=Ce}else Ne.tail=Ke+ct,Te=Ce+ct;Ne.text=Ne.tail+Ce;var Ct=d[Pt==="x"?"width":"height"];if(It==="paper"&&(Ne.head=E.constrain(Ne.head,1,Ct-1)),qt==="pixel"){var ir=-Math.max(Ne.tail-3,Ne.text),rr=Math.min(Ne.tail+3,Ne.text)-Ct;ir>0?(Ne.tail+=ir,Ne.text+=ir):rr>0&&(Ne.tail-=rr,Ne.text-=rr)}Ne.tail+=wt,Ne.head+=wt}else Ce=Sr*Oe(Ve,Rr),Te=Ce,Ne.text=Ke+Ce;Ne.text+=wt,Ce+=wt,Te+=wt,w["_"+Pt+"padplus"]=Sr/2+Te,w["_"+Pt+"padminus"]=Sr/2-Te,w["_"+Pt+"size"]=Sr,w["_"+Pt+"shift"]=Ce}if(tt){fe.remove();return}var er=0,Lr=0;if(w.align!=="left"&&(er=(st-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Lr=(Me-rt)*(w.valign==="middle"?.5:1)),Ze)ze.select("svg").attr({x:ee+er-1,y:ee+Lr}).call(o.setClipUrl,oe?O:null,_);else{var fa=ee+Lr-at.top,Da=ee+er-at.left;re.call(n.positionText,Da,fa).call(o.setClipUrl,oe?O:null,_)}ae.select("rect").call(o.setRect,ee,ee,st,Me),q.call(o.setRect,V/2,V/2,ye-V,he-V),fe.call(o.setTranslate,Math.round(P.x.text-ye/2),Math.round(P.y.text-he/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,Ft=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(xt,Xt){return xt^!!E.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Xt[0],Xt[1],Xt[2],Xt[3])},!1)){Ra.forEach(function(xt){var Xt=E.segmentsIntersect(Kt,Ft,hi,wi,xt[0],xt[1],xt[2],xt[3]);Xt&&(Kt=Xt.x,Ft=Xt.y)});var tn=w.arrowwidth,on=w.arrowcolor,hn=w.arrowside,Tt=B.append("g").style({opacity:r.opacity(on)}).classed("annotation-arrow-g",!0),ut=Tt.append("path").attr("d","M"+Kt+","+Ft+"L"+hi+","+wi).style("stroke-width",tn+"px").call(r.stroke,r.rgb(on));if(c(ut,hn,w),y.annotationPosition&&ut.node().parentNode&&!M){var Br=hi,Cr=wi;if(w.standoff){var xr=Math.sqrt(Math.pow(hi-Kt,2)+Math.pow(wi-Ft,2));Br+=w.standoff*(Kt-hi)/xr,Cr+=w.standoff*(Ft-wi)/xr}var Ir=Tt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-Br)+","+(Ft-Cr),transform:e(Br,Cr)}).style("stroke-width",tn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Ur,Hr;s.init({element:Ir.node(),gd:_,prepFn:function(){var xt=o.getTranslate(fe);Ur=xt.x,Hr=xt.y,g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(xt,Xt){var vr=ta(Ur,Hr),Or=vr[0]+xt,ba=vr[1]+Xt;fe.call(o.setTranslate,Or,ba),F("x",T(g,xt,"x",u,w)),F("y",T(b,Xt,"y",u,w)),w.axref===w.xref&&F("ax",T(g,xt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Xt,"ay",u,w)),Tt.attr("transform",e(xt,Xt)),X.attr({transform:"rotate("+U+","+Or+","+ba+")"})},doneFn:function(){x.call("_guiRelayout",_,N());var xt=document.querySelector(".js-notes-box-panel");xt&&xt.redraw(xt.selectedObj)}})}}};if(w.showarrow&&Ia(0,0),$){var qa;s.init({element:fe.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 Ft=w._xsize/u.w,Yt=w.x+(w._xshift-w.xshift)/u.w-Ft/2;wi=s.align(Yt+Wa/u.w,Ft,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(fe,hi)},clickFn:function(Wa,Ca){w.captureevents&&_.emit("plotly_clickannotation",le(Ca))},doneFn:function(){i(fe),x.call("_guiRelayout",_,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}y.annotationText?re.call(n.makeEditable,{delegate:fe,gd:_}).call(ce).on("edit",function(Ae){w.text=Ae,this.call(ce),F("text",Ae),g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),x.call("_guiRelayout",_,N())}):re.call(ce)}}}),e9=Xe({"src/components/annotations/click.js"(Z,G){"use strict";var v=sa(),x=so(),S=zl().arrayEditor;G.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={},c=o._fullLayout.annotations,m,p;if(i.length||s.length){for(m=0;m<i.length;m++)p=S(o.layout,"annotations",c[i[m]]),p.modifyItem("visible",!0),v.extendFlat(h,p.getUpdateObj());for(m=0;m<s.length;m++)p=S(o.layout,"annotations",c[s[m]]),p.modifyItem("visible",!1),v.extendFlat(h,p.getUpdateObj());return x.call("update",o,{},h)}}function t(o,a){var n=o._fullLayout.annotations,i=[],s=[],h=[],c=(a||[]).length,m,p,T,l,_,w,A,M;for(m=0;m<n.length;m++)if(T=n[m],l=T.clicktoshow,l){for(p=0;p<c;p++)if(_=a[p],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(m);break}p===c&&T.visible&&l==="onout"&&s.push(m)}return{on:i,off:s,explicitOff:h}}function r(o,a){return a.type==="log"?a.l2r(o):a.d2r(o)}}}),N5=Xe({"src/components/annotations/common_defaults.js"(Z,G){"use strict";var v=sa(),x=$n();G.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"),v.coerceFont(r,"font",t.font),r("width"),r("align");var h=r("height");if(h&&r("valign"),s){var c=r("arrowside"),m,p;c.indexOf("end")!==-1&&(m=r("arrowhead"),p=r("arrowsize")),c.indexOf("start")!==-1&&(r("startarrowhead",m),r("startarrowsize",p)),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=v.extendFlat({},l.font);A.color||(A.color=w),v.coerceFont(r,"hoverlabel.font",A)}r("captureevents",!!T)}}}),t9=Xe({"src/components/annotations/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=N5(),e=$0();G.exports=function(o,a){S(o,a,{name:"annotations",handleItemDefaults:t})};function t(r,o,a){function n(u,y){return v.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,c=["x","y"],m=[-10,-30],p={_fullLayout:a},T=0;T<2;T++){var l=c[T],_=x.coerceRef(r,o,p,l,"","paper");if(_!=="paper"){var w=x.getFromId(p,_);w._annIndices.push(o._index)}if(x.coercePosition(o,p,n,_,l,.5),h){var A="a"+l,M=x.coerceRef(r,o,p,A,"pixel",["pixel","paper"]);M!=="pixel"&&M!==_&&(M=o[A]="pixel");var g=M==="pixel"?m[T]:.4;x.coercePosition(o,p,n,M,A,g)}n(l+"anchor"),n(l+"shift")}if(v.noneOrAll(r,o,["x","y"]),h&&v.noneOrAll(r,o,["ax","ay"]),s){var b=n("xclick"),d=n("yclick");o._xclick=b===void 0?o.x:x.cleanPosition(b,p,o.xref),o._yclick=d===void 0?o.y:x.cleanPosition(d,p,o.yref)}}}}}),r9=Xe({"src/components/annotations/calc_autorange.js"(Z,G){"use strict";var v=sa(),x=Go(),S=D2().draw;G.exports=function(r){var o=r._fullLayout,a=v.filterVisible(o.annotations);if(a.length&&r._fullData.length)return v.syncOrAsync([S,E],r)};function E(t){var r=t._fullLayout;v.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"],c=t["_"+a+"padplus"],m=t["_"+a+"padminus"],p={x:1,y:-1}[a]*t[a+"shift"],T=3*t.arrowsize*t.arrowwidth||0,l=T+p,_=T-p,w=3*t.startarrowsize*t.arrowwidth||0,A=w+p,M=w-p,g;if(h===s){var b=x.findExtremes(r,[r.r2c(n)],{ppadplus:l,ppadminus:_}),d=x.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(c,A),ppadminus:Math.max(m,M)});g={min:[b.min[0],d.min[0]],max:[b.max[0],d.max[0]]}}else A=i?A+i:A,M=i?M-i:M,g=x.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(c,l,A),ppadminus:Math.max(m,_,M)});t._extremes[o]=g}}}),a9=Xe({"src/components/annotations/convert_coords.js"(Z,G){"use strict";var v=rs(),x=h2();G.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 c(p){var T=s[p],l=null;o?l=x(T,e.range):l=Math.pow(10,T),v(l)||(l=null),r(h+p,l)}for(var m=0;m<n.length;m++)s=n[m],h="annotations["+m+"].",s[i+"ref"]===e._id&&c(i),s["a"+i+"ref"]===e._id&&c("a"+i)}}}),i9=Xe({"src/components/annotations/index.js"(Z,G){"use strict";var v=D2(),x=e9();G.exports={moduleType:"component",name:"annotations",layoutAttributes:$0(),supplyLayoutDefaults:t9(),includeBasePlot:D_()("annotations"),calcAutorange:r9(),draw:v.draw,drawOne:v.drawOne,drawRaw:v.drawRaw,hasClickToShow:x.hasClickToShow,onClick:x.onClick,convertCoords:a9()}}}),z2=Xe({"src/components/annotations3d/attributes.js"(Z,G){"use strict";var v=$0(),x=pc().overrideAll,S=zl().templatedArray;G.exports=x(S("annotation",{visible:v.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:v.xanchor,xshift:v.xshift,yanchor:v.yanchor,yshift:v.yshift,text:v.text,textangle:v.textangle,font:v.font,width:v.width,height:v.height,opacity:v.opacity,align:v.align,valign:v.valign,bgcolor:v.bgcolor,bordercolor:v.bordercolor,borderpad:v.borderpad,borderwidth:v.borderwidth,showarrow:v.showarrow,arrowcolor:v.arrowcolor,arrowhead:v.arrowhead,startarrowhead:v.startarrowhead,arrowside:v.arrowside,arrowsize:v.arrowsize,startarrowsize:v.startarrowsize,arrowwidth:v.arrowwidth,standoff:v.standoff,startstandoff:v.startstandoff,hovertext:v.hovertext,hoverlabel:v.hoverlabel,captureevents:v.captureevents}),"calc","from-root")}}),n9=Xe({"src/components/annotations3d/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=N5(),e=z2();G.exports=function(o,a,n){S(o,a,{name:"annotations",handleItemDefaults:t,fullLayout:n.fullLayout})};function t(r,o,a,n){function i(c,m){return v.coerce(r,o,e,c,m)}function s(c){var m=c+"axis",p={_fullLayout:{}};return p._fullLayout[m]=a[m],x.coercePosition(o,p,i,c,c,.5)}var h=i("visible");h&&(E(r,o,n.fullLayout,i),s("x"),s("y"),s("z"),v.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),v.noneOrAll(r,o,["ax","ay"])))}}}),o9=Xe({"src/components/annotations3d/convert.js"(Z,G){"use strict";var v=sa(),x=Go();G.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={},v.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={},v.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=Xe({"src/plots/gl3d/project.js"(Z,G){"use strict";function v(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=v(S.projection,v(S.view,v(S.model,[E[0],E[1],E[2],1])));return e}G.exports=x}}),s9=Xe({"src/components/annotations3d/draw.js"(Z,G){"use strict";var v=D2().drawRaw,x=U5(),S=["x","y","z"];G.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],c=n[h],m=t[h+"axis"],p=m.r2fraction(c);if(p<0||p>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]]),v(e.graphDiv,n,a,e.id,n._xa,n._ya))}}}}),l9=Xe({"src/components/annotations3d/index.js"(Z,G){"use strict";var v=so(),x=sa();G.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=v.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=Xe({"src/components/shapes/attributes.js"(Z,G){"use strict";var v=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();G.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=Xe({"src/components/shapes/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=j5(),e=a0();G.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,f){return v.coerce(o,a,E,y,f)}a._isShape=!0;var s=i("visible");if(!s)return;var h=i("showlegend");h&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),v.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var c=i("path"),m=c?"path":"rect",p=i("type",m),T=p!=="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 f=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(p,c,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=v.identity;let se=y+B,le=o[se];if(o[se]=F(o[se],!0),R==="pixel"?i(se,M[B]):x.coercePosition(a,L,i,X,se,A[B]),a[se]=N(a[se]),o[se]=le,B===0&&R==="pixel"){let fe=o[f];o[f]=F(o[f],!0),x.coercePosition(a,L,i,X,f,.25),a[f]=N(a[f]),o[f]=fe}});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=v.identity,T){let X=y+"0",$=y+"1",se=o[X],le=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]=se,o[$]=le}if(R==="pixel"){let X=o[f];o[f]=F(o[f],!0),x.coercePosition(a,L,i,O,f,.25),a[f]=N(a[f]),o[f]=X}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var g=p==="line",b,d;if(T&&(b=i("label.texttemplate"),i("label.texttemplatefallback")),b||(d=i("label.text")),d||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"),v.coerceFont(i,"label.font",n.font)}}}}),c9=Xe({"src/components/shapes/draw_newshape/defaults.js"(Z,G){"use strict";var v=$n(),x=sa();function S(E,e){return E?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}G.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",v.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=Xe({"src/components/shapes/calc_autorange.js"(Z,G){"use strict";var v=sa(),x=Go(),S=L_(),E=a0();G.exports=function(i){var s=i._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!i._fullData.length))for(var c=0;c<h.length;c++){var m=h[c];m._extremes={};var p,T,l=x.getRefType(m.xref),_=x.getRefType(m.yref);if(l==="array"){let w=e(i,m,"x");Object.entries(w).forEach(([A,M])=>{p=x.getFromId(i,A),m._extremes[p._id]=x.findExtremes(p,M,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(p=x.getFromId(i,m.xref),T=a(p,m,S.paramIsX),T&&(m._extremes[p._id]=x.findExtremes(p,T,t(m))));if(_==="array"){let w=e(i,m,"y");Object.entries(w).forEach(([A,M])=>{p=x.getFromId(i,A),m._extremes[p._id]=x.findExtremes(p,M,r(m))})}else m.yref!=="paper"&&_!=="domain"&&(p=x.getFromId(i,m.yref),T=a(p,m,S.paramIsY),T&&(m._extremes[p._id]=x.findExtremes(p,T,r(m))))}};function e(n,i,s){let h=i[s+"ref"],c=s==="x"?S.paramIsX:S.paramIsY;function m(A,M){A==="paper"||x.getRefType(A)==="domain"||(p[A]||(p[A]=[]),p[A].push(M))}let p={};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=c[g].drawn;if(b===void 0)continue;let d=M.slice(1).match(S.paramRE);d&&d.length>b&&(m(h[T],d[b]),T++)}}else m(h[0],i[s+"0"]),m(h[1],i[s+"1"]);let _={};for(let A in p){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]=p[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,c,m){var p=n/2,T=m;if(i==="pixel"){var l=c?E.extractPathCoords(c,m?S.paramIsY:S.paramIsX):[s,h],_=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+p:p,M=_>0?_+p:p;return{ppad:p,ppadplus:T?A:M,ppadminus:T?M:A}}else return{ppad:p}}function a(n,i,s){var h=n._id.charAt(0)==="x"?"x":"y",c=n.type==="category"||n.type==="multicategory",m,p,T=0,l=0,_=c?n.r2c:n.d2c,w=i[h+"sizemode"]==="scaled";if(w?(m=i[h+"0"],p=i[h+"1"],c&&(T=i[h+"0shift"],l=i[h+"1shift"])):(m=i[h+"anchor"],p=i[h+"anchor"]),m!==void 0)return[_(m)+T,_(p)+l];if(i.path){var A=1/0,M=-1/0,g=i.path.match(S.segmentRE),b,d,u,y,f;for(n.type==="date"&&(_=E.decodeDate(_)),b=0;b<g.length;b++)d=g[b],u=s[d.charAt(0)].drawn,u!==void 0&&(y=g[b].slice(1).match(S.paramRE),!(!y||y.length<u)&&(f=_(y[u]),f<A&&(A=f),f>M&&(M=f)));if(M>=A)return[A,M]}}}}),h9=Xe({"src/components/shapes/index.js"(Z,G){"use strict";var v=E2();G.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:u9(),supplyDrawNewShapeDefaults:c9(),includeBasePlot:D_()("shapes"),calcAutorange:f9(),draw:v.draw,drawOne:v.drawOne}}}),q5=Xe({"src/components/images/attributes.js"(Z,G){"use strict";var v=lh(),x=zl().templatedArray,S=R_();G.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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),p9=Xe({"src/components/images/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=q5(),e="images";G.exports=function(o,a){var n={name:e,handleItemDefaults:t};S(o,a,n)};function t(r,o,a){function n(_,w){return v.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},c=["x","y"],m=0;m<2;m++){var p=c[m],T=x.coerceRef(r,o,h,p,"paper",void 0);if(T!=="paper"){var l=x.getFromId(h,T);l._imgIndices.push(o._index)}x.coercePosition(o,h,n,T,p,0)}return o}}}),d9=Xe({"src/components/images/draw.js"(Z,G){"use strict";var v=Hn(),x=es(),S=Go(),E=ef(),e=vd();G.exports=function(r){var o=r._fullLayout,a=[],n={},i=[],s,h;for(h=0;h<o.images.length;h++){var c=o.images[h];if(c.visible)if(c.layer==="below"&&c.xref!=="paper"&&c.yref!=="paper"){s=E.ref2id(c.xref)+E.ref2id(c.yref);var m=o._plots[s];if(!m){i.push(c);continue}m.mainplot&&(s=m.mainplot.id),n[s]||(n[s]=[]),n[s].push(c)}else c.layer==="above"?a.push(c):i.push(c)}var p={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=v.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 f=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(f)}}function l(u){var y=v.select(this),f=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;f!==void 0?N=typeof u.xref=="string"&&L?f._length*u.sizex:Math.abs(f.l2p(u.sizex)-f.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*p.x[u.xanchor].offset,U=O*p.y[u.yanchor].offset,B=p.x[u.xanchor].sizing+p.y[u.yanchor].sizing,X,$;switch(f!==void 0?X=typeof u.xref=="string"&&L?f._length*u.x+f._offset:f.r2p(u.x)+f._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 se=f&&S.getRefType(u.xref)!=="domain"?f._id:"",le=R&&S.getRefType(u.yref)!=="domain"?R._id:"",fe=se+le;x.setClipUrl(y,fe?"clip"+o._uid+fe: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 d=b.imagelayer.selectAll("image").data(n[s]||[],_);d.enter().append("image"),d.exit().remove(),d.each(function(u){T.bind(this)(u),l.bind(this)(u)}),d.sort(w)}}}}}),v9=Xe({"src/components/images/convert_coords.js"(Z,G){"use strict";var v=rs(),x=h2();G.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,c=0;c<n.length;c++)if(s=n[c],h="images["+c+"].",s[i+"ref"]===e._id){var m=s[i],p=s["size"+i],T=null,l=null;if(o){T=x(m,e.range);var _=p/Math.pow(10,T)/2;l=2*Math.log(_+Math.sqrt(1+_*_))/Math.LN10}else T=Math.pow(10,m),l=T*(Math.pow(10,p/2)-Math.pow(10,-p/2));v(T)?v(l)||(l=null):(T=null,l=null),r(h+i,T),r(h+"size"+i,l)}}}}}),m9=Xe({"src/components/images/index.js"(Z,G){"use strict";G.exports={moduleType:"component",name:"images",layoutAttributes:q5(),supplyLayoutDefaults:p9(),includeBasePlot:D_()("images"),draw:d9(),convertCoords:v9()}}}),F2=Xe({"src/components/updatemenus/constants.js"(Z,G){"use strict";G.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=Xe({"src/components/updatemenus/attributes.js"(Z,G){"use strict";var v=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}});G.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:v({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:x.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),g9=Xe({"src/components/updatemenus/defaults.js"(Z,G){"use strict";var v=sa(),x=hp(),S=V5(),E=F2(),e=E.name,t=S.buttons;G.exports=function(n,i){var s={name:e,handleItemDefaults:r};x(n,i,s)};function r(a,n,i){function s(m,p){return v.coerce(a,n,S,m,p)}var h=x(a,n,{name:"buttons",handleItemDefaults:o}),c=s("visible",h.length>0);c&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,n){function i(h,c){return v.coerce(a,n,t,h,c)}var s=i("visible",a.method==="skip"||Array.isArray(a.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),y9=Xe({"src/components/updatemenus/scrollbox.js"(Z,G){"use strict";G.exports=e;var v=Hn(),x=$n(),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,c=this.position.w,m=this.position.t,p=this.position.h,T=this.position.direction,l=T==="down",_=T==="left",w=T==="right",A=T==="up",M=c,g=p,b,d,u,y;!l&&!_&&!w&&!A&&(this.position.direction="down",l=!0);var f=l||A;f?(b=h,d=b+M,l?(u=m,y=Math.min(u+g,s),g=y-u):(y=m+g,u=Math.max(y-g,0),g=y-u)):(u=m,y=u+g,_?(d=h+M,b=Math.max(d-M,0),M=d-b):(b=h,d=Math.min(b+M,i),M=d-b)),this._box={l:b,t:u,w:M,h:g};var R=c>M,L=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+p;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=p>g,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,X=h+c,$=m;X+U>i&&(X=i-U);var se=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);se.exit().on(".drag",null).remove(),se.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,e.barColor),P?(this.vbar=se.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 le=this.id,fe=b-.5,V=P?d+U+.5:d+.5,Y=u-.5,ee=R?y+z+.5:y+.5,q=n._topdefs.selectAll("#"+le).data(R||P?[0]:[]);if(q.exit().remove(),q.enter().append("clipPath").attr("id",le).append("rect"),R||P?(this._clipRect=q.select("rect").attr({x:Math.floor(fe),y:Math.floor(Y),width:Math.ceil(V)-Math.floor(fe),height:Math.ceil(ee)-Math.floor(Y)}),this.container.call(S.setClipUrl,le,this.gd),this.bg.attr({x:h,y:m,width:c,height:p})):(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 oe=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(oe);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.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-=v.event.dx),this.vbar&&(o-=v.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=v.event.deltaY),this.vbar&&(o+=v.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(v.event.x,a,n),s=(i-a)/(n-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var c=o+this._vbarYMin,m=c+this._vbarTranslateMax,p=E.constrain(v.event.y,c,m),T=(p-c)/(m-c),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=Xe({"src/components/updatemenus/draw.js"(Z,G){"use strict";var v=Hn(),x=bc(),S=$n(),E=es(),e=sa(),t=ou(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),n=y9();G.exports=function(L){var z=L._fullLayout,F=e.filterVisible(z[a.name]);function N(le){x.autoMargin(L,u(le))}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(){v.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(le){le.style("pointer-events","all")}),B=0;B<F.length;B++){var X=F[B];d(L,X)}var $="updatemenus"+z._uid,se=new n(L,U,$);P.enter().size()&&(U.node().parentNode.appendChild(U.node()),U.call(f)),P.exit().each(function(le){U.call(f),N(le)}).remove(),P.each(function(le){var fe=v.select(this),V=le.type==="dropdown"?U:null;x.manageCommandObserver(L,le,le.buttons,function(Y){c(L,le,le.buttons[Y.index],fe,V,se,Y.index,!0)}),le.type==="dropdown"?(m(L,fe,U,se,le),h(U,le)&&p(L,fe,U,se,le)):p(L,fe,null,null,le)})}};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 c(R,L,z,F,N,O,P,U){L.active=P,r(R.layout,a.name,L).applyUpdate("active",P),L.type==="buttons"?p(R,F,null,null,L):L.type==="dropdown"&&(N.attr(a.menuIndexAttrName,"-1"),m(R,F,N,O,L),U||p(R,F,N,O,L))}function m(R,L,z,F,N){var O=e.ensureSingle(L,"g",a.headerClassName,function(le){le.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 se=e.ensureSingle(L,"text",a.headerArrowClassName,function(le){le.attr("text-anchor","end").call(E.font,N.font).text(a.arrowSymbol[N.direction])});se.attr({x:P.headerWidth-a.arrowOffsetX+N.pad.l,y:P.headerHeight/2+a.textOffsetY+N.pad.t}),O.on("click",function(){z.call(f,String(h(z,N)?-1:N._index)),p(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 p(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,se=0,le=N._dims,fe=["up","down"].indexOf(N.direction)!==-1;N.type==="dropdown"&&(fe?se=le.headerHeight+a.gapButtonHeader:$=le.headerWidth+a.gapButtonHeader),N.type==="dropdown"&&N.direction==="up"&&(se=-a.gapButtonHeader+a.gapButton-le.openHeight),N.type==="dropdown"&&N.direction==="left"&&($=-a.gapButtonHeader+a.gapButton-le.openWidth);var V={x:le.lx+$+N.pad.l,y:le.ly+se+N.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},Y={l:V.x+N.borderwidth,t:V.y+N.borderwidth};U.each(function(ee,q){var oe=v.select(this);oe.call(_,N,ee,R).call(y,N,V),oe.on("click",function(){v.event.defaultPrevented||(ee.execute&&(ee.args2&&N.active===q?(c(R,N,ee,L,z,F,-1),x.executeAPICommand(R,ee.method,ee.args2)):(c(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}))}),oe.on("mouseover",function(){oe.call(g)}),oe.on("mouseout",function(){oe.call(b,N),U.call(M,N)})}),U.call(M,N),fe?(Y.w=Math.max(le.openWidth,le.headerWidth),Y.h=V.y-Y.t):(Y.w=V.x-Y.l,Y.h=Math.max(le.openHeight,le.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,$,se,le;if(U)for(se=0,le=0;le<X;le++)se+=B.heights[le]+a.gapButton;else for($=0,le=0;le<X;le++)$+=B.widths[le]+a.gapButton;F.enable(O,$,se),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=v.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 d(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($,se){var le=v.select(this);le.call(_,L,$,R);var fe=le.select("."+a.itemTextClassName),V=fe.node()&&E.bBox(fe.node()).width,Y=Math.max(V+a.textPadX,a.minWidth),ee=L.font.size*o,q=t.lineCount(fe),oe=Math.max(ee*q,a.minHeight)+a.textOffsetY;oe=Math.ceil(oe),Y=Math.ceil(Y),z.widths[se]=Y,z.heights[se]=oe,z.height1=Math.max(z.height1,oe),z.width1=Math.max(z.width1,Y),N?(z.totalWidth=Math.max(z.totalWidth,Y),z.openWidth=z.totalWidth,z.totalHeight+=oe+a.gapButton,z.openHeight+=oe+a.gapButton):(z.totalWidth+=Y+a.gapButton,z.openWidth+=Y+a.gapButton,z.totalHeight=Math.max(z.totalHeight,oe),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 se=L.font.size*o,le=t.lineCount(O),fe=(le-1)*se/2;t.positionText(O,a.textOffsetX,$/2-fe+a.textOffsetY),X?z.y+=B.heights[U]+z.yPad:z.x+=B.widths[U]+z.xPad,z.index++}function f(R,L){R.attr(a.menuIndexAttrName,L||"-1").selectAll("g."+a.dropdownButtonClassName).remove()}}}),x9=Xe({"src/components/updatemenus/index.js"(Z,G){"use strict";var v=F2();G.exports={moduleType:"component",name:v.name,layoutAttributes:V5(),supplyLayoutDefaults:g9(),draw:_9()}}}),O_=Xe({"src/components/sliders/constants.js"(Z,G){"use strict";G.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=Xe({"src/components/sliders/attributes.js"(Z,G){"use strict";var v=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}});G.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:v({})},font:v({}),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=Xe({"src/components/sliders/defaults.js"(Z,G){"use strict";var v=sa(),x=hp(),S=G5(),E=O_(),e=E.name,t=S.steps;G.exports=function(n,i){x(n,i,{name:e,handleItemDefaults:r})};function r(a,n,i){function s(w,A){return v.coerce(a,n,S,w,A)}for(var h=x(a,n,{name:"steps",handleItemDefaults:o}),c=0,m=0;m<h.length;m++)h[m].visible&&c++;var p;if(c<2?p=n.visible=!1:p=s("visible"),!!p){n._stepCount=c;var T=n._visibleSteps=v.filterVisible(h),l=s("active");(h[l]||{}).visible||(n.active=T[0]._index),s("x"),s("y"),v.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"),v.coerceFont(s,"font",i.font);var _=s("currentvalue.visible");_&&(s("currentvalue.xanchor"),s("currentvalue.prefix"),s("currentvalue.suffix"),s("currentvalue.offset"),v.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(c,m){return v.coerce(a,n,t,c,m)}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=Xe({"src/components/sliders/draw.js"(Z,G){"use strict";var v=Hn(),x=bc(),S=$n(),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;G.exports=function(O){var P=O._context.staticPlot,U=O._fullLayout,B=m(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 $(V){V._commandObserver&&(V._commandObserver.remove(),delete V._commandObserver),x.autoMargin(O,c(V))}if(X.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var se=X.selectAll("g."+a.groupClassName).data(B,p);se.enter().append("g").classed(a.groupClassName,!0),se.exit().each($).remove();for(var le=0;le<B.length;le++){var fe=B[le];T(O,fe)}se.each(function(V){var Y=v.select(this);y(V),x.manageCommandObserver(O,V,V._visibleSteps,function(ee){var q=Y.data()[0];q.active!==ee.index&&(q._dragging||b(O,Y,q,ee.index,!1,!0))}),l(O,v.select(this),V)})}};function c(N){return a.autoMarginIdRoot+N._index}function m(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 p(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(oe){var ae=v.select(this),j=A(ae,{step:oe},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 se=X.inputAreaLength-2*a.stepInset,le=se/(O._stepCount-1),fe=U+a.labelPadding;if(X.labelStride=Math.max(1,Math.ceil(fe/le)),X.labelHeight=B,X.currentValueMaxWidth=0,X.currentValueHeight=0,X.currentValueTotalHeight=0,X.currentValueMaxLines=1,O.currentvalue.visible){var V=E.tester.append("g");P.each(function(oe){var ae=_(V,O,oe.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,V.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,c(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(f,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})}),se=O.currentvalue.prefix?O.currentvalue.prefix:"";if(typeof P=="string")se+=P;else{var le=O.steps[O.active].label,fe=O._gd._fullLayout._meta;fe&&(le=e.templateString(le,fe)),se+=le}O.currentvalue.suffix&&(se+=O.currentvalue.suffix),$.call(E.font,O.currentvalue.font).text(se).call(r.convertToTspans,O._gd);var V=r.lineCount($),Y=(U.currentValueMaxLines+1-V)*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(d,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 $=v.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 se=P.steps[P.active];O.call(f,P,X),O.call(_,P),N.emit("plotly_sliderchange",{slider:P,step:P.steps[P.active],interaction:B,previousActive:$}),se&&se.method&&B&&(O._nextMethod?(O._nextMethod.step=se,O._nextMethod.doCallback=B,O._nextMethod.doTransition=X):(O._nextMethod={step:se,doCallback:B,doTransition:X},O._nextMethodRaf=window.requestAnimationFrame(function(){var le=O._nextMethod.step;le.method&&(le.execute&&x.executeAPICommand(N,le.method,le.args),O._nextMethod=null,O._nextMethodRaf=null)})))}function d(N,O,P){if(O._context.staticPlot)return;var U=P.node(),B=v.select(O);function X(){return P.data()[0]}function $(){var se=X();O.emit("plotly_sliderstart",{slider:se});var le=P.select("."+a.gripRectClass);v.event.stopPropagation(),v.event.preventDefault(),le.call(S.fill,se.activebgcolor);var fe=L(se,v.mouse(U)[0]);g(O,P,se,fe,!0),se._dragging=!0;function V(){var ee=X(),q=L(ee,v.mouse(U)[0]);g(O,P,ee,q,!1)}B.on("mousemove",V),B.on("touchmove",V);function Y(){var ee=X();ee._dragging=!1,le.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,se=v.select(this);se.attr({height:$?O.ticklen:O.minorticklen}).call(S.fill,O.tickcolor),E.setTranslate(se,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 f(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 se=U;P&&O.transition.duration>0&&(se=se.transition().duration(O.transition.duration).ease(O.transition.easing)),se.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(d,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=Xe({"src/components/sliders/index.js"(Z,G){"use strict";var v=O_();G.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:b9(),draw:w9()}}}),O2=Xe({"src/components/rangeslider/attributes.js"(Z,G){"use strict";var v=sh();G.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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=Xe({"src/components/rangeslider/oppaxis_attributes.js"(Z,G){"use strict";G.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=Xe({"src/components/rangeslider/constants.js"(Z,G){"use strict";G.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=Xe({"src/components/rangeslider/helpers.js"(Z){"use strict";var G=ef(),v=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=G.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(v.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=Xe({"src/components/rangeslider/defaults.js"(Z,G){"use strict";var v=sa(),x=zl(),S=ef(),E=O2(),e=H5();G.exports=function(r,o,a){var n=r[a],i=o[a];if(!(n.rangeslider||o._requestRangeslider[i._id]))return;v.isPlainObject(n.rangeslider)||(n.rangeslider={});var s=n.rangeslider,h=x.newContainer(i,"rangeslider");function c(y,f){return v.coerce(s,h,E,y,f)}var m,p;function T(y,f){return v.coerce(m,p,e,y,f)}var l=c("visible");if(l){c("bgcolor",o.plot_bgcolor),c("bordercolor"),c("borderwidth"),c("thickness"),c("autorange",!i.isValidRange(s.range)),c("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=v.simpleMap(w,S.id2name),M=0;M<A.length;M++){var g=A[M];m=s[g]||{},p=x.newContainer(h,g,"yaxis");var b=o[g],d;m.range&&b.isValidRange(m.range)&&(d="fixed");var u=T("rangemode",d);u!=="match"&&T("range",b.range.slice())}h._input=s}}}}),M9=Xe({"src/components/rangeslider/calc_autorange.js"(Z,G){"use strict";var v=ef().list,x=Yd().getAutoRange,S=B2();G.exports=function(e){for(var t=v(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=Xe({"src/components/rangeslider/draw.js"(Z,G){"use strict";var v=Hn(),x=so(),S=bc(),E=sa(),e=E.strTranslate,t=es(),r=$n(),o=K0(),a=Kf(),n=ef(),i=Ap(),s=Kd(),h=B2();G.exports=function(d){for(var u=d._fullLayout,y=u._rangeSliderData,f=0;f<y.length;f++){var R=y[f][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=v.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 se=u._size,le=F.domain;O._width=se.w*(le[1]-le[0]);var fe=Math.round(se.l+se.w*le[0]),V=Math.round(se.t+se.h*(1-F._counterDomainMin)+(F.side==="bottom"?F._depth:0)+O._offsetShift+h.extraPad);N.attr("transform",e(fe,V)),O._rl=E.simpleMap(O.range,F.r2l);var Y=O._rl[0],ee=O._rl[1],q=ee-Y;if(O.p2d=function(ze){return ze/O._width*q+Y},O.d2p=function(ze){return(ze-Y)/q*O._width},F.rangebreaks){var oe=F.locateBreaks(Y,ee);if(oe.length){var ae,j,Q=0;for(ae=0;ae<oe.length;ae++)j=oe[ae],Q+=j.max-j.min;var re=O._width/(ee-Y-Q),ce=[-re*Y];for(ae=0;ae<oe.length;ae++)j=oe[ae],ce.push(ce[ce.length-1]-re*(j.max-j.min));for(O.d2p=function(ze){for(var Ze=ce[0],at=0;at<oe.length;at++){var nt=oe[at];if(ze>=nt.max)Ze=ce[at+1];else if(ze<nt.min)break}return Ze+re*ze},ae=0;ae<oe.length;ae++)j=oe[ae],j.pmin=O.d2p(j.min),j.pmax=O.d2p(j.max);O.p2d=function(ze){for(var Ze=ce[0],at=0;at<oe.length;at++){var nt=oe[at];if(ze>=nt.pmax)Ze=ce[at+1];else if(ze<nt.pmin)break}return(ze-Ze)/re}}}if(U.rangemode!=="match"){var be=P.r2l(U.range[0]),Ae=P.r2l(U.range[1]),De=Ae-be;O.d2pOppAxis=function(ze){return(ze-be)/De*O._height}}N.call(l,d,F,O).call(_,d,F,O).call(w,d,F,O).call(M,d,F,O,U).call(g,d,F,O).call(b,d,F,O),m(N,d,F,O),T(N,d,F,O,P,U),F.side==="bottom"&&o.draw(d,F._id+"title",{propContainer:F,propName:F._name+".title.text",placeholder:u._dfltTitle.x,attributes:{x:F._offset+F._length/2,y:V+O._height+O._offsetShift+10+1.5*F.title.font.size,"text-anchor":"middle"}})}))};function c(d){return typeof d.clientX=="number"?d.clientX:d.touches&&d.touches.length>0?d.touches[0].clientX:0}function m(d,u,y,f){if(u._context.staticPlot)return;var R=d.select("rect."+h.slideBoxClassName).node(),L=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,P=c(N),U=P-d.node().getBoundingClientRect().left,B=f.d2p(y._rl[0]),X=f.d2p(y._rl[1]),$=i.coverSlip();this.addEventListener("touchmove",se),this.addEventListener("touchend",le),$.addEventListener("mousemove",se),$.addEventListener("mouseup",le);function se(fe){var V=c(fe),Y=+V-P,ee,q,oe;switch(O){case R:if(oe="ew-resize",B+Y>y._length||X+Y<0)return;ee=B+Y,q=X+Y;break;case L:if(oe="col-resize",B+Y>y._length)return;ee=B+Y,q=X;break;case z:if(oe="col-resize",X+Y<0)return;ee=B,q=X+Y;break;default:oe="ew-resize",ee=U,q=U+Y;break}if(q<ee){var ae=q;q=ee,ee=ae}f._pixelMin=ee,f._pixelMax=q,s(v.select($),oe),p(d,u,y,f)}function le(){$.removeEventListener("mousemove",se),$.removeEventListener("mouseup",le),this.removeEventListener("touchmove",se),this.removeEventListener("touchend",le),E.removeElement($)}}d.on("mousedown",F),d.on("touchstart",F)}function p(d,u,y,f){function R(F){return y.l2r(E.constrain(F,f._rl[0],f._rl[1]))}var L=R(f.p2d(f._pixelMin)),z=R(f.p2d(f._pixelMax));window.requestAnimationFrame(function(){x.call("_guiRelayout",u,y._name+".range",[L,z])})}function T(d,u,y,f,R,L){var z=h.handleWidth/2;function F(fe){return E.constrain(fe,0,f._width)}function N(fe){return E.constrain(fe,0,f._height)}function O(fe){return E.constrain(fe,-z,f._width+z)}var P=F(f.d2p(y._rl[0])),U=F(f.d2p(y._rl[1]));if(d.select("rect."+h.slideBoxClassName).attr("x",P).attr("width",U-P),d.select("rect."+h.maskMinClassName).attr("width",P),d.select("rect."+h.maskMaxClassName).attr("x",U).attr("width",f._width-U),L.rangemode!=="match"){var B=f._height-N(f.d2pOppAxis(R._rl[1])),X=f._height-N(f.d2pOppAxis(R._rl[0]));d.select("rect."+h.maskMinOppAxisClassName).attr("x",P).attr("height",B).attr("width",U-P),d.select("rect."+h.maskMaxOppAxisClassName).attr("x",P).attr("y",X).attr("height",f._height-X).attr("width",U-P),d.select("rect."+h.slideBoxClassName).attr("y",B).attr("height",X-B)}var $=.5,se=Math.round(O(P-z))-$,le=Math.round(O(U-z))+$;d.select("g."+h.grabberMinClassName).attr("transform",e(se,$)),d.select("g."+h.grabberMaxClassName).attr("transform",e(le,$))}function l(d,u,y,f){var R=E.ensureSingle(d,"rect",h.bgClassName,function(N){N.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),L=f.borderwidth%2===0?f.borderwidth:f.borderwidth-1,z=-f._offsetShift,F=t.crispRound(u,f.borderwidth);R.attr({width:f._width+L,height:f._height+L,transform:e(z,z),"stroke-width":F}).call(r.stroke,f.bordercolor).call(r.fill,f.bgcolor)}function _(d,u,y,f){var R=u._fullLayout,L=E.ensureSingleById(R._topdefs,"clipPath",f._clipId,function(z){z.append("rect").attr({x:0,y:0})});L.select("rect").attr({width:f._width,height:f._height})}function w(d,u,y,f){var R=u.calcdata,L=d.selectAll("g."+h.rangePlotClassName).data(y._subplotsWith,E.identity);L.enter().append("g").attr("class",function(F){return h.rangePlotClassName+" "+F}).call(t.setClipUrl,f._clipId,u),L.order(),L.exit().remove();var z;L.each(function(F,N){var O=v.select(this),P=N===0,U=n.getFromId(u,F,"y"),B=U._name,X=f[B],$={data:[],layout:{xaxis:{type:y.type,domain:[0,1],range:f.range.slice(),calendar:y.calendar},width:f._width,height:f._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 se=$._fullLayout.xaxis,le=$._fullLayout[B];se.clearCalc(),se.setScale(),le.clearCalc(),le.setScale();var fe={id:F,plotgroup:O,xaxis:se,yaxis:le,isRangePlot:!0};P?z=fe:(fe.mainplot="xy",fe.mainplotinfo=z),a.rangePlot(u,fe,A(R,F))})}function A(d,u){for(var y=[],f=0;f<d.length;f++){var R=d[f],L=R[0].trace;L.xaxis+L.yaxis===u&&y.push(R)}return y}function M(d,u,y,f,R){var L=E.ensureSingle(d,"rect",h.maskMinClassName,function(O){O.attr({x:0,y:0,"shape-rendering":"crispEdges"})});L.attr("height",f._height).call(r.fill,h.maskColor);var z=E.ensureSingle(d,"rect",h.maskMaxClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});if(z.attr("height",f._height).call(r.fill,h.maskColor),R.rangemode!=="match"){var F=E.ensureSingle(d,"rect",h.maskMinOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});F.attr("width",f._width).call(r.fill,h.maskOppAxisColor);var N=E.ensureSingle(d,"rect",h.maskMaxOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});N.attr("width",f._width).style("border-top",h.maskOppBorder).call(r.fill,h.maskOppAxisColor)}}function g(d,u,y,f){if(!u._context.staticPlot){var R=E.ensureSingle(d,"rect",h.slideBoxClassName,function(L){L.attr({y:0,cursor:h.slideBoxCursor,"shape-rendering":"crispEdges"})});R.attr({height:f._height,fill:h.slideBoxFill})}}function b(d,u,y,f){var R=E.ensureSingle(d,"g",h.grabberMinClassName),L=E.ensureSingle(d,"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(f._height/4),height:Math.round(f._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",f._height);var B=E.ensureSingle(L,"rect",h.grabAreaMaxClassName,function(X){X.attr(P)});B.attr("height",f._height)}}}),k9=Xe({"src/components/rangeslider/index.js"(Z,G){"use strict";var v=sa(),x=O2(),S=H5(),E=A9();G.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:v.extendFlat({},x,{yaxis:S})}}},layoutAttributes:O2(),handleDefaults:S9(),calcAutorange:M9(),draw:E9(),isVisible:E.isVisible,makeData:E.makeData,autoMarginOpts:E.autoMarginOpts}}}),N2=Xe({"src/components/rangeselector/attributes.js"(Z,G){"use strict";var v=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"});G.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:v({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=Xe({"src/components/rangeselector/constants.js"(Z,G){"use strict";G.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),C9=Xe({"src/components/rangeselector/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=hp(),e=N2(),t=W5();G.exports=function(n,i,s,h,c){var m=n.rangeselector||{},p=S.newContainer(i,"rangeselector");function T(M,g){return v.coerce(m,p,e,M,g)}var l=E(m,p,{name:"buttons",handleItemDefaults:r,calendar:c}),_=T("visible",l.length>0);if(_){var w=o(i,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(n,i,["x","y"]),T("xanchor"),T("yanchor"),v.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 c(T,l){return v.coerce(a,n,e.buttons,T,l)}var m=c("visible");if(m){var p=c("step");p!=="all"&&(h&&h!=="gregorian"&&(p==="month"||p==="year")?n.stepmode="backward":c("stepmode"),c("count")),c("label")}}function o(a,n,i){for(var s=i.filter(function(p){return n[p].anchor===a._id}),h=0,c=0;c<s.length;c++){var m=n[s[c]].domain;m&&(h=Math.max(m[1],h))}return[a.domain[0],h+t.yPad]}}}),L9=Xe({"src/components/rangeselector/get_update_object.js"(Z,G){"use strict";var v=dd(),x=sa().titleCase;G.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=v["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=Xe({"src/components/rangeselector/draw.js"(Z,G){"use strict";var v=Hn(),x=so(),S=bc(),E=$n(),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,c=W5(),m=L9();G.exports=function(d){var u=d._fullLayout,y=u._infolayer.selectAll(".rangeselector").data(p(d),T);y.enter().append("g").classed("rangeselector",!0),y.exit().remove(),y.style({cursor:"pointer","pointer-events":"all"}),y.each(function(f){var R=v.select(this),L=f,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=v.select(this),P=m(L,N);N._isActive=l(L,N,P),O.call(_,z,N),O.call(A,z,N,d),O.on("click",function(){d._dragged||x.call("_guiRelayout",d,P)}),O.on("mouseover",function(){N._isHovered=!0,O.call(_,z,N)}),O.on("mouseout",function(){N._isHovered=!1,O.call(_,z,N)})}),g(d,F,z,L._name,R)})};function p(b){for(var d=a.list(b,"x",!0),u=[],y=0;y<d.length;y++){var f=d[y];f.rangeselector&&f.rangeselector.visible&&u.push(f)}return u}function T(b){return b._id}function l(b,d,u){if(d.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,d,u){var y=t.ensureSingle(b,"rect","selector-rect",function(f){f.attr("shape-rendering","crispEdges")});y.attr({rx:c.rx,ry:c.ry}),y.call(E.stroke,d.bordercolor).call(E.fill,w(d,u)).style("stroke-width",d.borderwidth+"px")}function w(b,d){return d._isActive||d._isHovered?b.activecolor:b.bgcolor}function A(b,d,u,y){function f(L){o.convertToTspans(L,y)}var R=t.ensureSingle(b,"text","selector-text",function(L){L.attr("text-anchor","middle")});R.call(e.font,d.font).text(M(u,y._fullLayout._meta)).call(f)}function M(b,d){return b.label?d?t.templateString(b.label,d):b.label:b.step==="all"?"all":b.count+b.step.charAt(0)}function g(b,d,u,y,f){var R=0,L=0,z=u.borderwidth;d.each(function(){var B=v.select(this),X=B.select(".selector-text"),$=u.font.size*i,se=Math.max($*o.lineCount(X),16)+3;L=Math.max(L,se)}),d.each(function(){var B=v.select(this),X=B.select(".selector-rect"),$=B.select(".selector-text"),se=$.node()&&e.bBox($.node()).width,le=u.font.size*i,fe=o.lineCount($),V=Math.max(se+10,c.minButtonWidth);B.attr("transform",r(z+R,z)),X.attr({x:0,y:0,width:V,height:L}),o.positionText($,V/2,L/2-(fe-1)*le/2+3),R+=V+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]}),f.attr("transform",r(N,O))}}}),I9=Xe({"src/components/rangeselector/index.js"(Z,G){"use strict";G.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:N2()}}},layoutAttributes:N2(),handleDefaults:C9(),draw:P9()}}}),wc=Xe({"src/plots/domain.js"(Z){"use strict";var G=Qo().extendFlat;Z.attributes=function(v,x){v=v||{},x=x||{};var S={valType:"info_array",editType:v.editType,items:[{valType:"number",min:0,max:1,editType:v.editType},{valType:"number",min:0,max:1,editType:v.editType}],dflt:[0,1]},E=v.name?v.name+" ":"",e=v.trace?"trace ":"subplot ",t=x.description?" "+x.description:"",r={x:G({},S,{}),y:G({},S,{}),editType:v.editType};return v.noGridCell||(r.row={valType:"integer",min:0,dflt:0,editType:v.editType},r.column={valType:"integer",min:0,dflt:0,editType:v.editType}),r},Z.defaults=function(v,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 v.domain.column);var a=S("domain.row");a!==void 0&&(a<r.rows?t=r._domains.y[a]:delete v.domain.row)}var n=S("domain.x",e),i=S("domain.y",t);n[0]<n[1]||(v.domain.x=e.slice()),i[0]<i[1]||(v.domain.y=t.slice())}}}),X5=Xe({"src/components/grid/index.js"(Z,G){"use strict";var v=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,c){var m=h[c+"axes"],p=Object.keys((s._splomAxes||{})[c]||{});if(Array.isArray(m))return m;if(p.length)return p}function o(s,h){var c=s.grid||{},m=r(h,c,"x"),p=r(h,c,"y");if(!s.grid&&!m&&!p)return;var T=Array.isArray(c.subplots)&&Array.isArray(c.subplots[0]),l=Array.isArray(m),_=Array.isArray(p),w=l&&m!==c.xaxes&&_&&p!==c.yaxes,A,M;T?(A=c.subplots.length,M=c.subplots[0].length):(_&&(A=p.length),l&&(M=m.length));var g=e.newContainer(h,"grid");function b(O,P){return v.coerce(c,g,t,O,P)}var d=b("rows",A),u=b("columns",M);if(!(d*u>1)){delete h.grid;return}if(!T&&!l&&!_){var y=b("pattern")==="independent";y&&(T=!0)}g._hasSubplotGrid=T;var f=b("roworder"),R=f==="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,d,R)}}function a(s,h,c,m,p,T){var l=h(s+"gap",c),_=h("domain."+s);h(s+"side",m);for(var w=new Array(p),A=_[0],M=(_[1]-A)/(p-l),g=M*(1-l),b=0;b<p;b++){var d=A+M*b;w[T?p-1-b:b]=[d,d+g]}return w}function n(s,h){var c=h.grid;if(!(!c||!c._domains)){var m=s.grid||{},p=h._subplots,T=c._hasSubplotGrid,l=c.rows,_=c.columns,w=c.pattern==="independent",A,M,g,b,d,u,y,f=c._axisMap={};if(T){var R=m.subplots||[];u=c.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?(d=L===1?"xy":"x"+L+"y"+L,L++):d=F[M],z[M]="",p.cartesian.indexOf(d)!==-1){if(y=d.indexOf("y"),g=d.slice(0,y),b=d.slice(y),f[g]!==void 0&&f[g]!==M||f[b]!==void 0&&f[b]!==A)continue;z[M]=d,f[g]=M,f[b]=A}}}else{var N=r(h,m,"x"),O=r(h,m,"y");c.xaxes=i(N,p.xaxis,_,f,"x"),c.yaxes=i(O,p.yaxis,l,f,"y")}var P=c._anchors={},U=c.roworder==="top to bottom";for(var B in f){var X=B.charAt(0),$=c[X+"side"],se,le,fe;if($.length<8)P[B]="free";else if(X==="x"){if($.charAt(0)==="t"===U?(se=0,le=1,fe=l):(se=l-1,le=-1,fe=-1),T){var V=f[B];for(A=se;A!==fe;A+=le)if(d=u[A][V],!!d&&(y=d.indexOf("y"),d.slice(0,y)===B)){P[B]=d.slice(y);break}}else for(A=se;A!==fe;A+=le)if(b=c.yaxes[A],p.cartesian.indexOf(B+b)!==-1){P[B]=b;break}}else if($.charAt(0)==="l"?(se=0,le=1,fe=_):(se=_-1,le=-1,fe=-1),T){var Y=f[B];for(A=se;A!==fe;A+=le)if(d=u[Y][A],!!d&&(y=d.indexOf("y"),d.slice(y)===B)){P[B]=d.slice(0,y);break}}else for(A=se;A!==fe;A+=le)if(g=c.xaxes[A],p.cartesian.indexOf(g+B)!==-1){P[B]=g;break}}}}function i(s,h,c,m,p){var T=new Array(c),l;function _(w,A){h.indexOf(A)!==-1&&m[A]===void 0?(T[w]=A,m[A]=w):T[w]=""}if(Array.isArray(s))for(l=0;l<c;l++)_(l,s[l]);else for(_(0,p),l=1;l<c;l++)_(l,p+(l+1));return T}G.exports={moduleType:"component",name:"grid",schema:{layout:{grid:t}},layoutAttributes:t,sizeDefaults:o,contentDefaults:n}}}),Z5=Xe({"src/components/errorbars/attributes.js"(Z,G){"use strict";G.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=Xe({"src/components/errorbars/defaults.js"(Z,G){"use strict";var v=rs(),x=so(),S=sa(),E=zl(),e=Z5();G.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 c=s.array!==void 0||s.value!==void 0||s.type==="sqrt",m=h("visible",c);if(m!==!1){var p=h("type","array"in s?"data":"percent"),T=!0;p!=="sqrt"&&(T=h("symmetric",!((p==="data"?"arrayminus":"valueminus")in s))),p==="data"?(h("array"),h("traceref"),T||(h("arrayminus"),h("tracerefminus"))):(p==="percent"||p==="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||v(s.thickness)||v(s.width)))}(!a.inherit||!i[l])&&(h("color",o),h("thickness"),h("width",x.traceIs(r,"gl3d")?0:4))}}}}),Y5=Xe({"src/components/errorbars/compute_error.js"(Z,G){"use strict";G.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],c=+r[s];return!isNaN(h)||!isNaN(c)?[c||0,h||0]:[NaN,NaN]}}else{var o=v(E,S.value),a=v(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 v(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=Xe({"src/components/errorbars/calc.js"(Z,G){"use strict";var v=rs(),x=so(),S=Go(),E=sa(),e=Y5();G.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),c=S.getFromId(o,s.yaxis);t(i,s,h,"x"),t(i,s,c,"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 c=e(i),m=0;m<r.length;m++){var p=r[m],T=p.i;if(T===void 0)T=m;else if(T===null)continue;var l=p[n];if(v(a.c2l(l))){var _=c(l,T);if(v(_[0])&&v(_[1])){var w=p[n+"s"]=l-_[0],A=p[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=Xe({"src/components/errorbars/plot.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=es(),E=Fu();G.exports=function(r,o,a,n){var i,s=a.xaxis,h=a.yaxis,c=n&&n.duration>0,m=r._context.staticPlot;o.each(function(p){var T=p[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&&(p=[]);var M=v.select(this).selectAll("g.errorbar").data(p,w);if(M.exit().remove(),!!p.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);c&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),S.setClipUrl(M,a.layerClipId,r),M.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var y,f=d.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=!f.size(),i?f=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):c&&(f=f.transition().duration(n.duration).ease(n.easing)),f.attr("d",y)}else f.remove();var L=d.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=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):c&&(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=Xe({"src/components/errorbars/style.js"(Z,G){"use strict";var v=Hn(),x=$n();G.exports=function(E){E.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=v.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=Xe({"src/components/errorbars/index.js"(Z,G){"use strict";var v=sa(),x=pc().overrideAll,S=Z5(),E={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete E.error_x.copy_zstyle,delete E.error_y.copy_zstyle,delete E.error_y.copy_ystyle;var e={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S),error_z:v.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,G.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=Xe({"src/components/colorbar/constants.js"(Z,G){"use strict";G.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=Xe({"src/components/colorbar/draw.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=bc(),E=so(),e=Go(),t=Ap(),r=sa(),o=r.strTranslate,a=Qo().extendFlat,n=Kd(),i=es(),s=$n(),h=K0(),c=ou(),m=wp().flipScale,p=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(d(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=v.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 d(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?m(P.colorscale):P.colorscale,O._zrange=[P[B.min],P[B.max]])}for(var se=0;se<F.length;se++){var le=F[se];if(U=le[0].trace,!!U._module){var fe=U._module.colorbar;if(U.visible===!0&&fe)for(var V=Array.isArray(fe),Y=V?fe:[fe],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+(V&&q?"-"+q:""),O._traceIndex=U.index,O._propPrefix=(q?q+".":"")+"colorbar.",O._meta=U._meta,$(),N.push(O))}}}for(var oe in z._colorAxes)if(P=z[oe],P.showscale){var ae=z._colorAxes[oe];O=X(P.colorbar),O._id="cb"+oe,O._propPrefix=oe+".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,se=z.bgcolor,le=z.xanchor,fe=z.yanchor,V=z.xpad,Y=z.ypad,ee=z.x,q=N?z.y:1-z.y,oe=z.yref==="paper",ae=z.xref==="paper",j=F._fullLayout,Q=j._size,re=z._fillcolor,ce=z._line,be=z.title,Ae=be.side,De=z._zrange||v.extent((typeof re=="function"?re:ce.color).domain()),ze=typeof ce.color=="function"?ce.color:function(){return ce.color},Ze=typeof re=="function"?re:function(){return re},at=z._levels,nt=f(F,z,De),rt=nt.fill,st=nt.line,Me=Math.round(U*(B==="fraction"?N?Q.w:Q.h:1)),ye=Me/(N?Q.w:Q.h),he=Math.round(O*(P==="fraction"?N?Q.h:Q.w:1)),Oe=he/(N?Q.h:Q.w),tt=ae?Q.w:F._fullLayout.width,ot=oe?Q.h:F._fullLayout.height,Qe=Math.round(N?ee*tt+V:q*ot+Y),Pt={center:.5,right:1}[le]||0,It={top:1,middle:.5}[fe]||0,qt=N?ee-Pt*ye:q-It*ye,Wt=N?q-It*Oe:ee-Pt*Oe,kr=Math.round(N?ot*(1-Wt):tt*Wt);z._lenFrac=Oe,z._thickFrac=ye,z._uFrac=qt,z._vFrac=Wt;var mr=z._axis=R(F,z,De);mr.position=ye+(N?ee+V/Q.w:q+Y/Q.h);var qr=["top","bottom"].indexOf(Ae)!==-1;if(N&&qr&&(mr.title.side=Ae,mr.titlex=ee+V/Q.w,mr.titley=Wt+(be.side==="top"?Oe-Y/Q.h:Y/Q.h)),!N&&!qr&&(mr.title.side=Ae,mr.titley=q+Y/Q.h,mr.titlex=Wt+V/Q.w),ce.color&&z.tickmode==="auto"){mr.tickmode="linear",mr.tick0=at.start;var Sr=at.size,Rr=r.constrain(he/50,4,15)+1,wt=(De[1]-De[0])/((z.nticks||Rr)*Sr);if(wt>1){var Ne=Math.pow(10,Math.floor(Math.log(wt)/Math.LN10));Sr*=Ne*r.roundUp(wt/Ne,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(mr.tick0=0)}mr.dtick=Sr}mr.domain=N?[Wt+Y/Q.h,Wt+Oe-Y/Q.h]:[Wt+V/Q.w,Wt+Oe-V/Q.w],mr.setScale(),L.attr("transform",o(Math.round(Q.l),Math.round(Q.t)));var Ke=L.select("."+g.cbtitleunshift).attr("transform",o(-Math.round(Q.l),-Math.round(Q.t))),Te=mr.ticklabelposition,Ie=mr.title.font.size,Ve=L.select("."+g.cbaxis),Ce,Ee=0,Pe=0;function ft(rr,er){var Lr={propContainer:mr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:L.select("."+g.cbtitle)},fa=rr.charAt(0)==="h"?rr.slice(1):"h"+rr;L.selectAll("."+fa+",."+fa+"-math-group").remove(),h.draw(F,rr,a(Lr,er||{}))}function ct(){if(N&&qr||!N&&!qr){var rr,er;Ae==="top"&&(rr=V+Q.l+tt*ee,er=Y+Q.t+ot*(1-Wt-Oe)+3+Ie*.75),Ae==="bottom"&&(rr=V+Q.l+tt*ee,er=Y+Q.t+ot*(1-Wt)-3-Ie*.25),Ae==="right"&&(er=Y+Q.t+ot*q+3+Ie*.75,rr=V+Q.l+tt*Wt),ft(mr._id+"title",{attributes:{x:rr,y:er,"text-anchor":N?"start":"middle"}})}}function _t(){if(N&&!qr||!N&&qr){var rr=mr.position||0,er=mr._offset+mr._length/2,Lr,fa;if(Ae==="right")fa=er,Lr=Q.l+tt*rr+10+Ie*(mr.showticklabels?1:.5);else if(Lr=er,Ae==="bottom"&&(fa=Q.t+ot*rr+10+(Te.indexOf("inside")===-1?mr.tickfont.size:0)+(mr.ticks!=="inside"&&z.ticklen||0)),Ae==="top"){var Da=be.text.split("<br>").length;fa=Q.t+ot*rr+10-Me-w*Ie*Da}ft((N?"h":"v")+mr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+mr._id+"tick"),side:Ae,offsetTop:N?0:Q.t,offsetLeft:N?Q.l:0,maxShift:N?j.width:j.height},attributes:{x:Lr,y:fa,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function Ct(){if(!N&&!qr||N&&qr){var rr=L.select("."+g.cbtitle),er=rr.select("text"),Lr=[-X/2,X/2],fa=rr.select(".h"+mr._id+"title-math-group").node(),Da=15.6;er.node()&&(Da=parseInt(er.node().style.fontSize,10)*w);var Ia;if(fa?(Ia=i.bBox(fa),Pe=Ia.width,Ee=Ia.height,Ee>Da&&(Lr[1]-=(Ee-Da)/2)):er.node()&&!er.classed(g.jsPlaceholder)&&(Ia=i.bBox(er.node()),Pe=Ia.width,Ee=Ia.height),N){if(Ee){if(Ee+=5,Ae==="top")mr.domain[1]-=Ee/Q.h,Lr[1]*=-1;else{mr.domain[0]+=Ee/Q.h;var qa=c.lineCount(er);Lr[1]+=(1-qa)*Da}rr.attr("transform",o(Lr[0],Lr[1])),mr.setScale()}}else Pe&&(Ae==="right"&&(mr.domain[0]+=(Pe+Ie/2)/Q.w),rr.attr("transform",o(Lr[0],Lr[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)),Ve.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(rt);Wa.enter().append("rect").classed(g.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=De.map(mr.c2p).map(Math.round).sort(function(Yt,Jt){return Yt-Jt});Wa.each(function(Yt,Jt){var Fr=[Jt===0?De[0]:(rt[Jt]+rt[Jt-1])/2,Jt===rt.length-1?De[1]:(rt[Jt]+rt[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=v.select(this).attr(N?"x":"y",Qe).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(Me,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)i.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=Ze(Yt).replace("e-","");ta.attr("fill",x(ra).toHexString())}});var hi=L.select("."+g.cblines).selectAll("path."+g.cbline).data(ce.color&&ce.width?st:[]);hi.enter().append("path").classed(g.cbline,!0),hi.exit().remove(),hi.each(function(Yt){var Jt=Qe,Fr=Math.round(mr.c2p(Yt))+ce.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+Me).call(i.lineGroupStyle,ce.width,ze(Yt),ce.dash)}),Ve.selectAll("g."+mr._id+"tick,path").remove();var wi=Qe+Me+(X||0)/2-(z.ticks==="outside"?1:0),Kt=e.calcTicks(mr),Ft=e.getTickSigns(mr)[2];return e.drawTicks(F,mr,{vals:mr.ticks==="inside"?e.clipEnds(mr,Kt):Kt,layer:Ve,path:e.makeTickPath(mr,wi,Ft),transFn:e.makeTransTickFn(mr)}),e.drawLabels(F,mr,{vals:Kt,layer:Ve,transFn:e.makeTransTickLabelFn(mr),labelFns:e.makeLabelFns(mr,wi)})}function ir(){var rr,er=Me+X/2;Te.indexOf("inside")===-1&&(rr=i.bBox(Ve.node()),er+=N?rr.width:rr.height),Ce=Ke.select("text");var Lr=0,fa=N&&Ae==="top",Da=!N&&Ae==="right",Ia=0;if(Ce.node()&&!Ce.classed(g.jsPlaceholder)){var qa,Wa=Ke.select(".h"+mr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(rr=i.bBox(Wa),Lr=rr.width,qa=rr.height):(rr=i.bBox(Ke.node()),Lr=rr.right-Q.l-(N?Qe:kr),qa=rr.bottom-Q.t-(N?kr:Qe),!N&&Ae==="top"&&(er+=rr.height,Ia=rr.height)),Da&&(Ce.attr("transform",o(Lr/2+Ie/2,0)),Lr*=2),er=Math.max(er,N?Lr:qa)}var Ca=(N?V:Y)*2+er+$+X/2,hi=0;!N&&be.text&&fe==="bottom"&&q<=0&&(hi=Ca/2,Ca+=hi,Ia+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ia;var wi=$+X,Kt=(N?Qe:kr)-wi/2-(N?V:0),Ft=(N?kr:Qe)-(N?he:Y+Ia-hi);L.select("."+g.cbbg).attr("x",Kt).attr("y",Ft).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(he+wi,2)).call(s.fill,se).call(s.stroke,z.bordercolor).style("stroke-width",$);var Yt=Da?Math.max(Lr-10,0):0;L.selectAll("."+g.cboutline).attr("x",(N?Qe:kr+V)+Yt).attr("y",(N?kr+Y-he:Qe)+(fa?Ee:0)).attr(N?"width":"height",Math.max(Me,2)).attr(N?"height":"width",Math.max(he-(N?2*Y+Ee:2*V+Yt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":X});var Jt=N?Pt*Ca:0,Fr=N?0:(1-It)*Ca-Ia;if(Jt=ae?Q.l-Jt:-Jt,Fr=oe?Q.t-Fr:-Fr,L.attr("transform",o(Jt,Fr)),!N&&($||x(se).getAlpha()&&!x.equals(j.paper_bgcolor,se))){var ta=Ve.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 Ir=0,Ur=ra-1;if(xr===Ir||xr===Ur){var Hr=i.bBox(this),xt=i.getTranslate(this),Xt;if(xr===Ur){var vr=Hr.right+xt.x,Or=Ba.right+$a.x+kr-$-Za+ee;Xt=Or-vr,Xt>0&&(Xt=0)}else if(xr===Ir){var ba=Hr.left+xt.x,Pa=Ba.left+$a.x+kr+$+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[le],Ra=M[le],tn=A[fe],on=M[fe],hn=Ca-Me;N?(P==="pixels"?(ri.y=q,ri.t=he*tn,ri.b=he*on):(ri.t=ri.b=0,ri.yt=q+O*tn,ri.yb=q-O*on),B==="pixels"?(ri.x=ee,ri.l=Ca*pi,ri.r=Ca*Ra):(ri.l=hn*pi,ri.r=hn*Ra,ri.xl=ee-U*pi,ri.xr=ee+U*Ra)):(P==="pixels"?(ri.x=ee,ri.l=he*pi,ri.r=he*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*tn,ri.b=Ca*on):(ri.t=hn*tn,ri.b=hn*on,ri.yt=q-U*tn,ri.yb=q+U*on));var Tt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Br={r:j.width-Kt-Jt,l:Kt+ri.r,b:j.height-Ft-Fr,t:Ft+ri.b};ae&&oe?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][Tt]=Br[Tt]:oe||N?F._fullLayout._reservedMargin[z._id][ut]=Br[ut]:F._fullLayout._reservedMargin[z._id][Tt]=Br[Tt]}return r.syncOrAsync([S.previousPromises,ct,Ct,_t,S.previousPromises,ir],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($,se){L.attr("transform",U+o($,se)),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)-se/P.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var le=t.getCursor(B,X,z.xanchor,z.yanchor);n(L,le)},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 f(L,z,F){var N=z._levels,O=[],P=[],U,B,X=N.end+N.size/100,$=N.size,se=1.001*F[0]-.001*F[1],le=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=X:U<=X));B++)U>se&&U<le&&O.push(U);if(z._fillgradient)P=[0];else if(typeof z._fillcolor=="function"){var fe=z._filllevels;if(fe)for(X=fe.end+fe.size/100,$=fe.size,B=0;B<1e5&&(U=fe.start+B*$,!($>0?U>=X:U<=X));B++)U>F[0]&&U<F[1]&&P.push(U);else P=O.map(function(V){return V-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 $(se,le){return r.coerce(P,B,l,se,le)}return p(P,B,$,X,N),T(P,B,$,X),B}G.exports={draw:b}}}),U9=Xe({"src/components/colorbar/index.js"(Z,G){"use strict";G.exports={moduleType:"component",name:"colorbar",attributes:x2(),supplyDefaults:c5(),draw:N9().draw,hasColorbar:s5()}}}),j9=Xe({"src/components/legend/index.js"(Z,G){"use strict";G.exports={moduleType:"component",name:"legend",layoutAttributes:p5(),supplyLayoutDefaults:d5(),draw:y5(),style:g5()}}}),q9=Xe({"src/locale-en.js"(Z,G){"use strict";G.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=Xe({"src/locale-en-us.js"(Z,G){"use strict";G.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),K5=Xe({"src/snapshot/cloneplot.js"(Z,G){"use strict";var v=so(),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}G.exports=function(o,a){var n,i=o.data,s=o.layout,h=E([],i),c=E({},s,e(a.tileClass)),m=o._context||{};if(a.width&&(c.width=a.width),a.height&&(c.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){c.annotations=[];var p=Object.keys(c);for(n=0;n<p.length;n++)t(p[n])&&(c[p[n]].title={text:""});for(n=0;n<h.length;n++){var T=h[n];T.showscale=!1,T.marker&&(T.marker.showscale=!1),v.traceIs(T,"pie-like")&&(T.textposition="none")}}if(Array.isArray(a.annotations))for(n=0;n<a.annotations.length;n++)c.annotations.push(a.annotations[n]);var l=Object.keys(c).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=c[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:c,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:m.mapboxAccessToken}};return a.setBackground!=="transparent"&&(M.config.setBackground=a.setBackground||"opaque"),M.gd.defaultLayout=e(a.tileClass),M}}}),G9=Xe({"src/snapshot/toimage.js"(Z,G){"use strict";var v=Z0().EventEmitter,x=so(),S=sa(),E=Yv(),e=K5(),t=C2(),r=L2();function o(a,n){var i=new v,s=e(a,{format:"png"}),h=s.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);function c(){var p=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)}},p)}var m=E.getRedrawFunc(h);return x.call("_doPlot",h,s.data,s.layout,s.config).then(m).then(c).catch(function(p){i.emit("error",p)}),i}G.exports=o}}),H9=Xe({"src/snapshot/index.js"(Z,G){"use strict";var v=Yv(),x={getDelay:v.getDelay,getRedrawFunc:v.getRedrawFunc,clone:K5(),toSVG:C2(),svgToImg:L2(),toImage:G9(),downloadImage:D5()};G.exports=x}}),W9=Xe({"src/core.js"(Z){"use strict";Z.version=fp().version,Ff(),az();var G=so(),v=Z.register=G.register,x=Vz(),S=Object.keys(x);for(e=0;e<S.length;e++)E=S[e],E.charAt(0)!=="_"&&(Z[E]=x[E]),v({moduleType:"apiMethod",name:E,fn:x[E]});var E,e;v($z()),v([i9(),l9(),Af(),h9(),m9(),x9(),T9(),k9(),I9(),X5(),O9(),rc(),U9(),j9(),rf(),M5()]),v([q9(),V9()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(v(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=Xe({"lib/core.js"(Z,G){"use strict";G.exports=W9()}}),Sv=Xe({"src/traces/bar/attributes.js"(Z,G){"use strict";var v=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=v.marker,h=s.line,c=n({},h.width,{dflt:0}),m=n({width:c,editType:"calc"},t("marker.line")),p=n({line:m,editType:"calc"},t("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:a,cornerradius:{valType:"any",editType:"calc"}});G.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),text:v.text,texttemplate:E({editType:"plot"},{keys:o.eventDataKeys}),texttemplatefallback:e({editType:"plot"}),hovertext:v.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({},v.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:p,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:{marker:{opacity:v.selected.marker.opacity,color:v.selected.marker.color,editType:"style"},textfont:v.selected.textfont,editType:"style"},unselected:{marker:{opacity:v.unselected.marker.opacity,color:v.unselected.marker.color,editType:"style"},textfont:v.unselected.textfont,editType:"style"},zorder:v.zorder}}}),U2=Xe({"src/traces/bar/layout_attributes.js"(Z,G){"use strict";G.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=Xe({"src/traces/bar/style_defaults.js"(Z,G){"use strict";var v=$n(),x=wp().hasColorscale,S=_h(),E=sa().coercePattern;G.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",v.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=Xe({"src/traces/bar/defaults.js"(Z,G){"use strict";var v=rs(),x=sa(),S=$n(),E=so(),e=n1(),t=Qd(),r=j2(),o=Q0(),a=Sv(),n=x.coerceFont;function i(m,p,T,l){function _(b,d){return x.coerce(m,p,a,b,d)}var w=e(m,p,l,_);if(!w){p.visible=!1;return}t(m,p,l,_),_("xhoverformat"),_("yhoverformat"),_("zorder"),_("orientation",p.x&&!p.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");c(m,p,l,_,A,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(m,p,_,T,l);var M=(p.marker.line||{}).color,g=E.getComponentMethod("errorbars","supplyDefaults");g(m,p,M||S.defaultLine,{axis:"y"}),g(m,p,M||S.defaultLine,{axis:"x",inherit:"y"}),x.coerceSelectionMarkerOpacity(p,_)}function s(m,p){var T,l;function _(M,g){return x.coerce(l._input,l,a,M,g)}for(var w=0;w<m.length;w++)if(l=m[w],l.type==="bar"){T=l._input;var A=_("marker.cornerradius",p.barcornerradius);l.marker&&(l.marker.cornerradius=h(A)),o(T,l,p,_,p.barmode)}}function h(m){if(v(m)){if(m=+m,m>=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&v(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function c(m,p,T,l,_,w){w=w||{};var A=w.moduleHasSelected!==!1,M=w.moduleHasUnselected!==!1,g=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,y=!!w.hasPathbar,f=Array.isArray(_)||_==="auto",R=f||_==="inside",L=f||_==="outside";if(R||L){var z=n(l,"textfont",T.font),F=x.extendFlat({},z),N=m.textfont&&m.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"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}R&&u&&l("insidetextanchor")}G.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:c,validateCornerradius:h}}}),J5=Xe({"src/traces/bar/layout_defaults.js"(Z,G){"use strict";var v=so(),x=Go(),S=sa(),E=U2(),e=gd().validateCornerradius;G.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={},c=a("barmode"),m=c==="group",p=0;p<o.length;p++){var T=o[p];if(v.traceIs(T,"bar")&&T.visible)n=!0;else continue;var l=T.xaxis+T.yaxis;if(m?(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}c!=="overlay"&&a("barnorm"),a("bargap",i&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=Xe({"src/traces/bar/arrays_to_calcdata.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;v.mergeArray(E.text,S,"tx"),v.mergeArray(E.hovertext,S,"htx");var t=E.marker;if(t){v.mergeArray(t.opacity,S,"mo",!0),v.mergeArray(t.color,S,"mc");var r=t.line;r&&(v.mergeArray(r.color,S,"mlc"),v.mergeArrayCastPositive(r.width,S,"mlw"))}}}}),Z9=Xe({"src/traces/bar/calc.js"(Z,G){"use strict";var v=Go(),x=tv(),S=wp().hasColorscale,E=Tp(),e=B_(),t=Od();G.exports=function(o,a){var n=v.getFromId(o,a.xaxis||"x"),i=v.getFromId(o,a.yaxis||"y"),s,h,c,m,p,T,l={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(s=n.makeCalcdata(a,"x",l),c=i.makeCalcdata(a,"y"),m=x(a,i,"y",c),p=!!a.yperiodalignment,T="y"):(s=i.makeCalcdata(a,"y",l),c=n.makeCalcdata(a,"x"),m=x(a,n,"x",c),p=!!a.xperiodalignment,T="x"),h=m.vals;for(var _=Math.min(h.length,s.length),w=new Array(_),A=0;A<_;A++)w[A]={p:h[A],s:s[A]},p&&(w[A].orig_p=c[A],w[A][T+"End"]=m.ends[A],w[A][T+"Start"]=m.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=Xe({"src/traces/bar/uniform_text.js"(Z,G){"use strict";var v=Hn(),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(c){var m=c.transform;if(m){m.scale=s&&m.hide?0:i/m.fontSize;var p=v.select(this).select("text");x.setTransormAndDisplay(p,m)}})}}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"}G.exports={recordMinTextSize:E,clearMinTextSize:e,resizeText:S}}}),q2=Xe({"src/traces/bar/helpers.js"(Z){"use strict";var G=rs(),v=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(G(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 v(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=Xe({"src/traces/bar/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=es(),E=sa(),e=so(),t=Sp().resizeText,r=Sv(),o=r.textfont,a=r.insidetextfont,n=r.outsidetextfont,i=q2();function s(b){var d=v.select(b).selectAll('g[class^="barlayer"]').selectAll("g.trace");t(b,d,"bar");var u=d.size(),y=b._fullLayout;d.style("opacity",function(f){return f[0].trace.opacity}).each(function(f){(y.barmode==="stack"&&u>1||y.bargap===0&&y.bargroupgap===0&&!f[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(f){var R=v.select(this),L=f[0].trace;h(R,L,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),c(b,d,u)}function c(b,d,u){b.selectAll("text").each(function(y){var f=v.select(this),R=E.ensureUniformFontSize(u,l(f,y,d,u));S.font(f,R)})}function m(b,d,u){var y=d[0].trace;y.selectedpoints?p(u,y,b):(h(u,y,b),e.getComponentMethod("errorbars","style")(u))}function p(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(y){var f=v.select(this),R;if(y.selected){R=E.ensureUniformFontSize(u,l(f,y,d,u));var L=d.selected.textfont&&d.selected.textfont.color;L&&(R.color=L),S.font(f,R)}else S.selectedTextStyle(f,d)})}function l(b,d,u,y){var f=y._fullLayout.font,R=u.textfont;if(b.classed("bartext-inside")){var L=g(d,u);R=w(u,d.i,f,L)}else b.classed("bartext-outside")&&(R=A(u,d.i,f));return R}function _(b,d,u){return M(o,b.textfont,d,u)}function w(b,d,u,y){var f=_(b,d,u),R=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return R&&(f={color:x.contrast(y),family:f.family,size:f.size,weight:f.weight,style:f.style,variant:f.variant,textcase:f.textcase,lineposition:f.lineposition,shadow:f.shadow}),M(a,b.insidetextfont,d,f)}function A(b,d,u){var y=_(b,d,u);return M(n,b.outsidetextfont,d,y)}function M(b,d,u,y){d=d||{};var f=i.getValue(d.family,u),R=i.getValue(d.size,u),L=i.getValue(d.color,u),z=i.getValue(d.weight,u),F=i.getValue(d.style,u),N=i.getValue(d.variant,u),O=i.getValue(d.textcase,u),P=i.getValue(d.lineposition,u),U=i.getValue(d.shadow,u);return{family:i.coerceString(b.family,f,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,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}G.exports={style:s,styleTextPoints:c,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:g,resizeText:t}}}),tg=Xe({"src/traces/bar/plot.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=ou(),e=$n(),t=es(),r=so(),o=Go().tickText,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=Nd(),h=q2(),c=i0(),m=Sv(),p=m.text,T=m.textposition,l=$p().appendArrayPointValue,_=c.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function M($){return($>0)-($<0)}function g($,se){return $<se?1:-1}function b($,se,le,fe){var V=[],Y=[],ee=fe?se:le,q=fe?le:se;return V[0]=ee.c2p($.s0,!0),Y[0]=q.c2p($.p0,!0),V[1]=ee.c2p($.s1,!0),Y[1]=q.c2p($.p1,!0),fe?[V,Y]:[Y,V]}function d($,se,le,fe){if(!se.uniformtext.mode&&u(le)){var V;return fe&&(V=fe()),$.transition().duration(le.duration).ease(le.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()})}else return $}function u($){return $&&$.duration>0}function y($,se,le,fe,V,Y){var ee=se.xaxis,q=se.yaxis,oe=$._fullLayout,ae=$._context.staticPlot;V||(V={mode:oe.barmode,norm:oe.barmode,gap:oe.bargap,groupgap:oe.bargroupgap},i("bar",oe));var j=S.makeTraceGroups(fe,le,"trace bars").each(function(Q){var re=v.select(this),ce=Q[0].trace,be=Q[0].t,Ae=ce.type==="waterfall",De=ce.type==="funnel",ze=ce.type==="histogram",Ze=ce.type==="bar",at=Ze||De,nt=0;Ae&&ce.connector.visible&&ce.connector.mode==="between"&&(nt=ce.connector.line.width/2);var rt=ce.orientation==="h",st=u(V),Me=S.ensureSingle(re,"g","points"),ye=A(ce),he=Me.selectAll("g.point").data(S.identity,ye);he.enter().append("g").classed("point",!0),he.exit().remove(),he.each(function(tt,ot){var Qe=v.select(this),Pt=b(tt,ee,q,rt),It=Pt[0][0],qt=Pt[0][1],Wt=Pt[1][0],kr=Pt[1][1],mr=(rt?qt-It:kr-Wt)===0;mr&&at&&h.getLineWidth(ce,tt)&&(mr=!1),mr||(mr=!x(It)||!x(qt)||!x(Wt)||!x(kr)),tt.isBlank=mr,mr&&(rt?qt=It:kr=Wt),nt&&!mr&&(rt?(It-=g(It,qt)*nt,qt+=g(It,qt)*nt):(Wt-=g(Wt,kr)*nt,kr+=g(Wt,kr)*nt));var qr,Sr;if(ce.type==="waterfall"){if(!mr){var Rr=ce[tt.dir].marker;qr=Rr.line.width,Sr=Rr.color}}else qr=h.getLineWidth(ce,tt),Sr=tt.mc||ce.marker.color;function wt(wi){var Kt=v.round(qr/2%1,2);return V.gap===0&&V.groupgap===0?v.round(Math.round(wi)-Kt,2):wi}function Ne(wi,Kt,Ft){return Ft&&wi===Kt?wi:Math.abs(wi-Kt)>=2?wt(wi):wi>Kt?Math.ceil(wi):Math.floor(wi)}var Ke=e.opacity(Sr),Te=Ke<1||qr>.01?wt:Ne;$._context.staticPlot||(It=Te(It,qt,rt),qt=Te(qt,It,rt),Wt=Te(Wt,kr,!rt),kr=Te(kr,Wt,!rt));var Ie=rt?ee.c2p:q.c2p,Ve;tt.s0>0?Ve=tt._sMax:tt.s0<0?Ve=tt._sMin:Ve=tt.s1>0?tt._sMax:tt._sMin;function Ce(wi,Kt){if(!wi)return 0;var Ft=Math.abs(rt?kr-Wt:qt-It),Yt=Math.abs(rt?qt-It:kr-Wt),Jt=Te(Math.abs(Ie(Ve,!0)-Ie(0,!0))),Fr=tt.hasB?Math.min(Ft/2,Yt/2):Math.min(Ft/2,Jt),ta;if(Kt==="%"){var ra=Math.min(50,wi);ta=Ft*(ra/100)}else ta=wi;return Te(Math.max(Math.min(ta,Fr),0))}var Ee=Ze||ze?Ce(be.cornerradiusvalue,be.cornerradiusform):0,Pe,ft,ct="M"+It+","+Wt+"V"+kr+"H"+qt+"V"+Wt+"Z",_t=0;if(Ee&&tt.s){var Ct=M(tt.s0)===0||M(tt.s)===M(tt.s0)?tt.s1:tt.s0;if(_t=Te(tt.hasB?0:Math.abs(Ie(Ve,!0)-Ie(Ct,!0))),_t<Ee){var ir=g(It,qt),rr=g(Wt,kr),er=ir===-rr?1:0;if(rt)if(tt.hasB)Pe="M"+(It+Ee*ir)+","+Wt+"A "+Ee+","+Ee+" 0 0 "+er+" "+It+","+(Wt+Ee*rr)+"V"+(kr-Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(It+Ee*ir)+","+kr+"H"+(qt-Ee*ir)+"A "+Ee+","+Ee+" 0 0 "+er+" "+qt+","+(kr-Ee*rr)+"V"+(Wt+Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(qt-Ee*ir)+","+Wt+"Z";else{ft=Math.abs(qt-It)+_t;var Lr=ft<Ee?Ee-Math.sqrt(ft*(2*Ee-ft)):0,fa=_t>0?Math.sqrt(_t*(2*Ee-_t)):0,Da=ir>0?Math.max:Math.min;Pe="M"+It+","+Wt+"V"+(kr-Lr*rr)+"H"+Da(qt-(Ee-_t)*ir,It)+"A "+Ee+","+Ee+" 0 0 "+er+" "+qt+","+(kr-Ee*rr-fa)+"V"+(Wt+Ee*rr+fa)+"A "+Ee+","+Ee+" 0 0 "+er+" "+Da(qt-(Ee-_t)*ir,It)+","+(Wt+Lr*rr)+"Z"}else if(tt.hasB)Pe="M"+(It+Ee*ir)+","+Wt+"A "+Ee+","+Ee+" 0 0 "+er+" "+It+","+(Wt+Ee*rr)+"V"+(kr-Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(It+Ee*ir)+","+kr+"H"+(qt-Ee*ir)+"A "+Ee+","+Ee+" 0 0 "+er+" "+qt+","+(kr-Ee*rr)+"V"+(Wt+Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(qt-Ee*ir)+","+Wt+"Z";else{ft=Math.abs(kr-Wt)+_t;var Ia=ft<Ee?Ee-Math.sqrt(ft*(2*Ee-ft)):0,qa=_t>0?Math.sqrt(_t*(2*Ee-_t)):0,Wa=rr>0?Math.max:Math.min;Pe="M"+(It+Ia*ir)+","+Wt+"V"+Wa(kr-(Ee-_t)*rr,Wt)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(It+Ee*ir-qa)+","+kr+"H"+(qt-Ee*ir+qa)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(qt-Ia*ir)+","+Wa(kr-(Ee-_t)*rr,Wt)+"V"+Wt+"Z"}}else Pe=ct}else Pe=ct;var Ca=d(S.ensureSingle(Qe,"path"),oe,V,Y);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((qt-It)*(kr-Wt))||mr&&$._context.staticPlot?"M0,0Z":Pe).call(t.setClipUrl,se.layerClipId,$),!oe.uniformtext.mode&&st){var hi=t.makePointStyleFns(ce);t.singlePointStyle(tt,Ca,ce,hi,$)}f($,se,Qe,Q,ot,It,qt,Wt,kr,Ee,_t,V,Y),se.layerClipId&&t.hideOutsideRangePoint(tt,Qe.select("text"),ee,q,ce.xcalendar,ce.ycalendar)});var Oe=ce.cliponaxis===!1;t.setClipUrl(re,Oe?null:se.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,se,V)}function f($,se,le,fe,V,Y,ee,q,oe,ae,j,Q,re){var ce=se.xaxis,be=se.yaxis,Ae=$._fullLayout,De;function ze(ft,ct,_t){var Ct=S.ensureSingle(ft,"text").text(ct).attr({class:"bartext bartext-"+De,"text-anchor":"middle","data-notex":1}).call(t.font,_t).call(E.convertToTspans,$);return Ct}var Ze=fe[0].trace,at=Ze.orientation==="h",nt=P(Ae,fe,V,ce,be);De=U(Ze,V);var rt=Q.mode==="stack"||Q.mode==="relative",st=fe[V],Me=!rt||st._outmost,ye=st.hasB,he=ae&&ae-j>_;if(!nt||De==="none"||(st.isBlank||Y===ee||q===oe)&&(De==="auto"||De==="inside")){le.select("text").remove();return}var Oe=Ae.font,tt=s.getBarColor(fe[V],Ze),ot=s.getInsideTextFont(Ze,V,Oe,tt),Qe=s.getOutsideTextFont(Ze,V,Oe),Pt=Ze.insidetextanchor||"end",It=le.datum();at?ce.type==="log"&&It.s0<=0&&(ce.range[0]<ce.range[1]?Y=0:Y=ce._length):be.type==="log"&&It.s0<=0&&(be.range[0]<be.range[1]?q=be._length:q=0);var qt=Math.abs(ee-Y),Wt=Math.abs(oe-q),kr=qt-2*_,mr=Wt-2*_,qr,Sr,Rr,wt,Ne;if(De==="outside"&&!Me&&!st.hasB&&(De="inside"),De==="auto")if(Me){De="inside",Ne=S.ensureUniformFontSize($,ot),qr=ze(le,nt,Ne),Sr=t.bBox(qr.node()),Rr=Sr.width,wt=Sr.height;var Ke=Rr>0&&wt>0,Te;he?ye?Te=R(kr-2*ae,mr,Rr,wt,at)||R(kr,mr-2*ae,Rr,wt,at):at?Te=R(kr-(ae-j),mr,Rr,wt,at)||R(kr,mr-2*(ae-j),Rr,wt,at):Te=R(kr,mr-(ae-j),Rr,wt,at)||R(kr-2*(ae-j),mr,Rr,wt,at):Te=R(kr,mr,Rr,wt,at),Ke&&Te?De="inside":(De="outside",qr.remove(),qr=null)}else De="inside";if(!qr){Ne=S.ensureUniformFontSize($,De==="outside"?Qe:ot),qr=ze(le,nt,Ne);var Ie=qr.attr("transform");if(qr.attr("transform",""),Sr=t.bBox(qr.node()),Rr=Sr.width,wt=Sr.height,qr.attr("transform",Ie),Rr<=0||wt<=0){qr.remove();return}}var Ve=Ze.textangle,Ce,Ee;De==="outside"?(Ee=Ze.constraintext==="both"||Ze.constraintext==="outside",Ce=O(Y,ee,q,oe,Sr,{isHorizontal:at,constrained:Ee,angle:Ve})):(Ee=Ze.constraintext==="both"||Ze.constraintext==="inside",Ce=F(Y,ee,q,oe,Sr,{isHorizontal:at,constrained:Ee,angle:Ve,anchor:Pt,hasB:ye,r:ae,overhead:j})),Ce.fontSize=Ne.size,n(Ze.type==="histogram"?"bar":Ze.type,Ce,Ae),st.transform=Ce;var Pe=d(qr,Ae,Q,re);S.setTransormAndDisplay(Pe,Ce)}function R($,se,le,fe,V){if($<0||se<0)return!1;var Y=le<=$&&fe<=se,ee=le<=se&&fe<=$,q=V?$>=le*(se/fe):se>=fe*($/le);return Y||ee||q}function L($){return $==="auto"?0:$}function z($,se){var le=Math.PI/180*se,fe=Math.abs(Math.sin(le)),V=Math.abs(Math.cos(le));return{x:$.width*V+$.height*fe,y:$.width*fe+$.height*V}}function F($,se,le,fe,V,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,oe=Y.angle||0,ae=Y.anchor,j=ae==="end",Q=ae==="start",re=Y.leftToRight||0,ce=(re+1)/2,be=1-ce,Ae=Y.hasB,De=Y.r,ze=Y.overhead,Ze=V.width,at=V.height,nt=Math.abs(se-$),rt=Math.abs(fe-le),st=nt>2*_&&rt>2*_?_:0;nt-=2*st,rt-=2*st;var Me=L(oe);oe==="auto"&&!(Ze<=nt&&at<=rt)&&(Ze>nt||at>rt)&&(!(Ze>rt||at>nt)||Ze<at!=nt<rt)&&(Me+=90);var ye=z(V,Me),he,Oe;if(De&&De-ze>_){var tt=N($,se,le,fe,ye,De,ze,ee,Ae);he=tt.scale,Oe=tt.pad}else he=1,q&&(he=Math.min(1,nt/ye.x,rt/ye.y)),Oe=0;var ot=V.left*be+V.right*ce,Qe=(V.top+V.bottom)/2,Pt=($+_)*be+(se-_)*ce,It=(le+fe)/2,qt=0,Wt=0;if(Q||j){var kr=(ee?ye.x:ye.y)/2;De&&(j||Ae)&&(st+=Oe);var mr=ee?g($,se):g(le,fe);ee?Q?(Pt=$+mr*st,qt=-mr*kr):(Pt=se-mr*st,qt=mr*kr):Q?(It=le+mr*st,Wt=-mr*kr):(It=fe-mr*st,Wt=mr*kr)}return{textX:ot,textY:Qe,targetX:Pt,targetY:It,anchorX:qt,anchorY:Wt,scale:he,rotate:Me}}function N($,se,le,fe,V,Y,ee,q,oe){var ae=Math.max(0,Math.abs(se-$)-2*_),j=Math.max(0,Math.abs(fe-le)-2*_),Q=Y-_,re=ee?Q-Math.sqrt(Q*Q-(Q-ee)*(Q-ee)):Q,ce=oe?Q*2:q?Q-ee:2*re,be=oe?Q*2:q?2*re:Q-ee,Ae,De,ze,Ze,at;return V.y/V.x>=j/(ae-ce)?Ze=j/V.y:V.y/V.x<=(j-be)/ae?Ze=ae/V.x:!oe&&q?(Ae=V.x*V.x+V.y*V.y/4,De=-2*V.x*(ae-Q)-V.y*(j/2-Q),ze=(ae-Q)*(ae-Q)+(j/2-Q)*(j/2-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)):oe?(Ae=(V.x*V.x+V.y*V.y)/4,De=-V.x*(ae/2-Q)-V.y*(j/2-Q),ze=(ae/2-Q)*(ae/2-Q)+(j/2-Q)*(j/2-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)):(Ae=V.x*V.x/4+V.y*V.y,De=-V.x*(ae/2-Q)-2*V.y*(j-Q),ze=(ae/2-Q)*(ae/2-Q)+(j-Q)*(j-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)),Ze=Math.min(1,Ze),q?at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(j-V.y*Ze)/2)*(Q-(j-V.y*Ze)/2)))-ee):at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(ae-V.x*Ze)/2)*(Q-(ae-V.x*Ze)/2)))-ee),{scale:Ze,pad:at}}function O($,se,le,fe,V,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,oe=Y.angle||0,ae=V.width,j=V.height,Q=Math.abs(se-$),re=Math.abs(fe-le),ce;ee?ce=re>2*_?_:0:ce=Q>2*_?_:0;var be=1;q&&(be=ee?Math.min(1,re/j):Math.min(1,Q/ae));var Ae=L(oe),De=z(V,Ae),ze=(ee?De.x:De.y)/2,Ze=(V.left+V.right)/2,at=(V.top+V.bottom)/2,nt=($+se)/2,rt=(le+fe)/2,st=0,Me=0,ye=ee?g(se,$):g(le,fe);return ee?(nt=se-ye*ce,st=ye*ze):(rt=fe+ye*ce,Me=-ye*ze),{textX:Ze,textY:at,targetX:nt,targetY:rt,anchorX:st,anchorY:Me,scale:be,rotate:Ae}}function P($,se,le,fe,V){var Y=se[0].trace,ee=Y.texttemplate,q;return ee?q=B($,se,le,fe,V):Y.textinfo?q=X(se,le,fe,V):q=h.getValue(Y.text,le),h.coerceString(p,q)}function U($,se){var le=h.getValue($.textposition,se);return h.coerceEnumerated(T,le)}function B($,se,le,fe,V){var Y=se[0].trace,ee=S.castOption(Y,le,"texttemplate");if(!ee)return"";var q=Y.type==="histogram",oe=Y.type==="waterfall",ae=Y.type==="funnel",j=Y.orientation==="h",Q,re,ce,be;j?(Q="y",re=V,ce="x",be=fe):(Q="x",re=fe,ce="y",be=V);function Ae(st){return o(re,re.c2l(st),!0).text}function De(st){return o(be,be.c2l(st),!0).text}var ze=se[le],Ze={};Ze.label=ze.p,Ze.labelLabel=Ze[Q+"Label"]=Ae(ze.p);var at=S.castOption(Y,ze.i,"text");(at===0||at)&&(Ze.text=at),Ze.value=ze.s,Ze.valueLabel=Ze[ce+"Label"]=De(ze.s);var nt={};l(nt,Y,ze.i),(q||nt.x===void 0)&&(nt.x=j?Ze.value:Ze.label),(q||nt.y===void 0)&&(nt.y=j?Ze.label:Ze.value),(q||nt.xLabel===void 0)&&(nt.xLabel=j?Ze.valueLabel:Ze.labelLabel),(q||nt.yLabel===void 0)&&(nt.yLabel=j?Ze.labelLabel:Ze.valueLabel),oe&&(Ze.delta=+ze.rawS||ze.s,Ze.deltaLabel=De(Ze.delta),Ze.final=ze.v,Ze.finalLabel=De(Ze.final),Ze.initial=Ze.final-Ze.delta,Ze.initialLabel=De(Ze.initial)),ae&&(Ze.value=ze.s,Ze.valueLabel=De(Ze.value),Ze.percentInitial=ze.begR,Ze.percentInitialLabel=S.formatPercent(ze.begR),Ze.percentPrevious=ze.difR,Ze.percentPreviousLabel=S.formatPercent(ze.difR),Ze.percentTotal=ze.sumR,Ze.percenTotalLabel=S.formatPercent(ze.sumR));var rt=S.castOption(Y,ze.i,"customdata");return rt&&(Ze.customdata=rt),S.texttemplateString({data:[nt,Ze,Y._meta],fallback:Y.texttemplatefallback,labels:Ze,locale:$._d3locale,template:ee})}function X($,se,le,fe){var V=$[0].trace,Y=V.orientation==="h",ee=V.type==="waterfall",q=V.type==="funnel";function oe(rt){var st=Y?fe:le;return o(st,rt,!0).text}function ae(rt){var st=Y?le:fe;return o(st,+rt,!0).text}var j=V.textinfo,Q=$[se],re=j.split("+"),ce=[],be,Ae=function(rt){return re.indexOf(rt)!==-1};if(Ae("label")&&ce.push(oe($[se].p)),Ae("text")&&(be=S.castOption(V,Q.i,"text"),(be===0||be)&&ce.push(be)),ee){var De=+Q.rawS||Q.s,ze=Q.v,Ze=ze-De;Ae("initial")&&ce.push(ae(Ze)),Ae("delta")&&ce.push(ae(De)),Ae("final")&&ce.push(ae(ze))}if(q){Ae("value")&&ce.push(ae(Q.s));var at=0;Ae("percent initial")&&at++,Ae("percent previous")&&at++,Ae("percent total")&&at++;var nt=at>1;Ae("percent initial")&&(be=S.formatPercent(Q.begR),nt&&(be+=" of initial"),ce.push(be)),Ae("percent previous")&&(be=S.formatPercent(Q.difR),nt&&(be+=" of previous"),ce.push(be)),Ae("percent total")&&(be=S.formatPercent(Q.sumR),nt&&(be+=" of total"),ce.push(be))}return ce.join("<br>")}G.exports={plot:y,toMoveInsideBar:F}}}),f1=Xe({"src/traces/bar/hover.js"(Z,G){"use strict";var v=rf(),x=so(),S=$n(),E=sa().fillText,e=q2().getLineWidth,t=Go().hoverLabelText,r=Hs().BADNUM;function o(i,s,h,c,m){var p=a(i,s,h,c,m);if(p){var T=p.cd,l=T[0].trace,_=T[p.index];return p.color=n(l,_),x.getComponentMethod("errorbars","hoverInfo")(_,l,p),[p]}}function a(i,s,h,c,m){var p=i.cd,T=p[0].trace,l=p[0].t,_=c==="closest",w=T.type==="waterfall",A=i.maxHoverDistance,M=i.maxSpikeDistance,g,b,d,u,y,f,R;T.orientation==="h"?(g=h,b=s,d="y",u="x",y=fe,f=$):(g=s,b=h,d="x",u="y",f=fe,y=$);var L=T[d+"period"],z=_||L;function F(be){return O(be,-1)}function N(be){return O(be,1)}function O(be,Ae){var De=be.w;return be[d]+Ae*De/2}function P(be){return be[d+"End"]-be[d+"Start"]}var U=_?F:L?function(be){return be.p-P(be)/2}:function(be){return Math.min(F(be),be.p-l.bardelta/2)},B=_?N:L?function(be){return be.p+P(be)/2}:function(be){return Math.max(N(be),be.p+l.bardelta/2)};function X(be,Ae,De){return m.finiteRange&&(De=0),v.inbox(be-g,Ae-g,De+Math.min(1,Math.abs(Ae-be)/R)-1)}function $(be){return X(U(be),B(be),A)}function se(be){return X(F(be),N(be),M)}function le(be){var Ae=be[u];if(w){var De=Math.abs(be.rawS)||0;b>0?Ae+=De:b<0&&(Ae-=De)}return Ae}function fe(be){var Ae=b,De=be.b,ze=le(be);return v.inbox(De-Ae,ze-Ae,A+(ze-Ae)/(ze-De)-1)}function V(be){var Ae=b,De=be.b,ze=le(be);return v.inbox(De-Ae,ze-Ae,M+(ze-Ae)/(ze-De)-1)}var Y=i[d+"a"],ee=i[u+"a"];R=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function q(be){return(y(be)+f(be))/2}var oe=v.getDistanceFunction(c,y,f,q);if(v.getClosest(p,oe,i),i.index!==!1&&p[i.index].p!==r){z||(U=function(be){return Math.min(F(be),be.p-l.bargroupwidth/2)},B=function(be){return Math.max(N(be),be.p+l.bargroupwidth/2)});var ae=i.index,j=p[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[d+"0"]=Y.c2p(_?U(j):re[0],!0),i[d+"1"]=Y.c2p(_?B(j):re[1],!0);var ce=j.orig_p!==void 0;return i[d+"LabelVal"]=ce?j.orig_p:j.p,i.labelLabel=t(Y,i[d+"LabelVal"],T[d+"hoverformat"]),i.valueLabel=t(ee,i[u+"LabelVal"],T[u+"hoverformat"]),i.baseLabel=t(ee,j.b,T[u+"hoverformat"]),i.spikeDistance=(V(j)+se(j))/2,i[d+"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,c=s.mlcc||i.marker.line.color,m=e(i,s);if(S.opacity(h))return h;if(S.opacity(c)&&m)return c}G.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:n}}}),Y9=Xe({"src/traces/bar/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/bar/select.js"(Z,G){"use strict";G.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],c="ct"in h?h.ct:v(h,t,r,n,a);E.contains(c,!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 v(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=Xe({"src/traces/bar/index.js"(Z,G){"use strict";G.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=Xe({"lib/bar.js"(Z,G){"use strict";G.exports=K9()}}),N_=Xe({"src/traces/box/attributes.js"(Z,G){"use strict";var v=$d(),x=af(),S=Sv(),E=sh(),e=tf().axisHoverFormat,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=Qo().extendFlat,a=x.marker,n=a.line;G.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:v(),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_=Xe({"src/traces/box/layout_attributes.js"(Z,G){"use strict";G.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_=Xe({"src/traces/box/defaults.js"(Z,G){"use strict";var v=sa(),x=so(),S=$n(),E=Qd(),e=Q0(),t=a1(),r=N_();function o(s,h,c,m){function p(u,y){return v.coerce(s,h,r,u,y)}if(a(s,h,p,m),h.visible!==!1){E(s,h,m,p),p("xhoverformat"),p("yhoverformat");var T=h._hasPreCompStats;T&&(p("lowerfence"),p("upperfence")),p("line.color",(s.marker||{}).color||c),p("line.width"),p("fillcolor",S.addOpacity(h.line.color,.5));var l=!1;if(T){var _=p("mean"),w=p("sd");_&&_.length&&(l=!0,w&&w.length&&(l="sd"))}p("whiskerwidth");var A=p("sizemode"),M;A==="quartiles"&&(M=p("boxmean",l)),p("showwhiskers",A==="quartiles"),(A==="sd"||M==="sd")&&p("sdmultiple"),p("width"),p("quartilemethod");var g=!1;if(T){var b=p("notchspan");b&&b.length&&(g=!0)}else v.validate(s.notchwidth,r.notchwidth)&&(g=!0);var d=p("notched",g);d&&p("notchwidth"),n(s,h,p,{prefix:"box"}),p("zorder")}}function a(s,h,c,m){function p(X){var $=0;return X&&X.length&&($+=1,v.isArrayOrTypedArray(X[0])&&X[0].length&&($+=1)),$}function T(X){return v.validate(s[X],r[X])}var l=c("y"),_=c("x"),w;if(h.type==="box"){var A=c("q1"),M=c("median"),g=c("q3");h._hasPreCompStats=A&&A.length&&M&&M.length&&g&&g.length,w=Math.min(v.minRowLength(A),v.minRowLength(M),v.minRowLength(g))}var b=p(l),d=p(_),u=b&&v.minRowLength(l),y=d&&v.minRowLength(_),f=m.calendar,R={autotypenumbers:m.autotypenumbers},L,z;if(h._hasPreCompStats)switch(String(d)+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],f,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],f,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",d>0?z=Math.min(y,u):z=Math.min(u)):d>0?(L="h",z=Math.min(y)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=c("orientation",L);h._hasPreCompStats?U==="v"&&d===0?(c("x0",0),c("dx",1)):U==="h"&&b===0&&(c("y0",0),c("dy",1)):U==="v"&&d===0?c("x0"):U==="h"&&b===0&&c("y0");var B=x.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function n(s,h,c,m){var p=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=c("marker.line.outliercolor"),_="outliers";h._hasPreCompStats?_="all":(T||l)&&(_="suspectedoutliers");var w=c(p+"points",_);w?(c("jitter",w==="all"?.3:0),c("pointpos",w==="all"?-1.5:0),c("marker.symbol"),c("marker.opacity"),c("marker.size"),c("marker.angle"),c("marker.color",h.line.color),c("marker.line.color"),c("marker.line.width"),w==="suspectedoutliers"&&(c("marker.line.outliercolor",h.marker.color),c("marker.line.outlierwidth")),c("selected.marker.color"),c("unselected.marker.color"),c("selected.marker.size"),c("unselected.marker.size"),c("text"),c("hovertext")):delete h.marker;var A=c("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(c("hovertemplate"),c("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(h,c)}function i(s,h){var c,m;function p(w){return v.coerce(m._input,m,r,w)}for(var T=0;T<s.length;T++){m=s[T];var l=m.type;if(l==="box"||l==="violin"){c=m._input;var _=h[l+"mode"];_==="group"&&e(c,m,h,p,_)}}}G.exports={supplyDefaults:o,crossTraceDefaults:i,handleSampleDefaults:a,handlePointsDefaults:n}}}),V2=Xe({"src/traces/box/layout_defaults.js"(Z,G){"use strict";var v=so(),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 c=o[h];if(v.traceIs(c,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")}G.exports={supplyLayoutDefaults:e,_supply:E}}}),$5=Xe({"src/traces/box/calc.js"(Z,G){"use strict";var v=rs(),x=Go(),S=tv(),E=sa(),e=Hs().BADNUM,t=E._;G.exports=function(A,M){var g=A._fullLayout,b=x.getFromId(A,M.xaxis||"x"),d=x.getFromId(A,M.yaxis||"y"),u=[],y=M.type==="violin"?"_numViolins":"_numBoxes",f,R,L,z,F,N,O;M.orientation==="h"?(L=b,z="x",F=d,N="y",O=!!M.yperiodalignment):(L=d,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,se=X.minDiff/2,le,fe,V,Y,ee,q,oe=(M.boxpoints||M.points)==="all"?E.identity:function(mr){return mr.v<le.lf||mr.v>le.uf};if(M._hasPreCompStats){var ae=M[z],j=function(mr){return L.d2c((M[mr]||[])[f])},Q=1/0,re=-1/0;for(f=0;f<M._length;f++){var ce=U[f];if(v(ce)){if(le={},le.pos=le[N]=ce,O&&B&&(le.orig_p=B[f]),le.q1=j("q1"),le.med=j("median"),le.q3=j("q3"),fe=[],ae&&E.isArrayOrTypedArray(ae[f]))for(R=0;R<ae[f].length;R++)q=L.d2c(ae[f][R]),q!==e&&(ee={v:q,i:[f,R]},i(ee,M,[f,R]),fe.push(ee));if(le.pts=fe.sort(h),V=le[z]=fe.map(c),Y=V.length,le.med!==e&&le.q1!==e&&le.q3!==e&&le.med>=le.q1&&le.q3>=le.med){var be=j("lowerfence");le.lf=be!==e&&be<=le.q1?be:m(le,V,Y);var Ae=j("upperfence");le.uf=Ae!==e&&Ae>=le.q3?Ae:p(le,V,Y);var De=j("mean");le.mean=De!==e?De:Y?E.mean(V,Y):(le.q1+le.q3)/2;var ze=j("sd");le.sd=De!==e&&ze>=0?ze:Y?E.stdev(V,Y,le.mean):le.q3-le.q1,le.lo=T(le),le.uo=l(le);var Ze=j("notchspan");Ze=Ze!==e&&Ze>0?Ze:_(le,Y),le.ln=le.med-Ze,le.un=le.med+Ze;var at=le.lf,nt=le.uf;M.boxpoints&&V.length&&(at=Math.min(at,V[0]),nt=Math.max(nt,V[Y-1])),M.notched&&(at=Math.min(at,le.ln),nt=Math.max(nt,le.un)),le.min=at,le.max=nt}else{E.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+le.q1,"median = "+le.med,"q3 = "+le.q3].join(`
`));var rt;le.med!==e?rt=le.med:le.q1!==e?le.q3!==e?rt=(le.q1+le.q3)/2:rt=le.q1:le.q3!==e?rt=le.q3:rt=0,le.med=rt,le.q1=le.q3=rt,le.lf=le.uf=rt,le.mean=le.sd=rt,le.ln=le.un=rt,le.min=le.max=rt}Q=Math.min(Q,le.min),re=Math.max(re,le.max),le.pts2=fe.filter(oe),u.push(le)}}M._extremes[L._id]=x.findExtremes(L,[Q,re],{padded:!0})}else{var st=L.makeCalcdata(M,z),Me=o($,se),ye=$.length,he=a(ye);for(f=0;f<M._length;f++)if(q=st[f],!!v(q)){var Oe=E.findBin(U[f],Me);Oe>=0&&Oe<ye&&(ee={v:q,i:f},i(ee,M,f),he[Oe].push(ee))}var tt=1/0,ot=-1/0,Qe=M.quartilemethod,Pt=Qe==="exclusive",It=Qe==="inclusive";for(f=0;f<ye;f++)if(he[f].length>0){if(le={},le.pos=le[N]=$[f],fe=le.pts=he[f].sort(h),V=le[z]=fe.map(c),Y=V.length,le.min=V[0],le.max=V[Y-1],le.mean=E.mean(V,Y),le.sd=E.stdev(V,Y,le.mean)*M.sdmultiple,le.med=E.interp(V,.5),Y%2&&(Pt||It)){var qt,Wt;Pt?(qt=V.slice(0,Y/2),Wt=V.slice(Y/2+1)):It&&(qt=V.slice(0,Y/2+1),Wt=V.slice(Y/2)),le.q1=E.interp(qt,.5),le.q3=E.interp(Wt,.5)}else le.q1=E.interp(V,.25),le.q3=E.interp(V,.75);le.lf=m(le,V,Y),le.uf=p(le,V,Y),le.lo=T(le),le.uo=l(le);var kr=_(le,Y);le.ln=le.med-kr,le.un=le.med+kr,tt=Math.min(tt,le.ln),ot=Math.max(ot,le.un),le.pts2=fe.filter(oe),u.push(le)}M.notched&&E.isTypedArray(st)&&(st=Array.from(st)),M._extremes[L._id]=x.findExtremes(L,M.notched?st.concat([tt,ot]):st,{padded:!0})}return s(u,M),u.length>0?(u[0].t={num:g[y],dPos:se,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,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var y=M.makeCalcdata(w,A),f=S(w,M,A,y).vals;return[f,y]}var R;d?R=w[A+"0"]:"name"in w&&(M.type==="category"||v(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={},d=0;d<g.length;d++)b[g[d].i]=d;E.tagSelected(g,A,b)}}function h(w,A){return w.v-A.v}function c(w){return w.v}function m(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 p(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=Xe({"src/traces/box/cross_trace_calc.js"(Z,G){"use strict";var v=Go(),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],c=h==="h"?i:n,m=[],p=0;p<a.length;p++){var T=a[p],l=T[0].t,_=T[0].trace;_.visible===!0&&(_.type==="box"||_.type==="candlestick")&&!l.empty&&(_.orientation||"v")===h&&_.xaxis===n._id&&_.yaxis===i._id&&m.push(p)}t("box",r,m,c)}}function t(r,o,a,n){var i=o.calcdata,s=o._fullLayout,h=n._id,c=h.charAt(0),m,p,T,l=[],_=0;for(m=0;m<a.length;m++)for(T=i[a[m]],p=0;p<T.length;p++)l.push(n.c2l(T[p].pos,!0)),_+=(T[p].pts2||[]).length;if(l.length){var w=x.distinctVals(l);(n.type==="category"||n.type==="multicategory")&&(w.minDiff=1);var A=w.minDiff/2;v.minDtick(n,w.minDiff,w.vals[0],!0);var M=r==="violin"?"_numViolins":"_numBoxes",g=s[M],b=s[r+"mode"]==="group"&&g>1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m<a.length;m++){T=i[a[m]];var y=T[0].trace,f=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,se=X?y._offsetIndex:f.num;F=z*d*u/$,N=2*z*(-.5+(se+.5)/$)*d,O=z*d/$}else F=z*d*u,N=0,O=z;f.dPos=z,f.bPos=N,f.bdPos=F,f.wHover=O;var le,fe,V=N+F,Y,ee,q,oe,ae,j,Q=!!R,re=(y.boxpoints||y.points)&&_>0;if(L==="positive"?(le=z*(R?1:.5),Y=V,fe=Y=N):L==="negative"?(le=Y=N,fe=z*(R?1:.5),ee=V):(le=fe=z,Y=ee=V),re){var ce=y.pointpos,be=y.jitter,Ae=y.marker.size/2,De=0;ce+be>=0&&(De=V*(ce+be),De>le?(Q=!0,ae=Ae,q=De):De>Y&&(ae=Ae,q=le)),De<=le&&(q=le);var ze=0;ce-be<=0&&(ze=-V*(ce-be),ze>fe?(Q=!0,j=Ae,oe=ze):ze>ee&&(j=Ae,oe=fe)),ze<=fe&&(oe=fe)}else q=le,oe=fe;var Ze=new Array(T.length);for(p=0;p<T.length;p++)Ze[p]=T[p].pos;y._extremes[h]=v.findExtremes(n,Ze,{padded:Q,vpadminus:oe,vpadplus:q,vpadLinearized:!0,ppadminus:{x:j,y:ae}[c],ppadplus:{x:ae,y:j}[c]})}}}G.exports={crossTraceCalc:e,setPositionOffset:t}}}),H2=Xe({"src/traces/box/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=5,e=.01;function t(n,i,s,h){var c=n._context.staticPlot,m=i.xaxis,p=i.yaxis;x.makeTraceGroups(h,s,"trace boxes").each(function(T){var l=v.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=p,g=m):(M=m,g=p),r(l,{pos:M,val:g},A,w,c),o(l,{x:m,y:p},A,w),a(l,{pos:M,val:g},A,w)})}function r(n,i,s,h,c){var m=s.orientation==="h",p=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,d=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 f=n.selectAll("path.box").data(s.type!=="violin"||s.box.visible?x.identity:[]);f.enter().append("path").style("vector-effect",c?"none":"non-scaling-stroke").attr("class","box"),f.exit().remove(),f.each(function(R){if(R.empty)return v.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*d)+A,X=T.l2p(L+y*d)+A,$=s.sizemode==="sd",se=p.c2p($?R.mean-R.sd:R.q1,!0),le=$?p.c2p(R.mean+R.sd,!0):p.c2p(R.q3,!0),fe=x.constrain($?p.c2p(R.mean,!0):p.c2p(R.med,!0),Math.min(se,le)+1,Math.max(se,le)-1),V=R.lf===void 0||s.boxpoints===!1||$,Y=p.c2p(V?R.min:R.lf,!0),ee=p.c2p(V?R.max:R.uf,!0),q=p.c2p(R.ln,!0),oe=p.c2p(R.un,!0);m?v.select(this).attr("d","M"+fe+","+B+"V"+X+"M"+se+","+z+"V"+F+(b?"H"+q+"L"+fe+","+X+"L"+oe+","+F:"")+"H"+le+"V"+z+(b?"H"+oe+"L"+fe+","+B+"L"+q+","+z:"")+"Z"+(g?"M"+se+","+N+"H"+Y+"M"+le+","+N+"H"+ee+(M===0?"":"M"+Y+","+P+"V"+U+"M"+ee+","+P+"V"+U):"")):v.select(this).attr("d","M"+B+","+fe+"H"+X+"M"+z+","+se+"H"+F+(b?"V"+q+"L"+X+","+fe+"L"+F+","+oe:"")+"V"+le+"H"+z+(b?"V"+oe+"L"+B+","+fe+"L"+z+","+q:"")+"Z"+(g?"M"+N+","+se+"V"+Y+"M"+N+","+le+"V"+ee+(M===0?"":"M"+P+","+Y+"H"+U+"M"+P+","+ee+"H"+U):""))})}function o(n,i,s,h){var c=i.x,m=i.y,p=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,d=Math.max((M.max-M.min)/10,M.q3-M.q1),u=d*1e-9,y=d*e,f=[],R=0,L;if(s.jitter){if(d===0)for(R=1,f=new Array(b.length),g=0;g<b.length;g++)f[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),f.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*f[g]*(x.pseudoRandom()-.5):0,$=M.pos+T+p*(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,c,m)}function a(n,i,s,h){var c=i.val,m=i.pos,p=!!m.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=m.c2l(g.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,y=p?(d+u)/2:m.l2p(b)+l,f=c.c2p(g.mean,!0),R=c.c2p(g.mean-g.sd,!0),L=c.c2p(g.mean+g.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+f+","+d+"V"+u+(_==="sd"?"m0,0L"+R+","+y+"L"+f+","+d+"L"+L+","+y+"Z":"")):v.select(this).attr("d","M"+d+","+f+"H"+u+(_==="sd"?"m0,0L"+y+","+R+"L"+d+","+f+"L"+y+","+L+"Z":""))})}G.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=Xe({"src/traces/box/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=es();function E(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=v.select(this),s=n[0].trace,h=s.line.width;function c(T,l,_,w){T.style("stroke-width",l+"px").call(x.stroke,_).call(x.fill,w)}var m=i.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),_=s[T.dir];c(l,_.line.width,_.line.color,_.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{c(m,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 p=i.selectAll("path.point");S.pointStyle(p,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)}G.exports={style:E,styleOnSelect:e}}}),Q5=Xe({"src/traces/box/hover.js"(Z,G){"use strict";var v=Go(),x=sa(),S=rf(),E=$n(),e=x.fillText;function t(a,n,i,s){var h=a.cd,c=h[0].trace,m=c.hoveron,p=[],T;return m.indexOf("boxes")!==-1&&(p=p.concat(r(a,n,i,s))),m.indexOf("points")!==-1&&(T=o(a,n,i)),s==="closest"?T?[T]:p:(T&&p.push(T),p)}function r(a,n,i,s){var h=a.cd,c=a.xa,m=a.ya,p=h[0].trace,T=h[0].t,l=p.type==="violin",_,w,A,M,g,b,d,u,y,f,R,L=T.bdPos,z,F,N=T.wHover,O=function(ze){return A.c2l(ze.pos)+T.bPos-A.c2l(b)};l&&p.side!=="both"?(p.side==="positive"&&(y=function(ze){var Ze=O(ze);return S.inbox(Ze,Ze+N,f)},z=L,F=0),p.side==="negative"&&(y=function(ze){var Ze=O(ze);return S.inbox(Ze-N,Ze,f)},z=0,F=L)):(y=function(ze){var Ze=O(ze);return S.inbox(Ze-N,Ze+N,f)},z=F=L);var P;l?P=function(ze){return S.inbox(ze.span[0]-g,ze.span[1]-g,f)}:P=function(ze){return S.inbox(ze.min-g,ze.max-g,f)},p.orientation==="h"?(g=n,b=i,d=P,u=y,_="y",A=m,w="x",M=c):(g=i,b=n,d=y,u=P,_="x",A=c,w="y",M=m);var U=Math.min(1,L/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));f=a.maxHoverDistance-U,R=a.maxSpikeDistance-U;function B(ze){return(d(ze)+u(ze))/2}var X=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,X,a),a.index===!1)return[];var $=h[a.index],se=p.line.color,le=(p.marker||{}).color;E.opacity(se)&&p.line.width?a.color=se:E.opacity(le)&&p.boxpoints?a.color=le:a.color=p.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 fe=_+"Spike";a.spikeDistance=B($)*R/f,a[fe]=A.c2p($.pos,!0);var V=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,Y=p.boxpoints||p.points,ee=Y&&V?["max","uf","q3","med","mean","q1","lf","min"]:Y&&!V?["max","uf","q3","med","q1","lf","min"]:!Y&&V?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],q=M.range[1]<M.range[0];p.orientation===(q?"v":"h")&&ee.reverse();for(var oe=a.spikeDistance,ae=a[fe],j=[],Q=0;Q<ee.length;Q++){var re=ee[Q];if(re in $){var ce=$[re],be=M.c2p(ce,!0),Ae=x.extendFlat({},a);Ae.attr=re,Ae[w+"0"]=Ae[w+"1"]=be,Ae[w+"LabelVal"]=ce,Ae[w+"Label"]=(T.labels?T.labels[re]+" ":"")+v.hoverLabelText(M,ce,p[w+"hoverformat"]),Ae.hoverOnBox=!0,re==="mean"&&"sd"in $&&(p.boxmean==="sd"||p.sizemode==="sd")&&(Ae[w+"err"]=$.sd),Ae.hovertemplate=!1,j.push(Ae)}}a.name="",a.spikeDistance=void 0,a[fe]=void 0;for(var De=0;De<j.length;De++)j[De].attr!=="med"?(j[De].name="",j[De].spikeDistance=void 0,j[De][fe]=void 0):(j[De].spikeDistance=oe,j[De][fe]=ae);return j}function o(a,n,i){for(var s=a.cd,h=a.xa,c=a.ya,m=s[0].trace,p=h.c2p(n),T=c.c2p(i),l,_=function(P){var U=Math.max(3,P.mrc||0);return Math.max(Math.abs(h.c2p(P.x)-p)-U,1-3/U)},w=function(P){var U=Math.max(3,P.mrc||0);return Math.max(Math.abs(c.c2p(P.y)-T)-U,1-3/U)},A=S.quadrature(_,w),M=!1,g,b,d=0;d<s.length;d++){g=s[d];for(var u=0;u<(g.pts||[]).length;u++){b=g.pts[u];var y=A(b);y<=a.distance&&(a.distance=y,M=[d,u])}}if(!M)return!1;g=s[M[0]],b=g.pts[M[1]];var f=h.c2p(b.x,!0),R=c.c2p(b.y,!0),L=b.mrc||1;l=x.extendFlat({},a,{index:b.i,color:(m.marker||{}).color,name:m.name,x0:f-L,x1:f+L,y0:R-L,y1:R+L,spikeDistance:a.distance,hovertemplate:m.hovertemplate});var z=g.orig_p,F=z!==void 0?z:g.pos,N;m.orientation==="h"?(N=c,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,m,l),l}G.exports={hoverPoints:t,hoverOnBoxes:r,hoverOnPoints:o}}}),$9=Xe({"src/traces/box/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/box/select.js"(Z,G){"use strict";G.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=Xe({"src/traces/box/index.js"(Z,G){"use strict";G.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=Xe({"lib/box.js"(Z,G){"use strict";G.exports=Q9()}}),p1=Xe({"src/traces/heatmap/attributes.js"(Z,G){"use strict";var v=ku(),{extendFlat:x}=Qo(),S=ru(),{axisHoverFormat:E}=tf(),e=tc(),{hovertemplateAttrs:t,templatefallbackAttrs:r,texttemplateAttrs:o}=Jl(),a=af();G.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},v("",{cLetter:"z",autoColorDflt:!1}))}}),X2=Xe({"src/traces/heatmap/xyz_defaults.js"(Z,G){"use strict";var v=rs(),x=sa(),S=so();G.exports=function(r,o,a,n,i,s){var h=a("z");i=i||"x",s=s||"y";var c,m;if(h===void 0||!h.length)return 0;if(x.isArray1D(h)){c=a(i),m=a(s);var p=x.minRowLength(c),T=x.minRowLength(m);if(p===0||T===0)return 0;o._length=Math.min(p,T,h.length)}else{if(c=E(i,a),m=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(v(n[s])){a=!0;break}}return r&&o&&a}}}),q_=Xe({"src/traces/heatmap/label_defaults.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){S("texttemplate"),S("texttemplatefallback");var e=v.extendFlat({},E.font,{color:"auto",size:"auto"});v.coerceFont(S,"textfont",e)}}}),tS=Xe({"src/traces/heatmap/style_defaults.js"(Z,G){"use strict";G.exports=function(x,S,E){var e=E("zsmooth");e===!1&&(E("xgap"),E("ygap")),E("zhoverformat")}}}),tF=Xe({"src/traces/heatmap/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=q_(),E=Qd(),e=tS(),t=_h(),r=p1();G.exports=function(a,n,i,s){function h(m,p){return v.coerce(a,n,r,m,p)}var c=x(a,n,h,s);if(!c){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",v.isArray1D(n.z)&&n.zsmooth!==!1),t(a,n,s,h,{prefix:"",cLetter:"z"}),h("zorder")}}}),rS=Xe({"src/traces/histogram/bin_functions.js"(Z,G){"use strict";var v=rs();G.exports={count:function(x,S,E){return E[x]++,1},sum:function(x,S,E,e){var t=e[S];return v(t)?(t=Number(t),E[x]+=t,t):0},avg:function(x,S,E,e,t){var r=e[S];return v(r)&&(r=Number(r),E[x]+=r,t[x]++),0},min:function(x,S,E,e){var t=e[S];if(v(t))if(t=Number(t),v(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(v(t))if(t=Number(t),v(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=Xe({"src/traces/histogram/norm_functions.js"(Z,G){"use strict";G.exports={percent:function(v,x){for(var S=v.length,E=100/x,e=0;e<S;e++)v[e]*=E},probability:function(v,x){for(var S=v.length,E=0;E<S;E++)v[E]/=x},density:function(v,x,S,E){var e=v.length;E=E||1;for(var t=0;t<e;t++)v[t]*=S[t]*E},"probability density":function(v,x,S,E){var e=v.length;E&&(x/=E);for(var t=0;t<e;t++)v[t]*=S[t]/x}}}}),iS=Xe({"src/traces/histogram/average.js"(Z,G){"use strict";G.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=Xe({"src/traces/histogram/bin_label_vals.js"(Z,G){"use strict";var v=Hs(),x=v.ONEAVGYEAR,S=v.ONEAVGMONTH,E=v.ONEDAY,e=v.ONEHOUR,t=v.ONEMIN,r=v.ONESEC,o=Go().tickIncrement;G.exports=function(c,m,p,T,l){var _=-1.1*m,w=-.1*m,A=c-w,M=p[0],g=p[1],b=Math.min(a(M+w,M+A,T,l),a(g+w,g+A,T,l)),d=Math.min(a(M+_,M+w,T,l),a(g+_,g+w,T,l)),u,y;if(b>d&&d<Math.abs(g-M)/4e3?(u=b,y=!1):(u=Math.min(b,d),y=!0),T.type==="date"&&u>E){var f=u===x?1:6,R=u===x?"M12":"M1";return function(L,z){var F=T.c2d(L,x,l),N=F.indexOf("-",f);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+c&&(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+c&&(F+=u),z&&y&&(F-=u),F}};function a(h,c,m,p){if(h*c<=0)return 1/0;for(var T=Math.abs(c-h),l=m.type==="date",_=n(T,l),w=0;w<10;w++){var A=n(_*80,l);if(_===A)break;if(i(A,h,c,l,m,p))_=A;else break}return _}function n(h,c){return c&&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,c,m,p,T,l){if(p&&h>E){var _=s(c,T,l),w=s(m,T,l),A=h===x?0:1;return _[A]!==w[A]}return Math.floor(m/h)-Math.floor(c/h)>.1}function s(h,c,m){var p=c.c2d(h,x,m).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}}}),oS=Xe({"src/traces/histogram/calc.js"(Z,G){"use strict";var v=rs(),x=sa(),S=so(),E=Go(),{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],d=l[g+"calendar"],u=l.cumulative,y,f=h(T,l,M,g),R=f[0],L=f[1],z=typeof R.size=="string",F=[],N=z?F:R,O=[],P=[],U=[],B=0,X=l.histnorm,$=l.histfunc,se=X.indexOf("density")!==-1,le,fe,V;u.enabled&&se&&(X=X.replace(/ ?density$/,""),se=!1);var Y=$==="max"||$==="min",ee=Y?null:0,q=o.count,oe=a[X],ae=!1,j=function(Oe){return M.r2c(Oe,0,d)},Q;for(x.isArrayOrTypedArray(l[b])&&$!=="count"&&(Q=l[b],ae=$==="avg",q=o[$]),y=j(R.start),fe=j(R.end)+(y-E.tickIncrement(y,R.size,!1,d))/1e6;y<fe&&_.length<1e6&&(le=E.tickIncrement(y,R.size,!1,d),_.push((y+le)/2),w.push(ee),U.push([]),F.push(y),se&&O.push(1/(le-y)),ae&&P.push(0),!(le<=y));)y=le;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"],ce={leftGap:1/0,rightGap:1/0};re&&(T._fullLayout._roundFnOpts[re]||(T._fullLayout._roundFnOpts[re]=ce),ce=T._fullLayout._roundFnOpts[re]);var be=w.length,Ae=!0,De=ce.leftGap,ze=ce.rightGap,Ze={};for(y=0;y<L.length;y++){var at=L[y];V=x.findBin(at,N),V>=0&&V<be&&(B+=q(V,y,w,Q,P),Ae&&U[V].length&&at!==L[U[V][0]]&&(Ae=!1),U[V].push(y),Ze[y]=V,De=Math.min(De,at-F[V]),ze=Math.min(ze,F[V+1]-at))}ce.leftGap=De,ce.rightGap=ze;var nt;Ae||(nt=function(Oe,tt){return function(){var ot=T._fullLayout._roundFnOpts[re];return i(ot.leftGap,ot.rightGap,F,M,d)(Oe,tt)}}),ae&&(B=n(w,P)),oe&&oe(w,B,O),u.enabled&&p(w,u.direction,u.currentbin);var rt=Math.min(_.length,w.length),st=[],Me=0,ye=rt-1;for(y=0;y<rt;y++)if(w[y]){Me=y;break}for(y=rt-1;y>=Me;y--)if(w[y]){ye=y;break}for(y=Me;y<=ye;y++)if(v(_[y])&&v(w[y])){var he={p:_[y],s:w[y],b:0};u.enabled||(he.pts=U[y],Ae?he.ph0=he.ph1=U[y].length?L[U[y][0]]:_[y]:(l._computePh=!0,he.ph0=nt(F[y]),he.ph1=nt(F[y+1],!0))),st.push(he)}return st.length===1&&(st[0].width1=E.tickIncrement(st[0].p,R.size,!1,d)-st[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(st,l),x.isArrayOrTypedArray(l.selectedpoints)&&x.tagSelected(st,l,Ze),st}function h(T,l,_,w,A){var M=w+"bins",g=T._fullLayout,b=l["_"+w+"bingroup"],d=g._histogramBinOpts[b],u=g.barmode==="overlay",y,f,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 v(at)?Number(at):null};function B(at,nt,rt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=rt[at])):(F[at]=nt[at]=rt[at],x.nestedProperty(f[0],M+"."+at).set(rt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{f=d.traces;var X=[],$=!0,se=!1,le=!1;for(y=0;y<f.length;y++)if(R=f[y],R.visible){var fe=d.dirs[y];z=R["_"+fe+"pos0"]=_.makeCalcdata(R,fe),X=x.concat(X,z),delete R["_"+w+"autoBinFinished"],l.visible===!0&&($?$=!1:(delete R._autoBin,R["_"+w+"autoBinFinished"]=1),S.traceIs(R,"2dMap")&&(se=!0),R.type==="histogram2dcontour"&&(le=!0))}L=f[0][w+"calendar"];var V=E.autoBin(X,_,d.nbins,se,L,d.sizeFound&&d.size),Y=f[0]._autoBin={};if(F=Y[d.dirs[0]]={},le&&(d.size||(V.start=P(E.tickIncrement(O(V.start),V.size,!0,L))),d.end===void 0&&(V.end=P(E.tickIncrement(O(V.end),V.size,!1,L)))),u&&!S.traceIs(l,"2dMap")&&V._dataSpan===0&&_.type!=="category"&&_.type!=="multicategory"&&l.bingroup===""&&typeof l.xbins>"u"){if(A)return[V,z,!0];V=c(T,l,_,w,M)}N=R.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?V.start=P(E.tickIncrement(O(V.start),V.size,!0,L)):V.end=P(E.tickIncrement(O(V.end),V.size,!1,L))),d.size=V.size,d.sizeFound||(F.size=V.size,x.nestedProperty(f[0],M+".size").set(V.size)),B("start",d,V),B("end",d,V)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var ee=l._input[M]||{},q=x.extendFlat({},d),oe=d.start,ae=_.r2l(ee.start),j=ae!==void 0;if((d.startFound||j)&&ae!==_.r2l(oe)){var Q=j?ae:x.aggNums(Math.min,null,z),re={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:d.size,tick0:oe,calendar:L,range:[Q,E.tickIncrement(Q,d.size,!1,L)].map(_.l2r)},ce=E.tickFirst(re);ce>_.r2l(Q)&&(ce=E.tickIncrement(ce,d.size,!0,L)),q.start=_.l2r(ce),j||x.nestedProperty(l,M+".start").set(q.start)}var be=d.end,Ae=_.r2l(ee.end),De=Ae!==void 0;if((d.endFound||De)&&Ae!==_.r2l(be)){var ze=De?Ae:x.aggNums(Math.max,null,z);q.end=_.l2r(ze),De||x.nestedProperty(l,M+".start").set(q.end)}var Ze="autobin"+w;return l._input[Ze]===!1&&(l._input[M]=x.extendFlat({},l[M]||{}),delete l._input[Ze],delete l[Ze]),[q,z]}function c(T,l,_,w,A){var M=T._fullLayout,g=m(T,l),b=!1,d=1/0,u=[l],y,f,R;for(y=0;y<g.length;y++)if(f=g[y],f===l)b=!0;else if(!b)R=M._histogramBinOpts[f["_"+w+"bingroup"]],d=Math.min(d,R.size||f[A].size);else{var L=h(T,f,_,w,!0),z=L[0],F=L[2];f["_"+w+"autoBinFinished"]=1,f["_"+w+"pos0"]=L[1],F?u.push(f):d=Math.min(d,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(d)||(d=x.distinctVals(N).minDiff),y=0;y<u.length;y++){f=u[y];var U=f[w+"calendar"],B={start:_.c2r(N[y]-d/2,0,U),end:_.c2r(N[y]+d/2,0,U),size:d};f._input[A]=f[A]=B,R=M._histogramBinOpts[f["_"+w+"bingroup"]],R&&x.extendFlat(R,B)}return l[A]}function m(T,l){for(var _=l.xaxis,w=l.yaxis,A=l.orientation,M=[],g=T._fullData,b=0;b<g.length;b++){var d=g[b];d.type==="histogram"&&d.visible===!0&&d.orientation===A&&d.xaxis===_&&d.yaxis===w&&M.push(d)}return M}function p(T,l,_){var w,A,M;function g(d){M=T[d],T[d]/=2}function b(d){A=T[d],T[d]=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())}}G.exports={calc:s,calcAllAutoBins:h}}}),rF=Xe({"src/traces/histogram2d/calc.js"(Z,G){"use strict";var v=sa(),x=Go(),S=rS(),E=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;G.exports=function(s,h){var c=x.getFromId(s,h.xaxis),m=x.getFromId(s,h.yaxis),p=h.xcalendar,T=h.ycalendar,l=function(Ne){return c.r2c(Ne,0,p)},_=function(Ne){return m.r2c(Ne,0,T)},w=function(Ne){return c.c2r(Ne,0,p)},A=function(Ne){return m.c2r(Ne,0,T)},M,g,b,d,u=r(s,h,c,"x"),y=u[0],f=u[1],R=r(s,h,m,"y"),L=R[0],z=R[1],F=h._length;f.length>F&&f.splice(F,f.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=[],$=[],se=U?X:y,le=B?$:L,fe=0,V=[],Y=[],ee=h.histnorm,q=h.histfunc,oe=ee.indexOf("density")!==-1,ae=q==="max"||q==="min",j=ae?null:0,Q=S.count,re=E[ee],ce=!1,be=[],Ae=[],De="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";De&&q!=="count"&&(ce=q==="avg",Q=S[q]);var ze=y.size,Ze=l(y.start),at=l(y.end)+(Ze-x.tickIncrement(Ze,ze,!1,p))/1e6;for(M=Ze;M<at;M=x.tickIncrement(M,ze,!1,p))O.push(j),X.push(M),ce&&P.push(0);X.push(M);var nt=O.length,rt=(M-Ze)/nt,st=w(Ze+rt/2),Me=L.size,ye=_(L.start),he=_(L.end)+(ye-x.tickIncrement(ye,Me,!1,T))/1e6;for(M=ye;M<he;M=x.tickIncrement(M,Me,!1,T)){N.push(O.slice()),$.push(M);var Oe=new Array(nt);for(g=0;g<nt;g++)Oe[g]=[];Y.push(Oe),ce&&V.push(P.slice())}$.push(M);var tt=N.length,ot=(M-ye)/tt,Qe=A(ye+ot/2);oe&&(be=o(O.length,se,rt,U),Ae=o(N.length,le,ot,B)),!U&&c.type==="date"&&(se=a(l,se)),!B&&m.type==="date"&&(le=a(_,le));var Pt=!0,It=!0,qt=new Array(nt),Wt=new Array(tt),kr=1/0,mr=1/0,qr=1/0,Sr=1/0;for(M=0;M<F;M++){var Rr=f[M],wt=z[M];b=v.findBin(Rr,se),d=v.findBin(wt,le),b>=0&&b<nt&&d>=0&&d<tt&&(fe+=Q(b,M,N[d],De,V[d]),Y[d][b].push(M),Pt&&(qt[b]===void 0?qt[b]=Rr:qt[b]!==Rr&&(Pt=!1)),It&&(Wt[d]===void 0?Wt[d]=wt:Wt[d]!==wt&&(It=!1)),kr=Math.min(kr,Rr-X[b]),mr=Math.min(mr,X[b+1]-Rr),qr=Math.min(qr,wt-$[d]),Sr=Math.min(Sr,$[d+1]-wt))}if(ce)for(d=0;d<tt;d++)fe+=e(N[d],V[d]);if(re)for(d=0;d<tt;d++)re(N[d],fe,be,Ae[d]);return{x:f,xRanges:n(X,Pt&&qt,kr,mr,c,p),x0:st,dx:rt,y:z,yRanges:n($,It&&Wt,qr,Sr,m,T),y0:Qe,dy:ot,z:N,pts:Y}};function o(i,s,h,c){var m=new Array(i),p;if(c)for(p=0;p<i;p++)m[p]=1/(s[p+1]-s[p]);else{var T=1/h;for(p=0;p<i;p++)m[p]=T}return m}function a(i,s){return{start:i(s.start),end:i(s.end),size:s.size}}function n(i,s,h,c,m,p){var T,l=i.length-1,_=new Array(l),w=t(h,c,i,m,p);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=Xe({"src/traces/heatmap/convert_column_xyz.js"(Z,G){"use strict";var v=sa(),x=Hs().BADNUM,S=tv();G.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 c=e.text,m=c!==void 0&&v.isArray1D(c),p=e.hovertext,T=p!==void 0&&v.isArray1D(p),l,_,w=v.distinctVals(s),A=w.vals,M=v.distinctVals(h),g=M.vals,b=[],d,u,y=g.length,f=A.length;for(l=0;l<n.length;l++)b[l]=v.init2dArray(y,f);m&&(d=v.init2dArray(y,f)),T&&(u=v.init2dArray(y,f));var R=v.init2dArray(y,f);for(l=0;l<i;l++)if(s[l]!==x&&h[l]!==x){var L=v.findBin(s[l]+w.minDiff/2,A),z=v.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}m&&(d[z][L]=c[l]),T&&(u[z][L]=p[l])}for(e["_"+o]=A,e["_"+a]=g,_=0;_<n.length;_++)e["_"+n[_]]=b[_];m&&(e._text=d),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=Xe({"src/traces/heatmap/clean_2d_array.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().BADNUM;G.exports=function(e,t,r,o){var a,n,i,s,h,c;function m(A){if(v(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 p=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(d){var u=g[A._categories[d]];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),c=0;c<n;c++)w[h][c]=m(p(e,_(h),l(c)));return w}}}),K2=Xe({"src/traces/heatmap/interp2d.js"(Z,G){"use strict";var v=sa(),x=.01,S=[[-1,0],[1,0],[0,-1],[0,1]];function E(t){return .5-.25*Math.min(1,t*.5)}G.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&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,n,i,s,h,c,m,p,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,c=0;c<4;c++)m=S[c],p=t[i+m[0]],p&&(T=p[s+m[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=Xe({"src/traces/heatmap/find_empties.js"(Z,G){"use strict";var v=sa().maxRowLength;G.exports=function(S){var E=[],e={},t=[],r=S[0],o=[],a=[0,0,0],n=v(S),i,s,h,c,m,p,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&&(p=(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),p?(s===0&&p++,h===0&&p++,s===S.length-1&&p++,h===o.length-1&&p++,p<4&&(e[[s,h]]=[s,h,p]),E.push([s,h,p])):t.push([s,h]));for(;t.length;){for(T={},l=!1,m=t.length-1;m>=0;m--)c=t[m],s=c[0],h=c[1],p=((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,p&&(T[c]=[s,h,p],t.splice(m,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(c in T)e[c]=T[c],E.push(T[c])}return E.sort(function(_,w){return w[2]-_[2]})}}}),sS=Xe({"src/traces/heatmap/make_bound_array.js"(Z,G){"use strict";var v=so(),x=sa().isArrayOrTypedArray;G.exports=function(E,e,t,r,o,a){var n=[],i=v.traceIs(E,"contour"),s=v.traceIs(E,"histogram"),h,c,m,p=x(e)&&e.length>1;if(p&&!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)],m=1;m<T;m++)n.push(Math.sqrt(e[m-1]*e[m]));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]],m=1;m<T;m++)n.push((e[m-1]+e[m])*.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],m=T;m<o;m++)l*=_,n.push(l);else for(_=l-n[n.length-2],m=T;m<o;m++)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(c=r||1,m=i?0:-.5;m<o;m++)n.push(h+c*m)}return n}}}),$2=Xe({"src/traces/heatmap/calc.js"(Z,G){"use strict";var v=so(),x=sa(),S=Go(),E=tv(),e=rF(),t=Tp(),r=Z2(),o=Y2(),a=K2(),n=J2(),i=sS(),s=Hs().BADNUM;G.exports=function(p,T){var l=S.getFromId(p,T.xaxis||"x"),_=S.getFromId(p,T.yaxis||"y"),w=v.traceIs(T,"contour"),A=v.traceIs(T,"histogram"),M=w?"best":T.zsmooth,g,b,d,u,y,f,R,L,z,F,N;if(l._minDtick=0,_._minDtick=0,A)N=e(p,T),u=N.orig_x,g=N.x,b=N.x0,d=N.dx,L=N.orig_y,y=N.y,f=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,d=T.dx,f=T.y0,R=T.dy,z=o(O,T,l,_)}(l.rangebreaks||_.rangebreaks)&&(z=c(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,d,B,l),se=T.ytype==="scaled"?"":y,le=i(T,se,f,R,z.length,_);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[_._id]=S.findExtremes(_,le);var fe={x:$,y:le,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(fe.orig_x=u),T.yperiodalignment&&L&&(fe.orig_y=L),X&&X.length===$.length-1&&(fe.xCenter=X),se&&se.length===le.length-1&&(fe.yCenter=se),A&&(fe.xRanges=N.xRanges,fe.yRanges=N.yRanges,fe.pts=N.pts),w||t(p,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var V={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};fe.xfill=i(V,X,b,d,B,l),fe.yfill=i(V,se,f,R,z.length,_)}return[fe]};function h(m){for(var p=[],T=m.length,l=0;l<T;l++){var _=m[l];_!==s&&p.push(_)}return p}function c(m,p,T){for(var l=[],_=-1,w=0;w<T.length;w++)if(p[w]!==s){_++,l[_]=[];for(var A=0;A<T[w].length;A++)m[A]!==s&&l[_].push(T[w][A])}return l}}}),Q2=Xe({"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(G){return G.join(": ")+"; "}).join("")}}),lS=Xe({"src/lib/supports_pixelated_image.js"(Z,G){"use strict";var v=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(v.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",v.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}G.exports=e}}),e3=Xe({"src/traces/heatmap/plot.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=so(),E=es(),e=Go(),t=sa(),r=ou(),o=P2(),a=$n(),n=rc().extractOpts,i=rc().makeColorScaleFuncFromTrace,s=vd(),h=uh(),c=h.LINE_SPACING,m=lS(),p=Q2().STYLE,T="heatmap-label";function l(g){return g.selectAll("g."+T)}function _(g){l(g).remove()}G.exports=function(g,b,d,u){var y=b.xaxis,f=b.yaxis;t.makeTraceGroups(u,d,"hm").each(function(R){var L=v.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,se=S.traceIs(F,"contour"),le=se?"best":F.zsmooth,fe=P.length,V=t.maxRowLength(P),Y=!1,ee=!1,q,oe,ae,j,Q,re,ce,be;for(re=0;q===void 0&&re<U.length-1;)q=y.c2p(U[re]),re++;for(re=U.length-1;oe===void 0&&re>0;)oe=y.c2p(U[re]),re--;for(oe<q&&(ae=oe,oe=q,q=ae,Y=!0),re=0;j===void 0&&re<B.length-1;)j=f.c2p(B[re]),re++;for(re=B.length-1;Q===void 0&&re>0;)Q=f.c2p(B[re]),re--;Q<j&&(ae=j,j=Q,Q=ae,ee=!0),se&&(X=U,$=B,U=z.xfill,B=z.yfill);var Ae="default";if(le?Ae=le==="best"?"smooth":"fast":F._islinear&&N===0&&O===0&&m()&&(Ae="fast"),Ae!=="fast"){var De=le==="best"?0:.5;q=Math.max(-De*y._length,q),oe=Math.min((1+De)*y._length,oe),j=Math.max(-De*f._length,j),Q=Math.min((1+De)*f._length,Q)}var ze=Math.round(oe-q),Ze=Math.round(Q-j),at=q>=y._length||oe<=0||j>=f._length||Q<=0;if(at){var nt=L.selectAll("image").data([]);nt.exit().remove(),_(L);return}var rt,st;Ae==="fast"?(rt=V,st=fe):(rt=ze,st=Ze);var Me=document.createElement("canvas");Me.width=rt,Me.height=st;var ye=Me.getContext("2d",{willReadFrequently:!0}),he=i(F,{noNumericCheck:!0,returnArray:!0}),Oe,tt;Ae==="fast"?(Oe=Y?function(Ta){return V-1-Ta}:t.identity,tt=ee?function(Ta){return fe-1-Ta}:t.identity):(Oe=function(Ta){return t.constrain(Math.round(y.c2p(U[Ta])-q),0,ze)},tt=function(Ta){return t.constrain(Math.round(f.c2p(B[Ta])-j),0,Ze)});var ot=tt(0),Qe=[ot,ot],Pt=Y?0:1,It=ee?0:1,qt=0,Wt=0,kr=0,mr=0,qr,Sr,Rr,wt,Ne;function Ke(Ta,Ai){if(Ta!==void 0){var ki=he(Ta);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),qt+=Ai,Wt+=ki[0]*Ai,kr+=ki[1]*Ai,mr+=ki[2]*Ai,ki}return[0,0,0,0]}function Te(Ta,Ai,ki,Ki){var _n=Ta[ki.bin0];if(_n===void 0)return Ke(void 0,1);var Rn=Ta[ki.bin1],En=Ai[ki.bin0],On=Ai[ki.bin1],no=Rn-_n||0,cn=En-_n||0,lo;return Rn===void 0?On===void 0?lo=0:En===void 0?lo=2*(On-_n):lo=(2*On-En-_n)*2/3:On===void 0?En===void 0?lo=0:lo=(2*_n-Rn-En)*2/3:En===void 0?lo=(2*On-Rn-_n)*2/3:lo=On+_n-Rn-En,Ke(_n+ki.frac*no+Ki.frac*(cn+ki.frac*lo))}if(Ae!=="default"){var Ie=0,Ve;try{Ve=new Uint8Array(rt*st*4)}catch{Ve=new Array(rt*st*4)}if(Ae==="smooth"){var Ce=X||U,Ee=$||B,Pe=new Array(Ce.length),ft=new Array(Ee.length),ct=new Array(ze),_t=X?A:w,Ct=$?A:w,ir,rr,er;for(re=0;re<Ce.length;re++)Pe[re]=Math.round(y.c2p(Ce[re])-q);for(re=0;re<Ee.length;re++)ft[re]=Math.round(f.c2p(Ee[re])-j);for(re=0;re<ze;re++)ct[re]=_t(re,Pe);for(ce=0;ce<Ze;ce++)for(ir=Ct(ce,ft),rr=P[ir.bin0],er=P[ir.bin1],re=0;re<ze;re++,Ie+=4)Ne=Te(rr,er,ct[re],ir),M(Ve,Ie,Ne)}else for(ce=0;ce<fe;ce++)for(wt=P[ce],Qe=tt(ce),re=0;re<V;re++)Ne=Ke(wt[re],1),Ie=(Qe*V+Oe(re))*4,M(Ve,Ie,Ne);var Lr=ye.createImageData(rt,st);try{Lr.data.set(Ve)}catch{var fa=Lr.data,Da=fa.length;for(ce=0;ce<Da;ce++)fa[ce]=Ve[ce]}ye.putImageData(Lr,0,0)}else{var Ia=Math.floor(N/2),qa=Math.floor(O/2);for(ce=0;ce<fe;ce++)if(wt=P[ce],Qe.reverse(),Qe[It]=tt(ce+1),!(Qe[0]===Qe[1]||Qe[0]===void 0||Qe[1]===void 0))for(Sr=Oe(0),qr=[Sr,Sr],re=0;re<V;re++)qr.reverse(),qr[Pt]=Oe(re+1),!(qr[0]===qr[1]||qr[0]===void 0||qr[1]===void 0)&&(Rr=wt[re],Ne=Ke(Rr,(qr[1]-qr[0])*(Qe[1]-Qe[0])),ye.fillStyle="rgba("+Ne.join(",")+")",ye.fillRect(qr[0]+Ia,Qe[0]+qa,qr[1]-qr[0]-N,Qe[1]-Qe[0]-O))}Wt=Math.round(Wt/qt),kr=Math.round(kr/qt),mr=Math.round(mr/qt);var Wa=x("rgb("+Wt+","+kr+","+mr+")");g._hmpixcount=(g._hmpixcount||0)+qt,g._hmlumcount=(g._hmlumcount||0)+qt*Wa.getLuminance();var Ca=L.selectAll("image").data(R);Ca.enter().append("svg:image").attr({xmlns:s.svg,preserveAspectRatio:"none"}),Ca.attr({height:Ze,width:ze,x:q,y:j,"xlink:href":Me.toDataURL("image/png")}),Ae==="fast"&&!le&&Ca.attr("style",p),_(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},Ft=F.type==="histogram2dcontour",Yt=F.type==="contour",Jt=Yt?1:0,Fr=Yt?fe-1:fe,ta=Yt?1:0,ra=Yt?V-1:V,ca=[];for(re=Jt;re<Fr;re++){var Ba;if(Yt)Ba=z.y[re];else if(Ft){if(re===0||re===fe-1)continue;Ba=z.y[re]}else if(z.yCenter)Ba=z.yCenter[re];else{if(re+1===fe&&z.y[re+1]===void 0)continue;Ba=(z.y[re]+z.y[re+1])/2}var $a=Math.round(f.c2p(Ba));if(!(0>$a||$a>f._length))for(ce=ta;ce<ra;ce++){var Za;if(Yt)Za=z.x[ce];else if(Ft){if(ce===0||ce===V-1)continue;Za=z.x[ce]}else if(z.xCenter)Za=z.xCenter[ce];else{if(ce+1===V&&z.x[ce+1]===void 0)continue;Za=(z.x[ce]+z.x[ce+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][ce];Ra===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ra,pi.zLabel=e.tickText(Kt,Ra,"hover").text);var tn=z.text&&z.text[re]&&z.text[re][ce];(tn===void 0||tn===!1)&&(tn=""),pi.text=tn;var on=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:g._fullLayout._d3locale,template:hi});if(on){var hn=on.split("<br>"),Tt=hn.length,ut=0;for(be=0;be<Tt;be++)ut=Math.max(ut,hn[be].length);ca.push({l:Tt,c:ut,t:on,x:ri,y:$a,z:Ra})}}}}var Br=F.textfont,Cr=Br.size,xr=g._fullLayout.font.size;if(!Cr||Cr==="auto"){var Ir=1/0,Ur=1/0,Hr=0,xt=0;for(be=0;be<ca.length;be++){var Xt=ca[be];if(Hr=Math.max(Hr,Xt.l),xt=Math.max(xt,Xt.c),be<ca.length-1){var vr=ca[be+1],Or=Math.abs(vr.x-Xt.x),ba=Math.abs(vr.y-Xt.y);Or&&(Ir=Math.min(Ir,Or)),ba&&(Ur=Math.min(Ur,ba))}}!isFinite(Ir)||!isFinite(Ur)?Cr=xr:(Ir-=N,Ur-=O,Ir/=xt,Ur/=Hr,Ir/=c/2,Ur/=c,Cr=Math.min(Math.floor(Ir),Math.floor(Ur),xr))}if(Cr<=0||!isFinite(Cr))return;var Pa=function(Ta){return Ta.x},ya=function(Ta){return Ta.y-Cr*(Ta.l*c/2-1)},la=l(L).data(ca);la.enter().append("g").classed(T,1).append("text").attr("text-anchor","middle").each(function(Ta){var Ai=v.select(this),ki=Br.color;(!ki||ki==="auto")&&(ki=a.contrast(Ta.z===void 0?g._fullLayout.plot_bgcolor:"rgba("+he(Ta.z).join()+")")),Ai.attr("data-notex",1).call(r.positionText,Pa(Ta),ya(Ta)).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(Ta.t).call(r.convertToTspans,g)})}})};function w(g,b){var d=b.length-2,u=t.constrain(t.findBin(g,b),0,d),y=b[u],f=b[u+1],R=t.constrain(u+(g-y)/(f-y)-.5,0,d),L=Math.round(R),z=Math.abs(R-L);return!R||R===d||!z?{bin0:L,bin1:L,frac:0}:{bin0:L,frac:z,bin1:Math.round(L+z/(R-L))}}function A(g,b){var d=b.length-1,u=t.constrain(t.findBin(g,b),0,d),y=b[u],f=b[u+1],R=(g-y)/(f-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,d){g[b]=d[0],g[b+1]=d[1],g[b+2]=d[2],g[b+3]=Math.round(d[3]*255)}}}),n0=Xe({"src/traces/heatmap/colorbar.js"(Z,G){"use strict";G.exports={min:"zmin",max:"zmax"}}}),t3=Xe({"src/traces/heatmap/style.js"(Z,G){"use strict";var v=Hn();G.exports=function(S){v.select(S).selectAll(".hm image").style("opacity",function(E){return E.trace.opacity})}}}),r3=Xe({"src/traces/heatmap/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=x.isArrayOrTypedArray,E=Go(),e=rc().extractOpts;G.exports=function(r,o,a,n,i){i||(i={});var s=i.isContour,h=r.cd[0],c=h.trace,m=r.xa,p=r.ya,T=h.x,l=h.y,_=h.z,w=h.xCenter,A=h.yCenter,M=h.zmask,g=c.zhoverformat,b=T,d=l,u,y,f,R;if(r.index!==!1){try{f=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(f<0||f>=_[0].length||R<0||R>_.length)return}else{if(v.inbox(o-T[0],o-T[T.length-1],0)>0||v.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]]),d=[2*l[0]-l[1]],L=1;L<l.length;L++)d.push((l[L]+l[L-1])/2);d.push([2*l[l.length-1]-l[l.length-2]])}f=Math.max(0,Math.min(b.length-2,x.findBin(o,b))),R=Math.max(0,Math.min(d.length-2,x.findBin(a,d)))}var z=m.c2p(T[f]),F=m.c2p(T[f+1]),N=p.c2p(l[R]),O=p.c2p(l[R+1]),P,U;s?(P=h.orig_x||T,U=h.orig_y||l,F=z,u=P[f],O=N,y=U[R]):(P=h.orig_x||w||T,U=h.orig_y||A||l,u=w?P[f]:(P[f]+P[f+1])/2,y=A?U[R]:(U[R]+U[R+1])/2,m&&m.type==="category"&&(u=T[f]),p&&p.type==="category"&&(y=l[R]),c.zsmooth&&(z=F=m.c2p(u),N=O=p.c2p(y)));var B=_[R][f];if(M&&!M[R][f]&&(B=void 0),!(B===void 0&&!c.hoverongaps)){var X;S(h.hovertext)&&S(h.hovertext[R])?X=h.hovertext[R][f]:S(h.text)&&S(h.text[R])&&(X=h.text[R][f]);var $=e(c),se={type:"linear",range:[$.min,$.max],hoverformat:g,_separators:m._separators,_numFormat:m._numFormat},le=E.tickText(se,B,"hover").text;return[x.extendFlat(r,{index:c._after2before?c._after2before[R][f]:[R,f],distance:r.maxHoverDistance,spikeDistance:r.maxSpikeDistance,x0:z,x1:F,y0:N,y1:O,xLabelVal:u,yLabelVal:y,zLabelVal:B,zLabel:le,text:X})]}}}}),aF=Xe({"src/traces/heatmap/index.js"(Z,G){"use strict";G.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=Xe({"lib/heatmap.js"(Z,G){"use strict";G.exports=aF()}}),uS=Xe({"src/traces/histogram/bin_attributes.js"(Z,G){"use strict";G.exports=function(x,S){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),nF=Xe({"src/traces/histogram/constants.js"(Z,G){"use strict";G.exports={eventDataKeys:["binNumber"]}}}),a3=Xe({"src/traces/histogram/attributes.js"(Z,G){"use strict";var v=Sv(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,texttemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=tc(),r=uS(),o=nF(),a=Qo().extendFlat;G.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:x("x"),yhoverformat:x("y"),text:a({},v.text,{}),hovertext:a({},v.hovertext,{}),orientation:v.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({},v.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:v.insidetextanchor,textangle:v.textangle,cliponaxis:v.cliponaxis,constraintext:v.constraintext,marker:v.marker,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,zorder:v.zorder}}}),oF=Xe({"src/traces/histogram/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=$n(),E=gd().handleText,e=j2(),t=a3();G.exports=function(o,a,n,i){function s(d,u){return x.coerce(o,a,t,d,u)}var h=s("x"),c=s("y"),m=s("cumulative.enabled");m&&(s("cumulative.direction"),s("cumulative.currentbin")),s("text");var p=s("textposition");E(o,a,i,s,p,{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",c&&!h?"h":"v"),l=T==="v"?"x":"y",_=T==="v"?"y":"x",w=h&&c?Math.min(x.minRowLength(h)&&x.minRowLength(c)):x.minRowLength(a[l]||[]);if(!w){a.visible=!1;return}a._length=w;var A=v.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=v.getComponentMethod("errorbars","supplyDefaults");b(o,a,g||S.defaultLine,{axis:"y"}),b(o,a,g||S.defaultLine,{axis:"x",inherit:"y"}),s("zorder")}}}),i3=Xe({"src/traces/histogram/cross_trace_defaults.js"(Z,G){"use strict";var v=sa(),x=ef(),S=so().traceIs,E=Q0(),e=gd().validateCornerradius,t=v.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"];G.exports=function(i,s){var h=s._histogramBinOpts={},c=[],m={},p=[],T,l,_,w,A,M,g;function b(le,fe){return v.coerce(T._input,T,T._module.attributes,le,fe)}function d(le){return le.orientation==="v"?"x":"y"}function u(le,fe){var V=x.getFromTrace({_fullLayout:s},le,fe);return V.type}function y(le,fe,V){var Y=le.uid+"__"+V;fe||(fe=Y);var ee=u(le,V),q=le[V+"calendar"]||"",oe=h[fe],ae=!0;oe&&(ee===oe.axType&&q===oe.calendar?(ae=!1,oe.traces.push(le),oe.dirs.push(V)):(fe=Y,ee!==oe.axType&&v.warn(["Attempted to group the bins of trace",le.index,"set on a","type:"+ee,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),q!==oe.calendar&&v.warn(["Attempted to group the bins of trace",le.index,"set with a",q,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),ae&&(h[fe]={traces:[le],dirs:[V],axType:ee,calendar:le[V+"calendar"]||""}),le["_"+V+"bingroup"]=fe}for(A=0;A<i.length;A++)if(T=i[A],S(T,"histogram")){if(c.push(T),delete T._xautoBinFinished,delete T._yautoBinFinished,T.type==="histogram"){var f=b("marker.cornerradius",s.barcornerradius);T.marker&&(T.marker.cornerradius=e(f))}S(T,"2dMap")||E(T._input,T,s,b,s.barmode)}var R=s._alignmentOpts||{};for(A=0;A<c.length;A++){if(T=c[A],_="",!S(T,"2dMap")){if(w=d(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)+d(T))}_?(m[_]||(m[_]=[]),m[_].push(T)):p.push(T)}for(_ in m){if(l=m[_],l.length===1){p.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!==_&&v.warn(["Trace",T.index,"must match","within bingroup",_+".","Ignoring its bingroup:",N,"setting."].join(" ")),T.bingroup=_,y(T,_,d(T))}}for(A=0;A<p.length;A++){T=p[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,d(T))}for(_ in h){var U=h[_];for(l=U.traces,M=0;M<o.length;M++){var B=o[M],X=B.name,$,se;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}se=(T._autoBin||{})[w]||{},se[X]&&t(T,$).set(se[X])}if(X==="start"||X==="end")for(;A<l.length;A++)T=l[A],T["_"+w+"bingroup"]&&(se=(T._autoBin||{})[w]||{},b($,se[X]));X==="nbins"&&!U.sizeFound&&!U.nbinsFound&&(T=l[0],U[X]=b($))}}}}}}),sF=Xe({"src/traces/histogram/hover.js"(Z,G){"use strict";var v=f1().hoverPoints,x=Go().hoverLabelText;G.exports=function(E,e,t,r,o){var a=v(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=Xe({"src/traces/histogram/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/histogram/index.js"(Z,G){"use strict";G.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=Xe({"lib/histogram.js"(Z,G){"use strict";G.exports=lF()}}),n3=Xe({"src/traces/histogram2d/attributes.js"(Z,G){"use strict";var v=a3(),x=uS(),S=p1(),E=ru(),e=tf().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:o}=Jl(),a=ku(),n=Qo().extendFlat;G.exports=n({x:v.x,y:v.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:x("x"),nbinsy:v.nbinsy,ybins:x("y"),autobinx:v.autobinx,autobiny:v.autobiny,bingroup:n({},v.bingroup,{}),xbingroup:n({},v.bingroup,{}),ybingroup:n({},v.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=Xe({"src/traces/histogram2d/sample_defaults.js"(Z,G){"use strict";var v=so(),x=sa();G.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=v.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=Xe({"src/traces/histogram2d/defaults.js"(Z,G){"use strict";var v=sa(),x=fS(),S=tS(),E=_h(),e=q_(),t=n3();G.exports=function(o,a,n,i){function s(h,c){return v.coerce(o,a,t,h,c)}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=Xe({"src/traces/histogram2d/hover.js"(Z,G){"use strict";var v=r3(),x=Go().hoverLabelText;G.exports=function(E,e,t,r,o){var a=v(E,e,t,r,o);if(a){E=a[0];var n=E.index,i=n[0],s=n[1],h=E.cd[0],c=h.trace,m=h.xRanges[s],p=h.yRanges[i];return E.xLabel=x(E.xa,[m[0],m[1]],c.xhoverformat),E.yLabel=x(E.ya,[p[0],p[1]],c.yhoverformat),a}}}}),hF=Xe({"src/traces/histogram2d/index.js"(Z,G){"use strict";G.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=Xe({"lib/histogram2d.js"(Z,G){"use strict";G.exports=hF()}}),o3=Xe({"src/constants/filter_ops.js"(Z,G){"use strict";G.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=Xe({"src/traces/contour/attributes.js"(Z,G){"use strict";var v=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;G.exports=a({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:a({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:a({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:a({},v.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=Xe({"src/traces/histogram2dcontour/attributes.js"(Z,G){"use strict";var v=n3(),x=V_(),S=ku(),E=tf().axisHoverFormat,e=Qo().extendFlat;G.exports=e({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.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:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=Xe({"src/traces/contour/contours_defaults.js"(Z,G){"use strict";G.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=Xe({"src/traces/contour/label_defaults.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=E.font;v.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=Xe({"src/traces/contour/style_defaults.js"(Z,G){"use strict";var v=_h(),x=pS();G.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,v(E,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),x(t,r,i,o)}}}),dF=Xe({"src/traces/histogram2dcontour/defaults.js"(Z,G){"use strict";var v=sa(),x=fS(),S=s3(),E=l3(),e=q_(),t=hS();G.exports=function(o,a,n,i){function s(c,m){return v.coerce(o,a,t,c,m)}function h(c){return v.coerce2(o,a,t,c)}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=Xe({"src/traces/contour/set_contours.js"(Z,G){"use strict";var v=Go(),x=sa();G.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=v.tickFirst(n),n.range.reverse(),r.end=v.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 c;i===s?c=1:c=S(i,s,e.ncontours).dtick,h.size=r.size=c}}};function S(E,e,t){var r={type:"linear",range:[E,e]};return v.autoTicks(r,(e-E)/(t||15)),r}}}),G_=Xe({"src/traces/contour/end_plus.js"(Z,G){"use strict";G.exports=function(x){return x.end+x.size/1e6}}}),vS=Xe({"src/traces/contour/calc.js"(Z,G){"use strict";var v=rc(),x=$2(),S=dS(),E=G_();G.exports=function(t,r){var o=x(t,r),a=o[0].z;S(r,a);var n=r.contours,i=v.extractOpts(r),s;if(n.coloring==="heatmap"&&i.auto&&r.autocontour===!1){var h=n.start,c=E(n),m=n.size||1,p=Math.floor((c-h)/m)+1;isFinite(m)||(m=1,p=1);var T=h-m/2,l=T+p*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=Xe({"src/traces/contour/constants.js"(Z,G){"use strict";G.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=Xe({"src/traces/contour/make_crossings.js"(Z,G){"use strict";var v=H_();G.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,c,m,p,T;for(n=0;n<t-1;n++)for(s=[],n===0&&(s=s.concat(v.BOTTOMSTART)),n===t-2&&(s=s.concat(v.TOPSTART)),a=0;a<r-1;a++)for(i=s.slice(),a===0&&(i=i.concat(v.LEFTSTART)),a===r-2&&(i=i.concat(v.RIGHTSTART)),h=a+","+n,c=[[e[n][a],e[n][a+1]],[e[n+1][a],e[n+1][a+1]]],T=0;T<E.length;T++)p=E[T],m=x(p.level,c),m&&(p.crossings[h]=m,i.indexOf(m)!==-1&&(p.starts.push([a,n]),o&&i.indexOf(m,i.indexOf(m)+1)!==-1&&p.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=Xe({"src/traces/contour/find_all_paths.js"(Z,G){"use strict";var v=sa(),x=H_();G.exports=function(a,n,i){var s,h,c,m,p;for(n=n||.01,i=i||.01,c=0;c<a.length;c++){for(m=a[c],p=0;p<m.starts.length;p++)h=m.starts[p],e(m,h,"edge",n,i);for(s=0;Object.keys(m.crossings).length&&s<1e4;)s++,h=Object.keys(m.crossings)[0].split(",").map(Number),e(m,h,void 0,n,i);s===1e4&&v.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(","),c=o.crossings[h],m=t(c,n,a),p=[r(o,a,[-m[0],-m[1]])],T=o.z.length,l=o.z[0].length,_=a.slice(),w=m.slice(),A;for(A=0;A<1e4;A++){if(c>20?(c=x.CHOOSESADDLE[c][(m[0]||m[1])<0?0:1],o.crossings[h]=x.SADDLEREMAINDER[c]):delete o.crossings[h],m=x.NEWDELTA[c],!m){v.log("Found bad marching index:",c,a,o.level);break}p.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(p[p.length-1],p[p.length-2],i,s)&&p.pop();var M=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),g=a[0]===_[0]&&a[1]===_[1]&&m[0]===w[0]&&m[1]===w[1];if(g||n&&M)break;c=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(p[0],p[p.length-1],i,s),d=0,u=.2*o.smoothing,y=[],f=0,R,L,z,F,N,O,P,U,B,X,$;for(A=1;A<p.length;A++)P=E(p[A],p[A-1]),d+=P,y.push(P);var se=d/y.length*u;function le(Y){return p[Y%p.length]}for(A=p.length-2;A>=f;A--)if(R=y[A],R<se){for(z=0,L=A-1;L>=f&&R+y[L]<se;L--)R+=y[L];if(b&&A===p.length-2)for(z=0;z<L&&R+y[z]<se;z++)R+=y[z];N=A-L+z+1,O=Math.floor((A+L+z+2)/2),!b&&A===p.length-2?F=p[p.length-1]:!b&&L===-1?F=p[0]:N%2?F=le(O):F=[(le(O)[0]+le(O+1)[0])/2,(le(O)[1]+le(O+1)[1])/2],p.splice(L+1,A-L+1,F),A=L+1,z&&(f=z),b&&(A===p.length-2?p[z]=p[p.length-1]:A===0&&(p[p.length-1]=p[0]))}for(p.splice(0,f),A=0;A<p.length;A++)p[A].length=2;if(!(p.length<2))if(b)p.pop(),o.paths.push(p);else{n||v.log("Unclosed interior contour?",o.level,_.join(","),p.join("L"));var fe=!1;for(U=0;U<o.edgepaths.length;U++)if(X=o.edgepaths[U],!fe&&S(X[0],p[p.length-1],i,s)){p.pop(),fe=!0;var V=!1;for(B=0;B<o.edgepaths.length;B++)if($=o.edgepaths[B],S($[$.length-1],p[0],i,s)){V=!0,p.shift(),o.edgepaths.splice(U,1),B===U?o.paths.push(p.concat($)):(B>U&&B--,o.edgepaths[B]=$.concat(p,X));break}V||(o.edgepaths[U]=p.concat(X))}for(U=0;U<o.edgepaths.length&&!fe;U++)X=o.edgepaths[U],S(X[X.length-1],p[0],i,s)&&(p.shift(),o.edgepaths[U]=X.concat(p),fe=!0);fe||o.edgepaths.push(p)}}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],c=o.xaxis,m=o.yaxis;if(n[1]){var p=(o.level-h)/(o.z[s][i+1]-h),T=(p!==1?(1-p)*c.c2l(o.x[i]):0)+(p!==0?p*c.c2l(o.x[i+1]):0);return[c.c2p(c.l2c(T),!0),m.c2p(o.y[s],!0),i+p,s]}else{var l=(o.level-h)/(o.z[s+1][i]-h),_=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[c.c2p(o.x[i],!0),m.c2p(m.l2c(_),!0),i,s+l]}}}}),vF=Xe({"src/traces/contour/constraint_mapping.js"(Z,G){"use strict";var v=o3(),x=rs();G.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 v.COMPARISON_OPS2.indexOf(t)!==-1?a=n(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[n(r[0]),n(r[1])]:[n(r),n(r)]:v.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=Xe({"src/traces/contour/empty_pathinfo.js"(Z,G){"use strict";var v=sa(),x=vF(),S=G_();G.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},c=o.start;c<i;c+=a)if(n.push(v.extendFlat({level:c,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},h)),n.length>1e3){v.warn("Too many contours, clipping at 1000",e);break}return n}}}),_S=Xe({"src/traces/contour/convert_to_constraints.js"(Z,G){"use strict";var v=sa();G.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&&v.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&&v.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 v.extendFlat({},S,{edgepaths:v.extendDeep([],S.edgepaths),paths:v.extendDeep([],S.paths),starts:v.extendDeep([],S.starts)})}}}),xS=Xe({"src/traces/contour/close_boundaries.js"(Z,G){"use strict";G.exports=function(v,x){var S=v[0],E=S.z,e;switch(x.type){case"levels":var t=Math.min(E[0][0],E[0][1]);for(e=0;e<v.length;e++){var r=v[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,c;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]),c=Math.max(s[0],s[1]),(c<i||h>n||S.starts.length&&c===i)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),h<i&&c>n&&(S.prefixBoundary=!0);break}break}}}}),u3=Xe({"src/traces/contour/plot.js"(Z){"use strict";var G=Hn(),v=sa(),x=es(),S=rc(),E=ou(),e=Go(),t=wv(),r=e3(),o=mS(),a=gS(),n=yS(),i=_S(),s=xS(),h=H_(),c=h.LABELOPTIMIZER;Z.plot=function(g,b,d,u){var y=b.xaxis,f=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(R){var L=G.select(this),z=R[0],F=z.trace,N=z.x,O=z.y,P=F.contours,U=n(P,b,z),B=v.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),se=y.c2p(N[N.length-1],!0),le=f.c2p(O[0],!0),fe=f.c2p(O[O.length-1],!0),V=[[$,fe],[se,fe],[se,le],[$,le]],Y=U;P.type==="constraint"&&(Y=i(U,P._operation)),m(L,V,P),p(L,Y,V,P),l(L,U,g,z,P),w(L,b,g,z,V)})};function m(M,g,b){var d=v.ensureSingle(M,"g","contourbg"),u=d.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 p(M,g,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",y="M"+b.join("L")+"Z";u&&s(g,d);var f=v.ensureSingle(M,"g","contourfill"),R=f.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?G.select(this).attr("d",z).style("stroke","none"):G.select(this).remove()})}function T(M,g){var b="",d=0,u=M.edgepaths.map(function($,se){return se}),y=!0,f,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[d],M.smoothing),b+=y?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),f=M.edgepaths[d][M.edgepaths[d].length-1],z=-1,L=0;L<4;L++){if(!f){v.log("Missing end?",d,M);break}for(O(f)&&!B(f)?R=g[1]:U(f)?R=g[0]:P(f)?R=g[3]:B(f)&&(R=g[2]),F=0;F<M.edgepaths.length;F++){var X=M.edgepaths[F][0];Math.abs(f[0]-R[0])<.01?Math.abs(f[0]-X[0])<.01&&(X[1]-f[1])*(R[1]-X[1])>=0&&(R=X,z=F):Math.abs(f[1]-R[1])<.01?Math.abs(f[1]-X[1])<.01&&(X[0]-f[0])*(R[0]-X[0])>=0&&(R=X,z=F):v.log("endpt to newendpt is not vert. or horz.",f,R,X)}if(f=R,z>=0)break;b+="L"+R}if(z===M.edgepaths.length){v.log("unclosed perimeter path");break}d=z,y=u.indexOf(d)===-1,y&&(d=u[0],b+="Z")}for(d=0;d<M.paths.length;d++)b+=x.smoothclosed(M.paths[d],M.smoothing);return b}function l(M,g,b,d,u){var y=b._context.staticPlot,f=v.ensureSingle(M,"g","contourlines"),R=u.showlines!==!1,L=u.showlabels,z=R&&L,F=Z.createLines(f,R||L,g,y),N=Z.createLineClip(f,z,b,d.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=[];v.clearLocationCache();var B=Z.labelFormatter(b,d),X=x.tester.append("text").attr("data-notex",1).call(x.font,u.labelfont),$=g[0].xaxis,se=g[0].yaxis,le=$._length,fe=se._length,V=$.range,Y=se.range,ee=v.aggNums(Math.min,null,d.x),q=v.aggNums(Math.max,null,d.x),oe=v.aggNums(Math.min,null,d.y),ae=v.aggNums(Math.max,null,d.y),j=Math.max($.c2p(ee,!0),0),Q=Math.min($.c2p(q,!0),le),re=Math.max(se.c2p(ae,!0),0),ce=Math.min(se.c2p(oe,!0),fe),be={};V[0]<V[1]?(be.left=j,be.right=Q):(be.left=Q,be.right=j),Y[0]<Y[1]?(be.top=re,be.bottom=ce):(be.top=ce,be.bottom=re),be.middle=(be.top+be.bottom)/2,be.center=(be.left+be.right)/2,P.push([[be.left,be.top],[be.right,be.top],[be.right,be.bottom],[be.left,be.bottom]]);var Ae=Math.sqrt(le*le+fe*fe),De=h.LABELDISTANCE*Ae/Math.max(1,g.length/h.LABELINCREASE);F.each(function(ze){var Ze=Z.calcTextOpts(ze.level,B,X,b);G.select(this).selectAll("path").each(function(){var at=this,nt=v.getVisibleSegment(at,be,Ze.height/2);if(nt&&!(nt.len<(Ze.width+Ze.height)*h.LABELMIN))for(var rt=Math.min(Math.ceil(nt.len/De),h.LABELMAX),st=0;st<rt;st++){var Me=Z.findBestTextLocation(at,nt,Ze,U,be);if(!Me)break;Z.addLabelData(Me,Ze,U,P)}})}),X.remove(),Z.drawLabels(O,U,b,N,z?P:null)}L&&!R&&F.remove()}Z.createLines=function(M,g,b,d){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 f=y.selectAll("path.openline").data(function(L){return L.pedgepaths||L.edgepaths});f.exit().remove(),f.enter().append("path").classed("openline",!0),f.attr("d",function(L){return x.smoothopen(L,u)}).style("stroke-miterlimit",1).style("vector-effect",d?"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",d?"none":"non-scaling-stroke")}return y},Z.createLineClip=function(M,g,b,d){var u=b._fullLayout._clips,y=g?"clipline"+d:null,f=u.selectAll("#"+y).data(g?[0]:[]);return f.exit().remove(),f.enter().append("clipPath").classed("contourlineclip",!0).attr("id",y),x.setClipUrl(M,y,b),f},Z.labelFormatter=function(M,g){var b=M._fullLayout,d=g.trace,u=d.contours,y={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(u.labelformat)y.tickformat=u.labelformat,t(y,b);else{var f=S.extractOpts(d);if(f&&f.colorbar&&f.colorbar._axis)y=f.colorbar._axis;else{if(u.type==="constraint"){var R=u.value;v.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,d){var u=g(M);b.text(u).call(E.convertToTspans,d);var y=b.node(),f=x.bBox(y,!0);return{text:u,width:f.width,height:f.height,fontSize:+y.style["font-size"].replace("px",""),level:M,dy:(f.top+f.bottom)/2}},Z.findBestTextLocation=function(M,g,b,d,u){var y=b.width,f,R,L,z,F;g.isClosed?(R=g.len/c.INITIALSEARCHPOINTS,f=g.min+R/2,L=g.max):(R=(g.len-y)/(c.INITIALSEARCHPOINTS+1),f=g.min+R+y/2,L=g.max-(R+y)/2);for(var N=1/0,O=0;O<c.ITERATIONS;O++){for(var P=f;P<L;P+=R){var U=v.getTextLocation(M,g.total,P,y),B=_(U,b,d,u);B<N&&(N=B,F=U,z=P)}if(N>c.MAXCOST*2)break;O&&(R/=2),f=z-R/2,L=f+R*1.5}if(N<=c.MAXCOST)return F};function _(M,g,b,d){var u=g.width/2,y=g.height/2,f=M.x,R=M.y,L=M.theta,z=Math.cos(L)*u,F=Math.sin(L)*u,N=(f>d.center?d.right-f:f-d.left)/(z+Math.abs(Math.sin(L)*y)),O=(R>d.middle?d.bottom-R:R-d.top)/(Math.abs(F)+Math.cos(L)*y);if(N<1||O<1)return 1/0;var P=c.EDGECOST*(1/(N-1)+1/(O-1));P+=c.ANGLECOST*L*L;for(var U=f-z,B=R-F,X=f+z,$=R+F,se=0;se<b.length;se++){var le=b[se],fe=Math.cos(le.theta)*le.width/2,V=Math.sin(le.theta)*le.width/2,Y=v.segmentDistance(U,B,X,$,le.x-fe,le.y-V,le.x+fe,le.y+V)*2/(g.height+le.height),ee=le.level===g.level,q=ee?c.SAMELEVELDISTANCE:1;if(Y<=q)return 1/0;var oe=c.NEIGHBORCOST*(ee?c.SAMELEVELFACTOR:1);P+=oe/(Y-q)}return P}Z.addLabelData=function(M,g,b,d){var u=g.fontSize,y=g.width+u/3,f=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,-f/2),O(-y/2,f/2),O(y/2,f/2),O(y/2,-f/2)];b.push({text:g.text,x:R,y:L,dy:g.dy,theta:z,level:g.level,width:y,height:f}),d.push(P)},Z.drawLabels=function(M,g,b,d,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;G.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 f="",R=0;R<u.length;R++)f+="M"+u[R].join("L")+"Z";var L=v.ensureSingle(d,"path","");L.attr("d",f)}};function w(M,g,b,d,u){var y=d.trace,f=b._fullLayout._clips,R="clip"+y.uid,L=f.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:d.x,y:d.y,z:A(d),smoothing:0};o([z]),a([z]),s([z],{type:"levels"});var F=v.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=[],d=M.z.length,u=M.z[0].length,y,f=[],R;for(y=0;y<u;y++)f.push(1);for(y=0;y<d;y++)b.push(f.slice());for(y=0;y<g.length;y++)R=g[y],b[R[0]][R[1]]=0;return M.zmask=b,b}}}),bS=Xe({"src/traces/contour/make_color_map.js"(Z,G){"use strict";var v=Hn(),x=rc(),S=G_();G.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,c=h.length,m=new Array(c),p=new Array(c),T,l,_=s.min,w=s.max;if(t.coloring==="heatmap"){for(l=0;l<c;l++)T=h[l],m[l]=T[0]*(w-_)+_,p[l]=T[1];var A=v.extent([_,w,t.start,t.start+a*(n-1)]),M=A[_<w?0:1],g=A[_<w?1:0];M!==_&&(m.splice(0,0,M),p.splice(0,0,p[0])),g!==w&&(m.push(g),p.push(p[p.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<c;l++)T=h[l],m[l]=(T[0]*(n+i-1)-i/2)*a+r,p[l]=T[1];(b||e.autocontour)&&(m[0]>_&&(m.unshift(_),p.unshift(p[0])),m[m.length-1]<w&&(m.push(w),p.push(p[p.length-1])))}return x.makeColorScaleFunc({domain:m,range:p},{noNumericCheck:!0})}}}),c3=Xe({"src/traces/contour/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=t3(),E=bS();G.exports=function(t){var r=v.select(t).selectAll("g.contour");r.style("opacity",function(o){return o[0].trace.opacity}),r.each(function(o){var a=v.select(this),n=o[0].trace,i=n.contours,s=n.line,h=i.size||1,c=i.start,m=i.type==="constraint",p=!m&&i.coloring==="lines",T=!m&&i.coloring==="fill",l=p||T?E(n):null;a.selectAll("g.contourlevel").each(function(A){v.select(this).selectAll("path").call(x.lineGroupStyle,s.width,p?l(A.level):s.color,s.dash)});var _=i.labelfont;if(a.selectAll("g.contourlabels text").each(function(A){x.font(v.select(this),{weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow,family:_.family,size:_.size,color:_.color||(p?l(A.level):s.color)})}),m)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=c),a.selectAll("g.contourbg path").style("fill",l(w-.5*h))}}),S(t)}}}),f3=Xe({"src/traces/contour/colorbar.js"(Z,G){"use strict";var v=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=v.extractOpts(t);r._fillgradient=h.reversescale?v.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}}G.exports={min:"zmin",max:"zmax",calc:E}}}),wS=Xe({"src/traces/contour/hover.js"(Z,G){"use strict";var v=$n(),x=r3();G.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&&v.opacity(i.fillcolor)?n.color=v.addOpacity(i.fillcolor,1):i.contours.showlines&&v.opacity(i.line.color)&&(n.color=v.addOpacity(i.line.color,1)))}),a}}}),mF=Xe({"src/traces/histogram2dcontour/index.js"(Z,G){"use strict";G.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=Xe({"lib/histogram2dcontour.js"(Z,G){"use strict";G.exports=mF()}}),TS=Xe({"src/traces/contour/constraint_defaults.js"(Z,G){"use strict";var v=rs(),x=pS(),S=$n(),E=S.addOpacity,e=S.opacity,t=o3(),r=sa().isArrayOrTypedArray,o=t.CONSTRAINT_REDUCTION,a=t.COMPARISON_OPS2;G.exports=function(s,h,c,m,p,T){var l=h.contours,_,w,A,M=c("contours.operation");if(l._operation=o[M],n(c,l),M==="="?_=l.showlines=!0:(_=c("contours.showlines"),A=c("fillcolor",E((s.line||{}).color||p,.5))),_){var g=A&&e(A)?E(h.fillcolor,1):p;w=c("line.color",g),c("line.width",2),c("line.dash")}c("line.smoothing"),x(c,m,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])]:v(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(i("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),yF=Xe({"src/traces/contour/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=Qd(),E=TS(),e=s3(),t=l3(),r=q_(),o=V_();G.exports=function(n,i,s,h){function c(l,_){return v.coerce(n,i,o,l,_)}function m(l){return v.coerce2(n,i,o,l)}var p=x(n,i,c,h);if(!p){i.visible=!1;return}S(n,i,h,c),c("xhoverformat"),c("yhoverformat"),c("text"),c("hovertext"),c("hoverongaps"),c("hovertemplate"),c("hovertemplatefallback");var T=c("contours.type")==="constraint";c("connectgaps",v.isArray1D(i.z)),T?E(n,i,c,h,s):(e(n,i,c,m),t(n,i,c,h)),i.contours&&i.contours.coloring==="heatmap"&&r(c,h),c("zorder")}}}),_F=Xe({"src/traces/contour/index.js"(Z,G){"use strict";G.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=Xe({"lib/contour.js"(Z,G){"use strict";G.exports=_F()}}),AS=Xe({"src/traces/scatterternary/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,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;G.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:v(),hovertemplatefallback:S()}}}),bF=Xe({"src/traces/scatterternary/defaults.js"(Z,G){"use strict";var v=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();G.exports=function(i,s,h,c){function m(M,g){return v.coerce(i,s,a,M,g)}var p=m("a"),T=m("b"),l=m("c"),_;if(p?(_=p.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=_,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=_<x.PTS_LINESONLY?"lines+markers":"lines";m("mode",w),S.hasMarkers(s)&&E(i,s,h,c,m,{gradient:!0}),S.hasLines(s)&&(e(i,s,h,c,m,{backoff:!0}),t(i,s,m),m("connectgaps")),S.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),r(i,s,c,m));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill"),s.fill!=="none"&&(o(i,s,h,m),S.hasLines(s)||t(i,s,m)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),v.coerceSelectionMarkerOpacity(s,m)}}}),wF=Xe({"src/traces/scatterternary/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.aLabel=v.tickText(r.aaxis,S.a,!0).text,t.bLabel=v.tickText(r.baxis,S.b,!0).text,t.cLabel=v.tickText(r.caxis,S.c,!0).text,t}}}),TF=Xe({"src/traces/scatterternary/calc.js"(Z,G){"use strict";var v=rs(),x=Fd(),S=Av(),E=Od(),e=Bd().calcMarkerSize,t=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};G.exports=function(a,n){var i=a._fullLayout[n.subplot],s=i.sum,h=n.sum||s,c={a:n.a,b:n.b,c:n.c},m=n.ids,p,T,l,_,w,A;for(p=0;p<t.length;p++)if(l=t[p],!c[l]){for(w=c[r[l][0]],A=c[r[l][1]],_=new Array(w.length),T=0;T<w.length;T++)_[T]=h-w[T]-A[T];c[l]=_}var M=n._length,g=new Array(M),b,d,u,y,f,R;for(p=0;p<M;p++)b=c.a[p],d=c.b[p],u=c.c[p],v(b)&&v(d)&&v(u)?(b=+b,d=+d,u=+u,y=s/(b+d+u),y!==1&&(b*=y,d*=y,u*=y),R=b,f=u-d,g[p]={x:f,y:R,a:b,b:d,c:u},m&&(g[p].id=m[p])):g[p]={x:!1,y:!1};return e(n,M),x(a,n),S(g,n),E(g,n),g}}}),AF=Xe({"src/traces/scatterternary/plot.js"(Z,G){"use strict";var v=s1();G.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)}v(S,a,e,n)}}}),SF=Xe({"src/traces/scatterternary/hover.js"(Z,G){"use strict";var v=u1();G.exports=function(S,E,e,t){var r=v(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],c=o.trace,m=o.subplot;o.a=h.a,o.b=h.b,o.c=h.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[c.subplot]={_subplot:m};var T=c._module.formatLabels(h,c,p);o.aLabel=T.aLabel,o.bLabel=T.bLabel,o.cLabel=T.cLabel;var l=h.hi||c.hoverinfo,_=[];function w(M,g){_.push(M._hovertitle+": "+g)}if(!c.hovertemplate){var A=l.split("+");A.indexOf("all")!==-1&&(A=["a","b","c"]),A.indexOf("a")!==-1&&w(m.aaxis,o.aLabel),A.indexOf("b")!==-1&&w(m.baxis,o.bLabel),A.indexOf("c")!==-1&&w(m.caxis,o.cLabel)}return o.extraText=_.join("<br>"),o.hovertemplate=c.hovertemplate,r}}}),MF=Xe({"src/traces/scatterternary/event_data.js"(Z,G){"use strict";G.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=Xe({"src/plots/ternary/ternary.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=so(),E=sa(),e=E.strTranslate,t=E._,r=$n(),o=es(),a=wv(),n=Qo().extendFlat,i=bc(),s=Go(),h=Ap(),c=rf(),m=Jd(),p=m.freeMode,T=m.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}G.exports=b;var d=b.prototype;d.init=function(P){this.container=P._ternarylayer,this.defs=P._defs,this.layoutId=P._uid,this.traceHash={},this.layers={}},d.plot=function(P,U){var B=this,X=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var se=0;se<P.length;se++){var le=P[se][0].trace;if(le.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)},d.makeFramework=function(P){var U=this,B=U.graphDiv,X=P[U.id],$=U.clipId="clip"+U.layoutId+U.id,se=U.clipIdRelative="clip-relative"+U.layoutId+U.id;U.clipDef=E.ensureSingleById(P._clips,"clipPath",$,function(le){le.append("path").attr("d","M0,0Z")}),U.clipDefRelative=E.ensureSingleById(P._clips,"clipPath",se,function(le){le.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)},d.updateFx=function(P){P._ternarylayer.selectAll("g.toplevel").style("cursor",P.dragmode==="pan"?"move":"crosshair")},d.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),se=["agrid","bgrid","cgrid"];$.enter().append("g").attr("class",function(le){return"toplevel "+le}).each(function(le){var fe=v.select(this);B[le]=fe,le==="frontplot"?fe.append("g").classed("scatterlayer",!0):le==="backplot"?fe.append("g").classed("maplayer",!0):le==="plotbg"?fe.append("path").attr("d","M0,0Z"):le==="aline"||le==="bline"||le==="cline"?fe.append("path"):le==="grids"&&se.forEach(function(V){B[V]=fe.append("g").classed("grid "+V,!0)})}),$.order()};var u=Math.sqrt(4/3);d.adjustLayout=function(P,U){var B=this,X=P.domain,$=(X.x[0]+X.x[1])/2,se=(X.y[0]+X.y[1])/2,le=X.x[1]-X.x[0],fe=X.y[1]-X.y[0],V=le*U.w,Y=fe*U.h,ee=P.sum,q=P.aaxis.min,oe=P.baxis.min,ae=P.caxis.min,j,Q,re,ce,be,Ae;V>u*Y?(ce=Y,re=ce*u):(re=V,ce=re/u),be=le*re/V,Ae=fe*ce/Y,j=U.l+U.w*$-re/2,Q=U.t+U.h*(1-se)-ce/2,B.x0=j,B.y0=Q,B.w=re,B.h=ce,B.sum=ee,B.xaxis={type:"linear",range:[q+2*ae-ee,ee-q-2*oe],domain:[$-be/2,$+be/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Oe){return Oe.a>=B.aaxis.range[0]&&Oe.a<=B.aaxis.range[1]&&Oe.b>=B.baxis.range[1]&&Oe.b<=B.baxis.range[0]&&Oe.c>=B.caxis.range[1]&&Oe.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[q,ee-oe-ae],domain:[se-Ae/2,se+Ae/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var De=B.yaxis.domain[0],ze=B.aaxis=n({},P.aaxis,{range:[q,ee-oe-ae],side:"left",tickangle:(+P.aaxis.tickangle||0)-30,domain:[De,De+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(ze,B.graphDiv._fullLayout),ze.setScale();var Ze=B.baxis=n({},P.baxis,{range:[ee-q-ae,oe],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:re});a(Ze,B.graphDiv._fullLayout),Ze.setScale();var at=B.caxis=n({},P.caxis,{range:[ee-q-oe,ae],side:"right",tickangle:(+P.caxis.tickangle||0)+30,domain:[De,De+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(Q+ce)+"h"+re+"l-"+re/2+",-"+ce+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var rt="M0,"+ce+"h"+re+"l-"+re/2+",-"+ce+"Z";B.clipDefRelative.select("path").attr("d",rt);var st=e(j,Q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",st),B.clipDefRelative.select("path").attr("transform",null);var Me=e(j-Ze._offset,Q+ce);B.layers.baxis.attr("transform",Me),B.layers.bgrid.attr("transform",Me);var ye=e(j+re/2,Q)+"rotate(30)"+e(0,-ze._offset);B.layers.aaxis.attr("transform",ye),B.layers.agrid.attr("transform",ye);var he=e(j+re/2,Q)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",he),B.layers.cgrid.attr("transform",he),B.drawAxes(!0),B.layers.aline.select("path").attr("d",ze.showline?"M"+j+","+(Q+ce)+"l"+re/2+",-"+ce:"M0,0").call(r.stroke,ze.linecolor||"#000").style("stroke-width",(ze.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",Ze.showline?"M"+j+","+(Q+ce)+"h"+re:"M0,0").call(r.stroke,Ze.linecolor||"#000").style("stroke-width",(Ze.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+re/2)+","+Q+"l"+re/2+","+ce:"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)},d.drawAxes=function(P){var U=this,B=U.graphDiv,X=U.id.slice(7)+"title",$=U.layers,se=U.aaxis,le=U.baxis,fe=U.caxis;if(U.drawAx(se),U.drawAx(le),U.drawAx(fe),P){var V=Math.max(se.showticklabels?se.tickfont.size/2:0,(fe.showticklabels?fe.tickfont.size*.75:0)+(fe.ticks==="outside"?fe.ticklen*.87:0)),Y=(le.showticklabels?le.tickfont.size:0)+(le.ticks==="outside"?le.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+X,{propContainer:se,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-se.title.font.size/3-V,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+X,{propContainer:le,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+le.title.font.size*.83+Y,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+X,{propContainer:fe,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+fe.title.font.size*.83+Y,"text-anchor":"middle"}})}},d.drawAx=function(P){var U=this,B=U.graphDiv,X=P._name,$=X.charAt(0),se=P._id,le=U.layers[X],fe=30,V=$+"tickLayout",Y=y(P);U[V]!==Y&&(le.selectAll("."+se+"tick").remove(),U[V]=Y),P.setScale();var ee=s.calcTicks(P),q=s.clipEnds(P,ee),oe=s.makeTransTickFn(P),ae=s.getTickSigns(P)[2],j=E.deg2rad(fe),Q=ae*(P.linewidth||1)/2,re=ae*P.ticklen,ce=U.w,be=U.h,Ae=$==="b"?"M0,"+Q+"l"+Math.sin(j)*re+","+Math.cos(j)*re:"M"+Q+",0l"+Math.cos(j)*re+","+-Math.sin(j)*re,De={a:"M0,0l"+be+",-"+ce/2,b:"M0,0l-"+ce/2+",-"+be,c:"M0,0l-"+be+","+ce/2}[$];s.drawTicks(B,P,{vals:P.ticks==="inside"?q:ee,layer:le,path:Ae,transFn:oe,crisp:!1}),s.drawGrid(B,P,{vals:q,layer:U.layers[$+"grid"],path:De,transFn:oe,crisp:!1}),s.drawLabels(B,P,{vals:ee,layer:le,transFn:oe,labelFns:s.makeLabelFns(P,0,fe)})};function y(P){return P.ticks+String(P.ticklen)+String(P.showticklabels)}var f=g.MINZOOM/2+.87,R="m-0.87,.5h"+f+"v3h-"+(f+5.2)+"l"+(f/2+2.6)+",-"+(f*.87+4.5)+"l2.6,1.5l-"+f/2+","+f*.87+"Z",L="m0.87,.5h-"+f+"v3h"+(f+5.2)+"l-"+(f/2+2.6)+",-"+(f*.87+4.5)+"l-2.6,1.5l"+f/2+","+f*.87+"Z",z="m0,1l"+f/2+","+f*.87+"l2.6,-1.5l-"+(f/2+2.6)+",-"+(f*.87+4.5)+"l-"+(f/2+2.6)+","+(f*.87+4.5)+"l2.6,1.5l"+f/2+",-"+f*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){M(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var P=this,U=P.layers.plotbg.select("path").node(),B=P.graphDiv,X=B._fullLayout._zoomlayer,$,se;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(Me,ye,he){P.dragOptions.xaxes=[P.xaxis],P.dragOptions.yaxes=[P.yaxis],$=B._fullLayout._invScaleX,se=B._fullLayout._invScaleY;var Oe=P.dragOptions.dragmode=B._fullLayout.dragmode;p(Oe)?P.dragOptions.minDrag=1:P.dragOptions.minDrag=void 0,Oe==="zoom"?(P.dragOptions.moveFn=Ze,P.dragOptions.clickFn=ce,P.dragOptions.doneFn=at,be(Me,ye,he)):Oe==="pan"?(P.dragOptions.moveFn=rt,P.dragOptions.clickFn=ce,P.dragOptions.doneFn=st,nt(),P.clearOutline(B)):(T(Oe)||p(Oe))&&_(Me,ye,he,P.dragOptions,Oe)}};var le,fe,V,Y,ee,q,oe,ae,j,Q;function re(Me){var ye={};return ye[P.id+".aaxis.min"]=Me.a,ye[P.id+".baxis.min"]=Me.b,ye[P.id+".caxis.min"]=Me.c,ye}function ce(Me,ye){var he=B._fullLayout.clickmode;O(B),Me===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,re({a:0,b:0,c:0}))),he.indexOf("select")>-1&&Me===1&&w(ye,B,[P.xaxis],[P.yaxis],P.id,P.dragOptions),he.indexOf("event")>-1&&c.click(B,ye,P.id)}function be(Me,ye,he){var Oe=U.getBoundingClientRect();le=ye-Oe.left,fe=he-Oe.top,B._fullLayout._calcInverseTransform(B);var tt=B._fullLayout._invTransform,ot=E.apply3DTransform(tt)(le,fe);le=ot[0],fe=ot[1],V={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=V,Y=P.aaxis.range[1]-V.a,q=x(P.graphDiv._fullLayout[P.id].bgcolor).getLuminance(),oe="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",oe),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 Ae(Me,ye){return 1-ye/P.h}function De(Me,ye){return 1-(Me+(P.h-ye)/Math.sqrt(3))/P.w}function ze(Me,ye){return(Me-(P.h-ye)/Math.sqrt(3))/P.w}function Ze(Me,ye){var he=le+Me*$,Oe=fe+ye*se,tt=Math.max(0,Math.min(1,Ae(le,fe),Ae(he,Oe))),ot=Math.max(0,Math.min(1,De(le,fe),De(he,Oe))),Qe=Math.max(0,Math.min(1,ze(le,fe),ze(he,Oe))),Pt=(tt/2+Qe)*P.w,It=(1-tt/2-ot)*P.w,qt=(Pt+It)/2,Wt=It-Pt,kr=(1-tt)*P.h,mr=kr-Wt/u;Wt<g.MINZOOM?(ee=V,j.attr("d",oe),Q.attr("d","M0,0Z")):(ee={a:V.a+tt*Y,b:V.b+ot*Y,c:V.c+Qe*Y},j.attr("d",oe+"M"+Pt+","+kr+"H"+It+"L"+qt+","+mr+"L"+Pt+","+kr+"Z"),Q.attr("d","M"+le+","+fe+F+"M"+Pt+","+kr+R+"M"+It+","+kr+L+"M"+qt+","+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!==V&&(S.call("_guiRelayout",B,re(ee)),N&&B.data&&B._context.showTips&&(E.notifier(t(B,"Double-click to zoom back out"),"long"),N=!1))}function nt(){V={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=V}function rt(Me,ye){var he=Me/P.xaxis._m,Oe=ye/P.yaxis._m;ee={a:V.a-Oe,b:V.b+(he+Oe)/2,c:V.c-(he-Oe)/2};var tt=[ee.a,ee.b,ee.c].sort(E.sorterAsc),ot={a:tt.indexOf(ee.a),b:tt.indexOf(ee.b),c:tt.indexOf(ee.c)};tt[0]<0&&(tt[1]+tt[0]/2<0?(tt[2]+=tt[0]+tt[1],tt[0]=tt[1]=0):(tt[2]+=tt[0]/2,tt[1]+=tt[0]/2,tt[0]=0),ee={a:tt[ot.a],b:tt[ot.b],c:tt[ot.c]},ye=(V.a-ee.a)*P.yaxis._m,Me=(V.c-ee.c-V.b+ee.b)*P.xaxis._m);var Qe=e(P.x0+Me,P.y0+ye);P.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Qe);var Pt=e(-Me,-ye);P.clipDefRelative.select("path").attr("transform",Pt),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 st(){S.call("_guiRelayout",B,re(ee))}U.onmousemove=function(Me){c.hover(B,Me,P.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=P.id},U.onmouseout=function(Me){B._dragging||h.unhover(B,Me)},h.init(this.dragOptions)};function O(P){v.select(P).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=Xe({"src/plots/ternary/layout_attributes.js"(Z,G){"use strict";var v=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=G.exports=E({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:v.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=Xe({"src/plots/subplot_defaults.js"(Z,G){"use strict";var v=sa(),x=zl(),S=wc().defaults;G.exports=function(e,t,r,o){var a=o.type,n=o.attributes,i=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],c=h.length,m=c&&h[0].replace(/\d+$/,""),p,T;function l(M,g){return v.coerce(p,T,n,M,g)}for(var _=0;_<c;_++){var w=h[_];e[w]?p=e[w]:p=e[w]={},T=x.newContainer(t,w,m),o.noUirevision||l("uirevision",t.uirevision);var A={};A[s]=[_/c,(_+1)/c],S(T,t,l,A),o.id=w,i(p,T,l,o)}}}}),kF=Xe({"src/plots/ternary/layout_defaults.js"(Z,G){"use strict";var v=$n(),x=zl(),S=sa(),E=o0(),e=Qm(),t=e0(),r=t1(),o=Y0(),a=z_(),n=SS(),i=["aaxis","baxis","caxis"];G.exports=function(m,p,T){E(m,p,T,{type:"ternary",attributes:n,handleDefaults:s,font:p.font,paper_bgcolor:p.paper_bgcolor})};function s(c,m,p,T){var l=p("bgcolor"),_=p("sum");T.bgColor=v.combine(l,T.paper_bgcolor);for(var w,A,M,g=0;g<i.length;g++)w=i[g],A=c[w]||{},M=x.newContainer(m,w),M._name=w,h(A,M,T,m);var b=m.aaxis,d=m.baxis,u=m.caxis;b.min+d.min+u.min>=_&&(b.min=0,d.min=0,u.min=0,c.aaxis&&delete c.aaxis.min,c.baxis&&delete c.baxis.min,c.caxis&&delete c.caxis.min)}function h(c,m,p,T){var l=n[m._name];function _(y,f){return S.coerce(c,m,l,y,f)}_("uirevision",T.uirevision),m.type="linear";var w=_("color"),A=w!==l.color.dflt?w:p.font.color,M=m._name,g=M.charAt(0).toUpperCase(),b="Component "+g,d=_("title.text",b);m._hovertitle=d===b?d:g,S.coerceFont(_,"title.font",p.font,{overrideDflt:{size:S.bigFont(p.font.size),color:A}}),_("min"),o(c,m,_,"linear"),t(c,m,_,"linear"),e(c,m,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(c,m,_,{outerTicks:!0});var u=_("showticklabels");u&&(S.coerceFont(_,"tickfont",p.font,{overrideDflt:{color:A}}),_("tickangle"),_("tickformat")),a(c,m,_,{dfltColor:w,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),_("hoverformat"),_("layer")}}}),CF=Xe({"src/plots/ternary/index.js"(Z){"use strict";var G=EF(),v=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=v(a,S,s),c=o[s]._subplot;c||(c=new G({id:s,graphDiv:r,container:o._ternarylayer.node()},o),o[s]._subplot=c),c.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=Xe({"src/traces/scatterternary/index.js"(Z,G){"use strict";G.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=Xe({"lib/scatterternary.js"(Z,G){"use strict";G.exports=LF()}}),MS=Xe({"src/traces/violin/attributes.js"(Z,G){"use strict";var v=N_(),x=Qo().extendFlat,S=tf().axisHoverFormat;G.exports={y:v.y,x:v.x,x0:v.x0,y0:v.y0,xhoverformat:S("x"),yhoverformat:S("y"),name:x({},v.name,{}),orientation:x({},v.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:v.fillcolor,points:x({},v.boxpoints,{}),jitter:x({},v.jitter,{}),pointpos:x({},v.pointpos,{}),width:x({},v.width,{}),marker:v.marker,text:v.text,hovertext:v.hovertext,hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,quartilemethod:v.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:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:v.zorder}}}),ES=Xe({"src/traces/violin/layout_attributes.js"(Z,G){"use strict";var v=U_(),x=sa().extendFlat;G.exports={violinmode:x({},v.boxmode,{}),violingap:x({},v.boxgap,{}),violingroupgap:x({},v.boxgroupgap,{})}}}),IF=Xe({"src/traces/violin/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=j_(),E=MS();G.exports=function(t,r,o,a){function n(u,y){return v.coerce(t,r,E,u,y)}function i(u,y){return v.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"),c;Array.isArray(h)&&(c="manual"),n("spanmode",c);var m=n("line.color",(t.marker||{}).color||o),p=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",m),A=i("box.line.width",p),M=n("box.visible",!!(l||_||w||A));M||(r.box={visible:!1});var g=i("meanline.color",m),b=i("meanline.width",p),d=n("meanline.visible",!!(g||b));d||(r.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}}),RF=Xe({"src/traces/violin/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=ES(),S=V2();G.exports=function(e,t,r){function o(a,n){return v.coerce(e,t,x,a,n)}S._supply(e,t,r,o,"violin")}}}),h3=Xe({"src/traces/violin/helpers.js"(Z){"use strict";var G=sa(),v={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=v.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=G.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=Xe({"src/traces/violin/calc.js"(Z,G){"use strict";var v=sa(),x=Go(),S=$5(),E=h3(),e=Hs().BADNUM;G.exports=function(n,i){var s=S(n,i);if(s[0].t.empty)return s;for(var h=n._fullLayout,c=x.getFromId(n,i[i.orientation==="h"?"xaxis":"yaxis"]),m=1/0,p=-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,c,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],d=Math.ceil(b/(M/3)),u=b/d;if(!isFinite(u)||!isFinite(d))return v.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(d+1);for(var f=0;f<w.density.length;f++){var R=g[0]+f*u,L=y(R);w.density[f]={v:L,t:R},T=Math.max(T,L)}}l=Math.max(l,A.length),m=Math.min(m,g[0]),p=Math.max(p,g[1])}var z=x.findExtremes(c,[m,p],{padded:!0});if(i._extremes[c._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=v._(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,c=v.stdev(i,h-1,n.mean);return Math.max(t(h,c,n.q3-n.q1),s/100)}function o(a,n,i,s){var h=a.spanmode,c=a.span||[],m=[n.min,n.max],p=[n.min-2*s,n.max+2*s],T;function l(w){var A=c[w],M=i.type==="multicategory"?i.r2c(A):i.d2c(A,0,a[n.valLetter+"calendar"]);return M===e?p[w]:M}h==="soft"?T=p:h==="hard"?T=m:T=[l(0),l(1)];var _={type:"linear",range:T};return x.setConvert(_),_.cleanRange(),T}}}),zF=Xe({"src/traces/violin/cross_trace_calc.js"(Z,G){"use strict";var v=G2().setPositionOffset,x=["v","h"];G.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 c=t[h],m=c[0].t,p=c[0].trace;p.visible===!0&&p.type==="violin"&&!m.empty&&p.orientation===n&&p.xaxis===r._id&&p.yaxis===o._id&&s.push(h)}v("violin",E,s,i)}}}}),FF=Xe({"src/traces/violin/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=H2(),e=F5(),t=h3();G.exports=function(o,a,n,i){var s=o._context.staticPlot,h=o._fullLayout,c=a.xaxis,m=a.yaxis;function p(T,l){var _=e(T,{xaxis:c,yaxis:m,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=v.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"],d=a[w.posLetter+"axis"],u=A.side==="both",y=u||A.side==="positive",f=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=v.select(this),$=B.density,se=$.length,le=d.c2l(B.pos+M,!0),fe=d.l2p(le),V;if(A.width)V=w.maxKDE/g;else{var Y=h._violinScaleGroupStats[A.scalegroup];V=A.scalemode==="count"?Y.maxKDE/g*(Y.maxCount/B.pts.length):Y.maxKDE/g}var ee,q,oe,ae,j,Q,re;if(y){for(Q=new Array(se),ae=0;ae<se;ae++)re=Q[ae]={},re[w.posLetter]=le+$[ae].v/V,re[w.valLetter]=b.c2l($[ae].t,!0);ee=p(Q,A)}if(f){for(Q=new Array(se),j=0,ae=se-1;j<se;j++,ae--)re=Q[j]={},re[w.posLetter]=le-$[ae].v/V,re[w.valLetter]=b.c2l($[ae].t,!0);q=p(Q,A)}if(u)oe=ee+"L"+q.slice(1)+"Z";else{var ce=[fe,b.c2p($[0].t)],be=[fe,b.c2p($[se-1].t)];A.orientation==="h"&&(ce.reverse(),be.reverse()),y?oe="M"+ce+"L"+ee.slice(1)+"L"+be:oe="M"+be+"L"+q.slice(1)+"L"+ce}X.attr("d",oe),B.posCenterPx=fe,B.posDensityScale=V*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:d,val:b},A,{bPos:M,bdPos:N,bPosPxOffset:O}),E.plotBoxMean(l,{pos:d,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);v.select(this).attr("d",A.orientation==="h"?"M"+X+","+$[0]+"V"+$[1]:"M"+$[0]+","+X+"H"+$[1])}),E.plotPoints(l,{x:c,y:m},A,w)})}}}),OF=Xe({"src/traces/violin/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=Qp().stylePoints;G.exports=function(e){var t=v.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=v.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 c={"stroke-width":h+"px","stroke-dasharray":2*h+"px,"+h+"px"};a.selectAll("path.mean").style(c).call(x.stroke,s.color),a.selectAll("path.meanline").style(c).call(x.stroke,s.color),S(a,o,e)})}}}),BF=Xe({"src/traces/violin/hover.js"(Z,G){"use strict";var v=$n(),x=sa(),S=Go(),E=Q5(),e=h3();G.exports=function(r,o,a,n,i){i||(i={});var s=i.hoverLayer,h=r.cd,c=h[0].trace,m=c.hoveron,p=m.indexOf("violins")!==-1,T=m.indexOf("kde")!==-1,l=[],_,w;if(p||T){var A=E.hoverOnBoxes(r,o,a,n);if(T&&A.length>0){var M=r.xa,g=r.ya,b,d,u,y,f;c.orientation==="h"?(f=o,b="y",u=g,d="x",y=M):(f=a,b="x",u=M,d="y",y=g);var R=h[r.index];if(f>=R.span[0]&&f<=R.span[1]){var L=x.extendFlat({},r),z=y.c2p(f,!0),F=e.getKdeValue(R,c,f),N=e.getPositionOnKdePath(R,c,z),O=u._offset,P=u._length;L[b+"0"]=N[0],L[b+"1"]=N[1],L[d+"0"]=L[d+"1"]=z,L[d+"Label"]=d+": "+S.hoverLabelText(y,f,c[d+"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[d+"1"]=w[d+"2"]=y._offset+z}}p&&(l=l.concat(A))}m.indexOf("points")!==-1&&(_=E.hoverOnPoints(r,o,a));var $=s.selectAll(".violinline-"+c.uid).data(w?[0]:[]);return $.enter().append("line").classed("violinline-"+c.uid,!0).attr("stroke-width",1.5),$.exit().remove(),$.attr(w).call(v.stroke,r.color),n==="closest"?_?[_]:l:(_&&l.push(_),l)}}}),NF=Xe({"src/traces/violin/index.js"(Z,G){"use strict";G.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=Xe({"lib/violin.js"(Z,G){"use strict";G.exports=NF()}}),jF=Xe({"src/traces/funnel/constants.js"(Z,G){"use strict";G.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),kS=Xe({"src/traces/funnel/attributes.js"(Z,G){"use strict";var v=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=jF(),a=Qo().extendFlat,n=$n();G.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:E("x"),yhoverformat:E("y"),hovertext:v.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:v.text,textposition:v.textposition,insidetextanchor:a({},v.insidetextanchor,{dflt:"middle"}),textangle:a({},v.textangle,{dflt:0}),textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:a({},v.orientation,{}),offset:a({},v.offset,{arrayOk:!1}),width:a({},v.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:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder};function i(){var s=a({},v.marker);return delete s.pattern,delete s.cornerradius,s}}}),CS=Xe({"src/traces/funnel/layout_attributes.js"(Z,G){"use strict";G.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=Xe({"src/traces/funnel/defaults.js"(Z,G){"use strict";var v=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=kS(),r=$n();function o(i,s,h,c){function m(M,g){return v.coerce(i,s,t,M,g)}var p=E(i,s,c,m);if(!p){s.visible=!1;return}e(i,s,c,m),m("xhoverformat"),m("yhoverformat"),m("orientation",s.y&&!s.x?"v":"h"),m("offset"),m("width");var T=m("text");m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var l=m("textposition");S(i,s,c,m,l,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s.textposition!=="none"&&!s.texttemplate&&m("textinfo",v.isArrayOrTypedArray(T)?"text+value":"value");var _=m("marker.color",h);m("marker.line.color",r.defaultLine),m("marker.line.width");var w=m("connector.visible");if(w){m("connector.fillcolor",a(_));var A=m("connector.line.width");A&&(m("connector.line.color"),m("connector.line.dash"))}m("zorder")}function a(i){var s=v.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(s,.5*r.opacity(s))}function n(i,s){var h,c;function m(T){return v.coerce(c._input,c,t,T)}for(var p=0;p<i.length;p++)c=i[p],c.type==="funnel"&&(h=c._input,x(h,c,s,m,s.funnelmode))}G.exports={supplyDefaults:o,crossTraceDefaults:n}}}),qF=Xe({"src/traces/funnel/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=CS();G.exports=function(S,E,e){var t=!1;function r(n,i){return v.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=Xe({"src/traces/funnel/arrays_to_calcdata.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){for(var e=0;e<S.length;e++)S[e].i=e;v.mergeArray(E.text,S,"tx"),v.mergeArray(E.hovertext,S,"htx");var t=E.marker;if(t){v.mergeArray(t.opacity,S,"mo"),v.mergeArray(t.color,S,"mc");var r=t.line;r&&(v.mergeArray(r.color,S,"mlc"),v.mergeArrayCastPositive(r.width,S,"mlw"))}}}}),GF=Xe({"src/traces/funnel/calc.js"(Z,G){"use strict";var v=Go(),x=tv(),S=VF(),E=Od(),e=Hs().BADNUM;G.exports=function(o,a){var n=v.getFromId(o,a.xaxis||"x"),i=v.getFromId(o,a.yaxis||"y"),s,h,c,m,p,T,l,_;a.orientation==="h"?(s=n.makeCalcdata(a,"x"),c=i.makeCalcdata(a,"y"),m=x(a,i,"y",c),p=!!a.yperiodalignment,T="y"):(s=i.makeCalcdata(a,"y"),c=n.makeCalcdata(a,"x"),m=x(a,n,"x",c),p=!!a.xperiodalignment,T="x"),h=m.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,p&&(A[l].orig_p=c[l],A[l][T+"End"]=m.ends[l],A[l][T+"Start"]=m.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=Xe({"src/traces/funnel/cross_trace_calc.js"(Z,G){"use strict";var v=eg().setGroupPositions;G.exports=function(S,E){var e=S._fullLayout,t=S._fullData,r=S.calcdata,o=E.xaxis,a=E.yaxis,n=[],i=[],s=[],h,c;for(c=0;c<t.length;c++){var m=t[c],p=m.orientation==="h";m.visible===!0&&m.xaxis===o._id&&m.yaxis===a._id&&m.type==="funnel"&&(h=r[c],p?s.push(h):i.push(h),n.push(h))}var T={mode:e.funnelmode,norm:e.funnelnorm,gap:e.funnelgap,groupgap:e.funnelgroupgap};for(v(S,o,a,i,T),v(S,a,o,s,T),c=0;c<n.length;c++){h=n[c];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=Xe({"src/traces/funnel/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=Hs().BADNUM,e=tg(),t=Sp().clearMinTextSize;G.exports=function(i,s,h,c){var m=i._fullLayout;t("funnel",m),r(i,s,h,c),o(i,s,h,c),e.plot(i,s,h,c,{mode:m.funnelmode,norm:m.funnelmode,gap:m.funnelgap,groupgap:m.funnelgroupgap})};function r(n,i,s,h){var c=i.xaxis,m=i.yaxis;x.makeTraceGroups(h,s,"trace bars").each(function(p){var T=v.select(this),l=p[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 d=a(g,c,m,w),u=d[0],y=d[1],f="";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?f+="M"+u[0]+","+y[1]+"L"+u[2]+","+y[2]+"H"+u[3]+"L"+u[1]+","+y[1]+"Z":f+="M"+u[1]+","+y[1]+"L"+u[2]+","+y[3]+"V"+y[2]+"L"+u[1]+","+y[0]+"Z"),f===""&&(f="M0,0Z"),x.ensureSingle(v.select(this),"path").attr("d",f).call(S.setClipUrl,i.layerClipId,n)}})})}function o(n,i,s,h){var c=i.xaxis,m=i.yaxis;x.makeTraceGroups(h,s,"trace bars").each(function(p){var T=v.select(this),l=p[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 d=a(g,c,m,w),u=d[0],y=d[1],f="";u[3]!==void 0&&y[3]!==void 0&&(w?(f+="M"+u[0]+","+y[1]+"L"+u[2]+","+y[2],f+="M"+u[1]+","+y[1]+"L"+u[3]+","+y[2]):(f+="M"+u[1]+","+y[1]+"L"+u[2]+","+y[3],f+="M"+u[1]+","+y[0]+"L"+u[2]+","+y[2])),f===""&&(f="M0,0Z"),x.ensureSingle(v.select(this),"path").attr("d",f).call(S.setClipUrl,i.layerClipId,n)}})})}function a(n,i,s,h){var c=[],m=[],p=h?i:s,T=h?s:i;return c[0]=p.c2p(n.s0,!0),m[0]=T.c2p(n.p0,!0),c[1]=p.c2p(n.s1,!0),m[1]=T.c2p(n.p1,!0),c[2]=p.c2p(n.nextS0,!0),m[2]=T.c2p(n.nextP0,!0),c[3]=p.c2p(n.nextS1,!0),m[3]=T.c2p(n.nextP1,!0),h?[c,m]:[m,c]}}}),XF=Xe({"src/traces/funnel/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=$n(),E=Ym().DESELECTDIM,e=Nd(),t=Sp().resizeText,r=e.styleTextPoints;function o(a,n,i){var s=i||v.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 c=v.select(this),m=h[0].trace;c.selectAll(".point > path").each(function(p){if(!p.isBlank){var T=m.marker;v.select(this).call(S.fill,p.mc||T.color).call(S.stroke,p.mlc||T.line.color).call(x.dashLine,T.line.dash,p.mlw||T.line.width).style("opacity",m.selectedpoints&&!p.selected?E:1)}}),r(c,m,a),c.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),c.selectAll(".lines").each(function(){var p=m.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}G.exports={style:o}}}),ZF=Xe({"src/traces/funnel/hover.js"(Z,G){"use strict";var v=$n().opacity,x=f1().hoverOnBars,S=sa().formatPercent;G.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,c=h.orientation==="h",m=i.index,p=s[m],T=c?"x":"y";i[T+"LabelVal"]=p.s,i.percentInitial=p.begR,i.percentInitialLabel=S(p.begR,1),i.percentPrevious=p.difR,i.percentPreviousLabel=S(p.difR,1),i.percentTotal=p.sumR,i.percentTotalLabel=S(p.sumR,1);var l=p.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,p),[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(v(o))return o;if(v(a)&&n)return a}}}),YF=Xe({"src/traces/funnel/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/funnel/index.js"(Z,G){"use strict";G.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=Xe({"lib/funnel.js"(Z,G){"use strict";G.exports=KF()}}),$F=Xe({"src/traces/waterfall/constants.js"(Z,G){"use strict";G.exports={eventDataKeys:["initial","delta","final"]}}}),PS=Xe({"src/traces/waterfall/attributes.js"(Z,G){"use strict";var v=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=$F(),a=Qo().extendFlat,n=$n();function i(s){return{marker:{color:a({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}G.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:E("x"),yhoverformat:E("y"),hovertext:v.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:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.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:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=Xe({"src/traces/waterfall/layout_attributes.js"(Z,G){"use strict";G.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=Xe({"src/constants/delta.js"(Z,G){"use strict";G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=Xe({"src/traces/waterfall/defaults.js"(Z,G){"use strict";var v=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i="#4499FF";function s(m,p,T){m(p+".marker.color",T),m(p+".marker.line.color",r.defaultLine),m(p+".marker.line.width")}function h(m,p,T,l){function _(b,d){return v.coerce(m,p,t,b,d)}var w=E(m,p,l,_);if(!w){p.visible=!1;return}e(m,p,l,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",p.x&&!p.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");S(m,p,l,_,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),p.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 c(m,p){var T,l;function _(A){return v.coerce(l._input,l,t,A)}if(p.waterfallmode==="group")for(var w=0;w<m.length;w++)l=m[w],T=l._input,x(T,l,p,_,p.waterfallmode)}G.exports={supplyDefaults:h,crossTraceDefaults:c}}}),QF=Xe({"src/traces/waterfall/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=IS();G.exports=function(S,E,e){var t=!1;function r(n,i){return v.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=Xe({"src/traces/waterfall/calc.js"(Z,G){"use strict";var v=Go(),x=tv(),S=sa().mergeArray,E=Od(),e=Hs().BADNUM;function t(o){return o==="a"||o==="absolute"}function r(o){return o==="t"||o==="total"}G.exports=function(a,n){var i=v.getFromId(a,n.xaxis||"x"),s=v.getFromId(a,n.yaxis||"y"),h,c,m,p,T,l;n.orientation==="h"?(h=i.makeCalcdata(n,"x"),m=s.makeCalcdata(n,"y"),p=x(n,s,"y",m),T=!!n.yperiodalignment,l="y"):(h=s.makeCalcdata(n,"y"),m=i.makeCalcdata(n,"x"),p=x(n,i,"x",m),T=!!n.xperiodalignment,l="x"),c=p.vals;for(var _=Math.min(c.length,h.length),w=new Array(_),A=0,M,g=!1,b=0;b<_;b++){var d=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:c[b],s:d,rawS:d,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=m[b],w[b][l+"End"]=p.ends[b],w[b][l+"Start"]=p.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=Xe({"src/traces/waterfall/cross_trace_calc.js"(Z,G){"use strict";var v=eg().setGroupPositions;G.exports=function(S,E){var e=S._fullLayout,t=S._fullData,r=S.calcdata,o=E.xaxis,a=E.yaxis,n=[],i=[],s=[],h,c;for(c=0;c<t.length;c++){var m=t[c];m.visible===!0&&m.xaxis===o._id&&m.yaxis===a._id&&m.type==="waterfall"&&(h=r[c],m.orientation==="h"?s.push(h):i.push(h),n.push(h))}var p={mode:e.waterfallmode,norm:e.waterfallnorm,gap:e.waterfallgap,groupgap:e.waterfallgroupgap};for(v(S,o,a,i,p),v(S,a,o,s,p),c=0;c<n.length;c++){h=n[c];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=Xe({"src/traces/waterfall/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=Hs().BADNUM,e=tg(),t=Sp().clearMinTextSize;G.exports=function(n,i,s,h){var c=n._fullLayout;t("waterfall",c),e.plot(n,i,s,h,{mode:c.waterfallmode,norm:c.waterfallmode,gap:c.waterfallgap,groupgap:c.waterfallgroupgap}),r(n,i,s,h)};function r(a,n,i,s){var h=n.xaxis,c=n.yaxis;x.makeTraceGroups(s,i,"trace bars").each(function(m){var p=v.select(this),T=m[0].trace,l=x.ensureSingle(p,"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 d=o(g,h,c,_),u=d[0],y=d[1],f="";u[0]!==E&&y[0]!==E&&u[1]!==E&&y[1]!==E&&(w==="spanning"&&!g.isSum&&b>0&&(_?f+="M"+u[0]+","+y[1]+"V"+y[0]:f+="M"+u[1]+","+y[0]+"H"+u[0]),w!=="between"&&(g.isSum||b<M-1)&&(_?f+="M"+u[1]+","+y[0]+"V"+y[1]:f+="M"+u[0]+","+y[1]+"H"+u[1]),u[2]!==E&&y[2]!==E&&(_?f+="M"+u[1]+","+y[1]+"V"+y[2]:f+="M"+u[1]+","+y[1]+"H"+u[2])),f===""&&(f="M0,0Z"),x.ensureSingle(v.select(this),"path").attr("d",f).call(S.setClipUrl,n.layerClipId,a)}})})}function o(a,n,i,s){var h=[],c=[],m=s?n:i,p=s?i:n;return h[0]=m.c2p(a.s0,!0),c[0]=p.c2p(a.p0,!0),h[1]=m.c2p(a.s1,!0),c[1]=p.c2p(a.p1,!0),h[2]=m.c2p(a.nextS0,!0),c[2]=p.c2p(a.nextP0,!0),s?[h,c]:[c,h]}}}),aO=Xe({"src/traces/waterfall/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=$n(),E=Ym().DESELECTDIM,e=Nd(),t=Sp().resizeText,r=e.styleTextPoints;function o(a,n,i){var s=i||v.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 c=v.select(this),m=h[0].trace;c.selectAll(".point > path").each(function(p){if(!p.isBlank){var T=m[p.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(x.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!p.selected?E:1)}}),r(c,m,a),c.selectAll(".lines").each(function(){var p=m.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}G.exports={style:o}}}),iO=Xe({"src/traces/waterfall/hover.js"(Z,G){"use strict";var v=Go().hoverLabelText,x=$n().opacity,S=f1().hoverOnBars,E=d1(),e={increasing:E.INCREASING.SYMBOL,decreasing:E.DECREASING.SYMBOL};G.exports=function(o,a,n,i,s){var h=S(o,a,n,i,s);if(!h)return;var c=h.cd,m=c[0].trace,p=m.orientation==="h",T=p?"x":"y",l=p?o.xa:o.ya;function _(R){return v(l,R,m[T+"hoverformat"])}var w=h.index,A=c[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||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",y=b.split("+"),f=function(R){return u||y.indexOf(R)!==-1};A.isSum||(f("final")&&(p?!f("x"):!f("y"))&&d.push(h.finalLabel),f("delta")&&(M<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),f("initial")&&d.push("Initial: "+h.initialLabel))}return d.length&&(h.extraText=d.join("<br>")),h.color=t(m,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=Xe({"src/traces/waterfall/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/waterfall/index.js"(Z,G){"use strict";G.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=Xe({"lib/waterfall.js"(Z,G){"use strict";G.exports=oO()}}),v1=Xe({"src/traces/image/constants.js"(Z,G){"use strict";G.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.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(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var x=v.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(v){var x=v.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),DS=Xe({"src/traces/image/attributes.js"(Z,G){"use strict";var v=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;G.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({},v.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=Xe({"src/traces/image/defaults.js"(Z,G){"use strict";var v=sa(),x=DS(),S=v1(),E=Yv().IMAGE_URL_PREFIX;G.exports=function(t,r){function o(i,s){return v.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=Xe({"node_modules/inherits/inherits_browser.js"(Z,G){typeof Object.create=="function"?G.exports=function(x,S){S&&(x.super_=S,x.prototype=Object.create(S.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:G.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=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(Z,G){G.exports=Z0().EventEmitter}}),uO=Xe({"node_modules/base64-js/index.js"(Z){"use strict";Z.byteLength=r,Z.toByteArray=a,Z.fromByteArray=s;var G=[],v=[],x=typeof Uint8Array<"u"?Uint8Array:Array,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(E=0,e=S.length;E<e;++E)G[E]=S[E],v[S.charCodeAt(E)]=E;var E,e;v[45]=62,v[95]=63;function t(h){var c=h.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=c);var p=m===c?0:4-m%4;return[m,p]}function r(h){var c=t(h),m=c[0],p=c[1];return(m+p)*3/4-p}function o(h,c,m){return(c+m)*3/4-m}function a(h){var c,m=t(h),p=m[0],T=m[1],l=new x(o(h,p,T)),_=0,w=T>0?p-4:p,A;for(A=0;A<w;A+=4)c=v[h.charCodeAt(A)]<<18|v[h.charCodeAt(A+1)]<<12|v[h.charCodeAt(A+2)]<<6|v[h.charCodeAt(A+3)],l[_++]=c>>16&255,l[_++]=c>>8&255,l[_++]=c&255;return T===2&&(c=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[_++]=c&255),T===1&&(c=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[_++]=c>>8&255,l[_++]=c&255),l}function n(h){return G[h>>18&63]+G[h>>12&63]+G[h>>6&63]+G[h&63]}function i(h,c,m){for(var p,T=[],l=c;l<m;l+=3)p=(h[l]<<16&16711680)+(h[l+1]<<8&65280)+(h[l+2]&255),T.push(n(p));return T.join("")}function s(h){for(var c,m=h.length,p=m%3,T=[],l=16383,_=0,w=m-p;_<w;_+=l)T.push(i(h,_,_+l>w?w:_+l));return p===1?(c=h[m-1],T.push(G[c>>2]+G[c<<4&63]+"==")):p===2&&(c=(h[m-2]<<8)+h[m-1],T.push(G[c>>10]+G[c>>4&63]+G[c<<2&63]+"=")),T.join("")}}}),cO=Xe({"node_modules/ieee754/index.js"(Z){Z.read=function(G,v,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=G[v+i];for(i+=s,e=h&(1<<-n)-1,h>>=-n,n+=r;n>0;e=e*256+G[v+i],i+=s,n-=8);for(t=e&(1<<-n)-1,e>>=-n,n+=S;n>0;t=t*256+G[v+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(G,v,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,c=S?1:-1,m=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(r=isNaN(v)?1:0,t=n):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+i>=1?v+=s/o:v+=s*Math.pow(2,1-i),v*o>=2&&(t++,o/=2),t+i>=n?(r=0,t=n):t+i>=1?(r=(v*o-1)*Math.pow(2,E),t=t+i):(r=v*Math.pow(2,i-1)*Math.pow(2,E),t=0));E>=8;G[x+h]=r&255,h+=c,r/=256,E-=8);for(t=t<<E|r,a+=E;a>0;G[x+h]=t&255,h+=c,t/=256,a-=8);G[x+h-c]|=m*128}}}),rg=Xe({"node_modules/buffer/index.js"(Z){"use strict";var G=uO(),v=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 Me=new Uint8Array(1),ye={foo:function(){return 42}};return Object.setPrototypeOf(ye,Uint8Array.prototype),Object.setPrototypeOf(Me,ye),Me.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(Me){if(Me>S)throw new RangeError('The value "'+Me+'" is invalid for option "size"');let ye=new Uint8Array(Me);return Object.setPrototypeOf(ye,t.prototype),ye}function t(Me,ye,he){if(typeof Me=="number"){if(typeof ye=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(Me)}return r(Me,ye,he)}t.poolSize=8192;function r(Me,ye,he){if(typeof Me=="string")return i(Me,ye);if(ArrayBuffer.isView(Me))return h(Me);if(Me==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me);if(Ze(Me,ArrayBuffer)||Me&&Ze(Me.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ze(Me,SharedArrayBuffer)||Me&&Ze(Me.buffer,SharedArrayBuffer)))return c(Me,ye,he);if(typeof Me=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Oe=Me.valueOf&&Me.valueOf();if(Oe!=null&&Oe!==Me)return t.from(Oe,ye,he);let tt=m(Me);if(tt)return tt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Me[Symbol.toPrimitive]=="function")return t.from(Me[Symbol.toPrimitive]("string"),ye,he);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me)}t.from=function(Me,ye,he){return r(Me,ye,he)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(Me){if(typeof Me!="number")throw new TypeError('"size" argument must be of type number');if(Me<0)throw new RangeError('The value "'+Me+'" is invalid for option "size"')}function a(Me,ye,he){return o(Me),Me<=0?e(Me):ye!==void 0?typeof he=="string"?e(Me).fill(ye,he):e(Me).fill(ye):e(Me)}t.alloc=function(Me,ye,he){return a(Me,ye,he)};function n(Me){return o(Me),e(Me<0?0:p(Me)|0)}t.allocUnsafe=function(Me){return n(Me)},t.allocUnsafeSlow=function(Me){return n(Me)};function i(Me,ye){if((typeof ye!="string"||ye==="")&&(ye="utf8"),!t.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);let he=l(Me,ye)|0,Oe=e(he),tt=Oe.write(Me,ye);return tt!==he&&(Oe=Oe.slice(0,tt)),Oe}function s(Me){let ye=Me.length<0?0:p(Me.length)|0,he=e(ye);for(let Oe=0;Oe<ye;Oe+=1)he[Oe]=Me[Oe]&255;return he}function h(Me){if(Ze(Me,Uint8Array)){let ye=new Uint8Array(Me);return c(ye.buffer,ye.byteOffset,ye.byteLength)}return s(Me)}function c(Me,ye,he){if(ye<0||Me.byteLength<ye)throw new RangeError('"offset" is outside of buffer bounds');if(Me.byteLength<ye+(he||0))throw new RangeError('"length" is outside of buffer bounds');let Oe;return ye===void 0&&he===void 0?Oe=new Uint8Array(Me):he===void 0?Oe=new Uint8Array(Me,ye):Oe=new Uint8Array(Me,ye,he),Object.setPrototypeOf(Oe,t.prototype),Oe}function m(Me){if(t.isBuffer(Me)){let ye=p(Me.length)|0,he=e(ye);return he.length===0||Me.copy(he,0,0,ye),he}if(Me.length!==void 0)return typeof Me.length!="number"||at(Me.length)?e(0):s(Me);if(Me.type==="Buffer"&&Array.isArray(Me.data))return s(Me.data)}function p(Me){if(Me>=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return Me|0}function T(Me){return+Me!=Me&&(Me=0),t.alloc(+Me)}t.isBuffer=function(ye){return ye!=null&&ye._isBuffer===!0&&ye!==t.prototype},t.compare=function(ye,he){if(Ze(ye,Uint8Array)&&(ye=t.from(ye,ye.offset,ye.byteLength)),Ze(he,Uint8Array)&&(he=t.from(he,he.offset,he.byteLength)),!t.isBuffer(ye)||!t.isBuffer(he))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ye===he)return 0;let Oe=ye.length,tt=he.length;for(let ot=0,Qe=Math.min(Oe,tt);ot<Qe;++ot)if(ye[ot]!==he[ot]){Oe=ye[ot],tt=he[ot];break}return Oe<tt?-1:tt<Oe?1:0},t.isEncoding=function(ye){switch(String(ye).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(ye,he){if(!Array.isArray(ye))throw new TypeError('"list" argument must be an Array of Buffers');if(ye.length===0)return t.alloc(0);let Oe;if(he===void 0)for(he=0,Oe=0;Oe<ye.length;++Oe)he+=ye[Oe].length;let tt=t.allocUnsafe(he),ot=0;for(Oe=0;Oe<ye.length;++Oe){let Qe=ye[Oe];if(Ze(Qe,Uint8Array))ot+Qe.length>tt.length?(t.isBuffer(Qe)||(Qe=t.from(Qe)),Qe.copy(tt,ot)):Uint8Array.prototype.set.call(tt,Qe,ot);else if(t.isBuffer(Qe))Qe.copy(tt,ot);else throw new TypeError('"list" argument must be an Array of Buffers');ot+=Qe.length}return tt};function l(Me,ye){if(t.isBuffer(Me))return Me.length;if(ArrayBuffer.isView(Me)||Ze(Me,ArrayBuffer))return Me.byteLength;if(typeof Me!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Me);let he=Me.length,Oe=arguments.length>2&&arguments[2]===!0;if(!Oe&&he===0)return 0;let tt=!1;for(;;)switch(ye){case"ascii":case"latin1":case"binary":return he;case"utf8":case"utf-8":return ce(Me).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he*2;case"hex":return he>>>1;case"base64":return De(Me).length;default:if(tt)return Oe?-1:ce(Me).length;ye=(""+ye).toLowerCase(),tt=!0}}t.byteLength=l;function _(Me,ye,he){let Oe=!1;if((ye===void 0||ye<0)&&(ye=0),ye>this.length||((he===void 0||he>this.length)&&(he=this.length),he<=0)||(he>>>=0,ye>>>=0,he<=ye))return"";for(Me||(Me="utf8");;)switch(Me){case"hex":return O(this,ye,he);case"utf8":case"utf-8":return R(this,ye,he);case"ascii":return F(this,ye,he);case"latin1":case"binary":return N(this,ye,he);case"base64":return f(this,ye,he);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ye,he);default:if(Oe)throw new TypeError("Unknown encoding: "+Me);Me=(Me+"").toLowerCase(),Oe=!0}}t.prototype._isBuffer=!0;function w(Me,ye,he){let Oe=Me[ye];Me[ye]=Me[he],Me[he]=Oe}t.prototype.swap16=function(){let ye=this.length;if(ye%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let he=0;he<ye;he+=2)w(this,he,he+1);return this},t.prototype.swap32=function(){let ye=this.length;if(ye%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let he=0;he<ye;he+=4)w(this,he,he+3),w(this,he+1,he+2);return this},t.prototype.swap64=function(){let ye=this.length;if(ye%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let he=0;he<ye;he+=8)w(this,he,he+7),w(this,he+1,he+6),w(this,he+2,he+5),w(this,he+3,he+4);return this},t.prototype.toString=function(){let ye=this.length;return ye===0?"":arguments.length===0?R(this,0,ye):_.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(ye){if(!t.isBuffer(ye))throw new TypeError("Argument must be a Buffer");return this===ye?!0:t.compare(this,ye)===0},t.prototype.inspect=function(){let ye="",he=Z.INSPECT_MAX_BYTES;return ye=this.toString("hex",0,he).replace(/(.{2})/g,"$1 ").trim(),this.length>he&&(ye+=" ... "),"<Buffer "+ye+">"},x&&(t.prototype[x]=t.prototype.inspect),t.prototype.compare=function(ye,he,Oe,tt,ot){if(Ze(ye,Uint8Array)&&(ye=t.from(ye,ye.offset,ye.byteLength)),!t.isBuffer(ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ye);if(he===void 0&&(he=0),Oe===void 0&&(Oe=ye?ye.length:0),tt===void 0&&(tt=0),ot===void 0&&(ot=this.length),he<0||Oe>ye.length||tt<0||ot>this.length)throw new RangeError("out of range index");if(tt>=ot&&he>=Oe)return 0;if(tt>=ot)return-1;if(he>=Oe)return 1;if(he>>>=0,Oe>>>=0,tt>>>=0,ot>>>=0,this===ye)return 0;let Qe=ot-tt,Pt=Oe-he,It=Math.min(Qe,Pt),qt=this.slice(tt,ot),Wt=ye.slice(he,Oe);for(let kr=0;kr<It;++kr)if(qt[kr]!==Wt[kr]){Qe=qt[kr],Pt=Wt[kr];break}return Qe<Pt?-1:Pt<Qe?1:0};function A(Me,ye,he,Oe,tt){if(Me.length===0)return-1;if(typeof he=="string"?(Oe=he,he=0):he>2147483647?he=2147483647:he<-2147483648&&(he=-2147483648),he=+he,at(he)&&(he=tt?0:Me.length-1),he<0&&(he=Me.length+he),he>=Me.length){if(tt)return-1;he=Me.length-1}else if(he<0)if(tt)he=0;else return-1;if(typeof ye=="string"&&(ye=t.from(ye,Oe)),t.isBuffer(ye))return ye.length===0?-1:M(Me,ye,he,Oe,tt);if(typeof ye=="number")return ye=ye&255,typeof Uint8Array.prototype.indexOf=="function"?tt?Uint8Array.prototype.indexOf.call(Me,ye,he):Uint8Array.prototype.lastIndexOf.call(Me,ye,he):M(Me,[ye],he,Oe,tt);throw new TypeError("val must be string, number or Buffer")}function M(Me,ye,he,Oe,tt){let ot=1,Qe=Me.length,Pt=ye.length;if(Oe!==void 0&&(Oe=String(Oe).toLowerCase(),Oe==="ucs2"||Oe==="ucs-2"||Oe==="utf16le"||Oe==="utf-16le")){if(Me.length<2||ye.length<2)return-1;ot=2,Qe/=2,Pt/=2,he/=2}function It(Wt,kr){return ot===1?Wt[kr]:Wt.readUInt16BE(kr*ot)}let qt;if(tt){let Wt=-1;for(qt=he;qt<Qe;qt++)if(It(Me,qt)===It(ye,Wt===-1?0:qt-Wt)){if(Wt===-1&&(Wt=qt),qt-Wt+1===Pt)return Wt*ot}else Wt!==-1&&(qt-=qt-Wt),Wt=-1}else for(he+Pt>Qe&&(he=Qe-Pt),qt=he;qt>=0;qt--){let Wt=!0;for(let kr=0;kr<Pt;kr++)if(It(Me,qt+kr)!==It(ye,kr)){Wt=!1;break}if(Wt)return qt}return-1}t.prototype.includes=function(ye,he,Oe){return this.indexOf(ye,he,Oe)!==-1},t.prototype.indexOf=function(ye,he,Oe){return A(this,ye,he,Oe,!0)},t.prototype.lastIndexOf=function(ye,he,Oe){return A(this,ye,he,Oe,!1)};function g(Me,ye,he,Oe){he=Number(he)||0;let tt=Me.length-he;Oe?(Oe=Number(Oe),Oe>tt&&(Oe=tt)):Oe=tt;let ot=ye.length;Oe>ot/2&&(Oe=ot/2);let Qe;for(Qe=0;Qe<Oe;++Qe){let Pt=parseInt(ye.substr(Qe*2,2),16);if(at(Pt))return Qe;Me[he+Qe]=Pt}return Qe}function b(Me,ye,he,Oe){return ze(ce(ye,Me.length-he),Me,he,Oe)}function d(Me,ye,he,Oe){return ze(be(ye),Me,he,Oe)}function u(Me,ye,he,Oe){return ze(De(ye),Me,he,Oe)}function y(Me,ye,he,Oe){return ze(Ae(ye,Me.length-he),Me,he,Oe)}t.prototype.write=function(ye,he,Oe,tt){if(he===void 0)tt="utf8",Oe=this.length,he=0;else if(Oe===void 0&&typeof he=="string")tt=he,Oe=this.length,he=0;else if(isFinite(he))he=he>>>0,isFinite(Oe)?(Oe=Oe>>>0,tt===void 0&&(tt="utf8")):(tt=Oe,Oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ot=this.length-he;if((Oe===void 0||Oe>ot)&&(Oe=ot),ye.length>0&&(Oe<0||he<0)||he>this.length)throw new RangeError("Attempt to write outside buffer bounds");tt||(tt="utf8");let Qe=!1;for(;;)switch(tt){case"hex":return g(this,ye,he,Oe);case"utf8":case"utf-8":return b(this,ye,he,Oe);case"ascii":case"latin1":case"binary":return d(this,ye,he,Oe);case"base64":return u(this,ye,he,Oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,ye,he,Oe);default:if(Qe)throw new TypeError("Unknown encoding: "+tt);tt=(""+tt).toLowerCase(),Qe=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(Me,ye,he){return ye===0&&he===Me.length?G.fromByteArray(Me):G.fromByteArray(Me.slice(ye,he))}function R(Me,ye,he){he=Math.min(Me.length,he);let Oe=[],tt=ye;for(;tt<he;){let ot=Me[tt],Qe=null,Pt=ot>239?4:ot>223?3:ot>191?2:1;if(tt+Pt<=he){let It,qt,Wt,kr;switch(Pt){case 1:ot<128&&(Qe=ot);break;case 2:It=Me[tt+1],(It&192)===128&&(kr=(ot&31)<<6|It&63,kr>127&&(Qe=kr));break;case 3:It=Me[tt+1],qt=Me[tt+2],(It&192)===128&&(qt&192)===128&&(kr=(ot&15)<<12|(It&63)<<6|qt&63,kr>2047&&(kr<55296||kr>57343)&&(Qe=kr));break;case 4:It=Me[tt+1],qt=Me[tt+2],Wt=Me[tt+3],(It&192)===128&&(qt&192)===128&&(Wt&192)===128&&(kr=(ot&15)<<18|(It&63)<<12|(qt&63)<<6|Wt&63,kr>65535&&kr<1114112&&(Qe=kr))}}Qe===null?(Qe=65533,Pt=1):Qe>65535&&(Qe-=65536,Oe.push(Qe>>>10&1023|55296),Qe=56320|Qe&1023),Oe.push(Qe),tt+=Pt}return z(Oe)}var L=4096;function z(Me){let ye=Me.length;if(ye<=L)return String.fromCharCode.apply(String,Me);let he="",Oe=0;for(;Oe<ye;)he+=String.fromCharCode.apply(String,Me.slice(Oe,Oe+=L));return he}function F(Me,ye,he){let Oe="";he=Math.min(Me.length,he);for(let tt=ye;tt<he;++tt)Oe+=String.fromCharCode(Me[tt]&127);return Oe}function N(Me,ye,he){let Oe="";he=Math.min(Me.length,he);for(let tt=ye;tt<he;++tt)Oe+=String.fromCharCode(Me[tt]);return Oe}function O(Me,ye,he){let Oe=Me.length;(!ye||ye<0)&&(ye=0),(!he||he<0||he>Oe)&&(he=Oe);let tt="";for(let ot=ye;ot<he;++ot)tt+=nt[Me[ot]];return tt}function P(Me,ye,he){let Oe=Me.slice(ye,he),tt="";for(let ot=0;ot<Oe.length-1;ot+=2)tt+=String.fromCharCode(Oe[ot]+Oe[ot+1]*256);return tt}t.prototype.slice=function(ye,he){let Oe=this.length;ye=~~ye,he=he===void 0?Oe:~~he,ye<0?(ye+=Oe,ye<0&&(ye=0)):ye>Oe&&(ye=Oe),he<0?(he+=Oe,he<0&&(he=0)):he>Oe&&(he=Oe),he<ye&&(he=ye);let tt=this.subarray(ye,he);return Object.setPrototypeOf(tt,t.prototype),tt};function U(Me,ye,he){if(Me%1!==0||Me<0)throw new RangeError("offset is not uint");if(Me+ye>he)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye],ot=1,Qe=0;for(;++Qe<he&&(ot*=256);)tt+=this[ye+Qe]*ot;return tt},t.prototype.readUintBE=t.prototype.readUIntBE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye+--he],ot=1;for(;he>0&&(ot*=256);)tt+=this[ye+--he]*ot;return tt},t.prototype.readUint8=t.prototype.readUInt8=function(ye,he){return ye=ye>>>0,he||U(ye,1,this.length),this[ye]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(ye,he){return ye=ye>>>0,he||U(ye,2,this.length),this[ye]|this[ye+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(ye,he){return ye=ye>>>0,he||U(ye,2,this.length),this[ye]<<8|this[ye+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),(this[ye]|this[ye+1]<<8|this[ye+2]<<16)+this[ye+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]*16777216+(this[ye+1]<<16|this[ye+2]<<8|this[ye+3])},t.prototype.readBigUInt64LE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=he+this[++ye]*2**8+this[++ye]*2**16+this[++ye]*2**24,ot=this[++ye]+this[++ye]*2**8+this[++ye]*2**16+Oe*2**24;return BigInt(tt)+(BigInt(ot)<<BigInt(32))}),t.prototype.readBigUInt64BE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=he*2**24+this[++ye]*2**16+this[++ye]*2**8+this[++ye],ot=this[++ye]*2**24+this[++ye]*2**16+this[++ye]*2**8+Oe;return(BigInt(tt)<<BigInt(32))+BigInt(ot)}),t.prototype.readIntLE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye],ot=1,Qe=0;for(;++Qe<he&&(ot*=256);)tt+=this[ye+Qe]*ot;return ot*=128,tt>=ot&&(tt-=Math.pow(2,8*he)),tt},t.prototype.readIntBE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=he,ot=1,Qe=this[ye+--tt];for(;tt>0&&(ot*=256);)Qe+=this[ye+--tt]*ot;return ot*=128,Qe>=ot&&(Qe-=Math.pow(2,8*he)),Qe},t.prototype.readInt8=function(ye,he){return ye=ye>>>0,he||U(ye,1,this.length),this[ye]&128?(255-this[ye]+1)*-1:this[ye]},t.prototype.readInt16LE=function(ye,he){ye=ye>>>0,he||U(ye,2,this.length);let Oe=this[ye]|this[ye+1]<<8;return Oe&32768?Oe|4294901760:Oe},t.prototype.readInt16BE=function(ye,he){ye=ye>>>0,he||U(ye,2,this.length);let Oe=this[ye+1]|this[ye]<<8;return Oe&32768?Oe|4294901760:Oe},t.prototype.readInt32LE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]|this[ye+1]<<8|this[ye+2]<<16|this[ye+3]<<24},t.prototype.readInt32BE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]<<24|this[ye+1]<<16|this[ye+2]<<8|this[ye+3]},t.prototype.readBigInt64LE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=this[ye+4]+this[ye+5]*2**8+this[ye+6]*2**16+(Oe<<24);return(BigInt(tt)<<BigInt(32))+BigInt(he+this[++ye]*2**8+this[++ye]*2**16+this[++ye]*2**24)}),t.prototype.readBigInt64BE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=(he<<24)+this[++ye]*2**16+this[++ye]*2**8+this[++ye];return(BigInt(tt)<<BigInt(32))+BigInt(this[++ye]*2**24+this[++ye]*2**16+this[++ye]*2**8+Oe)}),t.prototype.readFloatLE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),v.read(this,ye,!0,23,4)},t.prototype.readFloatBE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),v.read(this,ye,!1,23,4)},t.prototype.readDoubleLE=function(ye,he){return ye=ye>>>0,he||U(ye,8,this.length),v.read(this,ye,!0,52,8)},t.prototype.readDoubleBE=function(ye,he){return ye=ye>>>0,he||U(ye,8,this.length),v.read(this,ye,!1,52,8)};function B(Me,ye,he,Oe,tt,ot){if(!t.isBuffer(Me))throw new TypeError('"buffer" argument must be a Buffer instance');if(ye>tt||ye<ot)throw new RangeError('"value" argument is out of bounds');if(he+Oe>Me.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,Oe=Oe>>>0,!tt){let Pt=Math.pow(2,8*Oe)-1;B(this,ye,he,Oe,Pt,0)}let ot=1,Qe=0;for(this[he]=ye&255;++Qe<Oe&&(ot*=256);)this[he+Qe]=ye/ot&255;return he+Oe},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,Oe=Oe>>>0,!tt){let Pt=Math.pow(2,8*Oe)-1;B(this,ye,he,Oe,Pt,0)}let ot=Oe-1,Qe=1;for(this[he+ot]=ye&255;--ot>=0&&(Qe*=256);)this[he+ot]=ye/Qe&255;return he+Oe},t.prototype.writeUint8=t.prototype.writeUInt8=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,1,255,0),this[he]=ye&255,he+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,65535,0),this[he]=ye&255,this[he+1]=ye>>>8,he+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,65535,0),this[he]=ye>>>8,this[he+1]=ye&255,he+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,4294967295,0),this[he+3]=ye>>>24,this[he+2]=ye>>>16,this[he+1]=ye>>>8,this[he]=ye&255,he+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,4294967295,0),this[he]=ye>>>24,this[he+1]=ye>>>16,this[he+2]=ye>>>8,this[he+3]=ye&255,he+4};function X(Me,ye,he,Oe,tt){oe(ye,Oe,tt,Me,he,7);let ot=Number(ye&BigInt(4294967295));Me[he++]=ot,ot=ot>>8,Me[he++]=ot,ot=ot>>8,Me[he++]=ot,ot=ot>>8,Me[he++]=ot;let Qe=Number(ye>>BigInt(32)&BigInt(4294967295));return Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,he}function $(Me,ye,he,Oe,tt){oe(ye,Oe,tt,Me,he,7);let ot=Number(ye&BigInt(4294967295));Me[he+7]=ot,ot=ot>>8,Me[he+6]=ot,ot=ot>>8,Me[he+5]=ot,ot=ot>>8,Me[he+4]=ot;let Qe=Number(ye>>BigInt(32)&BigInt(4294967295));return Me[he+3]=Qe,Qe=Qe>>8,Me[he+2]=Qe,Qe=Qe>>8,Me[he+1]=Qe,Qe=Qe>>8,Me[he]=Qe,he+8}t.prototype.writeBigUInt64LE=rt(function(ye,he=0){return X(this,ye,he,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=rt(function(ye,he=0){return $(this,ye,he,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,!tt){let It=Math.pow(2,8*Oe-1);B(this,ye,he,Oe,It-1,-It)}let ot=0,Qe=1,Pt=0;for(this[he]=ye&255;++ot<Oe&&(Qe*=256);)ye<0&&Pt===0&&this[he+ot-1]!==0&&(Pt=1),this[he+ot]=(ye/Qe>>0)-Pt&255;return he+Oe},t.prototype.writeIntBE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,!tt){let It=Math.pow(2,8*Oe-1);B(this,ye,he,Oe,It-1,-It)}let ot=Oe-1,Qe=1,Pt=0;for(this[he+ot]=ye&255;--ot>=0&&(Qe*=256);)ye<0&&Pt===0&&this[he+ot+1]!==0&&(Pt=1),this[he+ot]=(ye/Qe>>0)-Pt&255;return he+Oe},t.prototype.writeInt8=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,1,127,-128),ye<0&&(ye=255+ye+1),this[he]=ye&255,he+1},t.prototype.writeInt16LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,32767,-32768),this[he]=ye&255,this[he+1]=ye>>>8,he+2},t.prototype.writeInt16BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,32767,-32768),this[he]=ye>>>8,this[he+1]=ye&255,he+2},t.prototype.writeInt32LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,2147483647,-2147483648),this[he]=ye&255,this[he+1]=ye>>>8,this[he+2]=ye>>>16,this[he+3]=ye>>>24,he+4},t.prototype.writeInt32BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,2147483647,-2147483648),ye<0&&(ye=4294967295+ye+1),this[he]=ye>>>24,this[he+1]=ye>>>16,this[he+2]=ye>>>8,this[he+3]=ye&255,he+4},t.prototype.writeBigInt64LE=rt(function(ye,he=0){return X(this,ye,he,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=rt(function(ye,he=0){return $(this,ye,he,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function se(Me,ye,he,Oe,tt,ot){if(he+Oe>Me.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("Index out of range")}function le(Me,ye,he,Oe,tt){return ye=+ye,he=he>>>0,tt||se(Me,ye,he,4,34028234663852886e22,-34028234663852886e22),v.write(Me,ye,he,Oe,23,4),he+4}t.prototype.writeFloatLE=function(ye,he,Oe){return le(this,ye,he,!0,Oe)},t.prototype.writeFloatBE=function(ye,he,Oe){return le(this,ye,he,!1,Oe)};function fe(Me,ye,he,Oe,tt){return ye=+ye,he=he>>>0,tt||se(Me,ye,he,8,17976931348623157e292,-17976931348623157e292),v.write(Me,ye,he,Oe,52,8),he+8}t.prototype.writeDoubleLE=function(ye,he,Oe){return fe(this,ye,he,!0,Oe)},t.prototype.writeDoubleBE=function(ye,he,Oe){return fe(this,ye,he,!1,Oe)},t.prototype.copy=function(ye,he,Oe,tt){if(!t.isBuffer(ye))throw new TypeError("argument should be a Buffer");if(Oe||(Oe=0),!tt&&tt!==0&&(tt=this.length),he>=ye.length&&(he=ye.length),he||(he=0),tt>0&&tt<Oe&&(tt=Oe),tt===Oe||ye.length===0||this.length===0)return 0;if(he<0)throw new RangeError("targetStart out of bounds");if(Oe<0||Oe>=this.length)throw new RangeError("Index out of range");if(tt<0)throw new RangeError("sourceEnd out of bounds");tt>this.length&&(tt=this.length),ye.length-he<tt-Oe&&(tt=ye.length-he+Oe);let ot=tt-Oe;return this===ye&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(he,Oe,tt):Uint8Array.prototype.set.call(ye,this.subarray(Oe,tt),he),ot},t.prototype.fill=function(ye,he,Oe,tt){if(typeof ye=="string"){if(typeof he=="string"?(tt=he,he=0,Oe=this.length):typeof Oe=="string"&&(tt=Oe,Oe=this.length),tt!==void 0&&typeof tt!="string")throw new TypeError("encoding must be a string");if(typeof tt=="string"&&!t.isEncoding(tt))throw new TypeError("Unknown encoding: "+tt);if(ye.length===1){let Qe=ye.charCodeAt(0);(tt==="utf8"&&Qe<128||tt==="latin1")&&(ye=Qe)}}else typeof ye=="number"?ye=ye&255:typeof ye=="boolean"&&(ye=Number(ye));if(he<0||this.length<he||this.length<Oe)throw new RangeError("Out of range index");if(Oe<=he)return this;he=he>>>0,Oe=Oe===void 0?this.length:Oe>>>0,ye||(ye=0);let ot;if(typeof ye=="number")for(ot=he;ot<Oe;++ot)this[ot]=ye;else{let Qe=t.isBuffer(ye)?ye:t.from(ye,tt),Pt=Qe.length;if(Pt===0)throw new TypeError('The value "'+ye+'" is invalid for argument "value"');for(ot=0;ot<Oe-he;++ot)this[ot+he]=Qe[ot%Pt]}return this};var V={};function Y(Me,ye,he){V[Me]=class extends he{constructor(){super(),Object.defineProperty(this,"message",{value:ye.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Me}]`,this.stack,delete this.name}get code(){return Me}set code(tt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:tt,writable:!0})}toString(){return`${this.name} [${Me}]: ${this.message}`}}}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(Me){return Me?`${Me} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(Me,ye){return`The "${Me}" argument must be of type number. Received type ${typeof ye}`},TypeError),Y("ERR_OUT_OF_RANGE",function(Me,ye,he){let Oe=`The value of "${Me}" is out of range.`,tt=he;return Number.isInteger(he)&&Math.abs(he)>2**32?tt=ee(String(he)):typeof he=="bigint"&&(tt=String(he),(he>BigInt(2)**BigInt(32)||he<-(BigInt(2)**BigInt(32)))&&(tt=ee(tt)),tt+="n"),Oe+=` It must be ${ye}. Received ${tt}`,Oe},RangeError);function ee(Me){let ye="",he=Me.length,Oe=Me[0]==="-"?1:0;for(;he>=Oe+4;he-=3)ye=`_${Me.slice(he-3,he)}${ye}`;return`${Me.slice(0,he)}${ye}`}function q(Me,ye,he){ae(ye,"offset"),(Me[ye]===void 0||Me[ye+he]===void 0)&&j(ye,Me.length-(he+1))}function oe(Me,ye,he,Oe,tt,ot){if(Me>he||Me<ye){let Qe=typeof ye=="bigint"?"n":"",Pt;throw ot>3?ye===0||ye===BigInt(0)?Pt=`>= 0${Qe} and < 2${Qe} ** ${(ot+1)*8}${Qe}`:Pt=`>= -(2${Qe} ** ${(ot+1)*8-1}${Qe}) and < 2 ** ${(ot+1)*8-1}${Qe}`:Pt=`>= ${ye}${Qe} and <= ${he}${Qe}`,new V.ERR_OUT_OF_RANGE("value",Pt,Me)}q(Oe,tt,ot)}function ae(Me,ye){if(typeof Me!="number")throw new V.ERR_INVALID_ARG_TYPE(ye,"number",Me)}function j(Me,ye,he){throw Math.floor(Me)!==Me?(ae(Me,he),new V.ERR_OUT_OF_RANGE(he||"offset","an integer",Me)):ye<0?new V.ERR_BUFFER_OUT_OF_BOUNDS:new V.ERR_OUT_OF_RANGE(he||"offset",`>= ${he?1:0} and <= ${ye}`,Me)}var Q=/[^+/0-9A-Za-z-_]/g;function re(Me){if(Me=Me.split("=")[0],Me=Me.trim().replace(Q,""),Me.length<2)return"";for(;Me.length%4!==0;)Me=Me+"=";return Me}function ce(Me,ye){ye=ye||1/0;let he,Oe=Me.length,tt=null,ot=[];for(let Qe=0;Qe<Oe;++Qe){if(he=Me.charCodeAt(Qe),he>55295&&he<57344){if(!tt){if(he>56319){(ye-=3)>-1&&ot.push(239,191,189);continue}else if(Qe+1===Oe){(ye-=3)>-1&&ot.push(239,191,189);continue}tt=he;continue}if(he<56320){(ye-=3)>-1&&ot.push(239,191,189),tt=he;continue}he=(tt-55296<<10|he-56320)+65536}else tt&&(ye-=3)>-1&&ot.push(239,191,189);if(tt=null,he<128){if((ye-=1)<0)break;ot.push(he)}else if(he<2048){if((ye-=2)<0)break;ot.push(he>>6|192,he&63|128)}else if(he<65536){if((ye-=3)<0)break;ot.push(he>>12|224,he>>6&63|128,he&63|128)}else if(he<1114112){if((ye-=4)<0)break;ot.push(he>>18|240,he>>12&63|128,he>>6&63|128,he&63|128)}else throw new Error("Invalid code point")}return ot}function be(Me){let ye=[];for(let he=0;he<Me.length;++he)ye.push(Me.charCodeAt(he)&255);return ye}function Ae(Me,ye){let he,Oe,tt,ot=[];for(let Qe=0;Qe<Me.length&&!((ye-=2)<0);++Qe)he=Me.charCodeAt(Qe),Oe=he>>8,tt=he%256,ot.push(tt),ot.push(Oe);return ot}function De(Me){return G.toByteArray(re(Me))}function ze(Me,ye,he,Oe){let tt;for(tt=0;tt<Oe&&!(tt+he>=ye.length||tt>=Me.length);++tt)ye[tt+he]=Me[tt];return tt}function Ze(Me,ye){return Me instanceof ye||Me!=null&&Me.constructor!=null&&Me.constructor.name!=null&&Me.constructor.name===ye.name}function at(Me){return Me!==Me}var nt=function(){let Me="0123456789abcdef",ye=new Array(256);for(let he=0;he<16;++he){let Oe=he*16;for(let tt=0;tt<16;++tt)ye[Oe+tt]=Me[he]+Me[tt]}return ye}();function rt(Me){return typeof BigInt>"u"?st:Me}function st(){throw new Error("BigInt not supported")}}}),p3=Xe({"node_modules/has-symbols/shams.js"(Z,G){"use strict";G.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_=Xe({"node_modules/has-tostringtag/shams.js"(Z,G){"use strict";var v=p3();G.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=Xe({"node_modules/es-object-atoms/index.js"(Z,G){"use strict";G.exports=Object}}),fO=Xe({"node_modules/es-errors/index.js"(Z,G){"use strict";G.exports=Error}}),hO=Xe({"node_modules/es-errors/eval.js"(Z,G){"use strict";G.exports=EvalError}}),pO=Xe({"node_modules/es-errors/range.js"(Z,G){"use strict";G.exports=RangeError}}),dO=Xe({"node_modules/es-errors/ref.js"(Z,G){"use strict";G.exports=ReferenceError}}),OS=Xe({"node_modules/es-errors/syntax.js"(Z,G){"use strict";G.exports=SyntaxError}}),m1=Xe({"node_modules/es-errors/type.js"(Z,G){"use strict";G.exports=TypeError}}),vO=Xe({"node_modules/es-errors/uri.js"(Z,G){"use strict";G.exports=URIError}}),mO=Xe({"node_modules/math-intrinsics/abs.js"(Z,G){"use strict";G.exports=Math.abs}}),gO=Xe({"node_modules/math-intrinsics/floor.js"(Z,G){"use strict";G.exports=Math.floor}}),yO=Xe({"node_modules/math-intrinsics/max.js"(Z,G){"use strict";G.exports=Math.max}}),_O=Xe({"node_modules/math-intrinsics/min.js"(Z,G){"use strict";G.exports=Math.min}}),xO=Xe({"node_modules/math-intrinsics/pow.js"(Z,G){"use strict";G.exports=Math.pow}}),bO=Xe({"node_modules/math-intrinsics/round.js"(Z,G){"use strict";G.exports=Math.round}}),wO=Xe({"node_modules/math-intrinsics/isNaN.js"(Z,G){"use strict";G.exports=Number.isNaN||function(x){return x!==x}}}),TO=Xe({"node_modules/math-intrinsics/sign.js"(Z,G){"use strict";var v=wO();G.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),AO=Xe({"node_modules/gopd/gOPD.js"(Z,G){"use strict";G.exports=Object.getOwnPropertyDescriptor}}),ag=Xe({"node_modules/gopd/index.js"(Z,G){"use strict";var v=AO();if(v)try{v([],"length")}catch{v=null}G.exports=v}}),X_=Xe({"node_modules/es-define-property/index.js"(Z,G){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}G.exports=v}}),SO=Xe({"node_modules/has-symbols/index.js"(Z,G){"use strict";var v=typeof Symbol<"u"&&Symbol,x=p3();G.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),BS=Xe({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,G){"use strict";G.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=Xe({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,G){"use strict";var v=FS();G.exports=v.getPrototypeOf||null}}),MO=Xe({"node_modules/function-bind/implementation.js"(Z,G){"use strict";var v="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};G.exports=function(a){var n=this;if(typeof n!="function"||x.apply(n)!==E)throw new TypeError(v+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))},c=S(0,n.length-i.length),m=[],p=0;p<c;p++)m[p]="$"+p;if(s=Function("binder","return function ("+r(m,",")+"){ 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=Xe({"node_modules/function-bind/index.js"(Z,G){"use strict";var v=MO();G.exports=Function.prototype.bind||v}}),d3=Xe({"node_modules/call-bind-apply-helpers/functionCall.js"(Z,G){"use strict";G.exports=Function.prototype.call}}),US=Xe({"node_modules/call-bind-apply-helpers/functionApply.js"(Z,G){"use strict";G.exports=Function.prototype.apply}}),EO=Xe({"node_modules/call-bind-apply-helpers/reflectApply.js"(Z,G){"use strict";G.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),kO=Xe({"node_modules/call-bind-apply-helpers/actualApply.js"(Z,G){"use strict";var v=g1(),x=US(),S=d3(),E=EO();G.exports=E||v.call(S,x)}}),CO=Xe({"node_modules/call-bind-apply-helpers/index.js"(Z,G){"use strict";var v=g1(),x=m1(),S=d3(),E=kO();G.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new x("a function is required");return E(v,S,t)}}}),LO=Xe({"node_modules/dunder-proto/get.js"(Z,G){"use strict";var v=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;G.exports=E&&typeof E.get=="function"?v([E.get]):typeof t=="function"?function(o){return t(o==null?o:e(o))}:!1}}),PO=Xe({"node_modules/get-proto/index.js"(Z,G){"use strict";var v=BS(),x=NS(),S=LO();G.exports=v?function(e){return v(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=Xe({"node_modules/hasown/index.js"(Z,G){"use strict";var v=Function.prototype.call,x=Object.prototype.hasOwnProperty,S=g1();G.exports=S.call(v,x)}}),v3=Xe({"node_modules/get-intrinsic/index.js"(Z,G){"use strict";var v,x=FS(),S=fO(),E=hO(),e=pO(),t=dO(),r=OS(),o=m1(),a=vO(),n=mO(),i=gO(),s=yO(),h=_O(),c=xO(),m=bO(),p=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(),d=NS(),u=BS(),y=US(),f=d3(),R={},L=typeof Uint8Array>"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":E,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):v,"%Symbol%":g?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":L,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":f,"%Function.prototype.apply%":y,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":c,"%Math.round%":m,"%Math.sign%":p,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(q){F=b(b(q)),z["%Error.prototype%"]=F}var F,N=function q(oe){var ae;if(oe==="%AsyncFunction%")ae=l("async function () {}");else if(oe==="%GeneratorFunction%")ae=l("function* () {}");else if(oe==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(oe==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var Q=q("%AsyncGenerator%");Q&&b&&(ae=b(Q.prototype))}return z[oe]=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(f,Array.prototype.concat),X=P.call(y,Array.prototype.splice),$=P.call(f,String.prototype.replace),se=P.call(f,String.prototype.slice),le=P.call(f,RegExp.prototype.exec),fe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,Y=function(oe){var ae=se(oe,0,1),j=se(oe,-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 $(oe,fe,function(re,ce,be,Ae){Q[Q.length]=be?$(Ae,V,"$1"):ce||re}),Q},ee=function(oe,ae){var j=oe,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 "+oe+" exists, but is not available. Please file an issue!");return{alias:Q,name:j,value:re}}throw new r("intrinsic "+oe+" does not exist!")};G.exports=function(oe,ae){if(typeof oe!="string"||oe.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(le(/^%?[^%]*%?$/,oe)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=Y(oe),Q=j.length>0?j[0]:"",re=ee("%"+Q+"%",ae),ce=re.name,be=re.value,Ae=!1,De=re.alias;De&&(Q=De[0],X(j,B([0,1],De)));for(var ze=1,Ze=!0;ze<j.length;ze+=1){var at=j[ze],nt=se(at,0,1),rt=se(at,-1);if((nt==='"'||nt==="'"||nt==="`"||rt==='"'||rt==="'"||rt==="`")&&nt!==rt)throw new r("property names with quotes must have matching quotes");if((at==="constructor"||!Ze)&&(Ae=!0),Q+="."+at,ce="%"+Q+"%",U(z,ce))be=z[ce];else if(be!=null){if(!(at in be)){if(!ae)throw new o("base intrinsic for "+oe+" exists, but the property is not available.");return}if(_&&ze+1>=j.length){var st=_(be,at);Ze=!!st,Ze&&"get"in st&&!("originalValue"in st.get)?be=st.get:be=be[at]}else Ze=U(be,at),be=be[at];Ze&&!Ae&&(z[ce]=be)}}return be}}}),RO=Xe({"node_modules/define-data-property/index.js"(Z,G){"use strict";var v=X_(),x=OS(),S=m1(),E=ag();G.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(v)v(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=Xe({"node_modules/has-property-descriptors/index.js"(Z,G){"use strict";var v=X_(),x=function(){return!!v};x.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},G.exports=x}}),DO=Xe({"node_modules/set-function-length/index.js"(Z,G){"use strict";var v=v3(),x=RO(),S=jS()(),E=ag(),e=m1(),t=v("%Math.floor%");G.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_=Xe({"node_modules/call-bind/index.js"(Z,G){"use strict";var v=g1(),x=v3(),S=DO(),E=m1(),e=x("%Function.prototype.apply%"),t=x("%Function.prototype.call%"),r=x("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=x("%Math.max%");G.exports=function(s){if(typeof s!="function")throw new E("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var n=function(){return r(v,e,arguments)};o?o(G.exports,"apply",{value:n}):G.exports.apply=n}}),y1=Xe({"node_modules/call-bind/callBound.js"(Z,G){"use strict";var v=v3(),x=Z_(),S=x(v("String.prototype.indexOf"));G.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?x(r):r}}}),zO=Xe({"node_modules/is-arguments/index.js"(Z,G){"use strict";var v=W_()(),x=y1(),S=x("Object.prototype.toString"),E=function(o){return v&&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,G.exports=t?E:e}}),FO=Xe({"node_modules/is-generator-function/index.js"(Z,G){"use strict";var v=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;G.exports=function(a){if(typeof a!="function")return!1;if(S.test(x.call(a)))return!0;if(!E){var n=v.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=Xe({"node_modules/is-callable/index.js"(Z,G){"use strict";var v=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=v.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(v.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]",c="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((p||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===c||A===a)&&w("")==null}catch{}return!1}));var l;G.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(m)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=Xe({"node_modules/for-each/index.js"(Z,G){"use strict";var v=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(!v(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)};G.exports=r}}),VS=Xe({"node_modules/available-typed-arrays/index.js"(Z,G){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x=typeof globalThis>"u"?window:globalThis;G.exports=function(){for(var E=[],e=0;e<v.length;e++)typeof x[v[e]]=="function"&&(E[E.length]=v[e]);return E}}}),BO=Xe({"node_modules/which-typed-array/index.js"(Z,G){"use strict";var v=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?v(a,function(p){var T=new o[p];if(Symbol.toStringTag in T){var l=i(T),_=e(l,Symbol.toStringTag);if(!_){var w=i(l);_=e(w,Symbol.toStringTag)}h["$"+p]=S(_.get)}}):v(a,function(p){var T=new o[p],l=T.slice||T.set;l&&(h["$"+p]=S(l))});var c=function(T){var l=!1;return v(h,function(_,w){if(!l)try{"$"+_(T)===w&&(l=n(w,1))}catch{}}),l},m=function(T){var l=!1;return v(h,function(_,w){if(!l)try{_(T),l=n(w,1)}catch{}}),l};G.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:m(T)}return e?c(T):null}}}),NO=Xe({"node_modules/is-typed-array/index.js"(Z,G){"use strict";var v=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(m,p){for(var T=0;T<m.length;T+=1)if(m[T]===p)return T;return-1},n=S("String.prototype.slice"),i={},s=Object.getPrototypeOf;e&&t&&s&&v(o,function(c){var m=new r[c];if(Symbol.toStringTag in m){var p=s(m),T=t(p,Symbol.toStringTag);if(!T){var l=s(p);T=t(l,Symbol.toStringTag)}i[c]=T.get}});var h=function(m){var p=!1;return v(i,function(T,l){if(!p)try{p=T.call(m)===l}catch{}}),p};G.exports=function(m){if(!m||typeof m!="object")return!1;if(!e||!(Symbol.toStringTag in m)){var p=n(E(m),8,-1);return a(o,p)>-1}return t?h(m):!1}}}),GS=Xe({"node_modules/util/support/types.js"(Z){"use strict";var G=zO(),v=FO(),x=BO(),S=NO();function E(Ae){return Ae.call.bind(Ae)}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(Ae,De){if(typeof Ae!="object")return!1;try{return De(Ae),!0}catch{return!1}}Z.isArgumentsObject=G,Z.isGeneratorFunction=v,Z.isTypedArray=S;function c(Ae){return typeof Promise<"u"&&Ae instanceof Promise||Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"&&typeof Ae.catch=="function"}Z.isPromise=c;function m(Ae){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Ae):S(Ae)||X(Ae)}Z.isArrayBufferView=m;function p(Ae){return x(Ae)==="Uint8Array"}Z.isUint8Array=p;function T(Ae){return x(Ae)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Ae){return x(Ae)==="Uint16Array"}Z.isUint16Array=l;function _(Ae){return x(Ae)==="Uint32Array"}Z.isUint32Array=_;function w(Ae){return x(Ae)==="Int8Array"}Z.isInt8Array=w;function A(Ae){return x(Ae)==="Int16Array"}Z.isInt16Array=A;function M(Ae){return x(Ae)==="Int32Array"}Z.isInt32Array=M;function g(Ae){return x(Ae)==="Float32Array"}Z.isFloat32Array=g;function b(Ae){return x(Ae)==="Float64Array"}Z.isFloat64Array=b;function d(Ae){return x(Ae)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Ae){return x(Ae)==="BigUint64Array"}Z.isBigUint64Array=u;function y(Ae){return r(Ae)==="[object Map]"}y.working=typeof Map<"u"&&y(new Map);function f(Ae){return typeof Map>"u"?!1:y.working?y(Ae):Ae instanceof Map}Z.isMap=f;function R(Ae){return r(Ae)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function L(Ae){return typeof Set>"u"?!1:R.working?R(Ae):Ae instanceof Set}Z.isSet=L;function z(Ae){return r(Ae)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Ae){return typeof WeakMap>"u"?!1:z.working?z(Ae):Ae instanceof WeakMap}Z.isWeakMap=F;function N(Ae){return r(Ae)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Ae){return N(Ae)}Z.isWeakSet=O;function P(Ae){return r(Ae)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function U(Ae){return typeof ArrayBuffer>"u"?!1:P.working?P(Ae):Ae instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Ae){return r(Ae)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function X(Ae){return typeof DataView>"u"?!1:B.working?B(Ae):Ae instanceof DataView}Z.isDataView=X;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function se(Ae){return r(Ae)==="[object SharedArrayBuffer]"}function le(Ae){return typeof $>"u"?!1:(typeof se.working>"u"&&(se.working=se(new $)),se.working?se(Ae):Ae instanceof $)}Z.isSharedArrayBuffer=le;function fe(Ae){return r(Ae)==="[object AsyncFunction]"}Z.isAsyncFunction=fe;function V(Ae){return r(Ae)==="[object Map Iterator]"}Z.isMapIterator=V;function Y(Ae){return r(Ae)==="[object Set Iterator]"}Z.isSetIterator=Y;function ee(Ae){return r(Ae)==="[object Generator]"}Z.isGeneratorObject=ee;function q(Ae){return r(Ae)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=q;function oe(Ae){return h(Ae,o)}Z.isNumberObject=oe;function ae(Ae){return h(Ae,a)}Z.isStringObject=ae;function j(Ae){return h(Ae,n)}Z.isBooleanObject=j;function Q(Ae){return e&&h(Ae,i)}Z.isBigIntObject=Q;function re(Ae){return t&&h(Ae,s)}Z.isSymbolObject=re;function ce(Ae){return oe(Ae)||ae(Ae)||j(Ae)||Q(Ae)||re(Ae)}Z.isBoxedPrimitive=ce;function be(Ae){return typeof Uint8Array<"u"&&(U(Ae)||le(Ae))}Z.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Ae){Object.defineProperty(Z,Ae,{enumerable:!1,value:function(){throw new Error(Ae+" is not supported in userland")}})})}}),HS=Xe({"node_modules/util/support/isBufferBrowser.js"(Z,G){G.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),WS=Xe({"(disabled):node_modules/util/util.js"(Z){var G=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),se={},le=0;le<$.length;le++)se[$[le]]=Object.getOwnPropertyDescriptor(X,$[le]);return se},v=/%[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,se=arguments,le=se.length,fe=String(B).replace(v,function(Y){if(Y==="%%")return"%";if($>=le)return Y;switch(Y){case"%s":return String(se[$++]);case"%d":return Number(se[$++]);case"%j":try{return JSON.stringify(se[$++])}catch{return"[Circular]"}default:return Y}}),V=se[$];$<le;V=se[++$])T(V)||!b(V)?fe+=" "+V:fe+=" "+e(V);return fe},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 se(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return se};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]),p(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($,se){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 se=X.inspect($,B);return w(se)||(se=a(B,se,$)),se}var le=n(B,X);if(le)return le;var fe=Object.keys(X),V=o(fe);if(B.showHidden&&(fe=Object.getOwnPropertyNames(X)),u(X)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return i(X);if(fe.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(d(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,oe=["{","}"];if(m(X)&&(q=!0,oe=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),d(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),fe.length===0&&(!q||X.length==0))return oe[0]+ee+oe[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,$,V,fe):j=fe.map(function(Q){return h(B,X,$,V,Q,q)}),B.seen.pop(),c(j,ee,oe)}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(p(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,$,se,le){for(var fe=[],V=0,Y=X.length;V<Y;++V)N(X,String(V))?fe.push(h(B,X,$,se,String(V),!0)):fe.push("");return le.forEach(function(ee){ee.match(/^\d+$/)||fe.push(h(B,X,$,se,ee,!0))}),fe}function h(B,X,$,se,le,fe){var V,Y,ee;if(ee=Object.getOwnPropertyDescriptor(X,le)||{value:X[le]},ee.get?ee.set?Y=B.stylize("[Getter/Setter]","special"):Y=B.stylize("[Getter]","special"):ee.set&&(Y=B.stylize("[Setter]","special")),N(se,le)||(V="["+le+"]"),Y||(B.seen.indexOf(ee.value)<0?(T($)?Y=a(B,ee.value,null):Y=a(B,ee.value,$-1),Y.indexOf(`
`)>-1&&(fe?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(V)){if(fe&&le.match(/^\d+$/))return Y;V=JSON.stringify(""+le),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=B.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=B.stylize(V,"string"))}return V+": "+Y}function c(B,X,$){var se=0,le=B.reduce(function(fe,V){return se++,V.indexOf(`
`)>=0&&se++,fe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?$[0]+(X===""?"":X+`
`)+" "+B.join(`,
`)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function m(B){return Array.isArray(B)}Z.isArray=m;function p(B){return typeof B=="boolean"}Z.isBoolean=p;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 d(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=d,Z.types.isDate=d;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 f(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=f,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),se=$.length;se--;)B[$[se]]=X[$[se]];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 se,le,fe=new Promise(function(ee,q){se=ee,le=q}),V=[],Y=0;Y<arguments.length;Y++)V.push(arguments[Y]);V.push(function(ee,q){ee?le(ee):se(q)});try{X.apply(this,V)}catch(ee){le(ee)}return fe}return Object.setPrototypeOf($,Object.getPrototypeOf(X)),O&&Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties($,G(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 $=[],se=0;se<arguments.length;se++)$.push(arguments[se]);var le=$.pop();if(typeof le!="function")throw new TypeError("The last argument must be of type Function");var fe=this,V=function(){return le.apply(fe,arguments)};B.apply(this,$).then(function(Y){process.nextTick(V.bind(null,null,Y))},function(Y){process.nextTick(P.bind(null,Y,V))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(B)),Object.defineProperties(X,G(B)),X}Z.callbackify=U}}),UO=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(Z,G){"use strict";function v(h,c){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);c&&(p=p.filter(function(T){return Object.getOwnPropertyDescriptor(h,T).enumerable})),m.push.apply(m,p)}return m}function x(h){for(var c=1;c<arguments.length;c++){var m=arguments[c]!=null?arguments[c]:{};c%2?v(Object(m),!0).forEach(function(p){S(h,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):v(Object(m)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(m,p))})}return h}function S(h,c,m){return c in h?Object.defineProperty(h,c,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[c]=m,h}function E(h,c){if(!(h instanceof c))throw new TypeError("Cannot call a class as a function")}function e(h,c){for(var m=0;m<c.length;m++){var p=c[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}function t(h,c,m){return c&&e(h.prototype,c),m&&e(h,m),h}var r=rg(),o=r.Buffer,a=WS(),n=a.inspect,i=n&&n.custom||"inspect";function s(h,c,m){o.prototype.copy.call(h,c,m)}G.exports=function(){function h(){E(this,h),this.head=null,this.tail=null,this.length=0}return t(h,[{key:"push",value:function(m){var p={data:m,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(m){var p={data:m,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var p=this.head,T=""+p.data;p=p.next;)T+=m+p.data;return T}},{key:"concat",value:function(m){if(this.length===0)return o.alloc(0);for(var p=o.allocUnsafe(m>>>0),T=this.head,l=0;T;)s(T.data,p,l),l+=T.data.length,T=T.next;return p}},{key:"consume",value:function(m,p){var T;return m<this.head.data.length?(T=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):m===this.head.data.length?T=this.shift():T=p?this._getString(m):this._getBuffer(m),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var p=this.head,T=1,l=p.data;for(m-=l.length;p=p.next;){var _=p.data,w=m>_.length?_.length:m;if(w===_.length?l+=_:l+=_.slice(0,m),m-=w,m===0){w===_.length?(++T,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=_.slice(w));break}++T}return this.length-=T,l}},{key:"_getBuffer",value:function(m){var p=o.allocUnsafe(m),T=this.head,l=1;for(T.data.copy(p),m-=T.data.length;T=T.next;){var _=T.data,w=m>_.length?_.length:m;if(_.copy(p,p.length-m,0,w),m-=w,m===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,p}},{key:i,value:function(m,p){return n(this,x({},p,{depth:0,customInspect:!1}))}}]),h}()}}),XS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(Z,G){"use strict";function v(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)}G.exports={destroy:v,undestroy:E,errorOrDestroy:t}}}),ig=Xe({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(Z,G){"use strict";function v(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,c,m){return typeof a=="string"?a:a(h,c,m)}var s=function(h){v(c,h);function c(m,p,T){return h.call(this,i(m,p,T))||this}return c}(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"),G.exports.codes=x}}),ZS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(Z,G){"use strict";var v=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 v(a,o)}return Math.floor(o)}return E.objectMode?16:16*1024}G.exports={getHighWaterMark:S}}}),jO=Xe({"node_modules/util-deprecate/browser.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(Z,G){"use strict";G.exports=d;function v(V){var Y=this;this.next=null,this.entry=null,this.finish=function(){fe(Y,V)}}var x;d.WritableState=g;var S={deprecate:jO()},E=zS(),e=rg().Buffer,t=window.Uint8Array||function(){};function r(V){return e.from(V)}function o(V){return e.isBuffer(V)||V instanceof t}var a=XS(),n=ZS(),i=n.getHighWaterMark,s=ig().codes,h=s.ERR_INVALID_ARG_TYPE,c=s.ERR_METHOD_NOT_IMPLEMENTED,m=s.ERR_MULTIPLE_CALLBACK,p=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()(d,E);function M(){}function g(V,Y,ee){x=x||ng(),V=V||{},typeof ee!="boolean"&&(ee=Y instanceof x),this.objectMode=!!V.objectMode,ee&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=i(this,V,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=V.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){N(Y,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(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(d,Symbol.hasInstance,{value:function(Y){return b.call(this,Y)?!0:this!==d?!1:Y&&Y._writableState instanceof g}})):b=function(Y){return Y instanceof this};function d(V){x=x||ng();var Y=this instanceof x;if(!Y&&!b.call(d,this))return new d(V);this._writableState=new g(V,this,Y),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),E.call(this)}d.prototype.pipe=function(){A(this,new p)};function u(V,Y){var ee=new _;A(V,ee),process.nextTick(Y,ee)}function y(V,Y,ee,q){var oe;return ee===null?oe=new l:typeof ee!="string"&&!Y.objectMode&&(oe=new h("chunk",["string","Buffer"],ee)),oe?(A(V,oe),process.nextTick(q,oe),!1):!0}d.prototype.write=function(V,Y,ee){var q=this._writableState,oe=!1,ae=!q.objectMode&&o(V);return ae&&!e.isBuffer(V)&&(V=r(V)),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,V,ee))&&(q.pendingcb++,oe=R(this,q,ae,V,Y,ee)),oe},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&U(this,V))},d.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(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function f(V,Y,ee){return!V.objectMode&&V.decodeStrings!==!1&&typeof Y=="string"&&(Y=e.from(Y,ee)),Y}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(V,Y,ee,q,oe,ae){if(!ee){var j=f(Y,q,oe);q!==j&&(ee=!0,oe="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 ce=Y.lastBufferedRequest;Y.lastBufferedRequest={chunk:q,encoding:oe,isBuf:ee,callback:ae,next:null},ce?ce.next=Y.lastBufferedRequest:Y.bufferedRequest=Y.lastBufferedRequest,Y.bufferedRequestCount+=1}else L(V,Y,!1,Q,q,oe,ae);return re}function L(V,Y,ee,q,oe,ae,j){Y.writelen=q,Y.writecb=j,Y.writing=!0,Y.sync=!0,Y.destroyed?Y.onwrite(new T("write")):ee?V._writev(oe,Y.onwrite):V._write(oe,ae,Y.onwrite),Y.sync=!1}function z(V,Y,ee,q,oe){--Y.pendingcb,ee?(process.nextTick(oe,q),process.nextTick(se,V,Y),V._writableState.errorEmitted=!0,A(V,q)):(oe(q),V._writableState.errorEmitted=!0,A(V,q),se(V,Y))}function F(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}function N(V,Y){var ee=V._writableState,q=ee.sync,oe=ee.writecb;if(typeof oe!="function")throw new m;if(F(ee),Y)z(V,ee,q,Y,oe);else{var ae=B(ee)||V.destroyed;!ae&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&U(V,ee),q?process.nextTick(O,V,ee,ae,oe):O(V,ee,ae,oe)}}function O(V,Y,ee,q){ee||P(V,Y),Y.pendingcb--,q(),se(V,Y)}function P(V,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,V.emit("drain"))}function U(V,Y){Y.bufferProcessing=!0;var ee=Y.bufferedRequest;if(V._writev&&ee&&ee.next){var q=Y.bufferedRequestCount,oe=new Array(q),ae=Y.corkedRequestsFree;ae.entry=ee;for(var j=0,Q=!0;ee;)oe[j]=ee,ee.isBuf||(Q=!1),ee=ee.next,j+=1;oe.allBuffers=Q,L(V,Y,!0,Y.length,oe,"",ae.finish),Y.pendingcb++,Y.lastBufferedRequest=null,ae.next?(Y.corkedRequestsFree=ae.next,ae.next=null):Y.corkedRequestsFree=new v(Y),Y.bufferedRequestCount=0}else{for(;ee;){var re=ee.chunk,ce=ee.encoding,be=ee.callback,Ae=Y.objectMode?1:re.length;if(L(V,Y,!1,Ae,re,ce,be),ee=ee.next,Y.bufferedRequestCount--,Y.writing)break}ee===null&&(Y.lastBufferedRequest=null)}Y.bufferedRequest=ee,Y.bufferProcessing=!1}d.prototype._write=function(V,Y,ee){ee(new c("_write()"))},d.prototype._writev=null,d.prototype.end=function(V,Y,ee){var q=this._writableState;return typeof V=="function"?(ee=V,V=null,Y=null):typeof Y=="function"&&(ee=Y,Y=null),V!=null&&this.write(V,Y),q.corked&&(q.corked=1,this.uncork()),q.ending||le(this,q,ee),this},Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B(V){return V.ending&&V.length===0&&V.bufferedRequest===null&&!V.finished&&!V.writing}function X(V,Y){V._final(function(ee){Y.pendingcb--,ee&&A(V,ee),Y.prefinished=!0,V.emit("prefinish"),se(V,Y)})}function $(V,Y){!Y.prefinished&&!Y.finalCalled&&(typeof V._final=="function"&&!Y.destroyed?(Y.pendingcb++,Y.finalCalled=!0,process.nextTick(X,V,Y)):(Y.prefinished=!0,V.emit("prefinish")))}function se(V,Y){var ee=B(Y);if(ee&&($(V,Y),Y.pendingcb===0&&(Y.finished=!0,V.emit("finish"),Y.autoDestroy))){var q=V._readableState;(!q||q.autoDestroy&&q.endEmitted)&&V.destroy()}return ee}function le(V,Y,ee){Y.ending=!0,se(V,Y),ee&&(Y.finished?process.nextTick(ee):V.once("finish",ee)),Y.ended=!0,V.writable=!1}function fe(V,Y,ee){var q=V.entry;for(V.entry=null;q;){var oe=q.callback;Y.pendingcb--,oe(ee),q=q.next}Y.corkedRequestsFree.next=V}Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Y){this._writableState&&(this._writableState.destroyed=Y)}}),d.prototype.destroy=a.destroy,d.prototype._undestroy=a.undestroy,d.prototype._destroy=function(V,Y){Y(V)}}}),ng=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(Z,G){"use strict";var v=Object.keys||function(n){var i=[];for(var s in n)i.push(s);return i};G.exports=r;var x=JS(),S=YS();for(Kv()(r,x),E=v(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=Xe({"node_modules/safe-buffer/index.js"(Z,G){var v=rg(),x=v.Buffer;function S(e,t){for(var r in e)t[r]=e[r]}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?G.exports=v:(S(v,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 v.SlowBuffer(e)}}}),KS=Xe({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(Z){"use strict";var G=qO().Buffer,v=G.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"&&(G.isEncoding===v||!v(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=c,l=3;break;default:this.write=m,this.end=p;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=G.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 c(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function m(T){return T.toString(this.encoding)}function p(T){return T&&T.length?this.write(T):""}}}),m3=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(Z,G){"use strict";var v=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)},c=t._readableState&&t._readableState.endEmitted,m=function(){a=!1,c=!0,n||o.call(t)},p=function(w){o.call(t,w)},T=function(){var w;if(a&&!c)return(!t._readableState||!t._readableState.ended)&&(w=new v),o.call(t,w);if(n&&!s)return(!t._writableState||!t._writableState.ended)&&(w=new v),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",m),t.on("finish",h),r.error!==!1&&t.on("error",p),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",m),t.removeListener("error",p),t.removeListener("close",T)}}G.exports=e}}),VO=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(Z,G){"use strict";var v;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 c(l,_){return function(w,A){l.then(function(){if(_[r]){w(i(void 0,!0));return}_[a](w,A)},A)}}var m=Object.getPrototypeOf(function(){}),p=Object.setPrototypeOf((v={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,d){process.nextTick(function(){_[t]?d(_[t]):b(i(void 0,!0))})});var A=this[o],M;if(A)M=new Promise(c(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(v,Symbol.asyncIterator,function(){return this}),x(v,"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))})})}),v),m),T=function(_){var w,A=Object.create(p,(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 d=A[n].read();d?(A[o]=null,A[E]=null,A[e]=null,g(i(d,!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};G.exports=T}}),GO=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(Z,G){G.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),JS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(Z,G){"use strict";G.exports=y;var v;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(),c=h.getHighWaterMark,m=ig().codes,p=m.ERR_INVALID_ARG_TYPE,T=m.ERR_STREAM_PUSH_AFTER_EOF,l=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,A,M;Kv()(y,E);var g=s.errorOrDestroy,b=["error","close","destroy","pause","resume"];function d(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){v=v||ng(),j=j||{},typeof re!="boolean"&&(re=Q instanceof v),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.readableObjectMode),this.highWaterMark=c(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(v=v||ng(),!(this instanceof y))return new y(j);var Q=this instanceof v;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,ce;return re.objectMode?ce=!0:typeof j=="string"&&(Q=Q||re.defaultEncoding,Q!==re.encoding&&(j=e.from(j,Q),Q=""),ce=!0),f(this,j,Q,!1,ce)},y.prototype.unshift=function(j){return f(this,j,null,!0,!1)};function f(j,Q,re,ce,be){n("readableAddChunk",Q);var Ae=j._readableState;if(Q===null)Ae.reading=!1,O(j,Ae);else{var De;if(be||(De=L(Ae,Q)),De)g(j,De);else if(Ae.objectMode||Q&&Q.length>0)if(typeof Q!="string"&&!Ae.objectMode&&Object.getPrototypeOf(Q)!==e.prototype&&(Q=r(Q)),ce)Ae.endEmitted?g(j,new _):R(j,Ae,Q,!0);else if(Ae.ended)g(j,new T);else{if(Ae.destroyed)return!1;Ae.reading=!1,Ae.decoder&&!re?(Q=Ae.decoder.write(Q),Ae.objectMode||Q.length!==0?R(j,Ae,Q,!1):B(j,Ae)):R(j,Ae,Q,!1)}else ce||(Ae.reading=!1,B(j,Ae))}return!Ae.ended&&(Ae.length<Ae.highWaterMark||Ae.length===0)}function R(j,Q,re,ce){Q.flowing&&Q.length===0&&!Q.sync?(Q.awaitDrain=0,j.emit("data",re)):(Q.length+=Q.objectMode?1:re.length,ce?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 p("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,ce="";re!==null;)ce+=Q.write(re.data),re=re.next;return this._readableState.buffer.clear(),ce!==""&&this._readableState.buffer.push(ce),this._readableState.length=ce.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 ce=Q.needReadable;n("need readable",ce),(Q.length===0||Q.length-j<Q.highWaterMark)&&(ce=!0,n("length less than watermark",ce)),Q.ended||Q.reading?(ce=!1,n("reading or ended",ce)):ce&&(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 be;return j>0?be=ee(j,Q):be=null,be===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)),be!==null&&this.emit("data",be),be};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,ce=this._readableState;switch(ce.pipesCount){case 0:ce.pipes=j;break;case 1:ce.pipes=[ce.pipes,j];break;default:ce.pipes.push(j);break}ce.pipesCount+=1,n("pipe count=%d opts=%j",ce.pipesCount,Q);var be=(!Q||Q.end!==!1)&&j!==process.stdout&&j!==process.stderr,Ae=be?ze:he;ce.endEmitted?process.nextTick(Ae):re.once("end",Ae),j.on("unpipe",De);function De(Oe,tt){n("onunpipe"),Oe===re&&tt&&tt.hasUnpiped===!1&&(tt.hasUnpiped=!0,nt())}function ze(){n("onend"),j.end()}var Ze=$(re);j.on("drain",Ze);var at=!1;function nt(){n("cleanup"),j.removeListener("close",Me),j.removeListener("finish",ye),j.removeListener("drain",Ze),j.removeListener("error",st),j.removeListener("unpipe",De),re.removeListener("end",ze),re.removeListener("end",he),re.removeListener("data",rt),at=!0,ce.awaitDrain&&(!j._writableState||j._writableState.needDrain)&&Ze()}re.on("data",rt);function rt(Oe){n("ondata");var tt=j.write(Oe);n("dest.write",tt),tt===!1&&((ce.pipesCount===1&&ce.pipes===j||ce.pipesCount>1&&ae(ce.pipes,j)!==-1)&&!at&&(n("false write response, pause",ce.awaitDrain),ce.awaitDrain++),re.pause())}function st(Oe){n("onerror",Oe),he(),j.removeListener("error",st),S(j,"error")===0&&g(j,Oe)}d(j,"error",st);function Me(){j.removeListener("finish",ye),he()}j.once("close",Me);function ye(){n("onfinish"),j.removeListener("close",Me),he()}j.once("finish",ye);function he(){n("unpipe"),re.unpipe(j)}return j.emit("pipe",re),ce.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 ce=Q.pipes,be=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var Ae=0;Ae<be;Ae++)ce[Ae].emit("unpipe",this,{hasUnpiped:!1});return this}var De=ae(Q.pipes,j);return De===-1?this:(Q.pipes.splice(De,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),ce=this._readableState;return j==="data"?(ce.readableListening=this.listenerCount("readable")>0,ce.flowing!==!1&&this.resume()):j==="readable"&&!ce.endEmitted&&!ce.readableListening&&(ce.readableListening=ce.needReadable=!0,ce.flowing=!1,ce.emittedReadable=!1,n("on readable",ce.length,ce.reading),ce.length?P(this):ce.reading||process.nextTick(le,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(se,this),re},y.prototype.removeAllListeners=function(j){var Q=E.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&process.nextTick(se,this),Q};function se(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 le(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,fe(this,j)),j.paused=!1,this};function fe(j,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(V,j,Q))}function V(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,ce=!1;j.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var De=re.decoder.end();De&&De.length&&Q.push(De)}Q.push(null)}),j.on("data",function(De){if(n("wrapped data"),re.decoder&&(De=re.decoder.write(De)),!(re.objectMode&&De==null)&&!(!re.objectMode&&(!De||!De.length))){var ze=Q.push(De);ze||(ce=!0,j.pause())}});for(var be in j)this[be]===void 0&&typeof j[be]=="function"&&(this[be]=function(ze){return function(){return j[ze].apply(j,arguments)}}(be));for(var Ae=0;Ae<b.length;Ae++)j.on(b[Ae],this.emit.bind(this,b[Ae]));return this._read=function(De){n("wrapped _read",De),ce&&(ce=!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(oe,Q,j))}function oe(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,ce=j.length;re<ce;re++)if(j[re]===Q)return re;return-1}}}),$S=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(Z,G){"use strict";G.exports=o;var v=ig().codes,x=v.ERR_METHOD_NOT_IMPLEMENTED,S=v.ERR_MULTIPLE_CALLBACK,E=v.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=v.ERR_TRANSFORM_WITH_LENGTH_0,t=ng();Kv()(o,t);function r(i,s){var h=this._transformState;h.transforming=!1;var c=h.writecb;if(c===null)return this.emit("error",new S);h.writechunk=null,h.writecb=null,s!=null&&this.push(s),c(i);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.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 c=this._transformState;if(c.writecb=h,c.writechunk=i,c.writeencoding=s,!c.transforming){var m=this._readableState;(c.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.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=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(Z,G){"use strict";G.exports=x;var v=$S();Kv()(x,v);function x(S){if(!(this instanceof x))return new x(S);v.call(this,S)}x.prototype._transform=function(S,E,e){e(null,S)}}}),WO=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(Z,G){"use strict";var v;function x(h){var c=!1;return function(){c||(c=!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,c,m,p){p=x(p);var T=!1;h.on("close",function(){T=!0}),v===void 0&&(v=m3()),v(h,{readable:c,writable:m},function(_){if(_)return p(_);T=!0,p()});var l=!1;return function(_){if(!T&&!l){if(l=!0,r(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();p(_||new e("pipe"))}}}function a(h){h()}function n(h,c){return h.pipe(c)}function i(h){return!h.length||typeof h[h.length-1]!="function"?t:h.pop()}function s(){for(var h=arguments.length,c=new Array(h),m=0;m<h;m++)c[m]=arguments[m];var p=i(c);if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new E("streams");var T,l=c.map(function(_,w){var A=w<c.length-1,M=w>0;return o(_,A,M,function(g){T||(T=g),g&&l.forEach(a),!A&&(l.forEach(a),p(T))})});return c.reduce(n)}G.exports=s}}),XO=Xe({"node_modules/stream-browserify/index.js"(Z,G){G.exports=S;var v=Z0().EventEmitter,x=Kv();x(S,v),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(){v.call(this)}S.prototype.pipe=function(E,e){var t=this;function r(c){E.writable&&E.write(c)===!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(c){if(h(),v.listenerCount(this,"error")===0)throw c}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=Xe({"node_modules/util/util.js"(Z){var G=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),se={},le=0;le<$.length;le++)se[$[le]]=Object.getOwnPropertyDescriptor(X,$[le]);return se},v=/%[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,se=arguments,le=se.length,fe=String(B).replace(v,function(Y){if(Y==="%%")return"%";if($>=le)return Y;switch(Y){case"%s":return String(se[$++]);case"%d":return Number(se[$++]);case"%j":try{return JSON.stringify(se[$++])}catch{return"[Circular]"}default:return Y}}),V=se[$];$<le;V=se[++$])T(V)||!b(V)?fe+=" "+V:fe+=" "+e(V);return fe},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 se(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return se};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]),p(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($,se){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 se=X.inspect($,B);return w(se)||(se=a(B,se,$)),se}var le=n(B,X);if(le)return le;var fe=Object.keys(X),V=o(fe);if(B.showHidden&&(fe=Object.getOwnPropertyNames(X)),u(X)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return i(X);if(fe.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(d(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,oe=["{","}"];if(m(X)&&(q=!0,oe=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),d(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),fe.length===0&&(!q||X.length==0))return oe[0]+ee+oe[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,$,V,fe):j=fe.map(function(Q){return h(B,X,$,V,Q,q)}),B.seen.pop(),c(j,ee,oe)}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(p(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,$,se,le){for(var fe=[],V=0,Y=X.length;V<Y;++V)N(X,String(V))?fe.push(h(B,X,$,se,String(V),!0)):fe.push("");return le.forEach(function(ee){ee.match(/^\d+$/)||fe.push(h(B,X,$,se,ee,!0))}),fe}function h(B,X,$,se,le,fe){var V,Y,ee;if(ee=Object.getOwnPropertyDescriptor(X,le)||{value:X[le]},ee.get?ee.set?Y=B.stylize("[Getter/Setter]","special"):Y=B.stylize("[Getter]","special"):ee.set&&(Y=B.stylize("[Setter]","special")),N(se,le)||(V="["+le+"]"),Y||(B.seen.indexOf(ee.value)<0?(T($)?Y=a(B,ee.value,null):Y=a(B,ee.value,$-1),Y.indexOf(`
`)>-1&&(fe?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(V)){if(fe&&le.match(/^\d+$/))return Y;V=JSON.stringify(""+le),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=B.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=B.stylize(V,"string"))}return V+": "+Y}function c(B,X,$){var se=0,le=B.reduce(function(fe,V){return se++,V.indexOf(`
`)>=0&&se++,fe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?$[0]+(X===""?"":X+`
`)+" "+B.join(`,
`)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function m(B){return Array.isArray(B)}Z.isArray=m;function p(B){return typeof B=="boolean"}Z.isBoolean=p;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 d(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=d,Z.types.isDate=d;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 f(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=f,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),se=$.length;se--;)B[$[se]]=X[$[se]];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 se,le,fe=new Promise(function(ee,q){se=ee,le=q}),V=[],Y=0;Y<arguments.length;Y++)V.push(arguments[Y]);V.push(function(ee,q){ee?le(ee):se(q)});try{X.apply(this,V)}catch(ee){le(ee)}return fe}return Object.setPrototypeOf($,Object.getPrototypeOf(X)),O&&Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties($,G(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 $=[],se=0;se<arguments.length;se++)$.push(arguments[se]);var le=$.pop();if(typeof le!="function")throw new TypeError("The last argument must be of type Function");var fe=this,V=function(){return le.apply(fe,arguments)};B.apply(this,$).then(function(Y){process.nextTick(V.bind(null,null,Y))},function(Y){process.nextTick(P.bind(null,Y,V))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(B)),Object.defineProperties(X,G(B)),X}Z.callbackify=U}}),QS=Xe({"node_modules/assert/build/internal/errors.js"(Z,G){"use strict";function v(M){"@babel/helpers - typeof";return v=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},v(M)}function x(M,g){for(var b=0;b<g.length;b++){var d=g[b];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(M,E(d.key),d)}}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 v(g)==="symbol"?g:String(g)}function e(M,g){if(v(M)!=="object"||M===null)return M;var b=M[Symbol.toPrimitive];if(b!==void 0){var d=b.call(M,g||"default");if(v(d)!=="object")return d;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(d,u){return d.__proto__=u,d},o(M,g)}function a(M){var g=s();return function(){var d=h(M),u;if(g){var y=h(this).constructor;u=Reflect.construct(d,arguments,y)}else u=d.apply(this,arguments);return n(this,u)}}function n(M,g){if(g&&(v(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 c={},m,p;function T(M,g,b){b||(b=Error);function d(y,f,R){return typeof g=="string"?g:g(y,f,R)}var u=function(y){r(R,y);var f=a(R);function R(L,z,F){var N;return t(this,R),N=f.call(this,d(L,z,F)),N.code=M,N}return S(R)}(b);c[M]=u}function l(M,g){if(Array.isArray(M)){var b=M.length;return M=M.map(function(d){return String(d)}),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){m===void 0&&(m=K_()),m(typeof M=="string","'name' must be a string");var d;typeof g=="string"&&_(g,"not ")?(d="must not be",g=g.replace(/^not /,"")):d="must be";var u;if(w(M," argument"))u="The ".concat(M," ").concat(d," ").concat(l(g,"type"));else{var y=A(M,".")?"property":"argument";u='The "'.concat(M,'" ').concat(y," ").concat(d," ").concat(l(g,"type"))}return u+=". Received type ".concat(v(b)),u},TypeError),T("ERR_INVALID_ARG_VALUE",function(M,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=_1());var d=p.inspect(g);return d.length>128&&(d="".concat(d.slice(0,128),"...")),"The argument '".concat(M,"' ").concat(b,". Received ").concat(d)},TypeError,RangeError),T("ERR_INVALID_RETURN_VALUE",function(M,g,b){var d;return b&&b.constructor&&b.constructor.name?d="instance of ".concat(b.constructor.name):d="type ".concat(v(b)),"Expected ".concat(M,' to be returned from the "').concat(g,'"')+" function but got ".concat(d,".")},TypeError),T("ERR_MISSING_ARGS",function(){for(var M=arguments.length,g=new Array(M),b=0;b<M;b++)g[b]=arguments[b];m===void 0&&(m=K_()),m(g.length>0,"At least one arg needs to be specified");var d="The ",u=g.length;switch(g=g.map(function(y){return'"'.concat(y,'"')}),u){case 1:d+="".concat(g[0]," argument");break;case 2:d+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:d+=g.slice(0,u-1).join(", "),d+=", and ".concat(g[u-1]," arguments");break}return"".concat(d," must be specified")},TypeError),G.exports.codes=c}}),ZO=Xe({"node_modules/assert/build/internal/assert/assertion_error.js"(Z,G){"use strict";function v(U,B){var X=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);B&&($=$.filter(function(se){return Object.getOwnPropertyDescriptor(U,se).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?v(Object(X),!0).forEach(function($){S(U,$,X[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(X)):v(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=m();return function(){var $=l(U),se;if(B){var le=l(this).constructor;se=Reflect.construct($,arguments,le)}else se=$.apply(this,arguments);return i(this,se)}}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||!p($))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($,se)}function se(){return c($,arguments,l(this).constructor)}return se.prototype=Object.create($.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}}),T(se,$)},h(U)}function c(U,B,X){return m()?c=Reflect.construct.bind():c=function(se,le,fe){var V=[null];V.push.apply(V,le);var Y=Function.bind.apply(se,V),ee=new Y;return fe&&T(ee,fe.prototype),ee},c.apply(null,arguments)}function m(){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 p(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function T(U,B){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,se){return $.__proto__=se,$},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 d(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="",f="",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 $="",se="",le=0,fe="",V=!1,Y=N(U),ee=Y.split(`
`),q=N(B).split(`
`),oe=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][oe]===q[0][oe];)oe++;oe>2&&(ae=`
`.concat(d(" ",oe),"^"),oe=0)}}}for(var re=ee[ee.length-1],ce=q[q.length-1];re===ce&&(oe++<2?fe=`
`.concat(re).concat(fe):$=re,ee.pop(),q.pop(),!(ee.length===0||q.length===0));)re=ee[ee.length-1],ce=q[q.length-1];var be=Math.max(ee.length,q.length);if(be===0){var Ae=Y.split(`
`);if(Ae.length>30)for(Ae[26]="".concat(u,"...").concat(R);Ae.length>27;)Ae.pop();return"".concat(L.notIdentical,`
`).concat(Ae.join(`
`),`
`)}oe>3&&(fe=`
`.concat(u,"...").concat(R).concat(fe),V=!0),$!==""&&(fe=`
`.concat($).concat(fe),$="");var De=0,ze=L[X]+`
`.concat(y,"+ actual").concat(R," ").concat(f,"- expected").concat(R),Ze=" ".concat(u,"...").concat(R," Lines skipped");for(oe=0;oe<be;oe++){var at=oe-le;if(ee.length<oe+1)at>1&&oe>2&&(at>4?(se+=`
`.concat(u,"...").concat(R),V=!0):at>3&&(se+=`
`.concat(q[oe-2]),De++),se+=`
`.concat(q[oe-1]),De++),le=oe,$+=`
`.concat(f,"-").concat(R," ").concat(q[oe]),De++;else if(q.length<oe+1)at>1&&oe>2&&(at>4?(se+=`
`.concat(u,"...").concat(R),V=!0):at>3&&(se+=`
`.concat(ee[oe-2]),De++),se+=`
`.concat(ee[oe-1]),De++),le=oe,se+=`
`.concat(y,"+").concat(R," ").concat(ee[oe]),De++;else{var nt=q[oe],rt=ee[oe],st=rt!==nt&&(!b(rt,",")||rt.slice(0,-1)!==nt);st&&b(nt,",")&&nt.slice(0,-1)===rt&&(st=!1,rt+=","),st?(at>1&&oe>2&&(at>4?(se+=`
`.concat(u,"...").concat(R),V=!0):at>3&&(se+=`
`.concat(ee[oe-2]),De++),se+=`
`.concat(ee[oe-1]),De++),le=oe,se+=`
`.concat(y,"+").concat(R," ").concat(rt),$+=`
`.concat(f,"-").concat(R," ").concat(nt),De+=2):(se+=$,$="",(at===1||oe===0)&&(se+=`
`.concat(rt),De++))}if(De>20&&oe<be-2)return"".concat(ze).concat(Ze,`
`).concat(se,`
`).concat(u,"...").concat(R).concat($,`
`)+"".concat(u,"...").concat(R)}return"".concat(ze).concat(V?Ze:"",`
`).concat(se).concat($).concat(fe).concat(ae)}var P=function(U,B){a($,U);var X=n($);function $(se){var le;if(E(this,$),_(se)!=="object"||se===null)throw new g("options","Object",se);var fe=se.message,V=se.operator,Y=se.stackStartFn,ee=se.actual,q=se.expected,oe=Error.stackTraceLimit;if(Error.stackTraceLimit=0,fe!=null)le=X.call(this,String(fe));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",f="\x1B[31m"):(u="",y="",R="",f="")),_(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)),V==="deepStrictEqual"||V==="strictEqual")le=X.call(this,O(ee,q,V));else if(V==="notDeepStrictEqual"||V==="notStrictEqual"){var ae=L[V],j=N(ee).split(`
`);if(V==="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?le=X.call(this,"".concat(ae," ").concat(j[0])):le=X.call(this,"".concat(ae,`
`).concat(j.join(`
`),`
`))}else{var Q=N(ee),re="",ce=L[V];V==="notDeepEqual"||V==="notEqual"?(Q="".concat(L[V],`
`).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),"...")),V==="deepEqual"||V==="equal"?Q="".concat(ce,`
`).concat(Q,`
should equal
`):re=" ".concat(V," ").concat(re)),le=X.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=oe,le.generatedMessage=!fe,Object.defineProperty(s(le),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),le.code="ERR_ASSERTION",le.actual=ee,le.expected=q,le.operator=V,Error.captureStackTrace&&Error.captureStackTrace(s(le),Y),le.stack,le.name="AssertionError",i(le)}return t($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:B,value:function(le,fe){return A(this,x(x({},fe),{},{customInspect:!1,depth:0}))}}]),$}(h(Error),A.custom);G.exports=P}}),eM=Xe({"node_modules/object-keys/isArguments.js"(Z,G){"use strict";var v=Object.prototype.toString;G.exports=function(S){var E=v.call(S),e=E==="[object Arguments]";return e||(e=E!=="[object Array]"&&S!==null&&typeof S=="object"&&typeof S.length=="number"&&S.length>=0&&v.call(S.callee)==="[object Function]"),e}}}),YO=Xe({"node_modules/object-keys/implementation.js"(Z,G){"use strict";var v;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 c=h.constructor;return c&&c.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}},v=function(c){var m=c!==null&&typeof c=="object",p=S.call(c)==="[object Function]",T=E(c),l=m&&S.call(c)==="[object String]",_=[];if(!m&&!p&&!T)throw new TypeError("Object.keys called on a non-object");var w=r&&p;if(l&&c.length>0&&!x.call(c,0))for(var A=0;A<c.length;++A)_.push(String(A));if(T&&c.length>0)for(var M=0;M<c.length;++M)_.push(String(M));else for(var g in c)!(w&&g==="prototype")&&x.call(c,g)&&_.push(String(g));if(t)for(var b=s(c),d=0;d<o.length;++d)!(b&&o[d]==="constructor")&&x.call(c,o[d])&&_.push(o[d]);return _});var x,S,E,e,t,r,o,a,n,i,s;G.exports=v}}),tM=Xe({"node_modules/object-keys/index.js"(Z,G){"use strict";var v=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(v.call(a)):e(a)})}else Object.keys=E;return Object.keys||E},G.exports=E}}),KO=Xe({"node_modules/object.assign/implementation.js"(Z,G){"use strict";var v=tM(),x=p3()(),S=y1(),E=Object,e=S("Array.prototype.push"),t=S("Object.prototype.propertyIsEnumerable"),r=x?Object.getOwnPropertySymbols:null;G.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]),c=v(h),m=x&&(Object.getOwnPropertySymbols||r);if(m)for(var p=m(h),T=0;T<p.length;++T){var l=p[T];t(h,l)&&e(c,l)}for(var _=0;_<c.length;++_){var w=c[_];if(t(h,w)){var A=h[w];i[w]=A}}}return i}}}),JO=Xe({"node_modules/object.assign/polyfill.js"(Z,G){"use strict";var v=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};G.exports=function(){return!Object.assign||x()||S()?v:Object.assign}}}),rM=Xe({"node_modules/object-is/implementation.js"(Z,G){"use strict";var v=function(x){return x!==x};G.exports=function(S,E){return S===0&&E===0?1/S===1/E:!!(S===E||v(S)&&v(E))}}}),g3=Xe({"node_modules/object-is/polyfill.js"(Z,G){"use strict";var v=rM();G.exports=function(){return typeof Object.is=="function"?Object.is:v}}}),Y_=Xe({"node_modules/define-properties/index.js"(Z,G){"use strict";var v=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,c){if(s in i){if(c===!0){if(i[s]===h)return}else if(!t(c)||!c())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]:{},c=v(s);x&&(c=E.call(c,Object.getOwnPropertySymbols(s)));for(var m=0;m<c.length;m+=1)a(i,c[m],s[c[m]],h[c[m]])};n.supportsDescriptors=!!o,G.exports=n}}),$O=Xe({"node_modules/object-is/shim.js"(Z,G){"use strict";var v=g3(),x=Y_();G.exports=function(){var E=v();return x(Object,{is:E},{is:function(){return Object.is!==E}}),E}}}),QO=Xe({"node_modules/object-is/index.js"(Z,G){"use strict";var v=Y_(),x=Z_(),S=rM(),E=g3(),e=$O(),t=x(E(),Object);v(t,{getPolyfill:E,implementation:S,shim:e}),G.exports=t}}),aM=Xe({"node_modules/is-nan/implementation.js"(Z,G){"use strict";G.exports=function(x){return x!==x}}}),iM=Xe({"node_modules/is-nan/polyfill.js"(Z,G){"use strict";var v=aM();G.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:v}}}),eB=Xe({"node_modules/is-nan/shim.js"(Z,G){"use strict";var v=Y_(),x=iM();G.exports=function(){var E=x();return v(Number,{isNaN:E},{isNaN:function(){return Number.isNaN!==E}}),E}}}),tB=Xe({"node_modules/is-nan/index.js"(Z,G){"use strict";var v=Z_(),x=Y_(),S=aM(),E=iM(),e=eB(),t=v(E(),Number);x(t,{getPolyfill:E,implementation:S,shim:e}),G.exports=t}}),rB=Xe({"node_modules/assert/build/internal/util/comparisons.js"(Z,G){"use strict";function v(Me,ye){return t(Me)||e(Me,ye)||S(Me,ye)||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(Me,ye){if(Me){if(typeof Me=="string")return E(Me,ye);var he=Object.prototype.toString.call(Me).slice(8,-1);if(he==="Object"&&Me.constructor&&(he=Me.constructor.name),he==="Map"||he==="Set")return Array.from(Me);if(he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he))return E(Me,ye)}}function E(Me,ye){(ye==null||ye>Me.length)&&(ye=Me.length);for(var he=0,Oe=new Array(ye);he<ye;he++)Oe[he]=Me[he];return Oe}function e(Me,ye){var he=Me==null?null:typeof Symbol<"u"&&Me[Symbol.iterator]||Me["@@iterator"];if(he!=null){var Oe,tt,ot,Qe,Pt=[],It=!0,qt=!1;try{if(ot=(he=he.call(Me)).next,ye===0){if(Object(he)!==he)return;It=!1}else for(;!(It=(Oe=ot.call(he)).done)&&(Pt.push(Oe.value),Pt.length!==ye);It=!0);}catch(Wt){qt=!0,tt=Wt}finally{try{if(!It&&he.return!=null&&(Qe=he.return(),Object(Qe)!==Qe))return}finally{if(qt)throw tt}}return Pt}}function t(Me){if(Array.isArray(Me))return Me}function r(Me){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ye){return typeof ye}:function(ye){return ye&&typeof Symbol=="function"&&ye.constructor===Symbol&&ye!==Symbol.prototype?"symbol":typeof ye},r(Me)}var o=/a/g.flags!==void 0,a=function(ye){var he=[];return ye.forEach(function(Oe){return he.push(Oe)}),he},n=function(ye){var he=[];return ye.forEach(function(Oe,tt){return he.push([tt,Oe])}),he},i=Object.is?Object.is:QO(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},h=Number.isNaN?Number.isNaN:tB();function c(Me){return Me.call.bind(Me)}var m=c(Object.prototype.hasOwnProperty),p=c(Object.prototype.propertyIsEnumerable),T=c(Object.prototype.toString),l=_1().types,_=l.isAnyArrayBuffer,w=l.isArrayBufferView,A=l.isDate,M=l.isMap,g=l.isRegExp,b=l.isSet,d=l.isNativeError,u=l.isBoxedPrimitive,y=l.isNumberObject,f=l.isStringObject,R=l.isBooleanObject,L=l.isBigIntObject,z=l.isSymbolObject,F=l.isFloat32Array,N=l.isFloat64Array;function O(Me){if(Me.length===0||Me.length>10)return!0;for(var ye=0;ye<Me.length;ye++){var he=Me.charCodeAt(ye);if(he<48||he>57)return!0}return Me.length===10&&Me>=Math.pow(2,32)}function P(Me){return Object.keys(Me).filter(O).concat(s(Me).filter(Object.prototype.propertyIsEnumerable.bind(Me)))}function U(Me,ye){if(Me===ye)return 0;for(var he=Me.length,Oe=ye.length,tt=0,ot=Math.min(he,Oe);tt<ot;++tt)if(Me[tt]!==ye[tt]){he=Me[tt],Oe=ye[tt];break}return he<Oe?-1:Oe<he?1:0}var B=void 0,X=!0,$=!1,se=0,le=1,fe=2,V=3;function Y(Me,ye){return o?Me.source===ye.source&&Me.flags===ye.flags:RegExp.prototype.toString.call(Me)===RegExp.prototype.toString.call(ye)}function ee(Me,ye){if(Me.byteLength!==ye.byteLength)return!1;for(var he=0;he<Me.byteLength;he++)if(Me[he]!==ye[he])return!1;return!0}function q(Me,ye){return Me.byteLength!==ye.byteLength?!1:U(new Uint8Array(Me.buffer,Me.byteOffset,Me.byteLength),new Uint8Array(ye.buffer,ye.byteOffset,ye.byteLength))===0}function oe(Me,ye){return Me.byteLength===ye.byteLength&&U(new Uint8Array(Me),new Uint8Array(ye))===0}function ae(Me,ye){return y(Me)?y(ye)&&i(Number.prototype.valueOf.call(Me),Number.prototype.valueOf.call(ye)):f(Me)?f(ye)&&String.prototype.valueOf.call(Me)===String.prototype.valueOf.call(ye):R(Me)?R(ye)&&Boolean.prototype.valueOf.call(Me)===Boolean.prototype.valueOf.call(ye):L(Me)?L(ye)&&BigInt.prototype.valueOf.call(Me)===BigInt.prototype.valueOf.call(ye):z(ye)&&Symbol.prototype.valueOf.call(Me)===Symbol.prototype.valueOf.call(ye)}function j(Me,ye,he,Oe){if(Me===ye)return Me!==0?!0:he?i(Me,ye):!0;if(he){if(r(Me)!=="object")return typeof Me=="number"&&h(Me)&&h(ye);if(r(ye)!=="object"||Me===null||ye===null||Object.getPrototypeOf(Me)!==Object.getPrototypeOf(ye))return!1}else{if(Me===null||r(Me)!=="object")return ye===null||r(ye)!=="object"?Me==ye:!1;if(ye===null||r(ye)!=="object")return!1}var tt=T(Me),ot=T(ye);if(tt!==ot)return!1;if(Array.isArray(Me)){if(Me.length!==ye.length)return!1;var Qe=P(Me,B),Pt=P(ye,B);return Qe.length!==Pt.length?!1:re(Me,ye,he,Oe,le,Qe)}if(tt==="[object Object]"&&(!M(Me)&&M(ye)||!b(Me)&&b(ye)))return!1;if(A(Me)){if(!A(ye)||Date.prototype.getTime.call(Me)!==Date.prototype.getTime.call(ye))return!1}else if(g(Me)){if(!g(ye)||!Y(Me,ye))return!1}else if(d(Me)||Me instanceof Error){if(Me.message!==ye.message||Me.name!==ye.name)return!1}else if(w(Me)){if(!he&&(F(Me)||N(Me))){if(!ee(Me,ye))return!1}else if(!q(Me,ye))return!1;var It=P(Me,B),qt=P(ye,B);return It.length!==qt.length?!1:re(Me,ye,he,Oe,se,It)}else{if(b(Me))return!b(ye)||Me.size!==ye.size?!1:re(Me,ye,he,Oe,fe);if(M(Me))return!M(ye)||Me.size!==ye.size?!1:re(Me,ye,he,Oe,V);if(_(Me)){if(!oe(Me,ye))return!1}else if(u(Me)&&!ae(Me,ye))return!1}return re(Me,ye,he,Oe,se)}function Q(Me,ye){return ye.filter(function(he){return p(Me,he)})}function re(Me,ye,he,Oe,tt,ot){if(arguments.length===5){ot=Object.keys(Me);var Qe=Object.keys(ye);if(ot.length!==Qe.length)return!1}for(var Pt=0;Pt<ot.length;Pt++)if(!m(ye,ot[Pt]))return!1;if(he&&arguments.length===5){var It=s(Me);if(It.length!==0){var qt=0;for(Pt=0;Pt<It.length;Pt++){var Wt=It[Pt];if(p(Me,Wt)){if(!p(ye,Wt))return!1;ot.push(Wt),qt++}else if(p(ye,Wt))return!1}var kr=s(ye);if(It.length!==kr.length&&Q(ye,kr).length!==qt)return!1}else{var mr=s(ye);if(mr.length!==0&&Q(ye,mr).length!==0)return!1}}if(ot.length===0&&(tt===se||tt===le&&Me.length===0||Me.size===0))return!0;if(Oe===void 0)Oe={val1:new Map,val2:new Map,position:0};else{var qr=Oe.val1.get(Me);if(qr!==void 0){var Sr=Oe.val2.get(ye);if(Sr!==void 0)return qr===Sr}Oe.position++}Oe.val1.set(Me,Oe.position),Oe.val2.set(ye,Oe.position);var Rr=nt(Me,ye,he,ot,Oe,tt);return Oe.val1.delete(Me),Oe.val2.delete(ye),Rr}function ce(Me,ye,he,Oe){for(var tt=a(Me),ot=0;ot<tt.length;ot++){var Qe=tt[ot];if(j(ye,Qe,he,Oe))return Me.delete(Qe),!0}return!1}function be(Me){switch(r(Me)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Me=+Me;case"number":if(h(Me))return!1}return!0}function Ae(Me,ye,he){var Oe=be(he);return Oe??(ye.has(Oe)&&!Me.has(Oe))}function De(Me,ye,he,Oe,tt){var ot=be(he);if(ot!=null)return ot;var Qe=ye.get(ot);return Qe===void 0&&!ye.has(ot)||!j(Oe,Qe,!1,tt)?!1:!Me.has(ot)&&j(Oe,Qe,!1,tt)}function ze(Me,ye,he,Oe){for(var tt=null,ot=a(Me),Qe=0;Qe<ot.length;Qe++){var Pt=ot[Qe];if(r(Pt)==="object"&&Pt!==null)tt===null&&(tt=new Set),tt.add(Pt);else if(!ye.has(Pt)){if(he||!Ae(Me,ye,Pt))return!1;tt===null&&(tt=new Set),tt.add(Pt)}}if(tt!==null){for(var It=a(ye),qt=0;qt<It.length;qt++){var Wt=It[qt];if(r(Wt)==="object"&&Wt!==null){if(!ce(tt,Wt,he,Oe))return!1}else if(!he&&!Me.has(Wt)&&!ce(tt,Wt,he,Oe))return!1}return tt.size===0}return!0}function Ze(Me,ye,he,Oe,tt,ot){for(var Qe=a(Me),Pt=0;Pt<Qe.length;Pt++){var It=Qe[Pt];if(j(he,It,tt,ot)&&j(Oe,ye.get(It),tt,ot))return Me.delete(It),!0}return!1}function at(Me,ye,he,Oe){for(var tt=null,ot=n(Me),Qe=0;Qe<ot.length;Qe++){var Pt=v(ot[Qe],2),It=Pt[0],qt=Pt[1];if(r(It)==="object"&&It!==null)tt===null&&(tt=new Set),tt.add(It);else{var Wt=ye.get(It);if(Wt===void 0&&!ye.has(It)||!j(qt,Wt,he,Oe)){if(he||!De(Me,ye,It,qt,Oe))return!1;tt===null&&(tt=new Set),tt.add(It)}}}if(tt!==null){for(var kr=n(ye),mr=0;mr<kr.length;mr++){var qr=v(kr[mr],2),Sr=qr[0],Rr=qr[1];if(r(Sr)==="object"&&Sr!==null){if(!Ze(tt,Me,Sr,Rr,he,Oe))return!1}else if(!he&&(!Me.has(Sr)||!j(Me.get(Sr),Rr,!1,Oe))&&!Ze(tt,Me,Sr,Rr,!1,Oe))return!1}return tt.size===0}return!0}function nt(Me,ye,he,Oe,tt,ot){var Qe=0;if(ot===fe){if(!ze(Me,ye,he,tt))return!1}else if(ot===V){if(!at(Me,ye,he,tt))return!1}else if(ot===le)for(;Qe<Me.length;Qe++)if(m(Me,Qe)){if(!m(ye,Qe)||!j(Me[Qe],ye[Qe],he,tt))return!1}else{if(m(ye,Qe))return!1;for(var Pt=Object.keys(Me);Qe<Pt.length;Qe++){var It=Pt[Qe];if(!m(ye,It)||!j(Me[It],ye[It],he,tt))return!1}return Pt.length===Object.keys(ye).length}for(Qe=0;Qe<Oe.length;Qe++){var qt=Oe[Qe];if(!j(Me[qt],ye[qt],he,tt))return!1}return!0}function rt(Me,ye){return j(Me,ye,$)}function st(Me,ye){return j(Me,ye,X)}G.exports={isDeepEqual:rt,isDeepStrictEqual:st}}}),K_=Xe({"node_modules/assert/build/assert.js"(Z,G){"use strict";function v(Y){"@babel/helpers - typeof";return v=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},v(Y)}function x(Y,ee){for(var q=0;q<ee.length;q++){var oe=ee[q];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(Y,E(oe.key),oe)}}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 v(ee)==="symbol"?ee:String(ee)}function e(Y,ee){if(v(Y)!=="object"||Y===null)return Y;var q=Y[Symbol.toPrimitive];if(q!==void 0){var oe=q.call(Y,ee||"default");if(v(oe)!=="object")return oe;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,c=ZO(),m=_1(),p=m.inspect,T=_1().types,l=T.isPromise,_=T.isRegExp,w=JO()(),A=g3()(),M=y1()("RegExp.prototype.test"),g,b;function d(){var Y=rB();g=Y.isDeepEqual,b=Y.isDeepStrictEqual}var u=!1,y=G.exports=F,f={};function R(Y){throw Y.message instanceof Error?Y.message:new c(Y)}function L(Y,ee,q,oe,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&&(oe="!=")}if(q instanceof Error)throw q;var ce={actual:Y,expected:ee,operator:oe===void 0?"fail":oe,stackStartFn:ae||L};q!==void 0&&(ce.message=q);var be=new c(ce);throw Q&&(be.message=Q,be.generatedMessage=!0),be}y.fail=L,y.AssertionError=c;function z(Y,ee,q,oe){if(!q){var ae=!1;if(ee===0)ae=!0,oe="No value argument passed to `assert.ok()`";else if(oe instanceof Error)throw oe;var j=new c({actual:q,expected:!0,message:oe,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,oe){if(arguments.length<2)throw new h("actual","expected");ee!=q&&R({actual:ee,expected:q,message:oe,operator:"==",stackStartFn:Y})},y.notEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");ee==q&&R({actual:ee,expected:q,message:oe,operator:"!=",stackStartFn:Y})},y.deepEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");g===void 0&&d(),g(ee,q)||R({actual:ee,expected:q,message:oe,operator:"deepEqual",stackStartFn:Y})},y.notDeepEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");g===void 0&&d(),g(ee,q)&&R({actual:ee,expected:q,message:oe,operator:"notDeepEqual",stackStartFn:Y})},y.deepStrictEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");g===void 0&&d(),b(ee,q)||R({actual:ee,expected:q,message:oe,operator:"deepStrictEqual",stackStartFn:Y})},y.notDeepStrictEqual=N;function N(Y,ee,q){if(arguments.length<2)throw new h("actual","expected");g===void 0&&d(),b(Y,ee)&&R({actual:Y,expected:ee,message:q,operator:"notDeepStrictEqual",stackStartFn:N})}y.strictEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");A(ee,q)||R({actual:ee,expected:q,message:oe,operator:"strictEqual",stackStartFn:Y})},y.notStrictEqual=function Y(ee,q,oe){if(arguments.length<2)throw new h("actual","expected");A(ee,q)&&R({actual:ee,expected:q,message:oe,operator:"notStrictEqual",stackStartFn:Y})};var O=S(function Y(ee,q,oe){var ae=this;t(this,Y),q.forEach(function(j){j in ee&&(oe!==void 0&&typeof oe[j]=="string"&&_(ee[j])&&M(ee[j],oe[j])?ae[j]=oe[j]:ae[j]=ee[j])})});function P(Y,ee,q,oe,ae,j){if(!(q in Y)||!b(Y[q],ee[q])){if(!oe){var Q=new O(Y,ae),re=new O(ee,ae,Y),ce=new c({actual:Q,expected:re,operator:"deepStrictEqual",stackStartFn:j});throw ce.actual=Y,ce.expected=ee,ce.operator=j.name,ce}R({actual:Y,expected:ee,message:oe,operator:j.name,stackStartFn:j})}}function U(Y,ee,q,oe){if(typeof ee!="function"){if(_(ee))return M(ee,Y);if(arguments.length===2)throw new n("expected",["Function","RegExp"],ee);if(v(Y)!=="object"||Y===null){var ae=new c({actual:Y,expected:ee,message:q,operator:"deepStrictEqual",stackStartFn:oe});throw ae.operator=oe.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&&d(),j.forEach(function(Q){typeof Y[Q]=="string"&&_(ee[Q])&&M(ee[Q],Y[Q])||P(Y,ee,Q,q,j,oe)}),!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 f}function X(Y){return l(Y)||Y!==null&&v(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 f}).catch(function(q){return q})})}function se(Y,ee,q,oe){if(typeof q=="string"){if(arguments.length===4)throw new n("error",["Object","Error","Function","RegExp"],q);if(v(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.'));oe=q,q=void 0}else if(q!=null&&v(q)!=="object"&&typeof q!="function")throw new n("error",["Object","Error","Function","RegExp"],q);if(ee===f){var ae="";q&&q.name&&(ae+=" (".concat(q.name,")")),ae+=oe?": ".concat(oe):".";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,oe,Y))throw ee}function le(Y,ee,q,oe){if(ee!==f){if(typeof q=="string"&&(oe=q,q=void 0),!q||U(ee,q)){var ae=oe?": ".concat(oe):".",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,oe=new Array(q>1?q-1:0),ae=1;ae<q;ae++)oe[ae-1]=arguments[ae];se.apply(void 0,[Y,B(ee)].concat(oe))},y.rejects=function Y(ee){for(var q=arguments.length,oe=new Array(q>1?q-1:0),ae=1;ae<q;ae++)oe[ae-1]=arguments[ae];return $(ee).then(function(j){return se.apply(void 0,[Y,j].concat(oe))})},y.doesNotThrow=function Y(ee){for(var q=arguments.length,oe=new Array(q>1?q-1:0),ae=1;ae<q;ae++)oe[ae-1]=arguments[ae];le.apply(void 0,[Y,B(ee)].concat(oe))},y.doesNotReject=function Y(ee){for(var q=arguments.length,oe=new Array(q>1?q-1:0),ae=1;ae<q;ae++)oe[ae-1]=arguments[ae];return $(ee).then(function(j){return le.apply(void 0,[Y,j].concat(oe))})},y.ifError=function Y(ee){if(ee!=null){var q="ifError got unwanted exception: ";v(ee)==="object"&&typeof ee.message=="string"?ee.message.length===0&&ee.constructor?q+=ee.constructor.name:q+=ee.message:q+=p(ee);var oe=new c({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=oe.stack.split(`
`),re=0;re<j.length;re++){var ce=Q.indexOf(j[re]);if(ce!==-1){Q=Q.slice(0,ce);break}}oe.stack="".concat(Q.join(`
`),`
`).concat(j.join(`
`))}throw oe}};function fe(Y,ee,q,oe,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(v(Y)," (").concat(p(Y),")"):(j?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(p(ee),`. Input:
`).concat(p(Y),`
`));var re=new c({actual:Y,expected:ee,message:q,operator:ae,stackStartFn:oe});throw re.generatedMessage=Q,re}}y.match=function Y(ee,q,oe){fe(ee,q,oe,Y,"match")},y.doesNotMatch=function Y(ee,q,oe){fe(ee,q,oe,Y,"doesNotMatch")};function V(){for(var Y=arguments.length,ee=new Array(Y),q=0;q<Y;q++)ee[q]=arguments[q];z.apply(void 0,[V,ee.length].concat(ee))}y.strict=w(V,y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict}}),aB=Xe({"node_modules/stream-parser/node_modules/ms/index.js"(Z,G){var v=1e3,x=v*60,S=x*60,E=S*24,e=E*365.25;G.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*v;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>=v?Math.round(n/v)+"s":n+"ms"}function o(n){return a(n,E,"day")||a(n,S,"hour")||a(n,x,"minute")||a(n,v,"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=Xe({"node_modules/stream-parser/node_modules/debug/src/debug.js"(Z,G){Z=G.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 v;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-(v||i);n.diff=s,n.prev=v,n.curr=i,v=i;for(var h=new Array(arguments.length),c=0;c<h.length;c++)h[c]=arguments[c];h[0]=Z.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");var m=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,function(T,l){if(T==="%%")return T;m++;var _=Z.formatters[l];if(typeof _=="function"){var w=h[m];T=_.call(n,w),h.splice(m,1),m--}return T}),Z.formatArgs.call(n,h);var p=a.log||Z.log||console.log.bind(console);p.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=Xe({"node_modules/stream-parser/node_modules/debug/src/browser.js"(Z,G){Z=G.exports=iB(),Z.log=S,Z.formatArgs=x,Z.save=E,Z.load=e,Z.useColors=v,Z.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:t(),Z.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function v(){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=Xe({"node_modules/stream-parser/index.js"(Z,G){var v=K_(),x=nB()("stream-parser");G.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,_){v(!this._parserCallback,'there is already a "callback" set!'),v(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,_){v(!this._parserCallback,'there is already a "callback" set!'),v(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,_){v(!this._parserCallback,'There is already a "callback" set!'),v(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=_),p(this,l,null,w)}function h(l,_,w){this._parserInit||o(this),x("transform(%o bytes)",l.length),typeof _!="function"&&(_=this._parserOutput),p(this,l,_,w)}function c(l,_,w,A){return l._parserBytesLeft<=0?A(new Error("got data but not currently parsing anything")):_.length<=l._parserBytesLeft?function(){return m(l,_,w,A)}:function(){var M=_.slice(0,l._parserBytesLeft);return m(l,M,w,function(g){if(g)return A(g);if(_.length>M.length)return function(){return c(l,_.slice(M.length),w,A)}})}}function m(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 d=M.apply(l,g);if(!b||A===d)return A}}else return A}var p=T(c);function T(l){return function(){for(var _=l.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),ac=Xe({"node_modules/probe-image-size/lib/common.js"(Z){"use strict";var G=XO().Transform,v=oB();function x(){G.call(this,{readableObjectMode:!0})}x.prototype=Object.create(G.prototype),x.prototype.constructor=x,v(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=Xe({"node_modules/probe-image-size/lib/miaf_utils.js"(Z,G){"use strict";var v=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}}G.exports.unbox=S;function E(i,s){for(var h=0;;){var c=S(i,h);if(!c)break;switch(c.boxtype){case"ispe":s.sizes.push({width:x(c.data,4),height:x(c.data,8)});break;case"irot":s.transforms.push({type:"irot",value:c.data[0]&3});break;case"imir":s.transforms.push({type:"imir",value:c.data[0]&1});break}h=c.end}}function e(i,s,h){for(var c=0,m=0;m<h;m++)c=c*256+(i[s+m]||0);return c}function t(i,s){for(var h=i[4]>>4&15,c=i[4]&15,m=i[5]>>4&15,p=v(i,6),T=8,l=0;l<p;l++){var _=v(i,T);T+=2;var w=v(i,T);T+=2;var A=e(i,T,m);T+=m;var M=v(i,T);if(T+=2,w===0&&M===1){var g=e(i,T,h),b=e(i,T+h,c);s.item_loc[_]={length:b,offset:g+A}}T+=M*(h+c)}}function r(i,s){for(var h=v(i,4),c=6,m=0;m<h;m++){var p=S(i,c);if(!p)break;if(p.boxtype==="infe"){for(var T=v(p.data,4),l="",_=8;_<p.data.length&&p.data[_];_++)l+=String.fromCharCode(p.data[_]);s.item_inf[l]=T}c=p.end}}function o(i,s){for(var h=0;;){var c=S(i,h);if(!c)break;c.boxtype==="ipco"&&E(c.data,s),h=c.end}}function a(i,s){for(var h=4;;){var c=S(i,h);if(!c)break;c.boxtype==="iprp"&&o(c.data,s),c.boxtype==="iloc"&&t(c.data,s),c.boxtype==="iinf"&&r(c.data,s),h=c.end}}function n(i){var s=i.reduce(function(m,p){return m.width>p.width||m.width===p.width&&m.height>p.height?m:p}),h=i.reduce(function(m,p){return m.height>p.height||m.height===p.height&&m.width>p.width?m:p}),c;return s.width>h.height||s.width===h.height&&s.height>h.width?c=s:c=h,c}G.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(a(i,s),!!s.sizes.length){var h=n(s.sizes),c=1;s.transforms.forEach(function(p){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(p.type==="imir"&&(p.value===0?c=l[c]:(c=l[c],c=T[c],c=T[c])),p.type==="irot")for(var _=0;_<p.value;_++)c=T[c]});var m=null;return s.item_inf.Exif&&(m=s.item_loc[s.item_inf.Exif]),{width:h.width,height:h.height,orientation:s.transforms.length?c:null,variants:s.sizes,exif_location:m}}},G.exports.getMimeType=function(i){var s=String.fromCharCode.apply(null,i.slice(0,4)),h={};h[s]=!0;for(var c=8;c<i.length;c+=4)h[String.fromCharCode.apply(null,i.slice(c,c+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=Xe({"node_modules/probe-image-size/lib/exif_utils.js"(Z,G){"use strict";function v(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 v("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 v("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 v("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,c=h<=4?e+8:this.read_uint32(e+8),m=!1;if(c+h>this.input.length)throw v("unexpected EOF","EBADDATA");for(var p=[],T=c,l=0;l<i;l++,T+=s){var _=this.exif_format_read(n,T);if(_===null){p=null;break}p.push(_)}Array.isArray(p)&&n===2&&(p=x(String.fromCharCode.apply(null,p)),p&&p[p.length-1]==="\0"&&(p=p.slice(0,-1))),this.is_subifd_link(E,a)&&Array.isArray(p)&&Number.isInteger(p[0])&&p[0]>0&&(this.ifds_to_read.push({id:a,offset:p[0]}),m=!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:c+this.start,value:p,is_subifd_link:m};if(t(w)===!1){this.aborted=!0;return}e+=12}E===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},G.exports.ExifParser=S,G.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=Xe({"node_modules/probe-image-size/lib/parse_sync/avif.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=sB(),e=y3(),t=v("ftyp");G.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 c={width:h.width,height:h.height,type:a.type,mime:a.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(c.variants=h.variants),h.orientation&&(c.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=r.length){var m=S(r,h.exif_location.offset),p=r.slice(h.exif_location.offset+m+4,h.exif_location.offset+h.exif_location.length),T=e.get_orientation(p);T>0&&(c.orientation=T)}return c}}}}}}}}),uB=Xe({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=v("BM");G.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=Xe({"node_modules/probe-image-size/lib/parse_sync/gif.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=v("GIF87a"),e=v("GIF89a");G.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=Xe({"node_modules/probe-image-size/lib/parse_sync/ico.js"(Z,G){"use strict";var v=ac().readUInt16LE,x=0,S=1,E=16;G.exports=function(e){var t=v(e,0),r=v(e,2),o=v(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,c={width:s,height:h};a.push(c),(s>n.width||h>n.height)&&(n=c)}return{width:n.width,height:n.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),hB=Xe({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(Z,G){"use strict";var v=ac().readUInt16BE,x=ac().str2arr,S=ac().sliceEq,E=y3(),e=x("Exif\0\0");G.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=v(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:v(t,r+3),height:v(t,r+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return n>0&&(i.orientation=n),i}r+=a}}}}),pB=Xe({"node_modules/probe-image-size/lib/parse_sync/png.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=v(`\x89PNG\r

`),e=v("IHDR");G.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=Xe({"node_modules/probe-image-size/lib/parse_sync/psd.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=v("8BPS\0");G.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=Xe({"node_modules/probe-image-size/lib/parse_sync/svg.js"(Z,G){"use strict";function v(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,c=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(h=3);h<c&&v(s[h]);)h++;return h===c?!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),c=s.match(r),m=s.match(o);return{width:h&&(h[1]||h[2]),height:c&&(c[1]||c[2]),viewbox:m&&(m[1]||m[2])}}function i(s){return a.test(s)?s.match(a)[0]:"px"}G.exports=function(s){if(S(s)){for(var h="",c=0;c<s.length;c++)h+=String.fromCharCode(s[c]);var m=(h.match(E)||[""])[0];if(e.test(m)){var p=n(m),T=parseFloat(p.width),l=parseFloat(p.height);if(p.width&&p.height)return!x(T)||!x(l)?void 0:{width:T,height:l,type:"svg",mime:"image/svg+xml",wUnits:i(p.width),hUnits:i(p.height)};var _=(p.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 p.width?x(T)?{width:T,height:T/g,type:"svg",mime:"image/svg+xml",wUnits:i(p.width),hUnits:i(p.width)}:void 0:p.height?x(l)?{width:l*g,height:l,type:"svg",mime:"image/svg+xml",wUnits:i(p.height),hUnits:i(p.height)}:void 0:{width:A,height:M,type:"svg",mime:"image/svg+xml",wUnits:i(w.width),hUnits:i(w.height)}}}}}}}),mB=Xe({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=ac().readUInt16BE,e=ac().readUInt32LE,t=ac().readUInt32BE,r=v("II*\0"),o=v("MM\0*");function a(s,h,c){return c?E(s,h):S(s,h)}function n(s,h,c){return c?t(s,h):e(s,h)}function i(s,h,c){var m=a(s,h+2,c),p=n(s,h+4,c);return p!==1||m!==3&&m!==4?null:m===3?a(s,h+8,c):n(s,h+8,c)}G.exports=function(s){if(!(s.length<8)&&!(!x(s,0,r)&&!x(s,0,o))){var h=s[0]===77,c=n(s,4,h)-8;if(!(c<0)){var m=c+8;if(!(s.length-m<2)){var p=a(s,m+0,h)*12;if(!(p<=0)&&(m+=2,!(s.length-m<p))){var T,l,_,w;for(T=0;T<p;T+=12)w=a(s,m+T,h),w===256?l=i(s,m+T,h):w===257&&(_=i(s,m+T,h));if(l&&_)return{width:l,height:_,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),gB=Xe({"node_modules/probe-image-size/lib/parse_sync/webp.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=ac().readUInt32LE,e=y3(),t=v("RIFF"),r=v("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"}}G.exports=function(i){if(!(i.length<16)&&!(!x(i,0,t)&&!x(i,8,r))){var s=12,h=null,c=0,m=E(i,4)+8;if(!(m>i.length)){for(;s+8<m;){if(i[s]===0){s++;continue}var p=String.fromCharCode.apply(null,i.slice(s,s+4)),T=E(i,s+4);p==="VP8 "&&T>=10?h=h||o(i,s+8):p==="VP8L"&&T>=9?h=h||a(i,s+8):p==="VP8X"&&T>=10?h=h||n(i,s+8):p==="EXIF"&&(c=e.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(h)return c>0&&(h.orientation=c),h}}}}}),yB=Xe({"node_modules/probe-image-size/lib/parsers_sync.js"(Z,G){"use strict";G.exports={avif:lB(),bmp:uB(),gif:cB(),ico:fB(),jpeg:hB(),png:pB(),psd:dB(),svg:vB(),tiff:mB(),webp:gB()}}}),_B=Xe({"node_modules/probe-image-size/sync.js"(Z,G){"use strict";var v=yB();function x(S){for(var E=Object.keys(v),e=0;e<E.length;e++){var t=v[E[e]](S);if(t)return t}return null}G.exports=function(E){return x(E)},G.exports.parsers=v}}),xB=Xe({"src/traces/image/helpers.js"(Z){"use strict";var G=_B(),v=Yv().IMAGE_URL_PREFIX,x=rg().Buffer;Z.getImageSize=function(S){var E=S.replace(v,""),e=new x(E,"base64");return G(e)}}}),bB=Xe({"src/traces/image/calc.js"(Z,G){"use strict";var v=sa(),x=v1(),S=rs(),E=Go(),e=sa().maxRowLength,t=xB().getImageSize;G.exports=function(i,s){var h,c;if(s._hasZ)h=s.z.length,c=e(s.z);else if(s._hasSource){var m=t(s.source);h=m.height,c=m.width}var p=E.getFromId(i,s.xaxis||"x"),T=E.getFromId(i,s.yaxis||"y"),l=p.d2c(s.x0)-s.dx/2,_=T.d2c(s.y0)-s.dy/2,w,A=[l,l+c*s.dx],M=[_,_+h*s.dy];if(p&&p.type==="log")for(w=0;w<c;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[p._id]=E.findExtremes(p,A),s._extremes[T._id]=E.findExtremes(T,M),s._scaler=a(s);var g={x0:l,y0:_,z:s.z,w:c,h};return[g]};function r(n,i,s,h){return function(c){return v.constrain((c-n)*i,s,h)}}function o(n,i){return function(s){return v.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 c=0;c<h;c++)i.min[c]!==n.zmin[c]||i.max[c]!==n.zmax[c]?n._sArray.push(r(n.zmin[c],(i.max[c]-i.min[c])/(n.zmax[c]-n.zmin[c]),i.min[c],i.max[c])):n._sArray.push(o(i.min[c],i.max[c]));return function(m){for(var p=m.slice(0,h),T=0;T<h;T++){var l=p[T];if(!S(l))return!1;p[T]=n._sArray[T](l)}return p}}}}),wB=Xe({"src/traces/image/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.strTranslate,E=vd(),e=v1(),t=lS(),r=Q2().STYLE;G.exports=function(a,n,i,s){var h=n.xaxis,c=n.yaxis,m=!a._context._exportedPlot&&t();x.makeTraceGroups(s,i,"im").each(function(p){var T=v.select(this),l=p[0],_=l.trace,w=(_.zsmooth==="fast"||_.zsmooth===!1&&m)&&!_._hasZ&&_._hasSource&&h.type==="linear"&&c.type==="linear";_._realImage=w;var A=l.z,M=l.x0,g=l.y0,b=l.w,d=l.h,u=_.dx,y=_.dy,f,R,L,z,F,N;for(N=0;f===void 0&&N<b;)f=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<d;)z=c.c2p(g+N*y),N++;for(N=d;F===void 0&&N>0;)F=c.c2p(g+N*y),N--;if(R<f&&(L=R,R=f,f=L),F<z&&(L=z,z=F,F=L),!w){var O=.5;f=Math.max(-O*h._length,f),R=Math.min((1+O)*h._length,R),z=Math.max(-O*c._length,z),F=Math.min((1+O)*c._length,F)}var P=Math.round(R-f),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}),ce=function(ye){return x.constrain(Math.round(h.c2p(M+ye*u)-f),0,P)},be=function(ye){return x.constrain(Math.round(c.c2p(g+ye*y)-z),0,U)},Ae=e.colormodel[_.colormodel],De=Ae.colormodel||_.colormodel,ze=Ae.fmt,Ze;for(N=0;N<l.w;N++){var at=ce(N),nt=ce(N+1);if(!(nt===at||isNaN(nt)||isNaN(at)))for(var rt=0;rt<l.h;rt++){var st=be(rt),Me=be(rt+1);Me===st||isNaN(Me)||isNaN(st)||!j(N,rt)||(Ze=_._scaler(j(N,rt)),Ze?re.fillStyle=De+"("+ze(Ze).join(",")+")":re.fillStyle="rgba(0,0,0,0)",re.fillRect(at,st,nt-at,Me-st))}}return Q}var se=T.selectAll("image").data([p]);se.enter().append("svg:image").attr({xmlns:E.svg,preserveAspectRatio:"none"}),se.exit().remove();var le=_.zsmooth===!1?r:"";if(w){var fe=x.simpleMap(h.range,h.r2l),V=x.simpleMap(c.range,c.r2l),Y=fe[1]<fe[0],ee=V[1]>V[0];if(Y||ee){var q=f+P/2,oe=z+U/2;le+="transform:"+S(q+"px",oe+"px")+"scale("+(Y?-1:1)+","+(ee?-1:1)+")"+S(-q+"px",-oe+"px")+";"}}se.attr("style",le);var ae=new Promise(function(j){if(_._hasZ)j();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===b&&_._canvas.el.height===d&&_._canvas.source===_.source)j();else{var Q=document.createElement("canvas");Q.width=b,Q.height=d;var re=Q.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var ce=_._image;ce.onload=function(){re.drawImage(ce,0,0),_._canvas={el:Q,source:_.source},j()},ce.setAttribute("src",_.source)}}).then(function(){var j,Q;if(_._hasZ)Q=$(function(be,Ae){var De=A[Ae][be];return x.isTypedArray(De)&&(De=Array.from(De)),De}),j=Q.toDataURL("image/png");else if(_._hasSource)if(w)j=_.source;else{var re=_._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=re.getImageData(0,0,b,d).data;Q=$(function(be,Ae){var De=4*(Ae*b+be);return[ce[De],ce[De+1],ce[De+2],ce[De+3]]}),j=Q.toDataURL("image/png")}se.attr({"xlink:href":j,height:U,width:P,x:f,y:z})});a._promises.push(ae)})}}}),TB=Xe({"src/traces/image/style.js"(Z,G){"use strict";var v=Hn();G.exports=function(S){v.select(S).selectAll(".im image").style("opacity",function(E){return E[0].trace.opacity})}}}),AB=Xe({"src/traces/image/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=x.isArrayOrTypedArray,E=v1();G.exports=function(t,r,o){var a=t.cd[0],n=a.trace,i=t.xa,s=t.ya;if(!(v.inbox(r-a.x0,r-(a.x0+a.w*n.dx),0)>0||v.inbox(o-a.y0,o-(a.y0+a.h*n.dy),0)>0)){var h=Math.floor((r-a.x0)/n.dx),c=Math.floor(Math.abs(o-a.y0)/n.dy),m;if(n._hasZ?m=a.z[c][h]:n._hasSource&&(m=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(h,c,1,1).data),!!m){var p=a.hi||n.hoverinfo,T;if(p){var l=p.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(m),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 d;S(n.hovertext)&&S(n.hovertext[c])?d=n.hovertext[c][h]:S(n.text)&&S(n.text[c])&&(d=n.text[c][h]);var u=s.c2p(a.y0+(c+.5)*n.dy),y=a.x0+(h+.5)*n.dx,f=a.y0+(c+.5)*n.dy,R="["+m.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(t,{index:[c,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:f,yLabelVal:f,zLabelVal:R,text:d,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=Xe({"src/traces/image/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/image/index.js"(Z,G){"use strict";G.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=Xe({"lib/image.js"(Z,G){"use strict";G.exports=MB()}}),og=Xe({"src/traces/pie/attributes.js"(Z,G){"use strict";var v=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"});G.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({},v.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({},v.showlegend,{arrayOk:!0}),legend:o({},v.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=Xe({"src/traces/pie/defaults.js"(Z,G){"use strict";var v=rs(),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),c=Math.min(s?n.length:1/0,h?i.length:1/0);if(isFinite(c)||(c=0),c&&h){for(var m,p=0;p<c;p++){var T=i[p];if(v(T)&&T>0){m=!0;break}}m||(c=0)}return{hasLabels:s,hasValues:h,len:c}}function o(n,i,s,h,c){var m=h("marker.line.width");m&&h("marker.line.color",c?void 0:s.paper_bgcolor);var p=h("marker.colors");t(h,"marker.pattern",p),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 c(f,R){return x.coerce(n,i,S,f,R)}var m=c("labels"),p=c("values"),T=r(m,p),l=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(c("label0"),c("dlabel")),!l){i.visible=!1;return}i._length=l,o(n,i,h,c,!0),c("scalegroup");var _=c("text"),w=c("texttemplate");c("texttemplatefallback");var A;if(w||(A=c("textinfo",x.isArrayOrTypedArray(_)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),w||A&&A!=="none"){var M=c("textposition");e(n,i,h,c,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&&c("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&c("insidetextorientation")}else A==="none"&&c("textposition","none");E(i,h,c);var d=c("hole"),u=c("title.text");if(u){var y=c("title.position",d?"middle center":"top center");!d&&y==="middle center"&&(i.title.position="top center"),x.coerceFont(c,"title.font",h.font)}c("sort"),c("direction"),c("rotation"),c("pull")}G.exports={handleLabelsAndValues:r,handleMarkerDefaults:o,supplyDefaults:a}}}),_3=Xe({"src/traces/pie/layout_attributes.js"(Z,G){"use strict";G.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),kB=Xe({"src/traces/pie/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=_3();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("hiddenlabels"),t("piecolorway",e.colorway),t("extendpiecolors")}}}),x1=Xe({"src/traces/pie/calc.js"(Z,G){"use strict";var v=rs(),x=Ch(),S=$n(),E={};function e(a,n){var i=[],s=a._fullLayout,h=s.hiddenlabels||[],c=n.labels,m=n.marker.colors||[],p=n.values,T=n._length,l=n._hasValues&&T,_,w;if(n.dlabel)for(c=new Array(T),_=0;_<T;_++)c[_]=String(n.label0+_*n.dlabel);var A={},M=t(s["_"+n.type+"colormap"]),g=0,b=!1;for(_=0;_<T;_++){var d,u,y;if(l){if(d=p[_],!v(d))continue;d=+d}else d=1;u=c[_],(u===void 0||u==="")&&(u=_),u=String(u);var f=A[u];f===void 0?(A[u]=i.length,y=h.indexOf(u)!==-1,y||(g+=d),i.push({v:d,label:u,color:M(m[_],u),i:_,pts:[_],hidden:y})):(b=!0,w=i[f],w.v+=d,w.pts.push(_),w.hidden||(g+=d),w.color===!1&&m[_]&&(w.color=M(m[_],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,c=s[i+"colorway"],m=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(c=o(c,E));for(var p=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&&(m[A.label]?A.color=m[A.label]:(m[A.label]=A.color=c[p%c.length],p++))}}}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}G.exports={calc:e,crossTraceCalc:r,makePullColorFn:t,generateExtendedColors:o}}}),CB=Xe({"src/traces/pie/event_data.js"(Z,G){"use strict";var v=$p().appendArrayMultiPointValues;G.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]),v(e,E,S.pts),E.type==="funnelarea"&&(delete e.v,delete e.i),e}}}),x3=Xe({"src/traces/pie/plot.js"(Z,G){"use strict";var v=Hn(),x=bc(),S=rf(),E=$n(),e=es(),t=sa(),r=t.strScale,o=t.strTranslate,a=ou(),n=Sp(),i=n.recordMinTextSize,s=n.clearMinTextSize,h=i0().TEXTPAD,c=t0(),m=CB(),p=sa().isValidTextValue;function T(Y,ee){var q=Y._context.staticPlot,oe=Y._fullLayout,ae=oe._size;s("pie",oe),M(ee,Y),X(ee,ae);var j=t.makeTraceGroups(oe._pielayer,ee,"trace").each(function(Q){var re=v.select(this),ce=Q[0],be=ce.trace;se(Q),re.attr("stroke-linejoin","round"),re.each(function(){var Ae=v.select(this).selectAll("g.slice").data(Q);Ae.enter().append("g").classed("slice",!0),Ae.exit().remove();var De=[[[],[]],[[],[]]],ze=!1;Ae.each(function(he,Oe){if(he.hidden){v.select(this).selectAll("path,g").remove();return}he.pointNumber=he.i,he.curveNumber=be.index,De[he.pxmid[1]<0?0:1][he.pxmid[0]<0?0:1].push(he);var tt=ce.cx,ot=ce.cy,Qe=v.select(this),Pt=Qe.selectAll("path.surface").data([he]);if(Pt.enter().append("path").classed("surface",!0).style({"pointer-events":q?"none":"all"}),Qe.call(_,Y,Q),be.pull){var It=+c.castOption(be.pull,he.pts)||0;It>0&&(tt+=It*he.pxmid[0],ot+=It*he.pxmid[1])}he.cxFinal=tt,he.cyFinal=ot;function qt(wt,Ne,Ke,Te){var Ie=Te*(Ne[0]-wt[0]),Ve=Te*(Ne[1]-wt[1]);return"a"+Te*ce.r+","+Te*ce.r+" 0 "+he.largeArc+(Ke?" 1 ":" 0 ")+Ie+","+Ve}var Wt=be.hole;if(he.v===ce.vTotal){var kr="M"+(tt+he.px0[0])+","+(ot+he.px0[1])+qt(he.px0,he.pxmid,!0,1)+qt(he.pxmid,he.px0,!0,1)+"Z";Wt?Pt.attr("d","M"+(tt+Wt*he.px0[0])+","+(ot+Wt*he.px0[1])+qt(he.px0,he.pxmid,!1,Wt)+qt(he.pxmid,he.px0,!1,Wt)+"Z"+kr):Pt.attr("d",kr)}else{var mr=qt(he.px0,he.px1,!0,1);if(Wt){var qr=1-Wt;Pt.attr("d","M"+(tt+Wt*he.px1[0])+","+(ot+Wt*he.px1[1])+qt(he.px1,he.px0,!1,Wt)+"l"+qr*he.px0[0]+","+qr*he.px0[1]+mr+"Z")}else Pt.attr("d","M"+tt+","+ot+"l"+he.px0[0]+","+he.px0[1]+mr+"Z")}fe(Y,he,ce);var Sr=c.castOption(be.textposition,he.pts),Rr=Qe.selectAll("g.slicetext").data(he.text&&Sr!=="none"?[0]:[]);Rr.enter().append("g").classed("slicetext",!0),Rr.exit().remove(),Rr.each(function(){var wt=t.ensureSingle(v.select(this),"text","",function(Pe){Pe.attr("data-notex",1)}),Ne=t.ensureUniformFontSize(Y,Sr==="outside"?w(be,he,oe.font):A(be,he,oe.font));wt.text(he.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Ne).call(a.convertToTspans,Y);var Ke=e.bBox(wt.node()),Te;if(Sr==="outside")Te=z(Ke,he);else if(Te=g(Ke,he,ce),Sr==="auto"&&Te.scale<1){var Ie=t.ensureUniformFontSize(Y,be.outsidetextfont);wt.call(e.font,Ie),Ke=e.bBox(wt.node()),Te=z(Ke,he)}var Ve=Te.textPosAngle,Ce=Ve===void 0?he.pxmid:le(ce.r,Ve);if(Te.targetX=tt+Ce[0]*Te.rCenter+(Te.x||0),Te.targetY=ot+Ce[1]*Te.rCenter+(Te.y||0),V(Te,Ke),Te.outside){var Ee=Te.targetY;he.yLabelMin=Ee-Ke.height/2,he.yLabelMid=Ee,he.yLabelMax=Ee+Ke.height/2,he.labelExtraX=0,he.labelExtraY=0,ze=!0}Te.fontSize=Ne.size,i(be.type,Te,oe),Q[Oe].transform=Te,t.setTransormAndDisplay(wt,Te)})});var Ze=v.select(this).selectAll("g.titletext").data(be.title.text?[0]:[]);if(Ze.enter().append("g").classed("titletext",!0),Ze.exit().remove(),Ze.each(function(){var he=t.ensureSingle(v.select(this),"text","",function(ot){ot.attr("data-notex",1)}),Oe=be.title.text;be._meta&&(Oe=t.templateString(Oe,be._meta)),he.text(Oe).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,be.title.font).call(a.convertToTspans,Y);var tt;be.title.position==="middle center"?tt=F(ce):tt=N(ce,ae),he.attr("transform",o(tt.x,tt.y)+r(Math.min(1,tt.scale))+o(tt.tx,tt.ty))}),ze&&B(De,be),l(Ae,be),ze&&be.automargin){var at=e.bBox(re.node()),nt=be.domain,rt=ae.w*(nt.x[1]-nt.x[0]),st=ae.h*(nt.y[1]-nt.y[0]),Me=(.5*rt-ce.r)/ae.w,ye=(.5*st-ce.r)/ae.h;x.autoMargin(Y,"pie."+be.uid+".automargin",{xl:nt.x[0]-Me,xr:nt.x[1]+Me,yb:nt.y[0]-ye,yt:nt.y[1]+ye,l:Math.max(ce.cx-ce.r-at.left,0),r:Math.max(at.right-(ce.cx+ce.r),0),b:Math.max(at.bottom-(ce.cy+ce.r),0),t:Math.max(ce.cy-ce.r-at.top,0),pad:5})}})});setTimeout(function(){j.selectAll("tspan").each(function(){var Q=v.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function l(Y,ee){Y.each(function(q){var oe=v.select(this);if(!q.labelExtraX&&!q.labelExtraY){oe.select("path.textline").remove();return}var ae=oe.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,ce=(q.yLabelMax-q.yLabelMin)*(q.pxmid[0]<0?-1:1)/4;if(q.labelExtraX){var be=q.labelExtraX*q.pxmid[1]/q.pxmid[0],Ae=q.yLabelMid+q.labelExtraY-(q.cyFinal+q.pxmid[1]);Math.abs(be)>Math.abs(Ae)?re+="l"+Ae*q.pxmid[0]/q.pxmid[1]+","+Ae+"H"+(j+q.labelExtraX+ce):re+="l"+q.labelExtraX+","+be+"v"+(Ae-be)+"h"+ce}else re+="V"+(q.yLabelMid+q.labelExtraY)+"h"+ce;t.ensureSingle(oe,"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 oe=q[0],ae=oe.cx,j=oe.cy,Q=oe.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),Y.on("mouseover",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index];if(!(ee._dragging||be.hovermode===!1)){var De=Ae.hoverinfo;if(Array.isArray(De)&&(De=S.castHoverinfo({hoverinfo:[c.castOption(De,ce.pts)],_module:Q._module},be,0)),De==="all"&&(De="label+text+value+percent+name"),Ae.hovertemplate||De!=="none"&&De!=="skip"&&De){var ze=ce.rInscribed||0,Ze=ae+ce.pxmid[0]*(1-ze),at=j+ce.pxmid[1]*(1-ze),nt=be.separators,rt=[];if(De&&De.indexOf("label")!==-1&&rt.push(ce.label),ce.text=c.castOption(Ae.hovertext||Ae.text,ce.pts),De&&De.indexOf("text")!==-1){var st=ce.text;t.isValidTextValue(st)&&rt.push(st)}ce.value=ce.v,ce.valueLabel=c.formatPieValue(ce.v,nt),De&&De.indexOf("value")!==-1&&rt.push(ce.valueLabel),ce.percent=ce.v/oe.vTotal,ce.percentLabel=c.formatPiePercent(ce.percent,nt),De&&De.indexOf("percent")!==-1&&rt.push(ce.percentLabel);var Me=Ae.hoverlabel,ye=Me.font,he=[];S.loneHover({trace:Q,x0:Ze-ze*oe.r,x1:Ze+ze*oe.r,y:at,_x0:re?ae+ce.TL[0]:Ze-ze*oe.r,_x1:re?ae+ce.TR[0]:Ze+ze*oe.r,_y0:re?j+ce.TL[1]:at-ze*oe.r,_y1:re?j+ce.BL[1]:at+ze*oe.r,text:rt.join("<br>"),name:Ae.hovertemplate||De.indexOf("name")!==-1?Ae.name:void 0,idealAlign:ce.pxmid[0]<0?"left":"right",color:c.castOption(Me.bgcolor,ce.pts)||ce.color,borderColor:c.castOption(Me.bordercolor,ce.pts),fontFamily:c.castOption(ye.family,ce.pts),fontSize:c.castOption(ye.size,ce.pts),fontColor:c.castOption(ye.color,ce.pts),nameLength:c.castOption(Me.namelength,ce.pts),textAlign:c.castOption(Me.align,ce.pts),hovertemplate:c.castOption(Ae.hovertemplate,ce.pts),hovertemplateLabels:ce,eventData:[m(ce,Ae)]},{container:be._hoverlayer.node(),outerContainer:be._paper.node(),gd:ee,inOut_bbox:he}),ce.bbox=he[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,ee.emit("plotly_hover",{points:[m(ce,Ae)],event:v.event})}}),Y.on("mouseout",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index],De=v.select(this).datum();Q._hasHoverEvent&&(ce.originalEvent=v.event,ee.emit("plotly_unhover",{points:[m(De,Ae)],event:v.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(S.loneUnhover(be._hoverlayer.node()),Q._hasHoverLabel=!1)}),Y.on("click",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index];ee._dragging||be.hovermode===!1||(ee._hoverdata=[m(ce,Ae)],S.click(ee,v.event))})}function w(Y,ee,q){var oe=c.castOption(Y.outsidetextfont.color,ee.pts)||c.castOption(Y.textfont.color,ee.pts)||q.color,ae=c.castOption(Y.outsidetextfont.family,ee.pts)||c.castOption(Y.textfont.family,ee.pts)||q.family,j=c.castOption(Y.outsidetextfont.size,ee.pts)||c.castOption(Y.textfont.size,ee.pts)||q.size,Q=c.castOption(Y.outsidetextfont.weight,ee.pts)||c.castOption(Y.textfont.weight,ee.pts)||q.weight,re=c.castOption(Y.outsidetextfont.style,ee.pts)||c.castOption(Y.textfont.style,ee.pts)||q.style,ce=c.castOption(Y.outsidetextfont.variant,ee.pts)||c.castOption(Y.textfont.variant,ee.pts)||q.variant,be=c.castOption(Y.outsidetextfont.textcase,ee.pts)||c.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Ae=c.castOption(Y.outsidetextfont.lineposition,ee.pts)||c.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,De=c.castOption(Y.outsidetextfont.shadow,ee.pts)||c.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:oe,family:ae,size:j,weight:Q,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:De}}function A(Y,ee,q){var oe=c.castOption(Y.insidetextfont.color,ee.pts);!oe&&Y._input.textfont&&(oe=c.castOption(Y._input.textfont.color,ee.pts));var ae=c.castOption(Y.insidetextfont.family,ee.pts)||c.castOption(Y.textfont.family,ee.pts)||q.family,j=c.castOption(Y.insidetextfont.size,ee.pts)||c.castOption(Y.textfont.size,ee.pts)||q.size,Q=c.castOption(Y.insidetextfont.weight,ee.pts)||c.castOption(Y.textfont.weight,ee.pts)||q.weight,re=c.castOption(Y.insidetextfont.style,ee.pts)||c.castOption(Y.textfont.style,ee.pts)||q.style,ce=c.castOption(Y.insidetextfont.variant,ee.pts)||c.castOption(Y.textfont.variant,ee.pts)||q.variant,be=c.castOption(Y.insidetextfont.textcase,ee.pts)||c.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Ae=c.castOption(Y.insidetextfont.lineposition,ee.pts)||c.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,De=c.castOption(Y.insidetextfont.shadow,ee.pts)||c.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:oe||E.contrast(ee.color),family:ae,size:j,weight:Q,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:De}}function M(Y,ee){for(var q,oe,ae=0;ae<Y.length;ae++)if(q=Y[ae][0],oe=q.trace,oe.title.text){var j=oe.title.text;oe._meta&&(j=t.templateString(j,oe._meta));var Q=e.tester.append("text").attr("data-notex",1).text(j).call(e.font,oe.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 oe=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,ce=ee.halfangle,be=ee.midangle,Ae=q.trace.insidetextorientation,De=Ae==="horizontal",ze=Ae==="tangential",Ze=Ae==="radial",at=Ae==="auto",nt=[],rt;if(!at){var st=function(Qe,Pt){if(b(ee,Qe)){var It=Math.abs(Qe-ee.startangle),qt=Math.abs(Qe-ee.stopangle),Wt=It<qt?It:qt;Pt==="tan"?rt=u(Y,oe,Q,Wt,0):rt=d(Y,oe,Q,Wt,Math.PI/2),rt.textPosAngle=Qe,nt.push(rt)}},Me;if(De||ze){for(Me=4;Me>=-4;Me-=2)st(Math.PI*Me,"tan");for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+1),"tan")}if(De||Ze){for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+1.5),"rad");for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+.5),"rad")}}if(re||at||De){var ye=Math.sqrt(Y.width*Y.width+Y.height*Y.height);if(rt={scale:ae*oe*2/ye,rCenter:1-ae,rotate:0},rt.textPosAngle=(ee.startangle+ee.stopangle)/2,rt.scale>=1)return rt;nt.push(rt)}(at||Ze)&&(rt=d(Y,oe,Q,ce,be),rt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(rt)),(at||ze)&&(rt=u(Y,oe,Q,ce,be),rt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(rt));for(var he=0,Oe=0,tt=0;tt<nt.length;tt++){var ot=nt[tt].scale;if(Oe<ot&&(Oe=ot,he=tt),!at&&Oe>=1)break}return nt[he]}function b(Y,ee){var q=Y.startangle,oe=Y.stopangle;return q>ee&&ee>oe||q<ee&&ee<oe}function d(Y,ee,q,oe,ae){ee=Math.max(0,ee-2*h);var j=Y.width/Y.height,Q=R(j,oe,ee,q);return{scale:Q*2/Y.height,rCenter:y(j,Q/ee),rotate:f(ae)}}function u(Y,ee,q,oe,ae){ee=Math.max(0,ee-2*h);var j=Y.height/Y.width,Q=R(j,oe,ee,q);return{scale:Q*2/Y.width,rCenter:y(j,Q/ee),rotate:f(ae+Math.PI/2)}}function y(Y,ee){return Math.cos(ee)-Y*ee}function f(Y){return(180/Math.PI*Y+720)%180-90}function R(Y,ee,q,oe){var ae=Y+1/(2*Math.tan(ee));return q*Math.min(1/(Math.sqrt(ae*ae+.5)+ae),oe/(Math.sqrt(Y*Y+oe/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],oe=ee.pxmid[1],ae=Y.width/2,j=Y.height/2;return q<0&&(ae*=-1),oe<0&&(j*=-1),{scale:1,rCenter:1,rotate:0,x:ae+Math.abs(j)*(ae>0?1:-1)/2,y:j/(1+q*q/(oe*oe)),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,oe=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 ce=O(Y.r,Y.trace.aspectratio),be=ee.w*(j.domain.x[1]-j.domain.x[0])/2;return j.title.position.indexOf("left")!==-1?(be=be+ce,Q.x-=(1+ae)*ce,re.tx+=Y.titleBox.width/2):j.title.position.indexOf("center")!==-1?be*=2:j.title.position.indexOf("right")!==-1&&(be=be+ce,Q.x+=(1+ae)*ce,re.tx-=Y.titleBox.width/2),q=be/Y.titleBox.width,oe=P(Y,ee)/Y.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(q,oe),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,oe=ee.h*(q.domain.y[1]-q.domain.y[0]);return Math.min(Y.titleBox.height,oe/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,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze,at;function nt(ye,he){return ye.pxmid[1]-he.pxmid[1]}function rt(ye,he){return he.pxmid[1]-ye.pxmid[1]}function st(ye,he){he||(he={});var Oe=he.labelExtraY+(oe?he.yLabelMax:he.yLabelMin),tt=oe?ye.yLabelMin:ye.yLabelMax,ot=oe?ye.yLabelMax:ye.yLabelMin,Qe=ye.cyFinal+Q(ye.px0[1],ye.px1[1]),Pt=Oe-tt,It,qt,Wt,kr,mr,qr;if(Pt*ce>0&&(ye.labelExtraY=Pt),!!t.isArrayOrTypedArray(ee.pull))for(qt=0;qt<De.length;qt++)Wt=De[qt],!(Wt===ye||(c.castOption(ee.pull,ye.pts)||0)>=(c.castOption(ee.pull,Wt.pts)||0))&&((ye.pxmid[1]-Wt.pxmid[1])*ce>0?(kr=Wt.cyFinal+Q(Wt.px0[1],Wt.px1[1]),Pt=kr-tt-ye.labelExtraY,Pt*ce>0&&(ye.labelExtraY+=Pt)):(ot+ye.labelExtraY-Qe)*ce>0&&(It=3*re*Math.abs(qt-De.indexOf(ye)),mr=Wt.cxFinal+j(Wt.px0[0],Wt.px1[0]),qr=mr+It-(ye.cxFinal+ye.pxmid[0])-ye.labelExtraX,qr*re>0&&(ye.labelExtraX+=qr)))}for(oe=0;oe<2;oe++)for(ae=oe?nt:rt,Q=oe?Math.max:Math.min,ce=oe?1:-1,q=0;q<2;q++){for(j=q?Math.max:Math.min,re=q?1:-1,be=Y[oe][q],be.sort(ae),Ae=Y[1-oe][q],De=Ae.concat(be),Ze=[],ze=0;ze<be.length;ze++)be[ze].yLabelMid!==void 0&&Ze.push(be[ze]);for(at=!1,ze=0;oe&&ze<Ae.length;ze++)if(Ae[ze].yLabelMid!==void 0){at=Ae[ze];break}for(ze=0;ze<Ze.length;ze++){var Me=ze&&Ze[ze-1];at&&!ze&&(Me=at),st(Ze[ze],Me)}}}function X(Y,ee){for(var q=[],oe=0;oe<Y.length;oe++){var ae=Y[oe][0],j=ae.trace,Q=j.domain,re=ee.w*(Q.x[1]-Q.x[0]),ce=ee.h*(Q.y[1]-Q.y[0]);j.title.text&&j.title.position!=="middle center"&&(ce-=P(ae,ee));var be=re/2,Ae=ce/2;j.type==="funnelarea"&&!j.scalegroup&&(Ae/=j.aspectratio),ae.r=Math.min(be,Ae)/(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])-ce/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,oe,ae,j=0;j<ee.length;j++){var Q=1/0,re=ee[j];for(oe=0;oe<Y.length;oe++)if(q=Y[oe][0],ae=q.trace,ae.scalegroup===re){var ce;if(ae.type==="pie")ce=q.r*q.r;else if(ae.type==="funnelarea"){var be,Ae;ae.aspectratio>1?(be=q.r,Ae=be/ae.aspectratio):(Ae=q.r,be=Ae*ae.aspectratio),be*=(1+ae.baseratio)/2,ce=be*Ae}Q=Math.min(Q,ce/q.vTotal)}for(oe=0;oe<Y.length;oe++)if(q=Y[oe][0],ae=q.trace,ae.scalegroup===re){var De=Q*q.vTotal;ae.type==="funnelarea"&&(De/=(1+ae.baseratio)/2,De/=ae.aspectratio),q.r=Math.sqrt(De)}}}function se(Y){var ee=Y[0],q=ee.r,oe=ee.trace,ae=c.getRotationAngle(oe.rotation),j=2*Math.PI/ee.vTotal,Q="px0",re="px1",ce,be,Ae;if(oe.direction==="counterclockwise"){for(ce=0;ce<Y.length&&Y[ce].hidden;ce++);if(ce===Y.length)return;ae+=j*Y[ce].v,j*=-1,Q="px1",re="px0"}for(Ae=le(q,ae),ce=0;ce<Y.length;ce++)be=Y[ce],!be.hidden&&(be[Q]=Ae,be.startangle=ae,ae+=j*be.v/2,be.pxmid=le(q,ae),be.midangle=ae,ae+=j*be.v/2,Ae=le(q,ae),be.stopangle=ae,be[re]=Ae,be.largeArc=be.v>ee.vTotal/2?1:0,be.halfangle=Math.PI*Math.min(be.v/ee.vTotal,.5),be.ring=1-oe.hole,be.rInscribed=L(be,ee))}function le(Y,ee){return[Y*Math.sin(ee),-Y*Math.cos(ee)]}function fe(Y,ee,q){var oe=Y._fullLayout,ae=q.trace,j=ae.texttemplate,Q=ae.textinfo;if(!j&&Q&&Q!=="none"){var re=Q.split("+"),ce=function(he){return re.indexOf(he)!==-1},be=ce("label"),Ae=ce("text"),De=ce("value"),ze=ce("percent"),Ze=oe.separators,at;if(at=be?[ee.label]:[],Ae){var nt=c.getFirstFilled(ae.text,ee.pts);p(nt)&&at.push(nt)}De&&at.push(c.formatPieValue(ee.v,Ze)),ze&&at.push(c.formatPiePercent(ee.v/q.vTotal,Ze)),ee.text=at.join("<br>")}function rt(he){return{label:he.label,value:he.v,valueLabel:c.formatPieValue(he.v,oe.separators),percent:he.v/q.vTotal,percentLabel:c.formatPiePercent(he.v/q.vTotal,oe.separators),color:he.color,text:he.text,customdata:t.castOption(ae,he.i,"customdata")}}if(j){var st=t.castOption(ae,ee.i,"texttemplate");if(!st)ee.text="";else{var Me=rt(ee),ye=c.getFirstFilled(ae.text,ee.pts);(p(ye)||ye==="")&&(Me.text=ye),ee.text=t.texttemplateString({data:[Me,ae._meta],fallback:ae.texttemplatefallback,labels:Me,locale:Y._fullLayout._d3locale,template:st})}}}function V(Y,ee){var q=Y.rotate*Math.PI/180,oe=Math.cos(q),ae=Math.sin(q),j=(ee.left+ee.right)/2,Q=(ee.top+ee.bottom)/2;Y.textX=j*oe-Q*ae,Y.textY=j*ae+Q*oe,Y.noCenter=!0}G.exports={plot:T,formatSliceLabel:fe,transformInsideText:g,determineInsideTextFont:A,positionTitleOutside:N,prerenderTitles:M,layoutAreas:X,attachFxHandlers:_,computeTransform:V}}}),LB=Xe({"src/traces/pie/style.js"(Z,G){"use strict";var v=Hn(),x=i1(),S=Sp().resizeText;G.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=v.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){v.select(this).call(x,i,a,e)})})}}}),PB=Xe({"src/traces/pie/base_plot.js"(Z){"use strict";var G=bc();Z.name="pie",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),IB=Xe({"src/traces/pie/index.js"(Z,G){"use strict";G.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=Xe({"lib/pie.js"(Z,G){"use strict";G.exports=IB()}}),DB=Xe({"src/traces/sunburst/base_plot.js"(Z){"use strict";var G=bc();Z.name="sunburst",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),nM=Xe({"src/traces/sunburst/constants.js"(Z,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),J_=Xe({"src/traces/sunburst/attributes.js"(Z,G){"use strict";var v=ru(),{hovertemplateAttrs:x,texttemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ku(),t=wc().attributes,r=og(),o=nM(),a=Qo().extendFlat,n=Gh().pattern;G.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({},v.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=Xe({"src/traces/sunburst/layout_attributes.js"(Z,G){"use strict";G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),zB=Xe({"src/traces/sunburst/defaults.js"(Z,G){"use strict";var v=sa(),x=J_(),S=wc().defaults,E=gd().handleText,e=sg().handleMarkerDefaults,t=rc(),r=t.hasColorscale,o=t.handleDefaults;G.exports=function(n,i,s,h){function c(A,M){return v.coerce(n,i,x,A,M)}var m=c("labels"),p=c("parents");if(!m||!m.length||!p||!p.length){i.visible=!1;return}var T=c("values");T&&T.length?c("branchvalues"):c("count"),c("level"),c("maxdepth"),e(n,i,h,c);var l=i._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;l&&o(n,i,h,c,{prefix:"marker.",cLetter:"c"}),c("leaf.opacity",l?1:.7);var _=c("text");c("texttemplate"),c("texttemplatefallback"),i.texttemplate||c("textinfo",v.isArrayOrTypedArray(_)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var w="auto";E(n,i,h,c,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("insidetextorientation"),c("sort"),c("rotation"),c("root.color"),S(i,h,c),i._length=null}}}),FB=Xe({"src/traces/sunburst/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=oM();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("sunburstcolorway",e.colorway),t("extendsunburstcolors")}}}),$_=Xe({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(Te,Ie){return Te.parent===Ie.parent?1:2}function S(Te){return Te.reduce(E,0)/Te.length}function E(Te,Ie){return Te+Ie.x}function e(Te){return 1+Te.reduce(t,0)}function t(Te,Ie){return Math.max(Te,Ie.y)}function r(Te){for(var Ie;Ie=Te.children;)Te=Ie[0];return Te}function o(Te){for(var Ie;Ie=Te.children;)Te=Ie[Ie.length-1];return Te}function a(){var Te=x,Ie=1,Ve=1,Ce=!1;function Ee(Pe){var ft,ct=0;Pe.eachAfter(function(er){var Lr=er.children;Lr?(er.x=S(Lr),er.y=e(Lr)):(er.x=ft?ct+=Te(er,ft):0,er.y=0,ft=er)});var _t=r(Pe),Ct=o(Pe),ir=_t.x-Te(_t,Ct)/2,rr=Ct.x+Te(Ct,_t)/2;return Pe.eachAfter(Ce?function(er){er.x=(er.x-Pe.x)*Ie,er.y=(Pe.y-er.y)*Ve}:function(er){er.x=(er.x-ir)/(rr-ir)*Ie,er.y=(1-(Pe.y?er.y/Pe.y:1))*Ve})}return Ee.separation=function(Pe){return arguments.length?(Te=Pe,Ee):Te},Ee.size=function(Pe){return arguments.length?(Ce=!1,Ie=+Pe[0],Ve=+Pe[1],Ee):Ce?null:[Ie,Ve]},Ee.nodeSize=function(Pe){return arguments.length?(Ce=!0,Ie=+Pe[0],Ve=+Pe[1],Ee):Ce?[Ie,Ve]:null},Ee}function n(Te){var Ie=0,Ve=Te.children,Ce=Ve&&Ve.length;if(!Ce)Ie=1;else for(;--Ce>=0;)Ie+=Ve[Ce].value;Te.value=Ie}function i(){return this.eachAfter(n)}function s(Te){var Ie=this,Ve,Ce=[Ie],Ee,Pe,ft;do for(Ve=Ce.reverse(),Ce=[];Ie=Ve.pop();)if(Te(Ie),Ee=Ie.children,Ee)for(Pe=0,ft=Ee.length;Pe<ft;++Pe)Ce.push(Ee[Pe]);while(Ce.length);return this}function h(Te){for(var Ie=this,Ve=[Ie],Ce,Ee;Ie=Ve.pop();)if(Te(Ie),Ce=Ie.children,Ce)for(Ee=Ce.length-1;Ee>=0;--Ee)Ve.push(Ce[Ee]);return this}function c(Te){for(var Ie=this,Ve=[Ie],Ce=[],Ee,Pe,ft;Ie=Ve.pop();)if(Ce.push(Ie),Ee=Ie.children,Ee)for(Pe=0,ft=Ee.length;Pe<ft;++Pe)Ve.push(Ee[Pe]);for(;Ie=Ce.pop();)Te(Ie);return this}function m(Te){return this.eachAfter(function(Ie){for(var Ve=+Te(Ie.data)||0,Ce=Ie.children,Ee=Ce&&Ce.length;--Ee>=0;)Ve+=Ce[Ee].value;Ie.value=Ve})}function p(Te){return this.eachBefore(function(Ie){Ie.children&&Ie.children.sort(Te)})}function T(Te){for(var Ie=this,Ve=l(Ie,Te),Ce=[Ie];Ie!==Ve;)Ie=Ie.parent,Ce.push(Ie);for(var Ee=Ce.length;Te!==Ve;)Ce.splice(Ee,0,Te),Te=Te.parent;return Ce}function l(Te,Ie){if(Te===Ie)return Te;var Ve=Te.ancestors(),Ce=Ie.ancestors(),Ee=null;for(Te=Ve.pop(),Ie=Ce.pop();Te===Ie;)Ee=Te,Te=Ve.pop(),Ie=Ce.pop();return Ee}function _(){for(var Te=this,Ie=[Te];Te=Te.parent;)Ie.push(Te);return Ie}function w(){var Te=[];return this.each(function(Ie){Te.push(Ie)}),Te}function A(){var Te=[];return this.eachBefore(function(Ie){Ie.children||Te.push(Ie)}),Te}function M(){var Te=this,Ie=[];return Te.each(function(Ve){Ve!==Te&&Ie.push({source:Ve.parent,target:Ve})}),Ie}function g(Te,Ie){var Ve=new f(Te),Ce=+Te.value&&(Ve.value=Te.value),Ee,Pe=[Ve],ft,ct,_t,Ct;for(Ie==null&&(Ie=d);Ee=Pe.pop();)if(Ce&&(Ee.value=+Ee.data.value),(ct=Ie(Ee.data))&&(Ct=ct.length))for(Ee.children=new Array(Ct),_t=Ct-1;_t>=0;--_t)Pe.push(ft=Ee.children[_t]=new f(ct[_t])),ft.parent=Ee,ft.depth=Ee.depth+1;return Ve.eachBefore(y)}function b(){return g(this).eachBefore(u)}function d(Te){return Te.children}function u(Te){Te.data=Te.data.data}function y(Te){var Ie=0;do Te.height=Ie;while((Te=Te.parent)&&Te.height<++Ie)}function f(Te){this.data=Te,this.depth=this.height=0,this.parent=null}f.prototype=g.prototype={constructor:f,count:i,each:s,eachAfter:c,eachBefore:h,sum:m,sort:p,path:T,ancestors:_,descendants:w,leaves:A,links:M,copy:b};var R=Array.prototype.slice;function L(Te){for(var Ie=Te.length,Ve,Ce;Ie;)Ce=Math.random()*Ie--|0,Ve=Te[Ie],Te[Ie]=Te[Ce],Te[Ce]=Ve;return Te}function z(Te){for(var Ie=0,Ve=(Te=L(R.call(Te))).length,Ce=[],Ee,Pe;Ie<Ve;)Ee=Te[Ie],Pe&&O(Pe,Ee)?++Ie:(Pe=U(Ce=F(Ce,Ee)),Ie=0);return Pe}function F(Te,Ie){var Ve,Ce;if(P(Ie,Te))return[Ie];for(Ve=0;Ve<Te.length;++Ve)if(N(Ie,Te[Ve])&&P(X(Te[Ve],Ie),Te))return[Te[Ve],Ie];for(Ve=0;Ve<Te.length-1;++Ve)for(Ce=Ve+1;Ce<Te.length;++Ce)if(N(X(Te[Ve],Te[Ce]),Ie)&&N(X(Te[Ve],Ie),Te[Ce])&&N(X(Te[Ce],Ie),Te[Ve])&&P($(Te[Ve],Te[Ce],Ie),Te))return[Te[Ve],Te[Ce],Ie];throw new Error}function N(Te,Ie){var Ve=Te.r-Ie.r,Ce=Ie.x-Te.x,Ee=Ie.y-Te.y;return Ve<0||Ve*Ve<Ce*Ce+Ee*Ee}function O(Te,Ie){var Ve=Te.r-Ie.r+1e-6,Ce=Ie.x-Te.x,Ee=Ie.y-Te.y;return Ve>0&&Ve*Ve>Ce*Ce+Ee*Ee}function P(Te,Ie){for(var Ve=0;Ve<Ie.length;++Ve)if(!O(Te,Ie[Ve]))return!1;return!0}function U(Te){switch(Te.length){case 1:return B(Te[0]);case 2:return X(Te[0],Te[1]);case 3:return $(Te[0],Te[1],Te[2])}}function B(Te){return{x:Te.x,y:Te.y,r:Te.r}}function X(Te,Ie){var Ve=Te.x,Ce=Te.y,Ee=Te.r,Pe=Ie.x,ft=Ie.y,ct=Ie.r,_t=Pe-Ve,Ct=ft-Ce,ir=ct-Ee,rr=Math.sqrt(_t*_t+Ct*Ct);return{x:(Ve+Pe+_t/rr*ir)/2,y:(Ce+ft+Ct/rr*ir)/2,r:(rr+Ee+ct)/2}}function $(Te,Ie,Ve){var Ce=Te.x,Ee=Te.y,Pe=Te.r,ft=Ie.x,ct=Ie.y,_t=Ie.r,Ct=Ve.x,ir=Ve.y,rr=Ve.r,er=Ce-ft,Lr=Ce-Ct,fa=Ee-ct,Da=Ee-ir,Ia=_t-Pe,qa=rr-Pe,Wa=Ce*Ce+Ee*Ee-Pe*Pe,Ca=Wa-ft*ft-ct*ct+_t*_t,hi=Wa-Ct*Ct-ir*ir+rr*rr,wi=Lr*fa-er*Da,Kt=(fa*hi-Da*Ca)/(wi*2)-Ce,Ft=(Da*Ia-fa*qa)/wi,Yt=(Lr*Ca-er*hi)/(wi*2)-Ee,Jt=(er*qa-Lr*Ia)/wi,Fr=Ft*Ft+Jt*Jt-1,ta=2*(Pe+Kt*Ft+Yt*Jt),ra=Kt*Kt+Yt*Yt-Pe*Pe,ca=-(Fr?(ta+Math.sqrt(ta*ta-4*Fr*ra))/(2*Fr):ra/ta);return{x:Ce+Kt+Ft*ca,y:Ee+Yt+Jt*ca,r:ca}}function se(Te,Ie,Ve){var Ce=Te.x-Ie.x,Ee,Pe,ft=Te.y-Ie.y,ct,_t,Ct=Ce*Ce+ft*ft;Ct?(Pe=Ie.r+Ve.r,Pe*=Pe,_t=Te.r+Ve.r,_t*=_t,Pe>_t?(Ee=(Ct+_t-Pe)/(2*Ct),ct=Math.sqrt(Math.max(0,_t/Ct-Ee*Ee)),Ve.x=Te.x-Ee*Ce-ct*ft,Ve.y=Te.y-Ee*ft+ct*Ce):(Ee=(Ct+Pe-_t)/(2*Ct),ct=Math.sqrt(Math.max(0,Pe/Ct-Ee*Ee)),Ve.x=Ie.x+Ee*Ce-ct*ft,Ve.y=Ie.y+Ee*ft+ct*Ce)):(Ve.x=Ie.x+Ve.r,Ve.y=Ie.y)}function le(Te,Ie){var Ve=Te.r+Ie.r-1e-6,Ce=Ie.x-Te.x,Ee=Ie.y-Te.y;return Ve>0&&Ve*Ve>Ce*Ce+Ee*Ee}function fe(Te){var Ie=Te._,Ve=Te.next._,Ce=Ie.r+Ve.r,Ee=(Ie.x*Ve.r+Ve.x*Ie.r)/Ce,Pe=(Ie.y*Ve.r+Ve.y*Ie.r)/Ce;return Ee*Ee+Pe*Pe}function V(Te){this._=Te,this.next=null,this.previous=null}function Y(Te){if(!(Ee=Te.length))return 0;var Ie,Ve,Ce,Ee,Pe,ft,ct,_t,Ct,ir,rr;if(Ie=Te[0],Ie.x=0,Ie.y=0,!(Ee>1))return Ie.r;if(Ve=Te[1],Ie.x=-Ve.r,Ve.x=Ie.r,Ve.y=0,!(Ee>2))return Ie.r+Ve.r;se(Ve,Ie,Ce=Te[2]),Ie=new V(Ie),Ve=new V(Ve),Ce=new V(Ce),Ie.next=Ce.previous=Ve,Ve.next=Ie.previous=Ce,Ce.next=Ve.previous=Ie;e:for(ct=3;ct<Ee;++ct){se(Ie._,Ve._,Ce=Te[ct]),Ce=new V(Ce),_t=Ve.next,Ct=Ie.previous,ir=Ve._.r,rr=Ie._.r;do if(ir<=rr){if(le(_t._,Ce._)){Ve=_t,Ie.next=Ve,Ve.previous=Ie,--ct;continue e}ir+=_t._.r,_t=_t.next}else{if(le(Ct._,Ce._)){Ie=Ct,Ie.next=Ve,Ve.previous=Ie,--ct;continue e}rr+=Ct._.r,Ct=Ct.previous}while(_t!==Ct.next);for(Ce.previous=Ie,Ce.next=Ve,Ie.next=Ve.previous=Ve=Ce,Pe=fe(Ie);(Ce=Ce.next)!==Ve;)(ft=fe(Ce))<Pe&&(Ie=Ce,Pe=ft);Ve=Ie.next}for(Ie=[Ve._],Ce=Ve;(Ce=Ce.next)!==Ve;)Ie.push(Ce._);for(Ce=z(Ie),ct=0;ct<Ee;++ct)Ie=Te[ct],Ie.x-=Ce.x,Ie.y-=Ce.y;return Ce.r}function ee(Te){return Y(Te),Te}function q(Te){return Te==null?null:oe(Te)}function oe(Te){if(typeof Te!="function")throw new Error;return Te}function ae(){return 0}function j(Te){return function(){return Te}}function Q(Te){return Math.sqrt(Te.value)}function re(){var Te=null,Ie=1,Ve=1,Ce=ae;function Ee(Pe){return Pe.x=Ie/2,Pe.y=Ve/2,Te?Pe.eachBefore(ce(Te)).eachAfter(be(Ce,.5)).eachBefore(Ae(1)):Pe.eachBefore(ce(Q)).eachAfter(be(ae,1)).eachAfter(be(Ce,Pe.r/Math.min(Ie,Ve))).eachBefore(Ae(Math.min(Ie,Ve)/(2*Pe.r))),Pe}return Ee.radius=function(Pe){return arguments.length?(Te=q(Pe),Ee):Te},Ee.size=function(Pe){return arguments.length?(Ie=+Pe[0],Ve=+Pe[1],Ee):[Ie,Ve]},Ee.padding=function(Pe){return arguments.length?(Ce=typeof Pe=="function"?Pe:j(+Pe),Ee):Ce},Ee}function ce(Te){return function(Ie){Ie.children||(Ie.r=Math.max(0,+Te(Ie)||0))}}function be(Te,Ie){return function(Ve){if(Ce=Ve.children){var Ce,Ee,Pe=Ce.length,ft=Te(Ve)*Ie||0,ct;if(ft)for(Ee=0;Ee<Pe;++Ee)Ce[Ee].r+=ft;if(ct=Y(Ce),ft)for(Ee=0;Ee<Pe;++Ee)Ce[Ee].r-=ft;Ve.r=ct+ft}}}function Ae(Te){return function(Ie){var Ve=Ie.parent;Ie.r*=Te,Ve&&(Ie.x=Ve.x+Te*Ie.x,Ie.y=Ve.y+Te*Ie.y)}}function De(Te){Te.x0=Math.round(Te.x0),Te.y0=Math.round(Te.y0),Te.x1=Math.round(Te.x1),Te.y1=Math.round(Te.y1)}function ze(Te,Ie,Ve,Ce,Ee){for(var Pe=Te.children,ft,ct=-1,_t=Pe.length,Ct=Te.value&&(Ce-Ie)/Te.value;++ct<_t;)ft=Pe[ct],ft.y0=Ve,ft.y1=Ee,ft.x0=Ie,ft.x1=Ie+=ft.value*Ct}function Ze(){var Te=1,Ie=1,Ve=0,Ce=!1;function Ee(ft){var ct=ft.height+1;return ft.x0=ft.y0=Ve,ft.x1=Te,ft.y1=Ie/ct,ft.eachBefore(Pe(Ie,ct)),Ce&&ft.eachBefore(De),ft}function Pe(ft,ct){return function(_t){_t.children&&ze(_t,_t.x0,ft*(_t.depth+1)/ct,_t.x1,ft*(_t.depth+2)/ct);var Ct=_t.x0,ir=_t.y0,rr=_t.x1-Ve,er=_t.y1-Ve;rr<Ct&&(Ct=rr=(Ct+rr)/2),er<ir&&(ir=er=(ir+er)/2),_t.x0=Ct,_t.y0=ir,_t.x1=rr,_t.y1=er}}return Ee.round=function(ft){return arguments.length?(Ce=!!ft,Ee):Ce},Ee.size=function(ft){return arguments.length?(Te=+ft[0],Ie=+ft[1],Ee):[Te,Ie]},Ee.padding=function(ft){return arguments.length?(Ve=+ft,Ee):Ve},Ee}var at="$",nt={depth:-1},rt={};function st(Te){return Te.id}function Me(Te){return Te.parentId}function ye(){var Te=st,Ie=Me;function Ve(Ce){var Ee,Pe,ft=Ce.length,ct,_t,Ct,ir=new Array(ft),rr,er,Lr={};for(Pe=0;Pe<ft;++Pe)Ee=Ce[Pe],Ct=ir[Pe]=new f(Ee),(rr=Te(Ee,Pe,Ce))!=null&&(rr+="")&&(er=at+(Ct.id=rr),Lr[er]=er in Lr?rt:Ct);for(Pe=0;Pe<ft;++Pe)if(Ct=ir[Pe],rr=Ie(Ce[Pe],Pe,Ce),rr==null||!(rr+="")){if(ct)throw new Error("multiple roots");ct=Ct}else{if(_t=Lr[at+rr],!_t)throw new Error("missing: "+rr);if(_t===rt)throw new Error("ambiguous: "+rr);_t.children?_t.children.push(Ct):_t.children=[Ct],Ct.parent=_t}if(!ct)throw new Error("no root");if(ct.parent=nt,ct.eachBefore(function(fa){fa.depth=fa.parent.depth+1,--ft}).eachBefore(y),ct.parent=null,ft>0)throw new Error("cycle");return ct}return Ve.id=function(Ce){return arguments.length?(Te=oe(Ce),Ve):Te},Ve.parentId=function(Ce){return arguments.length?(Ie=oe(Ce),Ve):Ie},Ve}function he(Te,Ie){return Te.parent===Ie.parent?1:2}function Oe(Te){var Ie=Te.children;return Ie?Ie[0]:Te.t}function tt(Te){var Ie=Te.children;return Ie?Ie[Ie.length-1]:Te.t}function ot(Te,Ie,Ve){var Ce=Ve/(Ie.i-Te.i);Ie.c-=Ce,Ie.s+=Ve,Te.c+=Ce,Ie.z+=Ve,Ie.m+=Ve}function Qe(Te){for(var Ie=0,Ve=0,Ce=Te.children,Ee=Ce.length,Pe;--Ee>=0;)Pe=Ce[Ee],Pe.z+=Ie,Pe.m+=Ie,Ie+=Pe.s+(Ve+=Pe.c)}function Pt(Te,Ie,Ve){return Te.a.parent===Ie.parent?Te.a:Ve}function It(Te,Ie){this._=Te,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ie}It.prototype=Object.create(f.prototype);function qt(Te){for(var Ie=new It(Te,0),Ve,Ce=[Ie],Ee,Pe,ft,ct;Ve=Ce.pop();)if(Pe=Ve._.children)for(Ve.children=new Array(ct=Pe.length),ft=ct-1;ft>=0;--ft)Ce.push(Ee=Ve.children[ft]=new It(Pe[ft],ft)),Ee.parent=Ve;return(Ie.parent=new It(null,0)).children=[Ie],Ie}function Wt(){var Te=he,Ie=1,Ve=1,Ce=null;function Ee(Ct){var ir=qt(Ct);if(ir.eachAfter(Pe),ir.parent.m=-ir.z,ir.eachBefore(ft),Ce)Ct.eachBefore(_t);else{var rr=Ct,er=Ct,Lr=Ct;Ct.eachBefore(function(Wa){Wa.x<rr.x&&(rr=Wa),Wa.x>er.x&&(er=Wa),Wa.depth>Lr.depth&&(Lr=Wa)});var fa=rr===er?1:Te(rr,er)/2,Da=fa-rr.x,Ia=Ie/(er.x+fa+Da),qa=Ve/(Lr.depth||1);Ct.eachBefore(function(Wa){Wa.x=(Wa.x+Da)*Ia,Wa.y=Wa.depth*qa})}return Ct}function Pe(Ct){var ir=Ct.children,rr=Ct.parent.children,er=Ct.i?rr[Ct.i-1]:null;if(ir){Qe(Ct);var Lr=(ir[0].z+ir[ir.length-1].z)/2;er?(Ct.z=er.z+Te(Ct._,er._),Ct.m=Ct.z-Lr):Ct.z=Lr}else er&&(Ct.z=er.z+Te(Ct._,er._));Ct.parent.A=ct(Ct,er,Ct.parent.A||rr[0])}function ft(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function ct(Ct,ir,rr){if(ir){for(var er=Ct,Lr=Ct,fa=ir,Da=er.parent.children[0],Ia=er.m,qa=Lr.m,Wa=fa.m,Ca=Da.m,hi;fa=tt(fa),er=Oe(er),fa&&er;)Da=Oe(Da),Lr=tt(Lr),Lr.a=Ct,hi=fa.z+Wa-er.z-Ia+Te(fa._,er._),hi>0&&(ot(Pt(fa,Ct,rr),Ct,hi),Ia+=hi,qa+=hi),Wa+=fa.m,Ia+=er.m,Ca+=Da.m,qa+=Lr.m;fa&&!tt(Lr)&&(Lr.t=fa,Lr.m+=Wa-qa),er&&!Oe(Da)&&(Da.t=er,Da.m+=Ia-Ca,rr=Ct)}return rr}function _t(Ct){Ct.x*=Ie,Ct.y=Ct.depth*Ve}return Ee.separation=function(Ct){return arguments.length?(Te=Ct,Ee):Te},Ee.size=function(Ct){return arguments.length?(Ce=!1,Ie=+Ct[0],Ve=+Ct[1],Ee):Ce?null:[Ie,Ve]},Ee.nodeSize=function(Ct){return arguments.length?(Ce=!0,Ie=+Ct[0],Ve=+Ct[1],Ee):Ce?[Ie,Ve]:null},Ee}function kr(Te,Ie,Ve,Ce,Ee){for(var Pe=Te.children,ft,ct=-1,_t=Pe.length,Ct=Te.value&&(Ee-Ve)/Te.value;++ct<_t;)ft=Pe[ct],ft.x0=Ie,ft.x1=Ce,ft.y0=Ve,ft.y1=Ve+=ft.value*Ct}var mr=(1+Math.sqrt(5))/2;function qr(Te,Ie,Ve,Ce,Ee,Pe){for(var ft=[],ct=Ie.children,_t,Ct,ir=0,rr=0,er=ct.length,Lr,fa,Da=Ie.value,Ia,qa,Wa,Ca,hi,wi,Kt;ir<er;){Lr=Ee-Ve,fa=Pe-Ce;do Ia=ct[rr++].value;while(!Ia&&rr<er);for(qa=Wa=Ia,wi=Math.max(fa/Lr,Lr/fa)/(Da*Te),Kt=Ia*Ia*wi,hi=Math.max(Wa/Kt,Kt/qa);rr<er;++rr){if(Ia+=Ct=ct[rr].value,Ct<qa&&(qa=Ct),Ct>Wa&&(Wa=Ct),Kt=Ia*Ia*wi,Ca=Math.max(Wa/Kt,Kt/qa),Ca>hi){Ia-=Ct;break}hi=Ca}ft.push(_t={value:Ia,dice:Lr<fa,children:ct.slice(ir,rr)}),_t.dice?ze(_t,Ve,Ce,Ee,Da?Ce+=fa*Ia/Da:Pe):kr(_t,Ve,Ce,Da?Ve+=Lr*Ia/Da:Ee,Pe),Da-=Ia,ir=rr}return ft}var Sr=function Te(Ie){function Ve(Ce,Ee,Pe,ft,ct){qr(Ie,Ce,Ee,Pe,ft,ct)}return Ve.ratio=function(Ce){return Te((Ce=+Ce)>1?Ce:1)},Ve}(mr);function Rr(){var Te=Sr,Ie=!1,Ve=1,Ce=1,Ee=[0],Pe=ae,ft=ae,ct=ae,_t=ae,Ct=ae;function ir(er){return er.x0=er.y0=0,er.x1=Ve,er.y1=Ce,er.eachBefore(rr),Ee=[0],Ie&&er.eachBefore(De),er}function rr(er){var Lr=Ee[er.depth],fa=er.x0+Lr,Da=er.y0+Lr,Ia=er.x1-Lr,qa=er.y1-Lr;Ia<fa&&(fa=Ia=(fa+Ia)/2),qa<Da&&(Da=qa=(Da+qa)/2),er.x0=fa,er.y0=Da,er.x1=Ia,er.y1=qa,er.children&&(Lr=Ee[er.depth+1]=Pe(er)/2,fa+=Ct(er)-Lr,Da+=ft(er)-Lr,Ia-=ct(er)-Lr,qa-=_t(er)-Lr,Ia<fa&&(fa=Ia=(fa+Ia)/2),qa<Da&&(Da=qa=(Da+qa)/2),Te(er,fa,Da,Ia,qa))}return ir.round=function(er){return arguments.length?(Ie=!!er,ir):Ie},ir.size=function(er){return arguments.length?(Ve=+er[0],Ce=+er[1],ir):[Ve,Ce]},ir.tile=function(er){return arguments.length?(Te=oe(er),ir):Te},ir.padding=function(er){return arguments.length?ir.paddingInner(er).paddingOuter(er):ir.paddingInner()},ir.paddingInner=function(er){return arguments.length?(Pe=typeof er=="function"?er:j(+er),ir):Pe},ir.paddingOuter=function(er){return arguments.length?ir.paddingTop(er).paddingRight(er).paddingBottom(er).paddingLeft(er):ir.paddingTop()},ir.paddingTop=function(er){return arguments.length?(ft=typeof er=="function"?er:j(+er),ir):ft},ir.paddingRight=function(er){return arguments.length?(ct=typeof er=="function"?er:j(+er),ir):ct},ir.paddingBottom=function(er){return arguments.length?(_t=typeof er=="function"?er:j(+er),ir):_t},ir.paddingLeft=function(er){return arguments.length?(Ct=typeof er=="function"?er:j(+er),ir):Ct},ir}function wt(Te,Ie,Ve,Ce,Ee){var Pe=Te.children,ft,ct=Pe.length,_t,Ct=new Array(ct+1);for(Ct[0]=_t=ft=0;ft<ct;++ft)Ct[ft+1]=_t+=Pe[ft].value;ir(0,ct,Te.value,Ie,Ve,Ce,Ee);function ir(rr,er,Lr,fa,Da,Ia,qa){if(rr>=er-1){var Wa=Pe[rr];Wa.x0=fa,Wa.y0=Da,Wa.x1=Ia,Wa.y1=qa;return}for(var Ca=Ct[rr],hi=Lr/2+Ca,wi=rr+1,Kt=er-1;wi<Kt;){var Ft=wi+Kt>>>1;Ct[Ft]<hi?wi=Ft+1:Kt=Ft}hi-Ct[wi-1]<Ct[wi]-hi&&rr+1<wi&&--wi;var Yt=Ct[wi]-Ca,Jt=Lr-Yt;if(Ia-fa>qa-Da){var Fr=(fa*Jt+Ia*Yt)/Lr;ir(rr,wi,Yt,fa,Da,Fr,qa),ir(wi,er,Jt,Fr,Da,Ia,qa)}else{var ta=(Da*Jt+qa*Yt)/Lr;ir(rr,wi,Yt,fa,Da,Ia,ta),ir(wi,er,Jt,fa,ta,Ia,qa)}}}function Ne(Te,Ie,Ve,Ce,Ee){(Te.depth&1?kr:ze)(Te,Ie,Ve,Ce,Ee)}var Ke=function Te(Ie){function Ve(Ce,Ee,Pe,ft,ct){if((_t=Ce._squarify)&&_t.ratio===Ie)for(var _t,Ct,ir,rr,er=-1,Lr,fa=_t.length,Da=Ce.value;++er<fa;){for(Ct=_t[er],ir=Ct.children,rr=Ct.value=0,Lr=ir.length;rr<Lr;++rr)Ct.value+=ir[rr].value;Ct.dice?ze(Ct,Ee,Pe,ft,Pe+=(ct-Pe)*Ct.value/Da):kr(Ct,Ee,Pe,Ee+=(ft-Ee)*Ct.value/Da,ct),Da-=Ct.value}else Ce._squarify=_t=qr(Ie,Ce,Ee,Pe,ft,ct),_t.ratio=Ie}return Ve.ratio=function(Ce){return Te((Ce=+Ce)>1?Ce:1)},Ve}(mr);v.cluster=a,v.hierarchy=g,v.pack=re,v.packEnclose=z,v.packSiblings=ee,v.partition=Ze,v.stratify=ye,v.tree=Wt,v.treemap=Rr,v.treemapBinary=wt,v.treemapDice=ze,v.treemapResquarify=Ke,v.treemapSlice=kr,v.treemapSliceDice=Ne,v.treemapSquarify=Sr,Object.defineProperty(v,"__esModule",{value:!0})})}}),Q_=Xe({"src/traces/sunburst/calc.js"(Z){"use strict";var G=$_(),v=rs(),x=sa(),S=rc().makeColorScaleFuncFromTrace,E=x1().makePullColorFn,e=x1().generateExtendedColors,t=rc().calc,r=Hs().ALMOST_EQUAL,o={},a={},n={};Z.calc=function(s,h){var c=s._fullLayout,m=h.ids,p=x.isArrayOrTypedArray(m),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},d=function(ee){return ee||typeof ee=="number"},u=function(ee){return!w||v(_[ee])&&_[ee]>=0},y,f,R;p?(y=Math.min(m.length,l.length),f=function(ee){return d(m[ee])&&u(ee)},R=function(ee){return String(m[ee])}):(y=Math.min(T.length,l.length),f=function(ee){return d(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(f(L)){var z=R(L),F=d(l[L])?String(l[L]):"",N={i:L,id:z,pid:F,label:d(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=G.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 $=G.hierarchy(X),se=!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,oe=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)&&(oe=ae),oe<ae*r)return se=!0,x.warn(["Total value for node",ee.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
parent value =`,oe,`
children sum =`,ae].join(" "))}ee.value=oe});break}else i($,h,{branches:h.count.indexOf("branches")!==-1,leaves:h.count.indexOf("leaves")!==-1});if(!se){h.sort&&$.sort(function(ee,q){return q.value-ee.value});var le,fe,V=h.marker.colors||[],Y=!!V.length;return h._hasColorscale?(Y||(V=w?h.values:h._values),t(s,h,{vals:V,containerStr:"marker",cLetter:"c"}),fe=S(h.marker)):le=E(c["_"+h.type+"colormap"]),$.each(function(ee){var q=ee.data.data;q.color=h._hasColorscale?fe(V[q.i]):le(V[q.i],q.id)}),A[0].hierarchy=$,A}},Z._runCrossTraceCalc=function(s,h){var c=h._fullLayout,m=h.calcdata,p=c[s+"colorway"],T=c["_"+s+"colormap"];c["extend"+s+"colors"]&&(p=e(p,s==="icicle"?n:s==="treemap"?a:o));var l=0,_;function w(b){var d=b.data.data,u=d.id;d.color===!1&&(T[u]?d.color=T[u]:b.parent?b.parent.parent?d.color=b.parent.data.data.color:(T[u]=d.color=p[l%p.length],l++):d.color=_)}for(var A=0;A<m.length;A++){var M=m[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,c){var m=0,p=s.children;if(p){for(var T=p.length,l=0;l<T;l++)m+=i(p[l],h,c);c.branches&&m++}else c.leaves&&m++;return s.value=s.data.data.value=m,h._values||(h._values=[]),h._values[s.data.data.i]=m,m}}});function lg(Z,G,v){Z.prototype=G.prototype=v,v.constructor=Z}function b1(Z,G){var v=Object.create(Z.prototype);for(var x in G)v[x]=G[x];return v}var b3=Vo({"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 G,v;return Z=(Z+"").trim().toLowerCase(),(G=vM.exec(Z))?(v=G[1].length,G=parseInt(G[1],16),v===6?uM(G):v===3?new Xh(G>>8&15|G>>4&240,G>>4&15|G&240,(G&15)<<4|G&15,1):v===8?ex(G>>24&255,G>>16&255,G>>8&255,(G&255)/255):v===4?ex(G>>12&15|G>>8&240,G>>8&15|G>>4&240,G>>4&15|G&240,((G&15)<<4|G&15)/255):null):(G=mM.exec(Z))?new Xh(G[1],G[2],G[3],1):(G=gM.exec(Z))?new Xh(G[1]*255/100,G[2]*255/100,G[3]*255/100,1):(G=yM.exec(Z))?ex(G[1],G[2],G[3],G[4]):(G=_M.exec(Z))?ex(G[1]*255/100,G[2]*255/100,G[3]*255/100,G[4]):(G=xM.exec(Z))?hM(G[1],G[2]/100,G[3]/100,1):(G=bM.exec(Z))?hM(G[1],G[2]/100,G[3]/100,G[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,G,v,x){return x<=0&&(Z=G=v=NaN),new Xh(Z,G,v,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,G,v,x){return arguments.length===1?w3(Z):new Xh(Z,G,v,x??1)}function Xh(Z,G,v,x){this.r=+Z,this.g=+G,this.b=+v,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,G,v,x){return x<=0?Z=G=v=NaN:v<=0||v>=1?Z=G=NaN:G<=0&&(Z=NaN),new Ud(Z,G,v,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 G=Z.r/255,v=Z.g/255,x=Z.b/255,S=Math.min(G,v,x),E=Math.max(G,v,x),e=NaN,t=E-S,r=(E+S)/2;return t?(G===E?e=(v-x)/t+(v<x)*6:v===E?e=(x-G)/t+2:e=(G-v)/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,G,v,x){return arguments.length===1?pM(Z):new Ud(Z,G,v,x??1)}function Ud(Z,G,v,x){this.h=+Z,this.s=+G,this.l=+v,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,G,v){return(Z<60?G+(v-G)*Z/60:Z<180?v:Z<240?G+(v-G)*(240-Z)/60:G)*255}var $v,u0,c0,ug,jd,vM,mM,gM,yM,_M,xM,bM,S3,M3=Vo({"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,G=isNaN(Z)||isNaN(this.s)?0:this.s,v=this.l,x=v+(v<.5?v:1-v)*G,S=2*v-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=Vo({"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 G=R3(Z.r),v=R3(Z.g),x=R3(Z.b),S=L3((.2225045*G+.7168786*v+.0606169*x)/F3),E,e;return G===v&&v===x?E=e=S:(E=L3((.4360747*G+.3850649*v+.1430804*x)/z3),e=L3((.0139322*G+.0971045*v+.7141733*x)/O3)),new rv(116*S-16,500*(E-S),200*(S-e),Z.opacity)}function C3(Z,G,v,x){return arguments.length===1?TM(Z):new rv(Z,G,v,x??1)}function rv(Z,G,v,x){this.l=+Z,this.a=+G,this.b=+v,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 G=Math.atan2(Z.b,Z.a)*k3;return new Mv(G<0?G+360:G,Math.sqrt(Z.a*Z.a+Z.b*Z.b),Z.l,Z.opacity)}function D3(Z,G,v,x){return arguments.length===1?UB(Z):new Mv(Z,G,v,x??1)}function Mv(Z,G,v,x){this.h=+Z,this.c=+G,this.l=+v,this.opacity=+x}function AM(Z){if(isNaN(Z.h))return new rv(Z.l,0,0,Z.opacity);var G=Z.h*E3;return new rv(Z.l,Math.cos(G)*Z.c,Math.sin(G)*Z.c,Z.opacity)}var T1,z3,F3,O3,B3,f0,N3,SM,jB=Vo({"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,G=isNaN(this.a)?Z:Z+this.a/500,v=isNaN(this.b)?Z:Z-this.b/200;return G=z3*P3(G),Z=F3*P3(Z),v=O3*P3(v),new Xh(I3(3.1338561*G-1.6168667*Z-.4906146*v),I3(-.9787684*G+1.9161415*Z+.033454*v),I3(.0719453*G-.2289914*Z+1.4052427*v),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 G=Z.r/255,v=Z.g/255,x=Z.b/255,S=(G3*x+q3*G-V3*v)/(G3+q3-V3),E=x-S,e=(cg*(v-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,G,v,x){return arguments.length===1?qB(Z):new h0(Z,G,v,x??1)}function h0(Z,G,v,x){this.h=+Z,this.s=+G,this.l=+v,this.opacity=+x}var j3,ix,nx,A1,cg,q3,V3,G3,VB=Vo({"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,G=+this.l,v=isNaN(this.s)?0:this.s*G*(1-G),x=Math.cos(Z),S=Math.sin(Z);return new Xh(255*(G+v*(j3*x+ix*S)),255*(G+v*(nx*x+A1*S)),255*(G+v*(cg*x)),this.opacity)}}))}}),fg=Vo({"node_modules/d3-color/src/index.js"(){M3(),jB(),VB()}});function MM(Z,G,v,x,S){var E=Z*Z,e=E*Z;return((1-3*Z+3*E-e)*G+(4-6*E+3*e)*v+(1+3*Z+3*E-3*e)*x+e*S)/6}function EM(Z){var G=Z.length-1;return function(v){var x=v<=0?v=0:v>=1?(v=1,G-1):Math.floor(v*G),S=Z[x],E=Z[x+1],e=x>0?Z[x-1]:2*S-E,t=x<G-1?Z[x+2]:2*E-S;return MM((v-x/G)*G,e,S,E,t)}}var H3=Vo({"node_modules/d3-interpolate/src/basis.js"(){}});function kM(Z){var G=Z.length;return function(v){var x=Math.floor(((v%=1)<0?++v:v)*G),S=Z[(x+G-1)%G],E=Z[x%G],e=Z[(x+1)%G],t=Z[(x+2)%G];return MM((v-x/G)*G,S,E,e,t)}}var CM=Vo({"node_modules/d3-interpolate/src/basisClosed.js"(){H3()}}),S1,LM=Vo({"node_modules/d3-interpolate/src/constant.js"(){S1=Z=>()=>Z}});function PM(Z,G){return function(v){return Z+v*G}}function GB(Z,G,v){return Z=Math.pow(Z,v),G=Math.pow(G,v)-Z,v=1/v,function(x){return Math.pow(Z+x*G,v)}}function ox(Z,G){var v=G-Z;return v?PM(Z,v>180||v<-180?v-360*Math.round(v/360):v):S1(isNaN(Z)?G:Z)}function HB(Z){return(Z=+Z)==1?Zh:function(G,v){return v-G?GB(G,v,Z):S1(isNaN(G)?v:G)}}function Zh(Z,G){var v=G-Z;return v?PM(Z,v):S1(isNaN(Z)?G:Z)}var hg=Vo({"node_modules/d3-interpolate/src/color.js"(){LM()}});function IM(Z){return function(G){var v=G.length,x=new Array(v),S=new Array(v),E=new Array(v),e,t;for(e=0;e<v;++e)t=tx(G[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=Vo({"node_modules/d3-interpolate/src/rgb.js"(){fg(),H3(),CM(),hg(),sx=function Z(G){var v=HB(G);function x(S,E){var e=v((S=tx(S)).r,(E=tx(E)).r),t=v(S.g,E.g),r=v(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,G){G||(G=[]);var v=Z?Math.min(G.length,Z.length):0,x=G.slice(),S;return function(E){for(S=0;S<v;++S)x[S]=Z[S]*(1-E)+G[S]*E;return x}}function FM(Z){return ArrayBuffer.isView(Z)&&!(Z instanceof DataView)}var X3=Vo({"node_modules/d3-interpolate/src/numberArray.js"(){}});function WB(Z,G){return(FM(G)?W3:OM)(Z,G)}function OM(Z,G){var v=G?G.length:0,x=Z?Math.min(v,Z.length):0,S=new Array(x),E=new Array(v),e;for(e=0;e<x;++e)S[e]=fx(Z[e],G[e]);for(;e<v;++e)E[e]=G[e];return function(t){for(e=0;e<x;++e)E[e]=S[e](t);return E}}var BM=Vo({"node_modules/d3-interpolate/src/array.js"(){hx(),X3()}});function NM(Z,G){var v=new Date;return Z=+Z,G=+G,function(x){return v.setTime(Z*(1-x)+G*x),v}}var UM=Vo({"node_modules/d3-interpolate/src/date.js"(){}});function av(Z,G){return Z=+Z,G=+G,function(v){return Z*(1-v)+G*v}}var lx=Vo({"node_modules/d3-interpolate/src/number.js"(){}});function jM(Z,G){var v={},x={},S;(Z===null||typeof Z!="object")&&(Z={}),(G===null||typeof G!="object")&&(G={});for(S in G)S in Z?v[S]=fx(Z[S],G[S]):x[S]=G[S];return function(E){for(S in v)x[S]=v[S](E);return x}}var qM=Vo({"node_modules/d3-interpolate/src/object.js"(){hx()}});function XB(Z){return function(){return Z}}function ZB(Z){return function(G){return Z(G)+""}}function VM(Z,G){var v=ux.lastIndex=cx.lastIndex=0,x,S,E,e=-1,t=[],r=[];for(Z=Z+"",G=G+"";(x=ux.exec(Z))&&(S=cx.exec(G));)(E=S.index)>v&&(E=G.slice(v,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)})),v=cx.lastIndex;return v<G.length&&(E=G.slice(v),t[e]?t[e]+=E:t[++e]=E),t.length<2?r[0]?ZB(r[0].x):XB(G):(G=r.length,function(o){for(var a=0,n;a<G;++a)t[(n=r[a]).i]=n.x(o);return t.join("")})}var ux,cx,GM=Vo({"node_modules/d3-interpolate/src/string.js"(){lx(),ux=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cx=new RegExp(ux.source,"g")}});function fx(Z,G){var v=typeof G,x;return G==null||v==="boolean"?S1(G):(v==="number"?av:v==="string"?(x=w1(G))?(G=x,sx):VM:G instanceof w1?sx:G instanceof Date?NM:FM(G)?W3:Array.isArray(G)?OM:typeof G.valueOf!="function"&&typeof G.toString!="function"||isNaN(G)?jM:av)(Z,G)}var hx=Vo({"node_modules/d3-interpolate/src/value.js"(){fg(),zM(),BM(),UM(),lx(),qM(),GM(),LM(),X3()}});function YB(Z){var G=Z.length;return function(v){return Z[Math.max(0,Math.min(G-1,Math.floor(v*G)))]}}var KB=Vo({"node_modules/d3-interpolate/src/discrete.js"(){}});function JB(Z,G){var v=ox(+Z,+G);return function(x){var S=v(x);return S-360*Math.floor(S/360)}}var $B=Vo({"node_modules/d3-interpolate/src/hue.js"(){hg()}});function QB(Z,G){return Z=+Z,G=+G,function(v){return Math.round(Z*(1-v)+G*v)}}var eN=Vo({"node_modules/d3-interpolate/src/round.js"(){}});function HM(Z,G,v,x,S,E){var e,t,r;return(e=Math.sqrt(Z*Z+G*G))&&(Z/=e,G/=e),(r=Z*v+G*x)&&(v-=Z*r,x-=G*r),(t=Math.sqrt(v*v+x*x))&&(v/=t,x/=t,r/=t),Z*x<G*v&&(Z=-Z,G=-G,r=-r,e=-e),{translateX:S,translateY:E,rotate:Math.atan2(G,Z)*Z3,skewX:Math.atan(r)*Z3,scaleX:e,scaleY:t}}var Z3,px,tN=Vo({"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 G=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Z+"");return G.isIdentity?px:HM(G.a,G.b,G.c,G.d,G.e,G.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=Vo({"node_modules/d3-interpolate/src/transform/parse.js"(){tN()}});function WM(Z,G,v,x){function S(o){return o.length?o.pop()+" ":""}function E(o,a,n,i,s,h){if(o!==n||a!==i){var c=s.push("translate(",null,G,null,v);h.push({i:c-4,x:av(o,n)},{i:c-2,x:av(a,i)})}else(n||i)&&s.push("translate("+n+G+i+v)}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 c=s.push(S(s)+"scale(",null,",",null,")");h.push({i:c-4,x:av(o,n)},{i:c-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,c=i.length,m;++h<c;)n[(m=i[h]).i]=m.x(s);return n.join("")}}}var XM,ZM,nN=Vo({"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=Vo({"node_modules/d3-interpolate/src/zoom.js"(){KM=1e-12,JM=function Z(G,v,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,c=s*s+h*h,m,p;if(c<KM)p=Math.log(i/o)/G,m=function(M){return[t+M*s,r+M*h,o*Math.exp(G*M*p)]};else{var T=Math.sqrt(c),l=(i*i-o*o+x*c)/(2*o*v*T),_=(i*i-o*o-x*c)/(2*i*v*T),w=Math.log(Math.sqrt(l*l+1)-l),A=Math.log(Math.sqrt(_*_+1)-_);p=(A-w)/G,m=function(M){var g=M*p,b=YM(w),d=o/(v*T)*(b*sN(G*g+w)-oN(w));return[t+d*s,r+d*h,o*b/YM(G*g+w)]}}return m.duration=p*1e3*G/Math.SQRT2,m}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(G,v){var x=Z((G=T3(G)).h,(v=T3(v)).h),S=Zh(G.s,v.s),E=Zh(G.l,v.l),e=Zh(G.opacity,v.opacity);return function(t){return G.h=x(t),G.s=S(t),G.l=E(t),G.opacity=e(t),G+""}}}var QM,eE,uN=Vo({"node_modules/d3-interpolate/src/hsl.js"(){fg(),hg(),QM=$M(ox),eE=$M(Zh)}});function cN(Z,G){var v=Zh((Z=C3(Z)).l,(G=C3(G)).l),x=Zh(Z.a,G.a),S=Zh(Z.b,G.b),E=Zh(Z.opacity,G.opacity);return function(e){return Z.l=v(e),Z.a=x(e),Z.b=S(e),Z.opacity=E(e),Z+""}}var fN=Vo({"node_modules/d3-interpolate/src/lab.js"(){fg(),hg()}});function tE(Z){return function(G,v){var x=Z((G=D3(G)).h,(v=D3(v)).h),S=Zh(G.c,v.c),E=Zh(G.l,v.l),e=Zh(G.opacity,v.opacity);return function(t){return G.h=x(t),G.c=S(t),G.l=E(t),G.opacity=e(t),G+""}}}var rE,aE,hN=Vo({"node_modules/d3-interpolate/src/hcl.js"(){fg(),hg(),rE=tE(ox),aE=tE(Zh)}});function iE(Z){return function G(v){v=+v;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,v)),S.opacity=o(a),S+""}}return x.gamma=G,x}(1)}var nE,oE,pN=Vo({"node_modules/d3-interpolate/src/cubehelix.js"(){fg(),hg(),nE=iE(ox),oE=iE(Zh)}});function dN(Z,G){G===void 0&&(G=Z,Z=fx);for(var v=0,x=G.length-1,S=G[0],E=new Array(x<0?0:x);v<x;)E[v]=Z(S,S=G[++v]);return function(e){var t=Math.max(0,Math.min(x-1,Math.floor(e*=x)));return E[t](e-t)}}var vN=Vo({"node_modules/d3-interpolate/src/piecewise.js"(){hx()}});function mN(Z,G){for(var v=new Array(G),x=0;x<G;++x)v[x]=Z(x/(G-1));return v}var gN=Vo({"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=Vo({"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=Xe({"src/traces/sunburst/fill_one.js"(Z,G){"use strict";var v=es(),x=$n();G.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),v.pointStyle(E,t,r,e)}else x.fill(E,i)}}}),sE=Xe({"src/traces/sunburst/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),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=v.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(c){v.select(this).call(r,c,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,c=s.i,m=S.castOption(n,c,"marker.line.color")||x.defaultLine,p=S.castOption(n,c,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",p).call(x.stroke,m).style("opacity",h?n.leaf.opacity:null)}G.exports={style:t,styleOne:r}}}),Qv=Xe({"src/traces/sunburst/helpers.js"(Z){"use strict";var G=sa(),v=$n(),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,c=G.castOption(r,h,(i?"pathbar.textfont":"insidetextfont")+".color");return!c&&r._input.textfont&&(c=G.castOption(r._input,h,"textfont.color")),{color:c||v.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",c=a.data.data.i;return G.castOption(o,c,h+"."+r)||G.castOption(o,c,"textfont."+r)||n.size},Z.getOutsideTextFontKey=function(r,o,a,n){var i=a.data.data.i;return G.castOption(o,i,"outsidetextfont."+r)||G.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=G.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,o)),a}}}),vx=Xe({"src/traces/sunburst/fx.js"(Z,G){"use strict";var v=Hn(),x=so(),S=$p().appendArrayPointValue,E=rf(),e=sa(),t=Qy(),r=Qv(),o=t0(),a=o.formatPieValue;G.exports=function(s,h,c,m,p){var T=m[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(d){var u=c._fullLayout;if(!(c._dragging||u.hovermode===!1)){var y=c._fullData[l.index],f=d.data.data,R=f.i,L=r.isHierarchyRoot(d),z=r.getParent(_,d),F=r.getValue(d),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+d.pxmid[0]*(1-d.rInscribed),$=T.cy+d.pxmid[1]*(1-d.rInscribed)),A&&(X=d._hoverX,$=d._hoverY);var se={},le=[],fe=[],V=function(Q){return le.indexOf(Q)!==-1};P&&(le=P==="all"?y._module.attributes.hoverinfo.flags:P.split("+")),se.label=f.label,V("label")&&se.label&&fe.push(se.label),f.hasOwnProperty("v")&&(se.value=f.v,se.valueLabel=a(se.value,U),V("value")&&fe.push(se.valueLabel)),se.currentPath=d.currentPath=r.getPath(d.data),V("current path")&&!L&&fe.push(se.currentPath);var Y,ee=[],q=function(){ee.indexOf(Y)===-1&&(fe.push(Y),ee.push(Y))};se.percentParent=d.percentParent=F/r.getValue(z),se.parent=d.parentString=r.getPtLabel(z),V("percent parent")&&(Y=r.formatPercent(se.percentParent,U)+" of "+se.parent,q()),se.percentEntry=d.percentEntry=F/r.getValue(h),se.entry=d.entry=r.getPtLabel(h),V("percent entry")&&!L&&!d.onPathbar&&(Y=r.formatPercent(se.percentEntry,U)+" of "+se.entry,q()),se.percentRoot=d.percentRoot=F/r.getValue(_),se.root=d.root=r.getPtLabel(_),V("percent root")&&!L&&(Y=r.formatPercent(se.percentRoot,U)+" of "+se.root,q()),se.text=N("hovertext")||N("text"),V("text")&&(Y=se.text,e.isValidTextValue(Y)&&fe.push(Y)),B=[n(d,y,p.eventDataKeys)];var oe={trace:y,y:$,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:fe.join("<br>"),name:O||V("name")?y.name:void 0,color:N("hoverlabel.bgcolor")||f.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:se,eventData:B};w&&(oe.x0=X-d.rInscribed*d.rpx1,oe.x1=X+d.rInscribed*d.rpx1,oe.idealAlign=d.pxmid[0]<0?"left":"right"),A&&(oe.x=X,oe.idealAlign=X<0?"left":"right");var ae=[];E.loneHover(oe,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:c,inOut_bbox:ae}),B[0].bbox=ae[0],l._hasHoverLabel=!0}if(A){var j=s.select("path.surface");p.styleOne(j,d,y,c,{hovered:!0})}l._hasHoverEvent=!0,c.emit("plotly_hover",{points:B||[n(d,y,p.eventDataKeys)],event:v.event})}},g=function(d){var u=c._fullLayout,y=c._fullData[l.index],f=v.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=v.event,c.emit("plotly_unhover",{points:[n(f,y,p.eventDataKeys)],event:v.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(E.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1),A){var R=s.select("path.surface");p.styleOne(R,f,y,c,{hovered:!1})}},b=function(d){var u=c._fullLayout,y=c._fullData[l.index],f=w&&(r.isHierarchyRoot(d)||r.isLeaf(d)),R=r.getPtId(d),L=r.isEntry(d)?r.findEntryWithChild(_,R):r.findEntryWithLevel(_,R),z=r.getPtId(L),F={points:[n(d,y,p.eventDataKeys)],event:v.event};f||(F.nextLevel=z);var N=t.triggerHandler(c,"plotly_"+l.type+"click",F);if(N!==!1&&u.hovermode&&(c._hoverdata=[n(d,y,p.eventDataKeys)],E.click(c,v.event)),!f&&N!==!1&&!c._dragging&&!c._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:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};E.loneUnhover(u._hoverlayer.node()),x.call("animate",c,O,P)}};s.on("mouseover",M),s.on("mouseout",g),s.on("click",b)};function n(i,s,h){for(var c=i.data.data,m={curveNumber:s.index,pointNumber:c.i,data:s._input,fullData:s},p=0;p<h.length;p++){var T=h[p];T in i&&(m[T]=i[T])}return"parentString"in i&&!r.isHierarchyRoot(i)&&(m.parent=i.parentString),S(m,s,c.i),m}}}),K3=Xe({"src/traces/sunburst/plot.js"(Z){"use strict";var G=Hn(),v=$_(),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,c=Nd().resizeText,m=vx(),p=nM(),T=Qv();Z.plot=function(g,b,d,u){var y=g._fullLayout,f=y._sunburstlayer,R,L,z=!d,F=!y.uniformtext.mode&&T.hasTransition(d);if(o("sunburst",y),R=f.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=G.transition().duration(d.duration).ease(d.easing).each("end",function(){L&&L()}).each("interrupt",function(){L&&L()});N.each(function(){f.selectAll("g.trace").each(function(O){l(g,O,this,d)})})}else R.each(function(O){l(g,O,this,d)}),y.uniformtext.mode&&c(g,y._sunburstlayer.selectAll(".trace"),"sunburst");z&&R.exit().remove()};function l(g,b,d,u){var y=g._context.staticPlot,f=g._fullLayout,R=!f.uniformtext.mode&&T.hasTransition(u),L=G.select(d),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=f._size,X=N.domain,$=B.w*(X.x[1]-X.x[0]),se=B.h*(X.y[1]-X.y[0]),le=.5*Math.min($,se),fe=F.cx=B.l+B.w*(X.x[1]+X.x[0])/2,V=F.cy=B.t+B.h*(1-X.y[0])-se/2;if(!P)return z.remove();var Y=null,ee={};R&&z.each(function(he){ee[T.getPtId(he)]={rpx0:he.rpx0,rpx1:he.rpx1,x0:he.x0,x1:he.x1,transform:he.transform},!Y&&T.isEntry(he)&&(Y=he)});var q=_(P).descendants(),oe=P.height+1,ae=0,j=U;F.hasMultipleRoots&&T.isHierarchyRoot(P)&&(q=q.slice(1),oe-=1,ae=1,j+=1),q=q.filter(function(he){return he.y1<=j});var Q=n(N.rotation);Q&&q.forEach(function(he){he.x0+=Q,he.x1+=Q});var re=Math.min(oe,U),ce=function(he){return(he-ae)/re*le},be=function(he,Oe){return[he*Math.cos(Oe),-he*Math.sin(Oe)]},Ae=function(he){return E.pathAnnulus(he.rpx0,he.rpx1,he.x0,he.x1,fe,V)},De=function(he){return fe+A(he)[0]*(he.transform.rCenter||0)+(he.transform.x||0)},ze=function(he){return V+A(he)[1]*(he.transform.rCenter||0)+(he.transform.y||0)};z=z.data(q,T.getPtId),z.enter().append("g").classed("slice",!0),R?z.exit().transition().each(function(){var he=G.select(this),Oe=he.select("path.surface");Oe.transition().attrTween("d",function(ot){var Qe=rt(ot);return function(Pt){return Ae(Qe(Pt))}});var tt=he.select("g.slicetext");tt.attr("opacity",0)}).remove():z.exit().remove(),z.order();var Ze=null;if(R&&Y){var at=T.getPtId(Y);z.each(function(he){Ze===null&&T.getPtId(he)===at&&(Ze=he.x1)})}var nt=z;R&&(nt=nt.transition().each("end",function(){var he=G.select(this);T.setSliceCursor(he,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),nt.each(function(he){var Oe=G.select(this),tt=E.ensureSingle(Oe,"path","surface",function(Wt){Wt.style("pointer-events",y?"none":"all")});he.rpx0=ce(he.y0),he.rpx1=ce(he.y1),he.xmid=(he.x0+he.x1)/2,he.pxmid=be(he.rpx1,he.xmid),he.midangle=-(he.xmid-Math.PI/2),he.startangle=-(he.x0-Math.PI/2),he.stopangle=-(he.x1-Math.PI/2),he.halfangle=.5*Math.min(E.angleDelta(he.x0,he.x1)||Math.PI,Math.PI),he.ring=1-he.rpx0/he.rpx1,he.rInscribed=w(he,N),R?tt.transition().attrTween("d",function(Wt){var kr=st(Wt);return function(mr){return Ae(kr(mr))}}):tt.attr("d",Ae),Oe.call(m,P,g,b,{eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:g._transitioning}),tt.call(h,he,N,g);var ot=E.ensureSingle(Oe,"g","slicetext"),Qe=E.ensureSingle(ot,"text","",function(Wt){Wt.attr("data-notex",1)}),Pt=E.ensureUniformFontSize(g,T.determineTextFont(N,he,f.font));Qe.text(Z.formatSliceLabel(he,P,N,b,f)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,Pt).call(e.convertToTspans,g);var It=S.bBox(Qe.node());he.transform=s(It,he,F),he.transform.targetX=De(he),he.transform.targetY=ze(he);var qt=function(Wt,kr){var mr=Wt.transform;return i(mr,kr),mr.fontSize=Pt.size,r(N.type,mr,f),E.getTextTransform(mr)};R?Qe.transition().attrTween("transform",function(Wt){var kr=Me(Wt);return function(mr){return qt(kr(mr),It)}}):Qe.attr("transform",qt(he,It))});function rt(he){var Oe=T.getPtId(he),tt=ee[Oe],ot=ee[T.getPtId(P)],Qe;if(ot){var Pt=(he.x1>ot.x1?2*Math.PI:0)+Q;Qe=he.rpx1<ot.rpx1?{x0:he.x0,x1:he.x1,rpx0:0,rpx1:0}:{x0:Pt,x1:Pt,rpx0:he.rpx0,rpx1:he.rpx1}}else{var It,qt=T.getPtId(he.parent);z.each(function(Sr){if(T.getPtId(Sr)===qt)return It=Sr});var Wt=It.children,kr;Wt.forEach(function(Sr,Rr){if(T.getPtId(Sr)===Oe)return kr=Rr});var mr=Wt.length,qr=x(It.x0,It.x1);Qe={rpx0:le,rpx1:le,x0:qr(kr/mr),x1:qr((kr+1)/mr)}}return x(tt,Qe)}function st(he){var Oe=ee[T.getPtId(he)],tt,ot={x0:he.x0,x1:he.x1,rpx0:he.rpx0,rpx1:he.rpx1};if(Oe)tt=Oe;else if(Y)if(he.parent)if(Ze){var Qe=(he.x1>Ze?2*Math.PI:0)+Q;tt={x0:Qe,x1:Qe}}else tt={rpx0:le,rpx1:le},E.extendFlat(tt,ye(he));else tt={rpx0:0,rpx1:0};else tt={x0:Q,x1:Q};return x(tt,ot)}function Me(he){var Oe=ee[T.getPtId(he)],tt,ot=he.transform;if(Oe)tt=Oe;else if(tt={rpx1:he.rpx1,transform:{textPosAngle:ot.textPosAngle,scale:0,rotate:ot.rotate,rCenter:ot.rCenter,x:ot.x,y:ot.y}},Y)if(he.parent)if(Ze){var Qe=he.x1>Ze?2*Math.PI:0;tt.x0=tt.x1=Qe}else E.extendFlat(tt,ye(he));else tt.x0=tt.x1=Q;else tt.x0=tt.x1=Q;var Pt=x(tt.transform.textPosAngle,he.transform.textPosAngle),It=x(tt.rpx1,he.rpx1),qt=x(tt.x0,he.x0),Wt=x(tt.x1,he.x1),kr=x(tt.transform.scale,ot.scale),mr=x(tt.transform.rotate,ot.rotate),qr=ot.rCenter===0?3:tt.transform.rCenter===0?1/3:1,Sr=x(tt.transform.rCenter,ot.rCenter),Rr=function(wt){return Sr(Math.pow(wt,qr))};return function(wt){var Ne=It(wt),Ke=qt(wt),Te=Wt(wt),Ie=Rr(wt),Ve=be(Ne,(Ke+Te)/2),Ce=Pt(wt),Ee={pxmid:Ve,rpx1:Ne,transform:{textPosAngle:Ce,rCenter:Ie,x:ot.x,y:ot.y}};return r(N.type,ot,f),{transform:{targetX:De(Ee),targetY:ze(Ee),scale:kr(wt),rotate:mr(wt),rCenter:Ie}}}}function ye(he){var Oe=he.parent,tt=ee[T.getPtId(Oe)],ot={};if(tt){var Qe=Oe.children,Pt=Qe.indexOf(he),It=Qe.length,qt=x(tt.x0,tt.x1);ot.x0=qt(Pt/It),ot.x1=qt(Pt/It)}else ot.x0=ot.x1=0;return ot}}function _(g){return v.partition().size([2*Math.PI,g.height+1])(g)}Z.formatSliceLabel=function(g,b,d,u,y){var f=d.texttemplate,R=d.textinfo;if(!f&&(!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(!f){var B=R.split("+"),X=function(ae){return B.indexOf(ae)!==-1},$=[],se;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 le=0;X("percent parent")&&le++,X("percent entry")&&le++,X("percent root")&&le++;var fe=le>1;if(le){var V,Y=function(ae){se=T.formatPercent(V,L),fe&&(se+=" of "+ae),$.push(se)};X("percent parent")&&!O&&(V=U/T.getValue(P),Y("parent")),X("percent entry")&&(V=U/T.getValue(b),Y("entry")),X("percent root")&&(V=U/T.getValue(N),Y("root"))}}return X("text")&&(se=E.castOption(d,F.i,"text"),E.isValidTextValue(se)&&$.push(se)),$.join("<br>")}var ee=E.castOption(d,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 oe=E.castOption(d,F.i,"text");return(E.isValidTextValue(oe)||oe==="")&&(q.text=oe),q.customdata=E.castOption(d,F.i,"customdata"),E.texttemplateString({data:[q,d._meta],fallback:d.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=Xe({"src/traces/sunburst/index.js"(Z,G){"use strict";G.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=Xe({"lib/sunburst.js"(Z,G){"use strict";G.exports=yN()}}),xN=Xe({"src/traces/treemap/base_plot.js"(Z){"use strict";var G=bc();Z.name="treemap",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),dg=Xe({"src/traces/treemap/constants.js"(Z,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),J3=Xe({"src/traces/treemap/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=dg(),a=Qo().extendFlat,n=Gh().pattern;G.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:v({},{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=Xe({"src/traces/treemap/layout_attributes.js"(Z,G){"use strict";G.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bN=Xe({"src/traces/treemap/defaults.js"(Z,G){"use strict";var v=sa(),x=J3(),S=$n(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;G.exports=function(s,h,c,m){function p(y,f){return v.coerce(s,h,x,y,f)}var T=p("labels"),l=p("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=p("values");_&&_.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var w=p("tiling.packing");w==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var A=p("text");p("texttemplate"),p("texttemplatefallback"),h.texttemplate||p("textinfo",v.isArrayOrTypedArray(A)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M=p("pathbar.visible"),g="auto";e(s,h,m,p,g,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var b=h.textposition.indexOf("bottom")!==-1;r(s,h,m,p);var d=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;d?n(s,h,m,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(h.marker.colors||[]).length);var u=h.textfont.size*2;p("marker.pad.t",b?u/4:u),p("marker.pad.l",u/4),p("marker.pad.r",u/4),p("marker.pad.b",b?u:u/4),p("marker.cornerradius"),h._hovered={marker:{line:{width:2,color:S.contrast(m.paper_bgcolor)}}},M&&(p("pathbar.thickness",h.pathbar.textfont.size+2*t),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),E(h,m,p),h._length=null}}}),wN=Xe({"src/traces/treemap/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=lE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("treemapcolorway",e.colorway),t("extendtreemapcolors")}}}),uE=Xe({"src/traces/treemap/calc.js"(Z){"use strict";var G=Q_();Z.calc=function(v,x){return G.calc(v,x)},Z.crossTraceCalc=function(v){return G._runCrossTraceCalc("treemap",v)}}}),cE=Xe({"src/traces/treemap/flip_tree.js"(Z,G){"use strict";G.exports=function v(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++)v(t[r],S,E)}}}),fE=Xe({"src/traces/treemap/partition.js"(Z,G){"use strict";var v=$_(),x=cE();G.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"],c=r.pad[a?"top":"bottom"],m;n&&(m=s,s=i,i=m,m=h,h=c,c=m);var p=v.treemap().tile(S(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(s).paddingRight(h).paddingTop(i).paddingBottom(c).size(n?[t[1],t[0]]:t)(e);return(n||o||a)&&x(p,t,{swapXY:n,flipX:o,flipY:a}),p};function S(E,e){switch(E){case"squarify":return v.treemapSquarify.ratio(e);case"binary":return v.treemapBinary;case"dice":return v.treemapDice;case"slice":return v.treemapSlice;default:return v.treemapSliceDice}}}}),$3=Xe({"src/traces/treemap/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),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=v.select(this),h=i[0],c=h.trace;s.style("opacity",c.opacity),s.selectAll("path.surface").each(function(m){v.select(this).call(o,m,c,a,{hovered:!1})})})}function o(a,n,i,s,h){var c=(h||{}).hovered,m=n.data.data,p=m.i,T,l,_=m.color,w=E.isHierarchyRoot(n),A=1;if(c)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,p,"marker.line.color")||x.defaultLine,l=S.castOption(i,p,"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 d=E.getMaxDepth(i);isFinite(d)?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)}G.exports={style:r,styleOne:o}}}),TN=Xe({"src/traces/treemap/draw_ancestors.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=ou(),e=fE(),t=$3().styleOne,r=dg(),o=Qv(),a=vx(),n=!0;G.exports=function(s,h,c,m,p){var T=p.barDifY,l=p.width,_=p.height,w=p.viewX,A=p.viewY,M=p.pathSlice,g=p.toMoveInsideSlice,b=p.strTransform,d=p.hasTransition,u=p.handleSlicesExit,y=p.makeUpdateSliceInterpolator,f=p.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(c.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 se=U.indexOf($.data.id);return se===-1?!1:($.x0=P*se,$.x1=P*(se+1),$.y0=T,$.y1=T+_,$.onPathbar=!0,!0)}),B.reverse(),m=m.data(B,o.getPtId),m.enter().append("g").classed("pathbar",!0),u(m,n,R,[l,_],M),m.order();var X=m;d&&(X=X.transition().each("end",function(){var $=v.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 se=v.select(this),le=x.ensureSingle(se,"path","surface",function(ee){ee.style("pointer-events",L?"none":"all")});d?le.transition().attrTween("d",function(ee){var q=y(ee,n,R,[l,_]);return function(oe){return M(q(oe))}}):le.attr("d",M),se.call(a,c,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}),le.call(t,$,N,s,{hovered:!1}),$._text=(o.getPtLabel($)||"").split("<br>").join(" ")||"";var fe=x.ensureSingle(se,"g","slicetext"),V=x.ensureSingle(fe,"text","",function(ee){ee.attr("data-notex",1)}),Y=x.ensureUniformFontSize(s,o.determineTextFont(N,$,z.font,{onPathbar:!0}));V.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(S.font,Y).call(E.convertToTspans,s),$.textBB=S.bBox(V.node()),$.transform=g($,{fontSize:Y.size,onPathbar:!0}),$.transform.fontSize=Y.size,d?V.transition().attrTween("transform",function(ee){var q=f(ee,n,R,[l,_]);return function(oe){return b(q(oe))}}):V.attr("transform",b($))})}}}),AN=Xe({"src/traces/treemap/plot_one.js"(Z,G){"use strict";var v=Hn(),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)}G.exports=function(c,m,p,T,l){var _=c._fullLayout,w=m[0],A=w.trace,M=A.type,g=M==="icicle",b=w.hierarchy,d=S.findEntryWithLevel(b,A.level),u=v.select(p),y=u.selectAll("g.pathbar"),f=u.selectAll("g.slice");if(!d){y.remove(),f.remove();return}var R=S.isHierarchyRoot(d),L=!_.uniformtext.mode&&S.hasTransition(T),z=S.getMaxDepth(A),F=function(Sr){return Sr.data.depth-d.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,se=A.pathbar.visible?A.pathbar.side.indexOf("bottom")>-1?U+$:-(X+$):0,le={x0:B,x1:B,y0:se,y1:se+X},fe=function(Sr,Rr,wt){var Ne=A.tiling.pad,Ke=function(Ce){return Ce-Ne<=Rr.x0},Te=function(Ce){return Ce+Ne>=Rr.x1},Ie=function(Ce){return Ce-Ne<=Rr.y0},Ve=function(Ce){return Ce+Ne>=Rr.y1};return Sr.x0===Rr.x0&&Sr.x1===Rr.x1&&Sr.y0===Rr.y0&&Sr.y1===Rr.y1?{x0:Sr.x0,x1:Sr.x1,y0:Sr.y0,y1:Sr.y1}:{x0:Ke(Sr.x0-Ne)?0:Te(Sr.x0-Ne)?wt[0]:Sr.x0,x1:Ke(Sr.x1+Ne)?0:Te(Sr.x1+Ne)?wt[0]:Sr.x1,y0:Ie(Sr.y0-Ne)?0:Ve(Sr.y0-Ne)?wt[1]:Sr.y0,y1:Ie(Sr.y1+Ne)?0:Ve(Sr.y1+Ne)?wt[1]:Sr.y1}},V=null,Y={},ee={},q=null,oe=function(Sr,Rr){return Rr?Y[s(Sr)]:ee[s(Sr)]},ae=function(Sr,Rr,wt,Ne){if(Rr)return Y[s(b)]||le;var Ke=ee[A.level]||wt;return F(Sr)?fe(Sr,Ke,Ne):{}};w.hasMultipleRoots&&R&&z++,A._maxDepth=z,A._backgroundColor=_.paper_bgcolor,A._entryDepth=d.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(Sr){return j+Sr},ce=function(Sr){return Q+Sr},be=ce(0),Ae=re(0),De=function(Sr){return Ae+Sr},ze=function(Sr){return be+Sr};function Ze(Sr,Rr){return Sr+","+Rr}var at=De(0),nt=function(Sr){Sr.x=Math.max(at,Sr.x)},rt=A.pathbar.edgeshape,st=function(Sr){var Rr=De(Math.max(Math.min(Sr.x0,Sr.x0),0)),wt=De(Math.min(Math.max(Sr.x1,Sr.x1),B)),Ne=ze(Sr.y0),Ke=ze(Sr.y1),Te=X/2,Ie={},Ve={};Ie.x=Rr,Ve.x=wt,Ie.y=Ve.y=(Ne+Ke)/2;var Ce={x:Rr,y:Ne},Ee={x:wt,y:Ne},Pe={x:wt,y:Ke},ft={x:Rr,y:Ke};return rt===">"?(Ce.x-=Te,Ee.x-=Te,Pe.x-=Te,ft.x-=Te):rt==="/"?(Pe.x-=Te,ft.x-=Te,Ie.x-=Te/2,Ve.x-=Te/2):rt==="\\"?(Ce.x-=Te,Ee.x-=Te,Ie.x-=Te/2,Ve.x-=Te/2):rt==="<"&&(Ie.x-=Te,Ve.x-=Te),nt(Ce),nt(ft),nt(Ie),nt(Ee),nt(Pe),nt(Ve),"M"+Ze(Ce.x,Ce.y)+"L"+Ze(Ee.x,Ee.y)+"L"+Ze(Ve.x,Ve.y)+"L"+Ze(Pe.x,Pe.y)+"L"+Ze(ft.x,ft.y)+"L"+Ze(Ie.x,Ie.y)+"Z"},Me=A[g?"tiling":"marker"].pad,ye=function(Sr){return A.textposition.indexOf(Sr)!==-1},he=ye("top"),Oe=ye("left"),tt=ye("right"),ot=ye("bottom"),Qe=function(Sr){var Rr=re(Sr.x0),wt=re(Sr.x1),Ne=ce(Sr.y0),Ke=ce(Sr.y1),Te=wt-Rr,Ie=Ke-Ne;if(!Te||!Ie)return"";var Ve=A.marker.cornerradius||0,Ce=Math.min(Ve,Te/2,Ie/2);Ce&&Sr.data&&Sr.data.data&&Sr.data.data.label&&(he&&(Ce=Math.min(Ce,Me.t)),Oe&&(Ce=Math.min(Ce,Me.l)),tt&&(Ce=Math.min(Ce,Me.r)),ot&&(Ce=Math.min(Ce,Me.b)));var Ee=function(Pe,ft){return Ce?"a"+Ze(Ce,Ce)+" 0 0 1 "+Ze(Pe,ft):""};return"M"+Ze(Rr,Ne+Ce)+Ee(Ce,-Ce)+"L"+Ze(wt-Ce,Ne)+Ee(Ce,Ce)+"L"+Ze(wt,Ke-Ce)+Ee(-Ce,Ce)+"L"+Ze(Rr+Ce,Ke)+Ee(-Ce,-Ce)+"Z"},Pt=function(Sr,Rr){var wt=Sr.x0,Ne=Sr.x1,Ke=Sr.y0,Te=Sr.y1,Ie=Sr.textBB,Ve=he||Rr.isHeader&&!ot,Ce=Ve?"start":ot?"end":"middle",Ee=ye("right"),Pe=ye("left")||Rr.onPathbar,ft=Pe?-1:Ee?1:0;if(Rr.isHeader){if(wt+=(g?Me:Me.l)-e,Ne-=(g?Me:Me.r)-e,wt>=Ne){var ct=(wt+Ne)/2;wt=ct,Ne=ct}var _t;ot?(_t=Te-(g?Me:Me.b),Ke<_t&&_t<Te&&(Ke=_t)):(_t=Ke+(g?Me:Me.t),Ke<_t&&_t<Te&&(Te=_t))}var Ct=r(wt,Ne,Ke,Te,Ie,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ce,leftToRight:ft});return Ct.fontSize=Rr.fontSize,Ct.targetX=re(Ct.targetX),Ct.targetY=ce(Ct.targetY),isNaN(Ct.targetX)||isNaN(Ct.targetY)?{}:(wt!==Ne&&Ke!==Te&&a(A.type,Ct,_),{scale:Ct.scale,rotate:Ct.rotate,textX:Ct.textX,textY:Ct.textY,anchorX:Ct.anchorX,anchorY:Ct.anchorY,targetX:Ct.targetX,targetY:Ct.targetY})},It=function(Sr,Rr){for(var wt,Ne=0,Ke=Sr;!wt&&Ne<z;)Ne++,Ke=Ke.parent,Ke?wt=oe(Ke,Rr):Ne=z;return wt||{}},qt=function(Sr,Rr,wt,Ne){var Ke=oe(Sr,Rr),Te;if(Rr)Te=le;else{var Ie=oe(d,Rr);Ie?Te=fe(Sr,Ie,Ne):Te={}}return x(Ke,Te)},Wt=function(Sr,Rr,wt,Ne,Ke){var Te=oe(Sr,Rr),Ie;if(Te)Ie=Te;else if(Rr)Ie=le;else if(V)if(Sr.parent){var Ve=q||wt;Ve&&!Rr?Ie=fe(Sr,Ve,Ne):(Ie={},E.extendFlat(Ie,It(Sr,Rr)))}else Ie=E.extendFlat({},Sr),g&&(Ke.orientation==="h"?Ke.flipX?Ie.x0=Sr.x1:Ie.x1=0:Ke.flipY?Ie.y0=Sr.y1:Ie.y1=0);else Ie={};return x(Ie,{x0:Sr.x0,x1:Sr.x1,y0:Sr.y0,y1:Sr.y1})},kr=function(Sr,Rr,wt,Ne){var Ke=oe(Sr,Rr),Te={},Ie=ae(Sr,Rr,wt,Ne);E.extendFlat(Te,{transform:Pt({x0:Ie.x0,x1:Ie.x1,y0:Ie.y0,y1:Ie.y1,textBB:Sr.textBB,_text:Sr._text},{isHeader:S.isHeader(Sr,A)})}),Ke?Te=Ke:Sr.parent&&E.extendFlat(Te,It(Sr,Rr));var Ve=Sr.transform;return Sr.x0!==Sr.x1&&Sr.y0!==Sr.y1&&a(A.type,Ve,_),x(Te,{transform:{scale:Ve.scale,rotate:Ve.rotate,textX:Ve.textX,textY:Ve.textY,anchorX:Ve.anchorX,anchorY:Ve.anchorY,targetX:Ve.targetX,targetY:Ve.targetY}})},mr=function(Sr,Rr,wt,Ne,Ke){var Te=Ne[0],Ie=Ne[1];L?Sr.exit().transition().each(function(){var Ve=v.select(this),Ce=Ve.select("path.surface");Ce.transition().attrTween("d",function(Pe){var ft=qt(Pe,Rr,wt,[Te,Ie]);return function(ct){return Ke(ft(ct))}});var Ee=Ve.select("g.slicetext");Ee.attr("opacity",0)}).remove():Sr.exit().remove()},qr=function(Sr){var Rr=Sr.transform;return Sr.x0!==Sr.x1&&Sr.y0!==Sr.y1&&a(A.type,Rr,_),E.getTextTransform({textX:Rr.textX,textY:Rr.textY,anchorX:Rr.anchorX,anchorY:Rr.anchorY,targetX:Rr.targetX,targetY:Rr.targetY,scale:Rr.scale,rotate:Rr.rotate})};L&&(y.each(function(Sr){Y[s(Sr)]={x0:Sr.x0,x1:Sr.x1,y0:Sr.y0,y1:Sr.y1},Sr.transform&&(Y[s(Sr)].transform={textX:Sr.transform.textX,textY:Sr.transform.textY,anchorX:Sr.transform.anchorX,anchorY:Sr.transform.anchorY,targetX:Sr.transform.targetX,targetY:Sr.transform.targetY,scale:Sr.transform.scale,rotate:Sr.transform.rotate})}),f.each(function(Sr){ee[s(Sr)]={x0:Sr.x0,x1:Sr.x1,y0:Sr.y0,y1:Sr.y1},Sr.transform&&(ee[s(Sr)].transform={textX:Sr.transform.textX,textY:Sr.transform.textY,anchorX:Sr.transform.anchorX,anchorY:Sr.transform.anchorY,targetX:Sr.transform.targetX,targetY:Sr.transform.targetY,scale:Sr.transform.scale,rotate:Sr.transform.rotate}),!V&&S.isEntry(Sr)&&(V=Sr)})),q=l(c,m,d,f,{width:P,height:U,viewX:re,viewY:ce,pathSlice:Qe,toMoveInsideSlice:Pt,prevEntry:V,makeUpdateSliceInterpolator:Wt,makeUpdateTextInterpolator:kr,handleSlicesExit:mr,hasTransition:L,strTransform:qr}),A.pathbar.visible?i(c,m,d,y,{barDifY:se,width:B,height:X,viewX:De,viewY:ze,pathSlice:st,toMoveInsideSlice:Pt,makeUpdateSliceInterpolator:Wt,makeUpdateTextInterpolator:kr,handleSlicesExit:mr,hasTransition:L,strTransform:qr}):y.remove()}}}),hE=Xe({"src/traces/treemap/draw.js"(Z,G){"use strict";var v=Hn(),x=Qv(),S=Sp(),E=S.clearMinTextSize,e=Nd().resizeText,t=AN();G.exports=function(o,a,n,i,s){var h=s.type,c=s.drawDescendants,m=o._fullLayout,p=m["_"+h+"layer"],T,l,_=!n;if(E(h,m),T=p.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(),!m.uniformtext.mode&&x.hasTransition(n)){i&&(l=i());var w=v.transition().duration(n.duration).ease(n.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});w.each(function(){p.selectAll("g.trace").each(function(A){t(o,A,this,n,c)})})}else T.each(function(A){t(o,A,this,n,c)}),m.uniformtext.mode&&e(o,p.selectAll(".trace"),h);_&&T.exit().remove()}}}),SN=Xe({"src/traces/treemap/draw_descendants.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=ou(),e=fE(),t=$3().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;G.exports=function(h,c,m,p,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,d=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,f=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=c[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(m,[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}}),se=$.descendants(),le=1/0,fe=-1/0;se.forEach(function(oe){var ae=oe.depth;ae>=O._maxDepth?(oe.x0=oe.x1=(oe.x0+oe.x1)/2,oe.y0=oe.y1=(oe.y0+oe.y1)/2):(le=Math.min(le,ae),fe=Math.max(fe,ae))}),p=p.data(se,o.getPtId),O._maxVisibleLayers=isFinite(fe)?fe-le+1:0,p.enter().append("g").classed("slice",!0),u(p,i,L,[l,_],M),p.order();var V=null;if(d&&R){var Y=o.getPtId(R);p.each(function(oe){V===null&&o.getPtId(oe)===Y&&(V={x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1})})}var ee=function(){return V||{x0:0,x1:l,y0:0,y1:_}},q=p;return d&&(q=q.transition().each("end",function(){var oe=v.select(this);o.setSliceCursor(oe,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(oe){var ae=o.isHeader(oe,O);oe._x0=w(oe.x0),oe._x1=w(oe.x1),oe._y0=A(oe.y0),oe._y1=A(oe.y1),oe._hoverX=w(oe.x1-O.marker.pad.r),oe._hoverY=A(B?oe.y1-O.marker.pad.b/2:oe.y0+O.marker.pad.t/2);var j=v.select(this),Q=x.ensureSingle(j,"path","surface",function(ze){ze.style("pointer-events",z?"none":"all")});d?Q.transition().attrTween("d",function(ze){var Ze=y(ze,i,ee(),[l,_]);return function(at){return M(Ze(at))}}):Q.attr("d",M),j.call(a,m,h,c,{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,oe,O,h,{hovered:!1}),oe.x0===oe.x1||oe.y0===oe.y1?oe._text="":ae?oe._text=X?"":o.getPtLabel(oe)||"":oe._text=n(oe,m,O,c,F)||"";var re=x.ensureSingle(j,"g","slicetext"),ce=x.ensureSingle(re,"text","",function(ze){ze.attr("data-notex",1)}),be=x.ensureUniformFontSize(h,o.determineTextFont(O,oe,F.font)),Ae=oe._text||" ",De=ae&&Ae.indexOf("<br>")===-1;ce.text(Ae).classed("slicetext",!0).attr("text-anchor",U?"end":P||De?"start":"middle").call(S.font,be).call(E.convertToTspans,h),oe.textBB=S.bBox(ce.node()),oe.transform=g(oe,{fontSize:be.size,isHeader:ae}),oe.transform.fontSize=be.size,d?ce.transition().attrTween("transform",function(ze){var Ze=f(ze,i,ee(),[l,_]);return function(at){return b(Ze(at))}}):ce.attr("transform",b(oe))}),V}}}),MN=Xe({"src/traces/treemap/plot.js"(Z,G){"use strict";var v=hE(),x=SN();G.exports=function(E,e,t,r){return v(E,e,t,r,{type:"treemap",drawDescendants:x})}}}),EN=Xe({"src/traces/treemap/index.js"(Z,G){"use strict";G.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=Xe({"lib/treemap.js"(Z,G){"use strict";G.exports=EN()}}),CN=Xe({"src/traces/icicle/base_plot.js"(Z){"use strict";var G=bc();Z.name="icicle",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),pE=Xe({"src/traces/icicle/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=J3(),a=dg(),n=Qo().extendFlat,i=Gh().pattern;G.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:v({},{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=Xe({"src/traces/icicle/layout_attributes.js"(Z,G){"use strict";G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LN=Xe({"src/traces/icicle/defaults.js"(Z,G){"use strict";var v=sa(),x=pE(),S=$n(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;G.exports=function(s,h,c,m){function p(b,d){return v.coerce(s,h,x,b,d)}var T=p("labels"),l=p("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=p("values");_&&_.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var w=p("text");p("texttemplate"),p("texttemplatefallback"),h.texttemplate||p("textinfo",v.isArrayOrTypedArray(w)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var A=p("pathbar.visible"),M="auto";e(s,h,m,p,M,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),r(s,h,m,p);var g=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,h,m,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",g?1:.7),h._hovered={marker:{line:{width:2,color:S.contrast(m.paper_bgcolor)}}},A&&(p("pathbar.thickness",h.pathbar.textfont.size+2*t),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),E(h,m,p),h._length=null}}}),PN=Xe({"src/traces/icicle/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=dE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("iciclecolorway",e.colorway),t("extendiciclecolors")}}}),vE=Xe({"src/traces/icicle/calc.js"(Z){"use strict";var G=Q_();Z.calc=function(v,x){return G.calc(v,x)},Z.crossTraceCalc=function(v){return G._runCrossTraceCalc("icicle",v)}}}),IN=Xe({"src/traces/icicle/partition.js"(Z,G){"use strict";var v=$_(),x=cE();G.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=v.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=Xe({"src/traces/icicle/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),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=v.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(c){v.select(this).call(r,c,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,c=s.i,m=S.castOption(n,c,"marker.line.color")||x.defaultLine,p=S.castOption(n,c,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",p).call(x.stroke,m).style("opacity",h?n.leaf.opacity:null)}G.exports={style:t,styleOne:r}}}),RN=Xe({"src/traces/icicle/draw_descendants.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=ou(),e=IN(),t=mE().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;G.exports=function(h,c,m,p,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,d=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,f=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=c[0],O=N.trace,P=O.textposition.indexOf("left")!==-1,U=O.textposition.indexOf("right")!==-1,B=O.textposition.indexOf("bottom")!==-1,X=e(m,[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(),se=1/0,le=-1/0;$.forEach(function(q){var oe=q.depth;oe>=O._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(se=Math.min(se,oe),le=Math.max(le,oe))}),p=p.data($,o.getPtId),O._maxVisibleLayers=isFinite(le)?le-se+1:0,p.enter().append("g").classed("slice",!0),u(p,i,L,[l,_],M),p.order();var fe=null;if(d&&R){var V=o.getPtId(R);p.each(function(q){fe===null&&o.getPtId(q)===V&&(fe={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var Y=function(){return fe||{x0:0,x1:l,y0:0,y1:_}},ee=p;return d&&(ee=ee.transition().each("end",function(){var q=v.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 oe=v.select(this),ae=x.ensureSingle(oe,"path","surface",function(ce){ce.style("pointer-events",z?"none":"all")});d?ae.transition().attrTween("d",function(ce){var be=y(ce,i,Y(),[l,_],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(Ae){return M(be(Ae))}}):ae.attr("d",M),oe.call(a,m,h,c,{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,m,O,c,F)||"";var j=x.ensureSingle(oe,"g","slicetext"),Q=x.ensureSingle(j,"text","",function(ce){ce.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,d?Q.transition().attrTween("transform",function(ce){var be=f(ce,i,Y(),[l,_]);return function(Ae){return b(be(Ae))}}):Q.attr("transform",b(q))}),fe}}}),DN=Xe({"src/traces/icicle/plot.js"(Z,G){"use strict";var v=hE(),x=RN();G.exports=function(E,e,t,r){return v(E,e,t,r,{type:"icicle",drawDescendants:x})}}}),zN=Xe({"src/traces/icicle/index.js"(Z,G){"use strict";G.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=Xe({"lib/icicle.js"(Z,G){"use strict";G.exports=zN()}}),ON=Xe({"src/traces/funnelarea/base_plot.js"(Z){"use strict";var G=bc();Z.name="funnelarea",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),gE=Xe({"src/traces/funnelarea/attributes.js"(Z,G){"use strict";var v=og(),x=ru(),S=wc().attributes,{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=Qo().extendFlat;G.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:r({},v.marker.line.color,{dflt:null}),width:r({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:r({},v.scalegroup,{}),textinfo:r({},v.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({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:r({},v.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=Xe({"src/traces/funnelarea/layout_attributes.js"(Z,G){"use strict";var v=_3().hiddenlabels;G.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),BN=Xe({"src/traces/funnelarea/defaults.js"(Z,G){"use strict";var v=sa(),x=gE(),S=wc().defaults,E=gd().handleText,e=sg().handleLabelsAndValues,t=sg().handleMarkerDefaults;G.exports=function(o,a,n,i){function s(M,g){return v.coerce(o,a,x,M,g)}var h=s("labels"),c=s("values"),m=e(h,c),p=m.len;if(a._hasLabels=m.hasLabels,a._hasValues=m.hasValues,!a._hasLabels&&a._hasValues&&(s("label0"),s("dlabel")),!p){a.visible=!1;return}a._length=p,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"),v.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),NN=Xe({"src/traces/funnelarea/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=yE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("hiddenlabels"),t("funnelareacolorway",e.colorway),t("extendfunnelareacolors")}}}),_E=Xe({"src/traces/funnelarea/calc.js"(Z,G){"use strict";var v=x1();function x(E,e){return v.calc(E,e)}function S(E){v.crossTraceCalc(E,{type:"funnelarea"})}G.exports={calc:x,crossTraceCalc:S}}}),UN=Xe({"src/traces/funnelarea/plot.js"(Z,G){"use strict";var v=Hn(),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(),c=h.attachFxHandlers,m=h.determineInsideTextFont,p=h.layoutAreas,T=h.prerenderTitles,l=h.positionTitleOutside,_=h.formatSliceLabel;G.exports=function(b,d){var u=b._context.staticPlot,y=b._fullLayout;i("funnelarea",y),T(d,b),p(d,y._size),S.makeTraceGroups(y._funnelarealayer,d,"trace").each(function(f){var R=v.select(this),L=f[0],z=L.trace;M(f),R.each(function(){var F=v.select(this).selectAll("g.slice").data(f);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(O,P){if(O.hidden){v.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=z.index;var U=L.cx,B=L.cy,X=v.select(this),$=X.selectAll("path.surface").data([O]);$.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),X.call(c,b,f);var se="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",se),_(b,O,L);var le=s.castOption(z.textposition,O.pts),fe=X.selectAll("g.slicetext").data(O.text&&le!=="none"?[0]:[]);fe.enter().append("g").classed("slicetext",!0),fe.exit().remove(),fe.each(function(){var V=S.ensureSingle(v.select(this),"text","",function(re){re.attr("data-notex",1)}),Y=S.ensureUniformFontSize(b,m(z,O,y.font));V.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Y).call(t.convertToTspans,b);var ee=x.bBox(V.node()),q,oe,ae,j=Math.min(O.BL[1],O.BR[1])+B,Q=Math.max(O.TL[1],O.TR[1])+B;oe=Math.max(O.TL[0],O.BL[0])+U,ae=Math.min(O.TR[0],O.BR[0])+U,q=o(oe,ae,j,Q,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),q.fontSize=Y.size,n(z.type,q,y),f[P].transform=q,S.setTransormAndDisplay(V,q)})});var N=v.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(v.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 d=b[0]-g[0],u=b[1]-g[1];return"l"+d+","+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],d=b.trace,u=d.aspectratio,y=d.baseratio;y>.999&&(y=.999);var f=Math.pow(y,2),R=b.vTotal,L=R*f/(1-f),z=R,F=L/R;function N(){var ce=Math.sqrt(F);return{x:ce,y:-ce}}function O(){var ce=N();return[ce.x,ce.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 se=1/0,le=-1/0;for(B=0;B<U.length;B++)P=U[B],se=Math.min(se,P[1]),le=Math.max(le,P[1]);for(B=0;B<U.length;B++)U[B][1]-=(le+se)/2;var fe=U[U.length-1][0],V=b.r,Y=(le-se)/2,ee=V/fe,q=V/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 oe=[-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=oe,X.BR=ae,X.pxmid=A(X.TR,X.BR),oe=X.TL,ae=X.TR}}}}),jN=Xe({"src/traces/funnelarea/style.js"(Z,G){"use strict";var v=Hn(),x=i1(),S=Sp().resizeText;G.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=v.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){v.select(this).call(x,i,a,e)})})}}}),qN=Xe({"src/traces/funnelarea/index.js"(Z,G){"use strict";G.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=Xe({"lib/funnelarea.js"(Z,G){"use strict";G.exports=qN()}}),Yh=Xe({"stackgl_modules/index.js"(Z,G){(function(){var v={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,c=o(n);return i[0]=s-c.left,i[1]=h-c.top,i}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},109:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[2],h=o[0]-i,c=o[2]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=i+c*m+h*p,r[1]=o[1],r[2]=s+c*p-h*m,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}},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,c=0;c<s.length;++c){var m=s[c].split("[");if(m.length>1){m[0]in h||(h[m[0]]=[]),h=h[m[0]];for(var p=1;p<m.length;++p){var T=parseInt(m[p]);p<m.length-1||c<s.length-1?(T in h||(p<m.length-1?h[T]=[]:h[T]={}),h=h[T]):o?h[T]=n:h[T]=r[n].type}}else c<s.length-1?(m[0]in h||(h[m[0]]={}),h=h[m[0]]):o?h[m[0]]=n:h[m[0]]=r[n].type}return a}},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)}}},244:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]}},264:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],c=a[1],m=a[2],p=a[3],T=p*n+c*s-m*i,l=p*i+m*n-h*s,_=p*s+h*i-c*n,w=-h*n-c*i-m*s;return r[0]=T*p+w*-h+l*-m-_*-c,r[1]=l*p+w*-c+_*-h-T*-m,r[2]=_*p+w*-m+T*-c-l*-h,r}},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),c=r(5838),m=r(1278),p=r(3637);function T(L){var z=h(L);return[m(z,-1/0),m(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]=[m(Math.min(P[0],U[0]),-1/0),m(Math.min(P[1],U[1]),-1/0),m(Math.max(P[0],U[0]),1/0),m(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]=[m(N[0],-1/0),m(N[1],-1/0),m(N[0],1/0),m(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]],se=L[B[0]],le=L[B[1]];n(X,$,se,le)&&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]],se=L[B[1]];n($,se,X,X)&&O.push([P,U])}}),O}function M(L,z,F,N,O){var P,U,B=L.map(function(Ae){return[i(Ae[0]),i(Ae[1])]});for(P=0;P<F.length;++P){var X=F[P];U=X[0];var $=X[1],se=z[U],le=z[$],fe=p(c(L[se[0]]),c(L[se[1]]),c(L[le[0]]),c(L[le[1]]));if(fe){var V=L.length;L.push([h(fe[0]),h(fe[1])]),B.push(fe),N.push([U,V],[$,V])}}for(N.sort(function(Ae,De){if(Ae[0]!==De[0])return Ae[0]-De[0];var ze=B[Ae[1]],Ze=B[De[1]];return s(ze[0],Ze[0])||s(ze[1],Ze[1])}),P=N.length-1;P>=0;--P){var Y=N[P];U=Y[0];var ee=z[U],q=ee[0],oe=ee[1],ae=L[q],j=L[oe];if((ae[0]-j[0]||ae[1]-j[1])<0){var Q=q;q=oe,oe=Q}ee[0]=q;var re=ee[1]=Y[1],ce;for(O&&(ce=ee[2]);P>0&&N[P-1][0]===U;){var Y=N[--P],be=Y[1];O?z.push([re,be,ce]):z.push([re,be]),re=be}O?z.push([re,oe,ce]):z.push([re,oe])}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([m(X[0],-1/0),m($[0],-1/0),m(X[1],1/0),m($[1],1/0)])}a(P,function(Y,ee){O.link(Y,ee)});for(var se=!0,le=new Array(N),U=0;U<N;++U){var fe=O.find(U);fe!==U&&(se=!1,L[fe]=[Math.min(L[U][0],L[fe][0]),Math.min(L[U][1],L[fe][1])])}if(se)return null;for(var V=0,U=0;U<N;++U){var fe=O.find(U);fe===U?(le[U]=V,L[V++]=L[U]):le[U]=-1}L.length=V;for(var U=0;U<N;++U)le[U]<0&&(le[U]=le[O.find(U)]);return le}function b(L,z){return L[0]-z[0]||L[1]-z[1]}function d(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(d):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 f(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);f(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}},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,c=0,m={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function T(f){var R=!1;return"altKey"in f&&(R=R||f.altKey!==m.alt,m.alt=!!f.altKey),"shiftKey"in f&&(R=R||f.shiftKey!==m.shift,m.shift=!!f.shiftKey),"ctrlKey"in f&&(R=R||f.ctrlKey!==m.control,m.control=!!f.ctrlKey),"metaKey"in f&&(R=R||f.metaKey!==m.meta,m.meta=!!f.metaKey),R}function l(f,R){var L=o.x(R),z=o.y(R);"buttons"in R&&(f=R.buttons|0),(f!==s||L!==h||z!==c||T(R))&&(s=f|0,h=L||0,c=z||0,i&&i(s,h,c,m))}function _(f){l(0,f)}function w(){(s||h||c||m.shift||m.alt||m.meta||m.control)&&(h=c=0,s=0,m.shift=m.alt=m.control=m.meta=!1,i&&i(0,0,0,m))}function A(f){T(f)&&i&&i(s,h,c,m)}function M(f){o.buttons(f)===0?l(0,f):l(s,f)}function g(f){l(s|o.buttons(f),f)}function b(f){l(s&~o.buttons(f),f)}function d(){p||(p=!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(){p&&(p=!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)))}d();var y={element:n};return Object.defineProperties(y,{enabled:{get:function(){return p},set:function(f){f?d():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return c},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),y}},395:function(e){function t(r,o,a){return r*(1-a)+o*a}e.exports=t},446:function(e,t,r){"use strict";var o=r(7640),a={};function n(i){var s=i.order,h=i.dtype,c=[s,h],m=c.join(":"),p=a[m];return p||(a[m]=p=o(s,h)),p(i),i}e.exports=n},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}},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}},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],c=[0,0,0],m=[1,1];function p(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,d,u,y,f){this.gl=A,this.vertBuffer=M,this.vao=g,this.shader=b,this.tickCount=d,this.tickOffset=u,this.gridCount=y,this.gridOffset=f}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,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=m,this.vao.bind()},_.unbind=function(){this.vao.unbind()},_.drawAxisLine=function(A,M,g,b,d){var u=p(s);this.shader.uniforms.majorAxis=s,u[A]=M[1][A]-M[0][A],this.shader.uniforms.minorAxis=u;var y=T(c,g);y[A]+=M[0][A],this.shader.uniforms.offset=y,this.shader.uniforms.lineWidth=d,this.shader.uniforms.color=b;var f=p(h);f[(A+2)%3]=1,this.shader.uniforms.screenAxis=f,this.vao.draw(this.gl.TRIANGLES,6);var f=p(h);f[(A+1)%3]=1,this.shader.uniforms.screenAxis=f,this.vao.draw(this.gl.TRIANGLES,6)},_.drawAxisTicks=function(A,M,g,b,d){if(this.tickCount[A]){var u=p(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=d;var y=p(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,d,u){if(this.gridCount[A]){var y=p(s);y[M]=g[1][M]-g[0][M],this.shader.uniforms.minorAxis=y;var f=T(c,b);f[M]+=g[0][M],this.shader.uniforms.offset=f;var R=p(i);R[A]=1,this.shader.uniforms.majorAxis=R;var L=p(h);L[A]=1,this.shader.uniforms.screenAxis=L,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=d,this.vao.draw(this.gl.TRIANGLES,this.gridCount[A],this.gridOffset[A])}},_.drawZero=function(A,M,g,b,d,u){var y=p(s);this.shader.uniforms.majorAxis=y,y[A]=g[1][A]-g[0][A],this.shader.uniforms.minorAxis=y;var f=T(c,b);f[A]+=g[0][A],this.shader.uniforms.offset=f;var R=p(h);R[M]=1,this.shader.uniforms.screenAxis=R,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=d,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=[],d=[0,0,0],u=[0,0,0],y=[0,0,0],f=[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;d[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,f[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,d,f,y)}},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),c=0;c<s;++c)h[c]=o(n[c],i[c]);return h}},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}}}},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"}]}},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"]},665:function(e,t,r){"use strict";var o=r(3202);e.exports=s;var a=96;function n(h,c){var m=o(getComputedStyle(h).getPropertyValue(c));return m[0]*s(m[1],h)}function i(h,c){var m=document.createElement("div");m.style["font-size"]="128"+h,c.appendChild(m);var p=n(m,"font-size")/128;return c.removeChild(m),p}function s(h,c){switch(c=c||document.body,h=(h||"px").trim().toLowerCase(),(c===window||c===document)&&(c=document.body),h){case"%":return c.clientHeight/100;case"ch":case"ex":return i(h,c);case"em":return n(c,"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}},727:function(e,t,r){"use strict";var o=r(2962),a=6;function n(A){var M=A===2?h:A===3?c:A===4?m:A===5?p: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 c(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 m(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 p(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,d,u,y,f){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 d(L,z);case 5:return u(L,z)}var F=y[L.length];return F||(F=y[L.length]=f(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()},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"}},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}},783:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2],c=o[3],m=a[0],p=a[1],T=a[2],l=a[3],_,w,A,M,g;return w=i*m+s*p+h*T+c*l,w<0&&(w=-w,m=-m,p=-p,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*m,r[1]=M*s+g*p,r[2]=M*h+g*T,r[3]=M*c+g*l,r}},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"}])}},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}},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;
}`]),c=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;
}`]),m=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;
}`]),p=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:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:m,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:T,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:l,fragment:_,attributes:[{name:"position",type:"vec3"}]}},855:function(e,t,r){"use strict";e.exports={init:w,sweepBipartite:g,sweepComplete:b,scanBipartite:d,scanComplete:u};var o=r(1888),a=r(8828),n=r(4192),i=1<<28,s=1024,h=o.mallocInt32(s),c=o.mallocInt32(s),m=o.mallocInt32(s),p=o.mallocInt32(s),T=o.mallocInt32(s),l=o.mallocInt32(s),_=o.mallocDouble(s*8);function w(y){var f=a.nextPow2(y);h.length<f&&(o.free(h),h=o.mallocInt32(f)),c.length<f&&(o.free(c),c=o.mallocInt32(f)),m.length<f&&(o.free(m),m=o.mallocInt32(f)),p.length<f&&(o.free(p),p=o.mallocInt32(f)),T.length<f&&(o.free(T),T=o.mallocInt32(f)),l.length<f&&(o.free(l),l=o.mallocInt32(f));var R=8*f;_.length<R&&(o.free(_),_=o.mallocDouble(R))}function A(y,f,R,L){var z=f[L],F=y[R-1];y[z]=F,f[F]=z}function M(y,f,R,L){y[R]=L,f[L]=R}function g(y,f,R,L,z,F,N,O,P,U){for(var B=0,X=2*y,$=y-1,se=X-1,le=R;le<L;++le){var fe=F[le],V=X*le;_[B++]=z[V+$],_[B++]=-(fe+1),_[B++]=z[V+se],_[B++]=fe}for(var le=N;le<O;++le){var fe=U[le]+i,Y=X*le;_[B++]=P[Y+$],_[B++]=-fe,_[B++]=P[Y+se],_[B++]=fe}var ee=B>>>1;n(_,ee);for(var q=0,oe=0,le=0;le<ee;++le){var ae=_[2*le+1]|0;if(ae>=i)ae=ae-i|0,A(m,p,oe--,ae);else if(ae>=0)A(h,c,q--,ae);else if(ae<=-i){ae=-ae-i|0;for(var j=0;j<q;++j){var Q=f(h[j],ae);if(Q!==void 0)return Q}M(m,p,oe++,ae)}else{ae=-ae-1|0;for(var j=0;j<oe;++j){var Q=f(ae,m[j]);if(Q!==void 0)return Q}M(h,c,q++,ae)}}}function b(y,f,R,L,z,F,N,O,P,U){for(var B=0,X=2*y,$=y-1,se=X-1,le=R;le<L;++le){var fe=F[le]+1<<1,V=X*le;_[B++]=z[V+$],_[B++]=-fe,_[B++]=z[V+se],_[B++]=fe}for(var le=N;le<O;++le){var fe=U[le]+1<<1,Y=X*le;_[B++]=P[Y+$],_[B++]=-fe|1,_[B++]=P[Y+se],_[B++]=fe|1}var ee=B>>>1;n(_,ee);for(var q=0,oe=0,ae=0,le=0;le<ee;++le){var j=_[2*le+1]|0,Q=j&1;if(le<ee-1&&j>>1===_[2*le+3]>>1&&(Q=2,le+=1),j<0){for(var re=-(j>>1)-1,ce=0;ce<ae;++ce){var be=f(T[ce],re);if(be!==void 0)return be}if(Q!==0)for(var ce=0;ce<q;++ce){var be=f(h[ce],re);if(be!==void 0)return be}if(Q!==1)for(var ce=0;ce<oe;++ce){var be=f(m[ce],re);if(be!==void 0)return be}Q===0?M(h,c,q++,re):Q===1?M(m,p,oe++,re):Q===2&&M(T,l,ae++,re)}else{var re=(j>>1)-1;Q===0?A(h,c,q--,re):Q===1?A(m,p,oe--,re):Q===2&&A(T,l,ae--,re)}}}function d(y,f,R,L,z,F,N,O,P,U,B,X){var $=0,se=2*y,le=f,fe=f+y,V=1,Y=1;L?Y=i:V=i;for(var ee=z;ee<F;++ee){var q=ee+V,oe=se*ee;_[$++]=N[oe+le],_[$++]=-q,_[$++]=N[oe+fe],_[$++]=q}for(var ee=P;ee<U;++ee){var q=ee+Y,ae=se*ee;_[$++]=B[ae+le],_[$++]=-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,ce=!1;if(q>=i?(ce=!L,q-=i):(ce=!!L,q-=1),ce)M(h,c,Q++,q);else{var be=X[q],Ae=se*q,De=B[Ae+f+1],ze=B[Ae+f+1+y];e:for(var Ze=0;Ze<Q;++Ze){var at=h[Ze],nt=se*at;if(!(ze<N[nt+f+1]||N[nt+f+1+y]<De)){for(var rt=f+2;rt<y;++rt)if(B[Ae+rt+y]<N[nt+rt]||N[nt+rt+y]<B[Ae+rt])continue e;var st=O[at],Me;if(L?Me=R(be,st):Me=R(st,be),Me!==void 0)return Me}}}}else A(h,c,Q--,re-V)}}function u(y,f,R,L,z,F,N,O,P,U,B){for(var X=0,$=2*y,se=f,le=f+y,fe=L;fe<z;++fe){var V=fe+i,Y=$*fe;_[X++]=F[Y+se],_[X++]=-V,_[X++]=F[Y+le],_[X++]=V}for(var fe=O;fe<P;++fe){var V=fe+1,ee=$*fe;_[X++]=U[ee+se],_[X++]=-V}var q=X>>>1;n(_,q);for(var oe=0,fe=0;fe<q;++fe){var ae=_[2*fe+1]|0;if(ae<0){var V=-ae;if(V>=i)h[oe++]=V-i;else{V-=1;var j=B[V],Q=$*V,re=U[Q+f+1],ce=U[Q+f+1+y];e:for(var be=0;be<oe;++be){var Ae=h[be],De=N[Ae];if(De===j)break;var ze=$*Ae;if(!(ce<F[ze+f+1]||F[ze+f+1+y]<re)){for(var Ze=f+2;Ze<y;++Ze)if(U[Q+Ze+y]<F[ze+Ze]||F[ze+Ze+y]<U[Q+Ze])continue e;var at=R(De,j);if(at!==void 0)return at}}}}else{for(var V=ae-i,be=oe-1;be>=0;--be)if(h[be]===V){for(var Ze=be+1;Ze<oe;++Ze)h[Ze-1]=h[Ze];break}--oe}}}},868:function(e,t,r){e.exports=r(1387)},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),c=a(s);if(h===0)return[o(0),o(1)];if(c===0)return[o(0),o(0)];c<0&&(i=i.neg(),s=s.neg());var m=i.gcd(s);return m.cmpn(1)?[i.div(m),s.div(m)]:[i,s]}},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 c=this.gl;this._elements?c.drawElements(i,s,this._elementsType,h):c.drawArrays(i,h,s)};function n(i){return new a(i)}e.exports=n},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 c=s.abs().divmod(h.abs()),m=c.div,p=o(m),T=c.mod,l=s.negative!==h.negative?-1:1;if(T.cmpn(0)===0)return l*p;if(p){var _=a(p)+4,w=o(T.ushln(_).divRound(h));return l*(p+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))}}},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(c){var m=o(c,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},t.createPickShader=function(c){var m=o(c,n,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},t.createContourShader=function(c){var m=o(c,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m},t.createPickContourShader=function(c){var m=o(c,s,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m}},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/),c=String(h.length+i-1).length;return h.map(function(m,p){var T=p+i,l=String(T).length,_=o(T,c-l);return _+s+m}).join(`
`)}},1091:function(e){e.exports=t;function t(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},1125:function(e,t,r){"use strict";e.exports=n;var o=r(3250)[3];function a(i,s,h,c){for(var m=0;m<2;++m){var p=i[m],T=s[m],l=Math.min(p,T),_=Math.max(p,T),w=h[m],A=c[m],M=Math.min(w,A),g=Math.max(w,A);if(g<l||_<M)return!1}return!0}function n(i,s,h,c){var m=o(i,h,c),p=o(s,h,c);if(m>0&&p>0||m<0&&p<0)return!1;var T=o(h,i,s),l=o(c,i,s);return T>0&&l>0||T<0&&l<0?!1:m===0&&p===0&&T===0&&l===0?a(i,s,h,c):!0}},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 c=o.hi(s),m=o.lo(s);return h>s==s>0?m===n?(c+=1,m=0):m+=1:m===0?(m=n,c-=1):m-=1,o.pack(m,c)}},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;
}
`]),c=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);
}`]),m=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],p={vertex:n,fragment:h,attributes:m},T={vertex:i,fragment:h,attributes:m},l={vertex:s,fragment:h,attributes:m},_={vertex:n,fragment:c,attributes:m},w={vertex:i,fragment:c,attributes:m},A={vertex:s,fragment:c,attributes:m};function M(g,b){var d=o(g,b),u=d.attributes;return u.position.location=0,u.color.location=1,u.glyph.location=2,u.id.location=3,d}t.createPerspective=function(g){return M(g,p)},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)}},1303:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){var h,c;if(s[0][0]<s[1][0])h=s[0],c=s[1];else if(s[0][0]>s[1][0])h=s[1],c=s[0];else{var m=Math.min(i[0][1],i[1][1]),p=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 p<T?p-T:m>l?m-l:p-l}var _,w;i[0][1]<i[1][1]?(_=i[0],w=i[1]):(_=i[1],w=i[0]);var A=o(c,h,_);return A||(A=o(c,h,w),A)?A:w-c}function n(i,s){var h,c;if(s[0][0]<s[1][0])h=s[0],c=s[1];else if(s[0][0]>s[1][0])h=s[1],c=s[0];else return a(s,i);var m,p;if(i[0][0]<i[1][0])m=i[0],p=i[1];else if(i[0][0]>i[1][0])m=i[1],p=i[0];else return-a(i,s);var T=o(h,c,p),l=o(h,c,m);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(p,m,c),l=o(p,m,h),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return c[0]-p[0]}},1318:function(e){"use strict";e.exports=t;function t(r,o){return r[0].mul(o[1]).cmp(o[0].mul(r[1]))}},1338:function(e){"use strict";function t(a,n,i){var s=a[i]|0;if(s<=0)return[];var h=new Array(s),c;if(i===a.length-1)for(c=0;c<s;++c)h[c]=n;else for(c=0;c<s;++c)h[c]=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},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 c=0;c<i;c++){var m=s[c];h+=m*Math.pow(67108864,c)}return o(n)*h}},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}},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}},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)}},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,c=s.size||4,m=s.type||r.FLOAT,p=!!s.normalized,T=s.stride||0,l=s.offset||0;h.bind(),r.enableVertexAttribArray(i),r.vertexAttribPointer(i,c,m,p,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},1463:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o,r[1]=a,r[2]=n,r}},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"}])}},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}},1533:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n&&typeof n=="object"&&!!n.words}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(f){f.permitHostObjects___&&f.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,c=Object.defineProperty,m=Object.isExtensible,p="weakmap:",T=p+"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=p+"rand:"+Array.prototype.map.call(_,function(f){return(f%36).toString(36)}).join("")+"___"}function w(f){return!(f.substr(0,p.length)==p&&f.substr(f.length-3)==="___")}if(c(Object,"getOwnPropertyNames",{value:function(R){return h(R).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function(R){return A(R).filter(w)}})}function M(f){if(f!==Object(f))throw new TypeError("Not an object: "+f);var R=f[T];if(R&&R.key===f)return R;if(m(f)){R={key:f};try{return c(f,T,{value:R,writable:!1,enumerable:!1,configurable:!1}),R}catch{return}}}(function(){var f=Object.freeze;c(Object,"freeze",{value:function(F){return M(F),f(F)}});var R=Object.seal;c(Object,"seal",{value:function(F){return M(F),R(F)}});var L=Object.preventExtensions;c(Object,"preventExtensions",{value:function(F){return M(F),L(F)}})})();function g(f){return f.prototype=null,Object.freeze(f)}var b=!1;function d(){!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||d();var f=[],R=[],L=u++;function z(P,U){var B,X=M(P);return X?L in X?X[L]:U:(B=f.indexOf(P),B>=0?R[B]:U)}function F(P){var U=M(P);return U?L in U:f.indexOf(P)>=0}function N(P,U){var B,X=M(P);return X?X[L]=U:(B=f.indexOf(P),B>=0?R[B]=U:(B=f.length,R[B]=U,f[B]=P)),this}function O(P){var U=M(P),B,X;return U?L in U&&delete U[L]:(B=f.indexOf(P),B<0?!1:(X=f.length-1,f[B]=void 0,R[B]=R[X],f[B]=f[X],f.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 f(){this instanceof y||d();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___")})}})}f.prototype=y.prototype,e.exports=f,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=y)})()},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(i,s,h,c){for(var m=Math.min(h,c)|0,p=Math.max(h,c)|0,T=i[2*m],l=i[2*m+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===p)return _;p<w?l=_:T=_+1}return T}function n(i,s,h,c){for(var m=i.length,p=[],T=0;T<m;++T)var l=i[T],_=l.length;return p}return n},function(){function a(i,s,h,c){for(var m=Math.min(h,c)|0,p=Math.max(h,c)|0,T=i[2*m],l=i[2*m+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===p)return _;p<w?l=_:T=_+1}return T}function n(i,s,h,c){for(var m=i.length,p=[],T=0;T<m;++T){var l=i[T],_=l.length;if(_===2){var w=(c[l[0]]<<0)+(c[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:p.push([a(h,s,l[0],l[1])]);break;case 2:p.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return p}return n},function(){function a(i,s,h,c){for(var m=Math.min(h,c)|0,p=Math.max(h,c)|0,T=i[2*m],l=i[2*m+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===p)return _;p<w?l=_:T=_+1}return T}function n(i,s,h,c){for(var m=i.length,p=[],T=0;T<m;++T){var l=i[T],_=l.length;if(_===3){var w=(c[l[0]]<<0)+(c[l[1]]<<1)+(c[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:p.push([a(h,s,l[0],l[2]),a(h,s,l[0],l[1])]);break;case 2:p.push([a(h,s,l[1],l[0]),a(h,s,l[1],l[2])]);break;case 3:p.push([a(h,s,l[0],l[2]),a(h,s,l[1],l[2])]);break;case 4:p.push([a(h,s,l[2],l[1]),a(h,s,l[2],l[0])]);break;case 5:p.push([a(h,s,l[2],l[1]),a(h,s,l[0],l[1])]);break;case 6:p.push([a(h,s,l[1],l[0]),a(h,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(c[l[0]]<<0)+(c[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:p.push([a(h,s,l[0],l[1])]);break;case 2:p.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return p}return n},function(){function a(i,s,h,c){for(var m=Math.min(h,c)|0,p=Math.max(h,c)|0,T=i[2*m],l=i[2*m+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===p)return _;p<w?l=_:T=_+1}return T}function n(i,s,h,c){for(var m=i.length,p=[],T=0;T<m;++T){var l=i[T],_=l.length;if(_===4){var w=(c[l[0]]<<0)+(c[l[1]]<<1)+(c[l[2]]<<2)+(c[l[3]]<<3);if(w===0||w===15)continue;switch(w){case 0:break;case 1:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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:p.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=(c[l[0]]<<0)+(c[l[1]]<<1)+(c[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:p.push([a(h,s,l[0],l[2]),a(h,s,l[0],l[1])]);break;case 2:p.push([a(h,s,l[1],l[0]),a(h,s,l[1],l[2])]);break;case 3:p.push([a(h,s,l[0],l[2]),a(h,s,l[1],l[2])]);break;case 4:p.push([a(h,s,l[2],l[1]),a(h,s,l[2],l[0])]);break;case 5:p.push([a(h,s,l[2],l[1]),a(h,s,l[0],l[1])]);break;case 6:p.push([a(h,s,l[1],l[0]),a(h,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(c[l[0]]<<0)+(c[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:p.push([a(h,s,l[0],l[1])]);break;case 2:p.push([a(h,s,l[1],l[0])]);break;case 3:break}}}return p}return n}];function r(o){return t[o]()}},1682:function(e){"use strict";function t(a,n){for(var i=1,s=a.length,h=a[0],c=a[0],m=1;m<s;++m)if(c=h,h=a[m],n(h,c)){if(m===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],c=1;c<i;++c,h=s)if(h=s,s=a[c],s!==h){if(c===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},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,c=s[n],m=s[i];c<m?h[n]=i:m<c?h[i]=n:(h[i]=n,++s[n])}}},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),c=r(6582),m=r(7656),p=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,d=o.le(b,g),u=this.computedMatrix;if(!(d<0)){var y=this._components;if(d===b.length-1)for(var f=16*d,R=0;R<16;++R)u[R]=y[f++];else{for(var L=b[d+1]-b[d],f=16*d,z=this.prevMatrix,F=!0,R=0;R<16;++R)z[R]=y[f++];for(var N=this.nextMatrix,R=0;R<16;++R)N[R]=y[f++],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[d])/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,d=b.length-16,u=0;u<16;++u)b.push(b[d++]);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,d,u){this.recalcMatrix(g),b=b||this.computedEye,d=d||l,u=u||this.computedUp,this.setMatrix(g,c(this.computedMatrix,b,d,u));for(var y=0,f=0;f<3;++f)y+=Math.pow(d[f]-b[f],2);y=Math.log(Math.sqrt(y)),this.computedRadius[0]=y},w.rotate=function(g,b,d,u){this.recalcMatrix(g);var y=this.computedInverse;b&&s(y,y,b),d&&i(y,y,d),u&&h(y,y,u),this.setMatrix(g,n(this.computedMatrix,y))};var A=[0,0,0];w.pan=function(g,b,d,u){A[0]=-(b||0),A[1]=-(d||0),A[2]=-(u||0),this.recalcMatrix(g);var y=this.computedInverse;m(y,y,A),this.setMatrix(g,n(y,y))},w.translate=function(g,b,d,u){A[0]=b||0,A[1]=d||0,A[2]=u||0,this.recalcMatrix(g);var y=this.computedMatrix;m(y,y,A),this.setMatrix(g,y)},w.setMatrix=function(g,b){if(!(g<this.lastT())){this._time.push(g);for(var d=0;d<16;++d)this._components.push(b[d])}},w.setDistance=function(g,b){this.computedRadius[0]=b},w.setDistanceLimits=function(g,b){var d=this._limits;d[0]=g,d[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)}},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 c=s[h];if(c.type==="preprocessor"){var m=c.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(m&&m[2]){var p=m[1],T=m[2];return(p?a(T):T).trim()}}}}},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(p){return a(p,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(p){return a(p,s,h,null,[{name:"position",type:"vec3"}])};var c=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);
}
`]),m=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(p){return a(p,c,m,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},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",c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=a([32,0])),c.BIGUINT64||(c.BIGUINT64=a([32,0])),c.BIGINT64||(c.BIGINT64=a([32,0])),c.BUFFER||(c.BUFFER=a([32,0]));var m=c.DATA,p=c.BUFFER;t.free=function(O){if(n.isBuffer(O))p[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;m[U].push(O)}};function T(N){if(N){var O=N.length||N.byteLength,P=o.log2(O);m[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){p[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 d(O);case"float":case"float32":return u(O);case"double":case"float64":return y(O);case"uint8_clamped":return f(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=m[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 d(N){return new Int32Array(_(4*N),0,N)}t.mallocInt32=d;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 f(N){return i?new Uint8ClampedArray(_(N),0,N):w(N)}t.mallocUint8Clamped=f;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=p[O];return P.length>0?P.pop():new n(N)}t.mallocBuffer=F,t.clearCache=function(){for(var O=0;O<32;++O)c.UINT8[O].length=0,c.UINT16[O].length=0,c.UINT32[O].length=0,c.INT8[O].length=0,c.INT16[O].length=0,c.INT32[O].length=0,c.FLOAT[O].length=0,c.DOUBLE[O].length=0,c.BIGUINT64[O].length=0,c.BIGINT64[O].length=0,c.UINT8C[O].length=0,m[O].length=0,p[O].length=0}},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}},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]),c=1;c<i.length;++c)h=a(h,o(i[c],s[c]));return h}},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)}},2014:function(e,t,r){"use strict";"use restrict";var o=r(3105),a=r(4623);function n(u){for(var y=0,f=Math.max,R=0,L=u.length;R<L;++R)y=f(y,u[R].length);return y-1}t.dimension=n;function i(u){for(var y=-1,f=Math.max,R=0,L=u.length;R<L;++R)for(var z=u[R],F=0,N=z.length;F<N;++F)y=f(y,z[F]);return y+1}t.countVertices=i;function s(u){for(var y=new Array(u.length),f=0,R=u.length;f<R;++f)y[f]=u[f].slice(0);return y}t.cloneCells=s;function h(u,y){var f=u.length,R=u.length-y.length,L=Math.min;if(R)return R;switch(f){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<f;++X)if(R=U[X]-B[X],R)return R;return 0}}t.compareCells=h;function c(u,y){return h(u[0],y[0])}function m(u,y){if(y){for(var f=u.length,R=new Array(f),L=0;L<f;++L)R[L]=[u[L],y[L]];R.sort(c);for(var L=0;L<f;++L)u[L]=R[L][0],y[L]=R[L][1];return u}else return u.sort(h),u}t.normalize=m;function p(u){if(u.length===0)return[];for(var y=1,f=u.length,R=1;R<f;++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=p;function T(u,y){for(var f=0,R=u.length-1,L=-1;f<=R;){var z=f+R>>1,F=h(u[z],y);F<=0?(F===0&&(L=z),f=z+1):F>0&&(R=z-1)}return L}t.findCell=T;function l(u,y){for(var f=new Array(u.length),R=0,L=f.length;R<L;++R)f[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(;f[$++].push(R),!($>=u.length||h(u[$],z)!==0););}return f}t.incidence=l;function _(u,y){if(!y)return l(p(A(u,0)),u,0);for(var f=new Array(y),R=0;R<y;++R)f[R]=[];for(var R=0,L=u.length;R<L;++R)for(var z=u[R],F=0,N=z.length;F<N;++F)f[z[F]].push(R);return f}t.dual=_;function w(u){for(var y=[],f=0,R=u.length;f<R;++f)for(var L=u[f],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 m(y)}t.explode=w;function A(u,y){if(y<0)return[];for(var f=[],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]);f.push(N)}return m(f)}t.skeleton=A;function M(u){for(var y=[],f=0,R=u.length;f<R;++f)for(var L=u[f],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 m(y)}t.boundary=M;function g(u,y){for(var f=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)f.link(L[z],L[F]);for(var N=[],O=f.ranks,R=0;R<O.length;++R)O[R]=-1;for(var R=0;R<u.length;++R){var P=f.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=p(m(A(u,0))),f=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)f.link(F,T(y,[L[N]]));for(var O=[],P=f.ranks,R=0;R<P.length;++R)P[R]=-1;for(var R=0;R<u.length;++R){var U=f.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 d(u,y){return y?g(u,y):b(u)}t.connectedComponents=d},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),c=r(5609);function m(l,_){for(var w=new Array(l),A=0;A<l;++A)w[A]=_;return w}function p(l){for(var _=new Array(l),w=0;w<l;++w)_[w]=[];return _}function T(l,_){var Q=c(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 d(Ze){for(var at=Ze.length,nt=[0],rt=0;rt<at;++rt){var st=_[Ze[rt]],Me=_[Ze[(rt+1)%at]],ye=i(-st[0],st[1]),he=i(-st[0],Me[1]),Oe=i(Me[0],st[1]),tt=i(Me[0],Me[1]);nt=s(nt,s(s(ye,he),s(Oe,tt)))}return nt[nt.length-1]>0}b=b.filter(d);for(var u=b.length,y=new Array(u),f=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}f[g]=[F,g,R]}f.sort(function(Ze,at){return at[0]-Ze[0]});for(var g=0;g<u;++g)for(var R=f[g],X=R[1],$=R[2],N=0;N<u;++N)$[N]&&(y[N]=X);for(var se=p(u),g=0;g<u;++g)se[g].push(y[g]),se[y[g]].push(g);for(var le={},fe=m(w,!1),g=0;g<u;++g)for(var O=b[g],P=O.length,N=0;N<P;++N){var V=O[N],Y=O[(N+1)%P],ee=Math.min(V,Y)+":"+Math.max(V,Y);if(ee in le){var q=le[ee];se[q].push(g),se[g].push(q),fe[V]=fe[Y]=!0}else le[ee]=g}function oe(Ze){for(var at=Ze.length,nt=0;nt<at;++nt)if(!fe[Ze[nt]])return!1;return!0}for(var ae=[],j=m(u,-1),g=0;g<u;++g)y[g]===g&&!oe(b[g])?(ae.push(g),j[g]=0):j[g]=-1;for(var Q=[];ae.length>0;){var re=ae.pop(),ce=se[re];h(ce,function(Ze,at){return Ze-at});var be=ce.length,Ae=j[re],De;if(Ae===0){var O=b[re];De=[O]}for(var g=0;g<be;++g){var ze=ce[g];if(!(j[ze]>=0)&&(j[ze]=Ae^1,ae.push(ze),Ae===0)){var O=b[ze];oe(O)||(O.reverse(),De.push(O))}}Ae===0&&Q.push(De)}return Q}},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 c=Object.keys(r);o={};for(var m=0;m<c.length;++m){var p=c[m];o[s[p]]=r[p]}}return o[h]}function n(s,h){for(var c=s.getProgramParameter(h,s.ACTIVE_UNIFORMS),m=[],p=0;p<c;++p){var T=s.getActiveUniform(h,p);if(T){var l=a(s,T.type);if(T.size>1)for(var _=0;_<T.size;++_)m.push({name:T.name.replace("[0]","["+_+"]"),type:l});else m.push({name:T.name,type:l})}}return m}function i(s,h){for(var c=s.getProgramParameter(h,s.ACTIVE_ATTRIBUTES),m=[],p=0;p<c;++p){var T=s.getActiveAttrib(h,p);T&&m.push({name:T.name,type:a(s,T.type)})}return m}},2229:function(e,t,r){e.exports=r(6843)},2260:function(e,t,r){"use strict";var o=r(7766);e.exports=b;var a=null,n,i,s,h;function c(d){var u=d.getParameter(d.FRAMEBUFFER_BINDING),y=d.getParameter(d.RENDERBUFFER_BINDING),f=d.getParameter(d.TEXTURE_BINDING_2D);return[u,y,f]}function m(d,u){d.bindFramebuffer(d.FRAMEBUFFER,u[0]),d.bindRenderbuffer(d.RENDERBUFFER,u[1]),d.bindTexture(d.TEXTURE_2D,u[2])}function p(d,u){var y=d.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(y+1);for(var f=0;f<=y;++f){for(var R=new Array(y),L=0;L<f;++L)R[L]=d.COLOR_ATTACHMENT0+L;for(var L=f;L<y;++L)R[L]=d.NONE;a[f]=R}}function T(d){switch(d){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(d,u,y,f,R,L){if(!f)return null;var z=o(d,u,y,R,f);return z.magFilter=d.NEAREST,z.minFilter=d.NEAREST,z.mipSamples=1,z.bind(),d.framebufferTexture2D(d.FRAMEBUFFER,L,d.TEXTURE_2D,z.handle,0),z}function _(d,u,y,f,R){var L=d.createRenderbuffer();return d.bindRenderbuffer(d.RENDERBUFFER,L),d.renderbufferStorage(d.RENDERBUFFER,f,u,y),d.framebufferRenderbuffer(d.FRAMEBUFFER,R,d.RENDERBUFFER,L),L}function w(d){var u=c(d.gl),y=d.gl,f=d.handle=y.createFramebuffer(),R=d._shape[0],L=d._shape[1],z=d.color.length,F=d._ext,N=d._useStencil,O=d._useDepth,P=d._colorType;y.bindFramebuffer(y.FRAMEBUFFER,f);for(var U=0;U<z;++U)d.color[U]=l(y,R,L,P,y.RGBA,y.COLOR_ATTACHMENT0+U);z===0?(d._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?d.depth=l(y,R,L,B.UNSIGNED_INT_24_8_WEBGL,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O&&(d.depth=l(y,R,L,y.UNSIGNED_SHORT,y.DEPTH_COMPONENT,y.DEPTH_ATTACHMENT)):O&&N?d._depth_rb=_(y,R,L,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O?d._depth_rb=_(y,R,L,y.DEPTH_COMPONENT16,y.DEPTH_ATTACHMENT):N&&(d._depth_rb=_(y,R,L,y.STENCIL_INDEX,y.STENCIL_ATTACHMENT));var X=y.checkFramebufferStatus(y.FRAMEBUFFER);if(X!==y.FRAMEBUFFER_COMPLETE){d._destroyed=!0,y.bindFramebuffer(y.FRAMEBUFFER,null),y.deleteFramebuffer(d.handle),d.handle=null,d.depth&&(d.depth.dispose(),d.depth=null),d._depth_rb&&(y.deleteRenderbuffer(d._depth_rb),d._depth_rb=null);for(var U=0;U<d.color.length;++U)d.color[U].dispose(),d.color[U]=null;d._color_rb&&(y.deleteRenderbuffer(d._color_rb),d._color_rb=null),m(y,u),T(X)}m(y,u)}function A(d,u,y,f,R,L,z,F){this.gl=d,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=f,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(d,u,y){if(d._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(d._shape[0]===u&&d._shape[1]===y)){var f=d.gl,R=f.getParameter(f.MAX_RENDERBUFFER_SIZE);if(u<0||u>R||y<0||y>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");d._shape[0]=u,d._shape[1]=y;for(var L=c(f),z=0;z<d.color.length;++z)d.color[z].shape=d._shape;d._color_rb&&(f.bindRenderbuffer(f.RENDERBUFFER,d._color_rb),f.renderbufferStorage(f.RENDERBUFFER,f.RGBA4,d._shape[0],d._shape[1])),d.depth&&(d.depth.shape=d._shape),d._depth_rb&&(f.bindRenderbuffer(f.RENDERBUFFER,d._depth_rb),d._useDepth&&d._useStencil?f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_STENCIL,d._shape[0],d._shape[1]):d._useDepth?f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_COMPONENT16,d._shape[0],d._shape[1]):d._useStencil&&f.renderbufferStorage(f.RENDERBUFFER,f.STENCIL_INDEX,d._shape[0],d._shape[1])),f.bindFramebuffer(f.FRAMEBUFFER,d.handle);var F=f.checkFramebufferStatus(f.FRAMEBUFFER);F!==f.FRAMEBUFFER_COMPLETE&&(d.dispose(),m(f,L),T(F)),m(f,L)}}Object.defineProperties(M,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(d){if(Array.isArray(d)||(d=[d|0,d|0]),d.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var u=d[0]|0,y=d[1]|0;return g(this,u,y),[u,y]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(d){return d=d|0,g(this,d,this._shape[1]),d},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(d){return d=d|0,g(this,this._shape[0],d),d},enumerable:!1}}),M.bind=function(){if(!this._destroyed){var d=this.gl;d.bindFramebuffer(d.FRAMEBUFFER,this.handle),d.viewport(0,0,this._shape[0],this._shape[1])}},M.dispose=function(){if(!this._destroyed){this._destroyed=!0;var d=this.gl;d.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(d.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&&(d.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function b(d,u,y,f){n||(n=d.FRAMEBUFFER_UNSUPPORTED,i=d.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,s=d.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=d.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var R=d.getExtension("WEBGL_draw_buffers");if(!a&&R&&p(d,R),Array.isArray(u)&&(f=y,y=u[1]|0,u=u[0]|0),typeof u!="number")throw new Error("gl-fbo: Missing shape parameter");var L=d.getParameter(d.MAX_RENDERBUFFER_SIZE);if(u<0||u>L||y<0||y>L)throw new Error("gl-fbo: Parameters are too large for FBO");f=f||{};var z=1;if("color"in f){if(z=Math.max(f.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(R){if(z>d.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=d.UNSIGNED_BYTE,N=d.getExtension("OES_texture_float");if(f.float&&z>0){if(!N)throw new Error("gl-fbo: Context does not support floating point textures");F=d.FLOAT}else f.preferFloat&&z>0&&N&&(F=d.FLOAT);var O=!0;"depth"in f&&(O=!!f.depth);var P=!1;return"stencil"in f&&(P=!!f.stencil),new A(d,u,y,F,z,O,P,R)}},2272:function(e,t,r){"use strict";var o=r(2646)[4],a=r(2478);e.exports=i;function n(s,h,c,m,p,T){var l=h.opposite(m,p);if(!(l<0)){if(p<m){var _=m;m=p,p=_,_=T,T=l,l=_}h.isConstraint(m,p)||o(s[m],s[p],s[T],s[l])<0&&c.push(m,p)}}function i(s,h){for(var c=[],m=s.length,p=h.stars,T=0;T<m;++T)for(var l=p[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&&c.push(T,w)}}for(;c.length>0;){for(var w=c.pop(),T=c.pop(),A=-1,M=-1,l=p[T],b=1;b<l.length;b+=2){var d=l[b-1],u=l[b];d===w?M=u:u===w&&(A=d)}A<0||M<0||o(s[T],s[w],s[A],s[M])>=0||(h.flip(T,w),n(s,h,c,A,T,M),n(s,h,c,T,M,A),n(s,h,c,M,w,A),n(s,h,c,w,A,M))}}},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}},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}},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,c=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 m=_,p=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)}},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],c=o[2],m=o[3],p=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-p*n,r[1]=h*i-T*n,r[2]=c*i-l*n,r[3]=m*i-_*n,r[8]=s*n+p*i,r[9]=h*n+T*i,r[10]=c*n+l*i,r[11]=m*n+_*i,r}},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}},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}},2455:function(e,t){"use strict";function r(){function n(h,c,m,p,T,l,_,w,A,M,g){for(var b=2*h,d=p,u=b*p;d<T;++d,u+=b){var y=l[c+u],f=l[c+u+h],R=_[d];e:for(var L=w,z=b*w;L<A;++L,z+=b){var F=M[c+z],N=M[c+z+h],O=g[L];if(!(N<y||f<F)){for(var P=c+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 se=m(R,O);if(se!==void 0)return se}}}}function i(h,c,m,p,T,l,_,w,A,M,g){for(var b=2*h,d=w,u=b*w;d<A;++d,u+=b){var y=M[c+u],f=M[c+u+h],R=g[d];e:for(var L=p,z=b*p;L<T;++L,z+=b){var F=l[c+z],N=l[c+z+h],O=_[L];if(!(f<F||N<y)){for(var P=c+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 se=m(O,R);if(se!==void 0)return se}}}}function s(h,c,m,p,T,l,_,w,A,M,g){return T-p>A-w?n(h,c,m,p,T,l,_,w,A,M,g):i(h,c,m,p,T,l,_,w,A,M,g)}return s}function o(){function n(m,p,T,l,_,w,A,M,g,b,d){for(var u=2*m,y=l,f=u*l;y<_;++y,f+=u){var R=w[p+f],L=w[p+f+m],z=A[y];e:for(var F=M,N=u*M;F<g;++F,N+=u){var O=b[p+N],P=d[F];if(!(O<=R||L<O)){for(var U=p+1;U<m;++U){var B=w[U+f],X=w[U+m+f],$=b[U+N],se=b[U+m+N];if(X<$||se<B)continue e}var le=T(P,z);if(le!==void 0)return le}}}}function i(m,p,T,l,_,w,A,M,g,b,d){for(var u=2*m,y=l,f=u*l;y<_;++y,f+=u){var R=w[p+f],L=w[p+f+m],z=A[y];e:for(var F=M,N=u*M;F<g;++F,N+=u){var O=b[p+N],P=d[F];if(!(O<R||L<O)){for(var U=p+1;U<m;++U){var B=w[U+f],X=w[U+m+f],$=b[U+N],se=b[U+m+N];if(X<$||se<B)continue e}var le=T(z,P);if(le!==void 0)return le}}}}function s(m,p,T,l,_,w,A,M,g,b,d){for(var u=2*m,y=M,f=u*M;y<g;++y,f+=u){var R=b[p+f],L=d[y];e:for(var z=l,F=u*l;z<_;++z,F+=u){var N=w[p+F],O=w[p+F+m],P=A[z];if(!(R<=N||O<R)){for(var U=p+1;U<m;++U){var B=w[U+F],X=w[U+m+F],$=b[U+f],se=b[U+m+f];if(X<$||se<B)continue e}var le=T(L,P);if(le!==void 0)return le}}}}function h(m,p,T,l,_,w,A,M,g,b,d){for(var u=2*m,y=M,f=u*M;y<g;++y,f+=u){var R=b[p+f],L=d[y];e:for(var z=l,F=u*l;z<_;++z,F+=u){var N=w[p+F],O=w[p+F+m],P=A[z];if(!(R<N||O<R)){for(var U=p+1;U<m;++U){var B=w[U+F],X=w[U+m+F],$=b[U+f],se=b[U+m+f];if(X<$||se<B)continue e}var le=T(P,L);if(le!==void 0)return le}}}}function c(m,p,T,l,_,w,A,M,g,b,d,u){return w-_>b-g?l?n(m,p,T,_,w,A,M,g,b,d,u):i(m,p,T,_,w,A,M,g,b,d,u):l?s(m,p,T,_,w,A,M,g,b,d,u):h(m,p,T,_,w,A,M,g,b,d,u)}return c}function a(n){return n?r():o()}t.partial=a(!1),t.full=a(!0)},2478:function(e){"use strict";function t(s,h,c,m,p){for(var T=p+1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w>=0?(T=l,p=l-1):m=l+1}return T}function r(s,h,c,m,p){for(var T=p+1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w>0?(T=l,p=l-1):m=l+1}return T}function o(s,h,c,m,p){for(var T=m-1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w<0?(T=l,m=l+1):p=l-1}return T}function a(s,h,c,m,p){for(var T=m-1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w<=0?(T=l,m=l+1):p=l-1}return T}function n(s,h,c,m,p){for(;m<=p;){var T=m+p>>>1,l=s[T],_=c!==void 0?c(l,h):l-h;if(_===0)return T;_<=0?m=T+1:p=T-1}return-1}function i(s,h,c,m,p,T){return typeof c=="function"?T(s,h,c,m===void 0?0:m|0,p===void 0?s.length-1:p|0):T(s,h,void 0,c===void 0?0:c|0,m===void 0?s.length-1:m|0)}e.exports={ge:function(s,h,c,m,p){return i(s,h,c,m,p,t)},gt:function(s,h,c,m,p){return i(s,h,c,m,p,r)},lt:function(s,h,c,m,p){return i(s,h,c,m,p,o)},le:function(s,h,c,m,p){return i(s,h,c,m,p,a)},eq:function(s,h,c,m,p){return i(s,h,c,m,p,n)}}},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}},2538:function(e,t,r){"use strict";var o=r(8902),a=r(5542),n=r(2272),i=r(5023);e.exports=p;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 c(T){return T.map(s).sort(h)}function m(T,l,_){return l in T?T[l]:_}function p(T,l,_){Array.isArray(l)?(_=_||{},l=l||[]):(_=l||{},l=[]);var w=!!m(_,"delaunay",!0),A=!!m(_,"interior",!0),M=!!m(_,"exterior",!0),g=!!m(_,"infinity",!1);if(!A&&!M||T.length===0)return[];var b=o(T,l);if(w||A!==M||g){for(var d=a(T.length,c(l)),u=0;u<b.length;++u){var y=b[u];d.addTriangle(y[0],y[1],y[2])}return w&&n(T,d),M?A?g?i(d,0,g):d.cells():i(d,1,g):i(d,-1)}else return b}},2573:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2],c=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]=c+n*(a[3]-c),r}},2613:function(e){e.exports=1e-6},2640:function(e,t,r){"use strict";var o=r(1888);e.exports=i;var a={"false,0,1":function(h,c,m,p,T){return function(_,w,A,M){var g=_.shape[0]|0,b=_.shape[1]|0,d=_.data,u=_.offset|0,y=_.stride[0]|0,f=_.stride[1]|0,R=u,L,z=-y|0,F=0,N=-f|0,O=0,P=-y-f|0,U=0,B=y|0,X=f-y*g|0,$=0,se=0,le=0,fe=2*g|0,V=p(fe),Y=p(fe),ee=0,q=0,oe=-1,ae=-1,j=0,Q=-g|0,re=g|0,ce=0,be=-g-1|0,Ae=g-1|0,De=0,ze=0,Ze=0;for($=0;$<g;++$)V[ee++]=m(d[R],w,A,M),R+=B;if(R+=X,b>0){if(se=1,V[ee++]=m(d[R],w,A,M),R+=B,g>0)for($=1,L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++),ee+=1,R+=B,$=2;$<g;++$)L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++,De!==j&&c(Y[ee+oe],ze,U,F,De,j,w,A,M)),ee+=1,R+=B;for(R+=X,ee=0,Ze=oe,oe=ae,ae=Ze,Ze=Q,Q=re,re=Ze,Ze=be,be=Ae,Ae=Ze,se=2;se<b;++se){if(V[ee++]=m(d[R],w,A,M),R+=B,g>0)for($=1,L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++,De!==ce&&c(Y[ee+Q],ze,O,U,ce,De,w,A,M)),ee+=1,R+=B,$=2;$<g;++$)L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++,De!==ce&&c(Y[ee+Q],ze,O,U,ce,De,w,A,M),De!==j&&c(Y[ee+oe],ze,U,F,De,j,w,A,M)),ee+=1,R+=B;se&1&&(ee=0),Ze=oe,oe=ae,ae=Ze,Ze=Q,Q=re,re=Ze,Ze=be,be=Ae,Ae=Ze,R+=X}}T(Y),T(V)}},"false,1,0":function(h,c,m,p,T){return function(_,w,A,M){var g=_.shape[0]|0,b=_.shape[1]|0,d=_.data,u=_.offset|0,y=_.stride[0]|0,f=_.stride[1]|0,R=u,L,z=-y|0,F=0,N=-f|0,O=0,P=-y-f|0,U=0,B=f|0,X=y-f*b|0,$=0,se=0,le=0,fe=2*b|0,V=p(fe),Y=p(fe),ee=0,q=0,oe=-1,ae=-1,j=0,Q=-b|0,re=b|0,ce=0,be=-b-1|0,Ae=b-1|0,De=0,ze=0,Ze=0;for(se=0;se<b;++se)V[ee++]=m(d[R],w,A,M),R+=B;if(R+=X,g>0){if($=1,V[ee++]=m(d[R],w,A,M),R+=B,b>0)for(se=1,L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++),ee+=1,R+=B,se=2;se<b;++se)L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++,De!==j&&c(Y[ee+oe],ze,O,U,j,De,w,A,M)),ee+=1,R+=B;for(R+=X,ee=0,Ze=Q,Q=re,re=Ze,Ze=oe,oe=ae,ae=Ze,Ze=be,be=Ae,Ae=Ze,$=2;$<g;++$){if(V[ee++]=m(d[R],w,A,M),R+=B,b>0)for(se=1,L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++,De!==ce&&c(Y[ee+Q],ze,U,F,De,ce,w,A,M)),ee+=1,R+=B,se=2;se<b;++se)L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++,De!==j&&c(Y[ee+oe],ze,O,U,j,De,w,A,M),De!==ce&&c(Y[ee+Q],ze,U,F,De,ce,w,A,M)),ee+=1,R+=B;$&1&&(ee=0),Ze=Q,Q=re,re=Ze,Ze=oe,oe=ae,ae=Ze,Ze=be,be=Ae,Ae=Ze,R+=X}}T(Y),T(V)}}};function n(s,h,c,m,p,T){var l=[T,p].join(","),_=a[l];return _(s,h,c,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 c=s.order;Array.isArray(c)||h("Must specify order");var m=s.arrayArguments||1;m<1&&h("Must have at least one array argument");var p=s.scalarArguments||0;p<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(m),_=0;_<m;++_)T.indexOf(_)>=0?l[_]=!0:l[_]=!1;return n(s.vertex,s.cell,s.phase,p,c,l)}},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,c=new Array(h+1),m=0;m<h;++m){for(var p=new Array(h+1),T=0;T<=h;++T)p[T]=i[T][m];c[m]=p}c[h]=new Array(h+1);for(var m=0;m<=h;++m)c[h][m]=1;for(var l=new Array(h+1),m=0;m<h;++m)l[m]=s[m];l[h]=1;var _=o(c,l),w=a(_[h+1]);w===0&&(w=1);for(var A=new Array(h+1),m=0;m<=h;++m)A[m]=a(_[m])/w;return A}},2646:function(e,t,r){"use strict";var o=r(5250),a=r(8210),n=r(8545),i=r(3012),s=6;function h(d){var u=d===3?T:d===4?l:d===5?_:w;return u(a,n,o,i)}function c(){return 0}function m(){return 0}function p(){return 0}function T(d,u,y,f){function R(L,z,F){var N=y(L[0],L[0]),O=f(N,z[0]),P=f(N,F[0]),U=y(z[0],z[0]),B=f(U,L[0]),X=f(U,F[0]),$=y(F[0],F[0]),se=f($,L[0]),le=f($,z[0]),fe=d(u(le,X),u(B,O)),V=u(se,P),Y=u(fe,V);return Y[Y.length-1]}return R}function l(d,u,y,f){function R(L,z,F,N){var O=d(y(L[0],L[0]),y(L[1],L[1])),P=f(O,z[0]),U=f(O,F[0]),B=f(O,N[0]),X=d(y(z[0],z[0]),y(z[1],z[1])),$=f(X,L[0]),se=f(X,F[0]),le=f(X,N[0]),fe=d(y(F[0],F[0]),y(F[1],F[1])),V=f(fe,L[0]),Y=f(fe,z[0]),ee=f(fe,N[0]),q=d(y(N[0],N[0]),y(N[1],N[1])),oe=f(q,L[0]),ae=f(q,z[0]),j=f(q,F[0]),Q=d(d(f(u(j,ee),z[1]),d(f(u(ae,le),-F[1]),f(u(Y,se),N[1]))),d(f(u(ae,le),L[1]),d(f(u(oe,B),-z[1]),f(u($,P),N[1])))),re=d(d(f(u(j,ee),L[1]),d(f(u(oe,B),-F[1]),f(u(V,U),N[1]))),d(f(u(Y,se),L[1]),d(f(u(V,U),-z[1]),f(u($,P),F[1])))),ce=u(Q,re);return ce[ce.length-1]}return R}function _(d,u,y,f){function R(L,z,F,N,O){var P=d(y(L[0],L[0]),d(y(L[1],L[1]),y(L[2],L[2]))),U=f(P,z[0]),B=f(P,F[0]),X=f(P,N[0]),$=f(P,O[0]),se=d(y(z[0],z[0]),d(y(z[1],z[1]),y(z[2],z[2]))),le=f(se,L[0]),fe=f(se,F[0]),V=f(se,N[0]),Y=f(se,O[0]),ee=d(y(F[0],F[0]),d(y(F[1],F[1]),y(F[2],F[2]))),q=f(ee,L[0]),oe=f(ee,z[0]),ae=f(ee,N[0]),j=f(ee,O[0]),Q=d(y(N[0],N[0]),d(y(N[1],N[1]),y(N[2],N[2]))),re=f(Q,L[0]),ce=f(Q,z[0]),be=f(Q,F[0]),Ae=f(Q,O[0]),De=d(y(O[0],O[0]),d(y(O[1],O[1]),y(O[2],O[2]))),ze=f(De,L[0]),Ze=f(De,z[0]),at=f(De,F[0]),nt=f(De,N[0]),rt=d(d(d(f(d(f(u(nt,Ae),F[1]),d(f(u(at,j),-N[1]),f(u(be,ae),O[1]))),z[2]),d(f(d(f(u(nt,Ae),z[1]),d(f(u(Ze,Y),-N[1]),f(u(ce,V),O[1]))),-F[2]),f(d(f(u(at,j),z[1]),d(f(u(Ze,Y),-F[1]),f(u(oe,fe),O[1]))),N[2]))),d(f(d(f(u(be,ae),z[1]),d(f(u(ce,V),-F[1]),f(u(oe,fe),N[1]))),-O[2]),d(f(d(f(u(nt,Ae),z[1]),d(f(u(Ze,Y),-N[1]),f(u(ce,V),O[1]))),L[2]),f(d(f(u(nt,Ae),L[1]),d(f(u(ze,$),-N[1]),f(u(re,X),O[1]))),-z[2])))),d(d(f(d(f(u(Ze,Y),L[1]),d(f(u(ze,$),-z[1]),f(u(le,U),O[1]))),N[2]),d(f(d(f(u(ce,V),L[1]),d(f(u(re,X),-z[1]),f(u(le,U),N[1]))),-O[2]),f(d(f(u(be,ae),z[1]),d(f(u(ce,V),-F[1]),f(u(oe,fe),N[1]))),L[2]))),d(f(d(f(u(be,ae),L[1]),d(f(u(re,X),-F[1]),f(u(q,B),N[1]))),-z[2]),d(f(d(f(u(ce,V),L[1]),d(f(u(re,X),-z[1]),f(u(le,U),N[1]))),F[2]),f(d(f(u(oe,fe),L[1]),d(f(u(q,B),-z[1]),f(u(le,U),F[1]))),-N[2]))))),st=d(d(d(f(d(f(u(nt,Ae),F[1]),d(f(u(at,j),-N[1]),f(u(be,ae),O[1]))),L[2]),f(d(f(u(nt,Ae),L[1]),d(f(u(ze,$),-N[1]),f(u(re,X),O[1]))),-F[2])),d(f(d(f(u(at,j),L[1]),d(f(u(ze,$),-F[1]),f(u(q,B),O[1]))),N[2]),f(d(f(u(be,ae),L[1]),d(f(u(re,X),-F[1]),f(u(q,B),N[1]))),-O[2]))),d(d(f(d(f(u(at,j),z[1]),d(f(u(Ze,Y),-F[1]),f(u(oe,fe),O[1]))),L[2]),f(d(f(u(at,j),L[1]),d(f(u(ze,$),-F[1]),f(u(q,B),O[1]))),-z[2])),d(f(d(f(u(Ze,Y),L[1]),d(f(u(ze,$),-z[1]),f(u(le,U),O[1]))),F[2]),f(d(f(u(oe,fe),L[1]),d(f(u(q,B),-z[1]),f(u(le,U),F[1]))),-O[2])))),Me=u(rt,st);return Me[Me.length-1]}return R}function w(d,u,y,f){function R(L,z,F,N,O,P){var U=d(d(y(L[0],L[0]),y(L[1],L[1])),d(y(L[2],L[2]),y(L[3],L[3]))),B=f(U,z[0]),X=f(U,F[0]),$=f(U,N[0]),se=f(U,O[0]),le=f(U,P[0]),fe=d(d(y(z[0],z[0]),y(z[1],z[1])),d(y(z[2],z[2]),y(z[3],z[3]))),V=f(fe,L[0]),Y=f(fe,F[0]),ee=f(fe,N[0]),q=f(fe,O[0]),oe=f(fe,P[0]),ae=d(d(y(F[0],F[0]),y(F[1],F[1])),d(y(F[2],F[2]),y(F[3],F[3]))),j=f(ae,L[0]),Q=f(ae,z[0]),re=f(ae,N[0]),ce=f(ae,O[0]),be=f(ae,P[0]),Ae=d(d(y(N[0],N[0]),y(N[1],N[1])),d(y(N[2],N[2]),y(N[3],N[3]))),De=f(Ae,L[0]),ze=f(Ae,z[0]),Ze=f(Ae,F[0]),at=f(Ae,O[0]),nt=f(Ae,P[0]),rt=d(d(y(O[0],O[0]),y(O[1],O[1])),d(y(O[2],O[2]),y(O[3],O[3]))),st=f(rt,L[0]),Me=f(rt,z[0]),ye=f(rt,F[0]),he=f(rt,N[0]),Oe=f(rt,P[0]),tt=d(d(y(P[0],P[0]),y(P[1],P[1])),d(y(P[2],P[2]),y(P[3],P[3]))),ot=f(tt,L[0]),Qe=f(tt,z[0]),Pt=f(tt,F[0]),It=f(tt,N[0]),qt=f(tt,O[0]),Wt=d(d(d(f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),F[2]),f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),-N[2])),d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),O[2]),f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),-P[2]))),z[3]),d(f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),z[2]),f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),-N[2])),d(f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),O[2]),f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),-P[2]))),-F[3]),f(d(d(f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),z[2]),f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),-F[2])),d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),O[2]),f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),-P[2]))),N[3]))),d(d(f(d(d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),z[2]),f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),-F[2])),d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),N[2]),f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),-P[2]))),-O[3]),f(d(d(f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),z[2]),f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),-F[2])),d(f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),N[2]),f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),-O[2]))),P[3])),d(f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),z[2]),f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),-N[2])),d(f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),O[2]),f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),-P[2]))),L[3]),f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-N[2])),d(f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),O[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-P[2]))),-z[3])))),d(d(d(f(d(d(f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),O[2]),f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),-P[2]))),N[3]),f(d(d(f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),L[2]),f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),N[2]),f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),-P[2]))),-O[3])),d(f(d(d(f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),L[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-z[2])),d(f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),N[2]),f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),-O[2]))),P[3]),f(d(d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),z[2]),f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),-F[2])),d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),N[2]),f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),-P[2]))),L[3]))),d(d(f(d(d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),L[2]),f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),-F[2])),d(f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),N[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-P[2]))),-z[3]),f(d(d(f(d(f(u(It,nt),z[1]),d(f(u(Qe,oe),-N[1]),f(u(ze,ee),P[1]))),L[2]),f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),N[2]),f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),-P[2]))),F[3])),d(f(d(d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),L[2]),f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-P[2]))),-N[3]),f(d(d(f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),L[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-z[2])),d(f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-N[2]))),P[3]))))),kr=d(d(d(f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),F[2]),f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),-N[2])),d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),O[2]),f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),-P[2]))),L[3]),d(f(d(d(f(d(f(u(qt,Oe),N[1]),d(f(u(It,nt),-O[1]),f(u(he,at),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-N[2])),d(f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),O[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-P[2]))),-F[3]),f(d(d(f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-F[2])),d(f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),O[2]),f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),-P[2]))),N[3]))),d(d(f(d(d(f(d(f(u(It,nt),F[1]),d(f(u(Pt,be),-N[1]),f(u(Ze,re),P[1]))),L[2]),f(d(f(u(It,nt),L[1]),d(f(u(ot,le),-N[1]),f(u(De,$),P[1]))),-F[2])),d(f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),N[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-P[2]))),-O[3]),f(d(d(f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),L[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-F[2])),d(f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),N[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-O[2]))),P[3])),d(f(d(d(f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),z[2]),f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),-F[2])),d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),O[2]),f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),-P[2]))),L[3]),f(d(d(f(d(f(u(qt,Oe),F[1]),d(f(u(Pt,be),-O[1]),f(u(ye,ce),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-F[2])),d(f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),O[2]),f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),-P[2]))),-z[3])))),d(d(d(f(d(d(f(d(f(u(qt,Oe),z[1]),d(f(u(Qe,oe),-O[1]),f(u(Me,q),P[1]))),L[2]),f(d(f(u(qt,Oe),L[1]),d(f(u(ot,le),-O[1]),f(u(st,se),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),O[2]),f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),-P[2]))),F[3]),f(d(d(f(d(f(u(Pt,be),z[1]),d(f(u(Qe,oe),-F[1]),f(u(Q,Y),P[1]))),L[2]),f(d(f(u(Pt,be),L[1]),d(f(u(ot,le),-F[1]),f(u(j,X),P[1]))),-z[2])),d(f(d(f(u(Qe,oe),L[1]),d(f(u(ot,le),-z[1]),f(u(V,B),P[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-P[2]))),-O[3])),d(f(d(d(f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),L[2]),f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),-z[2])),d(f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-O[2]))),P[3]),f(d(d(f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),z[2]),f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),-F[2])),d(f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),N[2]),f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),-O[2]))),L[3]))),d(d(f(d(d(f(d(f(u(he,at),F[1]),d(f(u(ye,ce),-N[1]),f(u(Ze,re),O[1]))),L[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-F[2])),d(f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),N[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-O[2]))),-z[3]),f(d(d(f(d(f(u(he,at),z[1]),d(f(u(Me,q),-N[1]),f(u(ze,ee),O[1]))),L[2]),f(d(f(u(he,at),L[1]),d(f(u(st,se),-N[1]),f(u(De,$),O[1]))),-z[2])),d(f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),N[2]),f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),-O[2]))),F[3])),d(f(d(d(f(d(f(u(ye,ce),z[1]),d(f(u(Me,q),-F[1]),f(u(Q,Y),O[1]))),L[2]),f(d(f(u(ye,ce),L[1]),d(f(u(st,se),-F[1]),f(u(j,X),O[1]))),-z[2])),d(f(d(f(u(Me,q),L[1]),d(f(u(st,se),-z[1]),f(u(V,B),O[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-O[2]))),-N[3]),f(d(d(f(d(f(u(Ze,re),z[1]),d(f(u(ze,ee),-F[1]),f(u(Q,Y),N[1]))),L[2]),f(d(f(u(Ze,re),L[1]),d(f(u(De,$),-F[1]),f(u(j,X),N[1]))),-z[2])),d(f(d(f(u(ze,ee),L[1]),d(f(u(De,$),-z[1]),f(u(V,B),N[1]))),F[2]),f(d(f(u(Q,Y),L[1]),d(f(u(j,X),-z[1]),f(u(V,B),F[1]))),-N[2]))),O[3]))))),mr=u(Wt,kr);return mr[mr.length-1]}return R}var A=[c,m,p];function M(d){var u=A[d.length];return u||(u=A[d.length]=h(d.length)),u.apply(void 0,d)}function g(d,u,y,f,R,L,z,F){function N(O,P,U,B,X,$){switch(arguments.length){case 0:case 1:return 0;case 2:return f(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 se=new Array(arguments.length),le=0;le<arguments.length;++le)se[le]=arguments[le];return d(se)}return N}function b(){for(;A.length<=s;)A.push(h(A.length));e.exports=g.apply(void 0,[M].concat(A));for(var d=0;d<=s;++d)e.exports[d]=A[d]}b()},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)}},2652:function(e,t,r){var o=r(4335),a=r(6864),n=r(1903),i=r(9921),s=r(7608),h=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},m=a(),p=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];e.exports=function(b,d,u,y,f,R){if(d||(d=[0,0,0]),u||(u=[0,0,0]),y||(y=[0,0,0]),f||(f=[0,0,0,1]),R||(R=[0,0,0,1]),!o(m,b)||(n(p,m),p[3]=0,p[7]=0,p[11]=0,p[15]=1,Math.abs(i(p)<1e-8)))return!1;var L=m[3],z=m[7],F=m[11],N=m[12],O=m[13],P=m[14],U=m[15];if(L!==0||z!==0||F!==0){T[0]=L,T[1]=z,T[2]=F,T[3]=U;var B=s(p,p);if(!B)return!1;h(p,p),w(f,T,p)}else f[0]=f[1]=f[2]=0,f[3]=1;if(d[0]=N,d[1]=O,d[2]=P,A(l,m),u[0]=c.length(l[0]),c.normalize(l[0],l[0]),y[0]=c.dot(l[0],l[1]),M(l[1],l[1],l[0],1,-y[0]),u[1]=c.length(l[1]),c.normalize(l[1],l[1]),y[0]/=u[1],y[1]=c.dot(l[0],l[2]),M(l[2],l[2],l[0],1,-y[1]),y[2]=c.dot(l[1],l[2]),M(l[2],l[2],l[1],1,-y[2]),u[2]=c.length(l[2]),c.normalize(l[2],l[2]),y[1]/=u[2],y[2]/=u[2],c.cross(_,l[1],l[2]),c.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,d){var u=b[0],y=b[1],f=b[2],R=b[3];return g[0]=d[0]*u+d[4]*y+d[8]*f+d[12]*R,g[1]=d[1]*u+d[5]*y+d[9]*f+d[13]*R,g[2]=d[2]*u+d[6]*y+d[10]*f+d[14]*R,g[3]=d[3]*u+d[7]*y+d[11]*f+d[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,d,u,y){g[0]=b[0]*u+d[0]*y,g[1]=b[1]*u+d[1]*y,g[2]=b[2]*u+d[2]*y}},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),c=0;c<s;++c)h[c]=o(n[c],i[c]);return h}},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}},2690:function(e,t,r){"use strict";e.exports=s;var o=r(8954),a=r(3952);function n(h,c){for(var m=h.length,p=new Array(m),T=0;T<c.length;++T)p[T]=h[c[T]];for(var l=c.length,T=0;T<m;++T)c.indexOf(T)<0&&(p[l++]=h[T]);return p}function i(h,c){for(var m=h.length,p=c.length,T=0;T<m;++T)for(var l=h[T],_=0;_<l.length;++_){var w=l[_];if(w<p)l[_]=c[w];else{w=w-p;for(var A=0;A<p;++A)w>=c[A]&&(w+=1);l[_]=w}}return h}function s(h,c){try{return o(h,!0)}catch{var m=a(h);if(m.length<=c)return[];var p=n(h,m),T=o(p,!0);return i(T,m)}}},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 c(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 m(l,_){for(var w=o.malloc(l.length,_),A=l.length,M=0;M<A;++M)w[M]=l[M];return w}function p(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&&p(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,l.data,_):this.length=c(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=c(this.gl,this.type,this.length,this.usage,M,_):this.length=c(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=m(l,"uint16"):b=m(l,"float32"),_<0?this.length=c(this.gl,this.type,this.length,this.usage,b,_):this.length=c(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=c(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},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)}},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}},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}},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 c(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 m(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 p(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?c:A===4?m:A===5?p:void 0;return M(a,n,o,i)}var l=[function(){return[0]},function(M){return[M[0][0]]}];function _(A,M,g,b,d,u,y,f){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 d(L);case 5:return u(L)}var z=y[L.length];return z||(z=y[L.length]=f(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()},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,c,m){"use strict";var p=n(c)||"of unknown name (see npm glsl-shader-name)",T="unknown type";m!==void 0&&(T=m===a.FRAGMENT_SHADER?"fragment":"vertex");for(var l=o(`Error compiling %s shader %s:
`,T,p),_=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 d=i(c).split(`
`),M=0;M<d.length;M++)if(!(!A[M+3]&&!A[M+2]&&!A[M+1])){var u=d[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()}}},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 c=o(i[0],s);return c[0]?c:[c[1]]}var m=new Array(2*h),p=[.1,.1],T=[.1,.1],l=0;o(i[0],s,p),p[0]&&(m[l++]=p[0]);for(var _=1;_<h;++_){o(i[_],s,T);var w=p[1];a(w,T[0],p),p[0]&&(m[l++]=p[0]);var A=T[1],M=p[1],g=A+M,b=g-A,d=M-b;p[1]=g,d&&(m[l++]=d)}return p[1]&&(m[l++]=p[1]),l===0&&(m[l++]=0),m.length=l,m}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},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}},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,c=[new Array(s),new Array(s)],m=0;m<s;++m)c[0][m]=[],c[1][m]=[];for(var m=0;m<h;++m){var p=n[m];c[0][p[0]].push(p),c[1][p[1]].push(p)}for(var T=[],m=0;m<s;++m)c[0][m].length+c[1][m].length===0&&T.push([m]);function l(u,y){var f=c[y][u[y]];f.splice(f.indexOf(u),1)}function _(u,y,f){for(var R,L,z,F=0;F<2;++F)if(c[F][y].length>0){R=c[F][y][0],z=F;break}L=R[z^1];for(var N=0;N<2;++N)for(var O=c[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 f||R&&l(R,z),L}function w(u,y){var f=c[y][u][0],R=[u];l(f,y);for(var L=f[y^1],z=y;;){for(;L!==u;)R.push(L),L=_(R[R.length-2],L,!1);if(c[0][u].length+c[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 m=0;m<s;++m)for(var M=0;M<2;++M){for(var g=[];c[M][m].length>0;){var b=c[0][m].length,d=w(m,M);A(g,d)?g.push.apply(g,d):(g.length>0&&T.push(g),g=d)}g.length>0&&T.push(g)}return T}},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 d=n[g][0]-n[b][0];return d||n[g][1]-n[b][1]});for(var c=[h[0],h[1]],m=[h[0],h[1]],s=2;s<i;++s){for(var p=h[s],T=n[p],l=c.length;l>1&&o(n[c[l-2]],n[c[l-1]],T)<=0;)l-=1,c.pop();for(c.push(p),l=m.length;l>1&&o(n[m[l-2]],n[m[l-1]],T)>=0;)l-=1,m.pop();m.push(p)}for(var _=new Array(m.length+c.length-2),w=0,s=0,A=c.length;s<A;++s)_[w++]=c[s];for(var M=m.length-2;M>0;--M)_[w++]=m[M];return _}},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,c=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--c;n[i]=h<<c&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}},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}},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 c=n[h];i=Math.max(i,c[0],c[1])}i=(i|0)+1}i=i|0;for(var m=new Array(i),h=0;h<i;++h)m[h]=[];for(var h=0;h<s;++h){var c=n[h];m[c[0]].push(c[1]),m[c[1]].push(c[0])}for(var p=0;p<i;++p)o(m[p],function(T,l){return T-l});return m}},3140:function(e,t,r){"use strict";e.exports=c;var o=r(3250),a=r(8572),n=r(9362),i=r(5382),s=r(8210);function h(m,p,T){var l=n(m[0],-p[0]),_=n(m[1],-p[1]),w=n(T[0],-p[0]),A=n(T[1],-p[1]),M=s(i(l,w),i(_,A));return M[M.length-1]>=0}function c(m,p,T,l){var _=o(p,T,l);if(_===0){var w=a(o(m,p,T)),A=a(o(m,p,l));if(w===A){if(w===0){var M=h(m,p,T),g=h(m,p,l);return M===g?0:M?1:-1}return 0}else{if(A===0)return w>0||h(m,p,l)?-1:1;if(w===0)return A>0||h(m,p,T)?1:-1}return a(A-w)}var b=o(m,p,T);if(b>0)return _>0&&o(m,p,l)>0?1:-1;if(b<0)return _>0||o(m,p,l)>0?1:-1;var d=o(m,p,l);return d>0||h(m,p,T)?1:-1}},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}},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}},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("")}},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,c=(3+16*h)*h,m=(7+56*h)*h;function p(u,y,f,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,f,R){return function(z,F,N,O){var P=u(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(f(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),f(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),u(f(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),O[2])))),U=u(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),f(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),u(f(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(f(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),f(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,f,R){return function(z,F,N,O,P){var U=u(u(u(f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),N[2]),u(f(u(y(N[1],P[0]),y(-P[1],N[0])),-O[2]),f(u(y(N[1],O[0]),y(-O[1],N[0])),P[2]))),F[3]),u(f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),F[2]),u(f(u(y(F[1],P[0]),y(-P[1],F[0])),-O[2]),f(u(y(F[1],O[0]),y(-O[1],F[0])),P[2]))),-N[3]),f(u(f(u(y(N[1],P[0]),y(-P[1],N[0])),F[2]),u(f(u(y(F[1],P[0]),y(-P[1],F[0])),-N[2]),f(u(y(F[1],N[0]),y(-N[1],F[0])),P[2]))),O[3]))),u(f(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(f(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),f(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),-P[3]),u(f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),F[2]),u(f(u(y(F[1],P[0]),y(-P[1],F[0])),-O[2]),f(u(y(F[1],O[0]),y(-O[1],F[0])),P[2]))),z[3]),f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-O[2]),f(u(y(z[1],O[0]),y(-O[1],z[0])),P[2]))),-F[3])))),u(u(f(u(f(u(y(F[1],P[0]),y(-P[1],F[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),P[2]))),O[3]),u(f(u(f(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),O[2]))),-P[3]),f(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),F[2]),u(f(u(y(F[1],O[0]),y(-O[1],F[0])),-N[2]),f(u(y(F[1],N[0]),y(-N[1],F[0])),O[2]))),z[3]))),u(f(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),f(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),-F[3]),u(f(u(f(u(y(F[1],O[0]),y(-O[1],F[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),O[2]))),N[3]),f(u(f(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(f(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),N[2]))),-O[3]))))),B=u(u(u(f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),N[2]),u(f(u(y(N[1],P[0]),y(-P[1],N[0])),-O[2]),f(u(y(N[1],O[0]),y(-O[1],N[0])),P[2]))),z[3]),f(u(f(u(y(O[1],P[0]),y(-P[1],O[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-O[2]),f(u(y(z[1],O[0]),y(-O[1],z[0])),P[2]))),-N[3])),u(f(u(f(u(y(N[1],P[0]),y(-P[1],N[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-N[2]),f(u(y(z[1],N[0]),y(-N[1],z[0])),P[2]))),O[3]),f(u(f(u(y(N[1],O[0]),y(-O[1],N[0])),z[2]),u(f(u(y(z[1],O[0]),y(-O[1],z[0])),-N[2]),f(u(y(z[1],N[0]),y(-N[1],z[0])),O[2]))),-P[3]))),u(u(f(u(f(u(y(N[1],P[0]),y(-P[1],N[0])),F[2]),u(f(u(y(F[1],P[0]),y(-P[1],F[0])),-N[2]),f(u(y(F[1],N[0]),y(-N[1],F[0])),P[2]))),z[3]),f(u(f(u(y(N[1],P[0]),y(-P[1],N[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-N[2]),f(u(y(z[1],N[0]),y(-N[1],z[0])),P[2]))),-F[3])),u(f(u(f(u(y(F[1],P[0]),y(-P[1],F[0])),z[2]),u(f(u(y(z[1],P[0]),y(-P[1],z[0])),-F[2]),f(u(y(z[1],F[0]),y(-F[1],z[0])),P[2]))),N[3]),f(u(f(u(y(F[1],N[0]),y(-N[1],F[0])),z[2]),u(f(u(y(z[1],N[0]),y(-N[1],z[0])),-F[2]),f(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?p:u===4?T:l;return y(a,o,n,i)}var w=_(3),A=_(4),M=[function(){return 0},function(){return 0},function(y,f){return f[0]-y[0]},function(y,f,R){var L=(y[1]-R[1])*(f[0]-R[0]),z=(y[0]-R[0])*(f[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=c*N;return F>=O||F<=-O?F:w(y,f,R)},function(y,f,R,L){var z=y[0]-L[0],F=f[0]-L[0],N=R[0]-L[0],O=y[1]-L[1],P=f[1]-L[1],U=R[1]-L[1],B=y[2]-L[2],X=f[2]-L[2],$=R[2]-L[2],se=F*U,le=N*P,fe=N*O,V=z*U,Y=z*P,ee=F*O,q=B*(se-le)+X*(fe-V)+$*(Y-ee),oe=(Math.abs(se)+Math.abs(le))*Math.abs(B)+(Math.abs(fe)+Math.abs(V))*Math.abs(X)+(Math.abs(Y)+Math.abs(ee))*Math.abs($),ae=m*oe;return q>ae||-q>ae?q:A(y,f,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,f,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),se=0;se<arguments.length;++se)$[se]=arguments[se];return u($)}}function d(){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]}d()},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,c){for(var m=new Array(h),p=0;p<h;++p)m[p]=c;return m}function s(h,c,m,p){function T(b){return function(d,u,y){return d.getUniform(u.program,y[b])}}function l(b){return function(u){for(var y=_("",b),f=0;f<y.length;++f){var R=y[f],L=R[0],z=R[1];if(p[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=m[z].type,X;switch(B){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(p[z],F);break;case"float":h.uniform1f(p[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"](p[z],F);break;case"v":h["uniform"+X+"fv"](p[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"](p[z],!1,F);break}else throw new a("","Unknown uniform data type for "+name+": "+B)}}}}}function _(b,d){if(typeof d!="object")return[[b,d]];var u=[];for(var y in d){var f=d[y],R=b;parseInt(y)+""===y?R+="["+y+"]":R+="."+y,typeof f=="object"?u.push.apply(u,_(R,f)):u.push([R,f])}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 d=b.indexOf("vec");if(0<=d&&d<=1&&b.length===4+d){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,d,u){if(typeof u=="object"){var y=M(u);Object.defineProperty(b,d,{get:n(y),set:l(u),enumerable:!0,configurable:!1})}else p[u]?Object.defineProperty(b,d,{get:T(u),set:l(u),enumerable:!0,configurable:!1}):b[d]=w(m[u].type)}function M(b){var d;if(Array.isArray(b)){d=new Array(b.length);for(var u=0;u<b.length;++u)A(d,u,b[u])}else{d={};for(var y in b)A(d,y,b[y])}return d}var g=o(m,!0);return{get:n(M(g)),set:l(g),enumerable:!0,configurable:!0}}},3349:function(e){"use strict";function t(){return function(s,h,c,m,p,T){var l=s[0],_=c[0],w=[0],A=_;m|=0;var M=0,g=_;for(M=0;M<l;++M){{var b=h[m]-T,d=h[m+A]-T;b>=0!=d>=0&&p.push(w[0]+.5+.5*(b+d)/(b-d))}m+=g,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,p,T){var l=m.dtype,_=m.order,w=[l,_.join()].join(),A=h[w];return A||(h[w]=A=s([l,_])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,p,T)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"zeroCrossings"})},3352:function(e,t,r){"use strict";var o=r(2478),a=0,n=1,i=2;e.exports=y;function s(f,R,L,z,F){this.mid=f,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 c(f,R){f.mid=R.mid,f.left=R.left,f.right=R.right,f.leftPoints=R.leftPoints,f.rightPoints=R.rightPoints,f.count=R.count}function m(f,R){var L=b(R);f.mid=L.mid,f.left=L.left,f.right=L.right,f.leftPoints=L.leftPoints,f.rightPoints=L.rightPoints,f.count=L.count}function p(f,R){var L=f.intervals([]);L.push(R),m(f,L)}function T(f,R){var L=f.intervals([]),z=L.indexOf(R);return z<0?a:(L.splice(z,1),m(f,L),n)}h.intervals=function(f){return f.push.apply(f,this.leftPoints),this.left&&this.left.intervals(f),this.right&&this.right.intervals(f),f},h.insert=function(f){var R=this.count-this.leftPoints.length;if(this.count+=1,f[1]<this.mid)this.left?4*(this.left.count+1)>3*(R+1)?p(this,f):this.left.insert(f):this.left=b([f]);else if(f[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?p(this,f):this.right.insert(f):this.right=b([f]);else{var L=o.ge(this.leftPoints,f,M),z=o.ge(this.rightPoints,f,g);this.leftPoints.splice(L,0,f),this.rightPoints.splice(z,0,f)}},h.remove=function(f){var R=this.count-this.leftPoints;if(f[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,f);var z=this.left.remove(f);return z===i?(this.left=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else if(f[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,f);var z=this.right.remove(f);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]===f?i:a;if(this.leftPoints.length===1&&this.leftPoints[0]===f){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}c(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?c(this,this.left):c(this,this.right);return n}for(var P=o.ge(this.leftPoints,f,M);P<this.leftPoints.length&&this.leftPoints[P][0]===f[0];++P)if(this.leftPoints[P]===f){this.count-=1,this.leftPoints.splice(P,1);for(var z=o.ge(this.rightPoints,f,g);z<this.rightPoints.length&&this.rightPoints[z][1]===f[1];++z)if(this.rightPoints[z]===f)return this.rightPoints.splice(z,1),n}return a}};function l(f,R,L){for(var z=0;z<f.length&&f[z][0]<=R;++z){var F=L(f[z]);if(F)return F}}function _(f,R,L){for(var z=f.length-1;z>=0&&f[z][1]>=R;--z){var F=L(f[z]);if(F)return F}}function w(f,R){for(var L=0;L<f.length;++L){var z=R(f[L]);if(z)return z}}h.queryPoint=function(f,R){if(f<this.mid){if(this.left){var L=this.left.queryPoint(f,R);if(L)return L}return l(this.leftPoints,f,R)}else if(f>this.mid){if(this.right){var L=this.right.queryPoint(f,R);if(L)return L}return _(this.rightPoints,f,R)}else return w(this.leftPoints,R)},h.queryInterval=function(f,R,L){if(f<this.mid&&this.left){var z=this.left.queryInterval(f,R,L);if(z)return z}if(R>this.mid&&this.right){var z=this.right.queryInterval(f,R,L);if(z)return z}return R<this.mid?l(this.leftPoints,R,L):f>this.mid?_(this.rightPoints,f,L):w(this.leftPoints,L)};function A(f,R){return f-R}function M(f,R){var L=f[0]-R[0];return L||f[1]-R[1]}function g(f,R){var L=f[1]-R[1];return L||f[0]-R[0]}function b(f){if(f.length===0)return null;for(var R=[],L=0;L<f.length;++L)R.push(f[L][0],f[L][1]);R.sort(A);for(var z=R[R.length>>1],F=[],N=[],O=[],L=0;L<f.length;++L){var P=f[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 d(f){this.root=f}var u=d.prototype;u.insert=function(f){this.root?this.root.insert(f):this.root=new s(f[0],null,null,[f],[f])},u.remove=function(f){if(this.root){var R=this.root.remove(f);return R===i&&(this.root=null),R!==a}return!1},u.queryPoint=function(f,R){if(this.root)return this.root.queryPoint(f,R)},u.queryInterval=function(f,R,L){if(f<=R&&this.root)return this.root.queryInterval(f,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(f){return!f||f.length===0?new d(null):new d(b(f))}},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(m){return s(c(m),arguments)}function i(m,p){return n.apply(null,[m].concat(p||[]))}function s(m,p){var T=1,l=m.length,_,w="",A,M,g,b,d,u,y,f;for(A=0;A<l;A++)if(typeof m[A]=="string")w+=m[A];else if(typeof m[A]=="object"){if(g=m[A],g.keys)for(_=p[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?_=p[g.param_no]:_=p[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)?(f=y?"+":"-",_=_.toString().replace(a.sign,"")):f="",d=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",u=g.width-(f+_).length,b=g.width&&u>0?d.repeat(u):"",w+=g.align?f+_+b:d==="0"?f+b+_:b+f+_)}return w}var h=Object.create(null);function c(m){if(h[m])return h[m];for(var p=m,T,l=[],_=0;p;){if((T=a.text.exec(p))!==null)l.push(T[0]);else if((T=a.modulo.exec(p))!==null)l.push("%");else if((T=a.placeholder.exec(p))!==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");p=p.substring(T[0].length)}return h[m]=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))})()},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}},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"}])}},3502:function(e,t,r){e.exports=n;var o=r(5995),a=r(9127);function n(i,s){return a(o(i,s))}},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"])},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}},3545:function(e,t,r){"use strict";e.exports=s;var o=r(8105),a=o("lo<p0"),n=8;function i(h,c,m,p,T,l){for(var _=2*h,w=_*(m+1)+c,A=m+1;A<p;++A,w+=_)for(var M=T[w],g=A,b=_*(A-1);g>m&&T[b+c]>M;--g,b-=_){for(var d=b,u=b+_,y=0;y<_;++y,++d,++u){var f=T[d];T[d]=T[u],T[u]=f}var R=l[g];l[g]=l[g-1],l[g-1]=R}}function s(h,c,m,p,T,l){if(p<=m+1)return m;for(var _=m,w=p,A=p+m>>>1,M=2*h,g=A,b=T[M*A+c];_<w;){if(w-_<n){i(h,c,_,w,T,l),b=T[M*A+c];break}var d=w-_,u=Math.random()*d+_|0,y=T[M*u+c],f=Math.random()*d+_|0,R=T[M*f+c],L=Math.random()*d+_|0,z=T[M*L+c];y<=R?z>=R?(g=f,b=R):y>=z?(g=u,b=y):(g=L,b=z):R>=z?(g=f,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,c,_,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)+c]===b;)w-=1;w+=1}else if(g<A)for(_=g+1;_<w&&T[M*_+c]===b;)_+=1;else break}return a(h,c,m,A,T,l,T[M*A+c])}},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}},3589:function(e,t,r){"use strict";e.exports=p;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],d=0;d<g;d++)for(var u=0;u<b;u++){var y=T.get(d,u,0),f=T.get(d,u,1),R=T.get(d,u,2),L=T.get(d,u,3);if(y<255||f<255||R<255||L<255){var z=l-d,F=_-u,N=z*z+F*F;N<w&&(w=N,A=d,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 c(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 m=c.prototype;Object.defineProperty(m,"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}}}),m.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))},m.end=function(){var T=this.gl;T&&(T.bindFramebuffer(T.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},m.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 d=[M-A,b-g],u=n(this.buffer,[d[0],d[1],4],[4,w[0]*4,1],4*(A+w[0]*g)),y=s(u.hi(d[0],d[1],1),_,_),f=y[0],R=y[1];if(f<0||Math.pow(this.radius,2)<y[2])return null;var L=u.get(f,R,0),z=u.get(f,R,1),F=u.get(f,R,2),N=u.get(f,R,3);return new h(f+A|0,R+g|0,L,[z,F,N],Math.sqrt(y[2]))},m.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function p(T,l){var _=l[0],w=l[1],A={},M=o(T,_,w,A),g=a.mallocUint8(_*w*4);return new c(T,M,g)}},3628:function(e,t,r){"use strict";var o=r(1338),a=r(727);function n(h,c){for(var m=0,p=h.length,T=0;T<p;++T)m+=h[T]*c[T];return m}function i(h){var c=h.length;if(c===0)return[];var m=h[0].length,p=o([h.length+1,h.length+1],1),T=o([h.length+1],1);p[c][c]=0;for(var l=0;l<c;++l){for(var _=0;_<=l;++_)p[_][l]=p[l][_]=2*n(h[l],h[_]);T[l]=n(h[l],h[l])}for(var w=a(p,T),A=0,M=w[c+1],l=0;l<M.length;++l)A+=M[l];for(var g=new Array(c),l=0;l<c;++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 c=h[0].length,m=o([c]),p=i(h),T=0;T<h.length;++T)for(var l=0;l<c;++l)m[l]+=h[T][l]*p[T];return m}s.barycenetric=i,e.exports=s},3637:function(e,t,r){"use strict";e.exports=p;var o=r(6504),a=r(8697),n=r(5572),i=r(7721),s=r(544),h=r(2653),c=r(8987);function m(T,l){return n(o(T[0],l[1]),o(T[1],l[0]))}function p(T,l,_,w){var A=s(l,T),M=s(w,_),g=m(A,M);if(i(g)===0)return null;var b=s(T,_),d=m(M,b),u=a(d,g),y=c(A,u),f=h(T,y);return f}},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]}]}},3711:function(e,t,r){"use strict";e.exports=c;var o=r(2640),a=r(781),n={"2d":function(m,p,T){var l=m({order:p,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,d,u,y,f,R,L,z,F){var N=(u<<0)+(y<<1)+(f<<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*(d+g-2*F)/(g-d)]);break;case 3:L.push([w-.5,A-.5-.5*(b+M+d+g-4*F)/(M-b+g-d)]);break;case 4:L.push([w-.25-.25*(d+b-2*F)/(b-d),A-.75-.25*(-b-M+2*F)/(b-M)]);break;case 5:L.push([w-.5-.5*(g+M+d+b-4*F)/(M-g+b-d),A-.5]);break;case 6:L.push([w-.5-.25*(-g-M+d+b)/(g-M+b-d),A-.5-.25*(-b-M+d+g)/(b-M+g-d)]);break;case 7:L.push([w-.75-.25*(d+b-2*F)/(b-d),A-.75-.25*(d+g-2*F)/(g-d)]);break;case 8:L.push([w-.75-.25*(-d-b+2*F)/(d-b),A-.75-.25*(-d-g+2*F)/(d-g)]);break;case 9:L.push([w-.5-.25*(g+M+-d-b)/(M-g+d-b),A-.5-.25*(b+M+-d-g)/(M-b+d-g)]);break;case 10:L.push([w-.5-.5*(-g-M+-d-b+4*F)/(g-M+d-b),A-.5]);break;case 11:L.push([w-.25-.25*(-d-b+2*F)/(d-b),A-.75-.25*(b+M-2*F)/(M-b)]);break;case 12:L.push([w-.5,A-.5-.5*(-b-M+-d-g+4*F)/(b-M+d-g)]);break;case 13:L.push([w-.75-.25*(g+M-2*F)/(M-g),A-.25-.25*(-d-g+2*F)/(d-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,d,u,y,f){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(m,p){var T=m.length+"d",l=n[T];if(l)return l(o,m,p)}function s(m,p){for(var T=a(m,p),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 c(m,_){if(m.dimension<=0)return{positions:[],cells:[]};if(m.dimension===1)return s(m,_);var T=m.order.join()+"-"+m.dtype,l=h[T],_=+_||0;return l||(l=h[T]=i(m.order,m.dtype)),l(m,_)}},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]}},3778:function(e,t){t.read=function(r,o,a,n,i){var s,h,c=i*8-n-1,m=(1<<c)-1,p=m>>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+=c;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-p;else{if(s===m)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,n),s=s-p}return(w?-1:1)*h*Math.pow(2,s-n)},t.write=function(r,o,a,n,i,s){var h,c,m,p=s*8-i-1,T=(1<<p)-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?(c=isNaN(o)?1:0,h=T):(h=Math.floor(Math.log(o)/Math.LN2),o*(m=Math.pow(2,-h))<1&&(h--,m*=2),h+l>=1?o+=_/m:o+=_*Math.pow(2,1-l),o*m>=2&&(h++,m/=2),h+l>=T?(c=0,h=T):h+l>=1?(c=(o*m-1)*Math.pow(2,i),h=h+l):(c=o*Math.pow(2,l-1)*Math.pow(2,i),h=0));i>=8;r[a+w]=c&255,w+=A,c/=256,i-=8);for(h=h<<i|c,p+=i;p>0;r[a+w]=h&255,w+=A,h/=256,p-=8);r[a+w-A]|=M*128}},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)}},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]),c=ArrayBuffer,m=DataView;function p(z){return c.isView(z)&&!(z instanceof m)}function T(z){return Array.isArray(z)||p(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,oe,ae){if(ae in z){var j=z[ae],Q=this[ae],re;(q?T(j)&&T(j[0]):T(j))?this[ae]=re=[oe(j[0]),oe(j[1]),oe(j[2])]:this[ae]=re=[oe(j),oe(j),oe(j)];for(var ce=0;ce<3;++ce)if(re[ce]!==Q[ce])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 se=z.bounds,le=0;le<2;++le)for(var fe=0;fe<3;++fe)se[le][fe]!==this.bounds[le][fe]&&($=!0),this.bounds[le][fe]=se[le][fe];if("ticks"in z){B=z.ticks,X=!0,this.autoTicks=!1;for(var le=0;le<3;++le)this.tickSpacing[le]=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 le=0;le<3;++le)B[le].sort(function(oe,ae){return oe.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 V=P("labels");P("labelFont")&&(V=!0),P("labelFontStyle")&&(V=!0),P("labelFontWeight")&&(V=!0),P("labelFontVariant")&&(V=!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&&(V||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,se=O[F],le=0;le<3;++le)if(F!==le){var fe=U,V=X,Y=B,ee=$;se&1<<le&&(fe=X,V=U,Y=$,ee=B),fe[le]=N[0][le],V[le]=N[1][le],P[le]>0?(Y[le]=-1,ee[le]=0):(Y[le]=0,ee[le]=1)}}var b=[0,0,0],d={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],f=[0,0,0],R=[0,0,0];w.draw=function(z){z=z||d;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,se=N[12],le=N[13],fe=N[14],V=N[15],Y=U?2:1,ee=Y*this.pixelRatio*(O[3]*se+O[7]*le+O[11]*fe+O[15]*V)/ae.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=X[q],this.lastCubeProps.axis[q]=$[q];for(var oe=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 ce=(q+1+re)%3,be=(q+1+(re^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,be,this.bounds,Q,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var re=0;re<2;++re){var ce=(q+1+re)%3,be=(q+1+(re^1))%3;this.zeroEnable[be]&&Math.min(P[0][be],P[1][be])<=0&&Math.max(P[0][be],P[1][be])>=0&&this._lines.drawZero(ce,be,this.bounds,Q,this.zeroLineColor[be],this.zeroLineWidth[be]*this.pixelRatio)}}for(var q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,oe[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,oe[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);for(var Ae=l(y,oe[q].primalMinor),De=l(f,oe[q].mirrorMinor),ze=this.lineTickLength,re=0;re<3;++re){var Ze=ee/F[5*re];Ae[re]*=ze[re]*Ze,De[re]*=ze[re]*Ze}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,oe[q].primalOffset,Ae,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,oe[q].mirrorOffset,De,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,N,O,this.pixelRatio);var at,nt=.5,rt,st;function Me(Qe){st=[0,0,0],st[Qe]=1}function ye(Qe,Pt,It){var qt=(Qe+1)%3,Wt=(Qe+2)%3,kr=Pt[qt],mr=Pt[Wt],qr=It[qt],Sr=It[Wt];if(kr>0&&Sr>0){Me(qt);return}else if(kr>0&&Sr<0){Me(qt);return}else if(kr<0&&Sr>0){Me(qt);return}else if(kr<0&&Sr<0){Me(qt);return}else if(mr>0&&qr>0){Me(Wt);return}else if(mr>0&&qr<0){Me(Wt);return}else if(mr<0&&qr>0){Me(Wt);return}else if(mr<0&&qr<0){Me(Wt);return}}for(var q=0;q<3;++q){for(var he=oe[q].primalMinor,Oe=oe[q].mirrorMinor,tt=l(R,oe[q].primalOffset),re=0;re<3;++re)this.lineTickEnable[q]&&(tt[re]+=ee*he[re]*Math.max(this.lineTickLength[re],0)/F[5*re]);var ot=[0,0,0];if(ot[q]=1,this.tickEnable[q]){this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,rt=1,at=[this.tickAlign[q],nt,rt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]),st=[0,0,0],ye(q,he,Oe);for(var re=0;re<3;++re)tt[re]+=ee*he[re]*this.tickPad[re]/F[5*re];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],tt,this.tickColor[q],ot,st,at)}if(this.labelEnable[q]){rt=0,st=[0,0,0],this.labels[q].length>4&&(Me(q),rt=1),at=[this.labelAlign[q],nt,rt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]);for(var re=0;re<3;++re)tt[re]+=ee*he[re]*this.labelPad[re]/F[5*re];tt[q]+=.5*(P[0][q]+P[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],tt,this.labelColor[q],[0,0,0],st,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}},3840:function(e){"use strict";e.exports=M;var t=0,r=1;function o(g,b,d,u,y,f){this._color=g,this.key=b,this.value=d,this.left=u,this.right=y,this._count=f}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,d){g.push(b)}),g}}),Object.defineProperty(h,"values",{get:function(){var g=[];return this.forEach(function(b,d){g.push(d)}),g}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(g,b){for(var d=this._compare,u=this.root,y=[],f=[];u;){var R=d(g,u.key);y.push(u),f.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];f[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(d,y[0])};function c(g,b){if(b.left){var d=c(g,b.left);if(d)return d}var d=g(b.key,b.value);if(d)return d;if(b.right)return c(g,b.right)}function m(g,b,d,u){var y=b(g,u.key);if(y<=0){if(u.left){var f=m(g,b,d,u.left);if(f)return f}var f=d(u.key,u.value);if(f)return f}if(u.right)return m(g,b,d,u.right)}function p(g,b,d,u,y){var f=d(g,y.key),R=d(b,y.key),L;if(f<=0&&(y.left&&(L=p(g,b,d,u,y.left),L)||R>0&&(L=u(y.key,y.value),L)))return L;if(R>0&&y.right)return p(g,b,d,u,y.right)}h.forEach=function(b,d,u){if(this.root)switch(arguments.length){case 1:return c(b,this.root);case 2:return m(d,this._compare,b,this.root);case 3:return this._compare(d,u)>=0?void 0:p(d,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,d=[];;){if(d.push(b),b.left){if(g<b.left._count){b=b.left;continue}g-=b.left._count}if(!g)return new T(this,d);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,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f<=0&&(y=u.length),f<=0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.gt=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f<0&&(y=u.length),f<0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.lt=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f>0&&(y=u.length),f<=0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.le=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f>=0&&(y=u.length),f<0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.find=function(g){for(var b=this._compare,d=this.root,u=[];d;){var y=b(g,d.key);if(u.push(d),y===0)return new T(this,u);y<=0?d=d.left:d=d.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,d=this.root;d;){var u=b(g,d.key);if(u===0)return d.value;u<=0?d=d.left:d=d.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,d,u,y,f=g.length-1;f>=0;--f){if(b=g[f],f===0){b._color=r;return}if(d=g[f-1],d.left===b){if(u=d.right,u.right&&u.right._color===t){if(u=d.right=a(u),y=u.right=a(u.right),d.right=u.left,u.left=d,u.right=y,u._color=d._color,b._color=r,d._color=r,y._color=r,i(d),i(u),f>1){var R=g[f-2];R.left===d?R.left=u:R.right=u}g[f-1]=u;return}else if(u.left&&u.left._color===t){if(u=d.right=a(u),y=u.left=a(u.left),d.right=y.left,u.left=y.right,y.left=d,y.right=u,y._color=d._color,d._color=r,u._color=r,b._color=r,i(d),i(u),i(y),f>1){var R=g[f-2];R.left===d?R.left=y:R.right=y}g[f-1]=y;return}if(u._color===r)if(d._color===t){d._color=r,d.right=n(t,u);return}else{d.right=n(t,u);continue}else{if(u=a(u),d.right=u.left,u.left=d,u._color=d._color,d._color=t,i(d),i(u),f>1){var R=g[f-2];R.left===d?R.left=u:R.right=u}g[f-1]=u,g[f]=d,f+1<g.length?g[f+1]=b:g.push(b),f=f+2}}else{if(u=d.left,u.left&&u.left._color===t){if(u=d.left=a(u),y=u.left=a(u.left),d.left=u.right,u.right=d,u.left=y,u._color=d._color,b._color=r,d._color=r,y._color=r,i(d),i(u),f>1){var R=g[f-2];R.right===d?R.right=u:R.left=u}g[f-1]=u;return}else if(u.right&&u.right._color===t){if(u=d.left=a(u),y=u.right=a(u.right),d.left=y.right,u.right=y.left,y.right=d,y.left=u,y._color=d._color,d._color=r,u._color=r,b._color=r,i(d),i(u),i(y),f>1){var R=g[f-2];R.right===d?R.right=y:R.left=y}g[f-1]=y;return}if(u._color===r)if(d._color===t){d._color=r,d.left=n(t,u);return}else{d.left=n(t,u);continue}else{if(u=a(u),d.left=u.right,u.right=d,u._color=d._color,d._color=t,i(d),i(u),f>1){var R=g[f-2];R.right===d?R.right=u:R.left=u}g[f-1]=u,g[f]=d,f+1<g.length?g[f+1]=b:g.push(b),f=f+2}}}}l.remove=function(){var g=this._stack;if(g.length===0)return this.tree;var b=new Array(g.length),d=g[g.length-1];b[b.length-1]=new o(d._color,d.key,d.value,d.left,d.right,d._count);for(var u=g.length-2;u>=0;--u){var d=g[u];d.left===g[u+1]?b[u]=new o(d._color,d.key,d.value,b[u+1],d.right,d._count):b[u]=new o(d._color,d.key,d.value,d.left,b[u+1],d._count)}if(d=b[b.length-1],d.left&&d.right){var y=b.length;for(d=d.left;d.right;)b.push(d),d=d.right;var f=b[y-1];b.push(new o(d._color,f.key,f.value,d.left,d.right,d._count)),b[y-1].key=d.key,b[y-1].value=d.value;for(var u=b.length-2;u>=y;--u)d=b[u],b[u]=new o(d._color,d.key,d.value,d.left,b[u+1],d._count);b[y-1].left=b[y]}if(d=b[b.length-1],d._color===t){var R=b[b.length-2];R.left===d?R.left=null:R.right===d&&(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(d.left||d.right){d.left?_(d,d.left):d.right&&_(d,d.right),d._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===d?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 d=this.tree.root;return d?d._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 d=new Array(b.length),u=b[b.length-1];d[d.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]?d[y]=new o(u._color,u.key,u.value,d[y+1],u.right,u._count):d[y]=new o(u._color,u.key,u.value,u.left,d[y+1],u._count);return new s(this.tree._compare,d[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)}},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]))}},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),c=0;c<i.length;++c)h[c]=i[c];for(var c=0;c<=i.length;++c){for(var m=i.length;m<=s;++m){for(var p=new Array(s),T=0;T<s;++T)p[T]=Math.pow(m+1-c,T);h[m]=p}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,c=[i[0]],m=[0],p=1;p<s;++p){if(c.push(i[p]),!a(c,h)){c.pop();continue}if(m.push(p),m.length===h+1)return m}return m}},3990:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r}},4008:function(e,t,r){e.exports=r(6690)},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}},4040:function(e){e.exports=t;function t(r,o,a,n,i,s,h){var c=1/(o-a),m=1/(n-i),p=1/(s-h);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*m,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*p,r[11]=0,r[12]=(o+a)*c,r[13]=(i+n)*m,r[14]=(h+s)*p,r[15]=1,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],c=a[1],m=a[2],p=a[3],T=p*n+c*s-m*i,l=p*i+m*n-h*s,_=p*s+h*i-c*n,w=-h*n-c*i-m*s;return r[0]=T*p+w*-h+l*-m-_*-c,r[1]=l*p+w*-c+_*-h-T*-m,r[2]=_*p+w*-m+T*-c-l*-h,r[3]=o[3],r}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,n,i,s,h,c,m,p){var T=o+s+p;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-m)/l,r[1]=.5*(c-n)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var _=Math.max(o,s,p),l=Math.sqrt(2*_-T+1);o>=_?(r[0]=.5*l,r[1]=.5*(i+a)/l,r[2]=.5*(c+n)/l,r[3]=.5*(h-m)/l):s>=_?(r[0]=.5*(a+i)/l,r[1]=.5*l,r[2]=.5*(m+h)/l,r[3]=.5*(c-n)/l):(r[0]=.5*(n+c)/l,r[1]=.5*(h+m)/l,r[2]=.5*l,r[3]=.5*(a-i)/l)}return r}},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),c=r(7169),m=r(351),p=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 f=null;try{f=u.getContext("webgl",y),f||(f=u.getContext("experimental-webgl",y))}catch{return null}return f}function M(u){var y=Math.round(Math.log(Math.abs(u))/Math.log(10));if(y<0){var f=Math.round(Math.pow(10,-y));return Math.ceil(u*f)/f}else if(y>0){var f=Math.round(Math.pow(10,y));return Math.ceil(u/f)*f}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 f=u.container;f.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),se=[],le=[],fe=[],V=[],Y=!0,ae=!0,ee=new Array(16),q=new Array(16),oe={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:se,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:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(st){this.aspect[0]=st.x,this.aspect[1]=st.y,this.aspect[2]=st.z,ae=!0},setBounds:function(st,Me){this.bounds[0][st]=Me.min,this.bounds[1][st]=Me.max},setClearColor:function(st){this.clearColor=st},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)}},ce=[R.drawingBufferWidth/re.pixelRatio|0,R.drawingBufferHeight/re.pixelRatio|0];function be(){if(!re._stopped&&re.autoResize){var st=y.parentNode,Me=1,ye=1;st&&st!==document.body?(Me=st.clientWidth,ye=st.clientHeight):(Me=window.innerWidth,ye=window.innerHeight);var he=Math.ceil(Me*re.pixelRatio)|0,Oe=Math.ceil(ye*re.pixelRatio)|0;if(he!==y.width||Oe!==y.height){y.width=he,y.height=Oe;var tt=y.style;tt.position=tt.position||"absolute",tt.left="0px",tt.top="0px",tt.width=Me+"px",tt.height=ye+"px",Y=!0}}}re.autoResize&&be(),window.addEventListener("resize",be);function Ae(){for(var st=se.length,Me=V.length,ye=0;ye<Me;++ye)fe[ye]=0;e:for(var ye=0;ye<st;++ye){var he=se[ye],Oe=he.pickSlots;if(!Oe){le[ye]=-1;continue}for(var tt=0;tt<Me;++tt)if(fe[tt]+Oe<255){le[ye]=tt,he.setPickBase(fe[tt]+1),fe[tt]+=Oe;continue e}var ot=s(R,j);le[ye]=Me,V.push(ot),fe.push(Oe),he.setPickBase(1),Me+=1}for(;Me>0&&fe[Me-1]===0;)fe.pop(),V.pop().dispose()}re.update=function(st){re._stopped||(st=st||{},Y=!0,ae=!0)},re.add=function(st){re._stopped||(st.axes=B,se.push(st),le.push(-1),Y=!0,ae=!0,Ae())},re.remove=function(st){if(!re._stopped){var Me=se.indexOf(st);Me<0||(se.splice(Me,1),le.pop(),Y=!0,ae=!0,Ae())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",be),y.removeEventListener("webglcontextlost",De),re.mouseListener.enabled=!1,!re.contextLost)){B.dispose(),$.dispose();for(var st=0;st<se.length;++st)se[st].dispose();F.dispose();for(var st=0;st<V.length;++st)V[st].dispose();N.dispose(),R=null,B=null,$=null,se=[]}},re._mouseRotating=!1,re._prevButtons=0,re.enableMouseListeners=function(){re.mouseListener=m(y,function(st,Me,ye){if(!re._stopped){var he=V.length,Oe=se.length,tt=z.object;z.distance=1/0,z.mouse[0]=Me,z.mouse[1]=ye,z.object=null,z.screen=null,z.dataCoordinate=z.dataPosition=null;var ot=!1;if(st&&re._prevButtons)re._mouseRotating=!0;else{re._mouseRotating&&(ae=!0),re._mouseRotating=!1;for(var Qe=0;Qe<he;++Qe){var Pt=V[Qe].query(Me,ce[1]-ye-1,re.pickRadius);if(Pt){if(Pt.distance>z.distance)continue;for(var It=0;It<Oe;++It){var qt=se[It];if(le[It]===Qe){var Wt=qt.pick(Pt);Wt&&(z.buttons=st,z.screen=Pt.coord,z.distance=Pt.distance,z.object=qt,z.index=Wt.distance,z.dataPosition=Wt.position,z.dataCoordinate=Wt.dataCoordinate,z.data=Wt,ot=!0)}}}}}tt&&tt!==z.object&&(tt.highlight&&tt.highlight(null),Y=!0),z.object&&(z.object.highlight&&z.object.highlight(z.data),Y=!0),ot=ot||z.object!==tt,ot&&re.onselect&&re.onselect(z),st&1&&!(re._prevButtons&1)&&re.onclick&&re.onclick(z),re._prevButtons=st}})};function De(){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",De);function ze(){if(!De()){R.colorMask(!0,!0,!0,!0),R.depthMask(!0),R.disable(R.BLEND),R.enable(R.DEPTH_TEST),R.depthFunc(R.LEQUAL);for(var st=se.length,Me=V.length,ye=0;ye<Me;++ye){var he=V[ye];he.shape=ce,he.begin();for(var Oe=0;Oe<st;++Oe)if(le[Oe]===ye){var tt=se[Oe];tt.drawPick&&(tt.pixelRatio=1,tt.drawPick(oe))}he.end()}}}var Ze=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],at=[Ze[0].slice(),Ze[1].slice()];function nt(){if(!De()){be();var st=re.camera.tick();oe.view=re.camera.matrix,Y=Y||st,ae=ae||st,B.pixelRatio=re.pixelRatio,$.pixelRatio=re.pixelRatio;var Me=se.length,ye=Ze[0],he=Ze[1];ye[0]=ye[1]=ye[2]=1/0,he[0]=he[1]=he[2]=-1/0;for(var Oe=0;Oe<Me;++Oe){var tt=se[Oe];tt.pixelRatio=re.pixelRatio,tt.axes=re.axes,Y=Y||!!tt.dirty,ae=ae||!!tt.dirty;var ot=tt.bounds;if(ot)for(var Qe=ot[0],Pt=ot[1],It=0;It<3;++It)ye[It]=Math.min(ye[It],Qe[It]),he[It]=Math.max(he[It],Pt[It])}var qt=re.bounds;if(re.autoBounds)for(var It=0;It<3;++It){if(he[It]<ye[It])ye[It]=-1,he[It]=1;else{ye[It]===he[It]&&(ye[It]-=1,he[It]+=1);var Wt=.05*(he[It]-ye[It]);ye[It]=ye[It]-Wt,he[It]=he[It]+Wt}qt[0][It]=ye[It],qt[1][It]=he[It]}for(var kr=!1,It=0;It<3;++It)kr=kr||at[0][It]!==qt[0][It]||at[1][It]!==qt[1][It],at[0][It]=qt[0][It],at[1][It]=qt[1][It];if(ae=ae||kr,Y=Y||kr,!!Y){if(kr){for(var mr=[0,0,0],Oe=0;Oe<3;++Oe)mr[Oe]=M((qt[1][Oe]-qt[0][Oe])/10);B.autoTicks?B.update({bounds:qt,tickSpacing:mr}):B.update({bounds:qt})}var qr=R.drawingBufferWidth,Sr=R.drawingBufferHeight;j[0]=qr,j[1]=Sr,ce[0]=Math.max(qr/re.pixelRatio,1)|0,ce[1]=Math.max(Sr/re.pixelRatio,1)|0,d(re,O);for(var Oe=0;Oe<Me;++Oe){var tt=se[Oe];tt.axesBounds=qt,re.clipToBounds&&(tt.clipBounds=qt)}z.object&&(re.snapToData?$.position=z.dataCoordinate:$.position=z.dataPosition,$.bounds=qt),ae&&(ae=!1,ze()),re.axesPixels=n(re.axes,oe,qr,Sr),re.onrender&&re.onrender(),R.bindFramebuffer(R.FRAMEBUFFER,null),R.viewport(0,0,qr,Sr),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 Rr=!1;B.enable&&(Rr=Rr||B.isTransparent(),B.draw(oe)),$.axes=B,z.object&&$.draw(oe),R.disable(R.CULL_FACE);for(var Oe=0;Oe<Me;++Oe){var tt=se[Oe];tt.axes=B,tt.pixelRatio=re.pixelRatio,tt.isOpaque&&tt.isOpaque()&&tt.draw(oe),tt.isTransparent&&tt.isTransparent()&&(Rr=!0)}if(Rr){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(oe);for(var Oe=0;Oe<Me;++Oe){var tt=se[Oe];tt.isOpaque&&tt.isOpaque()&&tt.draw(oe)}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(oe);for(var Oe=0;Oe<Me;++Oe){var tt=se[Oe];tt.isTransparent&&tt.isTransparent()&&tt.drawTransparent(oe)}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,c(R),R.disable(R.BLEND)}Y=!1;for(var Oe=0;Oe<Me;++Oe)se[Oe].dirty=!1}}}function rt(){re._stopped||re.contextLost||(nt(),requestAnimationFrame(rt))}return re.enableMouseListeners(),rt(),re.redraw=function(){re._stopped||(Y=!0,nt())},re}function d(u,y){var f=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):(p(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($,f[1][X]-f[0][X]);for(var X=0;X<3;++X)u.autoScale?z[5*X]=u.aspect[X]/(f[1][X]-f[0][X]):z[5*X]=1/$,u.autoCenter&&(z[12+X]=-z[5*X]*.5*(f[0][X]+f[1][X]))}},4192:function(e){"use strict";e.exports=r;var t=32;function r(p,T){T<=4*t?o(0,T-1,p):m(0,T-1,p)}function o(p,T,l){for(var _=2*(p+1),w=p+1;w<=T;++w){for(var A=l[_++],M=l[_++],g=w,b=_-2;g-- >p;){var d=l[b-2],u=l[b-1];if(d<A)break;if(d===A&&u<M)break;l[b]=d,l[b+1]=u,b-=2}l[b]=A,l[b+1]=M}}function a(p,T,l){p*=2,T*=2;var _=l[p],w=l[p+1];l[p]=l[T],l[p+1]=l[T+1],l[T]=_,l[T+1]=w}function n(p,T,l){p*=2,T*=2,l[p]=l[T],l[p+1]=l[T+1]}function i(p,T,l,_){p*=2,T*=2,l*=2;var w=_[p],A=_[p+1];_[p]=_[T],_[p+1]=_[T+1],_[T]=_[l],_[T+1]=_[l+1],_[l]=w,_[l+1]=A}function s(p,T,l,_,w){p*=2,T*=2,w[p]=w[T],w[T]=l,w[p+1]=w[T+1],w[T+1]=_}function h(p,T,l){p*=2,T*=2;var _=l[p],w=l[T];return _<w?!1:_===w?l[p+1]>l[T+1]:!0}function c(p,T,l,_){p*=2;var w=_[p];return w<T?!0:w===T?_[p+1]<l:!1}function m(p,T,l){var _=(T-p+1)/6|0,w=p+_,A=T-_,M=p+T>>1,g=M-_,b=M+_,d=w,u=g,y=M,f=b,R=A,L=p+1,z=T-1,F=0;h(d,u,l)&&(F=d,d=u,u=F),h(f,R,l)&&(F=f,f=R,R=F),h(d,y,l)&&(F=d,d=y,y=F),h(u,y,l)&&(F=u,u=y,y=F),h(d,f,l)&&(F=d,d=f,f=F),h(y,f,l)&&(F=y,y=f,f=F),h(u,R,l)&&(F=u,u=R,R=F),h(u,y,l)&&(F=u,u=y,y=F),h(f,R,l)&&(F=f,f=R,R=F);for(var N=l[2*u],O=l[2*u+1],P=l[2*f],U=l[2*f+1],B=2*d,X=2*y,$=2*R,se=2*w,le=2*M,fe=2*A,V=0;V<2;++V){var Y=l[B+V],ee=l[X+V],q=l[$+V];l[se+V]=Y,l[le+V]=ee,l[fe+V]=q}n(g,p,l),n(b,T,l);for(var oe=L;oe<=z;++oe)if(c(oe,N,O,l))oe!==L&&a(oe,L,l),++L;else if(!c(oe,P,U,l))for(;;)if(c(z,P,U,l)){c(z,N,O,l)?(i(oe,L,z,l),++L,--z):(a(oe,z,l),--z);break}else{if(--z<oe)break;continue}s(p,L-1,N,O,l),s(T,z+1,P,U,l),L-2-p<=t?o(p,L-2,l):m(p,L-2,l),T-(z+2)<=t?o(z+2,T,l):m(z+2,T,l),z-L<=t?o(L,z,l):m(L,z,l)}},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 c(_,w){return _.y-w}function m(_,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 d=n(g,b,w);if(d<0)_=_.left;else if(d>0)if(w[0]!==M[1][0])A=_,_=_.right;else{var u=m(_.right,w);if(u)return u;_=_.left}else{if(w[0]!==M[1][0])return _;var u=m(_.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=m(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 d=m(this.slabs[w-1],_);d&&(b?i(d.key,b)>0&&(b=d.key,g=d.value):(g=d.value,b=d.key))}var u=this.horizontal[w];if(u.length>0){var y=o.ge(u,_[1],c);if(y<u.length){var f=u[y];if(_[1]===f.y){if(f.closed)return f.index;for(;y<u.length-1&&u[y+1].y===_[1];)if(y=y+1,f=u[y],f.closed)return f.index;if(f.y===_[1]&&!f.start){if(y=y+1,y>=u.length)return g;f=u[y]}}if(f.start)if(b){var R=n(b[0],b[1],[_[0],f.y]);b[0][0]>b[1][0]&&(R=-R),R>0&&(g=f.index)}else g=f.index;else f.y!==_[1]&&(g=f.index)}}}return g};function p(_,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],d=b[0][0]<b[1][0];M[2*g]=new T(b[0][0],b,d,g),M[2*g+1]=new T(b[1][0],b,!d,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=[],f=[],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 p(N.segment[0][1],N.index,!0,!0)),F.push(new p(N.segment[1][1],N.index,!1,!1))):(F.push(new p(N.segment[1][1],N.index,!0,!1)),F.push(new p(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),f.push(z),R.push(F)}return new s(y,f,R)}},4317:function(e){"use strict";function t(i,s){var h=Math.floor(s),c=s-h,m=0<=h&&h<i.shape[0],p=0<=h+1&&h+1<i.shape[0],T=m?+i.get(h):0,l=p?+i.get(h+1):0;return(1-c)*T+c*l}function r(i,s,h){var c=Math.floor(s),m=s-c,p=0<=c&&c<i.shape[0],T=0<=c+1&&c+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=p&&w?i.get(c,l):0,g=p&&A?i.get(c,l+1):0,b=T&&w?i.get(c+1,l):0,d=T&&A?i.get(c+1,l+1):0;return(1-_)*((1-m)*M+m*b)+_*((1-m)*g+m*d)}function o(i,s,h,c){var m=Math.floor(s),p=s-m,T=0<=m&&m<i.shape[0],l=0<=m+1&&m+1<i.shape[0],_=Math.floor(h),w=h-_,A=0<=_&&_<i.shape[1],M=0<=_+1&&_+1<i.shape[1],g=Math.floor(c),b=c-g,d=0<=g&&g<i.shape[2],u=0<=g+1&&g+1<i.shape[2],y=T&&A&&d?i.get(m,_,g):0,f=T&&M&&d?i.get(m,_+1,g):0,R=l&&A&&d?i.get(m+1,_,g):0,L=l&&M&&d?i.get(m+1,_+1,g):0,z=T&&A&&u?i.get(m,_,g+1):0,F=T&&M&&u?i.get(m,_+1,g+1):0,N=l&&A&&u?i.get(m+1,_,g+1):0,O=l&&M&&u?i.get(m+1,_+1,g+1):0;return(1-b)*((1-w)*((1-p)*y+p*R)+w*((1-p)*f+p*L))+b*((1-w)*((1-p)*z+p*N)+w*((1-p)*F+p*O))}function a(i){var s=i.shape.length|0,h=new Array(s),c=new Array(s),m=new Array(s),p=new Array(s),T,l;for(T=0;T<s;++T)l=+arguments[T+1],h[T]=Math.floor(l),c[T]=l-h[T],m[T]=0<=h[T]&&h[T]<i.shape[T],p[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(!p[w])continue e;A*=c[w],M+=i.stride[w]*(h[w]+1)}else{if(!m[w])continue e;A*=1-c[w],M+=i.stride[w]*h[w]}_+=A*i.data[M]}return _}function n(i,s,h,c){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,c);default:return a.apply(void 0,arguments)}}e.exports=n,e.exports.d1=t,e.exports.d2=r,e.exports.d3=o},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}},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)}},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}},4437:function(e,t,r){"use strict";e.exports=c;var o=r(3025),a=r(6296),n=r(351),i=r(8512),s=r(24),h=r(7520);function c(m,p){m=m||document.body,p=p||{};var T=[.01,1/0];"distanceLimits"in p&&(T[0]=p.distanceLimits[0],T[1]=p.distanceLimits[1]),"zoomMin"in p&&(T[0]=p.zoomMin),"zoomMax"in p&&(T[1]=p.zoomMax);var l=a({center:p.center||[0,0,0],up:p.up||[0,1,0],eye:p.eye||[0,0,10],mode:p.mode||"orbit",distanceLimits:T}),_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0,A=m.clientWidth,M=m.clientHeight,g={keyBindingMode:"rotate",enableWheel:!0,view:l,element:m,delay:p.delay||16,rotateSpeed:p.rotateSpeed||1,zoomSpeed:p.zoomSpeed||1,translateSpeed:p.translateSpeed||1,flipX:!!p.flipX,flipY:!!p.flipY,modes:l.modes,_ortho:p._ortho||p.projection&&p.projection.type==="orthographic"||!1,tick:function(){var b=o(),d=this.delay,u=b-2*d;l.idle(b-d),l.recalcMatrix(u),l.flush(b-(100+d*2));for(var y=!0,f=l.computedMatrix,R=0;R<16;++R)y=y&&_[R]===f[R],_[R]=f[R];var L=m.clientWidth===A&&m.clientHeight===M;return A=m.clientWidth,M=m.clientHeight,y?!L:(w=Math.exp(l.computedRadius[0]),!0)},lookAt:function(b,d,u){l.lookAt(l.lastT(),b,d,u)},rotate:function(b,d,u){l.rotate(l.lastT(),b,d,u)},pan:function(b,d,u){l.pan(l.lastT(),b,d,u)},translate:function(b,d,u){l.translate(l.lastT(),b,d,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 d=l.computedUp.slice(),u=l.computedEye.slice(),y=l.computedCenter.slice();if(l.setMode(b),b==="turntable"){var f=o();l._active.lookAt(f,u,y,d),l._active.lookAt(f+500,u,y,[0,0,1]),l._active.flush(f)}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}}),m.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(m,b),m.addEventListener("touchstart",function(d){var u=s(d.changedTouches[0],m);b(0,u[0],u[1],g._lastMods),b(1,u[0],u[1],g._lastMods)},h?{passive:!0}:!1),m.addEventListener("touchmove",function(d){var u=s(d.changedTouches[0],m);b(1,u[0],u[1],g._lastMods),d.preventDefault()},h?{passive:!1}:!1),m.addEventListener("touchend",function(d){b(0,g._lastX,g._lastY,g._lastMods)},h?{passive:!0}:!1);function b(d,u,y,f){var R=g.keyBindingMode;if(R!==!1){var L=R==="rotate",z=R==="pan",F=R==="zoom",N=!!f.control,O=!!f.alt,P=!!f.shift,U=!!(d&1),B=!!(d&2),X=!!(d&4),$=1/m.clientHeight,se=$*(u-g._lastX),le=$*(y-g._lastY),fe=g.flipX?1:-1,V=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,fe*Y*se,-V*Y*le,0),(z&&U&&!N&&!O&&!P||B||U&&N&&!O&&!P)&&l.pan(ee,-g.translateSpeed*se*w,g.translateSpeed*le*w,0),F&&U&&!N&&!O&&!P||X||U&&!N&&O&&!P)){var q=-g.zoomSpeed*le/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=f,!0}}g.wheelListener=i(m,function(d,u){if(g.keyBindingMode!==!1&&g.enableWheel){var y=g.flipX?1:-1,f=g.flipY?1:-1,R=o();if(Math.abs(d)>Math.abs(u))l.rotate(R,0,0,-d*y*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var L=-g.zoomSpeed*f*u/window.innerHeight*(R-l.lastT())/20;l.pan(R,0,0,w*(Math.exp(L)-1))}}},!0)},g.enableMouseListeners(),g}},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,c=[0,0,0],m=[0,0,0],p=[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,d;this.axes&&(d=this.axes.lastCubeProps.axis);for(var u=c,y=m,f=0;f<3;++f)d&&d[f]<0?(u[f]=this.bounds[0][f],y[f]=this.bounds[1][f]):(u[f]=this.bounds[1][f],y[f]=this.bounds[0][f]);p[0]=_.drawingBufferWidth,p[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=p;for(var f=0;f<3;++f)A.uniforms.lineWidth=this.lineWidth[f]*this.pixelRatio,this.enabled[f]&&(w.draw(_.TRIANGLES,6,6*f),this.drawSides[f]&&w.draw(_.TRIANGLES,12,18+12*f));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,f,R,L,z){var F=[u,y,f,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 d=new s(l,M,g,b);return d.update(_),d}},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}},4505:function(e,t,r){e.exports=r(5847)},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}},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],c=i[n];h<c?s[a]=n:c<h?s[n]=a:(s[n]=a,++i[a])}}},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},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)}},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),c=i[s-1],m=0;m<s;++m){var p=i[m];h[m]=[c,p],c=p}return h}},4769:function(e){"use strict";function t(o,a,n,i,s,h){var c=6*s*s-6*s,m=3*s*s-4*s+1,p=-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]=c*o[l]+m*a[l]+p*n[l]+T*i[l];return h}return c*o+m*a+p*n[l]+T*i}function r(o,a,n,i,s,h){var c=s-1,m=s*s,p=c*c,T=(1+2*s)*p,l=s*p,_=m*(3-2*s),w=m*c;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},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}},4793:function(e,t,r){"use strict";var o;function a(Ce,Ee){if(!(Ce instanceof Ee))throw new TypeError("Cannot call a class as a function")}function n(Ce,Ee){for(var Pe=0;Pe<Ee.length;Pe++){var ft=Ee[Pe];ft.enumerable=ft.enumerable||!1,ft.configurable=!0,"value"in ft&&(ft.writable=!0),Object.defineProperty(Ce,s(ft.key),ft)}}function i(Ce,Ee,Pe){return Ee&&n(Ce.prototype,Ee),Pe&&n(Ce,Pe),Object.defineProperty(Ce,"prototype",{writable:!1}),Ce}function s(Ce){var Ee=h(Ce,"string");return A(Ee)=="symbol"?Ee:Ee+""}function h(Ce,Ee){if(A(Ce)!="object"||!Ce)return Ce;var Pe=Ce[Symbol.toPrimitive];if(Pe!==void 0){var ft=Pe.call(Ce,Ee||"default");if(A(ft)!="object")return ft;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ee==="string"?String:Number)(Ce)}function c(Ce,Ee,Pe){return Ee=l(Ee),m(Ce,T()?Reflect.construct(Ee,Pe||[],l(Ce).constructor):Ee.apply(Ce,Pe))}function m(Ce,Ee){if(Ee&&(A(Ee)=="object"||typeof Ee=="function"))return Ee;if(Ee!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(Ce)}function p(Ce){if(Ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ce}function T(){try{var Ce=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T=function(){return!!Ce})()}function l(Ce){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ee){return Ee.__proto__||Object.getPrototypeOf(Ee)},l(Ce)}function _(Ce,Ee){if(typeof Ee!="function"&&Ee!==null)throw new TypeError("Super expression must either be null or a function");Ce.prototype=Object.create(Ee&&Ee.prototype,{constructor:{value:Ce,writable:!0,configurable:!0}}),Object.defineProperty(Ce,"prototype",{writable:!1}),Ee&&w(Ce,Ee)}function w(Ce,Ee){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Pe,ft){return Pe.__proto__=ft,Pe},w(Ce,Ee)}function A(Ce){"@babel/helpers - typeof";return A=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},A(Ce)}var M=r(7507),g=r(3778),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=f,o=$,t.IS=50;var d=2147483647;o=d,f.TYPED_ARRAY_SUPPORT=u(),!f.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 u(){try{var Ce=new Uint8Array(1),Ee={foo:function(){return 42}};return Object.setPrototypeOf(Ee,Uint8Array.prototype),Object.setPrototypeOf(Ce,Ee),Ce.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function y(Ce){if(Ce>d)throw new RangeError('The value "'+Ce+'" is invalid for option "size"');var Ee=new Uint8Array(Ce);return Object.setPrototypeOf(Ee,f.prototype),Ee}function f(Ce,Ee,Pe){if(typeof Ce=="number"){if(typeof Ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Ce)}return R(Ce,Ee,Pe)}f.poolSize=8192;function R(Ce,Ee,Pe){if(typeof Ce=="string")return N(Ce,Ee);if(ArrayBuffer.isView(Ce))return P(Ce);if(Ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Ce));if(Ne(Ce,ArrayBuffer)||Ce&&Ne(Ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ne(Ce,SharedArrayBuffer)||Ce&&Ne(Ce.buffer,SharedArrayBuffer)))return U(Ce,Ee,Pe);if(typeof Ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ft=Ce.valueOf&&Ce.valueOf();if(ft!=null&&ft!==Ce)return f.from(ft,Ee,Pe);var ct=B(Ce);if(ct)return ct;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ce[Symbol.toPrimitive]=="function")return f.from(Ce[Symbol.toPrimitive]("string"),Ee,Pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Ce))}f.from=function(Ce,Ee,Pe){return R(Ce,Ee,Pe)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function L(Ce){if(typeof Ce!="number")throw new TypeError('"size" argument must be of type number');if(Ce<0)throw new RangeError('The value "'+Ce+'" is invalid for option "size"')}function z(Ce,Ee,Pe){return L(Ce),Ce<=0?y(Ce):Ee!==void 0?typeof Pe=="string"?y(Ce).fill(Ee,Pe):y(Ce).fill(Ee):y(Ce)}f.alloc=function(Ce,Ee,Pe){return z(Ce,Ee,Pe)};function F(Ce){return L(Ce),y(Ce<0?0:X(Ce)|0)}f.allocUnsafe=function(Ce){return F(Ce)},f.allocUnsafeSlow=function(Ce){return F(Ce)};function N(Ce,Ee){if((typeof Ee!="string"||Ee==="")&&(Ee="utf8"),!f.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee);var Pe=se(Ce,Ee)|0,ft=y(Pe),ct=ft.write(Ce,Ee);return ct!==Pe&&(ft=ft.slice(0,ct)),ft}function O(Ce){for(var Ee=Ce.length<0?0:X(Ce.length)|0,Pe=y(Ee),ft=0;ft<Ee;ft+=1)Pe[ft]=Ce[ft]&255;return Pe}function P(Ce){if(Ne(Ce,Uint8Array)){var Ee=new Uint8Array(Ce);return U(Ee.buffer,Ee.byteOffset,Ee.byteLength)}return O(Ce)}function U(Ce,Ee,Pe){if(Ee<0||Ce.byteLength<Ee)throw new RangeError('"offset" is outside of buffer bounds');if(Ce.byteLength<Ee+(Pe||0))throw new RangeError('"length" is outside of buffer bounds');var ft;return Ee===void 0&&Pe===void 0?ft=new Uint8Array(Ce):Pe===void 0?ft=new Uint8Array(Ce,Ee):ft=new Uint8Array(Ce,Ee,Pe),Object.setPrototypeOf(ft,f.prototype),ft}function B(Ce){if(f.isBuffer(Ce)){var Ee=X(Ce.length)|0,Pe=y(Ee);return Pe.length===0||Ce.copy(Pe,0,0,Ee),Pe}if(Ce.length!==void 0)return typeof Ce.length!="number"||Ke(Ce.length)?y(0):O(Ce);if(Ce.type==="Buffer"&&Array.isArray(Ce.data))return O(Ce.data)}function X(Ce){if(Ce>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return Ce|0}function $(Ce){return+Ce!=Ce&&(Ce=0),f.alloc(+Ce)}f.isBuffer=function(Ee){return Ee!=null&&Ee._isBuffer===!0&&Ee!==f.prototype},f.compare=function(Ee,Pe){if(Ne(Ee,Uint8Array)&&(Ee=f.from(Ee,Ee.offset,Ee.byteLength)),Ne(Pe,Uint8Array)&&(Pe=f.from(Pe,Pe.offset,Pe.byteLength)),!f.isBuffer(Ee)||!f.isBuffer(Pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ee===Pe)return 0;for(var ft=Ee.length,ct=Pe.length,_t=0,Ct=Math.min(ft,ct);_t<Ct;++_t)if(Ee[_t]!==Pe[_t]){ft=Ee[_t],ct=Pe[_t];break}return ft<ct?-1:ct<ft?1:0},f.isEncoding=function(Ee){switch(String(Ee).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}},f.concat=function(Ee,Pe){if(!Array.isArray(Ee))throw new TypeError('"list" argument must be an Array of Buffers');if(Ee.length===0)return f.alloc(0);var ft;if(Pe===void 0)for(Pe=0,ft=0;ft<Ee.length;++ft)Pe+=Ee[ft].length;var ct=f.allocUnsafe(Pe),_t=0;for(ft=0;ft<Ee.length;++ft){var Ct=Ee[ft];if(Ne(Ct,Uint8Array))_t+Ct.length>ct.length?(f.isBuffer(Ct)||(Ct=f.from(Ct)),Ct.copy(ct,_t)):Uint8Array.prototype.set.call(ct,Ct,_t);else if(f.isBuffer(Ct))Ct.copy(ct,_t);else throw new TypeError('"list" argument must be an Array of Buffers');_t+=Ct.length}return ct};function se(Ce,Ee){if(f.isBuffer(Ce))return Ce.length;if(ArrayBuffer.isView(Ce)||Ne(Ce,ArrayBuffer))return Ce.byteLength;if(typeof Ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(Ce));var Pe=Ce.length,ft=arguments.length>2&&arguments[2]===!0;if(!ft&&Pe===0)return 0;for(var ct=!1;;)switch(Ee){case"ascii":case"latin1":case"binary":return Pe;case"utf8":case"utf-8":return mr(Ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe*2;case"hex":return Pe>>>1;case"base64":return Rr(Ce).length;default:if(ct)return ft?-1:mr(Ce).length;Ee=(""+Ee).toLowerCase(),ct=!0}}f.byteLength=se;function le(Ce,Ee,Pe){var ft=!1;if((Ee===void 0||Ee<0)&&(Ee=0),Ee>this.length||((Pe===void 0||Pe>this.length)&&(Pe=this.length),Pe<=0)||(Pe>>>=0,Ee>>>=0,Pe<=Ee))return"";for(Ce||(Ce="utf8");;)switch(Ce){case"hex":return ze(this,Ee,Pe);case"utf8":case"utf-8":return re(this,Ee,Pe);case"ascii":return Ae(this,Ee,Pe);case"latin1":case"binary":return De(this,Ee,Pe);case"base64":return Q(this,Ee,Pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ze(this,Ee,Pe);default:if(ft)throw new TypeError("Unknown encoding: "+Ce);Ce=(Ce+"").toLowerCase(),ft=!0}}f.prototype._isBuffer=!0;function fe(Ce,Ee,Pe){var ft=Ce[Ee];Ce[Ee]=Ce[Pe],Ce[Pe]=ft}f.prototype.swap16=function(){var Ee=this.length;if(Ee%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Pe=0;Pe<Ee;Pe+=2)fe(this,Pe,Pe+1);return this},f.prototype.swap32=function(){var Ee=this.length;if(Ee%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Pe=0;Pe<Ee;Pe+=4)fe(this,Pe,Pe+3),fe(this,Pe+1,Pe+2);return this},f.prototype.swap64=function(){var Ee=this.length;if(Ee%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Pe=0;Pe<Ee;Pe+=8)fe(this,Pe,Pe+7),fe(this,Pe+1,Pe+6),fe(this,Pe+2,Pe+5),fe(this,Pe+3,Pe+4);return this},f.prototype.toString=function(){var Ee=this.length;return Ee===0?"":arguments.length===0?re(this,0,Ee):le.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(Ee){if(!f.isBuffer(Ee))throw new TypeError("Argument must be a Buffer");return this===Ee?!0:f.compare(this,Ee)===0},f.prototype.inspect=function(){var Ee="",Pe=t.IS;return Ee=this.toString("hex",0,Pe).replace(/(.{2})/g,"$1 ").trim(),this.length>Pe&&(Ee+=" ... "),"<Buffer "+Ee+">"},b&&(f.prototype[b]=f.prototype.inspect),f.prototype.compare=function(Ee,Pe,ft,ct,_t){if(Ne(Ee,Uint8Array)&&(Ee=f.from(Ee,Ee.offset,Ee.byteLength)),!f.isBuffer(Ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+A(Ee));if(Pe===void 0&&(Pe=0),ft===void 0&&(ft=Ee?Ee.length:0),ct===void 0&&(ct=0),_t===void 0&&(_t=this.length),Pe<0||ft>Ee.length||ct<0||_t>this.length)throw new RangeError("out of range index");if(ct>=_t&&Pe>=ft)return 0;if(ct>=_t)return-1;if(Pe>=ft)return 1;if(Pe>>>=0,ft>>>=0,ct>>>=0,_t>>>=0,this===Ee)return 0;for(var Ct=_t-ct,ir=ft-Pe,rr=Math.min(Ct,ir),er=this.slice(ct,_t),Lr=Ee.slice(Pe,ft),fa=0;fa<rr;++fa)if(er[fa]!==Lr[fa]){Ct=er[fa],ir=Lr[fa];break}return Ct<ir?-1:ir<Ct?1:0};function V(Ce,Ee,Pe,ft,ct){if(Ce.length===0)return-1;if(typeof Pe=="string"?(ft=Pe,Pe=0):Pe>2147483647?Pe=2147483647:Pe<-2147483648&&(Pe=-2147483648),Pe=+Pe,Ke(Pe)&&(Pe=ct?0:Ce.length-1),Pe<0&&(Pe=Ce.length+Pe),Pe>=Ce.length){if(ct)return-1;Pe=Ce.length-1}else if(Pe<0)if(ct)Pe=0;else return-1;if(typeof Ee=="string"&&(Ee=f.from(Ee,ft)),f.isBuffer(Ee))return Ee.length===0?-1:Y(Ce,Ee,Pe,ft,ct);if(typeof Ee=="number")return Ee=Ee&255,typeof Uint8Array.prototype.indexOf=="function"?ct?Uint8Array.prototype.indexOf.call(Ce,Ee,Pe):Uint8Array.prototype.lastIndexOf.call(Ce,Ee,Pe):Y(Ce,[Ee],Pe,ft,ct);throw new TypeError("val must be string, number or Buffer")}function Y(Ce,Ee,Pe,ft,ct){var _t=1,Ct=Ce.length,ir=Ee.length;if(ft!==void 0&&(ft=String(ft).toLowerCase(),ft==="ucs2"||ft==="ucs-2"||ft==="utf16le"||ft==="utf-16le")){if(Ce.length<2||Ee.length<2)return-1;_t=2,Ct/=2,ir/=2,Pe/=2}function rr(Ia,qa){return _t===1?Ia[qa]:Ia.readUInt16BE(qa*_t)}var er;if(ct){var Lr=-1;for(er=Pe;er<Ct;er++)if(rr(Ce,er)===rr(Ee,Lr===-1?0:er-Lr)){if(Lr===-1&&(Lr=er),er-Lr+1===ir)return Lr*_t}else Lr!==-1&&(er-=er-Lr),Lr=-1}else for(Pe+ir>Ct&&(Pe=Ct-ir),er=Pe;er>=0;er--){for(var fa=!0,Da=0;Da<ir;Da++)if(rr(Ce,er+Da)!==rr(Ee,Da)){fa=!1;break}if(fa)return er}return-1}f.prototype.includes=function(Ee,Pe,ft){return this.indexOf(Ee,Pe,ft)!==-1},f.prototype.indexOf=function(Ee,Pe,ft){return V(this,Ee,Pe,ft,!0)},f.prototype.lastIndexOf=function(Ee,Pe,ft){return V(this,Ee,Pe,ft,!1)};function ee(Ce,Ee,Pe,ft){Pe=Number(Pe)||0;var ct=Ce.length-Pe;ft?(ft=Number(ft),ft>ct&&(ft=ct)):ft=ct;var _t=Ee.length;ft>_t/2&&(ft=_t/2);var Ct;for(Ct=0;Ct<ft;++Ct){var ir=parseInt(Ee.substr(Ct*2,2),16);if(Ke(ir))return Ct;Ce[Pe+Ct]=ir}return Ct}function q(Ce,Ee,Pe,ft){return wt(mr(Ee,Ce.length-Pe),Ce,Pe,ft)}function oe(Ce,Ee,Pe,ft){return wt(qr(Ee),Ce,Pe,ft)}function ae(Ce,Ee,Pe,ft){return wt(Rr(Ee),Ce,Pe,ft)}function j(Ce,Ee,Pe,ft){return wt(Sr(Ee,Ce.length-Pe),Ce,Pe,ft)}f.prototype.write=function(Ee,Pe,ft,ct){if(Pe===void 0)ct="utf8",ft=this.length,Pe=0;else if(ft===void 0&&typeof Pe=="string")ct=Pe,ft=this.length,Pe=0;else if(isFinite(Pe))Pe=Pe>>>0,isFinite(ft)?(ft=ft>>>0,ct===void 0&&(ct="utf8")):(ct=ft,ft=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var _t=this.length-Pe;if((ft===void 0||ft>_t)&&(ft=_t),Ee.length>0&&(ft<0||Pe<0)||Pe>this.length)throw new RangeError("Attempt to write outside buffer bounds");ct||(ct="utf8");for(var Ct=!1;;)switch(ct){case"hex":return ee(this,Ee,Pe,ft);case"utf8":case"utf-8":return q(this,Ee,Pe,ft);case"ascii":case"latin1":case"binary":return oe(this,Ee,Pe,ft);case"base64":return ae(this,Ee,Pe,ft);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,Ee,Pe,ft);default:if(Ct)throw new TypeError("Unknown encoding: "+ct);ct=(""+ct).toLowerCase(),Ct=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(Ce,Ee,Pe){return Ee===0&&Pe===Ce.length?M.fromByteArray(Ce):M.fromByteArray(Ce.slice(Ee,Pe))}function re(Ce,Ee,Pe){Pe=Math.min(Ce.length,Pe);for(var ft=[],ct=Ee;ct<Pe;){var _t=Ce[ct],Ct=null,ir=_t>239?4:_t>223?3:_t>191?2:1;if(ct+ir<=Pe){var rr=void 0,er=void 0,Lr=void 0,fa=void 0;switch(ir){case 1:_t<128&&(Ct=_t);break;case 2:rr=Ce[ct+1],(rr&192)===128&&(fa=(_t&31)<<6|rr&63,fa>127&&(Ct=fa));break;case 3:rr=Ce[ct+1],er=Ce[ct+2],(rr&192)===128&&(er&192)===128&&(fa=(_t&15)<<12|(rr&63)<<6|er&63,fa>2047&&(fa<55296||fa>57343)&&(Ct=fa));break;case 4:rr=Ce[ct+1],er=Ce[ct+2],Lr=Ce[ct+3],(rr&192)===128&&(er&192)===128&&(Lr&192)===128&&(fa=(_t&15)<<18|(rr&63)<<12|(er&63)<<6|Lr&63,fa>65535&&fa<1114112&&(Ct=fa))}}Ct===null?(Ct=65533,ir=1):Ct>65535&&(Ct-=65536,ft.push(Ct>>>10&1023|55296),Ct=56320|Ct&1023),ft.push(Ct),ct+=ir}return be(ft)}var ce=4096;function be(Ce){var Ee=Ce.length;if(Ee<=ce)return String.fromCharCode.apply(String,Ce);for(var Pe="",ft=0;ft<Ee;)Pe+=String.fromCharCode.apply(String,Ce.slice(ft,ft+=ce));return Pe}function Ae(Ce,Ee,Pe){var ft="";Pe=Math.min(Ce.length,Pe);for(var ct=Ee;ct<Pe;++ct)ft+=String.fromCharCode(Ce[ct]&127);return ft}function De(Ce,Ee,Pe){var ft="";Pe=Math.min(Ce.length,Pe);for(var ct=Ee;ct<Pe;++ct)ft+=String.fromCharCode(Ce[ct]);return ft}function ze(Ce,Ee,Pe){var ft=Ce.length;(!Ee||Ee<0)&&(Ee=0),(!Pe||Pe<0||Pe>ft)&&(Pe=ft);for(var ct="",_t=Ee;_t<Pe;++_t)ct+=Te[Ce[_t]];return ct}function Ze(Ce,Ee,Pe){for(var ft=Ce.slice(Ee,Pe),ct="",_t=0;_t<ft.length-1;_t+=2)ct+=String.fromCharCode(ft[_t]+ft[_t+1]*256);return ct}f.prototype.slice=function(Ee,Pe){var ft=this.length;Ee=~~Ee,Pe=Pe===void 0?ft:~~Pe,Ee<0?(Ee+=ft,Ee<0&&(Ee=0)):Ee>ft&&(Ee=ft),Pe<0?(Pe+=ft,Pe<0&&(Pe=0)):Pe>ft&&(Pe=ft),Pe<Ee&&(Pe=Ee);var ct=this.subarray(Ee,Pe);return Object.setPrototypeOf(ct,f.prototype),ct};function at(Ce,Ee,Pe){if(Ce%1!==0||Ce<0)throw new RangeError("offset is not uint");if(Ce+Ee>Pe)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee],_t=1,Ct=0;++Ct<Pe&&(_t*=256);)ct+=this[Ee+Ct]*_t;return ct},f.prototype.readUintBE=f.prototype.readUIntBE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee+--Pe],_t=1;Pe>0&&(_t*=256);)ct+=this[Ee+--Pe]*_t;return ct},f.prototype.readUint8=f.prototype.readUInt8=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,1,this.length),this[Ee]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,2,this.length),this[Ee]|this[Ee+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,2,this.length),this[Ee]<<8|this[Ee+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),(this[Ee]|this[Ee+1]<<8|this[Ee+2]<<16)+this[Ee+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]*16777216+(this[Ee+1]<<16|this[Ee+2]<<8|this[Ee+3])},f.prototype.readBigUInt64LE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=Pe+this[++Ee]*Math.pow(2,8)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,24),_t=this[++Ee]+this[++Ee]*Math.pow(2,8)+this[++Ee]*Math.pow(2,16)+ft*Math.pow(2,24);return BigInt(ct)+(BigInt(_t)<<BigInt(32))}),f.prototype.readBigUInt64BE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=Pe*Math.pow(2,24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+this[++Ee],_t=this[++Ee]*Math.pow(2,24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+ft;return(BigInt(ct)<<BigInt(32))+BigInt(_t)}),f.prototype.readIntLE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee],_t=1,Ct=0;++Ct<Pe&&(_t*=256);)ct+=this[Ee+Ct]*_t;return _t*=128,ct>=_t&&(ct-=Math.pow(2,8*Pe)),ct},f.prototype.readIntBE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=Pe,_t=1,Ct=this[Ee+--ct];ct>0&&(_t*=256);)Ct+=this[Ee+--ct]*_t;return _t*=128,Ct>=_t&&(Ct-=Math.pow(2,8*Pe)),Ct},f.prototype.readInt8=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,1,this.length),this[Ee]&128?(255-this[Ee]+1)*-1:this[Ee]},f.prototype.readInt16LE=function(Ee,Pe){Ee=Ee>>>0,Pe||at(Ee,2,this.length);var ft=this[Ee]|this[Ee+1]<<8;return ft&32768?ft|4294901760:ft},f.prototype.readInt16BE=function(Ee,Pe){Ee=Ee>>>0,Pe||at(Ee,2,this.length);var ft=this[Ee+1]|this[Ee]<<8;return ft&32768?ft|4294901760:ft},f.prototype.readInt32LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]|this[Ee+1]<<8|this[Ee+2]<<16|this[Ee+3]<<24},f.prototype.readInt32BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]<<24|this[Ee+1]<<16|this[Ee+2]<<8|this[Ee+3]},f.prototype.readBigInt64LE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=this[Ee+4]+this[Ee+5]*Math.pow(2,8)+this[Ee+6]*Math.pow(2,16)+(ft<<24);return(BigInt(ct)<<BigInt(32))+BigInt(Pe+this[++Ee]*Math.pow(2,8)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,24))}),f.prototype.readBigInt64BE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=(Pe<<24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+this[++Ee];return(BigInt(ct)<<BigInt(32))+BigInt(this[++Ee]*Math.pow(2,24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+ft)}),f.prototype.readFloatLE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),g.read(this,Ee,!0,23,4)},f.prototype.readFloatBE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),g.read(this,Ee,!1,23,4)},f.prototype.readDoubleLE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,8,this.length),g.read(this,Ee,!0,52,8)},f.prototype.readDoubleBE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,8,this.length),g.read(this,Ee,!1,52,8)};function nt(Ce,Ee,Pe,ft,ct,_t){if(!f.isBuffer(Ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ee>ct||Ee<_t)throw new RangeError('"value" argument is out of bounds');if(Pe+ft>Ce.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,ft=ft>>>0,!ct){var _t=Math.pow(2,8*ft)-1;nt(this,Ee,Pe,ft,_t,0)}var Ct=1,ir=0;for(this[Pe]=Ee&255;++ir<ft&&(Ct*=256);)this[Pe+ir]=Ee/Ct&255;return Pe+ft},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,ft=ft>>>0,!ct){var _t=Math.pow(2,8*ft)-1;nt(this,Ee,Pe,ft,_t,0)}var Ct=ft-1,ir=1;for(this[Pe+Ct]=Ee&255;--Ct>=0&&(ir*=256);)this[Pe+Ct]=Ee/ir&255;return Pe+ft},f.prototype.writeUint8=f.prototype.writeUInt8=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,1,255,0),this[Pe]=Ee&255,Pe+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,65535,0),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,Pe+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,65535,0),this[Pe]=Ee>>>8,this[Pe+1]=Ee&255,Pe+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,4294967295,0),this[Pe+3]=Ee>>>24,this[Pe+2]=Ee>>>16,this[Pe+1]=Ee>>>8,this[Pe]=Ee&255,Pe+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,4294967295,0),this[Pe]=Ee>>>24,this[Pe+1]=Ee>>>16,this[Pe+2]=Ee>>>8,this[Pe+3]=Ee&255,Pe+4};function rt(Ce,Ee,Pe,ft,ct){Pt(Ee,ft,ct,Ce,Pe,7);var _t=Number(Ee&BigInt(4294967295));Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t;var Ct=Number(Ee>>BigInt(32)&BigInt(4294967295));return Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Pe}function st(Ce,Ee,Pe,ft,ct){Pt(Ee,ft,ct,Ce,Pe,7);var _t=Number(Ee&BigInt(4294967295));Ce[Pe+7]=_t,_t=_t>>8,Ce[Pe+6]=_t,_t=_t>>8,Ce[Pe+5]=_t,_t=_t>>8,Ce[Pe+4]=_t;var Ct=Number(Ee>>BigInt(32)&BigInt(4294967295));return Ce[Pe+3]=Ct,Ct=Ct>>8,Ce[Pe+2]=Ct,Ct=Ct>>8,Ce[Pe+1]=Ct,Ct=Ct>>8,Ce[Pe]=Ct,Pe+8}f.prototype.writeBigUInt64LE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return rt(this,Ee,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,Ee,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,!ct){var _t=Math.pow(2,8*ft-1);nt(this,Ee,Pe,ft,_t-1,-_t)}var Ct=0,ir=1,rr=0;for(this[Pe]=Ee&255;++Ct<ft&&(ir*=256);)Ee<0&&rr===0&&this[Pe+Ct-1]!==0&&(rr=1),this[Pe+Ct]=(Ee/ir>>0)-rr&255;return Pe+ft},f.prototype.writeIntBE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,!ct){var _t=Math.pow(2,8*ft-1);nt(this,Ee,Pe,ft,_t-1,-_t)}var Ct=ft-1,ir=1,rr=0;for(this[Pe+Ct]=Ee&255;--Ct>=0&&(ir*=256);)Ee<0&&rr===0&&this[Pe+Ct+1]!==0&&(rr=1),this[Pe+Ct]=(Ee/ir>>0)-rr&255;return Pe+ft},f.prototype.writeInt8=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,1,127,-128),Ee<0&&(Ee=255+Ee+1),this[Pe]=Ee&255,Pe+1},f.prototype.writeInt16LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,32767,-32768),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,Pe+2},f.prototype.writeInt16BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,32767,-32768),this[Pe]=Ee>>>8,this[Pe+1]=Ee&255,Pe+2},f.prototype.writeInt32LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,2147483647,-2147483648),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,this[Pe+2]=Ee>>>16,this[Pe+3]=Ee>>>24,Pe+4},f.prototype.writeInt32BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,2147483647,-2147483648),Ee<0&&(Ee=4294967295+Ee+1),this[Pe]=Ee>>>24,this[Pe+1]=Ee>>>16,this[Pe+2]=Ee>>>8,this[Pe+3]=Ee&255,Pe+4},f.prototype.writeBigInt64LE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return rt(this,Ee,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,Ee,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Me(Ce,Ee,Pe,ft,ct,_t){if(Pe+ft>Ce.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("Index out of range")}function ye(Ce,Ee,Pe,ft,ct){return Ee=+Ee,Pe=Pe>>>0,ct||Me(Ce,Ee,Pe,4,34028234663852886e22,-34028234663852886e22),g.write(Ce,Ee,Pe,ft,23,4),Pe+4}f.prototype.writeFloatLE=function(Ee,Pe,ft){return ye(this,Ee,Pe,!0,ft)},f.prototype.writeFloatBE=function(Ee,Pe,ft){return ye(this,Ee,Pe,!1,ft)};function he(Ce,Ee,Pe,ft,ct){return Ee=+Ee,Pe=Pe>>>0,ct||Me(Ce,Ee,Pe,8,17976931348623157e292,-17976931348623157e292),g.write(Ce,Ee,Pe,ft,52,8),Pe+8}f.prototype.writeDoubleLE=function(Ee,Pe,ft){return he(this,Ee,Pe,!0,ft)},f.prototype.writeDoubleBE=function(Ee,Pe,ft){return he(this,Ee,Pe,!1,ft)},f.prototype.copy=function(Ee,Pe,ft,ct){if(!f.isBuffer(Ee))throw new TypeError("argument should be a Buffer");if(ft||(ft=0),!ct&&ct!==0&&(ct=this.length),Pe>=Ee.length&&(Pe=Ee.length),Pe||(Pe=0),ct>0&&ct<ft&&(ct=ft),ct===ft||Ee.length===0||this.length===0)return 0;if(Pe<0)throw new RangeError("targetStart out of bounds");if(ft<0||ft>=this.length)throw new RangeError("Index out of range");if(ct<0)throw new RangeError("sourceEnd out of bounds");ct>this.length&&(ct=this.length),Ee.length-Pe<ct-ft&&(ct=Ee.length-Pe+ft);var _t=ct-ft;return this===Ee&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Pe,ft,ct):Uint8Array.prototype.set.call(Ee,this.subarray(ft,ct),Pe),_t},f.prototype.fill=function(Ee,Pe,ft,ct){if(typeof Ee=="string"){if(typeof Pe=="string"?(ct=Pe,Pe=0,ft=this.length):typeof ft=="string"&&(ct=ft,ft=this.length),ct!==void 0&&typeof ct!="string")throw new TypeError("encoding must be a string");if(typeof ct=="string"&&!f.isEncoding(ct))throw new TypeError("Unknown encoding: "+ct);if(Ee.length===1){var _t=Ee.charCodeAt(0);(ct==="utf8"&&_t<128||ct==="latin1")&&(Ee=_t)}}else typeof Ee=="number"?Ee=Ee&255:typeof Ee=="boolean"&&(Ee=Number(Ee));if(Pe<0||this.length<Pe||this.length<ft)throw new RangeError("Out of range index");if(ft<=Pe)return this;Pe=Pe>>>0,ft=ft===void 0?this.length:ft>>>0,Ee||(Ee=0);var Ct;if(typeof Ee=="number")for(Ct=Pe;Ct<ft;++Ct)this[Ct]=Ee;else{var ir=f.isBuffer(Ee)?Ee:f.from(Ee,ct),rr=ir.length;if(rr===0)throw new TypeError('The value "'+Ee+'" is invalid for argument "value"');for(Ct=0;Ct<ft-Pe;++Ct)this[Ct+Pe]=ir[Ct%rr]}return this};var Oe={};function tt(Ce,Ee,Pe){Oe[Ce]=function(ft){function ct(){var _t;return a(this,ct),_t=c(this,ct),Object.defineProperty(_t,"message",{value:Ee.apply(_t,arguments),writable:!0,configurable:!0}),_t.name="".concat(_t.name," [").concat(Ce,"]"),_t.stack,delete _t.name,_t}return _(ct,ft),i(ct,[{key:"code",get:function(){return Ce},set:function(Ct){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ct,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Ce,"]: ").concat(this.message)}}])}(Pe)}tt("ERR_BUFFER_OUT_OF_BOUNDS",function(Ce){return Ce?"".concat(Ce," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),tt("ERR_INVALID_ARG_TYPE",function(Ce,Ee){return'The "'.concat(Ce,'" argument must be of type number. Received type ').concat(A(Ee))},TypeError),tt("ERR_OUT_OF_RANGE",function(Ce,Ee,Pe){var ft='The value of "'.concat(Ce,'" is out of range.'),ct=Pe;return Number.isInteger(Pe)&&Math.abs(Pe)>Math.pow(2,32)?ct=ot(String(Pe)):typeof Pe=="bigint"&&(ct=String(Pe),(Pe>Math.pow(BigInt(2),BigInt(32))||Pe<-Math.pow(BigInt(2),BigInt(32)))&&(ct=ot(ct)),ct+="n"),ft+=" It must be ".concat(Ee,". Received ").concat(ct),ft},RangeError);function ot(Ce){for(var Ee="",Pe=Ce.length,ft=Ce[0]==="-"?1:0;Pe>=ft+4;Pe-=3)Ee="_".concat(Ce.slice(Pe-3,Pe)).concat(Ee);return"".concat(Ce.slice(0,Pe)).concat(Ee)}function Qe(Ce,Ee,Pe){It(Ee,"offset"),(Ce[Ee]===void 0||Ce[Ee+Pe]===void 0)&&qt(Ee,Ce.length-(Pe+1))}function Pt(Ce,Ee,Pe,ft,ct,_t){if(Ce>Pe||Ce<Ee){var Ct=typeof Ee=="bigint"?"n":"",ir;throw _t>3?Ee===0||Ee===BigInt(0)?ir=">= 0".concat(Ct," and < 2").concat(Ct," ** ").concat((_t+1)*8).concat(Ct):ir=">= -(2".concat(Ct," ** ").concat((_t+1)*8-1).concat(Ct,") and < 2 ** ")+"".concat((_t+1)*8-1).concat(Ct):ir=">= ".concat(Ee).concat(Ct," and <= ").concat(Pe).concat(Ct),new Oe.ERR_OUT_OF_RANGE("value",ir,Ce)}Qe(ft,ct,_t)}function It(Ce,Ee){if(typeof Ce!="number")throw new Oe.ERR_INVALID_ARG_TYPE(Ee,"number",Ce)}function qt(Ce,Ee,Pe){throw Math.floor(Ce)!==Ce?(It(Ce,Pe),new Oe.ERR_OUT_OF_RANGE(Pe||"offset","an integer",Ce)):Ee<0?new Oe.ERR_BUFFER_OUT_OF_BOUNDS:new Oe.ERR_OUT_OF_RANGE(Pe||"offset",">= ".concat(Pe?1:0," and <= ").concat(Ee),Ce)}var Wt=/[^+/0-9A-Za-z-_]/g;function kr(Ce){if(Ce=Ce.split("=")[0],Ce=Ce.trim().replace(Wt,""),Ce.length<2)return"";for(;Ce.length%4!==0;)Ce=Ce+"=";return Ce}function mr(Ce,Ee){Ee=Ee||1/0;for(var Pe,ft=Ce.length,ct=null,_t=[],Ct=0;Ct<ft;++Ct){if(Pe=Ce.charCodeAt(Ct),Pe>55295&&Pe<57344){if(!ct){if(Pe>56319){(Ee-=3)>-1&&_t.push(239,191,189);continue}else if(Ct+1===ft){(Ee-=3)>-1&&_t.push(239,191,189);continue}ct=Pe;continue}if(Pe<56320){(Ee-=3)>-1&&_t.push(239,191,189),ct=Pe;continue}Pe=(ct-55296<<10|Pe-56320)+65536}else ct&&(Ee-=3)>-1&&_t.push(239,191,189);if(ct=null,Pe<128){if((Ee-=1)<0)break;_t.push(Pe)}else if(Pe<2048){if((Ee-=2)<0)break;_t.push(Pe>>6|192,Pe&63|128)}else if(Pe<65536){if((Ee-=3)<0)break;_t.push(Pe>>12|224,Pe>>6&63|128,Pe&63|128)}else if(Pe<1114112){if((Ee-=4)<0)break;_t.push(Pe>>18|240,Pe>>12&63|128,Pe>>6&63|128,Pe&63|128)}else throw new Error("Invalid code point")}return _t}function qr(Ce){for(var Ee=[],Pe=0;Pe<Ce.length;++Pe)Ee.push(Ce.charCodeAt(Pe)&255);return Ee}function Sr(Ce,Ee){for(var Pe,ft,ct,_t=[],Ct=0;Ct<Ce.length&&!((Ee-=2)<0);++Ct)Pe=Ce.charCodeAt(Ct),ft=Pe>>8,ct=Pe%256,_t.push(ct),_t.push(ft);return _t}function Rr(Ce){return M.toByteArray(kr(Ce))}function wt(Ce,Ee,Pe,ft){var ct;for(ct=0;ct<ft&&!(ct+Pe>=Ee.length||ct>=Ce.length);++ct)Ee[ct+Pe]=Ce[ct];return ct}function Ne(Ce,Ee){return Ce instanceof Ee||Ce!=null&&Ce.constructor!=null&&Ce.constructor.name!=null&&Ce.constructor.name===Ee.name}function Ke(Ce){return Ce!==Ce}var Te=function(){for(var Ce="0123456789abcdef",Ee=new Array(256),Pe=0;Pe<16;++Pe)for(var ft=Pe*16,ct=0;ct<16;++ct)Ee[ft+ct]=Ce[Pe]+Ce[ct];return Ee}();function Ie(Ce){return typeof BigInt>"u"?Ve:Ce}function Ve(){throw new Error("BigInt not supported")}},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}},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}},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 c=3;function m(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 p=m.prototype,T=[0,0];p.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},p.unbind=function(){this.vao.unbind()},p.update=function(w,A,M,g,b){var d=[];function u(U,B,X,$,se,le){var fe=[X.style,X.weight,X.variant,X.family].join("_"),V=h[fe];V||(V=h[fe]={});var Y=V[B];Y||(Y=V[B]=l(B,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:se,styletags:le}));for(var ee=($||12)/12,q=Y.positions,oe=Y.cells,ae=0,j=oe.length;ae<j;++ae)for(var Q=oe[ae],re=2;re>=0;--re){var ce=q[Q[re]];d.push(ee*ce[0],-ee*ce[1],U)}}for(var y=[0,0,0],f=[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]=d.length/c|0,u(.5*(w[0][N]+w[1][N]),A[N],M[N],12,z,F),L[N]=(d.length/c|0)-R[N],y[N]=d.length/c|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)}f[N]=(d.length/c|0)-y[N]}this.buffer.update(d),this.tickOffset=y,this.tickCount=f,this.labelOffset=R,this.labelCount=L},p.drawTicks=function(w,A,M,g,b,d,u,y){this.tickCount[w]&&(this.shader.uniforms.axis=d,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]))},p.drawLabel=function(w,A,M,g,b,d,u,y){this.labelCount[w]&&(this.shader.uniforms.axis=d,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]))},p.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,d){var u=o(w),y=a(w,[{buffer:u,size:3}]),f=i(w);f.attributes.position.location=0;var R=new m(w,f,u,y);return R.update(A,M,g,b,d),R}},5023:function(e,t,r){"use strict";var o=r(2478);e.exports=c;function a(m,p,T,l,_,w,A){this.cells=m,this.neighbor=p,this.flags=l,this.constraint=T,this.active=_,this.next=w,this.boundary=A}var n=a.prototype;function i(m,p){return m[0]-p[0]||m[1]-p[1]||m[2]-p[2]}n.locate=function(){var m=[0,0,0];return function(p,T,l){var _=p,w=T,A=l;return T<l?T<p&&(_=T,w=l,A=p):l<p&&(_=l,w=p,A=T),_<0?-1:(m[0]=_,m[1]=w,m[2]=A,o.eq(this.cells,m,i))}}();function s(m,p){for(var T=m.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 d=[],u=[],y=new Array(3*l),f=new Array(3*l),R=null;p&&(R=[]);for(var L=new a(T,y,f,b,d,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,m.opposite(M,A)),N=f[3*_+z]=m.isConstraint(A,M);F<0&&(N?u.push(_):(d.push(_),b[_]=1),p&&R.push([M,A,-1]))}return L}function h(m,p,T){for(var l=0,_=0;_<m.length;++_)p[_]===T&&(m[l++]=m[_]);return m.length=l,m}function c(m,p,T){var l=s(m,T);if(p===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,d=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],f=0;f<3;++f){var R=d[3*u+f];R>=0&&M[R]===0&&(b[3*u+f]?A.push(R):(w.push(R),M[R]=_))}}}var L=A;A=w,w=L,A.length=0,_=-_}var z=h(g,M,p);return T?z.concat(l.boundary):z}},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]]]}},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 c(w){for(var A={},M=0;M<w.length;++M){var g=w[M],b=g[0][0],d=g[0][1],u=g[1][1],y=[Math.min(d,u),Math.max(d,u)];b in A?A[b].push(y):A[b]=[y]}for(var f={},R=Object.keys(A),M=0;M<R.length;++M){var L=A[R[M]];f[R[M]]=n(L)}return h(f)}function m(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 d=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)d=-1,b=b.right;else return 0;else if(y>0)b=b.left;else if(y<0)d=1,b=b.right;else return 0}return d}}function p(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,d=0;d<A;++d)for(var u=w[d],y=u.length,f=y-1,R=0;R<y;f=R++){var L=u[f],z=u[R];L[0]===z[0]?g.push([L,z]):M.push([L,z])}if(M.length===0)return g.length===0?p:T(c(g));var F=a(M),N=m(F.slabs,F.coordinates);return g.length===0?N:l(c(g),N)}},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,d,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,d=g.length;b<d;++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 c(A){this.gl=A,this.shaders=[{},{}],this.programs={}}var m=c.prototype;function p(A,M,g){var b=A.createShader(M);if(A.shaderSource(b,g),A.compileShader(b),!A.getShaderParameter(b,A.COMPILE_STATUS)){var d=A.getShaderInfoLog(b);try{var u=a(d,g,M)}catch(y){throw console.warn("Failed to format compiler error: "+y),new o(d,`Error compiling shader:
`+d)}throw new o(d,u.short,u.long)}return b}m.getShaderReference=function(A,M){var g=this.gl,b=this.shaders[A===g.FRAGMENT_SHADER|0],d=b[M];if(!d||!g.isShader(d.shader)){var u=p(g,A,M);d=b[M]=new h(s++,M,A,u,[],1,this)}else d.count+=1;return d};function T(A,M,g,b,d){var u=A.createProgram();A.attachShader(u,M),A.attachShader(u,g);for(var y=0;y<b.length;++y)A.bindAttribLocation(u,d[y],b[y]);if(A.linkProgram(u),!A.getProgramParameter(u,A.LINK_STATUS)){var f=A.getProgramInfoLog(u);throw new o(f,"Error linking program: "+f)}return u}m.getProgram=function(A,M,g,b){var d=[A.id,M.id,g.join(":"),b.join(":")].join("@"),u=this.programs[d];return(!u||!this.gl.isProgram(u))&&(this.programs[d]=u=T(this.gl,A.shader,M.shader,g,b),A.programs.push(d),M.programs.push(d)),u};function l(A){var M=i.get(A);return M||(M=new c(A),i.set(A,M)),M}function _(A,M,g){return l(A).getShaderReference(M,g)}function w(A,M,g,b,d){return l(A).getProgram(M,g,b,d)}},5093:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r}},5137:function(e,t,r){e.exports=a;var o=r(1091)();function a(n,i,s,h,c,m){var p,T;for(i||(i=3),s||(s=0),h?T=Math.min(h*i+s,n.length):T=n.length,p=s;p<T;p+=i)o[0]=n[p],o[1]=n[p+1],o[2]=n[p+2],c(o,o,m),n[p]=o[0],n[p+1]=o[1],n[p+2]=o[2];return n}},5171:function(e,t,r){var o=r(737);e.exports=function(n){return o[n]}},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}},5202:function(e,t,r){"use strict";var o=r(1944),a=r(8210);e.exports=s,e.exports.positive=h,e.exports.negative=c;function n(m,p){var T=a(o(m,p),[p[p.length-1]]);return T[T.length-1]}function i(m,p,T,l){var _=l-p,w=-p/_;w<0?w=0:w>1&&(w=1);for(var A=1-w,M=m.length,g=new Array(M),b=0;b<M;++b)g[b]=w*m[b]+A*T[b];return g}function s(m,p){for(var T=[],l=[],_=n(m[m.length-1],p),w=m[m.length-1],A=m[0],M=0;M<m.length;++M,w=A){A=m[M];var g=n(A,p);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(m,p){for(var T=[],l=n(m[m.length-1],p),_=m[m.length-1],w=m[0],A=0;A<m.length;++A,_=w){w=m[A];var M=n(w,p);(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 c(m,p){for(var T=[],l=n(m[m.length-1],p),_=m[m.length-1],w=m[0],A=0;A<m.length;++A,_=w){w=m[A];var M=n(w,p);(l<0&&M>0||l>0&&M<0)&&T.push(i(_,M,w,l)),M<=0&&T.push(w.slice()),l=M}return T}},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}},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,c=s-h,m=o-c,p=t*a,T=p-a,l=p-T,_=a-l,w=i-c*l,A=w-m*l,M=A-c*_,g=m*_-M;return n?(n[0]=g,n[1]=i,n):[g,i]}},5298:function(e,t){"use strict";var r={"float64,2,1,0":function(){return function(m,p,T,l,_){var w=m[0],A=m[1],M=m[2],g=T[0],b=T[1],d=T[2];l|=0;var u=0,y=0,f=0,R=d,L=b-M*d,z=g-A*b;for(f=0;f<w;++f){for(y=0;y<A;++y){for(u=0;u<M;++u)p[l]/=_,l+=R;l+=L}l+=z}}},"uint8,2,0,1,float64,2,1,0":function(){return function(m,p,T,l,_,w,A,M){var g=m[0],b=m[1],d=m[2],u=T[0],y=T[1],f=T[2],R=w[0],L=w[1],z=w[2];l|=0,A|=0;for(var F=l,N=A,O=m[0]|0;O>0;){O<64?(g=O,O=0):(g=64,O-=64);for(var P=m[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,$=f,se=u-d*f,le=y-g*u,fe=z,V=R-d*z,Y=L-g*R;for(X=0;X<b;++X){for(B=0;B<g;++B){for(U=0;U<d;++U)p[l]=_[A]*M,l+=$,A+=fe;l+=se,A+=V}l+=le,A+=Y}}}}},"float32,1,0,float32,1,0":function(){return function(m,p,T,l,_,w,A){var M=m[0],g=m[1],b=T[0],d=T[1],u=w[0],y=w[1];l|=0,A|=0;var f=0,R=0,L=d,z=b-g*d,F=y,N=u-g*y;for(R=0;R<M;++R){for(f=0;f<g;++f)p[l]=_[A],l+=L,A+=F;l+=z,A+=N}}},"float32,1,0,float32,0,1":function(){return function(m,p,T,l,_,w,A){var M=m[0],g=m[1],b=T[0],d=T[1],u=w[0],y=w[1];l|=0,A|=0;for(var f=l,R=A,L=m[1]|0;L>0;){L<64?(g=L,L=0):(g=64,L-=64);for(var z=m[0]|0;z>0;){z<64?(M=z,z=0):(M=64,z-=64),l=f+L*d+z*b,A=R+L*y+z*u;var F=0,N=0,O=d,P=b-g*d,U=y,B=u-g*y;for(N=0;N<M;++N){for(F=0;F<g;++F)p[l]=_[A],l+=O,A+=U;l+=P,A+=B}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(m,p,T,l,_,w,A){var M=m[0],g=m[1],b=m[2],d=T[0],u=T[1],y=T[2],f=w[0],R=w[1],L=w[2];l|=0,A|=0;for(var z=l,F=A,N=m[2]|0;N>0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=m[0]|0;O>0;){O<64?(M=O,O=0):(M=64,O-=64);for(var P=m[1]|0;P>0;){P<64?(g=P,P=0):(g=64,P-=64),l=z+N*y+O*d+P*u,A=F+N*L+O*f+P*R;var U=0,B=0,X=0,$=y,se=d-b*y,le=u-M*d,fe=L,V=f-b*L,Y=R-M*f;for(X=0;X<g;++X){for(B=0;B<M;++B){for(U=0;U<b;++U)p[l]=_[A],l+=$,A+=fe;l+=se,A+=V}l+=le,A+=Y}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(m,p,T,l,_,w,A){var M=m[0],g=m[1],b=m[2],d=T[0],u=T[1],y=T[2],f=w[0],R=w[1],L=w[2];l|=0,A|=0;var z=0,F=0,N=0,O=y,P=d-b*y,U=u-M*d,B=L,X=f-b*L,$=R-M*f;for(N=0;N<g;++N){for(F=0;F<M;++F){for(z=0;z<b;++z)p[l]=_[A],l+=O,A+=B;l+=P,A+=X}l+=U,A+=$}}}};function o(c,m){var p=m.join(","),T=r[p];return T()}var a=o,n={mul:function(c){var m={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=_.dtype,d=_.order,u=[w,A.join(),M,g.join(),b,d.join()].join(),y=m[u];return y||(m[u]=y=c([w,A,M,g,b,d])),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(c){var m={};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(),d=m[b];return d||(m[b]=d=c([w,A,M,g])),d(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},mulseq:function(c){var m={};return function(T,l){var _=T.dtype,w=T.order,A=[_,w.join()].join(),M=m[A];return M||(m[A]=M=c([_,w])),M(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},div:function(c){var m={};return function(T,l,_){var w=T.dtype,A=T.order,M=l.dtype,g=l.order,b=_.dtype,d=_.order,u=[w,A.join(),M,g.join(),b,d.join()].join(),y=m[u];return y||(m[u]=y=c([w,A,M,g,b,d])),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(c){var m={};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(),d=m[b];return d||(m[b]=d=c([w,A,M,g])),d(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},divseq:function(c){var m={};return function(T,l){var _=T.dtype,w=T.order,A=[_,w.join()].join(),M=m[A];return M||(m[A]=M=c([_,w])),M(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},assign:function(c){var m={};return function(T,l){var _=T.dtype,w=T.order,A=l.dtype,M=l.order,g=[_,w.join(),A,M.join()].join(),b=m[g];return b||(m[g]=b=c([_,w,A,M])),b(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0)}}};function i(c){var m=n[c.funcName];return m(a.bind(void 0,c))}function s(c){return i({funcName:c.funcName})}var h={mul:"*",div:"/"};(function(){for(var c in h)t[c]=s({funcName:c}),t[c+"s"]=s({funcName:c+"s"}),t[c+"seq"]=s({funcName:c+"seq"})})(),t.assign=s({funcName:"assign"})},5304:function(e,t,r){"use strict";e.exports=h;var o=r(2762),a=r(8116),n=r(1879).bg;function i(c,m,p,T){this.gl=c,this.buffer=m,this.vao=p,this.shader=T}var s=i.prototype;s.draw=function(c,m,p,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:c,view:m,projection:p,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(c){for(var m=[],p=[],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){p.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 d=-1;d<=1;d+=2)A[w]=d,m.push(A[0],A[1],A[2],M[0],M[1],M[2]),T+=1}var u=_;_=w,w=u}var y=o(c,new Float32Array(m)),f=o(c,new Uint16Array(p),c.ELEMENT_ARRAY_BUFFER),R=a(c,[{buffer:y,type:c.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:c.FLOAT,size:3,offset:12,stride:24}],f),L=n(c);return L.attributes.position.location=0,L.attributes.normal.location=1,new i(c,y,R,L)}},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}},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 c=0;c<i.length;++c)h=o(h,a(s,i[c]));else for(var c=0;c<s.length;++c)h=o(h,a(i,s[c]));return h}},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),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=new Float32Array(16);function p(g,b,d){this.lo=g,this.hi=b,this.pixelsPerDataUnit=d}var T=[0,0,0,1],l=[0,0,0,1];function _(g,b,d,u,y){for(var f=0;f<3;++f){for(var R=T,L=l,z=0;z<3;++z)L[z]=R[z]=d[z];L[3]=R[3]=1,L[f]+=1,h(L,L,b),L[3]<0&&(g[f]=1/0),R[f]-=1,h(R,R,b),R[3]<0&&(g[f]=1/0);var F=(R[0]/R[3]-L[0]/L[3])*u,N=(R[1]/R[3]-L[1]/L[3])*y;g[f]=.25*Math.sqrt(F*F+N*N)}return g}var w=[new p(1/0,-1/0,1/0),new p(1/0,-1/0,1/0),new p(1/0,-1/0,1/0)],A=[0,0,0];function M(g,b,d,u,N){var f=b.model||c,R=b.view||c,L=b.projection||c,z=b._ortho||!1,F=g.bounds,N=N||n(f,R,L,F,z),O=N.axis;i(m,R,f),i(m,L,m);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(m,m));s(m,m);for(var X=0;X<3;++X){var $=(X+1)%3,se=(X+2)%3,le=A;e:for(var U=0;U<2;++U){var fe=[];if(O[X]<0!=!!U){le[X]=F[U][X];for(var V=0;V<2;++V){le[$]=F[V^U][$];for(var Y=0;Y<2;++Y)le[se]=F[Y^V^U][se],fe.push(le.slice())}for(var ee=z?5:4,V=ee;V===ee;++V){if(fe.length===0)continue e;fe=a.positive(fe,B[V])}for(var V=0;V<fe.length;++V)for(var se=fe[V],q=_(A,m,se,d,u),Y=0;Y<3;++Y)P[Y].lo=Math.min(P[Y].lo,se[Y]),P[Y].hi=Math.max(P[Y].hi,se[Y]),Y!==X&&(P[Y].pixelsPerDataUnit=Math.min(P[Y].pixelsPerDataUnit,Math.abs(q[Y])))}}}return P}},5455:function(e,t,r){e.exports=r(7056)},5486:function(e,t,r){e.exports=r(3066)},5542:function(e,t,r){"use strict";var o=r(2478);e.exports=s;function a(h,c){this.stars=h,this.edges=c}var n=a.prototype;function i(h,c,m){for(var p=1,T=h.length;p<T;p+=2)if(h[p-1]===c&&h[p]===m){h[p-1]=h[T-2],h[p]=h[T-1],h.length=T-2;return}}n.isConstraint=function(){var h=[0,0];function c(m,p){return m[0]-p[0]||m[1]-p[1]}return function(m,p){return h[0]=Math.min(m,p),h[1]=Math.max(m,p),o.eq(this.edges,h,c)>=0}}(),n.removeTriangle=function(h,c,m){var p=this.stars;i(p[h],c,m),i(p[c],m,h),i(p[m],h,c)},n.addTriangle=function(h,c,m){var p=this.stars;p[h].push(c,m),p[c].push(m,h),p[m].push(h,c)},n.opposite=function(h,c){for(var m=this.stars[c],p=1,T=m.length;p<T;p+=2)if(m[p]===h)return m[p-1];return-1},n.flip=function(h,c){var m=this.opposite(h,c),p=this.opposite(c,h);this.removeTriangle(h,c,m),this.removeTriangle(c,h,p),this.addTriangle(h,p,m),this.addTriangle(c,m,p)},n.edges=function(){for(var h=this.stars,c=[],m=0,p=h.length;m<p;++m)for(var T=h[m],l=0,_=T.length;l<_;l+=2)c.push([T[l],T[l+1]]);return c},n.cells=function(){for(var h=this.stars,c=[],m=0,p=h.length;m<p;++m)for(var T=h[m],l=0,_=T.length;l<_;l+=2){var w=T[l],A=T[l+1];m<Math.min(w,A)&&c.push([m,w,A])}return c};function s(h,c){for(var m=new Array(h),p=0;p<h;++p)m[p]=[];return new a(m,c)}},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],c=o[6],m=o[7],p=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+p*n,r[5]=h*i+T*n,r[6]=c*i+l*n,r[7]=m*i+_*n,r[8]=p*i-s*n,r[9]=T*i-h*n,r[10]=l*i-c*n,r[11]=_*i-m*n,r}},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]))}},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),c=new Array(i.length),m=[],p=0;p<i.length;++p){var T=s[p].length;c[p]=T,h[p]=!0,T<=1&&m.push(p)}for(;m.length>0;){var l=m.pop();h[l]=!1;for(var _=s[l],p=0;p<_.length;++p){var w=_[p];--c[w]===0&&m.push(w)}}for(var A=new Array(i.length),M=[],p=0;p<i.length;++p)if(h[p]){var l=M.length;A[p]=l,M.push(i[p])}else A[p]=-1;for(var g=[],p=0;p<n.length;++p){var b=n[p];h[b[0]]&&h[b[1]]&&g.push([A[b[0]],A[b[1]]])}return[g,M]}},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}},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],c=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]=c}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}},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}},5714:function(e,t,r){"use strict";e.exports=d;var o=r(2762),a=r(8116),n=r(7766),i=new Uint8Array(4),s=new Float32Array(i.buffer);function h(u,y,f,R){return i[0]=R,i[1]=f,i[2]=y,i[3]=u,s[0]}var c=r(2478),m=r(9618),p=r(7319),T=p.createShader,l=p.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(u,y){for(var f=0,R=0;R<3;++R){var L=u[R]-y[R];f+=L*L}return Math.sqrt(f)}function A(u){for(var y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],f=0;f<3;++f)y[0][f]=Math.max(u[0][f],y[0][f]),y[1][f]=Math.min(u[1][f],y[1][f]);return y}function M(u,y,f,R){this.arcLength=u,this.position=y,this.index=f,this.dataCoordinate=R}function g(u,y,f,R,L,z){this.gl=u,this.shader=y,this.pickShader=f,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,f=this.shader,R=this.vao;f.bind(),f.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,f=this.pickShader,R=this.vao;f.bind(),f.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,f;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 se=U[y-1],le=U[y];for(z.push(N),F.push(se.slice()),f=0;f<3;++f){if(isNaN(se[f])||isNaN(le[f])||!isFinite(se[f])||!isFinite(le[f])){if(!R&&L.length>0){for(var fe=0;fe<24;++fe)L.push(L[L.length-12]);O+=2,$=!0}continue e}P[0][f]=Math.min(P[0][f],se[f],le[f]),P[1][f]=Math.max(P[1][f],se[f],le[f])}var V,Y;Array.isArray(B[0])?(V=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]):V=Y=B,V.length===3&&(V=[V[0],V[1],V[2],1]),Y.length===3&&(Y=[Y[0],Y[1],Y[2],1]),!this.hasAlpha&&V[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(se,le),$){for(f=0;f<2;++f)L.push(se[0],se[1],se[2],le[0],le[1],le[2],q,ee,V[0],V[1],V[2],V[3]);O+=2,$=!1}L.push(se[0],se[1],se[2],le[0],le[1],le[2],q,ee,V[0],V[1],V[2],V[3],se[0],se[1],se[2],le[0],le[1],le[2],q,-ee,V[0],V[1],V[2],V[3],le[0],le[1],le[2],se[0],se[1],se[2],N,-ee,Y[0],Y[1],Y[2],Y[3],le[0],le[1],le[2],se[0],se[1],se[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 oe=u.dashes,ae=oe.slice();for(ae.unshift(0),y=1;y<ae.length;++y)ae[y]=ae[y-1]+ae[y];var j=m(new Array(256*4),[256,1,4]);for(y=0;y<256;++y){for(f=0;f<4;++f)j.set(y,0,f,0);c.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),f=c.le(this.arcLength,y);if(f<0)return null;if(f===this.arcLength.length-1)return new M(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),f);for(var R=this.points[f],L=this.points[Math.min(f+1,this.points.length-1)],z=(y-this.arcLength[f])/(this.arcLength[f+1]-this.arcLength[f]),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?f:f+1,this.points.length-1);return new M(y,N,P,this.points[P])};function d(u){var y=u.gl||u.scene&&u.scene.gl,f=T(y);f.attributes.position.location=0,f.attributes.nextPosition.location=1,f.attributes.arcLength.location=2,f.attributes.lineWidth.location=3,f.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=m(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,f,R,L,z,O);return P.update(u),P}},5716:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n.cmp(new o(0))}},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]]}},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,c=0,m=0;m<h;++m){var p=s[m],T=n(p);if(T!==0){if(c>0){var l=s[c-1];if(o(p,l)===0&&n(l)!==T){c-=1;continue}}s[c++]=p}}return s.length=c,s}},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}},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}},5874:function(e,t,r){e.exports=f;var o=r(620),a=r(7827),n=r(6852),i=r(7932),s=r(3508),h=999,c=9999,m=0,p=1,T=2,l=3,_=4,w=5,A=6,M=7,g=8,b=9,d=10,u=11,y=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function f(R){var L=0,z=0,F=h,N,O,P=[],U=[],B=0,X=0,$=1,se=0,le=0,fe=!1,V=!1,Y="",ee;R=R||{};var q=n,oe=o;R.version==="300 es"&&(q=s,oe=i);for(var ae={},j={},L=0;L<q.length;L++)ae[q[L]]=!0;for(var L=0;L<oe.length;L++)j[oe[L]]=!0;return function(he){return U=[],he!==null?re(he):ce()};function Q(he){he.length&&U.push({type:y[F],data:he,position:le,line:$,column:se})}function re(he){L=0,he.toString&&(he=he.toString()),Y+=he.replace(/\r\n/g,`
`),ee=Y.length;for(var Oe;N=Y[L],L<ee;){switch(Oe=L,F){case m:L=Ze();break;case p:L=ze();break;case T:L=De();break;case l:L=at();break;case _:L=st();break;case u:L=rt();break;case w:L=Me();break;case c:L=ye();break;case b:L=Ae();break;case h:L=be();break}if(Oe!==L)switch(Y[Oe]){case`
`:se=0,++$;break;default:++se;break}}return z+=L,Y=Y.slice(L),U}function ce(he){return P.length&&Q(P.join("")),F=d,Q("(eof)"),U}function be(){return P=P.length?[]:P,O==="/"&&N==="*"?(le=z+L-1,F=m,O=N,L+1):O==="/"&&N==="/"?(le=z+L-1,F=p,O=N,L+1):N==="#"?(F=T,le=z+L,L):/\s/.test(N)?(F=b,le=z+L,L):(fe=/\d/.test(N),V=/[^\w_]/.test(N),le=z+L,F=fe?_:V?l:c,L)}function Ae(){return/[^\s]/g.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function De(){return(N==="\r"||N===`
`)&&O!=="\\"?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function ze(){return De()}function Ze(){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=m,L;if(O==="/"&&N==="/")return F=p,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 he=P.length===2&&N!=="=";if(/[\w_\d\s]/.test(N)||he){for(;nt(P););return F=h,L}return P.push(N),O=N,L+1}function nt(he){var Oe=0,tt,ot;do{if(tt=a.indexOf(he.slice(0,he.length+Oe).join("")),ot=a[tt],tt===-1){if(Oe--+he.length>0)continue;ot=he.slice(0,1).join("")}return Q(ot),le+=ot.length,P=P.slice(ot.length),P.length}while(!0)}function rt(){return/[^a-fA-F0-9]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function st(){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 Me(){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 ye(){if(/[^\d\w_]/.test(N)){var he=P.join("");return j[he]?F=g:ae[he]?F=M:F=A,Q(P.join("")),F=h,L}return P.push(N),O=N,L+1}}},5878:function(e,t,r){"use strict";e.exports=i;var o=r(3250),a=r(2014);function n(s,h,c){var m=Math.abs(o(s,h,c)),p=Math.sqrt(Math.pow(h[0]-c[0],2)+Math.pow(h[1]-c[1],2));return m/p}function i(s,h,c){for(var m=h.length,p=s.length,T=new Array(m),l=new Array(m),_=new Array(m),w=new Array(m),A=0;A<m;++A)T[A]=l[A]=-1,_[A]=1/0,w[A]=!1;for(var A=0;A<p;++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 d(V){if(w[V])return 1/0;var Y=T[V],ee=l[V];return Y<0||ee<0?1/0:n(h[V],h[Y],h[ee])}function u(V,Y){var ee=O[V],q=O[Y];O[V]=q,O[Y]=ee,P[ee]=Y,P[q]=V}function y(V){return _[O[V]]}function f(V){return V&1?V-1>>1:(V>>1)-1}function R(V){for(var Y=y(V);;){var ee=Y,q=2*V+1,oe=2*(V+1),ae=V;if(q<B){var j=y(q);j<ee&&(ae=q,ee=j)}if(oe<B){var Q=y(oe);Q<ee&&(ae=oe)}if(ae===V)return V;u(V,ae),V=ae}}function L(V){for(var Y=y(V);V>0;){var ee=f(V);if(ee>=0){var q=y(ee);if(Y<q){u(V,ee),V=ee;continue}}return V}}function z(){if(B>0){var V=O[0];return u(0,B-1),B-=1,R(0),V}return-1}function F(V,Y){var ee=O[V];return _[ee]===Y?V:(_[ee]=-1/0,L(V),z(),_[ee]=Y,B+=1,L(B-1))}function N(V){if(!w[V]){w[V]=!0;var Y=T[V],ee=l[V];T[ee]>=0&&(T[ee]=Y),l[Y]>=0&&(l[Y]=ee),P[Y]>=0&&F(P[Y],d(Y)),P[ee]>=0&&F(P[ee],d(ee))}}for(var O=[],P=new Array(m),A=0;A<m;++A){var U=_[A]=d(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]>c)break;N(X)}for(var $=[],A=0;A<m;++A)w[A]||(P[A]=$.length,$.push(h[A].slice()));var se=$.length;function le(V,Y){if(V[Y]<0)return Y;var ee=Y,q=Y;do{var oe=V[q];if(!w[q]||oe<0||oe===q||(q=oe,oe=V[q],!w[q]||oe<0||oe===q))break;q=oe,ee=V[ee]}while(ee!==q);for(var ae=Y;ae!==q;ae=V[ae])V[ae]=q;return q}var fe=[];return s.forEach(function(V){var Y=le(T,V[0]),ee=le(l,V[1]);if(Y>=0&&ee>=0&&Y!==ee){var q=P[Y],oe=P[ee];q!==oe&&fe.push([q,oe])}}),a.unique(a.normalize(fe)),{positions:$,edges:fe}}},5911:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],c=a[1],m=a[2];return r[0]=i*m-s*c,r[1]=s*h-n*m,r[2]=n*c-i*h,r}},5964:function(e){"use strict";e.exports=function(t){return!t&&t!==0?"":t.toString()}},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 c=new Array(h.length),m=0;m<h.length;++m)c[m]=s[h[m]];return a(c)*i<1})}},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 c=n[h],m=0;m<i.length;++m)s+=Math.pow(c[m]-i[m],2);return Math.sqrt(s/n.length)}},6079:function(e){e.exports=t;function t(r,o,a,n){var i=n[0],s=n[1],h=n[2],c=Math.sqrt(i*i+s*s+h*h),m,p,T,l,_,w,A,M,g,b,d,u,y,f,R,L,z,F,N,O,P,U,B,X;return Math.abs(c)<1e-6?null:(c=1/c,i*=c,s*=c,h*=c,m=Math.sin(a),p=Math.cos(a),T=1-p,l=o[0],_=o[1],w=o[2],A=o[3],M=o[4],g=o[5],b=o[6],d=o[7],u=o[8],y=o[9],f=o[10],R=o[11],L=i*i*T+p,z=s*i*T+h*m,F=h*i*T-s*m,N=i*s*T-h*m,O=s*s*T+p,P=h*s*T+i*m,U=i*h*T+s*m,B=s*h*T-i*m,X=h*h*T+p,r[0]=l*L+M*z+u*F,r[1]=_*L+g*z+y*F,r[2]=w*L+b*z+f*F,r[3]=A*L+d*z+R*F,r[4]=l*N+M*O+u*P,r[5]=_*N+g*O+y*P,r[6]=w*N+b*O+f*P,r[7]=A*N+d*O+R*P,r[8]=l*U+M*B+u*X,r[9]=_*U+g*B+y*X,r[10]=w*U+b*B+f*X,r[11]=A*U+d*B+R*X,o!==r&&(r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r)}},6141:function(e,t,r){e.exports=r(2953)},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(M,g,b,d){var u=M[0],y=b[0];d|=0;var f=0,R=y;for(f=0;f<u;++f)g[d]=0,d+=R},fdTemplate1:function(M,g,b,d,u,y,f){var R=M[0],L=b[0],z=y[0],F=-1*L,N=L;d|=0,f|=0;var O=0,P=L,U=z;for(O=0;O<R;++O)u[f]=.5*(g[d+F]-g[d+N]),d+=P,f+=U},fdTemplate2:function(M,g,b,d,u,y,f,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],se=-1*O,le=O,fe=-1*P,V=P;d|=0,f|=0,z|=0;var Y=0,ee=0,q=P,oe=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[f]=.5*(g[d+se]-g[d+le]),R[z]=.5*(g[d+fe]-g[d+V]),d+=q,f+=ae,z+=Q;d+=oe,f+=j,z+=re}}},n={cdiff:function(M){var g={};return function(d,u,y){var f=d.dtype,R=d.order,L=u.dtype,z=u.order,F=y.dtype,N=y.order,O=[f,R.join(),L,z.join(),F,N.join()].join(),P=g[O];return P||(g[O]=P=M([f,R,L,z,F,N])),P(d.shape.slice(0),d.data,d.stride,d.offset|0,u.data,u.stride,u.offset|0,y.data,y.stride,y.offset|0)}},zero:function(M){var g={};return function(d){var u=d.dtype,y=d.order,f=[u,y.join()].join(),R=g[f];return R||(g[f]=R=M([u,y])),R(d.shape.slice(0),d.data,d.stride,d.offset|0)}},fdTemplate1:function(M){var g={};return function(d,u){var y=d.dtype,f=d.order,R=u.dtype,L=u.order,z=[y,f.join(),R,L.join()].join(),F=g[z];return F||(g[z]=F=M([y,f,R,L])),F(d.shape.slice(0),d.data,d.stride,d.offset|0,u.data,u.stride,u.offset|0)}},fdTemplate2:function(M){var g={};return function(d,u,y){var f=d.dtype,R=d.order,L=u.dtype,z=u.order,F=y.dtype,N=y.order,O=[f,R.join(),L,z.join(),F,N.join()].join(),P=g[O];return P||(g[O]=P=M([f,R,L,z,F,N])),P(d.shape.slice(0),d.data,d.stride,d.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 c={},m={},p={body:"",args:[],thisVars:[],localVars:[]},T=h({funcName:"cdiff"}),l=h({funcName:"zero"});function _(M){return M in c?c[M]:c[M]=h({funcName:"fdTemplate"+M})}function w(M,g,b,d){return function(u,y){var f=y.shape.slice();return f[0]>2&&f[1]>2&&d(y.pick(-1,-1).lo(1,1).hi(f[0]-2,f[1]-2),u.pick(-1,-1,0).lo(1,1).hi(f[0]-2,f[1]-2),u.pick(-1,-1,1).lo(1,1).hi(f[0]-2,f[1]-2)),f[1]>2&&(b(y.pick(0,-1).lo(1).hi(f[1]-2),u.pick(0,-1,1).lo(1).hi(f[1]-2)),g(u.pick(0,-1,0).lo(1).hi(f[1]-2))),f[1]>2&&(b(y.pick(f[0]-1,-1).lo(1).hi(f[1]-2),u.pick(f[0]-1,-1,1).lo(1).hi(f[1]-2)),g(u.pick(f[0]-1,-1,0).lo(1).hi(f[1]-2))),f[0]>2&&(b(y.pick(-1,0).lo(1).hi(f[0]-2),u.pick(-1,0,0).lo(1).hi(f[0]-2)),g(u.pick(-1,0,1).lo(1).hi(f[0]-2))),f[0]>2&&(b(y.pick(-1,f[1]-1).lo(1).hi(f[0]-2),u.pick(-1,f[1]-1,0).lo(1).hi(f[0]-2)),g(u.pick(-1,f[1]-1,1).lo(1).hi(f[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(f[0]-1,0,0,0),u.set(f[0]-1,0,1,0),u.set(0,f[1]-1,0,0),u.set(0,f[1]-1,1,0),u.set(f[0]-1,f[1]-1,0,0),u.set(f[0]-1,f[1]-1,1,0),u}}function A(M){var g=M.join(),f=m[g];if(f)return f;for(var b=M.length,d=[T,l],u=1;u<=b;++u)d.push(_(u));var y=w,f=y.apply(void 0,d);return m[g]=f,f}e.exports=function(g,b,d){if(Array.isArray(d)||(typeof d=="string"?d=o(b.dimension,d):d=o(b.dimension,"clamp")),b.size===0)return g;if(b.dimension===0)return g.set(0),g;var u=A(d);return u(g,b)}},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),c=0;for(o=0;o<i;++o){var m=r[o],p=m.length;for(a=0;a<p;++a){var T=h[c++]=new Array(p-1),l=0;for(n=0;n<p;++n)n!==a&&(T[l++]=m[n]);if(a&1){var _=T[1];T[1]=T[0],T[0]=_}}}return h}},6296:function(e,t,r){"use strict";e.exports=h;var o=r(7261),a=r(9977),n=r(1811);function i(c,m){this._controllerNames=Object.keys(c),this._controllerList=this._controllerNames.map(function(p){return c[p]}),this._mode=m,this._active=c[m],this._active||(this._mode="turntable",this._active=c.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=i.prototype;s.flush=function(c){for(var m=this._controllerList,p=0;p<m.length;++p)m[p].flush(c)},s.idle=function(c){for(var m=this._controllerList,p=0;p<m.length;++p)m[p].idle(c)},s.lookAt=function(c,m,p,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].lookAt(c,m,p,T)},s.rotate=function(c,m,p,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].rotate(c,m,p,T)},s.pan=function(c,m,p,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].pan(c,m,p,T)},s.translate=function(c,m,p,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].translate(c,m,p,T)},s.setMatrix=function(c,m){for(var p=this._controllerList,T=0;T<p.length;++T)p[T].setMatrix(c,m)},s.setDistanceLimits=function(c,m){for(var p=this._controllerList,T=0;T<p.length;++T)p[T].setDistanceLimits(c,m)},s.setDistance=function(c,m){for(var p=this._controllerList,T=0;T<p.length;++T)p[T].setDistance(c,m)},s.recalcMatrix=function(c){this._active.recalcMatrix(c)},s.getDistance=function(c){return this._active.getDistance(c)},s.getDistanceLimits=function(c){return this._active.getDistanceLimits(c)},s.lastT=function(){return this._active.lastT()},s.setMode=function(c){if(c!==this._mode){var m=this._controllerNames.indexOf(c);if(!(m<0)){var p=this._active,T=this._controllerList[m],l=Math.max(p.lastT(),T.lastT());p.recalcMatrix(l),T.setMatrix(l,p.computedMatrix),this._active=T,this._mode=c,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode};function h(c){c=c||{};var m=c.eye||[0,0,1],p=c.center||[0,0,0],T=c.up||[0,1,0],l=c.distanceLimits||[0,1/0],_=c.mode||"turntable",w=o(),A=a(),M=n();return w.setDistanceLimits(l[0],l[1]),w.lookAt(0,m,p,T),A.setDistanceLimits(l[0],l[1]),A.lookAt(0,m,p,T),M.setDistanceLimits(l[0],l[1]),M.lookAt(0,m,p,T),new i({turntable:w,orbit:A,matrix:M},_)}},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])}},6405:function(e,t,r){"use strict";var o=r(2931);e.exports=function(n,i){var s=n.positions,h=n.vectors,c={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]),c;for(var m=0,p=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,A=-1/0,M=null,g=null,b=[],d=1/0,u=!1,y=n.coneSizemode==="raw",f=0;f<s.length;f++){var R=s[f];p=Math.min(R[0],p),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[f];if(o.length(L)>m&&(m=o.length(L)),f&&!y){var z=2*o.distance(M,R)/(o.length(g)+o.length(L));z?(d=Math.min(d,z),u=!1):u=!0}u||(M=R,g=L),b.push(L)}var F=[p,l,w],N=[T,_,A];i&&(i[0]=F,i[1]=N),m===0&&(m=1);var O=1/m;isFinite(d)||(d=1),c.vectorScale=d;var P=n.coneSize||(y?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*O),c.coneScale=P;for(var f=0,U=0;f<s.length;f++)for(var R=s[f],B=R[0],X=R[1],$=R[2],se=b[f],le=o.length(se)*O,fe=0,V=8;fe<V;fe++){c.positions.push([B,X,$,U++]),c.positions.push([B,X,$,U++]),c.positions.push([B,X,$,U++]),c.positions.push([B,X,$,U++]),c.positions.push([B,X,$,U++]),c.positions.push([B,X,$,U++]),c.vectors.push(se),c.vectors.push(se),c.vectors.push(se),c.vectors.push(se),c.vectors.push(se),c.vectors.push(se),c.vertexIntensity.push(le,le,le),c.vertexIntensity.push(le,le,le);var Y=c.positions.length;c.cells.push([Y-6,Y-5,Y-4],[Y-3,Y-2,Y-1])}return c};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"})}},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),c=new Array(8),m=new Array(3),p=[0,0,0];(function(){for(var b=0;b<8;++b)h[b]=[1,1,1,1],c[b]=[1,1,1]})();function T(b,d,u){for(var y=0;y<4;++y){b[y]=u[12+y];for(var f=0;f<3;++f)b[y]+=d[f]*u[4*f+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 d=0;d<l.length;++d)if(b=n.positive(b,l[d]),b.length<3)return 0;for(var u=b[0],y=u[0]/u[3],f=u[1]/u[3],R=0,d=1;d+1<b.length;++d){var L=b[d],z=b[d+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-f,X=O-y,$=P-f;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,d,u,y,f){a(s,d,b),a(s,u,s);for(var R=0,L=0;L<2;++L){m[2]=y[L][2];for(var z=0;z<2;++z){m[1]=y[z][1];for(var F=0;F<2;++F)m[0]=y[F][0],T(h[R],m,s),R+=1}}for(var N=-1,L=0;L<8;++L){for(var O=h[L][3],P=0;P<3;++P)c[L][P]=h[L][P]/O;f&&(c[L][2]*=-1),O<0&&(N<0||c[L][2]<c[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,se=-1,le=0;le<2;++le){var fe=le<<U,V=fe+(le<<B)+(1-le<<X),Y=fe+(1-le<<B)+(le<<X);i(c[fe],c[V],c[Y],p)<0||(le?$=1:se=1)}if($<0||se<0){se>$&&(N|=1<<U);continue}for(var le=0;le<2;++le){var fe=le<<U,V=fe+(le<<B)+(1-le<<X),Y=fe+(1-le<<B)+(le<<X),ee=_([h[fe],h[V],h[Y],h[fe+(1<<B)+(1<<X)]]);le?$=ee:se=ee}if(se>$){N|=1<<U;continue}}}for(var q=7^N,oe=-1,L=0;L<8;++L)L===N||L===q||(oe<0||c[oe][1]>c[L][1])&&(oe=L);for(var ae=-1,L=0;L<3;++L){var j=oe^1<<L;if(!(j===N||j===q)){ae<0&&(ae=j);var X=c[j];X[0]<c[ae][0]&&(ae=j)}}for(var Q=-1,L=0;L<3;++L){var j=oe^1<<L;if(!(j===N||j===q||j===ae)){Q<0&&(Q=j);var X=c[j];X[0]>c[Q][0]&&(Q=j)}}var re=w;re[0]=re[1]=re[2]=0,re[o.log2(ae^oe)]=oe&ae,re[o.log2(oe^Q)]=oe&Q;var ce=Q^7;ce===N||ce===q?(ce=ae^7,re[o.log2(Q^ce)]=ce&Q):re[o.log2(ae^ce)]=ce&ae;for(var be=A,Ae=N,U=0;U<3;++U)Ae&1<<U?be[U]=-1:be[U]=1;return M}},6444:function(e,t){"use strict";t.create=o,t.equal=a;function r(n,i){var s=n+"",h=s.indexOf("."),c=0;h>=0&&(c=s.length-h-1);var m=Math.pow(10,c),p=Math.round(n*i*m),T=p+"";if(T.indexOf("e")>=0)return T;var l=p/m,_=p%m;p<0?(l=-Math.ceil(l)|0,_=-_|0):(l=Math.floor(l)|0,_=_|0);var w=""+l;if(p<0&&(w="-"+w),c){for(var A=""+_;A.length<c;)A="0"+A;return w+"."+A}else return w}function o(n,i){for(var s=[],h=0;h<3;++h){for(var c=[],m=.5*(n[0][h]+n[1][h]),p=0;p*i[h]<=n[1][h];++p)c.push({x:p*i[h],text:r(i[h],p)});for(var p=-1;p*i[h]>=n[0][h];--p)c.push({x:p*i[h],text:r(i[h],p)});s.push(c)}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 c=n[s][h],m=i[s][h];if(c.x!==m.x||c.text!==m.text||c.font!==m.font||c.fontColor!==m.fontColor||c.fontSize!==m.fontSize||c.dx!==m.dx||c.dy!==m.dy)return!1}}return!0}},6468:function(e){e.exports=function(r){return atob(r)}},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]))}},6582:function(e,t,r){var o=r(7894);e.exports=a;function a(n,i,s,h){var c,m,p,T,l,_,w,A,M,g,b=i[0],d=i[1],u=i[2],y=h[0],f=h[1],R=h[2],L=s[0],z=s[1],F=s[2];return Math.abs(b-L)<1e-6&&Math.abs(d-z)<1e-6&&Math.abs(u-F)<1e-6?o(n):(w=b-L,A=d-z,M=u-F,g=1/Math.sqrt(w*w+A*A+M*M),w*=g,A*=g,M*=g,c=f*M-R*A,m=R*w-y*M,p=y*A-f*w,g=Math.sqrt(c*c+m*m+p*p),g?(g=1/g,c*=g,m*=g,p*=g):(c=0,m=0,p=0),T=A*p-M*m,l=M*c-w*p,_=w*m-A*c,g=Math.sqrt(T*T+l*l+_*_),g?(g=1/g,T*=g,l*=g,_*=g):(T=0,l=0,_=0),n[0]=c,n[1]=T,n[2]=w,n[3]=0,n[4]=m,n[5]=l,n[6]=A,n[7]=0,n[8]=p,n[9]=_,n[10]=M,n[11]=0,n[12]=-(c*b+m*d+p*u),n[13]=-(T*b+l*d+_*u),n[14]=-(w*b+A*d+M*u),n[15]=1,n)}},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}},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}},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}},6729:function(e,t,r){"use strict";var o=r(3642),a=r(395);e.exports=n;function n(c){var m,p,T,l,_,w,A,M,u,g,b;if(c||(c={}),M=(c.nshades||72)-1,A=c.format||"hex",w=c.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(c.alpha)?c.alpha.length!==2?g=[1,1]:g=c.alpha.slice():typeof c.alpha=="number"?g=[c.alpha,c.alpha]:g=[1,1],m=_.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 d=_.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<m.length-1;++b){l=m[b+1]-m[b],p=d[b],T=d[b+1];for(var y=0;y<l;y++){var f=y/l;u.push([Math.round(a(p[0],T[0],f)),Math.round(a(p[1],T[1],f)),Math.round(a(p[2],T[2],f)),a(p[3],T[3],f)])}}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(c){return[c[0]/255,c[1]/255,c[2]/255,c[3]]}function s(c){for(var m,p="#",T=0;T<3;++T)m=c[T],m=m.toString(16),p+=("00"+m).substr(m.length);return p}function h(c){return"rgba("+c.join(",")+")"}},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"}]}},6743:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],c=n+n,m=i+i,p=s+s,T=n*c,l=n*m,_=n*p,w=i*m,A=i*p,M=s*p,g=h*c,b=h*m,d=h*p;return r[0]=1-(w+M),r[1]=l+d,r[2]=_-b,r[3]=0,r[4]=l-d,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}},6760:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],c=o[4],m=o[5],p=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],d=o[15],u=a[0],y=a[1],f=a[2],R=a[3];return r[0]=u*n+y*c+f*l+R*M,r[1]=u*i+y*m+f*_+R*g,r[2]=u*s+y*p+f*w+R*b,r[3]=u*h+y*T+f*A+R*d,u=a[4],y=a[5],f=a[6],R=a[7],r[4]=u*n+y*c+f*l+R*M,r[5]=u*i+y*m+f*_+R*g,r[6]=u*s+y*p+f*w+R*b,r[7]=u*h+y*T+f*A+R*d,u=a[8],y=a[9],f=a[10],R=a[11],r[8]=u*n+y*c+f*l+R*M,r[9]=u*i+y*m+f*_+R*g,r[10]=u*s+y*p+f*w+R*b,r[11]=u*h+y*T+f*A+R*d,u=a[12],y=a[13],f=a[14],R=a[15],r[12]=u*n+y*c+f*l+R*M,r[13]=u*i+y*m+f*_+R*g,r[14]=u*s+y*p+f*w+R*b,r[15]=u*h+y*T+f*A+R*d,r}},6768:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return new o(n)}},6803:function(e,t,r){"use strict";var o,a=r(8828),n=r(1755);function i(y){for(var f=0,R=Math.max,L=0,z=y.length;L<z;++L)f=R(f,y[L].length);return f-1}o=i;function s(y){for(var f=-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)f=R(f,F[N]);return f+1}o=s;function h(y){for(var f=new Array(y.length),R=0,L=y.length;R<L;++R)f[R]=y[R].slice(0);return f}o=h;function c(y,f){var R=y.length,L=y.length-f.length,z=Math.min;if(L)return L;switch(R){case 0:return 0;case 1:return y[0]-f[0];case 2:var U=y[0]+y[1]-f[0]-f[1];return U||z(y[0],y[1])-z(f[0],f[1]);case 3:var F=y[0]+y[1],N=f[0]+f[1];if(U=F+y[2]-(N+f[2]),U)return U;var O=z(y[0],y[1]),P=z(f[0],f[1]),U=z(O,y[2])-z(P,f[2]);return U||z(O+y[2],F)-z(P+f[2],N);default:var B=y.slice(0);B.sort();var X=f.slice(0);X.sort();for(var $=0;$<R;++$)if(L=B[$]-X[$],L)return L;return 0}}t.Fw=c;function m(y,f){return c(y[0],f[0])}function p(y,f){if(f){for(var R=y.length,L=new Array(R),z=0;z<R;++z)L[z]=[y[z],f[z]];L.sort(m);for(var z=0;z<R;++z)y[z]=L[z][0],f[z]=L[z][1];return y}else return y.sort(c),y}o=p;function T(y){if(y.length===0)return[];for(var f=1,R=y.length,L=1;L<R;++L){var z=y[L];if(c(z,y[L-1])){if(L===f){f++;continue}y[f++]=z}}return y.length=f,y}o=T;function l(y,f){for(var R=0,L=y.length-1,z=-1;R<=L;){var F=R+L>>1,N=c(y[F],f);N<=0?(N===0&&(z=F),R=F+1):N>0&&(L=F-1)}return z}o=l;function _(y,f){for(var R=new Array(y.length),L=0,z=R.length;L<z;++L)R[L]=[];for(var F=[],L=0,N=f.length;L<N;++L)for(var O=f[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 se=l(y,F);if(!(se<0))for(;R[se++].push(L),!(se>=y.length||c(y[se],F)!==0););}return R}o=_;function w(y,f){if(!f)return _(T(M(y,0)),y,0);for(var R=new Array(f),L=0;L<f;++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 f=[],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]);f.push(P)}return p(f)}o=A;function M(y,f){if(f<0)return[];for(var R=[],L=(1<<f+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(f+1),P=0,U=0;U<F.length;++U)N&1<<U&&(O[P++]=F[U]);R.push(O)}return p(R)}o=M;function g(y){for(var f=[],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]);f.push(O)}return p(f)}o=g;function b(y,f){for(var R=new n(f),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 d(y){for(var f=T(p(M(y,0))),R=new n(f.length),L=0;L<y.length;++L)for(var z=y[L],F=0;F<z.length;++F)for(var N=l(f,[z[F]]),O=F+1;O<z.length;++O)R.link(N,l(f,[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(f,[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,f){return f?b(y,f):d(y)}o=u},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)}},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}},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"]},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 $,se,le=0;if(B==="be")for(X=P.length-1,$=0;X>=0;X-=3)se=P[X]|P[X-1]<<8|P[X-2]<<16,this.words[$]|=se<<le&67108863,this.words[$+1]=se>>>26-le&67108863,le+=24,le>=26&&(le-=26,$++);else if(B==="le")for(X=0,$=0;X<P.length;X+=3)se=P[X]|P[X+1]<<8|P[X+2]<<16,this.words[$]|=se<<le&67108863,this.words[$+1]=se>>>26-le&67108863,le+=24,le>=26&&(le-=26,$++);return this.strip()};function c(O,P){var U=O.charCodeAt(P);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function m(O,P,U){var B=c(O,U);return U-1>=P&&(B|=c(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,se=0,le;if(B==="be")for(X=P.length-1;X>=U;X-=2)le=m(P,U,X)<<$,this.words[se]|=le&67108863,$>=18?($-=18,se+=1,this.words[se]|=le>>>26):$+=8;else{var fe=P.length-U;for(X=fe%2===0?U+1:U;X<P.length;X+=2)le=m(P,U,X)<<$,this.words[se]|=le&67108863,$>=18?($-=18,se+=1,this.words[se]|=le>>>26):$+=8}this.strip()};function p(O,P,U,B){for(var X=0,$=Math.min(O.length,U),se=P;se<$;se++){var le=O.charCodeAt(se)-48;X*=B,le>=49?X+=le-49+10:le>=17?X+=le-17+10:X+=le}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 se=P.length-B,le=se%X,fe=Math.min(se,se-le)+B,V=0,Y=B;Y<fe;Y+=X)V=p(P,Y,Y+X,U),this.imuln($),this.words[0]+V<67108864?this.words[0]+=V:this._iaddn(V);if(le!==0){var ee=1;for(V=p(P,Y,P.length,U),Y=0;Y<le;Y++)ee*=U;this.imuln(ee),this.words[0]+V<67108864?this.words[0]+=V:this._iaddn(V)}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,se=0;se<this.length;se++){var le=this.words[se],fe=((le<<X|$)&16777215).toString(16);$=le>>>24-X&16777215,$!==0||se!==this.length-1?B=T[6-fe.length]+fe+B:B=fe+B,X+=2,X>=26&&(X-=26,se--)}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 V=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[V-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 se=U==="le",le=new P($),fe,V,Y=this.clone();if(se){for(V=0;!Y.isZero();V++)fe=Y.andln(255),Y.iushrn(8),le[V]=fe;for(;V<$;V++)le[V]=0}else{for(V=0;V<$-X;V++)le[V]=0;for(V=0;!Y.isZero();V++)fe=Y.andln(255),Y.iushrn(8),le[$-V-1]=fe}return le},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,se=0;se<X.length;se++)U=(B.words[se]|0)+(X.words[se]|0)+$,this.words[se]=U&67108863,$=U>>>26;for(;$!==0&&se<B.length;se++)U=(B.words[se]|0)+$,this.words[se]=U&67108863,$=U>>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;se<B.length;se++)this.words[se]=B.words[se];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 se=0,le=0;le<$.length;le++)U=(X.words[le]|0)-($.words[le]|0)+se,se=U>>26,this.words[le]=U&67108863;for(;se!==0&&le<X.length;le++)U=(X.words[le]|0)+se,se=U>>26,this.words[le]=U&67108863;if(se===0&&le<X.length&&X!==this)for(;le<X.length;le++)this.words[le]=X.words[le];return this.length=Math.max(this.length,le),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,se=X*$,le=se&67108863,fe=se/67108864|0;U.words[0]=le;for(var V=1;V<B;V++){for(var Y=fe>>>26,ee=fe&67108863,q=Math.min(V,P.length-1),oe=Math.max(0,V-O.length+1);oe<=q;oe++){var ae=V-oe|0;X=O.words[ae]|0,$=P.words[oe]|0,se=X*$+ee,Y+=se/67108864|0,ee=se&67108863}U.words[V]=ee|0,fe=Y|0}return fe!==0?U.words[V]=fe|0:U.length--,U.strip()}var M=function(P,U,B){var X=P.words,$=U.words,se=B.words,le=0,fe,V,Y,ee=X[0]|0,q=ee&8191,oe=ee>>>13,ae=X[1]|0,j=ae&8191,Q=ae>>>13,re=X[2]|0,ce=re&8191,be=re>>>13,Ae=X[3]|0,De=Ae&8191,ze=Ae>>>13,Ze=X[4]|0,at=Ze&8191,nt=Ze>>>13,rt=X[5]|0,st=rt&8191,Me=rt>>>13,ye=X[6]|0,he=ye&8191,Oe=ye>>>13,tt=X[7]|0,ot=tt&8191,Qe=tt>>>13,Pt=X[8]|0,It=Pt&8191,qt=Pt>>>13,Wt=X[9]|0,kr=Wt&8191,mr=Wt>>>13,qr=$[0]|0,Sr=qr&8191,Rr=qr>>>13,wt=$[1]|0,Ne=wt&8191,Ke=wt>>>13,Te=$[2]|0,Ie=Te&8191,Ve=Te>>>13,Ce=$[3]|0,Ee=Ce&8191,Pe=Ce>>>13,ft=$[4]|0,ct=ft&8191,_t=ft>>>13,Ct=$[5]|0,ir=Ct&8191,rr=Ct>>>13,er=$[6]|0,Lr=er&8191,fa=er>>>13,Da=$[7]|0,Ia=Da&8191,qa=Da>>>13,Wa=$[8]|0,Ca=Wa&8191,hi=Wa>>>13,wi=$[9]|0,Kt=wi&8191,Ft=wi>>>13;B.negative=P.negative^U.negative,B.length=19,fe=Math.imul(q,Sr),V=Math.imul(q,Rr),V=V+Math.imul(oe,Sr)|0,Y=Math.imul(oe,Rr);var Yt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,fe=Math.imul(j,Sr),V=Math.imul(j,Rr),V=V+Math.imul(Q,Sr)|0,Y=Math.imul(Q,Rr),fe=fe+Math.imul(q,Ne)|0,V=V+Math.imul(q,Ke)|0,V=V+Math.imul(oe,Ne)|0,Y=Y+Math.imul(oe,Ke)|0;var Jt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,fe=Math.imul(ce,Sr),V=Math.imul(ce,Rr),V=V+Math.imul(be,Sr)|0,Y=Math.imul(be,Rr),fe=fe+Math.imul(j,Ne)|0,V=V+Math.imul(j,Ke)|0,V=V+Math.imul(Q,Ne)|0,Y=Y+Math.imul(Q,Ke)|0,fe=fe+Math.imul(q,Ie)|0,V=V+Math.imul(q,Ve)|0,V=V+Math.imul(oe,Ie)|0,Y=Y+Math.imul(oe,Ve)|0;var Fr=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,fe=Math.imul(De,Sr),V=Math.imul(De,Rr),V=V+Math.imul(ze,Sr)|0,Y=Math.imul(ze,Rr),fe=fe+Math.imul(ce,Ne)|0,V=V+Math.imul(ce,Ke)|0,V=V+Math.imul(be,Ne)|0,Y=Y+Math.imul(be,Ke)|0,fe=fe+Math.imul(j,Ie)|0,V=V+Math.imul(j,Ve)|0,V=V+Math.imul(Q,Ie)|0,Y=Y+Math.imul(Q,Ve)|0,fe=fe+Math.imul(q,Ee)|0,V=V+Math.imul(q,Pe)|0,V=V+Math.imul(oe,Ee)|0,Y=Y+Math.imul(oe,Pe)|0;var ta=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ta>>>26)|0,ta&=67108863,fe=Math.imul(at,Sr),V=Math.imul(at,Rr),V=V+Math.imul(nt,Sr)|0,Y=Math.imul(nt,Rr),fe=fe+Math.imul(De,Ne)|0,V=V+Math.imul(De,Ke)|0,V=V+Math.imul(ze,Ne)|0,Y=Y+Math.imul(ze,Ke)|0,fe=fe+Math.imul(ce,Ie)|0,V=V+Math.imul(ce,Ve)|0,V=V+Math.imul(be,Ie)|0,Y=Y+Math.imul(be,Ve)|0,fe=fe+Math.imul(j,Ee)|0,V=V+Math.imul(j,Pe)|0,V=V+Math.imul(Q,Ee)|0,Y=Y+Math.imul(Q,Pe)|0,fe=fe+Math.imul(q,ct)|0,V=V+Math.imul(q,_t)|0,V=V+Math.imul(oe,ct)|0,Y=Y+Math.imul(oe,_t)|0;var ra=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ra>>>26)|0,ra&=67108863,fe=Math.imul(st,Sr),V=Math.imul(st,Rr),V=V+Math.imul(Me,Sr)|0,Y=Math.imul(Me,Rr),fe=fe+Math.imul(at,Ne)|0,V=V+Math.imul(at,Ke)|0,V=V+Math.imul(nt,Ne)|0,Y=Y+Math.imul(nt,Ke)|0,fe=fe+Math.imul(De,Ie)|0,V=V+Math.imul(De,Ve)|0,V=V+Math.imul(ze,Ie)|0,Y=Y+Math.imul(ze,Ve)|0,fe=fe+Math.imul(ce,Ee)|0,V=V+Math.imul(ce,Pe)|0,V=V+Math.imul(be,Ee)|0,Y=Y+Math.imul(be,Pe)|0,fe=fe+Math.imul(j,ct)|0,V=V+Math.imul(j,_t)|0,V=V+Math.imul(Q,ct)|0,Y=Y+Math.imul(Q,_t)|0,fe=fe+Math.imul(q,ir)|0,V=V+Math.imul(q,rr)|0,V=V+Math.imul(oe,ir)|0,Y=Y+Math.imul(oe,rr)|0;var ca=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ca>>>26)|0,ca&=67108863,fe=Math.imul(he,Sr),V=Math.imul(he,Rr),V=V+Math.imul(Oe,Sr)|0,Y=Math.imul(Oe,Rr),fe=fe+Math.imul(st,Ne)|0,V=V+Math.imul(st,Ke)|0,V=V+Math.imul(Me,Ne)|0,Y=Y+Math.imul(Me,Ke)|0,fe=fe+Math.imul(at,Ie)|0,V=V+Math.imul(at,Ve)|0,V=V+Math.imul(nt,Ie)|0,Y=Y+Math.imul(nt,Ve)|0,fe=fe+Math.imul(De,Ee)|0,V=V+Math.imul(De,Pe)|0,V=V+Math.imul(ze,Ee)|0,Y=Y+Math.imul(ze,Pe)|0,fe=fe+Math.imul(ce,ct)|0,V=V+Math.imul(ce,_t)|0,V=V+Math.imul(be,ct)|0,Y=Y+Math.imul(be,_t)|0,fe=fe+Math.imul(j,ir)|0,V=V+Math.imul(j,rr)|0,V=V+Math.imul(Q,ir)|0,Y=Y+Math.imul(Q,rr)|0,fe=fe+Math.imul(q,Lr)|0,V=V+Math.imul(q,fa)|0,V=V+Math.imul(oe,Lr)|0,Y=Y+Math.imul(oe,fa)|0;var Ba=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,fe=Math.imul(ot,Sr),V=Math.imul(ot,Rr),V=V+Math.imul(Qe,Sr)|0,Y=Math.imul(Qe,Rr),fe=fe+Math.imul(he,Ne)|0,V=V+Math.imul(he,Ke)|0,V=V+Math.imul(Oe,Ne)|0,Y=Y+Math.imul(Oe,Ke)|0,fe=fe+Math.imul(st,Ie)|0,V=V+Math.imul(st,Ve)|0,V=V+Math.imul(Me,Ie)|0,Y=Y+Math.imul(Me,Ve)|0,fe=fe+Math.imul(at,Ee)|0,V=V+Math.imul(at,Pe)|0,V=V+Math.imul(nt,Ee)|0,Y=Y+Math.imul(nt,Pe)|0,fe=fe+Math.imul(De,ct)|0,V=V+Math.imul(De,_t)|0,V=V+Math.imul(ze,ct)|0,Y=Y+Math.imul(ze,_t)|0,fe=fe+Math.imul(ce,ir)|0,V=V+Math.imul(ce,rr)|0,V=V+Math.imul(be,ir)|0,Y=Y+Math.imul(be,rr)|0,fe=fe+Math.imul(j,Lr)|0,V=V+Math.imul(j,fa)|0,V=V+Math.imul(Q,Lr)|0,Y=Y+Math.imul(Q,fa)|0,fe=fe+Math.imul(q,Ia)|0,V=V+Math.imul(q,qa)|0,V=V+Math.imul(oe,Ia)|0,Y=Y+Math.imul(oe,qa)|0;var $a=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+($a>>>26)|0,$a&=67108863,fe=Math.imul(It,Sr),V=Math.imul(It,Rr),V=V+Math.imul(qt,Sr)|0,Y=Math.imul(qt,Rr),fe=fe+Math.imul(ot,Ne)|0,V=V+Math.imul(ot,Ke)|0,V=V+Math.imul(Qe,Ne)|0,Y=Y+Math.imul(Qe,Ke)|0,fe=fe+Math.imul(he,Ie)|0,V=V+Math.imul(he,Ve)|0,V=V+Math.imul(Oe,Ie)|0,Y=Y+Math.imul(Oe,Ve)|0,fe=fe+Math.imul(st,Ee)|0,V=V+Math.imul(st,Pe)|0,V=V+Math.imul(Me,Ee)|0,Y=Y+Math.imul(Me,Pe)|0,fe=fe+Math.imul(at,ct)|0,V=V+Math.imul(at,_t)|0,V=V+Math.imul(nt,ct)|0,Y=Y+Math.imul(nt,_t)|0,fe=fe+Math.imul(De,ir)|0,V=V+Math.imul(De,rr)|0,V=V+Math.imul(ze,ir)|0,Y=Y+Math.imul(ze,rr)|0,fe=fe+Math.imul(ce,Lr)|0,V=V+Math.imul(ce,fa)|0,V=V+Math.imul(be,Lr)|0,Y=Y+Math.imul(be,fa)|0,fe=fe+Math.imul(j,Ia)|0,V=V+Math.imul(j,qa)|0,V=V+Math.imul(Q,Ia)|0,Y=Y+Math.imul(Q,qa)|0,fe=fe+Math.imul(q,Ca)|0,V=V+Math.imul(q,hi)|0,V=V+Math.imul(oe,Ca)|0,Y=Y+Math.imul(oe,hi)|0;var Za=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Za>>>26)|0,Za&=67108863,fe=Math.imul(kr,Sr),V=Math.imul(kr,Rr),V=V+Math.imul(mr,Sr)|0,Y=Math.imul(mr,Rr),fe=fe+Math.imul(It,Ne)|0,V=V+Math.imul(It,Ke)|0,V=V+Math.imul(qt,Ne)|0,Y=Y+Math.imul(qt,Ke)|0,fe=fe+Math.imul(ot,Ie)|0,V=V+Math.imul(ot,Ve)|0,V=V+Math.imul(Qe,Ie)|0,Y=Y+Math.imul(Qe,Ve)|0,fe=fe+Math.imul(he,Ee)|0,V=V+Math.imul(he,Pe)|0,V=V+Math.imul(Oe,Ee)|0,Y=Y+Math.imul(Oe,Pe)|0,fe=fe+Math.imul(st,ct)|0,V=V+Math.imul(st,_t)|0,V=V+Math.imul(Me,ct)|0,Y=Y+Math.imul(Me,_t)|0,fe=fe+Math.imul(at,ir)|0,V=V+Math.imul(at,rr)|0,V=V+Math.imul(nt,ir)|0,Y=Y+Math.imul(nt,rr)|0,fe=fe+Math.imul(De,Lr)|0,V=V+Math.imul(De,fa)|0,V=V+Math.imul(ze,Lr)|0,Y=Y+Math.imul(ze,fa)|0,fe=fe+Math.imul(ce,Ia)|0,V=V+Math.imul(ce,qa)|0,V=V+Math.imul(be,Ia)|0,Y=Y+Math.imul(be,qa)|0,fe=fe+Math.imul(j,Ca)|0,V=V+Math.imul(j,hi)|0,V=V+Math.imul(Q,Ca)|0,Y=Y+Math.imul(Q,hi)|0,fe=fe+Math.imul(q,Kt)|0,V=V+Math.imul(q,Ft)|0,V=V+Math.imul(oe,Kt)|0,Y=Y+Math.imul(oe,Ft)|0;var ri=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ri>>>26)|0,ri&=67108863,fe=Math.imul(kr,Ne),V=Math.imul(kr,Ke),V=V+Math.imul(mr,Ne)|0,Y=Math.imul(mr,Ke),fe=fe+Math.imul(It,Ie)|0,V=V+Math.imul(It,Ve)|0,V=V+Math.imul(qt,Ie)|0,Y=Y+Math.imul(qt,Ve)|0,fe=fe+Math.imul(ot,Ee)|0,V=V+Math.imul(ot,Pe)|0,V=V+Math.imul(Qe,Ee)|0,Y=Y+Math.imul(Qe,Pe)|0,fe=fe+Math.imul(he,ct)|0,V=V+Math.imul(he,_t)|0,V=V+Math.imul(Oe,ct)|0,Y=Y+Math.imul(Oe,_t)|0,fe=fe+Math.imul(st,ir)|0,V=V+Math.imul(st,rr)|0,V=V+Math.imul(Me,ir)|0,Y=Y+Math.imul(Me,rr)|0,fe=fe+Math.imul(at,Lr)|0,V=V+Math.imul(at,fa)|0,V=V+Math.imul(nt,Lr)|0,Y=Y+Math.imul(nt,fa)|0,fe=fe+Math.imul(De,Ia)|0,V=V+Math.imul(De,qa)|0,V=V+Math.imul(ze,Ia)|0,Y=Y+Math.imul(ze,qa)|0,fe=fe+Math.imul(ce,Ca)|0,V=V+Math.imul(ce,hi)|0,V=V+Math.imul(be,Ca)|0,Y=Y+Math.imul(be,hi)|0,fe=fe+Math.imul(j,Kt)|0,V=V+Math.imul(j,Ft)|0,V=V+Math.imul(Q,Kt)|0,Y=Y+Math.imul(Q,Ft)|0;var pi=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(pi>>>26)|0,pi&=67108863,fe=Math.imul(kr,Ie),V=Math.imul(kr,Ve),V=V+Math.imul(mr,Ie)|0,Y=Math.imul(mr,Ve),fe=fe+Math.imul(It,Ee)|0,V=V+Math.imul(It,Pe)|0,V=V+Math.imul(qt,Ee)|0,Y=Y+Math.imul(qt,Pe)|0,fe=fe+Math.imul(ot,ct)|0,V=V+Math.imul(ot,_t)|0,V=V+Math.imul(Qe,ct)|0,Y=Y+Math.imul(Qe,_t)|0,fe=fe+Math.imul(he,ir)|0,V=V+Math.imul(he,rr)|0,V=V+Math.imul(Oe,ir)|0,Y=Y+Math.imul(Oe,rr)|0,fe=fe+Math.imul(st,Lr)|0,V=V+Math.imul(st,fa)|0,V=V+Math.imul(Me,Lr)|0,Y=Y+Math.imul(Me,fa)|0,fe=fe+Math.imul(at,Ia)|0,V=V+Math.imul(at,qa)|0,V=V+Math.imul(nt,Ia)|0,Y=Y+Math.imul(nt,qa)|0,fe=fe+Math.imul(De,Ca)|0,V=V+Math.imul(De,hi)|0,V=V+Math.imul(ze,Ca)|0,Y=Y+Math.imul(ze,hi)|0,fe=fe+Math.imul(ce,Kt)|0,V=V+Math.imul(ce,Ft)|0,V=V+Math.imul(be,Kt)|0,Y=Y+Math.imul(be,Ft)|0;var Ra=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,fe=Math.imul(kr,Ee),V=Math.imul(kr,Pe),V=V+Math.imul(mr,Ee)|0,Y=Math.imul(mr,Pe),fe=fe+Math.imul(It,ct)|0,V=V+Math.imul(It,_t)|0,V=V+Math.imul(qt,ct)|0,Y=Y+Math.imul(qt,_t)|0,fe=fe+Math.imul(ot,ir)|0,V=V+Math.imul(ot,rr)|0,V=V+Math.imul(Qe,ir)|0,Y=Y+Math.imul(Qe,rr)|0,fe=fe+Math.imul(he,Lr)|0,V=V+Math.imul(he,fa)|0,V=V+Math.imul(Oe,Lr)|0,Y=Y+Math.imul(Oe,fa)|0,fe=fe+Math.imul(st,Ia)|0,V=V+Math.imul(st,qa)|0,V=V+Math.imul(Me,Ia)|0,Y=Y+Math.imul(Me,qa)|0,fe=fe+Math.imul(at,Ca)|0,V=V+Math.imul(at,hi)|0,V=V+Math.imul(nt,Ca)|0,Y=Y+Math.imul(nt,hi)|0,fe=fe+Math.imul(De,Kt)|0,V=V+Math.imul(De,Ft)|0,V=V+Math.imul(ze,Kt)|0,Y=Y+Math.imul(ze,Ft)|0;var tn=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(tn>>>26)|0,tn&=67108863,fe=Math.imul(kr,ct),V=Math.imul(kr,_t),V=V+Math.imul(mr,ct)|0,Y=Math.imul(mr,_t),fe=fe+Math.imul(It,ir)|0,V=V+Math.imul(It,rr)|0,V=V+Math.imul(qt,ir)|0,Y=Y+Math.imul(qt,rr)|0,fe=fe+Math.imul(ot,Lr)|0,V=V+Math.imul(ot,fa)|0,V=V+Math.imul(Qe,Lr)|0,Y=Y+Math.imul(Qe,fa)|0,fe=fe+Math.imul(he,Ia)|0,V=V+Math.imul(he,qa)|0,V=V+Math.imul(Oe,Ia)|0,Y=Y+Math.imul(Oe,qa)|0,fe=fe+Math.imul(st,Ca)|0,V=V+Math.imul(st,hi)|0,V=V+Math.imul(Me,Ca)|0,Y=Y+Math.imul(Me,hi)|0,fe=fe+Math.imul(at,Kt)|0,V=V+Math.imul(at,Ft)|0,V=V+Math.imul(nt,Kt)|0,Y=Y+Math.imul(nt,Ft)|0;var on=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(on>>>26)|0,on&=67108863,fe=Math.imul(kr,ir),V=Math.imul(kr,rr),V=V+Math.imul(mr,ir)|0,Y=Math.imul(mr,rr),fe=fe+Math.imul(It,Lr)|0,V=V+Math.imul(It,fa)|0,V=V+Math.imul(qt,Lr)|0,Y=Y+Math.imul(qt,fa)|0,fe=fe+Math.imul(ot,Ia)|0,V=V+Math.imul(ot,qa)|0,V=V+Math.imul(Qe,Ia)|0,Y=Y+Math.imul(Qe,qa)|0,fe=fe+Math.imul(he,Ca)|0,V=V+Math.imul(he,hi)|0,V=V+Math.imul(Oe,Ca)|0,Y=Y+Math.imul(Oe,hi)|0,fe=fe+Math.imul(st,Kt)|0,V=V+Math.imul(st,Ft)|0,V=V+Math.imul(Me,Kt)|0,Y=Y+Math.imul(Me,Ft)|0;var hn=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,fe=Math.imul(kr,Lr),V=Math.imul(kr,fa),V=V+Math.imul(mr,Lr)|0,Y=Math.imul(mr,fa),fe=fe+Math.imul(It,Ia)|0,V=V+Math.imul(It,qa)|0,V=V+Math.imul(qt,Ia)|0,Y=Y+Math.imul(qt,qa)|0,fe=fe+Math.imul(ot,Ca)|0,V=V+Math.imul(ot,hi)|0,V=V+Math.imul(Qe,Ca)|0,Y=Y+Math.imul(Qe,hi)|0,fe=fe+Math.imul(he,Kt)|0,V=V+Math.imul(he,Ft)|0,V=V+Math.imul(Oe,Kt)|0,Y=Y+Math.imul(Oe,Ft)|0;var Tt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,fe=Math.imul(kr,Ia),V=Math.imul(kr,qa),V=V+Math.imul(mr,Ia)|0,Y=Math.imul(mr,qa),fe=fe+Math.imul(It,Ca)|0,V=V+Math.imul(It,hi)|0,V=V+Math.imul(qt,Ca)|0,Y=Y+Math.imul(qt,hi)|0,fe=fe+Math.imul(ot,Kt)|0,V=V+Math.imul(ot,Ft)|0,V=V+Math.imul(Qe,Kt)|0,Y=Y+Math.imul(Qe,Ft)|0;var ut=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ut>>>26)|0,ut&=67108863,fe=Math.imul(kr,Ca),V=Math.imul(kr,hi),V=V+Math.imul(mr,Ca)|0,Y=Math.imul(mr,hi),fe=fe+Math.imul(It,Kt)|0,V=V+Math.imul(It,Ft)|0,V=V+Math.imul(qt,Kt)|0,Y=Y+Math.imul(qt,Ft)|0;var Br=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Br>>>26)|0,Br&=67108863,fe=Math.imul(kr,Kt),V=Math.imul(kr,Ft),V=V+Math.imul(mr,Kt)|0,Y=Math.imul(mr,Ft);var Cr=(le+fe|0)+((V&8191)<<13)|0;return le=(Y+(V>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,se[0]=Yt,se[1]=Jt,se[2]=Fr,se[3]=ta,se[4]=ra,se[5]=ca,se[6]=Ba,se[7]=$a,se[8]=Za,se[9]=ri,se[10]=pi,se[11]=Ra,se[12]=tn,se[13]=on,se[14]=hn,se[15]=Tt,se[16]=ut,se[17]=Br,se[18]=Cr,le!==0&&(se[19]=le,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 se=X;X=0;for(var le=B&67108863,fe=Math.min($,P.length-1),V=Math.max(0,$-O.length+1);V<=fe;V++){var Y=$-V,ee=O.words[Y]|0,q=P.words[V]|0,oe=ee*q,ae=oe&67108863;se=se+(oe/67108864|0)|0,ae=ae+le|0,le=ae&67108863,se=se+(ae>>>26)|0,X+=se>>>26,se&=67108863}U.words[$]=le,B=se,se=X}return B!==0?U.words[$]=B:U.length--,U.strip()}function b(O,P,U){var B=new d;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 d(O,P){this.x=O,this.y=P}d.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},d.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},d.prototype.permute=function(P,U,B,X,$,se){for(var le=0;le<se;le++)X[le]=U[P[le]],$[le]=B[P[le]]},d.prototype.transform=function(P,U,B,X,$,se){this.permute(se,P,U,B,X,$);for(var le=1;le<$;le<<=1)for(var fe=le<<1,V=Math.cos(2*Math.PI/fe),Y=Math.sin(2*Math.PI/fe),ee=0;ee<$;ee+=fe)for(var q=V,oe=Y,ae=0;ae<le;ae++){var j=B[ee+ae],Q=X[ee+ae],re=B[ee+ae+le],ce=X[ee+ae+le],be=q*re-oe*ce;ce=q*ce+oe*re,re=be,B[ee+ae]=j+re,X[ee+ae]=Q+ce,B[ee+ae+le]=j-re,X[ee+ae+le]=Q-ce,ae!==fe&&(be=V*q-Y*oe,oe=V*oe+Y*q,q=be)}},d.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},d.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]=-$}},d.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},d.prototype.convert13b=function(P,U,B,X){for(var $=0,se=0;se<U;se++)$=$+(P[se]|0),B[2*se]=$&8191,$=$>>>13,B[2*se+1]=$&8191,$=$>>>13;for(se=2*U;se<X;++se)B[se]=0;n($===0),n(($&-8192)===0)},d.prototype.stub=function(P){for(var U=new Array(P),B=0;B<P;B++)U[B]=0;return U},d.prototype.mulp=function(P,U,B){var X=2*this.guessLen13b(P.length,U.length),$=this.makeRBT(X),se=this.stub(X),le=new Array(X),fe=new Array(X),V=new Array(X),Y=new Array(X),ee=new Array(X),q=new Array(X),oe=B.words;oe.length=X,this.convert13b(P.words,P.length,le,X),this.convert13b(U.words,U.length,Y,X),this.transform(le,se,fe,V,X,$),this.transform(Y,se,ee,q,X,$);for(var ae=0;ae<X;ae++){var j=fe[ae]*ee[ae]-V[ae]*q[ae];V[ae]=fe[ae]*q[ae]+V[ae]*ee[ae],fe[ae]=j}return this.conjugate(fe,V,X),this.transform(fe,V,oe,se,X,$),this.conjugate(oe,se,X),this.normalize13b(oe,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},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 se=0;for($=0;$<this.length;$++){var le=this.words[$]&X,fe=(this.words[$]|0)-le<<U;this.words[$]=fe|se,se=le>>>26-U}se&&(this.words[$]=se,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,se=Math.min((P-$)/26,this.length),le=67108863^67108863>>>$<<$,fe=B;if(X-=se,X=Math.max(0,X),fe){for(var V=0;V<se;V++)fe.words[V]=this.words[V];fe.length=se}if(se!==0)if(this.length>se)for(this.length-=se,V=0;V<this.length;V++)this.words[V]=this.words[V+se];else this.words[0]=0,this.length=1;var Y=0;for(V=this.length-1;V>=0&&(Y!==0||V>=X);V--){var ee=this.words[V]|0;this.words[V]=Y<<26-$|ee>>>$,Y=ee&le}return fe&&Y!==0&&(fe.words[fe.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.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 se,le=0;for($=0;$<P.length;$++){se=(this.words[$+B]|0)+le;var fe=(P.words[$]|0)*U;se-=fe&67108863,le=(se>>26)-(fe/67108864|0),this.words[$+B]=se&67108863}for(;$<this.length-B;$++)se=(this.words[$+B]|0)+le,le=se>>26,this.words[$+B]=se&67108863;if(le===0)return this.strip();for(n(le===-1),le=0,$=0;$<this.length;$++)se=-(this.words[$]|0)+le,le=se>>26,this.words[$]=se&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,U){var B=this.length-P.length,X=this.clone(),$=P,se=$.words[$.length-1]|0,le=this._countBits(se);B=26-le,B!==0&&($=$.ushln(B),X.iushln(B),se=$.words[$.length-1]|0);var fe=X.length-$.length,V;if(U!=="mod"){V=new s(null),V.length=fe+1,V.words=new Array(V.length);for(var Y=0;Y<V.length;Y++)V.words[Y]=0}var ee=X.clone()._ishlnsubmul($,1,fe);ee.negative===0&&(X=ee,V&&(V.words[fe]=1));for(var q=fe-1;q>=0;q--){var oe=(X.words[$.length+q]|0)*67108864+(X.words[$.length+q-1]|0);for(oe=Math.min(oe/se|0,67108863),X._ishlnsubmul($,oe,q);X.negative!==0;)oe--,X.negative=0,X._ishlnsubmul($,1,q),X.isZero()||(X.negative^=1);V&&(V.words[q]=oe)}return V&&V.strip(),X.strip(),U!=="div"&&B!==0&&X.iushrn(B),{div:V||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,$,se;return this.negative!==0&&P.negative===0?(se=this.neg().divmod(P,U),U!=="mod"&&(X=se.div.neg()),U!=="div"&&($=se.mod.neg(),B&&$.negative!==0&&$.iadd(P)),{div:X,mod:$}):this.negative===0&&P.negative!==0?(se=this.divmod(P.neg(),U),U!=="mod"&&(X=se.div.neg()),{div:X,mod:se.mod}):this.negative&P.negative?(se=this.neg().divmod(P.neg(),U),U!=="div"&&($=se.mod.neg(),B&&$.negative!==0&&$.isub(P)),{div:se.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),se=B.cmp(X);return se<0||$===1&&se===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),se=new s(0),le=new s(1),fe=0;U.isEven()&&B.isEven();)U.iushrn(1),B.iushrn(1),++fe;for(var V=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(V),$.isub(Y)),X.iushrn(1),$.iushrn(1);for(var oe=0,ae=1;!(B.words[0]&ae)&&oe<26;++oe,ae<<=1);if(oe>0)for(B.iushrn(oe);oe-- >0;)(se.isOdd()||le.isOdd())&&(se.iadd(V),le.isub(Y)),se.iushrn(1),le.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub(se),$.isub(le)):(B.isub(U),se.isub(X),le.isub($))}return{a:se,b:le,gcd:B.iushln(fe)}},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),se=B.clone();U.cmpn(1)>0&&B.cmpn(1)>0;){for(var le=0,fe=1;!(U.words[0]&fe)&&le<26;++le,fe<<=1);if(le>0)for(U.iushrn(le);le-- >0;)X.isOdd()&&X.iadd(se),X.iushrn(1);for(var V=0,Y=1;!(B.words[0]&Y)&&V<26;++V,Y<<=1);if(V>0)for(B.iushrn(V);V-- >0;)$.isOdd()&&$.iadd(se),$.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 se=U;U=B,B=se}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,se=B;$!==0&&se<this.length;se++){var le=this.words[se]|0;le+=$,$=le>>>26,le&=67108863,this.words[se]=le}return $!==0&&(this.words[se]=$,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 f(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(f,y),f.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 se=P.words[9];for(U.words[U.length++]=se&B,$=10;$<P.length;$++){var le=P.words[$]|0;P.words[$-10]=(le&B)<<4|se>>>22,se=le}se>>>=22,P.words[$-10]=se,se===0&&P.length>10?P.length-=10:P.length-=9},f.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 f;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 se=new s(1).toRed(this),le=se.redNeg(),fe=this.m.subn(1).iushrn(1),V=this.m.bitLength();for(V=new s(2*V*V).toRed(this);this.pow(V,fe).cmp(le)!==0;)V.redIAdd(le);for(var Y=this.pow(V,X),ee=this.pow(P,X.addn(1).iushrn(1)),q=this.pow(P,X),oe=$;q.cmp(se)!==0;){for(var ae=q,j=0;ae.cmp(se)!==0;j++)ae=ae.redSqr();n(j<oe);var Q=this.pow(Y,new s(1).iushln(oe-j-1));ee=ee.redMul(Q),Y=Q.redSqr(),q=q.redMul(Y),oe=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 se=X[0],le=0,fe=0,V=U.bitLength()%26;for(V===0&&(V=26),$=U.length-1;$>=0;$--){for(var Y=U.words[$],ee=V-1;ee>=0;ee--){var q=Y>>ee&1;if(se!==X[0]&&(se=this.sqr(se)),q===0&&le===0){fe=0;continue}le<<=1,le|=q,fe++,!(fe!==B&&($!==0||ee!==0))&&(se=this.mul(se,X[le]),fe=0,le=0)}V=26}return se},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),se=$;return $.cmp(this.m)>=0?se=$.isub(this.m):$.cmpn(0)<0&&(se=$.iadd(this.m)),se._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),se=$;return $.cmp(this.m)>=0?se=$.isub(this.m):$.cmpn(0)<0&&(se=$.iadd(this.m)),se._forceRed(this)},N.prototype.invm=function(P){var U=this.imod(P._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(e,this)},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}},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}},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,d=0,u=_.length;d<u;++d){var y=_[d];if(!i(w,y)){for(var f=0;f<2*w;++f)A[g++]=y[f];M[b++]=d}}return b}function h(_,w,A,M){var g=_.length,b=w.length;if(!(g<=0||b<=0)){var d=_[0].length>>>1;if(!(d<=0)){var u,y=o.mallocDouble(2*d*g),f=o.mallocInt32(g);if(g=s(_,d,y,f),g>0){if(d===1&&M)a.init(g),u=a.sweepComplete(d,A,0,g,y,f,0,g,y,f);else{var R=o.mallocDouble(2*d*b),L=o.mallocInt32(b);b=s(w,d,R,L),b>0&&(a.init(g+b),d===1?u=a.sweepBipartite(d,A,0,g,y,f,0,b,R,L):u=n(d,A,M,g,y,f,b,R,L),o.free(R),o.free(L))}o.free(y),o.free(f)}return u}}}var c;function m(_,w){c.push([_,w])}function p(_){return c=[],h(_,_,m,!0),c}function T(_,w){return c=[],h(_,w,m,!1),c}function l(_,w,A){switch(arguments.length){case 1:return p(_);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")}}},6894:function(e){e.exports=t;function t(r,o,a,n){var i=a[1],s=a[2],h=o[1]-i,c=o[2]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=o[0],r[1]=i+h*p-c*m,r[2]=s+h*m+c*p,r}},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 c=a-s,m=h-c;m&&(r[--n]=a,a=m)}for(var p=0,i=n;i<o;++i){var s=r[i],h=a;a=s+h;var c=a-s,m=h-c;m&&(r[p++]=m)}return r[p++]=a,r.length=p,r}},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)}},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],c=o[2],m=o[3],p=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+p*n,r[1]=h*i+T*n,r[2]=c*i+l*n,r[3]=m*i+_*n,r[4]=p*i-s*n,r[5]=T*i-h*n,r[6]=l*i-c*n,r[7]=_*i-m*n,r}},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),c=r(3545),m=r(8105),p=128,T=1<<22,l=1<<22,_=m("!(lo>=p0)&&!(p1>=hi)"),w=m("lo===p0"),A=m("lo<p0"),M=m("hi<=p0"),g=m("lo<=p0&&p0<=hi"),b=m("lo<p0&&p0<=hi"),d=6,u=2,y=1024,f=o.mallocInt32(y),R=o.mallocDouble(y);function L(P,U){var B=8*a.log2(U+1)*(P+1)|0,X=a.nextPow2(d*B);f.length<X&&(o.free(f),f=o.mallocInt32(X));var $=a.nextPow2(u*B);R.length<$&&(o.free(R),R=o.mallocDouble($))}function z(P,U,B,X,$,se,le,fe,V){var Y=d*P;f[Y]=U,f[Y+1]=B,f[Y+2]=X,f[Y+3]=$,f[Y+4]=se,f[Y+5]=le;var ee=u*P;R[ee]=fe,R[ee+1]=V}function F(P,U,B,X,$,se,le,fe,V,Y,ee){var q=2*P,oe=V*q,ae=Y[oe+U];e:for(var j=$,Q=$*q;j<se;++j,Q+=q){var re=le[Q+U],ce=le[Q+U+P];if(!(ae<re||ce<ae)&&!(X&&ae===re)){for(var be=fe[j],Ae=U+1;Ae<P;++Ae){var re=le[Q+Ae],ce=le[Q+Ae+P],De=Y[oe+Ae],ze=Y[oe+Ae+P];if(ce<De||ze<re)continue e}var Ze;if(X?Ze=B(ee,be):Ze=B(be,ee),Ze!==void 0)return Ze}}}function N(P,U,B,X,$,se,le,fe,V,Y){var ee=2*P,q=fe*ee,oe=V[q+U];e:for(var ae=X,j=X*ee;ae<$;++ae,j+=ee){var Q=le[ae];if(Q!==Y){var re=se[j+U],ce=se[j+U+P];if(!(oe<re||ce<oe)){for(var be=U+1;be<P;++be){var re=se[j+be],ce=se[j+be+P],Ae=V[q+be],De=V[q+be+P];if(ce<Ae||De<re)continue e}var ze=B(Q,Y);if(ze!==void 0)return ze}}}}function O(P,U,B,X,$,se,le,fe,V){L(P,X+le);var Y=0,ee=2*P,q;for(z(Y++,0,0,X,0,le,B?16:0,-1/0,1/0),B||z(Y++,0,0,le,0,X,1,-1/0,1/0);Y>0;){Y-=1;var oe=Y*d,ae=f[oe],j=f[oe+1],Q=f[oe+2],re=f[oe+3],ce=f[oe+4],be=f[oe+5],Ae=Y*u,De=R[Ae],ze=R[Ae+1],Ze=be&1,at=!!(be&16),nt=$,rt=se,st=fe,Me=V;if(Ze&&(nt=fe,rt=V,st=$,Me=se),!(be&2&&(Q=A(P,ae,j,Q,nt,rt,ze),j>=Q))&&!(be&4&&(j=M(P,ae,j,Q,nt,rt,De),j>=Q))){var ye=Q-j,he=ce-re;if(at){if(P*ye*(ye+he)<l){if(q=h.scanComplete(P,ae,U,j,Q,nt,rt,re,ce,st,Me),q!==void 0)return q;continue}}else if(P*Math.min(ye,he)<p){if(q=i(P,ae,U,Ze,j,Q,nt,rt,re,ce,st,Me),q!==void 0)return q;continue}else if(P*ye*he<T){if(q=h.scanBipartite(P,ae,U,Ze,j,Q,nt,rt,re,ce,st,Me),q!==void 0)return q;continue}var Oe=_(P,ae,j,Q,nt,rt,De,ze);if(j<Oe)if(P*(Oe-j)<p){if(q=s(P,ae+1,U,j,Oe,nt,rt,re,ce,st,Me),q!==void 0)return q}else if(ae===P-2){if(Ze?q=h.sweepBipartite(P,U,re,ce,st,Me,j,Oe,nt,rt):q=h.sweepBipartite(P,U,j,Oe,nt,rt,re,ce,st,Me),q!==void 0)return q}else z(Y++,ae+1,j,Oe,re,ce,Ze,-1/0,1/0),z(Y++,ae+1,re,ce,j,Oe,Ze^1,-1/0,1/0);if(Oe<Q){var tt=c(P,ae,re,ce,st,Me),ot=st[ee*tt+ae],Qe=w(P,ae,tt,ce,st,Me,ot);if(Qe<ce&&z(Y++,ae,Oe,Q,Qe,ce,(Ze|4)+(at?16:0),ot,ze),re<tt&&z(Y++,ae,Oe,Q,re,tt,(Ze|2)+(at?16:0),De,ot),tt+1===Qe){if(at?q=N(P,ae,U,Oe,Q,nt,rt,tt,st,Me[tt]):q=F(P,ae,U,Ze,Oe,Q,nt,rt,tt,st,Me[tt]),q!==void 0)return q}else if(tt<Qe){var Pt;if(at){if(Pt=g(P,ae,Oe,Q,nt,rt,ot),Oe<Pt){var It=w(P,ae,Oe,Pt,nt,rt,ot);if(ae===P-2){if(Oe<It&&(q=h.sweepComplete(P,U,Oe,It,nt,rt,tt,Qe,st,Me),q!==void 0)||It<Pt&&(q=h.sweepBipartite(P,U,It,Pt,nt,rt,tt,Qe,st,Me),q!==void 0))return q}else Oe<It&&z(Y++,ae+1,Oe,It,tt,Qe,16,-1/0,1/0),It<Pt&&(z(Y++,ae+1,It,Pt,tt,Qe,0,-1/0,1/0),z(Y++,ae+1,tt,Qe,It,Pt,1,-1/0,1/0))}}else Ze?Pt=b(P,ae,Oe,Q,nt,rt,ot):Pt=g(P,ae,Oe,Q,nt,rt,ot),Oe<Pt&&(ae===P-2?Ze?q=h.sweepBipartite(P,U,tt,Qe,st,Me,Oe,Pt,nt,rt):q=h.sweepBipartite(P,U,Oe,Pt,nt,rt,tt,Qe,st,Me):(z(Y++,ae+1,Oe,Pt,tt,Qe,Ze,-1/0,1/0),z(Y++,ae+1,tt,Qe,Oe,Pt,Ze^1,-1/0,1/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))}},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 c=i.get(h),m=c&&(c._triangleBuffer.handle||c._triangleBuffer.buffer);if(!m||!h.isBuffer(m)){var p=a(h,new Float32Array([-1,-1,-1,4,4,-1]));c=n(h,[{buffer:p,type:h.FLOAT,size:2}]),c._triangleBuffer=p,i.set(h,c)}c.bind(),h.drawArrays(h.TRIANGLES,0,3),c.unbind()}e.exports=s},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,c,m,p,T){return o.identity(s),o.fromRotationTranslation(s,T,h),s[3]=p[0],s[7]=p[1],s[11]=p[2],s[15]=p[3],o.identity(n),m[2]!==0&&(n[9]=m[2],o.multiply(s,s,n)),m[1]!==0&&(n[9]=0,n[8]=m[1],o.multiply(s,s,n)),m[0]!==0&&(n[8]=0,n[4]=m[0],o.multiply(s,s,n)),o.scale(s,s,c),s}},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),c=r(8406),m=r(6760),p=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,d=A.pointShader,u=A.pickShader,y=A.pointPickShader,f=A.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(fe,V,Y,ee,q,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze,at,nt,rt,st,Me,ye,he,Oe,tt,ot,Qe){this.gl=fe,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=V,this.dirty=!0,this.triShader=Y,this.lineShader=ee,this.pointShader=q,this.pickShader=oe,this.pointPickShader=ae,this.contourShader=j,this.trianglePositions=Q,this.triangleColors=ce,this.triangleNormals=Ae,this.triangleUVs=be,this.triangleIds=re,this.triangleVAO=De,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ze,this.edgeColors=at,this.edgeUVs=nt,this.edgeIds=Ze,this.edgeVAO=rt,this.edgeCount=0,this.pointPositions=st,this.pointColors=ye,this.pointUVs=he,this.pointSizes=Oe,this.pointIds=Me,this.pointVAO=tt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=Qe,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(fe){this.pickId=fe};function F(fe,V){if(!V||!V.length)return 1;for(var Y=0;Y<V.length;++Y){if(V.length<2)return 1;if(V[Y][0]===fe)return V[Y][1];if(V[Y][0]>fe&&Y>0){var ee=(V[Y][0]-fe)/(V[Y][0]-V[Y-1][0]);return V[Y][1]*(1-ee)+ee*V[Y-1][1]}}return 1}function N(fe,V){for(var Y=l({colormap:fe,nshades:256,format:"rgba"}),ee=new Uint8Array(256*4),q=0;q<256;++q){for(var oe=Y[q],ae=0;ae<3;++ae)ee[4*q+ae]=oe[ae];V?ee[4*q+3]=255*F(q/255,V):ee[4*q+3]=255*oe[3]}return T(ee,[256,256,4],[4,0,1])}function O(fe){for(var V=fe.length,Y=new Array(V),ee=0;ee<V;++ee)Y[ee]=fe[ee][2];return Y}z.highlight=function(fe){if(!fe||!this.contourEnable){this.contourCount=0;return}for(var V=_(this.cells,this.intensity,fe.intensity),Y=V.cells,ee=V.vertexIds,q=V.vertexWeights,oe=Y.length,ae=w.mallocFloat32(2*3*oe),j=0,Q=0;Q<oe;++Q)for(var re=Y[Q],ce=0;ce<2;++ce){var be=re[0];re.length===2&&(be=re[ce]);for(var Ae=ee[be][0],De=ee[be][1],ze=q[be],Ze=1-ze,at=this.positions[Ae],nt=this.positions[De],rt=0;rt<3;++rt)ae[j++]=ze*at[rt]+Ze*nt[rt]}this.contourCount=j/3|0,this.contourPositions.update(ae.subarray(0,j)),w.free(ae)},z.update=function(fe){fe=fe||{};var V=this.gl;this.dirty=!0,"contourEnable"in fe&&(this.contourEnable=fe.contourEnable),"contourColor"in fe&&(this.contourColor=fe.contourColor),"lineWidth"in fe&&(this.lineWidth=fe.lineWidth),"lightPosition"in fe&&(this.lightPosition=fe.lightPosition),this.hasAlpha=!1,"opacity"in fe&&(this.opacity=fe.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in fe&&(this.opacityscale=fe.opacityscale,this.hasAlpha=!0),"ambient"in fe&&(this.ambientLight=fe.ambient),"diffuse"in fe&&(this.diffuseLight=fe.diffuse),"specular"in fe&&(this.specularLight=fe.specular),"roughness"in fe&&(this.roughness=fe.roughness),"fresnel"in fe&&(this.fresnel=fe.fresnel),fe.texture?(this.texture.dispose(),this.texture=h(V,fe.texture)):fe.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=V.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=V.LINEAR,this.texture.setPixels(N(fe.colormap,this.opacityscale)),this.texture.generateMipmap());var Y=fe.cells,ee=fe.positions;if(!(!ee||!Y)){var q=[],oe=[],ae=[],j=[],Q=[],re=[],ce=[],be=[],Ae=[],De=[],ze=[],Ze=[],at=[],nt=[];this.cells=Y,this.positions=ee;var rt=fe.vertexNormals,st=fe.cellNormals,Me=fe.vertexNormalsEpsilon===void 0?o:fe.vertexNormalsEpsilon,ye=fe.faceNormalsEpsilon===void 0?a:fe.faceNormalsEpsilon;fe.useFacetNormals&&!st&&(st=c.faceNormals(Y,ee,ye)),!st&&!rt&&(rt=c.vertexNormals(Y,ee,Me));var he=fe.vertexColors,Oe=fe.cellColors,tt=fe.meshColor||[1,1,1,1],ot=fe.vertexUVs,Qe=fe.vertexIntensity,Pt=fe.cellUVs,It=fe.cellIntensity,qt=1/0,Wt=-1/0;if(!ot&&!Pt)if(Qe)if(fe.vertexIntensityBounds)qt=+fe.vertexIntensityBounds[0],Wt=+fe.vertexIntensityBounds[1];else for(var kr=0;kr<Qe.length;++kr){var mr=Qe[kr];qt=Math.min(qt,mr),Wt=Math.max(Wt,mr)}else if(It)if(fe.cellIntensityBounds)qt=+fe.cellIntensityBounds[0],Wt=+fe.cellIntensityBounds[1];else for(var kr=0;kr<It.length;++kr){var mr=It[kr];qt=Math.min(qt,mr),Wt=Math.max(Wt,mr)}else for(var kr=0;kr<ee.length;++kr){var mr=ee[kr][2];qt=Math.min(qt,mr),Wt=Math.max(Wt,mr)}Qe?this.intensity=Qe:It?this.intensity=It:this.intensity=O(ee),this.pickVertex=!(It||Oe);var qr=fe.pointSizes,Sr=fe.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var kr=0;kr<ee.length;++kr)for(var Rr=ee[kr],wt=0;wt<3;++wt)isNaN(Rr[wt])||!isFinite(Rr[wt])||(this.bounds[0][wt]=Math.min(this.bounds[0][wt],Rr[wt]),this.bounds[1][wt]=Math.max(this.bounds[1][wt],Rr[wt]));var Ne=0,Ke=0,Te=0;e:for(var kr=0;kr<Y.length;++kr){var Ie=Y[kr];switch(Ie.length){case 1:for(var Ve=Ie[0],Rr=ee[Ve],wt=0;wt<3;++wt)if(isNaN(Rr[wt])||!isFinite(Rr[wt]))continue e;De.push(Rr[0],Rr[1],Rr[2]);var Ce;he?Ce=he[Ve]:Oe?Ce=Oe[kr]:Ce=tt,this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[Ve]-qt)/(Wt-qt),this.opacityscale)):Ce.length===3?ze.push(Ce[0],Ce[1],Ce[2],this.opacity):(ze.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0));var Ee;ot?Ee=ot[Ve]:Qe?Ee=[(Qe[Ve]-qt)/(Wt-qt),0]:Pt?Ee=Pt[kr]:It?Ee=[(It[kr]-qt)/(Wt-qt),0]:Ee=[(Rr[2]-qt)/(Wt-qt),0],Ze.push(Ee[0],Ee[1]),qr?at.push(qr[Ve]):at.push(Sr),nt.push(kr),Te+=1;break;case 2:for(var wt=0;wt<2;++wt)for(var Ve=Ie[wt],Rr=ee[Ve],Pe=0;Pe<3;++Pe)if(isNaN(Rr[Pe])||!isFinite(Rr[Pe]))continue e;for(var wt=0;wt<2;++wt){var Ve=Ie[wt],Rr=ee[Ve];re.push(Rr[0],Rr[1],Rr[2]);var Ce;he?Ce=he[Ve]:Oe?Ce=Oe[kr]:Ce=tt,this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[Ve]-qt)/(Wt-qt),this.opacityscale)):Ce.length===3?ce.push(Ce[0],Ce[1],Ce[2],this.opacity):(ce.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0));var Ee;ot?Ee=ot[Ve]:Qe?Ee=[(Qe[Ve]-qt)/(Wt-qt),0]:Pt?Ee=Pt[kr]:It?Ee=[(It[kr]-qt)/(Wt-qt),0]:Ee=[(Rr[2]-qt)/(Wt-qt),0],be.push(Ee[0],Ee[1]),Ae.push(kr)}Ke+=1;break;case 3:for(var wt=0;wt<3;++wt)for(var Ve=Ie[wt],Rr=ee[Ve],Pe=0;Pe<3;++Pe)if(isNaN(Rr[Pe])||!isFinite(Rr[Pe]))continue e;for(var wt=0;wt<3;++wt){var Ve=Ie[2-wt],Rr=ee[Ve];q.push(Rr[0],Rr[1],Rr[2]);var Ce;he?Ce=he[Ve]:Oe?Ce=Oe[kr]:Ce=tt,Ce?this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[Ve]-qt)/(Wt-qt),this.opacityscale)):Ce.length===3?oe.push(Ce[0],Ce[1],Ce[2],this.opacity):(oe.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0)):oe.push(.5,.5,.5,1);var Ee;ot?Ee=ot[Ve]:Qe?Ee=[(Qe[Ve]-qt)/(Wt-qt),0]:Pt?Ee=Pt[kr]:It?Ee=[(It[kr]-qt)/(Wt-qt),0]:Ee=[(Rr[2]-qt)/(Wt-qt),0],j.push(Ee[0],Ee[1]);var ft;rt?ft=rt[Ve]:ft=st[kr],ae.push(ft[0],ft[1],ft[2]),Q.push(kr)}Ne+=1;break;default:break}}this.pointCount=Te,this.edgeCount=Ke,this.triangleCount=Ne,this.pointPositions.update(De),this.pointColors.update(ze),this.pointUVs.update(Ze),this.pointSizes.update(at),this.pointIds.update(new Uint32Array(nt)),this.edgePositions.update(re),this.edgeColors.update(ce),this.edgeUVs.update(be),this.edgeIds.update(new Uint32Array(Ae)),this.trianglePositions.update(q),this.triangleColors.update(oe),this.triangleUVs.update(j),this.triangleNormals.update(ae),this.triangleIds.update(new Uint32Array(Q))}},z.drawTransparent=z.draw=function(fe){fe=fe||{};for(var V=this.gl,Y=fe.model||R,ee=fe.view||R,q=fe.projection||R,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)oe[0][ae]=Math.max(oe[0][ae],this.clipBounds[0][ae]),oe[1][ae]=Math.min(oe[1][ae],this.clipBounds[1][ae]);var j={model:Y,view:ee,projection:q,inverseModel:R.slice(),clipBounds:oe,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=p(j.inverseModel,j.model),V.disable(V.CULL_FACE),this.texture.bind(0);var Q=new Array(16);m(Q,j.view,j.model),m(Q,j.projection,Q),p(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 ce=Q[12+ae],be=0;be<3;++be)ce+=Q[4*be+ae]*this.lightPosition[be];j.lightPosition[ae]=ce/re}if(this.triangleCount>0){var Ae=this.triShader;Ae.bind(),Ae.uniforms=j,this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ae=this.lineShader;Ae.bind(),Ae.uniforms=j,this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ae=this.pointShader;Ae.bind(),Ae.uniforms=j,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ae=this.contourShader;Ae.bind(),Ae.uniforms=j,this.contourVAO.bind(),V.drawArrays(V.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(fe){fe=fe||{};for(var V=this.gl,Y=fe.model||R,ee=fe.view||R,q=fe.projection||R,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)oe[0][ae]=Math.max(oe[0][ae],this.clipBounds[0][ae]),oe[1][ae]=Math.min(oe[1][ae],this.clipBounds[1][ae]);this._model=[].slice.call(Y),this._view=[].slice.call(ee),this._projection=[].slice.call(q),this._resolution=[V.drawingBufferWidth,V.drawingBufferHeight];var j={model:Y,view:ee,projection:q,clipBounds:oe,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=j,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(fe){if(!fe||fe.id!==this.pickId)return null;for(var V=fe.value[0]+256*fe.value[1]+65536*fe.value[2],Y=this.cells[V],ee=this.positions,q=new Array(Y.length),oe=0;oe<Y.length;++oe)q[oe]=ee[Y[oe]];var ae=fe.coord[0],j=fe.coord[1];if(!this.pickVertex){var Q=this.positions[Y[0]],re=this.positions[Y[1]],ce=this.positions[Y[2]],be=[(Q[0]+re[0]+ce[0])/3,(Q[1]+re[1]+ce[1])/3,(Q[2]+re[2]+ce[2])/3];return{_cellCenter:!0,position:[ae,j],index:V,cell:Y,cellId:V,intensity:this.intensity[V],dataCoordinate:be}}var Ae=M(q,[ae*this.pixelRatio,this._resolution[1]-j*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Ae)return null;for(var De=Ae[2],ze=0,oe=0;oe<Y.length;++oe)ze+=De[oe]*this.intensity[Y[oe]];return{position:Ae[1],index:Y[Ae[0]],cell:Y,cellId:V,intensity:ze,dataCoordinate:this.positions[Y[Ae[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(fe){var V=n(fe,g.vertex,g.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V.attributes.normal.location=4,V}function U(fe){var V=n(fe,b.vertex,b.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V}function B(fe){var V=n(fe,d.vertex,d.fragment);return V.attributes.position.location=0,V.attributes.color.location=2,V.attributes.uv.location=3,V.attributes.pointSize.location=4,V}function X(fe){var V=n(fe,u.vertex,u.fragment);return V.attributes.position.location=0,V.attributes.id.location=1,V}function $(fe){var V=n(fe,y.vertex,y.fragment);return V.attributes.position.location=0,V.attributes.id.location=1,V.attributes.pointSize.location=4,V}function se(fe){var V=n(fe,f.vertex,f.fragment);return V.attributes.position.location=0,V}function le(fe,V){arguments.length===1&&(V=fe,fe=V.gl);var Y=fe.getExtension("OES_standard_derivatives")||fe.getExtension("MOZ_OES_standard_derivatives")||fe.getExtension("WEBKIT_OES_standard_derivatives");if(!Y)throw new Error("derivatives not supported");var ee=P(fe),q=U(fe),oe=B(fe),ae=X(fe),j=$(fe),Q=se(fe),re=h(fe,T(new Uint8Array([255,255,255,255]),[1,1,4]));re.generateMipmap(),re.minFilter=fe.LINEAR_MIPMAP_LINEAR,re.magFilter=fe.LINEAR;var ce=i(fe),be=i(fe),Ae=i(fe),De=i(fe),ze=i(fe),Ze=s(fe,[{buffer:ce,type:fe.FLOAT,size:3},{buffer:ze,type:fe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:be,type:fe.FLOAT,size:4},{buffer:Ae,type:fe.FLOAT,size:2},{buffer:De,type:fe.FLOAT,size:3}]),at=i(fe),nt=i(fe),rt=i(fe),st=i(fe),Me=s(fe,[{buffer:at,type:fe.FLOAT,size:3},{buffer:st,type:fe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:nt,type:fe.FLOAT,size:4},{buffer:rt,type:fe.FLOAT,size:2}]),ye=i(fe),he=i(fe),Oe=i(fe),tt=i(fe),ot=i(fe),Qe=s(fe,[{buffer:ye,type:fe.FLOAT,size:3},{buffer:ot,type:fe.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:he,type:fe.FLOAT,size:4},{buffer:Oe,type:fe.FLOAT,size:2},{buffer:tt,type:fe.FLOAT,size:1}]),Pt=i(fe),It=s(fe,[{buffer:Pt,type:fe.FLOAT,size:3}]),qt=new L(fe,re,ee,q,oe,ae,j,Q,ce,ze,be,Ae,De,Ze,at,st,nt,rt,Me,ye,ot,he,Oe,tt,Qe,Pt,It);return qt.update(V),qt}e.exports=le},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 c(A,M,g){return Math.sqrt(Math.pow(A,2)+Math.pow(M,2)+Math.pow(g,2))}function m(A){return Math.min(1,Math.max(-1,A))}function p(A){var M=Math.abs(A[0]),g=Math.abs(A[1]),b=Math.abs(A[2]),d=[0,0,0];M>Math.max(g,b)?d[2]=1:g>Math.max(M,b)?d[0]=1:d[1]=1;for(var u=0,y=0,f=0;f<3;++f)u+=A[f]*A[f],y+=d[f]*A[f];for(var f=0;f<3;++f)d[f]-=y/u*A[f];return s(d,d),d}function T(A,M,g,b,d,u,y,f){this.center=o(g),this.up=o(b),this.right=o(d),this.radius=o([u]),this.angle=o([y,f]),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,d=0,u=0;u<3;++u)d+=M[u]*g[u],b+=M[u]*M[u];for(var y=Math.sqrt(b),f=0,u=0;u<3;++u)g[u]-=M[u]*d/b,f+=g[u]*g[u],M[u]/=y;for(var R=Math.sqrt(f),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,se=P*U,le=B,fe=-O*B,V=-P*B,Y=U,ee=this.computedEye,q=this.computedMatrix,u=0;u<3;++u){var oe=$*g[u]+se*L[u]+le*M[u];q[4*u+1]=fe*g[u]+V*L[u]+Y*M[u],q[4*u+2]=oe,q[4*u+3]=0}var ae=q[1],j=q[5],Q=q[9],re=q[2],ce=q[6],be=q[10],Ae=j*be-Q*ce,De=Q*re-ae*be,ze=ae*ce-j*re,Ze=c(Ae,De,ze);Ae/=Ze,De/=Ze,ze/=Ze,q[0]=Ae,q[4]=De,q[8]=ze;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 f=0,at=0;at<3;++at)f+=q[u+4*at]*ee[at];q[12+u]=-f}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 d=this.computedMatrix;_[0]=d[2],_[1]=d[6],_[2]=d[10];for(var u=this.computedUp,y=this.computedRight,f=this.computedToward,R=0;R<3;++R)d[4*R]=u[R],d[4*R+1]=y[R],d[4*R+2]=f[R];n(d,d,b,_);for(var R=0;R<3;++R)u[R]=d[4*R],y[R]=d[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 d=this.computedMatrix,u=Math.exp(this.computedRadius[0]),y=d[1],f=d[5],R=d[9],L=c(y,f,R);y/=L,f/=L,R/=L;var z=d[0],F=d[4],N=d[8],O=z*y+F*f+N*R;z-=y*O,F-=f*O,N-=R*O;var P=c(z,F,N);z/=P,F/=P,N/=P;var U=z*M+y*g,B=F*M+f*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 d=1;typeof g=="number"&&(d=g|0),(d<0||d>3)&&(d=1);var u=(d+2)%3,y=(d+1)%3;M||(this.recalcMatrix(A),M=this.computedMatrix);var f=M[d],R=M[d+4],L=M[d+8];if(b){var F=Math.abs(f),N=Math.abs(R),O=Math.abs(L),P=Math.max(F,N,O);F===P?(f=f<0?-1:1,R=L=0):O===P?(L=L<0?-1:1,f=R=0):(R=R<0?-1:1,f=L=0)}else{var z=c(f,R,L);f/=z,R/=z,L/=z}var U=M[u],B=M[u+4],X=M[u+8],$=U*f+B*R+X*L;U-=f*$,B-=R*$,X-=L*$;var se=c(U,B,X);U/=se,B/=se,X/=se;var le=R*X-L*B,fe=L*U-f*X,V=f*B-R*U,Y=c(le,fe,V);le/=Y,fe/=Y,V/=Y,this.center.jump(A,ye,he,Oe),this.radius.idle(A),this.up.jump(A,f,R,L),this.right.jump(A,U,B,X);var ee,q;if(d===2){var oe=M[1],ae=M[5],j=M[9],Q=oe*U+ae*B+j*X,re=oe*le+ae*fe+j*V;De<0?ee=-Math.PI/2:ee=Math.PI/2,q=Math.atan2(re,Q)}else{var ce=M[2],be=M[6],Ae=M[10],De=ce*f+be*R+Ae*L,ze=ce*U+be*B+Ae*X,Ze=ce*le+be*fe+Ae*V;ee=Math.asin(m(De)),q=Math.atan2(Ze,ze)}this.angle.jump(A,q,ee),this.recalcMatrix(A);var at=M[2],nt=M[6],rt=M[10],st=this.computedMatrix;a(st,M);var Me=st[15],ye=st[12]/Me,he=st[13]/Me,Oe=st[14]/Me,tt=Math.exp(this.computedRadius[0]);this.center.jump(A,ye-at*tt,he-nt*tt,Oe-rt*tt)},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 d=b[0],u=b[1],y=b[2],f=c(d,u,y);if(!(f<1e-6)){d/=f,u/=f,y/=f;var R=M[0]-g[0],L=M[1]-g[1],z=M[2]-g[2],F=c(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=d*O+u*P+y*U;O-=B*d,P-=B*u,U-=B*y;var X=c(O,P,U);if(!(X<.01&&(O=u*z-y*L,P=y*R-d*z,U=d*L-u*R,X=c(O,P,U),X<1e-6))){O/=X,P/=X,U/=X,this.up.set(A,d,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,se=y*O-d*U,le=d*P-u*O,fe=c($,se,le);$/=fe,se/=fe,le/=fe;var V=d*R+u*L+y*z,Y=O*R+P*L+U*z,ee=$*R+se*L+le*z,q=Math.asin(m(V)),oe=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-oe),ce=Math.abs(j-oe),be=Math.abs(j-2*Math.PI-oe);re<ce&&(j+=2*Math.PI),be<ce&&(j-=2*Math.PI),this.angle.jump(this.angle.lastT(),j,Q),this.angle.set(A,oe,q)}}}};function w(A){A=A||{};var M=A.center||[0,0,0],g=A.up||[0,1,0],b=A.right||p(g),d=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 f=A.eye,R=[f[0]-M[0],f[1]-M[1],f[2]-M[2]];i(b,R,g),c(b[0],b[1],b[2])<1e-6?b=p(g):s(b,b),d=c(R[0],R[1],R[2]);var L=h(g,R)/d,z=h(b,R)/d;y=Math.acos(L),u=Math.acos(z)}return d=Math.log(d),new T(A.zoomMin,A.zoomMax,M,g,b,d,u,y)}},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(c){return a(c,n,i,null,h)},t.createPickShader=function(c){return a(c,n,s,null,h)}},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 c=s[0].length;return c===0?[]:c===1?o(s):c===2?a(s):n(s,c)}},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,c=n+n,m=i+i,p=a*h,T=n*h,l=n*c,_=i*h,w=i*c,A=i*m,M=s*h,g=s*c,b=s*m;return r[0]=1-l-A,r[1]=T+b,r[2]=_-g,r[3]=0,r[4]=T-b,r[5]=1-p-A,r[6]=w+M,r[7]=0,r[8]=_+g,r[9]=w-M,r[10]=1-p-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,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}},7442:function(e,t,r){var o=r(6658),a=r(7182),n=r(2652),i=r(9921),s=r(8648),h=T(),c=T(),m=T();e.exports=p;function p(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),d=n(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!b||!d?!1:(o(m.translate,h.translate,c.translate,g),o(m.skew,h.skew,c.skew,g),o(m.scale,h.scale,c.scale,g),o(m.perspective,h.perspective,c.perspective,g),s(m.quaternion,h.quaternion,c.quaternion,g),a(w,m.translate,m.scale,m.skew,m.perspective,m.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]}},7507:function(e,t){"use strict";t.byteLength=c,t.toByteArray=p,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 c(w){var A=h(w),M=A[0],g=A[1];return(M+g)*3/4-g}function m(w,A,M){return(A+M)*3/4-M}function p(w){var A,M=h(w),g=M[0],b=M[1],d=new a(m(w,g,b)),u=0,y=b>0?g-4:g,f;for(f=0;f<y;f+=4)A=o[w.charCodeAt(f)]<<18|o[w.charCodeAt(f+1)]<<12|o[w.charCodeAt(f+2)]<<6|o[w.charCodeAt(f+3)],d[u++]=A>>16&255,d[u++]=A>>8&255,d[u++]=A&255;return b===2&&(A=o[w.charCodeAt(f)]<<2|o[w.charCodeAt(f+1)]>>4,d[u++]=A&255),b===1&&(A=o[w.charCodeAt(f)]<<10|o[w.charCodeAt(f+1)]<<4|o[w.charCodeAt(f+2)]>>2,d[u++]=A>>8&255,d[u++]=A&255),d}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=[],d=A;d<M;d+=3)g=(w[d]<<16&16711680)+(w[d+1]<<8&65280)+(w[d+2]&255),b.push(T(g));return b.join("")}function _(w){for(var A,M=w.length,g=M%3,b=[],d=16383,u=0,y=M-g;u<y;u+=d)b.push(l(w,u,u+d>y?y:u+d));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("")}},7518:function(e,t,r){"use strict";var o=r(1433);function a(s,h,c,m,p,T){this.location=s,this.dimension=h,this.a=c,this.b=m,this.c=p,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,c){this.gl=s,this._ext=h,this.handle=c,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,c){if(this.bind(),o(this.gl,h,s),this.unbind(),this._attribs.length=0,s)for(var m=0;m<s.length;++m){var p=s[m];typeof p=="number"?this._attribs.push(new a(m,1,p)):Array.isArray(p)&&this._attribs.push(new a(m,p.length,p[0],p[1],p[2],p[3]))}this._useElements=!!h,this._elementsType=c||this.gl.UNSIGNED_SHORT},n.prototype.draw=function(s,h,c){c=c||0;var m=this.gl;this._useElements?m.drawElements(s,h,this._elementsType,c):m.drawArrays(s,c,h)};function i(s,h){return new n(s,h,h.createVertexArrayOES())}e.exports=i},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()},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}},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],c=o[5],m=o[6],p=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],d=a*c-n*h,u=a*m-i*h,y=a*p-s*h,f=n*m-i*c,R=n*p-s*c,L=i*p-s*m,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=d*U-u*P+y*O+f*N-R*F+L*z;return B?(B=1/B,r[0]=(c*U-m*P+p*O)*B,r[1]=(i*P-n*U-s*O)*B,r[2]=(M*L-g*R+b*f)*B,r[3]=(_*R-l*L-w*f)*B,r[4]=(m*N-h*U-p*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-c*N+p*z)*B,r[9]=(n*N-a*P-s*z)*B,r[10]=(A*R-M*y+b*d)*B,r[11]=(l*y-T*R-w*d)*B,r[12]=(c*F-h*O-m*z)*B,r[13]=(a*O-n*F+i*z)*B,r[14]=(M*u-A*f-g*d)*B,r[15]=(T*f-l*u+_*d)*B,r):null}},7626:function(e,t,r){"use strict";var o=r(2642),a=r(9346);e.exports=c;function n(m,p){for(var T=[0,0,0,0],l=0;l<4;++l)for(var _=0;_<4;++_)T[_]+=m[4*l+_]*p[l];return T}function i(m,p,T,l,_){for(var w=n(l,n(T,n(p,[m[0],m[1],m[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*_[0]*(1+w[0]),.5*_[1]*(1-w[1])]}function s(m,p){if(m.length===2){for(var T=0,l=0,_=0;_<2;++_)T+=Math.pow(p[_]-m[0][_],2),l+=Math.pow(p[_]-m[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(m.length===3){var w=[0,0];return a(m[0],m[1],m[2],p,w),o(m,w)}return[]}function h(m,p){for(var T=[0,0,0],l=0;l<m.length;++l)for(var _=m[l],w=p[l],A=0;A<3;++A)T[A]+=w*_[A];return T}function c(m,p,T,l,_,w){if(m.length===1)return[0,m[0].slice()];for(var A=new Array(m.length),M=0;M<m.length;++M)A[M]=i(m[M],T,l,_,w);for(var g=0,b=1/0,M=0;M<A.length;++M){for(var d=0,u=0;u<2;++u)d+=Math.pow(A[M][u]-p[u],2);d<b&&(b=d,g=M)}for(var y=s(A,p),f=0,M=0;M<3;++M){if(y[M]<-.001||y[M]>1.0001)return null;f+=y[M]}return Math.abs(f-1)>.001?null:[g,h(m,y),y]}},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}},7640:function(e,t,r){"use strict";var o=r(1888);function a(p){switch(p){case"uint32":return[o.mallocUint32,o.freeUint32];default:return null}}var n={"uint32,1,0":function(p,T){return function(_,w,A,M,g,b,d,u,y,f,R){var L,z,F,N=_*g+M,O,P=p(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+=f,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(p,T){var l=a(T),_=[T,p].join(","),w=n[_];return l?w(l[0],l[1]):w()}var s={"uint32,1,0":function(p,T,l){return function _(w,A,M,g,b,d,u,y,f,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,se=U,le=N,fe=w+1,V=A-1,Y=!0,ee,q,oe,ae,j,Q,re,ce,be,Ae=0,De=0,ze=0,Ze,at,nt,rt,st,Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt,Wt,kr=y,mr=T(kr),qr=T(kr);at=b*B,nt=b*X,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=B,B=X,X=q;break e}if(ze<0)break e;Wt+=R}at=b*se,nt=b*le,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=se,se=le,le=q;break e}if(ze<0)break e;Wt+=R}at=b*B,nt=b*$,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=B,B=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*$,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=X,X=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*B,nt=b*se,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=B,B=se,se=q;break e}if(ze<0)break e;Wt+=R}at=b*$,nt=b*se,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=$,$=se,se=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*le,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=X,X=le,le=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*$,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=X,X=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*se,nt=b*le,Wt=g;e:for(Ze=0;Ze<y;++Ze){if(re=at+Wt,ce=nt+Wt,ze=M[re]-M[ce],ze>0){q=se,se=le,le=q;break e}if(ze<0)break e;Wt+=R}for(at=b*B,nt=b*X,rt=b*$,st=b*se,Me=b*le,ye=b*F,he=b*O,Oe=b*N,qt=0,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,be=rt+Wt,tt=st+Wt,ot=Me+Wt,Qe=ye+Wt,Pt=he+Wt,It=Oe+Wt,mr[qt]=M[ce],qr[qt]=M[tt],Y=Y&&mr[qt]===qr[qt],oe=M[re],ae=M[be],j=M[ot],M[Qe]=oe,M[Pt]=ae,M[It]=j,++qt,Wt+=f;for(at=b*P,nt=b*w,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,M[re]=M[ce],Wt+=f;for(at=b*U,nt=b*A,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,M[re]=M[ce],Wt+=f;if(Y)for(Q=fe;Q<=V;++Q){re=g+Q*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-mr[qt],ze!==0)break e;qt+=L,re+=R}if(ze!==0)if(ze<0){if(Q!==fe)for(at=b*Q,nt=b*fe,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;++fe}else for(;;){re=g+V*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-mr[qt],ze!==0)break e;qt+=L,re+=R}if(ze>0)V--;else if(ze<0){for(at=b*Q,nt=b*fe,rt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,be=rt+Wt,ee=M[re],M[re]=M[ce],M[ce]=M[be],M[be]=ee,Wt+=f;++fe,--V;break}else{for(at=b*Q,nt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;--V;break}}}else for(Q=fe;Q<=V;++Q){re=g+Q*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(Ae=M[re]-mr[qt],Ae!==0)break e;qt+=L,re+=R}if(Ae<0){if(Q!==fe)for(at=b*Q,nt=b*fe,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;++fe}else{re=g+Q*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(De=M[re]-qr[qt],De!==0)break e;qt+=L,re+=R}if(De>0)for(;;){re=g+V*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-qr[qt],ze!==0)break e;qt+=L,re+=R}if(ze>0){if(--V<Q)break;continue}else{re=g+V*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-mr[qt],ze!==0)break e;qt+=L,re+=R}if(ze<0){for(at=b*Q,nt=b*fe,rt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,be=rt+Wt,ee=M[re],M[re]=M[ce],M[ce]=M[be],M[be]=ee,Wt+=f;++fe,--V}else{for(at=b*Q,nt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;--V}break}}}}for(at=b*w,nt=b*(fe-1),qt=0,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,M[re]=M[ce],M[ce]=mr[qt],++qt,Wt+=f;for(at=b*A,nt=b*(V+1),qt=0,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,M[re]=M[ce],M[ce]=qr[qt],++qt,Wt+=f;if(fe-2-w<=32?p(w,fe-2,M,g,b,d,u,y,f,R,L):_(w,fe-2,M,g,b,d,u,y,f,R,L),A-(V+2)<=32?p(V+2,A,M,g,b,d,u,y,f,R,L):_(V+2,A,M,g,b,d,u,y,f,R,L),Y){l(mr),l(qr);return}if(fe<F&&V>N){e:for(;;){for(re=g+fe*b,qt=0,Wt=g,Ze=0;Ze<y;++Ze){if(M[re]!==mr[qt])break e;++qt,re+=f}++fe}e:for(;;){for(re=g+V*b,qt=0,Wt=g,Ze=0;Ze<y;++Ze){if(M[re]!==qr[qt])break e;++qt,re+=f}--V}for(Q=fe;Q<=V;++Q){re=g+Q*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(Ae=M[re]-mr[qt],Ae!==0)break e;qt+=L,re+=R}if(Ae===0){if(Q!==fe)for(at=b*Q,nt=b*fe,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;++fe}else{re=g+Q*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(De=M[re]-qr[qt],De!==0)break e;qt+=L,re+=R}if(De===0)for(;;){re=g+V*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-qr[qt],ze!==0)break e;qt+=L,re+=R}if(ze===0){if(--V<Q)break;continue}else{re=g+V*b,qt=0;e:for(Ze=0;Ze<y;++Ze){if(ze=M[re]-mr[qt],ze!==0)break e;qt+=L,re+=R}if(ze<0){for(at=b*Q,nt=b*fe,rt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,be=rt+Wt,ee=M[re],M[re]=M[ce],M[ce]=M[be],M[be]=ee,Wt+=f;++fe,--V}else{for(at=b*Q,nt=b*V,Wt=g,Ze=0;Ze<y;++Ze)re=at+Wt,ce=nt+Wt,ee=M[re],M[re]=M[ce],M[ce]=ee,Wt+=f;--V}break}}}}}l(mr),l(qr),V-fe<=32?p(fe,V,M,g,b,d,u,y,f,R,L):_(fe,V,M,g,b,d,u,y,f,R,L)}}};function h(p,T,l){var _=a(T),w=[T,p].join(","),A=s[w];return p.length>1&&_?A(l,_[0],_[1]):A(l)}var c={"uint32,1,0":function(p,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,d=M[1]|0,u=A[1]|0,y=d,f=d,R=1;b<=32?p(0,b-1,_,w,g,d,b,u,y,f,R):T(0,b-1,_,w,g,d,b,u,y,f,R)}}};function m(p,T){var l=[T,p].join(","),_=c[l],w=i(p,T),A=h(p,T,w);return _(w,A)}e.exports=m},7642:function(e,t,r){"use strict";var o=r(8954),a=r(1682);e.exports=h;function n(c,m){this.point=c,this.index=m}function i(c,m){for(var p=c.point,T=m.point,l=p.length,_=0;_<l;++_){var w=T[_]-p[_];if(w)return w}return 0}function s(c,m,p){if(c===1)return p?[[-1,0]]:[];var T=m.map(function(M,g){return[M[0],g]});T.sort(function(M,g){return M[0]-g[0]});for(var l=new Array(c-1),_=1;_<c;++_){var w=T[_-1],A=T[_];l[_-1]=[w[1],A[1]]}return p&&l.push([-1,l[0][1]],[l[c-1][1],-1]),l}function h(c,m){var p=c.length;if(p===0)return[];var T=c[0].length;if(T<1)return[];if(T===1)return s(p,c,m);for(var l=new Array(p),_=1,w=0;w<p;++w){for(var A=c[w],M=new Array(T+1),g=0,b=0;b<T;++b){var d=A[b];M[b]=d,g+=d*d}M[T]=g,l[w]=new n(M,w),_=Math.max(g,_)}a(l,i),p=l.length;for(var u=new Array(p+T+1),y=new Array(p+T+1),f=(T+1)*(T+1)*_,R=new Array(T+1),w=0;w<=T;++w)R[w]=0;R[T]=f,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<p;++w){var L=l[w];u[w+T+1]=L.point,y[w+T+1]=L.index}var z=o(u,!1);if(m?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}},7656:function(e){e.exports=t;function t(r,o,a){var n=a[0],i=a[1],s=a[2],h,c,m,p,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],c=o[1],m=o[2],p=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]=c,r[2]=m,r[3]=p,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]=c*n+l*i+M*s+o[13],r[14]=m*n+_*i+g*s+o[14],r[15]=p*n+w*i+b*s+o[15]),r}},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),c="b",m="b|",p="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,se=0,le=-X;se>-1&&(se=N.indexOf(P,se),!(se===-1||(le=N.indexOf(U,se+B),le===-1)||le<=se));){for(var fe=se;fe<le+X;++fe)if(fe<se+B||fe>=le)O[fe]=null,N=N.substr(0,fe)+" "+N.substr(fe+1);else if(O[fe]!==null){var V=O[fe].indexOf(F[0]);V===-1?O[fe]+=F:$&&(O[fe]=O[fe].substr(0,V+1)+(1+parseInt(O[fe][V+1]))+O[fe].substr(V+2))}var Y=se+B,ee=N.substr(Y,le-Y),q=ee.indexOf(P);q!==-1?se=q:se=le+X}return O}function d(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 se=z[$],le=0;le<2;++le)U[le]=Math.min(U[le],se[le])|0,B[le]=Math.max(B[le],se[le])|0;var fe=0;switch(O){case"center":fe=-.5*(U[0]+B[0]);break;case"right":case"end":fe=-B[0];break;case"left":case"start":fe=-U[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+O+"'")}var V=0;switch(P){case"hanging":case"top":V=-U[1];break;case"middle":V=-.5*(U[1]+B[1]);break;case"alphabetic":case"ideographic":V=-3*N;break;case"bottom":V=-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]+fe),Y*(ee[1]+V)]})}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(c,m,N,X)),U.italics===!0&&(X=b(p,T,N,X)),U.superscripts===!0&&(X=b(l,w,N,X)),U.subscripts===!0&&(X=b(A,g,N,X));var $=[],se="";for(j=0;j<N.length;++j)X[j]!==null&&(se+=N[j],$.push(X[j]));var le=se.split(`
`),fe=le.length,V=Math.round(P*O),Y=O,ee=O*2,q=0,oe=fe*V+ee;z.height<oe&&(z.height=oe),F.fillStyle="#000",F.fillRect(0,0,z.width,z.height),F.fillStyle="#fff";var ae,j,Q,re,ce,be=0,Ae="";function De(){if(Ae!==""){var he=F.measureText(Ae).width;F.fillText(Ae,Y+Q,ee+re),Q+=he}}function ze(){return""+Math.round(ce)+"px "}function Ze(he,Oe){var tt=""+F.font;if(U.subscripts===!0){var ot=he.indexOf(M),Qe=Oe.indexOf(M),Pt=ot>-1?parseInt(he[1+ot]):0,It=Qe>-1?parseInt(Oe[1+Qe]):0;Pt!==It&&(tt=tt.replace(ze(),"?px "),ce*=Math.pow(.75,It-Pt),tt=tt.replace("?px ",ze())),re+=.25*V*(It-Pt)}if(U.superscripts===!0){var qt=he.indexOf(_),Wt=Oe.indexOf(_),kr=qt>-1?parseInt(he[1+qt]):0,mr=Wt>-1?parseInt(Oe[1+Wt]):0;kr!==mr&&(tt=tt.replace(ze(),"?px "),ce*=Math.pow(.75,mr-kr),tt=tt.replace("?px ",ze())),re-=.25*V*(mr-kr)}if(U.bolds===!0){var qr=he.indexOf(m)>-1,Sr=Oe.indexOf(m)>-1;!qr&&Sr&&(Rr?tt=tt.replace("italic ","italic bold "):tt="bold "+tt),qr&&!Sr&&(tt=tt.replace("bold ",""))}if(U.italics===!0){var Rr=he.indexOf(T)>-1,wt=Oe.indexOf(T)>-1;!Rr&&wt&&(tt="italic "+tt),Rr&&!wt&&(tt=tt.replace("italic ",""))}F.font=tt}for(ae=0;ae<fe;++ae){var at=le[ae]+`
`;for(Q=0,re=ae*V,ce=O,Ae="",j=0;j<at.length;++j){var nt=j+be<$.length?$[j+be]:$[$.length-1];B===nt?Ae+=at[j]:(De(),Ae=at[j],nt!==void 0&&(Ze(B,nt),B=nt))}De(),be+=at.length;var rt=Math.round(Q+2*Y)|0;q<rt&&(q=rt)}var st=q,Me=ee+V*fe,ye=a(F.getImageData(0,0,st,Me).data,[Me,st,4]);return ye.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 f(z,F,N,O){var P=y(z,O),U=d(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),se=new Array($.length),le=0;le<$.length;++le){for(var fe=$[le],V=new Array(fe.length),Y=0;Y<fe.length;++Y){for(var ee=fe[Y],q=new Array(ee.length),oe=0;oe<ee.length;++oe)q[oe]=U[ee[oe]].slice();X&&q.reverse(),V[Y]=q}se[le]=V}return se}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 f(z,F,N,!0)}catch{}try{return f(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)}},7721:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){return o(n[0])*o(n[1])}},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 c(_,w){for(var A=_.length,M=w*(w+1)/2*A|0,g=a.mallocUint32(M*2),b=0,d=0;d<A;++d)for(var u=_[d],w=u.length,y=0;y<w;++y)for(var f=0;f<y;++f){var R=u[f],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,d=2;d<b;d+=2)g[d-2]===g[d]&&g[d-1]===g[d+1]||(g[F++]=g[d],g[F++]=g[d+1]);return o(g,[F/2|0,2])}function m(_,w,A,M){for(var g=_.data,b=_.shape[0],d=a.mallocDouble(b),u=0,y=0;y<b;++y){var f=g[2*y],R=g[2*y+1];if(A[f]!==A[R]){var L=w[f],z=w[R];g[2*u]=f,g[2*u+1]=R,d[u++]=(z-M)/(z-L)}}return _.shape[0]=u,o(d,[u])}function p(_,w){var A=a.mallocInt32(w*2),M=_.shape[0],g=_.data;A[0]=0;for(var b=0,d=0;d<M;++d){var u=g[2*d];if(u!==b){for(A[2*b+1]=d;++b<u;)A[2*b]=d,A[2*b+1]=d;A[2*b]=d}}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),d=c(_,M),u=m(d,w,b,+A),y=p(d,w.length|0),f=i(M)(_,d.data,y,b),R=T(d),L=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(d.data),a.free(u.data),a.free(y),{cells:f,vertexIds:R,vertexWeights:L}}},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 c(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 m(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 p=function(y,f){a.muls(y,f,255)};function T(y,f,R){var L=y.gl,z=L.getParameter(L.MAX_TEXTURE_SIZE);if(f<0||f>z||R<0||R>z)throw new Error("gl-texture2d: Invalid texture size");return y._shape=[f,R],y.bind(),L.texImage2D(L.TEXTURE_2D,0,y.format,f,R,0,y.format,y.type,null),y._mipLevels=[0],y}function l(y,f,R,L,z,F){this.gl=y,this.handle=f,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 f=this.gl;if(this.type===f.FLOAT&&i.indexOf(y)>=0&&(f.getExtension("OES_texture_float_linear")||(y=f.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,y),this._minFilter=y}},magFilter:{get:function(){return this._magFilter},set:function(y){this.bind();var f=this.gl;if(this.type===f.FLOAT&&i.indexOf(y)>=0&&(f.getExtension("OES_texture_float_linear")||(y=f.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,y),this._magFilter=y}},mipSamples:{get:function(){return this._anisoSamples},set:function(y){var f=this._anisoSamples;if(this._anisoSamples=Math.max(y,1)|0,f!==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 f=0;f<2;++f)if(h.indexOf(y[f])<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 f=this.gl;return y!==void 0&&f.activeTexture(f.TEXTURE0+(y|0)),f.bindTexture(f.TEXTURE_2D,this.handle),y!==void 0?y|0:f.getParameter(f.ACTIVE_TEXTURE)-f.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]),f=0;y>0;++f,y>>>=1)this._mipLevels.indexOf(f)<0&&this._mipLevels.push(f)},_.setPixels=function(y,f,R,L){var z=this.gl;this.bind(),Array.isArray(f)?(L=R,R=f[1]|0,f=f[0]|0):(f=f||0,R=R||0),L=L||0;var F=m(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,f,R,this.format,this.type,F)}else if(y.shape&&y.stride&&y.data){if(y.shape.length<2||f+y.shape[1]>this._shape[1]>>>L||R+y.shape[0]>this._shape[0]>>>L||f<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(z,f,R,L,this.format,this.type,this._mipLevels,y)}else throw new Error("gl-texture2d: Unsupported data type")};function w(y,f){return y.length===3?f[2]===1&&f[1]===y[0]*y[2]&&f[0]===y[2]:f[0]===1&&f[1]===y[0]}function A(y,f,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 se=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");se=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 le=O.size,fe=N.indexOf(L)<0;if(fe&&N.push(L),B===F&&$)O.offset===0&&O.data.length===le?fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,O.data):fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data.subarray(O.offset,O.offset+le)):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,O.data.subarray(O.offset,O.offset+le));else{var V;F===y.FLOAT?V=n.mallocFloat32(le):V=n.mallocUint8(le);var Y=o(V,U,[U[2],U[2]*U[0],1]);B===y.FLOAT&&F===y.UNSIGNED_BYTE?p(Y,O):a.assign(Y,O),fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,V.subarray(0,le)):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,V.subarray(0,le)),F===y.FLOAT?n.freeFloat32(V):n.freeUint8(V)}}function M(y){var f=y.createTexture();return y.bindTexture(y.TEXTURE_2D,f),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),f}function g(y,f,R,L,z){var F=y.getParameter(y.MAX_TEXTURE_SIZE);if(f<0||f>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,f,R,0,L,z,null),new l(y,N,f,R,L,z)}function b(y,f,R,L,z,F){var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,z,z,F,f),new l(y,N,R,L,z,F)}function d(y,f){var R=f.dtype,L=f.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,f.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],f=o(f.data,L,[f.stride[0],f.stride[1],1],f.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=f.size;if(F)f.offset===0&&f.data.length===B?P=f.data:P=f.data.subarray(f.offset,f.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?p($,f):a.assign($,f),P=U.subarray(0,B)}var se=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,se,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||c(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 f=arguments[1],R=m(f)?f:f.raw;if(R)return b(y,R,f.width|0,f.height|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(f.shape&&f.data&&f.stride)return d(y,f)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},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 d=A.points,u=A.velocities,y=A.divergences,f=[],R=[],L=[],z=[],F=[],N=[],O=0,P=0,U=a.create(),B=a.create(),X=8,$=0;$<d.length;$++){var se=d[$],le=u[$],fe=y[$];M===0&&(fe=g*.05),P=o.length(le)/b,U=a.create(),o.copy(U,le),U[3]=fe;for(var V=0;V<X;V++)F[V]=[se[0],se[1],se[2],V];if(z.length>0)for(var V=0;V<X;V++){var Y=(V+1)%X;f.push(z[V],F[V],F[Y],F[Y],z[Y],z[V]),L.push(B,U,U,U,B,B),N.push(O,P,P,P,O,O);var ee=f.length;R.push([ee-6,ee-5,ee-4],[ee-3,ee-2,ee-1])}var q=z;z=F,F=q;var oe=B;B=U,U=oe;var ae=O;O=P,P=ae}return{positions:f,cells:R,vectors:L,vertexIntensity:N}},s=function(A,M,g,b){for(var d=0,u=0;u<A.length;u++)for(var y=A[u].velocities,f=0;f<y.length;f++)d=Math.max(d,o.length(y[f]));for(var R=A.map(function($){return i($,g,b,d)}),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 f=0;f<O.cells.length;f++){var U=O.cells[f],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 d=A[b];if(d===M)return b;if(d>M)return b-1}return b},c=function(A,M,g){return A<M?M:A>g?g:A},m=function(A,M,g){var b=M.vectors,d=M.meshgrid,u=A[0],y=A[1],f=A[2],R=d[0].length,L=d[1].length,z=d[2].length,F=h(d[0],u),N=h(d[1],y),O=h(d[2],f),P=F+1,U=N+1,B=O+1;if(F=c(F,0,R-1),P=c(P,0,R-1),N=c(N,0,L-1),U=c(U,0,L-1),O=c(O,0,z-1),B=c(B,0,z-1),F<0||N<0||O<0||P>R-1||U>L-1||B>z-1)return o.create();var X=d[0][F],$=d[0][P],se=d[1][N],le=d[1][U],fe=d[2][O],V=d[2][B],Y=(u-X)/($-X),ee=(y-se)/(le-se),q=(f-fe)/(V-fe);isFinite(Y)||(Y=.5),isFinite(ee)||(ee=.5),isFinite(q)||(q=.5);var oe,ae,j,Q,re,ce;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,ce=B,j=N*z,Q=U*z,oe=F*z*L,ae=P*z*L;break;case 4:re=O,ce=B,oe=F*z,ae=P*z,j=N*z*R,Q=U*z*R;break;case 3:j=N,Q=U,re=O*L,ce=B*L,oe=F*L*z,ae=P*L*z;break;case 2:j=N,Q=U,oe=F*L,ae=P*L,re=O*L*R,ce=B*L*R;break;case 1:oe=F,ae=P,re=O*R,ce=B*R,j=N*R*z,Q=U*R*z;break;default:oe=F,ae=P,j=N*R,Q=U*R,re=O*R*L,ce=B*R*L;break}var be=b[oe+j+re],Ae=b[oe+j+ce],De=b[oe+Q+re],ze=b[oe+Q+ce],Ze=b[ae+j+re],at=b[ae+j+ce],nt=b[ae+Q+re],rt=b[ae+Q+ce],st=o.create(),Me=o.create(),ye=o.create(),he=o.create();o.lerp(st,be,Ze,Y),o.lerp(Me,Ae,at,Y),o.lerp(ye,De,nt,Y),o.lerp(he,ze,rt,Y);var Oe=o.create(),tt=o.create();o.lerp(Oe,st,ye,ee),o.lerp(tt,Me,he,ee);var ot=o.create();return o.lerp(ot,Oe,tt,q),ot},p=function(A,M){var g=M[0],b=M[1],d=M[2];return A[0]=g<0?-g:g,A[1]=b<0?-b:b,A[2]=d<0?-d:d,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 d=Math.abs(A[b]-A[b-1]);d<M&&(M=d)}return M},l=function(A){for(var M=[],g=[],b=[],d={},u={},y={},f=A.length,R=0;R<f;R++){var L=A[R],z=L[0],F=L[1],N=L[2];d[z]||(M.push(z),d[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,d=A.tubeSize||1,u=A.absoluteTubeSize,y=A.gridFill||"+x+y+z",f={};y.indexOf("-x")!==-1&&(f.reversedX=!0),y.indexOf("-y")!==-1&&(f.reversedY=!0),y.indexOf("-z")!==-1&&(f.reversedZ=!0),f.filled=n.indexOf(y.replace(/-/g,"").replace(/\+/g,""));var R=A.getVelocity||function(at){return m(at,A,f)},L=A.getDivergence||function(at,nt){var rt=o.create(),st=1e-4;o.add(rt,at,[st,0,0]);var Me=R(rt);o.subtract(Me,Me,nt),o.scale(Me,Me,1/st),o.add(rt,at,[0,st,0]);var ye=R(rt);o.subtract(ye,ye,nt),o.scale(ye,ye,1/st),o.add(rt,at,[0,0,st]);var he=R(rt);return o.subtract(he,he,nt),o.scale(he,he,1/st),o.add(rt,Me,ye),o.add(rt,rt,he),rt},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],rt=at[1],st=at[2];return!(nt<F||nt>P||rt<N||rt>U||st<O||st>B)},$=o.distance(M[0],M[1]),se=10*$/b,le=se*se,fe=1,V=0,Y=g.length;Y>1&&(fe=l(g));for(var ee=0;ee<Y;ee++){var q=o.create();o.copy(q,g[ee]);var oe=[q],ae=[],j=R(q),Q=q;ae.push(j);var re=[],ce=L(q,j),be=o.length(ce);isFinite(be)&&be>V&&(V=be),re.push(be),z.push({points:oe,velocities:ae,divergences:re});for(var Ae=0;Ae<b*100&&oe.length<b&&X(q);){Ae++;var De=o.clone(j),ze=o.squaredLength(De);if(ze===0)break;if(ze>le&&o.scale(De,De,se/Math.sqrt(ze)),o.add(De,De,q),j=R(De),o.squaredDistance(Q,De)-le>-1e-4*le){oe.push(De),Q=De,ae.push(j);var ce=L(De,j),be=o.length(ce);isFinite(be)&&be>V&&(V=be),re.push(be)}q=De}}var Ze=s(z,A.colormap,V,fe);return u?Ze.tubeScale=u:(V===0&&(V=1),Ze.tubeScale=d*.5*fe/V),Ze};var _=r(6740),w=r(6405).createMesh;e.exports.createTubeMesh=function(A,M){return w(A,M,{shaders:_,traceType:"streamtube"})}},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},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=c;function c(m,p){if(o(m))return p?h(m,c(p)):[m[0].clone(),m[1].clone()];var T=0,l,_;if(a(m))l=m.clone();else if(typeof m=="string")l=i(m);else{if(m===0)return[n(0),n(1)];if(m===Math.floor(m))l=n(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),T-=256;l=n(m)}}if(o(p))l.mul(p[1]),_=p[0].clone();else if(a(p))_=p.clone();else if(typeof p=="string")_=i(p);else if(!p)_=n(1);else if(p===Math.floor(p))_=n(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),T+=256;_=n(p)}return T>0?l=l.ushln(T):T<0&&(_=_.ushln(-T)),s(l,_)}},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}},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"])},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}},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)":c};function r(m){return t[m]}function o(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u];if(R===A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function a(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u];if(R<A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function n(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+y];if(R<=A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function i(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+y];if(R<=A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function s(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u],L=_[g+y];if(R<=A&&A<=L)if(d===f)d+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[f];w[f]=w[d],w[d++]=N}}return d}function h(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u],L=_[g+y];if(R<A&&A<=L)if(d===f)d+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[f];w[f]=w[d],w[d++]=N}}return d}function c(m,p,T,l,_,w,A,M){for(var g=2*m,b=g*T,d=b,u=T,y=p,f=m+p,R=T;l>R;++R,b+=g){var L=_[b+y],z=_[b+f];if(!(L>=A)&&!(M>=z))if(u===R)u+=1,d+=g;else{for(var F=0;g>F;++F){var N=_[b+F];_[b+F]=_[d],_[d++]=N}var O=w[R];w[R]=w[u],w[u++]=O}}return u}},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}},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,c,m){var p=s.createVertexArray?new n(s):s.getExtension("OES_vertex_array_object"),T;return p?T=o(s,p):T=a(s),T.update(h,c,m),T}e.exports=i},8192:function(e,t,r){e.exports=i;var o=r(2825),a=r(3536),n=r(244);function i(s,h){var c=o(s[0],s[1],s[2]),m=o(h[0],h[1],h[2]);a(c,c),a(m,m);var p=n(c,m);return p>1?0:Math.acos(p)}},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,c=o-s,m=c+h;return m?[m,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),c=0,m=0,p=0,T=Math.abs,l=o[m],_=T(l),w=a[p],A=T(w),M,g;_<A?(g=l,m+=1,m<n&&(l=o[m],_=T(l))):(g=w,p+=1,p<i&&(w=a[p],A=T(w))),m<n&&_<A||p>=i?(M=l,m+=1,m<n&&(l=o[m],_=T(l))):(M=w,p+=1,p<i&&(w=a[p],A=T(w)));for(var b=M+g,d=b-M,u=g-d,y=u,f=b,R,L,z,F,N;m<n&&p<i;)_<A?(M=l,m+=1,m<n&&(l=o[m],_=T(l))):(M=w,p+=1,p<i&&(w=a[p],A=T(w))),g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R;for(;m<n;)M=l,g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R,m+=1,m<n&&(l=o[m]);for(;p<i;)M=w,g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R,p+=1,p<i&&(w=a[p]);return y&&(h[c++]=y),f&&(h[c++]=f),c||(h[c++]=0),h.length=c,h}},8277:function(e){"use strict";function t(){return function(s,h,c,m,p){var T=s[0],l=s[1],_=s[2],w=c[0],A=c[1],M=c[2],g=[0,0,0];m|=0;var b=0,d=0,u=0,y=M,f=A-_*M,R=w-l*A;for(u=0;u<T;++u){for(d=0;d<l;++d){for(b=0;b<_;++b){{var L=p,z;for(z=0;z<g.length-1;++z)L=L[g[z]];h[m]=L[g[g.length-1]]}m+=y,++g[2]}m+=f,g[2]-=_,++g[1]}m+=R,g[1]-=l,++g[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,p){var T=m.dtype,l=m.order,_=[T,l.join()].join(),w=h[_];return w||(h[_]=w=s([T,l])),w(m.shape.slice(0),m.data,m.stride,m.offset|0,p)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"convert"})},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}},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),c=i===void 0?r:i,m=0;m<s;++m)h[m]=[0,0,0];for(var m=0;m<a.length;++m)for(var p=a[m],T=0,l=p[p.length-1],_=p[0],w=0;w<p.length;++w){T=l,l=_,_=p[(w+1)%p.length];for(var A=n[T],M=n[l],g=n[_],b=new Array(3),d=0,u=new Array(3),y=0,f=0;f<3;++f)b[f]=A[f]-M[f],d+=b[f]*b[f],u[f]=g[f]-M[f],y+=u[f]*u[f];if(d*y>c)for(var R=h[l],L=1/Math.sqrt(d*y),f=0;f<3;++f){var z=(f+1)%3,F=(f+2)%3;R[f]+=L*(u[z]*b[F]-u[F]*b[z])}}for(var m=0;m<s;++m){for(var R=h[m],N=0,f=0;f<3;++f)N+=R[f]*R[f];if(N>c)for(var L=1/Math.sqrt(N),f=0;f<3;++f)R[f]*=L;else for(var f=0;f<3;++f)R[f]=0}return h},t.faceNormals=function(a,n,i){for(var s=a.length,h=new Array(s),c=i===void 0?o:i,m=0;m<s;++m){for(var p=a[m],T=new Array(3),l=0;l<3;++l)T[l]=n[p[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>c?M=1/Math.sqrt(M):M=0;for(var l=0;l<3;++l)A[l]*=M;h[m]=A}return h}},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),c=r(9366),m=r(5964),p=[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,oe){var ae=q[0],j=q[1],Q=q[2],re=q[3];return q[0]=oe[0]*ae+oe[4]*j+oe[8]*Q+oe[12]*re,q[1]=oe[1]*ae+oe[5]*j+oe[9]*Q+oe[13]*re,q[2]=oe[2]*ae+oe[6]*j+oe[10]*Q+oe[14]*re,q[3]=oe[3]*ae+oe[7]*j+oe[11]*Q+oe[15]*re,q}function M(q,oe,ae,j){return A(j,j,ae),A(j,j,oe),A(j,j,q)}function g(q,oe){this.index=q,this.dataCoordinate=this.position=oe}function b(q){return q===!0||q>1?1:q}function d(q,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze){this.gl=q,this.pixelRatio=1,this.shader=oe,this.orthoShader=ae,this.projectShader=j,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=ce,this.idBuffer=be,this.vao=Ae,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=De,this.pickOrthoShader=ze,this.pickProjectShader=Ze,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=d.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],f=[0,0,0],R=[0,0,0],L=[0,0,0,1],z=[0,0,0,1],F=p.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,oe){return q[0]=oe[0],q[1]=oe[1],q[2]=oe[2],q[3]=1,q}function B(q,oe,ae,j){return q[0]=oe[0],q[1]=oe[1],q[2]=oe[2],q[ae]=j,q}function X(q){for(var oe=O,ae=0;ae<2;++ae)for(var j=0;j<3;++j)oe[ae][j]=Math.max(Math.min(q[ae][j],1e8),-1e8);return oe}function $(q,oe,ae,j){var Q=oe.axesProject,re=oe.gl,ce=q.uniforms,be=ae.model||p,Ae=ae.view||p,De=ae.projection||p,ze=oe.axesBounds,Ze=X(oe.clipBounds),at;oe.axes&&oe.axes.lastCubeProps?at=oe.axes.lastCubeProps.axis:at=[1,1,1],y[0]=2/re.drawingBufferWidth,y[1]=2/re.drawingBufferHeight,q.bind(),ce.view=Ae,ce.projection=De,ce.screenSize=y,ce.highlightId=oe.highlightId,ce.highlightScale=oe.highlightScale,ce.clipBounds=Ze,ce.pickGroup=oe.pickId/255,ce.pixelRatio=j;for(var nt=0;nt<3;++nt)if(Q[nt]){ce.scale=oe.projectScale[nt],ce.opacity=oe.projectOpacity[nt];for(var rt=F,st=0;st<16;++st)rt[st]=0;for(var st=0;st<4;++st)rt[5*st]=1;rt[5*nt]=0,at[nt]<0?rt[12+nt]=ze[0][nt]:rt[12+nt]=ze[1][nt],s(rt,be,rt),ce.model=rt;var Me=(nt+1)%3,ye=(nt+2)%3,he=P(f),Oe=P(R);he[Me]=1,Oe[ye]=1;var tt=M(De,Ae,be,U(L,he)),ot=M(De,Ae,be,U(z,Oe));if(Math.abs(tt[1])>Math.abs(ot[1])){var Qe=tt;tt=ot,ot=Qe,Qe=he,he=Oe,Oe=Qe;var Pt=Me;Me=ye,ye=Pt}tt[0]<0&&(he[Me]=-1),ot[1]>0&&(Oe[ye]=-1);for(var It=0,qt=0,st=0;st<4;++st)It+=Math.pow(be[4*Me+st],2),qt+=Math.pow(be[4*ye+st],2);he[Me]/=Math.sqrt(It),Oe[ye]/=Math.sqrt(qt),ce.axes[0]=he,ce.axes[1]=Oe,ce.fragClipBounds[0]=B(N,Ze[0],nt,-1e8),ce.fragClipBounds[1]=B(N,Ze[1],nt,1e8),oe.vao.bind(),oe.vao.draw(re.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(re.lineWidth(oe.lineWidth*j),oe.vao.draw(re.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}var se=[-1e8,-1e8,-1e8],le=[1e8,1e8,1e8],fe=[se,le];function V(q,oe,ae,j,Q,re,ce){var be=ae.gl;if((re===ae.projectHasAlpha||ce)&&$(oe,ae,j,Q),re===ae.hasAlpha||ce){q.bind();var Ae=q.uniforms;Ae.model=j.model||p,Ae.view=j.view||p,Ae.projection=j.projection||p,y[0]=2/be.drawingBufferWidth,y[1]=2/be.drawingBufferHeight,Ae.screenSize=y,Ae.highlightId=ae.highlightId,Ae.highlightScale=ae.highlightScale,Ae.fragClipBounds=fe,Ae.clipBounds=ae.axes.bounds,Ae.opacity=ae.opacity,Ae.pickGroup=ae.pickId/255,Ae.pixelRatio=Q,ae.vao.bind(),ae.vao.draw(be.TRIANGLES,ae.vertexCount),ae.lineWidth>0&&(be.lineWidth(ae.lineWidth*Q),ae.vao.draw(be.LINES,ae.lineVertexCount,ae.vertexCount)),ae.vao.unbind()}}u.draw=function(q){var oe=this.useOrtho?this.orthoShader:this.shader;V(oe,this.projectShader,this,q,this.pixelRatio,!1,!1)},u.drawTransparent=function(q){var oe=this.useOrtho?this.orthoShader:this.shader;V(oe,this.projectShader,this,q,this.pixelRatio,!0,!1)},u.drawPick=function(q){var oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;V(oe,this.pickProjectShader,this,q,1,!0,!0)},u.pick=function(q){if(!q||q.id!==this.pickId)return null;var oe=q.value[2]+(q.value[1]<<8)+(q.value[0]<<16);if(oe>=this.pointCount||oe<0)return null;var ae=this.points[oe],j=this._selectResult;j.index=oe;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 oe=q.index,ae=oe&255,j=oe>>8&255,Q=oe>>16&255;this.highlightId=[ae/255,j/255,Q/255,0]}};function Y(q,oe,ae,j){var Q;w(q)?oe<q.length?Q=q[oe]:Q=void 0:Q=q,Q=m(Q);var re=!0;o(Q)&&(Q="\u25BC",re=!1),ae||(ae={});var ce=ae.family;w(ce)&&(ce=ce[oe]),ce||(ce="normal");var be=ae.weight;w(be)&&(be=be[oe]),be||(be="normal");var Ae=ae.style;w(Ae)&&(Ae=Ae[oe]),Ae||(Ae="normal");var De=ae.variant;w(De)&&(De=De[oe]),De||(De="normal");var ze=c(Q,{family:ce,weight:be,style:Ae,variant:De},j),ze=c(Q,ae,j);return{mesh:ze[0],lines:ze[1],bounds:ze[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 oe=!!q.project;this.axesProject=[oe,oe,oe]}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"},ce=q.alignment||[0,0],be,Ae;if(ce.length===2)be=ce[0],Ae=ce[1];else{be=[],Ae=[];for(var j=0;j<ce.length;++j)be[j]=ce[j][0],Ae[j]=ce[j][1]}var De=[1/0,1/0,1/0],ze=[-1/0,-1/0,-1/0],Ze=q.glyph,at=q.color,nt=q.size,rt=q.angle,st=q.lineColor,Me=-1,ye=0,he=0,Oe=0;if(Q.length){Oe=Q.length;e:for(var j=0;j<Oe;++j){for(var tt=Q[j],ot=0;ot<3;++ot)if(isNaN(tt[ot])||!isFinite(tt[ot]))continue e;var Qe=Y(Ze,j,re,this.pixelRatio),Pt=Qe.mesh,It=Qe.lines,qt=Qe.bounds;ye+=Pt.cells.length*3,he+=It.edges.length*2}}var Wt=ye+he,kr=i.mallocFloat(3*Wt),mr=i.mallocFloat(4*Wt),qr=i.mallocFloat(2*Wt),Sr=i.mallocUint32(Wt);if(Wt>0){var Rr=0,wt=ye,Ne=[0,0,0,1],Ke=[0,0,0,1],Te=w(at)&&w(at[0]),Ie=w(st)&&w(st[0]);e:for(var j=0;j<Oe;++j){Me+=1;for(var tt=Q[j],ot=0;ot<3;++ot){if(isNaN(tt[ot])||!isFinite(tt[ot]))continue e;ze[ot]=Math.max(ze[ot],tt[ot]),De[ot]=Math.min(De[ot],tt[ot])}var Qe=Y(Ze,j,re,this.pixelRatio),Pt=Qe.mesh,It=Qe.lines,qt=Qe.bounds,Ve=Qe.visible;if(!Ve)Ne=[1,1,1,0];else if(w(at)){var Ce;if(Te?j<at.length?Ce=at[j]:Ce=[0,0,0,0]:Ce=at,Ce.length===3){for(var ot=0;ot<3;++ot)Ne[ot]=Ce[ot];Ne[3]=1}else if(Ce.length===4){for(var ot=0;ot<4;++ot)Ne[ot]=Ce[ot];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else Ne[0]=Ne[1]=Ne[2]=0,Ne[3]=1;if(!Ve)Ke=[1,1,1,0];else if(w(st)){var Ce;if(Ie?j<st.length?Ce=st[j]:Ce=[0,0,0,0]:Ce=st,Ce.length===3){for(var ot=0;ot<3;++ot)Ke[ot]=Ce[ot];Ke[ot]=1}else if(Ce.length===4){for(var ot=0;ot<4;++ot)Ke[ot]=Ce[ot];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else Ke[0]=Ke[1]=Ke[2]=0,Ke[3]=1;var Ee=.5;Ve?w(nt)?j<nt.length?Ee=+nt[j]:Ee=12:nt?Ee=+nt:this.useOrtho&&(Ee=12):Ee=0;var Pe=0;w(rt)?j<rt.length?Pe=+rt[j]:Pe=0:rt&&(Pe=+rt);for(var ft=Math.cos(Pe),ct=Math.sin(Pe),tt=Q[j],ot=0;ot<3;++ot)ze[ot]=Math.max(ze[ot],tt[ot]),De[ot]=Math.min(De[ot],tt[ot]);var _t=be,Ct=Ae,_t=0;w(be)?j<be.length?_t=be[j]:_t=0:be&&(_t=be);var Ct=0;w(Ae)?j<Ae.length?Ct=Ae[j]:Ct=0:Ae&&(Ct=Ae),_t*=_t>0?1-qt[0][0]:_t<0?1+qt[1][0]:1,Ct*=Ct>0?1-qt[0][1]:Ct<0?1+qt[1][1]:1;for(var ir=[_t,Ct],Da=Pt.cells||[],Ia=Pt.positions||[],ot=0;ot<Da.length;++ot)for(var rr=Da[ot],er=0;er<3;++er){for(var Lr=0;Lr<3;++Lr)kr[3*Rr+Lr]=tt[Lr];for(var Lr=0;Lr<4;++Lr)mr[4*Rr+Lr]=Ne[Lr];Sr[Rr]=Me;var fa=Ia[rr[er]];qr[2*Rr]=Ee*(ft*fa[0]-ct*fa[1]+ir[0]),qr[2*Rr+1]=Ee*(ct*fa[0]+ft*fa[1]+ir[1]),Rr+=1}for(var Da=It.edges,Ia=It.positions,ot=0;ot<Da.length;++ot)for(var rr=Da[ot],er=0;er<2;++er){for(var Lr=0;Lr<3;++Lr)kr[3*wt+Lr]=tt[Lr];for(var Lr=0;Lr<4;++Lr)mr[4*wt+Lr]=Ke[Lr];Sr[wt]=Me;var fa=Ia[rr[er]];qr[2*wt]=Ee*(ft*fa[0]-ct*fa[1]+ir[0]),qr[2*wt+1]=Ee*(ct*fa[0]+ft*fa[1]+ir[1]),wt+=1}}}this.bounds=[De,ze],this.points=Q,this.pointCount=Q.length,this.vertexCount=ye,this.lineVertexCount=he,this.pointBuffer.update(kr),this.colorBuffer.update(mr),this.glyphBuffer.update(qr),this.idBuffer.update(Sr),i.free(kr),i.free(mr),i.free(qr),i.free(Sr)},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 oe=q.gl,ae=h.createPerspective(oe),j=h.createOrtho(oe),Q=h.createProject(oe),re=h.createPickPerspective(oe),ce=h.createPickOrtho(oe),be=h.createPickProject(oe),Ae=a(oe),De=a(oe),ze=a(oe),Ze=a(oe),at=n(oe,[{buffer:Ae,size:3,type:oe.FLOAT},{buffer:De,size:4,type:oe.FLOAT},{buffer:ze,size:2,type:oe.FLOAT},{buffer:Ze,size:4,type:oe.UNSIGNED_BYTE,normalized:!0}]),nt=new d(oe,ae,j,Q,Ae,De,ze,Ze,at,re,ce,be);return nt.update(q),nt}},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}},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],c=n[0]+n[1];if(s=h+a[2]-(c+n[2]),s)return s;var m=t(a[0],a[1]),p=t(n[0],n[1]);return t(m,a[2])-t(p,n[2])||t(m+a[2],h)-t(p+n[2],c);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 d=a.slice().sort(r),u=n.slice().sort(r),y=0;y<i;++y)if(s=d[y]-u[y],s)return s;return 0}}},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),c=function(m){s&&m.preventDefault();var p=m.deltaX||0,T=m.deltaY||0,l=m.deltaZ||0,_=m.deltaMode,w=1;switch(_){case 1:w=h;break;case 2:w=window.innerHeight;break}if(p*=w,T*=w,l*=w,p||T||l)return i(p,T,l,m)};return n.addEventListener("wheel",c),c}},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,c=o-s,m=c+h;return m?[m,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),c=0,m=0,p=0,T=Math.abs,l=o[m],_=T(l),w=-a[p],A=T(w),M,g;_<A?(g=l,m+=1,m<n&&(l=o[m],_=T(l))):(g=w,p+=1,p<i&&(w=-a[p],A=T(w))),m<n&&_<A||p>=i?(M=l,m+=1,m<n&&(l=o[m],_=T(l))):(M=w,p+=1,p<i&&(w=-a[p],A=T(w)));for(var b=M+g,d=b-M,u=g-d,y=u,f=b,R,L,z,F,N;m<n&&p<i;)_<A?(M=l,m+=1,m<n&&(l=o[m],_=T(l))):(M=w,p+=1,p<i&&(w=-a[p],A=T(w))),g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R;for(;m<n;)M=l,g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R,m+=1,m<n&&(l=o[m]);for(;p<i;)M=w,g=y,b=M+g,d=b-M,u=g-d,u&&(h[c++]=u),R=f+b,L=R-f,z=R-L,F=b-L,N=f-z,y=N+F,f=R,p+=1,p<i&&(w=-a[p]);return y&&(h[c++]=y),f&&(h[c++]=f),c||(h[c++]=0),h.length=c,h}},8572:function(e){"use strict";e.exports=function(r){return r<0?-1:r>0?1:0}},8648:function(e,t,r){e.exports=r(783)},8692:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[1],h=o[0]-i,c=o[1]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=i+h*p-c*m,r[1]=s+h*m+c*p,r[2]=o[2],r}},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]))}},8731:function(e,t,r){"use strict";e.exports=c;var o=r(8866);function a(m,p,T,l,_,w){this._gl=m,this._wrapper=p,this._index=T,this._locations=l,this._dimension=_,this._constFunc=w}var n=a.prototype;n.pointer=function(p,T,l,_){var w=this,A=w._gl,M=w._locations[w._index];A.vertexAttribPointer(M,w._dimension,p||A.FLOAT,!!T,l||0,_||0),A.enableVertexAttribArray(M)},n.set=function(m,p,T,l){return this._constFunc(this._locations[this._index],m,p,T,l)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(m){return m!==this._locations[this._index]&&(this._locations[this._index]=m|0,this._wrapper.program=null),m|0}});var i=[function(m,p,T){return T.length===void 0?m.vertexAttrib1f(p,T):m.vertexAttrib1fv(p,T)},function(m,p,T,l){return T.length===void 0?m.vertexAttrib2f(p,T,l):m.vertexAttrib2fv(p,T)},function(m,p,T,l,_){return T.length===void 0?m.vertexAttrib3f(p,T,l,_):m.vertexAttrib3fv(p,T)},function(m,p,T,l,_,w){return T.length===void 0?m.vertexAttrib4f(p,T,l,_,w):m.vertexAttrib4fv(p,T)}];function s(m,p,T,l,_,w,A){var M=i[_],g=new a(m,p,T,l,_,M);Object.defineProperty(w,A,{set:function(b){return m.disableVertexAttribArray(l[T]),M(m,l[T],b),b},get:function(){return g},enumerable:!0})}function h(m,p,T,l,_,w,A){for(var M=new Array(_),g=new Array(_),b=0;b<_;++b)s(m,p,T[b],l,_,M,b),g[b]=M[b];Object.defineProperty(M,"location",{set:function(y){if(Array.isArray(y))for(var f=0;f<_;++f)g[f].location=y[f];else for(var f=0;f<_;++f)g[f].location=y+f;return y},get:function(){for(var y=new Array(_),f=0;f<_;++f)y[f]=l[T[f]];return y},enumerable:!0}),M.pointer=function(y,f,R,L){y=y||m.FLOAT,f=!!f,R=R||_*_,L=L||0;for(var z=0;z<_;++z){var F=l[T[z]];m.vertexAttribPointer(F,_,y,f,R,L+z*_),m.enableVertexAttribArray(F)}};var d=new Array(_),u=m["vertexAttrib"+_+"fv"];Object.defineProperty(w,A,{set:function(y){for(var f=0;f<_;++f){var R=l[T[f]];if(m.disableVertexAttribArray(R),Array.isArray(y[0]))u.call(m,R,y[f]);else{for(var L=0;L<_;++L)d[L]=y[_*f+L];u.call(m,R,d)}}return y},get:function(){return M},enumerable:!0})}function c(m,p,T,l){for(var _={},w=0,A=T.length;w<A;++w){var M=T[w],g=M.name,b=M.type,d=M.locations;switch(b){case"bool":case"int":case"float":s(m,p,d[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(m,p,d[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(m,p,d,l,u,_,g)}else throw new o("","Unknown data type for attribute "+g+": "+b);break}}return _}},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,c=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--c;n[i]=h<<c&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}},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},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,d,u){this.a=M,this.b=g,this.idx=b,this.lowerIds=d,this.upperIds=u}function c(M,g,b,d){this.a=M,this.b=g,this.type=b,this.idx=d}function m(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 p(M,g){return a(M.a,M.b,g)}function T(M,g,b,d,u){for(var y=o.lt(g,d,p),f=o.gt(g,d,p),R=y;R<f;++R){for(var L=g[R],z=L.lowerIds,N=z.length;N>1&&a(b[z[N-2]],b[z[N-1]],d)>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]],d)<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 d=o.le(M,b,l),u=M[d],y=u.upperIds,f=y[y.length-1];u.upperIds=[f],M.splice(d+1,0,new h(b.a,b.b,b.idx,[f],y))}function w(M,g,b){var d=b.a;b.a=b.b,b.b=d;var u=o.eq(M,b,l),y=M[u],f=M[u-1];f.upperIds=y.upperIds,M.splice(u,1)}function A(M,g){for(var b=M.length,d=g.length,u=[],y=0;y<b;++y)u.push(new c(M[y],null,n,y));for(var y=0;y<d;++y){var f=g[y],R=M[f[0]],L=M[f[1]];R[0]<L[0]?u.push(new c(R,L,s,y),new c(L,R,i,y)):R[0]>L[0]&&u.push(new c(L,R,s,y),new c(R,L,i,y))}u.sort(m);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}},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 c(_){var w=o[_+1];return w||(w=o),h(w)}var m=[];function p(_,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=m[_];g||(g=m[_]=c(_)),this.orient=g}var T=p.prototype;T.handleBoundaryDegeneracy=function(_,w){var A=this.dimension,M=this.vertices.length-1,g=this.tuple,b=this.vertices,d=[_];for(_.lastVisited=-M;d.length>0;){_=d.pop();for(var u=_.adjacent,y=0;y<=A;++y){var f=u[y];if(!(!f.boundary||f.lastVisited<=-M)){for(var R=f.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 f;f.lastVisited=-M,F===0&&d.push(f)}}}return null},T.walk=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,d=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[d];e:for(;!u.boundary;){for(var y=u.vertices,f=u.adjacent,R=0;R<=M;++R)b[R]=g[y[R]];u.lastVisited=A;for(var R=0;R<=M;++R){var L=f[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,d=this.interior,u=this.simplices,y=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,d.push(w);for(var f=[];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,d.push(N),y.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var X=N.adjacent,$=R.slice(),se=L.slice(),le=new n($,se,!0);u.push(le);var fe=X.indexOf(w);if(!(fe<0)){X[fe]=le,se[z]=N,$[F]=-1,se[F]=w,L[F]=le,le.flip();for(var U=0;U<=M;++U){var V=$[U];if(!(V<0||V===A)){for(var Y=new Array(M-1),ee=0,q=0;q<=M;++q){var oe=$[q];oe<0||q===U||(Y[ee++]=oe)}f.push(new i(Y,le,U))}}}}}}}f.sort(s);for(var F=0;F+1<f.length;F+=2){var ae=f[F],j=f[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,d=0;d<=g;++d){var u=M.vertices[d];u<0?b[d]=_:b[d]=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 d=new Array(_),u=b.vertices,y=0,f=0,R=0;R<=_;++R)u[R]>=0?d[y++]=u[R]:f=R&1;if(f===(_&1)){var L=d[0];d[0]=d[1],d[1]=L}w.push(d)}}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 d=new Array(M+1),u=0;u<=M;++u)d[u]=u;b<0&&(d[0]=1,d[1]=0);for(var y=new n(d,new Array(M+1),!1),f=y.adjacent,R=new Array(M+2),u=0;u<=M;++u){for(var L=d.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);f[u]=N,R[u]=N}R[M+1]=y;for(var u=0;u<=M;++u)for(var L=f[u].vertices,O=f[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)f[U].vertices.indexOf(P)<0&&(O[z]=f[U])}for(var B=new p(M,g,R),X=!!w,u=M+1;u<A;++u)B.insert(_[u],X);return B.boundary()}},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),c=i.length,m=new Array(c),p=0;p<c;++p)m[p]=a(i[p],h);return m}},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),c=r(9618),m=r(6729),p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(b,d,u,y,f,R,L,z,F,N,O){this.gl=b,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=d,this.dirty=!0,this.triShader=u,this.pickShader=y,this.trianglePositions=f,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=p,this._view=p,this._projection=p,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 d=m({colormap:b,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),y=0;y<256;++y){for(var f=d[y],R=0;R<3;++R)u[4*y+R]=f[R];u[4*y+3]=f[3]*255}return c(u,[256,256,4],[4,0,1])}function w(b){for(var d=b.length,u=new Array(d),y=0;y<d;++y)u[y]=b[y][2];return u}l.update=function(b){b=b||{};var d=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=d.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=d.LINEAR,this.texture.setPixels(_(b.colormap)),this.texture.generateMipmap());var u=b.cells,y=b.positions,f=b.vectors;if(!(!y||!u||!f)){var R=[],L=[],z=[],F=[],N=[];this.cells=u,this.positions=y,this.vectors=f;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 se=y[X],le=0;le<3;++le)isNaN(se[le])||!isFinite(se[le])||(this.bounds[0][le]=Math.min(this.bounds[0][le],se[le]),this.bounds[1][le]=Math.max(this.bounds[1][le],se[le]));var fe=0;e:for(var X=0;X<u.length;++X){var V=u[X];switch(V.length){case 3:for(var le=0;le<3;++le)for(var Y=V[le],se=y[Y],ee=0;ee<3;++ee)if(isNaN(se[ee])||!isFinite(se[ee]))continue e;for(var le=0;le<3;++le){var Y=V[2-le],se=y[Y];R.push(se[0],se[1],se[2],se[3]);var q=f[Y];L.push(q[0],q[1],q[2],q[3]||0);var oe=O;oe.length===3?z.push(oe[0],oe[1],oe[2],1):z.push(oe[0],oe[1],oe[2],oe[3]);var ae;P?ae=[(P[Y]-U)/(B-U),0]:ae=[(se[2]-U)/(B-U),0],F.push(ae[0],ae[1]),N.push(X)}fe+=1;break;default:break}}this.triangleCount=fe,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 d=this.gl,u=b.model||p,y=b.view||p,f=b.projection||p,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:f,inverseModel:p.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),d.disable(d.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(),d.drawArrays(d.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(b){b=b||{};for(var d=this.gl,u=b.model||p,y=b.view||p,f=b.projection||p,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(f),this._resolution=[d.drawingBufferWidth,d.drawingBufferHeight];var z={model:u,view:y,projection:f,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(),d.drawArrays(d.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(b){if(!b||b.id!==this.pickId)return null;var d=b.value[0]+256*b.value[1]+65536*b.value[2],u=this.cells[d],y=this.positions[u[1]].slice(0,3),f={position:y,dataCoordinate:y,index:Math.floor(u[1]/48)};return this.traceType==="cone"?f.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(f.intensity=this.intensity[u[1]],f.velocity=this.vectors[u[1]].slice(0,3),f.divergence=this.vectors[u[1]][3],f.index=d),f},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,d){var u=o(b,d.meshShader.vertex,d.meshShader.fragment,null,d.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,d){var u=o(b,d.pickShader.vertex,d.pickShader.fragment,null,d.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function g(b,d,u){var y=u.shaders;arguments.length===1&&(d=b,b=d.gl);var f=A(b,y),R=M(b,y),L=i(b,c(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,f,R,z,F,P,N,O,U,u.traceType||"cone");return B.update(d),B}e.exports=g},9127:function(e,t,r){"use strict";e.exports=n;var o=r(6204),a=r(5771);function n(i){return a(o(i))}},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}},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],d=A[14],u=A[15],y=l._ortho||!1,f=y?2:1,R=f*this.pixelRatio*(M[3]*g+M[7]*b+M[11]*d+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 c(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 m=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 p(l,_,w,A){for(var M=m[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 d=0;d<3;++d){this.lineOffset[d]=b;e:for(var u=0;u<g;++u){for(var y=w[u],f=0;f<3;++f)if(isNaN(y[f])||!isFinite(y[f]))continue e;var R=A[u],L=_[d];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][d])||isNaN(R[1][d]))){if(R[0][d]<0){var z=y.slice();z[d]+=R[0][d],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),c(this.bounds,z),b+=2+p(M,z,L,d)}if(R[1][d]>0){var z=y.slice();z[d]+=R[1][d],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),c(this.bounds,z),b+=2+p(M,z,L,d)}}}this.lineCount[d]=b-this.lineOffset[d]}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}},9215:function(e,t,r){"use strict";e.exports=c;var o=r(4769),a=r(2478);function n(m,p,T){return Math.min(p,Math.max(m,T))}function i(m,p,T){this.dimension=m.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=m.slice().reverse(),this._velocity=p.slice().reverse(),this._time=[T],this._scratch=[m.slice(),m.slice(),m.slice(),m.slice(),m.slice()]}var s=i.prototype;s.flush=function(m){var p=a.gt(this._time,m)-1;p<=0||(this._time.splice(0,p),this._state.splice(0,p*this.dimension),this._velocity.splice(0,p*this.dimension))},s.curve=function(m){var p=this._time,T=p.length,l=a.le(p,m),_=this._scratch[0],w=this._state,A=this._velocity,M=this.dimension,g=this.bounds;if(l<0)for(var b=M-1,d=0;d<M;++d,--b)_[d]=w[b];else if(l>=T-1)for(var b=w.length-1,u=m-p[T-1],d=0;d<M;++d,--b)_[d]=w[b]+u*A[b];else{for(var b=M*(l+1)-1,y=p[l],f=p[l+1],R=f-y||1,L=this._scratch[1],z=this._scratch[2],F=this._scratch[3],N=this._scratch[4],O=!0,d=0;d<M;++d,--b)L[d]=w[b],F[d]=A[b]*R,z[d]=w[b+M],N[d]=A[b+M]*R,O=O&&L[d]===z[d]&&F[d]===N[d]&&F[d]===0;if(O)for(var d=0;d<M;++d)_[d]=L[d];else o(L,F,z,N,(m-y)/R,_)}for(var P=g[0],U=g[1],d=0;d<M;++d)_[d]=n(P[d],U[d],_[d]);return _},s.dcurve=function(m){var p=this._time,T=p.length,l=a.le(p,m),_=this._scratch[0],w=this._state,A=this._velocity,M=this.dimension;if(l>=T-1)for(var g=w.length-1,b=m-p[T-1],d=0;d<M;++d,--g)_[d]=A[g];else{for(var g=M*(l+1)-1,u=p[l],y=p[l+1],f=y-u||1,R=this._scratch[1],L=this._scratch[2],z=this._scratch[3],F=this._scratch[4],N=!0,d=0;d<M;++d,--g)R[d]=w[g],z[d]=A[g]*f,L[d]=w[g+M],F[d]=A[g+M]*f,N=N&&R[d]===L[d]&&z[d]===F[d]&&z[d]===0;if(N)for(var d=0;d<M;++d)_[d]=0;else{o.derivative(R,z,L,F,(m-u)/f,_);for(var d=0;d<M;++d)_[d]/=f}}return _},s.lastT=function(){var m=this._time;return m[m.length-1]},s.stable=function(){for(var m=this._velocity,p=m.length,T=this.dimension-1;T>=0;--T)if(m[--p])return!1;return!0},s.jump=function(m){var p=this.lastT(),T=this.dimension;if(!(m<p||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(p,m);for(var b=0;b<2;++b)for(var d=0;d<T;++d)l.push(l[w++]),_.push(0);this._time.push(m);for(var d=T;d>0;--d)l.push(n(M[d-1],g[d-1],arguments[d])),_.push(0)}},s.push=function(m){var p=this.lastT(),T=this.dimension;if(!(m<p||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=m-p,M=this.bounds,g=M[0],b=M[1],d=A>1e-6?1/A:0;this._time.push(m);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++])*d)}}},s.set=function(m){var p=this.dimension;if(!(m<this.lastT()||arguments.length!==p+1)){var T=this._state,l=this._velocity,_=this.bounds,w=_[0],A=_[1];this._time.push(m);for(var M=p;M>0;--M)T.push(n(w[M-1],A[M-1],arguments[M])),l.push(0)}},s.move=function(m){var p=this.lastT(),T=this.dimension;if(!(m<=p||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=m-p,d=b>1e-6?1/b:0;this._time.push(m);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*d)}}},s.idle=function(m){var p=this.lastT();if(!(m<p)){var T=this.dimension,l=this._state,_=this._velocity,w=l.length-T,A=this.bounds,M=A[0],g=A[1],b=m-p;this._time.push(m);for(var d=T-1;d>=0;--d)l.push(n(M[d],g[d],l[w]+b*_[w])),_.push(0),w+=1}};function h(m){for(var p=new Array(m),T=0;T<m;++T)p[T]=0;return p}function c(m,p,T){switch(arguments.length){case 0:return new i([0],[0],0);case 1:if(typeof m=="number"){var l=h(m);return new i(l,l,0)}else return new i(m,h(m.length),0);case 2:if(typeof p=="number"){var l=h(m.length);return new i(m,l,+p)}else T=0;case 3:if(m.length!==p.length)throw new Error("state and velocity lengths must match");return new i(m,p,T)}}},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}},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}},9265:function(e){e.exports=t;function t(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]}},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}},9346:function(e){"use strict";var t=new Float64Array(4),r=new Float64Array(4),o=new Float64Array(4);function a(n,i,s,h,c){t.length<h.length&&(t=new Float64Array(h.length),r=new Float64Array(h.length),o=new Float64Array(h.length));for(var m=0;m<h.length;++m)t[m]=n[m]-h[m],r[m]=i[m]-n[m],o[m]=s[m]-n[m];for(var p=0,T=0,l=0,_=0,w=0,A=0,m=0;m<h.length;++m){var M=r[m],g=o[m],b=t[m];p+=M*M,T+=M*g,l+=g*g,_+=b*M,w+=b*g,A+=b*b}var d=Math.abs(p*l-T*T),u=T*w-l*_,y=T*_-p*w,f;if(u+y<=d)if(u<0)y<0&&_<0?(y=0,-_>=p?(u=1,f=p+2*_+A):(u=-_/p,f=_*u+A)):(u=0,w>=0?(y=0,f=A):-w>=l?(y=1,f=l+2*w+A):(y=-w/l,f=w*y+A));else if(y<0)y=0,_>=0?(u=0,f=A):-_>=p?(u=1,f=p+2*_+A):(u=-_/p,f=_*u+A);else{var R=1/d;u*=R,y*=R,f=u*(p*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=p-2*T+l,F>=N?(u=1,y=0,f=p+2*_+A):(u=F/N,y=1-u,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(u=0,z<=0?(y=1,f=l+2*w+A):w>=0?(y=0,f=A):(y=-w/l,f=w*y+A))):y<0?(L=T+w,z=p+_,z>L?(F=z-L,N=p-2*T+l,F>=N?(y=1,u=0,f=l+2*w+A):(y=F/N,u=1-y,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(y=0,z<=0?(u=1,f=p+2*_+A):_>=0?(u=0,f=A):(u=-_/p,f=_*u+A))):(F=l+w-T-_,F<=0?(u=0,y=1,f=l+2*w+A):(N=p-2*T+l,F>=N?(u=1,y=0,f=p+2*_+A):(u=F/N,y=1-u,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)))}for(var O=1-u-y,m=0;m<h.length;++m)c[m]=O*n[m]+u*i[m]+y*s[m];return f<0?0:f}e.exports=a},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,c=r-s;return a?(a[0]=c+h,a[1]=n,a):[c+h,n]}},9366:function(e,t,r){"use strict";var o=r(4359);e.exports=n;var a={};function n(i,s,h){var c=[s.style,s.weight,s.variant,s.family].join("_"),m=a[c];if(m||(m=a[c]={}),i in m)return m[i];var p={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}};p.triangles=!0;var T=o(i,p);p.triangles=!1;var l=o(i,p),_,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 m[i]=[T,l,A]}},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 c(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 m=c.prototype;m.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)},m.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 p(l,_){return l.name<_.name?-1:1}m.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,d=g._vref;g._vref=i.shader(b,b.VERTEX_SHADER,l),d&&d.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 f=b.getProgramInfoLog(y);throw new h(f,"Error linking program:"+f)}w=w||s.uniforms(b,y),A=A||s.attributes(b,y),b.deleteProgram(y)}A=A.slice(),A.sort(p);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 se=0;se<w.length;++se)X[se]=b.getUniformLocation(g.program,w[se].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 c(l);return g.update(_,w,A,M),g}e.exports=T},9499:function(e,t,r){"use strict";e.exports=oe;var o=r(8828),a=r(2762),n=r(8116),i=r(7766),s=r(1888),h=r(6729),c=r(5298),m=r(9994),p=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,d=M.createPickShader,u=M.createPickContourShader,y=4*10,f=[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,ce){this.position=ae,this.index=j,this.uv=Q,this.level=re,this.dataCoordinate=ce}var F=256;function N(ae,j,Q,re,ce,be,Ae,De,ze,Ze,at,nt,rt,st,Me){this.gl=ae,this.shape=j,this.bounds=Q,this.objectOffset=Me,this.intensityBounds=[],this._shader=re,this._pickShader=ce,this._coordinateBuffer=be,this._vao=Ae,this._colorMap=De,this._contourShader=ze,this._contourPickShader=Ze,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=rt,this._dynamicVAO=st,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=[p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0]),p(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=m([h({colormap:ae,nshades:F,format:"rgba"}).map(function(ce,be){var Ae=j?P(be/255,j):ce[3];return Ae<1&&(Q=!0),[ce[0],ce[1],ce[2],255*Ae]})]);return c.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:[f.slice(),f.slice(),f.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,ce,be=j.axes&&j.axes.lastCubeProps.axis||U,Ae=j.showSurface,De=j.showContour;for(Q=0;Q<3;++Q)for(Ae=Ae||j.surfaceProject[Q],re=0;re<3;++re)De=De||j.contourProject[Q][re];for(Q=0;Q<3;++Q){var ze=B.projections[Q];for(re=0;re<16;++re)ze[re]=0;for(re=0;re<4;++re)ze[5*re]=1;ze[5*Q]=0,ze[12+Q]=j.axesBounds[+(be[Q]>0)][Q],l(ze,ae.model,ze);var Ze=B.clipBounds[Q];for(ce=0;ce<2;++ce)for(re=0;re<3;++re)Ze[ce][re]=ae.clipBounds[ce][re];Ze[0][Q]=-1e8,Ze[1][Q]=1e8}return B.showSurface=Ae,B.showContour=De,B}var $={model:f,view:f,projection:f,inverseModel:f.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},se=f.slice(),le=[1,0,0,0,1,0,0,0,1];function fe(ae,j){ae=ae||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=$;re.model=ae.model||f,re.view=ae.view||f,re.projection=ae.projection||f,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 ce=0;ce<2;++ce)for(var be=re.clipBounds[ce],Ae=0;Ae<3;++Ae)be[Ae]=Math.min(Math.max(this.clipBounds[ce][Ae],-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=le,re.vertexColor=this.vertexColor;var De=se;for(l(De,re.view,re.model),l(De,re.projection,De),_(De,De),ce=0;ce<3;++ce)re.eyePosition[ce]=De[12+ce]/De[15];var ze=De[15];for(ce=0;ce<3;++ce)ze+=this.lightPosition[ce]*De[4*ce+3];for(ce=0;ce<3;++ce){var Ze=De[12+ce];for(Ae=0;Ae<3;++Ae)Ze+=De[4*Ae+ce]*this.lightPosition[Ae];re.lightPosition[ce]=Ze/ze}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),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=at.projections[ce],this._shader.uniforms.clipBounds=at.clipBounds[ce],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 rt=this._contourVAO;for(rt.bind(),ce=0;ce<3;++ce)for(nt.uniforms.permutation=L[ce],Q.lineWidth(this.contourWidth[ce]*this.pixelRatio),Ae=0;Ae<this.contourLevels[ce].length;++Ae)Ae===this.highlightLevel[ce]?(nt.uniforms.contourColor=this.highlightColor[ce],nt.uniforms.contourTint=this.highlightTint[ce]):(Ae===0||Ae-1===this.highlightLevel[ce])&&(nt.uniforms.contourColor=this.contourColor[ce],nt.uniforms.contourTint=this.contourTint[ce]),this._contourCounts[ce][Ae]&&(nt.uniforms.height=this.contourLevels[ce][Ae],rt.draw(Q.LINES,this._contourCounts[ce][Ae],this._contourOffsets[ce][Ae]));for(ce=0;ce<3;++ce)for(nt.uniforms.model=at.projections[ce],nt.uniforms.clipBounds=at.clipBounds[ce],Ae=0;Ae<3;++Ae)if(this.contourProject[ce][Ae]){nt.uniforms.permutation=L[Ae],Q.lineWidth(this.contourWidth[Ae]*this.pixelRatio);for(var st=0;st<this.contourLevels[Ae].length;++st)st===this.highlightLevel[Ae]?(nt.uniforms.contourColor=this.highlightColor[Ae],nt.uniforms.contourTint=this.highlightTint[Ae]):(st===0||st-1===this.highlightLevel[Ae])&&(nt.uniforms.contourColor=this.contourColor[Ae],nt.uniforms.contourTint=this.contourTint[Ae]),this._contourCounts[Ae][st]&&(nt.uniforms.height=this.contourLevels[Ae][st],rt.draw(Q.LINES,this._contourCounts[Ae][st],this._contourOffsets[Ae][st]))}for(rt.unbind(),rt=this._dynamicVAO,rt.bind(),ce=0;ce<3;++ce)if(this._dynamicCounts[ce]!==0)for(nt.uniforms.model=re.model,nt.uniforms.clipBounds=re.clipBounds,nt.uniforms.permutation=L[ce],Q.lineWidth(this.dynamicWidth[ce]*this.pixelRatio),nt.uniforms.contourColor=this.dynamicColor[ce],nt.uniforms.contourTint=this.dynamicTint[ce],nt.uniforms.height=this.dynamicLevel[ce],rt.draw(Q.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]),Ae=0;Ae<3;++Ae)this.contourProject[Ae][ce]&&(nt.uniforms.model=at.projections[Ae],nt.uniforms.clipBounds=at.clipBounds[Ae],rt.draw(Q.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]));rt.unbind()}}O.draw=function(ae){return fe.call(this,ae,!1)},O.drawTransparent=function(ae){return fe.call(this,ae,!0)};var V={model:f,view:f,projection:f,inverseModel:f,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=V;Q.model=ae.model||f,Q.view=ae.view||f,Q.projection=ae.projection||f,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=le;for(var re=0;re<2;++re)for(var ce=Q.clipBounds[re],be=0;be<3;++be)ce[be]=Math.min(Math.max(this.clipBounds[re][be],-1e8),1e8);var Ae=X(Q,this);if(Ae.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=Ae.projections[re],this._pickShader.uniforms.clipBounds=Ae.clipBounds[re],this._vao.draw(j.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var De=this._contourPickShader;De.bind(),De.uniforms=Q;var ze=this._contourVAO;for(ze.bind(),be=0;be<3;++be)for(j.lineWidth(this.contourWidth[be]*this.pixelRatio),De.uniforms.permutation=L[be],re=0;re<this.contourLevels[be].length;++re)this._contourCounts[be][re]&&(De.uniforms.height=this.contourLevels[be][re],ze.draw(j.LINES,this._contourCounts[be][re],this._contourOffsets[be][re]));for(re=0;re<3;++re)for(De.uniforms.model=Ae.projections[re],De.uniforms.clipBounds=Ae.clipBounds[re],be=0;be<3;++be)if(this.contourProject[re][be]){De.uniforms.permutation=L[be],j.lineWidth(this.contourWidth[be]*this.pixelRatio);for(var Ze=0;Ze<this.contourLevels[be].length;++Ze)this._contourCounts[be][Ze]&&(De.uniforms.height=this.contourLevels[be][Ze],ze.draw(j.LINES,this._contourCounts[be][Ze],this._contourOffsets[be][Ze]))}ze.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,ce=Math.floor(re),be=re-ce,Ae=j[1]*(ae.value[1]+(ae.value[2]&15)/16)/255,De=Math.floor(Ae),ze=Ae-De;ce+=1,De+=1;var Ze=Q.position;Ze[0]=Ze[1]=Ze[2]=0;for(var at=0;at<2;++at)for(var nt=at?be:1-be,rt=0;rt<2;++rt)for(var st=rt?ze:1-ze,Me=ce+at,ye=De+rt,he=nt*st,Oe=0;Oe<3;++Oe)Ze[Oe]+=this._field[Oe].get(Me,ye)*he;for(var tt=this._pickResult.level,ot=0;ot<3;++ot)if(tt[ot]=w.le(this.contourLevels[ot],Ze[ot]),tt[ot]<0)this.contourLevels[ot].length>0&&(tt[ot]=0);else if(tt[ot]<this.contourLevels[ot].length-1){var Qe=this.contourLevels[ot][tt[ot]],Pt=this.contourLevels[ot][tt[ot]+1];Math.abs(Qe-Ze[ot])>Math.abs(Pt-Ze[ot])&&(tt[ot]+=1)}for(Q.index[0]=be<.5?ce:ce+1,Q.index[1]=ze<.5?De:De+1,Q.uv[0]=re/j[0],Q.uv[1]=Ae/j[1],Oe=0;Oe<3;++Oe)Q.dataCoordinate[Oe]=this._field[Oe].get(Q.index[0],Q.index[1]);return Q},O.padField=function(ae,j){var Q=j.shape.slice(),re=ae.shape.slice();c.assign(ae.lo(1,1).hi(Q[0],Q[1]),j),c.assign(ae.lo(1).hi(Q[0],1),j.hi(Q[0],1)),c.assign(ae.lo(1,re[1]-1).hi(Q[0],1),j.lo(0,Q[1]-1).hi(Q[0],1)),c.assign(ae.lo(0,1).hi(1,Q[1]),j.hi(1)),c.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]=p(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 ce=this.shape,be=0;be<2;++be)this._field[2].size>this._field[be].data.length&&(s.freeFloat(this._field[be].data),this._field[be].data=s.mallocFloat(this._field[2].size)),this._field[be]=p(this._field[be].data,[ce[0]+2,ce[1]+2]);if(ae.coords){var Ae=ae.coords;if(!Array.isArray(Ae)||Ae.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(be=0;be<2;++be){var De=Ae[be];for(rt=0;rt<2;++rt)if(De.shape[rt]!==ce[rt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[be],De)}}else if(ae.ticks){var ze=ae.ticks;if(!Array.isArray(ze)||ze.length!==2)throw new Error("gl-surface: invalid ticks");for(be=0;be<2;++be){var Ze=ze[be];if((Array.isArray(Ze)||Ze.length)&&(Ze=p(Ze)),Ze.shape[0]!==ce[be])throw new Error("gl-surface: invalid tick length");var at=p(Ze.data,ce);at.stride[be]=Ze.stride[0],at.stride[be^1]=0,this.padField(this._field[be],at)}}else{for(be=0;be<2;++be){var nt=[0,0];nt[be]=1,this._field[be]=p(this._field[be].data,[ce[0]+2,ce[1]+2],nt,0)}this._field[0].set(0,0,0);for(var rt=0;rt<ce[0];++rt)this._field[0].set(rt+1,0,rt);for(this._field[0].set(ce[0]+1,0,ce[0]-1),this._field[1].set(0,0,0),rt=0;rt<ce[1];++rt)this._field[1].set(0,rt+1,rt);this._field[1].set(0,ce[1]+1,ce[1]-1)}var st=this._field,Me=p(s.mallocFloat(st[2].size*3*2),[3,ce[0]+2,ce[1]+2,2]);for(be=0;be<3;++be)A(Me.pick(be),st[be],"mirror");var ye=p(s.mallocFloat(st[2].size*3),[ce[0]+2,ce[1]+2,3]);for(be=0;be<ce[0]+2;++be)for(rt=0;rt<ce[1]+2;++rt){var he=Me.get(0,be,rt,0),Oe=Me.get(0,be,rt,1),tt=Me.get(1,be,rt,0),ot=Me.get(1,be,rt,1),Qe=Me.get(2,be,rt,0),Pt=Me.get(2,be,rt,1),It=tt*Pt-ot*Qe,qt=Qe*Oe-Pt*he,Wt=he*ot-Oe*tt,kr=Math.sqrt(It*It+qt*qt+Wt*Wt);kr<1e-8?(kr=Math.max(Math.abs(It),Math.abs(qt),Math.abs(Wt)),kr<1e-8?(Wt=1,qt=It=0,kr=1):kr=1/kr):kr=1/Math.sqrt(kr),ye.set(be,rt,0,It*kr),ye.set(be,rt,1,qt*kr),ye.set(be,rt,2,Wt*kr)}s.free(Me.data);var mr=[1/0,1/0,1/0],qr=[-1/0,-1/0,-1/0],Sr=1/0,Rr=-1/0,wt=(ce[0]-1)*(ce[1]-1)*6,Ne=s.mallocFloat(o.nextPow2(10*wt)),Ke=0,Te=0;for(be=0;be<ce[0]-1;++be)e:for(rt=0;rt<ce[1]-1;++rt){for(var Ie=0;Ie<2;++Ie)for(var Ve=0;Ve<2;++Ve)for(var Ce=0;Ce<3;++Ce){var Ee=this._field[Ce].get(1+be+Ie,1+rt+Ve);if(isNaN(Ee)||!isFinite(Ee))continue e}for(Ce=0;Ce<6;++Ce){var Pe=be+R[Ce][0],ft=rt+R[Ce][1],ct=this._field[0].get(Pe+1,ft+1),_t=this._field[1].get(Pe+1,ft+1);Ee=this._field[2].get(Pe+1,ft+1),It=ye.get(Pe+1,ft+1,0),qt=ye.get(Pe+1,ft+1,1),Wt=ye.get(Pe+1,ft+1,2),ae.intensity&&(Ct=ae.intensity.get(Pe,ft));var Ct=ae.intensity?ae.intensity.get(Pe,ft):Ee+this.objectOffset[2];Ne[Ke++]=Pe,Ne[Ke++]=ft,Ne[Ke++]=ct,Ne[Ke++]=_t,Ne[Ke++]=Ee,Ne[Ke++]=0,Ne[Ke++]=Ct,Ne[Ke++]=It,Ne[Ke++]=qt,Ne[Ke++]=Wt,mr[0]=Math.min(mr[0],ct+this.objectOffset[0]),mr[1]=Math.min(mr[1],_t+this.objectOffset[1]),mr[2]=Math.min(mr[2],Ee+this.objectOffset[2]),Sr=Math.min(Sr,Ct),qr[0]=Math.max(qr[0],ct+this.objectOffset[0]),qr[1]=Math.max(qr[1],_t+this.objectOffset[1]),qr[2]=Math.max(qr[2],Ee+this.objectOffset[2]),Rr=Math.max(Rr,Ct),Te+=1}}for(ae.intensityBounds&&(Sr=+ae.intensityBounds[0],Rr=+ae.intensityBounds[1]),be=6;be<Ke;be+=10)Ne[be]=(Ne[be]-Sr)/(Rr-Sr);this._vertexCount=Te,this._coordinateBuffer.update(Ne.subarray(0,Ke)),s.freeFloat(Ne),s.free(ye.data),this.bounds=[mr,qr],this.intensity=ae.intensity||this._field[2],(this.intensityBounds[0]!==Sr||this.intensityBounds[1]!==Rr)&&(Q=!0),this.intensityBounds=[Sr,Rr]}if("levels"in ae){var ir=ae.levels;for(Array.isArray(ir[0])?ir=ir.slice():ir=[[],[],ir],be=0;be<3;++be)ir[be]=ir[be].slice(),ir[be].sort(function(pi,Ra){return pi-Ra});for(be=0;be<3;++be)for(rt=0;rt<ir[be].length;++rt)ir[be][rt]-=this.objectOffset[be];e:for(be=0;be<3;++be){if(ir[be].length!==this.contourLevels[be].length){Q=!0;break}for(rt=0;rt<ir[be].length;++rt)if(ir[be][rt]!==this.contourLevels[be][rt]){Q=!0;break e}}this.contourLevels=ir}if(Q){st=this._field,ce=this.shape;for(var rr=[],er=0;er<3;++er){var Lr=this.contourLevels[er],fa=[],Da=[],Ia=[0,0,0];for(be=0;be<Lr.length;++be){var qa=T(this._field[er],Lr[be]);fa.push(rr.length/5|0),Te=0;e:for(rt=0;rt<qa.cells.length;++rt){var Wa=qa.cells[rt];for(Ce=0;Ce<2;++Ce){var Ca=qa.positions[Wa[Ce]],hi=Ca[0],wi=Math.floor(hi)|0,Kt=hi-wi,Ft=Ca[1],Yt=Math.floor(Ft)|0,Jt=Ft-Yt,Fr=!1;t:for(var ta=0;ta<3;++ta){Ia[ta]=0;var ra=(er+ta+1)%3;for(Ie=0;Ie<2;++Ie){var ca=Ie?Kt:1-Kt;for(Pe=Math.min(Math.max(wi+Ie,0),ce[0])|0,Ve=0;Ve<2;++Ve){var Ba=Ve?Jt:1-Jt;if(ft=Math.min(Math.max(Yt+Ve,0),ce[1])|0,ta<2?Ee=this._field[ra].get(Pe,ft):Ee=(this.intensity.get(Pe,ft)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Ee)||isNaN(Ee)){Fr=!0;break t}var $a=ca*Ba;Ia[ta]+=$a*Ee}}}if(!Fr)rr.push(Ia[0],Ia[1],Ca[0],Ca[1],Ia[2]),Te+=1;else{if(Ce>0){for(var Za=0;Za<5;++Za)rr.pop();Te-=1}continue e}}}Da.push(Te)}this._contourOffsets[er]=fa,this._contourCounts[er]=Da}var ri=s.mallocFloat(rr.length);for(be=0;be<rr.length;++be)ri[be]=rr[be];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,ce=this.shape,be=s.mallocFloat(12*ce[0]*ce[1]),Ae=0;Ae<3;++Ae){if(!this.enableDynamic[Ae]){this.dynamicLevel[Ae]=NaN,this._dynamicCounts[Ae]=0;continue}this.dynamicLevel[Ae]=Q[Ae];var De=(Ae+1)%3,ze=(Ae+2)%3,Ze=this._field[Ae],at=this._field[De],nt=this._field[ze],rt=T(Ze,Q[Ae]),st=rt.cells,Me=rt.positions;for(this._dynamicOffsets[Ae]=re,j=0;j<st.length;++j)for(var ye=st[j],he=0;he<2;++he){var Oe=Me[ye[he]],tt=+Oe[0],ot=tt|0,Qe=Math.min(ot+1,ce[0])|0,Pt=tt-ot,It=1-Pt,qt=+Oe[1],Wt=qt|0,kr=Math.min(Wt+1,ce[1])|0,mr=qt-Wt,qr=1-mr,Sr=It*qr,Rr=It*mr,wt=Pt*qr,Ne=Pt*mr,Ke=Sr*at.get(ot,Wt)+Rr*at.get(ot,kr)+wt*at.get(Qe,Wt)+Ne*at.get(Qe,kr),Te=Sr*nt.get(ot,Wt)+Rr*nt.get(ot,kr)+wt*nt.get(Qe,Wt)+Ne*nt.get(Qe,kr);if(isNaN(Ke)||isNaN(Te)){he&&(re-=1);break}be[2*re+0]=Ke,be[2*re+1]=Te,re+=1}this._dynamicCounts[Ae]=re-this._dynamicOffsets[Ae]}this._dynamicBuffer.update(be.subarray(0,2*re)),s.freeFloat(be)}};function oe(ae){var j=ae.gl,Q=g(j),re=d(j),ce=b(j),be=u(j),Ae=a(j),De=n(j,[{buffer:Ae,size:4,stride:y,offset:0},{buffer:Ae,size:3,stride:y,offset:16},{buffer:Ae,size:3,stride:y,offset:28}]),ze=a(j),Ze=n(j,[{buffer:ze,size:4,stride:20,offset:0},{buffer:ze,size:1,stride:20,offset:16}]),at=a(j),nt=n(j,[{buffer:at,size:2,type:j.FLOAT}]),rt=i(j,1,F,j.RGBA,j.UNSIGNED_BYTE);rt.minFilter=j.LINEAR,rt.magFilter=j.LINEAR;var st=new N(j,[0,0],[[0,0,0],[0,0,0]],Q,re,Ae,De,rt,ce,be,ze,Ze,at,nt,[0,0,0]),Me={levels:[[],[],[]]};for(var ye in ae)Me[ye]=ae[ye];return Me.colormap=Me.colormap||"jet",st.update(Me),st}},9507:function(e){e.exports=!0},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,d){return new _(M,d)}},1:function(T,l,_){function w(M,g,b,d){this.data=M,this.shape=[g],this.stride=[b],this.offset=d|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,d=0,u=this.shape[0],y=this.stride[0];return typeof g=="number"&&g>=0&&(d=g|0,b+=y*d,u-=d),new w(this.data,u,y,b)},A.step=function(g){var b=this.shape[0],d=this.stride[0],u=this.offset,y=0,f=Math.ceil;return typeof g=="number"&&(y=g|0,y<0?(u+=d*(b-1),b=f(-b/y)):b=f(b/y),d*=y),new w(this.data,b,d,u)},A.transpose=function(g){g=g===void 0?0:g|0;var b=this.shape,d=this.stride;return new w(this.data,b[g],d[g],this.offset)},A.pick=function(g){var b=[],d=[],u=this.offset;typeof g=="number"&&g>=0?u=u+this.stride[0]*g|0:(b.push(this.shape[0]),d.push(this.stride[0]));var y=l[b.length+1];return y(this.data,b,d,u)},function(g,b,d,u){return new w(g,b[0],d[0],u)}},2:function(T,l,_){function w(M,g,b,d,u,y){this.data=M,this.shape=[g,b],this.stride=[d,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,d){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b,d):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]=d},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 d=this.offset,u=0,y=this.shape[0],f=this.shape[1],R=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(u=g|0,d+=R*u,y-=u),typeof b=="number"&&b>=0&&(u=b|0,d+=L*u,f-=u),new w(this.data,y,f,R,L,d)},A.step=function(g,b){var d=this.shape[0],u=this.shape[1],y=this.stride[0],f=this.stride[1],R=this.offset,L=0,z=Math.ceil;return typeof g=="number"&&(L=g|0,L<0?(R+=y*(d-1),d=z(-d/L)):d=z(d/L),y*=L),typeof b=="number"&&(L=b|0,L<0?(R+=f*(u-1),u=z(-u/L)):u=z(u/L),f*=L),new w(this.data,d,u,y,f,R)},A.transpose=function(g,b){g=g===void 0?0:g|0,b=b===void 0?1:b|0;var d=this.shape,u=this.stride;return new w(this.data,d[g],d[b],u[g],u[b],this.offset)},A.pick=function(g,b){var d=[],u=[],y=this.offset;typeof g=="number"&&g>=0?y=y+this.stride[0]*g|0:(d.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(d.push(this.shape[1]),u.push(this.stride[1]));var f=l[d.length+1];return f(this.data,d,u,y)},function(g,b,d,u){return new w(g,b[0],b[1],d[0],d[1],u)}},3:function(T,l,_){function w(M,g,b,d,u,y,f,R){this.data=M,this.shape=[g,b,d],this.stride=[u,y,f],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]),d=Math.abs(this.stride[2]);return g>b?b>d?[2,1,0]:g>d?[1,2,0]:[1,0,2]:g>d?[2,0,1]:d>b?[0,1,2]:[0,2,1]}}),A.set=function(g,b,d,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d,u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d]=u},A.get=function(g,b,d){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d]},A.index=function(g,b,d){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d},A.hi=function(g,b,d){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 d!="number"||d<0?this.shape[2]:d|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(g,b,d){var u=this.offset,y=0,f=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,f-=y),typeof b=="number"&&b>=0&&(y=b|0,u+=F*y,R-=y),typeof d=="number"&&d>=0&&(y=d|0,u+=N*y,L-=y),new w(this.data,f,R,L,z,F,N,u)},A.step=function(g,b,d){var u=this.shape[0],y=this.shape[1],f=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 d=="number"&&(N=d|0,N<0?(F+=z*(f-1),f=O(-f/N)):f=O(f/N),z*=N),new w(this.data,u,y,f,R,L,z,F)},A.transpose=function(g,b,d){g=g===void 0?0:g|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0;var u=this.shape,y=this.stride;return new w(this.data,u[g],u[b],u[d],y[g],y[b],y[d],this.offset)},A.pick=function(g,b,d){var u=[],y=[],f=this.offset;typeof g=="number"&&g>=0?f=f+this.stride[0]*g|0:(u.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?f=f+this.stride[1]*b|0:(u.push(this.shape[1]),y.push(this.stride[1])),typeof d=="number"&&d>=0?f=f+this.stride[2]*d|0:(u.push(this.shape[2]),y.push(this.stride[2]));var R=l[u.length+1];return R(this.data,u,y,f)},function(g,b,d,u){return new w(g,b[0],b[1],b[2],d[0],d[1],d[2],u)}},4:function(T,l,_){function w(M,g,b,d,u,y,f,R,L,z){this.data=M,this.shape=[g,b,d,u],this.stride=[y,f,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,d,u,y){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u,y):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]=y},A.get=function(g,b,d,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]},A.index=function(g,b,d,u){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u},A.hi=function(g,b,d,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 d!="number"||d<0?this.shape[2]:d|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,d,u){var y=this.offset,f=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&&(f=g|0,y+=N*f,R-=f),typeof b=="number"&&b>=0&&(f=b|0,y+=O*f,L-=f),typeof d=="number"&&d>=0&&(f=d|0,y+=P*f,z-=f),typeof u=="number"&&u>=0&&(f=u|0,y+=U*f,F-=f),new w(this.data,R,L,z,F,N,O,P,U,y)},A.step=function(g,b,d,u){var y=this.shape[0],f=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*(f-1),f=B(-f/U)):f=B(f/U),F*=U),typeof d=="number"&&(U=d|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,f,R,L,z,F,N,O,P)},A.transpose=function(g,b,d,u){g=g===void 0?0:g|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0,u=u===void 0?3:u|0;var y=this.shape,f=this.stride;return new w(this.data,y[g],y[b],y[d],y[u],f[g],f[b],f[d],f[u],this.offset)},A.pick=function(g,b,d,u){var y=[],f=[],R=this.offset;typeof g=="number"&&g>=0?R=R+this.stride[0]*g|0:(y.push(this.shape[0]),f.push(this.stride[0])),typeof b=="number"&&b>=0?R=R+this.stride[1]*b|0:(y.push(this.shape[1]),f.push(this.stride[1])),typeof d=="number"&&d>=0?R=R+this.stride[2]*d|0:(y.push(this.shape[2]),f.push(this.stride[2])),typeof u=="number"&&u>=0?R=R+this.stride[3]*u|0:(y.push(this.shape[3]),f.push(this.stride[3]));var L=l[y.length+1];return L(this.data,y,f,R)},function(g,b,d,u){return new w(g,b[0],b[1],b[2],b[3],d[0],d[1],d[2],d[3],u)}},5:function(l,_,w){function A(g,b,d,u,y,f,R,L,z,F,N,O){this.data=g,this.shape=[b,d,u,y,f],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,d,u,y,f,R){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f,R):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f]=R},M.get=function(b,d,u,y,f){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f]},M.index=function(b,d,u,y,f){return this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f},M.hi=function(b,d,u,y,f){return new A(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof d!="number"||d<0?this.shape[1]:d|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof y!="number"||y<0?this.shape[3]:y|0,typeof f!="number"||f<0?this.shape[4]:f|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(b,d,u,y,f){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],se=this.stride[4];return typeof b=="number"&&b>=0&&(L=b|0,R+=U*L,z-=L),typeof d=="number"&&d>=0&&(L=d|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 f=="number"&&f>=0&&(L=f|0,R+=se*L,P-=L),new A(this.data,z,F,N,O,P,U,B,X,$,se,R)},M.step=function(b,d,u,y,f){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,se=0,le=Math.ceil;return typeof b=="number"&&(se=b|0,se<0?($+=O*(R-1),R=le(-R/se)):R=le(R/se),O*=se),typeof d=="number"&&(se=d|0,se<0?($+=P*(L-1),L=le(-L/se)):L=le(L/se),P*=se),typeof u=="number"&&(se=u|0,se<0?($+=U*(z-1),z=le(-z/se)):z=le(z/se),U*=se),typeof y=="number"&&(se=y|0,se<0?($+=B*(F-1),F=le(-F/se)):F=le(F/se),B*=se),typeof f=="number"&&(se=f|0,se<0?($+=X*(N-1),N=le(-N/se)):N=le(N/se),X*=se),new A(this.data,R,L,z,F,N,O,P,U,B,X,$)},M.transpose=function(b,d,u,y,f){b=b===void 0?0:b|0,d=d===void 0?1:d|0,u=u===void 0?2:u|0,y=y===void 0?3:y|0,f=f===void 0?4:f|0;var R=this.shape,L=this.stride;return new A(this.data,R[b],R[d],R[u],R[y],R[f],L[b],L[d],L[u],L[y],L[f],this.offset)},M.pick=function(b,d,u,y,f){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 d=="number"&&d>=0?z=z+this.stride[1]*d|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 f=="number"&&f>=0?z=z+this.stride[4]*f|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,d,u,y){return new A(b,d[0],d[1],d[2],d[3],d[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,m[T][0]):w(T,m[T],i)}function c(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 m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function p(T,l,_,w){if(T===void 0){var u=m.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=c(T),d=m[b];d.length<=A+1;)d.push(h(b,d.length-1));var u=d[A+1];return u(T,l,_,w)}e.exports=p},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],c=r[6],m=r[7],p=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,d=o*c-n*s,u=o*m-i*s,y=a*c-n*h,f=a*m-i*h,R=n*m-i*c,L=p*A-T*w,z=p*M-l*w,F=p*g-_*w,N=T*M-l*A,O=T*g-_*A,P=l*g-_*M;return b*P-d*O+u*N+y*F-f*z+R*L}},9922:function(e,t,r){e.exports=a;var o=r(2613);function a(n,i){var s=n[0],h=n[1],c=n[2],m=i[0],p=i[1],T=i[2];return Math.abs(s-m)<=o*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(h-p)<=o*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(c-T)<=o*Math.max(1,Math.abs(c),Math.abs(T))}},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)}},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 c(_,w,A,M){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(M,2))}function m(_,w){var A=w[0],M=w[1],g=w[2],b=w[3],d=c(A,M,g,b);d>1e-6?(_[0]=A/d,_[1]=M/d,_[2]=g/d,_[3]=b/d):(_[0]=_[1]=_[2]=0,_[3]=1)}function p(_,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=p.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;m(w,w);var A=this.computedMatrix;n(A,w);var M=this.computedCenter,g=this.computedEye,b=this.computedUp,d=Math.exp(this.computedRadius[0]);g[0]=M[0]+d*A[2],g[1]=M[1]+d*A[6],g[2]=M[2]+d*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,f=0;f<3;++f)y+=A[u+4*f]*g[f];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],d=g[5],u=g[9],y=h(b,d,u);b/=y,d/=y,u/=y;var f=g[0],R=g[4],L=g[8],z=f*b+R*d+L*u;f-=b*z,R-=d*z,L-=u*z;var F=h(f,R,L);f/=F,R/=F,L/=F;var N=g[2],O=g[6],P=g[10],U=N*b+O*d+P*u,B=N*f+O*R+P*L;N-=U*b+B*f,O-=U*d+B*R,P-=U*u+B*L;var X=h(N,O,P);N/=X,O/=X,P/=X;var $=f*w+b*A,se=R*w+d*A,le=L*w+u*A;this.center.move(_,$,se,le);var fe=Math.exp(this.computedRadius[0]);fe=Math.max(1e-4,fe+M),this.radius.set(_,Math.log(fe))},T.rotate=function(_,w,A,M){this.recalcMatrix(_),w=w||0,A=A||0;var g=this.computedMatrix,b=g[0],d=g[4],u=g[8],y=g[1],f=g[5],R=g[9],L=g[2],z=g[6],F=g[10],N=w*b+A*y,O=w*d+A*f,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))),se=c(U,B,X,$);se>1e-6?(U/=se,B/=se,X/=se,$/=se):(U=B=X=0,$=1);var le=this.computedRotation,fe=le[0],V=le[1],Y=le[2],ee=le[3],q=fe*$+ee*U+V*X-Y*B,oe=V*$+ee*B+Y*U-fe*X,ae=Y*$+ee*X+fe*B-V*U,j=ee*$-fe*U-V*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+oe*X-ae*B,oe=oe*$+j*B+ae*U-q*X,ae=ae*$+j*X+q*B-oe*U,j=j*$-q*U-oe*B-ae*X}var re=c(q,oe,ae,j);re>1e-6?(q/=re,oe/=re,ae/=re,j/=re):(q=oe=ae=0,j=1),this.rotation.set(_,q,oe,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]),m(b,b),this.rotation.set(_,b[0],b[1],b[2],b[3]);for(var d=0,u=0;u<3;++u)d+=Math.pow(A[u]-w[u],2);this.radius.set(_,.5*Math.log(Math.max(d,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]),m(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,d=M[13]/g,u=M[14]/g;this.recalcMatrix(_);var y=Math.exp(this.computedRadius[0]);this.center.set(_,b-M[2]*y,d-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),m(A,A);var g=new p(A,w,Math.log(M));return g.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&g.lookAt(0,_.eye,_.center,_.up),g}},9994:function(e,t,r){"use strict";var o=r(9618),a=r(8277);e.exports=function(i,s){for(var h=[],c=i,m=1;Array.isArray(c);)h.push(c.length),m*=c.length,c=c[0];return h.length===0?o():(s||(s=o(new Float64Array(m),h)),a(s,i),s)}}},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 v[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);G.exports=E})()}}),xE=Xe({"node_modules/color-name/index.js"(Z,G){"use strict";G.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=Xe({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,G){"use strict";var v=xE();G.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(),v[E])t=v[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(p,T){if(/%$/.test(p))return T===n?parseFloat(p)/100:a==="rgb"?parseFloat(p)*255/100:parseFloat(p);if(a[T]==="h"){if(/deg$/.test(p))return parseFloat(p);if(x[p]!==void 0)return x[p]}return parseFloat(p)}),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(c){return parseFloat(c)}),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=Xe({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,G){"use strict";var v=GN();G.exports=function(E){Array.isArray(E)&&E.raw&&(E=String.raw.apply(null,arguments));var e,t,r,o=v(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=Xe({"node_modules/clamp/index.js"(Z,G){G.exports=v;function v(x,S,E){return S<E?x<S?S:x>E?E:x:x<E?E:x>S?S:x}}}),Q3=Xe({"node_modules/dtype/index.js"(Z,G){G.exports=function(v){switch(v){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=Xe({"node_modules/color-normalize/index.js"(Z,G){"use strict";var v=HN(),x=mx(),S=Q3();G.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=v(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=Xe({"src/lib/str2rgbarray.js"(Z,G){"use strict";var v=d0();function x(S){return S?v(S):[0,0,0,1]}G.exports=x}}),tm=Xe({"src/lib/gl_format_color.js"(Z,G){"use strict";var v=rs(),x=Ch(),S=d0(),E=rc(),e=sh().defaultLine,t=bp().isArrayOrTypedArray,r=S(e),o=1;function a(c,m){var p=c;return p[3]*=m,p}function n(c){if(v(c))return r;var m=S(c);return m.length?m:r}function i(c){return v(c)?c:o}function s(c,m,p){var T=c.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),_=t(m),w=E.extractOpts(c),A=[],M,g,b,d,u;if(w.colorscale!==void 0?M=E.makeColorScaleFuncFromTrace(c):M=n,l?g=function(f,R){return f[R]===void 0?r:S(M(f[R]))}:g=n,_?b=function(f,R){return f[R]===void 0?o:i(f[R])}:b=i,l||_)for(var y=0;y<p;y++)d=g(T,y),u=b(m,y),A[y]=a(d,u);else A=a(S(T),m);return A}function h(c){var m=E.extractOpts(c),p=m.colorscale;return m.reversescale&&(p=E.flipScale(m.colorscale)),p.map(function(T){var l=T[0],_=x(T[1]),w=_.toRgb();return{index:l,rgb:[w.r,w.g,w.b,w.a]}})}G.exports={formatColor:s,parseColorScale:h}}}),bE=Xe({"src/constants/gl3d_dashes.js"(Z,G){"use strict";G.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=Xe({"src/constants/gl3d_markers.js"(Z,G){"use strict";G.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}}}),WN=Xe({"src/traces/scatter3d/calc_errors.js"(Z,G){"use strict";var v=so();function x(e,t,r,o){if(!t||!t.visible)return null;for(var a=v.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]),c=e[i]-s[0],m=e[i]+s[1];if(n[i]=[(o.c2l(c,!0)-h)*r,(o.c2l(m,!0)-h)*r],c>0){var p=o.c2l(c);o._lowerLogErrorBound||(o._lowerLogErrorBound=p),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,p)}}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 c=0;c<2;c++)s[c][h]=o[h][i][c];n[i]=s}return n}G.exports=E}}),XN=Xe({"src/traces/scatter3d/convert.js"(Z,G){"use strict";var v=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=Go(),h=$p().appendArrayPointValue,c=WN();function m(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 p=m.prototype;p.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],se=0;se<$.length;++se)$[se]=P[$[se]];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 d(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||[],se=L.y||[],le=L.z||[],fe=$.length,V=L.xcalendar,Y=L.ycalendar,ee=L.zcalendar,q,oe,ae,j,Q,re;for(Q=0;Q<fe;Q++)q=O.d2l($[Q],0,V)*N[0],oe=P.d2l(se[Q],0,Y)*N[1],ae=U.d2l(le[Q],0,ee)*N[2],z[Q]=[q,oe,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(fe),Q=0;Q<fe;Q++)re[Q]=L.text;function ce(tt,ot){var Qe=F[tt];return s.tickText(Qe,Qe.d2l(ot),!0).text}var be=L.texttemplate;if(be){var Ae=R.fullLayout,De=Ae._d3locale,ze=Array.isArray(be),Ze=ze?Math.min(be.length,fe):fe,at=ze?function(tt){return be[tt]}:function(){return be};for(re=new Array(Ze),Q=0;Q<Ze;Q++){var nt={x:$[Q],y:se[Q],z:le[Q]},rt={xLabel:ce("xaxis",$[Q]),yLabel:ce("yaxis",se[Q]),zLabel:ce("zaxis",le[Q])},st={};h(st,L,Q),re[Q]=t.texttemplateString({data:[st,nt,L._meta],fallback:L.texttemplatefallback,labels:rt,locale:De,template:at(Q)})}}if(j={position:z,mode:L.mode,text:re},"line"in L&&(j.lineColor=o(X,1,fe),j.lineWidth=X.width,j.lineDashes=X.dash),"marker"in L){var Me=a(L);j.scatterColor=o(B,1,fe),j.scatterSize=b(B.size,fe,M,20,Me),j.scatterMarker=b(B.symbol,fe,g,"\u25CF"),j.scatterLineWidth=B.line.width,j.scatterLineColor=o(B.line,1,fe),j.scatterAngle=0}"textposition"in L&&(j.textOffset=A(L.textposition),j.textColor=o(L.textfont,1,fe),j.textSize=b(L.textfont.size,fe,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 ye=["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 he=L.projection[ye[Q]];(j.project[Q]=he.show)&&(j.projectOpacity[Q]=he.opacity,j.projectScale[Q]=he.scale)}j.errorBounds=c(L,N,F);var Oe=l([L.error_x,L.error_y,L.error_z]);return j.errorColor=Oe.color,j.errorLineWidth=Oe.lineWidth,j.errorCapSize=Oe.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}p.update=function(R){var L=this.scene.glplot.gl,z,F,N,O,P=n.solid;this.data=R;var U=d(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=v(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)},p.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 f(R,L){var z=new m(R,L.uid);return z.update(L),z}G.exports=f}}),wE=Xe({"src/traces/scatter3d/attributes.js"(Z,G){"use strict";var v=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(),c=v.line,m=v.marker,p=m.line,T=i({width:c.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 _=G.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:i({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z"),mode:i({},v.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:v.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:h(n),dflt:"circle",arrayOk:!0},size:i({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:i({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:i({width:i({},p.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:i({},v.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=Xe({"src/traces/scatter3d/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=Fu(),E=md(),e=Dd(),t=zd(),r=wE();G.exports=function(n,i,s,h){function c(M,g){return x.coerce(n,i,r,M,g)}var m=o(n,i,c,h);if(!m){i.visible=!1;return}c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("xhoverformat"),c("yhoverformat"),c("zhoverformat"),c("mode"),S.hasMarkers(i)&&E(n,i,s,h,c,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(i)&&(c("connectgaps"),e(n,i,s,h,c)),S.hasText(i)&&(c("texttemplate"),c("texttemplatefallback"),t(n,i,h,c,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(i.line||{}).color,T=(i.marker||{}).color;c("surfaceaxis")>=0&&c("surfacecolor",p||T);for(var l=["x","y","z"],_=0;_<3;++_){var w="projection."+l[_];c(w+".show")&&(c(w+".opacity"),c(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(n,i,p||T||s,{axis:"z"}),A(n,i,p||T||s,{axis:"y",inherit:"z"}),A(n,i,p||T||s,{axis:"x",inherit:"z"})};function o(a,n,i,s){var h=0,c=i("x"),m=i("y"),p=i("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,n,["x","y","z"],s),c&&m&&p&&(h=Math.min(c.length,m.length,p.length),n._length=n._xlength=n._ylength=n._zlength=h),h}}}),YN=Xe({"src/traces/scatter3d/calc.js"(Z,G){"use strict";var v=Av(),x=Fd();G.exports=function(E,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),x(E,e),t}}}),KN=Xe({"node_modules/get-canvas-context/index.js"(Z,G){G.exports=v;function v(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=Xe({"node_modules/webgl-context/index.js"(Z,G){var v=KN();G.exports=function(S){return v("webgl",S)}}}),TE=Xe({"src/lib/show_no_webgl_msg.js"(Z,G){"use strict";var v=$n(),x=function(){};G.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=v.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=v.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=Xe({"src/plots/gl3d/layout/convert.js"(Z,G){"use strict";var v=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]=v(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]=v(i.linecolor)),"linewidth"in i&&(a.lineWidth[n]=i.linewidth),"showgrid"in i&&(a.gridEnable[n]=i.showgrid),"gridcolor"in i&&(a.gridColor[n]=v(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]=v(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]=v(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]=v(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]=v(i.backgroundcolor)):a.backgroundEnable[n]=!1}};function t(r,o){var a=new E;return a.merge(r,o),a}G.exports=t}}),QN=Xe({"src/plots/gl3d/layout/spikes.js"(Z,G){"use strict";var v=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]=v(o.spikecolor),this.drawSides[r]=o.spikesides,this.lineWidth[r]=o.spikethickness}};function e(t){var r=new S;return r.merge(t),r}G.exports=e}}),eU=Xe({"src/plots/gl3d/layout/tick_marks.js"(Z,G){"use strict";G.exports=t;var v=Go(),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 c=h.tickmode;if(h.tickmode==="auto"){h.tickmode="linear";var m=h.nticks||x.constrain(h._length/40,4,9);v.autoTicks(h,Math.abs(h.range[1]-h.range[0])/m)}for(var p=v.calcTicks(h,{msUTC:!0}),T=0;T<p.length;++T)p[T].x=p[T].x*r.dataScale[s],h.type==="date"&&(p[T].text=p[T].text.replace(/\<br\>/g," "));i[s]=p,h.tickmode=c}}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=Xe({"src/plots/gl3d/scene.js"(Z,G){"use strict";var v=Yh().gl_plot3d,x=v.createCamera,S=v.createScene,E=JN(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Go(),n=rf(),i=em(),s=TE(),h=U5(),c=$N(),m=QN(),p=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=c(F,F[this.id]),this.spikeOptions=m(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",$),p(z),z.glplot.axes.update(z.axesOptions);for(var se=Object.keys(z.traces),le=null,fe=z.glplot.selection,V=0;V<se.length;++V)N=z.traces[se[V]],N.data.hoverinfo!=="skip"&&N.handlePick(fe)&&(le=N),N.setContourLevels&&N.setContourLevels();function Y(Ze,at,nt){var rt=z.fullSceneLayout[Ze+"axis"];return rt.type!=="log"&&(at=rt.d2l(at)),a.hoverLabelText(rt,at,nt)}if(le!==null){var ee=h(z.glplot.cameraParams,fe.dataCoordinate);N=le.data;var q=F._fullData[N.index],oe=fe.index,ae={xLabel:Y("x",fe.traceCoordinate[0],N.xhoverformat),yLabel:Y("y",fe.traceCoordinate[1],N.yhoverformat),zLabel:Y("z",fe.traceCoordinate[2],N.zhoverformat)},j=n.castHoverinfo(q,z.fullLayout,oe),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&&(fe.textLabel=void 0),Q.indexOf("name")===-1&&(le.name=void 0));var ce,be=[];N.type==="cone"||N.type==="streamtube"?(ae.uLabel=Y("x",fe.traceCoordinate[3],N.uhoverformat),(re||Q.indexOf("u")!==-1)&&be.push("u: "+ae.uLabel),ae.vLabel=Y("y",fe.traceCoordinate[4],N.vhoverformat),(re||Q.indexOf("v")!==-1)&&be.push("v: "+ae.vLabel),ae.wLabel=Y("z",fe.traceCoordinate[5],N.whoverformat),(re||Q.indexOf("w")!==-1)&&be.push("w: "+ae.wLabel),ae.normLabel=fe.traceCoordinate[6].toPrecision(3),(re||Q.indexOf("norm")!==-1)&&be.push("norm: "+ae.normLabel),N.type==="streamtube"&&(ae.divergenceLabel=fe.traceCoordinate[7].toPrecision(3),(re||Q.indexOf("divergence")!==-1)&&be.push("divergence: "+ae.divergenceLabel)),fe.textLabel&&be.push(fe.textLabel),ce=be.join("<br>")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(fe.traceCoordinate[3]),N.valuehoverformat),be.push("value: "+ae.valueLabel),fe.textLabel&&be.push(fe.textLabel),ce=be.join("<br>")):ce=fe.textLabel;var Ae={x:fe.traceCoordinate[0],y:fe.traceCoordinate[1],z:fe.traceCoordinate[2],data:q._input,fullData:q,curveNumber:q.index,pointNumber:oe};n.appendArrayPointValue(Ae,q,oe),N._module.eventData&&(Ae=q._module.eventData(Ae,fe,q,{},oe));var De={points:[Ae]};if(z.fullSceneLayout.hovermode){var ze=[];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:ce,name:le.name,color:n.castHoverOption(q,oe,"bgcolor")||le.color,borderColor:n.castHoverOption(q,oe,"bordercolor"),fontFamily:n.castHoverOption(q,oe,"font.family"),fontSize:n.castHoverOption(q,oe,"font.size"),fontColor:n.castHoverOption(q,oe,"font.color"),nameLength:n.castHoverOption(q,oe,"namelength"),textAlign:n.castHoverOption(q,oe,"align"),hovertemplate:r.castOption(q,oe,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Ae,ae),eventData:[Ae]},{container:O,gd:F,inOut_bbox:ze}),Ae.bbox=ze[0]}fe.distance<5&&(fe.buttons||w)?F.emit("plotly_click",De):F.emit("plotly_hover",De),this.oldEventData=De}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 d(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],se=F[B+"calendar"],le=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][P]=Math.min(N[0][P],0),N[1][P]=Math.max(N[1][P],le-1);else for(var fe,V=0;V<(le||$.length);V++)if(r.isArrayOrTypedArray($[V]))for(var Y=0;Y<$[V].length;++Y)fe=X.d2l($[V][Y],0,se),!isNaN(fe)&&isFinite(fe)&&(N[0][P]=Math.min(N[0][P],fe),N[1][P]=Math.max(N[1][P],fe));else fe=X.d2l($[V],0,se),!isNaN(fe)&&isFinite(fe)&&(N[0][P]=Math.min(N[0][P],fe),N[1][P]=Math.max(N[1][P],fe))}}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 se=O[$];if(se.visible){var le=X.r2l(se[B]);!isNaN(le)&&isFinite(le)&&(F[0][P]=Math.min(F[0][P],le),F[1][P]=Math.max(F[1][P],le))}}}M.plot=function(z,F,N){var O=this;if(O.plotArgs=[z,F,N],!O.glplot.contextLost){var P,U,B,X,$,se,le=F[O.id],fe=N[O.id];O.fullLayout=F,O.fullSceneLayout=le,O.axesOptions.merge(F,le),O.spikeOptions.merge(le),O.setViewport(le),O.updateFx(le.dragmode,le.hovermode),O.camera.enableWheel=O.graphDiv._context._scrollZoom.gl3d,O.glplot.setClearColor(i(le.bgcolor)),O.setConvert($),z?Array.isArray(z)||(z=[z]):z=[];var V=[[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)&&d(this,P,V);u(this,V);var Y=[1,1,1];for(X=0;X<3;++X)V[1][X]===V[0][X]?Y[X]=1:Y[X]=1/(V[1][X]-V[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(Qe,Pt){return Qe._trace.data.index-Pt._trace.data.index});var q=[[0,0,0],[0,0,0]],oe=[],ae={};for(B=0;B<3;++B){$=le[b[B]],se=$.type,se in ae?(ae[se].acc*=Y[B],ae[se].count+=1):ae[se]={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||[],ce=$._name.charAt(0);for(X=0;X<Q.length;X++){var be=Q[X],Ae=be.bounds,De=be._trace.data._pad||0;be.constructor.name==="ErrorBars"&&$._lowerLogErrorBound?q[0][B]=Math.min(q[0][B],$._lowerLogErrorBound):q[0][B]=Math.min(q[0][B],Ae[0][B]/Y[B]-De),q[1][B]=Math.max(q[1][B],Ae[1][B]/Y[B]+De)}for(X=0;X<re.length;X++){var ze=re[X];if(ze.visible){var Ze=$.r2l(ze[ce]);q[0][B]=Math.min(q[0][B],Ze),q[1][B]=Math.max(q[1][B],Ze)}}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),oe[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 rt,st=le.aspectmode;if(st==="cube")rt=[1,1,1];else if(st==="manual"){var Me=le.aspectratio;rt=[Me.x,Me.y,Me.z]}else if(st==="auto"||st==="data"){var ye=[1,1,1];for(B=0;B<3;++B){$=le[b[B]],se=$.type;var he=ae[se];ye[B]=Math.pow(he.acc,1/he.count)/Y[B]}st==="data"||Math.max.apply(null,ye)/Math.min.apply(null,ye)<=4?rt=ye:rt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");le.aspectratio.x=fe.aspectratio.x=rt[0],le.aspectratio.y=fe.aspectratio.y=rt[1],le.aspectratio.z=fe.aspectratio.z=rt[2],O.glplot.setAspectratio(le.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:le.aspectratio.x,y:le.aspectratio.y,z:le.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=le.aspectmode);var Oe=le.domain||null,tt=F._size||null;if(Oe&&tt){var ot=O.container.style;ot.position="absolute",ot.left=tt.l+Oe.x[0]*tt.w+"px",ot.top=tt.t+(1-Oe.y[1])*tt.h+"px",ot.width=tt.w*(Oe.x[1]-Oe.x[0])+"px",ot.height=tt.h*(Oe.y[1]-Oe.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 f(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()),f(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(se,le,fe,V){var Y=["up","center","eye"],ee=["x","y","z"];return le[Y[fe]]&&se[Y[fe]][ee[V]]===le[Y[fe]][ee[V]]}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,$,se=F.isCameraChanged(z),le=F.isAspectChanged(z),fe=se||le;if(fe){var V={};if(se&&(O=F.getCamera(),P=r.nestedProperty(z,F.id+".camera"),U=P.get(),V[F.id+".camera"]=U),le&&(B=F.glplot.getAspectratio(),X=r.nestedProperty(z,F.id+".aspectratio"),$=X.get(),V[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,V),se){P.set(O);var Y=r.nestedProperty(N,F.id+".camera");Y.set(O)}if(le){X.set(B);var ee=r.nestedProperty(N,F.id+".aspectratio");ee.set(B),F.glplot.redraw()}}return fe},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,se=B.up.z;if(se/Math.sqrt(X*X+$*$+se*se)<.999){var le=N.id+".camera.up",fe={x:0,y:0,z:1},V={};V[le]=fe;var Y=P.layout;t.call("_storeDirectGUIEdit",Y,U._preGUI,V),B.up=fe,r.nestedProperty(Y,le).set(fe)}}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,se=z[X];z[X]=z[$],z[$]=se}}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 se;switch(z){case"jpeg":se=B.toDataURL("image/jpeg");break;case"webp":se=B.toDataURL("image/webp");break;default:se=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),se},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)},G.exports=A}}),rU=Xe({"src/plots/gl3d/layout/attributes.js"(Z,G){"use strict";G.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=Xe({"src/plots/gl3d/layout/axis_attributes.js"(Z,G){"use strict";var v=$n(),x=Wh(),S=Qo().extendFlat,E=pc().overrideAll;G.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:v.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=Xe({"src/plots/gl3d/layout/layout_attributes.js"(Z,G){"use strict";var v=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"}}G.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:v,yaxis:v,zaxis:v,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=Xe({"src/plots/gl3d/layout/axis_defaults.js"(Z,G){"use strict";var v=Ch().mix,x=sa(),S=zl(),E=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;G.exports=function(n,i,s){var h,c;function m(l,_){return x.coerce(h,c,E,l,_)}for(var p=0;p<r.length;p++){var T=r[p];h=n[T]||{},c=S.newContainer(i,T),c._id=T[0]+s.scene,c._name=T,e(h,c,m,s),t(h,c,m,{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),m("gridcolor",v(c.color,s.bgColor,o).toRgbString()),m("title.text",T[0]),c.setScale=x.noop,m("showspikes")&&(m("spikesides"),m("spikethickness"),m("spikecolor",c.color)),m("showaxeslabels"),m("showbackground")&&m("backgroundcolor")}}}}),iU=Xe({"src/plots/gl3d/layout/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=so(),E=o0(),e=aU(),t=SE(),r=Hh().getSubplotData,o="gl3d";G.exports=function(i,s,h){var c=s._basePlotModules.length>1;function m(p){if(!c){var T=v.validate(i[p],t[p]);if(T)return i[p]}}E(i,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:m,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(n,i,s,h){for(var c=s("bgcolor"),m=x.combine(c,h.paper_bgcolor),p=["up","center","eye"],T=0;T<p.length;T++)s("camera."+p[T]+".x"),s("camera."+p[T]+".y"),s("camera."+p[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:m,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,d=n.camera.up.z;d!==0&&(!g||!b||!d||d/Math.sqrt(g*g+b*b+d*d)>.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),v0=Xe({"src/plots/gl3d/index.js"(Z){"use strict";var G=pc().overrideAll,v=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=G({hoverlabel:v.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 c=s[h],m=S(i,t,c),p=n[c],T=p.camera,l=p._scene;l||(l=new x({id:c,graphDiv:a,container:a.querySelector(".gl-container"),staticPlot:a._context.staticPlot,plotGlPixelRatio:a._context.plotGlPixelRatio,camera:T},n),p._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(m,n,a.layout)}},Z.clean=function(o,a,n,i){for(var s=i._subplots[t]||[],h=0;h<s.length;h++){var c=s[h];!a[c]&&i[c]._scene&&(i[c]._scene.destroy(),i._infolayer&&i._infolayer.selectAll(".annotation-"+c).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]],c=h.domain,m=h._scene,p=m.toImage("png"),T=a._glimages.append("svg:image");T.attr({xmlns:e.svg,"xlink:href":p,x:i.l+i.w*c.x[0],y:i.t+i.h*(1-c.y[1]),width:i.w*(c.x[1]-c.x[0]),height:i.h*(c.y[1]-c.y[0]),preserveAspectRatio:"none"}),m.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=Xe({"src/traces/scatter3d/index.js"(Z,G){"use strict";G.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=Xe({"lib/scatter3d.js"(Z,G){"use strict";G.exports=nU()}}),gx=Xe({"src/traces/surface/attributes.js"(Z,G){"use strict";var v=$n(),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:v.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:v.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=G.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=Xe({"src/traces/surface/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=_h(),E=gx(),e=.1;function t(n,i){for(var s=[],h=32,c=0;c<h;c++){var m=c/(h-1),p=i+(1-i)*(1-Math.pow(Math.sin(n*m*Math.PI),2));s.push([m,Math.max(0,Math.min(1,p))])}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 c,m;function p(u,y){return x.coerce(n,i,E,u,y)}var T=p("x"),l=p("y"),_=p("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=v.getComponentMethod("calendars","handleTraceDefaults");w(n,i,["x","y","z"],h),p("text"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback"),p("xhoverformat"),p("yhoverformat"),p("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(u){p(u)});var A=p("surfacecolor"),M=["x","y","z"];for(c=0;c<3;++c){var g="contours."+M[c],b=p(g+".show"),d=p(g+".highlight");if(b||d)for(m=0;m<3;++m)p(g+".project."+M[m]);b&&(p(g+".color"),p(g+".width"),p(g+".usecolormap")),d&&(p(g+".highlightcolor"),p(g+".highlightwidth")),p(g+".start"),p(g+".end"),p(g+".size")}S(n,i,h,p,{prefix:"",cLetter:"c"}),a(n,i,h,p),i._length=null}function a(n,i,s,h){var c=h("opacityscale");c==="max"?i.opacityscale=[[0,e],[1,1]]:c==="min"?i.opacityscale=[[0,1],[1,e]]:c==="extremes"?i.opacityscale=t(1,e):r(c)||(i.opacityscale=void 0)}G.exports={supplyDefaults:o,opacityscaleDefaults:a}}}),sU=Xe({"src/traces/surface/calc.js"(Z,G){"use strict";var v=Tp();G.exports=function(S,E){E.surfacecolor?v(S,E,{vals:E.surfacecolor,containerStr:"",cLetter:"c"}):v(S,E,{vals:E.z,containerStr:"",cLetter:"c"})}}}),lU=Xe({"src/traces/surface/convert.js"(Z,G){"use strict";var v=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,f,R){this.scene=y,this.uid=R,this.surface=f,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,f,R,L){var z=t(this.data.x)?t(this.data.x[0])?this.data.x[f][y]:this.data.x[y]:y;return R===void 0?z:L.d2l(z,0,R)},i.getYat=function(y,f,R,L){var z=t(this.data.y)?t(this.data.y[0])?this.data.y[f][y]:this.data.y[f]:f;return R===void 0?z:L.d2l(z,0,R)},i.getZat=function(y,f,R,L){var z=this.data.z[f][y];return z===null&&this.data.connectgaps&&this.data._interpolatedZ&&(z=this.data._interpolatedZ[f][y]),R===void 0?z:L.d2l(z,0,R)},i.handlePick=function(y){if(y.object===this.surface){var f=(y.data.index[0]-1)/this.dataScaleX-1,R=(y.data.index[1]-1)/this.dataScaleY-1,L=Math.max(Math.min(Math.round(f),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 f=y[0].rgb,R=y[y.length-1].rgb;return f[0]===R[0]&&f[1]===R[1]&&f[2]===R[2]&&f[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 c(y,f){if(y<f)return 0;for(var R=0;Math.floor(y%f)===0;)y/=f,R++;return R}function m(y){for(var f=[],R=0;R<h.length;R++){var L=h[R];f.push(c(y,L))}return f}function p(y){for(var f=m(y),R=y,L=0;L<h.length;L++)if(f[L]>0){R=h[L];break}return R}function T(y,f){if(!(y<1||f<1)){for(var R=m(y),L=m(f),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 f=1,R=0;R<y.length;R++)f=T(f,y[R]);return f}}i.calcXnums=function(y){var f,R=[];for(f=1;f<y;f++){var L=this.getXat(f-1,0),z=this.getXat(f,0);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?R[f-1]=Math.abs(z-L):R[f-1]=0}var F=0;for(f=1;f<y;f++)F+=R[f-1];for(f=1;f<y;f++)R[f-1]===0?R[f-1]=1:R[f-1]=Math.round(F/R[f-1]);return R},i.calcYnums=function(y){var f,R=[];for(f=1;f<y;f++){var L=this.getYat(0,f-1),z=this.getYat(0,f);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?R[f-1]=Math.abs(z-L):R[f-1]=0}var F=0;for(f=1;f<y;f++)F+=R[f-1];for(f=1;f<y;f++)R[f-1]===0?R[f-1]=1:R[f-1]=Math.round(F/R[f-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,f){for(var R=f===0?this.calcXnums(y):this.calcYnums(y),L=1+l(R);L<w;)L*=2;for(;L>A;)L--,L/=p(L),L++,L<w&&(L=A);var z=Math.round(L/y);return z>1?z:1};function M(y,f,R){var L=R[8]+R[2]*f[0]+R[5]*f[1];return y[0]=(R[6]+R[0]*f[0]+R[3]*f[1])/L,y[1]=(R[7]+R[1]*f[0]+R[4]*f[1])/L,y}function g(y,f,R){return b(y,f,M,R),y}function b(y,f,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(f,z[0],z[1]));return y}i.refineCoords=function(y){for(var f=this.dataScaleX,R=this.dataScaleY,L=y[0].shape[0],z=y[0].shape[1],F=Math.floor(y[0].shape[0]*f+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/f,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 d(y,f){for(var R=!1,L=0;L<y.length;L++)if(f===y[L]){R=!0;break}R===!1&&y.push(f)}i.setContourLevels=function(){var y=[[],[],[]],f=[!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(f[L]=!0,z=this.contourStart[L];z<this.contourEnd[L];z+=this.contourSize[L])F=z*this.scene.dataScale[L],d(y[L],F);if(R){var N=[[],[],[]];for(L=0;L<3;++L)this.showContour[L]&&(N[L]=f[L]?y[L]:this.scene.contourLevels[L]);this.surface.update({levels:N})}},i.update=function(y){var f=this.scene,R=f.fullSceneLayout,L=this.surface,z=r(y),F=f.dataScale,N=y.z[0].length,O=y._ylength,P=f.contourLevels;this.data=y;var U,B,X,$,se=[];for(U=0;U<3;U++)for(se[U]=[],B=0;B<N;B++)se[U][B]=[];for(B=0;B<N;B++)for(X=0;X<O;X++)se[0][B][X]=this.getXat(B,X,y.xcalendar,R.xaxis),se[1][B][X]=this.getYat(B,X,y.ycalendar,R.yaxis),se[2][B][X]=this.getZat(B,X,y.zcalendar,R.zaxis);if(y.connectgaps)for(y._emptypoints=e(se[2]),E(se[2],y._emptypoints),y._interpolatedZ=[],B=0;B<N;B++)for(y._interpolatedZ[B]=[],X=0;X<O;X++)y._interpolatedZ[B][X]=se[2][B][X];for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)$=se[U][B][X],$==null?se[U][B][X]=NaN:$=se[U][B][X]*=F[U];for(U=0;U<3;U++)for(B=0;B<N;B++)for(X=0;X<O;X++)$=se[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++)$=se[U][B][X],$!=null&&(se[U][B][X]-=this.objectOffset[U]);var le=[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++)le[U].set(B,X,se[U][B][X]);se=[];var fe={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},V=a(y);if(fe.intensityBounds=[V.min,V.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]);le.push(Y)}else fe.intensityBounds[0]*=F[2],fe.intensityBounds[1]*=F[2];(A<le[0].shape[0]||A<le[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(le[0].shape[0],0),this.dataScaleY=this.estimateScale(le[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(le)),y.surfacecolor&&(fe.intensity=le.pop());var ee=[!0,!0,!0],q=["x","y","z"];for(U=0;U<3;++U){var oe=y.contours[q[U]];ee[U]=oe.highlight,fe.showContour[U]=oe.show||oe.highlight,fe.showContour[U]&&(fe.contourProject[U]=[oe.project.x,oe.project.y,oe.project.z],oe.show?(this.showContour[U]=!0,fe.levels[U]=P[U],L.highlightColor[U]=fe.contourColor[U]=o(oe.color),oe.usecolormap?L.highlightTint[U]=fe.contourTint[U]=0:L.highlightTint[U]=fe.contourTint[U]=1,fe.contourWidth[U]=oe.width,this.contourStart[U]=oe.start,this.contourEnd[U]=oe.end,this.contourSize[U]=oe.size):(this.showContour[U]=!1,this.contourStart[U]=null,this.contourEnd[U]=null,this.contourSize[U]=0),oe.highlight&&(fe.dynamicColor[U]=o(oe.highlightcolor),fe.dynamicWidth[U]=oe.highlightwidth))}s(z)&&(fe.vertexColor=!0),fe.objectOffset=this.objectOffset,fe.coords=le,L.update(fe),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,f){var R=y.glplot.gl,L=v({gl:R}),z=new n(y,L,f.uid);return L._trace=z,z.update(f),y.glplot.add(L),z}G.exports=u}}),uU=Xe({"src/traces/surface/index.js"(Z,G){"use strict";G.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=Xe({"lib/surface.js"(Z,G){"use strict";G.exports=uU()}}),M1=Xe({"src/traces/mesh3d/attributes.js"(Z,G){"use strict";var v=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=gx(),t=ru(),r=Qo().extendFlat;G.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"}},v("",{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=Xe({"src/traces/isosurface/attributes.js"(Z,G){"use strict";var v=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=G.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})},v("",{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=Xe({"src/traces/isosurface/defaults.js"(Z,G){"use strict";var v=sa(),x=so(),S=tT(),E=_h();function e(r,o,a,n){function i(s,h){return v.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 c=i("x"),m=i("y"),p=i("z"),T=i("value");if(!c||!c.length||!m||!m.length||!p||!p.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 d="slices."+M,u=i(d+".show");u&&(i(d+".fill"),i(d+".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}G.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=Xe({"src/traces/streamtube/calc.js"(Z,G){"use strict";var v=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 c=0,m=1/0,p;for(p=0;p<o._len;p++){var T=o._u[p],l=o._v[p],_=o._w[p],w=Math.sqrt(T*T+l*l+_*_);c=Math.max(c,w),m=Math.min(m,w)}for(x(r,o,{vals:[m,c],containerStr:"",cLetter:"c"}),p=0;p<n;p++){var A=i[p];a.xMax=Math.max(a.xMax,A),a.xMin=Math.min(a.xMin,A);var M=s[p];a.yMax=Math.max(a.yMax,M),a.yMin=Math.min(a.yMin,M);var g=h[p];a.zMax=Math.max(a.zMax,g),a.zMin=Math.min(a.zMin,g)}o._slen=n,o._normMax=c,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,c,m=-1/0,p=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,A="",M,g,b,d,u,y,f,R,L;for(i&&(d=o[0],y=a[0],R=n[0]),i>1&&(u=o[i-1],f=a[i-1],L=n[i-1]),s=0;s<i;s++)m=Math.max(m,o[s]),p=Math.min(p,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]!==d&&(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",(d>u?"-":"+")+"x"),A=A.replace("y",(y>f?"-":"+")+"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(be){return be==="x"?o:be==="y"?a:n},U=function(be){return be==="x"?z:be==="y"?F:N},B=function(be){return be[i-1]<be[0]?-1:1},X=P(A[1]),$=P(A[3]),se=P(A[5]),le=U(A[1]).length,fe=U(A[3]).length,V=U(A[5]).length,Y=!1,ee=function(be,Ae,De){return le*(fe*be+Ae)+De},q=B(P(A[1])),oe=B(P(A[3])),ae=B(P(A[5]));for(s=0;s<V-1;s++){for(h=0;h<fe-1;h++){for(c=0;c<le-1;c++){var j=ee(s,h,c),Q=ee(s,h,c+1),re=ee(s,h+1,c),ce=ee(s+1,h,c);if((!(X[j]*q<X[Q]*q)||!($[j]*oe<$[re]*oe)||!(se[j]*ae<se[ce]*ae))&&(Y=!0),Y)break}if(Y)break}if(Y)break}return Y&&(v.warn("Encountered arbitrary coordinates! Unable to input data grid."),O()),{xMin:p,yMin:l,zMin:w,xMax:m,yMax:T,zMax:_,Xs:z,Ys:F,Zs:N,len:i,fill:A}}function e(r){return v.distinctVals(r).vals}function t(r,o){if(o===void 0&&(o=r.length),v.isTypedArray(r))return r.subarray(0,o);for(var a=[],n=0;n<o;n++)a[n]=+r[n];return a}G.exports={calc:S,filter:t,processGrid:E}}}),kE=Xe({"src/traces/isosurface/calc.js"(Z,G){"use strict";var v=Tp(),x=rT().processGrid,S=rT().filter;G.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,v(e,t,{vals:[t._vMin,t._vMax],containerStr:"",cLetter:"c"})}}}),E1=Xe({"src/plots/gl3d/zip3.js"(Z,G){"use strict";G.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=Xe({"src/traces/isosurface/convert.js"(Z,G){"use strict";var v=Yh().gl_mesh3d,x=tm().parseColorScale,S=sa().isArrayOrTypedArray,E=em(),e=rc().extractOpts,t=E1(),r=function(h,c){for(var m=c.length-1;m>0;m--){var p=Math.min(c[m],c[m-1]),T=Math.max(c[m],c[m-1]);if(T>p&&p<h&&h<=T)return{id:m,distRatio:(T-h)/(T-p)}}return{id:0,distRatio:0}};function o(h,c,m){this.scene=h,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=o.prototype;a.handlePick=function(h){if(h.object===this.mesh){var c=h.data.index,m=this.data._meshX[c],p=this.data._meshY[c],T=this.data._meshZ[c],l=this.data._Ys.length,_=this.data._Zs.length,w=r(m,this.data._Xs).id,A=r(p,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 c=this.scene,m=c.fullSceneLayout;this.data=i(h);function p(A,M,g,b){return M.map(function(d){return A.d2l(d,0,b)*g})}var T=t(p(m.xaxis,h._meshX,c.dataScale[0],h.xcalendar),p(m.yaxis,h._meshY,c.dataScale[1],h.ycalendar),p(m.zaxis,h._meshZ,c.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 c=h.surface.show,m=h.spaceframe.show,p=h.surface.fill,T=h.spaceframe.fill,l=!1,_=!1,w=0,A,M,g=h._Xs,b=h._Ys,d=h._Zs,u=g.length,y=b.length,f=d.length,R=n.indexOf(h._gridFill.replace(/-/g,"").replace(/\+/g,"")),L=function(wt,Ne,Ke){switch(R){case 5:return Ke+f*Ne+f*y*wt;case 4:return Ke+f*wt+f*u*Ne;case 3:return Ne+y*Ke+y*f*wt;case 2:return Ne+y*wt+y*u*Ke;case 1:return wt+u*Ke+u*f*Ne;default:return wt+u*Ne+u*y*Ke}},z=h._minValues,F=h._maxValues,N=h._vMin,O=h._vMax,P,U,B,X;function $(wt,Ne,Ke){for(var Te=X.length,Ie=M;Ie<Te;Ie++)if(wt===P[Ie]&&Ne===U[Ie]&&Ke===B[Ie])return Ie;return-1}function se(){M=A}function le(){P=[],U=[],B=[],X=[],A=0,se()}function fe(wt,Ne,Ke,Te){return P.push(wt),U.push(Ne),B.push(Ke),X.push(Te),A++,A-1}function V(wt,Ne,Ke){return h._meshI.push(wt),h._meshJ.push(Ne),h._meshK.push(Ke),w++,w-1}function Y(wt,Ne,Ke){for(var Te=[],Ie=0;Ie<wt.length;Ie++)Te[Ie]=(wt[Ie]+Ne[Ie]+Ke[Ie])/3;return Te}function ee(wt,Ne,Ke){for(var Te=[],Ie=0;Ie<wt.length;Ie++)Te[Ie]=wt[Ie]*(1-Ke)+Ke*Ne[Ie];return Te}var q;function oe(wt){q=wt}function ae(wt,Ne){var Ke=wt[0],Te=wt[1],Ie=wt[2],Ve=Y(Ke,Te,Ie),Ce=Math.sqrt(1-q),Ee=ee(Ve,Ke,Ce),Pe=ee(Ve,Te,Ce),ft=ee(Ve,Ie,Ce),ct=Ne[0],_t=Ne[1],Ct=Ne[2];return{xyzv:[[Ke,Te,Pe],[Pe,Ee,Ke],[Te,Ie,ft],[ft,Pe,Te],[Ie,Ke,Ee],[Ee,ft,Ie]],abc:[[ct,_t,-1],[-1,-1,ct],[_t,Ct,-1],[-1,-1,_t],[Ct,ct,-1],[-1,-1,Ct]]}}function j(wt,Ne){return wt==="all"||wt===null?!0:wt.indexOf(Ne)>-1}function Q(wt,Ne){return wt===null?Ne:wt}function re(wt,Ne,Ke){se();var Te=[Ne],Ie=[Ke];if(q>=1)Te=[Ne],Ie=[Ke];else if(q>0){var Ve=ae(Ne,Ke);Te=Ve.xyzv,Ie=Ve.abc}for(var Ce=0;Ce<Te.length;Ce++){Ne=Te[Ce],Ke=Ie[Ce];for(var Ee=[],Pe=0;Pe<3;Pe++){var ft=Ne[Pe][0],ct=Ne[Pe][1],_t=Ne[Pe][2],Ct=Ne[Pe][3],ir=Ke[Pe]>-1?Ke[Pe]:$(ft,ct,_t);ir>-1?Ee[Pe]=ir:Ee[Pe]=fe(ft,ct,_t,Q(wt,Ct))}V(Ee[0],Ee[1],Ee[2])}}function ce(wt,Ne,Ke){var Te=function(Ie,Ve,Ce){re(wt,[Ne[Ie],Ne[Ve],Ne[Ce]],[Ke[Ie],Ke[Ve],Ke[Ce]])};Te(0,1,2),Te(2,3,0)}function be(wt,Ne,Ke){var Te=function(Ie,Ve,Ce){re(wt,[Ne[Ie],Ne[Ve],Ne[Ce]],[Ke[Ie],Ke[Ve],Ke[Ce]])};Te(0,1,2),Te(3,0,1),Te(2,3,0),Te(1,2,3)}function Ae(wt,Ne,Ke,Te){var Ie=wt[3];Ie<Ke&&(Ie=Ke),Ie>Te&&(Ie=Te);for(var Ve=(wt[3]-Ie)/(wt[3]-Ne[3]+1e-9),Ce=[],Ee=0;Ee<4;Ee++)Ce[Ee]=(1-Ve)*wt[Ee]+Ve*Ne[Ee];return Ce}function De(wt,Ne,Ke){return wt>=Ne&&wt<=Ke}function ze(wt){var Ne=.001*(O-N);return wt>=N-Ne&&wt<=O+Ne}function Ze(wt){for(var Ne=[],Ke=0;Ke<4;Ke++){var Te=wt[Ke];Ne.push([h._x[Te],h._y[Te],h._z[Te],h._value[Te]])}return Ne}var at=3;function nt(wt,Ne,Ke,Te,Ie,Ve){Ve||(Ve=1),Ke=[-1,-1,-1];var Ce=!1,Ee=[De(Ne[0][3],Te,Ie),De(Ne[1][3],Te,Ie),De(Ne[2][3],Te,Ie)];if(!Ee[0]&&!Ee[1]&&!Ee[2])return!1;var Pe=function(ct,_t,Ct){return ze(_t[0][3])&&ze(_t[1][3])&&ze(_t[2][3])?(re(ct,_t,Ct),!0):Ve<at?nt(ct,_t,Ct,N,O,++Ve):!1};if(Ee[0]&&Ee[1]&&Ee[2])return Pe(wt,Ne,Ke)||Ce;var ft=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(ct){if(Ee[ct[0]]&&Ee[ct[1]]&&!Ee[ct[2]]){var _t=Ne[ct[0]],Ct=Ne[ct[1]],ir=Ne[ct[2]],rr=Ae(ir,_t,Te,Ie),er=Ae(ir,Ct,Te,Ie);Ce=Pe(wt,[er,rr,_t],[-1,-1,Ke[ct[0]]])||Ce,Ce=Pe(wt,[_t,Ct,er],[Ke[ct[0]],Ke[ct[1]],-1])||Ce,ft=!0}}),ft||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(ct){if(Ee[ct[0]]&&!Ee[ct[1]]&&!Ee[ct[2]]){var _t=Ne[ct[0]],Ct=Ne[ct[1]],ir=Ne[ct[2]],rr=Ae(Ct,_t,Te,Ie),er=Ae(ir,_t,Te,Ie);Ce=Pe(wt,[er,rr,_t],[-1,-1,Ke[ct[0]]])||Ce,ft=!0}}),Ce}function rt(wt,Ne,Ke,Te){var Ie=!1,Ve=Ze(Ne),Ce=[De(Ve[0][3],Ke,Te),De(Ve[1][3],Ke,Te),De(Ve[2][3],Ke,Te),De(Ve[3][3],Ke,Te)];if(!Ce[0]&&!Ce[1]&&!Ce[2]&&!Ce[3])return Ie;if(Ce[0]&&Ce[1]&&Ce[2]&&Ce[3])return _&&(Ie=be(wt,Ve,Ne)||Ie),Ie;var Ee=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Pe){if(Ce[Pe[0]]&&Ce[Pe[1]]&&Ce[Pe[2]]&&!Ce[Pe[3]]){var ft=Ve[Pe[0]],ct=Ve[Pe[1]],_t=Ve[Pe[2]],Ct=Ve[Pe[3]];if(_)Ie=re(wt,[ft,ct,_t],[Ne[Pe[0]],Ne[Pe[1]],Ne[Pe[2]]])||Ie;else{var ir=Ae(Ct,ft,Ke,Te),rr=Ae(Ct,ct,Ke,Te),er=Ae(Ct,_t,Ke,Te);Ie=re(null,[ir,rr,er],[-1,-1,-1])||Ie}Ee=!0}}),Ee||([[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(Pe){if(Ce[Pe[0]]&&Ce[Pe[1]]&&!Ce[Pe[2]]&&!Ce[Pe[3]]){var ft=Ve[Pe[0]],ct=Ve[Pe[1]],_t=Ve[Pe[2]],Ct=Ve[Pe[3]],ir=Ae(_t,ft,Ke,Te),rr=Ae(_t,ct,Ke,Te),er=Ae(Ct,ct,Ke,Te),Lr=Ae(Ct,ft,Ke,Te);_?(Ie=re(wt,[ft,Lr,ir],[Ne[Pe[0]],-1,-1])||Ie,Ie=re(wt,[ct,rr,er],[Ne[Pe[1]],-1,-1])||Ie):Ie=ce(null,[ir,rr,er,Lr],[-1,-1,-1,-1])||Ie,Ee=!0}}),Ee)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Pe){if(Ce[Pe[0]]&&!Ce[Pe[1]]&&!Ce[Pe[2]]&&!Ce[Pe[3]]){var ft=Ve[Pe[0]],ct=Ve[Pe[1]],_t=Ve[Pe[2]],Ct=Ve[Pe[3]],ir=Ae(ct,ft,Ke,Te),rr=Ae(_t,ft,Ke,Te),er=Ae(Ct,ft,Ke,Te);_?(Ie=re(wt,[ft,ir,rr],[Ne[Pe[0]],-1,-1])||Ie,Ie=re(wt,[ft,rr,er],[Ne[Pe[0]],-1,-1])||Ie,Ie=re(wt,[ft,er,ir],[Ne[Pe[0]],-1,-1])||Ie):Ie=re(null,[ir,rr,er],[-1,-1,-1])||Ie,Ee=!0}}),Ie}function st(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee,Pe,ft,ct){var _t=!1;return l&&(j(wt,"A")&&(_t=rt(null,[Ne,Ke,Te,Ve],ft,ct)||_t),j(wt,"B")&&(_t=rt(null,[Ke,Te,Ie,Pe],ft,ct)||_t),j(wt,"C")&&(_t=rt(null,[Ke,Ve,Ce,Pe],ft,ct)||_t),j(wt,"D")&&(_t=rt(null,[Te,Ve,Ee,Pe],ft,ct)||_t),j(wt,"E")&&(_t=rt(null,[Ke,Te,Ve,Pe],ft,ct)||_t)),_&&(_t=rt(wt,[Ke,Te,Ve,Pe],ft,ct)||_t),_t}function Me(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee){return[Ee[0]===!0?!0:nt(wt,Ze([Ne,Ke,Te]),[Ne,Ke,Te],Ve,Ce),Ee[1]===!0?!0:nt(wt,Ze([Te,Ie,Ne]),[Te,Ie,Ne],Ve,Ce)]}function ye(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee,Pe){return Ee?Me(wt,Ne,Ke,Ie,Te,Ve,Ce,Pe):Me(wt,Ke,Ie,Te,Ne,Ve,Ce,Pe)}function he(wt,Ne,Ke,Te,Ie,Ve,Ce){var Ee=!1,Pe,ft,ct,_t,Ct=function(){Ee=nt(wt,[Pe,ft,ct],[-1,-1,-1],Ie,Ve)||Ee,Ee=nt(wt,[ct,_t,Pe],[-1,-1,-1],Ie,Ve)||Ee},ir=Ce[0],rr=Ce[1],er=Ce[2];return ir&&(Pe=ee(Ze([L(Ne,Ke-0,Te-0)])[0],Ze([L(Ne-1,Ke-0,Te-0)])[0],ir),ft=ee(Ze([L(Ne,Ke-0,Te-1)])[0],Ze([L(Ne-1,Ke-0,Te-1)])[0],ir),ct=ee(Ze([L(Ne,Ke-1,Te-1)])[0],Ze([L(Ne-1,Ke-1,Te-1)])[0],ir),_t=ee(Ze([L(Ne,Ke-1,Te-0)])[0],Ze([L(Ne-1,Ke-1,Te-0)])[0],ir),Ct()),rr&&(Pe=ee(Ze([L(Ne-0,Ke,Te-0)])[0],Ze([L(Ne-0,Ke-1,Te-0)])[0],rr),ft=ee(Ze([L(Ne-0,Ke,Te-1)])[0],Ze([L(Ne-0,Ke-1,Te-1)])[0],rr),ct=ee(Ze([L(Ne-1,Ke,Te-1)])[0],Ze([L(Ne-1,Ke-1,Te-1)])[0],rr),_t=ee(Ze([L(Ne-1,Ke,Te-0)])[0],Ze([L(Ne-1,Ke-1,Te-0)])[0],rr),Ct()),er&&(Pe=ee(Ze([L(Ne-0,Ke-0,Te)])[0],Ze([L(Ne-0,Ke-0,Te-1)])[0],er),ft=ee(Ze([L(Ne-0,Ke-1,Te)])[0],Ze([L(Ne-0,Ke-1,Te-1)])[0],er),ct=ee(Ze([L(Ne-1,Ke-1,Te)])[0],Ze([L(Ne-1,Ke-1,Te-1)])[0],er),_t=ee(Ze([L(Ne-1,Ke-0,Te)])[0],Ze([L(Ne-1,Ke-0,Te-1)])[0],er),Ct()),Ee}function Oe(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee,Pe,ft,ct,_t){var Ct=wt;return _t?(l&&wt==="even"&&(Ct=null),st(Ct,Ne,Ke,Te,Ie,Ve,Ce,Ee,Pe,ft,ct)):(l&&wt==="odd"&&(Ct=null),st(Ct,Pe,Ee,Ce,Ve,Ie,Te,Ke,Ne,ft,ct))}function tt(wt,Ne,Ke,Te,Ie){for(var Ve=[],Ce=0,Ee=0;Ee<Ne.length;Ee++)for(var Pe=Ne[Ee],ft=1;ft<f;ft++)for(var ct=1;ct<y;ct++)Ve.push(ye(wt,L(Pe,ct-1,ft-1),L(Pe,ct-1,ft),L(Pe,ct,ft-1),L(Pe,ct,ft),Ke,Te,(Pe+ct+ft)%2,Ie&&Ie[Ce]?Ie[Ce]:[])),Ce++;return Ve}function ot(wt,Ne,Ke,Te,Ie){for(var Ve=[],Ce=0,Ee=0;Ee<Ne.length;Ee++)for(var Pe=Ne[Ee],ft=1;ft<u;ft++)for(var ct=1;ct<f;ct++)Ve.push(ye(wt,L(ft-1,Pe,ct-1),L(ft,Pe,ct-1),L(ft-1,Pe,ct),L(ft,Pe,ct),Ke,Te,(ft+Pe+ct)%2,Ie&&Ie[Ce]?Ie[Ce]:[])),Ce++;return Ve}function Qe(wt,Ne,Ke,Te,Ie){for(var Ve=[],Ce=0,Ee=0;Ee<Ne.length;Ee++)for(var Pe=Ne[Ee],ft=1;ft<y;ft++)for(var ct=1;ct<u;ct++)Ve.push(ye(wt,L(ct-1,ft-1,Pe),L(ct-1,ft,Pe),L(ct,ft-1,Pe),L(ct,ft,Pe),Ke,Te,(ct+ft+Pe)%2,Ie&&Ie[Ce]?Ie[Ce]:[])),Ce++;return Ve}function Pt(wt,Ne,Ke){for(var Te=1;Te<f;Te++)for(var Ie=1;Ie<y;Ie++)for(var Ve=1;Ve<u;Ve++)Oe(wt,L(Ve-1,Ie-1,Te-1),L(Ve-1,Ie-1,Te),L(Ve-1,Ie,Te-1),L(Ve-1,Ie,Te),L(Ve,Ie-1,Te-1),L(Ve,Ie-1,Te),L(Ve,Ie,Te-1),L(Ve,Ie,Te),Ne,Ke,(Ve+Ie+Te)%2)}function It(wt,Ne,Ke){_=!0,Pt(wt,Ne,Ke),_=!1}function qt(wt,Ne,Ke){l=!0,Pt(wt,Ne,Ke),l=!1}function Wt(wt,Ne,Ke,Te,Ie,Ve){for(var Ce=[],Ee=0,Pe=0;Pe<Ne.length;Pe++)for(var ft=Ne[Pe],ct=1;ct<f;ct++)for(var _t=1;_t<y;_t++)Ce.push(he(wt,ft,_t,ct,Ke,Te,Ie[Pe],Ve&&Ve[Ee]?Ve[Ee]:[])),Ee++;return Ce}function kr(wt,Ne,Ke,Te,Ie,Ve){for(var Ce=[],Ee=0,Pe=0;Pe<Ne.length;Pe++)for(var ft=Ne[Pe],ct=1;ct<u;ct++)for(var _t=1;_t<f;_t++)Ce.push(he(wt,ct,ft,_t,Ke,Te,Ie[Pe],Ve&&Ve[Ee]?Ve[Ee]:[])),Ee++;return Ce}function mr(wt,Ne,Ke,Te,Ie,Ve){for(var Ce=[],Ee=0,Pe=0;Pe<Ne.length;Pe++)for(var ft=Ne[Pe],ct=1;ct<y;ct++)for(var _t=1;_t<u;_t++)Ce.push(he(wt,_t,ct,ft,Ke,Te,Ie[Pe],Ve&&Ve[Ee]?Ve[Ee]:[])),Ee++;return Ce}function qr(wt,Ne){for(var Ke=[],Te=wt;Te<Ne;Te++)Ke.push(Te);return Ke}function Sr(){for(var wt=0;wt<u;wt++)for(var Ne=0;Ne<y;Ne++)for(var Ke=0;Ke<f;Ke++){var Te=L(wt,Ne,Ke);fe(h._x[Te],h._y[Te],h._z[Te],h._value[Te])}}function Rr(){le(),Sr();var wt=null;if(m&&T&&(oe(T),It(wt,N,O)),c&&p){oe(p);for(var Ne=h.surface.pattern,Ke=h.surface.count,Te=0;Te<Ke;Te++){var Ie=Ke===1?.5:Te/(Ke-1),Ve=(1-Ie)*N+Ie*O,Ce=Math.abs(Ve-z),Ee=Math.abs(Ve-F),Pe=Ce>Ee?[z,Ve]:[Ve,F];qt(Ne,Pe[0],Pe[1])}}var ft=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(ct){for(var _t=[],Ct=0;Ct<ft.length;Ct++){var ir=0,rr=ft[Ct][0],er=ft[Ct][1],Lr=h.slices[ct];if(Lr.show&&Lr.fill){oe(Lr.fill);var fa=[],Da=[],Ia=[];if(Lr.locations.length)for(var qa=0;qa<Lr.locations.length;qa++){var Wa=r(Lr.locations[qa],ct==="x"?g:ct==="y"?b:d);Wa.distRatio===0?fa.push(Wa.id):Wa.id>0&&(Da.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"?fa=qr(1,u-1):ct==="y"?fa=qr(1,y-1):fa=qr(1,f-1);Da.length>0&&(ct==="x"?_t[ir]=Wt(wt,Da,rr,er,Ia,_t[ir]):ct==="y"?_t[ir]=kr(wt,Da,rr,er,Ia,_t[ir]):_t[ir]=mr(wt,Da,rr,er,Ia,_t[ir]),ir++),fa.length>0&&(ct==="x"?_t[ir]=tt(wt,fa,rr,er,_t[ir]):ct==="y"?_t[ir]=ot(wt,fa,rr,er,_t[ir]):_t[ir]=Qe(wt,fa,rr,er,_t[ir]),ir++)}var Ca=h.caps[ct];Ca.show&&Ca.fill&&(oe(Ca.fill),ct==="x"?_t[ir]=tt(wt,[0,u-1],rr,er,_t[ir]):ct==="y"?_t[ir]=ot(wt,[0,y-1],rr,er,_t[ir]):_t[ir]=Qe(wt,[0,f-1],rr,er,_t[ir]),ir++)}}),w===0&&le(),h._meshX=P,h._meshY=U,h._meshZ=B,h._meshIntensity=X,h._Xs=g,h._Ys=b,h._Zs=d}return Rr(),h}function s(h,c){var m=h.glplot.gl,p=v({gl:m}),T=new o(h,p,c.uid);return p._trace=T,T.update(c),h.glplot.add(p),T}G.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),fU=Xe({"src/traces/isosurface/index.js"(Z,G){"use strict";G.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=Xe({"lib/isosurface.js"(Z,G){"use strict";G.exports=fU()}}),CE=Xe({"src/traces/volume/attributes.js"(Z,G){"use strict";var v=ku(),x=tT(),S=gx(),E=ru(),e=Qo().extendFlat,t=pc().overrideAll,r=G.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},v("",{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=Xe({"src/traces/volume/defaults.js"(Z,G){"use strict";var v=sa(),x=CE(),S=EE().supplyIsoDefaults,E=ME().opacityscaleDefaults;G.exports=function(t,r,o,a){function n(i,s){return v.coerce(t,r,x,i,s)}S(t,r,o,a,n),E(t,r,a,n)}}}),dU=Xe({"src/traces/volume/convert.js"(Z,G){"use strict";var v=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,c){this.scene=s,this.uid=c,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,c=this.data._meshX[h],m=this.data._meshY[h],p=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,_=r(c,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(p,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,c=h.fullSceneLayout;this.data=o(s);function m(w,A,M,g){return A.map(function(b){return w.d2l(b,0,g)*M})}var p=t(m(c.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(c.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(c.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:p,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 c=s.glplot.gl,m=v({gl:c}),p=new a(s,m,h.uid);return m._trace=p,p.update(h),s.glplot.add(m),p}G.exports=i}}),vU=Xe({"src/traces/volume/index.js"(Z,G){"use strict";G.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=Xe({"lib/volume.js"(Z,G){"use strict";G.exports=vU()}}),gU=Xe({"src/traces/mesh3d/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=_h(),E=M1();G.exports=function(t,r,o,a){function n(m,p){return x.coerce(t,r,E,m,p)}function i(m){var p=m.map(function(T){var l=n(T);return l&&x.isArrayOrTypedArray(l)?l:null});return p.every(function(T){return T&&T.length===p[0].length})&&p}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=v.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(m){n(m)});var c=n("contour.show");c&&(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=Xe({"src/traces/mesh3d/calc.js"(Z,G){"use strict";var v=Tp();G.exports=function(S,E){E.intensity&&v(S,E,{vals:E.intensity,containerStr:"",cLetter:"c"})}}}),_U=Xe({"src/traces/mesh3d/convert.js"(Z,G){"use strict";var v=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 c(l){for(var _=[],w=l.length,A=0;A<w;A++)_[A]=Math.round(l[A]);return _}function m(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 p(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||!p(l.i,A)||!p(l.j,A)||!p(l.k,A))return;g=a(c(l.i),c(l.j),c(l.k))}else l.alphahull===0?g=E(M):l.alphahull>0?g=S(l.alphahull,M):g=m(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 d=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[d.min,d.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=v({gl:w}),M=new n(l,A,_.uid);return A._trace=M,M.update(_),l.glplot.add(A),M}G.exports=T}}),xU=Xe({"src/traces/mesh3d/index.js"(Z,G){"use strict";G.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=Xe({"lib/mesh3d.js"(Z,G){"use strict";G.exports=xU()}}),LE=Xe({"src/traces/cone/attributes.js"(Z,G){"use strict";var v=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,v("",{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"}),G.exports=o}}),wU=Xe({"src/traces/cone/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=LE();G.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),c=a("y"),m=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!c||!c.length||!m||!m.length){t.visible=!1;return}var p=a("sizemode");a("sizeref",p==="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=Xe({"src/traces/cone/calc.js"(Z,G){"use strict";var v=Tp();G.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],c=r[i],m=Math.sqrt(s*s+h*h+c*c);a=Math.max(a,m),n=Math.min(n,m)}E._len=o,E._normMax=a,v(S,E,{vals:[n,a],containerStr:"",cLetter:"c"})}}}),AU=Xe({"src/traces/cone/convert.js"(Z,G){"use strict";var v=Yh().gl_cone3d,x=Yh().gl_cone3d.createConeMesh,S=sa().simpleMap,E=tm().parseColorScale,e=rc().extractOpts,t=sa().isArrayOrTypedArray,r=E1();function o(m,p){this.scene=m,this.uid=p,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(m){if(m.object===this.mesh){var p=m.index=m.data.index,T=this.data.x[p],l=this.data.y[p],_=this.data.z[p],w=this.data.u[p],A=this.data.v[p],M=this.data.w[p];m.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[p]!==void 0?m.textLabel=g[p]:g&&(m.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(m,p){var T=m.fullSceneLayout,l=m.dataScale,_={};function w(d,u){var y=T[u],f=l[n[u]];return S(d,function(R){return y.d2l(R)*f})}_.vectors=r(w(p.u,"xaxis"),w(p.v,"yaxis"),w(p.w,"zaxis"),p._len),_.positions=r(w(p.x,"xaxis"),w(p.y,"yaxis"),w(p.z,"zaxis"),p._len);var A=e(p);_.colormap=E(p),_.vertexIntensityBounds=[A.min/p._normMax,A.max/p._normMax],_.coneOffset=i[p.anchor];var M=p.sizemode;M==="scaled"?_.coneSize=p.sizeref||.5:M==="absolute"?_.coneSize=p.sizeref&&p._normMax?p.sizeref/p._normMax:.5:M==="raw"&&(_.coneSize=p.sizeref),_.coneSizemode=M;var g=v(_),b=p.lightposition;return g.lightPosition=[b.x,b.y,b.z],g.ambient=p.lighting.ambient,g.diffuse=p.lighting.diffuse,g.specular=p.lighting.specular,g.roughness=p.lighting.roughness,g.fresnel=p.lighting.fresnel,g.opacity=p.opacity,p._pad=s[p.anchor]*g.vectorScale*g.coneScale*p._normMax,g}a.update=function(m){this.data=m;var p=h(this.scene,m);this.mesh.update(p)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function c(m,p){var T=m.glplot.gl,l=h(m,p),_=x(T,l),w=new o(m,p.uid);return w.mesh=_,w.data=p,_._trace=w,m.glplot.add(_),w}G.exports=c}}),SU=Xe({"src/traces/cone/index.js"(Z,G){"use strict";G.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(v,x){return v.norm=x.traceCoordinate[6],v},meta:{}}}}),MU=Xe({"lib/cone.js"(Z,G){"use strict";G.exports=SU()}}),PE=Xe({"src/traces/streamtube/attributes.js"(Z,G){"use strict";var v=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,v("",{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"}),G.exports=o}}),EU=Xe({"src/traces/streamtube/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=PE();G.exports=function(e,t,r,o){function a(p,T){return v.coerce(e,t,S,p,T)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),c=a("y"),m=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!c||!c.length||!m||!m.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=Xe({"src/traces/streamtube/convert.js"(Z,G){"use strict";var v=Yh().gl_streamtube3d,x=v.createTubeMesh,S=sa(),E=tm().parseColorScale,e=rc().extractOpts,t=E1(),r={xaxis:0,yaxis:1,zaxis:2};function o(c,m){this.scene=c,this.uid=m,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(c){var m=this.scene.fullSceneLayout,p=this.scene.dataScale;function T(w,A){var M=m[A],g=p[r[A]];return M.l2c(w)/g}if(c.object===this.mesh){var l=c.data.position,_=c.data.velocity;return c.traceCoordinate=[T(l[0],"xaxis"),T(l[1],"yaxis"),T(l[2],"zaxis"),T(_[0],"xaxis"),T(_[1],"yaxis"),T(_[2],"zaxis"),c.data.intensity*this.data._normMax,c.data.divergence],c.textLabel=this.data.hovertext||this.data.text,!0}};function n(c){var m=c.length,p;return m>2?p=c.slice(1,m-1):m===2?p=[(c[0]+c[1])/2]:p=c,p}function i(c){var m=c.length;return m===1?[.5,.5]:[c[1]-c[0],c[m-1]-c[m-2]]}function s(c,m){var p=c.fullSceneLayout,T=c.dataScale,l=m._len,_={};function w(fe,V){var Y=p[V],ee=T[r[V]];return S.simpleMap(fe,function(q){return Y.d2l(q)*ee})}if(_.vectors=t(w(m._u,"xaxis"),w(m._v,"yaxis"),w(m._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(m._Xs,"xaxis"),M=w(m._Ys,"yaxis"),g=w(m._Zs,"zaxis");_.meshgrid=[A,M,g],_.gridFill=m._gridFill;var b=m._slen;if(b)_.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=M[0],u=n(A),y=n(g),f=new Array(u.length*y.length),R=0,L=0;L<u.length;L++)for(var z=0;z<y.length;z++)f[R++]=[u[L],d,y[z]];_.startingPositions=f}_.colormap=E(m),_.tubeSize=m.sizeref,_.maxLength=m.maxdisplayed;var F=w(m._xbnds,"xaxis"),N=w(m._ybnds,"yaxis"),O=w(m._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]]],$=v(_,X),se=e(m);$.vertexIntensityBounds=[se.min/m._normMax,se.max/m._normMax];var le=m.lightposition;return $.lightPosition=[le.x,le.y,le.z],$.ambient=m.lighting.ambient,$.diffuse=m.lighting.diffuse,$.specular=m.lighting.specular,$.roughness=m.lighting.roughness,$.fresnel=m.lighting.fresnel,$.opacity=m.opacity,m._pad=$.tubeScale*m.sizeref*2,$}a.update=function(c){this.data=c;var m=s(this.scene,c);this.mesh.update(m)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(c,m){var p=c.glplot.gl,T=s(c,m),l=x(p,T),_=new o(c,m.uid);return _.mesh=l,_.data=m,l._trace=_,c.glplot.add(l),_}G.exports=h}}),CU=Xe({"src/traces/streamtube/index.js"(Z,G){"use strict";G.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(v,x){return v.tubex=v.x,v.tubey=v.y,v.tubez=v.z,v.tubeu=x.traceCoordinate[3],v.tubev=x.traceCoordinate[4],v.tubew=x.traceCoordinate[5],v.norm=x.traceCoordinate[6],v.divergence=x.traceCoordinate[7],delete v.x,delete v.y,delete v.z,v},meta:{}}}}),LU=Xe({"lib/streamtube.js"(Z,G){"use strict";G.exports=CU()}}),vg=Xe({"src/traces/scattergeo/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,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,c=["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(" ");G.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:v(),hovertemplatefallback:S()},"calc","nested")}}),PU=Xe({"src/traces/scattergeo/defaults.js"(Z,G){"use strict";var v=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(" ");G.exports=function(n,i,s,h){function c(M,g){return v.coerce(n,i,r,M,g)}var m=c("locations"),p;if(m&&m.length){var T=c("geojson"),l;(typeof T=="string"&&T!==""||v.isPlainObject(T))&&(l="geojson-id");var _=c("locationmode",l);_==="country names"&&v.warn(o),_==="geojson-id"&&c("featureidkey"),p=m.length}else{var w=c("lon")||[],A=c("lat")||[];p=Math.min(w.length,A.length)}if(!p){i.visible=!1;return}i._length=p,c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("mode"),x.hasMarkers(i)&&S(n,i,s,h,c,{gradient:!0}),x.hasLines(i)&&(E(n,i,s,h,c),c("connectgaps")),x.hasText(i)&&(c("texttemplate"),c("texttemplatefallback"),e(n,i,h,c)),c("fill"),i.fill!=="none"&&t(n,i,s,c),v.coerceSelectionMarkerOpacity(i,c)}}}),IU=Xe({"src/traces/scattergeo/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.geo]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),iT=Xe({"src/traces/scattergeo/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Fd(),E=Av(),e=Od(),t=sa().isArrayOrTypedArray,r=sa()._;function o(a){return a&&typeof a=="string"}G.exports=function(n,i){var s=t(i.locations),h=s?i.locations.length:i._length,c=new Array(h),m;i.geojson?m=function(A){return o(A)||v(A)}:m=o;for(var p=0;p<h;p++){var T=c[p]={};if(s){var l=i.locations[p];T.loc=m(l)?l:null}else{var _=i.lon[p],w=i.lat[p];v(_)&&v(w)?T.lonlat=[+_,+w]:T.lonlat=[x,x]}}return E(c,i),S(n,i),e(c,i),h&&(c[0].t={labels:{lat:r(n,"lat:")+" ",lon:r(n,"lon:")+" "}}),c}}}),yx=Xe({"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=Xe({"node_modules/topojson-client/dist/topojson-client.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.topojson=v.topojson||{}))})(Z,function(v){"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],d=w.translate[0],u=w.translate[1];return function(y,f){f||(A=M=0);var R=2,L=y.length,z=new Array(L);for(z[0]=(A+=y[0])*g+d,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,d=-g,u=-g;function y(R){R=A(R),R[0]<g&&(g=R[0]),R[0]>d&&(d=R[0]),R[1]<b&&(b=R[1]),R[1]>u&&(u=R[1])}function f(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(f);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]>d&&(d=F[0]),F[1]<b&&(b=F[1]),F[1]>u&&(u=F[1])});for(M in w.objects)f(w.objects[M]);return[g,b,d,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,d=o(w,A);return M==null&&g==null?{type:"Feature",properties:b,geometry:d}:g==null?{type:"Feature",id:M,properties:b,geometry:d}:{type:"Feature",id:M,bbox:g,properties:b,geometry:d}}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 d(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 f(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=d(L.coordinates);break;case"MultiPoint":F=L.coordinates.map(d);break;case"LineString":F=u(L.arcs);break;case"MultiLineString":F=L.arcs.map(u);break;case"Polygon":F=f(L.arcs);break;case"MultiPolygon":F=L.arcs.map(f);break;default:return null}return{type:z,coordinates:F}}return R(A)}function a(w,A){var M={},g={},b={},d=[],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 f(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}),d.push(F)}}return f(b,g),f(g,b),A.forEach(function(R){M[R<0?~R:R]||d.push([R])}),d}function n(w){return o(w,i.apply(this,arguments))}function i(w,A,M){var g,b,d;if(arguments.length>1)g=s(w,A,M);else for(b=0,g=new Array(d=w.arcs.length);b<d;++b)g[b]=b;return{type:"MultiLineString",arcs:a(w,g)}}function s(w,A,M){var g=[],b=[],d;function u(z){var F=z<0?~z:z;(b[F]||(b[F]=[])).push({i:z,g:d})}function y(z){z.forEach(u)}function f(z){z.forEach(y)}function R(z){z.forEach(f)}function L(z){switch(d=z,z.type){case"GeometryCollection":z.geometries.forEach(L);break;case"LineString":y(z.arcs);break;case"MultiLineString":case"Polygon":f(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],d=0;++A<M;)g=b,b=w[A],d+=g[0]*b[1]-g[1]*b[0];return Math.abs(d)}function c(w){return o(w,m.apply(this,arguments))}function m(w,A){var M={},g=[],b=[];A.forEach(d);function d(f){switch(f.type){case"GeometryCollection":f.geometries.forEach(d);break;case"Polygon":u(f.arcs);break;case"MultiPolygon":f.arcs.forEach(u);break}}function u(f){f.forEach(function(R){R.forEach(function(L){(M[L=L<0?~L:L]||(M[L]=[])).push(f)})}),g.push(f)}function y(f){return h(o(w,{type:"Polygon",arcs:[f]}).coordinates[0])}return g.forEach(function(f){if(!f._){var R=[],L=[f];for(f._=1,b.push(R);f=L.pop();)R.push(f),f.forEach(function(z){z.forEach(function(F){M[F<0?~F:F].forEach(function(N){N._||(N._=1,L.push(N))})})})}}),g.forEach(function(f){delete f._}),{type:"MultiPolygon",arcs:b.map(function(f){var R=[],L;if(f.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(f){return f.length>0})}}function p(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 d(P,U){P.type==="GeometryCollection"?P.geometries.forEach(function(B){d(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(d);for(var y in A)for(var f=A[y],R=f.length,L=0;L<R;++L)for(var z=L+1;z<R;++z){var F=f[L],N=f[z],O;(O=M[F])[y=p(O,N)]!==N&&O.splice(y,0,N),(O=M[N])[y=p(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],d=w.translate[0],u=w.translate[1];return function(y,f){f||(A=M=0);var R=2,L=y.length,z=new Array(L),F=Math.round((y[0]-d)/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");f=w.bbox||E(w);var M=f[0],g=f[1],b=f[2],d=f[3],u;A={scale:[b-M?(b-M)/(u-1):1,d-g?(d-g)/(u-1):1],translate:[M,g]}}else f=w.bbox;var y=l(A),f,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,$,se=new Array(X);for(se[0]=y(P[0],0);++U<X;)(($=y(P[U],U))[0]||$[1])&&(se[B++]=$);return B===1&&(se[B++]=[0,0]),se.length=B,se}for(R in L)z[R]=N(L[R]);return{type:"Topology",bbox:f,transform:A,objects:z,arcs:w.arcs.map(O)}}v.bbox=E,v.feature=t,v.merge=c,v.mergeArcs=m,v.mesh=n,v.meshArcs=i,v.neighbors=T,v.quantize=_,v.transform=S,v.untransform=l,Object.defineProperty(v,"__esModule",{value:!0})})}}),nT=Xe({"src/lib/topojson_utils.js"(Z,G){"use strict";var v=G.exports={},x=yx().locationmodeToLayer,S=IE().feature;v.getTopojsonName=function(E){return[E.scope.replace(/ /g,"-"),"_",E.resolution.toString(),"m"].join("")},v.getTopojsonPath=function(E,e){return E+=E.endsWith("/")?"":"/",`${E}${e}.json`},v.getTopojsonFeatures=function(E,e){var t=x[E.locationmode],r=e.objects[t];return S(e,r).features}}}),m0=Xe({"src/lib/geojson_utils.js"(Z){"use strict";var G=Hs().BADNUM;Z.calcTraceToLineCoords=function(v){for(var x=v[0].trace,S=x.connectgaps,E=[],e=[],t=0;t<v.length;t++){var r=v[t],o=r.lonlat;o[0]!==G?e.push(o):!S&&e.length>0&&(E.push(e),e=[])}return e.length>0&&E.push(e),E},Z.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},Z.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var x=new Array(v.length),S=0;S<v.length;S++)x[S]=[v[S]];return{type:"MultiPolygon",coordinates:x}},Z.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),RU=Xe({"node_modules/country-regex/index.js"(Z,G){G.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=Xe({"node_modules/@turf/helpers/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=63710088e-1,v={centimeters:G*100,centimetres:G*100,degrees:360/(2*Math.PI),feet:G*3.28084,inches:G*39.37,kilometers:G/1e3,kilometres:G/1e3,meters:G,metres:G,miles:G/1609.344,millimeters:G*1e3,millimetres:G*1e3,nauticalmiles:G/1852,radians:1,yards:G*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 c(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 c(L,z,F={}){return S({type:"MultiPolygon",coordinates:L},z,F)}function m(L,z,F={}){return S({type:"GeometryCollection",geometries:L},z,F)}function p(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=v[z];if(!F)throw new Error(z+" units is invalid");return L*F}function l(L,z="kilometers"){let F=v[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 d(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 f(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=d,Z.convertLength=b,Z.degreesToRadians=g,Z.earthRadius=G,Z.factors=v,Z.feature=S,Z.featureCollection=i,Z.geometry=E,Z.geometryCollection=m,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=c,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=M,Z.radiansToLength=T,Z.round=p,Z.validateBBox=f,Z.validateId=R}}),sT=Xe({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=oT();function v(l,_,w){if(l!==null)for(var A,M,g,b,d,u,y,f=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,d=L?y.geometries.length:1;for(var U=0;U<d;U++){var B=0,X=0;if(b=L?y.geometries[U]:y,b!==null){u=b.coordinates;var $=b.type;switch(f=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-f;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-f;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(v(b.geometries[A],_,w)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function x(l,_,w,A){var M=w;return v(l,function(g,b,d,u,y){b===0&&w===void 0?M=g:M=_(M,g,b,d,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 v(l,function(w){_.push(w)}),_}function o(l,_){var w,A,M,g,b,d,u,y,f,R,L=0,z=l.type==="FeatureCollection",F=l.type==="Feature",N=z?l.features.length:1;for(w=0;w<N;w++){for(d=z?l.features[w].geometry:F?l.geometry:l,y=z?l.features[w].properties:F?l.properties:{},f=z?l.features[w].bbox:F?l.bbox:void 0,R=z?l.features[w].id:F?l.id:void 0,u=d?d.type==="GeometryCollection":!1,b=u?d.geometries.length:1,M=0;M<b;M++){if(g=u?d.geometries[M]:d,g===null){if(_(null,L,y,f,R)===!1)return!1;continue}switch(g.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(g,L,y,f,R)===!1)return!1;break}case"GeometryCollection":{for(A=0;A<g.geometries.length;A++)if(_(g.geometries[A],L,y,f,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,d,u){g===0&&w===void 0?A=M:A=_(A,M,g,b,d,u)}),A}function n(l,_){o(l,function(w,A,M,g,b){var d=w===null?null:w.type;switch(d){case null:case"Point":case"LineString":case"Polygon":return _(G.feature.call(void 0,w,M,{bbox:g,id:b}),A,0)===!1?!1:void 0}var u;switch(d){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 f=w.coordinates[y],R={type:u,coordinates:f};if(_(G.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 d,u=0,y=0,f=0;if(v(w,function(R,L,z,F,N){if(d===void 0||A>u||F>y||N>f){d=R,u=A,y=F,f=N,g=0;return}var O=G.lineString.call(void 0,[d,R],w.properties);if(_(O,A,M,N,g)===!1)return!1;g++,d=R})===!1)return!1}}})}function h(l,_,w){var A=w,M=!1;return s(l,function(g,b,d,u,y){M===!1&&w===void 0?A=g:A=_(A,g,b,d,u,y),M=!0}),A}function c(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 d=0;d<b.length;d++)if(_(G.lineString.call(void 0,b[d],w.properties),A,M,d)===!1)return!1;break}}})}function m(l,_,w){var A=w;return c(l,function(M,g,b,d){g===0&&w===void 0?A=M:A=_(A,M,g,b,d)}),A}function p(l,_){if(_=_||{},!G.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,d;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,d=l.features[w].geometry;break;case"Feature":b=b||l.properties,d=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":d=l;break;default:throw new Error("geojson is invalid")}if(d===null)return null;var u=d.coordinates;switch(d.type){case"Point":case"MultiPoint":return null;case"LineString":return g<0&&(g=u.length+g-1),G.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),G.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),G.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),G.lineString.call(void 0,[u[A][M][g],u[A][M][g+1]],b,_)}throw new Error("geojson is invalid")}function T(l,_){if(_=_||{},!G.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,d;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,d=l.features[w].geometry;break;case"Feature":b=b||l.properties,d=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":d=l;break;default:throw new Error("geojson is invalid")}if(d===null)return null;var u=d.coordinates;switch(d.type){case"Point":return G.point.call(void 0,u,b,_);case"MultiPoint":return A<0&&(A=u.length+A),G.point.call(void 0,u[A],b,_);case"LineString":return g<0&&(g=u.length+g),G.point.call(void 0,u[g],b,_);case"Polygon":return M<0&&(M=u.length+M),g<0&&(g=u[M].length+g),G.point.call(void 0,u[M][g],b,_);case"MultiLineString":return A<0&&(A=u.length+A),g<0&&(g=u[A].length+g),G.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),G.point.call(void 0,u[A][M][g],b,_)}throw new Error("geojson is invalid")}Z.coordAll=r,Z.coordEach=v,Z.coordReduce=x,Z.featureEach=e,Z.featureReduce=t,Z.findPoint=T,Z.findSegment=p,Z.flattenEach=n,Z.flattenReduce=i,Z.geomEach=o,Z.geomReduce=a,Z.lineEach=c,Z.lineReduce=m,Z.propEach=S,Z.propReduce=E,Z.segmentEach=s,Z.segmentReduce=h}}),DU=Xe({"node_modules/@turf/area/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=oT(),v=sT();function x(a){return v.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=G.earthRadius*G.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],c=a[s+1===n?0:s+1],m=a[s+2>=n?(s+2)%n:s+2],p=h[0]*t,T=c[1]*t,l=m[0]*t;i+=(l-p)*Math.sin(T),s++}return i*e}var o=x;Z.area=x,Z.default=o}}),zU=Xe({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=oT(),v=sT();function x(E,e={}){let t=0,r=0,o=0;return v.coordEach.call(void 0,E,function(a){t+=a[0],r+=a[1],o++},!0),G.point.call(void 0,[t/o,r/o],e.properties)}var S=x;Z.centroid=x,Z.default=S}}),FU=Xe({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=sT();function v(S,E={}){if(S.bbox!=null&&E.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return G.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=v;Z.bbox=v,Z.default=x}}),g0=Xe({"src/lib/geo_location_utils.js"(Z,G){"use strict";var v=Hn(),x=RU(),{area:S}=DU(),{centroid:E}=zU(),{bbox:e}=FU(),t=S_(),r=Km(),o=Zv(),a=b_(),n=I_(),i=Object.keys(x),s={"ISO-3":t,"USA-states":t,"country names":h};function h(A){for(var M=0;M<i.length;M++){var g=i[M],b=new RegExp(x[g]);if(b.test(A.trim().toLowerCase()))return g}return r.log("Unrecognized country name: "+A+"."),!1}function c(A,M,g){if(!M||typeof M!="string")return!1;var b=s[A](M),d,u,y;if(b){if(A==="USA-states")for(d=[],y=0;y<g.length;y++)u=g[y],u.properties&&u.properties.gu&&u.properties.gu==="USA"&&d.push(u);else d=g;for(y=0;y<d.length;y++)if(u=d[y],u.id===b)return u;r.log(["Location with id",b,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function m(A){var M=A.geometry,g=M.coordinates,b=A.id,d=[],u,y,f,R;function L(z){for(var F=0;F<z.length-1;F++)if(z[F][0]>0&&z[F+1][0]<0)return F;return null}switch(b==="RUS"||b==="FJI"?u=function(z){var F;if(L(z)===null)F=z;else for(F=new Array(z.length),R=0;R<z.length;R++)F[R]=[z[R][0]<0?z[R][0]+360:z[R][0],z[R][1]];d.push(n.tester(F))}:b==="ATA"?u=function(z){var F=L(z);if(F===null)return d.push(n.tester(z));var N=new Array(z.length+1),O=0;for(R=0;R<z.length;R++)R>F?N[O++]=[z[R][0]+360,z[R][1]]:R===F?(N[O++]=z[R],N[O++]=[z[R][0],-90]):N[O++]=z[R];var P=n.tester(N);P.pts.pop(),d.push(P)}:u=function(z){d.push(n.tester(z))},M.type){case"MultiPolygon":for(y=0;y<g.length;y++)for(f=0;f<g[y].length;f++)u(g[y][f]);break;case"Polygon":for(y=0;y<g.length;y++)u(g[y]);break}return d}function p(A){var M=A.geojson,g=window.PlotlyGeoAssets||{},b=typeof M=="string"?g[M]:M;return o(b)?b:(r.error("Oops ... something went wrong when fetching "+M),!1)}function T(A){var M=A[0].trace,g=p(M);if(!g)return!1;var b={},d=[],u;for(u=0;u<M._length;u++){var y=A[u];(y.loc||y.loc===0)&&(b[y.loc]=y)}function f(z){var F=a(z,M.featureidkey||"id").get(),N=b[F];if(N){var O=z.geometry;if(O.type==="Polygon"||O.type==="MultiPolygon"){var P={type:"Feature",id:F,geometry:O,properties:{}};P.geometry.coordinates.length>0?P.properties.ct=l(P):P.properties.ct=[NaN,NaN],N.fIn=z,N.fOut=P,d.push(P)}else r.log(["Location",N.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete b[F]}switch(g.type){case"FeatureCollection":var R=g.features;for(u=0;u<R.length;u++)f(R[u]);break;case"Feature":f(g);break;default:return r.warn(["Invalid GeoJSON type",(g.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var L in b)r.log(["Location *"+L+"*","does not have a matching feature with id-key","*"+M.featureidkey+"*."].join(" "));return d}function l(A){var M=A.geometry,g;if(M.type==="MultiPolygon")for(var b=M.coordinates,d=0,u=0;u<b.length;u++){var y={type:"Polygon",coordinates:b[u]},f=S(y);f>d&&(d=f,g=y)}else g=M;return E(g).geometry.coordinates}function _(A){var M=window.PlotlyGeoAssets||{},g=[];function b(R){return new Promise(function(L,z){v.json(R,function(F,N){if(F){delete M[R];var O=F.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return z(new Error(O))}return M[R]=N,L(N)})})}function d(R){return new Promise(function(L,z){var F=0,N=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(N),L(M[R]);if(F>100)return clearInterval(N),z("Unexpected error while fetching from "+R);F++},50)})}for(var u=0;u<A.length;u++){var y=A[u][0].trace,f=y.geojson;typeof f=="string"&&(M[f]?M[f]==="pending"&&g.push(d(f)):(M[f]="pending",g.push(b(f))))}return g}function w(A){return e(A)}G.exports={locationToFeature:c,feature2polygons:m,getTraceGeojson:p,extractTraceFeature:T,fetchTraceGeoData:_,computeBbox:w}}}),RE=Xe({"src/traces/scattergeo/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=$n(),E=Qp(),e=E.stylePoints,t=E.styleText;G.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=v.select(this),c=s.trace,m=c.line||{};h.call(S.stroke,m.color).call(x.dashLine,m.dash||"",m.width||0),c.fill!=="none"&&h.call(S.fill,c.fillcolor)})}}}),DE=Xe({"src/traces/scattergeo/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=nT().getTopojsonFeatures,E=m0(),e=g0(),t=Yd().findExtremes,r=Hs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),n=RE();function i(h,c,m){var p=c.layers.frontplot.select(".scatterlayer"),T=x.makeTraceGroups(p,m,"trace scattergeo");function l(_,w){_.lonlat[0]===r&&v.select(w).remove()}T.selectAll("*").remove(),T.each(function(_){var w=v.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,c){var m=h[0].trace,p=c[m.geo],T=p._subplot,l=m._length,_,w;if(x.isArrayOrTypedArray(m.locations)){var A=m.locationmode,M=A==="geojson-id"?e.extractTraceFeature(h):S(m,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},d,u;if(p.fitbounds==="geojson"&&m.locationmode==="geojson-id"){var y=e.computeBbox(e.getTraceGeojson(m));d=[y[0],y[2]],u=[y[1],y[3]]}else{for(d=new Array(l),u=new Array(l),_=0;_<l;_++)w=h[_],d[_]=w.lonlat[0],u[_]=w.lonlat[1];b.ppad=o(m,l)}m._extremes.lon=t(p.lonaxis._ax,d,b),m._extremes.lat=t(p.lataxis._ax,u,b)}G.exports={calcGeoJSON:s,plot:i}}}),OU=Xe({"src/traces/scattergeo/hover.js"(Z,G){"use strict";var v=rf(),x=Hs().BADNUM,S=l1(),E=sa().fillText,e=vg();G.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.xa,c=o.ya,m=o.subplot,p=m.projection.isLonLatOverEdges,T=m.project;function l(d){var u=d.lonlat;if(u[0]===x||p(u))return 1/0;var y=T(u),f=T([a,n]),R=Math.abs(y[0]-f[0]),L=Math.abs(y[1]-f[1]),z=Math.max(3,d.mrc||0);return Math.max(Math.sqrt(R*R+L*L)-z,1-3/z)}if(v.getClosest(i,l,o),o.index!==!1){var _=i[o.index],w=_.lonlat,A=[h.c2p(w),c.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:m};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),c=s.indexOf("lon")!==-1,m=s.indexOf("lat")!==-1,p=s.indexOf("text")!==-1,T=[];function l(_){return _+"\xB0"}return h?T.push(o.loc):c&&m?T.push("("+l(a.latLabel)+", "+l(a.lonLabel)+")"):c?T.push(n.lon+l(a.lonLabel)):m&&T.push(n.lat+l(a.latLabel)),p&&E(o,r,T),T.join("<br>")}}}),BU=Xe({"src/traces/scattergeo/event_data.js"(Z,G){"use strict";G.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}}}),NU=Xe({"src/traces/scattergeo/select.js"(Z,G){"use strict";var v=Fu(),x=Hs().BADNUM;G.exports=function(E,e){var t=E.cd,r=E.xaxis,o=E.yaxis,a=[],n=t[0].trace,i,s,h,c,m,p=!v.hasMarkers(n)&&!v.hasText(n);if(p)return[];if(e===!1)for(m=0;m<t.length;m++)t[m].selected=0;else for(m=0;m<t.length;m++)i=t[m],s=i.lonlat,s[0]!==x&&(h=r.c2p(s),c=o.c2p(s),e.contains([h,c],null,m,E)?(a.push({pointNumber:m,lon:s[0],lat:s[1]}),i.selected=1):i.selected=0);return a}}}),_x=Xe({"node_modules/d3-array/dist/d3-array.js"(Z,G){(function(v,x){x(typeof Z=="object"&&typeof G<"u"?Z:v.d3=v.d3||{})})(Z,function(v){"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,oe,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae<j;){var Q=ae+j>>>1;ee(q[Q],oe)<0?ae=Q+1:j=Q}return ae},right:function(q,oe,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae<j;){var Q=ae+j>>>1;ee(q[Q],oe)>0?j=Q:ae=Q+1}return ae}}}function E(ee){return function(q,oe){return x(ee(q),oe)}}var e=S(x),t=e.right,r=e.left;function o(ee,q){q==null&&(q=a);for(var oe=0,ae=ee.length-1,j=ee[0],Q=new Array(ae<0?0:ae);oe<ae;)Q[oe]=q(j,j=ee[++oe]);return Q}function a(ee,q){return[ee,q]}function n(ee,q,oe){var ae=ee.length,j=q.length,Q=new Array(ae*j),re,ce,be,Ae;for(oe==null&&(oe=a),re=be=0;re<ae;++re)for(Ae=ee[re],ce=0;ce<j;++ce,++be)Q[be]=oe(Ae,q[ce]);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 oe=ee.length,ae=0,j=-1,Q=0,re,ce,be=0;if(q==null)for(;++j<oe;)isNaN(re=s(ee[j]))||(ce=re-Q,Q+=ce/++ae,be+=ce*(re-Q));else for(;++j<oe;)isNaN(re=s(q(ee[j],j,ee)))||(ce=re-Q,Q+=ce/++ae,be+=ce*(re-Q));if(ae>1)return be/(ae-1)}function c(ee,q){var oe=h(ee,q);return oe&&Math.sqrt(oe)}function m(ee,q){var oe=ee.length,ae=-1,j,Q,re;if(q==null){for(;++ae<oe;)if((j=ee[ae])!=null&&j>=j)for(Q=re=j;++ae<oe;)(j=ee[ae])!=null&&(Q>j&&(Q=j),re<j&&(re=j))}else for(;++ae<oe;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=re=j;++ae<oe;)(j=q(ee[ae],ae,ee))!=null&&(Q>j&&(Q=j),re<j&&(re=j));return[Q,re]}var p=Array.prototype,T=p.slice,l=p.map;function _(ee){return function(){return ee}}function w(ee){return ee}function A(ee,q,oe){ee=+ee,q=+q,oe=(j=arguments.length)<2?(q=ee,ee=0,1):j<3?1:+oe;for(var ae=-1,j=Math.max(0,Math.ceil((q-ee)/oe))|0,Q=new Array(j);++ae<j;)Q[ae]=ee+ae*oe;return Q}var M=Math.sqrt(50),g=Math.sqrt(10),b=Math.sqrt(2);function d(ee,q,oe){var ae,j=-1,Q,re,ce;if(q=+q,ee=+ee,oe=+oe,ee===q&&oe>0)return[ee];if((ae=q<ee)&&(Q=ee,ee=q,q=Q),(ce=u(ee,q,oe))===0||!isFinite(ce))return[];if(ce>0)for(ee=Math.ceil(ee/ce),q=Math.floor(q/ce),re=new Array(Q=Math.ceil(q-ee+1));++j<Q;)re[j]=(ee+j)*ce;else for(ee=Math.floor(ee*ce),q=Math.ceil(q*ce),re=new Array(Q=Math.ceil(ee-q+1));++j<Q;)re[j]=(ee-j)/ce;return ae&&re.reverse(),re}function u(ee,q,oe){var ae=(q-ee)/Math.max(0,oe),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,oe){var ae=Math.abs(q-ee)/Math.max(0,oe),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 f(ee){return Math.ceil(Math.log(ee.length)/Math.LN2)+1}function R(){var ee=w,q=m,oe=f;function ae(j){var Q,re=j.length,ce,be=new Array(re);for(Q=0;Q<re;++Q)be[Q]=ee(j[Q],Q,j);var Ae=q(be),De=Ae[0],ze=Ae[1],Ze=oe(be,De,ze);Array.isArray(Ze)||(Ze=y(De,ze,Ze),Ze=A(Math.ceil(De/Ze)*Ze,ze,Ze));for(var at=Ze.length;Ze[0]<=De;)Ze.shift(),--at;for(;Ze[at-1]>ze;)Ze.pop(),--at;var nt=new Array(at+1),rt;for(Q=0;Q<=at;++Q)rt=nt[Q]=[],rt.x0=Q>0?Ze[Q-1]:De,rt.x1=Q<at?Ze[Q]:ze;for(Q=0;Q<re;++Q)ce=be[Q],De<=ce&&ce<=ze&&nt[t(Ze,ce,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?(oe=typeof j=="function"?j:Array.isArray(j)?_(T.call(j)):_(j),ae):oe},ae}function L(ee,q,oe){if(oe==null&&(oe=s),!!(ae=ee.length)){if((q=+q)<=0||ae<2)return+oe(ee[0],0,ee);if(q>=1)return+oe(ee[ae-1],ae-1,ee);var ae,j=(ae-1)*q,Q=Math.floor(j),re=+oe(ee[Q],Q,ee),ce=+oe(ee[Q+1],Q+1,ee);return re+(ce-re)*(j-Q)}}function z(ee,q,oe){return ee=l.call(ee,s).sort(x),Math.ceil((oe-q)/(2*(L(ee,.75)-L(ee,.25))*Math.pow(ee.length,-1/3)))}function F(ee,q,oe){return Math.ceil((oe-q)/(3.5*c(ee)*Math.pow(ee.length,-1/3)))}function N(ee,q){var oe=ee.length,ae=-1,j,Q;if(q==null){for(;++ae<oe;)if((j=ee[ae])!=null&&j>=j)for(Q=j;++ae<oe;)(j=ee[ae])!=null&&j>Q&&(Q=j)}else for(;++ae<oe;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=j;++ae<oe;)(j=q(ee[ae],ae,ee))!=null&&j>Q&&(Q=j);return Q}function O(ee,q){var oe=ee.length,ae=oe,j=-1,Q,re=0;if(q==null)for(;++j<oe;)isNaN(Q=s(ee[j]))?--ae:re+=Q;else for(;++j<oe;)isNaN(Q=s(q(ee[j],j,ee)))?--ae:re+=Q;if(ae)return re/ae}function P(ee,q){var oe=ee.length,ae=-1,j,Q=[];if(q==null)for(;++ae<oe;)isNaN(j=s(ee[ae]))||Q.push(j);else for(;++ae<oe;)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,oe,ae=-1,j=0,Q,re;++ae<q;)j+=ee[ae].length;for(Q=new Array(j);--q>=0;)for(re=ee[q],oe=re.length;--oe>=0;)Q[--j]=re[oe];return Q}function B(ee,q){var oe=ee.length,ae=-1,j,Q;if(q==null){for(;++ae<oe;)if((j=ee[ae])!=null&&j>=j)for(Q=j;++ae<oe;)(j=ee[ae])!=null&&Q>j&&(Q=j)}else for(;++ae<oe;)if((j=q(ee[ae],ae,ee))!=null&&j>=j)for(Q=j;++ae<oe;)(j=q(ee[ae],ae,ee))!=null&&Q>j&&(Q=j);return Q}function X(ee,q){for(var oe=q.length,ae=new Array(oe);oe--;)ae[oe]=ee[q[oe]];return ae}function $(ee,q){if(oe=ee.length){var oe,ae=0,j=0,Q,re=ee[j];for(q==null&&(q=x);++ae<oe;)(q(Q=ee[ae],re)<0||q(re,re)!==0)&&(re=Q,j=ae);if(q(re,re)===0)return j}}function se(ee,q,oe){for(var ae=(oe??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 le(ee,q){var oe=ee.length,ae=-1,j,Q=0;if(q==null)for(;++ae<oe;)(j=+ee[ae])&&(Q+=j);else for(;++ae<oe;)(j=+q(ee[ae],ae,ee))&&(Q+=j);return Q}function fe(ee){if(!(Q=ee.length))return[];for(var q=-1,oe=B(ee,V),ae=new Array(oe);++q<oe;)for(var j=-1,Q,re=ae[q]=new Array(Q);++j<Q;)re[j]=ee[j][q];return ae}function V(ee){return ee.length}function Y(){return fe(arguments)}v.bisect=t,v.bisectRight=t,v.bisectLeft=r,v.ascending=x,v.bisector=S,v.cross=n,v.descending=i,v.deviation=c,v.extent=m,v.histogram=R,v.thresholdFreedmanDiaconis=z,v.thresholdScott=F,v.thresholdSturges=f,v.max=N,v.mean=O,v.median=P,v.merge=U,v.min=B,v.pairs=o,v.permute=X,v.quantile=L,v.range=A,v.scan=$,v.shuffle=se,v.sum=le,v.ticks=d,v.tickIncrement=u,v.tickStep=y,v.transpose=fe,v.variance=h,v.zip=Y,Object.defineProperty(v,"__esModule",{value:!0})})}}),zE=Xe({"node_modules/d3-geo/dist/d3-geo.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,_x()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,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,c=a/180,m=Math.abs,p=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},d=Math.sqrt,u=Math.tan;function y(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function f(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(),$,se,le,fe,V,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=oe}function q(){ae($,se)}function oe(Qt,br){Y.point=ae,$=Qt,se=br,Qt*=c,br*=c,le=Qt,fe=l(br=br/2+i),V=g(br)}function ae(Qt,br){Qt*=c,br*=c,br=br/2+i;var aa=Qt-le,$r=aa>=0?1:-1,ka=$r*aa,li=l(br),Ci=g(br),Hi=V*Ci,Qi=fe*li+Hi*l(ka),dn=Hi*$r*g(ka);B.add(T(dn,Qi)),le=Qt,fe=li,V=Ci}function j(Qt){return X.reset(),U(Qt,Y),X*2}function Q(Qt){return[T(Qt[1],Qt[0]),f(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 ce(Qt,br){return Qt[0]*br[0]+Qt[1]*br[1]+Qt[2]*br[2]}function be(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 Ae(Qt,br){Qt[0]+=br[0],Qt[1]+=br[1],Qt[2]+=br[2]}function De(Qt,br){return[Qt[0]*br,Qt[1]*br,Qt[2]*br]}function ze(Qt){var br=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=br,Qt[1]/=br,Qt[2]/=br}var Ze,at,nt,rt,st,Me,ye,he,Oe=S(),tt,ot,Qe={point:Pt,lineStart:qt,lineEnd:Wt,polygonStart:function(){Qe.point=kr,Qe.lineStart=mr,Qe.lineEnd=qr,Oe.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),Qe.point=Pt,Qe.lineStart=qt,Qe.lineEnd=Wt,B<0?(Ze=-(nt=180),at=-(rt=90)):Oe>r?rt=90:Oe<-r&&(at=-90),ot[0]=Ze,ot[1]=nt},sphere:function(){Ze=-(nt=180),at=-(rt=90)}};function Pt(Qt,br){tt.push(ot=[Ze=Qt,nt=Qt]),br<at&&(at=br),br>rt&&(rt=br)}function It(Qt,br){var aa=re([Qt*c,br*c]);if(he){var $r=be(he,aa),ka=[$r[1],-$r[0],0],li=be(ka,$r);ze(li),li=Q(li);var Ci=Qt-st,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,dn,Pi=m(Ci)>180;Pi^(Hi*st<Qi&&Qi<Hi*Qt)?(dn=li[1]*h,dn>rt&&(rt=dn)):(Qi=(Qi+360)%360-180,Pi^(Hi*st<Qi&&Qi<Hi*Qt)?(dn=-li[1]*h,dn<at&&(at=dn)):(br<at&&(at=br),br>rt&&(rt=br))),Pi?Qt<st?Sr(Ze,Qt)>Sr(Ze,nt)&&(nt=Qt):Sr(Qt,nt)>Sr(Ze,nt)&&(Ze=Qt):nt>=Ze?(Qt<Ze&&(Ze=Qt),Qt>nt&&(nt=Qt)):Qt>st?Sr(Ze,Qt)>Sr(Ze,nt)&&(nt=Qt):Sr(Qt,nt)>Sr(Ze,nt)&&(Ze=Qt)}else tt.push(ot=[Ze=Qt,nt=Qt]);br<at&&(at=br),br>rt&&(rt=br),he=aa,st=Qt}function qt(){Qe.point=It}function Wt(){ot[0]=Ze,ot[1]=nt,Qe.point=Pt,he=null}function kr(Qt,br){if(he){var aa=Qt-st;Oe.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else Me=Qt,ye=br;Y.point(Qt,br),It(Qt,br)}function mr(){Y.lineStart()}function qr(){kr(Me,ye),Y.lineEnd(),m(Oe)>r&&(Ze=-(nt=180)),ot[0]=Ze,ot[1]=nt,he=null}function Sr(Qt,br){return(br-=Qt)<0?br+360:br}function Rr(Qt,br){return Qt[0]-br[0]}function wt(Qt,br){return Qt[0]<=Qt[1]?Qt[0]<=br&&br<=Qt[1]:br<Qt[0]||Qt[1]<br}function Ne(Qt){var br,aa,$r,ka,li,Ci,Hi;if(rt=nt=-(Ze=at=1/0),tt=[],U(Qt,Qe),aa=tt.length){for(tt.sort(Rr),br=1,$r=tt[0],li=[$r];br<aa;++br)ka=tt[br],wt($r,ka[0])||wt($r,ka[1])?(Sr($r[0],ka[1])>Sr($r[0],$r[1])&&($r[1]=ka[1]),Sr(ka[0],$r[1])>Sr($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=Sr($r[1],ka[0]))>Ci&&(Ci=Hi,Ze=ka[0],nt=$r[1])}return tt=ot=null,Ze===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ze,at],[nt,rt]]}var Ke,Te,Ie,Ve,Ce,Ee,Pe,ft,ct,_t,Ct,ir,rr,er,Lr,fa,Da={sphere:L,point:Ia,lineStart:Wa,lineEnd:wi,polygonStart:function(){Da.lineStart=Kt,Da.lineEnd=Ft},polygonEnd:function(){Da.lineStart=Wa,Da.lineEnd=wi}};function Ia(Qt,br){Qt*=c,br*=c;var aa=l(br);qa(aa*l(Qt),aa*g(Qt),g(br))}function qa(Qt,br,aa){++Ke,Ie+=(Qt-Ie)/Ke,Ve+=(br-Ve)/Ke,Ce+=(aa-Ce)/Ke}function Wa(){Da.point=Ca}function Ca(Qt,br){Qt*=c,br*=c;var aa=l(br);er=aa*l(Qt),Lr=aa*g(Qt),fa=g(br),Da.point=hi,qa(er,Lr,fa)}function hi(Qt,br){Qt*=c,br*=c;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=T(d((Ci=Lr*li-fa*ka)*Ci+(Ci=fa*$r-er*li)*Ci+(Ci=er*ka-Lr*$r)*Ci),er*$r+Lr*ka+fa*li);Te+=Ci,Ee+=Ci*(er+(er=$r)),Pe+=Ci*(Lr+(Lr=ka)),ft+=Ci*(fa+(fa=li)),qa(er,Lr,fa)}function wi(){Da.point=Ia}function Kt(){Da.point=Yt}function Ft(){Jt(ir,rr),Da.point=Ia}function Yt(Qt,br){ir=Qt,rr=br,Qt*=c,br*=c,Da.point=Jt;var aa=l(br);er=aa*l(Qt),Lr=aa*g(Qt),fa=g(br),qa(er,Lr,fa)}function Jt(Qt,br){Qt*=c,br*=c;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=Lr*li-fa*ka,Hi=fa*$r-er*li,Qi=er*ka-Lr*$r,dn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=f(dn),Di=dn&&-Pi/dn;ct+=Di*Ci,_t+=Di*Hi,Ct+=Di*Qi,Te+=Pi,Ee+=Pi*(er+(er=$r)),Pe+=Pi*(Lr+(Lr=ka)),ft+=Pi*(fa+(fa=li)),qa(er,Lr,fa)}function Fr(Qt){Ke=Te=Ie=Ve=Ce=Ee=Pe=ft=ct=_t=Ct=0,U(Qt,Da);var br=ct,aa=_t,$r=Ct,ka=br*br+aa*aa+$r*$r;return ka<o&&(br=Ee,aa=Pe,$r=ft,Te<r&&(br=Ie,aa=Ve,$r=Ce),ka=br*br+aa*aa+$r*$r,ka<o)?[NaN,NaN]:[T(aa,br)*h,f($r/d(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[m(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 dn=l(Qi),Pi=l(Hi)*dn,Di=g(Hi)*dn,Ni=g(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),f(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var dn=l(Qi),Pi=l(Hi)*dn,Di=g(Hi)*dn,Ni=g(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),f(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*c,Qt[1]*c,Qt.length>2?Qt[2]*c:0);function br(aa){return aa=Qt(aa[0]*c,aa[1]*c),aa[0]*=h,aa[1]*=h,aa}return br.invert=function(aa){return aa=Qt.invert(aa[0]*c,aa[1]*c),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=tn(Ci,ka),li=tn(Ci,li),($r>0?ka<li:ka>li)&&(ka+=$r*s));for(var dn,Pi=ka;$r>0?Pi>li:Pi<li;Pi-=Qi)dn=Q([Ci,-Hi*l(Pi),-Hi*g(Pi)]),Qt.point(dn[0],dn[1])}}function tn(Qt,br){br=re(br),br[0]-=Qt,ze(br);var aa=y(-br[1]);return((-br[2]<0?-aa:aa)+s-r)%s}function on(){var Qt=ta([0,0]),br=ta(90),aa=ta(6),$r,ka,li={point:Ci};function Ci(Qi,dn){$r.push(Qi=ka(Qi,dn)),Qi[0]*=h,Qi[1]*=h}function Hi(){var Qi=Qt.apply(this,arguments),dn=br.apply(this,arguments)*c,Pi=aa.apply(this,arguments)*c;return $r=[],ka=Ba(-Qi[0]*c,-Qi[1]*c,0).invert,Ra(li,dn,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 hn(){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 Tt(Qt,br){return m(Qt[0]-br[0])<r&&m(Qt[1]-br[1])<r}function ut(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(Mn){if(!((Qn=Mn.length-1)<=0)){var Qn,ao=Mn[0],eo=Mn[Qn],fo;if(Tt(ao,eo)){if(!ao[2]&&!eo[2]){for(ka.lineStart(),Hi=0;Hi<Qn;++Hi)ka.point((ao=Mn[Hi])[0],ao[1]);ka.lineEnd();return}eo[0]+=2*r}li.push(fo=new ut(ao,Mn,null,!0)),Ci.push(fo.o=new ut(ao,null,fo,!1)),li.push(fo=new ut(eo,Mn,null,!1)),Ci.push(fo.o=new ut(eo,null,fo,!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 dn=li[0],Pi,Di;;){for(var Ni=dn,mi=!0;Ni.v;)if((Ni=Ni.n)===dn)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 Ir(Qt){return m(Qt[0])<=a?Qt[0]:b(Qt[0])*((m(Qt[0])+a)%s-a)}function Ur(Qt,br){var aa=Ir(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,dn=Qt.length;Qi<dn;++Qi)if(Di=(Pi=Qt[Qi]).length)for(var Pi,Di,Ni=Pi[Di-1],mi=Ir(Ni),Mn=Ni[1]/2+i,Qn=g(Mn),ao=l(Mn),eo=0;eo<Di;++eo,mi=An,Qn=yo,ao=Ko,Ni=fo){var fo=Pi[eo],An=Ir(fo),un=fo[1]/2+i,yo=g(un),Ko=l(un),Ss=An-mi,rl=Ss>=0?1:-1,Os=rl*Ss,el=Os>a,bs=Qn*yo;if(xr.add(T(bs*rl*g(Os),ao*Ko+bs*l(Os))),Ci+=el?Ss+rl*s:Ss,el^mi>=aa^An>=aa){var Fl=be(re(Ni),re(fo));ze(Fl);var _l=be(li,Fl);ze(_l);var ll=(el^Ss>=0?-1:1)*f(_l[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^Ss>=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=hn(),Hi=br(Ci),Qi=!1,dn,Pi,Di,Ni={point:mi,lineStart:Qn,lineEnd:ao,polygonStart:function(){Ni.point=eo,Ni.lineStart=fo,Ni.lineEnd=An,Pi=[],dn=[]},polygonEnd:function(){Ni.point=mi,Ni.lineStart=Qn,Ni.lineEnd=ao,Pi=x.merge(Pi);var un=Ur(dn,$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=dn=null},sphere:function(){ka.polygonStart(),ka.lineStart(),aa(null,null,1,ka),ka.lineEnd(),ka.polygonEnd()}};function mi(un,yo){Qt(un,yo)&&ka.point(un,yo)}function Mn(un,yo){li.point(un,yo)}function Qn(){Ni.point=Mn,li.lineStart()}function ao(){Ni.point=mi,li.lineEnd()}function eo(un,yo){Di.push([un,yo]),Hi.point(un,yo)}function fo(){Hi.lineStart(),Di=[]}function An(){eo(Di[0][0],Di[0][1]),Hi.lineEnd();var un=Hi.clean(),yo=Ci.result(),Ko,Ss=yo.length,rl,Os,el;if(Di.pop(),dn.push(Di),Di=null,!!Ss){if(un&1){if(Os=yo[0],(rl=Os.length-1)>0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Ko=0;Ko<rl;++Ko)ka.point((el=Os[Ko])[0],el[1]);ka.lineEnd()}return}Ss>1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(xt))}}return Ni}}function xt(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=m(li-br);m(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&&(m(br-$r)<r&&(br-=$r*r),m(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 m(Ci)>r?p((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(m(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 ya(Qt){var br=l(Qt),aa=6*c,$r=br>0,ka=m(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,Mn,Qn;return{lineStart:function(){Mn=mi=!1,Qn=1},point:function(ao,eo){var fo=[ao,eo],An,un=Ci(ao,eo),yo=$r?un?0:dn(ao,eo):un?dn(ao+(ao<0?a:-a),eo):0;if(!Di&&(Mn=mi=un)&&Pi.lineStart(),un!==mi&&(An=Qi(Di,fo),(!An||Tt(Di,An)||Tt(fo,An))&&(fo[2]=1)),un!==mi)Qn=0,un?(Pi.lineStart(),An=Qi(fo,Di),Pi.point(An[0],An[1])):(An=Qi(Di,fo),Pi.point(An[0],An[1],2),Pi.lineEnd()),Di=An;else if(ka&&Di&&$r^un){var Ko;!(yo&Ni)&&(Ko=Qi(fo,Di,!0))&&(Qn=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||!Tt(Di,fo))&&Pi.point(fo[0],fo[1]),Di=fo,mi=un,Ni=yo},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return Qn|(Mn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=re(Pi),Mn=re(Di),Qn=[1,0,0],ao=be(mi,Mn),eo=ce(ao,ao),fo=ao[0],An=eo-fo*fo;if(!An)return!Ni&&Pi;var un=br*eo/An,yo=-br*fo/An,Ko=be(Qn,ao),Ss=De(Qn,un),rl=De(ao,yo);Ae(Ss,rl);var Os=Ko,el=ce(Ss,Os),bs=ce(Os,Os),Fl=el*el-bs*(ce(Ss,Ss)-1);if(!(Fl<0)){var _l=d(Fl),ll=De(Os,(-el-_l)/bs);if(Ae(ll,Ss),ll=Q(ll),!Ni)return ll;var Un=Pi[0],Lo=Di[0],Js=Pi[1],Rs=Di[1],uu;Lo<Un&&(uu=Un,Un=Lo,Lo=uu);var Iu=Lo-Un,Zu=m(Iu-a)<r,Ic=Zu||Iu<r;if(!Zu&&Rs<Js&&(uu=Js,Js=Rs,Rs=uu),Ic?Zu?Js+Rs>0^ll[1]<(m(ll[0]-Un)<r?Js:Rs):Js<=ll[1]&&ll[1]<=Rs:Iu>a^(Un<=ll[0]&&ll[0]<=Lo)){var bu=De(Os,(-el+_l)/bs);return Ae(bu,Ss),[ll,Q(bu)]}}}function dn(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],dn=br[1],Pi=0,Di=1,Ni=Qi-Ci,mi=dn-Hi,Mn;if(Mn=aa-Ci,!(!Ni&&Mn>0)){if(Mn/=Ni,Ni<0){if(Mn<Pi)return;Mn<Di&&(Di=Mn)}else if(Ni>0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=ka-Ci,!(!Ni&&Mn<0)){if(Mn/=Ni,Ni<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(Ni>0){if(Mn<Pi)return;Mn<Di&&(Di=Mn)}if(Mn=$r-Hi,!(!mi&&Mn>0)){if(Mn/=mi,mi<0){if(Mn<Pi)return;Mn<Di&&(Di=Mn)}else if(mi>0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=li-Hi,!(!mi&&Mn<0)){if(Mn/=mi,mi<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(mi>0){if(Mn<Pi)return;Mn<Di&&(Di=Mn)}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 Ta=1e9,Ai=-Ta;function ki(Qt,br,aa,$r){function ka(dn,Pi){return Qt<=dn&&dn<=aa&&br<=Pi&&Pi<=$r}function li(dn,Pi,Di,Ni){var mi=0,Mn=0;if(dn==null||(mi=Ci(dn,Di))!==(Mn=Ci(Pi,Di))||Qi(dn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:br);while((mi=(mi+Di+4)%4)!==Mn);else Ni.point(Pi[0],Pi[1])}function Ci(dn,Pi){return m(dn[0]-Qt)<r?Pi>0?0:3:m(dn[0]-aa)<r?Pi>0?2:1:m(dn[1]-br)<r?Pi>0?1:0:Pi>0?3:2}function Hi(dn,Pi){return Qi(dn.x,Pi.x)}function Qi(dn,Pi){var Di=Ci(dn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-dn[1]:Di===1?dn[0]-Pi[0]:Di===2?dn[1]-Pi[1]:Pi[0]-dn[0]}return function(dn){var Pi=dn,Di=hn(),Ni,mi,Mn,Qn,ao,eo,fo,An,un,yo,Ko,Ss={point:rl,lineStart:Fl,lineEnd:_l,polygonStart:el,polygonEnd:bs};function rl(Un,Lo){ka(Un,Lo)&&Pi.point(Un,Lo)}function Os(){for(var Un=0,Lo=0,Js=mi.length;Lo<Js;++Lo)for(var Rs=mi[Lo],uu=1,Iu=Rs.length,Zu=Rs[0],Ic,bu,Rc=Zu[0],Au=Zu[1];uu<Iu;++uu)Ic=Rc,bu=Au,Zu=Rs[uu],Rc=Zu[0],Au=Zu[1],bu<=$r?Au>$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++Un:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--Un;return Un}function el(){Pi=Di,Ni=[],mi=[],Ko=!0}function bs(){var Un=Os(),Lo=Ko&&Un,Js=(Ni=x.merge(Ni)).length;(Lo||Js)&&(dn.polygonStart(),Lo&&(dn.lineStart(),li(null,null,1,dn),dn.lineEnd()),Js&&Br(Ni,Hi,Un,li,dn),dn.polygonEnd()),Pi=dn,Ni=mi=Mn=null}function Fl(){Ss.point=ll,mi&&mi.push(Mn=[]),yo=!0,un=!1,fo=An=NaN}function _l(){Ni&&(ll(Qn,ao),eo&&un&&Di.rejoin(),Ni.push(Di.result())),Ss.point=rl,un&&Pi.lineEnd()}function ll(Un,Lo){var Js=ka(Un,Lo);if(mi&&Mn.push([Un,Lo]),yo)Qn=Un,ao=Lo,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Lo));else if(Js&&un)Pi.point(Un,Lo);else{var Rs=[fo=Math.max(Ai,Math.min(Ta,fo)),An=Math.max(Ai,Math.min(Ta,An))],uu=[Un=Math.max(Ai,Math.min(Ta,Un)),Lo=Math.max(Ai,Math.min(Ta,Lo))];la(Rs,uu,Qt,br,aa,$r)?(un||(Pi.lineStart(),Pi.point(Rs[0],Rs[1])),Pi.point(uu[0],uu[1]),Js||Pi.lineEnd(),Ko=!1):Js&&(Pi.lineStart(),Pi.point(Un,Lo),Ko=!1)}fo=Un,An=Lo,un=Js}return Ss}}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 _n=S(),Rn,En,On,no={sphere:L,point:L,lineStart:cn,lineEnd:L,polygonStart:L,polygonEnd:L};function cn(){no.point=Wo,no.lineEnd=lo}function lo(){no.point=no.lineEnd=L}function Wo(Qt,br){Qt*=c,br*=c,Rn=Qt,En=g(br),On=l(br),no.point=hs}function hs(Qt,br){Qt*=c,br*=c;var aa=g(br),$r=l(br),ka=m(Qt-Rn),li=l(ka),Ci=g(ka),Hi=$r*Ci,Qi=On*aa-En*$r*li,dn=En*aa+On*$r*li;_n.add(T(d(Hi*Hi+Qi*Qi),dn)),Rn=Qt,En=aa,On=$r}function Oo(Qt){return _n.reset(),U(Qt,no),+_n}var Wn=[null,null],No={type:"LineString",coordinates:Wn};function as(Qt,br){return Wn[0]=Qt,Wn[1]=br,Oo(No)}var Ns={Feature:function(Qt,br){return uo(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r<ka;)if(uo(aa[$r].geometry,br))return!0;return!1}},ss={Sphere:function(){return!0},Point:function(Qt,br){return jn(Qt.coordinates,br)},MultiPoint:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(jn(aa[$r],br))return!0;return!1},LineString:function(Qt,br){return Xn(Qt.coordinates,br)},MultiLineString:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(Xn(aa[$r],br))return!0;return!1},Polygon:function(Qt,br){return ls(Qt.coordinates,br)},MultiPolygon:function(Qt,br){for(var aa=Qt.coordinates,$r=-1,ka=aa.length;++$r<ka;)if(ls(aa[$r],br))return!0;return!1},GeometryCollection:function(Qt,br){for(var aa=Qt.geometries,$r=-1,ka=aa.length;++$r<ka;)if(uo(aa[$r],br))return!0;return!1}};function uo(Qt,br){return Qt&&ss.hasOwnProperty(Qt.type)?ss[Qt.type](Qt,br):!1}function jn(Qt,br){return as(Qt,br)===0}function Xn(Qt,br){for(var aa,$r,ka,li=0,Ci=Qt.length;li<Ci;li++){if($r=as(Qt[li],br),$r===0||li>0&&(ka=as(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 ls(Qt,br){return!!Ur(Qt.map(Cs),Ks(br))}function Cs(Qt){return Qt=Qt.map(Ks),Qt.pop(),Qt}function Ks(Qt){return[Qt[0]*c,Qt[1]*c]}function Xo(Qt,br){return(Qt&&Ns.hasOwnProperty(Qt.type)?Ns[Qt.type]:uo)(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 Ln(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 Us(){var Qt,br,aa,$r,ka,li,Ci,Hi,Qi=10,dn=Qi,Pi=90,Di=360,Ni,mi,Mn,Qn,ao=2.5;function eo(){return{type:"MultiLineString",coordinates:fo()}}function fo(){return x.range(_($r/Pi)*Pi,aa,Pi).map(Mn).concat(x.range(_(Hi/Di)*Di,Ci,Di).map(Qn)).concat(x.range(_(br/Qi)*Qi,Qt,Qi).filter(function(An){return m(An%Pi)>r}).map(Ni)).concat(x.range(_(li/dn)*dn,ka,dn).filter(function(An){return m(An%Di)>r}).map(mi))}return eo.lines=function(){return fo().map(function(An){return{type:"LineString",coordinates:An}})},eo.outline=function(){return{type:"Polygon",coordinates:[Mn($r).concat(Qn(Ci).slice(1),Mn(aa).reverse().slice(1),Qn(Hi).reverse().slice(1))]}},eo.extent=function(An){return arguments.length?eo.extentMajor(An).extentMinor(An):eo.extentMinor()},eo.extentMajor=function(An){return arguments.length?($r=+An[0][0],aa=+An[1][0],Hi=+An[0][1],Ci=+An[1][1],$r>aa&&(An=$r,$r=aa,aa=An),Hi>Ci&&(An=Hi,Hi=Ci,Ci=An),eo.precision(ao)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(An){return arguments.length?(br=+An[0][0],Qt=+An[1][0],li=+An[0][1],ka=+An[1][1],br>Qt&&(An=br,br=Qt,Qt=An),li>ka&&(An=li,li=ka,ka=An),eo.precision(ao)):[[br,li],[Qt,ka]]},eo.step=function(An){return arguments.length?eo.stepMajor(An).stepMinor(An):eo.stepMinor()},eo.stepMajor=function(An){return arguments.length?(Pi=+An[0],Di=+An[1],eo):[Pi,Di]},eo.stepMinor=function(An){return arguments.length?(Qi=+An[0],dn=+An[1],eo):[Qi,dn]},eo.precision=function(An){return arguments.length?(ao=+An,Ni=Gi(li,ka,90),mi=Ln(br,Qt,ao),Mn=Gi(Hi,Ci,90),Qn=Ln($r,aa,ao),eo):ao},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function _s(){return Us()()}function Gn(Qt,br){var aa=Qt[0]*c,$r=Qt[1]*c,ka=br[0]*c,li=br[1]*c,Ci=l($r),Hi=g($r),Qi=l(li),dn=g(li),Pi=Ci*l(aa),Di=Ci*g(aa),Ni=Qi*l(ka),mi=Qi*g(ka),Mn=2*f(d(R(li-$r)+Ci*Qi*R(ka-aa))),Qn=g(Mn),ao=Mn?function(eo){var fo=g(eo*=Mn)/Qn,An=g(Mn-eo)/Qn,un=An*Pi+fo*Ni,yo=An*Di+fo*mi,Ko=An*Hi+fo*dn;return[T(yo,un)*h,T(Ko,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return ao.distance=Mn,ao}function zs(Qt){return Qt}var vs=S(),Ws=S(),il,xn,ko,bo,Is={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Is.lineStart=pu,Is.lineEnd=vl},polygonEnd:function(){Is.lineStart=Is.lineEnd=Is.point=L,vs.add(m(Ws)),Ws.reset()},result:function(){var Qt=vs/2;return vs.reset(),Qt}};function pu(){Is.point=co}function co(Qt,br){Is.point=Vs,il=ko=Qt,xn=bo=br}function Vs(Qt,br){Ws.add(bo*Qt-ko*br),ko=Qt,bo=br}function vl(){Vs(il,xn)}var Ts=1/0,js=Ts,us=-Ts,As=us,Nl={point:su,lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var Qt=[[Ts,js],[us,As]];return us=As=-(js=Ts=1/0),Qt}};function su(Qt,br){Qt<Ts&&(Ts=Qt),Qt>us&&(us=Qt),br<js&&(js=br),br>As&&(As=br)}var Tc=0,du=0,Sf=0,Uc=0,Fs=0,dc=0,Hc=0,lu=0,Pl=0,ic,Ou,nl,ml,xs={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){xs.lineStart=xh,xs.lineEnd=ns},polygonEnd:function(){xs.point=Xs,xs.lineStart=nc,xs.lineEnd=fl},result:function(){var Qt=Pl?[Hc/Pl,lu/Pl]:dc?[Uc/dc,Fs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Fs=dc=Hc=lu=Pl=0,Qt}};function Xs(Qt,br){Tc+=Qt,du+=br,++Sf}function nc(){xs.point=Ul}function Ul(Qt,br){xs.point=qu,Xs(nl=Qt,ml=br)}function qu(Qt,br){var aa=Qt-nl,$r=br-ml,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Fs+=ka*(ml+br)/2,dc+=ka,Xs(nl=Qt,ml=br)}function fl(){xs.point=Xs}function xh(){xs.point=bh}function ns(){Es(ic,Ou)}function bh(Qt,br){xs.point=Es,Xs(ic=nl=Qt,Ou=ml=br)}function Es(Qt,br){var aa=Qt-nl,$r=br-ml,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Fs+=ka*(ml+br)/2,dc+=ka,ka=ml*Qt-nl*br,Hc+=ka*(nl+Qt),lu+=ka*(ml+br),Pl+=ka*3,Xs(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(d(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(Is)),Is.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(xs)),xs.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,zs):(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 Zs=16,kf=l(30*c);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,dn,Pi,Di,Ni,mi,Mn,Qn,ao){var eo=dn-$r,fo=Pi-ka,An=eo*eo+fo*fo;if(An>4*br&&Qn--){var un=Ci+Ni,yo=Hi+mi,Ko=Qi+Mn,Ss=d(un*un+yo*yo+Ko*Ko),rl=f(Ko/=Ss),Os=m(m(Ko)-1)<r||m(li-Di)<r?(li+Di)/2:T(yo,un),el=Qt(Os,rl),bs=el[0],Fl=el[1],_l=bs-$r,ll=Fl-ka,Un=fo*_l-eo*ll;(Un*Un/An>br||m((eo*_l+fo*ll)/An-.5)>.3||Ci*Ni+Hi*mi+Qi*Mn<kf)&&(aa($r,ka,li,Ci,Hi,Qi,bs,Fl,Os,un/=Ss,yo/=Ss,Ko,Qn,ao),ao.point(bs,Fl),aa(bs,Fl,Os,un,yo,Ko,dn,Pi,Di,Ni,mi,Mn,Qn,ao))}}return function($r){var ka,li,Ci,Hi,Qi,dn,Pi,Di,Ni,mi,Mn,Qn,ao={point:eo,lineStart:fo,lineEnd:un,polygonStart:function(){$r.polygonStart(),ao.lineStart=yo},polygonEnd:function(){$r.polygonEnd(),ao.lineStart=fo}};function eo(rl,Os){rl=Qt(rl,Os),$r.point(rl[0],rl[1])}function fo(){Di=NaN,ao.point=An,$r.lineStart()}function An(rl,Os){var el=re([rl,Os]),bs=Qt(rl,Os);aa(Di,Ni,Pi,mi,Mn,Qn,Di=bs[0],Ni=bs[1],Pi=rl,mi=el[0],Mn=el[1],Qn=el[2],Zs,$r),$r.point(Di,Ni)}function un(){ao.point=eo,$r.lineEnd()}function yo(){fo(),ao.point=Ko,ao.lineEnd=Ss}function Ko(rl,Os){An(ka=rl,Os),li=Di,Ci=Ni,Hi=mi,Qi=Mn,dn=Qn,ao.point=An}function Ss(){aa(Di,Ni,Pi,mi,Mn,Qn,li,Ci,ka,Hi,Qi,dn,Zs,$r),ao.lineEnd=un,un()}return ao}}var $f=Gu({point:function(Qt,br){this.stream.point(Qt*c,br*c)}});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,dn=Hi*Qt,Pi=Ci/Qt,Di=Hi/Qt,Ni=(Hi*aa-Ci*br)/Qt,mi=(Hi*br+Ci*aa)/Qt;function Mn(Qn,ao){return Qn*=$r,ao*=ka,[Qi*Qn-dn*ao+br,aa-dn*Qn-Qi*ao]}return Mn.invert=function(Qn,ao){return[$r*(Pi*Qn-Di*ao+Ni),ka*(mi-Di*Qn-Pi*ao)]},Mn}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,dn=0,Pi,Di=0,Ni=1,mi=1,Mn=null,Qn=vr,ao=null,eo,fo,An,un=zs,yo=.5,Ko,Ss,rl,Os,el;function bs(Un){return rl(Un[0]*c,Un[1]*c)}function Fl(Un){return Un=rl.invert(Un[0],Un[1]),Un&&[Un[0]*h,Un[1]*h]}bs.stream=function(Un){return Os&&el===Un?Os:Os=$f(Cu(Pi)(Qn(Ko(un(el=Un)))))},bs.preclip=function(Un){return arguments.length?(Qn=Un,Mn=void 0,ll()):Qn},bs.postclip=function(Un){return arguments.length?(un=Un,ao=eo=fo=An=null,ll()):un},bs.clipAngle=function(Un){return arguments.length?(Qn=+Un?ya(Mn=Un*c):(Mn=null,vr),ll()):Mn*h},bs.clipExtent=function(Un){return arguments.length?(un=Un==null?(ao=eo=fo=An=null,zs):ki(ao=+Un[0][0],eo=+Un[0][1],fo=+Un[1][0],An=+Un[1][1]),ll()):ao==null?null:[[ao,eo],[fo,An]]},bs.scale=function(Un){return arguments.length?(aa=+Un,_l()):aa},bs.translate=function(Un){return arguments.length?($r=+Un[0],ka=+Un[1],_l()):[$r,ka]},bs.center=function(Un){return arguments.length?(li=Un[0]%360*c,Ci=Un[1]%360*c,_l()):[li*h,Ci*h]},bs.rotate=function(Un){return arguments.length?(Hi=Un[0]%360*c,Qi=Un[1]%360*c,dn=Un.length>2?Un[2]%360*c:0,_l()):[Hi*h,Qi*h,dn*h]},bs.angle=function(Un){return arguments.length?(Di=Un%360*c,_l()):Di*h},bs.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,_l()):Ni<0},bs.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,_l()):mi<0},bs.precision=function(Un){return arguments.length?(Ko=fh(Ss,yo=Un*Un),ll()):d(yo)},bs.fitExtent=function(Un,Lo){return Xc(bs,Un,Lo)},bs.fitSize=function(Un,Lo){return Ql(bs,Un,Lo)},bs.fitWidth=function(Un,Lo){return qc(bs,Un,Lo)},bs.fitHeight=function(Un,Lo){return Sc(bs,Un,Lo)};function _l(){var Un=yl(aa,0,0,Ni,mi,Di).apply(null,br(li,Ci)),Lo=(Di?yl:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,dn),Ss=ra(br,Lo),rl=ra(Pi,Ss),Ko=fh(Ss,yo),ll()}function ll(){return Os=el=null,bs}return function(){return br=Qt.apply(this,arguments),bs.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]*c,aa=li[1]*c):[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,f(ka*br)]},aa}function yu(Qt,br){var aa=g(Qt),$r=(aa+g(br))/2;if(m($r)<r)return vc(Qt);var ka=1+aa*(2*$r-aa),li=d(ka)/$r;function Ci(Hi,Qi){var dn=d(ka-2*$r*g(Qi))/$r;return[dn*g(Hi*=$r),li-dn*l(Hi)]}return Ci.invert=function(Hi,Qi){var dn=li-Qi,Pi=T(Hi,m(dn))*b(dn);return dn*$r<0&&(Pi-=a*b(Hi)*b(dn)),[Pi/$r,f((ka-(Hi*Hi+dn*dn)*$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,dn={point:function(Ni,mi){Qi=[Ni,mi]}};function Pi(Ni){var mi=Ni[0],Mn=Ni[1];return Qi=null,$r.point(mi,Mn),Qi||(li.point(mi,Mn),Qi)||(Hi.point(mi,Mn),Qi)}Pi.invert=function(Ni){var mi=aa.scale(),Mn=aa.translate(),Qn=(Ni[0]-Mn[0])/mi,ao=(Ni[1]-Mn[1])/mi;return(ao>=.12&&ao<.234&&Qn>=-.425&&Qn<-.214?ka:ao>=.166&&ao<.234&&Qn>=-.214&&Qn<-.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(),Mn=+Ni[0],Qn=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Mn-.455*mi,Qn-.238*mi],[Mn+.455*mi,Qn+.238*mi]]).stream(dn),li=ka.translate([Mn-.307*mi,Qn+.201*mi]).clipExtent([[Mn-.425*mi+r,Qn+.12*mi+r],[Mn-.214*mi-r,Qn+.234*mi-r]]).stream(dn),Hi=Ci.translate([Mn-.205*mi,Qn+.212*mi]).clipExtent([[Mn-.214*mi+r,Qn+.166*mi+r],[Mn-.115*mi-r,Qn+.234*mi-r]]).stream(dn),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=d(br*br+aa*aa),ka=Qt($r),li=g(ka),Ci=l(ka);return[T(br*li,$r*Ci),f($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*f(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*p(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,dn;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=dn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],dn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,dn]]};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),dn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,dn)]])}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,dn=b($r)*d(Ci*Ci+Qi*Qi),Pi=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*p(M(ka/dn,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(m($r)<r)return sl;function li(Ci,Hi){var Qi=ka-Hi,dn=$r*Ci;return[Qi*g(dn),ka-Qi*l(dn)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,dn=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(dn-=a*b(Ci)*b(Qi)),[dn/$r,ka-b($r)*d(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=d(3)/2,Wu=12;function Kc(Qt,br){var aa=f(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,!(m(Ci)<o));++li);return[gf*Qt*(hl+3*uf*$r+ka*(7*kc+9*Hu*$r))/l(aa),f(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(p);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,dn,Pi,Di,Ni=1,mi=1,Mn=Gu({point:function(un,yo){var Ko=An([un,yo]);this.stream.point(Ko[0],Ko[1])}}),Qn=zs,ao,eo;function fo(){return Ni=Qt*$r,mi=Qt*ka,ao=eo=null,An}function An(un){var yo=un[0]*Ni,Ko=un[1]*mi;if(li){var Ss=Ko*Ci-yo*Hi;yo=yo*Ci+Ko*Hi,Ko=Ss}return[yo+br,Ko+aa]}return An.invert=function(un){var yo=un[0]-br,Ko=un[1]-aa;if(li){var Ss=Ko*Ci+yo*Hi;yo=yo*Ci-Ko*Hi,Ko=Ss}return[yo/Ni,Ko/mi]},An.stream=function(un){return ao&&eo===un?ao:ao=Mn(Qn(eo=un))},An.postclip=function(un){return arguments.length?(Qn=un,Qi=dn=Pi=Di=null,fo()):Qn},An.clipExtent=function(un){return arguments.length?(Qn=un==null?(Qi=dn=Pi=Di=null,zs):ki(Qi=+un[0][0],dn=+un[0][1],Pi=+un[1][0],Di=+un[1][1]),fo()):Qi==null?null:[[Qi,dn],[Pi,Di]]},An.scale=function(un){return arguments.length?(Qt=+un,fo()):Qt},An.translate=function(un){return arguments.length?(br=+un[0],aa=+un[1],fo()):[br,aa]},An.angle=function(un){return arguments.length?(li=un%360*c,Hi=g(li),Ci=l(li),fo()):li*h},An.reflectX=function(un){return arguments.length?($r=un?-1:1,fo()):$r<0},An.reflectY=function(un){return arguments.length?(ka=un?-1:1,fo()):ka<0},An.fitExtent=function(un,yo){return Xc(An,un,yo)},An.fitSize=function(un,yo){return Ql(An,un,yo)},An.fitWidth=function(un,yo){return qc(An,un,yo)},An.fitHeight=function(un,yo){return Sc(An,un,yo)},An}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(m(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(f);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*p(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*p(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)}v.geoAlbers=El,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Ne,v.geoCentroid=Fr,v.geoCircle=on,v.geoClipAntimeridian=vr,v.geoClipCircle=ya,v.geoClipExtent=Ki,v.geoClipRectangle=ki,v.geoConicConformal=mf,v.geoConicConformalRaw=hh,v.geoConicEqualArea=Tu,v.geoConicEqualAreaRaw=yu,v.geoConicEquidistant=Cf,v.geoConicEquidistantRaw=Pu,v.geoContains=Xo,v.geoDistance=as,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Kc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=iu,v.geoGraticule=Us,v.geoGraticule10=_s,v.geoIdentity=Xu,v.geoInterpolate=Gn,v.geoLength=Oo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=ql,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=Jc,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),UU=Xe({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,zE(),_x()):x(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,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,c=Math.round,m=Math.sign||function(He){return He>0?1:He<0?-1:0},p=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),d=F(w),u=w*2,y=180/w,f=w/180;function R(He){return He?He/Math.sin(He):1}function L(He){return He>1?A:He<-1?-A:Math.asin(He)}function z(He){return He>1?0:He<-1?w:Math.acos(He)}function F(He){return He>0?Math.sqrt(He):0}function N(He){return He=o(2*He),(He-1)/(He+1)}function O(He){return(o(He)-o(-He))/2}function P(He){return(o(He)+o(-He))/2}function U(He){return n(He+F(He*He+1))}function B(He){return n(He+F(He*He-1))}function X(He){var Je=T(He/2),lt=2*n(r(He/2))/(Je*Je);function vt(Lt,At){var zt=r(Lt),cr=r(At),yr=p(At),Er=cr*zt,jr=-((1-Er?n((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*cr*p(Lt),jr*yr]}return vt.invert=function(Lt,At){var zt=F(Lt*Lt+At*At),cr=-He/2,yr=50,Er;if(!zt)return[0,0];do{var jr=cr/2,Qr=r(jr),pa=p(jr),Aa=pa/Qr,za=-n(E(Qr));cr-=Er=(2/Aa*za-lt*Aa-zt)/(-za/(pa*pa)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(E(Er)>l&&--yr>0);var ci=p(cr);return[t(Lt*ci,zt*r(cr)),L(At*ci/zt)]},vt}function $(){var He=A,Je=x.geoProjectionMutator(X),lt=Je(He);return lt.radius=function(vt){return arguments.length?Je(He=vt*f):He*y},lt.scale(179.976).clipAngle(147)}function se(He,Je){var lt=r(Je),vt=R(z(lt*r(He/=2)));return[2*lt*p(He)*vt,p(Je)*vt]}se.invert=function(He,Je){if(!(He*He+4*Je*Je>w*w+l)){var lt=He,vt=Je,Lt=25;do{var At=p(lt),zt=p(lt/2),cr=r(lt/2),yr=p(vt),Er=r(vt),jr=p(2*vt),Qr=yr*yr,pa=Er*Er,Aa=zt*zt,za=1-pa*cr*cr,ci=za?z(Er*cr)*F(Vi=1/za):Vi=0,Vi,ji=2*ci*Er*zt-He,nn=ci*yr-Je,Sn=Vi*(pa*Aa+ci*Er*cr*Qr),Kn=Vi*(.5*At*jr-ci*2*yr*zt),Bn=Vi*.25*(jr*zt-ci*yr*pa*At),wo=Vi*(Qr*cr+ci*Aa*Er),is=Kn*Bn-wo*Sn;if(!is)break;var Ao=(nn*Kn-ji*wo)/is,Zo=(ji*Bn-nn*Sn)/is;lt-=Ao,vt-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Lt>0);return[lt,vt]}};function le(){return x.geoProjection(se).scale(152.63)}function fe(He){var Je=p(He),lt=r(He),vt=He>=0?1:-1,Lt=T(vt*He),At=(1+Je-lt)/2;function zt(cr,yr){var Er=r(yr),jr=r(cr/=2);return[(1+Er)*p(cr),(vt*yr>-t(jr,Lt)-.001?0:-vt*10)+At+p(yr)*lt-(1+Er)*Je*jr]}return zt.invert=function(cr,yr){var Er=0,jr=0,Qr=50;do{var pa=r(Er),Aa=p(Er),za=r(jr),ci=p(jr),Vi=1+za,ji=Vi*Aa-cr,nn=At+ci*lt-Vi*Je*pa-yr,Sn=Vi*pa/2,Kn=-Aa*ci,Bn=Je*Vi*Aa/2,wo=lt*za+Je*pa*ci,is=Kn*Bn-wo*Sn,Ao=(nn*Kn-ji*wo)/is/2,Zo=(ji*Bn-nn*Sn)/is;E(Zo)>2&&(Zo/=2),Er-=Ao,jr-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Qr>0);return vt*jr>-t(r(Er),Lt)-.001?[Er*2,jr]:null},zt}function V(){var He=20*f,Je=He>=0?1:-1,lt=T(Je*He),vt=x.geoProjectionMutator(fe),Lt=vt(He),At=Lt.stream;return Lt.parallel=function(zt){return arguments.length?(lt=T((Je=(He=zt*f)>=0?1:-1)*He),vt(He)):He*y},Lt.stream=function(zt){var cr=Lt.rotate(),yr=At(zt),Er=(Lt.rotate([0,0]),At(zt)),jr=Lt.precision();return Lt.rotate(cr),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=Je*-180;Je*Qr<180;Qr+=Je*90)Er.point(Qr,Je*90);if(He)for(;Je*(Qr-=3*Je*jr)>=-180;)Er.point(Qr,Je*-t(r(Qr*f/2),lt)*y);Er.lineEnd(),Er.polygonEnd()},yr},Lt.scale(218.695).center([0,28.0974])}function Y(He,Je){var lt=T(Je/2),vt=F(1-lt*lt),Lt=1+vt*r(He/=2),At=p(He)*vt/Lt,zt=lt/Lt,cr=At*At,yr=zt*zt;return[4/3*At*(3+cr-3*yr),4/3*zt*(3+3*cr-yr)]}Y.invert=function(He,Je){if(He*=3/8,Je*=3/8,!He&&E(Je)>1)return null;var lt=He*He,vt=Je*Je,Lt=1+lt+vt,At=F((Lt-F(Lt*Lt-4*Je*Je))/2),zt=L(At)/3,cr=At?B(E(Je/At))/3:U(E(He))/3,yr=r(zt),Er=P(cr),jr=Er*Er-yr*yr;return[m(He)*2*t(O(cr)*yr,.25-jr),m(Je)*2*t(Er*p(zt),.25+jr)]};function ee(){return x.geoProjection(Y).scale(66.1603)}var q=F(8),oe=n(1+b);function ae(He,Je){var lt=E(Je);return lt<M?[He,n(T(M+Je/2))]:[He*r(lt)*(2*b-1/p(lt)),m(Je)*(2*b*(lt-M)-n(T(lt/2)))]}ae.invert=function(He,Je){if((At=E(Je))<oe)return[He,2*e(o(Je))-A];var lt=M,vt=25,Lt,At;do{var zt=r(lt/2),cr=T(lt/2);lt-=Lt=(q*(lt-M)-n(cr)-At)/(q-zt*zt/(2*cr))}while(E(Lt)>_&&--vt>0);return[He/(r(lt)*(q-1/p(lt))),m(Je)*lt]};function j(){return x.geoProjection(ae).scale(112.314)}function Q(He){var Je=2*w/He;function lt(vt,Lt){var At=x.geoAzimuthalEquidistantRaw(vt,Lt);if(E(vt)>A){var zt=t(At[1],At[0]),cr=F(At[0]*At[0]+At[1]*At[1]),yr=Je*c((zt-A)/Je)+A,Er=t(p(zt-=yr),2-r(zt));zt=yr+L(w/cr*p(Er))-Er,At[0]=cr*r(zt),At[1]=cr*p(zt)}return At}return lt.invert=function(vt,Lt){var At=F(vt*vt+Lt*Lt);if(At>A){var zt=t(Lt,vt),cr=Je*c((zt-A)/Je)+A,yr=zt>cr?-1:1,Er=At*r(cr-zt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+At*At)));zt=cr+2*e((jr+yr*F(jr*jr-3))/3),vt=At*r(zt),Lt=At*p(zt)}return x.geoAzimuthalEquidistantRaw.invert(vt,Lt)},lt}function re(){var He=5,Je=x.geoProjectionMutator(Q),lt=Je(He),vt=lt.stream,Lt=.01,At=-r(Lt*f),zt=p(Lt*f);return lt.lobes=function(cr){return arguments.length?Je(He=+cr):He},lt.stream=function(cr){var yr=lt.rotate(),Er=vt(cr),jr=(lt.rotate([0,0]),vt(cr));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,pa=360/He,Aa=2*w/He,za=90-180/He,ci=A;Qr<He;++Qr,za-=pa,ci-=Aa)jr.point(t(zt*r(ci),At)*y,L(zt*p(ci))*y),za<-90?(jr.point(-90,-180-za-Lt),jr.point(-90,-180-za+Lt)):(jr.point(90,za+Lt),jr.point(90,za-Lt));jr.lineEnd(),jr.polygonEnd()},Er},lt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function ce(He,Je){if(arguments.length<2&&(Je=He),Je===1)return x.geoAzimuthalEqualAreaRaw;if(Je===1/0)return be;function lt(vt,Lt){var At=x.geoAzimuthalEqualAreaRaw(vt/Je,Lt);return At[0]*=He,At}return lt.invert=function(vt,Lt){var At=x.geoAzimuthalEqualAreaRaw.invert(vt/He,Lt);return At[0]*=Je,At},lt}function be(He,Je){return[He*r(Je)/r(Je/=2),2*p(Je)]}be.invert=function(He,Je){var lt=2*L(Je/2);return[He*r(lt/2)/r(lt),lt]};function Ae(){var He=2,Je=x.geoProjectionMutator(ce),lt=Je(He);return lt.coefficient=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(169.529)}function De(He,Je,lt){var vt=100,Lt,At,zt;lt=lt===void 0?0:+lt,Je=+Je;do At=He(lt),zt=He(lt+l),At===zt&&(zt=At+l),lt-=Lt=-1*l*(At-Je)/(At-zt);while(vt-- >0&&E(Lt)>l);return vt<0?NaN:lt}function ze(He,Je,lt){return Je===void 0&&(Je=40),lt===void 0&&(lt=_),function(vt,Lt,At,zt){var cr,yr,Er;At=At===void 0?0:+At,zt=zt===void 0?0:+zt;for(var jr=0;jr<Je;jr++){var Qr=He(At,zt),pa=Qr[0]-vt,Aa=Qr[1]-Lt;if(E(pa)<lt&&E(Aa)<lt)break;var za=pa*pa+Aa*Aa;if(za>cr){At-=yr/=2,zt-=Er/=2;continue}cr=za;var ci=(At>0?-1:1)*lt,Vi=(zt>0?-1:1)*lt,ji=He(At+ci,zt),nn=He(At,zt+Vi),Sn=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(nn[0]-Qr[0])/Vi,wo=(nn[1]-Qr[1])/Vi,is=wo*Sn-Kn*Bn,Ao=(E(is)<.5?.5:1)/is;if(yr=(Aa*Bn-pa*wo)*Ao,Er=(pa*Kn-Aa*Sn)*Ao,At+=yr,zt+=Er,E(yr)<lt&&E(Er)<lt)break}return[At,zt]}}function Ze(){var He=ce(1.68,2),Je=1.4,lt=12;function vt(Lt,At){if(Lt+At<-Je){var zt=(Lt-At+1.6)*(Lt+At+Je)/8;Lt+=zt,At-=.8*zt*p(At+w/2)}var cr=He(Lt,At),yr=(1-r(Lt*At))/lt;return cr[1]<0&&(cr[0]*=1+yr),cr[1]>0&&(cr[1]*=1+yr/1.5*cr[0]*cr[0]),cr}return vt.invert=ze(vt),vt}function at(){return x.geoProjection(Ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(He,Je){var lt=He*p(Je),vt=30,Lt;do Je-=Lt=(Je+p(Je)-lt)/(1+r(Je));while(E(Lt)>l&&--vt>0);return Je/2}function rt(He,Je,lt){function vt(Lt,At){return[He*Lt*r(At=nt(lt,At)),Je*p(At)]}return vt.invert=function(Lt,At){return At=L(At/Je),[Lt/(He*r(At)),L((2*At+p(2*At))/lt)]},vt}var st=rt(b/A,b,w);function Me(){return x.geoProjection(st).scale(169.529)}var ye=2.00276,he=1.11072;function Oe(He,Je){var lt=nt(w,Je);return[ye*He/(1/r(Je)+he/r(lt)),(Je+b*p(lt))/ye]}Oe.invert=function(He,Je){var lt=ye*Je,vt=Je<0?-M:M,Lt=25,At,zt;do zt=lt-b*p(vt),vt-=At=(p(2*vt)+2*vt-w*p(zt))/(2*r(2*vt)+2+w*r(zt)*b*r(vt));while(E(At)>l&&--Lt>0);return zt=lt-b*p(vt),[He*(1/r(zt)+he/r(vt))/ye,zt]};function tt(){return x.geoProjection(Oe).scale(160.857)}function ot(He){var Je=0,lt=x.geoProjectionMutator(He),vt=lt(Je);return vt.parallel=function(Lt){return arguments.length?lt(Je=Lt*f):Je*y},vt}function Qe(He,Je){return[He*r(Je),Je]}Qe.invert=function(He,Je){return[He/r(Je),Je]};function Pt(){return x.geoProjection(Qe).scale(152.63)}function It(He){if(!He)return Qe;var Je=1/T(He);function lt(vt,Lt){var At=Je+He-Lt,zt=At&&vt*r(Lt)/At;return[At*p(zt),Je-At*r(zt)]}return lt.invert=function(vt,Lt){var At=F(vt*vt+(Lt=Je-Lt)*Lt),zt=Je+He-At;return[At/r(zt)*t(vt,Lt),zt]},lt}function qt(){return ot(It).scale(123.082).center([0,26.1441]).parallel(45)}function Wt(He){function Je(lt,vt){var Lt=A-vt,At=Lt&&lt*He*p(Lt)/Lt;return[Lt*p(At)/He,A-Lt*r(At)]}return Je.invert=function(lt,vt){var Lt=lt*He,At=A-vt,zt=F(Lt*Lt+At*At),cr=t(Lt,At);return[(zt?zt/p(zt):1)*cr/He,A-zt]},Je}function kr(){var He=.5,Je=x.geoProjectionMutator(Wt),lt=Je(He);return lt.fraction=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(158.837)}var mr=rt(1,4/w,w);function qr(){return x.geoProjection(mr).scale(152.63)}function Sr(He,Je,lt,vt,Lt,At){var zt=r(At),cr;if(E(He)>1||E(At)>1)cr=z(lt*Lt+Je*vt*zt);else{var yr=p(He/2),Er=p(At/2);cr=2*L(F(yr*yr+Je*vt*Er*Er))}return E(cr)>l?[cr,t(vt*p(At),Je*Lt-lt*vt*zt)]:[0,0]}function Rr(He,Je,lt){return z((He*He+Je*Je-lt*lt)/(2*He*Je))}function wt(He){return He-2*w*a((He+w)/(2*w))}function Ne(He,Je,lt){for(var vt=[[He[0],He[1],p(He[1]),r(He[1])],[Je[0],Je[1],p(Je[1]),r(Je[1])],[lt[0],lt[1],p(lt[1]),r(lt[1])]],Lt=vt[2],At,zt=0;zt<3;++zt,Lt=At)At=vt[zt],Lt.v=Sr(At[1]-Lt[1],Lt[3],Lt[2],At[3],At[2],At[0]-Lt[0]),Lt.point=[0,0];var cr=Rr(vt[0].v[0],vt[2].v[0],vt[1].v[0]),yr=Rr(vt[0].v[0],vt[1].v[0],vt[2].v[0]),Er=w-cr;vt[2].point[1]=0,vt[0].point[0]=-(vt[1].point[0]=vt[0].v[0]/2);var jr=[vt[2].point[0]=vt[0].point[0]+vt[2].v[0]*r(cr),2*(vt[0].point[1]=vt[1].point[1]=vt[2].v[0]*p(cr))];function Qr(pa,Aa){var za=p(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var nn=vt[ji];if(Vi[ji]=Sr(Aa-nn[1],nn[3],nn[2],ci,za,pa-nn[0]),!Vi[ji][0])return nn.point;Vi[ji][1]=wt(Vi[ji][1]-nn.v[1])}var Sn=jr.slice();for(ji=0;ji<3;++ji){var Kn=ji==2?0:ji+1,Bn=Rr(vt[ji].v[0],Vi[ji][0],Vi[Kn][0]);Vi[ji][1]<0&&(Bn=-Bn),ji?ji==1?(Bn=yr-Bn,Sn[0]-=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*p(Bn)):(Bn=Er-Bn,Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]+=Vi[ji][0]*p(Bn)):(Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*p(Bn))}return Sn[0]/=3,Sn[1]/=3,Sn}return Qr}function Ke(He){return He[0]*=f,He[1]*=f,He}function Te(){return Ie([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ie(He,Je,lt){var vt=x.geoCentroid({type:"MultiPoint",coordinates:[He,Je,lt]}),Lt=[-vt[0],-vt[1]],At=x.geoRotation(Lt),zt=Ne(Ke(At(He)),Ke(At(Je)),Ke(At(lt)));zt.invert=ze(zt);var cr=x.geoProjection(zt).rotate(Lt),yr=cr.center;return delete cr.rotate,cr.center=function(Er){return arguments.length?yr(At(Er)):At.invert(yr())},cr.clipAngle(90)}function Ve(He,Je){var lt=F(1-p(Je));return[2/d*He*lt,d*(1-lt)]}Ve.invert=function(He,Je){var lt=(lt=Je/d-1)*lt;return[lt>0?He*F(w/lt)/2:0,L(1-lt)]};function Ce(){return x.geoProjection(Ve).scale(95.6464).center([0,30])}function Ee(He){var Je=T(He);function lt(vt,Lt){return[vt,(vt?vt/p(vt):1)*(p(Lt)*r(vt)-Je*r(Lt))]}return lt.invert=Je?function(vt,Lt){vt&&(Lt*=p(vt)/vt);var At=r(vt);return[vt,2*t(F(At*At+Je*Je-Lt*Lt)-At,Je-Lt)]}:function(vt,Lt){return[vt,L(vt?Lt*T(vt)/vt:Lt)]},lt}function Pe(){return ot(Ee).scale(249.828).clipAngle(90)}var ft=F(3);function ct(He,Je){return[ft*He*(2*r(2*Je/3)-1)/d,ft*d*p(Je/3)]}ct.invert=function(He,Je){var lt=3*L(Je/(ft*d));return[d*He/(ft*(2*r(2*lt/3)-1)),lt]};function _t(){return x.geoProjection(ct).scale(156.19)}function Ct(He){var Je=r(He);function lt(vt,Lt){return[vt*Je,p(Lt)/Je]}return lt.invert=function(vt,Lt){return[vt/Je,L(Lt*Je)]},lt}function ir(){return ot(Ct).parallel(38.58).scale(195.044)}function rr(He){var Je=r(He);function lt(vt,Lt){return[vt*Je,(1+Je)*T(Lt/2)]}return lt.invert=function(vt,Lt){return[vt/Je,e(Lt/(1+Je))*2]},lt}function er(){return ot(rr).scale(124.75)}function Lr(He,Je){var lt=F(8/(3*w));return[lt*He*(1-E(Je)/w),lt*Je]}Lr.invert=function(He,Je){var lt=F(8/(3*w)),vt=Je/lt;return[He/(lt*(1-E(vt)/w)),vt]};function fa(){return x.geoProjection(Lr).scale(165.664)}function Da(He,Je){var lt=F(4-3*p(E(Je)));return[2/F(6*w)*He*lt,m(Je)*F(2*w/3)*(2-lt)]}Da.invert=function(He,Je){var lt=2-E(Je)/F(2*w/3);return[He*F(6*w)/(2*lt),m(Je)*L((4-lt*lt)/3)]};function Ia(){return x.geoProjection(Da).scale(165.664)}function qa(He,Je){var lt=F(w*(4+w));return[2/lt*He*(1+F(1-4*Je*Je/(w*w))),4/lt*Je]}qa.invert=function(He,Je){var lt=F(w*(4+w))/2;return[He*lt/(1+F(1-Je*Je*(4+w)/(4*w))),Je*lt/2]};function Wa(){return x.geoProjection(qa).scale(180.739)}function Ca(He,Je){var lt=(2+A)*p(Je);Je/=2;for(var vt=0,Lt=1/0;vt<10&&E(Lt)>l;vt++){var At=r(Je);Je-=Lt=(Je+p(Je)*(At+2)-lt)/(2*At*(1+At))}return[2/F(w*(4+w))*He*(1+r(Je)),2*F(w/(4+w))*p(Je)]}Ca.invert=function(He,Je){var lt=Je*F((4+w)/w)/2,vt=L(lt),Lt=r(vt);return[He/(2/F(w*(4+w))*(1+Lt)),L((vt+lt*(Lt+2))/(2+A))]};function hi(){return x.geoProjection(Ca).scale(180.739)}function wi(He,Je){return[He*(1+r(Je))/F(2+w),2*Je/F(2+w)]}wi.invert=function(He,Je){var lt=F(2+w),vt=Je*lt/2;return[lt*He/(1+r(vt)),vt]};function Kt(){return x.geoProjection(wi).scale(173.044)}function Ft(He,Je){for(var lt=(1+A)*p(Je),vt=0,Lt=1/0;vt<10&&E(Lt)>l;vt++)Je-=Lt=(Je+p(Je)-lt)/(1+r(Je));return lt=F(2+w),[He*(1+r(Je))/lt,2*Je/lt]}Ft.invert=function(He,Je){var lt=1+A,vt=F(lt/2);return[He*2*vt/(1+r(Je*=vt)),L((Je+p(Je))/lt)]};function Yt(){return x.geoProjection(Ft).scale(173.044)}var Jt=3+2*b;function Fr(He,Je){var lt=p(He/=2),vt=r(He),Lt=F(r(Je)),At=r(Je/=2),zt=p(Je)/(At+b*vt*Lt),cr=F(2/(1+zt*zt)),yr=F((b*At+(vt+lt)*Lt)/(b*At+(vt-lt)*Lt));return[Jt*(cr*(yr-1/yr)-2*n(yr)),Jt*(cr*zt*(yr+1/yr)-2*e(zt))]}Fr.invert=function(He,Je){if(!(At=Y.invert(He/1.2,Je*1.065)))return null;var lt=At[0],vt=At[1],Lt=20,At;He/=Jt,Je/=Jt;do{var zt=lt/2,cr=vt/2,yr=p(zt),Er=r(zt),jr=p(cr),Qr=r(cr),pa=r(vt),Aa=F(pa),za=jr/(Qr+b*Er*Aa),ci=za*za,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,nn=b*Qr+(Er-yr)*Aa,Sn=ji/nn,Kn=F(Sn),Bn=Kn-1/Kn,wo=Kn+1/Kn,is=Vi*Bn-2*n(Kn)-He,Ao=Vi*za*wo-2*e(za)-Je,Zo=jr&&g*Aa*yr*ci/jr,ps=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*za*Vi*Vi*Vi,tl=ul*Zo,Jo=ul*ps,$o=($o=2*Qr+b*Aa*(Er-yr))*$o*Kn,Il=(b*Er*Qr*Aa+pa)/$o,eu=-(b*yr*jr)/(Aa*$o),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/Sn),vu=Bn*Jo-2*eu/Kn+Vi*(eu+eu/Sn),Tl=za*wo*tl-2*Zo/(1+ci)+Vi*wo*Zo+Vi*za*(Il-Il/Sn),cu=za*wo*Jo-2*ps/(1+ci)+Vi*wo*ps+Vi*za*(eu-eu/Sn),uc=vu*Tl-cu*Ru;if(!uc)break;var Vl=(Ao*vu-is*cu)/uc,Gl=(is*Tl-Ao*Ru)/uc;lt-=Vl,vt=i(-A,s(A,vt-Gl))}while((E(Vl)>l||E(Gl)>l)&&--Lt>0);return E(E(vt)-A)<l?[0,vt]:Lt&&[lt,vt]};function ta(){return x.geoProjection(Fr).scale(62.5271)}var ra=r(35*f);function ca(He,Je){var lt=T(Je/2);return[He*ra*F(1-lt*lt),(1+ra)*lt]}ca.invert=function(He,Je){var lt=Je/(1+ra);return[He&&He/(ra*F(1-lt*lt)),2*e(lt)]};function Ba(){return x.geoProjection(ca).scale(137.152)}function $a(He,Je){var lt=Je/2,vt=r(lt);return[2*He/d*r(Je)*vt*vt,d*T(lt)]}$a.invert=function(He,Je){var lt=e(Je/d),vt=r(lt),Lt=2*lt;return[He*d/2/(r(Lt)*vt*vt),Lt]};function Za(){return x.geoProjection($a).scale(135.264)}function ri(He){var Je=1-He,lt=At(w,0)[0]-At(-w,0)[0],vt=At(0,A)[1]-At(0,-A)[1],Lt=F(2*vt/lt);function At(yr,Er){var jr=r(Er),Qr=p(Er);return[jr/(Je+He*jr)*yr,Je*Er+He*Qr]}function zt(yr,Er){var jr=At(yr,Er);return[jr[0]*Lt,jr[1]/Lt]}function cr(yr){return zt(0,yr)[1]}return zt.invert=function(yr,Er){var jr=De(cr,Er),Qr=yr/Lt*(He+Je/r(jr));return[Qr,jr]},zt}function pi(){var He=.5,Je=x.geoProjectionMutator(ri),lt=Je(He);return lt.alpha=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(168.725)}function Ra(He){return[He[0]/2,L(T(He[1]/2*f))*y]}function tn(He){return[He[0]*2,2*e(p(He[1]*f))*y]}function on(He){He==null&&(He=x.geoOrthographic);var Je=He(),lt=x.geoEquirectangular().scale(y).precision(0).clipAngle(null).translate([0,0]);function vt(At){return Je(Ra(At))}Je.invert&&(vt.invert=function(At){return tn(Je.invert(At))}),vt.stream=function(At){var zt=Je.stream(At),cr=lt.stream({point:function(yr,Er){zt.point(yr/2,L(T(-Er/2*f))*y)},lineStart:function(){zt.lineStart()},lineEnd:function(){zt.lineEnd()},polygonStart:function(){zt.polygonStart()},polygonEnd:function(){zt.polygonEnd()}});return cr.sphere=zt.sphere,cr};function Lt(At){vt[At]=function(){return arguments.length?(Je[At].apply(Je,arguments),vt):Je[At]()}}return vt.rotate=function(At){return arguments.length?(lt.rotate(At),vt):lt.rotate()},vt.center=function(At){return arguments.length?(Je.center(Ra(At)),vt):tn(Je.center())},Lt("angle"),Lt("clipAngle"),Lt("clipExtent"),Lt("fitExtent"),Lt("fitHeight"),Lt("fitSize"),Lt("fitWidth"),Lt("scale"),Lt("translate"),Lt("precision"),vt.scale(249.5)}function hn(He,Je){var lt=2*w/Je,vt=He*He;function Lt(At,zt){var cr=x.geoAzimuthalEquidistantRaw(At,zt),yr=cr[0],Er=cr[1],jr=yr*yr+Er*Er;if(jr>vt){var Qr=F(jr),pa=t(Er,yr),Aa=lt*c(pa/lt),za=pa-Aa,ci=He*r(za),Vi=(He*p(za)-za*p(ci))/(A-ci),ji=Tt(za,Vi),nn=(w-He)/ut(ji,ci,w);yr=Qr;var Sn=50,Kn;do yr-=Kn=(He+ut(ji,ci,yr)*nn-Qr)/(ji(yr)*nn);while(E(Kn)>l&&--Sn>0);Er=za*p(yr),yr<A&&(Er-=Vi*(yr-A));var Bn=p(Aa),wo=r(Aa);cr[0]=yr*wo-Er*Bn,cr[1]=yr*Bn+Er*wo}return cr}return Lt.invert=function(At,zt){var cr=At*At+zt*zt;if(cr>vt){var yr=F(cr),Er=t(zt,At),jr=lt*c(Er/lt),Qr=Er-jr;At=yr*r(Qr),zt=yr*p(Qr);for(var pa=At-A,Aa=p(At),za=zt/Aa,ci=At<A?1/0:0,Vi=10;;){var ji=He*p(za),nn=He*r(za),Sn=p(nn),Kn=A-nn,Bn=(ji-za*Sn)/Kn,wo=Tt(za,Bn);if(E(ci)<_||!--Vi)break;za-=ci=(za*Aa-Bn*pa-zt)/(Aa-pa*2*(Kn*(nn+za*ji*r(nn)-Sn)-ji*(ji-za*Sn))/(Kn*Kn))}yr=He+ut(wo,nn,At)*(w-He)/ut(wo,nn,w),Er=jr+za,At=yr*r(Er),zt=yr*p(Er)}return x.geoAzimuthalEquidistantRaw.invert(At,zt)},Lt}function Tt(He,Je){return function(lt){var vt=He*r(lt);return lt<A&&(vt-=Je),F(1+vt*vt)}}function ut(He,Je,lt){for(var vt=50,Lt=(lt-Je)/vt,At=He(Je)+He(lt),zt=1,cr=Je;zt<vt;++zt)At+=2*He(cr+=Lt);return At*.5*Lt}function Br(){var He=6,Je=30*f,lt=r(Je),vt=p(Je),Lt=x.geoProjectionMutator(hn),At=Lt(Je,He),zt=At.stream,cr=.01,yr=-r(cr*f),Er=p(cr*f);return At.radius=function(jr){return arguments.length?(lt=r(Je=jr*f),vt=p(Je),Lt(Je,He)):Je*y},At.lobes=function(jr){return arguments.length?Lt(Je,He=+jr):He},At.stream=function(jr){var Qr=At.rotate(),pa=zt(jr),Aa=(At.rotate([0,0]),zt(jr));return At.rotate(Qr),pa.sphere=function(){Aa.polygonStart(),Aa.lineStart();for(var za=0,ci=2*w/He,Vi=0;za<He;++za,Vi-=ci)Aa.point(t(Er*r(Vi),yr)*y,L(Er*p(Vi))*y),Aa.point(t(vt*r(Vi-ci/2),lt)*y,L(vt*p(Vi-ci/2))*y);Aa.lineEnd(),Aa.polygonEnd()},pa},At.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function Cr(He,Je,lt,vt,Lt,At,zt,cr){arguments.length<8&&(cr=0);function yr(Er,jr){if(!jr)return[He*Er/w,0];var Qr=jr*jr,pa=He+Qr*(Je+Qr*(lt+Qr*vt)),Aa=jr*(Lt-1+Qr*(At-cr+Qr*zt)),za=(pa*pa+Aa*Aa)/(2*Aa),ci=Er*L(pa/za)/w;return[za*p(ci),jr*(1+Qr*cr)+za*(1-r(ci))]}return yr.invert=function(Er,jr){var Qr=w*Er/He,pa=jr,Aa,za,ci=50;do{var Vi=pa*pa,ji=He+Vi*(Je+Vi*(lt+Vi*vt)),nn=pa*(Lt-1+Vi*(At-cr+Vi*zt)),Sn=ji*ji+nn*nn,Kn=2*nn,Bn=Sn/Kn,wo=Bn*Bn,is=L(ji/Bn)/w,Ao=Qr*is,Zo=ji*ji,ps=(2*Je+Vi*(4*lt+Vi*6*vt))*pa,ul=Lt+Vi*(3*At+Vi*5*zt),tl=2*(ji*ps+nn*(ul-1)),Jo=2*(ul-1),$o=(tl*Kn-Sn*Jo)/(Kn*Kn),Il=r(Ao),eu=p(Ao),Ru=Bn*Il,vu=Bn*eu,Tl=Qr/w*(1/F(1-Zo/wo))*(ps*Bn-ji*$o)/wo,cu=vu-Er,uc=pa*(1+Vi*cr)+Bn-Ru-jr,Vl=$o*eu+Ru*Tl,Gl=Ru*is,de=1+$o-($o*Il-vu*Tl),Fe=vu*is,et=Vl*Fe-de*Gl;if(!et)break;Qr-=Aa=(uc*Vl-cu*de)/et,pa-=za=(cu*Fe-uc*Gl)/et}while((E(Aa)>l||E(za)>l)&&--ci>0);return[Qr,pa]},yr}var xr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ir(){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 xt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Xt(){return x.geoProjection(xt).scale(130.945)}function vr(He,Je){var lt=He*He,vt=Je*Je;return[He*(1-.162388*vt)*(.87-952426e-9*lt*lt),Je*(1+vt/12)]}vr.invert=function(He,Je){var lt=He,vt=Je,Lt=50,At;do{var zt=vt*vt;vt-=At=(vt*(1+zt/12)-Je)/(1+zt/4)}while(E(At)>l&&--Lt>0);Lt=50,He/=1-.162388*zt;do{var cr=(cr=lt*lt)*cr;lt-=At=(lt*(.87-952426e-9*cr)-He)/(.87-.00476213*cr)}while(E(At)>l&&--Lt>0);return[lt,vt]};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 ya(He){var Je=He(A,0)[0]-He(-A,0)[0];function lt(vt,Lt){var At=vt>0?-.5:.5,zt=He(vt+At*w,Lt);return zt[0]-=At*Je,zt}return He.invert&&(lt.invert=function(vt,Lt){var At=vt>0?-.5:.5,zt=He.invert(vt+At*Je,Lt),cr=zt[0]-At*w;return cr<-w?cr+=2*w:cr>w&&(cr-=2*w),zt[0]=cr,zt}),lt}function la(He,Je){var lt=m(He),vt=m(Je),Lt=r(Je),At=r(He)*Lt,zt=p(He)*Lt,cr=p(vt*Je);He=E(t(zt,cr)),Je=L(At),E(He-A)>l&&(He%=A);var yr=Ta(He>w/4?A-He:He,Je);return He>w/4&&(cr=yr[0],yr[0]=-yr[1],yr[1]=-cr),yr[0]*=lt,yr[1]*=-vt,yr}la.invert=function(He,Je){E(He)>1&&(He=m(He)*2-He),E(Je)>1&&(Je=m(Je)*2-Je);var lt=m(He),vt=m(Je),Lt=-lt*He,At=-vt*Je,zt=At/Lt<1,cr=Ai(zt?At:Lt,zt?Lt:At),yr=cr[0],Er=cr[1],jr=r(Er);return zt&&(yr=-A-yr),[lt*(t(p(yr)*jr,-p(Er))+w),vt*L(r(yr)*jr)]};function Ta(He,Je){if(Je===A)return[0,0];var lt=p(Je),vt=lt*lt,Lt=vt*vt,At=1+Lt,zt=1+3*Lt,cr=1-Lt,yr=L(1/F(At)),Er=cr+vt*At*yr,jr=(1-lt)/Er,Qr=F(jr),pa=jr*At,Aa=F(pa),za=Qr*cr,ci,Vi;if(He===0)return[0,-(za+vt*Aa)];var ji=r(Je),nn=1/ji,Sn=2*lt*ji,Kn=(-3*vt+yr*zt)*Sn,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),wo=.5*Bn/Qr,is=cr*wo-2*vt*Qr*Sn,Ao=vt*At*Bn+jr*zt*Sn,Zo=-nn*Sn,ps=-nn*Ao,ul=-2*nn*is,tl=4*He/w,Jo;if(He>.222*w||Je<w/4&&He>.175*w){if(ci=(za+vt*F(pa*(1+Lt)-za*za))/(1+Lt),He>w/4)return[ci,ci];var $o=ci,Il=.5*ci;ci=.5*(Il+$o),Vi=50;do{var eu=F(pa-ci*ci),Ru=ci*(ul+Zo*eu)+ps*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(pa-vu),cu=ul+Zo*Tl,uc=ci*cu+ps*L(ci/Aa)-tl,Vl=cu+(ps-Zo*vu)/Tl;ci-=Jo=Tl?uc/Vl:0}while(E(Jo)>l&&--Vi>0)}return[ci,-za-vt*F(pa-ci*ci)]}function Ai(He,Je){for(var lt=0,vt=1,Lt=.5,At=50;;){var zt=Lt*Lt,cr=F(Lt),yr=L(1/F(1+zt)),Er=1-zt+Lt*(1+zt)*yr,jr=(1-cr)/Er,Qr=F(jr),pa=jr*(1+zt),Aa=Qr*(1-zt),za=pa-He*He,ci=F(za),Vi=Je+Aa+Lt*ci;if(E(vt-lt)<_||--At===0||Vi===0)break;Vi>0?lt=Lt:vt=Lt,Lt=.5*(lt+vt)}if(!At)return null;var ji=L(cr),nn=r(ji),Sn=1/nn,Kn=2*cr*nn,Bn=(-3*Lt+yr*(1+3*zt))*Kn,wo=(-Er*nn-(1-cr)*Bn)/(Er*Er),is=.5*wo/Qr,Ao=(1-zt)*is-2*Lt*Qr*Kn,Zo=-2*Sn*Ao,ps=-Sn*Kn,ul=-Sn*(Lt*(1+zt)*wo+jr*(1+3*zt)*Kn);return[w/4*(He*(Zo+ps*ci)+ul*L(He/F(pa))),ji]}function ki(){return x.geoProjection(ya(la)).scale(239.75)}function Ki(He,Je,lt){var vt,Lt,At;return He?(vt=_n(He,lt),Je?(Lt=_n(Je,1-lt),At=Lt[1]*Lt[1]+lt*vt[0]*vt[0]*Lt[0]*Lt[0],[[vt[0]*Lt[2]/At,vt[1]*vt[2]*Lt[0]*Lt[1]/At],[vt[1]*Lt[1]/At,-vt[0]*vt[2]*Lt[0]*Lt[2]/At],[vt[2]*Lt[1]*Lt[2]/At,-lt*vt[0]*vt[1]*Lt[0]/At]]):[[vt[0],0],[vt[1],0],[vt[2],0]]):(Lt=_n(Je,1-lt),[[0,Lt[0]/Lt[1]],[1/Lt[1],0],[Lt[2]/Lt[1],0]])}function _n(He,Je){var lt,vt,Lt,At,zt;if(Je<l)return At=p(He),vt=r(He),lt=Je*(He-At*vt)/4,[At-lt*vt,vt+lt*At,1-Je*At*At/2,He-lt];if(Je>=1-l)return lt=(1-Je)/4,vt=P(He),At=N(He),Lt=1/vt,zt=vt*O(He),[At+lt*(zt-He)/(vt*vt),Lt-lt*At*Lt*(zt-He),Lt+lt*At*Lt*(zt+He),2*e(o(He))-A+lt*(zt-He)/vt];var cr=[1,0,0,0,0,0,0,0,0],yr=[F(Je),0,0,0,0,0,0,0,0],Er=0;for(vt=F(1-Je),zt=1;E(yr[Er]/cr[Er])>l&&Er<8;)lt=cr[Er++],yr[Er]=(lt-vt)/2,cr[Er]=(lt+vt)/2,vt=F(lt*vt),zt*=2;Lt=zt*cr[Er]*He;do At=yr[Er]*p(vt=Lt)/cr[Er],Lt=(L(At)+Lt)/2;while(--Er);return[p(Lt),At=r(Lt),At/r(Lt-vt),Lt]}function Rn(He,Je,lt){var vt=E(He),Lt=E(Je),At=O(Lt);if(vt){var zt=1/p(vt),cr=1/(T(vt)*T(vt)),yr=-(cr+lt*(At*At*zt*zt)-1+lt),Er=(lt-1)*cr,jr=(-yr+F(yr*yr-4*Er))/2;return[En(e(1/F(jr)),lt)*m(He),En(e(F((jr/cr-1)/lt)),1-lt)*m(Je)]}return[0,En(e(At),1-lt)*m(Je)]}function En(He,Je){if(!Je)return He;if(Je===1)return n(T(He/2+M));for(var lt=1,vt=F(1-Je),Lt=F(Je),At=0;E(Lt)>l;At++){if(He%w){var zt=e(vt*T(He)/lt);zt<0&&(zt+=w),He+=zt+~~(He/w)*w}else He+=He;Lt=(lt+vt)/2,vt=F(lt*vt),Lt=((lt=Lt)-vt)/2}return He/(h(2,At)*lt)}function On(He,Je){var lt=(b-1)/(b+1),vt=F(1-lt*lt),Lt=En(A,vt*vt),At=-1,zt=n(T(w/4+E(Je)/2)),cr=o(At*zt)/F(lt),yr=no(cr*r(At*He),cr*p(At*He)),Er=Rn(yr[0],yr[1],vt*vt);return[-Er[1],(Je>=0?1:-1)*(.5*Lt-Er[0])]}function no(He,Je){var lt=He*He,vt=Je+1,Lt=1-lt-Je*Je;return[.5*((He>=0?A:-A)-t(Lt,2*He)),-.25*n(Lt*Lt+4*lt)+.5*n(vt*vt+lt)]}function cn(He,Je){var lt=Je[0]*Je[0]+Je[1]*Je[1];return[(He[0]*Je[0]+He[1]*Je[1])/lt,(He[1]*Je[0]-He[0]*Je[1])/lt]}On.invert=function(He,Je){var lt=(b-1)/(b+1),vt=F(1-lt*lt),Lt=En(A,vt*vt),At=-1,zt=Ki(.5*Lt-Je,-He,vt*vt),cr=cn(zt[0],zt[1]),yr=t(cr[1],cr[0])/At;return[yr,2*e(o(.5/At*n(lt*cr[0]*cr[0]+lt*cr[1]*cr[1])))-A]};function lo(){return x.geoProjection(ya(On)).scale(151.496)}function Wo(He){var Je=p(He),lt=r(He),vt=hs(He);vt.invert=hs(-He);function Lt(At,zt){var cr=vt(At,zt);At=cr[0],zt=cr[1];var yr=p(zt),Er=r(zt),jr=r(At),Qr=z(Je*yr+lt*Er*jr),pa=p(Qr),Aa=E(pa)>l?Qr/pa:1;return[Aa*lt*p(At),(E(At)>A?Aa:-Aa)*(Je*Er-lt*yr*jr)]}return Lt.invert=function(At,zt){var cr=F(At*At+zt*zt),yr=-p(cr),Er=r(cr),jr=cr*Er,Qr=-zt*yr,pa=cr*Je,Aa=F(jr*jr+Qr*Qr-pa*pa),za=t(jr*pa+Qr*Aa,Qr*pa-jr*Aa),ci=(cr>A?-1:1)*t(At*yr,cr*r(za)*Er+zt*p(za)*yr);return vt.invert(ci,za)},Lt}function hs(He){var Je=p(He),lt=r(He);return function(vt,Lt){var At=r(Lt),zt=r(vt)*At,cr=p(vt)*At,yr=p(Lt);return[t(cr,zt*lt-yr*Je),L(yr*lt+zt*Je)]}}function Oo(){var He=0,Je=x.geoProjectionMutator(Wo),lt=Je(He),vt=lt.rotate,Lt=lt.stream,At=x.geoCircle();return lt.parallel=function(zt){if(!arguments.length)return He*y;var cr=lt.rotate();return Je(He=zt*f).rotate(cr)},lt.rotate=function(zt){return arguments.length?(vt.call(lt,[zt[0],zt[1]-He*y]),At.center([-zt[0],-zt[1]]),lt):(zt=vt.call(lt),zt[1]+=He*y,zt)},lt.stream=function(zt){return zt=Lt(zt),zt.sphere=function(){zt.polygonStart();var cr=.01,yr=At.radius(90-cr)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(zt.lineStart();++jr<Er;)zt.point((Qr=yr[jr])[0],Qr[1]);for(zt.lineEnd(),yr=At.radius(90+cr)().coordinates[0],Er=yr.length-1,zt.lineStart();--jr>=0;)zt.point((Qr=yr[jr])[0],Qr[1]);zt.lineEnd(),zt.polygonEnd()},zt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Wn=3,No=L(1-1/Wn)*y,as=Ct(0);function Ns(He){var Je=No*f,lt=Ve(w,Je)[0]-Ve(-w,Je)[0],vt=as(0,Je)[1],Lt=Ve(0,Je)[1],At=d-Lt,zt=u/He,cr=4/u,yr=vt+At*At*4/u;function Er(jr,Qr){var pa,Aa=E(Qr);if(Aa>Je){var za=s(He-1,i(0,a((jr+w)/zt)));jr+=w*(He-1)/He-za*zt,pa=Ve(jr,Aa),pa[0]=pa[0]*u/lt-u*(He-1)/(2*He)+za*u/He,pa[1]=vt+(pa[1]-Lt)*4*At/u,Qr<0&&(pa[1]=-pa[1])}else pa=as(jr,Qr);return pa[0]*=cr,pa[1]/=yr,pa}return Er.invert=function(jr,Qr){jr/=cr,Qr*=yr;var pa=E(Qr);if(pa>vt){var Aa=s(He-1,i(0,a((jr+w)/zt)));jr=(jr+w*(He-1)/He-Aa*zt)*lt/u;var za=Ve.invert(jr,.25*(pa-vt)*u/At+Lt);return za[0]-=w*(He-1)/He-Aa*zt,Qr<0&&(za[1]=-za[1]),za}return as.invert(jr,Qr)},Er}function ss(He,Je){return[He,Je&1?90-l:No]}function uo(He,Je){return[He,Je&1?-90+l:-No]}function jn(He){return[He[0]*(1-l),He[1]]}function Xn(He){var Je=[].concat(S.range(-180,180+He/2,He).map(ss),S.range(180,-180-He/2,-He).map(uo));return{type:"Polygon",coordinates:[He===180?Je.map(jn):Je]}}function ls(){var He=4,Je=x.geoProjectionMutator(Ns),lt=Je(He),vt=lt.stream;return lt.lobes=function(Lt){return arguments.length?Je(He=+Lt):He},lt.stream=function(Lt){var At=lt.rotate(),zt=vt(Lt),cr=(lt.rotate([0,0]),vt(Lt));return lt.rotate(At),zt.sphere=function(){x.geoStream(Xn(180/He),cr)},zt},lt.scale(239.75)}function Cs(He){var Je=1+He,lt=p(1/Je),vt=L(lt),Lt=2*F(w/(At=w+4*vt*Je)),At,zt=.5*Lt*(Je+F(He*(2+He))),cr=He*He,yr=Je*Je;function Er(jr,Qr){var pa=1-p(Qr),Aa,za;if(pa&&pa<2){var ci=A-Qr,Vi=25,ji;do{var nn=p(ci),Sn=r(ci),Kn=vt+t(nn,Je-Sn),Bn=1+yr-2*Je*Sn;ci-=ji=(ci-cr*vt-Je*nn+Bn*Kn-.5*pa*At)/(2*Je*nn*Kn)}while(E(ji)>_&&--Vi>0);Aa=Lt*F(Bn),za=jr*Kn/w}else Aa=Lt*(He+pa),za=jr*vt/w;return[Aa*p(za),zt-Aa*r(za)]}return Er.invert=function(jr,Qr){var pa=jr*jr+(Qr-=zt)*Qr,Aa=(1+yr-pa/(Lt*Lt))/(2*Je),za=z(Aa),ci=p(za),Vi=vt+t(ci,Je-Aa);return[L(jr/F(pa))*w/Vi,L(1-2*(za-cr*vt-Je*ci+(1+yr-2*Je*Aa)*Vi)/At)]},Er}function Ks(){var He=1,Je=x.geoProjectionMutator(Cs),lt=Je(He);return lt.ratio=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(167.774).center([0,18.67])}var Xo=.7109889596207567,Gi=.0528035274542;function Ln(He,Je){return Je>-Xo?(He=st(He,Je),He[1]+=Gi,He):Qe(He,Je)}Ln.invert=function(He,Je){return Je>-Xo?st.invert(He,Je-Gi):Qe.invert(He,Je)};function Us(){return x.geoProjection(Ln).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _s(He,Je){return E(Je)>Xo?(He=st(He,Je),He[1]-=Je>0?Gi:-Gi,He):Qe(He,Je)}_s.invert=function(He,Je){return E(Je)>Xo?st.invert(He,Je+(Je>0?Gi:-Gi)):Qe.invert(He,Je)};function Gn(){return x.geoProjection(_s).scale(152.63)}function zs(He,Je,lt,vt){var Lt=F(4*w/(2*lt+(1+He-Je/2)*p(2*lt)+(He+Je)/2*p(4*lt)+Je/2*p(6*lt))),At=F(vt*p(lt)*F((1+He*r(2*lt)+Je*r(4*lt))/(1+He+Je))),zt=lt*yr(1);function cr(Qr){return F(1+He*r(2*Qr)+Je*r(4*Qr))}function yr(Qr){var pa=Qr*lt;return(2*pa+(1+He-Je/2)*p(2*pa)+(He+Je)/2*p(4*pa)+Je/2*p(6*pa))/lt}function Er(Qr){return cr(Qr)*p(Qr)}var jr=function(Qr,pa){var Aa=lt*De(yr,zt*p(pa)/lt,pa/w);isNaN(Aa)&&(Aa=lt*m(pa));var za=Lt*cr(Aa);return[za*At*Qr/w*r(Aa),za/At*p(Aa)]};return jr.invert=function(Qr,pa){var Aa=De(Er,pa*At/Lt);return[Qr*w/(r(Aa)*Lt*At*cr(Aa)),L(lt*yr(Aa/lt)/zt)]},lt===0&&(Lt=F(vt/w),jr=function(Qr,pa){return[Qr*Lt,p(pa)/Lt]},jr.invert=function(Qr,pa){return[Qr/Lt,L(pa*Lt)]}),jr}function vs(){var He=1,Je=0,lt=45*f,vt=2,Lt=x.geoProjectionMutator(zs),At=Lt(He,Je,lt,vt);return At.a=function(zt){return arguments.length?Lt(He=+zt,Je,lt,vt):He},At.b=function(zt){return arguments.length?Lt(He,Je=+zt,lt,vt):Je},At.psiMax=function(zt){return arguments.length?Lt(He,Je,lt=+zt*f,vt):lt*y},At.ratio=function(zt){return arguments.length?Lt(He,Je,lt,vt=+zt):vt},At.scale(180.739)}function Ws(He,Je,lt,vt,Lt,At,zt,cr,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,pa,Aa,za,ci,Vi,ji,nn,Sn,Kn;if(Qr=lt-Je,pa=He(Je+Qr*.25),Aa=He(lt-Qr*.25),isNaN(pa)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return za=Qr*(vt+4*pa+Lt)/12,ci=Qr*(Lt+4*Aa+At)/12,Vi=za+ci,Kn=(Vi-zt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)<cr?Vi+Kn:(ji=Je+Qr*.5,nn=Ws(He,Je,ji,vt,pa,Lt,za,cr*.5,yr,Er+1,jr),isNaN(nn)?(jr.nanEncountered=!0,NaN):(Sn=Ws(He,ji,lt,Lt,Aa,At,ci,cr*.5,yr,Er+1,jr),isNaN(Sn)?(jr.nanEncountered=!0,NaN):nn+Sn))}function il(He,Je,lt,vt,Lt){var At={maxDepthCount:0,nanEncountered:!1};vt===void 0&&(vt=1e-8),Lt===void 0&&(Lt=20);var zt=He(Je),cr=He(.5*(Je+lt)),yr=He(lt),Er=(zt+4*cr+yr)*(lt-Je)/6,jr=Ws(He,Je,lt,zt,cr,yr,Er,vt,Lt,1,At);return jr}function xn(He,Je,lt){function vt(Aa){return He+(1-He)*h(1-h(Aa,Je),1/Je)}function Lt(Aa){return il(vt,0,Aa,1e-4)}for(var At=1/Lt(1),zt=1e3,cr=(1+1e-8)*At,yr=[],Er=0;Er<=zt;Er++)yr.push(Lt(Er/zt)*cr);function jr(Aa){var za=0,ci=zt,Vi=zt>>1;do yr[Vi]>Aa?ci=Vi:za=Vi,Vi=za+ci>>1;while(Vi>za);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/zt}var Qr=2*jr(1)/w*At/lt,pa=function(Aa,za){var ci=jr(E(p(za))),Vi=vt(ci)*Aa;return ci/=Qr,[Vi,za>=0?ci:-ci]};return pa.invert=function(Aa,za){var ci;return za*=Qr,E(za)<1&&(ci=m(za)*L(Lt(E(za))*At)),[Aa/vt(E(za)),ci]},pa}function ko(){var He=0,Je=2.5,lt=1.183136,vt=x.geoProjectionMutator(xn),Lt=vt(He,Je,lt);return Lt.alpha=function(At){return arguments.length?vt(He=+At,Je,lt):He},Lt.k=function(At){return arguments.length?vt(He,Je=+At,lt):Je},Lt.gamma=function(At){return arguments.length?vt(He,Je,lt=+At):lt},Lt.scale(152.63)}function bo(He,Je){return E(He[0]-Je[0])<l&&E(He[1]-Je[1])<l}function Is(He,Je){for(var lt=-1,vt=He.length,Lt=He[0],At,zt,cr,yr=[];++lt<vt;){At=He[lt],zt=(At[0]-Lt[0])/Je,cr=(At[1]-Lt[1])/Je;for(var Er=0;Er<Je;++Er)yr.push([Lt[0]+Er*zt,Lt[1]+Er*cr]);Lt=At}return yr.push(At),yr}function pu(He){var Je=[],lt,vt,Lt,At,zt,cr,yr,Er=He[0].length;for(yr=0;yr<Er;++yr)lt=He[0][yr],vt=lt[0][0],Lt=lt[0][1],At=lt[1][1],zt=lt[2][0],cr=lt[2][1],Je.push(Is([[vt+l,Lt+l],[vt+l,At-l],[zt-l,At-l],[zt-l,cr+l]],30));for(yr=He[1].length-1;yr>=0;--yr)lt=He[1][yr],vt=lt[0][0],Lt=lt[0][1],At=lt[1][1],zt=lt[2][0],cr=lt[2][1],Je.push(Is([[zt-l,cr-l],[zt-l,At+l],[vt+l,At+l],[vt+l,Lt-l]],30));return{type:"Polygon",coordinates:[S.merge(Je)]}}function co(He,Je,lt){var vt,Lt;function At(yr,Er){for(var jr=Er<0?-1:1,Qr=Je[+(Er<0)],pa=0,Aa=Qr.length-1;pa<Aa&&yr>Qr[pa][2][0];++pa);var za=He(yr-Qr[pa][1][0],Er);return za[0]+=He(Qr[pa][1][0],jr*Er>jr*Qr[pa][0][1]?Qr[pa][0][1]:Er)[0],za}lt?At.invert=lt(At):He.invert&&(At.invert=function(yr,Er){for(var jr=Lt[+(Er<0)],Qr=Je[+(Er<0)],pa=0,Aa=jr.length;pa<Aa;++pa){var za=jr[pa];if(za[0][0]<=yr&&yr<za[1][0]&&za[0][1]<=Er&&Er<za[1][1]){var ci=He.invert(yr-He(Qr[pa][1][0],0)[0],Er);return ci[0]+=Qr[pa][1][0],bo(At(ci[0],ci[1]),[yr,Er])?ci:null}}});var zt=x.geoProjection(At),cr=zt.stream;return zt.stream=function(yr){var Er=zt.rotate(),jr=cr(yr),Qr=(zt.rotate([0,0]),cr(yr));return zt.rotate(Er),jr.sphere=function(){x.geoStream(vt,Qr)},jr},zt.lobes=function(yr){return arguments.length?(vt=pu(yr),Je=yr.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*f,jr[0][1]*f],[jr[1][0]*f,jr[1][1]*f],[jr[2][0]*f,jr[2][1]*f]]})}),Lt=Je.map(function(Er){return Er.map(function(jr){var Qr=He(jr[0][0],jr[0][1])[0],pa=He(jr[2][0],jr[2][1])[0],Aa=He(jr[1][0],jr[0][1])[1],za=He(jr[1][0],jr[1][1])[1],ci;return Aa>za&&(ci=Aa,Aa=za,za=ci),[[Qr,Aa],[pa,za]]})}),zt):Je.map(function(Er){return Er.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]]})})},Je!=null&&zt.lobes(Je),zt}var Vs=[[[[-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 co(Oe,Vs).scale(160.857)}var Ts=[[[[-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 js(){return co(_s,Ts).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 As(){return co(st,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 co(st,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 co(Ln,Tc,ze).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 co(Qe,Sf).scale(152.63).rotate([-20,0])}function Fs(He,Je){return[3/u*He*F(w*w/3-Je*Je),Je]}Fs.invert=function(He,Je){return[u/3*He/F(w*w/3-Je*Je),Je]};function dc(){return x.geoProjection(Fs).scale(158.837)}function Hc(He){function Je(lt,vt){if(E(E(vt)-A)<l)return[0,vt<0?-2:2];var Lt=p(vt),At=h((1+Lt)/(1-Lt),He/2),zt=.5*(At+1/At)+r(lt*=He);return[2*p(lt)/zt,(At-1/At)/zt]}return Je.invert=function(lt,vt){var Lt=E(vt);if(E(Lt-2)<l)return lt?null:[0,m(vt)*A];if(Lt>2)return null;lt/=2,vt/=2;var At=lt*lt,zt=vt*vt,cr=2*vt/(1+At+zt);return cr=h((1+cr)/(1-cr),1/He),[t(2*lt,1-At-zt)/He,L((cr-1)/(cr+1))]},Je}function lu(){var He=.5,Je=x.geoProjectionMutator(Hc),lt=Je(He);return lt.spacing=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(124.75)}var Pl=w/b;function ic(He,Je){return[He*(1+F(r(Je)))/2,Je/(r(Je/2)*r(He/6))]}ic.invert=function(He,Je){var lt=E(He),vt=E(Je),Lt=l,At=A;vt<Pl?At*=vt/Pl:Lt+=6*z(Pl/vt);for(var zt=0;zt<25;zt++){var cr=p(At),yr=F(r(At)),Er=p(At/2),jr=r(At/2),Qr=p(Lt/6),pa=r(Lt/6),Aa=.5*Lt*(1+yr)-lt,za=At/(jr*pa)-vt,ci=yr?-.25*Lt*cr/yr:0,Vi=.5*(1+yr),ji=(1+.5*At*Er/jr)/(jr*pa),nn=At/jr*(Qr/6)/(pa*pa),Sn=ci*nn-ji*Vi,Kn=(Aa*nn-za*Vi)/Sn,Bn=(za*ci-Aa*ji)/Sn;if(At-=Kn,Lt-=Bn,E(Kn)<l&&E(Bn)<l)break}return[He<0?-Lt:Lt,Je<0?-At:At]};function Ou(){return x.geoProjection(ic).scale(97.2672)}function nl(He,Je){var lt=He*He,vt=Je*Je;return[He*(.975534+vt*(-.119161+lt*-.0143059+vt*-.0547009)),Je*(1.00384+lt*(.0802894+vt*-.02855+lt*199025e-9)+vt*(.0998909+vt*-.0491032))]}nl.invert=function(He,Je){var lt=m(He)*w,vt=Je/2,Lt=50;do{var At=lt*lt,zt=vt*vt,cr=lt*vt,yr=lt*(.975534+zt*(-.119161+At*-.0143059+zt*-.0547009))-He,Er=vt*(1.00384+At*(.0802894+zt*-.02855+At*199025e-9)+zt*(.0998909+zt*-.0491032))-Je,jr=.975534-zt*(.119161+3*At*.0143059+zt*.0547009),Qr=-cr*(2*.119161+4*.0547009*zt+2*.0143059*At),pa=cr*(2*.0802894+4*199025e-9*At+2*-.02855*zt),Aa=1.00384+At*(.0802894+199025e-9*At)+zt*(3*(.0998909-.02855*At)-5*.0491032*zt),za=Qr*pa-Aa*jr,ci=(Er*Qr-yr*Aa)/za,Vi=(yr*pa-Er*jr)/za;lt-=ci,vt-=Vi}while((E(ci)>l||E(Vi)>l)&&--Lt>0);return Lt&&[lt,vt]};function ml(){return x.geoProjection(nl).scale(139.98)}function xs(He,Je){return[p(He)/r(Je),T(Je)*r(He)]}xs.invert=function(He,Je){var lt=He*He,vt=Je*Je,Lt=vt+1,At=lt+Lt,zt=He?g*F((At-F(At*At-4*lt))/lt):1/F(Lt);return[L(He*zt),m(Je)*z(zt)]};function Xs(){return x.geoProjection(xs).scale(144.049).clipAngle(90-.001)}function nc(He){var Je=r(He),lt=T(M+He/2);function vt(Lt,At){var zt=At-He,cr=E(zt)<l?Lt*Je:E(cr=M+At/2)<l||E(E(cr)-A)<l?0:Lt*zt/n(T(cr)/lt);return[cr,zt]}return vt.invert=function(Lt,At){var zt,cr=At+He;return[E(At)<l?Lt/Je:E(zt=M+cr/2)<l||E(E(zt)-A)<l?0:Lt*n(T(zt)/lt)/At,cr]},vt}function Ul(){return ot(nc).parallel(40).scale(158.837)}function qu(He,Je){return[He,1.25*n(T(M+.4*Je))]}qu.invert=function(He,Je){return[He,2.5*e(o(.8*Je))-.625*w]};function fl(){return x.geoProjection(qu).scale(108.318)}function xh(He){var Je=He.length-1;function lt(vt,Lt){for(var At=r(Lt),zt=2/(1+At*r(vt)),cr=zt*At*p(vt),yr=zt*p(Lt),Er=Je,jr=He[Er],Qr=jr[0],pa=jr[1],Aa;--Er>=0;)jr=He[Er],Qr=jr[0]+cr*(Aa=Qr)-yr*pa,pa=jr[1]+cr*pa+yr*Aa;return Qr=cr*(Aa=Qr)-yr*pa,pa=cr*pa+yr*Aa,[Qr,pa]}return lt.invert=function(vt,Lt){var At=20,zt=vt,cr=Lt;do{for(var yr=Je,Er=He[yr],jr=Er[0],Qr=Er[1],pa=0,Aa=0,za;--yr>=0;)Er=He[yr],pa=jr+zt*(za=pa)-cr*Aa,Aa=Qr+zt*Aa+cr*za,jr=Er[0]+zt*(za=jr)-cr*Qr,Qr=Er[1]+zt*Qr+cr*za;pa=jr+zt*(za=pa)-cr*Aa,Aa=Qr+zt*Aa+cr*za,jr=zt*(za=jr)-cr*Qr-vt,Qr=zt*Qr+cr*za-Lt;var ci=pa*pa+Aa*Aa,Vi,ji;zt-=Vi=(jr*pa+Qr*Aa)/ci,cr-=ji=(Qr*pa-jr*Aa)/ci}while(E(Vi)+E(ji)>l*l&&--At>0);if(At){var nn=F(zt*zt+cr*cr),Sn=2*e(nn*.5),Kn=p(Sn);return[t(zt*Kn,nn*r(Sn)),nn?L(cr*Kn/nn):0]}},lt}var ns=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Es=[[.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(ns,[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(Es,[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(He,Je){var lt=x.geoProjection(xh(He)).rotate(Je).clipAngle(90),vt=x.geoRotation(Je),Lt=lt.center;return delete lt.rotate,lt.center=function(At){return arguments.length?Lt(vt(At)):vt.invert(Lt())},lt}var Jf=F(6),Of=F(7);function of(He,Je){var lt=L(7*p(Je)/(3*Jf));return[Jf*He*(2*r(2*lt/3)-1)/Of,9*p(lt/3)/Of]}of.invert=function(He,Je){var lt=3*L(Je*Of/9);return[He*Of/(Jf*(2*r(2*lt/3)-1)),L(p(lt)*3*Jf/7)]};function jc(){return x.geoProjection(of).scale(164.859)}function Bf(He,Je){for(var lt=(1+g)*p(Je),vt=Je,Lt=0,At;Lt<25&&(vt-=At=(p(vt/2)+p(vt)-lt)/(.5*r(vt/2)+r(vt)),!(E(At)<l));Lt++);return[He*(1+2*r(vt)/r(vt/2))/(3*b),2*F(3)*p(vt/2)/F(2+b)]}Bf.invert=function(He,Je){var lt=Je*F(2+b)/(2*F(3)),vt=2*L(lt);return[3*b*He/(1+2*r(vt)/r(vt/2)),L((lt+p(vt))/(1+g))]};function Nf(){return x.geoProjection(Bf).scale(188.209)}function Gu(He,Je){for(var lt=F(6/(4+w)),vt=(1+w/4)*p(Je),Lt=Je/2,At=0,zt;At<25&&(Lt-=zt=(Lt/2+p(Lt)-vt)/(.5+r(Lt)),!(E(zt)<l));At++);return[lt*(.5+r(Lt))*He/1.5,lt*Lt]}Gu.invert=function(He,Je){var lt=F(6/(4+w)),vt=Je/lt;return E(E(vt)-A)<l&&(vt=vt<0?-A:A),[1.5*He/(lt*(.5+r(vt))),L((vt/2+p(vt))/(1+w/4))]};function Ef(){return x.geoProjection(Gu).scale(166.518)}function oc(He,Je){var lt=Je*Je,vt=lt*lt,Lt=lt*vt;return[He*(.84719-.13063*lt+Lt*Lt*(-.04515+.05494*lt-.02326*vt+.00331*Lt)),Je*(1.01183+vt*vt*(-.02625+.01926*lt-.00396*vt))]}oc.invert=function(He,Je){var lt=Je,vt=25,Lt,At,zt,cr;do At=lt*lt,zt=At*At,lt-=Lt=(lt*(1.01183+zt*zt*(-.02625+.01926*At-.00396*zt))-Je)/(1.01183+zt*zt*(9*-.02625+11*.01926*At+13*-.00396*zt));while(E(Lt)>_&&--vt>0);return At=lt*lt,zt=At*At,cr=At*zt,[He/(.84719-.13063*At+cr*cr*(-.04515+.05494*At-.02326*zt+.00331*cr)),lt]};function Xc(){return x.geoProjection(oc).scale(175.295)}function Ql(He,Je){return[He*(1+r(Je))/2,2*(Je-T(Je/2))]}Ql.invert=function(He,Je){for(var lt=Je/2,vt=0,Lt=1/0;vt<10&&E(Lt)>l;++vt){var At=r(Je/2);Je-=Lt=(Je-T(Je/2)-lt)/(1-.5/(At*At))}return[2*He/(1+r(Je)),Je]};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 Zs(){return co(ce(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(He,Je){var lt=p(Je),vt=r(Je),Lt=m(He);if(He===0||E(Je)===A)return[0,Je];if(Je===0)return[He,0];if(E(He)===A)return[He*vt,A*lt];var At=w/(2*He)-2*He/w,zt=2*Je/w,cr=(1-zt*zt)/(lt-zt),yr=At*At,Er=cr*cr,jr=1+yr/Er,Qr=1+Er/yr,pa=(At*lt/cr-At/2)/jr,Aa=(Er*lt/yr+cr/2)/Qr,za=pa*pa+vt*vt/jr,ci=Aa*Aa-(Er*lt*lt/yr+cr*lt-1)/Qr;return[A*(pa+F(za)*Lt),A*(Aa+F(ci<0?0:ci)*m(-Je*At)*Lt)]}kf.invert=function(He,Je){He/=A,Je/=A;var lt=He*He,vt=Je*Je,Lt=lt+vt,At=w*w;return[He?(Lt-1+F((1-Lt)*(1-Lt)+4*lt))/(2*He)*A:0,De(function(zt){return Lt*(w*p(zt)-2*zt)*w+4*zt*zt*(Je-p(zt))+2*w*zt-At*Je},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(He,Je){var lt=Je*Je;return[He,Je*(Uf+lt*lt*(Zc+lt*($f+Cu*lt)))]}vc.invert=function(He,Je){Je>ol?Je=ol:Je<-ol&&(Je=-ol);var lt=Je,vt;do{var Lt=lt*lt;lt-=vt=(lt*(Uf+Lt*Lt*(Zc+Lt*($f+Cu*Lt)))-Je)/(jf+Lt*Lt*(yl+Lt*(Lu+Mc*Lt)))}while(E(vt)>l);return[He,lt]};function yu(){return x.geoProjection(vc).scale(139.319)}function Tu(He,Je){if(E(Je)<l)return[He,0];var lt=T(Je),vt=He*p(Je);return[p(vt)/lt,Je+(1-r(vt))/lt]}Tu.invert=function(He,Je){if(E(Je)<l)return[He,0];var lt=He*He+Je*Je,vt=Je*.5,Lt=10,At;do{var zt=T(vt),cr=1/r(vt),yr=lt-2*Je*vt+vt*vt;vt-=At=(zt*yr+2*(vt-Je))/(2+yr*cr*cr+2*(vt-Je)*zt)}while(E(At)>l&&--Lt>0);return zt=T(vt),[(E(Je)<E(vt+1/zt)?L(He*zt):m(Je)*m(He)*(z(E(He*zt))+A))/p(vt),vt]};function El(){return x.geoProjection(Tu).scale(103.74)}function qf(He,Je){var lt=Ec(He[1],He[0]),vt=Ec(Je[1],Je[0]),Lt=Lh(lt,vt),At=mc(lt)/mc(vt);return Bu([1,0,He[0][0],0,1,He[0][1]],Bu([At,0,0,0,At,0],Bu([r(Lt),p(Lt),0,-p(Lt),r(Lt),0],[1,0,-Je[0][0],0,1,-Je[0][1]])))}function Qf(He){var Je=1/(He[0]*He[4]-He[1]*He[3]);return[Je*He[4],-Je*He[1],Je*(He[1]*He[5]-He[2]*He[4]),-Je*He[3],Je*He[0],Je*(He[2]*He[3]-He[0]*He[5])]}function Bu(He,Je){return[He[0]*Je[0]+He[1]*Je[3],He[0]*Je[1]+He[1]*Je[4],He[0]*Je[2]+He[1]*Je[5]+He[2],He[3]*Je[0]+He[4]*Je[3],He[3]*Je[1]+He[4]*Je[4],He[3]*Je[2]+He[4]*Je[5]+He[5]]}function Ec(He,Je){return[He[0]-Je[0],He[1]-Je[1]]}function mc(He){return F(He[0]*He[0]+He[1]*He[1])}function Lh(He,Je){return t(He[0]*Je[1]-He[1]*Je[0],He[0]*Je[0]+He[1]*Je[1])}function sf(He,Je,lt){vt(He,{transform:null});function vt(Er,jr){if(Er.edges=au(Er.face),jr.face){var Qr=Er.shared=lf(Er.face,jr.face),pa=qf(Qr.map(jr.project),Qr.map(Er.project));Er.transform=jr.transform?Bu(jr.transform,pa):pa;for(var Aa=jr.edges,za=0,ci=Aa.length;za<ci;++za)Nu(Qr[0],Aa[za][1])&&Nu(Qr[1],Aa[za][0])&&(Aa[za]=Er),Nu(Qr[0],Aa[za][0])&&Nu(Qr[1],Aa[za][1])&&(Aa[za]=Er);for(Aa=Er.edges,za=0,ci=Aa.length;za<ci;++za)Nu(Qr[0],Aa[za][0])&&Nu(Qr[1],Aa[za][1])&&(Aa[za]=jr),Nu(Qr[0],Aa[za][1])&&Nu(Qr[1],Aa[za][0])&&(Aa[za]=jr)}else Er.transform=jr.transform;return Er.children&&Er.children.forEach(function(Vi){vt(Vi,Er)}),Er}function Lt(Er,jr){var Qr=Je(Er,jr),pa=Qr.project([Er*y,jr*y]),Aa;return(Aa=Qr.transform)?[Aa[0]*pa[0]+Aa[1]*pa[1]+Aa[2],-(Aa[3]*pa[0]+Aa[4]*pa[1]+Aa[5])]:(pa[1]=-pa[1],pa)}Yc(He)&&(Lt.invert=function(Er,jr){var Qr=At(He,[Er,-jr]);return Qr&&(Qr[0]*=f,Qr[1]*=f,Qr)});function At(Er,jr){var Qr=Er.project.invert,pa=Er.transform,Aa=jr;if(pa&&(pa=Qf(pa),Aa=[pa[0]*Aa[0]+pa[1]*Aa[1]+pa[2],pa[3]*Aa[0]+pa[4]*Aa[1]+pa[5]]),Qr&&Er===zt(za=Qr(Aa)))return za;for(var za,ci=Er.children,Vi=0,ji=ci&&ci.length;Vi<ji;++Vi)if(za=At(ci[Vi],jr))return za}function zt(Er){return Je(Er[0]*f,Er[1]*f)}var cr=x.geoProjection(Lt),yr=cr.stream;return cr.stream=function(Er){var jr=cr.rotate(),Qr=yr(Er),pa=(cr.rotate([0,0]),yr(Er));return cr.rotate(jr),Qr.sphere=function(){pa.polygonStart(),pa.lineStart(),vf(pa,He),pa.lineEnd(),pa.polygonEnd()},Qr},cr.angle(lt==null?-30:lt*y)}function vf(He,Je,lt){var vt,Lt=Je.edges,At=Lt.length,zt,cr={type:"MultiPoint",coordinates:Je.face},yr=Je.face.filter(function(ci){return E(ci[1])!==90}),Er=x.geoBounds({type:"MultiPoint",coordinates:yr}),jr=!1,Qr=-1,pa=Er[1][0]-Er[0][0],Aa=pa===180||pa===360?[(Er[0][0]+Er[1][0])/2,(Er[0][1]+Er[1][1])/2]:x.geoCentroid(cr);if(lt)for(;++Qr<At&&Lt[Qr]!==lt;);++Qr;for(var za=0;za<At;++za)zt=Lt[(za+Qr)%At],Array.isArray(zt)?(jr||(He.point((vt=x.geoInterpolate(zt[0],Aa)(l))[0],vt[1]),jr=!0),He.point((vt=x.geoInterpolate(zt[1],Aa)(l))[0],vt[1])):(jr=!1,zt!==lt&&vf(He,zt,Je))}function Nu(He,Je){return He&&Je&&He[0]===Je[0]&&He[1]===Je[1]}function lf(He,Je){for(var lt,vt,Lt=He.length,At=null,zt=0;zt<Lt;++zt){lt=He[zt];for(var cr=Je.length;--cr>=0;)if(vt=Je[cr],lt[0]===vt[0]&&lt[1]===vt[1]){if(At)return[At,lt];At=lt}}}function au(He){for(var Je=He.length,lt=[],vt=He[Je-1],Lt=0;Lt<Je;++Lt)lt.push([vt,vt=He[Lt]]);return lt}function Yc(He){return He.project.invert||He.children&&He.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(He){return He.map(function(Je){return hh[Je]})});function sl(He){He=He||function(lt){var vt=x.geoCentroid({type:"MultiPoint",coordinates:lt});return x.geoGnomonic().scale(1).translate([0,0]).rotate([-vt[0],-vt[1]])};var Je=mf.map(function(lt){return{face:lt,project:He(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,vt){var Lt=Je[lt];Lt&&(Lt.children||(Lt.children=[])).push(Je[vt])}),sf(Je[0],function(lt,vt){return Je[lt<-w/2?vt<0?6:4:lt<0?vt<0?2:0:lt<w/2?vt<0?3:1:vt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var _u=2/F(3);function Pu(He,Je){var lt=Ve(He,Je);return[lt[0]*_u,lt[1]]}Pu.invert=function(He,Je){return Ve.invert(He/_u,Je)};function Cf(He){He=He||function(lt){var vt=x.geoCentroid({type:"MultiPoint",coordinates:lt});return x.geoProjection(Pu).translate([0,0]).scale(1).rotate(vt[1]>0?[-vt[0],0]:[180-vt[0],180])};var Je=mf.map(function(lt){return{face:lt,project:He(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,vt){var Lt=Je[lt];Lt&&(Lt.children||(Lt.children=[])).push(Je[vt])}),sf(Je[0],function(lt,vt){return Je[lt<-w/2?vt<0?6:4:lt<0?vt<0?2:0:lt<w/2?vt<0?3:1:vt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function hl(He){He=He||function(zt){var cr=zt.length===6?x.geoCentroid({type:"MultiPoint",coordinates:zt}):zt[0];return x.geoGnomonic().scale(1).translate([0,0]).rotate([-cr[0],-cr[1]])};var Je=mf.map(function(zt){for(var cr=zt.map(gf),yr=cr.length,Er=cr[yr-1],jr,Qr=[],pa=0;pa<yr;++pa)jr=cr[pa],Qr.push(Hu([Er[0]*.9486832980505138+jr[0]*.31622776601683794,Er[1]*.9486832980505138+jr[1]*.31622776601683794,Er[2]*.9486832980505138+jr[2]*.31622776601683794]),Hu([jr[0]*.9486832980505138+Er[0]*.31622776601683794,jr[1]*.9486832980505138+Er[1]*.31622776601683794,jr[2]*.9486832980505138+Er[2]*.31622776601683794])),Er=jr;return Qr}),lt=[],vt=[-1,0,0,1,0,1,4,5];Je.forEach(function(zt,cr){for(var yr=mf[cr],Er=yr.length,jr=lt[cr]=[],Qr=0;Qr<Er;++Qr)Je.push([yr[Qr],zt[(Qr*2+2)%(2*Er)],zt[(Qr*2+1)%(2*Er)]]),vt.push(cr),jr.push(kc(gf(zt[(Qr*2+2)%(2*Er)]),gf(zt[(Qr*2+1)%(2*Er)])))});var Lt=Je.map(function(zt){return{project:He(zt),face:zt}});vt.forEach(function(zt,cr){var yr=Lt[zt];yr&&(yr.children||(yr.children=[])).push(Lt[cr])});function At(zt,cr){var yr=r(cr),Er=[yr*r(zt),yr*p(zt),p(cr)],jr=zt<-w/2?cr<0?6:4:zt<0?cr<0?2:0:zt<w/2?cr<0?3:1:cr<0?7:5,Qr=lt[jr];return Lt[uf(Qr[0],Er)<0?8+3*jr:uf(Qr[1],Er)<0?8+3*jr+1:uf(Qr[2],Er)<0?8+3*jr+2:jr]}return sf(Lt[0],At).angle(-30).scale(110.625).center([0,45])}function uf(He,Je){for(var lt=0,vt=He.length,Lt=0;lt<vt;++lt)Lt+=He[lt]*Je[lt];return Lt}function kc(He,Je){return[He[1]*Je[2]-He[2]*Je[1],He[2]*Je[0]-He[0]*Je[2],He[0]*Je[1]-He[1]*Je[0]]}function Hu(He){return[t(He[1],He[0])*y,L(i(-1,s(1,He[2])))*y]}function gf(He){var Je=He[0]*f,lt=He[1]*f,vt=r(lt);return[vt*r(Je),vt*p(Je),p(lt)]}function Wu(){}function Kc(He){if((lt=He.length)<4)return!1;for(var Je=0,lt,vt=He[lt-1][1]*He[0][0]-He[lt-1][0]*He[0][1];++Je<lt;)vt+=He[Je-1][1]*He[Je][0]-He[Je-1][0]*He[Je][1];return vt<=0}function Lf(He,Je){for(var lt=Je[0],vt=Je[1],Lt=!1,At=0,zt=He.length,cr=zt-1;At<zt;cr=At++){var yr=He[At],Er=yr[0],jr=yr[1],Qr=He[cr],pa=Qr[0],Aa=Qr[1];jr>vt^Aa>vt&&lt<(pa-Er)*(vt-jr)/(Aa-jr)+Er&&(Lt=!Lt)}return Lt}function iu(He,Je){var lt=Je.stream,vt;if(!lt)throw new Error("invalid projection");switch(He&&He.type){case"Feature":vt=Xu;break;case"FeatureCollection":vt=Vf;break;default:vt=gc;break}return vt(He,lt)}function Vf(He,Je){return{type:"FeatureCollection",features:He.features.map(function(lt){return Xu(lt,Je)})}}function Xu(He,Je){return{type:"Feature",id:He.id,properties:He.properties,geometry:gc(He.geometry,Je)}}function Cc(He,Je){return{type:"GeometryCollection",geometries:He.geometries.map(function(lt){return gc(lt,Je)})}}function gc(He,Je){if(!He)return null;if(He.type==="GeometryCollection")return Cc(He,Je);var lt;switch(He.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=Jc;break;case"MultiLineString":lt=Jc;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return x.geoStream(He,Je(lt)),lt.result()}var ql=[],xu=[],Lc={point:function(He,Je){ql.push([He,Je])},result:function(){var He=ql.length?ql.length<2?{type:"Point",coordinates:ql[0]}:{type:"MultiPoint",coordinates:ql}:null;return ql=[],He}},Jc={lineStart:Wu,point:function(He,Je){ql.push([He,Je])},lineEnd:function(){ql.length&&(xu.push(ql),ql=[])},result:function(){var He=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],He}},sc={polygonStart:Wu,lineStart:Wu,point:function(He,Je){ql.push([He,Je])},lineEnd:function(){var He=ql.length;if(He){do ql.push(ql[0].slice());while(++He<4);xu.push(ql),ql=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var He=[],Je=[];return xu.forEach(function(lt){Kc(lt)?He.push([lt]):Je.push(lt)}),Je.forEach(function(lt){var vt=lt[0];He.some(function(Lt){if(Lf(Lt[0],vt))return Lt.push(lt),!0})||He.push([lt])}),xu=[],He.length?He.length>1?{type:"MultiPolygon",coordinates:He}:{type:"Polygon",coordinates:He[0]}:null}};function Pc(He){var Je=He(A,0)[0]-He(-A,0)[0];function lt(vt,Lt){var At=E(vt)<A,zt=He(At?vt:vt>0?vt-w:vt+w,Lt),cr=(zt[0]-zt[1])*g,yr=(zt[0]+zt[1])*g;if(At)return[cr,yr];var Er=Je*g,jr=cr>0^yr>0?-1:1;return[jr*cr-m(yr)*Er,jr*yr-m(cr)*Er]}return He.invert&&(lt.invert=function(vt,Lt){var At=(vt+Lt)*g,zt=(Lt-vt)*g,cr=E(At)<.5*Je&&E(zt)<.5*Je;if(!cr){var yr=Je*g,Er=At>0^zt>0?-1:1,jr=-Er*vt+(zt>0?1:-1)*yr,Qr=-Er*Lt+(At>0?1:-1)*yr;At=(-jr-Qr)*g,zt=(jr-Qr)*g}var pa=He.invert(At,zt);return cr||(pa[0]+=At>0?w:-w),pa}),x.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function br(){return Pc(On).scale(111.48)}function aa(He,Je){if(!(0<=(Je=+Je)&&Je<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,pa=new Array(jr);for(pa[0]=+Er[0].toFixed(Je),pa[1]=+Er[1].toFixed(Je);Qr<jr;)pa[Qr]=Er[Qr],++Qr;return pa}function vt(Er){return Er.map(lt)}function Lt(Er){for(var jr=lt(Er[0]),Qr=[jr],pa=1;pa<Er.length;pa++){var Aa=lt(Er[pa]);(Aa.length>2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&Er.length>1&&Qr.push(lt(Er[Er.length-1])),Qr}function At(Er){return Er.map(Lt)}function zt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(zt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:vt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Lt(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:At(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(At)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function cr(Er){var jr={type:"Feature",properties:Er.properties,geometry:zt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(He!=null)switch(He.type){case"Feature":return cr(He);case"FeatureCollection":{var yr={type:"FeatureCollection",features:He.features.map(cr)};return He.bbox!=null&&(yr.bbox=He.bbox),yr}default:return zt(He)}return He}function $r(He){var Je=p(He);function lt(vt,Lt){var At=Je?T(vt*Je/2)/Je:vt/2;if(!Lt)return[2*At,-He];var zt=2*e(At*p(Lt)),cr=1/T(Lt);return[p(zt)*cr,Lt+(1-r(zt))*cr-He]}return lt.invert=function(vt,Lt){if(E(Lt+=He)<l)return[Je?2*e(Je*vt/2)/Je:vt,0];var At=vt*vt+Lt*Lt,zt=0,cr=10,yr;do{var Er=T(zt),jr=1/r(zt),Qr=At-2*Lt*zt+zt*zt;zt-=yr=(Er*Qr+2*(zt-Lt))/(2+Qr*jr*jr+2*(zt-Lt)*Er)}while(E(yr)>l&&--cr>0);var pa=vt*(Er=T(zt)),Aa=T(E(Lt)<E(zt+1/Er)?L(pa)*.5:z(pa)*.5+w/4)/p(zt);return[Je?2*e(Je*Aa)/Je:2*Aa,zt]},lt}function ka(){return ot($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(He){He[1]*=1.0144});function Ci(He,Je){var lt=s(18,E(Je)*36/w),vt=a(lt),Lt=lt-vt,At=(Qr=li[vt])[0],zt=Qr[1],cr=(Qr=li[++vt])[0],yr=Qr[1],Er=(Qr=li[s(19,++vt)])[0],jr=Qr[1],Qr;return[He*(cr+Lt*(Er-At)/2+Lt*Lt*(Er-2*cr+At)/2),(Je>0?A:-A)*(yr+Lt*(jr-zt)/2+Lt*Lt*(jr-2*yr+zt)/2)]}Ci.invert=function(He,Je){var lt=Je/A,vt=lt*90,Lt=s(18,E(vt/5)),At=i(0,a(Lt));do{var zt=li[At][1],cr=li[At+1][1],yr=li[s(19,At+2)][1],Er=yr-zt,jr=yr-2*cr+zt,Qr=2*(E(lt)-cr)/Er,pa=jr/Er,Aa=Qr*(1-pa*Qr*(1-2*pa*Qr));if(Aa>=0||At===1){vt=(Je>=0?5:-5)*(Aa+Lt);var za=50,ci;do Lt=s(18,E(vt)/5),At=a(Lt),Aa=Lt-At,zt=li[At][1],cr=li[At+1][1],yr=li[s(19,At+2)][1],vt-=(ci=(Je>=0?A:-A)*(cr+Aa*(yr-zt)/2+Aa*Aa*(yr-2*cr+zt)/2)-Je)*y;while(E(ci)>_&&--za>0);break}}while(--At>=0);var Vi=li[At][0],ji=li[At+1][0],nn=li[s(19,At+2)][0];return[He/(ji+Aa*(nn-Vi)/2+Aa*Aa*(nn-2*ji+Vi)/2),vt*f]};function Hi(){return x.geoProjection(Ci).scale(152.63)}function Qi(He){function Je(lt,vt){var Lt=r(vt),At=(He-1)/(He-Lt*r(lt));return[At*Lt*p(lt),At*p(vt)]}return Je.invert=function(lt,vt){var Lt=lt*lt+vt*vt,At=F(Lt),zt=(He-F(1-Lt*(He+1)/(He-1)))/((He-1)/At+At/(He-1));return[t(lt*zt,At*F(1-zt*zt)),At?L(vt*zt/At):0]},Je}function dn(He,Je){var lt=Qi(He);if(!Je)return lt;var vt=r(Je),Lt=p(Je);function At(zt,cr){var yr=lt(zt,cr),Er=yr[1],jr=Er*Lt/(He-1)+vt;return[yr[0]*vt/jr,Er/jr]}return At.invert=function(zt,cr){var yr=(He-1)/(He-1-cr*Lt);return lt.invert(yr*zt,yr*cr*vt)},At}function Pi(){var He=2,Je=0,lt=x.geoProjectionMutator(dn),vt=lt(He,Je);return vt.distance=function(Lt){return arguments.length?lt(He=+Lt,Je):He},vt.tilt=function(Lt){return arguments.length?lt(He,Je=Lt*f):Je*y},vt.scale(432.147).clipAngle(z(1/He)*y-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Mn=mi+Di,Qn=180,ao=Qn-Di,eo=-90,fo=eo+Di,An=90,un=An-Di;function yo(He){return He.length>0}function Ko(He){return Math.floor(He*Ni)/Ni}function Ss(He){return He===eo||He===An?[0,He]:[mi,Ko(He)]}function rl(He){var Je=He[0],lt=He[1],vt=!1;return Je<=Mn?(Je=mi,vt=!0):Je>=ao&&(Je=Qn,vt=!0),lt<=fo?(lt=eo,vt=!0):lt>=un&&(lt=An,vt=!0),vt?[Je,lt]:He}function Os(He){return He.map(rl)}function el(He,Je,lt){for(var vt=0,Lt=He.length;vt<Lt;++vt){var At=He[vt].slice();lt.push({index:-1,polygon:Je,ring:At});for(var zt=0,cr=At.length;zt<cr;++zt){var yr=At[zt],Er=yr[0],jr=yr[1];if(Er<=Mn||Er>=ao||jr<=fo||jr>=un){At[zt]=rl(yr);for(var Qr=zt+1;Qr<cr;++Qr){var pa=At[Qr],Aa=pa[0],za=pa[1];if(Aa>Mn&&Aa<ao&&za>fo&&za<un)break}if(Qr===zt+1)continue;if(zt){var ci={index:-1,polygon:Je,ring:At.slice(0,zt+1)};ci.ring[ci.ring.length-1]=Ss(jr),lt[lt.length-1]=ci}else lt.pop();if(Qr>=cr)break;lt.push({index:-1,polygon:Je,ring:At=At.slice(Qr-1)}),At[0]=Ss(At[0][1]),zt=-1,cr=At.length}}}}function bs(He){var Je,lt=He.length,vt={},Lt={},At,zt,cr,yr,Er;for(Je=0;Je<lt;++Je){if(At=He[Je],zt=At.ring[0],yr=At.ring[At.ring.length-1],zt[0]===yr[0]&&zt[1]===yr[1]){At.polygon.push(At.ring),He[Je]=null;continue}At.index=Je,vt[zt]=Lt[yr]=At}for(Je=0;Je<lt;++Je)if(At=He[Je],At){if(zt=At.ring[0],yr=At.ring[At.ring.length-1],cr=Lt[zt],Er=vt[yr],delete vt[zt],delete Lt[yr],zt[0]===yr[0]&&zt[1]===yr[1]){At.polygon.push(At.ring);continue}cr?(delete Lt[zt],delete vt[cr.ring[0]],cr.ring.pop(),He[cr.index]=null,At={index:-1,polygon:cr.polygon,ring:cr.ring.concat(At.ring)},cr===Er?At.polygon.push(At.ring):(At.index=lt++,He.push(vt[At.ring[0]]=Lt[At.ring[At.ring.length-1]]=At))):Er?(delete vt[yr],delete Lt[Er.ring[Er.ring.length-1]],At.ring.pop(),At={index:lt++,polygon:Er.polygon,ring:At.ring.concat(Er.ring)},He[Er.index]=null,He.push(vt[At.ring[0]]=Lt[At.ring[At.ring.length-1]]=At)):(At.ring.push(At.ring[0]),At.polygon.push(At.ring))}}function Fl(He){var Je={type:"Feature",geometry:_l(He.geometry)};return He.id!=null&&(Je.id=He.id),He.bbox!=null&&(Je.bbox=He.bbox),He.properties!=null&&(Je.properties=He.properties),Je}function _l(He){if(He==null)return He;var Je,lt,vt,Lt;switch(He.type){case"GeometryCollection":Je={type:"GeometryCollection",geometries:He.geometries.map(_l)};break;case"Point":Je={type:"Point",coordinates:rl(He.coordinates)};break;case"MultiPoint":case"LineString":Je={type:He.type,coordinates:Os(He.coordinates)};break;case"MultiLineString":Je={type:"MultiLineString",coordinates:He.coordinates.map(Os)};break;case"Polygon":{var At=[];el(He.coordinates,At,lt=[]),bs(lt),Je={type:"Polygon",coordinates:At};break}case"MultiPolygon":{lt=[],vt=-1,Lt=He.coordinates.length;for(var zt=new Array(Lt);++vt<Lt;)el(He.coordinates[vt],zt[vt]=[],lt);bs(lt),Je={type:"MultiPolygon",coordinates:zt.filter(yo)};break}default:return He}return He.bbox!=null&&(Je.bbox=He.bbox),Je}function ll(He){if(He==null)return He;switch(He.type){case"Feature":return Fl(He);case"FeatureCollection":{var Je={type:"FeatureCollection",features:He.features.map(Fl)};return He.bbox!=null&&(Je.bbox=He.bbox),Je}default:return _l(He)}}function Un(He,Je){var lt=T(Je/2),vt=p(M*lt);return[He*(.74482-.34588*vt*vt),1.70711*lt]}Un.invert=function(He,Je){var lt=Je/1.70711,vt=p(M*lt);return[He/(.74482-.34588*vt*vt),2*e(lt)]};function Lo(){return x.geoProjection(Un).scale(146.153)}function Js(He,Je,lt){var vt=x.geoInterpolate(Je,lt),Lt=vt(.5),At=x.geoRotation([-Lt[0],-Lt[1]])(Je),zt=vt.distance/2,cr=-L(p(At[1]*f)/p(zt)),yr=[-Lt[0],-Lt[1],-(At[0]>0?w-cr:cr)*y],Er=x.geoProjection(He(zt)).rotate(yr),jr=x.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(pa){return arguments.length?Qr(jr(pa)):jr.invert(Qr())},Er.clipAngle(90)}function Rs(He){var Je=r(He);function lt(vt,Lt){var At=x.geoGnomonicRaw(vt,Lt);return At[0]*=Je,At}return lt.invert=function(vt,Lt){return x.geoGnomonicRaw.invert(vt/Je,Lt)},lt}function uu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(He,Je){return Js(Rs,He,Je)}function Zu(He){if(!(He*=2))return x.geoAzimuthalEquidistantRaw;var Je=-He/2,lt=-Je,vt=He*He,Lt=T(lt),At=.5/p(lt);function zt(cr,yr){var Er=z(r(yr)*r(cr-Je)),jr=z(r(yr)*r(cr-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*He),Qr*F(4*vt*jr-(vt-Er+jr)*(vt-Er+jr))/(2*He)]}return zt.invert=function(cr,yr){var Er=yr*yr,jr=r(F(Er+(pa=cr+Je)*pa)),Qr=r(F(Er+(pa=cr+lt)*pa)),pa,Aa;return[t(Aa=jr-Qr,pa=(jr+Qr)*Lt),(yr<0?-1:1)*z(F(pa*pa+Aa*Aa)*At)]},zt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(He,Je){return Js(Zu,He,Je)}function Rc(He,Je){if(E(Je)<l)return[He,0];var lt=E(Je/A),vt=L(lt);if(E(He)<l||E(E(Je)-A)<l)return[0,m(Je)*w*T(vt/2)];var Lt=r(vt),At=E(w/He-He/w)/2,zt=At*At,cr=Lt/(lt+Lt-1),yr=cr*(2/lt-1),Er=yr*yr,jr=Er+zt,Qr=cr-Er,pa=zt+cr;return[m(He)*w*(At*Qr+F(zt*Qr*Qr-jr*(cr*cr-Er)))/jr,m(Je)*w*(yr*pa-At*F((zt+1)*jr-pa*pa))/jr]}Rc.invert=function(He,Je){if(E(Je)<l)return[He,0];if(E(He)<l)return[0,A*p(2*e(Je/w))];var lt=(He/=w)*He,vt=(Je/=w)*Je,Lt=lt+vt,At=Lt*Lt,zt=-E(Je)*(1+Lt),cr=zt-2*vt+lt,yr=-2*zt+1+2*vt+At,Er=vt/yr+(2*cr*cr*cr/(yr*yr*yr)-9*zt*cr/(yr*yr))/27,jr=(zt-cr*cr/(3*yr))/yr,Qr=2*F(-jr/3),pa=z(3*Er/(jr*Qr))/3;return[w*(Lt-1+F(1+2*(lt-vt)+At))/(2*He),m(Je)*w*(-Qr*r(pa+w/3)-cr/(3*yr))]};function Au(){return x.geoProjection(Rc).scale(79.4183)}function yc(He,Je){if(E(Je)<l)return[He,0];var lt=E(Je/A),vt=L(lt);if(E(He)<l||E(E(Je)-A)<l)return[0,m(Je)*w*T(vt/2)];var Lt=r(vt),At=E(w/He-He/w)/2,zt=At*At,cr=Lt*(F(1+zt)-At*Lt)/(1+zt*lt*lt);return[m(He)*w*cr,m(Je)*w*F(1-cr*(2*At+cr))]}yc.invert=function(He,Je){if(!He)return[0,A*p(2*e(Je/w))];var lt=E(He/w),vt=(1-lt*lt-(Je/=w)*Je)/(2*lt),Lt=vt*vt,At=F(Lt+1);return[m(He)*w*(At-vt),m(Je)*A*p(2*t(F((1-2*vt*lt)*(vt+At)-lt),F(At+vt+lt)))]};function ho(){return x.geoProjection(yc).scale(79.4183)}function Ro(He,Je){if(E(Je)<l)return[He,0];var lt=Je/A,vt=L(lt);if(E(He)<l||E(E(Je)-A)<l)return[0,w*T(vt/2)];var Lt=(w/He-He/w)/2,At=lt/(1+r(vt));return[w*(m(He)*F(Lt*Lt+1-At*At)-Lt),w*At]}Ro.invert=function(He,Je){if(!Je)return[He,0];var lt=Je/w,vt=(w*w*(1-lt*lt)-He*He)/(2*w*He);return[He?w*(m(He)*F(vt*vt+1)-vt):0,A*p(2*e(lt))]};function Dc(){return x.geoProjection(Ro).scale(79.4183)}function lc(He,Je){if(!Je)return[He,0];var lt=E(Je);if(!He||lt===A)return[0,Je];var vt=lt/A,Lt=vt*vt,At=(8*vt-Lt*(Lt+2)-5)/(2*Lt*(vt-1)),zt=At*At,cr=vt*At,yr=Lt+zt+2*cr,Er=vt+3*At,jr=He/A,Qr=jr+1/jr,pa=m(E(He)-A)*F(Qr*Qr-4),Aa=pa*pa,za=yr*(Lt+zt*Aa-1)+(1-Lt)*(Lt*(Er*Er+4*zt)+12*cr*zt+4*zt*zt),ci=(pa*(yr+zt-1)+2*F(za))/(4*yr+Aa);return[m(He)*A*ci,m(Je)*A*F(1+pa*E(ci)-ci*ci)]}lc.invert=function(He,Je){var lt;if(!He||!Je)return[He,Je];Je/=w;var vt=m(He)*He/A,Lt=(vt*vt-1+4*Je*Je)/E(vt),At=Lt*Lt,zt=2*Je,cr=50;do{var yr=zt*zt,Er=(8*zt-yr*(yr+2)-5)/(2*yr*(zt-1)),jr=(3*zt-yr*zt-10)/(2*yr*zt),Qr=Er*Er,pa=zt*Er,Aa=zt+Er,za=Aa*Aa,ci=zt+3*Er,Vi=za*(yr+Qr*At-1)+(1-yr)*(yr*(ci*ci+4*Qr)+Qr*(12*pa+4*Qr)),ji=-2*Aa*(4*pa*Qr+(1-4*yr+3*yr*yr)*(1+jr)+Qr*(-6+14*yr-At+(-8+8*yr-2*At)*jr)+pa*(-8+12*yr+(-10+10*yr-At)*jr)),nn=F(Vi),Sn=Lt*(za+Qr-1)+2*nn-vt*(4*za+At),Kn=Lt*(2*Er*jr+2*Aa*(1+jr))+ji/nn-8*Aa*(Lt*(-1+Qr+za)+2*nn)*(1+jr)/(At+4*za);zt-=lt=Sn/Kn}while(lt>l&&--cr>0);return[m(He)*(F(Lt*Lt+4)+Lt)*w/4,A*zt]};function Yu(){return x.geoProjection(lc).scale(127.16)}function Ue(He,Je,lt,vt,Lt){function At(zt,cr){var yr=lt*p(vt*cr),Er=F(1-yr*yr),jr=F(2/(1+Er*r(zt*=Lt)));return[He*Er*jr*p(zt),Je*yr*jr]}return At.invert=function(zt,cr){var yr=zt/He,Er=cr/Je,jr=F(yr*yr+Er*Er),Qr=2*L(jr/2);return[t(zt*T(Qr),He*jr)/Lt,jr&&L(cr*p(Qr)/(Je*lt*jr))/vt]},At}function I(He,Je,lt,vt){var Lt=w/3;He=i(He,l),Je=i(Je,l),He=s(He,A),Je=s(Je,w-l),lt=i(lt,0),lt=s(lt,100-l),vt=i(vt,l);var At=lt/100+1,zt=vt/100,cr=z(At*r(Lt))/Lt,yr=p(He)/p(cr*A),Er=Je/w,jr=F(zt*p(He/2)/p(Je/2)),Qr=jr/F(Er*yr*cr),pa=1/(jr*F(Er*yr*cr));return Ue(Qr,pa,yr,cr,Er)}function ie(){var He=65*f,Je=60*f,lt=20,vt=200,Lt=x.geoProjectionMutator(I),At=Lt(He,Je,lt,vt);return At.poleline=function(zt){return arguments.length?Lt(He=+zt*f,Je,lt,vt):He*y},At.parallels=function(zt){return arguments.length?Lt(He,Je=+zt*f,lt,vt):Je*y},At.inflation=function(zt){return arguments.length?Lt(He,Je,lt=+zt,vt):lt},At.ratio=function(zt){return arguments.length?Lt(He,Je,lt,vt=+zt):vt},At.scale(163.775)}function we(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Se=4*w+3*F(3),Be=2*F(2*w*F(3)/Se),dt=rt(Be*F(3)/w,Be,Se/6);function St(){return x.geoProjection(dt).scale(176.84)}function Nt(He,Je){return[He*F(1-3*Je*Je/(w*w)),Je]}Nt.invert=function(He,Je){return[He/F(1-3*Je*Je/(w*w)),Je]};function $t(){return x.geoProjection(Nt).scale(152.63)}function Tr(He,Je){var lt=r(Je),vt=r(He)*lt,Lt=1-vt,At=r(He=t(p(He)*lt,-p(Je))),zt=p(He);return lt=F(1-vt*vt),[zt*lt-At*Lt,-At*lt-zt*Lt]}Tr.invert=function(He,Je){var lt=(He*He+Je*Je)/-2,vt=F(-lt*(2+lt)),Lt=Je*lt+He*vt,At=He*lt-Je*vt,zt=F(At*At+Lt*Lt);return[t(vt*Lt,zt*(1+lt)),zt?-L(vt*At/zt):0]};function Ar(){return x.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(He,Je){var lt=se(He,Je);return[(lt[0]+He/A)/2,(lt[1]+Je)/2]}Kr.invert=function(He,Je){var lt=He,vt=Je,Lt=25;do{var At=r(vt),zt=p(vt),cr=p(2*vt),yr=zt*zt,Er=At*At,jr=p(lt),Qr=r(lt/2),pa=p(lt/2),Aa=pa*pa,za=1-Er*Qr*Qr,ci=za?z(At*Qr)*F(Vi=1/za):Vi=0,Vi,ji=.5*(2*ci*At*pa+lt/A)-He,nn=.5*(ci*zt+vt)-Je,Sn=.5*Vi*(Er*Aa+ci*At*Qr*yr)+.5/A,Kn=Vi*(jr*cr/4-ci*zt*pa),Bn=.125*Vi*(cr*pa-ci*zt*Er*jr),wo=.5*Vi*(yr*Qr+ci*Aa*At)+.5,is=Kn*Bn-wo*Sn,Ao=(nn*Kn-ji*wo)/is,Zo=(ji*Bn-nn*Sn)/is;lt-=Ao,vt-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Lt>0);return[lt,vt]};function na(){return x.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=x.geoNaturalEarth1,v.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=X,v.geoAitoff=le,v.geoAitoffRaw=se,v.geoArmadillo=V,v.geoArmadilloRaw=fe,v.geoAugust=ee,v.geoAugustRaw=Y,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=re,v.geoBerghausRaw=Q,v.geoBertin1953=at,v.geoBertin1953Raw=Ze,v.geoBoggs=tt,v.geoBoggsRaw=Oe,v.geoBonne=qt,v.geoBonneRaw=It,v.geoBottomley=kr,v.geoBottomleyRaw=Wt,v.geoBromley=qr,v.geoBromleyRaw=mr,v.geoChamberlin=Ie,v.geoChamberlinRaw=Ne,v.geoChamberlinAfrica=Te,v.geoCollignon=Ce,v.geoCollignonRaw=Ve,v.geoCraig=Pe,v.geoCraigRaw=Ee,v.geoCraster=_t,v.geoCrasterRaw=ct,v.geoCylindricalEqualArea=ir,v.geoCylindricalEqualAreaRaw=Ct,v.geoCylindricalStereographic=er,v.geoCylindricalStereographicRaw=rr,v.geoEckert1=fa,v.geoEckert1Raw=Lr,v.geoEckert2=Ia,v.geoEckert2Raw=Da,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Kt,v.geoEckert5Raw=wi,v.geoEckert6=Yt,v.geoEckert6Raw=Ft,v.geoEisenlohr=ta,v.geoEisenlohrRaw=Fr,v.geoFahey=Ba,v.geoFaheyRaw=ca,v.geoFoucaut=Za,v.geoFoucautRaw=$a,v.geoFoucautSinusoidal=pi,v.geoFoucautSinusoidalRaw=ri,v.geoGilbert=on,v.geoGingery=Br,v.geoGingeryRaw=hn,v.geoGinzburg4=Ir,v.geoGinzburg4Raw=xr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Ur,v.geoGinzburg6=Xt,v.geoGinzburg6Raw=xt,v.geoGinzburg8=Or,v.geoGinzburg8Raw=vr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=ba,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=lo,v.geoGuyouRaw=On,v.geoHammer=Ae,v.geoHammerRaw=ce,v.geoHammerRetroazimuthal=Oo,v.geoHammerRetroazimuthalRaw=Wo,v.geoHealpix=ls,v.geoHealpixRaw=Ns,v.geoHill=Ks,v.geoHillRaw=Cs,v.geoHomolosine=Gn,v.geoHomolosineRaw=_s,v.geoHufnagel=vs,v.geoHufnagelRaw=zs,v.geoHyperelliptical=ko,v.geoHyperellipticalRaw=xn,v.geoInterrupt=co,v.geoInterruptedBoggs=vl,v.geoInterruptedHomolosine=js,v.geoInterruptedMollweide=As,v.geoInterruptedMollweideHemispheres=su,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Fs,v.geoLagrange=lu,v.geoLagrangeRaw=Hc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=ml,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=xs,v.geoLoximuthal=Ul,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=$l,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=jl,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=Me,v.geoMollweideRaw=st,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Xc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=Ql,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=El,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=iu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=br,v.geoPierceQuincuncial=br,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=dn,v.geoSinuMollweide=Us,v.geoSinuMollweideRaw=Ln,v.geoSinusoidal=Pt,v.geoSinusoidalRaw=Qe,v.geoStitch=ll,v.geoTimes=Lo,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Rs,v.geoTwoPointAzimuthalUsa=uu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=ho,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Ro,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=we,v.geoWagnerRaw=I,v.geoWagner4=St,v.geoWagner4Raw=dt,v.geoWagner6=$t,v.geoWagner6Raw=Nt,v.geoWiechel=Ar,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),jU=Xe({"src/plots/geo/zoom.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=so(),E=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(y,f){var R=y.projection,L;return f._isScoped?L=i:f._isClipped?L=h:L=s,L(y,R)}G.exports=o;function a(y,f){return v.behavior.zoom().translate(f.translate()).scale(f.scale())}function n(y,f,R){var L=y.id,z=y.graphDiv,F=z.layout,N=F[L],O=z._fullLayout,P=O[L],U={},B={};function X($,se){U[L+"."+$]=x.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var le=x.nestedProperty(P,$);le.get()!==se&&(le.set(se),x.nestedProperty(N,$).set(se),B[L+"."+$]=se)}R(X),X("projection.scale",f.scale()/y.fitScale),X("fitbounds",!1),z.emit("plotly_relayout",B)}function i(y,f){var R=a(y,f);function L(){v.select(this).style(t)}function z(){f.scale(v.event.scale).translate(v.event.translate),y.render(!0);var O=f.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/y.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var P=f.invert(y.midPt);O("center.lon",P[0]),O("center.lat",P[1])}function N(){v.select(this).style(r),n(y,f,F)}return R.on("zoomstart",L).on("zoom",z).on("zoomend",N),R}function s(y,f){var R=a(y,f),L=2,z,F,N,O,P,U,B,X,$;function se(q){return f.invert(q)}function le(q){var oe=se(q);if(!oe)return!0;var ae=f(oe);return Math.abs(ae[0]-q[0])>L||Math.abs(ae[1]-q[1])>L}function fe(){v.select(this).style(t),z=v.mouse(this),F=f.rotate(),N=f.translate(),O=F,P=se(z)}function V(){if(U=v.mouse(this),le(z)){R.scale(f.scale()),R.translate(f.translate());return}f.scale(v.event.scale),f.translate([N[0],v.event.translate[1]]),P?se(U)&&(X=se(U),B=[O[0]+(X[0]-P[0]),F[1],F[2]],f.rotate(B),O=B):(z=U,P=se(z)),$=!0,y.render(!0);var q=f.rotate(),oe=f.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/y.fitScale,"geo.center.lon":oe[0],"geo.center.lat":oe[1],"geo.projection.rotation.lon":-q[0]})}function Y(){v.select(this).style(r),$&&n(y,f,ee)}function ee(q){var oe=f.rotate(),ae=f.invert(y.midPt);q("projection.rotation.lon",-oe[0]),q("center.lon",ae[0]),q("center.lat",ae[1])}return R.on("zoomstart",fe).on("zoom",V).on("zoomend",Y),R}function h(y,f){var R={r:f.rotate(),k:f.scale()},L=a(y,f),z=u(L,"zoomstart","zoom","zoomend"),F=0,N=L.on,O;L.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),se=f.rotate(),le=se,fe=f.translate(),V=m(se);O=c(f,$),N.call(L,"zoom",function(){var Y=v.mouse(this);if(f.scale(R.k=v.event.scale),!O)$=Y,O=c(f,$);else if(c(f,Y)){f.rotate(se).translate(fe);var ee=c(f,Y),q=T(O,ee),oe=M(p(V,q)),ae=R.r=l(oe,O,le);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=le),f.rotate(ae),le=ae}U(z.of(this,arguments))}),P(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(L,"zoom",null),B(z.of(this,arguments)),n(y,f,X)}).on("zoom.redraw",function(){y.render(!0);var $=f.rotate();y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.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 se=f.rotate();$("projection.rotation.lon",-se[0]),$("projection.rotation.lat",-se[1])}return v.rebind(L,z,"on")}function c(y,f){var R=y.invert(f);return R&&isFinite(R[0])&&isFinite(R[1])&&g(R)}function m(y){var f=.5*y[0]*E,R=.5*y[1]*E,L=.5*y[2]*E,z=Math.sin(f),F=Math.cos(f),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 p(y,f){var R=y[0],L=y[1],z=y[2],F=y[3],N=f[0],O=f[1],P=f[2],U=f[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,f){if(!(!y||!f)){var R=d(y,f),L=Math.sqrt(b(R,R)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(y,f)))),F=Math.sin(z)/L;return L&&[Math.cos(z),R[2]*F,-R[1]*F,R[0]*F]}}function l(y,f,R){var L=A(f,2,y[0]);L=A(L,1,y[1]),L=A(L,0,y[2]-R[2]);var z=f[0],F=f[1],N=f[2],O=L[0],P=L[1],U=L[2],B=Math.atan2(F,z)*e,X=Math.sqrt(z*z+F*F),$,se;Math.abs(P)>X?(se=(P>0?90:-90)-B,$=0):(se=Math.asin(P/X)*e-B,$=Math.sqrt(X*X-P*P));var le=180-se-2*B,fe=(Math.atan2(U,O)-Math.atan2(N,$))*e,V=(Math.atan2(U,O)-Math.atan2(N,-$))*e,Y=_(R[0],R[1],se,fe),ee=_(R[0],R[1],le,V);return Y<=ee?[se,fe,R[2]]:[le,V,R[2]]}function _(y,f,R,L){var z=w(R-y),F=w(L-f);return Math.sqrt(z*z+F*F)}function w(y){return(y%360+540)%360-180}function A(y,f,R){var L=R*E,z=y.slice(),F=f===0?1:0,N=f===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 f=y[0]*E,R=y[1]*E,L=Math.cos(R);return[L*Math.cos(f),L*Math.sin(f),Math.sin(R)]}function b(y,f){for(var R=0,L=0,z=y.length;L<z;++L)R+=y[L]*f[L];return R}function d(y,f){return[y[1]*f[2]-y[2]*f[1],y[2]*f[0]-y[0]*f[2],y[0]*f[1]-y[1]*f[0]]}function u(y){for(var f=0,R=arguments.length,L=[];++f<R;)L.push(arguments[f]);var z=v.dispatch.apply(null,L);return z.of=function(F,N){return function(O){var P;try{P=O.sourceEvent=v.event,O.target=y,v.event=O,z[O.type].apply(F,N)}finally{v.event=P}}},z}}}),qU=Xe({"src/plots/geo/geo.js"(Z,G){"use strict";var v=Hn(),x=zE(),S=x.geoPath,E=x.geoDistance,e=UU(),t=so(),r=sa(),o=r.strTranslate,a=$n(),n=es(),i=rf(),s=bc(),h=Go(),c=Yd().getAutoRange,m=Ap(),p=Af().prepSelect,T=Af().clearOutline,l=Af().selectOnClick,_=jU(),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 d=b.prototype;G.exports=function(L){return new b(L)},d.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 se=R[0][0].trace;se._geo=N,se.locationmode&&(U=!0);var le=se.marker;if(le){var fe=le.angle,V=le.angleref;(fe||V==="north"||V==="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)}))},d.fetchTopojson=function(){var R=this,L=M.getTopojsonPath(R.topojsonURL,R.topojsonName);return new Promise(function(z,F){v.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()})})},d.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()},d.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,se=this.projection=u(F),le=[[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])]],fe=F.center||{},V=P.rotation||{},Y=U.range||[],ee=B.range||[];if(F.fitbounds){X._length=le[1][0]-le[0][0],$._length=le[1][1]-le[0][1],X.range=c(z,X),$.range=c(z,$);var q=(X.range[0]+X.range[1])/2,oe=($.range[0]+$.range[1])/2;if(F._isScoped)fe={lon:q,lat:oe};else if(F._isClipped){fe={lon:q,lat:oe},V={lon:q,lat:oe,roll:V.roll};var ae=P.type,j=w.lonaxisSpan[ae]/2||180,Q=w.lataxisSpan[ae]/2||90;Y=[q-j,q+j],ee=[oe-Q,oe+Q]}else fe={lon:q,lat:oe},V={lon:q,lat:V.lat,roll:V.roll}}se.center([fe.lon-V.lon,fe.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(P.parallels);var re=f(Y,ee);se.fitExtent(le,re);var ce=this.bounds=se.getBounds(re),be=this.fitScale=se.scale(),Ae=se.translate();if(F.fitbounds){var De=se.getBounds(f(X.range,$.range)),ze=Math.min((ce[1][0]-ce[0][0])/(De[1][0]-De[0][0]),(ce[1][1]-ce[0][1])/(De[1][1]-De[0][1]));isFinite(ze)?se.scale(ze*be):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else se.scale(P.scale*be);var Ze=this.midPt=[(ce[0][0]+ce[1][0])/2,(ce[0][1]+ce[1][1])/2];if(se.translate([Ae[0]+(Ze[0]-Ae[0]),Ae[1]+(Ze[1]-Ae[1])]).clipExtent(ce),F._isAlbersUsa){var at=se([fe.lon,fe.lat]),nt=se.translate();se.translate([nt[0]-(at[0]-nt[0]),nt[1]-(at[1]-nt[1])])}},d.updateBaseLayers=function(R,L){var z=this,F=z.topojson,N=z.layers,O=z.basePaths;function P(le){return le==="lonaxis"||le==="lataxis"}function U(le){return!!w.lineLayers[le]}function B(le){return!!w.fillLayers[le]}var X=this.hasChoropleth?w.layersForChoropleth:w.layers,$=X.filter(function(le){return U(le)||B(le)?L["show"+le]:P(le)?L[le].showgrid:!0}),se=z.framework.selectAll(".layer").data($,String);se.exit().each(function(le){delete N[le],delete O[le],v.select(this).remove()}),se.enter().append("g").attr("class",function(le){return"layer "+le}).each(function(le){var fe=N[le]=v.select(this);le==="bg"?z.bgRect=fe.append("rect").style("pointer-events","all"):P(le)?O[le]=fe.append("path").style("fill","none"):le==="backplot"?fe.append("g").classed("choroplethlayer",!0):le==="frontplot"?fe.append("g").classed("scatterlayer",!0):U(le)?O[le]=fe.append("path").style("fill","none").style("stroke-miterlimit",2):B(le)&&(O[le]=fe.append("path").style("stroke","none"))}),se.order(),se.each(function(le){var fe=O[le],V=w.layerNameToAdjective[le];le==="frame"?fe.datum(w.sphereSVG):U(le)||B(le)?fe.datum(g(F,F.objects[le])):P(le)&&fe.datum(y(le,L,R)).call(a.stroke,L[le].gridcolor).call(n.dashLine,L[le].griddash,L[le].gridwidth),U(le)?fe.call(a.stroke,L[V+"color"]).call(n.dashLine,"",L[V+"width"]):B(le)&&fe.call(a.fill,L[V+"color"])})},d.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},d.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 se=z.viewInitial,le={};for(var fe in se)le[z.id+"."+fe]=se[fe];t.call("_guiRelayout",F,le),F.emit("plotly_doubleclick",null)}function B(se){return z.projection.invert([se[0]+z.xaxis._offset,se[1]+z.yaxis._offset])}var X=function(se,le){if(le.isRect){var fe=se.range={};fe[z.id]=[B([le.xmin,le.ymin]),B([le.xmax,le.ymax])]}else{var V=se.lassoPoints={};V[z.id]=le.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(se){se===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(se,le,fe){p(se,le,fe,$,O)},m.init($)),N.on("mousemove",function(){var se=z.projection.invert(r.getPositionFromD3Event());if(!se)return m.unhover(F,v.event);z.xaxis.p2c=function(){return se[0]},z.yaxis.p2c=function(){return se[1]},i.hover(F,v.event,z.id)}),N.on("mouseout",function(){F._dragging||m.unhover(F,v.event)}),N.on("click",function(){O!=="select"&&O!=="lasso"&&(P.indexOf("select")>-1&&l(v.event,F,[z.xaxis],[z.yaxis],z.id,$),P.indexOf("event")>-1&&i.click(F,v.event))})},d.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=v.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)},d.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)},d.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},d._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(se){return se?O:[]},X=0;X<U.length;X++){var $=U[X];typeof O[$]!="function"&&(O[$]=B)}return O.isLonLatOverEdges=function(se){if(O(se)===null)return!0;if(P){var le=O.rotate(),fe=E(se,[-le[0],-le[1]]),V=P*Math.PI/180;return fe>V}else return!1},O.getPath=function(){return S().projection(O)},O.getBounds=function(se){return O.getPath().bounds(se)},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(oe,ae){return[oe,ae]}):R==="lataxis"&&(U=P.lataxisRange,B=P.lonaxisRange,X=function(oe,ae){return[ae,oe]});var $={type:"linear",range:[U[0],U[1]-F],tick0:O.tick0,dtick:O.dtick};h.setConvert($,z);var se=h.calcTicks($);!L.isScoped&&R==="lonaxis"&&se.pop();for(var le=se.length,fe=new Array(le),V=0;V<le;V++)for(var Y=se[V].x,ee=fe[V]=[],q=B[0];q<B[1]+N;q+=N)ee.push(X(Y,q));return{type:"MultiLineString",coordinates:fe}}function f(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=Xe({"src/plots/geo/layout_attributes.js"(Z,G){"use strict";var v=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:v.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:S},o=G.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:v.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:v.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:v.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:v.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:v.background},lonaxis:r,lataxis:r},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}}),VU=Xe({"src/plots/geo/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=o0(),S=Hh().getSubplotData,E=yx(),e=FE(),t=E.axesNames;G.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}),c=n("resolution"),m=n("scope"),p=E.scopeDefaults[m],T=n("projection.type",p.projType),l=a._isAlbersUsa=T==="albers usa";l&&(m=a.scope="usa");var _=a._isScoped=m!=="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=v.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"),d,u=0;u<t.length;u++){var y=t[u],f=[30,10][u],R;if(_)R=p[y+"Range"];else{var L=E[y+"Span"],z=(L[T]||L["*"])/2,F=n("projection.rotation."+y.slice(0,3),p.projRotate[u]);R=[F-z,F+z]}var N=n(y+".range",R);n(y+".tick0"),n(y+".dtick",f),d=n(y+".showgrid",b?void 0:!1),d&&(n(y+".gridcolor"),n(y+".gridwidth"),n(y+".griddash")),a[y]._ax={type:"linear",_id:y.slice(0,3),_traceIndices:h,setScale:v.identity,c2l:v.identity,r2l:v.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 se=_?p.projRotate:[X,0,0];$=n("projection.rotation.lon",se[0]),n("projection.rotation.lat",se[1]),n("projection.rotation.roll",se[2]),d=n("showcoastlines",!_&&b),d&&(n("coastlinecolor"),n("coastlinewidth")),d=n("showocean",b?void 0:!1),d&&n("oceancolor")}var le,fe;if(l?(le=-96.6,fe=38.7):(le=_?X:$,fe=(P[0]+P[1])/2),n("center.lon",le),n("center.lat",fe),w&&(n("projection.tilt"),n("projection.distance")),A){var V=p.projParallels||[0,60];n("projection.parallels",V)}n("projection.scale"),d=n("showland",b?void 0:!1),d&&n("landcolor"),d=n("showlakes",b?void 0:!1),d&&n("lakecolor"),d=n("showrivers",b?void 0:!1),d&&(n("rivercolor"),n("riverwidth")),d=n("showcountries",_&&m!=="usa"&&b),d&&(n("countrycolor"),n("countrywidth")),(m==="usa"||m==="north america"&&c===50)&&(n("showsubunits",b),n("subunitcolor"),n("subunitwidth")),_||(d=n("showframe",b),d&&(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=Xe({"src/plots/geo/index.js"(Z,G){"use strict";var v=Hh().getSubplotCalcData,x=sa().counterRegex,S=qU(),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],c=0;c<h.length;c++){var m=h[c],p=v(s,E,m),T=i[m],l=T._subplot;l||(l=S({id:m,graphDiv:n,container:i._geolayer.node(),topojsonURL:n._context.topojsonURL,staticPlot:n._context.staticPlot}),i[m]._subplot=l),l.plot(p,i,n._promises)}}function o(n,i,s,h){for(var c=h._subplots[E]||[],m=0;m<c.length;m++){var p=c[m],T=h[p]._subplot;!i[p]&&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 c=i[s[h]],m=c._subplot;m.updateFx(i,c)}}G.exports={attr:E,name:E,idRoot:E,idRegex:e,attrRegex:e,attributes:t,layoutAttributes:FE(),supplyLayoutDefaults:VU(),plot:r,updateFx:a,clean:o}}}),GU=Xe({"src/traces/scattergeo/index.js"(Z,G){"use strict";G.exports={attributes:vg(),supplyDefaults:PU(),colorbar:pp(),formatLabels:IU(),calc:iT(),calcGeoJSON:DE().calcGeoJSON,plot:DE().plot,style:RE(),styleOnSelect:Qp().styleOnSelect,hoverPoints:OU(),eventData:BU(),selectPoints:NU(),moduleType:"trace",name:"scattergeo",basePlotModule:OE(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),HU=Xe({"lib/scattergeo.js"(Z,G){"use strict";G.exports=GU()}}),k1=Xe({"src/traces/choropleth/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Jl(),S=vg(),E=ku(),e=ru(),t=sh().defaultLine,r=Qo().extendFlat,o=S.marker.line;G.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:v(),hovertemplatefallback:x(),showlegend:r({},e.showlegend,{dflt:!1})},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),WU=Xe({"src/traces/choropleth/defaults.js"(Z,G){"use strict";var v=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(" ");G.exports=function(t,r,o,a){function n(T,l){return v.coerce(t,r,S,T,l)}var i=n("locations"),s=n("z");if(!(i&&i.length&&v.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(i.length,s.length);var h=n("geojson"),c;(typeof h=="string"&&h!==""||v.isPlainObject(h))&&(c="geojson-id");var m=n("locationmode",c);m==="country names"&&v.warn(E),m==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var p=n("marker.line.width");p&&n("marker.line.color"),n("marker.opacity"),x(t,r,a,n,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(r,n)}}}),lT=Xe({"src/traces/choropleth/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Tp(),E=Av(),e=Od();function t(r){return r&&typeof r=="string"}G.exports=function(o,a){var n=a._length,i=new Array(n),s;a.geojson?s=function(T){return t(T)||v(T)}:s=t;for(var h=0;h<n;h++){var c=i[h]={},m=a.locations[h],p=a.z[h];s(m)&&v(p)?(c.loc=m,c.z=p):(c.loc=null,c.z=x),c.index=h}return E(i,a),S(o,a,{vals:a.z,containerStr:"",cLetter:"z"}),e(i,a),i}}}),uT=Xe({"src/traces/choropleth/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),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||{},c=h.line||{},m=E.makeColorScaleFuncFromTrace(n);s.each(function(p){v.select(this).attr("fill",m(p.z)).call(x.stroke,p.mlc||c.color).call(S.dashLine,"",p.mlw||c.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)}G.exports={style:e,styleOnSelect:r}}}),BE=Xe({"src/traces/choropleth/plot.js"(Z,G){"use strict";var v=Hn(),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 c=v.select(this),m=c.selectAll("path.choroplethlocation").data(x.identity);m.enter().append("path").classed("choroplethlocation",!0),m.exit().remove(),t(a,h)})}function o(a,n){for(var i=a[0].trace,s=n[i.geo],h=s._subplot,c=i.locationmode,m=i._length,p=c==="geojson-id"?S.extractTraceFeature(a):E(i,h.topojson),T=[],l=[],_=0;_<m;_++){var w=a[_],A=c==="geojson-id"?w.fOut:S.locationToFeature(c,w.loc,p);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"&&c==="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)}G.exports={calcGeoJSON:o,plot:r}}}),cT=Xe({"src/traces/choropleth/hover.js"(Z,G){"use strict";var v=Go(),x=k1(),S=sa().fillText;G.exports=function(t,r,o){var a=t.cd,n=a[0].trace,i=t.subplot,s,h,c,m,p=[r,o],T=[r+360,o];for(h=0;h<a.length;h++)if(s=a[h],m=!1,s._polygons){for(c=0;c<s._polygons.length;c++)s._polygons[c].contains(p)&&(m=!m),s._polygons[c].contains(T)&&(m=!m);if(m)break}if(!(!m||!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=v.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,c=n.indexOf("text")!==-1,m=!i&&s,p=[];m?e.nameOverride=a:(i&&(e.nameOverride=t.name),s&&p.push(a)),h&&p.push(e.zLabel),c&&S(r,t,p),e.extraText=p.join("<br>")}}}}),fT=Xe({"src/traces/choropleth/event_data.js"(Z,G){"use strict";G.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=Xe({"src/traces/choropleth/select.js"(Z,G){"use strict";G.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}}}),XU=Xe({"src/traces/choropleth/index.js"(Z,G){"use strict";G.exports={attributes:k1(),supplyDefaults:WU(),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:{}}}}),ZU=Xe({"lib/choropleth.js"(Z,G){"use strict";G.exports=XU()}}),pT=Xe({"src/traces/scattergl/hover.js"(Z,G){"use strict";var v=so(),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,c=t.ya,m=i.x,p=i.y,T=h.c2p(r),l=c.c2p(o),_=t.distance,w;if(i.tree){var A=h.p2c(T-_),M=h.p2c(T+_),g=c.p2c(l-_),b=c.p2c(l+_);a==="x"?w=i.tree.range(Math.min(A,M),Math.min(c._rl[0],c._rl[1]),Math.max(A,M),Math.max(c._rl[0],c._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 d,u,y,f,R,L,z,F,N,O=_;if(a==="x"){var P=!!s.xperiodalignment,U=!!s.yperiodalignment;for(R=0;R<w.length;R++){if(d=w[R],y=m[d],L=Math.abs(h.c2p(y)-T),P){var B=h.c2p(s._xStarts[d]),X=h.c2p(s._xEnds[d]);L=T>=Math.min(B,X)&&T<=Math.max(B,X)?0:1/0}if(L<O){if(O=L,f=p[d],z=c.c2p(f)-l,U){var $=c.c2p(s._yStarts[d]),se=c.c2p(s._yEnds[d]);z=l>=Math.min($,se)&&l<=Math.max($,se)?0:1/0}N=Math.sqrt(L*L+z*z),u=w[R]}}}else for(R=w.length-1;R>-1;R--)d=w[R],y=m[d],f=p[d],L=h.c2p(y)-T,z=c.c2p(f)-l,F=Math.sqrt(L*L+z*z),F<O&&(O=N=F,u=d);return t.index=u,t.distance=O,t.dxy=N,u===void 0?[t]:[e(t,m,p,s)]}function e(t,r,o,a){var n=t.xa,i=t.ya,s=t.distance,h=t.dxy,c=t.index,m={pointNumber:c,x:r[c],y:o[c]};m.tx=x.isArrayOrTypedArray(a.text)?a.text[c]:a.text,m.htx=Array.isArray(a.hovertext)?a.hovertext[c]:a.hovertext,m.data=Array.isArray(a.customdata)?a.customdata[c]:a.customdata,m.tp=Array.isArray(a.textposition)?a.textposition[c]:a.textposition;var p=a.textfont;p&&(m.ts=x.isArrayOrTypedArray(p.size)?p.size[c]:p.size,m.tc=x.isArrayOrTypedArray(p.color)?p.color[c]:p.color,m.tf=Array.isArray(p.family)?p.family[c]:p.family,m.tw=Array.isArray(p.weight)?p.weight[c]:p.weight,m.ty=Array.isArray(p.style)?p.style[c]:p.style,m.tv=Array.isArray(p.variant)?p.variant[c]:p.variant);var T=a.marker;T&&(m.ms=x.isArrayOrTypedArray(T.size)?T.size[c]:T.size,m.mo=x.isArrayOrTypedArray(T.opacity)?T.opacity[c]:T.opacity,m.mx=x.isArrayOrTypedArray(T.symbol)?T.symbol[c]:T.symbol,m.ma=x.isArrayOrTypedArray(T.angle)?T.angle[c]:T.angle,m.mc=x.isArrayOrTypedArray(T.color)?T.color[c]:T.color);var l=T&&T.line;l&&(m.mlc=Array.isArray(l.color)?l.color[c]:l.color,m.mlw=x.isArrayOrTypedArray(l.width)?l.width[c]:l.width);var _=T&&T.gradient;_&&_.type!=="none"&&(m.mgt=Array.isArray(_.type)?_.type[c]:_.type,m.mgc=Array.isArray(_.color)?_.color[c]:_.color);var w=n.c2p(m.x,!0),A=i.c2p(m.y,!0),M=m.mrc||1,g=a.hoverlabel;g&&(m.hbg=Array.isArray(g.bgcolor)?g.bgcolor[c]:g.bgcolor,m.hbc=Array.isArray(g.bordercolor)?g.bordercolor[c]:g.bordercolor,m.hts=x.isArrayOrTypedArray(g.font.size)?g.font.size[c]:g.font.size,m.htc=Array.isArray(g.font.color)?g.font.color[c]:g.font.color,m.htf=Array.isArray(g.font.family)?g.font.family[c]:g.font.family,m.hnl=x.isArrayOrTypedArray(g.namelength)?g.namelength[c]:g.namelength);var b=a.hoverinfo;b&&(m.hi=Array.isArray(b)?b[c]:b);var d=a.hovertemplate;d&&(m.ht=Array.isArray(d)?d[c]:d);var u={};u[t.index]=m;var y=a._origX,f=a._origY,R=x.extendFlat({},t,{color:S(a,m),x0:w-M,x1:w+M,xLabelVal:y?y[c]:m.x,y0:A-M,y1:A+M,yLabelVal:f?f[c]:m.y,cd:u,distance:s,spikeDistance:h,hovertemplate:m.ht});return m.htx?R.text=m.htx:m.tx?R.text=m.tx:a.text&&(R.text=a.text),x.fillText(m,a,R),v.getComponentMethod("errorbars","hoverInfo")(m,a,R),R}G.exports={hoverPoints:E,calcHover:e}}}),y0=Xe({"src/traces/scattergl/constants.js"(Z,G){"use strict";var v=20;G.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:v,SYMBOL_STROKE:v/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=Xe({"src/traces/scattergl/attributes.js"(Z,G){"use strict";var v=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,c=G.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:v.opacity},"calc","nested");c.x.editType=c.y.editType=c.x0.editType=c.y0.editType="calc+clearAxisTypes",c.hovertemplate=E.hovertemplate,c.hovertemplatefallback=E.hovertemplatefallback,c.texttemplate=E.texttemplate,c.texttemplatefallback=E.texttemplatefallback}}),dT=Xe({"src/traces/scattergl/helpers.js"(Z){"use strict";var G=y0();Z.isOpenSymbol=function(v){return typeof v=="string"?G.OPEN_RE.test(v):v%200>100},Z.isDotSymbol=function(v){return typeof v=="string"?G.DOT_RE.test(v):v>200}}}),YU=Xe({"src/traces/scattergl/defaults.js"(Z,G){"use strict";var v=sa(),x=so(),S=dT(),E=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),n=Dd(),i=ev(),s=zd();G.exports=function(c,m,p,T){function l(u,y){return v.coerce(c,m,E,u,y)}var _=c.marker?S.isOpenSymbol(c.marker.symbol):!1,w=t.isBubble(c),A=r(c,m,T,l);if(!A){m.visible=!1;return}o(c,m,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(m)&&(a(c,m,p,T,l,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),l("marker.line.width",_||w?1:0)),t.hasLines(m)&&(l("connectgaps"),n(c,m,p,T,l),l("line.shape")),t.hasText(m)&&(l("texttemplate"),l("texttemplatefallback"),s(c,m,T,l,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var g=(m.line||{}).color,b=(m.marker||{}).color;l("fill"),m.fill!=="none"&&i(c,m,p,l);var d=x.getComponentMethod("errorbars","supplyDefaults");d(c,m,g||b||p,{axis:"y"}),d(c,m,g||b||p,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(m,l)}}}),KU=Xe({"src/traces/scattergl/format_labels.js"(Z,G){"use strict";var v=P2();G.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]),v(S,E,e)}}}),JU=Xe({"node_modules/binary-search-bounds/search-bounds.js"(Z,G){"use strict";function v(r,o,a,n,i){for(var s=i+1;n<=i;){var h=n+i>>>1,c=r[h],m=a!==void 0?a(c,o):c-o;m>=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,c=r[h],m=a!==void 0?a(c,o):c-o;m>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,c=r[h],m=a!==void 0?a(c,o):c-o;m<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,c=r[h],m=a!==void 0?a(c,o):c-o;m<=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],c=a!==void 0?a(h,o):h-o;if(c===0)return s;c<=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)}G.exports={ge:function(r,o,a,n,i){return t(r,o,a,n,i,v)},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=Xe({"node_modules/pick-by-alias/index.js"(Z,G){"use strict";G.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 c=a;c<s.length;c++)i[s[c]]=!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 v={};function x(S){return v[S]?v[S]:(typeof S=="string"&&(S=v[S]=S.split(/\s*,\s*|\s+/)),S)}}}),C1=Xe({"node_modules/parse-rect/index.js"(Z,G){"use strict";var v=Ev();G.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=v(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=Xe({"node_modules/array-bounds/index.js"(Z,G){"use strict";G.exports=v;function v(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}}}),$U=Xe({"node_modules/defined/index.js"(Z,G){G.exports=function(){for(var v=0;v<arguments.length;v++)if(arguments[v]!==void 0)return arguments[v]}}}),gg=Xe({"node_modules/flatten-vertex-data/index.js"(Z,G){var v=Q3();G.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(v(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=v(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}}}),QU=Xe({"node_modules/is-obj/index.js"(Z,G){"use strict";G.exports=function(v){var x=typeof v;return v!==null&&(x==="object"||x==="function")}}}),ej=Xe({"node_modules/math-log2/index.js"(Z,G){"use strict";G.exports=Math.log2||function(v){return Math.log(v)*Math.LOG2E}}}),tj=Xe({"node_modules/@plotly/point-cluster/quad.js"(Z,G){"use strict";var v=JU(),x=mx(),S=C1(),E=mg(),e=Ev(),t=$U(),r=gg(),o=QU(),a=Q3(),n=ej(),i=1073741824;G.exports=function(c,m){m||(m={}),c=r(c,"float64"),m=e(m,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let p=t(m.maxDepth,255),T=t(m.bounds,E(c,2));T[0]===T[2]&&T[2]++,T[1]===T[3]&&T[3]++;let l=s(c,T),_=c.length>>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(_):m.dtype&&(w=m.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 d=0;for(let L=0;L<A.length;L++){let z=A[L];if(w.set)w.set(z,d);else for(let N=0,O=z.length;N<O;N++)w[N+d]=z[N];let F=d+A[L].length;b[L]=[d,F],d=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>p||P>i){for(let oe=0;oe<N.length;oe++)U.push(N[oe]),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 se=F*.5,le=L+se,fe=z+se,V=[],Y=[],ee=[],q=[];for(let oe=1,ae=N.length;oe<ae;oe++){let j=N[oe],Q=l[j*2],re=l[j*2+1];Q<le?re<fe?V.push(j):Y.push(j):re<fe?ee.push(j):q.push(j)}return P<<=2,X.push(u(L,z,se,V,O,P),u(L,fe,se,Y,O,P+1),u(le,z,se,ee,O,P+2),u(le,fe,se,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,$,se]=s([N,O,P,U],T),le=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),le=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])))),le)}if(le=Math.min(le,A.length),z.lod)return f(B,X,$,se,le);let fe=[];V(0,0,1,0,0,1);function V(ee,q,oe,ae,j,Q){if(j===null||Q===null)return;let re=ee+oe,ce=q+oe;if(B>re||X>ce||$<ee||se<q||ae>=le||j===Q)return;let be=A[ae];Q===void 0&&(Q=be.length);for(let Me=j;Me<Q;Me++){let ye=be[Me],he=c[ye*2],Oe=c[ye*2+1];he>=N&&he<=P&&Oe>=O&&Oe<=U&&fe.push(ye)}let Ae=M[ae],De=Ae[j*4+0],ze=Ae[j*4+1],Ze=Ae[j*4+2],at=Ae[j*4+3],nt=Y(Ae,j+1),rt=oe*.5,st=ae+1;V(ee,q,rt,st,De,ze||Ze||at||nt),V(ee,q+rt,rt,st,ze,Ze||at||nt),V(ee+rt,q,rt,st,Ze,at||nt),V(ee+rt,q+rt,rt,st,at,nt)}function Y(ee,q){let oe=null,ae=0;for(;oe===null;)if(oe=ee[q*4+ae],ae++,ae>ee.length)return null;return oe}return fe}function f(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),se=R(F,N,U),le=v.ge(B,$),fe=v.gt(B,se,le,B.length-1);P[U]=[le+X,fe+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,c){let[m,p,T,l]=c,_=1/(T-m),w=1/(l-p),A=new Array(h.length);for(let M=0,g=h.length/2;M<g;M++)A[2*M]=x((h[2*M]-m)*_,0,1),A[2*M+1]=x((h[2*M+1]-p)*w,0,1);return A}}}),vT=Xe({"node_modules/@plotly/point-cluster/index.js"(Z,G){"use strict";G.exports=tj()}}),NE=Xe({"node_modules/abs-svg-path/index.js"(Z,G){G.exports=v;function v(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})}}}),rj=Xe({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(Z,G){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var v=function(){function o(a,n){var i=[],s=!0,h=!1,c=void 0;try{for(var m=a[Symbol.iterator](),p;!(s=(p=m.next()).done)&&(i.push(p.value),!(n&&i.length===n));s=!0);}catch(T){h=!0,c=T}finally{try{!s&&m.return&&m.return()}finally{if(h)throw c}}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,c,m){var p=a.x,T=a.y;p*=n,T*=i;var l=s*p-h*T,_=h*p+s*T;return{x:l+c,y:_+m}},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),c=Math.cos(a+n),m=Math.sin(a+n);return[{x:s-h*i,y:h+s*i},{x:c+m*i,y:m-c*i},{x:c,y:m}]},e=function(a,n,i,s){var h=a*s-n*i<0?-1:1,c=a*i+n*s;return c>1&&(c=1),c<-1&&(c=-1),h*Math.acos(c)},t=function(a,n,i,s,h,c,m,p,T,l,_,w){var A=Math.pow(h,2),M=Math.pow(c,2),g=Math.pow(_,2),b=Math.pow(w,2),d=A*M-A*b-M*g;d<0&&(d=0),d/=A*b+M*g,d=Math.sqrt(d)*(m===p?-1:1);var u=d*h/c*w,y=d*-c/h*_,f=l*u-T*y+(a+i)/2,R=T*u+l*y+(n+s)/2,L=(_-u)/h,z=(w-y)/c,F=(-_-u)/h,N=(-w-y)/c,O=e(1,0,L,z),P=e(L,z,F,N);return p===0&&P>0&&(P-=x),p===1&&P<0&&(P+=x),[f,R,O,P]},r=function(a){var n=a.px,i=a.py,s=a.cx,h=a.cy,c=a.rx,m=a.ry,p=a.xAxisRotation,T=p===void 0?0:p,l=a.largeArcFlag,_=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,M=[];if(c===0||m===0)return[];var g=Math.sin(T*x/360),b=Math.cos(T*x/360),d=b*(n-s)/2+g*(i-h)/2,u=-g*(n-s)/2+b*(i-h)/2;if(d===0&&u===0)return[];c=Math.abs(c),m=Math.abs(m);var y=Math.pow(d,2)/Math.pow(c,2)+Math.pow(u,2)/Math.pow(m,2);y>1&&(c*=Math.sqrt(y),m*=Math.sqrt(y));var f=t(n,i,s,h,c,m,_,A,g,b,d,u),R=v(f,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],c,m,b,g,L,z),$=X.x,se=X.y,le=S(B[1],c,m,b,g,L,z),fe=le.x,V=le.y,Y=S(B[2],c,m,b,g,L,z),ee=Y.x,q=Y.y;return{x1:$,y1:se,x2:fe,y2:V,x:ee,y:q}})};Z.default=r,G.exports=Z.default}}),aj=Xe({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(Z,G){"use strict";G.exports=x;var v=rj();function x(e){for(var t,r=[],o=0,a=0,n=0,i=0,s=null,h=null,c=0,m=0,p=0,T=e.length;p<T;p++){var l=e[p],_=l[0];switch(_){case"M":n=l[1],i=l[2];break;case"A":var w=v({px:c,py:m,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=c,b=m;(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=c*2-s,h=m*2-h):(s=c,h=m),l=E(c,m,s,h,l[1],l[2]);break;case"Q":s=l[1],h=l[2],l=E(c,m,l[1],l[2],l[3],l[4]);break;case"L":l=S(c,m,l[1],l[2]);break;case"H":l=S(c,m,l[1],m);break;case"V":l=S(c,m,c,l[1]);break;case"Z":l=S(c,m,n,i);break}t=_,c=l[l.length-2],m=l[l.length-1],l.length>4?(o=l[l.length-4],a=l[l.length-3]):(o=c,a=m),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=Xe({"node_modules/is-svg-path/index.js"(Z,G){"use strict";G.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))}}}),ij=Xe({"node_modules/svg-path-bounds/index.js"(Z,G){"use strict";var v=M_(),x=NE(),S=aj(),E=UE(),e=K_();G.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=v(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}}}),nj=Xe({"node_modules/normalize-svg-path/index.js"(Z,G){var v=Math.PI,x=o(120);G.exports=S;function S(a){for(var n,i=[],s=0,h=0,c=0,m=0,p=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":c=M[1],m=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,d=_;(n=="C"||n=="S")&&(b+=b-s,d+=d-h),M=["C",b,d,M[1],M[2],M[3],M[4]];break;case"T":n=="Q"||n=="T"?(p=l*2-p,T=_*2-T):(p=l,T=_),M=e(l,_,p,T,M[1],M[2]);break;case"Q":p=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,_,c,m);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,c){return["C",a/3+2/3*i,n/3+2/3*s,h/3+2/3*i,c/3+2/3*s,h,c]}function t(a,n,i,s,h,c,m,p,T,l){if(l)f=l[0],R=l[1],u=l[2],y=l[3];else{var _=r(a,n,-h);a=_.x,n=_.y,_=r(p,T,-h),p=_.x,T=_.y;var w=(a-p)/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,d=(c==m?-1:1)*Math.sqrt(Math.abs((g*b-g*A*A-b*w*w)/(g*A*A+b*w*w)));d==1/0&&(d=1);var u=d*i*A/s+(a+p)/2,y=d*-s*w/i+(n+T)/2,f=Math.asin(((n-y)/s).toFixed(9)),R=Math.asin(((T-y)/s).toFixed(9));f=a<u?v-f:f,R=p<u?v-R:R,f<0&&(f=v*2+f),R<0&&(R=v*2+R),m&&f>R&&(f=f-v*2),!m&&R>f&&(R=R-v*2)}if(Math.abs(R-f)>x){var L=R,z=p,F=T;R=f+x*(m&&R>f?1:-1),p=u+i*Math.cos(R),T=y+s*Math.sin(R);var N=t(p,T,i,s,h,0,m,z,F,[R,L,u,y])}var O=Math.tan((R-f)/4),P=4/3*i*O,U=4/3*s*O,B=[2*a-(a+P*Math.sin(f)),2*n-(n-U*Math.cos(f)),p+P*Math.sin(R),T-U*Math.cos(R),p,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*(v/180)}}}),oj=Xe({"node_modules/draw-svg-path/index.js"(Z,G){var v=NE(),x=nj(),S={M:"moveTo",C:"bezierCurveTo"};G.exports=function(E,e){E.beginPath(),x(v(e)).forEach(function(t){var r=t[0],o=t.slice(1);E[S[r]].apply(E,o)}),E.closePath()}}}),sj=Xe({"node_modules/bitmap-sdf/index.js"(Z,G){"use strict";var v=mx();G.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,c,m,p,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,c=t,r.stride?p=r.stride:p=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),c=_.data,p=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(l=t.canvas,T=t,i=l.width,s=l.height,_=T.getImageData(0,0,i,s),c=_.data,p=4):window.ImageData&&t instanceof window.ImageData&&(_=t,i=t.width,s=t.height,c=_.data,p=4);if(h=Math.max(i,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(i*s),w=0,A=m.length;w<A;w++)c[w]=m[w*p+n]/255;else if(p!==1)throw Error("Raw data can have only 1 value per pixel");var M=Array(i*s),g=Array(i*s),b=Array(h),d=Array(h),u=Array(h+1),y=Array(h);for(w=0,A=i*s;w<A;w++){var f=c[w];M[w]=f===1?0:f===0?x:Math.pow(Math.max(0,.5-f),2),g[w]=f===1?x:f===0?0:Math.pow(Math.max(0,f-.5),2)}E(M,i,s,b,d,y,u),E(g,i,s,b,d,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]=v(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 c=0;c<o;c++)a[c]=t[c*r+h];for(e(a,n,i,s,o),c=0;c<o;c++)t[c*r+h]=n[c]}for(c=0;c<o;c++){for(h=0;h<r;h++)a[h]=t[c*r+h];for(e(a,n,i,s,r),h=0;h<r;h++)t[c*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]]}}}}),lj=Xe({"node_modules/svg-path-sdf/index.js"(Z,G){"use strict";var v=ij(),x=M_(),S=oj(),E=UE(),e=sj(),t=document.createElement("canvas"),r=t.getContext("2d");G.exports=o;function o(i,s){if(!E(i))throw Error("Argument should be valid svg path string");s||(s={});var h,c;s.shape?(h=s.shape[0],c=s.shape[1]):(h=t.width=s.w||s.width||200,c=t.height=s.h||s.height||200);var m=Math.min(h,c),p=s.stroke||0,T=s.viewbox||s.viewBox||v(i),l=[h/(T[2]-T[0]),c/(T[3]-T[1])],_=Math.min(l[0]||0,l[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,h,c),r.fillStyle="white",p&&(typeof p!="number"&&(p=1),p>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(p)),r.translate(h*.5,c*.5),r.scale(_,_),n()){var w=new Path2D(i);r.fill(w),p&&r.stroke(w)}else{var A=x(i);S(r,A),r.fill(),p&&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:m*.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=Xe({"src/traces/scattergl/convert.js"(Z,G){"use strict";var v=rs(),x=lj(),S=d0(),E=so(),e=sa(),t=e.isArrayOrTypedArray,r=es(),o=ef(),a=tm().formatColor,n=Fu(),i=r1(),s=dT(),h=y0(),c=Ym().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=$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]=c*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],se=B.color,le=B.size,fe=B.family,V=B.weight,Y=B.style,ee=B.variant,q={},oe,ae=N._context.plotGlPixelRatio,j=O.texttemplate;if(j){q.text=[];var Q=P._d3locale,re=Array.isArray(j),ce=re?Math.min(j.length,U):U,be=re?function(nt){return j[nt]}:function(){return j};for(oe=0;oe<ce;oe++){var Ae={i:oe},De=O._module.formatLabels(Ae,O,P),ze={};p(ze,O,oe),q.text.push(e.texttemplateString({data:[ze,Ae,O._meta],fallback:O.texttemplatefallback,labels:De,locale:Q,template:be(oe)}))}}else t(O.text)&&O.text.length<U?q.text=O.text.slice():q.text=O.text;if(t(q.text))for(oe=q.text.length;oe<U;oe++)q.text[oe]="";for(q.opacity=O.opacity,q.font={},q.align=[],q.baseline=[],oe=0;oe<$.length;oe++){var Ze=$[oe].split(/\s+/);switch(Ze[1]){case"left":q.align.push("right");break;case"right":q.align.push("left");break;default:q.align.push(Ze[1])}switch(Ze[0]){case"top":q.baseline.push("bottom");break;case"bottom":q.baseline.push("top");break;default:q.baseline.push(Ze[0])}}if(t(se))for(q.color=new Array(U),oe=0;oe<U;oe++)q.color[oe]=se[oe];else q.color=se;if(t(le)||Array.isArray(fe)||t(V)||Array.isArray(Y)||Array.isArray(ee))for(q.font=new Array(U),oe=0;oe<U;oe++){var at=q.font[oe]={};at.size=(e.isTypedArray(le)?le[oe]:t(le)?v(le[oe])?le[oe]:0:le)*ae,at.family=Array.isArray(fe)?fe[oe]:fe,at.weight=_(t(V)?V[oe]:V),at.style=Array.isArray(Y)?Y[oe]:Y,at.variant=Array.isArray(ee)?ee[oe]:ee}else q.font={size:le*ae,family:fe,weight:_(V),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),se=t(U.angle),le=t(U.color),fe=t(U.line.color),V=t(U.opacity),Y=t(U.size),ee=t(U.line.width),q;if($||(q=s.isOpenSymbol(U.symbol)),$||le||fe||V||se){B.symbols=new Array(P),B.angles=new Array(P),B.colors=new Array(P),B.borderColors=new Array(P);var oe=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 ce=j;for(j=Array(P),X=0;X<P;X++)j[X]=ce}if(!t(oe)){var be=oe;for(oe=Array(P),X=0;X<P;X++)oe[X]=be}if(!t(ae)){var Ae=ae;for(ae=Array(P),X=0;X<P;X++)ae[X]=Ae}for(B.symbols=oe,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 De=1,ze=i(O,De),Ze;if(Y||ee){var at=B.sizes=new Array(P),nt=B.borderSizes=new Array(P),rt=0,st;if(Y){for(X=0;X<P;X++)at[X]=ze(U.size[X]),rt+=at[X];st=rt/P}else for(Ze=ze(U.size),X=0;X<P;X++)at[X]=Ze;if(ee)for(X=0;X<P;X++)nt[X]=U.line.width[X];else for(Ze=U.line.width,X=0;X<P;X++)nt[X]=Ze;B.sizeAvg=st}else B.size=ze(U&&U.size||10),B.borderSizes=ze(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,d=h.SYMBOL_SIZE,u=h.SYMBOL_STROKE,y={},f=r.symbolFuncs[0](d*.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],se=!!r.symbolNoDot[X%100],le=!!r.symbolNoFill[X%100],fe=s.isDotSymbol(P);if(N.ma&&(P+="_"+N.ma),y[P])return y[P];var V=r.getMarkerAngle(N,O);return fe&&!se?U=$(d*1.1,V)+f:U=$(d,V),B=x(U,{w:b,h:b,viewBox:[-d,-d,d,d],stroke:le?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 se=(P[$*2]+P[$*2+2])/2;X.push(P[$*2],P[$*2+1],se,P[$*2+1],se,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 le=(P[$*2+1]+P[$*2+3])/2;X.push(P[$*2],P[$*2+1],P[$*2],le,P[$*2+2],le)}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 fe=!1;for($=0;$<X.length;$++)if(isNaN(X[$])){fe=!0;break}var V=fe||X.length>h.TOO_MANY_POINTS||n.hasMarkers(O)?"rect":"round";if(fe&&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:V,positions:X}}function z(N,O,P,U,B){var X=E.getComponentMethod("errorbars","makeComputeError"),$=o.getFromId(N,O.xaxis,"x"),se=o.getFromId(N,O.yaxis,"y"),le=P.length/2,fe={};function V(Y,ee){var q=ee._id.charAt(0),oe=O["error_"+q];if(oe&&oe.visible&&(ee.type==="linear"||ee.type==="log")){for(var ae=X(oe),j={x:0,y:1}[q],Q={x:[0,1,2,3],y:[2,3,0,1]}[q],re=new Float64Array(4*le),ce=1/0,be=-1/0,Ae=0,De=0;Ae<le;Ae++,De+=4){var ze=Y[Ae];if(v(ze)){var Ze=P[Ae*2+j],at=ae(ze,Ae),nt=at[0],rt=at[1];if(v(nt)&&v(rt)){var st=ze-nt,Me=ze+rt;re[De+Q[0]]=Ze-ee.c2l(st),re[De+Q[1]]=ee.c2l(Me)-Ze,re[De+Q[2]]=0,re[De+Q[3]]=0,ce=Math.min(ce,ze-nt),be=Math.max(be,ze+rt)}}}fe[q]={positions:P,errors:re,_bnds:[ce,be]}}}return V(U,$),V(B,se),fe}function F(N,O,P,U){var B=O._length,X={},$;if(n.hasMarkers(O)){var se=P.font,le=P.align,fe=P.baseline;for(X.offset=new Array(B),$=0;$<B;$++){var V=U.sizes?U.sizes[$]:U.size,Y=t(se)?se[$].size:se.size,ee=t(le)?le.length>1?le[$]:le[0]:le,q=t(fe)?fe.length>1?fe[$]:fe[0]:fe,oe=m[ee],ae=m[q],j=V?V/.8+1:0,Q=-ae*j-ae*.5;X.offset[$]=[oe*j/Y,Q/Y]}}return X}G.exports={style:T,markerStyle:w,markerSelection:A,linePositions:L,errorBarPositions:z,textPosition:F}}}),jE=Xe({"src/traces/scattergl/scene_update.js"(Z,G){"use strict";var v=sa();G.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(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var n=v.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,c=e.glText,m=e.select2d,p=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 _=v.repeat([],e.count);_[l]=T[l],h.draw(_)}else p[l].length||h.draw(l);c[l]&&e.textOptions[l]&&c[l].render()}m&&m.draw(p),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||v.extendFlat(e,t),e}}}),uj=Xe({"src/traces/scattergl/calc.js"(Z,G){"use strict";var v=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=Hs().BADNUM,c=y0().TOO_MANY_POINTS;G.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,d=b>=c,u=b*2,y={},f,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(f=0;f<b;f++)P[f*2]=N[f]===h?NaN:N[f],P[f*2+1]=O[f]===h?NaN:O[f],U[f]=f;if(A.type==="log")for(f=0;f<u;f+=2)P[f]=A.c2l(P[f]);if(M.type==="log")for(f=1;f<u;f+=2)P[f]=M.c2l(P[f]);d&&A.type!=="log"&&M.type!=="log"?y.tree=v(P):y.ids=U,n(l,_);var B=p(l,g,_,P,N,O),X=s(l,g);a(w,_);var $;return d?B.marker&&($=B.marker.sizeAvg||Math.max(B.marker.size,3)):$=r(_,b),o(l,_,A,M,N,O,$),B.errorX&&m(_,A,B.errorX),B.errorY&&m(_,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 m(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 p(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=Xe({"src/traces/scattergl/edit_style.js"(Z,G){"use strict";var v=sa(),x=$n(),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],c=a.textSelectedOptions[n]||{},m=a.textUnselectedOptions[n]||{},p=v.extendFlat({},h),T,l;if(i.length||s.length){var _=c.color,w=m.color,A=h.color,M=v.isArrayOrTypedArray(A);for(p.color=new Array(r._length),T=0;T<i.length;T++)l=i[T],p.color[l]=_||(M?A[l]:A);for(T=0;T<s.length;T++){l=s[T];var g=M?A[l]:A;p.color[l]=w||(_?g:x.addOpacity(g,S))}}a.glText[n].update(p)}G.exports={styleTextSelection:E}}}),VE=Xe({"src/traces/scattergl/select.js"(Z,G){"use strict";var v=Fu(),x=qE().styleTextSelection;G.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,c=i.y,m=i._scene,p=i.index;if(!m)return a;var T=v.hasText(n),l=v.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(c[M])})):A.push(M);if(l){var g=m.scatter2d;if(!w.length&&!A.length){var b=new Array(m.count);b[p]=m.markerOptions[p],g.update.apply(g,b)}else if(!m.selectBatch[p].length&&!m.unselectBatch[p].length){var d=new Array(m.count);d[p]=m.markerUnselectedOptions[p],g.update.apply(g,d)}}return m.selectBatch[p]=w,m.unselectBatch[p]=A,T&&x(t),a}}}),cj=Xe({"src/traces/scattergl/base_index.js"(Z,G){"use strict";var v=pT();G.exports={moduleType:"trace",name:"scattergl",basePlotModule:Kf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:xx(),supplyDefaults:YU(),crossTraceDefaults:z5(),colorbar:pp(),formatLabels:KU(),calc:uj(),hoverPoints:v.hoverPoints,selectPoints:VE(),meta:{}}}}),fj=Xe({"node_modules/color-id/index.js"(Z,G){"use strict";var v=mx();G.exports=x,G.exports.to=x,G.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=v(t,0,255)&255,r=v(r,0,255)&255,o=v(o,0,255)&255,a=v(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=Xe({"node_modules/object-assign/index.js"(Z,G){"use strict";var v=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}}G.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(v){n=v(o);for(var h=0;h<n.length;h++)S.call(o,n[h])&&(a[n[h]]=o[n[h]])}}return a}}}),hj=Xe({"node_modules/glslify/browser.js"(Z,G){G.exports=function(v){typeof v=="string"&&(v=[v]);for(var x=[].slice.call(arguments,1),S=[],E=0;E<v.length-1;E++)S.push(v[E],x[E]||"");return S.push(v[E]),S.join("")}}}),GE=Xe({"node_modules/update-diff/index.js"(Z,G){"use strict";G.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}}}),pj=Xe({"node_modules/is-iexplorer/index.js"(Z,G){"use strict";G.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),mT=Xe({"node_modules/to-float32/index.js"(Z,G){"use strict";G.exports=S,G.exports.float32=G.exports.float=S,G.exports.fract32=G.exports.fract=x;var v=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):(v[0]=E,v[0])}}}),HE=Xe({"node_modules/regl-scatter2d/bundle.js"(Z,G){"use strict";function v(y,f){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,f===0){if(Object(R)!==R)return;P=!1}else for(;!(P=(L=F.call(R)).done)&&(O.push(L.value),O.length!==f);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,f){return e(y)||v(y,f)||r(y,f)||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,f){if(y){if(typeof y=="string")return o(y,f);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,f)}}function o(y,f){(f==null||f>y.length)&&(f=y.length);for(var R=0,L=new Array(f);R<f;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=fj(),c=vT(),m=ch(),p=hj(),T=Ev(),l=GE(),_=gg(),w=pj(),A=mT(),M=C1(),g=b;function b(y,f){var R=this;if(!(this instanceof b))return new b(y,f);typeof y=="function"?(f||(f={}),f.regl=y):(f=y,y=null),f&&f.length&&(f.positions=f),y=f.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"}),m(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(f);var $={uniforms:{constPointSize:!!f.constPointSize,opacity:y.prop("opacity"),paletteSize:function(V,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(V,Y){return Y.xAttr||{buffer:Y.positionBuffer,stride:8,offset:0}},y:function(V,Y){return Y.yAttr||{buffer:Y.positionBuffer,stride:8,offset:4}},xFract:function(V,Y){return Y.xAttr?{constant:[0,0]}:{buffer:Y.positionFractBuffer,stride:8,offset:0}},yFract:function(V,Y){return Y.yAttr?{constant:[0,0]}:{buffer:Y.positionFractBuffer,stride:8,offset:4}},size:function(V,Y){return Y.size.length?{buffer:Y.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(Y.size*255/R.maxSize)]}},borderSize:function(V,Y){return Y.borderSize.length?{buffer:Y.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(Y.borderSize*255/R.maxSize)]}},colorId:function(V,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(V,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(V,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"},se=m({},$);se.frag=p([`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;
}
}
`]),se.vert=p([`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(se);var le=m({},$);le.frag=p([`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;
}
`]),le.vert=p([`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&&(le.frag=le.frag.replace("smoothstep","smoothStep"),se.frag=se.frag.replace("smoothstep","smoothStep")),this.drawCircle=y(le)}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,f=arguments.length,R=new Array(f),L=0;L<f;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,f){var R=this.groups,L=R[y];if(typeof f=="number"&&(y=f,L=R[f],f=null),!!(L&&L.count&&L.opacity)){L.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,L,f));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,f)));z.length&&this.drawMarker(z)}},b.prototype.getMarkerDrawOptions=function(y,f,R){var L=f.range,z=f.tree,F=f.viewport,N=f.activation,O=f.selectionBuffer,P=f.count,U=this.regl;if(!z)return R?[m({},f,{markerTexture:this.markerTextures[y],activation:N[y],count:R.length,elements:R,offset:0})]:[m({},f,{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],se=$.data,le=new Uint8Array(P),fe=0;fe<R.length;fe++){var V=R[fe];le[V]=se?se[V]:1}O.subdata(le)}for(var Y=X.length;Y--;){var ee=x(X[Y],2),q=ee[0],oe=ee[1];B.push(m({},f,{markerTexture:this.markerTextures[y],activation:R?O:N[y],offset:q,count:oe-q}))}return B},b.prototype.update=function(){for(var y=this,f=arguments.length,R=new Array(f),L=0;L<f;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=m({},b.defaults,B)),B.positions&&!("marker"in B)&&(B.marker=$.marker,delete $.marker),B.marker&&!("positions"in B)&&(B.positions=$.positions,delete $.positions);var se=0,le=0;if(l($,B,[{snap:!0,size:function(rt,st){return rt==null&&(rt=b.defaults.size),se+=rt&&rt.length?1:0,rt},borderSize:function(rt,st){return rt==null&&(rt=b.defaults.borderSize),se+=rt&&rt.length?1:0,rt},opacity:parseFloat,color:function(rt,st){return rt==null&&(rt=b.defaults.color),rt=y.updateColor(rt),le++,rt},borderColor:function(rt,st){return rt==null&&(rt=b.defaults.borderColor),rt=y.updateColor(rt),le++,rt},bounds:function(rt,st,Me){return"range"in Me||(Me.range=null),rt},positions:function(rt,st,Me){var ye=st.snap,he=st.positionBuffer,Oe=st.positionFractBuffer,tt=st.selectionBuffer;if(rt.x||rt.y)return rt.x.length?st.xAttr={buffer:N.buffer(rt.x),offset:0,stride:4,count:rt.x.length}:st.xAttr={buffer:rt.x.buffer,offset:rt.x.offset*4||0,stride:(rt.x.stride||1)*4,count:rt.x.count},rt.y.length?st.yAttr={buffer:N.buffer(rt.y),offset:0,stride:4,count:rt.y.length}:st.yAttr={buffer:rt.y.buffer,offset:rt.y.offset*4||0,stride:(rt.y.stride||1)*4,count:rt.y.count},st.count=Math.max(st.xAttr.count,st.yAttr.count),rt;rt=_(rt,"float64");var ot=st.count=Math.floor(rt.length/2),Qe=st.bounds=ot?s(rt,2):null;if(!Me.range&&!st.range&&(delete st.range,Me.range=Qe),!Me.marker&&!st.marker&&(delete st.marker,Me.marker=null),ye&&(ye===!0||ot>ye)?st.tree=c(rt,{bounds:Qe}):ye&&ye.length&&(st.tree=ye),st.tree){var Pt={primitive:"points",usage:"static",data:st.tree,type:"uint32"};st.elements?st.elements(Pt):st.elements=N.elements(Pt)}var It=A.float32(rt);he({data:It,usage:"dynamic"});var qt=A.fract32(rt,It);return Oe({data:qt,usage:"dynamic"}),tt({data:new Uint8Array(ot),type:"uint8",usage:"stream"}),rt}},{marker:function(rt,st,Me){var ye=st.activation;if(ye.forEach(function(qt){return qt&&qt.destroy&&qt.destroy()}),ye.length=0,!rt||typeof rt[0]=="number"){var he=y.addMarker(rt);ye[he]=!0}else{for(var Oe=[],tt=0,ot=Math.min(rt.length,st.count);tt<ot;tt++){var Qe=y.addMarker(rt[tt]);Oe[Qe]||(Oe[Qe]=new Uint8Array(st.count)),Oe[Qe][tt]=1}for(var Pt=0;Pt<Oe.length;Pt++)if(Oe[Pt]){var It={data:Oe[Pt],type:"uint8",usage:"static"};ye[Pt]?ye[Pt](It):ye[Pt]=N.buffer(It),ye[Pt].data=Oe[Pt]}}return rt},range:function(rt,st,Me){var ye=st.bounds;if(ye)return rt||(rt=ye),st.scale=[1/(rt[2]-rt[0]),1/(rt[3]-rt[1])],st.translate=[-rt[0],-rt[1]],st.scaleFract=A.fract(st.scale),st.translateFract=A.fract(st.translate),rt},viewport:function(rt){var st=M(rt||[F.drawingBufferWidth,F.drawingBufferHeight]);return st}}]),se){var fe=$,V=fe.count,Y=fe.size,ee=fe.borderSize,q=fe.sizeBuffer,oe=new Uint8Array(V*2);if(Y.length||ee.length)for(var ae=0;ae<V;ae++)oe[ae*2]=Math.round((Y[ae]==null?Y:Y[ae])*255/O),oe[ae*2+1]=Math.round((ee[ae]==null?ee:ee[ae])*255/O);q({data:oe,usage:"dynamic"})}if(le){var j=$,Q=j.count,re=j.color,ce=j.borderColor,be=j.colorBuffer,Ae;if(y.tooManyColors){if(re.length||ce.length){Ae=new Uint8Array(Q*8);for(var De=0;De<Q;De++){var ze=re[De];Ae[De*8]=U[ze*4],Ae[De*8+1]=U[ze*4+1],Ae[De*8+2]=U[ze*4+2],Ae[De*8+3]=U[ze*4+3];var Ze=ce[De];Ae[De*8+4]=U[Ze*4],Ae[De*8+5]=U[Ze*4+1],Ae[De*8+6]=U[Ze*4+2],Ae[De*8+7]=U[Ze*4+3]}}}else if(re.length||ce.length){Ae=new Uint8Array(Q*4+2);for(var at=0;at<Q;at++)re[at]!=null&&(Ae[at*4]=re[at]%P,Ae[at*4+1]=Math.floor(re[at]/P)),ce[at]!=null&&(Ae[at*4+2]=ce[at]%P,Ae[at*4+3]=Math.floor(ce[at]/P))}be({data:Ae||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return $})}},b.prototype.addMarker=function(y){var f=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=f.length,L.push(y),f.push(R.texture({channels:1,data:F,radius:P,mag:"linear",min:"linear"})),z},b.prototype.updateColor=function(y){var f=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(f[B]==null){var X=R.length;f[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]=f[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 f=this.maxColors,R=this.paletteTexture,L=Math.ceil(y.length*.25/f);if(L>1){y=y.slice();for(var z=y.length*.25%f;z<L*f;z++)y.push(0,0,0,0)}R.height<L&&R.resize(f,L),R.subimage({width:Math.min(y.length*.25,f),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(f){return f&&f.destroy&&f.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 d=ch(),u=function(f,R){var L=new g(f,R),z=L.render.bind(L);return d(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};G.exports=u}}),dj=Xe({"node_modules/earcut/src/earcut.js"(Z,G){"use strict";G.exports=v,G.exports.default=v;function v(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 se,le,fe,V,Y,ee,q;if(U&&(X=a(N,O,X,P)),N.length>80*P){se=fe=N[0],le=V=N[1];for(var oe=P;oe<B;oe+=P)Y=N[oe],ee=N[oe+1],Y<se&&(se=Y),ee<le&&(le=ee),Y>fe&&(fe=Y),ee>V&&(V=ee);q=Math.max(fe-se,V-le),q=q!==0?32767/q:0}return E(X,$,P,se,le,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&&c(N,U,B,X);for(var se=N,le,fe;N.prev!==N.next;){if(le=N.prev,fe=N.next,X?t(N,U,B,X):e(N)){O.push(le.i/P|0),O.push(N.i/P|0),O.push(fe.i/P|0),L(N),N=fe.next,se=fe.next;continue}if(N=fe,N===se){$?$===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,se=O.y,le=P.y,fe=U.y,V=B<X?B<$?B:$:X<$?X:$,Y=se<le?se<fe?se:fe:le<fe?le:fe,ee=B>X?B>$?B:$:X>$?X:$,q=se>le?se>fe?se:fe:le>fe?le:fe,oe=U.next;oe!==O;){if(oe.x>=V&&oe.x<=ee&&oe.y>=Y&&oe.y<=q&&l(B,se,X,le,$,fe,oe.x,oe.y)&&w(oe.prev,oe,oe.next)>=0)return!1;oe=oe.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 se=B.x,le=X.x,fe=$.x,V=B.y,Y=X.y,ee=$.y,q=se<le?se<fe?se:fe:le<fe?le:fe,oe=V<Y?V<ee?V:ee:Y<ee?Y:ee,ae=se>le?se>fe?se:fe:le>fe?le:fe,j=V>Y?V>ee?V:ee:Y>ee?Y:ee,Q=p(q,oe,O,P,U),re=p(ae,j,O,P,U),ce=N.prevZ,be=N.nextZ;ce&&ce.z>=Q&&be&&be.z<=re;){if(ce.x>=q&&ce.x<=ae&&ce.y>=oe&&ce.y<=j&&ce!==B&&ce!==$&&l(se,V,le,Y,fe,ee,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0||(ce=ce.prevZ,be.x>=q&&be.x<=ae&&be.y>=oe&&be.y<=j&&be!==B&&be!==$&&l(se,V,le,Y,fe,ee,be.x,be.y)&&w(be.prev,be,be.next)>=0))return!1;be=be.nextZ}for(;ce&&ce.z>=Q;){if(ce.x>=q&&ce.x<=ae&&ce.y>=oe&&ce.y<=j&&ce!==B&&ce!==$&&l(se,V,le,Y,fe,ee,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0)return!1;ce=ce.prevZ}for(;be&&be.z<=re;){if(be.x>=q&&be.x<=ae&&be.y>=oe&&be.y<=j&&be!==B&&be!==$&&l(se,V,le,Y,fe,ee,be.x,be.y)&&w(be.prev,be,be.next)>=0)return!1;be=be.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 se=$.next.next;se!==$.prev;){if($.i!==se.i&&_($,se)){var le=f($,se);$=S($,$.next),le=S(le,le.next),E($,O,P,U,B,X,0),E(le,O,P,U,B,X,0);return}se=se.next}$=$.next}while($!==N)}function a(N,O,P,U){var B=[],X,$,se,le,fe;for(X=0,$=O.length;X<$;X++)se=O[X]*U,le=X<$-1?O[X+1]*U:N.length,fe=x(N,se,le,U,!1),fe===fe.next&&(fe.steiner=!0),B.push(T(fe));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=f(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 se=P.x+(B-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(se<=U&&se>X&&(X=se,$=P.x<P.next.x?P:P.next,se===U))return $}P=P.next}while(P!==O);if(!$)return null;var le=$,fe=$.x,V=$.y,Y=1/0,ee;P=$;do U>=P.x&&P.x>=fe&&U!==P.x&&l(B<V?U:X,B,fe,V,B<V?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!==le);return $}function h(N,O){return w(N.prev,N,O.prev)<0&&w(O.next,N,N.next)<0}function c(N,O,P,U){var B=N;do B.z===0&&(B.z=p(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,m(B)}function m(N){var O,P,U,B,X,$,se,le,fe=1;do{for(P=N,N=null,X=null,$=0;P;){for($++,U=P,se=0,O=0;O<fe&&(se++,U=U.nextZ,!!U);O++);for(le=fe;se>0||le>0&&U;)se!==0&&(le===0||!U||P.z<=U.z)?(B=P,P=P.nextZ,se--):(B=U,U=U.nextZ,le--),X?X.nextZ=B:N=B,B.prevZ=X,X=B;P=U}X.nextZ=null,fe*=2}while($>1);return N}function p(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,$,se){return(B-$)*(O-se)>=(N-$)*(X-se)&&(N-$)*(U-se)>=(P-$)*(O-se)&&(P-$)*(X-se)>=(B-$)*(U-se)}function _(N,O){return N.next.i!==O.i&&N.prev.i!==O.i&&!d(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)),se=b(w(P,U,O));return!!(B!==X&&$!==se||B===0&&g(N,P,O)||X===0&&g(N,U,O)||$===0&&g(P,N,U)||se===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 d(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 f(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}v.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 se=0,le=O.length;se<le;se++){var fe=O[se]*P,V=se<le-1?O[se+1]*P:N.length;$-=Math.abs(F(N,fe,V,P))}var Y=0;for(se=0;se<U.length;se+=3){var ee=U[se]*P,q=U[se+1]*P,oe=U[se+2]*P;Y+=Math.abs((N[ee]-N[oe])*(N[q+1]-N[ee+1])-(N[ee]-N[q])*(N[oe+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}v.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}}}),vj=Xe({"node_modules/array-normalize/index.js"(Z,G){"use strict";var v=mg();G.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=v(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}}}),mj=Xe({"node_modules/es6-weak-map/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v,x;if(typeof WeakMap!="function")return!1;try{v=new WeakMap([[x={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(v)!=="[object WeakMap]"||typeof v.set!="function"||v.set({},1)!==v||typeof v.delete!="function"||typeof v.has!="function"||v.get(x)!=="one")}}}),gj=Xe({"node_modules/es5-ext/function/noop.js"(Z,G){"use strict";G.exports=function(){}}}),_0=Xe({"node_modules/es5-ext/object/is-value.js"(Z,G){"use strict";var v=gj()();G.exports=function(x){return x!==v&&x!==null}}}),WE=Xe({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(Z,G){"use strict";var v=Object.create,x=Object.getPrototypeOf,S={};G.exports=function(){var E=Object.setPrototypeOf,e=arguments[0]||v;return typeof E!="function"?!1:x(E(e(null),S))===S}}}),XE=Xe({"node_modules/es5-ext/object/is-object.js"(Z,G){"use strict";var v=_0(),x={function:!0,object:!0};G.exports=function(S){return v(S)&&x[typeof S]||!1}}}),rm=Xe({"node_modules/es5-ext/object/valid-value.js"(Z,G){"use strict";var v=_0();G.exports=function(x){if(!v(x))throw new TypeError("Cannot use null or undefined");return x}}}),yj=Xe({"node_modules/es5-ext/object/create.js"(Z,G){"use strict";var v=Object.create,x;WE()()||(x=ZE()),G.exports=function(){var S,E,e;return!x||x.level!==1?v:(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 v(t===null?S:t,r)})}()}}),ZE=Xe({"node_modules/es5-ext/object/set-prototype-of/shim.js"(Z,G){"use strict";var v=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||v(o))return r;throw new TypeError("Prototype must be null or an object")},G.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)}()),yj()}}),gT=Xe({"node_modules/es5-ext/object/set-prototype-of/index.js"(Z,G){"use strict";G.exports=WE()()?Object.setPrototypeOf:ZE()}}),_j=Xe({"node_modules/es5-ext/object/valid-object.js"(Z,G){"use strict";var v=XE();G.exports=function(x){if(!v(x))throw new TypeError(x+" is not an Object");return x}}}),xj=Xe({"node_modules/es5-ext/string/random-uniq.js"(Z,G){"use strict";var v=Object.create(null),x=Math.random;G.exports=function(){var S;do S=x().toString(36).slice(2);while(v[S]);return S}}}),_g=Xe({"node_modules/type/value/is.js"(Z,G){"use strict";var v=void 0;G.exports=function(x){return x!==v&&x!==null}}}),yT=Xe({"node_modules/type/object/is.js"(Z,G){"use strict";var v=_g(),x={object:!0,function:!0,undefined:!0};G.exports=function(S){return v(S)?hasOwnProperty.call(x,typeof S):!1}}}),bj=Xe({"node_modules/type/prototype/is.js"(Z,G){"use strict";var v=yT();G.exports=function(x){if(!v(x))return!1;try{return x.constructor?x.constructor.prototype===x:!1}catch{return!1}}}}),wj=Xe({"node_modules/type/function/is.js"(Z,G){"use strict";var v=bj();G.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!v(x)}}}),YE=Xe({"node_modules/type/plain-function/is.js"(Z,G){"use strict";var v=wj(),x=/^\s*class[\s{/}]/,S=Function.prototype.toString;G.exports=function(E){return!(!v(E)||x.test(S.call(E)))}}}),Tj=Xe({"node_modules/es5-ext/object/assign/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v=Object.assign,x;return typeof v!="function"?!1:(x={foo:"raz"},v(x,{bar:"dwa"},{trzy:"trzy"}),x.foo+x.bar+x.trzy==="razdwatrzy")}}}),Aj=Xe({"node_modules/es5-ext/object/keys/is-implemented.js"(Z,G){"use strict";G.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),Sj=Xe({"node_modules/es5-ext/object/keys/shim.js"(Z,G){"use strict";var v=_0(),x=Object.keys;G.exports=function(S){return x(v(S)?Object(S):S)}}}),Mj=Xe({"node_modules/es5-ext/object/keys/index.js"(Z,G){"use strict";G.exports=Aj()()?Object.keys:Sj()}}),Ej=Xe({"node_modules/es5-ext/object/assign/shim.js"(Z,G){"use strict";var v=Mj(),x=rm(),S=Math.max;G.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],v(e).forEach(a);if(t!==void 0)throw t;return E}}}),_T=Xe({"node_modules/es5-ext/object/assign/index.js"(Z,G){"use strict";G.exports=Tj()()?Object.assign:Ej()}}),KE=Xe({"node_modules/es5-ext/object/normalize-options.js"(Z,G){"use strict";var v=_0(),x=Array.prototype.forEach,S=Object.create,E=function(e,t){var r;for(r in e)t[r]=e[r]};G.exports=function(e){var t=S(null);return x.call(arguments,function(r){v(r)&&E(Object(r),t)}),t}}}),kj=Xe({"node_modules/es5-ext/string/#/contains/is-implemented.js"(Z,G){"use strict";var v="razdwatrzy";G.exports=function(){return typeof v.contains!="function"?!1:v.contains("dwa")===!0&&v.contains("foo")===!1}}}),Cj=Xe({"node_modules/es5-ext/string/#/contains/shim.js"(Z,G){"use strict";var v=String.prototype.indexOf;G.exports=function(x){return v.call(this,x,arguments[1])>-1}}}),JE=Xe({"node_modules/es5-ext/string/#/contains/index.js"(Z,G){"use strict";G.exports=kj()()?String.prototype.contains:Cj()}}),am=Xe({"node_modules/d/index.js"(Z,G){"use strict";var v=_g(),x=YE(),S=_T(),E=KE(),e=JE(),t=G.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],v(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],v(o)?x(o)?v(a)?x(a)||(s=a,a=void 0):a=void 0:(s=o,o=a=void 0):o=void 0,v(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=Xe({"node_modules/es5-ext/function/is-arguments.js"(Z,G){"use strict";var v=Object.prototype.toString,x=v.call(function(){return arguments}());G.exports=function(S){return v.call(S)===x}}}),wx=Xe({"node_modules/es5-ext/string/is-string.js"(Z,G){"use strict";var v=Object.prototype.toString,x=v.call("");G.exports=function(S){return typeof S=="string"||S&&typeof S=="object"&&(S instanceof String||v.call(S)===x)||!1}}}),Lj=Xe({"node_modules/ext/global-this/is-implemented.js"(Z,G){"use strict";G.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),Pj=Xe({"node_modules/ext/global-this/implementation.js"(Z,G){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};G.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}}()}}),Tx=Xe({"node_modules/ext/global-this/index.js"(Z,G){"use strict";G.exports=Lj()()?globalThis:Pj()}}),Ij=Xe({"node_modules/es6-symbol/is-implemented.js"(Z,G){"use strict";var v=Tx(),x={object:!0,symbol:!0};G.exports=function(){var S=v.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])}}}),Rj=Xe({"node_modules/es6-symbol/is-symbol.js"(Z,G){"use strict";G.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),$E=Xe({"node_modules/es6-symbol/validate-symbol.js"(Z,G){"use strict";var v=Rj();G.exports=function(x){if(!v(x))throw new TypeError(x+" is not a symbol");return x}}}),Dj=Xe({"node_modules/es6-symbol/lib/private/generate-name.js"(Z,G){"use strict";var v=am(),x=Object.create,S=Object.defineProperty,E=Object.prototype,e=x(null);G.exports=function(t){for(var r=0,o,a;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,o="@@"+t,S(E,o,v.gs(null,function(n){a||(a=!0,S(this,o,v(n)),a=!1)})),o}}}),zj=Xe({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(Z,G){"use strict";var v=am(),x=Tx().Symbol;G.exports=function(S){return Object.defineProperties(S,{hasInstance:v("",x&&x.hasInstance||S("hasInstance")),isConcatSpreadable:v("",x&&x.isConcatSpreadable||S("isConcatSpreadable")),iterator:v("",x&&x.iterator||S("iterator")),match:v("",x&&x.match||S("match")),replace:v("",x&&x.replace||S("replace")),search:v("",x&&x.search||S("search")),species:v("",x&&x.species||S("species")),split:v("",x&&x.split||S("split")),toPrimitive:v("",x&&x.toPrimitive||S("toPrimitive")),toStringTag:v("",x&&x.toStringTag||S("toStringTag")),unscopables:v("",x&&x.unscopables||S("unscopables"))})}}}),Fj=Xe({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(Z,G){"use strict";var v=am(),x=$E(),S=Object.create(null);G.exports=function(E){return Object.defineProperties(E,{for:v(function(e){return S[e]?S[e]:S[e]=E(String(e))}),keyFor:v(function(e){var t;x(e);for(t in S)if(S[t]===e)return t})})}}}),Oj=Xe({"node_modules/es6-symbol/polyfill.js"(Z,G){"use strict";var v=am(),x=$E(),S=Tx().Symbol,E=Dj(),e=zj(),t=Fj(),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(c){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(c)},G.exports=n=function h(c){var m;if(this instanceof h)throw new TypeError("Symbol is not a constructor");return s?S(c):(m=r(i.prototype),c=c===void 0?"":String(c),o(m,{__description__:v("",c),__name__:v("",E(c))}))},e(n),t(n),o(i.prototype,{constructor:v(n),toString:v("",function(){return this.__name__})}),o(n.prototype,{toString:v(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:v(function(){return x(this)})}),a(n.prototype,n.toPrimitive,v("",function(){var h=x(this);return typeof h=="symbol"?h:h.toString()})),a(n.prototype,n.toStringTag,v("c","Symbol")),a(i.prototype,n.toStringTag,v("c",n.prototype[n.toStringTag])),a(i.prototype,n.toPrimitive,v("c",n.prototype[n.toPrimitive]))}}),x0=Xe({"node_modules/es6-symbol/index.js"(Z,G){"use strict";G.exports=Ij()()?Tx().Symbol:Oj()}}),Bj=Xe({"node_modules/es5-ext/array/#/clear.js"(Z,G){"use strict";var v=rm();G.exports=function(){return v(this).length=0,this}}}),L1=Xe({"node_modules/es5-ext/object/valid-callable.js"(Z,G){"use strict";G.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),Nj=Xe({"node_modules/type/string/coerce.js"(Z,G){"use strict";var v=_g(),x=yT(),S=Object.prototype.toString;G.exports=function(E){if(!v(E))return null;if(x(E)){var e=E.toString;if(typeof e!="function"||e===S)return null}try{return""+E}catch{return null}}}}),Uj=Xe({"node_modules/type/lib/safe-to-string.js"(Z,G){"use strict";G.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),jj=Xe({"node_modules/type/lib/to-short-string.js"(Z,G){"use strict";var v=Uj(),x=/[\n\r\u2028\u2029]/g;G.exports=function(S){var E=v(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=Xe({"node_modules/type/lib/resolve-exception.js"(Z,G){"use strict";var v=_g(),x=yT(),S=Nj(),E=jj(),e=function(t,r){return t.replace("%v",E(r))};G.exports=function(t,r,o){if(!x(o))throw new TypeError(e(r,t));if(!v(t)){if("default"in o)return o.default;if(o.isOptional)return null}var a=S(o.errorMessage);throw v(a)||(a=r),new TypeError(e(a,t))}}}),qj=Xe({"node_modules/type/value/ensure.js"(Z,G){"use strict";var v=QE(),x=_g();G.exports=function(S){return x(S)?S:v(S,"Cannot use %v",arguments[1])}}}),Vj=Xe({"node_modules/type/plain-function/ensure.js"(Z,G){"use strict";var v=QE(),x=YE();G.exports=function(S){return x(S)?S:v(S,"%v is not a plain function",arguments[1])}}}),Gj=Xe({"node_modules/es5-ext/array/from/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v=Array.from,x,S;return typeof v!="function"?!1:(x=["raz","dwa"],S=v(x),!!(S&&S!==x&&S[1]==="dwa"))}}}),Hj=Xe({"node_modules/es5-ext/function/is-function.js"(Z,G){"use strict";var v=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);G.exports=function(S){return typeof S=="function"&&x(v.call(S))}}}),Wj=Xe({"node_modules/es5-ext/math/sign/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),Xj=Xe({"node_modules/es5-ext/math/sign/shim.js"(Z,G){"use strict";G.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),Zj=Xe({"node_modules/es5-ext/math/sign/index.js"(Z,G){"use strict";G.exports=Wj()()?Math.sign:Xj()}}),Yj=Xe({"node_modules/es5-ext/number/to-integer.js"(Z,G){"use strict";var v=Zj(),x=Math.abs,S=Math.floor;G.exports=function(E){return isNaN(E)?0:(E=Number(E),E===0||!isFinite(E)?E:v(E)*S(x(E)))}}}),Kj=Xe({"node_modules/es5-ext/number/to-pos-integer.js"(Z,G){"use strict";var v=Yj(),x=Math.max;G.exports=function(S){return x(0,v(S))}}}),Jj=Xe({"node_modules/es5-ext/array/from/shim.js"(Z,G){"use strict";var v=x0().iterator,x=bx(),S=Hj(),E=Kj(),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;G.exports=function(h){var c=arguments[1],m=arguments[2],p,T,l,_,w,A,M,g,b,d;if(h=Object(t(h)),r(c)&&e(c),!this||this===Array||!S(this)){if(!c){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 p=this;if(!a(h)){if((b=h[v])!==void 0){for(M=e(b).call(h),p&&(_=new p),g=M.next(),T=0;!g.done;)d=c?n.call(c,m,g.value,T):g.value,p?(i.value=d,s(_,T,i)):_[T]=d,g=M.next(),++T;w=T}else if(o(h)){for(w=h.length,p&&(_=new p),T=0,l=0;T<w;++T)d=h[T],T+1<w&&(A=d.charCodeAt(0),A>=55296&&A<=56319&&(d+=h[++T])),d=c?n.call(c,m,d,l):d,p?(i.value=d,s(_,l,i)):_[l]=d,++l;w=l}}if(w===void 0)for(w=E(h.length),p&&(_=new p(w)),T=0;T<w;++T)d=c?n.call(c,m,h[T],T):h[T],p?(i.value=d,s(_,T,i)):_[T]=d;return p&&(i.value=null,_.length=w),_}}}),$j=Xe({"node_modules/es5-ext/array/from/index.js"(Z,G){"use strict";G.exports=Gj()()?Array.from:Jj()}}),Qj=Xe({"node_modules/es5-ext/object/copy.js"(Z,G){"use strict";var v=$j(),x=_T(),S=rm();G.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?v(t,function(a){(r.ensure||a in E)&&(o[a]=E[a])}):x(o,E),o}}}),eq=Xe({"node_modules/es5-ext/object/_iterate.js"(Z,G){"use strict";var v=L1(),x=rm(),S=Function.prototype.bind,E=Function.prototype.call,e=Object.keys,t=Object.prototype.propertyIsEnumerable;G.exports=function(r,o){return function(a,n){var i,s=arguments[2],h=arguments[3];return a=Object(x(a)),v(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(c,m){return t.call(a,c)?E.call(n,s,a[c],c,a,m):o})}}}}),tq=Xe({"node_modules/es5-ext/object/for-each.js"(Z,G){"use strict";G.exports=eq()("forEach")}}),rq=Xe({"node_modules/es5-ext/object/map.js"(Z,G){"use strict";var v=L1(),x=tq(),S=Function.prototype.call;G.exports=function(E,e){var t={},r=arguments[2];return v(e),x(E,function(o,a,n,i){t[a]=S.call(e,r,o,a,n,i)}),t}}}),aq=Xe({"node_modules/d/auto-bind.js"(Z,G){"use strict";var v=_g(),x=qj(),S=Vj(),E=Qj(),e=KE(),t=rq(),r=Function.prototype.bind,o=Object.defineProperty,a=Object.prototype.hasOwnProperty,n;n=function(i,s,h){var c=x(s)&&S(s.value),m;return m=E(s),delete m.writable,delete m.value,m.get=function(){return!h.overwriteDefinition&&a.call(this,i)?c:(s.value=r.call(c,h.resolveContext?h.resolveContext(this):this),o(this,i,s),this[i])},m},G.exports=function(i){var s=e(arguments[1]);return v(s.resolveContext)&&S(s.resolveContext),t(i,function(h,c){return n(c,h,s)})}}}),e6=Xe({"node_modules/es6-iterator/index.js"(Z,G){"use strict";var v=Bj(),x=_T(),S=L1(),E=rm(),e=am(),t=aq(),r=x0(),o=Object.defineProperty,a=Object.defineProperties,n;G.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,c){h>i&&(this.__redo__[c]=--h)},this)))}),_onClear:e(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),o(n.prototype,r.iterator,e(function(){return this}))}}),iq=Xe({"node_modules/es6-iterator/array.js"(Z,G){"use strict";var v=gT(),x=JE(),S=am(),E=x0(),e=e6(),t=Object.defineProperty,r;r=G.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))},v&&v(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"))}}),nq=Xe({"node_modules/es6-iterator/string.js"(Z,G){"use strict";var v=gT(),x=am(),S=x0(),E=e6(),e=Object.defineProperty,t;t=G.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))},v&&v(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"))}}),oq=Xe({"node_modules/es6-iterator/is-iterable.js"(Z,G){"use strict";var v=bx(),x=_0(),S=wx(),E=x0().iterator,e=Array.isArray;G.exports=function(t){return x(t)?e(t)||S(t)||v(t)?!0:typeof t[E]=="function":!1}}}),sq=Xe({"node_modules/es6-iterator/valid-iterable.js"(Z,G){"use strict";var v=oq();G.exports=function(x){if(!v(x))throw new TypeError(x+" is not iterable");return x}}}),t6=Xe({"node_modules/es6-iterator/get.js"(Z,G){"use strict";var v=bx(),x=wx(),S=iq(),E=nq(),e=sq(),t=x0().iterator;G.exports=function(r){return typeof e(r)[t]=="function"?r[t]():v(r)?new S(r):x(r)?new E(r):new S(r)}}}),lq=Xe({"node_modules/es6-iterator/for-of.js"(Z,G){"use strict";var v=bx(),x=L1(),S=wx(),E=t6(),e=Array.isArray,t=Function.prototype.call,r=Array.prototype.some;G.exports=function(o,a){var n,i=arguments[2],s,h,c,m,p,T,l;if(e(o)||v(o)?n="array":S(o)?n="string":o=E(o),x(a),h=function(){c=!0},n==="array"){r.call(o,function(_){return t.call(a,i,_,h),c});return}if(n==="string"){for(p=o.length,m=0;m<p&&(T=o[m],m+1<p&&(l=T.charCodeAt(0),l>=55296&&l<=56319&&(T+=o[++m])),t.call(a,i,T,h),!c);++m);return}for(s=o.next();!s.done;){if(t.call(a,i,s.value,h),c)return;s=o.next()}}}}),uq=Xe({"node_modules/es6-weak-map/is-native-implemented.js"(Z,G){"use strict";G.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),cq=Xe({"node_modules/es6-weak-map/polyfill.js"(Z,G){"use strict";var v=_0(),x=gT(),S=_j(),E=rm(),e=xj(),t=am(),r=t6(),o=lq(),a=x0().toStringTag,n=uq(),i=Array.isArray,s=Object.defineProperty,h=Object.prototype.hasOwnProperty,c=Object.getPrototypeOf,m;G.exports=m=function(){var p=arguments[0],T;if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return T=n&&x&&WeakMap!==m?x(new WeakMap,c(this)):this,v(p)&&(i(p)||(p=r(p))),s(T,"__weakMapData__",t("c","$weakMap$"+e())),p&&o(p,function(l){E(l),T.set(l[0],l[1])}),T},n&&(x&&x(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:t(m)})),Object.defineProperties(m.prototype,{delete:t(function(p){return h.call(S(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:t(function(p){if(h.call(S(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:t(function(p){return h.call(S(p),this.__weakMapData__)}),set:t(function(p,T){return s(S(p),this.__weakMapData__,t("c",T)),this}),toString:t(function(){return"[object WeakMap]"})}),s(m.prototype,a,t("c","WeakMap"))}}),r6=Xe({"node_modules/es6-weak-map/index.js"(Z,G){"use strict";G.exports=mj()()?WeakMap:cq()}}),fq=Xe({"node_modules/array-find-index/index.js"(Z,G){"use strict";G.exports=function(v,x,S){if(typeof Array.prototype.findIndex=="function")return v.findIndex(x,S);if(typeof x!="function")throw new TypeError("predicate must be a function");var E=Object(v),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=Xe({"node_modules/regl-line2d/index.js"(Z,G){"use strict";var v=d0(),x=mg(),S=ch(),E=Ev(),e=gg(),t=dj(),r=vj(),{float32:o,fract32:a}=mT(),n=r6(),i=C1(),s=fq(),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.;
}
`,c=`
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;
}
`,m=`
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;
}
`,p=`
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;
}
`;G.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:c,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:m,frag:p,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,d)=>{let u=this.passes[d];if(b!==void 0){if(b===null){this.passes[d]=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[d]=u={id:d,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,d<_.maxLines&&(u.depth=2*(_.maxLines-1-d%_.maxLines)/_.maxLines-1)),b.join!=null&&(u.join=b.join),b.hole!=null&&(u.hole=b.hole),b.fill!=null&&(u.fill=b.fill?v(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 se=R[B*2],le=R[B*2+1];isNaN(se)||isNaN(le)||se==null||le==null?(se=R[U*2],le=R[U*2+1],P[B]=U):U=B,O[X++]=se,O[X++]=le}if(b.splitNull){u.count-1 in P||(P[u.count]=u.count-1);let B=Object.keys(P).map(Number).sort((le,fe)=>le-fe),X=[],$=0,se=u.hole!=null?u.hole[0]:null;if(se!=null){let le=s(B,fe=>fe>=se);B=B.slice(0,le),B.push(se)}for(let le=0;le<B.length;le++){let fe=O.slice($*2,B[le]*2).concat(se?O.slice(se*2):[]),V=(u.hole||[]).map(ee=>ee-se+(B[le]-$)),Y=t(fe,V);Y=Y.map(ee=>ee+$+(ee+$<B[le]?0:se-B[le])),X.push(...Y),$=B[le]+1}for(let le=0,fe=X.length;le<fe;le++)P[X[le]]!=null&&(X[le]=P[X[le]]);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 f=a(N,y);u.positionFractBuffer(f)}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=v(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=v(L[F],"uint8");z.set(N,F*4)}z.set(v(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 d=this.passes[b];d&&(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.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}}}),hq=Xe({"node_modules/regl-error2d/index.js"(Z,G){"use strict";var v=mg(),x=d0(),S=GE(),E=Ev(),e=ch(),t=gg(),{float32:r,fract32:o}=mT();G.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,c,m,p,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)}),m=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=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}),d(s),c=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,f)=>[f.viewport.x,f.viewport.y,y.viewportWidth,y.viewportHeight]},attributes:{color:{buffer:T,offset:(y,f)=>f.offset*4,divisor:1},position:{buffer:m,offset:(y,f)=>f.offset*8,divisor:1},positionFract:{buffer:p,offset:(y,f)=>f.offset*8,divisor:1},error:{buffer:l,offset:(y,f)=>f.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:d,draw:g,destroy:u,regl:i,gl:h,canvas:h.canvas,groups:A}),M;function M(y){y?d(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((f,R)=>{if(f){if(y&&(y[R]?f.draw=!0:f.draw=!1),!f.draw){f.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],c(y),y.after&&y.after(y))}function d(y){if(!y)return;y.length!=null?typeof y[0]=="number"&&(y=[{positions:y}]):Array.isArray(y)||(y=[y]);let f=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=v(P,2),U.offset=f,f+=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 se=0;se<B;se++)P[se]=$}if(P.length<B)throw Error("Not enough colors");let X=new Uint8Array(B*4);for(let $=0;$<B;$++){let se=x(P[$],"uint8");X.set(se,$*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}),f||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:se,color:le,errors:fe}=U;$&&(O.set(le,se*4),P.set(fe,se*4),N.set(X,se*2))});var L=r(N);m(L);var z=o(N,L);p(z),T(O),l(P)}}function u(){m.destroy(),p.destroy(),T.destroy(),l.destroy(),_.destroy()}}}}),pq=Xe({"node_modules/unquote/index.js"(Z,G){var v=/[\'\"]/;G.exports=function(S){return S?(v.test(S.charAt(0))&&(S=S.substr(1)),v.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=Xe({"node_modules/css-global-keywords/index.json"(Z,G){G.exports=["inherit","initial","unset"]}}),n6=Xe({"node_modules/css-system-font-keywords/index.json"(Z,G){G.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=Xe({"node_modules/css-font-weight-keywords/index.json"(Z,G){G.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),s6=Xe({"node_modules/css-font-style-keywords/index.json"(Z,G){G.exports=["normal","italic","oblique"]}}),l6=Xe({"node_modules/css-font-stretch-keywords/index.json"(Z,G){G.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),dq=Xe({"node_modules/parenthesis/index.js"(Z,G){"use strict";function v(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("")),c=[];function m(p,T,l){var _=t.push(p.slice(s[0].length,-s[1].length))-1;return c.push(_),o+_+o}t.forEach(function(p,T){for(var l,_=0;p!=l;)if(l=p,p=p.replace(h,m),_++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=p}),c=c.reverse(),t=t.map(function(p){return c.forEach(function(T){p=p.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),p})});var n=new RegExp("\\"+o+"([0-9]+)\\"+o);function i(s,h,c){for(var m=[],p,T=0;p=n.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,p.index)),m.push(i(h[p[1]],h)),s=s.slice(p.index+p[0].length)}return m.push(s),m}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,c){return Array.isArray(c)&&(c=c.reduce(s,"")),h+c},"");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):v(E,e)}S.parse=v,S.stringify=x,G.exports=S}}),vq=Xe({"node_modules/string-split-by/index.js"(Z,G){"use strict";var v=dq();G.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=v.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]=v.stringify(t,{flat:!0});return o}}}),mq=Xe({"node_modules/css-font-size-keywords/index.json"(Z,G){G.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),u6=Xe({"node_modules/css-font/lib/util.js"(Z,G){"use strict";var v=mq();G.exports={isSize:function(S){return/^[\d\.]/.test(S)||S.indexOf("/")!==-1||v.indexOf(S)!==-1}}}}),gq=Xe({"node_modules/css-font/parse.js"(Z,G){"use strict";var v=pq(),x=i6(),S=n6(),E=o6(),e=s6(),t=l6(),r=vq(),o=u6().isSize;G.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"]},c=r(s,/\s+/),m;m=c.shift();){if(x.indexOf(m)!==-1)return["style","variant","weight","stretch"].forEach(function(T){h[T]=m}),a[s]=h;if(e.indexOf(m)!==-1){h.style=m;continue}if(m==="normal"||m==="small-caps"){h.variant=m;continue}if(t.indexOf(m)!==-1){h.stretch=m;continue}if(E.indexOf(m)!==-1){h.weight=m;continue}if(o(m)){var p=r(m,"/");if(h.size=p[0],p[1]!=null?h.lineHeight=i(p[1]):c[0]==="/"&&(c.shift(),h.lineHeight=i(c.shift())),!c.length)throw new Error("Missing required font-family.");return h.family=r(c.join(" "),/\s*,\s*/).map(v),a[s]=h}throw new Error("Unknown or unsupported font token: "+m)}throw new Error("Missing required font-size.")}function i(s){var h=parseFloat(s);return h.toString()===s?h:s}}}),c6=Xe({"node_modules/css-font/stringify.js"(Z,G){"use strict";var v=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"};G.exports=function(c){if(c=v(c,{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"}),c.system)return c.system&&i(c.system,E),c.system;if(i(c.style,t),i(c.variant,o),i(c.weight,e),i(c.stretch,r),c.size==null&&(c.size=n.size),typeof c.size=="number"&&(c.size+="px"),!x)throw Error("Bad size value `"+c.size+"`");c.family||(c.family=n.family),Array.isArray(c.family)&&(c.family.length||(c.family=[n.family]),c.family=c.family.map(function(p){return a[p]?p:'"'+p+'"'}).join(", "));var m=[];return m.push(c.style),c.variant!==c.style&&m.push(c.variant),c.weight!==c.variant&&c.weight!==c.style&&m.push(c.weight),c.stretch!==c.weight&&c.stretch!==c.variant&&c.stretch!==c.style&&m.push(c.stretch),m.push(c.size+(c.lineHeight==null||c.lineHeight==="normal"||c.lineHeight+""=="1"?"":"/"+c.lineHeight)),m.push(c.family),m.filter(Boolean).join(" ")};function i(h,c){if(h&&!c[h]&&!S[h])throw Error("Unknown keyword `"+h+"`");return h}function s(h){for(var c={},m=0;m<h.length;m++)c[h[m]]=1;return c}}}),yq=Xe({"node_modules/css-font/index.js"(Z,G){"use strict";G.exports={parse:gq(),stringify:c6()}}}),_q=Xe({"node_modules/regl/dist/regl.unchecked.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?G.exports=x():v.createREGL=x()})(Z,function(){"use strict";var v=function(it,Zt){for(var fr=Object.keys(Zt),oa=0;oa<fr.length;++oa)it[fr[oa]]=Zt[fr[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),fr=it.charAt(it.length-1);if(it.length>1&&Zt===fr&&(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 ma=[],_a=0;_a<wa.length;++_a)ma=ma.concat(o(wa[_a]));return ma}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(fr,oa){return s(fr,Zt+"["+oa+"]")}));if(it instanceof t)return it}var h={DynamicVariable:t,define:n,isDynamic:i,unbox:s,accessor:a},c={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},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function p(){var it={"":0},Zt=[""];return{id:function(fr){var oa=it[fr];return oa||(oa=it[fr]=Zt.length,Zt.push(fr),oa)},str:function(fr){return Zt[fr]}}}function T(it,Zt,fr){var oa=document.createElement("canvas");v(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",v(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=fr*Ya,oa.height=fr*bi}var ma;it!==document.body&&typeof ResizeObserver=="function"?(ma=new ResizeObserver(function(){setTimeout(wa)}),ma.observe(it)):window.addEventListener("resize",wa,!1);function _a(){ma?ma.disconnect():window.removeEventListener("resize",wa),it.removeChild(oa)}return wa(),{canvas:oa,onDestroy:_a}}function l(it,Zt){function fr(oa){try{return it.getContext(oa,Zt)}catch{return null}}return fr("webgl")||fr("experimental-webgl")||fr("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||{},fr,oa,wa,ma,_a={},Ya=[],bi=[],yi=typeof window>"u"?1:window.devicePixelRatio,si=!1,yn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?fr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?fr=Zt:w(Zt)?(ma=Zt,wa=ma.canvas):("gl"in Zt?ma=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(_a=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&&(yn=Zt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?wa=fr:oa=fr),!ma){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}_a.premultipliedAlpha===void 0&&(_a.premultipliedAlpha=!0),ma=l(wa,_a)}return ma?{gl:ma,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:yn,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 fr={};function oa(_a){var Ya=_a.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa<Zt.extensions.length;++wa){var ma=Zt.extensions[wa];if(!oa(ma))return Zt.onDestroy(),Zt.onDone('"'+ma+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Zt.optionalExtensions.forEach(oa),{extensions:fr,restore:function(){Object.keys(fr).forEach(function(_a){if(fr[_a]&&!oa(_a))throw new Error("(regl): error restoring extension "+_a)})}}}function d(it,Zt){for(var fr=Array(it),oa=0;oa<it;++oa)fr[oa]=Zt(oa);return fr}var u=5120,y=5121,f=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,fr;return Zt=(it>65535)<<4,it>>>=Zt,fr=(it>255)<<3,it>>>=fr,Zt|=fr,fr=(it>15)<<2,it>>>=fr,Zt|=fr,fr=(it>3)<<1,it>>>=fr,Zt|=fr,Zt|it>>1}function P(){var it=d(8,function(){return[]});function Zt(ma){var _a=N(ma),Ya=it[O(_a)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(_a)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,_a){var Ya=null;switch(ma){case u:Ya=new Int8Array(Zt(_a),0,_a);break;case y:Ya=new Uint8Array(Zt(_a),0,_a);break;case f:Ya=new Int16Array(Zt(2*_a),0,_a);break;case R:Ya=new Uint16Array(Zt(2*_a),0,_a);break;case L:Ya=new Int32Array(Zt(4*_a),0,_a);break;case z:Ya=new Uint32Array(Zt(4*_a),0,_a);break;case F:Ya=new Float32Array(Zt(4*_a),0,_a);break;default:return null}return Ya.length!==_a?Ya.subarray(0,_a):Ya}function wa(ma){fr(ma.buffer)}return{alloc:Zt,free:fr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,se=3412,le=3413,fe=3414,V=3415,Y=33901,ee=33902,q=3379,oe=3386,ae=34921,j=36347,Q=36348,re=35661,ce=35660,be=34930,Ae=36349,De=34076,ze=34024,Ze=7936,at=7937,nt=7938,rt=35724,st=34047,Me=36063,ye=34852,he=3553,Oe=34067,tt=34069,ot=33984,Qe=6408,Pt=5126,It=5121,qt=36160,Wt=36053,kr=36064,mr=16384,qr=function(it,Zt){var fr=1;Zt.ext_texture_filter_anisotropic&&(fr=it.getParameter(st));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ye),wa=it.getParameter(Me));var ma=!!Zt.oes_texture_float;if(ma){var _a=it.createTexture();it.bindTexture(he,_a),it.texImage2D(he,0,Qe,1,1,0,Qe,Pt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(qt,Ya),it.framebufferTexture2D(qt,kr,he,_a,0),it.bindTexture(he,null),it.checkFramebufferStatus(qt)!==Wt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Pt,4);it.readPixels(0,0,1,1,Qe,Pt,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(_a),ma=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 yn=it.createTexture(),zi=U.allocType(It,36);it.activeTexture(ot),it.bindTexture(Oe,yn),it.texImage2D(tt,0,Qe,3,3,0,Qe,It,zi),U.freeType(zi),it.bindTexture(Oe,null),it.deleteTexture(yn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(se),it.getParameter(le)],depthBits:it.getParameter(fe),stencilBits:it.getParameter(V),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(oe),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(De),maxRenderbufferSize:it.getParameter(ze),maxTextureUnits:it.getParameter(be),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(ce),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Ae),glsl:it.getParameter(rt),renderer:it.getParameter(at),vendor:it.getParameter(Ze),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},Sr=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 Rr(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)||Sr(it.data))}var wt=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Ne={shape:Ee,flatten:Ce};function Ke(it,Zt,fr){for(var oa=0;oa<Zt;++oa)fr[oa]=it[oa]}function Te(it,Zt,fr,oa){for(var wa=0,ma=0;ma<Zt;++ma)for(var _a=it[ma],Ya=0;Ya<fr;++Ya)oa[wa++]=_a[Ya]}function Ie(it,Zt,fr,oa,wa,ma){for(var _a=ma,Ya=0;Ya<Zt;++Ya)for(var bi=it[Ya],yi=0;yi<fr;++yi)for(var si=bi[yi],yn=0;yn<oa;++yn)wa[_a++]=si[yn]}function Ve(it,Zt,fr,oa,wa){for(var ma=1,_a=fr+1;_a<Zt.length;++_a)ma*=Zt[_a];var Ya=Zt[fr];if(Zt.length-fr===4){var bi=Zt[fr+1],yi=Zt[fr+2],si=Zt[fr+3];for(_a=0;_a<Ya;++_a)Ie(it[_a],bi,yi,si,oa,wa),wa+=ma}else for(_a=0;_a<Ya;++_a)Ve(it[_a],Zt,fr+1,oa,wa),wa+=ma}function Ce(it,Zt,fr,oa){var wa=1;if(Zt.length)for(var ma=0;ma<Zt.length;++ma)wa*=Zt[ma];else wa=0;var _a=oa||U.allocType(fr,wa);switch(Zt.length){case 0:break;case 1:Ke(it,Zt[0],_a);break;case 2:Te(it,Zt[0],Zt[1],_a);break;case 3:Ie(it,Zt[0],Zt[1],Zt[2],_a,0);break;default:Ve(it,Zt,0,_a,0)}return _a}function Ee(it){for(var Zt=[],fr=it;fr.length;fr=fr[0])Zt.push(fr.length);return Zt}var Pe={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ft=5120,ct=5122,_t=5124,Ct=5121,ir=5123,rr=5125,er=5126,Lr=5126,fa={int8:ft,int16:ct,int32:_t,uint8:Ct,uint16:ir,uint32:rr,float:er,float32:Lr},Da=35048,Ia=35040,qa={dynamic:Da,stream:Ia,static:35044},Wa=Ne.flatten,Ca=Ne.shape,hi=35044,wi=35040,Kt=5121,Ft=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 Pe[Object.prototype.toString.call(it)]|0}function Fr(it,Zt){for(var fr=0;fr<Zt.length;++fr)it[fr]=Zt[fr]}function ta(it,Zt,fr,oa,wa,ma,_a){for(var Ya=0,bi=0;bi<fr;++bi)for(var yi=0;yi<oa;++yi)it[Ya++]=Zt[wa*bi+ma*yi+_a]}function ra(it,Zt,fr,oa){var wa=0,ma={};function _a(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,fr.profile&&(this.stats={size:0})}_a.prototype.bind=function(){it.bindBuffer(this.type,this.buffer)},_a.prototype.destroy=function(){zi(this)};var Ya=[];function bi(ea,Ma){var Qa=Ya.pop();return Qa||(Qa=new _a(ea)),Qa.bind(),yn(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 yn(ea,Ma,Qa,di,Va,Bi){var Li;if(ea.usage=Qa,Array.isArray(Ma)){if(ea.dtype=di||Ft,Ma.length>0){var pn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua<Li.length;++Ua)Ha*=Li[Ua];ea.dimension=Ha,pn=Wa(Ma,Li,ea.dtype),si(ea,pn,Qa),Bi?ea.persistentData=pn:U.freeType(pn)}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 Sr(Ma[0])&&(ea.dimension=Ma[0].length,ea.dtype=di||Jt(Ma[0])||Ft,pn=Wa(Ma,[Ma.length,Ma[0].length],ea.dtype),si(ea,pn,Qa),Bi?ea.persistentData=pn:U.freeType(pn))}}else if(Sr(Ma))ea.dtype=di||Jt(Ma),ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma.buffer)));else if(Rr(Ma)){Li=Ma.shape;var Ri=Ma.stride,Ti=Ma.offset,xi=0,Xi=0,mn=0,In=0;Li.length===1?(xi=Li[0],Xi=1,mn=Ri[0],In=0):Li.length===2&&(xi=Li[0],Xi=Li[1],mn=Ri[0],In=Ri[1]),ea.dtype=di||Jt(Ma.data)||Ft,ea.dimension=Xi;var Ii=U.allocType(ea.dtype,xi*Xi);ta(Ii,Ma.data,xi,Xi,mn,In,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 ma[ea.id]}function Ei(ea,Ma,Qa,di){Zt.bufferCount++;var Va=new _a(Ma);ma[Va.id]=Va;function Bi(Ha){var Ua=hi,Yi=null,Ri=0,Ti=0,xi=1;return Array.isArray(Ha)||Sr(Ha)||Rr(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=fa[Ha.type]),"dimension"in Ha&&(xi=Ha.dimension|0),"length"in Ha&&(Ri=Ha.length|0)),Va.bind(),Yi?yn(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),fr.profile&&(Va.stats.size=Va.byteLength*Yt[Va.dtype]),Bi}function Li(Ha,Ua){it.bufferSubData(Va.type,Ua,Ha)}function pn(Ha,Ua){var Yi=(Ua||0)|0,Ri;if(Va.bind(),Sr(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])||Sr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Rr(Ha)){Ri=Ha.shape;var Xi=Ha.stride,mn=0,In=0,Ii=0,an=0;Ri.length===1?(mn=Ri[0],In=1,Ii=Xi[0],an=0):Ri.length===2&&(mn=Ri[0],In=Ri[1],Ii=Xi[0],an=Xi[1]);var kn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(kn,mn*In);ta(Dn,Ha.data,mn,In,Ii,an,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=pn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){wt(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){wt(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof _a?ea._buffer:null},restore:Na,_initBuffer:yn}}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},tn=0,on=1,hn=4,Tt=5120,ut=5121,Br=5122,Cr=5123,xr=5124,Ir=5125,Ur=34963,Hr=35040,xt=35044;function Xt(it,Zt,fr,oa){var wa={},ma=0,_a={uint8:ut,uint16:Cr};Zt.oes_element_index_uint&&(_a.uint32=Ir);function Ya(Na){this.id=ma++,wa[this.id]=this,this.buffer=Na,this.primType=hn,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(fr.create(null,Ur,!0,!1)._buffer)),yn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function yn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var pn=Bi;!Bi&&(!Sr(ea)||Rr(ea)&&!Sr(ea.data))&&(pn=Zt.oes_element_index_uint?Ir:Cr),fr._initBuffer(Na.buffer,ea,Ma,pn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case Tt:Li=ut;break;case Cr:case Br:Li=Cr;break;case Ir:case xr:Li=Ir;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Ir&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=hn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=tn),Yi===2&&(Ua=on),Yi===3&&(Ua=hn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=hn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=hn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=xt,pn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Sr(Va)||Rr(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(pn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=_a[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Ir||Yi===xr)&&(Ua*=4))),yn(Qa,Bi,Li,pn,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(){wt(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),fr=0;fr<it.length;++fr)if(isNaN(it[fr]))Zt[fr]=65535;else if(it[fr]===1/0)Zt[fr]=31744;else if(it[fr]===-1/0)Zt[fr]=64512;else{vr[0]=it[fr];var oa=Or[0],wa=oa>>>31<<15,ma=(oa<<1>>>24)-127,_a=oa>>13&1023;if(ma<-24)Zt[fr]=wa;else if(ma<-14){var Ya=-14-ma;Zt[fr]=wa+(_a+1024>>Ya)}else ma>15?Zt[fr]=wa+31744:Zt[fr]=wa+(ma+15<<10)+_a}return Zt}function ya(it){return Array.isArray(it)||Sr(it)}var la=34467,Ta=3553,Ai=34067,ki=34069,Ki=6408,_n=6406,Rn=6407,En=6409,On=6410,no=32854,cn=32855,lo=36194,Wo=32819,hs=32820,Oo=33635,Wn=34042,No=6402,as=34041,Ns=35904,ss=35906,uo=36193,jn=33776,Xn=33777,ls=33778,Cs=33779,Ks=35986,Xo=35987,Gi=34798,Ln=35840,Us=35841,_s=35842,Gn=35843,zs=36196,vs=5121,Ws=5123,il=5125,xn=5126,ko=10242,bo=10243,Is=10497,pu=33071,co=33648,Vs=10240,vl=10241,Ts=9728,js=9729,us=9984,As=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Fs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,As,su],ml=[0,En,On,Rn,Ki],xs={};xs[En]=xs[_n]=xs[No]=1,xs[as]=xs[On]=2,xs[Rn]=xs[Ns]=3,xs[Ki]=xs[ss]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),Ul=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),ns=Xs("HTMLVideoElement"),bh=Object.keys(Pe).concat([nc,Ul,qu,fl,xh,ns]),Es=[];Es[vs]=1,Es[xn]=4,Es[uo]=2,Es[Ws]=2,Es[il]=4;var to=[];to[no]=2,to[cn]=2,to[lo]=2,to[as]=4,to[jn]=.5,to[Xn]=.5,to[ls]=1,to[Cs]=1,to[Ks]=.5,to[Xo]=1,to[Gi]=1,to[Ln]=.5,to[Us]=.25,to[_s]=.5,to[Gn]=.25,to[zs]=.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||!ya(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)===ns}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Rr(it)}function jc(it){return Pe[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var fr=Zt.length;switch(it.type){case vs:case Ws:case il:case xn:var oa=U.allocType(it.type,fr);oa.set(Zt),it.data=oa;break;case uo:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===uo?xn:it.type,Zt)}function Gu(it,Zt){it.type===uo?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,fr,oa,wa,ma){for(var _a=it.width,Ya=it.height,bi=it.channels,yi=_a*Ya*bi,si=Nf(it,yi),yn=0,zi=0;zi<Ya;++zi)for(var Ei=0;Ei<_a;++Ei)for(var Na=0;Na<bi;++Na)si[yn++]=Zt[fr*Ei+oa*zi+wa*Na+ma];Gu(it,si)}function oc(it,Zt,fr,oa,wa,ma){var _a;if(typeof to[it]<"u"?_a=to[it]:_a=xs[it]*Es[Zt],ma&&(_a*=6),wa){for(var Ya=0,bi=fr;bi>=1;)Ya+=_a*bi*bi,bi/=2;return Ya}else return _a*fr*oa}function Xc(it,Zt,fr,oa,wa,ma,_a){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Is,clamp:pu,mirror:co},yi={nearest:Ts,linear:js},si=v({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":As,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),yn={none:0,browser:ic},zi={uint8:vs,rgba4:Wo,rgb565:Oo,"rgb5 a1":hs},Ei={alpha:_n,luminance:En,"luminance alpha":On,rgb:Rn,rgba:Ki,rgba4:no,"rgb5 a1":cn,rgb565:lo},Na={};Zt.ext_srgb&&(Ei.srgb=Ns,Ei.srgba=ss),Zt.oes_texture_float&&(zi.float32=zi.float=xn),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=uo),Zt.webgl_depth_texture&&(v(Ei,{depth:No,"depth stencil":as}),v(zi,{uint16:Ws,uint32:il,"depth stencil":Wn})),Zt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":jn,"rgba s3tc dxt1":Xn,"rgba s3tc dxt3":ls,"rgba s3tc dxt5":Cs}),Zt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Ks,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Ln,"rgb pvrtc 2bppv1":Us,"rgba pvrtc 4bppv1":_s,"rgba pvrtc 2bppv1":Gn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=zs);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(Le){var $e=Na[Le];ea.indexOf($e)>=0&&(Ei[Le]=$e)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(Le){var $e=Ei[Le];Qa[$e]=Le});var di=[];Object.keys(zi).forEach(function(Le){var $e=zi[Le];di[$e]=Le});var Va=[];Object.keys(yi).forEach(function(Le){var $e=yi[Le];Va[$e]=Le});var Bi=[];Object.keys(si).forEach(function(Le){var $e=si[Le];Bi[$e]=Le});var Li=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Li[$e]=Le});var pn=Ma.reduce(function(Le,$e){var gt=Ei[$e];return gt===En||gt===_n||gt===En||gt===On||gt===No||gt===as||Zt.ext_srgb&&(gt===Ns||gt===ss)?Le[gt]=gt:gt===cn||$e.indexOf("rgba")>=0?Le[gt]=Ki:Le[gt]=Rn,Le},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=vs,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(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function Yi(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var gt=$e.type;Le.type=zi[gt]}var jt=Le.width,wr=Le.height,Nr=Le.channels,pr=!1;"shape"in $e?(jt=$e.shape[0],wr=$e.shape[1],$e.shape.length===3&&(Nr=$e.shape[2],pr=!0)):("radius"in $e&&(jt=wr=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(wr=$e.height),"channels"in $e&&(Nr=$e.channels,pr=!0)),Le.width=jt|0,Le.height=wr|0,Le.channels=Nr|0;var yt=!1;if("format"in $e){var kt=$e.format,Bt=Le.internalformat=Ei[kt];Le.format=pn[Bt],kt in zi&&("type"in $e||(Le.type=zi[kt])),kt in Na&&(Le.compressed=!0),yt=!0}!pr&&yt?Le.channels=xs[Le.format]:pr&&!yt&&Le.channels!==ml[Le.format]&&(Le.format=Le.internalformat=ml[Le.channels])}}function Ri(Le){it.pixelStorei(Hc,Le.flipY),it.pixelStorei(lu,Le.premultiplyAlpha),it.pixelStorei(Pl,Le.colorSpace),it.pixelStorei(dc,Le.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(Le,$e){var gt=null;if(of($e)?gt=$e:$e&&(Yi(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),of($e.data)&&(gt=$e.data)),$e.copy){var jt=wa.viewportWidth,wr=wa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||wr-Le.yOffset,Le.needsCopy=!0}else if(!gt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(Sr(gt))Le.channels=Le.channels||4,Le.data=gt,!("type"in $e)&&Le.type===vs&&(Le.type=jc(gt));else if(Wc(gt))Le.channels=Le.channels||4,Bf(Le,gt),Le.alignment=1,Le.needsFree=!0;else if(Rr(gt)){var Nr=gt.data;!Array.isArray(Nr)&&Le.type===vs&&(Le.type=jc(Nr));var pr=gt.shape,yt=gt.stride,kt,Bt,nr,hr,lr,dr;pr.length===3?(nr=pr[2],dr=yt[2]):(nr=1,dr=1),kt=pr[0],Bt=pr[1],hr=yt[0],lr=yt[1],Le.alignment=1,Le.width=kt,Le.height=Bt,Le.channels=nr,Le.format=Le.internalformat=ml[nr],Le.needsFree=!0,Ef(Le,Nr,hr,lr,dr,gt.offset)}else if(Mf(gt)||Ac(gt)||nf(gt))Mf(gt)||Ac(gt)?Le.element=gt:Le.element=gt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if($l(gt))Le.element=gt,Le.width=gt.width,Le.height=gt.height,Le.channels=4;else if(Jf(gt))Le.element=gt,Le.width=gt.naturalWidth,Le.height=gt.naturalHeight,Le.channels=4;else if(Of(gt))Le.element=gt,Le.width=gt.videoWidth,Le.height=gt.videoHeight,Le.channels=4;else if(Vu(gt)){var ur=Le.width||gt[0].length,Ht=Le.height||gt.length,sr=Le.channels;ya(gt[0][0])?sr=sr||gt[0][0].length:sr=sr||1;for(var Vt=Ne.shape(gt),Dr=1,Jr=0;Jr<Vt.length;++Jr)Dr*=Vt[Jr];var ga=Nf(Le,Dr);Ne.flatten(gt,Vt,"",ga),Gu(Le,ga),Le.alignment=1,Le.width=ur,Le.height=Ht,Le.channels=sr,Le.format=Le.internalformat=ml[sr],Le.needsFree=!0}Le.type===xn||Le.type}function Xi(Le,$e,gt){var jt=Le.element,wr=Le.data,Nr=Le.internalformat,pr=Le.format,yt=Le.type,kt=Le.width,Bt=Le.height;Ri(Le),jt?it.texImage2D($e,gt,pr,pr,yt,jt):Le.compressed?it.compressedTexImage2D($e,gt,Nr,kt,Bt,0,wr):Le.needsCopy?(oa(),it.copyTexImage2D($e,gt,pr,Le.xOffset,Le.yOffset,kt,Bt,0)):it.texImage2D($e,gt,pr,kt,Bt,0,pr,yt,wr||null)}function mn(Le,$e,gt,jt,wr){var Nr=Le.element,pr=Le.data,yt=Le.internalformat,kt=Le.format,Bt=Le.type,nr=Le.width,hr=Le.height;Ri(Le),Nr?it.texSubImage2D($e,wr,gt,jt,kt,Bt,Nr):Le.compressed?it.compressedTexSubImage2D($e,wr,gt,jt,yt,nr,hr,pr):Le.needsCopy?(oa(),it.copyTexSubImage2D($e,wr,gt,jt,Le.xOffset,Le.yOffset,nr,hr)):it.texSubImage2D($e,wr,gt,jt,nr,hr,kt,Bt,pr)}var In=[];function Ii(){return In.pop()||new Ti}function an(Le){Le.needsFree&&U.freeType(Le.data),Ti.call(Le),In.push(Le)}function kn(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=du,this.mipmask=0,this.images=Array(16)}function Dn(Le,$e,gt){var jt=Le.images[0]=Ii();Le.mipmask=1,jt.width=Le.width=$e,jt.height=Le.height=gt,jt.channels=Le.channels=4}function Zn(Le,$e){var gt=null;if(of($e))gt=Le.images[0]=Ii(),Ua(gt,Le),xi(gt,$e),Le.mipmask=1;else if(Yi(Le,$e),Array.isArray($e.mipmap))for(var jt=$e.mipmap,wr=0;wr<jt.length;++wr)gt=Le.images[wr]=Ii(),Ua(gt,Le),gt.width>>=wr,gt.height>>=wr,xi(gt,jt[wr]),Le.mipmask|=1<<wr;else gt=Le.images[0]=Ii(),Ua(gt,Le),xi(gt,$e),Le.mipmask=1;Ua(Le,Le.images[0]),Le.compressed&&(Le.internalformat===jn||Le.internalformat===Xn||Le.internalformat===ls||Le.internalformat)}function Ds(Le,$e){for(var gt=Le.images,jt=0;jt<gt.length;++jt){if(!gt[jt])return;Xi(gt[jt],$e,jt)}}var bl=[];function po(){var Le=bl.pop()||new kn;Ha.call(Le),Le.mipmask=0;for(var $e=0;$e<16;++$e)Le.images[$e]=null;return Le}function Wl(Le){for(var $e=Le.images,gt=0;gt<$e.length;++gt)$e[gt]&&an($e[gt]),$e[gt]=null;bl.push(Le)}function fs(){this.minFilter=Ts,this.magFilter=Ts,this.wrapS=pu,this.wrapT=pu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=du}function Sl(Le,$e){if("min"in $e){var gt=$e.min;Le.minFilter=si[gt],nl.indexOf(Le.minFilter)>=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=yi[jt]}var wr=Le.wrapS,Nr=Le.wrapT;if("wrap"in $e){var pr=$e.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in $e){var yt=$e.wrapS;wr=bi[yt]}if("wrapT"in $e){var kt=$e.wrapT;Nr=bi[kt]}}if(Le.wrapS=wr,Le.wrapT=Nr,"anisotropic"in $e){var Bt=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var nr=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ya[$e.mipmap],Le.genMipmaps=!0,nr=!0;break;case"boolean":nr=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in $e)&&(Le.minFilter=us)}}function kl(Le,$e){it.texParameteri($e,vl,Le.minFilter),it.texParameteri($e,Vs,Le.magFilter),it.texParameteri($e,ko,Le.wrapS),it.texParameteri($e,bo,Le.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri($e,Fs,Le.anisotropic),Le.genMipmaps&&(it.hint(Tc,Le.mipmapHint),it.generateMipmap($e))}var tu=0,qs={},pl=fr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Yn(Le){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=Le,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,_a.profile&&(this.stats={size:0})}function Cl(Le){it.activeTexture(Ou),it.bindTexture(Le.target,Le.texture)}function Co(){var Le=wl[0];Le?it.bindTexture(Le.target,Le.texture):it.bindTexture(Ta,null)}function ve(Le){var $e=Le.texture,gt=Le.unit,jt=Le.target;gt>=0&&(it.activeTexture(Ou+gt),it.bindTexture(jt,null),wl[gt]=null),it.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete qs[Le.id],ma.textureCount--}v(Yn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var gt=0;gt<pl;++gt){var jt=wl[gt];if(jt){if(jt.bindCount>0)continue;jt.unit=-1}wl[gt]=Le,$e=gt;break}$e>=pl,_a.profile&&ma.maxTextureUnits<$e+1&&(ma.maxTextureUnits=$e+1),Le.unit=$e,it.activeTexture(Ou+$e),it.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function K(Le,$e){var gt=new Yn(Ta);qs[gt.id]=gt,ma.textureCount++;function jt(pr,yt){var kt=gt.texInfo;fs.call(kt);var Bt=po();return typeof pr=="number"?typeof yt=="number"?Dn(Bt,pr|0,yt|0):Dn(Bt,pr|0,pr|0):pr?(Sl(kt,pr),Zn(Bt,pr)):Dn(Bt,1,1),kt.genMipmaps&&(Bt.mipmask=(Bt.width<<1)-1),gt.mipmask=Bt.mipmask,Ua(gt,Bt),gt.internalformat=Bt.internalformat,jt.width=Bt.width,jt.height=Bt.height,Cl(gt),Ds(Bt,Ta),kl(kt,Ta),Co(),Wl(Bt),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,Bt.width,Bt.height,kt.genMipmaps,!1)),jt.format=Qa[gt.internalformat],jt.type=di[gt.type],jt.mag=Va[kt.magFilter],jt.min=Bi[kt.minFilter],jt.wrapS=Li[kt.wrapS],jt.wrapT=Li[kt.wrapT],jt}function wr(pr,yt,kt,Bt){var nr=yt|0,hr=kt|0,lr=Bt|0,dr=Ii();return Ua(dr,gt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(gt.width>>lr)-nr,dr.height=dr.height||(gt.height>>lr)-hr,Cl(gt),mn(dr,Ta,nr,hr,lr),Co(),an(dr),jt}function Nr(pr,yt){var kt=pr|0,Bt=yt|0||kt;if(kt===gt.width&&Bt===gt.height)return jt;jt.width=gt.width=kt,jt.height=gt.height=Bt,Cl(gt);for(var nr=0;gt.mipmask>>nr;++nr){var hr=kt>>nr,lr=Bt>>nr;if(!hr||!lr)break;it.texImage2D(Ta,nr,gt.format,hr,lr,0,gt.format,gt.type,null)}return Co(),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,kt,Bt,!1,!1)),jt}return jt(Le,$e),jt.subimage=wr,jt.resize=Nr,jt._reglType="texture2d",jt._texture=gt,_a.profile&&(jt.stats=gt.stats),jt.destroy=function(){gt.decRef()},jt}function _e(Le,$e,gt,jt,wr,Nr){var pr=new Yn(Ai);qs[pr.id]=pr,ma.cubeCount++;var yt=new Array(6);function kt(hr,lr,dr,ur,Ht,sr){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)yt[Vt]=po();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(yt[Vt],Jr,Jr)}else if(typeof hr=="object")if(lr)Zn(yt[0],hr),Zn(yt[1],lr),Zn(yt[2],dr),Zn(yt[3],ur),Zn(yt[4],Ht),Zn(yt[5],sr);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(yt[Vt],pr),Zn(yt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Zn(yt[Vt],hr);for(Ua(pr,yt[0]),Dr.genMipmaps?pr.mipmask=(yt[0].width<<1)-1:pr.mipmask=yt[0].mipmask,pr.internalformat=yt[0].internalformat,kt.width=yt[0].width,kt.height=yt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)Ds(yt[Vt],ki+Vt);for(kl(Dr,Ai),Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,Dr.genMipmaps,!0)),kt.format=Qa[pr.internalformat],kt.type=di[pr.type],kt.mag=Va[Dr.magFilter],kt.min=Bi[Dr.minFilter],kt.wrapS=Li[Dr.wrapS],kt.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(yt[Vt]);return kt}function Bt(hr,lr,dr,ur,Ht){var sr=dr|0,Vt=ur|0,Dr=Ht|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,lr),Jr.width=Jr.width||(pr.width>>Dr)-sr,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),mn(Jr,ki+hr,sr,Vt,Dr),Co(),an(Jr),kt}function nr(hr){var lr=hr|0;if(lr!==pr.width){kt.width=pr.width=lr,kt.height=pr.height=lr,Cl(pr);for(var dr=0;dr<6;++dr)for(var ur=0;pr.mipmask>>ur;++ur)it.texImage2D(ki+dr,ur,pr.format,lr>>ur,lr>>ur,0,pr.format,pr.type,null);return Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,!1,!0)),kt}}return kt(Le,$e,gt,jt,wr,Nr),kt.subimage=Bt,kt.resize=nr,kt._reglType="textureCube",kt._texture=pr,_a.profile&&(kt.stats=pr.stats),kt.destroy=function(){pr.decRef()},kt}function te(){for(var Le=0;Le<pl;++Le)it.activeTexture(Ou+Le),it.bindTexture(Ta,null),wl[Le]=null;wt(qs).forEach(ve),ma.cubeCount=0,ma.textureCount=0}_a.profile&&(ma.getTotalTextureSize=function(){var Le=0;return Object.keys(qs).forEach(function($e){Le+=qs[$e].stats.size}),Le});function me(){for(var Le=0;Le<pl;++Le){var $e=wl[Le];$e&&($e.bindCount=0,$e.unit=-1,wl[Le]=null)}wt(qs).forEach(function(gt){gt.texture=it.createTexture(),it.bindTexture(gt.target,gt.texture);for(var jt=0;jt<32;++jt)if(gt.mipmask&1<<jt)if(gt.target===Ta)it.texImage2D(Ta,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);kl(gt.texInfo,gt.target)})}function Ge(){for(var Le=0;Le<pl;++Le){var $e=wl[Le];$e&&($e.bindCount=0,$e.unit=-1,wl[Le]=null),it.activeTexture(Ou+Le),it.bindTexture(Ta,null),it.bindTexture(Ai,null)}}return{create2D:K,createCube:_e,clear:te,getTexture:function(Le){return null},restore:me,refresh:Ge}}var Ql=36161,qc=32854,Sc=32855,Zs=36194,kf=33189,fh=36168,Uf=34041,Zc=35907,$f=34836,Cu=34842,jf=34843,yl=[];yl[qc]=2,yl[Sc]=2,yl[Zs]=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,fr){return yl[it]*Zt*fr}var Mc=function(it,Zt,fr,oa,wa){var ma={rgba4:qc,rgb565:Zs,"rgb5 a1":Sc,depth:kf,stencil:fh,"depth stencil":Uf};Zt.ext_srgb&&(ma.srgba=Zc),Zt.ext_color_buffer_half_float&&(ma.rgba16f=Cu,ma.rgb16f=jf),Zt.webgl_color_buffer_float&&(ma.rgba32f=$f);var _a=[];Object.keys(ma).forEach(function(Ei){var Na=ma[Ei];_a[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 yn(Ei,Na){var ea=new yi(it.createRenderbuffer());bi[ea.id]=ea,oa.renderbufferCount++;function Ma(di,Va){var Bi=0,Li=0,pn=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&&(pn=ma[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&&pn===ea.format))return Ma.width=ea.width=Bi,Ma.height=ea.height=Li,ea.format=pn,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,pn,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ma.format=_a[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(){wt(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:yn,clear:function(){wt(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,fr,oa,wa,ma){var _a={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 mn=0,In=0;xi?(mn=xi.width,In=xi.height):Xi&&(mn=Xi.width,In=Xi.height),this.width=mn,this.height=In}function yn(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 mn=Ti.texture._texture,In=Math.max(1,mn.width),Ii=Math.max(1,mn.height);mn.refCount+=1}else{var an=Ti.renderbuffer._renderbuffer;an.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,mn=null,In=Ti;typeof Ti=="object"&&(In=Ti.data,"target"in Ti&&(xi=Ti.target|0));var Ii=In._reglType;return Ii==="texture2d"||Ii==="textureCube"?Xi=In:Ii==="renderbuffer"&&(mn=In,xi=vc),new si(xi,Xi,mn)}function ea(Ti,xi,Xi,mn,In){if(Xi){var Ii=oa.create2D({width:Ti,height:xi,format:mn,type:In});return Ii._texture.refCount=0,new si(yu,Ii,null)}else{var an=wa.create({width:Ti,height:xi,format:mn});return an._renderbuffer.refCount=0,new si(vc,null,an)}}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(yn),yn(Ti.depthAttachment),yn(Ti.stencilAttachment),yn(Ti.depthStencilAttachment)}function pn(Ti){var xi=Ti.framebuffer;it.deleteFramebuffer(xi),Ti.framebuffer=null,ma.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<fr.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 mn=it.checkFramebufferStatus(ol);it.isContextLost(),it.bindFramebuffer(ol,_a.next?_a.next.framebuffer:null),_a.cur=_a.next,it.getError()}function Ua(Ti,xi){var Xi=new Bi;ma.framebufferCount++;function mn(Ii,an){var kn,Dn=0,Zn=0,Ds=!0,bl=!0,po=null,Wl=!0,fs="rgba",Sl="uint8",kl=1,tu=null,qs=null,pl=null,wl=!1;if(typeof Ii=="number")Dn=Ii|0,Zn=an|0||Dn;else if(!Ii)Dn=Zn=1;else{var Yn=Ii;if("shape"in Yn){var Cl=Yn.shape;Dn=Cl[0],Zn=Cl[1]}else"radius"in Yn&&(Dn=Zn=Yn.radius),"width"in Yn&&(Dn=Yn.width),"height"in Yn&&(Zn=Yn.height);("color"in Yn||"colors"in Yn)&&(po=Yn.color||Yn.colors,Array.isArray(po)),po||("colorCount"in Yn&&(kl=Yn.colorCount|0),"colorTexture"in Yn&&(Wl=!!Yn.colorTexture,fs="rgba4"),"colorType"in Yn&&(Sl=Yn.colorType,Wl||(Sl==="half float"||Sl==="float16"?fs="rgba16f":(Sl==="float"||Sl==="float32")&&(fs="rgba32f"))),"colorFormat"in Yn&&(fs=Yn.colorFormat,Ya.indexOf(fs)>=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Yn||"depthStencilTexture"in Yn)&&(wl=!!(Yn.depthTexture||Yn.depthStencilTexture)),"depth"in Yn&&(typeof Yn.depth=="boolean"?Ds=Yn.depth:(tu=Yn.depth,bl=!1)),"stencil"in Yn&&(typeof Yn.stencil=="boolean"?bl=Yn.stencil:(qs=Yn.stencil,Ds=!1)),"depthStencil"in Yn&&(typeof Yn.depthStencil=="boolean"?Ds=bl=Yn.depthStencil:(pl=Yn.depthStencil,Ds=!1,bl=!1))}var Co=null,ve=null,K=null,_e=null;if(Array.isArray(po))Co=po.map(Na);else if(po)Co=[Na(po)];else for(Co=new Array(kl),kn=0;kn<kl;++kn)Co[kn]=ea(Dn,Zn,Wl,fs,Sl);Dn=Dn||Co[0].width,Zn=Zn||Co[0].height,tu?ve=Na(tu):Ds&&!bl&&(ve=ea(Dn,Zn,wl,"depth","uint32")),qs?K=Na(qs):bl&&!Ds&&(K=ea(Dn,Zn,!1,"stencil","uint8")),pl?_e=Na(pl):!tu&&!qs&&bl&&Ds&&(_e=ea(Dn,Zn,wl,"depth stencil","depth stencil"));var te=null;for(kn=0;kn<Co.length;++kn)if(zi(Co[kn],Dn,Zn),Co[kn]&&Co[kn].texture){var me=lf[Co[kn].texture._texture.format]*au[Co[kn].texture._texture.type];te===null&&(te=me)}return zi(ve,Dn,Zn),zi(K,Dn,Zn),zi(_e,Dn,Zn),Li(Xi),Xi.width=Dn,Xi.height=Zn,Xi.colorAttachments=Co,Xi.depthAttachment=ve,Xi.stencilAttachment=K,Xi.depthStencilAttachment=_e,mn.color=Co.map(Ma),mn.depth=Ma(ve),mn.stencil=Ma(K),mn.depthStencil=Ma(_e),mn.width=Xi.width,mn.height=Xi.height,Ha(Xi),mn}function In(Ii,an){var kn=Math.max(Ii|0,1),Dn=Math.max(an|0||kn,1);if(kn===Xi.width&&Dn===Xi.height)return mn;for(var Zn=Xi.colorAttachments,Ds=0;Ds<Zn.length;++Ds)Qa(Zn[Ds],kn,Dn);return Qa(Xi.depthAttachment,kn,Dn),Qa(Xi.stencilAttachment,kn,Dn),Qa(Xi.depthStencilAttachment,kn,Dn),Xi.width=mn.width=kn,Xi.height=mn.height=Dn,Ha(Xi),mn}return mn(Ti,xi),v(mn,{resize:In,_reglType:"framebuffer",_framebuffer:Xi,destroy:function(){pn(Xi),Li(Xi)},use:function(Ii){_a.setFBO({framebuffer:mn},Ii)}})}function Yi(Ti){var xi=Array(6);function Xi(In){var Ii,an={color:null},kn=0,Dn=null,Zn="rgba",Ds="uint8",bl=1;if(typeof In=="number")kn=In|0;else if(!In)kn=1;else{var po=In;if("shape"in po){var Wl=po.shape;kn=Wl[0]}else"radius"in po&&(kn=po.radius|0),"width"in po?(kn=po.width|0,"height"in po):"height"in po&&(kn=po.height|0);("color"in po||"colors"in po)&&(Dn=po.color||po.colors,Array.isArray(Dn)),Dn||("colorCount"in po&&(bl=po.colorCount|0),"colorType"in po&&(Ds=po.colorType),"colorFormat"in po&&(Zn=po.colorFormat)),"depth"in po&&(an.depth=po.depth),"stencil"in po&&(an.stencil=po.stencil),"depthStencil"in po&&(an.depthStencil=po.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:kn,format:Zn,type:Ds};for(Ii=0;Ii<bl;++Ii)fs[Ii]=oa.createCube(Sl)}for(an.color=Array(fs.length),Ii=0;Ii<fs.length;++Ii){var kl=fs[Ii];kn=kn||kl.width,an.color[Ii]={target:Tu,data:fs[Ii]}}for(Ii=0;Ii<6;++Ii){for(var tu=0;tu<fs.length;++tu)an.color[tu].target=Tu+Ii;Ii>0&&(an.depth=xi[0].depth,an.stencil=xi[0].stencil,an.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](an):xi[Ii]=Ua(an)}return v(Xi,{width:kn,height:kn,color:fs})}function mn(In){var Ii,an=In|0;if(an===Xi.width)return Xi;var kn=Xi.color;for(Ii=0;Ii<kn.length;++Ii)kn[Ii].resize(an);for(Ii=0;Ii<6;++Ii)xi[Ii].resize(an);return Xi.width=Xi.height=an,Xi}return Xi(Ti),v(Xi,{faces:xi,resize:mn,_reglType:"framebufferCube",destroy:function(){xi.forEach(function(In){In.destroy()})}})}function Ri(){_a.cur=null,_a.next=null,_a.dirty=!0,wt(Va).forEach(function(Ti){Ti.framebuffer=it.createFramebuffer(),Ha(Ti)})}return v(_a,{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(){wt(Va).forEach(pn)},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,fr,oa,wa,ma,_a){for(var Ya=fr.maxAttributes,bi=new Array(Ya),yi=0;yi<Ya;++yi)bi[yi]=new _u;var si=0,yn={},zi={Record:_u,scope:{},state:bi,currentVAO:null,targetVAO:null,restore:Na()?Li:function(){},createVAO:pn,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))}_a.elements?it.bindBuffer(sl,_a.elements.buffer.buffer):it.bindBuffer(sl,null)}zi.currentVAO=Ha}}function Va(){wt(yn).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,yn[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=ma.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),yn[this.id]&&(delete yn[this.id],oa.vaoCount-=1)};function Li(){var Ha=Na();Ha&&wt(yn).forEach(function(Ua){Ua.refresh()})}function pn(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):ma.getElements(Ri.elements)?(Ua.elements=Ri.elements,Ua.ownsElements=!1):(Ua.elements=ma.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={},mn=Ua.attributes;mn.length=Ti.length;for(var In=0;In<Ti.length;++In){var Ii=Ti[In],an=mn[In]=new _u,kn=Ii.data||Ii;if(Array.isArray(kn)||Sr(kn)||Rr(kn)){var Dn;Ua.buffers[In]&&(Dn=Ua.buffers[In],Sr(kn)&&Dn._buffer.byteLength>=kn.byteLength?Dn.subdata(kn):(Dn.destroy(),Ua.buffers[In]=null)),Ua.buffers[In]||(Dn=Ua.buffers[In]=wa.create(Ii,mf,!1,!0)),an.buffer=wa.getBuffer(Dn),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1,Xi[In]=1}else wa.getBuffer(Ii)?(an.buffer=wa.getBuffer(Ii),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1):wa.getBuffer(Ii.buffer)?(an.buffer=wa.getBuffer(Ii.buffer),an.size=(+Ii.size||an.buffer.dimension)|0,an.normalized=!!Ii.normalized||!1,"type"in Ii?an.type=fa[Ii.type]:an.type=an.buffer.dtype,an.offset=(Ii.offset||0)|0,an.stride=(Ii.stride||0)|0,an.divisor=(Ii.divisor||0)|0,an.state=1):"x"in Ii&&(an.x=+Ii.x||0,an.y=+Ii.y||0,an.z=+Ii.z||0,an.w=+Ii.w||0,an.state=2)}for(var Zn=0;Zn<Ua.buffers.length;++Zn)!Xi[Zn]&&Ua.buffers[Zn]&&(Ua.buffers[Zn].destroy(),Ua.buffers[Zn]=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,fr,oa){var wa={},ma={};function _a(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:ma,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=[],yn=0;function zi(ea,Ma){this.id=yn++,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),pn=ea.program=it.createProgram();if(it.attachShader(pn,Bi),it.attachShader(pn,Li),Qa)for(di=0;di<Qa.length;++di){var Ha=Qa[di];it.bindAttribLocation(pn,Ha[0],Ha[1])}it.linkProgram(pn);var Ua=it.getProgramParameter(pn,uf);oa.profile&&(ea.stats.uniformsCount=Ua);var Yi=ea.uniforms;for(di=0;di<Ua;++di)if(Va=it.getActiveUniform(pn,di),Va)if(Va.size>1)for(var Ri=0;Ri<Va.size;++Ri){var Ti=Va.name.replace("[0]","["+Ri+"]");Ya(Yi,new _a(Ti,Zt.id(Ti),it.getUniformLocation(pn,Ti),Va))}else Ya(Yi,new _a(Va.name,Zt.id(Va.name),it.getUniformLocation(pn,Va.name),Va));var xi=it.getProgramParameter(pn,kc);oa.profile&&(ea.stats.attributesCount=xi);var Xi=ea.attributes;for(di=0;di<xi;++di)Va=it.getActiveAttrib(pn,di),Va&&Ya(Xi,new _a(Va.name,Zt.id(Va.name),it.getAttribLocation(pn,Va.name),Va))}oa.profile&&(fr.getMaxUniformsCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.uniformsCount>ea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},ma={};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);wt(wa).forEach(ea),wa={},wt(ma).forEach(ea),ma={},si.forEach(function(Ma){it.deleteProgram(Ma.program)}),si.length=0,yi={},fr.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 fr.shaderCount++,Ei(Li,Qa,di),Bi||(Va[ea]=Li),si.push(Li),v(Li,{destroy:function(){if(Li.refCount--,Li.refCount<=0){it.deleteProgram(Li.program);var pn=si.indexOf(Li);si.splice(pn,1),fr.shaderCount--}Va[Li.vertId].refCount<=0&&(it.deleteShader(ma[Li.vertId]),delete ma[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,fr,oa,wa,ma,_a){function Ya(si){var yn;Zt.next===null?yn=Wu:yn=Zt.next.colorAttachments[0].texture._texture.type;var zi=0,Ei=0,Na=oa.framebufferWidth,ea=oa.framebufferHeight,Ma=null;Sr(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),fr();var Qa=Na*ea*4;return Ma||(yn===Wu?Ma=new Uint8Array(Qa):yn===Lf&&(Ma=Ma||new Float32Array(Qa))),it.pixelStorei(Kc,4),it.readPixels(zi,Ei,Na,ea,gf,yn,Ma),Ma}function bi(si){var yn;return Zt.setFBO({framebuffer:si.framebuffer},function(){yn=Ya(si)}),yn}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 fr=Pc(it);fr.length>16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),wa=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,wa[ma]=fr[ma]^1549556828;var _a=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(_a),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,wa=0;wa<it.length;wa++)oa=it.charCodeAt(wa),fr+=Zt.charAt(oa>>>4&15)+Zt.charAt(oa&15);return fr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,wa=0;wa<oa;wa+=3)for(var ma=it.charCodeAt(wa)<<16|(wa+1<oa?it.charCodeAt(wa+1)<<8:0)|(wa+2<oa?it.charCodeAt(wa+2):0),_a=0;_a<4;_a++)wa*8+_a*6>it.length*8?fr+=Xu:fr+=Zt.charAt(ma>>>6*(3-_a)&63);return fr}function Jc(it,Zt){var fr=Zt.length,oa=Array(),wa,ma,_a,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(),_a=0,wa=0;wa<bi.length;wa++)_a=(_a<<16)+bi[wa],ma=Math.floor(_a/fr),_a-=ma*fr,(Ya.length>0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=_a,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="",fr=-1,oa,wa;++fr<it.length;)oa=it.charCodeAt(fr),wa=fr+1<it.length?it.charCodeAt(fr+1):0,55296<=oa&&oa<=56319&&56320<=wa&&wa<=57343&&(oa=65536+((oa&1023)<<10)+(wa&1023),fr++),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),fr=0;fr<Zt.length;fr++)Zt[fr]=0;for(var fr=0;fr<it.length*8;fr+=8)Zt[fr>>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Zt}function Qt(it){for(var Zt="",fr=0;fr<it.length*32;fr+=8)Zt+=String.fromCharCode(it[fr>>5]>>>24-fr%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,fr){return it&Zt^~it&fr}function ka(it,Zt,fr){return it&Zt^it&fr^Zt&fr}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 dn=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 fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,ma,_a,Ya,bi,yi,si,yn,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=fr[0],ma=fr[1],_a=fr[2],Ya=fr[3],bi=fr[4],yi=fr[5],si=fr[6],yn=fr[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(yn,Ci(bi)),$r(bi,yi,si)),dn[Ei]),oa[Ei]),ea=Di(li(wa),ka(wa,ma,_a)),yn=si,si=yi,yi=bi,bi=Di(Ya,Na),Ya=_a,_a=ma,ma=wa,wa=Di(Na,ea);fr[0]=Di(wa,fr[0]),fr[1]=Di(ma,fr[1]),fr[2]=Di(_a,fr[2]),fr[3]=Di(Ya,fr[3]),fr[4]=Di(bi,fr[4]),fr[5]=Di(yi,fr[5]),fr[6]=Di(si,fr[6]),fr[7]=Di(yn,fr[7])}return fr}function Di(it,Zt){var fr=(it&65535)+(Zt&65535),oa=(it>>16)+(Zt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Zt=it&&it.cache,fr=0,oa=[],wa=[],ma=[];function _a(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa<wa.length;++Qa)if(wa[Qa]===Na&&!ma[Qa])return oa[Qa]}var di="g"+fr++;return oa.push(di),wa.push(Na),ma.push(Ma),di}function Ya(){var Na=[];function ea(){Na.push.apply(Na,Ni(arguments))}var Ma=[];function Qa(){var di="v"+fr++;return Ma.push(di),arguments.length>0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(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 v(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 v(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(),yn={};function zi(Na,ea){var Ma=[];function Qa(){var pn="a"+Ma.length;return Ma.push(pn),pn}ea=ea||0;for(var di=0;di<ea;++di)Qa();var Va=bi(),Bi=Va.toString,Li=yn[Na]=v(Va,{arg:Qa,toString:function(){return mi(["function(",Ma.join(),"){",Bi(),"}"])}});return Li}function Ei(){var Na=['"use strict";',si,"return {"];Object.keys(yn).forEach(function(di){Na.push('"',di,'":',yn[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:_a,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),ao=5121,eo=1,fo=2,An=0,un=1,yo=2,Ko=3,Ss=4,rl=5,Os=6,el="dither",bs="blend.enable",Fl="blend.color",_l="blend.equation",ll="blend.func",Un="depth.enable",Lo="depth.func",Js="depth.range",Rs="depth.mask",uu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",ho="sample.enable",Ro="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Ue="stencil.opFront",I="stencil.opBack",ie="scissor.enable",we="scissor.box",Se="viewport",Be="profile",dt="framebuffer",St="vert",Nt="frag",$t="elements",Tr="primitive",Ar="count",Kr="offset",na="instances",He="vao",Je="Width",lt="Height",vt=dt+Je,Lt=dt+lt,At=Se+Je,zt=Se+lt,cr="drawingBuffer",yr=cr+Je,Er=cr+lt,jr=[ll,_l,Yu,Ue,I,Ro,Se,we,Au],Qr=34962,pa=34963,Aa=2884,za=3042,ci=3024,Vi=2960,ji=2929,nn=3089,Sn=32823,Kn=32926,Bn=32928,wo=5126,is=35664,Ao=35665,Zo=35666,ps=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,de=1028,Fe=1029,et=2304,mt=2305,bt=32775,Mt=32776,ar=519,Ot=7680,_r=0,Gr=1,Xr=32774,xa=513,da=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},Fa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:mt};function fi(it){return Array.isArray(it)||Sr(it)||Rr(it)}function ni(it){return it.sort(function(Zt,fr){return Zt===Se?-1:fr===Se?1:Zt<fr?-1:1})}function La(it,Zt,fr,oa){this.thisDep=it,this.contextDep=Zt,this.propDep=fr,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 vn(it,Zt){var fr=it.type;if(fr===An){var oa=it.data.length;return new La(!0,oa>=1,oa>=2,Zt)}else if(fr===Ss){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(fr===rl)return new La(!1,!1,!1,Zt);if(fr===Os){for(var ma=!1,_a=!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===yo)_a=!0;else if(yi.type===Ko)ma=!0;else if(yi.type===An){ma=!0;var si=yi.data;si>=1&&(_a=!0),si>=2&&(Ya=!0)}else yi.type===Ss&&(ma=ma||yi.data.thisDep,_a=_a||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,_a,Ya,Zt)}else return new La(fr===Ko,fr===yo,fr===un,Zt)}}var Pn=new La(!1,!1,!1,function(){});function Jn(it,Zt,fr,oa,wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=bt,Qa.max=Mt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},pn={},Ha=[],Ua={},Yi={};function Ri(yt){return yt.replace(".","_")}function Ti(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),pn[nr]=Li[nr]=!!Bt,Ua[nr]=kt}function xi(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),Array.isArray(Bt)?(Li[nr]=Bt.slice(),pn[nr]=Bt.slice()):Li[nr]=pn[nr]=Bt,Yi[nr]=kt}function Xi(yt){return!!isNaN(yt)}Ti(el,ci),Ti(bs,za),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Lo,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Rs,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",Fe),xi(Ic,Ic,mt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(ho,Bn),xi(Ro,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[ar,0,-1]),xi(Ue,"stencilOpSeparate",[de,Ot,Ot,Ot]),xi(I,"stencilOpSeparate",[Fe,Ot,Ot,Ot]),Ti(ie,nn),xi(we,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Se,Se,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var mn={gl:it,context:zi,strings:Zt,next:pn,current:Li,draw:yn,elements:ma,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},In={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:Fa,glTypes:fa,orientationType:Xa};Va&&(In.backBuffer=[Fe],In.drawBuffer=d(oa.maxDrawbuffers,function(yt){return yt===0?[0]:d(yt,function(kt){return Ja+kt})}));var Ii=0;function an(){var yt=Mn({cache:Na}),kt=yt.link,Bt=yt.global;yt.id=Ii++,yt.batchId="0";var nr=kt(mn),hr=yt.shared={props:"a0"};Object.keys(mn).forEach(function(sr){hr[sr]=Bt.def(nr,".",sr)});var lr=yt.next={},dr=yt.current={};Object.keys(Yi).forEach(function(sr){Array.isArray(Li[sr])&&(lr[sr]=Bt.def(hr.next,".",sr),dr[sr]=Bt.def(hr.current,".",sr))});var ur=yt.constants={};Object.keys(In).forEach(function(sr){ur[sr]=Bt.def(JSON.stringify(In[sr]))}),yt.invoke=function(sr,Vt){switch(Vt.type){case An:var Dr=["this",hr.context,hr.props,yt.batchId];return sr.def(kt(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return sr.def(hr.props,Vt.data);case yo:return sr.def(hr.context,Vt.data);case Ko:return sr.def("this",Vt.data);case Ss:return Vt.data.append(yt,sr),Vt.data.ref;case rl:return Vt.data.toString();case Os:return Vt.data.map(function(Jr){return yt.invoke(sr,Jr)})}},yt.attribCache={};var Ht={};return yt.scopeAttrib=function(sr){var Vt=Zt.id(sr);if(Vt in Ht)return Ht[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Ht[Vt]=kt(Dr);return Jr},yt}function kn(yt){var kt=yt.static,Bt=yt.dynamic,nr;if(Be in kt){var hr=!!kt[Be];nr=rn(function(dr,ur){return hr}),nr.enable=hr}else if(Be in Bt){var lr=Bt[Be];nr=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}return nr}function Dn(yt,kt){var Bt=yt.static,nr=yt.dynamic;if(dt in Bt){var hr=Bt[dt];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,ur){var Ht=dr.link(hr),sr=dr.shared;ur.set(sr.framebuffer,".next",Ht);var Vt=sr.context;return ur.set(Vt,"."+vt,Ht+".width"),ur.set(Vt,"."+Lt,Ht+".height"),Ht})):rn(function(dr,ur){var Ht=dr.shared;ur.set(Ht.framebuffer,".next","null");var sr=Ht.context;return ur.set(sr,"."+vt,sr+"."+yr),ur.set(sr,"."+Lt,sr+"."+Er),"null"})}else if(dt in nr){var lr=nr[dt];return vn(lr,function(dr,ur){var Ht=dr.invoke(ur,lr),sr=dr.shared,Vt=sr.framebuffer,Dr=ur.def(Vt,".getFramebuffer(",Ht,")");ur.set(Vt,".next",Dr);var Jr=sr.context;return ur.set(Jr,"."+vt,Dr+"?"+Dr+".width:"+Jr+"."+yr),ur.set(Jr,"."+Lt,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Zn(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Ht){if(Ht in nr){var sr=nr[Ht],Vt=!0,Dr=sr.x|0,Jr=sr.y|0,ga,vi;return"width"in sr?ga=sr.width|0:Vt=!1,"height"in sr?vi=sr.height|0:Vt=!1,new La(!Vt&&kt&&kt.thisDep,!Vt&&kt&&kt.contextDep,!Vt&&kt&&kt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in sr||(_i=Fi.def(ui,".",vt,"-",Dr));var Si=vi;return"height"in sr||(Si=Fi.def(ui,".",Lt,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Ht in hr){var Ga=hr[Ht],ai=vn(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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",vt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Lt,"-",Ui,")");return[Si,Ui,fn,_o]});return kt&&(ai.thisDep=ai.thisDep||kt.thisDep,ai.contextDep=ai.contextDep||kt.contextDep,ai.propDep=ai.propDep||kt.propDep),ai}else return kt?new La(kt.thisDep,kt.contextDep,kt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",vt),Fi.def(ui,".",Lt)]}):null}var dr=lr(Se);if(dr){var ur=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Ht,sr){var Vt=ur.append(Ht,sr),Dr=Ht.shared.context;return sr.set(Dr,"."+At,Vt[2]),sr.set(Dr,"."+zt,Vt[3]),Vt})}return{viewport:dr,scissor_box:lr(we)}}function Ds(yt,kt){var Bt=yt.static,nr=typeof Bt[Nt]=="string"&&typeof Bt[St]=="string";if(nr){if(Object.keys(kt.dynamic).length>0)return null;var hr=kt.static,lr=Object.keys(hr);if(lr.length>0&&typeof hr[lr[0]]=="number"){for(var dr=[],ur=0;ur<lr.length;++ur)dr.push([hr[lr[ur]]|0,lr[ur]]);return dr}}return null}function bl(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Vt){if(Vt in nr){var Dr=Zt.id(nr[Vt]),Jr=rn(function(){return Dr});return Jr.id=Dr,Jr}else if(Vt in hr){var ga=hr[Vt];return vn(ga,function(vi,Ga){var ai=vi.invoke(Ga,ga),Zi=Ga.def(vi.shared.strings,".id(",ai,")");return Zi})}return null}var dr=lr(Nt),ur=lr(St),Ht=null,sr;return sn(dr)&&sn(ur)?(Ht=si.program(ur.id,dr.id,null,Bt),sr=rn(function(Vt,Dr){return Vt.link(Ht)})):sr=new La(dr&&dr.thisDep||ur&&ur.thisDep,dr&&dr.contextDep||ur&&ur.contextDep,dr&&dr.propDep||ur&&ur.propDep,function(Vt,Dr){var Jr=Vt.shared.shader,ga;dr?ga=dr.append(Vt,Dr):ga=Dr.def(Jr,".",Nt);var vi;ur?vi=ur.append(Vt,Dr):vi=Dr.def(Jr,".",St);var Ga=Jr+".program("+vi+","+ga;return Dr.def(Ga+")")}),{frag:dr,vert:ur,progVar:sr,program:Ht}}function po(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={},lr=!1;function dr(){if(He in Bt){var Fi=Bt[He];return Fi!==null&&yi.getVAO(Fi)===null&&(Fi=yi.createVAO(Fi)),lr=!0,hr.vao=Fi,rn(function(_i){var Si=yi.getVAO(Fi);return Si?_i.link(Si):"null"})}else if(He in nr){lr=!0;var ui=nr[He];return vn(ui,function(_i,Si){var Ui=_i.invoke(Si,ui);return Si.def(_i.shared.vao+".getVAO("+Ui+")")})}return null}var ur=dr(),Ht=!1;function sr(){if($t in Bt){var Fi=Bt[$t];if(hr.elements=Fi,fi(Fi)){var ui=hr.elements=ma.create(Fi,!0);Fi=ma.getElements(ui),Ht=!0}else Fi&&(Fi=ma.getElements(Fi),Ht=!0);var _i=rn(function(Ui,fn){if(Fi){var _o=Ui.link(Fi);return Ui.ELEMENTS=_o,_o}return Ui.ELEMENTS=null,null});return _i.value=Fi,_i}else if($t in nr){Ht=!0;var Si=nr[$t];return vn(Si,function(Ui,fn){var _o=Ui.shared,Bo=_o.isBufferArgs,Ps=_o.elements,Do=Ui.invoke(fn,Si),Ms=fn.def("null"),Ys=fn.def(Bo,"(",Do,")"),mu=Ui.cond(Ys).then(Ms,"=",Ps,".createStream(",Do,");").else(Ms,"=",Ps,".getElements(",Do,");");return fn.entry(mu),fn.exit(Ui.cond(Ys).then(Ps,".destroyStream(",Ms,");")),Ui.ELEMENTS=Ms,Ms})}else if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.elements+".getElements("+Ui.shared.vao+".currentVAO.elements):null")});return null}var Vt=sr();function Dr(){if(Tr in Bt){var Fi=Bt[Tr];return hr.primitive=Fi,rn(function(_i,Si){return Ra[Fi]})}else if(Tr in nr){var ui=nr[Tr];return vn(ui,function(_i,Si){var Ui=_i.constants.primTypes,fn=_i.invoke(Si,ui);return Si.def(Ui,"[",fn,"]")})}else{if(Ht)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(lr)return new La(ur.thisDep,ur.contextDep,ur.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 Bt){var _i=Bt[Fi]|0;return ui?hr.offset=_i:hr.instances=_i,rn(function(Ui,fn){return ui&&(Ui.OFFSET=_i),_i})}else if(Fi in nr){var Si=nr[Fi];return vn(Si,function(Ui,fn){var _o=Ui.invoke(fn,Si);return ui&&(Ui.OFFSET=_o),_o})}else if(ui){if(Ht)return rn(function(Ui,fn){return Ui.OFFSET=0,0});if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.offset:0")})}else if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.instances:-1")});return null}var ga=Jr(Kr,!0);function vi(){if(Ar in Bt){var Fi=Bt[Ar]|0;return hr.count=Fi,rn(function(){return Fi})}else if(Ar in nr){var ui=nr[Ar];return vn(ui,function(fn,_o){var Bo=fn.invoke(_o,ui);return Bo})}else if(Ht)if(sn(Vt)){if(Vt)return ga?new La(ga.thisDep,ga.contextDep,ga.propDep,function(fn,_o){var Bo=_o.def(fn.ELEMENTS,".vertCount-",fn.OFFSET);return Bo}):rn(function(fn,_o){return _o.def(fn.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(fn,_o){var Bo=fn.ELEMENTS;return fn.OFFSET?_o.def(Bo,"?",Bo,".vertCount-",fn.OFFSET,":-1"):_o.def(Bo,"?",Bo,".vertCount:-1")});return Si}else if(lr){var Ui=new La(ur.thisDep,ur.contextDep,ur.propDep,function(fn,_o){return _o.def(fn.shared.vao,".currentVAO?",fn.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:ur,vaoActive:lr,elementsActive:Ht,static:hr}}function Wl(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Ha.forEach(function(lr){var dr=Ri(lr);function ur(Ht,sr){if(lr in Bt){var Vt=Ht(Bt[lr]);hr[dr]=rn(function(){return Vt})}else if(lr in nr){var Dr=nr[lr];hr[dr]=vn(Dr,function(Jr,ga){return sr(Jr,ga,Jr.invoke(ga,Dr))})}}switch(lr){case Iu:case bs:case el:case Dc:case Un:case ie:case Rc:case yc:case ho:case Rs:return ur(function(Ht){return Ht},function(Ht,sr,Vt){return Vt});case Lo:return ur(function(Ht){return Sa[Ht]},function(Ht,sr,Vt){var Dr=Ht.constants.compareFuncs;return sr.def(Dr,"[",Vt,"]")});case Js:return ur(function(Ht){return Ht},function(Ht,sr,Vt){var Dr=sr.def("+",Vt,"[0]"),Jr=sr.def("+",Vt,"[1]");return[Dr,Jr]});case ll:return ur(function(Ht){var sr="srcRGB"in Ht?Ht.srcRGB:Ht.src,Vt="srcAlpha"in Ht?Ht.srcAlpha:Ht.src,Dr="dstRGB"in Ht?Ht.dstRGB:Ht.dst,Jr="dstAlpha"in Ht?Ht.dstAlpha:Ht.dst;return[ti[sr],ti[Dr],ti[Vt],ti[Jr]]},function(Ht,sr,Vt){var Dr=Ht.constants.blendFuncs;function Jr(ui,_i){var Si=sr.def('"',ui,_i,'" in ',Vt,"?",Vt,".",ui,_i,":",Vt,".",ui);return Si}var ga=Jr("src","RGB"),vi=Jr("dst","RGB"),Ga=sr.def(Dr,"[",ga,"]"),ai=sr.def(Dr,"[",Jr("src","Alpha"),"]"),Zi=sr.def(Dr,"[",vi,"]"),Fi=sr.def(Dr,"[",Jr("dst","Alpha"),"]");return[Ga,Zi,ai,Fi]});case _l:return ur(function(Ht){if(typeof Ht=="string")return[Qa[Ht],Qa[Ht]];if(typeof Ht=="object")return[Qa[Ht.rgb],Qa[Ht.alpha]]},function(Ht,sr,Vt){var Dr=Ht.constants.blendEquations,Jr=sr.def(),ga=sr.def(),vi=Ht.cond("typeof ",Vt,'==="string"');return vi.then(Jr,"=",ga,"=",Dr,"[",Vt,"];"),vi.else(Jr,"=",Dr,"[",Vt,".rgb];",ga,"=",Dr,"[",Vt,".alpha];"),sr(vi),[Jr,ga]});case Fl:return ur(function(Ht){return d(4,function(sr){return+Ht[sr]})},function(Ht,sr,Vt){return d(4,function(Dr){return sr.def("+",Vt,"[",Dr,"]")})});case lc:return ur(function(Ht){return Ht|0},function(Ht,sr,Vt){return sr.def(Vt,"|0")});case Yu:return ur(function(Ht){var sr=Ht.cmp||"keep",Vt=Ht.ref||0,Dr="mask"in Ht?Ht.mask:-1;return[Sa[sr],Vt,Dr]},function(Ht,sr,Vt){var Dr=Ht.constants.compareFuncs,Jr=sr.def('"cmp" in ',Vt,"?",Dr,"[",Vt,".cmp]",":",Ot),ga=sr.def(Vt,".ref|0"),vi=sr.def('"mask" in ',Vt,"?",Vt,".mask|0:-1");return[Jr,ga,vi]});case Ue:case I:return ur(function(Ht){var sr=Ht.fail||"keep",Vt=Ht.zfail||"keep",Dr=Ht.zpass||"keep";return[lr===I?Fe:de,Fa[sr],Fa[Vt],Fa[Dr]]},function(Ht,sr,Vt){var Dr=Ht.constants.stencilOps;function Jr(ga){return sr.def('"',ga,'" in ',Vt,"?",Dr,"[",Vt,".",ga,"]:",Ot)}return[lr===I?Fe:de,Jr("fail"),Jr("zfail"),Jr("zpass")]});case Au:return ur(function(Ht){var sr=Ht.factor|0,Vt=Ht.units|0;return[sr,Vt]},function(Ht,sr,Vt){var Dr=sr.def(Vt,".factor|0"),Jr=sr.def(Vt,".units|0");return[Dr,Jr]});case Zu:return ur(function(Ht){var sr=0;return Ht==="front"?sr=de:Ht==="back"&&(sr=Fe),sr},function(Ht,sr,Vt){return sr.def(Vt,'==="front"?',de,":",Fe)});case bu:return ur(function(Ht){return Ht},function(Ht,sr,Vt){return Vt});case Ic:return ur(function(Ht){return Xa[Ht]},function(Ht,sr,Vt){return sr.def(Vt+'==="cw"?'+et+":"+mt)});case uu:return ur(function(Ht){return Ht.map(function(sr){return!!sr})},function(Ht,sr,Vt){return d(4,function(Dr){return"!!"+Vt+"["+Dr+"]"})});case Ro:return ur(function(Ht){var sr="value"in Ht?Ht.value:1,Vt=!!Ht.invert;return[sr,Vt]},function(Ht,sr,Vt){var Dr=sr.def('"value" in ',Vt,"?+",Vt,".value:1"),Jr=sr.def("!!",Vt,".invert");return[Dr,Jr]})}}),hr}function fs(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Object.keys(Bt).forEach(function(lr){var dr=Bt[lr],ur;if(typeof dr=="number"||typeof dr=="boolean")ur=rn(function(){return dr});else if(typeof dr=="function"){var Ht=dr._reglType;Ht==="texture2d"||Ht==="textureCube"?ur=rn(function(sr){return sr.link(dr)}):(Ht==="framebuffer"||Ht==="framebufferCube")&&(ur=rn(function(sr){return sr.link(dr.color[0])}))}else ya(dr)&&(ur=rn(function(sr){var Vt=sr.global.def("[",d(dr.length,function(Dr){return dr[Dr]}),"]");return Vt}));ur.value=dr,hr[lr]=ur}),Object.keys(nr).forEach(function(lr){var dr=nr[lr];hr[lr]=vn(dr,function(ur,Ht){return ur.invoke(Ht,dr)})}),hr}function Sl(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Object.keys(Bt).forEach(function(lr){var dr=Bt[lr],ur=Zt.id(lr),Ht=new Ma;if(fi(dr))Ht.state=eo,Ht.buffer=wa.getBuffer(wa.create(dr,Qr,!1,!0)),Ht.type=0;else{var sr=wa.getBuffer(dr);if(sr)Ht.state=eo,Ht.buffer=sr,Ht.type=0;else if("constant"in dr){var Vt=dr.constant;Ht.buffer="null",Ht.state=fo,typeof Vt=="number"?Ht.x=Vt:Qn.forEach(function(Zi,Fi){Fi<Vt.length&&(Ht[Zi]=Vt[Fi])})}else{fi(dr.buffer)?sr=wa.getBuffer(wa.create(dr.buffer,Qr,!1,!0)):sr=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=fa[dr.type]);var ai=dr.divisor|0;Ht.buffer=sr,Ht.state=eo,Ht.size=ga,Ht.normalized=vi,Ht.type=Ga||sr.dtype,Ht.offset=Dr,Ht.stride=Jr,Ht.divisor=ai}}hr[lr]=rn(function(Zi,Fi){var ui=Zi.attribCache;if(ur in ui)return ui[ur];var _i={isStream:!1};return Object.keys(Ht).forEach(function(Si){_i[Si]=Ht[Si]}),Ht.buffer&&(_i.buffer=Zi.link(Ht.buffer),_i.type=_i.type||_i.buffer+".dtype"),ui[ur]=_i,_i})}),Object.keys(nr).forEach(function(lr){var dr=nr[lr];function ur(Ht,sr){var Vt=Ht.invoke(sr,dr),Dr=Ht.shared,Jr=Ht.constants,ga=Dr.isBufferArgs,vi=Dr.buffer,Ga={isStream:sr.def(!1)},ai=new Ma;ai.state=eo,Object.keys(ai).forEach(function(_i){Ga[_i]=sr.def(""+ai[_i])});var Zi=Ga.buffer,Fi=Ga.type;sr("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,"=",fo,";","if(typeof "+Vt+'.constant === "number"){',Ga[Qn[0]],"=",Vt,".constant;",Qn.slice(1).map(function(_i){return Ga[_i]}).join("="),"=0;","}else{",Qn.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){sr(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),sr("}}"),sr.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[lr]=vn(dr,ur)}),hr}function kl(yt){var kt=yt.static,Bt=yt.dynamic,nr={};return Object.keys(kt).forEach(function(hr){var lr=kt[hr];nr[hr]=rn(function(dr,ur){return typeof lr=="number"||typeof lr=="boolean"?""+lr:dr.link(lr)})}),Object.keys(Bt).forEach(function(hr){var lr=Bt[hr];nr[hr]=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}),nr}function tu(yt,kt,Bt,nr,hr){var lr=yt.static,dr=yt.dynamic,ur=Ds(yt,kt),Ht=Dn(yt,hr),sr=Zn(yt,Ht,hr),Vt=po(yt,hr),Dr=Wl(yt,hr),Jr=bl(yt,hr,ur);function ga(ui){var _i=sr[ui];_i&&(Dr[ui]=_i)}ga(Se),ga(Ri(we));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Ht,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=kn(yt,hr),Ga.uniforms=fs(Bt,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!ur&&fr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=kt.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 ur?Ga.useVAO=!0:Ga.attributes=Sl(kt,hr),Ga.context=kl(nr,hr),Ga}function qs(yt,kt,Bt){var nr=yt.shared,hr=nr.context,lr=yt.scope();Object.keys(Bt).forEach(function(dr){kt.save(hr,"."+dr);var ur=Bt[dr],Ht=ur.append(yt,kt);Array.isArray(Ht)?lr(hr,".",dr,"=[",Ht.join(),"];"):lr(hr,".",dr,"=",Ht,";")}),kt(lr)}function pl(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.framebuffer,ur;Va&&(ur=kt.def(hr.extensions,".webgl_draw_buffers"));var Ht=yt.constants,sr=Ht.drawBuffer,Vt=Ht.backBuffer,Dr;Bt?Dr=Bt.append(yt,kt):Dr=kt.def(dr,".next"),nr||kt("if(",Dr,"!==",dr,".cur){"),kt("if(",Dr,"){",lr,".bindFramebuffer(",da,",",Dr,".framebuffer);"),Va&&kt(ur,".drawBuffersWEBGL(",sr,"[",Dr,".colorAttachments.length]);"),kt("}else{",lr,".bindFramebuffer(",da,",null);"),Va&&kt(ur,".drawBuffersWEBGL(",Vt,");"),kt("}",dr,".cur=",Dr,";"),nr||kt("}")}function wl(yt,kt,Bt){var nr=yt.shared,hr=nr.gl,lr=yt.current,dr=yt.next,ur=nr.current,Ht=nr.next,sr=yt.cond(ur,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Bt.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=lr[Dr];var vi=d(Li[Dr].length,function(ai){return sr.def(Jr,"[",ai,"]")});sr(yt.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=sr.def(Ht,".",Dr);var Ga=yt.cond(Jr,"!==",ur,".",Dr);sr(Ga),Dr in Ua?Ga(yt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),ur,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",ur,".",Dr,"=",Jr,";")}}}),Object.keys(Bt.state).length===0&&sr(ur,".dirty=false;"),kt(sr)}function Yn(yt,kt,Bt,nr){var hr=yt.shared,lr=yt.current,dr=hr.current,ur=hr.gl,Ht;ni(Object.keys(Bt)).forEach(function(sr){var Vt=Bt[sr];if(!(nr&&!nr(Vt))){var Dr=Vt.append(yt,kt);if(Ua[sr]){var Jr=Ua[sr];sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(yt.cond(Ht).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Ht,";")):(kt(yt.cond(Dr).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Dr,";"))}else if(ya(Dr)){var ga=lr[sr];kt(ur,".",Yi[sr],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(ur,".",Yi[sr],"(",Ht,");",dr,".",sr,"=",Ht,";")):kt(ur,".",Yi[sr],"(",Dr,");",dr,".",sr,"=",Dr,";")}})}function Cl(yt,kt){di&&(yt.instancing=kt.def(yt.shared.extensions,".angle_instanced_arrays"))}function Co(yt,kt,Bt,nr,hr){var lr=yt.shared,dr=yt.stats,ur=lr.current,Ht=lr.timer,sr=Bt.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=kt.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(nr?(Jr=kt.def(),ui(Jr,"=",Ht,".getNumPendingQueries();")):ui(Ht,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(nr?ui(Ht,".pushScopeStats(",Jr,",",Ht,".getNumPendingQueries(),",dr,");"):ui(Ht,".endQuery();"))}function Ga(ui){var _i=kt.def(ur,".profile");kt(ur,".profile=",ui,";"),kt.exit(ur,".profile=",_i,";")}var ai;if(sr){if(sn(sr)){sr.enable?(ga(kt),vi(kt.exit),Ga("true")):Ga("false");return}ai=sr.append(yt,kt),Ga(ai)}else ai=kt.def(ur,".profile");var Zi=yt.block();ga(Zi),kt("if(",ai,"){",Zi,"}");var Fi=yt.block();vi(Fi),kt.exit("if(",ai,"){",Fi,"}")}function ve(yt,kt,Bt,nr,hr){var lr=yt.shared;function dr(Ht){switch(Ht){case is:case ul:case Il:return 2;case Ao:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function ur(Ht,sr,Vt){var Dr=lr.gl,Jr=kt.def(Ht,".location"),ga=kt.def(lr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){kt("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=kt.def(Vt.size,"||",sr):Si=sr,kt("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(fn){return ga+"."+fn+"!=="+Vt[fn]}).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(fn){return ga+"."+fn+"="+Vt[fn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;kt("if(",ga,".divisor!==",Ui,"){",yt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){kt("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",Qn.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===fo?ui():(kt("if(",vi,"===",eo,"){"),Fi(),kt("}else{"),ui(),kt("}"))}nr.forEach(function(Ht){var sr=Ht.name,Vt=Bt.attributes[sr],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(yt,kt)}else{if(!hr(Pn))return;var Jr=yt.scopeAttrib(sr);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=kt.def(Jr,".",ga)})}ur(yt.link(Ht),dr(Ht.info.type),Dr)})}function K(yt,kt,Bt,nr,hr,lr){for(var dr=yt.shared,ur=dr.gl,Ht,sr=0;sr<nr.length;++sr){var Vt=nr[sr],Dr=Vt.name,Jr=Vt.info.type,ga=Bt.uniforms[Dr],vi=yt.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=yt.link(Zi._texture||Zi.color[0]._texture);kt(ur,".uniform1i(",Ga,",",Fi+".bind());"),kt.exit(Fi,".unbind();")}else if(Jr===vu||Jr===Tl||Jr===cu){var ui=yt.global.def("new Float32Array(["+Array.prototype.slice.call(Zi)+"])"),_i=2;Jr===Tl?_i=3:Jr===cu&&(_i=4),kt(ur,".uniformMatrix",_i,"fv(",Ga,",false,",ui,");")}else{switch(Jr){case wo:Ht="1f";break;case is:Ht="2f";break;case Ao:Ht="3f";break;case Zo:Ht="4f";break;case $o:Ht="1i";break;case ps:Ht="1i";break;case Il:Ht="2i";break;case ul:Ht="2i";break;case eu:Ht="3i";break;case tl:Ht="3i";break;case Ru:Ht="4i";break;case Jo:Ht="4i";break}kt(ur,".uniform",Ht,"(",Ga,",",ya(Zi)?Array.prototype.slice.call(Zi):Zi,");")}continue}else ai=ga.append(yt,kt)}else{if(!hr(Pn))continue;ai=kt.def(dr.uniforms,"[",Zt.id(Dr),"]")}Jr===uc?kt("if(",ai,"&&",ai,'._reglType==="framebuffer"){',ai,"=",ai,".color[0];","}"):Jr===Vl&&kt("if(",ai,"&&",ai,'._reglType==="framebufferCube"){',ai,"=",ai,".color[0];","}");var Si=1;switch(Jr){case uc:case Vl:var Ui=kt.def(ai,"._texture");kt(ur,".uniform1i(",Ga,",",Ui,".bind());"),kt.exit(Ui,".unbind();");continue;case ps:case $o:Ht="1i";break;case ul:case Il:Ht="2i",Si=2;break;case tl:case eu:Ht="3i",Si=3;break;case Jo:case Ru:Ht="4i",Si=4;break;case wo:Ht="1f";break;case is:Ht="2f",Si=2;break;case Ao:Ht="3f",Si=3;break;case Zo:Ht="4f",Si=4;break;case vu:Ht="Matrix2fv";break;case Tl:Ht="Matrix3fv";break;case cu:Ht="Matrix4fv";break}if(Ht.charAt(0)==="M"){kt(ur,".uniform",Ht,"(",Ga,",");var fn=Math.pow(Jr-vu+2,2),_o=yt.global.def("new Float32Array(",fn,")");Array.isArray(ai)?kt("false,(",d(fn,function(Ys){return _o+"["+Ys+"]="+ai[Ys]}),",",_o,")"):kt("false,(Array.isArray(",ai,")||",ai," instanceof Float32Array)?",ai,":(",d(fn,function(Ys){return _o+"["+Ys+"]="+ai+"["+Ys+"]"}),",",_o,")"),kt(");")}else if(Si>1){for(var Bo=[],Ps=[],Do=0;Do<Si;++Do)Array.isArray(ai)?Ps.push(ai[Do]):Ps.push(kt.def(ai+"["+Do+"]")),lr&&Bo.push(kt.def());lr&&kt("if(!",yt.batchId,"||",Bo.map(function(Ys,mu){return Ys+"!=="+Ps[mu]}).join("||"),"){",Bo.map(function(Ys,mu){return Ys+"="+Ps[mu]+";"}).join("")),kt(ur,".uniform",Ht,"(",Ga,",",Ps.join(","),");"),lr&&kt("}")}else{if(lr){var Ms=kt.def();kt("if(!",yt.batchId,"||",Ms,"!==",ai,"){",Ms,"=",ai,";")}kt(ur,".uniform",Ht,"(",Ga,",",ai,");"),lr&&kt("}")}}}function _e(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.draw,ur=nr.draw;function Ht(){var Si=ur.elements,Ui,fn=kt;return Si?((Si.contextDep&&nr.contextDynamic||Si.propDep)&&(fn=Bt),Ui=Si.append(yt,fn),ur.elementsActive&&fn("if("+Ui+")"+lr+".bindBuffer("+pa+","+Ui+".buffer.buffer);")):(Ui=fn.def(),fn(Ui,"=",dr,".",$t,";","if(",Ui,"){",lr,".bindBuffer(",pa,",",Ui,".buffer.buffer);}","else if(",hr.vao,".currentVAO){",Ui,"=",yt.shared.elements+".getElements("+hr.vao,".currentVAO.elements);",Bi?"":"if("+Ui+")"+lr+".bindBuffer("+pa+","+Ui+".buffer.buffer);","}")),Ui}function sr(){var Si=ur.count,Ui,fn=kt;return Si?((Si.contextDep&&nr.contextDynamic||Si.propDep)&&(fn=Bt),Ui=Si.append(yt,fn)):Ui=fn.def(dr,".",Ar),Ui}var Vt=Ht();function Dr(Si){var Ui=ur[Si];return Ui?Ui.contextDep&&nr.contextDynamic||Ui.propDep?Ui.append(yt,Bt):Ui.append(yt,kt):kt.def(dr,".",Si)}var Jr=Dr(Tr),ga=Dr(Kr),vi=sr();if(typeof vi=="number"){if(vi===0)return}else Bt("if(",vi,"){"),Bt.exit("}");var Ga,ai;di&&(Ga=Dr(na),ai=yt.instancing);var Zi=Vt+".type",Fi=ur.elements&&sn(ur.elements)&&!ur.vaoActive;function ui(){function Si(){Bt(ai,".drawElementsInstancedANGLE(",[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)",Ga],");")}function Ui(){Bt(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}function _i(){function Si(){Bt(lr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)"]+");")}function Ui(){Bt(lr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Bt("if(",Ga,">0){"),ui(),Bt("}else if(",Ga,"<0){"),_i(),Bt("}")):ui():_i()}function te(yt,kt,Bt,nr,hr){var lr=an(),dr=lr.proc("body",hr);return di&&(lr.instancing=dr.def(lr.shared.extensions,".angle_instanced_arrays")),yt(lr,dr,Bt,nr),lr.compile().body}function me(yt,kt,Bt,nr){Cl(yt,kt),Bt.useVAO?Bt.drawVAO?kt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,kt),");"):kt(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(kt(yt.shared.vao,".setVAO(null);"),ve(yt,kt,Bt,nr.attributes,function(){return!0})),K(yt,kt,Bt,nr.uniforms,function(){return!0},!1),_e(yt,kt,kt,Bt)}function Ge(yt,kt){var Bt=yt.proc("draw",1);Cl(yt,Bt),qs(yt,Bt,kt.context),pl(yt,Bt,kt.framebuffer),wl(yt,Bt,kt),Yn(yt,Bt,kt.state),Co(yt,Bt,kt,!1,!0);var nr=kt.shader.progVar.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",nr,".program);"),kt.shader.program)me(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var hr=yt.global.def("{}"),lr=Bt.def(nr,".id"),dr=Bt.def(hr,"[",lr,"]");Bt(yt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",lr,"]=",yt.link(function(ur){return te(me,yt,kt,ur,1)}),"(",nr,");",dr,".call(this,a0);"))}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function Le(yt,kt,Bt,nr){yt.batchId="a1",Cl(yt,kt);function hr(){return!0}ve(yt,kt,Bt,nr.attributes,hr),K(yt,kt,Bt,nr.uniforms,hr,!1),_e(yt,kt,kt,Bt)}function $e(yt,kt,Bt,nr){Cl(yt,kt);var hr=Bt.contextDep,lr=kt.def(),dr="a0",ur="a1",Ht=kt.def();yt.shared.props=Ht,yt.batchId=lr;var sr=yt.scope(),Vt=yt.scope();kt(sr.entry,"for(",lr,"=0;",lr,"<",ur,";++",lr,"){",Ht,"=",dr,"[",lr,"];",Vt,"}",sr.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Bt.needsContext&&qs(yt,Vt,Bt.context),Bt.needsFramebuffer&&pl(yt,Vt,Bt.framebuffer),Yn(yt,Vt,Bt.state,Dr),Bt.profile&&Dr(Bt.profile)&&Co(yt,Vt,Bt,!1,!0),nr)Bt.useVAO?Bt.drawVAO?Dr(Bt.drawVAO)?Vt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,Vt),");"):sr(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,sr),");"):sr(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(sr(yt.shared.vao,".setVAO(null);"),ve(yt,sr,Bt,nr.attributes,Jr),ve(yt,Vt,Bt,nr.attributes,Dr)),K(yt,sr,Bt,nr.uniforms,Jr,!1),K(yt,Vt,Bt,nr.uniforms,Dr,!0),_e(yt,sr,Vt,Bt);else{var ga=yt.global.def("{}"),vi=Bt.shader.progVar.append(yt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(yt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",yt.link(function(Zi){return te(Le,yt,Bt,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",lr,"],",lr,");")}}function gt(yt,kt){var Bt=yt.proc("batch",2);yt.batchId="0",Cl(yt,Bt);var nr=!1,hr=!0;Object.keys(kt.context).forEach(function(ga){nr=nr||kt.context[ga].propDep}),nr||(qs(yt,Bt,kt.context),hr=!1);var lr=kt.framebuffer,dr=!1;lr?(lr.propDep?nr=dr=!0:lr.contextDep&&nr&&(dr=!0),dr||pl(yt,Bt,lr)):pl(yt,Bt,null),kt.state.viewport&&kt.state.viewport.propDep&&(nr=!0);function ur(ga){return ga.contextDep&&nr||ga.propDep}wl(yt,Bt,kt),Yn(yt,Bt,kt.state,function(ga){return!ur(ga)}),(!kt.profile||!ur(kt.profile))&&Co(yt,Bt,kt,!1,"a1"),kt.contextDep=nr,kt.needsContext=hr,kt.needsFramebuffer=dr;var Ht=kt.shader.progVar;if(Ht.contextDep&&nr||Ht.propDep)$e(yt,Bt,kt,null);else{var sr=Ht.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",sr,".program);"),kt.shader.program)$e(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var Vt=yt.global.def("{}"),Dr=Bt.def(sr,".id"),Jr=Bt.def(Vt,"[",Dr,"]");Bt(yt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",yt.link(function(ga){return te($e,yt,kt,ga,2)}),"(",sr,");",Jr,".call(this,a0,a1);"))}}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function jt(yt,kt){var Bt=yt.proc("scope",3);yt.batchId="a2";var nr=yt.shared,hr=nr.current;if(qs(yt,Bt,kt.context),kt.framebuffer&&kt.framebuffer.append(yt,Bt),ni(Object.keys(kt.state)).forEach(function(ur){var Ht=kt.state[ur],sr=Ht.append(yt,Bt);ya(sr)?sr.forEach(function(Vt,Dr){Xi(Vt)?Bt.set(yt.next[ur],"["+Dr+"]",Vt):Bt.set(yt.next[ur],"["+Dr+"]",yt.link(Vt,{stable:!0}))}):sn(Ht)?Bt.set(nr.next,"."+ur,yt.link(sr,{stable:!0})):Bt.set(nr.next,"."+ur,sr)}),Co(yt,Bt,kt,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(ur){var Ht=kt.draw[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.draw,"."+ur,sr):Bt.set(nr.draw,"."+ur,yt.link(sr),{stable:!0})}}),Object.keys(kt.uniforms).forEach(function(ur){var Ht=kt.uniforms[ur].append(yt,Bt);Array.isArray(Ht)&&(Ht="["+Ht.map(function(sr){return Xi(sr)?sr:yt.link(sr,{stable:!0})})+"]"),Bt.set(nr.uniforms,"["+yt.link(Zt.id(ur),{stable:!0})+"]",Ht)}),Object.keys(kt.attributes).forEach(function(ur){var Ht=kt.attributes[ur].append(yt,Bt),sr=yt.scopeAttrib(ur);Object.keys(new Ma).forEach(function(Vt){Bt.set(sr,"."+Vt,Ht[Vt])})}),kt.scopeVAO){var lr=kt.scopeVAO.append(yt,Bt);Xi(lr)?Bt.set(nr.vao,".targetVAO",lr):Bt.set(nr.vao,".targetVAO",yt.link(lr,{stable:!0}))}function dr(ur){var Ht=kt.shader[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.shader,"."+ur,sr):Bt.set(nr.shader,"."+ur,yt.link(sr,{stable:!0}))}}dr(St),dr(Nt),Object.keys(kt.state).length>0&&(Bt(hr,".dirty=true;"),Bt.exit(hr,".dirty=true;")),Bt("a1(",yt.shared.context,",a0,",yt.batchId,");")}function wr(yt){if(!(typeof yt!="object"||ya(yt))){for(var kt=Object.keys(yt),Bt=0;Bt<kt.length;++Bt)if(h.isDynamic(yt[kt[Bt]]))return!0;return!1}}function Nr(yt,kt,Bt){var nr=kt.static[Bt];if(!nr||!wr(nr))return;var hr=yt.global,lr=Object.keys(nr),dr=!1,ur=!1,Ht=!1,sr=yt.global.def("{}");lr.forEach(function(Dr){var Jr=nr[Dr];if(h.isDynamic(Jr)){typeof Jr=="function"&&(Jr=nr[Dr]=h.unbox(Jr));var ga=vn(Jr,null);dr=dr||ga.thisDep,Ht=Ht||ga.propDep,ur=ur||ga.contextDep}else{switch(hr(sr,".",Dr,"="),typeof Jr){case"number":hr(Jr);break;case"string":hr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&hr("[",Jr.join(),"]");break;default:hr(yt.link(Jr));break}hr(";")}});function Vt(Dr,Jr){lr.forEach(function(ga){var vi=nr[ga];if(h.isDynamic(vi)){var Ga=Dr.invoke(Jr,vi);Jr(sr,".",ga,"=",Ga,";")}})}kt.dynamic[Bt]=new h.DynamicVariable(Ss,{thisDep:dr,contextDep:ur,propDep:Ht,ref:sr,append:Vt}),delete kt.static[Bt]}function pr(yt,kt,Bt,nr,hr){var lr=an();lr.stats=lr.link(hr),Object.keys(kt.static).forEach(function(ur){Nr(lr,kt,ur)}),jr.forEach(function(ur){Nr(lr,yt,ur)});var dr=tu(yt,kt,Bt,nr,lr);return dr.shader.program&&(dr.shader.program.attributes.sort(function(ur,Ht){return ur.name<Ht.name?-1:1}),dr.shader.program.uniforms.sort(function(ur,Ht){return ur.name<Ht.name?-1:1})),Ge(lr,dr),jt(lr,dr),gt(lr,dr),v(lr.compile(),{destroy:function(){dr.shader.program.destroy()}})}return{next:pn,current:Li,procs:function(){var yt=an(),kt=yt.proc("poll"),Bt=yt.proc("refresh"),nr=yt.block();kt(nr),Bt(nr);var hr=yt.shared,lr=hr.gl,dr=hr.next,ur=hr.current;nr(ur,".dirty=false;"),pl(yt,kt),pl(yt,Bt,null,!0);var Ht;di&&(Ht=yt.link(di)),fr.oes_vertex_array_object&&Bt(yt.link(fr.oes_vertex_array_object),".bindVertexArrayOES(null);");var sr=Bt.def(hr.attributes),Vt=Bt.def(0),Dr=yt.cond(Vt,".buffer");Dr.then(lr,".enableVertexAttribArray(i);",lr,".bindBuffer(",Qr,",",Vt,".buffer.buffer);",lr,".vertexAttribPointer(i,",Vt,".size,",Vt,".type,",Vt,".normalized,",Vt,".stride,",Vt,".offset);").else(lr,".disableVertexAttribArray(i);",lr,".vertexAttrib4f(i,",Vt,".x,",Vt,".y,",Vt,".z,",Vt,".w);",Vt,".buffer=null;");var Jr=yt.link(oa.maxAttributes,{stable:!0});return Bt("for(var i=0;i<",Jr,";++i){",Vt,"=",sr,"[i];",Dr,"}"),di&&Bt("for(var i=0;i<",Jr,";++i){",Ht,".vertexAttribDivisorANGLE(i,",sr,"[i].divisor);","}"),Bt(yt.shared.vao,".currentVAO=null;",yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"),Object.keys(Ua).forEach(function(ga){var vi=Ua[ga],Ga=nr.def(dr,".",ga),ai=yt.block();ai("if(",Ga,"){",lr,".enable(",vi,")}else{",lr,".disable(",vi,")}",ur,".",ga,"=",Ga,";"),Bt(ai),kt("if(",Ga,"!==",ur,".",ga,"){",ai,"}")}),Object.keys(Yi).forEach(function(ga){var vi=Yi[ga],Ga=Li[ga],ai,Zi,Fi=yt.block();if(Fi(lr,".",vi,"("),ya(Ga)){var ui=Ga.length;ai=yt.global.def(dr,".",ga),Zi=yt.global.def(ur,".",ga),Fi(d(ui,function(_i){return ai+"["+_i+"]"}),");",d(ui,function(_i){return Zi+"["+_i+"]="+ai+"["+_i+"];"}).join("")),kt("if(",d(ui,function(_i){return ai+"["+_i+"]!=="+Zi+"["+_i+"]"}).join("||"),"){",Fi,"}")}else ai=nr.def(dr,".",ga),Zi=nr.def(ur,".",ga),Fi(ai,");",ur,".",ga,"=",ai,";"),kt("if(",ai,"!==",Zi,"){",Fi,"}");Bt(Fi)}),yt.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,io=34919,Ho=35007,cl=function(it,Zt){if(!Zt.ext_disjoint_timer_query)return null;var fr=[];function oa(){return fr.pop()||Zt.ext_disjoint_timer_query.createQueryEXT()}function wa(Qa){fr.push(Qa)}var ma=[];function _a(Qa){var di=oa();Zt.ext_disjoint_timer_query.beginQueryEXT(Ho,di),ma.push(di),Ei(ma.length-1,ma.length,Qa)}function Ya(){Zt.ext_disjoint_timer_query.endQueryEXT(Ho)}function bi(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var yi=[];function si(){return yi.pop()||new bi}function yn(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=ma.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<ma.length;++di){var Li=ma[di];Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,io)?(Bi+=Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,Yo),wa(Li)):ma[Qa++]=Li,Na[di+1]=Bi,ea[di+1]=Qa}for(ma.length=Qa,Qa=0,di=0;di<zi.length;++di){var pn=zi[di],Ha=pn.startQueryIndex,Ua=pn.endQueryIndex;pn.sum+=Na[Ua]-Na[Ha];var Yi=ea[Ha],Ri=ea[Ua];Ri===Yi?(pn.stats.gpuTime+=pn.sum/1e6,yn(pn)):(pn.startQueryIndex=Yi,pn.endQueryIndex=Ri,zi[Qa++]=pn)}zi.length=Qa}}return{beginQuery:_a,endQuery:Ya,pushScopeStats:Ei,update:Ma,getNumPendingQueries:function(){return ma.length},clear:function(){fr.push.apply(fr,ma);for(var Qa=0;Qa<fr.length;Qa++)Zt.ext_disjoint_timer_query.deleteQueryEXT(fr[Qa]);ma.length=0,fr.length=0},restore:function(){ma.length=0,fr.length=0}}},al=16384,xl=256,gn=1024,vo=34962,cs="webglcontextlost",ms="webglcontextrestored",Al=1,Hl=2,Su=3;function Rl(it,Zt){for(var fr=0;fr<it.length;++fr)if(it[fr]===Zt)return fr;return-1}function _c(it){var Zt=g(it);if(!Zt)return null;var fr=Zt.gl,oa=fr.getContextAttributes(),wa=fr.isContextLost(),ma=b(fr,Zt);if(!ma)return null;var _a=p(),Ya=ro(),bi=Zt.cachedCode||{},yi=ma.extensions,si=cl(fr,yi),yn=m(),zi=fr.drawingBufferWidth,Ei=fr.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(fr,yi),di=ra(fr,Ya,Zt,Li),Va=Xt(fr,yi,di,Ya),Bi=Pu(fr,yi,Qa,Ya,di,Va,Ma);function Li(te){return Bi.destroyBuffer(te)}var pn=Hu(fr,_a,Ya,Zt),Ha=Xc(fr,yi,Qa,function(){Ri.procs.poll()},Na,Ya,Zt),Ua=Mc(fr,yi,Qa,Ya,Zt),Yi=Yc(fr,yi,Qa,Ha,Ua,Ya),Ri=Jn(fr,_a,yi,Qa,di,Va,Ha,Yi,ea,Bi,pn,Ma,Na,si,bi,Zt),Ti=iu(fr,Yi,Ri.procs.poll,Na,oa,yi,Qa),xi=Ri.next,Xi=fr.canvas,mn=[],In=[],Ii=[],an=[Zt.onDestroy],kn=null;function Dn(){if(mn.length===0){si&&si.update(),kn=null;return}kn=c.next(Dn),wl();for(var te=mn.length-1;te>=0;--te){var me=mn[te];me&&me(Na,null,0)}fr.flush(),si&&si.update()}function Zn(){!kn&&mn.length>0&&(kn=c.next(Dn))}function Ds(){kn&&(c.cancel(Dn),kn=null)}function bl(te){te.preventDefault(),wa=!0,Ds(),In.forEach(function(me){me()})}function po(te){fr.getError(),wa=!1,ma.restore(),pn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Zn(),Ii.forEach(function(me){me()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(ms,po,!1));function Wl(){mn.length=0,Ds(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(ms,po)),pn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),an.forEach(function(te){te()})}function fs(te){function me(lr){var dr=v({},lr);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 ur(Ht){if(Ht in dr){var sr=dr[Ht];delete dr[Ht],Object.keys(sr).forEach(function(Vt){dr[Ht+"."+Vt]=sr[Vt]})}}return ur("blend"),ur("depth"),ur("cull"),ur("stencil"),ur("polygonOffset"),ur("scissor"),ur("sample"),"vao"in lr&&(dr.vao=lr.vao),dr}function Ge(lr,dr){var ur={},Ht={};return Object.keys(lr).forEach(function(sr){var Vt=lr[sr];if(h.isDynamic(Vt)){Ht[sr]=h.unbox(Vt,sr);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr<Vt.length;++Dr)if(h.isDynamic(Vt[Dr])){Ht[sr]=h.unbox(Vt,sr);return}}ur[sr]=Vt}),{dynamic:Ht,static:ur}}var Le=Ge(te.context||{},!0),$e=Ge(te.uniforms||{},!0),gt=Ge(te.attributes||{},!1),jt=Ge(me(te),!1),wr={gpuTime:0,cpuTime:0,count:0},Nr=Ri.compile(jt,gt,$e,Le,wr),pr=Nr.draw,yt=Nr.batch,kt=Nr.scope,Bt=[];function nr(lr){for(;Bt.length<lr;)Bt.push(null);return Bt}function hr(lr,dr){var ur;if(typeof lr=="function")return kt.call(this,null,lr,0);if(typeof dr=="function")if(typeof lr=="number")for(ur=0;ur<lr;++ur)kt.call(this,null,dr,ur);else if(Array.isArray(lr))for(ur=0;ur<lr.length;++ur)kt.call(this,lr[ur],dr,ur);else return kt.call(this,lr,dr,0);else if(typeof lr=="number"){if(lr>0)return yt.call(this,nr(lr|0),lr|0)}else if(Array.isArray(lr)){if(lr.length)return yt.call(this,lr,lr.length)}else return pr.call(this,lr)}return v(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,me){var Ge=0;Ri.procs.poll();var Le=me.color;Le&&(fr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=al),"depth"in me&&(fr.clearDepth(+me.depth),Ge|=xl),"stencil"in me&&(fr.clearStencil(me.stencil|0),Ge|=gn),fr.clear(Ge)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Sl(v({framebuffer:te.framebuffer.faces[me]},te),kl);else Sl(te,kl);else kl(null,te)}function qs(te){mn.push(te);function me(){var Ge=Rl(mn,te);function Le(){var $e=Rl(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ds()}mn[Ge]=Le}return Zn(),{cancel:me}}function pl(){var te=xi.viewport,me=xi.scissor_box;te[0]=te[1]=me[0]=me[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=me[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=me[3]=fr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Yn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(m()-yn)/1e3}Yn();function Co(te,me){var Ge;switch(te){case"frame":return qs(me);case"lost":Ge=In;break;case"restore":Ge=Ii;break;case"destroy":Ge=an;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le<Ge.length;++Le)if(Ge[Le]===me){Ge[Le]=Ge[Ge.length-1],Ge.pop();return}}}}function ve(){return bi}function K(te){Object.entries(te).forEach(function(me){bi[me[0]]=me[1]})}var _e=v(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,vo,!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:qs,on:Co,limits:Qa,hasExtension:function(te){return Qa.extensions.indexOf(te.toLowerCase())>=0},read:Ti,destroy:Wl,_gl:fr,_refresh:Yn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ve,preloadCachedCode:K});return Zt.onDone(null,_e),_e}return _c})}}),xq=Xe({"node_modules/gl-util/context.js"(Z,G){"use strict";var v=Ev();G.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=v(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}}}),bq=Xe({"node_modules/font-atlas/index.js"(Z,G){"use strict";var v=c6(),x=[32,126];G.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=v(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 c=o[0]/2,m=o[1]/2,i=0;i<a.length;i++)h.fillText(a[i],c,m),(c+=o[0])>e[0]-o[0]/2&&(c=o[0]/2,m+=o[1]);return t}}}),f6=Xe({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var G=32;Z.INT_BITS=G,Z.INT_MAX=2147483647,Z.INT_MIN=-1<<G-1,Z.sign=function(S){return(S>0)-(S<0)},Z.abs=function(S){var E=S>>G-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 v(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=v,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>>>v(S)+1}}}),wq=Xe({"node_modules/dup/dup.js"(Z,G){"use strict";function v(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]=v(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 v(E,e,0);break}return[]}G.exports=S}}),Tq=Xe({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var G=f6(),v=wq(),x=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var S=typeof Uint8ClampedArray<"u",E=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=v([32,0])),t.BIGUINT64||(t.BIGUINT64=v([32,0])),t.BIGINT64||(t.BIGINT64=v([32,0])),t.BUFFER||(t.BUFFER=v([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(x.isBuffer(u))o[G.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,f=G.log2(y)|0;r[f].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,y=G.log2(u);r[y].push(d)}}function n(d){a(d.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[G.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 c(u);case"int8":return m(u);case"int16":return p(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=G.nextPow2(u),y=G.log2(u),f=r[y];return f.length>0?f.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=i;function s(d){return new Uint8Array(i(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(i(2*d),0,d)}Z.mallocUint16=h;function c(d){return new Uint32Array(i(4*d),0,d)}Z.mallocUint32=c;function m(d){return new Int8Array(i(d),0,d)}Z.mallocInt8=m;function p(d){return new Int16Array(i(2*d),0,d)}Z.mallocInt16=p;function T(d){return new Int32Array(i(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(i(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function _(d){return new Float64Array(i(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=_;function w(d){return S?new Uint8ClampedArray(i(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return E?new BigUint64Array(i(8*d),0,d):null}Z.mallocBigUint64=A;function M(d){return e?new BigInt64Array(i(8*d),0,d):null}Z.mallocBigInt64=M;function g(d){return new DataView(i(d),0,d)}Z.mallocDataView=g;function b(d){d=G.nextPow2(d);var u=G.log2(d),y=o[u];return y.length>0?y.pop():new x(d)}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}}}),Aq=Xe({"node_modules/is-plain-obj/index.js"(Z,G){"use strict";var v=Object.prototype.toString;G.exports=function(x){var S;return v.call(x)==="[object Object]"&&(S=Object.getPrototypeOf(x),S===null||S===Object.getPrototypeOf({}))}}}),h6=Xe({"node_modules/parse-unit/index.js"(Z,G){G.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}}}),Sq=Xe({"node_modules/to-px/topx.js"(Z,G){"use strict";var v=h6();G.exports=e;var x=96;function S(t,r){var o=v(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}}}),Mq=Xe({"node_modules/detect-kerning/index.js"(Z,G){"use strict";G.exports=E;var v=E.canvas=document.createElement("canvas"),x=v.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],c=x.measureText(h[0]).width+x.measureText(h[1]).width,m=x.measureText(h).width;if(Math.abs(c-m)>n*i){var p=(m-c)/n;o[h]=p*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}}}),Eq=Xe({"node_modules/font-measure/index.js"(Z,G){"use strict";G.exports=v,v.canvas=document.createElement("canvas"),v.cache={};function v(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(v.cache[r]&&o<=v.cache[r].em)return x(v.cache[r],s);var h=t.canvas||v.canvas,c=h.getContext("2d"),m={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"},p=Math.ceil(o*1.5);h.height=p,h.width=p*.5,c.font=i;var T="H",l={top:0};c.clearRect(0,0,p,p),c.textBaseline="top",c.fillStyle="black",c.fillText(T,0,0);var _=S(c.getImageData(0,0,p,p));c.clearRect(0,0,p,p),c.textBaseline="bottom",c.fillText(T,0,p);var w=S(c.getImageData(0,0,p,p));l.lineHeight=l.bottom=p-w+_,c.clearRect(0,0,p,p),c.textBaseline="alphabetic",c.fillText(T,0,p);var A=S(c.getImageData(0,0,p,p)),M=p-A-1+_;l.baseline=l.alphabetic=M,c.clearRect(0,0,p,p),c.textBaseline="middle",c.fillText(T,0,p*.5);var g=S(c.getImageData(0,0,p,p));l.median=l.middle=p-g-1+_-p*.5,c.clearRect(0,0,p,p),c.textBaseline="hanging",c.fillText(T,0,p*.5);var b=S(c.getImageData(0,0,p,p));l.hanging=p-b-1+_-p*.5,c.clearRect(0,0,p,p),c.textBaseline="ideographic",c.fillText(T,0,p);var d=S(c.getImageData(0,0,p,p));if(l.ideographic=p-d-1+_,m.upper&&(c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.upper,0,0),l.upper=S(c.getImageData(0,0,p,p)),l.capHeight=l.baseline-l.upper),m.lower&&(c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.lower,0,0),l.lower=S(c.getImageData(0,0,p,p)),l.xHeight=l.baseline-l.lower),m.tittle&&(c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.tittle,0,0),l.tittle=S(c.getImageData(0,0,p,p))),m.ascent&&(c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.ascent,0,0),l.ascent=S(c.getImageData(0,0,p,p))),m.descent&&(c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.descent,0,0),l.descent=E(c.getImageData(0,0,p,p))),m.overshoot){c.clearRect(0,0,p,p),c.textBaseline="top",c.fillText(m.overshoot,0,0);var u=E(c.getImageData(0,0,p,p));l.overshoot=u-M}for(var y in l)l[y]/=o;return l.em=o,v.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)}}}),kq=Xe({"node_modules/gl-text/dist.js"(Z,G){"use strict";var v=yq(),x=Ev(),S=_q(),E=xq(),e=r6(),t=d0(),r=bq(),o=Tq(),a=C1(),n=Aq(),i=h6(),s=Sq(),h=Mq(),c=ch(),m=Eq(),p=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(d){g(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=E(d),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=d.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(d)?d:{})};M.prototype.createShader=function(){var d=this.regl,u=d({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:d.prop("count"),offset:d.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:d.this("sizeBuffer")},width:{offset:0,stride:8,buffer:d.this("sizeBuffer")},char:d.this("charBuffer"),position:d.this("position")},uniforms:{atlasSize:function(f,R){return[R.atlas.width,R.atlas.height]},atlasDim:function(f,R){return[R.atlas.cols,R.atlas.rows]},atlas:function(f,R){return R.atlas.texture},charStep:function(f,R){return R.atlas.step},em:function(f,R){return R.atlas.em},color:d.prop("color"),opacity:d.prop("opacity"),viewport:d.this("viewportArray"),scale:d.this("scale"),align:d.prop("align"),baseline:d.prop("baseline"),translate:d.this("translate"),positionOffset:d.prop("positionOffset")},primitive:"points",viewport:d.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:d,draw:u,atlas:y}},M.prototype.update=function(d){var u=this;if(typeof d=="string")d={text:d};else if(!d)return;d=x(d,{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),d.opacity!=null&&(Array.isArray(d.opacity)?this.opacity=d.opacity.map(function(he){return parseFloat(he)}):this.opacity=parseFloat(d.opacity)),d.viewport!=null&&(this.viewport=a(d.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]),d.kerning!=null&&(this.kerning=d.kerning),d.offset!=null&&(typeof d.offset=="number"&&(d.offset=[d.offset,0]),this.positionOffset=p(d.offset)),d.direction&&(this.direction=d.direction),d.range&&(this.range=d.range,this.scale=[1/(d.range[2]-d.range[0]),1/(d.range[3]-d.range[1])],this.translate=[-d.range[0],-d.range[1]]),d.scale&&(this.scale=d.scale),d.translate&&(this.translate=d.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!d.font&&(d.font=M.baseFontSize+"px sans-serif");var y=!1,f=!1;if(d.font&&(Array.isArray(d.font)?d.font:[d.font]).forEach(function(he,Oe){if(typeof he=="string")try{he=v.parse(he)}catch{he=v.parse(M.baseFontSize+"px "+he)}else{var tt=he.style,ot=he.weight,Qe=he.stretch,Pt=he.variant;he=v.parse(v.stringify(he)),tt&&(he.style=tt),ot&&(he.weight=ot),Qe&&(he.stretch=Qe),Pt&&(he.variant=Pt)}var It=v.stringify({size:M.baseFontSize,family:he.family,stretch:w?he.stretch:void 0,variant:he.variant,weight:he.weight,style:he.style}),qt=i(he.size),Wt=Math.round(qt[0]*s(qt[1]));if(Wt!==u.fontSize[Oe]&&(f=!0,u.fontSize[Oe]=Wt),(!u.font[Oe]||It!=u.font[Oe].baseString)&&(y=!0,u.font[Oe]=M.fonts[It],!u.font[Oe])){var kr=he.family.join(", "),mr=[he.style];he.style!=he.variant&&mr.push(he.variant),he.variant!=he.weight&&mr.push(he.weight),w&&he.weight!=he.stretch&&mr.push(he.stretch),u.font[Oe]={baseString:It,family:kr,weight:he.weight,stretch:he.stretch,style:he.style,variant:he.variant,width:{},kerning:{},metrics:m(kr,{origin:"top",fontSize:M.baseFontSize,fontStyle:mr.join(" ")})},M.fonts[It]=u.font[Oe]}}),(y||f)&&this.font.forEach(function(he,Oe){var tt=v.stringify({size:u.fontSize[Oe],family:he.family,stretch:w?he.stretch:void 0,variant:he.variant,weight:he.weight,style:he.style});if(u.fontAtlas[Oe]=u.shader.atlas[tt],!u.fontAtlas[Oe]){var ot=he.metrics;u.shader.atlas[tt]=u.fontAtlas[Oe]={fontString:tt,step:Math.ceil(u.fontSize[Oe]*ot.bottom*.5)*2,em:u.fontSize[Oe],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}d.text==null&&(d.text=u.text)}),typeof d.text=="string"&&d.position&&d.position.length>2){for(var R=Array(d.position.length*.5),L=0;L<R.length;L++)R[L]=d.text;d.text=R}var z;if(d.text!=null||y){if(this.textOffsets=[0],Array.isArray(d.text)){this.count=d.text[0].length,this.counts=[this.count];for(var F=1;F<d.text.length;F++)this.textOffsets[F]=this.textOffsets[F-1]+d.text[F-1].length,this.count+=d.text[F].length,this.counts.push(d.text[F].length);this.text=d.text.join("")}else this.text=d.text,this.count=this.text.length,this.counts=[this.count];z=[],this.font.forEach(function(he,Oe){M.atlasContext.font=he.baseString;for(var tt=u.fontAtlas[Oe],ot=0;ot<u.text.length;ot++){var Qe=u.text.charAt(ot);if(tt.ids[Qe]==null&&(tt.ids[Qe]=tt.chars.length,tt.chars.push(Qe),z.push(Qe)),he.width[Qe]==null&&(he.width[Qe]=M.atlasContext.measureText(Qe).width/M.baseFontSize,u.kerning)){var Pt=[];for(var It in he.width)Pt.push(It+Qe,Qe+It);c(he.kerning,h(he.family,{pairs:Pt}))}}})}if(d.position)if(d.position.length>2){for(var N=!d.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++]=d.position[P*2],O[U++]=d.position[P*2+1];else for(var $=0;$<B;$++)O[U++]=d.position[P][0],O[U++]=d.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:d.position};if(d.text||y){var se=o.mallocUint8(this.count),le=o.mallocFloat(this.count*2);this.textWidth=[];for(var fe=0,V=0;fe<this.counts.length;fe++){for(var Y=this.counts[fe],ee=this.font[fe]||this.font[0],q=this.fontAtlas[fe]||this.fontAtlas[0],oe=0;oe<Y;oe++){var ae=this.text.charAt(V),j=this.text.charAt(V-1);if(se[V]=q.ids[ae],le[V*2]=ee.width[ae],oe){var Q=le[V*2-2],re=le[V*2],ce=le[V*2-1],be=ce+Q*.5+re*.5;if(this.kerning){var Ae=ee.kerning[j+ae];Ae&&(be+=Ae*.001)}le[V*2+1]=be}else le[V*2+1]=le[V*2]*.5;V++}this.textWidth.push(le.length?le[V*2-2]*.5+le[V*2-1]:0)}d.align||(d.align=this.align),this.charBuffer({data:se,type:"uint8",usage:"stream"}),this.sizeBuffer({data:le,type:"float",usage:"stream"}),o.freeUint8(se),o.freeFloat(le),z.length&&this.font.forEach(function(he,Oe){var tt=u.fontAtlas[Oe],ot=tt.step,Qe=Math.floor(M.maxAtlasSize/ot),Pt=Math.min(Qe,tt.chars.length),It=Math.ceil(tt.chars.length/Pt),qt=l(Pt*ot),Wt=l(It*ot);tt.width=qt,tt.height=Wt,tt.rows=It,tt.cols=Pt,tt.em&&tt.texture({data:r({canvas:M.atlasCanvas,font:tt.fontString,chars:tt.chars,shape:[qt,Wt],step:[ot,ot]})})})}if(d.align&&(this.align=d.align,this.alignOffset=this.textWidth.map(function(he,Oe){var tt=Array.isArray(u.align)?u.align.length>1?u.align[Oe]:u.align[0]:u.align;if(typeof tt=="number")return tt;switch(tt){case"right":case"end":return-he;case"center":case"centre":case"middle":return-he*.5}return 0})),this.baseline==null&&d.baseline==null&&(d.baseline=0),d.baseline!=null&&(this.baseline=d.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(he,Oe){var tt=(u.font[Oe]||u.font[0]).metrics,ot=0;return ot+=tt.bottom*.5,typeof he=="number"?ot+=he-tt.baseline:ot+=-tt[he],ot*=-1,ot})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var De;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var ze=d.color.length;De=o.mallocUint8(ze);for(var Ze=(d.color.subarray||d.color.slice).bind(d.color),at=0;at<ze;at+=4)De.set(t(Ze(at,at+4),"uint8"),at)}else{var nt=d.color.length;De=o.mallocUint8(nt*4);for(var rt=0;rt<nt;rt++)De.set(t(d.color[rt]||0,"uint8"),rt*4)}this.color=De}if(d.position||d.text||d.color||d.baseline||d.align||d.font||d.offset||d.opacity){var st=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(st){var Me=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(Me);for(var ye=0;ye<this.batch.length;ye++)this.batch[ye]={count:this.counts.length>1?this.counts[ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ye*4,ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ye]:this.opacity,baseline:this.baselineOffset[ye]!=null?this.baselineOffset[ye]:this.baselineOffset[0],align:this.align?this.alignOffset[ye]!=null?this.alignOffset[ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ye*2,ye*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},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}G.exports=M}}),Cq=Xe({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?G.exports=x():v.createREGL=x()})(Z,function(){"use strict";var v=function(it,Zt){for(var fr=Object.keys(Zt),oa=0;oa<fr.length;++oa)it[fr[oa]]=Zt[fr[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),fr=it.charAt(it.length-1);if(it.length>1&&Zt===fr&&(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 ma=[],_a=0;_a<wa.length;++_a)ma=ma.concat(o(wa[_a]));return ma}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(fr,oa){return s(fr,Zt+"["+oa+"]")}));if(it instanceof t)return it}var h={DynamicVariable:t,define:n,isDynamic:i,unbox:s,accessor:a},c={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},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function p(){var it={"":0},Zt=[""];return{id:function(fr){var oa=it[fr];return oa||(oa=it[fr]=Zt.length,Zt.push(fr),oa)},str:function(fr){return Zt[fr]}}}function T(it,Zt,fr){var oa=document.createElement("canvas");v(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",v(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=fr*Ya,oa.height=fr*bi}var ma;it!==document.body&&typeof ResizeObserver=="function"?(ma=new ResizeObserver(function(){setTimeout(wa)}),ma.observe(it)):window.addEventListener("resize",wa,!1);function _a(){ma?ma.disconnect():window.removeEventListener("resize",wa),it.removeChild(oa)}return wa(),{canvas:oa,onDestroy:_a}}function l(it,Zt){function fr(oa){try{return it.getContext(oa,Zt)}catch{return null}}return fr("webgl")||fr("experimental-webgl")||fr("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||{},fr,oa,wa,ma,_a={},Ya=[],bi=[],yi=typeof window>"u"?1:window.devicePixelRatio,si=!1,yn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?fr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?fr=Zt:w(Zt)?(ma=Zt,wa=ma.canvas):("gl"in Zt?ma=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(_a=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&&(yn=Zt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?wa=fr:oa=fr),!ma){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}_a.premultipliedAlpha===void 0&&(_a.premultipliedAlpha=!0),ma=l(wa,_a)}return ma?{gl:ma,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:yn,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 fr={};function oa(_a){var Ya=_a.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa<Zt.extensions.length;++wa){var ma=Zt.extensions[wa];if(!oa(ma))return Zt.onDestroy(),Zt.onDone('"'+ma+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Zt.optionalExtensions.forEach(oa),{extensions:fr,restore:function(){Object.keys(fr).forEach(function(_a){if(fr[_a]&&!oa(_a))throw new Error("(regl): error restoring extension "+_a)})}}}function d(it,Zt){for(var fr=Array(it),oa=0;oa<it;++oa)fr[oa]=Zt(oa);return fr}var u=5120,y=5121,f=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,fr;return Zt=(it>65535)<<4,it>>>=Zt,fr=(it>255)<<3,it>>>=fr,Zt|=fr,fr=(it>15)<<2,it>>>=fr,Zt|=fr,fr=(it>3)<<1,it>>>=fr,Zt|=fr,Zt|it>>1}function P(){var it=d(8,function(){return[]});function Zt(ma){var _a=N(ma),Ya=it[O(_a)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(_a)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,_a){var Ya=null;switch(ma){case u:Ya=new Int8Array(Zt(_a),0,_a);break;case y:Ya=new Uint8Array(Zt(_a),0,_a);break;case f:Ya=new Int16Array(Zt(2*_a),0,_a);break;case R:Ya=new Uint16Array(Zt(2*_a),0,_a);break;case L:Ya=new Int32Array(Zt(4*_a),0,_a);break;case z:Ya=new Uint32Array(Zt(4*_a),0,_a);break;case F:Ya=new Float32Array(Zt(4*_a),0,_a);break;default:return null}return Ya.length!==_a?Ya.subarray(0,_a):Ya}function wa(ma){fr(ma.buffer)}return{alloc:Zt,free:fr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,se=3412,le=3413,fe=3414,V=3415,Y=33901,ee=33902,q=3379,oe=3386,ae=34921,j=36347,Q=36348,re=35661,ce=35660,be=34930,Ae=36349,De=34076,ze=34024,Ze=7936,at=7937,nt=7938,rt=35724,st=34047,Me=36063,ye=34852,he=3553,Oe=34067,tt=34069,ot=33984,Qe=6408,Pt=5126,It=5121,qt=36160,Wt=36053,kr=36064,mr=16384,qr=function(it,Zt){var fr=1;Zt.ext_texture_filter_anisotropic&&(fr=it.getParameter(st));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ye),wa=it.getParameter(Me));var ma=!!Zt.oes_texture_float;if(ma){var _a=it.createTexture();it.bindTexture(he,_a),it.texImage2D(he,0,Qe,1,1,0,Qe,Pt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(qt,Ya),it.framebufferTexture2D(qt,kr,he,_a,0),it.bindTexture(he,null),it.checkFramebufferStatus(qt)!==Wt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Pt,4);it.readPixels(0,0,1,1,Qe,Pt,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(_a),ma=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 yn=it.createTexture(),zi=U.allocType(It,36);it.activeTexture(ot),it.bindTexture(Oe,yn),it.texImage2D(tt,0,Qe,3,3,0,Qe,It,zi),U.freeType(zi),it.bindTexture(Oe,null),it.deleteTexture(yn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(se),it.getParameter(le)],depthBits:it.getParameter(fe),stencilBits:it.getParameter(V),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(oe),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(De),maxRenderbufferSize:it.getParameter(ze),maxTextureUnits:it.getParameter(be),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(ce),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Ae),glsl:it.getParameter(rt),renderer:it.getParameter(at),vendor:it.getParameter(Ze),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},Sr=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 Rr(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)||Sr(it.data))}var wt=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Ne={shape:Ee,flatten:Ce};function Ke(it,Zt,fr){for(var oa=0;oa<Zt;++oa)fr[oa]=it[oa]}function Te(it,Zt,fr,oa){for(var wa=0,ma=0;ma<Zt;++ma)for(var _a=it[ma],Ya=0;Ya<fr;++Ya)oa[wa++]=_a[Ya]}function Ie(it,Zt,fr,oa,wa,ma){for(var _a=ma,Ya=0;Ya<Zt;++Ya)for(var bi=it[Ya],yi=0;yi<fr;++yi)for(var si=bi[yi],yn=0;yn<oa;++yn)wa[_a++]=si[yn]}function Ve(it,Zt,fr,oa,wa){for(var ma=1,_a=fr+1;_a<Zt.length;++_a)ma*=Zt[_a];var Ya=Zt[fr];if(Zt.length-fr===4){var bi=Zt[fr+1],yi=Zt[fr+2],si=Zt[fr+3];for(_a=0;_a<Ya;++_a)Ie(it[_a],bi,yi,si,oa,wa),wa+=ma}else for(_a=0;_a<Ya;++_a)Ve(it[_a],Zt,fr+1,oa,wa),wa+=ma}function Ce(it,Zt,fr,oa){var wa=1;if(Zt.length)for(var ma=0;ma<Zt.length;++ma)wa*=Zt[ma];else wa=0;var _a=oa||U.allocType(fr,wa);switch(Zt.length){case 0:break;case 1:Ke(it,Zt[0],_a);break;case 2:Te(it,Zt[0],Zt[1],_a);break;case 3:Ie(it,Zt[0],Zt[1],Zt[2],_a,0);break;default:Ve(it,Zt,0,_a,0)}return _a}function Ee(it){for(var Zt=[],fr=it;fr.length;fr=fr[0])Zt.push(fr.length);return Zt}var Pe={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ft=5120,ct=5122,_t=5124,Ct=5121,ir=5123,rr=5125,er=5126,Lr=5126,fa={int8:ft,int16:ct,int32:_t,uint8:Ct,uint16:ir,uint32:rr,float:er,float32:Lr},Da=35048,Ia=35040,qa={dynamic:Da,stream:Ia,static:35044},Wa=Ne.flatten,Ca=Ne.shape,hi=35044,wi=35040,Kt=5121,Ft=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 Pe[Object.prototype.toString.call(it)]|0}function Fr(it,Zt){for(var fr=0;fr<Zt.length;++fr)it[fr]=Zt[fr]}function ta(it,Zt,fr,oa,wa,ma,_a){for(var Ya=0,bi=0;bi<fr;++bi)for(var yi=0;yi<oa;++yi)it[Ya++]=Zt[wa*bi+ma*yi+_a]}function ra(it,Zt,fr,oa){var wa=0,ma={};function _a(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,fr.profile&&(this.stats={size:0})}_a.prototype.bind=function(){it.bindBuffer(this.type,this.buffer)},_a.prototype.destroy=function(){zi(this)};var Ya=[];function bi(ea,Ma){var Qa=Ya.pop();return Qa||(Qa=new _a(ea)),Qa.bind(),yn(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 yn(ea,Ma,Qa,di,Va,Bi){var Li;if(ea.usage=Qa,Array.isArray(Ma)){if(ea.dtype=di||Ft,Ma.length>0){var pn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua<Li.length;++Ua)Ha*=Li[Ua];ea.dimension=Ha,pn=Wa(Ma,Li,ea.dtype),si(ea,pn,Qa),Bi?ea.persistentData=pn:U.freeType(pn)}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 Sr(Ma[0])&&(ea.dimension=Ma[0].length,ea.dtype=di||Jt(Ma[0])||Ft,pn=Wa(Ma,[Ma.length,Ma[0].length],ea.dtype),si(ea,pn,Qa),Bi?ea.persistentData=pn:U.freeType(pn))}}else if(Sr(Ma))ea.dtype=di||Jt(Ma),ea.dimension=Va,si(ea,Ma,Qa),Bi&&(ea.persistentData=new Uint8Array(new Uint8Array(Ma.buffer)));else if(Rr(Ma)){Li=Ma.shape;var Ri=Ma.stride,Ti=Ma.offset,xi=0,Xi=0,mn=0,In=0;Li.length===1?(xi=Li[0],Xi=1,mn=Ri[0],In=0):Li.length===2&&(xi=Li[0],Xi=Li[1],mn=Ri[0],In=Ri[1]),ea.dtype=di||Jt(Ma.data)||Ft,ea.dimension=Xi;var Ii=U.allocType(ea.dtype,xi*Xi);ta(Ii,Ma.data,xi,Xi,mn,In,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 ma[ea.id]}function Ei(ea,Ma,Qa,di){Zt.bufferCount++;var Va=new _a(Ma);ma[Va.id]=Va;function Bi(Ha){var Ua=hi,Yi=null,Ri=0,Ti=0,xi=1;return Array.isArray(Ha)||Sr(Ha)||Rr(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=fa[Ha.type]),"dimension"in Ha&&(xi=Ha.dimension|0),"length"in Ha&&(Ri=Ha.length|0)),Va.bind(),Yi?yn(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),fr.profile&&(Va.stats.size=Va.byteLength*Yt[Va.dtype]),Bi}function Li(Ha,Ua){it.bufferSubData(Va.type,Ua,Ha)}function pn(Ha,Ua){var Yi=(Ua||0)|0,Ri;if(Va.bind(),Sr(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])||Sr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Rr(Ha)){Ri=Ha.shape;var Xi=Ha.stride,mn=0,In=0,Ii=0,an=0;Ri.length===1?(mn=Ri[0],In=1,Ii=Xi[0],an=0):Ri.length===2&&(mn=Ri[0],In=Ri[1],Ii=Xi[0],an=Xi[1]);var kn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(kn,mn*In);ta(Dn,Ha.data,mn,In,Ii,an,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=pn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){wt(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){wt(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof _a?ea._buffer:null},restore:Na,_initBuffer:yn}}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},tn=0,on=1,hn=4,Tt=5120,ut=5121,Br=5122,Cr=5123,xr=5124,Ir=5125,Ur=34963,Hr=35040,xt=35044;function Xt(it,Zt,fr,oa){var wa={},ma=0,_a={uint8:ut,uint16:Cr};Zt.oes_element_index_uint&&(_a.uint32=Ir);function Ya(Na){this.id=ma++,wa[this.id]=this,this.buffer=Na,this.primType=hn,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(fr.create(null,Ur,!0,!1)._buffer)),yn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function yn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var pn=Bi;!Bi&&(!Sr(ea)||Rr(ea)&&!Sr(ea.data))&&(pn=Zt.oes_element_index_uint?Ir:Cr),fr._initBuffer(Na.buffer,ea,Ma,pn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case Tt:Li=ut;break;case Cr:case Br:Li=Cr;break;case Ir:case xr:Li=Ir;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Ir&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=hn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=tn),Yi===2&&(Ua=on),Yi===3&&(Ua=hn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=hn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=hn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=xt,pn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Sr(Va)||Rr(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(pn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=_a[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Ir||Yi===xr)&&(Ua*=4))),yn(Qa,Bi,Li,pn,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(){wt(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),fr=0;fr<it.length;++fr)if(isNaN(it[fr]))Zt[fr]=65535;else if(it[fr]===1/0)Zt[fr]=31744;else if(it[fr]===-1/0)Zt[fr]=64512;else{vr[0]=it[fr];var oa=Or[0],wa=oa>>>31<<15,ma=(oa<<1>>>24)-127,_a=oa>>13&1023;if(ma<-24)Zt[fr]=wa;else if(ma<-14){var Ya=-14-ma;Zt[fr]=wa+(_a+1024>>Ya)}else ma>15?Zt[fr]=wa+31744:Zt[fr]=wa+(ma+15<<10)+_a}return Zt}function ya(it){return Array.isArray(it)||Sr(it)}var la=34467,Ta=3553,Ai=34067,ki=34069,Ki=6408,_n=6406,Rn=6407,En=6409,On=6410,no=32854,cn=32855,lo=36194,Wo=32819,hs=32820,Oo=33635,Wn=34042,No=6402,as=34041,Ns=35904,ss=35906,uo=36193,jn=33776,Xn=33777,ls=33778,Cs=33779,Ks=35986,Xo=35987,Gi=34798,Ln=35840,Us=35841,_s=35842,Gn=35843,zs=36196,vs=5121,Ws=5123,il=5125,xn=5126,ko=10242,bo=10243,Is=10497,pu=33071,co=33648,Vs=10240,vl=10241,Ts=9728,js=9729,us=9984,As=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Fs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,As,su],ml=[0,En,On,Rn,Ki],xs={};xs[En]=xs[_n]=xs[No]=1,xs[as]=xs[On]=2,xs[Rn]=xs[Ns]=3,xs[Ki]=xs[ss]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),Ul=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),ns=Xs("HTMLVideoElement"),bh=Object.keys(Pe).concat([nc,Ul,qu,fl,xh,ns]),Es=[];Es[vs]=1,Es[xn]=4,Es[uo]=2,Es[Ws]=2,Es[il]=4;var to=[];to[no]=2,to[cn]=2,to[lo]=2,to[as]=4,to[jn]=.5,to[Xn]=.5,to[ls]=1,to[Cs]=1,to[Ks]=.5,to[Xo]=1,to[Gi]=1,to[Ln]=.5,to[Us]=.25,to[_s]=.5,to[Gn]=.25,to[zs]=.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||!ya(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)===ns}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Rr(it)}function jc(it){return Pe[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var fr=Zt.length;switch(it.type){case vs:case Ws:case il:case xn:var oa=U.allocType(it.type,fr);oa.set(Zt),it.data=oa;break;case uo:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===uo?xn:it.type,Zt)}function Gu(it,Zt){it.type===uo?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,fr,oa,wa,ma){for(var _a=it.width,Ya=it.height,bi=it.channels,yi=_a*Ya*bi,si=Nf(it,yi),yn=0,zi=0;zi<Ya;++zi)for(var Ei=0;Ei<_a;++Ei)for(var Na=0;Na<bi;++Na)si[yn++]=Zt[fr*Ei+oa*zi+wa*Na+ma];Gu(it,si)}function oc(it,Zt,fr,oa,wa,ma){var _a;if(typeof to[it]<"u"?_a=to[it]:_a=xs[it]*Es[Zt],ma&&(_a*=6),wa){for(var Ya=0,bi=fr;bi>=1;)Ya+=_a*bi*bi,bi/=2;return Ya}else return _a*fr*oa}function Xc(it,Zt,fr,oa,wa,ma,_a){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Is,clamp:pu,mirror:co},yi={nearest:Ts,linear:js},si=v({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":As,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),yn={none:0,browser:ic},zi={uint8:vs,rgba4:Wo,rgb565:Oo,"rgb5 a1":hs},Ei={alpha:_n,luminance:En,"luminance alpha":On,rgb:Rn,rgba:Ki,rgba4:no,"rgb5 a1":cn,rgb565:lo},Na={};Zt.ext_srgb&&(Ei.srgb=Ns,Ei.srgba=ss),Zt.oes_texture_float&&(zi.float32=zi.float=xn),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=uo),Zt.webgl_depth_texture&&(v(Ei,{depth:No,"depth stencil":as}),v(zi,{uint16:Ws,uint32:il,"depth stencil":Wn})),Zt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":jn,"rgba s3tc dxt1":Xn,"rgba s3tc dxt3":ls,"rgba s3tc dxt5":Cs}),Zt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Ks,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Ln,"rgb pvrtc 2bppv1":Us,"rgba pvrtc 4bppv1":_s,"rgba pvrtc 2bppv1":Gn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=zs);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(Le){var $e=Na[Le];ea.indexOf($e)>=0&&(Ei[Le]=$e)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(Le){var $e=Ei[Le];Qa[$e]=Le});var di=[];Object.keys(zi).forEach(function(Le){var $e=zi[Le];di[$e]=Le});var Va=[];Object.keys(yi).forEach(function(Le){var $e=yi[Le];Va[$e]=Le});var Bi=[];Object.keys(si).forEach(function(Le){var $e=si[Le];Bi[$e]=Le});var Li=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Li[$e]=Le});var pn=Ma.reduce(function(Le,$e){var gt=Ei[$e];return gt===En||gt===_n||gt===En||gt===On||gt===No||gt===as||Zt.ext_srgb&&(gt===Ns||gt===ss)?Le[gt]=gt:gt===cn||$e.indexOf("rgba")>=0?Le[gt]=Ki:Le[gt]=Rn,Le},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=vs,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(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function Yi(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var gt=$e.type;Le.type=zi[gt]}var jt=Le.width,wr=Le.height,Nr=Le.channels,pr=!1;"shape"in $e?(jt=$e.shape[0],wr=$e.shape[1],$e.shape.length===3&&(Nr=$e.shape[2],pr=!0)):("radius"in $e&&(jt=wr=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(wr=$e.height),"channels"in $e&&(Nr=$e.channels,pr=!0)),Le.width=jt|0,Le.height=wr|0,Le.channels=Nr|0;var yt=!1;if("format"in $e){var kt=$e.format,Bt=Le.internalformat=Ei[kt];Le.format=pn[Bt],kt in zi&&("type"in $e||(Le.type=zi[kt])),kt in Na&&(Le.compressed=!0),yt=!0}!pr&&yt?Le.channels=xs[Le.format]:pr&&!yt&&Le.channels!==ml[Le.format]&&(Le.format=Le.internalformat=ml[Le.channels])}}function Ri(Le){it.pixelStorei(Hc,Le.flipY),it.pixelStorei(lu,Le.premultiplyAlpha),it.pixelStorei(Pl,Le.colorSpace),it.pixelStorei(dc,Le.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(Le,$e){var gt=null;if(of($e)?gt=$e:$e&&(Yi(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),of($e.data)&&(gt=$e.data)),$e.copy){var jt=wa.viewportWidth,wr=wa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||wr-Le.yOffset,Le.needsCopy=!0}else if(!gt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(Sr(gt))Le.channels=Le.channels||4,Le.data=gt,!("type"in $e)&&Le.type===vs&&(Le.type=jc(gt));else if(Wc(gt))Le.channels=Le.channels||4,Bf(Le,gt),Le.alignment=1,Le.needsFree=!0;else if(Rr(gt)){var Nr=gt.data;!Array.isArray(Nr)&&Le.type===vs&&(Le.type=jc(Nr));var pr=gt.shape,yt=gt.stride,kt,Bt,nr,hr,lr,dr;pr.length===3?(nr=pr[2],dr=yt[2]):(nr=1,dr=1),kt=pr[0],Bt=pr[1],hr=yt[0],lr=yt[1],Le.alignment=1,Le.width=kt,Le.height=Bt,Le.channels=nr,Le.format=Le.internalformat=ml[nr],Le.needsFree=!0,Ef(Le,Nr,hr,lr,dr,gt.offset)}else if(Mf(gt)||Ac(gt)||nf(gt))Mf(gt)||Ac(gt)?Le.element=gt:Le.element=gt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if($l(gt))Le.element=gt,Le.width=gt.width,Le.height=gt.height,Le.channels=4;else if(Jf(gt))Le.element=gt,Le.width=gt.naturalWidth,Le.height=gt.naturalHeight,Le.channels=4;else if(Of(gt))Le.element=gt,Le.width=gt.videoWidth,Le.height=gt.videoHeight,Le.channels=4;else if(Vu(gt)){var ur=Le.width||gt[0].length,Ht=Le.height||gt.length,sr=Le.channels;ya(gt[0][0])?sr=sr||gt[0][0].length:sr=sr||1;for(var Vt=Ne.shape(gt),Dr=1,Jr=0;Jr<Vt.length;++Jr)Dr*=Vt[Jr];var ga=Nf(Le,Dr);Ne.flatten(gt,Vt,"",ga),Gu(Le,ga),Le.alignment=1,Le.width=ur,Le.height=Ht,Le.channels=sr,Le.format=Le.internalformat=ml[sr],Le.needsFree=!0}Le.type===xn||Le.type}function Xi(Le,$e,gt){var jt=Le.element,wr=Le.data,Nr=Le.internalformat,pr=Le.format,yt=Le.type,kt=Le.width,Bt=Le.height;Ri(Le),jt?it.texImage2D($e,gt,pr,pr,yt,jt):Le.compressed?it.compressedTexImage2D($e,gt,Nr,kt,Bt,0,wr):Le.needsCopy?(oa(),it.copyTexImage2D($e,gt,pr,Le.xOffset,Le.yOffset,kt,Bt,0)):it.texImage2D($e,gt,pr,kt,Bt,0,pr,yt,wr||null)}function mn(Le,$e,gt,jt,wr){var Nr=Le.element,pr=Le.data,yt=Le.internalformat,kt=Le.format,Bt=Le.type,nr=Le.width,hr=Le.height;Ri(Le),Nr?it.texSubImage2D($e,wr,gt,jt,kt,Bt,Nr):Le.compressed?it.compressedTexSubImage2D($e,wr,gt,jt,yt,nr,hr,pr):Le.needsCopy?(oa(),it.copyTexSubImage2D($e,wr,gt,jt,Le.xOffset,Le.yOffset,nr,hr)):it.texSubImage2D($e,wr,gt,jt,nr,hr,kt,Bt,pr)}var In=[];function Ii(){return In.pop()||new Ti}function an(Le){Le.needsFree&&U.freeType(Le.data),Ti.call(Le),In.push(Le)}function kn(){Ha.call(this),this.genMipmaps=!1,this.mipmapHint=du,this.mipmask=0,this.images=Array(16)}function Dn(Le,$e,gt){var jt=Le.images[0]=Ii();Le.mipmask=1,jt.width=Le.width=$e,jt.height=Le.height=gt,jt.channels=Le.channels=4}function Zn(Le,$e){var gt=null;if(of($e))gt=Le.images[0]=Ii(),Ua(gt,Le),xi(gt,$e),Le.mipmask=1;else if(Yi(Le,$e),Array.isArray($e.mipmap))for(var jt=$e.mipmap,wr=0;wr<jt.length;++wr)gt=Le.images[wr]=Ii(),Ua(gt,Le),gt.width>>=wr,gt.height>>=wr,xi(gt,jt[wr]),Le.mipmask|=1<<wr;else gt=Le.images[0]=Ii(),Ua(gt,Le),xi(gt,$e),Le.mipmask=1;Ua(Le,Le.images[0]),Le.compressed&&(Le.internalformat===jn||Le.internalformat===Xn||Le.internalformat===ls||Le.internalformat)}function Ds(Le,$e){for(var gt=Le.images,jt=0;jt<gt.length;++jt){if(!gt[jt])return;Xi(gt[jt],$e,jt)}}var bl=[];function po(){var Le=bl.pop()||new kn;Ha.call(Le),Le.mipmask=0;for(var $e=0;$e<16;++$e)Le.images[$e]=null;return Le}function Wl(Le){for(var $e=Le.images,gt=0;gt<$e.length;++gt)$e[gt]&&an($e[gt]),$e[gt]=null;bl.push(Le)}function fs(){this.minFilter=Ts,this.magFilter=Ts,this.wrapS=pu,this.wrapT=pu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=du}function Sl(Le,$e){if("min"in $e){var gt=$e.min;Le.minFilter=si[gt],nl.indexOf(Le.minFilter)>=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=yi[jt]}var wr=Le.wrapS,Nr=Le.wrapT;if("wrap"in $e){var pr=$e.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in $e){var yt=$e.wrapS;wr=bi[yt]}if("wrapT"in $e){var kt=$e.wrapT;Nr=bi[kt]}}if(Le.wrapS=wr,Le.wrapT=Nr,"anisotropic"in $e){var Bt=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var nr=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ya[$e.mipmap],Le.genMipmaps=!0,nr=!0;break;case"boolean":nr=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in $e)&&(Le.minFilter=us)}}function kl(Le,$e){it.texParameteri($e,vl,Le.minFilter),it.texParameteri($e,Vs,Le.magFilter),it.texParameteri($e,ko,Le.wrapS),it.texParameteri($e,bo,Le.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri($e,Fs,Le.anisotropic),Le.genMipmaps&&(it.hint(Tc,Le.mipmapHint),it.generateMipmap($e))}var tu=0,qs={},pl=fr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Yn(Le){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=Le,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,_a.profile&&(this.stats={size:0})}function Cl(Le){it.activeTexture(Ou),it.bindTexture(Le.target,Le.texture)}function Co(){var Le=wl[0];Le?it.bindTexture(Le.target,Le.texture):it.bindTexture(Ta,null)}function ve(Le){var $e=Le.texture,gt=Le.unit,jt=Le.target;gt>=0&&(it.activeTexture(Ou+gt),it.bindTexture(jt,null),wl[gt]=null),it.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete qs[Le.id],ma.textureCount--}v(Yn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var gt=0;gt<pl;++gt){var jt=wl[gt];if(jt){if(jt.bindCount>0)continue;jt.unit=-1}wl[gt]=Le,$e=gt;break}$e>=pl,_a.profile&&ma.maxTextureUnits<$e+1&&(ma.maxTextureUnits=$e+1),Le.unit=$e,it.activeTexture(Ou+$e),it.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function K(Le,$e){var gt=new Yn(Ta);qs[gt.id]=gt,ma.textureCount++;function jt(pr,yt){var kt=gt.texInfo;fs.call(kt);var Bt=po();return typeof pr=="number"?typeof yt=="number"?Dn(Bt,pr|0,yt|0):Dn(Bt,pr|0,pr|0):pr?(Sl(kt,pr),Zn(Bt,pr)):Dn(Bt,1,1),kt.genMipmaps&&(Bt.mipmask=(Bt.width<<1)-1),gt.mipmask=Bt.mipmask,Ua(gt,Bt),gt.internalformat=Bt.internalformat,jt.width=Bt.width,jt.height=Bt.height,Cl(gt),Ds(Bt,Ta),kl(kt,Ta),Co(),Wl(Bt),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,Bt.width,Bt.height,kt.genMipmaps,!1)),jt.format=Qa[gt.internalformat],jt.type=di[gt.type],jt.mag=Va[kt.magFilter],jt.min=Bi[kt.minFilter],jt.wrapS=Li[kt.wrapS],jt.wrapT=Li[kt.wrapT],jt}function wr(pr,yt,kt,Bt){var nr=yt|0,hr=kt|0,lr=Bt|0,dr=Ii();return Ua(dr,gt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(gt.width>>lr)-nr,dr.height=dr.height||(gt.height>>lr)-hr,Cl(gt),mn(dr,Ta,nr,hr,lr),Co(),an(dr),jt}function Nr(pr,yt){var kt=pr|0,Bt=yt|0||kt;if(kt===gt.width&&Bt===gt.height)return jt;jt.width=gt.width=kt,jt.height=gt.height=Bt,Cl(gt);for(var nr=0;gt.mipmask>>nr;++nr){var hr=kt>>nr,lr=Bt>>nr;if(!hr||!lr)break;it.texImage2D(Ta,nr,gt.format,hr,lr,0,gt.format,gt.type,null)}return Co(),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,kt,Bt,!1,!1)),jt}return jt(Le,$e),jt.subimage=wr,jt.resize=Nr,jt._reglType="texture2d",jt._texture=gt,_a.profile&&(jt.stats=gt.stats),jt.destroy=function(){gt.decRef()},jt}function _e(Le,$e,gt,jt,wr,Nr){var pr=new Yn(Ai);qs[pr.id]=pr,ma.cubeCount++;var yt=new Array(6);function kt(hr,lr,dr,ur,Ht,sr){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)yt[Vt]=po();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(yt[Vt],Jr,Jr)}else if(typeof hr=="object")if(lr)Zn(yt[0],hr),Zn(yt[1],lr),Zn(yt[2],dr),Zn(yt[3],ur),Zn(yt[4],Ht),Zn(yt[5],sr);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(yt[Vt],pr),Zn(yt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Zn(yt[Vt],hr);for(Ua(pr,yt[0]),Dr.genMipmaps?pr.mipmask=(yt[0].width<<1)-1:pr.mipmask=yt[0].mipmask,pr.internalformat=yt[0].internalformat,kt.width=yt[0].width,kt.height=yt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)Ds(yt[Vt],ki+Vt);for(kl(Dr,Ai),Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,Dr.genMipmaps,!0)),kt.format=Qa[pr.internalformat],kt.type=di[pr.type],kt.mag=Va[Dr.magFilter],kt.min=Bi[Dr.minFilter],kt.wrapS=Li[Dr.wrapS],kt.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(yt[Vt]);return kt}function Bt(hr,lr,dr,ur,Ht){var sr=dr|0,Vt=ur|0,Dr=Ht|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,lr),Jr.width=Jr.width||(pr.width>>Dr)-sr,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),mn(Jr,ki+hr,sr,Vt,Dr),Co(),an(Jr),kt}function nr(hr){var lr=hr|0;if(lr!==pr.width){kt.width=pr.width=lr,kt.height=pr.height=lr,Cl(pr);for(var dr=0;dr<6;++dr)for(var ur=0;pr.mipmask>>ur;++ur)it.texImage2D(ki+dr,ur,pr.format,lr>>ur,lr>>ur,0,pr.format,pr.type,null);return Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,!1,!0)),kt}}return kt(Le,$e,gt,jt,wr,Nr),kt.subimage=Bt,kt.resize=nr,kt._reglType="textureCube",kt._texture=pr,_a.profile&&(kt.stats=pr.stats),kt.destroy=function(){pr.decRef()},kt}function te(){for(var Le=0;Le<pl;++Le)it.activeTexture(Ou+Le),it.bindTexture(Ta,null),wl[Le]=null;wt(qs).forEach(ve),ma.cubeCount=0,ma.textureCount=0}_a.profile&&(ma.getTotalTextureSize=function(){var Le=0;return Object.keys(qs).forEach(function($e){Le+=qs[$e].stats.size}),Le});function me(){for(var Le=0;Le<pl;++Le){var $e=wl[Le];$e&&($e.bindCount=0,$e.unit=-1,wl[Le]=null)}wt(qs).forEach(function(gt){gt.texture=it.createTexture(),it.bindTexture(gt.target,gt.texture);for(var jt=0;jt<32;++jt)if(gt.mipmask&1<<jt)if(gt.target===Ta)it.texImage2D(Ta,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);kl(gt.texInfo,gt.target)})}function Ge(){for(var Le=0;Le<pl;++Le){var $e=wl[Le];$e&&($e.bindCount=0,$e.unit=-1,wl[Le]=null),it.activeTexture(Ou+Le),it.bindTexture(Ta,null),it.bindTexture(Ai,null)}}return{create2D:K,createCube:_e,clear:te,getTexture:function(Le){return null},restore:me,refresh:Ge}}var Ql=36161,qc=32854,Sc=32855,Zs=36194,kf=33189,fh=36168,Uf=34041,Zc=35907,$f=34836,Cu=34842,jf=34843,yl=[];yl[qc]=2,yl[Sc]=2,yl[Zs]=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,fr){return yl[it]*Zt*fr}var Mc=function(it,Zt,fr,oa,wa){var ma={rgba4:qc,rgb565:Zs,"rgb5 a1":Sc,depth:kf,stencil:fh,"depth stencil":Uf};Zt.ext_srgb&&(ma.srgba=Zc),Zt.ext_color_buffer_half_float&&(ma.rgba16f=Cu,ma.rgb16f=jf),Zt.webgl_color_buffer_float&&(ma.rgba32f=$f);var _a=[];Object.keys(ma).forEach(function(Ei){var Na=ma[Ei];_a[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 yn(Ei,Na){var ea=new yi(it.createRenderbuffer());bi[ea.id]=ea,oa.renderbufferCount++;function Ma(di,Va){var Bi=0,Li=0,pn=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&&(pn=ma[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&&pn===ea.format))return Ma.width=ea.width=Bi,Ma.height=ea.height=Li,ea.format=pn,it.bindRenderbuffer(Ql,ea.renderbuffer),it.renderbufferStorage(Ql,pn,Bi,Li),wa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ma.format=_a[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(){wt(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:yn,clear:function(){wt(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,fr,oa,wa,ma){var _a={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 mn=0,In=0;xi?(mn=xi.width,In=xi.height):Xi&&(mn=Xi.width,In=Xi.height),this.width=mn,this.height=In}function yn(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 mn=Ti.texture._texture,In=Math.max(1,mn.width),Ii=Math.max(1,mn.height);mn.refCount+=1}else{var an=Ti.renderbuffer._renderbuffer;an.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,mn=null,In=Ti;typeof Ti=="object"&&(In=Ti.data,"target"in Ti&&(xi=Ti.target|0));var Ii=In._reglType;return Ii==="texture2d"||Ii==="textureCube"?Xi=In:Ii==="renderbuffer"&&(mn=In,xi=vc),new si(xi,Xi,mn)}function ea(Ti,xi,Xi,mn,In){if(Xi){var Ii=oa.create2D({width:Ti,height:xi,format:mn,type:In});return Ii._texture.refCount=0,new si(yu,Ii,null)}else{var an=wa.create({width:Ti,height:xi,format:mn});return an._renderbuffer.refCount=0,new si(vc,null,an)}}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(yn),yn(Ti.depthAttachment),yn(Ti.stencilAttachment),yn(Ti.depthStencilAttachment)}function pn(Ti){var xi=Ti.framebuffer;it.deleteFramebuffer(xi),Ti.framebuffer=null,ma.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<fr.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 mn=it.checkFramebufferStatus(ol);it.isContextLost(),it.bindFramebuffer(ol,_a.next?_a.next.framebuffer:null),_a.cur=_a.next,it.getError()}function Ua(Ti,xi){var Xi=new Bi;ma.framebufferCount++;function mn(Ii,an){var kn,Dn=0,Zn=0,Ds=!0,bl=!0,po=null,Wl=!0,fs="rgba",Sl="uint8",kl=1,tu=null,qs=null,pl=null,wl=!1;if(typeof Ii=="number")Dn=Ii|0,Zn=an|0||Dn;else if(!Ii)Dn=Zn=1;else{var Yn=Ii;if("shape"in Yn){var Cl=Yn.shape;Dn=Cl[0],Zn=Cl[1]}else"radius"in Yn&&(Dn=Zn=Yn.radius),"width"in Yn&&(Dn=Yn.width),"height"in Yn&&(Zn=Yn.height);("color"in Yn||"colors"in Yn)&&(po=Yn.color||Yn.colors,Array.isArray(po)),po||("colorCount"in Yn&&(kl=Yn.colorCount|0),"colorTexture"in Yn&&(Wl=!!Yn.colorTexture,fs="rgba4"),"colorType"in Yn&&(Sl=Yn.colorType,Wl||(Sl==="half float"||Sl==="float16"?fs="rgba16f":(Sl==="float"||Sl==="float32")&&(fs="rgba32f"))),"colorFormat"in Yn&&(fs=Yn.colorFormat,Ya.indexOf(fs)>=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Yn||"depthStencilTexture"in Yn)&&(wl=!!(Yn.depthTexture||Yn.depthStencilTexture)),"depth"in Yn&&(typeof Yn.depth=="boolean"?Ds=Yn.depth:(tu=Yn.depth,bl=!1)),"stencil"in Yn&&(typeof Yn.stencil=="boolean"?bl=Yn.stencil:(qs=Yn.stencil,Ds=!1)),"depthStencil"in Yn&&(typeof Yn.depthStencil=="boolean"?Ds=bl=Yn.depthStencil:(pl=Yn.depthStencil,Ds=!1,bl=!1))}var Co=null,ve=null,K=null,_e=null;if(Array.isArray(po))Co=po.map(Na);else if(po)Co=[Na(po)];else for(Co=new Array(kl),kn=0;kn<kl;++kn)Co[kn]=ea(Dn,Zn,Wl,fs,Sl);Dn=Dn||Co[0].width,Zn=Zn||Co[0].height,tu?ve=Na(tu):Ds&&!bl&&(ve=ea(Dn,Zn,wl,"depth","uint32")),qs?K=Na(qs):bl&&!Ds&&(K=ea(Dn,Zn,!1,"stencil","uint8")),pl?_e=Na(pl):!tu&&!qs&&bl&&Ds&&(_e=ea(Dn,Zn,wl,"depth stencil","depth stencil"));var te=null;for(kn=0;kn<Co.length;++kn)if(zi(Co[kn],Dn,Zn),Co[kn]&&Co[kn].texture){var me=lf[Co[kn].texture._texture.format]*au[Co[kn].texture._texture.type];te===null&&(te=me)}return zi(ve,Dn,Zn),zi(K,Dn,Zn),zi(_e,Dn,Zn),Li(Xi),Xi.width=Dn,Xi.height=Zn,Xi.colorAttachments=Co,Xi.depthAttachment=ve,Xi.stencilAttachment=K,Xi.depthStencilAttachment=_e,mn.color=Co.map(Ma),mn.depth=Ma(ve),mn.stencil=Ma(K),mn.depthStencil=Ma(_e),mn.width=Xi.width,mn.height=Xi.height,Ha(Xi),mn}function In(Ii,an){var kn=Math.max(Ii|0,1),Dn=Math.max(an|0||kn,1);if(kn===Xi.width&&Dn===Xi.height)return mn;for(var Zn=Xi.colorAttachments,Ds=0;Ds<Zn.length;++Ds)Qa(Zn[Ds],kn,Dn);return Qa(Xi.depthAttachment,kn,Dn),Qa(Xi.stencilAttachment,kn,Dn),Qa(Xi.depthStencilAttachment,kn,Dn),Xi.width=mn.width=kn,Xi.height=mn.height=Dn,Ha(Xi),mn}return mn(Ti,xi),v(mn,{resize:In,_reglType:"framebuffer",_framebuffer:Xi,destroy:function(){pn(Xi),Li(Xi)},use:function(Ii){_a.setFBO({framebuffer:mn},Ii)}})}function Yi(Ti){var xi=Array(6);function Xi(In){var Ii,an={color:null},kn=0,Dn=null,Zn="rgba",Ds="uint8",bl=1;if(typeof In=="number")kn=In|0;else if(!In)kn=1;else{var po=In;if("shape"in po){var Wl=po.shape;kn=Wl[0]}else"radius"in po&&(kn=po.radius|0),"width"in po?(kn=po.width|0,"height"in po):"height"in po&&(kn=po.height|0);("color"in po||"colors"in po)&&(Dn=po.color||po.colors,Array.isArray(Dn)),Dn||("colorCount"in po&&(bl=po.colorCount|0),"colorType"in po&&(Ds=po.colorType),"colorFormat"in po&&(Zn=po.colorFormat)),"depth"in po&&(an.depth=po.depth),"stencil"in po&&(an.stencil=po.stencil),"depthStencil"in po&&(an.depthStencil=po.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:kn,format:Zn,type:Ds};for(Ii=0;Ii<bl;++Ii)fs[Ii]=oa.createCube(Sl)}for(an.color=Array(fs.length),Ii=0;Ii<fs.length;++Ii){var kl=fs[Ii];kn=kn||kl.width,an.color[Ii]={target:Tu,data:fs[Ii]}}for(Ii=0;Ii<6;++Ii){for(var tu=0;tu<fs.length;++tu)an.color[tu].target=Tu+Ii;Ii>0&&(an.depth=xi[0].depth,an.stencil=xi[0].stencil,an.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](an):xi[Ii]=Ua(an)}return v(Xi,{width:kn,height:kn,color:fs})}function mn(In){var Ii,an=In|0;if(an===Xi.width)return Xi;var kn=Xi.color;for(Ii=0;Ii<kn.length;++Ii)kn[Ii].resize(an);for(Ii=0;Ii<6;++Ii)xi[Ii].resize(an);return Xi.width=Xi.height=an,Xi}return Xi(Ti),v(Xi,{faces:xi,resize:mn,_reglType:"framebufferCube",destroy:function(){xi.forEach(function(In){In.destroy()})}})}function Ri(){_a.cur=null,_a.next=null,_a.dirty=!0,wt(Va).forEach(function(Ti){Ti.framebuffer=it.createFramebuffer(),Ha(Ti)})}return v(_a,{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(){wt(Va).forEach(pn)},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,fr,oa,wa,ma,_a){for(var Ya=fr.maxAttributes,bi=new Array(Ya),yi=0;yi<Ya;++yi)bi[yi]=new _u;var si=0,yn={},zi={Record:_u,scope:{},state:bi,currentVAO:null,targetVAO:null,restore:Na()?Li:function(){},createVAO:pn,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))}_a.elements?it.bindBuffer(sl,_a.elements.buffer.buffer):it.bindBuffer(sl,null)}zi.currentVAO=Ha}}function Va(){wt(yn).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,yn[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=ma.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),yn[this.id]&&(delete yn[this.id],oa.vaoCount-=1)};function Li(){var Ha=Na();Ha&&wt(yn).forEach(function(Ua){Ua.refresh()})}function pn(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):ma.getElements(Ri.elements)?(Ua.elements=Ri.elements,Ua.ownsElements=!1):(Ua.elements=ma.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={},mn=Ua.attributes;mn.length=Ti.length;for(var In=0;In<Ti.length;++In){var Ii=Ti[In],an=mn[In]=new _u,kn=Ii.data||Ii;if(Array.isArray(kn)||Sr(kn)||Rr(kn)){var Dn;Ua.buffers[In]&&(Dn=Ua.buffers[In],Sr(kn)&&Dn._buffer.byteLength>=kn.byteLength?Dn.subdata(kn):(Dn.destroy(),Ua.buffers[In]=null)),Ua.buffers[In]||(Dn=Ua.buffers[In]=wa.create(Ii,mf,!1,!0)),an.buffer=wa.getBuffer(Dn),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1,Xi[In]=1}else wa.getBuffer(Ii)?(an.buffer=wa.getBuffer(Ii),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1):wa.getBuffer(Ii.buffer)?(an.buffer=wa.getBuffer(Ii.buffer),an.size=(+Ii.size||an.buffer.dimension)|0,an.normalized=!!Ii.normalized||!1,"type"in Ii?an.type=fa[Ii.type]:an.type=an.buffer.dtype,an.offset=(Ii.offset||0)|0,an.stride=(Ii.stride||0)|0,an.divisor=(Ii.divisor||0)|0,an.state=1):"x"in Ii&&(an.x=+Ii.x||0,an.y=+Ii.y||0,an.z=+Ii.z||0,an.w=+Ii.w||0,an.state=2)}for(var Zn=0;Zn<Ua.buffers.length;++Zn)!Xi[Zn]&&Ua.buffers[Zn]&&(Ua.buffers[Zn].destroy(),Ua.buffers[Zn]=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,fr,oa){var wa={},ma={};function _a(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:ma,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=[],yn=0;function zi(ea,Ma){this.id=yn++,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),pn=ea.program=it.createProgram();if(it.attachShader(pn,Bi),it.attachShader(pn,Li),Qa)for(di=0;di<Qa.length;++di){var Ha=Qa[di];it.bindAttribLocation(pn,Ha[0],Ha[1])}it.linkProgram(pn);var Ua=it.getProgramParameter(pn,uf);oa.profile&&(ea.stats.uniformsCount=Ua);var Yi=ea.uniforms;for(di=0;di<Ua;++di)if(Va=it.getActiveUniform(pn,di),Va)if(Va.size>1)for(var Ri=0;Ri<Va.size;++Ri){var Ti=Va.name.replace("[0]","["+Ri+"]");Ya(Yi,new _a(Ti,Zt.id(Ti),it.getUniformLocation(pn,Ti),Va))}else Ya(Yi,new _a(Va.name,Zt.id(Va.name),it.getUniformLocation(pn,Va.name),Va));var xi=it.getProgramParameter(pn,kc);oa.profile&&(ea.stats.attributesCount=xi);var Xi=ea.attributes;for(di=0;di<xi;++di)Va=it.getActiveAttrib(pn,di),Va&&Ya(Xi,new _a(Va.name,Zt.id(Va.name),it.getAttribLocation(pn,Va.name),Va))}oa.profile&&(fr.getMaxUniformsCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.uniformsCount>ea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},ma={};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);wt(wa).forEach(ea),wa={},wt(ma).forEach(ea),ma={},si.forEach(function(Ma){it.deleteProgram(Ma.program)}),si.length=0,yi={},fr.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 fr.shaderCount++,Ei(Li,Qa,di),Bi||(Va[ea]=Li),si.push(Li),v(Li,{destroy:function(){if(Li.refCount--,Li.refCount<=0){it.deleteProgram(Li.program);var pn=si.indexOf(Li);si.splice(pn,1),fr.shaderCount--}Va[Li.vertId].refCount<=0&&(it.deleteShader(ma[Li.vertId]),delete ma[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,fr,oa,wa,ma,_a){function Ya(si){var yn;Zt.next===null?yn=Wu:yn=Zt.next.colorAttachments[0].texture._texture.type;var zi=0,Ei=0,Na=oa.framebufferWidth,ea=oa.framebufferHeight,Ma=null;Sr(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),fr();var Qa=Na*ea*4;return Ma||(yn===Wu?Ma=new Uint8Array(Qa):yn===Lf&&(Ma=Ma||new Float32Array(Qa))),it.pixelStorei(Kc,4),it.readPixels(zi,Ei,Na,ea,gf,yn,Ma),Ma}function bi(si){var yn;return Zt.setFBO({framebuffer:si.framebuffer},function(){yn=Ya(si)}),yn}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 fr=Pc(it);fr.length>16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),wa=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,wa[ma]=fr[ma]^1549556828;var _a=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(_a),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,wa=0;wa<it.length;wa++)oa=it.charCodeAt(wa),fr+=Zt.charAt(oa>>>4&15)+Zt.charAt(oa&15);return fr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,wa=0;wa<oa;wa+=3)for(var ma=it.charCodeAt(wa)<<16|(wa+1<oa?it.charCodeAt(wa+1)<<8:0)|(wa+2<oa?it.charCodeAt(wa+2):0),_a=0;_a<4;_a++)wa*8+_a*6>it.length*8?fr+=Xu:fr+=Zt.charAt(ma>>>6*(3-_a)&63);return fr}function Jc(it,Zt){var fr=Zt.length,oa=Array(),wa,ma,_a,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(),_a=0,wa=0;wa<bi.length;wa++)_a=(_a<<16)+bi[wa],ma=Math.floor(_a/fr),_a-=ma*fr,(Ya.length>0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=_a,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="",fr=-1,oa,wa;++fr<it.length;)oa=it.charCodeAt(fr),wa=fr+1<it.length?it.charCodeAt(fr+1):0,55296<=oa&&oa<=56319&&56320<=wa&&wa<=57343&&(oa=65536+((oa&1023)<<10)+(wa&1023),fr++),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),fr=0;fr<Zt.length;fr++)Zt[fr]=0;for(var fr=0;fr<it.length*8;fr+=8)Zt[fr>>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Zt}function Qt(it){for(var Zt="",fr=0;fr<it.length*32;fr+=8)Zt+=String.fromCharCode(it[fr>>5]>>>24-fr%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,fr){return it&Zt^~it&fr}function ka(it,Zt,fr){return it&Zt^it&fr^Zt&fr}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 dn=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 fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,ma,_a,Ya,bi,yi,si,yn,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=fr[0],ma=fr[1],_a=fr[2],Ya=fr[3],bi=fr[4],yi=fr[5],si=fr[6],yn=fr[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(yn,Ci(bi)),$r(bi,yi,si)),dn[Ei]),oa[Ei]),ea=Di(li(wa),ka(wa,ma,_a)),yn=si,si=yi,yi=bi,bi=Di(Ya,Na),Ya=_a,_a=ma,ma=wa,wa=Di(Na,ea);fr[0]=Di(wa,fr[0]),fr[1]=Di(ma,fr[1]),fr[2]=Di(_a,fr[2]),fr[3]=Di(Ya,fr[3]),fr[4]=Di(bi,fr[4]),fr[5]=Di(yi,fr[5]),fr[6]=Di(si,fr[6]),fr[7]=Di(yn,fr[7])}return fr}function Di(it,Zt){var fr=(it&65535)+(Zt&65535),oa=(it>>16)+(Zt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Zt=it&&it.cache,fr=0,oa=[],wa=[],ma=[];function _a(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa<wa.length;++Qa)if(wa[Qa]===Na&&!ma[Qa])return oa[Qa]}var di="g"+fr++;return oa.push(di),wa.push(Na),ma.push(Ma),di}function Ya(){var Na=[];function ea(){Na.push.apply(Na,Ni(arguments))}var Ma=[];function Qa(){var di="v"+fr++;return Ma.push(di),arguments.length>0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(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 v(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 v(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(),yn={};function zi(Na,ea){var Ma=[];function Qa(){var pn="a"+Ma.length;return Ma.push(pn),pn}ea=ea||0;for(var di=0;di<ea;++di)Qa();var Va=bi(),Bi=Va.toString,Li=yn[Na]=v(Va,{arg:Qa,toString:function(){return mi(["function(",Ma.join(),"){",Bi(),"}"])}});return Li}function Ei(){var Na=['"use strict";',si,"return {"];Object.keys(yn).forEach(function(di){Na.push('"',di,'":',yn[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:_a,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),ao=5121,eo=1,fo=2,An=0,un=1,yo=2,Ko=3,Ss=4,rl=5,Os=6,el="dither",bs="blend.enable",Fl="blend.color",_l="blend.equation",ll="blend.func",Un="depth.enable",Lo="depth.func",Js="depth.range",Rs="depth.mask",uu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",ho="sample.enable",Ro="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Ue="stencil.opFront",I="stencil.opBack",ie="scissor.enable",we="scissor.box",Se="viewport",Be="profile",dt="framebuffer",St="vert",Nt="frag",$t="elements",Tr="primitive",Ar="count",Kr="offset",na="instances",He="vao",Je="Width",lt="Height",vt=dt+Je,Lt=dt+lt,At=Se+Je,zt=Se+lt,cr="drawingBuffer",yr=cr+Je,Er=cr+lt,jr=[ll,_l,Yu,Ue,I,Ro,Se,we,Au],Qr=34962,pa=34963,Aa=2884,za=3042,ci=3024,Vi=2960,ji=2929,nn=3089,Sn=32823,Kn=32926,Bn=32928,wo=5126,is=35664,Ao=35665,Zo=35666,ps=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,de=1028,Fe=1029,et=2304,mt=2305,bt=32775,Mt=32776,ar=519,Ot=7680,_r=0,Gr=1,Xr=32774,xa=513,da=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},Fa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:mt};function fi(it){return Array.isArray(it)||Sr(it)||Rr(it)}function ni(it){return it.sort(function(Zt,fr){return Zt===Se?-1:fr===Se?1:Zt<fr?-1:1})}function La(it,Zt,fr,oa){this.thisDep=it,this.contextDep=Zt,this.propDep=fr,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 vn(it,Zt){var fr=it.type;if(fr===An){var oa=it.data.length;return new La(!0,oa>=1,oa>=2,Zt)}else if(fr===Ss){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(fr===rl)return new La(!1,!1,!1,Zt);if(fr===Os){for(var ma=!1,_a=!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===yo)_a=!0;else if(yi.type===Ko)ma=!0;else if(yi.type===An){ma=!0;var si=yi.data;si>=1&&(_a=!0),si>=2&&(Ya=!0)}else yi.type===Ss&&(ma=ma||yi.data.thisDep,_a=_a||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,_a,Ya,Zt)}else return new La(fr===Ko,fr===yo,fr===un,Zt)}}var Pn=new La(!1,!1,!1,function(){});function Jn(it,Zt,fr,oa,wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=bt,Qa.max=Mt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},pn={},Ha=[],Ua={},Yi={};function Ri(yt){return yt.replace(".","_")}function Ti(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),pn[nr]=Li[nr]=!!Bt,Ua[nr]=kt}function xi(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),Array.isArray(Bt)?(Li[nr]=Bt.slice(),pn[nr]=Bt.slice()):Li[nr]=pn[nr]=Bt,Yi[nr]=kt}function Xi(yt){return!!isNaN(yt)}Ti(el,ci),Ti(bs,za),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Lo,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Rs,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",Fe),xi(Ic,Ic,mt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(ho,Bn),xi(Ro,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[ar,0,-1]),xi(Ue,"stencilOpSeparate",[de,Ot,Ot,Ot]),xi(I,"stencilOpSeparate",[Fe,Ot,Ot,Ot]),Ti(ie,nn),xi(we,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Se,Se,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var mn={gl:it,context:zi,strings:Zt,next:pn,current:Li,draw:yn,elements:ma,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},In={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:Fa,glTypes:fa,orientationType:Xa};Va&&(In.backBuffer=[Fe],In.drawBuffer=d(oa.maxDrawbuffers,function(yt){return yt===0?[0]:d(yt,function(kt){return Ja+kt})}));var Ii=0;function an(){var yt=Mn({cache:Na}),kt=yt.link,Bt=yt.global;yt.id=Ii++,yt.batchId="0";var nr=kt(mn),hr=yt.shared={props:"a0"};Object.keys(mn).forEach(function(sr){hr[sr]=Bt.def(nr,".",sr)});var lr=yt.next={},dr=yt.current={};Object.keys(Yi).forEach(function(sr){Array.isArray(Li[sr])&&(lr[sr]=Bt.def(hr.next,".",sr),dr[sr]=Bt.def(hr.current,".",sr))});var ur=yt.constants={};Object.keys(In).forEach(function(sr){ur[sr]=Bt.def(JSON.stringify(In[sr]))}),yt.invoke=function(sr,Vt){switch(Vt.type){case An:var Dr=["this",hr.context,hr.props,yt.batchId];return sr.def(kt(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return sr.def(hr.props,Vt.data);case yo:return sr.def(hr.context,Vt.data);case Ko:return sr.def("this",Vt.data);case Ss:return Vt.data.append(yt,sr),Vt.data.ref;case rl:return Vt.data.toString();case Os:return Vt.data.map(function(Jr){return yt.invoke(sr,Jr)})}},yt.attribCache={};var Ht={};return yt.scopeAttrib=function(sr){var Vt=Zt.id(sr);if(Vt in Ht)return Ht[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Ht[Vt]=kt(Dr);return Jr},yt}function kn(yt){var kt=yt.static,Bt=yt.dynamic,nr;if(Be in kt){var hr=!!kt[Be];nr=rn(function(dr,ur){return hr}),nr.enable=hr}else if(Be in Bt){var lr=Bt[Be];nr=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}return nr}function Dn(yt,kt){var Bt=yt.static,nr=yt.dynamic;if(dt in Bt){var hr=Bt[dt];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,ur){var Ht=dr.link(hr),sr=dr.shared;ur.set(sr.framebuffer,".next",Ht);var Vt=sr.context;return ur.set(Vt,"."+vt,Ht+".width"),ur.set(Vt,"."+Lt,Ht+".height"),Ht})):rn(function(dr,ur){var Ht=dr.shared;ur.set(Ht.framebuffer,".next","null");var sr=Ht.context;return ur.set(sr,"."+vt,sr+"."+yr),ur.set(sr,"."+Lt,sr+"."+Er),"null"})}else if(dt in nr){var lr=nr[dt];return vn(lr,function(dr,ur){var Ht=dr.invoke(ur,lr),sr=dr.shared,Vt=sr.framebuffer,Dr=ur.def(Vt,".getFramebuffer(",Ht,")");ur.set(Vt,".next",Dr);var Jr=sr.context;return ur.set(Jr,"."+vt,Dr+"?"+Dr+".width:"+Jr+"."+yr),ur.set(Jr,"."+Lt,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Zn(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Ht){if(Ht in nr){var sr=nr[Ht],Vt=!0,Dr=sr.x|0,Jr=sr.y|0,ga,vi;return"width"in sr?ga=sr.width|0:Vt=!1,"height"in sr?vi=sr.height|0:Vt=!1,new La(!Vt&&kt&&kt.thisDep,!Vt&&kt&&kt.contextDep,!Vt&&kt&&kt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in sr||(_i=Fi.def(ui,".",vt,"-",Dr));var Si=vi;return"height"in sr||(Si=Fi.def(ui,".",Lt,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Ht in hr){var Ga=hr[Ht],ai=vn(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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",vt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Lt,"-",Ui,")");return[Si,Ui,fn,_o]});return kt&&(ai.thisDep=ai.thisDep||kt.thisDep,ai.contextDep=ai.contextDep||kt.contextDep,ai.propDep=ai.propDep||kt.propDep),ai}else return kt?new La(kt.thisDep,kt.contextDep,kt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",vt),Fi.def(ui,".",Lt)]}):null}var dr=lr(Se);if(dr){var ur=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Ht,sr){var Vt=ur.append(Ht,sr),Dr=Ht.shared.context;return sr.set(Dr,"."+At,Vt[2]),sr.set(Dr,"."+zt,Vt[3]),Vt})}return{viewport:dr,scissor_box:lr(we)}}function Ds(yt,kt){var Bt=yt.static,nr=typeof Bt[Nt]=="string"&&typeof Bt[St]=="string";if(nr){if(Object.keys(kt.dynamic).length>0)return null;var hr=kt.static,lr=Object.keys(hr);if(lr.length>0&&typeof hr[lr[0]]=="number"){for(var dr=[],ur=0;ur<lr.length;++ur)dr.push([hr[lr[ur]]|0,lr[ur]]);return dr}}return null}function bl(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Vt){if(Vt in nr){var Dr=Zt.id(nr[Vt]),Jr=rn(function(){return Dr});return Jr.id=Dr,Jr}else if(Vt in hr){var ga=hr[Vt];return vn(ga,function(vi,Ga){var ai=vi.invoke(Ga,ga),Zi=Ga.def(vi.shared.strings,".id(",ai,")");return Zi})}return null}var dr=lr(Nt),ur=lr(St),Ht=null,sr;return sn(dr)&&sn(ur)?(Ht=si.program(ur.id,dr.id,null,Bt),sr=rn(function(Vt,Dr){return Vt.link(Ht)})):sr=new La(dr&&dr.thisDep||ur&&ur.thisDep,dr&&dr.contextDep||ur&&ur.contextDep,dr&&dr.propDep||ur&&ur.propDep,function(Vt,Dr){var Jr=Vt.shared.shader,ga;dr?ga=dr.append(Vt,Dr):ga=Dr.def(Jr,".",Nt);var vi;ur?vi=ur.append(Vt,Dr):vi=Dr.def(Jr,".",St);var Ga=Jr+".program("+vi+","+ga;return Dr.def(Ga+")")}),{frag:dr,vert:ur,progVar:sr,program:Ht}}function po(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={},lr=!1;function dr(){if(He in Bt){var Fi=Bt[He];return Fi!==null&&yi.getVAO(Fi)===null&&(Fi=yi.createVAO(Fi)),lr=!0,hr.vao=Fi,rn(function(_i){var Si=yi.getVAO(Fi);return Si?_i.link(Si):"null"})}else if(He in nr){lr=!0;var ui=nr[He];return vn(ui,function(_i,Si){var Ui=_i.invoke(Si,ui);return Si.def(_i.shared.vao+".getVAO("+Ui+")")})}return null}var ur=dr(),Ht=!1;function sr(){if($t in Bt){var Fi=Bt[$t];if(hr.elements=Fi,fi(Fi)){var ui=hr.elements=ma.create(Fi,!0);Fi=ma.getElements(ui),Ht=!0}else Fi&&(Fi=ma.getElements(Fi),Ht=!0);var _i=rn(function(Ui,fn){if(Fi){var _o=Ui.link(Fi);return Ui.ELEMENTS=_o,_o}return Ui.ELEMENTS=null,null});return _i.value=Fi,_i}else if($t in nr){Ht=!0;var Si=nr[$t];return vn(Si,function(Ui,fn){var _o=Ui.shared,Bo=_o.isBufferArgs,Ps=_o.elements,Do=Ui.invoke(fn,Si),Ms=fn.def("null"),Ys=fn.def(Bo,"(",Do,")"),mu=Ui.cond(Ys).then(Ms,"=",Ps,".createStream(",Do,");").else(Ms,"=",Ps,".getElements(",Do,");");return fn.entry(mu),fn.exit(Ui.cond(Ys).then(Ps,".destroyStream(",Ms,");")),Ui.ELEMENTS=Ms,Ms})}else if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.elements+".getElements("+Ui.shared.vao+".currentVAO.elements):null")});return null}var Vt=sr();function Dr(){if(Tr in Bt){var Fi=Bt[Tr];return hr.primitive=Fi,rn(function(_i,Si){return Ra[Fi]})}else if(Tr in nr){var ui=nr[Tr];return vn(ui,function(_i,Si){var Ui=_i.constants.primTypes,fn=_i.invoke(Si,ui);return Si.def(Ui,"[",fn,"]")})}else{if(Ht)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(lr)return new La(ur.thisDep,ur.contextDep,ur.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 Bt){var _i=Bt[Fi]|0;return ui?hr.offset=_i:hr.instances=_i,rn(function(Ui,fn){return ui&&(Ui.OFFSET=_i),_i})}else if(Fi in nr){var Si=nr[Fi];return vn(Si,function(Ui,fn){var _o=Ui.invoke(fn,Si);return ui&&(Ui.OFFSET=_o),_o})}else if(ui){if(Ht)return rn(function(Ui,fn){return Ui.OFFSET=0,0});if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.offset:0")})}else if(lr)return new La(ur.thisDep,ur.contextDep,ur.propDep,function(Ui,fn){return fn.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.instances:-1")});return null}var ga=Jr(Kr,!0);function vi(){if(Ar in Bt){var Fi=Bt[Ar]|0;return hr.count=Fi,rn(function(){return Fi})}else if(Ar in nr){var ui=nr[Ar];return vn(ui,function(fn,_o){var Bo=fn.invoke(_o,ui);return Bo})}else if(Ht)if(sn(Vt)){if(Vt)return ga?new La(ga.thisDep,ga.contextDep,ga.propDep,function(fn,_o){var Bo=_o.def(fn.ELEMENTS,".vertCount-",fn.OFFSET);return Bo}):rn(function(fn,_o){return _o.def(fn.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(fn,_o){var Bo=fn.ELEMENTS;return fn.OFFSET?_o.def(Bo,"?",Bo,".vertCount-",fn.OFFSET,":-1"):_o.def(Bo,"?",Bo,".vertCount:-1")});return Si}else if(lr){var Ui=new La(ur.thisDep,ur.contextDep,ur.propDep,function(fn,_o){return _o.def(fn.shared.vao,".currentVAO?",fn.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:ur,vaoActive:lr,elementsActive:Ht,static:hr}}function Wl(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Ha.forEach(function(lr){var dr=Ri(lr);function ur(Ht,sr){if(lr in Bt){var Vt=Ht(Bt[lr]);hr[dr]=rn(function(){return Vt})}else if(lr in nr){var Dr=nr[lr];hr[dr]=vn(Dr,function(Jr,ga){return sr(Jr,ga,Jr.invoke(ga,Dr))})}}switch(lr){case Iu:case bs:case el:case Dc:case Un:case ie:case Rc:case yc:case ho:case Rs:return ur(function(Ht){return Ht},function(Ht,sr,Vt){return Vt});case Lo:return ur(function(Ht){return Sa[Ht]},function(Ht,sr,Vt){var Dr=Ht.constants.compareFuncs;return sr.def(Dr,"[",Vt,"]")});case Js:return ur(function(Ht){return Ht},function(Ht,sr,Vt){var Dr=sr.def("+",Vt,"[0]"),Jr=sr.def("+",Vt,"[1]");return[Dr,Jr]});case ll:return ur(function(Ht){var sr="srcRGB"in Ht?Ht.srcRGB:Ht.src,Vt="srcAlpha"in Ht?Ht.srcAlpha:Ht.src,Dr="dstRGB"in Ht?Ht.dstRGB:Ht.dst,Jr="dstAlpha"in Ht?Ht.dstAlpha:Ht.dst;return[ti[sr],ti[Dr],ti[Vt],ti[Jr]]},function(Ht,sr,Vt){var Dr=Ht.constants.blendFuncs;function Jr(ui,_i){var Si=sr.def('"',ui,_i,'" in ',Vt,"?",Vt,".",ui,_i,":",Vt,".",ui);return Si}var ga=Jr("src","RGB"),vi=Jr("dst","RGB"),Ga=sr.def(Dr,"[",ga,"]"),ai=sr.def(Dr,"[",Jr("src","Alpha"),"]"),Zi=sr.def(Dr,"[",vi,"]"),Fi=sr.def(Dr,"[",Jr("dst","Alpha"),"]");return[Ga,Zi,ai,Fi]});case _l:return ur(function(Ht){if(typeof Ht=="string")return[Qa[Ht],Qa[Ht]];if(typeof Ht=="object")return[Qa[Ht.rgb],Qa[Ht.alpha]]},function(Ht,sr,Vt){var Dr=Ht.constants.blendEquations,Jr=sr.def(),ga=sr.def(),vi=Ht.cond("typeof ",Vt,'==="string"');return vi.then(Jr,"=",ga,"=",Dr,"[",Vt,"];"),vi.else(Jr,"=",Dr,"[",Vt,".rgb];",ga,"=",Dr,"[",Vt,".alpha];"),sr(vi),[Jr,ga]});case Fl:return ur(function(Ht){return d(4,function(sr){return+Ht[sr]})},function(Ht,sr,Vt){return d(4,function(Dr){return sr.def("+",Vt,"[",Dr,"]")})});case lc:return ur(function(Ht){return Ht|0},function(Ht,sr,Vt){return sr.def(Vt,"|0")});case Yu:return ur(function(Ht){var sr=Ht.cmp||"keep",Vt=Ht.ref||0,Dr="mask"in Ht?Ht.mask:-1;return[Sa[sr],Vt,Dr]},function(Ht,sr,Vt){var Dr=Ht.constants.compareFuncs,Jr=sr.def('"cmp" in ',Vt,"?",Dr,"[",Vt,".cmp]",":",Ot),ga=sr.def(Vt,".ref|0"),vi=sr.def('"mask" in ',Vt,"?",Vt,".mask|0:-1");return[Jr,ga,vi]});case Ue:case I:return ur(function(Ht){var sr=Ht.fail||"keep",Vt=Ht.zfail||"keep",Dr=Ht.zpass||"keep";return[lr===I?Fe:de,Fa[sr],Fa[Vt],Fa[Dr]]},function(Ht,sr,Vt){var Dr=Ht.constants.stencilOps;function Jr(ga){return sr.def('"',ga,'" in ',Vt,"?",Dr,"[",Vt,".",ga,"]:",Ot)}return[lr===I?Fe:de,Jr("fail"),Jr("zfail"),Jr("zpass")]});case Au:return ur(function(Ht){var sr=Ht.factor|0,Vt=Ht.units|0;return[sr,Vt]},function(Ht,sr,Vt){var Dr=sr.def(Vt,".factor|0"),Jr=sr.def(Vt,".units|0");return[Dr,Jr]});case Zu:return ur(function(Ht){var sr=0;return Ht==="front"?sr=de:Ht==="back"&&(sr=Fe),sr},function(Ht,sr,Vt){return sr.def(Vt,'==="front"?',de,":",Fe)});case bu:return ur(function(Ht){return Ht},function(Ht,sr,Vt){return Vt});case Ic:return ur(function(Ht){return Xa[Ht]},function(Ht,sr,Vt){return sr.def(Vt+'==="cw"?'+et+":"+mt)});case uu:return ur(function(Ht){return Ht.map(function(sr){return!!sr})},function(Ht,sr,Vt){return d(4,function(Dr){return"!!"+Vt+"["+Dr+"]"})});case Ro:return ur(function(Ht){var sr="value"in Ht?Ht.value:1,Vt=!!Ht.invert;return[sr,Vt]},function(Ht,sr,Vt){var Dr=sr.def('"value" in ',Vt,"?+",Vt,".value:1"),Jr=sr.def("!!",Vt,".invert");return[Dr,Jr]})}}),hr}function fs(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Object.keys(Bt).forEach(function(lr){var dr=Bt[lr],ur;if(typeof dr=="number"||typeof dr=="boolean")ur=rn(function(){return dr});else if(typeof dr=="function"){var Ht=dr._reglType;Ht==="texture2d"||Ht==="textureCube"?ur=rn(function(sr){return sr.link(dr)}):(Ht==="framebuffer"||Ht==="framebufferCube")&&(ur=rn(function(sr){return sr.link(dr.color[0])}))}else ya(dr)&&(ur=rn(function(sr){var Vt=sr.global.def("[",d(dr.length,function(Dr){return dr[Dr]}),"]");return Vt}));ur.value=dr,hr[lr]=ur}),Object.keys(nr).forEach(function(lr){var dr=nr[lr];hr[lr]=vn(dr,function(ur,Ht){return ur.invoke(Ht,dr)})}),hr}function Sl(yt,kt){var Bt=yt.static,nr=yt.dynamic,hr={};return Object.keys(Bt).forEach(function(lr){var dr=Bt[lr],ur=Zt.id(lr),Ht=new Ma;if(fi(dr))Ht.state=eo,Ht.buffer=wa.getBuffer(wa.create(dr,Qr,!1,!0)),Ht.type=0;else{var sr=wa.getBuffer(dr);if(sr)Ht.state=eo,Ht.buffer=sr,Ht.type=0;else if("constant"in dr){var Vt=dr.constant;Ht.buffer="null",Ht.state=fo,typeof Vt=="number"?Ht.x=Vt:Qn.forEach(function(Zi,Fi){Fi<Vt.length&&(Ht[Zi]=Vt[Fi])})}else{fi(dr.buffer)?sr=wa.getBuffer(wa.create(dr.buffer,Qr,!1,!0)):sr=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=fa[dr.type]);var ai=dr.divisor|0;Ht.buffer=sr,Ht.state=eo,Ht.size=ga,Ht.normalized=vi,Ht.type=Ga||sr.dtype,Ht.offset=Dr,Ht.stride=Jr,Ht.divisor=ai}}hr[lr]=rn(function(Zi,Fi){var ui=Zi.attribCache;if(ur in ui)return ui[ur];var _i={isStream:!1};return Object.keys(Ht).forEach(function(Si){_i[Si]=Ht[Si]}),Ht.buffer&&(_i.buffer=Zi.link(Ht.buffer),_i.type=_i.type||_i.buffer+".dtype"),ui[ur]=_i,_i})}),Object.keys(nr).forEach(function(lr){var dr=nr[lr];function ur(Ht,sr){var Vt=Ht.invoke(sr,dr),Dr=Ht.shared,Jr=Ht.constants,ga=Dr.isBufferArgs,vi=Dr.buffer,Ga={isStream:sr.def(!1)},ai=new Ma;ai.state=eo,Object.keys(ai).forEach(function(_i){Ga[_i]=sr.def(""+ai[_i])});var Zi=Ga.buffer,Fi=Ga.type;sr("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,"=",fo,";","if(typeof "+Vt+'.constant === "number"){',Ga[Qn[0]],"=",Vt,".constant;",Qn.slice(1).map(function(_i){return Ga[_i]}).join("="),"=0;","}else{",Qn.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){sr(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),sr("}}"),sr.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[lr]=vn(dr,ur)}),hr}function kl(yt){var kt=yt.static,Bt=yt.dynamic,nr={};return Object.keys(kt).forEach(function(hr){var lr=kt[hr];nr[hr]=rn(function(dr,ur){return typeof lr=="number"||typeof lr=="boolean"?""+lr:dr.link(lr)})}),Object.keys(Bt).forEach(function(hr){var lr=Bt[hr];nr[hr]=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}),nr}function tu(yt,kt,Bt,nr,hr){var lr=yt.static,dr=yt.dynamic,ur=Ds(yt,kt),Ht=Dn(yt,hr),sr=Zn(yt,Ht,hr),Vt=po(yt,hr),Dr=Wl(yt,hr),Jr=bl(yt,hr,ur);function ga(ui){var _i=sr[ui];_i&&(Dr[ui]=_i)}ga(Se),ga(Ri(we));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Ht,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=kn(yt,hr),Ga.uniforms=fs(Bt,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!ur&&fr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=kt.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 ur?Ga.useVAO=!0:Ga.attributes=Sl(kt,hr),Ga.context=kl(nr,hr),Ga}function qs(yt,kt,Bt){var nr=yt.shared,hr=nr.context,lr=yt.scope();Object.keys(Bt).forEach(function(dr){kt.save(hr,"."+dr);var ur=Bt[dr],Ht=ur.append(yt,kt);Array.isArray(Ht)?lr(hr,".",dr,"=[",Ht.join(),"];"):lr(hr,".",dr,"=",Ht,";")}),kt(lr)}function pl(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.framebuffer,ur;Va&&(ur=kt.def(hr.extensions,".webgl_draw_buffers"));var Ht=yt.constants,sr=Ht.drawBuffer,Vt=Ht.backBuffer,Dr;Bt?Dr=Bt.append(yt,kt):Dr=kt.def(dr,".next"),nr||kt("if(",Dr,"!==",dr,".cur){"),kt("if(",Dr,"){",lr,".bindFramebuffer(",da,",",Dr,".framebuffer);"),Va&&kt(ur,".drawBuffersWEBGL(",sr,"[",Dr,".colorAttachments.length]);"),kt("}else{",lr,".bindFramebuffer(",da,",null);"),Va&&kt(ur,".drawBuffersWEBGL(",Vt,");"),kt("}",dr,".cur=",Dr,";"),nr||kt("}")}function wl(yt,kt,Bt){var nr=yt.shared,hr=nr.gl,lr=yt.current,dr=yt.next,ur=nr.current,Ht=nr.next,sr=yt.cond(ur,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Bt.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=lr[Dr];var vi=d(Li[Dr].length,function(ai){return sr.def(Jr,"[",ai,"]")});sr(yt.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=sr.def(Ht,".",Dr);var Ga=yt.cond(Jr,"!==",ur,".",Dr);sr(Ga),Dr in Ua?Ga(yt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),ur,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",ur,".",Dr,"=",Jr,";")}}}),Object.keys(Bt.state).length===0&&sr(ur,".dirty=false;"),kt(sr)}function Yn(yt,kt,Bt,nr){var hr=yt.shared,lr=yt.current,dr=hr.current,ur=hr.gl,Ht;ni(Object.keys(Bt)).forEach(function(sr){var Vt=Bt[sr];if(!(nr&&!nr(Vt))){var Dr=Vt.append(yt,kt);if(Ua[sr]){var Jr=Ua[sr];sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(yt.cond(Ht).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Ht,";")):(kt(yt.cond(Dr).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Dr,";"))}else if(ya(Dr)){var ga=lr[sr];kt(ur,".",Yi[sr],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(ur,".",Yi[sr],"(",Ht,");",dr,".",sr,"=",Ht,";")):kt(ur,".",Yi[sr],"(",Dr,");",dr,".",sr,"=",Dr,";")}})}function Cl(yt,kt){di&&(yt.instancing=kt.def(yt.shared.extensions,".angle_instanced_arrays"))}function Co(yt,kt,Bt,nr,hr){var lr=yt.shared,dr=yt.stats,ur=lr.current,Ht=lr.timer,sr=Bt.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=kt.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(nr?(Jr=kt.def(),ui(Jr,"=",Ht,".getNumPendingQueries();")):ui(Ht,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(nr?ui(Ht,".pushScopeStats(",Jr,",",Ht,".getNumPendingQueries(),",dr,");"):ui(Ht,".endQuery();"))}function Ga(ui){var _i=kt.def(ur,".profile");kt(ur,".profile=",ui,";"),kt.exit(ur,".profile=",_i,";")}var ai;if(sr){if(sn(sr)){sr.enable?(ga(kt),vi(kt.exit),Ga("true")):Ga("false");return}ai=sr.append(yt,kt),Ga(ai)}else ai=kt.def(ur,".profile");var Zi=yt.block();ga(Zi),kt("if(",ai,"){",Zi,"}");var Fi=yt.block();vi(Fi),kt.exit("if(",ai,"){",Fi,"}")}function ve(yt,kt,Bt,nr,hr){var lr=yt.shared;function dr(Ht){switch(Ht){case is:case ul:case Il:return 2;case Ao:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function ur(Ht,sr,Vt){var Dr=lr.gl,Jr=kt.def(Ht,".location"),ga=kt.def(lr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){kt("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=kt.def(Vt.size,"||",sr):Si=sr,kt("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(fn){return ga+"."+fn+"!=="+Vt[fn]}).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(fn){return ga+"."+fn+"="+Vt[fn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;kt("if(",ga,".divisor!==",Ui,"){",yt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){kt("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",Qn.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===fo?ui():(kt("if(",vi,"===",eo,"){"),Fi(),kt("}else{"),ui(),kt("}"))}nr.forEach(function(Ht){var sr=Ht.name,Vt=Bt.attributes[sr],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(yt,kt)}else{if(!hr(Pn))return;var Jr=yt.scopeAttrib(sr);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=kt.def(Jr,".",ga)})}ur(yt.link(Ht),dr(Ht.info.type),Dr)})}function K(yt,kt,Bt,nr,hr,lr){for(var dr=yt.shared,ur=dr.gl,Ht,sr=0;sr<nr.length;++sr){var Vt=nr[sr],Dr=Vt.name,Jr=Vt.info.type,ga=Bt.uniforms[Dr],vi=yt.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=yt.link(Zi._texture||Zi.color[0]._texture);kt(ur,".uniform1i(",Ga,",",Fi+".bind());"),kt.exit(Fi,".unbind();")}else if(Jr===vu||Jr===Tl||Jr===cu){var ui=yt.global.def("new Float32Array(["+Array.prototype.slice.call(Zi)+"])"),_i=2;Jr===Tl?_i=3:Jr===cu&&(_i=4),kt(ur,".uniformMatrix",_i,"fv(",Ga,",false,",ui,");")}else{switch(Jr){case wo:Ht="1f";break;case is:Ht="2f";break;case Ao:Ht="3f";break;case Zo:Ht="4f";break;case $o:Ht="1i";break;case ps:Ht="1i";break;case Il:Ht="2i";break;case ul:Ht="2i";break;case eu:Ht="3i";break;case tl:Ht="3i";break;case Ru:Ht="4i";break;case Jo:Ht="4i";break}kt(ur,".uniform",Ht,"(",Ga,",",ya(Zi)?Array.prototype.slice.call(Zi):Zi,");")}continue}else ai=ga.append(yt,kt)}else{if(!hr(Pn))continue;ai=kt.def(dr.uniforms,"[",Zt.id(Dr),"]")}Jr===uc?kt("if(",ai,"&&",ai,'._reglType==="framebuffer"){',ai,"=",ai,".color[0];","}"):Jr===Vl&&kt("if(",ai,"&&",ai,'._reglType==="framebufferCube"){',ai,"=",ai,".color[0];","}");var Si=1;switch(Jr){case uc:case Vl:var Ui=kt.def(ai,"._texture");kt(ur,".uniform1i(",Ga,",",Ui,".bind());"),kt.exit(Ui,".unbind();");continue;case ps:case $o:Ht="1i";break;case ul:case Il:Ht="2i",Si=2;break;case tl:case eu:Ht="3i",Si=3;break;case Jo:case Ru:Ht="4i",Si=4;break;case wo:Ht="1f";break;case is:Ht="2f",Si=2;break;case Ao:Ht="3f",Si=3;break;case Zo:Ht="4f",Si=4;break;case vu:Ht="Matrix2fv";break;case Tl:Ht="Matrix3fv";break;case cu:Ht="Matrix4fv";break}if(Ht.charAt(0)==="M"){kt(ur,".uniform",Ht,"(",Ga,",");var fn=Math.pow(Jr-vu+2,2),_o=yt.global.def("new Float32Array(",fn,")");Array.isArray(ai)?kt("false,(",d(fn,function(Ys){return _o+"["+Ys+"]="+ai[Ys]}),",",_o,")"):kt("false,(Array.isArray(",ai,")||",ai," instanceof Float32Array)?",ai,":(",d(fn,function(Ys){return _o+"["+Ys+"]="+ai+"["+Ys+"]"}),",",_o,")"),kt(");")}else if(Si>1){for(var Bo=[],Ps=[],Do=0;Do<Si;++Do)Array.isArray(ai)?Ps.push(ai[Do]):Ps.push(kt.def(ai+"["+Do+"]")),lr&&Bo.push(kt.def());lr&&kt("if(!",yt.batchId,"||",Bo.map(function(Ys,mu){return Ys+"!=="+Ps[mu]}).join("||"),"){",Bo.map(function(Ys,mu){return Ys+"="+Ps[mu]+";"}).join("")),kt(ur,".uniform",Ht,"(",Ga,",",Ps.join(","),");"),lr&&kt("}")}else{if(lr){var Ms=kt.def();kt("if(!",yt.batchId,"||",Ms,"!==",ai,"){",Ms,"=",ai,";")}kt(ur,".uniform",Ht,"(",Ga,",",ai,");"),lr&&kt("}")}}}function _e(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.draw,ur=nr.draw;function Ht(){var Si=ur.elements,Ui,fn=kt;return Si?((Si.contextDep&&nr.contextDynamic||Si.propDep)&&(fn=Bt),Ui=Si.append(yt,fn),ur.elementsActive&&fn("if("+Ui+")"+lr+".bindBuffer("+pa+","+Ui+".buffer.buffer);")):(Ui=fn.def(),fn(Ui,"=",dr,".",$t,";","if(",Ui,"){",lr,".bindBuffer(",pa,",",Ui,".buffer.buffer);}","else if(",hr.vao,".currentVAO){",Ui,"=",yt.shared.elements+".getElements("+hr.vao,".currentVAO.elements);",Bi?"":"if("+Ui+")"+lr+".bindBuffer("+pa+","+Ui+".buffer.buffer);","}")),Ui}function sr(){var Si=ur.count,Ui,fn=kt;return Si?((Si.contextDep&&nr.contextDynamic||Si.propDep)&&(fn=Bt),Ui=Si.append(yt,fn)):Ui=fn.def(dr,".",Ar),Ui}var Vt=Ht();function Dr(Si){var Ui=ur[Si];return Ui?Ui.contextDep&&nr.contextDynamic||Ui.propDep?Ui.append(yt,Bt):Ui.append(yt,kt):kt.def(dr,".",Si)}var Jr=Dr(Tr),ga=Dr(Kr),vi=sr();if(typeof vi=="number"){if(vi===0)return}else Bt("if(",vi,"){"),Bt.exit("}");var Ga,ai;di&&(Ga=Dr(na),ai=yt.instancing);var Zi=Vt+".type",Fi=ur.elements&&sn(ur.elements)&&!ur.vaoActive;function ui(){function Si(){Bt(ai,".drawElementsInstancedANGLE(",[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)",Ga],");")}function Ui(){Bt(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}function _i(){function Si(){Bt(lr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)"]+");")}function Ui(){Bt(lr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Bt("if(",Ga,">0){"),ui(),Bt("}else if(",Ga,"<0){"),_i(),Bt("}")):ui():_i()}function te(yt,kt,Bt,nr,hr){var lr=an(),dr=lr.proc("body",hr);return di&&(lr.instancing=dr.def(lr.shared.extensions,".angle_instanced_arrays")),yt(lr,dr,Bt,nr),lr.compile().body}function me(yt,kt,Bt,nr){Cl(yt,kt),Bt.useVAO?Bt.drawVAO?kt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,kt),");"):kt(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(kt(yt.shared.vao,".setVAO(null);"),ve(yt,kt,Bt,nr.attributes,function(){return!0})),K(yt,kt,Bt,nr.uniforms,function(){return!0},!1),_e(yt,kt,kt,Bt)}function Ge(yt,kt){var Bt=yt.proc("draw",1);Cl(yt,Bt),qs(yt,Bt,kt.context),pl(yt,Bt,kt.framebuffer),wl(yt,Bt,kt),Yn(yt,Bt,kt.state),Co(yt,Bt,kt,!1,!0);var nr=kt.shader.progVar.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",nr,".program);"),kt.shader.program)me(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var hr=yt.global.def("{}"),lr=Bt.def(nr,".id"),dr=Bt.def(hr,"[",lr,"]");Bt(yt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",lr,"]=",yt.link(function(ur){return te(me,yt,kt,ur,1)}),"(",nr,");",dr,".call(this,a0);"))}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function Le(yt,kt,Bt,nr){yt.batchId="a1",Cl(yt,kt);function hr(){return!0}ve(yt,kt,Bt,nr.attributes,hr),K(yt,kt,Bt,nr.uniforms,hr,!1),_e(yt,kt,kt,Bt)}function $e(yt,kt,Bt,nr){Cl(yt,kt);var hr=Bt.contextDep,lr=kt.def(),dr="a0",ur="a1",Ht=kt.def();yt.shared.props=Ht,yt.batchId=lr;var sr=yt.scope(),Vt=yt.scope();kt(sr.entry,"for(",lr,"=0;",lr,"<",ur,";++",lr,"){",Ht,"=",dr,"[",lr,"];",Vt,"}",sr.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Bt.needsContext&&qs(yt,Vt,Bt.context),Bt.needsFramebuffer&&pl(yt,Vt,Bt.framebuffer),Yn(yt,Vt,Bt.state,Dr),Bt.profile&&Dr(Bt.profile)&&Co(yt,Vt,Bt,!1,!0),nr)Bt.useVAO?Bt.drawVAO?Dr(Bt.drawVAO)?Vt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,Vt),");"):sr(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,sr),");"):sr(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(sr(yt.shared.vao,".setVAO(null);"),ve(yt,sr,Bt,nr.attributes,Jr),ve(yt,Vt,Bt,nr.attributes,Dr)),K(yt,sr,Bt,nr.uniforms,Jr,!1),K(yt,Vt,Bt,nr.uniforms,Dr,!0),_e(yt,sr,Vt,Bt);else{var ga=yt.global.def("{}"),vi=Bt.shader.progVar.append(yt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(yt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",yt.link(function(Zi){return te(Le,yt,Bt,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",lr,"],",lr,");")}}function gt(yt,kt){var Bt=yt.proc("batch",2);yt.batchId="0",Cl(yt,Bt);var nr=!1,hr=!0;Object.keys(kt.context).forEach(function(ga){nr=nr||kt.context[ga].propDep}),nr||(qs(yt,Bt,kt.context),hr=!1);var lr=kt.framebuffer,dr=!1;lr?(lr.propDep?nr=dr=!0:lr.contextDep&&nr&&(dr=!0),dr||pl(yt,Bt,lr)):pl(yt,Bt,null),kt.state.viewport&&kt.state.viewport.propDep&&(nr=!0);function ur(ga){return ga.contextDep&&nr||ga.propDep}wl(yt,Bt,kt),Yn(yt,Bt,kt.state,function(ga){return!ur(ga)}),(!kt.profile||!ur(kt.profile))&&Co(yt,Bt,kt,!1,"a1"),kt.contextDep=nr,kt.needsContext=hr,kt.needsFramebuffer=dr;var Ht=kt.shader.progVar;if(Ht.contextDep&&nr||Ht.propDep)$e(yt,Bt,kt,null);else{var sr=Ht.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",sr,".program);"),kt.shader.program)$e(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var Vt=yt.global.def("{}"),Dr=Bt.def(sr,".id"),Jr=Bt.def(Vt,"[",Dr,"]");Bt(yt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",yt.link(function(ga){return te($e,yt,kt,ga,2)}),"(",sr,");",Jr,".call(this,a0,a1);"))}}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function jt(yt,kt){var Bt=yt.proc("scope",3);yt.batchId="a2";var nr=yt.shared,hr=nr.current;if(qs(yt,Bt,kt.context),kt.framebuffer&&kt.framebuffer.append(yt,Bt),ni(Object.keys(kt.state)).forEach(function(ur){var Ht=kt.state[ur],sr=Ht.append(yt,Bt);ya(sr)?sr.forEach(function(Vt,Dr){Xi(Vt)?Bt.set(yt.next[ur],"["+Dr+"]",Vt):Bt.set(yt.next[ur],"["+Dr+"]",yt.link(Vt,{stable:!0}))}):sn(Ht)?Bt.set(nr.next,"."+ur,yt.link(sr,{stable:!0})):Bt.set(nr.next,"."+ur,sr)}),Co(yt,Bt,kt,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(ur){var Ht=kt.draw[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.draw,"."+ur,sr):Bt.set(nr.draw,"."+ur,yt.link(sr),{stable:!0})}}),Object.keys(kt.uniforms).forEach(function(ur){var Ht=kt.uniforms[ur].append(yt,Bt);Array.isArray(Ht)&&(Ht="["+Ht.map(function(sr){return Xi(sr)?sr:yt.link(sr,{stable:!0})})+"]"),Bt.set(nr.uniforms,"["+yt.link(Zt.id(ur),{stable:!0})+"]",Ht)}),Object.keys(kt.attributes).forEach(function(ur){var Ht=kt.attributes[ur].append(yt,Bt),sr=yt.scopeAttrib(ur);Object.keys(new Ma).forEach(function(Vt){Bt.set(sr,"."+Vt,Ht[Vt])})}),kt.scopeVAO){var lr=kt.scopeVAO.append(yt,Bt);Xi(lr)?Bt.set(nr.vao,".targetVAO",lr):Bt.set(nr.vao,".targetVAO",yt.link(lr,{stable:!0}))}function dr(ur){var Ht=kt.shader[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.shader,"."+ur,sr):Bt.set(nr.shader,"."+ur,yt.link(sr,{stable:!0}))}}dr(St),dr(Nt),Object.keys(kt.state).length>0&&(Bt(hr,".dirty=true;"),Bt.exit(hr,".dirty=true;")),Bt("a1(",yt.shared.context,",a0,",yt.batchId,");")}function wr(yt){if(!(typeof yt!="object"||ya(yt))){for(var kt=Object.keys(yt),Bt=0;Bt<kt.length;++Bt)if(h.isDynamic(yt[kt[Bt]]))return!0;return!1}}function Nr(yt,kt,Bt){var nr=kt.static[Bt];if(!nr||!wr(nr))return;var hr=yt.global,lr=Object.keys(nr),dr=!1,ur=!1,Ht=!1,sr=yt.global.def("{}");lr.forEach(function(Dr){var Jr=nr[Dr];if(h.isDynamic(Jr)){typeof Jr=="function"&&(Jr=nr[Dr]=h.unbox(Jr));var ga=vn(Jr,null);dr=dr||ga.thisDep,Ht=Ht||ga.propDep,ur=ur||ga.contextDep}else{switch(hr(sr,".",Dr,"="),typeof Jr){case"number":hr(Jr);break;case"string":hr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&hr("[",Jr.join(),"]");break;default:hr(yt.link(Jr));break}hr(";")}});function Vt(Dr,Jr){lr.forEach(function(ga){var vi=nr[ga];if(h.isDynamic(vi)){var Ga=Dr.invoke(Jr,vi);Jr(sr,".",ga,"=",Ga,";")}})}kt.dynamic[Bt]=new h.DynamicVariable(Ss,{thisDep:dr,contextDep:ur,propDep:Ht,ref:sr,append:Vt}),delete kt.static[Bt]}function pr(yt,kt,Bt,nr,hr){var lr=an();lr.stats=lr.link(hr),Object.keys(kt.static).forEach(function(ur){Nr(lr,kt,ur)}),jr.forEach(function(ur){Nr(lr,yt,ur)});var dr=tu(yt,kt,Bt,nr,lr);return dr.shader.program&&(dr.shader.program.attributes.sort(function(ur,Ht){return ur.name<Ht.name?-1:1}),dr.shader.program.uniforms.sort(function(ur,Ht){return ur.name<Ht.name?-1:1})),Ge(lr,dr),jt(lr,dr),gt(lr,dr),v(lr.compile(),{destroy:function(){dr.shader.program.destroy()}})}return{next:pn,current:Li,procs:function(){var yt=an(),kt=yt.proc("poll"),Bt=yt.proc("refresh"),nr=yt.block();kt(nr),Bt(nr);var hr=yt.shared,lr=hr.gl,dr=hr.next,ur=hr.current;nr(ur,".dirty=false;"),pl(yt,kt),pl(yt,Bt,null,!0);var Ht;di&&(Ht=yt.link(di)),fr.oes_vertex_array_object&&Bt(yt.link(fr.oes_vertex_array_object),".bindVertexArrayOES(null);");var sr=Bt.def(hr.attributes),Vt=Bt.def(0),Dr=yt.cond(Vt,".buffer");Dr.then(lr,".enableVertexAttribArray(i);",lr,".bindBuffer(",Qr,",",Vt,".buffer.buffer);",lr,".vertexAttribPointer(i,",Vt,".size,",Vt,".type,",Vt,".normalized,",Vt,".stride,",Vt,".offset);").else(lr,".disableVertexAttribArray(i);",lr,".vertexAttrib4f(i,",Vt,".x,",Vt,".y,",Vt,".z,",Vt,".w);",Vt,".buffer=null;");var Jr=yt.link(oa.maxAttributes,{stable:!0});return Bt("for(var i=0;i<",Jr,";++i){",Vt,"=",sr,"[i];",Dr,"}"),di&&Bt("for(var i=0;i<",Jr,";++i){",Ht,".vertexAttribDivisorANGLE(i,",sr,"[i].divisor);","}"),Bt(yt.shared.vao,".currentVAO=null;",yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"),Object.keys(Ua).forEach(function(ga){var vi=Ua[ga],Ga=nr.def(dr,".",ga),ai=yt.block();ai("if(",Ga,"){",lr,".enable(",vi,")}else{",lr,".disable(",vi,")}",ur,".",ga,"=",Ga,";"),Bt(ai),kt("if(",Ga,"!==",ur,".",ga,"){",ai,"}")}),Object.keys(Yi).forEach(function(ga){var vi=Yi[ga],Ga=Li[ga],ai,Zi,Fi=yt.block();if(Fi(lr,".",vi,"("),ya(Ga)){var ui=Ga.length;ai=yt.global.def(dr,".",ga),Zi=yt.global.def(ur,".",ga),Fi(d(ui,function(_i){return ai+"["+_i+"]"}),");",d(ui,function(_i){return Zi+"["+_i+"]="+ai+"["+_i+"];"}).join("")),kt("if(",d(ui,function(_i){return ai+"["+_i+"]!=="+Zi+"["+_i+"]"}).join("||"),"){",Fi,"}")}else ai=nr.def(dr,".",ga),Zi=nr.def(ur,".",ga),Fi(ai,");",ur,".",ga,"=",ai,";"),kt("if(",ai,"!==",Zi,"){",Fi,"}");Bt(Fi)}),yt.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,io=34919,Ho=35007,cl=function(it,Zt){if(!Zt.ext_disjoint_timer_query)return null;var fr=[];function oa(){return fr.pop()||Zt.ext_disjoint_timer_query.createQueryEXT()}function wa(Qa){fr.push(Qa)}var ma=[];function _a(Qa){var di=oa();Zt.ext_disjoint_timer_query.beginQueryEXT(Ho,di),ma.push(di),Ei(ma.length-1,ma.length,Qa)}function Ya(){Zt.ext_disjoint_timer_query.endQueryEXT(Ho)}function bi(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var yi=[];function si(){return yi.pop()||new bi}function yn(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=ma.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<ma.length;++di){var Li=ma[di];Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,io)?(Bi+=Zt.ext_disjoint_timer_query.getQueryObjectEXT(Li,Yo),wa(Li)):ma[Qa++]=Li,Na[di+1]=Bi,ea[di+1]=Qa}for(ma.length=Qa,Qa=0,di=0;di<zi.length;++di){var pn=zi[di],Ha=pn.startQueryIndex,Ua=pn.endQueryIndex;pn.sum+=Na[Ua]-Na[Ha];var Yi=ea[Ha],Ri=ea[Ua];Ri===Yi?(pn.stats.gpuTime+=pn.sum/1e6,yn(pn)):(pn.startQueryIndex=Yi,pn.endQueryIndex=Ri,zi[Qa++]=pn)}zi.length=Qa}}return{beginQuery:_a,endQuery:Ya,pushScopeStats:Ei,update:Ma,getNumPendingQueries:function(){return ma.length},clear:function(){fr.push.apply(fr,ma);for(var Qa=0;Qa<fr.length;Qa++)Zt.ext_disjoint_timer_query.deleteQueryEXT(fr[Qa]);ma.length=0,fr.length=0},restore:function(){ma.length=0,fr.length=0}}},al=16384,xl=256,gn=1024,vo=34962,cs="webglcontextlost",ms="webglcontextrestored",Al=1,Hl=2,Su=3;function Rl(it,Zt){for(var fr=0;fr<it.length;++fr)if(it[fr]===Zt)return fr;return-1}function _c(it){var Zt=g(it);if(!Zt)return null;var fr=Zt.gl,oa=fr.getContextAttributes(),wa=fr.isContextLost(),ma=b(fr,Zt);if(!ma)return null;var _a=p(),Ya=ro(),bi=Zt.cachedCode||{},yi=ma.extensions,si=cl(fr,yi),yn=m(),zi=fr.drawingBufferWidth,Ei=fr.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(fr,yi),di=ra(fr,Ya,Zt,Li),Va=Xt(fr,yi,di,Ya),Bi=Pu(fr,yi,Qa,Ya,di,Va,Ma);function Li(te){return Bi.destroyBuffer(te)}var pn=Hu(fr,_a,Ya,Zt),Ha=Xc(fr,yi,Qa,function(){Ri.procs.poll()},Na,Ya,Zt),Ua=Mc(fr,yi,Qa,Ya,Zt),Yi=Yc(fr,yi,Qa,Ha,Ua,Ya),Ri=Jn(fr,_a,yi,Qa,di,Va,Ha,Yi,ea,Bi,pn,Ma,Na,si,bi,Zt),Ti=iu(fr,Yi,Ri.procs.poll,Na,oa,yi,Qa),xi=Ri.next,Xi=fr.canvas,mn=[],In=[],Ii=[],an=[Zt.onDestroy],kn=null;function Dn(){if(mn.length===0){si&&si.update(),kn=null;return}kn=c.next(Dn),wl();for(var te=mn.length-1;te>=0;--te){var me=mn[te];me&&me(Na,null,0)}fr.flush(),si&&si.update()}function Zn(){!kn&&mn.length>0&&(kn=c.next(Dn))}function Ds(){kn&&(c.cancel(Dn),kn=null)}function bl(te){te.preventDefault(),wa=!0,Ds(),In.forEach(function(me){me()})}function po(te){fr.getError(),wa=!1,ma.restore(),pn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Zn(),Ii.forEach(function(me){me()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(ms,po,!1));function Wl(){mn.length=0,Ds(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(ms,po)),pn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),an.forEach(function(te){te()})}function fs(te){function me(lr){var dr=v({},lr);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 ur(Ht){if(Ht in dr){var sr=dr[Ht];delete dr[Ht],Object.keys(sr).forEach(function(Vt){dr[Ht+"."+Vt]=sr[Vt]})}}return ur("blend"),ur("depth"),ur("cull"),ur("stencil"),ur("polygonOffset"),ur("scissor"),ur("sample"),"vao"in lr&&(dr.vao=lr.vao),dr}function Ge(lr,dr){var ur={},Ht={};return Object.keys(lr).forEach(function(sr){var Vt=lr[sr];if(h.isDynamic(Vt)){Ht[sr]=h.unbox(Vt,sr);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr<Vt.length;++Dr)if(h.isDynamic(Vt[Dr])){Ht[sr]=h.unbox(Vt,sr);return}}ur[sr]=Vt}),{dynamic:Ht,static:ur}}var Le=Ge(te.context||{},!0),$e=Ge(te.uniforms||{},!0),gt=Ge(te.attributes||{},!1),jt=Ge(me(te),!1),wr={gpuTime:0,cpuTime:0,count:0},Nr=Ri.compile(jt,gt,$e,Le,wr),pr=Nr.draw,yt=Nr.batch,kt=Nr.scope,Bt=[];function nr(lr){for(;Bt.length<lr;)Bt.push(null);return Bt}function hr(lr,dr){var ur;if(typeof lr=="function")return kt.call(this,null,lr,0);if(typeof dr=="function")if(typeof lr=="number")for(ur=0;ur<lr;++ur)kt.call(this,null,dr,ur);else if(Array.isArray(lr))for(ur=0;ur<lr.length;++ur)kt.call(this,lr[ur],dr,ur);else return kt.call(this,lr,dr,0);else if(typeof lr=="number"){if(lr>0)return yt.call(this,nr(lr|0),lr|0)}else if(Array.isArray(lr)){if(lr.length)return yt.call(this,lr,lr.length)}else return pr.call(this,lr)}return v(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,me){var Ge=0;Ri.procs.poll();var Le=me.color;Le&&(fr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=al),"depth"in me&&(fr.clearDepth(+me.depth),Ge|=xl),"stencil"in me&&(fr.clearStencil(me.stencil|0),Ge|=gn),fr.clear(Ge)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Sl(v({framebuffer:te.framebuffer.faces[me]},te),kl);else Sl(te,kl);else kl(null,te)}function qs(te){mn.push(te);function me(){var Ge=Rl(mn,te);function Le(){var $e=Rl(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ds()}mn[Ge]=Le}return Zn(),{cancel:me}}function pl(){var te=xi.viewport,me=xi.scissor_box;te[0]=te[1]=me[0]=me[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=me[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=me[3]=fr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Yn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(m()-yn)/1e3}Yn();function Co(te,me){var Ge;switch(te){case"frame":return qs(me);case"lost":Ge=In;break;case"restore":Ge=Ii;break;case"destroy":Ge=an;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le<Ge.length;++Le)if(Ge[Le]===me){Ge[Le]=Ge[Ge.length-1],Ge.pop();return}}}}function ve(){return bi}function K(te){Object.entries(te).forEach(function(me){bi[me[0]]=me[1]})}var _e=v(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,vo,!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:qs,on:Co,limits:Qa,hasExtension:function(te){return Qa.extensions.indexOf(te.toLowerCase())>=0},read:Ti,destroy:Wl,_gl:fr,_refresh:Yn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ve,preloadCachedCode:K});return Zt.onDone(null,_e),_e}return _c})}}),xT=Xe({"src/lib/prepare_regl.js"(Z,G){"use strict";var v=TE(),x=Cq();G.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||v({container:r._glcontainer.node()}),o}}}),p6=Xe({"src/traces/scattergl/plot.js"(h,G){"use strict";var v=HE(),x=a6(),S=hq(),E=kq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),n=qE().styleTextSelection,i={};function s(c,m,p,T){var l=c._size,_=c.width*T,w=c.height*T,A=l.l*T,M=l.b*T,g=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,M+p.domain[0]*u,_-g-(1-m.domain[1])*d,w-b-(1-p.domain[1])*u]}var h=G.exports=function(m,p,T){if(T.length){var l=m._fullLayout,_=p._scene,w=p.xaxis,A=p.yaxis,M,g;if(_){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!b){_.init();return}var d=_.count,u=l._glcanvas.data()[0].regl;if(a(m,p,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=v(u)),_.fill2d===!0&&(_.fill2d=x(u)),_.glText===!0)for(_.glText=new Array(d),M=0;M<d;M++)_.glText[M]=new E(u);if(_.glText){if(d>_.glText.length){var y=d-_.glText.length;for(M=0;M<y;M++)_.glText.push(new E(u))}else if(d<_.glText.length){var f=_.glText.length-d,R=_.glText.splice(d,f);R.forEach(function(ae){ae.destroy()})}for(M=0;M<d;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,d),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(ae,j){var Q=T[j];if(!(!ae||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],ce=re.trace,be=re.t,Ae=_.lineOptions[j],De,ze,Ze=[];ce._ownfill&&Ze.push(j),ce._nexttrace&&Ze.push(j+1),Ze.length&&(_.fillOrder[j]=Ze);var at=[],nt=Ae&&Ae.positions||be.positions,rt,st;if(ce.fill==="tozeroy"){for(rt=0;rt<nt.length&&isNaN(nt[rt+1]);)rt+=2;for(st=nt.length-2;st>rt&&isNaN(nt[st+1]);)st-=2;nt[rt+1]!==0&&(at=[nt[rt],0]),at=at.concat(nt.slice(rt,st+2)),nt[st+1]!==0&&(at=at.concat([nt[st],0]))}else if(ce.fill==="tozerox"){for(rt=0;rt<nt.length&&isNaN(nt[rt]);)rt+=2;for(st=nt.length-2;st>rt&&isNaN(nt[st]);)st-=2;nt[rt]!==0&&(at=[0,nt[rt+1]]),at=at.concat(nt.slice(rt,st+2)),nt[st]!==0&&(at=at.concat([0,nt[st+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(at=[],De=0,ae.splitNull=!0,ze=0;ze<nt.length;ze+=2)(isNaN(nt[ze])||isNaN(nt[ze+1]))&&(at=at.concat(nt.slice(De,ze)),at.push(nt[De],nt[De+1]),at.push(null,null),De=ze+2);at=at.concat(nt.slice(De)),De&&at.push(nt[De],nt[De+1])}else{var Me=ce._nexttrace;if(Me){var ye=_.lineOptions[j+1];if(ye){var he=ye.positions;if(ce.fill==="tonexty"){for(at=nt.slice(),j=Math.floor(he.length/2);j--;){var Oe=he[j*2],tt=he[j*2+1];isNaN(Oe)||isNaN(tt)||at.push(Oe,tt)}ae.fill=Me.fillcolor}}}}if(ce._prevtrace&&ce._prevtrace.fill==="tonext"){var ot=_.lineOptions[j-1].positions,Qe=at.length/2;De=Qe;var Pt=[De];for(ze=0;ze<ot.length;ze+=2)(isNaN(ot[ze])||isNaN(ot[ze+1]))&&(Pt.push(ze/2+Qe+1),De=ze+2);at=at.concat(ot),ae.hole=Pt}return ae.fillmode=ce.fill,ae.opacity=ce.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 se=_.selectBatch[U]=e.selIndices2selPoints(O),le={};for(g=0;g<se.length;g++)le[se[g]]=1;var fe=[];for(g=0;g<B;g++)le[g]||fe.push(g);_.unselectBatch[U]=fe}var V=P.xpx=new Array(B),Y=P.ypx=new Array(B);for(g=0;g<B;g++)V[g]=w.c2p(X[g]),Y[g]=A.c2p($[g])}else P.xpx=P.ypx=null}if(F){if(_.select2d||(_.select2d=v(l._glcanvas.data()[1].regl)),_.scatter2d){var ee=new Array(d);for(M=0;M<d;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,m._context.plotGlPixelRatio),range:[(w._rl||w.range)[0],(A._rl||A.range)[0],(w._rl||w.range)[1],(A._rl||A.range)[1]]},oe=e.repeat(q,_.count);_.fill2d&&_.fill2d.update(oe),_.line2d&&_.line2d.update(oe),_.error2d&&_.error2d.update(oe.concat(oe)),_.scatter2d&&_.scatter2d.update(oe),_.select2d&&_.select2d.update(oe),_.glText&&_.glText.forEach(function(ae){ae.update(q)})}}};h.reglPrecompiled=i}}),Lq=Xe({"src/traces/scattergl/index.js"(Z,G){"use strict";var v=cj();v.plot=p6(),G.exports=v}}),Pq=Xe({"lib/scattergl.js"(Z,G){"use strict";G.exports=Lq()}}),d6=Xe({"src/traces/splom/attributes.js"(Z,G){"use strict";var v=af(),x=ku(),S=tf().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Jl(),t=xx(),r=lh().idRegex,o=zl().templatedArray,a=Qo().extendFlat,n=v.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 c(m){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[m],editType:"plot"}}}G.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:c("x"),yaxes:c("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=Xe({"src/traces/parcoords/merge_length.js"(Z,G){"use strict";G.exports=function(v,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),v._length=E,e=0;e<x.length;e++)t=x[e],t.visible&&(t._length=E);return E}}}),Iq=Xe({"src/traces/splom/defaults.js"(Z,G){"use strict";var v=sa(),x=hp(),S=d6(),E=Fu(),e=md(),t=bT(),r=dT().isOpenSymbol;G.exports=function(i,s,h,c){function m(g,b){return v.coerce(i,s,S,g,b)}var p=x(i,s,{name:"dimensions",handleItemDefaults:o}),T=m("diagonal.visible"),l=m("showupperhalf"),_=m("showlowerhalf"),w=t(s,p,"values");if(!w||!T&&!l&&!_){s.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),e(i,s,h,c,m,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var A=r(s.marker.symbol),M=E.isBubble(s);m("marker.line.width",A||M?1:0),a(i,s,c,m),v.coerceSelectionMarkerOpacity(s,m)};function o(n,i){function s(c,m){return v.coerce(n,i,S.dimensions,c,m)}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 c=i.dimensions,m=c.length,p=i.showupperhalf,T=i.showlowerhalf,l=i.diagonal.visible,_,w,A=new Array(m),M=new Array(m);for(_=0;_<m;_++){var g=_?_+1:"";A[_]="x"+g,M[_]="y"+g}var b=h("xaxes",A),d=h("yaxes",M),u=i._diag=new Array(m);i._xaxes={},i._yaxes={};var y=[],f=[];function R(X,$,se,le){if(X){var fe=X.charAt(0),V=s._splomAxes[fe];if(i["_"+fe+"axes"][X]=1,le.push(X),!(X in V)){var Y=V[X]={};se&&(Y.label=se.label||"",se.visible&&se.axis&&(se.axis.type&&(Y.type=se.axis.type),se.axis.matches&&(Y.matches=$)))}}}var L=!l&&!T,z=!l&&!p;for(i._axesDim={},_=0;_<m;_++){var F=c[_],N=_===0,O=_===m-1,P=N&&L||O&&z?void 0:b[_],U=N&&z||O&&L?void 0:d[_];R(P,U,F,y),R(U,P,F,f),u[_]=[P,U],i._axesDim[P]=_,i._axesDim[U]=_}for(_=0;_<y.length;_++)for(w=0;w<f.length;w++){var B=y[_]+f[w];(_>w&&p||_<w&&T||_===w&&(l||!T||!p))&&(s._splomSubplots[B]=1)}(!T||!l&&p&&T)&&(s._splomGridDflt.xside="bottom",s._splomGridDflt.yside="left")}}}),Rq=Xe({"src/traces/splom/scene_update.js"(Z,G){"use strict";var v=sa();G.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]=v.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||v.extendFlat(n,o),n}}}),Dq=Xe({"src/traces/splom/calc.js"(Z,G){"use strict";var v=sa(),x=ef(),S=Bd().calcMarkerSize,E=Bd().calcAxisExpansion,e=Fd(),t=yg().markerSelection,r=yg().markerStyle,o=Rq(),a=Hs().BADNUM,n=y0().TOO_MANY_POINTS;G.exports=function(s,h){var c=h.dimensions,m=h._length,p={},T=p.cdata=[],l=p.data=[],_=h._visibleDims=[],w,A,M,g,b;function d(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"?v.simpleMap(F,L.c2l):F)}for(w=0;w<c.length;w++)if(M=c[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){v.log("Skipping splom dimension "+w+" with conflicting axis types");continue}g?(d(g,M),b&&b.type==="category"&&(b._categories=g._categories.slice())):d(b,M),_.push(w)}e(s,h),v.extendFlat(p,r(s,h));var u=T.length,y=u*m>n,f;for(y?f=p.sizeAvg||Math.max(p.size,3):f=S(h,m),A=0;A<_.length;A++)w=_[A],M=c[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],f);var R=o(s,h);return R.matrix||(R.matrix=!0),R.matrixOptions=p,R.selectedOptions=t(s,h,h.selected),R.unselectedOptions=t(s,h,h.unselected),[{x:!1,y:!1,t:{},trace:h}]}}}),zq=Xe({"node_modules/performance-now/lib/performance-now.js"(Z,G){(function(){var v,x,S,E,e,t;typeof performance<"u"&&performance!==null&&performance.now?G.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(G.exports=function(){return(v()-e)/1e6},x=process.hrtime,v=function(){var r;return r=x(),r[0]*1e9+r[1]},E=v(),t=process.uptime()*1e9,e=E-t):Date.now?(G.exports=function(){return Date.now()-S},S=Date.now()):(G.exports=function(){return new Date().getTime()-S},S=new Date().getTime())}).call(Z)}}),Fq=Xe({"node_modules/raf/index.js"(Z,G){var v=zq(),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=v(),c=Math.max(0,i-(h-o));o=c+h,setTimeout(function(){var m=n.slice(0);n.length=0;for(var p=0;p<m.length;p++)if(!m[p].cancelled)try{m[p].callback(o)}catch(T){setTimeout(function(){throw T},0)}},Math.round(c))}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;G.exports=function(s){return e.call(x,s)},G.exports.cancel=function(){t.apply(x,arguments)},G.exports.polyfill=function(s){s||(s=x),s.requestAnimationFrame=e,s.cancelAnimationFrame=t}}}),Oq=Xe({"node_modules/array-range/index.js"(Z,G){G.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}}}),Bq=Xe({"node_modules/regl-splom/index.js"(Z,G){"use strict";var v=HE(),x=Ev(),S=mg(),E=Fq(),e=Oq(),t=C1(),r=gg();G.exports=o;function o(s,h){if(!(this instanceof o))return new o(s,h);this.traces=[],this.passes={},this.regl=s,this.scatter=v(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 m=0;m<s.length;m++)this.updateItem(m,s[m]);this.traces=this.traces.filter(Boolean);let h=[],c=0;for(let m=0;m<this.traces.length;m++){let p=this.traces[m],T=this.traces[m].passes;for(let l=0;l<T.length;l++)h.push(this.passes[T[l]]);p.passOffset=c,c+=p.passes.length}return this.scatter.update(...h),this},o.prototype.updateItem=function(s,h){let{regl:c}=this;if(h===null)return this.traces[s]=null,this;if(!h)return this;let m=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"}),p=this.traces[s]||(this.traces[s]={id:s,buffer:c.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:t([c._gl.drawingBufferWidth,c._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(m.color!=null&&(p.color=m.color),m.size!=null&&(p.size=m.size),m.marker!=null&&(p.marker=m.marker),m.borderColor!=null&&(p.borderColor=m.borderColor),m.borderSize!=null&&(p.borderSize=m.borderSize),m.opacity!=null&&(p.opacity=m.opacity),m.viewport&&(p.viewport=t(m.viewport)),m.diagonal!=null&&(p.diagonal=m.diagonal),m.upper!=null&&(p.upper=m.upper),m.lower!=null&&(p.lower=m.lower),m.data){p.buffer(r(m.data)),p.columns=m.data.length,p.count=m.data[0].length,p.bounds=[];for(let y=0;y<p.columns;y++)p.bounds[y]=S(m.data[y],1)}let T;m.range&&(p.range=m.range,T=p.range&&typeof p.range[0]!="number"),m.domain&&(p.domain=m.domain);let l=!1;m.padding!=null&&(Array.isArray(m.padding)&&m.padding.length===p.columns&&typeof m.padding[m.padding.length-1]=="number"?(p.padding=m.padding.map(i),l=!0):p.padding=i(m.padding));let _=p.columns,w=p.count,A=p.viewport.width,M=p.viewport.height,g=p.viewport.x,b=p.viewport.y,d=A/_,u=M/_;p.passes=[];for(let y=0;y<_;y++)for(let f=0;f<_;f++){if(!p.diagonal&&f===y||!p.upper&&y>f||!p.lower&&y<f)continue;let R=a(p.id,y,f),L=this.passes[R]||(this.passes[R]={});if(m.data&&(m.transpose?L.positions={x:{buffer:p.buffer,offset:f,count:w,stride:_},y:{buffer:p.buffer,offset:y,count:w,stride:_}}:L.positions={x:{buffer:p.buffer,offset:f*w,count:w},y:{buffer:p.buffer,offset:y*w,count:w}},L.bounds=n(p.bounds,y,f)),m.domain||m.viewport||m.data){let z=l?n(p.padding,y,f):p.padding;if(p.domain){let[F,N,O,P]=n(p.domain,y,f);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+f*d+d*z[0],b+y*u+u*z[1],g+(f+1)*d-d*z[2],b+(y+1)*u-u*z[3]]}m.color&&(L.color=p.color),m.size&&(L.size=p.size),m.marker&&(L.marker=p.marker),m.borderSize&&(L.borderSize=p.borderSize),m.borderColor&&(L.borderColor=p.borderColor),m.opacity&&(L.opacity=p.opacity),m.range&&(L.range=T?n(p.range,y,f):p.range||L.bounds),p.passes.push(R)}return this},o.prototype.draw=function(...s){if(!s.length)this.scatter.draw();else{let h=[];for(let c=0;c<s.length;c++)if(typeof s[c]=="number"){let{passes:m,passOffset:p}=this.traces[s[c]];h.push(...e(p,p+m.length))}else if(s[c].length){let m=s[c],{passes:p,passOffset:T}=this.traces[c];p=p.map((l,_)=>{h[T+_]=m})}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,c){let m=s.id!=null?s.id:s,p=h,T=c;return m<<16|(p&255)<<8|T&255}function n(s,h,c){let m,p,T,l,_,w,A,M,g=s[h],b=s[c];return g.length>2?(m=g[0],T=g[2],p=g[1],l=g[3]):g.length?(m=p=g[0],T=l=g[1]):(m=g.x,p=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),[_,p,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]}}}}),Nq=Xe({"src/traces/splom/plot.js"(Z,G){"use strict";var v=Bq(),x=sa(),S=ef(),E=Jd().selectMode;G.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,c=h.cdata,m=o._glcanvas.data()[0].regl,p=o.dragmode,T,l,_,w,A;if(c.length!==0){h.lower=n.showupperhalf,h.upper=n.showlowerhalf,h.diagonal=n.diagonal.visible;var M=n._visibleDims,g=c.length,b=s.viewOpts={};for(b.ranges=new Array(g),b.domains=new Array(g),A=0;A<M.length;A++){_=M[A];var d=b.ranges[A]=new Array(4),u=b.domains[A]=new Array(4);T=S.getFromId(t,n._diag[_][0]),T&&(d[0]=T._rl[0],d[2]=T._rl[1],u[0]=T.domain[0],u[2]=T.domain[1]),l=S.getFromId(t,n._diag[_][1]),l&&(d[1]=l._rl[0],d[3]=l._rl[1],u[1]=l.domain[0],u[3]=l.domain[1])}var y=t._context.plotGlPixelRatio,f=a.l*y,R=a.b*y,L=a.w*y,z=a.h*y;b.viewport=[f,R,L+f,z+R],s.matrix===!0&&(s.matrix=v(m));var F=o.clickmode.indexOf("select")>-1,N=E(p)||!!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),se=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(c[A][w]);if(l=S.getFromId(t,n._diag[_][1]),l)for(se[A]=new Array(P),w=0;w<P;w++)se[A][w]=l.c2p(c[A][w])}if(s.selectBatch.length||s.unselectBatch.length){var le=x.extendFlat({},h,s.unselectedOptions,b),fe=x.extendFlat({},h,s.selectedOptions,b);s.matrix.update(le,fe),O=!1}}else i.xpx=i.ypx=null;if(O){var V=x.extendFlat({},h,b);s.matrix.update(V,null)}}}}}),v6=Xe({"src/traces/splom/helpers.js"(Z){"use strict";Z.getDimIndex=function(v,x){for(var S=x._id,E=S.charAt(0),e={x:0,y:1}[E],t=v._visibleDims,r=0;r<t.length;r++){var o=t[r];if(v._diag[o][e]===S)return r}return!1}}}),Uq=Xe({"src/traces/splom/hover.js"(Z,G){"use strict";var v=v6(),x=pT().calcHover,S=Go().getFromId,E=Qo().extendFlat;function e(r,o,a,n,i){i||(i={});var s=(n||"").charAt(0)==="x",h=(n||"").charAt(0)==="y",c=t(r,o,a);if((s||h)&&i.hoversubplots==="axis"&&c[0])for(var m=(s?r.xa:r.ya)._subplotsWith,p=i.gd,T=E({},r),l=0;l<m.length;l++){var _=m[l];if(_!==r.xa._id+r.ya._id){h?T.xa=S(p,_,"x"):T.ya=S(p,_,"y");var w=s||h,A=t(T,o,a,w);c=c.concat(A)}}return c}function t(r,o,a,n){var i=r.cd,s=i[0].trace,h=r.scene,c=h.matrixOptions.cdata,m=r.xa,p=r.ya,T=m.c2p(o),l=p.c2p(a),_=r.distance,w=v.getDimIndex(s,m),A=v.getDimIndex(s,p);if(w===!1||A===!1)return[r];for(var M=c[w],g=c[A],b,d,u=_,y=0;y<M.length;y++)if(!(n&&y!==r.index)){var f=M[y],R=g[y],L=m.c2p(f)-T,z=p.c2p(R)-l,F=Math.sqrt(L*L+z*z);(n||F<u)&&(u=d=F,b=y)}return r.index=b,r.distance=u,r.dxy=d,b===void 0?[r]:[x(r,M,g,s)]}G.exports={hoverPoints:e}}}),jq=Xe({"src/traces/splom/select.js"(Z,G){"use strict";var v=sa(),x=v.pushUnique,S=Fu(),E=v6();G.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,c=t.yaxis,m=[];if(!i)return m;var p=!S.hasMarkers(a)&&!S.hasText(a);if(a.visible!==!0||p)return m;var T=E.getDimIndex(a,h),l=E.getDimIndex(a,c);if(T===!1||l===!1)return m;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 d=0;d<A.length;d++)r.contains([_[d],w[d]],null,d,t)?(m.push({pointNumber:d,x:A[d],y:M[d]}),x(g,d)):g.indexOf(d)!==-1?x(g,d):b.push(d);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,v.extendFlat({},u,i.selectedOptions,i.viewOpts)),i.selectBatch=g,i.unselectBatch=b,m}}}),qq=Xe({"src/traces/splom/edit_style.js"(Z,G){"use strict";var v=sa(),x=Fd(),S=yg().markerStyle;G.exports=function(e,t){var r=t.trace,o=e._fullLayout._splomScenes[r.uid];if(o){x(e,r),v.extendFlat(o.matrixOptions,S(e,r));var a=v.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(a,null)}}}}),Vq=Xe({"src/traces/splom/base_index.js"(Z,G){"use strict";var v=so(),x=X5();G.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:d6(),supplyDefaults:Iq(),colorbar:pp(),calc:Dq(),plot:Nq(),hoverPoints:Uq().hoverPoints,selectPoints:jq(),editStyle:qq(),meta:{}},v.register(x)}}),Gq=Xe({"src/traces/splom/base_plot.js"(Z,G){"use strict";var v=a6(),x=so(),S=xT(),E=Hh().getModuleCalcData,e=Kf(),t=ef().getFromId,r=Go().shouldShowZeroLine,o="splom",a={};function n(p){var T=p._fullLayout,l=x.getModule(o),_=E(p.calcdata,l)[0],w=S(p,["ANGLE_instanced_arrays","OES_element_index_uint"],a);w&&(T._hasOnlyLargeSploms&&h(p),l.plot(p,{},_))}function i(p){var T=p.calcdata,l=p._fullLayout;l._hasOnlyLargeSploms&&h(p);for(var _=0;_<T.length;_++){var w=T[_][0],A=w.trace,M=l._splomScenes[A.uid];A.type==="splom"&&M&&M.matrix&&s(p,A,M)}}function s(p,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),d=t(p,T._diag[g][0]);d&&(b[0]=d.r2l(d.range[0]),b[2]=d.r2l(d.range[1]));var u=t(p,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(p){var T=p._fullLayout,l=T._glcanvas.data()[0].regl,_=T._splomGrid;_||(_=T._splomGrid=v(l)),_.update(c(p))}function c(p){var T=p._context.plotGlPixelRatio,l=p._fullLayout,_=l._size,w=[0,0,l.width*T,l.height*T],A={},M;function g(X,$,se,le,fe,V){se*=T,le*=T,fe*=T,V*=T;var Y=$[X+"color"],ee=$[X+"width"],q=String(Y+ee);q in A?A[q].data.push(NaN,NaN,se,le,fe,V):A[q]={data:[se,le,fe,V],join:"rect",thickness:ee*T,color:Y,viewport:w,range:w,overlay:!1}}for(M in l._splomSubplots){var b=l._plots[M],d=b.xaxis,u=b.yaxis,y=d._gridVals,f=u._gridVals,R=d._offset,L=d._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(d.showgrid)for(M=0;M<y.length;M++)P=R+d.l2p(y[M].x),g("grid",d,P,F,P,F+z);if(u.showgrid)for(M=0;M<f.length;M++)U=F+O+N*f[M].x,g("grid",u,R,U,R+L,U);r(p,d,u)&&(P=R+d.l2p(0),g("zeroline",d,P,F,P,F+z)),r(p,u,d)&&(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 m(p,T,l,_){var w={},A;if(_._splomScenes){for(A=0;A<p.length;A++){var M=p[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(p,T,l,_)}G.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:m,updateFx:e.updateFx,toSVG:e.toSVG,reglPrecompiled:a}}}),Hq=Xe({"src/traces/splom/index.js"(Z,G){"use strict";var v=Vq();v.basePlotModule=Gq(),G.exports=v}}),Wq=Xe({"lib/splom.js"(Z,G){"use strict";G.exports=Hq()}}),m6=Xe({"src/traces/parcoords/attributes.js"(Z,G){"use strict";var v=ku(),x=Wh(),S=tc(),E=wc().attributes,e=Qo().extendFlat,t=zl().templatedArray;G.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"},v("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=Xe({"src/traces/parcoords/constants.js"(Z,G){"use strict";G.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=Xe({"src/lib/gup.js"(Z,G){"use strict";var v=S_();function x(S){return[S]}G.exports={keyFun:function(S){return S.key},repeat:x,descend:v,wrap:x,unwrap:function(S){return S[0]}}}}),g6=Xe({"src/traces/parcoords/axisbrush.js"(Z,G){"use strict";var v=Ax(),x=Hn(),S=kv().keyFun,E=kv().repeat,e=sa().sorterAsc,t=sa().strTranslate,r=v.bar.snapRatio;function o(B,X){return B*(1-r)+X*r}var a=v.bar.snapClose;function n(B,X){return B*(1-a)+X*a}function i(B,X,$,se){if(s($,se))return $;var le=B?-1:1,fe=0,V=X.length-1;if(le<0){var Y=fe;fe=V,V=Y}for(var ee=X[fe],q=ee,oe=fe;le*oe<le*V;oe+=le){var ae=oe+le,j=X[ae];if(le*$<le*n(ee,j))return o(ee,q);if(le*$<le*j||ae===V)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",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function c(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var X=p(B.brush.filter.getConsolidated(),B.height),$=[0],se,le,fe,V=X.length?X[0][0]:null,Y=0;Y<X.length;Y++)se=X[Y],le=se[1]-se[0],$.push(V),$.push(le),fe=Y+1,fe<X.length&&(V=X[fe][0]-se[1]);return $.push(B.height),$}function p(B,X){return B.map(function($){return $.map(function(se){return Math.max(0,se*X)}).sort(e)})}function T(B,X){var $=v.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",m)}function w(B,X){var $=x.select(B).selectAll(".highlight, .highlight-shadow"),se=X?$.transition().duration(v.bar.snapDuration).each("end",X):$;_(se)}function A(B,X){var $=B.brush,se=$.filterSpecified,le=NaN,fe={},V;if(se){var Y=B.height,ee=$.filter.getConsolidated(),q=p(ee,Y),oe=NaN,ae=NaN,j=NaN;for(V=0;V<=q.length;V++){var Q=q[V];if(Q&&Q[0]<=X&&X<=Q[1]){oe=V;break}else if(ae=V?V-1:NaN,Q&&Q[0]>X){j=V;break}}if(le=oe,isNaN(le)&&(isNaN(ae)||isNaN(j)?le=isNaN(ae)?j:ae:le=X-q[ae][1]<q[j][0]-X?ae:j),!isNaN(le)){var re=q[le],ce=T(re,X);ce&&(fe.interval=ee[le],fe.intervalPix=re,fe.region=ce)}}if(B.ordinal&&!fe.region){var be=B.unitTickvals,Ae=B.unitToPaddedPx.invert(X);for(V=0;V<be.length;V++){var De=[be[Math.max(V-1,0)]*.25+be[V]*.75,be[Math.min(V+1,be.length-1)]*.25+be[V]*.75];if(Ae>=De[0]&&Ae<=De[1]){fe.clickableOrdinalRange=De;break}}}return fe}function M(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=X.unitToPaddedPx.invert($),le=X.brush,fe=A(X,$),V=fe.interval,Y=le.svgBrush;if(Y.wasDragged=!1,Y.grabbingBar=fe.region==="ns",Y.grabbingBar){var ee=V.map(X.unitToPaddedPx);Y.grabPoint=$-ee[0]-v.verticalPadding,Y.barLength=ee[1]-ee[0]}Y.clickableOrdinalRange=fe.clickableOrdinalRange,Y.stayingIntervals=X.multiselect&&le.filterSpecified?le.filter.getConsolidated():[],V&&(Y.stayingIntervals=Y.stayingIntervals.filter(function(q){return q[0]!==V[0]&&q[1]!==V[1]})),Y.startExtent=fe.region?V[fe.region==="s"?1:0]:se,X.parent.inBrushDrag=!0,Y.brushStartCallback()}function g(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=X.brush.svgBrush;se.wasDragged=!0,se._dragging=!0,se.grabbingBar?se.newExtent=[$-se.grabPoint,$+se.barLength-se.grabPoint].map(X.unitToPaddedPx.invert):se.newExtent=[se.startExtent,X.unitToPaddedPx.invert($)].sort(e),X.brush.filterSpecified=!0,se.extent=se.stayingIntervals.concat([se.newExtent]),se.brushCallback(X),w(B.parentNode)}function b(B,X){var $=X.brush,se=$.filter,le=$.svgBrush;le._dragging||(d(B,X),g(B,X),X.brush.svgBrush.wasDragged=!1),le._dragging=!1;var fe=x.event;fe.sourceEvent.stopPropagation();var V=le.grabbingBar;if(le.grabbingBar=!1,le.grabLocation=void 0,X.parent.inBrushDrag=!1,l(),!le.wasDragged){le.wasDragged=void 0,le.clickableOrdinalRange?$.filterSpecified&&X.multiselect?le.extent.push(le.clickableOrdinalRange):(le.extent=[le.clickableOrdinalRange],$.filterSpecified=!0):V?(le.extent=le.stayingIntervals,le.extent.length===0&&z($)):z($),le.brushCallback(X),w(B.parentNode),le.brushEndCallback($.filterSpecified?se.getConsolidated():[]);return}var Y=function(){se.set(se.getConsolidated())};if(X.ordinal){var ee=X.unitTickvals;ee[ee.length-1]<ee[0]&&ee.reverse(),le.newExtent=[i(0,ee,le.newExtent[0],le.stayingIntervals),i(1,ee,le.newExtent[1],le.stayingIntervals)];var q=le.newExtent[1]>le.newExtent[0];le.extent=le.stayingIntervals.concat(q?[le.newExtent]:[]),le.extent.length||z($),le.brushCallback(X),q?w(B.parentNode,Y):(Y(),w(B.parentNode))}else Y();le.brushEndCallback($.filterSpecified?se.getConsolidated():[])}function d(B,X){var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=A(X,$),le="crosshair";se.clickableOrdinalRange?le="pointer":se.region&&(le=se.region+"-resize"),x.select(document.body).style("cursor",le)}function u(B){B.on("mousemove",function(X){x.event.preventDefault(),X.parent.inBrushDrag||d(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 f(B,X,$){var se=$._context.staticPlot,le=B.selectAll(".background").data(E);le.enter().append("rect").classed("background",!0).call(h).call(c).style("pointer-events",se?"none":"auto").attr("transform",t(0,v.verticalPadding)),le.call(u).attr("height",function(Y){return Y.height-v.verticalPadding});var fe=B.selectAll(".highlight-shadow").data(E);fe.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",X).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),fe.attr("y1",function(Y){return Y.height}).call(_);var V=B.selectAll(".highlight").data(E);V.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),V.attr("y1",function(Y){return Y.height}).call(_)}function R(B,X,$){var se=B.selectAll("."+v.cn.axisBrush).data(E,S);se.enter().append("g").classed(v.cn.axisBrush,!0),f(se,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 se=$.brush,le=L(se),fe=le.slice();se.filter.set(fe),B()}}function N(B){for(var X=B.slice(),$=[],se,le=X.shift();le;){for(se=le.slice();(le=X.shift())&&le[0]<=se[1];)se[1]=Math.max(se[1],le[1]);$.push(se)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],X,$;return{set:function(se){B=se.map(function(le){return le.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(le,fe){return[Math.min(le[0],fe[0]),Math.max(le[1],fe[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return X},getBounds:function(){return $}}}function P(B,X,$,se,le,fe){var V=O();return V.set($),{filter:V,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:se,brushCallback:F(le),brushEndCallback:fe}}}function U(B,X){if(Array.isArray(B[0])?(B=B.map(function(se){return se.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(se){var le=[i(0,$,se[0],[]),i(1,$,se[1],[])];if(le[1]>le[0])return le}).filter(function(se){return se}),!B.length)return}return B.length>1?B:B[0]}G.exports={makeBrush:P,ensureAxisBrush:R,cleanRanges:U}}}),Xq=Xe({"src/traces/parcoords/defaults.js"(Z,G){"use strict";var v=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=Go(),r=m6(),o=g6(),a=Ax().maxDimensionCount,n=bT();function i(h,c,m,p,T){var l=T("line.color",m);if(x(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,c,p,T,{prefix:"line.",cLetter:"c"}),l.length;c.line.color=m}return 1/0}function s(h,c,m,p){function T(M,g){return v.coerce(h,c,r.dimensions,M,g)}var l=T("values"),_=T("visible");if(l&&l.length||(_=c.visible=!1),_){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var w=T("range");c._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:w},t.setConvert(c._ax,p.layout),T("multiselect");var A=T("constraintrange");A&&(c.constraintrange=o.cleanRanges(A,c))}}G.exports=function(c,m,p,T){function l(g,b){return v.coerce(c,m,r,g,b)}var _=c.dimensions;Array.isArray(_)&&_.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),_.splice(a));var w=e(c,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=i(c,m,p,T,l);E(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),n(m,w,"values",A);var M=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",M),v.coerceFont(l,"tickfont",M,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",M),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Zq=Xe({"src/traces/parcoords/calc.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray,x=rc(),S=kv().wrap;G.exports=function(t,r){var o,a;return x.hasColorscale(r,"line")&&v(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 Yq(Z){var G,v,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=((v=(G=Z.match(/([a-z])/ig))==null?void 0:G.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:E}}var wT,y6,TT,Kq=Vo({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Yq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Vo({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Jq=Vo({"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 G=Z[0]/360,v=Z[1]/100,x=Z[2]/100,S,E,e,t,r,o=0;if(v===0)return r=x*255,[r,r,r];for(E=x<.5?x*(1+v):x+v-x*v,S=2*x-E,t=[0,0,0];o<3;)e=G+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 G=Z[0]/255,v=Z[1]/255,x=Z[2]/255,S=Math.min(G,v,x),E=Math.max(G,v,x),e=E-S,t,r,o;return E===S?t=0:G===E?t=(v-x)/e:v===E?t=2+(x-G)/e:x===E&&(t=4+(G-v)/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:()=>$q});function $q(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var G,v,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 G=Array(3),G[0]=Math.min(Math.max(S.values[0],E[0]),e[0]),G[1]=Math.min(Math.max(S.values[1],E[1]),e[1]),G[2]=Math.min(Math.max(S.values[2],E[2]),e[2]),S.space[0]==="h"&&(G=Mx.rgb(G)),G.push(Math.min(Math.max(S.alpha,0),1)),G}var Qq=Vo({"node_modules/color-rgba/index.js"(){Kq(),_6(),Jq()}}),b6=Xe({"src/traces/parcoords/helpers.js"(Z){"use strict";var G=sa().isTypedArray;Z.convertTypedArray=function(v){return G(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),eV=Xe({"src/traces/parcoords/lines.js"(Z,G){"use strict";var v=["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,d,u,y,f){var R=b._gl;R.enable(R.SCISSOR_TEST),R.scissor(d,u,y,f),b.clear({color:[0,0,0,0],depth:1})}function s(b,d,u,y,f,R){var L=R.key;function z(F){var N=Math.min(y,f-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,d(R),F*y+N<f&&(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 c(b,d){for(var u=new Array(256),y=0;y<256;y++)u[y]=b(y/255).concat(d);return u}function m(b,d){return(b>>>8*d)%256/255}function p(b,d,u){for(var y=new Array(b*(S+4)),f=0,R=0;R<b;R++){for(var L=0;L<S;L++)y[f++]=L<d.length?d[L].paddedUnitValues[R]:.5;y[f++]=m(R,2),y[f++]=m(R,1),y[f++]=m(R,0),y[f++]=h(u[R])}return y}function T(b,d,u){for(var y=new Array(d*8),f=0,R=0;R<d;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[f++]=N}return y}function l(b){var d="0"+b;return d.slice(-2)}function _(b){return b<S?"p"+l(b+1)+"_"+l(b+4):"colors"}function w(b,d,u){for(var y=0;y<=S;y+=4)b[_(y)](T(y/4,d,u))}function A(b){for(var d={},u=0;u<=S;u+=4)d[_(u)]=b.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return d}function M(b,d,u,y,f,R,L,z,F,N,O,P,U,B){for(var X=[[],[]],$=0;$<64;$++)X[0][$]=$===f?1:0,X[1][$]=$===R?1:0;L*=B,z*=B,F*=B,N*=B;var se=b.lines.canvasOverdrag*B,le=b.domain,fe=b.canvasWidth*B,V=b.canvasHeight*B,Y=b.pad.l*B,ee=b.pad.b*B,q=b.layoutHeight*B,oe=b.layoutWidth*B,ae=b.deselectedLines.color,j=b.deselectedLines.opacity,Q=E.extendFlat({key:O,resolution:[fe,V],viewBoxPos:[L+se,z],viewBoxSize:[F,N],i0:f,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===d?0:L+se)+(Y-se)+oe*le.x[0],scissorWidth:(y===u?fe-L+se:F+.5)+(y===d?L+se:0),scissorY:z+ee+q*le.y[0],scissorHeight:N,viewportX:Y-se+oe*le.x[0],viewportY:ee+q*le.y[0],viewportWidth:fe,viewportHeight:V},U);return Q}function g(b){var d=t-1,u=Math.max(0,Math.floor(b[0]*d),0),y=Math.min(d,Math.ceil(b[1]*d),d);return[Math.min(u,y),Math.max(u,y)]}G.exports=function(b,d){var u=d.context,y=d.pick,f=d.regl,R=f._gl,L=R.getParameter(R.ALIASED_LINE_WIDTH_RANGE),z=Math.max(L[0],Math.min(L[1],d.viewModel.plotGlPixelRatio)),F={currentRafs:{},drawCompleted:!0,clearOnly:!1},N,O,P,U,B=A(f),X,$=f.texture(a),se=[];fe(d);var le=f({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:f.prop("scissorX"),y:f.prop("scissorY"),width:f.prop("scissorWidth"),height:f.prop("scissorHeight")}},viewport:{x:f.prop("viewportX"),y:f.prop("viewportY"),width:f.prop("viewportWidth"),height:f.prop("viewportHeight")},dither:!1,vert:v,frag:x,primitive:"lines",lineWidth:z,attributes:B,uniforms:{resolution:f.prop("resolution"),viewBoxPos:f.prop("viewBoxPos"),viewBoxSize:f.prop("viewBoxSize"),dim0A:f.prop("dim0A"),dim1A:f.prop("dim1A"),dim0B:f.prop("dim0B"),dim1B:f.prop("dim1B"),dim0C:f.prop("dim0C"),dim1C:f.prop("dim1C"),dim0D:f.prop("dim0D"),dim1D:f.prop("dim1D"),loA:f.prop("loA"),hiA:f.prop("hiA"),loB:f.prop("loB"),hiB:f.prop("hiB"),loC:f.prop("loC"),hiC:f.prop("hiC"),loD:f.prop("loD"),hiD:f.prop("hiD"),palette:$,contextColor:f.prop("contextColor"),maskTexture:f.prop("maskTexture"),drwLayer:f.prop("drwLayer"),maskHeight:f.prop("maskHeight")},offset:f.prop("offset"),count:f.prop("count")});function fe(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(ce,be){return be/j.color.length}):j.color,re=p(U,P,Q);w(B,U,re),!u&&!y&&($=f.texture(E.extendFlat({data:c(N.unitToColor,255)},a)))}function V(ae){var j,Q,re,ce=[[],[]];for(re=0;re<64;re++){var be=!ae&&re<P.length?P[re].brush.filter.getBounds():[-1/0,1/0];ce[0][re]=be[0],ce[1][re]=be[1]}var Ae=t*8,De=new Array(Ae);for(j=0;j<Ae;j++)De[j]=255;if(!ae)for(j=0;j<P.length;j++){var ze=j%8,Ze=(j-ze)/8,at=Math.pow(2,ze),nt=P[j],rt=nt.brush.filter.get();if(!(rt.length<2)){var st=g(rt[0])[1];for(Q=1;Q<rt.length;Q++){var Me=g(rt[Q]);for(re=st+1;re<Me[0];re++)De[re*8+Ze]&=~at;st=Math.max(st,Me[1])}}}var ye={shape:[8,t],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:De};return X?X(ye):X=f.texture(ye),{maskTexture:X,maskHeight:t,loA:ce[0].slice(0,16),loB:ce[0].slice(16,32),loC:ce[0].slice(32,48),loD:ce[0].slice(48,64),hiA:ce[1].slice(0,16),hiB:ce[1].slice(16,32),hiC:ce[1].slice(32,48),hiD:ce[1].slice(48,64)}}function Y(ae,j,Q){var re=ae.length,ce,be,Ae,De=1/0,ze=-1/0;for(ce=0;ce<re;ce++)ae[ce].dim0.canvasX<De&&(De=ae[ce].dim0.canvasX,be=ce),ae[ce].dim1.canvasX>ze&&(ze=ae[ce].dim1.canvasX,Ae=ce);re===0&&i(f,0,0,N.canvasWidth,N.canvasHeight);var Ze=V(u);for(ce=0;ce<re;ce++){var at=ae[ce],nt=at.dim0.crossfilterDimensionIndex,rt=at.dim1.crossfilterDimensionIndex,st=at.canvasX,Me=at.canvasY,ye=st+at.panelSizeX,he=at.plotGlPixelRatio;if(j||!se[nt]||se[nt][0]!==st||se[nt][1]!==ye){se[nt]=[st,ye];var Oe=M(N,be,Ae,ce,nt,rt,st,Me,at.panelSizeX,at.panelSizeY,at.dim0.crossfilterDimensionIndex,u?0:y?2:1,Ze,he);F.clearOnly=Q;var tt=j?N.lines.blockLineCount:U;s(f,le,F,tt,U,Oe)}}}function ee(ae,j){return f.read({x:ae,y:j,width:1,height:1,data:o}),o}function q(ae,j,Q,re){var ce=new Uint8Array(4*Q*re);return f.read({x:ae,y:j,width:Q,height:re,data:ce}),ce}function oe(){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:oe,update:fe}}}}),tV=Xe({"src/traces/parcoords/parcoords.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.isArrayOrTypedArray,E=x.numberFormat,e=(Qq(),zf(x6)).default,t=Go(),r=x.strRotate,o=x.strTranslate,a=ou(),n=es(),i=rc(),s=kv(),h=s.keyFun,c=s.repeat,m=s.unwrap,p=b6(),T=Ax(),l=g6(),_=eV();function w(se,le,fe){return x.aggNums(se,null,le,fe)}function A(se,le){return g(w(Math.min,se,le),w(Math.max,se,le))}function M(se){var le=se.range;return le?g(le[0],le[1]):A(se.values,se._length)}function g(se,le){return(isNaN(se)||!isFinite(se))&&(se=0),(isNaN(le)||!isFinite(le))&&(le=0),se===le&&(se===0?(se-=1,le+=1):(se*=.9,le*=1.1)),[se,le]}function b(se,le){return le?function(fe,V){var Y=le[V];return Y??se(fe)}:se}function d(se,le,fe,V,Y){var ee=M(fe);return V?v.scale.ordinal().domain(V.map(b(E(fe.tickformat),Y))).range(V.map(function(q){var oe=(q-ee[0])/(ee[1]-ee[0]);return se-le+oe*(2*le-se)})):v.scale.linear().domain(ee).range([se-le,le])}function u(se,le){return v.scale.linear().range([le,se-le])}function y(se,le){return v.scale.linear().domain(M(se)).range([le,1-le])}function f(se){if(se.tickvals){var le=M(se);return v.scale.ordinal().domain(se.tickvals).range(se.tickvals.map(function(fe){return(fe-le[0])/(le[1]-le[0])}))}}function R(se){var le=se.map(function(ee){return ee[0]}),fe=se.map(function(ee){var q=e(ee[1]);return v.rgb("rgb("+q[0]+","+q[1]+","+q[2]+")")}),V=function(ee){return function(q){return q[ee]}},Y="rgb".split("").map(function(ee){return v.scale.linear().clamp(!0).domain(le).range(fe.map(V(ee)))});return function(ee){return Y.map(function(q){return q(ee)})}}function L(se){return se.dimensions.some(function(le){return le.brush.filterSpecified})}function z(se,le,fe){var V=m(le),Y=V.trace,ee=p.convertTypedArray(V.lineColor),q=Y.line,oe={color:e(Y.unselected.line.color),opacity:Y.unselected.line.opacity},ae=i.extractOpts(q),j=ae.reversescale?i.flipScale(V.cscale):V.cscale,Q=Y.domain,re=Y.dimensions,ce=se.width,be=Y.labelangle,Ae=Y.labelside,De=Y.labelfont,ze=Y.tickfont,Ze=Y.rangefont,at=x.extendDeepNoArrays({},q,{color:ee.map(v.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(ce*(Q.x[1]-Q.x[0])),rt=Math.floor(se.height*(Q.y[1]-Q.y[0])),st=se.margin||{l:80,r:80,t:100,b:80},Me=nt,ye=rt;return{key:fe,colCount:re.filter(p.isVisible).length,dimensions:re,tickDistance:T.tickDistance,unitToColor:R(j),lines:at,deselectedLines:oe,labelAngle:be,labelSide:Ae,labelFont:De,tickFont:ze,rangeFont:Ze,layoutWidth:ce,layoutHeight:se.height,domain:Q,translateX:Q.x[0]*ce,translateY:se.height-Q.y[1]*se.height,pad:st,canvasWidth:Me*T.canvasPixelRatio+2*at.canvasOverdrag,canvasHeight:ye*T.canvasPixelRatio,width:Me,height:ye,canvasPixelRatio:T.canvasPixelRatio}}function F(se,le,fe){var V=fe.width,Y=fe.height,ee=fe.dimensions,q=fe.canvasPixelRatio,oe=function(ce){return V*ce/Math.max(1,fe.colCount-1)},ae=T.verticalPadding/Y,j=u(Y,T.verticalPadding),Q={key:fe.key,xScale:oe,model:fe,inBrushDrag:!1},re={};return Q.dimensions=ee.filter(p.isVisible).map(function(ce,be){var Ae=y(ce,ae),De=re[ce.label];re[ce.label]=(De||0)+1;var ze=ce.label+(De?"__"+De:""),Ze=ce.constraintrange,at=Ze&&Ze.length;at&&!S(Ze[0])&&(Ze=[Ze]);var nt=at?Ze.map(function(Pt){return Pt.map(Ae)}):[[-1/0,1/0]],rt=function(){var Pt=Q;Pt.focusLayer&&Pt.focusLayer.render(Pt.panels,!0);var It=L(Pt);!se.contextShown()&&It?(Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!0),se.contextShown(!0)):se.contextShown()&&!It&&(Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!0,!0),se.contextShown(!1))},st=ce.values;st.length>ce._length&&(st=st.slice(0,ce._length));var Me=ce.tickvals,ye;function he(Pt,It){return{val:Pt,text:ye[It]}}function Oe(Pt,It){return Pt.val-It.val}if(S(Me)&&Me.length){x.isTypedArray(Me)&&(Me=Array.from(Me)),ye=ce.ticktext,!S(ye)||!ye.length?ye=Me.map(E(ce.tickformat)):ye.length>Me.length?ye=ye.slice(0,Me.length):Me.length>ye.length&&(Me=Me.slice(0,ye.length));for(var tt=1;tt<Me.length;tt++)if(Me[tt]<Me[tt-1]){for(var ot=Me.map(he).sort(Oe),Qe=0;Qe<Me.length;Qe++)Me[Qe]=ot[Qe].val,ye[Qe]=ot[Qe].text;break}}else Me=void 0;return st=p.convertTypedArray(st),{key:ze,label:ce.label,tickFormat:ce.tickformat,tickvals:Me,ticktext:ye,ordinal:p.isOrdinal(ce),multiselect:ce.multiselect,xIndex:be,crossfilterDimensionIndex:be,visibleIndex:ce._index,height:Y,values:st,paddedUnitValues:st.map(Ae),unitTickvals:Me&&Me.map(Ae),xScale:oe,x:oe(be),canvasX:oe(be)*q,unitToPaddedPx:j,domainScale:d(Y,T.verticalPadding,ce,Me,ye),ordinalScale:f(ce),parent:Q,model:fe,brush:l.makeBrush(se,at,nt,function(){se.linePickActive(!1)},rt,function(Pt){if(Q.focusLayer.render(Q.panels,!0),Q.pickLayer&&Q.pickLayer.render(Q.panels,!0),se.linePickActive(!0),le&&le.filterChanged){var It=Ae.invert,qt=Pt.map(function(Wt){return Wt.map(It).sort(x.sorterAsc)}).sort(function(Wt,kr){return Wt[0]-kr[0]});le.filterChanged(Q.key,ce._index,qt)}})}}),Q}function N(se){se.classed(T.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function O(){var se=!0,le=!1;return{linePickActive:function(fe){return arguments.length?se=!!fe:se},contextShown:function(fe){return arguments.length?le=!!fe:le}}}function P(se,le){var fe=le==="top"?1:-1,V=se*Math.PI/180,Y=Math.sin(V),ee=Math.cos(V);return{dir:fe,dx:Y,dy:ee,degrees:se}}function U(se,le,fe){for(var V=le.panels||(le.panels=[]),Y=se.data(),ee=0;ee<Y.length-1;ee++){var q=V[ee]||(V[ee]={}),oe=Y[ee],ae=Y[ee+1];q.dim0=oe,q.dim1=ae,q.canvasX=oe.canvasX,q.panelSizeX=ae.canvasX-oe.canvasX,q.panelSizeY=le.model.canvasHeight,q.y=0,q.canvasY=0,q.plotGlPixelRatio=fe}}function B(se){for(var le=0;le<se.length;le++)for(var fe=0;fe<se[le].length;fe++)for(var V=se[le][fe].trace,Y=V.dimensions,ee=0;ee<Y.length;ee++){var q=Y[ee].values,oe=Y[ee]._ax;oe&&(oe.range?oe.range=g(oe.range[0],oe.range[1]):oe.range=A(q,V._length),oe.dtick||(oe.dtick=.01*(Math.abs(oe.range[1]-oe.range[0])||1)),oe.tickformat=Y[ee].tickformat,t.calcTicks(oe),oe.cleanRange())}}function X(se,le){return t.tickText(se._ax,le,!1).text}function $(se,le){if(se.ordinal)return"";var fe=se.domainScale.domain(),V=fe[le?fe.length-1:0];return X(se.model.dimensions[se.visibleIndex],V)}G.exports=function(le,fe,V,Y){var ee=le._context.staticPlot,q=le._fullLayout,oe=q._toppaper,ae=q._glcontainer,j=le._context.plotGlPixelRatio,Q=le._fullLayout.paper_bgcolor;B(fe);var re=O(),ce=fe.filter(function(Qe){return m(Qe).trace.visible}).map(z.bind(0,V)).map(F.bind(0,re,Y));ae.each(function(Qe,Pt){return x.extendFlat(Qe,ce[Pt])});var be=ae.selectAll(".gl-canvas").each(function(Qe){Qe.viewModel=ce[0],Qe.viewModel.plotGlPixelRatio=j,Qe.viewModel.paperColor=Q,Qe.model=Qe.viewModel?Qe.viewModel.model:null}),Ae=null,De=be.filter(function(Qe){return Qe.pick});De.style("pointer-events",ee?"none":"auto").on("mousemove",function(Qe){if(re.linePickActive()&&Qe.lineLayer&&Y&&Y.hover){var Pt=v.event,It=this.width,qt=this.height,Wt=v.mouse(this),kr=Wt[0],mr=Wt[1];if(kr<0||mr<0||kr>=It||mr>=qt)return;var qr=Qe.lineLayer.readPixel(kr,qt-1-mr),Sr=qr[3]!==0,Rr=Sr?qr[2]+256*(qr[1]+256*qr[0]):null,wt={x:kr,y:mr,clientX:Pt.clientX,clientY:Pt.clientY,dataIndex:Qe.model.key,curveNumber:Rr};Rr!==Ae&&(Sr?Y.hover(wt):Y.unhover&&Y.unhover(wt),Ae=Rr)}}),be.style("opacity",function(Qe){return Qe.pick?0:1}),oe.style("background","rgba(255, 255, 255, 0)");var ze=oe.selectAll("."+T.cn.parcoords).data(ce,h);ze.exit().remove(),ze.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),ze.attr("transform",function(Qe){return o(Qe.model.translateX,Qe.model.translateY)});var Ze=ze.selectAll("."+T.cn.parcoordsControlView).data(c,h);Ze.enter().append("g").classed(T.cn.parcoordsControlView,!0),Ze.attr("transform",function(Qe){return o(Qe.model.pad.l,Qe.model.pad.t)});var at=Ze.selectAll("."+T.cn.yAxis).data(function(Qe){return Qe.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),Ze.each(function(Qe){U(at,Qe,j)}),be.each(function(Qe){if(Qe.viewModel){!Qe.lineLayer||Y?Qe.lineLayer=_(this,Qe):Qe.lineLayer.update(Qe),(Qe.key||Qe.key===0)&&(Qe.viewModel[Qe.key]=Qe.lineLayer);var Pt=!Qe.context||Y;Qe.lineLayer.render(Qe.viewModel.panels,Pt)}}),at.attr("transform",function(Qe){return o(Qe.xScale(Qe.xIndex),0)}),at.call(v.behavior.drag().origin(function(Qe){return Qe}).on("drag",function(Qe){var Pt=Qe.parent;re.linePickActive(!1),Qe.x=Math.max(-T.overdrag,Math.min(Qe.model.width+T.overdrag,v.event.x)),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,at.sort(function(It,qt){return It.x-qt.x}).each(function(It,qt){It.xIndex=qt,It.x=Qe===It?It.x:It.xScale(It.xIndex),It.canvasX=It.x*It.model.canvasPixelRatio}),U(at,Pt,j),at.filter(function(It){return Math.abs(Qe.xIndex-It.xIndex)!==0}).attr("transform",function(It){return o(It.xScale(It.xIndex),0)}),v.select(this).attr("transform",o(Qe.x,0)),at.each(function(It,qt,Wt){Wt===Qe.parent.key&&(Pt.dimensions[qt]=It)}),Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!1,!L(Pt)),Pt.focusLayer.render&&Pt.focusLayer.render(Pt.panels)}).on("dragend",function(Qe){var Pt=Qe.parent;Qe.x=Qe.xScale(Qe.xIndex),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,U(at,Pt,j),v.select(this).attr("transform",function(It){return o(It.x,0)}),Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!1,!L(Pt)),Pt.focusLayer&&Pt.focusLayer.render(Pt.panels),Pt.pickLayer&&Pt.pickLayer.render(Pt.panels,!0),re.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Pt.key,Pt.dimensions.map(function(It){return It.crossfilterDimensionIndex}))})),at.exit().remove();var nt=at.selectAll("."+T.cn.axisOverlays).data(c,h);nt.enter().append("g").classed(T.cn.axisOverlays,!0),nt.selectAll("."+T.cn.axis).remove();var rt=nt.selectAll("."+T.cn.axis).data(c,h);rt.enter().append("g").classed(T.cn.axis,!0),rt.each(function(Qe){var Pt=Qe.model.height/Qe.model.tickDistance,It=Qe.domainScale,qt=It.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Pt,Qe.tickFormat).tickValues(Qe.ordinal?qt:null).tickFormat(function(Wt){return p.isOrdinal(Qe)?Wt:X(Qe.model.dimensions[Qe.visibleIndex],Wt)}).scale(It)),n.font(rt.selectAll("text"),Qe.model.tickFont)}),rt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),rt.selectAll("text").style("cursor","default");var st=nt.selectAll("."+T.cn.axisHeading).data(c,h);st.enter().append("g").classed(T.cn.axisHeading,!0);var Me=st.selectAll("."+T.cn.axisTitle).data(c,h);Me.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",ee?"none":"auto"),Me.text(function(Qe){return Qe.label}).each(function(Qe){var Pt=v.select(this);n.font(Pt,Qe.model.labelFont),a.convertToTspans(Pt,le)}).attr("transform",function(Qe){var Pt=P(Qe.model.labelAngle,Qe.model.labelSide),It=T.axisTitleOffset;return(Pt.dir>0?"":o(0,2*It+Qe.model.height))+r(Pt.degrees)+o(-It*Pt.dx,-It*Pt.dy)}).attr("text-anchor",function(Qe){var Pt=P(Qe.model.labelAngle,Qe.model.labelSide),It=Math.abs(Pt.dx),qt=Math.abs(Pt.dy);return 2*It>qt?Pt.dir*Pt.dx<0?"start":"end":"middle"});var ye=nt.selectAll("."+T.cn.axisExtent).data(c,h);ye.enter().append("g").classed(T.cn.axisExtent,!0);var he=ye.selectAll("."+T.cn.axisExtentTop).data(c,h);he.enter().append("g").classed(T.cn.axisExtentTop,!0),he.attr("transform",o(0,-T.axisExtentOffset));var Oe=he.selectAll("."+T.cn.axisExtentTopText).data(c,h);Oe.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(N),Oe.text(function(Qe){return $(Qe,!0)}).each(function(Qe){n.font(v.select(this),Qe.model.rangeFont)});var tt=ye.selectAll("."+T.cn.axisExtentBottom).data(c,h);tt.enter().append("g").classed(T.cn.axisExtentBottom,!0),tt.attr("transform",function(Qe){return o(0,Qe.model.height+T.axisExtentOffset)});var ot=tt.selectAll("."+T.cn.axisExtentBottomText).data(c,h);ot.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(N),ot.text(function(Qe){return $(Qe,!1)}).each(function(Qe){n.font(v.select(this),Qe.model.rangeFont)}),l.ensureAxisBrush(nt,Q,le)}}}),w6=Xe({"src/traces/parcoords/plot.js"(r,G){"use strict";var v=tV(),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=G.exports=function(a,n){var i=a._fullLayout,s=x(a,[],E);if(s){var h={},c={},m={},p={},T=i._size;n.forEach(function(M,g){var b=M[0].trace;m[g]=b.index;var d=p[g]=b.index;h[g]=a.data[d].dimensions,c[g]=a.data[d].dimensions.slice()});var l=function(M,g,b){var d=c[M][g],u=b.map(function(F){return F.slice()}),y="dimensions["+g+"].constraintrange",f=i._tracePreGUI[a._fullData[m[M]]._fullInput.uid];if(f[y]===void 0){var R=d.constraintrange;f[y]=R||null}var L=a._fullData[m[M]].dimensions[g];u.length?(u.length===1&&(u=u[0]),d.constraintrange=u,L.constraintrange=u.slice(),u=[u]):(delete d.constraintrange,delete L.constraintrange,u=null);var z={};z[y]=u,a.emit("plotly_restyle",[z,[p[M]]])},_=function(M){a.emit("plotly_hover",M)},w=function(M){a.emit("plotly_unhover",M)},A=function(M,g){var b=t(g,c[M].filter(S));h[M].sort(b),c[M].filter(function(d){return!S(d)}).sort(function(d){return c[M].indexOf(d)}).forEach(function(d){h[M].splice(h[M].indexOf(d),1),h[M].splice(c[M].indexOf(d),0,d)}),a.emit("plotly_restyle",[{dimensions:[h[M]]},[p[M]]])};v(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}}),rV=Xe({"src/traces/parcoords/base_plot.js"(Z){"use strict";var G=Hn(),v=Hh().getModuleCalcData,x=w6(),S=vd();Z.name="parcoords",Z.plot=function(E){var e=v(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=G.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(){G.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),aV=Xe({"src/traces/parcoords/base_index.js"(Z,G){"use strict";G.exports={attributes:m6(),supplyDefaults:Xq(),calc:Zq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:rV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),iV=Xe({"src/traces/parcoords/index.js"(Z,G){"use strict";var v=aV();v.plot=w6(),G.exports=v}}),nV=Xe({"lib/parcoords.js"(Z,G){"use strict";G.exports=iV()}}),T6=Xe({"src/traces/parcats/attributes.js"(Z,G){"use strict";var v=Qo().extendFlat,x=ru(),S=tc(),E=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=wc().attributes,o=v({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"})});G.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},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}}}),oV=Xe({"src/traces/parcats/defaults.js"(Z,G){"use strict";var v=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=T6(),r=bT(),o=bp().isTypedArraySpec;function a(i,s,h,c,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var p=m("line.color",c.colorway[0]);if(x(i,"line")&&v.isArrayOrTypedArray(p)){if(p.length)return m("line.colorscale"),S(i,s,c,m,{prefix:"line.",cLetter:"c"}),p.length;s.line.color=h}return 1/0}function n(i,s){function h(w,A){return v.coerce(i,s,t.dimensions,w,A)}var c=h("values"),m=h("visible");if(c&&c.length||(m=s.visible=!1),m){h("label"),h("displayindex",s._index);var p=i.categoryarray,T=v.isArrayOrTypedArray(p)&&p.length>0||o(p),l;T&&(l="array");var _=h("categoryorder",l);_==="array"?(h("categoryarray"),h("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&_==="array"&&(s.categoryorder="trace")}}G.exports=function(s,h,c,m){function p(w,A){return v.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:n}),l=a(s,h,c,m,p);E(h,m,p),(!Array.isArray(T)||!T.length)&&(h.visible=!1),r(h,T,"values",l),p("hoveron"),p("hovertemplate"),p("hovertemplatefallback"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var _=m.font;v.coerceFont(p,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),v.coerceFont(p,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),sV=Xe({"src/traces/parcats/calc.js"(Z,G){"use strict";var v=kv().wrap,x=wp().hasColorscale,S=Tp(),E=r5(),e=es(),t=sa(),r=rs();G.exports=function(_,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var M=A.map(function(V){var Y;if(V.categoryorder==="trace")Y=null;else if(V.categoryorder==="array")Y=V.categoryarray;else{Y=E(V.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),V.categoryorder==="category descending"&&(Y=Y.reverse())}return c(V.values,Y)}),g,b,d;t.isArrayOrTypedArray(w.counts)?g=w.counts:g=[w.counts],m(A),A.forEach(function(V,Y){p(V,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 f(V){var Y,ee;return t.isArrayOrTypedArray(u.color)?(Y=u.color[V%u.color.length],ee=Y):Y=u.color,{color:y(Y),rawColor:ee}}var R=A[0].values.length,L={},z=M.map(function(V){return V.inds});d=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],d+=b;var P=f(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(V,Y){return a(Y,V._index,V._displayindex,V.label,d)});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],se=B[N].categories;if(se[$]===void 0){var le=w.dimensions[X]._categoryarray[$],fe=w.dimensions[X]._ticktext[$];se[$]=n(N,$,le,fe)}i(se[$],F,b)}return v(o(B,L,d))};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 c(l,_){_==null?_=[]:_=_.map(function(y){return y});var w={},A={},M=[];_.forEach(function(y,f){w[y]=0,A[y]=f});for(var g=0;g<l.length;g++){var b=l[g],d;w[b]===void 0?(w[b]=1,d=_.push(b)-1,A[b]=d):(w[b]++,d=A[b]),M.push(d)}var u=_.map(function(y){return w[y]});return{uniqueValues:_,uniqueCounts:u,inds:M}}function m(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 p(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}}}),lV=Xe({"src/traces/parcats/parcats.js"(Z,G){"use strict";var v=Hn(),x=(pg(),zf(p0)).interpolateNumber,S=k2(),E=rf(),e=sa(),t=e.strTranslate,r=es(),o=Ch(),a=ou();function n(q,oe,ae,j){var Q=oe._context.staticPlot,re=q.map(le.bind(0,oe,ae)),ce=j.selectAll("g.parcatslayer").data([null]);ce.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var be=ce.selectAll("g.trace.parcats").data(re,i),Ae=be.enter().append("g").attr("class","trace parcats");be.attr("transform",function(he){return t(he.x,he.y)}),Ae.append("g").attr("class","paths");var De=be.select("g.paths"),ze=De.selectAll("path.path").data(function(he){return he.paths},i);ze.attr("fill",function(he){return he.model.color});var Ze=ze.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(he){return he.model.color}).attr("fill-opacity",0);_(Ze),ze.attr("d",function(he){return he.svgD}),Ze.empty()||ze.sort(h),ze.exit().remove(),ze.on("mouseover",c).on("mouseout",m).on("click",l),Ae.append("g").attr("class","dimensions");var at=be.select("g.dimensions"),nt=at.selectAll("g.dimension").data(function(he){return he.dimensions},i);nt.enter().append("g").attr("class","dimension"),nt.attr("transform",function(he){return t(he.x,0)}),nt.exit().remove();var rt=nt.selectAll("g.category").data(function(he){return he.categories},i),st=rt.enter().append("g").attr("class","category");rt.attr("transform",function(he){return t(0,he.y)}),st.append("rect").attr("class","catrect").attr("pointer-events","none"),rt.select("rect.catrect").attr("fill","none").attr("width",function(he){return he.width}).attr("height",function(he){return he.height}),M(st);var Me=rt.selectAll("rect.bandrect").data(function(he){return he.bands},i);Me.each(function(){e.raiseToTop(this)}),Me.attr("fill",function(he){return he.color});var ye=Me.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(he){return he.color}).attr("fill-opacity",0);Me.attr("fill",function(he){return he.color}).attr("width",function(he){return he.width}).attr("height",function(he){return he.height}).attr("y",function(he){return he.y}).attr("cursor",function(he){return he.parcatsViewModel.arrangement==="fixed"?"default":he.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(ye),Me.exit().remove(),st.append("text").attr("class","catlabel").attr("pointer-events","none"),rt.select("text.catlabel").attr("text-anchor",function(he){return s(he)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(he){return s(he)?he.width+5:-5}).attr("y",function(he){return he.height/2}).text(function(he){return he.model.categoryLabel}).each(function(he){r.font(v.select(this),he.parcatsViewModel.categorylabelfont),a.convertToTspans(v.select(this),oe)}),st.append("text").attr("class","dimlabel"),rt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(he){return he.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(he){return he.width/2}).attr("y",-5).text(function(he,Oe){return Oe===0?he.parcatsViewModel.model.dimensions[he.model.dimensionInd].dimensionLabel:null}).each(function(he){r.font(v.select(this),he.parcatsViewModel.labelfont)}),rt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),rt.exit().remove(),nt.call(v.behavior.drag().origin(function(he){return{x:he.x,y:0}}).on("dragstart",P).on("drag",U).on("dragend",B)),be.each(function(he){he.traceSelection=v.select(this),he.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),he.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),be.exit().remove()}G.exports=function(q,oe,ae,j){n(ae,q,j,oe)};function i(q){return q.key}function s(q){var oe=q.parcatsViewModel.dimensions.length,ae=q.parcatsViewModel.dimensions[oe-1].model.dimensionInd;return q.model.dimensionInd===ae}function h(q,oe){return q.model.rawColor>oe.model.rawColor?1:q.model.rawColor<oe.model.rawColor?-1:0}function c(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),w(v.select(this));var oe=p(q),ae=T(q);if(q.parcatsViewModel.graphDiv.emit("plotly_hover",{points:oe,event:v.event,constraints:ae}),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var j=v.mouse(this)[0],Q=q.parcatsViewModel.graphDiv,re=q.parcatsViewModel.trace,ce=Q._fullLayout,be=ce._paperdiv.node().getBoundingClientRect(),Ae=q.parcatsViewModel.graphDiv.getBoundingClientRect(),De,ze,Ze;for(Ze=0;Ze<q.leftXs.length-1;Ze++)if(q.leftXs[Ze]+q.dimWidths[Ze]-2<=j&&j<=q.leftXs[Ze+1]+2){var at=q.parcatsViewModel.dimensions[Ze],nt=q.parcatsViewModel.dimensions[Ze+1];De=(at.x+at.width+nt.x)/2,ze=(q.topYs[Ze]+q.topYs[Ze+1]+q.height)/2;break}var rt=q.parcatsViewModel.x+De,st=q.parcatsViewModel.y+ze,Me=o.mostReadable(q.model.color,["black","white"]),ye=q.model.count,he=ye/q.parcatsViewModel.model.count,Oe={countLabel:ye,probabilityLabel:he.toFixed(3)},tt=[];q.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&tt.push(["Count:",Oe.countLabel].join(" ")),q.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&tt.push(["P:",Oe.probabilityLabel].join(" "));var ot=tt.join("<br>"),Qe=v.mouse(Q)[0];E.loneHover({trace:re,x:rt-be.left+Ae.left,y:st-be.top+Ae.top,text:ot,color:q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Me,idealAlign:Qe<rt?"right":"left",hovertemplate:(re.line||{}).hovertemplate,hovertemplateLabels:Oe,eventData:[{data:re._input,fullData:re,count:ye,probability:he}]},{container:ce._hoverlayer.node(),outerContainer:ce._paper.node(),gd:Q})}}}function m(q){if(!q.parcatsViewModel.dragDimension&&(_(v.select(this)),E.loneUnhover(q.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),q.parcatsViewModel.pathSelection.sort(h),q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var oe=p(q),ae=T(q);q.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:oe,event:v.event,constraints:ae})}}function p(q){for(var oe=[],ae=X(q.parcatsViewModel),j=0;j<q.model.valueInds.length;j++){var Q=q.model.valueInds[j];oe.push({curveNumber:ae,pointNumber:Q})}return oe}function T(q){for(var oe={},ae=q.parcatsViewModel.model.dimensions,j=0;j<ae.length;j++){var Q=ae[j],re=Q.categories[q.model.categoryInds[j]];oe[Q.containerInd]=re.categoryValue}return q.model.rawColor!==void 0&&(oe.color=q.model.rawColor),oe}function l(q){if(q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var oe=p(q),ae=T(q);q.parcatsViewModel.graphDiv.emit("plotly_click",{points:oe,event:v.event,constraints:ae})}}function _(q){q.attr("fill",function(oe){return oe.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(oe){return o.mostReadable(oe.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 d(q){var oe=q.parcatsViewModel.pathSelection,ae=q.categoryViewModel.model.dimensionInd,j=q.categoryViewModel.model.categoryInd;return oe.filter(function(Q){return Q.model.categoryInds[ae]===j&&Q.model.color===q.color})}function u(q){var oe=v.select(q.parentNode).selectAll("rect.bandrect");oe.each(function(ae){var j=d(ae);w(j),j.each(function(){e.raiseToTop(this)})}),A(v.select(q.parentNode))}function y(q){var oe=v.select(q).datum(),ae=d(oe);w(ae),ae.each(function(){e.raiseToTop(this)}),v.select(q.parentNode).selectAll("rect.bandrect").filter(function(j){return j.color===oe.color}).each(function(){e.raiseToTop(this),g(v.select(this))})}function f(q,oe,ae){var j=v.select(q).datum(),Q=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,ce=v.select(q.parentNode).selectAll("rect.bandrect"),be=[];ce.each(function(De){var ze=d(De);ze.each(function(Ze){Array.prototype.push.apply(be,p(Ze))})});var Ae={};Ae[Q.dimensionInd]=Q.categoryValue,re.emit(oe,{points:be,event:ae,constraints:Ae})}function R(q,oe,ae){var j=v.select(q).datum(),Q=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,ce=d(j),be=[];ce.each(function(De){Array.prototype.push.apply(be,p(De))});var Ae={};Ae[Q.dimensionInd]=Q.categoryValue,j.rawColor!==void 0&&(Ae.color=j.rawColor),re.emit(oe,{points:be,event:ae,constraints:Ae})}function L(q,oe,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=v.select(ae.parentNode).select("rect.catrect"),ce=re.node().getBoundingClientRect(),be=re.datum(),Ae=be.parcatsViewModel,De=Ae.model.dimensions[be.model.dimensionInd],ze=Ae.trace,Ze=ce.top+ce.height/2,at,nt;Ae.dimensions.length>1&&De.displayInd===Ae.dimensions.length-1?(at=ce.left,nt="left"):(at=ce.left+ce.width,nt="right");var rt=be.model.count,st=be.model.categoryLabel,Me=rt/be.parcatsViewModel.model.count,ye={countLabel:rt,categoryLabel:st,probabilityLabel:Me.toFixed(3)},he=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&he.push(["Count:",ye.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&he.push(["P("+ye.categoryLabel+"):",ye.probabilityLabel].join(" "));var Oe=he.join("<br>");return{trace:ze,x:j*(at-oe.left),y:Q*(Ze-oe.top),text:Oe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:ze.hovertemplate,hovertemplateLabels:ye,eventData:[{data:ze._input,fullData:ze,count:rt,category:st,probability:Me}]}}function z(q,oe,ae){var j=[];return v.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;j.push(L(q,oe,Q))}),j}function F(q,oe,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=ae.getBoundingClientRect(),ce=v.select(ae).datum(),be=ce.categoryViewModel,Ae=be.parcatsViewModel,De=Ae.model.dimensions[be.model.dimensionInd],ze=Ae.trace,Ze=re.y+re.height/2,at,nt;Ae.dimensions.length>1&&De.displayInd===Ae.dimensions.length-1?(at=re.left,nt="left"):(at=re.left+re.width,nt="right");var rt=be.model.categoryLabel,st=ce.parcatsViewModel.model.count,Me=0;ce.categoryViewModel.bands.forEach(function(Wt){Wt.color===ce.color&&(Me+=Wt.count)});var ye=be.model.count,he=0;Ae.pathSelection.each(function(Wt){Wt.model.color===ce.color&&(he+=Wt.model.count)});var Oe=Me/st,tt=Me/he,ot=Me/ye,Qe={countLabel:Me,categoryLabel:rt,probabilityLabel:Oe.toFixed(3)},Pt=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Pt.push(["Count:",Qe.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Pt.push("P(color \u2229 "+rt+"): "+Qe.probabilityLabel),Pt.push("P("+rt+" | color): "+tt.toFixed(3)),Pt.push("P(color | "+rt+"): "+ot.toFixed(3)));var It=Pt.join("<br>"),qt=o.mostReadable(ce.color,["black","white"]);return{trace:ze,x:j*(at-oe.left),y:Q*(Ze-oe.top),text:It,color:ce.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:qt,fontSize:10,idealAlign:nt,hovertemplate:ze.hovertemplate,hovertemplateLabels:Qe,eventData:[{data:ze._input,fullData:ze,category:rt,count:st,probability:Oe,categorycount:ye,colorcount:he,bandcolorcount:Me}]}}function N(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var oe=v.mouse(this)[1];if(oe<-1)return;var ae=q.parcatsViewModel.graphDiv,j=ae._fullLayout,Q=j._paperdiv.node().getBoundingClientRect(),re=q.parcatsViewModel.hoveron,ce=this;if(re==="color"?(y(ce),R(ce,"plotly_hover",v.event)):(u(ce),f(ce,"plotly_hover",v.event)),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var be;re==="category"?be=L(ae,Q,ce):re==="color"?be=F(ae,Q,ce):re==="dimension"&&(be=z(ae,Q,ce)),be&&E.loneHover(be,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(q){var oe=q.parcatsViewModel;if(!oe.dragDimension&&(_(oe.pathSelection),M(oe.dimensionSelection.selectAll("g.category")),b(oe.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),E.loneUnhover(oe.graphDiv._fullLayout._hoverlayer.node()),oe.pathSelection.sort(h),oe.hoverinfoItems.indexOf("skip")===-1)){var ae=q.parcatsViewModel.hoveron,j=this;ae==="color"?R(j,"plotly_unhover",v.event):f(j,"plotly_unhover",v.event)}}function P(q){q.parcatsViewModel.arrangement!=="fixed"&&(q.dragDimensionDisplayInd=q.model.displayInd,q.initialDragDimensionDisplayInds=q.parcatsViewModel.model.dimensions.map(function(oe){return oe.displayInd}),q.dragHasMoved=!1,q.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(oe){var ae=v.mouse(this)[0],j=v.mouse(this)[1];-2<=ae&&ae<=oe.width+2&&-2<=j&&j<=oe.height+2&&(q.dragCategoryDisplayInd=oe.model.displayInd,q.initialDragCategoryDisplayInds=q.model.categories.map(function(Q){return Q.displayInd}),oe.model.dragY=oe.y,e.raiseToTop(this.parentNode),v.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 oe=q.dragDimensionDisplayInd,ae=oe-1,j=oe+1,Q=q.parcatsViewModel.dimensions[oe];if(q.dragCategoryDisplayInd!==null){var re=Q.categories[q.dragCategoryDisplayInd];re.model.dragY+=v.event.dy;var ce=re.model.dragY,be=re.model.displayInd,Ae=Q.categories,De=Ae[be-1],ze=Ae[be+1];De!==void 0&&ce<De.y+De.height/2&&(re.model.displayInd=De.model.displayInd,De.model.displayInd=be),ze!==void 0&&ce+re.height>ze.y+ze.height/2&&(re.model.displayInd=ze.model.displayInd,ze.model.displayInd=be),q.dragCategoryDisplayInd=re.model.displayInd}if(q.dragCategoryDisplayInd===null||q.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=v.event.x;var Ze=q.parcatsViewModel.dimensions[ae],at=q.parcatsViewModel.dimensions[j];Ze!==void 0&&Q.model.dragX<Ze.x+Ze.width&&(Q.model.displayInd=Ze.model.displayInd,Ze.model.displayInd=oe),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),V(q.parcatsViewModel),se(q.parcatsViewModel),$(q.parcatsViewModel)}}function B(q){if(q.parcatsViewModel.arrangement!=="fixed"&&q.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var oe={},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 rt=q.parcatsViewModel.model.dimensions[nt].containerInd;oe["dimensions["+rt+"].displayindex"]=at});var re=!1;if(q.dragCategoryDisplayInd!==null){var ce=q.model.categories.map(function(at){return at.displayInd});if(re=q.initialDragCategoryDisplayInds.some(function(at,nt){return at!==ce[nt]}),re){var be=q.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Ae=be.map(function(at){return at.categoryValue}),De=be.map(function(at){return at.categoryLabel});oe["dimensions["+q.model.containerInd+"].categoryarray"]=[Ae],oe["dimensions["+q.model.containerInd+"].ticktext"]=[De],oe["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",v.event.sourceEvent):f(q.potentialClickBand,"plotly_click",v.event.sourceEvent)),q.model.dragX=null,q.dragCategoryDisplayInd!==null){var ze=q.parcatsViewModel.dimensions[q.dragDimensionDisplayInd].categories[q.dragCategoryDisplayInd];ze.model.dragY=null,q.dragCategoryDisplayInd=null}q.dragDimensionDisplayInd=null,q.parcatsViewModel.dragDimension=null,q.dragHasMoved=null,q.potentialClickBand=null,Y(q.parcatsViewModel),V(q.parcatsViewModel);var Ze=v.transition().duration(300).ease("cubic-in-out");Ze.each(function(){se(q.parcatsViewModel,!0),$(q.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&S.restyle(q.parcatsViewModel.graphDiv,oe,[ae])})}}function X(q){for(var oe,ae=q.graphDiv._fullData,j=0;j<ae.length;j++)if(q.key===ae[j].uid){oe=j;break}return oe}function $(q,oe){oe===void 0&&(oe=!1);function ae(j){return oe?j.transition():j}q.pathSelection.data(function(j){return j.paths},i),ae(q.pathSelection).attr("d",function(j){return j.svgD})}function se(q,oe){oe===void 0&&(oe=!1);function ae(Ae){return oe?Ae.transition():Ae}q.dimensionSelection.data(function(Ae){return Ae.dimensions},i);var j=q.dimensionSelection.selectAll("g.category").data(function(Ae){return Ae.categories},i);ae(q.dimensionSelection).attr("transform",function(Ae){return t(Ae.x,0)}),ae(j).attr("transform",function(Ae){return t(0,Ae.y)});var Q=j.select(".dimlabel");Q.text(function(Ae,De){return De===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null});var re=j.select(".catlabel");re.attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).each(function(Ae){var De,ze;s(Ae)?(De=Ae.width+5,ze="start"):(De=-5,ze="end"),v.select(this).selectAll("tspan").attr("x",De).attr("text-anchor",ze)});var ce=j.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},i),be=ce.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ce.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}),b(be),ce.each(function(){e.raiseToTop(this)}),ce.exit().remove()}function le(q,oe,ae){var j=ae[0],Q=oe.margin||{l:80,r:80,t:100,b:80},re=j.trace,ce=re.domain,be=oe.width,Ae=oe.height,De=Math.floor(be*(ce.x[1]-ce.x[0])),ze=Math.floor(Ae*(ce.y[1]-ce.y[0])),Ze=ce.x[0]*be+Q.l,at=oe.height-ce.y[1]*oe.height+Q.t,nt=re.line.shape,rt;re.hoverinfo==="all"?rt=["count","probability"]:rt=(re.hoverinfo||"").split("+");var st={trace:re,key:re.uid,model:j,x:Ze,y:at,width:De,height:ze,hoveron:re.hoveron,hoverinfoItems:rt,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(st),V(st)),st}function fe(q,oe,ae,j,Q){var re=[],ce=[],be,Ae;for(Ae=0;Ae<ae.length-1;Ae++)be=x(ae[Ae]+q[Ae],q[Ae+1]),re.push(be(Q)),ce.push(be(1-Q));var De="M "+q[0]+","+oe[0];for(De+="l"+ae[0]+",0 ",Ae=1;Ae<ae.length;Ae++)De+="C"+re[Ae-1]+","+oe[Ae-1]+" "+ce[Ae-1]+","+oe[Ae]+" "+q[Ae]+","+oe[Ae],De+="l"+ae[Ae]+",0 ";for(De+="l0,"+j+" ",De+="l -"+ae[ae.length-1]+",0 ",Ae=ae.length-2;Ae>=0;Ae--)De+="C"+ce[Ae]+","+(oe[Ae+1]+j)+" "+re[Ae]+","+(oe[Ae]+j)+" "+(q[Ae]+ae[Ae])+","+(oe[Ae]+j),De+="l-"+ae[Ae]+",0 ";return De+="Z",De}function V(q){var oe=q.dimensions,ae=q.model,j=oe.map(function(qr){return qr.categories.map(function(Sr){return Sr.y})}),Q=q.model.dimensions.map(function(qr){return qr.categories.map(function(Sr){return Sr.displayInd})}),re=q.model.dimensions.map(function(qr){return qr.displayInd}),ce=q.dimensions.map(function(qr){return qr.model.dimensionInd}),be=oe.map(function(qr){return qr.x}),Ae=oe.map(function(qr){return qr.width}),De=[];for(var ze in ae.paths)ae.paths.hasOwnProperty(ze)&&De.push(ae.paths[ze]);function Ze(qr){var Sr=qr.categoryInds.map(function(wt,Ne){return Q[Ne][wt]}),Rr=ce.map(function(wt){return Sr[wt]});return Rr}De.sort(function(qr,Sr){var Rr=Ze(qr),wt=Ze(Sr);return q.sortpaths==="backward"&&(Rr.reverse(),wt.reverse()),Rr.push(qr.valueInds[0]),wt.push(Sr.valueInds[0]),q.bundlecolors&&(Rr.unshift(qr.rawColor),wt.unshift(Sr.rawColor)),Rr<wt?-1:Rr>wt?1:0});for(var at=new Array(De.length),nt=oe[0].model.count,rt=oe[0].categories.map(function(qr){return qr.height}).reduce(function(qr,Sr){return qr+Sr}),st=0;st<De.length;st++){var Me=De[st],ye;nt>0?ye=rt*(Me.count/nt):ye=0;for(var he=new Array(j.length),Oe=0;Oe<Me.categoryInds.length;Oe++){var tt=Me.categoryInds[Oe],ot=Q[Oe][tt],Qe=re[Oe];he[Qe]=j[Qe][ot],j[Qe][ot]+=ye;var Pt=q.dimensions[Qe].categories[ot],It=Pt.bands.length,qt=Pt.bands[It-1];if(qt===void 0||Me.rawColor!==qt.rawColor){var Wt=qt===void 0?0:qt.y+qt.height;Pt.bands.push({key:Wt,color:Me.color,rawColor:Me.rawColor,height:ye,width:Pt.width,count:Me.count,y:Wt,categoryViewModel:Pt,parcatsViewModel:q})}else{var kr=Pt.bands[It-1];kr.height+=ye,kr.count+=Me.count}}var mr;q.pathShape==="hspline"?mr=fe(be,he,Ae,ye,.5):mr=fe(be,he,Ae,ye,0),at[st]={key:Me.valueInds[0],model:Me,height:ye,leftXs:be,topYs:he,dimWidths:Ae,svgD:mr,parcatsViewModel:q}}q.paths=at}function Y(q){var oe=q.model.dimensions.map(function(ce){return{displayInd:ce.displayInd,dimensionInd:ce.dimensionInd}});oe.sort(function(ce,be){return ce.displayInd-be.displayInd});var ae=[];for(var j in oe){var Q=oe[j].dimensionInd,re=q.model.dimensions[Q];ae.push(ee(q,re))}q.dimensions=ae}function ee(q,oe){var ae=40,j=16,Q=q.model.dimensions.length,re=oe.displayInd,ce,be,Ae;Q>1?ce=(q.width-2*ae-j)/(Q-1):ce=0,be=ae,Ae=be+ce*re;var De=[],ze=q.model.maxCats,Ze=oe.categories.length,at=8,nt=oe.count,rt=q.height-at*(ze-1),st,Me,ye,he,Oe,tt=(ze-Ze)*at/2,ot=oe.categories.map(function(Qe){return{displayInd:Qe.displayInd,categoryInd:Qe.categoryInd}});for(ot.sort(function(Qe,Pt){return Qe.displayInd-Pt.displayInd}),Oe=0;Oe<Ze;Oe++)he=ot[Oe].categoryInd,Me=oe.categories[he],nt>0?st=Me.count/nt*rt:st=0,ye={key:Me.valueInds[0],model:Me,width:j,height:st,y:Me.dragY!==null?Me.dragY:tt,bands:[],parcatsViewModel:q},tt=tt+st+at,De.push(ye);return{key:oe.dimensionInd,x:oe.dragX!==null?oe.dragX:Ae,y:0,width:j,model:oe,categories:De,parcatsViewModel:q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=Xe({"src/traces/parcats/plot.js"(Z,G){"use strict";var v=lV();G.exports=function(S,E,e,t){var r=S._fullLayout,o=r._paper,a=r._size;v(S,o,E,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),uV=Xe({"src/traces/parcats/base_plot.js"(Z){"use strict";var G=Hh().getModuleCalcData,v=A6(),x="parcats";Z.name=x,Z.plot=function(S,E,e,t){var r=G(S.calcdata,x);if(r.length){var o=r[0];v(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()}}}),cV=Xe({"src/traces/parcats/index.js"(Z,G){"use strict";G.exports={attributes:T6(),supplyDefaults:oV(),calc:sV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:uV(),categories:["noOpacity"],meta:{}}}}),fV=Xe({"lib/parcats.js"(Z,G){"use strict";G.exports=cV()}}),im=Xe({"src/plots/mapbox/constants.js"(Z,G){"use strict";var v=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=v(r);G.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=Xe({"src/plots/mapbox/layout_attributes.js"(Z,G){"use strict";var v=sa(),x=$n().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=G.exports=t({_arrayAttrRegexps:[v.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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),AT=Xe({"src/traces/scattermapbox/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,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,c=e.marker;G.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({},c.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:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.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:v(),hovertemplatefallback:S()},"calc","nested")}}),S6=Xe({"src/traces/scattermapbox/constants.js"(Z,G){"use strict";var v=["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"];G.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),hV=Xe({"src/traces/scattermapbox/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;G.exports=function(i,s,h,c){function m(y,f){return v.coerce(i,s,r,y,f)}function p(y,f){return v.coerce2(i,s,r,y,f)}var T=a(i,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),x.hasMarkers(s)){S(i,s,h,c,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,c,m,{noDash:!0}),m("connectgaps"));var _=p("cluster.maxzoom"),w=p("cluster.step"),A=p("cluster.color",s.marker&&s.marker.color||h),M=p("cluster.size"),g=p("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,d=m("cluster.enabled",b);if(d||x.hasText(s)){var u=c.font.family;e(i,s,c,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:c.font.weight,style:c.font.style,size:c.font.size,color:c.font.color}})}m("fill"),s.fill!=="none"&&t(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(n,i,s){var h=s("lon")||[],c=s("lat")||[],m=Math.min(h.length,c.length);return i._length=m,m}}}),M6=Xe({"src/traces/scattermapbox/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),E6=Xe({"src/plots/mapbox/convert_text_opts.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(E)?v.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}}}}),pV=Xe({"src/traces/scattermapbox/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().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;G.exports=function(g,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,y=d.fill!=="none",f=o.hasLines(d),R=o.hasMarkers(d),L=o.hasText(d),z=R&&d.marker.symbol==="circle",F=R&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=c("fill"),P=c("line"),U=c("circle"),B=c("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||f)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":d.fillcolor})),f&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var se=m(b);U.geojson=se.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(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":se.mcc,"circle-radius":se.mrc,"circle-opacity":se.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=p(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),L)){var le=(d.marker||{}).size,fe=n(d.textposition,le);x.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":fe.anchor,"text-offset":fe.offset,"text-font":A(d)}),x.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return X};function c(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(M){var g=M[0].trace,b=g.marker,d=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),f=x.isArrayOrTypedArray(b.opacity),R;function L(le){return g.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;f&&(O=function(le){var fe=v(le)?+x.constrain(le,0,1):0;return L(fe)});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)),d&&(X.selected=U.selected||0),P.push({type:"Feature",id:R+1,geometry:{type:"Point",coordinates:B},properties:X})}}var $;if(d)for($=t.makeSelectedPointStyleFns(g),R=0;R<P.length;R++){var se=P[R].properties;$.selectedOpacityFn&&(se.mo=L($.selectedOpacityFn(se))),$.selectedColorFn&&(se.mcc=$.selectedColorFn(se)),$.selectedSizeFn&&(se.mrc=$.selectedSizeFn(se))}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:f||$&&$.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function p(M,g){for(var b=g._fullLayout,d=M[0].trace,u=d.marker||{},y=u.symbol,f=u.angle,R=y!=="circle"?T(y):l,L=f!=="auto"?T(f,!0):l,z=o.hasText(d)?T(d.text):l,F=[],N=0;N<M.length;N++){var O=M[N];if(!_(O.lonlat)){var P=d.texttemplate,U;if(P){var B=Array.isArray(P)?P[N]||"":P,X=d._module.formatLabels(O,d,b),$={};i($,d,O.i),U=x.texttemplateString({data:[$,O,d._meta],fallback:d.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 v(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 d=1;d<M.length;d++)b.push(g[d-1],M[d])}else b=M;return b}function A(M){var g=M.textfont,b=g.family,d=g.style,u=g.weight,y=b.split(" "),f=y[y.length-1]==="Italic";f&&y.pop(),f=f||d==="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")),f&&(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}}}),dV=Xe({"src/traces/scattermapbox/plot.js"(Z,G){"use strict";var v=sa(),x=pV(),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&&v.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(),c=0;c<h.length;c++)if(h[c].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],c=!!(a.cluster&&a.cluster.enabled),m=!!this.clusterEnabled,p=this;function T(u){u||p.addSource("circle",s.circle,a.cluster);for(var y=E.cluster,f=0;f<y.length;f++){var R=y[f],L=s[R];p.addLayer(R,L,h)}}function l(u){for(var y=E.cluster,f=y.length-1;f>=0;f--){var R=y[f];i.removeLayer(p.layerIds[R])}u||i.removeSource(p.sourceIds.circle)}function _(u){for(var y=E.nonCluster,f=0;f<y.length;f++){var R=y[f],L=s[R];u||p.addSource(R,L),p.addLayer(R,L,h)}}function w(u){for(var y=E.nonCluster,f=y.length-1;f>=0;f--){var R=y[f];i.removeLayer(p.layerIds[R]),u||i.removeSource(p.sourceIds[R])}}function A(u){m?l(u):w(u)}function M(u){c?T(u):_(u)}function g(){for(var u=c?E.cluster:E.nonCluster,y=0;y<u.length;y++){var f=u[y],R=s[f];R&&(n.setOptions(p.layerIds[f],"setLayoutProperty",R.layout),R.layout.visibility==="visible"&&(f!=="cluster"&&p.setSourceData(f,R),n.setOptions(p.layerIds[f],"setPaintProperty",R.paint)))}}var b=this.isHidden,d=a.visible!==!0;d?b||A():b?d||M():m!==c?(A(),M()):(this.below!==h&&(A(!0),M(!0)),g()),this.clusterEnabled=c,this.isHidden=d,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])}},G.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),c=x(o.gd,a),m=h.below=o.belowLookup["trace-"+n.uid],p,T,l;if(i)for(h.addSource("circle",c.circle,n.cluster),p=0;p<E.cluster.length;p++)T=E.cluster[p],l=c[T],h.addLayer(T,l,m);else for(p=0;p<E.nonCluster.length;p++)T=E.nonCluster[p],l=c[T],h.addSource(T,l,n.cluster),h.addLayer(T,l,m);return a[0].trace._glTrace=h,h}}}),ST=Xe({"src/traces/scattermapbox/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=l1(),E=x.fillText,e=Hs().BADNUM,t=im().traceLayerPrefix;function r(a,n,i){var s=a.cd,h=s[0].trace,c=a.xa,m=a.ya,p=a.subplot,T=[],l=t+h.uid+"-circle",_=h.cluster&&h.cluster.enabled;if(_){var w=p.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=p.project([P,U]),X=B.x-c.c2p([g,U]),$=B.y-m.c2p([P,i]),se=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-se,1-3/se)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],f=c.c2p(y),R=m.c2p(y),L=d.mrc||1;a.x0=f-L,a.x1=f+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:p};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,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("+"),c=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,p=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return c||m&&p?l.push("("+_(T[1])+", "+_(T[0])+")"):m?l.push(i.lon+_(T[0])):p&&l.push(i.lat+_(T[1])),(c||h.indexOf("text")!==-1)&&E(n,a,l),l.join("<br>")}G.exports={hoverPoints:r,getExtraText:o}}}),vV=Xe({"src/traces/scattermapbox/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),mV=Xe({"src/traces/scattermapbox/select.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=Hs().BADNUM;G.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],c=h.lonlat;if(c[0]!==S){var m=[v.modHalf(c[0],360),c[1]],p=[o.c2p(m),a.c2p(m)];t.contains(p,null,s,e)?(n.push({pointNumber:s,lon:c[0],lat:c[1]}),h.selected=1):h.selected=0}}return n}}}),k6=Xe({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?G.exports=x():(v=v||self,v.mapboxgl=x())})(Z,function(){"use strict";var v,x,S;function E(e,t){if(!v)v=t;else if(!x)x=t;else{var r="var sharedChunk = {}; ("+v+")(sharedChunk); ("+x+")(sharedChunk);",o={};v(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,ne){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*(ne-C)-this.cy,this.ay=1-this.cy-this.by,this.p1x=k,this.p1y=ne,this.p2x=H,this.p2y=ne}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,ne,xe,Re,qe;for(xe=k,qe=0;qe<8;qe++){if(Re=this.sampleCurveX(xe)-k,Math.abs(Re)<C)return xe;var pt=this.sampleCurveDerivativeX(xe);if(Math.abs(pt)<1e-6)break;xe=xe-Re/pt}if(H=0,ne=1,xe=k,xe<H)return H;if(xe>ne)return ne;for(;H<ne;){if(Re=this.sampleCurveX(xe),Math.abs(Re-k)<C)return xe;k>Re?H=xe:ne=xe,xe=(ne-H)*.5+H}return xe},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),ne=C*this.x-H*this.y,xe=H*this.x+C*this.y;return this.x=ne,this.y=xe,this},_rotateAround:function(k,C){var H=Math.cos(k),ne=Math.sin(k),xe=C.x+H*(this.x-C.x)-ne*(this.y-C.y),Re=C.y+ne*(this.x-C.x)+H*(this.y-C.y);return this.x=xe,this.y=Re,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 ne=Object.keys(k);if(ne.length!==Object.keys(C).length)return!1;for(var xe in k)if(!h(k[xe],C[xe]))return!1;return!0}return k===C}var c=Math.pow(2,53)-1;function m(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 p(k,C,H,ne){var xe=new o(k,C,H,ne);return function(Re){return xe.solve(Re)}}var T=p(.25,.1,.25,1);function l(k,C,H){return Math.min(H,Math.max(C,k))}function _(k,C,H){var ne=H-C,xe=((k-C)%ne+ne)%ne+C;return xe===C?H:xe}function w(k,C,H){if(!k.length)return H(null,[]);var ne=k.length,xe=new Array(k.length),Re=null;k.forEach(function(qe,pt){C(qe,function(Dt,Gt){Dt&&(Re=Dt),xe[pt]=Gt,--ne===0&&H(Re,xe)})})}function A(k){var C=[];for(var H in k)C.push(k[H]);return C}function M(k,C){var H=[];for(var ne in k)ne in C||H.push(ne);return H}function g(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne];for(var qe in Re)k[qe]=Re[qe]}return k}function b(k,C){for(var H={},ne=0;ne<C.length;ne++){var xe=C[ne];xe in k&&(H[xe]=k[xe])}return H}var d=1;function u(){return d++}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 f(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 ne={};for(var xe in k)ne[xe]=C.call(H||this,k[xe],xe,k);return ne}function N(k,C,H){var ne={};for(var xe in k)C.call(H||this,k[xe],xe,k)&&(ne[xe]=k[xe]);return ne}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,ne=k.length,xe=ne-1,Re=void 0,qe=void 0;H<ne;xe=H++)Re=k[H],qe=k[xe],C+=(qe.x-Re.x)*(Re.y+qe.y);return C}function se(k){var C=k[0],H=k[1],ne=k[2];return H+=90,H*=Math.PI/180,ne*=Math.PI/180,{x:C*Math.cos(H)*Math.sin(ne),y:C*Math.sin(H)*Math.sin(ne),z:C*Math.cos(ne)}}function le(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function fe(k){var C=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,H={};if(k.replace(C,function(xe,Re,qe,pt){var Dt=qe||pt;return H[Re]=Dt?Dt.toLowerCase():!0,""}),H["max-age"]){var ne=parseInt(H["max-age"],10);isNaN(ne)?delete H["max-age"]:H["max-age"]=ne}return H}var V=null;function Y(k){if(V==null){var C=k.navigator?k.navigator.userAgent:null;V=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return V}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 oe(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,ce,be={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 ne=s.document.createElement("canvas"),xe=ne.getContext("2d");if(!xe)throw new Error("failed to create canvas 2d context");return ne.width=C.width,ne.height=C.height,xe.drawImage(C,0,0,C.width,C.height),xe.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?(ce==null&&(ce=s.matchMedia("(prefers-reduced-motion: reduce)")),ce.matches):!1}},Ae={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},De={supported:!1,testSupport:rt},ze,Ze=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){ze&&st(ze),ze=null,nt=!0},at.onerror=function(){Ze=!0,ze=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function rt(k){Ze||!at||(nt?st(k):ze=k)}function st(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;De.supported=!0}catch{}k.deleteTexture(C),Ze=!0}var Me="01";function ye(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",H="",ne=0;ne<10;ne++)H+=C[Math.floor(Math.random()*62)];var xe=12*60*60*1e3,Re=[k,Me,H].join(""),qe=Date.now()+xe;return{token:Re,tokenExpiresAt:qe}}var he=function(C,H){this._transformRequestFn=C,this._customAccessToken=H,this._createSkuToken()};he.prototype._createSkuToken=function(){var C=ye();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},he.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},he.prototype.transformRequest=function(C,H){return this._transformRequestFn?this._transformRequestFn(C,H)||{url:C}:{url:C}},he.prototype.normalizeStyleURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/styles/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeGlyphsURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/fonts/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeSourceURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/v4/"+ne.authority+".json",ne.params.push("secure"),this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeSpriteURL=function(C,H,ne,xe){var Re=qt(C);return Oe(C)?(Re.path="/styles/v1"+Re.path+"/sprite"+H+ne,this._makeAPIURL(Re,this._customAccessToken||xe)):(Re.path+=""+H+ne,Wt(Re))},he.prototype.normalizeTileURL=function(C,H){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Oe(C))return C;var ne=qt(C),xe=/(\.(png|jpg)\d*)(?=$)/,Re=/^.+\/v4\//,qe=be.devicePixelRatio>=2||H===512?"@2x":"",pt=De.supported?".webp":"$1";ne.path=ne.path.replace(xe,""+qe+pt),ne.path=ne.path.replace(Re,"/"),ne.path="/v4"+ne.path;var Dt=this._customAccessToken||Pt(ne.params)||Ae.ACCESS_TOKEN;return Ae.REQUIRE_ACCESS_TOKEN&&Dt&&this._skuToken&&ne.params.push("sku="+this._skuToken),this._makeAPIURL(ne,Dt)},he.prototype.canonicalizeTileURL=function(C,H){var ne="/v4/",xe=/\.[\w]+$/,Re=qt(C);if(!Re.path.match(/(^\/v4\/)/)||!Re.path.match(xe))return C;var qe="mapbox://tiles/";qe+=Re.path.replace(ne,"");var pt=Re.params;return H&&(pt=pt.filter(function(Dt){return!Dt.match(/^access_token=/)})),pt.length&&(qe+="?"+pt.join("&")),qe},he.prototype.canonicalizeTileset=function(C,H){for(var ne=H?Oe(H):!1,xe=[],Re=0,qe=C.tiles||[];Re<qe.length;Re+=1){var pt=qe[Re];ot(pt)?xe.push(this.canonicalizeTileURL(pt,ne)):xe.push(pt)}return xe},he.prototype._makeAPIURL=function(C,H){var ne="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",xe=qt(Ae.API_URL);if(C.protocol=xe.protocol,C.authority=xe.authority,C.protocol==="http"){var Re=C.params.indexOf("secure");Re>=0&&C.params.splice(Re,1)}if(xe.path!=="/"&&(C.path=""+xe.path+C.path),!Ae.REQUIRE_ACCESS_TOKEN)return Wt(C);if(H=H||Ae.ACCESS_TOKEN,!H)throw new Error("An API access token is required to use Mapbox GL. "+ne);if(H[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ne);return C.params=C.params.filter(function(qe){return qe.indexOf("access_token")===-1}),C.params.push("access_token="+H),Wt(C)};function Oe(k){return k.indexOf("mapbox:")===0}var tt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ot(k){return tt.test(k)}function Qe(k){return k.indexOf("sku=")>0&&ot(k)}function Pt(k){for(var C=0,H=k;C<H.length;C+=1){var ne=H[C],xe=ne.match(/^access_token=(.*)$/);if(xe)return xe[1]}return null}var It=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function qt(k){var C=k.match(It);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 Wt(k){var C=k.params.length?"?"+k.params.join("&"):"";return k.protocol+"://"+k.authority+k.path+C}var kr="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(oe(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(Ae.ACCESS_TOKEN),ne="";return H&&H.u?ne=q(H.u):ne=Ae.ACCESS_TOKEN||"",C?kr+"."+C+":"+ne:kr+":"+ne},qr.prototype.fetchEventData=function(){var C=ee("localStorage"),H=this.getStorageKey(),ne=this.getStorageKey("uuid");if(C)try{var xe=s.localStorage.getItem(H);xe&&(this.eventData=JSON.parse(xe));var Re=s.localStorage.getItem(ne);Re&&(this.anonId=Re)}catch{B("Unable to read from LocalStorage")}},qr.prototype.saveEventData=function(){var C=ee("localStorage"),H=this.getStorageKey(),ne=this.getStorageKey("uuid");if(C)try{s.localStorage.setItem(ne,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,ne,xe){var Re=this;if(Ae.EVENTS_URL){var qe=qt(Ae.EVENTS_URL);qe.params.push("access_token="+(xe||Ae.ACCESS_TOKEN||""));var pt={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Me,userId:this.anonId},Dt=H?g(pt,H):pt,Gt={url:Wt(qe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Dt])};this.pendingRequest=ca(Gt,function(tr){Re.pendingRequest=null,ne(tr),Re.saveEventData(),Re.processRequests(xe)})}},qr.prototype.queueRequest=function(C,H){this.queue.push(C),this.processRequests(H)};var Sr=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(ne,xe,Re,qe){this.skuToken=Re,(Ae.EVENTS_URL&&qe||Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(pt){return Oe(pt)||ot(pt)}))&&this.queueRequest({id:xe,timestamp:Date.now()},qe)},C.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){var Re=this.queue.shift(),qe=Re.id,pt=Re.timestamp;qe&&this.success[qe]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=y()),this.postEvent(pt,{skuToken:this.skuToken},function(Dt){Dt||qe&&(xe.success[qe]=!0)},ne))}},C}(qr),Rr=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(ne,xe){Ae.EVENTS_URL&&Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(Re){return Oe(Re)||ot(Re)})&&this.queueRequest(Date.now(),xe)},C.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Re=mr(Ae.ACCESS_TOKEN),qe=Re?Re.u:Ae.ACCESS_TOKEN,pt=qe!==this.eventData.tokenU;R(this.anonId)||(this.anonId=y(),pt=!0);var Dt=this.queue.shift();if(this.eventData.lastSuccess){var Gt=new Date(this.eventData.lastSuccess),tr=new Date(Dt),Pr=(Dt-this.eventData.lastSuccess)/(24*60*60*1e3);pt=pt||Pr>=1||Pr<-1||Gt.getDate()!==tr.getDate()}else pt=!0;if(!pt)return this.processRequests();this.postEvent(Dt,{"enabled.telemetry":!1},function(Zr){Zr||(xe.eventData.lastSuccess=Dt,xe.eventData.tokenU=qe)},ne)}},C}(qr),wt=new Rr,Ne=wt.postTurnstileEvent.bind(wt),Ke=new Sr,Te=Ke.postMapLoadEvent.bind(Ke),Ie="mapbox-tiles",Ve=500,Ce=50,Ee=1e3*60*7,Pe;function ft(){s.caches&&!Pe&&(Pe=s.caches.open(Ie))}var ct;function _t(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 Ct(k,C,H){if(ft(),!!Pe){var ne={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(qe,pt){return ne.headers.set(pt,qe)});var xe=fe(C.headers.get("Cache-Control")||"");if(!xe["no-store"]){xe["max-age"]&&ne.headers.set("Expires",new Date(H+xe["max-age"]*1e3).toUTCString());var Re=new Date(ne.headers.get("Expires")).getTime()-H;Re<Ee||_t(C,function(qe){var pt=new s.Response(qe,ne);ft(),Pe&&Pe.then(function(Dt){return Dt.put(ir(k.url),pt)}).catch(function(Dt){return B(Dt.message)})})}}}function ir(k){var C=k.indexOf("?");return C<0?k:k.slice(0,C)}function rr(k,C){if(ft(),!Pe)return C(null);var H=ir(k.url);Pe.then(function(ne){ne.match(H).then(function(xe){var Re=er(xe);ne.delete(H),Re&&ne.put(H,xe.clone()),C(null,xe,Re)}).catch(C)}).catch(C)}function er(k){if(!k)return!1;var C=new Date(k.headers.get("Expires")||0),H=fe(k.headers.get("Cache-Control")||"");return C>Date.now()&&!H["no-cache"]}var Lr=1/0;function fa(k){Lr++,Lr>Ce&&(k.getActor().send("enforceCacheSizeLimit",Ve),Lr=0)}function Da(k){ft(),Pe&&Pe.then(function(C){C.keys().then(function(H){for(var ne=0;ne<H.length-k;ne++)C.delete(H[ne])})})}function Ia(k){var C=s.caches.delete(Ie);k&&C.catch(k).then(function(){return k()})}function qa(k,C){Ve=k,Ce=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,ne,xe){ne===401&&ot(xe)&&(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=ne,this.url=xe,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=le()?function(){return self.worker&&self.worker.referrer}:function(){return(s.location.protocol==="blob:"?s.parent:s).location.href},Ft=function(k){return/^file:/.test(k)||/^file:/.test(Kt())&&!/^\w+:/.test(k)};function Yt(k,C){var H=new s.AbortController,ne=new s.Request(k.url,{method:k.method||"GET",body:k.body,credentials:k.credentials,headers:k.headers,referrer:Kt(),signal:H.signal}),xe=!1,Re=!1,qe=Qe(ne.url);k.type==="json"&&ne.headers.set("Accept","application/json");var pt=function(Gt,tr,Pr){if(!Re){if(Gt&&Gt.message!=="SecurityError"&&B(Gt),tr&&Pr)return Dt(tr);var Zr=Date.now();s.fetch(ne).then(function(Vr){if(Vr.ok){var ua=qe?Vr.clone():null;return Dt(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))})}},Dt=function(Gt,tr,Pr){(k.type==="arrayBuffer"?Gt.arrayBuffer():k.type==="json"?Gt.json():Gt.text()).then(function(Zr){Re||(tr&&Pr&&Ct(ne,tr,Pr),xe=!0,C(null,Zr,Gt.headers.get("Cache-Control"),Gt.headers.get("Expires")))}).catch(function(Zr){Re||C(new Error(Zr.message))})};return qe?rr(ne,pt):pt(null,null),{cancel:function(){Re=!0,xe||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 ne in k.headers)H.setRequestHeader(ne,k.headers[ne]);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 xe=H.response;if(k.type==="json")try{xe=JSON.parse(H.response)}catch(Re){return C(Re)}C(null,xe,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(!Ft(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Yt(k,C);if(le()&&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,ne){var xe=new s.Image,Re=s.URL;xe.onload=function(){C(null,xe),Re.revokeObjectURL(xe.src),xe.onload=null,s.requestAnimationFrame(function(){xe.src=$a})},xe.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 qe=new s.Blob([new Uint8Array(k)],{type:"image/png"});xe.cacheControl=H,xe.expires=ne,xe.src=k.byteLength?Re.createObjectURL(qe):$a}function ri(k,C){var H=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(H).then(function(ne){C(null,ne)}).catch(function(ne){C(new Error("Could not load image because of "+ne.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ra,tn=function(){pi=[],Ra=0};tn();var on=function(k,C){if(De.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ra>=Ae.MAX_PARALLEL_IMAGE_REQUESTS){var H={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(H),H}Ra++;var ne=!1,xe=function(){if(!ne)for(ne=!0,Ra--;pi.length&&Ra<Ae.MAX_PARALLEL_IMAGE_REQUESTS;){var qe=pi.shift(),pt=qe.requestParameters,Dt=qe.callback,Gt=qe.cancelled;Gt||(qe.cancel=on(pt,Dt).cancel)}},Re=ra(k,function(qe,pt,Dt,Gt){xe(),qe?C(qe):pt&&(Ca()?ri(pt,C):Za(pt,C,Dt,Gt))});return{cancel:function(){Re.cancel(),xe()}}},hn=function(k,C){var H=s.document.createElement("video");H.muted=!0,H.onloadstart=function(){C(null,H)};for(var ne=0;ne<k.length;ne++){var xe=s.document.createElement("source");Ba(k[ne])||(H.crossOrigin="Anonymous"),xe.src=k[ne],H.appendChild(xe)}return{cancel:function(){}}};function Tt(k,C,H){var ne=H[k]&&H[k].indexOf(C)!==-1;ne||(H[k]=H[k]||[],H[k].push(C))}function ut(k,C,H){if(H&&H[k]){var ne=H[k].indexOf(C);ne!==-1&&H[k].splice(ne,1)}}var Br=function(C,H){H===void 0&&(H={}),g(this,H),this.type=C},Cr=function(k){function C(H,ne){ne===void 0&&(ne={}),k.call(this,"error",g({error:H},ne))}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||{},Tt(C,H,this._listeners),this},xr.prototype.off=function(C,H){return ut(C,H,this._listeners),ut(C,H,this._oneTimeListeners),this},xr.prototype.once=function(C,H){return this._oneTimeListeners=this._oneTimeListeners||{},Tt(C,H,this._oneTimeListeners),this},xr.prototype.fire=function(C,H){typeof C=="string"&&(C=new Br(C,H||{}));var ne=C.type;if(this.listens(ne)){C.target=this;for(var xe=this._listeners&&this._listeners[ne]?this._listeners[ne].slice():[],Re=0,qe=xe;Re<qe.length;Re+=1){var pt=qe[Re];pt.call(this,C)}for(var Dt=this._oneTimeListeners&&this._oneTimeListeners[ne]?this._oneTimeListeners[ne].slice():[],Gt=0,tr=Dt;Gt<tr.length;Gt+=1){var Pr=tr[Gt];ut(ne,Pr,this._oneTimeListeners),Pr.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 Ir=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"}},xt=["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"}}},ya={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"}},Ta=["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"}},_n={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Rn={"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"}},En={"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"}},On={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},no={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},cn={type:"array",value:"*"},lo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Wo={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},hs={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Oo={type:"array",value:"*",minimum:1},Wn={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}},No=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],as={"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"}},Ns={"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"}},ss={"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"}},uo={"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"}},jn={"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"}},Xn={"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"}},ls={"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"}},Cs={"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"}},Ks={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Xo={"*":{type:"string"}},Gi={$version:Ir,$root:Ur,sources:Hr,source:xt,source_vector:Xt,source_raster:vr,source_raster_dem:Or,source_geojson:ba,source_video:Pa,source_image:ya,layer:la,layout:Ta,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:_n,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Rn,layout_symbol:En,layout_raster:On,layout_hillshade:no,filter:cn,filter_operator:lo,geometry_type:Wo,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:hs,expression:Oo,light:Wn,paint:No,paint_fill:as,"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:Ns,paint_circle:ss,paint_heatmap:uo,paint_symbol:jn,paint_raster:Xn,paint_hillshade:ls,paint_background:Cs,transition:Ks,"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},Ln=function(C,H,ne,xe){this.message=(C?C+": ":"")+ne,xe&&(this.identifier=xe),H!=null&&H.__line__&&(this.line=H.__line__)};function Us(k){var C=k.key,H=k.value;return H?[new Ln(C,H,"constants have been deprecated as of v8")]:[]}function _s(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne];for(var qe in Re)k[qe]=Re[qe]}return k}function Gn(k){return k instanceof Number||k instanceof String||k instanceof Boolean?k.valueOf():k}function zs(k){if(Array.isArray(k))return k.map(zs);if(k instanceof Object&&!(k instanceof Number||k instanceof String||k instanceof Boolean)){var C={};for(var H in k)C[H]=zs(k[H]);return C}return Gn(k)}var vs=function(k){function C(H,ne){k.call(this,ne),this.message=ne,this.key=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Error),Ws=function(C,H){H===void 0&&(H=[]),this.parent=C,this.bindings={};for(var ne=0,xe=H;ne<xe.length;ne+=1){var Re=xe[ne],qe=Re[0],pt=Re[1];this.bindings[qe]=pt}};Ws.prototype.concat=function(C){return new Ws(this,C)},Ws.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.")},Ws.prototype.has=function(C){return this.bindings[C]?!0:this.parent?this.parent.has(C):!1};var il={kind:"null"},xn={kind:"number"},ko={kind:"string"},bo={kind:"boolean"},Is={kind:"color"},pu={kind:"object"},co={kind:"value"},Vs={kind:"error"},vl={kind:"collator"},Ts={kind:"formatted"},js={kind:"resolvedImage"};function us(k,C){return{kind:"array",itemType:k,N:C}}function As(k){if(k.kind==="array"){var C=As(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,xn,ko,bo,Is,Ts,pu,us(co),js];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,ne=Nl;H<ne.length;H+=1){var xe=ne[H];if(!su(xe,C))return null}}return"Expected "+As(k)+" but found "+As(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 ne(Gt){return Gt=Math.round(Gt),Gt<0?0:Gt>255?255:Gt}function xe(Gt){return Gt<0?0:Gt>1?1:Gt}function Re(Gt){return Gt[Gt.length-1]==="%"?ne(parseFloat(Gt)/100*255):ne(parseInt(Gt))}function qe(Gt){return Gt[Gt.length-1]==="%"?xe(parseFloat(Gt)/100):xe(parseFloat(Gt))}function pt(Gt,tr,Pr){return Pr<0?Pr+=1:Pr>1&&(Pr-=1),Pr*6<1?Gt+(tr-Gt)*Pr*6:Pr*2<1?tr:Pr*3<2?Gt+(tr-Gt)*(2/3-Pr)*6:Gt}function Dt(Gt){var tr=Gt.replace(/ /g,"").toLowerCase();if(tr in H)return H[tr].slice();if(tr[0]==="#"){if(tr.length===4){var Pr=parseInt(tr.substr(1),16);return Pr>=0&&Pr<=4095?[(Pr&3840)>>4|(Pr&3840)>>8,Pr&240|(Pr&240)>>4,Pr&15|(Pr&15)<<4,1]:null}else if(tr.length===7){var Pr=parseInt(tr.substr(1),16);return Pr>=0&&Pr<=16777215?[(Pr&16711680)>>16,(Pr&65280)>>8,Pr&255,1]:null}return null}var Zr=tr.indexOf("("),Vr=tr.indexOf(")");if(Zr!==-1&&Vr+1===tr.length){var ua=tr.substr(0,Zr),Oa=tr.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=qe(Oa.pop());case"rgb":return Oa.length!==3?null:[Re(Oa[0]),Re(Oa[1]),Re(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=qe(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ii=(parseFloat(Oa[0])%360+360)%360/360,$i=qe(Oa[1]),Oi=qe(Oa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[ne(pt(ln,Ji,ii+1/3)*255),ne(pt(ln,Ji,ii)*255),ne(pt(ln,Ji,ii-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=Dt}catch{}}),Uc=Sf.parseCSSColor,Fs=function(C,H,ne,xe){xe===void 0&&(xe=1),this.r=C,this.g=H,this.b=ne,this.a=xe};Fs.parse=function(C){if(C){if(C instanceof Fs)return C;if(typeof C=="string"){var H=Uc(C);if(H)return new Fs(H[0]/255*H[3],H[1]/255*H[3],H[2]/255*H[3],H[3])}}},Fs.prototype.toString=function(){var C=this.toArray(),H=C[0],ne=C[1],xe=C[2],Re=C[3];return"rgba("+Math.round(H)+","+Math.round(ne)+","+Math.round(xe)+","+Re+")"},Fs.prototype.toArray=function(){var C=this,H=C.r,ne=C.g,xe=C.b,Re=C.a;return Re===0?[0,0,0,0]:[H*255/Re,ne*255/Re,xe*255/Re,Re]},Fs.black=new Fs(0,0,0,1),Fs.white=new Fs(1,1,1,1),Fs.transparent=new Fs(0,0,0,0),Fs.red=new Fs(1,0,0,1);var dc=function(C,H,ne){C?this.sensitivity=H?"variant":"case":this.sensitivity=H?"accent":"base",this.locale=ne,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,ne,xe,Re){this.text=C,this.image=H,this.scale=ne,this.fontStack=xe,this.textColor=Re},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,ne=this.sections;H<ne.length;H+=1){var xe=ne[H];if(xe.image){C.push(["image",xe.image.name]);continue}C.push(xe.text);var Re={};xe.fontStack&&(Re["text-font"]=["literal",xe.fontStack.split(",")]),xe.scale&&(Re["font-scale"]=xe.scale),xe.textColor&&(Re["text-color"]=["rgba"].concat(xe.textColor.toArray())),C.push(Re)}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,ne){if(!(typeof k=="number"&&k>=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof H=="number"&&H>=0&&H<=255)){var xe=typeof ne=="number"?[k,C,H,ne]:[k,C,H];return"Invalid rgba value ["+xe.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ne>"u"||typeof ne=="number"&&ne>=0&&ne<=1?null:"Invalid rgba value ["+[k,C,H,ne].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 Fs)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 ne=H[C];if(!Ou(ne))return!1}return!0}else if(typeof k=="object"){for(var xe in k)if(!Ou(k[xe]))return!1;return!0}else return!1}function nl(k){if(k===null)return il;if(typeof k=="string")return ko;if(typeof k=="boolean")return bo;if(typeof k=="number")return xn;if(k instanceof Fs)return Is;if(k instanceof dc)return vl;if(k instanceof lu)return Ts;if(k instanceof Pl)return js;if(Array.isArray(k)){for(var C=k.length,H,ne=0,xe=k;ne<xe.length;ne+=1){var Re=xe[ne],qe=nl(Re);if(!H)H=qe;else{if(H===qe)continue;H=co;break}}return us(H||co,C)}else return pu}function ml(k){var C=typeof k;return k===null?"":C==="string"||C==="number"||C==="boolean"?String(k):k instanceof Fs||k instanceof lu||k instanceof Pl?k.toString():JSON.stringify(k)}var xs=function(C,H){this.type=C,this.value=H};xs.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 ne=C[1],xe=nl(ne),Re=H.expectedType;return xe.kind==="array"&&xe.N===0&&Re&&Re.kind==="array"&&(typeof Re.N!="number"||Re.N===0)&&(xe=Re),new xs(xe,ne)},xs.prototype.evaluate=function(){return this.value},xs.prototype.eachChild=function(){},xs.prototype.outputDefined=function(){return!0},xs.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Fs?["rgba"].concat(this.value.toArray()):this.value instanceof lu?this.value.serialize():this.value};var Xs=function(C){this.name="ExpressionEvaluationError",this.message=C};Xs.prototype.toJSON=function(){return this.message};var nc={string:ko,number:xn,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 ne=1,xe,Re=C[0];if(Re==="array"){var qe;if(C.length>2){var pt=C[1];if(typeof pt!="string"||!(pt in nc)||pt==="object")return H.error('The item type argument of "array" must be one of string, number, boolean',1);qe=nc[pt],ne++}else qe=co;var Dt;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);Dt=C[2],ne++}xe=us(qe,Dt)}else xe=nc[Re];for(var Gt=[];ne<C.length;ne++){var tr=H.parse(C[ne],ne,co);if(!tr)return null;Gt.push(tr)}return new Ul(xe,Gt)},Ul.prototype.evaluate=function(C){for(var H=0;H<this.args.length;H++){var ne=this.args[H].evaluate(C),xe=su(this.type,nl(ne));if(xe){if(H===this.args.length-1)throw new Xs("Expected value to be of type "+As(this.type)+", but found "+As(nl(ne))+" instead.")}else return ne}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 ne=C.itemType;if(ne.kind==="string"||ne.kind==="number"||ne.kind==="boolean"){H.push(ne.kind);var xe=C.N;(typeof xe=="number"||this.args.length>1)&&H.push(xe)}}return H.concat(this.args.map(function(Re){return Re.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var ne=C[1];if(!Array.isArray(ne)&&typeof ne=="object")return H.error("First argument must be an image or text section.");for(var xe=[],Re=!1,qe=1;qe<=C.length-1;++qe){var pt=C[qe];if(Re&&typeof pt=="object"&&!Array.isArray(pt)){Re=!1;var Dt=null;if(pt["font-scale"]&&(Dt=H.parse(pt["font-scale"],1,xn),!Dt))return null;var Gt=null;if(pt["text-font"]&&(Gt=H.parse(pt["text-font"],1,us(ko)),!Gt))return null;var tr=null;if(pt["text-color"]&&(tr=H.parse(pt["text-color"],1,Is),!tr))return null;var Pr=xe[xe.length-1];Pr.scale=Dt,Pr.font=Gt,Pr.textColor=tr}else{var Zr=H.parse(C[qe],1,co);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'.");Re=!0,xe.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(xe)},qu.prototype.evaluate=function(C){var H=function(ne){var xe=ne.content.evaluate(C);return nl(xe)===js?new Hc("",xe,null,null,null):new Hc(ml(xe),null,ne.scale?ne.scale.evaluate(C):null,ne.font?ne.font.evaluate(C).join(","):null,ne.textColor?ne.textColor.evaluate(C):null)};return new lu(this.sections.map(H))},qu.prototype.eachChild=function(C){for(var H=0,ne=this.sections;H<ne.length;H+=1){var xe=ne[H];C(xe.content),xe.scale&&C(xe.scale),xe.font&&C(xe.font),xe.textColor&&C(xe.textColor)}},qu.prototype.outputDefined=function(){return!1},qu.prototype.serialize=function(){for(var C=["format"],H=0,ne=this.sections;H<ne.length;H+=1){var xe=ne[H];C.push(xe.content.serialize());var Re={};xe.scale&&(Re["font-scale"]=xe.scale.serialize()),xe.font&&(Re["text-font"]=xe.font.serialize()),xe.textColor&&(Re["text-color"]=xe.textColor.serialize()),C.push(Re)}return C};var fl=function(C){this.type=js,this.input=C};fl.parse=function(C,H){if(C.length!==2)return H.error("Expected two arguments.");var ne=H.parse(C[1],1,ko);return ne?new fl(ne):H.error("No image name provided.")},fl.prototype.evaluate=function(C){var H=this.input.evaluate(C),ne=Pl.fromString(H);return ne&&C.availableImages&&(ne.available=C.availableImages.indexOf(H)>-1),ne},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":Is,"to-number":xn,"to-string":ko},ns=function(C,H){this.type=C,this.args=H};ns.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var ne=C[0];if((ne==="to-boolean"||ne==="to-string")&&C.length!==2)return H.error("Expected one argument.");for(var xe=xh[ne],Re=[],qe=1;qe<C.length;qe++){var pt=H.parse(C[qe],qe,co);if(!pt)return null;Re.push(pt)}return new ns(xe,Re)},ns.prototype.evaluate=function(C){if(this.type.kind==="boolean")return!!this.args[0].evaluate(C);if(this.type.kind==="color"){for(var H,ne,xe=0,Re=this.args;xe<Re.length;xe+=1){var qe=Re[xe];if(H=qe.evaluate(C),ne=null,H instanceof Fs)return H;if(typeof H=="string"){var pt=C.parseColor(H);if(pt)return pt}else if(Array.isArray(H)&&(H.length<3||H.length>4?ne="Invalid rbga value "+JSON.stringify(H)+": expected an array containing either three or four numeric values.":ne=ic(H[0],H[1],H[2],H[3]),!ne))return new Fs(H[0]/255,H[1]/255,H[2]/255,H[3])}throw new Xs(ne||"Could not parse color from value '"+(typeof H=="string"?H:String(JSON.stringify(H)))+"'")}else if(this.type.kind==="number"){for(var Dt=null,Gt=0,tr=this.args;Gt<tr.length;Gt+=1){var Pr=tr[Gt];if(Dt=Pr.evaluate(C),Dt===null)return 0;var Zr=Number(Dt);if(!isNaN(Zr))return Zr}throw new Xs("Could not convert "+JSON.stringify(Dt)+" 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))},ns.prototype.eachChild=function(C){this.args.forEach(C)},ns.prototype.outputDefined=function(){return this.args.every(function(C){return C.outputDefined()})},ns.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"],Es=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Es.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Es.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?bh[this.feature.type]:this.feature.type:null},Es.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Es.prototype.canonicalID=function(){return this.canonical},Es.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Es.prototype.parseColor=function(C){var H=this._parseColorCache[C];return H||(H=this._parseColorCache[C]=Fs.parse(C)),H};var to=function(C,H,ne,xe){this.name=C,this.type=H,this._evaluate=ne,this.args=xe};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 ne,xe=C[0],Re=to.definitions[xe];if(!Re)return H.error('Unknown expression "'+xe+'". If you wanted a literal array, use ["literal", [...]].',0);for(var qe=Array.isArray(Re)?Re[0]:Re.type,pt=Array.isArray(Re)?[[Re[1],Re[2]]]:Re.overloads,Dt=pt.filter(function(Mo){var Po=Mo[0];return!Array.isArray(Po)||Po.length===C.length-1}),Gt=null,tr=0,Pr=Dt;tr<Pr.length;tr+=1){var Zr=Pr[tr],Vr=Zr[0],ua=Zr[1];Gt=new ol(H.registry,H.path,null,H.scope);for(var Oa=[],Mi=!1,ii=1;ii<C.length;ii++){var $i=C[ii],Oi=Array.isArray(Vr)?Vr[ii-1]:Vr.type,Ji=Gt.parse($i,1+Oa.length,Oi);if(!Ji){Mi=!0;break}Oa.push(Ji)}if(!Mi){if(Array.isArray(Vr)&&Vr.length!==Oa.length){Gt.error("Expected "+Vr.length+" arguments, but found "+Oa.length+" instead.");continue}for(var ln=0;ln<Oa.length;ln++){var Tn=Array.isArray(Vr)?Vr[ln]:Vr.type,Vn=Oa[ln];Gt.concat(ln+1).checkSubtype(Tn,Vn.type)}if(Gt.errors.length===0)return new to(xe,qe,ua,Oa)}}if(Dt.length===1)(ne=H.errors).push.apply(ne,Gt.errors);else{for(var Nn=Dt.length?Dt:pt,So=Nn.map(function(Mo){var Po=Mo[0];return Wc(Po)}).join(" | "),oo=[],go=1;go<C.length;go++){var ks=H.parse(C[go],1+oo.length);if(!ks)return null;oo.push(As(ks.type))}H.error("Expected arguments of type "+So+", but found ("+oo.join(", ")+") instead.")}return null},to.register=function(C,H){to.definitions=H;for(var ne in H)C[ne]=to};function Wc(k){return Array.isArray(k)?"("+k.map(As).join(", ")+")":"("+As(k.type)+"...)"}var Vu=function(C,H,ne){this.type=vl,this.locale=ne,this.caseSensitive=C,this.diacriticSensitive=H};Vu.parse=function(C,H){if(C.length!==2)return H.error("Expected one argument.");var ne=C[1];if(typeof ne!="object"||Array.isArray(ne))return H.error("Collator options argument must be an object.");var xe=H.parse(ne["case-sensitive"]===void 0?!1:ne["case-sensitive"],1,bo);if(!xe)return null;var Re=H.parse(ne["diacritic-sensitive"]===void 0?!1:ne["diacritic-sensitive"],1,bo);if(!Re)return null;var qe=null;return ne.locale&&(qe=H.parse(ne.locale,1,ko),!qe)?null:new Vu(xe,Re,qe)},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]),ne=nf(k[1]),xe=Math.pow(2,C.z);return[Math.round(H*xe*jl),Math.round(ne*xe*jl)]}function Of(k,C,H){var ne=k[0]-C[0],xe=k[1]-C[1],Re=k[0]-H[0],qe=k[1]-H[1];return ne*qe-Re*xe===0&&ne*Re<=0&&xe*qe<=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,ne=0,xe=C.length;ne<xe;ne++)for(var Re=C[ne],qe=0,pt=Re.length;qe<pt-1;qe++){if(Of(k,Re[qe],Re[qe+1]))return!1;of(k,Re[qe],Re[qe+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,ne){var xe=k[0]-H[0],Re=k[1]-H[1],qe=C[0]-H[0],pt=C[1]-H[1],Dt=ne[0]-H[0],Gt=ne[1]-H[1],tr=xe*Gt-Dt*Re,Pr=qe*Gt-Dt*pt;return tr>0&&Pr<0||tr<0&&Pr>0}function Ef(k,C,H,ne){var xe=[C[0]-k[0],C[1]-k[1]],Re=[ne[0]-H[0],ne[1]-H[1]];return Nf(Re,xe)===0?!1:!!(Gu(k,C,H,ne)&&Gu(H,ne,k,C))}function oc(k,C,H){for(var ne=0,xe=H;ne<xe.length;ne+=1)for(var Re=xe[ne],qe=0;qe<Re.length-1;++qe)if(Ef(k,C,Re[qe],Re[qe+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 ne=0;ne<k.length-1;++ne)if(oc(k[ne],k[ne+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 ne=[],xe=0;xe<k.length;xe++){for(var Re=[],qe=0;qe<k[xe].length;qe++){var pt=Jf(k[xe][qe],H);Mf(C,pt),Re.push(pt)}ne.push(Re)}return ne}function Sc(k,C,H){for(var ne=[],xe=0;xe<k.length;xe++){var Re=qc(k[xe],C,H);ne.push(Re)}return ne}function Zs(k,C,H,ne){if(k[0]<H[0]||k[0]>H[2]){var xe=ne*.5,Re=k[0]-H[0]>xe?-ne:H[0]-k[0]>xe?ne:0;Re===0&&(Re=k[0]-H[2]>xe?-ne:H[2]-k[0]>xe?ne:0),k[0]+=Re}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,H,ne){for(var xe=Math.pow(2,ne.z)*jl,Re=[ne.x*jl,ne.y*jl],qe=[],pt=0,Dt=k;pt<Dt.length;pt+=1)for(var Gt=Dt[pt],tr=0,Pr=Gt;tr<Pr.length;tr+=1){var Zr=Pr[tr],Vr=[Zr.x+Re[0],Zr.y+Re[1]];Zs(Vr,C,H,xe),qe.push(Vr)}return qe}function Uf(k,C,H,ne){for(var xe=Math.pow(2,ne.z)*jl,Re=[ne.x*jl,ne.y*jl],qe=[],pt=0,Dt=k;pt<Dt.length;pt+=1){for(var Gt=Dt[pt],tr=[],Pr=0,Zr=Gt;Pr<Zr.length;Pr+=1){var Vr=Zr[Pr],ua=[Vr.x+Re[0],Vr.y+Re[1]];Mf(C,ua),tr.push(ua)}qe.push(tr)}if(C[2]-C[0]<=xe/2){kf(C);for(var Oa=0,Mi=qe;Oa<Mi.length;Oa+=1)for(var ii=Mi[Oa],$i=0,Oi=ii;$i<Oi.length;$i+=1){var Ji=Oi[$i];Zs(Ji,C,H,xe)}}return qe}function Zc(k,C){var H=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],xe=k.canonicalID();if(C.type==="Polygon"){var Re=qc(C.coordinates,ne,xe),qe=fh(k.geometry(),H,ne,xe);if(!$l(H,ne))return!1;for(var pt=0,Dt=qe;pt<Dt.length;pt+=1){var Gt=Dt[pt];if(!jc(Gt,Re))return!1}}if(C.type==="MultiPolygon"){var tr=Sc(C.coordinates,ne,xe),Pr=fh(k.geometry(),H,ne,xe);if(!$l(H,ne))return!1;for(var Zr=0,Vr=Pr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(!Bf(ua,tr))return!1}}return!0}function $f(k,C){var H=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],xe=k.canonicalID();if(C.type==="Polygon"){var Re=qc(C.coordinates,ne,xe),qe=Uf(k.geometry(),H,ne,xe);if(!$l(H,ne))return!1;for(var pt=0,Dt=qe;pt<Dt.length;pt+=1){var Gt=Dt[pt];if(!Xc(Gt,Re))return!1}}if(C.type==="MultiPolygon"){var tr=Sc(C.coordinates,ne,xe),Pr=Uf(k.geometry(),H,ne,xe);if(!$l(H,ne))return!1;for(var Zr=0,Vr=Pr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(!Ql(ua,tr))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 ne=C[1];if(ne.type==="FeatureCollection")for(var xe=0;xe<ne.features.length;++xe){var Re=ne.features[xe].geometry.type;if(Re==="Polygon"||Re==="MultiPolygon")return new Cu(ne,ne.features[xe].geometry)}else if(ne.type==="Feature"){var qe=ne.geometry.type;if(qe==="Polygon"||qe==="MultiPolygon")return new Cu(ne,ne.geometry)}else if(ne.type==="Polygon"||ne.type==="MultiPolygon")return new Cu(ne,ne)}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(ne){H&&!Lu(ne,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 ne=C[1];return H.scope.has(ne)?new Mc(ne,H.scope.get(ne)):H.error('Unknown variable "'+ne+'". Make sure "'+ne+'" 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,ne,xe,Re){H===void 0&&(H=[]),xe===void 0&&(xe=new Ws),Re===void 0&&(Re=[]),this.registry=C,this.path=H,this.key=H.map(function(qe){return"["+qe+"]"}).join(""),this.scope=xe,this.errors=Re,this.expectedType=ne};ol.prototype.parse=function(C,H,ne,xe,Re){return Re===void 0&&(Re={}),H?this.concat(H,ne,xe)._parse(C,Re):this._parse(C,Re)},ol.prototype._parse=function(C,H){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function ne(tr,Pr,Zr){return Zr==="assert"?new Ul(Pr,[tr]):Zr==="coerce"?new ns(Pr,[tr]):tr}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 xe=C[0];if(typeof xe!="string")return this.error("Expression name must be a string, but found "+typeof xe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Re=this.registry[xe];if(Re){var qe=Re.parse(C,this);if(!qe)return null;if(this.expectedType){var pt=this.expectedType,Dt=qe.type;if((pt.kind==="string"||pt.kind==="number"||pt.kind==="boolean"||pt.kind==="object"||pt.kind==="array")&&Dt.kind==="value")qe=ne(qe,pt,H.typeAnnotation||"assert");else if((pt.kind==="color"||pt.kind==="formatted"||pt.kind==="resolvedImage")&&(Dt.kind==="value"||Dt.kind==="string"))qe=ne(qe,pt,H.typeAnnotation||"coerce");else if(this.checkSubtype(pt,Dt))return null}if(!(qe instanceof xs)&&qe.type.kind!=="resolvedImage"&&vc(qe)){var Gt=new Es;try{qe=new xs(qe.type,qe.evaluate(Gt))}catch(tr){return this.error(tr.message),null}}return qe}return this.error('Unknown expression "'+xe+'". 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,ne){var xe=typeof C=="number"?this.path.concat(C):this.path,Re=ne?this.scope.concat(ne):this.scope;return new ol(this.registry,xe,H||null,Re,this.errors)},ol.prototype.error=function(C){for(var H=[],ne=arguments.length-1;ne-- >0;)H[ne]=arguments[ne+1];var xe=""+this.key+H.map(function(Re){return"["+Re+"]"}).join("");this.errors.push(new vs(xe,C))},ol.prototype.checkSubtype=function(C,H){var ne=su(C,H);return ne&&this.error(ne),ne};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 ns||k instanceof Ul,H=!0;return k.eachChild(function(ne){C?H=H&&vc(ne):H=H&&ne instanceof xs}),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,ne=0,xe=H,Re=0,qe,pt;ne<=xe;)if(Re=Math.floor((ne+xe)/2),qe=k[Re],pt=k[Re+1],qe<=C){if(Re===H||C<pt)return Re;ne=Re+1}else if(qe>C)xe=Re-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,H,ne){this.type=C,this.input=H,this.labels=[],this.outputs=[];for(var xe=0,Re=ne;xe<Re.length;xe+=1){var qe=Re[xe],pt=qe[0],Dt=qe[1];this.labels.push(pt),this.outputs.push(Dt)}};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 ne=H.parse(C[1],1,xn);if(!ne)return null;var xe=[],Re=null;H.expectedType&&H.expectedType.kind!=="value"&&(Re=H.expectedType);for(var qe=1;qe<C.length;qe+=2){var pt=qe===1?-1/0:C[qe],Dt=C[qe+1],Gt=qe,tr=qe+1;if(typeof pt!="number")return H.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Gt);if(xe.length&&xe[xe.length-1][0]>=pt)return H.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Gt);var Pr=H.parse(Dt,tr,Re);if(!Pr)return null;Re=Re||Pr.type,xe.push([pt,Pr])}return new Tu(Re,ne,xe)},Tu.prototype.evaluate=function(C){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(C);var xe=this.input.evaluate(C);if(xe<=H[0])return ne[0].evaluate(C);var Re=H.length;if(xe>=H[Re-1])return ne[Re-1].evaluate(C);var qe=yu(H,xe);return ne[qe].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var H=0,ne=this.outputs;H<ne.length;H+=1){var xe=ne[H];C(xe)}},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 Fs(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(ne,xe){return El(ne,C[xe],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),ne=_u(k.b),xe=hh((.4124564*C+.3575761*H+.1804375*ne)/Ec),Re=hh((.2126729*C+.7151522*H+.072175*ne)/mc),qe=hh((.0193339*C+.119192*H+.9503041*ne)/Lh);return{l:116*Re-16,a:500*(xe-Re),b:200*(Re-qe),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,H=isNaN(k.a)?C:C+k.a/500,ne=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),H=Ec*mf(H),ne=Lh*mf(ne),new Fs(sl(3.2404542*H-1.5371385*C-.4985314*ne),sl(-.969266*H+1.8760108*C+.041556*ne),sl(.0556434*H-.2040259*C+1.0572252*ne),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,ne=C.a,xe=C.b,Re=Math.atan2(xe,ne)*Yc;return{h:Re<0?Re+360:Re,c:Math.sqrt(ne*ne+xe*xe),l:H,alpha:k.a}}function kc(k){var C=k.h*au,H=k.c,ne=k.l;return Cf({l:ne,a:Math.cos(C)*H,b:Math.sin(C)*H,alpha:k.alpha})}function Hu(k,C,H){var ne=C-k;return k+H*(ne>180||ne<-180?ne-360*Math.round(ne/360):ne)}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,ne,xe,Re){this.type=C,this.operator=H,this.interpolation=ne,this.input=xe,this.labels=[],this.outputs=[];for(var qe=0,pt=Re;qe<pt.length;qe+=1){var Dt=pt[qe],Gt=Dt[0],tr=Dt[1];this.labels.push(Gt),this.outputs.push(tr)}};iu.interpolationFactor=function(C,H,ne,xe){var Re=0;if(C.name==="exponential")Re=Vf(H,C.base,ne,xe);else if(C.name==="linear")Re=Vf(H,1,ne,xe);else if(C.name==="cubic-bezier"){var qe=C.controlPoints,pt=new o(qe[0],qe[1],qe[2],qe[3]);Re=pt.solve(Vf(H,1,ne,xe))}return Re},iu.parse=function(C,H){var ne=C[0],xe=C[1],Re=C[2],qe=C.slice(3);if(!Array.isArray(xe)||xe.length===0)return H.error("Expected an interpolation type expression.",1);if(xe[0]==="linear")xe={name:"linear"};else if(xe[0]==="exponential"){var pt=xe[1];if(typeof pt!="number")return H.error("Exponential interpolation requires a numeric base.",1,1);xe={name:"exponential",base:pt}}else if(xe[0]==="cubic-bezier"){var Dt=xe.slice(1);if(Dt.length!==4||Dt.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);xe={name:"cubic-bezier",controlPoints:Dt}}else return H.error("Unknown interpolation type "+String(xe[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(Re=H.parse(Re,2,xn),!Re)return null;var Gt=[],tr=null;ne==="interpolate-hcl"||ne==="interpolate-lab"?tr=Is:H.expectedType&&H.expectedType.kind!=="value"&&(tr=H.expectedType);for(var Pr=0;Pr<qe.length;Pr+=2){var Zr=qe[Pr],Vr=qe[Pr+1],ua=Pr+3,Oa=Pr+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(Gt.length&&Gt[Gt.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,Oa,tr);if(!Mi)return null;tr=tr||Mi.type,Gt.push([Zr,Mi])}return tr.kind!=="number"&&tr.kind!=="color"&&!(tr.kind==="array"&&tr.itemType.kind==="number"&&typeof tr.N=="number")?H.error("Type "+As(tr)+" is not interpolatable."):new iu(tr,ne,xe,Re,Gt)},iu.prototype.evaluate=function(C){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(C);var xe=this.input.evaluate(C);if(xe<=H[0])return ne[0].evaluate(C);var Re=H.length;if(xe>=H[Re-1])return ne[Re-1].evaluate(C);var qe=yu(H,xe),pt=H[qe],Dt=H[qe+1],Gt=iu.interpolationFactor(this.interpolation,xe,pt,Dt),tr=ne[qe].evaluate(C),Pr=ne[qe+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](tr,Pr,Gt):this.operator==="interpolate-hcl"?Kc.reverse(Kc.interpolate(Kc.forward(tr),Kc.forward(Pr),Gt)):Wu.reverse(Wu.interpolate(Wu.forward(tr),Wu.forward(Pr),Gt))},iu.prototype.eachChild=function(C){C(this.input);for(var H=0,ne=this.outputs;H<ne.length;H+=1){var xe=ne[H];C(xe)}},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()],ne=0;ne<this.labels.length;ne++)H.push(this.labels[ne],this.outputs[ne].serialize());return H};function Vf(k,C,H,ne){var xe=ne-H,Re=k-H;return xe===0?0:C===1?Re/xe:(Math.pow(C,Re)-1)/(Math.pow(C,xe)-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 ne=null,xe=H.expectedType;xe&&xe.kind!=="value"&&(ne=xe);for(var Re=[],qe=0,pt=C.slice(1);qe<pt.length;qe+=1){var Dt=pt[qe],Gt=H.parse(Dt,1+Re.length,ne,void 0,{typeAnnotation:"omit"});if(!Gt)return null;ne=ne||Gt.type,Re.push(Gt)}var tr=xe&&Re.some(function(Pr){return su(xe,Pr.type)});return tr?new Xu(co,Re):new Xu(ne,Re)},Xu.prototype.evaluate=function(C){for(var H=null,ne=0,xe,Re=0,qe=this.args;Re<qe.length;Re+=1){var pt=qe[Re];if(ne++,H=pt.evaluate(C),H&&H instanceof Pl&&!H.available&&(xe||(xe=H.name),H=null,ne===this.args.length&&(H=xe)),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,ne=this.bindings;H<ne.length;H+=1){var xe=ne[H];C(xe[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 ne=[],xe=1;xe<C.length-1;xe+=2){var Re=C[xe];if(typeof Re!="string")return H.error("Expected string, but found "+typeof Re+" instead.",xe);if(/[^a-zA-Z0-9_]/.test(Re))return H.error("Variable names must contain only alphanumeric characters or '_'.",xe);var qe=H.parse(C[xe+1],xe+1);if(!qe)return null;ne.push([Re,qe])}var pt=H.parse(C[C.length-1],C.length-1,H.expectedType,ne);return pt?new Cc(ne,pt):null},Cc.prototype.outputDefined=function(){return this.result.outputDefined()},Cc.prototype.serialize=function(){for(var C=["let"],H=0,ne=this.bindings;H<ne.length;H+=1){var xe=ne[H],Re=xe[0],qe=xe[1];C.push(Re,qe.serialize())}return C.push(this.result.serialize()),C};var gc=function(C,H,ne){this.type=C,this.index=H,this.input=ne};gc.parse=function(C,H){if(C.length!==3)return H.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var ne=H.parse(C[1],1,xn),xe=H.parse(C[2],2,us(H.expectedType||co));if(!ne||!xe)return null;var Re=xe.type;return new gc(Re.itemType,ne,xe)},gc.prototype.evaluate=function(C){var H=this.index.evaluate(C),ne=this.input.evaluate(C);if(H<0)throw new Xs("Array index out of bounds: "+H+" < 0.");if(H>=ne.length)throw new Xs("Array index out of bounds: "+H+" > "+(ne.length-1)+".");if(H!==Math.floor(H))throw new Xs("Array index must be an integer, but found "+H+" instead.");return ne[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 ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,co);return!ne||!xe?null:Tc(ne.type,[bo,ko,xn,il,co])?new ql(ne,xe):H.error("Expected first argument to be of type boolean, string, number or null, but found "+As(ne.type)+" instead")},ql.prototype.evaluate=function(C){var H=this.needle.evaluate(C),ne=this.haystack.evaluate(C);if(!ne)return!1;if(!du(H,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+As(nl(H))+" instead.");if(!du(ne,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+As(nl(ne))+" instead.");return ne.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,ne){this.type=xn,this.needle=C,this.haystack=H,this.fromIndex=ne};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 ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,co);if(!ne||!xe)return null;if(!Tc(ne.type,[bo,ko,xn,il,co]))return H.error("Expected first argument to be of type boolean, string, number or null, but found "+As(ne.type)+" instead");if(C.length===4){var Re=H.parse(C[3],3,xn);return Re?new xu(ne,xe,Re):null}else return new xu(ne,xe)},xu.prototype.evaluate=function(C){var H=this.needle.evaluate(C),ne=this.haystack.evaluate(C);if(!du(H,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+As(nl(H))+" instead.");if(!du(ne,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+As(nl(ne))+" instead.");if(this.fromIndex){var xe=this.fromIndex.evaluate(C);return ne.indexOf(H,xe)}return ne.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,ne,xe,Re,qe){this.inputType=C,this.type=H,this.input=ne,this.cases=xe,this.outputs=Re,this.otherwise=qe};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 ne,xe;H.expectedType&&H.expectedType.kind!=="value"&&(xe=H.expectedType);for(var Re={},qe=[],pt=2;pt<C.length-1;pt+=2){var Dt=C[pt],Gt=C[pt+1];Array.isArray(Dt)||(Dt=[Dt]);var tr=H.concat(pt);if(Dt.length===0)return tr.error("Expected at least one branch label.");for(var Pr=0,Zr=Dt;Pr<Zr.length;Pr+=1){var Vr=Zr[Pr];if(typeof Vr!="number"&&typeof Vr!="string")return tr.error("Branch labels must be numbers or strings.");if(typeof Vr=="number"&&Math.abs(Vr)>Number.MAX_SAFE_INTEGER)return tr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return tr.error("Numeric branch labels must be integer values.");if(!ne)ne=nl(Vr);else if(tr.checkSubtype(ne,nl(Vr)))return null;if(typeof Re[String(Vr)]<"u")return tr.error("Branch labels must be unique.");Re[String(Vr)]=qe.length}var ua=H.parse(Gt,pt,xe);if(!ua)return null;xe=xe||ua.type,qe.push(ua)}var Oa=H.parse(C[1],1,co);if(!Oa)return null;var Mi=H.parse(C[C.length-1],C.length-1,xe);return!Mi||Oa.type.kind!=="value"&&H.concat(1).checkSubtype(ne,Oa.type)?null:new Lc(ne,xe,Oa,Re,qe,Mi)},Lc.prototype.evaluate=function(C){var H=this.input.evaluate(C),ne=nl(H)===this.inputType&&this.outputs[this.cases[H]]||this.otherwise;return ne.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()],ne=Object.keys(this.cases).sort(),xe=[],Re={},qe=0,pt=ne;qe<pt.length;qe+=1){var Dt=pt[qe],Gt=Re[this.cases[Dt]];Gt===void 0?(Re[this.cases[Dt]]=xe.length,xe.push([this.cases[Dt],[Dt]])):xe[Gt][1].push(Dt)}for(var tr=function(Oa){return C.inputType.kind==="number"?Number(Oa):Oa},Pr=0,Zr=xe;Pr<Zr.length;Pr+=1){var Vr=Zr[Pr],Gt=Vr[0],ua=Vr[1];ua.length===1?H.push(tr(ua[0])):H.push(ua.map(tr)),H.push(this.outputs[outputIndex$1].serialize())}return H.push(this.otherwise.serialize()),H};var Jc=function(C,H,ne){this.type=C,this.branches=H,this.otherwise=ne};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 ne;H.expectedType&&H.expectedType.kind!=="value"&&(ne=H.expectedType);for(var xe=[],Re=1;Re<C.length-1;Re+=2){var qe=H.parse(C[Re],Re,bo);if(!qe)return null;var pt=H.parse(C[Re+1],Re+1,ne);if(!pt)return null;xe.push([qe,pt]),ne=ne||pt.type}var Dt=H.parse(C[C.length-1],C.length-1,ne);return Dt?new Jc(ne,xe,Dt):null},Jc.prototype.evaluate=function(C){for(var H=0,ne=this.branches;H<ne.length;H+=1){var xe=ne[H],Re=xe[0],qe=xe[1];if(Re.evaluate(C))return qe.evaluate(C)}return this.otherwise.evaluate(C)},Jc.prototype.eachChild=function(C){for(var H=0,ne=this.branches;H<ne.length;H+=1){var xe=ne[H],Re=xe[0],qe=xe[1];C(Re),C(qe)}C(this.otherwise)},Jc.prototype.outputDefined=function(){return this.branches.every(function(C){var H=C[0],ne=C[1];return ne.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,ne,xe){this.type=C,this.input=H,this.beginIndex=ne,this.endIndex=xe};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 ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,xn);if(!ne||!xe)return null;if(!Tc(ne.type,[us(co),ko,co]))return H.error("Expected first argument to be of type array or string, but found "+As(ne.type)+" instead");if(C.length===4){var Re=H.parse(C[3],3,xn);return Re?new sc(ne.type,ne,xe,Re):null}else return new sc(ne.type,ne,xe)},sc.prototype.evaluate=function(C){var H=this.input.evaluate(C),ne=this.beginIndex.evaluate(C);if(!du(H,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+As(nl(H))+" instead.");if(this.endIndex){var xe=this.endIndex.evaluate(C);return H.slice(ne,xe)}return H.slice(ne)},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,ne){return ne.compare(C,H)===0}function Hi(k,C,H,ne){return!Ci(k,C,H,ne)}function Qi(k,C,H,ne){return ne.compare(C,H)<0}function dn(k,C,H,ne){return ne.compare(C,H)>0}function Pi(k,C,H,ne){return ne.compare(C,H)<=0}function Di(k,C,H,ne){return ne.compare(C,H)>=0}function Ni(k,C,H){var ne=k!=="=="&&k!=="!=";return function(){function xe(Re,qe,pt){this.type=bo,this.lhs=Re,this.rhs=qe,this.collator=pt,this.hasUntypedArgument=Re.type.kind==="value"||qe.type.kind==="value"}return xe.parse=function(qe,pt){if(qe.length!==3&&qe.length!==4)return pt.error("Expected two or three arguments.");var Dt=qe[0],Gt=pt.parse(qe[1],1,co);if(!Gt)return null;if(!Pc(Dt,Gt.type))return pt.concat(1).error('"'+Dt+`" comparisons are not supported for type '`+As(Gt.type)+"'.");var tr=pt.parse(qe[2],2,co);if(!tr)return null;if(!Pc(Dt,tr.type))return pt.concat(2).error('"'+Dt+`" comparisons are not supported for type '`+As(tr.type)+"'.");if(Gt.type.kind!==tr.type.kind&&Gt.type.kind!=="value"&&tr.type.kind!=="value")return pt.error("Cannot compare types '"+As(Gt.type)+"' and '"+As(tr.type)+"'.");ne&&(Gt.type.kind==="value"&&tr.type.kind!=="value"?Gt=new Ul(tr.type,[Gt]):Gt.type.kind!=="value"&&tr.type.kind==="value"&&(tr=new Ul(Gt.type,[tr])));var Pr=null;if(qe.length===4){if(Gt.type.kind!=="string"&&tr.type.kind!=="string"&&Gt.type.kind!=="value"&&tr.type.kind!=="value")return pt.error("Cannot use collator to compare non-string types.");if(Pr=pt.parse(qe[3],3,vl),!Pr)return null}return new xe(Gt,tr,Pr)},xe.prototype.evaluate=function(qe){var pt=this.lhs.evaluate(qe),Dt=this.rhs.evaluate(qe);if(ne&&this.hasUntypedArgument){var Gt=nl(pt),tr=nl(Dt);if(Gt.kind!==tr.kind||!(Gt.kind==="string"||Gt.kind==="number"))throw new Xs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Gt.kind+", "+tr.kind+") instead.")}if(this.collator&&!ne&&this.hasUntypedArgument){var Pr=nl(pt),Zr=nl(Dt);if(Pr.kind!=="string"||Zr.kind!=="string")return C(qe,pt,Dt)}return this.collator?H(qe,pt,Dt,this.collator.evaluate(qe)):C(qe,pt,Dt)},xe.prototype.eachChild=function(qe){qe(this.lhs),qe(this.rhs),this.collator&&qe(this.collator)},xe.prototype.outputDefined=function(){return!0},xe.prototype.serialize=function(){var qe=[k];return this.eachChild(function(pt){qe.push(pt.serialize())}),qe},xe}()}var mi=Ni("==",Qt,Ci),Mn=Ni("!=",br,Hi),Qn=Ni("<",aa,Qi),ao=Ni(">",$r,dn),eo=Ni("<=",ka,Pi),fo=Ni(">=",li,Di),An=function(C,H,ne,xe,Re){this.type=ko,this.number=C,this.locale=H,this.currency=ne,this.minFractionDigits=xe,this.maxFractionDigits=Re};An.parse=function(C,H){if(C.length!==3)return H.error("Expected two arguments.");var ne=H.parse(C[1],1,xn);if(!ne)return null;var xe=C[2];if(typeof xe!="object"||Array.isArray(xe))return H.error("NumberFormat options argument must be an object.");var Re=null;if(xe.locale&&(Re=H.parse(xe.locale,1,ko),!Re))return null;var qe=null;if(xe.currency&&(qe=H.parse(xe.currency,1,ko),!qe))return null;var pt=null;if(xe["min-fraction-digits"]&&(pt=H.parse(xe["min-fraction-digits"],1,xn),!pt))return null;var Dt=null;return xe["max-fraction-digits"]&&(Dt=H.parse(xe["max-fraction-digits"],1,xn),!Dt)?null:new An(ne,Re,qe,pt,Dt)},An.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))},An.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)},An.prototype.outputDefined=function(){return!1},An.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=xn,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 ne=H.parse(C[1],1);return ne?ne.type.kind!=="array"&&ne.type.kind!=="string"&&ne.type.kind!=="value"?H.error("Expected argument of type string or array, but found "+As(ne.type)+" instead."):new un(ne):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 Xs("Expected value to be of type string or array, but found "+As(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 yo={"==":mi,"!=":Mn,">":ao,"<":Qn,">=":fo,"<=":eo,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:xs,match:Lc,number:Ul,"number-format":An,object:Ul,slice:sc,step:Tu,string:Ul,"to-boolean":ns,"to-color":ns,"to-number":ns,"to-string":ns,var:Mc,within:Cu};function Ko(k,C){var H=C[0],ne=C[1],xe=C[2],Re=C[3];H=H.evaluate(k),ne=ne.evaluate(k),xe=xe.evaluate(k);var qe=Re?Re.evaluate(k):1,pt=ic(H,ne,xe,qe);if(pt)throw new Xs(pt);return new Fs(H/255*qe,ne/255*qe,xe/255*qe,qe)}function Ss(k,C){return k in C}function rl(k,C){var H=C[k];return typeof H>"u"?null:H}function Os(k,C,H,ne){for(;H<=ne;){var xe=H+ne>>1;if(C[xe]===k)return!0;C[xe]>k?ne=xe-1:H=xe+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Vs,[ko],function(k,C){var H=C[0];throw new Xs(H.evaluate(k))}],typeof:[ko,[co],function(k,C){var H=C[0];return As(nl(H.evaluate(k)))}],"to-rgba":[us(xn,4),[Is],function(k,C){var H=C[0];return H.evaluate(k).toArray()}],rgb:[Is,[xn,xn,xn],Ko],rgba:[Is,[xn,xn,xn,xn],Ko],has:{type:bo,overloads:[[[ko],function(k,C){var H=C[0];return Ss(H.evaluate(k),k.properties())}],[[ko,pu],function(k,C){var H=C[0],ne=C[1];return Ss(H.evaluate(k),ne.evaluate(k))}]]},get:{type:co,overloads:[[[ko],function(k,C){var H=C[0];return rl(H.evaluate(k),k.properties())}],[[ko,pu],function(k,C){var H=C[0],ne=C[1];return rl(H.evaluate(k),ne.evaluate(k))}]]},"feature-state":[co,[ko],function(k,C){var H=C[0];return rl(H.evaluate(k),k.featureState||{})}],properties:[pu,[],function(k){return k.properties()}],"geometry-type":[ko,[],function(k){return k.geometryType()}],id:[co,[],function(k){return k.id()}],zoom:[xn,[],function(k){return k.globals.zoom}],"heatmap-density":[xn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[xn,[],function(k){return k.globals.lineProgress||0}],accumulated:[co,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[xn,el(xn),function(k,C){for(var H=0,ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne];H+=Re.evaluate(k)}return H}],"*":[xn,el(xn),function(k,C){for(var H=1,ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne];H*=Re.evaluate(k)}return H}],"-":{type:xn,overloads:[[[xn,xn],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)-ne.evaluate(k)}],[[xn],function(k,C){var H=C[0];return-H.evaluate(k)}]]},"/":[xn,[xn,xn],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)/ne.evaluate(k)}],"%":[xn,[xn,xn],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)%ne.evaluate(k)}],ln2:[xn,[],function(){return Math.LN2}],pi:[xn,[],function(){return Math.PI}],e:[xn,[],function(){return Math.E}],"^":[xn,[xn,xn],function(k,C){var H=C[0],ne=C[1];return Math.pow(H.evaluate(k),ne.evaluate(k))}],sqrt:[xn,[xn],function(k,C){var H=C[0];return Math.sqrt(H.evaluate(k))}],log10:[xn,[xn],function(k,C){var H=C[0];return Math.log(H.evaluate(k))/Math.LN10}],ln:[xn,[xn],function(k,C){var H=C[0];return Math.log(H.evaluate(k))}],log2:[xn,[xn],function(k,C){var H=C[0];return Math.log(H.evaluate(k))/Math.LN2}],sin:[xn,[xn],function(k,C){var H=C[0];return Math.sin(H.evaluate(k))}],cos:[xn,[xn],function(k,C){var H=C[0];return Math.cos(H.evaluate(k))}],tan:[xn,[xn],function(k,C){var H=C[0];return Math.tan(H.evaluate(k))}],asin:[xn,[xn],function(k,C){var H=C[0];return Math.asin(H.evaluate(k))}],acos:[xn,[xn],function(k,C){var H=C[0];return Math.acos(H.evaluate(k))}],atan:[xn,[xn],function(k,C){var H=C[0];return Math.atan(H.evaluate(k))}],min:[xn,el(xn),function(k,C){return Math.min.apply(Math,C.map(function(H){return H.evaluate(k)}))}],max:[xn,el(xn),function(k,C){return Math.max.apply(Math,C.map(function(H){return H.evaluate(k)}))}],abs:[xn,[xn],function(k,C){var H=C[0];return Math.abs(H.evaluate(k))}],round:[xn,[xn],function(k,C){var H=C[0],ne=H.evaluate(k);return ne<0?-Math.round(-ne):Math.round(ne)}],floor:[xn,[xn],function(k,C){var H=C[0];return Math.floor(H.evaluate(k))}],ceil:[xn,[xn],function(k,C){var H=C[0];return Math.ceil(H.evaluate(k))}],"filter-==":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1];return k.properties()[H.value]===ne.value}],"filter-id-==":[bo,[co],function(k,C){var H=C[0];return k.id()===H.value}],"filter-type-==":[bo,[ko],function(k,C){var H=C[0];return k.geometryType()===H.value}],"filter-<":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe<Re}],"filter-id-<":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne<xe}],"filter->":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe>Re}],"filter-id->":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne>xe}],"filter-<=":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe<=Re}],"filter-id-<=":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne<=xe}],"filter->=":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe>=Re}],"filter-id->=":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne>=xe}],"filter-has":[bo,[co],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(ko)],function(k,C){var H=C[0];return H.value.indexOf(k.geometryType())>=0}],"filter-id-in":[bo,[us(co)],function(k,C){var H=C[0];return H.value.indexOf(k.id())>=0}],"filter-in-small":[bo,[ko,us(co)],function(k,C){var H=C[0],ne=C[1];return ne.value.indexOf(k.properties()[H.value])>=0}],"filter-in-large":[bo,[ko,us(co)],function(k,C){var H=C[0],ne=C[1];return Os(k.properties()[H.value],ne.value,0,ne.value.length-1)}],all:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)&&ne.evaluate(k)}],[el(bo),function(k,C){for(var H=0,ne=C;H<ne.length;H+=1){var xe=ne[H];if(!xe.evaluate(k))return!1}return!0}]]},any:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)||ne.evaluate(k)}],[el(bo),function(k,C){for(var H=0,ne=C;H<ne.length;H+=1){var xe=ne[H];if(xe.evaluate(k))return!0}return!1}]]},"!":[bo,[bo],function(k,C){var H=C[0];return!H.evaluate(k)}],"is-supported-script":[bo,[ko],function(k,C){var H=C[0],ne=k.globals&&k.globals.isSupportedScript;return ne?ne(H.evaluate(k)):!0}],upcase:[ko,[ko],function(k,C){var H=C[0];return H.evaluate(k).toUpperCase()}],downcase:[ko,[ko],function(k,C){var H=C[0];return H.evaluate(k).toLowerCase()}],concat:[ko,el(co),function(k,C){return C.map(function(H){return ml(H.evaluate(k))}).join("")}],"resolved-locale":[ko,[vl],function(k,C){var H=C[0];return H.evaluate(k).resolvedLocale()}]});function bs(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 Un(k){return!!k.expression&&k.expression.interpolated}function Lo(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 Rs(k){return k}function uu(k,C){var H=C.type==="color",ne=k.stops&&typeof k.stops[0][0]=="object",xe=ne||k.property!==void 0,Re=ne||!xe,qe=k.type||(Un(C)?"exponential":"interval");if(H&&(k=_s({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Fs.parse(Nn[1])]})),k.default?k.default=Fs.parse(k.default):k.default=Fs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var pt,Dt,Gt;if(qe==="exponential")pt=bu;else if(qe==="interval")pt=Ic;else if(qe==="categorical"){pt=Zu,Dt=Object.create(null);for(var tr=0,Pr=k.stops;tr<Pr.length;tr+=1){var Zr=Pr[tr];Dt[Zr[0]]=Zr[1]}Gt=typeof k.stops[0][0]}else if(qe==="identity")pt=Rc;else throw new Error('Unknown function type "'+qe+'"');if(ne){for(var Vr={},ua=[],Oa=0;Oa<k.stops.length;Oa++){var Mi=k.stops[Oa],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 Tn={name:"linear"};return{kind:"composite",interpolationType:Tn,interpolationFactor:iu.interpolationFactor.bind(void 0,Tn),zoomStops:$i.map(function(Nn){return Nn[0]}),evaluate:function(So,oo){var go=So.zoom;return bu({stops:$i,base:k.base},C,go).evaluate(go,oo)}}}else if(Re){var Vn=qe==="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(Nn){return Nn[0]}),evaluate:function(Nn){var So=Nn.zoom;return pt(k,C,So,Dt,Gt)}}}else return{kind:"source",evaluate:function(So,oo){var go=oo&&oo.properties?oo.properties[k.property]:void 0;return go===void 0?Iu(k.default,C.default):pt(k,C,go,Dt,Gt)}}}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,ne,xe){var Re=typeof H===xe?ne[H]:void 0;return Iu(Re,k.default,C.default)}function Ic(k,C,H){if(Lo(H)!=="number")return Iu(k.default,C.default);var ne=k.stops.length;if(ne===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[ne-1][0])return k.stops[ne-1][1];var xe=yu(k.stops.map(function(Re){return Re[0]}),H);return k.stops[xe][1]}function bu(k,C,H){var ne=k.base!==void 0?k.base:1;if(Lo(H)!=="number")return Iu(k.default,C.default);var xe=k.stops.length;if(xe===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[xe-1][0])return k.stops[xe-1][1];var Re=yu(k.stops.map(function(Pr){return Pr[0]}),H),qe=Au(H,ne,k.stops[Re][0],k.stops[Re+1][0]),pt=k.stops[Re][1],Dt=k.stops[Re+1][1],Gt=Bu[C.type]||Rs;if(k.colorSpace&&k.colorSpace!=="rgb"){var tr=Lf[k.colorSpace];Gt=function(Pr,Zr){return tr.reverse(tr.interpolate(tr.forward(Pr),tr.forward(Zr),qe))}}return typeof pt.evaluate=="function"?{evaluate:function(){for(var Zr=[],Vr=arguments.length;Vr--;)Zr[Vr]=arguments[Vr];var ua=pt.evaluate.apply(void 0,Zr),Oa=Dt.evaluate.apply(void 0,Zr);if(!(ua===void 0||Oa===void 0))return Gt(ua,Oa,qe)}}:Gt(pt,Dt,qe)}function Rc(k,C,H){return C.type==="color"?H=Fs.parse(H):C.type==="formatted"?H=lu.fromString(H.toString()):C.type==="resolvedImage"?H=Pl.fromString(H.toString()):Lo(H)!==C.type&&(C.type!=="enum"||!C.values[H])&&(H=void 0),Iu(H,k.default,C.default)}function Au(k,C,H,ne){var xe=ne-H,Re=k-H;return xe===0?0:C===1?Re/xe:(Math.pow(C,Re)-1)/(Math.pow(C,xe)-1)}var yc=function(C,H){this.expression=C,this._warningHistory={},this._evaluator=new Es,this._defaultValue=H?Se(H):null,this._enumValues=H&&H.type==="enum"?H.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,H,ne,xe,Re,qe){return this._evaluator.globals=C,this._evaluator.feature=H,this._evaluator.featureState=ne,this._evaluator.canonical=xe,this._evaluator.availableImages=Re||null,this._evaluator.formattedSection=qe,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,H,ne,xe,Re,qe){this._evaluator.globals=C,this._evaluator.feature=H||null,this._evaluator.featureState=ne||null,this._evaluator.canonical=xe,this._evaluator.availableImages=Re||null,this._evaluator.formattedSection=qe||null;try{var pt=this.expression.evaluate(this._evaluator);if(pt==null||typeof pt=="number"&&pt!==pt)return this._defaultValue;if(this._enumValues&&!(pt in this._enumValues))throw new Xs("Expected value to be one of "+Object.keys(this._enumValues).map(function(Dt){return JSON.stringify(Dt)}).join(", ")+", but found "+JSON.stringify(pt)+" instead.");return pt}catch(Dt){return this._warningHistory[Dt.message]||(this._warningHistory[Dt.message]=!0,typeof console<"u"&&console.warn(Dt.message)),this._defaultValue}};function ho(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in yo}function Ro(k,C){var H=new ol(yo,[],C?we(C):void 0),ne=H.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return ne?bs(new yc(ne,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,ne,xe,Re,qe){return this._styleExpression.evaluateWithoutErrorHandling(C,H,ne,xe,Re,qe)},Dc.prototype.evaluate=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluate(C,H,ne,xe,Re,qe)};var lc=function(C,H,ne,xe){this.kind=C,this.zoomStops=ne,this._styleExpression=H,this.isStateDependent=C!=="camera"&&!yl(H.expression),this.interpolationType=xe};lc.prototype.evaluateWithoutErrorHandling=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluateWithoutErrorHandling(C,H,ne,xe,Re,qe)},lc.prototype.evaluate=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluate(C,H,ne,xe,Re,qe)},lc.prototype.interpolationFactor=function(C,H,ne){return this.interpolationType?iu.interpolationFactor(this.interpolationType,C,H,ne):0};function Yu(k,C){if(k=Ro(k,C),k.result==="error")return k;var H=k.value.expression,ne=jf(H);if(!ne&&!_l(C))return Fl([new vs("","data expressions not supported")]);var xe=Lu(H,["zoom"]);if(!xe&&!ll(C))return Fl([new vs("","zoom expressions not supported")]);var Re=ie(H);if(!Re&&!xe)return Fl([new vs("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Re instanceof vs)return Fl([Re]);if(Re instanceof iu&&!Un(C))return Fl([new vs("",'"interpolate" expressions cannot be used with this property')]);if(!Re)return bs(ne?new Dc("constant",k.value):new Dc("source",k.value));var qe=Re instanceof iu?Re.interpolation:void 0;return bs(ne?new lc("camera",k.value,Re.labels,qe):new lc("composite",k.value,Re.labels,qe))}var Ue=function(C,H){this._parameters=C,this._specification=H,_s(this,uu(this._parameters,this._specification))};Ue.deserialize=function(C){return new Ue(C._parameters,C._specification)},Ue.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Ue(k,C);if(ho(k)){var H=Yu(k,C);if(H.result==="error")throw new Error(H.value.map(function(xe){return xe.key+": "+xe.message}).join(", "));return H.value}else{var ne=k;return typeof k=="string"&&C.type==="color"&&(ne=Fs.parse(k)),{kind:"constant",evaluate:function(){return ne}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var H=0,ne=k.args;H<ne.length;H+=1){var xe=ne[H];if(C=ie(xe),C)break}else(k instanceof Tu||k instanceof iu)&&k.input instanceof to&&k.input.name==="zoom"&&(C=k);return C instanceof vs||k.eachChild(function(Re){var qe=ie(Re);qe instanceof vs?C=qe:!C&&qe?C=new vs("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):C&&qe&&C!==qe&&(C=new vs("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),C}function we(k){var C={color:Is,string:ko,number:xn,enum:ko,boolean:bo,formatted:Ts,resolvedImage:js};return k.type==="array"?us(C[k.value]||co,k.length):C[k.type]}function Se(k){return k.type==="color"&&Js(k.default)?new Fs(0,0,0,0):k.type==="color"?Fs.parse(k.default)||null:k.default===void 0?null:k.default}function Be(k){var C=k.key,H=k.value,ne=k.valueSpec||{},xe=k.objectElementValidators||{},Re=k.style,qe=k.styleSpec,pt=[],Dt=Lo(H);if(Dt!=="object")return[new Ln(C,H,"object expected, "+Dt+" found")];for(var Gt in H){var tr=Gt.split(".")[0],Pr=ne[tr]||ne["*"],Zr=void 0;if(xe[tr])Zr=xe[tr];else if(ne[tr])Zr=Ao;else if(xe["*"])Zr=xe["*"];else if(ne["*"])Zr=Ao;else{pt.push(new Ln(C,H[Gt],'unknown property "'+Gt+'"'));continue}pt=pt.concat(Zr({key:(C&&C+".")+Gt,value:H[Gt],valueSpec:Pr,style:Re,styleSpec:qe,object:H,objectKey:Gt},H))}for(var Vr in ne)xe[Vr]||ne[Vr].required&&ne[Vr].default===void 0&&H[Vr]===void 0&&pt.push(new Ln(C,H,'missing required property "'+Vr+'"'));return pt}function dt(k){var C=k.value,H=k.valueSpec,ne=k.style,xe=k.styleSpec,Re=k.key,qe=k.arrayElementValidator||Ao;if(Lo(C)!=="array")return[new Ln(Re,C,"array expected, "+Lo(C)+" found")];if(H.length&&C.length!==H.length)return[new Ln(Re,C,"array length "+H.length+" expected, length "+C.length+" found")];if(H["min-length"]&&C.length<H["min-length"])return[new Ln(Re,C,"array length at least "+H["min-length"]+" expected, length "+C.length+" found")];var pt={type:H.value,values:H.values};xe.$version<7&&(pt.function=H.function),Lo(H.value)==="object"&&(pt=H.value);for(var Dt=[],Gt=0;Gt<C.length;Gt++)Dt=Dt.concat(qe({array:C,arrayIndex:Gt,value:C[Gt],valueSpec:pt,style:ne,styleSpec:xe,key:Re+"["+Gt+"]"}));return Dt}function St(k){var C=k.key,H=k.value,ne=k.valueSpec,xe=Lo(H);return xe==="number"&&H!==H&&(xe="NaN"),xe!=="number"?[new Ln(C,H,"number expected, "+xe+" found")]:"minimum"in ne&&H<ne.minimum?[new Ln(C,H,H+" is less than the minimum value "+ne.minimum)]:"maximum"in ne&&H>ne.maximum?[new Ln(C,H,H+" is greater than the maximum value "+ne.maximum)]:[]}function Nt(k){var C=k.valueSpec,H=Gn(k.value.type),ne,xe={},Re,qe,pt=H!=="categorical"&&k.value.property===void 0,Dt=!pt,Gt=Lo(k.value.stops)==="array"&&Lo(k.value.stops[0])==="array"&&Lo(k.value.stops[0][0])==="object",tr=Be({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Pr,default:ua}});return H==="identity"&&pt&&tr.push(new Ln(k.key,k.value,'missing required property "property"')),H!=="identity"&&!k.value.stops&&tr.push(new Ln(k.key,k.value,'missing required property "stops"')),H==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&tr.push(new Ln(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(Dt&&!_l(k.valueSpec)?tr.push(new Ln(k.key,k.value,"property functions not supported")):pt&&!ll(k.valueSpec)&&tr.push(new Ln(k.key,k.value,"zoom functions not supported"))),(H==="categorical"||Gt)&&k.value.property===void 0&&tr.push(new Ln(k.key,k.value,'"property" property is required')),tr;function Pr(Oa){if(H==="identity")return[new Ln(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Oa.value;return Mi=Mi.concat(dt({key:Oa.key,value:ii,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Zr})),Lo(ii)==="array"&&ii.length===0&&Mi.push(new Ln(Oa.key,ii,"array must have at least one stop")),Mi}function Zr(Oa){var Mi=[],ii=Oa.value,$i=Oa.key;if(Lo(ii)!=="array")return[new Ln($i,ii,"array expected, "+Lo(ii)+" found")];if(ii.length!==2)return[new Ln($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Gt){if(Lo(ii[0])!=="object")return[new Ln($i,ii,"object expected, "+Lo(ii[0])+" found")];if(ii[0].zoom===void 0)return[new Ln($i,ii,"object stop key must have zoom")];if(ii[0].value===void 0)return[new Ln($i,ii,"object stop key must have value")];if(qe&&qe>Gn(ii[0].zoom))return[new Ln($i,ii[0].zoom,"stop zoom values must appear in ascending order")];Gn(ii[0].zoom)!==qe&&(qe=Gn(ii[0].zoom),Re=void 0,xe={}),Mi=Mi.concat(Be({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:St,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ii));return ho(zs(ii[1]))?Mi.concat([new Ln($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(Ao({key:$i+"[1]",value:ii[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ii=Lo(Oa.value),$i=Gn(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!ne)ne=ii;else if(ii!==ne)return[new Ln(Oa.key,Oi,ii+" stop domain type must match previous stop domain type "+ne)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Ln(Oa.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 Ln(Oa.key,Oi,Ji)]}return H==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Ln(Oa.key,Oi,"integer expected, found "+$i)]:H!=="categorical"&&ii==="number"&&Re!==void 0&&$i<Re?[new Ln(Oa.key,Oi,"stop domain values must appear in ascending order")]:(Re=$i,H==="categorical"&&$i in xe?[new Ln(Oa.key,Oi,"stop domain values must be unique")]:(xe[$i]=!0,[]))}function ua(Oa){return Ao({key:Oa.key,value:Oa.value,valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec})}}function $t(k){var C=(k.expressionContext==="property"?Yu:Ro)(zs(k.value),k.valueSpec);if(C.result==="error")return C.value.map(function(ne){return new Ln(""+k.key+ne.key,k.value,ne.message)});var H=C.value.expression||C.value._styleExpression.expression;if(k.expressionContext==="property"&&k.propertyKey==="text-font"&&!H.outputDefined())return[new Ln(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 Ln(k.key,k.value,'"feature-state" data expressions are not supported with layout properties.')];if(k.expressionContext==="filter"&&!yl(H))return[new Ln(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 Ln(k.key,k.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(k.expressionContext==="cluster-initial"&&!jf(H))return[new Ln(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,ne=Lo(C);return ne!=="boolean"?[new Ln(H,C,"boolean expected, "+ne+" found")]:[]}function Ar(k){var C=k.key,H=k.value,ne=Lo(H);return ne!=="string"?[new Ln(C,H,"color expected, "+ne+" found")]:Uc(H)===null?[new Ln(C,H,'color expected, "'+H+'" found')]:[]}function Kr(k){var C=k.key,H=k.value,ne=k.valueSpec,xe=[];return Array.isArray(ne.values)?ne.values.indexOf(Gn(H))===-1&&xe.push(new Ln(C,H,"expected one of ["+ne.values.join(", ")+"], "+JSON.stringify(H)+" found")):Object.keys(ne.values).indexOf(Gn(H))===-1&&xe.push(new Ln(C,H,"expected one of ["+Object.keys(ne.values).join(", ")+"], "+JSON.stringify(H)+" found")),xe}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 ne=H[C];if(!na(ne)&&typeof ne!="boolean")return!1}return!0;default:return!0}}var He={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Je(k){if(k==null)return{filter:function(){return!0},needGeometry:!1};na(k)||(k=Lt(k));var C=Ro(k,He);if(C.result==="error")throw new Error(C.value.map(function(ne){return ne.key+": "+ne.message}).join(", "));var H=vt(k);return{filter:function(ne,xe,Re){return C.value.evaluate(ne,xe,{},Re)},needGeometry:H}}function lt(k,C){return k<C?-1:k>C?1:0}function vt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C<k.length;C++)if(vt(k[C]))return!0;return!1}function Lt(k){if(!k)return!0;var C=k[0];if(k.length<=1)return C!=="any";var H=C==="=="?At(k[1],k[2],"=="):C==="!="?Er(At(k[1],k[2],"==")):C==="<"||C===">"||C==="<="||C===">="?At(k[1],k[2],C):C==="any"?zt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Lt)):C==="none"?["all"].concat(k.slice(1).map(Lt).map(Er)):C==="in"?cr(k[1],k.slice(2)):C==="!in"?Er(cr(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return H}function At(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 zt(k){return["any"].concat(k.map(Lt))}function cr(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(lt)]]:["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 Er(k){return["!",k]}function jr(k){return na(zs(k.value))?$t(_s({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,H=k.key;if(Lo(C)!=="array")return[new Ln(H,C,"array expected, "+Lo(C)+" found")];var ne=k.styleSpec,xe,Re=[];if(C.length<1)return[new Ln(H,C,"filter array must have at least 1 element")];switch(Re=Re.concat(Kr({key:H+"[0]",value:C[0],valueSpec:ne.filter_operator,style:k.style,styleSpec:k.styleSpec})),Gn(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&Gn(C[1])==="$type"&&Re.push(new Ln(H,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Re.push(new Ln(H,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(xe=Lo(C[1]),xe!=="string"&&Re.push(new Ln(H+"[1]",C[1],"string expected, "+xe+" found")));for(var qe=2;qe<C.length;qe++)xe=Lo(C[qe]),Gn(C[1])==="$type"?Re=Re.concat(Kr({key:H+"["+qe+"]",value:C[qe],valueSpec:ne.geometry_type,style:k.style,styleSpec:k.styleSpec})):xe!=="string"&&xe!=="number"&&xe!=="boolean"&&Re.push(new Ln(H+"["+qe+"]",C[qe],"string, number, or boolean expected, "+xe+" found"));break;case"any":case"all":case"none":for(var pt=1;pt<C.length;pt++)Re=Re.concat(Qr({key:H+"["+pt+"]",value:C[pt],style:k.style,styleSpec:k.styleSpec}));break;case"has":case"!has":xe=Lo(C[1]),C.length!==2?Re.push(new Ln(H,C,'filter array for "'+C[0]+'" operator must have 2 elements')):xe!=="string"&&Re.push(new Ln(H+"[1]",C[1],"string expected, "+xe+" found"));break;case"within":xe=Lo(C[1]),C.length!==2?Re.push(new Ln(H,C,'filter array for "'+C[0]+'" operator must have 2 elements')):xe!=="object"&&Re.push(new Ln(H+"[1]",C[1],"object expected, "+xe+" found"));break}return Re}function pa(k,C){var H=k.key,ne=k.style,xe=k.styleSpec,Re=k.value,qe=k.objectKey,pt=xe[C+"_"+k.layerType];if(!pt)return[];var Dt=qe.match(/^(.*)-transition$/);if(C==="paint"&&Dt&&pt[Dt[1]]&&pt[Dt[1]].transition)return Ao({key:H,value:Re,valueSpec:xe.transition,style:ne,styleSpec:xe});var Gt=k.valueSpec||pt[qe];if(!Gt)return[new Ln(H,Re,'unknown property "'+qe+'"')];var tr;if(Lo(Re)==="string"&&_l(Gt)&&!Gt.tokens&&(tr=/^{([^}]+)}$/.exec(Re)))return[new Ln(H,Re,'"'+qe+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(tr[1])+" }`.")];var Pr=[];return k.layerType==="symbol"&&(qe==="text-field"&&ne&&!ne.glyphs&&Pr.push(new Ln(H,Re,'use of "text-field" requires a style "glyphs" property')),qe==="text-font"&&Js(zs(Re))&&Gn(Re.type)==="identity"&&Pr.push(new Ln(H,Re,'"text-font" does not support identity functions'))),Pr.concat(Ao({key:k.key,value:Re,valueSpec:Gt,style:ne,styleSpec:xe,expressionContext:"property",propertyType:C,propertyKey:qe}))}function Aa(k){return pa(k,"paint")}function za(k){return pa(k,"layout")}function ci(k){var C=[],H=k.value,ne=k.key,xe=k.style,Re=k.styleSpec;!H.type&&!H.ref&&C.push(new Ln(ne,H,'either "type" or "ref" is required'));var qe=Gn(H.type),pt=Gn(H.ref);if(H.id)for(var Dt=Gn(H.id),Gt=0;Gt<k.arrayIndex;Gt++){var tr=xe.layers[Gt];Gn(tr.id)===Dt&&C.push(new Ln(ne,H.id,'duplicate layer id "'+H.id+'", previously used at line '+tr.id.__line__))}if("ref"in H){["type","source","source-layer","filter","layout"].forEach(function(ua){ua in H&&C.push(new Ln(ne,H[ua],'"'+ua+'" is prohibited for ref layers'))});var Pr;xe.layers.forEach(function(ua){Gn(ua.id)===pt&&(Pr=ua)}),Pr?Pr.ref?C.push(new Ln(ne,H.ref,"ref cannot reference another ref layer")):qe=Gn(Pr.type):C.push(new Ln(ne,H.ref,'ref layer "'+pt+'" not found'))}else if(qe!=="background")if(!H.source)C.push(new Ln(ne,H,'missing required property "source"'));else{var Zr=xe.sources&&xe.sources[H.source],Vr=Zr&&Gn(Zr.type);Zr?Vr==="vector"&&qe==="raster"?C.push(new Ln(ne,H.source,'layer "'+H.id+'" requires a raster source')):Vr==="raster"&&qe!=="raster"?C.push(new Ln(ne,H.source,'layer "'+H.id+'" requires a vector source')):Vr==="vector"&&!H["source-layer"]?C.push(new Ln(ne,H,'layer "'+H.id+'" must specify a "source-layer"')):Vr==="raster-dem"&&qe!=="hillshade"?C.push(new Ln(ne,H.source,"raster-dem source can only be used with layer type 'hillshade'.")):qe==="line"&&H.paint&&H.paint["line-gradient"]&&(Vr!=="geojson"||!Zr.lineMetrics)&&C.push(new Ln(ne,H,'layer "'+H.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):C.push(new Ln(ne,H.source,'source "'+H.source+'" not found'))}return C=C.concat(Be({key:ne,value:H,valueSpec:Re.layer,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Ao({key:ne+".type",value:H.type,valueSpec:Re.layer.type,style:k.style,styleSpec:k.styleSpec,object:H,objectKey:"type"})},filter:jr,layout:function(Oa){return Be({layer:H,key:Oa.key,value:Oa.value,style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{"*":function(ii){return za(_s({layerType:qe},ii))}}})},paint:function(Oa){return Be({layer:H,key:Oa.key,value:Oa.value,style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{"*":function(ii){return Aa(_s({layerType:qe},ii))}}})}}})),C}function Vi(k){var C=k.value,H=k.key,ne=Lo(C);return ne!=="string"?[new Ln(H,C,"string expected, "+ne+" found")]:[]}var ji={promoteId:Sn};function nn(k){var C=k.value,H=k.key,ne=k.styleSpec,xe=k.style;if(!C.type)return[new Ln(H,C,'"type" is required')];var Re=Gn(C.type),qe;switch(Re){case"vector":case"raster":case"raster-dem":return qe=Be({key:H,value:C,valueSpec:ne["source_"+Re.replace("-","_")],style:k.style,styleSpec:ne,objectElementValidators:ji}),qe;case"geojson":if(qe=Be({key:H,value:C,valueSpec:ne.source_geojson,style:xe,styleSpec:ne,objectElementValidators:ji}),C.cluster)for(var pt in C.clusterProperties){var Dt=C.clusterProperties[pt],Gt=Dt[0],tr=Dt[1],Pr=typeof Gt=="string"?[Gt,["accumulated"],["get",pt]]:Gt;qe.push.apply(qe,$t({key:H+"."+pt+".map",value:tr,expressionContext:"cluster-map"})),qe.push.apply(qe,$t({key:H+"."+pt+".reduce",value:Pr,expressionContext:"cluster-reduce"}))}return qe;case"video":return Be({key:H,value:C,valueSpec:ne.source_video,style:xe,styleSpec:ne});case"image":return Be({key:H,value:C,valueSpec:ne.source_image,style:xe,styleSpec:ne});case"canvas":return[new Ln(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:xe,styleSpec:ne})}}function Sn(k){var C=k.key,H=k.value;if(Lo(H)==="string")return Vi({key:C,value:H});var ne=[];for(var xe in H)ne.push.apply(ne,Vi({key:C+"."+xe,value:H[xe]}));return ne}function Kn(k){var C=k.value,H=k.styleSpec,ne=H.light,xe=k.style,Re=[],qe=Lo(C);if(C===void 0)return Re;if(qe!=="object")return Re=Re.concat([new Ln("light",C,"object expected, "+qe+" found")]),Re;for(var pt in C){var Dt=pt.match(/^(.*)-transition$/);Dt&&ne[Dt[1]]&&ne[Dt[1]].transition?Re=Re.concat(Ao({key:pt,value:C[pt],valueSpec:H.transition,style:xe,styleSpec:H})):ne[pt]?Re=Re.concat(Ao({key:pt,value:C[pt],valueSpec:ne[pt],style:xe,styleSpec:H})):Re=Re.concat([new Ln(pt,C[pt],'unknown property "'+pt+'"')])}return Re}function Bn(k){return Vi(k).length===0?[]:$t(k)}function wo(k){return Vi(k).length===0?[]:$t(k)}var is={"*":function(){return[]},array:dt,boolean:Tr,number:St,color:Ar,constants:Us,enum:Kr,filter:jr,function:Nt,layer:ci,object:Be,source:nn,light:Kn,string:Vi,formatted:Bn,resolvedImage:wo};function Ao(k){var C=k.value,H=k.valueSpec,ne=k.styleSpec;if(H.expression&&Js(Gn(C)))return Nt(k);if(H.expression&&ho(zs(C)))return $t(k);if(H.type&&is[H.type])return is[H.type](k);var xe=Be(_s({},k,{valueSpec:H.type?ne[H.type]:H}));return xe}function Zo(k){var C=k.value,H=k.key,ne=Vi(k);return ne.length||(C.indexOf("{fontstack}")===-1&&ne.push(new Ln(H,C,'"glyphs" url must include a "{fontstack}" token')),C.indexOf("{range}")===-1&&ne.push(new Ln(H,C,'"glyphs" url must include a "{range}" token'))),ne}function ps(k,C){C===void 0&&(C=Gi);var H=[];return H=H.concat(Ao({key:"",value:k,valueSpec:C.$root,styleSpec:C,style:k,objectElementValidators:{glyphs:Zo,"*":function(){return[]}}})),k.constants&&(H=H.concat(Us({key:"constants",value:k.constants,style:k,styleSpec:C}))),ul(H)}ps.source=tl(nn),ps.light=tl(Kn),ps.layer=tl(ci),ps.filter=tl(jr),ps.paintProperty=tl(Aa),ps.layoutProperty=tl(za);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=ps,$o=Jo.light,Il=Jo.paintProperty,eu=Jo.layoutProperty;function Ru(k,C){var H=!1;if(C&&C.length)for(var ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne];k.fire(new Cr(new Error(Re.message))),H=!0}return H}var vu=cu,Tl=3;function cu(k,C,H){var ne=this.cells=[];if(k instanceof ArrayBuffer){this.arrayBuffer=k;var xe=new Int32Array(this.arrayBuffer);k=xe[0],C=xe[1],H=xe[2],this.d=C+2*H;for(var Re=0;Re<this.d*this.d;Re++){var qe=xe[Tl+Re],pt=xe[Tl+Re+1];ne.push(qe===pt?null:xe.subarray(qe,pt))}var Dt=xe[Tl+ne.length],Gt=xe[Tl+ne.length+1];this.keys=xe.subarray(Dt,Gt),this.bboxes=xe.subarray(Gt),this.insert=this._insertReadonly}else{this.d=C+2*H;for(var tr=0;tr<this.d*this.d;tr++)ne.push([]);this.keys=[],this.bboxes=[]}this.n=C,this.extent=k,this.padding=H,this.scale=C/k,this.uid=0;var Pr=H/C*k;this.min=-Pr,this.max=k+Pr}cu.prototype.insert=function(k,C,H,ne,xe){this._forEachCell(C,H,ne,xe,this._insertCell,this.uid++),this.keys.push(k),this.bboxes.push(C),this.bboxes.push(H),this.bboxes.push(ne),this.bboxes.push(xe)},cu.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},cu.prototype._insertCell=function(k,C,H,ne,xe,Re){this.cells[xe].push(Re)},cu.prototype.query=function(k,C,H,ne,xe){var Re=this.min,qe=this.max;if(k<=Re&&C<=Re&&qe<=H&&qe<=ne&&!xe)return Array.prototype.slice.call(this.keys);var pt=[],Dt={};return this._forEachCell(k,C,H,ne,this._queryCell,pt,Dt,xe),pt},cu.prototype._queryCell=function(k,C,H,ne,xe,Re,qe,pt){var Dt=this.cells[xe];if(Dt!==null)for(var Gt=this.keys,tr=this.bboxes,Pr=0;Pr<Dt.length;Pr++){var Zr=Dt[Pr];if(qe[Zr]===void 0){var Vr=Zr*4;(pt?pt(tr[Vr+0],tr[Vr+1],tr[Vr+2],tr[Vr+3]):k<=tr[Vr+2]&&C<=tr[Vr+3]&&H>=tr[Vr+0]&&ne>=tr[Vr+1])?(qe[Zr]=!0,Re.push(Gt[Zr])):qe[Zr]=!1}}},cu.prototype._forEachCell=function(k,C,H,ne,xe,Re,qe,pt){for(var Dt=this._convertToCellCoord(k),Gt=this._convertToCellCoord(C),tr=this._convertToCellCoord(H),Pr=this._convertToCellCoord(ne),Zr=Dt;Zr<=tr;Zr++)for(var Vr=Gt;Vr<=Pr;Vr++){var ua=this.d*Vr+Zr;if(!(pt&&!pt(this._convertFromCellCoord(Zr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Zr+1),this._convertFromCellCoord(Vr+1)))&&xe.call(this,k,C,H,ne,ua,Re,qe,pt))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,ne=0;ne<this.cells.length;ne++)H+=this.cells[ne].length;var xe=new Int32Array(C+H+this.keys.length+this.bboxes.length);xe[0]=this.extent,xe[1]=this.n,xe[2]=this.padding;for(var Re=C,qe=0;qe<k.length;qe++){var pt=k[qe];xe[Tl+qe]=Re,xe.set(pt,Re),Re+=pt.length}return xe[Tl+k.length]=Re,xe.set(this.keys,Re),Re+=this.keys.length,xe[Tl+k.length+1]=Re,xe.set(this.bboxes,Re),Re+=this.bboxes.length,xe.buffer};var uc=s.ImageData,Vl=s.ImageBitmap,Gl={};function de(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||[]}}de("Object",Object),vu.serialize=function(C,H){var ne=C.toArrayBuffer();return H&&H.push(ne),{buffer:ne}},vu.deserialize=function(C){return new vu(C.buffer)},de("Grid",vu),de("Color",Fs),de("Error",Error),de("ResolvedImage",Pl),de("StylePropertyFunction",Ue),de("StyleExpression",yc,{omit:["_evaluator"]}),de("ZoomDependentExpression",lc),de("ZoomConstantExpression",Dc),de("CompoundExpression",to,{omit:["_evaluate"]});for(var Fe in yo)yo[Fe]._classRegistryKey||de("Expression_"+Fe,yo[Fe]);function et(k){return k&&typeof ArrayBuffer<"u"&&(k instanceof ArrayBuffer||k.constructor&&k.constructor.name==="ArrayBuffer")}function mt(k){return Vl&&k instanceof Vl}function bt(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)||mt(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 ne=[],xe=0,Re=k;xe<Re.length;xe+=1){var qe=Re[xe];ne.push(bt(qe,C))}return ne}if(typeof k=="object"){var pt=k.constructor,Dt=pt._classRegistryKey;if(!Dt)throw new Error("can't serialize object of unregistered class");var Gt=pt.serialize?pt.serialize(k,C):{};if(!pt.serialize){for(var tr in k)if(k.hasOwnProperty(tr)&&!(Gl[Dt].omit.indexOf(tr)>=0)){var Pr=k[tr];Gt[tr]=Gl[Dt].shallow.indexOf(tr)>=0?Pr:bt(Pr,C)}k instanceof Error&&(Gt.message=k.message)}if(Gt.$name)throw new Error("$name property is reserved for worker serialization logic.");return Dt!=="Object"&&(Gt.$name=Dt),Gt}throw new Error("can't serialize object of type "+typeof k)}function Mt(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)||mt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Mt);if(typeof k=="object"){var C=k.$name||"Object",H=Gl[C],ne=H.klass;if(!ne)throw new Error("can't deserialize unregistered class "+C);if(ne.deserialize)return ne.deserialize(k);for(var xe=Object.create(ne.prototype),Re=0,qe=Object.keys(k);Re<qe.length;Re+=1){var pt=qe[Re];if(pt!=="$name"){var Dt=k[pt];xe[pt]=Gl[C].shallow.indexOf(pt)>=0?Dt:Mt(Dt)}}return xe}throw new Error("can't deserialize object of type "+typeof k)}var ar=function(){this.first=!0};ar.prototype.update=function(C,H){var ne=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=ne,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=ne,!0):(this.lastFloorZoom>ne?(this.lastIntegerZoom=ne+1,this.lastIntegerZoomTime=H):this.lastFloorZoom<ne&&(this.lastIntegerZoom=ne,this.lastIntegerZoomTime=H),C!==this.lastZoom?(this.lastZoom=C,this.lastFloorZoom=ne,!0):!1)};var Ot={"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 ne=H[C];if(da(ne.charCodeAt(0)))return!0}return!1}function Gr(k){for(var C=0,H=k;C<H.length;C+=1){var ne=H[C];if(!Xr(ne.charCodeAt(0)))return!1}return!0}function Xr(k){return!(Ot.Arabic(k)||Ot["Arabic Supplement"](k)||Ot["Arabic Extended-A"](k)||Ot["Arabic Presentation Forms-A"](k)||Ot["Arabic Presentation Forms-B"](k))}function xa(k){return k<11904?!1:!!(Ot["Bopomofo Extended"](k)||Ot.Bopomofo(k)||Ot["CJK Compatibility Forms"](k)||Ot["CJK Compatibility Ideographs"](k)||Ot["CJK Compatibility"](k)||Ot["CJK Radicals Supplement"](k)||Ot["CJK Strokes"](k)||Ot["CJK Symbols and Punctuation"](k)||Ot["CJK Unified Ideographs Extension A"](k)||Ot["CJK Unified Ideographs"](k)||Ot["Enclosed CJK Letters and Months"](k)||Ot["Halfwidth and Fullwidth Forms"](k)||Ot.Hiragana(k)||Ot["Ideographic Description Characters"](k)||Ot["Kangxi Radicals"](k)||Ot["Katakana Phonetic Extensions"](k)||Ot.Katakana(k)||Ot["Vertical Forms"](k)||Ot["Yi Radicals"](k)||Ot["Yi Syllables"](k))}function da(k){return k===746||k===747?!0:k<4352?!1:!!(Ot["Bopomofo Extended"](k)||Ot.Bopomofo(k)||Ot["CJK Compatibility Forms"](k)&&!(k>=65097&&k<=65103)||Ot["CJK Compatibility Ideographs"](k)||Ot["CJK Compatibility"](k)||Ot["CJK Radicals Supplement"](k)||Ot["CJK Strokes"](k)||Ot["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||Ot["CJK Unified Ideographs Extension A"](k)||Ot["CJK Unified Ideographs"](k)||Ot["Enclosed CJK Letters and Months"](k)||Ot["Hangul Compatibility Jamo"](k)||Ot["Hangul Jamo Extended-A"](k)||Ot["Hangul Jamo Extended-B"](k)||Ot["Hangul Jamo"](k)||Ot["Hangul Syllables"](k)||Ot.Hiragana(k)||Ot["Ideographic Description Characters"](k)||Ot.Kanbun(k)||Ot["Kangxi Radicals"](k)||Ot["Katakana Phonetic Extensions"](k)||Ot.Katakana(k)&&k!==12540||Ot["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)||Ot["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||Ot["Unified Canadian Aboriginal Syllabics"](k)||Ot["Unified Canadian Aboriginal Syllabics Extended"](k)||Ot["Vertical Forms"](k)||Ot["Yijing Hexagram Symbols"](k)||Ot["Yi Syllables"](k)||Ot["Yi Radicals"](k))}function Ja(k){return!!(Ot["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||Ot["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)||Ot["Letterlike Symbols"](k)||Ot["Number Forms"](k)||Ot["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)||Ot["Control Pictures"](k)&&k!==9251||Ot["Optical Character Recognition"](k)||Ot["Enclosed Alphanumerics"](k)||Ot["Geometric Shapes"](k)||Ot["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||Ot["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||Ot["CJK Symbols and Punctuation"](k)||Ot.Katakana(k)||Ot["Private Use Area"](k)||Ot["CJK Compatibility Forms"](k)||Ot["Small Form Variants"](k)||Ot["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!(da(k)||Ja(k))}function Sa(k){return Ot.Arabic(k)||Ot["Arabic Supplement"](k)||Ot["Arabic Extended-A"](k)||Ot["Arabic Presentation Forms-A"](k)||Ot["Arabic Presentation Forms-B"](k)}function Fa(k){return k>=1424&&k<=2303||Ot["Arabic Presentation Forms-A"](k)||Ot["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&Fa(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||Ot.Khmer(k))}function fi(k){for(var C=0,H=k;C<H.length;C+=1){var ne=H[C];if(Fa(ne.charCodeAt(0)))return!0}return!1}function ni(k,C){for(var H=0,ne=k;H<ne.length;H+=1){var xe=ne[H];if(!Xa(xe.charCodeAt(0),C))return!1}return!0}var La={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},sn=null,rn=La.unavailable,vn=null,Pn=function(k){k&&typeof k=="string"&&k.indexOf("NetworkError")>-1&&(rn=La.error),sn&&sn(k)};function Jn(){ro.fire(new Br("pluginStateChange",{pluginStatus:rn,pluginURL:vn}))}var ro=new xr,Yo=function(){return rn},io=function(k){return k({pluginStatus:rn,pluginURL:vn}),ro.on("pluginStateChange",k),k},Ho=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.");vn=be.resolveURL(k),rn=La.deferred,sn=C,Jn(),H||cl()},cl=function(){if(rn!==La.deferred||!vn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");rn=La.loading,Jn(),vn&&ra({url:vn},function(k){k?Pn(k):(rn=La.loaded,Jn())})},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,vn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return vn}},xl=function(){!al.isLoading()&&!al.isLoaded()&&Yo()==="deferred"&&cl()},gn=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 ar,this.transition={})};gn.prototype.isSupportedScript=function(C){return ni(C,al.isLoaded())},gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},gn.prototype.getCrossfadeParameters=function(){var C=this.zoom,H=C-Math.floor(C),ne=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:H+(1-H)*ne}:{fromScale:.5,toScale:1,t:1-(1-ne)*H}};var vo=function(C,H){this.property=C,this.value=H,this.expression=I(H===void 0?C.specification.default:H,C.specification)};vo.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},vo.prototype.possiblyEvaluate=function(C,H,ne){return this.property.possiblyEvaluate(this,C,H,ne)};var cs=function(C){this.property=C,this.value=new vo(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 ms=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};ms.prototype.getValue=function(C){return O(this._values[C].value.value)},ms.prototype.setValue=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].value=new vo(this._values[C].property,H===null?void 0:O(H))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.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},ms.prototype.serialize=function(){for(var C={},H=0,ne=Object.keys(this._values);H<ne.length;H+=1){var xe=ne[H],Re=this.getValue(xe);Re!==void 0&&(C[xe]=Re);var qe=this.getTransition(xe);qe!==void 0&&(C[xe+"-transition"]=qe)}return C},ms.prototype.transitioned=function(C,H){for(var ne=new Hl(this._properties),xe=0,Re=Object.keys(this._values);xe<Re.length;xe+=1){var qe=Re[xe];ne._values[qe]=this._values[qe].transitioned(C,H._values[qe])}return ne},ms.prototype.untransitioned=function(){for(var C=new Hl(this._properties),H=0,ne=Object.keys(this._values);H<ne.length;H+=1){var xe=ne[H];C._values[xe]=this._values[xe].untransitioned()}return C};var Al=function(C,H,ne,xe,Re){this.property=C,this.value=H,this.begin=Re+xe.delay||0,this.end=this.begin+xe.duration||0,C.specification.transition&&(xe.delay||xe.duration)&&(this.prior=ne)};Al.prototype.possiblyEvaluate=function(C,H,ne){var xe=C.now||0,Re=this.value.possiblyEvaluate(C,H,ne),qe=this.prior;if(qe){if(xe>this.end)return this.prior=null,Re;if(this.value.isDataDriven())return this.prior=null,Re;if(xe<this.begin)return qe.possiblyEvaluate(C,H,ne);var pt=(xe-this.begin)/(this.end-this.begin);return this.property.interpolate(qe.possiblyEvaluate(C,H,ne),Re,m(pt))}else return Re};var Hl=function(C){this._properties=C,this._values=Object.create(C.defaultTransitioningPropertyValues)};Hl.prototype.possiblyEvaluate=function(C,H,ne){for(var xe=new _c(this._properties),Re=0,qe=Object.keys(this._values);Re<qe.length;Re+=1){var pt=qe[Re];xe._values[pt]=this._values[pt].possiblyEvaluate(C,H,ne)}return xe},Hl.prototype.hasTransition=function(){for(var C=0,H=Object.keys(this._values);C<H.length;C+=1){var ne=H[C];if(this._values[ne].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 vo(this._values[C].property,H===null?void 0:O(H))},Su.prototype.serialize=function(){for(var C={},H=0,ne=Object.keys(this._values);H<ne.length;H+=1){var xe=ne[H],Re=this.getValue(xe);Re!==void 0&&(C[xe]=Re)}return C},Su.prototype.possiblyEvaluate=function(C,H,ne){for(var xe=new _c(this._properties),Re=0,qe=Object.keys(this._values);Re<qe.length;Re+=1){var pt=qe[Re];xe._values[pt]=this._values[pt].possiblyEvaluate(C,H,ne)}return xe};var Rl=function(C,H,ne){this.property=C,this.value=H,this.parameters=ne};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,ne,xe){return this.property.evaluate(this.value,this.parameters,C,H,ne,xe)};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,ne){var xe=Bu[this.specification.type];return xe?xe(C,H,ne):C};var Zt=function(C,H){this.specification=C,this.overrides=H};Zt.prototype.possiblyEvaluate=function(C,H,ne,xe){return C.expression.kind==="constant"||C.expression.kind==="camera"?new Rl(this,{kind:"constant",value:C.expression.evaluate(H,null,{},ne,xe)},H):new Rl(this,C.expression,H)},Zt.prototype.interpolate=function(C,H,ne){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 xe=Bu[this.specification.type];return xe?new Rl(this,{kind:"constant",value:xe(C.value.value,H.value.value,ne)},C.parameters):C},Zt.prototype.evaluate=function(C,H,ne,xe,Re,qe){return C.kind==="constant"?C.value:C.evaluate(H,ne,xe,Re,qe)};var fr=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(ne,xe,Re,qe){if(ne.value===void 0)return new Rl(this,{kind:"constant",value:void 0},xe);if(ne.expression.kind==="constant"){var pt=ne.expression.evaluate(xe,null,{},Re,qe),Dt=ne.property.specification.type==="resolvedImage",Gt=Dt&&typeof pt!="string"?pt.name:pt,tr=this._calculate(Gt,Gt,Gt,xe);return new Rl(this,{kind:"constant",value:tr},xe)}else if(ne.expression.kind==="camera"){var Pr=this._calculate(ne.expression.evaluate({zoom:xe.zoom-1}),ne.expression.evaluate({zoom:xe.zoom}),ne.expression.evaluate({zoom:xe.zoom+1}),xe);return new Rl(this,{kind:"constant",value:Pr},xe)}else return new Rl(this,ne.expression,xe)},C.prototype.evaluate=function(ne,xe,Re,qe,pt,Dt){if(ne.kind==="source"){var Gt=ne.evaluate(xe,Re,qe,pt,Dt);return this._calculate(Gt,Gt,Gt,xe)}else return ne.kind==="composite"?this._calculate(ne.evaluate({zoom:Math.floor(xe.zoom)-1},Re,qe),ne.evaluate({zoom:Math.floor(xe.zoom)},Re,qe),ne.evaluate({zoom:Math.floor(xe.zoom)+1},Re,qe),xe):ne.value},C.prototype._calculate=function(ne,xe,Re,qe){var pt=qe.zoom;return pt>qe.zoomHistory.lastIntegerZoom?{from:ne,to:xe}:{from:Re,to:xe}},C.prototype.interpolate=function(ne){return ne},C}(Zt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,H,ne,xe){if(C.value!==void 0)if(C.expression.kind==="constant"){var Re=C.expression.evaluate(H,null,{},ne,xe);return this._calculate(Re,Re,Re,H)}else return this._calculate(C.expression.evaluate(new gn(Math.floor(H.zoom-1),H)),C.expression.evaluate(new gn(Math.floor(H.zoom),H)),C.expression.evaluate(new gn(Math.floor(H.zoom+1),H)),H)},oa.prototype._calculate=function(C,H,ne,xe){var Re=xe.zoom;return Re>xe.zoomHistory.lastIntegerZoom?{from:C,to:H}:{from:ne,to:H}},oa.prototype.interpolate=function(C){return C};var wa=function(C){this.specification=C};wa.prototype.possiblyEvaluate=function(C,H,ne,xe){return!!C.expression.evaluate(H,null,{},ne,xe)},wa.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var H in C){var ne=C[H];ne.specification.overridable&&this.overridableProperties.push(H);var xe=this.defaultPropertyValues[H]=new vo(ne,void 0),Re=this.defaultTransitionablePropertyValues[H]=new cs(ne);this.defaultTransitioningPropertyValues[H]=Re.untransitioned(),this.defaultPossiblyEvaluatedValues[H]=xe.possiblyEvaluate({})}};de("DataDrivenProperty",Zt),de("DataConstantProperty",it),de("CrossFadedDataDrivenProperty",fr),de("CrossFadedProperty",oa),de("ColorRampProperty",wa);var _a="-transition",Ya=function(k){function C(H,ne){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),ne.layout&&(this._unevaluatedLayout=new Su(ne.layout)),ne.paint)){this._transitionablePaint=new ms(ne.paint);for(var xe in H.paint)this.setPaintProperty(xe,H.paint[xe],{validate:!1});for(var Re in H.layout)this.setLayoutProperty(Re,H.layout[Re],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(ne.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(ne){return ne==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ne)},C.prototype.setLayoutProperty=function(ne,xe,Re){if(Re===void 0&&(Re={}),xe!=null){var qe="layers."+this.id+".layout."+ne;if(this._validate(eu,qe,ne,xe,Re))return}if(ne==="visibility"){this.visibility=xe;return}this._unevaluatedLayout.setValue(ne,xe)},C.prototype.getPaintProperty=function(ne){return z(ne,_a)?this._transitionablePaint.getTransition(ne.slice(0,-_a.length)):this._transitionablePaint.getValue(ne)},C.prototype.setPaintProperty=function(ne,xe,Re){if(Re===void 0&&(Re={}),xe!=null){var qe="layers."+this.id+".paint."+ne;if(this._validate(Il,qe,ne,xe,Re))return!1}if(z(ne,_a))return this._transitionablePaint.setTransition(ne.slice(0,-_a.length),xe||void 0),!1;var pt=this._transitionablePaint._values[ne],Dt=pt.property.specification["property-type"]==="cross-faded-data-driven",Gt=pt.value.isDataDriven(),tr=pt.value;this._transitionablePaint.setValue(ne,xe),this._handleSpecialPaintPropertyUpdate(ne);var Pr=this._transitionablePaint._values[ne].value,Zr=Pr.isDataDriven();return Zr||Gt||Dt||this._handleOverridablePaintPropertyUpdate(ne,tr,Pr)},C.prototype._handleSpecialPaintPropertyUpdate=function(ne){},C.prototype._handleOverridablePaintPropertyUpdate=function(ne,xe,Re){return!1},C.prototype.isHidden=function(ne){return this.minzoom&&ne<this.minzoom||this.maxzoom&&ne>=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(ne){this._transitioningPaint=this._transitionablePaint.transitioned(ne,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(ne,xe){ne.getCrossfadeParameters&&(this._crossfadeParameters=ne.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ne,void 0,xe)),this.paint=this._transitioningPaint.possiblyEvaluate(ne,void 0,xe)},C.prototype.serialize=function(){var ne={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&&(ne.layout=ne.layout||{},ne.layout.visibility=this.visibility),N(ne,function(xe,Re){return xe!==void 0&&!(Re==="layout"&&!Object.keys(xe).length)&&!(Re==="paint"&&!Object.keys(xe).length)})},C.prototype._validate=function(ne,xe,Re,qe,pt){return pt===void 0&&(pt={}),pt&&pt.validate===!1?!1:Ru(this,ne.call(Jo,{key:xe,layerType:this.type,objectKey:Re,value:qe,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 ne in this.paint._values){var xe=this.paint.get(ne);if(!(!(xe instanceof Rl)||!_l(xe.property.specification))&&(xe.value.kind==="source"||xe.value.kind==="composite")&&xe.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,yn=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*yn),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,ne=0,xe=k.map(function(qe){var pt=Na(qe.type),Dt=H=ea(H,Math.max(C,pt)),Gt=qe.components||1;return ne=Math.max(ne,pt),H+=pt*Gt,{name:qe.name,type:qe.type,components:Gt,offset:Dt}}),Re=ea(H,Math.max(ne,C));return{members:xe,size:Re,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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.int16[qe+0]=xe,this.int16[qe+1]=Re,ne},C}(zi);Ma.prototype.bytesPerElement=4,de("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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*4;return this.int16[Dt+0]=xe,this.int16[Dt+1]=Re,this.int16[Dt+2]=qe,this.int16[Dt+3]=pt,ne},C}(zi);Qa.prototype.bytesPerElement=8,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.int16[tr+2]=qe,this.int16[tr+3]=pt,this.int16[tr+4]=Dt,this.int16[tr+5]=Gt,ne},C}(zi);di.prototype.bytesPerElement=12,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*4,Pr=ne*8;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.uint8[Pr+4]=qe,this.uint8[Pr+5]=pt,this.uint8[Pr+6]=Dt,this.uint8[Pr+7]=Gt,ne},C}(zi);Va.prototype.bytesPerElement=8,de("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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.float32[qe+0]=xe,this.float32[qe+1]=Re,ne},C}(zi);Bi.prototype.bytesPerElement=8,de("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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr){var ua=ne*10;return this.uint16[ua+0]=xe,this.uint16[ua+1]=Re,this.uint16[ua+2]=qe,this.uint16[ua+3]=pt,this.uint16[ua+4]=Dt,this.uint16[ua+5]=Gt,this.uint16[ua+6]=tr,this.uint16[ua+7]=Pr,this.uint16[ua+8]=Zr,this.uint16[ua+9]=Vr,ne},C}(zi);Li.prototype.bytesPerElement=20,de("StructArrayLayout10ui20",Li);var pn=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa){var Mi=ne*12;return this.int16[Mi+0]=xe,this.int16[Mi+1]=Re,this.int16[Mi+2]=qe,this.int16[Mi+3]=pt,this.uint16[Mi+4]=Dt,this.uint16[Mi+5]=Gt,this.uint16[Mi+6]=tr,this.uint16[Mi+7]=Pr,this.int16[Mi+8]=Zr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Oa,ne},C}(zi);pn.prototype.bytesPerElement=24,de("StructArrayLayout4i4ui4i24",pn);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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.float32[pt+0]=xe,this.float32[pt+1]=Re,this.float32[pt+2]=qe,ne},C}(zi);Ha.prototype.bytesPerElement=12,de("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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.uint32[Re+0]=xe,ne},C}(zi);Ua.prototype.bytesPerElement=4,de("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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){var Vr=ne*10,ua=ne*5;return this.int16[Vr+0]=xe,this.int16[Vr+1]=Re,this.int16[Vr+2]=qe,this.int16[Vr+3]=pt,this.int16[Vr+4]=Dt,this.int16[Vr+5]=Gt,this.uint32[ua+3]=tr,this.uint16[Vr+8]=Pr,this.uint16[Vr+9]=Zr,ne},C}(zi);Yi.prototype.bytesPerElement=20,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.int16[tr+2]=qe,this.int16[tr+3]=pt,this.int16[tr+4]=Dt,this.int16[tr+5]=Gt,ne},C}(zi);Ri.prototype.bytesPerElement=12,de("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(ne,xe,Re,qe,pt){var Dt=this.length;return this.resize(Dt+1),this.emplace(Dt,ne,xe,Re,qe,pt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt){var Gt=ne*4,tr=ne*8;return this.float32[Gt+0]=xe,this.float32[Gt+1]=Re,this.float32[Gt+2]=qe,this.int16[tr+6]=pt,this.int16[tr+7]=Dt,ne},C}(zi);Ti.prototype.bytesPerElement=16,de("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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*12,Gt=ne*3;return this.uint8[Dt+0]=xe,this.uint8[Dt+1]=Re,this.float32[Gt+1]=qe,this.float32[Gt+2]=pt,ne},C}(zi);xi.prototype.bytesPerElement=12,de("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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.uint16[pt+0]=xe,this.uint16[pt+1]=Re,this.uint16[pt+2]=qe,ne},C}(zi);Xi.prototype.bytesPerElement=6,de("StructArrayLayout3ui6",Xi);var mn=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji){var ln=ne*24,Tn=ne*12,Vn=ne*48;return this.int16[ln+0]=xe,this.int16[ln+1]=Re,this.uint16[ln+2]=qe,this.uint16[ln+3]=pt,this.uint32[Tn+2]=Dt,this.uint32[Tn+3]=Gt,this.uint32[Tn+4]=tr,this.uint16[ln+10]=Pr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[Tn+7]=ua,this.float32[Tn+8]=Oa,this.uint8[Vn+36]=Mi,this.uint8[Vn+37]=ii,this.uint8[Vn+38]=$i,this.uint32[Tn+10]=Oi,this.int16[ln+22]=Ji,ne},C}(zi);mn.prototype.bytesPerElement=48,de("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",mn);var In=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po){var $s=this.length;return this.resize($s+1),this.emplace($s,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po,$s){var ws=ne*34,Xl=ne*17;return this.int16[ws+0]=xe,this.int16[ws+1]=Re,this.int16[ws+2]=qe,this.int16[ws+3]=pt,this.int16[ws+4]=Dt,this.int16[ws+5]=Gt,this.int16[ws+6]=tr,this.int16[ws+7]=Pr,this.uint16[ws+8]=Zr,this.uint16[ws+9]=Vr,this.uint16[ws+10]=ua,this.uint16[ws+11]=Oa,this.uint16[ws+12]=Mi,this.uint16[ws+13]=ii,this.uint16[ws+14]=$i,this.uint16[ws+15]=Oi,this.uint16[ws+16]=Ji,this.uint16[ws+17]=ln,this.uint16[ws+18]=Tn,this.uint16[ws+19]=Vn,this.uint16[ws+20]=Nn,this.uint16[ws+21]=So,this.uint16[ws+22]=oo,this.uint32[Xl+12]=go,this.float32[Xl+13]=ks,this.float32[Xl+14]=Mo,this.float32[Xl+15]=Po,this.float32[Xl+16]=$s,ne},C}(zi);In.prototype.bytesPerElement=68,de("StructArrayLayout8i15ui1ul4f68",In);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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.float32[Re+0]=xe,ne},C}(zi);Ii.prototype.bytesPerElement=4,de("StructArrayLayout1f4",Ii);var an=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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.int16[pt+0]=xe,this.int16[pt+1]=Re,this.int16[pt+2]=qe,ne},C}(zi);an.prototype.bytesPerElement=6,de("StructArrayLayout3i6",an);var kn=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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*2,Dt=ne*4;return this.uint32[pt+0]=xe,this.uint16[Dt+2]=Re,this.uint16[Dt+3]=qe,ne},C}(zi);kn.prototype.bytesPerElement=8,de("StructArrayLayout1ul2ui8",kn);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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.uint16[qe+0]=xe,this.uint16[qe+1]=Re,ne},C}(zi);Dn.prototype.bytesPerElement=4,de("StructArrayLayout2ui4",Dn);var Zn=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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.uint16[Re+0]=xe,ne},C}(zi);Zn.prototype.bytesPerElement=2,de("StructArrayLayout1ui2",Zn);var Ds=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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*4;return this.float32[Dt+0]=xe,this.float32[Dt+1]=Re,this.float32[Dt+2]=qe,this.float32[Dt+3]=pt,ne},C}(zi);Ds.prototype.bytesPerElement=16,de("StructArrayLayout4f16",Ds);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 po=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(ne){return new bl(this,ne)},C}(Yi);de("CollisionBoxArray",po);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(ne){this._structArray.uint8[this._pos1+37]=ne},H.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},H.hidden.set=function(ne){this._structArray.uint8[this._pos1+38]=ne},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},H.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+10]=ne},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(ne){return new Wl(this,ne)},C}(mn);de("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(ne){this._structArray.uint32[this._pos4+12]=ne},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(ne){return new Sl(this,ne)},C}(In);de("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(ne){return this.float32[ne*1+0]},C}(Ii);de("GlyphOffsetArray",tu);var qs=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(ne){return this.int16[ne*3+0]},C.prototype.gety=function(ne){return this.int16[ne*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(ne){return this.int16[ne*3+2]},C}(an);de("SymbolLineVertexArray",qs);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(ne){return new pl(this,ne)},C}(kn);de("FeatureIndexArray",wl);var Yn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),Cl=Yn.members,Co=function(C){C===void 0&&(C=[]),this.segments=C};Co.prototype.prepareSegment=function(C,H,ne,xe){var Re=this.segments[this.segments.length-1];return C>Co.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Co.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Re||Re.vertexLength+C>Co.MAX_VERTEX_ARRAY_LENGTH||Re.sortKey!==xe)&&(Re={vertexOffset:H.length,primitiveOffset:ne.length,vertexLength:0,primitiveLength:0},xe!==void 0&&(Re.sortKey=xe),this.segments.push(Re)),Re},Co.prototype.get=function(){return this.segments},Co.prototype.destroy=function(){for(var C=0,H=this.segments;C<H.length;C+=1){var ne=H[C];for(var xe in ne.vaos)ne.vaos[xe].destroy()}},Co.simpleSegment=function(C,H,ne,xe){return new Co([{vertexOffset:C,primitiveOffset:H,vertexLength:ne,primitiveLength:xe,vaos:{},sortKey:0}])},Co.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,de("SegmentVector",Co);function ve(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"}]),_e=t(function(k){function C(H,ne){var xe,Re,qe,pt,Dt,Gt,tr,Pr;for(xe=H.length&3,Re=H.length-xe,qe=ne,Dt=3432918353,Gt=461845907,Pr=0;Pr<Re;)tr=H.charCodeAt(Pr)&255|(H.charCodeAt(++Pr)&255)<<8|(H.charCodeAt(++Pr)&255)<<16|(H.charCodeAt(++Pr)&255)<<24,++Pr,tr=(tr&65535)*Dt+(((tr>>>16)*Dt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Gt+(((tr>>>16)*Gt&65535)<<16)&4294967295,qe^=tr,qe=qe<<13|qe>>>19,pt=(qe&65535)*5+(((qe>>>16)*5&65535)<<16)&4294967295,qe=(pt&65535)+27492+(((pt>>>16)+58964&65535)<<16);switch(tr=0,xe){case 3:tr^=(H.charCodeAt(Pr+2)&255)<<16;case 2:tr^=(H.charCodeAt(Pr+1)&255)<<8;case 1:tr^=H.charCodeAt(Pr)&255,tr=(tr&65535)*Dt+(((tr>>>16)*Dt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Gt+(((tr>>>16)*Gt&65535)<<16)&4294967295,qe^=tr}return qe^=H.length,qe^=qe>>>16,qe=(qe&65535)*2246822507+(((qe>>>16)*2246822507&65535)<<16)&4294967295,qe^=qe>>>13,qe=(qe&65535)*3266489909+(((qe>>>16)*3266489909&65535)<<16)&4294967295,qe^=qe>>>16,qe>>>0}k.exports=C}),te=t(function(k){function C(H,ne){for(var xe=H.length,Re=ne^xe,qe=0,pt;xe>=4;)pt=H.charCodeAt(qe)&255|(H.charCodeAt(++qe)&255)<<8|(H.charCodeAt(++qe)&255)<<16|(H.charCodeAt(++qe)&255)<<24,pt=(pt&65535)*1540483477+(((pt>>>16)*1540483477&65535)<<16),pt^=pt>>>24,pt=(pt&65535)*1540483477+(((pt>>>16)*1540483477&65535)<<16),Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16)^pt,xe-=4,++qe;switch(xe){case 3:Re^=(H.charCodeAt(qe+2)&255)<<16;case 2:Re^=(H.charCodeAt(qe+1)&255)<<8;case 1:Re^=H.charCodeAt(qe)&255,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16)}return Re^=Re>>>13,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Re^=Re>>>15,Re>>>0}k.exports=C}),me=_e,Ge=_e,Le=te;me.murmur3=Ge,me.murmur2=Le;var $e=function(){this.ids=[],this.positions=[],this.indexed=!1};$e.prototype.add=function(C,H,ne,xe){this.ids.push(jt(C)),this.positions.push(H,ne,xe)},$e.prototype.getPositions=function(C){for(var H=jt(C),ne=0,xe=this.ids.length-1;ne<xe;){var Re=ne+xe>>1;this.ids[Re]>=H?xe=Re:ne=Re+1}for(var qe=[];this.ids[ne]===H;){var pt=this.positions[3*ne],Dt=this.positions[3*ne+1],Gt=this.positions[3*ne+2];qe.push({index:pt,start:Dt,end:Gt}),ne++}return qe},$e.serialize=function(C,H){var ne=new Float64Array(C.ids),xe=new Uint32Array(C.positions);return wr(ne,xe,0,ne.length-1),H&&H.push(ne.buffer,xe.buffer),{ids:ne,positions:xe}},$e.deserialize=function(C){var H=new $e;return H.ids=C.ids,H.positions=C.positions,H.indexed=!0,H};var gt=Math.pow(2,53)-1;function jt(k){var C=+k;return!isNaN(C)&&C<=gt?C:me(String(k))}function wr(k,C,H,ne){for(;H<ne;){for(var xe=k[H+ne>>1],Re=H-1,qe=ne+1;;){do Re++;while(k[Re]<xe);do qe--;while(k[qe]>xe);if(Re>=qe)break;Nr(k,Re,qe),Nr(C,3*Re,3*qe),Nr(C,3*Re+1,3*qe+1),Nr(C,3*Re+2,3*qe+2)}qe-H<ne-qe?(wr(k,C,H,qe),H=qe+1):(wr(k,C,qe+1,ne),ne=qe)}}function Nr(k,C,H){var ne=k[C];k[C]=k[H],k[H]=ne}de("FeaturePositionMap",$e);var pr=function(C,H){this.gl=C.gl,this.location=H},yt=function(k){function C(H,ne){k.call(this,H,ne),this.current=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1i(this.location,ne))},C}(pr),kt=function(k){function C(H,ne){k.call(this,H,ne),this.current=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1f(this.location,ne))},C}(pr),Bt=function(k){function C(H,ne){k.call(this,H,ne),this.current=[0,0]}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1])&&(this.current=ne,this.gl.uniform2f(this.location,ne[0],ne[1]))},C}(pr),nr=function(k){function C(H,ne){k.call(this,H,ne),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(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2])&&(this.current=ne,this.gl.uniform3f(this.location,ne[0],ne[1],ne[2]))},C}(pr),hr=function(k){function C(H,ne){k.call(this,H,ne),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(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2]||ne[3]!==this.current[3])&&(this.current=ne,this.gl.uniform4f(this.location,ne[0],ne[1],ne[2],ne[3]))},C}(pr),lr=function(k){function C(H,ne){k.call(this,H,ne),this.current=Fs.transparent}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(ne){(ne.r!==this.current.r||ne.g!==this.current.g||ne.b!==this.current.b||ne.a!==this.current.a)&&(this.current=ne,this.gl.uniform4f(this.location,ne.r,ne.g,ne.b,ne.a))},C}(pr),dr=new Float32Array(16),ur=function(k){function C(H,ne){k.call(this,H,ne),this.current=dr}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.set=function(ne){if(ne[12]!==this.current[12]||ne[0]!==this.current[0]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);return}for(var xe=1;xe<16;xe++)if(ne[xe]!==this.current[xe]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);break}},C}(pr);function Ht(k){return[ve(255*k.r,255*k.g),ve(255*k.b,255*k.a)]}var sr=function(C,H,ne){this.value=C,this.uniformNames=H.map(function(xe){return"u_"+xe}),this.type=ne};sr.prototype.setUniform=function(C,H,ne){C.set(ne.constantOr(this.value))},sr.prototype.getBinding=function(C,H,ne){return this.type==="color"?new lr(C,H):new kt(C,H)};var Vt=function(C,H){this.uniformNames=H.map(function(ne){return"u_"+ne}),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,ne,xe){var Re=xe==="u_pattern_to"?this.patternTo:xe==="u_pattern_from"?this.patternFrom:xe==="u_pixel_ratio_to"?this.pixelRatioTo:xe==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Re&&C.set(Re)},Vt.prototype.getBinding=function(C,H,ne){return ne.substr(0,9)==="u_pattern"?new hr(C,H):new kt(C,H)};var Dr=function(C,H,ne,xe){this.expression=C,this.type=ne,this.maxValue=0,this.paintVertexAttributes=H.map(function(Re){return{name:"a_"+Re,type:"Float32",components:ne==="color"?2:1,offset:0}}),this.paintVertexArray=new xe};Dr.prototype.populatePaintArray=function(C,H,ne,xe,Re){var qe=this.paintVertexArray.length,pt=this.expression.evaluate(new gn(0),H,{},xe,[],Re);this.paintVertexArray.resize(C),this._setPaintValue(qe,C,pt)},Dr.prototype.updatePaintArray=function(C,H,ne,xe){var Re=this.expression.evaluate({zoom:0},ne,xe);this._setPaintValue(C,H,Re)},Dr.prototype._setPaintValue=function(C,H,ne){if(this.type==="color")for(var xe=Ht(ne),Re=C;Re<H;Re++)this.paintVertexArray.emplace(Re,xe[0],xe[1]);else{for(var qe=C;qe<H;qe++)this.paintVertexArray.emplace(qe,ne);this.maxValue=Math.max(this.maxValue,Math.abs(ne))}},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,ne,xe,Re,qe){this.expression=C,this.uniformNames=H.map(function(pt){return"u_"+pt+"_t"}),this.type=ne,this.useIntegerZoom=xe,this.zoom=Re,this.maxValue=0,this.paintVertexAttributes=H.map(function(pt){return{name:"a_"+pt,type:"Float32",components:ne==="color"?4:2,offset:0}}),this.paintVertexArray=new qe};Jr.prototype.populatePaintArray=function(C,H,ne,xe,Re){var qe=this.expression.evaluate(new gn(this.zoom),H,{},xe,[],Re),pt=this.expression.evaluate(new gn(this.zoom+1),H,{},xe,[],Re),Dt=this.paintVertexArray.length;this.paintVertexArray.resize(C),this._setPaintValue(Dt,C,qe,pt)},Jr.prototype.updatePaintArray=function(C,H,ne,xe){var Re=this.expression.evaluate({zoom:this.zoom},ne,xe),qe=this.expression.evaluate({zoom:this.zoom+1},ne,xe);this._setPaintValue(C,H,Re,qe)},Jr.prototype._setPaintValue=function(C,H,ne,xe){if(this.type==="color")for(var Re=Ht(ne),qe=Ht(xe),pt=C;pt<H;pt++)this.paintVertexArray.emplace(pt,Re[0],Re[1],qe[0],qe[1]);else{for(var Dt=C;Dt<H;Dt++)this.paintVertexArray.emplace(Dt,ne,xe);this.maxValue=Math.max(this.maxValue,Math.abs(ne),Math.abs(xe))}},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 ne=this.useIntegerZoom?Math.floor(H.zoom):H.zoom,xe=l(this.expression.interpolationFactor(ne,this.zoom,this.zoom+1),0,1);C.set(xe)},Jr.prototype.getBinding=function(C,H,ne){return new kt(C,H)};var ga=function(C,H,ne,xe,Re,qe){this.expression=C,this.type=H,this.useIntegerZoom=ne,this.zoom=xe,this.layerId=qe,this.zoomInPaintVertexArray=new Re,this.zoomOutPaintVertexArray=new Re};ga.prototype.populatePaintArray=function(C,H,ne){var xe=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(C),this.zoomOutPaintVertexArray.resize(C),this._setPaintValues(xe,C,H.patterns&&H.patterns[this.layerId],ne)},ga.prototype.updatePaintArray=function(C,H,ne,xe,Re){this._setPaintValues(C,H,ne.patterns&&ne.patterns[this.layerId],Re)},ga.prototype._setPaintValues=function(C,H,ne,xe){if(!(!xe||!ne)){var Re=ne.min,qe=ne.mid,pt=ne.max,Dt=xe[Re],Gt=xe[qe],tr=xe[pt];if(!(!Dt||!Gt||!tr))for(var Pr=C;Pr<H;Pr++)this.zoomInPaintVertexArray.emplace(Pr,Gt.tl[0],Gt.tl[1],Gt.br[0],Gt.br[1],Dt.tl[0],Dt.tl[1],Dt.br[0],Dt.br[1],Gt.pixelRatio,Dt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Pr,Gt.tl[0],Gt.tl[1],Gt.br[0],Gt.br[1],tr.tl[0],tr.tl[1],tr.br[0],tr.br[1],Gt.pixelRatio,tr.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,ne){this.binders={},this._buffers=[];var xe=[];for(var Re in C.paint._values)if(ne(Re)){var qe=C.paint.get(Re);if(!(!(qe instanceof Rl)||!_l(qe.property.specification))){var pt=ai(Re,C.type),Dt=qe.value,Gt=qe.property.specification.type,tr=qe.property.useIntegerZoom,Pr=qe.property.specification["property-type"],Zr=Pr==="cross-faded"||Pr==="cross-faded-data-driven";if(Dt.kind==="constant")this.binders[Re]=Zr?new Vt(Dt.value,pt):new sr(Dt.value,pt,Gt),xe.push("/u_"+Re);else if(Dt.kind==="source"||Zr){var Vr=Fi(Re,Gt,"source");this.binders[Re]=Zr?new ga(Dt,Gt,tr,H,Vr,C.id):new Dr(Dt,pt,Gt,Vr),xe.push("/a_"+Re)}else{var ua=Fi(Re,Gt,"composite");this.binders[Re]=new Jr(Dt,pt,Gt,tr,H,ua),xe.push("/z_"+Re)}}}this.cacheKey=xe.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,ne,xe,Re){for(var qe in this.binders){var pt=this.binders[qe];(pt instanceof Dr||pt instanceof Jr||pt instanceof ga)&&pt.populatePaintArray(C,H,ne,xe,Re)}},vi.prototype.setConstantPatternPositions=function(C,H){for(var ne in this.binders){var xe=this.binders[ne];xe instanceof Vt&&xe.setConstantPatternPositions(C,H)}},vi.prototype.updatePaintArrays=function(C,H,ne,xe,Re){var qe=!1;for(var pt in C)for(var Dt=H.getPositions(pt),Gt=0,tr=Dt;Gt<tr.length;Gt+=1){var Pr=tr[Gt],Zr=ne.feature(Pr.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 Oa=xe.paint.get(Vr);ua.expression=Oa.value,ua.updatePaintArray(Pr.start,Pr.end,Zr,C[pt],Re),qe=!0}}}return qe},vi.prototype.defines=function(){var C=[];for(var H in this.binders){var ne=this.binders[H];(ne instanceof sr||ne instanceof Vt)&&C.push.apply(C,ne.uniformNames.map(function(xe){return"#define HAS_UNIFORM_"+xe}))}return C},vi.prototype.getBinderAttributes=function(){var C=[];for(var H in this.binders){var ne=this.binders[H];if(ne instanceof Dr||ne instanceof Jr)for(var xe=0;xe<ne.paintVertexAttributes.length;xe++)C.push(ne.paintVertexAttributes[xe].name);else if(ne instanceof ga)for(var Re=0;Re<K.members.length;Re++)C.push(K.members[Re].name)}return C},vi.prototype.getBinderUniforms=function(){var C=[];for(var H in this.binders){var ne=this.binders[H];if(ne instanceof sr||ne instanceof Vt||ne instanceof Jr)for(var xe=0,Re=ne.uniformNames;xe<Re.length;xe+=1){var qe=Re[xe];C.push(qe)}}return C},vi.prototype.getPaintVertexBuffers=function(){return this._buffers},vi.prototype.getUniforms=function(C,H){var ne=[];for(var xe in this.binders){var Re=this.binders[xe];if(Re instanceof sr||Re instanceof Vt||Re instanceof Jr)for(var qe=0,pt=Re.uniformNames;qe<pt.length;qe+=1){var Dt=pt[qe];if(H[Dt]){var Gt=Re.getBinding(C,H[Dt],Dt);ne.push({name:Dt,property:xe,binding:Gt})}}}return ne},vi.prototype.setUniforms=function(C,H,ne,xe){for(var Re=0,qe=H;Re<qe.length;Re+=1){var pt=qe[Re],Dt=pt.name,Gt=pt.property,tr=pt.binding;this.binders[Gt].setUniform(tr,xe,ne.get(Gt),Dt)}},vi.prototype.updatePaintBuffers=function(C){this._buffers=[];for(var H in this.binders){var ne=this.binders[H];if(C&&ne instanceof ga){var xe=C.fromScale===2?ne.zoomInPaintVertexBuffer:ne.zoomOutPaintVertexBuffer;xe&&this._buffers.push(xe)}else(ne instanceof Dr||ne instanceof Jr)&&ne.paintVertexBuffer&&this._buffers.push(ne.paintVertexBuffer)}},vi.prototype.upload=function(C){for(var H in this.binders){var ne=this.binders[H];(ne instanceof Dr||ne instanceof Jr||ne instanceof ga)&&ne.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,ne){ne===void 0&&(ne=function(){return!0}),this.programConfigurations={};for(var xe=0,Re=C;xe<Re.length;xe+=1){var qe=Re[xe];this.programConfigurations[qe.id]=new vi(qe,H,ne)}this.needsUpload=!1,this._featureMap=new $e,this._bufferOffset=0};Ga.prototype.populatePaintArrays=function(C,H,ne,xe,Re,qe){for(var pt in this.programConfigurations)this.programConfigurations[pt].populatePaintArrays(C,H,xe,Re,qe);H.id!==void 0&&this._featureMap.add(H.id,ne,this._bufferOffset,C),this._bufferOffset=C,this.needsUpload=!0},Ga.prototype.updatePaintArrays=function(C,H,ne,xe){for(var Re=0,qe=ne;Re<qe.length;Re+=1){var pt=qe[Re];this.needsUpload=this.programConfigurations[pt.id].updatePaintArrays(C,this._featureMap,H,pt,xe)||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 ne={color:{source:Bi,composite:Ds},number:{source:Ii,composite:Bi}},xe=Zi(k);return xe&&xe[H]||ne[C][H]}de("ConstantBinder",sr),de("CrossFadedConstantBinder",Vt),de("SourceExpressionBinder",Dr),de("CrossFadedCompositeBinder",ga),de("CompositeExpressionBinder",Jr),de("ProgramConfiguration",vi,{omit:["_buffers"]}),de("ProgramConfigurationSet",Ga);var ui=8192,_i=15,Si=Math.pow(2,_i-1)-1,Ui=-Si-1;function fn(k){for(var C=ui/k.extent,H=k.loadGeometry(),ne=0;ne<H.length;ne++)for(var xe=H[ne],Re=0;Re<xe.length;Re++){var qe=xe[Re],pt=Math.round(qe.x*C),Dt=Math.round(qe.y*C);qe.x=l(pt,Ui,Si),qe.y=l(Dt,Ui,Si),(pt<qe.x||pt>qe.x+1||Dt<qe.y||Dt>qe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return H}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Bo(k,C,H,ne,xe){k.emplaceBack(C*2+(ne+1)/2,H*2+(xe+1)/2)}var Ps=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 Co,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Ps.prototype.populate=function(C,H,ne){var xe=this.layers[0],Re=[],qe=null;xe.type==="circle"&&(qe=xe.layout.get("circle-sort-key"));for(var pt=0,Dt=C;pt<Dt.length;pt+=1){var Gt=Dt[pt],tr=Gt.feature,Pr=Gt.id,Zr=Gt.index,Vr=Gt.sourceLayerIndex,ua=this.layers[0]._featureFilter.needGeometry,Oa=_o(tr,ua);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),Oa,ne)){var Mi=qe?qe.evaluate(Oa,{},ne):void 0,ii={id:Pr,properties:tr.properties,type:tr.type,sourceLayerIndex:Vr,index:Zr,geometry:ua?Oa.geometry:fn(tr),patterns:{},sortKey:Mi};Re.push(ii)}}qe&&Re.sort(function(oo,go){return oo.sortKey-go.sortKey});for(var $i=0,Oi=Re;$i<Oi.length;$i+=1){var Ji=Oi[$i],ln=Ji,Tn=ln.geometry,Vn=ln.index,Nn=ln.sourceLayerIndex,So=C[Vn].feature;this.addFeature(Ji,Tn,Vn,ne),H.featureIndex.insert(So,Tn,Vn,Nn,this.index)}},Ps.prototype.update=function(C,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,ne)},Ps.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ps.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},Ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ps.prototype.addFeature=function(C,H,ne,xe){for(var Re=0,qe=H;Re<qe.length;Re+=1)for(var pt=qe[Re],Dt=0,Gt=pt;Dt<Gt.length;Dt+=1){var tr=Gt[Dt],Pr=tr.x,Zr=tr.y;if(!(Pr<0||Pr>=ui||Zr<0||Zr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Bo(this.layoutVertexArray,Pr,Zr,-1,-1),Bo(this.layoutVertexArray,Pr,Zr,1,-1),Bo(this.layoutVertexArray,Pr,Zr,1,1),Bo(this.layoutVertexArray,Pr,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,ne,{},xe)},de("CircleBucket",Ps,{omit:["layers"]});function Do(k,C){for(var H=0;H<k.length;H++)if(Ih(C,k[H]))return!0;for(var ne=0;ne<C.length;ne++)if(Ih(k,C[ne]))return!0;return!!kp(k,C)}function Ms(k,C,H){return!!(Ih(k,C)||qp(C,k,H))}function Ys(k,C){if(k.length===1)return ed(C,k[0]);for(var H=0;H<C.length;H++)for(var ne=C[H],xe=0;xe<ne.length;xe++)if(Ih(k,ne[xe]))return!0;for(var Re=0;Re<k.length;Re++)if(ed(C,k[Re]))return!0;for(var qe=0;qe<C.length;qe++)if(kp(k,C[qe]))return!0;return!1}function mu(k,C,H){for(var ne=0;ne<C.length;ne++){var xe=C[ne];if(k.length>=3){for(var Re=0;Re<xe.length;Re++)if(Ih(k,xe[Re]))return!0}if(Ep(k,xe,H))return!0}return!1}function Ep(k,C,H){if(k.length>1){if(kp(k,C))return!0;for(var ne=0;ne<C.length;ne++)if(qp(C[ne],k,H))return!0}for(var xe=0;xe<k.length;xe++)if(qp(k[xe],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 ne=k[H],xe=k[H+1],Re=0;Re<C.length-1;Re++){var qe=C[Re],pt=C[Re+1];if(Ph(ne,xe,qe,pt))return!0}return!1}function Ph(k,C,H,ne){return X(k,H,ne)!==X(C,H,ne)&&X(k,C,H)!==X(k,C,ne)}function qp(k,C,H){var ne=H*H;if(C.length===1)return k.distSqr(C[0])<ne;for(var xe=1;xe<C.length;xe++){var Re=C[xe-1],qe=C[xe];if(qd(k,Re,qe)<ne)return!0}return!1}function qd(k,C,H){var ne=C.distSqr(H);if(ne===0)return k.distSqr(C);var xe=((k.x-C.x)*(H.x-C.x)+(k.y-C.y)*(H.y-C.y))/ne;return xe<0?k.distSqr(C):xe>1?k.distSqr(H):k.distSqr(H.sub(C)._mult(xe)._add(C))}function ed(k,C){for(var H=!1,ne,xe,Re,qe=0;qe<k.length;qe++){ne=k[qe];for(var pt=0,Dt=ne.length-1;pt<ne.length;Dt=pt++)xe=ne[pt],Re=ne[Dt],xe.y>C.y!=Re.y>C.y&&C.x<(Re.x-xe.x)*(C.y-xe.y)/(Re.y-xe.y)+xe.x&&(H=!H)}return H}function Ih(k,C){for(var H=!1,ne=0,xe=k.length-1;ne<k.length;xe=ne++){var Re=k[ne],qe=k[xe];Re.y>C.y!=qe.y>C.y&&C.x<(qe.x-Re.x)*(C.y-Re.y)/(qe.y-Re.y)+Re.x&&(H=!H)}return H}function td(k,C,H,ne,xe){for(var Re=0,qe=k;Re<qe.length;Re+=1){var pt=qe[Re];if(C<=pt.x&&H<=pt.y&&ne>=pt.x&&xe>=pt.y)return!0}var Dt=[new n(C,H),new n(C,xe),new n(ne,xe),new n(ne,H)];if(k.length>2)for(var Gt=0,tr=Dt;Gt<tr.length;Gt+=1){var Pr=tr[Gt];if(Ih(k,Pr))return!0}for(var Zr=0;Zr<k.length-1;Zr++){var Vr=k[Zr],ua=k[Zr+1];if(Kh(Vr,ua,Dt))return!0}return!1}function Kh(k,C,H){var ne=H[0],xe=H[2];if(k.x<ne.x&&C.x<ne.x||k.x>xe.x&&C.x>xe.x||k.y<ne.y&&C.y<ne.y||k.y>xe.y&&C.y>xe.y)return!1;var Re=X(k,C,H[0]);return Re!==X(k,C,H[1])||Re!==X(k,C,H[2])||Re!==X(k,C,H[3])}function Rh(k,C,H){var ne=C.paint.get(k).value;return ne.kind==="constant"?ne.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,ne,xe){if(!C[0]&&!C[1])return k;var Re=n.convert(C)._mult(xe);H==="viewport"&&Re._rotate(-ne);for(var qe=[],pt=0;pt<k.length;pt++){var Dt=k[pt];qe.push(Dt.sub(Re))}return qe}var Lp=new ma({"circle-sort-key":new Zt(Gi.layout_circle["circle-sort-key"])}),Cv=new ma({"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 ne=C[0],xe=C[1],Re=C[2],qe=C[3],pt=Math.sin(H),Dt=Math.cos(H);return k[0]=ne*Dt+Re*pt,k[1]=xe*Dt+qe*pt,k[2]=ne*-pt+Re*Dt,k[3]=xe*-pt+qe*Dt,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),ne=Math.cos(C);return k[0]=ne,k[1]=H,k[2]=0,k[3]=-H,k[4]=ne,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],ne=C[1],xe=C[2],Re=C[3],qe=C[4],pt=C[5],Dt=C[6],Gt=C[7],tr=C[8],Pr=C[9],Zr=C[10],Vr=C[11],ua=C[12],Oa=C[13],Mi=C[14],ii=C[15],$i=H*pt-ne*qe,Oi=H*Dt-xe*qe,Ji=H*Gt-Re*qe,ln=ne*Dt-xe*pt,Tn=ne*Gt-Re*pt,Vn=xe*Gt-Re*Dt,Nn=tr*Oa-Pr*ua,So=tr*Mi-Zr*ua,oo=tr*ii-Vr*ua,go=Pr*Mi-Zr*Oa,ks=Pr*ii-Vr*Oa,Mo=Zr*ii-Vr*Mi,Po=$i*Mo-Oi*ks+Ji*go+ln*oo-Tn*So+Vn*Nn;return Po?(Po=1/Po,k[0]=(pt*Mo-Dt*ks+Gt*go)*Po,k[1]=(xe*ks-ne*Mo-Re*go)*Po,k[2]=(Oa*Vn-Mi*Tn+ii*ln)*Po,k[3]=(Zr*Tn-Pr*Vn-Vr*ln)*Po,k[4]=(Dt*oo-qe*Mo-Gt*So)*Po,k[5]=(H*Mo-xe*oo+Re*So)*Po,k[6]=(Mi*Ji-ua*Vn-ii*Oi)*Po,k[7]=(tr*Vn-Zr*Ji+Vr*Oi)*Po,k[8]=(qe*ks-pt*oo+Gt*Nn)*Po,k[9]=(ne*oo-H*ks-Re*Nn)*Po,k[10]=(ua*Tn-Oa*Ji+ii*$i)*Po,k[11]=(Pr*Ji-tr*Tn-Vr*$i)*Po,k[12]=(pt*So-qe*go-Dt*Nn)*Po,k[13]=(H*go-ne*So+xe*Nn)*Po,k[14]=(Oa*Oi-ua*ln-Mi*$i)*Po,k[15]=(tr*ln-Pr*Oi+Zr*$i)*Po,k):null}function ov(k,C,H){var ne=C[0],xe=C[1],Re=C[2],qe=C[3],pt=C[4],Dt=C[5],Gt=C[6],tr=C[7],Pr=C[8],Zr=C[9],Vr=C[10],ua=C[11],Oa=C[12],Mi=C[13],ii=C[14],$i=C[15],Oi=H[0],Ji=H[1],ln=H[2],Tn=H[3];return k[0]=Oi*ne+Ji*pt+ln*Pr+Tn*Oa,k[1]=Oi*xe+Ji*Dt+ln*Zr+Tn*Mi,k[2]=Oi*Re+Ji*Gt+ln*Vr+Tn*ii,k[3]=Oi*qe+Ji*tr+ln*ua+Tn*$i,Oi=H[4],Ji=H[5],ln=H[6],Tn=H[7],k[4]=Oi*ne+Ji*pt+ln*Pr+Tn*Oa,k[5]=Oi*xe+Ji*Dt+ln*Zr+Tn*Mi,k[6]=Oi*Re+Ji*Gt+ln*Vr+Tn*ii,k[7]=Oi*qe+Ji*tr+ln*ua+Tn*$i,Oi=H[8],Ji=H[9],ln=H[10],Tn=H[11],k[8]=Oi*ne+Ji*pt+ln*Pr+Tn*Oa,k[9]=Oi*xe+Ji*Dt+ln*Zr+Tn*Mi,k[10]=Oi*Re+Ji*Gt+ln*Vr+Tn*ii,k[11]=Oi*qe+Ji*tr+ln*ua+Tn*$i,Oi=H[12],Ji=H[13],ln=H[14],Tn=H[15],k[12]=Oi*ne+Ji*pt+ln*Pr+Tn*Oa,k[13]=Oi*xe+Ji*Dt+ln*Zr+Tn*Mi,k[14]=Oi*Re+Ji*Gt+ln*Vr+Tn*ii,k[15]=Oi*qe+Ji*tr+ln*ua+Tn*$i,k}function cc(k,C,H){var ne=H[0],xe=H[1],Re=H[2],qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii;return C===k?(k[12]=C[0]*ne+C[4]*xe+C[8]*Re+C[12],k[13]=C[1]*ne+C[5]*xe+C[9]*Re+C[13],k[14]=C[2]*ne+C[6]*xe+C[10]*Re+C[14],k[15]=C[3]*ne+C[7]*xe+C[11]*Re+C[15]):(qe=C[0],pt=C[1],Dt=C[2],Gt=C[3],tr=C[4],Pr=C[5],Zr=C[6],Vr=C[7],ua=C[8],Oa=C[9],Mi=C[10],ii=C[11],k[0]=qe,k[1]=pt,k[2]=Dt,k[3]=Gt,k[4]=tr,k[5]=Pr,k[6]=Zr,k[7]=Vr,k[8]=ua,k[9]=Oa,k[10]=Mi,k[11]=ii,k[12]=qe*ne+tr*xe+ua*Re+C[12],k[13]=pt*ne+Pr*xe+Oa*Re+C[13],k[14]=Dt*ne+Zr*xe+Mi*Re+C[14],k[15]=Gt*ne+Vr*xe+ii*Re+C[15]),k}function fu(k,C,H){var ne=H[0],xe=H[1],Re=H[2];return k[0]=C[0]*ne,k[1]=C[1]*ne,k[2]=C[2]*ne,k[3]=C[3]*ne,k[4]=C[4]*xe,k[5]=C[5]*xe,k[6]=C[6]*xe,k[7]=C[7]*xe,k[8]=C[8]*Re,k[9]=C[9]*Re,k[10]=C[10]*Re,k[11]=C[11]*Re,k[12]=C[12],k[13]=C[13],k[14]=C[14],k[15]=C[15],k}function Dh(k,C,H){var ne=Math.sin(H),xe=Math.cos(H),Re=C[4],qe=C[5],pt=C[6],Dt=C[7],Gt=C[8],tr=C[9],Pr=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]=Re*xe+Gt*ne,k[5]=qe*xe+tr*ne,k[6]=pt*xe+Pr*ne,k[7]=Dt*xe+Zr*ne,k[8]=Gt*xe-Re*ne,k[9]=tr*xe-qe*ne,k[10]=Pr*xe-pt*ne,k[11]=Zr*xe-Dt*ne,k}function Iv(k,C,H){var ne=Math.sin(H),xe=Math.cos(H),Re=C[0],qe=C[1],pt=C[2],Dt=C[3],Gt=C[4],tr=C[5],Pr=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]=Re*xe+Gt*ne,k[1]=qe*xe+tr*ne,k[2]=pt*xe+Pr*ne,k[3]=Dt*xe+Zr*ne,k[4]=Gt*xe-Re*ne,k[5]=tr*xe-qe*ne,k[6]=Pr*xe-pt*ne,k[7]=Zr*xe-Dt*ne,k}function sm(k,C,H,ne,xe){var Re=1/Math.tan(C/2),qe;return k[0]=Re/H,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=Re,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[11]=-1,k[12]=0,k[13]=0,k[15]=0,xe!=null&&xe!==1/0?(qe=1/(ne-xe),k[10]=(xe+ne)*qe,k[14]=2*xe*ne*qe):(k[10]=-1,k[14]=-2*ne),k}function Mu(k,C,H,ne,xe,Re,qe){var pt=1/(C-H),Dt=1/(ne-xe),Gt=1/(Re-qe);return k[0]=-2*pt,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=-2*Dt,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[10]=2*Gt,k[11]=0,k[12]=(C+H)*pt,k[13]=(xe+ne)*Dt,k[14]=(qe+Re)*Gt,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],ne=C[1],xe=C[2],Re=H*H+ne*ne+xe*xe;return Re>0&&(Re=1/Math.sqrt(Re)),k[0]=C[0]*Re,k[1]=C[1]*Re,k[2]=C[2]*Re,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,H){var ne=C[0],xe=C[1],Re=C[2],qe=H[0],pt=H[1],Dt=H[2];return k[0]=xe*Dt-Re*pt,k[1]=Re*qe-ne*Dt,k[2]=ne*pt-xe*qe,k}function qT(k,C,H){var ne=C[0],xe=C[1],Re=C[2];return k[0]=ne*H[0]+xe*H[3]+Re*H[6],k[1]=ne*H[1]+xe*H[4]+Re*H[7],k[2]=ne*H[2]+xe*H[5]+Re*H[8],k}var VT=lv,vk=function(){var k=sv();return function(C,H,ne,xe,Re,qe){var pt,Dt;for(H||(H=3),ne||(ne=0),xe?Dt=Math.min(xe*H+ne,C.length):Dt=C.length,pt=ne;pt<Dt;pt+=H)k[0]=C[pt],k[1]=C[pt+1],k[2]=C[pt+2],Re(k,k,qe),C[pt]=k[0],C[pt+1]=k[1],C[pt+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 ne=C[0],xe=C[1],Re=C[2],qe=C[3];return k[0]=H[0]*ne+H[4]*xe+H[8]*Re+H[12]*qe,k[1]=H[1]*ne+H[5]*xe+H[9]*Re+H[13]*qe,k[2]=H[2]*ne+H[6]*xe+H[10]*Re+H[14]*qe,k[3]=H[3]*ne+H[7]*xe+H[11]*Re+H[15]*qe,k}var A0=function(){var k=GT();return function(C,H,ne,xe,Re,qe){var pt,Dt;for(H||(H=4),ne||(ne=0),xe?Dt=Math.min(xe*H+ne,C.length):Dt=C.length,pt=ne;pt<Dt;pt+=H)k[0]=C[pt],k[1]=C[pt+1],k[2]=C[pt+2],k[3]=C[pt+3],Re(k,k,qe),C[pt]=k[0],C[pt+1]=k[1],C[pt+2]=k[2],C[pt+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,ne,xe,Re,qe){var pt,Dt;for(H||(H=2),ne||(ne=0),xe?Dt=Math.min(xe*H+ne,C.length):Dt=C.length,pt=ne;pt<Dt;pt+=H)k[0]=C[pt],k[1]=C[pt+1],Re(k,k,qe),C[pt]=k[0],C[pt+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(ne){return new Ps(ne)},C.prototype.queryRadius=function(ne){var xe=ne;return Rh("circle-radius",this,xe)+Rh("circle-stroke-width",this,xe)+Cp(this.paint.get("circle-translate"))},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt,tr){for(var Pr=Vp(ne,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Dt.angle,Gt),Zr=this.paint.get("circle-radius").evaluate(xe,Re),Vr=this.paint.get("circle-stroke-width").evaluate(xe,Re),ua=Zr+Vr,Oa=this.paint.get("circle-pitch-alignment")==="map",Mi=Oa?Pr:Ix(Pr,tr),ii=Oa?ua*Gt:ua,$i=0,Oi=qe;$i<Oi.length;$i+=1)for(var Ji=Oi[$i],ln=0,Tn=Ji;ln<Tn.length;ln+=1){var Vn=Tn[ln],Nn=Oa?Vn:Px(Vn,tr),So=ii,oo=Rv([],[Vn.x,Vn.y,0,1],tr);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?So*=oo[3]/Dt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(So*=Dt.cameraToCenterDistance/oo[3]),Ms(Mi,Nn,So))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}(Ps);de("HeatmapBucket",R1,{omit:["layers"]});function zh(k,C,H,ne){var xe=C.width,Re=C.height;if(!ne)ne=new Uint8Array(xe*Re*H);else if(ne instanceof Uint8ClampedArray)ne=new Uint8Array(ne.buffer);else if(ne.length!==xe*Re*H)throw new RangeError("mismatched image size");return k.width=xe,k.height=Re,k.data=ne,k}function wg(k,C,H){var ne=C.width,xe=C.height;if(!(ne===k.width&&xe===k.height)){var Re=zh({},{width:ne,height:xe},H);Tg(k,Re,{x:0,y:0},{x:0,y:0},{width:Math.min(k.width,ne),height:Math.min(k.height,xe)},H),k.width=ne,k.height=xe,k.data=Re.data}}function Tg(k,C,H,ne,xe,Re){if(xe.width===0||xe.height===0)return C;if(xe.width>k.width||xe.height>k.height||H.x>k.width-xe.width||H.y>k.height-xe.height)throw new RangeError("out of range source coordinates for image copy");if(xe.width>C.width||xe.height>C.height||ne.x>C.width-xe.width||ne.y>C.height-xe.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=k.data,pt=C.data,Dt=0;Dt<xe.height;Dt++)for(var Gt=((H.y+Dt)*k.width+H.x)*Re,tr=((ne.y+Dt)*C.width+ne.x)*Re,Pr=0;Pr<xe.width*Re;Pr++)pt[tr+Pr]=qe[Gt+Pr];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,ne,xe,Re){Tg(C,H,ne,xe,Re,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,ne,xe,Re){Tg(C,H,ne,xe,Re,4)},de("AlphaImage",Ip),de("RGBAImage",eh);var S0=new ma({"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,ne=k.clips?k.clips.length:1,xe=k.image||new eh({width:H,height:ne}),Re=function($i,Oi,Ji){C[k.evaluationKey]=Ji;var ln=k.expression.evaluate(C);xe.data[$i+Oi+0]=Math.floor(ln.r*255/ln.a),xe.data[$i+Oi+1]=Math.floor(ln.g*255/ln.a),xe.data[$i+Oi+2]=Math.floor(ln.b*255/ln.a),xe.data[$i+Oi+3]=Math.floor(ln.a*255)};if(k.clips)for(var Gt=0,tr=0;Gt<ne;++Gt,tr+=H*4)for(var Pr=0,Zr=0;Pr<H;Pr++,Zr+=4){var Vr=Pr/(H-1),ua=k.clips[Gt],Oa=ua.start,Mi=ua.end,ii=Oa*(1-Vr)+Mi*Vr;Re(tr,Zr,ii)}else for(var qe=0,pt=0;qe<H;qe++,pt+=4){var Dt=qe/(H-1);Re(0,pt,Dt)}return xe}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(ne){return new R1(ne)},C.prototype._handleSpecialPaintPropertyUpdate=function(ne){ne==="heatmap-color"&&this._updateColorRamp()},C.prototype._updateColorRamp=function(){var ne=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=M0({expression:ne,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 ma({"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 ne=C&&C.length,xe=ne?C[0]*H:k.length,Re=Mg(k,0,xe,H,!0),qe=[];if(!Re||Re.next===Re.prev)return qe;var pt,Dt,Gt,tr,Pr,Zr,Vr;if(ne&&(Re=cv(k,C,Re,H)),k.length>80*H){pt=Gt=k[0],Dt=tr=k[1];for(var ua=H;ua<xe;ua+=H)Pr=k[ua],Zr=k[ua+1],Pr<pt&&(pt=Pr),Zr<Dt&&(Dt=Zr),Pr>Gt&&(Gt=Pr),Zr>tr&&(tr=Zr);Vr=Math.max(Gt-pt,tr-Dt),Vr=Vr!==0?1/Vr:0}return E0(Re,qe,H,pt,Dt,Vr),qe}function Mg(k,C,H,ne,xe){var Re,qe;if(xe===U1(k,C,H,ne)>0)for(Re=C;Re<H;Re+=ne)qe=Ux(Re,k[Re],k[Re+1],qe);else for(Re=H-ne;Re>=C;Re-=ne)qe=Ux(Re,k[Re],k[Re+1],qe);return qe&&C0(qe,qe.next)&&(I0(qe),qe=qe.next),qe}function uv(k,C){if(!k)return k;C||(C=k);var H=k,ne;do if(ne=!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;ne=!0}else H=H.next;while(ne||H!==C);return C}function E0(k,C,H,ne,xe,Re,qe){if(k){!qe&&Re&&Eg(k,ne,xe,Re);for(var pt=k,Dt,Gt;k.prev!==k.next;){if(Dt=k.prev,Gt=k.next,Re?Ox(k,ne,xe,Re):Fx(k)){C.push(Dt.i/H),C.push(k.i/H),C.push(Gt.i/H),I0(k),k=Gt.next,pt=Gt.next;continue}if(k=Gt,k===pt){qe?qe===1?(k=k0(uv(k),C,H),E0(k,C,H,ne,xe,Re,2)):qe===2&&yd(k,C,H,ne,xe,Re):E0(uv(k),C,H,ne,xe,Re,1);break}}}}function Fx(k){var C=k.prev,H=k,ne=k.next;if(cf(C,H,ne)>=0)return!1;for(var xe=k.next.next;xe!==k.prev;){if(fv(C.x,C.y,H.x,H.y,ne.x,ne.y,xe.x,xe.y)&&cf(xe.prev,xe,xe.next)>=0)return!1;xe=xe.next}return!0}function Ox(k,C,H,ne){var xe=k.prev,Re=k,qe=k.next;if(cf(xe,Re,qe)>=0)return!1;for(var pt=xe.x<Re.x?xe.x<qe.x?xe.x:qe.x:Re.x<qe.x?Re.x:qe.x,Dt=xe.y<Re.y?xe.y<qe.y?xe.y:qe.y:Re.y<qe.y?Re.y:qe.y,Gt=xe.x>Re.x?xe.x>qe.x?xe.x:qe.x:Re.x>qe.x?Re.x:qe.x,tr=xe.y>Re.y?xe.y>qe.y?xe.y:qe.y:Re.y>qe.y?Re.y:qe.y,Pr=F1(pt,Dt,C,H,ne),Zr=F1(Gt,tr,C,H,ne),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Pr&&ua&&ua.z<=Zr;){if(Vr!==k.prev&&Vr!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Pr;){if(Vr!==k.prev&&Vr!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.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(xe.x,xe.y,Re.x,Re.y,qe.x,qe.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 ne=k;do{var xe=ne.prev,Re=ne.next.next;!C0(xe,Re)&&kg(xe,ne,ne.next,Re)&&P0(xe,Re)&&P0(Re,xe)&&(C.push(xe.i/H),C.push(ne.i/H),C.push(Re.i/H),I0(ne),I0(ne.next),ne=k=Re),ne=ne.next}while(ne!==k);return uv(ne)}function yd(k,C,H,ne,xe,Re){var qe=k;do{for(var pt=qe.next.next;pt!==qe.prev;){if(qe.i!==pt.i&&cm(qe,pt)){var Dt=B1(qe,pt);qe=uv(qe,qe.next),Dt=uv(Dt,Dt.next),E0(qe,C,H,ne,xe,Re),E0(Dt,C,H,ne,xe,Re);return}pt=pt.next}qe=qe.next}while(qe!==k)}function cv(k,C,H,ne){var xe=[],Re,qe,pt,Dt,Gt;for(Re=0,qe=C.length;Re<qe;Re++)pt=C[Re]*ne,Dt=Re<qe-1?C[Re+1]*ne:k.length,Gt=Mg(k,pt,Dt,ne,!1),Gt===Gt.next&&(Gt.steiner=!0),xe.push(O1(Gt));for(xe.sort(Bx),Re=0;Re<xe.length;Re++)D1(xe[Re],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,ne=k.x,xe=k.y,Re=-1/0,qe;do{if(xe<=H.y&&xe>=H.next.y&&H.next.y!==H.y){var pt=H.x+(xe-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(pt<=ne&&pt>Re){if(Re=pt,pt===ne){if(xe===H.y)return H;if(xe===H.next.y)return H.next}qe=H.x<H.next.x?H:H.next}}H=H.next}while(H!==C);if(!qe)return null;if(ne===Re)return qe;var Dt=qe,Gt=qe.x,tr=qe.y,Pr=1/0,Zr;H=qe;do ne>=H.x&&H.x>=Gt&&ne!==H.x&&fv(xe<tr?ne:Re,xe,Gt,tr,xe<tr?Re:ne,xe,H.x,H.y)&&(Zr=Math.abs(xe-H.y)/(ne-H.x),P0(H,k)&&(Zr<Pr||Zr===Pr&&(H.x>qe.x||H.x===qe.x&&$T(qe,H)))&&(qe=H,Pr=Zr)),H=H.next;while(H!==Dt);return qe}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,H,ne){var xe=k;do xe.z===null&&(xe.z=F1(xe.x,xe.y,C,H,ne)),xe.prevZ=xe.prev,xe.nextZ=xe.next,xe=xe.next;while(xe!==k);xe.prevZ.nextZ=null,xe.prevZ=null,z1(xe)}function z1(k){var C,H,ne,xe,Re,qe,pt,Dt,Gt=1;do{for(H=k,k=null,Re=null,qe=0;H;){for(qe++,ne=H,pt=0,C=0;C<Gt&&(pt++,ne=ne.nextZ,!!ne);C++);for(Dt=Gt;pt>0||Dt>0&&ne;)pt!==0&&(Dt===0||!ne||H.z<=ne.z)?(xe=H,H=H.nextZ,pt--):(xe=ne,ne=ne.nextZ,Dt--),Re?Re.nextZ=xe:k=xe,xe.prevZ=Re,Re=xe;H=ne}Re.nextZ=null,Gt*=2}while(qe>1);return k}function F1(k,C,H,ne,xe){return k=32767*(k-H)*xe,C=32767*(C-ne)*xe,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,ne,xe,Re,qe,pt){return(xe-qe)*(C-pt)-(k-qe)*(Re-pt)>=0&&(k-qe)*(ne-pt)-(H-qe)*(C-pt)>=0&&(H-qe)*(Re-pt)-(xe-qe)*(ne-pt)>=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,ne){var xe=Dv(cf(k,C,H)),Re=Dv(cf(k,C,ne)),qe=Dv(cf(H,ne,k)),pt=Dv(cf(H,ne,C));return!!(xe!==Re&&qe!==pt||xe===0&&L0(k,H,C)||Re===0&&L0(k,ne,C)||qe===0&&L0(H,k,ne)||pt===0&&L0(H,C,ne))}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,ne=!1,xe=(k.x+C.x)/2,Re=(k.y+C.y)/2;do H.y>Re!=H.next.y>Re&&H.next.y!==H.y&&xe<(H.next.x-H.x)*(Re-H.y)/(H.next.y-H.y)+H.x&&(ne=!ne),H=H.next;while(H!==k);return ne}function B1(k,C){var H=new N1(k.i,k.x,k.y),ne=new N1(C.i,C.x,C.y),xe=k.next,Re=C.prev;return k.next=C,C.prev=k,H.next=xe,xe.prev=H,ne.next=H,H.prev=ne,Re.next=ne,ne.prev=Re,ne}function Ux(k,C,H,ne){var xe=new N1(k,C,H);return ne?(xe.next=ne.next,xe.prev=ne,ne.next.prev=xe,ne.next=xe):(xe.prev=xe,xe.next=xe),xe}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,ne){var xe=C&&C.length,Re=xe?C[0]*H:k.length,qe=Math.abs(U1(k,0,Re,H));if(xe)for(var pt=0,Dt=C.length;pt<Dt;pt++){var Gt=C[pt]*H,tr=pt<Dt-1?C[pt+1]*H:k.length;qe-=Math.abs(U1(k,Gt,tr,H))}var Pr=0;for(pt=0;pt<ne.length;pt+=3){var Zr=ne[pt]*H,Vr=ne[pt+1]*H,ua=ne[pt+2]*H;Pr+=Math.abs((k[Zr]-k[ua])*(k[Vr+1]-k[Zr+1])-(k[Zr]-k[Vr])*(k[ua+1]-k[Zr+1]))}return qe===0&&Pr===0?0:Math.abs((Pr-qe)/qe)};function U1(k,C,H,ne){for(var xe=0,Re=C,qe=H-ne;Re<H;Re+=ne)xe+=(k[qe]-k[Re])*(k[Re+1]+k[qe+1]),qe=Re;return xe}um.flatten=function(k){for(var C=k[0][0].length,H={vertices:[],holes:[],dimensions:C},ne=0,xe=0;xe<k.length;xe++){for(var Re=0;Re<k[xe].length;Re++)for(var qe=0;qe<C;qe++)H.vertices.push(k[xe][Re][qe]);xe>0&&(ne+=k[xe-1].length,H.holes.push(ne))}return H},Sg.default=zx;function j1(k,C,H,ne,xe){Hd(k,C,H||0,ne||k.length-1,xe||jx)}function Hd(k,C,H,ne,xe){for(;ne>H;){if(ne-H>600){var Re=ne-H+1,qe=C-H+1,pt=Math.log(Re),Dt=.5*Math.exp(2*pt/3),Gt=.5*Math.sqrt(pt*Dt*(Re-Dt)/Re)*(qe-Re/2<0?-1:1),tr=Math.max(H,Math.floor(C-qe*Dt/Re+Gt)),Pr=Math.min(ne,Math.floor(C+(Re-qe)*Dt/Re+Gt));Hd(k,C,tr,Pr,xe)}var Zr=k[C],Vr=H,ua=ne;for(fm(k,H,C),xe(k[ne],Zr)>0&&fm(k,H,ne);Vr<ua;){for(fm(k,Vr,ua),Vr++,ua--;xe(k[Vr],Zr)<0;)Vr++;for(;xe(k[ua],Zr)>0;)ua--}xe(k[H],Zr)===0?fm(k,H,ua):(ua++,fm(k,ua,ne)),ua<=C&&(H=ua+1),C<=ua&&(ne=ua-1)}}function fm(k,C,H){var ne=k[C];k[C]=k[H],k[H]=ne}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 ne=[],xe,Re,qe=0;qe<H;qe++){var pt=$(k[qe]);pt!==0&&(k[qe].area=Math.abs(pt),Re===void 0&&(Re=pt<0),Re===pt<0?(xe&&ne.push(xe),xe=[k[qe]]):xe.push(k[qe]))}if(xe&&ne.push(xe),C>1)for(var Dt=0;Dt<ne.length;Dt++)ne[Dt].length<=C||(j1(ne[Dt],C,1,ne[Dt].length-1,qx),ne[Dt]=ne[Dt].slice(0,C));return ne}function qx(k,C){return C.area-k.area}function Lg(k,C,H){for(var ne=H.patternDependencies,xe=!1,Re=0,qe=C;Re<qe.length;Re+=1){var pt=qe[Re],Dt=pt.paint.get(k+"-pattern");Dt.isConstant()||(xe=!0);var Gt=Dt.constantOr(null);Gt&&(xe=!0,ne[Gt.to]=!0,ne[Gt.from]=!0)}return xe}function R0(k,C,H,ne,xe){for(var Re=xe.patternDependencies,qe=0,pt=C;qe<pt.length;qe+=1){var Dt=pt[qe],Gt=Dt.paint.get(k+"-pattern"),tr=Gt.value;if(tr.kind!=="constant"){var Pr=tr.evaluate({zoom:ne-1},H,{},xe.availableImages),Zr=tr.evaluate({zoom:ne},H,{},xe.availableImages),Vr=tr.evaluate({zoom:ne+1},H,{},xe.availableImages);Pr=Pr&&Pr.name?Pr.name:Pr,Zr=Zr&&Zr.name?Zr.name:Zr,Vr=Vr&&Vr.name?Vr.name:Vr,Re[Pr]=!0,Re[Zr]=!0,Re[Vr]=!0,H.patterns[Dt.id]={min:Pr,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 Co,this.segments2=new Co,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};rd.prototype.populate=function(C,H,ne){this.hasPattern=Lg("fill",this.layers,H);for(var xe=this.layers[0].layout.get("fill-sort-key"),Re=[],qe=0,pt=C;qe<pt.length;qe+=1){var Dt=pt[qe],Gt=Dt.feature,tr=Dt.id,Pr=Dt.index,Zr=Dt.sourceLayerIndex,Vr=this.layers[0]._featureFilter.needGeometry,ua=_o(Gt,Vr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),ua,ne)){var Oa=xe?xe.evaluate(ua,{},ne,H.availableImages):void 0,Mi={id:tr,properties:Gt.properties,type:Gt.type,sourceLayerIndex:Zr,index:Pr,geometry:Vr?ua.geometry:fn(Gt),patterns:{},sortKey:Oa};Re.push(Mi)}}xe&&Re.sort(function(oo,go){return oo.sortKey-go.sortKey});for(var ii=0,$i=Re;ii<$i.length;ii+=1){var Oi=$i[ii],Ji=Oi,ln=Ji.geometry,Tn=Ji.index,Vn=Ji.sourceLayerIndex;if(this.hasPattern){var Nn=R0("fill",this.layers,Oi,this.zoom,H);this.patternFeatures.push(Nn)}else this.addFeature(Oi,ln,Tn,ne,{});var So=C[Tn].feature;H.featureIndex.insert(So,ln,Tn,Vn,this.index)}},rd.prototype.update=function(C,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,ne)},rd.prototype.addFeatures=function(C,H,ne){for(var xe=0,Re=this.patternFeatures;xe<Re.length;xe+=1){var qe=Re[xe];this.addFeature(qe,qe.geometry,qe.index,H,ne)}},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,ne,xe,Re){for(var qe=0,pt=Cg(H,D0);qe<pt.length;qe+=1){for(var Dt=pt[qe],Gt=0,tr=0,Pr=Dt;tr<Pr.length;tr+=1){var Zr=Pr[tr];Gt+=Zr.length}for(var Vr=this.segments.prepareSegment(Gt,this.layoutVertexArray,this.indexArray),ua=Vr.vertexLength,Oa=[],Mi=[],ii=0,$i=Dt;ii<$i.length;ii+=1){var Oi=$i[ii];if(Oi.length!==0){Oi!==Dt[0]&&Mi.push(Oa.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),Oa.push(Oi[0].x),Oa.push(Oi[0].y);for(var Tn=1;Tn<Oi.length;Tn++)this.layoutVertexArray.emplaceBack(Oi[Tn].x,Oi[Tn].y),this.indexArray2.emplaceBack(ln+Tn-1,ln+Tn),Oa.push(Oi[Tn].x),Oa.push(Oi[Tn].y);Ji.vertexLength+=Oi.length,Ji.primitiveLength+=Oi.length}}for(var Vn=Sg(Oa,Mi),Nn=0;Nn<Vn.length;Nn+=3)this.indexArray.emplaceBack(ua+Vn[Nn],ua+Vn[Nn+1],ua+Vn[Nn+2]);Vr.vertexLength+=Gt,Vr.primitiveLength+=Vn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,ne,Re,xe)},de("FillBucket",rd,{omit:["layers","patternFeatures"]});var q1=new ma({"fill-sort-key":new Zt(Gi.layout_fill["fill-sort-key"])}),Vx=new ma({"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 fr(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(ne,xe){k.prototype.recalculate.call(this,ne,xe);var Re=this.paint._values["fill-outline-color"];Re.value.kind==="constant"&&Re.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},C.prototype.createBucket=function(ne){return new rd(ne)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-translate"))},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=Vp(ne,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Dt.angle,Gt);return Ys(tr,qe)},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,ne,xe){this.properties={},this.extent=H,this.type=0,this._pbf=k,this._geometry=-1,this._keys=ne,this._values=xe,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 ne=C._keys[k.readVarint()],xe=C._values[k.readVarint()];C.properties[ne]=xe}}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,ne=0,xe=0,Re=0,qe=[],pt;k.pos<C;){if(ne<=0){var Dt=k.readVarint();H=Dt&7,ne=Dt>>3}if(ne--,H===1||H===2)xe+=k.readSVarint(),Re+=k.readSVarint(),H===1&&(pt&&qe.push(pt),pt=[]),pt.push(new n(xe,Re));else if(H===7)pt&&pt.push(pt[0].clone());else throw new Error("unknown command "+H)}return pt&&qe.push(pt),qe},zv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,H=1,ne=0,xe=0,Re=0,qe=1/0,pt=-1/0,Dt=1/0,Gt=-1/0;k.pos<C;){if(ne<=0){var tr=k.readVarint();H=tr&7,ne=tr>>3}if(ne--,H===1||H===2)xe+=k.readSVarint(),Re+=k.readSVarint(),xe<qe&&(qe=xe),xe>pt&&(pt=xe),Re<Dt&&(Dt=Re),Re>Gt&&(Gt=Re);else if(H!==7)throw new Error("unknown command "+H)}return[qe,Dt,pt,Gt]},zv.prototype.toGeoJSON=function(k,C,H){var ne=this.extent*Math.pow(2,H),xe=this.extent*k,Re=this.extent*C,qe=this.loadGeometry(),pt=zv.types[this.type],Dt,Gt;function tr(Vr){for(var ua=0;ua<Vr.length;ua++){var Oa=Vr[ua],Mi=180-(Oa.y+Re)*360/ne;Vr[ua]=[(Oa.x+xe)*360/ne-180,360/Math.PI*Math.atan(Math.exp(Mi*Math.PI/180))-90]}}switch(this.type){case 1:var Pr=[];for(Dt=0;Dt<qe.length;Dt++)Pr[Dt]=qe[Dt][0];qe=Pr,tr(qe);break;case 2:for(Dt=0;Dt<qe.length;Dt++)tr(qe[Dt]);break;case 3:for(qe=eA(qe),Dt=0;Dt<qe.length;Dt++)for(Gt=0;Gt<qe[Dt].length;Gt++)tr(qe[Dt][Gt]);break}qe.length===1?qe=qe[0]:pt="Multi"+pt;var Zr={type:"Feature",geometry:{type:pt,coordinates:qe},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=[],ne,xe,Re=0;Re<C;Re++){var qe=Zx(k[Re]);qe!==0&&(xe===void 0&&(xe=qe<0),xe===qe<0?(ne&&H.push(ne),ne=[k[Re]]):ne.push(k[Re]))}return ne&&H.push(ne),H}function Zx(k){for(var C=0,H=0,ne=k.length,xe=ne-1,Re,qe;H<ne;xe=H++)Re=k[H],qe=k[xe],C+=(qe.x-Re.x)*(Re.y+qe.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 ne=k.readVarint()>>3;C=ne===1?k.readString():ne===2?k.readFloat():ne===3?k.readDouble():ne===4?k.readVarint64():ne===5?k.readVarint():ne===6?k.readSVarint():ne===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 ne=new Wd(H,H.readVarint()+H.pos);ne.length&&(C[ne.name]=ne)}}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,ne,xe,Re,qe,pt){k.emplaceBack(C,H,Math.floor(ne*pm)*2+qe,xe*pm*2,Re*pm*2,Math.round(pt))}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 Co,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};cd.prototype.populate=function(C,H,ne){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,H);for(var xe=0,Re=C;xe<Re.length;xe+=1){var qe=Re[xe],pt=qe.feature,Dt=qe.id,Gt=qe.index,tr=qe.sourceLayerIndex,Pr=this.layers[0]._featureFilter.needGeometry,Zr=_o(pt,Pr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),Zr,ne)){var Vr={id:Dt,sourceLayerIndex:tr,index:Gt,geometry:Pr?Zr.geometry:fn(pt),properties:pt.properties,type:pt.type,patterns:{}};this.hasPattern?this.features.push(R0("fill-extrusion",this.layers,Vr,this.zoom,H)):this.addFeature(Vr,Vr.geometry,Gt,ne,{}),H.featureIndex.insert(pt,Vr.geometry,Gt,tr,this.index,!0)}}},cd.prototype.addFeatures=function(C,H,ne){for(var xe=0,Re=this.features;xe<Re.length;xe+=1){var qe=Re[xe],pt=qe.geometry;this.addFeature(qe,pt,qe.index,H,ne)}},cd.prototype.update=function(C,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,ne)},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,ne,xe,Re){for(var qe=0,pt=Cg(H,Pg);qe<pt.length;qe+=1){for(var Dt=pt[qe],Gt=0,tr=0,Pr=Dt;tr<Pr.length;tr+=1){var Zr=Pr[tr];Gt+=Zr.length}for(var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),ua=0,Oa=Dt;ua<Oa.length;ua+=1){var Mi=Oa[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>Co.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),Tn=Ji.dist(Oi);ii+Tn>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+=Tn,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+Gt>Co.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Gt,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],So=[],oo=Vr.vertexLength,go=0,ks=Dt;go<ks.length;go+=1){var Mo=ks[go];if(Mo.length!==0){Mo!==Dt[0]&&So.push(Nn.length/2);for(var Po=0;Po<Mo.length;Po++){var $s=Mo[Po];hv(this.layoutVertexArray,$s.x,$s.y,0,0,1,1,0),Nn.push($s.x),Nn.push($s.y)}}}for(var ws=Sg(Nn,So),Xl=0;Xl<ws.length;Xl+=3)this.indexArray.emplaceBack(oo+ws[Xl],oo+ws[Xl+2],oo+ws[Xl+1]);Vr.primitiveLength+=ws.length/3,Vr.vertexLength+=Gt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,ne,Re,xe)},de("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 ma({"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 fr(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(ne){return new cd(ne)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt,tr){var Pr=Vp(ne,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Dt.angle,Gt),Zr=this.paint.get("fill-extrusion-height").evaluate(xe,Re),Vr=this.paint.get("fill-extrusion-base").evaluate(xe,Re),ua=nA(Pr,tr,Dt,0),Oa=W1(qe,Vr,Zr,tr),Mi=Oa[0],ii=Oa[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,ne=C[H++],xe;!xe||ne.equals(xe);)if(xe=C[H++],!xe)return 1/0;for(;H<C.length;H++){var Re=C[H],qe=k[0],pt=xe.sub(ne),Dt=Re.sub(ne),Gt=qe.sub(ne),tr=Fv(pt,pt),Pr=Fv(pt,Dt),Zr=Fv(Dt,Dt),Vr=Fv(Gt,pt),ua=Fv(Gt,Dt),Oa=tr*Zr-Pr*Pr,Mi=(Zr*Vr-Pr*ua)/Oa,ii=(tr*ua-Pr*Vr)/Oa,$i=1-Mi-ii,Oi=ne.z*$i+xe.z*Mi+Re.z*ii;if(isFinite(Oi))return Oi}return 1/0}else{for(var Ji=1/0,ln=0,Tn=C;ln<Tn.length;ln+=1){var Vn=Tn[ln];Ji=Math.min(Ji,Vn.z)}return Ji}}function tb(k,C,H){var ne=1/0;Ys(H,C)&&(ne=H1(H,C[0]));for(var xe=0;xe<C.length;xe++)for(var Re=C[xe],qe=k[xe],pt=0;pt<Re.length-1;pt++){var Dt=Re[pt],Gt=Re[pt+1],tr=qe[pt],Pr=qe[pt+1],Zr=[Dt,Gt,Pr,tr,Dt];Do(H,Zr)&&(ne=Math.min(ne,H1(H,Zr)))}return ne===1/0?!1:ne}function W1(k,C,H,ne){for(var xe=[],Re=[],qe=ne[8]*C,pt=ne[9]*C,Dt=ne[10]*C,Gt=ne[11]*C,tr=ne[8]*H,Pr=ne[9]*H,Zr=ne[10]*H,Vr=ne[11]*H,ua=0,Oa=k;ua<Oa.length;ua+=1){for(var Mi=Oa[ua],ii=[],$i=[],Oi=0,Ji=Mi;Oi<Ji.length;Oi+=1){var ln=Ji[Oi],Tn=ln.x,Vn=ln.y,Nn=ne[0]*Tn+ne[4]*Vn+ne[12],So=ne[1]*Tn+ne[5]*Vn+ne[13],oo=ne[2]*Tn+ne[6]*Vn+ne[14],go=ne[3]*Tn+ne[7]*Vn+ne[15],ks=Nn+qe,Mo=So+pt,Po=oo+Dt,$s=go+Gt,ws=Nn+tr,Xl=So+Pr,zu=oo+Zr,Zl=go+Vr,Yl=new n(ks/$s,Mo/$s);Yl.z=Po/$s,ii.push(Yl);var Ol=new n(ws/Zl,Xl/Zl);Ol.z=zu/Zl,$i.push(Ol)}xe.push(ii),Re.push($i)}return[xe,Re]}function nA(k,C,H,ne){for(var xe=[],Re=0,qe=k;Re<qe.length;Re+=1){var pt=qe[Re],Dt=[pt.x,pt.y,ne,1];Rv(Dt,Dt,C),xe.push(new n(Dt[0]/Dt[3],Dt[1]/Dt[3]))}return xe}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(ne){return ne.id}),this.index=C.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(ne){H.gradients[ne.id]={}}),this.layoutVertexArray=new Va,this.layoutVertexArray2=new Bi,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Co,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(ne){return ne.isStateDependent()}).map(function(ne){return ne.id})};Hf.prototype.populate=function(C,H,ne){this.hasPattern=Lg("line",this.layers,H);for(var xe=this.layers[0].layout.get("line-sort-key"),Re=[],qe=0,pt=C;qe<pt.length;qe+=1){var Dt=pt[qe],Gt=Dt.feature,tr=Dt.id,Pr=Dt.index,Zr=Dt.sourceLayerIndex,Vr=this.layers[0]._featureFilter.needGeometry,ua=_o(Gt,Vr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),ua,ne)){var Oa=xe?xe.evaluate(ua,{},ne):void 0,Mi={id:tr,properties:Gt.properties,type:Gt.type,sourceLayerIndex:Zr,index:Pr,geometry:Vr?ua.geometry:fn(Gt),patterns:{},sortKey:Oa};Re.push(Mi)}}xe&&Re.sort(function(oo,go){return oo.sortKey-go.sortKey});for(var ii=0,$i=Re;ii<$i.length;ii+=1){var Oi=$i[ii],Ji=Oi,ln=Ji.geometry,Tn=Ji.index,Vn=Ji.sourceLayerIndex;if(this.hasPattern){var Nn=R0("line",this.layers,Oi,this.zoom,H);this.patternFeatures.push(Nn)}else this.addFeature(Oi,ln,Tn,ne,{});var So=C[Tn].feature;H.featureIndex.insert(So,ln,Tn,Vn,this.index)}},Hf.prototype.update=function(C,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(C,H,this.stateDependentLayers,ne)},Hf.prototype.addFeatures=function(C,H,ne){for(var xe=0,Re=this.patternFeatures;xe<Re.length;xe+=1){var qe=Re[xe];this.addFeature(qe,qe.geometry,qe.index,H,ne)}},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,ne=+C.properties.mapbox_clip_end;return{start:H,end:ne}}},Hf.prototype.addFeature=function(C,H,ne,xe,Re){var qe=this.layers[0].layout,pt=qe.get("line-join").evaluate(C,{}),Dt=qe.get("line-cap"),Gt=qe.get("line-miter-limit"),tr=qe.get("line-round-limit");this.lineClips=this.lineFeatureClips(C);for(var Pr=0,Zr=H;Pr<Zr.length;Pr+=1){var Vr=Zr[Pr];this.addLine(Vr,C,pt,Dt,Gt,tr)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,ne,Re,xe)},Hf.prototype.addLine=function(C,H,ne,xe,Re,qe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var pt=0;pt<C.length-1;pt++)this.totalDistance+=C[pt].dist(C[pt+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var Dt=X1[H.type]==="Polygon",Gt=C.length;Gt>=2&&C[Gt-1].equals(C[Gt-2]);)Gt--;for(var tr=0;tr<Gt-1&&C[tr].equals(C[tr+1]);)tr++;if(!(Gt<(Dt?3:2))){ne==="bevel"&&(Re=1.05);var Pr=this.overscaling<=16?F0*ui/(512*this.overscaling):0,Zr=this.segments.prepareSegment(Gt*10,this.layoutVertexArray,this.indexArray),Vr,ua=void 0,Oa=void 0,Mi=void 0,ii=void 0;this.e1=this.e2=-1,Dt&&(Vr=C[Gt-2],ii=C[tr].sub(Vr)._unit()._perp());for(var $i=tr;$i<Gt;$i++)if(Oa=$i===Gt-1?Dt?C[tr+1]:void 0:C[$i+1],!(Oa&&C[$i].equals(Oa))){ii&&(Mi=ii),Vr&&(ua=Vr),Vr=C[$i],ii=Oa?Oa.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,Tn=ln!==0?1/ln:1/0,Vn=2*Math.sqrt(2-2*ln),Nn=ln<nb&&ua&&Oa,So=Mi.x*ii.y-Mi.y*ii.x>0;if(Nn&&$i>tr){var oo=Vr.dist(ua);if(oo>2*Pr){var go=Vr.sub(Vr.sub(ua)._mult(Pr/oo)._round());this.updateDistance(ua,go),this.addCurrentVertex(go,Mi,0,0,Zr),ua=go}}var ks=ua&&Oa,Mo=ks?ne:Dt?"butt":xe;if(ks&&Mo==="round"&&(Tn<qe?Mo="miter":Tn<=2&&(Mo="fakeround")),Mo==="miter"&&Tn>Re&&(Mo="bevel"),Mo==="bevel"&&(Tn>2&&(Mo="flipbevel"),Tn<Re&&(Mo="miter")),ua&&this.updateDistance(ua,Vr),Mo==="miter")Oi._mult(Tn),this.addCurrentVertex(Vr,Oi,0,0,Zr);else if(Mo==="flipbevel"){if(Tn>100)Oi=ii.mult(-1);else{var Po=Tn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Po*(So?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(Mo==="bevel"||Mo==="fakeround"){var $s=-Math.sqrt(Tn*Tn-1),ws=So?$s:0,Xl=So?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,ws,Xl,Zr),Mo==="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(So?-1:1);this.addHalfVertex(Vr,hf.x,hf.y,!1,So,0,Zr)}Oa&&this.addCurrentVertex(Vr,ii,-ws,-Xl,Zr)}else if(Mo==="butt")this.addCurrentVertex(Vr,Oi,0,0,Zr);else if(Mo==="square"){var _f=ua?1:-1;this.addCurrentVertex(Vr,Oi,_f,_f,Zr)}else Mo==="round"&&(ua&&(this.addCurrentVertex(Vr,Mi,0,0,Zr),this.addCurrentVertex(Vr,Mi,1,1,Zr,!0)),Oa&&(this.addCurrentVertex(Vr,ii,-1,-1,Zr,!0),this.addCurrentVertex(Vr,ii,0,0,Zr)));if(Nn&&$i<Gt-1){var gh=Vr.dist(Oa);if(gh>2*Pr){var Zf=Vr.add(Oa.sub(Vr)._mult(Pr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,H,ne,xe,Re,qe){qe===void 0&&(qe=!1);var pt=H.x+H.y*ne,Dt=H.y-H.x*ne,Gt=-H.x+H.y*xe,tr=-H.y-H.x*xe;this.addHalfVertex(C,pt,Dt,qe,!1,ne,Re),this.addHalfVertex(C,Gt,tr,qe,!0,-xe,Re),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,H,ne,xe,Re,qe))},Hf.prototype.addHalfVertex=function(C,H,ne,xe,Re,qe,pt){var Dt=C.x,Gt=C.y,tr=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Pr=tr*Rg;if(this.layoutVertexArray.emplaceBack((Dt<<1)+(xe?1:0),(Gt<<1)+(Re?1:0),Math.round(Ig*H)+128,Math.round(Ig*ne)+128,(qe===0?0:qe<0?-1:1)+1|(Pr&63)<<2,Pr>>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 Oa=pt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),pt.primitiveLength++),Re?this.e2=Oa:this.e1=Oa},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()},de("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"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 ma({"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 fr(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(ne,xe){return xe=new gn(Math.floor(xe.zoom),{now:xe.now,fadeDuration:xe.fadeDuration,zoomHistory:xe.zoomHistory,transition:xe.transition}),k.prototype.possiblyEvaluate.call(this,ne,xe)},C.prototype.evaluate=function(ne,xe,Re,qe){return xe=g({},xe,{zoom:Math.floor(xe.zoom)}),k.prototype.evaluate.call(this,ne,xe,Re,qe)},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(ne){if(ne==="line-gradient"){var xe=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=xe._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%c}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(ne,xe){k.prototype.recalculate.call(this,ne,xe),this.paint._values["line-floorwidth"]=W.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ne)},C.prototype.createBucket=function(ne){return new Hf(ne)},C.prototype.queryRadius=function(ne){var xe=ne,Re=J(Rh("line-width",this,xe),Rh("line-gap-width",this,xe)),qe=Rh("line-offset",this,xe);return Re/2+Math.abs(qe)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=Vp(ne,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Dt.angle,Gt),Pr=Gt/2*J(this.paint.get("line-width").evaluate(xe,Re),this.paint.get("line-gap-width").evaluate(xe,Re)),Zr=this.paint.get("line-offset").evaluate(xe,Re);return Zr&&(qe=pe(qe,Zr*Gt)),mu(tr,qe,Pr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function pe(k,C){for(var H=[],ne=new n(0,0),xe=0;xe<k.length;xe++){for(var Re=k[xe],qe=[],pt=0;pt<Re.length;pt++){var Dt=Re[pt-1],Gt=Re[pt],tr=Re[pt+1],Pr=pt===0?ne:Gt.sub(Dt)._unit()._perp(),Zr=pt===Re.length-1?ne:tr.sub(Gt)._unit()._perp(),Vr=Pr._add(Zr)._unit(),ua=Vr.x*Zr.x+Vr.y*Zr.y;Vr._mult(1/ua),qe.push(Vr._mult(C)._add(Gt))}H.push(qe)}return H}var ke=Ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),je=Ei([{name:"a_projected_pos",components:3,type:"Float32"}],4),We=Ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ht=Ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),Et=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"}]),Ut=Ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),or=Ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),Mr=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"}]),ha=Ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function ja(k,C,H){var ne=C.layout.get("text-transform").evaluate(H,{});return ne==="uppercase"?k=k.toLocaleUpperCase():ne==="lowercase"&&(k=k.toLocaleLowerCase()),al.applyArabicShaping&&(k=al.applyArabicShaping(k)),k}function Ka(k,C,H){return k.sections.forEach(function(ne){ne.text=ja(ne.text,C,H)}),k}function Wi(k){var C={},H={},ne=[],xe=0;function Re(ii){ne.push(k[ii]),xe++}function qe(ii,$i,Oi){var Ji=H[ii];return delete H[ii],H[$i]=Ji,ne[Ji].geometry[0].pop(),ne[Ji].geometry[0]=ne[Ji].geometry[0].concat(Oi[0]),Ji}function pt(ii,$i,Oi){var Ji=C[$i];return delete C[$i],C[ii]=Ji,ne[Ji].geometry[0].shift(),ne[Ji].geometry[0]=Oi[0].concat(ne[Ji].geometry[0]),Ji}function Dt(ii,$i,Oi){var Ji=Oi?$i[0][$i[0].length-1]:$i[0][0];return ii+":"+Ji.x+":"+Ji.y}for(var Gt=0;Gt<k.length;Gt++){var tr=k[Gt],Pr=tr.geometry,Zr=tr.text?tr.text.toString():null;if(!Zr){Re(Gt);continue}var Vr=Dt(Zr,Pr),ua=Dt(Zr,Pr,!0);if(Vr in H&&ua in C&&H[Vr]!==C[ua]){var Oa=pt(Vr,ua,Pr),Mi=qe(Vr,ua,ne[Oa].geometry);delete C[Vr],delete H[ua],H[Dt(Zr,ne[Mi].geometry,!0)]=Mi,ne[Oa].geometry=null}else Vr in H?qe(Vr,ua,Pr):ua in C?pt(Vr,ua,Pr):(Re(Gt),C[Vr]=xe-1,H[ua]=xe-1)}return ne.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 ne=k.charCodeAt(H+1)||null,xe=k.charCodeAt(H-1)||null,Re=(!ne||!ti(ne)||gi[k[H+1]])&&(!xe||!ti(xe)||gi[k[H-1]]);Re&&gi[k[H]]?C+=gi[k[H]]:C+=k[H]}return C}var en=24,qn=function(k,C,H,ne,xe){var Re,qe,pt=xe*8-ne-1,Dt=(1<<pt)-1,Gt=Dt>>1,tr=-7,Pr=H?xe-1:0,Zr=H?-1:1,Vr=k[C+Pr];for(Pr+=Zr,Re=Vr&(1<<-tr)-1,Vr>>=-tr,tr+=pt;tr>0;Re=Re*256+k[C+Pr],Pr+=Zr,tr-=8);for(qe=Re&(1<<-tr)-1,Re>>=-tr,tr+=ne;tr>0;qe=qe*256+k[C+Pr],Pr+=Zr,tr-=8);if(Re===0)Re=1-Gt;else{if(Re===Dt)return qe?NaN:(Vr?-1:1)*(1/0);qe=qe+Math.pow(2,ne),Re=Re-Gt}return(Vr?-1:1)*qe*Math.pow(2,Re-ne)},Eo=function(k,C,H,ne,xe,Re){var qe,pt,Dt,Gt=Re*8-xe-1,tr=(1<<Gt)-1,Pr=tr>>1,Zr=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=ne?0:Re-1,ua=ne?1:-1,Oa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(pt=isNaN(C)?1:0,qe=tr):(qe=Math.floor(Math.log(C)/Math.LN2),C*(Dt=Math.pow(2,-qe))<1&&(qe--,Dt*=2),qe+Pr>=1?C+=Zr/Dt:C+=Zr*Math.pow(2,1-Pr),C*Dt>=2&&(qe++,Dt/=2),qe+Pr>=tr?(pt=0,qe=tr):qe+Pr>=1?(pt=(C*Dt-1)*Math.pow(2,xe),qe=qe+Pr):(pt=C*Math.pow(2,Pr-1)*Math.pow(2,xe),qe=0));xe>=8;k[H+Vr]=pt&255,Vr+=ua,pt/=256,xe-=8);for(qe=qe<<xe|pt,Gt+=xe;Gt>0;k[H+Vr]=qe&255,Vr+=ua,qe/=256,Gt-=8);k[H+Vr-ua]|=Oa*128},ys={read:qn,write:Eo},mo=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 ts=65536*65536,Uo=1/ts,zo=12,wn=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 ne=this.readVarint(),xe=ne>>3,Re=this.pos;this.type=ne&7,k(xe,C,this),this.pos===Re&&this.skip(ne)}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)*ts;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*ts;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,ne;return ne=C[this.pos++],H=ne&127,ne<128||(ne=C[this.pos++],H|=(ne&127)<<7,ne<128)||(ne=C[this.pos++],H|=(ne&127)<<14,ne<128)||(ne=C[this.pos++],H|=(ne&127)<<21,ne<128)?H:(ne=C[this.pos],H|=(ne&15)<<28,os(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>=zo&&wn?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=Fo(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=Fo(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=Fo(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=Fo(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=Fo(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=Fo(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=Fo(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=Fo(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=Fo(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*Uo),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*Uo),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 ne=this.pos-H;ne>=128&&Hp(H,ne,this),this.pos=H-1,this.writeVarint(ne),this.pos+=ne},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 os(k,C,H){var ne=H.buf,xe,Re;if(Re=ne[H.pos++],xe=(Re&112)>>4,Re<128||(Re=ne[H.pos++],xe|=(Re&127)<<3,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<10,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<17,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<24,Re<128)||(Re=ne[H.pos++],xe|=(Re&1)<<31,Re<128))return Ls(k,xe,C);throw new Error("Expected varint not more than 10 bytes")}function Fo(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Ls(k,C,H){return H?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var H,ne;if(k>=0?(H=k%4294967296|0,ne=k/4294967296|0):(H=~(-k%4294967296),ne=~(-k/4294967296),H^4294967295?H=H+1|0:(H=0,ne=ne+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(H,ne,C),th(ne,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 ne=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));H.realloc(ne);for(var xe=H.pos-1;xe>=k;xe--)H.buf[xe+ne]=H.buf[xe]}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 ne="",xe=C;xe<H;){var Re=k[xe],qe=null,pt=Re>239?4:Re>223?3:Re>191?2:1;if(xe+pt>H)break;var Dt,Gt,tr;pt===1?Re<128&&(qe=Re):pt===2?(Dt=k[xe+1],(Dt&192)===128&&(qe=(Re&31)<<6|Dt&63,qe<=127&&(qe=null))):pt===3?(Dt=k[xe+1],Gt=k[xe+2],(Dt&192)===128&&(Gt&192)===128&&(qe=(Re&15)<<12|(Dt&63)<<6|Gt&63,(qe<=2047||qe>=55296&&qe<=57343)&&(qe=null))):pt===4&&(Dt=k[xe+1],Gt=k[xe+2],tr=k[xe+3],(Dt&192)===128&&(Gt&192)===128&&(tr&192)===128&&(qe=(Re&15)<<18|(Dt&63)<<12|(Gt&63)<<6|tr&63,(qe<=65535||qe>=1114112)&&(qe=null))),qe===null?(qe=65533,pt=1):qe>65535&&(qe-=65536,ne+=String.fromCharCode(qe>>>10&1023|55296),qe=56320|qe&1023),ne+=String.fromCharCode(qe),xe+=pt}return ne}function hu(k,C,H){return wn.decode(k.subarray(C,H))}function fc(k,C,H){for(var ne=0,xe,Re;ne<C.length;ne++){if(xe=C.charCodeAt(ne),xe>55295&&xe<57344)if(Re)if(xe<56320){k[H++]=239,k[H++]=191,k[H++]=189,Re=xe;continue}else xe=Re-55296<<10|xe-56320|65536,Re=null;else{xe>56319||ne+1===C.length?(k[H++]=239,k[H++]=191,k[H++]=189):Re=xe;continue}else Re&&(k[H++]=239,k[H++]=191,k[H++]=189,Re=null);xe<128?k[H++]=xe:(xe<2048?k[H++]=xe>>6|192:(xe<65536?k[H++]=xe>>12|224:(k[H++]=xe>>18|240,k[H++]=xe>>12&63|128),k[H++]=xe>>6&63|128),k[H++]=xe&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 ne=H.readMessage(vm,{}),xe=ne.id,Re=ne.bitmap,qe=ne.width,pt=ne.height,Dt=ne.left,Gt=ne.top,tr=ne.advance;C.push({id:xe,bitmap:new Ip({width:qe+2*Ju,height:pt+2*Ju},Re),metrics:{width:qe,height:pt,left:Dt,top:Gt,advance:tr}})}}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 mo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,H=0,ne=0,xe=k;ne<xe.length;ne+=1){var Re=xe[ne];C+=Re.w*Re.h,H=Math.max(H,Re.w)}k.sort(function(Mi,ii){return ii.h-Mi.h});for(var qe=Math.max(Math.ceil(Math.sqrt(C/.95)),H),pt=[{x:0,y:0,w:qe,h:1/0}],Dt=0,Gt=0,tr=0,Pr=k;tr<Pr.length;tr+=1)for(var Zr=Pr[tr],Vr=pt.length-1;Vr>=0;Vr--){var ua=pt[Vr];if(!(Zr.w>ua.w||Zr.h>ua.h)){if(Zr.x=ua.x,Zr.y=ua.y,Gt=Math.max(Gt,Zr.y+Zr.h),Dt=Math.max(Dt,Zr.x+Zr.w),Zr.w===ua.w&&Zr.h===ua.h){var Oa=pt.pop();Vr<pt.length&&(pt[Vr]=Oa)}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):(pt.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:Dt,h:Gt,fill:C/(Dt*Gt)||0}}var zc=1,Pf=function(C,H){var ne=H.pixelRatio,xe=H.version,Re=H.stretchX,qe=H.stretchY,pt=H.content;this.paddedRect=C,this.pixelRatio=ne,this.stretchX=Re,this.stretchY=qe,this.content=pt,this.version=xe},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 ne={},xe={};this.haveRenderCallbacks=[];var Re=[];this.addImages(C,ne,Re),this.addImages(H,xe,Re);var qe=Wp(Re),pt=qe.w,Dt=qe.h,Gt=new eh({width:pt||1,height:Dt||1});for(var tr in C){var Pr=C[tr],Zr=ne[tr].paddedRect;eh.copy(Pr.data,Gt,{x:0,y:0},{x:Zr.x+zc,y:Zr.y+zc},Pr.data)}for(var Vr in H){var ua=H[Vr],Oa=xe[Vr].paddedRect,Mi=Oa.x+zc,ii=Oa.y+zc,$i=ua.data.width,Oi=ua.data.height;eh.copy(ua.data,Gt,{x:0,y:0},{x:Mi,y:ii},ua.data),eh.copy(ua.data,Gt,{x:0,y:Oi-1},{x:Mi,y:ii-1},{width:$i,height:1}),eh.copy(ua.data,Gt,{x:0,y:0},{x:Mi,y:ii+Oi},{width:$i,height:1}),eh.copy(ua.data,Gt,{x:$i-1,y:0},{x:Mi-1,y:ii},{width:1,height:Oi}),eh.copy(ua.data,Gt,{x:0,y:0},{x:Mi+$i,y:ii},{width:1,height:Oi})}this.image=Gt,this.iconPositions=ne,this.patternPositions=xe};Zd.prototype.addImages=function(C,H,ne){for(var xe in C){var Re=C[xe],qe={x:0,y:0,w:Re.data.width+2*zc,h:Re.data.height+2*zc};ne.push(qe),H[xe]=new Pf(qe,Re),Re.hasRenderCallback&&this.haveRenderCallbacks.push(xe)}},Zd.prototype.patchUpdatedImages=function(C,H){C.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var ne in C.updatedImages)this.patchUpdatedImage(this.iconPositions[ne],C.getImage(ne),H),this.patchUpdatedImage(this.patternPositions[ne],C.getImage(ne),H)},Zd.prototype.patchUpdatedImage=function(C,H,ne){if(!(!C||!H)&&C.version!==H.version){C.version=H.version;var xe=C.tl,Re=xe[0],qe=xe[1];ne.update(H.data,void 0,{x:Re,y:qe})}},de("ImagePosition",Pf),de("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 ne=H[C];if(ne.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 ne=new Ov;return ne.scale=C||1,ne.fontStack=H,ne},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 ne=new vh,xe=0;xe<C.sections.length;xe++){var Re=C.sections[xe];Re.image?ne.addImageSection(Re):ne.addTextSection(Re,H)}return ne},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 ne=this.text.length,xe=this.text.length-1;xe>=0&&xe>=C&&bd[this.text.charCodeAt(xe)];xe--)ne--;this.text=this.text.substring(C,ne),this.sectionIndex=this.sectionIndex.slice(C,ne)},vh.prototype.substring=function(C,H){var ne=new vh;return ne.text=this.text.substring(C,H),ne.sectionIndex=this.sectionIndex.slice(C,H),ne.sections=this.sections,ne},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(H,ne){return Math.max(H,C.sections[ne].scale)},0)},vh.prototype.addTextSection=function(C,H){this.text+=C.text,this.sections.push(Ov.forText(C.scale,C.fontStack||H));for(var ne=this.sections.length-1,xe=0;xe<C.text.length;++xe)this.sectionIndex.push(ne)},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 ne=this.getNextImageSectionCharCode();if(!ne){B("Reached maximum number of images "+(xd-zg+2));return}this.text+=String.fromCharCode(ne),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=[],ne=k.text,xe=0,Re=0,qe=C;Re<qe.length;Re+=1){var pt=qe[Re];H.push(k.substring(xe,pt)),xe=pt}return xe<ne.length&&H.push(k.substring(xe,ne.length)),H}function Fg(k,C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa){var Mi=vh.fromFeature(k,xe);Pr===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,Gt,Re,C,ne,Vr,ua)),ln=0,Tn=Ji;ln<Tn.length;ln+=1){var Vn=Tn[ln],Nn=new vh;Nn.text=Vn,Nn.sections=Mi.sections;for(var So=0;So<Vn.length;So++)Nn.sectionIndex.push(0);ii.push(Nn)}}else if(Oi){ii=[];for(var oo=Oi(Mi.text,Mi.sectionIndex,Og(Mi,Gt,Re,C,ne,Vr,ua)),go=0,ks=oo;go<ks.length;go+=1){var Mo=ks[go],Po=new vh;Po.text=Mo[0],Po.sectionIndex=Mo[1],Po.sections=Mi.sections,ii.push(Po)}}else ii=lA(Mi,Og(Mi,Gt,Re,C,ne,Vr,ua));var $s=[],ws={positionedLines:$s,text:Mi.toString(),top:tr[1],bottom:tr[1],left:tr[0],right:tr[0],writingMode:Pr,iconsInText:!1,verticalizable:!1};return fA(ws,C,H,ne,ii,qe,pt,Dt,Pr,Gt,Zr,Oa),J1($s)?!1:ws}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,ne,xe,Re){if(C.imageName){var Dt=ne[C.imageName];return Dt?Dt.displaySize[0]*C.scale*en/Re+xe:0}else{var qe=H[C.fontStack],pt=qe&&qe[k];return pt?pt.metrics.advance*C.scale+xe:0}}function uA(k,C,H,ne,xe,Re){for(var qe=0,pt=0;pt<k.length();pt++){var Dt=k.getSection(pt);qe+=sb(k.getCharCode(pt),Dt,ne,xe,C,Re)}var Gt=Math.max(1,Math.ceil(qe/H));return qe/Gt}function lb(k,C,H,ne){var xe=Math.pow(k-C,2);return ne?k<C?xe/2:xe*2:xe+Math.abs(H)*H}function cA(k,C,H){var ne=0;return k===10&&(ne-=1e4),H&&(ne+=150),(k===40||k===65288)&&(ne+=50),(C===41||C===65289)&&(ne+=50),ne}function ad(k,C,H,ne,xe,Re){for(var qe=null,pt=lb(C,H,xe,Re),Dt=0,Gt=ne;Dt<Gt.length;Dt+=1){var tr=Gt[Dt],Pr=C-tr.x,Zr=lb(Pr,H,xe,Re)+tr.badness;Zr<=pt&&(qe=tr,pt=Zr)}return{index:k,x:C,priorBreak:qe,badness:pt}}function B0(k){return k?B0(k.priorBreak).concat(k.index):[]}function Og(k,C,H,ne,xe,Re,qe){if(Re!=="point")return[];if(!k)return[];for(var pt=[],Dt=uA(k,C,H,ne,xe,qe),Gt=k.text.indexOf("\u200B")>=0,tr=0,Pr=0;Pr<k.length();Pr++){var Zr=k.getSection(Pr),Vr=k.getCharCode(Pr);if(bd[Vr]||(tr+=sb(Vr,Zr,ne,xe,C,qe)),Pr<k.length()-1){var ua=xa(Vr);(mp[Vr]||ua||Zr.imageName)&&pt.push(ad(Pr+1,tr,Dt,pt,cA(Vr,k.getCharCode(Pr+1),ua&&Gt),!1))}}return B0(ad(k.length(),tr,Dt,pt,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,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr){for(var Zr=0,Vr=mm,ua=0,Oa=0,Mi=pt==="right"?1:pt==="left"?0:.5,ii=0,$i=0,Oi=xe;$i<Oi.length;$i+=1){var Ji=Oi[$i];Ji.trim();var ln=Ji.getMaxScale(),Tn=(ln-1)*en,Vn={positionedGlyphs:[],lineOffset:0};k.positionedLines[ii]=Vn;var Nn=Vn.positionedGlyphs,So=0;if(!Ji.length()){Vr+=Re,++ii;continue}for(var oo=0;oo<Ji.length();oo++){var go=Ji.getSection(oo),ks=Ji.getSectionIndex(oo),Mo=Ji.getCharCode(oo),Po=0,$s=null,ws=null,Xl=null,zu=en,Zl=!(Dt===vp.horizontal||!tr&&!da(Mo)||tr&&(bd[Mo]||Sa(Mo)));if(go.imageName){var hf=ne[go.imageName];if(!hf)continue;Xl=go.imageName,k.iconsInText=k.iconsInText||!0,ws=hf.paddedRect;var _f=hf.displaySize;go.scale=go.scale*en/Pr,$s={width:_f[0],height:_f[1],left:zc,top:-fd,advance:Zl?_f[1]:_f[0]};var gh=en-_f[1]*go.scale;Po=Tn+gh,zu=$s.advance;var Zf=Zl?_f[0]*go.scale-en*ln:_f[1]*go.scale-en*ln;Zf>0&&Zf>So&&(So=Zf)}else{var Yl=H[go.fontStack],Ol=Yl&&Yl[Mo];if(Ol&&Ol.rect)ws=Ol.rect,$s=Ol.metrics;else{var $u=C[go.fontStack],hc=$u&&$u[Mo];if(!hc)continue;$s=hc.metrics}Po=(ln-go.scale)*en}Zl?(k.verticalizable=!0,Nn.push({glyph:Mo,imageName:Xl,x:Zr,y:Vr+Po,vertical:Zl,scale:go.scale,fontStack:go.fontStack,sectionIndex:ks,metrics:$s,rect:ws}),Zr+=zu*go.scale+Gt):(Nn.push({glyph:Mo,imageName:Xl,x:Zr,y:Vr+Po,vertical:Zl,scale:go.scale,fontStack:go.fontStack,sectionIndex:ks,metrics:$s,rect:ws}),Zr+=$s.advance*go.scale+Gt)}if(Nn.length!==0){var tp=Zr-Gt;ua=Math.max(tp,ua),hA(Nn,0,Nn.length-1,Mi,So)}Zr=0;var rp=Re*ln+So;Vn.lineOffset=Math.max(So,Tn),Vr+=rp,Oa=Math.max(rp,Oa),++ii}var yh=Vr-mm,gp=$1(qe),yp=gp.horizontalAlign,ih=gp.verticalAlign;Oh(k.positionedLines,Mi,yp,ih,ua,Oa,Re,yh,xe.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-yp*ua,k.right=k.left+ua}function hA(k,C,H,ne,xe){if(!(!ne&&!xe))for(var Re=k[H],qe=Re.metrics.advance*Re.scale,pt=(k[H].x+qe)*ne,Dt=C;Dt<=H;Dt++)k[Dt].x-=pt,k[Dt].y+=xe}function Oh(k,C,H,ne,xe,Re,qe,pt,Dt){var Gt=(C-H)*xe,tr=0;Re!==qe?tr=-pt*ne-mm:tr=(-ne*Dt+.5)*qe;for(var Pr=0,Zr=k;Pr<Zr.length;Pr+=1)for(var Vr=Zr[Pr],ua=0,Oa=Vr.positionedGlyphs;ua<Oa.length;ua+=1){var Mi=Oa[ua];Mi.x+=Gt,Mi.y+=tr}}function Zp(k,C,H){var ne=$1(H),xe=ne.horizontalAlign,Re=ne.verticalAlign,qe=C[0],pt=C[1],Dt=qe-k.displaySize[0]*xe,Gt=Dt+k.displaySize[0],tr=pt-k.displaySize[1]*Re,Pr=tr+k.displaySize[1];return{image:k,top:tr,bottom:Pr,left:Dt,right:Gt}}function dv(k,C,H,ne,xe,Re){var qe=k.image,pt;if(qe.content){var Dt=qe.content,Gt=qe.pixelRatio||1;pt=[Dt[0]/Gt,Dt[1]/Gt,qe.displaySize[0]-Dt[2]/Gt,qe.displaySize[1]-Dt[3]/Gt]}var tr=C.left*Re,Pr=C.right*Re,Zr,Vr,ua,Oa;H==="width"||H==="both"?(Oa=xe[0]+tr-ne[3],Vr=xe[0]+Pr+ne[1]):(Oa=xe[0]+(tr+Pr-qe.displaySize[0])/2,Vr=Oa+qe.displaySize[0]);var Mi=C.top*Re,ii=C.bottom*Re;return H==="height"||H==="both"?(Zr=xe[1]+Mi-ne[0],ua=xe[1]+ii+ne[2]):(Zr=xe[1]+(Mi+ii-qe.displaySize[1])/2,ua=Zr+qe.displaySize[1]),{image:qe,top:Zr,right:Vr,bottom:ua,left:Oa,collisionPadding:pt}}var ep=function(k){function C(H,ne,xe,Re){k.call(this,H,ne),this.angle=xe,Re!==void 0&&(this.segment=Re)}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);de("Anchor",ep);var Bh=128;function id(k,C){var H=C.expression;if(H.kind==="constant"){var ne=H.evaluate(new gn(k+1));return{kind:"constant",layoutSize:ne}}else{if(H.kind==="source")return{kind:"source"};for(var xe=H.zoomStops,Re=H.interpolationType,qe=0;qe<xe.length&&xe[qe]<=k;)qe++;qe=Math.max(0,qe-1);for(var pt=qe;pt<xe.length&&xe[pt]<k+1;)pt++;pt=Math.min(xe.length-1,pt);var Dt=xe[qe],Gt=xe[pt];if(H.kind==="composite")return{kind:"composite",minZoom:Dt,maxZoom:Gt,interpolationType:Re};var tr=H.evaluate(new gn(Dt)),Pr=H.evaluate(new gn(Gt));return{kind:"camera",minZoom:Dt,maxZoom:Gt,minSize:tr,maxSize:Pr,interpolationType:Re}}}function gk(k,C,H){var ne=C.uSize,xe=C.uSizeT,Re=H.lowerSize,qe=H.upperSize;return k.kind==="source"?Re/Bh:k.kind==="composite"?El(Re/Bh,qe/Bh,xe):ne}function yk(k,C){var H=0,ne=0;if(k.kind==="constant")ne=k.layoutSize;else if(k.kind!=="source"){var xe=k.interpolationType,Re=k.minZoom,qe=k.maxZoom,pt=xe?l(iu.interpolationFactor(xe,C,Re,qe),0,1):0;k.kind==="camera"?ne=El(k.minSize,k.maxSize,pt):H=pt}return{uSizeT:H,uSize:ne}}var gW=Object.freeze({__proto__:null,getSizeData:id,evaluateSizeForFeature:gk,evaluateSizeForZoom:yk,SIZE_PACK_FACTOR:Bh});function _k(k,C,H,ne,xe){if(C.segment===void 0)return!0;for(var Re=C,qe=C.segment+1,pt=0;pt>-H/2;){if(qe--,qe<0)return!1;pt-=k[qe].dist(Re),Re=k[qe]}pt+=k[qe].dist(k[qe+1]),qe++;for(var Dt=[],Gt=0;pt<H/2;){var tr=k[qe-1],Pr=k[qe],Zr=k[qe+1];if(!Zr)return!1;var Vr=tr.angleTo(Pr)-Pr.angleTo(Zr);for(Vr=Math.abs((Vr+3*Math.PI)%(Math.PI*2)-Math.PI),Dt.push({distance:pt,angleDelta:Vr}),Gt+=Vr;pt-Dt[0].distance>ne;)Gt-=Dt.shift().angleDelta;if(Gt>xe)return!1;qe++,pt+=Pr.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 yW(k,C,H,ne,xe,Re){for(var qe=bk(H,xe,Re),pt=wk(H,ne)*Re,Dt=0,Gt=xk(k)/2,tr=0;tr<k.length-1;tr++){var Pr=k[tr],Zr=k[tr+1],Vr=Pr.dist(Zr);if(Dt+Vr>Gt){var ua=(Gt-Dt)/Vr,Oa=El(Pr.x,Zr.x,ua),Mi=El(Pr.y,Zr.y,ua),ii=new ep(Oa,Mi,Zr.angleTo(Pr),tr);return ii._round(),!qe||_k(k,ii,pt,qe,C)?ii:void 0}Dt+=Vr}}function _W(k,C,H,ne,xe,Re,qe,pt,Dt){var Gt=bk(ne,Re,qe),tr=wk(ne,xe),Pr=tr*qe,Zr=k[0].x===0||k[0].x===Dt||k[0].y===0||k[0].y===Dt;C-Pr<C/4&&(C=Pr+C/4);var Vr=Re*2,ua=Zr?C/2*pt%C:(tr/2+Vr)*qe*pt%C;return Tk(k,ua,C,Gt,H,Pr,Zr,!1,Dt)}function Tk(k,C,H,ne,xe,Re,qe,pt,Dt){for(var Gt=Re/2,tr=xk(k),Pr=0,Zr=C-H,Vr=[],ua=0;ua<k.length-1;ua++){for(var Oa=k[ua],Mi=k[ua+1],ii=Oa.dist(Mi),$i=Mi.angleTo(Oa);Zr+H<Pr+ii;){Zr+=H;var Oi=(Zr-Pr)/ii,Ji=El(Oa.x,Mi.x,Oi),ln=El(Oa.y,Mi.y,Oi);if(Ji>=0&&Ji<Dt&&ln>=0&&ln<Dt&&Zr-Gt>=0&&Zr+Gt<=tr){var Tn=new ep(Ji,ln,$i,ua);Tn._round(),(!ne||_k(k,Tn,Re,ne,xe))&&Vr.push(Tn)}}Pr+=ii}return!pt&&!Vr.length&&!qe&&(Vr=Tk(k,Pr/2,H,ne,xe,Re,qe,!0,Dt)),Vr}function Ak(k,C,H,ne,xe){for(var Re=[],qe=0;qe<k.length;qe++)for(var pt=k[qe],Dt=void 0,Gt=0;Gt<pt.length-1;Gt++){var tr=pt[Gt],Pr=pt[Gt+1];tr.x<C&&Pr.x<C||(tr.x<C?tr=new n(C,tr.y+(Pr.y-tr.y)*((C-tr.x)/(Pr.x-tr.x)))._round():Pr.x<C&&(Pr=new n(C,tr.y+(Pr.y-tr.y)*((C-tr.x)/(Pr.x-tr.x)))._round()),!(tr.y<H&&Pr.y<H)&&(tr.y<H?tr=new n(tr.x+(Pr.x-tr.x)*((H-tr.y)/(Pr.y-tr.y)),H)._round():Pr.y<H&&(Pr=new n(tr.x+(Pr.x-tr.x)*((H-tr.y)/(Pr.y-tr.y)),H)._round()),!(tr.x>=ne&&Pr.x>=ne)&&(tr.x>=ne?tr=new n(ne,tr.y+(Pr.y-tr.y)*((ne-tr.x)/(Pr.x-tr.x)))._round():Pr.x>=ne&&(Pr=new n(ne,tr.y+(Pr.y-tr.y)*((ne-tr.x)/(Pr.x-tr.x)))._round()),!(tr.y>=xe&&Pr.y>=xe)&&(tr.y>=xe?tr=new n(tr.x+(Pr.x-tr.x)*((xe-tr.y)/(Pr.y-tr.y)),xe)._round():Pr.y>=xe&&(Pr=new n(tr.x+(Pr.x-tr.x)*((xe-tr.y)/(Pr.y-tr.y)),xe)._round()),(!Dt||!tr.equals(Dt[Dt.length-1]))&&(Dt=[tr],Re.push(Dt)),Dt.push(Pr)))))}return Re}var Bg=zc;function Sk(k,C,H,ne){var xe=[],Re=k.image,qe=Re.pixelRatio,pt=Re.paddedRect.w-2*Bg,Dt=Re.paddedRect.h-2*Bg,Gt=k.right-k.left,tr=k.bottom-k.top,Pr=Re.stretchX||[[0,pt]],Zr=Re.stretchY||[[0,Dt]],Vr=function(Yl,Ol){return Yl+Ol[1]-Ol[0]},ua=Pr.reduce(Vr,0),Oa=Zr.reduce(Vr,0),Mi=pt-ua,ii=Dt-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,Tn=0,Vn=Mi,Nn=0,So=ii;if(Re.content&&ne){var oo=Re.content;$i=ub(Pr,0,oo[0]),Ji=ub(Zr,0,oo[1]),Oi=ub(Pr,oo[0],oo[2]),ln=ub(Zr,oo[1],oo[3]),Tn=oo[0]-$i,Nn=oo[1]-Ji,Vn=oo[2]-oo[0]-Oi,So=oo[3]-oo[1]-ln}var go=function(Yl,Ol,$u,hc){var hf=cb(Yl.stretch-$i,Oi,Gt,k.left),_f=fb(Yl.fixed-Tn,Vn,Yl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,tr,k.top),Zf=fb(Ol.fixed-Nn,So,Ol.stretch,Oa),tp=cb($u.stretch-$i,Oi,Gt,k.left),rp=fb($u.fixed-Tn,Vn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,tr,k.top),gp=fb(hc.fixed-Nn,So,hc.stretch,Oa),yp=new n(hf,gh),ih=new n(tp,gh),_p=new n(tp,yh),nd=new n(hf,yh),Uv=new n(_f/qe,Zf/qe),_m=new n(rp/qe,gp/qe),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:Re.paddedRect.x+Bg+gb,y:Re.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=Vn/qe/Gt,_b=So/qe/tr;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(!ne||!Re.stretchX&&!Re.stretchY)xe.push(go({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:pt+1},{fixed:0,stretch:Dt+1}));else for(var ks=Mk(Pr,Mi,ua),Mo=Mk(Zr,ii,Oa),Po=0;Po<ks.length-1;Po++)for(var $s=ks[Po],ws=ks[Po+1],Xl=0;Xl<Mo.length-1;Xl++){var zu=Mo[Xl],Zl=Mo[Xl+1];xe.push(go($s,zu,ws,Zl))}return xe}function ub(k,C,H){for(var ne=0,xe=0,Re=k;xe<Re.length;xe+=1){var qe=Re[xe];ne+=Math.max(C,Math.min(H,qe[1]))-Math.max(C,Math.min(H,qe[0]))}return ne}function Mk(k,C,H){for(var ne=[{fixed:-Bg,stretch:0}],xe=0,Re=k;xe<Re.length;xe+=1){var qe=Re[xe],pt=qe[0],Dt=qe[1],Gt=ne[ne.length-1];ne.push({fixed:pt-Gt.stretch,stretch:Gt.stretch}),ne.push({fixed:pt-Gt.stretch,stretch:Gt.stretch+(Dt-pt)})}return ne.push({fixed:C+Bg,stretch:H}),ne}function cb(k,C,H,ne){return k/C*H+ne}function fb(k,C,H,ne){return k-C*H/ne}function xW(k,C,H,ne,xe,Re,qe,pt){for(var Dt=ne.layout.get("text-rotate").evaluate(Re,{})*Math.PI/180,Gt=[],tr=0,Pr=C.positionedLines;tr<Pr.length;tr+=1)for(var Zr=Pr[tr],Vr=0,ua=Zr.positionedGlyphs;Vr<ua.length;Vr+=1){var Oa=ua[Vr];if(Oa.rect){var Mi=Oa.rect||{},ii=1,$i=fd+ii,Oi=!0,Ji=1,ln=0,Tn=(xe||pt)&&Oa.vertical,Vn=Oa.metrics.advance*Oa.scale/2;if(pt&&C.verticalizable){var Nn=(Oa.scale-1)*en,So=(en-Oa.metrics.width*Oa.scale)/2;ln=Zr.lineOffset/2-(Oa.imageName?-So:Nn)}if(Oa.imageName){var oo=qe[Oa.imageName];Oi=oo.sdf,Ji=oo.pixelRatio,$i=zc/Ji}var go=xe?[Oa.x+Vn,Oa.y]:[0,0],ks=xe?[0,0]:[Oa.x+Vn+H[0],Oa.y+H[1]-ln],Mo=[0,0];Tn&&(Mo=ks,ks=[0,0]);var Po=(Oa.metrics.left-$i)*Oa.scale-Vn+ks[0],$s=(-Oa.metrics.top-$i)*Oa.scale+ks[1],ws=Po+Mi.w*Oa.scale/Ji,Xl=$s+Mi.h*Oa.scale/Ji,zu=new n(Po,$s),Zl=new n(ws,$s),Yl=new n(Po,Xl),Ol=new n(ws,Xl);if(Tn){var $u=new n(-Vn,Vn-mm),hc=-Math.PI/2,hf=en/2-Vn,_f=Oa.imageName?hf:0,gh=new n(5-mm-hf,-_f),Zf=new(Function.prototype.bind.apply(n,[null].concat(Mo)));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(Dt){var tp=Math.sin(Dt),rp=Math.cos(Dt),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;Gt.push({tl:zu,tr:Zl,bl:Yl,br:Ol,tex:Mi,writingMode:C.writingMode,glyphOffset:go,sectionIndex:Oa.sectionIndex,isSDF:Oi,pixelOffsetTL:gp,pixelOffsetBR:yp,minFontScaleX:ih,minFontScaleY:_p})}}return Gt}var hb=function(C,H,ne,xe,Re,qe,pt,Dt,Gt,tr){if(this.boxStartIndex=C.length,Gt){var Pr=qe.top,Zr=qe.bottom,Vr=qe.collisionPadding;Vr&&(Pr-=Vr[1],Zr+=Vr[3]);var ua=Zr-Pr;ua>0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=qe.top*pt-Dt,Mi=qe.bottom*pt+Dt,ii=qe.left*pt-Dt,$i=qe.right*pt+Dt,Oi=qe.collisionPadding;if(Oi&&(ii-=Oi[0]*pt,Oa-=Oi[1]*pt,$i+=Oi[2]*pt,Mi+=Oi[3]*pt),tr){var Ji=new n(ii,Oa),ln=new n($i,Oa),Tn=new n(ii,Mi),Vn=new n($i,Mi),Nn=tr*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),Tn._rotate(Nn),Vn._rotate(Nn),ii=Math.min(Ji.x,ln.x,Tn.x,Vn.x),$i=Math.max(Ji.x,ln.x,Tn.x,Vn.x),Oa=Math.min(Ji.y,ln.y,Tn.y,Vn.y),Mi=Math.max(Ji.y,ln.y,Tn.y,Vn.y)}C.emplaceBack(H.x,H.y,ii,Oa,$i,Mi,ne,xe,Re)}this.boxEndIndex=C.length},Ng=function(C,H){if(C===void 0&&(C=[]),H===void 0&&(H=bW),this.data=C,this.length=this.data.length,this.compare=H,this.length>0)for(var ne=(this.length>>1)-1;ne>=0;ne--)this._down(ne)};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,ne=H.data,xe=H.compare,Re=ne[C];C>0;){var qe=C-1>>1,pt=ne[qe];if(xe(Re,pt)>=0)break;ne[C]=pt,C=qe}ne[C]=Re},Ng.prototype._down=function(C){for(var H=this,ne=H.data,xe=H.compare,Re=this.length>>1,qe=ne[C];C<Re;){var pt=(C<<1)+1,Dt=ne[pt],Gt=pt+1;if(Gt<this.length&&xe(ne[Gt],Dt)<0&&(pt=Gt,Dt=ne[Gt]),xe(Dt,qe)>=0)break;ne[C]=Dt,C=pt}ne[C]=qe};function bW(k,C){return k<C?-1:k>C?1:0}function wW(k,C,H){C===void 0&&(C=1),H===void 0&&(H=!1);for(var ne=1/0,xe=1/0,Re=-1/0,qe=-1/0,pt=k[0],Dt=0;Dt<pt.length;Dt++){var Gt=pt[Dt];(!Dt||Gt.x<ne)&&(ne=Gt.x),(!Dt||Gt.y<xe)&&(xe=Gt.y),(!Dt||Gt.x>Re)&&(Re=Gt.x),(!Dt||Gt.y>qe)&&(qe=Gt.y)}var tr=Re-ne,Pr=qe-xe,Zr=Math.min(tr,Pr),Vr=Zr/2,ua=new Ng([],TW);if(Zr===0)return new n(ne,xe);for(var Oa=ne;Oa<Re;Oa+=Zr)for(var Mi=xe;Mi<qe;Mi+=Zr)ua.push(new Ug(Oa+Vr,Mi+Vr,Vr,k));for(var ii=SW(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 TW(k,C){return C.max-k.max}function Ug(k,C,H,ne){this.p=new n(k,C),this.h=H,this.d=AW(this.p,ne),this.max=this.d+this.h*Math.SQRT2}function AW(k,C){for(var H=!1,ne=1/0,xe=0;xe<C.length;xe++)for(var Re=C[xe],qe=0,pt=Re.length,Dt=pt-1;qe<pt;Dt=qe++){var Gt=Re[qe],tr=Re[Dt];Gt.y>k.y!=tr.y>k.y&&k.x<(tr.x-Gt.x)*(k.y-Gt.y)/(tr.y-Gt.y)+Gt.x&&(H=!H),ne=Math.min(ne,qd(k,Gt,tr))}return(H?1:-1)*Math.sqrt(ne)}function SW(k){for(var C=0,H=0,ne=0,xe=k[0],Re=0,qe=xe.length,pt=qe-1;Re<qe;pt=Re++){var Dt=xe[Re],Gt=xe[pt],tr=Dt.x*Gt.y-Gt.x*Dt.y;H+=(Dt.x+Gt.x)*tr,ne+=(Dt.y+Gt.y)*tr,C+=tr*3}return new Ug(H/C,ne/C,0,k)}var jg=7,pA=Number.POSITIVE_INFINITY;function Ek(k,C){function H(xe,Re){var qe=0,pt=0;Re<0&&(Re=0);var Dt=Re/Math.sqrt(2);switch(xe){case"top-right":case"top-left":pt=Dt-jg;break;case"bottom-right":case"bottom-left":pt=-Dt+jg;break;case"bottom":pt=-Re+jg;break;case"top":pt=Re-jg;break}switch(xe){case"top-right":case"bottom-right":qe=-Dt;break;case"top-left":case"bottom-left":qe=Dt;break;case"left":qe=Re;break;case"right":qe=-Re;break}return[qe,pt]}function ne(xe,Re,qe){var pt=0,Dt=0;switch(Re=Math.abs(Re),qe=Math.abs(qe),xe){case"top-right":case"top-left":case"top":Dt=qe-jg;break;case"bottom-right":case"bottom-left":case"bottom":Dt=-qe+jg;break}switch(xe){case"top-right":case"bottom-right":case"right":pt=-Re;break;case"top-left":case"bottom-left":case"left":pt=Re;break}return[pt,Dt]}return C[1]!==pA?ne(k,C[0],C[1]):H(k,C[0])}function MW(k,C,H,ne,xe,Re,qe){k.createArrays();var pt=512*k.overscaling;k.tilePixelRatio=ui/pt,k.compareText={},k.iconsNeedLinear=!1;var Dt=k.layers[0].layout,Gt=k.layers[0]._unevaluatedLayout._values,tr={};if(k.textSizeData.kind==="composite"){var Pr=k.textSizeData,Zr=Pr.minZoom,Vr=Pr.maxZoom;tr.compositeTextSizes=[Gt["text-size"].possiblyEvaluate(new gn(Zr),qe),Gt["text-size"].possiblyEvaluate(new gn(Vr),qe)]}if(k.iconSizeData.kind==="composite"){var ua=k.iconSizeData,Oa=ua.minZoom,Mi=ua.maxZoom;tr.compositeIconSizes=[Gt["icon-size"].possiblyEvaluate(new gn(Oa),qe),Gt["icon-size"].possiblyEvaluate(new gn(Mi),qe)]}tr.layoutTextSize=Gt["text-size"].possiblyEvaluate(new gn(k.zoom+1),qe),tr.layoutIconSize=Gt["icon-size"].possiblyEvaluate(new gn(k.zoom+1),qe),tr.textMaxSize=Gt["text-size"].possiblyEvaluate(new gn(18));for(var ii=Dt.get("text-line-height")*en,$i=Dt.get("text-rotation-alignment")==="map"&&Dt.get("symbol-placement")!=="point",Oi=Dt.get("text-keep-upright"),Ji=Dt.get("text-size"),ln=function(){var Nn=Vn[Tn],So=Dt.get("text-font").evaluate(Nn,{},qe).join(","),oo=Ji.evaluate(Nn,{},qe),go=tr.layoutTextSize.evaluate(Nn,{},qe),ks=tr.layoutIconSize.evaluate(Nn,{},qe),Mo={horizontal:{},vertical:void 0},Po=Nn.text,$s=[0,0];if(Po){var ws=Po.toString(),Xl=Dt.get("text-letter-spacing").evaluate(Nn,{},qe)*en,zu=Gr(ws)?Xl:0,Zl=Dt.get("text-anchor").evaluate(Nn,{},qe),Yl=Dt.get("text-variable-anchor");if(!Yl){var Ol=Dt.get("text-radial-offset").evaluate(Nn,{},qe);Ol?$s=Ek(Zl,[Ol*en,pA]):$s=Dt.get("text-offset").evaluate(Nn,{},qe).map(function(Uv){return Uv*en})}var $u=$i?"center":Dt.get("text-justify").evaluate(Nn,{},qe),hc=Dt.get("symbol-placement"),hf=hc==="point"?Dt.get("text-max-width").evaluate(Nn,{},qe)*en:0,_f=function(){k.allowVerticalPlacement&&_r(ws)&&(Mo.vertical=Fg(Po,C,H,xe,So,hf,ii,Zl,"left",zu,$s,vp.vertical,!0,hc,go,oo))};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(!Mo.horizontal[rp])if(Zf)Mo.horizontal[rp]=Mo.horizontal[0];else{var yh=Fg(Po,C,H,xe,So,hf,ii,"center",rp,zu,$s,vp.horizontal,!1,hc,go,oo);yh&&(Mo.horizontal[rp]=yh,Zf=yh.positionedLines.length===1)}}_f()}else{$u==="auto"&&($u=dA(Zl));var gp=Fg(Po,C,H,xe,So,hf,ii,Zl,$u,zu,$s,vp.horizontal,!1,hc,go,oo);gp&&(Mo.horizontal[$u]=gp),_f(),_r(ws)&&$i&&Oi&&(Mo.vertical=Fg(Po,C,H,xe,So,hf,ii,Zl,$u,zu,$s,vp.vertical,!1,hc,go,oo))}}var yp=void 0,ih=!1;if(Nn.icon&&Nn.icon.name){var _p=ne[Nn.icon.name];_p&&(yp=Zp(xe[Nn.icon.name],Dt.get("icon-offset").evaluate(Nn,{},qe),Dt.get("icon-anchor").evaluate(Nn,{},qe)),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||Dt.get("icon-rotate").constantOr(1)!==0)&&(k.iconsNeedLinear=!0))}var nd=Ck(Mo.horizontal)||Mo.vertical;k.iconsInText=nd?nd.iconsInText:!1,(nd||yp)&&EW(k,Nn,Mo,yp,ne,tr,go,ks,$s,ih,qe)},Tn=0,Vn=k.features;Tn<Vn.length;Tn+=1)ln();Re&&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 EW(k,C,H,ne,xe,Re,qe,pt,Dt,Gt,tr){var Pr=Re.textMaxSize.evaluate(C,{});Pr===void 0&&(Pr=qe);var Zr=k.layers[0].layout,Vr=Zr.get("icon-offset").evaluate(C,{},tr),ua=Ck(H.horizontal),Oa=24,Mi=qe/Oa,ii=k.tilePixelRatio*Mi,$i=k.tilePixelRatio*Pr/Oa,Oi=k.tilePixelRatio*pt,Ji=k.tilePixelRatio*Zr.get("symbol-spacing"),ln=Zr.get("text-padding")*k.tilePixelRatio,Tn=Zr.get("icon-padding")*k.tilePixelRatio,Vn=Zr.get("text-max-angle")/180*Math.PI,Nn=Zr.get("text-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",So=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",oo=Zr.get("symbol-placement"),go=Ji/2,ks=Zr.get("icon-text-fit"),Mo;ne&&ks!=="none"&&(k.allowVerticalPlacement&&H.vertical&&(Mo=dv(ne,H.vertical,ks,Zr.get("icon-text-fit-padding"),Vr,Mi)),ua&&(ne=dv(ne,ua,ks,Zr.get("icon-text-fit-padding"),Vr,Mi)));var Po=function(Wg,wd){wd.x<0||wd.x>=ui||wd.y<0||wd.y>=ui||kW(k,wd,Wg,H,ne,xe,Mo,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Nn,Dt,Oi,Tn,So,Vr,C,Re,Gt,tr,qe)};if(oo==="line")for(var $s=0,ws=Ak(C.geometry,0,0,ui,ui);$s<ws.length;$s+=1)for(var Xl=ws[$s],zu=_W(Xl,Ji,Vn,H.vertical||ua,ne,Oa,$i,k.overscaling,ui),Zl=0,Yl=zu;Zl<Yl.length;Zl+=1){var Ol=Yl[Zl],$u=ua;(!$u||!CW(k,$u.text,go,Ol))&&Po(Xl,Ol)}else if(oo==="line-center")for(var hc=0,hf=C.geometry;hc<hf.length;hc+=1){var _f=hf[hc];if(_f.length>1){var gh=yW(_f,Vn,H.vertical||ua,ne,Oa,$i);gh&&Po(_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=wW(rp,16);Po(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];Po(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];Po([bm],new ep(bm.x,bm.y,0))}}var Q1=255,gm=Q1*Bh;function kk(k,C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua){var Oa=xW(C,H,pt,xe,Re,qe,ne,k.allowVerticalPlacement),Mi=k.textSizeData,ii=null;Mi.kind==="source"?(ii=[Bh*xe.layout.get("text-size").evaluate(qe,{})],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(qe,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(qe,{},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,Oa,ii,pt,Re,qe,Gt,C,Dt.lineStartIndex,Dt.lineLength,Zr,ua);for(var $i=0,Oi=tr;$i<Oi.length;$i+=1){var Ji=Oi[$i];Pr[Ji]=k.text.placedSymbolArray.length-1}return Oa.length*4}function Ck(k){for(var C in k)return k[C];return null}function kW(k,C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn){var So,oo=k.addToLineVertexArray(C,H),go,ks,Mo,Po,$s=0,ws=0,Xl=0,zu=0,Zl=-1,Yl=-1,Ol={},$u=me(""),hc=0,hf=0;if(pt._unevaluatedLayout.getValue("text-radial-offset")===void 0?(So=pt.layout.get("text-offset").evaluate(Ji,{},Vn).map(function(r_){return r_*en}),hc=So[0],hf=So[1]):(hc=pt.layout.get("text-radial-offset").evaluate(Ji,{},Vn)*en,hf=pA),k.allowVerticalPlacement&&ne.vertical){var _f=pt.layout.get("text-rotate").evaluate(Ji,{},Vn),gh=_f+90,Zf=ne.vertical;Mo=new hb(Dt,C,Gt,tr,Pr,Zf,Zr,Vr,ua,gh),qe&&(Po=new hb(Dt,C,Gt,tr,Pr,qe,Mi,ii,ua,gh))}if(xe){var tp=pt.layout.get("icon-rotate").evaluate(Ji,{}),rp=pt.layout.get("icon-text-fit")!=="none",yh=Sk(xe,tp,Tn,rp),gp=qe?Sk(qe,tp,Tn,rp):void 0;ks=new hb(Dt,C,Gt,tr,Pr,xe,Mi,ii,!1,tp),$s=yh.length*4;var yp=k.iconSizeData,ih=null;yp.kind==="source"?(ih=[Bh*pt.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,oo.lineStartIndex,oo.lineLength,-1,Vn),Zl=k.icon.placedSymbolArray.length-1,gp&&(ws=gp.length*4,k.addSymbols(k.icon,gp,ih,Oi,$i,Ji,vp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,Vn),Yl=k.icon.placedSymbolArray.length-1)}for(var _p in ne.horizontal){var nd=ne.horizontal[_p];if(!go){$u=me(nd.text);var Uv=pt.layout.get("text-rotate").evaluate(Ji,{},Vn);go=new hb(Dt,C,Gt,tr,Pr,nd,Zr,Vr,ua,Uv)}var _m=nd.positionedLines.length===1;if(Xl+=kk(k,C,nd,Re,pt,ua,Ji,Oa,oo,ne.vertical?vp.horizontal:vp.horizontalOnly,_m?Object.keys(ne.horizontal):[_p],Ol,Zl,ln,Vn),_m)break}ne.vertical&&(zu+=kk(k,C,ne.vertical,Re,pt,ua,Ji,Oa,oo,vp.vertical,["vertical"],Ol,Yl,ln,Vn));var xm=go?go.boxStartIndex:k.collisionBoxArray.length,bm=go?go.boxEndIndex:k.collisionBoxArray.length,Wg=Mo?Mo.boxStartIndex:k.collisionBoxArray.length,wd=Mo?Mo.boxEndIndex:k.collisionBoxArray.length,gb=ks?ks.boxStartIndex:k.collisionBoxArray.length,xA=ks?ks.boxEndIndex:k.collisionBoxArray.length,yb=Po?Po.boxStartIndex:k.collisionBoxArray.length,bA=Po?Po.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(go,hd),hd=Xg(Mo,hd),hd=Xg(ks,hd),hd=Xg(Po,hd);var _b=hd>-1?1:0;_b&&(hd*=Nn/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,Gt,Xl,zu,$s,ws,_b,0,Zr,hc,hf,hd)}function CW(k,C,H,ne){var xe=k.compareText;if(!(C in xe))xe[C]=[];else for(var Re=xe[C],qe=Re.length-1;qe>=0;qe--)if(ne.dist(Re[qe])<H)return!0;return xe[C].push(ne),!1}var LW=Xd.VectorTileFeature.types,PW=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function pb(k,C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){var Vr=pt?Math.min(gm,Math.round(pt[0])):0,ua=pt?Math.min(gm,Math.round(pt[1])):0;k.emplaceBack(C,H,Math.round(ne*32),Math.round(xe*32),Re,qe,(Vr<<1)+(Dt?1:0),ua,Gt*16,tr*16,Pr*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 IW(k){for(var C=0,H=k.sections;C<H.length;C+=1){var ne=H[C];if(fi(ne.text))return!0}return!1}var qg=function(C){this.layoutVertexArray=new pn,this.indexArray=new Xi,this.programConfigurations=C,this.segments=new Co,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,ne,xe){this.isEmpty()||(ne&&(this.layoutVertexBuffer=C.createVertexBuffer(this.layoutVertexArray,ke.members),this.indexBuffer=C.createIndexBuffer(this.indexArray,H),this.dynamicLayoutVertexBuffer=C.createVertexBuffer(this.dynamicLayoutVertexArray,je.members,!0),this.opacityVertexBuffer=C.createVertexBuffer(this.opacityVertexArray,PW,!0),this.opacityVertexBuffer.itemSize=1),(ne||xe)&&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())},de("SymbolBuffers",qg);var e_=function(C,H,ne){this.layoutVertexArray=new C,this.layoutAttributes=H,this.indexArray=new ne,this.segments=new Co,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,ht.members,!0)},e_.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},de("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(Dt){return Dt.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],ne=H._unevaluatedLayout._values;this.textSizeData=id(this.zoom,ne["text-size"]),this.iconSizeData=id(this.zoom,ne["icon-size"]);var xe=this.layers[0].layout,Re=xe.get("symbol-sort-key"),qe=xe.get("symbol-z-order");this.canOverlap=xe.get("text-allow-overlap")||xe.get("icon-allow-overlap")||xe.get("text-ignore-placement")||xe.get("icon-ignore-placement"),this.sortFeaturesByKey=qe!=="viewport-y"&&Re.constantOr(1)!==void 0;var pt=qe==="viewport-y"||qe==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=pt&&this.canOverlap,xe.get("symbol-placement")==="point"&&(this.writingModes=xe.get("text-writing-mode").map(function(Dt){return vp[Dt]})),this.stateDependentLayerIds=this.layers.filter(function(Dt){return Dt.isStateDependent()}).map(function(Dt){return Dt.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 qs,this.symbolInstances=new kl},Du.prototype.calculateGlyphDependencies=function(C,H,ne,xe,Re){for(var qe=0;qe<C.length;qe++)if(H[C.charCodeAt(qe)]=!0,(ne||xe)&&Re){var pt=gi[C.charAt(qe)];pt&&(H[pt.charCodeAt(0)]=!0)}},Du.prototype.populate=function(C,H,ne){var xe=this.layers[0],Re=xe.layout,qe=Re.get("text-font"),pt=Re.get("text-field"),Dt=Re.get("icon-image"),Gt=(pt.value.kind!=="constant"||pt.value.value instanceof lu&&!pt.value.value.isEmpty()||pt.value.value.toString().length>0)&&(qe.value.kind!=="constant"||qe.value.value.length>0),tr=Dt.value.kind!=="constant"||!!Dt.value.value||Object.keys(Dt.parameters).length>0,Pr=Re.get("symbol-sort-key");if(this.features=[],!(!Gt&&!tr)){for(var Zr=H.iconDependencies,Vr=H.glyphDependencies,ua=H.availableImages,Oa=new gn(this.zoom),Mi=0,ii=C;Mi<ii.length;Mi+=1){var $i=ii[Mi],Oi=$i.feature,Ji=$i.id,ln=$i.index,Tn=$i.sourceLayerIndex,Vn=xe._featureFilter.needGeometry,Nn=_o(Oi,Vn);if(xe._featureFilter.filter(Oa,Nn,ne)){Vn||(Nn.geometry=fn(Oi));var So=void 0;if(Gt){var oo=xe.getValueAndResolveTokens("text-field",Nn,ne,ua),go=lu.factory(oo);IW(go)&&(this.hasRTLText=!0),(!this.hasRTLText||Yo()==="unavailable"||this.hasRTLText&&al.isParsed())&&(So=Ka(go,xe,Nn))}var ks=void 0;if(tr){var Mo=xe.getValueAndResolveTokens("icon-image",Nn,ne,ua);Mo instanceof Pl?ks=Mo:ks=Pl.fromString(Mo)}if(!(!So&&!ks)){var Po=this.sortFeaturesByKey?Pr.evaluate(Nn,{},ne):void 0,$s={id:Ji,text:So,icon:ks,index:ln,sourceLayerIndex:Tn,geometry:Nn.geometry,properties:Oi.properties,type:LW[Oi.type],sortKey:Po};if(this.features.push($s),ks&&(Zr[ks.name]=!0),So){var ws=qe.evaluate(Nn,{},ne).join(","),Xl=Re.get("text-rotation-alignment")==="map"&&Re.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(vp.vertical)>=0;for(var zu=0,Zl=So.sections;zu<Zl.length;zu+=1){var Yl=Zl[zu];if(Yl.image)Zr[Yl.image.name]=!0;else{var Ol=_r(So.toString()),$u=Yl.fontStack||ws,hc=Vr[$u]=Vr[$u]||{};this.calculateGlyphDependencies(Yl.text,hc,Xl,this.allowVerticalPlacement,Ol)}}}}}}Re.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,ne){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(C,H,this.layers,ne),this.icon.programConfigurations.updatePaintArrays(C,H,this.layers,ne))},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 ne=this.lineVertexArray.length;if(C.segment!==void 0){for(var xe=C.dist(H[C.segment+1]),Re=C.dist(H[C.segment]),qe={},pt=C.segment+1;pt<H.length;pt++)qe[pt]={x:H[pt].x,y:H[pt].y,tileUnitDistanceFromAnchor:xe},pt<H.length-1&&(xe+=H[pt+1].dist(H[pt]));for(var Dt=C.segment||0;Dt>=0;Dt--)qe[Dt]={x:H[Dt].x,y:H[Dt].y,tileUnitDistanceFromAnchor:Re},Dt>0&&(Re+=H[Dt-1].dist(H[Dt]));for(var Gt=0;Gt<H.length;Gt++){var tr=qe[Gt];this.lineVertexArray.emplaceBack(tr.x,tr.y,tr.tileUnitDistanceFromAnchor)}}return{lineStartIndex:ne,lineLength:this.lineVertexArray.length-ne}},Du.prototype.addSymbols=function(C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){for(var Vr=C.indexArray,ua=C.layoutVertexArray,Oa=C.segments.prepareSegment(4*H.length,ua,Vr,this.canOverlap?qe.sortKey:void 0),Mi=this.glyphOffsetArray.length,ii=Oa.vertexLength,$i=this.allowVerticalPlacement&&pt===vp.vertical?Math.PI/2:0,Oi=qe.text&&qe.text.sections,Ji=0;Ji<H.length;Ji++){var ln=H[Ji],Tn=ln.tl,Vn=ln.tr,Nn=ln.bl,So=ln.br,oo=ln.tex,go=ln.pixelOffsetTL,ks=ln.pixelOffsetBR,Mo=ln.minFontScaleX,Po=ln.minFontScaleY,$s=ln.glyphOffset,ws=ln.isSDF,Xl=ln.sectionIndex,zu=Oa.vertexLength,Zl=$s[1];pb(ua,Dt.x,Dt.y,Tn.x,Zl+Tn.y,oo.x,oo.y,ne,ws,go.x,go.y,Mo,Po),pb(ua,Dt.x,Dt.y,Vn.x,Zl+Vn.y,oo.x+oo.w,oo.y,ne,ws,ks.x,go.y,Mo,Po),pb(ua,Dt.x,Dt.y,Nn.x,Zl+Nn.y,oo.x,oo.y+oo.h,ne,ws,go.x,ks.y,Mo,Po),pb(ua,Dt.x,Dt.y,So.x,Zl+So.y,oo.x+oo.w,oo.y+oo.h,ne,ws,ks.x,ks.y,Mo,Po),vA(C.dynamicLayoutVertexArray,Dt,$i),Vr.emplaceBack(zu,zu+1,zu+2),Vr.emplaceBack(zu+1,zu+2,zu+3),Oa.vertexLength+=4,Oa.primitiveLength+=2,this.glyphOffsetArray.emplaceBack($s[0]),(Ji===H.length-1||Xl!==H[Ji+1].sectionIndex)&&C.programConfigurations.populatePaintArrays(ua.length,qe,qe.index,{},Zr,Oi&&Oi[Xl])}C.placedSymbolArray.emplaceBack(Dt.x,Dt.y,Mi,this.glyphOffsetArray.length-Mi,ii,Gt,tr,Dt.segment,ne?ne[0]:0,ne?ne[1]:0,xe[0],xe[1],pt,0,!1,0,Pr)},Du.prototype._addCollisionDebugVertex=function(C,H,ne,xe,Re,qe){return H.emplaceBack(0,0),C.emplaceBack(ne.x,ne.y,xe,Re,Math.round(qe.x),Math.round(qe.y))},Du.prototype.addCollisionDebugVertices=function(C,H,ne,xe,Re,qe,pt){var Dt=Re.segments.prepareSegment(4,Re.layoutVertexArray,Re.indexArray),Gt=Dt.vertexLength,tr=Re.layoutVertexArray,Pr=Re.collisionVertexArray,Zr=pt.anchorX,Vr=pt.anchorY;this._addCollisionDebugVertex(tr,Pr,qe,Zr,Vr,new n(C,H)),this._addCollisionDebugVertex(tr,Pr,qe,Zr,Vr,new n(ne,H)),this._addCollisionDebugVertex(tr,Pr,qe,Zr,Vr,new n(ne,xe)),this._addCollisionDebugVertex(tr,Pr,qe,Zr,Vr,new n(C,xe)),Dt.vertexLength+=4;var ua=Re.indexArray;ua.emplaceBack(Gt,Gt+1),ua.emplaceBack(Gt+1,Gt+2),ua.emplaceBack(Gt+2,Gt+3),ua.emplaceBack(Gt+3,Gt),Dt.primitiveLength+=4},Du.prototype.addDebugCollisionBoxes=function(C,H,ne,xe){for(var Re=C;Re<H;Re++){var qe=this.collisionBoxArray.get(Re),pt=qe.x1,Dt=qe.y1,Gt=qe.x2,tr=qe.y2;this.addCollisionDebugVertices(pt,Dt,Gt,tr,xe?this.textCollisionBox:this.iconCollisionBox,qe.anchorPoint,ne)}},Du.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new e_(Ri,Ut.members,Dn),this.iconCollisionBox=new e_(Ri,Ut.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,ne,xe,Re,qe,pt,Dt,Gt){for(var tr={},Pr=H;Pr<ne;Pr++){var Zr=C.get(Pr);tr.textBox={x1:Zr.x1,y1:Zr.y1,x2:Zr.x2,y2:Zr.y2,anchorPointX:Zr.anchorPointX,anchorPointY:Zr.anchorPointY},tr.textFeatureIndex=Zr.featureIndex;break}for(var Vr=xe;Vr<Re;Vr++){var ua=C.get(Vr);tr.verticalTextBox={x1:ua.x1,y1:ua.y1,x2:ua.x2,y2:ua.y2,anchorPointX:ua.anchorPointX,anchorPointY:ua.anchorPointY},tr.verticalTextFeatureIndex=ua.featureIndex;break}for(var Oa=qe;Oa<pt;Oa++){var Mi=C.get(Oa);tr.iconBox={x1:Mi.x1,y1:Mi.y1,x2:Mi.x2,y2:Mi.y2,anchorPointX:Mi.anchorPointX,anchorPointY:Mi.anchorPointY},tr.iconFeatureIndex=Mi.featureIndex;break}for(var ii=Dt;ii<Gt;ii++){var $i=C.get(ii);tr.verticalIconBox={x1:$i.x1,y1:$i.y1,x2:$i.x2,y2:$i.y2,anchorPointX:$i.anchorPointX,anchorPointY:$i.anchorPointY},tr.verticalIconFeatureIndex=$i.featureIndex;break}return tr},Du.prototype.deserializeCollisionBoxes=function(C){this.collisionArrays=[];for(var H=0;H<this.symbolInstances.length;H++){var ne=this.symbolInstances.get(H);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(C,ne.textBoxStartIndex,ne.textBoxEndIndex,ne.verticalTextBoxStartIndex,ne.verticalTextBoxEndIndex,ne.iconBoxStartIndex,ne.iconBoxEndIndex,ne.verticalIconBoxStartIndex,ne.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 ne=C.placedSymbolArray.get(H),xe=ne.vertexStartIndex+ne.numGlyphs*4,Re=ne.vertexStartIndex;Re<xe;Re+=4)C.indexArray.emplaceBack(Re,Re+1,Re+2),C.indexArray.emplaceBack(Re+1,Re+2,Re+3)},Du.prototype.getSortedSymbolIndexes=function(C){if(this.sortedAngle===C&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var H=Math.sin(C),ne=Math.cos(C),xe=[],Re=[],qe=[],pt=0;pt<this.symbolInstances.length;++pt){qe.push(pt);var Dt=this.symbolInstances.get(pt);xe.push(Math.round(H*Dt.anchorX+ne*Dt.anchorY)|0),Re.push(Dt.featureIndex)}return qe.sort(function(Gt,tr){return xe[Gt]-xe[tr]||Re[tr]-Re[Gt]}),qe},Du.prototype.addToSortKeyRanges=function(C,H){var ne=this.sortKeyRanges[this.sortKeyRanges.length-1];ne&&ne.sortKey===H?ne.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 ne=0,xe=this.symbolInstanceIndexes;ne<xe.length;ne+=1){var Re=xe[ne],qe=this.symbolInstances.get(Re);this.featureSortOrder.push(qe.featureIndex),[qe.rightJustifiedTextSymbolIndex,qe.centerJustifiedTextSymbolIndex,qe.leftJustifiedTextSymbolIndex].forEach(function(pt,Dt,Gt){pt>=0&&Gt.indexOf(pt)===Dt&&H.addIndicesForPlacedSymbol(H.text,pt)}),qe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,qe.verticalPlacedTextSymbolIndex),qe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,qe.placedIconSymbolIndex),qe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,qe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},de("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function RW(k,C){return C.replace(/{([^{}]+)}/g,function(H,ne){return ne in k?String(k[ne]):""})}var DW=new ma({"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"])}),zW=new ma({"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:Is,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:zW,layout:DW},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},de("FormatSectionOverride",Vg,{omit:["defaultValue"]});var FW=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(ne,xe){if(k.prototype.recalculate.call(this,ne,xe),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 Re=this.layout.get("text-writing-mode");if(Re){for(var qe=[],pt=0,Dt=Re;pt<Dt.length;pt+=1){var Gt=Dt[pt];qe.indexOf(Gt)<0&&qe.push(Gt)}this.layout._values["text-writing-mode"]=qe}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},C.prototype.getValueAndResolveTokens=function(ne,xe,Re,qe){var pt=this.layout.get(ne).evaluate(xe,{},Re,qe),Dt=this._unevaluatedLayout._values[ne];return!Dt.isDataDriven()&&!ho(Dt.value)&&pt?RW(xe.properties,pt):pt},C.prototype.createBucket=function(ne){return new Du(ne)},C.prototype.queryRadius=function(){return 0},C.prototype.queryIntersectsFeature=function(){return!1},C.prototype._setPaintOverrides=function(){for(var ne=0,xe=mA.paint.overridableProperties;ne<xe.length;ne+=1){var Re=xe[ne];if(C.hasPaintOverride(this.layout,Re)){var qe=this.paint.get(Re),pt=new Vg(qe),Dt=new yc(pt,qe.property.specification),Gt=null;qe.value.kind==="constant"||qe.value.kind==="source"?Gt=new Dc("source",Dt):Gt=new lc("composite",Dt,qe.value.zoomStops,qe.value._interpolationType),this.paint._values[Re]=new Rl(qe.property,Gt,qe.parameters)}}},C.prototype._handleOverridablePaintPropertyUpdate=function(ne,xe,Re){return!this.layout||xe.isDataDriven()||Re.isDataDriven()?!1:C.hasPaintOverride(this.layout,ne)},C.hasPaintOverride=function(ne,xe){var Re=ne.get("text-field"),qe=mA.paint.properties[xe],pt=!1,Dt=function(Pr){for(var Zr=0,Vr=Pr;Zr<Vr.length;Zr+=1){var ua=Vr[Zr];if(qe.overrides&&qe.overrides.hasOverride(ua)){pt=!0;return}}};if(Re.value.kind==="constant"&&Re.value.value instanceof lu)Dt(Re.value.value.sections);else if(Re.value.kind==="source"){var Gt=function(Pr){if(!pt)if(Pr instanceof xs&&nl(Pr.value)===Ts){var Zr=Pr.value;Dt(Zr.sections)}else Pr instanceof qu?Dt(Pr.sections):Pr.eachChild(Gt)},tr=Re.value;tr._styleExpression&&Gt(tr._styleExpression.expression)}return pt},C}(Ya),OW=new ma({"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"])}),BW={paint:OW},NW=function(k){function C(H){k.call(this,H,BW)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Ya),UW=new ma({"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"])}),jW={paint:UW},qW=function(k){function C(H){k.call(this,H,jW)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C}(Ya);function VW(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 GW=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(ne){this.implementation.onAdd&&this.implementation.onAdd(ne,ne.painter.context.gl)},C.prototype.onRemove=function(ne){this.implementation.onRemove&&this.implementation.onRemove(ne,ne.painter.context.gl)},C}(Ya),HW={circle:XT,heatmap:Ag,hillshade:Rx,fill:z0,"fill-extrusion":pv,line:D,symbol:FW,background:NW,raster:qW};function WW(k){return k.type==="custom"?new GW(k):new HW[k.type](k)}var Lk=s.HTMLImageElement,Pk=s.HTMLCanvasElement,Ik=s.HTMLVideoElement,Rk=s.ImageData,db=s.ImageBitmap,N0=function(C,H,ne,xe){this.context=C,this.format=ne,this.texture=C.gl.createTexture(),this.update(H,xe)};N0.prototype.update=function(C,H,ne){var xe=C.width,Re=C.height,qe=(!this.size||this.size[0]!==xe||this.size[1]!==Re)&&!ne,pt=this,Dt=pt.context,Gt=Dt.gl;if(this.useMipmap=!!(H&&H.useMipmap),Gt.bindTexture(Gt.TEXTURE_2D,this.texture),Dt.pixelStoreUnpackFlipY.set(!1),Dt.pixelStoreUnpack.set(1),Dt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Gt.RGBA&&(!H||H.premultiply!==!1)),qe)this.size=[xe,Re],C instanceof Lk||C instanceof Pk||C instanceof Ik||C instanceof Rk||db&&C instanceof db?Gt.texImage2D(Gt.TEXTURE_2D,0,this.format,this.format,Gt.UNSIGNED_BYTE,C):Gt.texImage2D(Gt.TEXTURE_2D,0,this.format,xe,Re,0,this.format,Gt.UNSIGNED_BYTE,C.data);else{var tr=ne||{x:0,y:0},Pr=tr.x,Zr=tr.y;C instanceof Lk||C instanceof Pk||C instanceof Ik||C instanceof Rk||db&&C instanceof db?Gt.texSubImage2D(Gt.TEXTURE_2D,0,Pr,Zr,Gt.RGBA,Gt.UNSIGNED_BYTE,C):Gt.texSubImage2D(Gt.TEXTURE_2D,0,Pr,Zr,xe,Re,Gt.RGBA,Gt.UNSIGNED_BYTE,C.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Gt.generateMipmap(Gt.TEXTURE_2D)},N0.prototype.bind=function(C,H,ne){var xe=this,Re=xe.context,qe=Re.gl;qe.bindTexture(qe.TEXTURE_2D,this.texture),ne===qe.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(ne=qe.LINEAR),C!==this.filter&&(qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,C),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,ne||C),this.filter=C),H!==this.wrap&&(qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,H),qe.texParameteri(qe.TEXTURE_2D,qe.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,ne){this.target=C,this.parent=H,this.mapId=ne,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=le()?C:s};Gg.prototype.send=function(C,H,ne,xe,Re){var qe=this;Re===void 0&&(Re=!1);var pt=Math.round(Math.random()*1e18).toString(36).substring(0,10);ne&&(this.callbacks[pt]=ne);var Dt=Y(this.globalScope)?void 0:[];return this.target.postMessage({id:pt,type:C,hasCallback:!!ne,targetMapId:xe,mustQueue:Re,sourceMapId:this.mapId,data:bt(H,Dt)},Dt),{cancel:function(){ne&&delete qe.callbacks[pt],qe.target.postMessage({id:pt,type:"<cancel>",targetMapId:xe,sourceMapId:qe.mapId})}}},Gg.prototype.receive=function(C){var H=C.data,ne=H.id;if(ne&&!(H.targetMapId&&this.mapId!==H.targetMapId))if(H.type==="<cancel>"){delete this.tasks[ne];var xe=this.cancelCallbacks[ne];delete this.cancelCallbacks[ne],xe&&xe()}else le()||H.mustQueue?(this.tasks[ne]=H,this.taskQueue.push(ne),this.invoker.trigger()):this.processTask(ne,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 ne=this;if(H.type==="<response>"){var xe=this.callbacks[C];delete this.callbacks[C],xe&&(H.error?xe(Mt(H.error)):xe(null,Mt(H.data)))}else{var Re=!1,qe=Y(this.globalScope)?void 0:[],pt=H.hasCallback?function(Zr,Vr){Re=!0,delete ne.cancelCallbacks[C],ne.target.postMessage({id:C,type:"<response>",sourceMapId:ne.mapId,error:Zr?bt(Zr):null,data:bt(Vr,qe)},qe)}:function(Zr){Re=!0},Dt=null,Gt=Mt(H.data);if(this.parent[H.type])Dt=this.parent[H.type](H.sourceMapId,Gt,pt);else if(this.parent.getWorkerSource){var tr=H.type.split("."),Pr=this.parent.getWorkerSource(H.sourceMapId,tr[0],Gt.source);Dt=Pr[tr[1]](Gt,pt)}else pt(new Error("Could not find function "+H.type));!Re&&Dt&&Dt.cancel&&(this.cancelCallbacks[C]=Dt.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function XW(k,C,H){C=Math.pow(2,H)-C-1;var ne=Dk(k*256,C*256,H),xe=Dk((k+1)*256,(C+1)*256,H);return ne[0]+","+ne[1]+","+xe[0]+","+xe[1]}function Dk(k,C,H){var ne=2*Math.PI*6378137/256/Math.pow(2,H),xe=k*ne-2*Math.PI*6378137/2,Re=C*ne-2*Math.PI*6378137/2;return[xe,Re]}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,ne=this._ne,xe,Re;if(C instanceof Fc)xe=C,Re=C;else if(C instanceof Wf){if(xe=C._sw,Re=C._ne,!xe||!Re)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var qe=C;return this.extend(Wf.convert(qe))}else{var pt=C;return this.extend(Fc.convert(pt))}return this}return!H&&!ne?(this._sw=new Fc(xe.lng,xe.lat),this._ne=new Fc(Re.lng,Re.lat)):(H.lng=Math.min(xe.lng,H.lng),H.lat=Math.min(xe.lat,H.lat),ne.lng=Math.max(Re.lng,ne.lng),ne.lat=Math.max(Re.lat,ne.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),ne=H.lng,xe=H.lat,Re=this._sw.lat<=xe&&xe<=this._ne.lat,qe=this._sw.lng<=ne&&ne<=this._ne.lng;return this._sw.lng>this._ne.lng&&(qe=this._sw.lng>=ne&&ne>=this._ne.lng),Re&&qe},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,ne=this.lat*H,xe=C.lat*H,Re=Math.sin(ne)*Math.sin(xe)+Math.cos(ne)*Math.cos(xe)*Math.cos((C.lng-this.lng)*H),qe=zk*Math.acos(Math.min(Re,1));return qe},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var H=40075017,ne=360*C/H,xe=ne/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-xe,this.lat-ne),new Fc(this.lng+xe,this.lat+ne))},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 ZW(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 YW(k,C){return k*Ok(yA(C))}function KW(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,H,ne){ne===void 0&&(ne=0),this.x=+C,this.y=+H,this.z=+ne};U0.fromLngLat=function(C,H){H===void 0&&(H=0);var ne=Fc.convert(C);return new U0(Bk(ne.lng),Nk(ne.lat),Uk(H,ne.lat))},U0.prototype.toLngLat=function(){return new Fc(ZW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return YW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*KW(yA(this.y))};var j0=function(C,H,ne){this.z=C,this.x=H,this.y=ne,this.key=t_(0,C,C,H,ne)};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 ne=XW(this.x,this.y,this.z),xe=JW(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}",xe).replace("{bbox-epsg-3857}",ne)},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,ne,xe,Re){this.overscaledZ=C,this.wrap=H,this.canonical=new j0(ne,+xe,+Re),this.key=t_(H,C,ne,xe,Re)};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 ne=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>>ne,this.canonical.y>>ne)},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,ne=this.canonical.x*2,xe=this.canonical.y*2;return[new Xf(H,this.wrap,H,ne,xe),new Xf(H,this.wrap,H,ne+1,xe),new Xf(H,this.wrap,H,ne,xe+1),new Xf(H,this.wrap,H,ne+1,xe+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,ne,xe){k*=2,k<0&&(k=k*-1-1);var Re=1<<H;return(Re*Re*k+Re*xe+ne).toString(36)+H.toString(36)+C.toString(36)}function JW(k,C,H){for(var ne="",xe,Re=k;Re>0;Re--)xe=1<<Re-1,ne+=(C&xe?1:0)+(H&xe?2:0);return ne}de("CanonicalTileID",j0),de("OverscaledTileID",Xf,{omit:["posMatrix"]});var Bv=function(C,H,ne){if(this.uid=C,H.height!==H.width)throw new RangeError("DEM tiles must be square");if(ne&&ne!=="mapbox"&&ne!=="terrarium")return B('"'+ne+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=H.height;var xe=this.dim=H.height-2;this.data=new Uint32Array(H.data.buffer),this.encoding=ne||"mapbox";for(var Re=0;Re<xe;Re++)this.data[this._idx(-1,Re)]=this.data[this._idx(0,Re)],this.data[this._idx(xe,Re)]=this.data[this._idx(xe-1,Re)],this.data[this._idx(Re,-1)]=this.data[this._idx(Re,0)],this.data[this._idx(Re,xe)]=this.data[this._idx(Re,xe-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(xe,-1)]=this.data[this._idx(xe-1,0)],this.data[this._idx(-1,xe)]=this.data[this._idx(0,xe-1)],this.data[this._idx(xe,xe)]=this.data[this._idx(xe-1,xe-1)]};Bv.prototype.get=function(C,H){var ne=new Uint8Array(this.data.buffer),xe=this._idx(C,H)*4,Re=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return Re(ne[xe],ne[xe+1],ne[xe+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,ne){return(C*256*256+H*256+ne)/10-1e4},Bv.prototype._unpackTerrarium=function(C,H,ne){return C*256+H+ne/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,ne){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var xe=H*this.dim,Re=H*this.dim+this.dim,qe=ne*this.dim,pt=ne*this.dim+this.dim;switch(H){case-1:xe=Re-1;break;case 1:Re=xe+1;break}switch(ne){case-1:qe=pt-1;break;case 1:pt=qe+1;break}for(var Dt=-H*this.dim,Gt=-ne*this.dim,tr=qe;tr<pt;tr++)for(var Pr=xe;Pr<Re;Pr++)this.data[this._idx(Pr,tr)]=C.data[this._idx(Pr+Dt,tr+Gt)]},de("DEMData",Bv);function $W(k,C){var H={};if(!C)return H;for(var ne=function(){var qe=Re[xe],pt=qe.layerIds.map(function(Pr){return C.getLayer(Pr)}).filter(Boolean);if(pt.length!==0){qe.layers=pt,qe.stateDependentLayerIds&&(qe.stateDependentLayers=qe.stateDependentLayerIds.map(function(Pr){return pt.filter(function(Zr){return Zr.id===Pr})[0]}));for(var Dt=0,Gt=pt;Dt<Gt.length;Dt+=1){var tr=Gt[Dt];H[tr.id]=qe}}},xe=0,Re=k;xe<Re.length;xe+=1)ne();return H}var vb=function(C){this._stringToNumber={},this._numberToString=[];for(var H=0;H<C.length;H++){var ne=C[H];this._stringToNumber[ne]=H,this._numberToString[H]=ne}};vb.prototype.encode=function(C){return this._stringToNumber[C]},vb.prototype.decode=function(C){return this._numberToString[C]};var mb=function(C,H,ne,xe,Re){this.type="Feature",this._vectorTileFeature=C,C._z=H,C._x=ne,C._y=xe,this.properties=C.properties,this.id=Re},_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,ne){var xe=String(H);if(this.stateChanges[C]=this.stateChanges[C]||{},this.stateChanges[C][xe]=this.stateChanges[C][xe]||{},g(this.stateChanges[C][xe],ne),this.deletedStates[C]===null){this.deletedStates[C]={};for(var Re in this.state[C])Re!==xe&&(this.deletedStates[C][Re]=null)}else{var qe=this.deletedStates[C]&&this.deletedStates[C][xe]===null;if(qe){this.deletedStates[C][xe]={};for(var pt in this.state[C][xe])ne[pt]||(this.deletedStates[C][xe][pt]=null)}else for(var Dt in ne){var Gt=this.deletedStates[C]&&this.deletedStates[C][xe]&&this.deletedStates[C][xe][Dt]===null;Gt&&delete this.deletedStates[C][xe][Dt]}}},Hg.prototype.removeFeatureState=function(C,H,ne){var xe=this.deletedStates[C]===null;if(!xe){var Re=String(H);if(this.deletedStates[C]=this.deletedStates[C]||{},ne&&H!==void 0)this.deletedStates[C][Re]!==null&&(this.deletedStates[C][Re]=this.deletedStates[C][Re]||{},this.deletedStates[C][Re][ne]=null);else if(H!==void 0){var qe=this.stateChanges[C]&&this.stateChanges[C][Re];if(qe){this.deletedStates[C][Re]={};for(ne in this.stateChanges[C][Re])this.deletedStates[C][Re][ne]=null}else this.deletedStates[C][Re]=null}else this.deletedStates[C]=null}},Hg.prototype.getState=function(C,H){var ne=String(H),xe=this.state[C]||{},Re=this.stateChanges[C]||{},qe=g({},xe[ne],Re[ne]);if(this.deletedStates[C]===null)return{};if(this.deletedStates[C]){var pt=this.deletedStates[C][H];if(pt===null)return{};for(var Dt in pt)delete qe[Dt]}return qe},Hg.prototype.initializeTileState=function(C,H){C.setFeatureState(this.state,H)},Hg.prototype.coalesceChanges=function(C,H){var ne={};for(var xe in this.stateChanges){this.state[xe]=this.state[xe]||{};var Re={};for(var qe in this.stateChanges[xe])this.state[xe][qe]||(this.state[xe][qe]={}),g(this.state[xe][qe],this.stateChanges[xe][qe]),Re[qe]=this.state[xe][qe];ne[xe]=Re}for(var pt in this.deletedStates){this.state[pt]=this.state[pt]||{};var Dt={};if(this.deletedStates[pt]===null)for(var Gt in this.state[pt])Dt[Gt]={},this.state[pt][Gt]={};else for(var tr in this.deletedStates[pt]){var Pr=this.deletedStates[pt][tr]===null;if(Pr)this.state[pt][tr]={};else for(var Zr=0,Vr=Object.keys(this.deletedStates[pt][tr]);Zr<Vr.length;Zr+=1){var ua=Vr[Zr];delete this.state[pt][tr][ua]}Dt[tr]=this.state[pt][tr]}ne[pt]=ne[pt]||{},g(ne[pt],Dt)}if(this.stateChanges={},this.deletedStates={},Object.keys(ne).length!==0)for(var Oa in C){var Mi=C[Oa];Mi.setFeatureState(ne,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,ne,xe,Re,qe){var pt=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ne,xe,Re);for(var Dt=qe?this.grid3D:this.grid,Gt=0;Gt<H.length;Gt++){for(var tr=H[Gt],Pr=[1/0,1/0,-1/0,-1/0],Zr=0;Zr<tr.length;Zr++){var Vr=tr[Zr];Pr[0]=Math.min(Pr[0],Vr.x),Pr[1]=Math.min(Pr[1],Vr.y),Pr[2]=Math.max(Pr[2],Vr.x),Pr[3]=Math.max(Pr[3],Vr.y)}Pr[0]<ui&&Pr[1]<ui&&Pr[2]>=0&&Pr[3]>=0&&Dt.insert(pt,Pr[0],Pr[1],Pr[2],Pr[3])}},Nv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new mo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nv.prototype.query=function(C,H,ne,xe){var Re=this;this.loadVTLayers();for(var qe=C.params||{},pt=ui/C.tileSize/C.scale,Dt=Je(qe.filter),Gt=C.queryGeometry,tr=C.queryPadding*pt,Pr=Vk(Gt),Zr=this.grid.query(Pr.minX-tr,Pr.minY-tr,Pr.maxX+tr,Pr.maxY+tr),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-tr,Vr.minY-tr,Vr.maxX+tr,Vr.maxY+tr,function(Tn,Vn,Nn,So){return td(C.cameraQueryGeometry,Tn-tr,Vn-tr,Nn+tr,So+tr)}),Oa=0,Mi=ua;Oa<Mi.length;Oa+=1){var ii=Mi[Oa];Zr.push(ii)}Zr.sort(QW);for(var $i={},Oi,Ji=function(Tn){var Vn=Zr[Tn];if(Vn!==Oi){Oi=Vn;var Nn=Re.featureIndexArray.get(Vn),So=null;Re.loadMatchingFeature($i,Nn.bucketIndex,Nn.sourceLayerIndex,Nn.featureIndex,Dt,qe.layers,qe.availableImages,H,ne,xe,function(oo,go,ks){return So||(So=fn(oo)),go.queryIntersectsFeature(Gt,oo,ks,So,Re.z,C.transform,pt,C.pixelPosMatrix)})}},ln=0;ln<Zr.length;ln++)Ji(ln);return $i},Nv.prototype.loadMatchingFeature=function(C,H,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr){var Zr=this.bucketLayerIDs[H];if(!(qe&&!P(qe,Zr))){var Vr=this.sourceLayerCoder.decode(ne),ua=this.vtLayers[Vr],Oa=ua.feature(xe);if(Re.needGeometry){var Mi=_o(Oa,!0);if(!Re.filter(new gn(this.tileID.overscaledZ),Mi,this.tileID.canonical))return}else if(!Re.filter(new gn(this.tileID.overscaledZ),Oa))return;for(var ii=this.getId(Oa,Vr),$i=0;$i<Zr.length;$i++){var Oi=Zr[$i];if(!(qe&&qe.indexOf(Oi)<0)){var Ji=Dt[Oi];if(Ji){var ln={};ii!==void 0&&tr&&(ln=tr.getState(Ji.sourceLayer||"_geojsonTileLayer",ii));var Tn=g({},Gt[Oi]);Tn.paint=qk(Tn.paint,Ji.paint,Oa,ln,pt),Tn.layout=qk(Tn.layout,Ji.layout,Oa,ln,pt);var Vn=!Pr||Pr(Oa,Ji,ln);if(Vn){var Nn=new mb(Oa,this.z,this.x,this.y,ii);Nn.layer=Tn;var So=C[Oi];So===void 0&&(So=C[Oi]=[]),So.push({featureIndex:xe,feature:Nn,intersectionZ:Vn})}}}}}},Nv.prototype.lookupSymbolFeatures=function(C,H,ne,xe,Re,qe,pt,Dt){var Gt={};this.loadVTLayers();for(var tr=Je(Re),Pr=0,Zr=C;Pr<Zr.length;Pr+=1){var Vr=Zr[Pr];this.loadMatchingFeature(Gt,ne,xe,Vr,tr,qe,pt,Dt,H)}return Gt},Nv.prototype.hasLayer=function(C){for(var H=0,ne=this.bucketLayerIDs;H<ne.length;H+=1)for(var xe=ne[H],Re=0,qe=xe;Re<qe.length;Re+=1){var pt=qe[Re];if(C===pt)return!0}return!1},Nv.prototype.getId=function(C,H){var ne=C.id;if(this.promoteId){var xe=typeof this.promoteId=="string"?this.promoteId:this.promoteId[H];ne=C.properties[xe],typeof ne=="boolean"&&(ne=Number(ne))}return ne},de("FeatureIndex",Nv,{omit:["rawTileData","sourceLayerCoder"]});function qk(k,C,H,ne,xe){return F(k,function(Re,qe){var pt=C instanceof _c?C.get(qe):null;return pt&&pt.evaluate?pt.evaluate(H,ne,xe):pt})}function Vk(k){for(var C=1/0,H=1/0,ne=-1/0,xe=-1/0,Re=0,qe=k;Re<qe.length;Re+=1){var pt=qe[Re];C=Math.min(C,pt.x),H=Math.min(H,pt.y),ne=Math.max(ne,pt.x),xe=Math.max(xe,pt.y)}return{minX:C,minY:H,maxX:ne,maxY:xe}}function QW(k,C){return C-k}var eX=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<be.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,ne){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!C){this.collisionBoxArray=new po;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=$W(C.buckets,H.style),this.hasSymbolBuckets=!1;for(var xe in this.buckets){var Re=this.buckets[xe];if(Re instanceof Du)if(this.hasSymbolBuckets=!0,ne)Re.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var qe in this.buckets){var pt=this.buckets[qe];if(pt instanceof Du&&pt.hasRTLText){this.hasRTLText=!0,xl();break}}this.queryPadding=0;for(var Dt in this.buckets){var Gt=this.buckets[Dt];this.queryPadding=Math.max(this.queryPadding,H.style.getLayer(Dt).queryRadius(Gt))}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 ne=this.buckets[H];ne.uploadPending()&&ne.upload(C)}var xe=C.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new N0(C,this.imageAtlas.image,xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new N0(C,this.glyphAtlasImage,xe.ALPHA),this.glyphAtlasImage=null)},mh.prototype.prepare=function(C){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(C,this.imageAtlasTexture)},mh.prototype.queryRenderedFeatures=function(C,H,ne,xe,Re,qe,pt,Dt,Gt,tr){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:xe,cameraQueryGeometry:Re,scale:qe,tileSize:this.tileSize,pixelPosMatrix:tr,transform:Dt,params:pt,queryPadding:this.queryPadding*Gt},C,H,ne)},mh.prototype.querySourceFeatures=function(C,H){var ne=this.latestFeatureIndex;if(!(!ne||!ne.rawTileData)){var xe=ne.loadVTLayers(),Re=H?H.sourceLayer:"",qe=xe._geojsonTileLayer||xe[Re];if(qe)for(var pt=Je(H&&H.filter),Dt=this.tileID.canonical,Gt=Dt.z,tr=Dt.x,Pr=Dt.y,Zr={z:Gt,x:tr,y:Pr},Vr=0;Vr<qe.length;Vr++){var ua=qe.feature(Vr);if(pt.needGeometry){var Oa=_o(ua,!0);if(!pt.filter(new gn(this.tileID.overscaledZ),Oa,this.tileID.canonical))continue}else if(!pt.filter(new gn(this.tileID.overscaledZ),ua))continue;var Mi=ne.getId(ua,Re),ii=new mb(ua,Gt,tr,Pr,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 ne=fe(C.cacheControl);ne["max-age"]&&(this.expirationTime=Date.now()+ne["max-age"]*1e3)}else C.expires&&(this.expirationTime=new Date(C.expires).getTime());if(this.expirationTime){var xe=Date.now(),Re=!1;if(this.expirationTime>xe)Re=!1;else if(!H)Re=!0;else if(this.expirationTime<H)Re=!0;else{var qe=this.expirationTime-H;qe?this.expirationTime=xe+Math.max(qe,eX):Re=!0}Re?(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 ne=this.latestFeatureIndex.loadVTLayers();for(var xe in this.buckets)if(H.style.hasLayer(xe)){var Re=this.buckets[xe],qe=Re.layers[0].sourceLayer||"_geojsonTileLayer",pt=ne[qe],Dt=C[qe];if(!(!pt||!Dt||Object.keys(Dt).length===0)){Re.update(Dt,pt,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Gt=H&&H.style&&H.style.getLayer(xe);Gt&&(this.queryPadding=Math.max(this.queryPadding,Gt.queryRadius(Re)))}}}},mh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},mh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<be.now()},mh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},mh.prototype.setHoldDuration=function(C){this.symbolFadeHoldUntil=be.now()+C},mh.prototype.setDependencies=function(C,H){for(var ne={},xe=0,Re=H;xe<Re.length;xe+=1){var qe=Re[xe];ne[qe]=!0}this.dependencies[C]=ne},mh.prototype.hasDependency=function(C,H){for(var ne=0,xe=C;ne<xe.length;ne+=1){var Re=xe[ne],qe=this.dependencies[Re];if(qe)for(var pt=0,Dt=H;pt<Dt.length;pt+=1){var Gt=Dt[pt];if(qe[Gt])return!0}}return!1};var tX=["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=po,e.Color=Fs,e.DEMData=Bv,e.DataConstantProperty=it,e.DictionaryCoder=vb,e.EXTENT=ui,e.ErrorEvent=Cr,e.EvaluationParameters=gn,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=ma,e.Protobuf=mo,e.RGBAImage=eh,e.RequestManager=he,e.RequestPerformance=Gk,e.ResourceType=hi,e.SegmentVector=Co,e.SourceFeatureState=Hg,e.StructArrayLayout1ui2=Zn,e.StructArrayLayout2f1f2i16=Ti,e.StructArrayLayout2i4=Ma,e.StructArrayLayout3ui6=Xi,e.StructArrayLayout4i8=Qa,e.SymbolBucket=Du,e.Texture=N0,e.Tile=mh,e.Transitionable=ms,e.Uniform1f=kt,e.Uniform1i=yt,e.Uniform2f=Bt,e.Uniform3f=nr,e.Uniform4f=hr,e.UniformColor=lr,e.UniformMatrix4f=ur,e.UnwrappedTileID=jk,e.ValidationError=Ln,e.WritingMode=vp,e.ZoomHistory=ar,e.add=Pp,e.addDynamicAttributes=vA,e.asyncAll=w,e.bezier=p,e.bindAll=L,e.browser=be,e.cacheEntryPossiblyAdded=fa,e.clamp=l,e.clearTileCache=Ia,e.clipLine=Ak,e.clone=om,e.clone$1=O,e.clone$2=xg,e.collisionCircleLayout=or,e.config=Ae,e.create=nm,e.create$1=ph,e.create$2=Gd,e.createCommonjsModule=t,e.createExpression=Ro,e.createLayout=Ei,e.createStyleLayer=WW,e.cross=jT,e.deepEqual=h,e.dot=UT,e.dot$1=WT,e.ease=T,e.emitValidationErrors=Ru,e.endsWith=z,e.enforceCacheSizeLimit=Da,e.evaluateSizeForFeature=gk,e.evaluateSizeForZoom=yk,e.evaluateVariableOffset=Ek,e.evented=ro,e.extend=g,e.featureFilter=Je,e.filterObject=N,e.fromRotation=iv,e.getAnchorAlignment=$1,e.getAnchorJustification=dA,e.getArrayBuffer=ra,e.getImage=on,e.getJSON=ta,e.getRTLTextPluginStatus=Yo,e.getReferrer=Kt,e.getVideo=hn,e.identity=Pv,e.invert=nv,e.isChar=Ot,e.isMapboxURL=Oe,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=f,e.normalize=T0,e.number=El,e.offscreenCanvasSupported=Ca,e.ortho=Mu,e.parseGlyphPBF=_d,e.pbf=mo,e.performSymbolLayout=MW,e.perspective=sm,e.pick=b,e.plugin=al,e.polygonIntersectsPolygon=Do,e.postMapLoadEvent=Te,e.postTurnstileEvent=Ne,e.potpack=Wp,e.refProperties=tX,e.register=de,e.registerForPluginStateChange=io,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=Ho,e.sphericalToCartesian=se,e.sqrLen=I1,e.styleSpec=Gi,e.sub=VT,e.symbolSize=gW,e.transformMat3=qT,e.transformMat4=Rv,e.translate=cc,e.triggerPluginCompletionEvent=Pn,e.uniqueId=u,e.validateCustomStyleLayer=VW,e.validateLight=$o,e.validateStyle=Jo,e.values=A,e.vectorTile=Xd,e.version=r,e.warnOnce=B,e.webpSupported=De,e.window=s,e.wrap=_}),E(["./shared"],function(e){"use strict";function t(Kt){var Ft=typeof Kt;if(Ft==="number"||Ft==="boolean"||Ft==="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 Ft="",Yt=0,Jt=e.refProperties;Yt<Jt.length;Yt+=1){var Fr=Jt[Yt];Ft+="/"+t(Kt[Fr])}return Ft}function o(Kt,Ft){for(var Yt={},Jt=0;Jt<Kt.length;Jt++){var Fr=Ft&&Ft[Kt[Jt].id]||r(Kt[Jt]);Ft&&(Ft[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(Ft){this.keyCache={},Ft&&this.replace(Ft)};a.prototype.replace=function(Ft){this._layerConfigs={},this._layers={},this.update(Ft,[])},a.prototype.update=function(Ft,Yt){for(var Jt=this,Fr=0,ta=Ft;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 tn=Ra[pi],on=tn.map(function(xr){return Jt._layers[xr.id]}),hn=on[0];if(hn.visibility!=="none"){var Tt=hn.source||"",ut=this.familiesBySource[Tt];ut||(ut=this.familiesBySource[Tt]={});var Br=hn.sourceLayer||"_geojsonTileLayer",Cr=ut[Br];Cr||(Cr=ut[Br]=[]),Cr.push(on)}}};var n=1,i=function(Ft){var Yt={},Jt=[];for(var Fr in Ft){var ta=Ft[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 tn in Ft){var on=Ft[tn];for(var hn in on){var Tt=on[+hn];if(!(!Tt||Tt.bitmap.width===0||Tt.bitmap.height===0)){var ut=Yt[tn][hn].rect;e.AlphaImage.copy(Tt.bitmap,Ra,{x:0,y:0},{x:ut.x+n,y:ut.y+n},Tt.bitmap)}}}this.image=Ra,this.positions=Yt};e.register("GlyphAtlas",i);var s=function(Ft){this.tileID=new e.OverscaledTileID(Ft.tileID.overscaledZ,Ft.tileID.wrap,Ft.tileID.canonical.z,Ft.tileID.canonical.x,Ft.tileID.canonical.y),this.uid=Ft.uid,this.zoom=Ft.zoom,this.pixelRatio=Ft.pixelRatio,this.tileSize=Ft.tileSize,this.source=Ft.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ft.showCollisionBoxes,this.collectResourceTiming=!!Ft.collectResourceTiming,this.returnDependencies=!!Ft.returnDependencies,this.promoteId=Ft.promoteId};s.prototype.parse=function(Ft,Yt,Jt,Fr,ta){var ra=this;this.status="parsing",this.data=Ft,this.collisionBoxArray=new e.CollisionBoxArray;var ca=new e.DictionaryCoder(Object.keys(Ft.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=Ft.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 tn=ca.encode(pi),on=[],hn=0;hn<Ra.length;hn++){var Tt=Ra.feature(hn),ut=Ba.getId(Tt,pi);on.push({feature:Tt,id:ut,index:hn,sourceLayerIndex:tn})}for(var Br=0,Cr=ri[pi];Br<Cr.length;Br+=1){var xr=Cr[Br],Ir=xr[0];if(!(Ir.minzoom&&this.zoom<Math.floor(Ir.minzoom))&&!(Ir.maxzoom&&this.zoom>=Ir.maxzoom)&&Ir.visibility!=="none"){h(xr,this.zoom,Jt);var Ur=$a[Ir.id]=Ir.createBucket({index:Ba.bucketLayerIDs.length,layers:xr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:tn,sourceID:this.source});Ur.populate(on,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(xr.map(function(la){return la.id}))}}}}var Hr,xt,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,Ta){Hr||(Hr=la,xt=Ta,ya.call(ra))}):xt={};var ba=Object.keys(Za.iconDependencies);ba.length?Fr.send("getImages",{icons:ba,source:this.source,tileID:this.tileID,type:"icons"},function(la,Ta){Hr||(Hr=la,Xt=Ta,ya.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,Ta){Hr||(Hr=la,vr=Ta,ya.call(ra))}):vr={},ya.call(this);function ya(){if(Hr)return ta(Hr);if(xt&&Xt&&vr){var la=new i(xt),Ta=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,xt,la.positions,Xt,Ta.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,Ta.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:Ta,glyphMap:this.returnDependencies?xt:null,iconMap:this.returnDependencies?Xt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Kt,Ft,Yt){for(var Jt=new e.EvaluationParameters(Ft),Fr=0,ta=Kt;Fr<ta.length;Fr+=1){var ra=ta[Fr];ra.recalculate(Jt,Yt)}}function c(Kt,Ft){var Yt=e.getArrayBuffer(Kt.request,function(Jt,Fr,ta,ra){Jt?Ft(Jt):Fr&&Ft(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(Fr)),rawData:Fr,cacheControl:ta,expires:ra})});return function(){Yt.cancel(),Ft()}}var m=function(Ft,Yt,Jt,Fr){this.actor=Ft,this.layerIndex=Yt,this.availableImages=Jt,this.loadVectorData=Fr||c,this.loading={},this.loaded={}};m.prototype.loadTile=function(Ft,Yt){var Jt=this,Fr=Ft.uid;this.loading||(this.loading={});var ta=Ft&&Ft.request&&Ft.request.collectResourceTiming?new e.RequestPerformance(Ft.request):!1,ra=this.loading[Fr]=new s(Ft);ra.abort=this.loadVectorData(Ft,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,tn){if(Ra||!tn)return Yt(Ra);Yt(null,e.extend({rawTileData:$a.slice(0)},tn,Za,ri))}),Jt.loaded=Jt.loaded||{},Jt.loaded[Fr]=ra})},m.prototype.reloadTile=function(Ft,Yt){var Jt=this,Fr=this.loaded,ta=Ft.uid,ra=this;if(Fr&&Fr[ta]){var ca=Fr[ta];ca.showCollisionBoxes=Ft.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())}},m.prototype.abortTile=function(Ft,Yt){var Jt=this.loading,Fr=Ft.uid;Jt&&Jt[Fr]&&Jt[Fr].abort&&(Jt[Fr].abort(),delete Jt[Fr]),Yt()},m.prototype.removeTile=function(Ft,Yt){var Jt=this.loaded,Fr=Ft.uid;Jt&&Jt[Fr]&&delete Jt[Fr],Yt()};var p=e.window.ImageBitmap,T=function(){this.loaded={}};T.prototype.loadTile=function(Ft,Yt){var Jt=Ft.uid,Fr=Ft.encoding,ta=Ft.rawImageData,ra=p&&ta instanceof p?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(Ft){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Ft.width,Ft.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Ft.width,this.offscreenCanvas.height=Ft.height,this.offscreenCanvasContext.drawImage(Ft,0,0,Ft.width,Ft.height);var Yt=this.offscreenCanvasContext.getImageData(-1,-1,Ft.width+2,Ft.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(Ft){var Yt=this.loaded,Jt=Ft.uid;Yt&&Yt[Jt]&&delete Yt[Jt]};var l=_;function _(Kt,Ft){var Yt=Kt&&Kt.type,Jt;if(Yt==="FeatureCollection")for(Jt=0;Jt<Kt.features.length;Jt++)_(Kt.features[Jt],Ft);else if(Yt==="GeometryCollection")for(Jt=0;Jt<Kt.geometries.length;Jt++)_(Kt.geometries[Jt],Ft);else if(Yt==="Feature")_(Kt.geometry,Ft);else if(Yt==="Polygon")w(Kt.coordinates,Ft);else if(Yt==="MultiPolygon")for(Jt=0;Jt<Kt.coordinates.length;Jt++)w(Kt.coordinates[Jt],Ft);return Kt}function w(Kt,Ft){if(Kt.length!==0){A(Kt[0],Ft);for(var Yt=1;Yt<Kt.length;Yt++)A(Kt[Yt],!Ft)}}function A(Kt,Ft){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!=!!Ft&&Kt.reverse()}var M=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(Ft){this._feature=Ft,this.extent=e.EXTENT,this.type=Ft.type,this.properties=Ft.tags,"id"in Ft&&!isNaN(Ft.id)&&(this.id=parseInt(Ft.id,10))};g.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Ft=[],Yt=0,Jt=this._feature.geometry;Yt<Jt.length;Yt+=1){var Fr=Jt[Yt];Ft.push([new e.Point$1(Fr[0],Fr[1])])}return Ft}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(Ft,Yt,Jt){return M.call(this,Ft,Yt,Jt)};var b=function(Ft){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=Ft.length,this._features=Ft};b.prototype.feature=function(Ft){return new g(this._features[Ft])};var d=e.vectorTile.VectorTileFeature,u=y;function y(Kt,Ft){this.options=Ft||{},this.features=Kt,this.length=Kt.length}y.prototype.feature=function(Kt){return new f(this.features[Kt],this.options.extent)};function f(Kt,Ft){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=Ft||4096}f.prototype.loadGeometry=function(){var Kt=this.rawGeometry;this.geometry=[];for(var Ft=0;Ft<Kt.length;Ft++){for(var Yt=Kt[Ft],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},f.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Kt=this.geometry,Ft=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];Ft=Math.min(Ft,Ba.x),Yt=Math.max(Yt,Ba.x),Jt=Math.min(Jt,Ba.y),Fr=Math.max(Fr,Ba.y)}return[Ft,Jt,Yt,Fr]},f.prototype.toGeoJSON=d.prototype.toGeoJSON;var R=N,L=N,z=O,F=u;function N(Kt){var Ft=new e.pbf;return P(Kt,Ft),Ft.finish()}function O(Kt,Ft){Ft=Ft||{};var Yt={};for(var Jt in Kt)Yt[Jt]=new u(Kt[Jt].features,Ft),Yt[Jt].name=Jt,Yt[Jt].version=Ft.version,Yt[Jt].extent=Ft.extent;return N({layers:Yt})}function P(Kt,Ft){for(var Yt in Kt.layers)Ft.writeMessage(3,U,Kt.layers[Yt])}function U(Kt,Ft){Ft.writeVarintField(15,Kt.version||1),Ft.writeStringField(1,Kt.name||""),Ft.writeVarintField(5,Kt.extent||4096);var Yt,Jt={keys:[],values:[],keycache:{},valuecache:{}};for(Yt=0;Yt<Kt.length;Yt++)Jt.feature=Kt.feature(Yt),Ft.writeMessage(2,B,Jt);var Fr=Jt.keys;for(Yt=0;Yt<Fr.length;Yt++)Ft.writeStringField(3,Fr[Yt]);var ta=Jt.values;for(Yt=0;Yt<ta.length;Yt++)Ft.writeMessage(4,fe,ta[Yt])}function B(Kt,Ft){var Yt=Kt.feature;Yt.id!==void 0&&Ft.writeVarintField(1,Yt.id),Ft.writeMessage(2,X,Kt),Ft.writeVarintField(3,Yt.type),Ft.writeMessage(4,le,Yt)}function X(Kt,Ft){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),Ft.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),Ft.writeVarint(pi)}}function $(Kt,Ft){return(Ft<<3)+(Kt&7)}function se(Kt){return Kt<<1^Kt>>31}function le(Kt,Ft){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),Ft.writeVarint($(1,$a));for(var Za=Jt===3?Ba.length-1:Ba.length,ri=0;ri<Za;ri++){ri===1&&Jt!==1&&Ft.writeVarint($(2,Za-1));var pi=Ba[ri].x-Fr,Ra=Ba[ri].y-ta;Ft.writeVarint(se(pi)),Ft.writeVarint(se(Ra)),Fr+=pi,ta+=Ra}Jt===3&&Ft.writeVarint($(7,1))}}function fe(Kt,Ft){var Yt=typeof Kt;Yt==="string"?Ft.writeStringField(1,Kt):Yt==="boolean"?Ft.writeBooleanField(7,Kt):Yt==="number"&&(Kt%1!==0?Ft.writeDoubleField(3,Kt):Kt<0?Ft.writeSVarintField(6,Kt):Ft.writeVarintField(5,Kt))}R.fromVectorTileJs=L,R.fromGeojsonVt=z,R.GeoJSONWrapper=F;function V(Kt,Ft,Yt,Jt,Fr,ta){if(!(Fr-Jt<=Yt)){var ra=Jt+Fr>>1;Y(Kt,Ft,ra,Jt,Fr,ta%2),V(Kt,Ft,Yt,Jt,ra-1,ta+1),V(Kt,Ft,Yt,ra+1,Fr,ta+1)}}function Y(Kt,Ft,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,Ft,Yt,ri,pi,ta)}var Ra=Ft[2*Yt+ta],tn=Jt,on=Fr;for(ee(Kt,Ft,Jt,Yt),Ft[2*Fr+ta]>Ra&&ee(Kt,Ft,Jt,Fr);tn<on;){for(ee(Kt,Ft,tn,on),tn++,on--;Ft[2*tn+ta]<Ra;)tn++;for(;Ft[2*on+ta]>Ra;)on--}Ft[2*Jt+ta]===Ra?ee(Kt,Ft,Jt,on):(on++,ee(Kt,Ft,on,Fr)),on<=Yt&&(Jt=on+1),Yt<=on&&(Fr=on-1)}}function ee(Kt,Ft,Yt,Jt){q(Kt,Yt,Jt),q(Ft,2*Yt,2*Jt),q(Ft,2*Yt+1,2*Jt+1)}function q(Kt,Ft,Yt){var Jt=Kt[Ft];Kt[Ft]=Kt[Yt],Kt[Yt]=Jt}function oe(Kt,Ft,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 tn=Ra;tn<=pi;tn++)$a=Ft[2*tn],Za=Ft[2*tn+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[tn]);continue}var on=Math.floor((Ra+pi)/2);$a=Ft[2*on],Za=Ft[2*on+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[on]);var hn=(ri+1)%2;(ri===0?Yt<=$a:Jt<=Za)&&(ca.push(Ra),ca.push(on-1),ca.push(hn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(on+1),ca.push(pi),ca.push(hn))}return Ba}function ae(Kt,Ft,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(Ft[2*pi],Ft[2*pi+1],Yt,Jt)<=Ba&&ca.push(Kt[pi]);continue}var Ra=Math.floor((ri+Za)/2),tn=Ft[2*Ra],on=Ft[2*Ra+1];j(tn,on,Yt,Jt)<=Ba&&ca.push(Kt[Ra]);var hn=($a+1)%2;($a===0?Yt-Fr<=tn:Jt-Fr<=on)&&(ra.push(ri),ra.push(Ra-1),ra.push(hn)),($a===0?Yt+Fr>=tn:Jt+Fr>=on)&&(ra.push(Ra+1),ra.push(Za),ra.push(hn))}return ca}function j(Kt,Ft,Yt,Jt){var Fr=Kt-Yt,ta=Ft-Jt;return Fr*Fr+ta*ta}var Q=function(Kt){return Kt[0]},re=function(Kt){return Kt[1]},ce=function(Ft,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=Ft;for(var ra=Ft.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Ft.length),Ba=this.coords=new ta(Ft.length*2),$a=0;$a<Ft.length;$a++)ca[$a]=$a,Ba[2*$a]=Yt(Ft[$a]),Ba[2*$a+1]=Jt(Ft[$a]);V(ca,Ba,Fr,0,ca.length-1,0)};ce.prototype.range=function(Ft,Yt,Jt,Fr){return oe(this.ids,this.coords,Ft,Yt,Jt,Fr,this.nodeSize)},ce.prototype.within=function(Ft,Yt,Jt){return ae(this.ids,this.coords,Ft,Yt,Jt,this.nodeSize)};var be={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Kt){return Kt}},Ae=function(Ft){this.options=ye(Object.create(be),Ft),this.trees=new Array(this.options.maxZoom+1)};Ae.prototype.load=function(Ft){var Yt=this.options,Jt=Yt.log,Fr=Yt.minZoom,ta=Yt.maxZoom,ra=Yt.nodeSize;Jt&&console.time("total time");var ca="prepare "+Ft.length+" points";Jt&&console.time(ca),this.points=Ft;for(var Ba=[],$a=0;$a<Ft.length;$a++)Ft[$a].geometry&&Ba.push(ze(Ft[$a],$a));this.trees[ta+1]=new ce(Ba,he,Oe,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 ce(Ba,he,Oe,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Ae.prototype.getClusters=function(Ft,Yt){var Jt=((Ft[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Ft[1])),ta=Ft[2]===180?180:((Ft[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Ft[3]));if(Ft[2]-Ft[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),rt(ra),nt(ta),rt(Fr)),ri=[],pi=0,Ra=Za;pi<Ra.length;pi+=1){var tn=Ra[pi],on=$a.points[tn];ri.push(on.numPoints?Ze(on):this.points[on.index])}return ri},Ae.prototype.getChildren=function(Ft){var Yt=this._getOriginId(Ft),Jt=this._getOriginZoom(Ft),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===Ft&&$a.push(Ra.numPoints?Ze(Ra):this.points[Ra.index])}if($a.length===0)throw new Error(Fr);return $a},Ae.prototype.getLeaves=function(Ft,Yt,Jt){Yt=Yt||10,Jt=Jt||0;var Fr=[];return this._appendLeaves(Fr,Ft,Yt,Jt,0),Fr},Ae.prototype.getTile=function(Ft,Yt,Jt){var Fr=this.trees[this._limitZoom(Ft)],ta=Math.pow(2,Ft),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},Ae.prototype.getClusterExpansionZoom=function(Ft){for(var Yt=this._getOriginZoom(Ft)-1;Yt<=this.options.maxZoom;){var Jt=this.getChildren(Ft);if(Yt++,Jt.length!==1)break;Ft=Jt[0].properties.cluster_id}return Yt},Ae.prototype._appendLeaves=function(Ft,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(Ft,Za.cluster_id,Jt,Fr,ta):ta<Fr?ta++:Ft.push($a),Ft.length===Jt)break}return ta},Ae.prototype._addTileFeatures=function(Ft,Yt,Jt,Fr,ta,ra){for(var ca=0,Ba=Ft;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)}},Ae.prototype._limitZoom=function(Ft){return Math.max(this.options.minZoom,Math.min(+Ft,this.options.maxZoom+1))},Ae.prototype._cluster=function(Ft,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<Ft.length;Za++){var ri=Ft[Za];if(!(ri.zoom<=Yt)){ri.zoom=Yt;for(var pi=this.trees[Yt+1],Ra=pi.within(ri.x,ri.y,$a),tn=ri.numPoints||1,on=tn,hn=0,Tt=Ra;hn<Tt.length;hn+=1){var ut=Tt[hn],Br=pi.points[ut];Br.zoom>Yt&&(on+=Br.numPoints||1)}if(on>=Ba){for(var Cr=ri.x*tn,xr=ri.y*tn,Ir=ca&&tn>1?this._map(ri,!0):null,Ur=(Za<<5)+(Yt+1)+this.points.length,Hr=0,xt=Ra;Hr<xt.length;Hr+=1){var Xt=xt[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&&(Ir||(Ir=this._map(ri,!0)),ca(Ir,this._map(vr)))}}ri.parentId=Ur,Jt.push(De(Cr/on,xr/on,Ur,on,Ir))}else if(Jt.push(ri),on>1)for(var ba=0,Pa=Ra;ba<Pa.length;ba+=1){var ya=Pa[ba],la=pi.points[ya];la.zoom<=Yt||(la.zoom=Yt,Jt.push(la))}}}return Jt},Ae.prototype._getOriginId=function(Ft){return Ft-this.points.length>>5},Ae.prototype._getOriginZoom=function(Ft){return(Ft-this.points.length)%32},Ae.prototype._map=function(Ft,Yt){if(Ft.numPoints)return Yt?ye({},Ft.properties):Ft.properties;var Jt=this.points[Ft.index].properties,Fr=this.options.map(Jt);return Yt&&Fr===Jt?ye({},Fr):Fr};function De(Kt,Ft,Yt,Jt,Fr){return{x:Kt,y:Ft,zoom:1/0,id:Yt,parentId:-1,numPoints:Jt,properties:Fr}}function ze(Kt,Ft){var Yt=Kt.geometry.coordinates,Jt=Yt[0],Fr=Yt[1];return{x:nt(Jt),y:rt(Fr),zoom:1/0,index:Ft,parentId:-1}}function Ze(Kt){return{type:"Feature",id:Kt.id,properties:at(Kt),geometry:{type:"Point",coordinates:[st(Kt.x),Me(Kt.y)]}}}function at(Kt){var Ft=Kt.numPoints,Yt=Ft>=1e4?Math.round(Ft/1e3)+"k":Ft>=1e3?Math.round(Ft/100)/10+"k":Ft;return ye(ye({},Kt.properties),{cluster:!0,cluster_id:Kt.id,point_count:Ft,point_count_abbreviated:Yt})}function nt(Kt){return Kt/360+.5}function rt(Kt){var Ft=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Ft)/(1-Ft))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function st(Kt){return(Kt-.5)*360}function Me(Kt){var Ft=(180-Kt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Ft))/Math.PI-90}function ye(Kt,Ft){for(var Yt in Ft)Kt[Yt]=Ft[Yt];return Kt}function he(Kt){return Kt.x}function Oe(Kt){return Kt.y}function tt(Kt,Ft,Yt,Jt){for(var Fr=Jt,ta=Yt-Ft>>1,ra=Yt-Ft,ca,Ba=Kt[Ft],$a=Kt[Ft+1],Za=Kt[Yt],ri=Kt[Yt+1],pi=Ft+3;pi<Yt;pi+=3){var Ra=ot(Kt[pi],Kt[pi+1],Ba,$a,Za,ri);if(Ra>Fr)ca=pi,Fr=Ra;else if(Ra===Fr){var tn=Math.abs(pi-ta);tn<ra&&(ca=pi,ra=tn)}}Fr>Jt&&(ca-Ft>3&&tt(Kt,Ft,ca,Jt),Kt[ca+2]=Fr,Yt-ca>3&&tt(Kt,ca,Yt,Jt))}function ot(Kt,Ft,Yt,Jt,Fr,ta){var ra=Fr-Yt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Kt-Yt)*ra+(Ft-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=Ft-Jt,ra*ra+ca*ca}function Qe(Kt,Ft,Yt,Jt){var Fr={id:typeof Kt>"u"?null:Kt,type:Ft,geometry:Yt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Pt(Fr),Fr}function Pt(Kt){var Ft=Kt.geometry,Yt=Kt.type;if(Yt==="Point"||Yt==="MultiPoint"||Yt==="LineString")It(Kt,Ft);else if(Yt==="Polygon"||Yt==="MultiLineString")for(var Jt=0;Jt<Ft.length;Jt++)It(Kt,Ft[Jt]);else if(Yt==="MultiPolygon")for(Jt=0;Jt<Ft.length;Jt++)for(var Fr=0;Fr<Ft[Jt].length;Fr++)It(Kt,Ft[Jt][Fr])}function It(Kt,Ft){for(var Yt=0;Yt<Ft.length;Yt+=3)Kt.minX=Math.min(Kt.minX,Ft[Yt]),Kt.minY=Math.min(Kt.minY,Ft[Yt+1]),Kt.maxX=Math.max(Kt.maxX,Ft[Yt]),Kt.maxY=Math.max(Kt.maxY,Ft[Yt+1])}function qt(Kt,Ft){var Yt=[];if(Kt.type==="FeatureCollection")for(var Jt=0;Jt<Kt.features.length;Jt++)Wt(Yt,Kt.features[Jt],Ft,Jt);else Kt.type==="Feature"?Wt(Yt,Kt,Ft):Wt(Yt,{geometry:Kt},Ft);return Yt}function Wt(Kt,Ft,Yt,Jt){if(Ft.geometry){var Fr=Ft.geometry.coordinates,ta=Ft.geometry.type,ra=Math.pow(Yt.tolerance/((1<<Yt.maxZoom)*Yt.extent),2),ca=[],Ba=Ft.id;if(Yt.promoteId?Ba=Ft.properties[Yt.promoteId]:Yt.generateId&&(Ba=Jt||0),ta==="Point")kr(Fr,ca);else if(ta==="MultiPoint")for(var $a=0;$a<Fr.length;$a++)kr(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(Qe(Ba,"LineString",ca,Ft.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<Ft.geometry.geometries.length;$a++)Wt(Kt,{id:Ba,geometry:Ft.geometry.geometries[$a],properties:Ft.properties},Yt,Jt);return}else throw new Error("Input data is not a valid GeoJSON object.");Kt.push(Qe(Ba,ta,ca,Ft.properties))}}function kr(Kt,Ft){Ft.push(Sr(Kt[0])),Ft.push(Rr(Kt[1])),Ft.push(0)}function mr(Kt,Ft,Yt,Jt){for(var Fr,ta,ra=0,ca=0;ca<Kt.length;ca++){var Ba=Sr(Kt[ca][0]),$a=Rr(Kt[ca][1]);Ft.push(Ba),Ft.push($a),Ft.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=Ft.length-3;Ft[2]=1,tt(Ft,0,Za,Yt),Ft[Za+2]=1,Ft.size=Math.abs(ra),Ft.start=0,Ft.end=Ft.size}function qr(Kt,Ft,Yt,Jt){for(var Fr=0;Fr<Kt.length;Fr++){var ta=[];mr(Kt[Fr],ta,Yt,Jt),Ft.push(ta)}}function Sr(Kt){return Kt/360+.5}function Rr(Kt){var Ft=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Ft)/(1-Ft))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function wt(Kt,Ft,Yt,Jt,Fr,ta,ra,ca){if(Yt/=Ft,Jt/=Ft,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,tn=Fr===0?Za.maxX:Za.maxY;if(Ra>=Yt&&tn<Jt){Ba.push(Za);continue}else if(tn<Yt||Ra>=Jt)continue;var on=[];if(pi==="Point"||pi==="MultiPoint")Ne(ri,on,Yt,Jt,Fr);else if(pi==="LineString")Ke(ri,on,Yt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Ie(ri,on,Yt,Jt,Fr,!1);else if(pi==="Polygon")Ie(ri,on,Yt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var hn=0;hn<ri.length;hn++){var Tt=[];Ie(ri[hn],Tt,Yt,Jt,Fr,!0),Tt.length&&on.push(Tt)}if(on.length){if(ca.lineMetrics&&pi==="LineString"){for(hn=0;hn<on.length;hn++)Ba.push(Qe(Za.id,pi,on[hn],Za.tags));continue}(pi==="LineString"||pi==="MultiLineString")&&(on.length===1?(pi="LineString",on=on[0]):pi="MultiLineString"),(pi==="Point"||pi==="MultiPoint")&&(pi=on.length===3?"Point":"MultiPoint"),Ba.push(Qe(Za.id,pi,on,Za.tags))}}return Ba.length?Ba:null}function Ne(Kt,Ft,Yt,Jt,Fr){for(var ta=0;ta<Kt.length;ta+=3){var ra=Kt[ta+Fr];ra>=Yt&&ra<=Jt&&(Ft.push(Kt[ta]),Ft.push(Kt[ta+1]),Ft.push(Kt[ta+2]))}}function Ke(Kt,Ft,Yt,Jt,Fr,ta,ra){for(var ca=Te(Kt),Ba=Fr===0?Ce:Ee,$a=Kt.start,Za,ri,pi=0;pi<Kt.length-3;pi+=3){var Ra=Kt[pi],tn=Kt[pi+1],on=Kt[pi+2],hn=Kt[pi+3],Tt=Kt[pi+4],ut=Fr===0?Ra:tn,Br=Fr===0?hn:Tt,Cr=!1;ra&&(Za=Math.sqrt(Math.pow(Ra-hn,2)+Math.pow(tn-Tt,2))),ut<Yt?Br>Yt&&(ri=Ba(ca,Ra,tn,hn,Tt,Yt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Br<Jt&&(ri=Ba(ca,Ra,tn,hn,Tt,Jt),ra&&(ca.start=$a+Za*ri)):Ve(ca,Ra,tn,on),Br<Yt&&ut>=Yt&&(ri=Ba(ca,Ra,tn,hn,Tt,Yt),Cr=!0),Br>Jt&&ut<=Jt&&(ri=Ba(ca,Ra,tn,hn,Tt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Ft.push(ca),ca=Te(Kt)),ra&&($a+=Za)}var xr=Kt.length-3;Ra=Kt[xr],tn=Kt[xr+1],on=Kt[xr+2],ut=Fr===0?Ra:tn,ut>=Yt&&ut<=Jt&&Ve(ca,Ra,tn,on),xr=ca.length-3,ta&&xr>=3&&(ca[xr]!==ca[0]||ca[xr+1]!==ca[1])&&Ve(ca,ca[0],ca[1],ca[2]),ca.length&&Ft.push(ca)}function Te(Kt){var Ft=[];return Ft.size=Kt.size,Ft.start=Kt.start,Ft.end=Kt.end,Ft}function Ie(Kt,Ft,Yt,Jt,Fr,ta){for(var ra=0;ra<Kt.length;ra++)Ke(Kt[ra],Ft,Yt,Jt,Fr,ta,!1)}function Ve(Kt,Ft,Yt,Jt){Kt.push(Ft),Kt.push(Yt),Kt.push(Jt)}function Ce(Kt,Ft,Yt,Jt,Fr,ta){var ra=(ta-Ft)/(Jt-Ft);return Kt.push(ta),Kt.push(Yt+(Fr-Yt)*ra),Kt.push(1),ra}function Ee(Kt,Ft,Yt,Jt,Fr,ta){var ra=(ta-Yt)/(Fr-Yt);return Kt.push(Ft+(Jt-Ft)*ra),Kt.push(ta),Kt.push(1),ra}function Pe(Kt,Ft){var Yt=Ft.buffer/Ft.extent,Jt=Kt,Fr=wt(Kt,1,-1-Yt,Yt,0,-1,2,Ft),ta=wt(Kt,1,1-Yt,2+Yt,0,-1,2,Ft);return(Fr||ta)&&(Jt=wt(Kt,1,-Yt,1+Yt,0,-1,2,Ft)||[],Fr&&(Jt=ft(Fr,1).concat(Jt)),ta&&(Jt=Jt.concat(ft(ta,-1)))),Jt}function ft(Kt,Ft){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,Ft);else if(ta==="MultiLineString"||ta==="Polygon"){ra=[];for(var ca=0;ca<Fr.geometry.length;ca++)ra.push(ct(Fr.geometry[ca],Ft))}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],Ft));ra.push(Ba)}Yt.push(Qe(Fr.id,ta,ra,Fr.tags))}return Yt}function ct(Kt,Ft){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]+Ft,Kt[Jt+1],Kt[Jt+2]);return Yt}function _t(Kt,Ft){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(Ct($a[ra],$a[ra+1],Ft,Yt,Jt,Fr));else for(ra=0;ra<$a.length;ra++){var ri=[];for(ca=0;ca<$a[ra].length;ca+=2)ri.push(Ct($a[ra][ca],$a[ra][ca+1],Ft,Yt,Jt,Fr));Ba.geometry.push(ri)}}return Kt.transformed=!0,Kt}function Ct(Kt,Ft,Yt,Jt,Fr,ta){return[Math.round(Yt*(Kt*Jt-Fr)),Math.round(Yt*(Ft*Jt-ta))]}function ir(Kt,Ft,Yt,Jt,Fr){for(var ta=Ft===Fr.maxZoom?0:Fr.tolerance/((1<<Ft)*Fr.extent),ra={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Yt,y:Jt,z:Ft,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},ca=0;ca<Kt.length;ca++){ra.numFeatures++,rr(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 rr(Kt,Ft,Yt,Jt){var Fr=Ft.geometry,ta=Ft.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")er(ra,Fr,Kt,Yt,!1,!1);else if(ta==="MultiLineString"||ta==="Polygon")for(ca=0;ca<Fr.length;ca++)er(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++)er(ra,$a[ca],Kt,Yt,!0,ca===0)}if(ra.length){var Za=Ft.tags||null;if(ta==="LineString"&&Jt.lineMetrics){Za={};for(var ri in Ft.tags)Za[ri]=Ft.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};Ft.id!==null&&(pi.id=Ft.id),Kt.features.push(pi)}}function er(Kt,Ft,Yt,Jt,Fr,ta){var ra=Jt*Jt;if(Jt>0&&Ft.size<(Fr?ra:Jt)){Yt.numPoints+=Ft.length/3;return}for(var ca=[],Ba=0;Ba<Ft.length;Ba+=3)(Jt===0||Ft[Ba+2]>ra)&&(Yt.numSimplified++,ca.push(Ft[Ba]),ca.push(Ft[Ba+1])),Yt.numPoints++;Fr&&Lr(ca,ta),Kt.push(ca)}function Lr(Kt,Ft){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===Ft)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 fa(Kt,Ft){return new Da(Kt,Ft)}function Da(Kt,Ft){Ft=this.options=qa(Object.create(this.options),Ft);var Yt=Ft.debug;if(Yt&&console.time("preprocess data"),Ft.maxZoom<0||Ft.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Ft.promoteId&&Ft.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=qt(Kt,Ft);this.tiles={},this.tileCoords=[],Yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ft.indexMaxZoom,Ft.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=Pe(Jt,Ft),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)))}Da.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Da.prototype.splitTile=function(Kt,Ft,Yt,Jt,Fr,ta,ra){for(var ca=[Kt,Ft,Yt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Yt=ca.pop(),Ft=ca.pop(),Kt=ca.pop();var Za=1<<Ft,ri=Ia(Ft,Yt,Jt),pi=this.tiles[ri];if(!pi&&($a>1&&console.time("creation"),pi=this.tiles[ri]=ir(Kt,Ft,Yt,Jt,Ba),this.tileCoords.push({z:Ft,x:Yt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ft,Yt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ra="z"+Ft;this.stats[Ra]=(this.stats[Ra]||0)+1,this.total++}if(pi.source=Kt,Fr){if(Ft===Ba.maxZoom||Ft===Fr)continue;var tn=1<<Fr-Ft;if(Yt!==Math.floor(ta/tn)||Jt!==Math.floor(ra/tn))continue}else if(Ft===Ba.indexMaxZoom||pi.numPoints<=Ba.indexMaxPoints)continue;if(pi.source=null,Kt.length!==0){$a>1&&console.time("clipping");var on=.5*Ba.buffer/Ba.extent,hn=.5-on,Tt=.5+on,ut=1+on,Br,Cr,xr,Ir,Ur,Hr;Br=Cr=xr=Ir=null,Ur=wt(Kt,Za,Yt-on,Yt+Tt,0,pi.minX,pi.maxX,Ba),Hr=wt(Kt,Za,Yt+hn,Yt+ut,0,pi.minX,pi.maxX,Ba),Kt=null,Ur&&(Br=wt(Ur,Za,Jt-on,Jt+Tt,1,pi.minY,pi.maxY,Ba),Cr=wt(Ur,Za,Jt+hn,Jt+ut,1,pi.minY,pi.maxY,Ba),Ur=null),Hr&&(xr=wt(Hr,Za,Jt-on,Jt+Tt,1,pi.minY,pi.maxY,Ba),Ir=wt(Hr,Za,Jt+hn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Br||[],Ft+1,Yt*2,Jt*2),ca.push(Cr||[],Ft+1,Yt*2,Jt*2+1),ca.push(xr||[],Ft+1,Yt*2+1,Jt*2),ca.push(Ir||[],Ft+1,Yt*2+1,Jt*2+1)}}},Da.prototype.getTile=function(Kt,Ft,Yt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Kt<0||Kt>24)return null;var ra=1<<Kt;Ft=(Ft%ra+ra)%ra;var ca=Ia(Kt,Ft,Yt);if(this.tiles[ca])return _t(this.tiles[ca],Fr);ta>1&&console.log("drilling down to z%d-%d-%d",Kt,Ft,Yt);for(var Ba=Kt,$a=Ft,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,Ft,Yt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?_t(this.tiles[ca],Fr):null)};function Ia(Kt,Ft,Yt){return((1<<Kt)*Yt+Ft)*32+Kt}function qa(Kt,Ft){for(var Yt in Ft)Kt[Yt]=Ft[Yt];return Kt}function Wa(Kt,Ft){var Yt=Kt.tileID.canonical;if(!this._geoJSONIndex)return Ft(null,null);var Jt=this._geoJSONIndex.getTile(Yt.z,Yt.x,Yt.y);if(!Jt)return Ft(null,null);var Fr=new b(Jt.features),ta=R(Fr);(ta.byteOffset!==0||ta.byteLength!==ta.buffer.byteLength)&&(ta=new Uint8Array(ta)),Ft(null,{vectorTile:Fr,rawData:ta.buffer})}var Ca=function(Kt){function Ft(Yt,Jt,Fr,ta){Kt.call(this,Yt,Jt,Fr,Wa),ta&&(this.loadGeoJSON=ta)}return Kt&&(Ft.__proto__=Kt),Ft.prototype=Object.create(Kt&&Kt.prototype),Ft.prototype.constructor=Ft,Ft.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())},Ft.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 Ae(hi(ta)).load(Ba.features):fa(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)})}},Ft.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Ft.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)},Ft.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."))},Ft.prototype.removeSource=function(Jt,Fr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Fr()},Ft.prototype.getClusterExpansionZoom=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getClusterExpansionZoom(Jt.clusterId))}catch(ta){Fr(ta)}},Ft.prototype.getClusterChildren=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getChildren(Jt.clusterId))}catch(ta){Fr(ta)}},Ft.prototype.getClusterLeaves=function(Jt,Fr){try{Fr(null,this._geoJSONIndex.getLeaves(Jt.clusterId,Jt.limit,Jt.offset))}catch(ta){Fr(ta)}},Ft}(m);function hi(Kt){var Ft=Kt.superclusterOptions,Yt=Kt.clusterProperties;if(!Yt||!Ft)return Ft;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],tn=e.createExpression(Ra),on=e.createExpression(typeof pi=="string"?[pi,["accumulated"],["get",Za]]:pi);Jt[Za]=tn.value,Fr[Za]=on.value}return Ft.map=function(hn){ra.properties=hn;for(var Tt={},ut=0,Br=ca;ut<Br.length;ut+=1){var Cr=Br[ut];Tt[Cr]=Jt[Cr].evaluate(ta,ra)}return Tt},Ft.reduce=function(hn,Tt){ra.properties=Tt;for(var ut=0,Br=ca;ut<Br.length;ut+=1){var Cr=Br[ut];ta.accumulated=hn[Cr],hn[Cr]=Fr[Cr].evaluate(ta,ra)}},Ft}var wi=function(Ft){var Yt=this;this.self=Ft,this.actor=new e.Actor(Ft,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:m,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(Ft,Yt){this.referrer=Yt},wi.prototype.setImages=function(Ft,Yt,Jt){this.availableImages[Ft]=Yt;for(var Fr in this.workerSources[Ft]){var ta=this.workerSources[Ft][Fr];for(var ra in ta)ta[ra].availableImages=Yt}Jt()},wi.prototype.setLayers=function(Ft,Yt,Jt){this.getLayerIndex(Ft).replace(Yt),Jt()},wi.prototype.updateLayers=function(Ft,Yt,Jt){this.getLayerIndex(Ft).update(Yt.layers,Yt.removedIds),Jt()},wi.prototype.loadTile=function(Ft,Yt,Jt){this.getWorkerSource(Ft,Yt.type,Yt.source).loadTile(Yt,Jt)},wi.prototype.loadDEMTile=function(Ft,Yt,Jt){this.getDEMWorkerSource(Ft,Yt.source).loadTile(Yt,Jt)},wi.prototype.reloadTile=function(Ft,Yt,Jt){this.getWorkerSource(Ft,Yt.type,Yt.source).reloadTile(Yt,Jt)},wi.prototype.abortTile=function(Ft,Yt,Jt){this.getWorkerSource(Ft,Yt.type,Yt.source).abortTile(Yt,Jt)},wi.prototype.removeTile=function(Ft,Yt,Jt){this.getWorkerSource(Ft,Yt.type,Yt.source).removeTile(Yt,Jt)},wi.prototype.removeDEMTile=function(Ft,Yt){this.getDEMWorkerSource(Ft,Yt.source).removeTile(Yt)},wi.prototype.removeSource=function(Ft,Yt,Jt){if(!(!this.workerSources[Ft]||!this.workerSources[Ft][Yt.type]||!this.workerSources[Ft][Yt.type][Yt.source])){var Fr=this.workerSources[Ft][Yt.type][Yt.source];delete this.workerSources[Ft][Yt.type][Yt.source],Fr.removeSource!==void 0?Fr.removeSource(Yt,Jt):Jt()}},wi.prototype.loadWorkerSource=function(Ft,Yt,Jt){try{this.self.importScripts(Yt.url),Jt()}catch(Fr){Jt(Fr.toString())}},wi.prototype.syncRTLPluginState=function(Ft,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(Ft){var Yt=this.availableImages[Ft];return Yt||(Yt=[]),Yt},wi.prototype.getLayerIndex=function(Ft){var Yt=this.layerIndexes[Ft];return Yt||(Yt=this.layerIndexes[Ft]=new a),Yt},wi.prototype.getWorkerSource=function(Ft,Yt,Jt){var Fr=this;if(this.workerSources[Ft]||(this.workerSources[Ft]={}),this.workerSources[Ft][Yt]||(this.workerSources[Ft][Yt]={}),!this.workerSources[Ft][Yt][Jt]){var ta={send:function(ra,ca,Ba){Fr.actor.send(ra,ca,Ba,Ft)}};this.workerSources[Ft][Yt][Jt]=new this.workerSourceTypes[Yt](ta,this.getLayerIndex(Ft),this.getAvailableImages(Ft))}return this.workerSources[Ft][Yt][Jt]},wi.prototype.getDEMWorkerSource=function(Ft,Yt){return this.demWorkerSources[Ft]||(this.demWorkerSources[Ft]={}),this.demWorkerSources[Ft][Yt]||(this.demWorkerSources[Ft][Yt]=new T),this.demWorkerSources[Ft][Yt]},wi.prototype.enforceCacheSizeLimit=function(Ft,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(ve){ve.exports?ve.exports=K:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=K,window.mapboxgl.notSupportedReason=_e);function K(nr){return!_e(nr)}function _e(nr){if(!te())return"not a browser";if(!me())return"insufficent Array support";if(!Ge())return"insufficient Function support";if(!Le())return"insufficient Object support";if(!$e())return"insufficient JSON support";if(!gt())return"insufficient worker support";if(!jt())return"insufficient Uint8ClampedArray support";if(!wr())return"insufficient ArrayBuffer support";if(!Nr())return"insufficient Canvas/getImageData support";if(!yt(nr&&nr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function te(){return typeof window<"u"&&typeof document<"u"}function me(){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 Ge(){return Function.prototype&&Function.prototype.bind}function Le(){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 $e(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function gt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var nr=new Blob([""],{type:"text/javascript"}),hr=URL.createObjectURL(nr),lr,dr;try{dr=new Worker(hr),lr=!0}catch{lr=!1}return dr&&dr.terminate(),URL.revokeObjectURL(hr),lr}function jt(){return"Uint8ClampedArray"in window}function wr(){return ArrayBuffer.isView}function Nr(){var nr=document.createElement("canvas");nr.width=nr.height=1;var hr=nr.getContext("2d");if(!hr)return!1;var lr=hr.getImageData(0,0,1,1);return lr&&lr.width===nr.width}var pr={};function yt(nr){return pr[nr]===void 0&&(pr[nr]=Bt(nr)),pr[nr]}K.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function kt(nr){var hr=document.createElement("canvas"),lr=Object.create(K.webGLContextAttributes);return lr.failIfMajorPerformanceCaveat=nr,hr.probablySupportsContext?hr.probablySupportsContext("webgl",lr)||hr.probablySupportsContext("experimental-webgl",lr):hr.supportsContext?hr.supportsContext("webgl",lr)||hr.supportsContext("experimental-webgl",lr):hr.getContext("webgl",lr)||hr.getContext("experimental-webgl",lr)}function Bt(nr){var hr=kt(nr);if(!hr)return!1;var lr=hr.createShader(hr.VERTEX_SHADER);return!lr||hr.isContextLost()?!1:(hr.shaderSource(lr,"void main() {}"),hr.compileShader(lr),hr.getShaderParameter(lr,hr.COMPILE_STATUS)===!0)}}),r={};r.create=function(ve,K,_e){var te=e.window.document.createElement(ve);return K!==void 0&&(te.className=K),_e&&_e.appendChild(te),te},r.createNS=function(ve,K){var _e=e.window.document.createElementNS(ve,K);return _e};var o=e.window.document&&e.window.document.documentElement.style;function a(ve){if(!o)return ve[0];for(var K=0;K<ve.length;K++)if(ve[K]in o)return ve[K];return ve[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(ve,K){ve.style[s]=K};var h=!1;try{var c=Object.defineProperty({},"passive",{get:function(){h=!0}});e.window.addEventListener("test",c,c),e.window.removeEventListener("test",c,c)}catch{h=!1}r.addEventListener=function(ve,K,_e,te){te===void 0&&(te={}),"passive"in te&&h?ve.addEventListener(K,_e,te):ve.addEventListener(K,_e,te.capture)},r.removeEventListener=function(ve,K,_e,te){te===void 0&&(te={}),"passive"in te&&h?ve.removeEventListener(K,_e,te):ve.removeEventListener(K,_e,te.capture)};var m=function(ve){ve.preventDefault(),ve.stopPropagation(),e.window.removeEventListener("click",m,!0)};r.suppressClick=function(){e.window.addEventListener("click",m,!0),e.window.setTimeout(function(){e.window.removeEventListener("click",m,!0)},0)},r.mousePos=function(ve,K){var _e=ve.getBoundingClientRect();return new e.Point(K.clientX-_e.left-ve.clientLeft,K.clientY-_e.top-ve.clientTop)},r.touchPos=function(ve,K){for(var _e=ve.getBoundingClientRect(),te=[],me=0;me<K.length;me++)te.push(new e.Point(K[me].clientX-_e.left-ve.clientLeft,K[me].clientY-_e.top-ve.clientTop));return te},r.mouseButton=function(ve){return typeof e.window.InstallTrigger<"u"&&ve.button===2&&ve.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:ve.button},r.remove=function(ve){ve.parentNode&&ve.parentNode.removeChild(ve)};function p(ve,K,_e){var te,me,Ge,Le=e.browser.devicePixelRatio>1?"@2x":"",$e=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ve,Le,".json"),e.ResourceType.SpriteJSON),function(wr,Nr){$e=null,Ge||(Ge=wr,te=Nr,jt())}),gt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ve,Le,".png"),e.ResourceType.SpriteImage),function(wr,Nr){gt=null,Ge||(Ge=wr,me=Nr,jt())});function jt(){if(Ge)_e(Ge);else if(te&&me){var wr=e.browser.getImageData(me),Nr={};for(var pr in te){var yt=te[pr],kt=yt.width,Bt=yt.height,nr=yt.x,hr=yt.y,lr=yt.sdf,dr=yt.pixelRatio,ur=yt.stretchX,Ht=yt.stretchY,sr=yt.content,Vt=new e.RGBAImage({width:kt,height:Bt});e.RGBAImage.copy(wr,Vt,{x:nr,y:hr},{x:0,y:0},{width:kt,height:Bt}),Nr[pr]={data:Vt,pixelRatio:dr,sdf:lr,stretchX:ur,stretchY:Ht,content:sr}}_e(null,Nr)}}return{cancel:function(){$e&&($e.cancel(),$e=null),gt&&(gt.cancel(),gt=null)}}}function T(ve){var K=ve.userImage;if(K&&K.render){var _e=K.render();if(_e)return ve.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,_=function(ve){function K(){ve.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 ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=0,Ge=this.requestors;me<Ge.length;me+=1){var Le=Ge[me],$e=Le.ids,gt=Le.callback;this._notify($e,gt)}this.requestors=[]}},K.prototype.getImage=function(te){return this.images[te]},K.prototype.addImage=function(te,me){this._validate(te,me)&&(this.images[te]=me)},K.prototype._validate=function(te,me){var Ge=!0;return this._validateStretch(me.stretchX,me.data&&me.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchX" value'))),Ge=!1),this._validateStretch(me.stretchY,me.data&&me.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchY" value'))),Ge=!1),this._validateContent(me.content,me)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "content" value'))),Ge=!1),Ge},K.prototype._validateStretch=function(te,me){if(!te)return!0;for(var Ge=0,Le=0,$e=te;Le<$e.length;Le+=1){var gt=$e[Le];if(gt[0]<Ge||gt[1]<gt[0]||me<gt[1])return!1;Ge=gt[1]}return!0},K.prototype._validateContent=function(te,me){return te?!(te.length!==4||te[0]<0||me.data.width<te[0]||te[1]<0||me.data.height<te[1]||te[2]<0||me.data.width<te[2]||te[3]<0||me.data.height<te[3]||te[2]<te[0]||te[3]<te[1]):!0},K.prototype.updateImage=function(te,me){var Ge=this.images[te];me.version=Ge.version+1,this.images[te]=me,this.updatedImages[te]=!0},K.prototype.removeImage=function(te){var me=this.images[te];delete this.images[te],delete this.patterns[te],me.userImage&&me.userImage.onRemove&&me.userImage.onRemove()},K.prototype.listImages=function(){return Object.keys(this.images)},K.prototype.getImages=function(te,me){var Ge=!0;if(!this.isLoaded())for(var Le=0,$e=te;Le<$e.length;Le+=1){var gt=$e[Le];this.images[gt]||(Ge=!1)}this.isLoaded()||Ge?this._notify(te,me):this.requestors.push({ids:te,callback:me})},K.prototype._notify=function(te,me){for(var Ge={},Le=0,$e=te;Le<$e.length;Le+=1){var gt=$e[Le];this.images[gt]||this.fire(new e.Event("styleimagemissing",{id:gt}));var jt=this.images[gt];jt?Ge[gt]={data:jt.data.clone(),pixelRatio:jt.pixelRatio,sdf:jt.sdf,version:jt.version,stretchX:jt.stretchX,stretchY:jt.stretchY,content:jt.content,hasRenderCallback:!!(jt.userImage&&jt.userImage.render)}:e.warnOnce('Image "'+gt+'" 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.')}me(null,Ge)},K.prototype.getPixelSize=function(){var te=this.atlasImage,me=te.width,Ge=te.height;return{width:me,height:Ge}},K.prototype.getPattern=function(te){var me=this.patterns[te],Ge=this.getImage(te);if(!Ge)return null;if(me&&me.position.version===Ge.version)return me.position;if(me)me.position.version=Ge.version;else{var Le=Ge.data.width+l*2,$e=Ge.data.height+l*2,gt={w:Le,h:$e,x:0,y:0},jt=new e.ImagePosition(gt,Ge);this.patterns[te]={bin:gt,position:jt}}return this._updatePatternAtlas(),this.patterns[te].position},K.prototype.bind=function(te){var me=te.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(te,this.atlasImage,me.RGBA),this.atlasTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE)},K.prototype._updatePatternAtlas=function(){var te=[];for(var me in this.patterns)te.push(this.patterns[me].bin);var Ge=e.potpack(te),Le=Ge.w,$e=Ge.h,gt=this.atlasImage;gt.resize({width:Le||1,height:$e||1});for(var jt in this.patterns){var wr=this.patterns[jt],Nr=wr.bin,pr=Nr.x+l,yt=Nr.y+l,kt=this.images[jt].data,Bt=kt.width,nr=kt.height;e.RGBAImage.copy(kt,gt,{x:0,y:0},{x:pr,y:yt},{width:Bt,height:nr}),e.RGBAImage.copy(kt,gt,{x:0,y:nr-1},{x:pr,y:yt-1},{width:Bt,height:1}),e.RGBAImage.copy(kt,gt,{x:0,y:0},{x:pr,y:yt+nr},{width:Bt,height:1}),e.RGBAImage.copy(kt,gt,{x:Bt-1,y:0},{x:pr-1,y:yt},{width:1,height:nr}),e.RGBAImage.copy(kt,gt,{x:0,y:0},{x:pr+Bt,y:yt},{width:1,height:nr})}this.dirty=!0},K.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},K.prototype.dispatchRenderCallbacks=function(te){for(var me=0,Ge=te;me<Ge.length;me+=1){var Le=Ge[me];if(!this.callbackDispatchedThisFrame[Le]){this.callbackDispatchedThisFrame[Le]=!0;var $e=this.images[Le],gt=T($e);gt&&this.updateImage(Le,$e)}}},K}(e.Evented);function w(ve,K,_e,te,me){var Ge=K*256,Le=Ge+255,$e=te.transformRequest(te.normalizeGlyphsURL(_e).replace("{fontstack}",ve).replace("{range}",Ge+"-"+Le),e.ResourceType.Glyphs);e.getArrayBuffer($e,function(gt,jt){if(gt)me(gt);else if(jt){for(var wr={},Nr=0,pr=e.parseGlyphPBF(jt);Nr<pr.length;Nr+=1){var yt=pr[Nr];wr[yt.id]=yt}me(null,wr)}})}var A=b,M=b,g=1e20;function b(ve,K,_e,te,me,Ge){this.fontSize=ve||24,this.buffer=K===void 0?3:K,this.cutoff=te||.25,this.fontFamily=me||"sans-serif",this.fontWeight=Ge||"normal",this.radius=_e||8;var Le=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Le,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(Le*Le),this.gridInner=new Float64Array(Le*Le),this.f=new Float64Array(Le),this.d=new Float64Array(Le),this.z=new Float64Array(Le+1),this.v=new Int16Array(Le),this.middle=Math.round(Le/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}b.prototype.draw=function(ve){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ve,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),_e=new Uint8ClampedArray(this.size*this.size),te=0;te<this.size*this.size;te++){var me=K.data[te*4+3]/255;this.gridOuter[te]=me===1?0:me===0?g:Math.pow(Math.max(0,.5-me),2),this.gridInner[te]=me===1?g:me===0?0:Math.pow(Math.max(0,me-.5),2)}for(d(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),d(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),te=0;te<this.size*this.size;te++){var Ge=this.gridOuter[te]-this.gridInner[te];_e[te]=Math.max(0,Math.min(255,Math.round(255-255*(Ge/this.radius+this.cutoff))))}return _e};function d(ve,K,_e,te,me,Ge,Le){for(var $e=0;$e<K;$e++){for(var gt=0;gt<_e;gt++)te[gt]=ve[gt*K+$e];for(u(te,me,Ge,Le,_e),gt=0;gt<_e;gt++)ve[gt*K+$e]=me[gt]}for(gt=0;gt<_e;gt++){for($e=0;$e<K;$e++)te[$e]=ve[gt*K+$e];for(u(te,me,Ge,Le,K),$e=0;$e<K;$e++)ve[gt*K+$e]=Math.sqrt(me[$e])}}function u(ve,K,_e,te,me){_e[0]=0,te[0]=-g,te[1]=+g;for(var Ge=1,Le=0;Ge<me;Ge++){for(var $e=(ve[Ge]+Ge*Ge-(ve[_e[Le]]+_e[Le]*_e[Le]))/(2*Ge-2*_e[Le]);$e<=te[Le];)Le--,$e=(ve[Ge]+Ge*Ge-(ve[_e[Le]]+_e[Le]*_e[Le]))/(2*Ge-2*_e[Le]);Le++,_e[Le]=Ge,te[Le]=$e,te[Le+1]=+g}for(Ge=0,Le=0;Ge<me;Ge++){for(;te[Le+1]<Ge;)Le++;K[Ge]=(Ge-_e[Le])*(Ge-_e[Le])+ve[_e[Le]]}}A.default=M;var y=function(K,_e){this.requestManager=K,this.localIdeographFontFamily=_e,this.entries={}};y.prototype.setURL=function(K){this.url=K},y.prototype.getGlyphs=function(K,_e){var te=this,me=[];for(var Ge in K)for(var Le=0,$e=K[Ge];Le<$e.length;Le+=1){var gt=$e[Le];me.push({stack:Ge,id:gt})}e.asyncAll(me,function(jt,wr){var Nr=jt.stack,pr=jt.id,yt=te.entries[Nr];yt||(yt=te.entries[Nr]={glyphs:{},requests:{},ranges:{}});var kt=yt.glyphs[pr];if(kt!==void 0){wr(null,{stack:Nr,id:pr,glyph:kt});return}if(kt=te._tinySDF(yt,Nr,pr),kt){yt.glyphs[pr]=kt,wr(null,{stack:Nr,id:pr,glyph:kt});return}var Bt=Math.floor(pr/256);if(Bt*256>65535){wr(new Error("glyphs > 65535 not supported"));return}if(yt.ranges[Bt]){wr(null,{stack:Nr,id:pr,glyph:kt});return}var nr=yt.requests[Bt];nr||(nr=yt.requests[Bt]=[],y.loadGlyphRange(Nr,Bt,te.url,te.requestManager,function(hr,lr){if(lr){for(var dr in lr)te._doesCharSupportLocalGlyph(+dr)||(yt.glyphs[+dr]=lr[+dr]);yt.ranges[Bt]=!0}for(var ur=0,Ht=nr;ur<Ht.length;ur+=1){var sr=Ht[ur];sr(hr,lr)}delete yt.requests[Bt]})),nr.push(function(hr,lr){hr?wr(hr):lr&&wr(null,{stack:Nr,id:pr,glyph:lr[pr]||null})})},function(jt,wr){if(jt)_e(jt);else if(wr){for(var Nr={},pr=0,yt=wr;pr<yt.length;pr+=1){var kt=yt[pr],Bt=kt.stack,nr=kt.id,hr=kt.glyph;(Nr[Bt]||(Nr[Bt]={}))[nr]=hr&&{id:hr.id,bitmap:hr.bitmap.clone(),metrics:hr.metrics}}_e(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,_e,te){var me=this.localIdeographFontFamily;if(me&&this._doesCharSupportLocalGlyph(te)){var Ge=K.tinySDF;if(!Ge){var Le="400";/bold/i.test(_e)?Le="900":/medium/i.test(_e)?Le="500":/light/i.test(_e)&&(Le="200"),Ge=K.tinySDF=new y.TinySDF(24,3,8,.25,me,Le)}return{id:te,bitmap:new e.AlphaImage({width:30,height:30},Ge.draw(String.fromCharCode(te))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},y.loadGlyphRange=w,y.TinySDF=A;var f=function(){this.specification=e.styleSpec.light.position};f.prototype.possiblyEvaluate=function(K,_e){return e.sphericalToCartesian(K.expression.evaluate(_e))},f.prototype.interpolate=function(K,_e,te){return{x:e.number(K.x,_e.x,te),y:e.number(K.y,_e.y,te),z:e.number(K.z,_e.z,te)}};var R=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new f,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),L="-transition",z=function(ve){function K(_e){ve.call(this),this._transitionable=new e.Transitionable(R),this.setLight(_e),this._transitioning=this._transitionable.untransitioned()}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getLight=function(){return this._transitionable.serialize()},K.prototype.setLight=function(te,me){if(me===void 0&&(me={}),!this._validate(e.validateLight,te,me))for(var Ge in te){var Le=te[Ge];e.endsWith(Ge,L)?this._transitionable.setTransition(Ge.slice(0,-L.length),Le):this._transitionable.setValue(Ge,Le)}},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,me,Ge){return Ge&&Ge.validate===!1?!1:e.emitValidationErrors(this,te.call(e.validateStyle,e.extend({value:me,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},K}(e.Evented),F=function(K,_e){this.width=K,this.height=_e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};F.prototype.getDash=function(K,_e){var te=K.join(",")+String(_e);return this.dashEntry[te]||(this.dashEntry[te]=this.addDash(K,_e)),this.dashEntry[te]},F.prototype.getDashRanges=function(K,_e,te){var me=K.length%2===1,Ge=[],Le=me?-K[K.length-1]*te:0,$e=K[0]*te,gt=!0;Ge.push({left:Le,right:$e,isDash:gt,zeroLength:K[0]===0});for(var jt=K[0],wr=1;wr<K.length;wr++){gt=!gt;var Nr=K[wr];Le=jt*te,jt+=Nr,$e=jt*te,Ge.push({left:Le,right:$e,isDash:gt,zeroLength:Nr===0})}return Ge},F.prototype.addRoundDash=function(K,_e,te){for(var me=_e/2,Ge=-te;Ge<=te;Ge++)for(var Le=this.nextRow+te+Ge,$e=this.width*Le,gt=0,jt=K[gt],wr=0;wr<this.width;wr++){wr/jt.right>1&&(jt=K[++gt]);var Nr=Math.abs(wr-jt.left),pr=Math.abs(wr-jt.right),yt=Math.min(Nr,pr),kt=void 0,Bt=Ge/te*(me+1);if(jt.isDash){var nr=me-Math.abs(Bt);kt=Math.sqrt(yt*yt+nr*nr)}else kt=me-Math.sqrt(yt*yt+Bt*Bt);this.data[$e+wr]=Math.max(0,Math.min(255,kt+128))}},F.prototype.addRegularDash=function(K){for(var _e=K.length-1;_e>=0;--_e){var te=K[_e],me=K[_e+1];te.zeroLength?K.splice(_e,1):me&&me.isDash===te.isDash&&(me.left=te.left,K.splice(_e,1))}var Ge=K[0],Le=K[K.length-1];Ge.isDash===Le.isDash&&(Ge.left=Le.left-this.width,Le.right=Ge.right+this.width);for(var $e=this.width*this.nextRow,gt=0,jt=K[gt],wr=0;wr<this.width;wr++){wr/jt.right>1&&(jt=K[++gt]);var Nr=Math.abs(wr-jt.left),pr=Math.abs(wr-jt.right),yt=Math.min(Nr,pr),kt=jt.isDash?yt:-yt;this.data[$e+wr]=Math.max(0,Math.min(255,kt+128))}},F.prototype.addDash=function(K,_e){var te=_e?7:0,me=2*te+1;if(this.nextRow+me>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ge=0,Le=0;Le<K.length;Le++)Ge+=K[Le];if(Ge!==0){var $e=this.width/Ge,gt=this.getDashRanges(K,this.width,$e);_e?this.addRoundDash(gt,$e,te):this.addRegularDash(gt)}var jt={y:(this.nextRow+te+.5)/this.height,height:2*te/this.height,width:Ge};return this.nextRow+=me,this.dirty=!0,jt},F.prototype.bind=function(K){var _e=K.gl;this.texture?(_e.bindTexture(_e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,_e.texSubImage2D(_e.TEXTURE_2D,0,0,0,this.width,this.height,_e.ALPHA,_e.UNSIGNED_BYTE,this.data))):(this.texture=_e.createTexture(),_e.bindTexture(_e.TEXTURE_2D,this.texture),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_S,_e.REPEAT),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_T,_e.REPEAT),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MIN_FILTER,_e.LINEAR),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MAG_FILTER,_e.LINEAR),_e.texImage2D(_e.TEXTURE_2D,0,_e.ALPHA,this.width,this.height,0,_e.ALPHA,_e.UNSIGNED_BYTE,this.data))};var N=function ve(K,_e){this.workerPool=K,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var te=this.workerPool.acquire(this.id),me=0;me<te.length;me++){var Ge=te[me],Le=new ve.Actor(Ge,_e,this.id);Le.name="Worker "+me,this.actors.push(Le)}};N.prototype.broadcast=function(K,_e,te){te=te||function(){},e.asyncAll(this.actors,function(me,Ge){me.send(K,_e,Ge)},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(ve,K,_e){var te=function(me,Ge){if(me)return _e(me);if(Ge){var Le=e.pick(e.extend(Ge,ve),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Ge.vector_layers&&(Le.vectorLayers=Ge.vector_layers,Le.vectorLayerIds=Le.vectorLayers.map(function($e){return $e.id})),Le.tiles=K.canonicalizeTileset(Le,ve.url),_e(null,Le)}};return ve.url?e.getJSON(K.transformRequest(K.normalizeSourceURL(ve.url),e.ResourceType.Source),te):e.browser.frame(function(){return te(null,ve)})}var P=function(K,_e,te){this.bounds=e.LngLatBounds.convert(this.validateBounds(K)),this.minzoom=_e||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 _e=Math.pow(2,K.z),te={minX:Math.floor(e.mercatorXfromLng(this.bounds.getWest())*_e),minY:Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*_e),maxX:Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*_e),maxY:Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*_e)},me=K.x>=te.minX&&K.x<te.maxX&&K.y>=te.minY&&K.y<te.maxY;return me};var U=function(ve){function K(_e,te,me,Ge){if(ve.call(this),this.id=_e,this.dispatcher=me,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(Ge)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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(me,Ge){te._tileJSONRequest=null,te._loaded=!0,me?te.fire(new e.ErrorEvent(me)):Ge&&(e.extend(te,Ge),Ge.bounds&&(te.tileBounds=new P(Ge.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(Ge.tiles,te.map._requestManager._customAccessToken),e.postMapLoadEvent(Ge.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 me=this.map.style.sourceCaches[this.id];me.clearTiles(),this.load()},K.prototype.setTiles=function(te){var me=this;return this.setSourceProperty(function(){me._options.tiles=te}),this},K.prototype.setUrl=function(te){var me=this;return this.setSourceProperty(function(){me.url=te,me._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,me){var Ge=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme)),Le={request:this.map._requestManager.transformRequest(Ge,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};Le.request.collectResourceTiming=this._collectResourceTiming,!te.actor||te.state==="expired"?(te.actor=this.dispatcher.getActor(),te.request=te.actor.send("loadTile",Le,$e.bind(this))):te.state==="loading"?te.reloadCallback=me:te.request=te.actor.send("reloadTile",Le,$e.bind(this));function $e(gt,jt){if(delete te.request,te.aborted)return me(null);if(gt&&gt.status!==404)return me(gt);jt&&jt.resourceTiming&&(te.resourceTiming=jt.resourceTiming),this.map._refreshExpiredTiles&&jt&&te.setExpiryData(jt),te.loadVectorData(jt,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),me(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(ve){function K(_e,te,me,Ge){ve.call(this),this.id=_e,this.dispatcher=me,this.setEventedParent(Ge),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 ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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(me,Ge){te._tileJSONRequest=null,te._loaded=!0,me?te.fire(new e.ErrorEvent(me)):Ge&&(e.extend(te,Ge),Ge.bounds&&(te.tileBounds=new P(Ge.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(Ge.tiles),e.postMapLoadEvent(Ge.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,me){var Ge=this,Le=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(Le,e.ResourceType.Tile),function($e,gt){if(delete te.request,te.aborted)te.state="unloaded",me(null);else if($e)te.state="errored",me($e);else if(gt){Ge.map._refreshExpiredTiles&&te.setExpiryData(gt),delete gt.cacheControl,delete gt.expires;var jt=Ge.map.painter.context,wr=jt.gl;te.texture=Ge.map.painter.getTileTexture(gt.width),te.texture?te.texture.update(gt,{useMipmap:!0}):(te.texture=new e.Texture(jt,gt,wr.RGBA,{useMipmap:!0}),te.texture.bind(wr.LINEAR,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),jt.extTextureFilterAnisotropic&&wr.texParameterf(wr.TEXTURE_2D,jt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,jt.extTextureFilterAnisotropicMax)),te.state="loaded",e.cacheEntryPossiblyAdded(Ge.dispatcher),me(null)}})},K.prototype.abortTile=function(te,me){te.request&&(te.request.cancel(),delete te.request),me()},K.prototype.unloadTile=function(te,me){te.texture&&this.map.painter.saveTileTexture(te.texture),me()},K.prototype.hasTransition=function(){return!1},K}(e.Evented),X=function(ve){function K(_e,te,me,Ge){ve.call(this,_e,te,me,Ge),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},te),this.encoding=te.encoding||"mapbox"}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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,me){var Ge=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(Ge,e.ResourceType.Tile),Le.bind(this)),te.neighboringTiles=this._getNeighboringTiles(te.tileID);function Le(gt,jt){if(delete te.request,te.aborted)te.state="unloaded",me(null);else if(gt)te.state="errored",me(gt);else if(jt){this.map._refreshExpiredTiles&&te.setExpiryData(jt),delete jt.cacheControl,delete jt.expires;var wr=e.window.ImageBitmap&&jt instanceof e.window.ImageBitmap&&e.offscreenCanvasSupported(),Nr=wr?jt:e.browser.getImageData(jt,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,$e.bind(this)))}}function $e(gt,jt){gt&&(te.state="errored",me(gt)),jt&&(te.dem=jt,te.needsHillshadePrepare=!0,te.state="loaded",me(null))}},K.prototype._getNeighboringTiles=function(te){var me=te.canonical,Ge=Math.pow(2,me.z),Le=(me.x-1+Ge)%Ge,$e=me.x===0?te.wrap-1:te.wrap,gt=(me.x+1+Ge)%Ge,jt=me.x+1===Ge?te.wrap+1:te.wrap,wr={};return wr[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,jt,me.z,gt,me.y).key]={backfilled:!1},me.y>0&&(wr[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,me.z,me.x,me.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,jt,me.z,gt,me.y-1).key]={backfilled:!1}),me.y+1<Ge&&(wr[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y+1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,me.z,me.x,me.y+1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,jt,me.z,gt,me.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(ve){function K(_e,te,me,Ge){ve.call(this),this.id=_e,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=me.getActor(),this.setEventedParent(Ge),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 Le=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:te.cluster||!1,geojsonVtOptions:{buffer:(te.buffer!==void 0?te.buffer:128)*Le,tolerance:(te.tolerance!==void 0?te.tolerance:.375)*Le,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)*Le,log:!1,generateId:te.generateId||!1},clusterProperties:te.clusterProperties,filter:te.filter},te.workerOptions)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(me){if(me){te.fire(new e.ErrorEvent(me));return}var Ge={dataType:"source",sourceDataType:"metadata"};te._collectResourceTiming&&te._resourceTiming&&te._resourceTiming.length>0&&(Ge.resourceTiming=te._resourceTiming,te._resourceTiming=[]),te.fire(new e.Event("data",Ge))})},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setData=function(te){var me=this;return this._data=te,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ge){if(Ge){me.fire(new e.ErrorEvent(Ge));return}var Le={dataType:"source",sourceDataType:"content"};me._collectResourceTiming&&me._resourceTiming&&me._resourceTiming.length>0&&(Le.resourceTiming=me._resourceTiming,me._resourceTiming=[]),me.fire(new e.Event("data",Le))}),this},K.prototype.getClusterExpansionZoom=function(te,me){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:te,source:this.id},me),this},K.prototype.getClusterChildren=function(te,me){return this.actor.send("geojson.getClusterChildren",{clusterId:te,source:this.id},me),this},K.prototype.getClusterLeaves=function(te,me,Ge,Le){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:te,limit:me,offset:Ge},Le),this},K.prototype._updateWorkerData=function(te){var me=this;this._loaded=!1;var Ge=e.extend({},this.workerOptions),Le=this._data;typeof Le=="string"?(Ge.request=this.map._requestManager.transformRequest(e.browser.resolveURL(Le),e.ResourceType.Source),Ge.request.collectResourceTiming=this._collectResourceTiming):Ge.data=JSON.stringify(Le),this.actor.send(this.type+".loadData",Ge,function($e,gt){me._removed||gt&&gt.abandoned||(me._loaded=!0,gt&&gt.resourceTiming&&gt.resourceTiming[me.id]&&(me._resourceTiming=gt.resourceTiming[me.id].slice(0)),me.actor.send(me.type+".coalesce",{source:Ge.source},null),te($e))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(te,me){var Ge=this,Le=te.actor?"reloadTile":"loadTile";te.actor=this.actor;var $e={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(Le,$e,function(gt,jt){return delete te.request,te.unloadVectorData(),te.aborted?me(null):gt?me(gt):(te.loadVectorData(jt,Ge.map.painter,Le==="reloadTile"),me(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),se=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),le=function(ve){function K(_e,te,me,Ge){ve.call(this),this.id=_e,this.dispatcher=me,this.coordinates=te.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ge),this.options=te}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.load=function(te,me){var Ge=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(Le,$e){Ge._loaded=!0,Le?Ge.fire(new e.ErrorEvent(Le)):$e&&(Ge.image=$e,te&&(Ge.coordinates=te),me&&me(),Ge._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(te){var me=this;return!this.image||!te.url?this:(this.options.url=te.url,this.load(te.coordinates,function(){me.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 me=this;this.coordinates=te;var Ge=te.map(e.MercatorCoordinate.fromLngLat);this.tileID=fe(Ge),this.minzoom=this.maxzoom=this.tileID.z;var Le=Ge.map(function($e){return me.tileID.getTilePoint($e)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(Le[0].x,Le[0].y,0,0),this._boundsArray.emplaceBack(Le[1].x,Le[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(Le[3].x,Le[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(Le[2].x,Le[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,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,se.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(te,this.image,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.texture=this.texture)}}},K.prototype.loadTile=function(te,me){this.tileID&&this.tileID.equals(te.tileID.canonical)?(this.tiles[String(te.tileID.wrap)]=te,te.buckets={},me(null)):(te.state="errored",me(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 fe(ve){for(var K=1/0,_e=1/0,te=-1/0,me=-1/0,Ge=0,Le=ve;Ge<Le.length;Ge+=1){var $e=Le[Ge];K=Math.min(K,$e.x),_e=Math.min(_e,$e.y),te=Math.max(te,$e.x),me=Math.max(me,$e.y)}var gt=te-K,jt=me-_e,wr=Math.max(gt,jt),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((_e+me)/2*pr))}var V=function(ve){function K(_e,te,me,Ge){ve.call(this,_e,te,me,Ge),this.roundZoom=!0,this.type="video",this.options=te}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.load=function(){var te=this;this._loaded=!1;var me=this.options;this.urls=[];for(var Ge=0,Le=me.urls;Ge<Le.length;Ge+=1){var $e=Le[Ge];this.urls.push(this.map._requestManager.transformRequest($e,e.ResourceType.Source).url)}e.getVideo(this.urls,function(gt,jt){te._loaded=!0,gt?te.fire(new e.ErrorEvent(gt)):jt&&(te.video=jt,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 me=this.video.seekable;te<me.start(0)||te>me.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+me.start(0)+" and "+me.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,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,se.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE),me.texSubImage2D(me.TEXTURE_2D,0,0,0,me.RGBA,me.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(te,this.video,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.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}(le),Y=function(ve){function K(_e,te,me,Ge){ve.call(this,_e,te,me,Ge),te.coordinates?(!Array.isArray(te.coordinates)||te.coordinates.length!==4||te.coordinates.some(function(Le){return!Array.isArray(Le)||Le.length!==2||Le.some(function($e){return typeof $e!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,null,'missing required property "coordinates"'))),te.animate&&typeof te.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,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."+_e,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."+_e,null,'missing required property "canvas"'))),this.options=te,this.animate=te.animate!==void 0?te.animate:!0}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=this.map.painter.context,Ge=me.gl;this.boundsBuffer||(this.boundsBuffer=me.createVertexBuffer(this._boundsArray,se.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(me,this.canvas,Ge.RGBA,{premultiply:!0});for(var Le in this.tiles){var $e=this.tiles[Le];$e.state!=="loaded"&&($e.state="loaded",$e.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,me=[this.canvas.width,this.canvas.height];te<me.length;te+=1){var Ge=me[te];if(isNaN(Ge)||Ge<=0)return!0}return!1},K}(le),ee={vector:U,raster:B,"raster-dem":X,geojson:$,video:V,image:le,canvas:Y},q=function(ve,K,_e,te){var me=new ee[K.type](ve,K,_e,te);if(me.id!==ve)throw new Error("Expected Source id to be "+ve+" instead of "+me.id);return e.bindAll(["load","abort","unload","serialize","prepare"],me),me},oe=function(ve){return ee[ve]},ae=function(ve,K){ee[ve]=K};function j(ve,K){var _e=e.identity([]);return e.translate(_e,_e,[1,1,0]),e.scale(_e,_e,[ve.width*.5,ve.height*.5,1]),e.multiply(_e,_e,ve.calculatePosMatrix(K.toUnwrapped()))}function Q(ve,K,_e){if(ve)for(var te=0,me=ve;te<me.length;te+=1){var Ge=me[te],Le=K[Ge];if(Le&&Le.source===_e&&Le.type==="fill-extrusion")return!0}else for(var $e in K){var gt=K[$e];if(gt.source===_e&&gt.type==="fill-extrusion")return!0}return!1}function re(ve,K,_e,te,me,Ge){var Le=Q(me&&me.layers,K,ve.id),$e=Ge.maxPitchScaleFactor(),gt=ve.tilesIn(te,$e,Le);gt.sort(Ae);for(var jt=[],wr=0,Nr=gt;wr<Nr.length;wr+=1){var pr=Nr[wr];jt.push({wrappedTileID:pr.tileID.wrapped().key,queryResults:pr.tile.queryRenderedFeatures(K,_e,ve._state,pr.queryGeometry,pr.cameraQueryGeometry,pr.scale,me,Ge,$e,j(ve.transform,pr.tileID))})}var yt=De(jt);for(var kt in yt)yt[kt].forEach(function(Bt){var nr=Bt.feature,hr=ve.getFeatureState(nr.layer["source-layer"],nr.id);nr.source=nr.layer.source,nr.layer["source-layer"]&&(nr.sourceLayer=nr.layer["source-layer"]),nr.state=hr});return yt}function ce(ve,K,_e,te,me,Ge,Le){for(var $e={},gt=Ge.queryRenderedSymbols(te),jt=[],wr=0,Nr=Object.keys(gt).map(Number);wr<Nr.length;wr+=1){var pr=Nr[wr];jt.push(Le[pr])}jt.sort(Ae);for(var yt=function(){var lr=Bt[kt],dr=lr.featureIndex.lookupSymbolFeatures(gt[lr.bucketInstanceId],K,lr.bucketIndex,lr.sourceLayerIndex,me.filter,me.layers,me.availableImages,ve);for(var ur in dr){var Ht=$e[ur]=$e[ur]||[],sr=dr[ur];sr.sort(function(ga,vi){var Ga=lr.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=sr;Vt<Dr.length;Vt+=1){var Jr=Dr[Vt];Ht.push(Jr)}}},kt=0,Bt=jt;kt<Bt.length;kt+=1)yt();var nr=function(lr){$e[lr].forEach(function(dr){var ur=dr.feature,Ht=ve[lr],sr=_e[Ht.source],Vt=sr.getFeatureState(ur.layer["source-layer"],ur.id);ur.source=ur.layer.source,ur.layer["source-layer"]&&(ur.sourceLayer=ur.layer["source-layer"]),ur.state=Vt})};for(var hr in $e)nr(hr);return $e}function be(ve,K){for(var _e=ve.getRenderableIds().map(function(gt){return ve.getTileByID(gt)}),te=[],me={},Ge=0;Ge<_e.length;Ge++){var Le=_e[Ge],$e=Le.tileID.canonical.key;me[$e]||(me[$e]=!0,Le.querySourceFeatures(te,K))}return te}function Ae(ve,K){var _e=ve.tileID,te=K.tileID;return _e.overscaledZ-te.overscaledZ||_e.canonical.y-te.canonical.y||_e.wrap-te.wrap||_e.canonical.x-te.canonical.x}function De(ve){for(var K={},_e={},te=0,me=ve;te<me.length;te+=1){var Ge=me[te],Le=Ge.queryResults,$e=Ge.wrappedTileID,gt=_e[$e]=_e[$e]||{};for(var jt in Le)for(var wr=Le[jt],Nr=gt[jt]=gt[jt]||{},pr=K[jt]=K[jt]||[],yt=0,kt=wr;yt<kt.length;yt+=1){var Bt=kt[yt];Nr[Bt.featureIndex]||(Nr[Bt.featureIndex]=!0,pr.push(Bt))}}return K}var ze=function(K,_e){this.max=K,this.onRemove=_e,this.reset()};ze.prototype.reset=function(){for(var K in this.data)for(var _e=0,te=this.data[K];_e<te.length;_e+=1){var me=te[_e];me.timeout&&clearTimeout(me.timeout),this.onRemove(me.value)}return this.data={},this.order=[],this},ze.prototype.add=function(K,_e,te){var me=this,Ge=K.wrapped().key;this.data[Ge]===void 0&&(this.data[Ge]=[]);var Le={value:_e,timeout:void 0};if(te!==void 0&&(Le.timeout=setTimeout(function(){me.remove(K,Le)},te)),this.data[Ge].push(Le),this.order.push(Ge),this.order.length>this.max){var $e=this._getAndRemoveByKey(this.order[0]);$e&&this.onRemove($e)}return this},ze.prototype.has=function(K){return K.wrapped().key in this.data},ze.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},ze.prototype._getAndRemoveByKey=function(K){var _e=this.data[K].shift();return _e.timeout&&clearTimeout(_e.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),_e.value},ze.prototype.getByKey=function(K){var _e=this.data[K];return _e?_e[0].value:null},ze.prototype.get=function(K){if(!this.has(K))return null;var _e=this.data[K.wrapped().key][0];return _e.value},ze.prototype.remove=function(K,_e){if(!this.has(K))return this;var te=K.wrapped().key,me=_e===void 0?0:this.data[te].indexOf(_e),Ge=this.data[te][me];return this.data[te].splice(me,1),Ge.timeout&&clearTimeout(Ge.timeout),this.data[te].length===0&&delete this.data[te],this.onRemove(Ge.value),this.order.splice(this.order.indexOf(te),1),this},ze.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var _e=this._getAndRemoveByKey(this.order[0]);_e&&this.onRemove(_e)}return this},ze.prototype.filter=function(K){var _e=[];for(var te in this.data)for(var me=0,Ge=this.data[te];me<Ge.length;me+=1){var Le=Ge[me];K(Le.value)||_e.push(Le)}for(var $e=0,gt=_e;$e<gt.length;$e+=1){var jt=gt[$e];this.remove(jt.value.tileID,jt)}};var Ze=function(K,_e,te){this.context=K;var me=K.gl;this.buffer=me.createBuffer(),this.dynamicDraw=!!te,this.context.unbindVAO(),K.bindElementBuffer.set(this.buffer),me.bufferData(me.ELEMENT_ARRAY_BUFFER,_e.arrayBuffer,this.dynamicDraw?me.DYNAMIC_DRAW:me.STATIC_DRAW),this.dynamicDraw||delete _e.arrayBuffer};Ze.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Ze.prototype.updateData=function(K){var _e=this.context.gl;this.context.unbindVAO(),this.bind(),_e.bufferSubData(_e.ELEMENT_ARRAY_BUFFER,0,K.arrayBuffer)},Ze.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,_e,te,me){this.length=_e.length,this.attributes=te,this.itemSize=_e.bytesPerElement,this.dynamicDraw=me,this.context=K;var Ge=K.gl;this.buffer=Ge.createBuffer(),K.bindVertexBuffer.set(this.buffer),Ge.bufferData(Ge.ARRAY_BUFFER,_e.arrayBuffer,this.dynamicDraw?Ge.DYNAMIC_DRAW:Ge.STATIC_DRAW),this.dynamicDraw||delete _e.arrayBuffer};nt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},nt.prototype.updateData=function(K){var _e=this.context.gl;this.bind(),_e.bufferSubData(_e.ARRAY_BUFFER,0,K.arrayBuffer)},nt.prototype.enableAttributes=function(K,_e){for(var te=0;te<this.attributes.length;te++){var me=this.attributes[te],Ge=_e.attributes[me.name];Ge!==void 0&&K.enableVertexAttribArray(Ge)}},nt.prototype.setVertexAttribPointers=function(K,_e,te){for(var me=0;me<this.attributes.length;me++){var Ge=this.attributes[me],Le=_e.attributes[Ge.name];Le!==void 0&&K.vertexAttribPointer(Le,Ge.components,K[at[Ge.type]],!1,this.itemSize,Ge.offset+this.itemSize*(te||0))}},nt.prototype.destroy=function(){var K=this.context.gl;this.buffer&&(K.deleteBuffer(this.buffer),delete this.buffer)};var rt=function(K){this.gl=K.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};rt.prototype.get=function(){return this.current},rt.prototype.set=function(K){},rt.prototype.getDefault=function(){return this.default},rt.prototype.setDefault=function(){this.set(this.default)};var st=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return e.Color.transparent},K.prototype.set=function(te){var me=this.current;te.r===me.r&&te.g===me.g&&te.b===me.b&&te.a===me.a&&!this.dirty||(this.gl.clearColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},K}(rt),Me=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),ye=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),he=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return[!0,!0,!0,!0]},K.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&te[3]===me[3]&&!this.dirty||(this.gl.colorMask(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},K}(rt),Oe=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),tt=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),ot=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},K.prototype.set=function(te){var me=this.current;te.func===me.func&&te.ref===me.ref&&te.mask===me.mask&&!this.dirty||(this.gl.stencilFunc(te.func,te.ref,te.mask),this.current=te,this.dirty=!1)},K}(rt),Qe=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&!this.dirty||(this.gl.stencilOp(te[0],te[1],te[2]),this.current=te,this.dirty=!1)},K}(rt),Pt=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.STENCIL_TEST):me.disable(me.STENCIL_TEST),this.current=te,this.dirty=!1}},K}(rt),It=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return[0,1]},K.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&!this.dirty||(this.gl.depthRange(te[0],te[1]),this.current=te,this.dirty=!1)},K}(rt),qt=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.DEPTH_TEST):me.disable(me.DEPTH_TEST),this.current=te,this.dirty=!1}},K}(rt),Wt=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),kr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.BLEND):me.disable(me.BLEND),this.current=te,this.dirty=!1}},K}(rt),mr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){var te=this.gl;return[te.ONE,te.ZERO]},K.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&!this.dirty||(this.gl.blendFunc(te[0],te[1]),this.current=te,this.dirty=!1)},K}(rt),qr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return e.Color.transparent},K.prototype.set=function(te){var me=this.current;te.r===me.r&&te.g===me.g&&te.b===me.b&&te.a===me.a&&!this.dirty||(this.gl.blendColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},K}(rt),Sr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),Rr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.CULL_FACE):me.disable(me.CULL_FACE),this.current=te,this.dirty=!1}},K}(rt),wt=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),Ne=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),Ke=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),Te=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),Ie=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&te[3]===me[3]&&!this.dirty||(this.gl.viewport(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},K}(rt),Ve=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindFramebuffer(me.FRAMEBUFFER,te),this.current=te,this.dirty=!1}},K}(rt),Ce=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindRenderbuffer(me.RENDERBUFFER,te),this.current=te,this.dirty=!1}},K}(rt),Ee=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindTexture(me.TEXTURE_2D,te),this.current=te,this.dirty=!1}},K}(rt),Pe=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindBuffer(me.ARRAY_BUFFER,te),this.current=te,this.dirty=!1}},K}(rt),ft=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K.prototype.set=function(te){var me=this.gl;me.bindBuffer(me.ELEMENT_ARRAY_BUFFER,te),this.current=te,this.dirty=!1},K}(rt),ct=function(ve){function K(_e){ve.call(this,_e),this.vao=_e.extVertexArrayObject}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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}(rt),_t=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return 4},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_ALIGNMENT,te),this.current=te,this.dirty=!1}},K}(rt),Ct=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,te),this.current=te,this.dirty=!1}},K}(rt),ir=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return!1},K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,te),this.current=te,this.dirty=!1}},K}(rt),rr=function(ve){function K(_e,te){ve.call(this,_e),this.context=_e,this.parent=te}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getDefault=function(){return null},K}(rt),er=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=this.gl;me.framebufferTexture2D(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,me.TEXTURE_2D,te,0),this.current=te,this.dirty=!1}},K}(rr),Lr=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var me=this.gl;me.framebufferRenderbuffer(me.FRAMEBUFFER,me.DEPTH_ATTACHMENT,me.RENDERBUFFER,te),this.current=te,this.dirty=!1}},K}(rr),fa=function(K,_e,te,me){this.context=K,this.width=_e,this.height=te;var Ge=K.gl,Le=this.framebuffer=Ge.createFramebuffer();this.colorAttachment=new er(K,Le),me&&(this.depthAttachment=new Lr(K,Le))};fa.prototype.destroy=function(){var K=this.context.gl,_e=this.colorAttachment.get();if(_e&&K.deleteTexture(_e),this.depthAttachment){var te=this.depthAttachment.get();te&&K.deleteRenderbuffer(te)}K.deleteFramebuffer(this.framebuffer)};var Da=519,Ia=function(K,_e,te){this.func=K,this.mask=_e,this.range=te};Ia.ReadOnly=!1,Ia.ReadWrite=!0,Ia.disabled=new Ia(Da,Ia.ReadOnly,[0,1]);var qa=519,Wa=7680,Ca=function(K,_e,te,me,Ge,Le){this.test=K,this.ref=_e,this.mask=te,this.fail=me,this.depthFail=Ge,this.pass=Le};Ca.disabled=new Ca({func:qa,mask:0},0,0,Wa,Wa,Wa);var hi=0,wi=1,Kt=771,Ft=function(K,_e,te){this.blendFunction=K,this.blendColor=_e,this.mask=te};Ft.Replace=[wi,hi],Ft.disabled=new Ft(Ft.Replace,e.Color.transparent,[!1,!1,!1,!1]),Ft.unblended=new Ft(Ft.Replace,e.Color.transparent,[!0,!0,!0,!0]),Ft.alphaBlended=new Ft([wi,Kt],e.Color.transparent,[!0,!0,!0,!0]);var Yt=1029,Jt=2305,Fr=function(K,_e,te){this.enable=K,this.mode=_e,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 st(this),this.clearDepth=new Me(this),this.clearStencil=new ye(this),this.colorMask=new he(this),this.depthMask=new Oe(this),this.stencilMask=new tt(this),this.stencilFunc=new ot(this),this.stencilOp=new Qe(this),this.stencilTest=new Pt(this),this.depthRange=new It(this),this.depthTest=new qt(this),this.depthFunc=new Wt(this),this.blend=new kr(this),this.blendFunc=new mr(this),this.blendColor=new qr(this),this.blendEquation=new Sr(this),this.cullFace=new Rr(this),this.cullFaceSide=new wt(this),this.frontFace=new Ne(this),this.program=new Ke(this),this.activeTexture=new Te(this),this.viewport=new Ie(this),this.bindFramebuffer=new Ve(this),this.bindRenderbuffer=new Ce(this),this.bindTexture=new Ee(this),this.bindVertexBuffer=new Pe(this),this.bindElementBuffer=new ft(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ct(this),this.pixelStoreUnpack=new _t(this),this.pixelStoreUnpackPremultiplyAlpha=new Ct(this),this.pixelStoreUnpackFlipY=new ir(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,_e){return new Ze(this,K,_e)},ta.prototype.createVertexBuffer=function(K,_e,te){return new nt(this,K,_e,te)},ta.prototype.createRenderbuffer=function(K,_e,te){var me=this.gl,Ge=me.createRenderbuffer();return this.bindRenderbuffer.set(Ge),me.renderbufferStorage(me.RENDERBUFFER,K,_e,te),this.bindRenderbuffer.set(null),Ge},ta.prototype.createFramebuffer=function(K,_e,te){return new fa(this,K,_e,te)},ta.prototype.clear=function(K){var _e=K.color,te=K.depth,me=this.gl,Ge=0;_e&&(Ge|=me.COLOR_BUFFER_BIT,this.clearColor.set(_e),this.colorMask.set([!0,!0,!0,!0])),typeof te<"u"&&(Ge|=me.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(te),this.depthMask.set(!0)),me.clear(Ge)},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,Ft.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(ve){function K(_e,te,me){var Ge=this;ve.call(this),this.id=_e,this.dispatcher=me,this.on("data",function(Le){Le.dataType==="source"&&Le.sourceDataType==="metadata"&&(Ge._sourceLoaded=!0),Ge._sourceLoaded&&!Ge._paused&&Le.dataType==="source"&&Le.sourceDataType==="content"&&(Ge.reload(),Ge.transform&&Ge.update(Ge.transform))}),this.on("error",function(){Ge._sourceErrored=!0}),this._source=q(_e,te,me,this),this._tiles={},this._cache=new ze(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new e.SourceFeatureState}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=this._tiles[te];if(me.state!=="loaded"&&me.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,me){return this._source.loadTile(te,me)},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 me in this._tiles){var Ge=this._tiles[me];Ge.upload(te),Ge.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 me=this,Ge=[];for(var Le in this._tiles)this._isIdRenderable(Le,te)&&Ge.push(this._tiles[Le]);return te?Ge.sort(function($e,gt){var jt=$e.tileID,wr=gt.tileID,Nr=new e.Point(jt.canonical.x,jt.canonical.y)._rotate(me.transform.angle),pr=new e.Point(wr.canonical.x,wr.canonical.y)._rotate(me.transform.angle);return jt.overscaledZ-wr.overscaledZ||pr.y-Nr.y||pr.x-Nr.x}).map(function($e){return $e.tileID.key}):Ge.map(function($e){return $e.tileID}).sort(ca).map(function($e){return $e.key})},K.prototype.hasRenderableParent=function(te){var me=this.findLoadedParent(te,0);return me?this._isIdRenderable(me.tileID.key):!1},K.prototype._isIdRenderable=function(te,me){return this._tiles[te]&&this._tiles[te].hasData()&&!this._coveredTiles[te]&&(me||!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,me){var Ge=this._tiles[te];Ge&&(Ge.state!=="loading"&&(Ge.state=me),this._loadTile(Ge,this._tileLoaded.bind(this,Ge,te,me)))},K.prototype._tileLoaded=function(te,me,Ge,Le){if(Le){te.state="errored",Le.status!==404?this._source.fire(new e.ErrorEvent(Le,{tile:te})):this.update(this.transform);return}te.timeAdded=e.browser.now(),Ge==="expired"&&(te.refreshedUponExpiration=!0),this._setTileReloadTimer(me,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 me=this.getRenderableIds(),Ge=0;Ge<me.length;Ge++){var Le=me[Ge];if(te.neighboringTiles&&te.neighboringTiles[Le]){var $e=this.getTileByID(Le);gt(te,$e),gt($e,te)}}function gt(jt,wr){jt.needsHillshadePrepare=!0;var Nr=wr.tileID.canonical.x-jt.tileID.canonical.x,pr=wr.tileID.canonical.y-jt.tileID.canonical.y,yt=Math.pow(2,jt.tileID.canonical.z),kt=wr.tileID.key;Nr===0&&pr===0||Math.abs(pr)>1||(Math.abs(Nr)>1&&(Math.abs(Nr+yt)===1?Nr+=yt:Math.abs(Nr-yt)===1&&(Nr-=yt)),!(!wr.dem||!jt.dem)&&(jt.dem.backfillBorder(wr.dem,Nr,pr),jt.neighboringTiles&&jt.neighboringTiles[kt]&&(jt.neighboringTiles[kt].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,me,Ge,Le){for(var $e in this._tiles){var gt=this._tiles[$e];if(!(Le[$e]||!gt.hasData()||gt.tileID.overscaledZ<=me||gt.tileID.overscaledZ>Ge)){for(var jt=gt.tileID;gt&&gt.tileID.overscaledZ>me+1;){var wr=gt.tileID.scaledTo(gt.tileID.overscaledZ-1);gt=this._tiles[wr.key],gt&&gt.hasData()&&(jt=wr)}for(var Nr=jt;Nr.overscaledZ>me;)if(Nr=Nr.scaledTo(Nr.overscaledZ-1),te[Nr.key]){Le[jt.key]=jt;break}}}},K.prototype.findLoadedParent=function(te,me){if(te.key in this._loadedParentTiles){var Ge=this._loadedParentTiles[te.key];return Ge&&Ge.tileID.overscaledZ>=me?Ge:null}for(var Le=te.overscaledZ-1;Le>=me;Le--){var $e=te.scaledTo(Le),gt=this._getLoadedTile($e);if(gt)return gt}},K.prototype._getLoadedTile=function(te){var me=this._tiles[te.key];if(me&&me.hasData())return me;var Ge=this._cache.getByKey(te.wrapped().key);return Ge},K.prototype.updateCacheSize=function(te){var me=Math.ceil(te.width/this._source.tileSize)+1,Ge=Math.ceil(te.height/this._source.tileSize)+1,Le=me*Ge,$e=5,gt=Math.floor(Le*$e),jt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,gt):gt;this._cache.setMaxSize(jt)},K.prototype.handleWrapJump=function(te){var me=this._prevLng===void 0?te:this._prevLng,Ge=te-me,Le=Ge/360,$e=Math.round(Le);if(this._prevLng=te,$e){var gt={};for(var jt in this._tiles){var wr=this._tiles[jt];wr.tileID=wr.tileID.unwrapTo(wr.tileID.wrap+$e),gt[wr.tileID.key]=wr}this._tiles=gt;for(var Nr in this._timers)clearTimeout(this._timers[Nr]),delete this._timers[Nr];for(var pr in this._tiles){var yt=this._tiles[pr];this._setTileReloadTimer(pr,yt)}}},K.prototype.update=function(te){var me=this;if(this.transform=te,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(te),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ge;this.used?this._source.tileID?Ge=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)}):(Ge=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&&(Ge=Ge.filter(function(ga){return me._source.hasTile(ga)}))):Ge=[];var Le=te.coveringZoomLevel(this._source),$e=Math.max(Le-K.maxOverzooming,this._source.minzoom),gt=Math.max(Le+K.maxUnderzooming,this._source.minzoom),jt=this._updateRetainedTiles(Ge,Le);if(Ba(this._source.type)){for(var wr={},Nr={},pr=Object.keys(jt),yt=0,kt=pr;yt<kt.length;yt+=1){var Bt=kt[yt],nr=jt[Bt],hr=this._tiles[Bt];if(!(!hr||hr.fadeEndTime&&hr.fadeEndTime<=e.browser.now())){var lr=this.findLoadedParent(nr,$e);lr&&(this._addTile(lr.tileID),wr[lr.tileID.key]=lr.tileID),Nr[Bt]=nr}}this._retainLoadedChildren(Nr,Le,gt,jt);for(var dr in wr)jt[dr]||(this._coveredTiles[dr]=!0,jt[dr]=wr[dr])}for(var ur in jt)this._tiles[ur].clearFadeHold();for(var Ht=e.keysDifference(this._tiles,jt),sr=0,Vt=Ht;sr<Vt.length;sr+=1){var Dr=Vt[sr],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,me){for(var Ge={},Le={},$e=Math.max(me-K.maxOverzooming,this._source.minzoom),gt=Math.max(me+K.maxUnderzooming,this._source.minzoom),jt={},wr=0,Nr=te;wr<Nr.length;wr+=1){var pr=Nr[wr],yt=this._addTile(pr);Ge[pr.key]=pr,!yt.hasData()&&me<this._source.maxzoom&&(jt[pr.key]=pr)}this._retainLoadedChildren(jt,me,gt,Ge);for(var kt=0,Bt=te;kt<Bt.length;kt+=1){var nr=Bt[kt],hr=this._tiles[nr.key];if(!hr.hasData()){if(me+1>this._source.maxzoom){var lr=nr.children(this._source.maxzoom)[0],dr=this.getTile(lr);if(dr&&dr.hasData()){Ge[lr.key]=lr;continue}}else{var ur=nr.children(this._source.maxzoom);if(Ge[ur[0].key]&&Ge[ur[1].key]&&Ge[ur[2].key]&&Ge[ur[3].key])continue}for(var Ht=hr.wasRequested(),sr=nr.overscaledZ-1;sr>=$e;--sr){var Vt=nr.scaledTo(sr);if(Le[Vt.key]||(Le[Vt.key]=!0,hr=this.getTile(Vt),!hr&&Ht&&(hr=this._addTile(Vt)),hr&&(Ge[Vt.key]=Vt,Ht=hr.wasRequested(),hr.hasData())))break}}}return Ge},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var te in this._tiles){for(var me=[],Ge=void 0,Le=this._tiles[te].tileID;Le.overscaledZ>0;){if(Le.key in this._loadedParentTiles){Ge=this._loadedParentTiles[Le.key];break}me.push(Le.key);var $e=Le.scaledTo(Le.overscaledZ-1);if(Ge=this._getLoadedTile($e),Ge)break;Le=$e}for(var gt=0,jt=me;gt<jt.length;gt+=1){var wr=jt[gt];this._loadedParentTiles[wr]=Ge}}},K.prototype._addTile=function(te){var me=this._tiles[te.key];if(me)return me;me=this._cache.getAndRemove(te),me&&(this._setTileReloadTimer(te.key,me),me.tileID=te,this._state.initializeTileState(me,this.map?this.map.painter:null),this._cacheTimers[te.key]&&(clearTimeout(this._cacheTimers[te.key]),delete this._cacheTimers[te.key],this._setTileReloadTimer(te.key,me)));var Ge=!!me;return Ge||(me=new e.Tile(te,this._source.tileSize*te.overscaleFactor()),this._loadTile(me,this._tileLoaded.bind(this,me,te.key,me.state))),me?(me.uses++,this._tiles[te.key]=me,Ge||this._source.fire(new e.Event("dataloading",{tile:me,coord:me.tileID,dataType:"source"})),me):null},K.prototype._setTileReloadTimer=function(te,me){var Ge=this;te in this._timers&&(clearTimeout(this._timers[te]),delete this._timers[te]);var Le=me.getExpiryTimeout();Le&&(this._timers[te]=setTimeout(function(){Ge._reloadTile(te,"expired"),delete Ge._timers[te]},Le))},K.prototype._removeTile=function(te){var me=this._tiles[te];me&&(me.uses--,delete this._tiles[te],this._timers[te]&&(clearTimeout(this._timers[te]),delete this._timers[te]),!(me.uses>0)&&(me.hasData()&&me.state!=="reloading"?this._cache.add(me.tileID,me,me.getExpiryTimeout()):(me.aborted=!0,this._abortTile(me),this._unloadTile(me))))},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,me,Ge){var Le=this,$e=[],gt=this.transform;if(!gt)return $e;for(var jt=Ge?gt.getCameraQueryGeometry(te):te,wr=te.map(function(sr){return gt.pointCoordinate(sr)}),Nr=jt.map(function(sr){return gt.pointCoordinate(sr)}),pr=this.getIds(),yt=1/0,kt=1/0,Bt=-1/0,nr=-1/0,hr=0,lr=Nr;hr<lr.length;hr+=1){var dr=lr[hr];yt=Math.min(yt,dr.x),kt=Math.min(kt,dr.y),Bt=Math.max(Bt,dr.x),nr=Math.max(nr,dr.y)}for(var ur=function(sr){var Vt=Le._tiles[pr[sr]];if(!Vt.holdingForFade()){var Dr=Vt.tileID,Jr=Math.pow(2,gt.zoom-Vt.tileID.overscaledZ),ga=me*Vt.queryPadding*e.EXTENT/Vt.tileSize/Jr,vi=[Dr.getTilePoint(new e.MercatorCoordinate(yt,kt)),Dr.getTilePoint(new e.MercatorCoordinate(Bt,nr))];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)});$e.push({tile:Vt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Ht=0;Ht<pr.length;Ht++)ur(Ht);return $e},K.prototype.getVisibleCoordinates=function(te){for(var me=this,Ge=this.getRenderableIds(te).map(function(jt){return me._tiles[jt].tileID}),Le=0,$e=Ge;Le<$e.length;Le+=1){var gt=$e[Le];gt.posMatrix=this.transform.calculatePosMatrix(gt.toUnwrapped())}return Ge},K.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ba(this._source.type))for(var te in this._tiles){var me=this._tiles[te];if(me.fadeEndTime!==void 0&&me.fadeEndTime>=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.updateState(te,me,Ge)},K.prototype.removeFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.removeFeatureState(te,me,Ge)},K.prototype.getFeatureState=function(te,me){return te=te||"_geojsonTileLayer",this._state.getState(te,me)},K.prototype.setDependencies=function(te,me,Ge){var Le=this._tiles[te];Le&&Le.setDependencies(me,Ge)},K.prototype.reloadTilesForDependencies=function(te,me){for(var Ge in this._tiles){var Le=this._tiles[Ge];Le.hasDependency(te,me)&&this._reloadTile(Ge,"reloading")}this._cache.filter(function($e){return!$e.hasDependency(te,me)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ve,K){var _e=Math.abs(ve.wrap*2)-+(ve.wrap<0),te=Math.abs(K.wrap*2)-+(K.wrap<0);return ve.overscaledZ-K.overscaledZ||te-_e||K.canonical.y-ve.canonical.y||K.canonical.x-ve.canonical.x}function Ba(ve){return ve==="raster"||ve==="image"||ve==="video"}function $a(){return new e.window.Worker(Co.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(_e){_e.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 tn(){return Ra||(Ra=new ri),Ra}function on(){var ve=tn();ve.acquire(Za)}function hn(){var ve=Ra;ve&&(ve.isPreloaded()&&ve.numActive()===1?(ve.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 Tt(ve,K){var _e={};for(var te in ve)te!=="ref"&&(_e[te]=ve[te]);return e.refProperties.forEach(function(me){me in K&&(_e[me]=K[me])}),_e}function ut(ve){ve=ve.slice();for(var K=Object.create(null),_e=0;_e<ve.length;_e++)K[ve[_e].id]=ve[_e];for(var te=0;te<ve.length;te++)"ref"in ve[te]&&(ve[te]=Tt(ve[te],K[ve[te].ref]));return ve}function Br(){var ve={},K=e.styleSpec.$version;for(var _e in e.styleSpec.$root){var te=e.styleSpec.$root[_e];if(te.required){var me=null;_e==="version"?me=K:te.type==="array"?me=[]:me={},me!=null&&(ve[_e]=me)}}return ve}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(ve,K,_e){_e.push({command:Cr.addSource,args:[ve,K[ve]]})}function Ir(ve,K,_e){K.push({command:Cr.removeSource,args:[ve]}),_e[ve]=!0}function Ur(ve,K,_e,te){Ir(ve,_e,te),xr(ve,K,_e)}function Hr(ve,K,_e){var te;for(te in ve[_e])if(ve[_e].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ve[_e][te],K[_e][te]))return!1;for(te in K[_e])if(K[_e].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ve[_e][te],K[_e][te]))return!1;return!0}function xt(ve,K,_e,te){ve=ve||{},K=K||{};var me;for(me in ve)ve.hasOwnProperty(me)&&(K.hasOwnProperty(me)||Ir(me,_e,te));for(me in K)K.hasOwnProperty(me)&&(ve.hasOwnProperty(me)?e.deepEqual(ve[me],K[me])||(ve[me].type==="geojson"&&K[me].type==="geojson"&&Hr(ve,K,me)?_e.push({command:Cr.setGeoJSONSourceData,args:[me,K[me].data]}):Ur(me,K,_e,te)):xr(me,K,_e))}function Xt(ve,K,_e,te,me,Ge){ve=ve||{},K=K||{};var Le;for(Le in ve)ve.hasOwnProperty(Le)&&(e.deepEqual(ve[Le],K[Le])||_e.push({command:Ge,args:[te,Le,K[Le],me]}));for(Le in K)!K.hasOwnProperty(Le)||ve.hasOwnProperty(Le)||e.deepEqual(ve[Le],K[Le])||_e.push({command:Ge,args:[te,Le,K[Le],me]})}function vr(ve){return ve.id}function Or(ve,K){return ve[K.id]=K,ve}function ba(ve,K,_e){ve=ve||[],K=K||[];var te=ve.map(vr),me=K.map(vr),Ge=ve.reduce(Or,{}),Le=K.reduce(Or,{}),$e=te.slice(),gt=Object.create(null),jt,wr,Nr,pr,yt,kt,Bt;for(jt=0,wr=0;jt<te.length;jt++)Nr=te[jt],Le.hasOwnProperty(Nr)?wr++:(_e.push({command:Cr.removeLayer,args:[Nr]}),$e.splice($e.indexOf(Nr,wr),1));for(jt=0,wr=0;jt<me.length;jt++)Nr=me[me.length-1-jt],$e[$e.length-1-jt]!==Nr&&(Ge.hasOwnProperty(Nr)?(_e.push({command:Cr.removeLayer,args:[Nr]}),$e.splice($e.lastIndexOf(Nr,$e.length-wr),1)):wr++,kt=$e[$e.length-jt],_e.push({command:Cr.addLayer,args:[Le[Nr],kt]}),$e.splice($e.length-jt,0,Nr),gt[Nr]=!0);for(jt=0;jt<me.length;jt++)if(Nr=me[jt],pr=Ge[Nr],yt=Le[Nr],!(gt[Nr]||e.deepEqual(pr,yt))){if(!e.deepEqual(pr.source,yt.source)||!e.deepEqual(pr["source-layer"],yt["source-layer"])||!e.deepEqual(pr.type,yt.type)){_e.push({command:Cr.removeLayer,args:[Nr]}),kt=$e[$e.lastIndexOf(Nr)+1],_e.push({command:Cr.addLayer,args:[yt,kt]});continue}Xt(pr.layout,yt.layout,_e,Nr,null,Cr.setLayoutProperty),Xt(pr.paint,yt.paint,_e,Nr,null,Cr.setPaintProperty),e.deepEqual(pr.filter,yt.filter)||_e.push({command:Cr.setFilter,args:[Nr,yt.filter]}),(!e.deepEqual(pr.minzoom,yt.minzoom)||!e.deepEqual(pr.maxzoom,yt.maxzoom))&&_e.push({command:Cr.setLayerZoomRange,args:[Nr,yt.minzoom,yt.maxzoom]});for(Bt in pr)pr.hasOwnProperty(Bt)&&(Bt==="layout"||Bt==="paint"||Bt==="filter"||Bt==="metadata"||Bt==="minzoom"||Bt==="maxzoom"||(Bt.indexOf("paint.")===0?Xt(pr[Bt],yt[Bt],_e,Nr,Bt.slice(6),Cr.setPaintProperty):e.deepEqual(pr[Bt],yt[Bt])||_e.push({command:Cr.setLayerProperty,args:[Nr,Bt,yt[Bt]]})));for(Bt in yt)!yt.hasOwnProperty(Bt)||pr.hasOwnProperty(Bt)||Bt==="layout"||Bt==="paint"||Bt==="filter"||Bt==="metadata"||Bt==="minzoom"||Bt==="maxzoom"||(Bt.indexOf("paint.")===0?Xt(pr[Bt],yt[Bt],_e,Nr,Bt.slice(6),Cr.setPaintProperty):e.deepEqual(pr[Bt],yt[Bt])||_e.push({command:Cr.setLayerProperty,args:[Nr,Bt,yt[Bt]]}))}}function Pa(ve,K){if(!ve)return[{command:Cr.setStyle,args:[K]}];var _e=[];try{if(!e.deepEqual(ve.version,K.version))return[{command:Cr.setStyle,args:[K]}];e.deepEqual(ve.center,K.center)||_e.push({command:Cr.setCenter,args:[K.center]}),e.deepEqual(ve.zoom,K.zoom)||_e.push({command:Cr.setZoom,args:[K.zoom]}),e.deepEqual(ve.bearing,K.bearing)||_e.push({command:Cr.setBearing,args:[K.bearing]}),e.deepEqual(ve.pitch,K.pitch)||_e.push({command:Cr.setPitch,args:[K.pitch]}),e.deepEqual(ve.sprite,K.sprite)||_e.push({command:Cr.setSprite,args:[K.sprite]}),e.deepEqual(ve.glyphs,K.glyphs)||_e.push({command:Cr.setGlyphs,args:[K.glyphs]}),e.deepEqual(ve.transition,K.transition)||_e.push({command:Cr.setTransition,args:[K.transition]}),e.deepEqual(ve.light,K.light)||_e.push({command:Cr.setLight,args:[K.light]});var te={},me=[];xt(ve.sources,K.sources,me,te);var Ge=[];ve.layers&&ve.layers.forEach(function(Le){te[Le.source]?_e.push({command:Cr.removeLayer,args:[Le.id]}):Ge.push(Le)}),_e=_e.concat(me),ba(Ge,K.layers,_e)}catch(Le){console.warn("Unable to compute style diff:",Le),_e=[{command:Cr.setStyle,args:[K]}]}return _e}var ya=function(K,_e){this.reset(K,_e)};ya.prototype.reset=function(K,_e){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(_e||0,this.length*.5),this.paddedLength=this.length-this.padding*2},ya.prototype.lerp=function(K){if(this.points.length===1)return this.points[0];K=e.clamp(K,0,1);for(var _e=1,te=this._distances[_e],me=K*this.paddedLength+this.padding;te<me&&_e<this._distances.length;)te=this._distances[++_e];var Ge=_e-1,Le=this._distances[Ge],$e=te-Le,gt=$e>0?(me-Le)/$e:0;return this.points[Ge].mult(1-gt).add(this.points[_e].mult(gt))};var la=function(K,_e,te){var me=this.boxCells=[],Ge=this.circleCells=[];this.xCellCount=Math.ceil(K/te),this.yCellCount=Math.ceil(_e/te);for(var Le=0;Le<this.xCellCount*this.yCellCount;Le++)me.push([]),Ge.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=K,this.height=_e,this.xScale=this.xCellCount/K,this.yScale=this.yCellCount/_e,this.boxUid=0,this.circleUid=0};la.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},la.prototype.insert=function(K,_e,te,me,Ge){this._forEachCell(_e,te,me,Ge,this._insertBoxCell,this.boxUid++),this.boxKeys.push(K),this.bboxes.push(_e),this.bboxes.push(te),this.bboxes.push(me),this.bboxes.push(Ge)},la.prototype.insertCircle=function(K,_e,te,me){this._forEachCell(_e-me,te-me,_e+me,te+me,this._insertCircleCell,this.circleUid++),this.circleKeys.push(K),this.circles.push(_e),this.circles.push(te),this.circles.push(me)},la.prototype._insertBoxCell=function(K,_e,te,me,Ge,Le){this.boxCells[Ge].push(Le)},la.prototype._insertCircleCell=function(K,_e,te,me,Ge,Le){this.circleCells[Ge].push(Le)},la.prototype._query=function(K,_e,te,me,Ge,Le){if(te<0||K>this.width||me<0||_e>this.height)return Ge?!1:[];var $e=[];if(K<=0&&_e<=0&&this.width<=te&&this.height<=me){if(Ge)return!0;for(var gt=0;gt<this.boxKeys.length;gt++)$e.push({key:this.boxKeys[gt],x1:this.bboxes[gt*4],y1:this.bboxes[gt*4+1],x2:this.bboxes[gt*4+2],y2:this.bboxes[gt*4+3]});for(var jt=0;jt<this.circleKeys.length;jt++){var wr=this.circles[jt*3],Nr=this.circles[jt*3+1],pr=this.circles[jt*3+2];$e.push({key:this.circleKeys[jt],x1:wr-pr,y1:Nr-pr,x2:wr+pr,y2:Nr+pr})}return Le?$e.filter(Le):$e}else{var yt={hitTest:Ge,seenUids:{box:{},circle:{}}};return this._forEachCell(K,_e,te,me,this._queryCell,$e,yt,Le),Ge?$e.length>0:$e}},la.prototype._queryCircle=function(K,_e,te,me,Ge){var Le=K-te,$e=K+te,gt=_e-te,jt=_e+te;if($e<0||Le>this.width||jt<0||gt>this.height)return me?!1:[];var wr=[],Nr={hitTest:me,circle:{x:K,y:_e,radius:te},seenUids:{box:{},circle:{}}};return this._forEachCell(Le,gt,$e,jt,this._queryCellCircle,wr,Nr,Ge),me?wr.length>0:wr},la.prototype.query=function(K,_e,te,me,Ge){return this._query(K,_e,te,me,!1,Ge)},la.prototype.hitTest=function(K,_e,te,me,Ge){return this._query(K,_e,te,me,!0,Ge)},la.prototype.hitTestCircle=function(K,_e,te,me){return this._queryCircle(K,_e,te,!0,me)},la.prototype._queryCell=function(K,_e,te,me,Ge,Le,$e,gt){var jt=$e.seenUids,wr=this.boxCells[Ge];if(wr!==null)for(var Nr=this.bboxes,pr=0,yt=wr;pr<yt.length;pr+=1){var kt=yt[pr];if(!jt.box[kt]){jt.box[kt]=!0;var Bt=kt*4;if(K<=Nr[Bt+2]&&_e<=Nr[Bt+3]&&te>=Nr[Bt+0]&&me>=Nr[Bt+1]&&(!gt||gt(this.boxKeys[kt]))){if($e.hitTest)return Le.push(!0),!0;Le.push({key:this.boxKeys[kt],x1:Nr[Bt],y1:Nr[Bt+1],x2:Nr[Bt+2],y2:Nr[Bt+3]})}}}var nr=this.circleCells[Ge];if(nr!==null)for(var hr=this.circles,lr=0,dr=nr;lr<dr.length;lr+=1){var ur=dr[lr];if(!jt.circle[ur]){jt.circle[ur]=!0;var Ht=ur*3;if(this._circleAndRectCollide(hr[Ht],hr[Ht+1],hr[Ht+2],K,_e,te,me)&&(!gt||gt(this.circleKeys[ur]))){if($e.hitTest)return Le.push(!0),!0;var sr=hr[Ht],Vt=hr[Ht+1],Dr=hr[Ht+2];Le.push({key:this.circleKeys[ur],x1:sr-Dr,y1:Vt-Dr,x2:sr+Dr,y2:Vt+Dr})}}}},la.prototype._queryCellCircle=function(K,_e,te,me,Ge,Le,$e,gt){var jt=$e.circle,wr=$e.seenUids,Nr=this.boxCells[Ge];if(Nr!==null)for(var pr=this.bboxes,yt=0,kt=Nr;yt<kt.length;yt+=1){var Bt=kt[yt];if(!wr.box[Bt]){wr.box[Bt]=!0;var nr=Bt*4;if(this._circleAndRectCollide(jt.x,jt.y,jt.radius,pr[nr+0],pr[nr+1],pr[nr+2],pr[nr+3])&&(!gt||gt(this.boxKeys[Bt])))return Le.push(!0),!0}}var hr=this.circleCells[Ge];if(hr!==null)for(var lr=this.circles,dr=0,ur=hr;dr<ur.length;dr+=1){var Ht=ur[dr];if(!wr.circle[Ht]){wr.circle[Ht]=!0;var sr=Ht*3;if(this._circlesCollide(lr[sr],lr[sr+1],lr[sr+2],jt.x,jt.y,jt.radius)&&(!gt||gt(this.circleKeys[Ht])))return Le.push(!0),!0}}},la.prototype._forEachCell=function(K,_e,te,me,Ge,Le,$e,gt){for(var jt=this._convertToXCellCoord(K),wr=this._convertToYCellCoord(_e),Nr=this._convertToXCellCoord(te),pr=this._convertToYCellCoord(me),yt=jt;yt<=Nr;yt++)for(var kt=wr;kt<=pr;kt++){var Bt=this.xCellCount*kt+yt;if(Ge.call(this,K,_e,te,me,Bt,Le,$e,gt))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,_e,te,me,Ge,Le){var $e=me-K,gt=Ge-_e,jt=te+Le;return jt*jt>$e*$e+gt*gt},la.prototype._circleAndRectCollide=function(K,_e,te,me,Ge,Le,$e){var gt=(Le-me)/2,jt=Math.abs(K-(me+gt));if(jt>gt+te)return!1;var wr=($e-Ge)/2,Nr=Math.abs(_e-(Ge+wr));if(Nr>wr+te)return!1;if(jt<=gt||Nr<=wr)return!0;var pr=jt-gt,yt=Nr-wr;return pr*pr+yt*yt<=te*te};function Ta(ve,K,_e,te,me){var Ge=e.create();return K?(e.scale(Ge,Ge,[1/me,1/me,1]),_e||e.rotateZ(Ge,Ge,te.angle)):e.multiply(Ge,te.labelPlaneMatrix,ve),Ge}function Ai(ve,K,_e,te,me){if(K){var Ge=e.clone(ve);return e.scale(Ge,Ge,[me,me,1]),_e||e.rotateZ(Ge,Ge,-te.angle),Ge}else return te.glCoordMatrix}function ki(ve,K){var _e=[ve.x,ve.y,0,1];Oo(_e,_e,K);var te=_e[3];return{point:new e.Point(_e[0]/te,_e[1]/te),signedDistanceFromCamera:te}}function Ki(ve,K){return .5+.5*(ve/K)}function _n(ve,K){var _e=ve[0]/ve[3],te=ve[1]/ve[3],me=_e>=-K[0]&&_e<=K[0]&&te>=-K[1]&&te<=K[1];return me}function Rn(ve,K,_e,te,me,Ge,Le,$e){var gt=te?ve.textSizeData:ve.iconSizeData,jt=e.evaluateSizeForZoom(gt,_e.transform.zoom),wr=[256/_e.width*2+1,256/_e.height*2+1],Nr=te?ve.text.dynamicLayoutVertexArray:ve.icon.dynamicLayoutVertexArray;Nr.clear();for(var pr=ve.lineVertexArray,yt=te?ve.text.placedSymbolArray:ve.icon.placedSymbolArray,kt=_e.transform.width/_e.transform.height,Bt=!1,nr=0;nr<yt.length;nr++){var hr=yt.get(nr);if(hr.hidden||hr.writingMode===e.WritingMode.vertical&&!Bt){hs(hr.numGlyphs,Nr);continue}Bt=!1;var lr=[hr.anchorX,hr.anchorY,0,1];if(e.transformMat4(lr,lr,K),!_n(lr,wr)){hs(hr.numGlyphs,Nr);continue}var dr=lr[3],ur=Ki(_e.transform.cameraToCenterDistance,dr),Ht=e.evaluateSizeForFeature(gt,jt,hr),sr=Le?Ht/ur:Ht*ur,Vt=new e.Point(hr.anchorX,hr.anchorY),Dr=ki(Vt,me).point,Jr={},ga=no(hr,sr,!1,$e,K,me,Ge,ve.glyphOffsetArray,pr,Nr,Dr,Vt,Jr,kt);Bt=ga.useVertical,(ga.notEnoughRoom||Bt||ga.needsFlipping&&no(hr,sr,!0,$e,K,me,Ge,ve.glyphOffsetArray,pr,Nr,Dr,Vt,Jr,kt).notEnoughRoom)&&hs(hr.numGlyphs,Nr)}te?ve.text.dynamicLayoutVertexBuffer.updateData(Nr):ve.icon.dynamicLayoutVertexBuffer.updateData(Nr)}function En(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr){var Nr=$e.glyphStartIndex+$e.numGlyphs,pr=$e.lineStartIndex,yt=$e.lineStartIndex+$e.lineLength,kt=K.getoffsetX($e.glyphStartIndex),Bt=K.getoffsetX(Nr-1),nr=lo(ve*kt,_e,te,me,Ge,Le,$e.segment,pr,yt,gt,jt,wr);if(!nr)return null;var hr=lo(ve*Bt,_e,te,me,Ge,Le,$e.segment,pr,yt,gt,jt,wr);return hr?{first:nr,last:hr}:null}function On(ve,K,_e,te){if(ve===e.WritingMode.horizontal){var me=Math.abs(_e.y-K.y),Ge=Math.abs(_e.x-K.x)*te;if(me>Ge)return{useVertical:!0}}return(ve===e.WritingMode.vertical?K.y<_e.y:K.x>_e.x)?{needsFlipping:!0}:null}function no(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr,pr,yt){var kt=K/24,Bt=ve.lineOffsetX*kt,nr=ve.lineOffsetY*kt,hr;if(ve.numGlyphs>1){var lr=ve.glyphStartIndex+ve.numGlyphs,dr=ve.lineStartIndex,ur=ve.lineStartIndex+ve.lineLength,Ht=En(kt,$e,Bt,nr,_e,wr,Nr,ve,gt,Ge,pr);if(!Ht)return{notEnoughRoom:!0};var sr=ki(Ht.first.point,Le).point,Vt=ki(Ht.last.point,Le).point;if(te&&!_e){var Dr=On(ve.writingMode,sr,Vt,yt);if(Dr)return Dr}hr=[Ht.first];for(var Jr=ve.glyphStartIndex+1;Jr<lr-1;Jr++)hr.push(lo(kt*$e.getoffsetX(Jr),Bt,nr,_e,wr,Nr,ve.segment,dr,ur,gt,Ge,pr));hr.push(Ht.last)}else{if(te&&!_e){var ga=ki(Nr,me).point,vi=ve.lineStartIndex+ve.segment+1,Ga=new e.Point(gt.getx(vi),gt.gety(vi)),ai=ki(Ga,me),Zi=ai.signedDistanceFromCamera>0?ai.point:cn(Nr,Ga,ga,1,me),Fi=On(ve.writingMode,ga,Zi,yt);if(Fi)return Fi}var ui=lo(kt*$e.getoffsetX(ve.glyphStartIndex),Bt,nr,_e,wr,Nr,ve.segment,ve.lineStartIndex,ve.lineStartIndex+ve.lineLength,gt,Ge,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(jt,Ui.point,Ui.angle)}return{}}function cn(ve,K,_e,te,me){var Ge=ki(ve.add(ve.sub(K)._unit()),me).point,Le=_e.sub(Ge);return _e.add(Le._mult(te/Le.mag()))}function lo(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr){var pr=te?ve-K:ve+K,yt=pr>0?1:-1,kt=0;te&&(yt*=-1,kt=Math.PI),yt<0&&(kt+=Math.PI);for(var Bt=yt>0?$e+Le:$e+Le+1,nr=me,hr=me,lr=0,dr=0,ur=Math.abs(pr),Ht=[];lr+dr<=ur;){if(Bt+=yt,Bt<$e||Bt>=gt)return null;if(hr=nr,Ht.push(nr),nr=Nr[Bt],nr===void 0){var sr=new e.Point(jt.getx(Bt),jt.gety(Bt)),Vt=ki(sr,wr);if(Vt.signedDistanceFromCamera>0)nr=Nr[Bt]=Vt.point;else{var Dr=Bt-yt,Jr=lr===0?Ge:new e.Point(jt.getx(Dr),jt.gety(Dr));nr=cn(Jr,sr,hr,ur-lr+1,wr)}}lr+=dr,dr=hr.dist(nr)}var ga=(ur-lr)/dr,vi=nr.sub(hr),Ga=vi.mult(ga)._add(hr);Ga._add(vi._unit()._perp()._mult(_e*yt));var ai=kt+Math.atan2(nr.y-hr.y,nr.x-hr.x);return Ht.push(Ga),{point:Ga,angle:ai,path:Ht}}var Wo=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function hs(ve,K){for(var _e=0;_e<ve;_e++){var te=K.length;K.resize(te+4),K.float32.set(Wo,te*3)}}function Oo(ve,K,_e){var te=K[0],me=K[1];return ve[0]=_e[0]*te+_e[4]*me+_e[12],ve[1]=_e[1]*te+_e[5]*me+_e[13],ve[3]=_e[3]*te+_e[7]*me+_e[15],ve}var Wn=100,No=function(K,_e,te){_e===void 0&&(_e=new la(K.width+2*Wn,K.height+2*Wn,25)),te===void 0&&(te=new la(K.width+2*Wn,K.height+2*Wn,25)),this.transform=K,this.grid=_e,this.ignoredGrid=te,this.pitchfactor=Math.cos(K._pitch)*K.cameraToCenterDistance,this.screenRightBoundary=K.width+Wn,this.screenBottomBoundary=K.height+Wn,this.gridRightBoundary=K.width+2*Wn,this.gridBottomBoundary=K.height+2*Wn};No.prototype.placeCollisionBox=function(K,_e,te,me,Ge){var Le=this.projectAndGetPerspectiveRatio(me,K.anchorPointX,K.anchorPointY),$e=te*Le.perspectiveRatio,gt=K.x1*$e+Le.point.x,jt=K.y1*$e+Le.point.y,wr=K.x2*$e+Le.point.x,Nr=K.y2*$e+Le.point.y;return!this.isInsideGrid(gt,jt,wr,Nr)||!_e&&this.grid.hitTest(gt,jt,wr,Nr,Ge)?{box:[],offscreen:!1}:{box:[gt,jt,wr,Nr],offscreen:this.isOffscreen(gt,jt,wr,Nr)}},No.prototype.placeCollisionCircles=function(K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr,pr,yt){var kt=[],Bt=new e.Point(_e.anchorX,_e.anchorY),nr=ki(Bt,Le),hr=Ki(this.transform.cameraToCenterDistance,nr.signedDistanceFromCamera),lr=wr?Ge/hr:Ge*hr,dr=lr/e.ONE_EM,ur=ki(Bt,$e).point,Ht={},sr=_e.lineOffsetX*dr,Vt=_e.lineOffsetY*dr,Dr=En(dr,me,sr,Vt,!1,ur,Bt,_e,te,$e,Ht),Jr=!1,ga=!1,vi=!0;if(Dr){for(var Ga=pr*.5*hr+yt,ai=new e.Point(-Wn,-Wn),Zi=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),Fi=new ya,ui=Dr.first,_i=Dr.last,Si=[],Ui=ui.path.length-1;Ui>=1;Ui--)Si.push(ui.path[Ui]);for(var fn=1;fn<_i.path.length;fn++)Si.push(_i.path[fn]);var _o=Ga*2.5;if(gt){var Bo=Si.map(function(Lp){return ki(Lp,gt)});Bo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Bo.map(function(Lp){return Lp.point})}var Ps=[];if(Si.length>0){for(var Do=Si[0].clone(),Ms=Si[0].clone(),Ys=1;Ys<Si.length;Ys++)Do.x=Math.min(Do.x,Si[Ys].x),Do.y=Math.min(Do.y,Si[Ys].y),Ms.x=Math.max(Ms.x,Si[Ys].x),Ms.y=Math.max(Ms.y,Si[Ys].y);Do.x>=ai.x&&Ms.x<=Zi.x&&Do.y>=ai.y&&Ms.y<=Zi.y?Ps=[Si]:Ms.x<ai.x||Do.x>Zi.x||Ms.y<ai.y||Do.y>Zi.y?Ps=[]:Ps=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ps;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/_o)+1;for(var qp=0;qp<Ph;qp++){var qd=qp/Math.max(Ph-1,1),ed=Fi.lerp(qd),Ih=ed.x+Wn,td=ed.y+Wn;kt.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,!jt))return{circles:[],offscreen:!1,collisionDetected:Jr}}}}return{circles:!jt&&Jr||!ga?[]:kt,offscreen:vi,collisionDetected:Jr}},No.prototype.queryRenderedSymbols=function(K){if(K.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var _e=[],te=1/0,me=1/0,Ge=-1/0,Le=-1/0,$e=0,gt=K;$e<gt.length;$e+=1){var jt=gt[$e],wr=new e.Point(jt.x+Wn,jt.y+Wn);te=Math.min(te,wr.x),me=Math.min(me,wr.y),Ge=Math.max(Ge,wr.x),Le=Math.max(Le,wr.y),_e.push(wr)}for(var Nr=this.grid.query(te,me,Ge,Le).concat(this.ignoredGrid.query(te,me,Ge,Le)),pr={},yt={},kt=0,Bt=Nr;kt<Bt.length;kt+=1){var nr=Bt[kt],hr=nr.key;if(pr[hr.bucketInstanceId]===void 0&&(pr[hr.bucketInstanceId]={}),!pr[hr.bucketInstanceId][hr.featureIndex]){var lr=[new e.Point(nr.x1,nr.y1),new e.Point(nr.x2,nr.y1),new e.Point(nr.x2,nr.y2),new e.Point(nr.x1,nr.y2)];e.polygonIntersectsPolygon(_e,lr)&&(pr[hr.bucketInstanceId][hr.featureIndex]=!0,yt[hr.bucketInstanceId]===void 0&&(yt[hr.bucketInstanceId]=[]),yt[hr.bucketInstanceId].push(hr.featureIndex))}}return yt},No.prototype.insertCollisionBox=function(K,_e,te,me,Ge){var Le=_e?this.ignoredGrid:this.grid,$e={bucketInstanceId:te,featureIndex:me,collisionGroupID:Ge};Le.insert($e,K[0],K[1],K[2],K[3])},No.prototype.insertCollisionCircles=function(K,_e,te,me,Ge){for(var Le=_e?this.ignoredGrid:this.grid,$e={bucketInstanceId:te,featureIndex:me,collisionGroupID:Ge},gt=0;gt<K.length;gt+=4)Le.insertCircle($e,K[gt],K[gt+1],K[gt+2])},No.prototype.projectAndGetPerspectiveRatio=function(K,_e,te){var me=[_e,te,0,1];Oo(me,me,K);var Ge=new e.Point((me[0]/me[3]+1)/2*this.transform.width+Wn,(-me[1]/me[3]+1)/2*this.transform.height+Wn);return{point:Ge,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/me[3])}},No.prototype.isOffscreen=function(K,_e,te,me){return te<Wn||K>=this.screenRightBoundary||me<Wn||_e>this.screenBottomBoundary},No.prototype.isInsideGrid=function(K,_e,te,me){return te>=0&&K<this.gridRightBoundary&&me>=0&&_e<this.gridBottomBoundary},No.prototype.getViewportMatrix=function(){var K=e.identity([]);return e.translate(K,K,[-Wn,-Wn,0]),K};function as(ve,K,_e){return K*(e.EXTENT/(ve.tileSize*Math.pow(2,_e-ve.tileID.overscaledZ)))}var Ns=function(K,_e,te,me){K?this.opacity=Math.max(0,Math.min(1,K.opacity+(K.placed?_e:-_e))):this.opacity=me&&te?1:0,this.placed=te};Ns.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var ss=function(K,_e,te,me,Ge){this.text=new Ns(K?K.text:null,_e,te,Ge),this.icon=new Ns(K?K.icon:null,_e,me,Ge)};ss.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var uo=function(K,_e,te){this.text=K,this.icon=_e,this.skipFade=te},jn=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},Xn=function(K,_e,te,me,Ge){this.bucketInstanceId=K,this.featureIndex=_e,this.sourceLayerIndex=te,this.bucketIndex=me,this.tileID=Ge},ls=function(K){this.crossSourceCollisions=K,this.maxGroupID=0,this.collisionGroups={}};ls.prototype.get=function(K){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[K]){var _e=++this.maxGroupID;this.collisionGroups[K]={ID:_e,predicate:function(te){return te.collisionGroupID===_e}}}return this.collisionGroups[K]};function Cs(ve,K,_e,te,me){var Ge=e.getAnchorAlignment(ve),Le=Ge.horizontalAlign,$e=Ge.verticalAlign,gt=-(Le-.5)*K,jt=-($e-.5)*_e,wr=e.evaluateVariableOffset(ve,te);return new e.Point(gt+wr[0]*me,jt+wr[1]*me)}function Ks(ve,K,_e,te,me,Ge){var Le=ve.x1,$e=ve.x2,gt=ve.y1,jt=ve.y2,wr=ve.anchorPointX,Nr=ve.anchorPointY,pr=new e.Point(K,_e);return te&&pr._rotate(me?Ge:-Ge),{x1:Le+pr.x,y1:gt+pr.y,x2:$e+pr.x,y2:jt+pr.y,anchorPointX:wr,anchorPointY:Nr}}var Xo=function(K,_e,te,me){this.transform=K.clone(),this.collisionIndex=new No(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=_e,this.retainedQueryData={},this.collisionGroups=new ls(te),this.collisionCircleArrays={},this.prevPlacement=me,me&&(me.prevPlacement=void 0),this.placedOrientations={}};Xo.prototype.getBucketParts=function(K,_e,te,me){var Ge=te.getBucket(_e),Le=te.latestFeatureIndex;if(!(!Ge||!Le||_e.id!==Ge.layerIds[0])){var $e=te.collisionBoxArray,gt=Ge.layers[0].layout,jt=Math.pow(2,this.transform.zoom-te.tileID.overscaledZ),wr=te.tileSize/e.EXTENT,Nr=this.transform.calculatePosMatrix(te.tileID.toUnwrapped()),pr=gt.get("text-pitch-alignment")==="map",yt=gt.get("text-rotation-alignment")==="map",kt=as(te,1,this.transform.zoom),Bt=Ta(Nr,pr,yt,this.transform,kt),nr=null;if(pr){var hr=Ai(Nr,pr,yt,this.transform,kt);nr=e.multiply([],this.transform.labelPlaneMatrix,hr)}this.retainedQueryData[Ge.bucketInstanceId]=new Xn(Ge.bucketInstanceId,Le,Ge.sourceLayerIndex,Ge.index,te.tileID);var lr={bucket:Ge,layout:gt,posMatrix:Nr,textLabelPlaneMatrix:Bt,labelToScreenMatrix:nr,scale:jt,textPixelRatio:wr,holdingForFade:te.holdingForFade(),collisionBoxArray:$e,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(Ge.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ge.sourceID)};if(me)for(var dr=0,ur=Ge.sortKeyRanges;dr<ur.length;dr+=1){var Ht=ur[dr],sr=Ht.sortKey,Vt=Ht.symbolInstanceStart,Dr=Ht.symbolInstanceEnd;K.push({sortKey:sr,symbolInstanceStart:Vt,symbolInstanceEnd:Dr,parameters:lr})}else K.push({symbolInstanceStart:0,symbolInstanceEnd:Ge.symbolInstances.length,parameters:lr})}},Xo.prototype.attemptAnchorPlacement=function(K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr,pr,yt,kt,Bt){var nr=[pr.textOffset0,pr.textOffset1],hr=Cs(K,te,me,nr,Ge),lr=this.collisionIndex.placeCollisionBox(Ks(_e,hr.x,hr.y,Le,$e,this.transform.angle),Nr,gt,jt,wr.predicate);if(Bt){var dr=this.collisionIndex.placeCollisionBox(Ks(Bt,hr.x,hr.y,Le,$e,this.transform.angle),Nr,gt,jt,wr.predicate);if(dr.box.length===0)return}if(lr.box.length>0){var ur;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(ur=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:nr,width:te,height:me,anchor:K,textBoxScale:Ge,prevAnchor:ur},this.markUsedJustification(yt,K,pr,kt),yt.allowVerticalPlacement&&(this.markUsedOrientation(yt,kt,pr),this.placedOrientations[pr.crossTileID]=kt),{shift:hr,placedGlyphBoxes:lr}}},Xo.prototype.placeLayerBucketPart=function(K,_e,te){var me=this,Ge=K.parameters,Le=Ge.bucket,$e=Ge.layout,gt=Ge.posMatrix,jt=Ge.textLabelPlaneMatrix,wr=Ge.labelToScreenMatrix,Nr=Ge.textPixelRatio,pr=Ge.holdingForFade,yt=Ge.collisionBoxArray,kt=Ge.partiallyEvaluatedTextSize,Bt=Ge.collisionGroup,nr=$e.get("text-optional"),hr=$e.get("icon-optional"),lr=$e.get("text-allow-overlap"),dr=$e.get("icon-allow-overlap"),ur=$e.get("text-rotation-alignment")==="map",Ht=$e.get("text-pitch-alignment")==="map",sr=$e.get("icon-text-fit")!=="none",Vt=$e.get("symbol-z-order")==="viewport-y",Dr=lr&&(dr||!Le.hasIconData()||hr),Jr=dr&&(lr||!Le.hasTextData()||nr);!Le.collisionArrays&&yt&&Le.deserializeCollisionBoxes(yt);var ga=function(ui,_i){if(!_e[ui.crossTileID]){if(pr){me.placements[ui.crossTileID]=new uo(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Bo={box:null,offscreen:null},Ps={box:null,offscreen:null},Do=null,Ms=null,Ys=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(Le.allowVerticalPlacement&&!cc&&me.prevPlacement){var Dh=me.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(me.placedOrientations[ui.crossTileID]=Dh,fu=Dh,me.markUsedOrientation(Le,fu,ui))}return fu},qd=function(cc,fu){if(Le.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Iv=Le.writingModes;Dh<Iv.length;Dh+=1){var sm=Iv[Dh];if(sm===e.WritingMode.vertical?(Bo=fu(),Ps=Bo):Bo=cc(),Bo&&Bo.box&&Bo.box.length)break}else Bo=cc()};if($e.get("text-variable-anchor")){var Kh=$e.get("text-variable-anchor");if(me.prevPlacement&&me.prevPlacement.variableOffsets[ui.crossTileID]){var Rh=me.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=sr&&!dr?fu:null,sv={box:[],offscreen:!1},xg=lr?Kh.length*2:Kh.length,Pp=0;Pp<xg;++Pp){var lv=Kh[Pp%Kh.length],bg=Pp>=Kh.length,T0=me.attemptAnchorPlacement(lv,cc,Iv,sm,Mu,ur,Ht,Nr,gt,Bt,bg,ui,Le,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,_o=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,fu=Bo&&Bo.box&&Bo.box.length;return Le.allowVerticalPlacement&&!fu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Bo&&(Si=Bo.box,fn=Bo.offscreen);var Cv=qp(Bo&&Bo.box);if(!Si&&me.prevPlacement){var Vd=me.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(me.variableOffsets[ui.crossTileID]=Vd,me.markUsedJustification(Le,Vd.anchor,ui,Cv))}}else{var ed=function(cc,fu){var Dh=me.collisionIndex.placeCollisionBox(cc,lr,Nr,gt,Bt.predicate);return Dh&&Dh.box&&Dh.box.length&&(me.markUsedOrientation(Le,fu,ui),me.placedOrientations[ui.crossTileID]=fu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return Le.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Bo&&Bo.box&&Bo.box.length)}}if(Do=Bo,Si=Do&&Do.box&&Do.box.length>0,fn=Do&&Do.offscreen,ui.useRuntimeCollisionCircles){var Gf=Le.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(Le.textSizeData,kt,Gf),Lv=$e.get("text-padding"),ph=ui.collisionCircleDiameter;Ms=me.collisionIndex.placeCollisionCircles(lr,Gf,Le.lineVertexArray,Le.glyphOffsetArray,Gd,gt,jt,wr,te,Ht,Bt.predicate,ph,Lv),Si=lr||Ms.circles.length>0&&!Ms.collisionDetected,fn=fn&&Ms.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var fu=sr&&_o?Ks(cc,_o.x,_o.y,ur,Ht,me.transform.angle):cc;return me.collisionIndex.placeCollisionBox(fu,dr,Nr,gt,Bt.predicate)};Ps&&Ps.box&&Ps.box.length&&_i.verticalIconBox?(Ys=iv(_i.verticalIconBox),Ui=Ys.box.length>0):(Ys=iv(_i.iconBox),Ui=Ys.box.length>0),fn=fn&&Ys.offscreen}var nm=nr||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&&Do&&Do.box&&(Ps&&Ps.box&&Ep?me.collisionIndex.insertCollisionBox(Do.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,Ep,Bt.ID):me.collisionIndex.insertCollisionBox(Do.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,mu,Bt.ID)),Ui&&Ys&&me.collisionIndex.insertCollisionBox(Ys.box,$e.get("icon-ignore-placement"),Le.bucketInstanceId,kp,Bt.ID),Ms&&(Si&&me.collisionIndex.insertCollisionCircles(Ms.circles,$e.get("text-ignore-placement"),Le.bucketInstanceId,mu,Bt.ID),te)){var Pv=Le.bucketInstanceId,nv=me.collisionCircleArrays[Pv];nv===void 0&&(nv=me.collisionCircleArrays[Pv]=new jn);for(var ov=0;ov<Ms.circles.length;ov+=4)nv.circles.push(Ms.circles[ov+0]),nv.circles.push(Ms.circles[ov+1]),nv.circles.push(Ms.circles[ov+2]),nv.circles.push(Ms.collisionDetected?1:0)}me.placements[ui.crossTileID]=new uo(Si||Dr,Ui||Jr,fn||Le.justReloaded),_e[ui.crossTileID]=!0}};if(Vt)for(var vi=Le.getSortedSymbolIndexes(this.transform.angle),Ga=vi.length-1;Ga>=0;--Ga){var ai=vi[Ga];ga(Le.symbolInstances.get(ai),Le.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi<K.symbolInstanceEnd;Zi++)ga(Le.symbolInstances.get(Zi),Le.collisionArrays[Zi]);if(te&&Le.bucketInstanceId in this.collisionCircleArrays){var Fi=this.collisionCircleArrays[Le.bucketInstanceId];e.invert(Fi.invProjMatrix,gt),Fi.viewportMatrix=this.collisionIndex.getViewportMatrix()}Le.justReloaded=!1},Xo.prototype.markUsedJustification=function(K,_e,te,me){var Ge={left:te.leftJustifiedTextSymbolIndex,center:te.centerJustifiedTextSymbolIndex,right:te.rightJustifiedTextSymbolIndex},Le;me===e.WritingMode.vertical?Le=te.verticalPlacedTextSymbolIndex:Le=Ge[e.getAnchorJustification(_e)];for(var $e=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex,te.verticalPlacedTextSymbolIndex],gt=0,jt=$e;gt<jt.length;gt+=1){var wr=jt[gt];wr>=0&&(Le>=0&&wr!==Le?K.text.placedSymbolArray.get(wr).crossTileID=0:K.text.placedSymbolArray.get(wr).crossTileID=te.crossTileID)}},Xo.prototype.markUsedOrientation=function(K,_e,te){for(var me=_e===e.WritingMode.horizontal||_e===e.WritingMode.horizontalOnly?_e:0,Ge=_e===e.WritingMode.vertical?_e:0,Le=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex],$e=0,gt=Le;$e<gt.length;$e+=1){var jt=gt[$e];K.text.placedSymbolArray.get(jt).placedOrientation=me}te.verticalPlacedTextSymbolIndex&&(K.text.placedSymbolArray.get(te.verticalPlacedTextSymbolIndex).placedOrientation=Ge)},Xo.prototype.commit=function(K){this.commitTime=K,this.zoomAtLastRecencyCheck=this.transform.zoom;var _e=this.prevPlacement,te=!1;this.prevZoomAdjustment=_e?_e.zoomAdjustment(this.transform.zoom):0;var me=_e?_e.symbolFadeChange(K):1,Ge=_e?_e.opacities:{},Le=_e?_e.variableOffsets:{},$e=_e?_e.placedOrientations:{};for(var gt in this.placements){var jt=this.placements[gt],wr=Ge[gt];wr?(this.opacities[gt]=new ss(wr,me,jt.text,jt.icon),te=te||jt.text!==wr.text.placed||jt.icon!==wr.icon.placed):(this.opacities[gt]=new ss(null,me,jt.text,jt.icon,jt.skipFade),te=te||jt.text||jt.icon)}for(var Nr in Ge){var pr=Ge[Nr];if(!this.opacities[Nr]){var yt=new ss(pr,me,!1,!1);yt.isHidden()||(this.opacities[Nr]=yt,te=te||pr.text.placed||pr.icon.placed)}}for(var kt in Le)!this.variableOffsets[kt]&&this.opacities[kt]&&!this.opacities[kt].isHidden()&&(this.variableOffsets[kt]=Le[kt]);for(var Bt in $e)!this.placedOrientations[Bt]&&this.opacities[Bt]&&!this.opacities[Bt].isHidden()&&(this.placedOrientations[Bt]=$e[Bt]);te?this.lastPlacementChangeTime=K:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=_e?_e.lastPlacementChangeTime:K)},Xo.prototype.updateLayerOpacities=function(K,_e){for(var te={},me=0,Ge=_e;me<Ge.length;me+=1){var Le=Ge[me],$e=Le.getBucket(K);$e&&Le.latestFeatureIndex&&K.id===$e.layerIds[0]&&this.updateBucketOpacities($e,te,Le.collisionBoxArray)}},Xo.prototype.updateBucketOpacities=function(K,_e,te){var me=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 Ge=K.layers[0].layout,Le=new ss(null,0,!1,!1,!0),$e=Ge.get("text-allow-overlap"),gt=Ge.get("icon-allow-overlap"),jt=Ge.get("text-variable-anchor"),wr=Ge.get("text-rotation-alignment")==="map",Nr=Ge.get("text-pitch-alignment")==="map",pr=Ge.get("icon-text-fit")!=="none",yt=new ss(null,0,$e&&(gt||!K.hasIconData()||Ge.get("icon-optional")),gt&&($e||!K.hasTextData()||Ge.get("text-optional")),!0);!K.collisionArrays&&te&&(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData())&&K.deserializeCollisionBoxes(te);for(var kt=function(lr,dr,ur){for(var Ht=0;Ht<dr/4;Ht++)lr.opacityVertexArray.emplaceBack(ur)},Bt=function(lr){var dr=K.symbolInstances.get(lr),ur=dr.numHorizontalGlyphVertices,Ht=dr.numVerticalGlyphVertices,sr=dr.crossTileID,Vt=_e[sr],Dr=me.opacities[sr];Vt?Dr=Le:Dr||(Dr=yt,me.opacities[sr]=Dr),_e[sr]=!0;var Jr=ur>0||Ht>0,ga=dr.numIconVertices>0,vi=me.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?xn:Zi;kt(K.text,ur,Fi);var ui=ai?xn:Zi;kt(K.text,Ht,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=me.variableOffsets[dr.crossTileID];Si&&me.markUsedJustification(K,Si.anchor,dr,vi);var Ui=me.placedOrientations[dr.crossTileID];Ui&&(me.markUsedJustification(K,"left",dr,Ui),me.markUsedOrientation(K,Ui,dr))}if(ga){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Bo=_o?fn:xn;kt(K.icon,dr.numIconVertices,Bo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ps=_o?xn:fn;kt(K.icon,dr.numVerticalIconVertices,Ps),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Do=K.collisionArrays[lr];if(Do){var Ms=new e.Point(0,0);if(Do.textBox||Do.verticalTextBox){var Ys=!0;if(jt){var mu=me.variableOffsets[sr];mu?(Ms=Cs(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),wr&&Ms._rotate(Nr?me.transform.angle:-me.transform.angle)):Ys=!1}Do.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Ms.x,Ms.y),Do.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ai,Ms.x,Ms.y)}var Ep=!!(!ai&&Do.verticalIconBox);Do.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Ms.x:0,pr?Ms.y:0),Do.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Ms.x:0,pr?Ms.y:0)}}},nr=0;nr<K.symbolInstances.length;nr++)Bt(nr);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,_e){var te=this.zoomAtLastRecencyCheck===_e?1-this.zoomAdjustment(_e):1;return this.zoomAtLastRecencyCheck=_e,this.commitTime+this.fadeDuration*te>K},Xo.prototype.setStale=function(){this.stale=!0};function Gi(ve,K,_e,te,me){ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0)}var Ln=Math.pow(2,25),Us=Math.pow(2,24),_s=Math.pow(2,17),Gn=Math.pow(2,16),zs=Math.pow(2,9),vs=Math.pow(2,8),Ws=Math.pow(2,1);function il(ve){if(ve.opacity===0&&!ve.placed)return 0;if(ve.opacity===1&&ve.placed)return 4294967295;var K=ve.placed?1:0,_e=Math.floor(ve.opacity*127);return _e*Ln+K*Us+_e*_s+K*Gn+_e*zs+K*vs+_e*Ws+K}var xn=0,ko=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=[]};ko.prototype.continuePlacement=function(K,_e,te,me,Ge){for(var Le=this._bucketParts;this._currentTileIndex<K.length;){var $e=K[this._currentTileIndex];if(_e.getBucketParts(Le,me,$e,this._sortAcrossTiles),this._currentTileIndex++,Ge())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Le.sort(function(jt,wr){return jt.sortKey-wr.sortKey}));this._currentPartIndex<Le.length;){var gt=Le[this._currentPartIndex];if(_e.placeLayerBucketPart(gt,this._seenCrossTileIDs,te),this._currentPartIndex++,Ge())return!0}return!1};var bo=function(K,_e,te,me,Ge,Le,$e){this.placement=new Xo(K,Ge,Le,$e),this._currentPlacementIndex=_e.length-1,this._forceFullPlacement=te,this._showCollisionBoxes=me,this._done=!1};bo.prototype.isDone=function(){return this._done},bo.prototype.continuePlacement=function(K,_e,te){for(var me=this,Ge=e.browser.now(),Le=function(){var Nr=e.browser.now()-Ge;return me._forceFullPlacement?!1:Nr>2};this._currentPlacementIndex>=0;){var $e=K[this._currentPlacementIndex],gt=_e[$e],jt=this.placement.collisionIndex.transform.zoom;if(gt.type==="symbol"&&(!gt.minzoom||gt.minzoom<=jt)&&(!gt.maxzoom||gt.maxzoom>jt)){this._inProgressLayer||(this._inProgressLayer=new ko(gt));var wr=this._inProgressLayer.continuePlacement(te[gt.source],this.placement,this._showCollisionBoxes,gt,Le);if(wr)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},bo.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Is=512/e.EXTENT/2,pu=function(K,_e,te){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=te;for(var me=0;me<_e.length;me++){var Ge=_e.get(me),Le=Ge.key;this.indexedSymbolInstances[Le]||(this.indexedSymbolInstances[Le]=[]),this.indexedSymbolInstances[Le].push({crossTileID:Ge.crossTileID,coord:this.getScaledCoordinates(Ge,K)})}};pu.prototype.getScaledCoordinates=function(K,_e){var te=_e.canonical.z-this.tileID.canonical.z,me=Is/Math.pow(2,te);return{x:Math.floor((_e.canonical.x*e.EXTENT+K.anchorX)*me),y:Math.floor((_e.canonical.y*e.EXTENT+K.anchorY)*me)}},pu.prototype.findMatches=function(K,_e,te){for(var me=this.tileID.canonical.z<_e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-_e.canonical.z),Ge=0;Ge<K.length;Ge++){var Le=K.get(Ge);if(!Le.crossTileID){var $e=this.indexedSymbolInstances[Le.key];if($e)for(var gt=this.getScaledCoordinates(Le,_e),jt=0,wr=$e;jt<wr.length;jt+=1){var Nr=wr[jt];if(Math.abs(Nr.coord.x-gt.x)<=me&&Math.abs(Nr.coord.y-gt.y)<=me&&!te[Nr.crossTileID]){te[Nr.crossTileID]=!0,Le.crossTileID=Nr.crossTileID;break}}}}};var co=function(){this.maxCrossTileID=0};co.prototype.generate=function(){return++this.maxCrossTileID};var Vs=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Vs.prototype.handleWrapJump=function(K){var _e=Math.round((K-this.lng)/360);if(_e!==0)for(var te in this.indexes){var me=this.indexes[te],Ge={};for(var Le in me){var $e=me[Le];$e.tileID=$e.tileID.unwrapTo($e.tileID.wrap+_e),Ge[$e.tileID.key]=$e}this.indexes[te]=Ge}this.lng=K},Vs.prototype.addBucket=function(K,_e,te){if(this.indexes[K.overscaledZ]&&this.indexes[K.overscaledZ][K.key]){if(this.indexes[K.overscaledZ][K.key].bucketInstanceId===_e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(K.overscaledZ,this.indexes[K.overscaledZ][K.key])}for(var me=0;me<_e.symbolInstances.length;me++){var Ge=_e.symbolInstances.get(me);Ge.crossTileID=0}this.usedCrossTileIDs[K.overscaledZ]||(this.usedCrossTileIDs[K.overscaledZ]={});var Le=this.usedCrossTileIDs[K.overscaledZ];for(var $e in this.indexes){var gt=this.indexes[$e];if(Number($e)>K.overscaledZ)for(var jt in gt){var wr=gt[jt];wr.tileID.isChildOf(K)&&wr.findMatches(_e.symbolInstances,K,Le)}else{var Nr=K.scaledTo(Number($e)),pr=gt[Nr.key];pr&&pr.findMatches(_e.symbolInstances,K,Le)}}for(var yt=0;yt<_e.symbolInstances.length;yt++){var kt=_e.symbolInstances.get(yt);kt.crossTileID||(kt.crossTileID=te.generate(),Le[kt.crossTileID]=!0)}return this.indexes[K.overscaledZ]===void 0&&(this.indexes[K.overscaledZ]={}),this.indexes[K.overscaledZ][K.key]=new pu(K,_e.symbolInstances,_e.bucketInstanceId),!0},Vs.prototype.removeBucketCrossTileIDs=function(K,_e){for(var te in _e.indexedSymbolInstances)for(var me=0,Ge=_e.indexedSymbolInstances[te];me<Ge.length;me+=1){var Le=Ge[me];delete this.usedCrossTileIDs[K][Le.crossTileID]}},Vs.prototype.removeStaleBuckets=function(K){var _e=!1;for(var te in this.indexes){var me=this.indexes[te];for(var Ge in me)K[me[Ge].bucketInstanceId]||(this.removeBucketCrossTileIDs(te,me[Ge]),delete me[Ge],_e=!0)}return _e};var vl=function(){this.layerIndexes={},this.crossTileIDs=new co,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};vl.prototype.addLayer=function(K,_e,te){var me=this.layerIndexes[K.id];me===void 0&&(me=this.layerIndexes[K.id]=new Vs);var Ge=!1,Le={};me.handleWrapJump(te);for(var $e=0,gt=_e;$e<gt.length;$e+=1){var jt=gt[$e],wr=jt.getBucket(K);!wr||K.id!==wr.layerIds[0]||(wr.bucketInstanceId||(wr.bucketInstanceId=++this.maxBucketInstanceId),me.addBucket(jt.tileID,wr,this.crossTileIDs)&&(Ge=!0),Le[wr.bucketInstanceId]=!0)}return me.removeStaleBuckets(Le)&&(Ge=!0),Ge},vl.prototype.pruneUnusedLayers=function(K){var _e={};K.forEach(function(me){_e[me]=!0});for(var te in this.layerIndexes)_e[te]||delete this.layerIndexes[te]};var Ts=function(ve,K){return e.emitValidationErrors(ve,K&&K.filter(function(_e){return _e.identifier!=="source.canvas"}))},js=e.pick(Cr,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),us=e.pick(Cr,["setCenter","setZoom","setBearing","setPitch"]),As=Br(),Nl=function(ve){function K(_e,te){var me=this;te===void 0&&(te={}),ve.call(this),this.map=_e,this.dispatcher=new N(tn(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new y(_e._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 Ge=this;this._rtlTextPluginCallback=K.registerForPluginStateChange(function(Le){var $e={pluginStatus:Le.pluginStatus,pluginURL:Le.pluginURL};Ge.dispatcher.broadcast("syncRTLPluginState",$e,function(gt,jt){if(e.triggerPluginCompletionEvent(gt),jt){var wr=jt.every(function(pr){return pr});if(wr)for(var Nr in Ge.sourceCaches)Ge.sourceCaches[Nr].reload()}})}),this.on("data",function(Le){if(!(Le.dataType!=="source"||Le.sourceDataType!=="metadata")){var $e=me.sourceCaches[Le.sourceId];if($e){var gt=$e.getSource();if(!(!gt||!gt.vectorLayerIds))for(var jt in me._layers){var wr=me._layers[jt];wr.source===gt.id&&me._validateLayer(wr)}}}})}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.loadURL=function(te,me){var Ge=this;me===void 0&&(me={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var Le=typeof me.validate=="boolean"?me.validate:!e.isMapboxURL(te);te=this.map._requestManager.normalizeStyleURL(te,me.accessToken);var $e=this.map._requestManager.transformRequest(te,e.ResourceType.Style);this._request=e.getJSON($e,function(gt,jt){Ge._request=null,gt?Ge.fire(new e.ErrorEvent(gt)):jt&&Ge._load(jt,Le)})},K.prototype.loadJSON=function(te,me){var Ge=this;me===void 0&&(me={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame(function(){Ge._request=null,Ge._load(te,me.validate!==!1)})},K.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(As,!1)},K.prototype._load=function(te,me){if(!(me&&Ts(this,e.validateStyle(te)))){this._loaded=!0,this.stylesheet=te;for(var Ge in te.sources)this.addSource(Ge,te.sources[Ge],{validate:!1});te.sprite?this._loadSprite(te.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(te.glyphs);var Le=ut(this.stylesheet.layers);this._order=Le.map(function(wr){return wr.id}),this._layers={},this._serializedLayers={};for(var $e=0,gt=Le;$e<gt.length;$e+=1){var jt=gt[$e];jt=e.createStyleLayer(jt),jt.setEventedParent(this,{layer:{id:jt.id}}),this._layers[jt.id]=jt,this._serializedLayers[jt.id]=jt.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 me=this;this._spriteRequest=p(te,this.map._requestManager,function(Ge,Le){if(me._spriteRequest=null,Ge)me.fire(new e.ErrorEvent(Ge));else if(Le)for(var $e in Le)me.imageManager.addImage($e,Le[$e]);me.imageManager.setLoaded(!0),me._availableImages=me.imageManager.listImages(),me.dispatcher.broadcast("setImages",me._availableImages),me.fire(new e.Event("data",{dataType:"style"}))})},K.prototype._validateLayer=function(te){var me=this.sourceCaches[te.source];if(me){var Ge=te.sourceLayer;if(Ge){var Le=me.getSource();(Le.type==="geojson"||Le.vectorLayerIds&&Le.vectorLayerIds.indexOf(Ge)===-1)&&this.fire(new e.ErrorEvent(new Error('Source layer "'+Ge+'" does not exist on source "'+Le.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 me=[],Ge=0,Le=te;Ge<Le.length;Ge+=1){var $e=Le[Ge],gt=this._layers[$e];gt.type!=="custom"&&me.push(gt.serialize())}return me},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 me in this._layers)if(this._layers[me].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 me=this._changed;if(this._changed){var Ge=Object.keys(this._updatedLayers),Le=Object.keys(this._removedLayers);(Ge.length||Le.length)&&this._updateWorkerLayers(Ge,Le);for(var $e in this._updatedSources){var gt=this._updatedSources[$e];gt==="reload"?this._reloadSource($e):gt==="clear"&&this._clearSource($e)}this._updateTilesForChangedImages();for(var jt in this._updatedPaintProps)this._layers[jt].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 yt=0,kt=this._order;yt<kt.length;yt+=1){var Bt=kt[yt],nr=this._layers[Bt];nr.recalculate(te,this._availableImages),!nr.isHidden(te.zoom)&&nr.source&&(this.sourceCaches[nr.source].used=!0)}for(var hr in wr){var lr=this.sourceCaches[hr];wr[hr]!==lr.used&&lr.fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:hr}))}this.light.recalculate(te),this.z=te.zoom,me&&this.fire(new e.Event("data",{dataType:"style"}))}},K.prototype._updateTilesForChangedImages=function(){var te=Object.keys(this._changedImages);if(te.length){for(var me in this.sourceCaches)this.sourceCaches[me].reloadTilesForDependencies(["icons","patterns"],te);this._changedImages={}}},K.prototype._updateWorkerLayers=function(te,me){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(te),removedIds:me})},K.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},K.prototype.setState=function(te){var me=this;if(this._checkLoaded(),Ts(this,e.validateStyle(te)))return!1;te=e.clone$1(te),te.layers=ut(te.layers);var Ge=Pa(this.serialize(),te).filter(function($e){return!($e.command in us)});if(Ge.length===0)return!1;var Le=Ge.filter(function($e){return!($e.command in js)});if(Le.length>0)throw new Error("Unimplemented: "+Le.map(function($e){return $e.command}).join(", ")+".");return Ge.forEach(function($e){$e.command!=="setTransition"&&me[$e.command].apply(me,$e.args)}),this.stylesheet=te,!0},K.prototype.addImage=function(te,me){if(this.getImage(te))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(te,me),this._afterImageUpdated(te)},K.prototype.updateImage=function(te,me){this.imageManager.updateImage(te,me)},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,me,Ge){var Le=this;if(Ge===void 0&&(Ge={}),this._checkLoaded(),this.sourceCaches[te]!==void 0)throw new Error("There is already a source with this ID");if(!me.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(me).join(", ")+".");var $e=["vector","raster","geojson","video","image"],gt=$e.indexOf(me.type)>=0;if(!(gt&&this._validate(e.validateStyle.source,"sources."+te,me,null,Ge))){this.map&&this.map._collectResourceTiming&&(me.collectResourceTiming=!0);var jt=this.sourceCaches[te]=new ra(te,me,this.dispatcher);jt.style=this,jt.setEventedParent(this,function(){return{isSourceLoaded:Le.loaded(),source:jt.serialize(),sourceId:te}}),jt.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 me in this._layers)if(this._layers[me].source===te)return this.fire(new e.ErrorEvent(new Error('Source "'+te+'" cannot be removed while layer "'+me+'" is using it.')));var Ge=this.sourceCaches[te];delete this.sourceCaches[te],delete this._updatedSources[te],Ge.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:te})),Ge.setEventedParent(null),Ge.clearTiles(),Ge.onRemove&&Ge.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(te,me){this._checkLoaded();var Ge=this.sourceCaches[te].getSource();Ge.setData(me),this._changed=!0},K.prototype.getSource=function(te){return this.sourceCaches[te]&&this.sourceCaches[te].getSource()},K.prototype.addLayer=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=te.id;if(this.getLayer(Le)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+Le+'" already exists on this map')));return}var $e;if(te.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(te)))return;$e=e.createStyleLayer(te)}else{if(typeof te.source=="object"&&(this.addSource(Le,te.source),te=e.clone$1(te),te=e.extend(te,{source:Le})),this._validate(e.validateStyle.layer,"layers."+Le,te,{arrayIndex:-1},Ge))return;$e=e.createStyleLayer(te),this._validateLayer($e),$e.setEventedParent(this,{layer:{id:Le}}),this._serializedLayers[$e.id]=$e.serialize()}var gt=me?this._order.indexOf(me):this._order.length;if(me&&gt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}if(this._order.splice(gt,0,Le),this._layerOrderChanged=!0,this._layers[Le]=$e,this._removedLayers[Le]&&$e.source&&$e.type!=="custom"){var jt=this._removedLayers[Le];delete this._removedLayers[Le],jt.type!==$e.type?this._updatedSources[$e.source]="clear":(this._updatedSources[$e.source]="reload",this.sourceCaches[$e.source].pause())}this._updateLayer($e),$e.onAdd&&$e.onAdd(this.map)},K.prototype.moveLayer=function(te,me){this._checkLoaded(),this._changed=!0;var Ge=this._layers[te];if(!Ge){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!==me){var Le=this._order.indexOf(te);this._order.splice(Le,1);var $e=me?this._order.indexOf(me):this._order.length;if(me&&$e===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}this._order.splice($e,0,te),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(te){this._checkLoaded();var me=this._layers[te];if(!me){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be removed.")));return}me.setEventedParent(null);var Ge=this._order.indexOf(te);this._order.splice(Ge,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[te]=me,delete this._layers[te],delete this._serializedLayers[te],delete this._updatedLayers[te],delete this._updatedPaintProps[te],me.onRemove&&me.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,me,Ge){this._checkLoaded();var Le=this.getLayer(te);if(!Le){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot have zoom extent.")));return}Le.minzoom===me&&Le.maxzoom===Ge||(me!=null&&(Le.minzoom=me),Ge!=null&&(Le.maxzoom=Ge),this._updateLayer(Le))},K.prototype.setFilter=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=this.getLayer(te);if(!Le){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(Le.filter,me)){if(me==null){Le.filter=void 0,this._updateLayer(Le);return}this._validate(e.validateStyle.filter,"layers."+Le.id+".filter",me,null,Ge)||(Le.filter=e.clone$1(me),this._updateLayer(Le))}},K.prototype.getFilter=function(te){return e.clone$1(this.getLayer(te).filter)},K.prototype.setLayoutProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){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($e.getLayoutProperty(me),Ge)||($e.setLayoutProperty(me,Ge,Le),this._updateLayer($e))},K.prototype.getLayoutProperty=function(te,me){var Ge=this.getLayer(te);if(!Ge){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style.")));return}return Ge.getLayoutProperty(me)},K.prototype.setPaintProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){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($e.getPaintProperty(me),Ge)){var gt=$e.setPaintProperty(me,Ge,Le);gt&&this._updateLayer($e),this._changed=!0,this._updatedPaintProps[te]=!0}},K.prototype.getPaintProperty=function(te,me){return this.getLayer(te).getPaintProperty(me)},K.prototype.setFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=te.sourceLayer,$e=this.sourceCaches[Ge];if($e===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var gt=$e.getSource().type;if(gt==="geojson"&&Le){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(gt==="vector"&&!Le){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."))),$e.setFeatureState(Le,te.id,me)},K.prototype.removeFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=this.sourceCaches[Ge];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var $e=Le.getSource().type,gt=$e==="vector"?te.sourceLayer:void 0;if($e==="vector"&&!gt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(me&&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}Le.removeFeatureState(gt,te.id,me)},K.prototype.getFeatureState=function(te){this._checkLoaded();var me=te.source,Ge=te.sourceLayer,Le=this.sourceCaches[me];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+me+"' does not exist in the map's style.")));return}var $e=Le.getSource().type;if($e==="vector"&&!Ge){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."))),Le.getFeatureState(Ge,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 me=this,Ge=function(ai){return me._layers[ai].type==="fill-extrusion"},Le={},$e=[],gt=this._order.length-1;gt>=0;gt--){var jt=this._order[gt];if(Ge(jt)){Le[jt]=gt;for(var wr=0,Nr=te;wr<Nr.length;wr+=1){var pr=Nr[wr],yt=pr[jt];if(yt)for(var kt=0,Bt=yt;kt<Bt.length;kt+=1){var nr=Bt[kt];$e.push(nr)}}}}$e.sort(function(ai,Zi){return Zi.intersectionZ-ai.intersectionZ});for(var hr=[],lr=this._order.length-1;lr>=0;lr--){var dr=this._order[lr];if(Ge(dr))for(var ur=$e.length-1;ur>=0;ur--){var Ht=$e[ur].feature;if(Le[Ht.layer.id]<lr)break;hr.push(Ht),$e.pop()}else for(var sr=0,Vt=te;sr<Vt.length;sr+=1){var Dr=Vt[sr],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,me,Ge){me&&me.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",me.filter,null,me);var Le={};if(me&&me.layers){if(!Array.isArray(me.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var $e=0,gt=me.layers;$e<gt.length;$e+=1){var jt=gt[$e],wr=this._layers[jt];if(!wr)return this.fire(new e.ErrorEvent(new Error("The layer '"+jt+"' does not exist in the map's style and cannot be queried for features."))),[];Le[wr.source]=!0}}var Nr=[];me.availableImages=this._availableImages;for(var pr in this.sourceCaches)me.layers&&!Le[pr]||Nr.push(re(this.sourceCaches[pr],this._layers,this._serializedLayers,te,me,Ge));return this.placement&&Nr.push(ce(this._layers,this._serializedLayers,this.sourceCaches,te,me,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Nr)},K.prototype.querySourceFeatures=function(te,me){me&&me.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",me.filter,null,me);var Ge=this.sourceCaches[te];return Ge?be(Ge,me):[]},K.prototype.addSourceType=function(te,me,Ge){if(K.getSourceType(te))return Ge(new Error('A source type called "'+te+'" already exists.'));if(K.setSourceType(te,me),!me.workerSourceURL)return Ge(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:te,url:me.workerSourceURL},Ge)},K.prototype.getLight=function(){return this.light.getLight()},K.prototype.setLight=function(te,me){me===void 0&&(me={}),this._checkLoaded();var Ge=this.light.getLight(),Le=!1;for(var $e in te)if(!e.deepEqual(te[$e],Ge[$e])){Le=!0;break}if(Le){var gt={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(te,me),this.light.updateTransitions(gt)}},K.prototype._validate=function(te,me,Ge,Le,$e){return $e===void 0&&($e={}),$e&&$e.validate===!1?!1:Ts(this,te.call(e.validateStyle,e.extend({key:me,style:this.serialize(),value:Ge,styleSpec:e.styleSpec},Le)))},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 me=this._layers[te];me.setEventedParent(null)}for(var Ge in this.sourceCaches)this.sourceCaches[Ge].clearTiles(),this.sourceCaches[Ge].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 me in this.sourceCaches)this.sourceCaches[me].update(te)},K.prototype._generateCollisionBoxes=function(){for(var te in this.sourceCaches)this._reloadSource(te)},K.prototype._updatePlacement=function(te,me,Ge,Le,$e){$e===void 0&&($e=!1);for(var gt=!1,jt=!1,wr={},Nr=0,pr=this._order;Nr<pr.length;Nr+=1){var yt=pr[Nr],kt=this._layers[yt];if(kt.type==="symbol"){if(!wr[kt.source]){var Bt=this.sourceCaches[kt.source];wr[kt.source]=Bt.getRenderableIds(!0).map(function(sr){return Bt.getTileByID(sr)}).sort(function(sr,Vt){return Vt.tileID.overscaledZ-sr.tileID.overscaledZ||(sr.tileID.isLessThan(Vt.tileID)?-1:1)})}var nr=this.crossTileSymbolIndex.addLayer(kt,wr[kt.source],te.center.lng);gt=gt||nr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$e=$e||this._layerOrderChanged||Ge===0,($e||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),te.zoom))&&(this.pauseablePlacement=new bo(te,this._order,$e,me,Ge,Le,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()),jt=!0),gt&&this.pauseablePlacement.placement.setStale()),jt||gt)for(var hr=0,lr=this._order;hr<lr.length;hr+=1){var dr=lr[hr],ur=this._layers[dr];ur.type==="symbol"&&this.placement.updateLayerOpacities(ur,wr[ur.source])}var Ht=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now());return Ht},K.prototype._releaseSymbolFadeTiles=function(){for(var te in this.sourceCaches)this.sourceCaches[te].releaseSymbolFadeTiles()},K.prototype.getImages=function(te,me,Ge){this.imageManager.getImages(me.icons,Ge),this._updateTilesForChangedImages();var Le=this.sourceCaches[me.source];Le&&Le.setDependencies(me.tileID.key,me.type,me.icons)},K.prototype.getGlyphs=function(te,me,Ge){this.glyphManager.getGlyphs(me.stacks,Ge)},K.prototype.getResource=function(te,me,Ge){return e.makeRequest(me,Ge)},K}(e.Evented);Nl.getSourceType=oe,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);}",Fs=`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
}`,xs="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;}",Xs="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);}",ns=`#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);}`,Es=`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);}`,Zs=`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(Fs,dc),ol=hl(Hc,lu),vc=hl(Pl,ic),yu=hl(Ou,nl),Tu=hl(ml,xs),El=hl(Xs,nc),qf=hl(Ul,qu),Qf=hl(fl,xh),Bu=hl(ns,bh),Ec=hl(Es,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(Zs,kf),_u=hl(fh,Uf),Pu=hl(Zc,$f),Cf=hl(Cu,jf);function hl(ve,K){var _e=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,te=K.match(/attribute ([\w]+) ([\w]+)/g),me=ve.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ge=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Le=Ge?Ge.concat(me):me,$e={};return ve=ve.replace(_e,function(gt,jt,wr,Nr,pr){return $e[pr]=!0,jt==="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(_e,function(gt,jt,wr,Nr,pr){var yt=Nr==="float"?"vec2":"vec4",kt=pr.match(/color/)?"color":yt;return $e[pr]?jt==="define"?`
#ifndef HAS_UNIFORM_u_`+pr+`
uniform lowp float u_`+pr+`_t;
attribute `+wr+" "+yt+" a_"+pr+`;
varying `+wr+" "+Nr+" "+pr+`;
#else
uniform `+wr+" "+Nr+" u_"+pr+`;
#endif
`:kt==="vec4"?`
#ifndef HAS_UNIFORM_u_`+pr+`
`+pr+" = a_"+pr+`;
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+pr+`
`+pr+" = unpack_mix_"+kt+"(a_"+pr+", u_"+pr+`_t);
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`:jt==="define"?`
#ifndef HAS_UNIFORM_u_`+pr+`
uniform lowp float u_`+pr+`_t;
attribute `+wr+" "+yt+" a_"+pr+`;
#else
uniform `+wr+" "+Nr+" u_"+pr+`;
#endif
`:kt==="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_"+kt+"(a_"+pr+", u_"+pr+`_t);
#else
`+wr+" "+Nr+" "+pr+" = u_"+pr+`;
#endif
`}),{fragmentSource:ve,vertexSource:K,staticAttributes:te,staticUniforms:Le}}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,_e,te,me,Ge,Le,$e,gt){this.context=K;for(var jt=this.boundPaintVertexBuffers.length!==me.length,wr=0;!jt&&wr<me.length;wr++)this.boundPaintVertexBuffers[wr]!==me[wr]&&(jt=!0);var Nr=!this.vao||this.boundProgram!==_e||this.boundLayoutVertexBuffer!==te||jt||this.boundIndexBuffer!==Ge||this.boundVertexOffset!==Le||this.boundDynamicVertexBuffer!==$e||this.boundDynamicVertexBuffer2!==gt;!K.extVertexArrayObject||Nr?this.freshBind(_e,te,me,Ge,Le,$e,gt):(K.bindVertexArrayOES.set(this.vao),$e&&$e.bind(),Ge&&Ge.dynamicDraw&&Ge.bind(),gt&&gt.bind())},kc.prototype.freshBind=function(K,_e,te,me,Ge,Le,$e){var gt,jt=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),gt=0,this.boundProgram=K,this.boundLayoutVertexBuffer=_e,this.boundPaintVertexBuffers=te,this.boundIndexBuffer=me,this.boundVertexOffset=Ge,this.boundDynamicVertexBuffer=Le,this.boundDynamicVertexBuffer2=$e;else{gt=wr.currentNumAttributes||0;for(var pr=jt;pr<gt;pr++)Nr.disableVertexAttribArray(pr)}_e.enableAttributes(Nr,K);for(var yt=0,kt=te;yt<kt.length;yt+=1){var Bt=kt[yt];Bt.enableAttributes(Nr,K)}Le&&Le.enableAttributes(Nr,K),$e&&$e.enableAttributes(Nr,K),_e.bind(),_e.setVertexAttribPointers(Nr,K,Ge);for(var nr=0,hr=te;nr<hr.length;nr+=1){var lr=hr[nr];lr.bind(),lr.setVertexAttribPointers(Nr,K,Ge)}Le&&(Le.bind(),Le.setVertexAttribPointers(Nr,K,Ge)),me&&me.bind(),$e&&($e.bind(),$e.setVertexAttribPointers(Nr,K,Ge)),wr.currentNumAttributes=jt},kc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Hu(ve){for(var K=[],_e=0;_e<ve.length;_e++)if(ve[_e]!==null){var te=ve[_e].split(" ");K.push(te.pop())}return K}var gf=function(K,_e,te,me,Ge,Le){var $e=K.gl;this.program=$e.createProgram();for(var gt=Hu(te.staticAttributes),jt=me?me.getBinderAttributes():[],wr=gt.concat(jt),Nr=te.staticUniforms?Hu(te.staticUniforms):[],pr=me?me.getBinderUniforms():[],yt=Nr.concat(pr),kt=[],Bt=0,nr=yt;Bt<nr.length;Bt+=1){var hr=nr[Bt];kt.indexOf(hr)<0&&kt.push(hr)}var lr=me?me.defines():[];Le&&lr.push("#define OVERDRAW_INSPECTOR;");var dr=lr.concat(yl.fragmentSource,te.fragmentSource).join(`
`),ur=lr.concat(yl.vertexSource,te.vertexSource).join(`
`),Ht=$e.createShader($e.FRAGMENT_SHADER);if($e.isContextLost()){this.failedToCreate=!0;return}$e.shaderSource(Ht,dr),$e.compileShader(Ht),$e.attachShader(this.program,Ht);var sr=$e.createShader($e.VERTEX_SHADER);if($e.isContextLost()){this.failedToCreate=!0;return}$e.shaderSource(sr,ur),$e.compileShader(sr),$e.attachShader(this.program,sr),this.attributes={};var Vt={};this.numAttributes=wr.length;for(var Dr=0;Dr<this.numAttributes;Dr++)wr[Dr]&&($e.bindAttribLocation(this.program,Dr,wr[Dr]),this.attributes[wr[Dr]]=Dr);$e.linkProgram(this.program),$e.deleteShader(sr),$e.deleteShader(Ht);for(var Jr=0;Jr<kt.length;Jr++){var ga=kt[Jr];if(ga&&!Vt[ga]){var vi=$e.getUniformLocation(this.program,ga);vi&&(Vt[ga]=vi)}}this.fixedUniforms=Ge(K,Vt),this.binderUniforms=me?me.getUniforms(K,Vt):[]};gf.prototype.draw=function(K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr,pr,yt,kt,Bt,nr){var hr,lr=K.gl;if(!this.failedToCreate){K.program.set(this.program),K.setDepthMode(te),K.setStencilMode(me),K.setColorMode(Ge),K.setCullFace(Le);for(var dr in this.fixedUniforms)this.fixedUniforms[dr].set($e[dr]);kt&&kt.setUniforms(K,this.binderUniforms,pr,{zoom:yt});for(var ur=(hr={},hr[lr.LINES]=2,hr[lr.TRIANGLES]=3,hr[lr.LINE_STRIP]=1,hr)[_e],Ht=0,sr=Nr.get();Ht<sr.length;Ht+=1){var Vt=sr[Ht],Dr=Vt.vaos||(Vt.vaos={}),Jr=Dr[gt]||(Dr[gt]=new kc);Jr.bind(K,this,jt,kt?kt.getPaintVertexBuffers():[],wr,Vt.vertexOffset,Bt,nr),lr.drawElements(_e,Vt.primitiveLength*ur,lr.UNSIGNED_SHORT,Vt.primitiveOffset*ur*2)}}};function Wu(ve,K,_e){var te=1/as(_e,1,K.transform.tileZoom),me=Math.pow(2,_e.tileID.overscaledZ),Ge=_e.tileSize*Math.pow(2,K.transform.tileZoom)/me,Le=Ge*(_e.tileID.canonical.x+_e.tileID.wrap*me),$e=Ge*_e.tileID.canonical.y;return{u_image:0,u_texsize:_e.imageAtlasTexture.size,u_scale:[te,ve.fromScale,ve.toScale],u_fade:ve.t,u_pixel_coord_upper:[Le>>16,$e>>16],u_pixel_coord_lower:[Le&65535,$e&65535]}}function Kc(ve,K,_e,te){var me=_e.imageManager.getPattern(ve.from.toString()),Ge=_e.imageManager.getPattern(ve.to.toString()),Le=_e.imageManager.getPixelSize(),$e=Le.width,gt=Le.height,jt=Math.pow(2,te.tileID.overscaledZ),wr=te.tileSize*Math.pow(2,_e.transform.tileZoom)/jt,Nr=wr*(te.tileID.canonical.x+te.tileID.wrap*jt),pr=wr*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:me.tl,u_pattern_br_a:me.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[$e,gt],u_mix:K.t,u_pattern_size_a:me.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/as(te,1,_e.transform.tileZoom),u_pixel_coord_upper:[Nr>>16,pr>>16],u_pixel_coord_lower:[Nr&65535,pr&65535]}}var Lf=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},iu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ve,K.u_height_factor),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Vf=function(ve,K,_e,te){var me=K.style.light,Ge=me.properties.get("position"),Le=[Ge.x,Ge.y,Ge.z],$e=e.create$1();me.properties.get("anchor")==="viewport"&&e.fromRotation($e,-K.transform.angle),e.transformMat3(Le,Le,$e);var gt=me.properties.get("color");return{u_matrix:ve,u_lightpos:Le,u_lightintensity:me.properties.get("intensity"),u_lightcolor:[gt.r,gt.g,gt.b],u_vertical_gradient:+_e,u_opacity:te}},Xu=function(ve,K,_e,te,me,Ge,Le){return e.extend(Vf(ve,K,_e,te),Wu(Ge,K,Le),{u_height_factor:-Math.pow(2,me.overscaledZ)/Le.tileSize/8})},Cc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},gc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},ql=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world)}},xu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},Lc=function(ve){return{u_matrix:ve}},Jc=function(ve,K,_e,te){return e.extend(Lc(ve),Wu(_e,K,te))},sc=function(ve,K){return{u_matrix:ve,u_world:K}},Pc=function(ve,K,_e,te,me){return e.extend(Jc(ve,K,_e,te),{u_world:me})},Qt=function(ve,K){return{u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ve,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},br=function(ve,K,_e,te){var me=ve.transform,Ge,Le;if(te.paint.get("circle-pitch-alignment")==="map"){var $e=as(_e,1,me.zoom);Ge=!0,Le=[$e,$e]}else Ge=!1,Le=me.pixelsToGLUnits;return{u_camera_to_center_distance:me.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ve.translatePosMatrix(K.posMatrix,_e,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ge,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:Le}},aa=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ve,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ve,K.u_overscale_factor)}},$r=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ve,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ve,K.u_viewport_size)}},ka=function(ve,K,_e){var te=as(_e,1,K.zoom),me=Math.pow(2,K.zoom-_e.tileID.overscaledZ),Ge=_e.tileID.overscaleFactor();return{u_matrix:ve,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[K.pixelsToGLUnits[0]/(te*me),K.pixelsToGLUnits[1]/(te*me)],u_overscale_factor:Ge}},li=function(ve,K,_e){return{u_matrix:ve,u_inv_matrix:K,u_camera_to_center_distance:_e.cameraToCenterDistance,u_viewport_size:[_e.width,_e.height]}},Ci=function(ve,K){return{u_color:new e.UniformColor(ve,K.u_color),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_overlay:new e.Uniform1i(ve,K.u_overlay),u_overlay_scale:new e.Uniform1f(ve,K.u_overlay_scale)}},Hi=function(ve,K,_e){return _e===void 0&&(_e=1),{u_matrix:ve,u_color:K,u_overlay:0,u_overlay_scale:_e}},Qi=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},dn=function(ve){return{u_matrix:ve}},Pi=function(ve,K){return{u_extrude_scale:new e.Uniform1f(ve,K.u_extrude_scale),u_intensity:new e.Uniform1f(ve,K.u_intensity),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},Di=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_color_ramp:new e.Uniform1i(ve,K.u_color_ramp),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Ni=function(ve,K,_e,te){return{u_matrix:ve,u_extrude_scale:as(K,1,_e),u_intensity:te}},mi=function(ve,K,_e,te){var me=e.create();e.ortho(me,0,ve.width,ve.height,0,0,1);var Ge=ve.context.gl;return{u_matrix:me,u_world:[Ge.drawingBufferWidth,Ge.drawingBufferHeight],u_image:_e,u_color_ramp:te,u_opacity:K.paint.get("heatmap-opacity")}},Mn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_latrange:new e.Uniform2f(ve,K.u_latrange),u_light:new e.Uniform2f(ve,K.u_light),u_shadow:new e.UniformColor(ve,K.u_shadow),u_highlight:new e.UniformColor(ve,K.u_highlight),u_accent:new e.UniformColor(ve,K.u_accent)}},Qn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_dimension:new e.Uniform2f(ve,K.u_dimension),u_zoom:new e.Uniform1f(ve,K.u_zoom),u_unpack:new e.Uniform4f(ve,K.u_unpack)}},ao=function(ve,K,_e){var te=_e.paint.get("hillshade-shadow-color"),me=_e.paint.get("hillshade-highlight-color"),Ge=_e.paint.get("hillshade-accent-color"),Le=_e.paint.get("hillshade-illumination-direction")*(Math.PI/180);_e.paint.get("hillshade-illumination-anchor")==="viewport"&&(Le-=ve.transform.angle);var $e=!ve.options.moving;return{u_matrix:ve.transform.calculatePosMatrix(K.tileID.toUnwrapped(),$e),u_image:0,u_latrange:fo(ve,K.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),Le],u_shadow:te,u_highlight:me,u_accent:Ge}},eo=function(ve,K){var _e=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:[_e,_e],u_zoom:ve.overscaledZ,u_unpack:K.getUnpackVector()}};function fo(ve,K){var _e=Math.pow(2,K.canonical.z),te=K.canonical.y;return[new e.MercatorCoordinate(0,te/_e).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/_e).toLngLat().lat]}var An=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels)}},un=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_image:new e.Uniform1i(ve,K.u_image),u_image_height:new e.Uniform1f(ve,K.u_image_height)}},yo=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ve,K.u_image),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},Ko=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ve,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ve,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ve,K.u_sdfgamma),u_image:new e.Uniform1i(ve,K.u_image),u_tex_y_a:new e.Uniform1f(ve,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ve,K.u_tex_y_b),u_mix:new e.Uniform1f(ve,K.u_mix)}},Ss=function(ve,K,_e){var te=ve.transform;return{u_matrix:Fl(ve,K,_e),u_ratio:1/as(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(ve,K,_e,te){return e.extend(Ss(ve,K,_e),{u_image:0,u_image_height:te})},Os=function(ve,K,_e,te){var me=ve.transform,Ge=bs(K,me);return{u_matrix:Fl(ve,K,_e),u_texsize:K.imageAtlasTexture.size,u_ratio:1/as(K,1,me.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ge,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/me.pixelsToGLUnits[0],1/me.pixelsToGLUnits[1]]}},el=function(ve,K,_e,te,me){var Ge=ve.transform,Le=ve.lineAtlas,$e=bs(K,Ge),gt=_e.layout.get("line-cap")==="round",jt=Le.getDash(te.from,gt),wr=Le.getDash(te.to,gt),Nr=jt.width*me.fromScale,pr=wr.width*me.toScale;return e.extend(Ss(ve,K,_e),{u_patternscale_a:[$e/Nr,-jt.height/2],u_patternscale_b:[$e/pr,-wr.height/2],u_sdfgamma:Le.width/(Math.min(Nr,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:jt.y,u_tex_y_b:wr.y,u_mix:me.t})};function bs(ve,K){return 1/as(ve,1,K.tileZoom)}function Fl(ve,K,_e){return ve.translatePosMatrix(K.tileID.posMatrix,K,_e.paint.get("line-translate"),_e.paint.get("line-translate-anchor"))}var _l=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_tl_parent:new e.Uniform2f(ve,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ve,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ve,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ve,K.u_fade_t),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image0:new e.Uniform1i(ve,K.u_image0),u_image1:new e.Uniform1i(ve,K.u_image1),u_brightness_low:new e.Uniform1f(ve,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ve,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ve,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ve,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ve,K.u_spin_weights)}},ll=function(ve,K,_e,te,me){return{u_matrix:ve,u_tl_parent:K,u_scale_parent:_e,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:Js(me.paint.get("raster-saturation")),u_contrast_factor:Lo(me.paint.get("raster-contrast")),u_spin_weights:Un(me.paint.get("raster-hue-rotate"))}};function Un(ve){ve*=Math.PI/180;var K=Math.sin(ve),_e=Math.cos(ve);return[(2*_e+1)/3,(-Math.sqrt(3)*K-_e+1)/3,(Math.sqrt(3)*K-_e+1)/3]}function Lo(ve){return ve>0?1/(1-ve):1+ve}function Js(ve){return ve>0?1-1/(1.001-ve):-ve}var Rs=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture)}},uu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},Iu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texsize_icon:new e.Uniform2f(ve,K.u_texsize_icon),u_texture:new e.Uniform1i(ve,K.u_texture),u_texture_icon:new e.Uniform1i(ve,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},Zu=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt){var wr=me.transform;return{u_is_size_zoom_constant:+(ve==="constant"||ve==="source"),u_is_size_feature_constant:+(ve==="constant"||ve==="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:+_e,u_aspect_ratio:wr.width/wr.height,u_fade_change:me.options.fadeDuration?me.symbolFadeChange:1,u_matrix:Ge,u_label_plane_matrix:Le,u_coord_matrix:$e,u_is_text:+gt,u_pitch_with_map:+te,u_texsize:jt,u_texture:0}},Ic=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr){var Nr=me.transform;return e.extend(Zu(ve,K,_e,te,me,Ge,Le,$e,gt,jt),{u_gamma_scale:te?Math.cos(Nr._pitch)*Nr.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+wr})},bu=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt){return e.extend(Ic(ve,K,_e,te,me,Ge,Le,$e,!0,gt,!0),{u_texsize_icon:jt,u_texture_icon:1})},Rc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_color:new e.UniformColor(ve,K.u_color)}},Au=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image:new e.Uniform1i(ve,K.u_image),u_pattern_tl_a:new e.Uniform2f(ve,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ve,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ve,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ve,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_mix:new e.Uniform1f(ve,K.u_mix),u_pattern_size_a:new e.Uniform2f(ve,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ve,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ve,K.u_scale_a),u_scale_b:new e.Uniform1f(ve,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ve,K.u_tile_units_to_pixels)}},yc=function(ve,K,_e){return{u_matrix:ve,u_opacity:K,u_color:_e}},ho=function(ve,K,_e,te,me,Ge){return e.extend(Kc(te,Ge,_e,me),{u_matrix:ve,u_opacity:K})},Ro={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:Mn,hillshadePrepare:Qn,line:An,lineGradient:un,linePattern:yo,lineSDF:Ko,raster:_l,symbolIcon:Rs,symbolSDF:uu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ve,K,_e,te,me,Ge,Le){for(var $e=ve.context,gt=$e.gl,jt=ve.useProgram("collisionBox"),wr=[],Nr=0,pr=0,yt=0;yt<te.length;yt++){var kt=te[yt],Bt=K.getTile(kt),nr=Bt.getBucket(_e);if(nr){var hr=kt.posMatrix;(me[0]!==0||me[1]!==0)&&(hr=ve.translatePosMatrix(kt.posMatrix,Bt,me,Ge));var lr=Le?nr.textCollisionBox:nr.iconCollisionBox,dr=nr.collisionCircleArray;if(dr.length>0){var ur=e.create(),Ht=hr;e.mul(ur,nr.placementInvProjMatrix,ve.transform.glCoordMatrix),e.mul(ur,ur,nr.placementViewportMatrix),wr.push({circleArray:dr,circleOffset:pr,transform:Ht,invTransform:ur}),Nr+=dr.length/4,pr=Nr}lr&&jt.draw($e,gt.LINES,Ia.disabled,Ca.disabled,ve.colorModeForRenderPass(),Fr.disabled,ka(hr,ve.transform,Bt),_e.id,lr.layoutVertexBuffer,lr.indexBuffer,lr.segments,null,ve.transform.zoom,null,null,lr.collisionVertexBuffer)}}if(!(!Le||!wr.length)){var sr=ve.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=$e.createIndexBuffer(Dc,!0),Ui=$e.createVertexBuffer(Vt,e.collisionCircleLayout.members,!0),fn=0,_o=wr;fn<_o.length;fn+=1){var Bo=_o[fn],Ps=li(Bo.transform,Bo.invTransform,ve.transform);sr.draw($e,gt.TRIANGLES,Ia.disabled,Ca.disabled,ve.colorModeForRenderPass(),Fr.disabled,Ps,_e.id,Ui,Si,e.SegmentVector.simpleSegment(0,Bo.circleOffset*2,Bo.circleArray.length,Bo.circleArray.length/2),null,ve.transform.zoom,null,null,null)}Ui.destroy(),Si.destroy()}}function Yu(ve){var K=ve*2,_e=new e.StructArrayLayout3ui6;_e.resize(K),_e._trim();for(var te=0;te<K;te++){var me=te*6;_e.uint16[me+0]=te*4+0,_e.uint16[me+1]=te*4+1,_e.uint16[me+2]=te*4+2,_e.uint16[me+3]=te*4+2,_e.uint16[me+4]=te*4+3,_e.uint16[me+5]=te*4+0}return _e}var Ue=e.identity(new Float32Array(16));function I(ve,K,_e,te,me){if(ve.renderPass==="translucent"){var Ge=Ca.disabled,Le=ve.colorModeForRenderPass(),$e=_e.layout.get("text-variable-anchor");$e&&we(te,ve,_e,K,_e.layout.get("text-rotation-alignment"),_e.layout.get("text-pitch-alignment"),me),_e.paint.get("icon-opacity").constantOr(1)!==0&&dt(ve,K,_e,te,!1,_e.paint.get("icon-translate"),_e.paint.get("icon-translate-anchor"),_e.layout.get("icon-rotation-alignment"),_e.layout.get("icon-pitch-alignment"),_e.layout.get("icon-keep-upright"),Ge,Le),_e.paint.get("text-opacity").constantOr(1)!==0&&dt(ve,K,_e,te,!0,_e.paint.get("text-translate"),_e.paint.get("text-translate-anchor"),_e.layout.get("text-rotation-alignment"),_e.layout.get("text-pitch-alignment"),_e.layout.get("text-keep-upright"),Ge,Le),K.map.showCollisionBoxes&&(lc(ve,K,_e,te,_e.paint.get("text-translate"),_e.paint.get("text-translate-anchor"),!0),lc(ve,K,_e,te,_e.paint.get("icon-translate"),_e.paint.get("icon-translate-anchor"),!1))}}function ie(ve,K,_e,te,me,Ge){var Le=e.getAnchorAlignment(ve),$e=Le.horizontalAlign,gt=Le.verticalAlign,jt=-($e-.5)*K,wr=-(gt-.5)*_e,Nr=e.evaluateVariableOffset(ve,te);return new e.Point((jt/me+Nr[0])*Ge,(wr/me+Nr[1])*Ge)}function we(ve,K,_e,te,me,Ge,Le){for(var $e=K.transform,gt=me==="map",jt=Ge==="map",wr=0,Nr=ve;wr<Nr.length;wr+=1){var pr=Nr[wr],yt=te.getTile(pr),kt=yt.getBucket(_e);if(!(!kt||!kt.text||!kt.text.segments.get().length)){var Bt=kt.textSizeData,nr=e.evaluateSizeForZoom(Bt,$e.zoom),hr=as(yt,1,K.transform.zoom),lr=Ta(pr.posMatrix,jt,gt,K.transform,hr),dr=_e.layout.get("icon-text-fit")!=="none"&&kt.hasIconData();if(nr){var ur=Math.pow(2,$e.zoom-yt.tileID.overscaledZ);Se(kt,gt,jt,Le,e.symbolSize,$e,lr,pr.posMatrix,ur,nr,dr)}}}}function Se(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr){var Nr=ve.text.placedSymbolArray,pr=ve.text.dynamicLayoutVertexArray,yt=ve.icon.dynamicLayoutVertexArray,kt={};pr.clear();for(var Bt=0;Bt<Nr.length;Bt++){var nr=Nr.get(Bt),hr=ve.allowVerticalPlacement&&!nr.placedOrientation,lr=!nr.hidden&&nr.crossTileID&&!hr?te[nr.crossTileID]:null;if(!lr)hs(nr.numGlyphs,pr);else{var dr=new e.Point(nr.anchorX,nr.anchorY),ur=ki(dr,_e?$e:Le),Ht=Ki(Ge.cameraToCenterDistance,ur.signedDistanceFromCamera),sr=me.evaluateSizeForFeature(ve.textSizeData,jt,nr)*Ht/e.ONE_EM;_e&&(sr*=ve.tilePixelRatio/gt);for(var Vt=lr.width,Dr=lr.height,Jr=lr.anchor,ga=lr.textOffset,vi=lr.textBoxScale,Ga=ie(Jr,Vt,Dr,ga,vi,sr),ai=_e?ki(dr.add(Ga),Le).point:ur.point.add(K?Ga.rotate(-Ge.angle):Ga),Zi=ve.allowVerticalPlacement&&nr.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Fi=0;Fi<nr.numGlyphs;Fi++)e.addDynamicAttributes(pr,ai,Zi);wr&&nr.associatedIconIndex>=0&&(kt[nr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(wr){yt.clear();for(var ui=ve.icon.placedSymbolArray,_i=0;_i<ui.length;_i++){var Si=ui.get(_i);if(Si.hidden)hs(Si.numGlyphs,yt);else{var Ui=kt[_i];if(!Ui)hs(Si.numGlyphs,yt);else for(var fn=0;fn<Si.numGlyphs;fn++)e.addDynamicAttributes(yt,Ui.shiftedAnchor,Ui.angle)}}ve.icon.dynamicLayoutVertexBuffer.updateData(yt)}ve.text.dynamicLayoutVertexBuffer.updateData(pr)}function Be(ve,K,_e){return _e.iconsInText&&K?"symbolTextAndIcon":ve?"symbolSDF":"symbolIcon"}function dt(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr){for(var pr=ve.context,yt=pr.gl,kt=ve.transform,Bt=$e==="map",nr=gt==="map",hr=Bt&&_e.layout.get("symbol-placement")!=="point",lr=Bt&&!nr&&!hr,dr=_e.layout.get("symbol-sort-key").constantOr(1)!==void 0,ur=!1,Ht=ve.depthModeForSublayer(0,Ia.ReadOnly),sr=_e.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(_e);if(Ga){var ai=me?Ga.text:Ga.icon;if(!(!ai||!ai.segments.get().length)){var Zi=ai.programConfigurations.get(_e.id),Fi=me||Ga.sdfIcons,ui=me?Ga.textSizeData:Ga.iconSizeData,_i=nr||kt.pitch!==0,Si=ve.useProgram(Be(Fi,me,Ga),Zi),Ui=e.evaluateSizeForZoom(ui,kt.zoom),fn=void 0,_o=[0,0],Bo=void 0,Ps=void 0,Do=null,Ms=void 0;if(me){if(Bo=vi.glyphAtlasTexture,Ps=yt.LINEAR,fn=vi.glyphAtlasTexture.size,Ga.iconsInText){_o=vi.imageAtlasTexture.size,Do=vi.imageAtlasTexture;var Ys=ui.kind==="composite"||ui.kind==="camera";Ms=_i||ve.options.rotating||ve.options.zooming||Ys?yt.LINEAR:yt.NEAREST}}else{var mu=_e.layout.get("icon-size").constantOr(0)!==1||Ga.iconsNeedLinear;Bo=vi.imageAtlasTexture,Ps=Fi||ve.options.rotating||ve.options.zooming||mu||_i?yt.LINEAR:yt.NEAREST,fn=vi.imageAtlasTexture.size}var Ep=as(vi,1,ve.transform.zoom),kp=Ta(ga.posMatrix,nr,Bt,ve.transform,Ep),Ph=Ai(ga.posMatrix,nr,Bt,ve.transform,Ep),qp=sr&&Ga.hasTextData(),qd=_e.layout.get("icon-text-fit")!=="none"&&qp&&Ga.hasIconData();hr&&Rn(Ga,ga.posMatrix,ve,me,kp,Ph,nr,jt);var ed=ve.translatePosMatrix(ga.posMatrix,vi,Ge,Le),Ih=hr||me&&sr||qd?Ue:kp,td=ve.translatePosMatrix(Ph,vi,Ge,Le,!0),Kh=Fi&&_e.paint.get(me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Rh=void 0;Fi?Ga.iconsInText?Rh=bu(ui.kind,Ui,lr,nr,ve,ed,Ih,td,fn,_o):Rh=Ic(ui.kind,Ui,lr,nr,ve,ed,Ih,td,me,fn,!0):Rh=Zu(ui.kind,Ui,lr,nr,ve,ed,Ih,td,me,fn);var Cp={program:Si,buffers:ai,uniformValues:Rh,atlasTexture:Bo,atlasTextureIcon:Do,atlasInterpolation:Ps,atlasInterpolationIcon:Ms,isSDF:Fi,hasHalo:Kh};if(dr&&Ga.canOverlap){ur=!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})}}}ur&&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(yt.TEXTURE0),ph.atlasTexture.bind(ph.atlasInterpolation,yt.CLAMP_TO_EDGE),ph.atlasTextureIcon&&(pr.activeTexture.set(yt.TEXTURE1),ph.atlasTextureIcon&&ph.atlasTextureIcon.bind(ph.atlasInterpolationIcon,yt.CLAMP_TO_EDGE)),ph.isSDF){var iv=ph.uniformValues;ph.hasHalo&&(iv.u_is_halo=1,St(ph.buffers,Lv.segments,_e,ve,ph.program,Ht,wr,Nr,iv)),iv.u_is_halo=0}St(ph.buffers,Lv.segments,_e,ve,ph.program,Ht,wr,Nr,ph.uniformValues)}}function St(ve,K,_e,te,me,Ge,Le,$e,gt){var jt=te.context,wr=jt.gl;me.draw(jt,wr.TRIANGLES,Ge,Le,$e,Fr.disabled,gt,_e.id,ve.layoutVertexBuffer,ve.indexBuffer,K,_e.paint,te.transform.zoom,ve.programConfigurations.get(_e.id),ve.dynamicLayoutVertexBuffer,ve.opacityVertexBuffer)}function Nt(ve,K,_e,te){if(ve.renderPass==="translucent"){var me=_e.paint.get("circle-opacity"),Ge=_e.paint.get("circle-stroke-width"),Le=_e.paint.get("circle-stroke-opacity"),$e=_e.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(me.constantOr(1)===0&&(Ge.constantOr(1)===0||Le.constantOr(1)===0))){for(var gt=ve.context,jt=gt.gl,wr=ve.depthModeForSublayer(0,Ia.ReadOnly),Nr=Ca.disabled,pr=ve.colorModeForRenderPass(),yt=[],kt=0;kt<te.length;kt++){var Bt=te[kt],nr=K.getTile(Bt),hr=nr.getBucket(_e);if(hr){var lr=hr.programConfigurations.get(_e.id),dr=ve.useProgram("circle",lr),ur=hr.layoutVertexBuffer,Ht=hr.indexBuffer,sr=br(ve,Bt,nr,_e),Vt={programConfiguration:lr,program:dr,layoutVertexBuffer:ur,indexBuffer:Ht,uniformValues:sr};if($e)for(var Dr=hr.segments.get(),Jr=0,ga=Dr;Jr<ga.length;Jr+=1){var vi=ga[Jr];yt.push({segments:new e.SegmentVector([vi]),sortKey:vi.sortKey,state:Vt})}else yt.push({segments:hr.segments,sortKey:0,state:Vt})}}$e&&yt.sort(function(Bo,Ps){return Bo.sortKey-Ps.sortKey});for(var Ga=0,ai=yt;Ga<ai.length;Ga+=1){var Zi=ai[Ga],Fi=Zi.state,ui=Fi.programConfiguration,_i=Fi.program,Si=Fi.layoutVertexBuffer,Ui=Fi.indexBuffer,fn=Fi.uniformValues,_o=Zi.segments;_i.draw(gt,jt.TRIANGLES,wr,Nr,pr,Fr.disabled,fn,_e.id,Si,Ui,_o,_e.paint,ve.transform.zoom,ui)}}}}function $t(ve,K,_e,te){if(_e.paint.get("heatmap-opacity")!==0)if(ve.renderPass==="offscreen"){var me=ve.context,Ge=me.gl,Le=Ca.disabled,$e=new Ft([Ge.ONE,Ge.ONE],e.Color.transparent,[!0,!0,!0,!0]);Tr(me,ve,_e),me.clear({color:e.Color.transparent});for(var gt=0;gt<te.length;gt++){var jt=te[gt];if(!K.hasRenderableParent(jt)){var wr=K.getTile(jt),Nr=wr.getBucket(_e);if(Nr){var pr=Nr.programConfigurations.get(_e.id),yt=ve.useProgram("heatmap",pr),kt=ve.transform,Bt=kt.zoom;yt.draw(me,Ge.TRIANGLES,Ia.disabled,Le,$e,Fr.disabled,Ni(jt.posMatrix,wr,Bt,_e.paint.get("heatmap-intensity")),_e.id,Nr.layoutVertexBuffer,Nr.indexBuffer,Nr.segments,_e.paint,ve.transform.zoom,pr)}}}me.viewport.set([0,0,ve.width,ve.height])}else ve.renderPass==="translucent"&&(ve.context.setColorMode(ve.colorModeForRenderPass()),Kr(ve,_e))}function Tr(ve,K,_e){var te=ve.gl;ve.activeTexture.set(te.TEXTURE1),ve.viewport.set([0,0,K.width/4,K.height/4]);var me=_e.heatmapFbo;if(me)te.bindTexture(te.TEXTURE_2D,me.colorAttachment.get()),ve.bindFramebuffer.set(me.framebuffer);else{var Ge=te.createTexture();te.bindTexture(te.TEXTURE_2D,Ge),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),me=_e.heatmapFbo=ve.createFramebuffer(K.width/4,K.height/4,!1),Ar(ve,K,Ge,me)}}function Ar(ve,K,_e,te){var me=ve.gl,Ge=ve.extRenderToTextureHalfFloat?ve.extTextureHalfFloat.HALF_FLOAT_OES:me.UNSIGNED_BYTE;me.texImage2D(me.TEXTURE_2D,0,me.RGBA,K.width/4,K.height/4,0,me.RGBA,Ge,null),te.colorAttachment.set(_e)}function Kr(ve,K){var _e=ve.context,te=_e.gl,me=K.heatmapFbo;if(me){_e.activeTexture.set(te.TEXTURE0),te.bindTexture(te.TEXTURE_2D,me.colorAttachment.get()),_e.activeTexture.set(te.TEXTURE1);var Ge=K.colorRampTexture;Ge||(Ge=K.colorRampTexture=new e.Texture(_e,K.colorRamp,te.RGBA)),Ge.bind(te.LINEAR,te.CLAMP_TO_EDGE),ve.useProgram("heatmapTexture").draw(_e,te.TRIANGLES,Ia.disabled,Ca.disabled,ve.colorModeForRenderPass(),Fr.disabled,mi(ve,K,0,1),K.id,ve.viewportBuffer,ve.quadTriangleIndexBuffer,ve.viewportSegments,K.paint,ve.transform.zoom)}}function na(ve,K,_e,te){if(ve.renderPass==="translucent"){var me=_e.paint.get("line-opacity"),Ge=_e.paint.get("line-width");if(!(me.constantOr(1)===0||Ge.constantOr(1)===0))for(var Le=ve.depthModeForSublayer(0,Ia.ReadOnly),$e=ve.colorModeForRenderPass(),gt=_e.paint.get("line-dasharray"),jt=_e.paint.get("line-pattern"),wr=jt.constantOr(1),Nr=_e.paint.get("line-gradient"),pr=_e.getCrossfadeParameters(),yt=wr?"linePattern":gt?"lineSDF":Nr?"lineGradient":"line",kt=ve.context,Bt=kt.gl,nr=!0,hr=0,lr=te;hr<lr.length;hr+=1){var dr=lr[hr],ur=K.getTile(dr);if(!(wr&&!ur.patternsLoaded())){var Ht=ur.getBucket(_e);if(Ht){var sr=Ht.programConfigurations.get(_e.id),Vt=ve.context.program.get(),Dr=ve.useProgram(yt,sr),Jr=nr||Dr.program!==Vt,ga=jt.constantOr(null);if(ga&&ur.imageAtlas){var vi=ur.imageAtlas,Ga=vi.patternPositions[ga.to.toString()],ai=vi.patternPositions[ga.from.toString()];Ga&&ai&&sr.setConstantPatternPositions(Ga,ai)}var Zi=wr?Os(ve,ur,_e,pr):gt?el(ve,ur,_e,gt,pr):Nr?rl(ve,ur,_e,Ht.lineClipsArray.length):Ss(ve,ur,_e);if(wr)kt.activeTexture.set(Bt.TEXTURE0),ur.imageAtlasTexture.bind(Bt.LINEAR,Bt.CLAMP_TO_EDGE),sr.updatePaintBuffers(pr);else if(gt&&(Jr||ve.lineAtlas.dirty))kt.activeTexture.set(Bt.TEXTURE0),ve.lineAtlas.bind(kt);else if(Nr){var Fi=Ht.gradients[_e.id],ui=Fi.texture;if(_e.gradientVersion!==Fi.version){var _i=256;if(_e.stepInterpolant){var Si=K.getSource().maxzoom,Ui=dr.canonical.z===Si?Math.ceil(1<<ve.transform.maxZoom-dr.canonical.z):1,fn=Ht.maxLineLength/e.EXTENT,_o=1024,Bo=fn*_o*Ui;_i=e.clamp(e.nextPowerOfTwo(Bo),256,kt.maxTextureSize)}Fi.gradient=e.renderColorRamp({expression:_e.gradientExpression(),evaluationKey:"lineProgress",resolution:_i,image:Fi.gradient||void 0,clips:Ht.lineClipsArray}),Fi.texture?Fi.texture.update(Fi.gradient):Fi.texture=new e.Texture(kt,Fi.gradient,Bt.RGBA),Fi.version=_e.gradientVersion,ui=Fi.texture}kt.activeTexture.set(Bt.TEXTURE0),ui.bind(_e.stepInterpolant?Bt.NEAREST:Bt.LINEAR,Bt.CLAMP_TO_EDGE)}Dr.draw(kt,Bt.TRIANGLES,Le,ve.stencilModeForClipping(dr),$e,Fr.disabled,Zi,_e.id,Ht.layoutVertexBuffer,Ht.indexBuffer,Ht.segments,_e.paint,ve.transform.zoom,sr,Ht.layoutVertexBuffer2),nr=!1}}}}}function He(ve,K,_e,te){var me=_e.paint.get("fill-color"),Ge=_e.paint.get("fill-opacity");if(Ge.constantOr(1)!==0){var Le=ve.colorModeForRenderPass(),$e=_e.paint.get("fill-pattern"),gt=ve.opaquePassEnabledForLayer()&&!$e.constantOr(1)&&me.constantOr(e.Color.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(ve.renderPass===gt){var jt=ve.depthModeForSublayer(1,ve.renderPass==="opaque"?Ia.ReadWrite:Ia.ReadOnly);Je(ve,K,_e,te,jt,Le,!1)}if(ve.renderPass==="translucent"&&_e.paint.get("fill-antialias")){var wr=ve.depthModeForSublayer(_e.getPaintProperty("fill-outline-color")?2:0,Ia.ReadOnly);Je(ve,K,_e,te,wr,Le,!0)}}}function Je(ve,K,_e,te,me,Ge,Le){var $e=ve.context.gl,gt=_e.paint.get("fill-pattern"),jt=gt&&gt.constantOr(1),wr=_e.getCrossfadeParameters(),Nr,pr,yt,kt,Bt;Le?(pr=jt&&!_e.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Nr=$e.LINES):(pr=jt?"fillPattern":"fill",Nr=$e.TRIANGLES);for(var nr=0,hr=te;nr<hr.length;nr+=1){var lr=hr[nr],dr=K.getTile(lr);if(!(jt&&!dr.patternsLoaded())){var ur=dr.getBucket(_e);if(ur){var Ht=ur.programConfigurations.get(_e.id),sr=ve.useProgram(pr,Ht);jt&&(ve.context.activeTexture.set($e.TEXTURE0),dr.imageAtlasTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE),Ht.updatePaintBuffers(wr));var Vt=gt.constantOr(null);if(Vt&&dr.imageAtlas){var Dr=dr.imageAtlas,Jr=Dr.patternPositions[Vt.to.toString()],ga=Dr.patternPositions[Vt.from.toString()];Jr&&ga&&Ht.setConstantPatternPositions(Jr,ga)}var vi=ve.translatePosMatrix(lr.posMatrix,dr,_e.paint.get("fill-translate"),_e.paint.get("fill-translate-anchor"));if(!Le)kt=ur.indexBuffer,Bt=ur.segments,yt=jt?Jc(vi,ve,wr,dr):Lc(vi);else{kt=ur.indexBuffer2,Bt=ur.segments2;var Ga=[$e.drawingBufferWidth,$e.drawingBufferHeight];yt=pr==="fillOutlinePattern"&&jt?Pc(vi,ve,wr,dr,Ga):sc(vi,Ga)}sr.draw(ve.context,Nr,me,ve.stencilModeForClipping(lr),Ge,Fr.disabled,yt,_e.id,ur.layoutVertexBuffer,kt,Bt,_e.paint,ve.transform.zoom,Ht)}}}}function lt(ve,K,_e,te){var me=_e.paint.get("fill-extrusion-opacity");if(me!==0&&ve.renderPass==="translucent"){var Ge=new Ia(ve.context.gl.LEQUAL,Ia.ReadWrite,ve.depthRangeFor3D);if(me===1&&!_e.paint.get("fill-extrusion-pattern").constantOr(1)){var Le=ve.colorModeForRenderPass();vt(ve,K,_e,te,Ge,Ca.disabled,Le)}else vt(ve,K,_e,te,Ge,Ca.disabled,Ft.disabled),vt(ve,K,_e,te,Ge,ve.stencilModeFor3D(),ve.colorModeForRenderPass())}}function vt(ve,K,_e,te,me,Ge,Le){for(var $e=ve.context,gt=$e.gl,jt=_e.paint.get("fill-extrusion-pattern"),wr=jt.constantOr(1),Nr=_e.getCrossfadeParameters(),pr=_e.paint.get("fill-extrusion-opacity"),yt=0,kt=te;yt<kt.length;yt+=1){var Bt=kt[yt],nr=K.getTile(Bt),hr=nr.getBucket(_e);if(hr){var lr=hr.programConfigurations.get(_e.id),dr=ve.useProgram(wr?"fillExtrusionPattern":"fillExtrusion",lr);wr&&(ve.context.activeTexture.set(gt.TEXTURE0),nr.imageAtlasTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE),lr.updatePaintBuffers(Nr));var ur=jt.constantOr(null);if(ur&&nr.imageAtlas){var Ht=nr.imageAtlas,sr=Ht.patternPositions[ur.to.toString()],Vt=Ht.patternPositions[ur.from.toString()];sr&&Vt&&lr.setConstantPatternPositions(sr,Vt)}var Dr=ve.translatePosMatrix(Bt.posMatrix,nr,_e.paint.get("fill-extrusion-translate"),_e.paint.get("fill-extrusion-translate-anchor")),Jr=_e.paint.get("fill-extrusion-vertical-gradient"),ga=wr?Xu(Dr,ve,Jr,pr,Bt,Nr,nr):Vf(Dr,ve,Jr,pr);dr.draw($e,$e.gl.TRIANGLES,me,Ge,Le,Fr.backCCW,ga,_e.id,hr.layoutVertexBuffer,hr.indexBuffer,hr.segments,_e.paint,ve.transform.zoom,lr)}}}function Lt(ve,K,_e,te){if(!(ve.renderPass!=="offscreen"&&ve.renderPass!=="translucent")){for(var me=ve.context,Ge=ve.depthModeForSublayer(0,Ia.ReadOnly),Le=ve.colorModeForRenderPass(),$e=ve.renderPass==="translucent"?ve.stencilConfigForOverlap(te):[{},te],gt=$e[0],jt=$e[1],wr=0,Nr=jt;wr<Nr.length;wr+=1){var pr=Nr[wr],yt=K.getTile(pr);yt.needsHillshadePrepare&&ve.renderPass==="offscreen"?zt(ve,yt,_e,Ge,Ca.disabled,Le):ve.renderPass==="translucent"&&At(ve,yt,_e,Ge,gt[pr.overscaledZ],Le)}me.viewport.set([0,0,ve.width,ve.height])}}function At(ve,K,_e,te,me,Ge){var Le=ve.context,$e=Le.gl,gt=K.fbo;if(gt){var jt=ve.useProgram("hillshade");Le.activeTexture.set($e.TEXTURE0),$e.bindTexture($e.TEXTURE_2D,gt.colorAttachment.get());var wr=ao(ve,K,_e);jt.draw(Le,$e.TRIANGLES,te,me,Ge,Fr.disabled,wr,_e.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function zt(ve,K,_e,te,me,Ge){var Le=ve.context,$e=Le.gl,gt=K.dem;if(gt&&gt.data){var jt=gt.dim,wr=gt.stride,Nr=gt.getPixels();if(Le.activeTexture.set($e.TEXTURE1),Le.pixelStoreUnpackPremultiplyAlpha.set(!1),K.demTexture=K.demTexture||ve.getTileTexture(wr),K.demTexture){var pr=K.demTexture;pr.update(Nr,{premultiply:!1}),pr.bind($e.NEAREST,$e.CLAMP_TO_EDGE)}else K.demTexture=new e.Texture(Le,Nr,$e.RGBA,{premultiply:!1}),K.demTexture.bind($e.NEAREST,$e.CLAMP_TO_EDGE);Le.activeTexture.set($e.TEXTURE0);var yt=K.fbo;if(!yt){var kt=new e.Texture(Le,{width:jt,height:jt,data:null},$e.RGBA);kt.bind($e.LINEAR,$e.CLAMP_TO_EDGE),yt=K.fbo=Le.createFramebuffer(jt,jt,!0),yt.colorAttachment.set(kt.texture)}Le.bindFramebuffer.set(yt.framebuffer),Le.viewport.set([0,0,jt,jt]),ve.useProgram("hillshadePrepare").draw(Le,$e.TRIANGLES,te,me,Ge,Fr.disabled,eo(K.tileID,gt),_e.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments),K.needsHillshadePrepare=!1}}function cr(ve,K,_e,te){if(ve.renderPass==="translucent"&&_e.paint.get("raster-opacity")!==0&&te.length)for(var me=ve.context,Ge=me.gl,Le=K.getSource(),$e=ve.useProgram("raster"),gt=ve.colorModeForRenderPass(),jt=Le instanceof le?[{},te]:ve.stencilConfigForOverlap(te),wr=jt[0],Nr=jt[1],pr=Nr[Nr.length-1].overscaledZ,yt=!ve.options.moving,kt=0,Bt=Nr;kt<Bt.length;kt+=1){var nr=Bt[kt],hr=ve.depthModeForSublayer(nr.overscaledZ-pr,_e.paint.get("raster-opacity")===1?Ia.ReadWrite:Ia.ReadOnly,Ge.LESS),lr=K.getTile(nr),dr=ve.transform.calculatePosMatrix(nr.toUnwrapped(),yt);lr.registerFadeDuration(_e.paint.get("raster-fade-duration"));var ur=K.findLoadedParent(nr,0),Ht=yr(lr,ur,K,_e,ve.transform),sr=void 0,Vt=void 0,Dr=_e.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;me.activeTexture.set(Ge.TEXTURE0),lr.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),me.activeTexture.set(Ge.TEXTURE1),ur?(ur.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),sr=Math.pow(2,ur.tileID.overscaledZ-lr.tileID.overscaledZ),Vt=[lr.tileID.canonical.x*sr%1,lr.tileID.canonical.y*sr%1]):lr.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST);var Jr=ll(dr,Vt||[0,0],sr||1,Ht,_e);Le instanceof le?$e.draw(me,Ge.TRIANGLES,hr,Ca.disabled,gt,Fr.disabled,Jr,_e.id,Le.boundsBuffer,ve.quadTriangleIndexBuffer,Le.boundsSegments):$e.draw(me,Ge.TRIANGLES,hr,wr[nr.overscaledZ],gt,Fr.disabled,Jr,_e.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function yr(ve,K,_e,te,me){var Ge=te.paint.get("raster-fade-duration");if(Ge>0){var Le=e.browser.now(),$e=(Le-ve.timeAdded)/Ge,gt=K?(Le-K.timeAdded)/Ge:-1,jt=_e.getSource(),wr=me.coveringZoomLevel({tileSize:jt.tileSize,roundZoom:jt.roundZoom}),Nr=!K||Math.abs(K.tileID.overscaledZ-wr)>Math.abs(ve.tileID.overscaledZ-wr),pr=Nr&&ve.refreshedUponExpiration?1:e.clamp(Nr?$e:1-gt,0,1);return ve.refreshedUponExpiration&&$e>=1&&(ve.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function Er(ve,K,_e){var te=_e.paint.get("background-color"),me=_e.paint.get("background-opacity");if(me!==0){var Ge=ve.context,Le=Ge.gl,$e=ve.transform,gt=$e.tileSize,jt=_e.paint.get("background-pattern");if(!ve.isPatternMissing(jt)){var wr=!jt&&te.a===1&&me===1&&ve.opaquePassEnabledForLayer()?"opaque":"translucent";if(ve.renderPass===wr){var Nr=Ca.disabled,pr=ve.depthModeForSublayer(0,wr==="opaque"?Ia.ReadWrite:Ia.ReadOnly),yt=ve.colorModeForRenderPass(),kt=ve.useProgram(jt?"backgroundPattern":"background"),Bt=$e.coveringTiles({tileSize:gt});jt&&(Ge.activeTexture.set(Le.TEXTURE0),ve.imageManager.bind(ve.context));for(var nr=_e.getCrossfadeParameters(),hr=0,lr=Bt;hr<lr.length;hr+=1){var dr=lr[hr],ur=ve.transform.calculatePosMatrix(dr.toUnwrapped()),Ht=jt?ho(ur,me,ve,jt,{tileID:dr,tileSize:gt},nr):yc(ur,me,te);kt.draw(Ge,Le.TRIANGLES,pr,Nr,yt,Fr.disabled,Ht,_e.id,ve.tileExtentBuffer,ve.quadTriangleIndexBuffer,ve.tileExtentSegments)}}}}}var jr=new e.Color(1,0,0,1),Qr=new e.Color(0,1,0,1),pa=new e.Color(0,0,1,1),Aa=new e.Color(1,0,1,1),za=new e.Color(0,1,1,1);function ci(ve){var K=ve.transform.padding,_e=3;ji(ve,ve.transform.height-(K.top||0),_e,jr),ji(ve,K.bottom||0,_e,Qr),nn(ve,K.left||0,_e,pa),nn(ve,ve.transform.width-(K.right||0),_e,Aa);var te=ve.transform.centerPoint;Vi(ve,te.x,ve.transform.height-te.y,za)}function Vi(ve,K,_e,te){var me=20,Ge=2;Sn(ve,K-Ge/2,_e-me/2,Ge,me,te),Sn(ve,K-me/2,_e-Ge/2,me,Ge,te)}function ji(ve,K,_e,te){Sn(ve,0,K+_e/2,ve.transform.width,_e,te)}function nn(ve,K,_e,te){Sn(ve,K-_e/2,0,_e,ve.transform.height,te)}function Sn(ve,K,_e,te,me,Ge){var Le=ve.context,$e=Le.gl;$e.enable($e.SCISSOR_TEST),$e.scissor(K*e.browser.devicePixelRatio,_e*e.browser.devicePixelRatio,te*e.browser.devicePixelRatio,me*e.browser.devicePixelRatio),Le.clear({color:Ge}),$e.disable($e.SCISSOR_TEST)}function Kn(ve,K,_e){for(var te=0;te<_e.length;te++)Bn(ve,K,_e[te])}function Bn(ve,K,_e){var te=ve.context,me=te.gl,Ge=_e.posMatrix,Le=ve.useProgram("debug"),$e=Ia.disabled,gt=Ca.disabled,jt=ve.colorModeForRenderPass(),wr="$debug";te.activeTexture.set(me.TEXTURE0),ve.emptyTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE),Le.draw(te,me.LINE_STRIP,$e,gt,jt,Fr.disabled,Hi(Ge,e.Color.red),wr,ve.debugBuffer,ve.tileBorderIndexBuffer,ve.debugSegments);var Nr=K.getTileByID(_e.key).latestRawTileData,pr=Nr&&Nr.byteLength||0,yt=Math.floor(pr/1024),kt=K.getTile(_e).tileSize,Bt=512/Math.min(kt,512)*(_e.overscaledZ/ve.transform.zoom)*.5,nr=_e.canonical.toString();_e.overscaledZ!==_e.canonical.z&&(nr+=" => "+_e.overscaledZ);var hr=nr+" "+yt+"kb";wo(ve,hr),Le.draw(te,me.TRIANGLES,$e,gt,Ft.alphaBlended,Fr.disabled,Hi(Ge,e.Color.transparent,Bt),wr,ve.debugBuffer,ve.quadTriangleIndexBuffer,ve.debugSegments)}function wo(ve,K){ve.initDebugOverlayCanvas();var _e=ve.debugOverlayCanvas,te=ve.context.gl,me=ve.debugOverlayCanvas.getContext("2d");me.clearRect(0,0,_e.width,_e.height),me.shadowColor="white",me.shadowBlur=2,me.lineWidth=1.5,me.strokeStyle="white",me.textBaseline="top",me.font="bold 36px Open Sans, sans-serif",me.fillText(K,5,5),me.strokeText(K,5,5),ve.debugOverlayTexture.update(_e),ve.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function is(ve,K,_e){var te=ve.context,me=_e.implementation;if(ve.renderPass==="offscreen"){var Ge=me.prerender;Ge&&(ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),Ge.call(me,te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState())}else if(ve.renderPass==="translucent"){ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),te.setStencilMode(Ca.disabled);var Le=me.renderingMode==="3d"?new Ia(ve.context.gl.LEQUAL,Ia.ReadWrite,ve.depthRangeFor3D):ve.depthModeForSublayer(0,Ia.ReadOnly);te.setDepthMode(Le),me.render(te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState(),te.bindFramebuffer.set(null)}}var Ao={symbol:I,circle:Nt,heatmap:$t,line:na,fill:He,"fill-extrusion":lt,hillshade:Lt,raster:cr,background:Er,debug:Kn,custom:is},Zo=function(K,_e){this.context=new ta(K),this.transform=_e,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,_e){if(this.width=K*e.browser.devicePixelRatio,this.height=_e*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,me=this.style._order;te<me.length;te+=1){var Ge=me[te];this.style._layers[Ge].resize()}},Zo.prototype.setup=function(){var K=this.context,_e=new e.StructArrayLayout2i4;_e.emplaceBack(0,0),_e.emplaceBack(e.EXTENT,0),_e.emplaceBack(0,e.EXTENT),_e.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=K.createVertexBuffer(_e,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 me=new e.StructArrayLayout4i8;me.emplaceBack(0,0,0,0),me.emplaceBack(e.EXTENT,0,e.EXTENT,0),me.emplaceBack(0,e.EXTENT,0,e.EXTENT),me.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=K.createVertexBuffer(me,se.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var Ge=new e.StructArrayLayout2i4;Ge.emplaceBack(0,0),Ge.emplaceBack(1,0),Ge.emplaceBack(0,1),Ge.emplaceBack(1,1),this.viewportBuffer=K.createVertexBuffer(Ge,su.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var Le=new e.StructArrayLayout1ui2;Le.emplaceBack(0),Le.emplaceBack(1),Le.emplaceBack(3),Le.emplaceBack(2),Le.emplaceBack(0),this.tileBorderIndexBuffer=K.createIndexBuffer(Le);var $e=new e.StructArrayLayout3ui6;$e.emplaceBack(0,1,2),$e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=K.createIndexBuffer($e),this.emptyTexture=new e.Texture(K,{width:1,height:1,data:new Uint8Array([0,0,0,0])},K.gl.RGBA);var gt=this.context.gl;this.stencilClearMode=new Ca({func:gt.ALWAYS,mask:0},0,255,gt.ZERO,gt.ZERO,gt.ZERO)},Zo.prototype.clearStencil=function(){var K=this.context,_e=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,[_e.drawingBufferWidth,_e.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(K,_e.TRIANGLES,Ia.disabled,this.stencilClearMode,Ft.disabled,Fr.disabled,dn(te),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Zo.prototype._renderTileClippingMasks=function(K,_e){if(!(this.currentStencilSource===K.source||!K.isTileClipped()||!_e||!_e.length)){this.currentStencilSource=K.source;var te=this.context,me=te.gl;this.nextStencilID+_e.length>256&&this.clearStencil(),te.setColorMode(Ft.disabled),te.setDepthMode(Ia.disabled);var Ge=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Le=0,$e=_e;Le<$e.length;Le+=1){var gt=$e[Le],jt=this._tileClippingMaskIDs[gt.key]=this.nextStencilID++;Ge.draw(te,me.TRIANGLES,Ia.disabled,new Ca({func:me.ALWAYS,mask:0},jt,255,me.KEEP,me.KEEP,me.REPLACE),Ft.disabled,Fr.disabled,dn(gt.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++,_e=this.context.gl;return new Ca({func:_e.NOTEQUAL,mask:255},K,255,_e.KEEP,_e.KEEP,_e.REPLACE)},Zo.prototype.stencilModeForClipping=function(K){var _e=this.context.gl;return new Ca({func:_e.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,_e.KEEP,_e.KEEP,_e.REPLACE)},Zo.prototype.stencilConfigForOverlap=function(K){var _e,te=this.context.gl,me=K.sort(function(jt,wr){return wr.overscaledZ-jt.overscaledZ}),Ge=me[me.length-1].overscaledZ,Le=me[0].overscaledZ-Ge+1;if(Le>1){this.currentStencilSource=void 0,this.nextStencilID+Le>256&&this.clearStencil();for(var $e={},gt=0;gt<Le;gt++)$e[gt+Ge]=new Ca({func:te.GEQUAL,mask:255},gt+this.nextStencilID,255,te.KEEP,te.KEEP,te.REPLACE);return this.nextStencilID+=Le,[$e,me]}return[(_e={},_e[Ge]=Ca.disabled,_e),me]},Zo.prototype.colorModeForRenderPass=function(){var K=this.context.gl;if(this._showOverdrawInspector){var _e=8,te=1/_e;return new Ft([K.CONSTANT_COLOR,K.ONE],new e.Color(te,te,te,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Ft.unblended:Ft.alphaBlended},Zo.prototype.depthModeForSublayer=function(K,_e,te){if(!this.opaquePassEnabledForLayer())return Ia.disabled;var me=1-((1+this.currentLayer)*this.numSublayers+K)*this.depthEpsilon;return new Ia(te||this.context.gl.LEQUAL,_e,[me,me])},Zo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Zo.prototype.render=function(K,_e){var te=this;this.style=K,this.options=_e,this.lineAtlas=K.lineAtlas,this.imageManager=K.imageManager,this.glyphManager=K.glyphManager,this.symbolFadeChange=K.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var me=this.style._order,Ge=this.style.sourceCaches;for(var Le in Ge){var $e=Ge[Le];$e.used&&$e.prepare(this.context)}var gt={},jt={},wr={};for(var Nr in Ge){var pr=Ge[Nr];gt[Nr]=pr.getVisibleCoordinates(),jt[Nr]=gt[Nr].slice().reverse(),wr[Nr]=pr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var yt=0;yt<me.length;yt++){var kt=me[yt];if(this.style._layers[kt].is3D()){this.opaquePassCutoff=yt;break}}this.renderPass="offscreen";for(var Bt=0,nr=me;Bt<nr.length;Bt+=1){var hr=nr[Bt],lr=this.style._layers[hr];if(!(!lr.hasOffscreenPass()||lr.isHidden(this.transform.zoom))){var dr=jt[lr.source];lr.type!=="custom"&&!dr.length||this.renderLayer(this,Ge[lr.source],lr,dr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:_e.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=_e.showOverdrawInspector,this.depthRangeFor3D=[0,1-(K._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=me.length-1;this.currentLayer>=0;this.currentLayer--){var ur=this.style._layers[me[this.currentLayer]],Ht=Ge[ur.source],sr=gt[ur.source];this._renderTileClippingMasks(ur,sr),this.renderLayer(this,Ht,ur,sr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<me.length;this.currentLayer++){var Vt=this.style._layers[me[this.currentLayer]],Dr=Ge[Vt.source],Jr=(Vt.type==="symbol"?wr:jt)[Vt.source];this._renderTileClippingMasks(Vt,gt[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&&Ao.debug(this,ga,ga.getVisibleCoordinates())}this.options.showPadding&&ci(this),this.context.setDefault()},Zo.prototype.renderLayer=function(K,_e,te,me){te.isHidden(this.transform.zoom)||te.type!=="background"&&te.type!=="custom"&&!me.length||(this.id=te.id,this.gpuTimingStart(te),Ao[te.type](K,_e,te,me,this.style.placement.variableOffsets),this.gpuTimingEnd())},Zo.prototype.gpuTimingStart=function(K){if(this.options.gpuTiming){var _e=this.context.extTimerQuery,te=this.gpuTimers[K.id];te||(te=this.gpuTimers[K.id]={calls:0,cpuTime:0,query:_e.createQueryEXT()}),te.calls++,_e.beginQueryEXT(_e.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 _e={};for(var te in K){var me=K[te],Ge=this.context.extTimerQuery,Le=Ge.getQueryObjectEXT(me.query,Ge.QUERY_RESULT_EXT)/(1e3*1e3);Ge.deleteQueryEXT(me.query),_e[te]=Le}return _e},Zo.prototype.translatePosMatrix=function(K,_e,te,me,Ge){if(!te[0]&&!te[1])return K;var Le=Ge?me==="map"?this.transform.angle:0:me==="viewport"?-this.transform.angle:0;if(Le){var $e=Math.sin(Le),gt=Math.cos(Le);te=[te[0]*gt-te[1]*$e,te[0]*$e+te[1]*gt]}var jt=[Ge?te[0]:as(_e,te[0],this.transform.zoom),Ge?te[1]:as(_e,te[1],this.transform.zoom),0],wr=new Float32Array(16);return e.translate(wr,K,jt),wr},Zo.prototype.saveTileTexture=function(K){var _e=this._tileTextures[K.size[0]];_e?_e.push(K):this._tileTextures[K.size[0]]=[K]},Zo.prototype.getTileTexture=function(K){var _e=this._tileTextures[K];return _e&&_e.length>0?_e.pop():null},Zo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var _e=this.imageManager.getPattern(K.from.toString()),te=this.imageManager.getPattern(K.to.toString());return!_e||!te},Zo.prototype.useProgram=function(K,_e){this.cache=this.cache||{};var te=""+K+(_e?_e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new gf(this.context,K,uf[K],_e,Ro[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 ps=function(K,_e){this.points=K,this.planes=_e};ps.fromInvProjectionMatrix=function(K,_e,te){var me=[[-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]],Ge=Math.pow(2,te),Le=me.map(function(jt){return e.transformMat4([],jt,K)}).map(function(jt){return e.scale$1([],jt,1/jt[3]/_e*Ge)}),$e=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],gt=$e.map(function(jt){var wr=e.sub([],Le[jt[0]],Le[jt[1]]),Nr=e.sub([],Le[jt[2]],Le[jt[1]]),pr=e.normalize([],e.cross([],wr,Nr)),yt=-e.dot(pr,Le[jt[1]]);return pr.concat(yt)});return new ps(Le,gt)};var ul=function(K,_e){this.min=K,this.max=_e,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var _e=[K%2===0,K<2],te=e.clone$2(this.min),me=e.clone$2(this.max),Ge=0;Ge<_e.length;Ge++)te[Ge]=_e[Ge]?this.min[Ge]:this.center[Ge],me[Ge]=_e[Ge]?this.center[Ge]:this.max[Ge];return me[2]=this.max[2],new ul(te,me)},ul.prototype.distanceX=function(K){var _e=Math.max(Math.min(this.max[0],K[0]),this.min[0]);return _e-K[0]},ul.prototype.distanceY=function(K){var _e=Math.max(Math.min(this.max[1],K[1]),this.min[1]);return _e-K[1]},ul.prototype.intersects=function(K){for(var _e=[[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,me=0;me<K.planes.length;me++){for(var Ge=K.planes[me],Le=0,$e=0;$e<_e.length;$e++)Le+=e.dot$1(Ge,_e[$e])>=0;if(Le===0)return 0;Le!==_e.length&&(te=!1)}if(te)return 2;for(var gt=0;gt<3;gt++){for(var jt=Number.MAX_VALUE,wr=-Number.MAX_VALUE,Nr=0;Nr<K.points.length;Nr++){var pr=K.points[Nr][gt]-this.min[gt];jt=Math.min(jt,pr),wr=Math.max(wr,pr)}if(wr<0||jt>this.max[gt]-this.min[gt])return 0}return 1};var tl=function(K,_e,te,me){if(K===void 0&&(K=0),_e===void 0&&(_e=0),te===void 0&&(te=0),me===void 0&&(me=0),isNaN(K)||K<0||isNaN(_e)||_e<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=K,this.bottom=_e,this.left=te,this.right=me};tl.prototype.interpolate=function(K,_e,te){return _e.top!=null&&K.top!=null&&(this.top=e.number(K.top,_e.top,te)),_e.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,_e.bottom,te)),_e.left!=null&&K.left!=null&&(this.left=e.number(K.left,_e.left,te)),_e.right!=null&&K.right!=null&&(this.right=e.number(K.right,_e.right,te)),this},tl.prototype.getCenter=function(K,_e){var te=e.clamp((this.left+K-this.right)/2,0,K),me=e.clamp((this.top+_e-this.bottom)/2,0,_e);return new e.Point(te,me)},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,_e,te,me,Ge){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ge===void 0?!0:Ge,this._minZoom=K||0,this._maxZoom=_e||22,this._minPitch=te??0,this._maxPitch=me??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(ve){this._minZoom!==ve&&(this._minZoom=ve,this.zoom=Math.max(this.zoom,ve))},$o.maxZoom.get=function(){return this._maxZoom},$o.maxZoom.set=function(ve){this._maxZoom!==ve&&(this._maxZoom=ve,this.zoom=Math.min(this.zoom,ve))},$o.minPitch.get=function(){return this._minPitch},$o.minPitch.set=function(ve){this._minPitch!==ve&&(this._minPitch=ve,this.pitch=Math.max(this.pitch,ve))},$o.maxPitch.get=function(){return this._maxPitch},$o.maxPitch.set=function(ve){this._maxPitch!==ve&&(this._maxPitch=ve,this.pitch=Math.min(this.pitch,ve))},$o.renderWorldCopies.get=function(){return this._renderWorldCopies},$o.renderWorldCopies.set=function(ve){ve===void 0?ve=!0:ve===null&&(ve=!1),this._renderWorldCopies=ve},$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(ve){var K=-e.wrap(ve,-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(ve){var K=e.clamp(ve,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(ve){ve=Math.max(.01,Math.min(60,ve)),this._fov!==ve&&(this._unmodified=!1,this._fov=ve/180*Math.PI,this._calcMatrices())},$o.zoom.get=function(){return this._zoom},$o.zoom.set=function(ve){var K=Math.min(Math.max(ve,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(ve){ve.lat===this._center.lat&&ve.lng===this._center.lng||(this._unmodified=!1,this._center=ve,this._constrain(),this._calcMatrices())},$o.padding.get=function(){return this._edgeInsets.toJSON()},$o.padding.set=function(ve){this._edgeInsets.equals(ve)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ve,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,_e,te){this._unmodified=!1,this._edgeInsets.interpolate(K,_e,te),this._constrain(),this._calcMatrices()},Jo.prototype.coveringZoomLevel=function(K){var _e=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,_e)},Jo.prototype.getVisibleUnwrappedCoordinates=function(K){var _e=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),me=this.pointCoordinate(new e.Point(this.width,0)),Ge=this.pointCoordinate(new e.Point(this.width,this.height)),Le=this.pointCoordinate(new e.Point(0,this.height)),$e=Math.floor(Math.min(te.x,me.x,Ge.x,Le.x)),gt=Math.floor(Math.max(te.x,me.x,Ge.x,Le.x)),jt=1,wr=$e-jt;wr<=gt+jt;wr++)wr!==0&&_e.push(new e.UnwrappedTileID(wr,K));return _e},Jo.prototype.coveringTiles=function(K){var _e=this.coveringZoomLevel(K),te=_e;if(K.minzoom!==void 0&&_e<K.minzoom)return[];K.maxzoom!==void 0&&_e>K.maxzoom&&(_e=K.maxzoom);var me=e.MercatorCoordinate.fromLngLat(this.center),Ge=Math.pow(2,_e),Le=[Ge*me.x,Ge*me.y,0],$e=ps.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,_e),gt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(gt=_e);var jt=3,wr=function(Ga){return{aabb:new ul([Ga*Ge,0,0],[(Ga+1)*Ge,Ge,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Nr=[],pr=[],yt=_e,kt=K.reparseOverscaled?te:_e;if(this._renderWorldCopies)for(var Bt=1;Bt<=3;Bt++)Nr.push(wr(-Bt)),Nr.push(wr(Bt));for(Nr.push(wr(0));Nr.length>0;){var nr=Nr.pop(),hr=nr.x,lr=nr.y,dr=nr.fullyVisible;if(!dr){var ur=nr.aabb.intersects($e);if(ur===0)continue;dr=ur===2}var Ht=nr.aabb.distanceX(Le),sr=nr.aabb.distanceY(Le),Vt=Math.max(Math.abs(Ht),Math.abs(sr)),Dr=jt+(1<<yt-nr.zoom)-2;if(nr.zoom===yt||Vt>Dr&&nr.zoom>=gt){pr.push({tileID:new e.OverscaledTileID(nr.zoom===yt?kt:nr.zoom,nr.wrap,nr.zoom,hr,lr),distanceSq:e.sqrLen([Le[0]-.5-hr,Le[1]-.5-lr])});continue}for(var Jr=0;Jr<4;Jr++){var ga=(hr<<1)+Jr%2,vi=(lr<<1)+(Jr>>1);Nr.push({aabb:nr.aabb.quadrant(Jr),zoom:nr.zoom+1,x:ga,y:vi,wrap:nr.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,_e){this.width=K,this.height=_e,this.pixelsToGLUnits=[2/K,-2/_e],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 _e=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(_e)*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,_e){var te=this.pointCoordinate(_e),me=this.pointCoordinate(this.centerPoint),Ge=this.locationCoordinate(K),Le=new e.MercatorCoordinate(Ge.x-(te.x-me.x),Ge.y-(te.y-me.y));this.center=this.coordinateLocation(Le),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 _e=0,te=[K.x,K.y,0,1],me=[K.x,K.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(me,me,this.pixelMatrixInverse);var Ge=te[3],Le=me[3],$e=te[0]/Ge,gt=me[0]/Le,jt=te[1]/Ge,wr=me[1]/Le,Nr=te[2]/Ge,pr=me[2]/Le,yt=Nr===pr?0:(_e-Nr)/(pr-Nr);return new e.MercatorCoordinate(e.number($e,gt,yt)/this.worldSize,e.number(jt,wr,yt)/this.worldSize)},Jo.prototype.coordinatePoint=function(K){var _e=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(_e,_e,this.pixelMatrix),new e.Point(_e[0]/_e[3],_e[1]/_e[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,_e){_e===void 0&&(_e=!1);var te=K.key,me=_e?this._alignedPosMatrixCache:this._posMatrixCache;if(me[te])return me[te];var Ge=K.canonical,Le=this.worldSize/this.zoomScale(Ge.z),$e=Ge.x+Math.pow(2,Ge.z)*K.wrap,gt=e.identity(new Float64Array(16));return e.translate(gt,gt,[$e*Le,Ge.y*Le,0]),e.scale(gt,gt,[Le/e.EXTENT,Le/e.EXTENT,1]),e.multiply(gt,_e?this.alignedProjMatrix:this.projMatrix,gt),me[te]=new Float32Array(gt),me[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,_e=90,te=-180,me=180,Ge,Le,$e,gt,jt=this.size,wr=this._unmodified;if(this.latRange){var Nr=this.latRange;K=e.mercatorYfromLat(Nr[1])*this.worldSize,_e=e.mercatorYfromLat(Nr[0])*this.worldSize,Ge=_e-K<jt.y?jt.y/(_e-K):0}if(this.lngRange){var pr=this.lngRange;te=e.mercatorXfromLng(pr[0])*this.worldSize,me=e.mercatorXfromLng(pr[1])*this.worldSize,Le=me-te<jt.x?jt.x/(me-te):0}var yt=this.point,kt=Math.max(Le||0,Ge||0);if(kt){this.center=this.unproject(new e.Point(Le?(me+te)/2:yt.x,Ge?(_e+K)/2:yt.y)),this.zoom+=this.scaleZoom(kt),this._unmodified=wr,this._constraining=!1;return}if(this.latRange){var Bt=yt.y,nr=jt.y/2;Bt-nr<K&&(gt=K+nr),Bt+nr>_e&&(gt=_e-nr)}if(this.lngRange){var hr=yt.x,lr=jt.x/2;hr-lr<te&&($e=te+lr),hr+lr>me&&($e=me-lr)}($e!==void 0||gt!==void 0)&&(this.center=this.unproject(new e.Point($e!==void 0?$e:yt.x,gt!==void 0?gt:yt.y))),this._unmodified=wr,this._constraining=!1}},Jo.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,_e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var te=Math.PI/2+this._pitch,me=this._fov*(.5+_e.y/this.height),Ge=Math.sin(me)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-me,.01,Math.PI-.01)),Le=this.point,$e=Le.x,gt=Le.y,jt=Math.cos(Math.PI/2-this._pitch)*Ge+this.cameraToCenterDistance,wr=jt*1.01,Nr=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Nr,wr),pr[8]=-_e.x*2/this.width,pr[9]=_e.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,[-$e,-gt,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 yt=this.width%2/2,kt=this.height%2/2,Bt=Math.cos(this.angle),nr=Math.sin(this.angle),hr=$e-Math.round($e)+Bt*yt+nr*kt,lr=gt-Math.round(gt)+Bt*kt+nr*yt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,lr>.5?lr-1:lr,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)),_e=[K.x*this.worldSize,K.y*this.worldSize,0,1],te=e.transformMat4(_e,_e,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},Jo.prototype.getCameraPoint=function(){var K=this._pitch,_e=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,_e))},Jo.prototype.getCameraQueryGeometry=function(K){var _e=this.getCameraPoint();if(K.length===1)return[K[0],_e];for(var te=_e.x,me=_e.y,Ge=_e.x,Le=_e.y,$e=0,gt=K;$e<gt.length;$e+=1){var jt=gt[$e];te=Math.min(te,jt.x),me=Math.min(me,jt.y),Ge=Math.max(Ge,jt.x),Le=Math.max(Le,jt.y)}return[new e.Point(te,me),new e.Point(Ge,me),new e.Point(Ge,Le),new e.Point(te,Le),new e.Point(te,me)]},Object.defineProperties(Jo.prototype,$o);function Il(ve,K){var _e=!1,te=null,me=function(){te=null,_e&&(ve(),te=setTimeout(me,K),_e=!1)};return function(){return _e=!0,te||me(),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 _e=this._map.getCenter(),te=Math.round(this._map.getZoom()*100)/100,me=Math.ceil((te*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ge=Math.pow(10,me),Le=Math.round(_e.lng*Ge)/Ge,$e=Math.round(_e.lat*Ge)/Ge,gt=this._map.getBearing(),jt=this._map.getPitch(),wr="";if(K?wr+="/"+Le+"/"+$e+"/"+te:wr+=te+"/"+$e+"/"+Le,(gt||jt)&&(wr+="/"+Math.round(gt*10)/10),jt&&(wr+="/"+Math.round(jt)),this._hashName){var Nr=this._hashName,pr=!1,yt=e.window.location.hash.slice(1).split("&").map(function(kt){var Bt=kt.split("=")[0];return Bt===Nr?(pr=!0,Bt+"="+wr):kt}).filter(function(kt){return kt});return pr||yt.push(Nr+"="+wr),"#"+yt.join("&")}return"#"+wr},eu.prototype._getCurrentHash=function(){var K=this,_e=e.window.location.hash.replace("#","");if(this._hashName){var te;return _e.split("&").map(function(me){return me.split("=")}).forEach(function(me){me[0]===K._hashName&&(te=me)}),(te&&te[1]||"").split("/")}return _e.split("/")},eu.prototype._onHashChange=function(){var K=this._getCurrentHash();if(K.length>=3&&!K.some(function(te){return isNaN(te)})){var _e=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:_e,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,_e=e.browser.now(),te=160;K.length>0&&_e-K[0].time>te;)K.shift()},Vl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var _e={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,me=this._inertiaBuffer;te<me.length;te+=1){var Ge=me[te],Le=Ge.settings;_e.zoom+=Le.zoomDelta||0,_e.bearing+=Le.bearingDelta||0,_e.pitch+=Le.pitchDelta||0,Le.panDelta&&_e.pan._add(Le.panDelta),Le.around&&(_e.around=Le.around),Le.pinchAround&&(_e.pinchAround=Le.pinchAround)}var $e=this._inertiaBuffer[this._inertiaBuffer.length-1],gt=$e.time-this._inertiaBuffer[0].time,jt={};if(_e.pan.mag()){var wr=de(_e.pan.mag(),gt,e.extend({},vu,K||{}));jt.offset=_e.pan.mult(wr.amount/_e.pan.mag()),jt.center=this._map.transform.center,Gl(jt,wr)}if(_e.zoom){var Nr=de(_e.zoom,gt,Tl);jt.zoom=this._map.transform.zoom+Nr.amount,Gl(jt,Nr)}if(_e.bearing){var pr=de(_e.bearing,gt,cu);jt.bearing=this._map.transform.bearing+e.clamp(pr.amount,-179,179),Gl(jt,pr)}if(_e.pitch){var yt=de(_e.pitch,gt,uc);jt.pitch=this._map.transform.pitch+yt.amount,Gl(jt,yt)}if(jt.zoom||jt.bearing){var kt=_e.pinchAround===void 0?_e.around:_e.pinchAround;jt.around=kt?this._map.unproject(kt):this._map.getCenter()}return this.clear(),e.extend(jt,{noMoveStart:!0})}};function Gl(ve,K){(!ve.duration||ve.duration<K.duration)&&(ve.duration=K.duration,ve.easing=K.easing)}function de(ve,K,_e){var te=_e.maxSpeed,me=_e.linearity,Ge=_e.deceleration,Le=e.clamp(ve*me/(K/1e3),-te,te),$e=Math.abs(Le)/(Ge*me);return{easing:_e.easing,duration:$e*1e3,amount:Le*($e/2)}}var Fe=function(ve){function K(te,me,Ge,Le){Le===void 0&&(Le={});var $e=r.mousePos(me.getCanvasContainer(),Ge),gt=me.unproject($e);ve.call(this,te,e.extend({point:$e,lngLat:gt,originalEvent:Ge},Le)),this._defaultPrevented=!1,this.target=me}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var _e={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},_e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,_e),K}(e.Event),et=function(ve){function K(te,me,Ge){var Le=te==="touchend"?Ge.changedTouches:Ge.touches,$e=r.touchPos(me.getCanvasContainer(),Le),gt=$e.map(function(Nr){return me.unproject(Nr)}),jt=$e.reduce(function(Nr,pr,yt,kt){return Nr.add(pr.div(kt.length))},new e.Point(0,0)),wr=me.unproject(jt);ve.call(this,te,{points:$e,point:jt,lngLats:gt,lngLat:wr,originalEvent:Ge}),this._defaultPrevented=!1}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var _e={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},_e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,_e),K}(e.Event),mt=function(ve){function K(te,me,Ge){ve.call(this,te,{originalEvent:Ge}),this._defaultPrevented=!1}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var _e={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},_e.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,_e),K}(e.Event),bt=function(K,_e){this._map=K,this._clickTolerance=_e.clickTolerance};bt.prototype.reset=function(){delete this._mousedownPos},bt.prototype.wheel=function(K){return this._firePreventable(new mt(K.type,this._map,K))},bt.prototype.mousedown=function(K,_e){return this._mousedownPos=_e,this._firePreventable(new Fe(K.type,this._map,K))},bt.prototype.mouseup=function(K){this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.click=function(K,_e){this._mousedownPos&&this._mousedownPos.dist(_e)>=this._clickTolerance||this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.dblclick=function(K){return this._firePreventable(new Fe(K.type,this._map,K))},bt.prototype.mouseover=function(K){this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.mouseout=function(K){this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},bt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},bt.prototype.isEnabled=function(){return!0},bt.prototype.isActive=function(){return!1},bt.prototype.enable=function(){},bt.prototype.disable=function(){};var Mt=function(K){this._map=K};Mt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Mt.prototype.mousemove=function(K){this._map.fire(new Fe(K.type,this._map,K))},Mt.prototype.mousedown=function(){this._delayContextMenu=!0},Mt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Fe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Mt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new Fe(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Mt.prototype.isEnabled=function(){return!0},Mt.prototype.isActive=function(){return!1},Mt.prototype.enable=function(){},Mt.prototype.disable=function(){};var ar=function(K,_e){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=_e.clickTolerance||1};ar.prototype.isEnabled=function(){return!!this._enabled},ar.prototype.isActive=function(){return!!this._active},ar.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ar.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ar.prototype.mousedown=function(K,_e){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=_e,this._active=!0)},ar.prototype.mousemoveWindow=function(K,_e){if(this._active){var te=_e;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)<this._clickTolerance)){var me=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 Ge=Math.min(me.x,te.x),Le=Math.max(me.x,te.x),$e=Math.min(me.y,te.y),gt=Math.max(me.y,te.y);r.setTransform(this._box,"translate("+Ge+"px,"+$e+"px)"),this._box.style.width=Le-Ge+"px",this._box.style.height=gt-$e+"px"}}},ar.prototype.mouseupWindow=function(K,_e){var te=this;if(this._active&&K.button===0){var me=this._startPos,Ge=_e;if(this.reset(),r.suppressClick(),me.x===Ge.x&&me.y===Ge.y)this._fireEvent("boxzoomcancel",K);else return this._map.fire(new e.Event("boxzoomend",{originalEvent:K})),{cameraAnimation:function(Le){return Le.fitScreenCoordinates(me,Ge,te._map.getBearing(),{linear:!0})}}}},ar.prototype.keydown=function(K){this._active&&K.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",K))},ar.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},ar.prototype._fireEvent=function(K,_e){return this._map.fire(new e.Event(K,{originalEvent:_e}))};function Ot(ve,K){for(var _e={},te=0;te<ve.length;te++)_e[ve[te].identifier]=K[te];return _e}function _r(ve){for(var K=new e.Point(0,0),_e=0,te=ve;_e<te.length;_e+=1){var me=te[_e];K._add(me)}return K.div(ve.length)}var Gr=500,Xr=500,xa=30,da=function(K){this.reset(),this.numTouches=K.numTouches};da.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},da.prototype.touchstart=function(K,_e,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(_e),this.touches=Ot(te,_e)))},da.prototype.touchmove=function(K,_e,te){if(!(this.aborted||!this.centroid)){var me=Ot(te,_e);for(var Ge in this.touches){var Le=this.touches[Ge],$e=me[Ge];(!$e||$e.dist(Le)>xa)&&(this.aborted=!0)}}},da.prototype.touchend=function(K,_e,te){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),te.length===0){var me=!this.aborted&&this.centroid;if(this.reset(),me)return me}};var Ja=function(K){this.singleTap=new da(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,_e,te){this.singleTap.touchstart(K,_e,te)},Ja.prototype.touchmove=function(K,_e,te){this.singleTap.touchmove(K,_e,te)},Ja.prototype.touchend=function(K,_e,te){var me=this.singleTap.touchend(K,_e,te);if(me){var Ge=K.timeStamp-this.lastTime<Gr,Le=!this.lastTap||this.lastTap.dist(me)<xa;if((!Ge||!Le)&&this.reset(),this.count++,this.lastTime=K.timeStamp,this.lastTap=me,this.count===this.numTaps)return this.reset(),me}};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,_e,te){this._zoomIn.touchstart(K,_e,te),this._zoomOut.touchstart(K,_e,te)},ti.prototype.touchmove=function(K,_e,te){this._zoomIn.touchmove(K,_e,te),this._zoomOut.touchmove(K,_e,te)},ti.prototype.touchend=function(K,_e,te){var me=this,Ge=this._zoomIn.touchend(K,_e,te),Le=this._zoomOut.touchend(K,_e,te);if(Ge)return this._active=!0,K.preventDefault(),setTimeout(function(){return me.reset()},0),{cameraAnimation:function($e){return $e.easeTo({duration:300,zoom:$e.getZoom()+1,around:$e.unproject(Ge)},{originalEvent:K})}};if(Le)return this._active=!0,K.preventDefault(),setTimeout(function(){return me.reset()},0),{cameraAnimation:function($e){return $e.easeTo({duration:300,zoom:$e.getZoom()-1,around:$e.unproject(Le)},{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,Fa=2,Xa={};Xa[Sa]=1,Xa[Fa]=2;function fi(ve,K){var _e=Xa[K];return ve.buttons===void 0||(ve.buttons&_e)!==_e}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,_e){return!1},ni.prototype._move=function(K,_e){return{}},ni.prototype.mousedown=function(K,_e){if(!this._lastPoint){var te=r.mouseButton(K);this._correctButton(K,te)&&(this._lastPoint=_e,this._eventButton=te)}},ni.prototype.mousemoveWindow=function(K,_e){var te=this._lastPoint;if(te){if(K.preventDefault(),fi(K,this._eventButton)){this.reset();return}if(!(!this._moved&&_e.dist(te)<this._clickTolerance))return this._moved=!0,this._lastPoint=_e,this._move(te,_e)}},ni.prototype.mouseupWindow=function(K){if(this._lastPoint){var _e=r.mouseButton(K);_e===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(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.mousedown=function(te,me){ve.prototype.mousedown.call(this,te,me),this._lastPoint&&(this._active=!0)},K.prototype._correctButton=function(te,me){return me===Sa&&!te.ctrlKey},K.prototype._move=function(te,me){return{around:me,panDelta:me.sub(te)}},K}(ni),sn=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,me){return me===Sa&&te.ctrlKey||me===Fa},K.prototype._move=function(te,me){var Ge=.8,Le=(me.x-te.x)*Ge;if(Le)return this._active=!0,{bearingDelta:Le}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(ni),rn=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,me){return me===Sa&&te.ctrlKey||me===Fa},K.prototype._move=function(te,me){var Ge=-.5,Le=(me.y-te.y)*Ge;if(Le)return this._active=!0,{pitchDelta:Le}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(ni),vn=function(K){this._minTouches=1,this._clickTolerance=K.clickTolerance||1,this.reset()};vn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},vn.prototype.touchstart=function(K,_e,te){return this._calculateTransform(K,_e,te)},vn.prototype.touchmove=function(K,_e,te){if(!(!this._active||te.length<this._minTouches))return K.preventDefault(),this._calculateTransform(K,_e,te)},vn.prototype.touchend=function(K,_e,te){this._calculateTransform(K,_e,te),this._active&&te.length<this._minTouches&&this.reset()},vn.prototype.touchcancel=function(){this.reset()},vn.prototype._calculateTransform=function(K,_e,te){te.length>0&&(this._active=!0);var me=Ot(te,_e),Ge=new e.Point(0,0),Le=new e.Point(0,0),$e=0;for(var gt in me){var jt=me[gt],wr=this._touches[gt];wr&&(Ge._add(jt),Le._add(jt.sub(wr)),$e++,me[gt]=jt)}if(this._touches=me,!($e<this._minTouches||!Le.mag())){var Nr=Le.div($e);if(this._sum._add(Nr),!(this._sum.mag()<this._clickTolerance)){var pr=Ge.div($e);return{around:pr,panDelta:Nr}}}},vn.prototype.enable=function(){this._enabled=!0},vn.prototype.disable=function(){this._enabled=!1,this.reset()},vn.prototype.isEnabled=function(){return this._enabled},vn.prototype.isActive=function(){return this._active};var Pn=function(){this.reset()};Pn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Pn.prototype._start=function(K){},Pn.prototype._move=function(K,_e,te){return{}},Pn.prototype.touchstart=function(K,_e,te){this._firstTwoTouches||te.length<2||(this._firstTwoTouches=[te[0].identifier,te[1].identifier],this._start([_e[0],_e[1]]))},Pn.prototype.touchmove=function(K,_e,te){if(this._firstTwoTouches){K.preventDefault();var me=this._firstTwoTouches,Ge=me[0],Le=me[1],$e=Jn(te,_e,Ge),gt=Jn(te,_e,Le);if(!(!$e||!gt)){var jt=this._aroundCenter?null:$e.add(gt).div(2);return this._move([$e,gt],jt,K)}}},Pn.prototype.touchend=function(K,_e,te){if(this._firstTwoTouches){var me=this._firstTwoTouches,Ge=me[0],Le=me[1],$e=Jn(te,_e,Ge),gt=Jn(te,_e,Le);$e&&gt||(this._active&&r.suppressClick(),this.reset())}},Pn.prototype.touchcancel=function(){this.reset()},Pn.prototype.enable=function(K){this._enabled=!0,this._aroundCenter=!!K&&K.around==="center"},Pn.prototype.disable=function(){this._enabled=!1,this.reset()},Pn.prototype.isEnabled=function(){return this._enabled},Pn.prototype.isActive=function(){return this._active};function Jn(ve,K,_e){for(var te=0;te<ve.length;te++)if(ve[te].identifier===_e)return K[te]}var ro=.1;function Yo(ve,K){return Math.log(ve/K)/Math.LN2}var io=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.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,me){var Ge=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,Ge),pinchAround:me}},K}(Pn),Ho=25;function cl(ve,K){return ve.angleWith(K)*180/Math.PI}var al=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.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,me){var Ge=this._vector;if(this._vector=te[0].sub(te[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:cl(this._vector,Ge),pinchAround:me}},K.prototype._isBelowThreshold=function(te){this._minDiameter=Math.min(this._minDiameter,te.mag());var me=Math.PI*this._minDiameter,Ge=Ho/me*360,Le=cl(te,this._startVector);return Math.abs(Le)<Ge},K}(Pn);function xl(ve){return Math.abs(ve.y)>Math.abs(ve.x)}var gn=100,vo=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.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,me,Ge){var Le=te[0].sub(this._lastPoints[0]),$e=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Le,$e,Ge.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var gt=(Le.y+$e.y)/2,jt=-.5;return{pitchDelta:gt*jt}}},K.prototype.gestureBeginsVertically=function(te,me,Ge){if(this._valid!==void 0)return this._valid;var Le=2,$e=te.mag()>=Le,gt=me.mag()>=Le;if(!(!$e&&!gt)){if(!$e||!gt)return this._firstMove===void 0&&(this._firstMove=Ge),Ge-this._firstMove<gn?void 0:!1;var jt=te.y>0==me.y>0;return xl(te)&&xl(me)&&jt}},K}(Pn),cs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=cs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};ms.prototype.reset=function(){this._active=!1},ms.prototype.keydown=function(K){var _e=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var te=0,me=0,Ge=0,Le=0,$e=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?me=-1:(K.preventDefault(),Le=-1);break;case 39:K.shiftKey?me=1:(K.preventDefault(),Le=1);break;case 38:K.shiftKey?Ge=1:(K.preventDefault(),$e=-1);break;case 40:K.shiftKey?Ge=-1:(K.preventDefault(),$e=1);break;default:return}return this._rotationDisabled&&(me=0,Ge=0),{cameraAnimation:function(gt){var jt=gt.getZoom();gt.easeTo({duration:300,easeId:"keyboardHandler",easing:Al,zoom:te?Math.round(jt)+te*(K.shiftKey?2:1):jt,bearing:gt.getBearing()+me*_e._bearingStep,pitch:gt.getPitch()+Ge*_e._pitchStep,offset:[-Le*_e._panStep,-$e*_e._panStep],center:gt.getCenter()},{originalEvent:K})}}}},ms.prototype.enable=function(){this._enabled=!0},ms.prototype.disable=function(){this._enabled=!1,this.reset()},ms.prototype.isEnabled=function(){return this._enabled},ms.prototype.isActive=function(){return this._active},ms.prototype.disableRotation=function(){this._rotationDisabled=!0},ms.prototype.enableRotation=function(){this._rotationDisabled=!1};function Al(ve){return ve*(2-ve)}var Hl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,_e){this._map=K,this._el=K.getCanvasContainer(),this._handler=_e,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 _e=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,te=e.browser.now(),me=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,_e!==0&&_e%Hl===0?this._type="wheel":_e!==0&&Math.abs(_e)<4?this._type="trackpad":me>400?(this._type=null,this._lastValue=_e,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(me*_e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,_e+=this._lastValue)),K.shiftKey&&_e&&(_e=_e/4),this._type&&(this._lastWheelEvent=K,this._delta-=_e,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 _e=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(_e)),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 _e=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>Hl?this._wheelZoomRate:this._defaultZoomRate,me=_c/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&me!==0&&(me=1/me);var Ge=typeof this._targetZoom=="number"?_e.zoomScale(this._targetZoom):_e.scale;this._targetZoom=Math.min(_e.maxZoom,Math.max(_e.minZoom,_e.scaleZoom(Ge*me))),this._type==="wheel"&&(this._startZoom=_e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Le=typeof this._targetZoom=="number"?this._targetZoom:_e.zoom,$e=this._startZoom,gt=this._easing,jt=!1,wr;if(this._type==="wheel"&&$e&&gt){var Nr=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=gt(Nr);wr=e.number($e,Le,pr),Nr<1?this._frameId||(this._frameId=!0):jt=!0}else wr=Le,jt=!0;return this._active=!0,jt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!jt,zoomDelta:wr-_e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var _e=e.ease;if(this._prevEase){var te=this._prevEase,me=(e.browser.now()-te.start)/te.duration,Ge=te.easing(me+.01)-te.easing(me),Le=.27/Math.sqrt(Ge*Ge+1e-4)*.01,$e=Math.sqrt(.27*.27-Le*Le);_e=e.bezier(Le,$e,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:_e},_e},it.prototype.reset=function(){this._active=!1};var Zt=function(K,_e){this._clickZoom=K,this._tapZoom=_e};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 fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,_e){return K.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(K.shiftKey?-1:1),around:te.unproject(_e)},{originalEvent:K})}}},fr.prototype.enable=function(){this._enabled=!0},fr.prototype.disable=function(){this._enabled=!1,this.reset()},fr.prototype.isEnabled=function(){return this._enabled},fr.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,_e,te){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=_e[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(K,_e,te))},oa.prototype.touchmove=function(K,_e,te){if(!this._tapTime)this._tap.touchmove(K,_e,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var me=_e[0],Ge=me.y-this._swipePoint.y;return this._swipePoint=me,K.preventDefault(),this._active=!0,{zoomDelta:Ge/128}}},oa.prototype.touchend=function(K,_e,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var me=this._tap.touchend(K,_e,te);me&&(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,_e,te){this._el=K,this._mousePan=_e,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 ma=function(K,_e,te){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=_e,this._mousePitch=te};ma.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ma.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ma.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ma.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var _a=function(K,_e,te,me){this._el=K,this._touchZoom=_e,this._touchRotate=te,this._tapDragZoom=me,this._rotationDisabled=!1,this._enabled=!0};_a.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")},_a.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},_a.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},_a.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},_a.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},_a.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ve){return ve.zoom||ve.drag||ve.pitch||ve.rotate},bi=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ve){return ve.panDelta&&ve.panDelta.mag()||ve.zoomDelta||ve.bearingDelta||ve.pitchDelta}var si=function(K,_e){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Vl(K),this._bearingSnap=_e.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(_e),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 me=0,Ge=this._listeners;me<Ge.length;me+=1){var Le=Ge[me],$e=Le[0],gt=Le[1],jt=Le[2];r.addEventListener($e,gt,$e===e.window.document?this.handleWindowEvent:this.handleEvent,jt)}};si.prototype.destroy=function(){for(var K=0,_e=this._listeners;K<_e.length;K+=1){var te=_e[K],me=te[0],Ge=te[1],Le=te[2];r.removeEventListener(me,Ge,me===e.window.document?this.handleWindowEvent:this.handleEvent,Le)}},si.prototype._addDefaultHandlers=function(K){var _e=this._map,te=_e.getCanvasContainer();this._add("mapEvent",new bt(_e,K));var me=_e.boxZoom=new ar(_e,K);this._add("boxZoom",me);var Ge=new ti,Le=new fr;_e.doubleClickZoom=new Zt(Le,Ge),this._add("tapZoom",Ge),this._add("clickZoom",Le);var $e=new oa;this._add("tapDragZoom",$e);var gt=_e.touchPitch=new vo;this._add("touchPitch",gt);var jt=new sn(K),wr=new rn(K);_e.dragRotate=new ma(K,jt,wr),this._add("mouseRotate",jt,["mousePitch"]),this._add("mousePitch",wr,["mouseRotate"]);var Nr=new La(K),pr=new vn(K);_e.dragPan=new wa(te,Nr,pr),this._add("mousePan",Nr),this._add("touchPan",pr,["touchZoom","touchRotate"]);var yt=new al,kt=new io;_e.touchZoomRotate=new _a(te,kt,yt,$e),this._add("touchRotate",yt,["touchPan","touchZoom"]),this._add("touchZoom",kt,["touchPan","touchRotate"]);var Bt=_e.scrollZoom=new it(_e,this);this._add("scrollZoom",Bt,["mousePan"]);var nr=_e.keyboard=new ms;this._add("keyboard",nr),this._add("blockableMapEvent",new Mt(_e));for(var hr=0,lr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];hr<lr.length;hr+=1){var dr=lr[hr];K.interactive&&K[dr]&&_e[dr].enable(K[dr])}},si.prototype._add=function(K,_e,te){this._handlers.push({handlerName:K,handler:_e,allowed:te}),this._handlersById[K]=_e},si.prototype.stop=function(K){if(!this._updatingCamera){for(var _e=0,te=this._handlers;_e<te.length;_e+=1){var me=te[_e],Ge=me.handler;Ge.reset()}this._inertia.clear(),this._fireEvents({},{},K),this._changes=[]}},si.prototype.isActive=function(){for(var K=0,_e=this._handlers;K<_e.length;K+=1){var te=_e[K],me=te.handler;if(me.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,_e,te){for(var me in K)if(me!==te&&(!_e||_e.indexOf(me)<0))return!0;return!1},si.prototype.handleWindowEvent=function(K){this.handleEvent(K,K.type+"Window")},si.prototype._getMapTouches=function(K){for(var _e=[],te=0,me=K;te<me.length;te+=1){var Ge=me[te],Le=Ge.target;this._el.contains(Le)&&_e.push(Ge)}return _e},si.prototype.handleEvent=function(K,_e){if(K.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var te=K.type==="renderFrame"?void 0:K,me={needsRenderFrame:!1},Ge={},Le={},$e=K.touches?this._getMapTouches(K.touches):void 0,gt=$e?r.touchPos(this._el,$e):r.mousePos(this._el,K),jt=0,wr=this._handlers;jt<wr.length;jt+=1){var Nr=wr[jt],pr=Nr.handlerName,yt=Nr.handler,kt=Nr.allowed;if(yt.isEnabled()){var Bt=void 0;this._blockedByActive(Le,kt,pr)?yt.reset():yt[_e||K.type]&&(Bt=yt[_e||K.type](K,gt,$e),this.mergeHandlerResult(me,Ge,Bt,pr,te),Bt&&Bt.needsRenderFrame&&this._triggerRenderFrame()),(Bt||yt.isActive())&&(Le[pr]=yt)}}var nr={};for(var hr in this._previousActiveHandlers)Le[hr]||(nr[hr]=te);this._previousActiveHandlers=Le,(Object.keys(nr).length||yi(me))&&(this._changes.push([me,Ge,nr]),this._triggerRenderFrame()),(Object.keys(Le).length||yi(me))&&this._map._stop(!0),this._updatingCamera=!1;var lr=me.cameraAnimation;lr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],lr(this._map))},si.prototype.mergeHandlerResult=function(K,_e,te,me,Ge){if(te){e.extend(K,te);var Le={handlerName:me,originalEvent:te.originalEvent||Ge};te.zoomDelta!==void 0&&(_e.zoom=Le),te.panDelta!==void 0&&(_e.drag=Le),te.pitchDelta!==void 0&&(_e.pitch=Le),te.bearingDelta!==void 0&&(_e.rotate=Le)}},si.prototype._applyChanges=function(){for(var K={},_e={},te={},me=0,Ge=this._changes;me<Ge.length;me+=1){var Le=Ge[me],$e=Le[0],gt=Le[1],jt=Le[2];$e.panDelta&&(K.panDelta=(K.panDelta||new e.Point(0,0))._add($e.panDelta)),$e.zoomDelta&&(K.zoomDelta=(K.zoomDelta||0)+$e.zoomDelta),$e.bearingDelta&&(K.bearingDelta=(K.bearingDelta||0)+$e.bearingDelta),$e.pitchDelta&&(K.pitchDelta=(K.pitchDelta||0)+$e.pitchDelta),$e.around!==void 0&&(K.around=$e.around),$e.pinchAround!==void 0&&(K.pinchAround=$e.pinchAround),$e.noInertia&&(K.noInertia=$e.noInertia),e.extend(_e,gt),e.extend(te,jt)}this._updateMapTransform(K,_e,te),this._changes=[]},si.prototype._updateMapTransform=function(K,_e,te){var me=this._map,Ge=me.transform;if(!yi(K))return this._fireEvents(_e,te,!0);var Le=K.panDelta,$e=K.zoomDelta,gt=K.bearingDelta,jt=K.pitchDelta,wr=K.around,Nr=K.pinchAround;Nr!==void 0&&(wr=Nr),me._stop(!0),wr=wr||me.transform.centerPoint;var pr=Ge.pointLocation(Le?wr.sub(Le):wr);gt&&(Ge.bearing+=gt),jt&&(Ge.pitch+=jt),$e&&(Ge.zoom+=$e),Ge.setLocationAtPoint(pr,wr),this._map._update(),K.noInertia||this._inertia.record(K),this._fireEvents(_e,te,!0)},si.prototype._fireEvents=function(K,_e,te){var me=this,Ge=Ya(this._eventsInProgress),Le=Ya(K),$e={};for(var gt in K){var jt=K[gt],wr=jt.originalEvent;this._eventsInProgress[gt]||($e[gt+"start"]=wr),this._eventsInProgress[gt]=K[gt]}!Ge&&Le&&this._fireEvent("movestart",Le.originalEvent);for(var Nr in $e)this._fireEvent(Nr,$e[Nr]);Le&&this._fireEvent("move",Le.originalEvent);for(var pr in K){var yt=K[pr],kt=yt.originalEvent;this._fireEvent(pr,kt)}var Bt={},nr;for(var hr in this._eventsInProgress){var lr=this._eventsInProgress[hr],dr=lr.handlerName,ur=lr.originalEvent;this._handlersById[dr].isActive()||(delete this._eventsInProgress[hr],nr=_e[dr]||ur,Bt[hr+"end"]=nr)}for(var Ht in Bt)this._fireEvent(Ht,Bt[Ht]);var sr=Ya(this._eventsInProgress);if(te&&(Ge||Le)&&!sr){this._updatingCamera=!0;var Vt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Dr=function(Jr){return Jr!==0&&-me._bearingSnap<Jr&&Jr<me._bearingSnap};Vt?(Dr(Vt.bearing||this._map.getBearing())&&(Vt.bearing=0),this._map.easeTo(Vt,{originalEvent:nr})):(this._map.fire(new e.Event("moveend",{originalEvent:nr})),Dr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},si.prototype._fireEvent=function(K,_e){this._map.fire(new e.Event(K,_e?{originalEvent:_e}:{}))},si.prototype._requestFrame=function(){var K=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(_e){delete K._frameId,K.handleEvent(new bi("renderFrame",{timeStamp:_e})),K._applyChanges()})},si.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var yn=function(ve){function K(_e,te){ve.call(this),this._moving=!1,this._zooming=!1,this.transform=_e,this._bearingSnap=te.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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,me){return this.jumpTo({center:te},me)},K.prototype.panBy=function(te,me,Ge){return te=e.Point.convert(te).mult(-1),this.panTo(this.transform.center,e.extend({offset:te},me),Ge)},K.prototype.panTo=function(te,me,Ge){return this.easeTo(e.extend({center:te},me),Ge)},K.prototype.getZoom=function(){return this.transform.zoom},K.prototype.setZoom=function(te,me){return this.jumpTo({zoom:te},me),this},K.prototype.zoomTo=function(te,me,Ge){return this.easeTo(e.extend({zoom:te},me),Ge)},K.prototype.zoomIn=function(te,me){return this.zoomTo(this.getZoom()+1,te,me),this},K.prototype.zoomOut=function(te,me){return this.zoomTo(this.getZoom()-1,te,me),this},K.prototype.getBearing=function(){return this.transform.bearing},K.prototype.setBearing=function(te,me){return this.jumpTo({bearing:te},me),this},K.prototype.getPadding=function(){return this.transform.padding},K.prototype.setPadding=function(te,me){return this.jumpTo({padding:te},me),this},K.prototype.rotateTo=function(te,me,Ge){return this.easeTo(e.extend({bearing:te},me),Ge)},K.prototype.resetNorth=function(te,me){return this.rotateTo(0,e.extend({duration:1e3},te),me),this},K.prototype.resetNorthPitch=function(te,me){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},te),me),this},K.prototype.snapToNorth=function(te,me){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(te,me):this},K.prototype.getPitch=function(){return this.transform.pitch},K.prototype.setPitch=function(te,me){return this.jumpTo({pitch:te},me),this},K.prototype.cameraForBounds=function(te,me){te=e.LngLatBounds.convert(te);var Ge=me&&me.bearing||0;return this._cameraForBoxAndBearing(te.getNorthWest(),te.getSouthEast(),Ge,me)},K.prototype._cameraForBoxAndBearing=function(te,me,Ge,Le){var $e={top:0,bottom:0,right:0,left:0};if(Le=e.extend({padding:$e,offset:[0,0],maxZoom:this.transform.maxZoom},Le),typeof Le.padding=="number"){var gt=Le.padding;Le.padding={top:gt,bottom:gt,right:gt,left:gt}}Le.padding=e.extend($e,Le.padding);var jt=this.transform,wr=jt.padding,Nr=jt.project(e.LngLat.convert(te)),pr=jt.project(e.LngLat.convert(me)),yt=Nr.rotate(-Ge*Math.PI/180),kt=pr.rotate(-Ge*Math.PI/180),Bt=new e.Point(Math.max(yt.x,kt.x),Math.max(yt.y,kt.y)),nr=new e.Point(Math.min(yt.x,kt.x),Math.min(yt.y,kt.y)),hr=Bt.sub(nr),lr=(jt.width-(wr.left+wr.right+Le.padding.left+Le.padding.right))/hr.x,dr=(jt.height-(wr.top+wr.bottom+Le.padding.top+Le.padding.bottom))/hr.y;if(dr<0||lr<0){e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var ur=Math.min(jt.scaleZoom(jt.scale*Math.min(lr,dr)),Le.maxZoom),Ht=typeof Le.offset.x=="number"?new e.Point(Le.offset.x,Le.offset.y):e.Point.convert(Le.offset),sr=(Le.padding.left-Le.padding.right)/2,Vt=(Le.padding.top-Le.padding.bottom)/2,Dr=new e.Point(sr,Vt),Jr=Dr.rotate(Ge*Math.PI/180),ga=Ht.add(Jr),vi=ga.mult(jt.scale/jt.zoomScale(ur)),Ga=jt.unproject(Nr.add(pr).div(2).sub(vi));return{center:Ga,zoom:ur,bearing:Ge}},K.prototype.fitBounds=function(te,me,Ge){return this._fitInternal(this.cameraForBounds(te,me),me,Ge)},K.prototype.fitScreenCoordinates=function(te,me,Ge,Le,$e){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(te)),this.transform.pointLocation(e.Point.convert(me)),Ge,Le),Le,$e)},K.prototype._fitInternal=function(te,me,Ge){return te?(me=e.extend(te,me),delete me.padding,me.linear?this.easeTo(me,Ge):this.flyTo(me,Ge)):this},K.prototype.jumpTo=function(te,me){this.stop();var Ge=this.transform,Le=!1,$e=!1,gt=!1;return"zoom"in te&&Ge.zoom!==+te.zoom&&(Le=!0,Ge.zoom=+te.zoom),te.center!==void 0&&(Ge.center=e.LngLat.convert(te.center)),"bearing"in te&&Ge.bearing!==+te.bearing&&($e=!0,Ge.bearing=+te.bearing),"pitch"in te&&Ge.pitch!==+te.pitch&&(gt=!0,Ge.pitch=+te.pitch),te.padding!=null&&!Ge.isPaddingEqual(te.padding)&&(Ge.padding=te.padding),this.fire(new e.Event("movestart",me)).fire(new e.Event("move",me)),Le&&this.fire(new e.Event("zoomstart",me)).fire(new e.Event("zoom",me)).fire(new e.Event("zoomend",me)),$e&&this.fire(new e.Event("rotatestart",me)).fire(new e.Event("rotate",me)).fire(new e.Event("rotateend",me)),gt&&this.fire(new e.Event("pitchstart",me)).fire(new e.Event("pitch",me)).fire(new e.Event("pitchend",me)),this.fire(new e.Event("moveend",me))},K.prototype.easeTo=function(te,me){var Ge=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 Le=this.transform,$e=this.getZoom(),gt=this.getBearing(),jt=this.getPitch(),wr=this.getPadding(),Nr="zoom"in te?+te.zoom:$e,pr="bearing"in te?this._normalizeBearing(te.bearing,gt):gt,yt="pitch"in te?+te.pitch:jt,kt="padding"in te?te.padding:Le.padding,Bt=e.Point.convert(te.offset),nr=Le.centerPoint.add(Bt),hr=Le.pointLocation(nr),lr=e.LngLat.convert(te.center||hr);this._normalizeCenter(lr);var dr=Le.project(hr),ur=Le.project(lr).sub(dr),Ht=Le.zoomScale(Nr-$e),sr,Vt;te.around&&(sr=e.LngLat.convert(te.around),Vt=Le.locationPoint(sr));var Dr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nr!==$e,this._rotating=this._rotating||gt!==pr,this._pitching=this._pitching||yt!==jt,this._padding=!Le.isPaddingEqual(kt),this._easeId=te.easeId,this._prepareEase(me,te.noMoveStart,Dr),this._ease(function(Jr){if(Ge._zooming&&(Le.zoom=e.number($e,Nr,Jr)),Ge._rotating&&(Le.bearing=e.number(gt,pr,Jr)),Ge._pitching&&(Le.pitch=e.number(jt,yt,Jr)),Ge._padding&&(Le.interpolatePadding(wr,kt,Jr),nr=Le.centerPoint.add(Bt)),sr)Le.setLocationAtPoint(sr,Vt);else{var ga=Le.zoomScale(Le.zoom-$e),vi=Nr>$e?Math.min(2,Ht):Math.max(.5,Ht),Ga=Math.pow(vi,1-Jr),ai=Le.unproject(dr.add(ur.mult(Jr*Ga)).mult(ga));Le.setLocationAtPoint(Le.renderWorldCopies?ai.wrap():ai,nr)}Ge._fireMoveEvents(me)},function(Jr){Ge._afterEase(me,Jr)},te),this},K.prototype._prepareEase=function(te,me,Ge){Ge===void 0&&(Ge={}),this._moving=!0,!me&&!Ge.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!Ge.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!Ge.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!Ge.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,me){if(!(this._easeId&&me&&this._easeId===me)){delete this._easeId;var Ge=this._zooming,Le=this._rotating,$e=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ge&&this.fire(new e.Event("zoomend",te)),Le&&this.fire(new e.Event("rotateend",te)),$e&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},K.prototype.flyTo=function(te,me){var Ge=this;if(!te.essential&&e.browser.prefersReducedMotion){var Le=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Le,me)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var $e=this.transform,gt=this.getZoom(),jt=this.getBearing(),wr=this.getPitch(),Nr=this.getPadding(),pr="zoom"in te?e.clamp(+te.zoom,$e.minZoom,$e.maxZoom):gt,yt="bearing"in te?this._normalizeBearing(te.bearing,jt):jt,kt="pitch"in te?+te.pitch:wr,Bt="padding"in te?te.padding:$e.padding,nr=$e.zoomScale(pr-gt),hr=e.Point.convert(te.offset),lr=$e.centerPoint.add(hr),dr=$e.pointLocation(lr),ur=e.LngLat.convert(te.center||dr);this._normalizeCenter(ur);var Ht=$e.project(dr),sr=$e.project(ur).sub(Ht),Vt=te.curve,Dr=Math.max($e.width,$e.height),Jr=Dr/nr,ga=sr.mag();if("minZoom"in te){var vi=e.clamp(Math.min(te.minZoom,gt,pr),$e.minZoom,$e.maxZoom),Ga=Dr/$e.zoomScale(vi-gt);Vt=Math.sqrt(Ga/ga*2)}var ai=Vt*Vt;function Zi(Do){var Ms=(Jr*Jr-Dr*Dr+(Do?-1:1)*ai*ai*ga*ga)/(2*(Do?Jr:Dr)*ai*ga);return Math.log(Math.sqrt(Ms*Ms+1)-Ms)}function Fi(Do){return(Math.exp(Do)-Math.exp(-Do))/2}function ui(Do){return(Math.exp(Do)+Math.exp(-Do))/2}function _i(Do){return Fi(Do)/ui(Do)}var Si=Zi(0),Ui=function(Do){return ui(Si)/ui(Si+Vt*Do)},fn=function(Do){return Dr*((ui(Si)*_i(Si+Vt*Do)-Fi(Si))/ai)/ga},_o=(Zi(1)-Si)/Vt;if(Math.abs(ga)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(te,me);var Bo=Jr<Dr?-1:1;_o=Math.abs(Math.log(Jr/Dr))/Vt,fn=function(){return 0},Ui=function(Do){return Math.exp(Bo*Vt*Do)}}if("duration"in te)te.duration=+te.duration;else{var Ps="screenSpeed"in te?+te.screenSpeed/Vt:+te.speed;te.duration=1e3*_o/Ps}return te.maxDuration&&te.duration>te.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=jt!==yt,this._pitching=kt!==wr,this._padding=!$e.isPaddingEqual(Bt),this._prepareEase(me,!1),this._ease(function(Do){var Ms=Do*_o,Ys=1/Ui(Ms);$e.zoom=Do===1?pr:gt+$e.scaleZoom(Ys),Ge._rotating&&($e.bearing=e.number(jt,yt,Do)),Ge._pitching&&($e.pitch=e.number(wr,kt,Do)),Ge._padding&&($e.interpolatePadding(Nr,Bt,Do),lr=$e.centerPoint.add(hr));var mu=Do===1?ur:$e.unproject(Ht.add(sr.mult(fn(Ms))).mult(Ys));$e.setLocationAtPoint($e.renderWorldCopies?mu.wrap():mu,lr),Ge._fireMoveEvents(me)},function(){return Ge._afterEase(me)},te),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(te,me){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ge=this._onEaseEnd;delete this._onEaseEnd,Ge.call(this,me)}if(!te){var Le=this.handlers;Le&&Le.stop(!1)}return this},K.prototype._ease=function(te,me,Ge){Ge.animate===!1||Ge.duration===0?(te(1),me()):(this._easeStart=e.browser.now(),this._easeOptions=Ge,this._onEaseFrame=te,this._onEaseEnd=me,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,me){te=e.wrap(te,-180,180);var Ge=Math.abs(te-me);return Math.abs(te-360-me)<Ge&&(te-=360),Math.abs(te+360-me)<Ge&&(te+=360),te},K.prototype._normalizeCenter=function(te){var me=this.transform;if(!(!me.renderWorldCopies||me.lngRange)){var Ge=te.lng-me.center.lng;te.lng+=Ge>180?-360:Ge<-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 _e=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"),_e&&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),_e===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,_e){var te=this._map._getUIString("AttributionControl."+_e);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 _e=[{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=_e.reduce(function(me,Ge,Le){return Ge.value&&(me+=Ge.key+"="+Ge.value+(Le<_e.length-1?"&":"")),me},"?");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(gt){return typeof gt!="string"?"":gt})):typeof this.options.customAttribution=="string"&&K.push(this.options.customAttribution)),this._map.style.stylesheet){var _e=this._map.style.stylesheet;this.styleOwner=_e.owner,this.styleId=_e.id}var te=this._map.style.sourceCaches;for(var me in te){var Ge=te[me];if(Ge.used){var Le=Ge.getSource();Le.attribution&&K.indexOf(Le.attribution)<0&&K.push(Le.attribution)}}K.sort(function(gt,jt){return gt.length-jt.length}),K=K.filter(function(gt,jt){for(var wr=jt+1;wr<K.length;wr++)if(K[wr].indexOf(gt)>=0)return!1;return!0});var $e=K.join(" | ");$e!==this._attribHTML&&(this._attribHTML=$e,K.length?(this._innerContainer.innerHTML=$e,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 _e=r.create("a","mapboxgl-ctrl-logo");return _e.target="_blank",_e.rel="noopener nofollow",_e.href="https://www.mapbox.com/",_e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),_e.setAttribute("rel","noopener nofollow"),this._container.appendChild(_e),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 _e in K){var te=K[_e].getSource();if(te.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var _e=K[0];this._map.getCanvasContainer().offsetWidth<250?_e.classList.add("mapboxgl-compact"):_e.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var _e=++this._id,te=this._queue;return te.push({callback:K,id:_e,cancelled:!1}),_e},Na.prototype.remove=function(K){for(var _e=this._currentlyRunning,te=_e?this._queue.concat(_e):this._queue,me=0,Ge=te;me<Ge.length;me+=1){var Le=Ge[me];if(Le.id===K){Le.cancelled=!0;return}}},Na.prototype.run=function(K){K===void 0&&(K=0);var _e=this._currentlyRunning=this._queue;this._queue=[];for(var te=0,me=_e;te<me.length;te+=1){var Ge=me[te];if(!Ge.cancelled&&(Ge.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,pn=60,Ha={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Va,maxZoom:Bi,minPitch:Li,maxPitch:pn,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(ve){function K(te){var me=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>pn)throw new Error("maxPitch must be less than or equal to "+pn);var Ge=new Jo(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ve.call(this,Ge,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 me._update(!1)}),this.on("moveend",function(){return me._update(!1)}),this.on("zoom",function(){return me._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 Le=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new eu(Le).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(){me.transform.unmodified&&me.jumpTo(me.style.stylesheet)}),this.on("data",function($e){me._update($e.dataType==="style"),me.fire(new e.Event($e.dataType+"data",$e))}),this.on("dataloading",function($e){me.fire(new e.Event($e.dataType+"dataloading",$e))})}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var _e={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(me,Ge){if(Ge===void 0&&(me.getDefaultPosition?Ge=me.getDefaultPosition():Ge="top-right"),!me||!me.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 Le=me.onAdd(this);this._controls.push(me);var $e=this._controlPositions[Ge];return Ge.indexOf("bottom")!==-1?$e.insertBefore(Le,$e.firstChild):$e.appendChild(Le),this},K.prototype.removeControl=function(me){if(!me||!me.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 Ge=this._controls.indexOf(me);return Ge>-1&&this._controls.splice(Ge,1),me.onRemove(this),this},K.prototype.hasControl=function(me){return this._controls.indexOf(me)>-1},K.prototype.resize=function(me){var Ge=this._containerDimensions(),Le=Ge[0],$e=Ge[1];this._resizeCanvas(Le,$e),this.transform.resize(Le,$e),this.painter.resize(Le,$e);var gt=!this._moving;return gt&&(this.stop(),this.fire(new e.Event("movestart",me)).fire(new e.Event("move",me))),this.fire(new e.Event("resize",me)),gt&&this.fire(new e.Event("moveend",me)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(me){return this.transform.setMaxBounds(e.LngLatBounds.convert(me)),this._update()},K.prototype.setMinZoom=function(me){if(me=me??Va,me>=Va&&me<=this.transform.maxZoom)return this.transform.minZoom=me,this._update(),this.getZoom()<me&&this.setZoom(me),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(me){if(me=me??Bi,me>=this.transform.minZoom)return this.transform.maxZoom=me,this._update(),this.getZoom()>me&&this.setZoom(me),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(me){if(me=me??Li,me<Li)throw new Error("minPitch must be greater than or equal to "+Li);if(me>=Li&&me<=this.transform.maxPitch)return this.transform.minPitch=me,this._update(),this.getPitch()<me&&this.setPitch(me),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(me){if(me=me??pn,me>pn)throw new Error("maxPitch must be less than or equal to "+pn);if(me>=this.transform.minPitch)return this.transform.maxPitch=me,this._update(),this.getPitch()>me&&this.setPitch(me),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(me){return this.transform.renderWorldCopies=me,this._update()},K.prototype.project=function(me){return this.transform.locationPoint(e.LngLat.convert(me))},K.prototype.unproject=function(me){return this.transform.pointLocation(e.Point.convert(me))},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(me,Ge,Le){var $e=this,gt;if(me==="mouseenter"||me==="mouseover"){var jt=!1,wr=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length?jt||(jt=!0,Le.call($e,new Fe(me,$e,nr.originalEvent,{features:hr}))):jt=!1},Nr=function(){jt=!1};return{layer:Ge,listener:Le,delegates:{mousemove:wr,mouseout:Nr}}}else if(me==="mouseleave"||me==="mouseout"){var pr=!1,yt=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length?pr=!0:pr&&(pr=!1,Le.call($e,new Fe(me,$e,nr.originalEvent)))},kt=function(nr){pr&&(pr=!1,Le.call($e,new Fe(me,$e,nr.originalEvent)))};return{layer:Ge,listener:Le,delegates:{mousemove:yt,mouseout:kt}}}else{var Bt=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length&&(nr.features=hr,Le.call($e,nr),delete nr.features)};return{layer:Ge,listener:Le,delegates:(gt={},gt[me]=Bt,gt)}}},K.prototype.on=function(me,Ge,Le){if(Le===void 0)return ve.prototype.on.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[me]=this._delegatedListeners[me]||[],this._delegatedListeners[me].push($e);for(var gt in $e.delegates)this.on(gt,$e.delegates[gt]);return this},K.prototype.once=function(me,Ge,Le){if(Le===void 0)return ve.prototype.once.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);for(var gt in $e.delegates)this.once(gt,$e.delegates[gt]);return this},K.prototype.off=function(me,Ge,Le){var $e=this;if(Le===void 0)return ve.prototype.off.call(this,me,Ge);var gt=function(jt){for(var wr=jt[me],Nr=0;Nr<wr.length;Nr++){var pr=wr[Nr];if(pr.layer===Ge&&pr.listener===Le){for(var yt in pr.delegates)$e.off(yt,pr.delegates[yt]);return wr.splice(Nr,1),$e}}};return this._delegatedListeners&&this._delegatedListeners[me]&&gt(this._delegatedListeners),this},K.prototype.queryRenderedFeatures=function(me,Ge){if(!this.style)return[];Ge===void 0&&me!==void 0&&!(me instanceof e.Point)&&!Array.isArray(me)&&(Ge=me,me=void 0),Ge=Ge||{},me=me||[[0,0],[this.transform.width,this.transform.height]];var Le;if(me instanceof e.Point||typeof me[0]=="number")Le=[e.Point.convert(me)];else{var $e=e.Point.convert(me[0]),gt=e.Point.convert(me[1]);Le=[$e,new e.Point(gt.x,$e.y),gt,new e.Point($e.x,gt.y),$e]}return this.style.queryRenderedFeatures(Le,Ge,this.transform)},K.prototype.querySourceFeatures=function(me,Ge){return this.style.querySourceFeatures(me,Ge)},K.prototype.setStyle=function(me,Ge){return Ge=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},Ge),Ge.diff!==!1&&Ge.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&me?(this._diffStyle(me,Ge),this):(this._localIdeographFontFamily=Ge.localIdeographFontFamily,this._updateStyle(me,Ge))},K.prototype._getUIString=function(me){var Ge=this._locale[me];if(Ge==null)throw new Error("Missing UI string '"+me+"'");return Ge},K.prototype._updateStyle=function(me,Ge){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),me)this.style=new Nl(this,Ge||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof me=="string"?this.style.loadURL(me):this.style.loadJSON(me),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(me,Ge){var Le=this;if(typeof me=="string"){var $e=this._requestManager.normalizeStyleURL(me),gt=this._requestManager.transformRequest($e,e.ResourceType.Style);e.getJSON(gt,function(jt,wr){jt?Le.fire(new e.ErrorEvent(jt)):wr&&Le._updateDiff(wr,Ge)})}else typeof me=="object"&&this._updateDiff(me,Ge)},K.prototype._updateDiff=function(me,Ge){try{this.style.setState(me)&&this._update(!0)}catch(Le){e.warnOnce("Unable to perform style diff: "+(Le.message||Le.error||Le)+". Rebuilding the style from scratch."),this._updateStyle(me,Ge)}},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(me,Ge){return this._lazyInitEmptyStyle(),this.style.addSource(me,Ge),this._update(!0)},K.prototype.isSourceLoaded=function(me){var Ge=this.style&&this.style.sourceCaches[me];if(Ge===void 0){this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+me+"'")));return}return Ge.loaded()},K.prototype.areTilesLoaded=function(){var me=this.style&&this.style.sourceCaches;for(var Ge in me){var Le=me[Ge],$e=Le._tiles;for(var gt in $e){var jt=$e[gt];if(!(jt.state==="loaded"||jt.state==="errored"))return!1}}return!0},K.prototype.addSourceType=function(me,Ge,Le){return this._lazyInitEmptyStyle(),this.style.addSourceType(me,Ge,Le)},K.prototype.removeSource=function(me){return this.style.removeSource(me),this._update(!0)},K.prototype.getSource=function(me){return this.style.getSource(me)},K.prototype.addImage=function(me,Ge,Le){Le===void 0&&(Le={});var $e=Le.pixelRatio;$e===void 0&&($e=1);var gt=Le.sdf;gt===void 0&&(gt=!1);var jt=Le.stretchX,wr=Le.stretchY,Nr=Le.content;this._lazyInitEmptyStyle();var pr=0;if(Ge instanceof Ma||di&&Ge instanceof di){var yt=e.browser.getImageData(Ge),kt=yt.width,Bt=yt.height,nr=yt.data;this.style.addImage(me,{data:new e.RGBAImage({width:kt,height:Bt},nr),pixelRatio:$e,stretchX:jt,stretchY:wr,content:Nr,sdf:gt,version:pr})}else{if(Ge.width===void 0||Ge.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=Ge.width,lr=Ge.height,dr=Ge.data,ur=Ge;this.style.addImage(me,{data:new e.RGBAImage({width:hr,height:lr},new Uint8Array(dr)),pixelRatio:$e,stretchX:jt,stretchY:wr,content:Nr,sdf:gt,version:pr,userImage:ur}),ur.onAdd&&ur.onAdd(this,me)}},K.prototype.updateImage=function(me,Ge){var Le=this.style.getImage(me);if(!Le)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 $e=Ge instanceof Ma||di&&Ge instanceof di?e.browser.getImageData(Ge):Ge,gt=$e.width,jt=$e.height,wr=$e.data;if(gt===void 0||jt===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(gt!==Le.data.width||jt!==Le.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=!(Ge instanceof Ma||di&&Ge instanceof di);Le.data.replace(wr,Nr),this.style.updateImage(me,Le)},K.prototype.hasImage=function(me){return me?!!this.style.getImage(me):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},K.prototype.removeImage=function(me){this.style.removeImage(me)},K.prototype.loadImage=function(me,Ge){e.getImage(this._requestManager.transformRequest(me,e.ResourceType.Image),Ge)},K.prototype.listImages=function(){return this.style.listImages()},K.prototype.addLayer=function(me,Ge){return this._lazyInitEmptyStyle(),this.style.addLayer(me,Ge),this._update(!0)},K.prototype.moveLayer=function(me,Ge){return this.style.moveLayer(me,Ge),this._update(!0)},K.prototype.removeLayer=function(me){return this.style.removeLayer(me),this._update(!0)},K.prototype.getLayer=function(me){return this.style.getLayer(me)},K.prototype.setLayerZoomRange=function(me,Ge,Le){return this.style.setLayerZoomRange(me,Ge,Le),this._update(!0)},K.prototype.setFilter=function(me,Ge,Le){return Le===void 0&&(Le={}),this.style.setFilter(me,Ge,Le),this._update(!0)},K.prototype.getFilter=function(me){return this.style.getFilter(me)},K.prototype.setPaintProperty=function(me,Ge,Le,$e){return $e===void 0&&($e={}),this.style.setPaintProperty(me,Ge,Le,$e),this._update(!0)},K.prototype.getPaintProperty=function(me,Ge){return this.style.getPaintProperty(me,Ge)},K.prototype.setLayoutProperty=function(me,Ge,Le,$e){return $e===void 0&&($e={}),this.style.setLayoutProperty(me,Ge,Le,$e),this._update(!0)},K.prototype.getLayoutProperty=function(me,Ge){return this.style.getLayoutProperty(me,Ge)},K.prototype.setLight=function(me,Ge){return Ge===void 0&&(Ge={}),this._lazyInitEmptyStyle(),this.style.setLight(me,Ge),this._update(!0)},K.prototype.getLight=function(){return this.style.getLight()},K.prototype.setFeatureState=function(me,Ge){return this.style.setFeatureState(me,Ge),this._update()},K.prototype.removeFeatureState=function(me,Ge){return this.style.removeFeatureState(me,Ge),this._update()},K.prototype.getFeatureState=function(me){return this.style.getFeatureState(me)},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 me=0,Ge=0;return this._container&&(me=this._container.clientWidth||400,Ge=this._container.clientHeight||300),[me,Ge]},K.prototype._detectMissingCSS=function(){var me=e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");me!=="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 me=this._container;me.classList.add("mapboxgl-map");var Ge=this._missingCSSCanary=r.create("div","mapboxgl-canary",me);Ge.style.visibility="hidden",this._detectMissingCSS();var Le=this._canvasContainer=r.create("div","mapboxgl-canvas-container",me);this._interactive&&Le.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",Le),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 $e=this._containerDimensions();this._resizeCanvas($e[0],$e[1]);var gt=this._controlContainer=r.create("div","mapboxgl-control-container",me),jt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(wr){jt[wr]=r.create("div","mapboxgl-ctrl-"+wr,gt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},K.prototype._resizeCanvas=function(me,Ge){var Le=e.browser.devicePixelRatio||1;this._canvas.width=Le*me,this._canvas.height=Le*Ge,this._canvas.style.width=me+"px",this._canvas.style.height=Ge+"px"},K.prototype._setupPainter=function(){var me=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),Ge=this._canvas.getContext("webgl",me)||this._canvas.getContext("experimental-webgl",me);if(!Ge){this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Zo(Ge,this.transform),e.webpSupported.testSupport(Ge)},K.prototype._contextLost=function(me){me.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:me}))},K.prototype._contextRestored=function(me){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:me}))},K.prototype._onMapScroll=function(me){if(me.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(me){return this.style?(this._styleDirty=this._styleDirty||me,this._sourcesDirty=!0,this.triggerRepaint(),this):this},K.prototype._requestRenderFrame=function(me){return this._update(),this._renderTaskQueue.add(me)},K.prototype._cancelRenderFrame=function(me){this._renderTaskQueue.remove(me)},K.prototype._render=function(me){var Ge=this,Le,$e=0,gt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Le=gt.createQueryEXT(),gt.beginQueryEXT(gt.TIME_ELAPSED_EXT,Le),$e=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(me),!this._removed){var jt=!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()}),yt=pr.crossFadingFactor();(yt!==1||yt!==this._crossFadingFactor)&&(jt=!0,this._crossFadingFactor=yt),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()||jt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var kt=e.browser.now()-$e;gt.endQueryEXT(gt.TIME_ELAPSED_EXT,Le),setTimeout(function(){var hr=gt.getQueryObjectEXT(Le,gt.QUERY_RESULT_EXT)/1e6;gt.deleteQueryEXT(Le),Ge.fire(new e.Event("gpu-timing-frame",{cpuTime:kt,gpuTime:hr}))},50)}if(this.listens("gpu-timing-layer")){var Bt=this.painter.collectGpuTimers();setTimeout(function(){var hr=Ge.painter.queryGpuTimers(Bt);Ge.fire(new e.Event("gpu-timing-layer",{layerTimes:hr}))},50)}var nr=this._sourcesDirty||this._styleDirty||this._placementDirty;return nr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),this._loaded&&!this._fullyLoaded&&!nr&&(this._fullyLoaded=!0),this}},K.prototype.remove=function(){this._hash&&this._hash.remove();for(var me=0,Ge=this._controls;me<Ge.length;me+=1){var Le=Ge[me];Le.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 $e=this.painter.context.gl.getExtension("WEBGL_lose_context");$e&&$e.loseContext&&$e.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 me=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(Ge){me._frame=null,me._render(Ge)}))},K.prototype._onWindowOnline=function(){this._update()},K.prototype._onWindowResize=function(me){this._trackResize&&this.resize({originalEvent:me})._update()},_e.showTileBoundaries.get=function(){return!!this._showTileBoundaries},_e.showTileBoundaries.set=function(te){this._showTileBoundaries!==te&&(this._showTileBoundaries=te,this._update())},_e.showPadding.get=function(){return!!this._showPadding},_e.showPadding.set=function(te){this._showPadding!==te&&(this._showPadding=te,this._update())},_e.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},_e.showCollisionBoxes.set=function(te){this._showCollisionBoxes!==te&&(this._showCollisionBoxes=te,te?this.style._generateCollisionBoxes():this._update())},_e.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},_e.showOverdrawInspector.set=function(te){this._showOverdrawInspector!==te&&(this._showOverdrawInspector=te,this._update())},_e.repaint.get=function(){return!!this._repaint},_e.repaint.set=function(te){this._repaint!==te&&(this._repaint=te,this.triggerRepaint())},_e.vertices.get=function(){return!!this._vertices},_e.vertices.set=function(te){this._vertices=te,this._update()},K.prototype._setCacheLimits=function(me,Ge){e.setCacheLimits(me,Ge)},_e.version.get=function(){return e.version},Object.defineProperties(K.prototype,_e),K}(yn);function Yi(ve){ve.parentNode&&ve.parentNode.removeChild(ve)}var Ri={showCompass:!0,showZoom:!0,visualizePitch:!1},Ti=function(K){var _e=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 _e._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 _e._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){_e.options.visualizePitch?_e._map.resetNorthPitch({},{originalEvent:te}):_e._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(),_e=K===this._map.getMaxZoom(),te=K===this._map.getMinZoom();this._zoomInButton.disabled=_e,this._zoomOutButton.disabled=te,this._zoomInButton.setAttribute("aria-disabled",_e.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,_e){var te=r.create("button",K,this._container);return te.type="button",te.addEventListener("click",_e),te},Ti.prototype._setButtonTitle=function(K,_e){var te=this._map._getUIString("NavigationControl."+_e);K.title=te,K.setAttribute("aria-label",te)};var xi=function(K,_e,te){te===void 0&&(te=!1),this._clickTolerance=10,this.element=_e,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(_e,"mousedown",this.mousedown),r.addEventListener(_e,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(_e,"touchmove",this.touchmove),r.addEventListener(_e,"touchend",this.touchend),r.addEventListener(_e,"touchcancel",this.reset)};xi.prototype.down=function(K,_e){this.mouseRotate.mousedown(K,_e),this.mousePitch&&this.mousePitch.mousedown(K,_e),r.disableDrag()},xi.prototype.move=function(K,_e){var te=this.map,me=this.mouseRotate.mousemoveWindow(K,_e);if(me&&me.bearingDelta&&te.setBearing(te.getBearing()+me.bearingDelta),this.mousePitch){var Ge=this.mousePitch.mousemoveWindow(K,_e);Ge&&Ge.pitchDelta&&te.setPitch(te.getPitch()+Ge.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(ve,K,_e){if(ve=new e.LngLat(ve.lng,ve.lat),K){var te=new e.LngLat(ve.lng-360,ve.lat),me=new e.LngLat(ve.lng+360,ve.lat),Ge=_e.locationPoint(ve).distSqr(K);_e.locationPoint(te).distSqr(K)<Ge?ve=te:_e.locationPoint(me).distSqr(K)<Ge&&(ve=me)}for(;Math.abs(ve.lng-_e.center.lng)>180;){var Le=_e.locationPoint(ve);if(Le.x>=0&&Le.y>=0&&Le.x<=_e.width&&Le.y<=_e.height)break;ve.lng>_e.center.lng?ve.lng-=360:ve.lng+=360}return ve}var mn={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 In(ve,K,_e){var te=ve.classList;for(var me in mn)te.remove("mapboxgl-"+_e+"-anchor-"+me);te.add("mapboxgl-"+_e+"-anchor-"+K)}var Ii=function(ve){function K(_e,te){if(ve.call(this),(_e instanceof e.window.HTMLElement||te)&&(_e=e.extend({element:_e},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=_e&&_e.anchor||"center",this._color=_e&&_e.color||"#3FB1CE",this._scale=_e&&_e.scale||1,this._draggable=_e&&_e.draggable||!1,this._clickTolerance=_e&&_e.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=_e&&_e.rotation||0,this._rotationAlignment=_e&&_e.rotationAlignment||"auto",this._pitchAlignment=_e&&_e.pitchAlignment&&_e.pitchAlignment!=="auto"?_e.pitchAlignment:this._rotationAlignment,!_e||!_e.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var me=r.createNS("http://www.w3.org/2000/svg","svg"),Ge=41,Le=27;me.setAttributeNS(null,"display","block"),me.setAttributeNS(null,"height",Ge+"px"),me.setAttributeNS(null,"width",Le+"px"),me.setAttributeNS(null,"viewBox","0 0 "+Le+" "+Ge);var $e=r.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"stroke","none"),$e.setAttributeNS(null,"stroke-width","1"),$e.setAttributeNS(null,"fill","none"),$e.setAttributeNS(null,"fill-rule","evenodd");var gt=r.createNS("http://www.w3.org/2000/svg","g");gt.setAttributeNS(null,"fill-rule","nonzero");var jt=r.createNS("http://www.w3.org/2000/svg","g");jt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),jt.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 yt=pr[Nr],kt=r.createNS("http://www.w3.org/2000/svg","ellipse");kt.setAttributeNS(null,"opacity","0.04"),kt.setAttributeNS(null,"cx","10.5"),kt.setAttributeNS(null,"cy","5.80029008"),kt.setAttributeNS(null,"rx",yt.rx),kt.setAttributeNS(null,"ry",yt.ry),jt.appendChild(kt)}var Bt=r.createNS("http://www.w3.org/2000/svg","g");Bt.setAttributeNS(null,"fill",this._color);var nr=r.createNS("http://www.w3.org/2000/svg","path");nr.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"),Bt.appendChild(nr);var hr=r.createNS("http://www.w3.org/2000/svg","g");hr.setAttributeNS(null,"opacity","0.25"),hr.setAttributeNS(null,"fill","#000000");var lr=r.createNS("http://www.w3.org/2000/svg","path");lr.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(lr);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 ur=r.createNS("http://www.w3.org/2000/svg","g");ur.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Ht=r.createNS("http://www.w3.org/2000/svg","circle");Ht.setAttributeNS(null,"fill","#000000"),Ht.setAttributeNS(null,"opacity","0.25"),Ht.setAttributeNS(null,"cx","5.5"),Ht.setAttributeNS(null,"cy","5.5"),Ht.setAttributeNS(null,"r","5.4999962");var sr=r.createNS("http://www.w3.org/2000/svg","circle");sr.setAttributeNS(null,"fill","#FFFFFF"),sr.setAttributeNS(null,"cx","5.5"),sr.setAttributeNS(null,"cy","5.5"),sr.setAttributeNS(null,"r","5.4999962"),ur.appendChild(Ht),ur.appendChild(sr),gt.appendChild(jt),gt.appendChild(Bt),gt.appendChild(hr),gt.appendChild(dr),gt.appendChild(ur),me.appendChild(gt),me.setAttributeNS(null,"height",Ge*this._scale+"px"),me.setAttributeNS(null,"width",Le*this._scale+"px"),this._element.appendChild(me),this._offset=e.Point.convert(_e&&_e.offset||[0,-14])}else this._element=_e.element,this._offset=e.Point.convert(_e&&_e.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()}),In(this._element,this._anchor,"marker"),this._popup=null}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=38.1,Ge=13.5,Le=Math.sqrt(Math.pow(Ge,2)/2);te.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-me],"bottom-left":[Le,(me-Ge+Le)*-1],"bottom-right":[-Le,(me-Ge+Le)*-1],left:[Ge,(me-Ge)*-1],right:[-Ge,(me-Ge)*-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 me=te.code,Ge=te.charCode||te.keyCode;(me==="Space"||me==="Enter"||Ge===32||Ge===13)&&this.togglePopup()},K.prototype._onMapClick=function(te){var me=te.originalEvent.target,Ge=this._element;this._popup&&(me===Ge||Ge.contains(me))&&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 me="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?me="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(me="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var Ge="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ge="rotateX(0deg)":this._pitchAlignment==="map"&&(Ge="rotateX("+this._map.getPitch()+"deg)"),(!te||te.type==="moveend")&&(this._pos=this._pos.round()),r.setTransform(this._element,mn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+Ge+" "+me)}},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 me=this._clickTolerance||this._map._clickTolerance;this._isDragging=te.point.dist(this._pointerdownPos)>=me}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),an={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},kn;function Dn(ve){kn!==void 0?ve(kn):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){kn=K.state!=="denied",ve(kn)}):(kn=!!e.window.navigator.geolocation,ve(kn))}var Zn=0,Ds=!1,bl=function(ve){function K(_e){ve.call(this),this.options=e.extend({},an,_e),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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,Zn=0,Ds=!1},K.prototype._isOutOfMapMaxBounds=function(te){var me=this._map.getMaxBounds(),Ge=te.coords;return me&&(Ge.longitude<me.getWest()||Ge.longitude>me.getEast()||Ge.latitude<me.getSouth()||Ge.latitude>me.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 me=new e.LngLat(te.coords.longitude,te.coords.latitude),Ge=te.coords.accuracy,Le=this._map.getBearing(),$e=e.extend({bearing:Le},this.options.fitBoundsOptions);this._map.fitBounds(me.toBounds(Ge),$e,{geolocateSource:!0})},K.prototype._updateMarker=function(te){if(te){var me=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(me).addTo(this._map),this._userLocationDotMarker.setLngLat(me).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,me=this._map.unproject([0,te]),Ge=this._map.unproject([1,te]),Le=me.distanceTo(Ge),$e=Math.ceil(2*this._accuracy/Le);this._circleElement.style.width=$e+"px",this._circleElement.style.height=$e+"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 me=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=me,this._geolocateButton.setAttribute("aria-label",me),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&Ds)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 me=this;if(this._container.addEventListener("contextmenu",function($e){return $e.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 Ge=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ge,this._geolocateButton.setAttribute("aria-label",Ge)}else{var Le=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Le,this._geolocateButton.setAttribute("aria-label",Le)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=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($e){var gt=$e.originalEvent&&$e.originalEvent.type==="resize";!$e.geolocateSource&&me._watchState==="ACTIVE_LOCK"&&!gt&&(me._watchState="BACKGROUND",me._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),me._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),me.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":Zn--,Ds=!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"),Zn++;var te;Zn>1?(te={maximumAge:6e5,timeout:0},Ds=!0):(te=this.options.positionOptions,Ds=!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),po={maxWidth:100,unit:"metric"},Wl=function(K){this.options=e.extend({},po,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(ve,K,_e){var te=_e&&_e.maxWidth||100,me=ve._container.clientHeight/2,Ge=ve.unproject([0,me]),Le=ve.unproject([te,me]),$e=Ge.distanceTo(Le);if(_e&&_e.unit==="imperial"){var gt=3.2808*$e;if(gt>5280){var jt=gt/5280;Sl(K,te,jt,ve._getUIString("ScaleControl.Miles"))}else Sl(K,te,gt,ve._getUIString("ScaleControl.Feet"))}else if(_e&&_e.unit==="nautical"){var wr=$e/1852;Sl(K,te,wr,ve._getUIString("ScaleControl.NauticalMiles"))}else $e>=1e3?Sl(K,te,$e/1e3,ve._getUIString("ScaleControl.Kilometers")):Sl(K,te,$e,ve._getUIString("ScaleControl.Meters"))}function Sl(ve,K,_e,te){var me=tu(_e),Ge=me/_e;ve.style.width=K*Ge+"px",ve.innerHTML=me+"&nbsp;"+te}function kl(ve){var K=Math.pow(10,Math.ceil(-Math.log(ve)/Math.LN10));return Math.round(ve*K)/K}function tu(ve){var K=Math.pow(10,(""+Math.floor(ve)).length-1),_e=ve/K;return _e=_e>=10?10:_e>=5?5:_e>=3?3:_e>=2?2:_e>=1?1:kl(_e),K*_e}var qs=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")};qs.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},qs.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qs.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},qs.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)},qs.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},qs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qs.prototype._isFullscreen=function(){return this._fullscreen},qs.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())},qs.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(", "),Yn=function(ve){function K(_e){ve.call(this),this.options=e.extend(Object.create(pl),_e),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.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 me=e.window.document.createDocumentFragment(),Ge=e.window.document.createElement("body"),Le;for(Ge.innerHTML=te;Le=Ge.firstChild,!!Le;)me.appendChild(Le);return this.setDOMContent(me)},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 me=this,Ge=this._lngLat||this._trackPointer;if(!(!this._map||!Ge||!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(yt){return me._container.classList.add(yt)}),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 Le=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),$e=this.options.anchor,gt=Cl(this.options.offset);if(!$e){var jt=this._container.offsetWidth,wr=this._container.offsetHeight,Nr;Le.y+gt.bottom.y<wr?Nr=["top"]:Le.y>this._map.transform.height-wr?Nr=["bottom"]:Nr=[],Le.x<jt/2?Nr.push("left"):Le.x>this._map.transform.width-jt/2&&Nr.push("right"),Nr.length===0?$e="bottom":$e=Nr.join("-")}var pr=Le.add(gt[$e]).round();r.setTransform(this._container,mn[$e]+" translate("+pr.x+"px,"+pr.y+"px)"),In(this._container,$e,"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(ve){if(ve)if(typeof ve=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ve,2)));return{center:new e.Point(0,0),top:new e.Point(0,ve),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ve),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ve,0),right:new e.Point(-ve,0)}}else if(ve instanceof e.Point||Array.isArray(ve)){var _e=e.Point.convert(ve);return{center:_e,top:_e,"top-left":_e,"top-right":_e,bottom:_e,"bottom-left":_e,"bottom-right":_e,left:_e,right:_e}}else return{center:e.Point.convert(ve.center||[0,0]),top:e.Point.convert(ve.top||[0,0]),"top-left":e.Point.convert(ve["top-left"]||[0,0]),"top-right":e.Point.convert(ve["top-right"]||[0,0]),bottom:e.Point.convert(ve.bottom||[0,0]),"bottom-left":e.Point.convert(ve["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ve["bottom-right"]||[0,0]),left:e.Point.convert(ve.left||[0,0]),right:e.Point.convert(ve.right||[0,0])};else return Cl(new e.Point(0,0))}var Co={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:bl,AttributionControl:zi,ScaleControl:Wl,FullscreenControl:qs,Popup:Yn,Marker:Ii,Style:Nl,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:on,clearPrewarmedResources:hn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ve){e.config.ACCESS_TOKEN=ve},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ve){e.config.API_URL=ve},get workerCount(){return ri.workerCount},set workerCount(ve){ri.workerCount=ve},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ve){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ve},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Co}),S})}}),gV=Xe({"src/plots/mapbox/layers.js"(Z,G){"use strict";var v=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(),c=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},c),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 v.isPlainObject(i)||typeof i=="string"&&i.length>0}function o(n){var i={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);v.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":v.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},c;return i==="geojson"?c="data":i==="vector"?c=typeof s=="string"?"url":"tiles":i==="raster"?(c="tiles",h.tileSize=256):i==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}G.exports=function(i,s,h){var c=new e(i,s);return c.update(h),c}}}),yV=Xe({"src/plots/mapbox/mapbox.js"(Z,G){"use strict";var v=k6(),x=sa(),S=g0(),E=so(),e=Go(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=im(),p=gV();function T(g,b){this.id=b,this.gd=g;var d=g._fullLayout,u=g._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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,d){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 f;u.map?f=new Promise(function(R,L){u.updateMap(g,b,R,L)}):f=new Promise(function(R,L){u.createMap(g,b,R,L)}),d.push(f)},l.createMap=function(g,b,d,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style,b);y.accessToken=f.accesstoken;var L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new v.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.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(d)}).catch(u)},l.updateMap=function(g,b,d,u){var y=this,f=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,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.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(d)}).catch(u)},l.fillBelowLookup=function(g,b){var d=b[this.id],u=d.layers,y,f,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"?f=z.below:F.getBelow&&(f=F.getBelow(z,this)),f===""&&(L=!0),R["trace-"+z.uid]=f||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?f=N.below:L?f="traces":f="",R["layout-"+y]=f}var O={},P,U;for(P in R)f=R[P],O[f]?O[f].push(P):O[f]=[P];for(f in O){var B=O[f];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,d,u,y,f,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,d=b[u.uid];var z=!1;d&&(d.type===u.type?(d.update(L),z=!0):d.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(f=0;f<g.length;f++)if(u=g[f][0].trace,N===u.uid)continue e;d=b[N],d.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,d=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(d.center)),b.setZoom(d.zoom),b.setBearing(d.bearing),b.setPitch(d.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 d(){b.loaded()&&(b.off("render",d),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function d(){g(new Error(m.mapOnErrorMsg))}b.once("error",d),b.once("style.error",d),b.once("source.error",d),b.once("tile.error",d),b.once("layer.error",d)},l.createFramework=function(g){var b=this,d=b.div=document.createElement("div");d.id=b.uid,d.style.position="absolute",b.container.appendChild(d),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 d=this,u=d.gd,y=d.map;y.on("moveend",function(L){if(d.map){var z=u._fullLayout;if(L.originalEvent||d.wheeling){var F=z[d.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,d.getViewEdits(F));var N=d.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",d.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?d.dragging=!1:d.wheeling&&(d.wheeling=!1),z._rehover&&z._rehover()}}),y.on("wheel",function(){d.wheeling=!0}),y.on("mousemove",function(L){var z=d.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},d.xaxis.p2c=function(){return y.unproject(F).lng},d.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===d.id&&u._fullLayout[d.id]&&r.hover(u,L,d.id)},r.hover(u,L,d.id),u._fullLayout._hoversubplot=d.id});function f(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){d.dragging=!0,f()}),y.on("zoomstart",f),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=d.getView();u.emit("plotly_relayouting",d.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[d.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,d.getViewEdits(L));var z=d.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=d.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",d.getViewEditsWithDerived(F))}),d.clearOutline=function(){h(d.dragOptions),s(d.dragOptions.gd)},d.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=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}),d.off("click",b.onClickInPanHandler),n(f)||a(f)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,f)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,d=g._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],d=b.layers,u=this.layerList,y;if(d.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<d.length;y++)u.push(p(this,y,d[y]))}else for(y=0;y<d.length;y++)u[y].update(d[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,d){for(var u in d)this.map[b](g,u,d[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var d=this.map;if(typeof b=="string"){if(b===""){d.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){d.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(" "))}d.addLayer(g)},l.project=function(g){return this.map.project(new v.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),d=b.lng,u=b.lat,y={lon:d,lat:u},f=g.getCanvas(),R=parseInt(f.style.width),L=parseInt(f.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,d=["center","zoom","bearing","pitch"],u={},y=0;y<d.length;y++){var f=d[y];u[b+"."+f]=g[f]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,d=this.getViewEdits(g);return d[b+"._derived"]=g._derived,d};function w(g,b){var d={};if(x.isPlainObject(g))d.id=g.id,d.style=g;else if(typeof g=="string")if(d.id=g,m.styleValuesMapbox.indexOf(g)!==-1)d.style=A(g);else if(m.stylesNonMapbox[g]){d.style=m.stylesNonMapbox[g];var u=d.style.sources["plotly-"+g],y=u?u.tiles:void 0;y&&y[0]&&y[0].slice(-9)==="?api_key="&&(y[0]+=b._mapboxAccessToken)}else d.style=g;else d.id=m.styleValueDflt,d.style=A(m.styleValueDflt);return d.transition={duration:0,delay:0},d}function A(g){return m.styleUrlPrefix+g+"-"+m.styleUrlSuffix}function M(g){return[g.lon,g.lat]}G.exports=T}}),_V=Xe({"src/plots/mapbox/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=o0(),S=hp(),E=Ex();G.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"),c=a("bounds.north");(i===void 0||s===void 0||h===void 0||c===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(m,p){return v.coerce(r,o,E.layers,m,p)}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 c=a("type",h);s&&c!=="raster"&&(c=o.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),c==="circle"&&a("circle.radius"),c==="line"&&(a("line.width"),a("line.dash")),c==="fill"&&a("fill.outlinecolor"),c==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),v.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),MT=Xe({"src/plots/mapbox/index.js"(Z){"use strict";var G=k6(),v=sa(),x=v.strTranslate,S=v.strScale,E=Hh().getSubplotCalcData,e=vd(),t=Hn(),r=es(),o=ou(),a=yV(),n="mapbox",i=Z.constants=im();Z.name=n,Z.attr="subplot",Z.idRoot=n,Z.idRegex=Z.attrRegex=v.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=_V();var h=!0;Z.plot=function(T){h&&(h=!1,v.warn(s));var l=T._fullLayout,_=T.calcdata,w=l._subplots[n];if(G.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var A=c(T,w);G.accessToken=A;for(var M=0;M<w.length;M++){var g=w[M],b=E(_,n,g),d=l[g],u=d._subplot;u||(u=new a(T,g),l[g]._subplot=u),u.viewInitial||(u.viewInitial={center:v.extendFlat({},d.center),zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),u.plot(b,l,T._promises)}},Z.clean=function(p,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(p){for(var T=p._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"),d=T._glimages.append("svg:image");d.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 f=T._glimages.append("g");f.attr("transform",x(_.l+_.w*M.x[0]+10,_.t+_.h*(1-M.y[0])-31)),f.append("path").attr("d",i.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),f.append("path").attr("d",i.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),f.append("path").attr("d",i.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),f.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,p),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 c(p,T){var l=p._fullLayout,_=p._context;if(_.mapboxAccessToken==="")return"";for(var w=[],A=[],M=!1,g=!1,b=0;b<T.length;b++){var d=l[T[b]],u=d.accesstoken;m(d.style)&&(u?v.pushUnique(w,u):(m(d._input.style)&&(v.error("Uses Mapbox map style, but did not set an access token."),M=!0),g=!0)),u&&v.pushUnique(A,u)}if(g){var y=M?i.noAccessTokenErrorMsg:i.missingStyleErrorMsg;throw v.error(y),new Error(y)}return w.length?(w.length>1&&v.warn(i.multipleTokensErrorMsg),w[0]):(A.length&&v.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(p){return typeof p=="string"&&(i.styleValuesMapbox.indexOf(p)!==-1||p.indexOf("mapbox://")===0||p.indexOf("stamen")===0)}Z.updateFx=function(p){for(var T=p._fullLayout,l=T._subplots[n],_=0;_<l.length;_++){var w=T[l[_]]._subplot;w.updateFx(T)}}}}),xV=Xe({"src/traces/scattermapbox/index.js"(Z,G){"use strict";var v=["*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(" ");G.exports={attributes:AT(),supplyDefaults:hV(),colorbar:pp(),formatLabels:M6(),calc:iT(),plot:dV(),hoverPoints:ST().hoverPoints,eventData:vV(),selectPoints:mV(),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:{}}}}),bV=Xe({"lib/scattermapbox.js"(Z,G){"use strict";G.exports=xV()}}),C6=Xe({"src/traces/choroplethmapbox/attributes.js"(Z,G){"use strict";var v=k1(),x=ku(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ru(),t=Qo().extendFlat;G.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:t({},v.marker.line.color,{editType:"plot"}),width:t({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),wV=Xe({"src/traces/choroplethmapbox/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=C6();G.exports=function(e,t,r,o){function a(c,m){return v.coerce(e,t,S,c,m)}var n=a("locations"),i=a("z"),s=a("geojson");if(!v.isArrayOrTypedArray(n)||!n.length||!v.isArrayOrTypedArray(i)||!i.length||!(typeof s=="string"&&s!==""||v.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"}),v.coerceSelectionMarkerOpacity(t,a)}}}),L6=Xe({"src/traces/choroplethmapbox/convert.js"(Z,G){"use strict";var v=rs(),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:{}},c=n._opts={fill:s,line:h,geojson:e()};if(!i)return c;var m=t.extractTraceFeature(a);if(!m)return c;var p=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var f=y.mo;return v(f)?+x.constrain(f,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 d=b.properties;d.fc=p(g.z),_&&(d.mo=_(g)),w&&(d.mlc=w(g)),A&&(d.mlw=A(g)),g.ct=d.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",c.geojson={type:"FeatureCollection",features:m},o(a),c}function o(a){var n=a[0].trace,i=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),c=0;c<a.length;c++){var m=a[c];m.fOut&&(m.fOut.properties.mo2=h.selectedOpacityFn(m))}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}G.exports={convert:r,convertOnSelect:o}}}),TV=Xe({"src/traces/choroplethmapbox/plot.js"(Z,G){"use strict";var v=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(v(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],c=t[s];r.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",c.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],c=t[h];o.addLayer({type:h,id:s[1],source:n,layout:c.layout,paint:c.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)},G.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=v(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}}}),AV=Xe({"src/traces/choroplethmapbox/index.js"(Z,G){"use strict";var v=["*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(" ");G.exports={attributes:C6(),supplyDefaults:wV(),colorbar:n0(),calc:lT(),plot:TV(),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"}}}}),SV=Xe({"lib/choroplethmapbox.js"(Z,G){"use strict";G.exports=AV()}}),P6=Xe({"src/traces/densitymapbox/attributes.js"(Z,G){"use strict";var v=ku(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ru(),e=AT(),t=Qo().extendFlat;G.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})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),MV=Xe({"src/traces/densitymapbox/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=P6();G.exports=function(e,t,r,o){function a(h,c){return v.coerce(e,t,S,h,c)}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"})}}}),EV=Xe({"src/traces/densitymapbox/calc.js"(Z,G){"use strict";var v=rs(),x=sa().isArrayOrTypedArray,S=Hs().BADNUM,E=Tp(),e=sa()._;G.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 c=n[h]={},m=o.lon[h],p=o.lat[h];if(c.lonlat=v(m)&&v(p)?[+m,+p]:[S,S],s){var T=i[h];c.z=v(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}}}),kV=Xe({"src/traces/densitymapbox/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=$n(),E=rc(),e=Hs().BADNUM,t=m0().makeBlank;G.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=[],c,m=a.z,p=a.radius,T=x.isArrayOrTypedArray(m)&&m.length,l=x.isArrayOrTypedArray(p);for(c=0;c<o.length;c++){var _=o[c],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=v(p[c])&&p[c]>0?+p[c]: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,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<b.length;c++)y.push(b[c][0],b[c][1]);var f=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?f: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}}}),CV=Xe({"src/traces/densitymapbox/plot.js"(Z,G){"use strict";var v=kV(),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=v(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],c=o[s];t.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",c.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)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),LV=Xe({"src/traces/densitymapbox/hover.js"(Z,G){"use strict";var v=Go(),x=ST().hoverPoints,S=ST().getExtraText;G.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=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),PV=Xe({"src/traces/densitymapbox/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),IV=Xe({"src/traces/densitymapbox/index.js"(Z,G){"use strict";var v=["*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(" ");G.exports={attributes:P6(),supplyDefaults:MV(),colorbar:n0(),formatLabels:M6(),calc:EV(),plot:CV(),hoverPoints:LV(),eventData:PV(),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"}}}}),RV=Xe({"lib/densitymapbox.js"(Z,G){"use strict";G.exports=IV()}}),DV=Xe({"src/plots/map/styles/arcgis-sat-hybrid.js"(Z,G){G.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"}}}),zV=Xe({"src/plots/map/styles/arcgis-sat.js"(Z,G){G.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=Xe({"src/plots/map/constants.js"(Z,G){"use strict";var v=Jm(),x=DV(),S=zV(),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=v(i);G.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=Xe({"src/plots/map/layout_attributes.js"(Z,G){"use strict";var v=sa(),x=$n().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=G.exports=t({_arrayAttrRegexps:[v.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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),ET=Xe({"src/traces/scattermap/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,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,c=e.marker;G.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({},c.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:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.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:v(),hovertemplatefallback:S()},"calc","nested")}}),I6=Xe({"src/traces/scattermap/constants.js"(Z,G){"use strict";var v=["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"];G.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),FV=Xe({"src/traces/scattermap/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;G.exports=function(i,s,h,c){function m(y,f){return v.coerce(i,s,r,y,f)}function p(y,f){return v.coerce2(i,s,r,y,f)}var T=a(i,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),x.hasMarkers(s)){S(i,s,h,c,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,c,m,{noDash:!0}),m("connectgaps"));var _=p("cluster.maxzoom"),w=p("cluster.step"),A=p("cluster.color",s.marker&&s.marker.color||h),M=p("cluster.size"),g=p("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,d=m("cluster.enabled",b);if(d||x.hasText(s)){var u=c.font.family;e(i,s,c,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:c.font.weight,style:c.font.style,size:c.font.size,color:c.font.color}})}m("fill"),s.fill!=="none"&&t(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(n,i,s){var h=s("lon")||[],c=s("lat")||[],m=Math.min(h.length,c.length);return i._length=m,m}}}),R6=Xe({"src/traces/scattermap/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),D6=Xe({"src/plots/map/convert_text_opts.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(E)?v.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}}}}),OV=Xe({"src/traces/scattermap/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().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;G.exports=function(g,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,y=d.fill!=="none",f=o.hasLines(d),R=o.hasMarkers(d),L=o.hasText(d),z=R&&d.marker.symbol==="circle",F=R&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=c("fill"),P=c("line"),U=c("circle"),B=c("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||f)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":d.fillcolor})),f&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var se=m(b);U.geojson=se.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(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":se.mcc,"circle-radius":se.mrc,"circle-opacity":se.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=p(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),L)){var le=(d.marker||{}).size,fe=n(d.textposition,le);x.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":fe.anchor,"text-offset":fe.offset,"text-font":A(d)}),x.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return X};function c(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(M){var g=M[0].trace,b=g.marker,d=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),f=x.isArrayOrTypedArray(b.opacity),R;function L(le){return g.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;f&&(O=function(le){var fe=v(le)?+x.constrain(le,0,1):0;return L(fe)});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)),d&&(X.selected=U.selected||0),P.push({type:"Feature",id:R+1,geometry:{type:"Point",coordinates:B},properties:X})}}var $;if(d)for($=t.makeSelectedPointStyleFns(g),R=0;R<P.length;R++){var se=P[R].properties;$.selectedOpacityFn&&(se.mo=L($.selectedOpacityFn(se))),$.selectedColorFn&&(se.mcc=$.selectedColorFn(se)),$.selectedSizeFn&&(se.mrc=$.selectedSizeFn(se))}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:f||$&&$.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function p(M,g){for(var b=g._fullLayout,d=M[0].trace,u=d.marker||{},y=u.symbol,f=u.angle,R=y!=="circle"?T(y):l,L=f!=="auto"?T(f,!0):l,z=o.hasText(d)?T(d.text):l,F=[],N=0;N<M.length;N++){var O=M[N];if(!_(O.lonlat)){var P=d.texttemplate,U;if(P){var B=Array.isArray(P)?P[N]||"":P,X=d._module.formatLabels(O,d,b),$={};i($,d,O.i),U=x.texttemplateString({data:[$,O,d._meta],fallback:d.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 v(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 d=1;d<M.length;d++)b.push(g[d-1],M[d])}else b=M;return b}function A(M){var g=M.textfont,b=g.family,d=g.style,u=g.weight,y=b.split(" "),f=y[y.length-1]==="Italic";f&&y.pop(),f=f||d==="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")),f&&(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}}}),BV=Xe({"src/traces/scattermap/plot.js"(Z,G){"use strict";var v=sa(),x=OV(),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&&v.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(),c=0;c<h.length;c++)if(h[c].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],c=!!(a.cluster&&a.cluster.enabled),m=!!this.clusterEnabled,p=this;function T(u){u||p.addSource("circle",s.circle,a.cluster);for(var y=E.cluster,f=0;f<y.length;f++){var R=y[f],L=s[R];p.addLayer(R,L,h)}}function l(u){for(var y=E.cluster,f=y.length-1;f>=0;f--){var R=y[f];i.removeLayer(p.layerIds[R])}u||i.removeSource(p.sourceIds.circle)}function _(u){for(var y=E.nonCluster,f=0;f<y.length;f++){var R=y[f],L=s[R];u||p.addSource(R,L),p.addLayer(R,L,h)}}function w(u){for(var y=E.nonCluster,f=y.length-1;f>=0;f--){var R=y[f];i.removeLayer(p.layerIds[R]),u||i.removeSource(p.sourceIds[R])}}function A(u){m?l(u):w(u)}function M(u){c?T(u):_(u)}function g(){for(var u=c?E.cluster:E.nonCluster,y=0;y<u.length;y++){var f=u[y],R=s[f];R&&(n.setOptions(p.layerIds[f],"setLayoutProperty",R.layout),R.layout.visibility==="visible"&&(f!=="cluster"&&p.setSourceData(f,R),n.setOptions(p.layerIds[f],"setPaintProperty",R.paint)))}}var b=this.isHidden,d=a.visible!==!0;d?b||A():b?d||M():m!==c?(A(),M()):(this.below!==h&&(A(!0),M(!0)),g()),this.clusterEnabled=c,this.isHidden=d,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])}},G.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),c=x(o.gd,a),m=h.below=o.belowLookup["trace-"+n.uid],p,T,l;if(i)for(h.addSource("circle",c.circle,n.cluster),p=0;p<E.cluster.length;p++)T=E.cluster[p],l=c[T],h.addLayer(T,l,m);else for(p=0;p<E.nonCluster.length;p++)T=E.nonCluster[p],l=c[T],h.addSource(T,l,n.cluster),h.addLayer(T,l,m);return a[0].trace._glTrace=h,h}}}),kT=Xe({"src/traces/scattermap/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=l1(),E=x.fillText,e=Hs().BADNUM,t=b0().traceLayerPrefix;function r(a,n,i){var s=a.cd,h=s[0].trace,c=a.xa,m=a.ya,p=a.subplot,T=[],l=t+h.uid+"-circle",_=h.cluster&&h.cluster.enabled;if(_){var w=p.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=p.project([P,U]),X=B.x-c.c2p([g,U]),$=B.y-m.c2p([P,i]),se=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-se,1-3/se)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],f=c.c2p(y),R=m.c2p(y),L=d.mrc||1;a.x0=f-L,a.x1=f+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:p};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,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("+"),c=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,p=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return c||m&&p?l.push("("+_(T[1])+", "+_(T[0])+")"):m?l.push(i.lon+_(T[0])):p&&l.push(i.lat+_(T[1])),(c||h.indexOf("text")!==-1)&&E(n,a,l),l.join("<br>")}G.exports={hoverPoints:r,getExtraText:o}}}),NV=Xe({"src/traces/scattermap/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),UV=Xe({"src/traces/scattermap/select.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=Hs().BADNUM;G.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],c=h.lonlat;if(c[0]!==S){var m=[v.modHalf(c[0],360),c[1]],p=[o.c2p(m),a.c2p(m)];t.contains(p,null,s,e)?(n.push({pointNumber:s,lon:c[0],lat:c[1]}),h.selected=1):h.selected=0}}return n}}}),jV=Xe({"node_modules/maplibre-gl/dist/maplibre-gl.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?G.exports=x():(v=typeof globalThis<"u"?globalThis:v||self,v.maplibregl=x())})(Z,function(){"use strict";var v={},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(v,a),typeof window<"u"&&v.setWorkerUrl(window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))),v}}S("shared",["exports"],function(e){"use strict";function t(W,D,J,pe){return new(J||(J=Promise))(function(ke,je){function We(Ut){try{Et(pe.next(Ut))}catch(or){je(or)}}function ht(Ut){try{Et(pe.throw(Ut))}catch(or){je(or)}}function Et(Ut){var or;Ut.done?ke(Ut.value):(or=Ut.value,or instanceof J?or:new J(function(Mr){Mr(or)})).then(We,ht)}Et((pe=pe.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),pe=J*this.x+D*this.y;return this.x=D*this.x-J*this.y,this.y=pe,this},_rotateAround:function(W,D){var J=Math.cos(W),pe=Math.sin(W),ke=D.y+pe*(this.x-D.x)+J*(this.y-D.y);return this.x=D.x+J*(this.x-D.x)-pe*(this.y-D.y),this.y=ke,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,pe){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*(pe-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=pe}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,pe=0;pe<8;pe++){var ke=this.sampleCurveX(J)-W;if(Math.abs(ke)<D)return J;var je=this.sampleCurveDerivativeX(J);if(Math.abs(je)<1e-6)break;J-=ke/je}var We=0,ht=1;for(J=W,pe=0;pe<20&&(ke=this.sampleCurveX(J),!(Math.abs(ke-W)<D));pe++)W>ke?We=J:ht=J,J=.5*(ht-We)+We;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var h=r(i);let c,m;function p(){return c==null&&(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function T(){if(m==null&&(m=!1,p())){let D=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(D){for(let pe=0;pe<5*5;pe++){let ke=4*pe;D.fillStyle=`rgb(${ke},${ke+1},${ke+2})`,D.fillRect(pe%5,Math.floor(pe/5),1,1)}let J=D.getImageData(0,0,5,5).data;for(let pe=0;pe<5*5*4;pe++)if(pe%4!=3&&J[pe]!==pe){m=!0;break}}}return m||!1}function l(W,D,J,pe){let ke=new h(W,D,J,pe);return je=>ke.solve(je)}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 pe=J-D,ke=((W-D)%pe+pe)%pe+D;return ke===D?J:ke}function M(W,...D){for(let J of D)for(let pe in J)W[pe]=J[pe];return W}let g=1;function b(W,D,J){let pe={};for(let ke in W)pe[ke]=D.call(this,W[ke],ke,W);return pe}function d(W,D,J){let pe={};for(let ke in W)D.call(this,W[ke],ke,W)&&(pe[ke]=W[ke]);return pe}function u(W){return Array.isArray(W)?W.map(u):typeof W=="object"&&W?b(W,u):W}let y={};function f(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,pe,ke){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let je=new VideoFrame(W,{timestamp:0});try{let We=je?.format;if(!We||!We.startsWith("BGR")&&!We.startsWith("RGB"))throw new Error(`Unrecognized format ${We}`);let ht=We.startsWith("BGR"),Et=new Uint8ClampedArray(pe*ke*4);if(yield je.copyTo(Et,function(Ut,or,Mr,zr,Wr){let ia=4*Math.max(-or,0),ha=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,or),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Ut.width,or+zr)-Ka,height:Math.min(Ut.height,Mr+Wr)-Wi},layout:[{offset:ha,stride:ja}]}}(W,D,J,pe,ke)),ht)for(let Ut=0;Ut<Et.length;Ut+=4){let or=Et[Ut];Et[Ut]=Et[Ut+2],Et[Ut+2]=or}return Et}finally{je.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 se(W){return $.REGISTERED_PROTOCOLS[W.substring(0,W.indexOf("://"))]}let le="global-dispatcher";class fe extends Error{constructor(D,J,pe,ke){super(`AJAXError: ${J} (${D}): ${pe}`),this.status=D,this.statusText=J,this.url=pe,this.body=ke}}let V=()=>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 pe=se(W.url);if(pe)return pe(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,targetMapId:le},D)}if(!(/^file:/.test(J=W.url)||/^file:/.test(V())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(pe,ke){return t(this,void 0,void 0,function*(){let je=new Request(pe.url,{method:pe.method||"GET",body:pe.body,credentials:pe.credentials,headers:pe.headers,cache:pe.cache,referrer:V(),signal:ke.signal});pe.type!=="json"||je.headers.has("Accept")||je.headers.set("Accept","application/json");let We=yield fetch(je);if(!We.ok){let Ut=yield We.blob();throw new fe(We.status,We.statusText,pe.url,Ut)}let ht;ht=pe.type==="arrayBuffer"||pe.type==="image"?We.arrayBuffer():pe.type==="json"?We.json():We.text();let Et=yield ht;if(ke.signal.aborted)throw X();return{data:Et,cacheControl:We.headers.get("Cache-Control"),expires:We.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:le},D)}var J;return function(pe,ke){return new Promise((je,We)=>{var ht;let Et=new XMLHttpRequest;Et.open(pe.method||"GET",pe.url,!0),pe.type!=="arrayBuffer"&&pe.type!=="image"||(Et.responseType="arraybuffer");for(let Ut in pe.headers)Et.setRequestHeader(Ut,pe.headers[Ut]);pe.type==="json"&&(Et.responseType="text",!((ht=pe.headers)===null||ht===void 0)&&ht.Accept||Et.setRequestHeader("Accept","application/json")),Et.withCredentials=pe.credentials==="include",Et.onerror=()=>{We(new Error(Et.statusText))},Et.onload=()=>{if(!ke.signal.aborted)if((Et.status>=200&&Et.status<300||Et.status===0)&&Et.response!==null){let Ut=Et.response;if(pe.type==="json")try{Ut=JSON.parse(Et.response)}catch(or){return void We(or)}je({data:Ut,cacheControl:Et.getResponseHeader("Cache-Control"),expires:Et.getResponseHeader("Expires")})}else{let Ut=new Blob([Et.response],{type:Et.getResponseHeader("Content-Type")});We(new fe(Et.status,Et.statusText,pe.url,Ut))}},ke.signal.addEventListener("abort",()=>{Et.abort(),We(X())}),Et.send(pe.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 oe(W,D,J){if(J&&J[W]){let pe=J[W].indexOf(D);pe!==-1&&J[W].splice(pe,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 oe(D,J,this._listeners),oe(D,J,this._oneTimeListeners),this}once(D,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},q(D,J,this._oneTimeListeners),this):new Promise(pe=>this.once(D,pe))}fire(D,J){typeof D=="string"&&(D=new ae(D,J||{}));let pe=D.type;if(this.listens(pe)){D.target=this;let ke=this._listeners&&this._listeners[pe]?this._listeners[pe].slice():[];for(let ht of ke)ht.call(this,D);let je=this._oneTimeListeners&&this._oneTimeListeners[pe]?this._oneTimeListeners[pe].slice():[];for(let ht of je)oe(pe,ht,this._oneTimeListeners),ht.call(this,D);let We=this._eventedParent;We&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),We.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 ce=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function be(W,D){let J={};for(let pe in W)pe!=="ref"&&(J[pe]=W[pe]);return ce.forEach(pe=>{pe in D&&(J[pe]=D[pe])}),J}function Ae(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(!Ae(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(!Ae(W[J],D[J]))return!1;return!0}return W===D}function De(W,D){W.push(D)}function ze(W,D,J){De(J,{command:"addSource",args:[W,D[W]]})}function Ze(W,D,J){De(D,{command:"removeSource",args:[W]}),J[W]=!0}function at(W,D,J,pe){Ze(W,J,pe),ze(W,D,J)}function nt(W,D,J){let pe;for(pe in W[J])if(Object.prototype.hasOwnProperty.call(W[J],pe)&&pe!=="data"&&!Ae(W[J][pe],D[J][pe]))return!1;for(pe in D[J])if(Object.prototype.hasOwnProperty.call(D[J],pe)&&pe!=="data"&&!Ae(W[J][pe],D[J][pe]))return!1;return!0}function rt(W,D,J,pe,ke,je){W=W||{},D=D||{};for(let We in W)Object.prototype.hasOwnProperty.call(W,We)&&(Ae(W[We],D[We])||J.push({command:je,args:[pe,We,D[We],ke]}));for(let We in D)Object.prototype.hasOwnProperty.call(D,We)&&!Object.prototype.hasOwnProperty.call(W,We)&&(Ae(W[We],D[We])||J.push({command:je,args:[pe,We,D[We],ke]}))}function st(W){return W.id}function Me(W,D){return W[D.id]=D,W}class ye{constructor(D,J,pe,ke){this.message=(D?`${D}: `:"")+pe,ke&&(this.identifier=ke),J!=null&&J.__line__&&(this.line=J.__line__)}}function he(W,...D){for(let J of D)for(let pe in J)W[pe]=J[pe];return W}class Oe extends Error{constructor(D,J){super(J),this.message=J,this.key=D}}class tt{constructor(D,J=[]){this.parent=D,this.bindings={};for(let[pe,ke]of J)this.bindings[pe]=ke}concat(D){return new tt(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 ot={kind:"null"},Qe={kind:"number"},Pt={kind:"string"},It={kind:"boolean"},qt={kind:"color"},Wt={kind:"object"},kr={kind:"value"},mr={kind:"collator"},qr={kind:"formatted"},Sr={kind:"padding"},Rr={kind:"resolvedImage"},wt={kind:"variableAnchorOffsetCollection"};function Ne(W,D){return{kind:"array",itemType:W,N:D}}function Ke(W){if(W.kind==="array"){let D=Ke(W.itemType);return typeof W.N=="number"?`array<${D}, ${W.N}>`:W.itemType.kind==="value"?"array":`array<${D}>`}return W.kind}let Te=[ot,Qe,Pt,It,qt,qr,Wt,Ne(kr),Sr,Rr,wt];function Ie(W,D){if(D.kind==="error")return null;if(W.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!Ie(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 Te)if(!Ie(J,D))return null}}return`Expected ${Ke(W)} but found ${Ke(D)} instead.`}function Ve(W,D){return D.some(J=>J.kind===W.kind)}function Ce(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 Ee(W,D){return W.kind==="array"&&D.kind==="array"?W.itemType.kind===D.itemType.kind&&typeof W.N=="number":W.kind===D.kind}let Pe=.96422,ft=.82521,ct=4/29,_t=6/29,Ct=3*_t*_t,ir=_t*_t*_t,rr=Math.PI/180,er=180/Math.PI;function Lr(W){return(W%=360)<0&&(W+=360),W}function fa([W,D,J,pe]){let ke,je,We=Ia((.2225045*(W=Da(W))+.7168786*(D=Da(D))+.0606169*(J=Da(J)))/1);W===D&&D===J?ke=je=We:(ke=Ia((.4360747*W+.3850649*D+.1430804*J)/Pe),je=Ia((.0139322*W+.0971045*D+.7141733*J)/ft));let ht=116*We-16;return[ht<0?0:ht,500*(ke-We),200*(We-je),pe]}function Da(W){return W<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Ia(W){return W>ir?Math.pow(W,1/3):W/Ct+ct}function qa([W,D,J,pe]){let ke=(W+16)/116,je=isNaN(D)?ke:ke+D/500,We=isNaN(J)?ke:ke-J/200;return ke=1*Ca(ke),je=Pe*Ca(je),We=ft*Ca(We),[Wa(3.1338561*je-1.6168667*ke-.4906146*We),Wa(-.9787684*je+1.9161415*ke+.033454*We),Wa(.0719453*je-.2289914*ke+1.4052427*We),pe]}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>_t?W*W*W:Ct*(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 Ft(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,pe,ke=1,je=!0){this.r=D,this.g=J,this.b=pe,this.a=ke,je||(this.r*=ke,this.g*=ke,this.b*=ke,ke||this.overwriteGetter("rgb",[D,J,pe,ke]))}static parse(D){if(D instanceof Jt)return D;if(typeof D!="string")return;let J=function(pe){if((pe=pe.toLowerCase().trim())==="transparent")return[0,0,0,0];let ke=Yt[pe];if(ke){let[We,ht,Et]=ke;return[We/255,ht/255,Et/255,1]}if(pe.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(pe)){let We=pe.length<6?1:2,ht=1;return[hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+We)||"ff")]}if(pe.startsWith("rgb")){let We=pe.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(We){let[ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi]=We,gi=[or||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Ut,zr,ha].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let qn=[Kt(+Et/en,0,1),Kt(+Mr/en,0,1),Kt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Ft(qn))return qn}}return}}let je=pe.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(je){let[We,ht,Et,Ut,or,Mr,zr,Wr,ia]=je,ha=[Et||" ",or||" ",zr].join("");if(ha===" "||ha===" /"||ha===",,"||ha===",,,"){let ja=[+ht,Kt(+Ut,0,100),Kt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Ft(ja))return function([Ka,Wi,gi,qi]){function en(qn){let Eo=(qn+Ka/30)%12,ys=Wi*Math.min(gi,1-gi);return gi-ys*Math.max(-1,Math.min(Eo-3,9-Eo,1))}return Ka=Lr(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:pe,a:ke}=this,je=ke||1/0;return this.overwriteGetter("rgb",[D/je,J/je,pe/je,ke])}get hcl(){return this.overwriteGetter("hcl",function(D){let[J,pe,ke,je]=fa(D),We=Math.sqrt(pe*pe+ke*ke);return[Math.round(1e4*We)?Lr(Math.atan2(ke,pe)*er):NaN,We,J,je]}(this.rgb))}get lab(){return this.overwriteGetter("lab",fa(this.rgb))}overwriteGetter(D,J){return Object.defineProperty(this,D,{value:J}),J}toString(){let[D,J,pe,ke]=this.rgb;return`rgba(${[D,J,pe].map(je=>Math.round(255*je)).join(",")},${ke})`}}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,pe){this.sensitivity=D?J?"variant":"case":J?"accent":"base",this.locale=pe,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,pe,ke,je){this.text=D,this.image=J,this.scale=pe,this.fontStack=ke,this.textColor=je}}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 pe=D[J],ke=D[J+1];if(typeof pe!="string"||!Ba.has(pe)||!Array.isArray(ke)||ke.length!==2||typeof ke[0]!="number"||typeof ke[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,pe){return typeof W=="number"&&W>=0&&W<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof J=="number"&&J>=0&&J<=255?pe===void 0||typeof pe=="number"&&pe>=0&&pe<=1?null:`Invalid rgba value [${[W,D,J,pe].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof pe=="number"?[W,D,J,pe]:[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 ot;if(typeof W=="string")return Pt;if(typeof W=="boolean")return It;if(typeof W=="number")return Qe;if(W instanceof Jt)return qt;if(W instanceof Fr)return mr;if(W instanceof ra)return qr;if(W instanceof ca)return Sr;if(W instanceof $a)return wt;if(W instanceof Za)return Rr;if(Array.isArray(W)){let D=W.length,J;for(let pe of W){let ke=Ra(pe);if(J){if(J===ke)continue;J=kr;break}J=ke}return Ne(J||kr,D)}return Wt}function tn(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 on{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 pe=D[1],ke=Ra(pe),je=J.expectedType;return ke.kind!=="array"||ke.N!==0||!je||je.kind!=="array"||typeof je.N=="number"&&je.N!==0||(ke=je),new on(ke,pe)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class hn{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Tt={string:Pt,number:Qe,boolean:It,object:Wt};class ut{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 pe,ke=1,je=D[0];if(je==="array"){let ht,Et;if(D.length>2){let Ut=D[1];if(typeof Ut!="string"||!(Ut in Tt)||Ut==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ht=Tt[Ut],ke++}else ht=kr;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);Et=D[2],ke++}pe=Ne(ht,Et)}else{if(!Tt[je])throw new Error(`Types doesn't contain name = ${je}`);pe=Tt[je]}let We=[];for(;ke<D.length;ke++){let ht=J.parse(D[ke],ke,kr);if(!ht)return null;We.push(ht)}return new ut(pe,We)}evaluate(D){for(let J=0;J<this.args.length;J++){let pe=this.args[J].evaluate(D);if(!Ie(this.type,Ra(pe)))return pe;if(J===this.args.length-1)throw new hn(`Expected value to be of type ${Ke(this.type)}, but found ${Ke(Ra(pe))} instead.`)}throw new Error}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br={"to-boolean":It,"to-color":qt,"to-number":Qe,"to-string":Pt};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 pe=D[0];if(!Br[pe])throw new Error(`Can't parse ${pe} as it is not part of the known types`);if((pe==="to-boolean"||pe==="to-string")&&D.length!==2)return J.error("Expected one argument.");let ke=Br[pe],je=[];for(let We=1;We<D.length;We++){let ht=J.parse(D[We],We,kr);if(!ht)return null;je.push(ht)}return new Cr(ke,je)}evaluate(D){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(D);case"color":{let J,pe;for(let ke of this.args){if(J=ke.evaluate(D),pe=null,J instanceof Jt)return J;if(typeof J=="string"){let je=D.parseColor(J);if(je)return je}else if(Array.isArray(J)&&(pe=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]),!pe))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new hn(pe||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let pe of this.args){J=pe.evaluate(D);let ke=ca.parse(J);if(ke)return ke}throw new hn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let pe of this.args){J=pe.evaluate(D);let ke=$a.parse(J);if(ke)return ke}throw new hn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let pe of this.args){if(J=pe.evaluate(D),J===null)return 0;let ke=Number(J);if(!isNaN(ke))return ke}throw new hn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(tn(this.args[0].evaluate(D)));case"resolvedImage":return Za.fromString(tn(this.args[0].evaluate(D)));default:return tn(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 Ir{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,pe=[],ke,je=new tt,We=[]){this.registry=D,this.path=pe,this.key=pe.map(ht=>`[${ht}]`).join(""),this.scope=je,this.errors=We,this.expectedType=ke,this._isConstant=J}parse(D,J,pe,ke,je={}){return J?this.concat(J,pe,ke)._parse(D,je):this._parse(D,je)}_parse(D,J){function pe(ke,je,We){return We==="assert"?new ut(je,[ke]):We==="coerce"?new Cr(je,[ke]):ke}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 ke=D[0];if(typeof ke!="string")return this.error(`Expression name must be a string, but found ${typeof ke} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let je=this.registry[ke];if(je){let We=je.parse(D,this);if(!We)return null;if(this.expectedType){let ht=this.expectedType,Et=We.type;if(ht.kind!=="string"&&ht.kind!=="number"&&ht.kind!=="boolean"&&ht.kind!=="object"&&ht.kind!=="array"||Et.kind!=="value")if(ht.kind!=="color"&&ht.kind!=="formatted"&&ht.kind!=="resolvedImage"||Et.kind!=="value"&&Et.kind!=="string")if(ht.kind!=="padding"||Et.kind!=="value"&&Et.kind!=="number"&&Et.kind!=="array")if(ht.kind!=="variableAnchorOffsetCollection"||Et.kind!=="value"&&Et.kind!=="array"){if(this.checkSubtype(ht,Et))return null}else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"assert")}if(!(We instanceof on)&&We.type.kind!=="resolvedImage"&&this._isConstant(We)){let ht=new Ir;try{We=new on(We.type,We.evaluate(ht))}catch(Et){return this.error(Et.message),null}}return We}return this.error(`Unknown expression "${ke}". 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,pe){let ke=typeof D=="number"?this.path.concat(D):this.path,je=pe?this.scope.concat(pe):this.scope;return new Ur(this.registry,this._isConstant,ke,J||null,je,this.errors)}error(D,...J){let pe=`${this.key}${J.map(ke=>`[${ke}]`).join("")}`;this.errors.push(new Oe(pe,D))}checkSubtype(D,J){let pe=Ie(D,J);return pe&&this.error(pe),pe}}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 pe=[];for(let je=1;je<D.length-1;je+=2){let We=D[je];if(typeof We!="string")return J.error(`Expected string, but found ${typeof We} instead.`,je);if(/[^a-zA-Z0-9_]/.test(We))return J.error("Variable names must contain only alphanumeric characters or '_'.",je);let ht=J.parse(D[je+1],je+1);if(!ht)return null;pe.push([We,ht])}let ke=J.parse(D[D.length-1],D.length-1,J.expectedType,pe);return ke?new Hr(pe,ke):null}outputDefined(){return this.result.outputDefined()}}class xt{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 pe=D[1];return J.scope.has(pe)?new xt(pe,J.scope.get(pe)):J.error(`Unknown variable "${pe}". Make sure "${pe}" 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,pe){this.type=D,this.index=J,this.input=pe}static parse(D,J){if(D.length!==3)return J.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1,Qe),ke=J.parse(D[2],2,Ne(J.expectedType||kr));return pe&&ke?new Xt(ke.type.itemType,pe,ke):null}evaluate(D){let J=this.index.evaluate(D),pe=this.input.evaluate(D);if(J<0)throw new hn(`Array index out of bounds: ${J} < 0.`);if(J>=pe.length)throw new hn(`Array index out of bounds: ${J} > ${pe.length-1}.`);if(J!==Math.floor(J))throw new hn(`Array index must be an integer, but found ${J} instead.`);return pe[J]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class vr{constructor(D,J){this.type=It,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 pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,kr);return pe&&ke?Ve(pe.type,[It,Pt,Qe,ot,kr])?new vr(pe,ke):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`):null}evaluate(D){let J=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!pe)return!1;if(!Ce(J,["boolean","string","number","null"]))throw new hn(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(Ra(J))} instead.`);if(!Ce(pe,["string","array"]))throw new hn(`Expected second argument to be of type array or string, but found ${Ke(Ra(pe))} instead.`);return pe.indexOf(J)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class Or{constructor(D,J,pe){this.type=Qe,this.needle=D,this.haystack=J,this.fromIndex=pe}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 pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,kr);if(!pe||!ke)return null;if(!Ve(pe.type,[It,Pt,Qe,ot,kr]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=J.parse(D[3],3,Qe);return je?new Or(pe,ke,je):null}return new Or(pe,ke)}evaluate(D){let J=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!Ce(J,["boolean","string","number","null"]))throw new hn(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(Ra(J))} instead.`);let ke;if(this.fromIndex&&(ke=this.fromIndex.evaluate(D)),Ce(pe,["string"])){let je=pe.indexOf(J,ke);return je===-1?-1:[...pe.slice(0,je)].length}if(Ce(pe,["array"]))return pe.indexOf(J,ke);throw new hn(`Expected second argument to be of type array or string, but found ${Ke(Ra(pe))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class ba{constructor(D,J,pe,ke,je,We){this.inputType=D,this.type=J,this.input=pe,this.cases=ke,this.outputs=je,this.otherwise=We}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 pe,ke;J.expectedType&&J.expectedType.kind!=="value"&&(ke=J.expectedType);let je={},We=[];for(let Ut=2;Ut<D.length-1;Ut+=2){let or=D[Ut],Mr=D[Ut+1];Array.isArray(or)||(or=[or]);let zr=J.concat(Ut);if(or.length===0)return zr.error("Expected at least one branch label.");for(let ia of or){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(pe){if(zr.checkSubtype(pe,Ra(ia)))return null}else pe=Ra(ia);if(je[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");je[String(ia)]=We.length}let Wr=J.parse(Mr,Ut,ke);if(!Wr)return null;ke=ke||Wr.type,We.push(Wr)}let ht=J.parse(D[1],1,kr);if(!ht)return null;let Et=J.parse(D[D.length-1],D.length-1,ke);return Et?ht.type.kind!=="value"&&J.concat(1).checkSubtype(pe,ht.type)?null:new ba(pe,ke,ht,je,We,Et):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,pe){this.type=D,this.branches=J,this.otherwise=pe}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 pe;J.expectedType&&J.expectedType.kind!=="value"&&(pe=J.expectedType);let ke=[];for(let We=1;We<D.length-1;We+=2){let ht=J.parse(D[We],We,It);if(!ht)return null;let Et=J.parse(D[We+1],We+1,pe);if(!Et)return null;ke.push([ht,Et]),pe=pe||Et.type}let je=J.parse(D[D.length-1],D.length-1,pe);if(!je)return null;if(!pe)throw new Error("Can't infer output type");return new Pa(pe,ke,je)}evaluate(D){for(let[J,pe]of this.branches)if(J.evaluate(D))return pe.evaluate(D);return this.otherwise.evaluate(D)}eachChild(D){for(let[J,pe]of this.branches)D(J),D(pe);D(this.otherwise)}outputDefined(){return this.branches.every(([D,J])=>J.outputDefined())&&this.otherwise.outputDefined()}}class ya{constructor(D,J,pe,ke){this.type=D,this.input=J,this.beginIndex=pe,this.endIndex=ke}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 pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,Qe);if(!pe||!ke)return null;if(!Ve(pe.type,[Ne(kr),Pt,kr]))return J.error(`Expected first argument to be of type array or string, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=J.parse(D[3],3,Qe);return je?new ya(pe.type,pe,ke,je):null}return new ya(pe.type,pe,ke)}evaluate(D){let J=this.input.evaluate(D),pe=this.beginIndex.evaluate(D),ke;if(this.endIndex&&(ke=this.endIndex.evaluate(D)),Ce(J,["string"]))return[...J].slice(pe,ke).join("");if(Ce(J,["array"]))return J.slice(pe,ke);throw new hn(`Expected first argument to be of type array or string, but found ${Ke(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,pe,ke,je=0,We=J,ht=0;for(;je<=We;)if(ht=Math.floor((je+We)/2),pe=W[ht],ke=W[ht+1],pe<=D){if(ht===J||D<ke)return ht;je=ht+1}else{if(!(pe>D))throw new hn("Input is not a number.");We=ht-1}return 0}class Ta{constructor(D,J,pe){this.type=D,this.input=J,this.labels=[],this.outputs=[];for(let[ke,je]of pe)this.labels.push(ke),this.outputs.push(je)}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 pe=J.parse(D[1],1,Qe);if(!pe)return null;let ke=[],je=null;J.expectedType&&J.expectedType.kind!=="value"&&(je=J.expectedType);for(let We=1;We<D.length;We+=2){let ht=We===1?-1/0:D[We],Et=D[We+1],Ut=We,or=We+1;if(typeof ht!="number")return J.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ut);if(ke.length&&ke[ke.length-1][0]>=ht)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ut);let Mr=J.parse(Et,or,je);if(!Mr)return null;je=je||Mr.type,ke.push([ht,Mr])}return new Ta(je,pe,ke)}evaluate(D){let J=this.labels,pe=this.outputs;if(J.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=J[0])return pe[0].evaluate(D);let je=J.length;return ke>=J[je-1]?pe[je-1].evaluate(D):pe[la(J,ke)].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,pe){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*(pe-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=pe}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,pe=0;pe<8;pe++){var ke=this.sampleCurveX(J)-W;if(Math.abs(ke)<D)return J;var je=this.sampleCurveDerivativeX(J);if(Math.abs(je)<1e-6)break;J-=ke/je}var We=0,ht=1;for(J=W,pe=0;pe<20&&(ke=this.sampleCurveX(J),!(Math.abs(ke-W)<D));pe++)W>ke?We=J:ht=J,J=.5*(ht-We)+We;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var _n=Ai(ki);function Rn(W,D,J){return W+J*(D-W)}function En(W,D,J){return W.map((pe,ke)=>Rn(pe,D[ke],J))}let On={number:Rn,color:function(W,D,J,pe="rgb"){switch(pe){case"rgb":{let[ke,je,We,ht]=En(W.rgb,D.rgb,J);return new Jt(ke,je,We,ht,!1)}case"hcl":{let[ke,je,We,ht]=W.hcl,[Et,Ut,or,Mr]=D.hcl,zr,Wr;if(isNaN(ke)||isNaN(Et))isNaN(ke)?isNaN(Et)?zr=NaN:(zr=Et,We!==1&&We!==0||(Wr=Ut)):(zr=ke,or!==1&&or!==0||(Wr=je));else{let Wi=Et-ke;Et>ke&&Wi>180?Wi-=360:Et<ke&&ke-Et>180&&(Wi+=360),zr=ke+J*Wi}let[ia,ha,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*rr,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Rn(je,Ut,J),Rn(We,or,J),Rn(ht,Mr,J)]);return new Jt(ia,ha,ja,Ka,!1)}case"lab":{let[ke,je,We,ht]=qa(En(W.lab,D.lab,J));return new Jt(ke,je,We,ht,!1)}}},array:En,padding:function(W,D,J){return new ca(En(W.values,D.values,J))},variableAnchorOffsetCollection:function(W,D,J){let pe=W.values,ke=D.values;if(pe.length!==ke.length)throw new hn(`Cannot interpolate values of different length. from: ${W.toString()}, to: ${D.toString()}`);let je=[];for(let We=0;We<pe.length;We+=2){if(pe[We]!==ke[We])throw new hn(`Cannot interpolate values containing mismatched anchors. from[${We}]: ${pe[We]}, to[${We}]: ${ke[We]}`);je.push(pe[We]);let[ht,Et]=pe[We+1],[Ut,or]=ke[We+1];je.push([Rn(ht,Ut,J),Rn(Et,or,J)])}return new $a(je)}};class no{constructor(D,J,pe,ke,je){this.type=D,this.operator=J,this.interpolation=pe,this.input=ke,this.labels=[],this.outputs=[];for(let[We,ht]of je)this.labels.push(We),this.outputs.push(ht)}static interpolationFactor(D,J,pe,ke){let je=0;if(D.name==="exponential")je=cn(J,D.base,pe,ke);else if(D.name==="linear")je=cn(J,1,pe,ke);else if(D.name==="cubic-bezier"){let We=D.controlPoints;je=new _n(We[0],We[1],We[2],We[3]).solve(cn(J,1,pe,ke))}return je}static parse(D,J){let[pe,ke,je,...We]=D;if(!Array.isArray(ke)||ke.length===0)return J.error("Expected an interpolation type expression.",1);if(ke[0]==="linear")ke={name:"linear"};else if(ke[0]==="exponential"){let Ut=ke[1];if(typeof Ut!="number")return J.error("Exponential interpolation requires a numeric base.",1,1);ke={name:"exponential",base:Ut}}else{if(ke[0]!=="cubic-bezier")return J.error(`Unknown interpolation type ${String(ke[0])}`,1,0);{let Ut=ke.slice(1);if(Ut.length!==4||Ut.some(or=>typeof or!="number"||or<0||or>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ke={name:"cubic-bezier",controlPoints:Ut}}}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(je=J.parse(je,2,Qe),!je)return null;let ht=[],Et=null;pe==="interpolate-hcl"||pe==="interpolate-lab"?Et=qt:J.expectedType&&J.expectedType.kind!=="value"&&(Et=J.expectedType);for(let Ut=0;Ut<We.length;Ut+=2){let or=We[Ut],Mr=We[Ut+1],zr=Ut+3,Wr=Ut+4;if(typeof or!="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(ht.length&&ht[ht.length-1][0]>=or)return J.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let ia=J.parse(Mr,Wr,Et);if(!ia)return null;Et=Et||ia.type,ht.push([or,ia])}return Ee(Et,Qe)||Ee(Et,qt)||Ee(Et,Sr)||Ee(Et,wt)||Ee(Et,Ne(Qe))?new no(Et,pe,ke,je,ht):J.error(`Type ${Ke(Et)} is not interpolatable.`)}evaluate(D){let J=this.labels,pe=this.outputs;if(J.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=J[0])return pe[0].evaluate(D);let je=J.length;if(ke>=J[je-1])return pe[je-1].evaluate(D);let We=la(J,ke),ht=no.interpolationFactor(this.interpolation,ke,J[We],J[We+1]),Et=pe[We].evaluate(D),Ut=pe[We+1].evaluate(D);switch(this.operator){case"interpolate":return On[this.type.kind](Et,Ut,ht);case"interpolate-hcl":return On.color(Et,Ut,ht,"hcl");case"interpolate-lab":return On.color(Et,Ut,ht,"lab")}}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function cn(W,D,J,pe){let ke=pe-J,je=W-J;return ke===0?0:D===1?je/ke:(Math.pow(D,je)-1)/(Math.pow(D,ke)-1)}class lo{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 pe=null,ke=J.expectedType;ke&&ke.kind!=="value"&&(pe=ke);let je=[];for(let ht of D.slice(1)){let Et=J.parse(ht,1+je.length,pe,void 0,{typeAnnotation:"omit"});if(!Et)return null;pe=pe||Et.type,je.push(Et)}if(!pe)throw new Error("No output type");let We=ke&&je.some(ht=>Ie(ke,ht.type));return new lo(We?kr:pe,je)}evaluate(D){let J,pe=null,ke=0;for(let je of this.args)if(ke++,pe=je.evaluate(D),pe&&pe instanceof Za&&!pe.available&&(J||(J=pe.name),pe=null,ke===this.args.length&&(pe=J)),pe!==null)break;return pe}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function Wo(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 hs(W,D,J,pe){return pe.compare(D,J)===0}function Oo(W,D,J){let pe=W!=="=="&&W!=="!=";return class t7{constructor(je,We,ht){this.type=It,this.lhs=je,this.rhs=We,this.collator=ht,this.hasUntypedArgument=je.type.kind==="value"||We.type.kind==="value"}static parse(je,We){if(je.length!==3&&je.length!==4)return We.error("Expected two or three arguments.");let ht=je[0],Et=We.parse(je[1],1,kr);if(!Et)return null;if(!Wo(ht,Et.type))return We.concat(1).error(`"${ht}" comparisons are not supported for type '${Ke(Et.type)}'.`);let Ut=We.parse(je[2],2,kr);if(!Ut)return null;if(!Wo(ht,Ut.type))return We.concat(2).error(`"${ht}" comparisons are not supported for type '${Ke(Ut.type)}'.`);if(Et.type.kind!==Ut.type.kind&&Et.type.kind!=="value"&&Ut.type.kind!=="value")return We.error(`Cannot compare types '${Ke(Et.type)}' and '${Ke(Ut.type)}'.`);pe&&(Et.type.kind==="value"&&Ut.type.kind!=="value"?Et=new ut(Ut.type,[Et]):Et.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new ut(Et.type,[Ut])));let or=null;if(je.length===4){if(Et.type.kind!=="string"&&Ut.type.kind!=="string"&&Et.type.kind!=="value"&&Ut.type.kind!=="value")return We.error("Cannot use collator to compare non-string types.");if(or=We.parse(je[3],3,mr),!or)return null}return new t7(Et,Ut,or)}evaluate(je){let We=this.lhs.evaluate(je),ht=this.rhs.evaluate(je);if(pe&&this.hasUntypedArgument){let Et=Ra(We),Ut=Ra(ht);if(Et.kind!==Ut.kind||Et.kind!=="string"&&Et.kind!=="number")throw new hn(`Expected arguments for "${W}" to be (string, string) or (number, number), but found (${Et.kind}, ${Ut.kind}) instead.`)}if(this.collator&&!pe&&this.hasUntypedArgument){let Et=Ra(We),Ut=Ra(ht);if(Et.kind!=="string"||Ut.kind!=="string")return D(je,We,ht)}return this.collator?J(je,We,ht,this.collator.evaluate(je)):D(je,We,ht)}eachChild(je){je(this.lhs),je(this.rhs),this.collator&&je(this.collator)}outputDefined(){return!0}}}let Wn=Oo("==",function(W,D,J){return D===J},hs),No=Oo("!=",function(W,D,J){return D!==J},function(W,D,J,pe){return!hs(0,D,J,pe)}),as=Oo("<",function(W,D,J){return D<J},function(W,D,J,pe){return pe.compare(D,J)<0}),Ns=Oo(">",function(W,D,J){return D>J},function(W,D,J,pe){return pe.compare(D,J)>0}),ss=Oo("<=",function(W,D,J){return D<=J},function(W,D,J,pe){return pe.compare(D,J)<=0}),uo=Oo(">=",function(W,D,J){return D>=J},function(W,D,J,pe){return pe.compare(D,J)>=0});class jn{constructor(D,J,pe){this.type=mr,this.locale=pe,this.caseSensitive=D,this.diacriticSensitive=J}static parse(D,J){if(D.length!==2)return J.error("Expected one argument.");let pe=D[1];if(typeof pe!="object"||Array.isArray(pe))return J.error("Collator options argument must be an object.");let ke=J.parse(pe["case-sensitive"]!==void 0&&pe["case-sensitive"],1,It);if(!ke)return null;let je=J.parse(pe["diacritic-sensitive"]!==void 0&&pe["diacritic-sensitive"],1,It);if(!je)return null;let We=null;return pe.locale&&(We=J.parse(pe.locale,1,Pt),!We)?null:new jn(ke,je,We)}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 Xn{constructor(D,J,pe,ke,je){this.type=Pt,this.number=D,this.locale=J,this.currency=pe,this.minFractionDigits=ke,this.maxFractionDigits=je}static parse(D,J){if(D.length!==3)return J.error("Expected two arguments.");let pe=J.parse(D[1],1,Qe);if(!pe)return null;let ke=D[2];if(typeof ke!="object"||Array.isArray(ke))return J.error("NumberFormat options argument must be an object.");let je=null;if(ke.locale&&(je=J.parse(ke.locale,1,Pt),!je))return null;let We=null;if(ke.currency&&(We=J.parse(ke.currency,1,Pt),!We))return null;let ht=null;if(ke["min-fraction-digits"]&&(ht=J.parse(ke["min-fraction-digits"],1,Qe),!ht))return null;let Et=null;return ke["max-fraction-digits"]&&(Et=J.parse(ke["max-fraction-digits"],1,Qe),!Et)?null:new Xn(pe,je,We,ht,Et)}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 ls{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 pe=D[1];if(!Array.isArray(pe)&&typeof pe=="object")return J.error("First argument must be an image or text section.");let ke=[],je=!1;for(let We=1;We<=D.length-1;++We){let ht=D[We];if(je&&typeof ht=="object"&&!Array.isArray(ht)){je=!1;let Et=null;if(ht["font-scale"]&&(Et=J.parse(ht["font-scale"],1,Qe),!Et))return null;let Ut=null;if(ht["text-font"]&&(Ut=J.parse(ht["text-font"],1,Ne(Pt)),!Ut))return null;let or=null;if(ht["text-color"]&&(or=J.parse(ht["text-color"],1,qt),!or))return null;let Mr=ke[ke.length-1];Mr.scale=Et,Mr.font=Ut,Mr.textColor=or}else{let Et=J.parse(D[We],1,kr);if(!Et)return null;let Ut=Et.type.kind;if(Ut!=="string"&&Ut!=="value"&&Ut!=="null"&&Ut!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");je=!0,ke.push({content:Et,scale:null,font:null,textColor:null})}}return new ls(ke)}evaluate(D){return new ra(this.sections.map(J=>{let pe=J.content.evaluate(D);return Ra(pe)===Rr?new ta("",pe,null,null,null):new ta(tn(pe),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 Cs{constructor(D){this.type=Rr,this.input=D}static parse(D,J){if(D.length!==2)return J.error("Expected two arguments.");let pe=J.parse(D[1],1,Pt);return pe?new Cs(pe):J.error("No image name provided.")}evaluate(D){let J=this.input.evaluate(D),pe=Za.fromString(J);return pe&&D.availableImages&&(pe.available=D.availableImages.indexOf(J)>-1),pe}eachChild(D){D(this.input)}outputDefined(){return!1}}class Ks{constructor(D){this.type=Qe,this.input=D}static parse(D,J){if(D.length!==2)return J.error(`Expected 1 argument, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1);return pe?pe.type.kind!=="array"&&pe.type.kind!=="string"&&pe.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Ke(pe.type)} instead.`):new Ks(pe):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 hn(`Expected value to be of type string or array, but found ${Ke(Ra(J))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Xo=8192;function Gi(W,D){let J=(180+W[0])/360,pe=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W[1]*Math.PI/360)))/360,ke=Math.pow(2,D.z);return[Math.round(J*ke*Xo),Math.round(pe*ke*Xo)]}function Ln(W,D){let J=Math.pow(2,D.z);return[(ke=(W[0]/Xo+D.x)/J,360*ke-180),(pe=(W[1]/Xo+D.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*pe)*Math.PI/180))-90)];var pe,ke}function Us(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 _s(W,D){return!(W[0]<=D[0]||W[2]>=D[2]||W[1]<=D[1]||W[3]>=D[3])}function Gn(W,D,J){let pe=W[0]-D[0],ke=W[1]-D[1],je=W[0]-J[0],We=W[1]-J[1];return pe*We-je*ke==0&&pe*je<=0&&ke*We<=0}function zs(W,D,J,pe){return(ke=[pe[0]-J[0],pe[1]-J[1]])[0]*(je=[D[0]-W[0],D[1]-W[1]])[1]-ke[1]*je[0]!=0&&!(!bo(W,D,J,pe)||!bo(J,pe,W,D));var ke,je}function vs(W,D,J){for(let pe of J)for(let ke=0;ke<pe.length-1;++ke)if(zs(W,D,pe[ke],pe[ke+1]))return!0;return!1}function Ws(W,D,J=!1){let pe=!1;for(let ht of D)for(let Et=0;Et<ht.length-1;Et++){if(Gn(W,ht[Et],ht[Et+1]))return J;(je=ht[Et])[1]>(ke=W)[1]!=(We=ht[Et+1])[1]>ke[1]&&ke[0]<(We[0]-je[0])*(ke[1]-je[1])/(We[1]-je[1])+je[0]&&(pe=!pe)}var ke,je,We;return pe}function il(W,D){for(let J of D)if(Ws(W,J))return!0;return!1}function xn(W,D){for(let J of W)if(!Ws(J,D))return!1;for(let J=0;J<W.length-1;++J)if(vs(W[J],W[J+1],D))return!1;return!0}function ko(W,D){for(let J of D)if(xn(W,J))return!0;return!1}function bo(W,D,J,pe){let ke=pe[0]-J[0],je=pe[1]-J[1],We=(W[0]-J[0])*je-ke*(W[1]-J[1]),ht=(D[0]-J[0])*je-ke*(D[1]-J[1]);return We>0&&ht<0||We<0&&ht>0}function Is(W,D,J){let pe=[];for(let ke=0;ke<W.length;ke++){let je=[];for(let We=0;We<W[ke].length;We++){let ht=Gi(W[ke][We],J);Us(D,ht),je.push(ht)}pe.push(je)}return pe}function pu(W,D,J){let pe=[];for(let ke=0;ke<W.length;ke++){let je=Is(W[ke],D,J);pe.push(je)}return pe}function co(W,D,J,pe){if(W[0]<J[0]||W[0]>J[2]){let ke=.5*pe,je=W[0]-J[0]>ke?-pe:J[0]-W[0]>ke?pe:0;je===0&&(je=W[0]-J[2]>ke?-pe:J[2]-W[0]>ke?pe:0),W[0]+=je}Us(D,W)}function Vs(W,D,J,pe){let ke=Math.pow(2,pe.z)*Xo,je=[pe.x*Xo,pe.y*Xo],We=[];for(let ht of W)for(let Et of ht){let Ut=[Et.x+je[0],Et.y+je[1]];co(Ut,D,J,ke),We.push(Ut)}return We}function vl(W,D,J,pe){let ke=Math.pow(2,pe.z)*Xo,je=[pe.x*Xo,pe.y*Xo],We=[];for(let Et of W){let Ut=[];for(let or of Et){let Mr=[or.x+je[0],or.y+je[1]];Us(D,Mr),Ut.push(Mr)}We.push(Ut)}if(D[2]-D[0]<=ke/2){(ht=D)[0]=ht[1]=1/0,ht[2]=ht[3]=-1/0;for(let Et of We)for(let Ut of Et)co(Ut,D,J,ke)}var ht;return We}class Ts{constructor(D,J){this.type=It,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 pe=D[1];if(pe.type==="FeatureCollection"){let ke=[];for(let je of pe.features){let{type:We,coordinates:ht}=je.geometry;We==="Polygon"&&ke.push(ht),We==="MultiPolygon"&&ke.push(...ht)}if(ke.length)return new Ts(pe,{type:"MultiPolygon",coordinates:ke})}else if(pe.type==="Feature"){let ke=pe.geometry.type;if(ke==="Polygon"||ke==="MultiPolygon")return new Ts(pe,pe.geometry)}else if(pe.type==="Polygon"||pe.type==="MultiPolygon")return new Ts(pe,pe)}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,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=J.canonicalID();if(pe.type==="Polygon"){let ht=Is(pe.coordinates,je,We),Et=Vs(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!Ws(Ut,ht))return!1}if(pe.type==="MultiPolygon"){let ht=pu(pe.coordinates,je,We),Et=Vs(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!il(Ut,ht))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=J.canonicalID();if(pe.type==="Polygon"){let ht=Is(pe.coordinates,je,We),Et=vl(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!xn(Ut,ht))return!1}if(pe.type==="MultiPolygon"){let ht=pu(pe.coordinates,je,We),Et=vl(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!ko(Ut,ht))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let js=class{constructor(W=[],D=(J,pe)=>J<pe?-1:J>pe?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,pe=D[W];for(;W>0;){let ke=W-1>>1,je=D[ke];if(J(pe,je)>=0)break;D[W]=je,W=ke}D[W]=pe}_down(W){let{data:D,compare:J}=this,pe=this.length>>1,ke=D[W];for(;W<pe;){let je=1+(W<<1),We=je+1;if(We<this.length&&J(D[We],D[je])<0&&(je=We),J(D[je],ke)>=0)break;D[W]=D[je],W=je}D[W]=ke}};function us(W,D,J,pe,ke){As(W,D,J,pe||W.length-1,ke||su)}function As(W,D,J,pe,ke){for(;pe>J;){if(pe-J>600){var je=pe-J+1,We=D-J+1,ht=Math.log(je),Et=.5*Math.exp(2*ht/3),Ut=.5*Math.sqrt(ht*Et*(je-Et)/je)*(We-je/2<0?-1:1);As(W,D,Math.max(J,Math.floor(D-We*Et/je+Ut)),Math.min(pe,Math.floor(D+(je-We)*Et/je+Ut)),ke)}var or=W[D],Mr=J,zr=pe;for(Nl(W,J,D),ke(W[pe],or)>0&&Nl(W,J,pe);Mr<zr;){for(Nl(W,Mr,zr),Mr++,zr--;ke(W[Mr],or)<0;)Mr++;for(;ke(W[zr],or)>0;)zr--}ke(W[J],or)===0?Nl(W,J,zr):Nl(W,++zr,pe),zr<=D&&(J=zr+1),D<=zr&&(pe=zr-1)}}function Nl(W,D,J){var pe=W[D];W[D]=W[J],W[J]=pe}function su(W,D){return W<D?-1:W>D?1:0}function Tc(W,D){if(W.length<=1)return[W];let J=[],pe,ke;for(let je of W){let We=Sf(je);We!==0&&(je.area=Math.abs(We),ke===void 0&&(ke=We<0),ke===We<0?(pe&&J.push(pe),pe=[je]):pe.push(je))}if(pe&&J.push(pe),D>1)for(let je=0;je<J.length;je++)J[je].length<=D||(us(J[je],D,1,J[je].length-1,du),J[je]=J[je].slice(0,D));return J}function du(W,D){return D.area-W.area}function Sf(W){let D=0;for(let J,pe,ke=0,je=W.length,We=je-1;ke<je;We=ke++)J=W[ke],pe=W[We],D+=(pe.x-J.x)*(J.y+pe.y);return D}let Uc=1/298.257223563,Fs=Uc*(2-Uc),dc=Math.PI/180;class Hc{constructor(D){let J=6378.137*dc*1e3,pe=Math.cos(D*dc),ke=1/(1-Fs*(1-pe*pe)),je=Math.sqrt(ke);this.kx=J*je*pe,this.ky=J*je*ke*(1-Fs)}distance(D,J){let pe=this.wrap(D[0]-J[0])*this.kx,ke=(D[1]-J[1])*this.ky;return Math.sqrt(pe*pe+ke*ke)}pointOnLine(D,J){let pe,ke,je,We,ht=1/0;for(let Et=0;Et<D.length-1;Et++){let Ut=D[Et][0],or=D[Et][1],Mr=this.wrap(D[Et+1][0]-Ut)*this.kx,zr=(D[Et+1][1]-or)*this.ky,Wr=0;Mr===0&&zr===0||(Wr=(this.wrap(J[0]-Ut)*this.kx*Mr+(J[1]-or)*this.ky*zr)/(Mr*Mr+zr*zr),Wr>1?(Ut=D[Et+1][0],or=D[Et+1][1]):Wr>0&&(Ut+=Mr/this.kx*Wr,or+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Ut)*this.kx,zr=(J[1]-or)*this.ky;let ia=Mr*Mr+zr*zr;ia<ht&&(ht=ia,pe=Ut,ke=or,je=Et,We=Wr)}return{point:[pe,ke],index:je,t:Math.max(0,Math.min(1,We))}}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 ke=Math.floor(J/2);return[[W[0],W[0]+ke],[W[0]+ke,W[1]]]}if(J===1)return[W,null];let pe=Math.floor(J/2)-1;return[[W[0],W[0]+pe],[W[0]+pe+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 pe=D[0];pe<=D[1];++pe)Us(J,W[pe]);return J}function ml(W){let D=[1/0,1/0,-1/0,-1/0];for(let J of W)for(let pe of J)Us(D,pe);return D}function xs(W){return W[0]!==-1/0&&W[1]!==-1/0&&W[2]!==1/0&&W[3]!==1/0}function Xs(W,D,J){if(!xs(W)||!xs(D))return NaN;let pe=0,ke=0;return W[2]<D[0]&&(pe=D[0]-W[2]),W[0]>D[2]&&(pe=W[0]-D[2]),W[1]>D[3]&&(ke=W[1]-D[3]),W[3]<D[1]&&(ke=D[1]-W[3]),J.distance([0,0],[pe,ke])}function nc(W,D,J){let pe=J.pointOnLine(D,W);return J.distance(W,pe.point)}function Ul(W,D,J,pe,ke){let je=Math.min(nc(W,[J,pe],ke),nc(D,[J,pe],ke)),We=Math.min(nc(J,[W,D],ke),nc(pe,[W,D],ke));return Math.min(je,We)}function qu(W,D,J,pe,ke){if(!ic(D,W.length)||!ic(pe,J.length))return 1/0;let je=1/0;for(let We=D[0];We<D[1];++We){let ht=W[We],Et=W[We+1];for(let Ut=pe[0];Ut<pe[1];++Ut){let or=J[Ut],Mr=J[Ut+1];if(zs(ht,Et,or,Mr))return 0;je=Math.min(je,Ul(ht,Et,or,Mr,ke))}}return je}function fl(W,D,J,pe,ke){if(!ic(D,W.length)||!ic(pe,J.length))return NaN;let je=1/0;for(let We=D[0];We<=D[1];++We)for(let ht=pe[0];ht<=pe[1];++ht)if(je=Math.min(je,ke.distance(W[We],J[ht])),je===0)return je;return je}function xh(W,D,J){if(Ws(W,D,!0))return 0;let pe=1/0;for(let ke of D){let je=ke[0],We=ke[ke.length-1];if(je!==We&&(pe=Math.min(pe,nc(W,[We,je],J)),pe===0))return pe;let ht=J.pointOnLine(ke,W);if(pe=Math.min(pe,J.distance(W,ht.point)),pe===0)return pe}return pe}function ns(W,D,J,pe){if(!ic(D,W.length))return NaN;for(let je=D[0];je<=D[1];++je)if(Ws(W[je],J,!0))return 0;let ke=1/0;for(let je=D[0];je<D[1];++je){let We=W[je],ht=W[je+1];for(let Et of J)for(let Ut=0,or=Et.length,Mr=or-1;Ut<or;Mr=Ut++){let zr=Et[Mr],Wr=Et[Ut];if(zs(We,ht,zr,Wr))return 0;ke=Math.min(ke,Ul(We,ht,zr,Wr,pe))}}return ke}function bh(W,D){for(let J of W)for(let pe of J)if(Ws(pe,D,!0))return!0;return!1}function Es(W,D,J,pe=1/0){let ke=ml(W),je=ml(D);if(pe!==1/0&&Xs(ke,je,J)>=pe)return pe;if(_s(ke,je)){if(bh(W,D))return 0}else if(bh(D,W))return 0;let We=1/0;for(let ht of W)for(let Et=0,Ut=ht.length,or=Ut-1;Et<Ut;or=Et++){let Mr=ht[or],zr=ht[Et];for(let Wr of D)for(let ia=0,ha=Wr.length,ja=ha-1;ia<ha;ja=ia++){let Ka=Wr[ja],Wi=Wr[ia];if(zs(Mr,zr,Ka,Wi))return 0;We=Math.min(We,Ul(Mr,zr,Ka,Wi,J))}}return We}function to(W,D,J,pe,ke,je){if(!je)return;let We=Xs(nl(pe,je),ke,J);We<D&&W.push([We,je,[0,0]])}function Wc(W,D,J,pe,ke,je,We){if(!je||!We)return;let ht=Xs(nl(pe,je),nl(ke,We),J);ht<D&&W.push([ht,je,We])}function Vu(W,D,J,pe,ke=1/0){let je=Math.min(pe.distance(W[0],J[0][0]),ke);if(je===0)return je;let We=new js([[0,[0,W.length-1],[0,0]]],lu),ht=ml(J);for(;We.length>0;){let Et=We.pop();if(Et[0]>=je)continue;let Ut=Et[1],or=D?50:100;if(Pl(Ut)<=or){if(!ic(Ut,W.length))return NaN;if(D){let Mr=ns(W,Ut,J,pe);if(isNaN(Mr)||Mr===0)return Mr;je=Math.min(je,Mr)}else for(let Mr=Ut[0];Mr<=Ut[1];++Mr){let zr=xh(W[Mr],J,pe);if(je=Math.min(je,zr),je===0)return 0}}else{let Mr=Ou(Ut,D);to(We,je,pe,W,ht,Mr[0]),to(We,je,pe,W,ht,Mr[1])}}return je}function jl(W,D,J,pe,ke,je=1/0){let We=Math.min(je,ke.distance(W[0],J[0]));if(We===0)return We;let ht=new js([[0,[0,W.length-1],[0,J.length-1]]],lu);for(;ht.length>0;){let Et=ht.pop();if(Et[0]>=We)continue;let Ut=Et[1],or=Et[2],Mr=D?50:100,zr=pe?50:100;if(Pl(Ut)<=Mr&&Pl(or)<=zr){if(!ic(Ut,W.length)&&ic(or,J.length))return NaN;let Wr;if(D&&pe)Wr=qu(W,Ut,J,or,ke),We=Math.min(We,Wr);else if(D&&!pe){let ia=W.slice(Ut[0],Ut[1]+1);for(let ha=or[0];ha<=or[1];++ha)if(Wr=nc(J[ha],ia,ke),We=Math.min(We,Wr),We===0)return We}else if(!D&&pe){let ia=J.slice(or[0],or[1]+1);for(let ha=Ut[0];ha<=Ut[1];++ha)if(Wr=nc(W[ha],ia,ke),We=Math.min(We,Wr),We===0)return We}else Wr=fl(W,Ut,J,or,ke),We=Math.min(We,Wr)}else{let Wr=Ou(Ut,D),ia=Ou(or,pe);Wc(ht,We,ke,W,J,Wr[0],ia[0]),Wc(ht,We,ke,W,J,Wr[0],ia[1]),Wc(ht,We,ke,W,J,Wr[1],ia[0]),Wc(ht,We,ke,W,J,Wr[1],ia[1])}}return We}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=Qe,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 pe=D[1];if(pe.type==="FeatureCollection")return new Ac(pe,pe.features.map(ke=>Mf(ke.geometry)).flat());if(pe.type==="Feature")return new Ac(pe,Mf(pe.geometry));if("type"in pe&&"coordinates"in pe)return new Ac(pe,Mf(pe))}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,pe){let ke=J.geometry(),je=ke.flat().map(Et=>Ln([Et.x,Et.y],J.canonical));if(ke.length===0)return NaN;let We=new Hc(je[0][1]),ht=1/0;for(let Et of pe){switch(Et.type){case"Point":ht=Math.min(ht,jl(je,!1,[Et.coordinates],!1,We,ht));break;case"LineString":ht=Math.min(ht,jl(je,!1,Et.coordinates,!0,We,ht));break;case"Polygon":ht=Math.min(ht,Vu(je,!1,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,pe){let ke=J.geometry(),je=ke.flat().map(Et=>Ln([Et.x,Et.y],J.canonical));if(ke.length===0)return NaN;let We=new Hc(je[0][1]),ht=1/0;for(let Et of pe){switch(Et.type){case"Point":ht=Math.min(ht,jl(je,!0,[Et.coordinates],!1,We,ht));break;case"LineString":ht=Math.min(ht,jl(je,!0,Et.coordinates,!0,We,ht));break;case"Polygon":ht=Math.min(ht,Vu(je,!0,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries);if(D.geometryType()==="Polygon")return function(J,pe){let ke=J.geometry();if(ke.length===0||ke[0].length===0)return NaN;let je=Tc(ke,0).map(Et=>Et.map(Ut=>Ut.map(or=>Ln([or.x,or.y],J.canonical)))),We=new Hc(je[0][0][0][1]),ht=1/0;for(let Et of pe)for(let Ut of je){switch(Et.type){case"Point":ht=Math.min(ht,Vu([Et.coordinates],!1,Ut,We,ht));break;case"LineString":ht=Math.min(ht,Vu(Et.coordinates,!0,Ut,We,ht));break;case"Polygon":ht=Math.min(ht,Es(Ut,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Wn,"!=":No,">":Ns,"<":as,">=":uo,"<=":ss,array:ut,at:Xt,boolean:ut,case:Pa,coalesce:lo,collator:jn,format:ls,image:Cs,in:vr,"index-of":Or,interpolate:no,"interpolate-hcl":no,"interpolate-lab":no,length:Ks,let:Hr,literal:on,match:ba,number:ut,"number-format":Xn,object:ut,slice:ya,step:Ta,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:xt,within:Ts,distance:Ac};class $l{constructor(D,J,pe,ke){this.name=D,this.type=J,this._evaluate=pe,this.args=ke}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,J){let pe=D[0],ke=$l.definitions[pe];if(!ke)return J.error(`Unknown expression "${pe}". If you wanted a literal array, use ["literal", [...]].`,0);let je=Array.isArray(ke)?ke[0]:ke.type,We=Array.isArray(ke)?[[ke[1],ke[2]]]:ke.overloads,ht=We.filter(([Ut])=>!Array.isArray(Ut)||Ut.length===D.length-1),Et=null;for(let[Ut,or]of ht){Et=new Ur(J.registry,Bf,J.path,null,J.scope);let Mr=[],zr=!1;for(let Wr=1;Wr<D.length;Wr++){let ia=D[Wr],ha=Array.isArray(Ut)?Ut[Wr-1]:Ut.type,ja=Et.parse(ia,1+Mr.length,ha);if(!ja){zr=!0;break}Mr.push(ja)}if(!zr)if(Array.isArray(Ut)&&Ut.length!==Mr.length)Et.error(`Expected ${Ut.length} arguments, but found ${Mr.length} instead.`);else{for(let Wr=0;Wr<Mr.length;Wr++){let ia=Array.isArray(Ut)?Ut[Wr]:Ut.type,ha=Mr[Wr];Et.concat(Wr+1).checkSubtype(ia,ha.type)}if(Et.errors.length===0)return new $l(pe,je,or,Mr)}}if(ht.length===1)J.errors.push(...Et.errors);else{let Ut=(ht.length?ht:We).map(([Mr])=>{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ke).join(", ")})`:`(${Ke(zr.type)}...)`;var zr}).join(" | "),or=[];for(let Mr=1;Mr<D.length;Mr++){let zr=J.parse(D[Mr],1+or.length);if(!zr)return null;or.push(Ke(zr.type))}J.error(`Expected arguments of type ${Ut}, but found (${or.join(", ")}) instead.`)}return null}static register(D,J){$l.definitions=J;for(let pe in J)D[pe]=$l}}function Jf(W,[D,J,pe,ke]){D=D.evaluate(W),J=J.evaluate(W),pe=pe.evaluate(W);let je=ke?ke.evaluate(W):1,We=ri(D,J,pe,je);if(We)throw new hn(We);return new Jt(D/255,J/255,pe/255,je,!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 xt)return Bf(W.boundExpression);if(W instanceof $l&&W.name==="error"||W instanceof jn||W instanceof Ts||W instanceof Ac)return!1;let D=W instanceof Cr||W instanceof ut,J=!0;return W.eachChild(pe=>{J=D?J&&Bf(pe):J&&pe instanceof on}),!!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 Ts||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(pe=>{J&&!Ef(pe,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 Zs(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",pe=W.stops&&typeof W.stops[0][0]=="object",ke=pe||!(pe||W.property!==void 0),je=W.type||(Sc(D)?"exponential":"interval");if(J||D.type==="padding"){let or=J?Jt.parse:ca.parse;(W=he({},W)).stops&&(W.stops=W.stops.map(Mr=>[Mr[0],or(Mr[1])])),W.default=or(W.default?W.default:D.default)}if(W.colorSpace&&(We=W.colorSpace)!=="rgb"&&We!=="hcl"&&We!=="lab")throw new Error(`Unknown color space: "${W.colorSpace}"`);var We;let ht,Et,Ut;if(je==="exponential")ht=jf;else if(je==="interval")ht=Cu;else if(je==="categorical"){ht=$f,Et=Object.create(null);for(let or of W.stops)Et[or[0]]=or[1];Ut=typeof W.stops[0][0]}else{if(je!=="identity")throw new Error(`Unknown function type "${je}"`);ht=yl}if(pe){let or={},Mr=[];for(let ia=0;ia<W.stops.length;ia++){let ha=W.stops[ia],ja=ha[0].zoom;or[ja]===void 0&&(or[ja]={zoom:ja,type:W.type,property:W.property,default:W.default,stops:[]},Mr.push(ja)),or[ja].stops.push([ha[0].value,ha[1]])}let zr=[];for(let ia of Mr)zr.push([or[ia].zoom,Uf(or[ia],D)]);let Wr={name:"linear"};return{kind:"composite",interpolationType:Wr,interpolationFactor:no.interpolationFactor.bind(void 0,Wr),zoomStops:zr.map(ia=>ia[0]),evaluate:({zoom:ia},ha)=>jf({stops:zr,base:W.base},D,ia).evaluate(ia,ha)}}if(ke){let or=je==="exponential"?{name:"exponential",base:W.base!==void 0?W.base:1}:null;return{kind:"camera",interpolationType:or,interpolationFactor:no.interpolationFactor.bind(void 0,or),zoomStops:W.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ht(W,D,Mr,Et,Ut)}}return{kind:"source",evaluate(or,Mr){let zr=Mr&&Mr.properties?Mr.properties[W.property]:void 0;return zr===void 0?Zc(W.default,D.default):ht(W,D,zr,Et,Ut)}}}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,pe,ke){return Zc(typeof J===ke?pe[J]:void 0,W.default,D.default)}function Cu(W,D,J){if(Zs(J)!=="number")return Zc(W.default,D.default);let pe=W.stops.length;if(pe===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[pe-1][0])return W.stops[pe-1][1];let ke=la(W.stops.map(je=>je[0]),J);return W.stops[ke][1]}function jf(W,D,J){let pe=W.base!==void 0?W.base:1;if(Zs(J)!=="number")return Zc(W.default,D.default);let ke=W.stops.length;if(ke===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[ke-1][0])return W.stops[ke-1][1];let je=la(W.stops.map(or=>or[0]),J),We=function(or,Mr,zr,Wr){let ia=Wr-zr,ha=or-zr;return ia===0?0:Mr===1?ha/ia:(Math.pow(Mr,ha)-1)/(Math.pow(Mr,ia)-1)}(J,pe,W.stops[je][0],W.stops[je+1][0]),ht=W.stops[je][1],Et=W.stops[je+1][1],Ut=On[D.type]||fh;return typeof ht.evaluate=="function"?{evaluate(...or){let Mr=ht.evaluate.apply(void 0,or),zr=Et.evaluate.apply(void 0,or);if(Mr!==void 0&&zr!==void 0)return Ut(Mr,zr,We,W.colorSpace)}}:Ut(ht,Et,We,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:Zs(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"},[Pt],(W,[D])=>{throw new hn(D.evaluate(W))}],typeof:[Pt,[kr],(W,[D])=>Ke(Ra(D.evaluate(W)))],"to-rgba":[Ne(Qe,4),[qt],(W,[D])=>{let[J,pe,ke,je]=D.evaluate(W).rgb;return[255*J,255*pe,255*ke,je]}],rgb:[qt,[Qe,Qe,Qe],Jf],rgba:[qt,[Qe,Qe,Qe,Qe],Jf],has:{type:It,overloads:[[[Pt],(W,[D])=>Of(D.evaluate(W),W.properties())],[[Pt,Wt],(W,[D,J])=>Of(D.evaluate(W),J.evaluate(W))]]},get:{type:kr,overloads:[[[Pt],(W,[D])=>of(D.evaluate(W),W.properties())],[[Pt,Wt],(W,[D,J])=>of(D.evaluate(W),J.evaluate(W))]]},"feature-state":[kr,[Pt],(W,[D])=>of(D.evaluate(W),W.featureState||{})],properties:[Wt,[],W=>W.properties()],"geometry-type":[Pt,[],W=>W.geometryType()],id:[kr,[],W=>W.id()],zoom:[Qe,[],W=>W.globals.zoom],"heatmap-density":[Qe,[],W=>W.globals.heatmapDensity||0],"line-progress":[Qe,[],W=>W.globals.lineProgress||0],accumulated:[kr,[],W=>W.globals.accumulated===void 0?null:W.globals.accumulated],"+":[Qe,jc(Qe),(W,D)=>{let J=0;for(let pe of D)J+=pe.evaluate(W);return J}],"*":[Qe,jc(Qe),(W,D)=>{let J=1;for(let pe of D)J*=pe.evaluate(W);return J}],"-":{type:Qe,overloads:[[[Qe,Qe],(W,[D,J])=>D.evaluate(W)-J.evaluate(W)],[[Qe],(W,[D])=>-D.evaluate(W)]]},"/":[Qe,[Qe,Qe],(W,[D,J])=>D.evaluate(W)/J.evaluate(W)],"%":[Qe,[Qe,Qe],(W,[D,J])=>D.evaluate(W)%J.evaluate(W)],ln2:[Qe,[],()=>Math.LN2],pi:[Qe,[],()=>Math.PI],e:[Qe,[],()=>Math.E],"^":[Qe,[Qe,Qe],(W,[D,J])=>Math.pow(D.evaluate(W),J.evaluate(W))],sqrt:[Qe,[Qe],(W,[D])=>Math.sqrt(D.evaluate(W))],log10:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))/Math.LN10],ln:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))],log2:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))/Math.LN2],sin:[Qe,[Qe],(W,[D])=>Math.sin(D.evaluate(W))],cos:[Qe,[Qe],(W,[D])=>Math.cos(D.evaluate(W))],tan:[Qe,[Qe],(W,[D])=>Math.tan(D.evaluate(W))],asin:[Qe,[Qe],(W,[D])=>Math.asin(D.evaluate(W))],acos:[Qe,[Qe],(W,[D])=>Math.acos(D.evaluate(W))],atan:[Qe,[Qe],(W,[D])=>Math.atan(D.evaluate(W))],min:[Qe,jc(Qe),(W,D)=>Math.min(...D.map(J=>J.evaluate(W)))],max:[Qe,jc(Qe),(W,D)=>Math.max(...D.map(J=>J.evaluate(W)))],abs:[Qe,[Qe],(W,[D])=>Math.abs(D.evaluate(W))],round:[Qe,[Qe],(W,[D])=>{let J=D.evaluate(W);return J<0?-Math.round(-J):Math.round(J)}],floor:[Qe,[Qe],(W,[D])=>Math.floor(D.evaluate(W))],ceil:[Qe,[Qe],(W,[D])=>Math.ceil(D.evaluate(W))],"filter-==":[It,[Pt,kr],(W,[D,J])=>W.properties()[D.value]===J.value],"filter-id-==":[It,[kr],(W,[D])=>W.id()===D.value],"filter-type-==":[It,[Pt],(W,[D])=>W.geometryType()===D.value],"filter-<":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe<ke}],"filter-id-<":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J<pe}],"filter->":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe>ke}],"filter-id->":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J>pe}],"filter-<=":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe<=ke}],"filter-id-<=":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J<=pe}],"filter->=":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe>=ke}],"filter-id->=":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J>=pe}],"filter-has":[It,[kr],(W,[D])=>D.value in W.properties()],"filter-has-id":[It,[],W=>W.id()!==null&&W.id()!==void 0],"filter-type-in":[It,[Ne(Pt)],(W,[D])=>D.value.indexOf(W.geometryType())>=0],"filter-id-in":[It,[Ne(kr)],(W,[D])=>D.value.indexOf(W.id())>=0],"filter-in-small":[It,[Pt,Ne(kr)],(W,[D,J])=>J.value.indexOf(W.properties()[D.value])>=0],"filter-in-large":[It,[Pt,Ne(kr)],(W,[D,J])=>function(pe,ke,je,We){for(;je<=We;){let ht=je+We>>1;if(ke[ht]===pe)return!0;ke[ht]>pe?We=ht-1:je=ht+1}return!1}(W.properties()[D.value],J.value,0,J.value.length-1)],all:{type:It,overloads:[[[It,It],(W,[D,J])=>D.evaluate(W)&&J.evaluate(W)],[jc(It),(W,D)=>{for(let J of D)if(!J.evaluate(W))return!1;return!0}]]},any:{type:It,overloads:[[[It,It],(W,[D,J])=>D.evaluate(W)||J.evaluate(W)],[jc(It),(W,D)=>{for(let J of D)if(J.evaluate(W))return!0;return!1}]]},"!":[It,[It],(W,[D])=>!D.evaluate(W)],"is-supported-script":[It,[Pt],(W,[D])=>{let J=W.globals&&W.globals.isSupportedScript;return!J||J(D.evaluate(W))}],upcase:[Pt,[Pt],(W,[D])=>D.evaluate(W).toUpperCase()],downcase:[Pt,[Pt],(W,[D])=>D.evaluate(W).toLowerCase()],concat:[Pt,jc(kr),(W,D)=>D.map(J=>tn(J.evaluate(W))).join("")],"resolved-locale":[Pt,[mr],(W,[D])=>D.evaluate(W).resolvedLocale()]});class Lu{constructor(D,J){var pe;this.expression=D,this._warningHistory={},this._evaluator=new Ir,this._defaultValue=J?(pe=J).type==="color"&&kf(pe.default)?new Jt(0,0,0,0):pe.type==="color"?Jt.parse(pe.default)||null:pe.type==="padding"?ca.parse(pe.default)||null:pe.type==="variableAnchorOffsetCollection"?$a.parse(pe.default)||null:pe.default===void 0?null:pe.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(D,J,pe,ke,je,We){return this._evaluator.globals=D,this._evaluator.feature=J,this._evaluator.featureState=pe,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We,this.expression.evaluate(this._evaluator)}evaluate(D,J,pe,ke,je,We){this._evaluator.globals=D,this._evaluator.feature=J||null,this._evaluator.featureState=pe||null,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We||null;try{let ht=this.expression.evaluate(this._evaluator);if(ht==null||typeof ht=="number"&&ht!=ht)return this._defaultValue;if(this._enumValues&&!(ht in this._enumValues))throw new hn(`Expected value to be one of ${Object.keys(this._enumValues).map(Et=>JSON.stringify(Et)).join(", ")}, but found ${JSON.stringify(ht)} instead.`);return ht}catch(ht){return this._warningHistory[ht.message]||(this._warningHistory[ht.message]=!0,typeof console<"u"&&console.warn(ht.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(ke){let je={color:qt,string:Pt,number:Qe,enum:Pt,boolean:It,formatted:qr,padding:Sr,resolvedImage:Rr,variableAnchorOffsetCollection:wt};return ke.type==="array"?Ne(je[ke.value]||kr,ke.length):je[ke.type]}(D):void 0),pe=J.parse(W,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return pe?oc(new Lu(pe,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,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,J,pe,ke,je,We)}evaluate(D,J,pe,ke,je,We){return this._styleExpression.evaluate(D,J,pe,ke,je,We)}}class yu{constructor(D,J,pe,ke){this.kind=D,this.zoomStops=pe,this._styleExpression=J,this.isStateDependent=D!=="camera"&&!Gu(J.expression),this.interpolationType=ke}evaluateWithoutErrorHandling(D,J,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,J,pe,ke,je,We)}evaluate(D,J,pe,ke,je,We){return this._styleExpression.evaluate(D,J,pe,ke,je,We)}interpolationFactor(D,J,pe){return this.interpolationType?no.interpolationFactor(this.interpolationType,D,J,pe):0}}function Tu(W,D){let J=ol(W,D);if(J.result==="error")return J;let pe=J.value.expression,ke=Nf(pe);if(!ke&&!Ql(D))return Xc([new Oe("","data expressions not supported")]);let je=Ef(pe,["zoom"]);if(!je&&!qc(D))return Xc([new Oe("","zoom expressions not supported")]);let We=qf(pe);return We||je?We instanceof Oe?Xc([We]):We instanceof no&&!Sc(D)?Xc([new Oe("",'"interpolate" expressions cannot be used with this property')]):oc(We?new yu(ke?"camera":"composite",J.value,We.labels,We instanceof no?We.interpolation:void 0):new vc(ke?"constant":"source",J.value)):Xc([new Oe("",'"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,he(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 lo){for(let J of W.args)if(D=qf(J),D)break}else(W instanceof Ta||W instanceof no)&&W.input instanceof $l&&W.input.name==="zoom"&&(D=W);return D instanceof Oe||W.eachChild(J=>{let pe=qf(J);pe instanceof Oe?D=pe:!D&&pe?D=new Oe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&pe&&D!==pe&&(D=new Oe("",'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,pe,ke)=>D.value.evaluate(J,pe,{},ke),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 ke="[";for(let je of W)ke+=`${Yc(je)},`;return`${ke}]`}let J=Object.keys(W).sort(),pe="{";for(let ke=0;ke<J.length;ke++)pe+=`${JSON.stringify(J[ke])}:${Yc(W[J[ke]])},`;return`${pe}}`}function hh(W){let D="";for(let J of ce)D+=`/${Yc(W[J])}`;return D}function mf(W){let D=W.value;return D?[new ye(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,pe=W.valueSpec||{},ke=W.objectElementValidators||{},je=W.style,We=W.styleSpec,ht=W.validateSpec,Et=[],Ut=Zs(J);if(Ut!=="object")return[new ye(D,J,`object expected, ${Ut} found`)];for(let or in J){let Mr=or.split(".")[0],zr=pe[Mr]||pe["*"],Wr;if(ke[Mr])Wr=ke[Mr];else if(pe[Mr])Wr=ht;else if(ke["*"])Wr=ke["*"];else{if(!pe["*"]){Et.push(new ye(D,J[or],`unknown property "${or}"`));continue}Wr=ht}Et=Et.concat(Wr({key:(D&&`${D}.`)+or,value:J[or],valueSpec:zr,style:je,styleSpec:We,object:J,objectKey:or,validateSpec:ht},J))}for(let or in pe)ke[or]||pe[or].required&&pe[or].default===void 0&&J[or]===void 0&&Et.push(new ye(D,J,`missing required property "${or}"`));return Et}function Cf(W){let D=W.value,J=W.valueSpec,pe=W.style,ke=W.styleSpec,je=W.key,We=W.arrayElementValidator||W.validateSpec;if(Zs(D)!=="array")return[new ye(je,D,`array expected, ${Zs(D)} found`)];if(J.length&&D.length!==J.length)return[new ye(je,D,`array length ${J.length} expected, length ${D.length} found`)];if(J["min-length"]&&D.length<J["min-length"])return[new ye(je,D,`array length at least ${J["min-length"]} expected, length ${D.length} found`)];let ht={type:J.value,values:J.values};ke.$version<7&&(ht.function=J.function),Zs(J.value)==="object"&&(ht=J.value);let Et=[];for(let Ut=0;Ut<D.length;Ut++)Et=Et.concat(We({array:D,arrayIndex:Ut,value:D[Ut],valueSpec:ht,validateSpec:W.validateSpec,style:pe,styleSpec:ke,key:`${je}[${Ut}]`}));return Et}function hl(W){let D=W.key,J=W.value,pe=W.valueSpec,ke=Zs(J);return ke==="number"&&J!=J&&(ke="NaN"),ke!=="number"?[new ye(D,J,`number expected, ${ke} found`)]:"minimum"in pe&&J<pe.minimum?[new ye(D,J,`${J} is less than the minimum value ${pe.minimum}`)]:"maximum"in pe&&J>pe.maximum?[new ye(D,J,`${J} is greater than the maximum value ${pe.maximum}`)]:[]}function uf(W){let D=W.valueSpec,J=sl(W.value.type),pe,ke,je,We={},ht=J!=="categorical"&&W.value.property===void 0,Et=!ht,Ut=Zs(W.value.stops)==="array"&&Zs(W.value.stops[0])==="array"&&Zs(W.value.stops[0][0])==="object",or=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 ye(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],ha=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:ha,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Mr})),Zs(ha)==="array"&&ha.length===0&&ia.push(new ye(Wr.key,ha,"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"&&ht&&or.push(new ye(W.key,W.value,'missing required property "property"')),J==="identity"||W.value.stops||or.push(new ye(W.key,W.value,'missing required property "stops"')),J==="exponential"&&W.valueSpec.expression&&!Sc(W.valueSpec)&&or.push(new ye(W.key,W.value,"exponential functions not supported")),W.styleSpec.$version>=8&&(Et&&!Ql(W.valueSpec)?or.push(new ye(W.key,W.value,"property functions not supported")):ht&&!qc(W.valueSpec)&&or.push(new ye(W.key,W.value,"zoom functions not supported"))),J!=="categorical"&&!Ut||W.value.property!==void 0||or.push(new ye(W.key,W.value,'"property" property is required')),or;function Mr(Wr){let ia=[],ha=Wr.value,ja=Wr.key;if(Zs(ha)!=="array")return[new ye(ja,ha,`array expected, ${Zs(ha)} found`)];if(ha.length!==2)return[new ye(ja,ha,`array length 2 expected, length ${ha.length} found`)];if(Ut){if(Zs(ha[0])!=="object")return[new ye(ja,ha,`object expected, ${Zs(ha[0])} found`)];if(ha[0].zoom===void 0)return[new ye(ja,ha,"object stop key must have zoom")];if(ha[0].value===void 0)return[new ye(ja,ha,"object stop key must have value")];if(je&&je>sl(ha[0].zoom))return[new ye(ja,ha[0].zoom,"stop zoom values must appear in ascending order")];sl(ha[0].zoom)!==je&&(je=sl(ha[0].zoom),ke=void 0,We={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:ha[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:ha[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},ha));return Mc(_u(ha[1]))?ia.concat([new ye(`${ja}[1]`,ha[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:ha[1],valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let ha=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(pe){if(ha!==pe)return[new ye(Wr.key,Ka,`${ha} stop domain type must match previous stop domain type ${pe}`)]}else pe=ha;if(ha!=="number"&&ha!=="string"&&ha!=="boolean")return[new ye(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(ha!=="number"&&J!=="categorical"){let Wi=`number expected, ${ha} found`;return Ql(D)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ye(Wr.key,Ka,Wi)]}return J!=="categorical"||ha!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&ha==="number"&&ke!==void 0&&ja<ke?[new ye(Wr.key,Ka,"stop domain values must appear in ascending order")]:(ke=ja,J==="categorical"&&ja in We?[new ye(Wr.key,Ka,"stop domain values must be unique")]:(We[ja]=!0,[])):[new ye(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(pe=>new ye(`${W.key}${pe.key}`,W.value,pe.message));let J=D.value.expression||D.value._styleExpression.expression;if(W.expressionContext==="property"&&W.propertyKey==="text-font"&&!J.outputDefined())return[new ye(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 ye(W.key,W.value,'"feature-state" data expressions are not supported with layout properties.')];if(W.expressionContext==="filter"&&!Gu(J))return[new ye(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 ye(W.key,W.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(W.expressionContext==="cluster-initial"&&!Nf(J))return[new ye(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,pe=W.valueSpec,ke=[];return Array.isArray(pe.values)?pe.values.indexOf(sl(J))===-1&&ke.push(new ye(D,J,`expected one of [${pe.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(pe.values).indexOf(sl(J))===-1&&ke.push(new ye(D,J,`expected one of [${Object.keys(pe.values).join(", ")}], ${JSON.stringify(J)} found`)),ke}function gf(W){return Qf(_u(W.value))?kc(he({},W,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(W)}function Wu(W){let D=W.value,J=W.key;if(Zs(D)!=="array")return[new ye(J,D,`array expected, ${Zs(D)} found`)];let pe=W.styleSpec,ke,je=[];if(D.length<1)return[new ye(J,D,"filter array must have at least 1 element")];switch(je=je.concat(Hu({key:`${J}[0]`,value:D[0],valueSpec:pe.filter_operator,style:W.style,styleSpec:W.styleSpec})),sl(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&sl(D[1])==="$type"&&je.push(new ye(J,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&je.push(new ye(J,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(ke=Zs(D[1]),ke!=="string"&&je.push(new ye(`${J}[1]`,D[1],`string expected, ${ke} found`)));for(let We=2;We<D.length;We++)ke=Zs(D[We]),sl(D[1])==="$type"?je=je.concat(Hu({key:`${J}[${We}]`,value:D[We],valueSpec:pe.geometry_type,style:W.style,styleSpec:W.styleSpec})):ke!=="string"&&ke!=="number"&&ke!=="boolean"&&je.push(new ye(`${J}[${We}]`,D[We],`string, number, or boolean expected, ${ke} found`));break;case"any":case"all":case"none":for(let We=1;We<D.length;We++)je=je.concat(Wu({key:`${J}[${We}]`,value:D[We],style:W.style,styleSpec:W.styleSpec}));break;case"has":case"!has":ke=Zs(D[1]),D.length!==2?je.push(new ye(J,D,`filter array for "${D[0]}" operator must have 2 elements`)):ke!=="string"&&je.push(new ye(`${J}[1]`,D[1],`string expected, ${ke} found`))}return je}function Kc(W,D){let J=W.key,pe=W.validateSpec,ke=W.style,je=W.styleSpec,We=W.value,ht=W.objectKey,Et=je[`${D}_${W.layerType}`];if(!Et)return[];let Ut=ht.match(/^(.*)-transition$/);if(D==="paint"&&Ut&&Et[Ut[1]]&&Et[Ut[1]].transition)return pe({key:J,value:We,valueSpec:je.transition,style:ke,styleSpec:je});let or=W.valueSpec||Et[ht];if(!or)return[new ye(J,We,`unknown property "${ht}"`)];let Mr;if(Zs(We)==="string"&&Ql(or)&&!or.tokens&&(Mr=/^{([^}]+)}$/.exec(We)))return[new ye(J,We,`"${ht}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Mr[1])} }\`.`)];let zr=[];return W.layerType==="symbol"&&(ht==="text-field"&&ke&&!ke.glyphs&&zr.push(new ye(J,We,'use of "text-field" requires a style "glyphs" property')),ht==="text-font"&&kf(_u(We))&&sl(We.type)==="identity"&&zr.push(new ye(J,We,'"text-font" does not support identity functions'))),zr.concat(pe({key:W.key,value:We,valueSpec:or,style:ke,styleSpec:je,expressionContext:"property",propertyType:D,propertyKey:ht}))}function Lf(W){return Kc(W,"paint")}function iu(W){return Kc(W,"layout")}function Vf(W){let D=[],J=W.value,pe=W.key,ke=W.style,je=W.styleSpec;J.type||J.ref||D.push(new ye(pe,J,'either "type" or "ref" is required'));let We=sl(J.type),ht=sl(J.ref);if(J.id){let Et=sl(J.id);for(let Ut=0;Ut<W.arrayIndex;Ut++){let or=ke.layers[Ut];sl(or.id)===Et&&D.push(new ye(pe,J.id,`duplicate layer id "${J.id}", previously used at line ${or.id.__line__}`))}}if("ref"in J){let Et;["type","source","source-layer","filter","layout"].forEach(Ut=>{Ut in J&&D.push(new ye(pe,J[Ut],`"${Ut}" is prohibited for ref layers`))}),ke.layers.forEach(Ut=>{sl(Ut.id)===ht&&(Et=Ut)}),Et?Et.ref?D.push(new ye(pe,J.ref,"ref cannot reference another ref layer")):We=sl(Et.type):D.push(new ye(pe,J.ref,`ref layer "${ht}" not found`))}else if(We!=="background")if(J.source){let Et=ke.sources&&ke.sources[J.source],Ut=Et&&sl(Et.type);Et?Ut==="vector"&&We==="raster"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a raster source`)):Ut!=="raster-dem"&&We==="hillshade"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a raster-dem source`)):Ut==="raster"&&We!=="raster"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a vector source`)):Ut!=="vector"||J["source-layer"]?Ut==="raster-dem"&&We!=="hillshade"?D.push(new ye(pe,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):We!=="line"||!J.paint||!J.paint["line-gradient"]||Ut==="geojson"&&Et.lineMetrics||D.push(new ye(pe,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new ye(pe,J,`layer "${J.id}" must specify a "source-layer"`)):D.push(new ye(pe,J.source,`source "${J.source}" not found`))}else D.push(new ye(pe,J,'missing required property "source"'));return D=D.concat(Pu({key:pe,value:J,valueSpec:je.layer,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":()=>[],type:()=>W.validateSpec({key:`${pe}.type`,value:J.type,valueSpec:je.layer.type,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:Et=>Pu({layer:J,key:Et.key,value:Et.value,style:Et.style,styleSpec:Et.styleSpec,validateSpec:Et.validateSpec,objectElementValidators:{"*":Ut=>iu(he({layerType:We},Ut))}}),paint:Et=>Pu({layer:J,key:Et.key,value:Et.value,style:Et.style,styleSpec:Et.styleSpec,validateSpec:Et.validateSpec,objectElementValidators:{"*":Ut=>Lf(he({layerType:We},Ut))}})}})),D}function Xu(W){let D=W.value,J=W.key,pe=Zs(D);return pe!=="string"?[new ye(J,D,`string expected, ${pe} found`)]:[]}let Cc={promoteId:function({key:W,value:D}){if(Zs(D)==="string")return Xu({key:W,value:D});{let J=[];for(let pe in D)J.push(...Xu({key:`${W}.${pe}`,value:D[pe]}));return J}}};function gc(W){let D=W.value,J=W.key,pe=W.styleSpec,ke=W.style,je=W.validateSpec;if(!D.type)return[new ye(J,D,'"type" is required')];let We=sl(D.type),ht;switch(We){case"vector":case"raster":return ht=Pu({key:J,value:D,valueSpec:pe[`source_${We.replace("-","_")}`],style:W.style,styleSpec:pe,objectElementValidators:Cc,validateSpec:je}),ht;case"raster-dem":return ht=function(Et){var Ut;let or=(Ut=Et.sourceName)!==null&&Ut!==void 0?Ut:"",Mr=Et.value,zr=Et.styleSpec,Wr=zr.source_raster_dem,ia=Et.style,ha=[],ja=Zs(Mr);if(Mr===void 0)return ha;if(ja!=="object")return ha.push(new ye("source_raster_dem",Mr,`object expected, ${ja} found`)),ha;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=Et.value.encoding?`"${Et.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?ha.push(new ye(qi,Mr[qi],`In "${or}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?ha=ha.concat(Et.validateSpec({key:qi,value:Mr[qi],valueSpec:Wr[qi],validateSpec:Et.validateSpec,style:ia,styleSpec:zr})):ha.push(new ye(qi,Mr[qi],`unknown property "${qi}"`));return ha}({sourceName:J,value:D,style:W.style,styleSpec:pe,validateSpec:je}),ht;case"geojson":if(ht=Pu({key:J,value:D,valueSpec:pe.source_geojson,style:ke,styleSpec:pe,validateSpec:je,objectElementValidators:Cc}),D.cluster)for(let Et in D.clusterProperties){let[Ut,or]=D.clusterProperties[Et],Mr=typeof Ut=="string"?[Ut,["accumulated"],["get",Et]]:Ut;ht.push(...kc({key:`${J}.${Et}.map`,value:or,validateSpec:je,expressionContext:"cluster-map"})),ht.push(...kc({key:`${J}.${Et}.reduce`,value:Mr,validateSpec:je,expressionContext:"cluster-reduce"}))}return ht;case"video":return Pu({key:J,value:D,valueSpec:pe.source_video,style:ke,validateSpec:je,styleSpec:pe});case"image":return Pu({key:J,value:D,valueSpec:pe.source_image,style:ke,validateSpec:je,styleSpec:pe});case"canvas":return[new ye(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:ke,validateSpec:je,styleSpec:pe})}}function ql(W){let D=W.value,J=W.styleSpec,pe=J.light,ke=W.style,je=[],We=Zs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new ye("light",D,`object expected, ${We} found`)]),je;for(let ht in D){let Et=ht.match(/^(.*)-transition$/);je=je.concat(Et&&pe[Et[1]]&&pe[Et[1]].transition?W.validateSpec({key:ht,value:D[ht],valueSpec:J.transition,validateSpec:W.validateSpec,style:ke,styleSpec:J}):pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],validateSpec:W.validateSpec,style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)])}return je}function xu(W){let D=W.value,J=W.styleSpec,pe=J.sky,ke=W.style,je=Zs(D);if(D===void 0)return[];if(je!=="object")return[new ye("sky",D,`object expected, ${je} found`)];let We=[];for(let ht in D)We=We.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return We}function Lc(W){let D=W.value,J=W.styleSpec,pe=J.terrain,ke=W.style,je=[],We=Zs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new ye("terrain",D,`object expected, ${We} found`)]),je;for(let ht in D)je=je.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],validateSpec:W.validateSpec,style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return je}function Jc(W){let D=[],J=W.value,pe=W.key;if(Array.isArray(J)){let ke=[],je=[];for(let We in J)J[We].id&&ke.includes(J[We].id)&&D.push(new ye(pe,J,`all the sprites' ids must be unique, but ${J[We].id} is duplicated`)),ke.push(J[We].id),J[We].url&&je.includes(J[We].url)&&D.push(new ye(pe,J,`all the sprites' URLs must be unique, but ${J[We].url} is duplicated`)),je.push(J[We].url),D=D.concat(Pu({key:`${pe}[${We}]`,value:J[We],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:W.validateSpec}));return D}return Xu({key:pe,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(W){let D=W.value,J=W.key,pe=Zs(D);return pe!=="boolean"?[new ye(J,D,`boolean expected, ${pe} found`)]:[]},number:hl,color:function(W){let D=W.key,J=W.value,pe=Zs(J);return pe!=="string"?[new ye(D,J,`color expected, ${pe} found`)]:Jt.parse(String(J))?[]:[new ye(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,pe=J.projection,ke=W.style,je=Zs(D);if(D===void 0)return[];if(je!=="object")return[new ye("projection",D,`object expected, ${je} found`)];let We=[];for(let ht in D)We=We.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return We},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(Zs(J)==="array"){if(J.length<1||J.length>4)return[new ye(D,J,`padding requires 1 to 4 values; ${J.length} values found`)];let pe={type:"number"},ke=[];for(let je=0;je<J.length;je++)ke=ke.concat(W.validateSpec({key:`${D}[${je}]`,value:J[je],validateSpec:W.validateSpec,valueSpec:pe}));return ke}return hl({key:D,value:J,valueSpec:{}})},variableAnchorOffsetCollection:function(W){let D=W.key,J=W.value,pe=Zs(J),ke=W.styleSpec;if(pe!=="array"||J.length<1||J.length%2!=0)return[new ye(D,J,"variableAnchorOffsetCollection requires a non-empty array of even length")];let je=[];for(let We=0;We<J.length;We+=2)je=je.concat(Hu({key:`${D}[${We}]`,value:J[We],valueSpec:ke.layout_symbol["text-anchor"]})),je=je.concat(Cf({key:`${D}[${We+1}]`,value:J[We+1],valueSpec:{length:2,value:"number"},validateSpec:W.validateSpec,style:W.style,styleSpec:ke}));return je},sprite:Jc};function Pc(W){let D=W.value,J=W.valueSpec,pe=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(he({},W,{valueSpec:J.type?pe[J.type]:J}))}function Qt(W){let D=W.value,J=W.key,pe=Xu(W);return pe.length||(D.indexOf("{fontstack}")===-1&&pe.push(new ye(J,D,'"glyphs" url must include a "{fontstack}" token')),D.indexOf("{range}")===-1&&pe.push(new ye(J,D,'"glyphs" url must include a "{range}" token'))),pe}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(ds(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,dn=li.layoutProperty;function Pi(W,D){let J=!1;if(D&&D.length)for(let pe of D)W.fire(new j(new Error(pe.message))),J=!0;return J}class Di{constructor(D,J,pe){let ke=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let We=new Int32Array(this.arrayBuffer);D=We[0],this.d=(J=We[1])+2*(pe=We[2]);for(let Et=0;Et<this.d*this.d;Et++){let Ut=We[3+Et],or=We[3+Et+1];ke.push(Ut===or?null:We.subarray(Ut,or))}let ht=We[3+ke.length+1];this.keys=We.subarray(We[3+ke.length],ht),this.bboxes=We.subarray(ht),this.insert=this._insertReadonly}else{this.d=J+2*pe;for(let We=0;We<this.d*this.d;We++)ke.push([]);this.keys=[],this.bboxes=[]}this.n=J,this.extent=D,this.padding=pe,this.scale=J/D,this.uid=0;let je=pe/J*D;this.min=-je,this.max=D+je}insert(D,J,pe,ke,je){this._forEachCell(J,pe,ke,je,this._insertCell,this.uid++,void 0,void 0),this.keys.push(D),this.bboxes.push(J),this.bboxes.push(pe),this.bboxes.push(ke),this.bboxes.push(je)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(D,J,pe,ke,je,We){this.cells[je].push(We)}query(D,J,pe,ke,je){let We=this.min,ht=this.max;if(D<=We&&J<=We&&ht<=pe&&ht<=ke&&!je)return Array.prototype.slice.call(this.keys);{let Et=[];return this._forEachCell(D,J,pe,ke,this._queryCell,Et,{},je),Et}}_queryCell(D,J,pe,ke,je,We,ht,Et){let Ut=this.cells[je];if(Ut!==null){let or=this.keys,Mr=this.bboxes;for(let zr=0;zr<Ut.length;zr++){let Wr=Ut[zr];if(ht[Wr]===void 0){let ia=4*Wr;(Et?Et(Mr[ia+0],Mr[ia+1],Mr[ia+2],Mr[ia+3]):D<=Mr[ia+2]&&J<=Mr[ia+3]&&pe>=Mr[ia+0]&&ke>=Mr[ia+1])?(ht[Wr]=!0,We.push(or[Wr])):ht[Wr]=!1}}}}_forEachCell(D,J,pe,ke,je,We,ht,Et){let Ut=this._convertToCellCoord(D),or=this._convertToCellCoord(J),Mr=this._convertToCellCoord(pe),zr=this._convertToCellCoord(ke);for(let Wr=Ut;Wr<=Mr;Wr++)for(let ia=or;ia<=zr;ia++){let ha=this.d*ia+Wr;if((!Et||Et(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&je.call(this,D,J,pe,ke,ha,We,ht,Et))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,pe=0;for(let We=0;We<this.cells.length;We++)pe+=this.cells[We].length;let ke=new Int32Array(J+pe+this.keys.length+this.bboxes.length);ke[0]=this.extent,ke[1]=this.n,ke[2]=this.padding;let je=J;for(let We=0;We<D.length;We++){let ht=D[We];ke[3+We]=je,ke.set(ht,je),je+=ht.length}return ke[3+D.length]=je,ke.set(this.keys,je),je+=this.keys.length,ke[3+D.length+1]=je,ke.set(this.bboxes,je),je+=this.bboxes.length,ke.buffer}static serialize(D,J){let pe=D.toArrayBuffer();return J&&J.push(pe),{buffer:pe}}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",fe),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 Mn(W){return W&&typeof ArrayBuffer<"u"&&(W instanceof ArrayBuffer||W.constructor&&W.constructor.name==="ArrayBuffer")}function Qn(W){return W.$name||W.constructor._classRegistryKey}function ao(W){return!function(D){if(D===null||typeof D!="object")return!1;let J=Qn(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||Mn(W)||F(W)||ArrayBuffer.isView(W)||W instanceof ImageData)}function eo(W,D){if(ao(W))return(Mn(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 je=[];for(let We of W)je.push(eo(We,D));return je}if(typeof W!="object")throw new Error("can't serialize object of type "+typeof W);let J=Qn(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:pe}=Ni[J],ke=pe.serialize?pe.serialize(W,D):{};if(pe.serialize){if(D&&ke===D[D.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let je in W){if(!W.hasOwnProperty(je)||Ni[J].omit.indexOf(je)>=0)continue;let We=W[je];ke[je]=Ni[J].shallow.indexOf(je)>=0?We:eo(We,D)}W instanceof Error&&(ke.message=W.message)}if(ke.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(ke.$name=J),ke}function fo(W){if(ao(W))return W;if(Array.isArray(W))return W.map(fo);if(typeof W!="object")throw new Error("can't deserialize object of type "+typeof W);let D=Qn(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 pe=Object.create(J.prototype);for(let ke of Object.keys(W)){if(ke==="$name")continue;let je=W[ke];pe[ke]=Ni[D].shallow.indexOf(ke)>=0?je:fo(je)}return pe}class An{constructor(){this.first=!0}update(D,J){let pe=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=pe,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=pe,!0):(this.lastFloorZoom>pe?(this.lastIntegerZoom=pe+1,this.lastIntegerZoomTime=J):this.lastFloorZoom<pe&&(this.lastIntegerZoom=pe,this.lastIntegerZoomTime=J),D!==this.lastZoom&&(this.lastZoom=D,this.lastFloorZoom=pe,!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 yo(W){for(let D of W)if(bs(D.charCodeAt(0)))return!0;return!1}function Ko(W){for(let D of W)if(!Os(D.charCodeAt(0)))return!1;return!0}function Ss(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=Ss(["Arab","Dupl","Mong","Ougr","Syrc"]);function Os(W){return!rl.test(String.fromCodePoint(W))}let el=Ss(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function bs(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!(bs(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=Ss(["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 Un(W,D){return!(!D&&ll(W)||W>=2304&&W<=3583||W>=3840&&W<=4255||un.Khmer(W))}function Lo(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 Rs{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 An,this.transition={})}isSupportedScript(D){return function(J,pe){for(let ke of J)if(!Un(ke.charCodeAt(0),pe))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),pe=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*pe}:{fromScale:.5,toScale:1,t:1-(1-pe)*J}}}class uu{constructor(D,J){this.property=D,this.value=J,this.expression=function(pe,ke){if(kf(pe))return new El(pe,ke);if(Mc(pe)){let je=Tu(pe,ke);if(je.result==="error")throw new Error(je.value.map(We=>`${We.key}: ${We.message}`).join(", "));return je.value}{let je=pe;return ke.type==="color"&&typeof pe=="string"?je=Jt.parse(pe):ke.type!=="padding"||typeof pe!="number"&&!Array.isArray(pe)?ke.type==="variableAnchorOffsetCollection"&&Array.isArray(pe)&&(je=$a.parse(pe)):je=ca.parse(pe),{kind:"constant",evaluate:()=>je}}}(J===void 0?D.specification.default:J,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,J,pe){return this.property.possiblyEvaluate(this,D,J,pe)}}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 pe=this.getValue(J);pe!==void 0&&(D[J]=pe);let ke=this.getTransition(J);ke!==void 0&&(D[`${J}-transition`]=ke)}return D}transitioned(D,J){let pe=new bu(this._properties);for(let ke of Object.keys(this._values))pe._values[ke]=this._values[ke].transitioned(D,J._values[ke]);return pe}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,pe,ke,je){this.property=D,this.value=J,this.begin=je+ke.delay||0,this.end=this.begin+ke.duration||0,D.specification.transition&&(ke.delay||ke.duration)&&(this.prior=pe)}possiblyEvaluate(D,J,pe){let ke=D.now||0,je=this.value.possiblyEvaluate(D,J,pe),We=this.prior;if(We){if(ke>this.end)return this.prior=null,je;if(this.value.isDataDriven())return this.prior=null,je;if(ke<this.begin)return We.possiblyEvaluate(D,J,pe);{let ht=(ke-this.begin)/(this.end-this.begin);return this.property.interpolate(We.possiblyEvaluate(D,J,pe),je,function(Et){if(Et<=0)return 0;if(Et>=1)return 1;let Ut=Et*Et,or=Ut*Et;return 4*(Et<.5?or:3*(Et-Ut)+or-.75)}(ht))}}return je}}class bu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,J,pe){let ke=new yc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,J,pe);return ke}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 pe=this.getValue(J);pe!==void 0&&(D[J]=pe)}return D}possiblyEvaluate(D,J,pe){let ke=new yc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,J,pe);return ke}}class Au{constructor(D,J,pe){this.property=D,this.value=J,this.parameters=pe}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,J,pe,ke){return this.property.evaluate(this.value,this.parameters,D,J,pe,ke)}}class yc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class ho{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,pe){let ke=On[this.specification.type];return ke?ke(D,J,pe):D}}class Ro{constructor(D,J){this.specification=D,this.overrides=J}possiblyEvaluate(D,J,pe,ke){return new Au(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(J,null,{},pe,ke)}:D.expression,J)}interpolate(D,J,pe){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 ke=On[this.specification.type];if(ke){let je=ke(D.value.value,J.value.value,pe);return new Au(this,{kind:"constant",value:je},D.parameters)}return D}evaluate(D,J,pe,ke,je,We){return D.kind==="constant"?D.value:D.evaluate(J,pe,ke,je,We)}}class Dc extends Ro{possiblyEvaluate(D,J,pe,ke){if(D.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(D.expression.kind==="constant"){let je=D.expression.evaluate(J,null,{},pe,ke),We=D.property.specification.type==="resolvedImage"&&typeof je!="string"?je.name:je,ht=this._calculate(We,We,We,J);return new Au(this,{kind:"constant",value:ht},J)}if(D.expression.kind==="camera"){let je=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:je},J)}return new Au(this,D.expression,J)}evaluate(D,J,pe,ke,je,We){if(D.kind==="source"){let ht=D.evaluate(J,pe,ke,je,We);return this._calculate(ht,ht,ht,J)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(J.zoom)-1},pe,ke),D.evaluate({zoom:Math.floor(J.zoom)},pe,ke),D.evaluate({zoom:Math.floor(J.zoom)+1},pe,ke),J):D.value}_calculate(D,J,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:pe,to:J}}interpolate(D){return D}}class lc{constructor(D){this.specification=D}possiblyEvaluate(D,J,pe,ke){if(D.value!==void 0){if(D.expression.kind==="constant"){let je=D.expression.evaluate(J,null,{},pe,ke);return this._calculate(je,je,je,J)}return this._calculate(D.expression.evaluate(new Rs(Math.floor(J.zoom-1),J)),D.expression.evaluate(new Rs(Math.floor(J.zoom),J)),D.expression.evaluate(new Rs(Math.floor(J.zoom+1),J)),J)}}_calculate(D,J,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:pe,to:J}}interpolate(D){return D}}class Yu{constructor(D){this.specification=D}possiblyEvaluate(D,J,pe,ke){return!!D.expression.evaluate(J,null,{},pe,ke)}interpolate(){return!1}}class Ue{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in D){let pe=D[J];pe.specification.overridable&&this.overridableProperties.push(J);let ke=this.defaultPropertyValues[J]=new uu(pe,void 0),je=this.defaultTransitionablePropertyValues[J]=new Iu(pe);this.defaultTransitioningPropertyValues[J]=je.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=ke.possiblyEvaluate({})}}}mi("DataDrivenProperty",Ro),mi("DataConstantProperty",ho),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 pe in D.paint)this.setPaintProperty(pe,D.paint[pe],{validate:!1});for(let pe in D.layout)this.setLayoutProperty(pe,D.layout[pe],{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,pe={}){J!=null&&this._validate(dn,`layers.${this.id}.layout.${D}`,D,J,pe)||(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,pe={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${D}`,D,J,pe))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),J||void 0),!1;{let ke=this._transitionablePaint._values[D],je=ke.property.specification["property-type"]==="cross-faded-data-driven",We=ke.value.isDataDriven(),ht=ke.value;this._transitionablePaint.setValue(D,J),this._handleSpecialPaintPropertyUpdate(D);let Et=this._transitionablePaint._values[D].value;return Et.isDataDriven()||We||je||this._handleOverridablePaintPropertyUpdate(D,ht,Et)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,J,pe){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),d(D,(J,pe)=>!(J===void 0||pe==="layout"&&!Object.keys(J).length||pe==="paint"&&!Object.keys(J).length))}_validate(D,J,pe,ke,je={}){return(!je||je.validate!==!1)&&Pi(this,D.call(li,{key:J,layerType:this.type,objectKey:pe,value:ke,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 we={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{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 Be{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 dt(W,D=1){let J=0,pe=0;return{members:W.map(ke=>{let je=we[ke.type].BYTES_PER_ELEMENT,We=J=St(J,Math.max(D,je)),ht=ke.components||1;return pe=Math.max(pe,je),J+=je*ht,{name:ke.name,type:ke.type,components:ht,offset:We}}),size:St(J,Math.max(pe,D)),alignment:D}}function St(W,D){return Math.ceil(W/D)*D}class Nt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.int16[ke+0]=J,this.int16[ke+1]=pe,D}}Nt.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Nt);class $t extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.int16[je+0]=J,this.int16[je+1]=pe,this.int16[je+2]=ke,D}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,J,pe,ke)}emplace(D,J,pe,ke,je){let We=4*D;return this.int16[We+0]=J,this.int16[We+1]=pe,this.int16[We+2]=ke,this.int16[We+3]=je,D}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Ar extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=6*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.int16[Et+2]=ke,this.int16[Et+3]=je,this.int16[Et+4]=We,this.int16[Et+5]=ht,D}}Ar.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Ar);class Kr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=4*D,Ut=8*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.uint8[Ut+4]=ke,this.uint8[Ut+5]=je,this.uint8[Ut+6]=We,this.uint8[Ut+7]=ht,D}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.float32[ke+0]=J,this.float32[ke+1]=pe,D}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class He extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,D,J,pe,ke,je,We,ht,Et,Ut,or)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr){let zr=10*D;return this.uint16[zr+0]=J,this.uint16[zr+1]=pe,this.uint16[zr+2]=ke,this.uint16[zr+3]=je,this.uint16[zr+4]=We,this.uint16[zr+5]=ht,this.uint16[zr+6]=Et,this.uint16[zr+7]=Ut,this.uint16[zr+8]=or,this.uint16[zr+9]=Mr,D}}He.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",He);class Je extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr){let ia=12*D;return this.int16[ia+0]=J,this.int16[ia+1]=pe,this.int16[ia+2]=ke,this.int16[ia+3]=je,this.uint16[ia+4]=We,this.uint16[ia+5]=ht,this.uint16[ia+6]=Et,this.uint16[ia+7]=Ut,this.int16[ia+8]=or,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,D}}Je.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",Je);class lt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.float32[je+0]=J,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class vt extends Be{_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}}vt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",vt);class Lt extends Be{_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,pe,ke,je,We,ht,Et,Ut){let or=this.length;return this.resize(or+1),this.emplace(or,D,J,pe,ke,je,We,ht,Et,Ut)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or){let Mr=10*D,zr=5*D;return this.int16[Mr+0]=J,this.int16[Mr+1]=pe,this.int16[Mr+2]=ke,this.int16[Mr+3]=je,this.int16[Mr+4]=We,this.int16[Mr+5]=ht,this.uint32[zr+3]=Et,this.uint16[Mr+8]=Ut,this.uint16[Mr+9]=or,D}}Lt.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Lt);class At extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=6*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.int16[Et+2]=ke,this.int16[Et+3]=je,this.int16[Et+4]=We,this.int16[Et+5]=ht,D}}At.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",At);class zt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je){let We=this.length;return this.resize(We+1),this.emplace(We,D,J,pe,ke,je)}emplace(D,J,pe,ke,je,We){let ht=4*D,Et=8*D;return this.float32[ht+0]=J,this.float32[ht+1]=pe,this.float32[ht+2]=ke,this.int16[Et+6]=je,this.int16[Et+7]=We,D}}zt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",zt);class cr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=16*D,Ut=4*D,or=8*D;return this.uint8[Et+0]=J,this.uint8[Et+1]=pe,this.float32[Ut+1]=ke,this.float32[Ut+2]=je,this.int16[or+6]=We,this.int16[or+7]=ht,D}}cr.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",cr);class yr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.uint16[je+0]=J,this.uint16[je+1]=pe,this.uint16[je+2]=ke,D}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er extends Be{_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,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi){let gi=24*D,qi=12*D,en=48*D;return this.int16[gi+0]=J,this.int16[gi+1]=pe,this.uint16[gi+2]=ke,this.uint16[gi+3]=je,this.uint32[qi+2]=We,this.uint32[qi+3]=ht,this.uint32[qi+4]=Et,this.uint16[gi+10]=Ut,this.uint16[gi+11]=or,this.uint16[gi+12]=Mr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=ha,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,D}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);class jr extends Be{_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,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo){let zo=this.length;return this.resize(zo+1),this.emplace(zo,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo,zo){let wn=32*D,os=16*D;return this.int16[wn+0]=J,this.int16[wn+1]=pe,this.int16[wn+2]=ke,this.int16[wn+3]=je,this.int16[wn+4]=We,this.int16[wn+5]=ht,this.int16[wn+6]=Et,this.int16[wn+7]=Ut,this.uint16[wn+8]=or,this.uint16[wn+9]=Mr,this.uint16[wn+10]=zr,this.uint16[wn+11]=Wr,this.uint16[wn+12]=ia,this.uint16[wn+13]=ha,this.uint16[wn+14]=ja,this.uint16[wn+15]=Ka,this.uint16[wn+16]=Wi,this.uint16[wn+17]=gi,this.uint16[wn+18]=qi,this.uint16[wn+19]=en,this.uint16[wn+20]=qn,this.uint16[wn+21]=Eo,this.uint16[wn+22]=ys,this.uint32[os+12]=mo,this.float32[os+13]=zn,this.float32[os+14]=ts,this.uint16[wn+30]=Uo,this.uint16[wn+31]=zo,D}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends Be{_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 pa extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.uint16[6*D+0]=J,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}pa.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",pa);class Aa extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=4*D;return this.uint32[2*D+0]=J,this.uint16[je+2]=pe,this.uint16[je+3]=ke,D}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class za extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.uint16[ke+0]=J,this.uint16[ke+1]=pe,D}}za.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",za);class ci extends Be{_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 Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,J,pe,ke)}emplace(D,J,pe,ke,je){let We=4*D;return this.float32[We+0]=J,this.float32[We+1]=pe,this.float32[We+2]=ke,this.float32[We+3]=je,D}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new n(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class nn extends Lt{get(D){return new ji(this,D)}}mi("CollisionBoxArray",nn);class Sn extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(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]}}Sn.prototype.size=48;class Kn extends Er{get(D){return new Sn(this,D)}}mi("PlacedSymbolArray",Kn);class Bn extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(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]}}Bn.prototype.size=64;class wo extends jr{get(D){return new Bn(this,D)}}mi("SymbolInstanceArray",wo);class is extends Qr{getoffsetX(D){return this.float32[1*D+0]}}mi("GlyphOffsetArray",is);class Ao 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",Ao);class Zo extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Zo.prototype.size=12;class ps extends pa{get(D){return new Zo(this,D)}}mi("TextAnchorOffsetArray",ps);class ul extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}ul.prototype.size=8;class tl extends Aa{get(D){return new ul(this,D)}}mi("FeatureIndexArray",tl);class Jo extends Nt{}class $o extends Nt{}class Il extends Nt{}class eu extends Ar{}class Ru extends Kr{}class vu extends na{}class Tl extends He{}class cu extends Je{}class uc extends lt{}class Vl extends vt{}class Gl extends At{}class de extends cr{}class Fe extends yr{}class et extends za{}let mt=dt([{name:"a_pos",components:2,type:"Int16"}],4),{members:bt}=mt;class Mt{constructor(D=[]){this.segments=D}prepareSegment(D,J,pe,ke){let je=this.segments[this.segments.length-1];return D>Mt.MAX_VERTEX_ARRAY_LENGTH&&f(`Max vertices per segment is ${Mt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!je||je.vertexLength+D>Mt.MAX_VERTEX_ARRAY_LENGTH||je.sortKey!==ke)&&(je={vertexOffset:J.length,primitiveOffset:pe.length,vertexLength:0,primitiveLength:0},ke!==void 0&&(je.sortKey=ke),this.segments.push(je)),je}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,pe,ke){return new Mt([{vertexOffset:D,primitiveOffset:J,vertexLength:pe,primitiveLength:ke,vaos:{},sortKey:0}])}}function ar(W,D){return 256*(W=w(Math.floor(W),0,255))+w(Math.floor(D),0,255)}Mt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Mt);let Ot=dt([{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,pe,ke,je,We,ht,Et,Ut;for(pe=W.length-(J=3&W.length),ke=D,We=3432918353,ht=461845907,Ut=0;Ut<pe;)Et=255&W.charCodeAt(Ut)|(255&W.charCodeAt(++Ut))<<8|(255&W.charCodeAt(++Ut))<<16|(255&W.charCodeAt(++Ut))<<24,++Ut,ke=27492+(65535&(je=5*(65535&(ke=(ke^=Et=(65535&(Et=(Et=(65535&Et)*We+(((Et>>>16)*We&65535)<<16)&4294967295)<<15|Et>>>17))*ht+(((Et>>>16)*ht&65535)<<16)&4294967295)<<13|ke>>>19))+((5*(ke>>>16)&65535)<<16)&4294967295))+((58964+(je>>>16)&65535)<<16);switch(Et=0,J){case 3:Et^=(255&W.charCodeAt(Ut+2))<<16;case 2:Et^=(255&W.charCodeAt(Ut+1))<<8;case 1:ke^=Et=(65535&(Et=(Et=(65535&(Et^=255&W.charCodeAt(Ut)))*We+(((Et>>>16)*We&65535)<<16)&4294967295)<<15|Et>>>17))*ht+(((Et>>>16)*ht&65535)<<16)&4294967295}return ke^=W.length,ke=2246822507*(65535&(ke^=ke>>>16))+((2246822507*(ke>>>16)&65535)<<16)&4294967295,ke=3266489909*(65535&(ke^=ke>>>13))+((3266489909*(ke>>>16)&65535)<<16)&4294967295,(ke^=ke>>>16)>>>0};var Xr=Gr.exports,xa={exports:{}};xa.exports=function(W,D){for(var J,pe=W.length,ke=D^pe,je=0;pe>=4;)J=1540483477*(65535&(J=255&W.charCodeAt(je)|(255&W.charCodeAt(++je))<<8|(255&W.charCodeAt(++je))<<16|(255&W.charCodeAt(++je))<<24))+((1540483477*(J>>>16)&65535)<<16),ke=1540483477*(65535&ke)+((1540483477*(ke>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),pe-=4,++je;switch(pe){case 3:ke^=(255&W.charCodeAt(je+2))<<16;case 2:ke^=(255&W.charCodeAt(je+1))<<8;case 1:ke=1540483477*(65535&(ke^=255&W.charCodeAt(je)))+((1540483477*(ke>>>16)&65535)<<16)}return ke=1540483477*(65535&(ke^=ke>>>13))+((1540483477*(ke>>>16)&65535)<<16),(ke^=ke>>>15)>>>0};var da=Xr,Ja=xa.exports;_r.exports=da,_r.exports.murmur3=da,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,J,pe,ke){this.ids.push(Fa(D)),this.positions.push(J,pe,ke)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=Fa(D),pe=0,ke=this.ids.length-1;for(;pe<ke;){let We=pe+ke>>1;this.ids[We]>=J?ke=We:pe=We+1}let je=[];for(;this.ids[pe]===J;)je.push({index:this.positions[3*pe],start:this.positions[3*pe+1],end:this.positions[3*pe+2]}),pe++;return je}static serialize(D,J){let pe=new Float64Array(D.ids),ke=new Uint32Array(D.positions);return Xa(pe,ke,0,pe.length-1),J&&J.push(pe.buffer,ke.buffer),{ids:pe,positions:ke}}static deserialize(D){let J=new Sa;return J.ids=D.ids,J.positions=D.positions,J.indexed=!0,J}}function Fa(W){let D=+W;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:ti(String(W))}function Xa(W,D,J,pe){for(;J<pe;){let ke=W[J+pe>>1],je=J-1,We=pe+1;for(;;){do je++;while(W[je]<ke);do We--;while(W[We]>ke);if(je>=We)break;fi(W,je,We),fi(D,3*je,3*We),fi(D,3*je+1,3*We+1),fi(D,3*je+2,3*We+2)}We-J<pe-We?(Xa(W,D,J,We),J=We+1):(Xa(W,D,We+1,pe),pe=We)}}function fi(W,D,J){let pe=W[D];W[D]=W[J],W[J]=pe}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 vn=new Float32Array(16);function Pn(W){return[ar(255*W.r,255*W.g),ar(255*W.b,255*W.a)]}class Jn{constructor(D,J,pe){this.value=D,this.uniformNames=J.map(ke=>`u_${ke}`),this.type=pe}setUniform(D,J,pe){D.set(pe.constantOr(this.value))}getBinding(D,J,pe){return this.type==="color"?new rn(D,J):new La(D,J)}}class ro{constructor(D,J){this.uniformNames=J.map(pe=>`u_${pe}`),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,pe,ke){let je=ke==="u_pattern_to"?this.patternTo:ke==="u_pattern_from"?this.patternFrom:ke==="u_pixel_ratio_to"?this.pixelRatioTo:ke==="u_pixel_ratio_from"?this.pixelRatioFrom:null;je&&D.set(je)}getBinding(D,J,pe){return pe.substr(0,9)==="u_pattern"?new sn(D,J):new La(D,J)}}class Yo{constructor(D,J,pe,ke){this.expression=D,this.type=pe,this.maxValue=0,this.paintVertexAttributes=J.map(je=>({name:`a_${je}`,type:"Float32",components:pe==="color"?2:1,offset:0})),this.paintVertexArray=new ke}populatePaintArray(D,J,pe,ke,je){let We=this.paintVertexArray.length,ht=this.expression.evaluate(new Rs(0),J,{},ke,[],je);this.paintVertexArray.resize(D),this._setPaintValue(We,D,ht)}updatePaintArray(D,J,pe,ke){let je=this.expression.evaluate({zoom:0},pe,ke);this._setPaintValue(D,J,je)}_setPaintValue(D,J,pe){if(this.type==="color"){let ke=Pn(pe);for(let je=D;je<J;je++)this.paintVertexArray.emplace(je,ke[0],ke[1])}else{for(let ke=D;ke<J;ke++)this.paintVertexArray.emplace(ke,pe);this.maxValue=Math.max(this.maxValue,Math.abs(pe))}}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 io{constructor(D,J,pe,ke,je,We){this.expression=D,this.uniformNames=J.map(ht=>`u_${ht}_t`),this.type=pe,this.useIntegerZoom=ke,this.zoom=je,this.maxValue=0,this.paintVertexAttributes=J.map(ht=>({name:`a_${ht}`,type:"Float32",components:pe==="color"?4:2,offset:0})),this.paintVertexArray=new We}populatePaintArray(D,J,pe,ke,je){let We=this.expression.evaluate(new Rs(this.zoom),J,{},ke,[],je),ht=this.expression.evaluate(new Rs(this.zoom+1),J,{},ke,[],je),Et=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Et,D,We,ht)}updatePaintArray(D,J,pe,ke){let je=this.expression.evaluate({zoom:this.zoom},pe,ke),We=this.expression.evaluate({zoom:this.zoom+1},pe,ke);this._setPaintValue(D,J,je,We)}_setPaintValue(D,J,pe,ke){if(this.type==="color"){let je=Pn(pe),We=Pn(ke);for(let ht=D;ht<J;ht++)this.paintVertexArray.emplace(ht,je[0],je[1],We[0],We[1])}else{for(let je=D;je<J;je++)this.paintVertexArray.emplace(je,pe,ke);this.maxValue=Math.max(this.maxValue,Math.abs(pe),Math.abs(ke))}}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 pe=this.useIntegerZoom?Math.floor(J.zoom):J.zoom,ke=w(this.expression.interpolationFactor(pe,this.zoom,this.zoom+1),0,1);D.set(ke)}getBinding(D,J,pe){return new La(D,J)}}class Ho{constructor(D,J,pe,ke,je,We){this.expression=D,this.type=J,this.useIntegerZoom=pe,this.zoom=ke,this.layerId=We,this.zoomInPaintVertexArray=new je,this.zoomOutPaintVertexArray=new je}populatePaintArray(D,J,pe){let ke=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(D),this.zoomOutPaintVertexArray.resize(D),this._setPaintValues(ke,D,J.patterns&&J.patterns[this.layerId],pe)}updatePaintArray(D,J,pe,ke,je){this._setPaintValues(D,J,pe.patterns&&pe.patterns[this.layerId],je)}_setPaintValues(D,J,pe,ke){if(!ke||!pe)return;let{min:je,mid:We,max:ht}=pe,Et=ke[je],Ut=ke[We],or=ke[ht];if(Et&&Ut&&or)for(let Mr=D;Mr<J;Mr++)this.zoomInPaintVertexArray.emplace(Mr,Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],Et.tl[0],Et.tl[1],Et.br[0],Et.br[1],Ut.pixelRatio,Et.pixelRatio),this.zoomOutPaintVertexArray.emplace(Mr,Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],or.tl[0],or.tl[1],or.br[0],or.br[1],Ut.pixelRatio,or.pixelRatio)}upload(D){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=D.createVertexBuffer(this.zoomInPaintVertexArray,Ot.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=D.createVertexBuffer(this.zoomOutPaintVertexArray,Ot.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class cl{constructor(D,J,pe){this.binders={},this._buffers=[];let ke=[];for(let je in D.paint._values){if(!pe(je))continue;let We=D.paint.get(je);if(!(We instanceof Au&&Ql(We.property.specification)))continue;let ht=xl(je,D.type),Et=We.value,Ut=We.property.specification.type,or=We.property.useIntegerZoom,Mr=We.property.specification["property-type"],zr=Mr==="cross-faded"||Mr==="cross-faded-data-driven";if(Et.kind==="constant")this.binders[je]=zr?new ro(Et.value,ht):new Jn(Et.value,ht,Ut),ke.push(`/u_${je}`);else if(Et.kind==="source"||zr){let Wr=gn(je,Ut,"source");this.binders[je]=zr?new Ho(Et,Ut,or,J,Wr,D.id):new Yo(Et,ht,Ut,Wr),ke.push(`/a_${je}`)}else{let Wr=gn(je,Ut,"composite");this.binders[je]=new io(Et,ht,Ut,or,J,Wr),ke.push(`/z_${je}`)}}this.cacheKey=ke.sort().join("")}getMaxValue(D){let J=this.binders[D];return J instanceof Yo||J instanceof io?J.maxValue:0}populatePaintArrays(D,J,pe,ke,je){for(let We in this.binders){let ht=this.binders[We];(ht instanceof Yo||ht instanceof io||ht instanceof Ho)&&ht.populatePaintArray(D,J,pe,ke,je)}}setConstantPatternPositions(D,J){for(let pe in this.binders){let ke=this.binders[pe];ke instanceof ro&&ke.setConstantPatternPositions(D,J)}}updatePaintArrays(D,J,pe,ke,je){let We=!1;for(let ht in D){let Et=J.getPositions(ht);for(let Ut of Et){let or=pe.feature(Ut.index);for(let Mr in this.binders){let zr=this.binders[Mr];if((zr instanceof Yo||zr instanceof io||zr instanceof Ho)&&zr.expression.isStateDependent===!0){let Wr=ke.paint.get(Mr);zr.expression=Wr.value,zr.updatePaintArray(Ut.start,Ut.end,or,D[ht],je),We=!0}}}}return We}defines(){let D=[];for(let J in this.binders){let pe=this.binders[J];(pe instanceof Jn||pe instanceof ro)&&D.push(...pe.uniformNames.map(ke=>`#define HAS_UNIFORM_${ke}`))}return D}getBinderAttributes(){let D=[];for(let J in this.binders){let pe=this.binders[J];if(pe instanceof Yo||pe instanceof io)for(let ke=0;ke<pe.paintVertexAttributes.length;ke++)D.push(pe.paintVertexAttributes[ke].name);else if(pe instanceof Ho)for(let ke=0;ke<Ot.members.length;ke++)D.push(Ot.members[ke].name)}return D}getBinderUniforms(){let D=[];for(let J in this.binders){let pe=this.binders[J];if(pe instanceof Jn||pe instanceof ro||pe instanceof io)for(let ke of pe.uniformNames)D.push(ke)}return D}getPaintVertexBuffers(){return this._buffers}getUniforms(D,J){let pe=[];for(let ke in this.binders){let je=this.binders[ke];if(je instanceof Jn||je instanceof ro||je instanceof io){for(let We of je.uniformNames)if(J[We]){let ht=je.getBinding(D,J[We],We);pe.push({name:We,property:ke,binding:ht})}}}return pe}setUniforms(D,J,pe,ke){for(let{name:je,property:We,binding:ht}of J)this.binders[We].setUniform(ht,ke,pe.get(We),je)}updatePaintBuffers(D){this._buffers=[];for(let J in this.binders){let pe=this.binders[J];if(D&&pe instanceof Ho){let ke=D.fromScale===2?pe.zoomInPaintVertexBuffer:pe.zoomOutPaintVertexBuffer;ke&&this._buffers.push(ke)}else(pe instanceof Yo||pe instanceof io)&&pe.paintVertexBuffer&&this._buffers.push(pe.paintVertexBuffer)}}upload(D){for(let J in this.binders){let pe=this.binders[J];(pe instanceof Yo||pe instanceof io||pe instanceof Ho)&&pe.upload(D)}this.updatePaintBuffers()}destroy(){for(let D in this.binders){let J=this.binders[D];(J instanceof Yo||J instanceof io||J instanceof Ho)&&J.destroy()}}}class al{constructor(D,J,pe=()=>!0){this.programConfigurations={};for(let ke of D)this.programConfigurations[ke.id]=new cl(ke,J,pe);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(D,J,pe,ke,je,We){for(let ht in this.programConfigurations)this.programConfigurations[ht].populatePaintArrays(D,J,ke,je,We);J.id!==void 0&&this._featureMap.add(J.id,pe,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,J,pe,ke){for(let je of pe)this.needsUpload=this.programConfigurations[je.id].updatePaintArrays(D,this._featureMap,J,je,ke)||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 gn(W,D,J){let pe={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},ke=function(je){return{"line-pattern":{source:Tl,composite:Tl},"fill-pattern":{source:Tl,composite:Tl},"fill-extrusion-pattern":{source:Tl,composite:Tl}}[je]}(W);return ke&&ke[J]||pe[D][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",Yo),mi("CrossFadedCompositeBinder",Ho),mi("CompositeExpressionBinder",io),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let vo=8192,cs=Math.pow(2,14)-1,ms=-cs-1;function Al(W){let D=vo/W.extent,J=W.loadGeometry();for(let pe=0;pe<J.length;pe++){let ke=J[pe];for(let je=0;je<ke.length;je++){let We=ke[je],ht=Math.round(We.x*D),Et=Math.round(We.y*D);We.x=w(ht,ms,cs),We.y=w(Et,ms,cs),(ht<We.x||ht>We.x+1||Et<We.y||Et>We.y+1)&&f("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,pe,ke){W.emplaceBack(2*D+(pe+1)/2,2*J+(ke+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 Fe,this.segments=new Mt,this.programConfigurations=new al(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){let ke=this.layers[0],je=[],We=null,ht=!1;ke.type==="circle"&&(We=ke.layout.get("circle-sort-key"),ht=!We.isConstant());for(let{feature:Et,id:Ut,index:or,sourceLayerIndex:Mr}of D){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Hl(Et,zr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),Wr,pe))continue;let ia=ht?We.evaluate(Wr,{},pe):void 0,ha={id:Ut,properties:Et.properties,type:Et.type,sourceLayerIndex:Mr,index:or,geometry:zr?Wr.geometry:Al(Et),patterns:{},sortKey:ia};je.push(ha)}ht&&je.sort((Et,Ut)=>Et.sortKey-Ut.sortKey);for(let Et of je){let{geometry:Ut,index:or,sourceLayerIndex:Mr}=Et,zr=D[or].feature;this.addFeature(Et,Ut,or,pe),J.featureIndex.insert(zr,Ut,or,Mr,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,bt),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,pe,ke){for(let je of J)for(let We of je){let ht=We.x,Et=We.y;if(ht<0||ht>=vo||Et<0||Et>=vo)continue;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),or=Ut.vertexLength;Su(this.layoutVertexArray,ht,Et,-1,-1),Su(this.layoutVertexArray,ht,Et,1,-1),Su(this.layoutVertexArray,ht,Et,1,1),Su(this.layoutVertexArray,ht,Et,-1,1),this.indexArray.emplaceBack(or,or+1,or+2),this.indexArray.emplaceBack(or,or+3,or+2),Ut.vertexLength+=4,Ut.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,{},ke)}}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)||!!ma(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 pe=D[J];for(let ke=0;ke<pe.length;ke++)if(bi(W,pe[ke]))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 fr(W,D,J){if(W.length>1){if(oa(W,D))return!0;for(let pe=0;pe<D.length;pe++)if(ma(D[pe],W,J))return!0}for(let pe=0;pe<W.length;pe++)if(ma(W[pe],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 pe=W[J],ke=W[J+1];for(let je=0;je<D.length-1;je++)if(wa(pe,ke,D[je],D[je+1]))return!0}return!1}function wa(W,D,J,pe){return R(W,J,pe)!==R(D,J,pe)&&R(W,D,J)!==R(W,D,pe)}function ma(W,D,J){let pe=J*J;if(D.length===1)return W.distSqr(D[0])<pe;for(let ke=1;ke<D.length;ke++)if(_a(W,D[ke-1],D[ke])<pe)return!0;return!1}function _a(W,D,J){let pe=D.distSqr(J);if(pe===0)return W.distSqr(D);let ke=((W.x-D.x)*(J.x-D.x)+(W.y-D.y)*(J.y-D.y))/pe;return W.distSqr(ke<0?D:ke>1?J:J.sub(D)._mult(ke)._add(D))}function Ya(W,D){let J,pe,ke,je=!1;for(let We=0;We<W.length;We++){J=W[We];for(let ht=0,Et=J.length-1;ht<J.length;Et=ht++)pe=J[ht],ke=J[Et],pe.y>D.y!=ke.y>D.y&&D.x<(ke.x-pe.x)*(D.y-pe.y)/(ke.y-pe.y)+pe.x&&(je=!je)}return je}function bi(W,D){let J=!1;for(let pe=0,ke=W.length-1;pe<W.length;ke=pe++){let je=W[pe],We=W[ke];je.y>D.y!=We.y>D.y&&D.x<(We.x-je.x)*(D.y-je.y)/(We.y-je.y)+je.x&&(J=!J)}return J}function yi(W,D,J){let pe=J[0],ke=J[2];if(W.x<pe.x&&D.x<pe.x||W.x>ke.x&&D.x>ke.x||W.y<pe.y&&D.y<pe.y||W.y>ke.y&&D.y>ke.y)return!1;let je=R(W,D,J[0]);return je!==R(W,D,J[1])||je!==R(W,D,J[2])||je!==R(W,D,J[3])}function si(W,D,J){let pe=D.paint.get(W).value;return pe.kind==="constant"?pe.value:J.programConfigurations.get(D.id).getMaxValue(W)}function yn(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])}function zi(W,D,J,pe,ke){if(!D[0]&&!D[1])return W;let je=n.convert(D)._mult(ke);J==="viewport"&&je._rotate(-pe);let We=[];for(let ht=0;ht<W.length;ht++)We.push(W[ht].sub(je));return We}let Ei,Na;mi("CircleBucket",Rl,{omit:["layers"]});var ea={get paint(){return Na=Na||new Ue({"circle-radius":new Ro(re.paint_circle["circle-radius"]),"circle-color":new Ro(re.paint_circle["circle-color"]),"circle-blur":new Ro(re.paint_circle["circle-blur"]),"circle-opacity":new Ro(re.paint_circle["circle-opacity"]),"circle-translate":new ho(re.paint_circle["circle-translate"]),"circle-translate-anchor":new ho(re.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ho(re.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ho(re.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ro(re.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ro(re.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ro(re.paint_circle["circle-stroke-opacity"])})},get layout(){return Ei=Ei||new Ue({"circle-sort-key":new Ro(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 pe=D[0],ke=D[1],je=D[2],We=D[3],ht=D[4],Et=D[5],Ut=D[6],or=D[7],Mr=D[8],zr=D[9],Wr=D[10],ia=D[11],ha=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*pe+qi*ht+en*Mr+qn*ha,W[1]=gi*ke+qi*Et+en*zr+qn*ja,W[2]=gi*je+qi*Ut+en*Wr+qn*Ka,W[3]=gi*We+qi*or+en*ia+qn*Wi,W[4]=(gi=J[4])*pe+(qi=J[5])*ht+(en=J[6])*Mr+(qn=J[7])*ha,W[5]=gi*ke+qi*Et+en*zr+qn*ja,W[6]=gi*je+qi*Ut+en*Wr+qn*Ka,W[7]=gi*We+qi*or+en*ia+qn*Wi,W[8]=(gi=J[8])*pe+(qi=J[9])*ht+(en=J[10])*Mr+(qn=J[11])*ha,W[9]=gi*ke+qi*Et+en*zr+qn*ja,W[10]=gi*je+qi*Ut+en*Wr+qn*Ka,W[11]=gi*We+qi*or+en*ia+qn*Wi,W[12]=(gi=J[12])*pe+(qi=J[13])*ht+(en=J[14])*Mr+(qn=J[15])*ha,W[13]=gi*ke+qi*Et+en*zr+qn*ja,W[14]=gi*je+qi*Ut+en*Wr+qn*Ka,W[15]=gi*We+qi*or+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 pn(W,D,J){var pe=D[0],ke=D[1],je=D[2],We=D[3];return W[0]=J[0]*pe+J[4]*ke+J[8]*je+J[12]*We,W[1]=J[1]*pe+J[5]*ke+J[9]*je+J[13]*We,W[2]=J[2]*pe+J[6]*ke+J[10]*je+J[14]*We,W[3]=J[3]*pe+J[7]*ke+J[11]*je+J[15]*We,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)+yn(this.paint.get("circle-translate"))}queryIntersectsFeature(D,J,pe,ke,je,We,ht,Et){let Ut=zi(D,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),We.angle,ht),or=this.paint.get("circle-radius").evaluate(J,pe)+this.paint.get("circle-stroke-width").evaluate(J,pe),Mr=this.paint.get("circle-pitch-alignment")==="map",zr=Mr?Ut:function(ia,ha){return ia.map(ja=>Ua(ja,ha))}(Ut,Et),Wr=Mr?or*ht:or;for(let ia of ke)for(let ha of ia){let ja=Mr?ha:Ua(ha,Et),Ka=Wr,Wi=pn([],[ha.x,ha.y,0,1],Et);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/We.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=We.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(W,D){let J=pn([],[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 Ue({"heatmap-radius":new Ro(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ro(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ho(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ho(re.paint_heatmap["heatmap-opacity"])})}};function xi(W,{width:D,height:J},pe,ke){if(ke){if(ke instanceof Uint8ClampedArray)ke=new Uint8Array(ke.buffer);else if(ke.length!==D*J*pe)throw new RangeError(`mismatched image size. expected: ${ke.length} but got: ${D*J*pe}`)}else ke=new Uint8Array(D*J*pe);return W.width=D,W.height=J,W.data=ke,W}function Xi(W,{width:D,height:J},pe){if(D===W.width&&J===W.height)return;let ke=xi({},{width:D,height:J},pe);mn(W,ke,{x:0,y:0},{x:0,y:0},{width:Math.min(W.width,D),height:Math.min(W.height,J)},pe),W.width=D,W.height=J,W.data=ke.data}function mn(W,D,J,pe,ke,je){if(ke.width===0||ke.height===0)return D;if(ke.width>W.width||ke.height>W.height||J.x>W.width-ke.width||J.y>W.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>D.width||ke.height>D.height||pe.x>D.width-ke.width||pe.y>D.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");let We=W.data,ht=D.data;if(We===ht)throw new Error("srcData equals dstData, so image is already copied");for(let Et=0;Et<ke.height;Et++){let Ut=((J.y+Et)*W.width+J.x)*je,or=((pe.y+Et)*D.width+pe.x)*je;for(let Mr=0;Mr<ke.width*je;Mr++)ht[or+Mr]=We[Ut+Mr]}return D}class In{constructor(D,J){xi(this,D,1,J)}resize(D){Xi(this,D,1)}clone(){return new In({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(D,J,pe,ke,je){mn(D,J,pe,ke,je,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,pe,ke,je){mn(D,J,pe,ke,je,4)}}function an(W){let D={},J=W.resolution||256,pe=W.clips?W.clips.length:1,ke=W.image||new Ii({width:J,height:pe});if(Math.log(J)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${J}`);let je=(We,ht,Et)=>{D[W.evaluationKey]=Et;let Ut=W.expression.evaluate(D);ke.data[We+ht+0]=Math.floor(255*Ut.r/Ut.a),ke.data[We+ht+1]=Math.floor(255*Ut.g/Ut.a),ke.data[We+ht+2]=Math.floor(255*Ut.b/Ut.a),ke.data[We+ht+3]=Math.floor(255*Ut.a)};if(W.clips)for(let We=0,ht=0;We<pe;++We,ht+=4*J)for(let Et=0,Ut=0;Et<J;Et++,Ut+=4){let or=Et/(J-1),{start:Mr,end:zr}=W.clips[We];je(ht,Ut,Mr*(1-or)+zr*or)}else for(let We=0,ht=0;We<J;We++,ht+=4)je(0,ht,We/(J-1));return ke}mi("AlphaImage",In),mi("RGBAImage",Ii);let kn="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=an({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(kn)&&this.heatmapFbos.delete(kn)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Zn;var Ds={get paint(){return Zn=Zn||new Ue({"hillshade-illumination-direction":new ho(re.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ho(re.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ho(re.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ho(re.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ho(re.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ho(re.paint_hillshade["hillshade-accent-color"])})}};class bl extends ie{constructor(D){super(D,Ds)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let po=dt([{name:"a_pos",components:2,type:"Int16"}],4),{members:Wl}=po;function fs(W,D,J=2){let pe=D&&D.length,ke=pe?D[0]*J:W.length,je=Sl(W,0,ke,J,!0),We=[];if(!je||je.next===je.prev)return We;let ht,Et,Ut;if(pe&&(je=function(or,Mr,zr,Wr){let ia=[];for(let ha=0,ja=Mr.length;ha<ja;ha++){let Ka=Sl(or,Mr[ha]*Wr,ha<ja-1?Mr[ha+1]*Wr:or.length,Wr,!1);Ka===Ka.next&&(Ka.steiner=!0),ia.push(_e(Ka))}ia.sort(Cl);for(let ha=0;ha<ia.length;ha++)zr=Co(ia[ha],zr);return zr}(W,D,je,J)),W.length>80*J){ht=1/0,Et=1/0;let or=-1/0,Mr=-1/0;for(let zr=J;zr<ke;zr+=J){let Wr=W[zr],ia=W[zr+1];Wr<ht&&(ht=Wr),ia<Et&&(Et=ia),Wr>or&&(or=Wr),ia>Mr&&(Mr=ia)}Ut=Math.max(or-ht,Mr-Et),Ut=Ut!==0?32767/Ut:0}return tu(je,We,J,ht,Et,Ut,0),We}function Sl(W,D,J,pe,ke){let je;if(ke===function(We,ht,Et,Ut){let or=0;for(let Mr=ht,zr=Et-Ut;Mr<Et;Mr+=Ut)or+=(We[zr]-We[Mr])*(We[Mr+1]+We[zr+1]),zr=Mr;return or}(W,D,J,pe)>0)for(let We=D;We<J;We+=pe)je=pr(We/pe|0,W[We],W[We+1],je);else for(let We=J-pe;We>=D;We-=pe)je=pr(We/pe|0,W[We],W[We+1],je);return je&&Le(je,je.next)&&(yt(je),je=je.next),je}function kl(W,D){if(!W)return W;D||(D=W);let J,pe=W;do if(J=!1,pe.steiner||!Le(pe,pe.next)&&Ge(pe.prev,pe,pe.next)!==0)pe=pe.next;else{if(yt(pe),pe=D=pe.prev,pe===pe.next)break;J=!0}while(J||pe!==D);return D}function tu(W,D,J,pe,ke,je,We){if(!W)return;!We&&je&&function(Et,Ut,or,Mr){let zr=Et;do zr.z===0&&(zr.z=K(zr.x,zr.y,Ut,or,Mr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==Et);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,ha=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<ha&&(qi++,gi=gi.nextZ,gi);qn++);let en=ha;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,ha*=2}while(ia>1)}(zr)}(W,pe,ke,je);let ht=W;for(;W.prev!==W.next;){let Et=W.prev,Ut=W.next;if(je?pl(W,pe,ke,je):qs(W))D.push(Et.i,W.i,Ut.i),yt(W),W=Ut.next,ht=Ut.next;else if((W=Ut)===ht){We?We===1?tu(W=wl(kl(W),D),D,J,pe,ke,je,2):We===2&&Yn(W,D,J,pe,ke,je):tu(kl(W),D,J,pe,ke,je,1);break}}}function qs(W){let D=W.prev,J=W,pe=W.next;if(Ge(D,J,pe)>=0)return!1;let ke=D.x,je=J.x,We=pe.x,ht=D.y,Et=J.y,Ut=pe.y,or=ke<je?ke<We?ke:We:je<We?je:We,Mr=ht<Et?ht<Ut?ht:Ut:Et<Ut?Et:Ut,zr=ke>je?ke>We?ke:We:je>We?je:We,Wr=ht>Et?ht>Ut?ht:Ut:Et>Ut?Et:Ut,ia=pe.next;for(;ia!==D;){if(ia.x>=or&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&te(ke,ht,je,Et,We,Ut,ia.x,ia.y)&&Ge(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(W,D,J,pe){let ke=W.prev,je=W,We=W.next;if(Ge(ke,je,We)>=0)return!1;let ht=ke.x,Et=je.x,Ut=We.x,or=ke.y,Mr=je.y,zr=We.y,Wr=ht<Et?ht<Ut?ht:Ut:Et<Ut?Et:Ut,ia=or<Mr?or<zr?or:zr:Mr<zr?Mr:zr,ha=ht>Et?ht>Ut?ht:Ut:Et>Ut?Et:Ut,ja=or>Mr?or>zr?or:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,D,J,pe),Wi=K(ha,ja,D,J,pe),gi=W.prevZ,qi=W.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=ha&&gi.y>=ia&&gi.y<=ja&&gi!==ke&&gi!==We&&te(ht,or,Et,Mr,Ut,zr,gi.x,gi.y)&&Ge(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=ha&&qi.y>=ia&&qi.y<=ja&&qi!==ke&&qi!==We&&te(ht,or,Et,Mr,Ut,zr,qi.x,qi.y)&&Ge(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=ha&&gi.y>=ia&&gi.y<=ja&&gi!==ke&&gi!==We&&te(ht,or,Et,Mr,Ut,zr,gi.x,gi.y)&&Ge(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=ha&&qi.y>=ia&&qi.y<=ja&&qi!==ke&&qi!==We&&te(ht,or,Et,Mr,Ut,zr,qi.x,qi.y)&&Ge(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function wl(W,D){let J=W;do{let pe=J.prev,ke=J.next.next;!Le(pe,ke)&&$e(pe,J,J.next,ke)&&wr(pe,ke)&&wr(ke,pe)&&(D.push(pe.i,J.i,ke.i),yt(J),yt(J.next),J=W=ke),J=J.next}while(J!==W);return kl(J)}function Yn(W,D,J,pe,ke,je){let We=W;do{let ht=We.next.next;for(;ht!==We.prev;){if(We.i!==ht.i&&me(We,ht)){let Et=Nr(We,ht);return We=kl(We,We.next),Et=kl(Et,Et.next),tu(We,D,J,pe,ke,je,0),void tu(Et,D,J,pe,ke,je,0)}ht=ht.next}We=We.next}while(We!==W)}function Cl(W,D){return W.x-D.x}function Co(W,D){let J=function(ke,je){let We=je,ht=ke.x,Et=ke.y,Ut,or=-1/0;do{if(Et<=We.y&&Et>=We.next.y&&We.next.y!==We.y){let ha=We.x+(Et-We.y)*(We.next.x-We.x)/(We.next.y-We.y);if(ha<=ht&&ha>or&&(or=ha,Ut=We.x<We.next.x?We:We.next,ha===ht))return Ut}We=We.next}while(We!==je);if(!Ut)return null;let Mr=Ut,zr=Ut.x,Wr=Ut.y,ia=1/0;We=Ut;do{if(ht>=We.x&&We.x>=zr&&ht!==We.x&&te(Et<Wr?ht:or,Et,zr,Wr,Et<Wr?or:ht,Et,We.x,We.y)){let ha=Math.abs(Et-We.y)/(ht-We.x);wr(We,ke)&&(ha<ia||ha===ia&&(We.x>Ut.x||We.x===Ut.x&&ve(Ut,We)))&&(Ut=We,ia=ha)}We=We.next}while(We!==Mr);return Ut}(W,D);if(!J)return D;let pe=Nr(J,W);return kl(pe,pe.next),kl(J,J.next)}function ve(W,D){return Ge(W.prev,W,D.prev)<0&&Ge(D.next,W,W.next)<0}function K(W,D,J,pe,ke){return(W=1431655765&((W=858993459&((W=252645135&((W=16711935&((W=(W-J)*ke|0)|W<<8))|W<<4))|W<<2))|W<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-pe)*ke|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function _e(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,pe,ke,je,We,ht){return(ke-We)*(D-ht)>=(W-We)*(je-ht)&&(W-We)*(pe-ht)>=(J-We)*(D-ht)&&(J-We)*(je-ht)>=(ke-We)*(pe-ht)}function me(W,D){return W.next.i!==D.i&&W.prev.i!==D.i&&!function(J,pe){let ke=J;do{if(ke.i!==J.i&&ke.next.i!==J.i&&ke.i!==pe.i&&ke.next.i!==pe.i&&$e(ke,ke.next,J,pe))return!0;ke=ke.next}while(ke!==J);return!1}(W,D)&&(wr(W,D)&&wr(D,W)&&function(J,pe){let ke=J,je=!1,We=(J.x+pe.x)/2,ht=(J.y+pe.y)/2;do ke.y>ht!=ke.next.y>ht&&ke.next.y!==ke.y&&We<(ke.next.x-ke.x)*(ht-ke.y)/(ke.next.y-ke.y)+ke.x&&(je=!je),ke=ke.next;while(ke!==J);return je}(W,D)&&(Ge(W.prev,W,D.prev)||Ge(W,D.prev,D))||Le(W,D)&&Ge(W.prev,W,W.next)>0&&Ge(D.prev,D,D.next)>0)}function Ge(W,D,J){return(D.y-W.y)*(J.x-D.x)-(D.x-W.x)*(J.y-D.y)}function Le(W,D){return W.x===D.x&&W.y===D.y}function $e(W,D,J,pe){let ke=jt(Ge(W,D,J)),je=jt(Ge(W,D,pe)),We=jt(Ge(J,pe,W)),ht=jt(Ge(J,pe,D));return ke!==je&&We!==ht||!(ke!==0||!gt(W,J,D))||!(je!==0||!gt(W,pe,D))||!(We!==0||!gt(J,W,pe))||!(ht!==0||!gt(J,D,pe))}function gt(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 jt(W){return W>0?1:W<0?-1:0}function wr(W,D){return Ge(W.prev,W,W.next)<0?Ge(W,D,W.next)>=0&&Ge(W,W.prev,D)>=0:Ge(W,D,W.prev)<0||Ge(W,W.next,D)<0}function Nr(W,D){let J=kt(W.i,W.x,W.y),pe=kt(D.i,D.x,D.y),ke=W.next,je=D.prev;return W.next=D,D.prev=W,J.next=ke,ke.prev=J,pe.next=J,J.prev=pe,je.next=pe,pe.prev=je,pe}function pr(W,D,J,pe){let ke=kt(W,D,J);return pe?(ke.next=pe.next,ke.prev=pe,pe.next.prev=ke,pe.next=ke):(ke.prev=ke,ke.next=ke),ke}function yt(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 kt(W,D,J){return{i:W,x:D,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Bt(W,D,J){let pe=J.patternDependencies,ke=!1;for(let je of D){let We=je.paint.get(`${W}-pattern`);We.isConstant()||(ke=!0);let ht=We.constantOr(null);ht&&(ke=!0,pe[ht.to]=!0,pe[ht.from]=!0)}return ke}function nr(W,D,J,pe,ke){let je=ke.patternDependencies;for(let We of D){let ht=We.paint.get(`${W}-pattern`).value;if(ht.kind!=="constant"){let Et=ht.evaluate({zoom:pe-1},J,{},ke.availableImages),Ut=ht.evaluate({zoom:pe},J,{},ke.availableImages),or=ht.evaluate({zoom:pe+1},J,{},ke.availableImages);Et=Et&&Et.name?Et.name:Et,Ut=Ut&&Ut.name?Ut.name:Ut,or=or&&or.name?or.name:or,je[Et]=!0,je[Ut]=!0,je[or]=!0,J.patterns[We.id]={min:Et,mid:Ut,max:or}}}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 Fe,this.indexArray2=new et,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.segments2=new Mt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.hasPattern=Bt("fill",this.layers,J);let ke=this.layers[0].layout.get("fill-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ht,id:Et,index:Ut,sourceLayerIndex:or}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ht,Mr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),zr,pe))continue;let Wr=je?ke.evaluate(zr,{},pe,J.availableImages):void 0,ia={id:Et,properties:ht.properties,type:ht.type,sourceLayerIndex:or,index:Ut,geometry:Mr?zr.geometry:Al(ht),patterns:{},sortKey:Wr};We.push(ia)}je&&We.sort((ht,Et)=>ht.sortKey-Et.sortKey);for(let ht of We){let{geometry:Et,index:Ut,sourceLayerIndex:or}=ht;if(this.hasPattern){let Mr=nr("fill",this.layers,ht,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ht,Et,Ut,pe,{});J.featureIndex.insert(D[Ut].feature,Et,Ut,or,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}addFeatures(D,J,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,J,pe)}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,pe,ke,je){for(let We of Tc(J,500)){let ht=0;for(let Wr of We)ht+=Wr.length;let Et=this.segments.prepareSegment(ht,this.layoutVertexArray,this.indexArray),Ut=Et.vertexLength,or=[],Mr=[];for(let Wr of We){if(Wr.length===0)continue;Wr!==We[0]&&Mr.push(or.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),ha=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(ha+Wr.length-1,ha),or.push(Wr[0].x),or.push(Wr[0].y);for(let ja=1;ja<Wr.length;ja++)this.layoutVertexArray.emplaceBack(Wr[ja].x,Wr[ja].y),this.indexArray2.emplaceBack(ha+ja-1,ha+ja),or.push(Wr[ja].x),or.push(Wr[ja].y);ia.vertexLength+=Wr.length,ia.primitiveLength+=Wr.length}let zr=fs(or,Mr);for(let Wr=0;Wr<zr.length;Wr+=3)this.indexArray.emplaceBack(Ut+zr[Wr],Ut+zr[Wr+1],Ut+zr[Wr+2]);Et.vertexLength+=ht,Et.primitiveLength+=zr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}}let lr,dr;mi("FillBucket",hr,{omit:["layers","patternFeatures"]});var ur={get paint(){return dr=dr||new Ue({"fill-antialias":new ho(re.paint_fill["fill-antialias"]),"fill-opacity":new Ro(re.paint_fill["fill-opacity"]),"fill-color":new Ro(re.paint_fill["fill-color"]),"fill-outline-color":new Ro(re.paint_fill["fill-outline-color"]),"fill-translate":new ho(re.paint_fill["fill-translate"]),"fill-translate-anchor":new ho(re.paint_fill["fill-translate-anchor"]),"fill-pattern":new Dc(re.paint_fill["fill-pattern"])})},get layout(){return lr=lr||new Ue({"fill-sort-key":new Ro(re.layout_fill["fill-sort-key"])})}};class Ht extends ie{constructor(D){super(D,ur)}recalculate(D,J){super.recalculate(D,J);let 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"])}createBucket(D){return new hr(D)}queryRadius(){return yn(this.paint.get("fill-translate"))}queryIntersectsFeature(D,J,pe,ke,je,We,ht){return Zt(zi(D,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),We.angle,ht),ke)}isTileClipped(){return!0}}let sr=dt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Vt=dt([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Dr}=sr;var Jr={},ga=o,vi=Ga;function Ga(W,D,J,pe,ke){this.properties={},this.extent=J,this.type=0,this._pbf=W,this._geometry=-1,this._keys=pe,this._values=ke,W.readFields(ai,this,D)}function ai(W,D,J){W==1?D.id=J.readVarint():W==2?function(pe,ke){for(var je=pe.readVarint()+pe.pos;pe.pos<je;){var We=ke._keys[pe.readVarint()],ht=ke._values[pe.readVarint()];ke.properties[We]=ht}}(J,D):W==3?D.type=J.readVarint():W==4&&(D._geometry=J.pos)}function Zi(W){for(var D,J,pe=0,ke=0,je=W.length,We=je-1;ke<je;We=ke++)pe+=((J=W[We]).x-(D=W[ke]).x)*(D.y+J.y);return pe}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,pe=1,ke=0,je=0,We=0,ht=[];W.pos<J;){if(ke<=0){var Et=W.readVarint();pe=7&Et,ke=Et>>3}if(ke--,pe===1||pe===2)je+=W.readSVarint(),We+=W.readSVarint(),pe===1&&(D&&ht.push(D),D=[]),D.push(new ga(je,We));else{if(pe!==7)throw new Error("unknown command "+pe);D&&D.push(D[0].clone())}}return D&&ht.push(D),ht},Ga.prototype.bbox=function(){var W=this._pbf;W.pos=this._geometry;for(var D=W.readVarint()+W.pos,J=1,pe=0,ke=0,je=0,We=1/0,ht=-1/0,Et=1/0,Ut=-1/0;W.pos<D;){if(pe<=0){var or=W.readVarint();J=7&or,pe=or>>3}if(pe--,J===1||J===2)(ke+=W.readSVarint())<We&&(We=ke),ke>ht&&(ht=ke),(je+=W.readSVarint())<Et&&(Et=je),je>Ut&&(Ut=je);else if(J!==7)throw new Error("unknown command "+J)}return[We,Et,ht,Ut]},Ga.prototype.toGeoJSON=function(W,D,J){var pe,ke,je=this.extent*Math.pow(2,J),We=this.extent*W,ht=this.extent*D,Et=this.loadGeometry(),Ut=Ga.types[this.type];function or(Wr){for(var ia=0;ia<Wr.length;ia++){var ha=Wr[ia];Wr[ia]=[360*(ha.x+We)/je-180,360/Math.PI*Math.atan(Math.exp((180-360*(ha.y+ht)/je)*Math.PI/180))-90]}}switch(this.type){case 1:var Mr=[];for(pe=0;pe<Et.length;pe++)Mr[pe]=Et[pe][0];or(Et=Mr);break;case 2:for(pe=0;pe<Et.length;pe++)or(Et[pe]);break;case 3:for(Et=function(Wr){var ia=Wr.length;if(ia<=1)return[Wr];for(var ha,ja,Ka=[],Wi=0;Wi<ia;Wi++){var gi=Zi(Wr[Wi]);gi!==0&&(ja===void 0&&(ja=gi<0),ja===gi<0?(ha&&Ka.push(ha),ha=[Wr[Wi]]):ha.push(Wr[Wi]))}return ha&&Ka.push(ha),Ka}(Et),pe=0;pe<Et.length;pe++)for(ke=0;ke<Et[pe].length;ke++)or(Et[pe][ke])}Et.length===1?Et=Et[0]:Ut="Multi"+Ut;var zr={type:"Feature",geometry:{type:Ut,coordinates:Et},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(pe){for(var ke=null,je=pe.readVarint()+pe.pos;pe.pos<je;){var We=pe.readVarint()>>3;ke=We===1?pe.readString():We===2?pe.readFloat():We===3?pe.readDouble():We===4?pe.readVarint64():We===5?pe.readVarint():We===6?pe.readSVarint():We===7?pe.readBoolean():null}return ke}(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 fn(W,D,J){if(W===3){var pe=new Ui(J,J.readVarint()+J.pos);pe.length&&(D[pe.name]=pe)}}Jr.VectorTile=function(W,D){this.layers=W.readFields(fn,{},D)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Bo=Math.pow(2,13);function Ps(W,D,J,pe,ke,je,We,ht){W.emplaceBack(D,J,2*Math.floor(pe*Bo)+We,ke*Bo*2,je*Bo*2,Math.round(ht))}class Do{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 Fe,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.features=[],this.hasPattern=Bt("fill-extrusion",this.layers,J);for(let{feature:ke,id:je,index:We,sourceLayerIndex:ht}of D){let Et=this.layers[0]._featureFilter.needGeometry,Ut=Hl(ke,Et);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),Ut,pe))continue;let or={id:je,sourceLayerIndex:ht,index:We,geometry:Et?Ut.geometry:Al(ke),properties:ke.properties,type:ke.type,patterns:{}};this.hasPattern?this.features.push(nr("fill-extrusion",this.layers,or,this.zoom,J)):this.addFeature(or,or.geometry,We,pe,{}),J.featureIndex.insert(ke,or.geometry,We,ht,this.index,!0)}}addFeatures(D,J,pe){for(let ke of this.features){let{geometry:je}=ke;this.addFeature(ke,je,ke.index,J,pe)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}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,pe,ke,je){for(let We of Tc(J,500)){let ht={x:0,y:0,vertexCount:0},Et=0;for(let ia of We)Et+=ia.length;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of We){if(ia.length===0||Ys(ia))continue;let ha=0;for(let ja=0;ja<ia.length;ja++){let Ka=ia[ja];if(ja>=1){let Wi=ia[ja-1];if(!Ms(Ka,Wi)){Ut.vertexLength+4>Mt.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);ha+qi>32768&&(ha=0),Ps(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,ha),Ps(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,ha),ht.x+=2*Ka.x,ht.y+=2*Ka.y,ht.vertexCount+=2,ha+=qi,Ps(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,ha),Ps(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,ha),ht.x+=2*Wi.x,ht.y+=2*Wi.y,ht.vertexCount+=2;let en=Ut.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Ut.vertexLength+=4,Ut.primitiveLength+=2}}}}if(Ut.vertexLength+Et>Mt.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(Et,this.layoutVertexArray,this.indexArray)),_o[D.type]!=="Polygon")continue;let or=[],Mr=[],zr=Ut.vertexLength;for(let ia of We)if(ia.length!==0){ia!==We[0]&&Mr.push(or.length/2);for(let ha=0;ha<ia.length;ha++){let ja=ia[ha];Ps(this.layoutVertexArray,ja.x,ja.y,0,0,1,1,0),ht.x+=ja.x,ht.y+=ja.y,ht.vertexCount+=1,or.push(ja.x),or.push(ja.y)}}let Wr=fs(or,Mr);for(let ia=0;ia<Wr.length;ia+=3)this.indexArray.emplaceBack(zr+Wr[ia],zr+Wr[ia+2],zr+Wr[ia+1]);Ut.primitiveLength+=Wr.length/3,Ut.vertexLength+=Et;for(let ia=0;ia<ht.vertexCount;ia++){let ha=Math.floor(ht.x/ht.vertexCount),ja=Math.floor(ht.y/ht.vertexCount);this.centroidVertexArray.emplaceBack(ha,ja)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}}function Ms(W,D){return W.x===D.x&&(W.x<0||W.x>vo)||W.y===D.y&&(W.y<0||W.y>vo)}function Ys(W){return W.every(D=>D.x<0)||W.every(D=>D.x>vo)||W.every(D=>D.y<0)||W.every(D=>D.y>vo)}let mu;mi("FillExtrusionBucket",Do,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Ue({"fill-extrusion-opacity":new ho(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ro(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ho(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ho(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ro(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ro(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ho(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(D){super(D,Ep)}createBucket(D){return new Do(D)}queryRadius(){return yn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,J,pe,ke,je,We,ht,Et){let Ut=zi(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),We.angle,ht),or=this.paint.get("fill-extrusion-height").evaluate(J,pe),Mr=this.paint.get("fill-extrusion-base").evaluate(J,pe),zr=function(ia,ha,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];pn(qi,qi,ha),Wi.push(new n(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Ut,Et),Wr=function(ia,ha,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*ha,en=Ka[9]*ha,qn=Ka[10]*ha,Eo=Ka[11]*ha,ys=Ka[8]*ja,mo=Ka[9]*ja,zn=Ka[10]*ja,ts=Ka[11]*ja;for(let Uo of ia){let zo=[],wn=[];for(let os of Uo){let Fo=os.x,Ls=os.y,Ku=Ka[0]*Fo+Ka[4]*Ls+Ka[12],Uu=Ka[1]*Fo+Ka[5]*Ls+Ka[13],th=Ka[2]*Fo+Ka[6]*Ls+Ka[14],Hp=Ka[3]*Fo+Ka[7]*Ls+Ka[15],Th=th+qn,rh=Hp+Eo,Jh=Ku+ys,$h=Uu+mo,Qh=th+zn,ff=Hp+ts,ah=new n((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,zo.push(ah);let Fh=new n(Jh/ff,$h/ff);Fh.z=Qh/ff,wn.push(Fh)}Wi.push(zo),gi.push(wn)}return[Wi,gi]}(ke,Mr,or,Et);return function(ia,ha,ja){let Ka=1/0;Zt(ja,ha)&&(Ka=qp(ja,ha[0]));for(let Wi=0;Wi<ha.length;Wi++){let gi=ha[Wi],qi=ia[Wi];for(let en=0;en<gi.length-1;en++){let qn=gi[en],Eo=[qn,gi[en+1],qi[en+1],qi[en],qn];_c(ja,Eo)&&(Ka=Math.min(Ka,qp(ja,Eo)))}}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,pe=D[J++],ke;for(;!ke||pe.equals(ke);)if(ke=D[J++],!ke)return 1/0;for(;J<D.length;J++){let je=D[J],We=W[0],ht=ke.sub(pe),Et=je.sub(pe),Ut=We.sub(pe),or=Ph(ht,ht),Mr=Ph(ht,Et),zr=Ph(Et,Et),Wr=Ph(Ut,ht),ia=Ph(Ut,Et),ha=or*zr-Mr*Mr,ja=(zr*Wr-Mr*ia)/ha,Ka=(or*ia-Mr*Wr)/ha,Wi=pe.z*(1-ja-Ka)+ke.z*ja+je.z*Ka;if(isFinite(Wi))return Wi}return 1/0}{let J=1/0;for(let pe of D)J=Math.min(J,pe.z);return J}}let qd=dt([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:ed}=qd,Ih=dt([{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 Fe,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.hasPattern=Bt("line",this.layers,J);let ke=this.layers[0].layout.get("line-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ht,id:Et,index:Ut,sourceLayerIndex:or}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ht,Mr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),zr,pe))continue;let Wr=je?ke.evaluate(zr,{},pe):void 0,ia={id:Et,properties:ht.properties,type:ht.type,sourceLayerIndex:or,index:Ut,geometry:Mr?zr.geometry:Al(ht),patterns:{},sortKey:Wr};We.push(ia)}je&&We.sort((ht,Et)=>ht.sortKey-Et.sortKey);for(let ht of We){let{geometry:Et,index:Ut,sourceLayerIndex:or}=ht;if(this.hasPattern){let Mr=nr("line",this.layers,ht,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ht,Et,Ut,pe,{});J.featureIndex.insert(D[Ut].feature,Et,Ut,or,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}addFeatures(D,J,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,J,pe)}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,pe,ke,je){let We=this.layers[0].layout,ht=We.get("line-join").evaluate(D,{}),Et=We.get("line-cap"),Ut=We.get("line-miter-limit"),or=We.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Mr of J)this.addLine(Mr,D,ht,Et,Ut,or);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}addLine(D,J,pe,ke,je,We){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 ht=Kh[J.type]==="Polygon",Et=D.length;for(;Et>=2&&D[Et-1].equals(D[Et-2]);)Et--;let Ut=0;for(;Ut<Et-1&&D[Ut].equals(D[Ut+1]);)Ut++;if(Et<(ht?3:2))return;pe==="bevel"&&(je=1.05);let or=this.overscaling<=16?15*vo/(512*this.overscaling):0,Mr=this.segments.prepareSegment(10*Et,this.layoutVertexArray,this.indexArray),zr,Wr,ia,ha,ja;this.e1=this.e2=-1,ht&&(zr=D[Et-2],ja=D[Ut].sub(zr)._unit()._perp());for(let Ka=Ut;Ka<Et;Ka++){if(ia=Ka===Et-1?ht?D[Ut+1]:void 0:D[Ka+1],ia&&D[Ka].equals(ia))continue;ja&&(ha=ja),zr&&(Wr=zr),zr=D[Ka],ja=ia?ia.sub(zr)._unit()._perp():ha,ha=ha||ja;let Wi=ha.add(ja);Wi.x===0&&Wi.y===0||Wi._unit();let gi=ha.x*ja.x+ha.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),Eo=qi<Rh&&Wr&&ia,ys=ha.x*ja.y-ha.y*ja.x>0;if(Eo&&Ka>Ut){let ts=zr.dist(Wr);if(ts>2*or){let Uo=zr.sub(zr.sub(Wr)._mult(or/ts)._round());this.updateDistance(Wr,Uo),this.addCurrentVertex(Uo,ha,0,0,Mr),Wr=Uo}}let mo=Wr&&ia,zn=mo?pe:ht?"butt":ke;if(mo&&zn==="round"&&(en<We?zn="miter":en<=2&&(zn="fakeround")),zn==="miter"&&en>je&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en<je&&(zn="miter")),Wr&&this.updateDistance(Wr,zr),zn==="miter")Wi._mult(en),this.addCurrentVertex(zr,Wi,0,0,Mr);else if(zn==="flipbevel"){if(en>100)Wi=ja.mult(-1);else{let ts=en*ha.add(ja).mag()/ha.sub(ja).mag();Wi._perp()._mult(ts*(ys?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Mr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Mr)}else if(zn==="bevel"||zn==="fakeround"){let ts=-Math.sqrt(en*en-1),Uo=ys?ts:0,zo=ys?0:ts;if(Wr&&this.addCurrentVertex(zr,ha,Uo,zo,Mr),zn==="fakeround"){let wn=Math.round(180*qn/Math.PI/20);for(let os=1;os<wn;os++){let Fo=os/wn;if(Fo!==.5){let Ku=Fo-.5;Fo+=Fo*Ku*(Fo-1)*((1.0904+gi*(gi*(3.55645-1.43519*gi)-3.2452))*Ku*Ku+(.848013+gi*(.215638*gi-1.06021)))}let Ls=ja.sub(ha)._mult(Fo)._add(ha)._unit()._mult(ys?-1:1);this.addHalfVertex(zr,Ls.x,Ls.y,!1,ys,0,Mr)}}ia&&this.addCurrentVertex(zr,ja,-Uo,-zo,Mr)}else if(zn==="butt")this.addCurrentVertex(zr,Wi,0,0,Mr);else if(zn==="square"){let ts=Wr?1:-1;this.addCurrentVertex(zr,Wi,ts,ts,Mr)}else zn==="round"&&(Wr&&(this.addCurrentVertex(zr,ha,0,0,Mr),this.addCurrentVertex(zr,ha,1,1,Mr,!0)),ia&&(this.addCurrentVertex(zr,ja,-1,-1,Mr,!0),this.addCurrentVertex(zr,ja,0,0,Mr)));if(Eo&&Ka<Et-1){let ts=zr.dist(ia);if(ts>2*or){let Uo=zr.add(ia.sub(zr)._mult(or/ts)._round());this.updateDistance(zr,Uo),this.addCurrentVertex(Uo,ja,0,0,Mr),zr=Uo}}}}addCurrentVertex(D,J,pe,ke,je,We=!1){let ht=J.y*ke-J.x,Et=-J.y-J.x*ke;this.addHalfVertex(D,J.x+J.y*pe,J.y-J.x*pe,We,!1,pe,je),this.addHalfVertex(D,ht,Et,We,!0,-ke,je),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,J,pe,ke,je,We))}addHalfVertex({x:D,y:J},pe,ke,je,We,ht,Et){let Ut=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(je?1:0),(J<<1)+(We?1:0),Math.round(63*pe)+128,Math.round(63*ke)+128,1+(ht===0?0:ht<0?-1:1)|(63&Ut)<<2,Ut>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let or=Et.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,or),Et.primitiveLength++),We?this.e2=or:this.e1=or}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 Ue({"line-opacity":new Ro(re.paint_line["line-opacity"]),"line-color":new Ro(re.paint_line["line-color"]),"line-translate":new ho(re.paint_line["line-translate"]),"line-translate-anchor":new ho(re.paint_line["line-translate-anchor"]),"line-width":new Ro(re.paint_line["line-width"]),"line-gap-width":new Ro(re.paint_line["line-gap-width"]),"line-offset":new Ro(re.paint_line["line-offset"]),"line-blur":new Ro(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 Ue({"line-cap":new ho(re.layout_line["line-cap"]),"line-join":new Ro(re.layout_line["line-join"]),"line-miter-limit":new ho(re.layout_line["line-miter-limit"]),"line-round-limit":new ho(re.layout_line["line-round-limit"]),"line-sort-key":new Ro(re.layout_line["line-sort-key"])})}};class Gf extends Ro{possiblyEvaluate(D,J){return J=new Rs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(D,J)}evaluate(D,J,pe,ke){return J=M({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(D,J,pe,ke)}}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(pe){return pe._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof Ta,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,pe=ph(si("line-width",this,J),si("line-gap-width",this,J)),ke=si("line-offset",this,J);return pe/2+Math.abs(ke)+yn(this.paint.get("line-translate"))}queryIntersectsFeature(D,J,pe,ke,je,We,ht){let Et=zi(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),We.angle,ht),Ut=ht/2*ph(this.paint.get("line-width").evaluate(J,pe),this.paint.get("line-gap-width").evaluate(J,pe)),or=this.paint.get("line-offset").evaluate(J,pe);return or&&(ke=function(Mr,zr){let Wr=[];for(let ia=0;ia<Mr.length;ia++){let ha=Mr[ia],ja=[];for(let Ka=0;Ka<ha.length;Ka++){let Wi=ha[Ka-1],gi=ha[Ka],qi=ha[Ka+1],en=Ka===0?new n(0,0):gi.sub(Wi)._unit()._perp(),qn=Ka===ha.length-1?new n(0,0):qi.sub(gi)._unit()._perp(),Eo=en._add(qn)._unit(),ys=Eo.x*qn.x+Eo.y*qn.y;ys!==0&&Eo._mult(1/ys),ja.push(Eo._mult(zr)._add(gi))}Wr.push(ja)}return Wr}(ke,or*ht)),function(Mr,zr,Wr){for(let ia=0;ia<zr.length;ia++){let ha=zr[ia];if(Mr.length>=3){for(let ja=0;ja<ha.length;ja++)if(bi(Mr,ha[ja]))return!0}if(fr(Mr,ha,Wr))return!0}return!1}(Et,ke,Ut)}isTileClipped(){return!0}}function ph(W,D){return D>0?D+2*W:W}let iv=dt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nm=dt([{name:"a_projected_pos",components:3,type:"Float32"}],4);dt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let om=dt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);dt([{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=dt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=dt([{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(pe=>{pe.text=function(ke,je,We){let ht=je.layout.get("text-transform").evaluate(We,{});return ht==="uppercase"?ke=ke.toLocaleUpperCase():ht==="lowercase"&&(ke=ke.toLocaleLowerCase()),Js.applyArabicShaping&&(ke=Js.applyArabicShaping(ke)),ke}(pe.text,D,J)}),W}dt([{name:"triangle",components:3,type:"Uint16"}]),dt([{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"}]),dt([{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"}]),dt([{type:"Float32",name:"offsetX"}]),dt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),dt([{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,pe,ke){var je,We,ht=8*ke-pe-1,Et=(1<<ht)-1,Ut=Et>>1,or=-7,Mr=J?ke-1:0,zr=J?-1:1,Wr=W[D+Mr];for(Mr+=zr,je=Wr&(1<<-or)-1,Wr>>=-or,or+=ht;or>0;je=256*je+W[D+Mr],Mr+=zr,or-=8);for(We=je&(1<<-or)-1,je>>=-or,or+=pe;or>0;We=256*We+W[D+Mr],Mr+=zr,or-=8);if(je===0)je=1-Ut;else{if(je===Et)return We?NaN:1/0*(Wr?-1:1);We+=Math.pow(2,pe),je-=Ut}return(Wr?-1:1)*We*Math.pow(2,je-pe)},sm=function(W,D,J,pe,ke,je){var We,ht,Et,Ut=8*je-ke-1,or=(1<<Ut)-1,Mr=or>>1,zr=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=pe?0:je-1,ia=pe?1:-1,ha=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(ht=isNaN(D)?1:0,We=or):(We=Math.floor(Math.log(D)/Math.LN2),D*(Et=Math.pow(2,-We))<1&&(We--,Et*=2),(D+=We+Mr>=1?zr/Et:zr*Math.pow(2,1-Mr))*Et>=2&&(We++,Et/=2),We+Mr>=or?(ht=0,We=or):We+Mr>=1?(ht=(D*Et-1)*Math.pow(2,ke),We+=Mr):(ht=D*Math.pow(2,Mr-1)*Math.pow(2,ke),We=0));ke>=8;W[J+Wr]=255&ht,Wr+=ia,ht/=256,ke-=8);for(We=We<<ke|ht,Ut+=ke;Ut>0;W[J+Wr]=255&We,Wr+=ia,We/=256,Ut-=8);W[J+Wr-ia]|=128*ha};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 pe=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));J.realloc(pe);for(var ke=J.pos-1;ke>=W;ke--)J.buf[ke+pe]=J.buf[ke]}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 pe=this.readVarint(),ke=pe>>3,je=this.pos;this.type=7&pe,W(ke,D,this),this.pos===je&&this.skip(pe)}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,pe=this.buf;return D=127&(J=pe[this.pos++]),J<128?D:(D|=(127&(J=pe[this.pos++]))<<7,J<128?D:(D|=(127&(J=pe[this.pos++]))<<14,J<128?D:(D|=(127&(J=pe[this.pos++]))<<21,J<128?D:function(ke,je,We){var ht,Et,Ut=We.buf;if(ht=(112&(Et=Ut[We.pos++]))>>4,Et<128||(ht|=(127&(Et=Ut[We.pos++]))<<3,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<10,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<17,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<24,Et<128)||(ht|=(1&(Et=Ut[We.pos++]))<<31,Et<128))return lv(ke,ht,je);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(J=pe[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,pe,ke){return xg.decode(J.subarray(pe,ke))}(this.buf,D,W):function(J,pe,ke){for(var je="",We=pe;We<ke;){var ht,Et,Ut,or=J[We],Mr=null,zr=or>239?4:or>223?3:or>191?2:1;if(We+zr>ke)break;zr===1?or<128&&(Mr=or):zr===2?(192&(ht=J[We+1]))==128&&(Mr=(31&or)<<6|63&ht)<=127&&(Mr=null):zr===3?(Et=J[We+2],(192&(ht=J[We+1]))==128&&(192&Et)==128&&((Mr=(15&or)<<12|(63&ht)<<6|63&Et)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(Et=J[We+2],Ut=J[We+3],(192&(ht=J[We+1]))==128&&(192&Et)==128&&(192&Ut)==128&&((Mr=(15&or)<<18|(63&ht)<<12|(63&Et)<<6|63&Ut)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,je+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),je+=String.fromCharCode(Mr),We+=zr}return je}(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 pe,ke;if(D>=0?(pe=D%4294967296|0,ke=D/4294967296|0):(ke=~(-D/4294967296),4294967295^(pe=~(-D%4294967296))?pe=pe+1|0:(pe=0,ke=ke+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(je,We,ht){ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,ht.buf[ht.pos]=127&(je>>>=7)}(pe,0,J),function(je,We){var ht=(7&je)<<4;We.buf[We.pos++]|=ht|((je>>>=3)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je)))))}(ke,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(pe,ke,je){for(var We,ht,Et=0;Et<ke.length;Et++){if((We=ke.charCodeAt(Et))>55295&&We<57344){if(!ht){We>56319||Et+1===ke.length?(pe[je++]=239,pe[je++]=191,pe[je++]=189):ht=We;continue}if(We<56320){pe[je++]=239,pe[je++]=191,pe[je++]=189,ht=We;continue}We=ht-55296<<10|We-56320|65536,ht=null}else ht&&(pe[je++]=239,pe[je++]=191,pe[je++]=189,ht=null);We<128?pe[je++]=We:(We<2048?pe[je++]=We>>6|192:(We<65536?pe[je++]=We>>12|224:(pe[je++]=We>>18|240,pe[je++]=We>>12&63|128),pe[je++]=We>>6&63|128),pe[je++]=63&We|128)}return je}(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 pe=this.pos-J;pe>=128&&bg(J,pe,this),this.pos=J-1,this.writeVarint(pe),this.pos+=pe},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:pe,bitmap:ke,width:je,height:We,left:ht,top:Et,advance:Ut}=J.readMessage(Px,{});D.push({id:pe,bitmap:new In({width:je+2*I1,height:We+2*I1},ke),metrics:{width:je,height:We,left:ht,top:Et,advance:Ut}})}}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 We of W)D+=We.w*We.h,J=Math.max(J,We.w);W.sort((We,ht)=>ht.h-We.h);let pe=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),J),h:1/0}],ke=0,je=0;for(let We of W)for(let ht=pe.length-1;ht>=0;ht--){let Et=pe[ht];if(!(We.w>Et.w||We.h>Et.h)){if(We.x=Et.x,We.y=Et.y,je=Math.max(je,We.y+We.h),ke=Math.max(ke,We.x+We.w),We.w===Et.w&&We.h===Et.h){let Ut=pe.pop();ht<pe.length&&(pe[ht]=Ut)}else We.h===Et.h?(Et.x+=We.w,Et.w-=We.w):We.w===Et.w?(Et.y+=We.h,Et.h-=We.h):(pe.push({x:Et.x+We.w,y:Et.y,w:Et.w-We.w,h:We.h}),Et.y+=We.h,Et.h-=We.h);break}}return{w:ke,h:je,fill:D/(ke*je)||0}}let zh=1;class wg{constructor(D,{pixelRatio:J,version:pe,stretchX:ke,stretchY:je,content:We,textFitWidth:ht,textFitHeight:Et}){this.paddedRect=D,this.pixelRatio=J,this.stretchX=ke,this.stretchY=je,this.content=We,this.version=pe,this.textFitWidth=ht,this.textFitHeight=Et}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 pe={},ke={};this.haveRenderCallbacks=[];let je=[];this.addImages(D,pe,je),this.addImages(J,ke,je);let{w:We,h:ht}=R1(je),Et=new Ii({width:We||1,height:ht||1});for(let Ut in D){let or=D[Ut],Mr=pe[Ut].paddedRect;Ii.copy(or.data,Et,{x:0,y:0},{x:Mr.x+zh,y:Mr.y+zh},or.data)}for(let Ut in J){let or=J[Ut],Mr=ke[Ut].paddedRect,zr=Mr.x+zh,Wr=Mr.y+zh,ia=or.data.width,ha=or.data.height;Ii.copy(or.data,Et,{x:0,y:0},{x:zr,y:Wr},or.data),Ii.copy(or.data,Et,{x:0,y:ha-1},{x:zr,y:Wr-1},{width:ia,height:1}),Ii.copy(or.data,Et,{x:0,y:0},{x:zr,y:Wr+ha},{width:ia,height:1}),Ii.copy(or.data,Et,{x:ia-1,y:0},{x:zr-1,y:Wr},{width:1,height:ha}),Ii.copy(or.data,Et,{x:0,y:0},{x:zr+ia,y:Wr},{width:1,height:ha})}this.image=Et,this.iconPositions=pe,this.patternPositions=ke}addImages(D,J,pe){for(let ke in D){let je=D[ke],We={x:0,y:0,w:je.data.width+2*zh,h:je.data.height+2*zh};pe.push(We),J[ke]=new wg(We,je),je.hasRenderCallback&&this.haveRenderCallbacks.push(ke)}}patchUpdatedImages(D,J){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let pe in D.updatedImages)this.patchUpdatedImage(this.iconPositions[pe],D.getImage(pe),J),this.patchUpdatedImage(this.patternPositions[pe],D.getImage(pe),J)}patchUpdatedImage(D,J,pe){if(!D||!J||D.version===J.version)return;D.version=J.version;let[ke,je]=D.tl;pe.update(J.data,void 0,{x:ke,y:je})}}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 pe=new S0;return pe.scale=D||1,pe.fontStack=J,pe}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 pe=new lm;for(let ke=0;ke<D.sections.length;ke++){let je=D.sections[ke];je.image?pe.addImageSection(je):pe.addTextSection(je,J)}return pe}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 pe=0;pe<D.length;pe++){let ke=D.charCodeAt(pe+1)||null,je=D.charCodeAt(pe-1)||null;J+=ke&&Fl(ke)&&!cc[D[pe+1]]||je&&Fl(je)&&!cc[D[pe-1]]||!cc[D[pe]]?D[pe]:cc[D[pe]]}return J}(this.text)}trim(){let D=0;for(let pe=0;pe<this.text.length&&Ag[this.text.charCodeAt(pe)];pe++)D++;let J=this.text.length;for(let pe=this.text.length-1;pe>=0&&pe>=D&&Ag[this.text.charCodeAt(pe)];pe--)J--;this.text=this.text.substring(D,J),this.sectionIndex=this.sectionIndex.slice(D,J)}substring(D,J){let pe=new lm;return pe.text=this.text.substring(D,J),pe.sectionIndex=this.sectionIndex.slice(D,J),pe.sections=this.sections,pe}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 pe=this.sections.length-1;for(let ke=0;ke<D.text.length;++ke)this.sectionIndex.push(pe)}addImageSection(D){let J=D.image?D.image.name:"";if(J.length===0)return void f("Can't add FormattedSection with an empty image.");let pe=this.getNextImageSectionCharCode();pe?(this.text+=String.fromCharCode(pe),this.sections.push(S0.forImage(J)),this.sectionIndex.push(this.sections.length-1)):f("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,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia){let ha=lm.fromFeature(W,ke),ja;Mr===e.ah.vertical&&ha.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&ha.sections.length===1){ja=[];let en=Ka(ha.toString(),um(ha,Ut,je,D,pe,Wr));for(let qn of en){let Eo=new lm;Eo.text=qn,Eo.sections=ha.sections;for(let ys=0;ys<qn.length;ys++)Eo.sectionIndex.push(0);ja.push(Eo)}}else if(Wi){ja=[];let en=Wi(ha.text,ha.sectionIndex,um(ha,Ut,je,D,pe,Wr));for(let qn of en){let Eo=new lm;Eo.text=qn[0],Eo.sectionIndex=qn[1],Eo.sections=ha.sections,ja.push(Eo)}}else ja=function(en,qn){let Eo=[],ys=en.text,mo=0;for(let zn of qn)Eo.push(en.substring(mo,zn)),mo=zn;return mo<ys.length&&Eo.push(en.substring(mo,ys.length)),Eo}(ha,um(ha,Ut,je,D,pe,Wr));let gi=[],qi={positionedLines:gi,text:ha.toString(),top:or[1],bottom:or[1],left:or[0],right:or[0],writingMode:Mr,iconsInText:!1,verticalizable:!1};return function(en,qn,Eo,ys,mo,zn,ts,Uo,zo,wn,os,Fo){let Ls=0,Ku=eh,Uu=0,th=0,Hp=Uo==="right"?1:Uo==="left"?0:.5,Th=0;for(let ff of mo){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=!(zo===e.ah.horizontal||!os&&!bs(Ju)||os&&(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/Fo,$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=Eo[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:Ls,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ls+=fd*hu.scale+wn):(dh.push({glyph:Ju,imageName:_d,x:Ls,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ls+=$c.advance*hu.scale+wn)}dh.length!==0&&(Uu=Math.max(Ls-wn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Ls=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(ts);(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,mo.length),en.top+=-Qh*Jh,en.bottom=en.top+Jh,en.left+=-$h*Uu,en.right=en.left+Uu}(qi,D,J,pe,ja,We,ht,Et,Mr,Ut,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,pe,ke,je){if(D.imageName){let We=pe[D.imageName];return We?We.displaySize[0]*D.scale*fu/je+ke:0}{let We=J[D.fontStack],ht=We&&We[W];return ht?ht.metrics.advance*D.scale+ke:0}}function Dx(W,D,J,pe){let ke=Math.pow(W-D,2);return pe?W<D?ke/2:2*ke:ke+Math.abs(J)*J}function KT(W,D,J){let pe=0;return W===10&&(pe-=1e4),J&&(pe+=150),W!==40&&W!==65288||(pe+=50),D!==41&&D!==65289||(pe+=50),pe}function Sg(W,D,J,pe,ke,je){let We=null,ht=Dx(D,J,ke,je);for(let Et of pe){let Ut=Dx(D-Et.x,J,ke,je)+Et.badness;Ut<=ht&&(We=Et,ht=Ut)}return{index:W,x:D,priorBreak:We,badness:ht}}function zx(W){return W?zx(W.priorBreak).concat(W.index):[]}function um(W,D,J,pe,ke,je){if(!W)return[];let We=[],ht=function(Mr,zr,Wr,ia,ha,ja){let Ka=0;for(let Wi=0;Wi<Mr.length();Wi++){let gi=Mr.getSection(Wi);Ka+=Rx(Mr.getCharCode(Wi),gi,ia,ha,zr,ja)}return Ka/Math.max(1,Math.ceil(Ka/Wr))}(W,D,J,pe,ke,je),Et=W.text.indexOf("\u200B")>=0,Ut=0;for(let Mr=0;Mr<W.length();Mr++){let zr=W.getSection(Mr),Wr=W.getCharCode(Mr);if(Ag[Wr]||(Ut+=Rx(Wr,zr,pe,ke,D,je)),Mr<W.length()-1){let ia=!((or=Wr)<11904)&&(!!un["CJK Compatibility Forms"](or)||!!un["CJK Compatibility"](or)||!!un["CJK Strokes"](or)||!!un["CJK Symbols and Punctuation"](or)||!!un["Enclosed CJK Letters and Months"](or)||!!un["Halfwidth and Fullwidth Forms"](or)||!!un["Ideographic Description Characters"](or)||!!un["Vertical Forms"](or)||el.test(String.fromCodePoint(or)));(ZT[Wr]||ia||zr.imageName||Mr!==W.length()-2&&YT[W.getCharCode(Mr+1)])&&We.push(Sg(Mr+1,Ut,ht,We,KT(Wr,W.getCharCode(Mr+1),ia&&Et),!1))}}var or;return zx(Sg(W.length(),Ut,ht,We,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,pe,ke){if(!pe&&!ke)return;let je=W[J],We=(W[J].x+je.metrics.advance*je.scale)*pe;for(let ht=D;ht<=J;ht++)W[ht].x-=We,W[ht].y+=ke}function E0(W,D,J){let{horizontalAlign:pe,verticalAlign:ke}=Mg(J),je=D[0]-W.displaySize[0]*pe,We=D[1]-W.displaySize[1]*ke;return{image:W,top:We,bottom:We+W.displaySize[1],left:je,right:je+W.displaySize[0]}}function Fx(W){var D,J;let pe=W.left,ke=W.top,je=W.right-pe,We=W.bottom-ke,ht=(D=W.image.textFitWidth)!==null&&D!==void 0?D:"stretchOrShrink",Et=(J=W.image.textFitHeight)!==null&&J!==void 0?J:"stretchOrShrink",Ut=(W.image.content[2]-W.image.content[0])/(W.image.content[3]-W.image.content[1]);if(Et==="proportional"){if(ht==="stretchOnly"&&je/We<Ut||ht==="proportional"){let or=Math.ceil(We*Ut);pe*=or/je,je=or}}else if(ht==="proportional"&&Et==="stretchOnly"&&Ut!==0&&je/We>Ut){let or=Math.ceil(je/Ut);ke*=or/We,We=or}return{x1:pe,y1:ke,x2:pe+je,y2:ke+We}}function Ox(W,D,J,pe,ke,je){let We=W.image,ht;if(We.content){let ja=We.content,Ka=We.pixelRatio||1;ht=[ja[0]/Ka,ja[1]/Ka,We.displaySize[0]-ja[2]/Ka,We.displaySize[1]-ja[3]/Ka]}let Et=D.left*je,Ut=D.right*je,or,Mr,zr,Wr;J==="width"||J==="both"?(Wr=ke[0]+Et-pe[3],Mr=ke[0]+Ut+pe[1]):(Wr=ke[0]+(Et+Ut-We.displaySize[0])/2,Mr=Wr+We.displaySize[0]);let ia=D.top*je,ha=D.bottom*je;return J==="height"||J==="both"?(or=ke[1]+ia-pe[0],zr=ke[1]+ha+pe[2]):(or=ke[1]+(ia+ha-We.displaySize[1])/2,zr=or+We.displaySize[1]),{image:We,top:or,right:Mr,bottom:zr,left:Wr,collisionPadding:ht}}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 Rs(W+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:pe,interpolationType:ke}=J,je=0;for(;je<pe.length&&pe[je]<=W;)je++;je=Math.max(0,je-1);let We=je;for(;We<pe.length&&pe[We]<W+1;)We++;We=Math.min(pe.length-1,We);let ht=pe[je],Et=pe[We];return J.kind==="composite"?{kind:"composite",minZoom:ht,maxZoom:Et,interpolationType:ke}:{kind:"camera",minZoom:ht,maxZoom:Et,minSize:J.evaluate(new Rs(ht)),maxSize:J.evaluate(new Rs(Et)),interpolationType:ke}}}function D1(W,D,J){let pe="never",ke=W.get(D);return ke?pe=ke:W.get(J)&&(pe="always"),pe}let JT=Jr.VectorTileFeature.types,$T=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Eg(W,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr){let Wr=ht?Math.min(cv,Math.round(ht[0])):0,ia=ht?Math.min(cv,Math.round(ht[1])):0;W.emplaceBack(D,J,Math.round(32*pe),Math.round(32*ke),je,We,(Wr<<1)+(Et?1:0),ia,16*Ut,16*or,256*Mr,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(Lo(D.text))return!0;return!1}class O1{constructor(D){this.layoutVertexArray=new cu,this.indexArray=new Fe,this.programConfigurations=D,this.segments=new Mt,this.dynamicLayoutVertexArray=new uc,this.opacityVertexArray=new Vl,this.hasVisibleVertices=!1,this.placedSymbolArray=new Kn}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(D,J,pe,ke){this.isEmpty()||(pe&&(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),(pe||ke)&&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,pe){this.layoutVertexArray=new D,this.layoutAttributes=J,this.indexArray=new pe,this.segments=new Mt,this.collisionVertexArray=new de}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(We=>We.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 pe=this.layers[0].layout,ke=pe.get("symbol-sort-key"),je=pe.get("symbol-z-order");this.canOverlap=D1(pe,"text-overlap","text-allow-overlap")!=="never"||D1(pe,"icon-overlap","icon-allow-overlap")!=="never"||pe.get("text-ignore-placement")||pe.get("icon-ignore-placement"),this.sortFeaturesByKey=je!=="viewport-y"&&!ke.isConstant(),this.sortFeaturesByY=(je==="viewport-y"||je==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,pe.get("symbol-placement")==="point"&&(this.writingModes=pe.get("text-writing-mode").map(We=>e.ah[We])),this.stateDependentLayerIds=this.layers.filter(We=>We.isStateDependent()).map(We=>We.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 is,this.lineVertexArray=new Ao,this.symbolInstances=new wo,this.textAnchorOffsets=new ps}calculateGlyphDependencies(D,J,pe,ke,je){for(let We=0;We<D.length;We++)if(J[D.charCodeAt(We)]=!0,(pe||ke)&&je){let ht=cc[D.charAt(We)];ht&&(J[ht.charCodeAt(0)]=!0)}}populate(D,J,pe){let ke=this.layers[0],je=ke.layout,We=je.get("text-font"),ht=je.get("text-field"),Et=je.get("icon-image"),Ut=(ht.value.kind!=="constant"||ht.value.value instanceof ra&&!ht.value.value.isEmpty()||ht.value.value.toString().length>0)&&(We.value.kind!=="constant"||We.value.value.length>0),or=Et.value.kind!=="constant"||!!Et.value.value||Object.keys(Et.parameters).length>0,Mr=je.get("symbol-sort-key");if(this.features=[],!Ut&&!or)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,ha=new Rs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of D){let qi=ke._featureFilter.needGeometry,en=Hl(ja,qi);if(!ke._featureFilter.filter(ha,en,pe))continue;let qn,Eo;if(qi||(en.geometry=Al(ja)),Ut){let mo=ke.getValueAndResolveTokens("text-field",en,pe,ia),zn=ra.factory(mo),ts=this.hasRTLText=this.hasRTLText||F1(zn);(!ts||Js.getRTLTextPluginStatus()==="unavailable"||ts&&Js.isParsed())&&(qn=ov(zn,ke,en))}if(or){let mo=ke.getValueAndResolveTokens("icon-image",en,pe,ia);Eo=mo instanceof Za?mo:Za.fromString(mo)}if(!qn&&!Eo)continue;let ys=this.sortFeaturesByKey?Mr.evaluate(en,{},pe):void 0;if(this.features.push({id:Ka,text:qn,icon:Eo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:ys}),Eo&&(zr[Eo.name]=!0),qn){let mo=We.evaluate(en,{},pe).join(","),zn=je.get("text-rotation-alignment")!=="viewport"&&je.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let ts of qn.sections)if(ts.image)zr[ts.image.name]=!0;else{let Uo=yo(qn.toString()),zo=ts.fontStack||mo,wn=Wr[zo]=Wr[zo]||{};this.calculateGlyphDependencies(ts.text,wn,zn,this.allowVerticalPlacement,Uo)}}}je.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(mo){gi.push(ja[mo]),qi++}function qn(mo,zn,ts){let Uo=Wi[mo];return delete Wi[mo],Wi[zn]=Uo,gi[Uo].geometry[0].pop(),gi[Uo].geometry[0]=gi[Uo].geometry[0].concat(ts[0]),Uo}function Eo(mo,zn,ts){let Uo=Ka[zn];return delete Ka[zn],Ka[mo]=Uo,gi[Uo].geometry[0].shift(),gi[Uo].geometry[0]=ts[0].concat(gi[Uo].geometry[0]),Uo}function ys(mo,zn,ts){let Uo=ts?zn[0][zn[0].length-1]:zn[0][0];return`${mo}:${Uo.x}:${Uo.y}`}for(let mo=0;mo<ja.length;mo++){let zn=ja[mo],ts=zn.geometry,Uo=zn.text?zn.text.toString():null;if(!Uo){en(mo);continue}let zo=ys(Uo,ts),wn=ys(Uo,ts,!0);if(zo in Wi&&wn in Ka&&Wi[zo]!==Ka[wn]){let os=Eo(zo,wn,ts),Fo=qn(zo,wn,gi[os].geometry);delete Ka[zo],delete Wi[wn],Wi[ys(Uo,gi[Fo].geometry,!0)]=Fo,gi[os].geometry=null}else zo in Wi?qn(zo,wn,ts):wn in Ka?Eo(zo,wn,ts):(en(mo),Ka[zo]=qi-1,Wi[wn]=qi-1)}return gi.filter(mo=>mo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(D,J,pe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,J,this.layers,pe),this.icon.programConfigurations.updatePaintArrays(D,J,this.layers,pe))}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 pe=this.lineVertexArray.length;if(D.segment!==void 0){let ke=D.dist(J[D.segment+1]),je=D.dist(J[D.segment]),We={};for(let ht=D.segment+1;ht<J.length;ht++)We[ht]={x:J[ht].x,y:J[ht].y,tileUnitDistanceFromAnchor:ke},ht<J.length-1&&(ke+=J[ht+1].dist(J[ht]));for(let ht=D.segment||0;ht>=0;ht--)We[ht]={x:J[ht].x,y:J[ht].y,tileUnitDistanceFromAnchor:je},ht>0&&(je+=J[ht-1].dist(J[ht]));for(let ht=0;ht<J.length;ht++){let Et=We[ht];this.lineVertexArray.emplaceBack(Et.x,Et.y,Et.tileUnitDistanceFromAnchor)}}return{lineStartIndex:pe,lineLength:this.lineVertexArray.length-pe}}addSymbols(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr){let Wr=D.indexArray,ia=D.layoutVertexArray,ha=D.segments.prepareSegment(4*J.length,ia,Wr,this.canOverlap?We.sortKey:void 0),ja=this.glyphOffsetArray.length,Ka=ha.vertexLength,Wi=this.allowVerticalPlacement&&ht===e.ah.vertical?Math.PI/2:0,gi=We.text&&We.text.sections;for(let qi=0;qi<J.length;qi++){let{tl:en,tr:qn,bl:Eo,br:ys,tex:mo,pixelOffsetTL:zn,pixelOffsetBR:ts,minFontScaleX:Uo,minFontScaleY:zo,glyphOffset:wn,isSDF:os,sectionIndex:Fo}=J[qi],Ls=ha.vertexLength,Ku=wn[1];Eg(ia,Et.x,Et.y,en.x,Ku+en.y,mo.x,mo.y,pe,os,zn.x,zn.y,Uo,zo),Eg(ia,Et.x,Et.y,qn.x,Ku+qn.y,mo.x+mo.w,mo.y,pe,os,ts.x,zn.y,Uo,zo),Eg(ia,Et.x,Et.y,Eo.x,Ku+Eo.y,mo.x,mo.y+mo.h,pe,os,zn.x,ts.y,Uo,zo),Eg(ia,Et.x,Et.y,ys.x,Ku+ys.y,mo.x+mo.w,mo.y+mo.h,pe,os,ts.x,ts.y,Uo,zo),z1(D.dynamicLayoutVertexArray,Et,Wi),Wr.emplaceBack(Ls,Ls+1,Ls+2),Wr.emplaceBack(Ls+1,Ls+2,Ls+3),ha.vertexLength+=4,ha.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(wn[0]),qi!==J.length-1&&Fo===J[qi+1].sectionIndex||D.programConfigurations.populatePaintArrays(ia.length,We,We.index,{},zr,gi&&gi[Fo])}D.placedSymbolArray.emplaceBack(Et.x,Et.y,ja,this.glyphOffsetArray.length-ja,Ka,Ut,or,Et.segment,pe?pe[0]:0,pe?pe[1]:0,ke[0],ke[1],ht,0,!1,0,Mr)}_addCollisionDebugVertex(D,J,pe,ke,je,We){return J.emplaceBack(0,0),D.emplaceBack(pe.x,pe.y,ke,je,Math.round(We.x),Math.round(We.y))}addCollisionDebugVertices(D,J,pe,ke,je,We,ht){let Et=je.segments.prepareSegment(4,je.layoutVertexArray,je.indexArray),Ut=Et.vertexLength,or=je.layoutVertexArray,Mr=je.collisionVertexArray,zr=ht.anchorX,Wr=ht.anchorY;this._addCollisionDebugVertex(or,Mr,We,zr,Wr,new n(D,J)),this._addCollisionDebugVertex(or,Mr,We,zr,Wr,new n(pe,J)),this._addCollisionDebugVertex(or,Mr,We,zr,Wr,new n(pe,ke)),this._addCollisionDebugVertex(or,Mr,We,zr,Wr,new n(D,ke)),Et.vertexLength+=4;let ia=je.indexArray;ia.emplaceBack(Ut,Ut+1),ia.emplaceBack(Ut+1,Ut+2),ia.emplaceBack(Ut+2,Ut+3),ia.emplaceBack(Ut+3,Ut),Et.primitiveLength+=4}addDebugCollisionBoxes(D,J,pe,ke){for(let je=D;je<J;je++){let We=this.collisionBoxArray.get(je);this.addCollisionDebugVertices(We.x1,We.y1,We.x2,We.y2,ke?this.textCollisionBox:this.iconCollisionBox,We.anchorPoint,pe)}}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,pe,ke,je,We,ht,Et,Ut){let or={};for(let Mr=J;Mr<pe;Mr++){let zr=D.get(Mr);or.textBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},or.textFeatureIndex=zr.featureIndex;break}for(let Mr=ke;Mr<je;Mr++){let zr=D.get(Mr);or.verticalTextBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},or.verticalTextFeatureIndex=zr.featureIndex;break}for(let Mr=We;Mr<ht;Mr++){let zr=D.get(Mr);or.iconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},or.iconFeatureIndex=zr.featureIndex;break}for(let Mr=Et;Mr<Ut;Mr++){let zr=D.get(Mr);or.verticalIconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},or.verticalIconFeatureIndex=zr.featureIndex;break}return or}deserializeCollisionBoxes(D){this.collisionArrays=[];for(let J=0;J<this.symbolInstances.length;J++){let pe=this.symbolInstances.get(J);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(D,pe.textBoxStartIndex,pe.textBoxEndIndex,pe.verticalTextBoxStartIndex,pe.verticalTextBoxEndIndex,pe.iconBoxStartIndex,pe.iconBoxEndIndex,pe.verticalIconBoxStartIndex,pe.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 pe=D.placedSymbolArray.get(J),ke=pe.vertexStartIndex+4*pe.numGlyphs;for(let je=pe.vertexStartIndex;je<ke;je+=4)D.indexArray.emplaceBack(je,je+1,je+2),D.indexArray.emplaceBack(je+1,je+2,je+3)}getSortedSymbolIndexes(D){if(this.sortedAngle===D&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let J=Math.sin(D),pe=Math.cos(D),ke=[],je=[],We=[];for(let ht=0;ht<this.symbolInstances.length;++ht){We.push(ht);let Et=this.symbolInstances.get(ht);ke.push(0|Math.round(J*Et.anchorX+pe*Et.anchorY)),je.push(Et.featureIndex)}return We.sort((ht,Et)=>ke[ht]-ke[Et]||je[Et]-je[ht]),We}addToSortKeyRanges(D,J){let pe=this.sortKeyRanges[this.sortKeyRanges.length-1];pe&&pe.sortKey===J?pe.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 pe=this.symbolInstances.get(J);this.featureSortOrder.push(pe.featureIndex),[pe.rightJustifiedTextSymbolIndex,pe.centerJustifiedTextSymbolIndex,pe.leftJustifiedTextSymbolIndex].forEach((ke,je,We)=>{ke>=0&&We.indexOf(ke)===je&&this.addIndicesForPlacedSymbol(this.text,ke)}),pe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,pe.verticalPlacedTextSymbolIndex),pe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.placedIconSymbolIndex),pe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.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 Ue({"icon-opacity":new Ro(re.paint_symbol["icon-opacity"]),"icon-color":new Ro(re.paint_symbol["icon-color"]),"icon-halo-color":new Ro(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ro(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ro(re.paint_symbol["icon-halo-blur"]),"icon-translate":new ho(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new ho(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ro(re.paint_symbol["text-opacity"]),"text-color":new Ro(re.paint_symbol["text-color"],{runtimeType:qt,getOverride:W=>W.textColor,hasOverride:W=>!!W.textColor}),"text-halo-color":new Ro(re.paint_symbol["text-halo-color"]),"text-halo-width":new Ro(re.paint_symbol["text-halo-width"]),"text-halo-blur":new Ro(re.paint_symbol["text-halo-blur"]),"text-translate":new ho(re.paint_symbol["text-translate"]),"text-translate-anchor":new ho(re.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Ue({"symbol-placement":new ho(re.layout_symbol["symbol-placement"]),"symbol-spacing":new ho(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ho(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ro(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ho(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ho(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ho(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ho(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new ho(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ho(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ro(re.layout_symbol["icon-size"]),"icon-text-fit":new ho(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ho(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ro(re.layout_symbol["icon-image"]),"icon-rotate":new Ro(re.layout_symbol["icon-rotate"]),"icon-padding":new Ro(re.layout_symbol["icon-padding"]),"icon-keep-upright":new ho(re.layout_symbol["icon-keep-upright"]),"icon-offset":new Ro(re.layout_symbol["icon-offset"]),"icon-anchor":new Ro(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ho(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ho(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ho(re.layout_symbol["text-rotation-alignment"]),"text-field":new Ro(re.layout_symbol["text-field"]),"text-font":new Ro(re.layout_symbol["text-font"]),"text-size":new Ro(re.layout_symbol["text-size"]),"text-max-width":new Ro(re.layout_symbol["text-max-width"]),"text-line-height":new ho(re.layout_symbol["text-line-height"]),"text-letter-spacing":new Ro(re.layout_symbol["text-letter-spacing"]),"text-justify":new Ro(re.layout_symbol["text-justify"]),"text-radial-offset":new Ro(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ho(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ro(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ro(re.layout_symbol["text-anchor"]),"text-max-angle":new ho(re.layout_symbol["text-max-angle"]),"text-writing-mode":new ho(re.layout_symbol["text-writing-mode"]),"text-rotate":new Ro(re.layout_symbol["text-rotate"]),"text-padding":new ho(re.layout_symbol["text-padding"]),"text-keep-upright":new ho(re.layout_symbol["text-keep-upright"]),"text-transform":new Ro(re.layout_symbol["text-transform"]),"text-offset":new Ro(re.layout_symbol["text-offset"]),"text-allow-overlap":new ho(re.layout_symbol["text-allow-overlap"]),"text-overlap":new ho(re.layout_symbol["text-overlap"]),"text-ignore-placement":new ho(re.layout_symbol["text-ignore-placement"]),"text-optional":new ho(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:ot,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 pe=this.layout.get("text-writing-mode");if(pe){let ke=[];for(let je of pe)ke.indexOf(je)<0&&ke.push(je);this.layout._values["text-writing-mode"]=ke}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,J,pe,ke){let je=this.layout.get(D).evaluate(J,{},pe,ke),We=this._unevaluatedLayout._values[D];return We.isDataDriven()||Mc(We.value)||!je?je:function(ht,Et){return Et.replace(/{([^{}]+)}/g,(Ut,or)=>ht&&or in ht?String(ht[or]):"")}(J.properties,je)}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),pe=new L0(J),ke=new Lu(pe,J.property.specification),je=null;je=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",ke):new yu("composite",ke,J.value.zoomStops),this.paint._values[D]=new Au(J.property,je,J.parameters)}}_handleOverridablePaintPropertyUpdate(D,J,pe){return!(!this.layout||J.isDataDriven()||pe.isDataDriven())&&Dv.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,J){let pe=D.get("text-field"),ke=kg.paint.properties[J],je=!1,We=ht=>{for(let Et of ht)if(ke.overrides&&ke.overrides.hasOverride(Et))return void(je=!0)};if(pe.value.kind==="constant"&&pe.value.value instanceof ra)We(pe.value.value.sections);else if(pe.value.kind==="source"){let ht=Ut=>{je||(Ut instanceof on&&Ra(Ut.value)===qr?We(Ut.value.sections):Ut instanceof ls?We(Ut.sections):Ut.eachChild(ht))},Et=pe.value;Et._styleExpression&&ht(Et._styleExpression.expression)}return je}}let Nx;var P0={get paint(){return Nx=Nx||new Ue({"background-color":new ho(re.paint_background["background-color"]),"background-pattern":new lc(re.paint_background["background-pattern"]),"background-opacity":new ho(re.paint_background["background-opacity"])})}};class QT extends ie{constructor(D){super(D,P0)}}let B1;var Ux={get paint(){return B1=B1||new Ue({"raster-opacity":new ho(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new ho(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ho(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ho(re.paint_raster["raster-brightness-max"]),"raster-saturation":new ho(re.paint_raster["raster-saturation"]),"raster-contrast":new ho(re.paint_raster["raster-contrast"]),"raster-resampling":new ho(re.paint_raster["raster-resampling"]),"raster-fade-duration":new ho(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,pe=this.lat*J,ke=D.lat*J,je=Math.sin(pe)*Math.sin(ke)+Math.cos(pe)*Math.cos(ke)*Math.cos((D.lng-this.lng)*J);return j1*Math.acos(Math.min(je,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,pe=0){this.x=+D,this.y=+J,this.z=+pe}static fromLngLat(D,J=0){let pe=Hd.convert(D);return new D0(Cg(pe.lng),qx(pe.lat),Lg(J,pe.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 pe=2*Math.PI*6378137/256/Math.pow(2,J);return[W*pe-2*Math.PI*6378137/2,D*pe-2*Math.PI*6378137/2]}class q1{constructor(D,J,pe){if(!function(ke,je,We){return!(ke<0||ke>25||We<0||We>=Math.pow(2,ke)||je<0||je>=Math.pow(2,ke))}(D,J,pe))throw new Error(`x=${J}, y=${pe}, 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=pe,this.key=z0(0,D,D,J,pe)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,J,pe){let ke=(We=this.y,ht=this.z,Et=rd(256*(je=this.x),256*(We=Math.pow(2,ht)-We-1),ht),Ut=rd(256*(je+1),256*(We+1),ht),Et[0]+","+Et[1]+","+Ut[0]+","+Ut[1]);var je,We,ht,Et,Ut;let or=function(Mr,zr,Wr){let ia,ha="";for(let ja=Mr;ja>0;ja--)ia=1<<ja-1,ha+=(zr&ia?1:0)+(Wr&ia?2:0);return ha}(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(pe==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,J>1?"@2x":"").replace(/{quadkey}/g,or).replace(/{bbox-epsg-3857}/g,ke)}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)*vo,(D.y*J-this.y)*vo)}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,pe,ke,je){if(D<pe)throw new Error(`overscaledZ should be >= z; overscaledZ = ${D}; z = ${pe}`);this.overscaledZ=D,this.wrap=J,this.canonical=new q1(pe,+ke,+je),this.key=z0(J,D,pe,ke,je)}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 pe=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>>pe,this.canonical.y>>pe)}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,pe=2*this.canonical.x,ke=2*this.canonical.y;return[new Gp(J,this.wrap,J,pe,ke),new Gp(J,this.wrap,J,pe+1,ke),new Gp(J,this.wrap,J,pe,ke+1),new Gp(J,this.wrap,J,pe+1,ke+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,pe,ke){(W*=2)<0&&(W=-1*W-1);let je=1<<J;return(je*je*W+je*ke+pe).toString(36)+J.toString(36)+D.toString(36)}mi("CanonicalTileID",q1),mi("OverscaledTileID",Gp,{omit:["posMatrix"]});class Gx{constructor(D,J,pe,ke=1,je=1,We=1,ht=0){if(this.uid=D,J.height!==J.width)throw new RangeError("DEM tiles must be square");if(pe&&!["mapbox","terrarium","custom"].includes(pe))return void f(`"${pe}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=J.height;let Et=this.dim=J.height-2;switch(this.data=new Uint32Array(J.data.buffer),pe){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=ke,this.greenFactor=je,this.blueFactor=We,this.baseShift=ht;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let Ut=0;Ut<Et;Ut++)this.data[this._idx(-1,Ut)]=this.data[this._idx(0,Ut)],this.data[this._idx(Et,Ut)]=this.data[this._idx(Et-1,Ut)],this.data[this._idx(Ut,-1)]=this.data[this._idx(Ut,0)],this.data[this._idx(Ut,Et)]=this.data[this._idx(Ut,Et-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Et,-1)]=this.data[this._idx(Et-1,0)],this.data[this._idx(-1,Et)]=this.data[this._idx(0,Et-1)],this.data[this._idx(Et,Et)]=this.data[this._idx(Et-1,Et-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let Ut=0;Ut<Et;Ut++)for(let or=0;or<Et;or++){let Mr=this.get(Ut,or);Mr>this.max&&(this.max=Mr),Mr<this.min&&(this.min=Mr)}}get(D,J){let pe=new Uint8Array(this.data.buffer),ke=4*this._idx(D,J);return this.unpack(pe[ke],pe[ke+1],pe[ke+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,pe){return D*this.redFactor+J*this.greenFactor+pe*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,J,pe){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let ke=J*this.dim,je=J*this.dim+this.dim,We=pe*this.dim,ht=pe*this.dim+this.dim;switch(J){case-1:ke=je-1;break;case 1:je=ke+1}switch(pe){case-1:We=ht-1;break;case 1:ht=We+1}let Et=-J*this.dim,Ut=-pe*this.dim;for(let or=We;or<ht;or++)for(let Mr=ke;Mr<je;Mr++)this.data[this._idx(Mr,or)]=D.data[this._idx(Mr+Et,or+Ut)]}}mi("DEMData",Gx);class Hx{constructor(D){this._stringToNumber={},this._numberToString=[];for(let J=0;J<D.length;J++){let pe=D[J];this._stringToNumber[pe]=J,this._numberToString[J]=pe}}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,pe,ke,je){this.type="Feature",this._vectorTileFeature=D,D._z=J,D._x=pe,D._y=ke,this.properties=D.properties,this.id=je}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(vo,16,0),this.grid3D=new Di(vo,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(D,J,pe,ke,je,We){let ht=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(pe,ke,je);let Et=We?this.grid3D:this.grid;for(let Ut=0;Ut<J.length;Ut++){let or=J[Ut],Mr=[1/0,1/0,-1/0,-1/0];for(let zr=0;zr<or.length;zr++){let Wr=or[zr];Mr[0]=Math.min(Mr[0],Wr.x),Mr[1]=Math.min(Mr[1],Wr.y),Mr[2]=Math.max(Mr[2],Wr.x),Mr[3]=Math.max(Mr[3],Wr.y)}Mr[0]<vo&&Mr[1]<vo&&Mr[2]>=0&&Mr[3]>=0&&Et.insert(ht,Mr[0],Mr[1],Mr[2],Mr[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,pe,ke){this.loadVTLayers();let je=D.params||{},We=vo/D.tileSize/D.scale,ht=Ec(je.filter),Et=D.queryGeometry,Ut=D.queryPadding*We,or=Xx(Et),Mr=this.grid.query(or.minX-Ut,or.minY-Ut,or.maxX+Ut,or.maxY+Ut),zr=Xx(D.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Ut,zr.minY-Ut,zr.maxX+Ut,zr.maxY+Ut,(ja,Ka,Wi,gi)=>function(qi,en,qn,Eo,ys){for(let zn of qi)if(en<=zn.x&&qn<=zn.y&&Eo>=zn.x&&ys>=zn.y)return!0;let mo=[new n(en,qn),new n(en,ys),new n(Eo,ys),new n(Eo,qn)];if(qi.length>2){for(let zn of mo)if(bi(qi,zn))return!0}for(let zn=0;zn<qi.length-1;zn++)if(yi(qi[zn],qi[zn+1],mo))return!0;return!1}(D.cameraQueryGeometry,ja-Ut,Ka-Ut,Wi+Ut,gi+Ut));for(let ja of Wr)Mr.push(ja);Mr.sort(eA);let ia={},ha;for(let ja=0;ja<Mr.length;ja++){let Ka=Mr[ja];if(Ka===ha)continue;ha=Ka;let Wi=this.featureIndexArray.get(Ka),gi=null;this.loadMatchingFeature(ia,Wi.bucketIndex,Wi.sourceLayerIndex,Wi.featureIndex,ht,je.layers,je.availableImages,J,pe,ke,(qi,en,qn)=>(gi||(gi=Al(qi)),en.queryIntersectsFeature(Et,qi,qn,gi,this.z,D.transform,We,D.pixelPosMatrix)))}return ia}loadMatchingFeature(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr){let zr=this.bucketLayerIDs[J];if(We&&!function(ja,Ka){for(let Wi=0;Wi<ja.length;Wi++)if(Ka.indexOf(ja[Wi])>=0)return!0;return!1}(We,zr))return;let Wr=this.sourceLayerCoder.decode(pe),ia=this.vtLayers[Wr].feature(ke);if(je.needGeometry){let ja=Hl(ia,!0);if(!je.filter(new Rs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!je.filter(new Rs(this.tileID.overscaledZ),ia))return;let ha=this.getId(ia,Wr);for(let ja=0;ja<zr.length;ja++){let Ka=zr[ja];if(We&&We.indexOf(Ka)<0)continue;let Wi=Et[Ka];if(!Wi)continue;let gi={};ha&&or&&(gi=or.getState(Wi.sourceLayer||"_geojsonTileLayer",ha));let qi=M({},Ut[Ka]);qi.paint=Wx(qi.paint,Wi.paint,ia,gi,ht),qi.layout=Wx(qi.layout,Wi.layout,ia,gi,ht);let en=!Mr||Mr(ia,Wi,gi);if(!en)continue;let qn=new V1(ia,this.z,this.x,this.y,ha);qn.layer=qi;let Eo=D[Ka];Eo===void 0&&(Eo=D[Ka]=[]),Eo.push({featureIndex:ke,feature:qn,intersectionZ:en})}}lookupSymbolFeatures(D,J,pe,ke,je,We,ht,Et){let Ut={};this.loadVTLayers();let or=Ec(je);for(let Mr of D)this.loadMatchingFeature(Ut,pe,ke,Mr,or,We,ht,Et,J);return Ut}hasLayer(D){for(let J of this.bucketLayerIDs)for(let pe of J)if(D===pe)return!0;return!1}getId(D,J){let pe=D.id;return this.promoteId&&(pe=D.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[J]],typeof pe=="boolean"&&(pe=Number(pe))),pe}}function Wx(W,D,J,pe,ke){return b(W,(je,We)=>{let ht=D instanceof yc?D.get(We):null;return ht&&ht.evaluate?ht.evaluate(J,pe,ke):ht})}function Xx(W){let D=1/0,J=1/0,pe=-1/0,ke=-1/0;for(let je of W)D=Math.min(D,je.x),J=Math.min(J,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return{minX:D,minY:J,maxX:pe,maxY:ke}}function eA(W,D){return D-W}function Zx(W,D,J,pe,ke){let je=[];for(let We=0;We<W.length;We++){let ht=W[We],Et;for(let Ut=0;Ut<ht.length-1;Ut++){let or=ht[Ut],Mr=ht[Ut+1];or.x<D&&Mr.x<D||(or.x<D?or=new n(D,or.y+(D-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round():Mr.x<D&&(Mr=new n(D,or.y+(D-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round()),or.y<J&&Mr.y<J||(or.y<J?or=new n(or.x+(J-or.y)/(Mr.y-or.y)*(Mr.x-or.x),J)._round():Mr.y<J&&(Mr=new n(or.x+(J-or.y)/(Mr.y-or.y)*(Mr.x-or.x),J)._round()),or.x>=pe&&Mr.x>=pe||(or.x>=pe?or=new n(pe,or.y+(pe-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round():Mr.x>=pe&&(Mr=new n(pe,or.y+(pe-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round()),or.y>=ke&&Mr.y>=ke||(or.y>=ke?or=new n(or.x+(ke-or.y)/(Mr.y-or.y)*(Mr.x-or.x),ke)._round():Mr.y>=ke&&(Mr=new n(or.x+(ke-or.y)/(Mr.y-or.y)*(Mr.x-or.x),ke)._round()),Et&&or.equals(Et[Et.length-1])||(Et=[or],je.push(Et)),Et.push(Mr)))))}}return je}mi("FeatureIndex",zv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends n{constructor(D,J,pe,ke){super(D,J),this.angle=pe,ke!==void 0&&(this.segment=ke)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(W,D,J,pe,ke){if(D.segment===void 0||J===0)return!0;let je=D,We=D.segment+1,ht=0;for(;ht>-J/2;){if(We--,We<0)return!1;ht-=W[We].dist(je),je=W[We]}ht+=W[We].dist(W[We+1]),We++;let Et=[],Ut=0;for(;ht<J/2;){let or=W[We],Mr=W[We+1];if(!Mr)return!1;let zr=W[We-1].angleTo(or)-or.angleTo(Mr);for(zr=Math.abs((zr+3*Math.PI)%(2*Math.PI)-Math.PI),Et.push({distance:ht,angleDelta:zr}),Ut+=zr;ht-Et[0].distance>pe;)Ut-=Et.shift().angleDelta;if(Ut>ke)return!1;We++,ht+=or.dist(Mr)}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,pe,ke,je){let We=Kx(J,ke,je),ht=Jx(J,pe)*je,Et=0,Ut=Yx(W)/2;for(let or=0;or<W.length-1;or++){let Mr=W[or],zr=W[or+1],Wr=Mr.dist(zr);if(Et+Wr>Ut){let ia=(Ut-Et)/Wr,ha=On.number(Mr.x,zr.x,ia),ja=On.number(Mr.y,zr.y,ia),Ka=new Wd(ha,ja,zr.angleTo(Mr),or);return Ka._round(),!We||G1(W,Ka,ht,We,D)?Ka:void 0}Et+=Wr}}function rA(W,D,J,pe,ke,je,We,ht,Et){let Ut=Kx(pe,je,We),or=Jx(pe,ke),Mr=or*We,zr=W[0].x===0||W[0].x===Et||W[0].y===0||W[0].y===Et;return D-Mr<D/4&&(D=Mr+D/4),$x(W,zr?D/2*ht%D:(or/2+2*je)*We*ht%D,D,Ut,J,Mr,zr,!1,Et)}function $x(W,D,J,pe,ke,je,We,ht,Et){let Ut=je/2,or=Yx(W),Mr=0,zr=D-J,Wr=[];for(let ia=0;ia<W.length-1;ia++){let ha=W[ia],ja=W[ia+1],Ka=ha.dist(ja),Wi=ja.angleTo(ha);for(;zr+J<Mr+Ka;){zr+=J;let gi=(zr-Mr)/Ka,qi=On.number(ha.x,ja.x,gi),en=On.number(ha.y,ja.y,gi);if(qi>=0&&qi<Et&&en>=0&&en<Et&&zr-Ut>=0&&zr+Ut<=or){let qn=new Wd(qi,en,Wi,ia);qn._round(),pe&&!G1(W,qn,je,pe,ke)||Wr.push(qn)}}Mr+=Ka}return ht||Wr.length||We||(Wr=$x(W,Mr/2,J,pe,ke,je,We,!0,Et)),Wr}mi("Anchor",Wd);let hm=zh;function Qx(W,D,J,pe){let ke=[],je=W.image,We=je.pixelRatio,ht=je.paddedRect.w-2*hm,Et=je.paddedRect.h-2*hm,Ut={x1:W.left,y1:W.top,x2:W.right,y2:W.bottom},or=je.stretchX||[[0,ht]],Mr=je.stretchY||[[0,Et]],zr=(wn,os)=>wn+os[1]-os[0],Wr=or.reduce(zr,0),ia=Mr.reduce(zr,0),ha=ht-Wr,ja=Et-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,qn=ha,Eo=0,ys=ja;if(je.content&&pe){let wn=je.content,os=wn[2]-wn[0],Fo=wn[3]-wn[1];(je.textFitWidth||je.textFitHeight)&&(Ut=Fx(W)),Ka=Xd(or,0,wn[0]),gi=Xd(Mr,0,wn[1]),Wi=Xd(or,wn[0],wn[2]),qi=Xd(Mr,wn[1],wn[3]),en=wn[0]-Ka,Eo=wn[1]-gi,qn=os-Wi,ys=Fo-qi}let mo=Ut.x1,zn=Ut.y1,ts=Ut.x2-mo,Uo=Ut.y2-zn,zo=(wn,os,Fo,Ls)=>{let Ku=Pg(wn.stretch-Ka,Wi,ts,mo),Uu=pm(wn.fixed-en,qn,wn.stretch,Wr),th=Pg(os.stretch-gi,qi,Uo,zn),Hp=pm(os.fixed-Eo,ys,os.stretch,ia),Th=Pg(Fo.stretch-Ka,Wi,ts,mo),rh=pm(Fo.fixed-en,qn,Fo.stretch,Wr),Jh=Pg(Ls.stretch-gi,qi,Uo,zn),$h=pm(Ls.fixed-Eo,ys,Ls.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/We,Hp/We),dh=new n(rh/We,$h/We),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=wn.stretch+wn.fixed,dp=os.stretch+os.fixed;return{tl:Qh,tr:ff,bl:Fh,br:ah,tex:{x:je.paddedRect.x+hm+Rp,y:je.paddedRect.y+hm+dp,w:Fo.stretch+Fo.fixed-Rp,h:Ls.stretch+Ls.fixed-dp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:qn/We/ts,minFontScaleY:ys/We/Uo,isSDF:J}};if(pe&&(je.stretchX||je.stretchY)){let wn=eb(or,ha,Wr),os=eb(Mr,ja,ia);for(let Fo=0;Fo<wn.length-1;Fo++){let Ls=wn[Fo],Ku=wn[Fo+1];for(let Uu=0;Uu<os.length-1;Uu++)ke.push(zo(Ls,os[Uu],Ku,os[Uu+1]))}}else ke.push(zo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ht+1},{fixed:0,stretch:Et+1}));return ke}function Xd(W,D,J){let pe=0;for(let ke of W)pe+=Math.max(D,Math.min(J,ke[1]))-Math.max(D,Math.min(J,ke[0]));return pe}function eb(W,D,J){let pe=[{fixed:-hm,stretch:0}];for(let[ke,je]of W){let We=pe[pe.length-1];pe.push({fixed:ke-We.stretch,stretch:We.stretch}),pe.push({fixed:ke-We.stretch,stretch:We.stretch+(je-ke)})}return pe.push({fixed:D+hm,stretch:J}),pe}function Pg(W,D,J,pe){return W/D*J+pe}function pm(W,D,J,pe){return W-D*J/pe}class hv{constructor(D,J,pe,ke,je,We,ht,Et,Ut,or){var Mr;if(this.boxStartIndex=D.length,Ut){let zr=We.top,Wr=We.bottom,ia=We.collisionPadding;ia&&(zr-=ia[1],Wr+=ia[3]);let ha=Wr-zr;ha>0&&(ha=Math.max(10,ha),this.circleDiameter=ha)}else{let zr=!((Mr=We.image)===null||Mr===void 0)&&Mr.content&&(We.image.textFitWidth||We.image.textFitHeight)?Fx(We):{x1:We.left,y1:We.top,x2:We.right,y2:We.bottom};zr.y1=zr.y1*ht-Et[0],zr.y2=zr.y2*ht+Et[2],zr.x1=zr.x1*ht-Et[3],zr.x2=zr.x2*ht+Et[1];let Wr=We.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ht,zr.y1-=Wr[1]*ht,zr.x2+=Wr[2]*ht,zr.y2+=Wr[3]*ht),or){let ia=new n(zr.x1,zr.y1),ha=new n(zr.x2,zr.y1),ja=new n(zr.x1,zr.y2),Ka=new n(zr.x2,zr.y2),Wi=or*Math.PI/180;ia._rotate(Wi),ha._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,ha.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,ha.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,ha.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,ha.y,ja.y,Ka.y)}D.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,pe,ke,je)}this.boxEndIndex=D.length}}class cd{constructor(D=[],J=(pe,ke)=>pe<ke?-1:pe>ke?1:0){if(this.data=D,this.length=this.data.length,this.compare=J,this.length>0)for(let pe=(this.length>>1)-1;pe>=0;pe--)this._down(pe)}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:pe}=this,ke=J[D];for(;D>0;){let je=D-1>>1,We=J[je];if(pe(ke,We)>=0)break;J[D]=We,D=je}J[D]=ke}_down(D){let{data:J,compare:pe}=this,ke=this.length>>1,je=J[D];for(;D<ke;){let We=1+(D<<1),ht=We+1;if(ht<this.length&&pe(J[ht],J[We])<0&&(We=ht),pe(J[We],je)>=0)break;J[D]=J[We],D=We}J[D]=je}}function aA(W,D=1,J=!1){let pe=1/0,ke=1/0,je=-1/0,We=-1/0,ht=W[0];for(let Wr=0;Wr<ht.length;Wr++){let ia=ht[Wr];(!Wr||ia.x<pe)&&(pe=ia.x),(!Wr||ia.y<ke)&&(ke=ia.y),(!Wr||ia.x>je)&&(je=ia.x),(!Wr||ia.y>We)&&(We=ia.y)}let Et=Math.min(je-pe,We-ke),Ut=Et/2,or=new cd([],iA);if(Et===0)return new n(pe,ke);for(let Wr=pe;Wr<je;Wr+=Et)for(let ia=ke;ia<We;ia+=Et)or.push(new dm(Wr+Ut,ia+Ut,Ut,W));let Mr=function(Wr){let ia=0,ha=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],Eo=en.x*qn.y-qn.x*en.y;ha+=(en.x+qn.x)*Eo,ja+=(en.y+qn.y)*Eo,ia+=3*Eo}return new dm(ha/ia,ja/ia,0,Wr)}(W),zr=or.length;for(;or.length;){let Wr=or.pop();(Wr.d>Mr.d||!Mr.d)&&(Mr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Mr.d<=D||(Ut=Wr.h/2,or.push(new dm(Wr.p.x-Ut,Wr.p.y-Ut,Ut,W)),or.push(new dm(Wr.p.x+Ut,Wr.p.y-Ut,Ut,W)),or.push(new dm(Wr.p.x-Ut,Wr.p.y+Ut,Ut,W)),or.push(new dm(Wr.p.x+Ut,Wr.p.y+Ut,Ut,W)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(W,D){return D.max-W.max}function dm(W,D,J,pe){this.p=new n(W,D),this.h=J,this.d=function(ke,je){let We=!1,ht=1/0;for(let Et=0;Et<je.length;Et++){let Ut=je[Et];for(let or=0,Mr=Ut.length,zr=Mr-1;or<Mr;zr=or++){let Wr=Ut[or],ia=Ut[zr];Wr.y>ke.y!=ia.y>ke.y&&ke.x<(ia.x-Wr.x)*(ke.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(We=!We),ht=Math.min(ht,_a(ke,Wr,ia))}}return(We?1:-1)*Math.sqrt(ht)}(this.p,pe),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,pe,ke){let je=0,We=0;switch(pe=Math.abs(pe),ke=Math.abs(ke),J){case"top-right":case"top-left":case"top":We=ke-pv;break;case"bottom-right":case"bottom-left":case"bottom":We=-ke+pv}switch(J){case"top-right":case"bottom-right":case"right":je=-pe;break;case"top-left":case"bottom-left":case"left":je=pe}return[je,We]}(W,D[0],D[1]):function(J,pe){let ke=0,je=0;pe<0&&(pe=0);let We=pe/Math.SQRT2;switch(J){case"top-right":case"top-left":je=We-pv;break;case"bottom-right":case"bottom-left":je=-We+pv;break;case"bottom":je=-pe+pv;break;case"top":je=pe-pv}switch(J){case"top-right":case"bottom-right":ke=-We;break;case"top-left":case"bottom-left":ke=We;break;case"left":ke=pe;break;case"right":ke=-pe}return[ke,je]}(W,D[0])}function tb(W,D,J){var pe;let ke=W.layout,je=(pe=ke.get("text-variable-anchor-offset"))===null||pe===void 0?void 0:pe.evaluate(D,{},J);if(je){let ht=je.values,Et=[];for(let Ut=0;Ut<ht.length;Ut+=2){let or=Et[Ut]=ht[Ut],Mr=ht[Ut+1].map(zr=>zr*fu);or.startsWith("top")?Mr[1]-=pv:or.startsWith("bottom")&&(Mr[1]+=pv),Et[Ut+1]=Mr}return new $a(Et)}let We=ke.get("text-variable-anchor");if(We){let ht;ht=W._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ke.get("text-radial-offset").evaluate(D,{},J)*fu,Fv]:ke.get("text-offset").evaluate(D,{},J).map(Ut=>Ut*fu);let Et=[];for(let Ut of We)Et.push(Ut,H1(Ut,ht));return new $a(Et)}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,pe,ke,je,We,ht,Et,Ut,or){let Mr=je.textMaxSize.evaluate(D,{});Mr===void 0&&(Mr=We);let zr=W.layers[0].layout,Wr=zr.get("icon-offset").evaluate(D,{},or),ia=ab(J.horizontal),ha=We/24,ja=W.tilePixelRatio*ha,Ka=W.tilePixelRatio*Mr/24,Wi=W.tilePixelRatio*ht,gi=W.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*W.tilePixelRatio,en=function(wn,os,Fo,Ls=1){let Ku=wn.get("icon-padding").evaluate(os,{},Fo),Uu=Ku&&Ku.values;return[Uu[0]*Ls,Uu[1]*Ls,Uu[2]*Ls,Uu[3]*Ls]}(zr,D,or,W.tilePixelRatio),qn=zr.get("text-max-angle")/180*Math.PI,Eo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",ys=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",mo=zr.get("symbol-placement"),zn=gi/2,ts=zr.get("icon-text-fit"),Uo;pe&&ts!=="none"&&(W.allowVerticalPlacement&&J.vertical&&(Uo=Ox(pe,J.vertical,ts,zr.get("icon-text-fit-padding"),Wr,ha)),ia&&(pe=Ox(pe,ia,ts,zr.get("icon-text-fit-padding"),Wr,ha)));let zo=(wn,os)=>{os.x<0||os.x>=vo||os.y<0||os.y>=vo||function(Fo,Ls,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=Fo.addToLineVertexArray(Ls,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,vp=0,mm=0,J1=-1,zg=-1,xd={},Ov=ti("");if(Fo.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},$c)+90;zc=new hv(Jh,Ls,$h,Qh,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv(Jh,Ls,$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,Ls,$h,Qh,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=Fo.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&f(`${Fo.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)&&f(`${Fo.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),Fo.addSymbols(Fo.icon,dv,id,hu,dp,fc,e.ah.none,Ls,_d.lineStartIndex,_d.lineLength,-1,$c),J1=Fo.icon.placedSymbolArray.length-1,ep&&(Zd=4*ep.length,Fo.addSymbols(Fo.icon,ep,id,hu,dp,fc,e.ah.vertical,Ls,_d.lineStartIndex,_d.lineLength,-1,$c),zg=Fo.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,Ls,$h,Qh,ff,Zp,ah,Fh,Ah,ep)}let dv=Zp.positionedLines.length===1;if(vp+=rb(Fo,Ls,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(Fo,Ls,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,$c));let lA=fd?fd.boxStartIndex:Fo.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:Fo.collisionBoxArray.length,bd=zc?zc.boxStartIndex:Fo.collisionBoxArray.length,mp=zc?zc.boxEndIndex:Fo.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:Fo.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:Fo.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:Fo.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:Fo.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),Fo.glyphOffsetArray.length>=cm.MAX_GLYPHS&&f("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),fc.sortKey!==void 0&&Fo.addToSortKeyRanges(Fo.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]}(Fo.textAnchorOffsets,$1);Fo.symbolInstances.emplaceBack(Ls.x,Ls.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,os,wn,J,pe,ke,Uo,W.layers[0],W.collisionBoxArray,D.index,D.sourceLayerIndex,W.index,ja,[qi,qi,qi,qi],Eo,Et,Wi,en,ys,Wr,D,je,Ut,or,We)};if(mo==="line")for(let wn of Zx(D.geometry,0,0,vo,vo)){let os=rA(wn,gi,qn,J.vertical||ia,pe,24,Ka,W.overscaling,vo);for(let Fo of os)ia&&oA(W,ia.text,zn,Fo)||zo(wn,Fo)}else if(mo==="line-center"){for(let wn of D.geometry)if(wn.length>1){let os=tA(wn,qn,J.vertical||ia,pe,24,Ka);os&&zo(wn,os)}}else if(D.type==="Polygon")for(let wn of Tc(D.geometry,0)){let os=aA(wn,16);zo(wn[0],new Wd(os.x,os.y,0))}else if(D.type==="LineString")for(let wn of D.geometry)zo(wn,new Wd(wn[0].x,wn[0].y,0));else if(D.type==="Point")for(let wn of D.geometry)for(let os of wn)zo([os],new Wd(os.x,os.y,0))}function rb(W,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia){let ha=function(Wi,gi,qi,en,qn,Eo,ys,mo){let zn=en.layout.get("text-rotate").evaluate(Eo,{})*Math.PI/180,ts=[];for(let Uo of gi.positionedLines)for(let zo of Uo.positionedGlyphs){if(!zo.rect)continue;let wn=zo.rect||{},os=Ix+1,Fo=!0,Ls=1,Ku=0,Uu=(qn||mo)&&zo.vertical,th=zo.metrics.advance*zo.scale/2;if(mo&&gi.verticalizable&&(Ku=Uo.lineOffset/2-(zo.imageName?-(fu-zo.metrics.width*zo.scale)/2:(zo.scale-1)*fu)),zo.imageName){let hu=ys[zo.imageName];Fo=hu.sdf,Ls=hu.pixelRatio,os=zh/Ls}let Hp=qn?[zo.x+th,zo.y]:[0,0],Th=qn?[0,0]:[zo.x+th+qi[0],zo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let Jh=zo.metrics.isDoubleResolution?2:1,$h=(zo.metrics.left-os)*zo.scale-th+Th[0],Qh=(-zo.metrics.top-os)*zo.scale+Th[1],ff=$h+wn.w/Jh*zo.scale/Ls,ah=Qh+wn.h/Jh*zo.scale/Ls,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,-(zo.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);ts.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:wn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:zo.sectionIndex,isSDF:Fo,pixelOffsetTL:Rp,pixelOffsetBR:dp,minFontScaleX:0,minFontScaleY:0})}return ts}(0,J,ht,ke,je,We,pe,W.allowVerticalPlacement),ja=W.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*ke.layout.get("text-size").evaluate(We,{})],Ka[0]>cv&&f(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(We,{},ia),yd*Wr.compositeTextSizes[1].evaluate(We,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&f(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),W.addSymbols(W.text,ha,Ka,ht,je,We,Ut,D,Et.lineStartIndex,Et.lineLength,zr,ia);for(let Wi of or)Mr[Wi]=W.text.placedSymbolArray.length-1;return 4*ha.length}function ab(W){for(let D in W)return W[D];return null}function oA(W,D,J,pe){let ke=W.compareText;if(D in ke){let je=ke[D];for(let We=je.length-1;We>=0;We--)if(pe.dist(je[We])<J)return!0}else ke[D]=[];return ke[D].push(pe),!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,pe]=new Uint8Array(D,0,2);if(J!==219)throw new Error("Data does not appear to be in a KDBush format.");let ke=pe>>4;if(ke!==1)throw new Error(`Got v${ke} data when expected v1.`);let je=ib[15&pe];if(!je)throw new Error("Unrecognized array type.");let[We]=new Uint16Array(D,2,1),[ht]=new Uint32Array(D,4,1);return new X1(ht,We,je,D)}constructor(D,J=64,pe=Float64Array,ke){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=pe,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let je=ib.indexOf(this.ArrayType),We=2*D*this.ArrayType.BYTES_PER_ELEMENT,ht=D*this.IndexArrayType.BYTES_PER_ELEMENT,Et=(8-ht%8)%8;if(je<0)throw new Error(`Unexpected typed array class: ${pe}.`);ke&&ke instanceof ArrayBuffer?(this.data=ke,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ht+Et,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+We+ht+Et),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ht+Et,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+je]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=D)}add(D,J){let pe=this._pos>>1;return this.ids[pe]=pe,this.coords[this._pos++]=D,this.coords[this._pos++]=J,pe}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,pe,ke){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:je,coords:We,nodeSize:ht}=this,Et=[0,je.length-1,0],Ut=[];for(;Et.length;){let or=Et.pop()||0,Mr=Et.pop()||0,zr=Et.pop()||0;if(Mr-zr<=ht){for(let ja=zr;ja<=Mr;ja++){let Ka=We[2*ja],Wi=We[2*ja+1];Ka>=D&&Ka<=pe&&Wi>=J&&Wi<=ke&&Ut.push(je[ja])}continue}let Wr=zr+Mr>>1,ia=We[2*Wr],ha=We[2*Wr+1];ia>=D&&ia<=pe&&ha>=J&&ha<=ke&&Ut.push(je[Wr]),(or===0?D<=ia:J<=ha)&&(Et.push(zr),Et.push(Wr-1),Et.push(1-or)),(or===0?pe>=ia:ke>=ha)&&(Et.push(Wr+1),Et.push(Mr),Et.push(1-or))}return Ut}within(D,J,pe){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ke,coords:je,nodeSize:We}=this,ht=[0,ke.length-1,0],Et=[],Ut=pe*pe;for(;ht.length;){let or=ht.pop()||0,Mr=ht.pop()||0,zr=ht.pop()||0;if(Mr-zr<=We){for(let ja=zr;ja<=Mr;ja++)ob(je[2*ja],je[2*ja+1],D,J)<=Ut&&Et.push(ke[ja]);continue}let Wr=zr+Mr>>1,ia=je[2*Wr],ha=je[2*Wr+1];ob(ia,ha,D,J)<=Ut&&Et.push(ke[Wr]),(or===0?D-pe<=ia:J-pe<=ha)&&(ht.push(zr),ht.push(Wr-1),ht.push(1-or)),(or===0?D+pe>=ia:J+pe>=ha)&&(ht.push(Wr+1),ht.push(Mr),ht.push(1-or))}return Et}}function Ig(W,D,J,pe,ke,je){if(ke-pe<=J)return;let We=pe+ke>>1;nb(W,D,We,pe,ke,je),Ig(W,D,J,pe,We-1,1-je),Ig(W,D,J,We+1,ke,1-je)}function nb(W,D,J,pe,ke,je){for(;ke>pe;){if(ke-pe>600){let Ut=ke-pe+1,or=J-pe+1,Mr=Math.log(Ut),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Ut-zr)/Ut)*(or-Ut/2<0?-1:1);nb(W,D,J,Math.max(pe,Math.floor(J-or*zr/Ut+Wr)),Math.min(ke,Math.floor(J+(Ut-or)*zr/Ut+Wr)),je)}let We=D[2*J+je],ht=pe,Et=ke;for(F0(W,D,pe,J),D[2*ke+je]>We&&F0(W,D,pe,ke);ht<Et;){for(F0(W,D,ht,Et),ht++,Et--;D[2*ht+je]<We;)ht++;for(;D[2*Et+je]>We;)Et--}D[2*pe+je]===We?F0(W,D,pe,Et):(Et++,F0(W,D,Et,ke)),Et<=J&&(pe=Et+1),J<=Et&&(ke=Et-1)}}function F0(W,D,J,pe){Z1(W,J,pe),Z1(D,2*J,2*pe),Z1(D,2*J+1,2*pe+1)}function Z1(W,D,J){let pe=W[D];W[D]=W[J],W[J]=pe}function ob(W,D,J,pe){let ke=W-J,je=D-pe;return ke*ke+je*je}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,pe=1/(Hf.reduce((je,We)=>je+We,0)/J/1e3),ke=Hf.filter(je=>je>Y1).reduce((je,We)=>je+(We-Y1)/Y1,0);return{loadTime:W,fullLoadTime:D,fps:pe,percentDroppedFrames:ke/(J+ke)*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=ho,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,pe,ke,je){return J.addEventListener(pe,ke,!1),{unsubscribe:()=>{J.removeEventListener(pe,ke,!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,pe)=>{let ke=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ke]={resolve:J,reject:pe},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[ke];let ht={id:ke,type:"<cancel>",origin:location.origin,targetMapId:W.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ht)},{once:!0});let je=[],We=Object.assign(Object.assign({},W),{id:ke,sourceMapId:this.mapId,origin:location.origin,data:eo(W.data,je)});this.target.postMessage(We,{transfer:je})})}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 pe=this.abortControllers[J];return delete this.abortControllers[J],void(pe&&pe.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 ke=this.resolveRejects[W];return delete this.resolveRejects[W],ke?void(D.error?ke.reject(fo(D.error)):ke.resolve(fo(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=fo(D.data),pe=new AbortController;this.abortControllers[W]=pe;try{let ke=yield this.messageHandlers[D.type](D.sourceMapId,J,pe);this.completeTask(W,null,ke)}catch(ke){this.completeTask(W,ke)}})}completeTask(W,D,J){let pe=[];delete this.abortControllers[W];let ke={id:W,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:D?eo(D):null,data:eo(J,pe)};this.target.postMessage(ke,{transfer:pe})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=le,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 pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha=J[0],ja=J[1],Ka=J[2];return D===W?(W[12]=D[0]*ha+D[4]*ja+D[8]*Ka+D[12],W[13]=D[1]*ha+D[5]*ja+D[9]*Ka+D[13],W[14]=D[2]*ha+D[6]*ja+D[10]*Ka+D[14],W[15]=D[3]*ha+D[7]*ja+D[11]*Ka+D[15]):(ke=D[1],je=D[2],We=D[3],ht=D[4],Et=D[5],Ut=D[6],or=D[7],Mr=D[8],zr=D[9],Wr=D[10],ia=D[11],W[0]=pe=D[0],W[1]=ke,W[2]=je,W[3]=We,W[4]=ht,W[5]=Et,W[6]=Ut,W[7]=or,W[8]=Mr,W[9]=zr,W[10]=Wr,W[11]=ia,W[12]=pe*ha+ht*ja+Mr*Ka+D[12],W[13]=ke*ha+Et*ja+zr*Ka+D[13],W[14]=je*ha+Ut*ja+Wr*Ka+D[14],W[15]=We*ha+or*ja+ia*Ka+D[15]),W},e.K=function(W,D,J){var pe=J[0],ke=J[1],je=J[2];return W[0]=D[0]*pe,W[1]=D[1]*pe,W[2]=D[2]*pe,W[3]=D[3]*pe,W[4]=D[4]*ke,W[5]=D[5]*ke,W[6]=D[6]*ke,W[7]=D[7]*ke,W[8]=D[8]*je,W[9]=D[9]*je,W[10]=D[10]*je,W[11]=D[11]*je,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 pe=0;pe<D.length;pe++){let ke=D[pe];ke in W&&(J[ke]=W[ke])}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=p,e.V=T,e.W=O,e.X=vo,e.Y=dt,e.Z=D0,e._=t,e.a=$,e.a$=function(W,D){var J=W[0],pe=W[1],ke=W[2],je=W[3],We=W[4],ht=W[5],Et=W[6],Ut=W[7],or=W[8],Mr=W[9],zr=W[10],Wr=W[11],ia=W[12],ha=W[13],ja=W[14],Ka=W[15],Wi=D[0],gi=D[1],qi=D[2],en=D[3],qn=D[4],Eo=D[5],ys=D[6],mo=D[7],zn=D[8],ts=D[9],Uo=D[10],zo=D[11],wn=D[12],os=D[13],Fo=D[14],Ls=D[15];return Math.abs(J-Wi)<=Ma*Math.max(1,Math.abs(J),Math.abs(Wi))&&Math.abs(pe-gi)<=Ma*Math.max(1,Math.abs(pe),Math.abs(gi))&&Math.abs(ke-qi)<=Ma*Math.max(1,Math.abs(ke),Math.abs(qi))&&Math.abs(je-en)<=Ma*Math.max(1,Math.abs(je),Math.abs(en))&&Math.abs(We-qn)<=Ma*Math.max(1,Math.abs(We),Math.abs(qn))&&Math.abs(ht-Eo)<=Ma*Math.max(1,Math.abs(ht),Math.abs(Eo))&&Math.abs(Et-ys)<=Ma*Math.max(1,Math.abs(Et),Math.abs(ys))&&Math.abs(Ut-mo)<=Ma*Math.max(1,Math.abs(Ut),Math.abs(mo))&&Math.abs(or-zn)<=Ma*Math.max(1,Math.abs(or),Math.abs(zn))&&Math.abs(Mr-ts)<=Ma*Math.max(1,Math.abs(Mr),Math.abs(ts))&&Math.abs(zr-Uo)<=Ma*Math.max(1,Math.abs(zr),Math.abs(Uo))&&Math.abs(Wr-zo)<=Ma*Math.max(1,Math.abs(Wr),Math.abs(zo))&&Math.abs(ia-wn)<=Ma*Math.max(1,Math.abs(ia),Math.abs(wn))&&Math.abs(ha-os)<=Ma*Math.max(1,Math.abs(ha),Math.abs(os))&&Math.abs(ja-Fo)<=Ma*Math.max(1,Math.abs(ja),Math.abs(Fo))&&Math.abs(Ka-Ls)<=Ma*Math.max(1,Math.abs(Ka),Math.abs(Ls))},e.a0=Mt,e.a1=q1,e.a2=ye,e.a3=W=>{let D=window.document.createElement("video");return D.muted=!0,new Promise(J=>{D.onloadstart=()=>{J(D)};for(let pe of W){let ke=window.document.createElement("source");ee(pe)||(D.crossOrigin="Anonymous"),ke.src=pe,D.appendChild(ke)}})},e.a4=function(){return g++},e.a5=nn,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 Ht(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(!Ae(W.version,D.version))return[{command:"setStyle",args:[D]}];Ae(W.center,D.center)||J.push({command:"setCenter",args:[D.center]}),Ae(W.zoom,D.zoom)||J.push({command:"setZoom",args:[D.zoom]}),Ae(W.bearing,D.bearing)||J.push({command:"setBearing",args:[D.bearing]}),Ae(W.pitch,D.pitch)||J.push({command:"setPitch",args:[D.pitch]}),Ae(W.sprite,D.sprite)||J.push({command:"setSprite",args:[D.sprite]}),Ae(W.glyphs,D.glyphs)||J.push({command:"setGlyphs",args:[D.glyphs]}),Ae(W.transition,D.transition)||J.push({command:"setTransition",args:[D.transition]}),Ae(W.light,D.light)||J.push({command:"setLight",args:[D.light]}),Ae(W.terrain,D.terrain)||J.push({command:"setTerrain",args:[D.terrain]}),Ae(W.sky,D.sky)||J.push({command:"setSky",args:[D.sky]}),Ae(W.projection,D.projection)||J.push({command:"setProjection",args:[D.projection]});let pe={},ke=[];(function(We,ht,Et,Ut){let or;for(or in ht=ht||{},We=We||{})Object.prototype.hasOwnProperty.call(We,or)&&(Object.prototype.hasOwnProperty.call(ht,or)||Ze(or,Et,Ut));for(or in ht)Object.prototype.hasOwnProperty.call(ht,or)&&(Object.prototype.hasOwnProperty.call(We,or)?Ae(We[or],ht[or])||(We[or].type==="geojson"&&ht[or].type==="geojson"&&nt(We,ht,or)?De(Et,{command:"setGeoJSONSourceData",args:[or,ht[or].data]}):at(or,ht,Et,Ut)):ze(or,ht,Et))})(W.sources,D.sources,ke,pe);let je=[];W.layers&&W.layers.forEach(We=>{"source"in We&&pe[We.source]?J.push({command:"removeLayer",args:[We.id]}):je.push(We)}),J=J.concat(ke),function(We,ht,Et){ht=ht||[];let Ut=(We=We||[]).map(st),or=ht.map(st),Mr=We.reduce(Me,{}),zr=ht.reduce(Me,{}),Wr=Ut.slice(),ia=Object.create(null),ha,ja,Ka,Wi,gi;for(let qi=0,en=0;qi<Ut.length;qi++)ha=Ut[qi],Object.prototype.hasOwnProperty.call(zr,ha)?en++:(De(Et,{command:"removeLayer",args:[ha]}),Wr.splice(Wr.indexOf(ha,en),1));for(let qi=0,en=0;qi<or.length;qi++)ha=or[or.length-1-qi],Wr[Wr.length-1-qi]!==ha&&(Object.prototype.hasOwnProperty.call(Mr,ha)?(De(Et,{command:"removeLayer",args:[ha]}),Wr.splice(Wr.lastIndexOf(ha,Wr.length-en),1)):en++,Wi=Wr[Wr.length-qi],De(Et,{command:"addLayer",args:[zr[ha],Wi]}),Wr.splice(Wr.length-qi,0,ha),ia[ha]=!0);for(let qi=0;qi<or.length;qi++)if(ha=or[qi],ja=Mr[ha],Ka=zr[ha],!ia[ha]&&!Ae(ja,Ka))if(Ae(ja.source,Ka.source)&&Ae(ja["source-layer"],Ka["source-layer"])&&Ae(ja.type,Ka.type)){for(gi in rt(ja.layout,Ka.layout,Et,ha,null,"setLayoutProperty"),rt(ja.paint,Ka.paint,Et,ha,null,"setPaintProperty"),Ae(ja.filter,Ka.filter)||De(Et,{command:"setFilter",args:[ha,Ka.filter]}),Ae(ja.minzoom,Ka.minzoom)&&Ae(ja.maxzoom,Ka.maxzoom)||De(Et,{command:"setLayerZoomRange",args:[ha,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?rt(ja[gi],Ka[gi],Et,ha,gi.slice(6),"setPaintProperty"):Ae(ja[gi],Ka[gi])||De(Et,{command:"setLayerProperty",args:[ha,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?rt(ja[gi],Ka[gi],Et,ha,gi.slice(6),"setPaintProperty"):Ae(ja[gi],Ka[gi])||De(Et,{command:"setLayerProperty",args:[ha,gi,Ka[gi]]}))}else De(Et,{command:"removeLayer",args:[ha]}),Wi=Wr[Wr.lastIndexOf(ha)+1],De(Et,{command:"addLayer",args:[Ka,Wi]})}(je,D.layers,J)}catch(pe){console.warn("Unable to compute style diff:",pe),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 pe=0;pe<D.length;pe++)if(!W(D[pe],J[pe]))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 pe in D)if(!W(D[pe],J[pe]))return!1;return!0}return D===J},e.aF=b,e.aG=d,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=vn}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,pe,ke,je,We){var ht=1/(D-J),Et=1/(pe-ke),Ut=1/(je-We);return W[0]=-2*ht,W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=-2*Et,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=2*Ut,W[11]=0,W[12]=(D+J)*ht,W[13]=(ke+pe)*Et,W[14]=(We+je)*Ut,W[15]=1,W},e.aQ=Li,e.aR=class extends zt{},e.aS=nv,e.aT=class extends yr{},e.aU=kn,e.aV=function(W){return W<=1?1:Math.pow(2,Math.ceil(Math.log(W)/Math.LN2))},e.aW=an,e.aX=Jo,e.aY=Fe,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,pe,ke,je)=>{let We=ke||je;return D[pe]=!We||We.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 pe in W)pe in D||J.push(pe);return J},e.ac=w,e.ad=function(W,D,J){var pe=Math.sin(J),ke=Math.cos(J),je=D[0],We=D[1],ht=D[2],Et=D[3],Ut=D[4],or=D[5],Mr=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]=je*ke+Ut*pe,W[1]=We*ke+or*pe,W[2]=ht*ke+Mr*pe,W[3]=Et*ke+zr*pe,W[4]=Ut*ke-je*pe,W[5]=or*ke-We*pe,W[6]=Mr*ke-ht*pe,W[7]=zr*ke-Et*pe,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=pn,e.ag=function(W,D){let J=0,pe=0;if(W.kind==="constant")pe=W.layoutSize;else if(W.kind!=="source"){let{interpolationType:ke,minZoom:je,maxZoom:We}=W,ht=ke?w(no.interpolationFactor(ke,D,je,We),0,1):0;W.kind==="camera"?pe=On.number(W.minSize,W.maxSize,ht):J=ht}return{uSizeT:J,uSize:pe}},e.ai=function(W,{uSize:D,uSizeT:J},{lowerSize:pe,upperSize:ke}){return W.kind==="source"?pe/yd:W.kind==="composite"?On.number(pe/yd,ke/yd,J):D},e.aj=z1,e.ak=function(W,D,J,pe){let ke=D.y-W.y,je=D.x-W.x,We=pe.y-J.y,ht=pe.x-J.x,Et=We*je-ht*ke;if(Et===0)return null;let Ut=(ht*(W.y-J.y)-We*(W.x-J.x))/Et;return new n(W.x+Ut*je,W.y+Ut*ke)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(W){let D=1/0,J=1/0,pe=-1/0,ke=-1/0;for(let je of W)D=Math.min(D,je.x),J=Math.min(J,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return[D,J,pe,ke]},e.ap=fu,e.ar=D1,e.as=function(W,D){var J=D[0],pe=D[1],ke=D[2],je=D[3],We=D[4],ht=D[5],Et=D[6],Ut=D[7],or=D[8],Mr=D[9],zr=D[10],Wr=D[11],ia=D[12],ha=D[13],ja=D[14],Ka=D[15],Wi=J*ht-pe*We,gi=J*Et-ke*We,qi=J*Ut-je*We,en=pe*Et-ke*ht,qn=pe*Ut-je*ht,Eo=ke*Ut-je*Et,ys=or*ha-Mr*ia,mo=or*ja-zr*ia,zn=or*Ka-Wr*ia,ts=Mr*ja-zr*ha,Uo=Mr*Ka-Wr*ha,zo=zr*Ka-Wr*ja,wn=Wi*zo-gi*Uo+qi*ts+en*zn-qn*mo+Eo*ys;return wn?(W[0]=(ht*zo-Et*Uo+Ut*ts)*(wn=1/wn),W[1]=(ke*Uo-pe*zo-je*ts)*wn,W[2]=(ha*Eo-ja*qn+Ka*en)*wn,W[3]=(zr*qn-Mr*Eo-Wr*en)*wn,W[4]=(Et*zn-We*zo-Ut*mo)*wn,W[5]=(J*zo-ke*zn+je*mo)*wn,W[6]=(ja*qi-ia*Eo-Ka*gi)*wn,W[7]=(or*Eo-zr*qi+Wr*gi)*wn,W[8]=(We*Uo-ht*zn+Ut*ys)*wn,W[9]=(pe*zn-J*Uo-je*ys)*wn,W[10]=(ia*qn-ha*qi+Ka*Wi)*wn,W[11]=(Mr*qi-or*qn-Wr*Wi)*wn,W[12]=(ht*mo-We*ts-Et*ys)*wn,W[13]=(J*ts-pe*mo+ke*ys)*wn,W[14]=(ha*gi-ia*en-ja*Wi)*wn,W[15]=(or*en-Mr*gi+zr*Wi)*wn,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 pe=re.$root[J];if(pe.required){let ke=null;ke=J==="version"?D:pe.type==="array"?[]:{},ke!=null&&(W[J]=ke)}}return W},e.ax=An,e.ay=V,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]=be(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,pe,ke){var je,We=1/Math.tan(D/2);return W[0]=We/J,W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=We,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=-1,W[12]=0,W[13]=0,W[15]=0,ke!=null&&ke!==1/0?(W[10]=(ke+pe)*(je=1/(pe-ke)),W[14]=2*ke*pe*je):(W[10]=-1,W[14]=-2*pe),W},e.b7=function(W,D,J){var pe=Math.sin(J),ke=Math.cos(J),je=D[4],We=D[5],ht=D[6],Et=D[7],Ut=D[8],or=D[9],Mr=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]=je*ke+Ut*pe,W[5]=We*ke+or*pe,W[6]=ht*ke+Mr*pe,W[7]=Et*ke+zr*pe,W[8]=Ut*ke-je*pe,W[9]=or*ke-We*pe,W[10]=Mr*ke-ht*pe,W[11]=zr*ke-Et*pe,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:pe}=D0.fromLngLat(D);return!(W<0||W>25||pe<0||pe>=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=fe,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 ke=0;ke<W.length;ke++){let je=D&&D[W[ke].id]||hh(W[ke]);D&&(D[W[ke].id]=je);let We=J[je];We||(We=J[je]=[]),We.push(W[ke])}let pe=[];for(let ke in J)pe.push(J[ke]);return pe},e.bl=mi,e.bm=Hx,e.bn=zv,e.bo=Tg,e.bp=function(W){W.bucket.createArrays(),W.bucket.tilePixelRatio=vo/(512*W.bucket.overscaling),W.bucket.compareText={},W.bucket.iconsNeedLinear=!1;let D=W.bucket.layers[0],J=D.layout,pe=D._unevaluatedLayout._values,ke={layoutIconSize:pe["icon-size"].possiblyEvaluate(new Rs(W.bucket.zoom+1),W.canonical),layoutTextSize:pe["text-size"].possiblyEvaluate(new Rs(W.bucket.zoom+1),W.canonical),textMaxSize:pe["text-size"].possiblyEvaluate(new Rs(18))};if(W.bucket.textSizeData.kind==="composite"){let{minZoom:Ut,maxZoom:or}=W.bucket.textSizeData;ke.compositeTextSizes=[pe["text-size"].possiblyEvaluate(new Rs(Ut),W.canonical),pe["text-size"].possiblyEvaluate(new Rs(or),W.canonical)]}if(W.bucket.iconSizeData.kind==="composite"){let{minZoom:Ut,maxZoom:or}=W.bucket.iconSizeData;ke.compositeIconSizes=[pe["icon-size"].possiblyEvaluate(new Rs(Ut),W.canonical),pe["icon-size"].possiblyEvaluate(new Rs(or),W.canonical)]}let je=J.get("text-line-height")*fu,We=J.get("text-rotation-alignment")!=="viewport"&&J.get("symbol-placement")!=="point",ht=J.get("text-keep-upright"),Et=J.get("text-size");for(let Ut of W.bucket.features){let or=J.get("text-font").evaluate(Ut,{},W.canonical).join(","),Mr=Et.evaluate(Ut,{},W.canonical),zr=ke.layoutTextSize.evaluate(Ut,{},W.canonical),Wr=ke.layoutIconSize.evaluate(Ut,{},W.canonical),ia={horizontal:{},vertical:void 0},ha=Ut.text,ja,Ka=[0,0];if(ha){let qi=ha.toString(),en=J.get("text-letter-spacing").evaluate(Ut,{},W.canonical)*fu,qn=Ko(qi)?en:0,Eo=J.get("text-anchor").evaluate(Ut,{},W.canonical),ys=tb(D,Ut,W.canonical);if(!ys){let Uo=J.get("text-radial-offset").evaluate(Ut,{},W.canonical);Ka=Uo?H1(Eo,[Uo*fu,Fv]):J.get("text-offset").evaluate(Ut,{},W.canonical).map(zo=>zo*fu)}let mo=We?"center":J.get("text-justify").evaluate(Ut,{},W.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Ut,{},W.canonical)*fu:1/0,ts=()=>{W.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(ha,W.glyphMap,W.glyphPositions,W.imagePositions,or,zn,je,Eo,"left",qn,Ka,e.ah.vertical,!0,zr,Mr))};if(!We&&ys){let Uo=new Set;if(mo==="auto")for(let wn=0;wn<ys.values.length;wn+=2)Uo.add(W1(ys.values[wn]));else Uo.add(mo);let zo=!1;for(let wn of Uo)if(!ia.horizontal[wn])if(zo)ia.horizontal[wn]=ia.horizontal[0];else{let os=M0(ha,W.glyphMap,W.glyphPositions,W.imagePositions,or,zn,je,"center",wn,qn,Ka,e.ah.horizontal,!1,zr,Mr);os&&(ia.horizontal[wn]=os,zo=os.positionedLines.length===1)}ts()}else{mo==="auto"&&(mo=W1(Eo));let Uo=M0(ha,W.glyphMap,W.glyphPositions,W.imagePositions,or,zn,je,Eo,mo,qn,Ka,e.ah.horizontal,!1,zr,Mr);Uo&&(ia.horizontal[mo]=Uo),ts(),yo(qi)&&We&&ht&&(ia.vertical=M0(ha,W.glyphMap,W.glyphPositions,W.imagePositions,or,zn,je,Eo,mo,qn,Ka,e.ah.vertical,!1,zr,Mr))}}let Wi=!1;if(Ut.icon&&Ut.icon.name){let qi=W.imageMap[Ut.icon.name];qi&&(ja=E0(W.imagePositions[Ut.icon.name],J.get("icon-offset").evaluate(Ut,{},W.canonical),J.get("icon-anchor").evaluate(Ut,{},W.canonical)),Wi=!!qi.sdf,W.bucket.sdfIcons===void 0?W.bucket.sdfIcons=Wi:W.bucket.sdfIcons!==Wi&&f("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,Ut,ia,ja,W.imageMap,ke,zr,Wr,Ka,Wi,W.canonical)}W.showCollisionBoxes&&W.bucket.generateCollisionDebugBuffers()},e.bq=Vp,e.br=hr,e.bs=Do,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,pe,ke){return t(this,void 0,void 0,function*(){if(T())try{return yield O(W,D,J,pe,ke)}catch{}return function(je,We,ht,Et,Ut){let or=je.width,Mr=je.height;P&&U||(P=new OffscreenCanvas(or,Mr),U=P.getContext("2d",{willReadFrequently:!0})),P.width=or,P.height=Mr,U.drawImage(je,0,0,or,Mr);let zr=U.getImageData(We,ht,Et,Ut);return U.clearRect(0,0,or,Mr),zr.data}(W,D,J,pe,ke)})},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 pe=new Image;pe.onload=()=>{D(pe),URL.revokeObjectURL(pe.src),pe.onload=null,window.requestAnimationFrame(()=>{pe.src=N})},pe.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 ke=new Blob([new Uint8Array(W)],{type:"image/png"});pe.src=W.byteLength?URL.createObjectURL(ke):N}),e.g=se,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=In,e.p=R1,e.q=Ue,e.r=Ci,e.s=ee,e.t=Pi,e.u=li,e.v=re,e.w=f,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=On,e.z=Rs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Ne){this.keyCache={},Ne&&this.replace(Ne)}replace(Ne){this._layerConfigs={},this._layers={},this.update(Ne,[])}update(Ne,Ke){for(let Ie of Ne){this._layerConfigs[Ie.id]=Ie;let Ve=this._layers[Ie.id]=e.aA(Ie);Ve._featureFilter=e.a7(Ve.filter),this.keyCache[Ie.id]&&delete this.keyCache[Ie.id]}for(let Ie of Ke)delete this.keyCache[Ie],delete this._layerConfigs[Ie],delete this._layers[Ie];this.familiesBySource={};let Te=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Ie of Te){let Ve=Ie.map(_t=>this._layers[_t.id]),Ce=Ve[0];if(Ce.visibility==="none")continue;let Ee=Ce.source||"",Pe=this.familiesBySource[Ee];Pe||(Pe=this.familiesBySource[Ee]={});let ft=Ce.sourceLayer||"_geojsonTileLayer",ct=Pe[ft];ct||(ct=Pe[ft]=[]),ct.push(Ve)}}}class r{constructor(Ne){let Ke={},Te=[];for(let Ee in Ne){let Pe=Ne[Ee],ft=Ke[Ee]={};for(let ct in Pe){let _t=Pe[+ct];if(!_t||_t.bitmap.width===0||_t.bitmap.height===0)continue;let Ct={x:0,y:0,w:_t.bitmap.width+2,h:_t.bitmap.height+2};Te.push(Ct),ft[ct]={rect:Ct,metrics:_t.metrics}}}let{w:Ie,h:Ve}=e.p(Te),Ce=new e.o({width:Ie||1,height:Ve||1});for(let Ee in Ne){let Pe=Ne[Ee];for(let ft in Pe){let ct=Pe[+ft];if(!ct||ct.bitmap.width===0||ct.bitmap.height===0)continue;let _t=Ke[Ee][ft].rect;e.o.copy(ct.bitmap,Ce,{x:0,y:0},{x:_t.x+1,y:_t.y+1},ct.bitmap)}}this.image=Ce,this.positions=Ke}}e.bl("GlyphAtlas",r);class o{constructor(Ne){this.tileID=new e.S(Ne.tileID.overscaledZ,Ne.tileID.wrap,Ne.tileID.canonical.z,Ne.tileID.canonical.x,Ne.tileID.canonical.y),this.uid=Ne.uid,this.zoom=Ne.zoom,this.pixelRatio=Ne.pixelRatio,this.tileSize=Ne.tileSize,this.source=Ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ne.showCollisionBoxes,this.collectResourceTiming=!!Ne.collectResourceTiming,this.returnDependencies=!!Ne.returnDependencies,this.promoteId=Ne.promoteId,this.inFlightDependencies=[]}parse(Ne,Ke,Te,Ie){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ne,this.collisionBoxArray=new e.a5;let Ve=new e.bm(Object.keys(Ne.layers).sort()),Ce=new e.bn(this.tileID,this.promoteId);Ce.bucketLayerIDs=[];let Ee={},Pe={featureIndex:Ce,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Te},ft=Ke.familiesBySource[this.source];for(let Wa in ft){let Ca=Ne.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=Ve.encode(Wa),wi=[];for(let Kt=0;Kt<Ca.length;Kt++){let Ft=Ca.feature(Kt),Yt=Ce.getId(Ft,Wa);wi.push({feature:Ft,id:Yt,index:Kt,sourceLayerIndex:hi})}for(let Kt of ft[Wa]){let Ft=Kt[0];Ft.source!==this.source&&e.w(`layer.source = ${Ft.source} does not equal this.source = ${this.source}`),Ft.minzoom&&this.zoom<Math.floor(Ft.minzoom)||Ft.maxzoom&&this.zoom>=Ft.maxzoom||Ft.visibility!=="none"&&(a(Kt,this.zoom,Te),(Ee[Ft.id]=Ft.createBucket({index:Ce.bucketLayerIDs.length,layers:Kt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,Pe,this.tileID.canonical),Ce.bucketLayerIDs.push(Kt.map(Yt=>Yt.id)))}}let ct=e.aF(Pe.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let _t=Promise.resolve({});if(Object.keys(ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),_t=Ie.sendAsync({type:"GG",data:{stacks:ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let Ct=Object.keys(Pe.iconDependencies),ir=Promise.resolve({});if(Ct.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),ir=Ie.sendAsync({type:"GI",data:{icons:Ct,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let rr=Object.keys(Pe.patternDependencies),er=Promise.resolve({});if(rr.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),er=Ie.sendAsync({type:"GI",data:{icons:rr,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Lr,fa,Da]=yield Promise.all([_t,ir,er]),Ia=new r(Lr),qa=new e.bo(fa,Da);for(let Wa in Ee){let Ca=Ee[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Te),e.bp({bucket:Ca,glyphMap:Lr,glyphPositions:Ia.positions,imageMap:fa,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,Te),Ca.addFeatures(Pe,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(Ee).filter(Wa=>!Wa.isEmpty()),featureIndex:Ce,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ia.image,imageAtlas:qa,glyphMap:this.returnDependencies?Lr:null,iconMap:this.returnDependencies?fa:null,glyphPositions:this.returnDependencies?Ia.positions:null}})}}function a(wt,Ne,Ke){let Te=new e.z(Ne);for(let Ie of wt)Ie.recalculate(Te,Ke)}class n{constructor(Ne,Ke,Te){this.actor=Ne,this.layerIndex=Ke,this.availableImages=Te,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ne,Ke){return e._(this,void 0,void 0,function*(){let Te=yield e.l(Ne.request,Ke);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Te.data)),rawData:Te.data,cacheControl:Te.cacheControl,expires:Te.expires}}catch(Ie){let Ve=new Uint8Array(Te.data),Ce=`Unable to parse the tile at ${Ne.request.url}, `;throw Ce+=Ve[0]===31&&Ve[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ie.message}`,new Error(Ce)}})}loadTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=Ne.uid,Te=!!(Ne&&Ne.request&&Ne.request.collectResourceTiming)&&new e.bv(Ne.request),Ie=new o(Ne);this.loading[Ke]=Ie;let Ve=new AbortController;Ie.abort=Ve;try{let Ce=yield this.loadVectorTile(Ne,Ve);if(delete this.loading[Ke],!Ce)return null;let Ee=Ce.rawData,Pe={};Ce.expires&&(Pe.expires=Ce.expires),Ce.cacheControl&&(Pe.cacheControl=Ce.cacheControl);let ft={};if(Te){let _t=Te.finish();_t&&(ft.resourceTiming=JSON.parse(JSON.stringify(_t)))}Ie.vectorTile=Ce.vectorTile;let ct=Ie.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ke]=Ie,this.fetching[Ke]={rawTileData:Ee,cacheControl:Pe,resourceTiming:ft};try{let _t=yield ct;return e.e({rawTileData:Ee.slice(0)},_t,Pe,ft)}finally{delete this.fetching[Ke]}}catch(Ce){throw delete this.loading[Ke],Ie.status="done",this.loaded[Ke]=Ie,Ce}})}reloadTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=Ne.uid;if(!this.loaded||!this.loaded[Ke])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Te=this.loaded[Ke];if(Te.showCollisionBoxes=Ne.showCollisionBoxes,Te.status==="parsing"){let Ie=yield Te.parse(Te.vectorTile,this.layerIndex,this.availableImages,this.actor),Ve;if(this.fetching[Ke]){let{rawTileData:Ce,cacheControl:Ee,resourceTiming:Pe}=this.fetching[Ke];delete this.fetching[Ke],Ve=e.e({rawTileData:Ce.slice(0)},Ie,Ee,Pe)}else Ve=Ie;return Ve}if(Te.status==="done"&&Te.vectorTile)return Te.parse(Te.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=this.loading,Te=Ne.uid;Ke&&Ke[Te]&&Ke[Te].abort&&(Ke[Te].abort.abort(),delete Ke[Te])})}removeTile(Ne){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ne.uid]&&delete this.loaded[Ne.uid]})}}class i{constructor(){this.loaded={}}loadTile(Ne){return e._(this,void 0,void 0,function*(){let{uid:Ke,encoding:Te,rawImageData:Ie,redFactor:Ve,greenFactor:Ce,blueFactor:Ee,baseShift:Pe}=Ne,ft=Ie.width+2,ct=Ie.height+2,_t=e.b(Ie)?new e.R({width:ft,height:ct},yield e.bw(Ie,-1,-1,ft,ct)):Ie,Ct=new e.bx(Ke,_t,Te,Ve,Ce,Ee,Pe);return this.loaded=this.loaded||{},this.loaded[Ke]=Ct,Ct})}removeTile(Ne){let Ke=this.loaded,Te=Ne.uid;Ke&&Ke[Te]&&delete Ke[Te]}}function s(wt,Ne){if(wt.length!==0){h(wt[0],Ne);for(var Ke=1;Ke<wt.length;Ke++)h(wt[Ke],!Ne)}}function h(wt,Ne){for(var Ke=0,Te=0,Ie=0,Ve=wt.length,Ce=Ve-1;Ie<Ve;Ce=Ie++){var Ee=(wt[Ie][0]-wt[Ce][0])*(wt[Ce][1]+wt[Ie][1]),Pe=Ke+Ee;Te+=Math.abs(Ke)>=Math.abs(Ee)?Ke-Pe+Ee:Ee-Pe+Ke,Ke=Pe}Ke+Te>=0!=!!Ne&&wt.reverse()}var c=e.by(function wt(Ne,Ke){var Te,Ie=Ne&&Ne.type;if(Ie==="FeatureCollection")for(Te=0;Te<Ne.features.length;Te++)wt(Ne.features[Te],Ke);else if(Ie==="GeometryCollection")for(Te=0;Te<Ne.geometries.length;Te++)wt(Ne.geometries[Te],Ke);else if(Ie==="Feature")wt(Ne.geometry,Ke);else if(Ie==="Polygon")s(Ne.coordinates,Ke);else if(Ie==="MultiPolygon")for(Te=0;Te<Ne.coordinates.length;Te++)s(Ne.coordinates[Te],Ke);return Ne});let m=e.bt.VectorTileFeature.prototype.toGeoJSON;var p={exports:{}},T=e.bz,l=e.bt.VectorTileFeature,_=w;function w(wt,Ne){this.options=Ne||{},this.features=wt,this.length=wt.length}function A(wt,Ne){this.id=typeof wt.id=="number"?wt.id:void 0,this.type=wt.type,this.rawGeometry=wt.type===1?[wt.geometry]:wt.geometry,this.properties=wt.tags,this.extent=Ne||4096}w.prototype.feature=function(wt){return new A(this.features[wt],this.options.extent)},A.prototype.loadGeometry=function(){var wt=this.rawGeometry;this.geometry=[];for(var Ne=0;Ne<wt.length;Ne++){for(var Ke=wt[Ne],Te=[],Ie=0;Ie<Ke.length;Ie++)Te.push(new T(Ke[Ie][0],Ke[Ie][1]));this.geometry.push(Te)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var wt=this.geometry,Ne=1/0,Ke=-1/0,Te=1/0,Ie=-1/0,Ve=0;Ve<wt.length;Ve++)for(var Ce=wt[Ve],Ee=0;Ee<Ce.length;Ee++){var Pe=Ce[Ee];Ne=Math.min(Ne,Pe.x),Ke=Math.max(Ke,Pe.x),Te=Math.min(Te,Pe.y),Ie=Math.max(Ie,Pe.y)}return[Ne,Te,Ke,Ie]},A.prototype.toGeoJSON=l.prototype.toGeoJSON;var M=e.bA,g=_;function b(wt){var Ne=new M;return function(Ke,Te){for(var Ie in Ke.layers)Te.writeMessage(3,d,Ke.layers[Ie])}(wt,Ne),Ne.finish()}function d(wt,Ne){var Ke;Ne.writeVarintField(15,wt.version||1),Ne.writeStringField(1,wt.name||""),Ne.writeVarintField(5,wt.extent||4096);var Te={keys:[],values:[],keycache:{},valuecache:{}};for(Ke=0;Ke<wt.length;Ke++)Te.feature=wt.feature(Ke),Ne.writeMessage(2,u,Te);var Ie=Te.keys;for(Ke=0;Ke<Ie.length;Ke++)Ne.writeStringField(3,Ie[Ke]);var Ve=Te.values;for(Ke=0;Ke<Ve.length;Ke++)Ne.writeMessage(4,z,Ve[Ke])}function u(wt,Ne){var Ke=wt.feature;Ke.id!==void 0&&Ne.writeVarintField(1,Ke.id),Ne.writeMessage(2,y,wt),Ne.writeVarintField(3,Ke.type),Ne.writeMessage(4,L,Ke)}function y(wt,Ne){var Ke=wt.feature,Te=wt.keys,Ie=wt.values,Ve=wt.keycache,Ce=wt.valuecache;for(var Ee in Ke.properties){var Pe=Ke.properties[Ee],ft=Ve[Ee];if(Pe!==null){ft===void 0&&(Te.push(Ee),Ve[Ee]=ft=Te.length-1),Ne.writeVarint(ft);var ct=typeof Pe;ct!=="string"&&ct!=="boolean"&&ct!=="number"&&(Pe=JSON.stringify(Pe));var _t=ct+":"+Pe,Ct=Ce[_t];Ct===void 0&&(Ie.push(Pe),Ce[_t]=Ct=Ie.length-1),Ne.writeVarint(Ct)}}}function f(wt,Ne){return(Ne<<3)+(7&wt)}function R(wt){return wt<<1^wt>>31}function L(wt,Ne){for(var Ke=wt.loadGeometry(),Te=wt.type,Ie=0,Ve=0,Ce=Ke.length,Ee=0;Ee<Ce;Ee++){var Pe=Ke[Ee],ft=1;Te===1&&(ft=Pe.length),Ne.writeVarint(f(1,ft));for(var ct=Te===3?Pe.length-1:Pe.length,_t=0;_t<ct;_t++){_t===1&&Te!==1&&Ne.writeVarint(f(2,ct-1));var Ct=Pe[_t].x-Ie,ir=Pe[_t].y-Ve;Ne.writeVarint(R(Ct)),Ne.writeVarint(R(ir)),Ie+=Ct,Ve+=ir}Te===3&&Ne.writeVarint(f(7,1))}}function z(wt,Ne){var Ke=typeof wt;Ke==="string"?Ne.writeStringField(1,wt):Ke==="boolean"?Ne.writeBooleanField(7,wt):Ke==="number"&&(wt%1!=0?Ne.writeDoubleField(3,wt):wt<0?Ne.writeSVarintField(6,wt):Ne.writeVarintField(5,wt))}p.exports=b,p.exports.fromVectorTileJs=b,p.exports.fromGeojsonVt=function(wt,Ne){Ne=Ne||{};var Ke={};for(var Te in wt)Ke[Te]=new g(wt[Te].features,Ne),Ke[Te].name=Te,Ke[Te].version=Ne.version,Ke[Te].extent=Ne.extent;return b({layers:Ke})},p.exports.GeoJSONWrapper=g;var F=e.by(p.exports);let N={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:wt=>wt},O=Math.fround||(P=new Float32Array(1),wt=>(P[0]=+wt,P[0]));var P;let U=3,B=5,X=6;class ${constructor(Ne){this.options=Object.assign(Object.create(N),Ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ne){let{log:Ke,minZoom:Te,maxZoom:Ie}=this.options;Ke&&console.time("total time");let Ve=`prepare ${Ne.length} points`;Ke&&console.time(Ve),this.points=Ne;let Ce=[];for(let Pe=0;Pe<Ne.length;Pe++){let ft=Ne[Pe];if(!ft.geometry)continue;let[ct,_t]=ft.geometry.coordinates,Ct=O(fe(ct)),ir=O(V(_t));Ce.push(Ct,ir,1/0,Pe,-1,1),this.options.reduce&&Ce.push(0)}let Ee=this.trees[Ie+1]=this._createTree(Ce);Ke&&console.timeEnd(Ve);for(let Pe=Ie;Pe>=Te;Pe--){let ft=+Date.now();Ee=this.trees[Pe]=this._createTree(this._cluster(Ee,Pe)),Ke&&console.log("z%d: %d clusters in %dms",Pe,Ee.numItems,+Date.now()-ft)}return Ke&&console.timeEnd("total time"),this}getClusters(Ne,Ke){let Te=((Ne[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ne[1])),Ve=Ne[2]===180?180:((Ne[2]+180)%360+360)%360-180,Ce=Math.max(-90,Math.min(90,Ne[3]));if(Ne[2]-Ne[0]>=360)Te=-180,Ve=180;else if(Te>Ve){let _t=this.getClusters([Te,Ie,180,Ce],Ke),Ct=this.getClusters([-180,Ie,Ve,Ce],Ke);return _t.concat(Ct)}let Ee=this.trees[this._limitZoom(Ke)],Pe=Ee.range(fe(Te),V(Ce),fe(Ve),V(Ie)),ft=Ee.data,ct=[];for(let _t of Pe){let Ct=this.stride*_t;ct.push(ft[Ct+B]>1?se(ft,Ct,this.clusterProps):this.points[ft[Ct+U]])}return ct}getChildren(Ne){let Ke=this._getOriginId(Ne),Te=this._getOriginZoom(Ne),Ie="No cluster with the specified id.",Ve=this.trees[Te];if(!Ve)throw new Error(Ie);let Ce=Ve.data;if(Ke*this.stride>=Ce.length)throw new Error(Ie);let Ee=this.options.radius/(this.options.extent*Math.pow(2,Te-1)),Pe=Ve.within(Ce[Ke*this.stride],Ce[Ke*this.stride+1],Ee),ft=[];for(let ct of Pe){let _t=ct*this.stride;Ce[_t+4]===Ne&&ft.push(Ce[_t+B]>1?se(Ce,_t,this.clusterProps):this.points[Ce[_t+U]])}if(ft.length===0)throw new Error(Ie);return ft}getLeaves(Ne,Ke,Te){let Ie=[];return this._appendLeaves(Ie,Ne,Ke=Ke||10,Te=Te||0,0),Ie}getTile(Ne,Ke,Te){let Ie=this.trees[this._limitZoom(Ne)],Ve=Math.pow(2,Ne),{extent:Ce,radius:Ee}=this.options,Pe=Ee/Ce,ft=(Te-Pe)/Ve,ct=(Te+1+Pe)/Ve,_t={features:[]};return this._addTileFeatures(Ie.range((Ke-Pe)/Ve,ft,(Ke+1+Pe)/Ve,ct),Ie.data,Ke,Te,Ve,_t),Ke===0&&this._addTileFeatures(Ie.range(1-Pe/Ve,ft,1,ct),Ie.data,Ve,Te,Ve,_t),Ke===Ve-1&&this._addTileFeatures(Ie.range(0,ft,Pe/Ve,ct),Ie.data,-1,Te,Ve,_t),_t.features.length?_t:null}getClusterExpansionZoom(Ne){let Ke=this._getOriginZoom(Ne)-1;for(;Ke<=this.options.maxZoom;){let Te=this.getChildren(Ne);if(Ke++,Te.length!==1)break;Ne=Te[0].properties.cluster_id}return Ke}_appendLeaves(Ne,Ke,Te,Ie,Ve){let Ce=this.getChildren(Ke);for(let Ee of Ce){let Pe=Ee.properties;if(Pe&&Pe.cluster?Ve+Pe.point_count<=Ie?Ve+=Pe.point_count:Ve=this._appendLeaves(Ne,Pe.cluster_id,Te,Ie,Ve):Ve<Ie?Ve++:Ne.push(Ee),Ne.length===Te)break}return Ve}_createTree(Ne){let Ke=new e.av(Ne.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Te=0;Te<Ne.length;Te+=this.stride)Ke.add(Ne[Te],Ne[Te+1]);return Ke.finish(),Ke.data=Ne,Ke}_addTileFeatures(Ne,Ke,Te,Ie,Ve,Ce){for(let Ee of Ne){let Pe=Ee*this.stride,ft=Ke[Pe+B]>1,ct,_t,Ct;if(ft)ct=le(Ke,Pe,this.clusterProps),_t=Ke[Pe],Ct=Ke[Pe+1];else{let er=this.points[Ke[Pe+U]];ct=er.properties;let[Lr,fa]=er.geometry.coordinates;_t=fe(Lr),Ct=V(fa)}let ir={type:1,geometry:[[Math.round(this.options.extent*(_t*Ve-Te)),Math.round(this.options.extent*(Ct*Ve-Ie))]],tags:ct},rr;rr=ft||this.options.generateId?Ke[Pe+U]:this.points[Ke[Pe+U]].id,rr!==void 0&&(ir.id=rr),Ce.features.push(ir)}}_limitZoom(Ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ne),this.options.maxZoom+1))}_cluster(Ne,Ke){let{radius:Te,extent:Ie,reduce:Ve,minPoints:Ce}=this.options,Ee=Te/(Ie*Math.pow(2,Ke)),Pe=Ne.data,ft=[],ct=this.stride;for(let _t=0;_t<Pe.length;_t+=ct){if(Pe[_t+2]<=Ke)continue;Pe[_t+2]=Ke;let Ct=Pe[_t],ir=Pe[_t+1],rr=Ne.within(Pe[_t],Pe[_t+1],Ee),er=Pe[_t+B],Lr=er;for(let fa of rr){let Da=fa*ct;Pe[Da+2]>Ke&&(Lr+=Pe[Da+B])}if(Lr>er&&Lr>=Ce){let fa,Da=Ct*er,Ia=ir*er,qa=-1,Wa=((_t/ct|0)<<5)+(Ke+1)+this.points.length;for(let Ca of rr){let hi=Ca*ct;if(Pe[hi+2]<=Ke)continue;Pe[hi+2]=Ke;let wi=Pe[hi+B];Da+=Pe[hi]*wi,Ia+=Pe[hi+1]*wi,Pe[hi+4]=Wa,Ve&&(fa||(fa=this._map(Pe,_t,!0),qa=this.clusterProps.length,this.clusterProps.push(fa)),Ve(fa,this._map(Pe,hi)))}Pe[_t+4]=Wa,ft.push(Da/Lr,Ia/Lr,1/0,Wa,-1,Lr),Ve&&ft.push(qa)}else{for(let fa=0;fa<ct;fa++)ft.push(Pe[_t+fa]);if(Lr>1)for(let fa of rr){let Da=fa*ct;if(!(Pe[Da+2]<=Ke)){Pe[Da+2]=Ke;for(let Ia=0;Ia<ct;Ia++)ft.push(Pe[Da+Ia])}}}}return ft}_getOriginId(Ne){return Ne-this.points.length>>5}_getOriginZoom(Ne){return(Ne-this.points.length)%32}_map(Ne,Ke,Te){if(Ne[Ke+B]>1){let Ce=this.clusterProps[Ne[Ke+X]];return Te?Object.assign({},Ce):Ce}let Ie=this.points[Ne[Ke+U]].properties,Ve=this.options.map(Ie);return Te&&Ve===Ie?Object.assign({},Ve):Ve}}function se(wt,Ne,Ke){return{type:"Feature",id:wt[Ne+U],properties:le(wt,Ne,Ke),geometry:{type:"Point",coordinates:[(Te=wt[Ne],360*(Te-.5)),Y(wt[Ne+1])]}};var Te}function le(wt,Ne,Ke){let Te=wt[Ne+B],Ie=Te>=1e4?`${Math.round(Te/1e3)}k`:Te>=1e3?Math.round(Te/100)/10+"k":Te,Ve=wt[Ne+X],Ce=Ve===-1?{}:Object.assign({},Ke[Ve]);return Object.assign(Ce,{cluster:!0,cluster_id:wt[Ne+U],point_count:Te,point_count_abbreviated:Ie})}function fe(wt){return wt/360+.5}function V(wt){let Ne=Math.sin(wt*Math.PI/180),Ke=.5-.25*Math.log((1+Ne)/(1-Ne))/Math.PI;return Ke<0?0:Ke>1?1:Ke}function Y(wt){let Ne=(180-360*wt)*Math.PI/180;return 360*Math.atan(Math.exp(Ne))/Math.PI-90}function ee(wt,Ne,Ke,Te){let Ie=Te,Ve=Ne+(Ke-Ne>>1),Ce,Ee=Ke-Ne,Pe=wt[Ne],ft=wt[Ne+1],ct=wt[Ke],_t=wt[Ke+1];for(let Ct=Ne+3;Ct<Ke;Ct+=3){let ir=q(wt[Ct],wt[Ct+1],Pe,ft,ct,_t);if(ir>Ie)Ce=Ct,Ie=ir;else if(ir===Ie){let rr=Math.abs(Ct-Ve);rr<Ee&&(Ce=Ct,Ee=rr)}}Ie>Te&&(Ce-Ne>3&&ee(wt,Ne,Ce,Te),wt[Ce+2]=Ie,Ke-Ce>3&&ee(wt,Ce,Ke,Te))}function q(wt,Ne,Ke,Te,Ie,Ve){let Ce=Ie-Ke,Ee=Ve-Te;if(Ce!==0||Ee!==0){let Pe=((wt-Ke)*Ce+(Ne-Te)*Ee)/(Ce*Ce+Ee*Ee);Pe>1?(Ke=Ie,Te=Ve):Pe>0&&(Ke+=Ce*Pe,Te+=Ee*Pe)}return Ce=wt-Ke,Ee=Ne-Te,Ce*Ce+Ee*Ee}function oe(wt,Ne,Ke,Te){let Ie={id:wt??null,type:Ne,geometry:Ke,tags:Te,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ne==="Point"||Ne==="MultiPoint"||Ne==="LineString")ae(Ie,Ke);else if(Ne==="Polygon")ae(Ie,Ke[0]);else if(Ne==="MultiLineString")for(let Ve of Ke)ae(Ie,Ve);else if(Ne==="MultiPolygon")for(let Ve of Ke)ae(Ie,Ve[0]);return Ie}function ae(wt,Ne){for(let Ke=0;Ke<Ne.length;Ke+=3)wt.minX=Math.min(wt.minX,Ne[Ke]),wt.minY=Math.min(wt.minY,Ne[Ke+1]),wt.maxX=Math.max(wt.maxX,Ne[Ke]),wt.maxY=Math.max(wt.maxY,Ne[Ke+1])}function j(wt,Ne,Ke,Te){if(!Ne.geometry)return;let Ie=Ne.geometry.coordinates;if(Ie&&Ie.length===0)return;let Ve=Ne.geometry.type,Ce=Math.pow(Ke.tolerance/((1<<Ke.maxZoom)*Ke.extent),2),Ee=[],Pe=Ne.id;if(Ke.promoteId?Pe=Ne.properties[Ke.promoteId]:Ke.generateId&&(Pe=Te||0),Ve==="Point")Q(Ie,Ee);else if(Ve==="MultiPoint")for(let ft of Ie)Q(ft,Ee);else if(Ve==="LineString")re(Ie,Ee,Ce,!1);else if(Ve==="MultiLineString"){if(Ke.lineMetrics){for(let ft of Ie)Ee=[],re(ft,Ee,Ce,!1),wt.push(oe(Pe,"LineString",Ee,Ne.properties));return}ce(Ie,Ee,Ce,!1)}else if(Ve==="Polygon")ce(Ie,Ee,Ce,!0);else{if(Ve!=="MultiPolygon"){if(Ve==="GeometryCollection"){for(let ft of Ne.geometry.geometries)j(wt,{id:Pe,geometry:ft,properties:Ne.properties},Ke,Te);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let ft of Ie){let ct=[];ce(ft,ct,Ce,!0),Ee.push(ct)}}wt.push(oe(Pe,Ve,Ee,Ne.properties))}function Q(wt,Ne){Ne.push(be(wt[0]),Ae(wt[1]),0)}function re(wt,Ne,Ke,Te){let Ie,Ve,Ce=0;for(let Pe=0;Pe<wt.length;Pe++){let ft=be(wt[Pe][0]),ct=Ae(wt[Pe][1]);Ne.push(ft,ct,0),Pe>0&&(Ce+=Te?(Ie*ct-ft*Ve)/2:Math.sqrt(Math.pow(ft-Ie,2)+Math.pow(ct-Ve,2))),Ie=ft,Ve=ct}let Ee=Ne.length-3;Ne[2]=1,ee(Ne,0,Ee,Ke),Ne[Ee+2]=1,Ne.size=Math.abs(Ce),Ne.start=0,Ne.end=Ne.size}function ce(wt,Ne,Ke,Te){for(let Ie=0;Ie<wt.length;Ie++){let Ve=[];re(wt[Ie],Ve,Ke,Te),Ne.push(Ve)}}function be(wt){return wt/360+.5}function Ae(wt){let Ne=Math.sin(wt*Math.PI/180),Ke=.5-.25*Math.log((1+Ne)/(1-Ne))/Math.PI;return Ke<0?0:Ke>1?1:Ke}function De(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee){if(Te/=Ne,Ve>=(Ke/=Ne)&&Ce<Te)return wt;if(Ce<Ke||Ve>=Te)return null;let Pe=[];for(let ft of wt){let ct=ft.geometry,_t=ft.type,Ct=Ie===0?ft.minX:ft.minY,ir=Ie===0?ft.maxX:ft.maxY;if(Ct>=Ke&&ir<Te){Pe.push(ft);continue}if(ir<Ke||Ct>=Te)continue;let rr=[];if(_t==="Point"||_t==="MultiPoint")ze(ct,rr,Ke,Te,Ie);else if(_t==="LineString")Ze(ct,rr,Ke,Te,Ie,!1,Ee.lineMetrics);else if(_t==="MultiLineString")nt(ct,rr,Ke,Te,Ie,!1);else if(_t==="Polygon")nt(ct,rr,Ke,Te,Ie,!0);else if(_t==="MultiPolygon")for(let er of ct){let Lr=[];nt(er,Lr,Ke,Te,Ie,!0),Lr.length&&rr.push(Lr)}if(rr.length){if(Ee.lineMetrics&&_t==="LineString"){for(let er of rr)Pe.push(oe(ft.id,_t,er,ft.tags));continue}_t!=="LineString"&&_t!=="MultiLineString"||(rr.length===1?(_t="LineString",rr=rr[0]):_t="MultiLineString"),_t!=="Point"&&_t!=="MultiPoint"||(_t=rr.length===3?"Point":"MultiPoint"),Pe.push(oe(ft.id,_t,rr,ft.tags))}}return Pe.length?Pe:null}function ze(wt,Ne,Ke,Te,Ie){for(let Ve=0;Ve<wt.length;Ve+=3){let Ce=wt[Ve+Ie];Ce>=Ke&&Ce<=Te&&rt(Ne,wt[Ve],wt[Ve+1],wt[Ve+2])}}function Ze(wt,Ne,Ke,Te,Ie,Ve,Ce){let Ee=at(wt),Pe=Ie===0?st:Me,ft,ct,_t=wt.start;for(let Lr=0;Lr<wt.length-3;Lr+=3){let fa=wt[Lr],Da=wt[Lr+1],Ia=wt[Lr+2],qa=wt[Lr+3],Wa=wt[Lr+4],Ca=Ie===0?fa:Da,hi=Ie===0?qa:Wa,wi=!1;Ce&&(ft=Math.sqrt(Math.pow(fa-qa,2)+Math.pow(Da-Wa,2))),Ca<Ke?hi>Ke&&(ct=Pe(Ee,fa,Da,qa,Wa,Ke),Ce&&(Ee.start=_t+ft*ct)):Ca>Te?hi<Te&&(ct=Pe(Ee,fa,Da,qa,Wa,Te),Ce&&(Ee.start=_t+ft*ct)):rt(Ee,fa,Da,Ia),hi<Ke&&Ca>=Ke&&(ct=Pe(Ee,fa,Da,qa,Wa,Ke),wi=!0),hi>Te&&Ca<=Te&&(ct=Pe(Ee,fa,Da,qa,Wa,Te),wi=!0),!Ve&&wi&&(Ce&&(Ee.end=_t+ft*ct),Ne.push(Ee),Ee=at(wt)),Ce&&(_t+=ft)}let Ct=wt.length-3,ir=wt[Ct],rr=wt[Ct+1],er=Ie===0?ir:rr;er>=Ke&&er<=Te&&rt(Ee,ir,rr,wt[Ct+2]),Ct=Ee.length-3,Ve&&Ct>=3&&(Ee[Ct]!==Ee[0]||Ee[Ct+1]!==Ee[1])&&rt(Ee,Ee[0],Ee[1],Ee[2]),Ee.length&&Ne.push(Ee)}function at(wt){let Ne=[];return Ne.size=wt.size,Ne.start=wt.start,Ne.end=wt.end,Ne}function nt(wt,Ne,Ke,Te,Ie,Ve){for(let Ce of wt)Ze(Ce,Ne,Ke,Te,Ie,Ve,!1)}function rt(wt,Ne,Ke,Te){wt.push(Ne,Ke,Te)}function st(wt,Ne,Ke,Te,Ie,Ve){let Ce=(Ve-Ne)/(Te-Ne);return rt(wt,Ve,Ke+(Ie-Ke)*Ce,1),Ce}function Me(wt,Ne,Ke,Te,Ie,Ve){let Ce=(Ve-Ke)/(Ie-Ke);return rt(wt,Ne+(Te-Ne)*Ce,Ve,1),Ce}function ye(wt,Ne){let Ke=[];for(let Te=0;Te<wt.length;Te++){let Ie=wt[Te],Ve=Ie.type,Ce;if(Ve==="Point"||Ve==="MultiPoint"||Ve==="LineString")Ce=he(Ie.geometry,Ne);else if(Ve==="MultiLineString"||Ve==="Polygon"){Ce=[];for(let Ee of Ie.geometry)Ce.push(he(Ee,Ne))}else if(Ve==="MultiPolygon"){Ce=[];for(let Ee of Ie.geometry){let Pe=[];for(let ft of Ee)Pe.push(he(ft,Ne));Ce.push(Pe)}}Ke.push(oe(Ie.id,Ve,Ce,Ie.tags))}return Ke}function he(wt,Ne){let Ke=[];Ke.size=wt.size,wt.start!==void 0&&(Ke.start=wt.start,Ke.end=wt.end);for(let Te=0;Te<wt.length;Te+=3)Ke.push(wt[Te]+Ne,wt[Te+1],wt[Te+2]);return Ke}function Oe(wt,Ne){if(wt.transformed)return wt;let Ke=1<<wt.z,Te=wt.x,Ie=wt.y;for(let Ve of wt.features){let Ce=Ve.geometry,Ee=Ve.type;if(Ve.geometry=[],Ee===1)for(let Pe=0;Pe<Ce.length;Pe+=2)Ve.geometry.push(tt(Ce[Pe],Ce[Pe+1],Ne,Ke,Te,Ie));else for(let Pe=0;Pe<Ce.length;Pe++){let ft=[];for(let ct=0;ct<Ce[Pe].length;ct+=2)ft.push(tt(Ce[Pe][ct],Ce[Pe][ct+1],Ne,Ke,Te,Ie));Ve.geometry.push(ft)}}return wt.transformed=!0,wt}function tt(wt,Ne,Ke,Te,Ie,Ve){return[Math.round(Ke*(wt*Te-Ie)),Math.round(Ke*(Ne*Te-Ve))]}function ot(wt,Ne,Ke,Te,Ie){let Ve=Ne===Ie.maxZoom?0:Ie.tolerance/((1<<Ne)*Ie.extent),Ce={features:[],numPoints:0,numSimplified:0,numFeatures:wt.length,source:null,x:Ke,y:Te,z:Ne,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let Ee of wt)Qe(Ce,Ee,Ve,Ie);return Ce}function Qe(wt,Ne,Ke,Te){let Ie=Ne.geometry,Ve=Ne.type,Ce=[];if(wt.minX=Math.min(wt.minX,Ne.minX),wt.minY=Math.min(wt.minY,Ne.minY),wt.maxX=Math.max(wt.maxX,Ne.maxX),wt.maxY=Math.max(wt.maxY,Ne.maxY),Ve==="Point"||Ve==="MultiPoint")for(let Ee=0;Ee<Ie.length;Ee+=3)Ce.push(Ie[Ee],Ie[Ee+1]),wt.numPoints++,wt.numSimplified++;else if(Ve==="LineString")Pt(Ce,Ie,wt,Ke,!1,!1);else if(Ve==="MultiLineString"||Ve==="Polygon")for(let Ee=0;Ee<Ie.length;Ee++)Pt(Ce,Ie[Ee],wt,Ke,Ve==="Polygon",Ee===0);else if(Ve==="MultiPolygon")for(let Ee=0;Ee<Ie.length;Ee++){let Pe=Ie[Ee];for(let ft=0;ft<Pe.length;ft++)Pt(Ce,Pe[ft],wt,Ke,!0,ft===0)}if(Ce.length){let Ee=Ne.tags||null;if(Ve==="LineString"&&Te.lineMetrics){Ee={};for(let ft in Ne.tags)Ee[ft]=Ne.tags[ft];Ee.mapbox_clip_start=Ie.start/Ie.size,Ee.mapbox_clip_end=Ie.end/Ie.size}let Pe={geometry:Ce,type:Ve==="Polygon"||Ve==="MultiPolygon"?3:Ve==="LineString"||Ve==="MultiLineString"?2:1,tags:Ee};Ne.id!==null&&(Pe.id=Ne.id),wt.features.push(Pe)}}function Pt(wt,Ne,Ke,Te,Ie,Ve){let Ce=Te*Te;if(Te>0&&Ne.size<(Ie?Ce:Te))return void(Ke.numPoints+=Ne.length/3);let Ee=[];for(let Pe=0;Pe<Ne.length;Pe+=3)(Te===0||Ne[Pe+2]>Ce)&&(Ke.numSimplified++,Ee.push(Ne[Pe],Ne[Pe+1])),Ke.numPoints++;Ie&&function(Pe,ft){let ct=0;for(let _t=0,Ct=Pe.length,ir=Ct-2;_t<Ct;ir=_t,_t+=2)ct+=(Pe[_t]-Pe[ir])*(Pe[_t+1]+Pe[ir+1]);if(ct>0===ft)for(let _t=0,Ct=Pe.length;_t<Ct/2;_t+=2){let ir=Pe[_t],rr=Pe[_t+1];Pe[_t]=Pe[Ct-2-_t],Pe[_t+1]=Pe[Ct-1-_t],Pe[Ct-2-_t]=ir,Pe[Ct-1-_t]=rr}}(Ee,Ve),wt.push(Ee)}let It={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class qt{constructor(Ne,Ke){let Te=(Ke=this.options=function(Ve,Ce){for(let Ee in Ce)Ve[Ee]=Ce[Ee];return Ve}(Object.create(It),Ke)).debug;if(Te&&console.time("preprocess data"),Ke.maxZoom<0||Ke.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ie=function(Ve,Ce){let Ee=[];if(Ve.type==="FeatureCollection")for(let Pe=0;Pe<Ve.features.length;Pe++)j(Ee,Ve.features[Pe],Ce,Pe);else j(Ee,Ve.type==="Feature"?Ve:{geometry:Ve},Ce);return Ee}(Ne,Ke);this.tiles={},this.tileCoords=[],Te&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ke.indexMaxZoom,Ke.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ie=function(Ve,Ce){let Ee=Ce.buffer/Ce.extent,Pe=Ve,ft=De(Ve,1,-1-Ee,Ee,0,-1,2,Ce),ct=De(Ve,1,1-Ee,2+Ee,0,-1,2,Ce);return(ft||ct)&&(Pe=De(Ve,1,-Ee,1+Ee,0,-1,2,Ce)||[],ft&&(Pe=ye(ft,1).concat(Pe)),ct&&(Pe=Pe.concat(ye(ct,-1)))),Pe}(Ie,Ke),Ie.length&&this.splitTile(Ie,0,0,0),Te&&(Ie.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(Ne,Ke,Te,Ie,Ve,Ce,Ee){let Pe=[Ne,Ke,Te,Ie],ft=this.options,ct=ft.debug;for(;Pe.length;){Ie=Pe.pop(),Te=Pe.pop(),Ke=Pe.pop(),Ne=Pe.pop();let _t=1<<Ke,Ct=Wt(Ke,Te,Ie),ir=this.tiles[Ct];if(!ir&&(ct>1&&console.time("creation"),ir=this.tiles[Ct]=ot(Ne,Ke,Te,Ie,ft),this.tileCoords.push({z:Ke,x:Te,y:Ie}),ct)){ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Te,Ie,ir.numFeatures,ir.numPoints,ir.numSimplified),console.timeEnd("creation"));let wi=`z${Ke}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(ir.source=Ne,Ve==null){if(Ke===ft.indexMaxZoom||ir.numPoints<=ft.indexMaxPoints)continue}else{if(Ke===ft.maxZoom||Ke===Ve)continue;if(Ve!=null){let wi=Ve-Ke;if(Te!==Ce>>wi||Ie!==Ee>>wi)continue}}if(ir.source=null,Ne.length===0)continue;ct>1&&console.time("clipping");let rr=.5*ft.buffer/ft.extent,er=.5-rr,Lr=.5+rr,fa=1+rr,Da=null,Ia=null,qa=null,Wa=null,Ca=De(Ne,_t,Te-rr,Te+Lr,0,ir.minX,ir.maxX,ft),hi=De(Ne,_t,Te+er,Te+fa,0,ir.minX,ir.maxX,ft);Ne=null,Ca&&(Da=De(Ca,_t,Ie-rr,Ie+Lr,1,ir.minY,ir.maxY,ft),Ia=De(Ca,_t,Ie+er,Ie+fa,1,ir.minY,ir.maxY,ft),Ca=null),hi&&(qa=De(hi,_t,Ie-rr,Ie+Lr,1,ir.minY,ir.maxY,ft),Wa=De(hi,_t,Ie+er,Ie+fa,1,ir.minY,ir.maxY,ft),hi=null),ct>1&&console.timeEnd("clipping"),Pe.push(Da||[],Ke+1,2*Te,2*Ie),Pe.push(Ia||[],Ke+1,2*Te,2*Ie+1),Pe.push(qa||[],Ke+1,2*Te+1,2*Ie),Pe.push(Wa||[],Ke+1,2*Te+1,2*Ie+1)}}getTile(Ne,Ke,Te){Ne=+Ne,Ke=+Ke,Te=+Te;let Ie=this.options,{extent:Ve,debug:Ce}=Ie;if(Ne<0||Ne>24)return null;let Ee=1<<Ne,Pe=Wt(Ne,Ke=Ke+Ee&Ee-1,Te);if(this.tiles[Pe])return Oe(this.tiles[Pe],Ve);Ce>1&&console.log("drilling down to z%d-%d-%d",Ne,Ke,Te);let ft,ct=Ne,_t=Ke,Ct=Te;for(;!ft&&ct>0;)ct--,_t>>=1,Ct>>=1,ft=this.tiles[Wt(ct,_t,Ct)];return ft&&ft.source?(Ce>1&&(console.log("found parent tile z%d-%d-%d",ct,_t,Ct),console.time("drilling down")),this.splitTile(ft.source,ct,_t,Ct,Ne,Ke,Te),Ce>1&&console.timeEnd("drilling down"),this.tiles[Pe]?Oe(this.tiles[Pe],Ve):null):null}}function Wt(wt,Ne,Ke){return 32*((1<<wt)*Ke+Ne)+wt}function kr(wt,Ne){return Ne?wt.properties[Ne]:wt.id}function mr(wt,Ne){if(wt==null)return!0;if(wt.type==="Feature")return kr(wt,Ne)!=null;if(wt.type==="FeatureCollection"){let Ke=new Set;for(let Te of wt.features){let Ie=kr(Te,Ne);if(Ie==null||Ke.has(Ie))return!1;Ke.add(Ie)}return!0}return!1}function qr(wt,Ne){let Ke=new Map;if(wt!=null)if(wt.type==="Feature")Ke.set(kr(wt,Ne),wt);else for(let Te of wt.features)Ke.set(kr(Te,Ne),Te);return Ke}class Sr extends n{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Ne,Ke){return e._(this,void 0,void 0,function*(){let Te=Ne.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Ie=this._geoJSONIndex.getTile(Te.z,Te.x,Te.y);if(!Ie)return null;let Ve=new class{constructor(Ee){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=Ee.length,this._features=Ee}feature(Ee){return new class{constructor(Pe){this._feature=Pe,this.extent=e.X,this.type=Pe.type,this.properties=Pe.tags,"id"in Pe&&!isNaN(Pe.id)&&(this.id=parseInt(Pe.id,10))}loadGeometry(){if(this._feature.type===1){let Pe=[];for(let ft of this._feature.geometry)Pe.push([new e.P(ft[0],ft[1])]);return Pe}{let Pe=[];for(let ft of this._feature.geometry){let ct=[];for(let _t of ft)ct.push(new e.P(_t[0],_t[1]));Pe.push(ct)}return Pe}}toGeoJSON(Pe,ft,ct){return m.call(this,Pe,ft,ct)}}(this._features[Ee])}}(Ie.features),Ce=F(Ve);return Ce.byteOffset===0&&Ce.byteLength===Ce.buffer.byteLength||(Ce=new Uint8Array(Ce)),{vectorTile:Ve,rawData:Ce.buffer}})}loadData(Ne){return e._(this,void 0,void 0,function*(){var Ke;(Ke=this._pendingRequest)===null||Ke===void 0||Ke.abort();let Te=!!(Ne&&Ne.request&&Ne.request.collectResourceTiming)&&new e.bv(Ne.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Ne,this._pendingRequest),this._geoJSONIndex=Ne.cluster?new $(function({superclusterOptions:Ce,clusterProperties:Ee}){if(!Ee||!Ce)return Ce;let Pe={},ft={},ct={accumulated:null,zoom:0},_t={properties:null},Ct=Object.keys(Ee);for(let ir of Ct){let[rr,er]=Ee[ir],Lr=e.bC(er),fa=e.bC(typeof rr=="string"?[rr,["accumulated"],["get",ir]]:rr);Pe[ir]=Lr.value,ft[ir]=fa.value}return Ce.map=ir=>{_t.properties=ir;let rr={};for(let er of Ct)rr[er]=Pe[er].evaluate(ct,_t);return rr},Ce.reduce=(ir,rr)=>{_t.properties=rr;for(let er of Ct)ct.accumulated=ir[er],ir[er]=ft[er].evaluate(ct,_t)},Ce}(Ne)).load((yield this._pendingData).features):(Ie=yield this._pendingData,new qt(Ie,Ne.geojsonVtOptions)),this.loaded={};let Ve={};if(Te){let Ce=Te.finish();Ce&&(Ve.resourceTiming={},Ve.resourceTiming[Ne.source]=JSON.parse(JSON.stringify(Ce)))}return Ve}catch(Ve){if(delete this._pendingRequest,e.bB(Ve))return{abandoned:!0};throw Ve}var Ie})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ne){let Ke=this.loaded;return Ke&&Ke[Ne.uid]?super.reloadTile(Ne):this.loadTile(Ne)}loadAndProcessGeoJSON(Ne,Ke){return e._(this,void 0,void 0,function*(){let Te=yield this.loadGeoJSON(Ne,Ke);if(delete this._pendingRequest,typeof Te!="object")throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(c(Te,!0),Ne.filter){let Ie=e.bC(Ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ie.result==="error")throw new Error(Ie.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));Te={type:"FeatureCollection",features:Te.features.filter(Ce=>Ie.value.evaluate({zoom:0},Ce))}}return Te})}loadGeoJSON(Ne,Ke){return e._(this,void 0,void 0,function*(){let{promoteId:Te}=Ne;if(Ne.request){let Ie=yield e.h(Ne.request,Ke);return this._dataUpdateable=mr(Ie.data,Te)?qr(Ie.data,Te):void 0,Ie.data}if(typeof Ne.data=="string")try{let Ie=JSON.parse(Ne.data);return this._dataUpdateable=mr(Ie,Te)?qr(Ie,Te):void 0,Ie}catch{throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`)}if(!Ne.dataDiff)throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ne.source}`);return function(Ie,Ve,Ce){var Ee,Pe,ft,ct;if(Ve.removeAll&&Ie.clear(),Ve.remove)for(let _t of Ve.remove)Ie.delete(_t);if(Ve.add)for(let _t of Ve.add){let Ct=kr(_t,Ce);Ct!=null&&Ie.set(Ct,_t)}if(Ve.update)for(let _t of Ve.update){let Ct=Ie.get(_t.id);if(Ct==null)continue;let ir=!_t.removeAllProperties&&(((Ee=_t.removeProperties)===null||Ee===void 0?void 0:Ee.length)>0||((Pe=_t.addOrUpdateProperties)===null||Pe===void 0?void 0:Pe.length)>0);if((_t.newGeometry||_t.removeAllProperties||ir)&&(Ct=Object.assign({},Ct),Ie.set(_t.id,Ct),ir&&(Ct.properties=Object.assign({},Ct.properties))),_t.newGeometry&&(Ct.geometry=_t.newGeometry),_t.removeAllProperties)Ct.properties={};else if(((ft=_t.removeProperties)===null||ft===void 0?void 0:ft.length)>0)for(let rr of _t.removeProperties)Object.prototype.hasOwnProperty.call(Ct.properties,rr)&&delete Ct.properties[rr];if(((ct=_t.addOrUpdateProperties)===null||ct===void 0?void 0:ct.length)>0)for(let{key:rr,value:er}of _t.addOrUpdateProperties)Ct.properties[rr]=er}}(this._dataUpdateable,Ne.dataDiff,Te),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ne){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ne){return this._geoJSONIndex.getClusterExpansionZoom(Ne.clusterId)}getClusterChildren(Ne){return this._geoJSONIndex.getChildren(Ne.clusterId)}getClusterLeaves(Ne){return this._geoJSONIndex.getLeaves(Ne.clusterId,Ne.limit,Ne.offset)}}class Rr{constructor(Ne){this.self=Ne,this.actor=new e.F(Ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ke,Te)=>{if(this.externalWorkerSourceTypes[Ke])throw new Error(`Worker source with name "${Ke}" already registered.`);this.externalWorkerSourceTypes[Ke]=Te},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ke=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ke)},this.actor.registerMessageHandler("LDT",(Ke,Te)=>this._getDEMWorkerSource(Ke,Te.source).loadTile(Te)),this.actor.registerMessageHandler("RDT",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ke,Te.source).removeTile(Te)})),this.actor.registerMessageHandler("GCEZ",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterExpansionZoom(Te)})),this.actor.registerMessageHandler("GCC",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterChildren(Te)})),this.actor.registerMessageHandler("GCL",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterLeaves(Te)})),this.actor.registerMessageHandler("LD",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).loadData(Te)),this.actor.registerMessageHandler("GD",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).getData()),this.actor.registerMessageHandler("LT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).loadTile(Te)),this.actor.registerMessageHandler("RT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).reloadTile(Te)),this.actor.registerMessageHandler("AT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).abortTile(Te)),this.actor.registerMessageHandler("RMT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).removeTile(Te)),this.actor.registerMessageHandler("RS",(Ke,Te)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ke]||!this.workerSources[Ke][Te.type]||!this.workerSources[Ke][Te.type][Te.source])return;let Ie=this.workerSources[Ke][Te.type][Te.source];delete this.workerSources[Ke][Te.type][Te.source],Ie.removeSource!==void 0&&Ie.removeSource(Te)})),this.actor.registerMessageHandler("RM",Ke=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ke],delete this.availableImages[Ke],delete this.workerSources[Ke],delete this.demWorkerSources[Ke]})),this.actor.registerMessageHandler("SR",(Ke,Te)=>e._(this,void 0,void 0,function*(){this.referrer=Te})),this.actor.registerMessageHandler("SRPS",(Ke,Te)=>this._syncRTLPluginState(Ke,Te)),this.actor.registerMessageHandler("IS",(Ke,Te)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Te)})),this.actor.registerMessageHandler("SI",(Ke,Te)=>this._setImages(Ke,Te)),this.actor.registerMessageHandler("UL",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).update(Te.layers,Te.removedIds)})),this.actor.registerMessageHandler("SL",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).replace(Te)}))}_setImages(Ne,Ke){return e._(this,void 0,void 0,function*(){this.availableImages[Ne]=Ke;for(let Te in this.workerSources[Ne]){let Ie=this.workerSources[Ne][Te];for(let Ve in Ie)Ie[Ve].availableImages=Ke}})}_syncRTLPluginState(Ne,Ke){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ke.pluginStatus!=="loading")return e.bD.setState(Ke),Ke;let Te=Ke.pluginURL;if(this.self.importScripts(Te),e.bD.isParsed()){let Ie={pluginStatus:"loaded",pluginURL:Te};return e.bD.setState(Ie),Ie}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Te}`)})}_getAvailableImages(Ne){let Ke=this.availableImages[Ne];return Ke||(Ke=[]),Ke}_getLayerIndex(Ne){let Ke=this.layerIndexes[Ne];return Ke||(Ke=this.layerIndexes[Ne]=new t),Ke}_getWorkerSource(Ne,Ke,Te){if(this.workerSources[Ne]||(this.workerSources[Ne]={}),this.workerSources[Ne][Ke]||(this.workerSources[Ne][Ke]={}),!this.workerSources[Ne][Ke][Te]){let Ie={sendAsync:(Ve,Ce)=>(Ve.targetMapId=Ne,this.actor.sendAsync(Ve,Ce))};switch(Ke){case"vector":this.workerSources[Ne][Ke][Te]=new n(Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;case"geojson":this.workerSources[Ne][Ke][Te]=new Sr(Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;default:this.workerSources[Ne][Ke][Te]=new this.externalWorkerSourceTypes[Ke](Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne))}}return this.workerSources[Ne][Ke][Te]}_getDEMWorkerSource(Ne,Ke){return this.demWorkerSources[Ne]||(this.demWorkerSources[Ne]={}),this.demWorkerSources[Ne][Ke]||(this.demWorkerSources[Ne][Ke]=new i),this.demWorkerSources[Ne][Ke]}}return e.i(self)&&(self.worker=new Rr(self)),Rr}),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:Ue=>new Promise((I,ie)=>{let we=requestAnimationFrame(I);Ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(we),ie(t.c())})}),getImageData(Ue,I=0){return this.getImageCanvasContext(Ue).getImageData(-I,-I,Ue.width+2*I,Ue.height+2*I)},getImageCanvasContext(Ue){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=Ue.width,I.height=Ue.height,ie.drawImage(Ue,0,0,Ue.width,Ue.height),ie},resolveURL:Ue=>(o||(o=document.createElement("a")),o.href=Ue,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,we){let Se=window.document.createElement(I);return ie!==void 0&&(Se.className=ie),we&&we.appendChild(Se),Se}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,we,Se={}){I.addEventListener(ie,we,"passive"in Se?Se:Se.capture)}static removeEventListener(I,ie,we,Se={}){I.removeEventListener(ie,we,"passive"in Se?Se:Se.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,we){let Se=ie.boundingClientRect;return new t.P((we.clientX-Se.left)/ie.x-I.clientLeft,(we.clientY-Se.top)/ie.y-I.clientTop)}static mousePos(I,ie){let we=i.getScale(I);return i.getPoint(I,we,ie)}static touchPos(I,ie){let we=[],Se=i.getScale(I);for(let Be=0;Be<ie.length;Be++)we.push(i.getPoint(I,Se,ie[Be]));return we}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(Ue){!m&&c&&(p?T(Ue):h=Ue)}},h,c,m=!1,p=!1;function T(Ue){let I=Ue.createTexture();Ue.bindTexture(Ue.TEXTURE_2D,I);try{if(Ue.texImage2D(Ue.TEXTURE_2D,0,Ue.RGBA,Ue.RGBA,Ue.UNSIGNED_BYTE,c),Ue.isContextLost())return;s.supported=!0}catch{}Ue.deleteTexture(I),m=!0}var l;typeof document<"u"&&(c=document.createElement("img"),c.onload=()=>{h&&T(h),h=null,p=!0},c.onerror=()=>{m=!0,h=null},c.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Ue){let I,ie,we,Se;Ue.resetRequestQueue=()=>{I=[],ie=0,we=0,Se={}},Ue.addThrottleControl=Nt=>{let $t=we++;return Se[$t]=Nt,$t},Ue.removeThrottleControl=Nt=>{delete Se[Nt],dt()},Ue.getImage=(Nt,$t,Tr=!0)=>new Promise((Ar,Kr)=>{s.supported&&(Nt.headers||(Nt.headers={}),Nt.headers.accept="image/webp,*/*"),t.e(Nt,{type:"image"}),I.push({abortController:$t,requestParameters:Nt,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Ar(na)}}),dt()});let Be=Nt=>t._(this,void 0,void 0,function*(){Nt.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Ar,onSuccess:Kr,abortController:na}=Nt,He=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((vt,Lt)=>vt&&Lt==="accept",!0));ie++;let Je=He?St($t,na):t.m($t,na);try{let vt=yield Je;delete Nt.abortController,Nt.state="completed",vt.data instanceof HTMLImageElement||t.b(vt.data)?Kr(vt):vt.data&&Kr({data:yield(lt=vt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:vt.cacheControl,expires:vt.expires})}catch(vt){delete Nt.abortController,Ar(vt)}finally{ie--,dt()}var lt}),dt=()=>{let Nt=(()=>{for(let $t of Object.keys(Se))if(Se[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ie;$t<Nt&&I.length>0;$t++){let Tr=I.shift();Tr.abortController.signal.aborted?$t--:Be(Tr)}},St=(Nt,$t)=>new Promise((Tr,Ar)=>{let Kr=new Image,na=Nt.url,He=Nt.credentials;He&&He==="include"?Kr.crossOrigin="use-credentials":(He&&He==="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(Ue){var I=new t.A(3);return I[0]=Ue[0],I[1]=Ue[1],I[2]=Ue[2],I}var A,M=function(Ue,I,ie){return Ue[0]=I[0]-ie[0],Ue[1]=I[1]-ie[1],Ue[2]=I[2]-ie[2],Ue};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var g=function(Ue){var I=Ue[0],ie=Ue[1];return I*I+ie*ie};function b(Ue){let I=[];if(typeof Ue=="string")I.push({id:"default",url:Ue});else if(Ue&&Ue.length>0){let ie=[];for(let{id:we,url:Se}of Ue){let Be=`${we}${Se}`;ie.indexOf(Be)===-1&&(ie.push(Be),I.push({id:we,url:Se}))}}return I}function d(Ue,I,ie){let we=Ue.split("?");return we[0]+=`${I}${ie}`,we.join("?")}(function(){var Ue=new t.A(2);t.A!=Float32Array&&(Ue[0]=0,Ue[1]=0)})();class u{constructor(I,ie,we,Se){this.context=I,this.format=we,this.texture=I.gl.createTexture(),this.update(ie,Se)}update(I,ie,we){let{width:Se,height:Be}=I,dt=!(this.size&&this.size[0]===Se&&this.size[1]===Be||we),{context:St}=this,{gl:Nt}=St;if(this.useMipmap=!!(ie&&ie.useMipmap),Nt.bindTexture(Nt.TEXTURE_2D,this.texture),St.pixelStoreUnpackFlipY.set(!1),St.pixelStoreUnpack.set(1),St.pixelStoreUnpackPremultiplyAlpha.set(this.format===Nt.RGBA&&(!ie||ie.premultiply!==!1)),dt)this.size=[Se,Be],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Nt.texImage2D(Nt.TEXTURE_2D,0,this.format,this.format,Nt.UNSIGNED_BYTE,I):Nt.texImage2D(Nt.TEXTURE_2D,0,this.format,Se,Be,0,this.format,Nt.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=we||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Nt.texSubImage2D(Nt.TEXTURE_2D,0,$t,Tr,Nt.RGBA,Nt.UNSIGNED_BYTE,I):Nt.texSubImage2D(Nt.TEXTURE_2D,0,$t,Tr,Se,Be,Nt.RGBA,Nt.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Nt.generateMipmap(Nt.TEXTURE_2D)}bind(I,ie,we){let{context:Se}=this,{gl:Be}=Se;Be.bindTexture(Be.TEXTURE_2D,this.texture),we!==Be.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(we=Be.LINEAR),I!==this.filter&&(Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MAG_FILTER,I),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MIN_FILTER,we||I),this.filter=I),ie!==this.wrap&&(Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_S,ie),Be.texParameteri(Be.TEXTURE_2D,Be.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(Ue){let{userImage:I}=Ue;return!!(I&&I.render&&I.render())&&(Ue.data.replace(new Uint8Array(I.data.buffer)),!0)}class f 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:we}of this.requestors)we(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let we=ie.spriteData;ie.data=new t.R({width:we.width,height:we.height},we.context.getImageData(we.x,we.y,we.width,we.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 we=!0,Se=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Se&&Se.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),we=!1),this._validateStretch(ie.stretchY,Se&&Se.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),we=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),we=!1),we}_validateStretch(I,ie){if(!I)return!0;let we=0;for(let Se of I){if(Se[0]<we||Se[1]<Se[0]||ie<Se[1])return!1;we=Se[1]}return!0}_validateContent(I,ie){if(!I)return!0;if(I.length!==4)return!1;let we=ie.spriteData,Se=we&&we.width||ie.data.width,Be=we&&we.height||ie.data.height;return!(I[0]<0||Se<I[0]||I[1]<0||Be<I[1]||I[2]<0||Se<I[2]||I[3]<0||Be<I[3]||I[2]<I[0]||I[3]<I[1])}updateImage(I,ie,we=!0){let Se=this.getImage(I);if(we&&(Se.data.width!==ie.data.width||Se.data.height!==ie.data.height))throw new Error(`size mismatch between old image (${Se.data.width}x${Se.data.height}) and new image (${ie.data.width}x${ie.data.height}).`);ie.version=Se.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,we)=>{let Se=!0;if(!this.isLoaded())for(let Be of I)this.images[Be]||(Se=!1);this.isLoaded()||Se?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let we of I){let Se=this.getImage(we);Se||(this.fire(new t.k("styleimagemissing",{id:we})),Se=this.getImage(we)),Se?ie[we]={data:Se.data.clone(),pixelRatio:Se.pixelRatio,sdf:Se.sdf,version:Se.version,stretchX:Se.stretchX,stretchY:Se.stretchY,content:Se.content,textFitWidth:Se.textFitWidth,textFitHeight:Se.textFitHeight,hasRenderCallback:!!(Se.userImage&&Se.userImage.render)}:t.w(`Image "${we}" 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],we=this.getImage(I);if(!we)return null;if(ie&&ie.position.version===we.version)return ie.position;if(ie)ie.position.version=we.version;else{let Se={w:we.data.width+2,h:we.data.height+2,x:0,y:0},Be=new t.I(Se,we);this.patterns[I]={bin:Se,position:Be}}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 Be in this.patterns)I.push(this.patterns[Be].bin);let{w:ie,h:we}=t.p(I),Se=this.atlasImage;Se.resize({width:ie||1,height:we||1});for(let Be in this.patterns){let{bin:dt}=this.patterns[Be],St=dt.x+1,Nt=dt.y+1,$t=this.getImage(Be).data,Tr=$t.width,Ar=$t.height;t.R.copy($t,Se,{x:0,y:0},{x:St,y:Nt},{width:Tr,height:Ar}),t.R.copy($t,Se,{x:0,y:Ar-1},{x:St,y:Nt-1},{width:Tr,height:1}),t.R.copy($t,Se,{x:0,y:0},{x:St,y:Nt+Ar},{width:Tr,height:1}),t.R.copy($t,Se,{x:Tr-1,y:0},{x:St-1,y:Nt},{width:1,height:Ar}),t.R.copy($t,Se,{x:0,y:0},{x:St+Tr,y:Nt},{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 we=this.getImage(ie);we||t.w(`Image with ID: "${ie}" was not found`),y(we)&&this.updateImage(ie,we)}}}let R=1e20;function L(Ue,I,ie,we,Se,Be,dt,St,Nt){for(let $t=I;$t<I+we;$t++)z(Ue,ie*Be+$t,Be,Se,dt,St,Nt);for(let $t=ie;$t<ie+Se;$t++)z(Ue,$t*Be+I,1,we,dt,St,Nt)}function z(Ue,I,ie,we,Se,Be,dt){Be[0]=0,dt[0]=-R,dt[1]=R,Se[0]=Ue[I];for(let St=1,Nt=0,$t=0;St<we;St++){Se[St]=Ue[I+St*ie];let Tr=St*St;do{let Ar=Be[Nt];$t=(Se[St]-Se[Ar]+Tr-Ar*Ar)/(St-Ar)/2}while($t<=dt[Nt]&&--Nt>-1);Nt++,Be[Nt]=St,dt[Nt]=$t,dt[Nt+1]=R}for(let St=0,Nt=0;St<we;St++){for(;dt[Nt+1]<St;)Nt++;let $t=Be[Nt],Tr=St-$t;Ue[I+St*ie]=Se[$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 Be in I)for(let dt of I[Be])ie.push(this._getAndCacheGlyphsPromise(Be,dt));let we=yield Promise.all(ie),Se={};for(let{stack:Be,id:dt,glyph:St}of we)Se[Be]||(Se[Be]={}),Se[Be][dt]=St&&{id:St.id,bitmap:St.bitmap.clone(),metrics:St.metrics};return Se})}_getAndCacheGlyphsPromise(I,ie){return t._(this,void 0,void 0,function*(){let we=this.entries[I];we||(we=this.entries[I]={glyphs:{},requests:{},ranges:{}});let Se=we.glyphs[ie];if(Se!==void 0)return{stack:I,id:ie,glyph:Se};if(Se=this._tinySDF(we,I,ie),Se)return we.glyphs[ie]=Se,{stack:I,id:ie,glyph:Se};let Be=Math.floor(ie/256);if(256*Be>65535)throw new Error("glyphs > 65535 not supported");if(we.ranges[Be])return{stack:I,id:ie,glyph:Se};if(!this.url)throw new Error("glyphsUrl is not set");if(!we.requests[Be]){let St=F.loadGlyphRange(I,Be,this.url,this.requestManager);we.requests[Be]=St}let dt=yield we.requests[Be];for(let St in dt)this._doesCharSupportLocalGlyph(+St)||(we.glyphs[+St]=dt[+St]);return we.ranges[Be]=!0,{stack:I,id:ie,glyph:dt[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,we){let Se=this.localIdeographFontFamily;if(!Se||!this._doesCharSupportLocalGlyph(we))return;let Be=I.tinySDF;if(!Be){let St="400";/bold/i.test(ie)?St="900":/medium/i.test(ie)?St="500":/light/i.test(ie)&&(St="200"),Be=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Se,fontWeight:St})}let dt=Be.draw(String.fromCharCode(we));return{id:we,bitmap:new t.o({width:dt.width||60,height:dt.height||60},dt.data),metrics:{width:dt.glyphWidth/2||24,height:dt.glyphHeight/2||24,left:dt.glyphLeft/2+.5||0,top:dt.glyphTop/2-27.5||-8,advance:dt.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Ue,I,ie,we){return t._(this,void 0,void 0,function*(){let Se=256*I,Be=Se+255,dt=we.transformRequest(ie.replace("{fontstack}",Ue).replace("{range}",`${Se}-${Be}`),"Glyphs"),St=yield t.l(dt,new AbortController);if(!St||!St.data)throw new Error(`Could not load glyph range. range: ${I}, ${Se}-${Be}`);let Nt={};for(let $t of t.n(St.data))Nt[$t.id]=$t;return Nt})},F.TinySDF=class{constructor({fontSize:Ue=24,buffer:I=3,radius:ie=8,cutoff:we=.25,fontFamily:Se="sans-serif",fontWeight:Be="normal",fontStyle:dt="normal"}={}){this.buffer=I,this.cutoff=we,this.radius=ie;let St=this.size=Ue+4*I,Nt=this._createCanvas(St),$t=this.ctx=Nt.getContext("2d",{willReadFrequently:!0});$t.font=`${dt} ${Be} ${Ue}px ${Se}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(St*St),this.gridInner=new Float64Array(St*St),this.f=new Float64Array(St),this.z=new Float64Array(St+1),this.v=new Uint16Array(St)}_createCanvas(Ue){let I=document.createElement("canvas");return I.width=I.height=Ue,I}draw(Ue){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:we,actualBoundingBoxLeft:Se,actualBoundingBoxRight:Be}=this.ctx.measureText(Ue),dt=Math.ceil(ie),St=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Be-Se))),Nt=Math.min(this.size-this.buffer,dt+Math.ceil(we)),$t=St+2*this.buffer,Tr=Nt+2*this.buffer,Ar=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Ar),na={data:Kr,width:$t,height:Tr,glyphWidth:St,glyphHeight:Nt,glyphTop:dt,glyphLeft:0,glyphAdvance:I};if(St===0||Nt===0)return na;let{ctx:He,buffer:Je,gridInner:lt,gridOuter:vt}=this;He.clearRect(Je,Je,St,Nt),He.fillText(Ue,Je,Je+dt);let Lt=He.getImageData(Je,Je,St,Nt);vt.fill(R,0,Ar),lt.fill(0,0,Ar);for(let At=0;At<Nt;At++)for(let zt=0;zt<St;zt++){let cr=Lt.data[4*(At*St+zt)+3]/255;if(cr===0)continue;let yr=(At+Je)*$t+zt+Je;if(cr===1)vt[yr]=0,lt[yr]=R;else{let Er=.5-cr;vt[yr]=Er>0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}L(vt,0,0,$t,Tr,$t,this.f,this.v,this.z),L(lt,Je,Je,St,Nt,$t,this.f,this.v,this.z);for(let At=0;At<Ar;At++){let zt=Math.sqrt(vt[At])-Math.sqrt(lt[At]);Kr[At]=Math.round(255-255*(zt/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,we){return{x:t.y.number(I.x,ie.x,we),y:t.y.number(I.y,ie.y,we),z:t.y.number(I.z,ie.z,we)}}}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 we in I){let Se=I[we];we.endsWith("-transition")?this._transitionable.setTransition(we.slice(0,-11),Se):this._transitionable.setValue(we,Se)}}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,we){return(!we||we.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 we in I){let Se=I[we];we.endsWith("-transition")?this._transitionable.setTransition(we.slice(0,-11),Se):this._transitionable.setValue(we,Se)}}}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,we={}){return we?.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 we=I.join(",")+String(ie);return this.dashEntry[we]||(this.dashEntry[we]=this.addDash(I,ie)),this.dashEntry[we]}getDashRanges(I,ie,we){let Se=[],Be=I.length%2==1?-I[I.length-1]*we:0,dt=I[0]*we,St=!0;Se.push({left:Be,right:dt,isDash:St,zeroLength:I[0]===0});let Nt=I[0];for(let $t=1;$t<I.length;$t++){St=!St;let Tr=I[$t];Be=Nt*we,Nt+=Tr,dt=Nt*we,Se.push({left:Be,right:dt,isDash:St,zeroLength:Tr===0})}return Se}addRoundDash(I,ie,we){let Se=ie/2;for(let Be=-we;Be<=we;Be++){let dt=this.width*(this.nextRow+we+Be),St=0,Nt=I[St];for(let $t=0;$t<this.width;$t++){$t/Nt.right>1&&(Nt=I[++St]);let Tr=Math.abs($t-Nt.left),Ar=Math.abs($t-Nt.right),Kr=Math.min(Tr,Ar),na,He=Be/we*(Se+1);if(Nt.isDash){let Je=Se-Math.abs(He);na=Math.sqrt(Kr*Kr+Je*Je)}else na=Se-Math.sqrt(Kr*Kr+He*He);this.data[dt+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let St=I.length-1;St>=0;--St){let Nt=I[St],$t=I[St+1];Nt.zeroLength?I.splice(St,1):$t&&$t.isDash===Nt.isDash&&($t.left=Nt.left,I.splice(St,1))}let ie=I[0],we=I[I.length-1];ie.isDash===we.isDash&&(ie.left=we.left-this.width,we.right=ie.right+this.width);let Se=this.width*this.nextRow,Be=0,dt=I[Be];for(let St=0;St<this.width;St++){St/dt.right>1&&(dt=I[++Be]);let Nt=Math.abs(St-dt.left),$t=Math.abs(St-dt.right),Tr=Math.min(Nt,$t);this.data[Se+St]=Math.max(0,Math.min(255,(dt.isDash?Tr:-Tr)+128))}}addDash(I,ie){let we=ie?7:0,Se=2*we+1;if(this.nextRow+Se>this.height)return t.w("LineAtlas out of space"),null;let Be=0;for(let St=0;St<I.length;St++)Be+=I[St];if(Be!==0){let St=this.width/Be,Nt=this.getDashRanges(I,this.width,St);ie?this.addRoundDash(Nt,St,we):this.addRegularDash(Nt)}let dt={y:(this.nextRow+we+.5)/this.height,height:2*we/this.height,width:Be};return this.nextRow+=Se,this.dirty=!0,dt}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 se{constructor(){this.active={}}acquire(I){if(!this.workers)for(this.workers=[];this.workers.length<se.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 le=Math.floor(n.hardwareConcurrency/2),fe,V;function Y(){return fe||(fe=new se),fe}se.workerCount=t.C(globalThis)?Math.max(Math.min(le,3),1):1;class ee{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let we=this.workerPool.acquire(ie);for(let Se=0;Se<we.length;Se++){let Be=new t.F(we[Se],ie);Be.name=`Worker ${Se}`,this.actors.push(Be)}if(!this.actors.length)throw new Error("No actors found")}broadcast(I,ie){let we=[];for(let Se of this.actors)we.push(Se.sendAsync({type:I,data:ie}));return Promise.all(we)}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 we of this.actors)we.registerMessageHandler(I,ie)}}function q(){return V||(V=new ee(Y(),t.G),V.registerMessageHandler("GR",(Ue,I,ie)=>t.m(I,ie))),V}function oe(Ue,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Ue.width,.5*Ue.height,1]),t.L(ie,ie,Ue.calculatePosMatrix(I.toUnwrapped()))}function ae(Ue,I,ie,we,Se,Be){let dt=function(Ar,Kr,na){if(Ar)for(let He of Ar){let Je=Kr[He];if(Je&&Je.source===na&&Je.type==="fill-extrusion")return!0}else for(let He in Kr){let Je=Kr[He];if(Je.source===na&&Je.type==="fill-extrusion")return!0}return!1}(Se&&Se.layers,I,Ue.id),St=Be.maxPitchScaleFactor(),Nt=Ue.tilesIn(we,St,dt);Nt.sort(j);let $t=[];for(let Ar of Nt)$t.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(I,ie,Ue._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,Se,Be,St,oe(Ue.transform,Ar.tileID))});let Tr=function(Ar){let Kr={},na={};for(let He of Ar){let Je=He.queryResults,lt=He.wrappedTileID,vt=na[lt]=na[lt]||{};for(let Lt in Je){let At=Je[Lt],zt=vt[Lt]=vt[Lt]||{},cr=Kr[Lt]=Kr[Lt]||[];for(let yr of At)zt[yr.featureIndex]||(zt[yr.featureIndex]=!0,cr.push(yr))}}return Kr}($t);for(let Ar in Tr)Tr[Ar].forEach(Kr=>{let na=Kr.feature,He=Ue.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=He});return Tr}function j(Ue,I){let ie=Ue.tileID,we=I.tileID;return ie.overscaledZ-we.overscaledZ||ie.canonical.y-we.canonical.y||ie.wrap-we.wrap||ie.canonical.x-we.canonical.x}function Q(Ue,I,ie){return t._(this,void 0,void 0,function*(){let we=Ue;if(Ue.url?we=(yield t.h(I.transformRequest(Ue.url,"Source"),ie)).data:yield n.frameAsync(ie),!we)return null;let Se=t.M(t.e(we,Ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in we&&we.vector_layers&&(Se.vectorLayerIds=we.vector_layers.map(Be=>Be.id)),Se})}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,we=this._ne,Se,Be;if(I instanceof t.N)Se=I,Be=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(Se=I._sw,Be=I._ne,!Se||!Be)return this}return ie||we?(ie.lng=Math.min(Se.lng,ie.lng),ie.lat=Math.min(Se.lat,ie.lat),we.lng=Math.max(Be.lng,we.lng),we.lat=Math.max(Be.lat,we.lat)):(this._sw=new t.N(Se.lng,Se.lat),this._ne=new t.N(Be.lng,Be.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:we}=t.N.convert(I),Se=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Se=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=we&&we<=this._ne.lat&&Se}static convert(I){return I instanceof re?I:I&&new re(I)}static fromLngLat(I,ie=0){let we=360*ie/40075017,Se=we/Math.cos(Math.PI/180*I.lat);return new re(new t.N(I.lng-Se,I.lat-we),new t.N(I.lng+Se,I.lat+we))}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 ce{constructor(I,ie,we){this.bounds=re.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=we||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),we=Math.floor(t.O(this.bounds.getWest())*ie),Se=Math.floor(t.Q(this.bounds.getNorth())*ie),Be=Math.ceil(t.O(this.bounds.getEast())*ie),dt=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=we&&I.x<Be&&I.y>=Se&&I.y<dt}}class be extends t.E{constructor(I,ie,we,Se){if(super(),this.id=I,this.dispatcher=we,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(Se)}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 ce(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),we={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};we.request.collectResourceTiming=this._collectResourceTiming;let Se="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((Be,dt)=>{I.reloadPromise={resolve:Be,reject:dt}})}else I.actor=this.dispatcher.getActor(),Se="LT";I.abortController=new AbortController;try{let Be=yield I.actor.sendAsync({type:Se,data:we},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,Be)}catch(Be){if(delete I.abortController,I.aborted)return;if(Be&&Be.status!==404)throw Be;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 we=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(we.resolve).catch(we.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 Ae extends t.E{constructor(I,ie,we,Se){super(),this.id=I,this.dispatcher=we,this.setEventedParent(Se),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 ce(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 we=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(we&&we.data){this.map._refreshExpiredTiles&&we.cacheControl&&we.expires&&I.setExpiryData({cacheControl:we.cacheControl,expires:we.expires});let Se=this.map.painter.context,Be=Se.gl,dt=we.data;I.texture=this.map.painter.getTileTexture(dt.width),I.texture?I.texture.update(dt,{useMipmap:!0}):(I.texture=new u(Se,dt,Be.RGBA,{useMipmap:!0}),I.texture.bind(Be.LINEAR,Be.CLAMP_TO_EDGE,Be.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(we){if(delete I.abortController,I.aborted)I.state="unloaded";else if(we)throw I.state="errored",we}})}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 De extends Ae{constructor(I,ie,we,Se){super(I,ie,we,Se),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),we=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Se=yield l.getImage(we,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Se&&Se.data){let Be=Se.data;this.map._refreshExpiredTiles&&Se.cacheControl&&Se.expires&&I.setExpiryData({cacheControl:Se.cacheControl,expires:Se.expires});let dt=t.b(Be)&&t.U()?Be:yield this.readImageNow(Be),St={type:this.type,uid:I.uid,source:this.id,rawImageData:dt,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 Nt=yield I.actor.sendAsync({type:"LDT",data:St});I.dem=Nt,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Se){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Se)throw I.state="errored",Se}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,we=I.height+2;try{return new t.R({width:ie,height:we},yield t.W(I,-1,-1,ie,we))}catch{}}return n.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,we=Math.pow(2,ie.z),Se=(ie.x-1+we)%we,Be=ie.x===0?I.wrap-1:I.wrap,dt=(ie.x+1+we)%we,St=ie.x+1===we?I.wrap+1:I.wrap,Nt={};return Nt[new t.S(I.overscaledZ,Be,ie.z,Se,ie.y).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,St,ie.z,dt,ie.y).key]={backfilled:!1},ie.y>0&&(Nt[new t.S(I.overscaledZ,Be,ie.z,Se,ie.y-1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,St,ie.z,dt,ie.y-1).key]={backfilled:!1}),ie.y+1<we&&(Nt[new t.S(I.overscaledZ,Be,ie.z,Se,ie.y+1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y+1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,St,ie.z,dt,ie.y+1).key]={backfilled:!1}),Nt}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 ze extends t.E{constructor(I,ie,we,Se){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=we.getActor(),this.setEventedParent(Se),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 Be=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)*Be,tolerance:(ie.tolerance!==void 0?ie.tolerance:.375)*Be,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)*Be,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,we){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:I,limit:ie,offset:we}})}_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 we=yield this.actor.sendAsync({type:"LD",data:ie});if(this._pendingLoads--,this._removed||we.abandoned)return void this.fire(new t.k("dataabort",{dataType:"source"}));let Se=null;we.resourceTiming&&we.resourceTiming[this.id]&&(Se=we.resourceTiming[this.id].slice(0));let Be={dataType:"source"};this._collectResourceTiming&&Se&&Se.length>0&&t.e(Be,{resourceTiming:Se}),this.fire(new t.k("data",Object.assign(Object.assign({},Be),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},Be),{sourceDataType:"content"})))}catch(we){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(we))}})}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 we={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 Se=yield this.actor.sendAsync({type:ie,data:we},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Se,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 Ze=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,we,Se){super(),this.id=I,this.dispatcher=we,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Se),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(Se){let Be=1/0,dt=1/0,St=-1/0,Nt=-1/0;for(let Kr of Se)Be=Math.min(Be,Kr.x),dt=Math.min(dt,Kr.y),St=Math.max(St,Kr.x),Nt=Math.max(Nt,Kr.y);let $t=Math.max(St-Be,Nt-dt),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Ar=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((Be+St)/2*Ar),Math.floor((dt+Nt)/2*Ar))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let we=ie.map(Se=>this.tileID.getTilePoint(Se)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(we[0].x,we[0].y,0,0),this._boundsArray.emplaceBack(we[1].x,we[1].y,t.X,0),this._boundsArray.emplaceBack(we[3].x,we[3].y,0,t.X),this._boundsArray.emplaceBack(we[2].x,we[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,Ze.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 we=!1;for(let Se in this.tiles){let Be=this.tiles[Se];Be.state!=="loaded"&&(Be.state="loaded",Be.texture=this.texture,we=!0)}we&&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,we,Se){super(I,ie,we,Se),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,Ze.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 we=!1;for(let Se in this.tiles){let Be=this.tiles[Se];Be.state!=="loaded"&&(Be.state="loaded",Be.texture=this.texture,we=!0)}we&&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 rt extends at{constructor(I,ie,we,Se){super(I,ie,we,Se),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(Be=>!Array.isArray(Be)||Be.length!==2||Be.some(dt=>typeof dt!="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,we=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,Ze.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,we.RGBA,{premultiply:!0});let Se=!1;for(let Be in this.tiles){let dt=this.tiles[Be];dt.state!=="loaded"&&(dt.state="loaded",dt.texture=this.texture,Se=!0)}Se&&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 st={},Me=Ue=>{switch(Ue){case"geojson":return ze;case"image":return at;case"raster":return Ae;case"raster-dem":return De;case"vector":return be;case"video":return nt;case"canvas":return rt}return st[Ue]},ye="RTLPluginLoaded";class he 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,we=!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(!we)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(ye))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Oe=null;function tt(){return Oe||(Oe=new he),Oe}class ot{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,we){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(Se,Be){let dt={};if(!Be)return dt;for(let St of Se){let Nt=St.layerIds.map($t=>Be.getLayer($t)).filter(Boolean);if(Nt.length!==0){St.layers=Nt,St.stateDependentLayerIds&&(St.stateDependentLayers=St.stateDependentLayerIds.map($t=>Nt.filter(Tr=>Tr.id===$t)[0]));for(let $t of Nt)dt[$t.id]=St}}return dt}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Se in this.buckets){let Be=this.buckets[Se];if(Be instanceof t.a6){if(this.hasSymbolBuckets=!0,!we)break;Be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Se in this.buckets){let Be=this.buckets[Se];if(Be instanceof t.a6&&Be.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let Se in this.buckets){let Be=this.buckets[Se];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Se).queryRadius(Be))}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 we in this.buckets){let Se=this.buckets[we];Se.uploadPending()&&Se.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,we,Se,Be,dt,St,Nt,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Se,cameraQueryGeometry:Be,scale:dt,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Nt,params:St,queryPadding:this.queryPadding*$t},I,ie,we):{}}querySourceFeatures(I,ie){let we=this.latestFeatureIndex;if(!we||!we.rawTileData)return;let Se=we.loadVTLayers(),Be=ie&&ie.sourceLayer?ie.sourceLayer:"",dt=Se._geojsonTileLayer||Se[Be];if(!dt)return;let St=t.a7(ie&&ie.filter),{z:Nt,x:$t,y:Tr}=this.tileID.canonical,Ar={z:Nt,x:$t,y:Tr};for(let Kr=0;Kr<dt.length;Kr++){let na=dt.feature(Kr);if(St.needGeometry){let lt=t.a8(na,!0);if(!St.filter(new t.z(this.tileID.overscaledZ),lt,this.tileID.canonical))continue}else if(!St.filter(new t.z(this.tileID.overscaledZ),na))continue;let He=we.getId(na,Be),Je=new t.a9(na,Nt,$t,Tr,He);Je.tile=Ar,I.push(Je)}}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 we=t.aa(I.cacheControl);we["max-age"]&&(this.expirationTime=Date.now()+1e3*we["max-age"])}else I.expires&&(this.expirationTime=new Date(I.expires).getTime());if(this.expirationTime){let we=Date.now(),Se=!1;if(this.expirationTime>we)Se=!1;else if(ie)if(this.expirationTime<ie)Se=!0;else{let Be=this.expirationTime-ie;Be?this.expirationTime=we+Math.max(Be,3e4):Se=!0}else Se=!0;Se?(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 we=this.latestFeatureIndex.loadVTLayers();for(let Se in this.buckets){if(!ie.style.hasLayer(Se))continue;let Be=this.buckets[Se],dt=Be.layers[0].sourceLayer||"_geojsonTileLayer",St=we[dt],Nt=I[dt];if(!St||!Nt||Object.keys(Nt).length===0)continue;Be.update(Nt,St,this.imageAtlas&&this.imageAtlas.patternPositions||{});let $t=ie&&ie.style&&ie.style.getLayer(Se);$t&&(this.queryPadding=Math.max(this.queryPadding,$t.queryRadius(Be)))}}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 we={};for(let Se of ie)we[Se]=!0;this.dependencies[I]=we}hasDependency(I,ie){for(let we of I){let Se=this.dependencies[we];if(Se){for(let Be of ie)if(Se[Be])return!0}}return!1}}class Qe{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,we){let Se=I.wrapped().key;this.data[Se]===void 0&&(this.data[Se]=[]);let Be={value:ie,timeout:void 0};if(we!==void 0&&(Be.timeout=setTimeout(()=>{this.remove(I,Be)},we)),this.data[Se].push(Be),this.order.push(Se),this.order.length>this.max){let dt=this._getAndRemoveByKey(this.order[0]);dt&&this.onRemove(dt)}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 we=I.wrapped().key,Se=ie===void 0?0:this.data[we].indexOf(ie),Be=this.data[we][Se];return this.data[we].splice(Se,1),Be.timeout&&clearTimeout(Be.timeout),this.data[we].length===0&&delete this.data[we],this.onRemove(Be.value),this.order.splice(this.order.indexOf(we),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 we in this.data)for(let Se of this.data[we])I(Se.value)||ie.push(Se);for(let we of ie)this.remove(we.value.tileID,we)}}class Pt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,we){let Se=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Se]=this.stateChanges[I][Se]||{},t.e(this.stateChanges[I][Se],we),this.deletedStates[I]===null){this.deletedStates[I]={};for(let Be in this.state[I])Be!==Se&&(this.deletedStates[I][Be]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Se]===null){this.deletedStates[I][Se]={};for(let Be in this.state[I][Se])we[Be]||(this.deletedStates[I][Se][Be]=null)}else for(let Be in we)this.deletedStates[I]&&this.deletedStates[I][Se]&&this.deletedStates[I][Se][Be]===null&&delete this.deletedStates[I][Se][Be]}removeFeatureState(I,ie,we){if(this.deletedStates[I]===null)return;let Se=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},we&&ie!==void 0)this.deletedStates[I][Se]!==null&&(this.deletedStates[I][Se]=this.deletedStates[I][Se]||{},this.deletedStates[I][Se][we]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Se])for(we in this.deletedStates[I][Se]={},this.stateChanges[I][Se])this.deletedStates[I][Se][we]=null;else this.deletedStates[I][Se]=null;else this.deletedStates[I]=null}getState(I,ie){let we=String(ie),Se=t.e({},(this.state[I]||{})[we],(this.stateChanges[I]||{})[we]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let Be=this.deletedStates[I][ie];if(Be===null)return{};for(let dt in Be)delete Se[dt]}return Se}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let we={};for(let Se in this.stateChanges){this.state[Se]=this.state[Se]||{};let Be={};for(let dt in this.stateChanges[Se])this.state[Se][dt]||(this.state[Se][dt]={}),t.e(this.state[Se][dt],this.stateChanges[Se][dt]),Be[dt]=this.state[Se][dt];we[Se]=Be}for(let Se in this.deletedStates){this.state[Se]=this.state[Se]||{};let Be={};if(this.deletedStates[Se]===null)for(let dt in this.state[Se])Be[dt]={},this.state[Se][dt]={};else for(let dt in this.deletedStates[Se]){if(this.deletedStates[Se][dt]===null)this.state[Se][dt]={};else for(let St of Object.keys(this.deletedStates[Se][dt]))delete this.state[Se][dt][St];Be[dt]=this.state[Se][dt]}we[Se]=we[Se]||{},t.e(we[Se],Be)}if(this.stateChanges={},this.deletedStates={},Object.keys(we).length!==0)for(let Se in I)I[Se].setFeatureState(we,ie)}}class It extends t.E{constructor(I,ie,we){super(),this.id=I,this.dispatcher=we,this.on("data",Se=>this._dataHandler(Se)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Se,Be,dt,St)=>{let Nt=new(Me(Be.type))(Se,Be,dt,St);if(Nt.id!==Se)throw new Error(`Expected Source id to be ${Se} instead of ${Nt.id}`);return Nt})(I,ie,we,this),this._tiles={},this._cache=new Qe(0,Se=>this._unloadTile(Se)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Pt,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,we){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,we)}catch(Se){I.state="errored",Se.status!==404?this._source.fire(new t.j(Se,{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 we=this._tiles[ie];we.upload(I),we.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(qt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let we in this._tiles)this._isIdRenderable(we,I)&&ie.push(this._tiles[we]);return I?ie.sort((we,Se)=>{let Be=we.tileID,dt=Se.tileID,St=new t.P(Be.canonical.x,Be.canonical.y)._rotate(this.transform.angle),Nt=new t.P(dt.canonical.x,dt.canonical.y)._rotate(this.transform.angle);return Be.overscaledZ-dt.overscaledZ||Nt.y-St.y||Nt.x-St.x}).map(we=>we.tileID.key):ie.map(we=>we.tileID).sort(qt).map(we=>we.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 we=this._tiles[I];we&&(we.state!=="loading"&&(we.state=ie),yield this._loadTile(we,I,ie))})}_tileLoaded(I,ie,we){I.timeAdded=n.now(),we==="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 Se=0;Se<ie.length;Se++){let Be=ie[Se];if(I.neighboringTiles&&I.neighboringTiles[Be]){let dt=this.getTileByID(Be);we(I,dt),we(dt,I)}}function we(Se,Be){Se.needsHillshadePrepare=!0,Se.needsTerrainPrepare=!0;let dt=Be.tileID.canonical.x-Se.tileID.canonical.x,St=Be.tileID.canonical.y-Se.tileID.canonical.y,Nt=Math.pow(2,Se.tileID.canonical.z),$t=Be.tileID.key;dt===0&&St===0||Math.abs(St)>1||(Math.abs(dt)>1&&(Math.abs(dt+Nt)===1?dt+=Nt:Math.abs(dt-Nt)===1&&(dt-=Nt)),Be.dem&&Se.dem&&(Se.dem.backfillBorder(Be.dem,dt,St),Se.neighboringTiles&&Se.neighboringTiles[$t]&&(Se.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,we,Se){for(let Be in this._tiles){let dt=this._tiles[Be];if(Se[Be]||!dt.hasData()||dt.tileID.overscaledZ<=ie||dt.tileID.overscaledZ>we)continue;let St=dt.tileID;for(;dt&&dt.tileID.overscaledZ>ie+1;){let $t=dt.tileID.scaledTo(dt.tileID.overscaledZ-1);dt=this._tiles[$t.key],dt&&dt.hasData()&&(St=$t)}let Nt=St;for(;Nt.overscaledZ>ie;)if(Nt=Nt.scaledTo(Nt.overscaledZ-1),I[Nt.key]){Se[St.key]=St;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let we=this._loadedParentTiles[I.key];return we&&we.tileID.overscaledZ>=ie?we:null}for(let we=I.overscaledZ-1;we>=ie;we--){let Se=I.scaledTo(we),Be=this._getLoadedTile(Se);if(Be)return Be}}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,we=Math.ceil(I.height/this._source.tileSize)+1,Se=Math.floor(ie*we*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Se):Se;this._cache.setMaxSize(Be)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let we={};for(let Se in this._tiles){let Be=this._tiles[Se];Be.tileID=Be.tileID.unwrapTo(Be.tileID.wrap+ie),we[Be.tileID.key]=Be}this._tiles=we;for(let Se in this._timers)clearTimeout(this._timers[Se]),delete this._timers[Se];for(let Se in this._tiles)this._setTileReloadTimer(Se,this._tiles[Se])}}_updateCoveredAndRetainedTiles(I,ie,we,Se,Be,dt){let St={},Nt={},$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 He=this.findLoadedParent(Kr,ie),Je=this.findLoadedSibling(Kr),lt=He||Je||null;lt&&(this._addTile(lt.tileID),St[lt.tileID.key]=lt.tileID),Nt[Ar]=Kr}this._retainLoadedChildren(Nt,Se,we,I);for(let Ar in St)I[Ar]||(this._coveredTiles[Ar]=!0,I[Ar]=St[Ar]);if(dt){let Ar={},Kr={};for(let na of Be)this._tiles[na.key].hasData()?Ar[na.key]=na:Kr[na.key]=na;for(let na in Kr){let He=Kr[na].children(this._source.maxzoom);this._tiles[He[0].key]&&this._tiles[He[1].key]&&this._tiles[He[2].key]&&this._tiles[He[3].key]&&(Ar[He[0].key]=I[He[0].key]=He[0],Ar[He[1].key]=I[He[1].key]=He[1],Ar[He[2].key]=I[He[2].key]=He[2],Ar[He[3].key]=I[He[3].key]=He[3],delete Kr[na])}for(let na in Kr){let He=Kr[na],Je=this.findLoadedParent(He,this._source.minzoom),lt=this.findLoadedSibling(He),vt=Je||lt||null;if(vt){Ar[vt.tileID.key]=I[vt.tileID.key]=vt.tileID;for(let Lt in Ar)Ar[Lt].isChildOf(vt.tileID)&&delete Ar[Lt]}}for(let na in this._tiles)Ar[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let we;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?we=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(we=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&&(we=we.filter(Tr=>this._source.hasTile(Tr)))):we=[];let Se=I.coveringZoomLevel(this._source),Be=Math.max(Se-It.maxOverzooming,this._source.minzoom),dt=Math.max(Se+It.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Ar of we)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}we=we.concat(Object.values(Tr))}let St=we.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,St&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Nt=this._updateRetainedTiles(we,Se);Wt(this._source.type)&&this._updateCoveredAndRetainedTiles(Nt,Be,dt,Se,we,ie);for(let Tr in Nt)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Nt);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 we;let Se={},Be={},dt=Math.max(ie-It.maxOverzooming,this._source.minzoom),St=Math.max(ie+It.maxUnderzooming,this._source.minzoom),Nt={};for(let $t of I){let Tr=this._addTile($t);Se[$t.key]=$t,Tr.hasData()||ie<this._source.maxzoom&&(Nt[$t.key]=$t)}this._retainLoadedChildren(Nt,ie,St,Se);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()){Se[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Se[Kr[0].key]&&Se[Kr[1].key]&&Se[Kr[2].key]&&Se[Kr[3].key])continue}let Ar=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=dt;--Kr){let na=$t.scaledTo(Kr);if(Be[na.key])break;if(Be[na.key]=!0,Tr=this.getTile(na),!Tr&&Ar&&(Tr=this._addTile(na)),Tr){let He=Tr.hasData();if((He||!(!((we=this.map)===null||we===void 0)&&we.cancelPendingTileRequestsWhileZooming)||Ar)&&(Se[na.key]=na),Ar=Tr.wasRequested(),He)break}}}return Se}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],we,Se=this._tiles[I].tileID;for(;Se.overscaledZ>0;){if(Se.key in this._loadedParentTiles){we=this._loadedParentTiles[Se.key];break}ie.push(Se.key);let Be=Se.scaledTo(Se.overscaledZ-1);if(we=this._getLoadedTile(Be),we)break;Se=Be}for(let Be of ie)this._loadedParentTiles[Be]=we}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,we=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=we}}_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 we=ie;return ie||(ie=new ot(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,we||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 we=ie.getExpiryTimeout();we&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},we))}_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,we){let Se=[],Be=this.transform;if(!Be)return Se;let dt=we?Be.getCameraQueryGeometry(I):I,St=I.map(He=>Be.pointCoordinate(He,this.terrain)),Nt=dt.map(He=>Be.pointCoordinate(He,this.terrain)),$t=this.getIds(),Tr=1/0,Ar=1/0,Kr=-1/0,na=-1/0;for(let He of Nt)Tr=Math.min(Tr,He.x),Ar=Math.min(Ar,He.y),Kr=Math.max(Kr,He.x),na=Math.max(na,He.y);for(let He=0;He<$t.length;He++){let Je=this._tiles[$t[He]];if(Je.holdingForFade())continue;let lt=Je.tileID,vt=Math.pow(2,Be.zoom-Je.tileID.overscaledZ),Lt=ie*Je.queryPadding*t.X/Je.tileSize/vt,At=[lt.getTilePoint(new t.Z(Tr,Ar)),lt.getTilePoint(new t.Z(Kr,na))];if(At[0].x-Lt<t.X&&At[0].y-Lt<t.X&&At[1].x+Lt>=0&&At[1].y+Lt>=0){let zt=St.map(yr=>lt.getTilePoint(yr)),cr=Nt.map(yr=>lt.getTilePoint(yr));Se.push({tile:Je,tileID:lt,queryGeometry:zt,cameraQueryGeometry:cr,scale:vt})}}return Se}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(we=>this._tiles[we].tileID);for(let we of ie)we.posMatrix=this.transform.calculatePosMatrix(we.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Wt(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,we){this._state.updateState(I=I||"_geojsonTileLayer",ie,we)}removeFeatureState(I,ie,we){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,we)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,we){let Se=this._tiles[I];Se&&Se.setDependencies(ie,we)}reloadTilesForDependencies(I,ie){for(let we in this._tiles)this._tiles[we].hasDependency(I,ie)&&this._reloadTile(we,"reloading");this._cache.filter(we=>!we.hasDependency(I,ie))}}function qt(Ue,I){let ie=Math.abs(2*Ue.wrap)-+(Ue.wrap<0),we=Math.abs(2*I.wrap)-+(I.wrap<0);return Ue.overscaledZ-I.overscaledZ||we-ie||I.canonical.y-Ue.canonical.y||I.canonical.x-Ue.canonical.x}function Wt(Ue){return Ue==="raster"||Ue==="image"||Ue==="video"}It.maxOverzooming=10,It.maxUnderzooming=3;class kr{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let we=1;we<this.points.length;we++)this._distances[we]=this._distances[we-1]+this.points[we].dist(this.points[we-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,we=this._distances[ie],Se=I*this.paddedLength+this.padding;for(;we<Se&&ie<this._distances.length;)we=this._distances[++ie];let Be=ie-1,dt=this._distances[Be],St=we-dt,Nt=St>0?(Se-dt)/St:0;return this.points[Be].mult(1-Nt).add(this.points[ie].mult(Nt))}}function mr(Ue,I){let ie=!0;return Ue==="always"||Ue!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,we){let Se=this.boxCells=[],Be=this.circleCells=[];this.xCellCount=Math.ceil(I/we),this.yCellCount=Math.ceil(ie/we);for(let dt=0;dt<this.xCellCount*this.yCellCount;dt++)Se.push([]),Be.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,we,Se,Be){this._forEachCell(ie,we,Se,Be,this._insertBoxCell,this.boxUid++),this.boxKeys.push(I),this.bboxes.push(ie),this.bboxes.push(we),this.bboxes.push(Se),this.bboxes.push(Be)}insertCircle(I,ie,we,Se){this._forEachCell(ie-Se,we-Se,ie+Se,we+Se,this._insertCircleCell,this.circleUid++),this.circleKeys.push(I),this.circles.push(ie),this.circles.push(we),this.circles.push(Se)}_insertBoxCell(I,ie,we,Se,Be,dt){this.boxCells[Be].push(dt)}_insertCircleCell(I,ie,we,Se,Be,dt){this.circleCells[Be].push(dt)}_query(I,ie,we,Se,Be,dt,St){if(we<0||I>this.width||Se<0||ie>this.height)return[];let Nt=[];if(I<=0&&ie<=0&&this.width<=we&&this.height<=Se){if(Be)return[{key:null,x1:I,y1:ie,x2:we,y2:Se}];for(let $t=0;$t<this.boxKeys.length;$t++)Nt.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];Nt.push({key:this.circleKeys[$t],x1:Tr-Kr,y1:Ar-Kr,x2:Tr+Kr,y2:Ar+Kr})}}else this._forEachCell(I,ie,we,Se,this._queryCell,Nt,{hitTest:Be,overlapMode:dt,seenUids:{box:{},circle:{}}},St);return Nt}query(I,ie,we,Se){return this._query(I,ie,we,Se,!1,null)}hitTest(I,ie,we,Se,Be,dt){return this._query(I,ie,we,Se,!0,Be,dt).length>0}hitTestCircle(I,ie,we,Se,Be){let dt=I-we,St=I+we,Nt=ie-we,$t=ie+we;if(St<0||dt>this.width||$t<0||Nt>this.height)return!1;let Tr=[];return this._forEachCell(dt,Nt,St,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Se,circle:{x:I,y:ie,radius:we},seenUids:{box:{},circle:{}}},Be),Tr.length>0}_queryCell(I,ie,we,Se,Be,dt,St,Nt){let{seenUids:$t,hitTest:Tr,overlapMode:Ar}=St,Kr=this.boxCells[Be];if(Kr!==null){let He=this.bboxes;for(let Je of Kr)if(!$t.box[Je]){$t.box[Je]=!0;let lt=4*Je,vt=this.boxKeys[Je];if(I<=He[lt+2]&&ie<=He[lt+3]&&we>=He[lt+0]&&Se>=He[lt+1]&&(!Nt||Nt(vt))&&(!Tr||!mr(Ar,vt.overlapMode))&&(dt.push({key:vt,x1:He[lt],y1:He[lt+1],x2:He[lt+2],y2:He[lt+3]}),Tr))return!0}}let na=this.circleCells[Be];if(na!==null){let He=this.circles;for(let Je of na)if(!$t.circle[Je]){$t.circle[Je]=!0;let lt=3*Je,vt=this.circleKeys[Je];if(this._circleAndRectCollide(He[lt],He[lt+1],He[lt+2],I,ie,we,Se)&&(!Nt||Nt(vt))&&(!Tr||!mr(Ar,vt.overlapMode))){let Lt=He[lt],At=He[lt+1],zt=He[lt+2];if(dt.push({key:vt,x1:Lt-zt,y1:At-zt,x2:Lt+zt,y2:At+zt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,we,Se,Be,dt,St,Nt){let{circle:$t,seenUids:Tr,overlapMode:Ar}=St,Kr=this.boxCells[Be];if(Kr!==null){let He=this.bboxes;for(let Je of Kr)if(!Tr.box[Je]){Tr.box[Je]=!0;let lt=4*Je,vt=this.boxKeys[Je];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,He[lt+0],He[lt+1],He[lt+2],He[lt+3])&&(!Nt||Nt(vt))&&!mr(Ar,vt.overlapMode))return dt.push(!0),!0}}let na=this.circleCells[Be];if(na!==null){let He=this.circles;for(let Je of na)if(!Tr.circle[Je]){Tr.circle[Je]=!0;let lt=3*Je,vt=this.circleKeys[Je];if(this._circlesCollide(He[lt],He[lt+1],He[lt+2],$t.x,$t.y,$t.radius)&&(!Nt||Nt(vt))&&!mr(Ar,vt.overlapMode))return dt.push(!0),!0}}}_forEachCell(I,ie,we,Se,Be,dt,St,Nt){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Ar=this._convertToXCellCoord(we),Kr=this._convertToYCellCoord(Se);for(let na=$t;na<=Ar;na++)for(let He=Tr;He<=Kr;He++)if(Be.call(this,I,ie,we,Se,this.xCellCount*He+na,dt,St,Nt))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,we,Se,Be,dt){let St=Se-I,Nt=Be-ie,$t=we+dt;return $t*$t>St*St+Nt*Nt}_circleAndRectCollide(I,ie,we,Se,Be,dt,St){let Nt=(dt-Se)/2,$t=Math.abs(I-(Se+Nt));if($t>Nt+we)return!1;let Tr=(St-Be)/2,Ar=Math.abs(ie-(Be+Tr));if(Ar>Tr+we)return!1;if($t<=Nt||Ar<=Tr)return!0;let Kr=$t-Nt,na=Ar-Tr;return Kr*Kr+na*na<=we*we}}function Sr(Ue,I,ie,we,Se){let Be=t.H();return I?(t.K(Be,Be,[1/Se,1/Se,1]),ie||t.ad(Be,Be,we.angle)):t.L(Be,we.labelPlaneMatrix,Ue),Be}function Rr(Ue,I,ie,we,Se){if(I){let Be=t.ae(Ue);return t.K(Be,Be,[Se,Se,1]),ie||t.ad(Be,Be,-we.angle),Be}return we.glCoordMatrix}function wt(Ue,I,ie,we){let Se;we?(Se=[Ue,I,we(Ue,I),1],t.af(Se,Se,ie)):(Se=[Ue,I,0,1],er(Se,Se,ie));let Be=Se[3];return{point:new t.P(Se[0]/Be,Se[1]/Be),signedDistanceFromCamera:Be,isOccluded:!1}}function Ne(Ue,I){return .5+Ue/I*.5}function Ke(Ue,I){return Ue.x>=-I[0]&&Ue.x<=I[0]&&Ue.y>=-I[1]&&Ue.y<=I[1]}function Te(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He){let Je=we?Ue.textSizeData:Ue.iconSizeData,lt=t.ag(Je,ie.transform.zoom),vt=[256/ie.width*2+1,256/ie.height*2+1],Lt=we?Ue.text.dynamicLayoutVertexArray:Ue.icon.dynamicLayoutVertexArray;Lt.clear();let At=Ue.lineVertexArray,zt=we?Ue.text.placedSymbolArray:Ue.icon.placedSymbolArray,cr=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;Er<zt.length;Er++){let jr=zt.get(Er);if(jr.hidden||jr.writingMode===t.ah.vertical&&!yr){rr(jr.numGlyphs,Lt);continue}yr=!1;let Qr=wt(jr.anchorX,jr.anchorY,I,He);if(!Ke(Qr.point,vt)){rr(jr.numGlyphs,Lt);continue}let pa=Ne(ie.transform.cameraToCenterDistance,Qr.signedDistanceFromCamera),Aa=t.ai(Je,lt,jr),za=dt?Aa/pa:Aa*pa,ci={getElevation:He,labelPlaneMatrix:Se,lineVertexArray:At,pitchWithMap:dt,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=Ce(ci,jr,za,!1,St,I,Be,Ue.glyphOffsetArray,Lt,cr,Nt);yr=Vi.useVertical,(Vi.notEnoughRoom||yr||Vi.needsFlipping&&Ce(ci,jr,za,!0,St,I,Be,Ue.glyphOffsetArray,Lt,cr,Nt).notEnoughRoom)&&rr(jr.numGlyphs,Lt)}we?Ue.text.dynamicLayoutVertexBuffer.updateData(Lt):Ue.icon.dynamicLayoutVertexBuffer.updateData(Lt)}function Ie(Ue,I,ie,we,Se,Be,dt,St){let Nt=Be.glyphStartIndex+Be.numGlyphs,$t=Be.lineStartIndex,Tr=Be.lineStartIndex+Be.lineLength,Ar=I.getoffsetX(Be.glyphStartIndex),Kr=I.getoffsetX(Nt-1),na=Ct(Ue*Ar,ie,we,Se,Be.segment,$t,Tr,St,dt);if(!na)return null;let He=Ct(Ue*Kr,ie,we,Se,Be.segment,$t,Tr,St,dt);return He?St.projectionCache.anyProjectionOccluded?null:{first:na,last:He}:null}function Ve(Ue,I,ie,we){return Ue===t.ah.horizontal&&Math.abs(ie.y-I.y)>Math.abs(ie.x-I.x)*we?{useVertical:!0}:(Ue===t.ah.vertical?I.y<ie.y:I.x>ie.x)?{needsFlipping:!0}:null}function Ce(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr){let Ar=ie/24,Kr=I.lineOffsetX*Ar,na=I.lineOffsetY*Ar,He;if(I.numGlyphs>1){let Je=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,vt=I.lineStartIndex+I.lineLength,Lt=Ie(Ar,St,Kr,na,we,I,Tr,Ue);if(!Lt)return{notEnoughRoom:!0};let At=wt(Lt.first.point.x,Lt.first.point.y,dt,Ue.getElevation).point,zt=wt(Lt.last.point.x,Lt.last.point.y,dt,Ue.getElevation).point;if(Se&&!we){let cr=Ve(I.writingMode,At,zt,$t);if(cr)return cr}He=[Lt.first];for(let cr=I.glyphStartIndex+1;cr<Je-1;cr++)He.push(Ct(Ar*St.getoffsetX(cr),Kr,na,we,I.segment,lt,vt,Ue,Tr));He.push(Lt.last)}else{if(Se&&!we){let lt=wt(Ue.tileAnchorPoint.x,Ue.tileAnchorPoint.y,Be,Ue.getElevation).point,vt=I.lineStartIndex+I.segment+1,Lt=new t.P(Ue.lineVertexArray.getx(vt),Ue.lineVertexArray.gety(vt)),At=wt(Lt.x,Lt.y,Be,Ue.getElevation),zt=At.signedDistanceFromCamera>0?At.point:function(yr,Er,jr,Qr,pa,Aa){return Ee(yr,Er,jr,1,pa,Aa)}(Ue.tileAnchorPoint,Lt,lt,0,Be,Ue),cr=Ve(I.writingMode,lt,zt,$t);if(cr)return cr}let Je=Ct(Ar*St.getoffsetX(I.glyphStartIndex),Kr,na,we,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Ue,Tr);if(!Je||Ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};He=[Je]}for(let Je of He)t.aj(Nt,Je.point,Je.angle);return{}}function Ee(Ue,I,ie,we,Se,Be){let dt=Ue.add(Ue.sub(I)._unit()),St=Se!==void 0?wt(dt.x,dt.y,Se,Be.getElevation).point:ft(dt.x,dt.y,Be).point,Nt=ie.sub(St);return ie.add(Nt._mult(we/Nt.mag()))}function Pe(Ue,I,ie){let we=I.projectionCache;if(we.projections[Ue])return we.projections[Ue];let Se=new t.P(I.lineVertexArray.getx(Ue),I.lineVertexArray.gety(Ue)),Be=ft(Se.x,Se.y,I);if(Be.signedDistanceFromCamera>0)return we.projections[Ue]=Be.point,we.anyProjectionOccluded=we.anyProjectionOccluded||Be.isOccluded,Be.point;let dt=Ue-ie.direction;return function(St,Nt,$t,Tr,Ar){return Ee(St,Nt,$t,Tr,void 0,Ar)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(dt),I.lineVertexArray.gety(dt)),Se,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function ft(Ue,I,ie){let we=Ue+ie.translation[0],Se=I+ie.translation[1],Be;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(Be=ie.projection.projectTileCoordinates(we,Se,ie.unwrappedTileID,ie.getElevation),Be.point.x=(.5*Be.point.x+.5)*ie.width,Be.point.y=(.5*-Be.point.y+.5)*ie.height):(Be=wt(we,Se,ie.labelPlaneMatrix,ie.getElevation),Be.isOccluded=!1),Be}function ct(Ue,I,ie){return Ue._unit()._perp()._mult(I*ie)}function _t(Ue,I,ie,we,Se,Be,dt,St,Nt){if(St.projectionCache.offsets[Ue])return St.projectionCache.offsets[Ue];let $t=ie.add(I);if(Ue+Nt.direction<we||Ue+Nt.direction>=Se)return St.projectionCache.offsets[Ue]=$t,$t;let Tr=Pe(Ue+Nt.direction,St,Nt),Ar=ct(Tr.sub(ie),dt,Nt.direction),Kr=ie.add(Ar),na=Tr.add(Ar);return St.projectionCache.offsets[Ue]=t.ak(Be,$t,Kr,na)||$t,St.projectionCache.offsets[Ue]}function Ct(Ue,I,ie,we,Se,Be,dt,St,Nt){let $t=we?Ue-I:Ue+I,Tr=$t>0?1:-1,Ar=0;we&&(Tr*=-1,Ar=Math.PI),Tr<0&&(Ar+=Math.PI);let Kr,na=Tr>0?Be+Se:Be+Se+1;St.projectionCache.cachedAnchorPoint?Kr=St.projectionCache.cachedAnchorPoint:(Kr=ft(St.tileAnchorPoint.x,St.tileAnchorPoint.y,St).point,St.projectionCache.cachedAnchorPoint=Kr);let He,Je,lt=Kr,vt=Kr,Lt=0,At=0,zt=Math.abs($t),cr=[],yr;for(;Lt+At<=zt;){if(na+=Tr,na<Be||na>=dt)return null;Lt+=At,vt=lt,Je=He;let Qr={absOffsetX:zt,direction:Tr,distanceFromAnchor:Lt,previousVertex:vt};if(lt=Pe(na,St,Qr),ie===0)cr.push(vt),yr=lt.sub(vt);else{let pa,Aa=lt.sub(vt);pa=Aa.mag()===0?ct(Pe(na+Tr,St,Qr).sub(lt),ie,Tr):ct(Aa,ie,Tr),Je||(Je=vt.add(pa)),He=_t(na,pa,lt,Be,dt,Je,ie,St,Qr),cr.push(Je),yr=He.sub(Je)}At=yr.mag()}let Er=yr._mult((zt-Lt)/At)._add(Je||vt),jr=Ar+Math.atan2(lt.y-vt.y,lt.x-vt.x);return cr.push(Er),{point:Er,angle:Nt?jr:0,path:cr}}let ir=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function rr(Ue,I){for(let ie=0;ie<Ue;ie++){let we=I.length;I.resize(we+4),I.float32.set(ir,3*we)}}function er(Ue,I,ie){let we=I[0],Se=I[1];return Ue[0]=ie[0]*we+ie[4]*Se+ie[12],Ue[1]=ie[1]*we+ie[5]*Se+ie[13],Ue[3]=ie[3]*we+ie[7]*Se+ie[15],Ue}let Lr=100;class fa{constructor(I,ie,we=new qr(I.width+200,I.height+200,25),Se=new qr(I.width+200,I.height+200,25)){this.transform=I,this.mapProjection=ie,this.grid=we,this.ignoredGrid=Se,this.pitchFactor=Math.cos(I._pitch)*I.cameraToCenterDistance,this.screenRightBoundary=I.width+Lr,this.screenBottomBoundary=I.height+Lr,this.gridRightBoundary=I.width+200,this.gridBottomBoundary=I.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar){let Kr=I.anchorPointX+Nt[0],na=I.anchorPointY+Nt[1],He=this.projectAndGetPerspectiveRatio(Se,Kr,na,Be,Tr),Je=we*He.perspectiveRatio,lt;if(dt||St)lt=this._projectCollisionBox(I,Je,Se,Be,dt,St,Nt,He,Tr,Ar);else{let cr=He.point.x+(Ar?Ar.x*Je:0),yr=He.point.y+(Ar?Ar.y*Je:0);lt={allPointsOccluded:!1,box:[cr+I.x1*Je,yr+I.y1*Je,cr+I.x2*Je,yr+I.y2*Je]}}let[vt,Lt,At,zt]=lt.box;return this.mapProjection.useSpecialProjectionForSymbols&&(dt?lt.allPointsOccluded:this.mapProjection.isOccluded(Kr,na,Be))||He.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(vt,Lt,At,zt)||ie!=="always"&&this.grid.hitTest(vt,Lt,At,zt,ie,$t)?{box:[vt,Lt,At,zt],placeable:!1,offscreen:!1}:{box:[vt,Lt,At,zt],placeable:!0,offscreen:this.isOffscreen(vt,Lt,At,zt)}}placeCollisionCircles(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt){let vt=[],Lt=new t.P(ie.anchorX,ie.anchorY),At=this.getPerspectiveRatio(dt,Lt.x,Lt.y,St,lt),zt=(Ar?Be/At:Be*At)/t.ap,cr={getElevation:lt,labelPlaneMatrix:Nt,lineVertexArray:we,pitchWithMap:Ar,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Lt,unwrappedTileID:St,width:this.transform.width,height:this.transform.height,translation:Je},yr=Ie(zt,Se,ie.lineOffsetX*zt,ie.lineOffsetY*zt,!1,ie,!1,cr),Er=!1,jr=!1,Qr=!0;if(yr){let pa=.5*na*At+He,Aa=new t.P(-100,-100),za=new t.P(this.screenRightBoundary,this.screenBottomBoundary),ci=new kr,Vi=yr.first,ji=yr.last,nn=[];for(let Bn=Vi.path.length-1;Bn>=1;Bn--)nn.push(Vi.path[Bn]);for(let Bn=1;Bn<ji.path.length;Bn++)nn.push(ji.path[Bn]);let Sn=2.5*pa;if($t){let Bn=this.projectPathToScreenSpace(nn,cr,$t);nn=Bn.some(wo=>wo.signedDistanceFromCamera<=0)?[]:Bn.map(wo=>wo.point)}let Kn=[];if(nn.length>0){let Bn=nn[0].clone(),wo=nn[0].clone();for(let is=1;is<nn.length;is++)Bn.x=Math.min(Bn.x,nn[is].x),Bn.y=Math.min(Bn.y,nn[is].y),wo.x=Math.max(wo.x,nn[is].x),wo.y=Math.max(wo.y,nn[is].y);Kn=Bn.x>=Aa.x&&wo.x<=za.x&&Bn.y>=Aa.y&&wo.y<=za.y?[nn]:wo.x<Aa.x||Bn.x>za.x||wo.y<Aa.y||Bn.y>za.y?[]:t.al([nn],Aa.x,Aa.y,za.x,za.y)}for(let Bn of Kn){ci.reset(Bn,.25*pa);let wo=0;wo=ci.length<=.5*pa?1:Math.ceil(ci.paddedLength/Sn)+1;for(let is=0;is<wo;is++){let Ao=is/Math.max(wo-1,1),Zo=ci.lerp(Ao),ps=Zo.x+Lr,ul=Zo.y+Lr;vt.push(ps,ul,pa,0);let tl=ps-pa,Jo=ul-pa,$o=ps+pa,Il=ul+pa;if(Qr=Qr&&this.isOffscreen(tl,Jo,$o,Il),jr=jr||this.isInsideGrid(tl,Jo,$o,Il),I!=="always"&&this.grid.hitTestCircle(ps,ul,pa,I,Kr)&&(Er=!0,!Tr))return{circles:[],offscreen:!1,collisionDetected:Er}}}}return{circles:!Tr&&Er||!jr||At<this.perspectiveRatioCutoff?[]:vt,offscreen:Qr,collisionDetected:Er}}projectPathToScreenSpace(I,ie,we){return I.map(Se=>wt(Se.x,Se.y,we,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],we=1/0,Se=1/0,Be=-1/0,dt=-1/0;for(let Tr of I){let Ar=new t.P(Tr.x+Lr,Tr.y+Lr);we=Math.min(we,Ar.x),Se=Math.min(Se,Ar.y),Be=Math.max(Be,Ar.x),dt=Math.max(dt,Ar.y),ie.push(Ar)}let St=this.grid.query(we,Se,Be,dt).concat(this.ignoredGrid.query(we,Se,Be,dt)),Nt={},$t={};for(let Tr of St){let Ar=Tr.key;if(Nt[Ar.bucketInstanceId]===void 0&&(Nt[Ar.bucketInstanceId]={}),Nt[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)&&(Nt[Ar.bucketInstanceId][Ar.featureIndex]=!0,$t[Ar.bucketInstanceId]===void 0&&($t[Ar.bucketInstanceId]=[]),$t[Ar.bucketInstanceId].push(Ar.featureIndex))}return $t}insertCollisionBox(I,ie,we,Se,Be,dt){(we?this.ignoredGrid:this.grid).insert({bucketInstanceId:Se,featureIndex:Be,collisionGroupID:dt,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,we,Se,Be,dt){let St=we?this.ignoredGrid:this.grid,Nt={bucketInstanceId:Se,featureIndex:Be,collisionGroupID:dt,overlapMode:ie};for(let $t=0;$t<I.length;$t+=4)St.insertCircle(Nt,I[$t],I[$t+1],I[$t+2])}projectAndGetPerspectiveRatio(I,ie,we,Se,Be){let dt;Be?(dt=[ie,we,Be(ie,we),1],t.af(dt,dt,I)):(dt=[ie,we,0,1],er(dt,dt,I));let St=dt[3];return{point:new t.P((dt[0]/St+1)/2*this.transform.width+Lr,(-dt[1]/St+1)/2*this.transform.height+Lr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/St*.5,isOccluded:!1,signedDistanceFromCamera:St}}getPerspectiveRatio(I,ie,we,Se,Be){let dt=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(ie,we,Se,Be):wt(ie,we,I,Be);return .5+this.transform.cameraToCenterDistance/dt.signedDistanceFromCamera*.5}isOffscreen(I,ie,we,Se){return we<Lr||I>=this.screenRightBoundary||Se<Lr||ie>this.screenBottomBoundary}isInsideGrid(I,ie,we,Se){return we>=0&&I<this.gridRightBoundary&&Se>=0&&ie<this.gridBottomBoundary}getViewportMatrix(){let I=t.an([]);return t.J(I,I,[-100,-100,0]),I}_projectCollisionBox(I,ie,we,Se,Be,dt,St,Nt,$t,Tr){let Ar=new t.P(1,0),Kr=new t.P(0,1),na=new t.P(I.anchorPointX+St[0],I.anchorPointY+St[1]);if(dt&&!Be){let Qr=this.projectAndGetPerspectiveRatio(we,na.x+1,na.y,Se,$t).point.sub(Nt.point).unit(),pa=Math.atan(Qr.y/Qr.x)+(Qr.x<0?Math.PI:0),Aa=Math.sin(pa),za=Math.cos(pa);Ar=new t.P(za,Aa),Kr=new t.P(-Aa,za)}else if(!dt&&Be){let Qr=-this.transform.angle,pa=Math.sin(Qr),Aa=Math.cos(Qr);Ar=new t.P(Aa,pa),Kr=new t.P(-pa,Aa)}let He=Nt.point,Je=ie;if(Be){He=na;let Qr=this.transform.zoom-Math.floor(this.transform.zoom);Je=Math.pow(2,-Qr),Je*=this.mapProjection.getPitchedTextCorrection(this.transform,na,Se),Tr||(Je*=t.ac(.5+Nt.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Tr&&(He=He.add(Ar.mult(Tr.x*Je)).add(Kr.mult(Tr.y*Je)));let lt=I.x1*Je,vt=I.x2*Je,Lt=(lt+vt)/2,At=I.y1*Je,zt=I.y2*Je,cr=(At+zt)/2,yr=[{offsetX:lt,offsetY:At},{offsetX:Lt,offsetY:At},{offsetX:vt,offsetY:At},{offsetX:vt,offsetY:cr},{offsetX:vt,offsetY:zt},{offsetX:Lt,offsetY:zt},{offsetX:lt,offsetY:zt},{offsetX:lt,offsetY:cr}],Er=[];for(let{offsetX:Qr,offsetY:pa}of yr)Er.push(new t.P(He.x+Ar.x*Qr+Kr.x*pa,He.y+Ar.y*Qr+Kr.y*pa));let jr=!1;if(Be){let Qr=Er.map(pa=>this.projectAndGetPerspectiveRatio(we,pa.x,pa.y,Se,$t));jr=Qr.some(pa=>!pa.isOccluded),Er=Qr.map(pa=>pa.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Da(Ue,I,ie){return I*(t.X/(Ue.tileSize*Math.pow(2,ie-Ue.tileID.overscaledZ)))}class Ia{constructor(I,ie,we,Se){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Se&&we?1:0,this.placed=we}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,we,Se,Be){this.text=new Ia(I?I.text:null,ie,we,Be),this.icon=new Ia(I?I.icon:null,ie,Se,Be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,we){this.text=I,this.icon=ie,this.skipFade=we}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,we,Se,Be){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=we,this.bucketIndex=Se,this.tileID=Be}}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:we=>we.collisionGroupID===ie}}return this.collisionGroups[I]}}function Kt(Ue,I,ie,we,Se){let{horizontalAlign:Be,verticalAlign:dt}=t.au(Ue);return new t.P(-(Be-.5)*I+we[0]*Se,-(dt-.5)*ie+we[1]*Se)}class Ft{constructor(I,ie,we,Se,Be,dt){this.transform=I.clone(),this.terrain=we,this.collisionIndex=new fa(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Se,this.retainedQueryData={},this.collisionGroups=new wi(Be),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=dt,dt&&(dt.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(we,Se)=>ie.getElevation(I,we,Se):null}getBucketParts(I,ie,we,Se){let Be=we.getBucket(ie),dt=we.latestFeatureIndex;if(!Be||!dt||ie.id!==Be.layerIds[0])return;let St=we.collisionBoxArray,Nt=Be.layers[0].layout,$t=Be.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-we.tileID.overscaledZ),Ar=we.tileSize/t.X,Kr=we.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),He=Nt.get("text-pitch-alignment")==="map",Je=Nt.get("text-rotation-alignment")==="map",lt=Da(we,1,this.transform.zoom),vt=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("text-translate"),$t.get("text-translate-anchor")),Lt=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("icon-translate"),$t.get("icon-translate-anchor")),At=Sr(na,He,Je,this.transform,lt),zt=null;if(He){let yr=Rr(na,He,Je,this.transform,lt);zt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[Be.bucketInstanceId]=new hi(Be.bucketInstanceId,dt,Be.sourceLayerIndex,Be.index,we.tileID);let cr={bucket:Be,layout:Nt,translationText:vt,translationIcon:Lt,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:At,labelToScreenMatrix:zt,scale:Tr,textPixelRatio:Ar,holdingForFade:we.holdingForFade(),collisionBoxArray:St,partiallyEvaluatedTextSize:t.ag(Be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Be.sourceID)};if(Se)for(let yr of Be.sortKeyRanges){let{sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:cr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:Be.symbolInstances.length,parameters:cr})}attemptAnchorPlacement(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt,vt,Lt,At){let zt=t.aq[I.textAnchor],cr=[I.textOffset0,I.textOffset1],yr=Kt(zt,we,Se,cr,Be),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Nt,$t,Tr,St,dt,lt,Ar.predicate,At,yr);if((!Lt||this.collisionIndex.placeCollisionBox(Lt,Kr,Nt,$t,Tr,St,dt,vt,Ar.predicate,At,yr).placeable)&&Er.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:cr,width:we,height:Se,anchor:zt,textBoxScale:Be,prevAnchor:jr},this.markUsedJustification(He,zt,na,Je),He.allowVerticalPlacement&&(this.markUsedOrientation(He,Je,na),this.placedOrientations[na.crossTileID]=Je),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,we){let{bucket:Se,layout:Be,translationText:dt,translationIcon:St,posMatrix:Nt,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Ar,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:He,partiallyEvaluatedTextSize:Je,collisionGroup:lt}=I.parameters,vt=Be.get("text-optional"),Lt=Be.get("icon-optional"),At=t.ar(Be,"text-overlap","text-allow-overlap"),zt=At==="always",cr=t.ar(Be,"icon-overlap","icon-allow-overlap"),yr=cr==="always",Er=Be.get("text-rotation-alignment")==="map",jr=Be.get("text-pitch-alignment")==="map",Qr=Be.get("icon-text-fit")!=="none",pa=Be.get("symbol-z-order")==="viewport-y",Aa=zt&&(yr||!Se.hasIconData()||Lt),za=yr&&(zt||!Se.hasTextData()||vt);!Se.collisionArrays&&He&&Se.deserializeCollisionBoxes(He);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Se.bucketInstanceId].tileID),Vi=(ji,nn,Sn)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let wo=!1,is=!1,Ao=!0,Zo=null,ps={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;nn.textFeatureIndex?Il=nn.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),nn.verticalTextFeatureIndex&&(eu=nn.verticalTextFeatureIndex);let vu=nn.textBox;if(vu){let Vl=et=>{let mt=t.ah.horizontal;if(Se.allowVerticalPlacement&&!et&&this.prevPlacement){let bt=this.prevPlacement.placedOrientations[ji.crossTileID];bt&&(this.placedOrientations[ji.crossTileID]=bt,mt=bt,this.markUsedOrientation(Se,mt,ji))}return mt},Gl=(et,mt)=>{if(Se.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&nn.verticalTextBox){for(let bt of Se.writingModes)if(bt===t.ah.vertical?(ps=mt(),ul=ps):ps=et(),ps&&ps.placeable)break}else ps=et()},de=ji.textAnchorOffsetStartIndex,Fe=ji.textAnchorOffsetEndIndex;if(Fe===de){let et=(mt,bt)=>{let Mt=this.collisionIndex.placeCollisionBox(mt,At,Kr,Nt,$t,jr,Er,dt,lt.predicate,ci);return Mt&&Mt.placeable&&(this.markUsedOrientation(Se,bt,ji),this.placedOrientations[ji.crossTileID]=bt),Mt};Gl(()=>et(vu,t.ah.horizontal),()=>{let mt=nn.verticalTextBox;return Se.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&mt?et(mt,t.ah.vertical):{box:null,offscreen:null}}),Vl(ps&&ps.placeable)}else{let et=t.aq[(Bn=(Kn=this.prevPlacement)===null||Kn===void 0?void 0:Kn.variableOffsets[ji.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],mt=(Mt,ar,Ot)=>{let _r=Mt.x2-Mt.x1,Gr=Mt.y2-Mt.y1,Xr=ji.textBoxScale,xa=Qr&&cr==="never"?ar:null,da=null,Ja=At==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Sa<Ja;Sa++){for(let Fa=de;Fa<Fe;Fa++){let Xa=Se.textAnchorOffsets.get(Fa);if(et&&Xa.textAnchor!==et)continue;let fi=this.attemptAnchorPlacement(Xa,Mt,_r,Gr,Xr,Er,jr,Kr,Nt,$t,lt,ti,ji,Se,Ot,dt,St,xa,ci);if(fi&&(da=fi.placedGlyphBoxes,da&&da.placeable))return wo=!0,Zo=fi.shift,da}et?et=null:ti=At}return we&&!da&&(da={box:this.collisionIndex.placeCollisionBox(vu,"always",Kr,Nt,$t,jr,Er,dt,lt.predicate,ci,new t.P(0,0)).box,offscreen:!1,placeable:!1}),da};Gl(()=>mt(vu,nn.iconBox,t.ah.horizontal),()=>{let Mt=nn.verticalTextBox;return Se.allowVerticalPlacement&&(!ps||!ps.placeable)&&ji.numVerticalGlyphVertices>0&&Mt?mt(Mt,nn.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ps&&(wo=ps.placeable,Ao=ps.offscreen);let bt=Vl(ps&&ps.placeable);if(!wo&&this.prevPlacement){let Mt=this.prevPlacement.variableOffsets[ji.crossTileID];Mt&&(this.variableOffsets[ji.crossTileID]=Mt,this.markUsedJustification(Se,Mt.anchor,ji,bt))}}}if(tl=ps,wo=tl&&tl.placeable,Ao=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Vl=Se.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Gl=t.ai(Se.textSizeData,Je,Vl),de=Be.get("text-padding");Jo=this.collisionIndex.placeCollisionCircles(At,Vl,Se.lineVertexArray,Se.glyphOffsetArray,Gl,Nt,$t,Tr,Ar,we,jr,lt.predicate,ji.collisionCircleDiameter,de,dt,ci),Jo.circles.length&&Jo.collisionDetected&&!we&&t.w("Collisions detected, but collision boxes are not shown"),wo=zt||Jo.circles.length>0&&!Jo.collisionDetected,Ao=Ao&&Jo.offscreen}if(nn.iconFeatureIndex&&(Ru=nn.iconFeatureIndex),nn.iconBox){let Vl=Gl=>this.collisionIndex.placeCollisionBox(Gl,cr,Kr,Nt,$t,jr,Er,St,lt.predicate,ci,Qr&&Zo?Zo:void 0);ul&&ul.placeable&&nn.verticalIconBox?($o=Vl(nn.verticalIconBox),is=$o.placeable):($o=Vl(nn.iconBox),is=$o.placeable),Ao=Ao&&$o.offscreen}let Tl=vt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,cu=Lt||ji.numIconVertices===0;Tl||cu?cu?Tl||(is=is&&wo):wo=is&&wo:is=wo=is&&wo;let uc=is&&$o.placeable;if(wo&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,At,Be.get("text-ignore-placement"),Se.bucketInstanceId,ul&&ul.placeable&&eu?eu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox($o.box,cr,Be.get("icon-ignore-placement"),Se.bucketInstanceId,Ru,lt.ID),Jo&&wo&&this.collisionIndex.insertCollisionCircles(Jo.circles,At,Be.get("text-ignore-placement"),Se.bucketInstanceId,Il,lt.ID),we&&this.storeCollisionData(Se.bucketInstanceId,Sn,nn,tl,$o,Jo),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Se.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(wo||Aa,is||za,Ao||Se.justReloaded),ie[ji.crossTileID]=!0};if(pa){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Se.getSortedSymbolIndexes(this.transform.angle);for(let nn=ji.length-1;nn>=0;--nn){let Sn=ji[nn];Vi(Se.symbolInstances.get(Sn),Se.collisionArrays[Sn],Sn)}}else for(let ji=I.symbolInstanceStart;ji<I.symbolInstanceEnd;ji++)Vi(Se.symbolInstances.get(ji),Se.collisionArrays[ji],ji);if(we&&Se.bucketInstanceId in this.collisionCircleArrays){let ji=this.collisionCircleArrays[Se.bucketInstanceId];t.as(ji.invProjMatrix,Nt),ji.viewportMatrix=this.collisionIndex.getViewportMatrix()}Se.justReloaded=!1}storeCollisionData(I,ie,we,Se,Be,dt){if(we.textBox||we.iconBox){let St,Nt;this.collisionBoxArrays.has(I)?St=this.collisionBoxArrays.get(I):(St=new Map,this.collisionBoxArrays.set(I,St)),St.has(ie)?Nt=St.get(ie):(Nt={text:null,icon:null},St.set(ie,Nt)),we.textBox&&(Nt.text=Se.box),we.iconBox&&(Nt.icon=Be.box)}if(dt){let St=this.collisionCircleArrays[I];St===void 0&&(St=this.collisionCircleArrays[I]=new Ca);for(let Nt=0;Nt<dt.circles.length;Nt+=4)St.circles.push(dt.circles[Nt+0]),St.circles.push(dt.circles[Nt+1]),St.circles.push(dt.circles[Nt+2]),St.circles.push(dt.collisionDetected?1:0)}}markUsedJustification(I,ie,we,Se){let Be;Be=Se===t.ah.vertical?we.verticalPlacedTextSymbolIndex:{left:we.leftJustifiedTextSymbolIndex,center:we.centerJustifiedTextSymbolIndex,right:we.rightJustifiedTextSymbolIndex}[t.at(ie)];let dt=[we.leftJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.rightJustifiedTextSymbolIndex,we.verticalPlacedTextSymbolIndex];for(let St of dt)St>=0&&(I.text.placedSymbolArray.get(St).crossTileID=Be>=0&&St!==Be?0:we.crossTileID)}markUsedOrientation(I,ie,we){let Se=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,Be=ie===t.ah.vertical?ie:0,dt=[we.leftJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.rightJustifiedTextSymbolIndex];for(let St of dt)I.text.placedSymbolArray.get(St).placedOrientation=Se;we.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(we.verticalPlacedTextSymbolIndex).placedOrientation=Be)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,we=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Se=ie?ie.symbolFadeChange(I):1,Be=ie?ie.opacities:{},dt=ie?ie.variableOffsets:{},St=ie?ie.placedOrientations:{};for(let Nt in this.placements){let $t=this.placements[Nt],Tr=Be[Nt];Tr?(this.opacities[Nt]=new qa(Tr,Se,$t.text,$t.icon),we=we||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Nt]=new qa(null,Se,$t.text,$t.icon,$t.skipFade),we=we||$t.text||$t.icon)}for(let Nt in Be){let $t=Be[Nt];if(!this.opacities[Nt]){let Tr=new qa($t,Se,!1,!1);Tr.isHidden()||(this.opacities[Nt]=Tr,we=we||$t.text.placed||$t.icon.placed)}}for(let Nt in dt)this.variableOffsets[Nt]||!this.opacities[Nt]||this.opacities[Nt].isHidden()||(this.variableOffsets[Nt]=dt[Nt]);for(let Nt in St)this.placedOrientations[Nt]||!this.opacities[Nt]||this.opacities[Nt].isHidden()||(this.placedOrientations[Nt]=St[Nt]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");we?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let we={};for(let Se of ie){let Be=Se.getBucket(I);Be&&Se.latestFeatureIndex&&I.id===Be.layerIds[0]&&this.updateBucketOpacities(Be,Se.tileID,we,Se.collisionBoxArray)}}updateBucketOpacities(I,ie,we,Se){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 Be=I.layers[0],dt=Be.layout,St=new qa(null,0,!1,!1,!0),Nt=dt.get("text-allow-overlap"),$t=dt.get("icon-allow-overlap"),Tr=Be._unevaluatedLayout.hasValue("text-variable-anchor")||Be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ar=dt.get("text-rotation-alignment")==="map",Kr=dt.get("text-pitch-alignment")==="map",na=dt.get("icon-text-fit")!=="none",He=new qa(null,0,Nt&&($t||!I.hasIconData()||dt.get("icon-optional")),$t&&(Nt||!I.hasTextData()||dt.get("text-optional")),!0);!I.collisionArrays&&Se&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Se);let Je=(vt,Lt,At)=>{for(let zt=0;zt<Lt/4;zt++)vt.opacityVertexArray.emplaceBack(At);vt.hasVisibleVertices=vt.hasVisibleVertices||At!==ri},lt=this.collisionBoxArrays.get(I.bucketInstanceId);for(let vt=0;vt<I.symbolInstances.length;vt++){let Lt=I.symbolInstances.get(vt),{numHorizontalGlyphVertices:At,numVerticalGlyphVertices:zt,crossTileID:cr}=Lt,yr=this.opacities[cr];we[cr]?yr=St:yr||(yr=He,this.opacities[cr]=yr),we[cr]=!0;let Er=Lt.numIconVertices>0,jr=this.placedOrientations[Lt.crossTileID],Qr=jr===t.ah.vertical,pa=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(At>0||zt>0){let za=Za(yr.text);Je(I.text,At,Qr?ri:za),Je(I.text,zt,pa?ri:za);let ci=yr.text.isHidden();[Lt.rightJustifiedTextSymbolIndex,Lt.centerJustifiedTextSymbolIndex,Lt.leftJustifiedTextSymbolIndex].forEach(nn=>{nn>=0&&(I.text.placedSymbolArray.get(nn).hidden=ci||Qr?1:0)}),Lt.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Lt.verticalPlacedTextSymbolIndex).hidden=ci||pa?1:0);let Vi=this.variableOffsets[Lt.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Lt,jr);let ji=this.placedOrientations[Lt.crossTileID];ji&&(this.markUsedJustification(I,"left",Lt,ji),this.markUsedOrientation(I,ji,Lt))}if(Er){let za=Za(yr.icon),ci=!(na&&Lt.verticalPlacedIconSymbolIndex&&Qr);Lt.placedIconSymbolIndex>=0&&(Je(I.icon,Lt.numIconVertices,ci?za:ri),I.icon.placedSymbolArray.get(Lt.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Lt.verticalPlacedIconSymbolIndex>=0&&(Je(I.icon,Lt.numVerticalIconVertices,ci?ri:za),I.icon.placedSymbolArray.get(Lt.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=lt&&lt.has(vt)?lt.get(vt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let za=I.collisionArrays[vt];if(za){let ci=new t.P(0,0);if(za.textBox||za.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[cr];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(za.textBox||za.verticalTextBox){let ji;za.textBox&&(ji=Qr),za.verticalTextBox&&(ji=pa),Yt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(za.iconBox||za.verticalIconBox){let Vi=!!(!pa&&za.verticalIconBox),ji;za.iconBox&&(ji=Vi),za.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 vt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=vt.invProjMatrix,I.placementViewportMatrix=vt.viewportMatrix,I.collisionCircleArray=vt.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 we=this.zoomAtLastRecencyCheck===ie?1-this.zoomAdjustment(ie):1;return this.zoomAtLastRecencyCheck=ie,this.commitTime+this.fadeDuration*we>I}setStale(){this.stale=!0}}function Yt(Ue,I,ie,we,Se,Be){we&&we.length!==0||(we=[0,0,0,0]);let dt=we[0]-Lr,St=we[1]-Lr,Nt=we[2]-Lr,$t=we[3]-Lr;Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,dt,St),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,Nt,St),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,Nt,$t),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,dt,$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(Ue){if(Ue.opacity===0&&!Ue.placed)return 0;if(Ue.opacity===1&&Ue.placed)return 4294967295;let I=Ue.placed?1:0,ie=Math.floor(127*Ue.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Ue,I,ie)=>!1,getPitchedTextCorrection:(Ue,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Ue,I,ie,we){throw new Error("Not implemented.")},translatePosition:(Ue,I,ie,we)=>function(Se,Be,dt,St,Nt=!1){if(!dt[0]&&!dt[1])return[0,0];let $t=Nt?St==="map"?Se.angle:0:St==="viewport"?-Se.angle:0;if($t){let Tr=Math.sin($t),Ar=Math.cos($t);dt=[dt[0]*Ar-dt[1]*Tr,dt[0]*Tr+dt[1]*Ar]}return[Nt?dt[0]:Da(Be,dt[0],Se.zoom),Nt?dt[1]:Da(Be,dt[1],Se.zoom)]}(Ue,I,ie,we),getCircleRadiusCorrection:Ue=>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,we,Se,Be){let dt=this._bucketParts;for(;this._currentTileIndex<I.length;)if(ie.getBucketParts(dt,Se,I[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,Be())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,dt.sort((St,Nt)=>St.sortKey-Nt.sortKey));this._currentPartIndex<dt.length;)if(ie.placeLayerBucketPart(dt[this._currentPartIndex],this._seenCrossTileIDs,we),this._currentPartIndex++,Be())return!0;return!1}}class tn{constructor(I,ie,we,Se,Be,dt,St,Nt){this.placement=new Ft(I,pi(),ie,dt,St,Nt),this._currentPlacementIndex=we.length-1,this._forceFullPlacement=Se,this._showCollisionBoxes=Be,this._done=!1}isDone(){return this._done}continuePlacement(I,ie,we){let Se=n.now(),Be=()=>!this._forceFullPlacement&&n.now()-Se>2;for(;this._currentPlacementIndex>=0;){let dt=ie[I[this._currentPlacementIndex]],St=this.placement.collisionIndex.transform.zoom;if(dt.type==="symbol"&&(!dt.minzoom||dt.minzoom<=St)&&(!dt.maxzoom||dt.maxzoom>St)){if(this._inProgressLayer||(this._inProgressLayer=new Ra(dt)),this._inProgressLayer.continuePlacement(we[dt.source],this.placement,this._showCollisionBoxes,dt,Be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let on=512/t.X/2;class hn{constructor(I,ie,we){this.tileID=I,this.bucketInstanceId=we,this._symbolsByKey={};let Se=new Map;for(let Be=0;Be<ie.length;Be++){let dt=ie.get(Be),St=dt.key,Nt=Se.get(St);Nt?Nt.push(dt):Se.set(St,[dt])}for(let[Be,dt]of Se){let St={positions:dt.map(Nt=>({x:Math.floor(Nt.anchorX*on),y:Math.floor(Nt.anchorY*on)})),crossTileIDs:dt.map(Nt=>Nt.crossTileID)};if(St.positions.length>128){let Nt=new t.av(St.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of St.positions)Nt.add($t,Tr);Nt.finish(),delete St.positions,St.index=Nt}this._symbolsByKey[Be]=St}}getScaledCoordinates(I,ie){let{x:we,y:Se,z:Be}=this.tileID.canonical,{x:dt,y:St,z:Nt}=ie.canonical,$t=on/Math.pow(2,Nt-Be),Tr=(St*t.X+I.anchorY)*$t,Ar=Se*t.X*on;return{x:Math.floor((dt*t.X+I.anchorX)*$t-we*t.X*on),y:Math.floor(Tr-Ar)}}findMatches(I,ie,we){let Se=this.tileID.canonical.z<ie.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ie.canonical.z);for(let Be=0;Be<I.length;Be++){let dt=I.get(Be);if(dt.crossTileID)continue;let St=this._symbolsByKey[dt.key];if(!St)continue;let Nt=this.getScaledCoordinates(dt,ie);if(St.index){let $t=St.index.range(Nt.x-Se,Nt.y-Se,Nt.x+Se,Nt.y+Se).sort();for(let Tr of $t){let Ar=St.crossTileIDs[Tr];if(!we[Ar]){we[Ar]=!0,dt.crossTileID=Ar;break}}}else if(St.positions)for(let $t=0;$t<St.positions.length;$t++){let Tr=St.positions[$t],Ar=St.crossTileIDs[$t];if(Math.abs(Tr.x-Nt.x)<=Se&&Math.abs(Tr.y-Nt.y)<=Se&&!we[Ar]){we[Ar]=!0,dt.crossTileID=Ar;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:I})=>I)}}class Tt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ut{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ie=Math.round((I-this.lng)/360);if(ie!==0)for(let we in this.indexes){let Se=this.indexes[we],Be={};for(let dt in Se){let St=Se[dt];St.tileID=St.tileID.unwrapTo(St.tileID.wrap+ie),Be[St.tileID.key]=St}this.indexes[we]=Be}this.lng=I}addBucket(I,ie,we){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 Be=0;Be<ie.symbolInstances.length;Be++)ie.symbolInstances.get(Be).crossTileID=0;this.usedCrossTileIDs[I.overscaledZ]||(this.usedCrossTileIDs[I.overscaledZ]={});let Se=this.usedCrossTileIDs[I.overscaledZ];for(let Be in this.indexes){let dt=this.indexes[Be];if(Number(Be)>I.overscaledZ)for(let St in dt){let Nt=dt[St];Nt.tileID.isChildOf(I)&&Nt.findMatches(ie.symbolInstances,I,Se)}else{let St=dt[I.scaledTo(Number(Be)).key];St&&St.findMatches(ie.symbolInstances,I,Se)}}for(let Be=0;Be<ie.symbolInstances.length;Be++){let dt=ie.symbolInstances.get(Be);dt.crossTileID||(dt.crossTileID=we.generate(),Se[dt.crossTileID]=!0)}return this.indexes[I.overscaledZ]===void 0&&(this.indexes[I.overscaledZ]={}),this.indexes[I.overscaledZ][I.key]=new hn(I,ie.symbolInstances,ie.bucketInstanceId),!0}removeBucketCrossTileIDs(I,ie){for(let we of ie.getCrossTileIDsLists())for(let Se of we)delete this.usedCrossTileIDs[I][Se]}removeStaleBuckets(I){let ie=!1;for(let we in this.indexes){let Se=this.indexes[we];for(let Be in Se)I[Se[Be].bucketInstanceId]||(this.removeBucketCrossTileIDs(we,Se[Be]),delete Se[Be],ie=!0)}return ie}}class Br{constructor(){this.layerIndexes={},this.crossTileIDs=new Tt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(I,ie,we){let Se=this.layerIndexes[I.id];Se===void 0&&(Se=this.layerIndexes[I.id]=new ut);let Be=!1,dt={};Se.handleWrapJump(we);for(let St of ie){let Nt=St.getBucket(I);Nt&&I.id===Nt.layerIds[0]&&(Nt.bucketInstanceId||(Nt.bucketInstanceId=++this.maxBucketInstanceId),Se.addBucket(St.tileID,Nt,this.crossTileIDs)&&(Be=!0),dt[Nt.bucketInstanceId]=!0)}return Se.removeStaleBuckets(dt)&&(Be=!0),Be}pruneUnusedLayers(I){let ie={};I.forEach(we=>{ie[we]=!0});for(let we in this.layerIndexes)ie[we]||delete this.layerIndexes[we]}}let Cr=(Ue,I)=>t.t(Ue,I&&I.filter(ie=>ie.identifier!=="source.canvas")),xr=t.aw();class Ir extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let we in this.sourceCaches){let Se=this.sourceCaches[we].getSource().type;Se!=="vector"&&Se!=="geojson"||this.sourceCaches[we].reload()}},this.map=I,this.dispatcher=new ee(Y(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(we,Se)=>this.getGlyphs(we,Se)),this.dispatcher.registerMessageHandler("GI",(we,Se)=>this.getImages(we,Se)),this.imageManager=new f,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()),tt().on(ye,this._rtlPluginLoaded),this.on("data",we=>{if(we.dataType!=="source"||we.sourceDataType!=="metadata")return;let Se=this.sourceCaches[we.sourceId];if(!Se)return;let Be=Se.getSource();if(Be&&Be.vectorLayerIds)for(let dt in this._layers){let St=this._layers[dt];St.source===Be.id&&this._validateLayer(St)}})}loadURL(I,ie={},we){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Se=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let Be=this._loadStyleRequest;t.h(Se,this._loadStyleRequest).then(dt=>{this._loadStyleRequest=null,this._load(dt.data,ie,we)}).catch(dt=>{this._loadStyleRequest=null,dt&&!Be.signal.aborted&&this.fire(new t.j(dt))})}loadJSON(I,ie={},we){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,we)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(xr,{validate:!1})}_load(I,ie,we){var Se;let Be=ie.transformStyle?ie.transformStyle(we,I):I;if(!ie.validate||!Cr(this,t.u(Be))){this._loaded=!0,this.stylesheet=Be;for(let dt in Be.sources)this.addSource(dt,Be.sources[dt],{validate:!1});Be.sprite?this._loadSprite(Be.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Be.glyphs),this._createLayers(),this.light=new P(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Se=this.stylesheet.terrain)!==null&&Se!==void 0?Se: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 we=t.aA(ie);we.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=we}}_loadSprite(I,ie=!1,we=void 0){let Se;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Be,dt,St,Nt){return t._(this,void 0,void 0,function*(){let $t=b(Be),Tr=St>1?"@2x":"",Ar={},Kr={};for(let{id:na,url:He}of $t){let Je=dt.transformRequest(d(He,Tr,".json"),"SpriteJSON");Ar[na]=t.h(Je,Nt);let lt=dt.transformRequest(d(He,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Nt)}return yield Promise.all([...Object.values(Ar),...Object.values(Kr)]),function(na,He){return t._(this,void 0,void 0,function*(){let Je={};for(let lt in na){Je[lt]={};let vt=n.getImageCanvasContext((yield He[lt]).data),Lt=(yield na[lt]).data;for(let At in Lt){let{width:zt,height:cr,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:pa,stretchY:Aa,content:za,textFitWidth:ci,textFitHeight:Vi}=Lt[At];Je[lt][At]={data:null,pixelRatio:Qr,sdf:jr,stretchX:pa,stretchY:Aa,content:za,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:zt,height:cr,x:yr,y:Er,context:vt}}}}return Je})}(Ar,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Be=>{if(this._spriteRequest=null,Be)for(let dt in Be){this._spritesImagesIds[dt]=[];let St=this._spritesImagesIds[dt]?this._spritesImagesIds[dt].filter(Nt=>!(Nt in Be)):[];for(let Nt of St)this.imageManager.removeImage(Nt),this._changedImages[Nt]=!0;for(let Nt in Be[dt]){let $t=dt==="default"?Nt:`${dt}:${Nt}`;this._spritesImagesIds[dt].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,Be[dt][Nt],!1):this.imageManager.addImage($t,Be[dt][Nt]),ie&&(this._changedImages[$t]=!0)}}}).catch(Be=>{this._spriteRequest=null,Se=Be,this.fire(new t.j(Se))}).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"})),we&&we(Se)})}_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 we=I.sourceLayer;if(!we)return;let Se=ie.getSource();(Se.type==="geojson"||Se.vectorLayerIds&&Se.vectorLayerIds.indexOf(we)===-1)&&this.fire(new t.j(new Error(`Source layer "${we}" does not exist on source "${Se.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 we=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(we):we);let Se=[];for(let Be of I)if(we[Be]){let dt=ie?t.aB(we[Be]):we[Be];Se.push(dt)}return Se}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let we of ie){let Se=this._layers[we];Se.type!=="custom"&&(I[we]=Se.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 Se=Object.keys(this._updatedLayers),Be=Object.keys(this._removedLayers);(Se.length||Be.length)&&this._updateWorkerLayers(Se,Be);for(let dt in this._updatedSources){let St=this._updatedSources[dt];if(St==="reload")this._reloadSource(dt);else{if(St!=="clear")throw new Error(`Invalid action ${St}`);this._clearSource(dt)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let dt in this._updatedPaintProps)this._layers[dt].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let we={};for(let Se in this.sourceCaches){let Be=this.sourceCaches[Se];we[Se]=Be.used,Be.used=!1}for(let Se of this._order){let Be=this._layers[Se];Be.recalculate(I,this._availableImages),!Be.isHidden(I.zoom)&&Be.source&&(this.sourceCaches[Be.source].used=!0)}for(let Se in we){let Be=this.sourceCaches[Se];!!we[Se]!=!!Be.used&&Be.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Se}))}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 we;this._checkLoaded();let Se=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Se,I):I,((we=ie.validate)===null||we===void 0||we)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let Be=t.aC(Se,I),dt=this._getOperationsToPerform(Be);if(dt.unimplemented.length>0)throw new Error(`Unimplemented: ${dt.unimplemented.join(", ")}.`);if(dt.operations.length===0)return!1;for(let St of dt.operations)St();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],we=[];for(let Se of I)switch(Se.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Se.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Se.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Se.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Se.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Se.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Se.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Se.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Se.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Se.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Se.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Se.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Se.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Se.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Se.args));break;case"setTransition":ie.push(()=>{});break;default:we.push(Se.command)}return{operations:ie,unimplemented:we}}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,we={}){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,we))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Se=this.sourceCaches[I]=new It(I,ie,this.dispatcher);Se.style=this,Se.setEventedParent(this,()=>({isSourceLoaded:Se.loaded(),source:Se.serialize(),sourceId:I})),Se.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 we in this._layers)if(this._layers[we].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${we}" 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 we=this.sourceCaches[I].getSource();if(we.type!=="geojson")throw new Error(`geojsonSource.type is ${we.type}, which is !== 'geojson`);we.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,we={}){this._checkLoaded();let Se=I.id;if(this.getLayer(Se))return void this.fire(new t.j(new Error(`Layer "${Se}" already exists on this map.`)));let Be;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;Be=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Se,I.source),I=t.aB(I),I=t.e(I,{source:Se})),this._validate(t.u.layer,`layers.${Se}`,I,{arrayIndex:-1},we))return;Be=t.aA(I),this._validateLayer(Be),Be.setEventedParent(this,{layer:{id:Se}})}let dt=ie?this._order.indexOf(ie):this._order.length;if(ie&&dt===-1)this.fire(new t.j(new Error(`Cannot add layer "${Se}" before non-existing layer "${ie}".`)));else{if(this._order.splice(dt,0,Se),this._layerOrderChanged=!0,this._layers[Se]=Be,this._removedLayers[Se]&&Be.source&&Be.type!=="custom"){let St=this._removedLayers[Se];delete this._removedLayers[Se],St.type!==Be.type?this._updatedSources[Be.source]="clear":(this._updatedSources[Be.source]="reload",this.sourceCaches[Be.source].pause())}this._updateLayer(Be),Be.onAdd&&Be.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 we=this._order.indexOf(I);this._order.splice(we,1);let Se=ie?this._order.indexOf(ie):this._order.length;ie&&Se===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Se,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 we=this._order.indexOf(I);this._order.splice(we,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,we){this._checkLoaded();let Se=this.getLayer(I);Se?Se.minzoom===ie&&Se.maxzoom===we||(ie!=null&&(Se.minzoom=ie),we!=null&&(Se.maxzoom=we),this._updateLayer(Se)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,we={}){this._checkLoaded();let Se=this.getLayer(I);if(Se){if(!t.aE(Se.filter,ie))return ie==null?(Se.filter=void 0,void this._updateLayer(Se)):void(this._validate(t.u.filter,`layers.${Se.id}.filter`,ie,null,we)||(Se.filter=t.aB(ie),this._updateLayer(Se)))}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,we,Se={}){this._checkLoaded();let Be=this.getLayer(I);Be?t.aE(Be.getLayoutProperty(ie),we)||(Be.setLayoutProperty(ie,we,Se),this._updateLayer(Be)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let we=this.getLayer(I);if(we)return we.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,we,Se={}){this._checkLoaded();let Be=this.getLayer(I);Be?t.aE(Be.getPaintProperty(ie),we)||(Be.setPaintProperty(ie,we,Se)&&this._updateLayer(Be),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 we=I.source,Se=I.sourceLayer,Be=this.sourceCaches[we];if(Be===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let dt=Be.getSource().type;dt==="geojson"&&Se?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):dt!=="vector"||Se?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Be.setFeatureState(Se,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 we=I.source,Se=this.sourceCaches[we];if(Se===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let Be=Se.getSource().type,dt=Be==="vector"?I.sourceLayer:void 0;Be!=="vector"||dt?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."))):Se.removeFeatureState(dt,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,we=I.sourceLayer,Se=this.sourceCaches[ie];if(Se!==void 0)return Se.getSource().type!=="vector"||we?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Se.getFeatureState(we,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,Be=>Be.serialize()),ie=this._serializeByIds(this._order,!0),we=this.map.getTerrain()||void 0,Se=this.stylesheet;return t.aG({version:Se.version,name:Se.name,metadata:Se.metadata,light:Se.light,sky:Se.sky,center:Se.center,zoom:Se.zoom,bearing:Se.bearing,pitch:Se.pitch,sprite:Se.sprite,glyphs:Se.glyphs,transition:Se.transition,sources:I,layers:ie,terrain:we},Be=>Be!==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=dt=>this._layers[dt].type==="fill-extrusion",we={},Se=[];for(let dt=this._order.length-1;dt>=0;dt--){let St=this._order[dt];if(ie(St)){we[St]=dt;for(let Nt of I){let $t=Nt[St];if($t)for(let Tr of $t)Se.push(Tr)}}}Se.sort((dt,St)=>St.intersectionZ-dt.intersectionZ);let Be=[];for(let dt=this._order.length-1;dt>=0;dt--){let St=this._order[dt];if(ie(St))for(let Nt=Se.length-1;Nt>=0;Nt--){let $t=Se[Nt].feature;if(we[$t.layer.id]<dt)break;Be.push($t),Se.pop()}else for(let Nt of I){let $t=Nt[St];if($t)for(let Tr of $t)Be.push(Tr.feature)}}return Be}queryRenderedFeatures(I,ie,we){ie&&ie.filter&&this._validate(t.u.filter,"queryRenderedFeatures.filter",ie.filter,null,ie);let Se={};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 St of ie.layers){let Nt=this._layers[St];if(!Nt)return this.fire(new t.j(new Error(`The layer '${St}' does not exist in the map's style and cannot be queried for features.`))),[];Se[Nt.source]=!0}}let Be=[];ie.availableImages=this._availableImages;let dt=this._serializedAllLayers();for(let St in this.sourceCaches)ie.layers&&!Se[St]||Be.push(ae(this.sourceCaches[St],this._layers,dt,I,ie,we));return this.placement&&Be.push(function(St,Nt,$t,Tr,Ar,Kr,na){let He={},Je=Kr.queryRenderedSymbols(Tr),lt=[];for(let vt of Object.keys(Je).map(Number))lt.push(na[vt]);lt.sort(j);for(let vt of lt){let Lt=vt.featureIndex.lookupSymbolFeatures(Je[vt.bucketInstanceId],Nt,vt.bucketIndex,vt.sourceLayerIndex,Ar.filter,Ar.layers,Ar.availableImages,St);for(let At in Lt){let zt=He[At]=He[At]||[],cr=Lt[At];cr.sort((yr,Er)=>{let jr=vt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of cr)zt.push(yr)}}for(let vt in He)He[vt].forEach(Lt=>{let At=Lt.feature,zt=$t[St[vt].source].getFeatureState(At.layer["source-layer"],At.id);At.source=At.layer.source,At.layer["source-layer"]&&(At.sourceLayer=At.layer["source-layer"]),At.state=zt});return He}(this._layers,dt,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Be)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let we=this.sourceCaches[I];return we?function(Se,Be){let dt=Se.getRenderableIds().map($t=>Se.getTileByID($t)),St=[],Nt={};for(let $t=0;$t<dt.length;$t++){let Tr=dt[$t],Ar=Tr.tileID.canonical.key;Nt[Ar]||(Nt[Ar]=!0,Tr.querySourceFeatures(St,Be))}return St}(we,ie):[]}getLight(){return this.light.getLight()}setLight(I,ie={}){this._checkLoaded();let we=this.light.getLight(),Se=!1;for(let dt in I)if(!t.aE(I[dt],we[dt])){Se=!0;break}if(!Se)return;let Be={now:n.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(I,ie),this.light.updateTransitions(Be)}getSky(){var I;return(I=this.stylesheet)===null||I===void 0?void 0:I.sky}setSky(I,ie={}){let we=this.getSky(),Se=!1;if(!I&&!we)return;if(I&&!we)Se=!0;else if(!I&&we)Se=!0;else for(let dt in I)if(!t.aE(I[dt],we[dt])){Se=!0;break}if(!Se)return;let Be={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(Be)}_validate(I,ie,we,Se,Be={}){return(!Be||Be.validate!==!1)&&Cr(this,I.call(t.u,t.e({key:ie,style:this.serialize(),value:we,styleSpec:t.v},Se)))}_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),tt().off(ye,this._rtlPluginLoaded);for(let ie in this._layers)this._layers[ie].setEventedParent(null);for(let ie in this.sourceCaches){let we=this.sourceCaches[ie];we.setEventedParent(null),we.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,we,Se,Be=!1){let dt=!1,St=!1,Nt={};for(let $t of this._order){let Tr=this._layers[$t];if(Tr.type!=="symbol")continue;if(!Nt[Tr.source]){let Kr=this.sourceCaches[Tr.source];Nt[Tr.source]=Kr.getRenderableIds(!0).map(na=>Kr.getTileByID(na)).sort((na,He)=>He.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(He.tileID)?-1:1))}let Ar=this.crossTileSymbolIndex.addLayer(Tr,Nt[Tr.source],I.center.lng);dt=dt||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Be=Be||this._layerOrderChanged||we===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),I.zoom))&&(this.pauseablePlacement=new tn(I,this.map.terrain,this._order,Be,ie,we,Se,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Nt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),St=!0),dt&&this.pauseablePlacement.placement.setStale()),St||dt)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Nt[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 we=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Se=this.sourceCaches[ie.source];return Se&&Se.setDependencies(ie.tileID.key,ie.type,ie.icons),we})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let we=yield this.glyphManager.getGlyphs(ie.stacks),Se=this.sourceCaches[ie.source];return Se&&Se.setDependencies(ie.tileID.key,ie.type,[""]),we})}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,we={},Se){this._checkLoaded();let Be=[{id:I,url:ie}],dt=[...b(this.stylesheet.sprite),...Be];this._validate(t.u.sprite,"sprite",dt,null,we)||(this.stylesheet.sprite=dt,this._loadSprite(Be,!0,Se))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(we=>we.id===I)){if(this._spritesImagesIds[I])for(let we of this._spritesImagesIds[I])this.imageManager.removeImage(we),this._changedImages[we]=!0;ie.splice(ie.findIndex(we=>we.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={},we){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,we):(this._unloadSprite(),we&&we(null)))}}var Ur=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:xt(`#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:xt(`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:xt(`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:xt(`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:xt("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:xt(`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:xt(`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:xt("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:xt("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:xt("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:xt(`#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:xt(`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:xt(`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:xt(`#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:xt(`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:xt(`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:xt(`#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:xt(`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:xt(`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:xt(`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:xt(`#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:xt(`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:xt(`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:xt(`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:xt(`#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:xt(`#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:xt("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:xt("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:xt("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:xt("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 xt(Ue,I){let ie=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,we=I.match(/attribute ([\w]+) ([\w]+)/g),Se=Ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Be=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),dt=Be?Be.concat(Se):Se,St={};return{fragmentSource:Ue=Ue.replace(ie,(Nt,$t,Tr,Ar,Kr)=>(St[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,(Nt,$t,Tr,Ar,Kr)=>{let na=Ar==="float"?"vec2":"vec4",He=Kr.match(/color/)?"color":na;return St[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
`:He==="vec4"?`
#ifndef HAS_UNIFORM_u_${Kr}
${Kr} = a_${Kr};
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Kr}
${Kr} = unpack_mix_${He}(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
`:He==="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_${He}(a_${Kr}, u_${Kr}_t);
#else
${Tr} ${Ar} ${Kr} = u_${Kr};
#endif
`}),staticAttributes:we,staticUniforms:dt}}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,we,Se,Be,dt,St,Nt,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Se.length;for(let Ar=0;!Tr&&Ar<Se.length;Ar++)this.boundPaintVertexBuffers[Ar]!==Se[Ar]&&(Tr=!0);!this.vao||this.boundProgram!==ie||this.boundLayoutVertexBuffer!==we||Tr||this.boundIndexBuffer!==Be||this.boundVertexOffset!==dt||this.boundDynamicVertexBuffer!==St||this.boundDynamicVertexBuffer2!==Nt||this.boundDynamicVertexBuffer3!==$t?this.freshBind(ie,we,Se,Be,dt,St,Nt,$t):(I.bindVertexArray.set(this.vao),St&&St.bind(),Be&&Be.dynamicDraw&&Be.bind(),Nt&&Nt.bind(),$t&&$t.bind())}freshBind(I,ie,we,Se,Be,dt,St,Nt){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=we,this.boundIndexBuffer=Se,this.boundVertexOffset=Be,this.boundDynamicVertexBuffer=dt,this.boundDynamicVertexBuffer2=St,this.boundDynamicVertexBuffer3=Nt,ie.enableAttributes(Ar,I);for(let Kr of we)Kr.enableAttributes(Ar,I);dt&&dt.enableAttributes(Ar,I),St&&St.enableAttributes(Ar,I),Nt&&Nt.enableAttributes(Ar,I),ie.bind(),ie.setVertexAttribPointers(Ar,I,Be);for(let Kr of we)Kr.bind(),Kr.setVertexAttribPointers(Ar,I,Be);dt&&(dt.bind(),dt.setVertexAttribPointers(Ar,I,Be)),Se&&Se.bind(),St&&(St.bind(),St.setVertexAttribPointers(Ar,I,Be)),Nt&&(Nt.bind(),Nt.setVertexAttribPointers(Ar,I,Be)),Tr.currentNumAttributes=$t}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let vr=(Ue,I,ie,we,Se)=>({u_matrix:Ue,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:we?we.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:we?we.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:we?we.calculateFogBlendOpacity(Se):0,u_horizon_color:we?we.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:we?we.properties.get("horizon-fog-blend"):1});function Or(Ue){let I=[];for(let ie=0;ie<Ue.length;ie++){if(Ue[ie]===null)continue;let we=Ue[ie].split(" ");I.push(we.pop())}return I}class ba{constructor(I,ie,we,Se,Be,dt){let St=I.gl;this.program=St.createProgram();let Nt=Or(ie.staticAttributes),$t=we?we.getBinderAttributes():[],Tr=Nt.concat($t),Ar=Hr.prelude.staticUniforms?Or(Hr.prelude.staticUniforms):[],Kr=ie.staticUniforms?Or(ie.staticUniforms):[],na=we?we.getBinderUniforms():[],He=Ar.concat(Kr).concat(na),Je=[];for(let yr of He)Je.indexOf(yr)<0&&Je.push(yr);let lt=we?we.defines():[];Be&&lt.push("#define OVERDRAW_INSPECTOR;"),dt&&lt.push("#define TERRAIN3D;");let vt=lt.concat(Hr.prelude.fragmentSource,ie.fragmentSource).join(`
`),Lt=lt.concat(Hr.prelude.vertexSource,ie.vertexSource).join(`
`),At=St.createShader(St.FRAGMENT_SHADER);if(St.isContextLost())return void(this.failedToCreate=!0);if(St.shaderSource(At,vt),St.compileShader(At),!St.getShaderParameter(At,St.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${St.getShaderInfoLog(At)}`);St.attachShader(this.program,At);let zt=St.createShader(St.VERTEX_SHADER);if(St.isContextLost())return void(this.failedToCreate=!0);if(St.shaderSource(zt,Lt),St.compileShader(zt),!St.getShaderParameter(zt,St.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${St.getShaderInfoLog(zt)}`);St.attachShader(this.program,zt),this.attributes={};let cr={};this.numAttributes=Tr.length;for(let yr=0;yr<this.numAttributes;yr++)Tr[yr]&&(St.bindAttribLocation(this.program,yr,Tr[yr]),this.attributes[Tr[yr]]=yr);if(St.linkProgram(this.program),!St.getProgramParameter(this.program,St.LINK_STATUS))throw new Error(`Program failed to link: ${St.getProgramInfoLog(this.program)}`);St.deleteShader(zt),St.deleteShader(At);for(let yr=0;yr<Je.length;yr++){let Er=Je[yr];if(Er&&!cr[Er]){let jr=St.getUniformLocation(this.program,Er);jr&&(cr[Er]=jr)}}this.fixedUniforms=Se(I,cr),this.terrainUniforms=((yr,Er)=>({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,cr),this.binderUniforms=we?we.getUniforms(I,cr):[]}draw(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt,vt,Lt){let At=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(we),I.setStencilMode(Se),I.setColorMode(Be),I.setCullFace(dt),Nt){I.activeTexture.set(At.TEXTURE2),At.bindTexture(At.TEXTURE_2D,Nt.depthTexture),I.activeTexture.set(At.TEXTURE3),At.bindTexture(At.TEXTURE_2D,Nt.texture);for(let cr in this.terrainUniforms)this.terrainUniforms[cr].set(Nt[cr])}for(let cr in this.fixedUniforms)this.fixedUniforms[cr].set(St[cr]);Je&&Je.setUniforms(I,this.binderUniforms,na,{zoom:He});let zt=0;switch(ie){case At.LINES:zt=2;break;case At.TRIANGLES:zt=3;break;case At.LINE_STRIP:zt=1}for(let cr of Kr.get()){let yr=cr.vaos||(cr.vaos={});(yr[$t]||(yr[$t]=new Xt)).bind(I,this,Tr,Je?Je.getPaintVertexBuffers():[],Ar,cr.vertexOffset,lt,vt,Lt),At.drawElements(ie,cr.primitiveLength*zt,At.UNSIGNED_SHORT,cr.primitiveOffset*zt*2)}}}function Pa(Ue,I,ie){let we=1/Da(ie,1,I.transform.tileZoom),Se=Math.pow(2,ie.tileID.overscaledZ),Be=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Se,dt=Be*(ie.tileID.canonical.x+ie.tileID.wrap*Se),St=Be*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[we,Ue.fromScale,Ue.toScale],u_fade:Ue.t,u_pixel_coord_upper:[dt>>16,St>>16],u_pixel_coord_lower:[65535&dt,65535&St]}}let ya=(Ue,I,ie,we)=>{let Se=I.style.light,Be=Se.properties.get("position"),dt=[Be.x,Be.y,Be.z],St=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}();Se.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}(St,-I.transform.angle),function($t,Tr,Ar){var Kr=Tr[0],na=Tr[1],He=Tr[2];$t[0]=Kr*Ar[0]+na*Ar[3]+He*Ar[6],$t[1]=Kr*Ar[1]+na*Ar[4]+He*Ar[7],$t[2]=Kr*Ar[2]+na*Ar[5]+He*Ar[8]}(dt,dt,St);let Nt=Se.properties.get("color");return{u_matrix:Ue,u_lightpos:dt,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[Nt.r,Nt.g,Nt.b],u_vertical_gradient:+ie,u_opacity:we}},la=(Ue,I,ie,we,Se,Be,dt)=>t.e(ya(Ue,I,ie,we),Pa(Be,I,dt),{u_height_factor:-Math.pow(2,Se.overscaledZ)/dt.tileSize/8}),Ta=Ue=>({u_matrix:Ue}),Ai=(Ue,I,ie,we)=>t.e(Ta(Ue),Pa(ie,I,we)),ki=(Ue,I)=>({u_matrix:Ue,u_world:I}),Ki=(Ue,I,ie,we,Se)=>t.e(Ai(Ue,I,ie,we),{u_world:Se}),_n=(Ue,I,ie,we)=>{let Se=Ue.transform,Be,dt;if(we.paint.get("circle-pitch-alignment")==="map"){let St=Da(ie,1,Se.zoom);Be=!0,dt=[St,St]}else Be=!1,dt=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:Ue.translatePosMatrix(I.posMatrix,ie,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Be,u_device_pixel_ratio:Ue.pixelRatio,u_extrude_scale:dt}},Rn=(Ue,I,ie)=>({u_matrix:Ue,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),En=(Ue,I,ie=1)=>({u_matrix:Ue,u_color:I,u_overlay:0,u_overlay_scale:ie}),On=Ue=>({u_matrix:Ue}),no=(Ue,I,ie,we)=>({u_matrix:Ue,u_extrude_scale:Da(I,1,ie),u_intensity:we}),cn=(Ue,I,ie,we)=>{let Se=t.H();t.aP(Se,0,Ue.width,Ue.height,0,0,1);let Be=Ue.context.gl;return{u_matrix:Se,u_world:[Be.drawingBufferWidth,Be.drawingBufferHeight],u_image:ie,u_color_ramp:we,u_opacity:I.paint.get("heatmap-opacity")}};function lo(Ue,I){let ie=Math.pow(2,I.canonical.z),we=I.canonical.y;return[new t.Z(0,we/ie).toLngLat().lat,new t.Z(0,(we+1)/ie).toLngLat().lat]}let Wo=(Ue,I,ie,we)=>{let Se=Ue.transform;return{u_matrix:as(Ue,I,ie,we),u_ratio:1/Da(I,1,Se.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},hs=(Ue,I,ie,we,Se)=>t.e(Wo(Ue,I,ie,Se),{u_image:0,u_image_height:we}),Oo=(Ue,I,ie,we,Se)=>{let Be=Ue.transform,dt=No(I,Be);return{u_matrix:as(Ue,I,ie,Se),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Da(I,1,Be.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_image:0,u_scale:[dt,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Be.pixelsToGLUnits[0],1/Be.pixelsToGLUnits[1]]}},Wn=(Ue,I,ie,we,Se,Be)=>{let dt=Ue.lineAtlas,St=No(I,Ue.transform),Nt=ie.layout.get("line-cap")==="round",$t=dt.getDash(we.from,Nt),Tr=dt.getDash(we.to,Nt),Ar=$t.width*Se.fromScale,Kr=Tr.width*Se.toScale;return t.e(Wo(Ue,I,ie,Be),{u_patternscale_a:[St/Ar,-$t.height/2],u_patternscale_b:[St/Kr,-Tr.height/2],u_sdfgamma:dt.width/(256*Math.min(Ar,Kr)*Ue.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Se.t})};function No(Ue,I){return 1/Da(Ue,1,I.tileZoom)}function as(Ue,I,ie,we){return Ue.translatePosMatrix(we?we.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let Ns=(Ue,I,ie,we,Se)=>{return{u_matrix:Ue,u_tl_parent:I,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(dt=Se.paint.get("raster-saturation"),dt>0?1-1/(1.001-dt):-dt),u_contrast_factor:(Be=Se.paint.get("raster-contrast"),Be>0?1/(1-Be):1+Be),u_spin_weights:ss(Se.paint.get("raster-hue-rotate"))};var Be,dt};function ss(Ue){Ue*=Math.PI/180;let I=Math.sin(Ue),ie=Math.cos(Ue);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let uo=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>{let He=dt.transform;return{u_is_size_zoom_constant:+(Ue==="constant"||Ue==="source"),u_is_size_feature_constant:+(Ue==="constant"||Ue==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:He.cameraToCenterDistance,u_pitch:He.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:He.width/He.height,u_fade_change:dt.options.fadeDuration?dt.symbolFadeChange:1,u_matrix:St,u_label_plane_matrix:Nt,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Be,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},jn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He)=>{let Je=dt.transform;return t.e(uo(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,He),{u_gamma_scale:we?Math.cos(Je._pitch)*Je.cameraToCenterDistance:1,u_device_pixel_ratio:dt.pixelRatio,u_is_halo:+na})},Xn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>t.e(jn(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,!0,Ar,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ls=(Ue,I,ie)=>({u_matrix:Ue,u_opacity:I,u_color:ie}),Cs=(Ue,I,ie,we,Se,Be)=>t.e(function(dt,St,Nt,$t){let Tr=Nt.imageManager.getPattern(dt.from.toString()),Ar=Nt.imageManager.getPattern(dt.to.toString()),{width:Kr,height:na}=Nt.imageManager.getPixelSize(),He=Math.pow(2,$t.tileID.overscaledZ),Je=$t.tileSize*Math.pow(2,Nt.transform.tileZoom)/He,lt=Je*($t.tileID.canonical.x+$t.tileID.wrap*He),vt=Je*$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:St.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:St.fromScale,u_scale_b:St.toScale,u_tile_units_to_pixels:1/Da($t,1,Nt.transform.tileZoom),u_pixel_coord_upper:[lt>>16,vt>>16],u_pixel_coord_lower:[65535&lt,65535&vt]}}(we,Be,ie,Se),{u_matrix:Ue,u_opacity:I}),Ks={fillExtrusion:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_opacity:new t.aI(Ue,I.u_opacity)}),fillExtrusionPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_height_factor:new t.aI(Ue,I.u_height_factor),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade),u_opacity:new t.aI(Ue,I.u_opacity)}),fill:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),fillPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),fillOutline:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world)}),fillOutlinePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),circle:(Ue,I)=>({u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Ue,I.u_scale_with_map),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_extrude_scale:new t.aO(Ue,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_matrix:new t.aJ(Ue,I.u_matrix)}),collisionBox:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_pixel_extrude_scale:new t.aO(Ue,I.u_pixel_extrude_scale)}),collisionCircle:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_inv_matrix:new t.aJ(Ue,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Ue,I.u_viewport_size)}),debug:(Ue,I)=>({u_color:new t.aL(Ue,I.u_color),u_matrix:new t.aJ(Ue,I.u_matrix),u_overlay:new t.aH(Ue,I.u_overlay),u_overlay_scale:new t.aI(Ue,I.u_overlay_scale)}),clippingMask:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmap:(Ue,I)=>({u_extrude_scale:new t.aI(Ue,I.u_extrude_scale),u_intensity:new t.aI(Ue,I.u_intensity),u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmapTexture:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_color_ramp:new t.aH(Ue,I.u_color_ramp),u_opacity:new t.aI(Ue,I.u_opacity)}),hillshade:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_latrange:new t.aO(Ue,I.u_latrange),u_light:new t.aO(Ue,I.u_light),u_shadow:new t.aL(Ue,I.u_shadow),u_highlight:new t.aL(Ue,I.u_highlight),u_accent:new t.aL(Ue,I.u_accent)}),hillshadePrepare:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_dimension:new t.aO(Ue,I.u_dimension),u_zoom:new t.aI(Ue,I.u_zoom),u_unpack:new t.aK(Ue,I.u_unpack)}),line:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels)}),lineGradient:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_image:new t.aH(Ue,I.u_image),u_image_height:new t.aI(Ue,I.u_image_height)}),linePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texsize:new t.aO(Ue,I.u_texsize),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_image:new t.aH(Ue,I.u_image),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),lineSDF:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_patternscale_a:new t.aO(Ue,I.u_patternscale_a),u_patternscale_b:new t.aO(Ue,I.u_patternscale_b),u_sdfgamma:new t.aI(Ue,I.u_sdfgamma),u_image:new t.aH(Ue,I.u_image),u_tex_y_a:new t.aI(Ue,I.u_tex_y_a),u_tex_y_b:new t.aI(Ue,I.u_tex_y_b),u_mix:new t.aI(Ue,I.u_mix)}),raster:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_tl_parent:new t.aO(Ue,I.u_tl_parent),u_scale_parent:new t.aI(Ue,I.u_scale_parent),u_buffer_scale:new t.aI(Ue,I.u_buffer_scale),u_fade_t:new t.aI(Ue,I.u_fade_t),u_opacity:new t.aI(Ue,I.u_opacity),u_image0:new t.aH(Ue,I.u_image0),u_image1:new t.aH(Ue,I.u_image1),u_brightness_low:new t.aI(Ue,I.u_brightness_low),u_brightness_high:new t.aI(Ue,I.u_brightness_high),u_saturation_factor:new t.aI(Ue,I.u_saturation_factor),u_contrast_factor:new t.aI(Ue,I.u_contrast_factor),u_spin_weights:new t.aN(Ue,I.u_spin_weights)}),symbolIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolSDF:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolTextAndIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texsize_icon:new t.aO(Ue,I.u_texsize_icon),u_texture:new t.aH(Ue,I.u_texture),u_texture_icon:new t.aH(Ue,I.u_texture_icon),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),background:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_color:new t.aL(Ue,I.u_color)}),backgroundPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_image:new t.aH(Ue,I.u_image),u_pattern_tl_a:new t.aO(Ue,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Ue,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Ue,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Ue,I.u_pattern_br_b),u_texsize:new t.aO(Ue,I.u_texsize),u_mix:new t.aI(Ue,I.u_mix),u_pattern_size_a:new t.aO(Ue,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Ue,I.u_pattern_size_b),u_scale_a:new t.aI(Ue,I.u_scale_a),u_scale_b:new t.aI(Ue,I.u_scale_b),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Ue,I.u_tile_units_to_pixels)}),terrain:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_ele_delta:new t.aI(Ue,I.u_ele_delta),u_fog_matrix:new t.aJ(Ue,I.u_fog_matrix),u_fog_color:new t.aL(Ue,I.u_fog_color),u_fog_ground_blend:new t.aI(Ue,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Ue,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Ue,I.u_horizon_fog_blend)}),terrainDepth:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),terrainCoords:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_terrain_coords_id:new t.aI(Ue,I.u_terrain_coords_id),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),sky:(Ue,I)=>({u_sky_color:new t.aL(Ue,I.u_sky_color),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon:new t.aI(Ue,I.u_horizon),u_sky_horizon_blend:new t.aI(Ue,I.u_sky_horizon_blend)})};class Xo{constructor(I,ie,we){this.context=I;let Se=I.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.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 Ln{constructor(I,ie,we,Se){this.length=ie.length,this.attributes=we,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Se,this.context=I;let Be=I.gl;this.buffer=Be.createBuffer(),I.bindVertexBuffer.set(this.buffer),Be.bufferData(Be.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Be.DYNAMIC_DRAW:Be.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 we=0;we<this.attributes.length;we++){let Se=ie.attributes[this.attributes[we].name];Se!==void 0&&I.enableVertexAttribArray(Se)}}setVertexAttribPointers(I,ie,we){for(let Se=0;Se<this.attributes.length;Se++){let Be=this.attributes[Se],dt=ie.attributes[Be.name];dt!==void 0&&I.vertexAttribPointer(dt,Be.components,I[Gi[Be.type]],!1,this.itemSize,Be.offset+this.itemSize*(we||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Us=new WeakMap;function _s(Ue){var I;if(Us.has(Ue))return Us.get(Ue);{let ie=(I=Ue.getParameter(Ue.VERSION))===null||I===void 0?void 0:I.startsWith("WebGL 2.0");return Us.set(Ue,ie),ie}}class Gn{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 zs extends Gn{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 vs extends Gn{getDefault(){return 1}set(I){(I!==this.current||this.dirty)&&(this.gl.clearDepth(I),this.current=I,this.dirty=!1)}}class Ws extends Gn{getDefault(){return 0}set(I){(I!==this.current||this.dirty)&&(this.gl.clearStencil(I),this.current=I,this.dirty=!1)}}class il extends Gn{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 xn extends Gn{getDefault(){return!0}set(I){(I!==this.current||this.dirty)&&(this.gl.depthMask(I),this.current=I,this.dirty=!1)}}class ko extends Gn{getDefault(){return 255}set(I){(I!==this.current||this.dirty)&&(this.gl.stencilMask(I),this.current=I,this.dirty=!1)}}class bo extends Gn{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 Is extends Gn{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 Gn{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 co extends Gn{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 Vs extends Gn{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 Gn{getDefault(){return this.gl.LESS}set(I){(I!==this.current||this.dirty)&&(this.gl.depthFunc(I),this.current=I,this.dirty=!1)}}class Ts extends Gn{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 js extends Gn{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 Gn{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 As extends Gn{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 Gn{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 Gn{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 Gn{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 Gn{getDefault(){return null}set(I){(I!==this.current||this.dirty)&&(this.gl.useProgram(I),this.current=I,this.dirty=!1)}}class Sf extends Gn{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 Gn{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 Fs extends Gn{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 Gn{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 Gn{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 Gn{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 Gn{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 Gn{getDefault(){return null}set(I){var ie;if(I===this.current&&!this.dirty)return;let we=this.gl;_s(we)?we.bindVertexArray(I):(ie=we.getExtension("OES_vertex_array_object"))===null||ie===void 0||ie.bindVertexArrayOES(I),this.current=I,this.dirty=!1}}class Ou extends Gn{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 Gn{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 Gn{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 xs extends Gn{constructor(I,ie){super(I),this.context=I,this.parent=ie}getDefault(){return null}}class Xs extends xs{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 xs{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 xs{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,we,Se,Be){this.context=I,this.width=ie,this.height=we;let dt=I.gl,St=this.framebuffer=dt.createFramebuffer();if(this.colorAttachment=new Xs(I,St),Se)this.depthAttachment=Be?new Ul(I,St):new nc(I,St);else if(Be)throw new Error("Stencil cannot be set without depth");if(dt.checkFramebufferStatus(dt.FRAMEBUFFER)!==dt.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 we=this.depthAttachment.get();we&&I.deleteRenderbuffer(we)}I.deleteFramebuffer(this.framebuffer)}}class fl{constructor(I,ie,we){this.blendFunction=I,this.blendColor=ie,this.mask=we}}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,we;if(this.gl=I,this.clearColor=new zs(this),this.clearDepth=new vs(this),this.clearStencil=new Ws(this),this.colorMask=new il(this),this.depthMask=new xn(this),this.stencilMask=new ko(this),this.stencilFunc=new bo(this),this.stencilOp=new Is(this),this.stencilTest=new pu(this),this.depthRange=new co(this),this.depthTest=new Vs(this),this.depthFunc=new vl(this),this.blend=new Ts(this),this.blendFunc=new js(this),this.blendColor=new us(this),this.blendEquation=new As(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 Fs(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),_s(I)){this.HALF_FLOAT=I.HALF_FLOAT;let Se=I.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ie=I.RGBA16F)!==null&&ie!==void 0?ie:Se?.RGBA16F_EXT,this.RGB16F=(we=I.RGB16F)!==null&&we!==void 0?we:Se?.RGB16F_EXT,I.getExtension("EXT_color_buffer_float")}else{I.getExtension("EXT_color_buffer_half_float"),I.getExtension("OES_texture_half_float_linear");let Se=I.getExtension("OES_texture_half_float");this.HALF_FLOAT=Se?.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,we){return new Ln(this,I,ie,we)}createRenderbuffer(I,ie,we){let Se=this.gl,Be=Se.createRenderbuffer();return this.bindRenderbuffer.set(Be),Se.renderbufferStorage(Se.RENDERBUFFER,I,ie,we),this.bindRenderbuffer.set(null),Be}createFramebuffer(I,ie,we,Se){return new qu(this,I,ie,we,Se)}clear({color:I,depth:ie,stencil:we}){let Se=this.gl,Be=0;I&&(Be|=Se.COLOR_BUFFER_BIT,this.clearColor.set(I),this.colorMask.set([!0,!0,!0,!0])),ie!==void 0&&(Be|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ie),this.depthMask.set(!0)),we!==void 0&&(Be|=Se.STENCIL_BUFFER_BIT,this.clearStencil.set(we),this.stencilMask.set(255)),Se.clear(Be)}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 _s(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 _s(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 ns{constructor(I,ie,we){this.func=I,this.mask=ie,this.range=we}}ns.ReadOnly=!1,ns.ReadWrite=!0,ns.disabled=new ns(519,ns.ReadOnly,[0,1]);let bh=7680;class Es{constructor(I,ie,we,Se,Be,dt){this.test=I,this.ref=ie,this.mask=we,this.fail=Se,this.depthFail=Be,this.pass=dt}}Es.disabled=new Es({func:519,mask:0},0,0,bh,bh,bh);class to{constructor(I,ie,we){this.enable=I,this.mode=ie,this.frontFace=we}}let Wc;function Vu(Ue,I,ie,we,Se){let Be=Ue.context,dt=Be.gl,St=Ue.useProgram("collisionBox"),Nt=[],$t=0,Tr=0;for(let vt=0;vt<we.length;vt++){let Lt=we[vt],At=I.getTile(Lt).getBucket(ie);if(!At)continue;let zt=Se?At.textCollisionBox:At.iconCollisionBox,cr=At.collisionCircleArray;if(cr.length>0){let yr=t.H();t.aQ(yr,At.placementInvProjMatrix,Ue.transform.glCoordMatrix),t.aQ(yr,yr,At.placementViewportMatrix),Nt.push({circleArray:cr,circleOffset:Tr,transform:Lt.posMatrix,invTransform:yr,coord:Lt}),$t+=cr.length/4,Tr=$t}zt&&St.draw(Be,dt.LINES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,{u_matrix:Lt.posMatrix,u_pixel_extrude_scale:[1/(Ar=Ue.transform).width,1/Ar.height]},Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt),ie.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,Ue.transform.zoom,null,null,zt.collisionVertexBuffer)}var Ar;if(!Se||!Nt.length)return;let Kr=Ue.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let He=0;for(let vt of Nt)for(let Lt=0;Lt<vt.circleArray.length/4;Lt++){let At=4*Lt,zt=vt.circleArray[At+0],cr=vt.circleArray[At+1],yr=vt.circleArray[At+2],Er=vt.circleArray[At+3];na.emplace(He++,zt,cr,yr,Er,0),na.emplace(He++,zt,cr,yr,Er,1),na.emplace(He++,zt,cr,yr,Er,2),na.emplace(He++,zt,cr,yr,Er,3)}(!Wc||Wc.length<2*$t)&&(Wc=function(vt){let Lt=2*vt,At=new t.aT;At.resize(Lt),At._trim();for(let zt=0;zt<Lt;zt++){let cr=6*zt;At.uint16[cr+0]=4*zt+0,At.uint16[cr+1]=4*zt+1,At.uint16[cr+2]=4*zt+2,At.uint16[cr+3]=4*zt+2,At.uint16[cr+4]=4*zt+3,At.uint16[cr+5]=4*zt+0}return At}($t));let Je=Be.createIndexBuffer(Wc,!0),lt=Be.createVertexBuffer(na,t.aS.members,!0);for(let vt of Nt){let Lt=Rn(vt.transform,vt.invTransform,Ue.transform);Kr.draw(Be,dt.TRIANGLES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,Lt,Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(vt.coord),ie.id,lt,Je,t.a0.simpleSegment(0,2*vt.circleOffset,vt.circleArray.length,vt.circleArray.length/2),null,Ue.transform.zoom,null,null,null)}lt.destroy(),Je.destroy()}to.disabled=new to(!1,1029,2305),to.backCCW=new to(!0,1029,2305);let jl=t.an(new Float32Array(16));function Mf(Ue,I,ie,we,Se,Be){let{horizontalAlign:dt,verticalAlign:St}=t.au(Ue);return new t.P((-(dt-.5)*I/Se+we[0])*Be,(-(St-.5)*ie/Se+we[1])*Be)}function Ac(Ue,I,ie,we,Se,Be){let dt=I.tileAnchorPoint.add(new t.P(I.translation[0],I.translation[1]));if(I.pitchWithMap){let St=we.mult(Be);ie||(St=St.rotate(-Se));let Nt=dt.add(St);return wt(Nt.x,Nt.y,I.labelPlaneMatrix,I.getElevation).point}if(ie){let St=ft(I.tileAnchorPoint.x+1,I.tileAnchorPoint.y,I).point.sub(Ue),Nt=Math.atan(St.y/St.x)+(St.x<0?Math.PI:0);return Ue.add(we.rotate(Nt))}return Ue.add(we)}function nf(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na){let He=Ue.text.placedSymbolArray,Je=Ue.text.dynamicLayoutVertexArray,lt=Ue.icon.dynamicLayoutVertexArray,vt={};Je.clear();for(let Lt=0;Lt<He.length;Lt++){let At=He.get(Lt),zt=At.hidden||!At.crossTileID||Ue.allowVerticalPlacement&&!At.placedOrientation?null:we[At.crossTileID];if(zt){let cr=new t.P(At.anchorX,At.anchorY),yr={getElevation:na,width:Se.width,height:Se.height,labelPlaneMatrix:Be,lineVertexArray:null,pitchWithMap:ie,projection:Tr,projectionCache:null,tileAnchorPoint:cr,translation:Ar,unwrappedTileID:Kr},Er=ie?wt(cr.x,cr.y,dt,na):ft(cr.x,cr.y,yr),jr=Ne(Se.cameraToCenterDistance,Er.signedDistanceFromCamera),Qr=t.ai(Ue.textSizeData,Nt,At)*jr/t.ap;ie&&(Qr*=Ue.tilePixelRatio/St);let{width:pa,height:Aa,anchor:za,textOffset:ci,textBoxScale:Vi}=zt,ji=Mf(za,pa,Aa,ci,Vi,Qr),nn=Tr.getPitchedTextCorrection(Se,cr.add(new t.P(Ar[0],Ar[1])),Kr),Sn=Ac(Er.point,yr,I,ji,Se.angle,nn),Kn=Ue.allowVerticalPlacement&&At.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let Bn=0;Bn<At.numGlyphs;Bn++)t.aj(Je,Sn,Kn);$t&&At.associatedIconIndex>=0&&(vt[At.associatedIconIndex]={shiftedAnchor:Sn,angle:Kn})}else rr(At.numGlyphs,Je)}if($t){lt.clear();let Lt=Ue.icon.placedSymbolArray;for(let At=0;At<Lt.length;At++){let zt=Lt.get(At);if(zt.hidden)rr(zt.numGlyphs,lt);else{let cr=vt[At];if(cr)for(let yr=0;yr<zt.numGlyphs;yr++)t.aj(lt,cr.shiftedAnchor,cr.angle);else rr(zt.numGlyphs,lt)}}Ue.icon.dynamicLayoutVertexBuffer.updateData(lt)}Ue.text.dynamicLayoutVertexBuffer.updateData(Je)}function $l(Ue,I,ie){return ie.iconsInText&&I?"symbolTextAndIcon":Ue?"symbolSDF":"symbolIcon"}function Jf(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar){let Kr=Ue.context,na=Kr.gl,He=Ue.transform,Je=pi(),lt=St==="map",vt=Nt==="map",Lt=St!=="viewport"&&ie.layout.get("symbol-placement")!=="point",At=lt&&!vt&&!Lt,zt=!vt&&Lt,cr=!ie.layout.get("symbol-sort-key").isConstant(),yr=!1,Er=Ue.depthModeForSublayer(0,ns.ReadOnly),jr=ie._unevaluatedLayout.hasValue("text-variable-anchor")||ie._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Qr=[],pa=Je.getCircleRadiusCorrection(He);for(let Aa of we){let za=I.getTile(Aa),ci=za.getBucket(ie);if(!ci)continue;let Vi=Se?ci.text:ci.icon;if(!Vi||!Vi.segments.get().length||!Vi.hasVisibleVertices)continue;let ji=Vi.programConfigurations.get(ie.id),nn=Se||ci.sdfIcons,Sn=Se?ci.textSizeData:ci.iconSizeData,Kn=vt||He.pitch!==0,Bn=Ue.useProgram($l(nn,Se,ci),ji),wo=t.ag(Sn,He.zoom),is=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Aa),Ao,Zo,ps,ul,tl=[0,0],Jo=null;if(Se)Zo=za.glyphAtlasTexture,ps=na.LINEAR,Ao=za.glyphAtlasTexture.size,ci.iconsInText&&(tl=za.imageAtlasTexture.size,Jo=za.imageAtlasTexture,ul=Kn||Ue.options.rotating||Ue.options.zooming||Sn.kind==="composite"||Sn.kind==="camera"?na.LINEAR:na.NEAREST);else{let Mt=ie.layout.get("icon-size").constantOr(0)!==1||ci.iconsNeedLinear;Zo=za.imageAtlasTexture,ps=nn||Ue.options.rotating||Ue.options.zooming||Mt||Kn?na.LINEAR:na.NEAREST,Ao=za.imageAtlasTexture.size}let $o=Da(za,1,Ue.transform.zoom),Il=zt?Aa.posMatrix:jl,eu=Sr(Il,vt,lt,Ue.transform,$o),Ru=Rr(Il,vt,lt,Ue.transform,$o),vu=Rr(Aa.posMatrix,vt,lt,Ue.transform,$o),Tl=Je.translatePosition(Ue.transform,za,Be,dt),cu=jr&&ci.hasTextData(),uc=ie.layout.get("icon-text-fit")!=="none"&&cu&&ci.hasIconData();if(Lt){let Mt=Ue.style.map.terrain?(Ot,_r)=>Ue.style.map.terrain.getElevation(Aa,Ot,_r):null,ar=ie.layout.get("text-rotation-alignment")==="map";Te(ci,Aa.posMatrix,Ue,Se,eu,vu,vt,$t,ar,Je,Aa.toUnwrapped(),He.width,He.height,Tl,Mt)}let Vl=Aa.posMatrix,Gl=Se&&jr||uc,de=Lt||Gl?jl:eu,Fe=Ru,et=nn&&ie.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,mt;mt=nn?ci.iconsInText?Xn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Ao,tl,pa):jn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,!0,pa):uo(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,pa);let bt={program:Bn,buffers:Vi,uniformValues:mt,atlasTexture:Zo,atlasTextureIcon:Jo,atlasInterpolation:ps,atlasInterpolationIcon:ul,isSDF:nn,hasHalo:et};if(cr&&ci.canOverlap){yr=!0;let Mt=Vi.segments.get();for(let ar of Mt)Qr.push({segments:new t.a0([ar]),sortKey:ar.sortKey,state:bt,terrainData:is})}else Qr.push({segments:Vi.segments,sortKey:0,state:bt,terrainData:is})}yr&&Qr.sort((Aa,za)=>Aa.sortKey-za.sortKey);for(let Aa of Qr){let za=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),za.atlasTexture.bind(za.atlasInterpolation,na.CLAMP_TO_EDGE),za.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),za.atlasTextureIcon&&za.atlasTextureIcon.bind(za.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),za.isSDF){let ci=za.uniformValues;za.hasHalo&&(ci.u_is_halo=1,Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,ci,Aa.terrainData)),ci.u_is_halo=0}Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,za.uniformValues,Aa.terrainData)}}function Of(Ue,I,ie,we,Se,Be,dt,St,Nt,$t){let Tr=we.context;Se.draw(Tr,Tr.gl.TRIANGLES,Be,dt,St,to.disabled,Nt,$t,ie.id,Ue.layoutVertexBuffer,Ue.indexBuffer,I,ie.paint,we.transform.zoom,Ue.programConfigurations.get(ie.id),Ue.dynamicLayoutVertexBuffer,Ue.opacityVertexBuffer)}function of(Ue,I,ie,we){let Se=Ue.context,Be=Se.gl,dt=Es.disabled,St=new fl([Be.ONE,Be.ONE],t.aM.transparent,[!0,!0,!0,!0]),Nt=I.getBucket(ie);if(!Nt)return;let $t=we.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Se,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Se.bindFramebuffer.set(Tr.framebuffer),Se.viewport.set([0,0,I.tileSize,I.tileSize]),Se.clear({color:t.aM.transparent});let Ar=Nt.programConfigurations.get(ie.id),Kr=Ue.useProgram("heatmap",Ar),na=Ue.style.map.terrain.getTerrainData(we);Kr.draw(Se,Be.TRIANGLES,ns.disabled,dt,St,to.disabled,no(we.posMatrix,I,Ue.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Nt.layoutVertexBuffer,Nt.indexBuffer,Nt.segments,ie.paint,Ue.transform.zoom,Ar)}function jc(Ue,I,ie){let we=Ue.context,Se=we.gl;we.setColorMode(Ue.colorModeForRenderPass());let Be=Nf(we,I),dt=ie.key,St=I.heatmapFbos.get(dt);St&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,St.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Be.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Ue.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,cn(Ue,I,0,1),null,I.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments,I.paint,Ue.transform.zoom),St.destroy(),I.heatmapFbos.delete(dt))}function Bf(Ue,I,ie){var we,Se;let Be=Ue.gl,dt=Be.createTexture();Be.bindTexture(Be.TEXTURE_2D,dt),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_S,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_T,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MIN_FILTER,Be.LINEAR),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MAG_FILTER,Be.LINEAR);let St=(we=Ue.HALF_FLOAT)!==null&&we!==void 0?we:Be.UNSIGNED_BYTE,Nt=(Se=Ue.RGBA16F)!==null&&Se!==void 0?Se:Be.RGBA;Be.texImage2D(Be.TEXTURE_2D,0,Nt,I,ie,0,Be.RGBA,St,null);let $t=Ue.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(dt),$t}function Nf(Ue,I){return I.colorRampTexture||(I.colorRampTexture=new u(Ue,I.colorRamp,Ue.gl.RGBA)),I.colorRampTexture}function Gu(Ue,I,ie,we,Se){if(!ie||!we||!we.imageAtlas)return;let Be=we.imageAtlas.patternPositions,dt=Be[ie.to.toString()],St=Be[ie.from.toString()];if(!dt&&St&&(dt=St),!St&&dt&&(St=dt),!dt||!St){let Nt=Se.getPaintProperty(I);dt=Be[Nt],St=Be[Nt]}dt&&St&&Ue.setConstantPatternPositions(dt,St)}function Ef(Ue,I,ie,we,Se,Be,dt){let St=Ue.context.gl,Nt="fill-pattern",$t=ie.paint.get(Nt),Tr=$t&&$t.constantOr(1),Ar=ie.getCrossfadeParameters(),Kr,na,He,Je,lt;dt?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=St.LINES):(na=Tr?"fillPattern":"fill",Kr=St.TRIANGLES);let vt=$t.constantOr(null);for(let Lt of we){let At=I.getTile(Lt);if(Tr&&!At.patternsLoaded())continue;let zt=At.getBucket(ie);if(!zt)continue;let cr=zt.programConfigurations.get(ie.id),yr=Ue.useProgram(na,cr),Er=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt);Tr&&(Ue.context.activeTexture.set(St.TEXTURE0),At.imageAtlasTexture.bind(St.LINEAR,St.CLAMP_TO_EDGE),cr.updatePaintBuffers(Ar)),Gu(cr,Nt,vt,At,ie);let jr=Er?Lt:null,Qr=Ue.translatePosMatrix(jr?jr.posMatrix:Lt.posMatrix,At,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(dt){Je=zt.indexBuffer2,lt=zt.segments2;let pa=[St.drawingBufferWidth,St.drawingBufferHeight];He=na==="fillOutlinePattern"&&Tr?Ki(Qr,Ue,Ar,At,pa):ki(Qr,pa)}else Je=zt.indexBuffer,lt=zt.segments,He=Tr?Ai(Qr,Ue,Ar,At):Ta(Qr);yr.draw(Ue.context,Kr,Se,Ue.stencilModeForClipping(Lt),Be,to.disabled,He,Er,ie.id,zt.layoutVertexBuffer,Je,lt,ie.paint,Ue.transform.zoom,cr)}}function oc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Ar=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),He=Tr.constantOr(null);for(let Je of we){let lt=I.getTile(Je),vt=lt.getBucket(ie);if(!vt)continue;let Lt=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Je),At=vt.programConfigurations.get(ie.id),zt=Ue.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",At);Ar&&(Ue.context.activeTexture.set(Nt.TEXTURE0),lt.imageAtlasTexture.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE),At.updatePaintBuffers(Kr)),Gu(At,$t,He,lt,ie);let cr=Ue.translatePosMatrix(Je.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Ar?la(cr,Ue,yr,na,Je,Kr,lt):ya(cr,Ue,yr,na);zt.draw(St,St.gl.TRIANGLES,Se,Be,dt,to.backCCW,Er,Lt,ie.id,vt.layoutVertexBuffer,vt.indexBuffer,vt.segments,ie.paint,Ue.transform.zoom,At,Ue.style.map.terrain&&vt.centroidVertexBuffer)}}function Xc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t=ie.fbo;if(!$t)return;let Tr=Ue.useProgram("hillshade"),Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(I);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(St,Nt.TRIANGLES,Se,Be,dt,to.disabled,((Kr,na,He,Je)=>{let lt=He.paint.get("hillshade-shadow-color"),vt=He.paint.get("hillshade-highlight-color"),Lt=He.paint.get("hillshade-accent-color"),At=He.paint.get("hillshade-illumination-direction")*(Math.PI/180);He.paint.get("hillshade-illumination-anchor")==="viewport"&&(At-=Kr.transform.angle);let zt=!Kr.options.moving;return{u_matrix:Je?Je.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),zt),u_image:0,u_latrange:lo(0,na.tileID),u_light:[He.paint.get("hillshade-exaggeration"),At],u_shadow:lt,u_highlight:vt,u_accent:Lt}})(Ue,ie,we,Ar?I:null),Ar,we.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments)}function Ql(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl,Nt=I.dem;if(Nt&&Nt.data){let $t=Nt.dim,Tr=Nt.stride,Ar=Nt.getPixels();if(dt.activeTexture.set(St.TEXTURE1),dt.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Ue.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Ar,{premultiply:!1}),na.bind(St.NEAREST,St.CLAMP_TO_EDGE)}else I.demTexture=new u(dt,Ar,St.RGBA,{premultiply:!1}),I.demTexture.bind(St.NEAREST,St.CLAMP_TO_EDGE);dt.activeTexture.set(St.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(dt,{width:$t,height:$t,data:null},St.RGBA);na.bind(St.LINEAR,St.CLAMP_TO_EDGE),Kr=I.fbo=dt.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}dt.bindFramebuffer.set(Kr.framebuffer),dt.viewport.set([0,0,$t,$t]),Ue.useProgram("hillshadePrepare").draw(dt,St.TRIANGLES,we,Se,Be,to.disabled,((na,He)=>{let Je=He.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[Je,Je],u_zoom:na.overscaledZ,u_unpack:He.getUnpackVector()}})(I.tileID,Nt),null,ie.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Ue,I,ie,we,Se,Be){let dt=we.paint.get("raster-fade-duration");if(!Be&&dt>0){let St=n.now(),Nt=(St-Ue.timeAdded)/dt,$t=I?(St-I.timeAdded)/dt:-1,Tr=ie.getSource(),Ar=Se.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Ar)>Math.abs(Ue.tileID.overscaledZ-Ar),na=Kr&&Ue.refreshedUponExpiration?1:t.ac(Kr?Nt:1-$t,0,1);return Ue.refreshedUponExpiration&&Nt>=1&&(Ue.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),Zs=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(Ue,I,ie,we){Cu(Ue,0,I+ie/2,Ue.transform.width,ie,we)}function $f(Ue,I,ie,we){Cu(Ue,I-ie/2,0,ie,Ue.transform.height,we)}function Cu(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl;St.enable(St.SCISSOR_TEST),St.scissor(I*Ue.pixelRatio,ie*Ue.pixelRatio,we*Ue.pixelRatio,Se*Ue.pixelRatio),dt.clear({color:Be}),St.disable(St.SCISSOR_TEST)}function jf(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=ie.posMatrix,dt=Ue.useProgram("debug"),St=ns.disabled,Nt=Es.disabled,$t=Ue.colorModeForRenderPass(),Tr="$debug",Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(ie);we.activeTexture.set(Se.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),He=I.getTile(ie).tileSize,Je=512/Math.min(He,512)*(ie.overscaledZ/Ue.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(vt,Lt){vt.initDebugOverlayCanvas();let At=vt.debugOverlayCanvas,zt=vt.context.gl,cr=vt.debugOverlayCanvas.getContext("2d");cr.clearRect(0,0,At.width,At.height),cr.shadowColor="white",cr.shadowBlur=2,cr.lineWidth=1.5,cr.strokeStyle="white",cr.textBaseline="top",cr.font="bold 36px Open Sans, sans-serif",cr.fillText(Lt,5,5),cr.strokeText(Lt,5,5),vt.debugOverlayTexture.update(At),vt.debugOverlayTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE)}(Ue,`${lt} ${na}kB`),dt.draw(we,Se.TRIANGLES,St,Nt,fl.alphaBlended,to.disabled,En(Be,t.aM.transparent,Je),null,Tr,Ue.debugBuffer,Ue.quadTriangleIndexBuffer,Ue.debugSegments),dt.draw(we,Se.LINE_STRIP,St,Nt,$t,to.disabled,En(Be,t.aM.red),Ar,Tr,Ue.debugBuffer,Ue.tileBorderIndexBuffer,Ue.debugSegments)}function yl(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=Ue.colorModeForRenderPass(),dt=new ns(Se.LEQUAL,ns.ReadWrite,Ue.depthRangeFor3D),St=Ue.useProgram("terrain"),Nt=I.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,Ue.width,Ue.height]);for(let $t of ie){let Tr=Ue.renderToTexture.getTexture($t),Ar=I.getTerrainData($t.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,Tr.texture);let Kr=Ue.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Ue.transform.zoom),He=Ue.transform.calculateFogMatrix($t.tileID.toUnwrapped()),Je=vr(Kr,na,He,Ue.style.sky,Ue.transform.pitch);St.draw(we,Se.TRIANGLES,dt,Es.disabled,Be,to.backCCW,Je,Ar,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments)}}class Lu{constructor(I,ie,we){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=we}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=It.maxUnderzooming+It.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Br}resize(I,ie,we){if(this.width=Math.floor(I*we),this.height=Math.floor(ie*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Se of this.style._order)this.style._layers[Se].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 we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(we,Ur.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Se,Ze.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let Be=new t.aX;Be.emplaceBack(0,0),Be.emplaceBack(1,0),Be.emplaceBack(0,1),Be.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(Be,Ur.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let dt=new t.aZ;dt.emplaceBack(0),dt.emplaceBack(1),dt.emplaceBack(3),dt.emplaceBack(2),dt.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(dt);let St=new t.aY;St.emplaceBack(0,1,2),St.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(St);let Nt=this.context.gl;this.stencilClearMode=new Es({func:Nt.ALWAYS,mask:0},0,255,Nt.ZERO,Nt.ZERO,Nt.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,ns.disabled,this.stencilClearMode,fl.disabled,to.disabled,On(we),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 we=this.context,Se=we.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),we.setColorMode(fl.disabled),we.setDepthMode(ns.disabled);let Be=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let dt of ie){let St=this._tileClippingMaskIDs[dt.key]=this.nextStencilID++,Nt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(dt);Be.draw(we,Se.TRIANGLES,ns.disabled,new Es({func:Se.ALWAYS,mask:0},St,255,Se.KEEP,Se.KEEP,Se.REPLACE),fl.disabled,to.disabled,On(dt.posMatrix),Nt,"$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 Es({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Es({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,we=I.sort((dt,St)=>St.overscaledZ-dt.overscaledZ),Se=we[we.length-1].overscaledZ,Be=we[0].overscaledZ-Se+1;if(Be>1){this.currentStencilSource=void 0,this.nextStencilID+Be>256&&this.clearStencil();let dt={};for(let St=0;St<Be;St++)dt[St+Se]=new Es({func:ie.GEQUAL,mask:255},St+this.nextStencilID,255,ie.KEEP,ie.KEEP,ie.REPLACE);return this.nextStencilID+=Be,[dt,we]}return[{[Se]:Es.disabled},we]}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,we){if(!this.opaquePassEnabledForLayer())return ns.disabled;let Se=1-((1+this.currentLayer)*this.numSublayers+I)*this.depthEpsilon;return new ns(we||this.context.gl.LEQUAL,ie,[Se,Se])}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 we=this.style._order,Se=this.style.sourceCaches,Be={},dt={},St={};for(let Nt in Se){let $t=Se[Nt];$t.used&&$t.prepare(this.context),Be[Nt]=$t.getVisibleCoordinates(),dt[Nt]=Be[Nt].slice().reverse(),St[Nt]=$t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Nt=0;Nt<we.length;Nt++)if(this.style._layers[we[Nt]].is3D()){this.opaquePassCutoff=Nt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let Nt of we){let $t=this.style._layers[Nt];if(!$t.hasOffscreenPass()||$t.isHidden(this.transform.zoom))continue;let Tr=dt[$t.source];($t.type==="custom"||Tr.length)&&this.renderLayer(this,Se[$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(Nt,$t){let Tr=Nt.context,Ar=Tr.gl,Kr=((vt,Lt,At)=>({u_sky_color:vt.properties.get("sky-color"),u_horizon_color:vt.properties.get("horizon-color"),u_horizon:(Lt.height/2+Lt.getHorizon())*At,u_sky_horizon_blend:vt.properties.get("sky-horizon-blend")*Lt.height/2*At}))($t,Nt.style.map.transform,Nt.pixelRatio),na=new ns(Ar.LEQUAL,ns.ReadWrite,[0,1]),He=Es.disabled,Je=Nt.colorModeForRenderPass(),lt=Nt.useProgram("sky");if(!$t.mesh){let vt=new t.aX;vt.emplaceBack(-1,-1),vt.emplaceBack(1,-1),vt.emplaceBack(1,1),vt.emplaceBack(-1,1);let Lt=new t.aY;Lt.emplaceBack(0,1,2),Lt.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(vt,Ur.members),Tr.createIndexBuffer(Lt),t.a0.simpleSegment(0,0,vt.length,Lt.length))}lt.draw(Tr,Ar.TRIANGLES,na,He,Je,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=we.length-1;this.currentLayer>=0;this.currentLayer--){let Nt=this.style._layers[we[this.currentLayer]],$t=Se[Nt.source],Tr=Be[Nt.source];this._renderTileClippingMasks(Nt,Tr),this.renderLayer(this,$t,Nt,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<we.length;this.currentLayer++){let Nt=this.style._layers[we[this.currentLayer]],$t=Se[Nt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Nt))continue;let Tr=(Nt.type==="symbol"?St:dt)[Nt.source];this._renderTileClippingMasks(Nt,Be[Nt.source]),this.renderLayer(this,$t,Nt,Tr)}if(this.options.showTileBoundaries){let Nt=function($t,Tr){let Ar=null,Kr=Object.values($t._layers).flatMap(lt=>lt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),He=Kr.filter(lt=>lt.getSource().type!=="vector"),Je=lt=>{(!Ar||Ar.getSource().maxzoom<lt.getSource().maxzoom)&&(Ar=lt)};return na.forEach(lt=>Je(lt)),Ar||He.forEach(lt=>Je(lt)),Ar}(this.style,this.transform.zoom);Nt&&function($t,Tr,Ar){for(let Kr=0;Kr<Ar.length;Kr++)jf($t,Tr,Ar[Kr])}(this,Nt,Nt.getVisibleCoordinates())}this.options.showPadding&&function(Nt){let $t=Nt.transform.padding;Zc(Nt,Nt.transform.height-($t.top||0),3,Sc),Zc(Nt,$t.bottom||0,3,Zs),$f(Nt,$t.left||0,3,kf),$f(Nt,Nt.transform.width-($t.right||0),3,fh);let Tr=Nt.transform.centerPoint;(function(Ar,Kr,na,He){Cu(Ar,Kr-1,na-10,2,20,He),Cu(Ar,Kr-10,na-1,20,2,He)})(Nt,Tr.x,Nt.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,we=this.transform.modelViewProjectionMatrix,Se=this.terrainFacilitator.dirty;Se||(Se=I?!t.a_(ie,we):!t.a$(ie,we)),Se||(Se=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Se&&(t.b0(ie,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.sourceCache.getRenderableTiles(),na=Be.useProgram("terrainDepth");St.bindFramebuffer.set(dt.getFramebuffer("depth").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1});for(let He of Kr){let Je=dt.getTerrainData(He.tileID),lt={u_matrix:Be.transform.calculatePosMatrix(He.tileID.toUnwrapped()),u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};na.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,lt,Je,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain),function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.getCoordsTexture(),na=dt.sourceCache.getRenderableTiles(),He=Be.useProgram("terrainCoords");St.bindFramebuffer.set(dt.getFramebuffer("coords").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1}),dt.coordsIndex=[];for(let Je of na){let lt=dt.getTerrainData(Je.tileID);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,Kr.texture);let vt={u_matrix:Be.transform.calculatePosMatrix(Je.tileID.toUnwrapped()),u_terrain_coords_id:(255-dt.coordsIndex.length)/255,u_texture:0,u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};He.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,vt,lt,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),dt.coordsIndex.push(Je.tileID.key)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain))}renderLayer(I,ie,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Be,dt,St,Nt,$t){if(Be.renderPass!=="translucent")return;let Tr=Es.disabled,Ar=Be.colorModeForRenderPass();(St._unevaluatedLayout.hasValue("text-variable-anchor")||St._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,He,Je,lt,vt,Lt,At,zt){let cr=na.transform,yr=pi(),Er=lt==="map",jr=vt==="map";for(let Qr of Kr){let pa=Je.getTile(Qr),Aa=pa.getBucket(He);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let za=t.ag(Aa.textSizeData,cr.zoom),ci=Da(pa,1,na.transform.zoom),Vi=Sr(Qr.posMatrix,jr,Er,na.transform,ci),ji=He.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(za){let nn=Math.pow(2,cr.zoom-pa.tileID.overscaledZ),Sn=na.style.map.terrain?(Bn,wo)=>na.style.map.terrain.getElevation(Qr,Bn,wo):null,Kn=yr.translatePosition(cr,pa,Lt,At);nf(Aa,Er,jr,zt,cr,Vi,Qr.posMatrix,nn,za,ji,yr,Kn,Qr.toUnwrapped(),Sn)}}}(Nt,Be,St,dt,St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),$t),St.paint.get("icon-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!1,St.paint.get("icon-translate"),St.paint.get("icon-translate-anchor"),St.layout.get("icon-rotation-alignment"),St.layout.get("icon-pitch-alignment"),St.layout.get("icon-keep-upright"),Tr,Ar),St.paint.get("text-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!0,St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.layout.get("text-keep-upright"),Tr,Ar),dt.map.showCollisionBoxes&&(Vu(Be,dt,St,Nt,!0),Vu(Be,dt,St,Nt,!1))})(I,ie,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent")return;let $t=St.paint.get("circle-opacity"),Tr=St.paint.get("circle-stroke-width"),Ar=St.paint.get("circle-stroke-opacity"),Kr=!St.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Ar.constantOr(1)===0))return;let na=Be.context,He=na.gl,Je=Be.depthModeForSublayer(0,ns.ReadOnly),lt=Es.disabled,vt=Be.colorModeForRenderPass(),Lt=[];for(let At=0;At<Nt.length;At++){let zt=Nt[At],cr=dt.getTile(zt),yr=cr.getBucket(St);if(!yr)continue;let Er=yr.programConfigurations.get(St.id),jr=Be.useProgram("circle",Er),Qr=yr.layoutVertexBuffer,pa=yr.indexBuffer,Aa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(zt),za={programConfiguration:Er,program:jr,layoutVertexBuffer:Qr,indexBuffer:pa,uniformValues:_n(Be,zt,cr,St),terrainData:Aa};if(Kr){let ci=yr.segments.get();for(let Vi of ci)Lt.push({segments:new t.a0([Vi]),sortKey:Vi.sortKey,state:za})}else Lt.push({segments:yr.segments,sortKey:0,state:za})}Kr&&Lt.sort((At,zt)=>At.sortKey-zt.sortKey);for(let At of Lt){let{programConfiguration:zt,program:cr,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=At.state;cr.draw(na,He.TRIANGLES,Je,lt,vt,to.disabled,jr,Qr,St.id,yr,Er,At.segments,St.paint,Be.transform.zoom,zt)}})(I,ie,we,Se);break;case"heatmap":(function(Be,dt,St,Nt){if(St.paint.get("heatmap-opacity")===0)return;let $t=Be.context;if(Be.style.map.terrain){for(let Tr of Nt){let Ar=dt.getTile(Tr);dt.hasRenderableParent(Tr)||(Be.renderPass==="offscreen"?of(Be,Ar,St,Tr):Be.renderPass==="translucent"&&jc(Be,St,Tr))}$t.viewport.set([0,0,Be.width,Be.height])}else Be.renderPass==="offscreen"?function(Tr,Ar,Kr,na){let He=Tr.context,Je=He.gl,lt=Es.disabled,vt=new fl([Je.ONE,Je.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Lt,At,zt){let cr=Lt.gl;Lt.activeTexture.set(cr.TEXTURE1),Lt.viewport.set([0,0,At.width/4,At.height/4]);let yr=zt.heatmapFbos.get(t.aU);yr?(cr.bindTexture(cr.TEXTURE_2D,yr.colorAttachment.get()),Lt.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Lt,At.width/4,At.height/4),zt.heatmapFbos.set(t.aU,yr))})(He,Tr,Kr),He.clear({color:t.aM.transparent});for(let Lt=0;Lt<na.length;Lt++){let At=na[Lt];if(Ar.hasRenderableParent(At))continue;let zt=Ar.getTile(At),cr=zt.getBucket(Kr);if(!cr)continue;let yr=cr.programConfigurations.get(Kr.id),Er=Tr.useProgram("heatmap",yr),{zoom:jr}=Tr.transform;Er.draw(He,Je.TRIANGLES,ns.disabled,lt,vt,to.disabled,no(At.posMatrix,zt,jr,Kr.paint.get("heatmap-intensity")),null,Kr.id,cr.layoutVertexBuffer,cr.indexBuffer,cr.segments,Kr.paint,Tr.transform.zoom,yr)}He.viewport.set([0,0,Tr.width,Tr.height])}(Be,dt,St,Nt):Be.renderPass==="translucent"&&function(Tr,Ar){let Kr=Tr.context,na=Kr.gl;Kr.setColorMode(Tr.colorModeForRenderPass());let He=Ar.heatmapFbos.get(t.aU);He&&(Kr.activeTexture.set(na.TEXTURE0),na.bindTexture(na.TEXTURE_2D,He.colorAttachment.get()),Kr.activeTexture.set(na.TEXTURE1),Nf(Kr,Ar).bind(na.LINEAR,na.CLAMP_TO_EDGE),Tr.useProgram("heatmapTexture").draw(Kr,na.TRIANGLES,ns.disabled,Es.disabled,Tr.colorModeForRenderPass(),to.disabled,cn(Tr,Ar,0,1),null,Ar.id,Tr.viewportBuffer,Tr.quadTriangleIndexBuffer,Tr.viewportSegments,Ar.paint,Tr.transform.zoom))}(Be,St)})(I,ie,we,Se);break;case"line":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent")return;let $t=St.paint.get("line-opacity"),Tr=St.paint.get("line-width");if($t.constantOr(1)===0||Tr.constantOr(1)===0)return;let Ar=Be.depthModeForSublayer(0,ns.ReadOnly),Kr=Be.colorModeForRenderPass(),na=St.paint.get("line-dasharray"),He=St.paint.get("line-pattern"),Je=He.constantOr(1),lt=St.paint.get("line-gradient"),vt=St.getCrossfadeParameters(),Lt=Je?"linePattern":na?"lineSDF":lt?"lineGradient":"line",At=Be.context,zt=At.gl,cr=!0;for(let yr of Nt){let Er=dt.getTile(yr);if(Je&&!Er.patternsLoaded())continue;let jr=Er.getBucket(St);if(!jr)continue;let Qr=jr.programConfigurations.get(St.id),pa=Be.context.program.get(),Aa=Be.useProgram(Lt,Qr),za=cr||Aa.program!==pa,ci=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(yr),Vi=He.constantOr(null);if(Vi&&Er.imageAtlas){let Sn=Er.imageAtlas,Kn=Sn.patternPositions[Vi.to.toString()],Bn=Sn.patternPositions[Vi.from.toString()];Kn&&Bn&&Qr.setConstantPatternPositions(Kn,Bn)}let ji=ci?yr:null,nn=Je?Oo(Be,Er,St,vt,ji):na?Wn(Be,Er,St,na,vt,ji):lt?hs(Be,Er,St,jr.lineClipsArray.length,ji):Wo(Be,Er,St,ji);if(Je)At.activeTexture.set(zt.TEXTURE0),Er.imageAtlasTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),Qr.updatePaintBuffers(vt);else if(na&&(za||Be.lineAtlas.dirty))At.activeTexture.set(zt.TEXTURE0),Be.lineAtlas.bind(At);else if(lt){let Sn=jr.gradients[St.id],Kn=Sn.texture;if(St.gradientVersion!==Sn.version){let Bn=256;if(St.stepInterpolant){let wo=dt.getSource().maxzoom,is=yr.canonical.z===wo?Math.ceil(1<<Be.transform.maxZoom-yr.canonical.z):1;Bn=t.ac(t.aV(jr.maxLineLength/t.X*1024*is),256,At.maxTextureSize)}Sn.gradient=t.aW({expression:St.gradientExpression(),evaluationKey:"lineProgress",resolution:Bn,image:Sn.gradient||void 0,clips:jr.lineClipsArray}),Sn.texture?Sn.texture.update(Sn.gradient):Sn.texture=new u(At,Sn.gradient,zt.RGBA),Sn.version=St.gradientVersion,Kn=Sn.texture}At.activeTexture.set(zt.TEXTURE0),Kn.bind(St.stepInterpolant?zt.NEAREST:zt.LINEAR,zt.CLAMP_TO_EDGE)}Aa.draw(At,zt.TRIANGLES,Ar,Be.stencilModeForClipping(yr),Kr,to.disabled,nn,ci,St.id,jr.layoutVertexBuffer,jr.indexBuffer,jr.segments,St.paint,Be.transform.zoom,Qr,jr.layoutVertexBuffer2),cr=!1}})(I,ie,we,Se);break;case"fill":(function(Be,dt,St,Nt){let $t=St.paint.get("fill-color"),Tr=St.paint.get("fill-opacity");if(Tr.constantOr(1)===0)return;let Ar=Be.colorModeForRenderPass(),Kr=St.paint.get("fill-pattern"),na=Be.opaquePassEnabledForLayer()&&!Kr.constantOr(1)&&$t.constantOr(t.aM.transparent).a===1&&Tr.constantOr(0)===1?"opaque":"translucent";if(Be.renderPass===na){let He=Be.depthModeForSublayer(1,Be.renderPass==="opaque"?ns.ReadWrite:ns.ReadOnly);Ef(Be,dt,St,Nt,He,Ar,!1)}if(Be.renderPass==="translucent"&&St.paint.get("fill-antialias")){let He=Be.depthModeForSublayer(St.getPaintProperty("fill-outline-color")?2:0,ns.ReadOnly);Ef(Be,dt,St,Nt,He,Ar,!0)}})(I,ie,we,Se);break;case"fill-extrusion":(function(Be,dt,St,Nt){let $t=St.paint.get("fill-extrusion-opacity");if($t!==0&&Be.renderPass==="translucent"){let Tr=new ns(Be.context.gl.LEQUAL,ns.ReadWrite,Be.depthRangeFor3D);if($t!==1||St.paint.get("fill-extrusion-pattern").constantOr(1))oc(Be,dt,St,Nt,Tr,Es.disabled,fl.disabled),oc(Be,dt,St,Nt,Tr,Be.stencilModeFor3D(),Be.colorModeForRenderPass());else{let Ar=Be.colorModeForRenderPass();oc(Be,dt,St,Nt,Tr,Es.disabled,Ar)}}})(I,ie,we,Se);break;case"hillshade":(function(Be,dt,St,Nt){if(Be.renderPass!=="offscreen"&&Be.renderPass!=="translucent")return;let $t=Be.context,Tr=Be.depthModeForSublayer(0,ns.ReadOnly),Ar=Be.colorModeForRenderPass(),[Kr,na]=Be.renderPass==="translucent"?Be.stencilConfigForOverlap(Nt):[{},Nt];for(let He of na){let Je=dt.getTile(He);Je.needsHillshadePrepare!==void 0&&Je.needsHillshadePrepare&&Be.renderPass==="offscreen"?Ql(Be,Je,St,Tr,Es.disabled,Ar):Be.renderPass==="translucent"&&Xc(Be,He,Je,St,Tr,Kr[He.overscaledZ],Ar)}$t.viewport.set([0,0,Be.width,Be.height])})(I,ie,we,Se);break;case"raster":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent"||St.paint.get("raster-opacity")===0||!Nt.length)return;let $t=Be.context,Tr=$t.gl,Ar=dt.getSource(),Kr=Be.useProgram("raster"),na=Be.colorModeForRenderPass(),[He,Je]=Ar instanceof at?[{},Nt]:Be.stencilConfigForOverlap(Nt),lt=Je[Je.length-1].overscaledZ,vt=!Be.options.moving;for(let Lt of Je){let At=Be.depthModeForSublayer(Lt.overscaledZ-lt,St.paint.get("raster-opacity")===1?ns.ReadWrite:ns.ReadOnly,Tr.LESS),zt=dt.getTile(Lt);zt.registerFadeDuration(St.paint.get("raster-fade-duration"));let cr=dt.findLoadedParent(Lt,0),yr=dt.findLoadedSibling(Lt),Er=qc(zt,cr||yr||null,dt,St,Be.transform,Be.style.map.terrain),jr,Qr,pa=St.paint.get("raster-resampling")==="nearest"?Tr.NEAREST:Tr.LINEAR;$t.activeTexture.set(Tr.TEXTURE0),zt.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),$t.activeTexture.set(Tr.TEXTURE1),cr?(cr.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),jr=Math.pow(2,cr.tileID.overscaledZ-zt.tileID.overscaledZ),Qr=[zt.tileID.canonical.x*jr%1,zt.tileID.canonical.y*jr%1]):zt.texture.bind(pa,Tr.CLAMP_TO_EDGE,Tr.LINEAR_MIPMAP_NEAREST),zt.texture.useMipmap&&$t.extTextureFilterAnisotropic&&Be.transform.pitch>20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Lt),za=Aa?Lt:null,ci=za?za.posMatrix:Be.transform.calculatePosMatrix(Lt.toUnwrapped(),vt),Vi=Ns(ci,Qr||[0,0],jr||1,Er,St);Ar instanceof at?Kr.draw($t,Tr.TRIANGLES,At,Es.disabled,na,to.disabled,Vi,Aa,St.id,Ar.boundsBuffer,Be.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw($t,Tr.TRIANGLES,At,He[Lt.overscaledZ],na,to.disabled,Vi,Aa,St.id,Be.rasterBoundsBuffer,Be.quadTriangleIndexBuffer,Be.rasterBoundsSegments)}})(I,ie,we,Se);break;case"background":(function(Be,dt,St,Nt){let $t=St.paint.get("background-color"),Tr=St.paint.get("background-opacity");if(Tr===0)return;let Ar=Be.context,Kr=Ar.gl,na=Be.transform,He=na.tileSize,Je=St.paint.get("background-pattern");if(Be.isPatternMissing(Je))return;let lt=!Je&&$t.a===1&&Tr===1&&Be.opaquePassEnabledForLayer()?"opaque":"translucent";if(Be.renderPass!==lt)return;let vt=Es.disabled,Lt=Be.depthModeForSublayer(0,lt==="opaque"?ns.ReadWrite:ns.ReadOnly),At=Be.colorModeForRenderPass(),zt=Be.useProgram(Je?"backgroundPattern":"background"),cr=Nt||na.coveringTiles({tileSize:He,terrain:Be.style.map.terrain});Je&&(Ar.activeTexture.set(Kr.TEXTURE0),Be.imageManager.bind(Be.context));let yr=St.getCrossfadeParameters();for(let Er of cr){let jr=Nt?Er.posMatrix:Be.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=Je?Cs(jr,Tr,Be,Je,{tileID:Er,tileSize:He},yr):ls(jr,Tr,$t),pa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Er);zt.draw(Ar,Kr.TRIANGLES,Lt,vt,At,to.disabled,Qr,pa,St.id,Be.tileExtentBuffer,Be.quadTriangleIndexBuffer,Be.tileExtentSegments)}})(I,0,we,Se);break;case"custom":(function(Be,dt,St){let Nt=Be.context,$t=St.implementation;if(Be.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Tr.call($t,Nt.gl,Be.transform.customLayerMatrix()),Nt.setDirty(),Be.setBaseState())}else if(Be.renderPass==="translucent"){Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Nt.setStencilMode(Es.disabled);let Tr=$t.renderingMode==="3d"?new ns(Be.context.gl.LEQUAL,ns.ReadWrite,Be.depthRangeFor3D):Be.depthModeForSublayer(0,ns.ReadOnly);Nt.setDepthMode(Tr),$t.render(Nt.gl,Be.transform.customLayerMatrix(),{farZ:Be.transform.farZ,nearZ:Be.transform.nearZ,fov:Be.transform._fov,modelViewProjectionMatrix:Be.transform.modelViewProjectionMatrix,projectionMatrix:Be.transform.projectionMatrix}),Nt.setDirty(),Be.setBaseState(),Nt.bindFramebuffer.set(null)}})(I,0,we)}}translatePosMatrix(I,ie,we,Se,Be){if(!we[0]&&!we[1])return I;let dt=Be?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(dt){let $t=Math.sin(dt),Tr=Math.cos(dt);we=[we[0]*Tr-we[1]*$t,we[0]*$t+we[1]*Tr]}let St=[Be?we[0]:Da(ie,we[0],this.transform.zoom),Be?we[1]:Da(ie,we[1],this.transform.zoom),0],Nt=new Float32Array(16);return t.J(Nt,I,St),Nt}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()),we=this.imageManager.getPattern(I.to.toString());return!ie||!we}useProgram(I,ie){this.cache=this.cache||{};let we=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new ba(this.context,Hr[I],ie,Ks[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}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,we){let Se=Math.pow(2,we),Be=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(St=>{let Nt=1/(St=t.af([],St,I))[3]/ie*Se;return t.b1(St,St,[Nt,Nt,1/St[3],Nt])}),dt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(St=>{let Nt=function(Kr,na){var He=na[0],Je=na[1],lt=na[2],vt=He*He+Je*Je+lt*lt;return vt>0&&(vt=1/Math.sqrt(vt)),Kr[0]=na[0]*vt,Kr[1]=na[1]*vt,Kr[2]=na[2]*vt,Kr}([],function(Kr,na,He){var Je=na[0],lt=na[1],vt=na[2],Lt=He[0],At=He[1],zt=He[2];return Kr[0]=lt*zt-vt*At,Kr[1]=vt*Lt-Je*zt,Kr[2]=Je*At-lt*Lt,Kr}([],M([],Be[St[0]],Be[St[1]]),M([],Be[St[2]],Be[St[1]]))),$t=-((Tr=Nt)[0]*(Ar=Be[St[1]])[0]+Tr[1]*Ar[1]+Tr[2]*Ar[2]);var Tr,Ar;return Nt.concat($t)});return new ol(Be,dt)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(we,Se,Be){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we}([],function(we,Se,Be){return we[0]=Se[0]+Be[0],we[1]=Se[1]+Be[1],we[2]=Se[2]+Be[2],we}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],we=w(this.min),Se=w(this.max);for(let Be=0;Be<ie.length;Be++)we[Be]=ie[Be]?this.min[Be]:this.center[Be],Se[Be]=ie[Be]?this.center[Be]:this.max[Be];return Se[2]=this.max[2],new vc(we,Se)}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]],we=!0;for(let Se=0;Se<I.planes.length;Se++){let Be=I.planes[Se],dt=0;for(let St=0;St<ie.length;St++)t.b2(Be,ie[St])>=0&&dt++;if(dt===0)return 0;dt!==ie.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Be=Number.MAX_VALUE,dt=-Number.MAX_VALUE;for(let St=0;St<I.points.length;St++){let Nt=I.points[St][Se]-this.min[Se];Be=Math.min(Be,Nt),dt=Math.max(dt,Nt)}if(dt<0||Be>this.max[Se]-this.min[Se])return 0}return 1}}class yu{constructor(I=0,ie=0,we=0,Se=0){if(isNaN(I)||I<0||isNaN(ie)||ie<0||isNaN(we)||we<0||isNaN(Se)||Se<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=we,this.right=Se}interpolate(I,ie,we){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,we)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,we)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,we)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,we)),this}getCenter(I,ie){let we=t.ac((this.left+I-this.right)/2,0,I),Se=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(we,Se)}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,we,Se,Be){this.tileSize=512,this._renderWorldCopies=Be===void 0||!!Be,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=we??0,this._maxPitch=Se??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 we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we}(),function(we,Se,Be){var dt=Se[0],St=Se[1],Nt=Se[2],$t=Se[3],Tr=Math.sin(Be),Ar=Math.cos(Be);we[0]=dt*Ar+Nt*Tr,we[1]=St*Ar+$t*Tr,we[2]=dt*-Tr+Nt*Ar,we[3]=St*-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,we){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,we),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 we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Be=this.pointCoordinate(new t.P(this.width,this.height)),dt=this.pointCoordinate(new t.P(0,this.height)),St=Math.floor(Math.min(we.x,Se.x,Be.x,dt.x)),Nt=Math.floor(Math.max(we.x,Se.x,Be.x,dt.x)),$t=1;for(let Tr=St-$t;Tr<=Nt+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,we;let Se=this.coveringZoomLevel(I),Be=Se;if(I.minzoom!==void 0&&Se<I.minzoom)return[];I.maxzoom!==void 0&&Se>I.maxzoom&&(Se=I.maxzoom);let dt=this.pointCoordinate(this.getCameraPoint()),St=t.Z.fromLngLat(this.center),Nt=Math.pow(2,Se),$t=[Nt*dt.x,Nt*dt.y,0],Tr=[Nt*St.x,Nt*St.y,0],Ar=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Se);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,He=At=>({aabb:new vc([At*Nt,0,0],[(At+1)*Nt,Nt,0]),zoom:0,x:0,y:0,wrap:At,fullyVisible:!1}),Je=[],lt=[],vt=Se,Lt=I.reparseOverscaled?Be:Se;if(this._renderWorldCopies)for(let At=1;At<=3;At++)Je.push(He(-At)),Je.push(He(At));for(Je.push(He(0));Je.length>0;){let At=Je.pop(),zt=At.x,cr=At.y,yr=At.fullyVisible;if(!yr){let Aa=At.aabb.intersects(Ar);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=At.aabb.distanceX(Er),Qr=At.aabb.distanceY(Er),pa=Math.max(Math.abs(jr),Math.abs(Qr));if(At.zoom===vt||pa>na+(1<<vt-At.zoom)-2&&At.zoom>=Kr){let Aa=vt-At.zoom,za=$t[0]-.5-(zt<<Aa),ci=$t[1]-.5-(cr<<Aa);lt.push({tileID:new t.S(At.zoom===vt?Lt:At.zoom,At.wrap,At.zoom,zt,cr),distanceSq:g([Tr[0]-.5-zt,Tr[1]-.5-cr]),tileDistanceToCamera:Math.sqrt(za*za+ci*ci)})}else for(let Aa=0;Aa<4;Aa++){let za=(zt<<1)+Aa%2,ci=(cr<<1)+(Aa>>1),Vi=At.zoom+1,ji=At.aabb.quadrant(Aa);if(I.terrain){let nn=new t.S(Vi,At.wrap,Vi,za,ci),Sn=I.terrain.getMinMaxElevation(nn),Kn=(ie=Sn.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(we=Sn.maxElevation)!==null&&we!==void 0?we:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}Je.push({aabb:ji,zoom:Vi,x:za,y:ci,wrap:At.wrap,fullyVisible:yr})}}return lt.sort((At,zt)=>At.distanceSq-zt.distanceSq).map(At=>At.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,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,I),Be=I.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Be))return;let dt=we+ie-Be,St=Math.cos(this._pitch)*this.cameraToCenterDistance/dt/t.b5(1,Se.lat),Nt=this.scaleZoom(St/this.tileSize);this._elevation=Be,this._center=Se,this.zoom=Nt}setLocationAtPoint(I,ie){let we=this.pointCoordinate(ie),Se=this.pointCoordinate(this.centerPoint),Be=this.locationCoordinate(I),dt=new t.Z(Be.x-(we.x-Se.x),Be.y-(we.y-Se.y));this.center=this.coordinateLocation(dt),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 we=[I.x,I.y,0,1],Se=[I.x,I.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);let Be=we[3],dt=Se[3],St=we[1]/Be,Nt=Se[1]/dt,$t=we[2]/Be,Tr=Se[2]/dt,Ar=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(we[0]/Be,Se[0]/dt,Ar)/this.worldSize,t.y.number(St,Nt,Ar)/this.worldSize)}coordinatePoint(I,ie=0,we=this.pixelMatrix){let Se=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[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,we=this.worldSize/this.zoomScale(ie.z),Se=ie.x+Math.pow(2,ie.z)*I.wrap,Be=t.an(new Float64Array(16));return t.J(Be,Be,[Se*we,ie.y*we,0]),t.K(Be,Be,[we/t.X,we/t.X,1]),Be}calculatePosMatrix(I,ie=!1){let we=I.key,Se=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];let Be=this.calculateTileMatrix(I);return t.L(Be,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Be),Se[we]=new Float32Array(Be),Se[we]}calculateFogMatrix(I){let ie=I.key,we=this._fogMatrixCache;if(we[ie])return we[ie];let Se=this.calculateTileMatrix(I);return t.L(Se,this.fogMatrix,Se),we[ie]=new Float32Array(Se),we[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let we={center:new t.N(I.lng,I.lat),zoom:ie},Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){let At=179.9999999999;Se=[-At,At]}let Be=this.tileSize*this.zoomScale(we.zoom),dt=0,St=Be,Nt=0,$t=Be,Tr=0,Ar=0,{x:Kr,y:na}=this.size;if(this.latRange){let At=this.latRange;dt=t.Q(At[1])*Be,St=t.Q(At[0])*Be,St-dt<na&&(Tr=na/(St-dt))}Se&&(Nt=t.b3(t.O(Se[0])*Be,0,Be),$t=t.b3(t.O(Se[1])*Be,0,Be),$t<Nt&&($t+=Be),$t-Nt<Kr&&(Ar=Kr/($t-Nt)));let{x:He,y:Je}=this.project.call({worldSize:Be},I),lt,vt,Lt=Math.max(Ar||0,Tr||0);if(Lt){let At=new t.P(Ar?($t+Nt)/2:He,Tr?(St+dt)/2:Je);return we.center=this.unproject.call({worldSize:Be},At).wrap(),we.zoom+=this.scaleZoom(Lt),we}if(this.latRange){let At=na/2;Je-At<dt&&(vt=dt+At),Je+At>St&&(vt=St-At)}if(Se){let At=(Nt+$t)/2,zt=He;this._renderWorldCopies&&(zt=t.b3(He,At-Be/2,At+Be/2));let cr=Kr/2;zt-cr<Nt&&(lt=Nt+cr),zt+cr>$t&&(lt=$t-cr)}if(lt!==void 0||vt!==void 0){let At=new t.P(lt??He,vt??Je);we.center=this.unproject.call({worldSize:Be},At).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=we,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;let Be=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),dt=Math.min(this.elevation,this.minElevationForCurrentTile),St=Be-dt*this._pixelPerMeter/Math.cos(this._pitch),Nt=dt<0?St:Be,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Ar=Math.sin(Tr)*Nt/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)),He=Math.sin(na)*Nt/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),Je=Math.min(Ar,He);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Je+Nt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-I.x/this.width,Se[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ie,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Be,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,-we,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,Se);let lt=this.width%2/2,vt=this.height%2/2,Lt=Math.cos(this.angle),At=Math.sin(this.angle),zt=ie-Math.round(ie)+Lt*lt+At*vt,cr=we-Math.round(we)+Lt*vt+At*lt,yr=new Float64Array(Se);if(t.J(yr,yr,[zt>.5?zt-1:zt,cr>.5?cr-1:cr,0]),this.alignedModelViewProjectionMatrix=yr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,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 we=ie.x,Se=ie.y,Be=ie.x,dt=ie.y;for(let St of I)we=Math.min(we,St.x),Se=Math.min(Se,St.y),Be=Math.max(Be,St.x),dt=Math.max(dt,St.y);return[new t.P(we,Se),new t.P(Be,Se),new t.P(Be,dt),new t.P(we,dt),new t.P(we,Se)]}}lngLatToCameraDepth(I,ie){let we=this.locationCoordinate(I),Se=[we.x*this.worldSize,we.y*this.worldSize,ie,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function qf(Ue,I){let ie,we=!1,Se=null,Be=null,dt=()=>{Se=null,we&&(Ue.apply(Be,ie),Se=setTimeout(dt,I),we=!1)};return(...St)=>(we=!0,Be=this,ie=St,Se||dt(),Se)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let we;return ie.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(we=>isNaN(we))){let we=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:we,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 we=ie.join("/"),Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Be=window.location.hash.replace(Se,"");Be.startsWith("#&")?Be=Be.slice(0,1)+Be.slice(2):Be==="#"&&(Be="");let dt=window.location.href.replace(/(#.+)?$/,Be);dt=dt.replace("&&","&"),window.history.replaceState(window.history.state,null,dt)},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(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Be=Math.pow(10,Se),dt=Math.round(ie.lng*Be)/Be,St=Math.round(ie.lat*Be)/Be,Nt=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${dt}/${St}/${we}`:`${we}/${St}/${dt}`,(Nt||$t)&&(Tr+="/"+Math.round(10*Nt)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(He=>{let Je=He.split("=")[0];return Je===Ar?(Kr=!0,`${Je}=${Tr}`):He}).filter(He=>He);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:Be}of this._inertiaBuffer)ie.zoom+=Be.zoomDelta||0,ie.bearing+=Be.bearingDelta||0,ie.pitch+=Be.pitchDelta||0,Be.panDelta&&ie.pan._add(Be.panDelta),Be.around&&(ie.around=Be.around),Be.pinchAround&&(ie.pinchAround=Be.pinchAround);let we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ie.pan.mag()){let Be=lf(ie.pan.mag(),we,t.e({},Ec,I||{}));Se.offset=ie.pan.mult(Be.amount/ie.pan.mag()),Se.center=this._map.transform.center,Nu(Se,Be)}if(ie.zoom){let Be=lf(ie.zoom,we,mc);Se.zoom=this._map.transform.zoom+Be.amount,Nu(Se,Be)}if(ie.bearing){let Be=lf(ie.bearing,we,Lh);Se.bearing=this._map.transform.bearing+t.ac(Be.amount,-179,179),Nu(Se,Be)}if(ie.pitch){let Be=lf(ie.pitch,we,sf);Se.pitch=this._map.transform.pitch+Be.amount,Nu(Se,Be)}if(Se.zoom||Se.bearing){let Be=ie.pinchAround===void 0?ie.around:ie.pinchAround;Se.around=Be?this._map.unproject(Be):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function Nu(Ue,I){(!Ue.duration||Ue.duration<I.duration)&&(Ue.duration=I.duration,Ue.easing=I.easing)}function lf(Ue,I,ie){let{maxSpeed:we,linearity:Se,deceleration:Be}=ie,dt=t.ac(Ue*Se/(I/1e3),-we,we),St=Math.abs(dt)/(Be*Se);return{easing:ie.easing,duration:1e3*St,amount:dt*(St/2)}}class au extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we,Se={}){let Be=i.mousePos(ie.getCanvas(),we),dt=ie.unproject(Be);super(I,t.e({point:Be,lngLat:dt,originalEvent:we},Se)),this._defaultPrevented=!1,this.target=ie}}class Yc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we){let Se=I==="touchend"?we.changedTouches:we.touches,Be=i.touchPos(ie.getCanvasContainer(),Se),dt=Be.map(Nt=>ie.unproject(Nt)),St=Be.reduce((Nt,$t,Tr,Ar)=>Nt.add($t.div(Ar.length)),new t.P(0,0));super(I,{points:Be,point:St,lngLats:dt,lngLat:ie.unproject(St),originalEvent:we}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we){super(I,{originalEvent:we}),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 we=ie;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)<this._clickTolerance)return;let Se=this._startPos;this._lastPos=we,this._box||(this._box=i.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",I));let Be=Math.min(Se.x,we.x),dt=Math.max(Se.x,we.x),St=Math.min(Se.y,we.y),Nt=Math.max(Se.y,we.y);i.setTransform(this._box,`translate(${Be}px,${St}px)`),this._box.style.width=dt-Be+"px",this._box.style.height=Nt-St+"px"}mouseupWindow(I,ie){if(!this._active||I.button!==0)return;let we=this._startPos,Se=ie;if(this.reset(),i.suppressClick(),we.x!==Se.x||we.y!==Se.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:I})),{cameraAnimation:Be=>Be.fitScreenCoordinates(we,Se,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(Ue,I){if(Ue.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Ue.length}, points ${I.length}`);let ie={};for(let we=0;we<Ue.length;we++)ie[Ue[we].identifier]=I[we];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,we){(this.centroid||we.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),we.length===this.numTouches&&(this.centroid=function(Se){let Be=new t.P(0,0);for(let dt of Se)Be._add(dt);return Be.div(Se.length)}(ie),this.touches=Cf(we,ie)))}touchmove(I,ie,we){if(this.aborted||!this.centroid)return;let Se=Cf(we,ie);for(let Be in this.touches){let dt=Se[Be];(!dt||dt.dist(this.touches[Be])>30)&&(this.aborted=!0)}}touchend(I,ie,we){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){let Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}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,we){this.singleTap.touchstart(I,ie,we)}touchmove(I,ie,we){this.singleTap.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this.singleTap.touchend(I,ie,we);if(Se){let Be=I.timeStamp-this.lastTime<500,dt=!this.lastTap||this.lastTap.dist(Se)<30;if(Be&&dt||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}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,we){this._zoomIn.touchstart(I,ie,we),this._zoomOut.touchstart(I,ie,we)}touchmove(I,ie,we){this._zoomIn.touchmove(I,ie,we),this._zoomOut.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this._zoomIn.touchend(I,ie,we),Be=this._zoomOut.touchend(I,ie,we),dt=this._tr;return Se?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom+1,around:dt.unproject(Se)},{originalEvent:I})}):Be?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom-1,around:dt.unproject(Be)},{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 we=this._lastPoint;if(!we)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Se=ie.length?ie[0]:ie;return!this._moved&&Se.dist(we)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Se,this._move(we,Se))}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,we){let Se=gf[we];return ie.buttons===void 0||(ie.buttons&Se)!==Se}(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=Ue=>{Ue.mousedown=Ue.dragStart,Ue.mousemoveWindow=Ue.dragMove,Ue.mouseup=Ue.dragEnd,Ue.contextmenu=I=>{I.preventDefault()}},iu=({enable:Ue,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({bearingDelta:(Be.x-Se.x)*ie}),moveStateManager:we,enable:Ue,assignEvents:Lf})},Vf=({enable:Ue,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({pitchDelta:(Be.y-Se.y)*ie}),moveStateManager:we,enable:Ue,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,we){return this._calculateTransform(I,ie,we)}touchmove(I,ie,we){if(this._active){if(!this._shouldBePrevented(we.length))return I.preventDefault(),this._calculateTransform(I,ie,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,we){this._calculateTransform(I,ie,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,we){we.length>0&&(this._active=!0);let Se=Cf(we,ie),Be=new t.P(0,0),dt=new t.P(0,0),St=0;for(let $t in Se){let Tr=Se[$t],Ar=this._touches[$t];Ar&&(Be._add(Tr),dt._add(Tr.sub(Ar)),St++,Se[$t]=Tr)}if(this._touches=Se,this._shouldBePrevented(St)||!dt.mag())return;let Nt=dt.div(St);return this._sum._add(Nt),this._sum.mag()<this._clickTolerance?void 0:{around:Be.div(St),panDelta:Nt}}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,we){this._firstTwoTouches||we.length<2||(this._firstTwoTouches=[we[0].identifier,we[1].identifier],this._start([ie[0],ie[1]]))}touchmove(I,ie,we){if(!this._firstTwoTouches)return;I.preventDefault();let[Se,Be]=this._firstTwoTouches,dt=gc(we,ie,Se),St=gc(we,ie,Be);if(!dt||!St)return;let Nt=this._aroundCenter?null:dt.add(St).div(2);return this._move([dt,St],Nt,I)}touchend(I,ie,we){if(!this._firstTwoTouches)return;let[Se,Be]=this._firstTwoTouches,dt=gc(we,ie,Se),St=gc(we,ie,Be);dt&&St||(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(Ue,I,ie){for(let we=0;we<Ue.length;we++)if(Ue[we].identifier===ie)return I[we]}function ql(Ue,I){return Math.log(Ue/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 we=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,we),pinchAround:ie}}}function Lc(Ue,I){return 180*Ue.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,we){let Se=this._vector;if(this._vector=I[0].sub(I[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Lc(this._vector,Se),pinchAround:ie}}_isBelowThreshold(I){this._minDiameter=Math.min(this._minDiameter,I.mag());let ie=25/(Math.PI*this._minDiameter)*360,we=Lc(I,this._startVector);return Math.abs(we)<ie}}function sc(Ue){return Math.abs(Ue.y)>Math.abs(Ue.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,we){super.touchstart(I,ie,we),this._currentTouchCount=we.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Se=I[0].sub(this._lastPoints[0]),Be=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Be,we.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Se.y+Be.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,we){if(this._valid!==void 0)return this._valid;let Se=I.mag()>=2,Be=ie.mag()>=2;if(!Se&&!Be)return;if(!Se||!Be)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;let dt=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&dt}}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,we=0,Se=0,Be=0,dt=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?we=-1:(I.preventDefault(),Be=-1);break;case 39:I.shiftKey?we=1:(I.preventDefault(),Be=1);break;case 38:I.shiftKey?Se=1:(I.preventDefault(),dt=-1);break;case 40:I.shiftKey?Se=-1:(I.preventDefault(),dt=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:St=>{let Nt=this._tr;St.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Nt.zoom)+ie*(I.shiftKey?2:1):Nt.zoom,bearing:Nt.bearing+we*this._bearingStep,pitch:Nt.pitch+Se*this._pitchStep,offset:[-Be*this._panStep,-dt*this._panStep],center:Nt.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(Ue){return Ue*(2-Ue)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},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,we=n.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Se*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),we=this._tr;this._around=ie.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ie)):t.N.convert(we.center),this._aroundPoint=we.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 Nt=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Nt)));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,we=this._startZoom,Se=this._easing,Be,dt=!1,St=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&St){let Nt=Math.min(St/200,1),$t=Se(Nt);Be=t.y.number(we,ie,$t),Nt<1?this._frameId||(this._frameId=!0):dt=!0}else Be=ie,dt=!0;return this._active=!0,dt&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!dt,zoomDelta:Be-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let we=this._prevEase,Se=(n.now()-we.start)/we.duration,Be=we.easing(Se+.01)-we.easing(Se),dt=.27/Math.sqrt(Be*Be+1e-4)*.01,St=Math.sqrt(.0729-dt*dt);ie=t.b8(dt,St,.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:we=>{we.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,we){if(!this._swipePoint)if(this._tapTime){let Se=ie[0],Be=I.timeStamp-this._tapTime<500,dt=this._tapPoint.dist(Se)<30;Be&&dt?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(I,ie,we)}touchmove(I,ie,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;let Se=ie[0],Be=Se.y-this._swipePoint.y;return this._swipePoint=Se,I.preventDefault(),this._active=!0,{zoomDelta:Be/128}}}else this._tap.touchmove(I,ie,we)}touchend(I,ie,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{let Se=this._tap.touchend(I,ie,we);Se&&(this._tapTime=I.timeStamp,this._tapPoint=Se)}}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,we){this._el=I,this._mousePan=ie,this._touchPan=we}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 dn{constructor(I,ie,we){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=we}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,we,Se){this._el=I,this._touchZoom=ie,this._touchRotate=we,this._tapDragZoom=Se,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 we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ie,this._container.appendChild(Se);let Be=document.createElement("div");Be.className="maplibregl-mobile-message",Be.textContent=we,this._container.appendChild(Be),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=Ue=>Ue.zoom||Ue.drag||Ue.pitch||Ue.rotate;class mi extends t.k{}function Mn(Ue){return Ue.panDelta&&Ue.panDelta.mag()||Ue.zoomDelta||Ue.bearingDelta||Ue.pitchDelta}class Qn{constructor(I,ie){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Be)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let dt=Se.type==="renderFrame"?void 0:Se,St={needsRenderFrame:!1},Nt={},$t={},Tr=Se.touches,Ar=Tr?this._getMapTouches(Tr):void 0,Kr=Ar?i.touchPos(this._map.getCanvas(),Ar):i.mousePos(this._map.getCanvas(),Se);for(let{handlerName:Je,handler:lt,allowed:vt}of this._handlers){if(!lt.isEnabled())continue;let Lt;this._blockedByActive($t,vt,Je)?lt.reset():lt[Be||Se.type]&&(Lt=lt[Be||Se.type](Se,Kr,Ar),this.mergeHandlerResult(St,Nt,Lt,Je,dt),Lt&&Lt.needsRenderFrame&&this._triggerRenderFrame()),(Lt||lt.isActive())&&($t[Je]=lt)}let na={};for(let Je in this._previousActiveHandlers)$t[Je]||(na[Je]=dt);this._previousActiveHandlers=$t,(Object.keys(na).length||Mn(St))&&(this._changes.push([St,Nt,na]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(St))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:He}=St;He&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],He(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 we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(let[Se,Be,dt]of this._listeners)i.addEventListener(Se,Be,Se===document?this.handleWindowEvent:this.handleEvent,dt)}destroy(){for(let[I,ie,we]of this._listeners)i.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(I){let ie=this._map,we=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Se=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Se),I.interactive&&I.boxZoom&&Se.enable();let Be=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",Be),I.cooperativeGestures&&Be.enable();let dt=new kc(ie),St=new Ci(ie);ie.doubleClickZoom=new li(St,dt),this._add("tapZoom",dt),this._add("clickZoom",St),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Nt=new Hi;this._add("tapDragZoom",Nt);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 dn(I,Tr,Ar),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Lt,clickTolerance:At})=>{let zt=new Wu({checkCorrectEvent:cr=>i.mouseButton(cr)===0&&!cr.ctrlKey});return new Hu({clickTolerance:At,move:(cr,yr)=>({around:yr,panDelta:yr.sub(cr)}),activateOnStart:!0,moveStateManager:zt,enable:Lt,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(we,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let He=new Jc,Je=new xu;ie.touchZoomRotate=new Pi(we,Je,He,Nt),this._add("touchRotate",He,["touchPan","touchZoom"]),this._add("touchZoom",Je,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let vt=ie.keyboard=new br(ie);this._add("keyboard",vt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,we){this._handlers.push({handlerName:I,handler:ie,allowed:we}),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,we){for(let Se in I)if(Se!==we&&(!ie||ie.indexOf(Se)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let we of I)this._el.contains(we.target)&&ie.push(we);return ie}mergeHandlerResult(I,ie,we,Se,Be){if(!we)return;t.e(I,we);let dt={handlerName:Se,originalEvent:we.originalEvent||Be};we.zoomDelta!==void 0&&(ie.zoom=dt),we.panDelta!==void 0&&(ie.drag=dt),we.pitchDelta!==void 0&&(ie.pitch=dt),we.bearingDelta!==void 0&&(ie.rotate=dt)}_applyChanges(){let I={},ie={},we={};for(let[Se,Be,dt]of this._changes)Se.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(I.around=Se.around),Se.pinchAround!==void 0&&(I.pinchAround=Se.pinchAround),Se.noInertia&&(I.noInertia=Se.noInertia),t.e(ie,Be),t.e(we,dt);this._updateMapTransform(I,ie,we),this._changes=[]}_updateMapTransform(I,ie,we){let Se=this._map,Be=Se._getTransformForUpdate(),dt=Se.terrain;if(!(Mn(I)||dt&&this._terrainMovement))return this._fireEvents(ie,we,!0);let{panDelta:St,zoomDelta:Nt,bearingDelta:$t,pitchDelta:Tr,around:Ar,pinchAround:Kr}=I;Kr!==void 0&&(Ar=Kr),Se._stop(!0),Ar=Ar||Se.transform.centerPoint;let na=Be.pointLocation(St?Ar.sub(St):Ar);$t&&(Be.bearing+=$t),Tr&&(Be.pitch+=Tr),Nt&&(Be.zoom+=Nt),dt?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?Be.center=Be.pointLocation(Be.centerPoint.sub(St)):Be.setLocationAtPoint(na,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Be.setLocationAtPoint(na,Ar)):Be.setLocationAtPoint(na,Ar),Se._applyUpdatedTransform(Be),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,we,!0)}_fireEvents(I,ie,we){let Se=Ni(this._eventsInProgress),Be=Ni(I),dt={};for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._eventsInProgress[Ar]||(dt[`${Ar}start`]=Kr),this._eventsInProgress[Ar]=I[Ar]}!Se&&Be&&this._fireEvent("movestart",Be.originalEvent);for(let Ar in dt)this._fireEvent(Ar,dt[Ar]);Be&&this._fireEvent("move",Be.originalEvent);for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._fireEvent(Ar,Kr)}let St={},Nt;for(let Ar in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Ar];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Ar],Nt=ie[Kr]||na,St[`${Ar}end`]=Nt)}for(let Ar in St)this._fireEvent(Ar,St[Ar]);let $t=Ni(this._eventsInProgress),Tr=(Se||Be)&&!$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(we&&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:Nt})),Kr(this._map.getBearing())&&this._map.resetNorth()):(Kr(Ar.bearing||this._map.getBearing())&&(Ar.bearing=0),Ar.freezeElevation=!0,this._map.easeTo(Ar,{originalEvent:Nt})),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 ao extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let we=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<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,we){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),we)}panTo(I,ie,we){return this.easeTo(t.e({center:I},ie),we)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,we){return this.easeTo(t.e({zoom:I},ie),we)}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,we){return this.easeTo(t.e({bearing:I},ie),we)}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 we=ie&&ie.bearing||0;return this._cameraForBoxAndBearing(I.getNorthWest(),I.getSouthEast(),we,ie)}_cameraForBoxAndBearing(I,ie,we,Se){let Be={top:0,bottom:0,right:0,left:0};if(typeof(Se=t.e({padding:Be,offset:[0,0],maxZoom:this.transform.maxZoom},Se)).padding=="number"){let Aa=Se.padding;Se.padding={top:Aa,bottom:Aa,right:Aa,left:Aa}}Se.padding=t.e(Be,Se.padding);let dt=this.transform,St=dt.padding,Nt=new re(I,ie),$t=dt.project(Nt.getNorthWest()),Tr=dt.project(Nt.getNorthEast()),Ar=dt.project(Nt.getSouthEast()),Kr=dt.project(Nt.getSouthWest()),na=t.ba(-we),He=$t.rotate(na),Je=Tr.rotate(na),lt=Ar.rotate(na),vt=Kr.rotate(na),Lt=new t.P(Math.max(He.x,Je.x,vt.x,lt.x),Math.max(He.y,Je.y,vt.y,lt.y)),At=new t.P(Math.min(He.x,Je.x,vt.x,lt.x),Math.min(He.y,Je.y,vt.y,lt.y)),zt=Lt.sub(At),cr=(dt.width-(St.left+St.right+Se.padding.left+Se.padding.right))/zt.x,yr=(dt.height-(St.top+St.bottom+Se.padding.top+Se.padding.bottom))/zt.y;if(yr<0||cr<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let Er=Math.min(dt.scaleZoom(dt.scale*Math.min(cr,yr)),Se.maxZoom),jr=t.P.convert(Se.offset),Qr=new t.P((Se.padding.left-Se.padding.right)/2,(Se.padding.top-Se.padding.bottom)/2).rotate(t.ba(we)),pa=jr.add(Qr).mult(dt.scale/dt.zoomScale(Er));return{center:dt.unproject($t.add(Ar).div(2).sub(pa)),zoom:Er,bearing:we}}fitBounds(I,ie,we){return this._fitInternal(this.cameraForBounds(I,ie),ie,we)}fitScreenCoordinates(I,ie,we,Se,Be){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(I)),this.transform.pointLocation(t.P.convert(ie)),we,Se),Se,Be)}_fitInternal(I,ie,we){return I?(delete(ie=t.e(I,ie)).padding,ie.linear?this.easeTo(ie,we):this.flyTo(ie,we)):this}jumpTo(I,ie){this.stop();let we=this._getTransformForUpdate(),Se=!1,Be=!1,dt=!1;return"zoom"in I&&we.zoom!==+I.zoom&&(Se=!0,we.zoom=+I.zoom),I.center!==void 0&&(we.center=t.N.convert(I.center)),"bearing"in I&&we.bearing!==+I.bearing&&(Be=!0,we.bearing=+I.bearing),"pitch"in I&&we.pitch!==+I.pitch&&(dt=!0,we.pitch=+I.pitch),I.padding==null||we.isPaddingEqual(I.padding)||(we.padding=I.padding),this._applyUpdatedTransform(we),this.fire(new t.k("movestart",ie)).fire(new t.k("move",ie)),Se&&this.fire(new t.k("zoomstart",ie)).fire(new t.k("zoom",ie)).fire(new t.k("zoomend",ie)),Be&&this.fire(new t.k("rotatestart",ie)).fire(new t.k("rotate",ie)).fire(new t.k("rotateend",ie)),dt&&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,we,Se=0){let Be=t.Z.fromLngLat(I,ie),dt=t.Z.fromLngLat(we,Se),St=dt.x-Be.x,Nt=dt.y-Be.y,$t=dt.z-Be.z,Tr=Math.hypot(St,Nt,$t);if(Tr===0)throw new Error("Can't calculate camera options with same From and To");let Ar=Math.hypot(St,Nt),Kr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Tr/this.transform.tileSize),na=180*Math.atan2(St,-Nt)/Math.PI,He=180*Math.acos(Ar/Tr)/Math.PI;return He=$t<0?90-He:90+He,{center:dt.toLngLat(),zoom:Kr,pitch:He,bearing:na}}easeTo(I,ie){var we;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 Se=this._getTransformForUpdate(),Be=Se.zoom,dt=Se.bearing,St=Se.pitch,Nt=Se.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,dt):dt,Tr="pitch"in I?+I.pitch:St,Ar="padding"in I?I.padding:Se.padding,Kr=t.P.convert(I.offset),na=Se.centerPoint.add(Kr),He=Se.pointLocation(na),{center:Je,zoom:lt}=Se.getConstrained(t.N.convert(I.center||He),(we=I.zoom)!==null&&we!==void 0?we:Be);this._normalizeCenter(Je,Se);let vt=Se.project(He),Lt=Se.project(Je).sub(vt),At=Se.zoomScale(lt-Be),zt,cr;I.around&&(zt=t.N.convert(I.around),cr=Se.locationPoint(zt));let yr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||lt!==Be,this._rotating=this._rotating||dt!==$t,this._pitching=this._pitching||Tr!==St,this._padding=!Se.isPaddingEqual(Ar),this._easeId=I.easeId,this._prepareEase(ie,I.noMoveStart,yr),this.terrain&&this._prepareElevation(Je),this._ease(Er=>{if(this._zooming&&(Se.zoom=t.y.number(Be,lt,Er)),this._rotating&&(Se.bearing=t.y.number(dt,$t,Er)),this._pitching&&(Se.pitch=t.y.number(St,Tr,Er)),this._padding&&(Se.interpolatePadding(Nt,Ar,Er),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),zt)Se.setLocationAtPoint(zt,cr);else{let jr=Se.zoomScale(Se.zoom-Be),Qr=lt>Be?Math.min(2,At):Math.max(.5,At),pa=Math.pow(Qr,1-Er),Aa=Se.unproject(vt.add(Lt.mult(Er*pa)).mult(jr));Se.setLocationAtPoint(Se.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},I),this}_prepareEase(I,ie,we={}){this._moving=!0,ie||we.moving||this.fire(new t.k("movestart",I)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!we.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 we=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(we-(ie-(we*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(),we=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitude<we){let Se=this.calculateCameraOptionsFromTo(ie.lngLat,we,I.center,I.elevation);return{pitch:Se.pitch,zoom:Se.zoom}}return{}}_applyUpdatedTransform(I){let ie=[];if(this.terrain&&ie.push(Se=>this._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ie.push(Se=>this.transformCameraUpdate(Se)),!ie.length)return;let we=I.clone();for(let Se of ie){let Be=we.clone(),{center:dt,zoom:St,pitch:Nt,bearing:$t,elevation:Tr}=Se(Be);dt&&(Be.center=dt),St!==void 0&&(Be.zoom=St),Nt!==void 0&&(Be.pitch=Nt),$t!==void 0&&(Be.bearing=$t),Tr!==void 0&&(Be.elevation=Tr),we.apply(Be)}this.transform.apply(we)}_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 we=this._zooming,Se=this._rotating,Be=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",I)),Se&&this.fire(new t.k("rotateend",I)),Be&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var we;if(!I.essential&&n.prefersReducedMotion){let nn=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nn,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Se=this._getTransformForUpdate(),Be=Se.zoom,dt=Se.bearing,St=Se.pitch,Nt=Se.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,dt):dt,Tr="pitch"in I?+I.pitch:St,Ar="padding"in I?I.padding:Se.padding,Kr=t.P.convert(I.offset),na=Se.centerPoint.add(Kr),He=Se.pointLocation(na),{center:Je,zoom:lt}=Se.getConstrained(t.N.convert(I.center||He),(we=I.zoom)!==null&&we!==void 0?we:Be);this._normalizeCenter(Je,Se);let vt=Se.zoomScale(lt-Be),Lt=Se.project(He),At=Se.project(Je).sub(Lt),zt=I.curve,cr=Math.max(Se.width,Se.height),yr=cr/vt,Er=At.mag();if("minZoom"in I){let nn=t.ac(Math.min(I.minZoom,Be,lt),Se.minZoom,Se.maxZoom),Sn=cr/Se.zoomScale(nn-Be);zt=Math.sqrt(Sn/Er*2)}let jr=zt*zt;function Qr(nn){let Sn=(yr*yr-cr*cr+(nn?-1:1)*jr*jr*Er*Er)/(2*(nn?yr:cr)*jr*Er);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function pa(nn){return(Math.exp(nn)-Math.exp(-nn))/2}function Aa(nn){return(Math.exp(nn)+Math.exp(-nn))/2}let za=Qr(!1),ci=function(nn){return Aa(za)/Aa(za+zt*nn)},Vi=function(nn){return cr*((Aa(za)*(pa(Sn=za+zt*nn)/Aa(Sn))-pa(za))/jr)/Er;var Sn},ji=(Qr(!0)-za)/zt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(cr-yr)<1e-6)return this.easeTo(I,ie);let nn=yr<cr?-1:1;ji=Math.abs(Math.log(yr/cr))/zt,Vi=()=>0,ci=Sn=>Math.exp(nn*zt*Sn)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/zt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=dt!==$t,this._pitching=Tr!==St,this._padding=!Se.isPaddingEqual(Ar),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation(Je),this._ease(nn=>{let Sn=nn*ji,Kn=1/ci(Sn);Se.zoom=nn===1?lt:Be+Se.scaleZoom(Kn),this._rotating&&(Se.bearing=t.y.number(dt,$t,nn)),this._pitching&&(Se.pitch=t.y.number(St,Tr,nn)),this._padding&&(Se.interpolatePadding(Nt,Ar,nn),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(nn);let Bn=nn===1?Je:Se.unproject(Lt.add(At.mult(Vi(Sn))).mult(Kn));Se.setLocationAtPoint(Se.renderWorldCopies?Bn.wrap():Bn,na),this._applyUpdatedTransform(Se),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 we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ie)}return I||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(I,ie,we){we.animate===!1||we.duration===0?(I(1),ie()):(this._easeStart=n.now(),this._easeOptions=we,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let we=Math.abs(I-ie);return Math.abs(I-360-ie)<we&&(I-=360),Math.abs(I+360-ie)<we&&(I+=360),I}_normalizeCenter(I,ie){if(!ie.renderWorldCopies||ie.lngRange)return;let we=I.lng-ie.center.lng;I.lng+=we>180?-360:we<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let eo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class fo{constructor(I=eo){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 we=this._map._getUIString(`AttributionControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}let ie=this._map.style.sourceCaches;for(let Se in ie){let Be=ie[Se];if(Be.used||Be.usedForTerrain){let dt=Be.getSource();dt.attribution&&I.indexOf(dt.attribution)<0&&I.push(dt.attribution)}}I=I.filter(Se=>String(Se).trim()),I.sort((Se,Be)=>Se.length-Be.length),I=I.filter((Se,Be)=>{for(let dt=Be+1;dt<I.length;dt++)if(I[dt].indexOf(Se)>=0)return!1;return!0});let we=I.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,I.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class An{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let we=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.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,we=ie?this._queue.concat(ie):this._queue;for(let Se of we)if(Se.id===I)return void(Se.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 we of ie)if(!we.cancelled&&(we.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var yo=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 we={};for(let Se of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new ot(Se,this.tileSize));for(let Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(I){for(let ie in this._tiles){let we=this._tiles[ie];(!I||we.tileID.equals(I)||we.tileID.isChildOf(I)||I.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let we of this._renderableTilesKeys){let Se=this._tiles[we].tileID;if(Se.canonical.equals(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16),t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),ie[we]=Be}else if(Se.canonical.isChildOf(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=Se.canonical.z-I.canonical.z,St=Se.canonical.x-(Se.canonical.x>>dt<<dt),Nt=Se.canonical.y-(Se.canonical.y>>dt<<dt),$t=t.X>>dt;t.aP(Be.posMatrix,0,$t,0,$t,0,1),t.J(Be.posMatrix,Be.posMatrix,[-St*$t,-Nt*$t,0]),ie[we]=Be}else if(I.canonical.isChildOf(Se.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=I.canonical.z-Se.canonical.z,St=I.canonical.x-(I.canonical.x>>dt<<dt),Nt=I.canonical.y-(I.canonical.y>>dt<<dt),$t=t.X>>dt;t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),t.J(Be.posMatrix,Be.posMatrix,[St*$t,Nt*$t,0]),t.K(Be.posMatrix,Be.posMatrix,[1/2**dt,1/2**dt,0]),ie[we]=Be}}return ie}getSourceTile(I,ie){let we=this.sourceCache._source,Se=I.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se<we.minzoom)return null;this._sourceTileCache[I.key]||(this._sourceTileCache[I.key]=I.scaledTo(Se).key);let Be=this.sourceCache.getTileByID(this._sourceTileCache[I.key]);if((!Be||!Be.dem)&&ie)for(;Se>=we.minzoom&&(!Be||!Be.dem);)Be=this.sourceCache.getTileByID(I.scaledTo(Se--).key);return Be}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class Ss{constructor(I,ie,we){this.painter=I,this.sourceCache=new Ko(ie),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,we,Se=t.X){var Be;if(!(ie>=0&&ie<Se&&we>=0&&we<Se))return 0;let dt=this.getTerrainData(I),St=(Be=dt.tile)===null||Be===void 0?void 0:Be.dem;if(!St)return 0;let Nt=function(He,Je,lt){var vt=Je[0],Lt=Je[1];return He[0]=lt[0]*vt+lt[4]*Lt+lt[12],He[1]=lt[1]*vt+lt[5]*Lt+lt[13],He}([],[ie/Se*t.X,we/Se*t.X],dt.u_terrain_matrix),$t=[Nt[0]*St.dim,Nt[1]*St.dim],Tr=Math.floor($t[0]),Ar=Math.floor($t[1]),Kr=$t[0]-Tr,na=$t[1]-Ar;return St.get(Tr,Ar)*(1-Kr)*(1-na)+St.get(Tr+1,Ar)*Kr*(1-na)+St.get(Tr,Ar+1)*(1-Kr)*na+St.get(Tr+1,Ar+1)*Kr*na}getElevationForLngLatZoom(I,ie){if(!t.bb(ie,I.wrap()))return 0;let{tileID:we,mercatorX:Se,mercatorY:Be}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return this.getElevation(we,Se%t.X,Be%t.X,t.X)}getElevation(I,ie,we,Se=t.X){return this.getDEMElevation(I,ie,we,Se)*this.exaggeration}getTerrainData(I){if(!this._emptyDemTexture){let Se=this.painter.context,Be=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Se,Be,Se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Se,new t.R({width:1,height:1}),Se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}let ie=this.sourceCache.getSourceTile(I,!0);if(ie&&ie.dem&&(!ie.demTexture||ie.needsTerrainPrepare)){let Se=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(Se,ie.dem.getPixels(),Se.gl.RGBA,{premultiply:!1}),ie.demTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),ie.needsTerrainPrepare=!1}let we=ie&&ie+ie.tileID.key+I.key;if(we&&!this._demMatrixCache[we]){let Se=this.sourceCache.sourceCache._source.maxzoom,Be=I.canonical.z-ie.tileID.canonical.z;I.overscaledZ>I.canonical.z&&(I.canonical.z>=Se?Be=I.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let dt=I.canonical.x-(I.canonical.x>>Be<<Be),St=I.canonical.y-(I.canonical.y>>Be<<Be),Nt=t.bc(new Float64Array(16),[1/(t.X<<Be),1/(t.X<<Be),0]);t.J(Nt,Nt,[dt*t.X,St*t.X,0]),this._demMatrixCache[I.key]={matrix:Nt,coord:I}}return{u_depth:2,u_terrain:3,u_terrain_dim:ie&&ie.dem&&ie.dem.dim||1,u_terrain_matrix:we?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,we=ie.width/devicePixelRatio,Se=ie.height/devicePixelRatio;return!this._fbo||this._fbo.width===we&&this._fbo.height===Se||(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:we,height:Se,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:we,height:Se,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(we,Se,!0,!1),this._fbo.depthAttachment.set(ie.context.createRenderbuffer(ie.context.gl.DEPTH_COMPONENT16,we,Se))),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 Be=0,dt=0;Be<this._coordsTextureSize;Be++)for(let St=0;St<this._coordsTextureSize;St++,dt+=4)ie[dt+0]=255&St,ie[dt+1]=255&Be,ie[dt+2]=St>>8<<4|Be>>8,ie[dt+3]=0;let we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Se=new u(I,we,I.gl.RGBA,{premultiply:!1});return Se.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),we=this.painter.context,Se=we.gl,Be=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),dt=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),St=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Be,St-dt-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ie),we.bindFramebuffer.set(null);let Nt=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+Nt)/na+Ar.tileID.wrap,(Ar.tileID.canonical.y*Kr+$t)/na,this.getElevation(Ar.tileID,Nt,$t,Kr))}depthAtPoint(I){let ie=new Uint8Array(4),we=this.painter.context,Se=we.gl;return we.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Se.readPixels(I.x,this.painter.height/devicePixelRatio-I.y-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ie),we.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,we=new t.aY,Se=this.meshSize,Be=t.X/Se,dt=Se*Se;for(let Ar=0;Ar<=Se;Ar++)for(let Kr=0;Kr<=Se;Kr++)ie.emplaceBack(Kr*Be,Ar*Be,0);for(let Ar=0;Ar<dt;Ar+=Se+1)for(let Kr=0;Kr<Se;Kr++)we.emplaceBack(Kr+Ar,Se+Kr+Ar+1,Se+Kr+Ar+2),we.emplaceBack(Kr+Ar,Se+Kr+Ar+2,Kr+Ar+1);let St=ie.length,Nt=St+2*(Se+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Se;Kr++)for(let na of[0,1])ie.emplaceBack(Kr*Be,Ar*t.X,na);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack(Nt+Ar,Nt+Ar+1,Nt+Ar+3),we.emplaceBack(Nt+Ar,Nt+Ar+3,Nt+Ar+2),we.emplaceBack(St+Ar,St+Ar+3,St+Ar+1),we.emplaceBack(St+Ar,St+Ar+2,St+Ar+3);let $t=ie.length,Tr=$t+2*(Se+1);for(let Ar of[0,1])for(let Kr=0;Kr<=Se;Kr++)for(let na of[0,1])ie.emplaceBack(Ar*t.X,Kr*Be,na);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack($t+Ar,$t+Ar+1,$t+Ar+3),we.emplaceBack($t+Ar,$t+Ar+3,$t+Ar+2),we.emplaceBack(Tr+Ar,Tr+Ar+3,Tr+Ar+1),we.emplaceBack(Tr+Ar,Tr+Ar+2,Tr+Ar+3);return this._mesh=new Lu(I.createVertexBuffer(ie,yo.members),I.createIndexBuffer(we),t.a0.simpleSegment(0,0,ie.length,we.length)),this._mesh}getMeshFrameDelta(I){return 2*Math.PI*t.be/Math.pow(2,I)/5}getMinTileElevationForLngLatZoom(I,ie){var we;let{tileID:Se}=this._getOverscaledTileIDFromLngLatZoom(I,ie);return(we=this.getMinMaxElevation(Se).minElevation)!==null&&we!==void 0?we:0}getMinMaxElevation(I){let ie=this.getTerrainData(I).tile,we={minElevation:null,maxElevation:null};return ie&&ie.dem&&(we.minElevation=ie.dem.min*this.exaggeration,we.maxElevation=ie.dem.max*this.exaggeration),we}_getOverscaledTileIDFromLngLatZoom(I,ie){let we=t.Z.fromLngLat(I.wrap()),Se=(1<<ie)*t.X,Be=we.x*Se,dt=we.y*Se,St=Math.floor(Be/t.X),Nt=Math.floor(dt/t.X);return{tileID:new t.S(ie,0,ie,St,Nt),mercatorX:Be,mercatorY:dt}}}class rl{constructor(I,ie,we){this._context=I,this._size=ie,this._tileSize=we,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),we=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return we.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(we.texture),{id:I,fbo:ie,texture:we,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 Os={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(we=>!I._layers[we].isHidden(ie)),this._coordsDescendingInv={};for(let we in I.sourceCaches){this._coordsDescendingInv[we]={};let Se=I.sourceCaches[we].getVisibleCoordinates();for(let Be of Se){let dt=this.terrain.sourceCache.getTerrainCoords(Be);for(let St in dt)this._coordsDescendingInv[we][St]||(this._coordsDescendingInv[we][St]=[]),this._coordsDescendingInv[we][St].push(dt[St])}}this._coordsDescendingInvStr={};for(let we of I._order){let Se=I._layers[we],Be=Se.source;if(Os[Se.type]&&!this._coordsDescendingInvStr[Be]){this._coordsDescendingInvStr[Be]={};for(let dt in this._coordsDescendingInv[Be])this._coordsDescendingInvStr[Be][dt]=this._coordsDescendingInv[Be][dt].map(St=>St.key).sort().join()}}for(let we of this._renderableTiles)for(let Se in this._coordsDescendingInvStr){let Be=this._coordsDescendingInvStr[Se][we.tileID.key];Be&&Be!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Os[ie]&&(this._prevType&&Os[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Se))return!0;if(Os[this._prevType]||Os[ie]&&Se){this._prevType=ie;let Be=this._stacks.length-1,dt=this._stacks[Be]||[];for(let St of this._renderableTiles){if(this.pool.isFull()&&(yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(St),St.rtt[Be]){let $t=this.pool.getObjectForId(St.rtt[Be].id);if($t.stamp===St.rtt[Be].stamp){this.pool.useObject($t);continue}}let Nt=this.pool.getOrCreateFreeObject();this.pool.useObject(Nt),this.pool.stampObject(Nt),St.rtt[Be]={id:Nt.id,stamp:Nt.stamp},we.context.bindFramebuffer.set(Nt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let $t=0;$t<dt.length;$t++){let Tr=we.style._layers[dt[$t]],Ar=Tr.source?this._coordsDescendingInv[Tr.source][St.tileID.key]:[St.tileID];we.context.viewport.set([0,0,Nt.fbo.width,Nt.fbo.height]),we._renderTileClippingMasks(Tr,Ar),we.renderLayer(we,we.style.sourceCaches[Tr.source],Tr,Ar),Tr.source&&(St.rttCoords[Tr.source]=this._coordsDescendingInvStr[Tr.source][St.tileID.key])}}return yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Os[ie]}return!1}}let bs={"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:eo,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=Ue=>{Ue.touchstart=Ue.dragStart,Ue.touchmoveWindow=Ue.dragMove,Ue.touchend=Ue.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Lo{constructor(I,ie,we=!1){this.mousedown=dt=>{this.startMouse(t.e({},dt,{ctrlKey:!0,preventDefault:()=>dt.preventDefault()}),i.mousePos(this.element,dt)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=dt=>{this.moveMouse(dt,i.mousePos(this.element,dt))},this.mouseup=dt=>{this.mouseRotate.dragEnd(dt),this.mousePitch&&this.mousePitch.dragEnd(dt),this.offTemp()},this.touchstart=dt=>{dt.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.startTouch(dt,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=dt=>{dt.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.moveTouch(dt,this._lastPos))},this.touchend=dt=>{dt.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 Se=I.dragRotate._mouseRotate.getClickTolerance(),Be=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=iu({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:dt,clickTolerance:St,bearingDegreesPerPixelMoved:Nt=.8})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({bearingDelta:(Ar.x-Tr.x)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Se,enable:!0}),this.map=I,we&&(this.mousePitch=Vf({clickTolerance:Be,enable:!0}),this.touchPitch=(({enable:dt,clickTolerance:St,pitchDegreesPerPixelMoved:Nt=-.5})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({pitchDelta:(Ar.y-Tr.y)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Be,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 we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){let{pitchDelta:Be}=this.mousePitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}moveTouch(I,ie){let we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){let{pitchDelta:Be}=this.touchPitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}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 Rs(Ue,I,ie){let we=new t.N(Ue.lng,Ue.lat);if(Ue=new t.N(Ue.lng,Ue.lat),I){let Se=new t.N(Ue.lng-360,Ue.lat),Be=new t.N(Ue.lng+360,Ue.lat),dt=ie.locationPoint(Ue).distSqr(I);ie.locationPoint(Se).distSqr(I)<dt?Ue=Se:ie.locationPoint(Be).distSqr(I)<dt&&(Ue=Be)}for(;Math.abs(Ue.lng-ie.center.lng)>180;){let Se=ie.locationPoint(Ue);if(Se.x>=0&&Se.y>=0&&Se.x<=ie.width&&Se.y<=ie.height)break;Ue.lng>ie.center.lng?Ue.lng-=360:Ue.lng+=360}return Ue.lng!==we.lng&&ie.locationPoint(Ue).y>ie.height/2-ie.getHorizon()?Ue:we}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(Ue,I,ie){let we=Ue.classList;for(let Se in uu)we.remove(`maplibregl-${ie}-anchor-${Se}`);we.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let we=ie.code,Se=ie.charCode||ie.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ie=>{let we=ie.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ie=>{var we;if(!this._map)return;let Se=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rs(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.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 Be="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Be=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Be=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let dt="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?dt="rotateX(0deg)":this._pitchAlignment==="map"&&(dt=`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) ${dt} ${Be}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=we}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"),we=41,Se=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${we}px`),ie.setAttributeNS(null,"width",`${Se}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);let Be=i.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"stroke","none"),Be.setAttributeNS(null,"stroke-width","1"),Be.setAttributeNS(null,"fill","none"),Be.setAttributeNS(null,"fill-rule","evenodd");let dt=i.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");let St=i.createNS("http://www.w3.org/2000/svg","g");St.setAttributeNS(null,"transform","translate(3.0, 29.0)"),St.setAttributeNS(null,"fill","#000000");let Nt=[{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 vt of Nt){let Lt=i.createNS("http://www.w3.org/2000/svg","ellipse");Lt.setAttributeNS(null,"opacity","0.04"),Lt.setAttributeNS(null,"cx","10.5"),Lt.setAttributeNS(null,"cy","5.80029008"),Lt.setAttributeNS(null,"rx",vt.rx),Lt.setAttributeNS(null,"ry",vt.ry),St.appendChild(Lt)}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 He=i.createNS("http://www.w3.org/2000/svg","g");He.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Je=i.createNS("http://www.w3.org/2000/svg","circle");Je.setAttributeNS(null,"fill","#000000"),Je.setAttributeNS(null,"opacity","0.25"),Je.setAttributeNS(null,"cx","5.5"),Je.setAttributeNS(null,"cy","5.5"),Je.setAttributeNS(null,"r","5.4999962");let lt=i.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),He.appendChild(Je),He.appendChild(lt),dt.appendChild(St),dt.appendChild($t),dt.appendChild(Ar),dt.appendChild(na),dt.appendChild(He),ie.appendChild(dt),ie.setAttributeNS(null,"height",we*this._scale+"px"),ie.setAttributeNS(null,"width",Se*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 Se=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":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],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,we;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 Se=this._map,Be=Se.terrain.depthAtPoint(this._pos),dt=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,dt)-Be<.006)return void(this._element.style.opacity=this._opacity);let St=-this._offset.y/Se.transform._pixelPerMeter,Nt=Math.sin(Se.getPitch()*Math.PI/180)*St,$t=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Se.transform.lngLatToCameraDepth(this._lngLat,dt+Nt)-$t>.006;!((we=this._popup)===null||we===void 0)&&we.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(Ue,I,ie){let we=ie&&ie.maxWidth||100,Se=Ue._container.clientHeight/2,Be=Ue.unproject([0,Se]),dt=Ue.unproject([we,Se]),St=Be.distanceTo(dt);if(ie&&ie.unit==="imperial"){let Nt=3.2808*St;Nt>5280?ho(I,we,Nt/5280,Ue._getUIString("ScaleControl.Miles")):ho(I,we,Nt,Ue._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?ho(I,we,St/1852,Ue._getUIString("ScaleControl.NauticalMiles")):St>=1e3?ho(I,we,St/1e3,Ue._getUIString("ScaleControl.Kilometers")):ho(I,we,St,Ue._getUIString("ScaleControl.Meters"))}function ho(Ue,I,ie,we){let Se=function(Be){let dt=Math.pow(10,`${Math.floor(Be)}`.length-1),St=Be/dt;return St=St>=10?10:St>=5?5:St>=3?3:St>=2?2:St>=1?1:function(Nt){let $t=Math.pow(10,Math.ceil(-Math.log(Nt)/Math.LN10));return Math.round(Nt*$t)/$t}(St),dt*St}(ie);Ue.style.width=I*(Se/ie)+"px",Ue.innerHTML=`${Se}&nbsp;${we}`}let Ro={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(Ue){if(Ue){if(typeof Ue=="number"){let I=Math.round(Math.abs(Ue)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Ue),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Ue),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Ue,0),right:new t.P(-Ue,0)}}if(Ue instanceof t.P||Array.isArray(Ue)){let I=t.P.convert(Ue);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(Ue.center||[0,0]),top:t.P.convert(Ue.top||[0,0]),"top-left":t.P.convert(Ue["top-left"]||[0,0]),"top-right":t.P.convert(Ue["top-right"]||[0,0]),bottom:t.P.convert(Ue.bottom||[0,0]),"bottom-left":t.P.convert(Ue["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Ue["bottom-right"]||[0,0]),left:t.P.convert(Ue.left||[0,0]),right:t.P.convert(Ue.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=fo,e.BoxZoomHandler=Pu,e.CanvasSource=rt,e.CooperativeGesturesHandler=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=dn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Ue={}){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,Ue&&Ue.container&&(Ue.container instanceof HTMLElement?this._container=Ue.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(Ue){return this._map=Ue,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 Ue=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Ue).setAttribute("aria-hidden","true"),Ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ue),this._fullscreenButton.title=Ue}_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=ze,e.GeolocateControl=class extends t.E{constructor(Ue){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),we=I.coords.accuracy,Se=this._map.getBearing(),Be=t.e({bearing:Se},this.options.fitBoundsOptions),dt=re.fromLngLat(ie,we);this._map.fitBounds(dt,Be,{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,Ue)}onAdd(Ue){return this._map=Ue,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(Ue){let I=this._map.getMaxBounds(),ie=Ue.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 Ue=this._map.getBounds(),I=Ue.getSouthEast(),ie=Ue.getNorthEast(),we=I.distanceTo(ie),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}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 Ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Ue={maximumAge:6e5,timeout:0},Rc=!0):(Ue=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ue)}}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=An,e.Map=class extends ao{constructor(Ue){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},_l),Ue);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({},bs),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,we=qf(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ie?we(Se):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Qn(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 fo(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new An,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(Ue,I){if(I===void 0&&(I=Ue.getDefaultPosition?Ue.getDefaultPosition():"top-right"),!Ue||!Ue.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=Ue.onAdd(this);this._controls.push(Ue);let we=this._controlPositions[I];return I.indexOf("bottom")!==-1?we.insertBefore(ie,we.firstChild):we.appendChild(ie),this}removeControl(Ue){if(!Ue||!Ue.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(Ue);return I>-1&&this._controls.splice(I,1),Ue.onRemove(this),this}hasControl(Ue){return this._controls.indexOf(Ue)>-1}calculateCameraOptionsFromTo(Ue,I,ie,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ue,I,ie,we)}resize(Ue){var I;let ie=this._containerDimensions(),we=ie[0],Se=ie[1],Be=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Be),this.painter.resize(we,Se,Be),this.painter.overLimit()){let St=this.painter.context.gl;this._maxCanvasSize=[St.drawingBufferWidth,St.drawingBufferHeight];let Nt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,Nt),this.painter.resize(we,Se,Nt)}this.transform.resize(we,Se),(I=this._requestedCameraState)===null||I===void 0||I.resize(we,Se);let dt=!this._moving;return dt&&(this.stop(),this.fire(new t.k("movestart",Ue)).fire(new t.k("move",Ue))),this.fire(new t.k("resize",Ue)),dt&&this.fire(new t.k("moveend",Ue)),this}_getClampedPixelRatio(Ue,I){let{0:ie,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Be=Ue*Se,dt=I*Se;return Math.min(Be>ie?ie/Be:1,dt>we?we/dt:1)*Se}getPixelRatio(){var Ue;return(Ue=this._overridePixelRatio)!==null&&Ue!==void 0?Ue:devicePixelRatio}setPixelRatio(Ue){this._overridePixelRatio=Ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ue){return this.transform.setMaxBounds(re.convert(Ue)),this._update()}setMinZoom(Ue){if((Ue=Ue??-2)>=-2&&Ue<=this.transform.maxZoom)return this.transform.minZoom=Ue,this._update(),this.getZoom()<Ue&&this.setZoom(Ue),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Ue){if((Ue=Ue??22)>=this.transform.minZoom)return this.transform.maxZoom=Ue,this._update(),this.getZoom()>Ue&&this.setZoom(Ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ue){if((Ue=Ue??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ue>=0&&Ue<=this.transform.maxPitch)return this.transform.minPitch=Ue,this._update(),this.getPitch()<Ue&&this.setPitch(Ue),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Ue){if((Ue=Ue??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Ue>=this.transform.minPitch)return this.transform.maxPitch=Ue,this._update(),this.getPitch()>Ue&&this.setPitch(Ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ue){return this.transform.renderWorldCopies=Ue,this._update()}project(Ue){return this.transform.locationPoint(t.N.convert(Ue),this.style&&this.terrain)}unproject(Ue){return this.transform.pointLocation(t.P.convert(Ue),this.terrain)}isMoving(){var Ue;return this._moving||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isMoving())}isZooming(){var Ue;return this._zooming||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isZooming())}isRotating(){var Ue;return this._rotating||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isRotating())}_createDelegatedListener(Ue,I,ie){if(Ue==="mouseenter"||Ue==="mouseover"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:Be=>{let dt=I.filter(Nt=>this.getLayer(Nt)),St=dt.length!==0?this.queryRenderedFeatures(Be.point,{layers:dt}):[];St.length?we||(we=!0,ie.call(this,new au(Ue,this,Be.originalEvent,{features:St}))):we=!1},mouseout:()=>{we=!1}}}}if(Ue==="mouseleave"||Ue==="mouseout"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:dt=>{let St=I.filter(Nt=>this.getLayer(Nt));(St.length!==0?this.queryRenderedFeatures(dt.point,{layers:St}):[]).length?we=!0:we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))},mouseout:dt=>{we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))}}}}{let we=Se=>{let Be=I.filter(St=>this.getLayer(St)),dt=Be.length!==0?this.queryRenderedFeatures(Se.point,{layers:Be}):[];dt.length&&(Se.features=dt,ie.call(this,Se),delete Se.features)};return{layers:I,listener:ie,delegates:{[Ue]:we}}}}_saveDelegatedListener(Ue,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ue]=this._delegatedListeners[Ue]||[],this._delegatedListeners[Ue].push(I)}_removeDelegatedListener(Ue,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Ue])return;let we=this._delegatedListeners[Ue];for(let Se=0;Se<we.length;Se++){let Be=we[Se];if(Be.listener===ie&&Be.layers.length===I.length&&Be.layers.every(dt=>I.includes(dt))){for(let dt in Be.delegates)this.off(dt,Be.delegates[dt]);return void we.splice(Se,1)}}}on(Ue,I,ie){if(ie===void 0)return super.on(Ue,I);let we=this._createDelegatedListener(Ue,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Ue,we);for(let Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(Ue,I,ie){if(ie===void 0)return super.once(Ue,I);let we=typeof I=="string"?[I]:I,Se=this._createDelegatedListener(Ue,we,ie);for(let Be in Se.delegates){let dt=Se.delegates[Be];Se.delegates[Be]=(...St)=>{this._removeDelegatedListener(Ue,we,ie),dt(...St)}}this._saveDelegatedListener(Ue,Se);for(let Be in Se.delegates)this.once(Be,Se.delegates[Be]);return this}off(Ue,I,ie){return ie===void 0?super.off(Ue,I):(this._removeDelegatedListener(Ue,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Ue,I){if(!this.style)return[];let ie,we=Ue instanceof t.P||Array.isArray(Ue),Se=we?Ue:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(we?{}:Ue)||{},Se instanceof t.P||typeof Se[0]=="number")ie=[t.P.convert(Se)];else{let Be=t.P.convert(Se[0]),dt=t.P.convert(Se[1]);ie=[Be,new t.P(dt.x,Be.y),dt,new t.P(Be.x,dt.y),Be]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Ue,I){return this.style.querySourceFeatures(Ue,I)}setStyle(Ue,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ue?(this._diffStyle(Ue,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Ue,I))}setTransformRequest(Ue){return this._requestManager.setTransformRequest(Ue),this}_getUIString(Ue){let I=this._locale[Ue];if(I==null)throw new Error(`Missing UI string '${Ue}'`);return I}_updateStyle(Ue,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ue,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ue)),Ue?(this.style=new Ir(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ue=="string"?this.style.loadURL(Ue,I,ie):this.style.loadJSON(Ue,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ir(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ue,I){if(typeof Ue=="string"){let ie=this._requestManager.transformRequest(Ue,"Style");t.h(ie,new AbortController).then(we=>{this._updateDiff(we.data,I)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof Ue=="object"&&this._updateDiff(Ue,I)}_updateDiff(Ue,I){try{this.style.setState(Ue,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(Ue,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(Ue,I){return this._lazyInitEmptyStyle(),this.style.addSource(Ue,I),this._update(!0)}isSourceLoaded(Ue){let I=this.style&&this.style.sourceCaches[Ue];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Ue}'`)))}setTerrain(Ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ue){let I=this.style.sourceCaches[Ue.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ue.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let we=this.style._layers[ie];we.type==="hillshade"&&we.source===Ue.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 Ss(this.painter,I,Ue),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!==Ue.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:Ue})),this}getTerrain(){var Ue,I;return(I=(Ue=this.terrain)===null||Ue===void 0?void 0:Ue.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Ue=this.style&&this.style.sourceCaches;for(let I in Ue){let ie=Ue[I]._tiles;for(let we in ie){let Se=ie[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(Ue){return this.style.removeSource(Ue),this._update(!0)}getSource(Ue){return this.style.getSource(Ue)}addImage(Ue,I,ie={}){let{pixelRatio:we=1,sdf:Se=!1,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,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(Ue,{data:new t.R({width:Tr,height:Ar},new Uint8Array(Kr)),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Ue),this}}{let{width:Tr,height:Ar,data:Kr}=n.getImageData(I);this.style.addImage(Ue,{data:new t.R({width:Tr,height:Ar},Kr),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0})}}updateImage(Ue,I){let ie=this.style.getImage(Ue);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 we=I instanceof HTMLImageElement||t.b(I)?n.getImageData(I):I,{width:Se,height:Be,data:dt}=we;if(Se===void 0||Be===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(Se!==ie.data.width||Be!==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 St=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(dt,St),this.style.updateImage(Ue,ie),this}getImage(Ue){return this.style.getImage(Ue)}hasImage(Ue){return Ue?!!this.style.getImage(Ue):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Ue){this.style.removeImage(Ue)}loadImage(Ue){return l.getImage(this._requestManager.transformRequest(Ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ue,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Ue,I),this._update(!0)}moveLayer(Ue,I){return this.style.moveLayer(Ue,I),this._update(!0)}removeLayer(Ue){return this.style.removeLayer(Ue),this._update(!0)}getLayer(Ue){return this.style.getLayer(Ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ue,I,ie){return this.style.setLayerZoomRange(Ue,I,ie),this._update(!0)}setFilter(Ue,I,ie={}){return this.style.setFilter(Ue,I,ie),this._update(!0)}getFilter(Ue){return this.style.getFilter(Ue)}setPaintProperty(Ue,I,ie,we={}){return this.style.setPaintProperty(Ue,I,ie,we),this._update(!0)}getPaintProperty(Ue,I){return this.style.getPaintProperty(Ue,I)}setLayoutProperty(Ue,I,ie,we={}){return this.style.setLayoutProperty(Ue,I,ie,we),this._update(!0)}getLayoutProperty(Ue,I){return this.style.getLayoutProperty(Ue,I)}setGlyphs(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ue,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ue,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ue,I,ie,we=>{we||this._update(!0)}),this}removeSprite(Ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ue,I,ie=>{ie||this._update(!0)}),this}setLight(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ue,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ue){return this._lazyInitEmptyStyle(),this.style.setSky(Ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ue,I){return this.style.setFeatureState(Ue,I),this._update()}removeFeatureState(Ue,I){return this.style.removeFeatureState(Ue,I),this._update()}getFeatureState(Ue){return this.style.getFeatureState(Ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ue=0,I=0;return this._container&&(Ue=this._container.clientWidth||400,I=this._container.clientHeight||300),[Ue,I]}_setupContainer(){let Ue=this._container;Ue.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",Ue);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(),we=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],we);let Se=this._controlContainer=i.create("div","maplibregl-control-container",Ue),Be=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(dt=>{Be[dt]=i.create("div",`maplibregl-ctrl-${dt} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ue,I,ie){this._canvas.width=Math.floor(ie*Ue),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Ue}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{I={requestedAttributes:Ue},we&&(I.statusMessage=we.statusMessage,I.type=we.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Ue)||this._canvas.getContext("webgl",Ue);if(!ie){let we="Failed to initialize WebGL";throw I?(I.message=we,new Error(JSON.stringify(I))):new Error(we)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ue){return this._update(),this._renderTaskQueue.add(Ue)}_cancelRenderFrame(Ue){this._renderTaskQueue.remove(Ue)}_render(Ue){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ue),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Se=this.transform.zoom,Be=n.now();this.style.zoomHistory.update(Se,Be);let dt=new t.z(Se,{now:Be,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),St=dt.crossFadingFactor();St===1&&St===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=St),this.style.update(dt)}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 we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(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 Ue;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),(Ue=this._resizeObserver)===null||Ue===void 0||Ue.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(Ue=>{t.bf.frame(Ue),this._frameRequest=null,this._render(Ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ue){this._showTileBoundaries!==Ue&&(this._showTileBoundaries=Ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ue){this._showPadding!==Ue&&(this._showPadding=Ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ue){this._showCollisionBoxes!==Ue&&(this._showCollisionBoxes=Ue,Ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ue){this._showOverdrawInspector!==Ue&&(this._showOverdrawInspector=Ue,this._update())}get repaint(){return!!this._repaint}set repaint(Ue){this._repaint!==Ue&&(this._repaint=Ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ue){this._vertices=Ue,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(Ue){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),we=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.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 we=this._map._getUIString(`NavigationControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)},this.options=t.e({},Un,Ue),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(Ue){return this._map=Ue,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 Lo(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(Ue,I){let ie=i.create("button",Ue,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Ue){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 St of this.options.className.split(" "))this._container.classList.add(St);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?Rs(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let we=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 Se=this.options.anchor,Be=lc(this.options.offset);if(!Se){let St=this._container.offsetWidth,Nt=this._container.offsetHeight,$t;$t=we.y+Be.bottom.y<Nt?["top"]:we.y>this._map.transform.height-Nt?["bottom"]:[],we.x<St/2?$t.push("left"):we.x>this._map.transform.width-St/2&&$t.push("right"),Se=$t.length===0?"bottom":$t.join("-")}let dt=we.add(Be[Se]);this.options.subpixelPositioning||(dt=dt.round()),i.setTransform(this._container,`${uu[Se]} translate(${dt.x}px,${dt.y}px)`),Iu(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Ro),Ue)}addTo(Ue){return this._map&&this.remove(),this._map=Ue,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(Ue){return this._lngLat=t.N.convert(Ue),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(Ue){return this.setDOMContent(document.createTextNode(Ue))}setHTML(Ue){let I=document.createDocumentFragment(),ie=document.createElement("body"),we;for(ie.innerHTML=Ue;we=ie.firstChild,we;)I.appendChild(we);return this.setDOMContent(I)}getMaxWidth(){var Ue;return(Ue=this._container)===null||Ue===void 0?void 0:Ue.style.maxWidth}setMaxWidth(Ue){return this.options.maxWidth=Ue,this._update(),this}setDOMContent(Ue){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(Ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ue){return this._container&&this._container.classList.add(Ue),this}removeClassName(Ue){return this._container&&this._container.classList.remove(Ue),this}setOffset(Ue){return this.options.offset=Ue,this._update(),this}toggleClassName(Ue){if(this._container)return this._container.classList.toggle(Ue)}setSubpixelPositioning(Ue){this.options.subpixelPositioning=Ue}_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 Ue=this._container.querySelector(Dc);Ue&&Ue.focus()}},e.RasterDEMTileSource=De,e.RasterTileSource=Ae,e.ScaleControl=class{constructor(Ue){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),Ue)}getDefaultPosition(){return"bottom-left"}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ue.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=Ir,e.TerrainControl=class{constructor(Ue){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=Ue}onAdd(Ue){return this._map=Ue,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=be,e.VideoSource=nt,e.addSourceType=(Ue,I)=>t._(void 0,void 0,void 0,function*(){if(Me(Ue))throw new Error(`A source type called "${Ue}" already exists.`);((ie,we)=>{st[ie]=we})(Ue,I)}),e.clearPrewarmedResources=function(){let Ue=fe;Ue&&(Ue.isPreloaded()&&Ue.numActive()===1?(Ue.release($),fe=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 tt().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return se.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Ue){return q().broadcast("IS",Ue)},e.prewarm=function(){Y().acquire($)},e.setMaxParallelImageRequests=function(Ue){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Ue},e.setRTLTextPlugin=function(Ue,I){return tt().setRTLTextPlugin(Ue,I)},e.setWorkerCount=function(Ue){se.workerCount=Ue},e.setWorkerUrl=function(Ue){t.a.WORKER_URL=Ue}});var E=v;return E})}}),qV=Xe({"src/plots/map/layers.js"(Z,G){"use strict";var v=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(),c=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},c),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 v.isPlainObject(i)||typeof i=="string"&&i.length>0}function o(n){var i={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);v.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":v.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},c;return i==="geojson"?c="data":i==="vector"?c=typeof s=="string"?"url":"tiles":i==="raster"?(c="tiles",h.tileSize=256):i==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}G.exports=function(i,s,h){var c=new e(i,s);return c.update(h),c}}}),VV=Xe({"src/plots/map/map.js"(Z,G){"use strict";var v=jV(),x=sa(),S=g0(),E=so(),e=Go(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=b0(),p=qV();function T(g,b){this.id=b,this.gd=g;var d=g._fullLayout,u=g._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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,d){var u=this,y;u.map?y=new Promise(function(f,R){u.updateMap(g,b,f,R)}):y=new Promise(function(f,R){u.createMap(g,b,f,R)}),d.push(y)},l.createMap=function(g,b,d,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style),L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new v.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.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(d)}).catch(u)},l.updateMap=function(g,b,d,u){var y=this,f=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,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.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(d)}).catch(u)},l.fillBelowLookup=function(g,b){var d=b[this.id],u=d.layers,y,f,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"?f=z.below:F.getBelow&&(f=F.getBelow(z,this)),f===""&&(L=!0),R["trace-"+z.uid]=f||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?f=N.below:L?f="traces":f="",R["layout-"+y]=f}var O={},P,U;for(P in R)f=R[P],O[f]?O[f].push(P):O[f]=[P];for(f in O){var B=O[f];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,d,u,y,f,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,d=b[u.uid];var z=!1;d&&(d.type===u.type?(d.update(L),z=!0):d.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(f=0;f<g.length;f++)if(u=g[f][0].trace,N===u.uid)continue e;d=b[N],d.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,d=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(d.center)),b.setZoom(d.zoom),b.setBearing(d.bearing),b.setPitch(d.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 d(){b.loaded()&&(b.off("render",d),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function d(){g(new Error(m.mapOnErrorMsg))}b.once("error",d),b.once("style.error",d),b.once("source.error",d),b.once("tile.error",d),b.once("layer.error",d)},l.createFramework=function(g){var b=this,d=b.div=document.createElement("div");d.id=b.uid,d.style.position="absolute",b.container.appendChild(d),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 d=this,u=d.gd,y=d.map;y.on("moveend",function(L){if(d.map){var z=u._fullLayout;if(L.originalEvent||d.wheeling){var F=z[d.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,d.getViewEdits(F));var N=d.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",d.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?d.dragging=!1:d.wheeling&&(d.wheeling=!1),z&&z._rehover&&z._rehover()}}),y.on("wheel",function(){d.wheeling=!0}),y.on("mousemove",function(L){var z=d.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},d.xaxis.p2c=function(){return y.unproject(F).lng},d.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===d.id&&u._fullLayout[d.id]&&r.hover(u,L,d.id)},r.hover(u,L,d.id),u._fullLayout._hoversubplot=d.id});function f(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){d.dragging=!0,f()}),y.on("zoomstart",f),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=d.getView();u.emit("plotly_relayouting",d.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[d.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,d.getViewEdits(L));var z=d.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=d.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",d.getViewEditsWithDerived(F))}),d.clearOutline=function(){h(d.dragOptions),s(d.dragOptions.gd)},d.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=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}),d.off("click",b.onClickInPanHandler),n(f)||a(f)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,f)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,d=g._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],d=b.layers,u=this.layerList,y;if(d.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<d.length;y++)u.push(p(this,y,d[y]))}else for(y=0;y<d.length;y++)u[y].update(d[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,d){for(var u in d)this.map[b](g,u,d[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var d=this.map;if(typeof b=="string"){if(b===""){d.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){d.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(" "))}d.addLayer(g)},l.project=function(g){return this.map.project(new v.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),d=b.lng,u=b.lat,y={lon:d,lat:u},f=g.getCanvas(),R=parseInt(f.style.width),L=parseInt(f.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,d=["center","zoom","bearing","pitch"],u={},y=0;y<d.length;y++){var f=d[y];u[b+"."+f]=g[f]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,d=this.getViewEdits(g);return d[b+"._derived"]=g._derived,d};function w(g){var b={};return x.isPlainObject(g)?(b.id=g.id,b.style=g):typeof g=="string"?(b.id=g,m.stylesMap[g]?b.style=m.stylesMap[g]:b.style=g):(b.id=m.styleValueDflt,b.style=A(m.styleValueDflt)),b.transition={duration:0,delay:0},b}function A(g){return m.styleUrlPrefix+g+"-"+m.styleUrlSuffix}function M(g){return[g.lon,g.lat]}G.exports=T}}),GV=Xe({"src/plots/map/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=o0(),S=hp(),E=kx();G.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(m,p){return v.coerce(r,o,E.layers,m,p)}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 c=a("type",h);s&&c!=="raster"&&(c=o.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),c==="circle"&&a("circle.radius"),c==="line"&&(a("line.width"),a("line.dash")),c==="fill"&&a("fill.outlinecolor"),c==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),v.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),CT=Xe({"src/plots/map/index.js"(Z){"use strict";var G=sa(),v=G.strTranslate,x=G.strScale,S=Hh().getSubplotCalcData,E=vd(),e=Hn(),t=es(),r=ou(),o=VV(),a="map";Z.name=a,Z.attr="subplot",Z.idRoot=a,Z.idRegex=Z.attrRegex=G.counterRegex(a),Z.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Z.layoutAttributes=kx(),Z.supplyLayoutDefaults=GV(),Z.plot=function(i){for(var s=i._fullLayout,h=i.calcdata,c=s._subplots[a],m=0;m<c.length;m++){var p=c[m],T=S(h,a,p),l=s[p],_=l._subplot;_||(_=new o(i,p),s[p]._subplot=_),_.viewInitial||(_.viewInitial={center:G.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 c=h._subplots[a]||[],m=0;m<c.length;m++){var p=c[m];!i[p]&&h[p]._subplot&&h[p]._subplot.destroy()}},Z.toSVG=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=i._size,c=0;c<s.length;c++){var m=i[s[c]],p=m.domain,T=m._subplot,l=T.toImage("png"),_=i._glimages.append("svg:image");_.attr({xmlns:E.svg,"xlink:href":l,x:h.l+h.w*p.x[0],y:h.t+h.h*(1-p.y[1]),width:h.w*(p.x[1]-p.x[0]),height:h.h*(p.y[1]-p.y[0]),preserveAspectRatio:"none"});var w=e.select(m._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()),d=h.w*(p.x[1]-p.x[0]);if(b.width>d/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",v(-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>d&&(y=d/(b.width+6));var f=[h.l+h.w*p.x[1],h.t+h.h*(1-p.y[0])];M.attr("transform",v(f[0],f[1])+x(y))}},Z.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=0;h<s.length;h++){var c=i[s[h]]._subplot;c.updateFx(i)}}}}),HV=Xe({"src/traces/scattermap/index.js"(Z,G){"use strict";G.exports={attributes:ET(),supplyDefaults:FV(),colorbar:pp(),formatLabels:R6(),calc:iT(),plot:BV(),hoverPoints:kT().hoverPoints,eventData:NV(),selectPoints:UV(),styleOnSelect:function(v,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:{}}}}),WV=Xe({"lib/scattermap.js"(Z,G){"use strict";G.exports=HV()}}),z6=Xe({"src/traces/choroplethmap/attributes.js"(Z,G){"use strict";var v=k1(),x=ku(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ru(),t=Qo().extendFlat;G.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:t({},v.marker.line.color,{editType:"plot"}),width:t({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),XV=Xe({"src/traces/choroplethmap/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=z6();G.exports=function(e,t,r,o){function a(c,m){return v.coerce(e,t,S,c,m)}var n=a("locations"),i=a("z"),s=a("geojson");if(!v.isArrayOrTypedArray(n)||!n.length||!v.isArrayOrTypedArray(i)||!i.length||!(typeof s=="string"&&s!==""||v.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"}),v.coerceSelectionMarkerOpacity(t,a)}}}),F6=Xe({"src/traces/choroplethmap/convert.js"(Z,G){"use strict";var v=rs(),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:{}},c=n._opts={fill:s,line:h,geojson:e()};if(!i)return c;var m=t.extractTraceFeature(a);if(!m)return c;var p=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var f=y.mo;return v(f)?+x.constrain(f,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 d=b.properties;d.fc=p(g.z),_&&(d.mo=_(g)),w&&(d.mlc=w(g)),A&&(d.mlw=A(g)),g.ct=d.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",c.geojson={type:"FeatureCollection",features:m},o(a),c}function o(a){var n=a[0].trace,i=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),c=0;c<a.length;c++){var m=a[c];m.fOut&&(m.fOut.properties.mo2=h.selectedOpacityFn(m))}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}G.exports={convert:r,convertOnSelect:o}}}),ZV=Xe({"src/traces/choroplethmap/plot.js"(Z,G){"use strict";var v=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(v(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],c=t[s];r.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",c.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],c=t[h];o.addLayer({type:h,id:s[1],source:n,layout:c.layout,paint:c.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)},G.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=v(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}}}),YV=Xe({"src/traces/choroplethmap/index.js"(Z,G){"use strict";G.exports={attributes:z6(),supplyDefaults:XV(),colorbar:n0(),calc:lT(),plot:ZV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,x){if(x){var S=x[0].trace;S._glTrace.updateOnSelect(x)}},getBelow:function(v,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"}}}}),KV=Xe({"lib/choroplethmap.js"(Z,G){"use strict";G.exports=YV()}}),O6=Xe({"src/traces/densitymap/attributes.js"(Z,G){"use strict";var v=ku(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ru(),e=ET(),t=Qo().extendFlat;G.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})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),JV=Xe({"src/traces/densitymap/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=O6();G.exports=function(e,t,r,o){function a(h,c){return v.coerce(e,t,S,h,c)}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"})}}}),$V=Xe({"src/traces/densitymap/calc.js"(Z,G){"use strict";var v=rs(),x=sa().isArrayOrTypedArray,S=Hs().BADNUM,E=Tp(),e=sa()._;G.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 c=n[h]={},m=o.lon[h],p=o.lat[h];if(c.lonlat=v(m)&&v(p)?[+m,+p]:[S,S],s){var T=i[h];c.z=v(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}}}),QV=Xe({"src/traces/densitymap/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=$n(),E=rc(),e=Hs().BADNUM,t=m0().makeBlank;G.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=[],c,m=a.z,p=a.radius,T=x.isArrayOrTypedArray(m)&&m.length,l=x.isArrayOrTypedArray(p);for(c=0;c<o.length;c++){var _=o[c],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=v(p[c])&&p[c]>0?+p[c]: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,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<b.length;c++)y.push(b[c][0],b[c][1]);var f=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?f: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}}}),eG=Xe({"src/traces/densitymap/plot.js"(Z,G){"use strict";var v=QV(),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=v(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],c=o[s];t.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",c.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)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),tG=Xe({"src/traces/densitymap/hover.js"(Z,G){"use strict";var v=Go(),x=kT().hoverPoints,S=kT().getExtraText;G.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=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),rG=Xe({"src/traces/densitymap/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),aG=Xe({"src/traces/densitymap/index.js"(Z,G){"use strict";G.exports={attributes:O6(),supplyDefaults:JV(),colorbar:n0(),formatLabels:R6(),calc:$V(),plot:eG(),hoverPoints:tG(),eventData:rG(),getBelow:function(v,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"}}}}),iG=Xe({"lib/densitymap.js"(Z,G){"use strict";G.exports=aG()}}),B6=Xe({"src/traces/sankey/attributes.js"(Z,G){"use strict";var v=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=G.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:v({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")}}),nG=Xe({"src/traces/sankey/defaults.js"(Z,G){"use strict";var v=sa(),x=B6(),S=$n(),E=Ch(),e=wc().defaults,t=k_(),r=zl(),o=hp();G.exports=function(i,s,h,c){function m(L,z){return v.coerce(i,s,x,L,z)}var p=v.extendDeep(c.hoverlabel,i.hoverlabel),T=i.node,l=r.newContainer(s,"node");function _(L,z){return v.coerce(T,l,x.node,L,z)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",i.hoverinfo),t(T,l,_,p),_("hovertemplate"),_("align");var w=c.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 v.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,p),b("hovertemplate");var d=E(c.paper_bgcolor).getLuminance()<.333,u=d?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=b("color",u);function f(L){var z=E(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=d?z.brighten():z.darken(),z.toRgbString()}b("hovercolor",Array.isArray(y)?y.map(f):f(y)),b("customdata"),o(M,g,{name:"colorscales",handleItemDefaults:a}),e(s,c,m),m("orientation"),m("valueformat"),m("valuesuffix");var R;l.x.length&&l.y.length&&(R="freeform"),m("arrangement",R),v.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),s._length=null};function a(n,i){function s(h,c){return v.coerce(n,i,x.link.colorscales,h,c)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),N6=Xe({"node_modules/strongly-connected-components/scc.js"(Z,G){"use strict";G.exports=v;function v(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 c(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=[],d=[],u=0,M=_.length-1;M>=0;--M){var y=_[M];if(t[y]=!1,b.push(y),d.push(a[y]),u+=a[y].length,o[y]=s.length,y===l){_.length=M;break}}s.push(b);for(var f=new Array(u),M=0;M<d.length;M++)for(var R=0;R<d[M].length;R++)f[--u]=d[M][R];h.push(f)}w.pop()}}}for(var n=0;n<S;++n)E[n]<0&&c(n);for(var m,n=0;n<h.length;n++){var p=h[n];if(p.length!==0){p.sort(function(_,w){return _-w}),m=[p[0]];for(var T=1;T<p.length;T++)p[T]!==p[T-1]&&m.push(p[T]);h[n]=m}}return{components:s,adjacencyList:h}}}}),oG=Xe({"src/traces/sankey/calc.js"(Z,G){"use strict";var v=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),c=E(i.hovercolor),m=E(i.customdata),p={},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 d,u=a.node.groups,y={};for(_=0;_<u.length;_++){var f=u[_];for(d=0;d<f.length;d++){var R=f[d],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,p[N]=p[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:c?i.hovercolor[_]:i.hovercolor,customdata:m?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),se=[];for(_=0;_<B;_++)if(p[_]){var le=n.label[_];se.push({group:_>b-1,childrenNodes:[],pointNumber:_,label:le,color:X?n.color[_]:n.color,customdata:$?n.customdata[_]:n.customdata})}var fe=!1;return o(B,z.source,z.target)&&(fe=!0),{circular:fe,links:s,nodes:se,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 c=v(s);return c.components.some(function(m){return m.length>1})}G.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})}}}),sG=Xe({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,y){if(isNaN(d)||isNaN(u))return b;var f,R=b._root,L={data:y},z=b._x0,F=b._y0,N=b._x1,O=b._y1,P,U,B,X,$,se,le,fe;if(!R)return b._root=L,b;for(;R.length;)if(($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U,f=R,!(R=R[le=se<<1|$]))return f[le]=L,b;if(B=+b._x.call(null,R.data),X=+b._y.call(null,R.data),d===B&&u===X)return L.next=R,f?f[le]=L:b._root=L,b;do f=f?f[le]=new Array(4):b._root=new Array(4),($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U;while((le=se<<1|$)===(fe=(X>=U)<<1|B>=P));return f[fe]=R,f[le]=L,b}function E(b){var d,u,y=b.length,f,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(f=+this._x.call(null,d=b[u]))||isNaN(R=+this._y.call(null,d))||(L[u]=f,z[u]=R,f<F&&(F=f),f>O&&(O=f),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,d){if(isNaN(b=+b)||isNaN(d=+d))return this;var u=this._x0,y=this._y0,f=this._x1,R=this._y1;if(isNaN(u))f=(u=Math.floor(b))+1,R=(y=Math.floor(d))+1;else{for(var L=f-u,z=this._root,F,N;u>b||b>=f||y>d||d>=R;)switch(N=(d<y)<<1|b<u,F=new Array(4),F[N]=z,z=F,L*=2,N){case 0:f=u+L,R=y+L;break;case 1:u=f-L,R=y+L;break;case 2:f=u+L,y=R-L;break;case 3:u=f-L,y=R-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=y,this._x1=f,this._y1=R,this}function t(){var b=[];return this.visit(function(d){if(!d.length)do b.push(d.data);while(d=d.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,d,u,y,f){this.node=b,this.x0=d,this.y0=u,this.x1=y,this.y1=f}function a(b,d,u){var y,f=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,f,R,O,P)),u==null?u=1/0:(f=b-u,R=d-u,O=b+u,P=d+u,u*=u);X=U.pop();)if(!(!(B=X.node)||(L=X.x0)>O||(z=X.y0)>P||(F=X.x1)<f||(N=X.y1)<R))if(B.length){var se=(L+F)/2,le=(z+N)/2;U.push(new o(B[3],se,le,F,N),new o(B[2],L,le,se,N),new o(B[1],se,z,F,le),new o(B[0],L,z,se,le)),($=(d>=le)<<1|b>=se)&&(X=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=X)}else{var fe=b-+this._x.call(null,B.data),V=d-+this._y.call(null,B.data),Y=fe*fe+V*V;if(Y<u){var ee=Math.sqrt(u=Y);f=b-ee,R=d-ee,O=b+ee,P=d+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 d,u=this._root,y,f,R,L=this._x0,z=this._y0,F=this._x1,N=this._y1,O,P,U,B,X,$,se,le;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,d=u,!(u=u[se=$<<1|X]))return this;if(!u.length)break;(d[se+1&3]||d[se+2&3]||d[se+3&3])&&(y=d,le=se)}for(;u.data!==b;)if(f=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,f?(R?f.next=R:delete f.next,this):d?(R?d[se]=R:delete d[se],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(y?y[le]=u:this._root=u),this):(this._root=R,this)}function i(b){for(var d=0,u=b.length;d<u;++d)this.remove(b[d]);return this}function s(){return this._root}function h(){var b=0;return this.visit(function(d){if(!d.length)do++b;while(d=d.next)}),b}function c(b){var d=[],u,y=this._root,f,R,L,z,F;for(y&&d.push(new o(y,this._x0,this._y0,this._x1,this._y1));u=d.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;(f=y[3])&&d.push(new o(f,N,O,z,F)),(f=y[2])&&d.push(new o(f,R,O,N,F)),(f=y[1])&&d.push(new o(f,N,L,z,O)),(f=y[0])&&d.push(new o(f,R,L,N,O))}return this}function m(b){var d=[],u=[],y;for(this._root&&d.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));y=d.pop();){var f=y.node;if(f.length){var R,L=y.x0,z=y.y0,F=y.x1,N=y.y1,O=(L+F)/2,P=(z+N)/2;(R=f[0])&&d.push(new o(R,L,z,O,P)),(R=f[1])&&d.push(new o(R,O,z,F,P)),(R=f[2])&&d.push(new o(R,L,P,O,N)),(R=f[3])&&d.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 p(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,d,u){var y=new A(d??p,u??l,NaN,NaN,NaN,NaN);return b==null?y:y.addAll(b)}function A(b,d,u,y,f,R){this._x=b,this._y=d,this._x0=u,this._y0=y,this._x1=f,this._y1=R,this._root=void 0}function M(b){for(var d={data:b.data},u=d;b=b.next;)u=u.next={data:b.data};return d}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),d=this._root,u,y;if(!d)return b;if(!d.length)return b._root=M(d),b;for(u=[{source:d,target:b._root=new Array(4)}];d=u.pop();)for(var f=0;f<4;++f)(y=d.source[f])&&(y.length?u.push({source:y,target:d.target[f]=new Array(4)}):d.target[f]=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=c,g.visitAfter=m,g.x=T,g.y=_,v.quadtree=w,Object.defineProperty(v,"__esModule",{value:!0})})}}),LT=Xe({"node_modules/d3-collection/dist/d3-collection.js"(Z,G){(function(v,x){x(typeof Z=="object"&&typeof G<"u"?Z:v.d3=v.d3||{})})(Z,function(v){"use strict";var x="$";function S(){}S.prototype=E.prototype={constructor:S,has:function(p){return x+p in this},get:function(p){return this[x+p]},set:function(p,T){return this[x+p]=T,this},remove:function(p){var T=x+p;return T in this&&delete this[T]},clear:function(){for(var p in this)p[0]===x&&delete this[p]},keys:function(){var p=[];for(var T in this)T[0]===x&&p.push(T.slice(1));return p},values:function(){var p=[];for(var T in this)T[0]===x&&p.push(this[T]);return p},entries:function(){var p=[];for(var T in this)T[0]===x&&p.push({key:T.slice(1),value:this[T]});return p},size:function(){var p=0;for(var T in this)T[0]===x&&++p;return p},empty:function(){for(var p in this)if(p[0]===x)return!1;return!0},each:function(p){for(var T in this)T[0]===x&&p(this[T],T.slice(1),this)}};function E(p,T){var l=new S;if(p instanceof S)p.each(function(g,b){l.set(b,g)});else if(Array.isArray(p)){var _=-1,w=p.length,A;if(T==null)for(;++_<w;)l.set(_,p[_]);else for(;++_<w;)l.set(T(A=p[_],_,p),A)}else if(p)for(var M in p)l.set(M,p[M]);return l}function e(){var p=[],T=[],l,_,w;function A(g,b,d,u){if(b>=p.length)return l!=null&&g.sort(l),_!=null?_(g):g;for(var y=-1,f=g.length,R=p[b++],L,z,F=E(),N,O=d();++y<f;)(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,d,u))}),O}function M(g,b){if(++b>p.length)return g;var d,u=T[b-1];return _!=null&&b>=p.length?d=g.entries():(d=[],g.each(function(y,f){d.push({key:f,values:M(y,b)})})),u!=null?d.sort(function(y,f){return u(y.key,f.key)}):d}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 p.push(g),w},sortKeys:function(g){return T[p.length-1]=g,w},sortValues:function(g){return l=g,w},rollup:function(g){return _=g,w}}}function t(){return{}}function r(p,T,l){p[T]=l}function o(){return E()}function a(p,T,l){p.set(T,l)}function n(){}var i=E.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(p){return p+="",this[x+p]=p,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(p,T){var l=new n;if(p instanceof n)p.each(function(A){l.add(A)});else if(p){var _=-1,w=p.length;if(T==null)for(;++_<w;)l.add(p[_]);else for(;++_<w;)l.add(T(p[_],_,p))}return l}function h(p){var T=[];for(var l in p)T.push(l);return T}function c(p){var T=[];for(var l in p)T.push(p[l]);return T}function m(p){var T=[];for(var l in p)T.push({key:l,value:p[l]});return T}v.nest=e,v.set=s,v.map=E,v.keys=h,v.values=c,v.entries=m,Object.defineProperty(v,"__esModule",{value:!0})})}}),lG=Xe({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"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,c=i.length;if(arguments.length<2){for(;++h<c;)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<c;)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}v.dispatch=S,Object.defineProperty(v,"__esModule",{value:!0})})}}),uG=Xe({"node_modules/d3-timer/dist/d3-timer.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"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(c),a=i.now()+n)}function c(){a=0}function m(){this._call=this._time=this._next=null}m.prototype=p.prototype={constructor:m,restart:function(b,d,u){if(typeof b!="function")throw new TypeError("callback is not a function");u=(u==null?h():+u)+(d==null?0:+d),!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 p(b,d,u){var y=new m;return y.restart(b,d,u),y}function T(){h(),++x;for(var b=t,d;b;)(d=a-b._time)>=0&&b._call.call(null,d),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(),d=b-o;d>e&&(n-=d,o=b)}function w(){for(var b,d=t,u,y=1/0;d;)d._call?(y>d._time&&(y=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(y)}function A(b){if(!x){S&&(S=clearTimeout(S));var d=b-a;d>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,d,u){var y=new m;return d=d==null?0:+d,y.restart(function(f){y.stop(),b(f+d)},d,u),y}function g(b,d,u){var y=new m,f=d;return d==null?(y.restart(b,d,u),y):(d=+d,u=u==null?h():+u,y.restart(function R(L){L+=f,y.restart(R,f+=d,u),b(L)},d,u),y)}v.interval=g,v.now=h,v.timeout=M,v.timer=p,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),cG=Xe({"node_modules/d3-force/dist/d3-force.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,sG(),LT(),lG(),uG()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,x,S,E,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function y(){var f,R=u.length,L,z=0,F=0;for(f=0;f<R;++f)L=u[f],z+=L.x,F+=L.y;for(z=z/R-b,F=F/R-d,f=0;f<R;++f)L=u[f],L.x-=z,L.y-=F}return y.initialize=function(f){u=f},y.x=function(f){return arguments.length?(b=+f,y):b},y.y=function(f){return arguments.length?(d=+f,y):d},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 d,u,y=1,f=1;typeof b!="function"&&(b=r(b==null?1:+b));function R(){for(var F,N=d.length,O,P,U,B,X,$,se=0;se<f;++se)for(O=x.quadtree(d,a,n).visitAfter(L),F=0;F<N;++F)P=d[F],X=u[P.index],$=X*X,U=P.x+P.vx,B=P.y+P.vy,O.visit(le);function le(fe,V,Y,ee,q){var oe=fe.data,ae=fe.r,j=X+ae;if(oe){if(oe.index>P.index){var Q=U-oe.x-oe.vx,re=B-oe.y-oe.vy,ce=Q*Q+re*re;ce<j*j&&(Q===0&&(Q=o(),ce+=Q*Q),re===0&&(re=o(),ce+=re*re),ce=(j-(ce=Math.sqrt(ce)))/ce*y,P.vx+=(Q*=ce)*(j=(ae*=ae)/($+ae)),P.vy+=(re*=ce)*j,oe.vx-=Q*(j=1-j),oe.vy-=re*j)}return}return V>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(d){var F,N=d.length,O;for(u=new Array(N),F=0;F<N;++F)O=d[F],u[O.index]=+b(O,F,d)}}return R.initialize=function(F){d=F,z()},R.iterations=function(F){return arguments.length?(f=+F,R):f},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,d){var u=b.get(d);if(!u)throw new Error("missing: "+d);return u}function c(b){var d=s,u=O,y,f=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 se=0,le=b.length;se<N;++se)for(var fe=0,V,Y,ee,q,oe,ae,j;fe<le;++fe)V=b[fe],Y=V.source,ee=V.target,q=ee.x+ee.vx-Y.x-Y.vx||o(),oe=ee.y+ee.vy-Y.y-Y.vy||o(),ae=Math.sqrt(q*q+oe*oe),ae=(ae-R[fe])/ae*$*y[fe],q*=ae,oe*=ae,ee.vx-=q*(j=F[fe]),ee.vy-=oe*j,Y.vx+=q*(j=1-j),Y.vy+=oe*j}function U(){if(L){var $,se=L.length,le=b.length,fe=S.map(L,d),V;for($=0,z=new Array(se);$<le;++$)V=b[$],V.index=$,typeof V.source!="object"&&(V.source=h(fe,V.source)),typeof V.target!="object"&&(V.target=h(fe,V.target)),z[V.source.index]=(z[V.source.index]||0)+1,z[V.target.index]=(z[V.target.index]||0)+1;for($=0,F=new Array(le);$<le;++$)V=b[$],F[$]=z[V.source.index]/(z[V.source.index]+z[V.target.index]);y=new Array(le),B(),R=new Array(le),X()}}function B(){if(L)for(var $=0,se=b.length;$<se;++$)y[$]=+u(b[$],$,b)}function X(){if(L)for(var $=0,se=b.length;$<se;++$)R[$]=+f(b[$],$,b)}return P.initialize=function($){L=$,U()},P.links=function($){return arguments.length?(b=$,U(),P):b},P.id=function($){return arguments.length?(d=$,P):d},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?(f=typeof $=="function"?$:r(+$),X(),P):f},P}function m(b){return b.x}function p(b){return b.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function _(b){var d,u=1,y=.001,f=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",d),u<y&&(F.stop(),N.call("end",d))}function P(X){var $,se=b.length,le;X===void 0&&(X=1);for(var fe=0;fe<X;++fe)for(u+=(R-u)*f,z.each(function(V){V(u)}),$=0;$<se;++$)le=b[$],le.fx==null?le.x+=le.vx*=L:(le.x=le.fx,le.vx=0),le.fy==null?le.y+=le.vy*=L:(le.y=le.fy,le.vy=0);return d}function U(){for(var X=0,$=b.length,se;X<$;++X){if(se=b[X],se.index=X,se.fx!=null&&(se.x=se.fx),se.fy!=null&&(se.y=se.fy),isNaN(se.x)||isNaN(se.y)){var le=T*Math.sqrt(X),fe=X*l;se.x=le*Math.cos(fe),se.y=le*Math.sin(fe)}(isNaN(se.vx)||isNaN(se.vy))&&(se.vx=se.vy=0)}}function B(X){return X.initialize&&X.initialize(b),X}return U(),d={tick:P,restart:function(){return F.restart(O),d},stop:function(){return F.stop(),d},nodes:function(X){return arguments.length?(b=X,U(),z.each(B),d):b},alpha:function(X){return arguments.length?(u=+X,d):u},alphaMin:function(X){return arguments.length?(y=+X,d):y},alphaDecay:function(X){return arguments.length?(f=+X,d):+f},alphaTarget:function(X){return arguments.length?(R=+X,d):R},velocityDecay:function(X){return arguments.length?(L=1-X,d):1-L},force:function(X,$){return arguments.length>1?($==null?z.remove(X):z.set(X,B($)),d):z.get(X)},find:function(X,$,se){var le=0,fe=b.length,V,Y,ee,q,oe;for(se==null?se=1/0:se*=se,le=0;le<fe;++le)q=b[le],V=X-q.x,Y=$-q.y,ee=V*V+Y*Y,ee<se&&(oe=q,se=ee);return oe},on:function(X,$){return arguments.length>1?(N.on(X,$),d):N.on(X)}}}function w(){var b,d,u,y=r(-30),f,R=1,L=1/0,z=.81;function F(U){var B,X=b.length,$=x.quadtree(b,m,p).visitAfter(O);for(u=U,B=0;B<X;++B)d=b[B],$.visit(P)}function N(){if(b){var U,B=b.length,X;for(f=new Array(B),U=0;U<B;++U)X=b[U],f[X.index]=+y(X,U,b)}}function O(U){var B=0,X,$,se=0,le,fe,V;if(U.length){for(le=fe=V=0;V<4;++V)(X=U[V])&&($=Math.abs(X.value))&&(B+=X.value,se+=$,le+=$*X.x,fe+=$*X.y);U.x=le/se,U.y=fe/se}else{X=U,X.x=X.data.x,X.y=X.data.y;do B+=f[X.data.index];while(X=X.next)}U.value=B}function P(U,B,X,$){if(!U.value)return!0;var se=U.x-d.x,le=U.y-d.y,fe=$-B,V=se*se+le*le;if(fe*fe/z<V)return V<L&&(se===0&&(se=o(),V+=se*se),le===0&&(le=o(),V+=le*le),V<R&&(V=Math.sqrt(R*V)),d.vx+=se*U.value*u/V,d.vy+=le*U.value*u/V),!0;if(U.length||V>=L)return;(U.data!==d||U.next)&&(se===0&&(se=o(),V+=se*se),le===0&&(le=o(),V+=le*le),V<R&&(V=Math.sqrt(R*V)));do U.data!==d&&(fe=f[U.data.index]*u/V,d.vx+=se*fe,d.vy+=le*fe);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,d,u){var y,f=r(.1),R,L;typeof b!="function"&&(b=r(+b)),d==null&&(d=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-d||1e-6,X=U.y-u||1e-6,$=Math.sqrt(B*B+X*X),se=(L[O]-$)*R[O]*N/$;U.vx+=B*se,U.vy+=X*se}}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:+f(y[N],N,y)}}return z.initialize=function(N){y=N,F()},z.strength=function(N){return arguments.length?(f=typeof N=="function"?N:r(+N),F(),z):f},z.radius=function(N){return arguments.length?(b=typeof N=="function"?N:r(+N),F(),z):b},z.x=function(N){return arguments.length?(d=+N,z):d},z.y=function(N){return arguments.length?(u=+N,z):u},z}function M(b){var d=r(.1),u,y,f;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+=(f[F]-O.x)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),f=new Array(F),z=0;z<F;++z)y[z]=isNaN(f[z]=+b(u[z],z,u))?0:+d(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(d=typeof z=="function"?z:r(+z),L(),R):d},R.x=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}function g(b){var d=r(.1),u,y,f;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+=(f[F]-O.y)*y[F]*z}function L(){if(u){var z,F=u.length;for(y=new Array(F),f=new Array(F),z=0;z<F;++z)y[z]=isNaN(f[z]=+b(u[z],z,u))?0:+d(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(d=typeof z=="function"?z:r(+z),L(),R):d},R.y=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),R):b},R}v.forceCenter=t,v.forceCollide=i,v.forceLink=c,v.forceManyBody=w,v.forceRadial=A,v.forceSimulation=_,v.forceX=M,v.forceY=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),fG=Xe({"node_modules/d3-path/dist/d3-path.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"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,c=this._y1,m=n-o,p=i-a,T=h-o,l=c-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*m-p*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=n-h,A=i-c,M=m*m+p*p,g=w*w+A*A,b=Math.sqrt(M),d=Math.sqrt(_),u=s*Math.tan((x-Math.acos((M+_-g)/(2*b*d)))/2),y=u/d,f=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+f*m)+","+(this._y1=a+f*p)}},arc:function(o,a,n,i,s,h){o=+o,a=+a,n=+n,h=!!h;var c=n*Math.cos(i),m=n*Math.sin(i),p=o+c,T=a+m,l=1^h,_=h?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+p+","+T:(Math.abs(this._x1-p)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+p+","+T),n&&(_<0&&(_=_%S+S),_>e?this._+="A"+n+","+n+",0,1,"+l+","+(o-c)+","+(a-m)+"A"+n+","+n+",0,1,"+l+","+(this._x1=p)+","+(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._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=Xe({"node_modules/d3-shape/dist/d3-shape.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,fG()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,x){"use strict";function S(xt){return function(){return xt}}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,c=2*s;function m(xt){return xt>1?0:xt<-1?s:Math.acos(xt)}function p(xt){return xt>=1?h:xt<=-1?-h:Math.asin(xt)}function T(xt){return xt.innerRadius}function l(xt){return xt.outerRadius}function _(xt){return xt.startAngle}function w(xt){return xt.endAngle}function A(xt){return xt&&xt.padAngle}function M(xt,Xt,vr,Or,ba,Pa,ya,la){var Ta=vr-xt,Ai=Or-Xt,ki=ya-ba,Ki=la-Pa,_n=Ki*Ta-ki*Ai;if(!(_n*_n<i))return _n=(ki*(Xt-Pa)-Ki*(xt-ba))/_n,[xt+_n*Ta,Xt+_n*Ai]}function g(xt,Xt,vr,Or,ba,Pa,ya){var la=xt-vr,Ta=Xt-Or,Ai=(ya?Pa:-Pa)/n(la*la+Ta*Ta),ki=Ai*Ta,Ki=-Ai*la,_n=xt+ki,Rn=Xt+Ki,En=vr+ki,On=Or+Ki,no=(_n+En)/2,cn=(Rn+On)/2,lo=En-_n,Wo=On-Rn,hs=lo*lo+Wo*Wo,Oo=ba-Pa,Wn=_n*On-En*Rn,No=(Wo<0?-1:1)*n(r(0,Oo*Oo*hs-Wn*Wn)),as=(Wn*Wo-lo*No)/hs,Ns=(-Wn*lo-Wo*No)/hs,ss=(Wn*Wo+lo*No)/hs,uo=(-Wn*lo+Wo*No)/hs,jn=as-no,Xn=Ns-cn,ls=ss-no,Cs=uo-cn;return jn*jn+Xn*Xn>ls*ls+Cs*Cs&&(as=ss,Ns=uo),{cx:as,cy:Ns,x01:-ki,y01:-Ki,x11:as*(ba/Oo-1),y11:Ns*(ba/Oo-1)}}function b(){var xt=T,Xt=l,vr=S(0),Or=null,ba=_,Pa=w,ya=A,la=null;function Ta(){var Ai,ki,Ki=+xt.apply(this,arguments),_n=+Xt.apply(this,arguments),Rn=ba.apply(this,arguments)-h,En=Pa.apply(this,arguments)-h,On=E(En-Rn),no=En>Rn;if(la||(la=Ai=x.path()),_n<Ki&&(ki=_n,_n=Ki,Ki=ki),!(_n>i))la.moveTo(0,0);else if(On>c-i)la.moveTo(_n*t(Rn),_n*a(Rn)),la.arc(0,0,_n,Rn,En,!no),Ki>i&&(la.moveTo(Ki*t(En),Ki*a(En)),la.arc(0,0,Ki,En,Rn,no));else{var cn=Rn,lo=En,Wo=Rn,hs=En,Oo=On,Wn=On,No=ya.apply(this,arguments)/2,as=No>i&&(Or?+Or.apply(this,arguments):n(Ki*Ki+_n*_n)),Ns=o(E(_n-Ki)/2,+vr.apply(this,arguments)),ss=Ns,uo=Ns,jn,Xn;if(as>i){var ls=p(as/Ki*a(No)),Cs=p(as/_n*a(No));(Oo-=ls*2)>i?(ls*=no?1:-1,Wo+=ls,hs-=ls):(Oo=0,Wo=hs=(Rn+En)/2),(Wn-=Cs*2)>i?(Cs*=no?1:-1,cn+=Cs,lo-=Cs):(Wn=0,cn=lo=(Rn+En)/2)}var Ks=_n*t(cn),Xo=_n*a(cn),Gi=Ki*t(hs),Ln=Ki*a(hs);if(Ns>i){var Us=_n*t(lo),_s=_n*a(lo),Gn=Ki*t(Wo),zs=Ki*a(Wo),vs;if(On<s&&(vs=M(Ks,Xo,Gn,zs,Us,_s,Gi,Ln))){var Ws=Ks-vs[0],il=Xo-vs[1],xn=Us-vs[0],ko=_s-vs[1],bo=1/a(m((Ws*xn+il*ko)/(n(Ws*Ws+il*il)*n(xn*xn+ko*ko)))/2),Is=n(vs[0]*vs[0]+vs[1]*vs[1]);ss=o(Ns,(Ki-Is)/(bo-1)),uo=o(Ns,(_n-Is)/(bo+1))}}Wn>i?uo>i?(jn=g(Gn,zs,Ks,Xo,_n,uo,no),Xn=g(Us,_s,Gi,Ln,_n,uo,no),la.moveTo(jn.cx+jn.x01,jn.cy+jn.y01),uo<Ns?la.arc(jn.cx,jn.cy,uo,e(jn.y01,jn.x01),e(Xn.y01,Xn.x01),!no):(la.arc(jn.cx,jn.cy,uo,e(jn.y01,jn.x01),e(jn.y11,jn.x11),!no),la.arc(0,0,_n,e(jn.cy+jn.y11,jn.cx+jn.x11),e(Xn.cy+Xn.y11,Xn.cx+Xn.x11),!no),la.arc(Xn.cx,Xn.cy,uo,e(Xn.y11,Xn.x11),e(Xn.y01,Xn.x01),!no))):(la.moveTo(Ks,Xo),la.arc(0,0,_n,cn,lo,!no)):la.moveTo(Ks,Xo),!(Ki>i)||!(Oo>i)?la.lineTo(Gi,Ln):ss>i?(jn=g(Gi,Ln,Us,_s,Ki,-ss,no),Xn=g(Ks,Xo,Gn,zs,Ki,-ss,no),la.lineTo(jn.cx+jn.x01,jn.cy+jn.y01),ss<Ns?la.arc(jn.cx,jn.cy,ss,e(jn.y01,jn.x01),e(Xn.y01,Xn.x01),!no):(la.arc(jn.cx,jn.cy,ss,e(jn.y01,jn.x01),e(jn.y11,jn.x11),!no),la.arc(0,0,Ki,e(jn.cy+jn.y11,jn.cx+jn.x11),e(Xn.cy+Xn.y11,Xn.cx+Xn.x11),no),la.arc(Xn.cx,Xn.cy,ss,e(Xn.y11,Xn.x11),e(Xn.y01,Xn.x01),!no))):la.arc(0,0,Ki,hs,Wo,no)}if(la.closePath(),Ai)return la=null,Ai+""||null}return Ta.centroid=function(){var Ai=(+xt.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]},Ta.innerRadius=function(Ai){return arguments.length?(xt=typeof Ai=="function"?Ai:S(+Ai),Ta):xt},Ta.outerRadius=function(Ai){return arguments.length?(Xt=typeof Ai=="function"?Ai:S(+Ai),Ta):Xt},Ta.cornerRadius=function(Ai){return arguments.length?(vr=typeof Ai=="function"?Ai:S(+Ai),Ta):vr},Ta.padRadius=function(Ai){return arguments.length?(Or=Ai==null?null:typeof Ai=="function"?Ai:S(+Ai),Ta):Or},Ta.startAngle=function(Ai){return arguments.length?(ba=typeof Ai=="function"?Ai:S(+Ai),Ta):ba},Ta.endAngle=function(Ai){return arguments.length?(Pa=typeof Ai=="function"?Ai:S(+Ai),Ta):Pa},Ta.padAngle=function(Ai){return arguments.length?(ya=typeof Ai=="function"?Ai:S(+Ai),Ta):ya},Ta.context=function(Ai){return arguments.length?(la=Ai??null,Ta):la},Ta}function d(xt){this._context=xt}d.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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;default:this._context.lineTo(xt,Xt);break}}};function u(xt){return new d(xt)}function y(xt){return xt[0]}function f(xt){return xt[1]}function R(){var xt=y,Xt=f,vr=S(!0),Or=null,ba=u,Pa=null;function ya(la){var Ta,Ai=la.length,ki,Ki=!1,_n;for(Or==null&&(Pa=ba(_n=x.path())),Ta=0;Ta<=Ai;++Ta)!(Ta<Ai&&vr(ki=la[Ta],Ta,la))===Ki&&((Ki=!Ki)?Pa.lineStart():Pa.lineEnd()),Ki&&Pa.point(+xt(ki,Ta,la),+Xt(ki,Ta,la));if(_n)return Pa=null,_n+""||null}return ya.x=function(la){return arguments.length?(xt=typeof la=="function"?la:S(+la),ya):xt},ya.y=function(la){return arguments.length?(Xt=typeof la=="function"?la:S(+la),ya):Xt},ya.defined=function(la){return arguments.length?(vr=typeof la=="function"?la:S(!!la),ya):vr},ya.curve=function(la){return arguments.length?(ba=la,Or!=null&&(Pa=ba(Or)),ya):ba},ya.context=function(la){return arguments.length?(la==null?Or=Pa=null:Pa=ba(Or=la),ya):Or},ya}function L(){var xt=y,Xt=null,vr=S(0),Or=f,ba=S(!0),Pa=null,ya=u,la=null;function Ta(ki){var Ki,_n,Rn,En=ki.length,On,no=!1,cn,lo=new Array(En),Wo=new Array(En);for(Pa==null&&(la=ya(cn=x.path())),Ki=0;Ki<=En;++Ki){if(!(Ki<En&&ba(On=ki[Ki],Ki,ki))===no)if(no=!no)_n=Ki,la.areaStart(),la.lineStart();else{for(la.lineEnd(),la.lineStart(),Rn=Ki-1;Rn>=_n;--Rn)la.point(lo[Rn],Wo[Rn]);la.lineEnd(),la.areaEnd()}no&&(lo[Ki]=+xt(On,Ki,ki),Wo[Ki]=+vr(On,Ki,ki),la.point(Xt?+Xt(On,Ki,ki):lo[Ki],Or?+Or(On,Ki,ki):Wo[Ki]))}if(cn)return la=null,cn+""||null}function Ai(){return R().defined(ba).curve(ya).context(Pa)}return Ta.x=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Xt=null,Ta):xt},Ta.x0=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Ta):xt},Ta.x1=function(ki){return arguments.length?(Xt=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Xt},Ta.y=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Or=null,Ta):vr},Ta.y0=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Ta):vr},Ta.y1=function(ki){return arguments.length?(Or=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Or},Ta.lineX0=Ta.lineY0=function(){return Ai().x(xt).y(vr)},Ta.lineY1=function(){return Ai().x(xt).y(Or)},Ta.lineX1=function(){return Ai().x(Xt).y(vr)},Ta.defined=function(ki){return arguments.length?(ba=typeof ki=="function"?ki:S(!!ki),Ta):ba},Ta.curve=function(ki){return arguments.length?(ya=ki,Pa!=null&&(la=ya(Pa)),Ta):ya},Ta.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ya(Pa=ki),Ta):Pa},Ta}function z(xt,Xt){return Xt<xt?-1:Xt>xt?1:Xt>=xt?0:NaN}function F(xt){return xt}function N(){var xt=F,Xt=z,vr=null,Or=S(0),ba=S(c),Pa=S(0);function ya(la){var Ta,Ai=la.length,ki,Ki,_n=0,Rn=new Array(Ai),En=new Array(Ai),On=+Or.apply(this,arguments),no=Math.min(c,Math.max(-c,ba.apply(this,arguments)-On)),cn,lo=Math.min(Math.abs(no)/Ai,Pa.apply(this,arguments)),Wo=lo*(no<0?-1:1),hs;for(Ta=0;Ta<Ai;++Ta)(hs=En[Rn[Ta]=Ta]=+xt(la[Ta],Ta,la))>0&&(_n+=hs);for(Xt!=null?Rn.sort(function(Oo,Wn){return Xt(En[Oo],En[Wn])}):vr!=null&&Rn.sort(function(Oo,Wn){return vr(la[Oo],la[Wn])}),Ta=0,Ki=_n?(no-Ai*Wo)/_n:0;Ta<Ai;++Ta,On=cn)ki=Rn[Ta],hs=En[ki],cn=On+(hs>0?hs*Ki:0)+Wo,En[ki]={data:la[ki],index:Ta,value:hs,startAngle:On,endAngle:cn,padAngle:lo};return En}return ya.value=function(la){return arguments.length?(xt=typeof la=="function"?la:S(+la),ya):xt},ya.sortValues=function(la){return arguments.length?(Xt=la,vr=null,ya):Xt},ya.sort=function(la){return arguments.length?(vr=la,Xt=null,ya):vr},ya.startAngle=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.endAngle=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ya):Pa},ya}var O=U(u);function P(xt){this._curve=xt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(xt,Xt){this._curve.point(Xt*Math.sin(xt),Xt*-Math.cos(xt))}};function U(xt){function Xt(vr){return new P(xt(vr))}return Xt._curve=xt,Xt}function B(xt){var Xt=xt.curve;return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt.curve=function(vr){return arguments.length?Xt(U(vr)):Xt()._curve},xt}function X(){return B(R().curve(O))}function $(){var xt=L().curve(O),Xt=xt.curve,vr=xt.lineX0,Or=xt.lineX1,ba=xt.lineY0,Pa=xt.lineY1;return xt.angle=xt.x,delete xt.x,xt.startAngle=xt.x0,delete xt.x0,xt.endAngle=xt.x1,delete xt.x1,xt.radius=xt.y,delete xt.y,xt.innerRadius=xt.y0,delete xt.y0,xt.outerRadius=xt.y1,delete xt.y1,xt.lineStartAngle=function(){return B(vr())},delete xt.lineX0,xt.lineEndAngle=function(){return B(Or())},delete xt.lineX1,xt.lineInnerRadius=function(){return B(ba())},delete xt.lineY0,xt.lineOuterRadius=function(){return B(Pa())},delete xt.lineY1,xt.curve=function(ya){return arguments.length?Xt(U(ya)):Xt()._curve},xt}function se(xt,Xt){return[(Xt=+Xt)*Math.cos(xt-=Math.PI/2),Xt*Math.sin(xt)]}var le=Array.prototype.slice;function fe(xt){return xt.source}function V(xt){return xt.target}function Y(xt){var Xt=fe,vr=V,Or=y,ba=f,Pa=null;function ya(){var la,Ta=le.call(arguments),Ai=Xt.apply(this,Ta),ki=vr.apply(this,Ta);if(Pa||(Pa=la=x.path()),xt(Pa,+Or.apply(this,(Ta[0]=Ai,Ta)),+ba.apply(this,Ta),+Or.apply(this,(Ta[0]=ki,Ta)),+ba.apply(this,Ta)),la)return Pa=null,la+""||null}return ya.source=function(la){return arguments.length?(Xt=la,ya):Xt},ya.target=function(la){return arguments.length?(vr=la,ya):vr},ya.x=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.y=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.context=function(la){return arguments.length?(Pa=la??null,ya):Pa},ya}function ee(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt=(Xt+Or)/2,vr,Xt,ba,Or,ba)}function q(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt,vr=(vr+ba)/2,Or,vr,Or,ba)}function oe(xt,Xt,vr,Or,ba){var Pa=se(Xt,vr),ya=se(Xt,vr=(vr+ba)/2),la=se(Or,vr),Ta=se(Or,ba);xt.moveTo(Pa[0],Pa[1]),xt.bezierCurveTo(ya[0],ya[1],la[0],la[1],Ta[0],Ta[1])}function ae(){return Y(ee)}function j(){return Y(q)}function Q(){var xt=Y(oe);return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt}var re={draw:function(xt,Xt){var vr=Math.sqrt(Xt/s);xt.moveTo(vr,0),xt.arc(0,0,vr,0,c)}},ce={draw:function(xt,Xt){var vr=Math.sqrt(Xt/5)/2;xt.moveTo(-3*vr,-vr),xt.lineTo(-vr,-vr),xt.lineTo(-vr,-3*vr),xt.lineTo(vr,-3*vr),xt.lineTo(vr,-vr),xt.lineTo(3*vr,-vr),xt.lineTo(3*vr,vr),xt.lineTo(vr,vr),xt.lineTo(vr,3*vr),xt.lineTo(-vr,3*vr),xt.lineTo(-vr,vr),xt.lineTo(-3*vr,vr),xt.closePath()}},be=Math.sqrt(1/3),Ae=be*2,De={draw:function(xt,Xt){var vr=Math.sqrt(Xt/Ae),Or=vr*be;xt.moveTo(0,-vr),xt.lineTo(Or,0),xt.lineTo(0,vr),xt.lineTo(-Or,0),xt.closePath()}},ze=.8908130915292852,Ze=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(c/10)*Ze,nt=-Math.cos(c/10)*Ze,rt={draw:function(xt,Xt){var vr=Math.sqrt(Xt*ze),Or=at*vr,ba=nt*vr;xt.moveTo(0,-vr),xt.lineTo(Or,ba);for(var Pa=1;Pa<5;++Pa){var ya=c*Pa/5,la=Math.cos(ya),Ta=Math.sin(ya);xt.lineTo(Ta*vr,-la*vr),xt.lineTo(la*Or-Ta*ba,Ta*Or+la*ba)}xt.closePath()}},st={draw:function(xt,Xt){var vr=Math.sqrt(Xt),Or=-vr/2;xt.rect(Or,Or,vr,vr)}},Me=Math.sqrt(3),ye={draw:function(xt,Xt){var vr=-Math.sqrt(Xt/(Me*3));xt.moveTo(0,vr*2),xt.lineTo(-Me*vr,-vr),xt.lineTo(Me*vr,-vr),xt.closePath()}},he=-.5,Oe=Math.sqrt(3)/2,tt=1/Math.sqrt(12),ot=(tt/2+1)*3,Qe={draw:function(xt,Xt){var vr=Math.sqrt(Xt/ot),Or=vr/2,ba=vr*tt,Pa=Or,ya=vr*tt+vr,la=-Pa,Ta=ya;xt.moveTo(Or,ba),xt.lineTo(Pa,ya),xt.lineTo(la,Ta),xt.lineTo(he*Or-Oe*ba,Oe*Or+he*ba),xt.lineTo(he*Pa-Oe*ya,Oe*Pa+he*ya),xt.lineTo(he*la-Oe*Ta,Oe*la+he*Ta),xt.lineTo(he*Or+Oe*ba,he*ba-Oe*Or),xt.lineTo(he*Pa+Oe*ya,he*ya-Oe*Pa),xt.lineTo(he*la+Oe*Ta,he*Ta-Oe*la),xt.closePath()}},Pt=[re,ce,De,st,rt,ye,Qe];function It(){var xt=S(re),Xt=S(64),vr=null;function Or(){var ba;if(vr||(vr=ba=x.path()),xt.apply(this,arguments).draw(vr,+Xt.apply(this,arguments)),ba)return vr=null,ba+""||null}return Or.type=function(ba){return arguments.length?(xt=typeof ba=="function"?ba:S(ba),Or):xt},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 qt(){}function Wt(xt,Xt,vr){xt._context.bezierCurveTo((2*xt._x0+xt._x1)/3,(2*xt._y0+xt._y1)/3,(xt._x0+2*xt._x1)/3,(xt._y0+2*xt._y1)/3,(xt._x0+4*xt._x1+Xt)/6,(xt._y0+4*xt._y1+vr)/6)}function kr(xt){this._context=xt}kr.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:Wt(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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,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:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function mr(xt){return new kr(xt)}function qr(xt){this._context=xt}qr.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=xt,this._y2=Xt;break;case 1:this._point=2,this._x3=xt,this._y3=Xt;break;case 2:this._point=3,this._x4=xt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+xt)/6,(this._y0+4*this._y1+Xt)/6);break;default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function Sr(xt){return new qr(xt)}function Rr(xt){this._context=xt}Rr.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(xt,Xt){switch(xt=+xt,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+xt)/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:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function wt(xt){return new Rr(xt)}function Ne(xt,Xt){this._basis=new kr(xt),this._beta=Xt}Ne.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length-1;if(vr>0)for(var Or=xt[0],ba=Xt[0],Pa=xt[vr]-Or,ya=Xt[vr]-ba,la=-1,Ta;++la<=vr;)Ta=la/vr,this._basis.point(this._beta*xt[la]+(1-this._beta)*(Or+Ta*Pa),this._beta*Xt[la]+(1-this._beta)*(ba+Ta*ya));this._x=this._y=null,this._basis.lineEnd()},point:function(xt,Xt){this._x.push(+xt),this._y.push(+Xt)}};var Ke=function xt(Xt){function vr(Or){return Xt===1?new kr(Or):new Ne(Or,Xt)}return vr.beta=function(Or){return xt(+Or)},vr}(.85);function Te(xt,Xt,vr){xt._context.bezierCurveTo(xt._x1+xt._k*(xt._x2-xt._x0),xt._y1+xt._k*(xt._y2-xt._y0),xt._x2+xt._k*(xt._x1-Xt),xt._y2+xt._k*(xt._y1-vr),xt._x2,xt._y2)}function Ie(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ie.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:Te(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2,this._x1=xt,this._y1=Xt;break;case 2:this._point=3;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ve=function xt(Xt){function vr(Or){return new Ie(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Ce(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ce.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ee=function xt(Xt){function vr(Or){return new Ce(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Pe(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Pe.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(xt,Xt){switch(xt=+xt,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:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var ft=function xt(Xt){function vr(Or){return new Pe(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function ct(xt,Xt,vr){var Or=xt._x1,ba=xt._y1,Pa=xt._x2,ya=xt._y2;if(xt._l01_a>i){var la=2*xt._l01_2a+3*xt._l01_a*xt._l12_a+xt._l12_2a,Ta=3*xt._l01_a*(xt._l01_a+xt._l12_a);Or=(Or*la-xt._x0*xt._l12_2a+xt._x2*xt._l01_2a)/Ta,ba=(ba*la-xt._y0*xt._l12_2a+xt._y2*xt._l01_2a)/Ta}if(xt._l23_a>i){var Ai=2*xt._l23_2a+3*xt._l23_a*xt._l12_a+xt._l12_2a,ki=3*xt._l23_a*(xt._l23_a+xt._l12_a);Pa=(Pa*Ai+xt._x1*xt._l23_2a-Xt*xt._l12_2a)/ki,ya=(ya*Ai+xt._y1*xt._l23_2a-vr*xt._l12_2a)/ki}xt._context.bezierCurveTo(Or,ba,Pa,ya,xt._x2,xt._y2)}function _t(xt,Xt){this._context=xt,this._alpha=Xt}_t.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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,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(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:ct(this,xt,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=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ct=function xt(Xt){function vr(Or){return Xt?new _t(Or,Xt):new Ie(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function ir(xt,Xt){this._context=xt,this._alpha=Xt}ir.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,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=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:ct(this,xt,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=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var rr=function xt(Xt){function vr(Or){return Xt?new ir(Or,Xt):new Ce(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function er(xt,Xt){this._context=xt,this._alpha=Xt}er.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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,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,xt,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=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Lr=function xt(Xt){function vr(Or){return Xt?new er(Or,Xt):new Pe(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function fa(xt){this._context=xt}fa.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(xt,Xt){xt=+xt,Xt=+Xt,this._point?this._context.lineTo(xt,Xt):(this._point=1,this._context.moveTo(xt,Xt))}};function Da(xt){return new fa(xt)}function Ia(xt){return xt<0?-1:1}function qa(xt,Xt,vr){var Or=xt._x1-xt._x0,ba=Xt-xt._x1,Pa=(xt._y1-xt._y0)/(Or||ba<0&&-0),ya=(vr-xt._y1)/(ba||Or<0&&-0),la=(Pa*ba+ya*Or)/(Or+ba);return(Ia(Pa)+Ia(ya))*Math.min(Math.abs(Pa),Math.abs(ya),.5*Math.abs(la))||0}function Wa(xt,Xt){var vr=xt._x1-xt._x0;return vr?(3*(xt._y1-xt._y0)/vr-Xt)/2:Xt}function Ca(xt,Xt,vr){var Or=xt._x0,ba=xt._y0,Pa=xt._x1,ya=xt._y1,la=(Pa-Or)/3;xt._context.bezierCurveTo(Or+la,ba+la*Xt,Pa-la,ya-la*vr,Pa,ya)}function hi(xt){this._context=xt}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(xt,Xt){var vr=NaN;if(xt=+xt,Xt=+Xt,!(xt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,vr=qa(this,xt,Xt)),vr);break;default:Ca(this,this._t0,vr=qa(this,xt,Xt));break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt,this._t0=vr}}};function wi(xt){this._context=new Kt(xt)}(wi.prototype=Object.create(hi.prototype)).point=function(xt,Xt){hi.prototype.point.call(this,Xt,xt)};function Kt(xt){this._context=xt}Kt.prototype={moveTo:function(xt,Xt){this._context.moveTo(Xt,xt)},closePath:function(){this._context.closePath()},lineTo:function(xt,Xt){this._context.lineTo(Xt,xt)},bezierCurveTo:function(xt,Xt,vr,Or,ba,Pa){this._context.bezierCurveTo(Xt,xt,Or,vr,Pa,ba)}};function Ft(xt){return new hi(xt)}function Yt(xt){return new wi(xt)}function Jt(xt){this._context=xt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length;if(vr)if(this._line?this._context.lineTo(xt[0],Xt[0]):this._context.moveTo(xt[0],Xt[0]),vr===2)this._context.lineTo(xt[1],Xt[1]);else for(var Or=Fr(xt),ba=Fr(Xt),Pa=0,ya=1;ya<vr;++Pa,++ya)this._context.bezierCurveTo(Or[0][Pa],ba[0][Pa],Or[1][Pa],ba[1][Pa],xt[ya],Xt[ya]);(this._line||this._line!==0&&vr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(xt,Xt){this._x.push(+xt),this._y.push(+Xt)}};function Fr(xt){var Xt,vr=xt.length-1,Or,ba=new Array(vr),Pa=new Array(vr),ya=new Array(vr);for(ba[0]=0,Pa[0]=2,ya[0]=xt[0]+2*xt[1],Xt=1;Xt<vr-1;++Xt)ba[Xt]=1,Pa[Xt]=4,ya[Xt]=4*xt[Xt]+2*xt[Xt+1];for(ba[vr-1]=2,Pa[vr-1]=7,ya[vr-1]=8*xt[vr-1]+xt[vr],Xt=1;Xt<vr;++Xt)Or=ba[Xt]/Pa[Xt-1],Pa[Xt]-=Or,ya[Xt]-=Or*ya[Xt-1];for(ba[vr-1]=ya[vr-1]/Pa[vr-1],Xt=vr-2;Xt>=0;--Xt)ba[Xt]=(ya[Xt]-ba[Xt+1])/Pa[Xt];for(Pa[vr-1]=(xt[vr]+ba[vr-1])/2,Xt=0;Xt<vr-1;++Xt)Pa[Xt]=2*xt[Xt+1]-ba[Xt+1];return[ba,Pa]}function ta(xt){return new Jt(xt)}function ra(xt,Xt){this._context=xt,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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(xt,Xt);else{var vr=this._x*(1-this._t)+xt*this._t;this._context.lineTo(vr,this._y),this._context.lineTo(vr,Xt)}break}}this._x=xt,this._y=Xt}};function ca(xt){return new ra(xt,.5)}function Ba(xt){return new ra(xt,0)}function $a(xt){return new ra(xt,1)}function Za(xt,Xt){if((ya=xt.length)>1)for(var vr=1,Or,ba,Pa=xt[Xt[0]],ya,la=Pa.length;vr<ya;++vr)for(ba=Pa,Pa=xt[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(xt){for(var Xt=xt.length,vr=new Array(Xt);--Xt>=0;)vr[Xt]=Xt;return vr}function pi(xt,Xt){return xt[Xt]}function Ra(){var xt=S([]),Xt=ri,vr=Za,Or=pi;function ba(Pa){var ya=xt.apply(this,arguments),la,Ta=Pa.length,Ai=ya.length,ki=new Array(Ai),Ki;for(la=0;la<Ai;++la){for(var _n=ya[la],Rn=ki[la]=new Array(Ta),En=0,On;En<Ta;++En)Rn[En]=On=[0,+Or(Pa[En],_n,En,Pa)],On.data=Pa[En];Rn.key=_n}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?(xt=typeof Pa=="function"?Pa:S(le.call(Pa)),ba):xt},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(le.call(Pa)),ba):Xt},ba.offset=function(Pa){return arguments.length?(vr=Pa??Za,ba):vr},ba}function tn(xt,Xt){if((Or=xt.length)>0){for(var vr,Or,ba=0,Pa=xt[0].length,ya;ba<Pa;++ba){for(ya=vr=0;vr<Or;++vr)ya+=xt[vr][ba][1]||0;if(ya)for(vr=0;vr<Or;++vr)xt[vr][ba][1]/=ya}Za(xt,Xt)}}function on(xt,Xt){if((Ta=xt.length)>0)for(var vr,Or=0,ba,Pa,ya,la,Ta,Ai=xt[Xt[0]].length;Or<Ai;++Or)for(ya=la=0,vr=0;vr<Ta;++vr)(Pa=(ba=xt[Xt[vr]][Or])[1]-ba[0])>0?(ba[0]=ya,ba[1]=ya+=Pa):Pa<0?(ba[1]=la,ba[0]=la+=Pa):(ba[0]=0,ba[1]=Pa)}function hn(xt,Xt){if((ba=xt.length)>0){for(var vr=0,Or=xt[Xt[0]],ba,Pa=Or.length;vr<Pa;++vr){for(var ya=0,la=0;ya<ba;++ya)la+=xt[ya][vr][1]||0;Or[vr][1]+=Or[vr][0]=-la/2}Za(xt,Xt)}}function Tt(xt,Xt){if(!(!((ya=xt.length)>0)||!((Pa=(ba=xt[Xt[0]]).length)>0))){for(var vr=0,Or=1,ba,Pa,ya;Or<Pa;++Or){for(var la=0,Ta=0,Ai=0;la<ya;++la){for(var ki=xt[Xt[la]],Ki=ki[Or][1]||0,_n=ki[Or-1][1]||0,Rn=(Ki-_n)/2,En=0;En<la;++En){var On=xt[Xt[En]],no=On[Or][1]||0,cn=On[Or-1][1]||0;Rn+=no-cn}Ta+=Ki,Ai+=Rn*Ki}ba[Or-1][1]+=ba[Or-1][0]=vr,Ta&&(vr-=Ai/Ta)}ba[Or-1][1]+=ba[Or-1][0]=vr,Za(xt,Xt)}}function ut(xt){var Xt=xt.map(Br);return ri(xt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function Br(xt){for(var Xt=-1,vr=0,Or=xt.length,ba,Pa=-1/0;++Xt<Or;)(ba=+xt[Xt][1])>Pa&&(Pa=ba,vr=Xt);return vr}function Cr(xt){var Xt=xt.map(xr);return ri(xt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function xr(xt){for(var Xt=0,vr=-1,Or=xt.length,ba;++vr<Or;)(ba=+xt[vr][1])&&(Xt+=ba);return Xt}function Ir(xt){return Cr(xt).reverse()}function Ur(xt){var Xt=xt.length,vr,Or,ba=xt.map(xr),Pa=ut(xt),ya=0,la=0,Ta=[],Ai=[];for(vr=0;vr<Xt;++vr)Or=Pa[vr],ya<la?(ya+=ba[Or],Ta.push(Or)):(la+=ba[Or],Ai.push(Or));return Ai.reverse().concat(Ta)}function Hr(xt){return ri(xt).reverse()}v.arc=b,v.area=L,v.areaRadial=$,v.curveBasis=mr,v.curveBasisClosed=Sr,v.curveBasisOpen=wt,v.curveBundle=Ke,v.curveCardinal=Ve,v.curveCardinalClosed=Ee,v.curveCardinalOpen=ft,v.curveCatmullRom=Ct,v.curveCatmullRomClosed=rr,v.curveCatmullRomOpen=Lr,v.curveLinear=u,v.curveLinearClosed=Da,v.curveMonotoneX=Ft,v.curveMonotoneY=Yt,v.curveNatural=ta,v.curveStep=ca,v.curveStepAfter=$a,v.curveStepBefore=Ba,v.line=R,v.lineRadial=X,v.linkHorizontal=ae,v.linkRadial=Q,v.linkVertical=j,v.pie=N,v.pointRadial=se,v.radialArea=$,v.radialLine=X,v.stack=Ra,v.stackOffsetDiverging=on,v.stackOffsetExpand=tn,v.stackOffsetNone=Za,v.stackOffsetSilhouette=hn,v.stackOffsetWiggle=Tt,v.stackOrderAppearance=ut,v.stackOrderAscending=Cr,v.stackOrderDescending=Ir,v.stackOrderInsideOut=Ur,v.stackOrderNone=ri,v.stackOrderReverse=Hr,v.symbol=It,v.symbolCircle=re,v.symbolCross=ce,v.symbolDiamond=De,v.symbolSquare=st,v.symbolStar=rt,v.symbolTriangle=ye,v.symbolWye=Qe,v.symbols=Pt,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=Xe({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,_x(),LT(),U6()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3)})(Z,function(v,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 c(u){return u.value}function m(u){return(u.y0+u.y1)/2}function p(u){return m(u.source)*u.value}function T(u){return m(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 f=u.get(y);if(!f)throw new Error("missing: "+y);return f}var M=function(){var u=0,y=0,f=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),se(Y),le(Y),fe(Y,U),V(Y),Y}X.update=function(Y){return V(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,f=+Y[0],R=+Y[1],X):[f-u,R-y]},X.extent=function(Y){return arguments.length?(u=+Y[0][0],f=+Y[1][0],y=+Y[0][1],R=+Y[1][1],X):[[u,y],[f,R]]},X.iterations=function(Y){return arguments.length?(U=+Y,X):U};function $(Y){Y.nodes.forEach(function(q,oe){q.index=oe,q.sourceLinks=[],q.targetLinks=[]});var ee=S.map(Y.nodes,F);Y.links.forEach(function(q,oe){q.index=oe;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 se(Y){Y.nodes.forEach(function(ee){ee.value=Math.max(x.sum(ee.sourceLinks,c),x.sum(ee.targetLinks,c))})}function le(Y){var ee,q,oe;for(ee=Y.nodes,q=[],oe=0;ee.length;++oe,ee=q,q=[])ee.forEach(function(j){j.depth=oe,j.sourceLinks.forEach(function(Q){q.indexOf(Q.target)<0&&q.push(Q.target)})});for(ee=Y.nodes,q=[],oe=0;ee.length;++oe,ee=q,q=[])ee.forEach(function(j){j.height=oe,j.targetLinks.forEach(function(Q){q.indexOf(Q.source)<0&&q.push(Q.source)})});var ae=(f-u-L)/(oe-1);Y.nodes.forEach(function(j){j.x1=(j.x0=u+Math.max(0,Math.min(oe-1,Math.floor(N.call(null,j,oe))))*ae)+L})}function fe(Y){var ee=S.nest().key(function(ce){return ce.x0}).sortKeys(x.ascending).entries(Y.nodes).map(function(ce){return ce.values});ae(),re();for(var q=1,oe=U;oe>0;--oe)Q(q*=.99),re(),j(q),re();function ae(){var ce=x.max(ee,function(De){return De.length}),be=B*(R-y)/(ce-1);z>be&&(z=be);var Ae=x.min(ee,function(De){return(R-y-(De.length-1)*z)/x.sum(De,c)});ee.forEach(function(De){De.forEach(function(ze,Ze){ze.y1=(ze.y0=Ze)+ze.value*Ae})}),Y.links.forEach(function(De){De.width=De.value*Ae})}function j(ce){ee.forEach(function(be){be.forEach(function(Ae){if(Ae.targetLinks.length){var De=(x.sum(Ae.targetLinks,p)/x.sum(Ae.targetLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function Q(ce){ee.slice().reverse().forEach(function(be){be.forEach(function(Ae){if(Ae.sourceLinks.length){var De=(x.sum(Ae.sourceLinks,T)/x.sum(Ae.sourceLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function re(){ee.forEach(function(ce){var be,Ae,De=y,ze=ce.length,Ze;for(ce.sort(h),Ze=0;Ze<ze;++Ze)be=ce[Ze],Ae=De-be.y0,Ae>0&&(be.y0+=Ae,be.y1+=Ae),De=be.y1+z;if(Ae=De-z-R,Ae>0)for(De=be.y0-=Ae,be.y1-=Ae,Ze=ze-2;Ze>=0;--Ze)be=ce[Ze],Ae=be.y1+z-De,Ae>0&&(be.y0-=Ae,be.y1-=Ae),De=be.y0})}}function V(Y){Y.nodes.forEach(function(ee){ee.sourceLinks.sort(s),ee.targetLinks.sort(i)}),Y.nodes.forEach(function(ee){var q=ee.y0,oe=q;ee.sourceLinks.forEach(function(ae){ae.y0=q+ae.width/2,q+=ae.width}),ee.targetLinks.forEach(function(ae){ae.y1=oe+ae.width/2,oe+=ae.width})})}return X};function g(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return E.linkHorizontal().source(g).target(b)};v.sankey=M,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),pG=Xe({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,G){var v=N6();G.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 d=o[b];d||(d={},o[b]=d),d[b]=!0}return t.pop(),M}function h(A,M){var g=[].concat(M).concat(A);E?E(s):e.push(g)}function c(A){for(var M=0;M<S.length;M++)M<A&&(S[M]=[]),S[M]=S[M].filter(function(g){return g>=A})}function m(A){c(A);for(var M=S,g=v(M),b=g.components.filter(function(z){return z.length>1}),d=1/0,u,y=0;y<b.length;y++)for(var f=0;f<b[y].length;f++)b[y][f]<d&&(d=b[y][f],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:d,adjList:L}}n=0;for(var p=S.length;n<p;){var T=m(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=p}if(!E)return e}}}),dG=Xe({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,_x(),LT(),U6(),pG()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,null)})(Z,function(v,x,S,E,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function t(ze){return ze.target.depth}function r(ze){return ze.depth}function o(ze,Ze){return Ze-1-ze.height}function a(ze,Ze){return ze.sourceLinks.length?ze.depth:Ze-1}function n(ze){return ze.targetLinks.length?ze.depth:ze.sourceLinks.length?x.min(ze.sourceLinks,t)-1:0}function i(ze){return function(){return ze}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ze){return typeof ze}:function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze};function h(ze,Ze){return m(ze.source,Ze.source)||ze.index-Ze.index}function c(ze,Ze){return m(ze.target,Ze.target)||ze.index-Ze.index}function m(ze,Ze){return ze.partOfCycle===Ze.partOfCycle?ze.y0-Ze.y0:ze.circularLinkType==="top"||Ze.circularLinkType==="bottom"?-1:1}function p(ze){return ze.value}function T(ze){return(ze.y0+ze.y1)/2}function l(ze){return T(ze.source)}function _(ze){return T(ze.target)}function w(ze){return ze.index}function A(ze){return ze.nodes}function M(ze){return ze.links}function g(ze,Ze){var at=ze.get(Ze);if(!at)throw new Error("missing: "+Ze);return at}function b(ze,Ze){return Ze(ze)}var d=25,u=10,y=.3;function f(){var ze=0,Ze=0,at=1,nt=1,rt=24,st,Me=w,ye=a,he=A,Oe=M,tt=32,ot=2,Qe,Pt=null;function It(){var wt={nodes:he.apply(null,arguments),links:Oe.apply(null,arguments)};qt(wt),R(wt,Me,Pt),Wt(wt),qr(wt),L(wt,Me),Sr(wt,tt,Me),Rr(wt);for(var Ne=4,Ke=0;Ke<Ne;Ke++)Q(wt,nt,Me),re(wt,nt,Me),oe(wt,Ze,nt,Me),Q(wt,nt,Me),re(wt,nt,Me);return De(wt,Ze,nt),U(wt,ot,nt,Me),wt}It.nodeId=function(wt){return arguments.length?(Me=typeof wt=="function"?wt:i(wt),It):Me},It.nodeAlign=function(wt){return arguments.length?(ye=typeof wt=="function"?wt:i(wt),It):ye},It.nodeWidth=function(wt){return arguments.length?(rt=+wt,It):rt},It.nodePadding=function(wt){return arguments.length?(st=+wt,It):st},It.nodes=function(wt){return arguments.length?(he=typeof wt=="function"?wt:i(wt),It):he},It.links=function(wt){return arguments.length?(Oe=typeof wt=="function"?wt:i(wt),It):Oe},It.size=function(wt){return arguments.length?(ze=Ze=0,at=+wt[0],nt=+wt[1],It):[at-ze,nt-Ze]},It.extent=function(wt){return arguments.length?(ze=+wt[0][0],at=+wt[1][0],Ze=+wt[0][1],nt=+wt[1][1],It):[[ze,Ze],[at,nt]]},It.iterations=function(wt){return arguments.length?(tt=+wt,It):tt},It.circularLinkGap=function(wt){return arguments.length?(ot=+wt,It):ot},It.nodePaddingRatio=function(wt){return arguments.length?(Qe=+wt,It):Qe},It.sortNodes=function(wt){return arguments.length?(Pt=wt,It):Pt},It.update=function(wt){return L(wt,Me),Rr(wt),wt.links.forEach(function(Ne){Ne.circular&&(Ne.circularLinkType=Ne.y0+Ne.y1<nt?"top":"bottom",Ne.source.circularLinkType=Ne.circularLinkType,Ne.target.circularLinkType=Ne.circularLinkType)}),Q(wt,nt,Me,!1),re(wt,nt,Me),U(wt,ot,nt,Me),wt};function qt(wt){wt.nodes.forEach(function(Ke,Te){Ke.index=Te,Ke.sourceLinks=[],Ke.targetLinks=[]});var Ne=S.map(wt.nodes,Me);return wt.links.forEach(function(Ke,Te){Ke.index=Te;var Ie=Ke.source,Ve=Ke.target;(typeof Ie>"u"?"undefined":s(Ie))!=="object"&&(Ie=Ke.source=g(Ne,Ie)),(typeof Ve>"u"?"undefined":s(Ve))!=="object"&&(Ve=Ke.target=g(Ne,Ve)),Ie.sourceLinks.push(Ke),Ve.targetLinks.push(Ke)}),wt}function Wt(wt){wt.nodes.forEach(function(Ne){Ne.partOfCycle=!1,Ne.value=Math.max(x.sum(Ne.sourceLinks,p),x.sum(Ne.targetLinks,p)),Ne.sourceLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)}),Ne.targetLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)})})}function kr(wt){var Ne=0,Ke=0,Te=0,Ie=0,Ve=x.max(wt.nodes,function(Ce){return Ce.column});return wt.links.forEach(function(Ce){Ce.circular&&(Ce.circularLinkType=="top"?Ne=Ne+Ce.width:Ke=Ke+Ce.width,Ce.target.column==0&&(Ie=Ie+Ce.width),Ce.source.column==Ve&&(Te=Te+Ce.width))}),Ne=Ne>0?Ne+d+u:Ne,Ke=Ke>0?Ke+d+u:Ke,Te=Te>0?Te+d+u:Te,Ie=Ie>0?Ie+d+u:Ie,{top:Ne,bottom:Ke,left:Ie,right:Te}}function mr(wt,Ne){var Ke=x.max(wt.nodes,function(ft){return ft.column}),Te=at-ze,Ie=nt-Ze,Ve=Te+Ne.right+Ne.left,Ce=Ie+Ne.top+Ne.bottom,Ee=Te/Ve,Pe=Ie/Ce;return ze=ze*Ee+Ne.left,at=Ne.right==0?at:at*Ee,Ze=Ze*Pe+Ne.top,nt=nt*Pe,wt.nodes.forEach(function(ft){ft.x0=ze+ft.column*((at-ze-rt)/Ke),ft.x1=ft.x0+rt}),Pe}function qr(wt){var Ne,Ke,Te;for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.depth=Te,Ie.sourceLinks.forEach(function(Ve){Ke.indexOf(Ve.target)<0&&!Ve.circular&&Ke.push(Ve.target)})});for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.height=Te,Ie.targetLinks.forEach(function(Ve){Ke.indexOf(Ve.source)<0&&!Ve.circular&&Ke.push(Ve.source)})});wt.nodes.forEach(function(Ie){Ie.column=Math.floor(ye.call(null,Ie,Te))})}function Sr(wt,Ne,Ke){var Te=S.nest().key(function(ft){return ft.column}).sortKeys(x.ascending).entries(wt.nodes).map(function(ft){return ft.values});Ce(Ke),Pe();for(var Ie=1,Ve=Ne;Ve>0;--Ve)Ee(Ie*=.99,Ke),Pe();function Ce(ft){if(Qe){var ct=1/0;Te.forEach(function(rr){var er=nt*Qe/(rr.length+1);ct=er<ct?er:ct}),st=ct}var _t=x.min(Te,function(rr){return(nt-Ze-(rr.length-1)*st)/x.sum(rr,p)});_t=_t*y,wt.links.forEach(function(rr){rr.width=rr.value*_t});var Ct=kr(wt),ir=mr(wt,Ct);_t=_t*ir,wt.links.forEach(function(rr){rr.width=rr.value*_t}),Te.forEach(function(rr){var er=rr.length;rr.forEach(function(Lr,fa){Lr.depth==Te.length-1&&er==1||Lr.depth==0&&er==1?(Lr.y0=nt/2-Lr.value*_t,Lr.y1=Lr.y0+Lr.value*_t):Lr.partOfCycle?N(Lr,ft)==0?(Lr.y0=nt/2+fa,Lr.y1=Lr.y0+Lr.value*_t):Lr.circularLinkType=="top"?(Lr.y0=Ze+fa,Lr.y1=Lr.y0+Lr.value*_t):(Lr.y0=nt-Lr.value*_t-fa,Lr.y1=Lr.y0+Lr.value*_t):Ct.top==0||Ct.bottom==0?(Lr.y0=(nt-Ze)/er*fa,Lr.y1=Lr.y0+Lr.value*_t):(Lr.y0=(nt-Ze)/2-er/2+fa,Lr.y1=Lr.y0+Lr.value*_t)})})}function Ee(ft,ct){var _t=Te.length;Te.forEach(function(Ct){var ir=Ct.length,rr=Ct[0].depth;Ct.forEach(function(er){var Lr;if((er.sourceLinks.length||er.targetLinks.length)&&!(er.partOfCycle&&N(er,ct)>0))if(rr==0&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else if(rr==_t-1&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else{var fa=0,Da=x.mean(er.sourceLinks,_),Ia=x.mean(er.targetLinks,l);Da&&Ia?fa=(Da+Ia)/2:fa=Da||Ia;var qa=(fa-T(er))*ft;er.y0+=qa,er.y1+=qa}})})}function Pe(){Te.forEach(function(ft){var ct,_t,Ct=Ze,ir=ft.length,rr;for(ft.sort(m),rr=0;rr<ir;++rr)ct=ft[rr],_t=Ct-ct.y0,_t>0&&(ct.y0+=_t,ct.y1+=_t),Ct=ct.y1+st;if(_t=Ct-st-nt,_t>0)for(Ct=ct.y0-=_t,ct.y1-=_t,rr=ir-2;rr>=0;--rr)ct=ft[rr],_t=ct.y1+st-Ct,_t>0&&(ct.y0-=_t,ct.y1-=_t),Ct=ct.y0})}}function Rr(wt){wt.nodes.forEach(function(Ne){Ne.sourceLinks.sort(c),Ne.targetLinks.sort(h)}),wt.nodes.forEach(function(Ne){var Ke=Ne.y0,Te=Ke,Ie=Ne.y1,Ve=Ie;Ne.sourceLinks.forEach(function(Ce){Ce.circular?(Ce.y0=Ie-Ce.width/2,Ie=Ie-Ce.width):(Ce.y0=Ke+Ce.width/2,Ke+=Ce.width)}),Ne.targetLinks.forEach(function(Ce){Ce.circular?(Ce.y1=Ve-Ce.width/2,Ve=Ve-Ce.width):(Ce.y1=Te+Ce.width/2,Te+=Ce.width)})})}return It}function R(ze,Ze,at){var nt=0;if(at===null){for(var rt=[],st=0;st<ze.links.length;st++){var Me=ze.links[st],ye=Me.source.index,he=Me.target.index;rt[ye]||(rt[ye]=[]),rt[he]||(rt[he]=[]),rt[ye].indexOf(he)===-1&&rt[ye].push(he)}var Oe=e(rt);Oe.sort(function(Pt,It){return Pt.length-It.length});var tt={};for(st=0;st<Oe.length;st++){var ot=Oe[st],Qe=ot.slice(-2);tt[Qe[0]]||(tt[Qe[0]]={}),tt[Qe[0]][Qe[1]]=!0}ze.links.forEach(function(Pt){var It=Pt.target.index,qt=Pt.source.index;It===qt||tt[qt]&&tt[qt][It]?(Pt.circular=!0,Pt.circularLinkID=nt,nt=nt+1):Pt.circular=!1})}else ze.links.forEach(function(Pt){Pt.source[at]<Pt.target[at]?Pt.circular=!1:(Pt.circular=!0,Pt.circularLinkID=nt,nt=nt+1)})}function L(ze,Ze){var at=0,nt=0;ze.links.forEach(function(rt){rt.circular&&(rt.source.circularLinkType||rt.target.circularLinkType?rt.circularLinkType=rt.source.circularLinkType?rt.source.circularLinkType:rt.target.circularLinkType:rt.circularLinkType=at<nt?"top":"bottom",rt.circularLinkType=="top"?at=at+1:nt=nt+1,ze.nodes.forEach(function(st){(b(st,Ze)==b(rt.source,Ze)||b(st,Ze)==b(rt.target,Ze))&&(st.circularLinkType=rt.circularLinkType)}))}),ze.links.forEach(function(rt){rt.circular&&(rt.source.circularLinkType==rt.target.circularLinkType&&(rt.circularLinkType=rt.source.circularLinkType),Ae(rt,Ze)&&(rt.circularLinkType=rt.source.circularLinkType))})}function z(ze){var Ze=Math.abs(ze.y1-ze.y0),at=Math.abs(ze.target.x0-ze.source.x1);return Math.atan(at/Ze)}function F(ze,Ze){return ze.source.column<Ze.target.column?!1:!(ze.target.column>Ze.source.column)}function N(ze,Ze){var at=0;ze.sourceLinks.forEach(function(rt){at=rt.circular&&!Ae(rt,Ze)?at+1:at});var nt=0;return ze.targetLinks.forEach(function(rt){nt=rt.circular&&!Ae(rt,Ze)?nt+1:nt}),at+nt}function O(ze){var Ze=ze.source.sourceLinks,at=0;Ze.forEach(function(st){at=st.circular?at+1:at});var nt=ze.target.targetLinks,rt=0;return nt.forEach(function(st){rt=st.circular?rt+1:rt}),!(at>1||rt>1)}function P(ze,Ze,at){return ze.sort(X),ze.forEach(function(nt,rt){var st=0;if(Ae(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=st+nt.width/2;else{var Me=0;for(Me;Me<rt;Me++)if(F(ze[rt],ze[Me])){var ye=ze[Me].circularPathData.verticalBuffer+ze[Me].width/2+Ze;st=ye>st?ye:st}nt.circularPathData.verticalBuffer=st+nt.width/2}}),ze}function U(ze,Ze,at,nt){var rt=5,st=x.min(ze.links,function(he){return he.source.y0});ze.links.forEach(function(he){he.circular&&(he.circularPathData={})});var Me=ze.links.filter(function(he){return he.circularLinkType=="top"});P(Me,Ze,nt);var ye=ze.links.filter(function(he){return he.circularLinkType=="bottom"});P(ye,Ze,nt),ze.links.forEach(function(he){if(he.circular){if(he.circularPathData.arcRadius=he.width+u,he.circularPathData.leftNodeBuffer=rt,he.circularPathData.rightNodeBuffer=rt,he.circularPathData.sourceWidth=he.source.x1-he.source.x0,he.circularPathData.sourceX=he.source.x0+he.circularPathData.sourceWidth,he.circularPathData.targetX=he.target.x0,he.circularPathData.sourceY=he.y0,he.circularPathData.targetY=he.y1,Ae(he,nt)&&O(he))he.circularPathData.leftSmallArcRadius=u+he.width/2,he.circularPathData.leftLargeArcRadius=u+he.width/2,he.circularPathData.rightSmallArcRadius=u+he.width/2,he.circularPathData.rightLargeArcRadius=u+he.width/2,he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=he.source.y1+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=he.source.y0-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius);else{var Oe=he.source.column,tt=he.circularLinkType,ot=ze.links.filter(function(It){return It.source.column==Oe&&It.circularLinkType==tt});he.circularLinkType=="bottom"?ot.sort(se):ot.sort($);var Qe=0;ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.leftSmallArcRadius=u+he.width/2+Qe,he.circularPathData.leftLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),Oe=he.target.column,ot=ze.links.filter(function(It){return It.target.column==Oe&&It.circularLinkType==tt}),he.circularLinkType=="bottom"?ot.sort(fe):ot.sort(le),Qe=0,ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.rightSmallArcRadius=u+he.width/2+Qe,he.circularPathData.rightLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=Math.max(at,he.source.y1,he.target.y1)+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=st-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius)}he.circularPathData.leftInnerExtent=he.circularPathData.sourceX+he.circularPathData.leftNodeBuffer,he.circularPathData.rightInnerExtent=he.circularPathData.targetX-he.circularPathData.rightNodeBuffer,he.circularPathData.leftFullExtent=he.circularPathData.sourceX+he.circularPathData.leftLargeArcRadius+he.circularPathData.leftNodeBuffer,he.circularPathData.rightFullExtent=he.circularPathData.targetX-he.circularPathData.rightLargeArcRadius-he.circularPathData.rightNodeBuffer}if(he.circular)he.path=B(he);else{var Pt=E.linkHorizontal().source(function(It){var qt=It.source.x0+(It.source.x1-It.source.x0),Wt=It.y0;return[qt,Wt]}).target(function(It){var qt=It.target.x0,Wt=It.y1;return[qt,Wt]});he.path=Pt(he)}})}function B(ze){var Ze="";return ze.circularLinkType=="top"?Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 0 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY-ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 0 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 0 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY-ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 0 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY:Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 1 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY+ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 1 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 1 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY+ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 1 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY,Ze}function X(ze,Ze){return V(ze)==V(Ze)?ze.circularLinkType=="bottom"?se(ze,Ze):$(ze,Ze):V(Ze)-V(ze)}function $(ze,Ze){return ze.y0-Ze.y0}function se(ze,Ze){return Ze.y0-ze.y0}function le(ze,Ze){return ze.y1-Ze.y1}function fe(ze,Ze){return Ze.y1-ze.y1}function V(ze){return ze.target.column-ze.source.column}function Y(ze){return ze.target.x0-ze.source.x1}function ee(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1+nt:ze.y1-nt;return rt}function q(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1-nt:ze.y1+nt;return rt}function oe(ze,Ze,at,nt){ze.links.forEach(function(rt){if(!rt.circular&&rt.target.column-rt.source.column>1){var st=rt.source.column+1,Me=rt.target.column-1,ye=1,he=Me-st+1;for(ye=1;st<=Me;st++,ye++)ze.nodes.forEach(function(Oe){if(Oe.column==st){var tt=ye/(he+1),ot=Math.pow(1-tt,3),Qe=3*tt*Math.pow(1-tt,2),Pt=3*Math.pow(tt,2)*(1-tt),It=Math.pow(tt,3),qt=ot*rt.y0+Qe*rt.y0+Pt*rt.y1+It*rt.y1,Wt=qt-rt.width/2,kr=qt+rt.width/2,mr;Wt>Oe.y0&&Wt<Oe.y1?(mr=Oe.y1-Wt+10,mr=Oe.circularLinkType=="bottom"?mr:-mr,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||ae(Oe,qr)&&j(qr,mr,Ze,at)})):kr>Oe.y0&&kr<Oe.y1?(mr=kr-Oe.y0+10,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||qr.y0<Oe.y1&&qr.y1>Oe.y1&&j(qr,mr,Ze,at)})):Wt<Oe.y0&&kr>Oe.y1&&(mr=kr-Oe.y0+10,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||qr.y0<Oe.y1&&qr.y1>Oe.y1&&j(qr,mr,Ze,at)}))}})}})}function ae(ze,Ze){return ze.y0>Ze.y0&&ze.y0<Ze.y1||ze.y1>Ze.y0&&ze.y1<Ze.y1?!0:ze.y0<Ze.y0&&ze.y1>Ze.y1}function j(ze,Ze,at,nt){return ze.y0+Ze>=at&&ze.y1+Ze<=nt&&(ze.y0=ze.y0+Ze,ze.y1=ze.y1+Ze,ze.targetLinks.forEach(function(rt){rt.y1=rt.y1+Ze}),ze.sourceLinks.forEach(function(rt){rt.y0=rt.y0+Ze})),ze}function Q(ze,Ze,at,nt){ze.nodes.forEach(function(rt){nt&&rt.y+(rt.y1-rt.y0)>Ze&&(rt.y=rt.y-(rt.y+(rt.y1-rt.y0)-Ze));var st=ze.links.filter(function(he){return b(he.source,at)==b(rt,at)}),Me=st.length;Me>1&&st.sort(function(he,Oe){if(!he.circular&&!Oe.circular){if(he.target.column==Oe.target.column)return he.y1-Oe.y1;if(ce(he,Oe)){if(he.target.column>Oe.target.column){var tt=q(Oe,he);return he.y1-tt}if(Oe.target.column>he.target.column){var ot=q(he,Oe);return ot-Oe.y1}}else return he.y1-Oe.y1}if(he.circular&&!Oe.circular)return he.circularLinkType=="top"?-1:1;if(Oe.circular&&!he.circular)return Oe.circularLinkType=="top"?1:-1;if(he.circular&&Oe.circular)return he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="top"?he.target.column===Oe.target.column?he.target.y1-Oe.target.y1:Oe.target.column-he.target.column:he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="bottom"?he.target.column===Oe.target.column?Oe.target.y1-he.target.y1:he.target.column-Oe.target.column:he.circularLinkType=="top"?-1:1});var ye=rt.y0;st.forEach(function(he){he.y0=ye+he.width/2,ye=ye+he.width}),st.forEach(function(he,Oe){if(he.circularLinkType=="bottom"){var tt=Oe+1,ot=0;for(tt;tt<Me;tt++)ot=ot+st[tt].width;he.y0=rt.y1-ot-he.width/2}})})}function re(ze,Ze,at){ze.nodes.forEach(function(nt){var rt=ze.links.filter(function(ye){return b(ye.target,at)==b(nt,at)}),st=rt.length;st>1&&rt.sort(function(ye,he){if(!ye.circular&&!he.circular){if(ye.source.column==he.source.column)return ye.y0-he.y0;if(ce(ye,he)){if(he.source.column<ye.source.column){var Oe=ee(he,ye);return ye.y0-Oe}if(ye.source.column<he.source.column){var tt=ee(ye,he);return tt-he.y0}}else return ye.y0-he.y0}if(ye.circular&&!he.circular)return ye.circularLinkType=="top"?-1:1;if(he.circular&&!ye.circular)return he.circularLinkType=="top"?1:-1;if(ye.circular&&he.circular)return ye.circularLinkType===he.circularLinkType&&ye.circularLinkType=="top"?ye.source.column===he.source.column?ye.source.y1-he.source.y1:ye.source.column-he.source.column:ye.circularLinkType===he.circularLinkType&&ye.circularLinkType=="bottom"?ye.source.column===he.source.column?ye.source.y1-he.source.y1:he.source.column-ye.source.column:ye.circularLinkType=="top"?-1:1});var Me=nt.y0;rt.forEach(function(ye){ye.y1=Me+ye.width/2,Me=Me+ye.width}),rt.forEach(function(ye,he){if(ye.circularLinkType=="bottom"){var Oe=he+1,tt=0;for(Oe;Oe<st;Oe++)tt=tt+rt[Oe].width;ye.y1=nt.y1-tt-ye.width/2}})})}function ce(ze,Ze){return be(ze)==be(Ze)}function be(ze){return ze.y0-ze.y1>0?"up":"down"}function Ae(ze,Ze){return b(ze.source,Ze)==b(ze.target,Ze)}function De(ze,Ze,at){var nt=ze.nodes,rt=ze.links,st=!1,Me=!1;if(rt.forEach(function(Qe){Qe.circularLinkType=="top"?st=!0:Qe.circularLinkType=="bottom"&&(Me=!0)}),st==!1||Me==!1){var ye=x.min(nt,function(Qe){return Qe.y0}),he=x.max(nt,function(Qe){return Qe.y1}),Oe=he-ye,tt=at-Ze,ot=tt/Oe;nt.forEach(function(Qe){var Pt=(Qe.y1-Qe.y0)*ot;Qe.y0=(Qe.y0-ye)*ot,Qe.y1=Qe.y0+Pt}),rt.forEach(function(Qe){Qe.y0=(Qe.y0-ye)*ot,Qe.y1=(Qe.y1-ye)*ot,Qe.width=Qe.width*ot})}}v.sankeyCircular=f,v.sankeyCenter=n,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=Xe({"src/traces/sankey/constants.js"(Z,G){"use strict";G.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"}}}}),vG=Xe({"src/traces/sankey/render.js"(Z,G){"use strict";var v=cG(),x=(pg(),zf(p0)).interpolateNumber,S=Hn(),E=hG(),e=dG(),t=j6(),r=Ch(),o=$n(),a=es(),n=sa(),i=n.strTranslate,s=n.strRotate,h=kv(),c=h.keyFun,m=h.repeat,p=h.unwrap,T=ou(),l=so(),_=uh(),w=_.CAP_SHIFT,A=_.LINE_SPACING,M=3;function g(ee,q,oe){var ae=p(q),j=ae.trace,Q=j.domain,re=j.orientation==="h",ce=j.node.pad,be=j.node.thickness,Ae={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[j.node.align],De=ee.width*(Q.x[1]-Q.x[0]),ze=ee.height*(Q.y[1]-Q.y[0]),Ze=ae._nodes,at=ae._links,nt=ae.circular,rt;nt?rt=e.sankeyCircular().circularLinkGap(0):rt=E.sankey(),rt.iterations(t.sankeyIterations).size(re?[De,ze]:[ze,De]).nodeWidth(be).nodePadding(ce).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Ae).nodes(Ze).links(at);var st=rt();rt.nodePadding()<ce&&n.warn("node.pad was reduced to ",rt.nodePadding()," to fit within the figure.");var Me,ye,he;for(var Oe in ae._groupLookup){var tt=parseInt(ae._groupLookup[Oe]),ot;for(Me=0;Me<st.nodes.length;Me++)if(st.nodes[Me].pointNumber===tt){ot=st.nodes[Me];break}if(ot){var Qe={pointNumber:parseInt(Oe),x0:ot.x0,x1:ot.x1,y0:ot.y0,y1:ot.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};st.nodes.unshift(Qe),ot.childrenNodes.unshift(Qe)}}function Pt(){for(Me=0;Me<st.nodes.length;Me++){var qr=st.nodes[Me],Sr={},Rr,wt;for(ye=0;ye<qr.targetLinks.length;ye++)wt=qr.targetLinks[ye],Rr=wt.source.pointNumber+":"+wt.target.pointNumber,Sr.hasOwnProperty(Rr)||(Sr[Rr]=[]),Sr[Rr].push(wt);var Ne=Object.keys(Sr);for(ye=0;ye<Ne.length;ye++){Rr=Ne[ye];var Ke=Sr[Rr],Te=0,Ie={};for(he=0;he<Ke.length;he++)wt=Ke[he],Ie[wt.label]||(Ie[wt.label]=0),Ie[wt.label]+=wt.value,Te+=wt.value;for(he=0;he<Ke.length;he++)wt=Ke[he],wt.flow={value:Te,labelConcentration:Ie[wt.label]/Te,concentration:wt.value/Te,links:Ke},wt.concentrationscale&&(wt.color=r(wt.concentrationscale(wt.flow.labelConcentration)))}var Ve=0;for(ye=0;ye<qr.sourceLinks.length;ye++)Ve+=qr.sourceLinks[ye].value;for(ye=0;ye<qr.sourceLinks.length;ye++)wt=qr.sourceLinks[ye],wt.concentrationOut=wt.value/Ve;var Ce=0;for(ye=0;ye<qr.targetLinks.length;ye++)Ce+=qr.targetLinks[ye].value;for(ye=0;ye<qr.targetLinks.length;ye++)wt=qr.targetLinks[ye],wt.concenrationIn=wt.value/Ce}}Pt();function It(qr){qr.forEach(function(Sr){var Rr,wt,Ne=0,Ke=Sr.length,Te;for(Sr.sort(function(Ie,Ve){return Ie.y0-Ve.y0}),Te=0;Te<Ke;++Te)Rr=Sr[Te],Rr.y0>=Ne||(wt=Ne-Rr.y0,wt>1e-6&&(Rr.y0+=wt,Rr.y1+=wt)),Ne=Rr.y1+ce})}function qt(qr){var Sr=qr.map(function(Ve,Ce){return{x0:Ve.x0,index:Ce}}).sort(function(Ve,Ce){return Ve.x0-Ce.x0}),Rr=[],wt=-1,Ne,Ke=-1/0,Te;for(Me=0;Me<Sr.length;Me++){var Ie=qr[Sr[Me].index];Ie.x0>Ke+be&&(wt+=1,Ne=Ie.x0),Ke=Ie.x0,Rr[wt]||(Rr[wt]=[]),Rr[wt].push(Ie),Te=Ne-Ie.x0,Ie.x0+=Te,Ie.x1+=Te}return Rr}if(j.node.x.length&&j.node.y.length){for(Me=0;Me<Math.min(j.node.x.length,j.node.y.length,st.nodes.length);Me++)if(j.node.x[Me]&&j.node.y[Me]){var Wt=[j.node.x[Me]*De,j.node.y[Me]*ze];st.nodes[Me].x0=Wt[0]-be/2,st.nodes[Me].x1=Wt[0]+be/2;var kr=st.nodes[Me].y1-st.nodes[Me].y0;st.nodes[Me].y0=Wt[1]-kr/2,st.nodes[Me].y1=Wt[1]+kr/2}if(j.arrangement==="snap"){Ze=st.nodes;var mr=qt(Ze);It(mr)}rt.update(st)}return{circular:nt,key:oe,trace:j,guid:n.randstr(),horizontal:re,width:De,height:ze,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?ze:De,dragPerpendicular:re?De:ze,arrangement:j.arrangement,sankey:rt,graph:st,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(ee,q,oe){var ae=r(q.color),j=r(q.hovercolor),Q=q.source.label+"|"+q.target.label,re=Q+"__"+oe;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 d(ee,q){var oe="",ae=ee.width/2,j=ee.circularPathData,Q=j.sourceX+j.verticalBuffer<j.targetX,re=j.rightFullExtent-j.rightLargeArcRadius-q<=j.leftFullExtent-ae,ce=Math.abs(j.rightFullExtent-j.leftFullExtent-ae)<ae;return ee.circularLinkType==="top"?(oe="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?oe+=" 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?oe+=" 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:oe+=" 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,oe+=" 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?oe+=" 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?oe+=" 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:oe+=" 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,oe+=" 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"):(oe="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?oe+=" 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?oe+=" 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:oe+=" 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,oe+=" 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?oe+=" 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?oe+=" 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:oe+=" 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,oe+=" 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"),oe}function u(){var ee=.5;function q(oe){var ae=oe.linkArrowLength;if(oe.link.circular)return d(oe.link,ae);var j=Math.abs((oe.link.target.x0-oe.link.source.x1)/2);ae>j&&(ae=j);var Q=oe.link.source.x1,re=oe.link.target.x0-ae,ce=x(Q,re),be=ce(ee),Ae=ce(1-ee),De=oe.link.y0-oe.link.width/2,ze=oe.link.y0+oe.link.width/2,Ze=oe.link.y1-oe.link.width/2,at=oe.link.y1+oe.link.width/2,nt="M"+Q+","+De,rt="C"+be+","+De+" "+Ae+","+Ze+" "+re+","+Ze,st="C"+Ae+","+at+" "+be+","+ze+" "+Q+","+ze,Me=ae>0?"L"+(re+ae)+","+(Ze+oe.link.width/2):"";return Me+="L"+re+","+at,nt+rt+Me+st+"Z"}return q}function y(ee,q){var oe=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),ce="node_"+q.pointNumber;return q.group&&(ce=n.randstr()),q.trace=ee.trace,q.curveNumber=ee.trace.index,{index:q.pointNumber,key:ce,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:oe.getBrightness()<=128,tinyColorHue:o.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,ce].join("_"),interactionState:ee.interactionState,figure:ee}}function f(ee){ee.attr("transform",function(q){return i(q.node.x0.toFixed(3),q.node.y0.toFixed(3))})}function R(ee){ee.call(f)}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,oe){ee.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.hover(this,ae,q),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&oe.select(this,ae,q)})}function P(ee,q,oe,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(ce){ae._fullLayout._dragCover=ce}),n.raiseToTop(this),Q.interactionState.dragInProgress=Q.node,le(Q.node),Q.interactionState.hovered&&(oe.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,ce=S.event.y;Q.arrangement==="snap"?(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2,Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2):(Q.arrangement==="freeform"&&(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2),ce=Math.max(0,Math.min(Q.size-Q.visibleHeight/2,ce)),Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2),le(Q.node),Q.arrangement!=="snap"&&(Q.sankey.update(Q.graph),L(ee.filter(fe(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,oe,ae){V(oe.graph.nodes);var j=oe.graph.nodes.filter(function(Q){return Q.originalX===oe.node.originalX}).filter(function(Q){return!Q.partOfGroup});oe.forceLayouts[q]=v.forceSimulation(j).alphaDecay(0).force("collide",v.forceCollide().radius(function(Q){return Q.dy/2+oe.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",X(ee,q,j,oe,ae)).stop()}function B(ee,q,oe,ae,j){window.requestAnimationFrame(function Q(){var re;for(re=0;re<t.forceTicksPerFrame;re++)oe.forceLayouts[ae].tick();var ce=oe.graph.nodes;if(Y(ce),oe.sankey.update(oe.graph),L(ee.filter(fe(oe)),q),oe.forceLayouts[ae].alpha()>0)window.requestAnimationFrame(Q);else{var be=oe.node.originalX;oe.node.x0=be-oe.visibleWidth/2,oe.node.x1=be+oe.visibleWidth/2,$(oe,j)}})}function X(ee,q,oe,ae){return function(){for(var Q=0,re=0;re<oe.length;re++){var ce=oe[re];ce===ae.interactionState.dragInProgress?(ce.x=ce.lastDraggedX,ce.y=ce.lastDraggedY):(ce.vx=(ce.originalX-ce.x)/t.forceTicksPerFrame,ce.y=Math.min(ae.size-ce.dy/2,Math.max(ce.dy/2,ce.y))),Q=Math.max(Q,Math.abs(ce.vx),Math.abs(ce.vy))}!ae.interactionState.dragInProgress&&Q<.1&&ae.forceLayouts[q].alpha()>0&&ae.forceLayouts[q].alpha(0)}}function $(ee,q){for(var oe=[],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;oe.push(Q/ee.figure.width),ae.push(re/ee.figure.height)}l.call("_guiRestyle",q,{"node.x":[oe],"node.y":[ae]},ee.trace.index).then(function(){q._fullLayout._dragCover&&q._fullLayout._dragCover.remove()})}function se(ee){var q=[],oe;for(oe=0;oe<ee.length;oe++)ee[oe].originalX=(ee[oe].x0+ee[oe].x1)/2,ee[oe].originalY=(ee[oe].y0+ee[oe].y1)/2,q.indexOf(ee[oe].originalX)===-1&&q.push(ee[oe].originalX);for(q.sort(function(ae,j){return ae-j}),oe=0;oe<ee.length;oe++)ee[oe].originalLayerIndex=q.indexOf(ee[oe].originalX),ee[oe].originalLayer=ee[oe].originalLayerIndex/(q.length-1)}function le(ee){ee.lastDraggedX=ee.x0+ee.dx/2,ee.lastDraggedY=ee.y0+ee.dy/2}function fe(ee){return function(q){return q.node.originalX===ee.node.originalX}}function V(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}G.exports=function(ee,q,oe,ae,j){var Q=ee._context.staticPlot,re=!1;n.ensureSingle(ee._fullLayout._infolayer,"g","first-render",function(){re=!0});var ce=ee._fullLayout._dragCover,be=oe.filter(function(st){return p(st).trace.visible}).map(g.bind(null,ae)),Ae=q.selectAll("."+t.cn.sankey).data(be,c);Ae.exit().remove(),Ae.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),Ae.each(function(st,Me){ee._fullData[Me]._sankey=st;var ye="bgsankey-"+st.trace.uid+"-"+Me;n.ensureSingle(ee._fullLayout._draggers,"rect",ye),ee._fullData[Me]._bgRect=S.select("."+ye),ee._fullData[Me]._bgRect.style("pointer-events",Q?"none":"all").attr("width",st.width).attr("height",st.height).attr("x",st.translateX).attr("y",st.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Ae.transition().ease(t.ease).duration(t.duration).attr("transform",N);var De=Ae.selectAll("."+t.cn.sankeyLinks).data(m,c);De.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var ze=De.selectAll("."+t.cn.sankeyLink).data(function(st){var Me=st.graph.links;return Me.filter(function(ye){return ye.value}).map(b.bind(null,st))},c);ze.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Ae,j.linkEvents),ze.style("stroke",function(st){return F(st)?o.tinyRGB(r(st.linkLineColor)):st.tinyColorHue}).style("stroke-opacity",function(st){return F(st)?o.opacity(st.linkLineColor):st.tinyColorAlpha}).style("fill",function(st){return st.tinyColorHue}).style("fill-opacity",function(st){return st.tinyColorAlpha}).style("stroke-width",function(st){return F(st)?st.linkLineWidth:1}).attr("d",u()),ze.style("opacity",function(){return ee._context.staticPlot||re||ce?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),ze.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var Ze=Ae.selectAll("."+t.cn.sankeyNodeSet).data(m,c);Ze.enter().append("g").classed(t.cn.sankeyNodeSet,!0),Ze.style("cursor",function(st){switch(st.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var at=Ze.selectAll("."+t.cn.sankeyNode).data(function(st){var Me=st.graph.nodes;return se(Me),Me.map(y.bind(null,st))},c);at.enter().append("g").classed(t.cn.sankeyNode,!0).call(f).style("opacity",function(st){return(ee._context.staticPlot||re)&&!st.partOfGroup?1:0}),at.call(O,Ae,j.nodeEvents).call(P,ze,j,ee),at.transition().ease(t.ease).duration(t.duration).call(f).style("opacity",function(st){return st.partOfGroup?0:1}),at.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var nt=at.selectAll("."+t.cn.nodeRect).data(m);nt.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),nt.style("stroke-width",function(st){return st.nodeLineWidth}).style("stroke",function(st){return o.tinyRGB(r(st.nodeLineColor))}).style("stroke-opacity",function(st){return o.opacity(st.nodeLineColor)}).style("fill",function(st){return st.tinyColorHue}).style("fill-opacity",function(st){return st.tinyColorAlpha}),nt.transition().ease(t.ease).duration(t.duration).call(z);var rt=at.selectAll("."+t.cn.nodeLabel).data(m);rt.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),rt.attr("data-notex",1).text(function(st){return st.node.label}).each(function(st){var Me=S.select(this);a.font(Me,st.textFont),T.convertToTspans(Me,ee)}).attr("text-anchor",function(st){return st.horizontal&&st.left?"end":"start"}).attr("transform",function(st){var Me=S.select(this),ye=T.lineCount(Me),he=st.textFont.size*((ye-1)*A-w),Oe=st.nodeLineWidth/2+M,tt=((st.horizontal?st.visibleHeight:st.visibleWidth)-he)/2;st.horizontal&&(st.left?Oe=-Oe:Oe+=st.visibleWidth);var ot=st.horizontal?"":"scale(-1,1)"+s(90);return i(st.horizontal?Oe:tt,st.horizontal?tt:Oe)+ot}),rt.transition().ease(t.ease).duration(t.duration)}}}),q6=Xe({"src/traces/sankey/plot.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=x.numberFormat,E=vG(),e=rf(),t=$n(),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){v.select(w).select("path").style("fill-opacity",A),v.select(w).select("rect").style("fill-opacity",A)}function s(w){v.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 c(w){return function(A){return A.node.sourceLinks.indexOf(w.link)!==-1||A.node.targetLinks.indexOf(w.link)!==-1}}function m(w,A,M){A&&M&&n(M,A).selectAll("."+r.sankeyLink).filter(h(A)).call(T.bind(0,A,M,!1))}function p(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 d=b.link.label;d!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===d}).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(c(w)).call(m)}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 d=b.link.label;d!==""&&n(A,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===d}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),M&&n(A,w).selectAll(r.sankeyNode).filter(c(w)).call(p)}function _(w,A){var M=w.hoverlabel||{},g=x.nestedProperty(M,A).get();return Array.isArray(g)?!1:g}G.exports=function(A,M){for(var g=A._fullLayout,b=g._paper,d=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 f=function(le,fe){var V=fe.link;V.originalEvent=v.event,A._hoverdata=[V],e.click(A,{target:!0})},R=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(T.bind(0,fe,V,!0)),fe.link.trace.link.hoverinfo!=="skip"&&(fe.link.fullData=fe.link.trace,A.emit("plotly_hover",{event:v.event,points:[fe.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(le,fe){if(A._fullLayout.hovermode===!1)return;var V=fe.link.trace.link;if(V.hoverinfo==="none"||V.hoverinfo==="skip")return;var Y=[];function ee(ce){var be,Ae;ce.circular?(be=(ce.circularPathData.leftInnerExtent+ce.circularPathData.rightInnerExtent)/2,Ae=ce.circularPathData.verticalFullExtent):(be=(ce.source.x1+ce.target.x0)/2,Ae=(ce.y0+ce.y1)/2);var De=[be,Ae];return ce.trace.orientation==="v"&&De.reverse(),De[0]+=fe.parent.translateX,De[1]+=fe.parent.translateY,De}for(var q=0,oe=0;oe<fe.flow.links.length;oe++){var ae=fe.flow.links[oe];if(!(A._fullLayout.hovermode==="closest"&&fe.link.pointNumber!==ae.pointNumber)){fe.link.pointNumber===ae.pointNumber&&(q=oe),ae.fullData=ae.trace,V=fe.link.trace.link;var j=ee(ae),Q={valueLabel:S(fe.valueFormat)(ae.value)+fe.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:_(V,"bgcolor")||t.addOpacity(ae.color,1),borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:v.event.x<j[0]?"right":"left",hovertemplate:V.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 ce=this;fe.link.concentrationscale||i(ce,.65),s(ce)})},U=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(l.bind(0,fe,V,!0)),fe.link.trace.link.hoverinfo!=="skip"&&(fe.link.fullData=fe.link.trace,A.emit("plotly_unhover",{event:v.event,points:[fe.link]})),e.loneUnhover(g._hoverlayer.node()))},B=function(le,fe,V){var Y=fe.node;Y.originalEvent=v.event,A._hoverdata=[Y],v.select(le).call(p,fe,V),e.click(A,{target:!0})},X=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(m,fe,V),fe.node.trace.node.hoverinfo!=="skip"&&(fe.node.fullData=fe.node.trace,A.emit("plotly_hover",{event:v.event,points:[fe.node]})))},$=function(le,fe){if(A._fullLayout.hovermode!==!1){var V=fe.node.trace.node;if(!(V.hoverinfo==="none"||V.hoverinfo==="skip")){var Y=v.select(le).select("."+r.nodeRect),ee=A._fullLayout._paperdiv.node().getBoundingClientRect(),q=Y.node().getBoundingClientRect(),oe=q.left-2-ee.left,ae=q.right+2-ee.left,j=q.top+q.height/4-ee.top,Q={valueLabel:S(fe.valueFormat)(fe.node.value)+fe.valueSuffix};fe.node.fullData=fe.node.trace,A._fullLayout._calcInverseTransform(A);var re=A._fullLayout._invScaleX,ce=A._fullLayout._invScaleY,be=e.loneHover({x0:re*oe,x1:re*ae,y:ce*j,name:S(fe.valueFormat)(fe.node.value)+fe.valueSuffix,text:[fe.node.label,N+fe.node.targetLinks.length,O+fe.node.sourceLinks.length].filter(a).join("<br>"),color:_(V,"bgcolor")||fe.tinyColorHue,borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:Q,eventData:[fe.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(be,.85),s(be)}}},se=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(p,fe,V),fe.node.trace.node.hoverinfo!=="skip"&&(fe.node.fullData=fe.node.trace,A.emit("plotly_unhover",{event:v.event,points:[fe.node]})),e.loneUnhover(g._hoverlayer.node()))};E(A,b,M,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:R,follow:P,unhover:U,select:f},nodeEvents:{hover:X,follow:$,unhover:se,select:B}})}}}),mG=Xe({"src/traces/sankey/base_plot.js"(Z){"use strict";var G=pc().overrideAll,v=Hh().getModuleCalcData,x=q6(),S=Zm(),E=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=G({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(i){var s=v(i.calcdata,a)[0];x(i,s),Z.updateFx(i)},Z.clean=function(i,s,h,c){var m=c._has&&c._has(a),p=s._has&&s._has(a);m&&!p&&(c._paperdiv.selectAll(".sankey").remove(),c._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],c=i._fullLayout,m=c.dragmode,p=c.dragmode==="pan"?"move":"crosshair",T=h._bgRect;if(T&&!(m==="pan"||m==="zoom")){E(T,p);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(),d=[];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 f=u(A[y].pointNumber);if(f)if(f.group){for(var R=0;R<f.childrenNodes.length;R++)d.push(f.childrenNodes[R].pointNumber);b[f.pointNumber-M.node._count]=!1}else d.push(f.pointNumber)}g=b.filter(Boolean).concat([d]),o.call("_guiRestyle",i,{"node.groups":[g]},s)}};w.prepFn=function(A,M,g){t(A,M,g,w,m)},e.init(w)}}}}),gG=Xe({"src/traces/sankey/select.js"(Z,G){"use strict";G.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}}}),yG=Xe({"src/traces/sankey/index.js"(Z,G){"use strict";G.exports={attributes:B6(),supplyDefaults:nG(),calc:oG(),plot:q6(),moduleType:"trace",name:"sankey",basePlotModule:mG(),selectPoints:gG(),categories:["noOpacity"],meta:{}}}}),_G=Xe({"lib/sankey.js"(Z,G){"use strict";G.exports=yG()}}),xG=Xe({"src/traces/indicator/base_plot.js"(Z){"use strict";var G=bc();Z.name="indicator",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),V6=Xe({"src/traces/indicator/attributes.js"(Z,G){"use strict";var v=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"},c=o("step",x({},s,{range:h}));G.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:v({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:n("value")},font:v({},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:v({},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:v({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:v({},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:c,threshold:{line:{color:v({},s.line.color,{}),width:v({},s.line.width,{dflt:1}),editType:"plot"},thickness:v({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),G6=Xe({"src/traces/indicator/constants.js"(Z,G){"use strict";G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),bG=Xe({"src/traces/indicator/defaults.js"(Z,G){"use strict";var v=sa(),x=V6(),S=wc().defaults,E=zl(),e=hp(),t=G6(),r=Y0(),o=t1(),a=Qm(),n=e0();function i(h,c,m,p){function T(P,U){return v.coerce(h,c,x,P,U)}S(c,p,T),T("mode"),c._hasNumber=c.mode.indexOf("number")!==-1,c._hasDelta=c.mode.indexOf("delta")!==-1,c._hasGauge=c.mode.indexOf("gauge")!==-1;var l=T("value");c._range=[0,typeof l=="number"?1.5*l:1];var _=new Array(2),w;if(c._hasNumber){T("number.valueformat");var A=v.extendFlat({},p.font);A.size=void 0,v.coerceFont(T,"number.font",A),c.number.font.size===void 0&&(c.number.font.size=t.defaultNumberFontSize,_[0]=!0),T("number.prefix"),T("number.suffix"),w=c.number.font.size}var M;if(c._hasDelta){var g=v.extendFlat({},p.font);g.size=void 0,v.coerceFont(T,"delta.font",g),c.delta.font.size===void 0&&(c.delta.font.size=(c._hasNumber?.5:1)*(w||t.defaultNumberFontSize),_[1]=!0),T("delta.reference",c.value),T("delta.relative"),T("delta.valueformat",c.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=c.delta.font.size}c._scaleNumbers=(!c._hasNumber||_[0])&&(!c._hasDelta||_[1])||!1;var b=v.extendFlat({},p.font);b.size=.25*(w||M||t.defaultNumberFontSize),v.coerceFont(T,"title.font",b),T("title.text");var d,u,y,f;function R(P,U){return v.coerce(d,u,x.gauge,P,U)}function L(P,U){return v.coerce(y,f,x.gauge.axis,P,U)}if(c._hasGauge){d=h.gauge,d||(d={}),u=E.newContainer(c,"gauge"),R("shape");var z=c._isBullet=c.gauge.shape==="bullet";z||T("title.align","center");var F=c._isAngular=c.gauge.shape==="angular";F||T("align","center"),R("bgcolor",p.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var N=t.valueThickness*(c.gauge.shape==="bullet"?.5:1);R("bar.thickness",N),e(d,u,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),y={},d&&(y=d.axis||{}),f=E.newContainer(u,"axis"),L("visible"),c._range=L("range",c._range);var O={font:p.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(y,f,L,"linear"),n(y,f,L,"linear",O),a(y,f,L,"linear",O),o(y,f,L,O)}else T("title.align","center"),T("align","center"),c._isAngular=c._isBullet=!1;c._length=null}function s(h,c){function m(p,T){return v.coerce(h,c,x.gauge.steps,p,T)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}G.exports={supplyDefaults:i}}}),wG=Xe({"src/traces/indicator/calc.js"(Z,G){"use strict";function v(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}G.exports={calc:v}}}),TG=Xe({"src/traces/indicator/plot.js"(Z,G){"use strict";var v=Hn(),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=Go(),h=F_(),c=R2(),m=Wh(),p=$n(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(z){return z&&z.duration>0}G.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],se=$.trace,le=v.select(this),fe=se._hasGauge,V=se._isAngular,Y=se._isBullet,ee=se.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]},oe=q.l+q.w/2,ae=q.t+q.h/2,j=Math.min(q.w/2,q.h),Q=n.innerRadius*j,re,ce,be,Ae=se.align||"center";if(ce=ae,!fe)re=q.l+l[Ae]*q.w,be=function(he){return y(he,q.w,q.h)};else if(V&&(re=oe,ce=ae+j/2,be=function(he){return f(he,.9*Q)}),Y){var De=n.bulletPadding,ze=1-n.bulletNumberDomainSize+De;re=q.l+(ze+(1-ze)*l[Ae])*q.w,be=function(he){return y(he,(n.bulletNumberDomainSize-De)*q.w,q.h)}}g(F,le,X,{numbersX:re,numbersY:ce,numbersScaler:be,transitionOpts:O,onComplete:B});var Ze,at;fe&&(Ze={range:se.gauge.axis.range,color:se.gauge.bgcolor,line:{color:se.gauge.bordercolor,width:0},thickness:1},at={range:se.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:se.gauge.bordercolor,width:se.gauge.borderwidth},thickness:1});var nt=le.selectAll("g.angular").data(V?X:[]);nt.exit().remove();var rt=le.selectAll("g.angularaxis").data(V?X:[]);rt.exit().remove(),V&&M(F,le,X,{radius:j,innerRadius:Q,gauge:nt,layer:rt,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var st=le.selectAll("g.bullet").data(Y?X:[]);st.exit().remove();var Me=le.selectAll("g.bulletaxis").data(Y?X:[]);Me.exit().remove(),Y&&A(F,le,X,{gauge:st,layer:Me,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var ye=le.selectAll("text.title").data(X);ye.exit().remove(),ye.enter().append("text").classed("title",!0),ye.attr("text-anchor",function(){return Y?T.right:T[se.title.align]}).text(se.title.text).call(a.font,se.title.font).call(i.convertToTspans,F),ye.attr("transform",function(){var he=q.l+q.w*l[se.title.align],Oe,tt=n.titlePadding,ot=a.bBox(ye.node());if(fe){if(V)if(se.gauge.axis.visible){var Qe=a.bBox(rt.node());Oe=Qe.top-tt-ot.bottom}else Oe=q.t+q.h/2-j/2-ot.bottom-tt;Y&&(Oe=ce-(ot.top+ot.bottom)/2,he=q.l-n.bulletPadding*q.w)}else Oe=se._numbersTop-tt-ot.bottom;return t(he,Oe)})})};function A(z,F,N,O){var P=N[0].trace,U=O.gauge,B=O.layer,X=O.gaugeBg,$=O.gaugeOutline,se=O.size,le=P.domain,fe=O.transitionOpts,V=O.onComplete,Y,ee,q,oe,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(se.l,se.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=se.h,Q=P.gauge.bar.thickness*j,re=le.x[0],ce=le.x[0]+(le.x[1]-le.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);Y=u(z,P.gauge.axis),Y._id="xbulletaxis",Y.domain=[re,ce],Y.setScale(),ee=s.calcTicks(Y),q=s.makeTransTickFn(Y),oe=s.getTickSigns(Y)[2],ae=se.t+se.h,Y.visible&&(s.drawTicks(z,Y,{vals:Y.ticks==="inside"?s.clipEnds(Y,ee):ee,layer:B,path:s.makeTickPath(Y,ae,oe),transFn:q}),s.drawLabels(z,Y,{vals:ee,layer:B,transFn:q,labelFns:s.makeLabelFns(Y,ae)}));function be(rt){rt.attr("width",function(st){return Math.max(0,Y.c2p(st.range[1])-Y.c2p(st.range[0]))}).attr("x",function(st){return Y.c2p(st.range[0])}).attr("y",function(st){return .5*(1-st.thickness)*j}).attr("height",function(st){return st.thickness*j})}var Ae=[X].concat(P.gauge.steps),De=U.selectAll("g.bg-bullet").data(Ae);De.enter().append("g").classed("bg-bullet",!0).append("rect"),De.select("rect").call(be).call(b),De.exit().remove();var ze=U.selectAll("g.value-bullet").data([P.gauge.bar]);ze.enter().append("g").classed("value-bullet",!0).append("rect"),ze.select("rect").attr("height",Q).attr("y",(j-Q)/2).call(b),w(fe)?ze.select("rect").transition().duration(fe.duration).ease(fe.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y)))):ze.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),ze.exit().remove();var Ze=N.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(Ze);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(p.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(be).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,se=O.gaugeOutline,le=[U.l+U.w/2,U.t+U.h/2+B/2],fe=O.gauge,V=O.layer,Y=O.transitionOpts,ee=O.onComplete,q=Math.PI/2;function oe(Pt){var It=P.gauge.axis.range[0],qt=P.gauge.axis.range[1],Wt=(Pt-It)/(qt-It)*Math.PI-q;return Wt<-q?-q:Wt>q?q:Wt}function ae(Pt){return v.svg.arc().innerRadius((X+B)/2-Pt/2*(B-X)).outerRadius((X+B)/2+Pt/2*(B-X)).startAngle(-q)}function j(Pt){Pt.attr("d",function(It){return ae(It.thickness).startAngle(oe(It.range[0])).endAngle(oe(It.range[1]))()})}var Q,re,ce,be;fe.enter().append("g").classed("angular",!0),fe.attr("transform",t(le[0],le[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.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 Ae=function(Pt){return(Q.range[0]-Pt.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},De={},ze=s.makeLabelFns(Q,0),Ze=ze.labelStandoff;De.xFn=function(Pt){var It=Ae(Pt);return Math.cos(It)*Ze},De.yFn=function(Pt){var It=Ae(Pt),qt=Math.sin(It)>0?.2:1;return-Math.sin(It)*(Ze+Pt.fontSize*qt)+Math.abs(Math.cos(It))*(Pt.fontSize*o)},De.anchorFn=function(Pt){var It=Ae(Pt),qt=Math.cos(It);return Math.abs(qt)<.1?"middle":qt>0?"start":"end"},De.heightFn=function(Pt,It,qt){var Wt=Ae(Pt);return-.5*(1+Math.sin(Wt))*qt};var at=function(Pt){return t(le[0]+B*Math.cos(Pt),le[1]-B*Math.sin(Pt))};ce=function(Pt){return at(Ae(Pt))};var nt=function(Pt){var It=Ae(Pt);return at(It)+"rotate("+-r(It)+")"};if(re=s.calcTicks(Q),be=s.getTickSigns(Q)[2],Q.visible){be=Q.ticks==="inside"?-1:1;var rt=(Q.linewidth||1)/2;s.drawTicks(z,Q,{vals:re,layer:V,path:"M"+be*rt+",0h"+be*Q.ticklen,transFn:nt}),s.drawLabels(z,Q,{vals:re,layer:V,transFn:ce,labelFns:De})}var st=[$].concat(P.gauge.steps),Me=fe.selectAll("g.bg-arc").data(st);Me.enter().append("g").classed("bg-arc",!0).append("path"),Me.select("path").call(j).call(b),Me.exit().remove();var ye=ae(P.gauge.bar.thickness),he=fe.selectAll("g.value-arc").data([P.gauge.bar]);he.enter().append("g").classed("value-arc",!0).append("path");var Oe=he.select("path");w(Y)?(Oe.transition().duration(Y.duration).ease(Y.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",d(ye,oe(N[0].lastY),oe(N[0].y))),P._lastValue=N[0].y):Oe.attr("d",typeof N[0].y=="number"?ye.endAngle(oe(N[0].y)):"M0,0Z"),Oe.call(b),he.exit().remove(),st=[];var tt=P.gauge.threshold.value;(tt||tt===0)&&st.push({range:[tt,tt],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var ot=fe.selectAll("g.threshold-arc").data(st);ot.enter().append("g").classed("threshold-arc",!0).append("path"),ot.select("path").call(j).call(b),ot.exit().remove();var Qe=fe.selectAll("g.gauge-outline").data([se]);Qe.enter().append("g").classed("gauge-outline",!0).append("path"),Qe.select("path").call(j).call(b),Qe.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],se=O.transitionOpts,le=O.onComplete,fe=E.ensureSingle(F,"g","numbers"),V,Y,ee,q=[];P._hasNumber&&q.push("number"),P._hasDelta&&(q.push("delta"),P.delta.position==="left"&&q.reverse());var oe=fe.selectAll("text").data(q);oe.enter().append("text"),oe.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),oe.exit().remove();function ae(at,nt,rt,st){if(at.match("s")&&rt>=0!=st>=0&&!nt(rt).slice(-1).match(_)&&!nt(st).slice(-1).match(_)){var Me=at.slice().replace("s","f").replace(/\d+/,function(he){return parseInt(he)-1}),ye=u(z,{tickformat:Me});return function(he){return Math.abs(he)<1?s.tickText(ye,he).text:nt(he)}}else return nt}function j(){var at=u(z,{tickformat:P.number.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(he){return s.tickText(at,he).text},rt=P.number.suffix,st=P.number.prefix,Me=fe.select("text.number");function ye(){var he=typeof N[0].y=="number"?st+nt(N[0].y)+rt:"-";Me.text(he).call(a.font,P.number.font).call(i.convertToTspans,z)}return w(se)?Me.transition().duration(se.duration).ease(se.easing).each("end",function(){ye(),le&&le()}).each("interrupt",function(){ye(),le&&le()}).attrTween("text",function(){var he=v.select(this),Oe=S(N[0].lastY,N[0].y);P._lastValue=N[0].y;var tt=ae(P.number.valueformat,nt,N[0].lastY,N[0].y);return function(ot){he.text(st+tt(Oe(ot))+rt)}}):ye(),V=R(st+nt(N[0].y)+rt,P.number.font,$,z),Me}function Q(){var at=u(z,{tickformat:P.delta.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(ot){return s.tickText(at,ot).text},rt=P.delta.suffix,st=P.delta.prefix,Me=function(ot){var Qe=P.delta.relative?ot.relativeDelta:ot.delta;return Qe},ye=function(ot,Qe){return ot===0||typeof ot!="number"||isNaN(ot)?"-":(ot>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+st+Qe(ot)+rt},he=function(ot){return ot.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=Me(N[0]));var Oe=fe.select("text.delta");Oe.call(a.font,P.delta.font).call(p.fill,he({delta:P._deltaLastValue}));function tt(){Oe.text(ye(Me(N[0]),nt)).call(p.fill,he(N[0])).call(i.convertToTspans,z)}return w(se)?Oe.transition().duration(se.duration).ease(se.easing).tween("text",function(){var ot=v.select(this),Qe=Me(N[0]),Pt=P._deltaLastValue,It=ae(P.delta.valueformat,nt,Pt,Qe),qt=S(Pt,Qe);return P._deltaLastValue=Qe,function(Wt){ot.text(ye(qt(Wt),It)),ot.call(p.fill,he({delta:qt(Wt)}))}}).each("end",function(){tt(),le&&le()}).each("interrupt",function(){tt(),le&&le()}):tt(),Y=R(ye(Me(N[0]),nt),P.delta.font,$,z),Oe}var re=P.mode+P.align,ce;if(P._hasDelta&&(ce=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=V),P._hasDelta&&P._hasNumber){var be=[(V.left+V.right)/2,(V.top+V.bottom)/2],Ae=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],De,ze,Ze=.75*P.delta.font.size;P.delta.position==="left"&&(De=L(P,"deltaPos",0,-1*(V.width*l[P.align]+Y.width*(1-l[P.align])+Ze),re,Math.min),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:Y.left+De,right:V.right,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="right"&&(De=L(P,"deltaPos",0,V.width*(1-l[P.align])+Y.width*l[P.align]+Ze,re,Math.max),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:V.left,right:Y.right+De,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="bottom"&&(De=null,ze=Y.height,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height,bottom:V.bottom+Y.height}),P.delta.position==="top"&&(De=null,ze=V.top,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height-Y.height,bottom:V.bottom}),ce.attr({dx:De,dy:ze})}(P._hasNumber||P._hasDelta)&&fe.attr("transform",function(){var at=O.numbersScaler(ee);re+=at[2];var nt=L(P,"numbersScale",1,at[0],re,Math.min),rt;P._scaleNumbers||(nt=1),P._isAngular?rt=B-nt*ee.bottom:rt=B-nt*(ee.top+ee.bottom)/2,P._numbersTop=nt*ee.top+rt;var st=ee[X];X==="center"&&(st=(ee.left+ee.right)/2);var Me=U-nt*st;return Me=L(P,"numbersTranslate",0,Me,re,Math.max),t(Me,rt)+e(nt)})}function b(z){z.each(function(F){p.stroke(v.select(this),F.line.color)}).each(function(F){p.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(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($,se){return E.coerce(P,U,m,$,se)}return h(P,U,X,B,O),c(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 f(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=v.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}}}),AG=Xe({"src/traces/indicator/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"indicator",basePlotModule:xG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:bG().supplyDefaults,calc:wG().calc,plot:TG(),meta:{}}}}),SG=Xe({"lib/indicator.js"(Z,G){"use strict";G.exports=AG()}}),H6=Xe({"src/traces/table/attributes.js"(Z,G){"use strict";var v=$0(),x=Qo().extendFlat,S=pc().overrideAll,E=tc(),e=wc().attributes,t=tf().descriptionOnlyNumbers,r=G.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({},v.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({},v.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")}}),MG=Xe({"src/traces/table/defaults.js"(Z,G){"use strict";var v=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,c){return h-c}),i=a.map(function(h){return n.indexOf(h)}),s=i.length;s<o;s++)i.push(s);t("columnorder",i)}G.exports=function(t,r,o,a){function n(i,s){return v.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"),v.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"),v.coerceFont(n,"cells.font",a.font),r._length=null}}}),EG=Xe({"src/traces/table/calc.js"(Z,G){"use strict";var v=kv().wrap;G.exports=function(){return v({})}}}),W6=Xe({"src/traces/table/constants.js"(Z,G){"use strict";G.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"}}}}),kG=Xe({"src/traces/table/data_preparation_helper.js"(Z,G){"use strict";var v=W6(),x=Qo().extendFlat,S=rs(),E=bp().isTypedArray,e=bp().isArrayOrTypedArray;G.exports=function(m,p){var T=o(p.cells.values),l=function($){return $.slice(p.header.values.length,$.length)},_=o(p.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),A=p.domain,M=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=p.header.values.length?w[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return p.cells.height}):[],u=b.reduce(r,0),y=g-u,f=y+v.uplift,R=s(d,f),L=s(b,u),z=i(L,[]),F=i(R,z),N={},O=p._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,se){return se})));var P=w.map(function($,se){var le=e(p.columnwidth)?p.columnwidth[Math.min(se,p.columnwidth.length-1)]:p.columnwidth;return S(le)?Number(le):1}),U=P.reduce(r,0);P=P.map(function($){return $/U*M});var B=Math.max(t(p.header.line.width),t(p.cells.line.width)),X={key:p.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:M,maxLineWidth:B,height:g,columnOrder:O,groupHeight:g,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},p.cells,{values:T}),headerCells:x({},p.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($,se){var le=N[$];N[$]=(le||0)+1;var fe=$+"__"+N[$];return{key:fe,label:$,specIndex:se,xIndex:O[se],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[se]}})};return X.columns.forEach(function($){$.calcdata=X,$.x=n($)}),X};function t(c){if(e(c)){for(var m=0,p=0;p<c.length;p++)m=Math.max(m,t(c[p]));return m}return c}function r(c,m){return c+m}function o(c){var m=c.slice(),p=1/0,T=0,l;for(l=0;l<m.length;l++)E(m[l])?m[l]=Array.from(m[l]):e(m[l])||(m[l]=[m[l]]),p=Math.min(p,m[l].length),T=Math.max(T,m[l].length);if(p!==T)for(l=0;l<m.length;l++){var _=T-m[l].length;_&&(m[l]=m[l].concat(a(_)))}return m}function a(c){for(var m=new Array(c),p=0;p<c;p++)m[p]="";return m}function n(c){return c.calcdata.columns.reduce(function(m,p){return p.xIndex<c.xIndex?m+p.columnWidth:m},0)}function i(c,m){var p=Object.keys(c);return p.map(function(T){return x({},c[T],{auxiliaryBlocks:m})})}function s(c,m){for(var p={},T,l=0,_=0,w=h(),A=0,M=0,g=0;g<c.length;g++)T=c[g],w.rows.push({rowIndex:g,rowHeight:T}),_+=T,(_>=m||g===c.length-1)&&(p[l]=w,w.key=M++,w.firstRowIndex=A,w.lastRowIndex=g,w=h(),l+=_,A=g+1,_=0);return p}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),CG=Xe({"src/traces/table/data_split_helpers.js"(Z){"use strict";var G=Qo().extendFlat;Z.splitToPanels=function(x){var S=[0,0],E=G({},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:G({},x.calcdata,{cells:x.calcdata.headerCells})}),e=G({},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=G({},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=v(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 v(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=Xe({"src/traces/table/plot.js"(Z,G){"use strict";var v=W6(),x=Hn(),S=sa(),E=S.numberFormat,e=kv(),t=es(),r=ou(),o=sa().raiseToTop,a=sa().strTranslate,n=sa().cancelTransition,i=kG(),s=CG(),h=$n();G.exports=function(re,ce){var be=!re._context.staticPlot,Ae=re._fullLayout._paper.selectAll("."+v.cn.table).data(ce.map(function(Qe){var Pt=e.unwrap(Qe),It=Pt.trace;return i(re,It)}),e.keyFun);Ae.exit().remove(),Ae.enter().append("g").classed(v.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"),Ae.attr("width",function(Qe){return Qe.width+Qe.size.l+Qe.size.r}).attr("height",function(Qe){return Qe.height+Qe.size.t+Qe.size.b}).attr("transform",function(Qe){return a(Qe.translateX,Qe.translateY)});var De=Ae.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),ze=De.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var Ze="onwheel"in document?"wheel":"mousewheel";ze.on("mousemove",function(Qe){De.filter(function(Pt){return Qe===Pt}).call(l,re)}).on(Ze,function(Qe){if(!Qe.scrollbarState.wheeling){Qe.scrollbarState.wheeling=!0;var Pt=Qe.scrollY+x.event.deltaY,It=$(re,De,null,Pt)(Qe);It||(x.event.stopPropagation(),x.event.preventDefault()),Qe.scrollbarState.wheeling=!1}}).call(l,re,!0)}De.attr("transform",function(Qe){return a(Qe.size.l,Qe.size.t)});var at=De.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Qe){return Qe.width}).attr("height",function(Qe){return Qe.height}),De.each(function(Qe){t.setClipUrl(x.select(this),m(re,Qe),re)});var nt=De.selectAll("."+v.cn.yColumn).data(function(Qe){return Qe.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Qe){return a(Qe.x,0)}),be&&nt.call(x.behavior.drag().origin(function(Qe){var Pt=x.select(this);return N(Pt,Qe,-v.uplift),o(this),Qe.calcdata.columnDragInProgress=!0,l(De.filter(function(It){return Qe.calcdata.key===It.key}),re),Qe}).on("drag",function(Qe){var Pt=x.select(this),It=function(kr){return(Qe===kr?x.event.x:kr.x)+kr.columnWidth/2};Qe.x=Math.max(-v.overdrag,Math.min(Qe.calcdata.width+v.overdrag-Qe.columnWidth,x.event.x));var qt=T(nt).filter(function(kr){return kr.calcdata.key===Qe.calcdata.key}),Wt=qt.sort(function(kr,mr){return It(kr)-It(mr)});Wt.forEach(function(kr,mr){kr.xIndex=mr,kr.x=Qe===kr?kr.x:kr.xScale(kr)}),nt.filter(function(kr){return Qe!==kr}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(kr){return a(kr.x,0)}),Pt.call(n).attr("transform",a(Qe.x,-v.uplift))}).on("dragend",function(Qe){var Pt=x.select(this),It=Qe.calcdata;Qe.x=Qe.xScale(Qe),Qe.calcdata.columnDragInProgress=!1,N(Pt,Qe,0),z(re,It,It.columns.map(function(qt){return qt.xIndex}))})),nt.each(function(Qe){t.setClipUrl(x.select(this),p(re,Qe),re)});var rt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);rt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Qe){return Qe.key}),rt.style("cursor",function(Qe){return Qe.dragHandle?"ew-resize":Qe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var st=rt.filter(P),Me=rt.filter(O);be&&Me.call(x.behavior.drag().origin(function(Qe){return x.event.stopPropagation(),Qe}).on("drag",$(re,De,-1)).on("dragend",function(){})),_(re,De,st,rt),_(re,De,Me,rt);var ye=De.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);ye.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Qe){return m(re,Qe)});var he=ye.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);he.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),he.attr("width",function(Qe){return Qe.width+2*v.overdrag}).attr("height",function(Qe){return Qe.height+v.uplift});var Oe=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Oe.enter().append("g").classed(v.cn.columnBoundary,!0);var tt=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);tt.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),tt.attr("id",function(Qe){return p(re,Qe)});var ot=tt.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);ot.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),ot.attr("width",function(Qe){return Qe.columnWidth+2*c(Qe)}).attr("height",function(Qe){return Qe.calcdata.height+2*c(Qe)+v.uplift}).attr("x",function(Qe){return-c(Qe)}).attr("y",function(Qe){return-c(Qe)}),X(null,Me,De)};function c(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function m(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function p(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,ce){function be(nt){var rt=nt.rowBlocks;return ee(rt,rt.length-1)+(rt.length?q(rt[rt.length-1],1/0):1)}var Ae=Q.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Ae.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Ae.each(function(nt){var rt=nt.scrollbarState;rt.totalHeight=be(nt),rt.scrollableAreaHeight=nt.groupHeight-U(nt),rt.currentlyVisibleHeight=Math.min(rt.totalHeight,rt.scrollableAreaHeight),rt.ratio=rt.currentlyVisibleHeight/rt.totalHeight,rt.barLength=Math.max(rt.ratio*rt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),rt.barWiggleRoom=rt.currentlyVisibleHeight-rt.barLength,rt.wiggleRoom=Math.max(0,rt.totalHeight-rt.scrollableAreaHeight),rt.topY=rt.barWiggleRoom===0?0:nt.scrollY/rt.wiggleRoom*rt.barWiggleRoom,rt.bottomY=rt.topY+rt.barLength,rt.dragMultiplier=rt.wiggleRoom/rt.barWiggleRoom}).attr("transform",function(nt){var rt=nt.width+v.scrollbarWidth/2+v.scrollbarOffset;return a(rt,U(nt))});var De=Ae.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);De.enter().append("g").classed(v.cn.scrollbar,!0);var ze=De.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);ze.enter().append("g").classed(v.cn.scrollbarSlider,!0),ze.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var Ze=ze.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);Ze.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),Ze.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||ce?0:.4}),Ze.transition().delay(0).duration(0),Ze.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=De.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var rt=x.event.y,st=this.getBoundingClientRect(),Me=nt.scrollbarState,ye=rt-st.top,he=x.scale.linear().domain([0,Me.scrollableAreaHeight]).range([0,Me.totalHeight]).clamp(!0);Me.topY<=ye&&ye<=Me.bottomY||$(re,Q,null,he(ye-Me.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&&(Ze.remove(),at.remove())}function _(Q,re,ce,be){var Ae=w(ce),De=A(Ae);d(De);var ze=M(De);y(ze);var Ze=b(De),at=g(Ze);u(at),f(at,re,be,Q),Y(De)}function w(Q){var re=Q.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(v.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.columnCell,!0),re.exit().remove(),re}function M(Q){var re=Q.selectAll("."+v.cn.cellRect).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("rect").classed(v.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+v.cn.cellText).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(Q){var re=Q.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function d(Q){Q.each(function(re,ce){var be=re.calcdata.cells.font,Ae=re.column.specIndex,De={size:F(be.size,Ae,ce),color:F(be.color,Ae,ce),family:F(be.family,Ae,ce),weight:F(be.weight,Ae,ce),style:F(be.style,Ae,ce),variant:F(be.variant,Ae,ce),textcase:F(be.textcase,Ae,ce),lineposition:F(be.lineposition,Ae,ce),shadow:F(be.shadow,Ae,ce)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Ae,ce),re.cellBorderWidth=F(re.calcdata.cells.line.width,Ae,ce),re.font=De})}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 ce=x.select(this);h.stroke(ce,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),h.fill(ce,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function f(Q,re,ce,be){Q.text(function(Ae){var De=Ae.column.specIndex,ze=Ae.rowNumber,Ze=Ae.value,at=typeof Ze=="string",nt=at&&Ze.match(/<br>/i),rt=!at||nt;Ae.mayHaveMarkup=at&&Ze.match(/[<&>]/);var st=R(Ze);Ae.latex=st;var Me=st?"":F(Ae.calcdata.cells.prefix,De,ze)||"",ye=st?"":F(Ae.calcdata.cells.suffix,De,ze)||"",he=st?null:F(Ae.calcdata.cells.format,De,ze)||null,Oe=Me+(he?E(he)(Ae.value):Ae.value)+ye,tt;Ae.wrappingNeeded=!Ae.wrapped&&!rt&&!st&&(tt=L(Oe)),Ae.cellHeightMayIncrease=nt||st||Ae.mayHaveMarkup||(tt===void 0?L(Oe):tt),Ae.needsConvertToTspans=Ae.mayHaveMarkup||Ae.wrappingNeeded||Ae.latex;var ot;if(Ae.wrappingNeeded){var Qe=v.wrapSplitCharacter===" "?Oe.replace(/<a href=/ig,"<a_href="):Oe,Pt=Qe.split(v.wrapSplitCharacter),It=v.wrapSplitCharacter===" "?Pt.map(function(qt){return qt.replace(/<a_href=/ig,"<a href=")}):Pt;Ae.fragments=It.map(function(qt){return{text:qt,width:null}}),Ae.fragments.push({fragment:v.wrapSpacer,width:null}),ot=It.join(v.lineBreaker)+v.lineBreaker+v.wrapSpacer}else delete Ae.fragments,ot=Oe;return ot}).attr("dy",function(Ae){return Ae.needsConvertToTspans?0:"0.75em"}).each(function(Ae){var De=this,ze=x.select(De),Ze=Ae.wrappingNeeded?le:fe;Ae.needsConvertToTspans?r.convertToTspans(ze,be,Ze(ce,De,re,be,Ae)):x.select(De.parentNode).attr("transform",function(at){return a(V(at),v.cellPad)}).attr("text-anchor",function(at){return{left:"start",center:"middle",right:"end"}[at.align]})})}function R(Q){return typeof Q=="string"&&Q.match(v.latexCheck)}function L(Q){return Q.indexOf(v.wrapSplitCharacter)!==-1}function z(Q,re,ce){var be=re.gdColumnsOriginalOrder;re.gdColumns.sort(function(Ae,De){return ce[be.indexOf(Ae)]-ce[be.indexOf(De)]}),re.columnorder=ce,Q.emit("plotly_restyle")}function F(Q,re,ce){if(S.isArrayOrTypedArray(Q)){var be=Q[Math.min(re,Q.length-1)];return S.isArrayOrTypedArray(be)?be[Math.min(ce,be.length-1)]:be}else return Q}function N(Q,re,ce){Q.transition().ease(v.releaseTransitionEase).duration(v.releaseTransitionDuration).attr("transform",a(re.x,ce))}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(ce,be){return ce+q(be,1/0)},0)}function B(Q,re,ce){for(var be=[],Ae=0,De=0;De<Q.length;De++){for(var ze=Q[De],Ze=ze.rows,at=0,nt=0;nt<Ze.length;nt++)at+=Ze[nt].rowHeight;ze.allRowsHeight=at;var rt=Ae+at,st=re,Me=st+ce;st<rt&&Me>Ae&&be.push(De),Ae+=at}return be}function X(Q,re,ce){var be=T(re)[0];if(be!==void 0){var Ae=be.rowBlocks,De=be.calcdata,ze=ee(Ae,Ae.length),Ze=be.calcdata.groupHeight-U(be),at=De.scrollY=Math.max(0,Math.min(ze-Ze,De.scrollY)),nt=B(Ae,at,Ze);nt.length===1&&(nt[0]===Ae.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),re.each(function(rt,st){rt.page=nt[st],rt.scrollY=at}),re.attr("transform",function(rt){var st=ee(rt.rowBlocks,rt.page)-rt.scrollY;return a(0,st)}),Q&&(se(Q,ce,re,nt,be.prevPages,be,0),se(Q,ce,re,nt,be.prevPages,be,1),l(ce,Q))}}function $(Q,re,ce,be){return function(De){var ze=De.calcdata?De.calcdata:De,Ze=re.filter(function(st){return ze.key===st.key}),at=ce||ze.scrollbarState.dragMultiplier,nt=ze.scrollY;ze.scrollY=be===void 0?ze.scrollY+at*x.event.dy:be;var rt=Ze.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return X(Q,rt,Ze),ze.scrollY===nt}}function se(Q,re,ce,be,Ae,De,ze){var Ze=be[ze]!==Ae[ze];Ze&&(clearTimeout(De.currentRepaint[ze]),De.currentRepaint[ze]=setTimeout(function(){var at=ce.filter(function(nt,rt){return rt===ze&&be[rt]!==Ae[rt]});_(Q,re,at,ce),Ae[ze]=be[ze]}))}function le(Q,re,ce,be){return function(){var De=x.select(re.parentNode);De.each(function(ze){var Ze=ze.fragments;De.selectAll("tspan.line").each(function(Oe,tt){Ze[tt].width=this.getComputedTextLength()});var at=Ze[Ze.length-1].width,nt=Ze.slice(0,-1),rt=[],st,Me,ye=0,he=ze.column.columnWidth-2*v.cellPad;for(ze.value="";nt.length;)st=nt.shift(),Me=st.width+at,ye+Me>he&&(ze.value+=rt.join(v.wrapSpacer)+v.lineBreaker,rt=[],ye=0),rt.push(st.text),ye+=Me;ye&&(ze.value+=rt.join(v.wrapSpacer)),ze.wrapped=!0}),De.selectAll("tspan.line").remove(),f(De.select("."+v.cn.cellText),ce,Q,be),x.select(re.parentNode.parentNode).call(Y)}}function fe(Q,re,ce,be,Ae){return function(){if(!Ae.settledY){var ze=x.select(re.parentNode),Ze=ae(Ae),at=Ae.key-Ze.firstRowIndex,nt=Ze.rows[at].rowHeight,rt=Ae.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,st=Math.max(rt,nt),Me=st-Ze.rows[at].rowHeight;Me&&(Ze.rows[at].rowHeight=st,Q.selectAll("."+v.cn.columnCell).call(Y),X(null,Q.filter(O),0),l(ce,be,!0)),ze.attr("transform",function(){var ye=this,he=ye.parentNode,Oe=he.getBoundingClientRect(),tt=x.select(ye.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),ot=ye.transform.baseVal.consolidate(),Qe=tt.top-Oe.top+(ot?ot.matrix.f:v.cellPad);return a(V(Ae,x.select(ye.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Qe)}),Ae.settledY=!0}}}function V(Q,re){switch(Q.align){case"left":return v.cellPad;case"right":return Q.column.columnWidth-(re||0)-v.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return v.cellPad}}function Y(Q){Q.attr("transform",function(re){var ce=re.rowBlocks[0].auxiliaryBlocks.reduce(function(ze,Ze){return ze+q(Ze,1/0)},0),be=ae(re),Ae=q(be,re.key),De=Ae+ce;return a(0,De)}).selectAll("."+v.cn.cellRect).attr("height",function(re){return j(ae(re),re.key).rowHeight})}function ee(Q,re){for(var ce=0,be=re-1;be>=0;be--)ce+=oe(Q[be]);return ce}function q(Q,re){for(var ce=0,be=0;be<Q.rows.length&&Q.rows[be].rowIndex<re;be++)ce+=Q.rows[be].rowHeight;return ce}function oe(Q){var re=Q.allRowsHeight;if(re!==void 0)return re;for(var ce=0,be=0;be<Q.rows.length;be++)ce+=Q.rows[be].rowHeight;return Q.allRowsHeight=ce,ce}function ae(Q){return Q.rowBlocks[Q.page]}function j(Q,re){return Q.rows[re-Q.firstRowIndex]}}}),LG=Xe({"src/traces/table/base_plot.js"(Z){"use strict";var G=Hh().getModuleCalcData,v=X6(),x="table";Z.name=x,Z.plot=function(S){var E=G(S.calcdata,x)[0];E.length&&v(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()}}}),PG=Xe({"src/traces/table/index.js"(Z,G){"use strict";G.exports={attributes:H6(),supplyDefaults:MG(),calc:EG(),plot:X6(),moduleType:"trace",name:"table",basePlotModule:LG(),categories:["noOpacity"],meta:{}}}}),IG=Xe({"lib/table.js"(Z,G){"use strict";G.exports=PG()}}),RG=Xe({"src/traces/carpet/axis_attributes.js"(Z,G){"use strict";var v=tc(),x=sh(),S=Wh(),E=tf().descriptionWithDates,e=pc().overrideAll,t=Gh().dash,r=Qo().extendFlat;G.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:v({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:v({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=Xe({"src/traces/carpet/attributes.js"(Z,G){"use strict";var v=tc(),x=RG(),S=sh(),E=v({editType:"calc"}),e=af().zorder;E.family.dflt='"Open Sans", verdana, arial, sans-serif',E.size.dflt=12,E.color.dflt=S.defaultLine,G.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}}}),DG=Xe({"src/traces/carpet/xy_defaults.js"(Z,G){"use strict";var v=sa().isArray1D;G.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||v(t))&&(!a||v(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}}}),zG=Xe({"src/traces/carpet/axis_defaults.js"(Z,G){"use strict";var v=PT(),x=$n().addOpacity,S=so(),E=sa(),e=Y0(),t=Qm(),r=e0(),o=I2(),a=wv(),n=a1();G.exports=function(h,c,m){var p=m.letter,T=m.font||{},l=v[p+"axis"];function _(B,X){return E.coerce(h,c,l,B,X)}function w(B,X){return E.coerce2(h,c,l,B,X)}m.name&&(c._name=m.name,c._id=m.name),_("autotypenumbers",m.autotypenumbersDflt);var A=_("type");if(A==="-"&&(m.data&&i(c,m.data),c.type==="-"?c.type="linear":A=h.type=c.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",p+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),c.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),c._hovertitle=p,A==="date"){var M=S.getComponentMethod("calendars","handleDefaults");M(h,c,"calendar",m.calendar)}a(c,m.fullLayout),c.c2p=E.identity;var g=_("color",m.dfltColor),b=g===h.color?g:T.color,d=_("title.text");d&&(E.coerceFont(_,"title.font",T,{overrideDflt:{size:E.bigFont(T.size),color:b}}),_("title.offset")),_("tickangle");var u=_("autorange",!c.isValidRange(h.range));u&&_("rangemode"),_("range"),c.cleanRange(),_("fixedrange"),e(h,c,_,A),r(h,c,_,A,m),t(h,c,_,A,m),o(h,c,_,{data:m.data,dataAttr:p});var y=w("gridcolor",x(g,.3)),f=w("gridwidth"),R=w("griddash"),L=_("showgrid");L||(delete c.gridcolor,delete c.gridwidth,delete c.griddash);var z=w("startlinecolor",g),F=w("startlinewidth",f),N=_("startline",c.showgrid||!!z||!!F);N||(delete c.startlinecolor,delete c.startlinewidth);var O=w("endlinecolor",g),P=w("endlinewidth",f),U=_("endline",c.showgrid||!!O||!!P);return U||(delete c.endlinecolor,delete c.endlinewidth),L?(_("minorgridcount"),_("minorgridwidth",f),_("minorgriddash",R),_("minorgridcolor",x(y,.06)),c.minorgridcount||(delete c.minorgridwidth,delete c.minorgriddash,delete c.minorgridcolor)):(delete c.gridcolor,delete c.gridwidth,delete c.griddash),c.showticklabels==="none"&&(delete c.tickfont,delete c.tickangle,delete c.showexponent,delete c.exponentformat,delete c.minexponent,delete c.tickformat,delete c.showticksuffix,delete c.showtickprefix),c.showticksuffix||delete c.ticksuffix,c.showtickprefix||delete c.tickprefix,_("tickmode"),c};function i(s,h){if(s.type==="-"){var c=s._id,m=c.charAt(0),p=m+"calendar",T=s[p];s.type=n(h,T,{autotypenumbers:s.autotypenumbers})}}}}),FG=Xe({"src/traces/carpet/ab_defaults.js"(Z,G){"use strict";var v=zG(),x=zl();G.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};v(i,s,h),s._categories=s._categories||[],!E[a]&&i.type!=="-"&&(E[a]={type:i.type})})}}}),OG=Xe({"src/traces/carpet/defaults.js"(Z,G){"use strict";var v=sa(),x=DG(),S=FG(),E=PT(),e=sh();G.exports=function(r,o,a,n){function i(c,m){return v.coerce(r,o,E,c,m)}o._clipPathId="clip"+o.uid+"carpet";var s=i("color",e.defaultLine);if(v.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=Xe({"src/traces/carpet/map_1d_array.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(S,E,e){var t;for(v(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=Xe({"src/traces/carpet/makepath.js"(Z,G){"use strict";G.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")}}}),BG=Xe({"src/traces/carpet/orient_text.js"(Z,G){"use strict";G.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]),c=(t[0]*r[0]+t[1]*r[1])/s/h;i=Math.max(0,c)}var m=Math.atan2(a,o)*180/Math.PI;return m<-90?(m+=180,n=-n):m>90&&(m-=180,n=-n),{angle:m,flip:n,p:x.c2p(e,S,E),offsetMultplier:i}}}}),NG=Xe({"src/traces/carpet/plot.js"(Z,G){"use strict";var v=Hn(),x=es(),S=Z6(),E=Y6(),e=BG(),t=ou(),r=sa(),o=r.strRotate,a=r.strTranslate,n=uh();G.exports=function(_,w,A,M){var g=_._context.staticPlot,b=w.xaxis,d=w.yaxis,u=_._fullLayout,y=u._clips;r.makeTraceGroups(M,A,"trace").each(function(f){var R=v.select(this),L=f[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,d,P,F,"a",F._gridlines,!0,g),s(b,d,P,N,"b",N._gridlines,!0,g),s(b,d,O,F,"a",F._minorgridlines,!0,g),s(b,d,O,N,"b",N._minorgridlines,!0,g),s(b,d,U,F,"a-boundary",F._boundarylines,g),s(b,d,U,N,"b-boundary",N._boundarylines,g);var X=h(_,b,d,z,L,B,F._labels,"a-label"),$=h(_,b,d,z,L,B,N._labels,"b-label");c(_,B,z,L,b,d,X,$),i(z,L,y,b,d)})};function i(l,_,w,A,M){var g,b,d,u,y=w.select("#"+l._clipPathId);y.size()||(y=w.append("clipPath").classed("carpetclip",!0));var f=r.ensureSingle(y,"path","carpetboundary"),R=_.clipsegments,L=[];for(u=0;u<R.length;u++)g=R[u],b=S([],g.x,A.c2p),d=S([],g.y,M.c2p),L.push(E(b,d,g.bicubic));var z="M"+L.join("L")+"Z";y.attr("id",l._clipPathId),f.attr("d",z)}function s(l,_,w,A,M,g,b){var d="const-"+M+"-lines",u=w.selectAll("."+d).data(g);u.enter().append("path").classed(d,!0).style("vector-effect",b?"none":"non-scaling-stroke"),u.each(function(y){var f=y,R=f.x,L=f.y,z=S([],R,l.c2p),F=S([],L,_.c2p),N="M"+E(z,F,f.smoothing),O=v.select(this);O.attr("d",N).style("stroke-width",f.width).style("stroke",f.color).style("stroke-dasharray",x.dashStyle(f.dash,f.width)).style("fill","none")}),u.exit().remove()}function h(l,_,w,A,M,g,b,d){var u=g.selectAll("text."+d).data(b);u.enter().append("text").classed(d,!0);var y=0,f={};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||(f={angle:z.angle,flip:z.flip});var N=(R.endAnchor?-1:1)*z.flip,O=v.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(),f.maxExtent=y,f}function c(l,_,w,A,M,g,b,d){var u,y,f,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,f=w.ab2xy(u,y,!0),R=w.dxyda_rough(u,y),b.angle===void 0&&r.extendFlat(b,e(w,M,g,f,w.dxydb_rough(u,y))),T(l,_,w,A,f,R,w.aaxis,M,g,b,"a-title"),u=L,y=.5*(F+N),f=w.ab2xy(u,y,!0),R=w.dxydb_rough(u,y),d.angle===void 0&&r.extendFlat(d,e(w,M,g,f,w.dxyda_rough(u,y))),T(l,_,w,A,f,R,w.baxis,M,g,d,"b-title")}var m=n.LINE_SPACING,p=(1-n.MID_SHIFT)/m+1;function T(l,_,w,A,M,g,b,d,u,y,f){var R=[];b.title.text&&R.push(b.title.text);var L=_.selectAll("text."+f).data(R),z=y.maxExtent;L.enter().append("text").classed(f,!0),L.each(function(){var F=e(w,d,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=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+p)*m*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()}}}),UG=Xe({"src/traces/carpet/cheater_basis.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E){var e,t,r,o,a,n,i=[],s=v(x)?x.length:x,h=v(S)?S.length:S,c=v(x)?x:null,m=v(S)?S:null;c&&(r=(c.length-1)/(c[c.length-1]-c[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[0])/(h-1));var p,T=1/0,l=-1/0;for(t=0;t<h;t++)for(i[t]=[],n=m?(m[t]-m[0])*o:t/(h-1),e=0;e<s;e++)a=c?(c[e]-c[0])*r:e/(s-1),p=a-n*E,T=Math.min(p,T),l=Math.max(p,l),i[t][e]=p;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}}}),jG=Xe({"src/traces/carpet/array_minmax.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(S){return x(S,0)};function x(S,E){if(!v(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(v(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]}}}),qG=Xe({"src/traces/carpet/calc_gridlines.js"(Z,G){"use strict";var v=Go(),x=Qo().extendFlat;G.exports=function(E,e,t){var r,o,a,n,i,s,h,c,m,p,T,l,_,w,A=E["_"+e],M=E[e+"axis"],g=M._gridlines=[],b=M._minorgridlines=[],d=M._boundarylines=[],u=E["_"+t],y=E[t+"axis"];M.tickmode==="array"&&(M.tickvals=A.slice());var f=E._xctrl,R=E._yctrl,L=f[0].length,z=f.length,F=E._a.length,N=E._b.length;v.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var O=M.smoothing?3:1;function P(B){var X,$,se,le,fe,V,Y,ee,q,oe,ae,j,Q=[],re=[],ce={};if(e==="b")for($=E.b2j(B),se=Math.floor(Math.max(0,Math.min(N-2,$))),le=$-se,ce.length=N,ce.crossLength=F,ce.xy=function(be){return E.evalxy([],be,$)},ce.dxy=function(be,Ae){return E.dxydi([],be,se,Ae,le)},X=0;X<F;X++)V=Math.min(F-2,X),Y=X-V,ee=E.evalxy([],X,$),y.smoothing&&X>0&&(q=E.dxydi([],X-1,se,0,le),Q.push(fe[0]+q[0]/3),re.push(fe[1]+q[1]/3),oe=E.dxydi([],X-1,se,1,le),Q.push(ee[0]-oe[0]/3),re.push(ee[1]-oe[1]/3)),Q.push(ee[0]),re.push(ee[1]),fe=ee;else for(X=E.a2i(B),V=Math.floor(Math.max(0,Math.min(F-2,X))),Y=X-V,ce.length=F,ce.crossLength=N,ce.xy=function(be){return E.evalxy([],X,be)},ce.dxy=function(be,Ae){return E.dxydj([],V,be,Y,Ae)},$=0;$<N;$++)se=Math.min(N-2,$),le=$-se,ee=E.evalxy([],X,$),y.smoothing&&$>0&&(ae=E.dxydj([],V,$-1,Y,0),Q.push(fe[0]+ae[0]/3),re.push(fe[1]+ae[1]/3),j=E.dxydj([],V,$-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]),fe=ee;return ce.axisLetter=e,ce.axis=M,ce.crossAxis=y,ce.value=B,ce.constvar=t,ce.index=c,ce.x=Q,ce.y=re,ce.smoothing=y.smoothing,ce}function U(B){var X,$,se,le,fe,V=[],Y=[],ee={};if(ee.length=A.length,ee.crossLength=u.length,e==="b")for(se=Math.max(0,Math.min(N-2,B)),fe=Math.min(1,Math.max(0,B-se)),ee.xy=function(q){return E.evalxy([],q,B)},ee.dxy=function(q,oe){return E.dxydi([],q,se,oe,fe)},X=0;X<L;X++)V[X]=f[B*O][X],Y[X]=R[B*O][X];else for($=Math.max(0,Math.min(F-2,B)),le=Math.min(1,Math.max(0,B-$)),ee.xy=function(q){return E.evalxy([],B,q)},ee.dxy=function(q,oe){return E.dxydj([],$,q,le,oe)},X=0;X<z;X++)V[X]=f[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=V,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,c=s;c<h;c++)o=M.arraytick0+M.arraydtick*c,!(o<0||o>A.length-1)&&g.push(x(U(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s;c<h;c++)if(a=M.arraytick0+M.arraydtick*c,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)&&(p=l+(_-l)*(r+1)/(M.minorgridcount+1)*(M.arraydtick/w),!(p<A[0]||p>A[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&d.push(x(U(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.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],c=s;c<=h;c++)m=M.tick0+M.dtick*c,g.push(x(P(m),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s-1;c<h+1;c++)for(m=M.tick0+M.dtick*c,r=0;r<M.minorgridcount;r++)p=m+M.dtick*(r+1)/(M.minorgridcount+1),!(p<A[0]||p>A[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&d.push(x(P(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.push(x(P(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),VG=Xe({"src/traces/carpet/calc_labels.js"(Z,G){"use strict";var v=Go(),x=Qo().extendFlat;G.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=v.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=v.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))}}}),GG=Xe({"src/traces/carpet/calc_clippath.js"(Z,G){"use strict";G.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}}}),HG=Xe({"src/traces/carpet/smooth_fill_2d_array.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E,e){var t,r,o,a=[],n=[],i=S[0].length,s=S.length;function h($,se){var le=0,fe,V=0;return $>0&&(fe=S[se][$-1])!==void 0&&(V++,le+=fe),$<i-1&&(fe=S[se][$+1])!==void 0&&(V++,le+=fe),se>0&&(fe=S[se-1][$])!==void 0&&(V++,le+=fe),se<s-1&&(fe=S[se+1][$])!==void 0&&(V++,le+=fe),le/Math.max(1,V)}var c=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)),c=Math.max(c,Math.abs(S[r][t]));if(!a.length)return S;var m,p,T,l,_,w,A,M,g,b,d,u=1e-5,y=0,f=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&&(m=e[r+1]-e[r],p=e[r]-e[r-1],F+=(p*S[r+1][t]+m*S[r-1][t])/(p+m),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&&(m=E[t+1]-E[t],p=E[t]-E[t-1],F+=(p*S[r][t+1]+m*S[r][t-1])/(p+m),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/c,y+=b*b,d=z?0:.85,S[r][t]+=g*(1+d)}y=Math.sqrt(y)}while(R++<f&&y>u);return v.log("Smoother converged to",y,"after",R,"iterations"),S}}}),WG=Xe({"src/traces/carpet/constants.js"(Z,G){"use strict";G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),XG=Xe({"src/traces/carpet/catmull_rom.js"(Z,G){"use strict";var v=.5;G.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,v/2),s=Math.pow(a*a+n*n,v/2),h=(s*s*r-i*i*a)*t,c=(s*s*o-i*i*n)*t,m=s*(i+s)*3,p=i*(i+s)*3;return[[E[0]+(m&&h/m),E[1]+(m&&c/m)],[E[0]-(p&&h/p),E[1]-(p&&c/p)]]}}}),ZG=Xe({"src/traces/carpet/compute_control_points.js"(Z,G){"use strict";var v=XG(),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]}G.exports=function(e,t,r,o,a,n){var i,s,h,c,m,p,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,c=0;s<M;s++,c+=n?3:1)for(m=e[c],p=t[c],T=r[s],l=o[s],i=0,h=0;i<A;i++,h+=a?3:1)m[h]=T[i],p[h]=l[i];if(a)for(s=0,c=0;s<M;s++,c+=n?3:1){for(i=1,h=3;i<A-1;i++,h+=3)_=v([r[s][i-1],o[s][i-1]],[r[s][i],o[s][i]],[r[s][i+1],o[s][i+1]],a),e[c][h-1]=_[0][0],t[c][h-1]=_[0][1],e[c][h+1]=_[1][0],t[c][h+1]=_[1][1];w=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=w[0],t[c][1]=w[1],w=S([e[c][g-1],t[c][g-1]],[e[c][g-3],t[c][g-3]],[e[c][g-4],t[c][g-4]]),e[c][g-2]=w[0],t[c][g-2]=w[1]}if(n)for(h=0;h<g;h++){for(c=3;c<b-3;c+=3)_=v([e[c-3][h],t[c-3][h]],[e[c][h],t[c][h]],[e[c+3][h],t[c+3][h]],n),e[c-1][h]=_[0][0],t[c-1][h]=_[0][1],e[c+1][h]=_[1][0],t[c+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(c=1;c<b;c+=(c+1)%3===0?2:1){for(h=3;h<g-3;h+=3)_=v([e[c][h-3],t[c][h-3]],[e[c][h],t[c][h]],[e[c][h+3],t[c][h+3]],a),e[c][h-1]=.5*(e[c][h-1]+_[0][0]),t[c][h-1]=.5*(t[c][h-1]+_[0][1]),e[c][h+1]=.5*(e[c][h+1]+_[1][0]),t[c][h+1]=.5*(t[c][h+1]+_[1][1]);w=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=.5*(e[c][1]+w[0]),t[c][1]=.5*(t[c][1]+w[1]),w=S([e[c][g-1],t[c][g-1]],[e[c][g-3],t[c][g-3]],[e[c][g-4],t[c][g-4]]),e[c][g-2]=.5*(e[c][g-2]+w[0]),t[c][g-2]=.5*(t[c][g-2]+w[1])}return[e,t]}}}),YG=Xe({"src/traces/carpet/create_spline_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S,E,e){var t=x-2,r=S-2;return E&&e?function(o,a,n){o||(o=[]);var i,s,h,c,m,p,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,d=b*g,u=w*w,y=u*w,f=1-w,R=f*f,L=R*f;for(p=0;p<v.length;p++)m=v[p],i=d*m[l][T]+3*(b*_*m[l][T+1]+g*A*m[l][T+2])+M*m[l][T+3],s=d*m[l+1][T]+3*(b*_*m[l+1][T+1]+g*A*m[l+1][T+2])+M*m[l+1][T+3],h=d*m[l+2][T]+3*(b*_*m[l+2][T+1]+g*A*m[l+2][T+2])+M*m[l+2][T+3],c=d*m[l+3][T]+3*(b*_*m[l+3][T+1]+g*A*m[l+3][T+2])+M*m[l+3][T+3],o[p]=L*i+3*(R*w*s+f*u*h)+y*c;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)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_,w;i*=3;var A=h*h,M=A*h,g=1-h,b=g*g,d=b*g,u=1-c;for(_=0;_<v.length;_++)w=v[_],m=u*w[s][i]+c*w[s+1][i],p=u*w[s][i+1]+c*w[s+1][i+1],T=u*w[s][i+2]+c*w[s+1][i+1],l=u*w[s][i+3]+c*w[s+1][i+1],o[_]=d*m+3*(b*h*p+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)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_,w;s*=3;var A=c*c,M=A*c,g=1-c,b=g*g,d=b*g,u=1-h;for(_=0;_<v.length;_++)w=v[_],m=u*w[s][i]+h*w[s][i+1],p=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[_]=d*m+3*(b*c*p+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)),c=Math.max(0,Math.min(1,n-s)),m,p,T,l,_=1-c,w=1-h;for(T=0;T<v.length;T++)l=v[T],m=w*l[s][i]+h*l[s][i+1],p=w*l[s+1][i]+h*l[s+1][i+1],o[T]=_*m+c*p;return o}}}}),KG=Xe({"src/traces/carpet/create_i_derivative_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3,t*=3;var m=r*r,p=1-r,T=p*p,l=p*r*2,_=-3*T,w=3*(T-l),A=3*(l-m),M=3*m,g=o*o,b=g*o,d=1-o,u=d*d,y=u*d;for(c=0;c<v.length;c++)h=v[c],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[c]=y*a+3*(u*o*n+d*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,c=1-r,m=c*c,p=c*r*2,T=-3*m,l=3*(m-p),_=3*(p-h),w=3*h,A=1-o;for(i=0;i<v.length;i++)s=v[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,c;t*=3;var m=o*o,p=m*o,T=1-o,l=T*T,_=l*T;for(h=0;h<v.length;h++)c=v[h],a=c[t][e+1]-c[t][e],n=c[t+1][e+1]-c[t+1][e],i=c[t+2][e+1]-c[t+2][e],s=c[t+3][e+1]-c[t+3][e],E[h]=_*a+3*(l*o*n+T*m*i)+p*s;return E}:function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h=1-o;for(i=0;i<v.length;i++)s=v[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}}}}),JG=Xe({"src/traces/carpet/create_j_derivative_evaluator.js"(Z,G){"use strict";G.exports=function(v,x,S){return x&&S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3,t*=3;var m=r*r,p=m*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,d=3*(M-g),u=3*(g-w),y=3*w;for(c=0;c<v.length;c++)h=v[c],a=b*h[t][e]+d*h[t+1][e]+u*h[t+2][e]+y*h[t+3][e],n=b*h[t][e+1]+d*h[t+1][e+1]+u*h[t+2][e+1]+y*h[t+3][e+1],i=b*h[t][e+2]+d*h[t+1][e+2]+u*h[t+2][e+2]+y*h[t+3][e+2],s=b*h[t][e+3]+d*h[t+1][e+3]+u*h[t+2][e+3]+y*h[t+3][e+3],E[c]=_*a+3*(l*r*n+T*m*i)+p*s;return E}:x?function(E,e,t,r,o){E||(E=[]);var a,n,i,s,h,c;e*=3;var m=o*o,p=m*o,T=1-o,l=T*T,_=l*T;for(h=0;h<v.length;h++)c=v[h],a=c[t+1][e]-c[t][e],n=c[t+1][e+1]-c[t][e+1],i=c[t+1][e+2]-c[t][e+2],s=c[t+1][e+3]-c[t][e+3],E[h]=_*a+3*(l*o*n+T*m*i)+p*s;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,n,i,s;t*=3;var h=1-r,c=o*o,m=1-o,p=m*m,T=m*o*2,l=-3*p,_=3*(p-T),w=3*(T-c),A=3*c;for(i=0;i<v.length;i++)s=v[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<v.length;i++)s=v[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}}}}),$G=Xe({"src/traces/carpet/set_convert.js"(Z,G){"use strict";var v=WG(),x=g2().findBin,S=ZG(),E=YG(),e=KG(),t=JG();G.exports=function(o){var a=o._a,n=o._b,i=a.length,s=n.length,h=o.aaxis,c=o.baxis,m=a[0],p=a[i-1],T=n[0],l=n[s-1],_=a[a.length-1]-a[0],w=n[n.length-1]-n[0],A=_*v.RELATIVE_CULL_TOLERANCE,M=w*v.RELATIVE_CULL_TOLERANCE;m-=A,p+=A,T-=M,l+=M,o.isVisible=function(g,b){return g>m&&g<p&&b>T&&b<l},o.isOccluded=function(g,b){return g<m||g>p||b<T||b>l},o.setScale=function(){var g=o._x,b=o._y,d=S(o._xctrl,o._yctrl,g,b,h.smoothing,c.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=E([o._xctrl,o._yctrl],i,s,h.smoothing,c.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,c.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,c.smoothing)},o.i2a=function(g){var b=Math.max(0,Math.floor(g[0]),i-2),d=g[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(g){var b=Math.max(0,Math.floor(g[1]),i-2),d=g[1]-b;return(1-d)*n[b]+d*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)),d=a[b],u=a[b+1];return Math.max(0,Math.min(i-1,b+(g-d)/(u-d)))},o.b2j=function(g){var b=Math.max(0,Math.min(x(g,n),s-2)),d=n[b],u=n[b+1];return Math.max(0,Math.min(s-1,b+(g-d)/(u-d)))},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,d){if(!d&&(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),f=o.evalxy([],u,y);if(d){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),f[0]+=z[0]*R,f[1]+=z[1]*R),L&&(o.dxydj(z,F,O,N,P),f[0]+=z[0]*L,f[1]+=z[1]*L)}return f},o.c2p=function(g,b,d){return[b.c2p(g[0]),d.c2p(g[1])]},o.p2x=function(g,b,d){return[b.p2c(g[0]),d.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,d,u){var y=o.dxydi(null,g,b,d,u),f=o.dadi(g,d);return[y[0]/f,y[1]/f]},o.dxydb=function(g,b,d,u){var y=o.dxydj(null,g,b,d,u),f=o.dbdj(b,u);return[y[0]/f,y[1]/f]},o.dxyda_rough=function(g,b,d){var u=_*(d||.1),y=o.ab2xy(g+u,b,!0),f=o.ab2xy(g-u,b,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dxydb_rough=function(g,b,d){var u=w*(d||.1),y=o.ab2xy(g,b+u,!0),f=o.ab2xy(g,b-u,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dpdx=function(g){return g._m},o.dpdy=function(g){return g._m}}}}),QG=Xe({"src/traces/carpet/calc.js"(Z,G){"use strict";var v=Go(),x=sa().isArray1D,S=UG(),E=jG(),e=qG(),t=VG(),r=GG(),o=Y2(),a=HG(),n=Z2(),i=$G();G.exports=function(h,c){var m=v.getFromId(h,c.xaxis),p=v.getFromId(h,c.yaxis),T=c.aaxis,l=c.baxis,_=c.x,w=c.y,A=[];_&&x(_)&&A.push("x"),w&&x(w)&&A.push("y"),A.length&&n(c,T,l,"a","b",A);var M=c._a=c._a||c.a,g=c._b=c._b||c.b;_=c._x||c.x,w=c._y||c.y;var b={};if(c._cheater){var d=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?g.length:g;_=S(d,u,c.cheaterslope)}c._x=_=o(_),c._y=w=o(w),a(_,M,g),a(w,M,g),i(c),c.setScale();var y=E(_),f=E(w),R=.5*(y[1]-y[0]),L=.5*(y[1]+y[0]),z=.5*(f[1]-f[0]),F=.5*(f[1]+f[0]),N=1.3;return y=[L-R*N,L+R*N],f=[F-z*N,F+z*N],c._extremes[m._id]=v.findExtremes(m,y,{padded:!0}),c._extremes[p._id]=v.findExtremes(p,f,{padded:!0}),e(c,"a","b"),e(c,"b","a"),t(c,T),t(c,l),b.clipsegments=r(c._xctrl,c._yctrl,T,l),b.x=_,b.y=w,b.a=M,b.b=g,[b]}}}),eH=Xe({"src/traces/carpet/index.js"(Z,G){"use strict";G.exports={attributes:PT(),supplyDefaults:OG(),plot:NG(),calc:QG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),tH=Xe({"lib/carpet.js"(Z,G){"use strict";G.exports=eH()}}),K6=Xe({"src/traces/scattercarpet/attributes.js"(Z,G){"use strict";var v=$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;G.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:v(),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}}}),rH=Xe({"src/traces/scattercarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();G.exports=function(i,s,h,c){function m(M,g){return v.coerce(i,s,a,M,g)}m("carpet"),s.xaxis="x",s.yaxis="y";var p=m("a"),T=m("b"),l=Math.min(p.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var _=l<x.PTS_LINESONLY?"lines+markers":"lines";m("mode",_),S.hasMarkers(s)&&E(i,s,h,c,m,{gradient:!0}),S.hasLines(s)&&(e(i,s,h,c,m,{backoff:!0}),t(i,s,m),m("connectgaps")),S.hasText(s)&&r(i,s,c,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(i,s,h,m),S.hasLines(s)||t(i,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),aH=Xe({"src/traces/scattercarpet/format_labels.js"(Z,G){"use strict";G.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=Xe({"src/traces/carpet/lookup_carpetid.js"(Z,G){"use strict";G.exports=function(v,x){for(var S=v._fullData.length,E,e=0;e<S;e++){var t=v._fullData[e];if(t.index!==x.index&&t.type==="carpet"&&(E||(E=t),t.carpet===x.carpet))return t}return E}}}),iH=Xe({"src/traces/scattercarpet/calc.js"(Z,G){"use strict";var v=rs(),x=Fd(),S=Av(),E=Od(),e=Bd().calcMarkerSize,t=IT();G.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),c,m,p=!1;for(i=0;i<s;i++)if(c=a.a[i],m=a.b[i],v(c)&&v(m)){var T=n.ab2xy(+c,+m,!0),l=n.isVisible(+c,+m);l||(p=!0),h[i]={x:T[0],y:T[1],a:c,b:m,vis:l}}else h[i]={x:!1,y:!1};return a._needsCull=p,h[0].carpet=n,h[0].trace=a,e(a,s),x(o,a),S(h,a),E(h,a),h}}}}),nH=Xe({"src/traces/scattercarpet/plot.js"(Z,G){"use strict";var v=s1(),x=Go(),S=es();G.exports=function(e,t,r,o){var a,n,i,s=r[0][0].carpet,h=x.getFromId(e,s.xaxis||"x"),c=x.getFromId(e,s.yaxis||"y"),m={xaxis:h,yaxis:c,plot:t.plot};for(a=0;a<r.length;a++)n=r[a][0].trace,n._xA=h,n._yA=c;for(v(e,m,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)}}}),oH=Xe({"src/traces/scattercarpet/hover.js"(Z,G){"use strict";var v=u1(),x=sa().fillText;G.exports=function(E,e,t,r){var o=v(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 c=a.cd[a.index];a.a=c.a,a.b=c.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var m=a.trace,p=m._carpet,T=m._module.formatLabels(c,m);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(!m.hovertemplate){var w=c.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&_(p.aaxis,c.a),A.indexOf("b")!==-1&&_(p.baxis,c.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&x(c,m,l),a.extraText=l.join("<br>")}return o}}}),sH=Xe({"src/traces/scattercarpet/event_data.js"(Z,G){"use strict";G.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}}}),lH=Xe({"src/traces/scattercarpet/index.js"(Z,G){"use strict";G.exports={attributes:K6(),supplyDefaults:rH(),colorbar:pp(),formatLabels:aH(),calc:iH(),plot:nH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:oH(),selectPoints:c1(),eventData:sH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),uH=Xe({"lib/scattercarpet.js"(Z,G){"use strict";G.exports=lH()}}),J6=Xe({"src/traces/contourcarpet/attributes.js"(Z,G){"use strict";var v=p1(),x=V_(),S=ku(),E=Qo().extendFlat,e=x.contours;G.exports=E({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.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=Xe({"src/traces/contourcarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=J6(),E=TS(),e=s3(),t=l3();G.exports=function(o,a,n,i){function s(p,T){return v.coerce(o,a,S,p,T)}function h(p){return v.coerce2(o,a,S,p)}if(s("carpet"),o.a&&o.b){var c=x(o,a,s,i,"a","b");if(!c){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?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")}}}),cH=Xe({"src/traces/contourcarpet/calc.js"(Z,G){"use strict";var v=Tp(),x=sa(),S=Z2(),E=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),n=dS();G.exports=function(h,c){var m=c._carpetTrace=a(h,c);if(!(!m||!m.visible||m.visible==="legendonly")){if(!c.a||!c.b){var p=h.data[m.index],T=h.data[c.index];T.a||(T.a=p.a),T.b||(T.b=p.b),o(T,c,c._defaultColor,h._fullLayout)}var l=i(h,c);return n(c,c._z),l}};function i(s,h){var c=h._carpetTrace,m=c.aaxis,p=c.baxis,T,l,_,w,A,M,g;m._minDtick=0,p._minDtick=0,x.isArray1D(h.z)&&S(h,m,p,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?p.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),d=h.xtype==="scaled"?"":T,u=r(h,d,l,_,b,m),y=h.ytype==="scaled"?"":w,f=r(h,y,A,M,g.length,p),R={a:u,b:f,z:g};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:g,containerStr:"",cLetter:"z"}),[R]}}}),fH=Xe({"src/traces/carpet/axis_aligned_line.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E,e){var t,r,o,a,n,i,s,h,c,m,p,T,l,_=v(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,d=_==="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)),f=_==="a"?function(se){return x.evalxy([],se,y)}:function(se){return x.evalxy([],y,se)};A&&(o=Math.max(0,Math.min(u-2,y)),a=y-o,r=_==="a"?function(se,le){return x.dxydi([],se,o,le,a)}:function(se,le){return x.dxydj([],o,se,a,le)});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=f(R);var $=[[s]];for(t=B;t*z<X*z;t+=z)n=[],p=U(R,t),T=P(L,t+z),l=T-p,i=Math.max(0,Math.min(d-2,Math.floor(.5*(p+T)))),h=f(T),A&&(c=r(i,p-i),m=r(i,T-i),n.push([s[0]+c[0]/3*l,s[1]+c[1]/3*l]),n.push([h[0]-m[0]/3*l,h[1]-m[1]/3*l])),n.push(h),$.push(n),s=h;return $}}}),hH=Xe({"src/traces/contourcarpet/plot.js"(Z,G){"use strict";var v=Hn(),x=Z6(),S=Y6(),E=es(),e=sa(),t=mS(),r=gS(),o=u3(),a=H_(),n=_S(),i=yS(),s=xS(),h=IT(),c=fH();G.exports=function(d,u,y,f){var R=u.xaxis,L=u.yaxis;e.makeTraceGroups(f,y,"contour").each(function(z){var F=v.select(this),N=z[0],O=N.trace,P=O._carpetTrace=h(d,O),U=d.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var B=N.a,X=N.b,$=O.contours,se=i($,u,N),le=$.type==="constraint",fe=$._operation,V=le?fe==="="?"lines":"fill":$.coloring;function Y(De){var ze=P.ab2xy(De[0],De[1],!0);return[R.c2p(ze[0]),L.c2p(ze[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(se);var q=(B[B.length-1]-B[0])*1e-8,oe=(X[X.length-1]-X[0])*1e-8;r(se,q,oe);var ae=se;$.type==="constraint"&&(ae=n(se,fe)),m(se,Y);var j,Q,re,ce,be=[];for(ce=U.clipsegments.length-1;ce>=0;ce--)j=U.clipsegments[ce],Q=x([],j.x,R.c2p),re=x([],j.y,L.c2p),Q.reverse(),re.reverse(),be.push(S(Q,re,j.bicubic));var Ae="M"+be.join("L")+"Z";A(F,U.clipsegments,R,L,le,V),M(O,F,R,L,ae,ee,Y,P,U,V,Ae),p(F,se,d,N,$,u,P),E.setClipUrl(F,P._clipPathId,d)})};function m(b,d){var u,y,f,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=[],f=0;f<O.length;f++)F[f]=d(O[f]);L.push(F)}for(y=0;y<R.paths.length;y++){for(O=R.paths[y],N=[],f=0;f<O.length;f++)N[f]=d(O[f]);z.push(N)}}}function p(b,d,u,y,f,R,L){var z=u._context.staticPlot,F=e.ensureSingle(b,"g","contourlines"),N=f.showlines!==!1,O=f.showlabels,P=N&&O,U=o.createLines(F,N||O,d,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,se=R.yaxis,le=$._length,fe=se._length,V=[[[0,0],[le,0],[le,fe],[0,fe]]],Y=[];e.clearLocationCache();var ee=o.labelFormatter(u,y),q=E.tester.append("text").attr("data-notex",1).call(E.font,f.labelfont),oe={left:0,right:le,center:le/2,top:0,bottom:fe,middle:fe/2},ae=Math.sqrt(le*le+fe*fe),j=a.LABELDISTANCE*ae/Math.max(1,d.length/a.LABELINCREASE);U.each(function(Q){var re=o.calcTextOpts(Q.level,ee,q,u);v.select(this).selectAll("path").each(function(ce){var be=this,Ae=e.getVisibleSegment(be,oe,re.height/2);if(Ae&&(T(be,ce,Q,Ae,L,re.height),!(Ae.len<(re.width+re.height)*a.LABELMIN)))for(var De=Math.min(Math.ceil(Ae.len/j),a.LABELMAX),ze=0;ze<De;ze++){var Ze=o.findBestTextLocation(be,Ae,re,Y,oe);if(!Ze)break;o.addLabelData(Ze,re,Y,V)}})}),q.remove(),o.drawLabels(X,Y,u,B,P?V:null)}O&&!N&&U.remove()}function T(b,d,u,y,f,R){for(var L,z=0;z<u.pedgepaths.length;z++)d===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=f.a[0],N=f.a[f.a.length-1],O=f.b[0],P=f.b[f.b.length-1];function U(le,fe){var V=0,Y,ee=.1;return(Math.abs(le[0]-F)<ee||Math.abs(le[0]-N)<ee)&&(Y=_(f.dxydb_rough(le[0],le[1],ee)),V=Math.max(V,R*w(fe,Y)/2)),(Math.abs(le[1]-O)<ee||Math.abs(le[1]-P)<ee)&&(Y=_(f.dxyda_rough(le[0],le[1],ee)),V=Math.max(V,R*w(fe,Y)/2)),V}var B=l(b,0,1),X=l(b,y.total,y.total-1),$=U(L[0],B),se=y.total-U(L[L.length-1],X);y.min<$&&(y.min=$),y.max>se&&(y.max=se),y.len=y.max-y.min}function l(b,d,u){var y=b.getPointAtLength(d),f=b.getPointAtLength(u),R=f.x-y.x,L=f.y-y.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function _(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),y=Math.sqrt(1-u*u);return y/u}function A(b,d,u,y,f,R){var L,z,F,N,O=e.ensureSingle(b,"g","contourbg"),P=O.selectAll("path").data(R==="fill"&&!f?[0]:[]);P.enter().append("path"),P.exit().remove();var U=[];for(N=0;N<d.length;N++)L=d[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,d,u,y,f,R,L,z,F,N,O){var P=N==="fill";P&&s(f,b.contours);var U=e.ensureSingle(d,"g","contourfill"),B=U.selectAll("path").data(P?f:[]);B.enter().append("path"),B.exit().remove(),B.each(function(X){var $=(X.prefixBoundary?O:"")+g(b,X,R,L,z,F,u,y);$?v.select(this).attr("d",$).style("stroke","none"):v.select(this).remove()})}function g(b,d,u,y,f,R,L,z){var F,N="",O=d.edgepaths.map(function(re,ce){return ce}),P=!0,U,B,X,$,se,le,fe=Math.abs(u[0][0]-u[2][0])*1e-4,V=Math.abs(u[0][1]-u[2][1])*1e-4;function Y(re){return Math.abs(re[1]-u[0][1])<V}function ee(re){return Math.abs(re[1]-u[2][1])<V}function q(re){return Math.abs(re[0]-u[0][0])<fe}function oe(re){return Math.abs(re[0]-u[2][0])<fe}function ae(re,ce){var be,Ae,De,ze,Ze="";for(Y(re)&&!oe(re)||ee(re)&&!q(re)?(ze=f.aaxis,De=c(f,R,[re[0],ce[0]],.5*(re[1]+ce[1]))):(ze=f.baxis,De=c(f,R,.5*(re[0]+ce[0]),[re[1],ce[1]])),be=1;be<De.length;be++)for(Ze+=ze.smoothing?"C":"L",Ae=0;Ae<De[be].length;Ae++){var at=De[be][Ae];Ze+=[L.c2p(at[0]),z.c2p(at[1])]+" "}return Ze}for(F=0,U=null;O.length;){var j=d.edgepaths[F][0];for(U&&(N+=ae(U,j)),le=E.smoothopen(d.edgepaths[F].map(y),d.smoothing),N+=P?le:le.replace(/^M/,"L"),O.splice(O.indexOf(F),1),U=d.edgepaths[F][d.edgepaths[F].length-1],$=-1,X=0;X<4;X++){if(!U){e.log("Missing end?",F,d);break}for(Y(U)&&!oe(U)?B=u[1]:q(U)?B=u[0]:ee(U)?B=u[3]:oe(U)&&(B=u[2]),se=0;se<d.edgepaths.length;se++){var Q=d.edgepaths[se][0];Math.abs(U[0]-B[0])<fe?Math.abs(U[0]-Q[0])<fe&&(Q[1]-U[1])*(B[1]-Q[1])>=0&&(B=Q,$=se):Math.abs(U[1]-B[1])<V?Math.abs(U[1]-Q[1])<V&&(Q[0]-U[0])*(B[0]-Q[0])>=0&&(B=Q,$=se):e.log("endpt to newendpt is not vert. or horz.",U,B,Q)}if($>=0)break;N+=ae(U,B),U=B}if($===d.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<d.paths.length;F++)N+=E.smoothclosed(d.paths[F].map(y),d.smoothing);return N}}}),pH=Xe({"src/traces/contourcarpet/index.js"(Z,G){"use strict";G.exports={attributes:J6(),supplyDefaults:$6(),colorbar:f3(),calc:cH(),plot:hH(),style:c3(),moduleType:"trace",name:"contourcarpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),dH=Xe({"lib/contourcarpet.js"(Z,G){"use strict";G.exports=pH()}}),RT=Xe({"src/traces/ohlc/attributes.js"(Z,G){"use strict";var v=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:v({},i.color,{dflt:h}),width:i.width,dash:t,editType:"style"},editType:"style"}}G.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:v({},i.width,{}),dash:v({},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:v({},r.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:x.zorder}}}),Q6=Xe({"src/traces/ohlc/ohlc_defaults.js"(Z,G){"use strict";var v=so(),x=sa();G.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=v.getComponentMethod("calendars","handleTraceDefaults");if(h(E,e,["x"],r),!!(a&&n&&i&&s)){var c=Math.min(a.length,n.length,i.length,s.length);return o&&(c=Math.min(c,x.minRowLength(o))),e._length=c,c}}}}),vH=Xe({"src/traces/ohlc/defaults.js"(Z,G){"use strict";var v=sa(),x=Q6(),S=Qd(),E=RT();G.exports=function(r,o,a,n){function i(h,c){return v.coerce(r,o,E,h,c)}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=Xe({"src/traces/ohlc/calc.js"(Z,G){"use strict";var v=sa(),x=v._,S=Go(),E=tv(),e=Hs().BADNUM;function t(n,i){var s=S.getFromId(n,i.xaxis),h=S.getFromId(n,i.yaxis),c=a(n,s,i),m=i._minDiff;i._minDiff=null;var p=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var l=o(n,i,p,T,h,r);return i._extremes[s._id]=S.findExtremes(s,T,{vpad:m/2}),l.length?(v.extendFlat(l[0].t,{wHover:m/2,tickLen:c}),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,c,m){for(var p=c.makeCalcdata(i,"open"),T=c.makeCalcdata(i,"high"),l=c.makeCalcdata(i,"low"),_=c.makeCalcdata(i,"close"),w=v.isArrayOrTypedArray(i.text),A=v.isArrayOrTypedArray(i.hovertext),M=!0,g=null,b=!!i.xperiodalignment,d=[],u=0;u<h.length;u++){var y=h[u],f=p[u],R=T[u],L=l[u],z=_[u];if(y!==e&&f!==e&&R!==e&&L!==e&&z!==e){z===f?g!==null&&z!==g&&(M=z>g):M=z>f,g=z;var F=m(f,R,L,z);F.pos=y,F.yc=(f+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]),d.push(F)}else d.push({pos:y,empty:!0})}return i._extremes[c._id]=S.findExtremes(c,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),d}function a(n,i,s){var h=s._minDiff;if(!h){var c=n._fullData,m=[];h=1/0;var p;for(p=0;p<c.length;p++){var T=c[p];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===i._id){m.push(T);var l=i.makeCalcdata(T,"x");T._origX=l;var _=E(s,i,"x",l).vals;T._xcalc=_;var w=v.distinctVals(_).minDiff;w&&isFinite(w)&&(h=Math.min(h,w))}}for(h===1/0&&(h=1),p=0;p<m.length;p++)m[p]._minDiff=h}return h*s.tickwidth}G.exports={calc:t,calcCommon:o}}}),mH=Xe({"src/traces/ohlc/plot.js"(Z,G){"use strict";var v=Hn(),x=sa();G.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=v.select(this),h=i[0],c=h.t,m=h.trace;if(m.visible!==!0||c.empty){s.remove();return}var p=c.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-p,!0),w=a.c2p(l.pos+p,!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),d=o.c2p(l.c,!0);return"M"+_+","+M+"H"+A+"M"+A+","+g+"V"+b+"M"+w+","+d+"H"+A})})}}}),gH=Xe({"src/traces/ohlc/style.js"(Z,G){"use strict";var v=Hn(),x=es(),S=$n();G.exports=function(e,t,r){var o=r||v.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;v.select(this).selectAll("path").each(function(i){if(!i.empty){var s=n[i.dir].line;v.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=Xe({"src/traces/ohlc/hover.js"(Z,G){"use strict";var v=Go(),x=sa(),S=rf(),E=$n(),e=sa().fillText,t=d1(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,h,c,m){var p=s.cd,T=p[0].trace;return T.hoverlabel.split?n(s,h,c,m):i(s,h,c,m)}function a(s,h,c,m){var p=s.cd,T=s.xa,l=p[0].trace,_=p[0].t,w=l.type,A=w==="ohlc"?"l":"min",M=w==="ohlc"?"h":"max",g,b,d=_.bPos||0,u=function(X){return X.pos+d-h},y=_.bdPos||_.tickLen,f=_.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($-f,$+f,g)}function z(X){var $=X[A],se=X[M];return $===se||S.inbox($-c,se-c,g)}function F(X){return(L(X)+z(X))/2}var N=S.getDistanceFunction(m,L,z,F);if(S.getClosest(p,N,s),s.index===!1)return null;var O=p[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+d-y,!0),s.x1=T.c2p(O.pos+d+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,c,m){var p=s.cd,T=s.ya,l=p[0].trace,_=p[0].t,w=[],A=a(s,h,c,m);if(!A)return[];var M=p[A.index],g=M.hi||l.hoverinfo||"";if(g==="none"||g==="skip")return[];for(var b=["high","open","close","low"],d={},u=0;u<b.length;u++){var y=b[u],f=l[y][A.index],R=T.c2p(f,!0),L;f in d?(L=d[f],L.yLabel+="<br>"+_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat)):(L=x.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=f,L.yLabel=_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat),L.name="",w.push(L),d[f]=L)}return w}function i(s,h,c,m){var p=s.cd,T=s.ya,l=p[0].trace,_=p[0].t,w=a(s,h,c,m);if(!w)return[];var A=w.index,M=p[A],g=w.index=M.i,b=M.dir;function d(F){return _.labels[F]+v.hoverLabelText(T,l[F][g],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",y=u.split("+"),f=u==="all",R=f||y.indexOf("y")!==-1,L=f||y.indexOf("text")!==-1,z=R?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return L&&e(M,l,z),w.extraText=z.join("<br>"),w.y0=w.y1=T.c2p(M.yc,!0),[w]}G.exports={hoverPoints:o,hoverSplit:n,hoverOnPoints:i}}}),rk=Xe({"src/traces/ohlc/select.js"(Z,G){"use strict";G.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}}}),yH=Xe({"src/traces/ohlc/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"ohlc",basePlotModule:Kf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:RT(),supplyDefaults:vH(),calc:ek().calc,plot:mH(),style:gH(),hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),_H=Xe({"lib/ohlc.js"(Z,G){"use strict";G.exports=yH()}}),ak=Xe({"src/traces/candlestick/attributes.js"(Z,G){"use strict";var v=sa().extendFlat,x=tf().axisHoverFormat,S=RT(),E=N_();function e(t){return{line:{color:v({},E.line.color,{dflt:t}),width:E.line.width,editType:"style"},fillcolor:E.fillcolor,editType:"style"}}G.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:v({},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:v({},E.whiskerwidth,{dflt:0}),hoverlabel:S.hoverlabel,zorder:E.zorder}}}),xH=Xe({"src/traces/candlestick/defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=Q6(),E=Qd(),e=ak();G.exports=function(o,a,n,i){function s(c,m){return v.coerce(o,a,e,c,m)}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))}}}),bH=Xe({"src/traces/candlestick/calc.js"(Z,G){"use strict";var v=sa(),x=Go(),S=tv(),E=ek().calcCommon;G.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?(v.extendFlat(h[0].t,{num:o._numBoxes,dPos:v.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}}}}),wH=Xe({"src/traces/candlestick/index.js"(Z,G){"use strict";G.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:xH(),calc:bH(),plot:H2().plot,layerName:"boxlayer",style:W2().style,hoverPoints:tk().hoverPoints,selectPoints:rk()}}}),TH=Xe({"lib/candlestick.js"(Z,G){"use strict";G.exports=wH()}}),ik=Xe({"src/plots/polar/set_convert.js"(Z,G){"use strict";var v=sa(),x=wv(),S=v.deg2rad,E=v.rad2deg;G.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],c=i.innerRadius,m=(i.radius-c)/(h-s),p=c/m,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)+p},a.g2c=function(l){return a.l2c(l+s-p)},a.g2p=function(l){return l*m},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(c,m){return t(s(c),m)},a.c2d=function(c,m){return h(r(c,m))}}a.makeCalcdata=function(c,m){var p=c[m],T=c._length,l,_,w=function(d){return a.d2c(d,c.thetaunit)};if(p)for(l=new Array(T),_=0;_<T;_++)l[_]=w(p[_]);else{var A=m+"0",M="d"+m,g=A in c?w(c[A]):0,b=c[M]?w(c[M]):(a.period||2*Math.PI)/T;for(l=new Array(T),_=0;_<T;_++)l[_]=g+_*b}return l},a.setGeometry=function(){var c=n.sector,m=c.map(S),p={clockwise:-1,counterclockwise:1}[a.direction],T=S(a.rotation),l=function(u){return p*u+T},_=function(u){return(u-T)/p},w,A,M,g;switch(i){case"linear":A=w=v.identity,g=S,M=E,a.range=v.isFullCircle(m)?[c[0],c[0]+360]:m.map(_).map(E);break;case"category":var b=a._categories.length,d=a.period?Math.max(a.period,b):b;d===0&&(d=1),A=g=function(u){return u*2*Math.PI/d},w=M=function(u){return u*d/Math.PI/2},a.range=[0,d];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=Xe({"src/plots/polar/constants.js"(Z,G){"use strict";G.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=Xe({"src/plots/polar/helpers.js"(Z,G){"use strict";var v=sa(),x=I_().tester,S=v.findIndexOfMin,E=v.isAngleInsideSector,e=v.angleDelta,t=v.angleDist;function r(_,w,A,M,g){if(!E(w,M))return!1;var b,d;A[0]<A[1]?(b=A[0],d=A[1]):(b=A[1],d=A[0]);var u=x(s(b,M[0],M[1],g)),y=x(s(d,M[0],M[1],g)),f=[_*Math.cos(w),_*Math.sin(w)];return y.contains(f)&&!u.contains(f)}function o(_,w,A,M){var g,b,d=M[0],u=M[1],y=m(Math.sin(w)-Math.sin(_)),f=m(Math.cos(w)-Math.cos(_)),R=Math.tan(A),L=m(1/R),z=y/f,F=u-z*d;return L?y&&f?(g=F/(R-z),b=R*g):f?(g=u*L,b=u):(g=d,b=d*R):y&&f?(g=0,b=F):f?(g=0,b=u):g=b=NaN,[g,b]}function a(_,w,A,M){var g=-w*A,b=w*w+1,d=2*(w*g-A),u=g*g+A*A-_*_,y=Math.sqrt(d*d-4*b*u),f=(-d+y)/(2*b),R=(-d-y)/(2*b);return[[f,w*f+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=[],d,u;function y(U){return[_*Math.cos(U),_*Math.sin(U)]}function f(U,B,X){return o(U,B,X,y(U))}function R(U){return v.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=f(M[z],M[R(z-1)],w);for(b.push(F),d=z,u=0;u<g;d++,u++){var N=M[R(d)];if(!L(N))break;b.push(y(N))}var O=S(M,function(U){return L(U)?t(U,A):1/0}),P=f(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 v.isFullCircle([w,A])?n(_,M):i(_,w,A,M)}function h(_,w,A,M){for(var g=1/0,b=1/0,d=s(_,w,A,M),u=0;u<d.length;u++){var y=d[u];g=Math.min(g,y[0]),b=Math.min(b,-y[1])}return[g,b]}function c(_,w){var A=function(b){var d=e(b,_);return d>0?d:1/0},M=S(w,A),g=v.mod(M+1,w.length);return[w[M],w[g]]}function m(_){return Math.abs(_)>1e-10?_:0}function p(_,w,A){w=w||0,A=A||0;for(var M=_.length,g=new Array(M),b=0;b<M;b++){var d=_[b];g[b]=[w+d[0],A-d[1]]}return g}function T(_,w,A,M,g,b){var d=s(_,w,A,M);return"M"+p(d,g,b).join("L")}function l(_,w,A,M,g,b,d){var u,y;_<w?(u=_,y=w):(u=w,y=_);var f=p(s(u,A,M,g),b,d),R=p(s(y,A,M,g),b,d);return"M"+R.reverse().join("L")+"M"+f.join("L")}G.exports={isPtInsidePolygon:r,findPolygonOffset:h,findEnclosingVertexAngles:c,findIntersectionXY:o,findXYatLength:a,clampTiny:m,pathPolygon:T,pathPolygonAnnulus:l}}}),nk=Xe({"src/plots/smith/helpers.js"(Z,G){"use strict";function v(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],c=S(r,x([n,o])),m=c[0],p=c[1];if(o===0)return["M"+s+","+h,"L"+m+","+p].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+p].join(" ")}function t(r,o,a,n){var i=E(r,1/(o+1)),s=S(r,x([o,a])),h=s[0],c=s[1],m=S(r,x([o,n])),p=m[0],T=m[1];if(v(a)!==v(n)){var l=S(r,x([o,0])),_=l[0],w=l[1];return["M"+h+","+c,"A"+i+","+i+" 0 0,"+(0<a?0:1)+" "+_+","+w,"A"+i+","+i+" 0 0,"+(n<0?0:1)+p+","+T].join(" ")}return["M"+h+","+c,"A"+i+","+i+" 0 0,"+(n<a?0:1)+" "+p+","+T].join(" ")}G.exports={smith:x,reactanceArc:e,resistanceArc:t,smithTransform:S}}}),ok=Xe({"src/plots/polar/polar.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=so(),E=sa(),e=E.strRotate,t=E.strTranslate,r=$n(),o=es(),a=bc(),n=Go(),i=wv(),s=ik(),h=Yd().doAutoRange,c=P5(),m=Ap(),p=rf(),T=K0(),l=Af().prepSelect,_=Af().selectOnClick,w=Af().clearOutline,A=Kd(),M=C_(),g=P_().redrawReglTraces,b=uh().MID_SHIFT,d=DT(),u=zT(),y=nk(),f=y.smith,R=y.reactanceArc,L=y.resistanceArc,z=y.smithTransform,F=E._,N=E.mod,O=E.deg2rad,P=E.rad2deg;function U(fe,V,Y){this.isSmith=Y||!1,this.id=V,this.gd=fe,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var ee=fe._fullLayout,q="clip"+ee._uid+V;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",V),this.getHole=function(oe){return this.isSmith?0:oe.hole},this.getSector=function(oe){return this.isSmith?[0,360]:oe.sector},this.getRadial=function(oe){return this.isSmith?oe.realaxis:oe.radialaxis},this.getAngular=function(oe){return this.isSmith?oe.imaginaryaxis:oe.angularaxis},Y||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=U.prototype;G.exports=function(V,Y,ee){return new U(V,Y,ee)},B.plot=function(fe,V){for(var Y=this,ee=V[Y.id],q=!1,oe=0;oe<fe.length;oe++){var ae=fe[oe][0].trace;if(ae.cliponaxis===!1){q=!0;break}}Y._hasClipOnAxisFalse=q,Y.updateLayers(V,ee),Y.updateLayout(V,ee),a.generalUpdatePerTraceModule(Y.gd,Y,fe,ee),Y.updateFx(V,ee),Y.isSmith&&(delete ee.realaxis.range,delete ee.imaginaryaxis.range)},B.updateLayers=function(fe,V){var Y=this,ee=Y.isSmith,q=Y.layers,oe=Y.getRadial(V),ae=Y.getAngular(V),j=d.layerNames,Q=j.indexOf("frontplot"),re=j.slice(0,Q),ce=ae.layer==="below traces",be=oe.layer==="below traces";ce&&re.push("angular-line"),be&&re.push("radial-line"),ce&&re.push("angular-axis"),be&&re.push("radial-axis"),re.push("frontplot"),ce||re.push("angular-line"),be||re.push("radial-line"),ce||re.push("angular-axis"),be||re.push("radial-axis");var Ae=(ee?"smith":"polar")+"sublayer",De=Y.framework.selectAll("."+Ae).data(re,String);De.enter().append("g").attr("class",function(ze){return Ae+" "+ze}).each(function(ze){var Ze=q[ze]=v.select(this);switch(ze){case"frontplot":ee||Ze.append("g").classed("barlayer",!0),Ze.append("g").classed("scatterlayer",!0);break;case"backplot":Ze.append("g").classed("maplayer",!0);break;case"plotbg":q.bg=Ze.append("path");break;case"radial-grid":Ze.style("fill","none");break;case"angular-grid":Ze.style("fill","none");break;case"radial-line":Ze.append("line").style("fill","none");break;case"angular-line":Ze.append("path").style("fill","none");break}}),De.order()},B.updateLayout=function(fe,V){var Y=this,ee=Y.layers,q=fe._size,oe=Y.getRadial(V),ae=Y.getAngular(V),j=V.domain.x,Q=V.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]),ce=Y.yLength=q.h*(Q[1]-Q[0]),be=Y.getSector(V);Y.sectorInRad=be.map(O);var Ae=Y.sectorBBox=$(be),De=Ae[2]-Ae[0],ze=Ae[3]-Ae[1],Ze=ce/re,at=Math.abs(ze/De),nt,rt,st,Me,ye;Ze>at?(nt=re,rt=re*at,ye=(ce-rt)/q.h/2,st=[j[0],j[1]],Me=[Q[0]+ye,Q[1]-ye]):(nt=ce/at,rt=ce,ye=(re-nt)/q.w/2,st=[j[0]+ye,j[1]-ye],Me=[Q[0],Q[1]]),Y.xLength2=nt,Y.yLength2=rt,Y.xDomain2=st,Y.yDomain2=Me;var he=Y.xOffset2=q.l+q.w*st[0],Oe=Y.yOffset2=q.t+q.h*(1-Me[1]),tt=Y.radius=nt/De,ot=Y.innerRadius=Y.getHole(V)*tt,Qe=Y.cx=he-tt*Ae[0],Pt=Y.cy=Oe+tt*Ae[3],It=Y.cxx=Qe-he,qt=Y.cyy=Pt-Oe,Wt=oe.side,kr;Wt==="counterclockwise"?(kr=Wt,Wt="top"):Wt==="clockwise"&&(kr=Wt,Wt="bottom"),Y.radialAxis=Y.mockAxis(fe,V,oe,{_id:"x",side:Wt,_trueSide:kr,domain:[ot/q.w,tt/q.w]}),Y.angularAxis=Y.mockAxis(fe,V,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),Y.doAutoRange(fe,V),Y.updateAngularAxis(fe,V),Y.updateRadialAxis(fe,V),Y.updateRadialAxisTitle(fe,V),Y.xaxis=Y.mockCartesianAxis(fe,V,{_id:"x",domain:st}),Y.yaxis=Y.mockCartesianAxis(fe,V,{_id:"y",domain:Me});var mr=Y.pathSubplot();Y.clipPaths.forTraces.select("path").attr("d",mr).attr("transform",t(It,qt)),ee.frontplot.attr("transform",t(he,Oe)).call(o.setClipUrl,Y._hasClipOnAxisFalse?null:Y.clipIds.forTraces,Y.gd),ee.bg.attr("d",mr).attr("transform",t(Qe,Pt)).call(r.fill,V.bgcolor)},B.mockAxis=function(fe,V,Y,ee){var q=E.extendFlat({},Y,ee);return s(q,V,fe),q},B.mockCartesianAxis=function(fe,V,Y){var ee=this,q=ee.isSmith,oe=Y._id,ae=E.extendFlat({type:"linear"},Y);i(ae,fe);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var Q=ee.sectorBBox,re=j[oe],ce=ee.radialAxis._rl,be=(ce[1]-ce[0])/(1-ee.getHole(V));ae.range=[Q[re[0]]*be,Q[re[1]]*be]},ae.isPtWithinRange=oe==="x"&&!q?function(Q){return ee.isPtInside(Q)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(fe,V){var Y=this,ee=Y.gd,q=Y.radialAxis,oe=Y.getRadial(V);h(ee,q);var ae=q.range;if(oe.range=ae.slice(),oe._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(fe,V){var Y=this,ee=Y.gd,q=Y.layers,oe=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getRadial(V),ce=N(Y.getSector(V)[0],360),be=Y.radialAxis,Ae=ae<oe,De=Y.isSmith;De||(Y.fillViewInitialKey("radialaxis.angle",re.angle),Y.fillViewInitialKey("radialaxis.range",be.range.slice()),be.setGeometry()),be.tickangle==="auto"&&ce>90&&ce<=270&&(be.tickangle=180);var ze=De?function(tt){var ot=z(Y,f([tt.x,0]));return t(ot[0]-j,ot[1]-Q)}:function(tt){return t(be.l2p(tt.x)+ae,0)},Ze=De?function(tt){return L(Y,tt.x,-1/0,1/0)}:function(tt){return Y.pathArc(be.r2p(tt.x)+ae)},at=X(re);if(Y.radialTickLayout!==at&&(q["radial-axis"].selectAll(".xtick").remove(),Y.radialTickLayout=at),Ae){be.setScale();var nt=0,rt=De?(be.tickvals||[]).filter(function(tt){return tt>=0}).map(function(tt){return n.tickText(be,tt,!0,!1)}):n.calcTicks(be),st=De?rt:n.clipEnds(be,rt),Me=n.getTickSigns(be)[2];De&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Me=-Me),be.ticks==="top"&&be.side==="top"&&(nt=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(nt=be.ticklen)),n.drawTicks(ee,be,{vals:rt,layer:q["radial-axis"],path:n.makeTickPath(be,0,Me),transFn:ze,crisp:!1}),n.drawGrid(ee,be,{vals:st,layer:q["radial-grid"],path:Ze,transFn:E.noop,crisp:!1}),n.drawLabels(ee,be,{vals:rt,layer:q["radial-axis"],transFn:ze,labelFns:n.makeLabelFns(be,nt)})}var ye=Y.radialAxisAngle=Y.vangles?P(se(O(re.angle),Y.vangles)):re.angle,he=t(j,Q),Oe=he+e(-ye);le(q["radial-axis"],Ae&&(re.showticklabels||re.ticks),{transform:Oe}),le(q["radial-grid"],Ae&&re.showgrid,{transform:De?"":he}),le(q["radial-line"].select("line"),Ae&&re.showline,{x1:De?-oe:ae,y1:0,x2:oe,y2:0,transform:Oe}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateRadialAxisTitle=function(fe,V,Y){if(!this.isSmith){var ee=this,q=ee.gd,oe=ee.radius,ae=ee.cx,j=ee.cy,Q=ee.getRadial(V),re=ee.id+"title",ce=0;if(Q.title){var be=o.bBox(ee.layers["radial-axis"].node()).height,Ae=Q.title.font.size,De=Q.side;ce=De==="top"?Ae:De==="counterclockwise"?-(be+Ae*.4):be+Ae*.8}var ze=Y!==void 0?Y:ee.radialAxisAngle,Ze=O(ze),at=Math.cos(Ze),nt=Math.sin(Ze),rt=ae+oe/2*at+ce*nt,st=j-oe/2*nt+ce*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:rt,y:st,"text-anchor":"middle"},transform:{rotate:-ze}})}},B.updateAngularAxis=function(fe,V){var Y=this,ee=Y.gd,q=Y.layers,oe=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getAngular(V),ce=Y.angularAxis,be=Y.isSmith;be||(Y.fillViewInitialKey("angularaxis.rotation",re.rotation),ce.setGeometry(),ce.setScale());var Ae=be?function(ot){var Qe=z(Y,f([0,ot.x]));return Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2}:function(ot){return ce.t2g(ot.x)};ce.type==="linear"&&ce.thetaunit==="radians"&&(ce.tick0=P(ce.tick0),ce.dtick=P(ce.dtick));var De=function(ot){return t(j+oe*Math.cos(ot),Q-oe*Math.sin(ot))},ze=be?function(ot){var Qe=z(Y,f([0,ot.x]));return t(Qe[0],Qe[1])}:function(ot){return De(Ae(ot))},Ze=be?function(ot){var Qe=z(Y,f([0,ot.x])),Pt=Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2;return t(Qe[0],Qe[1])+e(-P(Pt))}:function(ot){var Qe=Ae(ot);return De(Qe)+e(-P(Qe))},at=be?function(ot){return R(Y,ot.x,0,1/0)}:function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe),It=Math.sin(Qe);return"M"+[j+ae*Pt,Q-ae*It]+"L"+[j+oe*Pt,Q-oe*It]},nt=n.makeLabelFns(ce,0),rt=nt.labelStandoff,st={};st.xFn=function(ot){var Qe=Ae(ot);return Math.cos(Qe)*rt},st.yFn=function(ot){var Qe=Ae(ot),Pt=Math.sin(Qe)>0?.2:1;return-Math.sin(Qe)*(rt+ot.fontSize*Pt)+Math.abs(Math.cos(Qe))*(ot.fontSize*b)},st.anchorFn=function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe);return Math.abs(Pt)<.1?"middle":Pt>0?"start":"end"},st.heightFn=function(ot,Qe,Pt){var It=Ae(ot);return-.5*(1+Math.sin(It))*Pt};var Me=X(re);Y.angularTickLayout!==Me&&(q["angular-axis"].selectAll("."+ce._id+"tick").remove(),Y.angularTickLayout=Me);var ye=be?[1/0].concat(ce.tickvals||[]).map(function(ot){return n.tickText(ce,ot,!0,!1)}):n.calcTicks(ce);be&&(ye[0].text="\u221E",ye[0].fontSize*=1.75);var he;if(V.gridshape==="linear"?(he=ye.map(Ae),E.angleDelta(he[0],he[1])<0&&(he=he.slice().reverse())):he=null,Y.vangles=he,ce.type==="category"&&(ye=ye.filter(function(ot){return E.isAngleInsideSector(Ae(ot),Y.sectorInRad)})),ce.visible){var Oe=ce.ticks==="inside"?-1:1,tt=(ce.linewidth||1)/2;n.drawTicks(ee,ce,{vals:ye,layer:q["angular-axis"],path:"M"+Oe*tt+",0h"+Oe*ce.ticklen,transFn:Ze,crisp:!1}),n.drawGrid(ee,ce,{vals:ye,layer:q["angular-grid"],path:at,transFn:E.noop,crisp:!1}),n.drawLabels(ee,ce,{vals:ye,layer:q["angular-axis"],repositionOnUpdate:!0,transFn:ze,labelFns:st})}le(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(fe,V){if(!this.gd._context.staticPlot){var Y=!this.isSmith;Y&&(this.updateAngularDrag(fe),this.updateRadialDrag(fe,V,0),this.updateRadialDrag(fe,V,1)),this.updateHoverAndMainDrag(fe)}},B.updateHoverAndMainDrag=function(fe){var V=this,Y=V.isSmith,ee=V.gd,q=V.layers,oe=fe._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,Q=V.radius,re=V.innerRadius,ce=V.cx,be=V.cy,Ae=V.cxx,De=V.cyy,ze=V.sectorInRad,Ze=V.vangles,at=V.radialAxis,nt=u.clampTiny,rt=u.findXYatLength,st=u.findEnclosingVertexAngles,Me=d.cornerHalfWidth,ye=d.cornerLen/2,he,Oe,tt=c.makeDragger(q,"path","maindrag",fe.dragmode===!1?"none":"crosshair");v.select(tt).attr("d",V.pathSubplot()).attr("transform",t(ce,be)),tt.onmousemove=function(rr){p.hover(ee,rr,V.id),ee._fullLayout._lasthover=tt,ee._fullLayout._hoversubplot=V.id},tt.onmouseout=function(rr){ee._dragging||m.unhover(ee,rr)};var ot={element:tt,gd:ee,subplot:V.id,plotinfo:{id:V.id,xaxis:V.xaxis,yaxis:V.yaxis},xaxes:[V.xaxis],yaxes:[V.yaxis]},Qe,Pt,It,qt,Wt,kr,mr,qr,Sr;function Rr(rr,er){return Math.sqrt(rr*rr+er*er)}function wt(rr,er){return Rr(rr-Ae,er-De)}function Ne(rr,er){return Math.atan2(De-er,rr-Ae)}function Ke(rr,er){return[rr*Math.cos(er),rr*Math.sin(-er)]}function Te(rr,er){if(rr===0)return V.pathSector(2*Me);var Lr=ye/rr,fa=er-Lr,Da=er+Lr,Ia=Math.max(0,Math.min(rr,Q)),qa=Ia-Me,Wa=Ia+Me;return"M"+Ke(qa,fa)+"A"+[qa,qa]+" 0,0,0 "+Ke(qa,Da)+"L"+Ke(Wa,Da)+"A"+[Wa,Wa]+" 0,0,1 "+Ke(Wa,fa)+"Z"}function Ie(rr,er,Lr){if(rr===0)return V.pathSector(2*Me);var fa=Ke(rr,er),Da=Ke(rr,Lr),Ia=nt((fa[0]+Da[0])/2),qa=nt((fa[1]+Da[1])/2),Wa,Ca;if(Ia&&qa){var hi=qa/Ia,wi=-1/hi,Kt=rt(Me,hi,Ia,qa);Wa=rt(ye,wi,Kt[0][0],Kt[0][1]),Ca=rt(ye,wi,Kt[1][0],Kt[1][1])}else{var Ft,Yt;qa?(Ft=ye,Yt=Me):(Ft=Me,Yt=ye),Wa=[[Ia-Ft,qa-Yt],[Ia+Ft,qa-Yt]],Ca=[[Ia-Ft,qa+Yt],[Ia+Ft,qa+Yt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function Ve(){It=null,qt=null,Wt=V.pathSubplot(),kr=!1;var rr=ee._fullLayout[V.id];mr=x(rr.bgcolor).getLuminance(),qr=c.makeZoombox(oe,mr,ce,be,Wt),qr.attr("fill-rule","evenodd"),Sr=c.makeCorners(oe,ce,be),w(ee)}function Ce(rr,er){return er=Math.max(Math.min(er,Q),re),rr<j?rr=0:Q-rr<j?rr=Q:er<j?er=0:Q-er<j&&(er=Q),Math.abs(er-rr)>ae?(rr<er?(It=rr,qt=er):(It=er,qt=rr),!0):(It=null,qt=null,!1)}function Ee(rr,er){rr=rr||Wt,er=er||"M0,0Z",qr.attr("d",rr),Sr.attr("d",er),c.transitionZoombox(qr,Sr,kr,mr),kr=!0;var Lr={};Ct(Lr),ee.emit("plotly_relayouting",Lr)}function Pe(rr,er){rr=rr*he,er=er*Oe;var Lr=Qe+rr,fa=Pt+er,Da=wt(Qe,Pt),Ia=Math.min(wt(Lr,fa),Q),qa=Ne(Qe,Pt),Wa,Ca;Ce(Da,Ia)&&(Wa=Wt+V.pathSector(qt),It&&(Wa+=V.pathSector(It)),Ca=Te(It,qa)+Te(qt,qa)),Ee(Wa,Ca)}function ft(rr,er,Lr,fa){var Da=u.findIntersectionXY(Lr,fa,Lr,[rr-Ae,De-er]);return Rr(Da[0],Da[1])}function ct(rr,er){var Lr=Qe+rr,fa=Pt+er,Da=Ne(Qe,Pt),Ia=Ne(Lr,fa),qa=st(Da,Ze),Wa=st(Ia,Ze),Ca=ft(Qe,Pt,qa[0],qa[1]),hi=Math.min(ft(Lr,fa,Wa[0],Wa[1]),Q),wi,Kt;Ce(Ca,hi)&&(wi=Wt+V.pathSector(qt),It&&(wi+=V.pathSector(It)),Kt=[Ie(It,qa[0],qa[1]),Ie(qt,qa[0],qa[1])].join(" ")),Ee(wi,Kt)}function _t(){if(c.removeZoombox(ee),!(It===null||qt===null)){var rr={};Ct(rr),c.showDoubleClickNotifier(ee),S.call("_guiRelayout",ee,rr)}}function Ct(rr){var er=at._rl,Lr=(er[1]-er[0])/(1-re/Q)/Q,fa=[er[0]+(It-re)*Lr,er[0]+(qt-re)*Lr];rr[V.id+".radialaxis.range"]=fa}function ir(rr,er){var Lr=ee._fullLayout.clickmode;if(c.removeZoombox(ee),rr===2){var fa={};for(var Da in V.viewInitial)fa[V.id+"."+Da]=V.viewInitial[Da];ee.emit("plotly_doubleclick",null),S.call("_guiRelayout",ee,fa)}Lr.indexOf("select")>-1&&rr===1&&_(er,ee,[V.xaxis],[V.yaxis],V.id,ot),Lr.indexOf("event")>-1&&p.click(ee,er,V.id)}ot.prepFn=function(rr,er,Lr){var fa=ee._fullLayout.dragmode,Da=tt.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Ia=ee._fullLayout._invTransform;he=ee._fullLayout._invScaleX,Oe=ee._fullLayout._invScaleY;var qa=E.apply3DTransform(Ia)(er-Da.left,Lr-Da.top);if(Qe=qa[0],Pt=qa[1],Ze){var Wa=u.findPolygonOffset(Q,ze[0],ze[1],Ze);Qe+=Ae+Wa[0],Pt+=De+Wa[1]}switch(fa){case"zoom":ot.clickFn=ir,Y||(Ze?ot.moveFn=ct:ot.moveFn=Pe,ot.doneFn=_t,Ve(rr,er,Lr));break;case"select":case"lasso":l(rr,er,Lr,ot,fa);break}},m.init(ot)},B.updateRadialDrag=function(fe,V,Y){var ee=this,q=ee.gd,oe=ee.layers,ae=ee.radius,j=ee.innerRadius,Q=ee.cx,re=ee.cy,ce=ee.radialAxis,be=d.radialDragBoxSize,Ae=be/2;if(!ce.visible)return;var De=O(ee.radialAxisAngle),ze=ce._rl,Ze=ze[0],at=ze[1],nt=ze[Y],rt=.75*(ze[1]-ze[0])/(1-ee.getHole(V))/ae,st,Me,ye;Y?(st=Q+(ae+Ae)*Math.cos(De),Me=re-(ae+Ae)*Math.sin(De),ye="radialdrag"):(st=Q+(j-Ae)*Math.cos(De),Me=re-(j-Ae)*Math.sin(De),ye="radialdrag-inner");var he=c.makeRectDragger(oe,ye,"crosshair",-Ae,-Ae,be,be),Oe={element:he,gd:q};fe.dragmode===!1&&(Oe.dragmode=!1),le(v.select(he),ce.visible&&j<ae,{transform:t(st,Me)});var tt,ot,Qe;function Pt(mr,qr){if(tt)tt(mr,qr);else{var Sr=[mr,-qr],Rr=[Math.cos(De),Math.sin(De)],wt=Math.abs(E.dot(Sr,Rr)/Math.sqrt(E.dot(Sr,Sr)));isNaN(wt)||(tt=wt<.5?Wt:kr)}var Ne={};It(Ne),q.emit("plotly_relayouting",Ne)}function It(mr){ot!==null?mr[ee.id+".radialaxis.angle"]=ot:Qe!==null&&(mr[ee.id+".radialaxis.range["+Y+"]"]=Qe)}function qt(){ot!==null?S.call("_guiRelayout",q,ee.id+".radialaxis.angle",ot):Qe!==null&&S.call("_guiRelayout",q,ee.id+".radialaxis.range["+Y+"]",Qe)}function Wt(mr,qr){if(Y!==0){var Sr=st+mr,Rr=Me+qr;ot=Math.atan2(re-Rr,Sr-Q),ee.vangles&&(ot=se(ot,ee.vangles)),ot=P(ot);var wt=t(Q,re)+e(-ot);oe["radial-axis"].attr("transform",wt),oe["radial-line"].select("line").attr("transform",wt);var Ne=ee.gd._fullLayout,Ke=Ne[ee.id];ee.updateRadialAxisTitle(Ne,Ke,ot)}}function kr(mr,qr){var Sr=E.dot([mr,-qr],[Math.cos(De),Math.sin(De)]);if(Qe=nt-rt*Sr,rt>0!=(Y?Qe>Ze:Qe<at)){Qe=null;return}var Rr=q._fullLayout,wt=Rr[ee.id];ce.range[Y]=Qe,ce._rl[Y]=Qe,ee.updateRadialAxis(Rr,wt),ee.xaxis.setRange(),ee.xaxis.setScale(),ee.yaxis.setRange(),ee.yaxis.setScale();var Ne=!1;for(var Ke in ee.traceHash){var Te=ee.traceHash[Ke],Ie=E.filterVisible(Te),Ve=Te[0][0].trace._module;Ve.plot(q,ee,Ie,wt),S.traceIs(Ke,"gl")&&Ie.length&&(Ne=!0)}Ne&&(M(q),g(q))}Oe.prepFn=function(){tt=null,ot=null,Qe=null,Oe.moveFn=Pt,Oe.doneFn=qt,w(q)},Oe.clampFn=function(mr,qr){return Math.sqrt(mr*mr+qr*qr)<d.MINDRAG&&(mr=0,qr=0),[mr,qr]},m.init(Oe)},B.updateAngularDrag=function(fe){var V=this,Y=V.gd,ee=V.layers,q=V.radius,oe=V.angularAxis,ae=V.cx,j=V.cy,Q=V.cxx,re=V.cyy,ce=d.angularDragBoxSize,be=c.makeDragger(ee,"path","angulardrag",fe.dragmode===!1?"none":"move"),Ae={element:be,gd:Y};fe.dragmode===!1?Ae.dragmode=!1:v.select(be).attr("d",V.pathAnnulus(q,q+ce)).attr("transform",t(ae,j)).call(A,"move");function De(Qe,Pt){return Math.atan2(re+ce-Pt,Qe-Q-ce)}var ze=ee.frontplot.select(".scatterlayer").selectAll(".trace"),Ze=ze.selectAll(".point"),at=ze.selectAll(".textpoint"),nt,rt,st,Me,ye,he;function Oe(Qe,Pt){var It=V.gd._fullLayout,qt=It[V.id],Wt=nt+Qe*fe._invScaleX,kr=rt+Pt*fe._invScaleY,mr=De(Wt,kr),qr=P(mr-he);if(Me=st+qr,ee.frontplot.attr("transform",t(V.xOffset2,V.yOffset2)+e([-qr,Q,re])),V.vangles){ye=V.radialAxisAngle+qr;var Sr=t(ae,j)+e(-qr),Rr=t(ae,j)+e(-ye);ee.bg.attr("transform",Sr),ee["radial-grid"].attr("transform",Sr),ee["radial-axis"].attr("transform",Rr),ee["radial-line"].select("line").attr("transform",Rr),V.updateRadialAxisTitle(It,qt,ye)}else V.clipPaths.forTraces.select("path").attr("transform",t(Q,re)+e(qr));Ze.each(function(){var Ce=v.select(this),Ee=o.getTranslate(Ce);Ce.attr("transform",t(Ee.x,Ee.y)+e([qr]))}),at.each(function(){var Ce=v.select(this),Ee=Ce.select("text"),Pe=o.getTranslate(Ce);Ce.attr("transform",e([qr,Ee.attr("x"),Ee.attr("y")])+t(Pe.x,Pe.y))}),oe.rotation=E.modHalf(Me,360),V.updateAngularAxis(It,qt),V._hasClipOnAxisFalse&&!E.isFullCircle(V.sectorInRad)&&ze.call(o.hideOutsideRangePoints,V);var wt=!1;for(var Ne in V.traceHash)if(S.traceIs(Ne,"gl")){var Ke=V.traceHash[Ne],Te=E.filterVisible(Ke),Ie=Ke[0][0].trace._module;Ie.plot(Y,V,Te,qt),Te.length&&(wt=!0)}wt&&(M(Y),g(Y));var Ve={};tt(Ve),Y.emit("plotly_relayouting",Ve)}function tt(Qe){Qe[V.id+".angularaxis.rotation"]=Me,V.vangles&&(Qe[V.id+".radialaxis.angle"]=ye)}function ot(){at.select("text").attr("transform",null);var Qe={};tt(Qe),S.call("_guiRelayout",Y,Qe)}Ae.prepFn=function(Qe,Pt,It){var qt=fe[V.id];st=qt.angularaxis.rotation;var Wt=be.getBoundingClientRect();nt=Pt-Wt.left,rt=It-Wt.top,Y._fullLayout._calcInverseTransform(Y);var kr=E.apply3DTransform(fe._invTransform)(nt,rt);nt=kr[0],rt=kr[1],he=De(nt,rt),Ae.moveFn=Oe,Ae.doneFn=ot,w(Y)},V.vangles&&!E.isFullCircle(V.sectorInRad)&&(Ae.prepFn=E.noop,A(v.select(be),null)),m.init(Ae)},B.isPtInside=function(fe){if(this.isSmith)return!0;var V=this.sectorInRad,Y=this.vangles,ee=this.angularAxis.c2g(fe.theta),q=this.radialAxis,oe=q.c2l(fe.r),ae=q._rl,j=Y?u.isPtInsidePolygon:E.isPtInsideSector;return j(oe,ee,ae,V,Y)},B.pathArc=function(fe){var V=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathArc;return ee(fe,V[0],V[1],Y)},B.pathSector=function(fe){var V=this.sectorInRad,Y=this.vangles,ee=Y?u.pathPolygon:E.pathSector;return ee(fe,V[0],V[1],Y)},B.pathAnnulus=function(fe,V){var Y=this.sectorInRad,ee=this.vangles,q=ee?u.pathPolygonAnnulus:E.pathAnnulus;return q(fe,V,Y[0],Y[1],ee)},B.pathSubplot=function(){var fe=this.innerRadius,V=this.radius;return fe?this.pathAnnulus(fe,V):this.pathSector(V)},B.fillViewInitialKey=function(fe,V){fe in this.viewInitial||(this.viewInitial[fe]=V)};function X(fe){var V=fe.ticks+String(fe.ticklen)+String(fe.showticklabels);return"side"in fe&&(V+=fe.side),V}function $(fe){var V=fe[0],Y=fe[1],ee=Y-V,q=N(V,360),oe=q+ee,ae=Math.cos(O(q)),j=Math.sin(O(q)),Q=Math.cos(O(oe)),re=Math.sin(O(oe)),ce,be,Ae,De;return q<=90&&oe>=90||q>90&&oe>=450?De=1:j<=0&&re<=0?De=0:De=Math.max(j,re),q<=180&&oe>=180||q>180&&oe>=540?ce=-1:ae>=0&&Q>=0?ce=0:ce=Math.min(ae,Q),q<=270&&oe>=270||q>270&&oe>=630?be=-1:j>=0&&re>=0?be=0:be=Math.min(j,re),oe>=360?Ae=1:ae<=0&&Q<=0?Ae=0:Ae=Math.max(ae,Q),[ce,be,Ae,De]}function se(fe,V){var Y=function(q){return E.angleDist(fe,q)},ee=E.findIndexOfMin(V,Y);return V[ee]}function le(fe,V,Y){return V?(fe.attr("display",null),fe.attr(Y)):fe&&fe.attr("display","none"),fe}}}),sk=Xe({"src/plots/polar/layout_attributes.js"(Z,G){"use strict";var v=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),G.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:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),AH=Xe({"src/plots/polar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=Y0(),r=t1(),o=Qm(),a=e0(),n=I2(),i=z_(),s=f5(),h=a1(),c=sk(),m=ik(),p=DT(),T=p.axisNames;function l(w,A,M,g){var b=M("bgcolor");g.bgColor=x.combine(b,g.paper_bgcolor);var d=M("sector");M("hole");var u=e(g.fullData,p.name,g.id),y=g.layoutOut,f;function R(be,Ae){return M(f+"."+be,Ae)}for(var L=0;L<T.length;L++){f=T[L],v.isPlainObject(w[f])||(w[f]={});var z=w[f],F=S.newContainer(A,f);F._id=F._name=f,F._attr=g.id+"."+f,F._traceIndices=u.map(function(be){return be.index});var N=p.axisName2dataArray[f],O=_(z,F,R,u,N,g);n(z,F,R,{axData:u,dataAttr:N});var P=R("visible");switch(m(F,A,y),R("uirevision",A.uirevision),F._m=1,f){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"){v.log("Polar plots do not support date angular axes yet.");for(var se=0;se<u.length;se++)u[se].visible=!1;O=z.type=F.type="linear"}R(O==="linear"?"thetaunit":"period");var le=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[le]);break}if(a(z,F,R,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"\xB0":void 0}),P){var fe,V,Y,ee,q,oe,ae,j,Q,re,ce=g.font||{};fe=R("color"),V=fe===z.color?fe:ce.color,Y=ce.size,ee=ce.family,q=ce.weight,oe=ce.style,ae=ce.variant,j=ce.textcase,Q=ce.lineposition,re=ce.shadow,t(z,F,R,F.type),o(z,F,R,F.type,{font:{weight:q,style:oe,variant:ae,textcase:j,lineposition:Q,shadow:re,color:V,size:Y,family:ee},noAutotickangles:f==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,R,{outerTicks:!0}),i(z,F,R,{dfltColor:fe,bgColor:g.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c[f]}),R("layer"),f==="radialaxis"&&(R("side"),R("angle",d[0]),R("title.text"),v.coerceFont(R,"title.font",{weight:q,style:oe,variant:ae,textcase:j,lineposition:Q,shadow:re,color:V,size:v.bigFont(Y),family:ee}))}O!=="category"&&R("hoverformat"),F._input=z}A.angularaxis.type==="category"&&M("gridshape")}function _(w,A,M,g,b,d){var u=M("autotypenumbers",d.autotypenumbersDflt),y=M("type");if(y==="-"){for(var f,R=0;R<g.length;R++)if(g[R].visible){f=g[R];break}f&&f[b]&&(A.type=h(f[b],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),A.type==="-"?A.type="linear":w.type=A.type}return A.type}G.exports=function(A,M,g){E(A,M,g,{type:p.name,attributes:c,handleDefaults:l,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:g,layoutOut:M})}}}),FT=Xe({"src/plots/polar/index.js"(Z,G){"use strict";var v=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,c=s._subplots[t],m=0;m<c.length;m++){var p=c[m],T=v(h,t,p),l=s[p]._subplot;l||(l=S(i,p),s[p]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,c){for(var m=c._subplots[t]||[],p=c._has&&c._has("gl"),T=s._has&&s._has("gl"),l=p&&!T,_=0;_<m.length;_++){var w=m[_],A=c[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)}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:sk(),supplyLayoutDefaults:AH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),Cx=Xe({"src/traces/scatterpolar/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;G.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:v(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),OT=Xe({"src/traces/scatterpolar/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=Cx();function n(s,h,c,m){function p(_,w){return v.coerce(s,h,a,_,w)}var T=i(s,h,m,p);if(!T){h.visible=!1;return}p("thetaunit"),p("mode",T<o?"lines+markers":"lines"),p("text"),p("hovertext"),h.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,c,m,p,{gradient:!0}),x.hasLines(h)&&(E(s,h,c,m,p,{backoff:!0}),e(s,h,p),p("connectgaps")),x.hasText(h)&&(p("texttemplate"),p("texttemplatefallback"),t(s,h,m,p));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(p("cliponaxis"),p("marker.maxdisplayed"),l.push("points")),p("fill"),h.fill!=="none"&&(r(s,h,c,p),x.hasLines(h)||e(s,h,p)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),p("hoveron",l.join("+")||"points"),v.coerceSelectionMarkerOpacity(h,p)}function i(s,h,c,m){var p=m("r"),T=m("theta");v.isTypedArray(p)&&(h.r=p=Array.from(p)),v.isTypedArray(T)&&(h.theta=T=Array.from(T));var l;if(p)T?l=Math.min(p.length,T.length):(l=p.length,m("theta0"),m("dtheta"));else{if(!T)return 0;l=h.theta.length,m("r0"),m("dr")}return h._length=l,l}G.exports={handleRThetaDefaults:i,supplyDefaults:n}}}),BT=Xe({"src/traces/scatterpolar/format_labels.js"(Z,G){"use strict";var v=sa(),x=Go();G.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"?v.rad2deg(E.theta):E.theta;return r.thetaLabel=x.tickText(n,s,!0).text,r}}}),SH=Xe({"src/traces/scatterpolar/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Go(),E=Fd(),e=Av(),t=Od(),r=Bd().calcMarkerSize;G.exports=function(a,n){for(var i=a._fullLayout,s=n.subplot,h=i[s].radialaxis,c=i[s].angularaxis,m=h.makeCalcdata(n,"r"),p=c.makeCalcdata(n,"theta"),T=n._length,l=new Array(T),_=0;_<T;_++){var w=m[_],A=p[_],M=l[_]={};v(w)&&v(A)?(M.r=w,M.theta=A):M.r=x}var g=r(n,T);return n._extremes.x=S.findExtremes(h,m,{ppad:g}),E(a,n),e(l,n),t(l,n),l}}}),MH=Xe({"src/traces/scatterpolar/plot.js"(Z,G){"use strict";var v=s1(),x=Hs().BADNUM;G.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 c=t[h],m=0;m<c.length;m++){m===0&&(c[0].trace._xA=o,c[0].trace._yA=a);var p=c[m],T=p.r;if(T===x)p.x=p.y=x;else{var l=i.c2g(T),_=s.c2g(p.theta);p.x=l*Math.cos(_),p.y=l*Math.sin(_)}}v(E,n,t,r)}}}),NT=Xe({"src/traces/scatterpolar/hover.js"(Z,G){"use strict";var v=u1();function x(E,e,t,r){var o=v(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 c(p,T){h.push(p._hovertitle+": "+T)}if(!e.hovertemplate){var m=s.split("+");m.indexOf("all")!==-1&&(m=["r","theta","text"]),m.indexOf("r")!==-1&&c(o,r.rLabel),m.indexOf("theta")!==-1&&c(a,r.thetaLabel),m.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),EH=Xe({"src/traces/scatterpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:pp(),formatLabels:BT(),calc:SH(),plot:MH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),kH=Xe({"lib/scatterpolar.js"(Z,G){"use strict";G.exports=EH()}}),lk=Xe({"src/traces/scatterpolargl/attributes.js"(Z,G){"use strict";var v=Cx(),{cliponaxis:x,hoveron:S}=v,E=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:n,marker:i,textfont:s,textposition:h}=xx();G.exports=ds(To({},E),{connectgaps:e,fill:a,fillcolor:n,line:{color:t,dash:r,editType:"calc",width:o},marker:i,textfont:s,textposition:h})}}),CH=Xe({"src/traces/scatterpolargl/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=OT().handleRThetaDefaults,E=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();G.exports=function(i,s,h,c){function m(T,l){return v.coerce(i,s,a,T,l)}var p=S(i,s,c,m);if(!p){s.visible=!1;return}m("thetaunit"),m("mode",p<o?"lines+markers":"lines"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),x.hasMarkers(s)&&E(i,s,h,c,m,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),x.hasLines(s)&&(e(i,s,h,c,m),m("connectgaps")),x.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),t(i,s,c,m,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),m("fill"),s.fill!=="none"&&r(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)}}}),LH=Xe({"src/traces/scatterpolargl/format_labels.js"(Z,G){"use strict";var v=BT();G.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]),v(S,E,e)}}}),PH=Xe({"src/traces/scatterpolargl/calc.js"(Z,G){"use strict";var v=Fd(),x=Bd().calcMarkerSize,S=yg(),E=Go(),e=y0().TOO_MANY_POINTS;G.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"),c=o._theta=s.makeCalcdata(o,"theta"),m=o._length,p={};m<h.length&&(h=h.slice(0,m)),m<c.length&&(c=c.slice(0,m)),p.r=h,p.theta=c,v(r,o);var T=p.opts=S.style(r,o),l;return m<e?l=x(o,m):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:p,trace:o}]}}}),IH=Xe({"src/traces/scatterpolargl/hover.js"(Z,G){"use strict";var v=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=v.hoverPoints(E,e,t,r);if(!(!s||s[0].index===!1)){var h=s[0];if(h.index===void 0)return s;var c=E.subplot,m=h.cd[h.index],p=h.trace;if(m.r=n[h.index],m.theta=i[h.index],!!c.isPtInside(m))return h.xLabelVal=void 0,h.yLabelVal=void 0,x(m,p,c,h),s}}G.exports={hoverPoints:S}}}),RH=Xe({"src/traces/scatterpolargl/base_index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:FT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:lk(),supplyDefaults:CH(),colorbar:pp(),formatLabels:LH(),calc:PH(),hoverPoints:IH().hoverPoints,selectPoints:VE(),meta:{}}}}),DH=Xe({"src/traces/scatterpolargl/plot.js"(Z,G){"use strict";var v=vT(),x=rs(),S=p6(),E=jE(),e=yg(),t=sa(),r=y0().TOO_MANY_POINTS,o={};G.exports=function(n,i,s){if(s.length){var h=i.radialAxis,c=i.angularAxis,m=E(n,i);return s.forEach(function(p){if(!(!p||!p[0]||!p[0].trace)){var T=p[0],l=T.trace,_=T.t,w=l._length,A=_.r,M=_.theta,g=_.opts,b,d=A.slice(),u=M.slice();for(b=0;b<A.length;b++)i.isPtInside({r:A[b],theta:M[b]})||(d[b]=NaN,u[b]=NaN);var y=new Array(w*2),f=Array(w),R=Array(w);for(b=0;b<w;b++){var L=d[b],z,F;if(x(L)){var N=h.c2g(L),O=c.c2g(u[b],l.thetaunit);z=N*Math.cos(O),F=N*Math.sin(O)}else z=F=NaN;f[b]=y[b*2]=z,R[b]=y[b*2+1]=F}_.tree=v(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&&!m.fill2d&&(m.fill2d=!0),g.marker&&!m.scatter2d&&(m.scatter2d=!0),g.line&&!m.line2d&&(m.line2d=!0),g.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(g.line),m.fillOptions.push(g.fill),m.markerOptions.push(g.marker),m.markerSelectedOptions.push(g.markerSel),m.markerUnselectedOptions.push(g.markerUnsel),m.textOptions.push(g.text),m.textSelectedOptions.push(g.textSel),m.textUnselectedOptions.push(g.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),_.x=f,_.y=R,_.rawx=f,_.rawy=R,_.r=A,_.theta=M,_.positions=y,_._scene=m,_.index=m.count,m.count++}}),S(n,i,s)}},G.exports.reglPrecompiled=o}}),zH=Xe({"src/traces/scatterpolargl/index.js"(Z,G){"use strict";var v=RH();v.plot=DH(),G.exports=v}}),FH=Xe({"lib/scatterpolargl.js"(Z,G){"use strict";G.exports=zH()}}),uk=Xe({"src/traces/barpolar/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Jl(),S=Qo().extendFlat,E=Cx(),e=Sv();G.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:v(),hovertemplatefallback:x(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=Xe({"src/traces/barpolar/layout_attributes.js"(Z,G){"use strict";G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),OH=Xe({"src/traces/barpolar/defaults.js"(Z,G){"use strict";var v=sa(),x=OT().handleRThetaDefaults,S=j2(),E=uk();G.exports=function(t,r,o,a){function n(s,h){return v.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),v.coerceSelectionMarkerOpacity(r,n)}}}),BH=Xe({"src/traces/barpolar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=ck();G.exports=function(S,E,e){var t={},r;function o(i,s){return v.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=Xe({"src/traces/barpolar/calc.js"(Z,G){"use strict";var v=wp().hasColorscale,x=Tp(),S=sa().isArrayOrTypedArray,E=B_(),e=eg().setGroupPositions,t=Od(),r=so().traceIs,o=sa().extendFlat;function a(i,s){for(var h=i._fullLayout,c=s.subplot,m=h[c].radialaxis,p=h[c].angularaxis,T=m.makeCalcdata(s,"r"),l=p.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(d){var u=s[d];u!==void 0&&(s["_"+d]=S(u)?p.makeCalcdata(s,d):p.d2c(u,s.thetaunit))}return p.type==="linear"&&(b("width"),b("offset")),v(s,"marker")&&x(i,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),v(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 c=i.calcdata,m=[],p=0;p<c.length;p++){var T=c[p],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===h&&m.push(T)}var _=o({},s.radialaxis,{_id:"x"}),w=s.angularaxis;e(i,w,_,m,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}G.exports={calc:a,crossTraceCalc:n}}}),NH=Xe({"src/traces/barpolar/plot.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=es(),e=zT();G.exports=function(o,a,n){var i=o._context.staticPlot,s=a.xaxis,h=a.yaxis,c=a.radialAxis,m=a.angularAxis,p=t(a),T=a.layers.frontplot.select("g.barlayer");S.makeTraceGroups(T,n,"trace bars").each(function(){var l=v.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=v.select(this),g=A.rp0=c.c2p(A.s0),b=A.rp1=c.c2p(A.s1),d=A.thetag0=m.c2g(A.p0),u=A.thetag1=m.c2g(A.p1),y;if(!x(g)||!x(b)||!x(d)||!x(u)||g===b||d===u)y="M0,0Z";else{var f=c.c2g(A.s1),R=(d+u)/2;A.ct=[s.c2p(f*Math.cos(R)),h.c2p(f*Math.sin(R))],y=p(g,b,d,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 c,m;S.angleDelta(s,h)>0?(c=s,m=h):(c=h,m=s);var p=e.findEnclosingVertexAngles(c,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[p,(c+m)/2,T];return e.pathPolygonAnnulus(n,i,c,m,l,o,a)}:function(n,i,s,h){return S.pathAnnulus(n,i,s,h,o,a)}}}}),UH=Xe({"src/traces/barpolar/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=f1().getTraceColor,E=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;G.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.subplot,c=h.radialAxis,m=h.angularAxis,p=h.vangles,T=p?t:x.isPtInsideSector,l=o.maxHoverDistance,_=m._period||2*Math.PI,w=Math.abs(c.g2p(Math.sqrt(a*a+n*n))),A=Math.atan2(n,a);c.range[0]>c.range[1]&&(A+=Math.PI);var M=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.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 d=x.extendFlat({},b,{r:b.s,theta:b.p});return E(b,s,o),e(d,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]}}}}),jH=Xe({"src/traces/barpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:OH(),supplyLayoutDefaults:BH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:NH(),colorbar:pp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:UH(),selectPoints:h1(),meta:{}}}}),qH=Xe({"lib/barpolar.js"(Z,G){"use strict";G.exports=jH()}}),hk=Xe({"src/plots/smith/constants.js"(Z,G){"use strict";G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=Xe({"src/plots/smith/layout_attributes.js"(Z,G){"use strict";var v=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);G.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),VH=Xe({"src/plots/smith/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=e0(),r=Qm(),o=z_(),a=wv(),n=pk(),i=hk(),s=i.axisNames,h=m(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(T){return-T}).concat([0]).concat(p)},String);function c(p,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 d=0;d<s.length;d++){g=s[d],v.isPlainObject(p[g])||(p[g]={});var u=p[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 f=b("visible");if(y.type="linear",a(y,M),t(u,y,b,y.type),f){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)}v.isTypedArray(y.tickvals)&&(y.tickvals=Array.from(y.tickvals));var z,F,N,O,P=_.font||{};f&&(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}}),v.coerce2(p,T,n,g+".ticklen"),v.coerce2(p,T,n,g+".tickwidth"),v.coerce2(p,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}}G.exports=function(T,l,_){E(T,l,_,{noUirevision:!0,type:i.name,attributes:n,handleDefaults:c,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:_,layoutOut:l})};function m(p,T){var l={};return function(_){var w=T?T(_):_;if(w in l)return l[w];var A=p(_);return l[w]=A,A}}}}),GH=Xe({"src/plots/smith/index.js"(Z,G){"use strict";var v=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,c=s._subplots[t],m=0;m<c.length;m++){var p=c[m],T=v(h,t,p),l=s[p]._subplot;l||(l=S(i,p,!0),s[p]._subplot=l),l.plot(T,s,i._promises)}}function n(i,s,h,c){for(var m=c._subplots[t]||[],p=0;p<m.length;p++){var T=m[p],l=c[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var _ in l.clipPaths)l.clipPaths[_].remove()}}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:pk(),supplyLayoutDefaults:VH(),plot:a,clean:n,toSVG:Kf().toSVG}}}),dk=Xe({"src/traces/scattersmith/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=Qo().extendFlat,e=$d(),t=af(),r=ru(),o=t.line;G.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:v(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),HH=Xe({"src/traces/scattersmith/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=dk();G.exports=function(s,h,c,m){function p(_,w){return v.coerce(s,h,a,_,w)}var T=n(s,h,m,p);if(!T){h.visible=!1;return}p("mode",T<o?"lines+markers":"lines"),p("text"),p("hovertext"),h.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),x.hasMarkers(h)&&S(s,h,c,m,p,{gradient:!0}),x.hasLines(h)&&(E(s,h,c,m,p,{backoff:!0}),e(s,h,p),p("connectgaps")),x.hasText(h)&&(p("texttemplate"),p("texttemplatefallback"),t(s,h,m,p));var l=[];(x.hasMarkers(h)||x.hasText(h))&&(p("cliponaxis"),p("marker.maxdisplayed"),l.push("points")),p("fill"),h.fill!=="none"&&(r(s,h,c,p),x.hasLines(h)||e(s,h,p)),(h.fill==="tonext"||h.fill==="toself")&&l.push("fills"),p("hoveron",l.join("+")||"points"),v.coerceSelectionMarkerOpacity(h,p)};function n(i,s,h,c){var m=c("real"),p=c("imag"),T;return m&&p&&(T=Math.min(m.length,p.length)),v.isTypedArray(m)&&(s.real=m=Array.from(m)),v.isTypedArray(p)&&(s.imag=p=Array.from(p)),s._length=T,T}}}),WH=Xe({"src/traces/scattersmith/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.realLabel=v.tickText(r.radialAxis,S.real,!0).text,t.imagLabel=v.tickText(r.angularAxis,S.imag,!0).text,t}}}),XH=Xe({"src/traces/scattersmith/calc.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=Fd(),E=Av(),e=Od(),t=Bd().calcMarkerSize;G.exports=function(o,a){for(var n=o._fullLayout,i=a.subplot,s=n[i].realaxis,h=n[i].imaginaryaxis,c=s.makeCalcdata(a,"real"),m=h.makeCalcdata(a,"imag"),p=a._length,T=new Array(p),l=0;l<p;l++){var _=c[l],w=m[l],A=T[l]={};v(_)&&v(w)?(A.real=_,A.imag=w):A.real=x}return t(a,p),S(o,a),E(T,a),e(T,a),T}}}),ZH=Xe({"src/traces/scattersmith/plot.js"(Z,G){"use strict";var v=s1(),x=Hs().BADNUM,S=nk(),E=S.smith;G.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 c=o[h],m=0;m<c.length;m++){m===0&&(c[0].trace._xA=n,c[0].trace._yA=i);var p=c[m],T=p.real;if(T===x)p.x=p.y=x;else{var l=E([T,p.imag]);p.x=l[0],p.y=l[1]}}v(t,s,o,a)}}}),YH=Xe({"src/traces/scattersmith/hover.js"(Z,G){"use strict";var v=u1();function x(E,e,t,r){var o=v(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 c(p,T){h.push(p._hovertitle+": "+T)}if(!e.hovertemplate){var m=s.split("+");m.indexOf("all")!==-1&&(m=["real","imag","text"]),m.indexOf("real")!==-1&&c(o,r.realLabel),m.indexOf("imag")!==-1&&c(a,r.imagLabel),m.indexOf("text")!==-1&&r.text&&(h.push(r.text),delete r.text),r.extraText=h.join("<br>")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),KH=Xe({"src/traces/scattersmith/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:GH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:HH(),colorbar:pp(),formatLabels:WH(),calc:XH(),plot:ZH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:YH().hoverPoints,selectPoints:c1(),meta:{}}}}),JH=Xe({"lib/scattersmith.js"(Z,G){"use strict";G.exports=KH()}}),Mp=Xe({"node_modules/world-calendars/dist/main.js"(Z,G){var v=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={}}v(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}v(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"}v(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),c=o.monthOfYear()+(n==="m"?a:0),s=o.day(),m=function(l){for(;c<l.minMonth;)h--,c+=l.monthsInYear(h);for(var _=l.monthsInYear(h);c>_-1+l.minMonth;)h++,c-=_,_=l.monthsInYear(h)};n==="y"?(o.month()!==this.fromMonthOfYear(h,c)&&(c=this.newDate(h,o.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c)))):n==="m"&&(m(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c))));var p=[h,this.fromMonthOfYear(h,c),s];return this._validateLevel--,p}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,v(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),c=Math.floor((i-h)/30.6001),m=i-h-Math.floor(c*30.6001),p=c-(c>13.5?13:1),T=s-(p>2.5?4716:4715);return T<=0&&T--,this.newDate(T,p,m)},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=G.exports=new x;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),$H=Xe({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),G=Mp();Z(G.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"}),G.local=G.regionalOptions[""],Z(G.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),Z(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:G.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(v,x,S){if(typeof v!="string"&&(S=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;v=v||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<v.length&&v.charAt(w+g)===A;)g++;return w+=g-1,Math.floor(g/(M||1))>1},i=function(A,M,g,b){var d=""+M;if(n(A,b))for(;d.length<g;)d="0"+d;return d},s=function(A,M,g,b){return n(A)?b[M]:g[M]},h=this,c=function(A){return typeof t=="function"?t.call(h,A,n("m")):T(i("m",A.month(),2))},m=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]},p=this.local.digits,T=function(A){return S.localNumbers&&p?p(A):A},l="",_=!1,w=0;w<v.length;w++)if(_)v.charAt(w)==="'"&&!n("'")?_=!1:l+=v.charAt(w);else switch(v.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+=c(x);break;case"M":l+=m(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+=v.charAt(w)}return l},parseDate:function(v,x,S){if(x==null)throw G.local.invalidArguments||G.regionalOptions[""].invalidArguments;if(x=typeof x=="object"?x.toString():x+"",x==="")return null;v=v||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,c=-1,m=-1,p=!1,T=!1,l=function(R,L){for(var z=1;u+z<v.length&&v.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(d).match(N);if(!O)throw(G.local.missingNumberAt||G.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(w,x.substring(d));return d+=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(d,N[O].length).toLowerCase()===N[O].toLowerCase())return d+=N[O].length,O+w.minMonth;throw(G.local.unknownNameAt||G.regionalOptions[""].unknownNameAt).replace(/\{0\}/,d)},g=function(){if(typeof n=="function"){var R=l("M")?n.call(w,x.substring(d)):a.call(w,x.substring(d));return d+=R.length,R}return M("M",a,n)},b=function(){if(x.charAt(d)!==v.charAt(u))throw(G.local.unexpectedLiteralAt||G.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,d);d++},d=0,u=0;u<v.length;u++)if(T)v.charAt(u)==="'"&&!l("'")?T=!1:b();else switch(v.charAt(u)){case"d":c=_("d");break;case"D":M("D",e,t);break;case"o":m=_("o");break;case"w":_("w");break;case"m":h=A();break;case"M":h=g();break;case"y":var y=u;p=!l("y",2),u=y,s=_("y",2);break;case"Y":s=_("Y",2);break;case"J":i=_("J")+.5,x.charAt(d)==="."&&(d++,_("J"));break;case"@":i=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":i=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":d=x.length;break;case"'":l("'")?b():T=!0;break;default:b()}if(d<x.length)throw G.local.unexpectedText||G.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&p&&(s+=E===-1?1900:this.today().year()-this.today().year()%100-(s<=E?0:100)),typeof h=="string"&&(h=r.call(this,s,h)),m>-1){h=1,c=m;for(var f=this.daysInMonth(s,h);c>f;f=this.daysInMonth(s,h))h++,c-=f}return i>-1?this.fromJD(i):this.newDate(s,h,c)},determineDate:function(v,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,v=v==null?x:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:t.today().add(v,"d"):t.newDate(v),v}})}}),QH=Xe({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(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 c=this._validateYear(i),m=i.month(),p=""+this.toChineseMonth(c,m);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(c,m)&&(p+="i"),p},monthNames:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][m-1];return this.isIntercalaryMonth(h,c)&&(p="\u95F0"+p),p},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,c)&&(p="\u95F0"+p),p},parseMonth:function(i,s){i=this._validateYear(i);var h=parseInt(s),c;if(isNaN(h))s[0]==="\u95F0"&&(c=!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 m=s[s.length-1];c=m==="i"||m==="I"}var p=this.toMonthIndex(i,h,c);return p},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 c=this.intercalaryMonth(i),m=h&&s!==c;if(m||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return c?!h&&s<=c?p=s-1:p=s:p=s-1,p},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i),c=h?12:11;if(s<0||s>c)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s<h?m=s+1:m=s:m=s+1,m},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 c=this._validateYear(i,Z.local.invalidyear),m=o[c-o[0]],p=m>>9&4095,T=m>>5&15,l=m&31,_;_=v.newDate(p,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]],c=h>>13,m=c?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=h&1<<12-s?30:29;return p},weekDay:function(i,s,h){return(this.dayOfWeek(i,s,h)||7)<6},toJD:function(i,s,h){var c=this._validate(i,p,h,Z.local.invalidDate);i=this._validateYear(c.year()),s=c.month(),h=c.day();var m=this.isIntercalaryMonth(i,s),p=this.toChineseMonth(i,s),T=n(i,p,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=v.fromJD(i),h=a(s.year(),s.month(),s.day()),c=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,c,h.day)},fromString:function(i){var s=i.match(S),h=this._validateYear(+s[1]),c=+s[2],m=!!s[3],p=this.toMonthIndex(h,c,m),T=+s[4];return this.newDate(h,p,T)},add:function(i,s,h){var c=i.year(),m=i.month(),p=this.isIntercalaryMonth(c,m),T=this.toChineseMonth(c,m),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=p&&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,c){var m,p;if(typeof i=="object")m=i,p=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");m={year:i,month:s,day:h},p=c||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;p.year=A>=w?m.year:m.year-1,w=o[p.year-o[0]];var M=w>>9&4095,g=w>>5&15,b=w&31,d,u=new Date(M,g-1,b),y=new Date(m.year,m.month-1,m.day);d=Math.round((y-u)/(24*3600*1e3));var f=r[p.year-r[0]],R;for(R=0;R<13;R++){var L=f&1<<12-R?30:29;if(d<L)break;d-=L}var z=f>>13;return!z||R<z?(p.isIntercalary=!1,p.month=1+R):R===z?(p.isIntercalary=!0,p.month=R):(p.isIntercalary=!1,p.month=R),p.day=1+d,p}function n(i,s,h,c,m){var p,T;if(typeof i=="object")T=i,p=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 c=="object"?(A=!1,p=c):(A=!!c,p=m||{}),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,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u<d;u++){var y=g&1<<12-u?30:29;M+=y}var f=o[T.year-o[0]],R=f>>9&4095,L=f>>5&15,z=f&31,F=new Date(R,L-1,z+M);return p.year=F.getFullYear(),p.month=1+F.getMonth(),p.day=F.getDate(),p}}}),eW=Xe({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),tW=Xe({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),rW=Xe({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),aW=Xe({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),iW=Xe({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),nW=Xe({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),oW=Xe({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),G=ch();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),sW=Xe({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");G(v.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=v}}),lW=Xe({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v}}),uW=Xe({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),G=ch();function v(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}v.prototype=new Z.baseCalendar,G(v.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=v,Z.calendars.jalali=v}}),cW=Xe({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(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 v.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 v.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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.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}}),fW=Xe({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(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 v.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 v.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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.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}}),hW=Xe({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(v.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=v;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]}}),pW=Xe({"src/components/calendars/calendars.js"(Z,G){"use strict";G.exports=Mp(),$H(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW()}}),dW=Xe({"src/components/calendars/index.js"(Z,G){"use strict";var v=pW(),x=sa(),S=Hs(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(g,b,d,u){var y={};return y[d]=t,x.coerce(g,b,y,d,u)},o=function(g,b,d,u){for(var y=0;y<d.length;y++)r(g,b,d[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 c(g,b,d){for(var u=Math.floor((b+.05)/e)+E,y=p(d).fromJD(u),f=0,R,L,z,F,N;(f=g.indexOf("%",f))!==-1;)R=g.charAt(f+1),R==="0"||R==="-"||R==="_"?(z=3,L=g.charAt(f+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,f)+N+g.slice(f+z),f+=N.length):f+=z;return g}var m={};function p(g){var b=m[g];return b||(b=m[g]=v.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(" "));G.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:p,worldCalFmt:c}}}),vW=Xe({"lib/calendars.js"(Z,G){"use strict";G.exports=dW()}}),mW=Xe({"lib/index.js"(Z,G){var v=X9();v.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(),HU(),ZU(),Pq(),Wq(),nV(),fV(),bV(),SV(),RV(),WV(),KV(),iG(),_G(),SG(),IG(),tH(),uH(),dH(),_H(),TH(),kH(),FH(),qH(),JH(),vW()]),G.exports=v}});return mW()})();return window.Plotly=ue,ue})});var cX=typeof global=="object"&&global&&global.Object===Object&&global,xb=cX;var fX=typeof self=="object"&&self&&self.Object===Object&&self,hX=xb||fX||Function("return this")(),wu=hX;var pX=wu.Symbol,If=pX;var Xk=Object.prototype,dX=Xk.hasOwnProperty,vX=Xk.toString,a_=If?If.toStringTag:void 0;function mX(ue){var ge=dX.call(ue,a_),Ye=ue[a_];try{ue[a_]=void 0;var Rt=!0}catch{}var gr=vX.call(ue);return Rt&&(ge?ue[a_]=Ye:delete ue[a_]),gr}var Zk=mX;var gX=Object.prototype,yX=gX.toString;function _X(ue){return yX.call(ue)}var Yk=_X;var xX="[object Null]",bX="[object Undefined]",Kk=If?If.toStringTag:void 0;function wX(ue){return ue==null?ue===void 0?bX:xX:Kk&&Kk in Object(ue)?Zk(ue):Yk(ue)}var Oc=wX;function TX(ue){return ue!=null&&typeof ue=="object"}var Dl=TX;var AX="[object Symbol]";function SX(ue){return typeof ue=="symbol"||Dl(ue)&&Oc(ue)==AX}var Rf=SX;var MX=NaN;function EX(ue){return typeof ue=="number"?ue:Rf(ue)?MX:+ue}var wA=EX;function kX(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length,gr=Array(Rt);++Ye<Rt;)gr[Ye]=ge(ue[Ye],Ye,ue);return gr}var Ml=kX;var CX=Array.isArray,Io=CX;var LX=1/0,Jk=If?If.prototype:void 0,$k=Jk?Jk.toString:void 0;function Qk(ue){if(typeof ue=="string")return ue;if(Io(ue))return Ml(ue,Qk)+"";if(Rf(ue))return $k?$k.call(ue):"";var ge=ue+"";return ge=="0"&&1/ue==-LX?"-0":ge}var nh=Qk;function PX(ue,ge){return function(Ye,Rt){var gr;if(Ye===void 0&&Rt===void 0)return ge;if(Ye!==void 0&&(gr=Ye),Rt!==void 0){if(gr===void 0)return Rt;typeof Ye=="string"||typeof Rt=="string"?(Ye=nh(Ye),Rt=nh(Rt)):(Ye=wA(Ye),Rt=wA(Rt)),gr=ue(Ye,Rt)}return gr}}var wm=PX;var IX=wm(function(ue,ge){return ue+ge},0),eC=IX;var RX=/\s/;function DX(ue){for(var ge=ue.length;ge--&&RX.test(ue.charAt(ge)););return ge}var bb=DX;var zX=/^\s+/;function FX(ue){return ue&&ue.slice(0,bb(ue)+1).replace(zX,"")}var wb=FX;function OX(ue){var ge=typeof ue;return ue!=null&&(ge=="object"||ge=="function")}var Ll=OX;var tC=NaN,BX=/^[-+]0x[0-9a-f]+$/i,NX=/^0b[01]+$/i,UX=/^0o[0-7]+$/i,jX=parseInt;function qX(ue){if(typeof ue=="number")return ue;if(Rf(ue))return tC;if(Ll(ue)){var ge=typeof ue.valueOf=="function"?ue.valueOf():ue;ue=Ll(ge)?ge+"":ge}if(typeof ue!="string")return ue===0?ue:+ue;ue=wb(ue);var Ye=NX.test(ue);return Ye||UX.test(ue)?jX(ue.slice(2),Ye?2:8):BX.test(ue)?tC:+ue}var Sh=qX;var rC=1/0,VX=17976931348623157e292;function GX(ue){if(!ue)return ue===0?ue:0;if(ue=Sh(ue),ue===rC||ue===-rC){var ge=ue<0?-1:1;return ge*VX}return ue===ue?ue:0}var od=GX;function HX(ue){var ge=od(ue),Ye=ge%1;return ge===ge?Ye?ge-Ye:ge:0}var jo=HX;var WX="Expected a function";function XX(ue,ge){if(typeof ge!="function")throw new TypeError(WX);return ue=jo(ue),function(){if(--ue<1)return ge.apply(this,arguments)}}var aC=XX;function ZX(ue){return ue}var Bc=ZX;var YX="[object AsyncFunction]",KX="[object Function]",JX="[object GeneratorFunction]",$X="[object Proxy]";function QX(ue){if(!Ll(ue))return!1;var ge=Oc(ue);return ge==KX||ge==JX||ge==YX||ge==$X}var ap=QX;var eZ=wu["__core-js_shared__"],Zg=eZ;var iC=function(){var ue=/[^.]+$/.exec(Zg&&Zg.keys&&Zg.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""}();function tZ(ue){return!!iC&&iC in ue}var nC=tZ;var rZ=Function.prototype,aZ=rZ.toString;function iZ(ue){if(ue!=null){try{return aZ.call(ue)}catch{}try{return ue+""}catch{}}return""}var jv=iZ;var nZ=/[\\^$.*+?()[\]{}|]/g,oZ=/^\[object .+?Constructor\]$/,sZ=Function.prototype,lZ=Object.prototype,uZ=sZ.toString,cZ=lZ.hasOwnProperty,fZ=RegExp("^"+uZ.call(cZ).replace(nZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hZ(ue){if(!Ll(ue)||nC(ue))return!1;var ge=ap(ue)?fZ:oZ;return ge.test(jv(ue))}var Tb=hZ;function pZ(ue,ge){return ue?.[ge]}var oC=pZ;function dZ(ue,ge){var Ye=oC(ue,ge);return Tb(Ye)?Ye:void 0}var sd=dZ;var vZ=sd(wu,"WeakMap"),q0=vZ;var mZ=q0&&new q0,Yg=mZ;var gZ=Yg?function(ue,ge){return Yg.set(ue,ge),ue}:Bc,Ab=gZ;var sC=Object.create,yZ=function(){function ue(){}return function(ge){if(!Ll(ge))return{};if(sC)return sC(ge);ue.prototype=ge;var Ye=new ue;return ue.prototype=void 0,Ye}}(),Td=yZ;function _Z(ue){return function(){var ge=arguments;switch(ge.length){case 0:return new ue;case 1:return new ue(ge[0]);case 2:return new ue(ge[0],ge[1]);case 3:return new ue(ge[0],ge[1],ge[2]);case 4:return new ue(ge[0],ge[1],ge[2],ge[3]);case 5:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4]);case 6:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5]);case 7:return new ue(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5],ge[6])}var Ye=Td(ue.prototype),Rt=ue.apply(Ye,ge);return Ll(Rt)?Rt:Ye}}var qv=_Z;var xZ=1;function bZ(ue,ge,Ye){var Rt=ge&xZ,gr=qv(ue);function Yr(){var Ea=this&&this!==wu&&this instanceof Yr?gr:ue;return Ea.apply(Rt?Ye:this,arguments)}return Yr}var lC=bZ;function wZ(ue,ge,Ye){switch(Ye.length){case 0:return ue.call(ge);case 1:return ue.call(ge,Ye[0]);case 2:return ue.call(ge,Ye[0],Ye[1]);case 3:return ue.call(ge,Ye[0],Ye[1],Ye[2])}return ue.apply(ge,Ye)}var xf=wZ;var TZ=Math.max;function AZ(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue.length,Ea=Ye.length,ei=-1,oi=ge.length,Cn=TZ(Yr-Ea,0),bn=Array(oi+Cn),Fn=!Rt;++ei<oi;)bn[ei]=ge[ei];for(;++gr<Ea;)(Fn||gr<Yr)&&(bn[Ye[gr]]=ue[gr]);for(;Cn--;)bn[ei++]=ue[gr++];return bn}var Sb=AZ;var SZ=Math.max;function MZ(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue.length,Ea=-1,ei=Ye.length,oi=-1,Cn=ge.length,bn=SZ(Yr-ei,0),Fn=Array(bn+Cn),To=!Rt;++gr<bn;)Fn[gr]=ue[gr];for(var ds=gr;++oi<Cn;)Fn[ds+oi]=ge[oi];for(;++Ea<ei;)(To||gr<Yr)&&(Fn[ds+Ye[Ea]]=ue[gr++]);return Fn}var Mb=MZ;function EZ(ue,ge){for(var Ye=ue.length,Rt=0;Ye--;)ue[Ye]===ge&&++Rt;return Rt}var uC=EZ;function kZ(){}var Tm=kZ;var CZ=4294967295;function Eb(ue){this.__wrapped__=ue,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=CZ,this.__views__=[]}Eb.prototype=Td(Tm.prototype);Eb.prototype.constructor=Eb;var Bl=Eb;function LZ(){}var Kg=LZ;var PZ=Yg?function(ue){return Yg.get(ue)}:Kg,Jg=PZ;var IZ={},Am=IZ;var RZ=Object.prototype,DZ=RZ.hasOwnProperty;function zZ(ue){for(var ge=ue.name+"",Ye=Am[ge],Rt=DZ.call(Am,ge)?Ye.length:0;Rt--;){var gr=Ye[Rt],Yr=gr.func;if(Yr==null||Yr==ue)return gr.name}return ge}var $g=zZ;function kb(ue,ge){this.__wrapped__=ue,this.__actions__=[],this.__chain__=!!ge,this.__index__=0,this.__values__=void 0}kb.prototype=Td(Tm.prototype);kb.prototype.constructor=kb;var zp=kb;function FZ(ue,ge){var Ye=-1,Rt=ue.length;for(ge||(ge=Array(Rt));++Ye<Rt;)ge[Ye]=ue[Ye];return ge}var pf=FZ;function OZ(ue){if(ue instanceof Bl)return ue.clone();var ge=new zp(ue.__wrapped__,ue.__chain__);return ge.__actions__=pf(ue.__actions__),ge.__index__=ue.__index__,ge.__values__=ue.__values__,ge}var Cb=OZ;var BZ=Object.prototype,NZ=BZ.hasOwnProperty;function Lb(ue){if(Dl(ue)&&!Io(ue)&&!(ue instanceof Bl)){if(ue instanceof zp)return ue;if(NZ.call(ue,"__wrapped__"))return Cb(ue)}return new zp(ue)}Lb.prototype=Tm.prototype;Lb.prototype.constructor=Lb;var va=Lb;function UZ(ue){var ge=$g(ue),Ye=va[ge];if(typeof Ye!="function"||!(ge in Bl.prototype))return!1;if(ue===Ye)return!0;var Rt=Jg(Ye);return!!Rt&&ue===Rt[0]}var i_=UZ;var jZ=800,qZ=16,VZ=Date.now;function GZ(ue){var ge=0,Ye=0;return function(){var Rt=VZ(),gr=qZ-(Rt-Ye);if(Ye=Rt,gr>0){if(++ge>=jZ)return arguments[0]}else ge=0;return ue.apply(void 0,arguments)}}var Pb=GZ;var HZ=Pb(Ab),Ib=HZ;var WZ=/\{\n\/\* \[wrapped with (.+)\] \*/,XZ=/,? & /;function ZZ(ue){var ge=ue.match(WZ);return ge?ge[1].split(XZ):[]}var cC=ZZ;var YZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function KZ(ue,ge){var Ye=ge.length;if(!Ye)return ue;var Rt=Ye-1;return ge[Rt]=(Ye>1?"& ":"")+ge[Rt],ge=ge.join(Ye>2?", ":" "),ue.replace(YZ,`{
/* [wrapped with `+ge+`] */
`)}var fC=KZ;function JZ(ue){return function(){return ue}}var Qg=JZ;var $Z=function(){try{var ue=sd(Object,"defineProperty");return ue({},"",{}),ue}catch{}}(),ey=$Z;var QZ=ey?function(ue,ge){return ey(ue,"toString",{configurable:!0,enumerable:!1,value:Qg(ge),writable:!0})}:Bc,hC=QZ;var eY=Pb(hC),ty=eY;function tY(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt&&ge(ue[Ye],Ye,ue)!==!1;);return ue}var Nh=tY;function rY(ue,ge,Ye,Rt){for(var gr=ue.length,Yr=Ye+(Rt?1:-1);Rt?Yr--:++Yr<gr;)if(ge(ue[Yr],Yr,ue))return Yr;return-1}var Sm=rY;function aY(ue){return ue!==ue}var Rb=aY;function iY(ue,ge,Ye){for(var Rt=Ye-1,gr=ue.length;++Rt<gr;)if(ue[Rt]===ge)return Rt;return-1}var pC=iY;function nY(ue,ge,Ye){return ge===ge?pC(ue,ge,Ye):Sm(ue,Rb,Ye)}var Ad=nY;function oY(ue,ge){var Ye=ue==null?0:ue.length;return!!Ye&&Ad(ue,ge,0)>-1}var Mm=oY;var sY=1,lY=2,uY=8,cY=16,fY=32,hY=64,pY=128,dY=256,vY=512,mY=[["ary",pY],["bind",sY],["bindKey",lY],["curry",uY],["curryRight",cY],["flip",vY],["partial",fY],["partialRight",hY],["rearg",dY]];function gY(ue,ge){return Nh(mY,function(Ye){var Rt="_."+Ye[0];ge&Ye[1]&&!Mm(ue,Rt)&&ue.push(Rt)}),ue.sort()}var dC=gY;function yY(ue,ge,Ye){var Rt=ge+"";return ty(ue,fC(Rt,dC(cC(Rt),Ye)))}var Db=yY;var _Y=1,xY=2,bY=4,wY=8,vC=32,mC=64;function TY(ue,ge,Ye,Rt,gr,Yr,Ea,ei,oi,Cn){var bn=ge&wY,Fn=bn?Ea:void 0,To=bn?void 0:Ea,ds=bn?Yr:void 0,Qs=bn?void 0:Yr;ge|=bn?vC:mC,ge&=~(bn?mC:vC),ge&bY||(ge&=~(_Y|xY));var Vo=[ue,ge,gr,ds,Fn,Qs,To,ei,oi,Cn],Xe=Ye.apply(void 0,Vo);return i_(ue)&&Ib(Xe,Vo),Xe.placeholder=Rt,Db(Xe,ue,ge)}var zb=TY;function AY(ue){var ge=ue;return ge.placeholder}var Sd=AY;var SY=9007199254740991,MY=/^(?:0|[1-9]\d*)$/;function EY(ue,ge){var Ye=typeof ue;return ge=ge??SY,!!ge&&(Ye=="number"||Ye!="symbol"&&MY.test(ue))&&ue>-1&&ue%1==0&&ue<ge}var ip=EY;var kY=Math.min;function CY(ue,ge){for(var Ye=ue.length,Rt=kY(ge.length,Ye),gr=pf(ue);Rt--;){var Yr=ge[Rt];ue[Rt]=ip(Yr,Ye)?gr[Yr]:void 0}return ue}var gC=CY;var yC="__lodash_placeholder__";function LY(ue,ge){for(var Ye=-1,Rt=ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye];(Ea===ge||Ea===yC)&&(ue[Ye]=yC,Yr[gr++]=Ye)}return Yr}var Yp=LY;var PY=1,IY=2,RY=8,DY=16,zY=128,FY=512;function _C(ue,ge,Ye,Rt,gr,Yr,Ea,ei,oi,Cn){var bn=ge&zY,Fn=ge&PY,To=ge&IY,ds=ge&(RY|DY),Qs=ge&FY,Vo=To?void 0:qv(ue);function Xe(){for(var Kl=arguments.length,nu=Array(Kl),jp=Kl;jp--;)nu[jp]=arguments[jp];if(ds)var zf=Sd(Xe),fp=uC(nu,zf);if(Rt&&(nu=Sb(nu,Rt,gr,ds)),Yr&&(nu=Mb(nu,Yr,Ea,ds)),Kl-=fp,ds&&Kl<Cn){var Ff=Yp(nu,zf);return zb(ue,ge,_C,Xe.placeholder,Ye,nu,Ff,ei,oi,Cn-Kl)}var Hn=Fn?Ye:this,dd=To?Hn[ue]:ue;return Kl=nu.length,ei?nu=gC(nu,ei):Qs&&Kl>1&&nu.reverse(),bn&&oi<Kl&&(nu.length=oi),this&&this!==wu&&this instanceof Xe&&(dd=Vo||qv(dd)),dd.apply(Hn,nu)}return Xe}var ry=_C;function OY(ue,ge,Ye){var Rt=qv(ue);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<Ye)return zb(ue,ge,ry,gr.placeholder,void 0,Ea,Cn,void 0,void 0,Ye-Yr);var bn=this&&this!==wu&&this instanceof gr?Rt:ue;return xf(bn,this,Ea)}return gr}var xC=OY;var BY=1;function NY(ue,ge,Ye,Rt){var gr=ge&BY,Yr=qv(ue);function Ea(){for(var ei=-1,oi=arguments.length,Cn=-1,bn=Rt.length,Fn=Array(bn+oi),To=this&&this!==wu&&this instanceof Ea?Yr:ue;++Cn<bn;)Fn[Cn]=Rt[Cn];for(;oi--;)Fn[Cn++]=arguments[++ei];return xf(To,gr?Ye:this,Fn)}return Ea}var bC=NY;var wC="__lodash_placeholder__",TA=1,UY=2,jY=4,TC=8,n_=128,AC=256,qY=Math.min;function VY(ue,ge){var Ye=ue[1],Rt=ge[1],gr=Ye|Rt,Yr=gr<(TA|UY|n_),Ea=Rt==n_&&Ye==TC||Rt==n_&&Ye==AC&&ue[7].length<=ge[8]||Rt==(n_|AC)&&ge[7].length<=ge[8]&&Ye==TC;if(!(Yr||Ea))return ue;Rt&TA&&(ue[2]=ge[2],gr|=Ye&TA?0:jY);var ei=ge[3];if(ei){var oi=ue[3];ue[3]=oi?Sb(oi,ei,ge[4]):ei,ue[4]=oi?Yp(ue[3],wC):ge[4]}return ei=ge[5],ei&&(oi=ue[5],ue[5]=oi?Mb(oi,ei,ge[6]):ei,ue[6]=oi?Yp(ue[5],wC):ge[6]),ei=ge[7],ei&&(ue[7]=ei),Rt&n_&&(ue[8]=ue[8]==null?ge[8]:qY(ue[8],ge[8])),ue[9]==null&&(ue[9]=ge[9]),ue[0]=ge[0],ue[1]=gr,ue}var SC=VY;var GY="Expected a function",MC=1,HY=2,AA=8,SA=16,MA=32,EC=64,kC=Math.max;function WY(ue,ge,Ye,Rt,gr,Yr,Ea,ei){var oi=ge&HY;if(!oi&&typeof ue!="function")throw new TypeError(GY);var Cn=Rt?Rt.length:0;if(Cn||(ge&=~(MA|EC),Rt=gr=void 0),Ea=Ea===void 0?Ea:kC(jo(Ea),0),ei=ei===void 0?ei:jo(ei),Cn-=gr?gr.length:0,ge&EC){var bn=Rt,Fn=gr;Rt=gr=void 0}var To=oi?void 0:Jg(ue),ds=[ue,ge,Ye,Rt,gr,bn,Fn,Yr,Ea,ei];if(To&&SC(ds,To),ue=ds[0],ge=ds[1],Ye=ds[2],Rt=ds[3],gr=ds[4],ei=ds[9]=ds[9]===void 0?oi?0:ue.length:kC(ds[9]-Cn,0),!ei&&ge&(AA|SA)&&(ge&=~(AA|SA)),!ge||ge==MC)var Qs=lC(ue,ge,Ye);else ge==AA||ge==SA?Qs=xC(ue,ge,ei):(ge==MA||ge==(MC|MA))&&!gr.length?Qs=bC(ue,ge,Ye,Rt):Qs=ry.apply(void 0,ds);var Vo=To?Ab:Ib;return Db(Vo(Qs,ds),ue,ge)}var np=WY;var XY=128;function ZY(ue,ge,Ye){return ge=Ye?void 0:ge,ge=ue&&ge==null?ue.length:ge,np(ue,XY,void 0,void 0,void 0,void 0,ge)}var Fb=ZY;function YY(ue,ge,Ye){ge=="__proto__"&&ey?ey(ue,ge,{configurable:!0,enumerable:!0,value:Ye,writable:!0}):ue[ge]=Ye}var op=YY;function KY(ue,ge){return ue===ge||ue!==ue&&ge!==ge}var oh=KY;var JY=Object.prototype,$Y=JY.hasOwnProperty;function QY(ue,ge,Ye){var Rt=ue[ge];(!($Y.call(ue,ge)&&oh(Rt,Ye))||Ye===void 0&&!(ge in ue))&&op(ue,ge,Ye)}var vv=QY;function eK(ue,ge,Ye,Rt){var gr=!Ye;Ye||(Ye={});for(var Yr=-1,Ea=ge.length;++Yr<Ea;){var ei=ge[Yr],oi=Rt?Rt(Ye[ei],ue[ei],ei,Ye,ue):void 0;oi===void 0&&(oi=ue[ei]),gr?op(Ye,ei,oi):vv(Ye,ei,oi)}return Ye}var Mh=eK;var CC=Math.max;function tK(ue,ge,Ye){return ge=CC(ge===void 0?ue.length-1:ge,0),function(){for(var Rt=arguments,gr=-1,Yr=CC(Rt.length-ge,0),Ea=Array(Yr);++gr<Yr;)Ea[gr]=Rt[ge+gr];gr=-1;for(var ei=Array(ge+1);++gr<ge;)ei[gr]=Rt[gr];return ei[ge]=Ye(Ea),xf(ue,this,ei)}}var Ob=tK;function rK(ue,ge){return ty(Ob(ue,ge,Bc),ue+"")}var qo=rK;var aK=9007199254740991;function iK(ue){return typeof ue=="number"&&ue>-1&&ue%1==0&&ue<=aK}var Em=iK;function nK(ue){return ue!=null&&Em(ue.length)&&!ap(ue)}var Vc=nK;function oK(ue,ge,Ye){if(!Ll(Ye))return!1;var Rt=typeof ge;return(Rt=="number"?Vc(Ye)&&ip(ge,Ye.length):Rt=="string"&&ge in Ye)?oh(Ye[ge],ue):!1}var Nc=oK;function sK(ue){return qo(function(ge,Ye){var Rt=-1,gr=Ye.length,Yr=gr>1?Ye[gr-1]:void 0,Ea=gr>2?Ye[2]:void 0;for(Yr=ue.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Ye[0],Ye[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),ge=Object(ge);++Rt<gr;){var ei=Ye[Rt];ei&&ue(ge,ei,Rt,Yr)}return ge})}var Md=sK;var lK=Object.prototype;function uK(ue){var ge=ue&&ue.constructor,Ye=typeof ge=="function"&&ge.prototype||lK;return ue===Ye}var mv=uK;function cK(ue,ge){for(var Ye=-1,Rt=Array(ue);++Ye<ue;)Rt[Ye]=ge(Ye);return Rt}var ay=cK;var fK="[object Arguments]";function hK(ue){return Dl(ue)&&Oc(ue)==fK}var EA=hK;var LC=Object.prototype,pK=LC.hasOwnProperty,dK=LC.propertyIsEnumerable,vK=EA(function(){return arguments}())?EA:function(ue){return Dl(ue)&&pK.call(ue,"callee")&&!dK.call(ue,"callee")},pd=vK;function mK(){return!1}var iy=mK;var RC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,PC=RC&&typeof module=="object"&&module&&!module.nodeType&&module,gK=PC&&PC.exports===RC,IC=gK?wu.Buffer:void 0,yK=IC?IC.isBuffer:void 0,_K=yK||iy,Kp=_K;var xK="[object Arguments]",bK="[object Array]",wK="[object Boolean]",TK="[object Date]",AK="[object Error]",SK="[object Function]",MK="[object Map]",EK="[object Number]",kK="[object Object]",CK="[object RegExp]",LK="[object Set]",PK="[object String]",IK="[object WeakMap]",RK="[object ArrayBuffer]",DK="[object DataView]",zK="[object Float32Array]",FK="[object Float64Array]",OK="[object Int8Array]",BK="[object Int16Array]",NK="[object Int32Array]",UK="[object Uint8Array]",jK="[object Uint8ClampedArray]",qK="[object Uint16Array]",VK="[object Uint32Array]",bf={};bf[zK]=bf[FK]=bf[OK]=bf[BK]=bf[NK]=bf[UK]=bf[jK]=bf[qK]=bf[VK]=!0;bf[xK]=bf[bK]=bf[RK]=bf[wK]=bf[DK]=bf[TK]=bf[AK]=bf[SK]=bf[MK]=bf[EK]=bf[kK]=bf[CK]=bf[LK]=bf[PK]=bf[IK]=!1;function GK(ue){return Dl(ue)&&Em(ue.length)&&!!bf[Oc(ue)]}var DC=GK;function HK(ue){return function(ge){return ue(ge)}}var wf=HK;var zC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o_=zC&&typeof module=="object"&&module&&!module.nodeType&&module,WK=o_&&o_.exports===zC,kA=WK&&xb.process,XK=function(){try{var ue=o_&&o_.require&&o_.require("util").types;return ue||kA&&kA.binding&&kA.binding("util")}catch{}}(),sp=XK;var FC=sp&&sp.isTypedArray,ZK=FC?wf(FC):DC,Ed=ZK;var YK=Object.prototype,KK=YK.hasOwnProperty;function JK(ue,ge){var Ye=Io(ue),Rt=!Ye&&pd(ue),gr=!Ye&&!Rt&&Kp(ue),Yr=!Ye&&!Rt&&!gr&&Ed(ue),Ea=Ye||Rt||gr||Yr,ei=Ea?ay(ue.length,String):[],oi=ei.length;for(var Cn in ue)(ge||KK.call(ue,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=JK;function $K(ue,ge){return function(Ye){return ue(ge(Ye))}}var Nb=$K;var QK=Nb(Object.keys,Object),OC=QK;var eJ=Object.prototype,tJ=eJ.hasOwnProperty;function rJ(ue){if(!mv(ue))return OC(ue);var ge=[];for(var Ye in Object(ue))tJ.call(ue,Ye)&&Ye!="constructor"&&ge.push(Ye);return ge}var ny=rJ;function aJ(ue){return Vc(ue)?Bb(ue):ny(ue)}var gu=aJ;var iJ=Object.prototype,nJ=iJ.hasOwnProperty,oJ=Md(function(ue,ge){if(mv(ge)||Vc(ge)){Mh(ge,gu(ge),ue);return}for(var Ye in ge)nJ.call(ge,Ye)&&vv(ue,Ye,ge[Ye])}),BC=oJ;function sJ(ue){var ge=[];if(ue!=null)for(var Ye in Object(ue))ge.push(Ye);return ge}var NC=sJ;var lJ=Object.prototype,uJ=lJ.hasOwnProperty;function cJ(ue){if(!Ll(ue))return NC(ue);var ge=mv(ue),Ye=[];for(var Rt in ue)Rt=="constructor"&&(ge||!uJ.call(ue,Rt))||Ye.push(Rt);return Ye}var UC=cJ;function fJ(ue){return Vc(ue)?Bb(ue,!0):UC(ue)}var Gc=fJ;var hJ=Md(function(ue,ge){Mh(ge,Gc(ge),ue)}),s_=hJ;var pJ=Md(function(ue,ge,Ye,Rt){Mh(ge,Gc(ge),ue,Rt)}),km=pJ;var dJ=Md(function(ue,ge,Ye,Rt){Mh(ge,gu(ge),ue,Rt)}),jC=dJ;var vJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mJ=/^\w*$/;function gJ(ue,ge){if(Io(ue))return!1;var Ye=typeof ue;return Ye=="number"||Ye=="symbol"||Ye=="boolean"||ue==null||Rf(ue)?!0:mJ.test(ue)||!vJ.test(ue)||ge!=null&&ue in Object(ge)}var oy=gJ;var yJ=sd(Object,"create"),Vv=yJ;function _J(){this.__data__=Vv?Vv(null):{},this.size=0}var qC=_J;function xJ(ue){var ge=this.has(ue)&&delete this.__data__[ue];return this.size-=ge?1:0,ge}var VC=xJ;var bJ="__lodash_hash_undefined__",wJ=Object.prototype,TJ=wJ.hasOwnProperty;function AJ(ue){var ge=this.__data__;if(Vv){var Ye=ge[ue];return Ye===bJ?void 0:Ye}return TJ.call(ge,ue)?ge[ue]:void 0}var GC=AJ;var SJ=Object.prototype,MJ=SJ.hasOwnProperty;function EJ(ue){var ge=this.__data__;return Vv?ge[ue]!==void 0:MJ.call(ge,ue)}var HC=EJ;var kJ="__lodash_hash_undefined__";function CJ(ue,ge){var Ye=this.__data__;return this.size+=this.has(ue)?0:1,Ye[ue]=Vv&&ge===void 0?kJ:ge,this}var WC=CJ;function sy(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[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 LJ(){this.__data__=[],this.size=0}var XC=LJ;function PJ(ue,ge){for(var Ye=ue.length;Ye--;)if(oh(ue[Ye][0],ge))return Ye;return-1}var Cm=PJ;var IJ=Array.prototype,RJ=IJ.splice;function DJ(ue){var ge=this.__data__,Ye=Cm(ge,ue);if(Ye<0)return!1;var Rt=ge.length-1;return Ye==Rt?ge.pop():RJ.call(ge,Ye,1),--this.size,!0}var ZC=DJ;function zJ(ue){var ge=this.__data__,Ye=Cm(ge,ue);return Ye<0?void 0:ge[Ye][1]}var YC=zJ;function FJ(ue){return Cm(this.__data__,ue)>-1}var KC=FJ;function OJ(ue,ge){var Ye=this.__data__,Rt=Cm(Ye,ue);return Rt<0?(++this.size,Ye.push([ue,ge])):Ye[Rt][1]=ge,this}var JC=OJ;function ly(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[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 BJ=sd(wu,"Map"),Pm=BJ;function NJ(){this.size=0,this.__data__={hash:new CA,map:new(Pm||Lm),string:new CA}}var $C=NJ;function UJ(ue){var ge=typeof ue;return ge=="string"||ge=="number"||ge=="symbol"||ge=="boolean"?ue!=="__proto__":ue===null}var QC=UJ;function jJ(ue,ge){var Ye=ue.__data__;return QC(ge)?Ye[typeof ge=="string"?"string":"hash"]:Ye.map}var Im=jJ;function qJ(ue){var ge=Im(this,ue).delete(ue);return this.size-=ge?1:0,ge}var eL=qJ;function VJ(ue){return Im(this,ue).get(ue)}var tL=VJ;function GJ(ue){return Im(this,ue).has(ue)}var rL=GJ;function HJ(ue,ge){var Ye=Im(this,ue),Rt=Ye.size;return Ye.set(ue,ge),this.size+=Ye.size==Rt?0:1,this}var aL=HJ;function uy(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge<Ye;){var Rt=ue[ge];this.set(Rt[0],Rt[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 WJ="Expected a function";function LA(ue,ge){if(typeof ue!="function"||ge!=null&&typeof ge!="function")throw new TypeError(WJ);var Ye=function(){var Rt=arguments,gr=ge?ge.apply(this,Rt):Rt[0],Yr=Ye.cache;if(Yr.has(gr))return Yr.get(gr);var Ea=ue.apply(this,Rt);return Ye.cache=Yr.set(gr,Ea)||Yr,Ea};return Ye.cache=new(LA.Cache||V0),Ye}LA.Cache=V0;var Ub=LA;var XJ=500;function ZJ(ue){var ge=Ub(ue,function(Rt){return Ye.size===XJ&&Ye.clear(),Rt}),Ye=ge.cache;return ge}var iL=ZJ;var YJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,KJ=/\\(\\)?/g,JJ=iL(function(ue){var ge=[];return ue.charCodeAt(0)===46&&ge.push(""),ue.replace(YJ,function(Ye,Rt,gr,Yr){ge.push(gr?Yr.replace(KJ,"$1"):Rt||Ye)}),ge}),jb=JJ;function $J(ue){return ue==null?"":nh(ue)}var Bs=$J;function QJ(ue,ge){return Io(ue)?ue:oy(ue,ge)?[ue]:jb(Bs(ue))}var Fp=QJ;var e$=1/0;function t$(ue){if(typeof ue=="string"||Rf(ue))return ue;var ge=ue+"";return ge=="0"&&1/ue==-e$?"-0":ge}var Eh=t$;function r$(ue,ge){ge=Fp(ge,ue);for(var Ye=0,Rt=ge.length;ue!=null&&Ye<Rt;)ue=ue[Eh(ge[Ye++])];return Ye&&Ye==Rt?ue:void 0}var ld=r$;function a$(ue,ge,Ye){var Rt=ue==null?void 0:ld(ue,ge);return Rt===void 0?Ye:Rt}var cy=a$;function i$(ue,ge){for(var Ye=-1,Rt=ge.length,gr=Array(Rt),Yr=ue==null;++Ye<Rt;)gr[Ye]=Yr?void 0:cy(ue,ge[Ye]);return gr}var fy=i$;function n$(ue,ge){for(var Ye=-1,Rt=ge.length,gr=ue.length;++Ye<Rt;)ue[gr+Ye]=ge[Ye];return ue}var Op=n$;var nL=If?If.isConcatSpreadable:void 0;function o$(ue){return Io(ue)||pd(ue)||!!(nL&&ue&&ue[nL])}var oL=o$;function sL(ue,ge,Ye,Rt,gr){var Yr=-1,Ea=ue.length;for(Ye||(Ye=oL),gr||(gr=[]);++Yr<Ea;){var ei=ue[Yr];ge>0&&Ye(ei)?ge>1?sL(ei,ge-1,Ye,Rt,gr):Op(gr,ei):Rt||(gr[gr.length]=ei)}return gr}var Qu=sL;function s$(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,1):[]}var qb=s$;function l$(ue){return ty(Ob(ue,void 0,qb),ue+"")}var lp=l$;var u$=lp(fy),lL=u$;var c$=Nb(Object.getPrototypeOf,Object),Rm=c$;var f$="[object Object]",h$=Function.prototype,p$=Object.prototype,uL=h$.toString,d$=p$.hasOwnProperty,v$=uL.call(Object);function m$(ue){if(!Dl(ue)||Oc(ue)!=f$)return!1;var ge=Rm(ue);if(ge===null)return!0;var Ye=d$.call(ge,"constructor")&&ge.constructor;return typeof Ye=="function"&&Ye instanceof Ye&&uL.call(Ye)==v$}var gv=m$;var g$="[object DOMException]",y$="[object Error]";function _$(ue){if(!Dl(ue))return!1;var ge=Oc(ue);return ge==y$||ge==g$||typeof ue.message=="string"&&typeof ue.name=="string"&&!gv(ue)}var hy=_$;var x$=qo(function(ue,ge){try{return xf(ue,void 0,ge)}catch(Ye){return hy(Ye)?Ye:new Error(Ye)}}),Vb=x$;var b$="Expected a function";function w$(ue,ge){var Ye;if(typeof ge!="function")throw new TypeError(b$);return ue=jo(ue),function(){return--ue>0&&(Ye=ge.apply(this,arguments)),ue<=1&&(ge=void 0),Ye}}var Gb=w$;var T$=1,A$=32,PA=qo(function(ue,ge,Ye){var Rt=T$;if(Ye.length){var gr=Yp(Ye,Sd(PA));Rt|=A$}return np(ue,Rt,ge,Ye,gr)});PA.placeholder={};var Hb=PA;var S$=lp(function(ue,ge){return Nh(ge,function(Ye){Ye=Eh(Ye),op(ue,Ye,Hb(ue[Ye],ue))}),ue}),cL=S$;var M$=1,E$=2,k$=32,IA=qo(function(ue,ge,Ye){var Rt=M$|E$;if(Ye.length){var gr=Yp(Ye,Sd(IA));Rt|=k$}return np(ge,Rt,ue,Ye,gr)});IA.placeholder={};var fL=IA;function C$(ue,ge,Ye){var Rt=-1,gr=ue.length;ge<0&&(ge=-ge>gr?0:gr+ge),Ye=Ye>gr?gr:Ye,Ye<0&&(Ye+=gr),gr=ge>Ye?0:Ye-ge>>>0,ge>>>=0;for(var Yr=Array(gr);++Rt<gr;)Yr[Rt]=ue[Rt+ge];return Yr}var Yf=C$;function L$(ue,ge,Ye){var Rt=ue.length;return Ye=Ye===void 0?Rt:Ye,!ge&&Ye>=Rt?ue:Yf(ue,ge,Ye)}var Bp=L$;var P$="\\ud800-\\udfff",I$="\\u0300-\\u036f",R$="\\ufe20-\\ufe2f",D$="\\u20d0-\\u20ff",z$=I$+R$+D$,F$="\\ufe0e\\ufe0f",O$="\\u200d",B$=RegExp("["+O$+P$+z$+F$+"]");function N$(ue){return B$.test(ue)}var kd=N$;function U$(ue){return ue.split("")}var hL=U$;var pL="\\ud800-\\udfff",j$="\\u0300-\\u036f",q$="\\ufe20-\\ufe2f",V$="\\u20d0-\\u20ff",G$=j$+q$+V$,H$="\\ufe0e\\ufe0f",W$="["+pL+"]",RA="["+G$+"]",DA="\\ud83c[\\udffb-\\udfff]",X$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",Z$="\\u200d",gL=X$+"?",yL="["+H$+"]?",Y$="(?:"+Z$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",K$=yL+gL+Y$,J$="(?:"+[dL+RA+"?",RA,vL,mL,W$].join("|")+")",$$=RegExp(DA+"(?="+DA+")|"+J$+K$,"g");function Q$(ue){return ue.match($$)||[]}var _L=Q$;function eQ(ue){return kd(ue)?_L(ue):hL(ue)}var Uh=eQ;function tQ(ue){return function(ge){ge=Bs(ge);var Ye=kd(ge)?Uh(ge):void 0,Rt=Ye?Ye[0]:ge.charAt(0),gr=Ye?Bp(Ye,1).join(""):ge.slice(1);return Rt[ue]()+gr}}var Wb=tQ;var rQ=Wb("toUpperCase"),py=rQ;function aQ(ue){return py(Bs(ue).toLowerCase())}var Xb=aQ;function iQ(ue,ge,Ye,Rt){var gr=-1,Yr=ue==null?0:ue.length;for(Rt&&Yr&&(Ye=ue[++gr]);++gr<Yr;)Ye=ge(Ye,ue[gr],gr,ue);return Ye}var dy=iQ;function nQ(ue){return function(ge){return ue?.[ge]}}var vy=nQ;var oQ={\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"},sQ=vy(oQ),xL=sQ;var lQ=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,uQ="\\u0300-\\u036f",cQ="\\ufe20-\\ufe2f",fQ="\\u20d0-\\u20ff",hQ=uQ+cQ+fQ,pQ="["+hQ+"]",dQ=RegExp(pQ,"g");function vQ(ue){return ue=Bs(ue),ue&&ue.replace(lQ,xL).replace(dQ,"")}var Zb=vQ;var mQ=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function gQ(ue){return ue.match(mQ)||[]}var bL=gQ;var yQ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _Q(ue){return yQ.test(ue)}var wL=_Q;var EL="\\ud800-\\udfff",xQ="\\u0300-\\u036f",bQ="\\ufe20-\\ufe2f",wQ="\\u20d0-\\u20ff",TQ=xQ+bQ+wQ,kL="\\u2700-\\u27bf",CL="a-z\\xdf-\\xf6\\xf8-\\xff",AQ="\\xac\\xb1\\xd7\\xf7",SQ="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",MQ="\\u2000-\\u206f",EQ=" \\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",kQ="\\ufe0e\\ufe0f",PL=AQ+SQ+MQ+EQ,IL="['\u2019]",TL="["+PL+"]",CQ="["+TQ+"]",RL="\\d+",LQ="["+kL+"]",DL="["+CL+"]",zL="[^"+EL+PL+RL+kL+CL+LL+"]",PQ="\\ud83c[\\udffb-\\udfff]",IQ="(?:"+CQ+"|"+PQ+")",RQ="[^"+EL+"]",FL="(?:\\ud83c[\\udde6-\\uddff]){2}",OL="[\\ud800-\\udbff][\\udc00-\\udfff]",my="["+LL+"]",DQ="\\u200d",AL="(?:"+DL+"|"+zL+")",zQ="(?:"+my+"|"+zL+")",SL="(?:"+IL+"(?:d|ll|m|re|s|t|ve))?",ML="(?:"+IL+"(?:D|LL|M|RE|S|T|VE))?",BL=IQ+"?",NL="["+kQ+"]?",FQ="(?:"+DQ+"(?:"+[RQ,FL,OL].join("|")+")"+NL+BL+")*",OQ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",BQ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",NQ=NL+BL+FQ,UQ="(?:"+[LQ,FL,OL].join("|")+")"+NQ,jQ=RegExp([my+"?"+DL+"+"+SL+"(?="+[TL,my,"$"].join("|")+")",zQ+"+"+ML+"(?="+[TL,my+AL,"$"].join("|")+")",my+"?"+AL+"+"+SL,my+"+"+ML,BQ,OQ,RL,UQ].join("|"),"g");function qQ(ue){return ue.match(jQ)||[]}var UL=qQ;function VQ(ue,ge,Ye){return ue=Bs(ue),ge=Ye?void 0:ge,ge===void 0?wL(ue)?UL(ue):bL(ue):ue.match(ge)||[]}var Yb=VQ;var GQ="['\u2019]",HQ=RegExp(GQ,"g");function WQ(ue){return function(ge){return dy(Yb(Zb(ge).replace(HQ,"")),ue,"")}}var Cd=WQ;var XQ=Cd(function(ue,ge,Ye){return ge=ge.toLowerCase(),ue+(Ye?Xb(ge):ge)}),jL=XQ;function ZQ(){if(!arguments.length)return[];var ue=arguments[0];return Io(ue)?ue:[ue]}var qL=ZQ;var YQ=wu.isFinite,KQ=Math.min;function JQ(ue){var ge=Math[ue];return function(Ye,Rt){if(Ye=Sh(Ye),Rt=Rt==null?0:KQ(jo(Rt),292),Rt&&YQ(Ye)){var gr=(Bs(Ye)+"e").split("e"),Yr=ge(gr[0]+"e"+(+gr[1]+Rt));return gr=(Bs(Yr)+"e").split("e"),+(gr[0]+"e"+(+gr[1]-Rt))}return ge(Ye)}}var gy=JQ;var $Q=gy("ceil"),VL=$Q;function QQ(ue){var ge=va(ue);return ge.__chain__=!0,ge}var Kb=QQ;var eee=Math.ceil,tee=Math.max;function ree(ue,ge,Ye){(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=tee(jo(ge),0);var Rt=ue==null?0:ue.length;if(!Rt||ge<1)return[];for(var gr=0,Yr=0,Ea=Array(eee(Rt/ge));gr<Rt;)Ea[Yr++]=Yf(ue,gr,gr+=ge);return Ea}var GL=ree;function aee(ue,ge,Ye){return ue===ue&&(Ye!==void 0&&(ue=ue<=Ye?ue:Ye),ge!==void 0&&(ue=ue>=ge?ue:ge)),ue}var ud=aee;function iee(ue,ge,Ye){return Ye===void 0&&(Ye=ge,ge=void 0),Ye!==void 0&&(Ye=Sh(Ye),Ye=Ye===Ye?Ye:0),ge!==void 0&&(ge=Sh(ge),ge=ge===ge?ge:0),ud(Sh(ue),ge,Ye)}var HL=iee;function nee(){this.__data__=new Lm,this.size=0}var WL=nee;function oee(ue){var ge=this.__data__,Ye=ge.delete(ue);return this.size=ge.size,Ye}var XL=oee;function see(ue){return this.__data__.get(ue)}var ZL=see;function lee(ue){return this.__data__.has(ue)}var YL=lee;var uee=200;function cee(ue,ge){var Ye=this.__data__;if(Ye instanceof Lm){var Rt=Ye.__data__;if(!Pm||Rt.length<uee-1)return Rt.push([ue,ge]),this.size=++Ye.size,this;Ye=this.__data__=new V0(Rt)}return Ye.set(ue,ge),this.size=Ye.size,this}var KL=cee;function yy(ue){var ge=this.__data__=new Lm(ue);this.size=ge.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 fee(ue,ge){return ue&&Mh(ge,gu(ge),ue)}var Jb=fee;function hee(ue,ge){return ue&&Mh(ge,Gc(ge),ue)}var JL=hee;var tP=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$L=tP&&typeof module=="object"&&module&&!module.nodeType&&module,pee=$L&&$L.exports===tP,QL=pee?wu.Buffer:void 0,eP=QL?QL.allocUnsafe:void 0;function dee(ue,ge){if(ge)return ue.slice();var Ye=ue.length,Rt=eP?eP(Ye):new ue.constructor(Ye);return ue.copy(Rt),Rt}var $b=dee;function vee(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye];ge(Ea,Ye,ue)&&(Yr[gr++]=Ea)}return Yr}var Np=vee;function mee(){return[]}var _y=mee;var gee=Object.prototype,yee=gee.propertyIsEnumerable,rP=Object.getOwnPropertySymbols,_ee=rP?function(ue){return ue==null?[]:(ue=Object(ue),Np(rP(ue),function(ge){return yee.call(ue,ge)}))}:_y,xy=_ee;function xee(ue,ge){return Mh(ue,xy(ue),ge)}var aP=xee;var bee=Object.getOwnPropertySymbols,wee=bee?function(ue){for(var ge=[];ue;)Op(ge,xy(ue)),ue=Rm(ue);return ge}:_y,Qb=wee;function Tee(ue,ge){return Mh(ue,Qb(ue),ge)}var iP=Tee;function Aee(ue,ge,Ye){var Rt=ge(ue);return Io(ue)?Rt:Op(Rt,Ye(ue))}var ew=Aee;function See(ue){return ew(ue,gu,xy)}var l_=See;function Mee(ue){return ew(ue,Gc,Qb)}var by=Mee;var Eee=sd(wu,"DataView"),tw=Eee;var kee=sd(wu,"Promise"),rw=kee;var Cee=sd(wu,"Set"),Dm=Cee;var nP="[object Map]",Lee="[object Object]",oP="[object Promise]",sP="[object Set]",lP="[object WeakMap]",uP="[object DataView]",Pee=jv(tw),Iee=jv(Pm),Ree=jv(rw),Dee=jv(Dm),zee=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(ue){var ge=Oc(ue),Ye=ge==Lee?ue.constructor:void 0,Rt=Ye?jv(Ye):"";if(Rt)switch(Rt){case Pee:return uP;case Iee:return nP;case Ree:return oP;case Dee:return sP;case zee:return lP}return ge});var jh=G0;var Fee=Object.prototype,Oee=Fee.hasOwnProperty;function Bee(ue){var ge=ue.length,Ye=new ue.constructor(ge);return ge&&typeof ue[0]=="string"&&Oee.call(ue,"index")&&(Ye.index=ue.index,Ye.input=ue.input),Ye}var cP=Bee;var Nee=wu.Uint8Array,wy=Nee;function Uee(ue){var ge=new ue.constructor(ue.byteLength);return new wy(ge).set(new wy(ue)),ge}var Ty=Uee;function jee(ue,ge){var Ye=ge?Ty(ue.buffer):ue.buffer;return new ue.constructor(Ye,ue.byteOffset,ue.byteLength)}var fP=jee;var qee=/\w*$/;function Vee(ue){var ge=new ue.constructor(ue.source,qee.exec(ue));return ge.lastIndex=ue.lastIndex,ge}var hP=Vee;var pP=If?If.prototype:void 0,dP=pP?pP.valueOf:void 0;function Gee(ue){return dP?Object(dP.call(ue)):{}}var vP=Gee;function Hee(ue,ge){var Ye=ge?Ty(ue.buffer):ue.buffer;return new ue.constructor(Ye,ue.byteOffset,ue.length)}var aw=Hee;var Wee="[object Boolean]",Xee="[object Date]",Zee="[object Map]",Yee="[object Number]",Kee="[object RegExp]",Jee="[object Set]",$ee="[object String]",Qee="[object Symbol]",ete="[object ArrayBuffer]",tte="[object DataView]",rte="[object Float32Array]",ate="[object Float64Array]",ite="[object Int8Array]",nte="[object Int16Array]",ote="[object Int32Array]",ste="[object Uint8Array]",lte="[object Uint8ClampedArray]",ute="[object Uint16Array]",cte="[object Uint32Array]";function fte(ue,ge,Ye){var Rt=ue.constructor;switch(ge){case ete:return Ty(ue);case Wee:case Xee:return new Rt(+ue);case tte:return fP(ue,Ye);case rte:case ate:case ite:case nte:case ote:case ste:case lte:case ute:case cte:return aw(ue,Ye);case Zee:return new Rt;case Yee:case $ee:return new Rt(ue);case Kee:return hP(ue);case Jee:return new Rt;case Qee:return vP(ue)}}var mP=fte;function hte(ue){return typeof ue.constructor=="function"&&!mv(ue)?Td(Rm(ue)):{}}var iw=hte;var pte="[object Map]";function dte(ue){return Dl(ue)&&jh(ue)==pte}var gP=dte;var yP=sp&&sp.isMap,vte=yP?wf(yP):gP,nw=vte;var mte="[object Set]";function gte(ue){return Dl(ue)&&jh(ue)==mte}var _P=gte;var xP=sp&&sp.isSet,yte=xP?wf(xP):_P,ow=yte;var _te=1,xte=2,bte=4,bP="[object Arguments]",wte="[object Array]",Tte="[object Boolean]",Ate="[object Date]",Ste="[object Error]",wP="[object Function]",Mte="[object GeneratorFunction]",Ete="[object Map]",kte="[object Number]",TP="[object Object]",Cte="[object RegExp]",Lte="[object Set]",Pte="[object String]",Ite="[object Symbol]",Rte="[object WeakMap]",Dte="[object ArrayBuffer]",zte="[object DataView]",Fte="[object Float32Array]",Ote="[object Float64Array]",Bte="[object Int8Array]",Nte="[object Int16Array]",Ute="[object Int32Array]",jte="[object Uint8Array]",qte="[object Uint8ClampedArray]",Vte="[object Uint16Array]",Gte="[object Uint32Array]",df={};df[bP]=df[wte]=df[Dte]=df[zte]=df[Tte]=df[Ate]=df[Fte]=df[Ote]=df[Bte]=df[Nte]=df[Ute]=df[Ete]=df[kte]=df[TP]=df[Cte]=df[Lte]=df[Pte]=df[Ite]=df[jte]=df[qte]=df[Vte]=df[Gte]=!0;df[Ste]=df[wP]=df[Rte]=!1;function sw(ue,ge,Ye,Rt,gr,Yr){var Ea,ei=ge&_te,oi=ge&xte,Cn=ge&bte;if(Ye&&(Ea=gr?Ye(ue,Rt,gr,Yr):Ye(ue)),Ea!==void 0)return Ea;if(!Ll(ue))return ue;var bn=Io(ue);if(bn){if(Ea=cP(ue),!ei)return pf(ue,Ea)}else{var Fn=jh(ue),To=Fn==wP||Fn==Mte;if(Kp(ue))return $b(ue,ei);if(Fn==TP||Fn==bP||To&&!gr){if(Ea=oi||To?{}:iw(ue),!ei)return oi?iP(ue,JL(Ea,ue)):aP(ue,Jb(Ea,ue))}else{if(!df[Fn])return gr?ue:{};Ea=mP(ue,Fn,ei)}}Yr||(Yr=new yv);var ds=Yr.get(ue);if(ds)return ds;Yr.set(ue,Ea),ow(ue)?ue.forEach(function(Xe){Ea.add(sw(Xe,ge,Ye,Xe,ue,Yr))}):nw(ue)&&ue.forEach(function(Xe,Kl){Ea.set(Kl,sw(Xe,ge,Ye,Kl,ue,Yr))});var Qs=Cn?oi?by:l_:oi?Gc:gu,Vo=bn?void 0:Qs(ue);return Nh(Vo||ue,function(Xe,Kl){Vo&&(Kl=Xe,Xe=ue[Kl]),vv(Ea,Kl,sw(Xe,ge,Ye,Kl,ue,Yr))}),Ea}var up=sw;var Hte=4;function Wte(ue){return up(ue,Hte)}var AP=Wte;var Xte=1,Zte=4;function Yte(ue){return up(ue,Xte|Zte)}var SP=Yte;var Kte=1,Jte=4;function $te(ue,ge){return ge=typeof ge=="function"?ge:void 0,up(ue,Kte|Jte,ge)}var MP=$te;var Qte=4;function ere(ue,ge){return ge=typeof ge=="function"?ge:void 0,up(ue,Qte,ge)}var EP=ere;function tre(){return new zp(this.value(),this.__chain__)}var kP=tre;function rre(ue){for(var ge=-1,Ye=ue==null?0:ue.length,Rt=0,gr=[];++ge<Ye;){var Yr=ue[ge];Yr&&(gr[Rt++]=Yr)}return gr}var CP=rre;function are(){var ue=arguments.length;if(!ue)return[];for(var ge=Array(ue-1),Ye=arguments[0],Rt=ue;Rt--;)ge[Rt-1]=arguments[Rt];return Op(Io(Ye)?pf(Ye):[Ye],Qu(ge,1))}var LP=are;var ire="__lodash_hash_undefined__";function nre(ue){return this.__data__.set(ue,ire),this}var PP=nre;function ore(ue){return this.__data__.has(ue)}var IP=ore;function lw(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.__data__=new V0;++ge<Ye;)this.add(ue[ge])}lw.prototype.add=lw.prototype.push=PP;lw.prototype.has=IP;var zm=lw;function sre(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt;)if(ge(ue[Ye],Ye,ue))return!0;return!1}var Ay=sre;function lre(ue,ge){return ue.has(ge)}var Gv=lre;var ure=1,cre=2;function fre(ue,ge,Ye,Rt,gr,Yr){var Ea=Ye&ure,ei=ue.length,oi=ge.length;if(ei!=oi&&!(Ea&&oi>ei))return!1;var Cn=Yr.get(ue),bn=Yr.get(ge);if(Cn&&bn)return Cn==ge&&bn==ue;var Fn=-1,To=!0,ds=Ye&cre?new zm:void 0;for(Yr.set(ue,ge),Yr.set(ge,ue);++Fn<ei;){var Qs=ue[Fn],Vo=ge[Fn];if(Rt)var Xe=Ea?Rt(Vo,Qs,Fn,ge,ue,Yr):Rt(Qs,Vo,Fn,ue,ge,Yr);if(Xe!==void 0){if(Xe)continue;To=!1;break}if(ds){if(!Ay(ge,function(Kl,nu){if(!Gv(ds,nu)&&(Qs===Kl||gr(Qs,Kl,Ye,Rt,Yr)))return ds.push(nu)})){To=!1;break}}else if(!(Qs===Vo||gr(Qs,Vo,Ye,Rt,Yr))){To=!1;break}}return Yr.delete(ue),Yr.delete(ge),To}var uw=fre;function hre(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt,gr){Ye[++ge]=[gr,Rt]}),Ye}var Sy=hre;function pre(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt){Ye[++ge]=Rt}),Ye}var Fm=pre;var dre=1,vre=2,mre="[object Boolean]",gre="[object Date]",yre="[object Error]",_re="[object Map]",xre="[object Number]",bre="[object RegExp]",wre="[object Set]",Tre="[object String]",Are="[object Symbol]",Sre="[object ArrayBuffer]",Mre="[object DataView]",RP=If?If.prototype:void 0,zA=RP?RP.valueOf:void 0;function Ere(ue,ge,Ye,Rt,gr,Yr,Ea){switch(Ye){case Mre:if(ue.byteLength!=ge.byteLength||ue.byteOffset!=ge.byteOffset)return!1;ue=ue.buffer,ge=ge.buffer;case Sre:return!(ue.byteLength!=ge.byteLength||!Yr(new wy(ue),new wy(ge)));case mre:case gre:case xre:return oh(+ue,+ge);case yre:return ue.name==ge.name&&ue.message==ge.message;case bre:case Tre:return ue==ge+"";case _re:var ei=Sy;case wre:var oi=Rt&dre;if(ei||(ei=Fm),ue.size!=ge.size&&!oi)return!1;var Cn=Ea.get(ue);if(Cn)return Cn==ge;Rt|=vre,Ea.set(ue,ge);var bn=uw(ei(ue),ei(ge),Rt,gr,Yr,Ea);return Ea.delete(ue),bn;case Are:if(zA)return zA.call(ue)==zA.call(ge)}return!1}var DP=Ere;var kre=1,Cre=Object.prototype,Lre=Cre.hasOwnProperty;function Pre(ue,ge,Ye,Rt,gr,Yr){var Ea=Ye&kre,ei=l_(ue),oi=ei.length,Cn=l_(ge),bn=Cn.length;if(oi!=bn&&!Ea)return!1;for(var Fn=oi;Fn--;){var To=ei[Fn];if(!(Ea?To in ge:Lre.call(ge,To)))return!1}var ds=Yr.get(ue),Qs=Yr.get(ge);if(ds&&Qs)return ds==ge&&Qs==ue;var Vo=!0;Yr.set(ue,ge),Yr.set(ge,ue);for(var Xe=Ea;++Fn<oi;){To=ei[Fn];var Kl=ue[To],nu=ge[To];if(Rt)var jp=Ea?Rt(nu,Kl,To,ge,ue,Yr):Rt(Kl,nu,To,ue,ge,Yr);if(!(jp===void 0?Kl===nu||gr(Kl,nu,Ye,Rt,Yr):jp)){Vo=!1;break}Xe||(Xe=To=="constructor")}if(Vo&&!Xe){var zf=ue.constructor,fp=ge.constructor;zf!=fp&&"constructor"in ue&&"constructor"in ge&&!(typeof zf=="function"&&zf instanceof zf&&typeof fp=="function"&&fp instanceof fp)&&(Vo=!1)}return Yr.delete(ue),Yr.delete(ge),Vo}var zP=Pre;var Ire=1,FP="[object Arguments]",OP="[object Array]",cw="[object Object]",Rre=Object.prototype,BP=Rre.hasOwnProperty;function Dre(ue,ge,Ye,Rt,gr,Yr){var Ea=Io(ue),ei=Io(ge),oi=Ea?OP:jh(ue),Cn=ei?OP:jh(ge);oi=oi==FP?cw:oi,Cn=Cn==FP?cw:Cn;var bn=oi==cw,Fn=Cn==cw,To=oi==Cn;if(To&&Kp(ue)){if(!Kp(ge))return!1;Ea=!0,bn=!1}if(To&&!bn)return Yr||(Yr=new yv),Ea||Ed(ue)?uw(ue,ge,Ye,Rt,gr,Yr):DP(ue,ge,oi,Ye,Rt,gr,Yr);if(!(Ye&Ire)){var ds=bn&&BP.call(ue,"__wrapped__"),Qs=Fn&&BP.call(ge,"__wrapped__");if(ds||Qs){var Vo=ds?ue.value():ue,Xe=Qs?ge.value():ge;return Yr||(Yr=new yv),gr(Vo,Xe,Ye,Rt,Yr)}}return To?(Yr||(Yr=new yv),zP(ue,ge,Ye,Rt,gr,Yr)):!1}var NP=Dre;function UP(ue,ge,Ye,Rt,gr){return ue===ge?!0:ue==null||ge==null||!Dl(ue)&&!Dl(ge)?ue!==ue&&ge!==ge:NP(ue,ge,Ye,Rt,UP,gr)}var Om=UP;var zre=1,Fre=2;function Ore(ue,ge,Ye,Rt){var gr=Ye.length,Yr=gr,Ea=!Rt;if(ue==null)return!Yr;for(ue=Object(ue);gr--;){var ei=Ye[gr];if(Ea&&ei[2]?ei[1]!==ue[ei[0]]:!(ei[0]in ue))return!1}for(;++gr<Yr;){ei=Ye[gr];var oi=ei[0],Cn=ue[oi],bn=ei[1];if(Ea&&ei[2]){if(Cn===void 0&&!(oi in ue))return!1}else{var Fn=new yv;if(Rt)var To=Rt(Cn,bn,oi,ue,ge,Fn);if(!(To===void 0?Om(bn,Cn,zre|Fre,Rt,Fn):To))return!1}}return!0}var My=Ore;function Bre(ue){return ue===ue&&!Ll(ue)}var fw=Bre;function Nre(ue){for(var ge=gu(ue),Ye=ge.length;Ye--;){var Rt=ge[Ye],gr=ue[Rt];ge[Ye]=[Rt,gr,fw(gr)]}return ge}var Ey=Nre;function Ure(ue,ge){return function(Ye){return Ye==null?!1:Ye[ue]===ge&&(ge!==void 0||ue in Object(Ye))}}var hw=Ure;function jre(ue){var ge=Ey(ue);return ge.length==1&&ge[0][2]?hw(ge[0][0],ge[0][1]):function(Ye){return Ye===ue||My(Ye,ue,ge)}}var pw=jre;function qre(ue,ge){return ue!=null&&ge in Object(ue)}var jP=qre;function Vre(ue,ge,Ye){ge=Fp(ge,ue);for(var Rt=-1,gr=ge.length,Yr=!1;++Rt<gr;){var Ea=Eh(ge[Rt]);if(!(Yr=ue!=null&&Ye(ue,Ea)))break;ue=ue[Ea]}return Yr||++Rt!=gr?Yr:(gr=ue==null?0:ue.length,!!gr&&Em(gr)&&ip(Ea,gr)&&(Io(ue)||pd(ue)))}var dw=Vre;function Gre(ue,ge){return ue!=null&&dw(ue,ge,jP)}var ky=Gre;var Hre=1,Wre=2;function Xre(ue,ge){return oy(ue)&&fw(ge)?hw(Eh(ue),ge):function(Ye){var Rt=cy(Ye,ue);return Rt===void 0&&Rt===ge?ky(Ye,ue):Om(ge,Rt,Hre|Wre)}}var vw=Xre;function Zre(ue){return function(ge){return ge?.[ue]}}var Cy=Zre;function Yre(ue){return function(ge){return ld(ge,ue)}}var qP=Yre;function Kre(ue){return oy(ue)?Cy(Eh(ue)):qP(ue)}var mw=Kre;function Jre(ue){return typeof ue=="function"?ue:ue==null?Bc:typeof ue=="object"?Io(ue)?vw(ue[0],ue[1]):pw(ue):mw(ue)}var xo=Jre;var $re="Expected a function";function Qre(ue){var ge=ue==null?0:ue.length,Ye=xo;return ue=ge?Ml(ue,function(Rt){if(typeof Rt[1]!="function")throw new TypeError($re);return[Ye(Rt[0]),Rt[1]]}):[],qo(function(Rt){for(var gr=-1;++gr<ge;){var Yr=ue[gr];if(xf(Yr[0],this,Rt))return xf(Yr[1],this,Rt)}})}var VP=Qre;function eae(ue,ge,Ye){var Rt=Ye.length;if(ue==null)return!Rt;for(ue=Object(ue);Rt--;){var gr=Ye[Rt],Yr=ge[gr],Ea=ue[gr];if(Ea===void 0&&!(gr in ue)||!Yr(Ea))return!1}return!0}var gw=eae;function tae(ue){var ge=gu(ue);return function(Ye){return gw(Ye,ue,ge)}}var GP=tae;var rae=1;function aae(ue){return GP(up(ue,rae))}var HP=aae;function iae(ue,ge){return ge==null||gw(ue,ge,gu(ge))}var WP=iae;function nae(ue,ge,Ye,Rt){for(var gr=-1,Yr=ue==null?0:ue.length;++gr<Yr;){var Ea=ue[gr];ge(Rt,Ea,Ye(Ea),ue)}return Rt}var XP=nae;function oae(ue){return function(ge,Ye,Rt){for(var gr=-1,Yr=Object(ge),Ea=Rt(ge),ei=Ea.length;ei--;){var oi=Ea[ue?ei:++gr];if(Ye(Yr[oi],oi,Yr)===!1)break}return ge}}var yw=oae;var sae=yw(),Ly=sae;function lae(ue,ge){return ue&&Ly(ue,ge,gu)}var cp=lae;function uae(ue,ge){return function(Ye,Rt){if(Ye==null)return Ye;if(!Vc(Ye))return ue(Ye,Rt);for(var gr=Ye.length,Yr=ge?gr:-1,Ea=Object(Ye);(ge?Yr--:++Yr<gr)&&Rt(Ea[Yr],Yr,Ea)!==!1;);return Ye}}var _w=uae;var cae=_w(cp),Up=cae;function fae(ue,ge,Ye,Rt){return Up(ue,function(gr,Yr,Ea){ge(Rt,gr,Ye(gr),Ea)}),Rt}var ZP=fae;function hae(ue,ge){return function(Ye,Rt){var gr=Io(Ye)?XP:ZP,Yr=ge?ge():{};return gr(Ye,ue,xo(Rt,2),Yr)}}var Bm=hae;var pae=Object.prototype,dae=pae.hasOwnProperty,vae=Bm(function(ue,ge,Ye){dae.call(ue,Ye)?++ue[Ye]:op(ue,Ye,1)}),YP=vae;function mae(ue,ge){var Ye=Td(ue);return ge==null?Ye:Jb(Ye,ge)}var KP=mae;var gae=8;function FA(ue,ge,Ye){ge=Ye?void 0:ge;var Rt=np(ue,gae,void 0,void 0,void 0,void 0,void 0,ge);return Rt.placeholder=FA.placeholder,Rt}FA.placeholder={};var JP=FA;var yae=16;function OA(ue,ge,Ye){ge=Ye?void 0:ge;var Rt=np(ue,yae,void 0,void 0,void 0,void 0,void 0,ge);return Rt.placeholder=OA.placeholder,Rt}OA.placeholder={};var $P=OA;var _ae=function(){return wu.Date.now()},Py=_ae;var xae="Expected a function",bae=Math.max,wae=Math.min;function Tae(ue,ge,Ye){var Rt,gr,Yr,Ea,ei,oi,Cn=0,bn=!1,Fn=!1,To=!0;if(typeof ue!="function")throw new TypeError(xae);ge=Sh(ge)||0,Ll(Ye)&&(bn=!!Ye.leading,Fn="maxWait"in Ye,Yr=Fn?bae(Sh(Ye.maxWait)||0,ge):Yr,To="trailing"in Ye?!!Ye.trailing:To);function ds(Ff){var Hn=Rt,dd=gr;return Rt=gr=void 0,Cn=Ff,Ea=ue.apply(dd,Hn),Ea}function Qs(Ff){return Cn=Ff,ei=setTimeout(Kl,ge),bn?ds(Ff):Ea}function Vo(Ff){var Hn=Ff-oi,dd=Ff-Cn,Xv=ge-Hn;return Fn?wae(Xv,Yr-dd):Xv}function Xe(Ff){var Hn=Ff-oi,dd=Ff-Cn;return oi===void 0||Hn>=ge||Hn<0||Fn&&dd>=Yr}function Kl(){var Ff=Py();if(Xe(Ff))return nu(Ff);ei=setTimeout(Kl,Vo(Ff))}function nu(Ff){return ei=void 0,To&&Rt?ds(Ff):(Rt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Cn=0,Rt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:nu(Py())}function fp(){var Ff=Py(),Hn=Xe(Ff);if(Rt=arguments,gr=this,oi=Ff,Hn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Kl,ge),ds(oi)}return ei===void 0&&(ei=setTimeout(Kl,ge)),Ea}return fp.cancel=jp,fp.flush=zf,fp}var xw=Tae;function Aae(ue,ge){return ue==null||ue!==ue?ge:ue}var QP=Aae;var eI=Object.prototype,Sae=eI.hasOwnProperty,Mae=qo(function(ue,ge){ue=Object(ue);var Ye=-1,Rt=ge.length,gr=Rt>2?ge[2]:void 0;for(gr&&Nc(ge[0],ge[1],gr)&&(Rt=1);++Ye<Rt;)for(var Yr=ge[Ye],Ea=Gc(Yr),ei=-1,oi=Ea.length;++ei<oi;){var Cn=Ea[ei],bn=ue[Cn];(bn===void 0||oh(bn,eI[Cn])&&!Sae.call(ue,Cn))&&(ue[Cn]=Yr[Cn])}return ue}),tI=Mae;function Eae(ue,ge,Ye){(Ye!==void 0&&!oh(ue[ge],Ye)||Ye===void 0&&!(ge in ue))&&op(ue,ge,Ye)}var u_=Eae;function kae(ue){return Dl(ue)&&Vc(ue)}var Eu=kae;function Cae(ue,ge){if(!(ge==="constructor"&&typeof ue[ge]=="function")&&ge!="__proto__")return ue[ge]}var c_=Cae;function Lae(ue){return Mh(ue,Gc(ue))}var bw=Lae;function Pae(ue,ge,Ye,Rt,gr,Yr,Ea){var ei=c_(ue,Ye),oi=c_(ge,Ye),Cn=Ea.get(oi);if(Cn){u_(ue,Ye,Cn);return}var bn=Yr?Yr(ei,oi,Ye+"",ue,ge,Ea):void 0,Fn=bn===void 0;if(Fn){var To=Io(oi),ds=!To&&Kp(oi),Qs=!To&&!ds&&Ed(oi);bn=oi,To||ds||Qs?Io(ei)?bn=ei:Eu(ei)?bn=pf(ei):ds?(Fn=!1,bn=$b(oi,!0)):Qs?(Fn=!1,bn=aw(oi,!0)):bn=[]:gv(oi)||pd(oi)?(bn=ei,pd(ei)?bn=bw(ei):(!Ll(ei)||ap(ei))&&(bn=iw(oi))):Fn=!1}Fn&&(Ea.set(oi,bn),gr(bn,oi,Rt,Yr,Ea),Ea.delete(oi)),u_(ue,Ye,bn)}var rI=Pae;function aI(ue,ge,Ye,Rt,gr){ue!==ge&&Ly(ge,function(Yr,Ea){if(gr||(gr=new yv),Ll(Yr))rI(ue,ge,Ea,Ye,aI,Rt,gr);else{var ei=Rt?Rt(c_(ue,Ea),Yr,Ea+"",ue,ge,gr):void 0;ei===void 0&&(ei=Yr),u_(ue,Ea,ei)}},Gc)}var Iy=aI;function iI(ue,ge,Ye,Rt,gr,Yr){return Ll(ue)&&Ll(ge)&&(Yr.set(ge,ue),Iy(ue,ge,void 0,iI,Yr),Yr.delete(ge)),ue}var nI=iI;var Iae=Md(function(ue,ge,Ye,Rt){Iy(ue,ge,Ye,Rt)}),ww=Iae;var Rae=qo(function(ue){return ue.push(void 0,nI),xf(ww,void 0,ue)}),oI=Rae;var Dae="Expected a function";function zae(ue,ge,Ye){if(typeof ue!="function")throw new TypeError(Dae);return setTimeout(function(){ue.apply(void 0,Ye)},ge)}var Tw=zae;var Fae=qo(function(ue,ge){return Tw(ue,1,ge)}),sI=Fae;var Oae=qo(function(ue,ge,Ye){return Tw(ue,Sh(ge)||0,Ye)}),lI=Oae;function Bae(ue,ge,Ye){for(var Rt=-1,gr=ue==null?0:ue.length;++Rt<gr;)if(Ye(ge,ue[Rt]))return!0;return!1}var Ry=Bae;var Nae=200;function Uae(ue,ge,Ye,Rt){var gr=-1,Yr=Mm,Ea=!0,ei=ue.length,oi=[],Cn=ge.length;if(!ei)return oi;Ye&&(ge=Ml(ge,wf(Ye))),Rt?(Yr=Ry,Ea=!1):ge.length>=Nae&&(Yr=Gv,Ea=!1,ge=new zm(ge));e:for(;++gr<ei;){var bn=ue[gr],Fn=Ye==null?bn:Ye(bn);if(bn=Rt||bn!==0?bn:0,Ea&&Fn===Fn){for(var To=Cn;To--;)if(ge[To]===Fn)continue e;oi.push(bn)}else Yr(ge,Fn,Rt)||oi.push(bn)}return oi}var _v=Uae;var jae=qo(function(ue,ge){return Eu(ue)?_v(ue,Qu(ge,1,Eu,!0)):[]}),uI=jae;function qae(ue){var ge=ue==null?0:ue.length;return ge?ue[ge-1]:void 0}var Tf=qae;var Vae=qo(function(ue,ge){var Ye=Tf(ge);return Eu(Ye)&&(Ye=void 0),Eu(ue)?_v(ue,Qu(ge,1,Eu,!0),xo(Ye,2)):[]}),cI=Vae;var Gae=qo(function(ue,ge){var Ye=Tf(ge);return Eu(Ye)&&(Ye=void 0),Eu(ue)?_v(ue,Qu(ge,1,Eu,!0),void 0,Ye):[]}),fI=Gae;var Hae=wm(function(ue,ge){return ue/ge},1),hI=Hae;function Wae(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),Yf(ue,ge<0?0:ge,Rt)):[]}var pI=Wae;function Xae(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),ge=Rt-ge,Yf(ue,0,ge<0?0:ge)):[]}var dI=Xae;function Zae(ue,ge,Ye,Rt){for(var gr=ue.length,Yr=Rt?gr:-1;(Rt?Yr--:++Yr<gr)&&ge(ue[Yr],Yr,ue););return Ye?Yf(ue,Rt?0:Yr,Rt?Yr+1:gr):Yf(ue,Rt?Yr+1:0,Rt?gr:Yr)}var Nm=Zae;function Yae(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!0,!0):[]}var vI=Yae;function Kae(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!0):[]}var mI=Kae;function Jae(ue){return typeof ue=="function"?ue:Bc}var kh=Jae;function $ae(ue,ge){var Ye=Io(ue)?Nh:Up;return Ye(ue,kh(ge))}var f_=$ae;function Qae(ue,ge){for(var Ye=ue==null?0:ue.length;Ye--&&ge(ue[Ye],Ye,ue)!==!1;);return ue}var gI=Qae;var eie=yw(!0),Aw=eie;function tie(ue,ge){return ue&&Aw(ue,ge,gu)}var Dy=tie;var rie=_w(Dy,!0),Sw=rie;function aie(ue,ge){var Ye=Io(ue)?gI:Sw;return Ye(ue,kh(ge))}var h_=aie;function iie(ue,ge,Ye){ue=Bs(ue),ge=nh(ge);var Rt=ue.length;Ye=Ye===void 0?Rt:ud(jo(Ye),0,Rt);var gr=Ye;return Ye-=ge.length,Ye>=0&&ue.slice(Ye,gr)==ge}var yI=iie;function nie(ue,ge){return Ml(ge,function(Ye){return[Ye,ue[Ye]]})}var _I=nie;function oie(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt){Ye[++ge]=[Rt,Rt]}),Ye}var xI=oie;var sie="[object Map]",lie="[object Set]";function uie(ue){return function(ge){var Ye=jh(ge);return Ye==sie?Sy(ge):Ye==lie?xI(ge):_I(ge,ue(ge))}}var Mw=uie;var cie=Mw(gu),p_=cie;var fie=Mw(Gc),d_=fie;var hie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pie=vy(hie),bI=pie;var wI=/[&<>"']/g,die=RegExp(wI.source);function vie(ue){return ue=Bs(ue),ue&&die.test(ue)?ue.replace(wI,bI):ue}var Ew=vie;var TI=/[\\^$.*+?()[\]{}|]/g,mie=RegExp(TI.source);function gie(ue){return ue=Bs(ue),ue&&mie.test(ue)?ue.replace(TI,"\\$&"):ue}var AI=gie;function yie(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye<Rt;)if(!ge(ue[Ye],Ye,ue))return!1;return!0}var kw=yie;function _ie(ue,ge){var Ye=!0;return Up(ue,function(Rt,gr,Yr){return Ye=!!ge(Rt,gr,Yr),Ye}),Ye}var SI=_ie;function xie(ue,ge,Ye){var Rt=Io(ue)?kw:SI;return Ye&&Nc(ue,ge,Ye)&&(ge=void 0),Rt(ue,xo(ge,3))}var MI=xie;var bie=4294967295;function wie(ue){return ue?ud(jo(ue),0,bie):0}var Cw=wie;function Tie(ue,ge,Ye,Rt){var gr=ue.length;for(Ye=jo(Ye),Ye<0&&(Ye=-Ye>gr?0:gr+Ye),Rt=Rt===void 0||Rt>gr?gr:jo(Rt),Rt<0&&(Rt+=gr),Rt=Ye>Rt?0:Cw(Rt);Ye<Rt;)ue[Ye++]=ge;return ue}var EI=Tie;function Aie(ue,ge,Ye,Rt){var gr=ue==null?0:ue.length;return gr?(Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)&&(Ye=0,Rt=gr),EI(ue,ge,Ye,Rt)):[]}var kI=Aie;function Sie(ue,ge){var Ye=[];return Up(ue,function(Rt,gr,Yr){ge(Rt,gr,Yr)&&Ye.push(Rt)}),Ye}var Lw=Sie;function Mie(ue,ge){var Ye=Io(ue)?Np:Lw;return Ye(ue,xo(ge,3))}var CI=Mie;function Eie(ue){return function(ge,Ye,Rt){var gr=Object(ge);if(!Vc(ge)){var Yr=xo(Ye,3);ge=gu(ge),Ye=function(ei){return Yr(gr[ei],ei,gr)}}var Ea=ue(ge,Ye,Rt);return Ea>-1?gr[Yr?ge[Ea]:Ea]:void 0}}var Pw=Eie;var kie=Math.max;function Cie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=kie(Rt+gr,0)),Sm(ue,xo(ge,3),gr)}var Iw=Cie;var Lie=Pw(Iw),LI=Lie;function Pie(ue,ge,Ye){var Rt;return Ye(ue,function(gr,Yr,Ea){if(ge(gr,Yr,Ea))return Rt=Yr,!1}),Rt}var Rw=Pie;function Iie(ue,ge){return Rw(ue,xo(ge,3),cp)}var PI=Iie;var Rie=Math.max,Die=Math.min;function zie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt-1;return Ye!==void 0&&(gr=jo(Ye),gr=Ye<0?Rie(Rt+gr,0):Die(gr,Rt-1)),Sm(ue,xo(ge,3),gr,!0)}var Dw=zie;var Fie=Pw(Dw),II=Fie;function Oie(ue,ge){return Rw(ue,xo(ge,3),Dy)}var RI=Oie;function Bie(ue){return ue&&ue.length?ue[0]:void 0}var v_=Bie;function Nie(ue,ge){var Ye=-1,Rt=Vc(ue)?Array(ue.length):[];return Up(ue,function(gr,Yr,Ea){Rt[++Ye]=ge(gr,Yr,Ea)}),Rt}var zw=Nie;function Uie(ue,ge){var Ye=Io(ue)?Ml:zw;return Ye(ue,xo(ge,3))}var Um=Uie;function jie(ue,ge){return Qu(Um(ue,ge),1)}var DI=jie;var qie=1/0;function Vie(ue,ge){return Qu(Um(ue,ge),qie)}var zI=Vie;function Gie(ue,ge,Ye){return Ye=Ye===void 0?1:jo(Ye),Qu(Um(ue,ge),Ye)}var FI=Gie;var Hie=1/0;function Wie(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,Hie):[]}var OI=Wie;function Xie(ue,ge){var Ye=ue==null?0:ue.length;return Ye?(ge=ge===void 0?1:jo(ge),Qu(ue,ge)):[]}var BI=Xie;var Zie=512;function Yie(ue){return np(ue,Zie)}var NI=Yie;var Kie=gy("floor"),UI=Kie;var Jie="Expected a function",$ie=8,Qie=32,ene=128,tne=256;function rne(ue){return lp(function(ge){var Ye=ge.length,Rt=Ye,gr=zp.prototype.thru;for(ue&&ge.reverse();Rt--;){var Yr=ge[Rt];if(typeof Yr!="function")throw new TypeError(Jie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Rt=Ea?Rt:Ye;++Rt<Ye;){Yr=ge[Rt];var ei=$g(Yr),oi=ei=="wrapper"?Jg(Yr):void 0;oi&&i_(oi[0])&&oi[1]==(ene|$ie|Qie|tne)&&!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,bn=Cn[0];if(Ea&&Cn.length==1&&Io(bn))return Ea.plant(bn).value();for(var Fn=0,To=Ye?ge[Fn].apply(this,Cn):bn;++Fn<Ye;)To=ge[Fn].call(this,To);return To}})}var Fw=rne;var ane=Fw(),jI=ane;var ine=Fw(!0),qI=ine;function nne(ue,ge){return ue==null?ue:Ly(ue,kh(ge),Gc)}var VI=nne;function one(ue,ge){return ue==null?ue:Aw(ue,kh(ge),Gc)}var GI=one;function sne(ue,ge){return ue&&cp(ue,kh(ge))}var HI=sne;function lne(ue,ge){return ue&&Dy(ue,kh(ge))}var WI=lne;function une(ue){for(var ge=-1,Ye=ue==null?0:ue.length,Rt={};++ge<Ye;){var gr=ue[ge];Rt[gr[0]]=gr[1]}return Rt}var XI=une;function cne(ue,ge){return Np(ge,function(Ye){return ap(ue[Ye])})}var jm=cne;function fne(ue){return ue==null?[]:jm(ue,gu(ue))}var ZI=fne;function hne(ue){return ue==null?[]:jm(ue,Gc(ue))}var YI=hne;var pne=Object.prototype,dne=pne.hasOwnProperty,vne=Bm(function(ue,ge,Ye){dne.call(ue,Ye)?ue[Ye].push(ge):op(ue,Ye,[ge])}),KI=vne;function mne(ue,ge){return ue>ge}var zy=mne;function gne(ue){return function(ge,Ye){return typeof ge=="string"&&typeof Ye=="string"||(ge=Sh(ge),Ye=Sh(Ye)),ue(ge,Ye)}}var qm=gne;var yne=qm(zy),JI=yne;var _ne=qm(function(ue,ge){return ue>=ge}),$I=_ne;var xne=Object.prototype,bne=xne.hasOwnProperty;function wne(ue,ge){return ue!=null&&bne.call(ue,ge)}var QI=wne;function Tne(ue,ge){return ue!=null&&dw(ue,ge,QI)}var e8=Tne;var Ane=Math.max,Sne=Math.min;function Mne(ue,ge,Ye){return ue>=Sne(ge,Ye)&&ue<Ane(ge,Ye)}var t8=Mne;function Ene(ue,ge,Ye){return ge=od(ge),Ye===void 0?(Ye=ge,ge=0):Ye=od(Ye),ue=Sh(ue),t8(ue,ge,Ye)}var r8=Ene;var kne="[object String]";function Cne(ue){return typeof ue=="string"||!Io(ue)&&Dl(ue)&&Oc(ue)==kne}var Vm=Cne;function Lne(ue,ge){return Ml(ge,function(Ye){return ue[Ye]})}var Fy=Lne;function Pne(ue){return ue==null?[]:Fy(ue,gu(ue))}var Ld=Pne;var Ine=Math.max;function Rne(ue,ge,Ye,Rt){ue=Vc(ue)?ue:Ld(ue),Ye=Ye&&!Rt?jo(Ye):0;var gr=ue.length;return Ye<0&&(Ye=Ine(gr+Ye,0)),Vm(ue)?Ye<=gr&&ue.indexOf(ge,Ye)>-1:!!gr&&Ad(ue,ge,Ye)>-1}var a8=Rne;var Dne=Math.max;function zne(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=Dne(Rt+gr,0)),Ad(ue,ge,gr)}var i8=zne;function Fne(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,0,-1):[]}var n8=Fne;var One=Math.min;function Bne(ue,ge,Ye){for(var Rt=Ye?Ry:Mm,gr=ue[0].length,Yr=ue.length,Ea=Yr,ei=Array(Yr),oi=1/0,Cn=[];Ea--;){var bn=ue[Ea];Ea&&ge&&(bn=Ml(bn,wf(ge))),oi=One(bn.length,oi),ei[Ea]=!Ye&&(ge||gr>=120&&bn.length>=120)?new zm(Ea&&bn):void 0}bn=ue[0];var Fn=-1,To=ei[0];e:for(;++Fn<gr&&Cn.length<oi;){var ds=bn[Fn],Qs=ge?ge(ds):ds;if(ds=Ye||ds!==0?ds:0,!(To?Gv(To,Qs):Rt(Cn,Qs,Ye))){for(Ea=Yr;--Ea;){var Vo=ei[Ea];if(!(Vo?Gv(Vo,Qs):Rt(ue[Ea],Qs,Ye)))continue e}To&&To.push(Qs),Cn.push(ds)}}return Cn}var Oy=Bne;function Nne(ue){return Eu(ue)?ue:[]}var By=Nne;var Une=qo(function(ue){var ge=Ml(ue,By);return ge.length&&ge[0]===ue[0]?Oy(ge):[]}),o8=Une;var jne=qo(function(ue){var ge=Tf(ue),Ye=Ml(ue,By);return ge===Tf(Ye)?ge=void 0:Ye.pop(),Ye.length&&Ye[0]===ue[0]?Oy(Ye,xo(ge,2)):[]}),s8=jne;var qne=qo(function(ue){var ge=Tf(ue),Ye=Ml(ue,By);return ge=typeof ge=="function"?ge:void 0,ge&&Ye.pop(),Ye.length&&Ye[0]===ue[0]?Oy(Ye,void 0,ge):[]}),l8=qne;function Vne(ue,ge,Ye,Rt){return cp(ue,function(gr,Yr,Ea){ge(Rt,Ye(gr),Yr,Ea)}),Rt}var u8=Vne;function Gne(ue,ge){return function(Ye,Rt){return u8(Ye,ue,ge(Rt),{})}}var Ow=Gne;var Hne=Object.prototype,Wne=Hne.toString,Xne=Ow(function(ue,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Wne.call(ge)),ue[ge]=Ye},Qg(Bc)),c8=Xne;var f8=Object.prototype,Zne=f8.hasOwnProperty,Yne=f8.toString,Kne=Ow(function(ue,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Yne.call(ge)),Zne.call(ue,ge)?ue[ge].push(Ye):ue[ge]=[Ye]},xo),h8=Kne;function Jne(ue,ge){return ge.length<2?ue:ld(ue,Yf(ge,0,-1))}var Bw=Jne;function $ne(ue,ge,Ye){ge=Fp(ge,ue),ue=Bw(ue,ge);var Rt=ue==null?ue:ue[Eh(Tf(ge))];return Rt==null?void 0:xf(Rt,ue,Ye)}var xv=$ne;var Qne=qo(xv),p8=Qne;var eoe=qo(function(ue,ge,Ye){var Rt=-1,gr=typeof ge=="function",Yr=Vc(ue)?Array(ue.length):[];return Up(ue,function(Ea){Yr[++Rt]=gr?xf(ge,Ea,Ye):xv(Ea,ge,Ye)}),Yr}),d8=eoe;var toe="[object ArrayBuffer]";function roe(ue){return Dl(ue)&&Oc(ue)==toe}var v8=roe;var m8=sp&&sp.isArrayBuffer,aoe=m8?wf(m8):v8,g8=aoe;var ioe="[object Boolean]";function noe(ue){return ue===!0||ue===!1||Dl(ue)&&Oc(ue)==ioe}var y8=noe;var ooe="[object Date]";function soe(ue){return Dl(ue)&&Oc(ue)==ooe}var _8=soe;var x8=sp&&sp.isDate,loe=x8?wf(x8):_8,b8=loe;function uoe(ue){return Dl(ue)&&ue.nodeType===1&&!gv(ue)}var w8=uoe;var coe="[object Map]",foe="[object Set]",hoe=Object.prototype,poe=hoe.hasOwnProperty;function doe(ue){if(ue==null)return!0;if(Vc(ue)&&(Io(ue)||typeof ue=="string"||typeof ue.splice=="function"||Kp(ue)||Ed(ue)||pd(ue)))return!ue.length;var ge=jh(ue);if(ge==coe||ge==foe)return!ue.size;if(mv(ue))return!ny(ue).length;for(var Ye in ue)if(poe.call(ue,Ye))return!1;return!0}var T8=doe;function voe(ue,ge){return Om(ue,ge)}var A8=voe;function moe(ue,ge,Ye){Ye=typeof Ye=="function"?Ye:void 0;var Rt=Ye?Ye(ue,ge):void 0;return Rt===void 0?Om(ue,ge,void 0,Ye):!!Rt}var S8=moe;var goe=wu.isFinite;function yoe(ue){return typeof ue=="number"&&goe(ue)}var M8=yoe;function _oe(ue){return typeof ue=="number"&&ue==jo(ue)}var Nw=_oe;function xoe(ue,ge){return ue===ge||My(ue,ge,Ey(ge))}var E8=xoe;function boe(ue,ge,Ye){return Ye=typeof Ye=="function"?Ye:void 0,My(ue,ge,Ey(ge),Ye)}var k8=boe;var woe="[object Number]";function Toe(ue){return typeof ue=="number"||Dl(ue)&&Oc(ue)==woe}var Uw=Toe;function Aoe(ue){return Uw(ue)&&ue!=+ue}var C8=Aoe;var Soe=Zg?ap:iy,L8=Soe;var Moe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function Eoe(ue){if(L8(ue))throw new Error(Moe);return Tb(ue)}var P8=Eoe;function koe(ue){return ue==null}var I8=koe;function Coe(ue){return ue===null}var R8=Coe;var Loe="[object RegExp]";function Poe(ue){return Dl(ue)&&Oc(ue)==Loe}var D8=Poe;var z8=sp&&sp.isRegExp,Ioe=z8?wf(z8):D8,Ny=Ioe;var F8=9007199254740991;function Roe(ue){return Nw(ue)&&ue>=-F8&&ue<=F8}var O8=Roe;function Doe(ue){return ue===void 0}var B8=Doe;var zoe="[object WeakMap]";function Foe(ue){return Dl(ue)&&jh(ue)==zoe}var N8=Foe;var Ooe="[object WeakSet]";function Boe(ue){return Dl(ue)&&Oc(ue)==Ooe}var U8=Boe;var Noe=1;function Uoe(ue){return xo(typeof ue=="function"?ue:up(ue,Noe))}var j8=Uoe;var joe=Array.prototype,qoe=joe.join;function Voe(ue,ge){return ue==null?"":qoe.call(ue,ge)}var q8=Voe;var Goe=Cd(function(ue,ge,Ye){return ue+(Ye?"-":"")+ge.toLowerCase()}),V8=Goe;var Hoe=Bm(function(ue,ge,Ye){op(ue,Ye,ge)}),G8=Hoe;function Woe(ue,ge,Ye){for(var Rt=Ye+1;Rt--;)if(ue[Rt]===ge)return Rt;return Rt}var H8=Woe;var Xoe=Math.max,Zoe=Math.min;function Yoe(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt;return Ye!==void 0&&(gr=jo(Ye),gr=gr<0?Xoe(Rt+gr,0):Zoe(gr,Rt-1)),ge===ge?H8(ue,ge,gr):Sm(ue,Rb,gr,!0)}var W8=Yoe;var Koe=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+ge.toLowerCase()}),X8=Koe;var Joe=Wb("toLowerCase"),Z8=Joe;function $oe(ue,ge){return ue<ge}var Uy=$oe;var Qoe=qm(Uy),Y8=Qoe;var ese=qm(function(ue,ge){return ue<=ge}),K8=ese;function tse(ue,ge){var Ye={};return ge=xo(ge,3),cp(ue,function(Rt,gr,Yr){op(Ye,ge(Rt,gr,Yr),Rt)}),Ye}var J8=tse;function rse(ue,ge){var Ye={};return ge=xo(ge,3),cp(ue,function(Rt,gr,Yr){op(Ye,gr,ge(Rt,gr,Yr))}),Ye}var $8=rse;var ase=1;function ise(ue){return pw(up(ue,ase))}var Q8=ise;var nse=1;function ose(ue,ge){return vw(ue,up(ge,nse))}var eR=ose;function sse(ue,ge,Ye){for(var Rt=-1,gr=ue.length;++Rt<gr;){var Yr=ue[Rt],Ea=ge(Yr);if(Ea!=null&&(ei===void 0?Ea===Ea&&!Rf(Ea):Ye(Ea,ei)))var ei=Ea,oi=Yr}return oi}var Gm=sse;function lse(ue){return ue&&ue.length?Gm(ue,Bc,zy):void 0}var tR=lse;function use(ue,ge){return ue&&ue.length?Gm(ue,xo(ge,2),zy):void 0}var rR=use;function cse(ue,ge){for(var Ye,Rt=-1,gr=ue.length;++Rt<gr;){var Yr=ge(ue[Rt]);Yr!==void 0&&(Ye=Ye===void 0?Yr:Ye+Yr)}return Ye}var jy=cse;var fse=NaN;function hse(ue,ge){var Ye=ue==null?0:ue.length;return Ye?jy(ue,ge)/Ye:fse}var jw=hse;function pse(ue){return jw(ue,Bc)}var aR=pse;function dse(ue,ge){return jw(ue,xo(ge,2))}var iR=dse;var vse=Md(function(ue,ge,Ye){Iy(ue,ge,Ye)}),nR=vse;var mse=qo(function(ue,ge){return function(Ye){return xv(Ye,ue,ge)}}),oR=mse;var gse=qo(function(ue,ge){return function(Ye){return xv(ue,Ye,ge)}}),sR=gse;function yse(ue){return ue&&ue.length?Gm(ue,Bc,Uy):void 0}var lR=yse;function _se(ue,ge){return ue&&ue.length?Gm(ue,xo(ge,2),Uy):void 0}var uR=_se;function xse(ue,ge,Ye){var Rt=gu(ge),gr=jm(ge,Rt),Yr=!(Ll(Ye)&&"chain"in Ye)||!!Ye.chain,Ea=ap(ue);return Nh(gr,function(ei){var oi=ge[ei];ue[ei]=oi,Ea&&(ue.prototype[ei]=function(){var Cn=this.__chain__;if(Yr||Cn){var bn=ue(this.__wrapped__),Fn=bn.__actions__=pf(this.__actions__);return Fn.push({func:oi,args:arguments,thisArg:ue}),bn.__chain__=Cn,bn}return oi.apply(ue,Op([this.value()],arguments))})}),ue}var qw=xse;var bse=wm(function(ue,ge){return ue*ge},1),cR=bse;var wse="Expected a function";function Tse(ue){if(typeof ue!="function")throw new TypeError(wse);return function(){var ge=arguments;switch(ge.length){case 0:return!ue.call(this);case 1:return!ue.call(this,ge[0]);case 2:return!ue.call(this,ge[0],ge[1]);case 3:return!ue.call(this,ge[0],ge[1],ge[2])}return!ue.apply(this,ge)}}var Hv=Tse;function Ase(ue){for(var ge,Ye=[];!(ge=ue.next()).done;)Ye.push(ge.value);return Ye}var fR=Ase;var Sse="[object Map]",Mse="[object Set]",BA=If?If.iterator:void 0;function Ese(ue){if(!ue)return[];if(Vc(ue))return Vm(ue)?Uh(ue):pf(ue);if(BA&&ue[BA])return fR(ue[BA]());var ge=jh(ue),Ye=ge==Sse?Sy:ge==Mse?Fm:Ld;return Ye(ue)}var Vw=Ese;function kse(){this.__values__===void 0&&(this.__values__=Vw(this.value()));var ue=this.__index__>=this.__values__.length,ge=ue?void 0:this.__values__[this.__index__++];return{done:ue,value:ge}}var hR=kse;function Cse(ue,ge){var Ye=ue.length;if(Ye)return ge+=ge<0?Ye:0,ip(ge,Ye)?ue[ge]:void 0}var Gw=Cse;function Lse(ue,ge){return ue&&ue.length?Gw(ue,jo(ge)):void 0}var pR=Lse;function Pse(ue){return ue=jo(ue),qo(function(ge){return Gw(ge,ue)})}var dR=Pse;function Ise(ue,ge){return ge=Fp(ge,ue),ue=Bw(ue,ge),ue==null||delete ue[Eh(Tf(ge))]}var qy=Ise;function Rse(ue){return gv(ue)?void 0:ue}var vR=Rse;var Dse=1,zse=2,Fse=4,Ose=lp(function(ue,ge){var Ye={};if(ue==null)return Ye;var Rt=!1;ge=Ml(ge,function(Yr){return Yr=Fp(Yr,ue),Rt||(Rt=Yr.length>1),Yr}),Mh(ue,by(ue),Ye),Rt&&(Ye=up(Ye,Dse|zse|Fse,vR));for(var gr=ge.length;gr--;)qy(Ye,ge[gr]);return Ye}),mR=Ose;function Bse(ue,ge,Ye,Rt){if(!Ll(ue))return ue;ge=Fp(ge,ue);for(var gr=-1,Yr=ge.length,Ea=Yr-1,ei=ue;ei!=null&&++gr<Yr;){var oi=Eh(ge[gr]),Cn=Ye;if(oi==="__proto__"||oi==="constructor"||oi==="prototype")return ue;if(gr!=Ea){var bn=ei[oi];Cn=Rt?Rt(bn,oi,ei):void 0,Cn===void 0&&(Cn=Ll(bn)?bn:ip(ge[gr+1])?[]:{})}vv(ei,oi,Cn),ei=ei[oi]}return ue}var bv=Bse;function Nse(ue,ge,Ye){for(var Rt=-1,gr=ge.length,Yr={};++Rt<gr;){var Ea=ge[Rt],ei=ld(ue,Ea);Ye(ei,Ea)&&bv(Yr,Fp(Ea,ue),ei)}return Yr}var Hw=Nse;function Use(ue,ge){if(ue==null)return{};var Ye=Ml(by(ue),function(Rt){return[Rt]});return ge=xo(ge),Hw(ue,Ye,function(Rt,gr){return ge(Rt,gr[0])})}var Ww=Use;function jse(ue,ge){return Ww(ue,Hv(xo(ge)))}var gR=jse;function qse(ue){return Gb(2,ue)}var yR=qse;function Vse(ue,ge){var Ye=ue.length;for(ue.sort(ge);Ye--;)ue[Ye]=ue[Ye].value;return ue}var _R=Vse;function Gse(ue,ge){if(ue!==ge){var Ye=ue!==void 0,Rt=ue===null,gr=ue===ue,Yr=Rf(ue),Ea=ge!==void 0,ei=ge===null,oi=ge===ge,Cn=Rf(ge);if(!ei&&!Cn&&!Yr&&ue>ge||Yr&&Ea&&oi&&!ei&&!Cn||Rt&&Ea&&oi||!Ye&&oi||!gr)return 1;if(!Rt&&!Yr&&!Cn&&ue<ge||Cn&&Ye&&gr&&!Rt&&!Yr||ei&&Ye&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Gse;function Hse(ue,ge,Ye){for(var Rt=-1,gr=ue.criteria,Yr=ge.criteria,Ea=gr.length,ei=Ye.length;++Rt<Ea;){var oi=Xw(gr[Rt],Yr[Rt]);if(oi){if(Rt>=ei)return oi;var Cn=Ye[Rt];return oi*(Cn=="desc"?-1:1)}}return ue.index-ge.index}var xR=Hse;function Wse(ue,ge,Ye){ge.length?ge=Ml(ge,function(Yr){return Io(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):ge=[Bc];var Rt=-1;ge=Ml(ge,wf(xo));var gr=zw(ue,function(Yr,Ea,ei){var oi=Ml(ge,function(Cn){return Cn(Yr)});return{criteria:oi,index:++Rt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Ye)})}var Zw=Wse;function Xse(ue,ge,Ye,Rt){return ue==null?[]:(Io(ge)||(ge=ge==null?[]:[ge]),Ye=Rt?void 0:Ye,Io(Ye)||(Ye=Ye==null?[]:[Ye]),Zw(ue,ge,Ye))}var bR=Xse;function Zse(ue){return lp(function(ge){return ge=Ml(ge,wf(xo)),qo(function(Ye){var Rt=this;return ue(ge,function(gr){return xf(gr,Rt,Ye)})})})}var Vy=Zse;var Yse=Vy(Ml),wR=Yse;var Kse=qo,TR=Kse;var Jse=Math.min,$se=TR(function(ue,ge){ge=ge.length==1&&Io(ge[0])?Ml(ge[0],wf(xo)):Ml(Qu(ge,1),wf(xo));var Ye=ge.length;return qo(function(Rt){for(var gr=-1,Yr=Jse(Rt.length,Ye);++gr<Yr;)Rt[gr]=ge[gr].call(this,Rt[gr]);return xf(ue,this,Rt)})}),AR=$se;var Qse=Vy(kw),SR=Qse;var ele=Vy(Ay),MR=ele;var tle=9007199254740991,rle=Math.floor;function ale(ue,ge){var Ye="";if(!ue||ge<1||ge>tle)return Ye;do ge%2&&(Ye+=ue),ge=rle(ge/2),ge&&(ue+=ue);while(ge);return Ye}var m_=ale;var ile=Cy("length"),ER=ile;var CR="\\ud800-\\udfff",nle="\\u0300-\\u036f",ole="\\ufe20-\\ufe2f",sle="\\u20d0-\\u20ff",lle=nle+ole+sle,ule="\\ufe0e\\ufe0f",cle="["+CR+"]",NA="["+lle+"]",UA="\\ud83c[\\udffb-\\udfff]",fle="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",hle="\\u200d",RR=fle+"?",DR="["+ule+"]?",ple="(?:"+hle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",dle=DR+RR+ple,vle="(?:"+[LR+NA+"?",NA,PR,IR,cle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+vle+dle,"g");function mle(ue){for(var ge=kR.lastIndex=0;kR.test(ue);)++ge;return ge}var zR=mle;function gle(ue){return kd(ue)?zR(ue):ER(ue)}var Pd=gle;var yle=Math.ceil;function _le(ue,ge){ge=ge===void 0?" ":nh(ge);var Ye=ge.length;if(Ye<2)return Ye?m_(ge,ue):ge;var Rt=m_(ge,yle(ue/Pd(ge)));return kd(ge)?Bp(Uh(Rt),0,ue).join(""):Rt.slice(0,ue)}var H0=_le;var xle=Math.ceil,ble=Math.floor;function wle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;if(!ge||Rt>=ge)return ue;var gr=(ge-Rt)/2;return H0(ble(gr),Ye)+ue+H0(xle(gr),Ye)}var FR=wle;function Tle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;return ge&&Rt<ge?ue+H0(ge-Rt,Ye):ue}var OR=Tle;function Ale(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;return ge&&Rt<ge?H0(ge-Rt,Ye)+ue:ue}var BR=Ale;var Sle=/^\s+/,Mle=wu.parseInt;function Ele(ue,ge,Ye){return Ye||ge==null?ge=0:ge&&(ge=+ge),Mle(Bs(ue).replace(Sle,""),ge||0)}var NR=Ele;var kle=32,jA=qo(function(ue,ge){var Ye=Yp(ge,Sd(jA));return np(ue,kle,void 0,ge,Ye)});jA.placeholder={};var Yw=jA;var Cle=64,qA=qo(function(ue,ge){var Ye=Yp(ge,Sd(qA));return np(ue,Cle,void 0,ge,Ye)});qA.placeholder={};var UR=qA;var Lle=Bm(function(ue,ge,Ye){ue[Ye?0:1].push(ge)},function(){return[[],[]]}),jR=Lle;function Ple(ue,ge){return Hw(ue,ge,function(Ye,Rt){return ky(ue,Rt)})}var qR=Ple;var Ile=lp(function(ue,ge){return ue==null?{}:qR(ue,ge)}),VR=Ile;function Rle(ue){for(var ge,Ye=this;Ye instanceof Tm;){var Rt=Cb(Ye);Rt.__index__=0,Rt.__values__=void 0,ge?gr.__wrapped__=Rt:ge=Rt;var gr=Rt;Ye=Ye.__wrapped__}return gr.__wrapped__=ue,ge}var GR=Rle;function Dle(ue){return function(ge){return ue==null?void 0:ld(ue,ge)}}var HR=Dle;function zle(ue,ge,Ye,Rt){for(var gr=Ye-1,Yr=ue.length;++gr<Yr;)if(Rt(ue[gr],ge))return gr;return-1}var WR=zle;var Fle=Array.prototype,XR=Fle.splice;function Ole(ue,ge,Ye,Rt){var gr=Rt?WR:Ad,Yr=-1,Ea=ge.length,ei=ue;for(ue===ge&&(ge=pf(ge)),Ye&&(ei=Ml(ue,wf(Ye)));++Yr<Ea;)for(var oi=0,Cn=ge[Yr],bn=Ye?Ye(Cn):Cn;(oi=gr(ei,bn,oi,Rt))>-1;)ei!==ue&&XR.call(ei,oi,1),XR.call(ue,oi,1);return ue}var Gy=Ole;function Ble(ue,ge){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge):ue}var Kw=Ble;var Nle=qo(Kw),ZR=Nle;function Ule(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,xo(Ye,2)):ue}var YR=Ule;function jle(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,void 0,Ye):ue}var KR=jle;var qle=Array.prototype,Vle=qle.splice;function Gle(ue,ge){for(var Ye=ue?ge.length:0,Rt=Ye-1;Ye--;){var gr=ge[Ye];if(Ye==Rt||gr!==Yr){var Yr=gr;ip(gr)?Vle.call(ue,gr,1):qy(ue,gr)}}return ue}var Jw=Gle;var Hle=lp(function(ue,ge){var Ye=ue==null?0:ue.length,Rt=fy(ue,ge);return Jw(ue,Ml(ge,function(gr){return ip(gr,Ye)?+gr:gr}).sort(Xw)),Rt}),JR=Hle;var Wle=Math.floor,Xle=Math.random;function Zle(ue,ge){return ue+Wle(Xle()*(ge-ue+1))}var Hy=Zle;var Yle=parseFloat,Kle=Math.min,Jle=Math.random;function $le(ue,ge,Ye){if(Ye&&typeof Ye!="boolean"&&Nc(ue,ge,Ye)&&(ge=Ye=void 0),Ye===void 0&&(typeof ge=="boolean"?(Ye=ge,ge=void 0):typeof ue=="boolean"&&(Ye=ue,ue=void 0)),ue===void 0&&ge===void 0?(ue=0,ge=1):(ue=od(ue),ge===void 0?(ge=ue,ue=0):ge=od(ge)),ue>ge){var Rt=ue;ue=ge,ge=Rt}if(Ye||ue%1||ge%1){var gr=Jle();return Kle(ue+gr*(ge-ue+Yle("1e-"+((gr+"").length-1))),ge)}return Hy(ue,ge)}var $R=$le;var Qle=Math.ceil,eue=Math.max;function tue(ue,ge,Ye,Rt){for(var gr=-1,Yr=eue(Qle((ge-ue)/(Ye||1)),0),Ea=Array(Yr);Yr--;)Ea[Rt?Yr:++gr]=ue,ue+=Ye;return Ea}var QR=tue;function rue(ue){return function(ge,Ye,Rt){return Rt&&typeof Rt!="number"&&Nc(ge,Ye,Rt)&&(Ye=Rt=void 0),ge=od(ge),Ye===void 0?(Ye=ge,ge=0):Ye=od(Ye),Rt=Rt===void 0?ge<Ye?1:-1:od(Rt),QR(ge,Ye,Rt,ue)}}var $w=rue;var aue=$w(),e4=aue;var iue=$w(!0),t4=iue;var nue=256,oue=lp(function(ue,ge){return np(ue,nue,void 0,void 0,void 0,ge)}),r4=oue;function sue(ue,ge,Ye,Rt,gr){return gr(ue,function(Yr,Ea,ei){Ye=Rt?(Rt=!1,Yr):ge(Ye,Yr,Ea,ei)}),Ye}var Qw=sue;function lue(ue,ge,Ye){var Rt=Io(ue)?dy:Qw,gr=arguments.length<3;return Rt(ue,xo(ge,4),Ye,gr,Up)}var a4=lue;function uue(ue,ge,Ye,Rt){var gr=ue==null?0:ue.length;for(Rt&&gr&&(Ye=ue[--gr]);gr--;)Ye=ge(Ye,ue[gr],gr,ue);return Ye}var i4=uue;function cue(ue,ge,Ye){var Rt=Io(ue)?i4:Qw,gr=arguments.length<3;return Rt(ue,xo(ge,4),Ye,gr,Sw)}var n4=cue;function fue(ue,ge){var Ye=Io(ue)?Np:Lw;return Ye(ue,Hv(xo(ge,3)))}var o4=fue;function hue(ue,ge){var Ye=[];if(!(ue&&ue.length))return Ye;var Rt=-1,gr=[],Yr=ue.length;for(ge=xo(ge,3);++Rt<Yr;){var Ea=ue[Rt];ge(Ea,Rt,ue)&&(Ye.push(Ea),gr.push(Rt))}return Jw(ue,gr),Ye}var s4=hue;function pue(ue,ge,Ye){return(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=jo(ge),m_(Bs(ue),ge)}var l4=pue;function due(){var ue=arguments,ge=Bs(ue[0]);return ue.length<3?ge:ge.replace(ue[1],ue[2])}var u4=due;var vue="Expected a function";function mue(ue,ge){if(typeof ue!="function")throw new TypeError(vue);return ge=ge===void 0?ge:jo(ge),qo(ue,ge)}var c4=mue;function gue(ue,ge,Ye){ge=Fp(ge,ue);var Rt=-1,gr=ge.length;for(gr||(gr=1,ue=void 0);++Rt<gr;){var Yr=ue?.[Eh(ge[Rt])];Yr===void 0&&(Rt=gr,Yr=Ye),ue=ap(Yr)?Yr.call(ue):Yr}return ue}var f4=gue;var yue=Array.prototype,_ue=yue.reverse;function xue(ue){return ue==null?ue:_ue.call(ue)}var g_=xue;var bue=gy("round"),h4=bue;function wue(ue){var ge=ue.length;return ge?ue[Hy(0,ge-1)]:void 0}var e2=wue;function Tue(ue){return e2(Ld(ue))}var p4=Tue;function Aue(ue){var ge=Io(ue)?e2:p4;return ge(ue)}var d4=Aue;function Sue(ue,ge){var Ye=-1,Rt=ue.length,gr=Rt-1;for(ge=ge===void 0?Rt:ge;++Ye<ge;){var Yr=Hy(Ye,gr),Ea=ue[Yr];ue[Yr]=ue[Ye],ue[Ye]=Ea}return ue.length=ge,ue}var Hm=Sue;function Mue(ue,ge){return Hm(pf(ue),ud(ge,0,ue.length))}var v4=Mue;function Eue(ue,ge){var Ye=Ld(ue);return Hm(Ye,ud(ge,0,Ye.length))}var m4=Eue;function kue(ue,ge,Ye){(Ye?Nc(ue,ge,Ye):ge===void 0)?ge=1:ge=jo(ge);var Rt=Io(ue)?v4:m4;return Rt(ue,ge)}var g4=kue;function Cue(ue,ge,Ye){return ue==null?ue:bv(ue,ge,Ye)}var y4=Cue;function Lue(ue,ge,Ye,Rt){return Rt=typeof Rt=="function"?Rt:void 0,ue==null?ue:bv(ue,ge,Ye,Rt)}var _4=Lue;function Pue(ue){return Hm(pf(ue))}var x4=Pue;function Iue(ue){return Hm(Ld(ue))}var b4=Iue;function Rue(ue){var ge=Io(ue)?x4:b4;return ge(ue)}var w4=Rue;var Due="[object Map]",zue="[object Set]";function Fue(ue){if(ue==null)return 0;if(Vc(ue))return Vm(ue)?Pd(ue):ue.length;var ge=jh(ue);return ge==Due||ge==zue?ue.size:ny(ue).length}var T4=Fue;function Oue(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)?(ge=0,Ye=Rt):(ge=ge==null?0:jo(ge),Ye=Ye===void 0?Rt:jo(Ye)),Yf(ue,ge,Ye)):[]}var A4=Oue;var Bue=Cd(function(ue,ge,Ye){return ue+(Ye?"_":"")+ge.toLowerCase()}),S4=Bue;function Nue(ue,ge){var Ye;return Up(ue,function(Rt,gr,Yr){return Ye=ge(Rt,gr,Yr),!Ye}),!!Ye}var M4=Nue;function Uue(ue,ge,Ye){var Rt=Io(ue)?Ay:M4;return Ye&&Nc(ue,ge,Ye)&&(ge=void 0),Rt(ue,xo(ge,3))}var E4=Uue;var jue=qo(function(ue,ge){if(ue==null)return[];var Ye=ge.length;return Ye>1&&Nc(ue,ge[0],ge[1])?ge=[]:Ye>2&&Nc(ge[0],ge[1],ge[2])&&(ge=[ge[0]]),Zw(ue,Qu(ge,1),[])}),k4=jue;var que=4294967295,Vue=que-1,Gue=Math.floor,Hue=Math.min;function Wue(ue,ge,Ye,Rt){var gr=0,Yr=ue==null?0:ue.length;if(Yr===0)return 0;ge=Ye(ge);for(var Ea=ge!==ge,ei=ge===null,oi=Rf(ge),Cn=ge===void 0;gr<Yr;){var bn=Gue((gr+Yr)/2),Fn=Ye(ue[bn]),To=Fn!==void 0,ds=Fn===null,Qs=Fn===Fn,Vo=Rf(Fn);if(Ea)var Xe=Rt||Qs;else Cn?Xe=Qs&&(Rt||To):ei?Xe=Qs&&To&&(Rt||!ds):oi?Xe=Qs&&To&&!ds&&(Rt||!Vo):ds||Vo?Xe=!1:Xe=Rt?Fn<=ge:Fn<ge;Xe?gr=bn+1:Yr=bn}return Hue(Yr,Vue)}var Wy=Wue;var Xue=4294967295,Zue=Xue>>>1;function Yue(ue,ge,Ye){var Rt=0,gr=ue==null?Rt:ue.length;if(typeof ge=="number"&&ge===ge&&gr<=Zue){for(;Rt<gr;){var Yr=Rt+gr>>>1,Ea=ue[Yr];Ea!==null&&!Rf(Ea)&&(Ye?Ea<=ge:Ea<ge)?Rt=Yr+1:gr=Yr}return gr}return Wy(ue,ge,Bc,Ye)}var Wm=Yue;function Kue(ue,ge){return Wm(ue,ge)}var C4=Kue;function Jue(ue,ge,Ye){return Wy(ue,ge,xo(Ye,2))}var L4=Jue;function $ue(ue,ge){var Ye=ue==null?0:ue.length;if(Ye){var Rt=Wm(ue,ge);if(Rt<Ye&&oh(ue[Rt],ge))return Rt}return-1}var P4=$ue;function Que(ue,ge){return Wm(ue,ge,!0)}var I4=Que;function ece(ue,ge,Ye){return Wy(ue,ge,xo(Ye,2),!0)}var R4=ece;function tce(ue,ge){var Ye=ue==null?0:ue.length;if(Ye){var Rt=Wm(ue,ge,!0)-1;if(oh(ue[Rt],ge))return Rt}return-1}var D4=tce;function rce(ue,ge){for(var Ye=-1,Rt=ue.length,gr=0,Yr=[];++Ye<Rt;){var Ea=ue[Ye],ei=ge?ge(Ea):Ea;if(!Ye||!oh(ei,oi)){var oi=ei;Yr[gr++]=Ea===0?0:Ea}}return Yr}var t2=rce;function ace(ue){return ue&&ue.length?t2(ue):[]}var z4=ace;function ice(ue,ge){return ue&&ue.length?t2(ue,xo(ge,2)):[]}var F4=ice;var nce=4294967295;function oce(ue,ge,Ye){return Ye&&typeof Ye!="number"&&Nc(ue,ge,Ye)&&(ge=Ye=void 0),Ye=Ye===void 0?nce:Ye>>>0,Ye?(ue=Bs(ue),ue&&(typeof ge=="string"||ge!=null&&!Ny(ge))&&(ge=nh(ge),!ge&&kd(ue))?Bp(Uh(ue),0,Ye):ue.split(ge,Ye)):[]}var O4=oce;var sce="Expected a function",lce=Math.max;function uce(ue,ge){if(typeof ue!="function")throw new TypeError(sce);return ge=ge==null?0:lce(jo(ge),0),qo(function(Ye){var Rt=Ye[ge],gr=Bp(Ye,0,ge);return Rt&&Op(gr,Rt),xf(ue,this,gr)})}var B4=uce;var cce=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+py(ge)}),N4=cce;function fce(ue,ge,Ye){return ue=Bs(ue),Ye=Ye==null?0:ud(jo(Ye),0,ue.length),ge=nh(ge),ue.slice(Ye,Ye+ge.length)==ge}var U4=fce;function hce(){return{}}var j4=hce;function pce(){return""}var q4=pce;function dce(){return!0}var V4=dce;var vce=wm(function(ue,ge){return ue-ge},0),G4=vce;function mce(ue){return ue&&ue.length?jy(ue,Bc):0}var H4=mce;function gce(ue,ge){return ue&&ue.length?jy(ue,xo(ge,2)):0}var W4=gce;function yce(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,1,ge):[]}var X4=yce;function _ce(ue,ge,Ye){return ue&&ue.length?(ge=Ye||ge===void 0?1:jo(ge),Yf(ue,0,ge<0?0:ge)):[]}var Z4=_ce;function xce(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),ge=Rt-ge,Yf(ue,ge<0?0:ge,Rt)):[]}var Y4=xce;function bce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!1,!0):[]}var K4=bce;function wce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3)):[]}var J4=wce;function Tce(ue,ge){return ge(ue),ue}var $4=Tce;var Q4=Object.prototype,Ace=Q4.hasOwnProperty;function Sce(ue,ge,Ye,Rt){return ue===void 0||oh(ue,Q4[Ye])&&!Ace.call(Rt,Ye)?ge:ue}var VA=Sce;var Mce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Ece(ue){return"\\"+Mce[ue]}var eD=Ece;var kce=/<%=([\s\S]+?)%>/g,r2=kce;var Cce=/<%-([\s\S]+?)%>/g,tD=Cce;var Lce=/<%([\s\S]+?)%>/g,rD=Lce;var Pce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Pce;var Ice="Invalid `variable` option passed into `_.template`",Rce=/\b__p \+= '';/g,Dce=/\b(__p \+=) '' \+/g,zce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fce=/[()=,{}\[\]\/\s]/,Oce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Bce=/['\n\r\u2028\u2029\\]/g,Nce=Object.prototype,aD=Nce.hasOwnProperty;function Uce(ue,ge,Ye){var Rt=y_.imports._.templateSettings||y_;Ye&&Nc(ue,ge,Ye)&&(ge=void 0),ue=Bs(ue),ge=km({},ge,Rt,VA);var gr=km({},ge.imports,Rt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Cn=0,bn=ge.interpolate||a2,Fn="__p += '",To=RegExp((ge.escape||a2).source+"|"+bn.source+"|"+(bn===r2?Oce:a2).source+"|"+(ge.evaluate||a2).source+"|$","g"),ds=aD.call(ge,"sourceURL")?"//# sourceURL="+(ge.sourceURL+"").replace(/\s/g," ")+`
`:"";ue.replace(To,function(Xe,Kl,nu,jp,zf,fp){return nu||(nu=jp),Fn+=ue.slice(Cn,fp).replace(Bce,eD),Kl&&(ei=!0,Fn+=`' +
__e(`+Kl+`) +
'`),zf&&(oi=!0,Fn+=`';
`+zf+`;
__p += '`),nu&&(Fn+=`' +
((__t = (`+nu+`)) == null ? '' : __t) +
'`),Cn=fp+Xe.length,Xe}),Fn+=`';
`;var Qs=aD.call(ge,"variable")&&ge.variable;if(!Qs)Fn=`with (obj) {
`+Fn+`
}
`;else if(Fce.test(Qs))throw new Error(Ice);Fn=(oi?Fn.replace(Rce,""):Fn).replace(Dce,"$1").replace(zce,"$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 Vo=Vb(function(){return Function(Yr,ds+"return "+Fn).apply(void 0,Ea)});if(Vo.source=Fn,hy(Vo))throw Vo;return Vo}var iD=Uce;var jce="Expected a function";function qce(ue,ge,Ye){var Rt=!0,gr=!0;if(typeof ue!="function")throw new TypeError(jce);return Ll(Ye)&&(Rt="leading"in Ye?!!Ye.leading:Rt,gr="trailing"in Ye?!!Ye.trailing:gr),xw(ue,ge,{leading:Rt,maxWait:ge,trailing:gr})}var nD=qce;function Vce(ue,ge){return ge(ue)}var Wv=Vce;var Gce=9007199254740991,GA=4294967295,Hce=Math.min;function Wce(ue,ge){if(ue=jo(ue),ue<1||ue>Gce)return[];var Ye=GA,Rt=Hce(ue,GA);ge=kh(ge),ue-=GA;for(var gr=ay(Rt,ge);++Ye<ue;)ge(Ye);return gr}var oD=Wce;function Xce(){return this}var sD=Xce;function Zce(ue,ge){var Ye=ue;return Ye instanceof Bl&&(Ye=Ye.value()),dy(ge,function(Rt,gr){return gr.func.apply(gr.thisArg,Op([Rt],gr.args))},Ye)}var i2=Zce;function Yce(){return i2(this.__wrapped__,this.__actions__)}var Xm=Yce;function Kce(ue){return Bs(ue).toLowerCase()}var lD=Kce;function Jce(ue){return Io(ue)?Ml(ue,Eh):Rf(ue)?[ue]:pf(jb(Bs(ue)))}var uD=Jce;var cD=9007199254740991;function $ce(ue){return ue?ud(jo(ue),-cD,cD):ue===0?ue:0}var fD=$ce;function Qce(ue){return Bs(ue).toUpperCase()}var hD=Qce;function efe(ue,ge,Ye){var Rt=Io(ue),gr=Rt||Kp(ue)||Ed(ue);if(ge=xo(ge,4),Ye==null){var Yr=ue&&ue.constructor;gr?Ye=Rt?new Yr:[]:Ll(ue)?Ye=ap(Yr)?Td(Rm(ue)):{}:Ye={}}return(gr?Nh:cp)(ue,function(Ea,ei,oi){return ge(Ye,Ea,ei,oi)}),Ye}var pD=efe;function tfe(ue,ge){for(var Ye=ue.length;Ye--&&Ad(ge,ue[Ye],0)>-1;);return Ye}var n2=tfe;function rfe(ue,ge){for(var Ye=-1,Rt=ue.length;++Ye<Rt&&Ad(ge,ue[Ye],0)>-1;);return Ye}var o2=rfe;function afe(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return wb(ue);if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=Uh(ge),Yr=o2(Rt,gr),Ea=n2(Rt,gr)+1;return Bp(Rt,Yr,Ea).join("")}var dD=afe;function ife(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return ue.slice(0,bb(ue)+1);if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=n2(Rt,Uh(ge))+1;return Bp(Rt,0,gr).join("")}var vD=ife;var nfe=/^\s+/;function ofe(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return ue.replace(nfe,"");if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=o2(Rt,Uh(ge));return Bp(Rt,gr).join("")}var mD=ofe;var sfe=30,lfe="...",ufe=/\w*$/;function cfe(ue,ge){var Ye=sfe,Rt=lfe;if(Ll(ge)){var gr="separator"in ge?ge.separator:gr;Ye="length"in ge?jo(ge.length):Ye,Rt="omission"in ge?nh(ge.omission):Rt}ue=Bs(ue);var Yr=ue.length;if(kd(ue)){var Ea=Uh(ue);Yr=Ea.length}if(Ye>=Yr)return ue;var ei=Ye-Pd(Rt);if(ei<1)return Rt;var oi=Ea?Bp(Ea,0,ei).join(""):ue.slice(0,ei);if(gr===void 0)return oi+Rt;if(Ea&&(ei+=oi.length-ei),Ny(gr)){if(ue.slice(ei).search(gr)){var Cn,bn=oi;for(gr.global||(gr=RegExp(gr.source,Bs(ufe.exec(gr))+"g")),gr.lastIndex=0;Cn=gr.exec(bn);)var Fn=Cn.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(ue.indexOf(nh(gr),ei)!=ei){var To=oi.lastIndexOf(gr);To>-1&&(oi=oi.slice(0,To))}return oi+Rt}var gD=cfe;function ffe(ue){return Fb(ue,1)}var yD=ffe;var hfe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},pfe=vy(hfe),_D=pfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,dfe=RegExp(xD.source);function vfe(ue){return ue=Bs(ue),ue&&dfe.test(ue)?ue.replace(xD,_D):ue}var bD=vfe;var mfe=1/0,gfe=Dm&&1/Fm(new Dm([,-0]))[1]==mfe?function(ue){return new Dm(ue)}:Kg,wD=gfe;var yfe=200;function _fe(ue,ge,Ye){var Rt=-1,gr=Mm,Yr=ue.length,Ea=!0,ei=[],oi=ei;if(Ye)Ea=!1,gr=Ry;else if(Yr>=yfe){var Cn=ge?null:wD(ue);if(Cn)return Fm(Cn);Ea=!1,gr=Gv,oi=new zm}else oi=ge?[]:ei;e:for(;++Rt<Yr;){var bn=ue[Rt],Fn=ge?ge(bn):bn;if(bn=Ye||bn!==0?bn:0,Ea&&Fn===Fn){for(var To=oi.length;To--;)if(oi[To]===Fn)continue e;ge&&oi.push(Fn),ei.push(bn)}else gr(oi,Fn,Ye)||(oi!==ei&&oi.push(Fn),ei.push(bn))}return ei}var Jp=_fe;var xfe=qo(function(ue){return Jp(Qu(ue,1,Eu,!0))}),TD=xfe;var bfe=qo(function(ue){var ge=Tf(ue);return Eu(ge)&&(ge=void 0),Jp(Qu(ue,1,Eu,!0),xo(ge,2))}),AD=bfe;var wfe=qo(function(ue){var ge=Tf(ue);return ge=typeof ge=="function"?ge:void 0,Jp(Qu(ue,1,Eu,!0),void 0,ge)}),SD=wfe;function Tfe(ue){return ue&&ue.length?Jp(ue):[]}var MD=Tfe;function Afe(ue,ge){return ue&&ue.length?Jp(ue,xo(ge,2)):[]}var ED=Afe;function Sfe(ue,ge){return ge=typeof ge=="function"?ge:void 0,ue&&ue.length?Jp(ue,void 0,ge):[]}var kD=Sfe;var Mfe=0;function Efe(ue){var ge=++Mfe;return Bs(ue)+ge}var CD=Efe;function kfe(ue,ge){return ue==null?!0:qy(ue,ge)}var LD=kfe;var Cfe=Math.max;function Lfe(ue){if(!(ue&&ue.length))return[];var ge=0;return ue=Np(ue,function(Ye){if(Eu(Ye))return ge=Cfe(Ye.length,ge),!0}),ay(ge,function(Ye){return Ml(ue,Cy(Ye))})}var Xy=Lfe;function Pfe(ue,ge){if(!(ue&&ue.length))return[];var Ye=Xy(ue);return ge==null?Ye:Ml(Ye,function(Rt){return xf(ge,void 0,Rt)})}var s2=Pfe;function Ife(ue,ge,Ye,Rt){return bv(ue,ge,Ye(ld(ue,ge)),Rt)}var l2=Ife;function Rfe(ue,ge,Ye){return ue==null?ue:l2(ue,ge,kh(Ye))}var PD=Rfe;function Dfe(ue,ge,Ye,Rt){return Rt=typeof Rt=="function"?Rt:void 0,ue==null?ue:l2(ue,ge,kh(Ye),Rt)}var ID=Dfe;var zfe=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+ge.toUpperCase()}),RD=zfe;function Ffe(ue){return ue==null?[]:Fy(ue,Gc(ue))}var DD=Ffe;var Ofe=qo(function(ue,ge){return Eu(ue)?_v(ue,ge):[]}),zD=Ofe;function Bfe(ue,ge){return Yw(kh(ge),ue)}var FD=Bfe;var Nfe=lp(function(ue){var ge=ue.length,Ye=ge?ue[0]:0,Rt=this.__wrapped__,gr=function(Yr){return fy(Yr,ue)};return ge>1||this.__actions__.length||!(Rt instanceof Bl)||!ip(Ye)?this.thru(gr):(Rt=Rt.slice(Ye,+Ye+(ge?1:0)),Rt.__actions__.push({func:Wv,args:[gr],thisArg:void 0}),new zp(Rt,this.__chain__).thru(function(Yr){return ge&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=Nfe;function Ufe(){return Kb(this)}var BD=Ufe;function jfe(){var ue=this.__wrapped__;if(ue instanceof Bl){var ge=ue;return this.__actions__.length&&(ge=new Bl(this)),ge=ge.reverse(),ge.__actions__.push({func:Wv,args:[g_],thisArg:void 0}),new zp(ge,this.__chain__)}return this.thru(g_)}var ND=jfe;function qfe(ue,ge,Ye){var Rt=ue.length;if(Rt<2)return Rt?Jp(ue[0]):[];for(var gr=-1,Yr=Array(Rt);++gr<Rt;)for(var Ea=ue[gr],ei=-1;++ei<Rt;)ei!=gr&&(Yr[gr]=_v(Yr[gr]||Ea,ue[ei],ge,Ye));return Jp(Qu(Yr,1),ge,Ye)}var Zy=qfe;var Vfe=qo(function(ue){return Zy(Np(ue,Eu))}),UD=Vfe;var Gfe=qo(function(ue){var ge=Tf(ue);return Eu(ge)&&(ge=void 0),Zy(Np(ue,Eu),xo(ge,2))}),jD=Gfe;var Hfe=qo(function(ue){var ge=Tf(ue);return ge=typeof ge=="function"?ge:void 0,Zy(Np(ue,Eu),void 0,ge)}),qD=Hfe;var Wfe=qo(Xy),VD=Wfe;function Xfe(ue,ge,Ye){for(var Rt=-1,gr=ue.length,Yr=ge.length,Ea={};++Rt<gr;){var ei=Rt<Yr?ge[Rt]:void 0;Ye(Ea,ue[Rt],ei)}return Ea}var u2=Xfe;function Zfe(ue,ge){return u2(ue||[],ge||[],vv)}var GD=Zfe;function Yfe(ue,ge){return u2(ue||[],ge||[],bv)}var HD=Yfe;var Kfe=qo(function(ue){var ge=ue.length,Ye=ge>1?ue[ge-1]:void 0;return Ye=typeof Ye=="function"?(ue.pop(),Ye):void 0,s2(ue,Ye)}),WD=Kfe;var gs={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 Gs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:Io,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:jo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Bs};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:va,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 Jfe(){var ue=new Bl(this.__wrapped__);return ue.__actions__=pf(this.__actions__),ue.__dir__=this.__dir__,ue.__filtered__=this.__filtered__,ue.__iteratees__=pf(this.__iteratees__),ue.__takeCount__=this.__takeCount__,ue.__views__=pf(this.__views__),ue}var XD=Jfe;function $fe(){if(this.__filtered__){var ue=new Bl(this);ue.__dir__=-1,ue.__filtered__=!0}else ue=this.clone(),ue.__dir__*=-1;return ue}var ZD=$fe;var Qfe=Math.max,ehe=Math.min;function the(ue,ge,Ye){for(var Rt=-1,gr=Ye.length;++Rt<gr;){var Yr=Ye[Rt],Ea=Yr.size;switch(Yr.type){case"drop":ue+=Ea;break;case"dropRight":ge-=Ea;break;case"take":ge=ehe(ge,ue+Ea);break;case"takeRight":ue=Qfe(ue,ge-Ea);break}}return{start:ue,end:ge}}var YD=the;var rhe=1,ahe=2,ihe=Math.min;function nhe(){var ue=this.__wrapped__.value(),ge=this.__dir__,Ye=Io(ue),Rt=ge<0,gr=Ye?ue.length:0,Yr=YD(0,gr,this.__views__),Ea=Yr.start,ei=Yr.end,oi=ei-Ea,Cn=Rt?ei:Ea-1,bn=this.__iteratees__,Fn=bn.length,To=0,ds=ihe(oi,this.__takeCount__);if(!Ye||!Rt&&gr==oi&&ds==oi)return i2(ue,this.__actions__);var Qs=[];e:for(;oi--&&To<ds;){Cn+=ge;for(var Vo=-1,Xe=ue[Cn];++Vo<Fn;){var Kl=bn[Vo],nu=Kl.iteratee,jp=Kl.type,zf=nu(Xe);if(jp==ahe)Xe=zf;else if(!zf){if(jp==rhe)continue e;break e}}Qs[To++]=Xe}return Qs}var KD=nhe;var ohe="4.17.21",she=2,lhe=1,uhe=3,QD=4294967295,che=Array.prototype,fhe=Object.prototype,e7=fhe.hasOwnProperty,JD=If?If.iterator:void 0,hhe=Math.max,$D=Math.min,WA=function(ue){return function(ge,Ye,Rt){if(Rt==null){var gr=Ll(Ye),Yr=gr&&gu(Ye),Ea=Yr&&Yr.length&&jm(Ye,Yr);(Ea?Ea.length:gr)||(Rt=Ye,Ye=ge,ge=this)}return ue(ge,Ye,Rt)}}(qw);va.after=Df.after;va.ary=Df.ary;va.assign=dl.assign;va.assignIn=dl.assignIn;va.assignInWith=dl.assignInWith;va.assignWith=dl.assignWith;va.at=dl.at;va.before=Df.before;va.bind=Df.bind;va.bindAll=ec.bindAll;va.bindKey=Df.bindKey;va.castArray=Gs.castArray;va.chain=Id.chain;va.chunk=gs.chunk;va.compact=gs.compact;va.concat=gs.concat;va.cond=ec.cond;va.conforms=ec.conforms;va.constant=ec.constant;va.countBy=xc.countBy;va.create=dl.create;va.curry=Df.curry;va.curryRight=Df.curryRight;va.debounce=Df.debounce;va.defaults=dl.defaults;va.defaultsDeep=dl.defaultsDeep;va.defer=Df.defer;va.delay=Df.delay;va.difference=gs.difference;va.differenceBy=gs.differenceBy;va.differenceWith=gs.differenceWith;va.drop=gs.drop;va.dropRight=gs.dropRight;va.dropRightWhile=gs.dropRightWhile;va.dropWhile=gs.dropWhile;va.fill=gs.fill;va.filter=xc.filter;va.flatMap=xc.flatMap;va.flatMapDeep=xc.flatMapDeep;va.flatMapDepth=xc.flatMapDepth;va.flatten=gs.flatten;va.flattenDeep=gs.flattenDeep;va.flattenDepth=gs.flattenDepth;va.flip=Df.flip;va.flow=ec.flow;va.flowRight=ec.flowRight;va.fromPairs=gs.fromPairs;va.functions=dl.functions;va.functionsIn=dl.functionsIn;va.groupBy=xc.groupBy;va.initial=gs.initial;va.intersection=gs.intersection;va.intersectionBy=gs.intersectionBy;va.intersectionWith=gs.intersectionWith;va.invert=dl.invert;va.invertBy=dl.invertBy;va.invokeMap=xc.invokeMap;va.iteratee=ec.iteratee;va.keyBy=xc.keyBy;va.keys=gu;va.keysIn=dl.keysIn;va.map=xc.map;va.mapKeys=dl.mapKeys;va.mapValues=dl.mapValues;va.matches=ec.matches;va.matchesProperty=ec.matchesProperty;va.memoize=Df.memoize;va.merge=dl.merge;va.mergeWith=dl.mergeWith;va.method=ec.method;va.methodOf=ec.methodOf;va.mixin=WA;va.negate=Hv;va.nthArg=ec.nthArg;va.omit=dl.omit;va.omitBy=dl.omitBy;va.once=Df.once;va.orderBy=xc.orderBy;va.over=ec.over;va.overArgs=Df.overArgs;va.overEvery=ec.overEvery;va.overSome=ec.overSome;va.partial=Df.partial;va.partialRight=Df.partialRight;va.partition=xc.partition;va.pick=dl.pick;va.pickBy=dl.pickBy;va.property=ec.property;va.propertyOf=ec.propertyOf;va.pull=gs.pull;va.pullAll=gs.pullAll;va.pullAllBy=gs.pullAllBy;va.pullAllWith=gs.pullAllWith;va.pullAt=gs.pullAt;va.range=ec.range;va.rangeRight=ec.rangeRight;va.rearg=Df.rearg;va.reject=xc.reject;va.remove=gs.remove;va.rest=Df.rest;va.reverse=gs.reverse;va.sampleSize=xc.sampleSize;va.set=dl.set;va.setWith=dl.setWith;va.shuffle=xc.shuffle;va.slice=gs.slice;va.sortBy=xc.sortBy;va.sortedUniq=gs.sortedUniq;va.sortedUniqBy=gs.sortedUniqBy;va.split=ju.split;va.spread=Df.spread;va.tail=gs.tail;va.take=gs.take;va.takeRight=gs.takeRight;va.takeRightWhile=gs.takeRightWhile;va.takeWhile=gs.takeWhile;va.tap=Id.tap;va.throttle=Df.throttle;va.thru=Wv;va.toArray=Gs.toArray;va.toPairs=dl.toPairs;va.toPairsIn=dl.toPairsIn;va.toPath=ec.toPath;va.toPlainObject=Gs.toPlainObject;va.transform=dl.transform;va.unary=Df.unary;va.union=gs.union;va.unionBy=gs.unionBy;va.unionWith=gs.unionWith;va.uniq=gs.uniq;va.uniqBy=gs.uniqBy;va.uniqWith=gs.uniqWith;va.unset=dl.unset;va.unzip=gs.unzip;va.unzipWith=gs.unzipWith;va.update=dl.update;va.updateWith=dl.updateWith;va.values=dl.values;va.valuesIn=dl.valuesIn;va.without=gs.without;va.words=ju.words;va.wrap=Df.wrap;va.xor=gs.xor;va.xorBy=gs.xorBy;va.xorWith=gs.xorWith;va.zip=gs.zip;va.zipObject=gs.zipObject;va.zipObjectDeep=gs.zipObjectDeep;va.zipWith=gs.zipWith;va.entries=dl.toPairs;va.entriesIn=dl.toPairsIn;va.extend=dl.assignIn;va.extendWith=dl.assignInWith;WA(va,va);va.add=xp.add;va.attempt=ec.attempt;va.camelCase=ju.camelCase;va.capitalize=ju.capitalize;va.ceil=xp.ceil;va.clamp=__.clamp;va.clone=Gs.clone;va.cloneDeep=Gs.cloneDeep;va.cloneDeepWith=Gs.cloneDeepWith;va.cloneWith=Gs.cloneWith;va.conformsTo=Gs.conformsTo;va.deburr=ju.deburr;va.defaultTo=ec.defaultTo;va.divide=xp.divide;va.endsWith=ju.endsWith;va.eq=Gs.eq;va.escape=ju.escape;va.escapeRegExp=ju.escapeRegExp;va.every=xc.every;va.find=xc.find;va.findIndex=gs.findIndex;va.findKey=dl.findKey;va.findLast=xc.findLast;va.findLastIndex=gs.findLastIndex;va.findLastKey=dl.findLastKey;va.floor=xp.floor;va.forEach=xc.forEach;va.forEachRight=xc.forEachRight;va.forIn=dl.forIn;va.forInRight=dl.forInRight;va.forOwn=dl.forOwn;va.forOwnRight=dl.forOwnRight;va.get=dl.get;va.gt=Gs.gt;va.gte=Gs.gte;va.has=dl.has;va.hasIn=dl.hasIn;va.head=gs.head;va.identity=Bc;va.includes=xc.includes;va.indexOf=gs.indexOf;va.inRange=__.inRange;va.invoke=dl.invoke;va.isArguments=Gs.isArguments;va.isArray=Io;va.isArrayBuffer=Gs.isArrayBuffer;va.isArrayLike=Gs.isArrayLike;va.isArrayLikeObject=Gs.isArrayLikeObject;va.isBoolean=Gs.isBoolean;va.isBuffer=Gs.isBuffer;va.isDate=Gs.isDate;va.isElement=Gs.isElement;va.isEmpty=Gs.isEmpty;va.isEqual=Gs.isEqual;va.isEqualWith=Gs.isEqualWith;va.isError=Gs.isError;va.isFinite=Gs.isFinite;va.isFunction=Gs.isFunction;va.isInteger=Gs.isInteger;va.isLength=Gs.isLength;va.isMap=Gs.isMap;va.isMatch=Gs.isMatch;va.isMatchWith=Gs.isMatchWith;va.isNaN=Gs.isNaN;va.isNative=Gs.isNative;va.isNil=Gs.isNil;va.isNull=Gs.isNull;va.isNumber=Gs.isNumber;va.isObject=Ll;va.isObjectLike=Gs.isObjectLike;va.isPlainObject=Gs.isPlainObject;va.isRegExp=Gs.isRegExp;va.isSafeInteger=Gs.isSafeInteger;va.isSet=Gs.isSet;va.isString=Gs.isString;va.isSymbol=Gs.isSymbol;va.isTypedArray=Gs.isTypedArray;va.isUndefined=Gs.isUndefined;va.isWeakMap=Gs.isWeakMap;va.isWeakSet=Gs.isWeakSet;va.join=gs.join;va.kebabCase=ju.kebabCase;va.last=Tf;va.lastIndexOf=gs.lastIndexOf;va.lowerCase=ju.lowerCase;va.lowerFirst=ju.lowerFirst;va.lt=Gs.lt;va.lte=Gs.lte;va.max=xp.max;va.maxBy=xp.maxBy;va.mean=xp.mean;va.meanBy=xp.meanBy;va.min=xp.min;va.minBy=xp.minBy;va.stubArray=ec.stubArray;va.stubFalse=ec.stubFalse;va.stubObject=ec.stubObject;va.stubString=ec.stubString;va.stubTrue=ec.stubTrue;va.multiply=xp.multiply;va.nth=gs.nth;va.noop=ec.noop;va.now=HA.now;va.pad=ju.pad;va.padEnd=ju.padEnd;va.padStart=ju.padStart;va.parseInt=ju.parseInt;va.random=__.random;va.reduce=xc.reduce;va.reduceRight=xc.reduceRight;va.repeat=ju.repeat;va.replace=ju.replace;va.result=dl.result;va.round=xp.round;va.sample=xc.sample;va.size=xc.size;va.snakeCase=ju.snakeCase;va.some=xc.some;va.sortedIndex=gs.sortedIndex;va.sortedIndexBy=gs.sortedIndexBy;va.sortedIndexOf=gs.sortedIndexOf;va.sortedLastIndex=gs.sortedLastIndex;va.sortedLastIndexBy=gs.sortedLastIndexBy;va.sortedLastIndexOf=gs.sortedLastIndexOf;va.startCase=ju.startCase;va.startsWith=ju.startsWith;va.subtract=xp.subtract;va.sum=xp.sum;va.sumBy=xp.sumBy;va.template=ju.template;va.times=ec.times;va.toFinite=Gs.toFinite;va.toInteger=jo;va.toLength=Gs.toLength;va.toLower=ju.toLower;va.toNumber=Gs.toNumber;va.toSafeInteger=Gs.toSafeInteger;va.toString=Gs.toString;va.toUpper=ju.toUpper;va.trim=ju.trim;va.trimEnd=ju.trimEnd;va.trimStart=ju.trimStart;va.truncate=ju.truncate;va.unescape=ju.unescape;va.uniqueId=ec.uniqueId;va.upperCase=ju.upperCase;va.upperFirst=ju.upperFirst;va.each=xc.forEach;va.eachRight=xc.forEachRight;va.first=gs.head;WA(va,function(){var ue={};return cp(va,function(ge,Ye){e7.call(va.prototype,Ye)||(ue[Ye]=ge)}),ue}(),{chain:!1});va.VERSION=ohe;(va.templateSettings=ju.templateSettings).imports._=va;Nh(["bind","bindKey","curry","curryRight","partial","partialRight"],function(ue){va[ue].placeholder=va});Nh(["drop","take"],function(ue,ge){Bl.prototype[ue]=function(Ye){Ye=Ye===void 0?1:hhe(jo(Ye),0);var Rt=this.__filtered__&&!ge?new Bl(this):this.clone();return Rt.__filtered__?Rt.__takeCount__=$D(Ye,Rt.__takeCount__):Rt.__views__.push({size:$D(Ye,QD),type:ue+(Rt.__dir__<0?"Right":"")}),Rt},Bl.prototype[ue+"Right"]=function(Ye){return this.reverse()[ue](Ye).reverse()}});Nh(["filter","map","takeWhile"],function(ue,ge){var Ye=ge+1,Rt=Ye==lhe||Ye==uhe;Bl.prototype[ue]=function(gr){var Yr=this.clone();return Yr.__iteratees__.push({iteratee:xo(gr,3),type:Ye}),Yr.__filtered__=Yr.__filtered__||Rt,Yr}});Nh(["head","last"],function(ue,ge){var Ye="take"+(ge?"Right":"");Bl.prototype[ue]=function(){return this[Ye](1).value()[0]}});Nh(["initial","tail"],function(ue,ge){var Ye="drop"+(ge?"":"Right");Bl.prototype[ue]=function(){return this.__filtered__?new Bl(this):this[Ye](1)}});Bl.prototype.compact=function(){return this.filter(Bc)};Bl.prototype.find=function(ue){return this.filter(ue).head()};Bl.prototype.findLast=function(ue){return this.reverse().find(ue)};Bl.prototype.invokeMap=qo(function(ue,ge){return typeof ue=="function"?new Bl(this):this.map(function(Ye){return xv(Ye,ue,ge)})});Bl.prototype.reject=function(ue){return this.filter(Hv(xo(ue)))};Bl.prototype.slice=function(ue,ge){ue=jo(ue);var Ye=this;return Ye.__filtered__&&(ue>0||ge<0)?new Bl(Ye):(ue<0?Ye=Ye.takeRight(-ue):ue&&(Ye=Ye.drop(ue)),ge!==void 0&&(ge=jo(ge),Ye=ge<0?Ye.dropRight(-ge):Ye.take(ge-ue)),Ye)};Bl.prototype.takeRightWhile=function(ue){return this.reverse().takeWhile(ue).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};cp(Bl.prototype,function(ue,ge){var Ye=/^(?:filter|find|map|reject)|While$/.test(ge),Rt=/^(?:head|last)$/.test(ge),gr=va[Rt?"take"+(ge=="last"?"Right":""):ge],Yr=Rt||/^find/.test(ge);gr&&(va.prototype[ge]=function(){var Ea=this.__wrapped__,ei=Rt?[1]:arguments,oi=Ea instanceof Bl,Cn=ei[0],bn=oi||Io(Ea),Fn=function(Kl){var nu=gr.apply(va,Op([Kl],ei));return Rt&&To?nu[0]:nu};bn&&Ye&&typeof Cn=="function"&&Cn.length!=1&&(oi=bn=!1);var To=this.__chain__,ds=!!this.__actions__.length,Qs=Yr&&!To,Vo=oi&&!ds;if(!Yr&&bn){Ea=Vo?Ea:new Bl(this);var Xe=ue.apply(Ea,ei);return Xe.__actions__.push({func:Wv,args:[Fn],thisArg:void 0}),new zp(Xe,To)}return Qs&&Vo?ue.apply(this,ei):(Xe=this.thru(Fn),Qs?Rt?Xe.value()[0]:Xe.value():Xe)})});Nh(["pop","push","shift","sort","splice","unshift"],function(ue){var ge=che[ue],Ye=/^(?:push|sort|unshift)$/.test(ue)?"tap":"thru",Rt=/^(?:pop|shift)$/.test(ue);va.prototype[ue]=function(){var gr=arguments;if(Rt&&!this.__chain__){var Yr=this.value();return ge.apply(Io(Yr)?Yr:[],gr)}return this[Ye](function(Ea){return ge.apply(Io(Ea)?Ea:[],gr)})}});cp(Bl.prototype,function(ue,ge){var Ye=va[ge];if(Ye){var Rt=Ye.name+"";e7.call(Am,Rt)||(Am[Rt]=[]),Am[Rt].push({name:ge,func:Ye})}});Am[ry(void 0,she).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;va.prototype.at=Id.at;va.prototype.chain=Id.wrapperChain;va.prototype.commit=Id.commit;va.prototype.next=Id.next;va.prototype.plant=Id.plant;va.prototype.reverse=Id.reverse;va.prototype.toJSON=va.prototype.valueOf=va.prototype.value=Id.value;va.prototype.first=va.prototype.head;JD&&(va.prototype[JD]=Id.toIterator);var Qc=va;var Rd=uX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(ge,Ye){this.model=ge,this.serializers=Ye}get(ge){let Ye=this.serializers[ge],Rt=this.model.get(ge);return Ye?.deserialize?Ye.deserialize(Rt):Rt}set(ge,Ye){let Rt=this.serializers[ge];Rt?.serialize&&(Ye=Rt.serialize(Ye)),this.model.set(ge,Ye)}on(ge,Ye){this.model.on(ge,Ye)}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(ge){if(ge==null){var Ye=this.model.get("_widget_data").length;ge=Qc.range(Ye)}return Array.isArray(ge)||(ge=[ge]),ge}do_data(){}do_layout(){}do_addTraces(){var ge=this.model.get("_py2js_addTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Rt=ge.trace_data;Qc.forEach(Rt,function(gr){Ye.push(gr)})}}do_deleteTraces(){var ge=this.model.get("_py2js_deleteTraces");if(ge!==null){var Ye=ge.delete_inds,Rt=this.model.get("_widget_data");Ye.slice().reverse().forEach(function(gr){Rt.splice(gr,1)})}}do_moveTraces(){var ge=this.model.get("_py2js_moveTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Rt=ge.current_trace_inds,gr=ge.new_trace_inds;ghe(Ye,Rt,gr)}}do_restyle(){var ge=this.model.get("_py2js_restyle");if(ge!==null){var Ye=ge.restyle_data,Rt=this._normalize_trace_indexes(ge.restyle_traces);n7(this.model.get("_widget_data"),Ye,Rt)}}do_relayout(){var ge=this.model.get("_py2js_relayout");ge!==null&&f2(this.model.get("_widget_layout"),ge.relayout_data)}do_update(){var ge=this.model.get("_py2js_update");if(ge!==null){var Ye=ge.style_data,Rt=ge.layout_data,gr=this._normalize_trace_indexes(ge.style_traces);n7(this.model.get("_widget_data"),Ye,gr),f2(this.model.get("_widget_layout"),Rt)}}do_animate(){var ge=this.model.get("_py2js_animate");if(ge!==null){for(var Ye=ge.style_data,Rt=ge.layout_data,gr=this._normalize_trace_indexes(ge.style_traces),Yr=0;Yr<Ye.length;Yr++){var Ea=Ye[Yr],ei=gr[Yr],oi=this.model.get("_widget_data")[ei];f2(oi,Ea)}f2(this.model.get("_widget_layout"),Rt)}}do_removeLayoutProps(){var ge=this.model.get("_py2js_removeLayoutProps");if(ge!==null){var Ye=ge.remove_props,Rt=this.model.get("_widget_layout");o7(Rt,Ye)}}do_removeTraceProps(){var ge=this.model.get("_py2js_removeTraceProps");if(ge!==null){var Ye=ge.remove_props,Rt=ge.remove_trace,gr=this.model.get("_widget_data")[Rt];o7(gr,Ye)}}},phe={_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(ge,Ye){this.model=ge,this.el=Ye}perform_render(){var ge=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 Ye=this.model.get("_last_layout_edit_id"),Rt=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(ge.el,gr,Yr,Ea).then(function(){ge._sendTraceDeltas(Rt),ge._sendLayoutDelta(Ye),ge.el.on("plotly_restyle",function(oi){ge.handle_plotly_restyle(oi)}),ge.el.on("plotly_relayout",function(oi){ge.handle_plotly_relayout(oi)}),ge.el.on("plotly_update",function(oi){ge.handle_plotly_update(oi)}),ge.el.on("plotly_click",function(oi){ge.handle_plotly_click(oi)}),ge.el.on("plotly_hover",function(oi){ge.handle_plotly_hover(oi)}),ge.el.on("plotly_unhover",function(oi){ge.handle_plotly_unhover(oi)}),ge.el.on("plotly_selected",function(oi){ge.handle_plotly_selected(oi)}),ge.el.on("plotly_deselect",function(oi){ge.handle_plotly_deselect(oi)}),ge.el.on("plotly_doubleclick",function(oi){ge.handle_plotly_doubleclick(oi)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:ge.el,viewID:ge.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(ge,Ye){Ye.apply(this,arguments);var Rt=this;switch(ge.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Rt.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 ge=this,Ye=ge.model.get("_widget_layout");(Qc.isNil(Ye)||Qc.isNil(Ye.width))&&Rd.default.Plots.resize(ge.el).then(function(){var Rt=ge.model.get("_last_layout_edit_id");ge._sendLayoutDelta(Rt)})}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(ge){var Ye;if(ge.hasOwnProperty("points")){var Rt=ge.points,gr=Rt.length,Yr=!0;for(let bn=0;bn<gr&&(Yr=Yr&&Rt[bn].hasOwnProperty("pointNumbers"),!!Yr);bn++);var Ea=gr;if(Yr){Ea=0;for(let bn=0;bn<gr;bn++)Ea+=Rt[bn].pointNumbers.length}if(Ye={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<Rt[oi].pointNumbers.length;Fn++,ei++)Ye.point_indexes[ei]=Rt[oi].pointNumbers[Fn],Ye.xs[ei]=Rt[oi].x,Ye.ys[ei]=Rt[oi].y,Ye.trace_indexes[ei]=Rt[oi].curveNumber;let bn=!0;for(let Fn=1;Fn<Ea&&(bn=bn&&Ye.trace_indexes[Fn-1]===Ye.trace_indexes[Fn],!!bn);Fn++);bn&&Ye.point_indexes.sort(function(Fn,To){return Fn-To})}else for(var oi=0;oi<gr;oi++)Ye.trace_indexes[oi]=Rt[oi].curveNumber,Ye.point_indexes[oi]=Rt[oi].pointNumber,Ye.xs[oi]=Rt[oi].x,Ye.ys[oi]=Rt[oi].y;var Cn=Rt[0]!==void 0&&Rt[0].hasOwnProperty("z");if(Cn)for(Ye.zs=new Array(gr),oi=0;oi<gr;oi++)Ye.zs[oi]=Rt[oi].z;return Ye}else return null}buildInputDeviceStateObject(ge){var Ye=ge.event;if(Ye===void 0)return null;var Rt={alt:Ye.altKey,ctrl:Ye.ctrlKey,meta:Ye.metaKey,shift:Ye.shiftKey,button:Ye.button,buttons:Ye.buttons};return Rt}buildSelectorObject(ge){var Ye;return ge.hasOwnProperty("range")?Ye={type:"box",selector_state:{xrange:ge.range.x,yrange:ge.range.y}}:ge.hasOwnProperty("lassoPoints")?Ye={type:"lasso",selector_state:{xs:ge.lassoPoints.x,ys:ge.lassoPoints.y}}:Ye=null,Ye}handle_plotly_restyle(ge){if(ge!=null&&!(ge[0]&&ge[0].hasOwnProperty("_doNotReportToPy"))){var Ye=ge[0],Rt=ge[1],gr={style_data:Ye,style_traces:Rt,source_view_id:this.viewID};this.model.set("_js2py_restyle",gr),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(ge){if(ge!=null&&!ge.hasOwnProperty("_doNotReportToPy")){var Ye={relayout_data:ge,source_view_id:this.viewID};this.model.set("_js2py_relayout",Ye),this.touch()}}handle_plotly_update(ge){if(ge!=null&&!(ge.data&&ge.data[0].hasOwnProperty("_doNotReportToPy"))){var Ye={style_data:ge.data[0],style_traces:ge.data[1],layout_data:ge.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Ye),this.touch()}}handle_plotly_click(ge){this._send_points_callback_message(ge,"plotly_click")}handle_plotly_hover(ge){this._send_points_callback_message(ge,"plotly_hover")}handle_plotly_unhover(ge){this._send_points_callback_message(ge,"plotly_unhover")}handle_plotly_selected(ge){this._send_points_callback_message(ge,"plotly_selected")}handle_plotly_deselect(ge){ge={points:[]},this._send_points_callback_message(ge,"plotly_deselect")}_send_points_callback_message(ge,Ye){if(ge!=null){var Rt={event_type:Ye,points:this.buildPointsObject(ge),device_state:this.buildInputDeviceStateObject(ge),selector:this.buildSelectorObject(ge)};Rt.points!==null&&Rt.points!==void 0&&(this.model.set("_js2py_pointsCallback",Rt),this.touch())}}handle_plotly_doubleclick(ge){}do_addTraces(){var ge=this.model.get("_py2js_addTraces");if(ge!==null){var Ye=this;Rd.default.addTraces(this.el,ge.trace_data).then(function(){Ye._sendTraceDeltas(ge.trace_edit_id);var Rt=ge.layout_edit_id;Ye._sendLayoutDelta(Rt)})}}do_deleteTraces(){var ge=this.model.get("_py2js_deleteTraces");if(ge!==null){var Ye=ge.delete_inds,Rt=this;Rd.default.deleteTraces(this.el,Ye).then(function(){var gr=ge.trace_edit_id;Rt._sendTraceDeltas(gr);var Yr=ge.layout_edit_id;Rt._sendLayoutDelta(Yr)})}}do_moveTraces(){var ge=this.model.get("_py2js_moveTraces");if(ge!==null){var Ye=ge.current_trace_inds,Rt=ge.new_trace_inds,gr=Qc.isEqual(Ye,Rt);gr||Rd.default.moveTraces(this.el,Ye,Rt)}}do_restyle(){var ge=this.model.get("_py2js_restyle");if(ge!==null){var Ye=ge.restyle_data,Rt=this.model._normalize_trace_indexes(ge.restyle_traces);Ye._doNotReportToPy=!0,Rd.default.restyle(this.el,Ye,Rt),this._sendTraceDeltas(ge.trace_edit_id);var gr=ge.layout_edit_id;this._sendLayoutDelta(gr)}}do_relayout(){var ge=this.model.get("_py2js_relayout");if(ge!==null){if(ge.source_view_id!==this.viewID){var Ye=ge.relayout_data;Ye._doNotReportToPy=!0,Rd.default.relayout(this.el,ge.relayout_data)}var Rt=ge.layout_edit_id;this._sendLayoutDelta(Rt)}}do_update(){var ge=this.model.get("_py2js_update");if(ge!==null){var Ye=ge.style_data||{},Rt=ge.layout_data||{},gr=this.model._normalize_trace_indexes(ge.style_traces);Ye._doNotReportToPy=!0,Rd.default.update(this.el,Ye,Rt,gr),this._sendTraceDeltas(ge.trace_edit_id);var Yr=ge.layout_edit_id;this._sendLayoutDelta(Yr)}}do_animate(){var ge=this.model.get("_py2js_animate");if(ge!==null){var Ye=ge.animation_opts,Rt=ge.style_data,gr=ge.layout_data,Yr=this.model._normalize_trace_indexes(ge.style_traces),Ea={data:Rt,layout:gr,traces:Yr};Ea._doNotReportToPy=!0;var ei=this;Rd.default.animate(this.el,Ea,Ye).then(function(){ei._sendTraceDeltas(ge.trace_edit_id);var oi=ge.layout_edit_id;ei._sendLayoutDelta(oi)})}}_sendLayoutDelta(ge){var Ye=x_(this.getFullLayout(),this.model.get("_widget_layout")),Rt={layout_delta:Ye,layout_edit_id:ge};this.model.set("_js2py_widget_layoutDelta",Rt),this.touch()}_sendTraceDeltas(ge){for(var Ye=this.model.get("_widget_data"),Rt=Qc.range(Ye.length),gr=new Array(Rt.length),Yr=this.getFullData(),Ea=0;Ea<Rt.length;Ea++){var ei=Rt[Ea];gr[Ea]=x_(Yr[ei],Ye[ei])}var oi={trace_deltas:gr,trace_edit_id:ge};this.model.set("_js2py_traceDeltas",oi),this.touch()}},dhe={int8:Int8Array,int16:Int16Array,int32:Int32Array,uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,float32:Float32Array,float64:Float64Array};function vhe(ue){var ge;if(ue instanceof Int8Array)ge="int8";else if(ue instanceof Int16Array)ge="int16";else if(ue instanceof Int32Array)ge="int32";else if(ue instanceof Uint8Array)ge="uint8";else if(ue instanceof Uint16Array)ge="uint16";else if(ue instanceof Uint32Array)ge="uint32";else if(ue instanceof Float32Array)ge="float32";else if(ue instanceof Float64Array)ge="float64";else return ue;var Ye={dtype:ge,shape:[ue.length],value:ue.buffer};return Ye}function qh(ue,ge){var Ye;if(Qc.isTypedArray(ue))Ye=vhe(ue);else if(Array.isArray(ue)){Ye=new Array(ue.length);for(var Rt=0;Rt<ue.length;Rt++)Ye[Rt]=qh(ue[Rt])}else if(Qc.isObject(ue)){Ye={};for(var gr in ue)ue.hasOwnProperty(gr)&&(Ye[gr]=qh(ue[gr]))}else ue===void 0?Ye="_undefined_":Ye=ue;return Ye}function Vh(ue,ge){var Ye;if(Array.isArray(ue)){Ye=new Array(ue.length);for(var Rt=0;Rt<ue.length;Rt++)Ye[Rt]=Vh(ue[Rt])}else if(Qc.isObject(ue))if((Qc.has(ue,"value")||Qc.has(ue,"buffer"))&&Qc.has(ue,"dtype")&&Qc.has(ue,"shape")){var gr=dhe[ue.dtype],Yr=Qc.has(ue,"value")?ue.value.buffer:ue.buffer.buffer;Ye=new gr(Yr)}else{Ye={};for(var Ea in ue)ue.hasOwnProperty(Ea)&&(Ye[Ea]=Vh(ue[Ea]))}else ue==="_undefined_"?Ye=void 0:Ye=ue;return Ye}function mhe(ue){return ArrayBuffer.isView(ue)&&!(ue instanceof DataView)}function i7(ue,ge,Ye){if(Ye[0]==="_")return null;if(mhe(ge))return ge}function f2(ue,ge){for(var Ye in ge)if(ge.hasOwnProperty(Ye)){var Rt=ge[Ye];Rt===null?Qc.unset(ue,Ye):Qc.set(ue,Ye,Rt)}}function n7(ue,ge,Ye){for(var Rt in ge)if(ge.hasOwnProperty(Rt)){var gr=ge[Rt];Array.isArray(gr)||(gr=[gr]);for(var Yr=0;Yr<Ye.length;Yr++){var Ea=Ye[Yr],ei=ue[Ea],oi=gr[Yr%gr.length];oi===null?Qc.unset(ei,Rt):oi!==void 0&&Qc.set(ei,Rt,oi)}}}function ghe(ue,ge,Ye){for(var Rt=[],gr=ge.length-1;gr>=0;gr--)Rt.splice(0,0,ue[ge[gr]]),ue.splice(ge[gr],1);var Yr=Qc(Ye).zip(Rt).sortBy(0).unzip().value();Ye=Yr[0],Rt=Yr[1];for(var Ea=0;Ea<Ye.length;Ea++)ue.splice(Ye[Ea],0,Rt[Ea])}function o7(ue,ge){for(var Ye=0;Ye<ge.length;Ye++){var Rt=ge[Ye];Qc.unset(ue,Rt)}}function x_(ue,ge){var Ye;Array.isArray(ue)?Ye=new Array(ue.length):Ye={},ge==null&&(ge={});for(var Rt in ue)if(Rt[0]!=="_"&&ue.hasOwnProperty(Rt)&&ue[Rt]!==null){var gr;if(gr=Qc.isEqual(ue[Rt],ge[Rt]),!gr||Rt==="uid"){var Yr=ue[Rt];if(ge.hasOwnProperty(Rt)&&typeof Yr=="object")if(Array.isArray(Yr))if(Yr.length>0&&typeof Yr[0]=="object"){Ye[Rt]=new Array(Yr.length);for(var Ea=0;Ea<Yr.length;Ea++)!Array.isArray(ge[Rt])||ge[Rt].length<=Ea?Ye[Rt][Ea]=Yr[Ea]:Ye[Rt][Ea]=x_(Yr[Ea],ge[Rt][Ea])}else Ye[Rt]=Yr;else{var ei=x_(Yr,ge[Rt]);Object.keys(ei).length>0&&(Ye[Rt]=ei)}else typeof Yr=="object"&&!Array.isArray(Yr)?Ye[Rt]=x_(Yr,{}):Yr!==void 0&&typeof Yr!="function"&&(Ye[Rt]=Yr)}}return Ye}function s7(ue,ge,Ye,Rt){if(Ye||(Ye=16),ge===void 0&&(ge=24),ge<=0)return"0";var gr=Math.log(Math.pow(2,ge))/Math.log(Ye),Yr="",Ea,ei,oi;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,ge/Ea))/Math.log(Ye)*Ea;var Cn=gr-Math.floor(gr);for(Ea=0;Ea<Math.floor(gr);Ea++)oi=Math.floor(Math.random()*Ye).toString(Ye),Yr=oi+Yr;Cn&&(ei=Math.pow(Ye,Cn),oi=Math.floor(Math.random()*ei).toString(Ye),Yr=oi+Yr);var bn=parseInt(Yr,Ye);return ue&&ue[Yr]||bn!==1/0&&bn>=Math.pow(2,ge)?Rt>10?(console.warn("randstr failed uniqueness"),Yr):s7(ue,ge,Ye,(Rt||0)+1):Yr}var MHe=()=>{let ue;return{initialize(ge){ue=new XA(ge.model,phe),ue.initialize()},render({el:ge}){let Ye=new ZA(ue,ge);return Ye.perform_render(),()=>Ye.remove()}}};export{XA as FigureModel,ZA as FigureView,MHe as default};
/*! Bundled license information:
plotly.js/dist/plotly.js:
(*!
* 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.
*)
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
(*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
(*! 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
*)
*/